From c3769a38d4d9b9ed8e3f7f7b84dd0b6e2982e2af Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Thu, 25 Apr 2024 20:54:46 +0000 Subject: [PATCH 01/16] Update CI references to 0.0.122 --- .github/workflows/build.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b16b22eb..4dea1a49 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,11 +40,11 @@ jobs: # Note this is a different endpoint, as we need one non-upstream commit! git clone https://github.com/lightningdevkit/rust-lightning cd rust-lightning - git checkout origin/0.0.121-bindings + git checkout origin/0.0.122-bindings cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings - git checkout 0.0.121 + git checkout 0.0.122 cd lightning-c-bindings cargo update -p memchr --precise "2.5.0" --verbose - name: Rebuild C bindings without STD @@ -138,11 +138,11 @@ jobs: # Note this is a different endpoint, as we need one non-upstream commit! git clone https://github.com/lightningdevkit/rust-lightning cd rust-lightning - git checkout origin/0.0.121-bindings + git checkout origin/0.0.122-bindings cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings - git checkout 0.0.121 + git checkout 0.0.122 cd lightning-c-bindings cargo update -p memchr --precise "2.5.0" --verbose - name: Rebuild C bindings with STD @@ -185,11 +185,11 @@ jobs: # Note this is a different endpoint, as we need one non-upstream commit! git clone https://github.com/lightningdevkit/rust-lightning cd rust-lightning - git checkout origin/0.0.121-bindings + git checkout origin/0.0.122-bindings cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings - git checkout 0.0.121 + git checkout 0.0.122 - name: Fetch MacOS SDK run: | curl -o Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz https://bitcoincore.org/depends-sources/sdks/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz @@ -291,11 +291,11 @@ jobs: # Note this is a different endpoint, as we need one non-upstream commit! git clone https://github.com/lightningdevkit/rust-lightning cd rust-lightning - git checkout origin/0.0.121-bindings + git checkout origin/0.0.122-bindings cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings - git checkout 0.0.121 + git checkout 0.0.122 cd lightning-c-bindings cargo update -p memchr --precise "2.5.0" --verbose - name: Pin proc-macro and quote to meet MSRV @@ -354,11 +354,11 @@ jobs: # Note this is a different endpoint, as we need one non-upstream commit! git clone https://github.com/lightningdevkit/rust-lightning cd rust-lightning - git checkout origin/0.0.121-bindings + git checkout origin/0.0.122-bindings cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings - git checkout 0.0.121 + git checkout 0.0.122 cd lightning-c-bindings cargo update -p memchr --precise "2.5.0" --verbose - name: Pin proc-macro and quote to meet MSRV @@ -483,11 +483,11 @@ jobs: # Note this is a different endpoint, as we need one non-upstream commit! git clone https://github.com/lightningdevkit/rust-lightning cd rust-lightning - git checkout origin/0.0.121-bindings + git checkout origin/0.0.122-bindings cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings - git checkout 0.0.121 + git checkout 0.0.122 - name: Fetch MacOS SDK run: | curl -o Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz https://bitcoincore.org/depends-sources/sdks/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz @@ -620,11 +620,11 @@ jobs: # Note this is a different endpoint, as we need one non-upstream commit! git clone https://github.com/lightningdevkit/rust-lightning cd rust-lightning - git checkout origin/0.0.121-bindings + git checkout origin/0.0.122-bindings cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings - git checkout 0.0.121 + git checkout 0.0.122 cd lightning-c-bindings . $HOME/.cargo/env cargo update -p memchr --precise "2.5.0" --verbose @@ -700,11 +700,11 @@ jobs: # Note this is a different endpoint, as we need one non-upstream commit! git clone https://github.com/lightningdevkit/rust-lightning cd rust-lightning - git checkout origin/0.0.121-bindings + git checkout origin/0.0.122-bindings cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings - git checkout 0.0.121 + git checkout 0.0.122 cd lightning-c-bindings cargo update -p memchr --precise "2.5.0" --verbose - name: Rebuild C bindings and check the sample app builds + links -- 2.30.2 From a25e4ce2bf1b3c8b750be44fc70328ca8b056228 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sun, 12 May 2024 14:47:02 +0000 Subject: [PATCH 02/16] Support 4-tuples --- csharp_strings.py | 2 +- genbindings.py | 16 ++++++++++------ java_strings.py | 2 +- python_strings.py | 2 +- typescript_strings.py | 2 +- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/csharp_strings.py b/csharp_strings.py index a73ee203..3e5e247d 100644 --- a/csharp_strings.py +++ b/csharp_strings.py @@ -1179,7 +1179,7 @@ public class {struct_name.replace("LDK","")} : CommonBase {{ out_opaque_struct_human = "" out_opaque_struct_human += self.hu_struct_file_prefix out_opaque_struct_human += "\n/**\n * " + struct_doc_comment.replace("\n", "\n * ") + "\n */\n" - hu_name = struct_name.replace("LDKC2Tuple", "TwoTuple").replace("LDKC3Tuple", "ThreeTuple").replace("LDK", "") + hu_name = struct_name.replace("LDKC2Tuple", "TwoTuple").replace("LDKC3Tuple", "ThreeTuple").replace("LDKC4Tuple", "FourTuple").replace("LDK", "") out_opaque_struct_human += ("public class " + hu_name + " : CommonBase") if struct_name.startswith("LDKLocked") or struct_name.startswith("LDKReadOnly"): out_opaque_struct_human += (", IDisposable") diff --git a/genbindings.py b/genbindings.py index 3c79bb8f..b92d17ef 100755 --- a/genbindings.py +++ b/genbindings.py @@ -403,6 +403,7 @@ def java_c_types(fn_arg, ret_arr_len): java_hu_ty = java_hu_ty.replace("LDKCResult", "Result") java_hu_ty = java_hu_ty.replace("LDKC2Tuple", "TwoTuple") java_hu_ty = java_hu_ty.replace("LDKC3Tuple", "ThreeTuple") + java_hu_ty = java_hu_ty.replace("LDKC4Tuple", "FourTuple") java_hu_ty = java_hu_ty.replace("LDK", "") fn_ty_arg = "J" fn_arg = ma.group(2).strip() @@ -571,14 +572,17 @@ with open(sys.argv[1]) as in_h, open(f"{sys.argv[2]}/bindings{consts.file_ext}", struct_meth = method_name.rsplit("Z", 1)[0][1:] + "Z" expected_struct = "LDKC" + struct_meth struct_meth_name = method_name[len(struct_meth) + 1:].strip("_") - elif method_name.startswith("C2Tuple") or method_name.startswith("C3Tuple"): + elif method_name.startswith("C2Tuple") or method_name.startswith("C3Tuple") or method_name.startswith("C4Tuple"): tuple_name = method_name.rsplit("Z", 1)[0][2:] + "Z" if method_name.startswith("C2Tuple"): struct_meth = "Two" + tuple_name expected_struct = "LDKC2" + tuple_name - else: + elif method_name.startswith("C3Tuple"): struct_meth = "Three" + tuple_name expected_struct = "LDKC3" + tuple_name + else: + struct_meth = "Four" + tuple_name + expected_struct = "LDKC4" + tuple_name struct_meth_name = method_name[len(tuple_name) + 2:].strip("_") else: struct_meth = method_name.split("_")[0] @@ -666,7 +670,7 @@ with open(sys.argv[1]) as in_h, open(f"{sys.argv[2]}/bindings{consts.file_ext}", not method_name.startswith("_") and method_name != "check_platform" and method_name != "Result_read" and not expected_struct in unitary_enums and - ((not method_name.startswith("C2Tuple_") and not method_name.startswith("C3Tuple_")) + ((not method_name.startswith("C2Tuple_") and not method_name.startswith("C3Tuple_") and not method_name.startswith("C4Tuple_")) or method_name.endswith("_read"))) # If we're adding a static method, and it returns a primitive or an array of primitives, @@ -909,7 +913,7 @@ with open(sys.argv[1]) as in_h, open(f"{sys.argv[2]}/bindings{consts.file_ext}", map_fn_with_ref_option(dummy_line, reg_fn_regex.match(dummy_line), None, None, "", holds_ref) def map_tuple(struct_name, field_lines): - human_ty = struct_name.replace("LDKC2Tuple", "TwoTuple").replace("LDKC3Tuple", "ThreeTuple") + human_ty = struct_name.replace("LDKC2Tuple", "TwoTuple").replace("LDKC3Tuple", "ThreeTuple").replace("LDKC4Tuple", "FourTuple") with open(f"{sys.argv[3]}/structs/{human_ty}{consts.file_ext}", "w") as out_java_struct: out_java_struct.write(consts.map_tuple(struct_name)) ty_list = [] @@ -1008,7 +1012,7 @@ with open(sys.argv[1]) as in_h, open(f"{sys.argv[2]}/bindings{consts.file_ext}", vec_ty_match = line_indicates_vec_regex.match(struct_line) if vec_ty_match is not None and struct_name.startswith("LDKCVec_"): vec_ty = vec_ty_match.group(2) - elif struct_name.startswith("LDKC2Tuple_") or struct_name.startswith("LDKC3Tuple_"): + elif struct_name.startswith("LDKC2Tuple_") or struct_name.startswith("LDKC3Tuple_") or struct_name.startswith("LDKC4Tuple_"): is_tuple = True trait_fn_match = line_indicates_trait_regex.match(struct_line) if trait_fn_match is not None: @@ -1186,7 +1190,7 @@ with open(sys.argv[1]) as in_h, open(f"{sys.argv[2]}/bindings{consts.file_ext}", with open(f"{sys.argv[3]}/structs/{struct_name.replace('LDKCResult', 'Result')}{consts.file_ext}", "a") as out_java_struct: out_java_struct.write("}\n" + consts.hu_struct_file_suffix) for struct_name in tuple_types: - struct_hu_name = struct_name.replace("LDKC2Tuple", "TwoTuple").replace("LDKC3Tuple", "ThreeTuple") + struct_hu_name = struct_name.replace("LDKC2Tuple", "TwoTuple").replace("LDKC3Tuple", "ThreeTuple").replace("LDKC4Tuple", "FourTuple") with open(f"{sys.argv[3]}/structs/{struct_hu_name}{consts.file_ext}", "a") as out_java_struct: out_java_struct.write("}\n" + consts.hu_struct_file_suffix) diff --git a/java_strings.py b/java_strings.py index b0c100e7..c99e8312 100644 --- a/java_strings.py +++ b/java_strings.py @@ -1390,7 +1390,7 @@ import javax.annotation.Nullable; out_opaque_struct_human += self.hu_struct_file_prefix out_opaque_struct_human += "\n/**\n * " + struct_doc_comment.replace("\n", "\n * ") + "\n */\n" out_opaque_struct_human += "@SuppressWarnings(\"unchecked\") // We correctly assign various generic arrays\n" - hu_name = struct_name.replace("LDKC2Tuple", "TwoTuple").replace("LDKC3Tuple", "ThreeTuple").replace("LDK", "") + hu_name = struct_name.replace("LDKC2Tuple", "TwoTuple").replace("LDKC4Tuple", "FourTuple").replace("LDKC3Tuple", "ThreeTuple").replace("LDK", "") out_opaque_struct_human += ("public class " + hu_name + " extends CommonBase") if struct_name.startswith("LDKLocked") or struct_name.startswith("LDKReadOnly"): out_opaque_struct_human += (" implements AutoCloseable") diff --git a/python_strings.py b/python_strings.py index d5157bf0..b4877199 100644 --- a/python_strings.py +++ b/python_strings.py @@ -1291,7 +1291,7 @@ export class {struct_name.replace("LDK","")} extends CommonBase {{ def map_opaque_struct(self, struct_name, struct_doc_comment): method_header = "" - hu_name = struct_name.replace("LDKC2Tuple", "TwoTuple").replace("LDKC3Tuple", "ThreeTuple").replace("LDK", "") + hu_name = struct_name.replace("LDKC2Tuple", "TwoTuple").replace("LDKC3Tuple", "ThreeTuple").replace("LDKC4Tuple", "FourTuple").replace("LDK", "") out_opaque_struct_human = f"{self.hu_struct_file_prefix}" extra_docs = "" extra_body = "" diff --git a/typescript_strings.py b/typescript_strings.py index afb2b67f..0d8b223e 100644 --- a/typescript_strings.py +++ b/typescript_strings.py @@ -1409,7 +1409,7 @@ export class {struct_name.replace("LDK","")} extends CommonBase {{ def map_opaque_struct(self, struct_name, struct_doc_comment): method_header = "" - hu_name = struct_name.replace("LDKC2Tuple", "TwoTuple").replace("LDKC3Tuple", "ThreeTuple").replace("LDK", "") + hu_name = struct_name.replace("LDKC2Tuple", "TwoTuple").replace("LDKC3Tuple", "ThreeTuple").replace("LDKC4Tuple", "FourTuple").replace("LDK", "") out_opaque_struct_human = f"{self.hu_struct_file_prefix}" constructor_body = "super(ptr, bindings." + struct_name.replace("LDK","") + "_free);" extra_docs = "" -- 2.30.2 From 04257322368905ab18c881a8d07b0cfdae4cdd9e Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sun, 12 May 2024 14:47:13 +0000 Subject: [PATCH 03/16] Map the new `LDKTweakedPublicKey` as a 32-byte array --- genbindings.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/genbindings.py b/genbindings.py index b92d17ef..9ae48c4e 100755 --- a/genbindings.py +++ b/genbindings.py @@ -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:]) -- 2.30.2 From b70af097a9088982656824c1a42d3cc1b5d6734e Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sun, 12 May 2024 14:47:29 +0000 Subject: [PATCH 04/16] Add a new `force_free` in Java for cases where its useful --- java_strings.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/java_strings.py b/java_strings.py index c99e8312..7e35d175 100644 --- a/java_strings.py +++ b/java_strings.py @@ -1418,6 +1418,9 @@ import javax.annotation.Nullable; java_hu_struct += "\tprotected void finalize() throws Throwable {\n" java_hu_struct += "\t\tif (ptr != 0) { bindings." + struct_name.replace("LDK","") + "_free(ptr); } super.finalize();\n" java_hu_struct += "\t}\n\n" + java_hu_struct += "\tprotected void force_free() {\n" # Used by NioPeerHandler + java_hu_struct += "\t\tif (ptr != 0) { bindings." + struct_name.replace("LDK","") + "_free(ptr); ptr = 0; }\n" + java_hu_struct += "\t}\n\n" java_hu_struct += "\tstatic " + human_ty + " constr_from_ptr(long ptr) {\n" java_hu_struct += "\t\tif (bindings." + struct_name.replace("LDK", "") + "_is_ok(ptr)) {\n" java_hu_struct += "\t\t\treturn new " + human_ty + "_OK(null, ptr);\n" -- 2.30.2 From fcd768b3fedc46704675725136578d70af42201d Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sun, 12 May 2024 19:36:42 +0000 Subject: [PATCH 05/16] Avoid manual memory management in NioPeerHandler We still free the native memory optimistically, but avoid disabling the GC being able to free memory entirely. Fixes #157 --- .../org/ldk/batteries/NioPeerHandler.java | 55 ++++++------------- 1 file changed, 16 insertions(+), 39 deletions(-) diff --git a/src/main/java/org/ldk/batteries/NioPeerHandler.java b/src/main/java/org/ldk/batteries/NioPeerHandler.java index 172eca34..514d4b70 100644 --- a/src/main/java/org/ldk/batteries/NioPeerHandler.java +++ b/src/main/java/org/ldk/batteries/NioPeerHandler.java @@ -6,6 +6,8 @@ import org.ldk.structs.*; import java.io.IOException; import java.lang.reflect.Field; import java.lang.ref.Reference; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; import java.net.*; import java.util.LinkedList; import java.nio.Buffer; @@ -19,7 +21,6 @@ import java.nio.channels.*; public class NioPeerHandler { private static class Peer { SocketDescriptor descriptor; - long descriptor_raw_pointer; SelectionKey key; } @@ -48,14 +49,13 @@ public class NioPeerHandler { } } - static private Field CommonBasePointer; + static private Method ResultBoolPeerHandleError_Free; static { try { - Class c = PeerManager.class.getSuperclass(); - CommonBasePointer = c.getDeclaredField("ptr"); - CommonBasePointer.setAccessible(true); - long _dummy_check = CommonBasePointer.getLong(Ping.of((short)0, (short)0)); - } catch (NoSuchFieldException | IllegalAccessException e) { + Class c = Result_boolPeerHandleErrorZ.class; + ResultBoolPeerHandleError_Free = c.getDeclaredMethod("force_free"); + ResultBoolPeerHandleError_Free.setAccessible(true); + } catch (NoSuchMethodException e) { throw new IllegalArgumentException( "We currently use reflection to access protected fields as Java has no reasonable access controls", e); } @@ -105,12 +105,6 @@ public class NioPeerHandler { @Override public long hash() { return our_id; } }); peer.descriptor = descriptor; - try { - peer.descriptor_raw_pointer = CommonBasePointer.getLong(descriptor); - } catch (IllegalAccessException e) { - throw new IllegalArgumentException( - "We currently use reflection to access protected fields as Java has no reasonable access controls", e); - } return peer; } @@ -147,12 +141,6 @@ public class NioPeerHandler { byte[] max_buf_byte_object = new byte[BUF_SZ]; ByteBuffer buf = ByteBuffer.allocate(BUF_SZ); - long peer_manager_raw_pointer; - try { - peer_manager_raw_pointer = CommonBasePointer.getLong(this.peer_manager); - } catch (IllegalAccessException e) { - throw new RuntimeException(e); - } while (true) { try { if (IS_ANDROID) { @@ -215,14 +203,6 @@ public class NioPeerHandler { key.channel().close(); // This may throw, we read -1 so the channel should already be closed, but do this to be safe } else if (read > 0) { ((Buffer)buf).flip(); - // This code is quite hot during initial network graph sync, so we go a ways out of - // our way to avoid object allocations that'll make the GC sweat later - - // * when we're hot, we'll likely often be reading the full buffer, so we keep - // around a full-buffer-sized byte array to reuse across reads, - // * We use the manual memory management call logic directly in bindings instead of - // the nice "human-readable" wrappers. This puts us at risk of memory issues, - // so we indirectly ensure compile fails if the types change by writing the - // "human-readable" form of the same code in the dummy function below. byte[] read_bytes; if (read == BUF_SZ) { read_bytes = max_buf_byte_object; @@ -230,17 +210,21 @@ public class NioPeerHandler { read_bytes = new byte[read]; } buf.get(read_bytes, 0, read); - long read_result_pointer = bindings.PeerManager_read_event( - peer_manager_raw_pointer, peer.descriptor_raw_pointer, read_bytes); - if (bindings.CResult_boolPeerHandleErrorZ_is_ok(read_result_pointer)) { - if (bindings.CResult_boolPeerHandleErrorZ_get_ok(read_result_pointer)) { + Result_boolPeerHandleErrorZ read_res = this.peer_manager.read_event(peer.descriptor, read_bytes); + if (read_res instanceof Result_boolPeerHandleErrorZ.Result_boolPeerHandleErrorZ_OK) { + if (((Result_boolPeerHandleErrorZ.Result_boolPeerHandleErrorZ_OK) read_res).res) { key.interestOps(key.interestOps() & (~SelectionKey.OP_READ)); } + // Force the read_res to drop its native memory early (before finalize()) as this is + // pretty hot and we don't want to bloat native memory too long. + // Note that we only do this in the Ok case as its more trivially safe, the Err + // case has nested structs which will also free and may be confused if their pointer + // is dropped out from under them. + try { ResultBoolPeerHandleError_Free.invoke(read_res); } catch (Exception ignored) {} } else { key.cancel(); key.channel().close(); } - bindings.CResult_boolPeerHandleErrorZ_free(read_result_pointer); } } } catch (IOException ignored) { @@ -260,13 +244,6 @@ public class NioPeerHandler { io_thread.start(); } - // Ensure the types used in the above manual code match what they were when the code was written. - // Ensure the above manual bindings.* code changes if this fails to compile. - private void dummy_check_return_type_matches_manual_memory_code_above(Peer peer) { - byte[] read_bytes = new byte[32]; - Result_boolPeerHandleErrorZ res = this.peer_manager.read_event(peer.descriptor, read_bytes); - } - /** * Connect to a peer given their node id and socket address. Blocks until a connection is established (or returns * IOException) and then the connection handling runs in the background. -- 2.30.2 From 7b75443b8305c6a24d3c08520e1785e9d39960e4 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 13 May 2024 17:01:48 +0000 Subject: [PATCH 06/16] Only handle `null` objects when its allowed This should result in hitting NPEs rather than in-native panics/SEGFAULTs. --- gen_type_mapping.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/gen_type_mapping.py b/gen_type_mapping.py index ba77c087..dc9899bd 100644 --- a/gen_type_mapping.py +++ b/gen_type_mapping.py @@ -295,7 +295,10 @@ class TypeMappingGenerator: ty_info.var_name = "ret" if ty_info.rust_obj in self.opaque_structs: - from_hu_conv = (ty_info.var_name + " == null ? " + self.consts.native_zero_ptr + " : " + self.consts.get_ptr(ty_info.var_name), self.consts.add_ref("this", ty_info.var_name)) + if is_nullable: + from_hu_conv = (ty_info.var_name + " == null ? " + self.consts.native_zero_ptr + " : " + self.consts.get_ptr(ty_info.var_name), self.consts.add_ref("this", ty_info.var_name)) + else: + from_hu_conv = (self.consts.get_ptr(ty_info.var_name), self.consts.add_ref("this", ty_info.var_name)) opaque_arg_conv = ty_info.rust_obj + " " + ty_info.var_name + "_conv;\n" opaque_arg_conv = opaque_arg_conv + ty_info.var_name + "_conv.inner = untag_ptr(" + ty_info.var_name + ");\n" opaque_arg_conv += ty_info.var_name + "_conv.is_owned = ptr_is_owned(" + ty_info.var_name + ");\n" @@ -310,8 +313,10 @@ class TypeMappingGenerator: # whereas in the first we prefer to clone in C to avoid additional Java code as much as possible. if holds_ref: opaque_arg_conv += "\n" + ty_info.var_name + "_conv = " + ty_info.rust_obj.replace("LDK", "") + "_clone(&" + ty_info.var_name + "_conv);" - else: + elif is_nullable: from_hu_conv = (ty_info.var_name + " == null ? " + self.consts.native_zero_ptr + " : " + ty_info.var_name + ".clone_ptr()", "") + else: + from_hu_conv = (ty_info.var_name + ".clone_ptr()", "") elif ty_info.passed_as_ptr: opaque_arg_conv += "\n// WARNING: we need a move here but no clone is available for " + ty_info.rust_obj + "\n" # TODO: Once we support features cloning (which just isn't in C yet), we can make this a compile error instead! @@ -421,7 +426,7 @@ class TypeMappingGenerator: if holds_ref: base_conv += "\n" + ty_info.var_name + "_conv = " + ty_info.rust_obj.replace("LDK", "") + "_clone((" + ty_info.rust_obj + "*)untag_ptr(" + ty_info.var_name + "));" else: - from_hu_conv = (ty_info.var_name + " == null ? " + self.consts.native_zero_ptr + " : " + ty_info.var_name + ".clone_ptr()", "") + from_hu_conv = (ty_info.var_name + ".clone_ptr()", "") base_conv += "\n" + "FREE(untag_ptr(" + ty_info.var_name + "));" elif needs_full_clone: base_conv = base_conv + "\n// WARNING: we may need a move here but no clone is available for " + ty_info.rust_obj @@ -467,7 +472,7 @@ class TypeMappingGenerator: else: ret_conv = (ty_info.rust_obj + "* " + ty_info.var_name + "_conv = MALLOC(sizeof(" + ty_info.rust_obj + "), \"" + ty_info.rust_obj + "\");\n*" + ty_info.var_name + "_conv = ", ";") if from_hu_conv is None: - from_hu_conv = (ty_info.var_name + " != null ? " + self.consts.get_ptr(ty_info.var_name) + " : " + self.consts.native_zero_ptr, "") + from_hu_conv = (self.consts.get_ptr(ty_info.var_name), "") return ConvInfo(ty_info = ty_info, arg_name = ty_info.var_name, arg_conv = base_conv, arg_conv_name = ty_info.var_name + "_conv", arg_conv_cleanup = None, ret_conv = ret_conv, ret_conv_name = "tag_ptr(" + ty_info.var_name + "_conv, true)", @@ -493,7 +498,7 @@ class TypeMappingGenerator: else: to_hu_conv_sfx = "" if from_hu_conv is None: - from_hu_conv = (ty_info.var_name + " != null ? " + self.consts.get_ptr(ty_info.var_name) + " : " + self.consts.native_zero_ptr, "") + from_hu_conv = (self.consts.get_ptr(ty_info.var_name), "") return ConvInfo(ty_info = ty_info, arg_name = ty_info.var_name, arg_conv = base_conv, arg_conv_name = ty_info.var_name + "_conv", arg_conv_cleanup = None, ret_conv = ret_conv, ret_conv_name = ret_conv_name, @@ -546,7 +551,7 @@ class TypeMappingGenerator: ret_conv = ret_conv, ret_conv_name = "ref_" + ty_info.var_name, to_hu_conv = self.consts.var_decl_statement(ty_info.java_hu_ty, ty_info.var_name + "_hu_conv", ty_info.java_hu_ty + ".constr_from_ptr(" + ty_info.var_name + ")") + ";", to_hu_conv_name = ty_info.var_name + "_hu_conv", - from_hu_conv = (ty_info.var_name + " == null ? " + self.consts.native_zero_ptr + " : " + self.consts.get_ptr(ty_info.var_name), from_hu_sfx)) + from_hu_conv = (self.consts.get_ptr(ty_info.var_name), from_hu_sfx)) elif ty_info.rust_obj in self.trait_structs: if ty_info.nonnull_ptr: arg_conv = "void* " + ty_info.var_name + "_ptr = untag_ptr(" + ty_info.var_name + ");\n" @@ -568,7 +573,7 @@ class TypeMappingGenerator: arg_conv += "\t*" + ty_info.var_name + "_conv_ptr = " + ty_info.var_name + "_conv;\n" arg_conv += "}" arg_conv_name = ty_info.var_name + "_conv_ptr" - from_hu_conv_pfx = ty_info.var_name + " == null ? " + self.consts.native_zero_ptr + " : " + self.consts.get_ptr(ty_info.var_name) + from_hu_conv_pfx = self.consts.get_ptr(ty_info.var_name) if ty_info.rust_obj.replace("LDK", "") + "_clone" in self.clone_fns: return ConvInfo(ty_info = ty_info, arg_name = ty_info.var_name, arg_conv = arg_conv, arg_conv_name = arg_conv_name, arg_conv_cleanup = None, -- 2.30.2 From ffdd56c967087cba7548599934585b8a9a3102e2 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sun, 12 May 2024 19:48:39 +0000 Subject: [PATCH 07/16] [Java] Update auto-generated bindings to LDK 0.0.123 --- .../org/ldk/enums/Bolt12SemanticError.java | 4 + .../org/ldk/enums/ConfirmationTarget.java | 13 + src/main/java/org/ldk/enums/Direction.java | 21 + .../org/ldk/enums/PaymentFailureReason.java | 4 + .../org/ldk/enums/ShortChannelIdError.java | 21 + src/main/java/org/ldk/impl/bindings.java | 2988 +++- src/main/java/org/ldk/structs/APIError.java | 4 +- .../java/org/ldk/structs/AcceptChannel.java | 318 +- .../java/org/ldk/structs/AcceptChannelV2.java | 326 +- src/main/java/org/ldk/structs/Amount.java | 70 +- .../org/ldk/structs/AnchorDescriptor.java | 8 +- .../ldk/structs/AnnouncementSignatures.java | 21 +- .../org/ldk/structs/BackgroundProcessor.java | 4 +- src/main/java/org/ldk/structs/Balance.java | 2 +- src/main/java/org/ldk/structs/BestBlock.java | 94 +- src/main/java/org/ldk/structs/BigSize.java | 2 +- .../java/org/ldk/structs/BlindedForward.java | 2 +- src/main/java/org/ldk/structs/BlindedHop.java | 2 +- .../org/ldk/structs/BlindedHopFeatures.java | 4 +- .../java/org/ldk/structs/BlindedPath.java | 47 +- .../java/org/ldk/structs/BlindedPayInfo.java | 6 +- .../java/org/ldk/structs/BlindedTail.java | 6 +- .../java/org/ldk/structs/Bolt11Invoice.java | 14 +- .../ldk/structs/Bolt11InvoiceFeatures.java | 38 +- .../ldk/structs/Bolt11InvoiceSignature.java | 2 +- .../org/ldk/structs/Bolt11ParseError.java | 2 +- .../java/org/ldk/structs/Bolt12Invoice.java | 31 +- .../ldk/structs/Bolt12InvoiceFeatures.java | 4 +- .../org/ldk/structs/Bolt12OfferContext.java | 149 + .../org/ldk/structs/Bolt12RefundContext.java | 91 + .../org/ldk/structs/BumpTransactionEvent.java | 42 +- .../structs/BumpTransactionEventHandler.java | 2 +- .../org/ldk/structs/CandidateRouteHop.java | 10 +- .../java/org/ldk/structs/ChainMonitor.java | 57 +- .../java/org/ldk/structs/ChainParameters.java | 4 +- .../ldk/structs/ChangeDestinationSource.java | 78 + .../org/ldk/structs/ChannelAnnouncement.java | 6 +- .../java/org/ldk/structs/ChannelConfig.java | 86 +- .../org/ldk/structs/ChannelCounterparty.java | 4 +- .../structs/ChannelDerivationParameters.java | 6 +- .../java/org/ldk/structs/ChannelDetails.java | 79 +- .../java/org/ldk/structs/ChannelFeatures.java | 4 +- src/main/java/org/ldk/structs/ChannelId.java | 224 + .../java/org/ldk/structs/ChannelInfo.java | 8 +- .../java/org/ldk/structs/ChannelManager.java | 886 +- .../ldk/structs/ChannelManagerReadArgs.java | 4 +- .../ldk/structs/ChannelMessageHandler.java | 130 +- .../java/org/ldk/structs/ChannelMonitor.java | 68 +- .../org/ldk/structs/ChannelMonitorUpdate.java | 35 +- .../org/ldk/structs/ChannelPublicKeys.java | 10 +- .../java/org/ldk/structs/ChannelReady.java | 21 +- .../org/ldk/structs/ChannelReestablish.java | 21 +- .../java/org/ldk/structs/ChannelSigner.java | 10 +- .../structs/ChannelTransactionParameters.java | 8 +- .../org/ldk/structs/ChannelTypeFeatures.java | 4 +- .../java/org/ldk/structs/ChannelUpdate.java | 6 +- .../org/ldk/structs/ChannelUpdateInfo.java | 6 +- .../java/org/ldk/structs/ClaimedHTLC.java | 21 +- .../java/org/ldk/structs/ClosingSigned.java | 21 +- .../ldk/structs/ClosingSignedFeeRange.java | 2 +- .../org/ldk/structs/ClosingTransaction.java | 6 +- .../java/org/ldk/structs/ClosureReason.java | 92 +- .../java/org/ldk/structs/CoinSelection.java | 4 +- .../org/ldk/structs/CoinSelectionSource.java | 6 +- .../org/ldk/structs/CommitmentSigned.java | 21 +- .../ldk/structs/CommitmentTransaction.java | 2 +- .../org/ldk/structs/CommitmentUpdate.java | 14 +- .../structs/CommonAcceptChannelFields.java | 408 + .../ldk/structs/CommonOpenChannelFields.java | 469 + src/main/java/org/ldk/structs/Confirm.java | 4 +- ...nterpartyChannelTransactionParameters.java | 6 +- .../org/ldk/structs/CustomMessageHandler.java | 8 +- .../org/ldk/structs/CustomMessageReader.java | 2 +- .../structs/CustomOnionMessageHandler.java | 6 +- .../java/org/ldk/structs/DecodeError.java | 32 +- .../org/ldk/structs/DefaultMessageRouter.java | 2 +- .../java/org/ldk/structs/DefaultRouter.java | 2 +- .../ldk/structs/DelayedPaymentBasepoint.java | 12 +- .../org/ldk/structs/DelayedPaymentKey.java | 4 +- .../DelayedPaymentOutputDescriptor.java | 47 +- .../java/org/ldk/structs/Description.java | 2 +- .../java/org/ldk/structs/Destination.java | 41 +- .../org/ldk/structs/DirectedChannelInfo.java | 28 + .../org/ldk/structs/EcdsaChannelSigner.java | 116 +- .../org/ldk/structs/EmptyNodeIdLookUp.java | 47 + .../java/org/ldk/structs/ErrorAction.java | 8 +- .../java/org/ldk/structs/ErrorMessage.java | 21 +- src/main/java/org/ldk/structs/Event.java | 240 +- src/main/java/org/ldk/structs/ExpiryTime.java | 2 +- src/main/java/org/ldk/structs/Fallback.java | 2 +- .../java/org/ldk/structs/FeeEstimator.java | 4 + src/main/java/org/ldk/structs/Filter.java | 2 +- .../java/org/ldk/structs/ForwardNode.java | 4 +- .../java/org/ldk/structs/ForwardTlvs.java | 8 +- ...ChannelIdCVec_MonitorEventZPublicKeyZ.java | 110 + .../java/org/ldk/structs/FundingCreated.java | 21 +- .../java/org/ldk/structs/FundingSigned.java | 21 +- src/main/java/org/ldk/structs/Future.java | 22 - src/main/java/org/ldk/structs/GossipSync.java | 4 +- .../ldk/structs/GossipTimestampFilter.java | 2 +- .../java/org/ldk/structs/GraphSyncError.java | 2 +- .../java/org/ldk/structs/HTLCDescriptor.java | 46 +- .../java/org/ldk/structs/HTLCDestination.java | 36 +- .../ldk/structs/HTLCOutputInCommitment.java | 2 +- src/main/java/org/ldk/structs/HTLCUpdate.java | 2 +- .../structs/HolderCommitmentTransaction.java | 2 +- src/main/java/org/ldk/structs/Hostname.java | 2 +- .../java/org/ldk/structs/HtlcBasepoint.java | 12 +- src/main/java/org/ldk/structs/HtlcKey.java | 4 +- .../java/org/ldk/structs/InFlightHtlcs.java | 6 +- .../java/org/ldk/structs/InMemorySigner.java | 4 +- .../java/org/ldk/structs/InboundHTLCErr.java | 47 + src/main/java/org/ldk/structs/Init.java | 6 +- .../java/org/ldk/structs/InitFeatures.java | 38 +- src/main/java/org/ldk/structs/Input.java | 6 +- .../org/ldk/structs/IntroductionNode.java | 126 + .../java/org/ldk/structs/InvoiceError.java | 4 +- .../java/org/ldk/structs/InvoiceRequest.java | 82 +- .../ldk/structs/InvoiceRequestFeatures.java | 4 +- .../org/ldk/structs/InvoiceRequestFields.java | 167 + ...voiceRequestWithDerivedPayerIdBuilder.java | 142 + ...oiceRequestWithExplicitPayerIdBuilder.java | 143 + ...nvoiceWithDerivedSigningPubkeyBuilder.java | 154 + ...voiceWithExplicitSigningPubkeyBuilder.java | 155 + src/main/java/org/ldk/structs/KVStore.java | 8 +- .../java/org/ldk/structs/KeysManager.java | 47 +- src/main/java/org/ldk/structs/Listen.java | 2 +- .../org/ldk/structs/MaxDustHTLCExposure.java | 21 +- .../java/org/ldk/structs/MessageRouter.java | 4 +- .../org/ldk/structs/MessageSendEvent.java | 70 +- .../structs/MessageSendEventsProvider.java | 2 +- .../ldk/structs/MinFinalCltvExpiryDelta.java | 2 +- .../java/org/ldk/structs/MonitorEvent.java | 73 +- .../java/org/ldk/structs/MonitorUpdateId.java | 2 +- .../java/org/ldk/structs/NetworkGraph.java | 20 +- .../java/org/ldk/structs/NetworkUpdate.java | 4 +- .../java/org/ldk/structs/NextMessageHop.java | 124 + src/main/java/org/ldk/structs/NodeAlias.java | 2 +- .../org/ldk/structs/NodeAnnouncement.java | 6 +- .../org/ldk/structs/NodeAnnouncementInfo.java | 8 +- .../java/org/ldk/structs/NodeFeatures.java | 38 +- src/main/java/org/ldk/structs/NodeId.java | 11 + .../java/org/ldk/structs/NodeIdLookUp.java | 86 + src/main/java/org/ldk/structs/NodeInfo.java | 11 +- src/main/java/org/ldk/structs/NodeSigner.java | 16 +- src/main/java/org/ldk/structs/Offer.java | 116 +- .../java/org/ldk/structs/OfferFeatures.java | 4 +- src/main/java/org/ldk/structs/OfferId.java | 102 + .../OfferWithDerivedMetadataBuilder.java | 176 + .../OfferWithExplicitMetadataBuilder.java | 188 + .../java/org/ldk/structs/OffersMessage.java | 6 +- .../org/ldk/structs/OffersMessageHandler.java | 4 +- .../java/org/ldk/structs/OnionMessage.java | 6 +- .../org/ldk/structs/OnionMessageHandler.java | 12 +- .../org/ldk/structs/OnionMessagePath.java | 3 + .../java/org/ldk/structs/OnionMessenger.java | 13 +- .../java/org/ldk/structs/OnionPacket.java | 4 +- .../java/org/ldk/structs/OpenChannel.java | 377 +- .../java/org/ldk/structs/OpenChannelV2.java | 379 +- .../java/org/ldk/structs/Option_AmountZ.java | 97 + .../ldk/structs/Option_BigEndianScalarZ.java | 7 +- ..._C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.java | 2 +- .../ldk/structs/Option_C2Tuple_u64u16ZZ.java | 2 +- .../ldk/structs/Option_C2Tuple_u64u64ZZ.java | 2 +- ...ouncementChannelUpdateChannelUpdateZZ.java | 2 +- .../ldk/structs/Option_ECDSASignatureZ.java | 93 + .../ldk/structs/Option_PaymentContextZ.java | 97 + .../org/ldk/structs/Option_QuantityZ.java | 97 + src/main/java/org/ldk/structs/OutPoint.java | 11 +- .../org/ldk/structs/OutputSpendStatus.java | 206 + .../java/org/ldk/structs/OutputSpender.java | 116 + .../java/org/ldk/structs/OutputSweeper.java | 181 + .../java/org/ldk/structs/P2PGossipSync.java | 2 +- src/main/java/org/ldk/structs/Packet.java | 2 +- .../org/ldk/structs/ParseOrSemanticError.java | 2 +- src/main/java/org/ldk/structs/Path.java | 6 +- .../java/org/ldk/structs/PathFailure.java | 2 +- src/main/java/org/ldk/structs/Payee.java | 6 +- .../java/org/ldk/structs/PayeePubKey.java | 2 +- .../java/org/ldk/structs/PaymentContext.java | 175 + .../org/ldk/structs/PaymentParameters.java | 6 +- .../java/org/ldk/structs/PaymentPurpose.java | 143 +- .../org/ldk/structs/PaymentSendFailure.java | 6 +- .../java/org/ldk/structs/PeeledOnion.java | 14 +- .../java/org/ldk/structs/PeerDetails.java | 138 + .../java/org/ldk/structs/PeerManager.java | 48 +- .../org/ldk/structs/PendingHTLCRouting.java | 29 +- src/main/java/org/ldk/structs/Persist.java | 62 +- src/main/java/org/ldk/structs/Persister.java | 16 +- .../org/ldk/structs/PhantomKeysManager.java | 31 +- .../org/ldk/structs/PhantomRouteHints.java | 4 +- src/main/java/org/ldk/structs/Ping.java | 2 +- src/main/java/org/ldk/structs/Pong.java | 2 +- .../org/ldk/structs/PositiveTimestamp.java | 2 +- .../java/org/ldk/structs/PrivateRoute.java | 4 +- .../org/ldk/structs/ProbabilisticScorer.java | 10 +- .../ProbabilisticScoringFeeParameters.java | 10 +- .../org/ldk/structs/ProbeSendFailure.java | 2 +- src/main/java/org/ldk/structs/Quantity.java | 81 +- .../org/ldk/structs/QueryChannelRange.java | 2 +- .../org/ldk/structs/QueryShortChannelIds.java | 2 +- .../java/org/ldk/structs/RandomBytes.java | 48 + .../java/org/ldk/structs/RapidGossipSync.java | 2 +- .../org/ldk/structs/RawBolt11Invoice.java | 7 +- .../java/org/ldk/structs/RawDataPart.java | 4 +- .../org/ldk/structs/ReadOnlyNetworkGraph.java | 2 +- .../java/org/ldk/structs/ReceiveTlvs.java | 30 +- .../org/ldk/structs/RecipientOnionFields.java | 4 +- src/main/java/org/ldk/structs/Record.java | 18 +- src/main/java/org/ldk/structs/Refund.java | 12 + ...RefundMaybeWithDerivedMetadataBuilder.java | 206 + .../org/ldk/structs/ReplyChannelRange.java | 2 +- .../ldk/structs/ReplyShortChannelIdsEnd.java | 2 +- .../Result_AcceptChannelDecodeErrorZ.java | 6 +- .../Result_AcceptChannelV2DecodeErrorZ.java | 6 +- ...lt_AnnouncementSignaturesDecodeErrorZ.java | 6 +- .../structs/Result_BestBlockDecodeErrorZ.java | 100 + .../structs/Result_BigSizeDecodeErrorZ.java | 6 +- .../Result_BlindedFailureDecodeErrorZ.java | 4 + .../Result_BlindedForwardDecodeErrorZ.java | 6 +- .../Result_BlindedHopDecodeErrorZ.java | 6 +- ...Result_BlindedHopFeaturesDecodeErrorZ.java | 6 +- .../Result_BlindedPathDecodeErrorZ.java | 6 +- .../ldk/structs/Result_BlindedPathNoneZ.java | 6 +- .../Result_BlindedPayInfoDecodeErrorZ.java | 6 +- .../Result_BlindedTailDecodeErrorZ.java | 6 +- ...ult_Bolt11InvoiceBolt11SemanticErrorZ.java | 6 +- ...ult_Bolt11InvoiceFeaturesDecodeErrorZ.java | 6 +- ...lt_Bolt11InvoiceParseOrSemanticErrorZ.java | 6 +- ...ult_Bolt11InvoiceSignOrCreationErrorZ.java | 6 +- ...ult_Bolt12InvoiceBolt12SemanticErrorZ.java | 96 + ...ult_Bolt12InvoiceFeaturesDecodeErrorZ.java | 6 +- ...Result_Bolt12OfferContextDecodeErrorZ.java | 100 + ...esult_Bolt12RefundContextDecodeErrorZ.java | 100 + ...uiltCommitmentTransactionDecodeErrorZ.java | 6 +- ...e_BestBlockOutputSweeperZDecodeErrorZ.java | 81 + ...Tuple_BlindedPayInfoBlindedPathZNoneZ.java | 6 +- .../Result_C2Tuple_CVec_u8Zu64ZNoneZ.java | 6 +- ...SASignatureCVec_ECDSASignatureZZNoneZ.java | 6 +- ...tyTwoBytesChannelManagerZDecodeErrorZ.java | 6 +- ...tyTwoBytesChannelMonitorZDecodeErrorZ.java | 6 +- ...ThirtyTwoBytesChannelMonitorZIOErrorZ.java | 6 +- ...le_ThirtyTwoBytesThirtyTwoBytesZNoneZ.java | 6 +- ...tesThirtyTwoBytesZPaymentSendFailureZ.java | 6 +- ...ption_CVec_SocketAddressZZZSendErrorZ.java | 24 +- ...pientOnionFieldsRouteParametersZNoneZ.java | 6 +- .../Result_COption_APIErrorZDecodeErrorZ.java | 4 + ...lt_COption_ClosureReasonZDecodeErrorZ.java | 4 + .../Result_COption_EventZDecodeErrorZ.java | 4 + ..._COption_HTLCDestinationZDecodeErrorZ.java | 4 + ...ult_COption_MonitorEventZDecodeErrorZ.java | 4 + ...lt_COption_NetworkUpdateZDecodeErrorZ.java | 4 + ...ion_OnionMessageContentsZDecodeErrorZ.java | 4 + ...sult_COption_PathFailureZDecodeErrorZ.java | 4 + .../Result_COption_TypeZDecodeErrorZ.java | 4 + .../Result_CVec_BlindedPathZNoneZ.java | 6 +- ...uple_BlindedPayInfoBlindedPathZZNoneZ.java | 6 +- ...hirtyTwoBytesChannelMonitorZZIOErrorZ.java | 6 +- ...ytesThirtyTwoBytesZZProbeSendFailureZ.java | 6 +- .../Result_CVec_ECDSASignatureZNoneZ.java | 4 + .../ldk/structs/Result_CVec_StrZIOErrorZ.java | 4 + .../ldk/structs/Result_CVec_UtxoZNoneZ.java | 6 +- .../ldk/structs/Result_CVec_u8ZIOErrorZ.java | 4 + .../org/ldk/structs/Result_CVec_u8ZNoneZ.java | 4 + .../Result_CVec_u8ZPeerHandleErrorZ.java | 6 +- ...esult_ChannelAnnouncementDecodeErrorZ.java | 6 +- .../Result_ChannelConfigDecodeErrorZ.java | 6 +- ...esult_ChannelCounterpartyDecodeErrorZ.java | 6 +- ...annelDerivationParametersDecodeErrorZ.java | 6 +- .../Result_ChannelDetailsDecodeErrorZ.java | 6 +- .../Result_ChannelFeaturesDecodeErrorZ.java | 6 +- .../structs/Result_ChannelIdAPIErrorZ.java | 100 + .../structs/Result_ChannelIdDecodeErrorZ.java | 100 + .../Result_ChannelInfoDecodeErrorZ.java | 6 +- ...sult_ChannelMonitorUpdateDecodeErrorZ.java | 6 +- ...esult_ChannelMonitorUpdateStatusNoneZ.java | 4 + .../Result_ChannelPublicKeysDecodeErrorZ.java | 6 +- .../Result_ChannelReadyDecodeErrorZ.java | 6 +- ...Result_ChannelReestablishDecodeErrorZ.java | 6 +- ...sult_ChannelShutdownStateDecodeErrorZ.java | 4 + ...nnelTransactionParametersDecodeErrorZ.java | 6 +- ...esult_ChannelTypeFeaturesDecodeErrorZ.java | 6 +- .../Result_ChannelUpdateDecodeErrorZ.java | 6 +- .../Result_ChannelUpdateInfoDecodeErrorZ.java | 6 +- .../Result_ClaimedHTLCDecodeErrorZ.java | 6 +- .../Result_ClosingSignedDecodeErrorZ.java | 6 +- ...ult_ClosingSignedFeeRangeDecodeErrorZ.java | 6 +- .../structs/Result_CoinSelectionNoneZ.java | 6 +- .../Result_CommitmentSignedDecodeErrorZ.java | 6 +- ...ult_CommitmentTransactionDecodeErrorZ.java | 6 +- ...nnelTransactionParametersDecodeErrorZ.java | 6 +- ...terpartyCommitmentSecretsDecodeErrorZ.java | 6 +- ...ounterpartyForwardingInfoDecodeErrorZ.java | 6 +- ...t_DelayedPaymentBasepointDecodeErrorZ.java | 6 +- .../Result_DelayedPaymentKeyDecodeErrorZ.java | 6 +- ...edPaymentOutputDescriptorDecodeErrorZ.java | 6 +- .../Result_DescriptionCreationErrorZ.java | 6 +- .../structs/Result_ECDSASignatureNoneZ.java | 4 + .../Result_ErrorMessageDecodeErrorZ.java | 6 +- .../Result_FinalOnionHopDataDecodeErrorZ.java | 6 +- ...Result_FixedPenaltyScorerDecodeErrorZ.java | 6 +- .../Result_FundingCreatedDecodeErrorZ.java | 6 +- .../Result_FundingSignedDecodeErrorZ.java | 6 +- ...ult_GossipTimestampFilterDecodeErrorZ.java | 6 +- .../Result_HTLCDescriptorDecodeErrorZ.java | 6 +- ...lt_HTLCOutputInCommitmentDecodeErrorZ.java | 6 +- .../Result_HTLCUpdateDecodeErrorZ.java | 6 +- ...lderCommitmentTransactionDecodeErrorZ.java | 6 +- .../structs/Result_HostnameDecodeErrorZ.java | 6 +- .../Result_HtlcBasepointDecodeErrorZ.java | 6 +- .../structs/Result_HtlcKeyDecodeErrorZ.java | 6 +- .../Result_InFlightHtlcsDecodeErrorZ.java | 6 +- .../Result_InMemorySignerDecodeErrorZ.java | 6 +- .../ldk/structs/Result_InitDecodeErrorZ.java | 6 +- .../Result_InitFeaturesDecodeErrorZ.java | 6 +- .../Result_InvoiceErrorDecodeErrorZ.java | 6 +- ...lt_InvoiceRequestBolt12SemanticErrorZ.java | 96 + ...sult_InvoiceRequestFieldsDecodeErrorZ.java | 100 + ...vedPayerIdBuilderBolt12SemanticErrorZ.java | 86 + ...citPayerIdBuilderBolt12SemanticErrorZ.java | 86 + ...ningPubkeyBuilderBolt12SemanticErrorZ.java | 86 + ...ningPubkeyBuilderBolt12SemanticErrorZ.java | 86 + .../Result_LockedChannelMonitorNoneZ.java | 6 +- ...esult_MaxDustHTLCExposureDecodeErrorZ.java | 4 + .../Result_NetworkGraphDecodeErrorZ.java | 4 + .../structs/Result_NodeAliasDecodeErrorZ.java | 6 +- .../Result_NodeAnnouncementDecodeErrorZ.java | 6 +- ...sult_NodeAnnouncementInfoDecodeErrorZ.java | 6 +- .../Result_NodeFeaturesDecodeErrorZ.java | 6 +- .../structs/Result_NodeIdDecodeErrorZ.java | 6 +- .../structs/Result_NodeInfoDecodeErrorZ.java | 6 +- .../org/ldk/structs/Result_NoneAPIErrorZ.java | 4 + .../Result_NoneBolt11SemanticErrorZ.java | 4 + .../Result_NoneBolt12SemanticErrorZ.java | 4 + .../org/ldk/structs/Result_NoneIOErrorZ.java | 4 + .../structs/Result_NoneLightningErrorZ.java | 6 +- .../org/ldk/structs/Result_NoneNoneZ.java | 4 + .../Result_NonePaymentSendFailureZ.java | 4 + .../structs/Result_NonePeerHandleErrorZ.java | 6 +- .../Result_NoneRetryableSendFailureZ.java | 4 + .../Result_OfferBolt12ParseErrorZ.java | 8 +- .../Result_OfferBolt12SemanticErrorZ.java | 96 + .../structs/Result_OfferIdDecodeErrorZ.java | 100 + ...edMetadataBuilderBolt12SemanticErrorZ.java | 96 + .../Result_OffersMessageDecodeErrorZ.java | 4 + .../Result_OnionMessageDecodeErrorZ.java | 6 +- .../structs/Result_OnionMessagePathNoneZ.java | 6 +- .../Result_OnionPacketDecodeErrorZ.java | 6 +- .../Result_OpenChannelDecodeErrorZ.java | 6 +- .../Result_OpenChannelV2DecodeErrorZ.java | 6 +- .../structs/Result_OutPointDecodeErrorZ.java | 6 +- .../Result_OutputSpendStatusDecodeErrorZ.java | 100 + .../Result_OutputSweeperDecodeErrorZ.java | 96 + .../Result_PayeePubKeySecp256k1ErrorZ.java | 6 +- ...Result_PaymentConstraintsDecodeErrorZ.java | 6 +- .../Result_PaymentContextDecodeErrorZ.java | 100 + ...sult_PaymentFailureReasonDecodeErrorZ.java | 4 + .../Result_PaymentParametersDecodeErrorZ.java | 6 +- .../Result_PaymentPurposeDecodeErrorZ.java | 4 + .../Result_PaymentRelayDecodeErrorZ.java | 6 +- .../ldk/structs/Result_PeeledOnionNoneZ.java | 22 + .../Result_PendingHTLCInfoDecodeErrorZ.java | 6 +- ...Result_PendingHTLCInfoInboundHTLCErrZ.java | 33 +- ...Result_PendingHTLCRoutingDecodeErrorZ.java | 4 + .../Result_PhantomRouteHintsDecodeErrorZ.java | 6 +- .../ldk/structs/Result_PingDecodeErrorZ.java | 6 +- .../ldk/structs/Result_PongDecodeErrorZ.java | 6 +- ...esult_PositiveTimestampCreationErrorZ.java | 6 +- .../Result_PrivateRouteCreationErrorZ.java | 6 +- ...esult_ProbabilisticScorerDecodeErrorZ.java | 6 +- .../ldk/structs/Result_PublicKeyNoneZ.java | 4 + .../Result_PublicKeySecp256k1ErrorZ.java | 4 + .../Result_QueryChannelRangeDecodeErrorZ.java | 6 +- ...sult_QueryShortChannelIdsDecodeErrorZ.java | 6 +- ...sult_RecipientOnionFieldsDecodeErrorZ.java | 6 +- .../Result_RecipientOnionFieldsNoneZ.java | 6 +- .../Result_RecoverableSignatureNoneZ.java | 4 + .../Result_RefundBolt12ParseErrorZ.java | 8 +- .../Result_RefundBolt12SemanticErrorZ.java | 96 + ...edMetadataBuilderBolt12SemanticErrorZ.java | 96 + .../Result_ReplyChannelRangeDecodeErrorZ.java | 6 +- ...t_ReplyShortChannelIdsEndDecodeErrorZ.java | 6 +- .../ldk/structs/Result_RetryDecodeErrorZ.java | 4 + ...esult_RevocationBasepointDecodeErrorZ.java | 6 +- .../Result_RevocationKeyDecodeErrorZ.java | 6 +- .../Result_RevokeAndACKDecodeErrorZ.java | 6 +- .../ldk/structs/Result_RouteDecodeErrorZ.java | 6 +- .../structs/Result_RouteHintDecodeErrorZ.java | 6 +- .../Result_RouteHintHopDecodeErrorZ.java | 6 +- .../structs/Result_RouteHopDecodeErrorZ.java | 6 +- .../structs/Result_RouteLightningErrorZ.java | 8 +- .../Result_RouteParametersDecodeErrorZ.java | 6 +- .../Result_RoutingFeesDecodeErrorZ.java | 6 +- .../structs/Result_SchnorrSignatureNoneZ.java | 4 + .../structs/Result_SendSuccessSendErrorZ.java | 22 + .../structs/Result_ShutdownDecodeErrorZ.java | 6 +- .../Result_ShutdownScriptDecodeErrorZ.java | 6 +- ..._ShutdownScriptInvalidShutdownScriptZ.java | 8 +- .../structs/Result_ShutdownScriptNoneZ.java | 6 +- .../Result_SiPrefixBolt11ParseErrorZ.java | 4 + ...gnedRawBolt11InvoiceBolt11ParseErrorZ.java | 6 +- .../Result_SocketAddressDecodeErrorZ.java | 4 + ...SocketAddressSocketAddressParseErrorZ.java | 4 + ...SpendableOutputDescriptorDecodeErrorZ.java | 4 + .../structs/Result_SpliceAckDecodeErrorZ.java | 6 +- .../structs/Result_SpliceDecodeErrorZ.java | 6 +- .../Result_SpliceLockedDecodeErrorZ.java | 6 +- ...icPaymentOutputDescriptorDecodeErrorZ.java | 6 +- .../ldk/structs/Result_StfuDecodeErrorZ.java | 6 +- .../structs/Result_StrSecp256k1ErrorZ.java | 4 + .../Result_ThirtyTwoBytesAPIErrorZ.java | 4 + .../structs/Result_ThirtyTwoBytesNoneZ.java | 4 + ...ult_ThirtyTwoBytesPaymentSendFailureZ.java | 4 + ...t_ThirtyTwoBytesRetryableSendFailureZ.java | 4 + ...lt_TrackedSpendableOutputDecodeErrorZ.java | 100 + .../ldk/structs/Result_TransactionNoneZ.java | 4 + ..._TransactionU16LenLimitedDecodeErrorZ.java | 6 +- .../Result_TransactionU16LenLimitedNoneZ.java | 6 +- ...Result_TrustedClosingTransactionNoneZ.java | 6 +- ...ult_TrustedCommitmentTransactionNoneZ.java | 6 +- .../structs/Result_TxAbortDecodeErrorZ.java | 6 +- .../structs/Result_TxAckRbfDecodeErrorZ.java | 6 +- .../Result_TxAddInputDecodeErrorZ.java | 6 +- .../Result_TxAddOutputDecodeErrorZ.java | 6 +- .../Result_TxCompleteDecodeErrorZ.java | 6 +- .../Result_TxCreationKeysDecodeErrorZ.java | 6 +- .../structs/Result_TxInitRbfDecodeErrorZ.java | 6 +- .../structs/Result_TxOutUtxoLookupErrorZ.java | 4 + .../Result_TxRemoveInputDecodeErrorZ.java | 6 +- .../Result_TxRemoveOutputDecodeErrorZ.java | 6 +- .../Result_TxSignaturesDecodeErrorZ.java | 6 +- ...ult_UnknownPaymentContextDecodeErrorZ.java | 100 + ...gnedBolt12InvoiceBolt12SemanticErrorZ.java | 96 + ...signedChannelAnnouncementDecodeErrorZ.java | 6 +- ...ult_UnsignedChannelUpdateDecodeErrorZ.java | 6 +- ...nedInvoiceRequestBolt12SemanticErrorZ.java | 96 + ..._UnsignedNodeAnnouncementDecodeErrorZ.java | 6 +- .../Result_UntrustedStringDecodeErrorZ.java | 6 +- .../Result_UpdateAddHTLCDecodeErrorZ.java | 6 +- .../Result_UpdateFailHTLCDecodeErrorZ.java | 6 +- ...t_UpdateFailMalformedHTLCDecodeErrorZ.java | 6 +- .../structs/Result_UpdateFeeDecodeErrorZ.java | 6 +- .../Result_UpdateFulfillHTLCDecodeErrorZ.java | 6 +- .../Result_VerifiedInvoiceRequestNoneZ.java | 6 +- .../Result_WarningMessageDecodeErrorZ.java | 6 +- .../org/ldk/structs/Result_WitnessNoneZ.java | 4 + ...iteableEcdsaChannelSignerDecodeErrorZ.java | 4 + .../structs/Result_boolLightningErrorZ.java | 6 +- .../structs/Result_boolPeerHandleErrorZ.java | 6 +- .../structs/Result_u32GraphSyncErrorZ.java | 4 + .../Result_u64ShortChannelIdErrorZ.java | 74 + src/main/java/org/ldk/structs/Retry.java | 2 +- .../org/ldk/structs/RevocationBasepoint.java | 2 +- .../java/org/ldk/structs/RevocationKey.java | 4 +- .../java/org/ldk/structs/RevokeAndACK.java | 21 +- src/main/java/org/ldk/structs/Route.java | 6 +- src/main/java/org/ldk/structs/RouteHint.java | 6 +- .../java/org/ldk/structs/RouteHintHop.java | 6 +- src/main/java/org/ldk/structs/RouteHop.java | 8 +- .../java/org/ldk/structs/RouteParameters.java | 8 +- src/main/java/org/ldk/structs/Router.java | 12 +- .../java/org/ldk/structs/RoutingFees.java | 2 +- .../ldk/structs/RoutingMessageHandler.java | 38 +- .../java/org/ldk/structs/ScoreLookUp.java | 2 +- .../java/org/ldk/structs/ScoreUpdate.java | 8 +- .../ScorerAccountingForInFlightHtlcs.java | 2 +- src/main/java/org/ldk/structs/SendError.java | 38 +- .../java/org/ldk/structs/SendSuccess.java | 14 +- src/main/java/org/ldk/structs/Sha256.java | 2 +- src/main/java/org/ldk/structs/Shutdown.java | 21 +- .../java/org/ldk/structs/ShutdownScript.java | 4 +- .../org/ldk/structs/SignBolt12InvoiceFn.java | 72 + src/main/java/org/ldk/structs/SignError.java | 92 + .../org/ldk/structs/SignInvoiceRequestFn.java | 72 + .../org/ldk/structs/SignOrCreationError.java | 2 +- .../ldk/structs/SignedRawBolt11Invoice.java | 2 +- .../java/org/ldk/structs/SignerProvider.java | 6 +- src/main/java/org/ldk/structs/Sleeper.java | 16 +- .../java/org/ldk/structs/SocketAddress.java | 4 +- .../structs/SpendableOutputDescriptor.java | 8 +- .../java/org/ldk/structs/SpendingDelay.java | 103 + src/main/java/org/ldk/structs/Splice.java | 21 +- src/main/java/org/ldk/structs/SpliceAck.java | 21 +- .../java/org/ldk/structs/SpliceLocked.java | 21 +- .../StaticPaymentOutputDescriptor.java | 6 +- src/main/java/org/ldk/structs/Stfu.java | 21 +- ...nouncementChannelUpdateChannelUpdateZ.java | 2 +- ..._OffersMessageDestinationBlindedPathZ.java | 2 +- ...essageContentsDestinationBlindedPathZ.java | 2 +- ..._OutPointCVec_MonitorEventZPublicKeyZ.java | 96 - ...nMessageCOption_CVec_SocketAddressZZZ.java | 2 +- ...11Invoice_u832Bolt11InvoiceSignatureZ.java | 2 +- ...sRecipientOnionFieldsRouteParametersZ.java | 2 +- .../ldk/structs/TrackedSpendableOutput.java | 182 + .../ldk/structs/TrampolineOnionPacket.java | 168 + .../ldk/structs/TransactionU16LenLimited.java | 11 +- .../structs/TrustedCommitmentTransaction.java | 2 +- .../TwoTuple_BestBlockOutputSweeperZ.java | 76 + .../TwoTuple_BlindedPayInfoBlindedPathZ.java | 2 +- .../structs/TwoTuple_ChannelIdPublicKeyZ.java | 77 + ...oTuple_OutPointCVec_MonitorUpdateIdZZ.java | 2 +- .../structs/TwoTuple_OutPointCVec_u8ZZ.java | 2 +- .../structs/TwoTuple_OutPointChannelIdZ.java | 81 + ...uple_PublicKeyCOption_SocketAddressZZ.java | 77 - ...tyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.java | 2 +- ...hirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.java | 2 +- ...woTuple_ThirtyTwoBytesChannelManagerZ.java | 2 +- ...woTuple_ThirtyTwoBytesChannelMonitorZ.java | 2 +- .../TwoTuple_ThirtyTwoBytesPublicKeyZ.java | 73 - src/main/java/org/ldk/structs/TxAbort.java | 21 +- src/main/java/org/ldk/structs/TxAckRbf.java | 21 +- src/main/java/org/ldk/structs/TxAddInput.java | 23 +- .../java/org/ldk/structs/TxAddOutput.java | 21 +- src/main/java/org/ldk/structs/TxComplete.java | 21 +- .../java/org/ldk/structs/TxCreationKeys.java | 16 +- src/main/java/org/ldk/structs/TxInitRbf.java | 21 +- .../java/org/ldk/structs/TxRemoveInput.java | 21 +- .../java/org/ldk/structs/TxRemoveOutput.java | 21 +- .../java/org/ldk/structs/TxSignatures.java | 45 +- .../ldk/structs/UnknownPaymentContext.java | 78 + .../ldk/structs/UnsignedBolt12Invoice.java | 35 +- .../structs/UnsignedChannelAnnouncement.java | 14 +- .../ldk/structs/UnsignedChannelUpdate.java | 2 +- .../ldk/structs/UnsignedGossipMessage.java | 6 +- .../ldk/structs/UnsignedInvoiceRequest.java | 33 +- .../ldk/structs/UnsignedNodeAnnouncement.java | 83 +- .../java/org/ldk/structs/UntrustedString.java | 2 +- .../java/org/ldk/structs/UpdateAddHTLC.java | 23 +- .../java/org/ldk/structs/UpdateFailHTLC.java | 16 +- .../ldk/structs/UpdateFailMalformedHTLC.java | 16 +- src/main/java/org/ldk/structs/UpdateFee.java | 21 +- .../org/ldk/structs/UpdateFulfillHTLC.java | 21 +- src/main/java/org/ldk/structs/UserConfig.java | 8 +- .../java/org/ldk/structs/UtilMethods.java | 187 +- src/main/java/org/ldk/structs/Utxo.java | 8 +- src/main/java/org/ldk/structs/UtxoFuture.java | 4 +- src/main/java/org/ldk/structs/UtxoLookup.java | 2 +- src/main/java/org/ldk/structs/UtxoResult.java | 4 +- .../ldk/structs/VerifiedInvoiceRequest.java | 131 +- .../java/org/ldk/structs/WalletSource.java | 6 +- .../java/org/ldk/structs/WarningMessage.java | 21 +- src/main/java/org/ldk/structs/Watch.java | 30 +- .../java/org/ldk/structs/WatchedOutput.java | 6 +- .../structs/WriteableEcdsaChannelSigner.java | 2 +- src/main/jni/bindings.c | 13877 ++++++++++++---- src/main/jni/bindings.c.body | 13877 ++++++++++++---- src/main/jni/org_ldk_enums_Direction.h | 21 + .../jni/org_ldk_enums_ShortChannelIdError.h | 21 + src/main/jni/org_ldk_impl_bindings.h | 7194 ++++++-- .../jni/org_ldk_impl_bindings_LDKAmount.h | 21 + ...org_ldk_impl_bindings_LDKCOption_AmountZ.h | 21 + ...impl_bindings_LDKCOption_ECDSASignatureZ.h | 21 + ...impl_bindings_LDKCOption_PaymentContextZ.h | 21 + ...g_ldk_impl_bindings_LDKCOption_QuantityZ.h | 21 + ...rg_ldk_impl_bindings_LDKIntroductionNode.h | 21 + .../org_ldk_impl_bindings_LDKNextMessageHop.h | 21 + ...g_ldk_impl_bindings_LDKOutputSpendStatus.h | 21 + .../org_ldk_impl_bindings_LDKPaymentContext.h | 21 + .../jni/org_ldk_impl_bindings_LDKQuantity.h | 21 + .../jni/org_ldk_impl_bindings_LDKSignError.h | 21 + .../org_ldk_impl_bindings_LDKSpendingDelay.h | 21 + 561 files changed, 42651 insertions(+), 12058 deletions(-) create mode 100644 src/main/java/org/ldk/enums/Direction.java create mode 100644 src/main/java/org/ldk/enums/ShortChannelIdError.java create mode 100644 src/main/java/org/ldk/structs/Bolt12OfferContext.java create mode 100644 src/main/java/org/ldk/structs/Bolt12RefundContext.java create mode 100644 src/main/java/org/ldk/structs/ChangeDestinationSource.java create mode 100644 src/main/java/org/ldk/structs/ChannelId.java create mode 100644 src/main/java/org/ldk/structs/CommonAcceptChannelFields.java create mode 100644 src/main/java/org/ldk/structs/CommonOpenChannelFields.java create mode 100644 src/main/java/org/ldk/structs/EmptyNodeIdLookUp.java create mode 100644 src/main/java/org/ldk/structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.java create mode 100644 src/main/java/org/ldk/structs/IntroductionNode.java create mode 100644 src/main/java/org/ldk/structs/InvoiceRequestFields.java create mode 100644 src/main/java/org/ldk/structs/InvoiceRequestWithDerivedPayerIdBuilder.java create mode 100644 src/main/java/org/ldk/structs/InvoiceRequestWithExplicitPayerIdBuilder.java create mode 100644 src/main/java/org/ldk/structs/InvoiceWithDerivedSigningPubkeyBuilder.java create mode 100644 src/main/java/org/ldk/structs/InvoiceWithExplicitSigningPubkeyBuilder.java create mode 100644 src/main/java/org/ldk/structs/NextMessageHop.java create mode 100644 src/main/java/org/ldk/structs/NodeIdLookUp.java create mode 100644 src/main/java/org/ldk/structs/OfferId.java create mode 100644 src/main/java/org/ldk/structs/OfferWithDerivedMetadataBuilder.java create mode 100644 src/main/java/org/ldk/structs/OfferWithExplicitMetadataBuilder.java create mode 100644 src/main/java/org/ldk/structs/Option_AmountZ.java create mode 100644 src/main/java/org/ldk/structs/Option_ECDSASignatureZ.java create mode 100644 src/main/java/org/ldk/structs/Option_PaymentContextZ.java create mode 100644 src/main/java/org/ldk/structs/Option_QuantityZ.java create mode 100644 src/main/java/org/ldk/structs/OutputSpendStatus.java create mode 100644 src/main/java/org/ldk/structs/OutputSpender.java create mode 100644 src/main/java/org/ldk/structs/OutputSweeper.java create mode 100644 src/main/java/org/ldk/structs/PaymentContext.java create mode 100644 src/main/java/org/ldk/structs/PeerDetails.java create mode 100644 src/main/java/org/ldk/structs/RandomBytes.java create mode 100644 src/main/java/org/ldk/structs/RefundMaybeWithDerivedMetadataBuilder.java create mode 100644 src/main/java/org/ldk/structs/Result_BestBlockDecodeErrorZ.java create mode 100644 src/main/java/org/ldk/structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.java create mode 100644 src/main/java/org/ldk/structs/Result_Bolt12OfferContextDecodeErrorZ.java create mode 100644 src/main/java/org/ldk/structs/Result_Bolt12RefundContextDecodeErrorZ.java create mode 100644 src/main/java/org/ldk/structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.java create mode 100644 src/main/java/org/ldk/structs/Result_ChannelIdAPIErrorZ.java create mode 100644 src/main/java/org/ldk/structs/Result_ChannelIdDecodeErrorZ.java create mode 100644 src/main/java/org/ldk/structs/Result_InvoiceRequestBolt12SemanticErrorZ.java create mode 100644 src/main/java/org/ldk/structs/Result_InvoiceRequestFieldsDecodeErrorZ.java create mode 100644 src/main/java/org/ldk/structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.java create mode 100644 src/main/java/org/ldk/structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.java create mode 100644 src/main/java/org/ldk/structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.java create mode 100644 src/main/java/org/ldk/structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.java create mode 100644 src/main/java/org/ldk/structs/Result_OfferBolt12SemanticErrorZ.java create mode 100644 src/main/java/org/ldk/structs/Result_OfferIdDecodeErrorZ.java create mode 100644 src/main/java/org/ldk/structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.java create mode 100644 src/main/java/org/ldk/structs/Result_OutputSpendStatusDecodeErrorZ.java create mode 100644 src/main/java/org/ldk/structs/Result_OutputSweeperDecodeErrorZ.java create mode 100644 src/main/java/org/ldk/structs/Result_PaymentContextDecodeErrorZ.java create mode 100644 src/main/java/org/ldk/structs/Result_RefundBolt12SemanticErrorZ.java create mode 100644 src/main/java/org/ldk/structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.java create mode 100644 src/main/java/org/ldk/structs/Result_TrackedSpendableOutputDecodeErrorZ.java create mode 100644 src/main/java/org/ldk/structs/Result_UnknownPaymentContextDecodeErrorZ.java create mode 100644 src/main/java/org/ldk/structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.java create mode 100644 src/main/java/org/ldk/structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.java create mode 100644 src/main/java/org/ldk/structs/Result_u64ShortChannelIdErrorZ.java create mode 100644 src/main/java/org/ldk/structs/SignBolt12InvoiceFn.java create mode 100644 src/main/java/org/ldk/structs/SignError.java create mode 100644 src/main/java/org/ldk/structs/SignInvoiceRequestFn.java create mode 100644 src/main/java/org/ldk/structs/SpendingDelay.java delete mode 100644 src/main/java/org/ldk/structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.java create mode 100644 src/main/java/org/ldk/structs/TrackedSpendableOutput.java create mode 100644 src/main/java/org/ldk/structs/TrampolineOnionPacket.java create mode 100644 src/main/java/org/ldk/structs/TwoTuple_BestBlockOutputSweeperZ.java create mode 100644 src/main/java/org/ldk/structs/TwoTuple_ChannelIdPublicKeyZ.java create mode 100644 src/main/java/org/ldk/structs/TwoTuple_OutPointChannelIdZ.java delete mode 100644 src/main/java/org/ldk/structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.java delete mode 100644 src/main/java/org/ldk/structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.java create mode 100644 src/main/java/org/ldk/structs/UnknownPaymentContext.java create mode 100644 src/main/jni/org_ldk_enums_Direction.h create mode 100644 src/main/jni/org_ldk_enums_ShortChannelIdError.h create mode 100644 src/main/jni/org_ldk_impl_bindings_LDKAmount.h create mode 100644 src/main/jni/org_ldk_impl_bindings_LDKCOption_AmountZ.h create mode 100644 src/main/jni/org_ldk_impl_bindings_LDKCOption_ECDSASignatureZ.h create mode 100644 src/main/jni/org_ldk_impl_bindings_LDKCOption_PaymentContextZ.h create mode 100644 src/main/jni/org_ldk_impl_bindings_LDKCOption_QuantityZ.h create mode 100644 src/main/jni/org_ldk_impl_bindings_LDKIntroductionNode.h create mode 100644 src/main/jni/org_ldk_impl_bindings_LDKNextMessageHop.h create mode 100644 src/main/jni/org_ldk_impl_bindings_LDKOutputSpendStatus.h create mode 100644 src/main/jni/org_ldk_impl_bindings_LDKPaymentContext.h create mode 100644 src/main/jni/org_ldk_impl_bindings_LDKQuantity.h create mode 100644 src/main/jni/org_ldk_impl_bindings_LDKSignError.h create mode 100644 src/main/jni/org_ldk_impl_bindings_LDKSpendingDelay.h diff --git a/src/main/java/org/ldk/enums/Bolt12SemanticError.java b/src/main/java/org/ldk/enums/Bolt12SemanticError.java index 3fe0c2a3..ca52e917 100644 --- a/src/main/java/org/ldk/enums/Bolt12SemanticError.java +++ b/src/main/java/org/ldk/enums/Bolt12SemanticError.java @@ -96,6 +96,10 @@ public enum Bolt12SemanticError { * Blinded paths were expected but were missing. */ LDKBolt12SemanticError_MissingPaths, + /** + * Blinded paths were provided but were not expected. + */ + LDKBolt12SemanticError_UnexpectedPaths, /** * The blinded payinfo given does not match the number of blinded path hops. */ diff --git a/src/main/java/org/ldk/enums/ConfirmationTarget.java b/src/main/java/org/ldk/enums/ConfirmationTarget.java index 25479835..30f36343 100644 --- a/src/main/java/org/ldk/enums/ConfirmationTarget.java +++ b/src/main/java/org/ldk/enums/ConfirmationTarget.java @@ -92,6 +92,19 @@ public enum ConfirmationTarget { * [`ChannelManager::close_channel_with_feerate_and_script`]: crate::ln::channelmanager::ChannelManager::close_channel_with_feerate_and_script */ LDKConfirmationTarget_ChannelCloseMinimum, + /** + * The feerate [`OutputSweeper`] will use on transactions spending + * [`SpendableOutputDescriptor`]s after a channel closure. + * + * Generally spending these outputs is safe as long as they eventually confirm, so a value + * (slightly above) the mempool minimum should suffice. However, as this value will influence + * how long funds will be unavailable after channel closure, [`FeeEstimator`] implementors + * might want to choose a higher feerate to regain control over funds faster. + * + * [`OutputSweeper`]: crate::util::sweep::OutputSweeper + * [`SpendableOutputDescriptor`]: crate::sign::SpendableOutputDescriptor + */ + LDKConfirmationTarget_OutputSpendingFee, ; static native void init(); static { org.ldk.impl.bindings.run_statics(); init(); } } \ No newline at end of file diff --git a/src/main/java/org/ldk/enums/Direction.java b/src/main/java/org/ldk/enums/Direction.java new file mode 100644 index 00000000..34b6b74c --- /dev/null +++ b/src/main/java/org/ldk/enums/Direction.java @@ -0,0 +1,21 @@ +package org.ldk.enums; + +/** + * The side of a channel that is the [`IntroductionNode`] in a [`BlindedPath`]. [BOLT 7] defines + * which nodes is which in the [`ChannelAnnouncement`] message. + * + * [BOLT 7]: https://github.com/lightning/bolts/blob/master/07-routing-gossip.md#the-channel_announcement-message + * [`ChannelAnnouncement`]: crate::ln::msgs::ChannelAnnouncement + */ +public enum Direction { + /** + * The lesser node id when compared lexicographically in ascending order. + */ + LDKDirection_NodeOne, + /** + * The greater node id when compared lexicographically in ascending order. + */ + LDKDirection_NodeTwo, + ; static native void init(); + static { org.ldk.impl.bindings.run_statics(); init(); } +} \ No newline at end of file diff --git a/src/main/java/org/ldk/enums/PaymentFailureReason.java b/src/main/java/org/ldk/enums/PaymentFailureReason.java index b9cec19c..ea07d0ba 100644 --- a/src/main/java/org/ldk/enums/PaymentFailureReason.java +++ b/src/main/java/org/ldk/enums/PaymentFailureReason.java @@ -32,6 +32,10 @@ public enum PaymentFailureReason { LDKPaymentFailureReason_PaymentExpired, /** * We failed to find a route while retrying the payment. + * + * Note that this generally indicates that we've exhausted the available set of possible + * routes - we tried the payment over a few routes but were not able to find any further + * candidate routes beyond those. */ LDKPaymentFailureReason_RouteNotFound, /** diff --git a/src/main/java/org/ldk/enums/ShortChannelIdError.java b/src/main/java/org/ldk/enums/ShortChannelIdError.java new file mode 100644 index 00000000..e0d4d0de --- /dev/null +++ b/src/main/java/org/ldk/enums/ShortChannelIdError.java @@ -0,0 +1,21 @@ +package org.ldk.enums; + +/** + * A `short_channel_id` construction error + */ +public enum ShortChannelIdError { + /** + * Block height too high + */ + LDKShortChannelIdError_BlockOverflow, + /** + * Tx index too high + */ + LDKShortChannelIdError_TxIndexOverflow, + /** + * Vout index too high + */ + LDKShortChannelIdError_VoutIndexOverflow, + ; static native void init(); + static { org.ldk.impl.bindings.run_statics(); init(); } +} \ No newline at end of file diff --git a/src/main/java/org/ldk/impl/bindings.java b/src/main/java/org/ldk/impl/bindings.java index a979e69d..4d4fd235 100644 --- a/src/main/java/org/ldk/impl/bindings.java +++ b/src/main/java/org/ldk/impl/bindings.java @@ -55,6 +55,7 @@ public class bindings { static { ConfirmationTarget.values(); /* Force enum statics to run */ } static { CreationError.values(); /* Force enum statics to run */ } static { Currency.values(); /* Force enum statics to run */ } + static { Direction.values(); /* Force enum statics to run */ } static { HTLCClaim.values(); /* Force enum statics to run */ } static { IOError.values(); /* Force enum statics to run */ } static { Level.values(); /* Force enum statics to run */ } @@ -63,6 +64,7 @@ public class bindings { static { Recipient.values(); /* Force enum statics to run */ } static { RetryableSendFailure.values(); /* Force enum statics to run */ } static { Secp256k1Error.values(); /* Force enum statics to run */ } + static { ShortChannelIdError.values(); /* Force enum statics to run */ } static { SiPrefix.values(); /* Force enum statics to run */ } static { SocketAddressParseError.values(); /* Force enum statics to run */ } static { UtxoLookupError.values(); /* Force enum statics to run */ } @@ -99,6 +101,14 @@ public class bindings { } static { LDKBech32Error.init(); } public static native LDKBech32Error LDKBech32Error_ref_from_ptr(long ptr); + // struct LDKRefundMaybeWithDerivedMetadataBuilder CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); + public static native long CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(long owner); + // enum LDKBolt12SemanticError CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); + public static native Bolt12SemanticError CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(long owner); + // struct LDKRefund CResult_RefundBolt12SemanticErrorZ_get_ok(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR owner); + public static native long CResult_RefundBolt12SemanticErrorZ_get_ok(long owner); + // enum LDKBolt12SemanticError CResult_RefundBolt12SemanticErrorZ_get_err(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR owner); + public static native Bolt12SemanticError CResult_RefundBolt12SemanticErrorZ_get_err(long owner); public static class LDKCOption_u64Z { private LDKCOption_u64Z() {} public final static class Some extends LDKCOption_u64Z { @@ -154,6 +164,9 @@ public class bindings { public final static class UnsupportedCompression extends LDKDecodeError { UnsupportedCompression() { } } + public final static class DangerousValue extends LDKDecodeError { + DangerousValue() { } + } static native void init(); } static { LDKDecodeError.init(); } @@ -234,6 +247,18 @@ public class bindings { public static native long CResult_RecipientOnionFieldsNoneZ_get_ok(long owner); // void CResult_RecipientOnionFieldsNoneZ_get_err(LDKCResult_RecipientOnionFieldsNoneZ *NONNULL_PTR owner); public static native void CResult_RecipientOnionFieldsNoneZ_get_err(long owner); + // struct LDKUnsignedBolt12Invoice CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner); + public static native long CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(long owner); + // enum LDKBolt12SemanticError CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner); + public static native Bolt12SemanticError CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(long owner); + // struct LDKBolt12Invoice CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner); + public static native long CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(long owner); + // enum LDKBolt12SemanticError CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner); + public static native Bolt12SemanticError CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(long owner); + // struct LDKSchnorrSignature CResult_SchnorrSignatureNoneZ_get_ok(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner); + public static native byte[] CResult_SchnorrSignatureNoneZ_get_ok(long owner); + // void CResult_SchnorrSignatureNoneZ_get_err(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner); + public static native void CResult_SchnorrSignatureNoneZ_get_err(long owner); public static class LDKCOption_CVec_ThirtyTwoBytesZZ { private LDKCOption_CVec_ThirtyTwoBytesZZ() {} public final static class Some extends LDKCOption_CVec_ThirtyTwoBytesZZ { @@ -247,6 +272,63 @@ public class bindings { } static { LDKCOption_CVec_ThirtyTwoBytesZZ.init(); } public static native LDKCOption_CVec_ThirtyTwoBytesZZ LDKCOption_CVec_ThirtyTwoBytesZZ_ref_from_ptr(long ptr); + public static class LDKAmount { + private LDKAmount() {} + public final static class Bitcoin extends LDKAmount { + public long amount_msats; + Bitcoin(long amount_msats) { this.amount_msats = amount_msats; } + } + public final static class Currency extends LDKAmount { + public byte[] iso4217_code; + public long amount; + Currency(byte[] iso4217_code, long amount) { this.iso4217_code = iso4217_code; this.amount = amount; } + } + static native void init(); + } + static { LDKAmount.init(); } + public static native LDKAmount LDKAmount_ref_from_ptr(long ptr); + public static class LDKCOption_AmountZ { + private LDKCOption_AmountZ() {} + public final static class Some extends LDKCOption_AmountZ { + public long some; + Some(long some) { this.some = some; } + } + public final static class None extends LDKCOption_AmountZ { + None() { } + } + static native void init(); + } + static { LDKCOption_AmountZ.init(); } + public static native LDKCOption_AmountZ LDKCOption_AmountZ_ref_from_ptr(long ptr); + public static class LDKQuantity { + private LDKQuantity() {} + public final static class Bounded extends LDKQuantity { + public long bounded; + Bounded(long bounded) { this.bounded = bounded; } + } + public final static class Unbounded extends LDKQuantity { + Unbounded() { } + } + public final static class One extends LDKQuantity { + One() { } + } + static native void init(); + } + static { LDKQuantity.init(); } + public static native LDKQuantity LDKQuantity_ref_from_ptr(long ptr); + public static class LDKCOption_QuantityZ { + private LDKCOption_QuantityZ() {} + public final static class Some extends LDKCOption_QuantityZ { + public long some; + Some(long some) { this.some = some; } + } + public final static class None extends LDKCOption_QuantityZ { + None() { } + } + static native void init(); + } + static { LDKCOption_QuantityZ.init(); } + public static native LDKCOption_QuantityZ LDKCOption_QuantityZ_ref_from_ptr(long ptr); // struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesNoneZ_get_ok(LDKCResult_ThirtyTwoBytesNoneZ *NONNULL_PTR owner); public static native byte[] CResult_ThirtyTwoBytesNoneZ_get_ok(long owner); // void CResult_ThirtyTwoBytesNoneZ_get_err(LDKCResult_ThirtyTwoBytesNoneZ *NONNULL_PTR owner); @@ -341,14 +423,14 @@ public class bindings { public static native byte[] CResult_RecoverableSignatureNoneZ_get_ok(long owner); // void CResult_RecoverableSignatureNoneZ_get_err(LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR owner); public static native void CResult_RecoverableSignatureNoneZ_get_err(long owner); - // struct LDKSchnorrSignature CResult_SchnorrSignatureNoneZ_get_ok(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner); - public static native byte[] CResult_SchnorrSignatureNoneZ_get_ok(long owner); - // void CResult_SchnorrSignatureNoneZ_get_err(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner); - public static native void CResult_SchnorrSignatureNoneZ_get_err(long owner); // struct LDKECDSASignature CResult_ECDSASignatureNoneZ_get_ok(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner); public static native byte[] CResult_ECDSASignatureNoneZ_get_ok(long owner); // void CResult_ECDSASignatureNoneZ_get_err(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner); public static native void CResult_ECDSASignatureNoneZ_get_err(long owner); + // struct LDKTransaction CResult_TransactionNoneZ_get_ok(LDKCResult_TransactionNoneZ *NONNULL_PTR owner); + public static native byte[] CResult_TransactionNoneZ_get_ok(long owner); + // void CResult_TransactionNoneZ_get_err(LDKCResult_TransactionNoneZ *NONNULL_PTR owner); + public static native void CResult_TransactionNoneZ_get_err(long owner); // struct LDKECDSASignature C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_a(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ *NONNULL_PTR owner); public static native byte[] C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_a(long owner); // struct LDKCVec_ECDSASignatureZ C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_b(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ *NONNULL_PTR owner); @@ -465,10 +547,6 @@ public class bindings { public static native long CResult_InMemorySignerDecodeErrorZ_get_ok(long owner); // struct LDKDecodeError CResult_InMemorySignerDecodeErrorZ_get_err(LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR owner); public static native long CResult_InMemorySignerDecodeErrorZ_get_err(long owner); - // struct LDKTransaction CResult_TransactionNoneZ_get_ok(LDKCResult_TransactionNoneZ *NONNULL_PTR owner); - public static native byte[] CResult_TransactionNoneZ_get_ok(long owner); - // void CResult_TransactionNoneZ_get_err(LDKCResult_TransactionNoneZ *NONNULL_PTR owner); - public static native void CResult_TransactionNoneZ_get_err(long owner); public static class LDKCandidateRouteHop { private LDKCandidateRouteHop() {} public final static class FirstHop extends LDKCandidateRouteHop { @@ -667,6 +745,10 @@ public class bindings { public static native long CResult_ProbabilisticScorerDecodeErrorZ_get_ok(long owner); // struct LDKDecodeError CResult_ProbabilisticScorerDecodeErrorZ_get_err(LDKCResult_ProbabilisticScorerDecodeErrorZ *NONNULL_PTR owner); public static native long CResult_ProbabilisticScorerDecodeErrorZ_get_err(long owner); + // struct LDKBestBlock CResult_BestBlockDecodeErrorZ_get_ok(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_BestBlockDecodeErrorZ_get_ok(long owner); + // struct LDKDecodeError CResult_BestBlockDecodeErrorZ_get_err(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_BestBlockDecodeErrorZ_get_err(long owner); // uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR owner); public static native long C2Tuple_usizeTransactionZ_get_a(long owner); // struct LDKTransaction C2Tuple_usizeTransactionZ_get_b(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR owner); @@ -681,31 +763,87 @@ public class bindings { public static native ChannelMonitorUpdateStatus CResult_ChannelMonitorUpdateStatusNoneZ_get_ok(long owner); // void CResult_ChannelMonitorUpdateStatusNoneZ_get_err(LDKCResult_ChannelMonitorUpdateStatusNoneZ *NONNULL_PTR owner); public static native void CResult_ChannelMonitorUpdateStatusNoneZ_get_err(long owner); + public static class LDKClosureReason { + private LDKClosureReason() {} + public final static class CounterpartyForceClosed extends LDKClosureReason { + public long peer_msg; + CounterpartyForceClosed(long peer_msg) { this.peer_msg = peer_msg; } + } + public final static class HolderForceClosed extends LDKClosureReason { + HolderForceClosed() { } + } + public final static class LegacyCooperativeClosure extends LDKClosureReason { + LegacyCooperativeClosure() { } + } + public final static class CounterpartyInitiatedCooperativeClosure extends LDKClosureReason { + CounterpartyInitiatedCooperativeClosure() { } + } + public final static class LocallyInitiatedCooperativeClosure extends LDKClosureReason { + LocallyInitiatedCooperativeClosure() { } + } + public final static class CommitmentTxConfirmed extends LDKClosureReason { + CommitmentTxConfirmed() { } + } + public final static class FundingTimedOut extends LDKClosureReason { + FundingTimedOut() { } + } + public final static class ProcessingError extends LDKClosureReason { + public java.lang.String err; + ProcessingError(java.lang.String err) { this.err = err; } + } + public final static class DisconnectedPeer extends LDKClosureReason { + DisconnectedPeer() { } + } + public final static class OutdatedChannelManager extends LDKClosureReason { + OutdatedChannelManager() { } + } + public final static class CounterpartyCoopClosedUnfundedChannel extends LDKClosureReason { + CounterpartyCoopClosedUnfundedChannel() { } + } + public final static class FundingBatchClosure extends LDKClosureReason { + FundingBatchClosure() { } + } + public final static class HTLCsTimedOut extends LDKClosureReason { + HTLCsTimedOut() { } + } + static native void init(); + } + static { LDKClosureReason.init(); } + public static native LDKClosureReason LDKClosureReason_ref_from_ptr(long ptr); public static class LDKMonitorEvent { private LDKMonitorEvent() {} public final static class HTLCEvent extends LDKMonitorEvent { public long htlc_event; HTLCEvent(long htlc_event) { this.htlc_event = htlc_event; } } + public final static class HolderForceClosedWithInfo extends LDKMonitorEvent { + public long reason; + public long outpoint; + public long channel_id; + HolderForceClosedWithInfo(long reason, long outpoint, long channel_id) { this.reason = reason; this.outpoint = outpoint; this.channel_id = channel_id; } + } public final static class HolderForceClosed extends LDKMonitorEvent { public long holder_force_closed; HolderForceClosed(long holder_force_closed) { this.holder_force_closed = holder_force_closed; } } public final static class Completed extends LDKMonitorEvent { public long funding_txo; + public long channel_id; public long monitor_update_id; - Completed(long funding_txo, long monitor_update_id) { this.funding_txo = funding_txo; this.monitor_update_id = monitor_update_id; } + Completed(long funding_txo, long channel_id, long monitor_update_id) { this.funding_txo = funding_txo; this.channel_id = channel_id; this.monitor_update_id = monitor_update_id; } } static native void init(); } static { LDKMonitorEvent.init(); } public static native LDKMonitorEvent LDKMonitorEvent_ref_from_ptr(long ptr); - // struct LDKOutPoint C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner); - public static native long C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(long owner); - // struct LDKCVec_MonitorEventZ C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner); - public static native long[] C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(long owner); - // struct LDKPublicKey C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner); - public static native byte[] C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(long owner); + // struct LDKOutPoint C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner); + public static native long C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(long owner); + // struct LDKChannelId C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner); + public static native long C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(long owner); + // struct LDKCVec_MonitorEventZ C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner); + public static native long[] C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(long owner); + // struct LDKPublicKey C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner); + public static native byte[] C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(long owner); // struct LDKInitFeatures CResult_InitFeaturesDecodeErrorZ_get_ok(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner); public static native long CResult_InitFeaturesDecodeErrorZ_get_ok(long owner); // struct LDKDecodeError CResult_InitFeaturesDecodeErrorZ_get_err(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner); @@ -734,18 +872,38 @@ public class bindings { public static native long CResult_ChannelTypeFeaturesDecodeErrorZ_get_ok(long owner); // struct LDKDecodeError CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR owner); public static native long CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(long owner); + // struct LDKOfferId CResult_OfferIdDecodeErrorZ_get_ok(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_OfferIdDecodeErrorZ_get_ok(long owner); + // struct LDKDecodeError CResult_OfferIdDecodeErrorZ_get_err(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_OfferIdDecodeErrorZ_get_err(long owner); + // void CResult_NoneBolt12SemanticErrorZ_get_ok(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner); + public static native void CResult_NoneBolt12SemanticErrorZ_get_ok(long owner); + // enum LDKBolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner); + public static native Bolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(long owner); + // struct LDKOffer CResult_OfferBolt12SemanticErrorZ_get_ok(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR owner); + public static native long CResult_OfferBolt12SemanticErrorZ_get_ok(long owner); + // enum LDKBolt12SemanticError CResult_OfferBolt12SemanticErrorZ_get_err(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR owner); + public static native Bolt12SemanticError CResult_OfferBolt12SemanticErrorZ_get_err(long owner); + // struct LDKInvoiceRequestWithDerivedPayerIdBuilder CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); + public static native long CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(long owner); + // enum LDKBolt12SemanticError CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); + public static native Bolt12SemanticError CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(long owner); + // struct LDKInvoiceRequestWithExplicitPayerIdBuilder CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); + public static native long CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(long owner); + // enum LDKBolt12SemanticError CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); + public static native Bolt12SemanticError CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(long owner); // struct LDKOffer CResult_OfferBolt12ParseErrorZ_get_ok(LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR owner); public static native long CResult_OfferBolt12ParseErrorZ_get_ok(long owner); // struct LDKBolt12ParseError CResult_OfferBolt12ParseErrorZ_get_err(LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR owner); public static native long CResult_OfferBolt12ParseErrorZ_get_err(long owner); - // struct LDKPublicKey CResult_PublicKeySecp256k1ErrorZ_get_ok(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner); - public static native byte[] CResult_PublicKeySecp256k1ErrorZ_get_ok(long owner); - // enum LDKSecp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner); - public static native Secp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(long owner); // struct LDKNodeId CResult_NodeIdDecodeErrorZ_get_ok(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR owner); public static native long CResult_NodeIdDecodeErrorZ_get_ok(long owner); // struct LDKDecodeError CResult_NodeIdDecodeErrorZ_get_err(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR owner); public static native long CResult_NodeIdDecodeErrorZ_get_err(long owner); + // struct LDKPublicKey CResult_PublicKeySecp256k1ErrorZ_get_ok(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner); + public static native byte[] CResult_PublicKeySecp256k1ErrorZ_get_ok(long owner); + // enum LDKSecp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner); + public static native Secp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(long owner); public static class LDKNetworkUpdate { private LDKNetworkUpdate() {} public final static class ChannelUpdateMessage extends LDKNetworkUpdate { @@ -1138,6 +1296,10 @@ public class bindings { } static { LDKCOption_CVec_SocketAddressZZ.init(); } public static native LDKCOption_CVec_SocketAddressZZ LDKCOption_CVec_SocketAddressZZ_ref_from_ptr(long ptr); + // uint64_t CResult_u64ShortChannelIdErrorZ_get_ok(LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR owner); + public static native long CResult_u64ShortChannelIdErrorZ_get_ok(long owner); + // enum LDKShortChannelIdError CResult_u64ShortChannelIdErrorZ_get_err(LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR owner); + public static native ShortChannelIdError CResult_u64ShortChannelIdErrorZ_get_err(long owner); // struct LDKPendingHTLCInfo CResult_PendingHTLCInfoInboundHTLCErrZ_get_ok(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR owner); public static native long CResult_PendingHTLCInfoInboundHTLCErrZ_get_ok(long owner); // struct LDKInboundHTLCErr CResult_PendingHTLCInfoInboundHTLCErrZ_get_err(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR owner); @@ -1163,6 +1325,37 @@ public class bindings { public static native long[] CResult_CVec_UtxoZNoneZ_get_ok(long owner); // void CResult_CVec_UtxoZNoneZ_get_err(LDKCResult_CVec_UtxoZNoneZ *NONNULL_PTR owner); public static native void CResult_CVec_UtxoZNoneZ_get_err(long owner); + public static class LDKPaymentContext { + private LDKPaymentContext() {} + public final static class Unknown extends LDKPaymentContext { + public long unknown; + Unknown(long unknown) { this.unknown = unknown; } + } + public final static class Bolt12Offer extends LDKPaymentContext { + public long bolt12_offer; + Bolt12Offer(long bolt12_offer) { this.bolt12_offer = bolt12_offer; } + } + public final static class Bolt12Refund extends LDKPaymentContext { + public long bolt12_refund; + Bolt12Refund(long bolt12_refund) { this.bolt12_refund = bolt12_refund; } + } + static native void init(); + } + static { LDKPaymentContext.init(); } + public static native LDKPaymentContext LDKPaymentContext_ref_from_ptr(long ptr); + public static class LDKCOption_PaymentContextZ { + private LDKCOption_PaymentContextZ() {} + public final static class Some extends LDKCOption_PaymentContextZ { + public long some; + Some(long some) { this.some = some; } + } + public final static class None extends LDKCOption_PaymentContextZ { + None() { } + } + static native void init(); + } + static { LDKCOption_PaymentContextZ.init(); } + public static native LDKCOption_PaymentContextZ LDKCOption_PaymentContextZ_ref_from_ptr(long ptr); // uint64_t C2Tuple_u64u16Z_get_a(LDKC2Tuple_u64u16Z *NONNULL_PTR owner); public static native long C2Tuple_u64u16Z_get_a(long owner); // uint16_t C2Tuple_u64u16Z_get_b(LDKC2Tuple_u64u16Z *NONNULL_PTR owner); @@ -1193,10 +1386,10 @@ public class bindings { } static { LDKCOption_ChannelShutdownStateZ.init(); } public static native LDKCOption_ChannelShutdownStateZ LDKCOption_ChannelShutdownStateZ_ref_from_ptr(long ptr); - // struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesAPIErrorZ_get_ok(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner); - public static native byte[] CResult_ThirtyTwoBytesAPIErrorZ_get_ok(long owner); - // struct LDKAPIError CResult_ThirtyTwoBytesAPIErrorZ_get_err(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner); - public static native long CResult_ThirtyTwoBytesAPIErrorZ_get_err(long owner); + // struct LDKChannelId CResult_ChannelIdAPIErrorZ_get_ok(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR owner); + public static native long CResult_ChannelIdAPIErrorZ_get_ok(long owner); + // struct LDKAPIError CResult_ChannelIdAPIErrorZ_get_err(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR owner); + public static native long CResult_ChannelIdAPIErrorZ_get_err(long owner); public static class LDKRecentPaymentDetails { private LDKRecentPaymentDetails() {} public final static class AwaitingInvoice extends LDKRecentPaymentDetails { @@ -1291,10 +1484,14 @@ public class bindings { public static native long[] CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_get_ok(long owner); // struct LDKProbeSendFailure CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_get_err(LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ *NONNULL_PTR owner); public static native long CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_get_err(long owner); - // struct LDKThirtyTwoBytes C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR owner); - public static native byte[] C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(long owner); - // struct LDKPublicKey C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR owner); - public static native byte[] C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(long owner); + // struct LDKChannelId C2Tuple_ChannelIdPublicKeyZ_get_a(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR owner); + public static native long C2Tuple_ChannelIdPublicKeyZ_get_a(long owner); + // struct LDKPublicKey C2Tuple_ChannelIdPublicKeyZ_get_b(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR owner); + public static native byte[] C2Tuple_ChannelIdPublicKeyZ_get_b(long owner); + // struct LDKOfferWithDerivedMetadataBuilder CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); + public static native long CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(long owner); + // enum LDKBolt12SemanticError CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); + public static native Bolt12SemanticError CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(long owner); public static class LDKCOption_StrZ { private LDKCOption_StrZ() {} public final static class Some extends LDKCOption_StrZ { @@ -1308,14 +1505,14 @@ public class bindings { } static { LDKCOption_StrZ.init(); } public static native LDKCOption_StrZ LDKCOption_StrZ_ref_from_ptr(long ptr); - // void CResult_NoneBolt12SemanticErrorZ_get_ok(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner); - public static native void CResult_NoneBolt12SemanticErrorZ_get_ok(long owner); - // enum LDKBolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner); - public static native Bolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(long owner); // struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_ok(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ *NONNULL_PTR owner); public static native long CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_ok(long owner); // void CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_err(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ *NONNULL_PTR owner); public static native void CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_err(long owner); + // struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesAPIErrorZ_get_ok(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner); + public static native byte[] CResult_ThirtyTwoBytesAPIErrorZ_get_ok(long owner); + // struct LDKAPIError CResult_ThirtyTwoBytesAPIErrorZ_get_err(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner); + public static native long CResult_ThirtyTwoBytesAPIErrorZ_get_err(long owner); public static class LDKOffersMessage { private LDKOffersMessage() {} public final static class InvoiceRequest extends LDKOffersMessage { @@ -1398,11 +1595,12 @@ public class bindings { public final static class Receive extends LDKPendingHTLCRouting { public long payment_data; public long payment_metadata; + public long payment_context; public int incoming_cltv_expiry; public byte[] phantom_shared_secret; public long[] custom_tlvs; public boolean requires_blinded_error; - Receive(long payment_data, long payment_metadata, int incoming_cltv_expiry, byte[] phantom_shared_secret, long[] custom_tlvs, boolean requires_blinded_error) { this.payment_data = payment_data; this.payment_metadata = payment_metadata; this.incoming_cltv_expiry = incoming_cltv_expiry; this.phantom_shared_secret = phantom_shared_secret; this.custom_tlvs = custom_tlvs; this.requires_blinded_error = requires_blinded_error; } + Receive(long payment_data, long payment_metadata, long payment_context, int incoming_cltv_expiry, byte[] phantom_shared_secret, long[] custom_tlvs, boolean requires_blinded_error) { this.payment_data = payment_data; this.payment_metadata = payment_metadata; this.payment_context = payment_context; this.incoming_cltv_expiry = incoming_cltv_expiry; this.phantom_shared_secret = phantom_shared_secret; this.custom_tlvs = custom_tlvs; this.requires_blinded_error = requires_blinded_error; } } public final static class ReceiveKeysend extends LDKPendingHTLCRouting { public long payment_data; @@ -1410,7 +1608,8 @@ public class bindings { public long payment_metadata; public int incoming_cltv_expiry; public long[] custom_tlvs; - ReceiveKeysend(long payment_data, byte[] payment_preimage, long payment_metadata, int incoming_cltv_expiry, long[] custom_tlvs) { this.payment_data = payment_data; this.payment_preimage = payment_preimage; this.payment_metadata = payment_metadata; this.incoming_cltv_expiry = incoming_cltv_expiry; this.custom_tlvs = custom_tlvs; } + public boolean requires_blinded_error; + ReceiveKeysend(long payment_data, byte[] payment_preimage, long payment_metadata, int incoming_cltv_expiry, long[] custom_tlvs, boolean requires_blinded_error) { this.payment_data = payment_data; this.payment_preimage = payment_preimage; this.payment_metadata = payment_metadata; this.incoming_cltv_expiry = incoming_cltv_expiry; this.custom_tlvs = custom_tlvs; this.requires_blinded_error = requires_blinded_error; } } static native void init(); } @@ -1442,7 +1641,7 @@ public class bindings { public static native long Watch_watch_channel(long this_arg, long funding_txo, long monitor); // LDKChannelMonitorUpdateStatus Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, const struct LDKChannelMonitorUpdate *NONNULL_PTR update public static native ChannelMonitorUpdateStatus Watch_update_channel(long this_arg, long funding_txo, long update); - // LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg + // LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg public static native long[] Watch_release_pending_monitor_events(long this_arg); public interface LDKBroadcasterInterface { void broadcast_transactions(byte[][] txs); @@ -1780,10 +1979,6 @@ public class bindings { } static { LDKCOption_SocketAddressZ.init(); } public static native LDKCOption_SocketAddressZ LDKCOption_SocketAddressZ_ref_from_ptr(long ptr); - // struct LDKPublicKey C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR owner); - public static native byte[] C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(long owner); - // struct LDKCOption_SocketAddressZ C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR owner); - public static native long C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(long owner); // struct LDKCVec_u8Z CResult_CVec_u8ZPeerHandleErrorZ_get_ok(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR owner); public static native byte[] CResult_CVec_u8ZPeerHandleErrorZ_get_ok(long owner); // struct LDKPeerHandleError CResult_CVec_u8ZPeerHandleErrorZ_get_err(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR owner); @@ -1830,6 +2025,14 @@ public class bindings { public static native long CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_get_ok(long owner); // enum LDKIOError CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_get_err(LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ *NONNULL_PTR owner); public static native IOError CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_get_err(long owner); + // struct LDKUnsignedInvoiceRequest CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner); + public static native long CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(long owner); + // enum LDKBolt12SemanticError CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner); + public static native Bolt12SemanticError CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(long owner); + // struct LDKInvoiceRequest CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner); + public static native long CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(long owner); + // enum LDKBolt12SemanticError CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner); + public static native Bolt12SemanticError CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(long owner); public static class LDKCOption_SecretKeyZ { private LDKCOption_SecretKeyZ() {} public final static class Some extends LDKCOption_SecretKeyZ { @@ -1843,10 +2046,35 @@ public class bindings { } static { LDKCOption_SecretKeyZ.init(); } public static native LDKCOption_SecretKeyZ LDKCOption_SecretKeyZ_ref_from_ptr(long ptr); + // struct LDKInvoiceWithExplicitSigningPubkeyBuilder CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); + public static native long CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(long owner); + // enum LDKBolt12SemanticError CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); + public static native Bolt12SemanticError CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(long owner); // struct LDKVerifiedInvoiceRequest CResult_VerifiedInvoiceRequestNoneZ_get_ok(LDKCResult_VerifiedInvoiceRequestNoneZ *NONNULL_PTR owner); public static native long CResult_VerifiedInvoiceRequestNoneZ_get_ok(long owner); // void CResult_VerifiedInvoiceRequestNoneZ_get_err(LDKCResult_VerifiedInvoiceRequestNoneZ *NONNULL_PTR owner); public static native void CResult_VerifiedInvoiceRequestNoneZ_get_err(long owner); + // struct LDKInvoiceWithDerivedSigningPubkeyBuilder CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); + public static native long CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(long owner); + // enum LDKBolt12SemanticError CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); + public static native Bolt12SemanticError CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(long owner); + // struct LDKInvoiceRequestFields CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(long owner); + // struct LDKDecodeError CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(long owner); + public static class LDKCOption_ECDSASignatureZ { + private LDKCOption_ECDSASignatureZ() {} + public final static class Some extends LDKCOption_ECDSASignatureZ { + public byte[] some; + Some(byte[] some) { this.some = some; } + } + public final static class None extends LDKCOption_ECDSASignatureZ { + None() { } + } + static native void init(); + } + static { LDKCOption_ECDSASignatureZ.init(); } + public static native LDKCOption_ECDSASignatureZ LDKCOption_ECDSASignatureZ_ref_from_ptr(long ptr); public static class LDKCOption_i64Z { private LDKCOption_i64Z() {} public final static class Some extends LDKCOption_i64Z { @@ -2177,10 +2405,22 @@ public class bindings { public static native long CResult_ShutdownScriptInvalidShutdownScriptZ_get_err(long owner); public static class LDKPaymentPurpose { private LDKPaymentPurpose() {} - public final static class InvoicePayment extends LDKPaymentPurpose { + public final static class Bolt11InvoicePayment extends LDKPaymentPurpose { + public long payment_preimage; + public byte[] payment_secret; + Bolt11InvoicePayment(long payment_preimage, byte[] payment_secret) { this.payment_preimage = payment_preimage; this.payment_secret = payment_secret; } + } + public final static class Bolt12OfferPayment extends LDKPaymentPurpose { public long payment_preimage; public byte[] payment_secret; - InvoicePayment(long payment_preimage, byte[] payment_secret) { this.payment_preimage = payment_preimage; this.payment_secret = payment_secret; } + public long payment_context; + Bolt12OfferPayment(long payment_preimage, byte[] payment_secret, long payment_context) { this.payment_preimage = payment_preimage; this.payment_secret = payment_secret; this.payment_context = payment_context; } + } + public final static class Bolt12RefundPayment extends LDKPaymentPurpose { + public long payment_preimage; + public byte[] payment_secret; + public long payment_context; + Bolt12RefundPayment(long payment_preimage, byte[] payment_secret, long payment_context) { this.payment_preimage = payment_preimage; this.payment_secret = payment_secret; this.payment_context = payment_context; } } public final static class SpontaneousPayment extends LDKPaymentPurpose { public byte[] spontaneous_payment; @@ -2229,44 +2469,6 @@ public class bindings { public static native long CResult_COption_PathFailureZDecodeErrorZ_get_ok(long owner); // struct LDKDecodeError CResult_COption_PathFailureZDecodeErrorZ_get_err(LDKCResult_COption_PathFailureZDecodeErrorZ *NONNULL_PTR owner); public static native long CResult_COption_PathFailureZDecodeErrorZ_get_err(long owner); - public static class LDKClosureReason { - private LDKClosureReason() {} - public final static class CounterpartyForceClosed extends LDKClosureReason { - public long peer_msg; - CounterpartyForceClosed(long peer_msg) { this.peer_msg = peer_msg; } - } - public final static class HolderForceClosed extends LDKClosureReason { - HolderForceClosed() { } - } - public final static class CooperativeClosure extends LDKClosureReason { - CooperativeClosure() { } - } - public final static class CommitmentTxConfirmed extends LDKClosureReason { - CommitmentTxConfirmed() { } - } - public final static class FundingTimedOut extends LDKClosureReason { - FundingTimedOut() { } - } - public final static class ProcessingError extends LDKClosureReason { - public java.lang.String err; - ProcessingError(java.lang.String err) { this.err = err; } - } - public final static class DisconnectedPeer extends LDKClosureReason { - DisconnectedPeer() { } - } - public final static class OutdatedChannelManager extends LDKClosureReason { - OutdatedChannelManager() { } - } - public final static class CounterpartyCoopClosedUnfundedChannel extends LDKClosureReason { - CounterpartyCoopClosedUnfundedChannel() { } - } - public final static class FundingBatchClosure extends LDKClosureReason { - FundingBatchClosure() { } - } - static native void init(); - } - static { LDKClosureReason.init(); } - public static native LDKClosureReason LDKClosureReason_ref_from_ptr(long ptr); public static class LDKCOption_ClosureReasonZ { private LDKCOption_ClosureReasonZ() {} public final static class Some extends LDKCOption_ClosureReasonZ { @@ -2288,8 +2490,8 @@ public class bindings { private LDKHTLCDestination() {} public final static class NextHopChannel extends LDKHTLCDestination { public byte[] node_id; - public byte[] channel_id; - NextHopChannel(byte[] node_id, byte[] channel_id) { this.node_id = node_id; this.channel_id = channel_id; } + public long channel_id; + NextHopChannel(byte[] node_id, long channel_id) { this.node_id = node_id; this.channel_id = channel_id; } } public final static class UnknownNextHop extends LDKHTLCDestination { public long requested_forward_scid; @@ -2299,6 +2501,9 @@ public class bindings { public long requested_forward_scid; InvalidForward(long requested_forward_scid) { this.requested_forward_scid = requested_forward_scid; } } + public final static class InvalidOnion extends LDKHTLCDestination { + InvalidOnion() { } + } public final static class FailedPayment extends LDKHTLCDestination { public byte[] payment_hash; FailedPayment(byte[] payment_hash) { this.payment_hash = payment_hash; } @@ -2357,20 +2562,24 @@ public class bindings { public static class LDKBumpTransactionEvent { private LDKBumpTransactionEvent() {} public final static class ChannelClose extends LDKBumpTransactionEvent { + public long channel_id; + public byte[] counterparty_node_id; public byte[] claim_id; public int package_target_feerate_sat_per_1000_weight; public byte[] commitment_tx; public long commitment_tx_fee_satoshis; public long anchor_descriptor; public long[] pending_htlcs; - ChannelClose(byte[] claim_id, int package_target_feerate_sat_per_1000_weight, byte[] commitment_tx, long commitment_tx_fee_satoshis, long anchor_descriptor, long[] pending_htlcs) { this.claim_id = claim_id; this.package_target_feerate_sat_per_1000_weight = package_target_feerate_sat_per_1000_weight; this.commitment_tx = commitment_tx; this.commitment_tx_fee_satoshis = commitment_tx_fee_satoshis; this.anchor_descriptor = anchor_descriptor; this.pending_htlcs = pending_htlcs; } + ChannelClose(long channel_id, byte[] counterparty_node_id, byte[] claim_id, int package_target_feerate_sat_per_1000_weight, byte[] commitment_tx, long commitment_tx_fee_satoshis, long anchor_descriptor, long[] pending_htlcs) { this.channel_id = channel_id; this.counterparty_node_id = counterparty_node_id; this.claim_id = claim_id; this.package_target_feerate_sat_per_1000_weight = package_target_feerate_sat_per_1000_weight; this.commitment_tx = commitment_tx; this.commitment_tx_fee_satoshis = commitment_tx_fee_satoshis; this.anchor_descriptor = anchor_descriptor; this.pending_htlcs = pending_htlcs; } } public final static class HTLCResolution extends LDKBumpTransactionEvent { + public long channel_id; + public byte[] counterparty_node_id; public byte[] claim_id; public int target_feerate_sat_per_1000_weight; public long[] htlc_descriptors; public int tx_lock_time; - HTLCResolution(byte[] claim_id, int target_feerate_sat_per_1000_weight, long[] htlc_descriptors, int tx_lock_time) { this.claim_id = claim_id; this.target_feerate_sat_per_1000_weight = target_feerate_sat_per_1000_weight; this.htlc_descriptors = htlc_descriptors; this.tx_lock_time = tx_lock_time; } + HTLCResolution(long channel_id, byte[] counterparty_node_id, byte[] claim_id, int target_feerate_sat_per_1000_weight, long[] htlc_descriptors, int tx_lock_time) { this.channel_id = channel_id; this.counterparty_node_id = counterparty_node_id; this.claim_id = claim_id; this.target_feerate_sat_per_1000_weight = target_feerate_sat_per_1000_weight; this.htlc_descriptors = htlc_descriptors; this.tx_lock_time = tx_lock_time; } } static native void init(); } @@ -2379,12 +2588,12 @@ public class bindings { public static class LDKEvent { private LDKEvent() {} public final static class FundingGenerationReady extends LDKEvent { - public byte[] temporary_channel_id; + public long temporary_channel_id; public byte[] counterparty_node_id; public long channel_value_satoshis; public byte[] output_script; public byte[] user_channel_id; - FundingGenerationReady(byte[] temporary_channel_id, byte[] counterparty_node_id, long channel_value_satoshis, byte[] output_script, byte[] user_channel_id) { this.temporary_channel_id = temporary_channel_id; this.counterparty_node_id = counterparty_node_id; this.channel_value_satoshis = channel_value_satoshis; this.output_script = output_script; this.user_channel_id = user_channel_id; } + FundingGenerationReady(long temporary_channel_id, byte[] counterparty_node_id, long channel_value_satoshis, byte[] output_script, byte[] user_channel_id) { this.temporary_channel_id = temporary_channel_id; this.counterparty_node_id = counterparty_node_id; this.channel_value_satoshis = channel_value_satoshis; this.output_script = output_script; this.user_channel_id = user_channel_id; } } public final static class PaymentClaimable extends LDKEvent { public byte[] receiver_node_id; @@ -2477,52 +2686,56 @@ public class bindings { public final static class PaymentForwarded extends LDKEvent { public long prev_channel_id; public long next_channel_id; - public long fee_earned_msat; + public long prev_user_channel_id; + public long next_user_channel_id; + public long total_fee_earned_msat; + public long skimmed_fee_msat; public boolean claim_from_onchain_tx; public long outbound_amount_forwarded_msat; - PaymentForwarded(long prev_channel_id, long next_channel_id, long fee_earned_msat, boolean claim_from_onchain_tx, long outbound_amount_forwarded_msat) { this.prev_channel_id = prev_channel_id; this.next_channel_id = next_channel_id; this.fee_earned_msat = fee_earned_msat; this.claim_from_onchain_tx = claim_from_onchain_tx; this.outbound_amount_forwarded_msat = outbound_amount_forwarded_msat; } + PaymentForwarded(long prev_channel_id, long next_channel_id, long prev_user_channel_id, long next_user_channel_id, long total_fee_earned_msat, long skimmed_fee_msat, boolean claim_from_onchain_tx, long outbound_amount_forwarded_msat) { this.prev_channel_id = prev_channel_id; this.next_channel_id = next_channel_id; this.prev_user_channel_id = prev_user_channel_id; this.next_user_channel_id = next_user_channel_id; this.total_fee_earned_msat = total_fee_earned_msat; this.skimmed_fee_msat = skimmed_fee_msat; this.claim_from_onchain_tx = claim_from_onchain_tx; this.outbound_amount_forwarded_msat = outbound_amount_forwarded_msat; } } public final static class ChannelPending extends LDKEvent { - public byte[] channel_id; + public long channel_id; public byte[] user_channel_id; public long former_temporary_channel_id; public byte[] counterparty_node_id; public long funding_txo; - ChannelPending(byte[] channel_id, byte[] user_channel_id, long former_temporary_channel_id, byte[] counterparty_node_id, long funding_txo) { this.channel_id = channel_id; this.user_channel_id = user_channel_id; this.former_temporary_channel_id = former_temporary_channel_id; this.counterparty_node_id = counterparty_node_id; this.funding_txo = funding_txo; } + public long channel_type; + ChannelPending(long channel_id, byte[] user_channel_id, long former_temporary_channel_id, byte[] counterparty_node_id, long funding_txo, long channel_type) { this.channel_id = channel_id; this.user_channel_id = user_channel_id; this.former_temporary_channel_id = former_temporary_channel_id; this.counterparty_node_id = counterparty_node_id; this.funding_txo = funding_txo; this.channel_type = channel_type; } } public final static class ChannelReady extends LDKEvent { - public byte[] channel_id; + public long channel_id; public byte[] user_channel_id; public byte[] counterparty_node_id; public long channel_type; - ChannelReady(byte[] channel_id, byte[] user_channel_id, byte[] counterparty_node_id, long channel_type) { this.channel_id = channel_id; this.user_channel_id = user_channel_id; this.counterparty_node_id = counterparty_node_id; this.channel_type = channel_type; } + ChannelReady(long channel_id, byte[] user_channel_id, byte[] counterparty_node_id, long channel_type) { this.channel_id = channel_id; this.user_channel_id = user_channel_id; this.counterparty_node_id = counterparty_node_id; this.channel_type = channel_type; } } public final static class ChannelClosed extends LDKEvent { - public byte[] channel_id; + public long channel_id; public byte[] user_channel_id; public long reason; public byte[] counterparty_node_id; public long channel_capacity_sats; public long channel_funding_txo; - ChannelClosed(byte[] channel_id, byte[] user_channel_id, long reason, byte[] counterparty_node_id, long channel_capacity_sats, long channel_funding_txo) { this.channel_id = channel_id; this.user_channel_id = user_channel_id; this.reason = reason; this.counterparty_node_id = counterparty_node_id; this.channel_capacity_sats = channel_capacity_sats; this.channel_funding_txo = channel_funding_txo; } + ChannelClosed(long channel_id, byte[] user_channel_id, long reason, byte[] counterparty_node_id, long channel_capacity_sats, long channel_funding_txo) { this.channel_id = channel_id; this.user_channel_id = user_channel_id; this.reason = reason; this.counterparty_node_id = counterparty_node_id; this.channel_capacity_sats = channel_capacity_sats; this.channel_funding_txo = channel_funding_txo; } } public final static class DiscardFunding extends LDKEvent { - public byte[] channel_id; + public long channel_id; public byte[] transaction; - DiscardFunding(byte[] channel_id, byte[] transaction) { this.channel_id = channel_id; this.transaction = transaction; } + DiscardFunding(long channel_id, byte[] transaction) { this.channel_id = channel_id; this.transaction = transaction; } } public final static class OpenChannelRequest extends LDKEvent { - public byte[] temporary_channel_id; + public long temporary_channel_id; public byte[] counterparty_node_id; public long funding_satoshis; public long push_msat; public long channel_type; - OpenChannelRequest(byte[] temporary_channel_id, byte[] counterparty_node_id, long funding_satoshis, long push_msat, long channel_type) { this.temporary_channel_id = temporary_channel_id; this.counterparty_node_id = counterparty_node_id; this.funding_satoshis = funding_satoshis; this.push_msat = push_msat; this.channel_type = channel_type; } + OpenChannelRequest(long temporary_channel_id, byte[] counterparty_node_id, long funding_satoshis, long push_msat, long channel_type) { this.temporary_channel_id = temporary_channel_id; this.counterparty_node_id = counterparty_node_id; this.funding_satoshis = funding_satoshis; this.push_msat = push_msat; this.channel_type = channel_type; } } public final static class HTLCHandlingFailed extends LDKEvent { - public byte[] prev_channel_id; + public long prev_channel_id; public long failed_next_destination; - HTLCHandlingFailed(byte[] prev_channel_id, long failed_next_destination) { this.prev_channel_id = prev_channel_id; this.failed_next_destination = failed_next_destination; } + HTLCHandlingFailed(long prev_channel_id, long failed_next_destination) { this.prev_channel_id = prev_channel_id; this.failed_next_destination = failed_next_destination; } } public final static class BumpTransaction extends LDKEvent { public long bump_transaction; @@ -2694,6 +2907,10 @@ public class bindings { public static native long CResult_UntrustedStringDecodeErrorZ_get_ok(long owner); // struct LDKDecodeError CResult_UntrustedStringDecodeErrorZ_get_err(LDKCResult_UntrustedStringDecodeErrorZ *NONNULL_PTR owner); public static native long CResult_UntrustedStringDecodeErrorZ_get_err(long owner); + // struct LDKChannelId CResult_ChannelIdDecodeErrorZ_get_ok(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_ChannelIdDecodeErrorZ_get_ok(long owner); + // struct LDKDecodeError CResult_ChannelIdDecodeErrorZ_get_err(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_ChannelIdDecodeErrorZ_get_err(long owner); // struct LDKThirtyTwoBytes C2Tuple__u832u16Z_get_a(LDKC2Tuple__u832u16Z *NONNULL_PTR owner); public static native byte[] C2Tuple__u832u16Z_get_a(long owner); // uint16_t C2Tuple__u832u16Z_get_b(LDKC2Tuple__u832u16Z *NONNULL_PTR owner); @@ -2706,6 +2923,26 @@ public class bindings { public static native long CResult_PaymentConstraintsDecodeErrorZ_get_ok(long owner); // struct LDKDecodeError CResult_PaymentConstraintsDecodeErrorZ_get_err(LDKCResult_PaymentConstraintsDecodeErrorZ *NONNULL_PTR owner); public static native long CResult_PaymentConstraintsDecodeErrorZ_get_err(long owner); + // struct LDKPaymentContext CResult_PaymentContextDecodeErrorZ_get_ok(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_PaymentContextDecodeErrorZ_get_ok(long owner); + // struct LDKDecodeError CResult_PaymentContextDecodeErrorZ_get_err(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_PaymentContextDecodeErrorZ_get_err(long owner); + // struct LDKUnknownPaymentContext CResult_UnknownPaymentContextDecodeErrorZ_get_ok(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_UnknownPaymentContextDecodeErrorZ_get_ok(long owner); + // struct LDKDecodeError CResult_UnknownPaymentContextDecodeErrorZ_get_err(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_UnknownPaymentContextDecodeErrorZ_get_err(long owner); + // struct LDKBolt12OfferContext CResult_Bolt12OfferContextDecodeErrorZ_get_ok(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_Bolt12OfferContextDecodeErrorZ_get_ok(long owner); + // struct LDKDecodeError CResult_Bolt12OfferContextDecodeErrorZ_get_err(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_Bolt12OfferContextDecodeErrorZ_get_err(long owner); + // struct LDKBolt12RefundContext CResult_Bolt12RefundContextDecodeErrorZ_get_ok(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_Bolt12RefundContextDecodeErrorZ_get_ok(long owner); + // struct LDKDecodeError CResult_Bolt12RefundContextDecodeErrorZ_get_err(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_Bolt12RefundContextDecodeErrorZ_get_err(long owner); + // struct LDKStr CResult_StrSecp256k1ErrorZ_get_ok(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner); + public static native String CResult_StrSecp256k1ErrorZ_get_ok(long owner); + // enum LDKSecp256k1Error CResult_StrSecp256k1ErrorZ_get_err(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner); + public static native Secp256k1Error CResult_StrSecp256k1ErrorZ_get_err(long owner); // struct LDKThirtyTwoBytes C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner); public static native byte[] C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(long owner); // struct LDKRecipientOnionFields C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner); @@ -2716,10 +2953,6 @@ public class bindings { public static native long CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(long owner); // void CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR owner); public static native void CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(long owner); - // struct LDKStr CResult_StrSecp256k1ErrorZ_get_ok(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner); - public static native String CResult_StrSecp256k1ErrorZ_get_ok(long owner); - // enum LDKSecp256k1Error CResult_StrSecp256k1ErrorZ_get_err(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner); - public static native Secp256k1Error CResult_StrSecp256k1ErrorZ_get_err(long owner); // struct LDKPublicKey C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_a(LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ *NONNULL_PTR owner); public static native byte[] C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_a(long owner); // struct LDKOnionMessage C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_b(LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ *NONNULL_PTR owner); @@ -2754,6 +2987,9 @@ public class bindings { public final static class GetNodeIdFailed extends LDKSendError { GetNodeIdFailed() { } } + public final static class UnresolvedIntroductionNode extends LDKSendError { + UnresolvedIntroductionNode() { } + } public final static class BlindedPathAdvanceFailed extends LDKSendError { BlindedPathAdvanceFailed() { } } @@ -2765,6 +3001,20 @@ public class bindings { public static native long CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_get_ok(long owner); // struct LDKSendError CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_get_err(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ *NONNULL_PTR owner); public static native long CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_get_err(long owner); + public static class LDKNextMessageHop { + private LDKNextMessageHop() {} + public final static class NodeId extends LDKNextMessageHop { + public byte[] node_id; + NodeId(byte[] node_id) { this.node_id = node_id; } + } + public final static class ShortChannelId extends LDKNextMessageHop { + public long short_channel_id; + ShortChannelId(long short_channel_id) { this.short_channel_id = short_channel_id; } + } + static native void init(); + } + static { LDKNextMessageHop.init(); } + public static native LDKNextMessageHop LDKNextMessageHop_ref_from_ptr(long ptr); public static class LDKParsedOnionMessageContents { private LDKParsedOnionMessageContents() {} public final static class Offers extends LDKParsedOnionMessageContents { @@ -2782,9 +3032,9 @@ public class bindings { public static class LDKPeeledOnion { private LDKPeeledOnion() {} public final static class Forward extends LDKPeeledOnion { - public byte[] _0; + public long _0; public long _1; - Forward(byte[] _0, long _1) { this._0 = _0; this._1 = _1; } + Forward(long _0, long _1) { this._0 = _0; this._1 = _1; } } public final static class Receive extends LDKPeeledOnion { public long _0; @@ -2837,30 +3087,38 @@ public class bindings { public static native long CResult_InvoiceErrorDecodeErrorZ_get_ok(long owner); // struct LDKDecodeError CResult_InvoiceErrorDecodeErrorZ_get_err(LDKCResult_InvoiceErrorDecodeErrorZ *NONNULL_PTR owner); public static native long CResult_InvoiceErrorDecodeErrorZ_get_err(long owner); - // struct LDKDelayedPaymentBasepoint CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner); - public static native long CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(long owner); - // struct LDKDecodeError CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner); - public static native long CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(long owner); - // struct LDKDelayedPaymentKey CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner); - public static native long CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(long owner); - // struct LDKDecodeError CResult_DelayedPaymentKeyDecodeErrorZ_get_err(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner); - public static native long CResult_DelayedPaymentKeyDecodeErrorZ_get_err(long owner); - // struct LDKHtlcBasepoint CResult_HtlcBasepointDecodeErrorZ_get_ok(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner); - public static native long CResult_HtlcBasepointDecodeErrorZ_get_ok(long owner); - // struct LDKDecodeError CResult_HtlcBasepointDecodeErrorZ_get_err(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner); - public static native long CResult_HtlcBasepointDecodeErrorZ_get_err(long owner); - // struct LDKHtlcKey CResult_HtlcKeyDecodeErrorZ_get_ok(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner); - public static native long CResult_HtlcKeyDecodeErrorZ_get_ok(long owner); - // struct LDKDecodeError CResult_HtlcKeyDecodeErrorZ_get_err(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner); - public static native long CResult_HtlcKeyDecodeErrorZ_get_err(long owner); - // struct LDKRevocationBasepoint CResult_RevocationBasepointDecodeErrorZ_get_ok(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner); - public static native long CResult_RevocationBasepointDecodeErrorZ_get_ok(long owner); - // struct LDKDecodeError CResult_RevocationBasepointDecodeErrorZ_get_err(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner); - public static native long CResult_RevocationBasepointDecodeErrorZ_get_err(long owner); - // struct LDKRevocationKey CResult_RevocationKeyDecodeErrorZ_get_ok(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner); - public static native long CResult_RevocationKeyDecodeErrorZ_get_ok(long owner); - // struct LDKDecodeError CResult_RevocationKeyDecodeErrorZ_get_err(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner); - public static native long CResult_RevocationKeyDecodeErrorZ_get_err(long owner); + // struct LDKTrackedSpendableOutput CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(long owner); + // struct LDKDecodeError CResult_TrackedSpendableOutputDecodeErrorZ_get_err(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_TrackedSpendableOutputDecodeErrorZ_get_err(long owner); + public static class LDKOutputSpendStatus { + private LDKOutputSpendStatus() {} + public final static class PendingInitialBroadcast extends LDKOutputSpendStatus { + public long delayed_until_height; + PendingInitialBroadcast(long delayed_until_height) { this.delayed_until_height = delayed_until_height; } + } + public final static class PendingFirstConfirmation extends LDKOutputSpendStatus { + public byte[] first_broadcast_hash; + public int latest_broadcast_height; + public byte[] latest_spending_tx; + PendingFirstConfirmation(byte[] first_broadcast_hash, int latest_broadcast_height, byte[] latest_spending_tx) { this.first_broadcast_hash = first_broadcast_hash; this.latest_broadcast_height = latest_broadcast_height; this.latest_spending_tx = latest_spending_tx; } + } + public final static class PendingThresholdConfirmations extends LDKOutputSpendStatus { + public byte[] first_broadcast_hash; + public int latest_broadcast_height; + public byte[] latest_spending_tx; + public int confirmation_height; + public byte[] confirmation_hash; + PendingThresholdConfirmations(byte[] first_broadcast_hash, int latest_broadcast_height, byte[] latest_spending_tx, int confirmation_height, byte[] confirmation_hash) { this.first_broadcast_hash = first_broadcast_hash; this.latest_broadcast_height = latest_broadcast_height; this.latest_spending_tx = latest_spending_tx; this.confirmation_height = confirmation_height; this.confirmation_hash = confirmation_hash; } + } + static native void init(); + } + static { LDKOutputSpendStatus.init(); } + public static native LDKOutputSpendStatus LDKOutputSpendStatus_ref_from_ptr(long ptr); + // struct LDKOutputSpendStatus CResult_OutputSpendStatusDecodeErrorZ_get_ok(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_OutputSpendStatusDecodeErrorZ_get_ok(long owner); + // struct LDKDecodeError CResult_OutputSpendStatusDecodeErrorZ_get_err(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_OutputSpendStatusDecodeErrorZ_get_err(long owner); public interface LDKFilter { void register_tx(byte[] txid, byte[] script_pubkey); void register_output(long output); @@ -2883,14 +3141,12 @@ public class bindings { } static { LDKCOption_FilterZ.init(); } public static native LDKCOption_FilterZ LDKCOption_FilterZ_ref_from_ptr(long ptr); - // struct LDKLockedChannelMonitor CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner); - public static native long CResult_LockedChannelMonitorNoneZ_get_ok(long owner); - // void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner); - public static native void CResult_LockedChannelMonitorNoneZ_get_err(long owner); - // struct LDKOutPoint C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner); - public static native long C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(long owner); - // struct LDKCVec_MonitorUpdateIdZ C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner); - public static native long[] C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(long owner); + public interface LDKChangeDestinationSource { + long get_change_destination_script(); + } + public static native long LDKChangeDestinationSource_new(LDKChangeDestinationSource impl); + // LDKCResult_CVec_u8ZNoneZ ChangeDestinationSource_get_change_destination_script LDKChangeDestinationSource *NONNULL_PTR this_arg + public static native long ChangeDestinationSource_get_change_destination_script(long this_arg); public interface LDKKVStore { long read(String primary_namespace, String secondary_namespace, String key); long write(String primary_namespace, String secondary_namespace, String key, byte[] buf); @@ -2906,6 +3162,60 @@ public class bindings { public static native long KVStore_remove(long this_arg, String primary_namespace, String secondary_namespace, String key, boolean lazy); // LDKCResult_CVec_StrZIOErrorZ KVStore_list LDKKVStore *NONNULL_PTR this_arg, struct LDKStr primary_namespace, struct LDKStr secondary_namespace public static native long KVStore_list(long this_arg, String primary_namespace, String secondary_namespace); + public interface LDKOutputSpender { + long spend_spendable_outputs(long[] descriptors, long[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, long locktime); + } + public static native long LDKOutputSpender_new(LDKOutputSpender impl); + // LDKCResult_TransactionNoneZ OutputSpender_spend_spendable_outputs LDKOutputSpender *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ descriptors, struct LDKCVec_TxOutZ outputs, struct LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight, struct LDKCOption_u32Z locktime + public static native long OutputSpender_spend_spendable_outputs(long this_arg, long[] descriptors, long[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, long locktime); + // struct LDKOutputSweeper CResult_OutputSweeperDecodeErrorZ_get_ok(LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_OutputSweeperDecodeErrorZ_get_ok(long owner); + // struct LDKDecodeError CResult_OutputSweeperDecodeErrorZ_get_err(LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_OutputSweeperDecodeErrorZ_get_err(long owner); + // struct LDKBestBlock C2Tuple_BestBlockOutputSweeperZ_get_a(LDKC2Tuple_BestBlockOutputSweeperZ *NONNULL_PTR owner); + public static native long C2Tuple_BestBlockOutputSweeperZ_get_a(long owner); + // struct LDKOutputSweeper C2Tuple_BestBlockOutputSweeperZ_get_b(LDKC2Tuple_BestBlockOutputSweeperZ *NONNULL_PTR owner); + public static native long C2Tuple_BestBlockOutputSweeperZ_get_b(long owner); + // struct LDKC2Tuple_BestBlockOutputSweeperZ *CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(long owner); + // struct LDKDecodeError CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(long owner); + // struct LDKDelayedPaymentBasepoint CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(long owner); + // struct LDKDecodeError CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(long owner); + // struct LDKDelayedPaymentKey CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(long owner); + // struct LDKDecodeError CResult_DelayedPaymentKeyDecodeErrorZ_get_err(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_DelayedPaymentKeyDecodeErrorZ_get_err(long owner); + // struct LDKHtlcBasepoint CResult_HtlcBasepointDecodeErrorZ_get_ok(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_HtlcBasepointDecodeErrorZ_get_ok(long owner); + // struct LDKDecodeError CResult_HtlcBasepointDecodeErrorZ_get_err(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_HtlcBasepointDecodeErrorZ_get_err(long owner); + // struct LDKHtlcKey CResult_HtlcKeyDecodeErrorZ_get_ok(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_HtlcKeyDecodeErrorZ_get_ok(long owner); + // struct LDKDecodeError CResult_HtlcKeyDecodeErrorZ_get_err(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_HtlcKeyDecodeErrorZ_get_err(long owner); + // struct LDKRevocationBasepoint CResult_RevocationBasepointDecodeErrorZ_get_ok(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_RevocationBasepointDecodeErrorZ_get_ok(long owner); + // struct LDKDecodeError CResult_RevocationBasepointDecodeErrorZ_get_err(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_RevocationBasepointDecodeErrorZ_get_err(long owner); + // struct LDKRevocationKey CResult_RevocationKeyDecodeErrorZ_get_ok(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_RevocationKeyDecodeErrorZ_get_ok(long owner); + // struct LDKDecodeError CResult_RevocationKeyDecodeErrorZ_get_err(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner); + public static native long CResult_RevocationKeyDecodeErrorZ_get_err(long owner); + // struct LDKLockedChannelMonitor CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner); + public static native long CResult_LockedChannelMonitorNoneZ_get_ok(long owner); + // void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner); + public static native void CResult_LockedChannelMonitorNoneZ_get_err(long owner); + // struct LDKOutPoint C2Tuple_OutPointChannelIdZ_get_a(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR owner); + public static native long C2Tuple_OutPointChannelIdZ_get_a(long owner); + // struct LDKChannelId C2Tuple_OutPointChannelIdZ_get_b(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR owner); + public static native long C2Tuple_OutPointChannelIdZ_get_b(long owner); + // struct LDKOutPoint C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner); + public static native long C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(long owner); + // struct LDKCVec_MonitorUpdateIdZ C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner); + public static native long[] C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(long owner); public interface LDKPersister { long persist_manager(long channel_manager); long persist_graph(long network_graph); @@ -2919,20 +3229,17 @@ public class bindings { // LDKCResult_NoneIOErrorZ Persister_persist_scorer LDKPersister *NONNULL_PTR this_arg, const struct LDKWriteableScore *NONNULL_PTR scorer public static native long Persister_persist_scorer(long this_arg, long scorer); public interface LDKPersist { - ChannelMonitorUpdateStatus persist_new_channel(long channel_id, long data, long update_id); - ChannelMonitorUpdateStatus update_persisted_channel(long channel_id, long update, long data, long update_id); + ChannelMonitorUpdateStatus persist_new_channel(long channel_funding_outpoint, long data, long update_id); + ChannelMonitorUpdateStatus update_persisted_channel(long channel_funding_outpoint, long update, long data, long update_id); + void archive_persisted_channel(long channel_funding_outpoint); } public static native long LDKPersist_new(LDKPersist impl); - // LDKChannelMonitorUpdateStatus Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_id, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id - public static native ChannelMonitorUpdateStatus Persist_persist_new_channel(long this_arg, long channel_id, long data, long update_id); - // LDKChannelMonitorUpdateStatus Persist_update_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_id, struct LDKChannelMonitorUpdate update, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id - public static native ChannelMonitorUpdateStatus Persist_update_persisted_channel(long this_arg, long channel_id, long update, long data, long update_id); - public interface LDKFutureCallback { - void call(); - } - public static native long LDKFutureCallback_new(LDKFutureCallback impl); - // void FutureCallback_call LDKFutureCallback *NONNULL_PTR this_arg - public static native void FutureCallback_call(long this_arg); + // LDKChannelMonitorUpdateStatus Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_funding_outpoint, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id + public static native ChannelMonitorUpdateStatus Persist_persist_new_channel(long this_arg, long channel_funding_outpoint, long data, long update_id); + // LDKChannelMonitorUpdateStatus Persist_update_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_funding_outpoint, struct LDKChannelMonitorUpdate update, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id + public static native ChannelMonitorUpdateStatus Persist_update_persisted_channel(long this_arg, long channel_funding_outpoint, long update, long data, long update_id); + // void Persist_archive_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_funding_outpoint + public static native void Persist_archive_persisted_channel(long this_arg, long channel_funding_outpoint); public interface LDKListen { void filtered_block_connected(byte[] header, long[] txdata, int height); void block_connected(byte[] block, int height); @@ -2960,6 +3267,26 @@ public class bindings { public static native void Confirm_best_block_updated(long this_arg, byte[] header, int height); // LDKCVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ Confirm_get_relevant_txids LDKConfirm *NONNULL_PTR this_arg public static native long[] Confirm_get_relevant_txids(long this_arg); + public static class LDKSpendingDelay { + private LDKSpendingDelay() {} + public final static class Relative extends LDKSpendingDelay { + public int num_blocks; + Relative(int num_blocks) { this.num_blocks = num_blocks; } + } + public final static class Absolute extends LDKSpendingDelay { + public int height; + Absolute(int height) { this.height = height; } + } + static native void init(); + } + static { LDKSpendingDelay.init(); } + public static native LDKSpendingDelay LDKSpendingDelay_ref_from_ptr(long ptr); + public interface LDKFutureCallback { + void call(); + } + public static native long LDKFutureCallback_new(LDKFutureCallback impl); + // void FutureCallback_call LDKFutureCallback *NONNULL_PTR this_arg + public static native void FutureCallback_call(long this_arg); public interface LDKEventHandler { void handle_event(long event); } @@ -3008,9 +3335,6 @@ public class bindings { void handle_shutdown(byte[] their_node_id, long msg); void handle_closing_signed(byte[] their_node_id, long msg); void handle_stfu(byte[] their_node_id, long msg); - void handle_splice(byte[] their_node_id, long msg); - void handle_splice_ack(byte[] their_node_id, long msg); - void handle_splice_locked(byte[] their_node_id, long msg); void handle_tx_add_input(byte[] their_node_id, long msg); void handle_tx_add_output(byte[] their_node_id, long msg); void handle_tx_remove_input(byte[] their_node_id, long msg); @@ -3059,12 +3383,6 @@ public class bindings { public static native void ChannelMessageHandler_handle_closing_signed(long this_arg, byte[] their_node_id, long msg); // void ChannelMessageHandler_handle_stfu LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKStfu *NONNULL_PTR msg public static native void ChannelMessageHandler_handle_stfu(long this_arg, byte[] their_node_id, long msg); - // void ChannelMessageHandler_handle_splice LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKSplice *NONNULL_PTR msg - public static native void ChannelMessageHandler_handle_splice(long this_arg, byte[] their_node_id, long msg); - // void ChannelMessageHandler_handle_splice_ack LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKSpliceAck *NONNULL_PTR msg - public static native void ChannelMessageHandler_handle_splice_ack(long this_arg, byte[] their_node_id, long msg); - // void ChannelMessageHandler_handle_splice_locked LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKSpliceLocked *NONNULL_PTR msg - public static native void ChannelMessageHandler_handle_splice_locked(long this_arg, byte[] their_node_id, long msg); // void ChannelMessageHandler_handle_tx_add_input LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKTxAddInput *NONNULL_PTR msg public static native void ChannelMessageHandler_handle_tx_add_input(long this_arg, byte[] their_node_id, long msg); // void ChannelMessageHandler_handle_tx_add_output LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKTxAddOutput *NONNULL_PTR msg @@ -3124,6 +3442,12 @@ public class bindings { public static native long OffersMessageHandler_handle_message(long this_arg, long message); // LDKCVec_C3Tuple_OffersMessageDestinationBlindedPathZZ OffersMessageHandler_release_pending_messages LDKOffersMessageHandler *NONNULL_PTR this_arg public static native long[] OffersMessageHandler_release_pending_messages(long this_arg); + public interface LDKNodeIdLookUp { + byte[] next_node_id(long short_channel_id); + } + public static native long LDKNodeIdLookUp_new(LDKNodeIdLookUp impl); + // LDKPublicKey NodeIdLookUp_next_node_id LDKNodeIdLookUp *NONNULL_PTR this_arg, uint64_t short_channel_id + public static native byte[] NodeIdLookUp_next_node_id(long this_arg, long short_channel_id); public interface LDKRoutingMessageHandler { long handle_node_announcement(long msg); long handle_channel_announcement(long msg); @@ -3241,6 +3565,31 @@ public class bindings { public static native void SocketDescriptor_disconnect_socket(long this_arg); // uint64_t SocketDescriptor_hash LDKSocketDescriptor *NONNULL_PTR this_arg public static native long SocketDescriptor_hash(long this_arg); + public interface LDKSignBolt12InvoiceFn { + long sign_invoice(long message); + } + public static native long LDKSignBolt12InvoiceFn_new(LDKSignBolt12InvoiceFn impl); + // LDKCResult_SchnorrSignatureNoneZ SignBolt12InvoiceFn_sign_invoice LDKSignBolt12InvoiceFn *NONNULL_PTR this_arg, const struct LDKUnsignedBolt12Invoice *NONNULL_PTR message + public static native long SignBolt12InvoiceFn_sign_invoice(long this_arg, long message); + public interface LDKSignInvoiceRequestFn { + long sign_invoice_request(long message); + } + public static native long LDKSignInvoiceRequestFn_new(LDKSignInvoiceRequestFn impl); + // LDKCResult_SchnorrSignatureNoneZ SignInvoiceRequestFn_sign_invoice_request LDKSignInvoiceRequestFn *NONNULL_PTR this_arg, const struct LDKUnsignedInvoiceRequest *NONNULL_PTR message + public static native long SignInvoiceRequestFn_sign_invoice_request(long this_arg, long message); + public static class LDKSignError { + private LDKSignError() {} + public final static class Signing extends LDKSignError { + Signing() { } + } + public final static class Verification extends LDKSignError { + public org.ldk.enums.Secp256k1Error verification; + Verification(org.ldk.enums.Secp256k1Error verification) { this.verification = verification; } + } + static native void init(); + } + static { LDKSignError.init(); } + public static native LDKSignError LDKSignError_ref_from_ptr(long ptr); public static class LDKEffectiveCapacity { private LDKEffectiveCapacity() {} public final static class ExactLiquidity extends LDKEffectiveCapacity { @@ -3296,6 +3645,21 @@ public class bindings { public static native long LDKScore_get_ScoreUpdate(long arg); // LDKCVec_u8Z Score_write LDKScore *NONNULL_PTR this_arg public static native byte[] Score_write(long this_arg); + public static class LDKIntroductionNode { + private LDKIntroductionNode() {} + public final static class NodeId extends LDKIntroductionNode { + public byte[] node_id; + NodeId(byte[] node_id) { this.node_id = node_id; } + } + public final static class DirectedShortChannelId extends LDKIntroductionNode { + public org.ldk.enums.Direction _0; + public long _1; + DirectedShortChannelId(org.ldk.enums.Direction _0, long _1) { this._0 = _0; this._1 = _1; } + } + static native void init(); + } + static { LDKIntroductionNode.init(); } + public static native LDKIntroductionNode LDKIntroductionNode_ref_from_ptr(long ptr); public interface LDKCoinSelectionSource { long select_confirmed_utxos(byte[] claim_id, long[] must_spend, long[] must_pay_to, int target_feerate_sat_per_1000_weight); long sign_psbt(byte[] psbt); @@ -3375,6 +3739,10 @@ public class bindings { public static native void WitnessProgram_free(long o); // struct LDKBigEndianScalar BigEndianScalar_new(struct LDKThirtyTwoBytes big_endian_bytes); public static native long BigEndianScalar_new(byte[] big_endian_bytes); + // uint64_t BigEndianScalar_clone_ptr(LDKBigEndianScalar *NONNULL_PTR arg); + public static native long BigEndianScalar_clone_ptr(long arg); + // struct LDKBigEndianScalar BigEndianScalar_clone(const struct LDKBigEndianScalar *NONNULL_PTR orig); + public static native long BigEndianScalar_clone(long orig); // uint64_t Bech32Error_clone_ptr(LDKBech32Error *NONNULL_PTR arg); public static native long Bech32Error_clone_ptr(long arg); // struct LDKBech32Error Bech32Error_clone(const struct LDKBech32Error *NONNULL_PTR orig); @@ -3413,6 +3781,32 @@ public class bindings { public static native long TxOut_clone(long orig); // void Str_free(struct LDKStr _res); public static native void Str_free(String _res); + // void CVec_u8Z_free(struct LDKCVec_u8Z _res); + public static native void CVec_u8Z_free(byte[] _res); + // struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(struct LDKRefundMaybeWithDerivedMetadataBuilder o); + public static native long CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(long o); + // struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); + public static native long CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(Bolt12SemanticError e); + // bool CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR o); + public static native boolean CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(long o); + // void CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ _res); + public static native void CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(long _res); + // uint64_t CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR arg); + public static native long CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(long arg); + // struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(const struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR orig); + public static native long CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(long orig); + // struct LDKCResult_RefundBolt12SemanticErrorZ CResult_RefundBolt12SemanticErrorZ_ok(struct LDKRefund o); + public static native long CResult_RefundBolt12SemanticErrorZ_ok(long o); + // struct LDKCResult_RefundBolt12SemanticErrorZ CResult_RefundBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); + public static native long CResult_RefundBolt12SemanticErrorZ_err(Bolt12SemanticError e); + // bool CResult_RefundBolt12SemanticErrorZ_is_ok(const struct LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR o); + public static native boolean CResult_RefundBolt12SemanticErrorZ_is_ok(long o); + // void CResult_RefundBolt12SemanticErrorZ_free(struct LDKCResult_RefundBolt12SemanticErrorZ _res); + public static native void CResult_RefundBolt12SemanticErrorZ_free(long _res); + // uint64_t CResult_RefundBolt12SemanticErrorZ_clone_ptr(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR arg); + public static native long CResult_RefundBolt12SemanticErrorZ_clone_ptr(long arg); + // struct LDKCResult_RefundBolt12SemanticErrorZ CResult_RefundBolt12SemanticErrorZ_clone(const struct LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR orig); + public static native long CResult_RefundBolt12SemanticErrorZ_clone(long orig); // struct LDKCOption_u64Z COption_u64Z_some(uint64_t o); public static native long COption_u64Z_some(long o); // struct LDKCOption_u64Z COption_u64Z_none(void); @@ -3475,8 +3869,6 @@ public class bindings { public static native long COption_ThirtyTwoBytesZ_clone_ptr(long arg); // struct LDKCOption_ThirtyTwoBytesZ COption_ThirtyTwoBytesZ_clone(const struct LDKCOption_ThirtyTwoBytesZ *NONNULL_PTR orig); public static native long COption_ThirtyTwoBytesZ_clone(long orig); - // void CVec_u8Z_free(struct LDKCVec_u8Z _res); - public static native void CVec_u8Z_free(byte[] _res); // struct LDKCOption_CVec_u8ZZ COption_CVec_u8ZZ_some(struct LDKCVec_u8Z o); public static native long COption_CVec_u8ZZ_some(byte[] o); // struct LDKCOption_CVec_u8ZZ COption_CVec_u8ZZ_none(void); @@ -3521,6 +3913,42 @@ public class bindings { public static native long CResult_RecipientOnionFieldsNoneZ_clone_ptr(long arg); // struct LDKCResult_RecipientOnionFieldsNoneZ CResult_RecipientOnionFieldsNoneZ_clone(const struct LDKCResult_RecipientOnionFieldsNoneZ *NONNULL_PTR orig); public static native long CResult_RecipientOnionFieldsNoneZ_clone(long orig); + // struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok(struct LDKUnsignedBolt12Invoice o); + public static native long CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok(long o); + // struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); + public static native long CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err(Bolt12SemanticError e); + // bool CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(const struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR o); + public static native boolean CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(long o); + // void CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free(struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ _res); + public static native void CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free(long _res); + // uint64_t CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR arg); + public static native long CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(long arg); + // struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(const struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR orig); + public static native long CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(long orig); + // struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok(struct LDKBolt12Invoice o); + public static native long CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok(long o); + // struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ CResult_Bolt12InvoiceBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); + public static native long CResult_Bolt12InvoiceBolt12SemanticErrorZ_err(Bolt12SemanticError e); + // bool CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(const struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR o); + public static native boolean CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(long o); + // void CResult_Bolt12InvoiceBolt12SemanticErrorZ_free(struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ _res); + public static native void CResult_Bolt12InvoiceBolt12SemanticErrorZ_free(long _res); + // uint64_t CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR arg); + public static native long CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(long arg); + // struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(const struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR orig); + public static native long CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(long orig); + // struct LDKCResult_SchnorrSignatureNoneZ CResult_SchnorrSignatureNoneZ_ok(struct LDKSchnorrSignature o); + public static native long CResult_SchnorrSignatureNoneZ_ok(byte[] o); + // struct LDKCResult_SchnorrSignatureNoneZ CResult_SchnorrSignatureNoneZ_err(void); + public static native long CResult_SchnorrSignatureNoneZ_err(); + // bool CResult_SchnorrSignatureNoneZ_is_ok(const struct LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR o); + public static native boolean CResult_SchnorrSignatureNoneZ_is_ok(long o); + // void CResult_SchnorrSignatureNoneZ_free(struct LDKCResult_SchnorrSignatureNoneZ _res); + public static native void CResult_SchnorrSignatureNoneZ_free(long _res); + // uint64_t CResult_SchnorrSignatureNoneZ_clone_ptr(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR arg); + public static native long CResult_SchnorrSignatureNoneZ_clone_ptr(long arg); + // struct LDKCResult_SchnorrSignatureNoneZ CResult_SchnorrSignatureNoneZ_clone(const struct LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR orig); + public static native long CResult_SchnorrSignatureNoneZ_clone(long orig); // void CVec_ThirtyTwoBytesZ_free(struct LDKCVec_ThirtyTwoBytesZ _res); public static native void CVec_ThirtyTwoBytesZ_free(byte[][] _res); // struct LDKCOption_CVec_ThirtyTwoBytesZZ COption_CVec_ThirtyTwoBytesZZ_some(struct LDKCVec_ThirtyTwoBytesZ o); @@ -3533,6 +3961,26 @@ public class bindings { public static native long COption_CVec_ThirtyTwoBytesZZ_clone_ptr(long arg); // struct LDKCOption_CVec_ThirtyTwoBytesZZ COption_CVec_ThirtyTwoBytesZZ_clone(const struct LDKCOption_CVec_ThirtyTwoBytesZZ *NONNULL_PTR orig); public static native long COption_CVec_ThirtyTwoBytesZZ_clone(long orig); + // struct LDKCOption_AmountZ COption_AmountZ_some(struct LDKAmount o); + public static native long COption_AmountZ_some(long o); + // struct LDKCOption_AmountZ COption_AmountZ_none(void); + public static native long COption_AmountZ_none(); + // void COption_AmountZ_free(struct LDKCOption_AmountZ _res); + public static native void COption_AmountZ_free(long _res); + // uint64_t COption_AmountZ_clone_ptr(LDKCOption_AmountZ *NONNULL_PTR arg); + public static native long COption_AmountZ_clone_ptr(long arg); + // struct LDKCOption_AmountZ COption_AmountZ_clone(const struct LDKCOption_AmountZ *NONNULL_PTR orig); + public static native long COption_AmountZ_clone(long orig); + // struct LDKCOption_QuantityZ COption_QuantityZ_some(struct LDKQuantity o); + public static native long COption_QuantityZ_some(long o); + // struct LDKCOption_QuantityZ COption_QuantityZ_none(void); + public static native long COption_QuantityZ_none(); + // void COption_QuantityZ_free(struct LDKCOption_QuantityZ _res); + public static native void COption_QuantityZ_free(long _res); + // uint64_t COption_QuantityZ_clone_ptr(LDKCOption_QuantityZ *NONNULL_PTR arg); + public static native long COption_QuantityZ_clone_ptr(long arg); + // struct LDKCOption_QuantityZ COption_QuantityZ_clone(const struct LDKCOption_QuantityZ *NONNULL_PTR orig); + public static native long COption_QuantityZ_clone(long orig); // struct LDKCResult_ThirtyTwoBytesNoneZ CResult_ThirtyTwoBytesNoneZ_ok(struct LDKThirtyTwoBytes o); public static native long CResult_ThirtyTwoBytesNoneZ_ok(byte[] o); // struct LDKCResult_ThirtyTwoBytesNoneZ CResult_ThirtyTwoBytesNoneZ_err(void); @@ -3699,18 +4147,6 @@ public class bindings { public static native long CResult_RecoverableSignatureNoneZ_clone_ptr(long arg); // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_clone(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR orig); public static native long CResult_RecoverableSignatureNoneZ_clone(long orig); - // struct LDKCResult_SchnorrSignatureNoneZ CResult_SchnorrSignatureNoneZ_ok(struct LDKSchnorrSignature o); - public static native long CResult_SchnorrSignatureNoneZ_ok(byte[] o); - // struct LDKCResult_SchnorrSignatureNoneZ CResult_SchnorrSignatureNoneZ_err(void); - public static native long CResult_SchnorrSignatureNoneZ_err(); - // bool CResult_SchnorrSignatureNoneZ_is_ok(const struct LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR o); - public static native boolean CResult_SchnorrSignatureNoneZ_is_ok(long o); - // void CResult_SchnorrSignatureNoneZ_free(struct LDKCResult_SchnorrSignatureNoneZ _res); - public static native void CResult_SchnorrSignatureNoneZ_free(long _res); - // uint64_t CResult_SchnorrSignatureNoneZ_clone_ptr(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR arg); - public static native long CResult_SchnorrSignatureNoneZ_clone_ptr(long arg); - // struct LDKCResult_SchnorrSignatureNoneZ CResult_SchnorrSignatureNoneZ_clone(const struct LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR orig); - public static native long CResult_SchnorrSignatureNoneZ_clone(long orig); // struct LDKCResult_ECDSASignatureNoneZ CResult_ECDSASignatureNoneZ_ok(struct LDKECDSASignature o); public static native long CResult_ECDSASignatureNoneZ_ok(byte[] o); // struct LDKCResult_ECDSASignatureNoneZ CResult_ECDSASignatureNoneZ_err(void); @@ -3723,6 +4159,18 @@ public class bindings { public static native long CResult_ECDSASignatureNoneZ_clone_ptr(long arg); // struct LDKCResult_ECDSASignatureNoneZ CResult_ECDSASignatureNoneZ_clone(const struct LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR orig); public static native long CResult_ECDSASignatureNoneZ_clone(long orig); + // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o); + public static native long CResult_TransactionNoneZ_ok(byte[] o); + // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void); + public static native long CResult_TransactionNoneZ_err(); + // bool CResult_TransactionNoneZ_is_ok(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR o); + public static native boolean CResult_TransactionNoneZ_is_ok(long o); + // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res); + public static native void CResult_TransactionNoneZ_free(long _res); + // uint64_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg); + public static native long CResult_TransactionNoneZ_clone_ptr(long arg); + // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_clone(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR orig); + public static native long CResult_TransactionNoneZ_clone(long orig); // struct LDKCResult_WriteableEcdsaChannelSignerDecodeErrorZ CResult_WriteableEcdsaChannelSignerDecodeErrorZ_ok(struct LDKWriteableEcdsaChannelSigner o); public static native long CResult_WriteableEcdsaChannelSignerDecodeErrorZ_ok(long o); // struct LDKCResult_WriteableEcdsaChannelSignerDecodeErrorZ CResult_WriteableEcdsaChannelSignerDecodeErrorZ_err(struct LDKDecodeError e); @@ -3825,18 +4273,6 @@ public class bindings { public static native long CResult_InMemorySignerDecodeErrorZ_clone_ptr(long arg); // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig); public static native long CResult_InMemorySignerDecodeErrorZ_clone(long orig); - // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o); - public static native long CResult_TransactionNoneZ_ok(byte[] o); - // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void); - public static native long CResult_TransactionNoneZ_err(); - // bool CResult_TransactionNoneZ_is_ok(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR o); - public static native boolean CResult_TransactionNoneZ_is_ok(long o); - // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res); - public static native void CResult_TransactionNoneZ_free(long _res); - // uint64_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg); - public static native long CResult_TransactionNoneZ_clone_ptr(long arg); - // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_clone(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR orig); - public static native long CResult_TransactionNoneZ_clone(long orig); // struct LDKCOption_WriteableScoreZ COption_WriteableScoreZ_some(struct LDKWriteableScore o); public static native long COption_WriteableScoreZ_some(long o); // struct LDKCOption_WriteableScoreZ COption_WriteableScoreZ_none(void); @@ -4089,6 +4525,18 @@ public class bindings { public static native boolean CResult_ProbabilisticScorerDecodeErrorZ_is_ok(long o); // void CResult_ProbabilisticScorerDecodeErrorZ_free(struct LDKCResult_ProbabilisticScorerDecodeErrorZ _res); public static native void CResult_ProbabilisticScorerDecodeErrorZ_free(long _res); + // struct LDKCResult_BestBlockDecodeErrorZ CResult_BestBlockDecodeErrorZ_ok(struct LDKBestBlock o); + public static native long CResult_BestBlockDecodeErrorZ_ok(long o); + // struct LDKCResult_BestBlockDecodeErrorZ CResult_BestBlockDecodeErrorZ_err(struct LDKDecodeError e); + public static native long CResult_BestBlockDecodeErrorZ_err(long e); + // bool CResult_BestBlockDecodeErrorZ_is_ok(const struct LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR o); + public static native boolean CResult_BestBlockDecodeErrorZ_is_ok(long o); + // void CResult_BestBlockDecodeErrorZ_free(struct LDKCResult_BestBlockDecodeErrorZ _res); + public static native void CResult_BestBlockDecodeErrorZ_free(long _res); + // uint64_t CResult_BestBlockDecodeErrorZ_clone_ptr(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR arg); + public static native long CResult_BestBlockDecodeErrorZ_clone_ptr(long arg); + // struct LDKCResult_BestBlockDecodeErrorZ CResult_BestBlockDecodeErrorZ_clone(const struct LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR orig); + public static native long CResult_BestBlockDecodeErrorZ_clone(long orig); // uint64_t C2Tuple_usizeTransactionZ_clone_ptr(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR arg); public static native long C2Tuple_usizeTransactionZ_clone_ptr(long arg); // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_clone(const struct LDKC2Tuple_usizeTransactionZ *NONNULL_PTR orig); @@ -4123,16 +4571,16 @@ public class bindings { public static native long CResult_ChannelMonitorUpdateStatusNoneZ_clone(long orig); // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res); public static native void CVec_MonitorEventZ_free(long[] _res); - // uint64_t C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR arg); - public static native long C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(long arg); - // struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(const struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR orig); - public static native long C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(long orig); - // struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(struct LDKOutPoint a, struct LDKCVec_MonitorEventZ b, struct LDKPublicKey c); - public static native long C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(long a, long[] b, byte[] c); - // void C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ _res); - public static native void C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(long _res); - // void CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free(struct LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ _res); - public static native void CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free(long[] _res); + // uint64_t C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR arg); + public static native long C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(long arg); + // struct LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(const struct LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR orig); + public static native long C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(long orig); + // struct LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new(struct LDKOutPoint a, struct LDKChannelId b, struct LDKCVec_MonitorEventZ c, struct LDKPublicKey d); + public static native long C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new(long a, long b, long[] c, byte[] d); + // void C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free(struct LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ _res); + public static native void C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free(long _res); + // void CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free(struct LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ _res); + public static native void CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free(long[] _res); // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o); public static native long CResult_InitFeaturesDecodeErrorZ_ok(long o); // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e); @@ -4217,6 +4665,58 @@ public class bindings { public static native long CResult_ChannelTypeFeaturesDecodeErrorZ_clone_ptr(long arg); // struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ CResult_ChannelTypeFeaturesDecodeErrorZ_clone(const struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR orig); public static native long CResult_ChannelTypeFeaturesDecodeErrorZ_clone(long orig); + // struct LDKCResult_OfferIdDecodeErrorZ CResult_OfferIdDecodeErrorZ_ok(struct LDKOfferId o); + public static native long CResult_OfferIdDecodeErrorZ_ok(long o); + // struct LDKCResult_OfferIdDecodeErrorZ CResult_OfferIdDecodeErrorZ_err(struct LDKDecodeError e); + public static native long CResult_OfferIdDecodeErrorZ_err(long e); + // bool CResult_OfferIdDecodeErrorZ_is_ok(const struct LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR o); + public static native boolean CResult_OfferIdDecodeErrorZ_is_ok(long o); + // void CResult_OfferIdDecodeErrorZ_free(struct LDKCResult_OfferIdDecodeErrorZ _res); + public static native void CResult_OfferIdDecodeErrorZ_free(long _res); + // uint64_t CResult_OfferIdDecodeErrorZ_clone_ptr(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR arg); + public static native long CResult_OfferIdDecodeErrorZ_clone_ptr(long arg); + // struct LDKCResult_OfferIdDecodeErrorZ CResult_OfferIdDecodeErrorZ_clone(const struct LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR orig); + public static native long CResult_OfferIdDecodeErrorZ_clone(long orig); + // struct LDKCResult_NoneBolt12SemanticErrorZ CResult_NoneBolt12SemanticErrorZ_ok(void); + public static native long CResult_NoneBolt12SemanticErrorZ_ok(); + // struct LDKCResult_NoneBolt12SemanticErrorZ CResult_NoneBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); + public static native long CResult_NoneBolt12SemanticErrorZ_err(Bolt12SemanticError e); + // bool CResult_NoneBolt12SemanticErrorZ_is_ok(const struct LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR o); + public static native boolean CResult_NoneBolt12SemanticErrorZ_is_ok(long o); + // void CResult_NoneBolt12SemanticErrorZ_free(struct LDKCResult_NoneBolt12SemanticErrorZ _res); + public static native void CResult_NoneBolt12SemanticErrorZ_free(long _res); + // uint64_t CResult_NoneBolt12SemanticErrorZ_clone_ptr(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR arg); + public static native long CResult_NoneBolt12SemanticErrorZ_clone_ptr(long arg); + // struct LDKCResult_NoneBolt12SemanticErrorZ CResult_NoneBolt12SemanticErrorZ_clone(const struct LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR orig); + public static native long CResult_NoneBolt12SemanticErrorZ_clone(long orig); + // struct LDKCResult_OfferBolt12SemanticErrorZ CResult_OfferBolt12SemanticErrorZ_ok(struct LDKOffer o); + public static native long CResult_OfferBolt12SemanticErrorZ_ok(long o); + // struct LDKCResult_OfferBolt12SemanticErrorZ CResult_OfferBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); + public static native long CResult_OfferBolt12SemanticErrorZ_err(Bolt12SemanticError e); + // bool CResult_OfferBolt12SemanticErrorZ_is_ok(const struct LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR o); + public static native boolean CResult_OfferBolt12SemanticErrorZ_is_ok(long o); + // void CResult_OfferBolt12SemanticErrorZ_free(struct LDKCResult_OfferBolt12SemanticErrorZ _res); + public static native void CResult_OfferBolt12SemanticErrorZ_free(long _res); + // uint64_t CResult_OfferBolt12SemanticErrorZ_clone_ptr(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR arg); + public static native long CResult_OfferBolt12SemanticErrorZ_clone_ptr(long arg); + // struct LDKCResult_OfferBolt12SemanticErrorZ CResult_OfferBolt12SemanticErrorZ_clone(const struct LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR orig); + public static native long CResult_OfferBolt12SemanticErrorZ_clone(long orig); + // struct LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(struct LDKInvoiceRequestWithDerivedPayerIdBuilder o); + public static native long CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(long o); + // struct LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); + public static native long CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(Bolt12SemanticError e); + // bool CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR o); + public static native boolean CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(long o); + // void CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(struct LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ _res); + public static native void CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(long _res); + // struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok(struct LDKInvoiceRequestWithExplicitPayerIdBuilder o); + public static native long CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok(long o); + // struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); + public static native long CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(Bolt12SemanticError e); + // bool CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR o); + public static native boolean CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(long o); + // void CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ _res); + public static native void CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(long _res); // struct LDKCResult_OfferBolt12ParseErrorZ CResult_OfferBolt12ParseErrorZ_ok(struct LDKOffer o); public static native long CResult_OfferBolt12ParseErrorZ_ok(long o); // struct LDKCResult_OfferBolt12ParseErrorZ CResult_OfferBolt12ParseErrorZ_err(struct LDKBolt12ParseError e); @@ -4229,18 +4729,6 @@ public class bindings { public static native long CResult_OfferBolt12ParseErrorZ_clone_ptr(long arg); // struct LDKCResult_OfferBolt12ParseErrorZ CResult_OfferBolt12ParseErrorZ_clone(const struct LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR orig); public static native long CResult_OfferBolt12ParseErrorZ_clone(long orig); - // struct LDKCResult_PublicKeySecp256k1ErrorZ CResult_PublicKeySecp256k1ErrorZ_ok(struct LDKPublicKey o); - public static native long CResult_PublicKeySecp256k1ErrorZ_ok(byte[] o); - // struct LDKCResult_PublicKeySecp256k1ErrorZ CResult_PublicKeySecp256k1ErrorZ_err(enum LDKSecp256k1Error e); - public static native long CResult_PublicKeySecp256k1ErrorZ_err(Secp256k1Error e); - // bool CResult_PublicKeySecp256k1ErrorZ_is_ok(const struct LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR o); - public static native boolean CResult_PublicKeySecp256k1ErrorZ_is_ok(long o); - // void CResult_PublicKeySecp256k1ErrorZ_free(struct LDKCResult_PublicKeySecp256k1ErrorZ _res); - public static native void CResult_PublicKeySecp256k1ErrorZ_free(long _res); - // uint64_t CResult_PublicKeySecp256k1ErrorZ_clone_ptr(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR arg); - public static native long CResult_PublicKeySecp256k1ErrorZ_clone_ptr(long arg); - // struct LDKCResult_PublicKeySecp256k1ErrorZ CResult_PublicKeySecp256k1ErrorZ_clone(const struct LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR orig); - public static native long CResult_PublicKeySecp256k1ErrorZ_clone(long orig); // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_ok(struct LDKNodeId o); public static native long CResult_NodeIdDecodeErrorZ_ok(long o); // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_err(struct LDKDecodeError e); @@ -4253,6 +4741,18 @@ public class bindings { public static native long CResult_NodeIdDecodeErrorZ_clone_ptr(long arg); // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_clone(const struct LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR orig); public static native long CResult_NodeIdDecodeErrorZ_clone(long orig); + // struct LDKCResult_PublicKeySecp256k1ErrorZ CResult_PublicKeySecp256k1ErrorZ_ok(struct LDKPublicKey o); + public static native long CResult_PublicKeySecp256k1ErrorZ_ok(byte[] o); + // struct LDKCResult_PublicKeySecp256k1ErrorZ CResult_PublicKeySecp256k1ErrorZ_err(enum LDKSecp256k1Error e); + public static native long CResult_PublicKeySecp256k1ErrorZ_err(Secp256k1Error e); + // bool CResult_PublicKeySecp256k1ErrorZ_is_ok(const struct LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR o); + public static native boolean CResult_PublicKeySecp256k1ErrorZ_is_ok(long o); + // void CResult_PublicKeySecp256k1ErrorZ_free(struct LDKCResult_PublicKeySecp256k1ErrorZ _res); + public static native void CResult_PublicKeySecp256k1ErrorZ_free(long _res); + // uint64_t CResult_PublicKeySecp256k1ErrorZ_clone_ptr(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR arg); + public static native long CResult_PublicKeySecp256k1ErrorZ_clone_ptr(long arg); + // struct LDKCResult_PublicKeySecp256k1ErrorZ CResult_PublicKeySecp256k1ErrorZ_clone(const struct LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR orig); + public static native long CResult_PublicKeySecp256k1ErrorZ_clone(long orig); // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_some(struct LDKNetworkUpdate o); public static native long COption_NetworkUpdateZ_some(long o); // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_none(void); @@ -4417,6 +4917,14 @@ public class bindings { public static native long COption_CVec_SocketAddressZZ_clone_ptr(long arg); // struct LDKCOption_CVec_SocketAddressZZ COption_CVec_SocketAddressZZ_clone(const struct LDKCOption_CVec_SocketAddressZZ *NONNULL_PTR orig); public static native long COption_CVec_SocketAddressZZ_clone(long orig); + // struct LDKCResult_u64ShortChannelIdErrorZ CResult_u64ShortChannelIdErrorZ_ok(uint64_t o); + public static native long CResult_u64ShortChannelIdErrorZ_ok(long o); + // struct LDKCResult_u64ShortChannelIdErrorZ CResult_u64ShortChannelIdErrorZ_err(enum LDKShortChannelIdError e); + public static native long CResult_u64ShortChannelIdErrorZ_err(ShortChannelIdError e); + // bool CResult_u64ShortChannelIdErrorZ_is_ok(const struct LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR o); + public static native boolean CResult_u64ShortChannelIdErrorZ_is_ok(long o); + // void CResult_u64ShortChannelIdErrorZ_free(struct LDKCResult_u64ShortChannelIdErrorZ _res); + public static native void CResult_u64ShortChannelIdErrorZ_free(long _res); // struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ CResult_PendingHTLCInfoInboundHTLCErrZ_ok(struct LDKPendingHTLCInfo o); public static native long CResult_PendingHTLCInfoInboundHTLCErrZ_ok(long o); // struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ CResult_PendingHTLCInfoInboundHTLCErrZ_err(struct LDKInboundHTLCErr e); @@ -4425,6 +4933,10 @@ public class bindings { public static native boolean CResult_PendingHTLCInfoInboundHTLCErrZ_is_ok(long o); // void CResult_PendingHTLCInfoInboundHTLCErrZ_free(struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ _res); public static native void CResult_PendingHTLCInfoInboundHTLCErrZ_free(long _res); + // uint64_t CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR arg); + public static native long CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(long arg); + // struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ CResult_PendingHTLCInfoInboundHTLCErrZ_clone(const struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR orig); + public static native long CResult_PendingHTLCInfoInboundHTLCErrZ_clone(long orig); // void CVec_HTLCOutputInCommitmentZ_free(struct LDKCVec_HTLCOutputInCommitmentZ _res); public static native void CVec_HTLCOutputInCommitmentZ_free(long[] _res); // void CVec_HTLCDescriptorZ_free(struct LDKCVec_HTLCDescriptorZ _res); @@ -4467,6 +4979,16 @@ public class bindings { public static native long CResult_CVec_UtxoZNoneZ_clone_ptr(long arg); // struct LDKCResult_CVec_UtxoZNoneZ CResult_CVec_UtxoZNoneZ_clone(const struct LDKCResult_CVec_UtxoZNoneZ *NONNULL_PTR orig); public static native long CResult_CVec_UtxoZNoneZ_clone(long orig); + // struct LDKCOption_PaymentContextZ COption_PaymentContextZ_some(struct LDKPaymentContext o); + public static native long COption_PaymentContextZ_some(long o); + // struct LDKCOption_PaymentContextZ COption_PaymentContextZ_none(void); + public static native long COption_PaymentContextZ_none(); + // void COption_PaymentContextZ_free(struct LDKCOption_PaymentContextZ _res); + public static native void COption_PaymentContextZ_free(long _res); + // uint64_t COption_PaymentContextZ_clone_ptr(LDKCOption_PaymentContextZ *NONNULL_PTR arg); + public static native long COption_PaymentContextZ_clone_ptr(long arg); + // struct LDKCOption_PaymentContextZ COption_PaymentContextZ_clone(const struct LDKCOption_PaymentContextZ *NONNULL_PTR orig); + public static native long COption_PaymentContextZ_clone(long orig); // uint64_t C2Tuple_u64u16Z_clone_ptr(LDKC2Tuple_u64u16Z *NONNULL_PTR arg); public static native long C2Tuple_u64u16Z_clone_ptr(long arg); // struct LDKC2Tuple_u64u16Z C2Tuple_u64u16Z_clone(const struct LDKC2Tuple_u64u16Z *NONNULL_PTR orig); @@ -4495,18 +5017,18 @@ public class bindings { public static native long COption_ChannelShutdownStateZ_clone_ptr(long arg); // struct LDKCOption_ChannelShutdownStateZ COption_ChannelShutdownStateZ_clone(const struct LDKCOption_ChannelShutdownStateZ *NONNULL_PTR orig); public static native long COption_ChannelShutdownStateZ_clone(long orig); - // struct LDKCResult_ThirtyTwoBytesAPIErrorZ CResult_ThirtyTwoBytesAPIErrorZ_ok(struct LDKThirtyTwoBytes o); - public static native long CResult_ThirtyTwoBytesAPIErrorZ_ok(byte[] o); - // struct LDKCResult_ThirtyTwoBytesAPIErrorZ CResult_ThirtyTwoBytesAPIErrorZ_err(struct LDKAPIError e); - public static native long CResult_ThirtyTwoBytesAPIErrorZ_err(long e); - // bool CResult_ThirtyTwoBytesAPIErrorZ_is_ok(const struct LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR o); - public static native boolean CResult_ThirtyTwoBytesAPIErrorZ_is_ok(long o); - // void CResult_ThirtyTwoBytesAPIErrorZ_free(struct LDKCResult_ThirtyTwoBytesAPIErrorZ _res); - public static native void CResult_ThirtyTwoBytesAPIErrorZ_free(long _res); - // uint64_t CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR arg); - public static native long CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(long arg); - // struct LDKCResult_ThirtyTwoBytesAPIErrorZ CResult_ThirtyTwoBytesAPIErrorZ_clone(const struct LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR orig); - public static native long CResult_ThirtyTwoBytesAPIErrorZ_clone(long orig); + // struct LDKCResult_ChannelIdAPIErrorZ CResult_ChannelIdAPIErrorZ_ok(struct LDKChannelId o); + public static native long CResult_ChannelIdAPIErrorZ_ok(long o); + // struct LDKCResult_ChannelIdAPIErrorZ CResult_ChannelIdAPIErrorZ_err(struct LDKAPIError e); + public static native long CResult_ChannelIdAPIErrorZ_err(long e); + // bool CResult_ChannelIdAPIErrorZ_is_ok(const struct LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR o); + public static native boolean CResult_ChannelIdAPIErrorZ_is_ok(long o); + // void CResult_ChannelIdAPIErrorZ_free(struct LDKCResult_ChannelIdAPIErrorZ _res); + public static native void CResult_ChannelIdAPIErrorZ_free(long _res); + // uint64_t CResult_ChannelIdAPIErrorZ_clone_ptr(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR arg); + public static native long CResult_ChannelIdAPIErrorZ_clone_ptr(long arg); + // struct LDKCResult_ChannelIdAPIErrorZ CResult_ChannelIdAPIErrorZ_clone(const struct LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR orig); + public static native long CResult_ChannelIdAPIErrorZ_clone(long orig); // void CVec_RecentPaymentDetailsZ_free(struct LDKCVec_RecentPaymentDetailsZ _res); public static native void CVec_RecentPaymentDetailsZ_free(long[] _res); // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void); @@ -4591,16 +5113,30 @@ public class bindings { public static native long CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_clone_ptr(long arg); // struct LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_clone(const struct LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ *NONNULL_PTR orig); public static native long CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_clone(long orig); - // uint64_t C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR arg); - public static native long C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(long arg); - // struct LDKC2Tuple_ThirtyTwoBytesPublicKeyZ C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(const struct LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR orig); - public static native long C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(long orig); - // struct LDKC2Tuple_ThirtyTwoBytesPublicKeyZ C2Tuple_ThirtyTwoBytesPublicKeyZ_new(struct LDKThirtyTwoBytes a, struct LDKPublicKey b); - public static native long C2Tuple_ThirtyTwoBytesPublicKeyZ_new(byte[] a, byte[] b); - // void C2Tuple_ThirtyTwoBytesPublicKeyZ_free(struct LDKC2Tuple_ThirtyTwoBytesPublicKeyZ _res); - public static native void C2Tuple_ThirtyTwoBytesPublicKeyZ_free(long _res); - // void CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_free(struct LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ _res); - public static native void CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_free(long[] _res); + // uint64_t C2Tuple_ChannelIdPublicKeyZ_clone_ptr(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR arg); + public static native long C2Tuple_ChannelIdPublicKeyZ_clone_ptr(long arg); + // struct LDKC2Tuple_ChannelIdPublicKeyZ C2Tuple_ChannelIdPublicKeyZ_clone(const struct LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR orig); + public static native long C2Tuple_ChannelIdPublicKeyZ_clone(long orig); + // struct LDKC2Tuple_ChannelIdPublicKeyZ C2Tuple_ChannelIdPublicKeyZ_new(struct LDKChannelId a, struct LDKPublicKey b); + public static native long C2Tuple_ChannelIdPublicKeyZ_new(long a, byte[] b); + // void C2Tuple_ChannelIdPublicKeyZ_free(struct LDKC2Tuple_ChannelIdPublicKeyZ _res); + public static native void C2Tuple_ChannelIdPublicKeyZ_free(long _res); + // void CVec_C2Tuple_ChannelIdPublicKeyZZ_free(struct LDKCVec_C2Tuple_ChannelIdPublicKeyZZ _res); + public static native void CVec_C2Tuple_ChannelIdPublicKeyZZ_free(long[] _res); + // void CVec_ChannelIdZ_free(struct LDKCVec_ChannelIdZ _res); + public static native void CVec_ChannelIdZ_free(long[] _res); + // struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(struct LDKOfferWithDerivedMetadataBuilder o); + public static native long CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(long o); + // struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); + public static native long CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(Bolt12SemanticError e); + // bool CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR o); + public static native boolean CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(long o); + // void CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ _res); + public static native void CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(long _res); + // uint64_t CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR arg); + public static native long CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(long arg); + // struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(const struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR orig); + public static native long CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(long orig); // struct LDKCOption_StrZ COption_StrZ_some(struct LDKStr o); public static native long COption_StrZ_some(String o); // struct LDKCOption_StrZ COption_StrZ_none(void); @@ -4611,18 +5147,6 @@ public class bindings { public static native long COption_StrZ_clone_ptr(long arg); // struct LDKCOption_StrZ COption_StrZ_clone(const struct LDKCOption_StrZ *NONNULL_PTR orig); public static native long COption_StrZ_clone(long orig); - // struct LDKCResult_NoneBolt12SemanticErrorZ CResult_NoneBolt12SemanticErrorZ_ok(void); - public static native long CResult_NoneBolt12SemanticErrorZ_ok(); - // struct LDKCResult_NoneBolt12SemanticErrorZ CResult_NoneBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); - public static native long CResult_NoneBolt12SemanticErrorZ_err(Bolt12SemanticError e); - // bool CResult_NoneBolt12SemanticErrorZ_is_ok(const struct LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR o); - public static native boolean CResult_NoneBolt12SemanticErrorZ_is_ok(long o); - // void CResult_NoneBolt12SemanticErrorZ_free(struct LDKCResult_NoneBolt12SemanticErrorZ _res); - public static native void CResult_NoneBolt12SemanticErrorZ_free(long _res); - // uint64_t CResult_NoneBolt12SemanticErrorZ_clone_ptr(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR arg); - public static native long CResult_NoneBolt12SemanticErrorZ_clone_ptr(long arg); - // struct LDKCResult_NoneBolt12SemanticErrorZ CResult_NoneBolt12SemanticErrorZ_clone(const struct LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR orig); - public static native long CResult_NoneBolt12SemanticErrorZ_clone(long orig); // struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok(struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ o); public static native long CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok(long o); // struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_err(void); @@ -4635,6 +5159,18 @@ public class bindings { public static native long CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_clone_ptr(long arg); // struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_clone(const struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ *NONNULL_PTR orig); public static native long CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_clone(long orig); + // struct LDKCResult_ThirtyTwoBytesAPIErrorZ CResult_ThirtyTwoBytesAPIErrorZ_ok(struct LDKThirtyTwoBytes o); + public static native long CResult_ThirtyTwoBytesAPIErrorZ_ok(byte[] o); + // struct LDKCResult_ThirtyTwoBytesAPIErrorZ CResult_ThirtyTwoBytesAPIErrorZ_err(struct LDKAPIError e); + public static native long CResult_ThirtyTwoBytesAPIErrorZ_err(long e); + // bool CResult_ThirtyTwoBytesAPIErrorZ_is_ok(const struct LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR o); + public static native boolean CResult_ThirtyTwoBytesAPIErrorZ_is_ok(long o); + // void CResult_ThirtyTwoBytesAPIErrorZ_free(struct LDKCResult_ThirtyTwoBytesAPIErrorZ _res); + public static native void CResult_ThirtyTwoBytesAPIErrorZ_free(long _res); + // uint64_t CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR arg); + public static native long CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(long arg); + // struct LDKCResult_ThirtyTwoBytesAPIErrorZ CResult_ThirtyTwoBytesAPIErrorZ_clone(const struct LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR orig); + public static native long CResult_ThirtyTwoBytesAPIErrorZ_clone(long orig); // struct LDKCOption_OffersMessageZ COption_OffersMessageZ_some(struct LDKOffersMessage o); public static native long COption_OffersMessageZ_some(long o); // struct LDKCOption_OffersMessageZ COption_OffersMessageZ_none(void); @@ -4909,8 +5445,6 @@ public class bindings { public static native void CVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZZ_free(long[] _res); // void CVec_CommitmentTransactionZ_free(struct LDKCVec_CommitmentTransactionZ _res); public static native void CVec_CommitmentTransactionZ_free(long[] _res); - // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res); - public static native void CVec_TransactionZ_free(byte[][] _res); // uint64_t C2Tuple_u32TxOutZ_clone_ptr(LDKC2Tuple_u32TxOutZ *NONNULL_PTR arg); public static native long C2Tuple_u32TxOutZ_clone_ptr(long arg); // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig); @@ -5037,16 +5571,8 @@ public class bindings { public static native long COption_SocketAddressZ_clone_ptr(long arg); // struct LDKCOption_SocketAddressZ COption_SocketAddressZ_clone(const struct LDKCOption_SocketAddressZ *NONNULL_PTR orig); public static native long COption_SocketAddressZ_clone(long orig); - // uint64_t C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR arg); - public static native long C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(long arg); - // struct LDKC2Tuple_PublicKeyCOption_SocketAddressZZ C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(const struct LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR orig); - public static native long C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(long orig); - // struct LDKC2Tuple_PublicKeyCOption_SocketAddressZZ C2Tuple_PublicKeyCOption_SocketAddressZZ_new(struct LDKPublicKey a, struct LDKCOption_SocketAddressZ b); - public static native long C2Tuple_PublicKeyCOption_SocketAddressZZ_new(byte[] a, long b); - // void C2Tuple_PublicKeyCOption_SocketAddressZZ_free(struct LDKC2Tuple_PublicKeyCOption_SocketAddressZZ _res); - public static native void C2Tuple_PublicKeyCOption_SocketAddressZZ_free(long _res); - // void CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_free(struct LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ _res); - public static native void CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_free(long[] _res); + // void CVec_PeerDetailsZ_free(struct LDKCVec_PeerDetailsZ _res); + public static native void CVec_PeerDetailsZ_free(long[] _res); // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o); public static native long CResult_CVec_u8ZPeerHandleErrorZ_ok(byte[] o); // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e); @@ -5143,6 +5669,30 @@ public class bindings { public static native long CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_clone_ptr(long arg); // struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_clone(const struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ *NONNULL_PTR orig); public static native long CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_clone(long orig); + // struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(struct LDKUnsignedInvoiceRequest o); + public static native long CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(long o); + // struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); + public static native long CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(Bolt12SemanticError e); + // bool CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(const struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR o); + public static native boolean CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(long o); + // void CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ _res); + public static native void CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(long _res); + // uint64_t CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR arg); + public static native long CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(long arg); + // struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(const struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR orig); + public static native long CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(long orig); + // struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ CResult_InvoiceRequestBolt12SemanticErrorZ_ok(struct LDKInvoiceRequest o); + public static native long CResult_InvoiceRequestBolt12SemanticErrorZ_ok(long o); + // struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ CResult_InvoiceRequestBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); + public static native long CResult_InvoiceRequestBolt12SemanticErrorZ_err(Bolt12SemanticError e); + // bool CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(const struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR o); + public static native boolean CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(long o); + // void CResult_InvoiceRequestBolt12SemanticErrorZ_free(struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ _res); + public static native void CResult_InvoiceRequestBolt12SemanticErrorZ_free(long _res); + // uint64_t CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR arg); + public static native long CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(long arg); + // struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ CResult_InvoiceRequestBolt12SemanticErrorZ_clone(const struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR orig); + public static native long CResult_InvoiceRequestBolt12SemanticErrorZ_clone(long orig); // struct LDKCOption_SecretKeyZ COption_SecretKeyZ_some(struct LDKSecretKey o); public static native long COption_SecretKeyZ_some(byte[] o); // struct LDKCOption_SecretKeyZ COption_SecretKeyZ_none(void); @@ -5153,6 +5703,14 @@ public class bindings { public static native long COption_SecretKeyZ_clone_ptr(long arg); // struct LDKCOption_SecretKeyZ COption_SecretKeyZ_clone(const struct LDKCOption_SecretKeyZ *NONNULL_PTR orig); public static native long COption_SecretKeyZ_clone(long orig); + // struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok(struct LDKInvoiceWithExplicitSigningPubkeyBuilder o); + public static native long CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok(long o); + // struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); + public static native long CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err(Bolt12SemanticError e); + // bool CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR o); + public static native boolean CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(long o); + // void CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free(struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ _res); + public static native void CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free(long _res); // struct LDKCResult_VerifiedInvoiceRequestNoneZ CResult_VerifiedInvoiceRequestNoneZ_ok(struct LDKVerifiedInvoiceRequest o); public static native long CResult_VerifiedInvoiceRequestNoneZ_ok(long o); // struct LDKCResult_VerifiedInvoiceRequestNoneZ CResult_VerifiedInvoiceRequestNoneZ_err(void); @@ -5165,6 +5723,26 @@ public class bindings { public static native long CResult_VerifiedInvoiceRequestNoneZ_clone_ptr(long arg); // struct LDKCResult_VerifiedInvoiceRequestNoneZ CResult_VerifiedInvoiceRequestNoneZ_clone(const struct LDKCResult_VerifiedInvoiceRequestNoneZ *NONNULL_PTR orig); public static native long CResult_VerifiedInvoiceRequestNoneZ_clone(long orig); + // struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok(struct LDKInvoiceWithDerivedSigningPubkeyBuilder o); + public static native long CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok(long o); + // struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); + public static native long CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err(Bolt12SemanticError e); + // bool CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR o); + public static native boolean CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(long o); + // void CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ _res); + public static native void CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(long _res); + // struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ CResult_InvoiceRequestFieldsDecodeErrorZ_ok(struct LDKInvoiceRequestFields o); + public static native long CResult_InvoiceRequestFieldsDecodeErrorZ_ok(long o); + // struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ CResult_InvoiceRequestFieldsDecodeErrorZ_err(struct LDKDecodeError e); + public static native long CResult_InvoiceRequestFieldsDecodeErrorZ_err(long e); + // bool CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(const struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR o); + public static native boolean CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(long o); + // void CResult_InvoiceRequestFieldsDecodeErrorZ_free(struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ _res); + public static native void CResult_InvoiceRequestFieldsDecodeErrorZ_free(long _res); + // uint64_t CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR arg); + public static native long CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(long arg); + // struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ CResult_InvoiceRequestFieldsDecodeErrorZ_clone(const struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR orig); + public static native long CResult_InvoiceRequestFieldsDecodeErrorZ_clone(long orig); // enum LDKCOption_NoneZ COption_NoneZ_some(void); public static native COption_NoneZ COption_NoneZ_some(); // enum LDKCOption_NoneZ COption_NoneZ_none(void); @@ -5173,6 +5751,16 @@ public class bindings { public static native void COption_NoneZ_free(COption_NoneZ _res); // void CVec_WitnessZ_free(struct LDKCVec_WitnessZ _res); public static native void CVec_WitnessZ_free(byte[][] _res); + // struct LDKCOption_ECDSASignatureZ COption_ECDSASignatureZ_some(struct LDKECDSASignature o); + public static native long COption_ECDSASignatureZ_some(byte[] o); + // struct LDKCOption_ECDSASignatureZ COption_ECDSASignatureZ_none(void); + public static native long COption_ECDSASignatureZ_none(); + // void COption_ECDSASignatureZ_free(struct LDKCOption_ECDSASignatureZ _res); + public static native void COption_ECDSASignatureZ_free(long _res); + // uint64_t COption_ECDSASignatureZ_clone_ptr(LDKCOption_ECDSASignatureZ *NONNULL_PTR arg); + public static native long COption_ECDSASignatureZ_clone_ptr(long arg); + // struct LDKCOption_ECDSASignatureZ COption_ECDSASignatureZ_clone(const struct LDKCOption_ECDSASignatureZ *NONNULL_PTR orig); + public static native long COption_ECDSASignatureZ_clone(long orig); // struct LDKCOption_i64Z COption_i64Z_some(int64_t o); public static native long COption_i64Z_some(long o); // struct LDKCOption_i64Z COption_i64Z_none(void); @@ -6031,6 +6619,8 @@ public class bindings { public static native long CResult_ShutdownScriptInvalidShutdownScriptZ_clone_ptr(long arg); // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_clone(const struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR orig); public static native long CResult_ShutdownScriptInvalidShutdownScriptZ_clone(long orig); + // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res); + public static native void CVec_TransactionZ_free(byte[][] _res); // struct LDKCResult_PaymentPurposeDecodeErrorZ CResult_PaymentPurposeDecodeErrorZ_ok(struct LDKPaymentPurpose o); public static native long CResult_PaymentPurposeDecodeErrorZ_ok(long o); // struct LDKCResult_PaymentPurposeDecodeErrorZ CResult_PaymentPurposeDecodeErrorZ_err(struct LDKDecodeError e); @@ -6367,6 +6957,18 @@ public class bindings { public static native long CResult_UntrustedStringDecodeErrorZ_clone_ptr(long arg); // struct LDKCResult_UntrustedStringDecodeErrorZ CResult_UntrustedStringDecodeErrorZ_clone(const struct LDKCResult_UntrustedStringDecodeErrorZ *NONNULL_PTR orig); public static native long CResult_UntrustedStringDecodeErrorZ_clone(long orig); + // struct LDKCResult_ChannelIdDecodeErrorZ CResult_ChannelIdDecodeErrorZ_ok(struct LDKChannelId o); + public static native long CResult_ChannelIdDecodeErrorZ_ok(long o); + // struct LDKCResult_ChannelIdDecodeErrorZ CResult_ChannelIdDecodeErrorZ_err(struct LDKDecodeError e); + public static native long CResult_ChannelIdDecodeErrorZ_err(long e); + // bool CResult_ChannelIdDecodeErrorZ_is_ok(const struct LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR o); + public static native boolean CResult_ChannelIdDecodeErrorZ_is_ok(long o); + // void CResult_ChannelIdDecodeErrorZ_free(struct LDKCResult_ChannelIdDecodeErrorZ _res); + public static native void CResult_ChannelIdDecodeErrorZ_free(long _res); + // uint64_t CResult_ChannelIdDecodeErrorZ_clone_ptr(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR arg); + public static native long CResult_ChannelIdDecodeErrorZ_clone_ptr(long arg); + // struct LDKCResult_ChannelIdDecodeErrorZ CResult_ChannelIdDecodeErrorZ_clone(const struct LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR orig); + public static native long CResult_ChannelIdDecodeErrorZ_clone(long orig); // uint64_t C2Tuple__u832u16Z_clone_ptr(LDKC2Tuple__u832u16Z *NONNULL_PTR arg); public static native long C2Tuple__u832u16Z_clone_ptr(long arg); // struct LDKC2Tuple__u832u16Z C2Tuple__u832u16Z_clone(const struct LDKC2Tuple__u832u16Z *NONNULL_PTR orig); @@ -6399,6 +7001,66 @@ public class bindings { public static native long CResult_PaymentConstraintsDecodeErrorZ_clone_ptr(long arg); // struct LDKCResult_PaymentConstraintsDecodeErrorZ CResult_PaymentConstraintsDecodeErrorZ_clone(const struct LDKCResult_PaymentConstraintsDecodeErrorZ *NONNULL_PTR orig); public static native long CResult_PaymentConstraintsDecodeErrorZ_clone(long orig); + // struct LDKCResult_PaymentContextDecodeErrorZ CResult_PaymentContextDecodeErrorZ_ok(struct LDKPaymentContext o); + public static native long CResult_PaymentContextDecodeErrorZ_ok(long o); + // struct LDKCResult_PaymentContextDecodeErrorZ CResult_PaymentContextDecodeErrorZ_err(struct LDKDecodeError e); + public static native long CResult_PaymentContextDecodeErrorZ_err(long e); + // bool CResult_PaymentContextDecodeErrorZ_is_ok(const struct LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR o); + public static native boolean CResult_PaymentContextDecodeErrorZ_is_ok(long o); + // void CResult_PaymentContextDecodeErrorZ_free(struct LDKCResult_PaymentContextDecodeErrorZ _res); + public static native void CResult_PaymentContextDecodeErrorZ_free(long _res); + // uint64_t CResult_PaymentContextDecodeErrorZ_clone_ptr(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR arg); + public static native long CResult_PaymentContextDecodeErrorZ_clone_ptr(long arg); + // struct LDKCResult_PaymentContextDecodeErrorZ CResult_PaymentContextDecodeErrorZ_clone(const struct LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR orig); + public static native long CResult_PaymentContextDecodeErrorZ_clone(long orig); + // struct LDKCResult_UnknownPaymentContextDecodeErrorZ CResult_UnknownPaymentContextDecodeErrorZ_ok(struct LDKUnknownPaymentContext o); + public static native long CResult_UnknownPaymentContextDecodeErrorZ_ok(long o); + // struct LDKCResult_UnknownPaymentContextDecodeErrorZ CResult_UnknownPaymentContextDecodeErrorZ_err(struct LDKDecodeError e); + public static native long CResult_UnknownPaymentContextDecodeErrorZ_err(long e); + // bool CResult_UnknownPaymentContextDecodeErrorZ_is_ok(const struct LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR o); + public static native boolean CResult_UnknownPaymentContextDecodeErrorZ_is_ok(long o); + // void CResult_UnknownPaymentContextDecodeErrorZ_free(struct LDKCResult_UnknownPaymentContextDecodeErrorZ _res); + public static native void CResult_UnknownPaymentContextDecodeErrorZ_free(long _res); + // uint64_t CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR arg); + public static native long CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(long arg); + // struct LDKCResult_UnknownPaymentContextDecodeErrorZ CResult_UnknownPaymentContextDecodeErrorZ_clone(const struct LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR orig); + public static native long CResult_UnknownPaymentContextDecodeErrorZ_clone(long orig); + // struct LDKCResult_Bolt12OfferContextDecodeErrorZ CResult_Bolt12OfferContextDecodeErrorZ_ok(struct LDKBolt12OfferContext o); + public static native long CResult_Bolt12OfferContextDecodeErrorZ_ok(long o); + // struct LDKCResult_Bolt12OfferContextDecodeErrorZ CResult_Bolt12OfferContextDecodeErrorZ_err(struct LDKDecodeError e); + public static native long CResult_Bolt12OfferContextDecodeErrorZ_err(long e); + // bool CResult_Bolt12OfferContextDecodeErrorZ_is_ok(const struct LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR o); + public static native boolean CResult_Bolt12OfferContextDecodeErrorZ_is_ok(long o); + // void CResult_Bolt12OfferContextDecodeErrorZ_free(struct LDKCResult_Bolt12OfferContextDecodeErrorZ _res); + public static native void CResult_Bolt12OfferContextDecodeErrorZ_free(long _res); + // uint64_t CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR arg); + public static native long CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(long arg); + // struct LDKCResult_Bolt12OfferContextDecodeErrorZ CResult_Bolt12OfferContextDecodeErrorZ_clone(const struct LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR orig); + public static native long CResult_Bolt12OfferContextDecodeErrorZ_clone(long orig); + // struct LDKCResult_Bolt12RefundContextDecodeErrorZ CResult_Bolt12RefundContextDecodeErrorZ_ok(struct LDKBolt12RefundContext o); + public static native long CResult_Bolt12RefundContextDecodeErrorZ_ok(long o); + // struct LDKCResult_Bolt12RefundContextDecodeErrorZ CResult_Bolt12RefundContextDecodeErrorZ_err(struct LDKDecodeError e); + public static native long CResult_Bolt12RefundContextDecodeErrorZ_err(long e); + // bool CResult_Bolt12RefundContextDecodeErrorZ_is_ok(const struct LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR o); + public static native boolean CResult_Bolt12RefundContextDecodeErrorZ_is_ok(long o); + // void CResult_Bolt12RefundContextDecodeErrorZ_free(struct LDKCResult_Bolt12RefundContextDecodeErrorZ _res); + public static native void CResult_Bolt12RefundContextDecodeErrorZ_free(long _res); + // uint64_t CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR arg); + public static native long CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(long arg); + // struct LDKCResult_Bolt12RefundContextDecodeErrorZ CResult_Bolt12RefundContextDecodeErrorZ_clone(const struct LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR orig); + public static native long CResult_Bolt12RefundContextDecodeErrorZ_clone(long orig); + // struct LDKCResult_StrSecp256k1ErrorZ CResult_StrSecp256k1ErrorZ_ok(struct LDKStr o); + public static native long CResult_StrSecp256k1ErrorZ_ok(String o); + // struct LDKCResult_StrSecp256k1ErrorZ CResult_StrSecp256k1ErrorZ_err(enum LDKSecp256k1Error e); + public static native long CResult_StrSecp256k1ErrorZ_err(Secp256k1Error e); + // bool CResult_StrSecp256k1ErrorZ_is_ok(const struct LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR o); + public static native boolean CResult_StrSecp256k1ErrorZ_is_ok(long o); + // void CResult_StrSecp256k1ErrorZ_free(struct LDKCResult_StrSecp256k1ErrorZ _res); + public static native void CResult_StrSecp256k1ErrorZ_free(long _res); + // uint64_t CResult_StrSecp256k1ErrorZ_clone_ptr(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR arg); + public static native long CResult_StrSecp256k1ErrorZ_clone_ptr(long arg); + // struct LDKCResult_StrSecp256k1ErrorZ CResult_StrSecp256k1ErrorZ_clone(const struct LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR orig); + public static native long CResult_StrSecp256k1ErrorZ_clone(long orig); // uint64_t C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR arg); public static native long C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(long arg); // struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(const struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR orig); @@ -6419,18 +7081,6 @@ public class bindings { public static native long CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(long arg); // struct LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(const struct LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR orig); public static native long CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(long orig); - // struct LDKCResult_StrSecp256k1ErrorZ CResult_StrSecp256k1ErrorZ_ok(struct LDKStr o); - public static native long CResult_StrSecp256k1ErrorZ_ok(String o); - // struct LDKCResult_StrSecp256k1ErrorZ CResult_StrSecp256k1ErrorZ_err(enum LDKSecp256k1Error e); - public static native long CResult_StrSecp256k1ErrorZ_err(Secp256k1Error e); - // bool CResult_StrSecp256k1ErrorZ_is_ok(const struct LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR o); - public static native boolean CResult_StrSecp256k1ErrorZ_is_ok(long o); - // void CResult_StrSecp256k1ErrorZ_free(struct LDKCResult_StrSecp256k1ErrorZ _res); - public static native void CResult_StrSecp256k1ErrorZ_free(long _res); - // uint64_t CResult_StrSecp256k1ErrorZ_clone_ptr(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR arg); - public static native long CResult_StrSecp256k1ErrorZ_clone_ptr(long arg); - // struct LDKCResult_StrSecp256k1ErrorZ CResult_StrSecp256k1ErrorZ_clone(const struct LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR orig); - public static native long CResult_StrSecp256k1ErrorZ_clone(long orig); // struct LDKCResult_TxOutUtxoLookupErrorZ CResult_TxOutUtxoLookupErrorZ_ok(struct LDKTxOut o); public static native long CResult_TxOutUtxoLookupErrorZ_ok(long o); // struct LDKCResult_TxOutUtxoLookupErrorZ CResult_TxOutUtxoLookupErrorZ_err(enum LDKUtxoLookupError e); @@ -6459,6 +7109,10 @@ public class bindings { public static native boolean CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_is_ok(long o); // void CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_free(struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ _res); public static native void CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_free(long _res); + // uint64_t CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ *NONNULL_PTR arg); + public static native long CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(long arg); + // struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(const struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ *NONNULL_PTR orig); + public static native long CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(long orig); // struct LDKCResult_PeeledOnionNoneZ CResult_PeeledOnionNoneZ_ok(struct LDKPeeledOnion o); public static native long CResult_PeeledOnionNoneZ_ok(long o); // struct LDKCResult_PeeledOnionNoneZ CResult_PeeledOnionNoneZ_err(void); @@ -6467,6 +7121,10 @@ public class bindings { public static native boolean CResult_PeeledOnionNoneZ_is_ok(long o); // void CResult_PeeledOnionNoneZ_free(struct LDKCResult_PeeledOnionNoneZ _res); public static native void CResult_PeeledOnionNoneZ_free(long _res); + // uint64_t CResult_PeeledOnionNoneZ_clone_ptr(LDKCResult_PeeledOnionNoneZ *NONNULL_PTR arg); + public static native long CResult_PeeledOnionNoneZ_clone_ptr(long arg); + // struct LDKCResult_PeeledOnionNoneZ CResult_PeeledOnionNoneZ_clone(const struct LDKCResult_PeeledOnionNoneZ *NONNULL_PTR orig); + public static native long CResult_PeeledOnionNoneZ_clone(long orig); // struct LDKCResult_SendSuccessSendErrorZ CResult_SendSuccessSendErrorZ_ok(struct LDKSendSuccess o); public static native long CResult_SendSuccessSendErrorZ_ok(long o); // struct LDKCResult_SendSuccessSendErrorZ CResult_SendSuccessSendErrorZ_err(struct LDKSendError e); @@ -6475,6 +7133,10 @@ public class bindings { public static native boolean CResult_SendSuccessSendErrorZ_is_ok(long o); // void CResult_SendSuccessSendErrorZ_free(struct LDKCResult_SendSuccessSendErrorZ _res); public static native void CResult_SendSuccessSendErrorZ_free(long _res); + // uint64_t CResult_SendSuccessSendErrorZ_clone_ptr(LDKCResult_SendSuccessSendErrorZ *NONNULL_PTR arg); + public static native long CResult_SendSuccessSendErrorZ_clone_ptr(long arg); + // struct LDKCResult_SendSuccessSendErrorZ CResult_SendSuccessSendErrorZ_clone(const struct LDKCResult_SendSuccessSendErrorZ *NONNULL_PTR orig); + public static native long CResult_SendSuccessSendErrorZ_clone(long orig); // struct LDKCResult_BlindedPathNoneZ CResult_BlindedPathNoneZ_ok(struct LDKBlindedPath o); public static native long CResult_BlindedPathNoneZ_ok(long o); // struct LDKCResult_BlindedPathNoneZ CResult_BlindedPathNoneZ_err(void); @@ -6537,6 +7199,58 @@ public class bindings { public static native long CResult_InvoiceErrorDecodeErrorZ_clone_ptr(long arg); // struct LDKCResult_InvoiceErrorDecodeErrorZ CResult_InvoiceErrorDecodeErrorZ_clone(const struct LDKCResult_InvoiceErrorDecodeErrorZ *NONNULL_PTR orig); public static native long CResult_InvoiceErrorDecodeErrorZ_clone(long orig); + // struct LDKCResult_TrackedSpendableOutputDecodeErrorZ CResult_TrackedSpendableOutputDecodeErrorZ_ok(struct LDKTrackedSpendableOutput o); + public static native long CResult_TrackedSpendableOutputDecodeErrorZ_ok(long o); + // struct LDKCResult_TrackedSpendableOutputDecodeErrorZ CResult_TrackedSpendableOutputDecodeErrorZ_err(struct LDKDecodeError e); + public static native long CResult_TrackedSpendableOutputDecodeErrorZ_err(long e); + // bool CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(const struct LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR o); + public static native boolean CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(long o); + // void CResult_TrackedSpendableOutputDecodeErrorZ_free(struct LDKCResult_TrackedSpendableOutputDecodeErrorZ _res); + public static native void CResult_TrackedSpendableOutputDecodeErrorZ_free(long _res); + // uint64_t CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR arg); + public static native long CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(long arg); + // struct LDKCResult_TrackedSpendableOutputDecodeErrorZ CResult_TrackedSpendableOutputDecodeErrorZ_clone(const struct LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR orig); + public static native long CResult_TrackedSpendableOutputDecodeErrorZ_clone(long orig); + // struct LDKCResult_OutputSpendStatusDecodeErrorZ CResult_OutputSpendStatusDecodeErrorZ_ok(struct LDKOutputSpendStatus o); + public static native long CResult_OutputSpendStatusDecodeErrorZ_ok(long o); + // struct LDKCResult_OutputSpendStatusDecodeErrorZ CResult_OutputSpendStatusDecodeErrorZ_err(struct LDKDecodeError e); + public static native long CResult_OutputSpendStatusDecodeErrorZ_err(long e); + // bool CResult_OutputSpendStatusDecodeErrorZ_is_ok(const struct LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR o); + public static native boolean CResult_OutputSpendStatusDecodeErrorZ_is_ok(long o); + // void CResult_OutputSpendStatusDecodeErrorZ_free(struct LDKCResult_OutputSpendStatusDecodeErrorZ _res); + public static native void CResult_OutputSpendStatusDecodeErrorZ_free(long _res); + // uint64_t CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR arg); + public static native long CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(long arg); + // struct LDKCResult_OutputSpendStatusDecodeErrorZ CResult_OutputSpendStatusDecodeErrorZ_clone(const struct LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR orig); + public static native long CResult_OutputSpendStatusDecodeErrorZ_clone(long orig); + // struct LDKCOption_FilterZ COption_FilterZ_some(struct LDKFilter o); + public static native long COption_FilterZ_some(long o); + // struct LDKCOption_FilterZ COption_FilterZ_none(void); + public static native long COption_FilterZ_none(); + // void COption_FilterZ_free(struct LDKCOption_FilterZ _res); + public static native void COption_FilterZ_free(long _res); + // void CVec_TrackedSpendableOutputZ_free(struct LDKCVec_TrackedSpendableOutputZ _res); + public static native void CVec_TrackedSpendableOutputZ_free(long[] _res); + // struct LDKCResult_OutputSweeperDecodeErrorZ CResult_OutputSweeperDecodeErrorZ_ok(struct LDKOutputSweeper o); + public static native long CResult_OutputSweeperDecodeErrorZ_ok(long o); + // struct LDKCResult_OutputSweeperDecodeErrorZ CResult_OutputSweeperDecodeErrorZ_err(struct LDKDecodeError e); + public static native long CResult_OutputSweeperDecodeErrorZ_err(long e); + // bool CResult_OutputSweeperDecodeErrorZ_is_ok(const struct LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR o); + public static native boolean CResult_OutputSweeperDecodeErrorZ_is_ok(long o); + // void CResult_OutputSweeperDecodeErrorZ_free(struct LDKCResult_OutputSweeperDecodeErrorZ _res); + public static native void CResult_OutputSweeperDecodeErrorZ_free(long _res); + // struct LDKC2Tuple_BestBlockOutputSweeperZ C2Tuple_BestBlockOutputSweeperZ_new(struct LDKBestBlock a, struct LDKOutputSweeper b); + public static native long C2Tuple_BestBlockOutputSweeperZ_new(long a, long b); + // void C2Tuple_BestBlockOutputSweeperZ_free(struct LDKC2Tuple_BestBlockOutputSweeperZ _res); + public static native void C2Tuple_BestBlockOutputSweeperZ_free(long _res); + // struct LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok(struct LDKC2Tuple_BestBlockOutputSweeperZ o); + public static native long CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok(long o); + // struct LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err(struct LDKDecodeError e); + public static native long CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err(long e); + // bool CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(const struct LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR o); + public static native boolean CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(long o); + // void CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ _res); + public static native void CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free(long _res); // struct LDKCResult_DelayedPaymentBasepointDecodeErrorZ CResult_DelayedPaymentBasepointDecodeErrorZ_ok(struct LDKDelayedPaymentBasepoint o); public static native long CResult_DelayedPaymentBasepointDecodeErrorZ_ok(long o); // struct LDKCResult_DelayedPaymentBasepointDecodeErrorZ CResult_DelayedPaymentBasepointDecodeErrorZ_err(struct LDKDecodeError e); @@ -6609,12 +7323,6 @@ public class bindings { public static native long CResult_RevocationKeyDecodeErrorZ_clone_ptr(long arg); // struct LDKCResult_RevocationKeyDecodeErrorZ CResult_RevocationKeyDecodeErrorZ_clone(const struct LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR orig); public static native long CResult_RevocationKeyDecodeErrorZ_clone(long orig); - // struct LDKCOption_FilterZ COption_FilterZ_some(struct LDKFilter o); - public static native long COption_FilterZ_some(long o); - // struct LDKCOption_FilterZ COption_FilterZ_none(void); - public static native long COption_FilterZ_none(); - // void COption_FilterZ_free(struct LDKCOption_FilterZ _res); - public static native void COption_FilterZ_free(long _res); // struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_ok(struct LDKLockedChannelMonitor o); public static native long CResult_LockedChannelMonitorNoneZ_ok(long o); // struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_err(void); @@ -6623,8 +7331,16 @@ public class bindings { public static native boolean CResult_LockedChannelMonitorNoneZ_is_ok(long o); // void CResult_LockedChannelMonitorNoneZ_free(struct LDKCResult_LockedChannelMonitorNoneZ _res); public static native void CResult_LockedChannelMonitorNoneZ_free(long _res); - // void CVec_OutPointZ_free(struct LDKCVec_OutPointZ _res); - public static native void CVec_OutPointZ_free(long[] _res); + // uint64_t C2Tuple_OutPointChannelIdZ_clone_ptr(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR arg); + public static native long C2Tuple_OutPointChannelIdZ_clone_ptr(long arg); + // struct LDKC2Tuple_OutPointChannelIdZ C2Tuple_OutPointChannelIdZ_clone(const struct LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR orig); + public static native long C2Tuple_OutPointChannelIdZ_clone(long orig); + // struct LDKC2Tuple_OutPointChannelIdZ C2Tuple_OutPointChannelIdZ_new(struct LDKOutPoint a, struct LDKChannelId b); + public static native long C2Tuple_OutPointChannelIdZ_new(long a, long b); + // void C2Tuple_OutPointChannelIdZ_free(struct LDKC2Tuple_OutPointChannelIdZ _res); + public static native void C2Tuple_OutPointChannelIdZ_free(long _res); + // void CVec_C2Tuple_OutPointChannelIdZZ_free(struct LDKCVec_C2Tuple_OutPointChannelIdZZ _res); + public static native void CVec_C2Tuple_OutPointChannelIdZZ_free(long[] _res); // void CVec_MonitorUpdateIdZ_free(struct LDKCVec_MonitorUpdateIdZ _res); public static native void CVec_MonitorUpdateIdZ_free(long[] _res); // uint64_t C2Tuple_OutPointCVec_MonitorUpdateIdZZ_clone_ptr(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR arg); @@ -6711,6 +7427,8 @@ public class bindings { public static native long TransactionU16LenLimited_new(byte[] transaction); // MUST_USE_RES struct LDKTransaction TransactionU16LenLimited_into_transaction(struct LDKTransactionU16LenLimited this_arg); public static native byte[] TransactionU16LenLimited_into_transaction(long this_arg); + // MUST_USE_RES struct LDKTransaction TransactionU16LenLimited_as_transaction(const struct LDKTransactionU16LenLimited *NONNULL_PTR this_arg); + public static native byte[] TransactionU16LenLimited_as_transaction(long this_arg); // struct LDKCVec_u8Z TransactionU16LenLimited_write(const struct LDKTransactionU16LenLimited *NONNULL_PTR obj); public static native byte[] TransactionU16LenLimited_write(long obj); // struct LDKCResult_TransactionU16LenLimitedDecodeErrorZ TransactionU16LenLimited_read(struct LDKu8slice ser); @@ -6741,6 +7459,24 @@ public class bindings { public static native long MonitorUpdatingPersister_cleanup_stale_updates(long this_arg, boolean lazy); // struct LDKPersist MonitorUpdatingPersister_as_Persist(const struct LDKMonitorUpdatingPersister *NONNULL_PTR this_arg); public static native long MonitorUpdatingPersister_as_Persist(long this_arg); + // enum LDKShortChannelIdError ShortChannelIdError_clone(const enum LDKShortChannelIdError *NONNULL_PTR orig); + public static native ShortChannelIdError ShortChannelIdError_clone(long orig); + // enum LDKShortChannelIdError ShortChannelIdError_block_overflow(void); + public static native ShortChannelIdError ShortChannelIdError_block_overflow(); + // enum LDKShortChannelIdError ShortChannelIdError_tx_index_overflow(void); + public static native ShortChannelIdError ShortChannelIdError_tx_index_overflow(); + // enum LDKShortChannelIdError ShortChannelIdError_vout_index_overflow(void); + public static native ShortChannelIdError ShortChannelIdError_vout_index_overflow(); + // bool ShortChannelIdError_eq(const enum LDKShortChannelIdError *NONNULL_PTR a, const enum LDKShortChannelIdError *NONNULL_PTR b); + public static native boolean ShortChannelIdError_eq(long a, long b); + // uint32_t block_from_scid(uint64_t short_channel_id); + public static native int block_from_scid(long short_channel_id); + // uint32_t tx_index_from_scid(uint64_t short_channel_id); + public static native int tx_index_from_scid(long short_channel_id); + // uint16_t vout_from_scid(uint64_t short_channel_id); + public static native short vout_from_scid(long short_channel_id); + // struct LDKCResult_u64ShortChannelIdErrorZ scid_from_parts(uint64_t block, uint64_t tx_index, uint64_t vout_index); + public static native long scid_from_parts(long block, long tx_index, long vout_index); // void UntrustedString_free(struct LDKUntrustedString this_obj); public static native void UntrustedString_free(long this_obj); // struct LDKStr UntrustedString_get_a(const struct LDKUntrustedString *NONNULL_PTR this_ptr); @@ -6769,25 +7505,95 @@ public class bindings { public static native void PrintableString_set_a(long this_ptr, String val); // MUST_USE_RES struct LDKPrintableString PrintableString_new(struct LDKStr a_arg); public static native long PrintableString_new(String a_arg); + // void TrackedSpendableOutput_free(struct LDKTrackedSpendableOutput this_obj); + public static native void TrackedSpendableOutput_free(long this_obj); + // struct LDKSpendableOutputDescriptor TrackedSpendableOutput_get_descriptor(const struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr); + public static native long TrackedSpendableOutput_get_descriptor(long this_ptr); + // void TrackedSpendableOutput_set_descriptor(struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr, struct LDKSpendableOutputDescriptor val); + public static native void TrackedSpendableOutput_set_descriptor(long this_ptr, long val); + // struct LDKChannelId TrackedSpendableOutput_get_channel_id(const struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr); + public static native long TrackedSpendableOutput_get_channel_id(long this_ptr); + // void TrackedSpendableOutput_set_channel_id(struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr, struct LDKChannelId val); + public static native void TrackedSpendableOutput_set_channel_id(long this_ptr, long val); + // struct LDKOutputSpendStatus TrackedSpendableOutput_get_status(const struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr); + public static native long TrackedSpendableOutput_get_status(long this_ptr); + // void TrackedSpendableOutput_set_status(struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr, struct LDKOutputSpendStatus val); + public static native void TrackedSpendableOutput_set_status(long this_ptr, long val); + // MUST_USE_RES struct LDKTrackedSpendableOutput TrackedSpendableOutput_new(struct LDKSpendableOutputDescriptor descriptor_arg, struct LDKChannelId channel_id_arg, struct LDKOutputSpendStatus status_arg); + public static native long TrackedSpendableOutput_new(long descriptor_arg, long channel_id_arg, long status_arg); + // uint64_t TrackedSpendableOutput_clone_ptr(LDKTrackedSpendableOutput *NONNULL_PTR arg); + public static native long TrackedSpendableOutput_clone_ptr(long arg); + // struct LDKTrackedSpendableOutput TrackedSpendableOutput_clone(const struct LDKTrackedSpendableOutput *NONNULL_PTR orig); + public static native long TrackedSpendableOutput_clone(long orig); + // bool TrackedSpendableOutput_eq(const struct LDKTrackedSpendableOutput *NONNULL_PTR a, const struct LDKTrackedSpendableOutput *NONNULL_PTR b); + public static native boolean TrackedSpendableOutput_eq(long a, long b); + // MUST_USE_RES bool TrackedSpendableOutput_is_spent_in(const struct LDKTrackedSpendableOutput *NONNULL_PTR this_arg, struct LDKTransaction tx); + public static native boolean TrackedSpendableOutput_is_spent_in(long this_arg, byte[] tx); + // struct LDKCVec_u8Z TrackedSpendableOutput_write(const struct LDKTrackedSpendableOutput *NONNULL_PTR obj); + public static native byte[] TrackedSpendableOutput_write(long obj); + // struct LDKCResult_TrackedSpendableOutputDecodeErrorZ TrackedSpendableOutput_read(struct LDKu8slice ser); + public static native long TrackedSpendableOutput_read(byte[] ser); + // void OutputSpendStatus_free(struct LDKOutputSpendStatus this_ptr); + public static native void OutputSpendStatus_free(long this_ptr); + // uint64_t OutputSpendStatus_clone_ptr(LDKOutputSpendStatus *NONNULL_PTR arg); + public static native long OutputSpendStatus_clone_ptr(long arg); + // struct LDKOutputSpendStatus OutputSpendStatus_clone(const struct LDKOutputSpendStatus *NONNULL_PTR orig); + public static native long OutputSpendStatus_clone(long orig); + // struct LDKOutputSpendStatus OutputSpendStatus_pending_initial_broadcast(struct LDKCOption_u32Z delayed_until_height); + public static native long OutputSpendStatus_pending_initial_broadcast(long delayed_until_height); + // struct LDKOutputSpendStatus OutputSpendStatus_pending_first_confirmation(struct LDKThirtyTwoBytes first_broadcast_hash, uint32_t latest_broadcast_height, struct LDKTransaction latest_spending_tx); + public static native long OutputSpendStatus_pending_first_confirmation(byte[] first_broadcast_hash, int latest_broadcast_height, byte[] latest_spending_tx); + // struct LDKOutputSpendStatus OutputSpendStatus_pending_threshold_confirmations(struct LDKThirtyTwoBytes first_broadcast_hash, uint32_t latest_broadcast_height, struct LDKTransaction latest_spending_tx, uint32_t confirmation_height, struct LDKThirtyTwoBytes confirmation_hash); + public static native long OutputSpendStatus_pending_threshold_confirmations(byte[] first_broadcast_hash, int latest_broadcast_height, byte[] latest_spending_tx, int confirmation_height, byte[] confirmation_hash); + // bool OutputSpendStatus_eq(const struct LDKOutputSpendStatus *NONNULL_PTR a, const struct LDKOutputSpendStatus *NONNULL_PTR b); + public static native boolean OutputSpendStatus_eq(long a, long b); + // struct LDKCVec_u8Z OutputSpendStatus_write(const struct LDKOutputSpendStatus *NONNULL_PTR obj); + public static native byte[] OutputSpendStatus_write(long obj); + // struct LDKCResult_OutputSpendStatusDecodeErrorZ OutputSpendStatus_read(struct LDKu8slice ser); + public static native long OutputSpendStatus_read(byte[] ser); + // void OutputSweeper_free(struct LDKOutputSweeper this_obj); + public static native void OutputSweeper_free(long this_obj); + // MUST_USE_RES struct LDKOutputSweeper OutputSweeper_new(struct LDKBestBlock best_block, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKCOption_FilterZ chain_data_source, struct LDKOutputSpender output_spender, struct LDKChangeDestinationSource change_destination_source, struct LDKKVStore kv_store, struct LDKLogger logger); + public static native long OutputSweeper_new(long best_block, long broadcaster, long fee_estimator, long chain_data_source, long output_spender, long change_destination_source, long kv_store, long logger); + // MUST_USE_RES struct LDKCResult_NoneNoneZ OutputSweeper_track_spendable_outputs(const struct LDKOutputSweeper *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ output_descriptors, struct LDKChannelId channel_id, bool exclude_static_outputs, struct LDKCOption_u32Z delay_until_height); + public static native long OutputSweeper_track_spendable_outputs(long this_arg, long[] output_descriptors, long channel_id, boolean exclude_static_outputs, long delay_until_height); + // MUST_USE_RES struct LDKCVec_TrackedSpendableOutputZ OutputSweeper_tracked_spendable_outputs(const struct LDKOutputSweeper *NONNULL_PTR this_arg); + public static native long[] OutputSweeper_tracked_spendable_outputs(long this_arg); + // MUST_USE_RES struct LDKBestBlock OutputSweeper_current_best_block(const struct LDKOutputSweeper *NONNULL_PTR this_arg); + public static native long OutputSweeper_current_best_block(long this_arg); + // struct LDKListen OutputSweeper_as_Listen(const struct LDKOutputSweeper *NONNULL_PTR this_arg); + public static native long OutputSweeper_as_Listen(long this_arg); + // struct LDKConfirm OutputSweeper_as_Confirm(const struct LDKOutputSweeper *NONNULL_PTR this_arg); + public static native long OutputSweeper_as_Confirm(long this_arg); + // void SpendingDelay_free(struct LDKSpendingDelay this_ptr); + public static native void SpendingDelay_free(long this_ptr); + // uint64_t SpendingDelay_clone_ptr(LDKSpendingDelay *NONNULL_PTR arg); + public static native long SpendingDelay_clone_ptr(long arg); + // struct LDKSpendingDelay SpendingDelay_clone(const struct LDKSpendingDelay *NONNULL_PTR orig); + public static native long SpendingDelay_clone(long orig); + // struct LDKSpendingDelay SpendingDelay_relative(uint32_t num_blocks); + public static native long SpendingDelay_relative(int num_blocks); + // struct LDKSpendingDelay SpendingDelay_absolute(uint32_t height); + public static native long SpendingDelay_absolute(int height); + // struct LDKCResult_OutputSweeperDecodeErrorZ OutputSweeper_read(struct LDKu8slice ser, struct LDKBroadcasterInterface arg_a, struct LDKFeeEstimator arg_b, struct LDKCOption_FilterZ arg_c, struct LDKOutputSpender arg_d, struct LDKChangeDestinationSource arg_e, struct LDKKVStore arg_f, struct LDKLogger arg_g); + public static native long OutputSweeper_read(byte[] ser, long arg_a, long arg_b, long arg_c, long arg_d, long arg_e, long arg_f, long arg_g); + // struct LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ C2Tuple_BestBlockOutputSweeperZ_read(struct LDKu8slice ser, struct LDKBroadcasterInterface arg_a, struct LDKFeeEstimator arg_b, struct LDKCOption_FilterZ arg_c, struct LDKOutputSpender arg_d, struct LDKChangeDestinationSource arg_e, struct LDKKVStore arg_f, struct LDKLogger arg_g); + public static native long C2Tuple_BestBlockOutputSweeperZ_read(byte[] ser, long arg_a, long arg_b, long arg_c, long arg_d, long arg_e, long arg_f, long arg_g); // void FutureCallback_free(struct LDKFutureCallback this_ptr); public static native void FutureCallback_free(long this_ptr); // void Future_free(struct LDKFuture this_obj); public static native void Future_free(long this_obj); - // uint64_t Future_clone_ptr(LDKFuture *NONNULL_PTR arg); - public static native long Future_clone_ptr(long arg); - // struct LDKFuture Future_clone(const struct LDKFuture *NONNULL_PTR orig); - public static native long Future_clone(long orig); // void Future_register_callback_fn(const struct LDKFuture *NONNULL_PTR this_arg, struct LDKFutureCallback callback); public static native void Future_register_callback_fn(long this_arg, long callback); - // void Future_wait(struct LDKFuture this_arg); + // void Future_wait(const struct LDKFuture *NONNULL_PTR this_arg); public static native void Future_wait(long this_arg); - // MUST_USE_RES bool Future_wait_timeout(struct LDKFuture this_arg, uint64_t max_wait); + // MUST_USE_RES bool Future_wait_timeout(const struct LDKFuture *NONNULL_PTR this_arg, uint64_t max_wait); public static native boolean Future_wait_timeout(long this_arg, long max_wait); // void Sleeper_free(struct LDKSleeper this_obj); public static native void Sleeper_free(long this_obj); - // MUST_USE_RES struct LDKSleeper Sleeper_from_single_future(struct LDKFuture future); + // MUST_USE_RES struct LDKSleeper Sleeper_from_single_future(const struct LDKFuture *NONNULL_PTR future); public static native long Sleeper_from_single_future(long future); - // MUST_USE_RES struct LDKSleeper Sleeper_from_two_futures(struct LDKFuture fut_a, struct LDKFuture fut_b); + // MUST_USE_RES struct LDKSleeper Sleeper_from_two_futures(const struct LDKFuture *NONNULL_PTR fut_a, const struct LDKFuture *NONNULL_PTR fut_b); public static native long Sleeper_from_two_futures(long fut_a, long fut_b); // MUST_USE_RES struct LDKSleeper Sleeper_new(struct LDKCVec_FutureZ futures); public static native long Sleeper_new(long[] futures); @@ -6825,9 +7631,9 @@ public class bindings { public static native byte[] Record_get_peer_id(long this_ptr); // void Record_set_peer_id(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKPublicKey val); public static native void Record_set_peer_id(long this_ptr, byte[] val); - // struct LDKCOption_ThirtyTwoBytesZ Record_get_channel_id(const struct LDKRecord *NONNULL_PTR this_ptr); + // struct LDKChannelId Record_get_channel_id(const struct LDKRecord *NONNULL_PTR this_ptr); public static native long Record_get_channel_id(long this_ptr); - // void Record_set_channel_id(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKCOption_ThirtyTwoBytesZ val); + // void Record_set_channel_id(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKChannelId val); public static native void Record_set_channel_id(long this_ptr, long val); // struct LDKStr Record_get_args(const struct LDKRecord *NONNULL_PTR this_ptr); public static native String Record_get_args(long this_ptr); @@ -6845,7 +7651,7 @@ public class bindings { public static native int Record_get_line(long this_ptr); // void Record_set_line(struct LDKRecord *NONNULL_PTR this_ptr, uint32_t val); public static native void Record_set_line(long this_ptr, int val); - // MUST_USE_RES struct LDKRecord Record_new(enum LDKLevel level_arg, struct LDKPublicKey peer_id_arg, struct LDKCOption_ThirtyTwoBytesZ channel_id_arg, struct LDKStr args_arg, struct LDKStr module_path_arg, struct LDKStr file_arg, uint32_t line_arg); + // MUST_USE_RES struct LDKRecord Record_new(enum LDKLevel level_arg, struct LDKPublicKey peer_id_arg, struct LDKChannelId channel_id_arg, struct LDKStr args_arg, struct LDKStr module_path_arg, struct LDKStr file_arg, uint32_t line_arg); public static native long Record_new(Level level_arg, byte[] peer_id_arg, long channel_id_arg, String args_arg, String module_path_arg, String file_arg, int line_arg); // uint64_t Record_clone_ptr(LDKRecord *NONNULL_PTR arg); public static native long Record_clone_ptr(long arg); @@ -7081,20 +7887,30 @@ public class bindings { public static native long UserConfig_default(); // void BestBlock_free(struct LDKBestBlock this_obj); public static native void BestBlock_free(long this_obj); + // const uint8_t (*BestBlock_get_block_hash(const struct LDKBestBlock *NONNULL_PTR this_ptr))[32]; + public static native byte[] BestBlock_get_block_hash(long this_ptr); + // void BestBlock_set_block_hash(struct LDKBestBlock *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + public static native void BestBlock_set_block_hash(long this_ptr, byte[] val); + // uint32_t BestBlock_get_height(const struct LDKBestBlock *NONNULL_PTR this_ptr); + public static native int BestBlock_get_height(long this_ptr); + // void BestBlock_set_height(struct LDKBestBlock *NONNULL_PTR this_ptr, uint32_t val); + public static native void BestBlock_set_height(long this_ptr, int val); + // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash_arg, uint32_t height_arg); + public static native long BestBlock_new(byte[] block_hash_arg, int height_arg); // uint64_t BestBlock_clone_ptr(LDKBestBlock *NONNULL_PTR arg); public static native long BestBlock_clone_ptr(long arg); // struct LDKBestBlock BestBlock_clone(const struct LDKBestBlock *NONNULL_PTR orig); public static native long BestBlock_clone(long orig); + // uint64_t BestBlock_hash(const struct LDKBestBlock *NONNULL_PTR o); + public static native long BestBlock_hash(long o); // bool BestBlock_eq(const struct LDKBestBlock *NONNULL_PTR a, const struct LDKBestBlock *NONNULL_PTR b); public static native boolean BestBlock_eq(long a, long b); // MUST_USE_RES struct LDKBestBlock BestBlock_from_network(enum LDKNetwork network); public static native long BestBlock_from_network(Network network); - // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash, uint32_t height); - public static native long BestBlock_new(byte[] block_hash, int height); - // MUST_USE_RES struct LDKThirtyTwoBytes BestBlock_block_hash(const struct LDKBestBlock *NONNULL_PTR this_arg); - public static native byte[] BestBlock_block_hash(long this_arg); - // MUST_USE_RES uint32_t BestBlock_height(const struct LDKBestBlock *NONNULL_PTR this_arg); - public static native int BestBlock_height(long this_arg); + // struct LDKCVec_u8Z BestBlock_write(const struct LDKBestBlock *NONNULL_PTR obj); + public static native byte[] BestBlock_write(long obj); + // struct LDKCResult_BestBlockDecodeErrorZ BestBlock_read(struct LDKu8slice ser); + public static native long BestBlock_read(byte[] ser); // void Listen_free(struct LDKListen this_ptr); public static native void Listen_free(long this_ptr); // void Confirm_free(struct LDKConfirm this_ptr); @@ -7153,6 +7969,8 @@ public class bindings { public static native ConfirmationTarget ConfirmationTarget_non_anchor_channel_fee(); // enum LDKConfirmationTarget ConfirmationTarget_channel_close_minimum(void); public static native ConfirmationTarget ConfirmationTarget_channel_close_minimum(); + // enum LDKConfirmationTarget ConfirmationTarget_output_spending_fee(void); + public static native ConfirmationTarget ConfirmationTarget_output_spending_fee(); // uint64_t ConfirmationTarget_hash(const enum LDKConfirmationTarget *NONNULL_PTR o); public static native long ConfirmationTarget_hash(long o); // bool ConfirmationTarget_eq(const enum LDKConfirmationTarget *NONNULL_PTR a, const enum LDKConfirmationTarget *NONNULL_PTR b); @@ -7181,7 +7999,7 @@ public class bindings { public static native long[] ChainMonitor_get_claimable_balances(long this_arg, long[] ignored_channels); // MUST_USE_RES struct LDKCResult_LockedChannelMonitorNoneZ ChainMonitor_get_monitor(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo); public static native long ChainMonitor_get_monitor(long this_arg, long funding_txo); - // MUST_USE_RES struct LDKCVec_OutPointZ ChainMonitor_list_monitors(const struct LDKChainMonitor *NONNULL_PTR this_arg); + // MUST_USE_RES struct LDKCVec_C2Tuple_OutPointChannelIdZZ ChainMonitor_list_monitors(const struct LDKChainMonitor *NONNULL_PTR this_arg); public static native long[] ChainMonitor_list_monitors(long this_arg); // MUST_USE_RES struct LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ ChainMonitor_list_pending_monitor_updates(const struct LDKChainMonitor *NONNULL_PTR this_arg); public static native long[] ChainMonitor_list_pending_monitor_updates(long this_arg); @@ -7191,6 +8009,10 @@ public class bindings { public static native long ChainMonitor_get_update_future(long this_arg); // void ChainMonitor_rebroadcast_pending_claims(const struct LDKChainMonitor *NONNULL_PTR this_arg); public static native void ChainMonitor_rebroadcast_pending_claims(long this_arg); + // void ChainMonitor_signer_unblocked(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKOutPoint monitor_opt); + public static native void ChainMonitor_signer_unblocked(long this_arg, long monitor_opt); + // void ChainMonitor_archive_fully_resolved_channel_monitors(const struct LDKChainMonitor *NONNULL_PTR this_arg); + public static native void ChainMonitor_archive_fully_resolved_channel_monitors(long this_arg); // struct LDKListen ChainMonitor_as_Listen(const struct LDKChainMonitor *NONNULL_PTR this_arg); public static native long ChainMonitor_as_Listen(long this_arg); // struct LDKConfirm ChainMonitor_as_Confirm(const struct LDKChainMonitor *NONNULL_PTR this_arg); @@ -7205,6 +8027,10 @@ public class bindings { public static native long ChannelMonitorUpdate_get_update_id(long this_ptr); // void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, uint64_t val); public static native void ChannelMonitorUpdate_set_update_id(long this_ptr, long val); + // struct LDKChannelId ChannelMonitorUpdate_get_channel_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr); + public static native long ChannelMonitorUpdate_get_channel_id(long this_ptr); + // void ChannelMonitorUpdate_set_channel_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, struct LDKChannelId val); + public static native void ChannelMonitorUpdate_set_channel_id(long this_ptr, long val); // uint64_t ChannelMonitorUpdate_clone_ptr(LDKChannelMonitorUpdate *NONNULL_PTR arg); public static native long ChannelMonitorUpdate_clone_ptr(long arg); // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig); @@ -7223,10 +8049,12 @@ public class bindings { public static native long MonitorEvent_clone(long orig); // struct LDKMonitorEvent MonitorEvent_htlcevent(struct LDKHTLCUpdate a); public static native long MonitorEvent_htlcevent(long a); + // struct LDKMonitorEvent MonitorEvent_holder_force_closed_with_info(struct LDKClosureReason reason, struct LDKOutPoint outpoint, struct LDKChannelId channel_id); + public static native long MonitorEvent_holder_force_closed_with_info(long reason, long outpoint, long channel_id); // struct LDKMonitorEvent MonitorEvent_holder_force_closed(struct LDKOutPoint a); public static native long MonitorEvent_holder_force_closed(long a); - // struct LDKMonitorEvent MonitorEvent_completed(struct LDKOutPoint funding_txo, uint64_t monitor_update_id); - public static native long MonitorEvent_completed(long funding_txo, long monitor_update_id); + // struct LDKMonitorEvent MonitorEvent_completed(struct LDKOutPoint funding_txo, struct LDKChannelId channel_id, uint64_t monitor_update_id); + public static native long MonitorEvent_completed(long funding_txo, long channel_id, long monitor_update_id); // bool MonitorEvent_eq(const struct LDKMonitorEvent *NONNULL_PTR a, const struct LDKMonitorEvent *NONNULL_PTR b); public static native boolean MonitorEvent_eq(long a, long b); // struct LDKCVec_u8Z MonitorEvent_write(const struct LDKMonitorEvent *NONNULL_PTR obj); @@ -7281,6 +8109,8 @@ public class bindings { public static native long ChannelMonitor_get_latest_update_id(long this_arg); // MUST_USE_RES struct LDKC2Tuple_OutPointCVec_u8ZZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg); public static native long ChannelMonitor_get_funding_txo(long this_arg); + // MUST_USE_RES struct LDKChannelId ChannelMonitor_channel_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg); + public static native long ChannelMonitor_channel_id(long this_arg); // MUST_USE_RES struct LDKCVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZZ ChannelMonitor_get_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg); public static native long[] ChannelMonitor_get_outputs_to_watch(long this_arg); // void ChannelMonitor_load_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKFilter *NONNULL_PTR filter, const struct LDKLogger *NONNULL_PTR logger); @@ -7297,8 +8127,8 @@ public class bindings { public static native long ChannelMonitor_sign_to_local_justice_tx(long this_arg, byte[] justice_tx, long input_idx, long value, long commitment_number); // MUST_USE_RES struct LDKPublicKey ChannelMonitor_get_counterparty_node_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg); public static native byte[] ChannelMonitor_get_counterparty_node_id(long this_arg); - // MUST_USE_RES struct LDKCVec_TransactionZ ChannelMonitor_get_latest_holder_commitment_txn(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKLogger *NONNULL_PTR logger); - public static native byte[][] ChannelMonitor_get_latest_holder_commitment_txn(long this_arg, long logger); + // void ChannelMonitor_broadcast_latest_holder_commitment_txn(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKBroadcasterInterface *NONNULL_PTR broadcaster, const struct LDKFeeEstimator *NONNULL_PTR fee_estimator, const struct LDKLogger *NONNULL_PTR logger); + public static native void ChannelMonitor_broadcast_latest_holder_commitment_txn(long this_arg, long broadcaster, long fee_estimator, long logger); // MUST_USE_RES struct LDKCVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZZ ChannelMonitor_block_connected(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, const struct LDKLogger *NONNULL_PTR logger); public static native long[] ChannelMonitor_block_connected(long this_arg, byte[] header, long[] txdata, int height, long broadcaster, long fee_estimator, long logger); // void ChannelMonitor_block_disconnected(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, const struct LDKLogger *NONNULL_PTR logger); @@ -7315,8 +8145,12 @@ public class bindings { public static native long ChannelMonitor_current_best_block(long this_arg); // void ChannelMonitor_rebroadcast_pending_claims(const struct LDKChannelMonitor *NONNULL_PTR this_arg, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, const struct LDKLogger *NONNULL_PTR logger); public static native void ChannelMonitor_rebroadcast_pending_claims(long this_arg, long broadcaster, long fee_estimator, long logger); + // void ChannelMonitor_signer_unblocked(const struct LDKChannelMonitor *NONNULL_PTR this_arg, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, const struct LDKLogger *NONNULL_PTR logger); + public static native void ChannelMonitor_signer_unblocked(long this_arg, long broadcaster, long fee_estimator, long logger); // MUST_USE_RES struct LDKCVec_SpendableOutputDescriptorZ ChannelMonitor_get_spendable_outputs(const struct LDKChannelMonitor *NONNULL_PTR this_arg, struct LDKTransaction tx, uint32_t confirmation_height); public static native long[] ChannelMonitor_get_spendable_outputs(long this_arg, byte[] tx, int confirmation_height); + // MUST_USE_RES bool ChannelMonitor_is_fully_resolved(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKLogger *NONNULL_PTR logger); + public static native boolean ChannelMonitor_is_fully_resolved(long this_arg, long logger); // MUST_USE_RES struct LDKCVec_BalanceZ ChannelMonitor_get_claimable_balances(const struct LDKChannelMonitor *NONNULL_PTR this_arg); public static native long[] ChannelMonitor_get_claimable_balances(long this_arg); // struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ C2Tuple_ThirtyTwoBytesChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKEntropySource *NONNULL_PTR arg_a, const struct LDKSignerProvider *NONNULL_PTR arg_b); @@ -7341,8 +8175,6 @@ public class bindings { public static native boolean OutPoint_eq(long a, long b); // uint64_t OutPoint_hash(const struct LDKOutPoint *NONNULL_PTR o); public static native long OutPoint_hash(long o); - // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg); - public static native byte[] OutPoint_to_channel_id(long this_arg); // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj); public static native byte[] OutPoint_write(long obj); // struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser); @@ -7363,6 +8195,14 @@ public class bindings { public static native void InboundHTLCErr_set_msg(long this_ptr, String val); // MUST_USE_RES struct LDKInboundHTLCErr InboundHTLCErr_new(uint16_t err_code_arg, struct LDKCVec_u8Z err_data_arg, struct LDKStr msg_arg); public static native long InboundHTLCErr_new(short err_code_arg, byte[] err_data_arg, String msg_arg); + // uint64_t InboundHTLCErr_clone_ptr(LDKInboundHTLCErr *NONNULL_PTR arg); + public static native long InboundHTLCErr_clone_ptr(long arg); + // struct LDKInboundHTLCErr InboundHTLCErr_clone(const struct LDKInboundHTLCErr *NONNULL_PTR orig); + public static native long InboundHTLCErr_clone(long orig); + // uint64_t InboundHTLCErr_hash(const struct LDKInboundHTLCErr *NONNULL_PTR o); + public static native long InboundHTLCErr_hash(long o); + // bool InboundHTLCErr_eq(const struct LDKInboundHTLCErr *NONNULL_PTR a, const struct LDKInboundHTLCErr *NONNULL_PTR b); + public static native boolean InboundHTLCErr_eq(long a, long b); // struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ peel_payment_onion(const struct LDKUpdateAddHTLC *NONNULL_PTR msg, const struct LDKNodeSigner *NONNULL_PTR node_signer, const struct LDKLogger *NONNULL_PTR logger, uint32_t cur_height, bool accept_mpp_keysend, bool allow_skimmed_fees); public static native long peel_payment_onion(long msg, long node_signer, long logger, int cur_height, boolean accept_mpp_keysend, boolean allow_skimmed_fees); // void PendingHTLCRouting_free(struct LDKPendingHTLCRouting this_ptr); @@ -7373,10 +8213,10 @@ public class bindings { public static native long PendingHTLCRouting_clone(long orig); // struct LDKPendingHTLCRouting PendingHTLCRouting_forward(struct LDKOnionPacket onion_packet, uint64_t short_channel_id, struct LDKBlindedForward blinded); public static native long PendingHTLCRouting_forward(long onion_packet, long short_channel_id, long blinded); - // struct LDKPendingHTLCRouting PendingHTLCRouting_receive(struct LDKFinalOnionHopData payment_data, struct LDKCOption_CVec_u8ZZ payment_metadata, uint32_t incoming_cltv_expiry, struct LDKThirtyTwoBytes phantom_shared_secret, struct LDKCVec_C2Tuple_u64CVec_u8ZZZ custom_tlvs, bool requires_blinded_error); - public static native long PendingHTLCRouting_receive(long payment_data, long payment_metadata, int incoming_cltv_expiry, byte[] phantom_shared_secret, long[] custom_tlvs, boolean requires_blinded_error); - // struct LDKPendingHTLCRouting PendingHTLCRouting_receive_keysend(struct LDKFinalOnionHopData payment_data, struct LDKThirtyTwoBytes payment_preimage, struct LDKCOption_CVec_u8ZZ payment_metadata, uint32_t incoming_cltv_expiry, struct LDKCVec_C2Tuple_u64CVec_u8ZZZ custom_tlvs); - public static native long PendingHTLCRouting_receive_keysend(long payment_data, byte[] payment_preimage, long payment_metadata, int incoming_cltv_expiry, long[] custom_tlvs); + // struct LDKPendingHTLCRouting PendingHTLCRouting_receive(struct LDKFinalOnionHopData payment_data, struct LDKCOption_CVec_u8ZZ payment_metadata, struct LDKCOption_PaymentContextZ payment_context, uint32_t incoming_cltv_expiry, struct LDKThirtyTwoBytes phantom_shared_secret, struct LDKCVec_C2Tuple_u64CVec_u8ZZZ custom_tlvs, bool requires_blinded_error); + public static native long PendingHTLCRouting_receive(long payment_data, long payment_metadata, long payment_context, int incoming_cltv_expiry, byte[] phantom_shared_secret, long[] custom_tlvs, boolean requires_blinded_error); + // struct LDKPendingHTLCRouting PendingHTLCRouting_receive_keysend(struct LDKFinalOnionHopData payment_data, struct LDKThirtyTwoBytes payment_preimage, struct LDKCOption_CVec_u8ZZ payment_metadata, uint32_t incoming_cltv_expiry, struct LDKCVec_C2Tuple_u64CVec_u8ZZZ custom_tlvs, bool requires_blinded_error); + public static native long PendingHTLCRouting_receive_keysend(long payment_data, byte[] payment_preimage, long payment_metadata, int incoming_cltv_expiry, long[] custom_tlvs, boolean requires_blinded_error); // void BlindedForward_free(struct LDKBlindedForward this_obj); public static native void BlindedForward_free(long this_obj); // struct LDKPublicKey BlindedForward_get_inbound_blinding_point(const struct LDKBlindedForward *NONNULL_PTR this_ptr); @@ -7529,10 +8369,10 @@ public class bindings { public static native long ChannelCounterparty_clone(long orig); // void ChannelDetails_free(struct LDKChannelDetails this_obj); public static native void ChannelDetails_free(long this_obj); - // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32]; - public static native byte[] ChannelDetails_get_channel_id(long this_ptr); - // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void ChannelDetails_set_channel_id(long this_ptr, byte[] val); + // struct LDKChannelId ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr); + public static native long ChannelDetails_get_channel_id(long this_ptr); + // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKChannelId val); + public static native void ChannelDetails_set_channel_id(long this_ptr, long val); // struct LDKChannelCounterparty ChannelDetails_get_counterparty(const struct LDKChannelDetails *NONNULL_PTR this_ptr); public static native long ChannelDetails_get_counterparty(long this_ptr); // void ChannelDetails_set_counterparty(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKChannelCounterparty val); @@ -7637,8 +8477,6 @@ public class bindings { public static native long ChannelDetails_get_config(long this_ptr); // void ChannelDetails_set_config(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKChannelConfig val); public static native void ChannelDetails_set_config(long this_ptr, long val); - // MUST_USE_RES struct LDKChannelDetails ChannelDetails_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKChannelCounterparty counterparty_arg, struct LDKOutPoint funding_txo_arg, struct LDKChannelTypeFeatures channel_type_arg, struct LDKCOption_u64Z short_channel_id_arg, struct LDKCOption_u64Z outbound_scid_alias_arg, struct LDKCOption_u64Z inbound_scid_alias_arg, uint64_t channel_value_satoshis_arg, struct LDKCOption_u64Z unspendable_punishment_reserve_arg, struct LDKU128 user_channel_id_arg, struct LDKCOption_u32Z feerate_sat_per_1000_weight_arg, uint64_t balance_msat_arg, uint64_t outbound_capacity_msat_arg, uint64_t next_outbound_htlc_limit_msat_arg, uint64_t next_outbound_htlc_minimum_msat_arg, uint64_t inbound_capacity_msat_arg, struct LDKCOption_u32Z confirmations_required_arg, struct LDKCOption_u32Z confirmations_arg, struct LDKCOption_u16Z force_close_spend_delay_arg, bool is_outbound_arg, bool is_channel_ready_arg, struct LDKCOption_ChannelShutdownStateZ channel_shutdown_state_arg, bool is_usable_arg, bool is_public_arg, struct LDKCOption_u64Z inbound_htlc_minimum_msat_arg, struct LDKCOption_u64Z inbound_htlc_maximum_msat_arg, struct LDKChannelConfig config_arg); - public static native long ChannelDetails_new(byte[] channel_id_arg, long counterparty_arg, long funding_txo_arg, long channel_type_arg, long short_channel_id_arg, long outbound_scid_alias_arg, long inbound_scid_alias_arg, long channel_value_satoshis_arg, long unspendable_punishment_reserve_arg, byte[] user_channel_id_arg, long feerate_sat_per_1000_weight_arg, long balance_msat_arg, long outbound_capacity_msat_arg, long next_outbound_htlc_limit_msat_arg, long next_outbound_htlc_minimum_msat_arg, long inbound_capacity_msat_arg, long confirmations_required_arg, long confirmations_arg, long force_close_spend_delay_arg, boolean is_outbound_arg, boolean is_channel_ready_arg, long channel_shutdown_state_arg, boolean is_usable_arg, boolean is_public_arg, long inbound_htlc_minimum_msat_arg, long inbound_htlc_maximum_msat_arg, long config_arg); // uint64_t ChannelDetails_clone_ptr(LDKChannelDetails *NONNULL_PTR arg); public static native long ChannelDetails_clone_ptr(long arg); // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig); @@ -7699,7 +8537,7 @@ public class bindings { public static native long ChannelManager_new(long fee_est, long chain_monitor, long tx_broadcaster, long router, long logger, long entropy_source, long node_signer, long signer_provider, long config, long params, int current_timestamp); // MUST_USE_RES struct LDKUserConfig ChannelManager_get_current_default_configuration(const struct LDKChannelManager *NONNULL_PTR this_arg); public static native long ChannelManager_get_current_default_configuration(long this_arg); - // MUST_USE_RES struct LDKCResult_ThirtyTwoBytesAPIErrorZ ChannelManager_create_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey their_network_key, uint64_t channel_value_satoshis, uint64_t push_msat, struct LDKU128 user_channel_id, struct LDKCOption_ThirtyTwoBytesZ temporary_channel_id, struct LDKUserConfig override_config); + // MUST_USE_RES struct LDKCResult_ChannelIdAPIErrorZ ChannelManager_create_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey their_network_key, uint64_t channel_value_satoshis, uint64_t push_msat, struct LDKU128 user_channel_id, struct LDKChannelId temporary_channel_id, struct LDKUserConfig override_config); public static native long ChannelManager_create_channel(long this_arg, byte[] their_network_key, long channel_value_satoshis, long push_msat, byte[] user_channel_id, long temporary_channel_id, long override_config); // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const struct LDKChannelManager *NONNULL_PTR this_arg); public static native long[] ChannelManager_list_channels(long this_arg); @@ -7709,14 +8547,14 @@ public class bindings { public static native long[] ChannelManager_list_channels_with_counterparty(long this_arg, byte[] counterparty_node_id); // MUST_USE_RES struct LDKCVec_RecentPaymentDetailsZ ChannelManager_list_recent_payments(const struct LDKChannelManager *NONNULL_PTR this_arg); public static native long[] ChannelManager_list_recent_payments(long this_arg); - // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32], struct LDKPublicKey counterparty_node_id); - public static native long ChannelManager_close_channel(long this_arg, byte[] channel_id, byte[] counterparty_node_id); - // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel_with_feerate_and_script(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32], struct LDKPublicKey counterparty_node_id, struct LDKCOption_u32Z target_feerate_sats_per_1000_weight, struct LDKShutdownScript shutdown_script); - public static native long ChannelManager_close_channel_with_feerate_and_script(long this_arg, byte[] channel_id, byte[] counterparty_node_id, long target_feerate_sats_per_1000_weight, long shutdown_script); - // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_broadcasting_latest_txn(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32], struct LDKPublicKey counterparty_node_id); - public static native long ChannelManager_force_close_broadcasting_latest_txn(long this_arg, byte[] channel_id, byte[] counterparty_node_id); - // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_without_broadcasting_txn(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32], struct LDKPublicKey counterparty_node_id); - public static native long ChannelManager_force_close_without_broadcasting_txn(long this_arg, byte[] channel_id, byte[] counterparty_node_id); + // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR channel_id, struct LDKPublicKey counterparty_node_id); + public static native long ChannelManager_close_channel(long this_arg, long channel_id, byte[] counterparty_node_id); + // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel_with_feerate_and_script(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR channel_id, struct LDKPublicKey counterparty_node_id, struct LDKCOption_u32Z target_feerate_sats_per_1000_weight, struct LDKShutdownScript shutdown_script); + public static native long ChannelManager_close_channel_with_feerate_and_script(long this_arg, long channel_id, byte[] counterparty_node_id, long target_feerate_sats_per_1000_weight, long shutdown_script); + // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_broadcasting_latest_txn(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR channel_id, struct LDKPublicKey counterparty_node_id); + public static native long ChannelManager_force_close_broadcasting_latest_txn(long this_arg, long channel_id, byte[] counterparty_node_id); + // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_without_broadcasting_txn(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR channel_id, struct LDKPublicKey counterparty_node_id); + public static native long ChannelManager_force_close_without_broadcasting_txn(long this_arg, long channel_id, byte[] counterparty_node_id); // void ChannelManager_force_close_all_channels_broadcasting_latest_txn(const struct LDKChannelManager *NONNULL_PTR this_arg); public static native void ChannelManager_force_close_all_channels_broadcasting_latest_txn(long this_arg); // void ChannelManager_force_close_all_channels_without_broadcasting_txn(const struct LDKChannelManager *NONNULL_PTR this_arg); @@ -7737,16 +8575,16 @@ public class bindings { public static native long ChannelManager_send_spontaneous_preflight_probes(long this_arg, byte[] node_id, long amount_msat, int final_cltv_expiry_delta, long liquidity_limit_multiplier); // MUST_USE_RES struct LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ ChannelManager_send_preflight_probes(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKRouteParameters route_params, struct LDKCOption_u64Z liquidity_limit_multiplier); public static native long ChannelManager_send_preflight_probes(long this_arg, long route_params, long liquidity_limit_multiplier); - // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*temporary_channel_id)[32], struct LDKPublicKey counterparty_node_id, struct LDKTransaction funding_transaction); - public static native long ChannelManager_funding_transaction_generated(long this_arg, byte[] temporary_channel_id, byte[] counterparty_node_id, byte[] funding_transaction); - // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_batch_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ temporary_channels, struct LDKTransaction funding_transaction); + // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR temporary_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKTransaction funding_transaction); + public static native long ChannelManager_funding_transaction_generated(long this_arg, long temporary_channel_id, byte[] counterparty_node_id, byte[] funding_transaction); + // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_batch_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_ChannelIdPublicKeyZZ temporary_channels, struct LDKTransaction funding_transaction); public static native long ChannelManager_batch_funding_transaction_generated(long this_arg, long[] temporary_channels, byte[] funding_transaction); - // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_update_partial_channel_config(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey counterparty_node_id, struct LDKCVec_ThirtyTwoBytesZ channel_ids, const struct LDKChannelConfigUpdate *NONNULL_PTR config_update); - public static native long ChannelManager_update_partial_channel_config(long this_arg, byte[] counterparty_node_id, byte[][] channel_ids, long config_update); - // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_update_channel_config(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey counterparty_node_id, struct LDKCVec_ThirtyTwoBytesZ channel_ids, const struct LDKChannelConfig *NONNULL_PTR config); - public static native long ChannelManager_update_channel_config(long this_arg, byte[] counterparty_node_id, byte[][] channel_ids, long config); - // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_forward_intercepted_htlc(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes intercept_id, const uint8_t (*next_hop_channel_id)[32], struct LDKPublicKey next_node_id, uint64_t amt_to_forward_msat); - public static native long ChannelManager_forward_intercepted_htlc(long this_arg, byte[] intercept_id, byte[] next_hop_channel_id, byte[] next_node_id, long amt_to_forward_msat); + // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_update_partial_channel_config(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey counterparty_node_id, struct LDKCVec_ChannelIdZ channel_ids, const struct LDKChannelConfigUpdate *NONNULL_PTR config_update); + public static native long ChannelManager_update_partial_channel_config(long this_arg, byte[] counterparty_node_id, long[] channel_ids, long config_update); + // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_update_channel_config(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey counterparty_node_id, struct LDKCVec_ChannelIdZ channel_ids, const struct LDKChannelConfig *NONNULL_PTR config); + public static native long ChannelManager_update_channel_config(long this_arg, byte[] counterparty_node_id, long[] channel_ids, long config); + // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_forward_intercepted_htlc(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes intercept_id, const struct LDKChannelId *NONNULL_PTR next_hop_channel_id, struct LDKPublicKey next_node_id, uint64_t amt_to_forward_msat); + public static native long ChannelManager_forward_intercepted_htlc(long this_arg, byte[] intercept_id, long next_hop_channel_id, byte[] next_node_id, long amt_to_forward_msat); // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_fail_intercepted_htlc(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes intercept_id); public static native long ChannelManager_fail_intercepted_htlc(long this_arg, byte[] intercept_id); // void ChannelManager_process_pending_htlc_forwards(const struct LDKChannelManager *NONNULL_PTR this_arg); @@ -7763,13 +8601,17 @@ public class bindings { public static native void ChannelManager_claim_funds_with_known_custom_tlvs(long this_arg, byte[] payment_preimage); // MUST_USE_RES struct LDKPublicKey ChannelManager_get_our_node_id(const struct LDKChannelManager *NONNULL_PTR this_arg); public static native byte[] ChannelManager_get_our_node_id(long this_arg); - // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_accept_inbound_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*temporary_channel_id)[32], struct LDKPublicKey counterparty_node_id, struct LDKU128 user_channel_id); - public static native long ChannelManager_accept_inbound_channel(long this_arg, byte[] temporary_channel_id, byte[] counterparty_node_id, byte[] user_channel_id); - // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*temporary_channel_id)[32], struct LDKPublicKey counterparty_node_id, struct LDKU128 user_channel_id); - public static native long ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(long this_arg, byte[] temporary_channel_id, byte[] counterparty_node_id, byte[] user_channel_id); + // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_accept_inbound_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR temporary_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKU128 user_channel_id); + public static native long ChannelManager_accept_inbound_channel(long this_arg, long temporary_channel_id, byte[] counterparty_node_id, byte[] user_channel_id); + // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR temporary_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKU128 user_channel_id); + public static native long ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(long this_arg, long temporary_channel_id, byte[] counterparty_node_id, byte[] user_channel_id); + // MUST_USE_RES struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ ChannelManager_create_offer_builder(const struct LDKChannelManager *NONNULL_PTR this_arg); + public static native long ChannelManager_create_offer_builder(long this_arg); + // MUST_USE_RES struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ ChannelManager_create_refund_builder(const struct LDKChannelManager *NONNULL_PTR this_arg, uint64_t amount_msats, uint64_t absolute_expiry, struct LDKThirtyTwoBytes payment_id, struct LDKRetry retry_strategy, struct LDKCOption_u64Z max_total_routing_fee_msat); + public static native long ChannelManager_create_refund_builder(long this_arg, long amount_msats, long absolute_expiry, byte[] payment_id, long retry_strategy, long max_total_routing_fee_msat); // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ ChannelManager_pay_for_offer(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKOffer *NONNULL_PTR offer, struct LDKCOption_u64Z quantity, struct LDKCOption_u64Z amount_msats, struct LDKCOption_StrZ payer_note, struct LDKThirtyTwoBytes payment_id, struct LDKRetry retry_strategy, struct LDKCOption_u64Z max_total_routing_fee_msat); public static native long ChannelManager_pay_for_offer(long this_arg, long offer, long quantity, long amount_msats, long payer_note, byte[] payment_id, long retry_strategy, long max_total_routing_fee_msat); - // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ ChannelManager_request_refund_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRefund *NONNULL_PTR refund); + // MUST_USE_RES struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ ChannelManager_request_refund_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRefund *NONNULL_PTR refund); public static native long ChannelManager_request_refund_payment(long this_arg, long refund); // MUST_USE_RES struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ ChannelManager_create_inbound_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKCOption_u64Z min_value_msat, uint32_t invoice_expiry_delta_secs, struct LDKCOption_u16Z min_final_cltv_expiry_delta); public static native long ChannelManager_create_inbound_payment(long this_arg, long min_value_msat, int invoice_expiry_delta_secs, long min_final_cltv_expiry_delta); @@ -7811,6 +8653,8 @@ public class bindings { public static native long ChannelManager_as_ChannelMessageHandler(long this_arg); // struct LDKOffersMessageHandler ChannelManager_as_OffersMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg); public static native long ChannelManager_as_OffersMessageHandler(long this_arg); + // struct LDKNodeIdLookUp ChannelManager_as_NodeIdLookUp(const struct LDKChannelManager *NONNULL_PTR this_arg); + public static native long ChannelManager_as_NodeIdLookUp(long this_arg); // struct LDKInitFeatures provided_init_features(const struct LDKUserConfig *NONNULL_PTR config); public static native long provided_init_features(long config); // struct LDKCVec_u8Z CounterpartyForwardingInfo_write(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR obj); @@ -7911,6 +8755,8 @@ public class bindings { public static native long DelayedPaymentBasepoint_hash(long o); // MUST_USE_RES struct LDKPublicKey DelayedPaymentBasepoint_to_public_key(const struct LDKDelayedPaymentBasepoint *NONNULL_PTR this_arg); public static native byte[] DelayedPaymentBasepoint_to_public_key(long this_arg); + // MUST_USE_RES struct LDKThirtyTwoBytes DelayedPaymentBasepoint_derive_add_tweak(const struct LDKDelayedPaymentBasepoint *NONNULL_PTR this_arg, struct LDKPublicKey per_commitment_point); + public static native byte[] DelayedPaymentBasepoint_derive_add_tweak(long this_arg, byte[] per_commitment_point); // struct LDKCVec_u8Z DelayedPaymentBasepoint_write(const struct LDKDelayedPaymentBasepoint *NONNULL_PTR obj); public static native byte[] DelayedPaymentBasepoint_write(long obj); // struct LDKCResult_DelayedPaymentBasepointDecodeErrorZ DelayedPaymentBasepoint_read(struct LDKu8slice ser); @@ -7957,6 +8803,8 @@ public class bindings { public static native long HtlcBasepoint_hash(long o); // MUST_USE_RES struct LDKPublicKey HtlcBasepoint_to_public_key(const struct LDKHtlcBasepoint *NONNULL_PTR this_arg); public static native byte[] HtlcBasepoint_to_public_key(long this_arg); + // MUST_USE_RES struct LDKThirtyTwoBytes HtlcBasepoint_derive_add_tweak(const struct LDKHtlcBasepoint *NONNULL_PTR this_arg, struct LDKPublicKey per_commitment_point); + public static native byte[] HtlcBasepoint_derive_add_tweak(long this_arg, byte[] per_commitment_point); // struct LDKCVec_u8Z HtlcBasepoint_write(const struct LDKHtlcBasepoint *NONNULL_PTR obj); public static native byte[] HtlcBasepoint_write(long obj); // struct LDKCResult_HtlcBasepointDecodeErrorZ HtlcBasepoint_read(struct LDKu8slice ser); @@ -7985,6 +8833,8 @@ public class bindings { public static native byte[] HtlcKey_write(long obj); // struct LDKCResult_HtlcKeyDecodeErrorZ HtlcKey_read(struct LDKu8slice ser); public static native long HtlcKey_read(byte[] ser); + // struct LDKPublicKey add_public_key_tweak(struct LDKPublicKey base_point, const uint8_t (*tweak)[32]); + public static native byte[] add_public_key_tweak(byte[] base_point, byte[] tweak); // void RevocationBasepoint_free(struct LDKRevocationBasepoint this_obj); public static native void RevocationBasepoint_free(long this_obj); // struct LDKPublicKey RevocationBasepoint_get_a(const struct LDKRevocationBasepoint *NONNULL_PTR this_ptr); @@ -8059,6 +8909,8 @@ public class bindings { public static native long DecodeError_io(IOError a); // struct LDKDecodeError DecodeError_unsupported_compression(void); public static native long DecodeError_unsupported_compression(); + // struct LDKDecodeError DecodeError_dangerous_value(void); + public static native long DecodeError_dangerous_value(); // uint64_t DecodeError_hash(const struct LDKDecodeError *NONNULL_PTR o); public static native long DecodeError_hash(long o); // bool DecodeError_eq(const struct LDKDecodeError *NONNULL_PTR a, const struct LDKDecodeError *NONNULL_PTR b); @@ -8089,16 +8941,16 @@ public class bindings { public static native boolean Init_eq(long a, long b); // void ErrorMessage_free(struct LDKErrorMessage this_obj); public static native void ErrorMessage_free(long this_obj); - // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32]; - public static native byte[] ErrorMessage_get_channel_id(long this_ptr); - // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void ErrorMessage_set_channel_id(long this_ptr, byte[] val); + // struct LDKChannelId ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr); + public static native long ErrorMessage_get_channel_id(long this_ptr); + // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKChannelId val); + public static native void ErrorMessage_set_channel_id(long this_ptr, long val); // struct LDKStr ErrorMessage_get_data(const struct LDKErrorMessage *NONNULL_PTR this_ptr); public static native String ErrorMessage_get_data(long this_ptr); // void ErrorMessage_set_data(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKStr val); public static native void ErrorMessage_set_data(long this_ptr, String val); - // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKStr data_arg); - public static native long ErrorMessage_new(byte[] channel_id_arg, String data_arg); + // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKChannelId channel_id_arg, struct LDKStr data_arg); + public static native long ErrorMessage_new(long channel_id_arg, String data_arg); // uint64_t ErrorMessage_clone_ptr(LDKErrorMessage *NONNULL_PTR arg); public static native long ErrorMessage_clone_ptr(long arg); // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig); @@ -8109,16 +8961,16 @@ public class bindings { public static native boolean ErrorMessage_eq(long a, long b); // void WarningMessage_free(struct LDKWarningMessage this_obj); public static native void WarningMessage_free(long this_obj); - // const uint8_t (*WarningMessage_get_channel_id(const struct LDKWarningMessage *NONNULL_PTR this_ptr))[32]; - public static native byte[] WarningMessage_get_channel_id(long this_ptr); - // void WarningMessage_set_channel_id(struct LDKWarningMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void WarningMessage_set_channel_id(long this_ptr, byte[] val); + // struct LDKChannelId WarningMessage_get_channel_id(const struct LDKWarningMessage *NONNULL_PTR this_ptr); + public static native long WarningMessage_get_channel_id(long this_ptr); + // void WarningMessage_set_channel_id(struct LDKWarningMessage *NONNULL_PTR this_ptr, struct LDKChannelId val); + public static native void WarningMessage_set_channel_id(long this_ptr, long val); // struct LDKStr WarningMessage_get_data(const struct LDKWarningMessage *NONNULL_PTR this_ptr); public static native String WarningMessage_get_data(long this_ptr); // void WarningMessage_set_data(struct LDKWarningMessage *NONNULL_PTR this_ptr, struct LDKStr val); public static native void WarningMessage_set_data(long this_ptr, String val); - // MUST_USE_RES struct LDKWarningMessage WarningMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKStr data_arg); - public static native long WarningMessage_new(byte[] channel_id_arg, String data_arg); + // MUST_USE_RES struct LDKWarningMessage WarningMessage_new(struct LDKChannelId channel_id_arg, struct LDKStr data_arg); + public static native long WarningMessage_new(long channel_id_arg, String data_arg); // uint64_t WarningMessage_clone_ptr(LDKWarningMessage *NONNULL_PTR arg); public static native long WarningMessage_clone_ptr(long arg); // struct LDKWarningMessage WarningMessage_clone(const struct LDKWarningMessage *NONNULL_PTR orig); @@ -8163,90 +9015,106 @@ public class bindings { public static native long Pong_hash(long o); // bool Pong_eq(const struct LDKPong *NONNULL_PTR a, const struct LDKPong *NONNULL_PTR b); public static native boolean Pong_eq(long a, long b); + // void CommonOpenChannelFields_free(struct LDKCommonOpenChannelFields this_obj); + public static native void CommonOpenChannelFields_free(long this_obj); + // const uint8_t (*CommonOpenChannelFields_get_chain_hash(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr))[32]; + public static native byte[] CommonOpenChannelFields_get_chain_hash(long this_ptr); + // void CommonOpenChannelFields_set_chain_hash(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + public static native void CommonOpenChannelFields_set_chain_hash(long this_ptr, byte[] val); + // struct LDKChannelId CommonOpenChannelFields_get_temporary_channel_id(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); + public static native long CommonOpenChannelFields_get_temporary_channel_id(long this_ptr); + // void CommonOpenChannelFields_set_temporary_channel_id(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKChannelId val); + public static native void CommonOpenChannelFields_set_temporary_channel_id(long this_ptr, long val); + // uint64_t CommonOpenChannelFields_get_funding_satoshis(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); + public static native long CommonOpenChannelFields_get_funding_satoshis(long this_ptr); + // void CommonOpenChannelFields_set_funding_satoshis(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint64_t val); + public static native void CommonOpenChannelFields_set_funding_satoshis(long this_ptr, long val); + // uint64_t CommonOpenChannelFields_get_dust_limit_satoshis(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); + public static native long CommonOpenChannelFields_get_dust_limit_satoshis(long this_ptr); + // void CommonOpenChannelFields_set_dust_limit_satoshis(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint64_t val); + public static native void CommonOpenChannelFields_set_dust_limit_satoshis(long this_ptr, long val); + // uint64_t CommonOpenChannelFields_get_max_htlc_value_in_flight_msat(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); + public static native long CommonOpenChannelFields_get_max_htlc_value_in_flight_msat(long this_ptr); + // void CommonOpenChannelFields_set_max_htlc_value_in_flight_msat(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint64_t val); + public static native void CommonOpenChannelFields_set_max_htlc_value_in_flight_msat(long this_ptr, long val); + // uint64_t CommonOpenChannelFields_get_htlc_minimum_msat(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); + public static native long CommonOpenChannelFields_get_htlc_minimum_msat(long this_ptr); + // void CommonOpenChannelFields_set_htlc_minimum_msat(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint64_t val); + public static native void CommonOpenChannelFields_set_htlc_minimum_msat(long this_ptr, long val); + // uint32_t CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); + public static native int CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight(long this_ptr); + // void CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint32_t val); + public static native void CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight(long this_ptr, int val); + // uint16_t CommonOpenChannelFields_get_to_self_delay(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); + public static native short CommonOpenChannelFields_get_to_self_delay(long this_ptr); + // void CommonOpenChannelFields_set_to_self_delay(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint16_t val); + public static native void CommonOpenChannelFields_set_to_self_delay(long this_ptr, short val); + // uint16_t CommonOpenChannelFields_get_max_accepted_htlcs(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); + public static native short CommonOpenChannelFields_get_max_accepted_htlcs(long this_ptr); + // void CommonOpenChannelFields_set_max_accepted_htlcs(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint16_t val); + public static native void CommonOpenChannelFields_set_max_accepted_htlcs(long this_ptr, short val); + // struct LDKPublicKey CommonOpenChannelFields_get_funding_pubkey(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); + public static native byte[] CommonOpenChannelFields_get_funding_pubkey(long this_ptr); + // void CommonOpenChannelFields_set_funding_pubkey(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); + public static native void CommonOpenChannelFields_set_funding_pubkey(long this_ptr, byte[] val); + // struct LDKPublicKey CommonOpenChannelFields_get_revocation_basepoint(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); + public static native byte[] CommonOpenChannelFields_get_revocation_basepoint(long this_ptr); + // void CommonOpenChannelFields_set_revocation_basepoint(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); + public static native void CommonOpenChannelFields_set_revocation_basepoint(long this_ptr, byte[] val); + // struct LDKPublicKey CommonOpenChannelFields_get_payment_basepoint(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); + public static native byte[] CommonOpenChannelFields_get_payment_basepoint(long this_ptr); + // void CommonOpenChannelFields_set_payment_basepoint(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); + public static native void CommonOpenChannelFields_set_payment_basepoint(long this_ptr, byte[] val); + // struct LDKPublicKey CommonOpenChannelFields_get_delayed_payment_basepoint(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); + public static native byte[] CommonOpenChannelFields_get_delayed_payment_basepoint(long this_ptr); + // void CommonOpenChannelFields_set_delayed_payment_basepoint(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); + public static native void CommonOpenChannelFields_set_delayed_payment_basepoint(long this_ptr, byte[] val); + // struct LDKPublicKey CommonOpenChannelFields_get_htlc_basepoint(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); + public static native byte[] CommonOpenChannelFields_get_htlc_basepoint(long this_ptr); + // void CommonOpenChannelFields_set_htlc_basepoint(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); + public static native void CommonOpenChannelFields_set_htlc_basepoint(long this_ptr, byte[] val); + // struct LDKPublicKey CommonOpenChannelFields_get_first_per_commitment_point(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); + public static native byte[] CommonOpenChannelFields_get_first_per_commitment_point(long this_ptr); + // void CommonOpenChannelFields_set_first_per_commitment_point(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); + public static native void CommonOpenChannelFields_set_first_per_commitment_point(long this_ptr, byte[] val); + // uint8_t CommonOpenChannelFields_get_channel_flags(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); + public static native byte CommonOpenChannelFields_get_channel_flags(long this_ptr); + // void CommonOpenChannelFields_set_channel_flags(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint8_t val); + public static native void CommonOpenChannelFields_set_channel_flags(long this_ptr, byte val); + // struct LDKCOption_CVec_u8ZZ CommonOpenChannelFields_get_shutdown_scriptpubkey(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); + public static native long CommonOpenChannelFields_get_shutdown_scriptpubkey(long this_ptr); + // void CommonOpenChannelFields_set_shutdown_scriptpubkey(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val); + public static native void CommonOpenChannelFields_set_shutdown_scriptpubkey(long this_ptr, long val); + // struct LDKChannelTypeFeatures CommonOpenChannelFields_get_channel_type(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); + public static native long CommonOpenChannelFields_get_channel_type(long this_ptr); + // void CommonOpenChannelFields_set_channel_type(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val); + public static native void CommonOpenChannelFields_set_channel_type(long this_ptr, long val); + // MUST_USE_RES struct LDKCommonOpenChannelFields CommonOpenChannelFields_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKChannelId temporary_channel_id_arg, uint64_t funding_satoshis_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t htlc_minimum_msat_arg, uint32_t commitment_feerate_sat_per_1000_weight_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_basepoint_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, uint8_t channel_flags_arg, struct LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg); + public static native long CommonOpenChannelFields_new(byte[] chain_hash_arg, long temporary_channel_id_arg, long funding_satoshis_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long htlc_minimum_msat_arg, int commitment_feerate_sat_per_1000_weight_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_basepoint_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, byte channel_flags_arg, long shutdown_scriptpubkey_arg, long channel_type_arg); + // uint64_t CommonOpenChannelFields_clone_ptr(LDKCommonOpenChannelFields *NONNULL_PTR arg); + public static native long CommonOpenChannelFields_clone_ptr(long arg); + // struct LDKCommonOpenChannelFields CommonOpenChannelFields_clone(const struct LDKCommonOpenChannelFields *NONNULL_PTR orig); + public static native long CommonOpenChannelFields_clone(long orig); + // uint64_t CommonOpenChannelFields_hash(const struct LDKCommonOpenChannelFields *NONNULL_PTR o); + public static native long CommonOpenChannelFields_hash(long o); + // bool CommonOpenChannelFields_eq(const struct LDKCommonOpenChannelFields *NONNULL_PTR a, const struct LDKCommonOpenChannelFields *NONNULL_PTR b); + public static native boolean CommonOpenChannelFields_eq(long a, long b); // void OpenChannel_free(struct LDKOpenChannel this_obj); public static native void OpenChannel_free(long this_obj); - // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32]; - public static native byte[] OpenChannel_get_chain_hash(long this_ptr); - // void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void OpenChannel_set_chain_hash(long this_ptr, byte[] val); - // const uint8_t (*OpenChannel_get_temporary_channel_id(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32]; - public static native byte[] OpenChannel_get_temporary_channel_id(long this_ptr); - // void OpenChannel_set_temporary_channel_id(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void OpenChannel_set_temporary_channel_id(long this_ptr, byte[] val); - // uint64_t OpenChannel_get_funding_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr); - public static native long OpenChannel_get_funding_satoshis(long this_ptr); - // void OpenChannel_set_funding_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val); - public static native void OpenChannel_set_funding_satoshis(long this_ptr, long val); + // struct LDKCommonOpenChannelFields OpenChannel_get_common_fields(const struct LDKOpenChannel *NONNULL_PTR this_ptr); + public static native long OpenChannel_get_common_fields(long this_ptr); + // void OpenChannel_set_common_fields(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKCommonOpenChannelFields val); + public static native void OpenChannel_set_common_fields(long this_ptr, long val); // uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr); public static native long OpenChannel_get_push_msat(long this_ptr); // void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val); public static native void OpenChannel_set_push_msat(long this_ptr, long val); - // uint64_t OpenChannel_get_dust_limit_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr); - public static native long OpenChannel_get_dust_limit_satoshis(long this_ptr); - // void OpenChannel_set_dust_limit_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val); - public static native void OpenChannel_set_dust_limit_satoshis(long this_ptr, long val); - // uint64_t OpenChannel_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr); - public static native long OpenChannel_get_max_htlc_value_in_flight_msat(long this_ptr); - // void OpenChannel_set_max_htlc_value_in_flight_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val); - public static native void OpenChannel_set_max_htlc_value_in_flight_msat(long this_ptr, long val); // uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr); public static native long OpenChannel_get_channel_reserve_satoshis(long this_ptr); // void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val); public static native void OpenChannel_set_channel_reserve_satoshis(long this_ptr, long val); - // uint64_t OpenChannel_get_htlc_minimum_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr); - public static native long OpenChannel_get_htlc_minimum_msat(long this_ptr); - // void OpenChannel_set_htlc_minimum_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val); - public static native void OpenChannel_set_htlc_minimum_msat(long this_ptr, long val); - // uint32_t OpenChannel_get_feerate_per_kw(const struct LDKOpenChannel *NONNULL_PTR this_ptr); - public static native int OpenChannel_get_feerate_per_kw(long this_ptr); - // void OpenChannel_set_feerate_per_kw(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint32_t val); - public static native void OpenChannel_set_feerate_per_kw(long this_ptr, int val); - // uint16_t OpenChannel_get_to_self_delay(const struct LDKOpenChannel *NONNULL_PTR this_ptr); - public static native short OpenChannel_get_to_self_delay(long this_ptr); - // void OpenChannel_set_to_self_delay(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val); - public static native void OpenChannel_set_to_self_delay(long this_ptr, short val); - // uint16_t OpenChannel_get_max_accepted_htlcs(const struct LDKOpenChannel *NONNULL_PTR this_ptr); - public static native short OpenChannel_get_max_accepted_htlcs(long this_ptr); - // void OpenChannel_set_max_accepted_htlcs(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val); - public static native void OpenChannel_set_max_accepted_htlcs(long this_ptr, short val); - // struct LDKPublicKey OpenChannel_get_funding_pubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr); - public static native byte[] OpenChannel_get_funding_pubkey(long this_ptr); - // void OpenChannel_set_funding_pubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); - public static native void OpenChannel_set_funding_pubkey(long this_ptr, byte[] val); - // struct LDKPublicKey OpenChannel_get_revocation_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr); - public static native byte[] OpenChannel_get_revocation_basepoint(long this_ptr); - // void OpenChannel_set_revocation_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); - public static native void OpenChannel_set_revocation_basepoint(long this_ptr, byte[] val); - // struct LDKPublicKey OpenChannel_get_payment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr); - public static native byte[] OpenChannel_get_payment_point(long this_ptr); - // void OpenChannel_set_payment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); - public static native void OpenChannel_set_payment_point(long this_ptr, byte[] val); - // struct LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr); - public static native byte[] OpenChannel_get_delayed_payment_basepoint(long this_ptr); - // void OpenChannel_set_delayed_payment_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); - public static native void OpenChannel_set_delayed_payment_basepoint(long this_ptr, byte[] val); - // struct LDKPublicKey OpenChannel_get_htlc_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr); - public static native byte[] OpenChannel_get_htlc_basepoint(long this_ptr); - // void OpenChannel_set_htlc_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); - public static native void OpenChannel_set_htlc_basepoint(long this_ptr, byte[] val); - // struct LDKPublicKey OpenChannel_get_first_per_commitment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr); - public static native byte[] OpenChannel_get_first_per_commitment_point(long this_ptr); - // void OpenChannel_set_first_per_commitment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); - public static native void OpenChannel_set_first_per_commitment_point(long this_ptr, byte[] val); - // uint8_t OpenChannel_get_channel_flags(const struct LDKOpenChannel *NONNULL_PTR this_ptr); - public static native byte OpenChannel_get_channel_flags(long this_ptr); - // void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val); - public static native void OpenChannel_set_channel_flags(long this_ptr, byte val); - // struct LDKCOption_CVec_u8ZZ OpenChannel_get_shutdown_scriptpubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr); - public static native long OpenChannel_get_shutdown_scriptpubkey(long this_ptr); - // void OpenChannel_set_shutdown_scriptpubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val); - public static native void OpenChannel_set_shutdown_scriptpubkey(long this_ptr, long val); - // struct LDKChannelTypeFeatures OpenChannel_get_channel_type(const struct LDKOpenChannel *NONNULL_PTR this_ptr); - public static native long OpenChannel_get_channel_type(long this_ptr); - // void OpenChannel_set_channel_type(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val); - public static native void OpenChannel_set_channel_type(long this_ptr, long val); - // MUST_USE_RES struct LDKOpenChannel OpenChannel_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKThirtyTwoBytes temporary_channel_id_arg, uint64_t funding_satoshis_arg, uint64_t push_msat_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t channel_reserve_satoshis_arg, uint64_t htlc_minimum_msat_arg, uint32_t feerate_per_kw_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_point_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, uint8_t channel_flags_arg, struct LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg); - public static native long OpenChannel_new(byte[] chain_hash_arg, byte[] temporary_channel_id_arg, long funding_satoshis_arg, long push_msat_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long channel_reserve_satoshis_arg, long htlc_minimum_msat_arg, int feerate_per_kw_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_point_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, byte channel_flags_arg, long shutdown_scriptpubkey_arg, long channel_type_arg); + // MUST_USE_RES struct LDKOpenChannel OpenChannel_new(struct LDKCommonOpenChannelFields common_fields_arg, uint64_t push_msat_arg, uint64_t channel_reserve_satoshis_arg); + public static native long OpenChannel_new(long common_fields_arg, long push_msat_arg, long channel_reserve_satoshis_arg); // uint64_t OpenChannel_clone_ptr(LDKOpenChannel *NONNULL_PTR arg); public static native long OpenChannel_clone_ptr(long arg); // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig); @@ -8257,96 +9125,28 @@ public class bindings { public static native boolean OpenChannel_eq(long a, long b); // void OpenChannelV2_free(struct LDKOpenChannelV2 this_obj); public static native void OpenChannelV2_free(long this_obj); - // const uint8_t (*OpenChannelV2_get_chain_hash(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr))[32]; - public static native byte[] OpenChannelV2_get_chain_hash(long this_ptr); - // void OpenChannelV2_set_chain_hash(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void OpenChannelV2_set_chain_hash(long this_ptr, byte[] val); - // const uint8_t (*OpenChannelV2_get_temporary_channel_id(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr))[32]; - public static native byte[] OpenChannelV2_get_temporary_channel_id(long this_ptr); - // void OpenChannelV2_set_temporary_channel_id(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void OpenChannelV2_set_temporary_channel_id(long this_ptr, byte[] val); + // struct LDKCommonOpenChannelFields OpenChannelV2_get_common_fields(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); + public static native long OpenChannelV2_get_common_fields(long this_ptr); + // void OpenChannelV2_set_common_fields(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKCommonOpenChannelFields val); + public static native void OpenChannelV2_set_common_fields(long this_ptr, long val); // uint32_t OpenChannelV2_get_funding_feerate_sat_per_1000_weight(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); public static native int OpenChannelV2_get_funding_feerate_sat_per_1000_weight(long this_ptr); // void OpenChannelV2_set_funding_feerate_sat_per_1000_weight(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint32_t val); public static native void OpenChannelV2_set_funding_feerate_sat_per_1000_weight(long this_ptr, int val); - // uint32_t OpenChannelV2_get_commitment_feerate_sat_per_1000_weight(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); - public static native int OpenChannelV2_get_commitment_feerate_sat_per_1000_weight(long this_ptr); - // void OpenChannelV2_set_commitment_feerate_sat_per_1000_weight(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint32_t val); - public static native void OpenChannelV2_set_commitment_feerate_sat_per_1000_weight(long this_ptr, int val); - // uint64_t OpenChannelV2_get_funding_satoshis(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); - public static native long OpenChannelV2_get_funding_satoshis(long this_ptr); - // void OpenChannelV2_set_funding_satoshis(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint64_t val); - public static native void OpenChannelV2_set_funding_satoshis(long this_ptr, long val); - // uint64_t OpenChannelV2_get_dust_limit_satoshis(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); - public static native long OpenChannelV2_get_dust_limit_satoshis(long this_ptr); - // void OpenChannelV2_set_dust_limit_satoshis(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint64_t val); - public static native void OpenChannelV2_set_dust_limit_satoshis(long this_ptr, long val); - // uint64_t OpenChannelV2_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); - public static native long OpenChannelV2_get_max_htlc_value_in_flight_msat(long this_ptr); - // void OpenChannelV2_set_max_htlc_value_in_flight_msat(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint64_t val); - public static native void OpenChannelV2_set_max_htlc_value_in_flight_msat(long this_ptr, long val); - // uint64_t OpenChannelV2_get_htlc_minimum_msat(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); - public static native long OpenChannelV2_get_htlc_minimum_msat(long this_ptr); - // void OpenChannelV2_set_htlc_minimum_msat(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint64_t val); - public static native void OpenChannelV2_set_htlc_minimum_msat(long this_ptr, long val); - // uint16_t OpenChannelV2_get_to_self_delay(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); - public static native short OpenChannelV2_get_to_self_delay(long this_ptr); - // void OpenChannelV2_set_to_self_delay(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint16_t val); - public static native void OpenChannelV2_set_to_self_delay(long this_ptr, short val); - // uint16_t OpenChannelV2_get_max_accepted_htlcs(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); - public static native short OpenChannelV2_get_max_accepted_htlcs(long this_ptr); - // void OpenChannelV2_set_max_accepted_htlcs(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint16_t val); - public static native void OpenChannelV2_set_max_accepted_htlcs(long this_ptr, short val); // uint32_t OpenChannelV2_get_locktime(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); public static native int OpenChannelV2_get_locktime(long this_ptr); // void OpenChannelV2_set_locktime(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint32_t val); public static native void OpenChannelV2_set_locktime(long this_ptr, int val); - // struct LDKPublicKey OpenChannelV2_get_funding_pubkey(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); - public static native byte[] OpenChannelV2_get_funding_pubkey(long this_ptr); - // void OpenChannelV2_set_funding_pubkey(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); - public static native void OpenChannelV2_set_funding_pubkey(long this_ptr, byte[] val); - // struct LDKPublicKey OpenChannelV2_get_revocation_basepoint(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); - public static native byte[] OpenChannelV2_get_revocation_basepoint(long this_ptr); - // void OpenChannelV2_set_revocation_basepoint(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); - public static native void OpenChannelV2_set_revocation_basepoint(long this_ptr, byte[] val); - // struct LDKPublicKey OpenChannelV2_get_payment_basepoint(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); - public static native byte[] OpenChannelV2_get_payment_basepoint(long this_ptr); - // void OpenChannelV2_set_payment_basepoint(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); - public static native void OpenChannelV2_set_payment_basepoint(long this_ptr, byte[] val); - // struct LDKPublicKey OpenChannelV2_get_delayed_payment_basepoint(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); - public static native byte[] OpenChannelV2_get_delayed_payment_basepoint(long this_ptr); - // void OpenChannelV2_set_delayed_payment_basepoint(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); - public static native void OpenChannelV2_set_delayed_payment_basepoint(long this_ptr, byte[] val); - // struct LDKPublicKey OpenChannelV2_get_htlc_basepoint(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); - public static native byte[] OpenChannelV2_get_htlc_basepoint(long this_ptr); - // void OpenChannelV2_set_htlc_basepoint(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); - public static native void OpenChannelV2_set_htlc_basepoint(long this_ptr, byte[] val); - // struct LDKPublicKey OpenChannelV2_get_first_per_commitment_point(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); - public static native byte[] OpenChannelV2_get_first_per_commitment_point(long this_ptr); - // void OpenChannelV2_set_first_per_commitment_point(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); - public static native void OpenChannelV2_set_first_per_commitment_point(long this_ptr, byte[] val); // struct LDKPublicKey OpenChannelV2_get_second_per_commitment_point(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); public static native byte[] OpenChannelV2_get_second_per_commitment_point(long this_ptr); // void OpenChannelV2_set_second_per_commitment_point(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); public static native void OpenChannelV2_set_second_per_commitment_point(long this_ptr, byte[] val); - // uint8_t OpenChannelV2_get_channel_flags(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); - public static native byte OpenChannelV2_get_channel_flags(long this_ptr); - // void OpenChannelV2_set_channel_flags(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint8_t val); - public static native void OpenChannelV2_set_channel_flags(long this_ptr, byte val); - // struct LDKCOption_CVec_u8ZZ OpenChannelV2_get_shutdown_scriptpubkey(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); - public static native long OpenChannelV2_get_shutdown_scriptpubkey(long this_ptr); - // void OpenChannelV2_set_shutdown_scriptpubkey(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val); - public static native void OpenChannelV2_set_shutdown_scriptpubkey(long this_ptr, long val); - // struct LDKChannelTypeFeatures OpenChannelV2_get_channel_type(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); - public static native long OpenChannelV2_get_channel_type(long this_ptr); - // void OpenChannelV2_set_channel_type(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val); - public static native void OpenChannelV2_set_channel_type(long this_ptr, long val); // enum LDKCOption_NoneZ OpenChannelV2_get_require_confirmed_inputs(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); public static native COption_NoneZ OpenChannelV2_get_require_confirmed_inputs(long this_ptr); // void OpenChannelV2_set_require_confirmed_inputs(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, enum LDKCOption_NoneZ val); public static native void OpenChannelV2_set_require_confirmed_inputs(long this_ptr, COption_NoneZ val); - // MUST_USE_RES struct LDKOpenChannelV2 OpenChannelV2_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKThirtyTwoBytes temporary_channel_id_arg, uint32_t funding_feerate_sat_per_1000_weight_arg, uint32_t commitment_feerate_sat_per_1000_weight_arg, uint64_t funding_satoshis_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t htlc_minimum_msat_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, uint32_t locktime_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_basepoint_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, struct LDKPublicKey second_per_commitment_point_arg, uint8_t channel_flags_arg, struct LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg, enum LDKCOption_NoneZ require_confirmed_inputs_arg); - public static native long OpenChannelV2_new(byte[] chain_hash_arg, byte[] temporary_channel_id_arg, int funding_feerate_sat_per_1000_weight_arg, int commitment_feerate_sat_per_1000_weight_arg, long funding_satoshis_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long htlc_minimum_msat_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, int locktime_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_basepoint_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, byte[] second_per_commitment_point_arg, byte channel_flags_arg, long shutdown_scriptpubkey_arg, long channel_type_arg, COption_NoneZ require_confirmed_inputs_arg); + // MUST_USE_RES struct LDKOpenChannelV2 OpenChannelV2_new(struct LDKCommonOpenChannelFields common_fields_arg, uint32_t funding_feerate_sat_per_1000_weight_arg, uint32_t locktime_arg, struct LDKPublicKey second_per_commitment_point_arg, enum LDKCOption_NoneZ require_confirmed_inputs_arg); + public static native long OpenChannelV2_new(long common_fields_arg, int funding_feerate_sat_per_1000_weight_arg, int locktime_arg, byte[] second_per_commitment_point_arg, COption_NoneZ require_confirmed_inputs_arg); // uint64_t OpenChannelV2_clone_ptr(LDKOpenChannelV2 *NONNULL_PTR arg); public static native long OpenChannelV2_clone_ptr(long arg); // struct LDKOpenChannelV2 OpenChannelV2_clone(const struct LDKOpenChannelV2 *NONNULL_PTR orig); @@ -8355,74 +9155,90 @@ public class bindings { public static native long OpenChannelV2_hash(long o); // bool OpenChannelV2_eq(const struct LDKOpenChannelV2 *NONNULL_PTR a, const struct LDKOpenChannelV2 *NONNULL_PTR b); public static native boolean OpenChannelV2_eq(long a, long b); + // void CommonAcceptChannelFields_free(struct LDKCommonAcceptChannelFields this_obj); + public static native void CommonAcceptChannelFields_free(long this_obj); + // struct LDKChannelId CommonAcceptChannelFields_get_temporary_channel_id(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); + public static native long CommonAcceptChannelFields_get_temporary_channel_id(long this_ptr); + // void CommonAcceptChannelFields_set_temporary_channel_id(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKChannelId val); + public static native void CommonAcceptChannelFields_set_temporary_channel_id(long this_ptr, long val); + // uint64_t CommonAcceptChannelFields_get_dust_limit_satoshis(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); + public static native long CommonAcceptChannelFields_get_dust_limit_satoshis(long this_ptr); + // void CommonAcceptChannelFields_set_dust_limit_satoshis(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint64_t val); + public static native void CommonAcceptChannelFields_set_dust_limit_satoshis(long this_ptr, long val); + // uint64_t CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); + public static native long CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat(long this_ptr); + // void CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint64_t val); + public static native void CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat(long this_ptr, long val); + // uint64_t CommonAcceptChannelFields_get_htlc_minimum_msat(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); + public static native long CommonAcceptChannelFields_get_htlc_minimum_msat(long this_ptr); + // void CommonAcceptChannelFields_set_htlc_minimum_msat(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint64_t val); + public static native void CommonAcceptChannelFields_set_htlc_minimum_msat(long this_ptr, long val); + // uint32_t CommonAcceptChannelFields_get_minimum_depth(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); + public static native int CommonAcceptChannelFields_get_minimum_depth(long this_ptr); + // void CommonAcceptChannelFields_set_minimum_depth(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint32_t val); + public static native void CommonAcceptChannelFields_set_minimum_depth(long this_ptr, int val); + // uint16_t CommonAcceptChannelFields_get_to_self_delay(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); + public static native short CommonAcceptChannelFields_get_to_self_delay(long this_ptr); + // void CommonAcceptChannelFields_set_to_self_delay(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint16_t val); + public static native void CommonAcceptChannelFields_set_to_self_delay(long this_ptr, short val); + // uint16_t CommonAcceptChannelFields_get_max_accepted_htlcs(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); + public static native short CommonAcceptChannelFields_get_max_accepted_htlcs(long this_ptr); + // void CommonAcceptChannelFields_set_max_accepted_htlcs(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint16_t val); + public static native void CommonAcceptChannelFields_set_max_accepted_htlcs(long this_ptr, short val); + // struct LDKPublicKey CommonAcceptChannelFields_get_funding_pubkey(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); + public static native byte[] CommonAcceptChannelFields_get_funding_pubkey(long this_ptr); + // void CommonAcceptChannelFields_set_funding_pubkey(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); + public static native void CommonAcceptChannelFields_set_funding_pubkey(long this_ptr, byte[] val); + // struct LDKPublicKey CommonAcceptChannelFields_get_revocation_basepoint(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); + public static native byte[] CommonAcceptChannelFields_get_revocation_basepoint(long this_ptr); + // void CommonAcceptChannelFields_set_revocation_basepoint(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); + public static native void CommonAcceptChannelFields_set_revocation_basepoint(long this_ptr, byte[] val); + // struct LDKPublicKey CommonAcceptChannelFields_get_payment_basepoint(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); + public static native byte[] CommonAcceptChannelFields_get_payment_basepoint(long this_ptr); + // void CommonAcceptChannelFields_set_payment_basepoint(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); + public static native void CommonAcceptChannelFields_set_payment_basepoint(long this_ptr, byte[] val); + // struct LDKPublicKey CommonAcceptChannelFields_get_delayed_payment_basepoint(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); + public static native byte[] CommonAcceptChannelFields_get_delayed_payment_basepoint(long this_ptr); + // void CommonAcceptChannelFields_set_delayed_payment_basepoint(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); + public static native void CommonAcceptChannelFields_set_delayed_payment_basepoint(long this_ptr, byte[] val); + // struct LDKPublicKey CommonAcceptChannelFields_get_htlc_basepoint(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); + public static native byte[] CommonAcceptChannelFields_get_htlc_basepoint(long this_ptr); + // void CommonAcceptChannelFields_set_htlc_basepoint(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); + public static native void CommonAcceptChannelFields_set_htlc_basepoint(long this_ptr, byte[] val); + // struct LDKPublicKey CommonAcceptChannelFields_get_first_per_commitment_point(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); + public static native byte[] CommonAcceptChannelFields_get_first_per_commitment_point(long this_ptr); + // void CommonAcceptChannelFields_set_first_per_commitment_point(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); + public static native void CommonAcceptChannelFields_set_first_per_commitment_point(long this_ptr, byte[] val); + // struct LDKCOption_CVec_u8ZZ CommonAcceptChannelFields_get_shutdown_scriptpubkey(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); + public static native long CommonAcceptChannelFields_get_shutdown_scriptpubkey(long this_ptr); + // void CommonAcceptChannelFields_set_shutdown_scriptpubkey(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val); + public static native void CommonAcceptChannelFields_set_shutdown_scriptpubkey(long this_ptr, long val); + // struct LDKChannelTypeFeatures CommonAcceptChannelFields_get_channel_type(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); + public static native long CommonAcceptChannelFields_get_channel_type(long this_ptr); + // void CommonAcceptChannelFields_set_channel_type(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val); + public static native void CommonAcceptChannelFields_set_channel_type(long this_ptr, long val); + // MUST_USE_RES struct LDKCommonAcceptChannelFields CommonAcceptChannelFields_new(struct LDKChannelId temporary_channel_id_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t htlc_minimum_msat_arg, uint32_t minimum_depth_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_basepoint_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, struct LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg); + public static native long CommonAcceptChannelFields_new(long temporary_channel_id_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long htlc_minimum_msat_arg, int minimum_depth_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_basepoint_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, long shutdown_scriptpubkey_arg, long channel_type_arg); + // uint64_t CommonAcceptChannelFields_clone_ptr(LDKCommonAcceptChannelFields *NONNULL_PTR arg); + public static native long CommonAcceptChannelFields_clone_ptr(long arg); + // struct LDKCommonAcceptChannelFields CommonAcceptChannelFields_clone(const struct LDKCommonAcceptChannelFields *NONNULL_PTR orig); + public static native long CommonAcceptChannelFields_clone(long orig); + // uint64_t CommonAcceptChannelFields_hash(const struct LDKCommonAcceptChannelFields *NONNULL_PTR o); + public static native long CommonAcceptChannelFields_hash(long o); + // bool CommonAcceptChannelFields_eq(const struct LDKCommonAcceptChannelFields *NONNULL_PTR a, const struct LDKCommonAcceptChannelFields *NONNULL_PTR b); + public static native boolean CommonAcceptChannelFields_eq(long a, long b); // void AcceptChannel_free(struct LDKAcceptChannel this_obj); public static native void AcceptChannel_free(long this_obj); - // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32]; - public static native byte[] AcceptChannel_get_temporary_channel_id(long this_ptr); - // void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void AcceptChannel_set_temporary_channel_id(long this_ptr, byte[] val); - // uint64_t AcceptChannel_get_dust_limit_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); - public static native long AcceptChannel_get_dust_limit_satoshis(long this_ptr); - // void AcceptChannel_set_dust_limit_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val); - public static native void AcceptChannel_set_dust_limit_satoshis(long this_ptr, long val); - // uint64_t AcceptChannel_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); - public static native long AcceptChannel_get_max_htlc_value_in_flight_msat(long this_ptr); - // void AcceptChannel_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val); - public static native void AcceptChannel_set_max_htlc_value_in_flight_msat(long this_ptr, long val); + // struct LDKCommonAcceptChannelFields AcceptChannel_get_common_fields(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); + public static native long AcceptChannel_get_common_fields(long this_ptr); + // void AcceptChannel_set_common_fields(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKCommonAcceptChannelFields val); + public static native void AcceptChannel_set_common_fields(long this_ptr, long val); // uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); public static native long AcceptChannel_get_channel_reserve_satoshis(long this_ptr); // void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val); public static native void AcceptChannel_set_channel_reserve_satoshis(long this_ptr, long val); - // uint64_t AcceptChannel_get_htlc_minimum_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); - public static native long AcceptChannel_get_htlc_minimum_msat(long this_ptr); - // void AcceptChannel_set_htlc_minimum_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val); - public static native void AcceptChannel_set_htlc_minimum_msat(long this_ptr, long val); - // uint32_t AcceptChannel_get_minimum_depth(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); - public static native int AcceptChannel_get_minimum_depth(long this_ptr); - // void AcceptChannel_set_minimum_depth(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint32_t val); - public static native void AcceptChannel_set_minimum_depth(long this_ptr, int val); - // uint16_t AcceptChannel_get_to_self_delay(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); - public static native short AcceptChannel_get_to_self_delay(long this_ptr); - // void AcceptChannel_set_to_self_delay(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val); - public static native void AcceptChannel_set_to_self_delay(long this_ptr, short val); - // uint16_t AcceptChannel_get_max_accepted_htlcs(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); - public static native short AcceptChannel_get_max_accepted_htlcs(long this_ptr); - // void AcceptChannel_set_max_accepted_htlcs(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val); - public static native void AcceptChannel_set_max_accepted_htlcs(long this_ptr, short val); - // struct LDKPublicKey AcceptChannel_get_funding_pubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); - public static native byte[] AcceptChannel_get_funding_pubkey(long this_ptr); - // void AcceptChannel_set_funding_pubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); - public static native void AcceptChannel_set_funding_pubkey(long this_ptr, byte[] val); - // struct LDKPublicKey AcceptChannel_get_revocation_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); - public static native byte[] AcceptChannel_get_revocation_basepoint(long this_ptr); - // void AcceptChannel_set_revocation_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); - public static native void AcceptChannel_set_revocation_basepoint(long this_ptr, byte[] val); - // struct LDKPublicKey AcceptChannel_get_payment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); - public static native byte[] AcceptChannel_get_payment_point(long this_ptr); - // void AcceptChannel_set_payment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); - public static native void AcceptChannel_set_payment_point(long this_ptr, byte[] val); - // struct LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); - public static native byte[] AcceptChannel_get_delayed_payment_basepoint(long this_ptr); - // void AcceptChannel_set_delayed_payment_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); - public static native void AcceptChannel_set_delayed_payment_basepoint(long this_ptr, byte[] val); - // struct LDKPublicKey AcceptChannel_get_htlc_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); - public static native byte[] AcceptChannel_get_htlc_basepoint(long this_ptr); - // void AcceptChannel_set_htlc_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); - public static native void AcceptChannel_set_htlc_basepoint(long this_ptr, byte[] val); - // struct LDKPublicKey AcceptChannel_get_first_per_commitment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); - public static native byte[] AcceptChannel_get_first_per_commitment_point(long this_ptr); - // void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); - public static native void AcceptChannel_set_first_per_commitment_point(long this_ptr, byte[] val); - // struct LDKCOption_CVec_u8ZZ AcceptChannel_get_shutdown_scriptpubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); - public static native long AcceptChannel_get_shutdown_scriptpubkey(long this_ptr); - // void AcceptChannel_set_shutdown_scriptpubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val); - public static native void AcceptChannel_set_shutdown_scriptpubkey(long this_ptr, long val); - // struct LDKChannelTypeFeatures AcceptChannel_get_channel_type(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); - public static native long AcceptChannel_get_channel_type(long this_ptr); - // void AcceptChannel_set_channel_type(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val); - public static native void AcceptChannel_set_channel_type(long this_ptr, long val); - // MUST_USE_RES struct LDKAcceptChannel AcceptChannel_new(struct LDKThirtyTwoBytes temporary_channel_id_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t channel_reserve_satoshis_arg, uint64_t htlc_minimum_msat_arg, uint32_t minimum_depth_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_point_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, struct LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg); - public static native long AcceptChannel_new(byte[] temporary_channel_id_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long channel_reserve_satoshis_arg, long htlc_minimum_msat_arg, int minimum_depth_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_point_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, long shutdown_scriptpubkey_arg, long channel_type_arg); + // MUST_USE_RES struct LDKAcceptChannel AcceptChannel_new(struct LDKCommonAcceptChannelFields common_fields_arg, uint64_t channel_reserve_satoshis_arg); + public static native long AcceptChannel_new(long common_fields_arg, long channel_reserve_satoshis_arg); // uint64_t AcceptChannel_clone_ptr(LDKAcceptChannel *NONNULL_PTR arg); public static native long AcceptChannel_clone_ptr(long arg); // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig); @@ -8433,80 +9249,24 @@ public class bindings { public static native boolean AcceptChannel_eq(long a, long b); // void AcceptChannelV2_free(struct LDKAcceptChannelV2 this_obj); public static native void AcceptChannelV2_free(long this_obj); - // const uint8_t (*AcceptChannelV2_get_temporary_channel_id(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr))[32]; - public static native byte[] AcceptChannelV2_get_temporary_channel_id(long this_ptr); - // void AcceptChannelV2_set_temporary_channel_id(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void AcceptChannelV2_set_temporary_channel_id(long this_ptr, byte[] val); + // struct LDKCommonAcceptChannelFields AcceptChannelV2_get_common_fields(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); + public static native long AcceptChannelV2_get_common_fields(long this_ptr); + // void AcceptChannelV2_set_common_fields(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKCommonAcceptChannelFields val); + public static native void AcceptChannelV2_set_common_fields(long this_ptr, long val); // uint64_t AcceptChannelV2_get_funding_satoshis(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); public static native long AcceptChannelV2_get_funding_satoshis(long this_ptr); // void AcceptChannelV2_set_funding_satoshis(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint64_t val); public static native void AcceptChannelV2_set_funding_satoshis(long this_ptr, long val); - // uint64_t AcceptChannelV2_get_dust_limit_satoshis(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); - public static native long AcceptChannelV2_get_dust_limit_satoshis(long this_ptr); - // void AcceptChannelV2_set_dust_limit_satoshis(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint64_t val); - public static native void AcceptChannelV2_set_dust_limit_satoshis(long this_ptr, long val); - // uint64_t AcceptChannelV2_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); - public static native long AcceptChannelV2_get_max_htlc_value_in_flight_msat(long this_ptr); - // void AcceptChannelV2_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint64_t val); - public static native void AcceptChannelV2_set_max_htlc_value_in_flight_msat(long this_ptr, long val); - // uint64_t AcceptChannelV2_get_htlc_minimum_msat(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); - public static native long AcceptChannelV2_get_htlc_minimum_msat(long this_ptr); - // void AcceptChannelV2_set_htlc_minimum_msat(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint64_t val); - public static native void AcceptChannelV2_set_htlc_minimum_msat(long this_ptr, long val); - // uint32_t AcceptChannelV2_get_minimum_depth(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); - public static native int AcceptChannelV2_get_minimum_depth(long this_ptr); - // void AcceptChannelV2_set_minimum_depth(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint32_t val); - public static native void AcceptChannelV2_set_minimum_depth(long this_ptr, int val); - // uint16_t AcceptChannelV2_get_to_self_delay(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); - public static native short AcceptChannelV2_get_to_self_delay(long this_ptr); - // void AcceptChannelV2_set_to_self_delay(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint16_t val); - public static native void AcceptChannelV2_set_to_self_delay(long this_ptr, short val); - // uint16_t AcceptChannelV2_get_max_accepted_htlcs(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); - public static native short AcceptChannelV2_get_max_accepted_htlcs(long this_ptr); - // void AcceptChannelV2_set_max_accepted_htlcs(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint16_t val); - public static native void AcceptChannelV2_set_max_accepted_htlcs(long this_ptr, short val); - // struct LDKPublicKey AcceptChannelV2_get_funding_pubkey(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); - public static native byte[] AcceptChannelV2_get_funding_pubkey(long this_ptr); - // void AcceptChannelV2_set_funding_pubkey(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); - public static native void AcceptChannelV2_set_funding_pubkey(long this_ptr, byte[] val); - // struct LDKPublicKey AcceptChannelV2_get_revocation_basepoint(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); - public static native byte[] AcceptChannelV2_get_revocation_basepoint(long this_ptr); - // void AcceptChannelV2_set_revocation_basepoint(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); - public static native void AcceptChannelV2_set_revocation_basepoint(long this_ptr, byte[] val); - // struct LDKPublicKey AcceptChannelV2_get_payment_basepoint(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); - public static native byte[] AcceptChannelV2_get_payment_basepoint(long this_ptr); - // void AcceptChannelV2_set_payment_basepoint(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); - public static native void AcceptChannelV2_set_payment_basepoint(long this_ptr, byte[] val); - // struct LDKPublicKey AcceptChannelV2_get_delayed_payment_basepoint(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); - public static native byte[] AcceptChannelV2_get_delayed_payment_basepoint(long this_ptr); - // void AcceptChannelV2_set_delayed_payment_basepoint(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); - public static native void AcceptChannelV2_set_delayed_payment_basepoint(long this_ptr, byte[] val); - // struct LDKPublicKey AcceptChannelV2_get_htlc_basepoint(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); - public static native byte[] AcceptChannelV2_get_htlc_basepoint(long this_ptr); - // void AcceptChannelV2_set_htlc_basepoint(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); - public static native void AcceptChannelV2_set_htlc_basepoint(long this_ptr, byte[] val); - // struct LDKPublicKey AcceptChannelV2_get_first_per_commitment_point(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); - public static native byte[] AcceptChannelV2_get_first_per_commitment_point(long this_ptr); - // void AcceptChannelV2_set_first_per_commitment_point(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); - public static native void AcceptChannelV2_set_first_per_commitment_point(long this_ptr, byte[] val); // struct LDKPublicKey AcceptChannelV2_get_second_per_commitment_point(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); public static native byte[] AcceptChannelV2_get_second_per_commitment_point(long this_ptr); // void AcceptChannelV2_set_second_per_commitment_point(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); public static native void AcceptChannelV2_set_second_per_commitment_point(long this_ptr, byte[] val); - // struct LDKCOption_CVec_u8ZZ AcceptChannelV2_get_shutdown_scriptpubkey(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); - public static native long AcceptChannelV2_get_shutdown_scriptpubkey(long this_ptr); - // void AcceptChannelV2_set_shutdown_scriptpubkey(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val); - public static native void AcceptChannelV2_set_shutdown_scriptpubkey(long this_ptr, long val); - // struct LDKChannelTypeFeatures AcceptChannelV2_get_channel_type(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); - public static native long AcceptChannelV2_get_channel_type(long this_ptr); - // void AcceptChannelV2_set_channel_type(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val); - public static native void AcceptChannelV2_set_channel_type(long this_ptr, long val); // enum LDKCOption_NoneZ AcceptChannelV2_get_require_confirmed_inputs(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); public static native COption_NoneZ AcceptChannelV2_get_require_confirmed_inputs(long this_ptr); // void AcceptChannelV2_set_require_confirmed_inputs(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, enum LDKCOption_NoneZ val); public static native void AcceptChannelV2_set_require_confirmed_inputs(long this_ptr, COption_NoneZ val); - // MUST_USE_RES struct LDKAcceptChannelV2 AcceptChannelV2_new(struct LDKThirtyTwoBytes temporary_channel_id_arg, uint64_t funding_satoshis_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t htlc_minimum_msat_arg, uint32_t minimum_depth_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_basepoint_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, struct LDKPublicKey second_per_commitment_point_arg, struct LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg, enum LDKCOption_NoneZ require_confirmed_inputs_arg); - public static native long AcceptChannelV2_new(byte[] temporary_channel_id_arg, long funding_satoshis_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long htlc_minimum_msat_arg, int minimum_depth_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_basepoint_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, byte[] second_per_commitment_point_arg, long shutdown_scriptpubkey_arg, long channel_type_arg, COption_NoneZ require_confirmed_inputs_arg); + // MUST_USE_RES struct LDKAcceptChannelV2 AcceptChannelV2_new(struct LDKCommonAcceptChannelFields common_fields_arg, uint64_t funding_satoshis_arg, struct LDKPublicKey second_per_commitment_point_arg, enum LDKCOption_NoneZ require_confirmed_inputs_arg); + public static native long AcceptChannelV2_new(long common_fields_arg, long funding_satoshis_arg, byte[] second_per_commitment_point_arg, COption_NoneZ require_confirmed_inputs_arg); // uint64_t AcceptChannelV2_clone_ptr(LDKAcceptChannelV2 *NONNULL_PTR arg); public static native long AcceptChannelV2_clone_ptr(long arg); // struct LDKAcceptChannelV2 AcceptChannelV2_clone(const struct LDKAcceptChannelV2 *NONNULL_PTR orig); @@ -8517,10 +9277,10 @@ public class bindings { public static native boolean AcceptChannelV2_eq(long a, long b); // void FundingCreated_free(struct LDKFundingCreated this_obj); public static native void FundingCreated_free(long this_obj); - // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32]; - public static native byte[] FundingCreated_get_temporary_channel_id(long this_ptr); - // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void FundingCreated_set_temporary_channel_id(long this_ptr, byte[] val); + // struct LDKChannelId FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr); + public static native long FundingCreated_get_temporary_channel_id(long this_ptr); + // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKChannelId val); + public static native void FundingCreated_set_temporary_channel_id(long this_ptr, long val); // const uint8_t (*FundingCreated_get_funding_txid(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32]; public static native byte[] FundingCreated_get_funding_txid(long this_ptr); // void FundingCreated_set_funding_txid(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); @@ -8533,8 +9293,8 @@ public class bindings { public static native byte[] FundingCreated_get_signature(long this_ptr); // void FundingCreated_set_signature(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKECDSASignature val); public static native void FundingCreated_set_signature(long this_ptr, byte[] val); - // MUST_USE_RES struct LDKFundingCreated FundingCreated_new(struct LDKThirtyTwoBytes temporary_channel_id_arg, struct LDKThirtyTwoBytes funding_txid_arg, uint16_t funding_output_index_arg, struct LDKECDSASignature signature_arg); - public static native long FundingCreated_new(byte[] temporary_channel_id_arg, byte[] funding_txid_arg, short funding_output_index_arg, byte[] signature_arg); + // MUST_USE_RES struct LDKFundingCreated FundingCreated_new(struct LDKChannelId temporary_channel_id_arg, struct LDKThirtyTwoBytes funding_txid_arg, uint16_t funding_output_index_arg, struct LDKECDSASignature signature_arg); + public static native long FundingCreated_new(long temporary_channel_id_arg, byte[] funding_txid_arg, short funding_output_index_arg, byte[] signature_arg); // uint64_t FundingCreated_clone_ptr(LDKFundingCreated *NONNULL_PTR arg); public static native long FundingCreated_clone_ptr(long arg); // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig); @@ -8545,16 +9305,16 @@ public class bindings { public static native boolean FundingCreated_eq(long a, long b); // void FundingSigned_free(struct LDKFundingSigned this_obj); public static native void FundingSigned_free(long this_obj); - // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32]; - public static native byte[] FundingSigned_get_channel_id(long this_ptr); - // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void FundingSigned_set_channel_id(long this_ptr, byte[] val); + // struct LDKChannelId FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr); + public static native long FundingSigned_get_channel_id(long this_ptr); + // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKChannelId val); + public static native void FundingSigned_set_channel_id(long this_ptr, long val); // struct LDKECDSASignature FundingSigned_get_signature(const struct LDKFundingSigned *NONNULL_PTR this_ptr); public static native byte[] FundingSigned_get_signature(long this_ptr); // void FundingSigned_set_signature(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKECDSASignature val); public static native void FundingSigned_set_signature(long this_ptr, byte[] val); - // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKECDSASignature signature_arg); - public static native long FundingSigned_new(byte[] channel_id_arg, byte[] signature_arg); + // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKChannelId channel_id_arg, struct LDKECDSASignature signature_arg); + public static native long FundingSigned_new(long channel_id_arg, byte[] signature_arg); // uint64_t FundingSigned_clone_ptr(LDKFundingSigned *NONNULL_PTR arg); public static native long FundingSigned_clone_ptr(long arg); // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig); @@ -8565,10 +9325,10 @@ public class bindings { public static native boolean FundingSigned_eq(long a, long b); // void ChannelReady_free(struct LDKChannelReady this_obj); public static native void ChannelReady_free(long this_obj); - // const uint8_t (*ChannelReady_get_channel_id(const struct LDKChannelReady *NONNULL_PTR this_ptr))[32]; - public static native byte[] ChannelReady_get_channel_id(long this_ptr); - // void ChannelReady_set_channel_id(struct LDKChannelReady *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void ChannelReady_set_channel_id(long this_ptr, byte[] val); + // struct LDKChannelId ChannelReady_get_channel_id(const struct LDKChannelReady *NONNULL_PTR this_ptr); + public static native long ChannelReady_get_channel_id(long this_ptr); + // void ChannelReady_set_channel_id(struct LDKChannelReady *NONNULL_PTR this_ptr, struct LDKChannelId val); + public static native void ChannelReady_set_channel_id(long this_ptr, long val); // struct LDKPublicKey ChannelReady_get_next_per_commitment_point(const struct LDKChannelReady *NONNULL_PTR this_ptr); public static native byte[] ChannelReady_get_next_per_commitment_point(long this_ptr); // void ChannelReady_set_next_per_commitment_point(struct LDKChannelReady *NONNULL_PTR this_ptr, struct LDKPublicKey val); @@ -8577,8 +9337,8 @@ public class bindings { public static native long ChannelReady_get_short_channel_id_alias(long this_ptr); // void ChannelReady_set_short_channel_id_alias(struct LDKChannelReady *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val); public static native void ChannelReady_set_short_channel_id_alias(long this_ptr, long val); - // MUST_USE_RES struct LDKChannelReady ChannelReady_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg, struct LDKCOption_u64Z short_channel_id_alias_arg); - public static native long ChannelReady_new(byte[] channel_id_arg, byte[] next_per_commitment_point_arg, long short_channel_id_alias_arg); + // MUST_USE_RES struct LDKChannelReady ChannelReady_new(struct LDKChannelId channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg, struct LDKCOption_u64Z short_channel_id_alias_arg); + public static native long ChannelReady_new(long channel_id_arg, byte[] next_per_commitment_point_arg, long short_channel_id_alias_arg); // uint64_t ChannelReady_clone_ptr(LDKChannelReady *NONNULL_PTR arg); public static native long ChannelReady_clone_ptr(long arg); // struct LDKChannelReady ChannelReady_clone(const struct LDKChannelReady *NONNULL_PTR orig); @@ -8589,16 +9349,16 @@ public class bindings { public static native boolean ChannelReady_eq(long a, long b); // void Stfu_free(struct LDKStfu this_obj); public static native void Stfu_free(long this_obj); - // const uint8_t (*Stfu_get_channel_id(const struct LDKStfu *NONNULL_PTR this_ptr))[32]; - public static native byte[] Stfu_get_channel_id(long this_ptr); - // void Stfu_set_channel_id(struct LDKStfu *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void Stfu_set_channel_id(long this_ptr, byte[] val); + // struct LDKChannelId Stfu_get_channel_id(const struct LDKStfu *NONNULL_PTR this_ptr); + public static native long Stfu_get_channel_id(long this_ptr); + // void Stfu_set_channel_id(struct LDKStfu *NONNULL_PTR this_ptr, struct LDKChannelId val); + public static native void Stfu_set_channel_id(long this_ptr, long val); // uint8_t Stfu_get_initiator(const struct LDKStfu *NONNULL_PTR this_ptr); public static native byte Stfu_get_initiator(long this_ptr); // void Stfu_set_initiator(struct LDKStfu *NONNULL_PTR this_ptr, uint8_t val); public static native void Stfu_set_initiator(long this_ptr, byte val); - // MUST_USE_RES struct LDKStfu Stfu_new(struct LDKThirtyTwoBytes channel_id_arg, uint8_t initiator_arg); - public static native long Stfu_new(byte[] channel_id_arg, byte initiator_arg); + // MUST_USE_RES struct LDKStfu Stfu_new(struct LDKChannelId channel_id_arg, uint8_t initiator_arg); + public static native long Stfu_new(long channel_id_arg, byte initiator_arg); // uint64_t Stfu_clone_ptr(LDKStfu *NONNULL_PTR arg); public static native long Stfu_clone_ptr(long arg); // struct LDKStfu Stfu_clone(const struct LDKStfu *NONNULL_PTR orig); @@ -8607,10 +9367,10 @@ public class bindings { public static native boolean Stfu_eq(long a, long b); // void Splice_free(struct LDKSplice this_obj); public static native void Splice_free(long this_obj); - // const uint8_t (*Splice_get_channel_id(const struct LDKSplice *NONNULL_PTR this_ptr))[32]; - public static native byte[] Splice_get_channel_id(long this_ptr); - // void Splice_set_channel_id(struct LDKSplice *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void Splice_set_channel_id(long this_ptr, byte[] val); + // struct LDKChannelId Splice_get_channel_id(const struct LDKSplice *NONNULL_PTR this_ptr); + public static native long Splice_get_channel_id(long this_ptr); + // void Splice_set_channel_id(struct LDKSplice *NONNULL_PTR this_ptr, struct LDKChannelId val); + public static native void Splice_set_channel_id(long this_ptr, long val); // const uint8_t (*Splice_get_chain_hash(const struct LDKSplice *NONNULL_PTR this_ptr))[32]; public static native byte[] Splice_get_chain_hash(long this_ptr); // void Splice_set_chain_hash(struct LDKSplice *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); @@ -8631,8 +9391,8 @@ public class bindings { public static native byte[] Splice_get_funding_pubkey(long this_ptr); // void Splice_set_funding_pubkey(struct LDKSplice *NONNULL_PTR this_ptr, struct LDKPublicKey val); public static native void Splice_set_funding_pubkey(long this_ptr, byte[] val); - // MUST_USE_RES struct LDKSplice Splice_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKThirtyTwoBytes chain_hash_arg, int64_t relative_satoshis_arg, uint32_t funding_feerate_perkw_arg, uint32_t locktime_arg, struct LDKPublicKey funding_pubkey_arg); - public static native long Splice_new(byte[] channel_id_arg, byte[] chain_hash_arg, long relative_satoshis_arg, int funding_feerate_perkw_arg, int locktime_arg, byte[] funding_pubkey_arg); + // MUST_USE_RES struct LDKSplice Splice_new(struct LDKChannelId channel_id_arg, struct LDKThirtyTwoBytes chain_hash_arg, int64_t relative_satoshis_arg, uint32_t funding_feerate_perkw_arg, uint32_t locktime_arg, struct LDKPublicKey funding_pubkey_arg); + public static native long Splice_new(long channel_id_arg, byte[] chain_hash_arg, long relative_satoshis_arg, int funding_feerate_perkw_arg, int locktime_arg, byte[] funding_pubkey_arg); // uint64_t Splice_clone_ptr(LDKSplice *NONNULL_PTR arg); public static native long Splice_clone_ptr(long arg); // struct LDKSplice Splice_clone(const struct LDKSplice *NONNULL_PTR orig); @@ -8641,10 +9401,10 @@ public class bindings { public static native boolean Splice_eq(long a, long b); // void SpliceAck_free(struct LDKSpliceAck this_obj); public static native void SpliceAck_free(long this_obj); - // const uint8_t (*SpliceAck_get_channel_id(const struct LDKSpliceAck *NONNULL_PTR this_ptr))[32]; - public static native byte[] SpliceAck_get_channel_id(long this_ptr); - // void SpliceAck_set_channel_id(struct LDKSpliceAck *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void SpliceAck_set_channel_id(long this_ptr, byte[] val); + // struct LDKChannelId SpliceAck_get_channel_id(const struct LDKSpliceAck *NONNULL_PTR this_ptr); + public static native long SpliceAck_get_channel_id(long this_ptr); + // void SpliceAck_set_channel_id(struct LDKSpliceAck *NONNULL_PTR this_ptr, struct LDKChannelId val); + public static native void SpliceAck_set_channel_id(long this_ptr, long val); // const uint8_t (*SpliceAck_get_chain_hash(const struct LDKSpliceAck *NONNULL_PTR this_ptr))[32]; public static native byte[] SpliceAck_get_chain_hash(long this_ptr); // void SpliceAck_set_chain_hash(struct LDKSpliceAck *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); @@ -8657,8 +9417,8 @@ public class bindings { public static native byte[] SpliceAck_get_funding_pubkey(long this_ptr); // void SpliceAck_set_funding_pubkey(struct LDKSpliceAck *NONNULL_PTR this_ptr, struct LDKPublicKey val); public static native void SpliceAck_set_funding_pubkey(long this_ptr, byte[] val); - // MUST_USE_RES struct LDKSpliceAck SpliceAck_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKThirtyTwoBytes chain_hash_arg, int64_t relative_satoshis_arg, struct LDKPublicKey funding_pubkey_arg); - public static native long SpliceAck_new(byte[] channel_id_arg, byte[] chain_hash_arg, long relative_satoshis_arg, byte[] funding_pubkey_arg); + // MUST_USE_RES struct LDKSpliceAck SpliceAck_new(struct LDKChannelId channel_id_arg, struct LDKThirtyTwoBytes chain_hash_arg, int64_t relative_satoshis_arg, struct LDKPublicKey funding_pubkey_arg); + public static native long SpliceAck_new(long channel_id_arg, byte[] chain_hash_arg, long relative_satoshis_arg, byte[] funding_pubkey_arg); // uint64_t SpliceAck_clone_ptr(LDKSpliceAck *NONNULL_PTR arg); public static native long SpliceAck_clone_ptr(long arg); // struct LDKSpliceAck SpliceAck_clone(const struct LDKSpliceAck *NONNULL_PTR orig); @@ -8667,12 +9427,12 @@ public class bindings { public static native boolean SpliceAck_eq(long a, long b); // void SpliceLocked_free(struct LDKSpliceLocked this_obj); public static native void SpliceLocked_free(long this_obj); - // const uint8_t (*SpliceLocked_get_channel_id(const struct LDKSpliceLocked *NONNULL_PTR this_ptr))[32]; - public static native byte[] SpliceLocked_get_channel_id(long this_ptr); - // void SpliceLocked_set_channel_id(struct LDKSpliceLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void SpliceLocked_set_channel_id(long this_ptr, byte[] val); - // MUST_USE_RES struct LDKSpliceLocked SpliceLocked_new(struct LDKThirtyTwoBytes channel_id_arg); - public static native long SpliceLocked_new(byte[] channel_id_arg); + // struct LDKChannelId SpliceLocked_get_channel_id(const struct LDKSpliceLocked *NONNULL_PTR this_ptr); + public static native long SpliceLocked_get_channel_id(long this_ptr); + // void SpliceLocked_set_channel_id(struct LDKSpliceLocked *NONNULL_PTR this_ptr, struct LDKChannelId val); + public static native void SpliceLocked_set_channel_id(long this_ptr, long val); + // MUST_USE_RES struct LDKSpliceLocked SpliceLocked_new(struct LDKChannelId channel_id_arg); + public static native long SpliceLocked_new(long channel_id_arg); // uint64_t SpliceLocked_clone_ptr(LDKSpliceLocked *NONNULL_PTR arg); public static native long SpliceLocked_clone_ptr(long arg); // struct LDKSpliceLocked SpliceLocked_clone(const struct LDKSpliceLocked *NONNULL_PTR orig); @@ -8681,10 +9441,10 @@ public class bindings { public static native boolean SpliceLocked_eq(long a, long b); // void TxAddInput_free(struct LDKTxAddInput this_obj); public static native void TxAddInput_free(long this_obj); - // const uint8_t (*TxAddInput_get_channel_id(const struct LDKTxAddInput *NONNULL_PTR this_ptr))[32]; - public static native byte[] TxAddInput_get_channel_id(long this_ptr); - // void TxAddInput_set_channel_id(struct LDKTxAddInput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void TxAddInput_set_channel_id(long this_ptr, byte[] val); + // struct LDKChannelId TxAddInput_get_channel_id(const struct LDKTxAddInput *NONNULL_PTR this_ptr); + public static native long TxAddInput_get_channel_id(long this_ptr); + // void TxAddInput_set_channel_id(struct LDKTxAddInput *NONNULL_PTR this_ptr, struct LDKChannelId val); + public static native void TxAddInput_set_channel_id(long this_ptr, long val); // uint64_t TxAddInput_get_serial_id(const struct LDKTxAddInput *NONNULL_PTR this_ptr); public static native long TxAddInput_get_serial_id(long this_ptr); // void TxAddInput_set_serial_id(struct LDKTxAddInput *NONNULL_PTR this_ptr, uint64_t val); @@ -8701,8 +9461,8 @@ public class bindings { public static native int TxAddInput_get_sequence(long this_ptr); // void TxAddInput_set_sequence(struct LDKTxAddInput *NONNULL_PTR this_ptr, uint32_t val); public static native void TxAddInput_set_sequence(long this_ptr, int val); - // MUST_USE_RES struct LDKTxAddInput TxAddInput_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t serial_id_arg, struct LDKTransactionU16LenLimited prevtx_arg, uint32_t prevtx_out_arg, uint32_t sequence_arg); - public static native long TxAddInput_new(byte[] channel_id_arg, long serial_id_arg, long prevtx_arg, int prevtx_out_arg, int sequence_arg); + // MUST_USE_RES struct LDKTxAddInput TxAddInput_new(struct LDKChannelId channel_id_arg, uint64_t serial_id_arg, struct LDKTransactionU16LenLimited prevtx_arg, uint32_t prevtx_out_arg, uint32_t sequence_arg); + public static native long TxAddInput_new(long channel_id_arg, long serial_id_arg, long prevtx_arg, int prevtx_out_arg, int sequence_arg); // uint64_t TxAddInput_clone_ptr(LDKTxAddInput *NONNULL_PTR arg); public static native long TxAddInput_clone_ptr(long arg); // struct LDKTxAddInput TxAddInput_clone(const struct LDKTxAddInput *NONNULL_PTR orig); @@ -8713,10 +9473,10 @@ public class bindings { public static native boolean TxAddInput_eq(long a, long b); // void TxAddOutput_free(struct LDKTxAddOutput this_obj); public static native void TxAddOutput_free(long this_obj); - // const uint8_t (*TxAddOutput_get_channel_id(const struct LDKTxAddOutput *NONNULL_PTR this_ptr))[32]; - public static native byte[] TxAddOutput_get_channel_id(long this_ptr); - // void TxAddOutput_set_channel_id(struct LDKTxAddOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void TxAddOutput_set_channel_id(long this_ptr, byte[] val); + // struct LDKChannelId TxAddOutput_get_channel_id(const struct LDKTxAddOutput *NONNULL_PTR this_ptr); + public static native long TxAddOutput_get_channel_id(long this_ptr); + // void TxAddOutput_set_channel_id(struct LDKTxAddOutput *NONNULL_PTR this_ptr, struct LDKChannelId val); + public static native void TxAddOutput_set_channel_id(long this_ptr, long val); // uint64_t TxAddOutput_get_serial_id(const struct LDKTxAddOutput *NONNULL_PTR this_ptr); public static native long TxAddOutput_get_serial_id(long this_ptr); // void TxAddOutput_set_serial_id(struct LDKTxAddOutput *NONNULL_PTR this_ptr, uint64_t val); @@ -8729,8 +9489,8 @@ public class bindings { public static native byte[] TxAddOutput_get_script(long this_ptr); // void TxAddOutput_set_script(struct LDKTxAddOutput *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val); public static native void TxAddOutput_set_script(long this_ptr, byte[] val); - // MUST_USE_RES struct LDKTxAddOutput TxAddOutput_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t serial_id_arg, uint64_t sats_arg, struct LDKCVec_u8Z script_arg); - public static native long TxAddOutput_new(byte[] channel_id_arg, long serial_id_arg, long sats_arg, byte[] script_arg); + // MUST_USE_RES struct LDKTxAddOutput TxAddOutput_new(struct LDKChannelId channel_id_arg, uint64_t serial_id_arg, uint64_t sats_arg, struct LDKCVec_u8Z script_arg); + public static native long TxAddOutput_new(long channel_id_arg, long serial_id_arg, long sats_arg, byte[] script_arg); // uint64_t TxAddOutput_clone_ptr(LDKTxAddOutput *NONNULL_PTR arg); public static native long TxAddOutput_clone_ptr(long arg); // struct LDKTxAddOutput TxAddOutput_clone(const struct LDKTxAddOutput *NONNULL_PTR orig); @@ -8741,16 +9501,16 @@ public class bindings { public static native boolean TxAddOutput_eq(long a, long b); // void TxRemoveInput_free(struct LDKTxRemoveInput this_obj); public static native void TxRemoveInput_free(long this_obj); - // const uint8_t (*TxRemoveInput_get_channel_id(const struct LDKTxRemoveInput *NONNULL_PTR this_ptr))[32]; - public static native byte[] TxRemoveInput_get_channel_id(long this_ptr); - // void TxRemoveInput_set_channel_id(struct LDKTxRemoveInput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void TxRemoveInput_set_channel_id(long this_ptr, byte[] val); + // struct LDKChannelId TxRemoveInput_get_channel_id(const struct LDKTxRemoveInput *NONNULL_PTR this_ptr); + public static native long TxRemoveInput_get_channel_id(long this_ptr); + // void TxRemoveInput_set_channel_id(struct LDKTxRemoveInput *NONNULL_PTR this_ptr, struct LDKChannelId val); + public static native void TxRemoveInput_set_channel_id(long this_ptr, long val); // uint64_t TxRemoveInput_get_serial_id(const struct LDKTxRemoveInput *NONNULL_PTR this_ptr); public static native long TxRemoveInput_get_serial_id(long this_ptr); // void TxRemoveInput_set_serial_id(struct LDKTxRemoveInput *NONNULL_PTR this_ptr, uint64_t val); public static native void TxRemoveInput_set_serial_id(long this_ptr, long val); - // MUST_USE_RES struct LDKTxRemoveInput TxRemoveInput_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t serial_id_arg); - public static native long TxRemoveInput_new(byte[] channel_id_arg, long serial_id_arg); + // MUST_USE_RES struct LDKTxRemoveInput TxRemoveInput_new(struct LDKChannelId channel_id_arg, uint64_t serial_id_arg); + public static native long TxRemoveInput_new(long channel_id_arg, long serial_id_arg); // uint64_t TxRemoveInput_clone_ptr(LDKTxRemoveInput *NONNULL_PTR arg); public static native long TxRemoveInput_clone_ptr(long arg); // struct LDKTxRemoveInput TxRemoveInput_clone(const struct LDKTxRemoveInput *NONNULL_PTR orig); @@ -8761,16 +9521,16 @@ public class bindings { public static native boolean TxRemoveInput_eq(long a, long b); // void TxRemoveOutput_free(struct LDKTxRemoveOutput this_obj); public static native void TxRemoveOutput_free(long this_obj); - // const uint8_t (*TxRemoveOutput_get_channel_id(const struct LDKTxRemoveOutput *NONNULL_PTR this_ptr))[32]; - public static native byte[] TxRemoveOutput_get_channel_id(long this_ptr); - // void TxRemoveOutput_set_channel_id(struct LDKTxRemoveOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void TxRemoveOutput_set_channel_id(long this_ptr, byte[] val); + // struct LDKChannelId TxRemoveOutput_get_channel_id(const struct LDKTxRemoveOutput *NONNULL_PTR this_ptr); + public static native long TxRemoveOutput_get_channel_id(long this_ptr); + // void TxRemoveOutput_set_channel_id(struct LDKTxRemoveOutput *NONNULL_PTR this_ptr, struct LDKChannelId val); + public static native void TxRemoveOutput_set_channel_id(long this_ptr, long val); // uint64_t TxRemoveOutput_get_serial_id(const struct LDKTxRemoveOutput *NONNULL_PTR this_ptr); public static native long TxRemoveOutput_get_serial_id(long this_ptr); // void TxRemoveOutput_set_serial_id(struct LDKTxRemoveOutput *NONNULL_PTR this_ptr, uint64_t val); public static native void TxRemoveOutput_set_serial_id(long this_ptr, long val); - // MUST_USE_RES struct LDKTxRemoveOutput TxRemoveOutput_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t serial_id_arg); - public static native long TxRemoveOutput_new(byte[] channel_id_arg, long serial_id_arg); + // MUST_USE_RES struct LDKTxRemoveOutput TxRemoveOutput_new(struct LDKChannelId channel_id_arg, uint64_t serial_id_arg); + public static native long TxRemoveOutput_new(long channel_id_arg, long serial_id_arg); // uint64_t TxRemoveOutput_clone_ptr(LDKTxRemoveOutput *NONNULL_PTR arg); public static native long TxRemoveOutput_clone_ptr(long arg); // struct LDKTxRemoveOutput TxRemoveOutput_clone(const struct LDKTxRemoveOutput *NONNULL_PTR orig); @@ -8781,12 +9541,12 @@ public class bindings { public static native boolean TxRemoveOutput_eq(long a, long b); // void TxComplete_free(struct LDKTxComplete this_obj); public static native void TxComplete_free(long this_obj); - // const uint8_t (*TxComplete_get_channel_id(const struct LDKTxComplete *NONNULL_PTR this_ptr))[32]; - public static native byte[] TxComplete_get_channel_id(long this_ptr); - // void TxComplete_set_channel_id(struct LDKTxComplete *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void TxComplete_set_channel_id(long this_ptr, byte[] val); - // MUST_USE_RES struct LDKTxComplete TxComplete_new(struct LDKThirtyTwoBytes channel_id_arg); - public static native long TxComplete_new(byte[] channel_id_arg); + // struct LDKChannelId TxComplete_get_channel_id(const struct LDKTxComplete *NONNULL_PTR this_ptr); + public static native long TxComplete_get_channel_id(long this_ptr); + // void TxComplete_set_channel_id(struct LDKTxComplete *NONNULL_PTR this_ptr, struct LDKChannelId val); + public static native void TxComplete_set_channel_id(long this_ptr, long val); + // MUST_USE_RES struct LDKTxComplete TxComplete_new(struct LDKChannelId channel_id_arg); + public static native long TxComplete_new(long channel_id_arg); // uint64_t TxComplete_clone_ptr(LDKTxComplete *NONNULL_PTR arg); public static native long TxComplete_clone_ptr(long arg); // struct LDKTxComplete TxComplete_clone(const struct LDKTxComplete *NONNULL_PTR orig); @@ -8797,10 +9557,10 @@ public class bindings { public static native boolean TxComplete_eq(long a, long b); // void TxSignatures_free(struct LDKTxSignatures this_obj); public static native void TxSignatures_free(long this_obj); - // const uint8_t (*TxSignatures_get_channel_id(const struct LDKTxSignatures *NONNULL_PTR this_ptr))[32]; - public static native byte[] TxSignatures_get_channel_id(long this_ptr); - // void TxSignatures_set_channel_id(struct LDKTxSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void TxSignatures_set_channel_id(long this_ptr, byte[] val); + // struct LDKChannelId TxSignatures_get_channel_id(const struct LDKTxSignatures *NONNULL_PTR this_ptr); + public static native long TxSignatures_get_channel_id(long this_ptr); + // void TxSignatures_set_channel_id(struct LDKTxSignatures *NONNULL_PTR this_ptr, struct LDKChannelId val); + public static native void TxSignatures_set_channel_id(long this_ptr, long val); // const uint8_t (*TxSignatures_get_tx_hash(const struct LDKTxSignatures *NONNULL_PTR this_ptr))[32]; public static native byte[] TxSignatures_get_tx_hash(long this_ptr); // void TxSignatures_set_tx_hash(struct LDKTxSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); @@ -8809,8 +9569,12 @@ public class bindings { public static native byte[][] TxSignatures_get_witnesses(long this_ptr); // void TxSignatures_set_witnesses(struct LDKTxSignatures *NONNULL_PTR this_ptr, struct LDKCVec_WitnessZ val); public static native void TxSignatures_set_witnesses(long this_ptr, byte[][] val); - // MUST_USE_RES struct LDKTxSignatures TxSignatures_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKThirtyTwoBytes tx_hash_arg, struct LDKCVec_WitnessZ witnesses_arg); - public static native long TxSignatures_new(byte[] channel_id_arg, byte[] tx_hash_arg, byte[][] witnesses_arg); + // struct LDKCOption_ECDSASignatureZ TxSignatures_get_funding_outpoint_sig(const struct LDKTxSignatures *NONNULL_PTR this_ptr); + public static native long TxSignatures_get_funding_outpoint_sig(long this_ptr); + // void TxSignatures_set_funding_outpoint_sig(struct LDKTxSignatures *NONNULL_PTR this_ptr, struct LDKCOption_ECDSASignatureZ val); + public static native void TxSignatures_set_funding_outpoint_sig(long this_ptr, long val); + // MUST_USE_RES struct LDKTxSignatures TxSignatures_new(struct LDKChannelId channel_id_arg, struct LDKThirtyTwoBytes tx_hash_arg, struct LDKCVec_WitnessZ witnesses_arg, struct LDKCOption_ECDSASignatureZ funding_outpoint_sig_arg); + public static native long TxSignatures_new(long channel_id_arg, byte[] tx_hash_arg, byte[][] witnesses_arg, long funding_outpoint_sig_arg); // uint64_t TxSignatures_clone_ptr(LDKTxSignatures *NONNULL_PTR arg); public static native long TxSignatures_clone_ptr(long arg); // struct LDKTxSignatures TxSignatures_clone(const struct LDKTxSignatures *NONNULL_PTR orig); @@ -8821,10 +9585,10 @@ public class bindings { public static native boolean TxSignatures_eq(long a, long b); // void TxInitRbf_free(struct LDKTxInitRbf this_obj); public static native void TxInitRbf_free(long this_obj); - // const uint8_t (*TxInitRbf_get_channel_id(const struct LDKTxInitRbf *NONNULL_PTR this_ptr))[32]; - public static native byte[] TxInitRbf_get_channel_id(long this_ptr); - // void TxInitRbf_set_channel_id(struct LDKTxInitRbf *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void TxInitRbf_set_channel_id(long this_ptr, byte[] val); + // struct LDKChannelId TxInitRbf_get_channel_id(const struct LDKTxInitRbf *NONNULL_PTR this_ptr); + public static native long TxInitRbf_get_channel_id(long this_ptr); + // void TxInitRbf_set_channel_id(struct LDKTxInitRbf *NONNULL_PTR this_ptr, struct LDKChannelId val); + public static native void TxInitRbf_set_channel_id(long this_ptr, long val); // uint32_t TxInitRbf_get_locktime(const struct LDKTxInitRbf *NONNULL_PTR this_ptr); public static native int TxInitRbf_get_locktime(long this_ptr); // void TxInitRbf_set_locktime(struct LDKTxInitRbf *NONNULL_PTR this_ptr, uint32_t val); @@ -8837,8 +9601,8 @@ public class bindings { public static native long TxInitRbf_get_funding_output_contribution(long this_ptr); // void TxInitRbf_set_funding_output_contribution(struct LDKTxInitRbf *NONNULL_PTR this_ptr, struct LDKCOption_i64Z val); public static native void TxInitRbf_set_funding_output_contribution(long this_ptr, long val); - // MUST_USE_RES struct LDKTxInitRbf TxInitRbf_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t locktime_arg, uint32_t feerate_sat_per_1000_weight_arg, struct LDKCOption_i64Z funding_output_contribution_arg); - public static native long TxInitRbf_new(byte[] channel_id_arg, int locktime_arg, int feerate_sat_per_1000_weight_arg, long funding_output_contribution_arg); + // MUST_USE_RES struct LDKTxInitRbf TxInitRbf_new(struct LDKChannelId channel_id_arg, uint32_t locktime_arg, uint32_t feerate_sat_per_1000_weight_arg, struct LDKCOption_i64Z funding_output_contribution_arg); + public static native long TxInitRbf_new(long channel_id_arg, int locktime_arg, int feerate_sat_per_1000_weight_arg, long funding_output_contribution_arg); // uint64_t TxInitRbf_clone_ptr(LDKTxInitRbf *NONNULL_PTR arg); public static native long TxInitRbf_clone_ptr(long arg); // struct LDKTxInitRbf TxInitRbf_clone(const struct LDKTxInitRbf *NONNULL_PTR orig); @@ -8849,16 +9613,16 @@ public class bindings { public static native boolean TxInitRbf_eq(long a, long b); // void TxAckRbf_free(struct LDKTxAckRbf this_obj); public static native void TxAckRbf_free(long this_obj); - // const uint8_t (*TxAckRbf_get_channel_id(const struct LDKTxAckRbf *NONNULL_PTR this_ptr))[32]; - public static native byte[] TxAckRbf_get_channel_id(long this_ptr); - // void TxAckRbf_set_channel_id(struct LDKTxAckRbf *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void TxAckRbf_set_channel_id(long this_ptr, byte[] val); + // struct LDKChannelId TxAckRbf_get_channel_id(const struct LDKTxAckRbf *NONNULL_PTR this_ptr); + public static native long TxAckRbf_get_channel_id(long this_ptr); + // void TxAckRbf_set_channel_id(struct LDKTxAckRbf *NONNULL_PTR this_ptr, struct LDKChannelId val); + public static native void TxAckRbf_set_channel_id(long this_ptr, long val); // struct LDKCOption_i64Z TxAckRbf_get_funding_output_contribution(const struct LDKTxAckRbf *NONNULL_PTR this_ptr); public static native long TxAckRbf_get_funding_output_contribution(long this_ptr); // void TxAckRbf_set_funding_output_contribution(struct LDKTxAckRbf *NONNULL_PTR this_ptr, struct LDKCOption_i64Z val); public static native void TxAckRbf_set_funding_output_contribution(long this_ptr, long val); - // MUST_USE_RES struct LDKTxAckRbf TxAckRbf_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCOption_i64Z funding_output_contribution_arg); - public static native long TxAckRbf_new(byte[] channel_id_arg, long funding_output_contribution_arg); + // MUST_USE_RES struct LDKTxAckRbf TxAckRbf_new(struct LDKChannelId channel_id_arg, struct LDKCOption_i64Z funding_output_contribution_arg); + public static native long TxAckRbf_new(long channel_id_arg, long funding_output_contribution_arg); // uint64_t TxAckRbf_clone_ptr(LDKTxAckRbf *NONNULL_PTR arg); public static native long TxAckRbf_clone_ptr(long arg); // struct LDKTxAckRbf TxAckRbf_clone(const struct LDKTxAckRbf *NONNULL_PTR orig); @@ -8869,16 +9633,16 @@ public class bindings { public static native boolean TxAckRbf_eq(long a, long b); // void TxAbort_free(struct LDKTxAbort this_obj); public static native void TxAbort_free(long this_obj); - // const uint8_t (*TxAbort_get_channel_id(const struct LDKTxAbort *NONNULL_PTR this_ptr))[32]; - public static native byte[] TxAbort_get_channel_id(long this_ptr); - // void TxAbort_set_channel_id(struct LDKTxAbort *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void TxAbort_set_channel_id(long this_ptr, byte[] val); + // struct LDKChannelId TxAbort_get_channel_id(const struct LDKTxAbort *NONNULL_PTR this_ptr); + public static native long TxAbort_get_channel_id(long this_ptr); + // void TxAbort_set_channel_id(struct LDKTxAbort *NONNULL_PTR this_ptr, struct LDKChannelId val); + public static native void TxAbort_set_channel_id(long this_ptr, long val); // struct LDKCVec_u8Z TxAbort_get_data(const struct LDKTxAbort *NONNULL_PTR this_ptr); public static native byte[] TxAbort_get_data(long this_ptr); // void TxAbort_set_data(struct LDKTxAbort *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val); public static native void TxAbort_set_data(long this_ptr, byte[] val); - // MUST_USE_RES struct LDKTxAbort TxAbort_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z data_arg); - public static native long TxAbort_new(byte[] channel_id_arg, byte[] data_arg); + // MUST_USE_RES struct LDKTxAbort TxAbort_new(struct LDKChannelId channel_id_arg, struct LDKCVec_u8Z data_arg); + public static native long TxAbort_new(long channel_id_arg, byte[] data_arg); // uint64_t TxAbort_clone_ptr(LDKTxAbort *NONNULL_PTR arg); public static native long TxAbort_clone_ptr(long arg); // struct LDKTxAbort TxAbort_clone(const struct LDKTxAbort *NONNULL_PTR orig); @@ -8889,16 +9653,16 @@ public class bindings { public static native boolean TxAbort_eq(long a, long b); // void Shutdown_free(struct LDKShutdown this_obj); public static native void Shutdown_free(long this_obj); - // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32]; - public static native byte[] Shutdown_get_channel_id(long this_ptr); - // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void Shutdown_set_channel_id(long this_ptr, byte[] val); + // struct LDKChannelId Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr); + public static native long Shutdown_get_channel_id(long this_ptr); + // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKChannelId val); + public static native void Shutdown_set_channel_id(long this_ptr, long val); // struct LDKCVec_u8Z Shutdown_get_scriptpubkey(const struct LDKShutdown *NONNULL_PTR this_ptr); public static native byte[] Shutdown_get_scriptpubkey(long this_ptr); // void Shutdown_set_scriptpubkey(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val); public static native void Shutdown_set_scriptpubkey(long this_ptr, byte[] val); - // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg); - public static native long Shutdown_new(byte[] channel_id_arg, byte[] scriptpubkey_arg); + // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKChannelId channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg); + public static native long Shutdown_new(long channel_id_arg, byte[] scriptpubkey_arg); // uint64_t Shutdown_clone_ptr(LDKShutdown *NONNULL_PTR arg); public static native long Shutdown_clone_ptr(long arg); // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig); @@ -8929,10 +9693,10 @@ public class bindings { public static native boolean ClosingSignedFeeRange_eq(long a, long b); // void ClosingSigned_free(struct LDKClosingSigned this_obj); public static native void ClosingSigned_free(long this_obj); - // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32]; - public static native byte[] ClosingSigned_get_channel_id(long this_ptr); - // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void ClosingSigned_set_channel_id(long this_ptr, byte[] val); + // struct LDKChannelId ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr); + public static native long ClosingSigned_get_channel_id(long this_ptr); + // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKChannelId val); + public static native void ClosingSigned_set_channel_id(long this_ptr, long val); // uint64_t ClosingSigned_get_fee_satoshis(const struct LDKClosingSigned *NONNULL_PTR this_ptr); public static native long ClosingSigned_get_fee_satoshis(long this_ptr); // void ClosingSigned_set_fee_satoshis(struct LDKClosingSigned *NONNULL_PTR this_ptr, uint64_t val); @@ -8945,8 +9709,8 @@ public class bindings { public static native long ClosingSigned_get_fee_range(long this_ptr); // void ClosingSigned_set_fee_range(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKClosingSignedFeeRange val); public static native void ClosingSigned_set_fee_range(long this_ptr, long val); - // MUST_USE_RES struct LDKClosingSigned ClosingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t fee_satoshis_arg, struct LDKECDSASignature signature_arg, struct LDKClosingSignedFeeRange fee_range_arg); - public static native long ClosingSigned_new(byte[] channel_id_arg, long fee_satoshis_arg, byte[] signature_arg, long fee_range_arg); + // MUST_USE_RES struct LDKClosingSigned ClosingSigned_new(struct LDKChannelId channel_id_arg, uint64_t fee_satoshis_arg, struct LDKECDSASignature signature_arg, struct LDKClosingSignedFeeRange fee_range_arg); + public static native long ClosingSigned_new(long channel_id_arg, long fee_satoshis_arg, byte[] signature_arg, long fee_range_arg); // uint64_t ClosingSigned_clone_ptr(LDKClosingSigned *NONNULL_PTR arg); public static native long ClosingSigned_clone_ptr(long arg); // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig); @@ -8957,10 +9721,10 @@ public class bindings { public static native boolean ClosingSigned_eq(long a, long b); // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_obj); public static native void UpdateAddHTLC_free(long this_obj); - // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32]; - public static native byte[] UpdateAddHTLC_get_channel_id(long this_ptr); - // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void UpdateAddHTLC_set_channel_id(long this_ptr, byte[] val); + // struct LDKChannelId UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr); + public static native long UpdateAddHTLC_get_channel_id(long this_ptr); + // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKChannelId val); + public static native void UpdateAddHTLC_set_channel_id(long this_ptr, long val); // uint64_t UpdateAddHTLC_get_htlc_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr); public static native long UpdateAddHTLC_get_htlc_id(long this_ptr); // void UpdateAddHTLC_set_htlc_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val); @@ -8989,8 +9753,8 @@ public class bindings { public static native byte[] UpdateAddHTLC_get_blinding_point(long this_ptr); // void UpdateAddHTLC_set_blinding_point(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKPublicKey val); public static native void UpdateAddHTLC_set_blinding_point(long this_ptr, byte[] val); - // MUST_USE_RES struct LDKUpdateAddHTLC UpdateAddHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, uint64_t amount_msat_arg, struct LDKThirtyTwoBytes payment_hash_arg, uint32_t cltv_expiry_arg, struct LDKCOption_u64Z skimmed_fee_msat_arg, struct LDKOnionPacket onion_routing_packet_arg, struct LDKPublicKey blinding_point_arg); - public static native long UpdateAddHTLC_new(byte[] channel_id_arg, long htlc_id_arg, long amount_msat_arg, byte[] payment_hash_arg, int cltv_expiry_arg, long skimmed_fee_msat_arg, long onion_routing_packet_arg, byte[] blinding_point_arg); + // MUST_USE_RES struct LDKUpdateAddHTLC UpdateAddHTLC_new(struct LDKChannelId channel_id_arg, uint64_t htlc_id_arg, uint64_t amount_msat_arg, struct LDKThirtyTwoBytes payment_hash_arg, uint32_t cltv_expiry_arg, struct LDKCOption_u64Z skimmed_fee_msat_arg, struct LDKOnionPacket onion_routing_packet_arg, struct LDKPublicKey blinding_point_arg); + public static native long UpdateAddHTLC_new(long channel_id_arg, long htlc_id_arg, long amount_msat_arg, byte[] payment_hash_arg, int cltv_expiry_arg, long skimmed_fee_msat_arg, long onion_routing_packet_arg, byte[] blinding_point_arg); // uint64_t UpdateAddHTLC_clone_ptr(LDKUpdateAddHTLC *NONNULL_PTR arg); public static native long UpdateAddHTLC_clone_ptr(long arg); // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig); @@ -9021,10 +9785,10 @@ public class bindings { public static native boolean OnionMessage_eq(long a, long b); // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_obj); public static native void UpdateFulfillHTLC_free(long this_obj); - // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32]; - public static native byte[] UpdateFulfillHTLC_get_channel_id(long this_ptr); - // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void UpdateFulfillHTLC_set_channel_id(long this_ptr, byte[] val); + // struct LDKChannelId UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr); + public static native long UpdateFulfillHTLC_get_channel_id(long this_ptr); + // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKChannelId val); + public static native void UpdateFulfillHTLC_set_channel_id(long this_ptr, long val); // uint64_t UpdateFulfillHTLC_get_htlc_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr); public static native long UpdateFulfillHTLC_get_htlc_id(long this_ptr); // void UpdateFulfillHTLC_set_htlc_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, uint64_t val); @@ -9033,8 +9797,8 @@ public class bindings { public static native byte[] UpdateFulfillHTLC_get_payment_preimage(long this_ptr); // void UpdateFulfillHTLC_set_payment_preimage(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); public static native void UpdateFulfillHTLC_set_payment_preimage(long this_ptr, byte[] val); - // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg); - public static native long UpdateFulfillHTLC_new(byte[] channel_id_arg, long htlc_id_arg, byte[] payment_preimage_arg); + // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKChannelId channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg); + public static native long UpdateFulfillHTLC_new(long channel_id_arg, long htlc_id_arg, byte[] payment_preimage_arg); // uint64_t UpdateFulfillHTLC_clone_ptr(LDKUpdateFulfillHTLC *NONNULL_PTR arg); public static native long UpdateFulfillHTLC_clone_ptr(long arg); // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig); @@ -9045,10 +9809,10 @@ public class bindings { public static native boolean UpdateFulfillHTLC_eq(long a, long b); // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_obj); public static native void UpdateFailHTLC_free(long this_obj); - // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32]; - public static native byte[] UpdateFailHTLC_get_channel_id(long this_ptr); - // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void UpdateFailHTLC_set_channel_id(long this_ptr, byte[] val); + // struct LDKChannelId UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr); + public static native long UpdateFailHTLC_get_channel_id(long this_ptr); + // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKChannelId val); + public static native void UpdateFailHTLC_set_channel_id(long this_ptr, long val); // uint64_t UpdateFailHTLC_get_htlc_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr); public static native long UpdateFailHTLC_get_htlc_id(long this_ptr); // void UpdateFailHTLC_set_htlc_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, uint64_t val); @@ -9063,10 +9827,10 @@ public class bindings { public static native boolean UpdateFailHTLC_eq(long a, long b); // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_obj); public static native void UpdateFailMalformedHTLC_free(long this_obj); - // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32]; - public static native byte[] UpdateFailMalformedHTLC_get_channel_id(long this_ptr); - // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void UpdateFailMalformedHTLC_set_channel_id(long this_ptr, byte[] val); + // struct LDKChannelId UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr); + public static native long UpdateFailMalformedHTLC_get_channel_id(long this_ptr); + // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKChannelId val); + public static native void UpdateFailMalformedHTLC_set_channel_id(long this_ptr, long val); // uint64_t UpdateFailMalformedHTLC_get_htlc_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr); public static native long UpdateFailMalformedHTLC_get_htlc_id(long this_ptr); // void UpdateFailMalformedHTLC_set_htlc_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint64_t val); @@ -9085,10 +9849,10 @@ public class bindings { public static native boolean UpdateFailMalformedHTLC_eq(long a, long b); // void CommitmentSigned_free(struct LDKCommitmentSigned this_obj); public static native void CommitmentSigned_free(long this_obj); - // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32]; - public static native byte[] CommitmentSigned_get_channel_id(long this_ptr); - // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void CommitmentSigned_set_channel_id(long this_ptr, byte[] val); + // struct LDKChannelId CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr); + public static native long CommitmentSigned_get_channel_id(long this_ptr); + // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKChannelId val); + public static native void CommitmentSigned_set_channel_id(long this_ptr, long val); // struct LDKECDSASignature CommitmentSigned_get_signature(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr); public static native byte[] CommitmentSigned_get_signature(long this_ptr); // void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKECDSASignature val); @@ -9097,8 +9861,8 @@ public class bindings { public static native byte[][] CommitmentSigned_get_htlc_signatures(long this_ptr); // void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_ECDSASignatureZ val); public static native void CommitmentSigned_set_htlc_signatures(long this_ptr, byte[][] val); - // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKECDSASignature signature_arg, struct LDKCVec_ECDSASignatureZ htlc_signatures_arg); - public static native long CommitmentSigned_new(byte[] channel_id_arg, byte[] signature_arg, byte[][] htlc_signatures_arg); + // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKChannelId channel_id_arg, struct LDKECDSASignature signature_arg, struct LDKCVec_ECDSASignatureZ htlc_signatures_arg); + public static native long CommitmentSigned_new(long channel_id_arg, byte[] signature_arg, byte[][] htlc_signatures_arg); // uint64_t CommitmentSigned_clone_ptr(LDKCommitmentSigned *NONNULL_PTR arg); public static native long CommitmentSigned_clone_ptr(long arg); // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig); @@ -9109,10 +9873,10 @@ public class bindings { public static native boolean CommitmentSigned_eq(long a, long b); // void RevokeAndACK_free(struct LDKRevokeAndACK this_obj); public static native void RevokeAndACK_free(long this_obj); - // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32]; - public static native byte[] RevokeAndACK_get_channel_id(long this_ptr); - // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void RevokeAndACK_set_channel_id(long this_ptr, byte[] val); + // struct LDKChannelId RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr); + public static native long RevokeAndACK_get_channel_id(long this_ptr); + // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKChannelId val); + public static native void RevokeAndACK_set_channel_id(long this_ptr, long val); // const uint8_t (*RevokeAndACK_get_per_commitment_secret(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32]; public static native byte[] RevokeAndACK_get_per_commitment_secret(long this_ptr); // void RevokeAndACK_set_per_commitment_secret(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); @@ -9121,8 +9885,8 @@ public class bindings { public static native byte[] RevokeAndACK_get_next_per_commitment_point(long this_ptr); // void RevokeAndACK_set_next_per_commitment_point(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKPublicKey val); public static native void RevokeAndACK_set_next_per_commitment_point(long this_ptr, byte[] val); - // MUST_USE_RES struct LDKRevokeAndACK RevokeAndACK_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKThirtyTwoBytes per_commitment_secret_arg, struct LDKPublicKey next_per_commitment_point_arg); - public static native long RevokeAndACK_new(byte[] channel_id_arg, byte[] per_commitment_secret_arg, byte[] next_per_commitment_point_arg); + // MUST_USE_RES struct LDKRevokeAndACK RevokeAndACK_new(struct LDKChannelId channel_id_arg, struct LDKThirtyTwoBytes per_commitment_secret_arg, struct LDKPublicKey next_per_commitment_point_arg); + public static native long RevokeAndACK_new(long channel_id_arg, byte[] per_commitment_secret_arg, byte[] next_per_commitment_point_arg); // uint64_t RevokeAndACK_clone_ptr(LDKRevokeAndACK *NONNULL_PTR arg); public static native long RevokeAndACK_clone_ptr(long arg); // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig); @@ -9133,16 +9897,16 @@ public class bindings { public static native boolean RevokeAndACK_eq(long a, long b); // void UpdateFee_free(struct LDKUpdateFee this_obj); public static native void UpdateFee_free(long this_obj); - // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32]; - public static native byte[] UpdateFee_get_channel_id(long this_ptr); - // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void UpdateFee_set_channel_id(long this_ptr, byte[] val); + // struct LDKChannelId UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr); + public static native long UpdateFee_get_channel_id(long this_ptr); + // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKChannelId val); + public static native void UpdateFee_set_channel_id(long this_ptr, long val); // uint32_t UpdateFee_get_feerate_per_kw(const struct LDKUpdateFee *NONNULL_PTR this_ptr); public static native int UpdateFee_get_feerate_per_kw(long this_ptr); // void UpdateFee_set_feerate_per_kw(struct LDKUpdateFee *NONNULL_PTR this_ptr, uint32_t val); public static native void UpdateFee_set_feerate_per_kw(long this_ptr, int val); - // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg); - public static native long UpdateFee_new(byte[] channel_id_arg, int feerate_per_kw_arg); + // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKChannelId channel_id_arg, uint32_t feerate_per_kw_arg); + public static native long UpdateFee_new(long channel_id_arg, int feerate_per_kw_arg); // uint64_t UpdateFee_clone_ptr(LDKUpdateFee *NONNULL_PTR arg); public static native long UpdateFee_clone_ptr(long arg); // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig); @@ -9153,10 +9917,10 @@ public class bindings { public static native boolean UpdateFee_eq(long a, long b); // void ChannelReestablish_free(struct LDKChannelReestablish this_obj); public static native void ChannelReestablish_free(long this_obj); - // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32]; - public static native byte[] ChannelReestablish_get_channel_id(long this_ptr); - // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void ChannelReestablish_set_channel_id(long this_ptr, byte[] val); + // struct LDKChannelId ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr); + public static native long ChannelReestablish_get_channel_id(long this_ptr); + // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKChannelId val); + public static native void ChannelReestablish_set_channel_id(long this_ptr, long val); // uint64_t ChannelReestablish_get_next_local_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr); public static native long ChannelReestablish_get_next_local_commitment_number(long this_ptr); // void ChannelReestablish_set_next_local_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val); @@ -9177,8 +9941,8 @@ public class bindings { public static native long ChannelReestablish_get_next_funding_txid(long this_ptr); // void ChannelReestablish_set_next_funding_txid(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKCOption_ThirtyTwoBytesZ val); public static native void ChannelReestablish_set_next_funding_txid(long this_ptr, long val); - // MUST_USE_RES struct LDKChannelReestablish ChannelReestablish_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t next_local_commitment_number_arg, uint64_t next_remote_commitment_number_arg, struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg, struct LDKCOption_ThirtyTwoBytesZ next_funding_txid_arg); - public static native long ChannelReestablish_new(byte[] channel_id_arg, long next_local_commitment_number_arg, long next_remote_commitment_number_arg, byte[] your_last_per_commitment_secret_arg, byte[] my_current_per_commitment_point_arg, long next_funding_txid_arg); + // MUST_USE_RES struct LDKChannelReestablish ChannelReestablish_new(struct LDKChannelId channel_id_arg, uint64_t next_local_commitment_number_arg, uint64_t next_remote_commitment_number_arg, struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg, struct LDKCOption_ThirtyTwoBytesZ next_funding_txid_arg); + public static native long ChannelReestablish_new(long channel_id_arg, long next_local_commitment_number_arg, long next_remote_commitment_number_arg, byte[] your_last_per_commitment_secret_arg, byte[] my_current_per_commitment_point_arg, long next_funding_txid_arg); // uint64_t ChannelReestablish_clone_ptr(LDKChannelReestablish *NONNULL_PTR arg); public static native long ChannelReestablish_clone_ptr(long arg); // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig); @@ -9189,10 +9953,10 @@ public class bindings { public static native boolean ChannelReestablish_eq(long a, long b); // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_obj); public static native void AnnouncementSignatures_free(long this_obj); - // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32]; - public static native byte[] AnnouncementSignatures_get_channel_id(long this_ptr); - // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void AnnouncementSignatures_set_channel_id(long this_ptr, byte[] val); + // struct LDKChannelId AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr); + public static native long AnnouncementSignatures_get_channel_id(long this_ptr); + // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKChannelId val); + public static native void AnnouncementSignatures_set_channel_id(long this_ptr, long val); // uint64_t AnnouncementSignatures_get_short_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr); public static native long AnnouncementSignatures_get_short_channel_id(long this_ptr); // void AnnouncementSignatures_set_short_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, uint64_t val); @@ -9205,8 +9969,8 @@ public class bindings { public static native byte[] AnnouncementSignatures_get_bitcoin_signature(long this_ptr); // void AnnouncementSignatures_set_bitcoin_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKECDSASignature val); public static native void AnnouncementSignatures_set_bitcoin_signature(long this_ptr, byte[] val); - // MUST_USE_RES struct LDKAnnouncementSignatures AnnouncementSignatures_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t short_channel_id_arg, struct LDKECDSASignature node_signature_arg, struct LDKECDSASignature bitcoin_signature_arg); - public static native long AnnouncementSignatures_new(byte[] channel_id_arg, long short_channel_id_arg, byte[] node_signature_arg, byte[] bitcoin_signature_arg); + // MUST_USE_RES struct LDKAnnouncementSignatures AnnouncementSignatures_new(struct LDKChannelId channel_id_arg, uint64_t short_channel_id_arg, struct LDKECDSASignature node_signature_arg, struct LDKECDSASignature bitcoin_signature_arg); + public static native long AnnouncementSignatures_new(long channel_id_arg, long short_channel_id_arg, byte[] node_signature_arg, byte[] bitcoin_signature_arg); // uint64_t AnnouncementSignatures_clone_ptr(LDKAnnouncementSignatures *NONNULL_PTR arg); public static native long AnnouncementSignatures_clone_ptr(long arg); // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig); @@ -9299,6 +10063,16 @@ public class bindings { public static native long[] UnsignedNodeAnnouncement_get_addresses(long this_ptr); // void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_SocketAddressZ val); public static native void UnsignedNodeAnnouncement_set_addresses(long this_ptr, long[] val); + // struct LDKCVec_u8Z UnsignedNodeAnnouncement_get_excess_address_data(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr); + public static native byte[] UnsignedNodeAnnouncement_get_excess_address_data(long this_ptr); + // void UnsignedNodeAnnouncement_set_excess_address_data(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val); + public static native void UnsignedNodeAnnouncement_set_excess_address_data(long this_ptr, byte[] val); + // struct LDKCVec_u8Z UnsignedNodeAnnouncement_get_excess_data(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr); + public static native byte[] UnsignedNodeAnnouncement_get_excess_data(long this_ptr); + // void UnsignedNodeAnnouncement_set_excess_data(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val); + public static native void UnsignedNodeAnnouncement_set_excess_data(long this_ptr, byte[] val); + // MUST_USE_RES struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_new(struct LDKNodeFeatures features_arg, uint32_t timestamp_arg, struct LDKNodeId node_id_arg, struct LDKThreeBytes rgb_arg, struct LDKNodeAlias alias_arg, struct LDKCVec_SocketAddressZ addresses_arg, struct LDKCVec_u8Z excess_address_data_arg, struct LDKCVec_u8Z excess_data_arg); + public static native long UnsignedNodeAnnouncement_new(long features_arg, int timestamp_arg, long node_id_arg, byte[] rgb_arg, long alias_arg, long[] addresses_arg, byte[] excess_address_data_arg, byte[] excess_data_arg); // uint64_t UnsignedNodeAnnouncement_clone_ptr(LDKUnsignedNodeAnnouncement *NONNULL_PTR arg); public static native long UnsignedNodeAnnouncement_clone_ptr(long arg); // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig); @@ -9713,6 +10487,36 @@ public class bindings { public static native long OnionPacket_hash(long o); // bool OnionPacket_eq(const struct LDKOnionPacket *NONNULL_PTR a, const struct LDKOnionPacket *NONNULL_PTR b); public static native boolean OnionPacket_eq(long a, long b); + // void TrampolineOnionPacket_free(struct LDKTrampolineOnionPacket this_obj); + public static native void TrampolineOnionPacket_free(long this_obj); + // uint8_t TrampolineOnionPacket_get_version(const struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr); + public static native byte TrampolineOnionPacket_get_version(long this_ptr); + // void TrampolineOnionPacket_set_version(struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr, uint8_t val); + public static native void TrampolineOnionPacket_set_version(long this_ptr, byte val); + // struct LDKPublicKey TrampolineOnionPacket_get_public_key(const struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr); + public static native byte[] TrampolineOnionPacket_get_public_key(long this_ptr); + // void TrampolineOnionPacket_set_public_key(struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr, struct LDKPublicKey val); + public static native void TrampolineOnionPacket_set_public_key(long this_ptr, byte[] val); + // struct LDKCVec_u8Z TrampolineOnionPacket_get_hop_data(const struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr); + public static native byte[] TrampolineOnionPacket_get_hop_data(long this_ptr); + // void TrampolineOnionPacket_set_hop_data(struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val); + public static native void TrampolineOnionPacket_set_hop_data(long this_ptr, byte[] val); + // const uint8_t (*TrampolineOnionPacket_get_hmac(const struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr))[32]; + public static native byte[] TrampolineOnionPacket_get_hmac(long this_ptr); + // void TrampolineOnionPacket_set_hmac(struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + public static native void TrampolineOnionPacket_set_hmac(long this_ptr, byte[] val); + // MUST_USE_RES struct LDKTrampolineOnionPacket TrampolineOnionPacket_new(uint8_t version_arg, struct LDKPublicKey public_key_arg, struct LDKCVec_u8Z hop_data_arg, struct LDKThirtyTwoBytes hmac_arg); + public static native long TrampolineOnionPacket_new(byte version_arg, byte[] public_key_arg, byte[] hop_data_arg, byte[] hmac_arg); + // uint64_t TrampolineOnionPacket_clone_ptr(LDKTrampolineOnionPacket *NONNULL_PTR arg); + public static native long TrampolineOnionPacket_clone_ptr(long arg); + // struct LDKTrampolineOnionPacket TrampolineOnionPacket_clone(const struct LDKTrampolineOnionPacket *NONNULL_PTR orig); + public static native long TrampolineOnionPacket_clone(long orig); + // uint64_t TrampolineOnionPacket_hash(const struct LDKTrampolineOnionPacket *NONNULL_PTR o); + public static native long TrampolineOnionPacket_hash(long o); + // bool TrampolineOnionPacket_eq(const struct LDKTrampolineOnionPacket *NONNULL_PTR a, const struct LDKTrampolineOnionPacket *NONNULL_PTR b); + public static native boolean TrampolineOnionPacket_eq(long a, long b); + // struct LDKCVec_u8Z TrampolineOnionPacket_write(const struct LDKTrampolineOnionPacket *NONNULL_PTR obj); + public static native byte[] TrampolineOnionPacket_write(long obj); // struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj); public static native byte[] AcceptChannel_write(long obj); // struct LDKCResult_AcceptChannelDecodeErrorZ AcceptChannel_read(struct LDKu8slice ser); @@ -9975,6 +10779,26 @@ public class bindings { public static native long SocketDescriptor_clone(long orig); // void SocketDescriptor_free(struct LDKSocketDescriptor this_ptr); public static native void SocketDescriptor_free(long this_ptr); + // void PeerDetails_free(struct LDKPeerDetails this_obj); + public static native void PeerDetails_free(long this_obj); + // struct LDKPublicKey PeerDetails_get_counterparty_node_id(const struct LDKPeerDetails *NONNULL_PTR this_ptr); + public static native byte[] PeerDetails_get_counterparty_node_id(long this_ptr); + // void PeerDetails_set_counterparty_node_id(struct LDKPeerDetails *NONNULL_PTR this_ptr, struct LDKPublicKey val); + public static native void PeerDetails_set_counterparty_node_id(long this_ptr, byte[] val); + // struct LDKCOption_SocketAddressZ PeerDetails_get_socket_address(const struct LDKPeerDetails *NONNULL_PTR this_ptr); + public static native long PeerDetails_get_socket_address(long this_ptr); + // void PeerDetails_set_socket_address(struct LDKPeerDetails *NONNULL_PTR this_ptr, struct LDKCOption_SocketAddressZ val); + public static native void PeerDetails_set_socket_address(long this_ptr, long val); + // struct LDKInitFeatures PeerDetails_get_init_features(const struct LDKPeerDetails *NONNULL_PTR this_ptr); + public static native long PeerDetails_get_init_features(long this_ptr); + // void PeerDetails_set_init_features(struct LDKPeerDetails *NONNULL_PTR this_ptr, struct LDKInitFeatures val); + public static native void PeerDetails_set_init_features(long this_ptr, long val); + // bool PeerDetails_get_is_inbound_connection(const struct LDKPeerDetails *NONNULL_PTR this_ptr); + public static native boolean PeerDetails_get_is_inbound_connection(long this_ptr); + // void PeerDetails_set_is_inbound_connection(struct LDKPeerDetails *NONNULL_PTR this_ptr, bool val); + public static native void PeerDetails_set_is_inbound_connection(long this_ptr, boolean val); + // MUST_USE_RES struct LDKPeerDetails PeerDetails_new(struct LDKPublicKey counterparty_node_id_arg, struct LDKCOption_SocketAddressZ socket_address_arg, struct LDKInitFeatures init_features_arg, bool is_inbound_connection_arg); + public static native long PeerDetails_new(byte[] counterparty_node_id_arg, long socket_address_arg, long init_features_arg, boolean is_inbound_connection_arg); // void PeerHandleError_free(struct LDKPeerHandleError this_obj); public static native void PeerHandleError_free(long this_obj); // MUST_USE_RES struct LDKPeerHandleError PeerHandleError_new(void); @@ -9987,8 +10811,10 @@ public class bindings { public static native void PeerManager_free(long this_obj); // MUST_USE_RES struct LDKPeerManager PeerManager_new(struct LDKMessageHandler message_handler, uint32_t current_time, const uint8_t (*ephemeral_random_data)[32], struct LDKLogger logger, struct LDKNodeSigner node_signer); public static native long PeerManager_new(long message_handler, int current_time, byte[] ephemeral_random_data, long logger, long node_signer); - // MUST_USE_RES struct LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg); - public static native long[] PeerManager_get_peer_node_ids(long this_arg); + // MUST_USE_RES struct LDKCVec_PeerDetailsZ PeerManager_list_peers(const struct LDKPeerManager *NONNULL_PTR this_arg); + public static native long[] PeerManager_list_peers(long this_arg); + // MUST_USE_RES struct LDKPeerDetails PeerManager_peer_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id); + public static native long PeerManager_peer_by_node_id(long this_arg, byte[] their_node_id); // MUST_USE_RES struct LDKCResult_CVec_u8ZPeerHandleErrorZ PeerManager_new_outbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKSocketDescriptor descriptor, struct LDKCOption_SocketAddressZ remote_network_address); public static native long PeerManager_new_outbound_connection(long this_arg, byte[] their_node_id, long descriptor, long remote_network_address); // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor descriptor, struct LDKCOption_SocketAddressZ remote_network_address); @@ -11003,6 +11829,30 @@ public class bindings { public static native boolean NodeFeatures_supports_keysend(long this_arg); // MUST_USE_RES bool NodeFeatures_requires_keysend(const struct LDKNodeFeatures *NONNULL_PTR this_arg); public static native boolean NodeFeatures_requires_keysend(long this_arg); + // void InitFeatures_set_trampoline_routing_optional(struct LDKInitFeatures *NONNULL_PTR this_arg); + public static native void InitFeatures_set_trampoline_routing_optional(long this_arg); + // void InitFeatures_set_trampoline_routing_required(struct LDKInitFeatures *NONNULL_PTR this_arg); + public static native void InitFeatures_set_trampoline_routing_required(long this_arg); + // MUST_USE_RES bool InitFeatures_supports_trampoline_routing(const struct LDKInitFeatures *NONNULL_PTR this_arg); + public static native boolean InitFeatures_supports_trampoline_routing(long this_arg); + // void NodeFeatures_set_trampoline_routing_optional(struct LDKNodeFeatures *NONNULL_PTR this_arg); + public static native void NodeFeatures_set_trampoline_routing_optional(long this_arg); + // void NodeFeatures_set_trampoline_routing_required(struct LDKNodeFeatures *NONNULL_PTR this_arg); + public static native void NodeFeatures_set_trampoline_routing_required(long this_arg); + // MUST_USE_RES bool NodeFeatures_supports_trampoline_routing(const struct LDKNodeFeatures *NONNULL_PTR this_arg); + public static native boolean NodeFeatures_supports_trampoline_routing(long this_arg); + // void Bolt11InvoiceFeatures_set_trampoline_routing_optional(struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg); + public static native void Bolt11InvoiceFeatures_set_trampoline_routing_optional(long this_arg); + // void Bolt11InvoiceFeatures_set_trampoline_routing_required(struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg); + public static native void Bolt11InvoiceFeatures_set_trampoline_routing_required(long this_arg); + // MUST_USE_RES bool Bolt11InvoiceFeatures_supports_trampoline_routing(const struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg); + public static native boolean Bolt11InvoiceFeatures_supports_trampoline_routing(long this_arg); + // MUST_USE_RES bool InitFeatures_requires_trampoline_routing(const struct LDKInitFeatures *NONNULL_PTR this_arg); + public static native boolean InitFeatures_requires_trampoline_routing(long this_arg); + // MUST_USE_RES bool NodeFeatures_requires_trampoline_routing(const struct LDKNodeFeatures *NONNULL_PTR this_arg); + public static native boolean NodeFeatures_requires_trampoline_routing(long this_arg); + // MUST_USE_RES bool Bolt11InvoiceFeatures_requires_trampoline_routing(const struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg); + public static native boolean Bolt11InvoiceFeatures_requires_trampoline_routing(long this_arg); // void ShutdownScript_free(struct LDKShutdownScript this_obj); public static native void ShutdownScript_free(long this_obj); // uint64_t ShutdownScript_clone_ptr(LDKShutdownScript *NONNULL_PTR arg); @@ -11039,6 +11889,42 @@ public class bindings { public static native byte[] ShutdownScript_as_legacy_pubkey(long this_arg); // MUST_USE_RES bool ShutdownScript_is_compatible(const struct LDKShutdownScript *NONNULL_PTR this_arg, const struct LDKInitFeatures *NONNULL_PTR features); public static native boolean ShutdownScript_is_compatible(long this_arg, long features); + // void ChannelId_free(struct LDKChannelId this_obj); + public static native void ChannelId_free(long this_obj); + // const uint8_t (*ChannelId_get_a(const struct LDKChannelId *NONNULL_PTR this_ptr))[32]; + public static native byte[] ChannelId_get_a(long this_ptr); + // void ChannelId_set_a(struct LDKChannelId *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + public static native void ChannelId_set_a(long this_ptr, byte[] val); + // MUST_USE_RES struct LDKChannelId ChannelId_new(struct LDKThirtyTwoBytes a_arg); + public static native long ChannelId_new(byte[] a_arg); + // uint64_t ChannelId_clone_ptr(LDKChannelId *NONNULL_PTR arg); + public static native long ChannelId_clone_ptr(long arg); + // struct LDKChannelId ChannelId_clone(const struct LDKChannelId *NONNULL_PTR orig); + public static native long ChannelId_clone(long orig); + // bool ChannelId_eq(const struct LDKChannelId *NONNULL_PTR a, const struct LDKChannelId *NONNULL_PTR b); + public static native boolean ChannelId_eq(long a, long b); + // uint64_t ChannelId_hash(const struct LDKChannelId *NONNULL_PTR o); + public static native long ChannelId_hash(long o); + // MUST_USE_RES struct LDKChannelId ChannelId_v1_from_funding_txid(const uint8_t (*txid)[32], uint16_t output_index); + public static native long ChannelId_v1_from_funding_txid(byte[] txid, short output_index); + // MUST_USE_RES struct LDKChannelId ChannelId_v1_from_funding_outpoint(struct LDKOutPoint outpoint); + public static native long ChannelId_v1_from_funding_outpoint(long outpoint); + // MUST_USE_RES struct LDKChannelId ChannelId_temporary_from_entropy_source(const struct LDKEntropySource *NONNULL_PTR entropy_source); + public static native long ChannelId_temporary_from_entropy_source(long entropy_source); + // MUST_USE_RES struct LDKChannelId ChannelId_from_bytes(struct LDKThirtyTwoBytes data); + public static native long ChannelId_from_bytes(byte[] data); + // MUST_USE_RES struct LDKChannelId ChannelId_new_zero(void); + public static native long ChannelId_new_zero(); + // MUST_USE_RES bool ChannelId_is_zero(const struct LDKChannelId *NONNULL_PTR this_arg); + public static native boolean ChannelId_is_zero(long this_arg); + // MUST_USE_RES struct LDKChannelId ChannelId_v2_from_revocation_basepoints(const struct LDKRevocationBasepoint *NONNULL_PTR ours, const struct LDKRevocationBasepoint *NONNULL_PTR theirs); + public static native long ChannelId_v2_from_revocation_basepoints(long ours, long theirs); + // MUST_USE_RES struct LDKChannelId ChannelId_temporary_v2_from_revocation_basepoint(const struct LDKRevocationBasepoint *NONNULL_PTR our_revocation_basepoint); + public static native long ChannelId_temporary_v2_from_revocation_basepoint(long our_revocation_basepoint); + // struct LDKCVec_u8Z ChannelId_write(const struct LDKChannelId *NONNULL_PTR obj); + public static native byte[] ChannelId_write(long obj); + // struct LDKCResult_ChannelIdDecodeErrorZ ChannelId_read(struct LDKu8slice ser); + public static native long ChannelId_read(byte[] ser); // void Retry_free(struct LDKRetry this_ptr); public static native void Retry_free(long this_ptr); // uint64_t Retry_clone_ptr(LDKRetry *NONNULL_PTR arg); @@ -11133,6 +12019,74 @@ public class bindings { public static native long Type_clone(long orig); // void Type_free(struct LDKType this_ptr); public static native void Type_free(long this_ptr); + // void OfferId_free(struct LDKOfferId this_obj); + public static native void OfferId_free(long this_obj); + // const uint8_t (*OfferId_get_a(const struct LDKOfferId *NONNULL_PTR this_ptr))[32]; + public static native byte[] OfferId_get_a(long this_ptr); + // void OfferId_set_a(struct LDKOfferId *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + public static native void OfferId_set_a(long this_ptr, byte[] val); + // MUST_USE_RES struct LDKOfferId OfferId_new(struct LDKThirtyTwoBytes a_arg); + public static native long OfferId_new(byte[] a_arg); + // uint64_t OfferId_clone_ptr(LDKOfferId *NONNULL_PTR arg); + public static native long OfferId_clone_ptr(long arg); + // struct LDKOfferId OfferId_clone(const struct LDKOfferId *NONNULL_PTR orig); + public static native long OfferId_clone(long orig); + // bool OfferId_eq(const struct LDKOfferId *NONNULL_PTR a, const struct LDKOfferId *NONNULL_PTR b); + public static native boolean OfferId_eq(long a, long b); + // struct LDKCVec_u8Z OfferId_write(const struct LDKOfferId *NONNULL_PTR obj); + public static native byte[] OfferId_write(long obj); + // struct LDKCResult_OfferIdDecodeErrorZ OfferId_read(struct LDKu8slice ser); + public static native long OfferId_read(byte[] ser); + // void OfferWithExplicitMetadataBuilder_free(struct LDKOfferWithExplicitMetadataBuilder this_obj); + public static native void OfferWithExplicitMetadataBuilder_free(long this_obj); + // uint64_t OfferWithExplicitMetadataBuilder_clone_ptr(LDKOfferWithExplicitMetadataBuilder *NONNULL_PTR arg); + public static native long OfferWithExplicitMetadataBuilder_clone_ptr(long arg); + // struct LDKOfferWithExplicitMetadataBuilder OfferWithExplicitMetadataBuilder_clone(const struct LDKOfferWithExplicitMetadataBuilder *NONNULL_PTR orig); + public static native long OfferWithExplicitMetadataBuilder_clone(long orig); + // void OfferWithDerivedMetadataBuilder_free(struct LDKOfferWithDerivedMetadataBuilder this_obj); + public static native void OfferWithDerivedMetadataBuilder_free(long this_obj); + // uint64_t OfferWithDerivedMetadataBuilder_clone_ptr(LDKOfferWithDerivedMetadataBuilder *NONNULL_PTR arg); + public static native long OfferWithDerivedMetadataBuilder_clone_ptr(long arg); + // struct LDKOfferWithDerivedMetadataBuilder OfferWithDerivedMetadataBuilder_clone(const struct LDKOfferWithDerivedMetadataBuilder *NONNULL_PTR orig); + public static native long OfferWithDerivedMetadataBuilder_clone(long orig); + // MUST_USE_RES struct LDKOfferWithExplicitMetadataBuilder OfferWithExplicitMetadataBuilder_new(struct LDKPublicKey signing_pubkey); + public static native long OfferWithExplicitMetadataBuilder_new(byte[] signing_pubkey); + // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ OfferWithExplicitMetadataBuilder_metadata(struct LDKOfferWithExplicitMetadataBuilder this_arg, struct LDKCVec_u8Z metadata); + public static native long OfferWithExplicitMetadataBuilder_metadata(long this_arg, byte[] metadata); + // MUST_USE_RES void OfferWithExplicitMetadataBuilder_chain(struct LDKOfferWithExplicitMetadataBuilder this_arg, enum LDKNetwork network); + public static native void OfferWithExplicitMetadataBuilder_chain(long this_arg, Network network); + // MUST_USE_RES void OfferWithExplicitMetadataBuilder_amount_msats(struct LDKOfferWithExplicitMetadataBuilder this_arg, uint64_t amount_msats); + public static native void OfferWithExplicitMetadataBuilder_amount_msats(long this_arg, long amount_msats); + // MUST_USE_RES void OfferWithExplicitMetadataBuilder_absolute_expiry(struct LDKOfferWithExplicitMetadataBuilder this_arg, uint64_t absolute_expiry); + public static native void OfferWithExplicitMetadataBuilder_absolute_expiry(long this_arg, long absolute_expiry); + // MUST_USE_RES void OfferWithExplicitMetadataBuilder_description(struct LDKOfferWithExplicitMetadataBuilder this_arg, struct LDKStr description); + public static native void OfferWithExplicitMetadataBuilder_description(long this_arg, String description); + // MUST_USE_RES void OfferWithExplicitMetadataBuilder_issuer(struct LDKOfferWithExplicitMetadataBuilder this_arg, struct LDKStr issuer); + public static native void OfferWithExplicitMetadataBuilder_issuer(long this_arg, String issuer); + // MUST_USE_RES void OfferWithExplicitMetadataBuilder_path(struct LDKOfferWithExplicitMetadataBuilder this_arg, struct LDKBlindedPath path); + public static native void OfferWithExplicitMetadataBuilder_path(long this_arg, long path); + // MUST_USE_RES void OfferWithExplicitMetadataBuilder_supported_quantity(struct LDKOfferWithExplicitMetadataBuilder this_arg, struct LDKQuantity quantity); + public static native void OfferWithExplicitMetadataBuilder_supported_quantity(long this_arg, long quantity); + // MUST_USE_RES struct LDKCResult_OfferBolt12SemanticErrorZ OfferWithExplicitMetadataBuilder_build(struct LDKOfferWithExplicitMetadataBuilder this_arg); + public static native long OfferWithExplicitMetadataBuilder_build(long this_arg); + // MUST_USE_RES struct LDKOfferWithDerivedMetadataBuilder OfferWithDerivedMetadataBuilder_deriving_signing_pubkey(struct LDKPublicKey node_id, const struct LDKExpandedKey *NONNULL_PTR expanded_key, struct LDKEntropySource entropy_source); + public static native long OfferWithDerivedMetadataBuilder_deriving_signing_pubkey(byte[] node_id, long expanded_key, long entropy_source); + // MUST_USE_RES void OfferWithDerivedMetadataBuilder_chain(struct LDKOfferWithDerivedMetadataBuilder this_arg, enum LDKNetwork network); + public static native void OfferWithDerivedMetadataBuilder_chain(long this_arg, Network network); + // MUST_USE_RES void OfferWithDerivedMetadataBuilder_amount_msats(struct LDKOfferWithDerivedMetadataBuilder this_arg, uint64_t amount_msats); + public static native void OfferWithDerivedMetadataBuilder_amount_msats(long this_arg, long amount_msats); + // MUST_USE_RES void OfferWithDerivedMetadataBuilder_absolute_expiry(struct LDKOfferWithDerivedMetadataBuilder this_arg, uint64_t absolute_expiry); + public static native void OfferWithDerivedMetadataBuilder_absolute_expiry(long this_arg, long absolute_expiry); + // MUST_USE_RES void OfferWithDerivedMetadataBuilder_description(struct LDKOfferWithDerivedMetadataBuilder this_arg, struct LDKStr description); + public static native void OfferWithDerivedMetadataBuilder_description(long this_arg, String description); + // MUST_USE_RES void OfferWithDerivedMetadataBuilder_issuer(struct LDKOfferWithDerivedMetadataBuilder this_arg, struct LDKStr issuer); + public static native void OfferWithDerivedMetadataBuilder_issuer(long this_arg, String issuer); + // MUST_USE_RES void OfferWithDerivedMetadataBuilder_path(struct LDKOfferWithDerivedMetadataBuilder this_arg, struct LDKBlindedPath path); + public static native void OfferWithDerivedMetadataBuilder_path(long this_arg, long path); + // MUST_USE_RES void OfferWithDerivedMetadataBuilder_supported_quantity(struct LDKOfferWithDerivedMetadataBuilder this_arg, struct LDKQuantity quantity); + public static native void OfferWithDerivedMetadataBuilder_supported_quantity(long this_arg, long quantity); + // MUST_USE_RES struct LDKCResult_OfferBolt12SemanticErrorZ OfferWithDerivedMetadataBuilder_build(struct LDKOfferWithDerivedMetadataBuilder this_arg); + public static native long OfferWithDerivedMetadataBuilder_build(long this_arg); // void Offer_free(struct LDKOffer this_obj); public static native void Offer_free(long this_obj); // uint64_t Offer_clone_ptr(LDKOffer *NONNULL_PTR arg); @@ -11143,7 +12097,7 @@ public class bindings { public static native byte[][] Offer_chains(long this_arg); // MUST_USE_RES struct LDKCOption_CVec_u8ZZ Offer_metadata(const struct LDKOffer *NONNULL_PTR this_arg); public static native long Offer_metadata(long this_arg); - // MUST_USE_RES struct LDKAmount Offer_amount(const struct LDKOffer *NONNULL_PTR this_arg); + // MUST_USE_RES struct LDKCOption_AmountZ Offer_amount(const struct LDKOffer *NONNULL_PTR this_arg); public static native long Offer_amount(long this_arg); // MUST_USE_RES struct LDKPrintableString Offer_description(const struct LDKOffer *NONNULL_PTR this_arg); public static native long Offer_description(long this_arg); @@ -11159,6 +12113,8 @@ public class bindings { public static native long Offer_supported_quantity(long this_arg); // MUST_USE_RES struct LDKPublicKey Offer_signing_pubkey(const struct LDKOffer *NONNULL_PTR this_arg); public static native byte[] Offer_signing_pubkey(long this_arg); + // MUST_USE_RES struct LDKOfferId Offer_id(const struct LDKOffer *NONNULL_PTR this_arg); + public static native long Offer_id(long this_arg); // MUST_USE_RES bool Offer_supports_chain(const struct LDKOffer *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes chain); public static native boolean Offer_supports_chain(long this_arg, byte[] chain); // MUST_USE_RES bool Offer_is_expired(const struct LDKOffer *NONNULL_PTR this_arg); @@ -11169,24 +12125,76 @@ public class bindings { public static native boolean Offer_is_valid_quantity(long this_arg, long quantity); // MUST_USE_RES bool Offer_expects_quantity(const struct LDKOffer *NONNULL_PTR this_arg); public static native boolean Offer_expects_quantity(long this_arg); + // MUST_USE_RES struct LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ Offer_request_invoice_deriving_payer_id(const struct LDKOffer *NONNULL_PTR this_arg, const struct LDKExpandedKey *NONNULL_PTR expanded_key, struct LDKEntropySource entropy_source, struct LDKThirtyTwoBytes payment_id); + public static native long Offer_request_invoice_deriving_payer_id(long this_arg, long expanded_key, long entropy_source, byte[] payment_id); + // MUST_USE_RES struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ Offer_request_invoice_deriving_metadata(const struct LDKOffer *NONNULL_PTR this_arg, struct LDKPublicKey payer_id, const struct LDKExpandedKey *NONNULL_PTR expanded_key, struct LDKEntropySource entropy_source, struct LDKThirtyTwoBytes payment_id); + public static native long Offer_request_invoice_deriving_metadata(long this_arg, byte[] payer_id, long expanded_key, long entropy_source, byte[] payment_id); + // MUST_USE_RES struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ Offer_request_invoice(const struct LDKOffer *NONNULL_PTR this_arg, struct LDKCVec_u8Z metadata, struct LDKPublicKey payer_id); + public static native long Offer_request_invoice(long this_arg, byte[] metadata, byte[] payer_id); + // uint64_t Offer_hash(const struct LDKOffer *NONNULL_PTR o); + public static native long Offer_hash(long o); // struct LDKCVec_u8Z Offer_write(const struct LDKOffer *NONNULL_PTR obj); public static native byte[] Offer_write(long obj); - // void Amount_free(struct LDKAmount this_obj); - public static native void Amount_free(long this_obj); + // void Amount_free(struct LDKAmount this_ptr); + public static native void Amount_free(long this_ptr); // uint64_t Amount_clone_ptr(LDKAmount *NONNULL_PTR arg); public static native long Amount_clone_ptr(long arg); // struct LDKAmount Amount_clone(const struct LDKAmount *NONNULL_PTR orig); public static native long Amount_clone(long orig); - // void Quantity_free(struct LDKQuantity this_obj); - public static native void Quantity_free(long this_obj); + // struct LDKAmount Amount_bitcoin(uint64_t amount_msats); + public static native long Amount_bitcoin(long amount_msats); + // struct LDKAmount Amount_currency(struct LDKThreeBytes iso4217_code, uint64_t amount); + public static native long Amount_currency(byte[] iso4217_code, long amount); + // void Quantity_free(struct LDKQuantity this_ptr); + public static native void Quantity_free(long this_ptr); // uint64_t Quantity_clone_ptr(LDKQuantity *NONNULL_PTR arg); public static native long Quantity_clone_ptr(long arg); // struct LDKQuantity Quantity_clone(const struct LDKQuantity *NONNULL_PTR orig); public static native long Quantity_clone(long orig); + // struct LDKQuantity Quantity_bounded(uint64_t a); + public static native long Quantity_bounded(long a); + // struct LDKQuantity Quantity_unbounded(void); + public static native long Quantity_unbounded(); + // struct LDKQuantity Quantity_one(void); + public static native long Quantity_one(); // struct LDKCResult_OfferBolt12ParseErrorZ Offer_from_str(struct LDKStr s); public static native long Offer_from_str(String s); + // void InvoiceWithExplicitSigningPubkeyBuilder_free(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_obj); + public static native void InvoiceWithExplicitSigningPubkeyBuilder_free(long this_obj); + // void InvoiceWithDerivedSigningPubkeyBuilder_free(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_obj); + public static native void InvoiceWithDerivedSigningPubkeyBuilder_free(long this_obj); + // MUST_USE_RES struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ InvoiceWithExplicitSigningPubkeyBuilder_build(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg); + public static native long InvoiceWithExplicitSigningPubkeyBuilder_build(long this_arg); + // MUST_USE_RES void InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg, uint32_t relative_expiry_secs); + public static native void InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry(long this_arg, int relative_expiry_secs); + // MUST_USE_RES void InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg, const uint8_t (*script_hash)[32]); + public static native void InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh(long this_arg, byte[] script_hash); + // MUST_USE_RES void InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg, const uint8_t (*pubkey_hash)[20]); + public static native void InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh(long this_arg, byte[] pubkey_hash); + // MUST_USE_RES void InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg, struct LDKTweakedPublicKey output_key); + public static native void InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(long this_arg, byte[] utput_key); + // MUST_USE_RES void InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg); + public static native void InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp(long this_arg); + // MUST_USE_RES struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg); + public static native long InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign(long this_arg); + // MUST_USE_RES void InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg, uint32_t relative_expiry_secs); + public static native void InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry(long this_arg, int relative_expiry_secs); + // MUST_USE_RES void InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg, const uint8_t (*script_hash)[32]); + public static native void InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh(long this_arg, byte[] script_hash); + // MUST_USE_RES void InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg, const uint8_t (*pubkey_hash)[20]); + public static native void InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh(long this_arg, byte[] pubkey_hash); + // MUST_USE_RES void InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg, struct LDKTweakedPublicKey output_key); + public static native void InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(long this_arg, byte[] utput_key); + // MUST_USE_RES void InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg); + public static native void InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp(long this_arg); // void UnsignedBolt12Invoice_free(struct LDKUnsignedBolt12Invoice this_obj); public static native void UnsignedBolt12Invoice_free(long this_obj); + // uint64_t UnsignedBolt12Invoice_clone_ptr(LDKUnsignedBolt12Invoice *NONNULL_PTR arg); + public static native long UnsignedBolt12Invoice_clone_ptr(long arg); + // struct LDKUnsignedBolt12Invoice UnsignedBolt12Invoice_clone(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR orig); + public static native long UnsignedBolt12Invoice_clone(long orig); + // void SignBolt12InvoiceFn_free(struct LDKSignBolt12InvoiceFn this_ptr); + public static native void SignBolt12InvoiceFn_free(long this_ptr); // MUST_USE_RES struct LDKTaggedHash UnsignedBolt12Invoice_tagged_hash(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg); public static native long UnsignedBolt12Invoice_tagged_hash(long this_arg); // void Bolt12Invoice_free(struct LDKBolt12Invoice this_obj); @@ -11201,7 +12209,7 @@ public class bindings { public static native byte[] UnsignedBolt12Invoice_chain(long this_arg); // MUST_USE_RES struct LDKCOption_CVec_u8ZZ UnsignedBolt12Invoice_metadata(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg); public static native long UnsignedBolt12Invoice_metadata(long this_arg); - // MUST_USE_RES struct LDKAmount UnsignedBolt12Invoice_amount(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg); + // MUST_USE_RES struct LDKCOption_AmountZ UnsignedBolt12Invoice_amount(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg); public static native long UnsignedBolt12Invoice_amount(long this_arg); // MUST_USE_RES struct LDKOfferFeatures UnsignedBolt12Invoice_offer_features(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg); public static native long UnsignedBolt12Invoice_offer_features(long this_arg); @@ -11213,7 +12221,7 @@ public class bindings { public static native long UnsignedBolt12Invoice_issuer(long this_arg); // MUST_USE_RES struct LDKCVec_BlindedPathZ UnsignedBolt12Invoice_message_paths(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg); public static native long[] UnsignedBolt12Invoice_message_paths(long this_arg); - // MUST_USE_RES struct LDKQuantity UnsignedBolt12Invoice_supported_quantity(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg); + // MUST_USE_RES struct LDKCOption_QuantityZ UnsignedBolt12Invoice_supported_quantity(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg); public static native long UnsignedBolt12Invoice_supported_quantity(long this_arg); // MUST_USE_RES struct LDKu8slice UnsignedBolt12Invoice_payer_metadata(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg); public static native byte[] UnsignedBolt12Invoice_payer_metadata(long this_arg); @@ -11245,7 +12253,7 @@ public class bindings { public static native byte[] Bolt12Invoice_chain(long this_arg); // MUST_USE_RES struct LDKCOption_CVec_u8ZZ Bolt12Invoice_metadata(const struct LDKBolt12Invoice *NONNULL_PTR this_arg); public static native long Bolt12Invoice_metadata(long this_arg); - // MUST_USE_RES struct LDKAmount Bolt12Invoice_amount(const struct LDKBolt12Invoice *NONNULL_PTR this_arg); + // MUST_USE_RES struct LDKCOption_AmountZ Bolt12Invoice_amount(const struct LDKBolt12Invoice *NONNULL_PTR this_arg); public static native long Bolt12Invoice_amount(long this_arg); // MUST_USE_RES struct LDKOfferFeatures Bolt12Invoice_offer_features(const struct LDKBolt12Invoice *NONNULL_PTR this_arg); public static native long Bolt12Invoice_offer_features(long this_arg); @@ -11257,7 +12265,7 @@ public class bindings { public static native long Bolt12Invoice_issuer(long this_arg); // MUST_USE_RES struct LDKCVec_BlindedPathZ Bolt12Invoice_message_paths(const struct LDKBolt12Invoice *NONNULL_PTR this_arg); public static native long[] Bolt12Invoice_message_paths(long this_arg); - // MUST_USE_RES struct LDKQuantity Bolt12Invoice_supported_quantity(const struct LDKBolt12Invoice *NONNULL_PTR this_arg); + // MUST_USE_RES struct LDKCOption_QuantityZ Bolt12Invoice_supported_quantity(const struct LDKBolt12Invoice *NONNULL_PTR this_arg); public static native long Bolt12Invoice_supported_quantity(long this_arg); // MUST_USE_RES struct LDKu8slice Bolt12Invoice_payer_metadata(const struct LDKBolt12Invoice *NONNULL_PTR this_arg); public static native byte[] Bolt12Invoice_payer_metadata(long this_arg); @@ -11289,6 +12297,8 @@ public class bindings { public static native byte[] Bolt12Invoice_signable_hash(long this_arg); // MUST_USE_RES struct LDKCResult_ThirtyTwoBytesNoneZ Bolt12Invoice_verify(const struct LDKBolt12Invoice *NONNULL_PTR this_arg, const struct LDKExpandedKey *NONNULL_PTR key); public static native long Bolt12Invoice_verify(long this_arg, long key); + // uint64_t Bolt12Invoice_hash(const struct LDKBolt12Invoice *NONNULL_PTR o); + public static native long Bolt12Invoice_hash(long o); // struct LDKCVec_u8Z UnsignedBolt12Invoice_write(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR obj); public static native byte[] UnsignedBolt12Invoice_write(long obj); // struct LDKCVec_u8Z Bolt12Invoice_write(const struct LDKBolt12Invoice *NONNULL_PTR obj); @@ -11371,8 +12381,38 @@ public class bindings { public static native byte[] InvoiceError_write(long obj); // struct LDKCResult_InvoiceErrorDecodeErrorZ InvoiceError_read(struct LDKu8slice ser); public static native long InvoiceError_read(byte[] ser); + // void InvoiceRequestWithExplicitPayerIdBuilder_free(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_obj); + public static native void InvoiceRequestWithExplicitPayerIdBuilder_free(long this_obj); + // void InvoiceRequestWithDerivedPayerIdBuilder_free(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_obj); + public static native void InvoiceRequestWithDerivedPayerIdBuilder_free(long this_obj); + // MUST_USE_RES struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ InvoiceRequestWithExplicitPayerIdBuilder_build(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg); + public static native long InvoiceRequestWithExplicitPayerIdBuilder_build(long this_arg); + // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithExplicitPayerIdBuilder_chain(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg, enum LDKNetwork network); + public static native long InvoiceRequestWithExplicitPayerIdBuilder_chain(long this_arg, Network network); + // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg, uint64_t amount_msats); + public static native long InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(long this_arg, long amount_msats); + // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithExplicitPayerIdBuilder_quantity(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg, uint64_t quantity); + public static native long InvoiceRequestWithExplicitPayerIdBuilder_quantity(long this_arg, long quantity); + // MUST_USE_RES void InvoiceRequestWithExplicitPayerIdBuilder_payer_note(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg, struct LDKStr payer_note); + public static native void InvoiceRequestWithExplicitPayerIdBuilder_payer_note(long this_arg, String payer_note); + // MUST_USE_RES struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg); + public static native long InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(long this_arg); + // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithDerivedPayerIdBuilder_chain(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg, enum LDKNetwork network); + public static native long InvoiceRequestWithDerivedPayerIdBuilder_chain(long this_arg, Network network); + // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithDerivedPayerIdBuilder_amount_msats(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg, uint64_t amount_msats); + public static native long InvoiceRequestWithDerivedPayerIdBuilder_amount_msats(long this_arg, long amount_msats); + // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithDerivedPayerIdBuilder_quantity(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg, uint64_t quantity); + public static native long InvoiceRequestWithDerivedPayerIdBuilder_quantity(long this_arg, long quantity); + // MUST_USE_RES void InvoiceRequestWithDerivedPayerIdBuilder_payer_note(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg, struct LDKStr payer_note); + public static native void InvoiceRequestWithDerivedPayerIdBuilder_payer_note(long this_arg, String payer_note); // void UnsignedInvoiceRequest_free(struct LDKUnsignedInvoiceRequest this_obj); public static native void UnsignedInvoiceRequest_free(long this_obj); + // uint64_t UnsignedInvoiceRequest_clone_ptr(LDKUnsignedInvoiceRequest *NONNULL_PTR arg); + public static native long UnsignedInvoiceRequest_clone_ptr(long arg); + // struct LDKUnsignedInvoiceRequest UnsignedInvoiceRequest_clone(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR orig); + public static native long UnsignedInvoiceRequest_clone(long orig); + // void SignInvoiceRequestFn_free(struct LDKSignInvoiceRequestFn this_ptr); + public static native void SignInvoiceRequestFn_free(long this_ptr); // MUST_USE_RES struct LDKTaggedHash UnsignedInvoiceRequest_tagged_hash(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg); public static native long UnsignedInvoiceRequest_tagged_hash(long this_arg); // void InvoiceRequest_free(struct LDKInvoiceRequest this_obj); @@ -11383,6 +12423,10 @@ public class bindings { public static native long InvoiceRequest_clone(long orig); // void VerifiedInvoiceRequest_free(struct LDKVerifiedInvoiceRequest this_obj); public static native void VerifiedInvoiceRequest_free(long this_obj); + // struct LDKOfferId VerifiedInvoiceRequest_get_offer_id(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_ptr); + public static native long VerifiedInvoiceRequest_get_offer_id(long this_ptr); + // void VerifiedInvoiceRequest_set_offer_id(struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_ptr, struct LDKOfferId val); + public static native void VerifiedInvoiceRequest_set_offer_id(long this_ptr, long val); // struct LDKCOption_SecretKeyZ VerifiedInvoiceRequest_get_keys(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_ptr); public static native long VerifiedInvoiceRequest_get_keys(long this_ptr); // void VerifiedInvoiceRequest_set_keys(struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_ptr, struct LDKCOption_SecretKeyZ val); @@ -11395,7 +12439,7 @@ public class bindings { public static native byte[][] UnsignedInvoiceRequest_chains(long this_arg); // MUST_USE_RES struct LDKCOption_CVec_u8ZZ UnsignedInvoiceRequest_metadata(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg); public static native long UnsignedInvoiceRequest_metadata(long this_arg); - // MUST_USE_RES struct LDKAmount UnsignedInvoiceRequest_amount(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg); + // MUST_USE_RES struct LDKCOption_AmountZ UnsignedInvoiceRequest_amount(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg); public static native long UnsignedInvoiceRequest_amount(long this_arg); // MUST_USE_RES struct LDKPrintableString UnsignedInvoiceRequest_description(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg); public static native long UnsignedInvoiceRequest_description(long this_arg); @@ -11429,7 +12473,7 @@ public class bindings { public static native byte[][] InvoiceRequest_chains(long this_arg); // MUST_USE_RES struct LDKCOption_CVec_u8ZZ InvoiceRequest_metadata(const struct LDKInvoiceRequest *NONNULL_PTR this_arg); public static native long InvoiceRequest_metadata(long this_arg); - // MUST_USE_RES struct LDKAmount InvoiceRequest_amount(const struct LDKInvoiceRequest *NONNULL_PTR this_arg); + // MUST_USE_RES struct LDKCOption_AmountZ InvoiceRequest_amount(const struct LDKInvoiceRequest *NONNULL_PTR this_arg); public static native long InvoiceRequest_amount(long this_arg); // MUST_USE_RES struct LDKPrintableString InvoiceRequest_description(const struct LDKInvoiceRequest *NONNULL_PTR this_arg); public static native long InvoiceRequest_description(long this_arg); @@ -11459,15 +12503,19 @@ public class bindings { public static native byte[] InvoiceRequest_payer_id(long this_arg); // MUST_USE_RES struct LDKPrintableString InvoiceRequest_payer_note(const struct LDKInvoiceRequest *NONNULL_PTR this_arg); public static native long InvoiceRequest_payer_note(long this_arg); - // MUST_USE_RES struct LDKSchnorrSignature InvoiceRequest_signature(const struct LDKInvoiceRequest *NONNULL_PTR this_arg); - public static native byte[] InvoiceRequest_signature(long this_arg); + // MUST_USE_RES struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ InvoiceRequest_respond_with(const struct LDKInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths, struct LDKThirtyTwoBytes payment_hash); + public static native long InvoiceRequest_respond_with(long this_arg, long[] payment_paths, byte[] payment_hash); + // MUST_USE_RES struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ InvoiceRequest_respond_with_no_std(const struct LDKInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths, struct LDKThirtyTwoBytes payment_hash, uint64_t created_at); + public static native long InvoiceRequest_respond_with_no_std(long this_arg, long[] payment_paths, byte[] payment_hash, long created_at); // MUST_USE_RES struct LDKCResult_VerifiedInvoiceRequestNoneZ InvoiceRequest_verify(struct LDKInvoiceRequest this_arg, const struct LDKExpandedKey *NONNULL_PTR key); public static native long InvoiceRequest_verify(long this_arg, long key); + // MUST_USE_RES struct LDKSchnorrSignature InvoiceRequest_signature(const struct LDKInvoiceRequest *NONNULL_PTR this_arg); + public static native byte[] InvoiceRequest_signature(long this_arg); // MUST_USE_RES struct LDKCVec_ThirtyTwoBytesZ VerifiedInvoiceRequest_chains(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg); public static native byte[][] VerifiedInvoiceRequest_chains(long this_arg); // MUST_USE_RES struct LDKCOption_CVec_u8ZZ VerifiedInvoiceRequest_metadata(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg); public static native long VerifiedInvoiceRequest_metadata(long this_arg); - // MUST_USE_RES struct LDKAmount VerifiedInvoiceRequest_amount(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg); + // MUST_USE_RES struct LDKCOption_AmountZ VerifiedInvoiceRequest_amount(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg); public static native long VerifiedInvoiceRequest_amount(long this_arg); // MUST_USE_RES struct LDKPrintableString VerifiedInvoiceRequest_description(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg); public static native long VerifiedInvoiceRequest_description(long this_arg); @@ -11497,10 +12545,44 @@ public class bindings { public static native byte[] VerifiedInvoiceRequest_payer_id(long this_arg); // MUST_USE_RES struct LDKPrintableString VerifiedInvoiceRequest_payer_note(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg); public static native long VerifiedInvoiceRequest_payer_note(long this_arg); + // MUST_USE_RES struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ VerifiedInvoiceRequest_respond_with(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths, struct LDKThirtyTwoBytes payment_hash); + public static native long VerifiedInvoiceRequest_respond_with(long this_arg, long[] payment_paths, byte[] payment_hash); + // MUST_USE_RES struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ VerifiedInvoiceRequest_respond_with_no_std(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths, struct LDKThirtyTwoBytes payment_hash, uint64_t created_at); + public static native long VerifiedInvoiceRequest_respond_with_no_std(long this_arg, long[] payment_paths, byte[] payment_hash, long created_at); + // MUST_USE_RES struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ VerifiedInvoiceRequest_respond_using_derived_keys(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths, struct LDKThirtyTwoBytes payment_hash); + public static native long VerifiedInvoiceRequest_respond_using_derived_keys(long this_arg, long[] payment_paths, byte[] payment_hash); + // MUST_USE_RES struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ VerifiedInvoiceRequest_respond_using_derived_keys_no_std(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths, struct LDKThirtyTwoBytes payment_hash, uint64_t created_at); + public static native long VerifiedInvoiceRequest_respond_using_derived_keys_no_std(long this_arg, long[] payment_paths, byte[] payment_hash, long created_at); // struct LDKCVec_u8Z UnsignedInvoiceRequest_write(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR obj); public static native byte[] UnsignedInvoiceRequest_write(long obj); // struct LDKCVec_u8Z InvoiceRequest_write(const struct LDKInvoiceRequest *NONNULL_PTR obj); public static native byte[] InvoiceRequest_write(long obj); + // void InvoiceRequestFields_free(struct LDKInvoiceRequestFields this_obj); + public static native void InvoiceRequestFields_free(long this_obj); + // struct LDKPublicKey InvoiceRequestFields_get_payer_id(const struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr); + public static native byte[] InvoiceRequestFields_get_payer_id(long this_ptr); + // void InvoiceRequestFields_set_payer_id(struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); + public static native void InvoiceRequestFields_set_payer_id(long this_ptr, byte[] val); + // struct LDKCOption_u64Z InvoiceRequestFields_get_quantity(const struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr); + public static native long InvoiceRequestFields_get_quantity(long this_ptr); + // void InvoiceRequestFields_set_quantity(struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val); + public static native void InvoiceRequestFields_set_quantity(long this_ptr, long val); + // struct LDKUntrustedString InvoiceRequestFields_get_payer_note_truncated(const struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr); + public static native long InvoiceRequestFields_get_payer_note_truncated(long this_ptr); + // void InvoiceRequestFields_set_payer_note_truncated(struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr, struct LDKUntrustedString val); + public static native void InvoiceRequestFields_set_payer_note_truncated(long this_ptr, long val); + // MUST_USE_RES struct LDKInvoiceRequestFields InvoiceRequestFields_new(struct LDKPublicKey payer_id_arg, struct LDKCOption_u64Z quantity_arg, struct LDKUntrustedString payer_note_truncated_arg); + public static native long InvoiceRequestFields_new(byte[] payer_id_arg, long quantity_arg, long payer_note_truncated_arg); + // uint64_t InvoiceRequestFields_clone_ptr(LDKInvoiceRequestFields *NONNULL_PTR arg); + public static native long InvoiceRequestFields_clone_ptr(long arg); + // struct LDKInvoiceRequestFields InvoiceRequestFields_clone(const struct LDKInvoiceRequestFields *NONNULL_PTR orig); + public static native long InvoiceRequestFields_clone(long orig); + // bool InvoiceRequestFields_eq(const struct LDKInvoiceRequestFields *NONNULL_PTR a, const struct LDKInvoiceRequestFields *NONNULL_PTR b); + public static native boolean InvoiceRequestFields_eq(long a, long b); + // struct LDKCVec_u8Z InvoiceRequestFields_write(const struct LDKInvoiceRequestFields *NONNULL_PTR obj); + public static native byte[] InvoiceRequestFields_write(long obj); + // struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ InvoiceRequestFields_read(struct LDKu8slice ser); + public static native long InvoiceRequestFields_read(byte[] ser); // void TaggedHash_free(struct LDKTaggedHash this_obj); public static native void TaggedHash_free(long this_obj); // uint64_t TaggedHash_clone_ptr(LDKTaggedHash *NONNULL_PTR arg); @@ -11513,6 +12595,16 @@ public class bindings { public static native String TaggedHash_tag(long this_arg); // MUST_USE_RES struct LDKThirtyTwoBytes TaggedHash_merkle_root(const struct LDKTaggedHash *NONNULL_PTR this_arg); public static native byte[] TaggedHash_merkle_root(long this_arg); + // void SignError_free(struct LDKSignError this_ptr); + public static native void SignError_free(long this_ptr); + // uint64_t SignError_clone_ptr(LDKSignError *NONNULL_PTR arg); + public static native long SignError_clone_ptr(long arg); + // struct LDKSignError SignError_clone(const struct LDKSignError *NONNULL_PTR orig); + public static native long SignError_clone(long orig); + // struct LDKSignError SignError_signing(void); + public static native long SignError_signing(); + // struct LDKSignError SignError_verification(enum LDKSecp256k1Error a); + public static native long SignError_verification(Secp256k1Error a); // void Bolt12ParseError_free(struct LDKBolt12ParseError this_obj); public static native void Bolt12ParseError_free(long this_obj); // uint64_t Bolt12ParseError_clone_ptr(LDKBolt12ParseError *NONNULL_PTR arg); @@ -11567,6 +12659,8 @@ public class bindings { public static native Bolt12SemanticError Bolt12SemanticError_duplicate_payment_id(); // enum LDKBolt12SemanticError Bolt12SemanticError_missing_paths(void); public static native Bolt12SemanticError Bolt12SemanticError_missing_paths(); + // enum LDKBolt12SemanticError Bolt12SemanticError_unexpected_paths(void); + public static native Bolt12SemanticError Bolt12SemanticError_unexpected_paths(); // enum LDKBolt12SemanticError Bolt12SemanticError_invalid_pay_info(void); public static native Bolt12SemanticError Bolt12SemanticError_invalid_pay_info(); // enum LDKBolt12SemanticError Bolt12SemanticError_missing_creation_time(void); @@ -11575,6 +12669,32 @@ public class bindings { public static native Bolt12SemanticError Bolt12SemanticError_missing_payment_hash(); // enum LDKBolt12SemanticError Bolt12SemanticError_missing_signature(void); public static native Bolt12SemanticError Bolt12SemanticError_missing_signature(); + // void RefundMaybeWithDerivedMetadataBuilder_free(struct LDKRefundMaybeWithDerivedMetadataBuilder this_obj); + public static native void RefundMaybeWithDerivedMetadataBuilder_free(long this_obj); + // uint64_t RefundMaybeWithDerivedMetadataBuilder_clone_ptr(LDKRefundMaybeWithDerivedMetadataBuilder *NONNULL_PTR arg); + public static native long RefundMaybeWithDerivedMetadataBuilder_clone_ptr(long arg); + // struct LDKRefundMaybeWithDerivedMetadataBuilder RefundMaybeWithDerivedMetadataBuilder_clone(const struct LDKRefundMaybeWithDerivedMetadataBuilder *NONNULL_PTR orig); + public static native long RefundMaybeWithDerivedMetadataBuilder_clone(long orig); + // MUST_USE_RES struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ RefundMaybeWithDerivedMetadataBuilder_new(struct LDKCVec_u8Z metadata, struct LDKPublicKey payer_id, uint64_t amount_msats); + public static native long RefundMaybeWithDerivedMetadataBuilder_new(byte[] metadata, byte[] payer_id, long amount_msats); + // MUST_USE_RES struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(struct LDKPublicKey node_id, const struct LDKExpandedKey *NONNULL_PTR expanded_key, struct LDKEntropySource entropy_source, uint64_t amount_msats, struct LDKThirtyTwoBytes payment_id); + public static native long RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(byte[] node_id, long expanded_key, long entropy_source, long amount_msats, byte[] payment_id); + // MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_description(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, struct LDKStr description); + public static native void RefundMaybeWithDerivedMetadataBuilder_description(long this_arg, String description); + // MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_absolute_expiry(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, uint64_t absolute_expiry); + public static native void RefundMaybeWithDerivedMetadataBuilder_absolute_expiry(long this_arg, long absolute_expiry); + // MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_issuer(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, struct LDKStr issuer); + public static native void RefundMaybeWithDerivedMetadataBuilder_issuer(long this_arg, String issuer); + // MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_path(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, struct LDKBlindedPath path); + public static native void RefundMaybeWithDerivedMetadataBuilder_path(long this_arg, long path); + // MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_chain(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, enum LDKNetwork network); + public static native void RefundMaybeWithDerivedMetadataBuilder_chain(long this_arg, Network network); + // MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_quantity(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, uint64_t quantity); + public static native void RefundMaybeWithDerivedMetadataBuilder_quantity(long this_arg, long quantity); + // MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_payer_note(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, struct LDKStr payer_note); + public static native void RefundMaybeWithDerivedMetadataBuilder_payer_note(long this_arg, String payer_note); + // MUST_USE_RES struct LDKCResult_RefundBolt12SemanticErrorZ RefundMaybeWithDerivedMetadataBuilder_build(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg); + public static native long RefundMaybeWithDerivedMetadataBuilder_build(long this_arg); // void Refund_free(struct LDKRefund this_obj); public static native void Refund_free(long this_obj); // uint64_t Refund_clone_ptr(LDKRefund *NONNULL_PTR arg); @@ -11607,6 +12727,8 @@ public class bindings { public static native byte[] Refund_payer_id(long this_arg); // MUST_USE_RES struct LDKPrintableString Refund_payer_note(const struct LDKRefund *NONNULL_PTR this_arg); public static native long Refund_payer_note(long this_arg); + // uint64_t Refund_hash(const struct LDKRefund *NONNULL_PTR o); + public static native long Refund_hash(long o); // struct LDKCVec_u8Z Refund_write(const struct LDKRefund *NONNULL_PTR obj); public static native byte[] Refund_write(long obj); // struct LDKCResult_RefundBolt12ParseErrorZ Refund_from_str(struct LDKStr s); @@ -11649,6 +12771,8 @@ public class bindings { public static native long NodeId_clone(long orig); // MUST_USE_RES struct LDKNodeId NodeId_from_pubkey(struct LDKPublicKey pubkey); public static native long NodeId_from_pubkey(byte[] pubkey); + // MUST_USE_RES struct LDKCResult_NodeIdDecodeErrorZ NodeId_from_slice(struct LDKu8slice bytes); + public static native long NodeId_from_slice(byte[] bytes); // MUST_USE_RES struct LDKu8slice NodeId_as_slice(const struct LDKNodeId *NONNULL_PTR this_arg); public static native byte[] NodeId_as_slice(long this_arg); // MUST_USE_RES const uint8_t (*NodeId_as_array(const struct LDKNodeId *NONNULL_PTR this_arg))[33]; @@ -11795,6 +12919,10 @@ public class bindings { public static native long DirectedChannelInfo_channel(long this_arg); // MUST_USE_RES struct LDKEffectiveCapacity DirectedChannelInfo_effective_capacity(const struct LDKDirectedChannelInfo *NONNULL_PTR this_arg); public static native long DirectedChannelInfo_effective_capacity(long this_arg); + // MUST_USE_RES struct LDKNodeId DirectedChannelInfo_source(const struct LDKDirectedChannelInfo *NONNULL_PTR this_arg); + public static native long DirectedChannelInfo_source(long this_arg); + // MUST_USE_RES struct LDKNodeId DirectedChannelInfo_target(const struct LDKDirectedChannelInfo *NONNULL_PTR this_arg); + public static native long DirectedChannelInfo_target(long this_arg); // void EffectiveCapacity_free(struct LDKEffectiveCapacity this_ptr); public static native void EffectiveCapacity_free(long this_ptr); // uint64_t EffectiveCapacity_clone_ptr(LDKEffectiveCapacity *NONNULL_PTR arg); @@ -11913,6 +13041,8 @@ public class bindings { public static native long NodeInfo_clone(long orig); // bool NodeInfo_eq(const struct LDKNodeInfo *NONNULL_PTR a, const struct LDKNodeInfo *NONNULL_PTR b); public static native boolean NodeInfo_eq(long a, long b); + // MUST_USE_RES bool NodeInfo_is_tor_only(const struct LDKNodeInfo *NONNULL_PTR this_arg); + public static native boolean NodeInfo_is_tor_only(long this_arg); // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj); public static native byte[] NodeInfo_write(long obj); // struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser); @@ -12543,8 +13673,12 @@ public class bindings { public static native long DelayedPaymentOutputDescriptor_get_channel_value_satoshis(long this_ptr); // void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val); public static native void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(long this_ptr, long val); - // MUST_USE_RES struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_new(struct LDKOutPoint outpoint_arg, struct LDKPublicKey per_commitment_point_arg, uint16_t to_self_delay_arg, struct LDKTxOut output_arg, struct LDKRevocationKey revocation_pubkey_arg, struct LDKThirtyTwoBytes channel_keys_id_arg, uint64_t channel_value_satoshis_arg); - public static native long DelayedPaymentOutputDescriptor_new(long outpoint_arg, byte[] per_commitment_point_arg, short to_self_delay_arg, long output_arg, long revocation_pubkey_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg); + // struct LDKChannelTransactionParameters DelayedPaymentOutputDescriptor_get_channel_transaction_parameters(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr); + public static native long DelayedPaymentOutputDescriptor_get_channel_transaction_parameters(long this_ptr); + // void DelayedPaymentOutputDescriptor_set_channel_transaction_parameters(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKChannelTransactionParameters val); + public static native void DelayedPaymentOutputDescriptor_set_channel_transaction_parameters(long this_ptr, long val); + // MUST_USE_RES struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_new(struct LDKOutPoint outpoint_arg, struct LDKPublicKey per_commitment_point_arg, uint16_t to_self_delay_arg, struct LDKTxOut output_arg, struct LDKRevocationKey revocation_pubkey_arg, struct LDKThirtyTwoBytes channel_keys_id_arg, uint64_t channel_value_satoshis_arg, struct LDKChannelTransactionParameters channel_transaction_parameters_arg); + public static native long DelayedPaymentOutputDescriptor_new(long outpoint_arg, byte[] per_commitment_point_arg, short to_self_delay_arg, long output_arg, long revocation_pubkey_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg, long channel_transaction_parameters_arg); // uint64_t DelayedPaymentOutputDescriptor_clone_ptr(LDKDelayedPaymentOutputDescriptor *NONNULL_PTR arg); public static native long DelayedPaymentOutputDescriptor_clone_ptr(long arg); // struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig); @@ -12651,6 +13785,10 @@ public class bindings { public static native long HTLCDescriptor_get_channel_derivation_parameters(long this_ptr); // void HTLCDescriptor_set_channel_derivation_parameters(struct LDKHTLCDescriptor *NONNULL_PTR this_ptr, struct LDKChannelDerivationParameters val); public static native void HTLCDescriptor_set_channel_derivation_parameters(long this_ptr, long val); + // const uint8_t (*HTLCDescriptor_get_commitment_txid(const struct LDKHTLCDescriptor *NONNULL_PTR this_ptr))[32]; + public static native byte[] HTLCDescriptor_get_commitment_txid(long this_ptr); + // void HTLCDescriptor_set_commitment_txid(struct LDKHTLCDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + public static native void HTLCDescriptor_set_commitment_txid(long this_ptr, byte[] val); // uint64_t HTLCDescriptor_get_per_commitment_number(const struct LDKHTLCDescriptor *NONNULL_PTR this_ptr); public static native long HTLCDescriptor_get_per_commitment_number(long this_ptr); // void HTLCDescriptor_set_per_commitment_number(struct LDKHTLCDescriptor *NONNULL_PTR this_ptr, uint64_t val); @@ -12675,6 +13813,8 @@ public class bindings { public static native byte[] HTLCDescriptor_get_counterparty_sig(long this_ptr); // void HTLCDescriptor_set_counterparty_sig(struct LDKHTLCDescriptor *NONNULL_PTR this_ptr, struct LDKECDSASignature val); public static native void HTLCDescriptor_set_counterparty_sig(long this_ptr, byte[] val); + // MUST_USE_RES struct LDKHTLCDescriptor HTLCDescriptor_new(struct LDKChannelDerivationParameters channel_derivation_parameters_arg, struct LDKThirtyTwoBytes commitment_txid_arg, uint64_t per_commitment_number_arg, struct LDKPublicKey per_commitment_point_arg, uint32_t feerate_per_kw_arg, struct LDKHTLCOutputInCommitment htlc_arg, struct LDKCOption_ThirtyTwoBytesZ preimage_arg, struct LDKECDSASignature counterparty_sig_arg); + public static native long HTLCDescriptor_new(long channel_derivation_parameters_arg, byte[] commitment_txid_arg, long per_commitment_number_arg, byte[] per_commitment_point_arg, int feerate_per_kw_arg, long htlc_arg, long preimage_arg, byte[] counterparty_sig_arg); // uint64_t HTLCDescriptor_clone_ptr(LDKHTLCDescriptor *NONNULL_PTR arg); public static native long HTLCDescriptor_clone_ptr(long arg); // struct LDKHTLCDescriptor HTLCDescriptor_clone(const struct LDKHTLCDescriptor *NONNULL_PTR orig); @@ -12711,8 +13851,12 @@ public class bindings { public static native void EntropySource_free(long this_ptr); // void NodeSigner_free(struct LDKNodeSigner this_ptr); public static native void NodeSigner_free(long this_ptr); + // void OutputSpender_free(struct LDKOutputSpender this_ptr); + public static native void OutputSpender_free(long this_ptr); // void SignerProvider_free(struct LDKSignerProvider this_ptr); public static native void SignerProvider_free(long this_ptr); + // void ChangeDestinationSource_free(struct LDKChangeDestinationSource this_ptr); + public static native void ChangeDestinationSource_free(long this_ptr); // void InMemorySigner_free(struct LDKInMemorySigner this_obj); public static native void InMemorySigner_free(long this_obj); // const uint8_t (*InMemorySigner_get_funding_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32]; @@ -12785,12 +13929,12 @@ public class bindings { public static native long KeysManager_derive_channel_keys(long this_arg, long channel_value_satoshis, byte[] params); // MUST_USE_RES struct LDKCResult_CVec_u8ZNoneZ KeysManager_sign_spendable_outputs_psbt(const struct LDKKeysManager *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ descriptors, struct LDKCVec_u8Z psbt); public static native long KeysManager_sign_spendable_outputs_psbt(long this_arg, long[] descriptors, byte[] psbt); - // MUST_USE_RES struct LDKCResult_TransactionNoneZ KeysManager_spend_spendable_outputs(const struct LDKKeysManager *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ descriptors, struct LDKCVec_TxOutZ outputs, struct LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight, struct LDKCOption_u32Z locktime); - public static native long KeysManager_spend_spendable_outputs(long this_arg, long[] descriptors, long[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, long locktime); // struct LDKEntropySource KeysManager_as_EntropySource(const struct LDKKeysManager *NONNULL_PTR this_arg); public static native long KeysManager_as_EntropySource(long this_arg); // struct LDKNodeSigner KeysManager_as_NodeSigner(const struct LDKKeysManager *NONNULL_PTR this_arg); public static native long KeysManager_as_NodeSigner(long this_arg); + // struct LDKOutputSpender KeysManager_as_OutputSpender(const struct LDKKeysManager *NONNULL_PTR this_arg); + public static native long KeysManager_as_OutputSpender(long this_arg); // struct LDKSignerProvider KeysManager_as_SignerProvider(const struct LDKKeysManager *NONNULL_PTR this_arg); public static native long KeysManager_as_SignerProvider(long this_arg); // void PhantomKeysManager_free(struct LDKPhantomKeysManager this_obj); @@ -12799,18 +13943,24 @@ public class bindings { public static native long PhantomKeysManager_as_EntropySource(long this_arg); // struct LDKNodeSigner PhantomKeysManager_as_NodeSigner(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg); public static native long PhantomKeysManager_as_NodeSigner(long this_arg); + // struct LDKOutputSpender PhantomKeysManager_as_OutputSpender(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg); + public static native long PhantomKeysManager_as_OutputSpender(long this_arg); // struct LDKSignerProvider PhantomKeysManager_as_SignerProvider(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg); public static native long PhantomKeysManager_as_SignerProvider(long this_arg); // MUST_USE_RES struct LDKPhantomKeysManager PhantomKeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos, const uint8_t (*cross_node_seed)[32]); public static native long PhantomKeysManager_new(byte[] seed, long starting_time_secs, int starting_time_nanos, byte[] cross_node_seed); - // MUST_USE_RES struct LDKCResult_TransactionNoneZ PhantomKeysManager_spend_spendable_outputs(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ descriptors, struct LDKCVec_TxOutZ outputs, struct LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight, struct LDKCOption_u32Z locktime); - public static native long PhantomKeysManager_spend_spendable_outputs(long this_arg, long[] descriptors, long[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, long locktime); // MUST_USE_RES struct LDKInMemorySigner PhantomKeysManager_derive_channel_keys(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg, uint64_t channel_value_satoshis, const uint8_t (*params)[32]); public static native long PhantomKeysManager_derive_channel_keys(long this_arg, long channel_value_satoshis, byte[] params); // MUST_USE_RES struct LDKSecretKey PhantomKeysManager_get_node_secret_key(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg); public static native byte[] PhantomKeysManager_get_node_secret_key(long this_arg); // MUST_USE_RES struct LDKSecretKey PhantomKeysManager_get_phantom_node_secret_key(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg); public static native byte[] PhantomKeysManager_get_phantom_node_secret_key(long this_arg); + // void RandomBytes_free(struct LDKRandomBytes this_obj); + public static native void RandomBytes_free(long this_obj); + // MUST_USE_RES struct LDKRandomBytes RandomBytes_new(struct LDKThirtyTwoBytes seed); + public static native long RandomBytes_new(byte[] seed); + // struct LDKEntropySource RandomBytes_as_EntropySource(const struct LDKRandomBytes *NONNULL_PTR this_arg); + public static native long RandomBytes_as_EntropySource(long this_arg); // void EcdsaChannelSigner_free(struct LDKEcdsaChannelSigner this_ptr); public static native void EcdsaChannelSigner_free(long this_ptr); // uint64_t WriteableEcdsaChannelSigner_clone_ptr(LDKWriteableEcdsaChannelSigner *NONNULL_PTR arg); @@ -12861,6 +14011,12 @@ public class bindings { public static native long Destination_node(byte[] a); // struct LDKDestination Destination_blinded_path(struct LDKBlindedPath a); public static native long Destination_blinded_path(long a); + // uint64_t Destination_hash(const struct LDKDestination *NONNULL_PTR o); + public static native long Destination_hash(long o); + // bool Destination_eq(const struct LDKDestination *NONNULL_PTR a, const struct LDKDestination *NONNULL_PTR b); + public static native boolean Destination_eq(long a, long b); + // void Destination_resolve(struct LDKDestination *NONNULL_PTR this_arg, const struct LDKReadOnlyNetworkGraph *NONNULL_PTR network_graph); + public static native void Destination_resolve(long this_arg, long network_graph); // void SendSuccess_free(struct LDKSendSuccess this_ptr); public static native void SendSuccess_free(long this_ptr); // uint64_t SendSuccess_clone_ptr(LDKSendSuccess *NONNULL_PTR arg); @@ -12871,6 +14027,8 @@ public class bindings { public static native long SendSuccess_buffered(); // struct LDKSendSuccess SendSuccess_buffered_awaiting_connection(struct LDKPublicKey a); public static native long SendSuccess_buffered_awaiting_connection(byte[] a); + // uint64_t SendSuccess_hash(const struct LDKSendSuccess *NONNULL_PTR o); + public static native long SendSuccess_hash(long o); // bool SendSuccess_eq(const struct LDKSendSuccess *NONNULL_PTR a, const struct LDKSendSuccess *NONNULL_PTR b); public static native boolean SendSuccess_eq(long a, long b); // void SendError_free(struct LDKSendError this_ptr); @@ -12895,8 +14053,12 @@ public class bindings { public static native long SendError_buffer_full(); // struct LDKSendError SendError_get_node_id_failed(void); public static native long SendError_get_node_id_failed(); + // struct LDKSendError SendError_unresolved_introduction_node(void); + public static native long SendError_unresolved_introduction_node(); // struct LDKSendError SendError_blinded_path_advance_failed(void); public static native long SendError_blinded_path_advance_failed(); + // uint64_t SendError_hash(const struct LDKSendError *NONNULL_PTR o); + public static native long SendError_hash(long o); // bool SendError_eq(const struct LDKSendError *NONNULL_PTR a, const struct LDKSendError *NONNULL_PTR b); public static native boolean SendError_eq(long a, long b); // void CustomOnionMessageHandler_free(struct LDKCustomOnionMessageHandler this_ptr); @@ -12907,16 +14069,18 @@ public class bindings { public static native long PeeledOnion_clone_ptr(long arg); // struct LDKPeeledOnion PeeledOnion_clone(const struct LDKPeeledOnion *NONNULL_PTR orig); public static native long PeeledOnion_clone(long orig); - // struct LDKPeeledOnion PeeledOnion_forward(struct LDKPublicKey a, struct LDKOnionMessage b); - public static native long PeeledOnion_forward(byte[] a, long b); + // struct LDKPeeledOnion PeeledOnion_forward(struct LDKNextMessageHop a, struct LDKOnionMessage b); + public static native long PeeledOnion_forward(long a, long b); // struct LDKPeeledOnion PeeledOnion_receive(struct LDKParsedOnionMessageContents a, struct LDKThirtyTwoBytes b, struct LDKBlindedPath c); public static native long PeeledOnion_receive(long a, byte[] b, long c); - // struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ create_onion_message(const struct LDKEntropySource *NONNULL_PTR entropy_source, const struct LDKNodeSigner *NONNULL_PTR node_signer, struct LDKOnionMessagePath path, struct LDKOnionMessageContents contents, struct LDKBlindedPath reply_path); - public static native long create_onion_message(long entropy_source, long node_signer, long path, long contents, long reply_path); + // struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ create_onion_message_resolving_destination(const struct LDKEntropySource *NONNULL_PTR entropy_source, const struct LDKNodeSigner *NONNULL_PTR node_signer, const struct LDKNodeIdLookUp *NONNULL_PTR node_id_lookup, const struct LDKReadOnlyNetworkGraph *NONNULL_PTR network_graph, struct LDKOnionMessagePath path, struct LDKOnionMessageContents contents, struct LDKBlindedPath reply_path); + public static native long create_onion_message_resolving_destination(long entropy_source, long node_signer, long node_id_lookup, long network_graph, long path, long contents, long reply_path); + // struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ create_onion_message(const struct LDKEntropySource *NONNULL_PTR entropy_source, const struct LDKNodeSigner *NONNULL_PTR node_signer, const struct LDKNodeIdLookUp *NONNULL_PTR node_id_lookup, struct LDKOnionMessagePath path, struct LDKOnionMessageContents contents, struct LDKBlindedPath reply_path); + public static native long create_onion_message(long entropy_source, long node_signer, long node_id_lookup, long path, long contents, long reply_path); // struct LDKCResult_PeeledOnionNoneZ peel_onion_message(const struct LDKOnionMessage *NONNULL_PTR msg, struct LDKNodeSigner node_signer, struct LDKLogger logger, struct LDKCustomOnionMessageHandler custom_handler); public static native long peel_onion_message(long msg, long node_signer, long logger, long custom_handler); - // MUST_USE_RES struct LDKOnionMessenger OnionMessenger_new(struct LDKEntropySource entropy_source, struct LDKNodeSigner node_signer, struct LDKLogger logger, struct LDKMessageRouter message_router, struct LDKOffersMessageHandler offers_handler, struct LDKCustomOnionMessageHandler custom_handler); - public static native long OnionMessenger_new(long entropy_source, long node_signer, long logger, long message_router, long offers_handler, long custom_handler); + // MUST_USE_RES struct LDKOnionMessenger OnionMessenger_new(struct LDKEntropySource entropy_source, struct LDKNodeSigner node_signer, struct LDKLogger logger, struct LDKNodeIdLookUp node_id_lookup, struct LDKMessageRouter message_router, struct LDKOffersMessageHandler offers_handler, struct LDKCustomOnionMessageHandler custom_handler); + public static native long OnionMessenger_new(long entropy_source, long node_signer, long logger, long node_id_lookup, long message_router, long offers_handler, long custom_handler); // MUST_USE_RES struct LDKCResult_SendSuccessSendErrorZ OnionMessenger_send_onion_message(const struct LDKOnionMessenger *NONNULL_PTR this_arg, struct LDKOnionMessageContents contents, struct LDKDestination destination, struct LDKBlindedPath reply_path); public static native long OnionMessenger_send_onion_message(long this_arg, long contents, long destination, long reply_path); // struct LDKOnionMessageHandler OnionMessenger_as_OnionMessageHandler(const struct LDKOnionMessenger *NONNULL_PTR this_arg); @@ -12993,12 +14157,26 @@ public class bindings { public static native long OnionMessageContents_clone(long orig); // void OnionMessageContents_free(struct LDKOnionMessageContents this_ptr); public static native void OnionMessageContents_free(long this_ptr); + // void NextMessageHop_free(struct LDKNextMessageHop this_ptr); + public static native void NextMessageHop_free(long this_ptr); + // uint64_t NextMessageHop_clone_ptr(LDKNextMessageHop *NONNULL_PTR arg); + public static native long NextMessageHop_clone_ptr(long arg); + // struct LDKNextMessageHop NextMessageHop_clone(const struct LDKNextMessageHop *NONNULL_PTR orig); + public static native long NextMessageHop_clone(long orig); + // struct LDKNextMessageHop NextMessageHop_node_id(struct LDKPublicKey a); + public static native long NextMessageHop_node_id(byte[] a); + // struct LDKNextMessageHop NextMessageHop_short_channel_id(uint64_t a); + public static native long NextMessageHop_short_channel_id(long a); + // uint64_t NextMessageHop_hash(const struct LDKNextMessageHop *NONNULL_PTR o); + public static native long NextMessageHop_hash(long o); + // bool NextMessageHop_eq(const struct LDKNextMessageHop *NONNULL_PTR a, const struct LDKNextMessageHop *NONNULL_PTR b); + public static native boolean NextMessageHop_eq(long a, long b); // void BlindedPath_free(struct LDKBlindedPath this_obj); public static native void BlindedPath_free(long this_obj); - // struct LDKPublicKey BlindedPath_get_introduction_node_id(const struct LDKBlindedPath *NONNULL_PTR this_ptr); - public static native byte[] BlindedPath_get_introduction_node_id(long this_ptr); - // void BlindedPath_set_introduction_node_id(struct LDKBlindedPath *NONNULL_PTR this_ptr, struct LDKPublicKey val); - public static native void BlindedPath_set_introduction_node_id(long this_ptr, byte[] val); + // struct LDKIntroductionNode BlindedPath_get_introduction_node(const struct LDKBlindedPath *NONNULL_PTR this_ptr); + public static native long BlindedPath_get_introduction_node(long this_ptr); + // void BlindedPath_set_introduction_node(struct LDKBlindedPath *NONNULL_PTR this_ptr, struct LDKIntroductionNode val); + public static native void BlindedPath_set_introduction_node(long this_ptr, long val); // struct LDKPublicKey BlindedPath_get_blinding_point(const struct LDKBlindedPath *NONNULL_PTR this_ptr); public static native byte[] BlindedPath_get_blinding_point(long this_ptr); // void BlindedPath_set_blinding_point(struct LDKBlindedPath *NONNULL_PTR this_ptr, struct LDKPublicKey val); @@ -13007,8 +14185,8 @@ public class bindings { public static native long[] BlindedPath_get_blinded_hops(long this_ptr); // void BlindedPath_set_blinded_hops(struct LDKBlindedPath *NONNULL_PTR this_ptr, struct LDKCVec_BlindedHopZ val); public static native void BlindedPath_set_blinded_hops(long this_ptr, long[] val); - // MUST_USE_RES struct LDKBlindedPath BlindedPath_new(struct LDKPublicKey introduction_node_id_arg, struct LDKPublicKey blinding_point_arg, struct LDKCVec_BlindedHopZ blinded_hops_arg); - public static native long BlindedPath_new(byte[] introduction_node_id_arg, byte[] blinding_point_arg, long[] blinded_hops_arg); + // MUST_USE_RES struct LDKBlindedPath BlindedPath_new(struct LDKIntroductionNode introduction_node_arg, struct LDKPublicKey blinding_point_arg, struct LDKCVec_BlindedHopZ blinded_hops_arg); + public static native long BlindedPath_new(long introduction_node_arg, byte[] blinding_point_arg, long[] blinded_hops_arg); // uint64_t BlindedPath_clone_ptr(LDKBlindedPath *NONNULL_PTR arg); public static native long BlindedPath_clone_ptr(long arg); // struct LDKBlindedPath BlindedPath_clone(const struct LDKBlindedPath *NONNULL_PTR orig); @@ -13017,6 +14195,38 @@ public class bindings { public static native long BlindedPath_hash(long o); // bool BlindedPath_eq(const struct LDKBlindedPath *NONNULL_PTR a, const struct LDKBlindedPath *NONNULL_PTR b); public static native boolean BlindedPath_eq(long a, long b); + // void IntroductionNode_free(struct LDKIntroductionNode this_ptr); + public static native void IntroductionNode_free(long this_ptr); + // uint64_t IntroductionNode_clone_ptr(LDKIntroductionNode *NONNULL_PTR arg); + public static native long IntroductionNode_clone_ptr(long arg); + // struct LDKIntroductionNode IntroductionNode_clone(const struct LDKIntroductionNode *NONNULL_PTR orig); + public static native long IntroductionNode_clone(long orig); + // struct LDKIntroductionNode IntroductionNode_node_id(struct LDKPublicKey a); + public static native long IntroductionNode_node_id(byte[] a); + // struct LDKIntroductionNode IntroductionNode_directed_short_channel_id(enum LDKDirection a, uint64_t b); + public static native long IntroductionNode_directed_short_channel_id(Direction a, long b); + // uint64_t IntroductionNode_hash(const struct LDKIntroductionNode *NONNULL_PTR o); + public static native long IntroductionNode_hash(long o); + // bool IntroductionNode_eq(const struct LDKIntroductionNode *NONNULL_PTR a, const struct LDKIntroductionNode *NONNULL_PTR b); + public static native boolean IntroductionNode_eq(long a, long b); + // enum LDKDirection Direction_clone(const enum LDKDirection *NONNULL_PTR orig); + public static native Direction Direction_clone(long orig); + // enum LDKDirection Direction_node_one(void); + public static native Direction Direction_node_one(); + // enum LDKDirection Direction_node_two(void); + public static native Direction Direction_node_two(); + // uint64_t Direction_hash(const enum LDKDirection *NONNULL_PTR o); + public static native long Direction_hash(long o); + // bool Direction_eq(const enum LDKDirection *NONNULL_PTR a, const enum LDKDirection *NONNULL_PTR b); + public static native boolean Direction_eq(long a, long b); + // void NodeIdLookUp_free(struct LDKNodeIdLookUp this_ptr); + public static native void NodeIdLookUp_free(long this_ptr); + // void EmptyNodeIdLookUp_free(struct LDKEmptyNodeIdLookUp this_obj); + public static native void EmptyNodeIdLookUp_free(long this_obj); + // MUST_USE_RES struct LDKEmptyNodeIdLookUp EmptyNodeIdLookUp_new(void); + public static native long EmptyNodeIdLookUp_new(); + // struct LDKNodeIdLookUp EmptyNodeIdLookUp_as_NodeIdLookUp(const struct LDKEmptyNodeIdLookUp *NONNULL_PTR this_arg); + public static native long EmptyNodeIdLookUp_as_NodeIdLookUp(long this_arg); // void BlindedHop_free(struct LDKBlindedHop this_obj); public static native void BlindedHop_free(long this_obj); // struct LDKPublicKey BlindedHop_get_blinded_node_id(const struct LDKBlindedHop *NONNULL_PTR this_ptr); @@ -13037,14 +14247,16 @@ public class bindings { public static native long BlindedHop_hash(long o); // bool BlindedHop_eq(const struct LDKBlindedHop *NONNULL_PTR a, const struct LDKBlindedHop *NONNULL_PTR b); public static native boolean BlindedHop_eq(long a, long b); - // MUST_USE_RES struct LDKCResult_BlindedPathNoneZ BlindedPath_one_hop_for_message(struct LDKPublicKey recipient_node_id, const struct LDKEntropySource *NONNULL_PTR entropy_source); + // MUST_USE_RES struct LDKCResult_BlindedPathNoneZ BlindedPath_one_hop_for_message(struct LDKPublicKey recipient_node_id, struct LDKEntropySource entropy_source); public static native long BlindedPath_one_hop_for_message(byte[] recipient_node_id, long entropy_source); - // MUST_USE_RES struct LDKCResult_BlindedPathNoneZ BlindedPath_new_for_message(struct LDKCVec_PublicKeyZ node_pks, const struct LDKEntropySource *NONNULL_PTR entropy_source); + // MUST_USE_RES struct LDKCResult_BlindedPathNoneZ BlindedPath_new_for_message(struct LDKCVec_PublicKeyZ node_pks, struct LDKEntropySource entropy_source); public static native long BlindedPath_new_for_message(byte[][] node_pks, long entropy_source); - // MUST_USE_RES struct LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_one_hop_for_payment(struct LDKPublicKey payee_node_id, struct LDKReceiveTlvs payee_tlvs, const struct LDKEntropySource *NONNULL_PTR entropy_source); - public static native long BlindedPath_one_hop_for_payment(byte[] payee_node_id, long payee_tlvs, long entropy_source); - // MUST_USE_RES struct LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_new_for_payment(struct LDKCVec_ForwardNodeZ intermediate_nodes, struct LDKPublicKey payee_node_id, struct LDKReceiveTlvs payee_tlvs, uint64_t htlc_maximum_msat, const struct LDKEntropySource *NONNULL_PTR entropy_source); - public static native long BlindedPath_new_for_payment(long[] intermediate_nodes, byte[] payee_node_id, long payee_tlvs, long htlc_maximum_msat, long entropy_source); + // MUST_USE_RES struct LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_one_hop_for_payment(struct LDKPublicKey payee_node_id, struct LDKReceiveTlvs payee_tlvs, uint16_t min_final_cltv_expiry_delta, struct LDKEntropySource entropy_source); + public static native long BlindedPath_one_hop_for_payment(byte[] payee_node_id, long payee_tlvs, short min_final_cltv_expiry_delta, long entropy_source); + // MUST_USE_RES struct LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_new_for_payment(struct LDKCVec_ForwardNodeZ intermediate_nodes, struct LDKPublicKey payee_node_id, struct LDKReceiveTlvs payee_tlvs, uint64_t htlc_maximum_msat, uint16_t min_final_cltv_expiry_delta, struct LDKEntropySource entropy_source); + public static native long BlindedPath_new_for_payment(long[] intermediate_nodes, byte[] payee_node_id, long payee_tlvs, long htlc_maximum_msat, short min_final_cltv_expiry_delta, long entropy_source); + // MUST_USE_RES struct LDKNodeId BlindedPath_public_introduction_node_id(const struct LDKBlindedPath *NONNULL_PTR this_arg, const struct LDKReadOnlyNetworkGraph *NONNULL_PTR network_graph); + public static native long BlindedPath_public_introduction_node_id(long this_arg, long network_graph); // struct LDKCVec_u8Z BlindedPath_write(const struct LDKBlindedPath *NONNULL_PTR obj); public static native byte[] BlindedPath_write(long obj); // struct LDKCResult_BlindedPathDecodeErrorZ BlindedPath_read(struct LDKu8slice ser); @@ -13107,8 +14319,12 @@ public class bindings { public static native long ReceiveTlvs_get_payment_constraints(long this_ptr); // void ReceiveTlvs_set_payment_constraints(struct LDKReceiveTlvs *NONNULL_PTR this_ptr, struct LDKPaymentConstraints val); public static native void ReceiveTlvs_set_payment_constraints(long this_ptr, long val); - // MUST_USE_RES struct LDKReceiveTlvs ReceiveTlvs_new(struct LDKThirtyTwoBytes payment_secret_arg, struct LDKPaymentConstraints payment_constraints_arg); - public static native long ReceiveTlvs_new(byte[] payment_secret_arg, long payment_constraints_arg); + // struct LDKPaymentContext ReceiveTlvs_get_payment_context(const struct LDKReceiveTlvs *NONNULL_PTR this_ptr); + public static native long ReceiveTlvs_get_payment_context(long this_ptr); + // void ReceiveTlvs_set_payment_context(struct LDKReceiveTlvs *NONNULL_PTR this_ptr, struct LDKPaymentContext val); + public static native void ReceiveTlvs_set_payment_context(long this_ptr, long val); + // MUST_USE_RES struct LDKReceiveTlvs ReceiveTlvs_new(struct LDKThirtyTwoBytes payment_secret_arg, struct LDKPaymentConstraints payment_constraints_arg, struct LDKPaymentContext payment_context_arg); + public static native long ReceiveTlvs_new(byte[] payment_secret_arg, long payment_constraints_arg, long payment_context_arg); // uint64_t ReceiveTlvs_clone_ptr(LDKReceiveTlvs *NONNULL_PTR arg); public static native long ReceiveTlvs_clone_ptr(long arg); // struct LDKReceiveTlvs ReceiveTlvs_clone(const struct LDKReceiveTlvs *NONNULL_PTR orig); @@ -13149,6 +14365,56 @@ public class bindings { public static native long PaymentConstraints_clone_ptr(long arg); // struct LDKPaymentConstraints PaymentConstraints_clone(const struct LDKPaymentConstraints *NONNULL_PTR orig); public static native long PaymentConstraints_clone(long orig); + // void PaymentContext_free(struct LDKPaymentContext this_ptr); + public static native void PaymentContext_free(long this_ptr); + // uint64_t PaymentContext_clone_ptr(LDKPaymentContext *NONNULL_PTR arg); + public static native long PaymentContext_clone_ptr(long arg); + // struct LDKPaymentContext PaymentContext_clone(const struct LDKPaymentContext *NONNULL_PTR orig); + public static native long PaymentContext_clone(long orig); + // struct LDKPaymentContext PaymentContext_unknown(struct LDKUnknownPaymentContext a); + public static native long PaymentContext_unknown(long a); + // struct LDKPaymentContext PaymentContext_bolt12_offer(struct LDKBolt12OfferContext a); + public static native long PaymentContext_bolt12_offer(long a); + // struct LDKPaymentContext PaymentContext_bolt12_refund(struct LDKBolt12RefundContext a); + public static native long PaymentContext_bolt12_refund(long a); + // bool PaymentContext_eq(const struct LDKPaymentContext *NONNULL_PTR a, const struct LDKPaymentContext *NONNULL_PTR b); + public static native boolean PaymentContext_eq(long a, long b); + // void UnknownPaymentContext_free(struct LDKUnknownPaymentContext this_obj); + public static native void UnknownPaymentContext_free(long this_obj); + // uint64_t UnknownPaymentContext_clone_ptr(LDKUnknownPaymentContext *NONNULL_PTR arg); + public static native long UnknownPaymentContext_clone_ptr(long arg); + // struct LDKUnknownPaymentContext UnknownPaymentContext_clone(const struct LDKUnknownPaymentContext *NONNULL_PTR orig); + public static native long UnknownPaymentContext_clone(long orig); + // bool UnknownPaymentContext_eq(const struct LDKUnknownPaymentContext *NONNULL_PTR a, const struct LDKUnknownPaymentContext *NONNULL_PTR b); + public static native boolean UnknownPaymentContext_eq(long a, long b); + // void Bolt12OfferContext_free(struct LDKBolt12OfferContext this_obj); + public static native void Bolt12OfferContext_free(long this_obj); + // struct LDKOfferId Bolt12OfferContext_get_offer_id(const struct LDKBolt12OfferContext *NONNULL_PTR this_ptr); + public static native long Bolt12OfferContext_get_offer_id(long this_ptr); + // void Bolt12OfferContext_set_offer_id(struct LDKBolt12OfferContext *NONNULL_PTR this_ptr, struct LDKOfferId val); + public static native void Bolt12OfferContext_set_offer_id(long this_ptr, long val); + // struct LDKInvoiceRequestFields Bolt12OfferContext_get_invoice_request(const struct LDKBolt12OfferContext *NONNULL_PTR this_ptr); + public static native long Bolt12OfferContext_get_invoice_request(long this_ptr); + // void Bolt12OfferContext_set_invoice_request(struct LDKBolt12OfferContext *NONNULL_PTR this_ptr, struct LDKInvoiceRequestFields val); + public static native void Bolt12OfferContext_set_invoice_request(long this_ptr, long val); + // MUST_USE_RES struct LDKBolt12OfferContext Bolt12OfferContext_new(struct LDKOfferId offer_id_arg, struct LDKInvoiceRequestFields invoice_request_arg); + public static native long Bolt12OfferContext_new(long offer_id_arg, long invoice_request_arg); + // uint64_t Bolt12OfferContext_clone_ptr(LDKBolt12OfferContext *NONNULL_PTR arg); + public static native long Bolt12OfferContext_clone_ptr(long arg); + // struct LDKBolt12OfferContext Bolt12OfferContext_clone(const struct LDKBolt12OfferContext *NONNULL_PTR orig); + public static native long Bolt12OfferContext_clone(long orig); + // bool Bolt12OfferContext_eq(const struct LDKBolt12OfferContext *NONNULL_PTR a, const struct LDKBolt12OfferContext *NONNULL_PTR b); + public static native boolean Bolt12OfferContext_eq(long a, long b); + // void Bolt12RefundContext_free(struct LDKBolt12RefundContext this_obj); + public static native void Bolt12RefundContext_free(long this_obj); + // MUST_USE_RES struct LDKBolt12RefundContext Bolt12RefundContext_new(void); + public static native long Bolt12RefundContext_new(); + // uint64_t Bolt12RefundContext_clone_ptr(LDKBolt12RefundContext *NONNULL_PTR arg); + public static native long Bolt12RefundContext_clone_ptr(long arg); + // struct LDKBolt12RefundContext Bolt12RefundContext_clone(const struct LDKBolt12RefundContext *NONNULL_PTR orig); + public static native long Bolt12RefundContext_clone(long orig); + // bool Bolt12RefundContext_eq(const struct LDKBolt12RefundContext *NONNULL_PTR a, const struct LDKBolt12RefundContext *NONNULL_PTR b); + public static native boolean Bolt12RefundContext_eq(long a, long b); // struct LDKCVec_u8Z ForwardTlvs_write(const struct LDKForwardTlvs *NONNULL_PTR obj); public static native byte[] ForwardTlvs_write(long obj); // struct LDKCVec_u8Z ReceiveTlvs_write(const struct LDKReceiveTlvs *NONNULL_PTR obj); @@ -13161,14 +14427,34 @@ public class bindings { public static native byte[] PaymentConstraints_write(long obj); // struct LDKCResult_PaymentConstraintsDecodeErrorZ PaymentConstraints_read(struct LDKu8slice ser); public static native long PaymentConstraints_read(byte[] ser); + // struct LDKCVec_u8Z PaymentContext_write(const struct LDKPaymentContext *NONNULL_PTR obj); + public static native byte[] PaymentContext_write(long obj); + // struct LDKCResult_PaymentContextDecodeErrorZ PaymentContext_read(struct LDKu8slice ser); + public static native long PaymentContext_read(byte[] ser); + // struct LDKCVec_u8Z UnknownPaymentContext_write(const struct LDKUnknownPaymentContext *NONNULL_PTR obj); + public static native byte[] UnknownPaymentContext_write(long obj); + // struct LDKCResult_UnknownPaymentContextDecodeErrorZ UnknownPaymentContext_read(struct LDKu8slice ser); + public static native long UnknownPaymentContext_read(byte[] ser); + // struct LDKCVec_u8Z Bolt12OfferContext_write(const struct LDKBolt12OfferContext *NONNULL_PTR obj); + public static native byte[] Bolt12OfferContext_write(long obj); + // struct LDKCResult_Bolt12OfferContextDecodeErrorZ Bolt12OfferContext_read(struct LDKu8slice ser); + public static native long Bolt12OfferContext_read(byte[] ser); + // struct LDKCVec_u8Z Bolt12RefundContext_write(const struct LDKBolt12RefundContext *NONNULL_PTR obj); + public static native byte[] Bolt12RefundContext_write(long obj); + // struct LDKCResult_Bolt12RefundContextDecodeErrorZ Bolt12RefundContext_read(struct LDKu8slice ser); + public static native long Bolt12RefundContext_read(byte[] ser); // void PaymentPurpose_free(struct LDKPaymentPurpose this_ptr); public static native void PaymentPurpose_free(long this_ptr); // uint64_t PaymentPurpose_clone_ptr(LDKPaymentPurpose *NONNULL_PTR arg); public static native long PaymentPurpose_clone_ptr(long arg); // struct LDKPaymentPurpose PaymentPurpose_clone(const struct LDKPaymentPurpose *NONNULL_PTR orig); public static native long PaymentPurpose_clone(long orig); - // struct LDKPaymentPurpose PaymentPurpose_invoice_payment(struct LDKCOption_ThirtyTwoBytesZ payment_preimage, struct LDKThirtyTwoBytes payment_secret); - public static native long PaymentPurpose_invoice_payment(long payment_preimage, byte[] payment_secret); + // struct LDKPaymentPurpose PaymentPurpose_bolt11_invoice_payment(struct LDKCOption_ThirtyTwoBytesZ payment_preimage, struct LDKThirtyTwoBytes payment_secret); + public static native long PaymentPurpose_bolt11_invoice_payment(long payment_preimage, byte[] payment_secret); + // struct LDKPaymentPurpose PaymentPurpose_bolt12_offer_payment(struct LDKCOption_ThirtyTwoBytesZ payment_preimage, struct LDKThirtyTwoBytes payment_secret, struct LDKBolt12OfferContext payment_context); + public static native long PaymentPurpose_bolt12_offer_payment(long payment_preimage, byte[] payment_secret, long payment_context); + // struct LDKPaymentPurpose PaymentPurpose_bolt12_refund_payment(struct LDKCOption_ThirtyTwoBytesZ payment_preimage, struct LDKThirtyTwoBytes payment_secret, struct LDKBolt12RefundContext payment_context); + public static native long PaymentPurpose_bolt12_refund_payment(long payment_preimage, byte[] payment_secret, long payment_context); // struct LDKPaymentPurpose PaymentPurpose_spontaneous_payment(struct LDKThirtyTwoBytes a); public static native long PaymentPurpose_spontaneous_payment(byte[] a); // bool PaymentPurpose_eq(const struct LDKPaymentPurpose *NONNULL_PTR a, const struct LDKPaymentPurpose *NONNULL_PTR b); @@ -13181,10 +14467,10 @@ public class bindings { public static native long PaymentPurpose_read(byte[] ser); // void ClaimedHTLC_free(struct LDKClaimedHTLC this_obj); public static native void ClaimedHTLC_free(long this_obj); - // const uint8_t (*ClaimedHTLC_get_channel_id(const struct LDKClaimedHTLC *NONNULL_PTR this_ptr))[32]; - public static native byte[] ClaimedHTLC_get_channel_id(long this_ptr); - // void ClaimedHTLC_set_channel_id(struct LDKClaimedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - public static native void ClaimedHTLC_set_channel_id(long this_ptr, byte[] val); + // struct LDKChannelId ClaimedHTLC_get_channel_id(const struct LDKClaimedHTLC *NONNULL_PTR this_ptr); + public static native long ClaimedHTLC_get_channel_id(long this_ptr); + // void ClaimedHTLC_set_channel_id(struct LDKClaimedHTLC *NONNULL_PTR this_ptr, struct LDKChannelId val); + public static native void ClaimedHTLC_set_channel_id(long this_ptr, long val); // struct LDKU128 ClaimedHTLC_get_user_channel_id(const struct LDKClaimedHTLC *NONNULL_PTR this_ptr); public static native byte[] ClaimedHTLC_get_user_channel_id(long this_ptr); // void ClaimedHTLC_set_user_channel_id(struct LDKClaimedHTLC *NONNULL_PTR this_ptr, struct LDKU128 val); @@ -13201,8 +14487,8 @@ public class bindings { public static native long ClaimedHTLC_get_counterparty_skimmed_fee_msat(long this_ptr); // void ClaimedHTLC_set_counterparty_skimmed_fee_msat(struct LDKClaimedHTLC *NONNULL_PTR this_ptr, uint64_t val); public static native void ClaimedHTLC_set_counterparty_skimmed_fee_msat(long this_ptr, long val); - // MUST_USE_RES struct LDKClaimedHTLC ClaimedHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKU128 user_channel_id_arg, uint32_t cltv_expiry_arg, uint64_t value_msat_arg, uint64_t counterparty_skimmed_fee_msat_arg); - public static native long ClaimedHTLC_new(byte[] channel_id_arg, byte[] user_channel_id_arg, int cltv_expiry_arg, long value_msat_arg, long counterparty_skimmed_fee_msat_arg); + // MUST_USE_RES struct LDKClaimedHTLC ClaimedHTLC_new(struct LDKChannelId channel_id_arg, struct LDKU128 user_channel_id_arg, uint32_t cltv_expiry_arg, uint64_t value_msat_arg, uint64_t counterparty_skimmed_fee_msat_arg); + public static native long ClaimedHTLC_new(long channel_id_arg, byte[] user_channel_id_arg, int cltv_expiry_arg, long value_msat_arg, long counterparty_skimmed_fee_msat_arg); // uint64_t ClaimedHTLC_clone_ptr(LDKClaimedHTLC *NONNULL_PTR arg); public static native long ClaimedHTLC_clone_ptr(long arg); // struct LDKClaimedHTLC ClaimedHTLC_clone(const struct LDKClaimedHTLC *NONNULL_PTR orig); @@ -13239,8 +14525,12 @@ public class bindings { public static native long ClosureReason_counterparty_force_closed(long peer_msg); // struct LDKClosureReason ClosureReason_holder_force_closed(void); public static native long ClosureReason_holder_force_closed(); - // struct LDKClosureReason ClosureReason_cooperative_closure(void); - public static native long ClosureReason_cooperative_closure(); + // struct LDKClosureReason ClosureReason_legacy_cooperative_closure(void); + public static native long ClosureReason_legacy_cooperative_closure(); + // struct LDKClosureReason ClosureReason_counterparty_initiated_cooperative_closure(void); + public static native long ClosureReason_counterparty_initiated_cooperative_closure(); + // struct LDKClosureReason ClosureReason_locally_initiated_cooperative_closure(void); + public static native long ClosureReason_locally_initiated_cooperative_closure(); // struct LDKClosureReason ClosureReason_commitment_tx_confirmed(void); public static native long ClosureReason_commitment_tx_confirmed(); // struct LDKClosureReason ClosureReason_funding_timed_out(void); @@ -13255,6 +14545,8 @@ public class bindings { public static native long ClosureReason_counterparty_coop_closed_unfunded_channel(); // struct LDKClosureReason ClosureReason_funding_batch_closure(void); public static native long ClosureReason_funding_batch_closure(); + // struct LDKClosureReason ClosureReason_htlcs_timed_out(void); + public static native long ClosureReason_htlcs_timed_out(); // bool ClosureReason_eq(const struct LDKClosureReason *NONNULL_PTR a, const struct LDKClosureReason *NONNULL_PTR b); public static native boolean ClosureReason_eq(long a, long b); // struct LDKCVec_u8Z ClosureReason_write(const struct LDKClosureReason *NONNULL_PTR obj); @@ -13267,12 +14559,14 @@ public class bindings { public static native long HTLCDestination_clone_ptr(long arg); // struct LDKHTLCDestination HTLCDestination_clone(const struct LDKHTLCDestination *NONNULL_PTR orig); public static native long HTLCDestination_clone(long orig); - // struct LDKHTLCDestination HTLCDestination_next_hop_channel(struct LDKPublicKey node_id, struct LDKThirtyTwoBytes channel_id); - public static native long HTLCDestination_next_hop_channel(byte[] node_id, byte[] channel_id); + // struct LDKHTLCDestination HTLCDestination_next_hop_channel(struct LDKPublicKey node_id, struct LDKChannelId channel_id); + public static native long HTLCDestination_next_hop_channel(byte[] node_id, long channel_id); // struct LDKHTLCDestination HTLCDestination_unknown_next_hop(uint64_t requested_forward_scid); public static native long HTLCDestination_unknown_next_hop(long requested_forward_scid); // struct LDKHTLCDestination HTLCDestination_invalid_forward(uint64_t requested_forward_scid); public static native long HTLCDestination_invalid_forward(long requested_forward_scid); + // struct LDKHTLCDestination HTLCDestination_invalid_onion(void); + public static native long HTLCDestination_invalid_onion(); // struct LDKHTLCDestination HTLCDestination_failed_payment(struct LDKThirtyTwoBytes payment_hash); public static native long HTLCDestination_failed_payment(byte[] payment_hash); // bool HTLCDestination_eq(const struct LDKHTLCDestination *NONNULL_PTR a, const struct LDKHTLCDestination *NONNULL_PTR b); @@ -13307,9 +14601,9 @@ public class bindings { public static native long Event_clone_ptr(long arg); // struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig); public static native long Event_clone(long orig); - // struct LDKEvent Event_funding_generation_ready(struct LDKThirtyTwoBytes temporary_channel_id, struct LDKPublicKey counterparty_node_id, uint64_t channel_value_satoshis, struct LDKCVec_u8Z output_script, struct LDKU128 user_channel_id); - public static native long Event_funding_generation_ready(byte[] temporary_channel_id, byte[] counterparty_node_id, long channel_value_satoshis, byte[] output_script, byte[] user_channel_id); - // struct LDKEvent Event_payment_claimable(struct LDKPublicKey receiver_node_id, struct LDKThirtyTwoBytes payment_hash, struct LDKRecipientOnionFields onion_fields, uint64_t amount_msat, uint64_t counterparty_skimmed_fee_msat, struct LDKPaymentPurpose purpose, struct LDKCOption_ThirtyTwoBytesZ via_channel_id, struct LDKCOption_U128Z via_user_channel_id, struct LDKCOption_u32Z claim_deadline); + // struct LDKEvent Event_funding_generation_ready(struct LDKChannelId temporary_channel_id, struct LDKPublicKey counterparty_node_id, uint64_t channel_value_satoshis, struct LDKCVec_u8Z output_script, struct LDKU128 user_channel_id); + public static native long Event_funding_generation_ready(long temporary_channel_id, byte[] counterparty_node_id, long channel_value_satoshis, byte[] output_script, byte[] user_channel_id); + // struct LDKEvent Event_payment_claimable(struct LDKPublicKey receiver_node_id, struct LDKThirtyTwoBytes payment_hash, struct LDKRecipientOnionFields onion_fields, uint64_t amount_msat, uint64_t counterparty_skimmed_fee_msat, struct LDKPaymentPurpose purpose, struct LDKChannelId via_channel_id, struct LDKCOption_U128Z via_user_channel_id, struct LDKCOption_u32Z claim_deadline); public static native long Event_payment_claimable(byte[] receiver_node_id, byte[] payment_hash, long onion_fields, long amount_msat, long counterparty_skimmed_fee_msat, long purpose, long via_channel_id, long via_user_channel_id, long claim_deadline); // struct LDKEvent Event_payment_claimed(struct LDKPublicKey receiver_node_id, struct LDKThirtyTwoBytes payment_hash, uint64_t amount_msat, struct LDKPaymentPurpose purpose, struct LDKCVec_ClaimedHTLCZ htlcs, struct LDKCOption_u64Z sender_intended_total_msat); public static native long Event_payment_claimed(byte[] receiver_node_id, byte[] payment_hash, long amount_msat, long purpose, long[] htlcs, long sender_intended_total_msat); @@ -13333,22 +14627,22 @@ public class bindings { public static native long Event_pending_htlcs_forwardable(long time_forwardable); // struct LDKEvent Event_htlcintercepted(struct LDKThirtyTwoBytes intercept_id, uint64_t requested_next_hop_scid, struct LDKThirtyTwoBytes payment_hash, uint64_t inbound_amount_msat, uint64_t expected_outbound_amount_msat); public static native long Event_htlcintercepted(byte[] intercept_id, long requested_next_hop_scid, byte[] payment_hash, long inbound_amount_msat, long expected_outbound_amount_msat); - // struct LDKEvent Event_spendable_outputs(struct LDKCVec_SpendableOutputDescriptorZ outputs, struct LDKCOption_ThirtyTwoBytesZ channel_id); + // struct LDKEvent Event_spendable_outputs(struct LDKCVec_SpendableOutputDescriptorZ outputs, struct LDKChannelId channel_id); public static native long Event_spendable_outputs(long[] outputs, long channel_id); - // struct LDKEvent Event_payment_forwarded(struct LDKCOption_ThirtyTwoBytesZ prev_channel_id, struct LDKCOption_ThirtyTwoBytesZ next_channel_id, struct LDKCOption_u64Z fee_earned_msat, bool claim_from_onchain_tx, struct LDKCOption_u64Z outbound_amount_forwarded_msat); - public static native long Event_payment_forwarded(long prev_channel_id, long next_channel_id, long fee_earned_msat, boolean claim_from_onchain_tx, long outbound_amount_forwarded_msat); - // struct LDKEvent Event_channel_pending(struct LDKThirtyTwoBytes channel_id, struct LDKU128 user_channel_id, struct LDKCOption_ThirtyTwoBytesZ former_temporary_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKOutPoint funding_txo); - public static native long Event_channel_pending(byte[] channel_id, byte[] user_channel_id, long former_temporary_channel_id, byte[] counterparty_node_id, long funding_txo); - // struct LDKEvent Event_channel_ready(struct LDKThirtyTwoBytes channel_id, struct LDKU128 user_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKChannelTypeFeatures channel_type); - public static native long Event_channel_ready(byte[] channel_id, byte[] user_channel_id, byte[] counterparty_node_id, long channel_type); - // struct LDKEvent Event_channel_closed(struct LDKThirtyTwoBytes channel_id, struct LDKU128 user_channel_id, struct LDKClosureReason reason, struct LDKPublicKey counterparty_node_id, struct LDKCOption_u64Z channel_capacity_sats, struct LDKOutPoint channel_funding_txo); - public static native long Event_channel_closed(byte[] channel_id, byte[] user_channel_id, long reason, byte[] counterparty_node_id, long channel_capacity_sats, long channel_funding_txo); - // struct LDKEvent Event_discard_funding(struct LDKThirtyTwoBytes channel_id, struct LDKTransaction transaction); - public static native long Event_discard_funding(byte[] channel_id, byte[] transaction); - // struct LDKEvent Event_open_channel_request(struct LDKThirtyTwoBytes temporary_channel_id, struct LDKPublicKey counterparty_node_id, uint64_t funding_satoshis, uint64_t push_msat, struct LDKChannelTypeFeatures channel_type); - public static native long Event_open_channel_request(byte[] temporary_channel_id, byte[] counterparty_node_id, long funding_satoshis, long push_msat, long channel_type); - // struct LDKEvent Event_htlchandling_failed(struct LDKThirtyTwoBytes prev_channel_id, struct LDKHTLCDestination failed_next_destination); - public static native long Event_htlchandling_failed(byte[] prev_channel_id, long failed_next_destination); + // struct LDKEvent Event_payment_forwarded(struct LDKChannelId prev_channel_id, struct LDKChannelId next_channel_id, struct LDKCOption_U128Z prev_user_channel_id, struct LDKCOption_U128Z next_user_channel_id, struct LDKCOption_u64Z total_fee_earned_msat, struct LDKCOption_u64Z skimmed_fee_msat, bool claim_from_onchain_tx, struct LDKCOption_u64Z outbound_amount_forwarded_msat); + public static native long Event_payment_forwarded(long prev_channel_id, long next_channel_id, long prev_user_channel_id, long next_user_channel_id, long total_fee_earned_msat, long skimmed_fee_msat, boolean claim_from_onchain_tx, long outbound_amount_forwarded_msat); + // struct LDKEvent Event_channel_pending(struct LDKChannelId channel_id, struct LDKU128 user_channel_id, struct LDKChannelId former_temporary_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKOutPoint funding_txo, struct LDKChannelTypeFeatures channel_type); + public static native long Event_channel_pending(long channel_id, byte[] user_channel_id, long former_temporary_channel_id, byte[] counterparty_node_id, long funding_txo, long channel_type); + // struct LDKEvent Event_channel_ready(struct LDKChannelId channel_id, struct LDKU128 user_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKChannelTypeFeatures channel_type); + public static native long Event_channel_ready(long channel_id, byte[] user_channel_id, byte[] counterparty_node_id, long channel_type); + // struct LDKEvent Event_channel_closed(struct LDKChannelId channel_id, struct LDKU128 user_channel_id, struct LDKClosureReason reason, struct LDKPublicKey counterparty_node_id, struct LDKCOption_u64Z channel_capacity_sats, struct LDKOutPoint channel_funding_txo); + public static native long Event_channel_closed(long channel_id, byte[] user_channel_id, long reason, byte[] counterparty_node_id, long channel_capacity_sats, long channel_funding_txo); + // struct LDKEvent Event_discard_funding(struct LDKChannelId channel_id, struct LDKTransaction transaction); + public static native long Event_discard_funding(long channel_id, byte[] transaction); + // struct LDKEvent Event_open_channel_request(struct LDKChannelId temporary_channel_id, struct LDKPublicKey counterparty_node_id, uint64_t funding_satoshis, uint64_t push_msat, struct LDKChannelTypeFeatures channel_type); + public static native long Event_open_channel_request(long temporary_channel_id, byte[] counterparty_node_id, long funding_satoshis, long push_msat, long channel_type); + // struct LDKEvent Event_htlchandling_failed(struct LDKChannelId prev_channel_id, struct LDKHTLCDestination failed_next_destination); + public static native long Event_htlchandling_failed(long prev_channel_id, long failed_next_destination); // struct LDKEvent Event_bump_transaction(struct LDKBumpTransactionEvent a); public static native long Event_bump_transaction(long a); // bool Event_eq(const struct LDKEvent *NONNULL_PTR a, const struct LDKEvent *NONNULL_PTR b); @@ -13475,10 +14769,10 @@ public class bindings { public static native long BumpTransactionEvent_clone_ptr(long arg); // struct LDKBumpTransactionEvent BumpTransactionEvent_clone(const struct LDKBumpTransactionEvent *NONNULL_PTR orig); public static native long BumpTransactionEvent_clone(long orig); - // struct LDKBumpTransactionEvent BumpTransactionEvent_channel_close(struct LDKThirtyTwoBytes claim_id, uint32_t package_target_feerate_sat_per_1000_weight, struct LDKTransaction commitment_tx, uint64_t commitment_tx_fee_satoshis, struct LDKAnchorDescriptor anchor_descriptor, struct LDKCVec_HTLCOutputInCommitmentZ pending_htlcs); - public static native long BumpTransactionEvent_channel_close(byte[] claim_id, int package_target_feerate_sat_per_1000_weight, byte[] commitment_tx, long commitment_tx_fee_satoshis, long anchor_descriptor, long[] pending_htlcs); - // struct LDKBumpTransactionEvent BumpTransactionEvent_htlcresolution(struct LDKThirtyTwoBytes claim_id, uint32_t target_feerate_sat_per_1000_weight, struct LDKCVec_HTLCDescriptorZ htlc_descriptors, uint32_t tx_lock_time); - public static native long BumpTransactionEvent_htlcresolution(byte[] claim_id, int target_feerate_sat_per_1000_weight, long[] htlc_descriptors, int tx_lock_time); + // struct LDKBumpTransactionEvent BumpTransactionEvent_channel_close(struct LDKChannelId channel_id, struct LDKPublicKey counterparty_node_id, struct LDKThirtyTwoBytes claim_id, uint32_t package_target_feerate_sat_per_1000_weight, struct LDKTransaction commitment_tx, uint64_t commitment_tx_fee_satoshis, struct LDKAnchorDescriptor anchor_descriptor, struct LDKCVec_HTLCOutputInCommitmentZ pending_htlcs); + public static native long BumpTransactionEvent_channel_close(long channel_id, byte[] counterparty_node_id, byte[] claim_id, int package_target_feerate_sat_per_1000_weight, byte[] commitment_tx, long commitment_tx_fee_satoshis, long anchor_descriptor, long[] pending_htlcs); + // struct LDKBumpTransactionEvent BumpTransactionEvent_htlcresolution(struct LDKChannelId channel_id, struct LDKPublicKey counterparty_node_id, struct LDKThirtyTwoBytes claim_id, uint32_t target_feerate_sat_per_1000_weight, struct LDKCVec_HTLCDescriptorZ htlc_descriptors, uint32_t tx_lock_time); + public static native long BumpTransactionEvent_htlcresolution(long channel_id, byte[] counterparty_node_id, byte[] claim_id, int target_feerate_sat_per_1000_weight, long[] htlc_descriptors, int tx_lock_time); // bool BumpTransactionEvent_eq(const struct LDKBumpTransactionEvent *NONNULL_PTR a, const struct LDKBumpTransactionEvent *NONNULL_PTR b); public static native boolean BumpTransactionEvent_eq(long a, long b); // void Input_free(struct LDKInput this_obj); @@ -13907,6 +15201,8 @@ public class bindings { public static native long Bolt11Invoice_features(long this_arg); // MUST_USE_RES struct LDKPublicKey Bolt11Invoice_recover_payee_pub_key(const struct LDKBolt11Invoice *NONNULL_PTR this_arg); public static native byte[] Bolt11Invoice_recover_payee_pub_key(long this_arg); + // MUST_USE_RES struct LDKPublicKey Bolt11Invoice_get_payee_pub_key(const struct LDKBolt11Invoice *NONNULL_PTR this_arg); + public static native byte[] Bolt11Invoice_get_payee_pub_key(long this_arg); // MUST_USE_RES struct LDKCOption_u64Z Bolt11Invoice_expires_at(const struct LDKBolt11Invoice *NONNULL_PTR this_arg); public static native long Bolt11Invoice_expires_at(long this_arg); // MUST_USE_RES uint64_t Bolt11Invoice_expiry_time(const struct LDKBolt11Invoice *NONNULL_PTR this_arg); diff --git a/src/main/java/org/ldk/structs/APIError.java b/src/main/java/org/ldk/structs/APIError.java index 1d5bc19f..d99e4b9c 100644 --- a/src/main/java/org/ldk/structs/APIError.java +++ b/src/main/java/org/ldk/structs/APIError.java @@ -226,7 +226,7 @@ public class APIError extends CommonBase { * Utility method to constructs a new IncompatibleShutdownScript-variant APIError */ public static APIError incompatible_shutdown_script(org.ldk.structs.ShutdownScript script) { - long ret = bindings.APIError_incompatible_shutdown_script(script == null ? 0 : script.ptr); + long ret = bindings.APIError_incompatible_shutdown_script(script.ptr); Reference.reachabilityFence(script); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.APIError ret_hu_conv = org.ldk.structs.APIError.constr_from_ptr(ret); @@ -240,7 +240,7 @@ public class APIError extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public boolean eq(org.ldk.structs.APIError b) { - boolean ret = bindings.APIError_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.APIError_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); return ret; diff --git a/src/main/java/org/ldk/structs/AcceptChannel.java b/src/main/java/org/ldk/structs/AcceptChannel.java index 950e2a66..757328e2 100644 --- a/src/main/java/org/ldk/structs/AcceptChannel.java +++ b/src/main/java/org/ldk/structs/AcceptChannel.java @@ -25,57 +25,25 @@ public class AcceptChannel extends CommonBase { } /** - * A temporary channel ID, until the funding outpoint is announced + * Common fields of `accept_channel(2)`-like messages */ - public byte[] get_temporary_channel_id() { - byte[] ret = bindings.AcceptChannel_get_temporary_channel_id(this.ptr); + public CommonAcceptChannelFields get_common_fields() { + long ret = bindings.AcceptChannel_get_common_fields(this.ptr); Reference.reachabilityFence(this); - return ret; - } - - /** - * A temporary channel ID, until the funding outpoint is announced - */ - public void set_temporary_channel_id(byte[] val) { - bindings.AcceptChannel_set_temporary_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * The threshold below which outputs on transactions broadcast by sender will be omitted - */ - public long get_dust_limit_satoshis() { - long ret = bindings.AcceptChannel_get_dust_limit_satoshis(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * The threshold below which outputs on transactions broadcast by sender will be omitted - */ - public void set_dust_limit_satoshis(long val) { - bindings.AcceptChannel_set_dust_limit_satoshis(this.ptr, val); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * The maximum inbound HTLC value in flight towards sender, in milli-satoshi - */ - public long get_max_htlc_value_in_flight_msat() { - long ret = bindings.AcceptChannel_get_max_htlc_value_in_flight_msat(this.ptr); - Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.CommonAcceptChannelFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommonAcceptChannelFields(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** - * The maximum inbound HTLC value in flight towards sender, in milli-satoshi + * Common fields of `accept_channel(2)`-like messages */ - public void set_max_htlc_value_in_flight_msat(long val) { - bindings.AcceptChannel_set_max_htlc_value_in_flight_msat(this.ptr, val); + public void set_common_fields(org.ldk.structs.CommonAcceptChannelFields val) { + bindings.AcceptChannel_set_common_fields(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** @@ -96,271 +64,17 @@ public class AcceptChannel extends CommonBase { Reference.reachabilityFence(val); } - /** - * The minimum HTLC size incoming to sender, in milli-satoshi - */ - public long get_htlc_minimum_msat() { - long ret = bindings.AcceptChannel_get_htlc_minimum_msat(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * The minimum HTLC size incoming to sender, in milli-satoshi - */ - public void set_htlc_minimum_msat(long val) { - bindings.AcceptChannel_set_htlc_minimum_msat(this.ptr, val); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * Minimum depth of the funding transaction before the channel is considered open - */ - public int get_minimum_depth() { - int ret = bindings.AcceptChannel_get_minimum_depth(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * Minimum depth of the funding transaction before the channel is considered open - */ - public void set_minimum_depth(int val) { - bindings.AcceptChannel_set_minimum_depth(this.ptr, val); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * The number of blocks which the counterparty will have to wait to claim on-chain funds if they broadcast a commitment transaction - */ - public short get_to_self_delay() { - short ret = bindings.AcceptChannel_get_to_self_delay(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * The number of blocks which the counterparty will have to wait to claim on-chain funds if they broadcast a commitment transaction - */ - public void set_to_self_delay(short val) { - bindings.AcceptChannel_set_to_self_delay(this.ptr, val); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * The maximum number of inbound HTLCs towards sender - */ - public short get_max_accepted_htlcs() { - short ret = bindings.AcceptChannel_get_max_accepted_htlcs(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * The maximum number of inbound HTLCs towards sender - */ - public void set_max_accepted_htlcs(short val) { - bindings.AcceptChannel_set_max_accepted_htlcs(this.ptr, val); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * The sender's key controlling the funding transaction - */ - public byte[] get_funding_pubkey() { - byte[] ret = bindings.AcceptChannel_get_funding_pubkey(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * The sender's key controlling the funding transaction - */ - public void set_funding_pubkey(byte[] val) { - bindings.AcceptChannel_set_funding_pubkey(this.ptr, InternalUtils.check_arr_len(val, 33)); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * Used to derive a revocation key for transactions broadcast by counterparty - */ - public byte[] get_revocation_basepoint() { - byte[] ret = bindings.AcceptChannel_get_revocation_basepoint(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * Used to derive a revocation key for transactions broadcast by counterparty - */ - public void set_revocation_basepoint(byte[] val) { - bindings.AcceptChannel_set_revocation_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33)); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * A payment key to sender for transactions broadcast by counterparty - */ - public byte[] get_payment_point() { - byte[] ret = bindings.AcceptChannel_get_payment_point(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * A payment key to sender for transactions broadcast by counterparty - */ - public void set_payment_point(byte[] val) { - bindings.AcceptChannel_set_payment_point(this.ptr, InternalUtils.check_arr_len(val, 33)); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * Used to derive a payment key to sender for transactions broadcast by sender - */ - public byte[] get_delayed_payment_basepoint() { - byte[] ret = bindings.AcceptChannel_get_delayed_payment_basepoint(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * Used to derive a payment key to sender for transactions broadcast by sender - */ - public void set_delayed_payment_basepoint(byte[] val) { - bindings.AcceptChannel_set_delayed_payment_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33)); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * Used to derive an HTLC payment key to sender for transactions broadcast by counterparty - */ - public byte[] get_htlc_basepoint() { - byte[] ret = bindings.AcceptChannel_get_htlc_basepoint(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * Used to derive an HTLC payment key to sender for transactions broadcast by counterparty - */ - public void set_htlc_basepoint(byte[] val) { - bindings.AcceptChannel_set_htlc_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33)); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * The first to-be-broadcast-by-sender transaction's per commitment point - */ - public byte[] get_first_per_commitment_point() { - byte[] ret = bindings.AcceptChannel_get_first_per_commitment_point(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * The first to-be-broadcast-by-sender transaction's per commitment point - */ - public void set_first_per_commitment_point(byte[] val) { - bindings.AcceptChannel_set_first_per_commitment_point(this.ptr, InternalUtils.check_arr_len(val, 33)); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * A request to pre-set the to-sender output's scriptPubkey for when we collaboratively close - */ - public Option_CVec_u8ZZ get_shutdown_scriptpubkey() { - long ret = bindings.AcceptChannel_get_shutdown_scriptpubkey(this.ptr); - Reference.reachabilityFence(this); - if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Option_CVec_u8ZZ ret_hu_conv = org.ldk.structs.Option_CVec_u8ZZ.constr_from_ptr(ret); - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; - return ret_hu_conv; - } - - /** - * A request to pre-set the to-sender output's scriptPubkey for when we collaboratively close - */ - public void set_shutdown_scriptpubkey(org.ldk.structs.Option_CVec_u8ZZ val) { - bindings.AcceptChannel_set_shutdown_scriptpubkey(this.ptr, val.ptr); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - if (this != null) { this.ptrs_to.add(val); }; - } - - /** - * The channel type that this channel will represent. - * - * If this is `None`, we derive the channel type from the intersection of - * our feature bits with our counterparty's feature bits from the [`Init`] message. - * This is required to match the equivalent field in [`OpenChannel::channel_type`]. - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None - */ - @Nullable - public ChannelTypeFeatures get_channel_type() { - long ret = bindings.AcceptChannel_get_channel_type(this.ptr); - Reference.reachabilityFence(this); - if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.ChannelTypeFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelTypeFeatures(null, ret); } - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; - return ret_hu_conv; - } - - /** - * The channel type that this channel will represent. - * - * If this is `None`, we derive the channel type from the intersection of - * our feature bits with our counterparty's feature bits from the [`Init`] message. - * This is required to match the equivalent field in [`OpenChannel::channel_type`]. - * - * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None - */ - public void set_channel_type(@Nullable org.ldk.structs.ChannelTypeFeatures val) { - bindings.AcceptChannel_set_channel_type(this.ptr, val == null ? 0 : val.ptr); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - if (this != null) { this.ptrs_to.add(val); }; - } - /** * Constructs a new AcceptChannel given each field - * - * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public static AcceptChannel of(byte[] temporary_channel_id_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long channel_reserve_satoshis_arg, long htlc_minimum_msat_arg, int minimum_depth_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_point_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, org.ldk.structs.Option_CVec_u8ZZ shutdown_scriptpubkey_arg, @Nullable org.ldk.structs.ChannelTypeFeatures channel_type_arg) { - long ret = bindings.AcceptChannel_new(InternalUtils.check_arr_len(temporary_channel_id_arg, 32), dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, InternalUtils.check_arr_len(funding_pubkey_arg, 33), InternalUtils.check_arr_len(revocation_basepoint_arg, 33), InternalUtils.check_arr_len(payment_point_arg, 33), InternalUtils.check_arr_len(delayed_payment_basepoint_arg, 33), InternalUtils.check_arr_len(htlc_basepoint_arg, 33), InternalUtils.check_arr_len(first_per_commitment_point_arg, 33), shutdown_scriptpubkey_arg.ptr, channel_type_arg == null ? 0 : channel_type_arg.ptr); - Reference.reachabilityFence(temporary_channel_id_arg); - Reference.reachabilityFence(dust_limit_satoshis_arg); - Reference.reachabilityFence(max_htlc_value_in_flight_msat_arg); + public static AcceptChannel of(org.ldk.structs.CommonAcceptChannelFields common_fields_arg, long channel_reserve_satoshis_arg) { + long ret = bindings.AcceptChannel_new(common_fields_arg.ptr, channel_reserve_satoshis_arg); + Reference.reachabilityFence(common_fields_arg); Reference.reachabilityFence(channel_reserve_satoshis_arg); - Reference.reachabilityFence(htlc_minimum_msat_arg); - Reference.reachabilityFence(minimum_depth_arg); - Reference.reachabilityFence(to_self_delay_arg); - Reference.reachabilityFence(max_accepted_htlcs_arg); - Reference.reachabilityFence(funding_pubkey_arg); - Reference.reachabilityFence(revocation_basepoint_arg); - Reference.reachabilityFence(payment_point_arg); - Reference.reachabilityFence(delayed_payment_basepoint_arg); - Reference.reachabilityFence(htlc_basepoint_arg); - Reference.reachabilityFence(first_per_commitment_point_arg); - Reference.reachabilityFence(shutdown_scriptpubkey_arg); - Reference.reachabilityFence(channel_type_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.AcceptChannel ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.AcceptChannel(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(shutdown_scriptpubkey_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_type_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(common_fields_arg); }; return ret_hu_conv; } @@ -400,7 +114,7 @@ public class AcceptChannel extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.AcceptChannel b) { - boolean ret = bindings.AcceptChannel_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.AcceptChannel_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/AcceptChannelV2.java b/src/main/java/org/ldk/structs/AcceptChannelV2.java index 554a5c46..9327a5ea 100644 --- a/src/main/java/org/ldk/structs/AcceptChannelV2.java +++ b/src/main/java/org/ldk/structs/AcceptChannelV2.java @@ -23,21 +23,25 @@ public class AcceptChannelV2 extends CommonBase { } /** - * The same `temporary_channel_id` received from the initiator's `open_channel2` message. + * Common fields of `accept_channel(2)`-like messages */ - public byte[] get_temporary_channel_id() { - byte[] ret = bindings.AcceptChannelV2_get_temporary_channel_id(this.ptr); + public CommonAcceptChannelFields get_common_fields() { + long ret = bindings.AcceptChannelV2_get_common_fields(this.ptr); Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.CommonAcceptChannelFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommonAcceptChannelFields(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** - * The same `temporary_channel_id` received from the initiator's `open_channel2` message. + * Common fields of `accept_channel(2)`-like messages */ - public void set_temporary_channel_id(byte[] val) { - bindings.AcceptChannelV2_set_temporary_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); + public void set_common_fields(org.ldk.structs.CommonAcceptChannelFields val) { + bindings.AcceptChannelV2_set_common_fields(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** @@ -58,228 +62,6 @@ public class AcceptChannelV2 extends CommonBase { Reference.reachabilityFence(val); } - /** - * The threshold below which outputs on transactions broadcast by the channel acceptor will be - * omitted - */ - public long get_dust_limit_satoshis() { - long ret = bindings.AcceptChannelV2_get_dust_limit_satoshis(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * The threshold below which outputs on transactions broadcast by the channel acceptor will be - * omitted - */ - public void set_dust_limit_satoshis(long val) { - bindings.AcceptChannelV2_set_dust_limit_satoshis(this.ptr, val); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * The maximum inbound HTLC value in flight towards channel acceptor, in milli-satoshi - */ - public long get_max_htlc_value_in_flight_msat() { - long ret = bindings.AcceptChannelV2_get_max_htlc_value_in_flight_msat(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * The maximum inbound HTLC value in flight towards channel acceptor, in milli-satoshi - */ - public void set_max_htlc_value_in_flight_msat(long val) { - bindings.AcceptChannelV2_set_max_htlc_value_in_flight_msat(this.ptr, val); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * The minimum HTLC size incoming to channel acceptor, in milli-satoshi - */ - public long get_htlc_minimum_msat() { - long ret = bindings.AcceptChannelV2_get_htlc_minimum_msat(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * The minimum HTLC size incoming to channel acceptor, in milli-satoshi - */ - public void set_htlc_minimum_msat(long val) { - bindings.AcceptChannelV2_set_htlc_minimum_msat(this.ptr, val); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * Minimum depth of the funding transaction before the channel is considered open - */ - public int get_minimum_depth() { - int ret = bindings.AcceptChannelV2_get_minimum_depth(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * Minimum depth of the funding transaction before the channel is considered open - */ - public void set_minimum_depth(int val) { - bindings.AcceptChannelV2_set_minimum_depth(this.ptr, val); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * The number of blocks which the counterparty will have to wait to claim on-chain funds if they - * broadcast a commitment transaction - */ - public short get_to_self_delay() { - short ret = bindings.AcceptChannelV2_get_to_self_delay(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * The number of blocks which the counterparty will have to wait to claim on-chain funds if they - * broadcast a commitment transaction - */ - public void set_to_self_delay(short val) { - bindings.AcceptChannelV2_set_to_self_delay(this.ptr, val); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * The maximum number of inbound HTLCs towards channel acceptor - */ - public short get_max_accepted_htlcs() { - short ret = bindings.AcceptChannelV2_get_max_accepted_htlcs(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * The maximum number of inbound HTLCs towards channel acceptor - */ - public void set_max_accepted_htlcs(short val) { - bindings.AcceptChannelV2_set_max_accepted_htlcs(this.ptr, val); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * The channel acceptor's key controlling the funding transaction - */ - public byte[] get_funding_pubkey() { - byte[] ret = bindings.AcceptChannelV2_get_funding_pubkey(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * The channel acceptor's key controlling the funding transaction - */ - public void set_funding_pubkey(byte[] val) { - bindings.AcceptChannelV2_set_funding_pubkey(this.ptr, InternalUtils.check_arr_len(val, 33)); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * Used to derive a revocation key for transactions broadcast by counterparty - */ - public byte[] get_revocation_basepoint() { - byte[] ret = bindings.AcceptChannelV2_get_revocation_basepoint(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * Used to derive a revocation key for transactions broadcast by counterparty - */ - public void set_revocation_basepoint(byte[] val) { - bindings.AcceptChannelV2_set_revocation_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33)); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * A payment key to channel acceptor for transactions broadcast by counterparty - */ - public byte[] get_payment_basepoint() { - byte[] ret = bindings.AcceptChannelV2_get_payment_basepoint(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * A payment key to channel acceptor for transactions broadcast by counterparty - */ - public void set_payment_basepoint(byte[] val) { - bindings.AcceptChannelV2_set_payment_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33)); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * Used to derive a payment key to channel acceptor for transactions broadcast by channel - * acceptor - */ - public byte[] get_delayed_payment_basepoint() { - byte[] ret = bindings.AcceptChannelV2_get_delayed_payment_basepoint(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * Used to derive a payment key to channel acceptor for transactions broadcast by channel - * acceptor - */ - public void set_delayed_payment_basepoint(byte[] val) { - bindings.AcceptChannelV2_set_delayed_payment_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33)); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * Used to derive an HTLC payment key to channel acceptor for transactions broadcast by counterparty - */ - public byte[] get_htlc_basepoint() { - byte[] ret = bindings.AcceptChannelV2_get_htlc_basepoint(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * Used to derive an HTLC payment key to channel acceptor for transactions broadcast by counterparty - */ - public void set_htlc_basepoint(byte[] val) { - bindings.AcceptChannelV2_set_htlc_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33)); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * The first to-be-broadcast-by-channel-acceptor transaction's per commitment point - */ - public byte[] get_first_per_commitment_point() { - byte[] ret = bindings.AcceptChannelV2_get_first_per_commitment_point(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * The first to-be-broadcast-by-channel-acceptor transaction's per commitment point - */ - public void set_first_per_commitment_point(byte[] val) { - bindings.AcceptChannelV2_set_first_per_commitment_point(this.ptr, InternalUtils.check_arr_len(val, 33)); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - /** * The second to-be-broadcast-by-channel-acceptor transaction's per commitment point */ @@ -298,65 +80,6 @@ public class AcceptChannelV2 extends CommonBase { Reference.reachabilityFence(val); } - /** - * Optionally, a request to pre-set the to-channel-acceptor output's scriptPubkey for when we - * collaboratively close - */ - public Option_CVec_u8ZZ get_shutdown_scriptpubkey() { - long ret = bindings.AcceptChannelV2_get_shutdown_scriptpubkey(this.ptr); - Reference.reachabilityFence(this); - if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Option_CVec_u8ZZ ret_hu_conv = org.ldk.structs.Option_CVec_u8ZZ.constr_from_ptr(ret); - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; - return ret_hu_conv; - } - - /** - * Optionally, a request to pre-set the to-channel-acceptor output's scriptPubkey for when we - * collaboratively close - */ - public void set_shutdown_scriptpubkey(org.ldk.structs.Option_CVec_u8ZZ val) { - bindings.AcceptChannelV2_set_shutdown_scriptpubkey(this.ptr, val.ptr); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - if (this != null) { this.ptrs_to.add(val); }; - } - - /** - * The channel type that this channel will represent. If none is set, we derive the channel - * type from the intersection of our feature bits with our counterparty's feature bits from - * the Init message. - * - * This is required to match the equivalent field in [`OpenChannelV2::channel_type`]. - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None - */ - @Nullable - public ChannelTypeFeatures get_channel_type() { - long ret = bindings.AcceptChannelV2_get_channel_type(this.ptr); - Reference.reachabilityFence(this); - if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.ChannelTypeFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelTypeFeatures(null, ret); } - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; - return ret_hu_conv; - } - - /** - * The channel type that this channel will represent. If none is set, we derive the channel - * type from the intersection of our feature bits with our counterparty's feature bits from - * the Init message. - * - * This is required to match the equivalent field in [`OpenChannelV2::channel_type`]. - * - * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None - */ - public void set_channel_type(@Nullable org.ldk.structs.ChannelTypeFeatures val) { - bindings.AcceptChannelV2_set_channel_type(this.ptr, val == null ? 0 : val.ptr); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - if (this != null) { this.ptrs_to.add(val); }; - } - /** * Optionally, a requirement that only confirmed inputs can be added */ @@ -377,34 +100,17 @@ public class AcceptChannelV2 extends CommonBase { /** * Constructs a new AcceptChannelV2 given each field - * - * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public static AcceptChannelV2 of(byte[] temporary_channel_id_arg, long funding_satoshis_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long htlc_minimum_msat_arg, int minimum_depth_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_basepoint_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, byte[] second_per_commitment_point_arg, org.ldk.structs.Option_CVec_u8ZZ shutdown_scriptpubkey_arg, @Nullable org.ldk.structs.ChannelTypeFeatures channel_type_arg, org.ldk.enums.COption_NoneZ require_confirmed_inputs_arg) { - long ret = bindings.AcceptChannelV2_new(InternalUtils.check_arr_len(temporary_channel_id_arg, 32), funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, InternalUtils.check_arr_len(funding_pubkey_arg, 33), InternalUtils.check_arr_len(revocation_basepoint_arg, 33), InternalUtils.check_arr_len(payment_basepoint_arg, 33), InternalUtils.check_arr_len(delayed_payment_basepoint_arg, 33), InternalUtils.check_arr_len(htlc_basepoint_arg, 33), InternalUtils.check_arr_len(first_per_commitment_point_arg, 33), InternalUtils.check_arr_len(second_per_commitment_point_arg, 33), shutdown_scriptpubkey_arg.ptr, channel_type_arg == null ? 0 : channel_type_arg.ptr, require_confirmed_inputs_arg); - Reference.reachabilityFence(temporary_channel_id_arg); + public static AcceptChannelV2 of(org.ldk.structs.CommonAcceptChannelFields common_fields_arg, long funding_satoshis_arg, byte[] second_per_commitment_point_arg, org.ldk.enums.COption_NoneZ require_confirmed_inputs_arg) { + long ret = bindings.AcceptChannelV2_new(common_fields_arg.ptr, funding_satoshis_arg, InternalUtils.check_arr_len(second_per_commitment_point_arg, 33), require_confirmed_inputs_arg); + Reference.reachabilityFence(common_fields_arg); Reference.reachabilityFence(funding_satoshis_arg); - Reference.reachabilityFence(dust_limit_satoshis_arg); - Reference.reachabilityFence(max_htlc_value_in_flight_msat_arg); - Reference.reachabilityFence(htlc_minimum_msat_arg); - Reference.reachabilityFence(minimum_depth_arg); - Reference.reachabilityFence(to_self_delay_arg); - Reference.reachabilityFence(max_accepted_htlcs_arg); - Reference.reachabilityFence(funding_pubkey_arg); - Reference.reachabilityFence(revocation_basepoint_arg); - Reference.reachabilityFence(payment_basepoint_arg); - Reference.reachabilityFence(delayed_payment_basepoint_arg); - Reference.reachabilityFence(htlc_basepoint_arg); - Reference.reachabilityFence(first_per_commitment_point_arg); Reference.reachabilityFence(second_per_commitment_point_arg); - Reference.reachabilityFence(shutdown_scriptpubkey_arg); - Reference.reachabilityFence(channel_type_arg); Reference.reachabilityFence(require_confirmed_inputs_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.AcceptChannelV2 ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.AcceptChannelV2(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(shutdown_scriptpubkey_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_type_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(common_fields_arg); }; return ret_hu_conv; } @@ -444,7 +150,7 @@ public class AcceptChannelV2 extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.AcceptChannelV2 b) { - boolean ret = bindings.AcceptChannelV2_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.AcceptChannelV2_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/Amount.java b/src/main/java/org/ldk/structs/Amount.java index 24ce08e4..00231645 100644 --- a/src/main/java/org/ldk/structs/Amount.java +++ b/src/main/java/org/ldk/structs/Amount.java @@ -14,13 +14,54 @@ import javax.annotation.Nullable; */ @SuppressWarnings("unchecked") // We correctly assign various generic arrays public class Amount extends CommonBase { - Amount(Object _dummy, long ptr) { super(ptr); } + private Amount(Object _dummy, long ptr) { super(ptr); } @Override @SuppressWarnings("deprecation") protected void finalize() throws Throwable { super.finalize(); if (ptr != 0) { bindings.Amount_free(ptr); } } + static Amount constr_from_ptr(long ptr) { + bindings.LDKAmount raw_val = bindings.LDKAmount_ref_from_ptr(ptr); + if (raw_val.getClass() == bindings.LDKAmount.Bitcoin.class) { + return new Bitcoin(ptr, (bindings.LDKAmount.Bitcoin)raw_val); + } + if (raw_val.getClass() == bindings.LDKAmount.Currency.class) { + return new Currency(ptr, (bindings.LDKAmount.Currency)raw_val); + } + assert false; return null; // Unreachable without extending the (internal) bindings interface + } + /** + * An amount of bitcoin. + */ + public final static class Bitcoin extends Amount { + /** + * The amount in millisatoshi. + */ + public final long amount_msats; + private Bitcoin(long ptr, bindings.LDKAmount.Bitcoin obj) { + super(null, ptr); + this.amount_msats = obj.amount_msats; + } + } + /** + * An amount of currency specified using ISO 4712. + */ + public final static class Currency extends Amount { + /** + * The currency that the amount is denominated in. + */ + public final byte[] iso4217_code; + /** + * The amount in the currency unit adjusted by the ISO 4712 exponent (e.g., USD cents). + */ + public final long amount; + private Currency(long ptr, bindings.LDKAmount.Currency obj) { + super(null, ptr); + this.iso4217_code = obj.iso4217_code; + this.amount = obj.amount; + } + } long clone_ptr() { long ret = bindings.Amount_clone_ptr(this.ptr); Reference.reachabilityFence(this); @@ -34,9 +75,34 @@ public class Amount extends CommonBase { long ret = bindings.Amount_clone(this.ptr); Reference.reachabilityFence(this); if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Amount ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Amount(null, ret); } + org.ldk.structs.Amount ret_hu_conv = org.ldk.structs.Amount.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; return ret_hu_conv; } + /** + * Utility method to constructs a new Bitcoin-variant Amount + */ + public static Amount bitcoin(long amount_msats) { + long ret = bindings.Amount_bitcoin(amount_msats); + Reference.reachabilityFence(amount_msats); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Amount ret_hu_conv = org.ldk.structs.Amount.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new Currency-variant Amount + */ + public static Amount currency(byte[] iso4217_code, long amount) { + long ret = bindings.Amount_currency(InternalUtils.check_arr_len(iso4217_code, 3), amount); + Reference.reachabilityFence(iso4217_code); + Reference.reachabilityFence(amount); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Amount ret_hu_conv = org.ldk.structs.Amount.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + } diff --git a/src/main/java/org/ldk/structs/AnchorDescriptor.java b/src/main/java/org/ldk/structs/AnchorDescriptor.java index d843af52..f821d707 100644 --- a/src/main/java/org/ldk/structs/AnchorDescriptor.java +++ b/src/main/java/org/ldk/structs/AnchorDescriptor.java @@ -36,7 +36,7 @@ public class AnchorDescriptor extends CommonBase { * The parameters required to derive the signer for the anchor input. */ public void set_channel_derivation_parameters(org.ldk.structs.ChannelDerivationParameters val) { - bindings.AnchorDescriptor_set_channel_derivation_parameters(this.ptr, val == null ? 0 : val.ptr); + bindings.AnchorDescriptor_set_channel_derivation_parameters(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -60,7 +60,7 @@ public class AnchorDescriptor extends CommonBase { * output. */ public void set_outpoint(org.ldk.structs.OutPoint val) { - bindings.AnchorDescriptor_set_outpoint(this.ptr, val == null ? 0 : val.ptr); + bindings.AnchorDescriptor_set_outpoint(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -70,7 +70,7 @@ public class AnchorDescriptor extends CommonBase { * Constructs a new AnchorDescriptor given each field */ public static AnchorDescriptor of(org.ldk.structs.ChannelDerivationParameters channel_derivation_parameters_arg, org.ldk.structs.OutPoint outpoint_arg) { - long ret = bindings.AnchorDescriptor_new(channel_derivation_parameters_arg == null ? 0 : channel_derivation_parameters_arg.ptr, outpoint_arg == null ? 0 : outpoint_arg.ptr); + long ret = bindings.AnchorDescriptor_new(channel_derivation_parameters_arg.ptr, outpoint_arg.ptr); Reference.reachabilityFence(channel_derivation_parameters_arg); Reference.reachabilityFence(outpoint_arg); if (ret >= 0 && ret <= 4096) { return null; } @@ -105,7 +105,7 @@ public class AnchorDescriptor extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.AnchorDescriptor b) { - boolean ret = bindings.AnchorDescriptor_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.AnchorDescriptor_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/AnnouncementSignatures.java b/src/main/java/org/ldk/structs/AnnouncementSignatures.java index 61af592a..a8f0837c 100644 --- a/src/main/java/org/ldk/structs/AnnouncementSignatures.java +++ b/src/main/java/org/ldk/structs/AnnouncementSignatures.java @@ -25,19 +25,23 @@ public class AnnouncementSignatures extends CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { - byte[] ret = bindings.AnnouncementSignatures_get_channel_id(this.ptr); + public ChannelId get_channel_id() { + long ret = bindings.AnnouncementSignatures_get_channel_id(this.ptr); Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.AnnouncementSignatures_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.AnnouncementSignatures_set_channel_id(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** @@ -97,8 +101,8 @@ public class AnnouncementSignatures extends CommonBase { /** * Constructs a new AnnouncementSignatures given each field */ - public static AnnouncementSignatures of(byte[] channel_id_arg, long short_channel_id_arg, byte[] node_signature_arg, byte[] bitcoin_signature_arg) { - long ret = bindings.AnnouncementSignatures_new(InternalUtils.check_arr_len(channel_id_arg, 32), short_channel_id_arg, InternalUtils.check_arr_len(node_signature_arg, 64), InternalUtils.check_arr_len(bitcoin_signature_arg, 64)); + public static AnnouncementSignatures of(org.ldk.structs.ChannelId channel_id_arg, long short_channel_id_arg, byte[] node_signature_arg, byte[] bitcoin_signature_arg) { + long ret = bindings.AnnouncementSignatures_new(channel_id_arg.ptr, short_channel_id_arg, InternalUtils.check_arr_len(node_signature_arg, 64), InternalUtils.check_arr_len(bitcoin_signature_arg, 64)); Reference.reachabilityFence(channel_id_arg); Reference.reachabilityFence(short_channel_id_arg); Reference.reachabilityFence(node_signature_arg); @@ -106,6 +110,7 @@ public class AnnouncementSignatures extends CommonBase { if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.AnnouncementSignatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.AnnouncementSignatures(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); }; return ret_hu_conv; } @@ -145,7 +150,7 @@ public class AnnouncementSignatures extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.AnnouncementSignatures b) { - boolean ret = bindings.AnnouncementSignatures_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.AnnouncementSignatures_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/BackgroundProcessor.java b/src/main/java/org/ldk/structs/BackgroundProcessor.java index cb7674ab..a6dac689 100644 --- a/src/main/java/org/ldk/structs/BackgroundProcessor.java +++ b/src/main/java/org/ldk/structs/BackgroundProcessor.java @@ -31,6 +31,8 @@ import javax.annotation.Nullable; * However, as long as [`ChannelMonitor`] backups are sound, no funds besides those used for * unilateral chain closure fees are at risk. * + * [`ChannelManager`]: lightning::ln::channelmanager::ChannelManager + * [`ChannelManager::timer_tick_occurred`]: lightning::ln::channelmanager::ChannelManager::timer_tick_occurred * [`ChannelMonitor`]: lightning::chain::channelmonitor::ChannelMonitor * [`Event`]: lightning::events::Event * [`PeerManager::timer_tick_occurred`]: lightning::ln::peer_handler::PeerManager::timer_tick_occurred @@ -93,7 +95,7 @@ public class BackgroundProcessor extends CommonBase { * [`NetworkGraph::write`]: lightning::routing::gossip::NetworkGraph#impl-Writeable */ public static BackgroundProcessor start(org.ldk.structs.Persister persister, org.ldk.structs.EventHandler event_handler, org.ldk.structs.ChainMonitor chain_monitor, org.ldk.structs.ChannelManager channel_manager, org.ldk.structs.GossipSync gossip_sync, org.ldk.structs.PeerManager peer_manager, org.ldk.structs.Logger logger, org.ldk.structs.Option_WriteableScoreZ scorer) { - long ret = bindings.BackgroundProcessor_start(persister.ptr, event_handler.ptr, chain_monitor == null ? 0 : chain_monitor.ptr, channel_manager == null ? 0 : channel_manager.ptr, gossip_sync.ptr, peer_manager == null ? 0 : peer_manager.ptr, logger.ptr, scorer.ptr); + long ret = bindings.BackgroundProcessor_start(persister.ptr, event_handler.ptr, chain_monitor.ptr, channel_manager.ptr, gossip_sync.ptr, peer_manager.ptr, logger.ptr, scorer.ptr); Reference.reachabilityFence(persister); Reference.reachabilityFence(event_handler); Reference.reachabilityFence(chain_monitor); diff --git a/src/main/java/org/ldk/structs/Balance.java b/src/main/java/org/ldk/structs/Balance.java index cf11e198..e46e85c4 100644 --- a/src/main/java/org/ldk/structs/Balance.java +++ b/src/main/java/org/ldk/structs/Balance.java @@ -295,7 +295,7 @@ public class Balance extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public boolean eq(org.ldk.structs.Balance b) { - boolean ret = bindings.Balance_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.Balance_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); return ret; diff --git a/src/main/java/org/ldk/structs/BestBlock.java b/src/main/java/org/ldk/structs/BestBlock.java index fa485b60..f7f60859 100644 --- a/src/main/java/org/ldk/structs/BestBlock.java +++ b/src/main/java/org/ldk/structs/BestBlock.java @@ -20,6 +20,55 @@ public class BestBlock extends CommonBase { if (ptr != 0) { bindings.BestBlock_free(ptr); } } + /** + * The block's hash + */ + public byte[] get_block_hash() { + byte[] ret = bindings.BestBlock_get_block_hash(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * The block's hash + */ + public void set_block_hash(byte[] val) { + bindings.BestBlock_set_block_hash(this.ptr, InternalUtils.check_arr_len(val, 32)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * The height at which the block was confirmed. + */ + public int get_height() { + int ret = bindings.BestBlock_get_height(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * The height at which the block was confirmed. + */ + public void set_height(int val) { + bindings.BestBlock_set_height(this.ptr, val); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * Constructs a new BestBlock given each field + */ + public static BestBlock of(byte[] block_hash_arg, int height_arg) { + long ret = bindings.BestBlock_new(InternalUtils.check_arr_len(block_hash_arg, 32), height_arg); + Reference.reachabilityFence(block_hash_arg); + Reference.reachabilityFence(height_arg); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.BestBlock ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.BestBlock(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + long clone_ptr() { long ret = bindings.BestBlock_clone_ptr(this.ptr); Reference.reachabilityFence(this); @@ -38,13 +87,25 @@ public class BestBlock extends CommonBase { return ret_hu_conv; } + /** + * Generates a non-cryptographic 64-bit hash of the BestBlock. + */ + public long hash() { + long ret = bindings.BestBlock_hash(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + @Override public int hashCode() { + return (int)this.hash(); + } /** * Checks if two BestBlocks contain equal inner contents. * This ignores pointers and is_owned flags and looks at the values in fields. * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.BestBlock b) { - boolean ret = bindings.BestBlock_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.BestBlock_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; @@ -69,34 +130,23 @@ public class BestBlock extends CommonBase { } /** - * Returns a `BestBlock` as identified by the given block hash and height. + * Serialize the BestBlock object into a byte array which can be read by BestBlock_read */ - public static BestBlock of(byte[] block_hash, int height) { - long ret = bindings.BestBlock_new(InternalUtils.check_arr_len(block_hash, 32), height); - Reference.reachabilityFence(block_hash); - Reference.reachabilityFence(height); - if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.BestBlock ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.BestBlock(null, ret); } - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; - return ret_hu_conv; - } - - /** - * Returns the best block hash. - */ - public byte[] block_hash() { - byte[] ret = bindings.BestBlock_block_hash(this.ptr); + public byte[] write() { + byte[] ret = bindings.BestBlock_write(this.ptr); Reference.reachabilityFence(this); return ret; } /** - * Returns the best block height. + * Read a BestBlock from a byte array, created by BestBlock_write */ - public int height() { - int ret = bindings.BestBlock_height(this.ptr); - Reference.reachabilityFence(this); - return ret; + public static Result_BestBlockDecodeErrorZ read(byte[] ser) { + long ret = bindings.BestBlock_read(ser); + Reference.reachabilityFence(ser); + if (ret >= 0 && ret <= 4096) { return null; } + Result_BestBlockDecodeErrorZ ret_hu_conv = Result_BestBlockDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; } } diff --git a/src/main/java/org/ldk/structs/BigSize.java b/src/main/java/org/ldk/structs/BigSize.java index 421d9e6b..fd0275fd 100644 --- a/src/main/java/org/ldk/structs/BigSize.java +++ b/src/main/java/org/ldk/structs/BigSize.java @@ -86,7 +86,7 @@ public class BigSize extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.BigSize b) { - boolean ret = bindings.BigSize_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.BigSize_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/BlindedForward.java b/src/main/java/org/ldk/structs/BlindedForward.java index 4675ebc5..6172aa20 100644 --- a/src/main/java/org/ldk/structs/BlindedForward.java +++ b/src/main/java/org/ldk/structs/BlindedForward.java @@ -111,7 +111,7 @@ public class BlindedForward extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.BlindedForward b) { - boolean ret = bindings.BlindedForward_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.BlindedForward_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/BlindedHop.java b/src/main/java/org/ldk/structs/BlindedHop.java index 9ca3a8dd..6acd1512 100644 --- a/src/main/java/org/ldk/structs/BlindedHop.java +++ b/src/main/java/org/ldk/structs/BlindedHop.java @@ -109,7 +109,7 @@ public class BlindedHop extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.BlindedHop b) { - boolean ret = bindings.BlindedHop_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.BlindedHop_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/BlindedHopFeatures.java b/src/main/java/org/ldk/structs/BlindedHopFeatures.java index ede23d2f..8d13ba0e 100644 --- a/src/main/java/org/ldk/structs/BlindedHopFeatures.java +++ b/src/main/java/org/ldk/structs/BlindedHopFeatures.java @@ -26,7 +26,7 @@ public class BlindedHopFeatures extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.BlindedHopFeatures b) { - boolean ret = bindings.BlindedHopFeatures_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.BlindedHopFeatures_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; @@ -82,7 +82,7 @@ public class BlindedHopFeatures extends CommonBase { * Returns true if this `Features` object contains required features unknown by `other`. */ public boolean requires_unknown_bits_from(org.ldk.structs.BlindedHopFeatures other) { - boolean ret = bindings.BlindedHopFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr); + boolean ret = bindings.BlindedHopFeatures_requires_unknown_bits_from(this.ptr, other.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(other); if (this != null) { this.ptrs_to.add(other); }; diff --git a/src/main/java/org/ldk/structs/BlindedPath.java b/src/main/java/org/ldk/structs/BlindedPath.java index fcf11431..5861f015 100644 --- a/src/main/java/org/ldk/structs/BlindedPath.java +++ b/src/main/java/org/ldk/structs/BlindedPath.java @@ -23,28 +23,32 @@ public class BlindedPath extends CommonBase { /** * To send to a blinded path, the sender first finds a route to the unblinded - * `introduction_node_id`, which can unblind its [`encrypted_payload`] to find out the onion + * `introduction_node`, which can unblind its [`encrypted_payload`] to find out the onion * message or payment's next hop and forward it along. * * [`encrypted_payload`]: BlindedHop::encrypted_payload */ - public byte[] get_introduction_node_id() { - byte[] ret = bindings.BlindedPath_get_introduction_node_id(this.ptr); + public IntroductionNode get_introduction_node() { + long ret = bindings.BlindedPath_get_introduction_node(this.ptr); Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.IntroductionNode ret_hu_conv = org.ldk.structs.IntroductionNode.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** * To send to a blinded path, the sender first finds a route to the unblinded - * `introduction_node_id`, which can unblind its [`encrypted_payload`] to find out the onion + * `introduction_node`, which can unblind its [`encrypted_payload`] to find out the onion * message or payment's next hop and forward it along. * * [`encrypted_payload`]: BlindedHop::encrypted_payload */ - public void set_introduction_node_id(byte[] val) { - bindings.BlindedPath_set_introduction_node_id(this.ptr, InternalUtils.check_arr_len(val, 33)); + public void set_introduction_node(org.ldk.structs.IntroductionNode val) { + bindings.BlindedPath_set_introduction_node(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** @@ -92,7 +96,7 @@ public class BlindedPath extends CommonBase { * The hops composing the blinded path. */ public void set_blinded_hops(BlindedHop[] val) { - bindings.BlindedPath_set_blinded_hops(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_12 -> val_conv_12 == null ? 0 : val_conv_12.ptr).toArray() : null); + bindings.BlindedPath_set_blinded_hops(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_12 -> val_conv_12.ptr).toArray() : null); Reference.reachabilityFence(this); Reference.reachabilityFence(val); for (BlindedHop val_conv_12: val) { if (this != null) { this.ptrs_to.add(val_conv_12); }; }; @@ -101,14 +105,15 @@ public class BlindedPath extends CommonBase { /** * Constructs a new BlindedPath given each field */ - public static BlindedPath of(byte[] introduction_node_id_arg, byte[] blinding_point_arg, BlindedHop[] blinded_hops_arg) { - long ret = bindings.BlindedPath_new(InternalUtils.check_arr_len(introduction_node_id_arg, 33), InternalUtils.check_arr_len(blinding_point_arg, 33), blinded_hops_arg != null ? Arrays.stream(blinded_hops_arg).mapToLong(blinded_hops_arg_conv_12 -> blinded_hops_arg_conv_12 == null ? 0 : blinded_hops_arg_conv_12.ptr).toArray() : null); - Reference.reachabilityFence(introduction_node_id_arg); + public static BlindedPath of(org.ldk.structs.IntroductionNode introduction_node_arg, byte[] blinding_point_arg, BlindedHop[] blinded_hops_arg) { + long ret = bindings.BlindedPath_new(introduction_node_arg.ptr, InternalUtils.check_arr_len(blinding_point_arg, 33), blinded_hops_arg != null ? Arrays.stream(blinded_hops_arg).mapToLong(blinded_hops_arg_conv_12 -> blinded_hops_arg_conv_12.ptr).toArray() : null); + Reference.reachabilityFence(introduction_node_arg); Reference.reachabilityFence(blinding_point_arg); Reference.reachabilityFence(blinded_hops_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.BlindedPath ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.BlindedPath(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(introduction_node_arg); }; for (BlindedHop blinded_hops_arg_conv_12: blinded_hops_arg) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(blinded_hops_arg_conv_12); }; }; return ret_hu_conv; } @@ -149,7 +154,7 @@ public class BlindedPath extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.BlindedPath b) { - boolean ret = bindings.BlindedPath_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.BlindedPath_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; @@ -189,6 +194,24 @@ public class BlindedPath extends CommonBase { return ret_hu_conv; } + /** + * Returns the introduction [`NodeId`] of the blinded path, if it is publicly reachable (i.e., + * it is found in the network graph). + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + @Nullable + public NodeId public_introduction_node_id(org.ldk.structs.ReadOnlyNetworkGraph network_graph) { + long ret = bindings.BlindedPath_public_introduction_node_id(this.ptr, network_graph.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(network_graph); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.NodeId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.NodeId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + if (this != null) { this.ptrs_to.add(network_graph); }; + return ret_hu_conv; + } + /** * Serialize the BlindedPath object into a byte array which can be read by BlindedPath_read */ diff --git a/src/main/java/org/ldk/structs/BlindedPayInfo.java b/src/main/java/org/ldk/structs/BlindedPayInfo.java index fe7d519e..e575c503 100644 --- a/src/main/java/org/ldk/structs/BlindedPayInfo.java +++ b/src/main/java/org/ldk/structs/BlindedPayInfo.java @@ -140,7 +140,7 @@ public class BlindedPayInfo extends CommonBase { * onion payload. */ public void set_features(org.ldk.structs.BlindedHopFeatures val) { - bindings.BlindedPayInfo_set_features(this.ptr, val == null ? 0 : val.ptr); + bindings.BlindedPayInfo_set_features(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -150,7 +150,7 @@ public class BlindedPayInfo extends CommonBase { * Constructs a new BlindedPayInfo given each field */ public static BlindedPayInfo of(int fee_base_msat_arg, int fee_proportional_millionths_arg, short cltv_expiry_delta_arg, long htlc_minimum_msat_arg, long htlc_maximum_msat_arg, org.ldk.structs.BlindedHopFeatures features_arg) { - long ret = bindings.BlindedPayInfo_new(fee_base_msat_arg, fee_proportional_millionths_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg, features_arg == null ? 0 : features_arg.ptr); + long ret = bindings.BlindedPayInfo_new(fee_base_msat_arg, fee_proportional_millionths_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg, features_arg.ptr); Reference.reachabilityFence(fee_base_msat_arg); Reference.reachabilityFence(fee_proportional_millionths_arg); Reference.reachabilityFence(cltv_expiry_delta_arg); @@ -200,7 +200,7 @@ public class BlindedPayInfo extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.BlindedPayInfo b) { - boolean ret = bindings.BlindedPayInfo_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.BlindedPayInfo_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/BlindedTail.java b/src/main/java/org/ldk/structs/BlindedTail.java index e2e7b71f..c9e59fc8 100644 --- a/src/main/java/org/ldk/structs/BlindedTail.java +++ b/src/main/java/org/ldk/structs/BlindedTail.java @@ -48,7 +48,7 @@ public class BlindedTail extends CommonBase { * [`BlindedPath`]: crate::blinded_path::BlindedPath */ public void set_hops(BlindedHop[] val) { - bindings.BlindedTail_set_hops(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_12 -> val_conv_12 == null ? 0 : val_conv_12.ptr).toArray() : null); + bindings.BlindedTail_set_hops(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_12 -> val_conv_12.ptr).toArray() : null); Reference.reachabilityFence(this); Reference.reachabilityFence(val); for (BlindedHop val_conv_12: val) { if (this != null) { this.ptrs_to.add(val_conv_12); }; }; @@ -118,7 +118,7 @@ public class BlindedTail extends CommonBase { * Constructs a new BlindedTail given each field */ public static BlindedTail of(BlindedHop[] hops_arg, byte[] blinding_point_arg, int excess_final_cltv_expiry_delta_arg, long final_value_msat_arg) { - long ret = bindings.BlindedTail_new(hops_arg != null ? Arrays.stream(hops_arg).mapToLong(hops_arg_conv_12 -> hops_arg_conv_12 == null ? 0 : hops_arg_conv_12.ptr).toArray() : null, InternalUtils.check_arr_len(blinding_point_arg, 33), excess_final_cltv_expiry_delta_arg, final_value_msat_arg); + long ret = bindings.BlindedTail_new(hops_arg != null ? Arrays.stream(hops_arg).mapToLong(hops_arg_conv_12 -> hops_arg_conv_12.ptr).toArray() : null, InternalUtils.check_arr_len(blinding_point_arg, 33), excess_final_cltv_expiry_delta_arg, final_value_msat_arg); Reference.reachabilityFence(hops_arg); Reference.reachabilityFence(blinding_point_arg); Reference.reachabilityFence(excess_final_cltv_expiry_delta_arg); @@ -166,7 +166,7 @@ public class BlindedTail extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.BlindedTail b) { - boolean ret = bindings.BlindedTail_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.BlindedTail_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/Bolt11Invoice.java b/src/main/java/org/ldk/structs/Bolt11Invoice.java index efe7e133..67e9f44b 100644 --- a/src/main/java/org/ldk/structs/Bolt11Invoice.java +++ b/src/main/java/org/ldk/structs/Bolt11Invoice.java @@ -33,7 +33,7 @@ public class Bolt11Invoice extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.Bolt11Invoice b) { - boolean ret = bindings.Bolt11Invoice_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.Bolt11Invoice_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; @@ -130,7 +130,7 @@ public class Bolt11Invoice extends CommonBase { * ``` */ public static Result_Bolt11InvoiceBolt11SemanticErrorZ from_signed(org.ldk.structs.SignedRawBolt11Invoice signed_invoice) { - long ret = bindings.Bolt11Invoice_from_signed(signed_invoice == null ? 0 : signed_invoice.ptr); + long ret = bindings.Bolt11Invoice_from_signed(signed_invoice.ptr); Reference.reachabilityFence(signed_invoice); if (ret >= 0 && ret <= 4096) { return null; } Result_Bolt11InvoiceBolt11SemanticErrorZ ret_hu_conv = Result_Bolt11InvoiceBolt11SemanticErrorZ.constr_from_ptr(ret); @@ -222,6 +222,16 @@ public class Bolt11Invoice extends CommonBase { return ret; } + /** + * Recover the payee's public key if one was included in the invoice, otherwise return the + * recovered public key from the signature + */ + public byte[] get_payee_pub_key() { + byte[] ret = bindings.Bolt11Invoice_get_payee_pub_key(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + /** * Returns the Duration since the Unix epoch at which the invoice expires. * Returning None if overflow occurred. diff --git a/src/main/java/org/ldk/structs/Bolt11InvoiceFeatures.java b/src/main/java/org/ldk/structs/Bolt11InvoiceFeatures.java index 8cdc3093..cc4e156d 100644 --- a/src/main/java/org/ldk/structs/Bolt11InvoiceFeatures.java +++ b/src/main/java/org/ldk/structs/Bolt11InvoiceFeatures.java @@ -26,7 +26,7 @@ public class Bolt11InvoiceFeatures extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.Bolt11InvoiceFeatures b) { - boolean ret = bindings.Bolt11InvoiceFeatures_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.Bolt11InvoiceFeatures_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; @@ -82,7 +82,7 @@ public class Bolt11InvoiceFeatures extends CommonBase { * Returns true if this `Features` object contains required features unknown by `other`. */ public boolean requires_unknown_bits_from(org.ldk.structs.Bolt11InvoiceFeatures other) { - boolean ret = bindings.Bolt11InvoiceFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr); + boolean ret = bindings.Bolt11InvoiceFeatures_requires_unknown_bits_from(this.ptr, other.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(other); if (this != null) { this.ptrs_to.add(other); }; @@ -327,4 +327,38 @@ public class Bolt11InvoiceFeatures extends CommonBase { return ret; } + /** + * Set this feature as optional. + */ + public void set_trampoline_routing_optional() { + bindings.Bolt11InvoiceFeatures_set_trampoline_routing_optional(this.ptr); + Reference.reachabilityFence(this); + } + + /** + * Set this feature as required. + */ + public void set_trampoline_routing_required() { + bindings.Bolt11InvoiceFeatures_set_trampoline_routing_required(this.ptr); + Reference.reachabilityFence(this); + } + + /** + * Checks if this feature is supported. + */ + public boolean supports_trampoline_routing() { + boolean ret = bindings.Bolt11InvoiceFeatures_supports_trampoline_routing(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Checks if this feature is required. + */ + public boolean requires_trampoline_routing() { + boolean ret = bindings.Bolt11InvoiceFeatures_requires_trampoline_routing(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + } diff --git a/src/main/java/org/ldk/structs/Bolt11InvoiceSignature.java b/src/main/java/org/ldk/structs/Bolt11InvoiceSignature.java index f9d7288b..7ea69a15 100644 --- a/src/main/java/org/ldk/structs/Bolt11InvoiceSignature.java +++ b/src/main/java/org/ldk/structs/Bolt11InvoiceSignature.java @@ -56,7 +56,7 @@ public class Bolt11InvoiceSignature extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.Bolt11InvoiceSignature b) { - boolean ret = bindings.Bolt11InvoiceSignature_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.Bolt11InvoiceSignature_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/Bolt11ParseError.java b/src/main/java/org/ldk/structs/Bolt11ParseError.java index 77aba012..61124831 100644 --- a/src/main/java/org/ldk/structs/Bolt11ParseError.java +++ b/src/main/java/org/ldk/structs/Bolt11ParseError.java @@ -417,7 +417,7 @@ public class Bolt11ParseError extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public boolean eq(org.ldk.structs.Bolt11ParseError b) { - boolean ret = bindings.Bolt11ParseError_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.Bolt11ParseError_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); return ret; diff --git a/src/main/java/org/ldk/structs/Bolt12Invoice.java b/src/main/java/org/ldk/structs/Bolt12Invoice.java index 6f32a09d..77ad79fd 100644 --- a/src/main/java/org/ldk/structs/Bolt12Invoice.java +++ b/src/main/java/org/ldk/structs/Bolt12Invoice.java @@ -102,15 +102,12 @@ public class Bolt12Invoice extends CommonBase { * * [`Offer`]: crate::offers::offer::Offer * [`Offer::amount`]: crate::offers::offer::Offer::amount - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ - @Nullable - public Amount amount() { + public Option_AmountZ amount() { long ret = bindings.Bolt12Invoice_amount(this.ptr); Reference.reachabilityFence(this); if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Amount ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Amount(null, ret); } + org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; return ret_hu_conv; } @@ -142,7 +139,10 @@ public class Bolt12Invoice extends CommonBase { * From [`Offer::description`] or [`Refund::description`]. * * [`Offer::description`]: crate::offers::offer::Offer::description + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ + @Nullable public PrintableString description() { long ret = bindings.Bolt12Invoice_description(this.ptr); Reference.reachabilityFence(this); @@ -215,15 +215,12 @@ public class Bolt12Invoice extends CommonBase { * [`Refund`]. * * [`Offer::supported_quantity`]: crate::offers::offer::Offer::supported_quantity - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ - @Nullable - public Quantity supported_quantity() { + public Option_QuantityZ supported_quantity() { long ret = bindings.Bolt12Invoice_supported_quantity(this.ptr); Reference.reachabilityFence(this); if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Quantity ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Quantity(null, ret); } + org.ldk.structs.Option_QuantityZ ret_hu_conv = org.ldk.structs.Option_QuantityZ.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; return ret_hu_conv; } @@ -386,7 +383,7 @@ public class Bolt12Invoice extends CommonBase { * the associated [`PaymentId`] to use when sending the payment. */ public Result_ThirtyTwoBytesNoneZ verify(org.ldk.structs.ExpandedKey key) { - long ret = bindings.Bolt12Invoice_verify(this.ptr, key == null ? 0 : key.ptr); + long ret = bindings.Bolt12Invoice_verify(this.ptr, key.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(key); if (ret >= 0 && ret <= 4096) { return null; } @@ -395,6 +392,18 @@ public class Bolt12Invoice extends CommonBase { return ret_hu_conv; } + /** + * Generates a non-cryptographic 64-bit hash of the Bolt12Invoice. + */ + public long hash() { + long ret = bindings.Bolt12Invoice_hash(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + @Override public int hashCode() { + return (int)this.hash(); + } /** * Serialize the Bolt12Invoice object into a byte array which can be read by Bolt12Invoice_read */ diff --git a/src/main/java/org/ldk/structs/Bolt12InvoiceFeatures.java b/src/main/java/org/ldk/structs/Bolt12InvoiceFeatures.java index 4cd2230c..6dbd72cc 100644 --- a/src/main/java/org/ldk/structs/Bolt12InvoiceFeatures.java +++ b/src/main/java/org/ldk/structs/Bolt12InvoiceFeatures.java @@ -26,7 +26,7 @@ public class Bolt12InvoiceFeatures extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.Bolt12InvoiceFeatures b) { - boolean ret = bindings.Bolt12InvoiceFeatures_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.Bolt12InvoiceFeatures_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; @@ -82,7 +82,7 @@ public class Bolt12InvoiceFeatures extends CommonBase { * Returns true if this `Features` object contains required features unknown by `other`. */ public boolean requires_unknown_bits_from(org.ldk.structs.Bolt12InvoiceFeatures other) { - boolean ret = bindings.Bolt12InvoiceFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr); + boolean ret = bindings.Bolt12InvoiceFeatures_requires_unknown_bits_from(this.ptr, other.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(other); if (this != null) { this.ptrs_to.add(other); }; diff --git a/src/main/java/org/ldk/structs/Bolt12OfferContext.java b/src/main/java/org/ldk/structs/Bolt12OfferContext.java new file mode 100644 index 00000000..cc84552e --- /dev/null +++ b/src/main/java/org/ldk/structs/Bolt12OfferContext.java @@ -0,0 +1,149 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + + +/** + * The context of a payment made for an invoice requested from a BOLT 12 [`Offer`]. + * + * [`Offer`]: crate::offers::offer::Offer + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class Bolt12OfferContext extends CommonBase { + Bolt12OfferContext(Object _dummy, long ptr) { super(ptr); } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + if (ptr != 0) { bindings.Bolt12OfferContext_free(ptr); } + } + + /** + * The identifier of the [`Offer`]. + * + * [`Offer`]: crate::offers::offer::Offer + */ + public OfferId get_offer_id() { + long ret = bindings.Bolt12OfferContext_get_offer_id(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OfferId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * The identifier of the [`Offer`]. + * + * [`Offer`]: crate::offers::offer::Offer + */ + public void set_offer_id(org.ldk.structs.OfferId val) { + bindings.Bolt12OfferContext_set_offer_id(this.ptr, val.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; + } + + /** + * Fields from an [`InvoiceRequest`] sent for a [`Bolt12Invoice`]. + * + * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest + * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice + */ + public InvoiceRequestFields get_invoice_request() { + long ret = bindings.Bolt12OfferContext_get_invoice_request(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.InvoiceRequestFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InvoiceRequestFields(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Fields from an [`InvoiceRequest`] sent for a [`Bolt12Invoice`]. + * + * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest + * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice + */ + public void set_invoice_request(org.ldk.structs.InvoiceRequestFields val) { + bindings.Bolt12OfferContext_set_invoice_request(this.ptr, val.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; + } + + /** + * Constructs a new Bolt12OfferContext given each field + */ + public static Bolt12OfferContext of(org.ldk.structs.OfferId offer_id_arg, org.ldk.structs.InvoiceRequestFields invoice_request_arg) { + long ret = bindings.Bolt12OfferContext_new(offer_id_arg.ptr, invoice_request_arg.ptr); + Reference.reachabilityFence(offer_id_arg); + Reference.reachabilityFence(invoice_request_arg); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Bolt12OfferContext ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Bolt12OfferContext(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(offer_id_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(invoice_request_arg); }; + return ret_hu_conv; + } + + long clone_ptr() { + long ret = bindings.Bolt12OfferContext_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a copy of the Bolt12OfferContext + */ + public Bolt12OfferContext clone() { + long ret = bindings.Bolt12OfferContext_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Bolt12OfferContext ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Bolt12OfferContext(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Checks if two Bolt12OfferContexts contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ + public boolean eq(org.ldk.structs.Bolt12OfferContext b) { + boolean ret = bindings.Bolt12OfferContext_eq(this.ptr, b.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(b); + if (this != null) { this.ptrs_to.add(b); }; + return ret; + } + + @Override public boolean equals(Object o) { + if (!(o instanceof Bolt12OfferContext)) return false; + return this.eq((Bolt12OfferContext)o); + } + /** + * Serialize the Bolt12OfferContext object into a byte array which can be read by Bolt12OfferContext_read + */ + public byte[] write() { + byte[] ret = bindings.Bolt12OfferContext_write(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Read a Bolt12OfferContext from a byte array, created by Bolt12OfferContext_write + */ + public static Result_Bolt12OfferContextDecodeErrorZ read(byte[] ser) { + long ret = bindings.Bolt12OfferContext_read(ser); + Reference.reachabilityFence(ser); + if (ret >= 0 && ret <= 4096) { return null; } + Result_Bolt12OfferContextDecodeErrorZ ret_hu_conv = Result_Bolt12OfferContextDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/Bolt12RefundContext.java b/src/main/java/org/ldk/structs/Bolt12RefundContext.java new file mode 100644 index 00000000..3fe87913 --- /dev/null +++ b/src/main/java/org/ldk/structs/Bolt12RefundContext.java @@ -0,0 +1,91 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + + +/** + * The context of a payment made for an invoice sent for a BOLT 12 [`Refund`]. + * + * [`Refund`]: crate::offers::refund::Refund + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class Bolt12RefundContext extends CommonBase { + Bolt12RefundContext(Object _dummy, long ptr) { super(ptr); } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + if (ptr != 0) { bindings.Bolt12RefundContext_free(ptr); } + } + + /** + * Constructs a new Bolt12RefundContext given each field + */ + public static Bolt12RefundContext of() { + long ret = bindings.Bolt12RefundContext_new(); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Bolt12RefundContext ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Bolt12RefundContext(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + + long clone_ptr() { + long ret = bindings.Bolt12RefundContext_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a copy of the Bolt12RefundContext + */ + public Bolt12RefundContext clone() { + long ret = bindings.Bolt12RefundContext_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Bolt12RefundContext ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Bolt12RefundContext(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Checks if two Bolt12RefundContexts contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ + public boolean eq(org.ldk.structs.Bolt12RefundContext b) { + boolean ret = bindings.Bolt12RefundContext_eq(this.ptr, b.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(b); + if (this != null) { this.ptrs_to.add(b); }; + return ret; + } + + @Override public boolean equals(Object o) { + if (!(o instanceof Bolt12RefundContext)) return false; + return this.eq((Bolt12RefundContext)o); + } + /** + * Serialize the Bolt12RefundContext object into a byte array which can be read by Bolt12RefundContext_read + */ + public byte[] write() { + byte[] ret = bindings.Bolt12RefundContext_write(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Read a Bolt12RefundContext from a byte array, created by Bolt12RefundContext_write + */ + public static Result_Bolt12RefundContextDecodeErrorZ read(byte[] ser) { + long ret = bindings.Bolt12RefundContext_read(ser); + Reference.reachabilityFence(ser); + if (ret >= 0 && ret <= 4096) { return null; } + Result_Bolt12RefundContextDecodeErrorZ ret_hu_conv = Result_Bolt12RefundContextDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/BumpTransactionEvent.java b/src/main/java/org/ldk/structs/BumpTransactionEvent.java index 0b0b1904..455fb188 100644 --- a/src/main/java/org/ldk/structs/BumpTransactionEvent.java +++ b/src/main/java/org/ldk/structs/BumpTransactionEvent.java @@ -72,6 +72,14 @@ public class BumpTransactionEvent extends CommonBase { * [`build_anchor_input_witness`]: crate::ln::chan_utils::build_anchor_input_witness */ public final static class ChannelClose extends BumpTransactionEvent { + /** + * The `channel_id` of the channel which has been closed. + */ + public final org.ldk.structs.ChannelId channel_id; + /** + * Counterparty in the closed channel. + */ + public final byte[] counterparty_node_id; /** * The unique identifier for the claim of the anchor output in the commitment transaction. * @@ -108,6 +116,11 @@ public class BumpTransactionEvent extends CommonBase { public final HTLCOutputInCommitment[] pending_htlcs; private ChannelClose(long ptr, bindings.LDKBumpTransactionEvent.ChannelClose obj) { super(null, ptr); + long channel_id = obj.channel_id; + org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); } + if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); }; + this.channel_id = channel_id_hu_conv; + this.counterparty_node_id = obj.counterparty_node_id; this.claim_id = obj.claim_id; this.package_target_feerate_sat_per_1000_weight = obj.package_target_feerate_sat_per_1000_weight; this.commitment_tx = obj.commitment_tx; @@ -160,6 +173,14 @@ public class BumpTransactionEvent extends CommonBase { * [`EcdsaChannelSigner::sign_holder_htlc_transaction`]: crate::sign::ecdsa::EcdsaChannelSigner::sign_holder_htlc_transaction */ public final static class HTLCResolution extends BumpTransactionEvent { + /** + * The `channel_id` of the channel which has been closed. + */ + public final org.ldk.structs.ChannelId channel_id; + /** + * Counterparty in the closed channel. + */ + public final byte[] counterparty_node_id; /** * The unique identifier for the claim of the HTLCs in the confirmed commitment * transaction. @@ -184,6 +205,11 @@ public class BumpTransactionEvent extends CommonBase { public final int tx_lock_time; private HTLCResolution(long ptr, bindings.LDKBumpTransactionEvent.HTLCResolution obj) { super(null, ptr); + long channel_id = obj.channel_id; + org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); } + if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); }; + this.channel_id = channel_id_hu_conv; + this.counterparty_node_id = obj.counterparty_node_id; this.claim_id = obj.claim_id; this.target_feerate_sat_per_1000_weight = obj.target_feerate_sat_per_1000_weight; long[] htlc_descriptors = obj.htlc_descriptors; @@ -220,8 +246,10 @@ public class BumpTransactionEvent extends CommonBase { /** * Utility method to constructs a new ChannelClose-variant BumpTransactionEvent */ - public static BumpTransactionEvent channel_close(byte[] claim_id, int package_target_feerate_sat_per_1000_weight, byte[] commitment_tx, long commitment_tx_fee_satoshis, org.ldk.structs.AnchorDescriptor anchor_descriptor, HTLCOutputInCommitment[] pending_htlcs) { - long ret = bindings.BumpTransactionEvent_channel_close(InternalUtils.check_arr_len(claim_id, 32), package_target_feerate_sat_per_1000_weight, commitment_tx, commitment_tx_fee_satoshis, anchor_descriptor == null ? 0 : anchor_descriptor.ptr, pending_htlcs != null ? Arrays.stream(pending_htlcs).mapToLong(pending_htlcs_conv_24 -> pending_htlcs_conv_24 == null ? 0 : pending_htlcs_conv_24.ptr).toArray() : null); + public static BumpTransactionEvent channel_close(org.ldk.structs.ChannelId channel_id, byte[] counterparty_node_id, byte[] claim_id, int package_target_feerate_sat_per_1000_weight, byte[] commitment_tx, long commitment_tx_fee_satoshis, org.ldk.structs.AnchorDescriptor anchor_descriptor, HTLCOutputInCommitment[] pending_htlcs) { + long ret = bindings.BumpTransactionEvent_channel_close(channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), InternalUtils.check_arr_len(claim_id, 32), package_target_feerate_sat_per_1000_weight, commitment_tx, commitment_tx_fee_satoshis, anchor_descriptor.ptr, pending_htlcs != null ? Arrays.stream(pending_htlcs).mapToLong(pending_htlcs_conv_24 -> pending_htlcs_conv_24.ptr).toArray() : null); + Reference.reachabilityFence(channel_id); + Reference.reachabilityFence(counterparty_node_id); Reference.reachabilityFence(claim_id); Reference.reachabilityFence(package_target_feerate_sat_per_1000_weight); Reference.reachabilityFence(commitment_tx); @@ -231,6 +259,7 @@ public class BumpTransactionEvent extends CommonBase { if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.BumpTransactionEvent ret_hu_conv = org.ldk.structs.BumpTransactionEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(anchor_descriptor); }; for (HTLCOutputInCommitment pending_htlcs_conv_24: pending_htlcs) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(pending_htlcs_conv_24); }; }; return ret_hu_conv; @@ -239,8 +268,10 @@ public class BumpTransactionEvent extends CommonBase { /** * Utility method to constructs a new HTLCResolution-variant BumpTransactionEvent */ - public static BumpTransactionEvent htlcresolution(byte[] claim_id, int target_feerate_sat_per_1000_weight, HTLCDescriptor[] htlc_descriptors, int tx_lock_time) { - long ret = bindings.BumpTransactionEvent_htlcresolution(InternalUtils.check_arr_len(claim_id, 32), target_feerate_sat_per_1000_weight, htlc_descriptors != null ? Arrays.stream(htlc_descriptors).mapToLong(htlc_descriptors_conv_16 -> htlc_descriptors_conv_16 == null ? 0 : htlc_descriptors_conv_16.ptr).toArray() : null, tx_lock_time); + public static BumpTransactionEvent htlcresolution(org.ldk.structs.ChannelId channel_id, byte[] counterparty_node_id, byte[] claim_id, int target_feerate_sat_per_1000_weight, HTLCDescriptor[] htlc_descriptors, int tx_lock_time) { + long ret = bindings.BumpTransactionEvent_htlcresolution(channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), InternalUtils.check_arr_len(claim_id, 32), target_feerate_sat_per_1000_weight, htlc_descriptors != null ? Arrays.stream(htlc_descriptors).mapToLong(htlc_descriptors_conv_16 -> htlc_descriptors_conv_16.ptr).toArray() : null, tx_lock_time); + Reference.reachabilityFence(channel_id); + Reference.reachabilityFence(counterparty_node_id); Reference.reachabilityFence(claim_id); Reference.reachabilityFence(target_feerate_sat_per_1000_weight); Reference.reachabilityFence(htlc_descriptors); @@ -248,6 +279,7 @@ public class BumpTransactionEvent extends CommonBase { if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.BumpTransactionEvent ret_hu_conv = org.ldk.structs.BumpTransactionEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id); }; for (HTLCDescriptor htlc_descriptors_conv_16: htlc_descriptors) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(htlc_descriptors_conv_16); }; }; return ret_hu_conv; } @@ -257,7 +289,7 @@ public class BumpTransactionEvent extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public boolean eq(org.ldk.structs.BumpTransactionEvent b) { - boolean ret = bindings.BumpTransactionEvent_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.BumpTransactionEvent_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); return ret; diff --git a/src/main/java/org/ldk/structs/BumpTransactionEventHandler.java b/src/main/java/org/ldk/structs/BumpTransactionEventHandler.java index 75f3cb66..b694a2ea 100644 --- a/src/main/java/org/ldk/structs/BumpTransactionEventHandler.java +++ b/src/main/java/org/ldk/structs/BumpTransactionEventHandler.java @@ -49,7 +49,7 @@ public class BumpTransactionEventHandler extends CommonBase { * Handles all variants of [`BumpTransactionEvent`]. */ public void handle_event(org.ldk.structs.BumpTransactionEvent event) { - bindings.BumpTransactionEventHandler_handle_event(this.ptr, event == null ? 0 : event.ptr); + bindings.BumpTransactionEventHandler_handle_event(this.ptr, event.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(event); } diff --git a/src/main/java/org/ldk/structs/CandidateRouteHop.java b/src/main/java/org/ldk/structs/CandidateRouteHop.java index 90e7d140..60b88565 100644 --- a/src/main/java/org/ldk/structs/CandidateRouteHop.java +++ b/src/main/java/org/ldk/structs/CandidateRouteHop.java @@ -149,7 +149,7 @@ public class CandidateRouteHop extends CommonBase { * Utility method to constructs a new FirstHop-variant CandidateRouteHop */ public static CandidateRouteHop first_hop(org.ldk.structs.FirstHopCandidate a) { - long ret = bindings.CandidateRouteHop_first_hop(a == null ? 0 : a.ptr); + long ret = bindings.CandidateRouteHop_first_hop(a.ptr); Reference.reachabilityFence(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.CandidateRouteHop ret_hu_conv = org.ldk.structs.CandidateRouteHop.constr_from_ptr(ret); @@ -162,7 +162,7 @@ public class CandidateRouteHop extends CommonBase { * Utility method to constructs a new PublicHop-variant CandidateRouteHop */ public static CandidateRouteHop public_hop(org.ldk.structs.PublicHopCandidate a) { - long ret = bindings.CandidateRouteHop_public_hop(a == null ? 0 : a.ptr); + long ret = bindings.CandidateRouteHop_public_hop(a.ptr); Reference.reachabilityFence(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.CandidateRouteHop ret_hu_conv = org.ldk.structs.CandidateRouteHop.constr_from_ptr(ret); @@ -175,7 +175,7 @@ public class CandidateRouteHop extends CommonBase { * Utility method to constructs a new PrivateHop-variant CandidateRouteHop */ public static CandidateRouteHop private_hop(org.ldk.structs.PrivateHopCandidate a) { - long ret = bindings.CandidateRouteHop_private_hop(a == null ? 0 : a.ptr); + long ret = bindings.CandidateRouteHop_private_hop(a.ptr); Reference.reachabilityFence(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.CandidateRouteHop ret_hu_conv = org.ldk.structs.CandidateRouteHop.constr_from_ptr(ret); @@ -188,7 +188,7 @@ public class CandidateRouteHop extends CommonBase { * Utility method to constructs a new Blinded-variant CandidateRouteHop */ public static CandidateRouteHop blinded(org.ldk.structs.BlindedPathCandidate a) { - long ret = bindings.CandidateRouteHop_blinded(a == null ? 0 : a.ptr); + long ret = bindings.CandidateRouteHop_blinded(a.ptr); Reference.reachabilityFence(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.CandidateRouteHop ret_hu_conv = org.ldk.structs.CandidateRouteHop.constr_from_ptr(ret); @@ -201,7 +201,7 @@ public class CandidateRouteHop extends CommonBase { * Utility method to constructs a new OneHopBlinded-variant CandidateRouteHop */ public static CandidateRouteHop one_hop_blinded(org.ldk.structs.OneHopBlindedPathCandidate a) { - long ret = bindings.CandidateRouteHop_one_hop_blinded(a == null ? 0 : a.ptr); + long ret = bindings.CandidateRouteHop_one_hop_blinded(a.ptr); Reference.reachabilityFence(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.CandidateRouteHop ret_hu_conv = org.ldk.structs.CandidateRouteHop.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/ChainMonitor.java b/src/main/java/org/ldk/structs/ChainMonitor.java index e7bfc524..8d68f8f1 100644 --- a/src/main/java/org/ldk/structs/ChainMonitor.java +++ b/src/main/java/org/ldk/structs/ChainMonitor.java @@ -74,7 +74,7 @@ public class ChainMonitor extends CommonBase { * inclusion in the return value. */ public Balance[] get_claimable_balances(ChannelDetails[] ignored_channels) { - long[] ret = bindings.ChainMonitor_get_claimable_balances(this.ptr, ignored_channels != null ? Arrays.stream(ignored_channels).mapToLong(ignored_channels_conv_16 -> ignored_channels_conv_16 == null ? 0 : ignored_channels_conv_16.ptr).toArray() : null); + long[] ret = bindings.ChainMonitor_get_claimable_balances(this.ptr, ignored_channels != null ? Arrays.stream(ignored_channels).mapToLong(ignored_channels_conv_16 -> ignored_channels_conv_16.ptr).toArray() : null); Reference.reachabilityFence(this); Reference.reachabilityFence(ignored_channels); int ret_conv_9_len = ret.length; @@ -97,7 +97,7 @@ public class ChainMonitor extends CommonBase { * indefinitely. */ public Result_LockedChannelMonitorNoneZ get_monitor(org.ldk.structs.OutPoint funding_txo) { - long ret = bindings.ChainMonitor_get_monitor(this.ptr, funding_txo == null ? 0 : funding_txo.ptr); + long ret = bindings.ChainMonitor_get_monitor(this.ptr, funding_txo.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(funding_txo); if (ret >= 0 && ret <= 4096) { return null; } @@ -107,23 +107,23 @@ public class ChainMonitor extends CommonBase { } /** - * Lists the funding outpoint of each [`ChannelMonitor`] being monitored. + * Lists the funding outpoint and channel ID of each [`ChannelMonitor`] being monitored. * * Note that [`ChannelMonitor`]s are not removed when a channel is closed as they are always * monitoring for on-chain state resolutions. */ - public OutPoint[] list_monitors() { + public TwoTuple_OutPointChannelIdZ[] list_monitors() { long[] ret = bindings.ChainMonitor_list_monitors(this.ptr); Reference.reachabilityFence(this); - int ret_conv_10_len = ret.length; - OutPoint[] ret_conv_10_arr = new OutPoint[ret_conv_10_len]; - for (int k = 0; k < ret_conv_10_len; k++) { - long ret_conv_10 = ret[k]; - org.ldk.structs.OutPoint ret_conv_10_hu_conv = null; if (ret_conv_10 < 0 || ret_conv_10 > 4096) { ret_conv_10_hu_conv = new org.ldk.structs.OutPoint(null, ret_conv_10); } - if (ret_conv_10_hu_conv != null) { ret_conv_10_hu_conv.ptrs_to.add(this); }; - ret_conv_10_arr[k] = ret_conv_10_hu_conv; + int ret_conv_29_len = ret.length; + TwoTuple_OutPointChannelIdZ[] ret_conv_29_arr = new TwoTuple_OutPointChannelIdZ[ret_conv_29_len]; + for (int d = 0; d < ret_conv_29_len; d++) { + long ret_conv_29 = ret[d]; + TwoTuple_OutPointChannelIdZ ret_conv_29_hu_conv = new TwoTuple_OutPointChannelIdZ(null, ret_conv_29); + if (ret_conv_29_hu_conv != null) { ret_conv_29_hu_conv.ptrs_to.add(this); }; + ret_conv_29_arr[d] = ret_conv_29_hu_conv; } - return ret_conv_10_arr; + return ret_conv_29_arr; } /** @@ -159,7 +159,7 @@ public class ChainMonitor extends CommonBase { * registered [`ChannelMonitor`]s. */ public Result_NoneAPIErrorZ channel_monitor_updated(org.ldk.structs.OutPoint funding_txo, org.ldk.structs.MonitorUpdateId completed_update_id) { - long ret = bindings.ChainMonitor_channel_monitor_updated(this.ptr, funding_txo == null ? 0 : funding_txo.ptr, completed_update_id == null ? 0 : completed_update_id.ptr); + long ret = bindings.ChainMonitor_channel_monitor_updated(this.ptr, funding_txo.ptr, completed_update_id.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(funding_txo); Reference.reachabilityFence(completed_update_id); @@ -201,6 +201,37 @@ public class ChainMonitor extends CommonBase { Reference.reachabilityFence(this); } + /** + * Triggers rebroadcasts of pending claims from force-closed channels after a transaction + * signature generation failure. + * + * `monitor_opt` can be used as a filter to only trigger them for a specific channel monitor. + * + * Note that monitor_opt (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public void signer_unblocked(@Nullable org.ldk.structs.OutPoint monitor_opt) { + bindings.ChainMonitor_signer_unblocked(this.ptr, monitor_opt == null ? 0 : monitor_opt.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(monitor_opt); + if (this != null) { this.ptrs_to.add(monitor_opt); }; + } + + /** + * Archives fully resolved channel monitors by calling [`Persist::archive_persisted_channel`]. + * + * This is useful for pruning fully resolved monitors from the monitor set and primary + * storage so they are not kept in memory and reloaded on restart. + * + * Should be called occasionally (once every handful of blocks or on startup). + * + * Depending on the implementation of [`Persist::archive_persisted_channel`] the monitor + * data could be moved to an archive location or removed entirely. + */ + public void archive_fully_resolved_channel_monitors() { + bindings.ChainMonitor_archive_fully_resolved_channel_monitors(this.ptr); + Reference.reachabilityFence(this); + } + /** * Constructs a new Listen which calls the relevant methods on this_arg. * This copies the `inner` pointer in this_arg and thus the returned Listen must be freed before this_arg is diff --git a/src/main/java/org/ldk/structs/ChainParameters.java b/src/main/java/org/ldk/structs/ChainParameters.java index 77c65ccd..2518986d 100644 --- a/src/main/java/org/ldk/structs/ChainParameters.java +++ b/src/main/java/org/ldk/structs/ChainParameters.java @@ -62,7 +62,7 @@ public class ChainParameters extends CommonBase { * Used to track on-chain channel funding outputs and send payments with reliable timelocks. */ public void set_best_block(org.ldk.structs.BestBlock val) { - bindings.ChainParameters_set_best_block(this.ptr, val == null ? 0 : val.ptr); + bindings.ChainParameters_set_best_block(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -72,7 +72,7 @@ public class ChainParameters extends CommonBase { * Constructs a new ChainParameters given each field */ public static ChainParameters of(org.ldk.enums.Network network_arg, org.ldk.structs.BestBlock best_block_arg) { - long ret = bindings.ChainParameters_new(network_arg, best_block_arg == null ? 0 : best_block_arg.ptr); + long ret = bindings.ChainParameters_new(network_arg, best_block_arg.ptr); Reference.reachabilityFence(network_arg); Reference.reachabilityFence(best_block_arg); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/src/main/java/org/ldk/structs/ChangeDestinationSource.java b/src/main/java/org/ldk/structs/ChangeDestinationSource.java new file mode 100644 index 00000000..e26ac029 --- /dev/null +++ b/src/main/java/org/ldk/structs/ChangeDestinationSource.java @@ -0,0 +1,78 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + +/** + * A helper trait that describes an on-chain wallet capable of returning a (change) destination + * script. + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class ChangeDestinationSource extends CommonBase { + final bindings.LDKChangeDestinationSource bindings_instance; + ChangeDestinationSource(Object _dummy, long ptr) { super(ptr); bindings_instance = null; } + private ChangeDestinationSource(bindings.LDKChangeDestinationSource arg) { + super(bindings.LDKChangeDestinationSource_new(arg)); + this.ptrs_to.add(arg); + this.bindings_instance = arg; + } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + if (ptr != 0) { bindings.ChangeDestinationSource_free(ptr); } super.finalize(); + } + /** + * Destroys the object, freeing associated resources. After this call, any access + * to this object may result in a SEGFAULT or worse. + * + * You should generally NEVER call this method. You should let the garbage collector + * do this for you when it finalizes objects. However, it may be useful for types + * which represent locks and should be closed immediately to avoid holding locks + * until the GC runs. + */ + public void destroy() { + if (ptr != 0) { bindings.ChangeDestinationSource_free(ptr); } + ptr = 0; + } + public static interface ChangeDestinationSourceInterface { + /** + * Returns a script pubkey which can be used as a change destination for + * [`OutputSpender::spend_spendable_outputs`]. + * + * This method should return a different value each time it is called, to avoid linking + * on-chain funds controlled to the same user. + */ + Result_CVec_u8ZNoneZ get_change_destination_script(); + } + private static class LDKChangeDestinationSourceHolder { ChangeDestinationSource held; } + public static ChangeDestinationSource new_impl(ChangeDestinationSourceInterface arg) { + final LDKChangeDestinationSourceHolder impl_holder = new LDKChangeDestinationSourceHolder(); + impl_holder.held = new ChangeDestinationSource(new bindings.LDKChangeDestinationSource() { + @Override public long get_change_destination_script() { + Result_CVec_u8ZNoneZ ret = arg.get_change_destination_script(); + Reference.reachabilityFence(arg); + long result = ret.clone_ptr(); + return result; + } + }); + return impl_holder.held; + } + /** + * Returns a script pubkey which can be used as a change destination for + * [`OutputSpender::spend_spendable_outputs`]. + * + * This method should return a different value each time it is called, to avoid linking + * on-chain funds controlled to the same user. + */ + public Result_CVec_u8ZNoneZ get_change_destination_script() { + long ret = bindings.ChangeDestinationSource_get_change_destination_script(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_CVec_u8ZNoneZ ret_hu_conv = Result_CVec_u8ZNoneZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/ChannelAnnouncement.java b/src/main/java/org/ldk/structs/ChannelAnnouncement.java index ffac3ff7..b766ee90 100644 --- a/src/main/java/org/ldk/structs/ChannelAnnouncement.java +++ b/src/main/java/org/ldk/structs/ChannelAnnouncement.java @@ -110,7 +110,7 @@ public class ChannelAnnouncement extends CommonBase { * The actual announcement */ public void set_contents(org.ldk.structs.UnsignedChannelAnnouncement val) { - bindings.ChannelAnnouncement_set_contents(this.ptr, val == null ? 0 : val.ptr); + bindings.ChannelAnnouncement_set_contents(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -120,7 +120,7 @@ public class ChannelAnnouncement extends CommonBase { * Constructs a new ChannelAnnouncement given each field */ public static ChannelAnnouncement of(byte[] node_signature_1_arg, byte[] node_signature_2_arg, byte[] bitcoin_signature_1_arg, byte[] bitcoin_signature_2_arg, org.ldk.structs.UnsignedChannelAnnouncement contents_arg) { - long ret = bindings.ChannelAnnouncement_new(InternalUtils.check_arr_len(node_signature_1_arg, 64), InternalUtils.check_arr_len(node_signature_2_arg, 64), InternalUtils.check_arr_len(bitcoin_signature_1_arg, 64), InternalUtils.check_arr_len(bitcoin_signature_2_arg, 64), contents_arg == null ? 0 : contents_arg.ptr); + long ret = bindings.ChannelAnnouncement_new(InternalUtils.check_arr_len(node_signature_1_arg, 64), InternalUtils.check_arr_len(node_signature_2_arg, 64), InternalUtils.check_arr_len(bitcoin_signature_1_arg, 64), InternalUtils.check_arr_len(bitcoin_signature_2_arg, 64), contents_arg.ptr); Reference.reachabilityFence(node_signature_1_arg); Reference.reachabilityFence(node_signature_2_arg); Reference.reachabilityFence(bitcoin_signature_1_arg); @@ -169,7 +169,7 @@ public class ChannelAnnouncement extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.ChannelAnnouncement b) { - boolean ret = bindings.ChannelAnnouncement_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.ChannelAnnouncement_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/ChannelConfig.java b/src/main/java/org/ldk/structs/ChannelConfig.java index 64bed6ed..3ec121ff 100644 --- a/src/main/java/org/ldk/structs/ChannelConfig.java +++ b/src/main/java/org/ldk/structs/ChannelConfig.java @@ -144,13 +144,16 @@ public class ChannelConfig extends CommonBase { } /** - * Limit our total exposure to in-flight HTLCs which are burned to fees as they are too - * small to claim on-chain. + * Limit our total exposure to potential loss to on-chain fees on close, including in-flight + * HTLCs which are burned to fees as they are too small to claim on-chain and fees on + * commitment transaction(s) broadcasted by our counterparty in excess of our own fee estimate. + * + * # HTLC-based Dust Exposure * * When an HTLC present in one of our channels is below a \"dust\" threshold, the HTLC will * not be claimable on-chain, instead being turned into additional miner fees if either * party force-closes the channel. Because the threshold is per-HTLC, our total exposure - * to such payments may be sustantial if there are many dust HTLCs present when the + * to such payments may be substantial if there are many dust HTLCs present when the * channel is force-closed. * * The dust threshold for each HTLC is based on the `dust_limit_satoshis` for each party in a @@ -164,7 +167,37 @@ public class ChannelConfig extends CommonBase { * The selected limit is applied for sent, forwarded, and received HTLCs and limits the total * exposure across all three types per-channel. * - * Default value: [`MaxDustHTLCExposure::FeeRateMultiplier`] with a multiplier of 5000. + * # Transaction Fee Dust Exposure + * + * Further, counterparties broadcasting a commitment transaction in a force-close may result + * in other balance being burned to fees, and thus all fees on commitment and HTLC + * transactions in excess of our local fee estimates are included in the dust calculation. + * + * Because of this, another way to look at this limit is to divide it by 43,000 (or 218,750 + * for non-anchor channels) and see it as the maximum feerate disagreement (in sats/vB) per + * non-dust HTLC we're allowed to have with our peers before risking a force-closure for + * inbound channels. + * + * Thus, for the default value of 10_000 * a current feerate estimate of 10 sat/vB (or 2,500 + * sat/KW), we risk force-closure if we disagree with our peer by: + * `10_000 * 2_500 / 43_000 / (483*2)` = 0.6 sat/vB for anchor channels with 483 HTLCs in + * both directions (the maximum), + * `10_000 * 2_500 / 43_000 / (50*2)` = 5.8 sat/vB for anchor channels with 50 HTLCs in both + * directions (the LDK default max from [`ChannelHandshakeConfig::our_max_accepted_htlcs`]) + * `10_000 * 2_500 / 218_750 / (483*2)` = 0.1 sat/vB for non-anchor channels with 483 HTLCs + * in both directions (the maximum), + * `10_000 * 2_500 / 218_750 / (50*2)` = 1.1 sat/vB for non-anchor channels with 50 HTLCs + * in both (the LDK default maximum from [`ChannelHandshakeConfig::our_max_accepted_htlcs`]) + * + * Note that when using [`MaxDustHTLCExposure::FeeRateMultiplier`] this maximum disagreement + * will scale linearly with increases (or decreases) in the our feerate estimates. Further, + * for anchor channels we expect our counterparty to use a relatively low feerate estimate + * while we use [`ConfirmationTarget::OnChainSweep`] (which should be relatively high) and + * feerate disagreement force-closures should only occur when theirs is higher than ours. + * + * Default value: [`MaxDustHTLCExposure::FeeRateMultiplier`] with a multiplier of 10_000. + * + * [`ConfirmationTarget::OnChainSweep`]: crate::chain::chaininterface::ConfirmationTarget::OnChainSweep */ public MaxDustHTLCExposure get_max_dust_htlc_exposure() { long ret = bindings.ChannelConfig_get_max_dust_htlc_exposure(this.ptr); @@ -176,13 +209,16 @@ public class ChannelConfig extends CommonBase { } /** - * Limit our total exposure to in-flight HTLCs which are burned to fees as they are too - * small to claim on-chain. + * Limit our total exposure to potential loss to on-chain fees on close, including in-flight + * HTLCs which are burned to fees as they are too small to claim on-chain and fees on + * commitment transaction(s) broadcasted by our counterparty in excess of our own fee estimate. + * + * # HTLC-based Dust Exposure * * When an HTLC present in one of our channels is below a \"dust\" threshold, the HTLC will * not be claimable on-chain, instead being turned into additional miner fees if either * party force-closes the channel. Because the threshold is per-HTLC, our total exposure - * to such payments may be sustantial if there are many dust HTLCs present when the + * to such payments may be substantial if there are many dust HTLCs present when the * channel is force-closed. * * The dust threshold for each HTLC is based on the `dust_limit_satoshis` for each party in a @@ -196,7 +232,37 @@ public class ChannelConfig extends CommonBase { * The selected limit is applied for sent, forwarded, and received HTLCs and limits the total * exposure across all three types per-channel. * - * Default value: [`MaxDustHTLCExposure::FeeRateMultiplier`] with a multiplier of 5000. + * # Transaction Fee Dust Exposure + * + * Further, counterparties broadcasting a commitment transaction in a force-close may result + * in other balance being burned to fees, and thus all fees on commitment and HTLC + * transactions in excess of our local fee estimates are included in the dust calculation. + * + * Because of this, another way to look at this limit is to divide it by 43,000 (or 218,750 + * for non-anchor channels) and see it as the maximum feerate disagreement (in sats/vB) per + * non-dust HTLC we're allowed to have with our peers before risking a force-closure for + * inbound channels. + * + * Thus, for the default value of 10_000 * a current feerate estimate of 10 sat/vB (or 2,500 + * sat/KW), we risk force-closure if we disagree with our peer by: + * `10_000 * 2_500 / 43_000 / (483*2)` = 0.6 sat/vB for anchor channels with 483 HTLCs in + * both directions (the maximum), + * `10_000 * 2_500 / 43_000 / (50*2)` = 5.8 sat/vB for anchor channels with 50 HTLCs in both + * directions (the LDK default max from [`ChannelHandshakeConfig::our_max_accepted_htlcs`]) + * `10_000 * 2_500 / 218_750 / (483*2)` = 0.1 sat/vB for non-anchor channels with 483 HTLCs + * in both directions (the maximum), + * `10_000 * 2_500 / 218_750 / (50*2)` = 1.1 sat/vB for non-anchor channels with 50 HTLCs + * in both (the LDK default maximum from [`ChannelHandshakeConfig::our_max_accepted_htlcs`]) + * + * Note that when using [`MaxDustHTLCExposure::FeeRateMultiplier`] this maximum disagreement + * will scale linearly with increases (or decreases) in the our feerate estimates. Further, + * for anchor channels we expect our counterparty to use a relatively low feerate estimate + * while we use [`ConfirmationTarget::OnChainSweep`] (which should be relatively high) and + * feerate disagreement force-closures should only occur when theirs is higher than ours. + * + * Default value: [`MaxDustHTLCExposure::FeeRateMultiplier`] with a multiplier of 10_000. + * + * [`ConfirmationTarget::OnChainSweep`]: crate::chain::chaininterface::ConfirmationTarget::OnChainSweep */ public void set_max_dust_htlc_exposure(org.ldk.structs.MaxDustHTLCExposure val) { bindings.ChannelConfig_set_max_dust_htlc_exposure(this.ptr, val.ptr); @@ -385,7 +451,7 @@ public class ChannelConfig extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.ChannelConfig b) { - boolean ret = bindings.ChannelConfig_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.ChannelConfig_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; @@ -400,7 +466,7 @@ public class ChannelConfig extends CommonBase { * Applies the given [`ChannelConfigUpdate`] as a partial update to the [`ChannelConfig`]. */ public void apply(org.ldk.structs.ChannelConfigUpdate update) { - bindings.ChannelConfig_apply(this.ptr, update == null ? 0 : update.ptr); + bindings.ChannelConfig_apply(this.ptr, update.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(update); if (this != null) { this.ptrs_to.add(update); }; diff --git a/src/main/java/org/ldk/structs/ChannelCounterparty.java b/src/main/java/org/ldk/structs/ChannelCounterparty.java index b19c44a4..7c006220 100644 --- a/src/main/java/org/ldk/structs/ChannelCounterparty.java +++ b/src/main/java/org/ldk/structs/ChannelCounterparty.java @@ -59,7 +59,7 @@ public class ChannelCounterparty extends CommonBase { * many routing-relevant features are present in the init context. */ public void set_features(org.ldk.structs.InitFeatures val) { - bindings.ChannelCounterparty_set_features(this.ptr, val == null ? 0 : val.ptr); + bindings.ChannelCounterparty_set_features(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -178,7 +178,7 @@ public class ChannelCounterparty extends CommonBase { * Note that forwarding_info_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ public static ChannelCounterparty of(byte[] node_id_arg, org.ldk.structs.InitFeatures features_arg, long unspendable_punishment_reserve_arg, @Nullable org.ldk.structs.CounterpartyForwardingInfo forwarding_info_arg, org.ldk.structs.Option_u64Z outbound_htlc_minimum_msat_arg, org.ldk.structs.Option_u64Z outbound_htlc_maximum_msat_arg) { - long ret = bindings.ChannelCounterparty_new(InternalUtils.check_arr_len(node_id_arg, 33), features_arg == null ? 0 : features_arg.ptr, unspendable_punishment_reserve_arg, forwarding_info_arg == null ? 0 : forwarding_info_arg.ptr, outbound_htlc_minimum_msat_arg.ptr, outbound_htlc_maximum_msat_arg.ptr); + long ret = bindings.ChannelCounterparty_new(InternalUtils.check_arr_len(node_id_arg, 33), features_arg.ptr, unspendable_punishment_reserve_arg, forwarding_info_arg == null ? 0 : forwarding_info_arg.ptr, outbound_htlc_minimum_msat_arg.ptr, outbound_htlc_maximum_msat_arg.ptr); Reference.reachabilityFence(node_id_arg); Reference.reachabilityFence(features_arg); Reference.reachabilityFence(unspendable_punishment_reserve_arg); diff --git a/src/main/java/org/ldk/structs/ChannelDerivationParameters.java b/src/main/java/org/ldk/structs/ChannelDerivationParameters.java index 8aba6e0d..93c7a875 100644 --- a/src/main/java/org/ldk/structs/ChannelDerivationParameters.java +++ b/src/main/java/org/ldk/structs/ChannelDerivationParameters.java @@ -74,7 +74,7 @@ public class ChannelDerivationParameters extends CommonBase { * [`ChannelSigner::provide_channel_parameters`]. */ public void set_transaction_parameters(org.ldk.structs.ChannelTransactionParameters val) { - bindings.ChannelDerivationParameters_set_transaction_parameters(this.ptr, val == null ? 0 : val.ptr); + bindings.ChannelDerivationParameters_set_transaction_parameters(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -84,7 +84,7 @@ public class ChannelDerivationParameters extends CommonBase { * Constructs a new ChannelDerivationParameters given each field */ public static ChannelDerivationParameters of(long value_satoshis_arg, byte[] keys_id_arg, org.ldk.structs.ChannelTransactionParameters transaction_parameters_arg) { - long ret = bindings.ChannelDerivationParameters_new(value_satoshis_arg, InternalUtils.check_arr_len(keys_id_arg, 32), transaction_parameters_arg == null ? 0 : transaction_parameters_arg.ptr); + long ret = bindings.ChannelDerivationParameters_new(value_satoshis_arg, InternalUtils.check_arr_len(keys_id_arg, 32), transaction_parameters_arg.ptr); Reference.reachabilityFence(value_satoshis_arg); Reference.reachabilityFence(keys_id_arg); Reference.reachabilityFence(transaction_parameters_arg); @@ -119,7 +119,7 @@ public class ChannelDerivationParameters extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.ChannelDerivationParameters b) { - boolean ret = bindings.ChannelDerivationParameters_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.ChannelDerivationParameters_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/ChannelDetails.java b/src/main/java/org/ldk/structs/ChannelDetails.java index 4ba94a43..c117b601 100644 --- a/src/main/java/org/ldk/structs/ChannelDetails.java +++ b/src/main/java/org/ldk/structs/ChannelDetails.java @@ -26,10 +26,13 @@ public class ChannelDetails extends CommonBase { * Note that this means this value is *not* persistent - it can change once during the * lifetime of the channel. */ - public byte[] get_channel_id() { - byte[] ret = bindings.ChannelDetails_get_channel_id(this.ptr); + public ChannelId get_channel_id() { + long ret = bindings.ChannelDetails_get_channel_id(this.ptr); Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** @@ -38,10 +41,11 @@ public class ChannelDetails extends CommonBase { * Note that this means this value is *not* persistent - it can change once during the * lifetime of the channel. */ - public void set_channel_id(byte[] val) { - bindings.ChannelDetails_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.ChannelDetails_set_channel_id(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** @@ -60,7 +64,7 @@ public class ChannelDetails extends CommonBase { * Parameters which apply to our counterparty. See individual fields for more information. */ public void set_counterparty(org.ldk.structs.ChannelCounterparty val) { - bindings.ChannelDetails_set_counterparty(this.ptr, val == null ? 0 : val.ptr); + bindings.ChannelDetails_set_counterparty(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -70,9 +74,6 @@ public class ChannelDetails extends CommonBase { * The Channel's funding transaction output, if we've negotiated the funding transaction with * our counterparty already. * - * Note that, if this has been set, `channel_id` will be equivalent to - * `funding_txo.unwrap().to_channel_id()`. - * * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ @Nullable @@ -89,9 +90,6 @@ public class ChannelDetails extends CommonBase { * The Channel's funding transaction output, if we've negotiated the funding transaction with * our counterparty already. * - * Note that, if this has been set, `channel_id` will be equivalent to - * `funding_txo.unwrap().to_channel_id()`. - * * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None */ public void set_funding_txo(@Nullable org.ldk.structs.OutPoint val) { @@ -830,63 +828,6 @@ public class ChannelDetails extends CommonBase { if (this != null) { this.ptrs_to.add(val); }; } - /** - * Constructs a new ChannelDetails given each field - * - * Note that funding_txo_arg (or a relevant inner pointer) may be NULL or all-0s to represent None - * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None - * Note that config_arg (or a relevant inner pointer) may be NULL or all-0s to represent None - */ - public static ChannelDetails of(byte[] channel_id_arg, org.ldk.structs.ChannelCounterparty counterparty_arg, @Nullable org.ldk.structs.OutPoint funding_txo_arg, @Nullable org.ldk.structs.ChannelTypeFeatures channel_type_arg, org.ldk.structs.Option_u64Z short_channel_id_arg, org.ldk.structs.Option_u64Z outbound_scid_alias_arg, org.ldk.structs.Option_u64Z inbound_scid_alias_arg, long channel_value_satoshis_arg, org.ldk.structs.Option_u64Z unspendable_punishment_reserve_arg, org.ldk.util.UInt128 user_channel_id_arg, org.ldk.structs.Option_u32Z feerate_sat_per_1000_weight_arg, long balance_msat_arg, long outbound_capacity_msat_arg, long next_outbound_htlc_limit_msat_arg, long next_outbound_htlc_minimum_msat_arg, long inbound_capacity_msat_arg, org.ldk.structs.Option_u32Z confirmations_required_arg, org.ldk.structs.Option_u32Z confirmations_arg, org.ldk.structs.Option_u16Z force_close_spend_delay_arg, boolean is_outbound_arg, boolean is_channel_ready_arg, org.ldk.structs.Option_ChannelShutdownStateZ channel_shutdown_state_arg, boolean is_usable_arg, boolean is_public_arg, org.ldk.structs.Option_u64Z inbound_htlc_minimum_msat_arg, org.ldk.structs.Option_u64Z inbound_htlc_maximum_msat_arg, @Nullable org.ldk.structs.ChannelConfig config_arg) { - long ret = bindings.ChannelDetails_new(InternalUtils.check_arr_len(channel_id_arg, 32), counterparty_arg == null ? 0 : counterparty_arg.ptr, funding_txo_arg == null ? 0 : funding_txo_arg.ptr, channel_type_arg == null ? 0 : channel_type_arg.ptr, short_channel_id_arg.ptr, outbound_scid_alias_arg.ptr, inbound_scid_alias_arg.ptr, channel_value_satoshis_arg, unspendable_punishment_reserve_arg.ptr, user_channel_id_arg.getLEBytes(), feerate_sat_per_1000_weight_arg.ptr, balance_msat_arg, outbound_capacity_msat_arg, next_outbound_htlc_limit_msat_arg, next_outbound_htlc_minimum_msat_arg, inbound_capacity_msat_arg, confirmations_required_arg.ptr, confirmations_arg.ptr, force_close_spend_delay_arg.ptr, is_outbound_arg, is_channel_ready_arg, channel_shutdown_state_arg.ptr, is_usable_arg, is_public_arg, inbound_htlc_minimum_msat_arg.ptr, inbound_htlc_maximum_msat_arg.ptr, config_arg == null ? 0 : config_arg.ptr); - Reference.reachabilityFence(channel_id_arg); - Reference.reachabilityFence(counterparty_arg); - Reference.reachabilityFence(funding_txo_arg); - Reference.reachabilityFence(channel_type_arg); - Reference.reachabilityFence(short_channel_id_arg); - Reference.reachabilityFence(outbound_scid_alias_arg); - Reference.reachabilityFence(inbound_scid_alias_arg); - Reference.reachabilityFence(channel_value_satoshis_arg); - Reference.reachabilityFence(unspendable_punishment_reserve_arg); - Reference.reachabilityFence(user_channel_id_arg); - Reference.reachabilityFence(feerate_sat_per_1000_weight_arg); - Reference.reachabilityFence(balance_msat_arg); - Reference.reachabilityFence(outbound_capacity_msat_arg); - Reference.reachabilityFence(next_outbound_htlc_limit_msat_arg); - Reference.reachabilityFence(next_outbound_htlc_minimum_msat_arg); - Reference.reachabilityFence(inbound_capacity_msat_arg); - Reference.reachabilityFence(confirmations_required_arg); - Reference.reachabilityFence(confirmations_arg); - Reference.reachabilityFence(force_close_spend_delay_arg); - Reference.reachabilityFence(is_outbound_arg); - Reference.reachabilityFence(is_channel_ready_arg); - Reference.reachabilityFence(channel_shutdown_state_arg); - Reference.reachabilityFence(is_usable_arg); - Reference.reachabilityFence(is_public_arg); - Reference.reachabilityFence(inbound_htlc_minimum_msat_arg); - Reference.reachabilityFence(inbound_htlc_maximum_msat_arg); - Reference.reachabilityFence(config_arg); - if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.ChannelDetails ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelDetails(null, ret); } - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(counterparty_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(funding_txo_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_type_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(short_channel_id_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(outbound_scid_alias_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(inbound_scid_alias_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(unspendable_punishment_reserve_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(feerate_sat_per_1000_weight_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(confirmations_required_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(confirmations_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(force_close_spend_delay_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_shutdown_state_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(inbound_htlc_minimum_msat_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(inbound_htlc_maximum_msat_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(config_arg); }; - return ret_hu_conv; - } - long clone_ptr() { long ret = bindings.ChannelDetails_clone_ptr(this.ptr); Reference.reachabilityFence(this); diff --git a/src/main/java/org/ldk/structs/ChannelFeatures.java b/src/main/java/org/ldk/structs/ChannelFeatures.java index b6d24de0..2f05763f 100644 --- a/src/main/java/org/ldk/structs/ChannelFeatures.java +++ b/src/main/java/org/ldk/structs/ChannelFeatures.java @@ -26,7 +26,7 @@ public class ChannelFeatures extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.ChannelFeatures b) { - boolean ret = bindings.ChannelFeatures_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.ChannelFeatures_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; @@ -82,7 +82,7 @@ public class ChannelFeatures extends CommonBase { * Returns true if this `Features` object contains required features unknown by `other`. */ public boolean requires_unknown_bits_from(org.ldk.structs.ChannelFeatures other) { - boolean ret = bindings.ChannelFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr); + boolean ret = bindings.ChannelFeatures_requires_unknown_bits_from(this.ptr, other.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(other); if (this != null) { this.ptrs_to.add(other); }; diff --git a/src/main/java/org/ldk/structs/ChannelId.java b/src/main/java/org/ldk/structs/ChannelId.java new file mode 100644 index 00000000..c5a1644c --- /dev/null +++ b/src/main/java/org/ldk/structs/ChannelId.java @@ -0,0 +1,224 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + + +/** + * A unique 32-byte identifier for a channel. + * Depending on how the ID is generated, several varieties are distinguished + * (but all are stored as 32 bytes): + * _v1_ and _temporary_. + * A _v1_ channel ID is generated based on funding tx outpoint (txid & index). + * A _temporary_ ID is generated randomly. + * (Later revocation-point-based _v2_ is a possibility.) + * The variety (context) is not stored, it is relevant only at creation. + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class ChannelId extends CommonBase { + ChannelId(Object _dummy, long ptr) { super(ptr); } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + if (ptr != 0) { bindings.ChannelId_free(ptr); } + } + + public byte[] get_a() { + byte[] ret = bindings.ChannelId_get_a(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + public void set_a(byte[] val) { + bindings.ChannelId_set_a(this.ptr, InternalUtils.check_arr_len(val, 32)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * Constructs a new ChannelId given each field + */ + public static ChannelId of(byte[] a_arg) { + long ret = bindings.ChannelId_new(InternalUtils.check_arr_len(a_arg, 32)); + Reference.reachabilityFence(a_arg); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + + long clone_ptr() { + long ret = bindings.ChannelId_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a copy of the ChannelId + */ + public ChannelId clone() { + long ret = bindings.ChannelId_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Checks if two ChannelIds contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ + public boolean eq(org.ldk.structs.ChannelId b) { + boolean ret = bindings.ChannelId_eq(this.ptr, b.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(b); + if (this != null) { this.ptrs_to.add(b); }; + return ret; + } + + @Override public boolean equals(Object o) { + if (!(o instanceof ChannelId)) return false; + return this.eq((ChannelId)o); + } + /** + * Generates a non-cryptographic 64-bit hash of the ChannelId. + */ + public long hash() { + long ret = bindings.ChannelId_hash(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + @Override public int hashCode() { + return (int)this.hash(); + } + /** + * Create _v1_ channel ID based on a funding TX ID and output index + */ + public static ChannelId v1_from_funding_txid(byte[] txid, short output_index) { + long ret = bindings.ChannelId_v1_from_funding_txid(InternalUtils.check_arr_len(txid, 32), output_index); + Reference.reachabilityFence(txid); + Reference.reachabilityFence(output_index); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Create _v1_ channel ID from a funding tx outpoint + */ + public static ChannelId v1_from_funding_outpoint(org.ldk.structs.OutPoint outpoint) { + long ret = bindings.ChannelId_v1_from_funding_outpoint(outpoint.ptr); + Reference.reachabilityFence(outpoint); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(outpoint); }; + return ret_hu_conv; + } + + /** + * Create a _temporary_ channel ID randomly, based on an entropy source. + */ + public static ChannelId temporary_from_entropy_source(org.ldk.structs.EntropySource entropy_source) { + long ret = bindings.ChannelId_temporary_from_entropy_source(entropy_source.ptr); + Reference.reachabilityFence(entropy_source); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(entropy_source); }; + return ret_hu_conv; + } + + /** + * Generic constructor; create a new channel ID from the provided data. + * Use a more specific `*_from_*` constructor when possible. + */ + public static ChannelId from_bytes(byte[] data) { + long ret = bindings.ChannelId_from_bytes(InternalUtils.check_arr_len(data, 32)); + Reference.reachabilityFence(data); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Create a channel ID consisting of all-zeros data (e.g. when uninitialized or a placeholder). + */ + public static ChannelId new_zero() { + long ret = bindings.ChannelId_new_zero(); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Check whether ID is consisting of all zeros (uninitialized) + */ + public boolean is_zero() { + boolean ret = bindings.ChannelId_is_zero(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Create _v2_ channel ID by concatenating the holder revocation basepoint with the counterparty + * revocation basepoint and hashing the result. The basepoints will be concatenated in increasing + * sorted order. + */ + public static ChannelId v2_from_revocation_basepoints(org.ldk.structs.RevocationBasepoint ours, org.ldk.structs.RevocationBasepoint theirs) { + long ret = bindings.ChannelId_v2_from_revocation_basepoints(ours.ptr, theirs.ptr); + Reference.reachabilityFence(ours); + Reference.reachabilityFence(theirs); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ours); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(theirs); }; + return ret_hu_conv; + } + + /** + * Create temporary _v2_ channel ID by concatenating a zeroed out basepoint with the holder + * revocation basepoint and hashing the result. + */ + public static ChannelId temporary_v2_from_revocation_basepoint(org.ldk.structs.RevocationBasepoint our_revocation_basepoint) { + long ret = bindings.ChannelId_temporary_v2_from_revocation_basepoint(our_revocation_basepoint.ptr); + Reference.reachabilityFence(our_revocation_basepoint); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(our_revocation_basepoint); }; + return ret_hu_conv; + } + + /** + * Serialize the ChannelId object into a byte array which can be read by ChannelId_read + */ + public byte[] write() { + byte[] ret = bindings.ChannelId_write(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Read a ChannelId from a byte array, created by ChannelId_write + */ + public static Result_ChannelIdDecodeErrorZ read(byte[] ser) { + long ret = bindings.ChannelId_read(ser); + Reference.reachabilityFence(ser); + if (ret >= 0 && ret <= 4096) { return null; } + Result_ChannelIdDecodeErrorZ ret_hu_conv = Result_ChannelIdDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/ChannelInfo.java b/src/main/java/org/ldk/structs/ChannelInfo.java index b00fa3d7..8e74795e 100644 --- a/src/main/java/org/ldk/structs/ChannelInfo.java +++ b/src/main/java/org/ldk/structs/ChannelInfo.java @@ -37,7 +37,7 @@ public class ChannelInfo extends CommonBase { * Protocol features of a channel communicated during its announcement */ public void set_features(org.ldk.structs.ChannelFeatures val) { - bindings.ChannelInfo_set_features(this.ptr, val == null ? 0 : val.ptr); + bindings.ChannelInfo_set_features(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -59,7 +59,7 @@ public class ChannelInfo extends CommonBase { * Source node of the first direction of a channel */ public void set_node_one(org.ldk.structs.NodeId val) { - bindings.ChannelInfo_set_node_one(this.ptr, val == null ? 0 : val.ptr); + bindings.ChannelInfo_set_node_one(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -108,7 +108,7 @@ public class ChannelInfo extends CommonBase { * Source node of the second direction of a channel */ public void set_node_two(org.ldk.structs.NodeId val) { - bindings.ChannelInfo_set_node_two(this.ptr, val == null ? 0 : val.ptr); + bindings.ChannelInfo_set_node_two(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -220,7 +220,7 @@ public class ChannelInfo extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.ChannelInfo b) { - boolean ret = bindings.ChannelInfo_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.ChannelInfo_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/ChannelManager.java b/src/main/java/org/ldk/structs/ChannelManager.java index 31369084..f462ad52 100644 --- a/src/main/java/org/ldk/structs/ChannelManager.java +++ b/src/main/java/org/ldk/structs/ChannelManager.java @@ -9,11 +9,629 @@ import javax.annotation.Nullable; /** - * Manager which keeps track of a number of channels and sends messages to the appropriate - * channel, also tracking HTLC preimages and forwarding onion packets appropriately. + * A lightning node's channel state machine and payment management logic, which facilitates + * sending, forwarding, and receiving payments through lightning channels. * - * Implements [`ChannelMessageHandler`], handling the multi-channel parts and passing things through - * to individual Channels. + * [`ChannelManager`] is parameterized by a number of components to achieve this. + * - [`chain::Watch`] (typically [`ChainMonitor`]) for on-chain monitoring and enforcement of each + * channel + * - [`BroadcasterInterface`] for broadcasting transactions related to opening, funding, and + * closing channels + * - [`EntropySource`] for providing random data needed for cryptographic operations + * - [`NodeSigner`] for cryptographic operations scoped to the node + * - [`SignerProvider`] for providing signers whose operations are scoped to individual channels + * - [`FeeEstimator`] to determine transaction fee rates needed to have a transaction mined in a + * timely manner + * - [`Router`] for finding payment paths when initiating and retrying payments + * - [`Logger`] for logging operational information of varying degrees + * + * Additionally, it implements the following traits: + * - [`ChannelMessageHandler`] to handle off-chain channel activity from peers + * - [`MessageSendEventsProvider`] to similarly send such messages to peers + * - [`OffersMessageHandler`] for BOLT 12 message handling and sending + * - [`EventsProvider`] to generate user-actionable [`Event`]s + * - [`chain::Listen`] and [`chain::Confirm`] for notification of on-chain activity + * + * Thus, [`ChannelManager`] is typically used to parameterize a [`MessageHandler`] and an + * [`OnionMessenger`]. The latter is required to support BOLT 12 functionality. + * + * # `ChannelManager` vs `ChannelMonitor` + * + * It's important to distinguish between the *off-chain* management and *on-chain* enforcement of + * lightning channels. [`ChannelManager`] exchanges messages with peers to manage the off-chain + * state of each channel. During this process, it generates a [`ChannelMonitor`] for each channel + * and a [`ChannelMonitorUpdate`] for each relevant change, notifying its parameterized + * [`chain::Watch`] of them. + * + * An implementation of [`chain::Watch`], such as [`ChainMonitor`], is responsible for aggregating + * these [`ChannelMonitor`]s and applying any [`ChannelMonitorUpdate`]s to them. It then monitors + * for any pertinent on-chain activity, enforcing claims as needed. + * + * This division of off-chain management and on-chain enforcement allows for interesting node + * setups. For instance, on-chain enforcement could be moved to a separate host or have added + * redundancy, possibly as a watchtower. See [`chain::Watch`] for the relevant interface. + * + * # Initialization + * + * Use [`ChannelManager::new`] with the most recent [`BlockHash`] when creating a fresh instance. + * Otherwise, if restarting, construct [`ChannelManagerReadArgs`] with the necessary parameters and + * references to any deserialized [`ChannelMonitor`]s that were previously persisted. Use this to + * deserialize the [`ChannelManager`] and feed it any new chain data since it was last online, as + * detailed in the [`ChannelManagerReadArgs`] documentation. + * + * ``` + * use bitcoin::BlockHash; + * use bitcoin::network::constants::Network; + * use lightning::chain::BestBlock; + * # use lightning::chain::channelmonitor::ChannelMonitor; + * use lightning::ln::channelmanager::{ChainParameters, ChannelManager, ChannelManagerReadArgs}; + * # use lightning::routing::gossip::NetworkGraph; + * use lightning::util::config::UserConfig; + * use lightning::util::ser::ReadableArgs; + * + * # fn read_channel_monitors() -> Vec> { vec![] } + * # fn example< + * # 'a, + * # L: lightning::util::logger::Logger, + * # ES: lightning::sign::EntropySource, + * # S: for <'b> lightning::routing::scoring::LockableScore<'b, ScoreLookUp = SL>, + * # SL: lightning::routing::scoring::ScoreLookUp, + * # SP: Sized, + * # R: lightning::io::Read, + * # >( + * # fee_estimator: &dyn lightning::chain::chaininterface::FeeEstimator, + * # chain_monitor: &dyn lightning::chain::Watch, + * # tx_broadcaster: &dyn lightning::chain::chaininterface::BroadcasterInterface, + * # router: &lightning::routing::router::DefaultRouter<&NetworkGraph<&'a L>, &'a L, &ES, &S, SP, SL>, + * # logger: &L, + * # entropy_source: &ES, + * # node_signer: &dyn lightning::sign::NodeSigner, + * # signer_provider: &lightning::sign::DynSignerProvider, + * # best_block: lightning::chain::BestBlock, + * # current_timestamp: u32, + * # mut reader: R, + * # ) -> Result<(), lightning::ln::msgs::DecodeError> { + * Fresh start with no channels + * let params = ChainParameters { + * network: Network::Bitcoin, + * best_block, + * }; + * let default_config = UserConfig::default(); + * let channel_manager = ChannelManager::new( + * fee_estimator, chain_monitor, tx_broadcaster, router, logger, entropy_source, node_signer, + * signer_provider, default_config, params, current_timestamp + * ); + * + * Restart from deserialized data + * let mut channel_monitors = read_channel_monitors(); + * let args = ChannelManagerReadArgs::new( + * entropy_source, node_signer, signer_provider, fee_estimator, chain_monitor, tx_broadcaster, + * router, logger, default_config, channel_monitors.iter_mut().collect() + * ); + * let (block_hash, channel_manager) = + * <(BlockHash, ChannelManager<_, _, _, _, _, _, _, _>)>::read(&mut reader, args)?; + * + * Update the ChannelManager and ChannelMonitors with the latest chain data + * ... + * + * Move the monitors to the ChannelManager's chain::Watch parameter + * for monitor in channel_monitors { + * chain_monitor.watch_channel(monitor.get_funding_txo().0, monitor); + * } + * # Ok(()) + * # } + * ``` + * + * # Operation + * + * The following is required for [`ChannelManager`] to function properly: + * - Handle messages from peers using its [`ChannelMessageHandler`] implementation (typically + * called by [`PeerManager::read_event`] when processing network I/O) + * - Send messages to peers obtained via its [`MessageSendEventsProvider`] implementation + * (typically initiated when [`PeerManager::process_events`] is called) + * - Feed on-chain activity using either its [`chain::Listen`] or [`chain::Confirm`] implementation + * as documented by those traits + * - Perform any periodic channel and payment checks by calling [`timer_tick_occurred`] roughly + * every minute + * - Persist to disk whenever [`get_and_clear_needs_persistence`] returns `true` using a + * [`Persister`] such as a [`KVStore`] implementation + * - Handle [`Event`]s obtained via its [`EventsProvider`] implementation + * + * The [`Future`] returned by [`get_event_or_persistence_needed_future`] is useful in determining + * when the last two requirements need to be checked. + * + * The [`lightning-block-sync`] and [`lightning-transaction-sync`] crates provide utilities that + * simplify feeding in on-chain activity using the [`chain::Listen`] and [`chain::Confirm`] traits, + * respectively. The remaining requirements can be met using the [`lightning-background-processor`] + * crate. For languages other than Rust, the availability of similar utilities may vary. + * + * # Channels + * + * [`ChannelManager`]'s primary function involves managing a channel state. Without channels, + * payments can't be sent. Use [`list_channels`] or [`list_usable_channels`] for a snapshot of the + * currently open channels. + * + * ``` + * # use lightning::ln::channelmanager::AChannelManager; + * # + * # fn example(channel_manager: T) { + * # let channel_manager = channel_manager.get_cm(); + * let channels = channel_manager.list_usable_channels(); + * for details in channels { + * println!(\"{:?}\", details); + * } + * # } + * ``` + * + * Each channel is identified using a [`ChannelId`], which will change throughout the channel's + * life cycle. Additionally, channels are assigned a `user_channel_id`, which is given in + * [`Event`]s associated with the channel and serves as a fixed identifier but is otherwise unused + * by [`ChannelManager`]. + * + * ## Opening Channels + * + * To an open a channel with a peer, call [`create_channel`]. This will initiate the process of + * opening an outbound channel, which requires self-funding when handling + * [`Event::FundingGenerationReady`]. + * + * ``` + * # use bitcoin::{ScriptBuf, Transaction}; + * # use bitcoin::secp256k1::PublicKey; + * # use lightning::ln::channelmanager::AChannelManager; + * # use lightning::events::{Event, EventsProvider}; + * # + * # trait Wallet { + * # fn create_funding_transaction( + * # &self, _amount_sats: u64, _output_script: ScriptBuf + * # ) -> Transaction; + * # } + * # + * # fn example(channel_manager: T, wallet: W, peer_id: PublicKey) { + * # let channel_manager = channel_manager.get_cm(); + * let value_sats = 1_000_000; + * let push_msats = 10_000_000; + * match channel_manager.create_channel(peer_id, value_sats, push_msats, 42, None, None) { + * Ok(channel_id) => println!(\"Opening channel {}\", channel_id), + * Err(e) => println!(\"Error opening channel: {:?}\", e), + * } + * + * On the event processing thread once the peer has responded + * channel_manager.process_pending_events(&|event| match event { + * Event::FundingGenerationReady { + * temporary_channel_id, counterparty_node_id, channel_value_satoshis, output_script, + * user_channel_id, .. + * } => { + * assert_eq!(user_channel_id, 42); + * let funding_transaction = wallet.create_funding_transaction( + * channel_value_satoshis, output_script + * ); + * match channel_manager.funding_transaction_generated( + * &temporary_channel_id, &counterparty_node_id, funding_transaction + * ) { + * Ok(()) => println!(\"Funding channel {}\", temporary_channel_id), + * Err(e) => println!(\"Error funding channel {}: {:?}\", temporary_channel_id, e), + * } + * }, + * Event::ChannelPending { channel_id, user_channel_id, former_temporary_channel_id, .. } => { + * assert_eq!(user_channel_id, 42); + * println!( + * \"Channel {} now {} pending (funding transaction has been broadcasted)\", channel_id, + * former_temporary_channel_id.unwrap() + * ); + * }, + * Event::ChannelReady { channel_id, user_channel_id, .. } => { + * assert_eq!(user_channel_id, 42); + * println!(\"Channel {} ready\", channel_id); + * }, + * ... + * # _ => {}, + * }); + * # } + * ``` + * + * ## Accepting Channels + * + * Inbound channels are initiated by peers and are automatically accepted unless [`ChannelManager`] + * has [`UserConfig::manually_accept_inbound_channels`] set. In that case, the channel may be + * either accepted or rejected when handling [`Event::OpenChannelRequest`]. + * + * ``` + * # use bitcoin::secp256k1::PublicKey; + * # use lightning::ln::channelmanager::AChannelManager; + * # use lightning::events::{Event, EventsProvider}; + * # + * # fn is_trusted(counterparty_node_id: PublicKey) -> bool { + * # // ... + * # unimplemented!() + * # } + * # + * # fn example(channel_manager: T) { + * # let channel_manager = channel_manager.get_cm(); + * channel_manager.process_pending_events(&|event| match event { + * Event::OpenChannelRequest { temporary_channel_id, counterparty_node_id, .. } => { + * if !is_trusted(counterparty_node_id) { + * match channel_manager.force_close_without_broadcasting_txn( + * &temporary_channel_id, &counterparty_node_id + * ) { + * Ok(()) => println!(\"Rejecting channel {}\", temporary_channel_id), + * Err(e) => println!(\"Error rejecting channel {}: {:?}\", temporary_channel_id, e), + * } + * return; + * } + * + * let user_channel_id = 43; + * match channel_manager.accept_inbound_channel( + * &temporary_channel_id, &counterparty_node_id, user_channel_id + * ) { + * Ok(()) => println!(\"Accepting channel {}\", temporary_channel_id), + * Err(e) => println!(\"Error accepting channel {}: {:?}\", temporary_channel_id, e), + * } + * }, + * ... + * # _ => {}, + * }); + * # } + * ``` + * + * ## Closing Channels + * + * There are two ways to close a channel: either cooperatively using [`close_channel`] or + * unilaterally using [`force_close_broadcasting_latest_txn`]. The former is ideal as it makes for + * lower fees and immediate access to funds. However, the latter may be necessary if the + * counterparty isn't behaving properly or has gone offline. [`Event::ChannelClosed`] is generated + * once the channel has been closed successfully. + * + * ``` + * # use bitcoin::secp256k1::PublicKey; + * # use lightning::ln::types::ChannelId; + * # use lightning::ln::channelmanager::AChannelManager; + * # use lightning::events::{Event, EventsProvider}; + * # + * # fn example( + * # channel_manager: T, channel_id: ChannelId, counterparty_node_id: PublicKey + * # ) { + * # let channel_manager = channel_manager.get_cm(); + * match channel_manager.close_channel(&channel_id, &counterparty_node_id) { + * Ok(()) => println!(\"Closing channel {}\", channel_id), + * Err(e) => println!(\"Error closing channel {}: {:?}\", channel_id, e), + * } + * + * On the event processing thread + * channel_manager.process_pending_events(&|event| match event { + * Event::ChannelClosed { channel_id, user_channel_id, .. } => { + * assert_eq!(user_channel_id, 42); + * println!(\"Channel {} closed\", channel_id); + * }, + * ... + * # _ => {}, + * }); + * # } + * ``` + * + * # Payments + * + * [`ChannelManager`] is responsible for sending, forwarding, and receiving payments through its + * channels. A payment is typically initiated from a [BOLT 11] invoice or a [BOLT 12] offer, though + * spontaneous (i.e., keysend) payments are also possible. Incoming payments don't require + * maintaining any additional state as [`ChannelManager`] can reconstruct the [`PaymentPreimage`] + * from the [`PaymentSecret`]. Sending payments, however, require tracking in order to retry failed + * HTLCs. + * + * After a payment is initiated, it will appear in [`list_recent_payments`] until a short time + * after either an [`Event::PaymentSent`] or [`Event::PaymentFailed`] is handled. Failed HTLCs + * for a payment will be retried according to the payment's [`Retry`] strategy or until + * [`abandon_payment`] is called. + * + * ## BOLT 11 Invoices + * + * The [`lightning-invoice`] crate is useful for creating BOLT 11 invoices. Specifically, use the + * functions in its `utils` module for constructing invoices that are compatible with + * [`ChannelManager`]. These functions serve as a convenience for building invoices with the + * [`PaymentHash`] and [`PaymentSecret`] returned from [`create_inbound_payment`]. To provide your + * own [`PaymentHash`], use [`create_inbound_payment_for_hash`] or the corresponding functions in + * the [`lightning-invoice`] `utils` module. + * + * [`ChannelManager`] generates an [`Event::PaymentClaimable`] once the full payment has been + * received. Call [`claim_funds`] to release the [`PaymentPreimage`], which in turn will result in + * an [`Event::PaymentClaimed`]. + * + * ``` + * # use lightning::events::{Event, EventsProvider, PaymentPurpose}; + * # use lightning::ln::channelmanager::AChannelManager; + * # + * # fn example(channel_manager: T) { + * # let channel_manager = channel_manager.get_cm(); + * Or use utils::create_invoice_from_channelmanager + * let known_payment_hash = match channel_manager.create_inbound_payment( + * Some(10_000_000), 3600, None + * ) { + * Ok((payment_hash, _payment_secret)) => { + * println!(\"Creating inbound payment {}\", payment_hash); + * payment_hash + * }, + * Err(()) => panic!(\"Error creating inbound payment\"), + * }; + * + * On the event processing thread + * channel_manager.process_pending_events(&|event| match event { + * Event::PaymentClaimable { payment_hash, purpose, .. } => match purpose { + * PaymentPurpose::Bolt11InvoicePayment { payment_preimage: Some(payment_preimage), .. } => { + * assert_eq!(payment_hash, known_payment_hash); + * println!(\"Claiming payment {}\", payment_hash); + * channel_manager.claim_funds(payment_preimage); + * }, + * PaymentPurpose::Bolt11InvoicePayment { payment_preimage: None, .. } => { + * println!(\"Unknown payment hash: {}\", payment_hash); + * }, + * PaymentPurpose::SpontaneousPayment(payment_preimage) => { + * assert_ne!(payment_hash, known_payment_hash); + * println!(\"Claiming spontaneous payment {}\", payment_hash); + * channel_manager.claim_funds(payment_preimage); + * }, + * ... + * # _ => {}, + * }, + * Event::PaymentClaimed { payment_hash, amount_msat, .. } => { + * assert_eq!(payment_hash, known_payment_hash); + * println!(\"Claimed {} msats\", amount_msat); + * }, + * ... + * # _ => {}, + * }); + * # } + * ``` + * + * For paying an invoice, [`lightning-invoice`] provides a `payment` module with convenience + * functions for use with [`send_payment`]. + * + * ``` + * # use lightning::events::{Event, EventsProvider}; + * # use lightning::ln::types::PaymentHash; + * # use lightning::ln::channelmanager::{AChannelManager, PaymentId, RecentPaymentDetails, RecipientOnionFields, Retry}; + * # use lightning::routing::router::RouteParameters; + * # + * # fn example( + * # channel_manager: T, payment_hash: PaymentHash, recipient_onion: RecipientOnionFields, + * # route_params: RouteParameters, retry: Retry + * # ) { + * # let channel_manager = channel_manager.get_cm(); + * let (payment_hash, recipient_onion, route_params) = + * payment::payment_parameters_from_invoice(&invoice); + * let payment_id = PaymentId([42; 32]); + * match channel_manager.send_payment( + * payment_hash, recipient_onion, payment_id, route_params, retry + * ) { + * Ok(()) => println!(\"Sending payment with hash {}\", payment_hash), + * Err(e) => println!(\"Failed sending payment with hash {}: {:?}\", payment_hash, e), + * } + * + * let expected_payment_id = payment_id; + * let expected_payment_hash = payment_hash; + * assert!( + * channel_manager.list_recent_payments().iter().find(|details| matches!( + * details, + * RecentPaymentDetails::Pending { + * payment_id: expected_payment_id, + * payment_hash: expected_payment_hash, + * .. + * } + * )).is_some() + * ); + * + * On the event processing thread + * channel_manager.process_pending_events(&|event| match event { + * Event::PaymentSent { payment_hash, .. } => println!(\"Paid {}\", payment_hash), + * Event::PaymentFailed { payment_hash, .. } => println!(\"Failed paying {}\", payment_hash), + * ... + * # _ => {}, + * }); + * # } + * ``` + * + * ## BOLT 12 Offers + * + * The [`offers`] module is useful for creating BOLT 12 offers. An [`Offer`] is a precursor to a + * [`Bolt12Invoice`], which must first be requested by the payer. The interchange of these messages + * as defined in the specification is handled by [`ChannelManager`] and its implementation of + * [`OffersMessageHandler`]. However, this only works with an [`Offer`] created using a builder + * returned by [`create_offer_builder`]. With this approach, BOLT 12 offers and invoices are + * stateless just as BOLT 11 invoices are. + * + * ``` + * # use lightning::events::{Event, EventsProvider, PaymentPurpose}; + * # use lightning::ln::channelmanager::AChannelManager; + * # use lightning::offers::parse::Bolt12SemanticError; + * # + * # fn example(channel_manager: T) -> Result<(), Bolt12SemanticError> { + * # let channel_manager = channel_manager.get_cm(); + * let offer = channel_manager + * .create_offer_builder()? + * # ; + * # // Needed for compiling for c_bindings + * # let builder: lightning::offers::offer::OfferBuilder<_, _> = offer.into(); + * # let offer = builder + * .description(\"coffee\".to_string()) + * .amount_msats(10_000_000) + * .build()?; + * let bech32_offer = offer.to_string(); + * + * On the event processing thread + * channel_manager.process_pending_events(&|event| match event { + * Event::PaymentClaimable { payment_hash, purpose, .. } => match purpose { + * PaymentPurpose::Bolt12OfferPayment { payment_preimage: Some(payment_preimage), .. } => { + * println!(\"Claiming payment {}\", payment_hash); + * channel_manager.claim_funds(payment_preimage); + * }, + * PaymentPurpose::Bolt12OfferPayment { payment_preimage: None, .. } => { + * println!(\"Unknown payment hash: {}\", payment_hash); + * }, + * ... + * # _ => {}, + * }, + * Event::PaymentClaimed { payment_hash, amount_msat, .. } => { + * println!(\"Claimed {} msats\", amount_msat); + * }, + * ... + * # _ => {}, + * }); + * # Ok(()) + * # } + * ``` + * + * Use [`pay_for_offer`] to initiated payment, which sends an [`InvoiceRequest`] for an [`Offer`] + * and pays the [`Bolt12Invoice`] response. In addition to success and failure events, + * [`ChannelManager`] may also generate an [`Event::InvoiceRequestFailed`]. + * + * ``` + * # use lightning::events::{Event, EventsProvider}; + * # use lightning::ln::channelmanager::{AChannelManager, PaymentId, RecentPaymentDetails, Retry}; + * # use lightning::offers::offer::Offer; + * # + * # fn example( + * # channel_manager: T, offer: &Offer, quantity: Option, amount_msats: Option, + * # payer_note: Option, retry: Retry, max_total_routing_fee_msat: Option + * # ) { + * # let channel_manager = channel_manager.get_cm(); + * let payment_id = PaymentId([42; 32]); + * match channel_manager.pay_for_offer( + * offer, quantity, amount_msats, payer_note, payment_id, retry, max_total_routing_fee_msat + * ) { + * Ok(()) => println!(\"Requesting invoice for offer\"), + * Err(e) => println!(\"Unable to request invoice for offer: {:?}\", e), + * } + * + * First the payment will be waiting on an invoice + * let expected_payment_id = payment_id; + * assert!( + * channel_manager.list_recent_payments().iter().find(|details| matches!( + * details, + * RecentPaymentDetails::AwaitingInvoice { payment_id: expected_payment_id } + * )).is_some() + * ); + * + * Once the invoice is received, a payment will be sent + * assert!( + * channel_manager.list_recent_payments().iter().find(|details| matches!( + * details, + * RecentPaymentDetails::Pending { payment_id: expected_payment_id, .. } + * )).is_some() + * ); + * + * On the event processing thread + * channel_manager.process_pending_events(&|event| match event { + * Event::PaymentSent { payment_id: Some(payment_id), .. } => println!(\"Paid {}\", payment_id), + * Event::PaymentFailed { payment_id, .. } => println!(\"Failed paying {}\", payment_id), + * Event::InvoiceRequestFailed { payment_id, .. } => println!(\"Failed paying {}\", payment_id), + * ... + * # _ => {}, + * }); + * # } + * ``` + * + * ## BOLT 12 Refunds + * + * A [`Refund`] is a request for an invoice to be paid. Like *paying* for an [`Offer`], *creating* + * a [`Refund`] involves maintaining state since it represents a future outbound payment. + * Therefore, use [`create_refund_builder`] when creating one, otherwise [`ChannelManager`] will + * refuse to pay any corresponding [`Bolt12Invoice`] that it receives. + * + * ``` + * # use core::time::Duration; + * # use lightning::events::{Event, EventsProvider}; + * # use lightning::ln::channelmanager::{AChannelManager, PaymentId, RecentPaymentDetails, Retry}; + * # use lightning::offers::parse::Bolt12SemanticError; + * # + * # fn example( + * # channel_manager: T, amount_msats: u64, absolute_expiry: Duration, retry: Retry, + * # max_total_routing_fee_msat: Option + * # ) -> Result<(), Bolt12SemanticError> { + * # let channel_manager = channel_manager.get_cm(); + * let payment_id = PaymentId([42; 32]); + * let refund = channel_manager + * .create_refund_builder( + * amount_msats, absolute_expiry, payment_id, retry, max_total_routing_fee_msat + * )? + * # ; + * # // Needed for compiling for c_bindings + * # let builder: lightning::offers::refund::RefundBuilder<_> = refund.into(); + * # let refund = builder + * .description(\"coffee\".to_string()) + * .payer_note(\"refund for order 1234\".to_string()) + * .build()?; + * let bech32_refund = refund.to_string(); + * + * First the payment will be waiting on an invoice + * let expected_payment_id = payment_id; + * assert!( + * channel_manager.list_recent_payments().iter().find(|details| matches!( + * details, + * RecentPaymentDetails::AwaitingInvoice { payment_id: expected_payment_id } + * )).is_some() + * ); + * + * Once the invoice is received, a payment will be sent + * assert!( + * channel_manager.list_recent_payments().iter().find(|details| matches!( + * details, + * RecentPaymentDetails::Pending { payment_id: expected_payment_id, .. } + * )).is_some() + * ); + * + * On the event processing thread + * channel_manager.process_pending_events(&|event| match event { + * Event::PaymentSent { payment_id: Some(payment_id), .. } => println!(\"Paid {}\", payment_id), + * Event::PaymentFailed { payment_id, .. } => println!(\"Failed paying {}\", payment_id), + * ... + * # _ => {}, + * }); + * # Ok(()) + * # } + * ``` + * + * Use [`request_refund_payment`] to send a [`Bolt12Invoice`] for receiving the refund. Similar to + * creating* an [`Offer`], this is stateless as it represents an inbound payment. + * + * ``` + * # use lightning::events::{Event, EventsProvider, PaymentPurpose}; + * # use lightning::ln::channelmanager::AChannelManager; + * # use lightning::offers::refund::Refund; + * # + * # fn example(channel_manager: T, refund: &Refund) { + * # let channel_manager = channel_manager.get_cm(); + * let known_payment_hash = match channel_manager.request_refund_payment(refund) { + * Ok(invoice) => { + * let payment_hash = invoice.payment_hash(); + * println!(\"Requesting refund payment {}\", payment_hash); + * payment_hash + * }, + * Err(e) => panic!(\"Unable to request payment for refund: {:?}\", e), + * }; + * + * On the event processing thread + * channel_manager.process_pending_events(&|event| match event { + * Event::PaymentClaimable { payment_hash, purpose, .. } => match purpose { + * \tPaymentPurpose::Bolt12RefundPayment { payment_preimage: Some(payment_preimage), .. } => { + * assert_eq!(payment_hash, known_payment_hash); + * println!(\"Claiming payment {}\", payment_hash); + * channel_manager.claim_funds(payment_preimage); + * }, + * \tPaymentPurpose::Bolt12RefundPayment { payment_preimage: None, .. } => { + * println!(\"Unknown payment hash: {}\", payment_hash); + * \t}, + * ... + * # _ => {}, + * }, + * Event::PaymentClaimed { payment_hash, amount_msat, .. } => { + * assert_eq!(payment_hash, known_payment_hash); + * println!(\"Claimed {} msats\", amount_msat); + * }, + * ... + * # _ => {}, + * }); + * # } + * ``` + * + * # Persistence * * Implements [`Writeable`] to write out all channel state to disk. Implies [`peer_disconnected`] for * all peers during write/read (though does not modify this instance, only the instance being @@ -34,12 +652,16 @@ import javax.annotation.Nullable; * tells you the last block hash which was connected. You should get the best block tip before using the manager. * See [`chain::Listen`] and [`chain::Confirm`] for more details. * + * # `ChannelUpdate` Messages + * * Note that `ChannelManager` is responsible for tracking liveness of its channels and generating * [`ChannelUpdate`] messages informing peers that the channel is temporarily disabled. To avoid * spam due to quick disconnection/reconnection, updates are not sent until the channel has been * offline for a full minute. In order to track this, you must call * [`timer_tick_occurred`] roughly once per minute, though it doesn't have to be perfect. * + * # DoS Mitigation + * * To avoid trivial DoS issues, `ChannelManager` limits the number of inbound connections and * inbound channels without confirmed funding transactions. This may result in nodes which we do * not have a channel with being unable to connect to us or open new channels with us if we have @@ -49,19 +671,53 @@ import javax.annotation.Nullable; * exempted from the count of unfunded channels. Similarly, outbound channels and connections are * never limited. Please ensure you limit the count of such channels yourself. * + * # Type Aliases + * * Rather than using a plain `ChannelManager`, it is preferable to use either a [`SimpleArcChannelManager`] * a [`SimpleRefChannelManager`], for conciseness. See their documentation for more details, but * essentially you should default to using a [`SimpleRefChannelManager`], and use a * [`SimpleArcChannelManager`] when you require a `ChannelManager` with a static lifetime, such as when * you're using lightning-net-tokio. * + * [`ChainMonitor`]: crate::chain::chainmonitor::ChainMonitor + * [`MessageHandler`]: crate::ln::peer_handler::MessageHandler + * [`OnionMessenger`]: crate::onion_message::messenger::OnionMessenger + * [`PeerManager::read_event`]: crate::ln::peer_handler::PeerManager::read_event + * [`PeerManager::process_events`]: crate::ln::peer_handler::PeerManager::process_events + * [`timer_tick_occurred`]: Self::timer_tick_occurred + * [`get_and_clear_needs_persistence`]: Self::get_and_clear_needs_persistence + * [`Persister`]: crate::util::persist::Persister + * [`KVStore`]: crate::util::persist::KVStore + * [`get_event_or_persistence_needed_future`]: Self::get_event_or_persistence_needed_future + * [`lightning-block-sync`]: https://docs.rs/lightning_block_sync/latest/lightning_block_sync + * [`lightning-transaction-sync`]: https://docs.rs/lightning_transaction_sync/latest/lightning_transaction_sync + * [`lightning-background-processor`]: https://docs.rs/lightning_background_processor/lightning_background_processor + * [`list_channels`]: Self::list_channels + * [`list_usable_channels`]: Self::list_usable_channels + * [`create_channel`]: Self::create_channel + * [`close_channel`]: Self::force_close_broadcasting_latest_txn + * [`force_close_broadcasting_latest_txn`]: Self::force_close_broadcasting_latest_txn + * [BOLT 11]: https://github.com/lightning/bolts/blob/master/11-payment-encoding.md + * [BOLT 12]: https://github.com/rustyrussell/lightning-rfc/blob/guilt/offers/12-offer-encoding.md + * [`list_recent_payments`]: Self::list_recent_payments + * [`abandon_payment`]: Self::abandon_payment + * [`lightning-invoice`]: https://docs.rs/lightning_invoice/latest/lightning_invoice + * [`create_inbound_payment`]: Self::create_inbound_payment + * [`create_inbound_payment_for_hash`]: Self::create_inbound_payment_for_hash + * [`claim_funds`]: Self::claim_funds + * [`send_payment`]: Self::send_payment + * [`offers`]: crate::offers + * [`create_offer_builder`]: Self::create_offer_builder + * [`pay_for_offer`]: Self::pay_for_offer + * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest + * [`create_refund_builder`]: Self::create_refund_builder + * [`request_refund_payment`]: Self::request_refund_payment * [`peer_disconnected`]: msgs::ChannelMessageHandler::peer_disconnected * [`funding_created`]: msgs::FundingCreated * [`funding_transaction_generated`]: Self::funding_transaction_generated * [`BlockHash`]: bitcoin::hash_types::BlockHash * [`update_channel`]: chain::Watch::update_channel * [`ChannelUpdate`]: msgs::ChannelUpdate - * [`timer_tick_occurred`]: Self::timer_tick_occurred * [`read`]: ReadableArgs::read */ @SuppressWarnings("unchecked") // We correctly assign various generic arrays @@ -93,7 +749,7 @@ public class ChannelManager extends CommonBase { * [`params.best_block.block_hash`]: chain::BestBlock::block_hash */ public static ChannelManager of(org.ldk.structs.FeeEstimator fee_est, org.ldk.structs.Watch chain_monitor, org.ldk.structs.BroadcasterInterface tx_broadcaster, org.ldk.structs.Router router, org.ldk.structs.Logger logger, org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.SignerProvider signer_provider, org.ldk.structs.UserConfig config, org.ldk.structs.ChainParameters params, int current_timestamp) { - long ret = bindings.ChannelManager_new(fee_est.ptr, chain_monitor.ptr, tx_broadcaster.ptr, router.ptr, logger.ptr, entropy_source.ptr, node_signer.ptr, signer_provider.ptr, config == null ? 0 : config.ptr, params == null ? 0 : params.ptr, current_timestamp); + long ret = bindings.ChannelManager_new(fee_est.ptr, chain_monitor.ptr, tx_broadcaster.ptr, router.ptr, logger.ptr, entropy_source.ptr, node_signer.ptr, signer_provider.ptr, config.ptr, params.ptr, current_timestamp); Reference.reachabilityFence(fee_est); Reference.reachabilityFence(chain_monitor); Reference.reachabilityFence(tx_broadcaster); @@ -167,10 +823,11 @@ public class ChannelManager extends CommonBase { * [`Event::FundingGenerationReady::temporary_channel_id`]: events::Event::FundingGenerationReady::temporary_channel_id * [`Event::ChannelClosed::channel_id`]: events::Event::ChannelClosed::channel_id * + * Note that temporary_channel_id (or a relevant inner pointer) may be NULL or all-0s to represent None * Note that override_config (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public Result_ThirtyTwoBytesAPIErrorZ create_channel(byte[] their_network_key, long channel_value_satoshis, long push_msat, org.ldk.util.UInt128 user_channel_id, org.ldk.structs.Option_ThirtyTwoBytesZ temporary_channel_id, @Nullable org.ldk.structs.UserConfig override_config) { - long ret = bindings.ChannelManager_create_channel(this.ptr, InternalUtils.check_arr_len(their_network_key, 33), channel_value_satoshis, push_msat, user_channel_id.getLEBytes(), temporary_channel_id.ptr, override_config == null ? 0 : override_config.ptr); + public Result_ChannelIdAPIErrorZ create_channel(byte[] their_network_key, long channel_value_satoshis, long push_msat, org.ldk.util.UInt128 user_channel_id, @Nullable org.ldk.structs.ChannelId temporary_channel_id, @Nullable org.ldk.structs.UserConfig override_config) { + long ret = bindings.ChannelManager_create_channel(this.ptr, InternalUtils.check_arr_len(their_network_key, 33), channel_value_satoshis, push_msat, user_channel_id.getLEBytes(), temporary_channel_id == null ? 0 : temporary_channel_id.ptr, override_config == null ? 0 : override_config.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(their_network_key); Reference.reachabilityFence(channel_value_satoshis); @@ -179,7 +836,7 @@ public class ChannelManager extends CommonBase { Reference.reachabilityFence(temporary_channel_id); Reference.reachabilityFence(override_config); if (ret >= 0 && ret <= 4096) { return null; } - Result_ThirtyTwoBytesAPIErrorZ ret_hu_conv = Result_ThirtyTwoBytesAPIErrorZ.constr_from_ptr(ret); + Result_ChannelIdAPIErrorZ ret_hu_conv = Result_ChannelIdAPIErrorZ.constr_from_ptr(ret); if (this != null) { this.ptrs_to.add(temporary_channel_id); }; if (this != null) { this.ptrs_to.add(override_config); }; return ret_hu_conv; @@ -292,13 +949,14 @@ public class ChannelManager extends CommonBase { * [`NonAnchorChannelFee`]: crate::chain::chaininterface::ConfirmationTarget::NonAnchorChannelFee * [`SendShutdown`]: crate::events::MessageSendEvent::SendShutdown */ - public Result_NoneAPIErrorZ close_channel(byte[] channel_id, byte[] counterparty_node_id) { - long ret = bindings.ChannelManager_close_channel(this.ptr, InternalUtils.check_arr_len(channel_id, 32), InternalUtils.check_arr_len(counterparty_node_id, 33)); + public Result_NoneAPIErrorZ close_channel(org.ldk.structs.ChannelId channel_id, byte[] counterparty_node_id) { + long ret = bindings.ChannelManager_close_channel(this.ptr, channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33)); Reference.reachabilityFence(this); Reference.reachabilityFence(channel_id); Reference.reachabilityFence(counterparty_node_id); if (ret >= 0 && ret <= 4096) { return null; } Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.add(channel_id); }; return ret_hu_conv; } @@ -335,8 +993,8 @@ public class ChannelManager extends CommonBase { * * Note that shutdown_script (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public Result_NoneAPIErrorZ close_channel_with_feerate_and_script(byte[] channel_id, byte[] counterparty_node_id, org.ldk.structs.Option_u32Z target_feerate_sats_per_1000_weight, @Nullable org.ldk.structs.ShutdownScript shutdown_script) { - long ret = bindings.ChannelManager_close_channel_with_feerate_and_script(this.ptr, InternalUtils.check_arr_len(channel_id, 32), InternalUtils.check_arr_len(counterparty_node_id, 33), target_feerate_sats_per_1000_weight.ptr, shutdown_script == null ? 0 : shutdown_script.ptr); + public Result_NoneAPIErrorZ close_channel_with_feerate_and_script(org.ldk.structs.ChannelId channel_id, byte[] counterparty_node_id, org.ldk.structs.Option_u32Z target_feerate_sats_per_1000_weight, @Nullable org.ldk.structs.ShutdownScript shutdown_script) { + long ret = bindings.ChannelManager_close_channel_with_feerate_and_script(this.ptr, channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), target_feerate_sats_per_1000_weight.ptr, shutdown_script == null ? 0 : shutdown_script.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(channel_id); Reference.reachabilityFence(counterparty_node_id); @@ -344,6 +1002,7 @@ public class ChannelManager extends CommonBase { Reference.reachabilityFence(shutdown_script); if (ret >= 0 && ret <= 4096) { return null; } Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.add(channel_id); }; if (this != null) { this.ptrs_to.add(target_feerate_sats_per_1000_weight); }; if (this != null) { this.ptrs_to.add(shutdown_script); }; return ret_hu_conv; @@ -355,13 +1014,14 @@ public class ChannelManager extends CommonBase { * the manager, or if the `counterparty_node_id` isn't the counterparty of the corresponding * channel. */ - public Result_NoneAPIErrorZ force_close_broadcasting_latest_txn(byte[] channel_id, byte[] counterparty_node_id) { - long ret = bindings.ChannelManager_force_close_broadcasting_latest_txn(this.ptr, InternalUtils.check_arr_len(channel_id, 32), InternalUtils.check_arr_len(counterparty_node_id, 33)); + public Result_NoneAPIErrorZ force_close_broadcasting_latest_txn(org.ldk.structs.ChannelId channel_id, byte[] counterparty_node_id) { + long ret = bindings.ChannelManager_force_close_broadcasting_latest_txn(this.ptr, channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33)); Reference.reachabilityFence(this); Reference.reachabilityFence(channel_id); Reference.reachabilityFence(counterparty_node_id); if (ret >= 0 && ret <= 4096) { return null; } Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.add(channel_id); }; return ret_hu_conv; } @@ -370,16 +1030,17 @@ public class ChannelManager extends CommonBase { * the latest local transaction(s). Fails if `channel_id` is unknown to the manager, or if the * `counterparty_node_id` isn't the counterparty of the corresponding channel. * - * You can always get the latest local transaction(s) to broadcast from - * [`ChannelMonitor::get_latest_holder_commitment_txn`]. + * You can always broadcast the latest local transaction(s) via + * [`ChannelMonitor::broadcast_latest_holder_commitment_txn`]. */ - public Result_NoneAPIErrorZ force_close_without_broadcasting_txn(byte[] channel_id, byte[] counterparty_node_id) { - long ret = bindings.ChannelManager_force_close_without_broadcasting_txn(this.ptr, InternalUtils.check_arr_len(channel_id, 32), InternalUtils.check_arr_len(counterparty_node_id, 33)); + public Result_NoneAPIErrorZ force_close_without_broadcasting_txn(org.ldk.structs.ChannelId channel_id, byte[] counterparty_node_id) { + long ret = bindings.ChannelManager_force_close_without_broadcasting_txn(this.ptr, channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33)); Reference.reachabilityFence(this); Reference.reachabilityFence(channel_id); Reference.reachabilityFence(counterparty_node_id); if (ret >= 0 && ret <= 4096) { return null; } Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.add(channel_id); }; return ret_hu_conv; } @@ -455,7 +1116,7 @@ public class ChannelManager extends CommonBase { * [`ChannelMonitorUpdateStatus::InProgress`]: crate::chain::ChannelMonitorUpdateStatus::InProgress */ public Result_NonePaymentSendFailureZ send_payment_with_route(org.ldk.structs.Route route, byte[] payment_hash, org.ldk.structs.RecipientOnionFields recipient_onion, byte[] payment_id) { - long ret = bindings.ChannelManager_send_payment_with_route(this.ptr, route == null ? 0 : route.ptr, InternalUtils.check_arr_len(payment_hash, 32), recipient_onion == null ? 0 : recipient_onion.ptr, InternalUtils.check_arr_len(payment_id, 32)); + long ret = bindings.ChannelManager_send_payment_with_route(this.ptr, route.ptr, InternalUtils.check_arr_len(payment_hash, 32), recipient_onion.ptr, InternalUtils.check_arr_len(payment_id, 32)); Reference.reachabilityFence(this); Reference.reachabilityFence(route); Reference.reachabilityFence(payment_hash); @@ -473,7 +1134,7 @@ public class ChannelManager extends CommonBase { * `route_params` and retry failed payment paths based on `retry_strategy`. */ public Result_NoneRetryableSendFailureZ send_payment(byte[] payment_hash, org.ldk.structs.RecipientOnionFields recipient_onion, byte[] payment_id, org.ldk.structs.RouteParameters route_params, org.ldk.structs.Retry retry_strategy) { - long ret = bindings.ChannelManager_send_payment(this.ptr, InternalUtils.check_arr_len(payment_hash, 32), recipient_onion == null ? 0 : recipient_onion.ptr, InternalUtils.check_arr_len(payment_id, 32), route_params == null ? 0 : route_params.ptr, retry_strategy.ptr); + long ret = bindings.ChannelManager_send_payment(this.ptr, InternalUtils.check_arr_len(payment_hash, 32), recipient_onion.ptr, InternalUtils.check_arr_len(payment_id, 32), route_params.ptr, retry_strategy.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(payment_hash); Reference.reachabilityFence(recipient_onion); @@ -539,7 +1200,7 @@ public class ChannelManager extends CommonBase { * [`send_payment`]: Self::send_payment */ public Result_ThirtyTwoBytesPaymentSendFailureZ send_spontaneous_payment(org.ldk.structs.Route route, org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage, org.ldk.structs.RecipientOnionFields recipient_onion, byte[] payment_id) { - long ret = bindings.ChannelManager_send_spontaneous_payment(this.ptr, route == null ? 0 : route.ptr, payment_preimage.ptr, recipient_onion == null ? 0 : recipient_onion.ptr, InternalUtils.check_arr_len(payment_id, 32)); + long ret = bindings.ChannelManager_send_spontaneous_payment(this.ptr, route.ptr, payment_preimage.ptr, recipient_onion.ptr, InternalUtils.check_arr_len(payment_id, 32)); Reference.reachabilityFence(this); Reference.reachabilityFence(route); Reference.reachabilityFence(payment_preimage); @@ -563,7 +1224,7 @@ public class ChannelManager extends CommonBase { * [`PaymentParameters::for_keysend`]: crate::routing::router::PaymentParameters::for_keysend */ public Result_ThirtyTwoBytesRetryableSendFailureZ send_spontaneous_payment_with_retry(org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage, org.ldk.structs.RecipientOnionFields recipient_onion, byte[] payment_id, org.ldk.structs.RouteParameters route_params, org.ldk.structs.Retry retry_strategy) { - long ret = bindings.ChannelManager_send_spontaneous_payment_with_retry(this.ptr, payment_preimage.ptr, recipient_onion == null ? 0 : recipient_onion.ptr, InternalUtils.check_arr_len(payment_id, 32), route_params == null ? 0 : route_params.ptr, retry_strategy.ptr); + long ret = bindings.ChannelManager_send_spontaneous_payment_with_retry(this.ptr, payment_preimage.ptr, recipient_onion.ptr, InternalUtils.check_arr_len(payment_id, 32), route_params.ptr, retry_strategy.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(payment_preimage); Reference.reachabilityFence(recipient_onion); @@ -585,7 +1246,7 @@ public class ChannelManager extends CommonBase { * us to easily discern them from real payments. */ public Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ send_probe(org.ldk.structs.Path path) { - long ret = bindings.ChannelManager_send_probe(this.ptr, path == null ? 0 : path.ptr); + long ret = bindings.ChannelManager_send_probe(this.ptr, path.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(path); if (ret >= 0 && ret <= 4096) { return null; } @@ -630,7 +1291,7 @@ public class ChannelManager extends CommonBase { * probes. If `None` is given as `liquidity_limit_multiplier`, it defaults to `3`. */ public Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ send_preflight_probes(org.ldk.structs.RouteParameters route_params, org.ldk.structs.Option_u64Z liquidity_limit_multiplier) { - long ret = bindings.ChannelManager_send_preflight_probes(this.ptr, route_params == null ? 0 : route_params.ptr, liquidity_limit_multiplier.ptr); + long ret = bindings.ChannelManager_send_preflight_probes(this.ptr, route_params.ptr, liquidity_limit_multiplier.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(route_params); Reference.reachabilityFence(liquidity_limit_multiplier); @@ -673,14 +1334,15 @@ public class ChannelManager extends CommonBase { * [`Event::FundingGenerationReady`]: crate::events::Event::FundingGenerationReady * [`Event::ChannelClosed`]: crate::events::Event::ChannelClosed */ - public Result_NoneAPIErrorZ funding_transaction_generated(byte[] temporary_channel_id, byte[] counterparty_node_id, byte[] funding_transaction) { - long ret = bindings.ChannelManager_funding_transaction_generated(this.ptr, InternalUtils.check_arr_len(temporary_channel_id, 32), InternalUtils.check_arr_len(counterparty_node_id, 33), funding_transaction); + public Result_NoneAPIErrorZ funding_transaction_generated(org.ldk.structs.ChannelId temporary_channel_id, byte[] counterparty_node_id, byte[] funding_transaction) { + long ret = bindings.ChannelManager_funding_transaction_generated(this.ptr, temporary_channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), funding_transaction); Reference.reachabilityFence(this); Reference.reachabilityFence(temporary_channel_id); Reference.reachabilityFence(counterparty_node_id); Reference.reachabilityFence(funding_transaction); if (ret >= 0 && ret <= 4096) { return null; } Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.add(temporary_channel_id); }; return ret_hu_conv; } @@ -696,8 +1358,8 @@ public class ChannelManager extends CommonBase { * * If there is an error, all channels in the batch are to be considered closed. */ - public Result_NoneAPIErrorZ batch_funding_transaction_generated(TwoTuple_ThirtyTwoBytesPublicKeyZ[] temporary_channels, byte[] funding_transaction) { - long ret = bindings.ChannelManager_batch_funding_transaction_generated(this.ptr, temporary_channels != null ? Arrays.stream(temporary_channels).mapToLong(temporary_channels_conv_35 -> temporary_channels_conv_35 != null ? temporary_channels_conv_35.ptr : 0).toArray() : null, funding_transaction); + public Result_NoneAPIErrorZ batch_funding_transaction_generated(TwoTuple_ChannelIdPublicKeyZ[] temporary_channels, byte[] funding_transaction) { + long ret = bindings.ChannelManager_batch_funding_transaction_generated(this.ptr, temporary_channels != null ? Arrays.stream(temporary_channels).mapToLong(temporary_channels_conv_30 -> temporary_channels_conv_30.ptr).toArray() : null, funding_transaction); Reference.reachabilityFence(this); Reference.reachabilityFence(temporary_channels); Reference.reachabilityFence(funding_transaction); @@ -730,14 +1392,15 @@ public class ChannelManager extends CommonBase { * [`ChannelUnavailable`]: APIError::ChannelUnavailable * [`APIMisuseError`]: APIError::APIMisuseError */ - public Result_NoneAPIErrorZ update_partial_channel_config(byte[] counterparty_node_id, byte[][] channel_ids, org.ldk.structs.ChannelConfigUpdate config_update) { - long ret = bindings.ChannelManager_update_partial_channel_config(this.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), channel_ids != null ? Arrays.stream(channel_ids).map(channel_ids_conv_8 -> InternalUtils.check_arr_len(channel_ids_conv_8, 32)).toArray(byte[][]::new) : null, config_update == null ? 0 : config_update.ptr); + public Result_NoneAPIErrorZ update_partial_channel_config(byte[] counterparty_node_id, ChannelId[] channel_ids, org.ldk.structs.ChannelConfigUpdate config_update) { + long ret = bindings.ChannelManager_update_partial_channel_config(this.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), channel_ids != null ? Arrays.stream(channel_ids).mapToLong(channel_ids_conv_11 -> channel_ids_conv_11.ptr).toArray() : null, config_update.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(counterparty_node_id); Reference.reachabilityFence(channel_ids); Reference.reachabilityFence(config_update); if (ret >= 0 && ret <= 4096) { return null; } Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret); + for (ChannelId channel_ids_conv_11: channel_ids) { if (this != null) { this.ptrs_to.add(channel_ids_conv_11); }; }; if (this != null) { this.ptrs_to.add(config_update); }; return ret_hu_conv; } @@ -766,14 +1429,15 @@ public class ChannelManager extends CommonBase { * [`ChannelUnavailable`]: APIError::ChannelUnavailable * [`APIMisuseError`]: APIError::APIMisuseError */ - public Result_NoneAPIErrorZ update_channel_config(byte[] counterparty_node_id, byte[][] channel_ids, org.ldk.structs.ChannelConfig config) { - long ret = bindings.ChannelManager_update_channel_config(this.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), channel_ids != null ? Arrays.stream(channel_ids).map(channel_ids_conv_8 -> InternalUtils.check_arr_len(channel_ids_conv_8, 32)).toArray(byte[][]::new) : null, config == null ? 0 : config.ptr); + public Result_NoneAPIErrorZ update_channel_config(byte[] counterparty_node_id, ChannelId[] channel_ids, org.ldk.structs.ChannelConfig config) { + long ret = bindings.ChannelManager_update_channel_config(this.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), channel_ids != null ? Arrays.stream(channel_ids).mapToLong(channel_ids_conv_11 -> channel_ids_conv_11.ptr).toArray() : null, config.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(counterparty_node_id); Reference.reachabilityFence(channel_ids); Reference.reachabilityFence(config); if (ret >= 0 && ret <= 4096) { return null; } Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret); + for (ChannelId channel_ids_conv_11: channel_ids) { if (this != null) { this.ptrs_to.add(channel_ids_conv_11); }; }; if (this != null) { this.ptrs_to.add(config); }; return ret_hu_conv; } @@ -803,8 +1467,8 @@ public class ChannelManager extends CommonBase { * [`HTLCIntercepted`]: events::Event::HTLCIntercepted * [`HTLCIntercepted::expected_outbound_amount_msat`]: events::Event::HTLCIntercepted::expected_outbound_amount_msat */ - public Result_NoneAPIErrorZ forward_intercepted_htlc(byte[] intercept_id, byte[] next_hop_channel_id, byte[] next_node_id, long amt_to_forward_msat) { - long ret = bindings.ChannelManager_forward_intercepted_htlc(this.ptr, InternalUtils.check_arr_len(intercept_id, 32), InternalUtils.check_arr_len(next_hop_channel_id, 32), InternalUtils.check_arr_len(next_node_id, 33), amt_to_forward_msat); + public Result_NoneAPIErrorZ forward_intercepted_htlc(byte[] intercept_id, org.ldk.structs.ChannelId next_hop_channel_id, byte[] next_node_id, long amt_to_forward_msat) { + long ret = bindings.ChannelManager_forward_intercepted_htlc(this.ptr, InternalUtils.check_arr_len(intercept_id, 32), next_hop_channel_id.ptr, InternalUtils.check_arr_len(next_node_id, 33), amt_to_forward_msat); Reference.reachabilityFence(this); Reference.reachabilityFence(intercept_id); Reference.reachabilityFence(next_hop_channel_id); @@ -812,6 +1476,7 @@ public class ChannelManager extends CommonBase { Reference.reachabilityFence(amt_to_forward_msat); if (ret >= 0 && ret <= 4096) { return null; } Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.add(next_hop_channel_id); }; return ret_hu_conv; } @@ -983,14 +1648,15 @@ public class ChannelManager extends CommonBase { * [`Event::OpenChannelRequest`]: events::Event::OpenChannelRequest * [`Event::ChannelClosed::user_channel_id`]: events::Event::ChannelClosed::user_channel_id */ - public Result_NoneAPIErrorZ accept_inbound_channel(byte[] temporary_channel_id, byte[] counterparty_node_id, org.ldk.util.UInt128 user_channel_id) { - long ret = bindings.ChannelManager_accept_inbound_channel(this.ptr, InternalUtils.check_arr_len(temporary_channel_id, 32), InternalUtils.check_arr_len(counterparty_node_id, 33), user_channel_id.getLEBytes()); + public Result_NoneAPIErrorZ accept_inbound_channel(org.ldk.structs.ChannelId temporary_channel_id, byte[] counterparty_node_id, org.ldk.util.UInt128 user_channel_id) { + long ret = bindings.ChannelManager_accept_inbound_channel(this.ptr, temporary_channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), user_channel_id.getLEBytes()); Reference.reachabilityFence(this); Reference.reachabilityFence(temporary_channel_id); Reference.reachabilityFence(counterparty_node_id); Reference.reachabilityFence(user_channel_id); if (ret >= 0 && ret <= 4096) { return null; } Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.add(temporary_channel_id); }; return ret_hu_conv; } @@ -1014,14 +1680,113 @@ public class ChannelManager extends CommonBase { * [`Event::OpenChannelRequest`]: events::Event::OpenChannelRequest * [`Event::ChannelClosed::user_channel_id`]: events::Event::ChannelClosed::user_channel_id */ - public Result_NoneAPIErrorZ accept_inbound_channel_from_trusted_peer_0conf(byte[] temporary_channel_id, byte[] counterparty_node_id, org.ldk.util.UInt128 user_channel_id) { - long ret = bindings.ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(this.ptr, InternalUtils.check_arr_len(temporary_channel_id, 32), InternalUtils.check_arr_len(counterparty_node_id, 33), user_channel_id.getLEBytes()); + public Result_NoneAPIErrorZ accept_inbound_channel_from_trusted_peer_0conf(org.ldk.structs.ChannelId temporary_channel_id, byte[] counterparty_node_id, org.ldk.util.UInt128 user_channel_id) { + long ret = bindings.ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(this.ptr, temporary_channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), user_channel_id.getLEBytes()); Reference.reachabilityFence(this); Reference.reachabilityFence(temporary_channel_id); Reference.reachabilityFence(counterparty_node_id); Reference.reachabilityFence(user_channel_id); if (ret >= 0 && ret <= 4096) { return null; } Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.add(temporary_channel_id); }; + return ret_hu_conv; + } + + /** + * Creates an [`OfferBuilder`] such that the [`Offer`] it builds is recognized by the + * [`ChannelManager`] when handling [`InvoiceRequest`] messages for the offer. The offer will + * not have an expiration unless otherwise set on the builder. + * + * # Privacy + * + * Uses [`MessageRouter::create_blinded_paths`] to construct a [`BlindedPath`] for the offer. + * However, if one is not found, uses a one-hop [`BlindedPath`] with + * [`ChannelManager::get_our_node_id`] as the introduction node instead. In the latter case, + * the node must be announced, otherwise, there is no way to find a path to the introduction in + * order to send the [`InvoiceRequest`]. + * + * Also, uses a derived signing pubkey in the offer for recipient privacy. + * + * # Limitations + * + * Requires a direct connection to the introduction node in the responding [`InvoiceRequest`]'s + * reply path. + * + * # Errors + * + * Errors if the parameterized [`Router`] is unable to create a blinded path for the offer. + * + * [`Offer`]: crate::offers::offer::Offer + * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest + */ + public Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ create_offer_builder() { + long ret = bindings.ChannelManager_create_offer_builder(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Creates a [`RefundBuilder`] such that the [`Refund`] it builds is recognized by the + * [`ChannelManager`] when handling [`Bolt12Invoice`] messages for the refund. + * + * # Payment + * + * The provided `payment_id` is used to ensure that only one invoice is paid for the refund. + * See [Avoiding Duplicate Payments] for other requirements once the payment has been sent. + * + * The builder will have the provided expiration set. Any changes to the expiration on the + * returned builder will not be honored by [`ChannelManager`]. For `no-std`, the highest seen + * block time minus two hours is used for the current time when determining if the refund has + * expired. + * + * To revoke the refund, use [`ChannelManager::abandon_payment`] prior to receiving the + * invoice. If abandoned, or an invoice isn't received before expiration, the payment will fail + * with an [`Event::InvoiceRequestFailed`]. + * + * If `max_total_routing_fee_msat` is not specified, The default from + * [`RouteParameters::from_payment_params_and_value`] is applied. + * + * # Privacy + * + * Uses [`MessageRouter::create_blinded_paths`] to construct a [`BlindedPath`] for the refund. + * However, if one is not found, uses a one-hop [`BlindedPath`] with + * [`ChannelManager::get_our_node_id`] as the introduction node instead. In the latter case, + * the node must be announced, otherwise, there is no way to find a path to the introduction in + * order to send the [`Bolt12Invoice`]. + * + * Also, uses a derived payer id in the refund for payer privacy. + * + * # Limitations + * + * Requires a direct connection to an introduction node in the responding + * [`Bolt12Invoice::payment_paths`]. + * + * # Errors + * + * Errors if: + * - a duplicate `payment_id` is provided given the caveats in the aforementioned link, + * - `amount_msats` is invalid, or + * - the parameterized [`Router`] is unable to create a blinded path for the refund. + * + * [`Refund`]: crate::offers::refund::Refund + * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice + * [`Bolt12Invoice::payment_paths`]: crate::offers::invoice::Bolt12Invoice::payment_paths + * [Avoiding Duplicate Payments]: #avoiding-duplicate-payments + */ + public Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ create_refund_builder(long amount_msats, long absolute_expiry, byte[] payment_id, org.ldk.structs.Retry retry_strategy, org.ldk.structs.Option_u64Z max_total_routing_fee_msat) { + long ret = bindings.ChannelManager_create_refund_builder(this.ptr, amount_msats, absolute_expiry, InternalUtils.check_arr_len(payment_id, 32), retry_strategy.ptr, max_total_routing_fee_msat.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(amount_msats); + Reference.reachabilityFence(absolute_expiry); + Reference.reachabilityFence(payment_id); + Reference.reachabilityFence(retry_strategy); + Reference.reachabilityFence(max_total_routing_fee_msat); + if (ret >= 0 && ret <= 4096) { return null; } + Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.add(retry_strategy); }; + if (this != null) { this.ptrs_to.add(max_total_routing_fee_msat); }; return ret_hu_conv; } @@ -1069,6 +1834,7 @@ public class ChannelManager extends CommonBase { * Errors if: * - a duplicate `payment_id` is provided given the caveats in the aforementioned link, * - the provided parameters are invalid for the offer, + * - the offer is for an unsupported chain, or * - the parameterized [`Router`] is unable to create a blinded reply path for the invoice * request. * @@ -1081,7 +1847,7 @@ public class ChannelManager extends CommonBase { * [Avoiding Duplicate Payments]: #avoiding-duplicate-payments */ public Result_NoneBolt12SemanticErrorZ pay_for_offer(org.ldk.structs.Offer offer, org.ldk.structs.Option_u64Z quantity, org.ldk.structs.Option_u64Z amount_msats, org.ldk.structs.Option_StrZ payer_note, byte[] payment_id, org.ldk.structs.Retry retry_strategy, org.ldk.structs.Option_u64Z max_total_routing_fee_msat) { - long ret = bindings.ChannelManager_pay_for_offer(this.ptr, offer == null ? 0 : offer.ptr, quantity.ptr, amount_msats.ptr, payer_note.ptr, InternalUtils.check_arr_len(payment_id, 32), retry_strategy.ptr, max_total_routing_fee_msat.ptr); + long ret = bindings.ChannelManager_pay_for_offer(this.ptr, offer.ptr, quantity.ptr, amount_msats.ptr, payer_note.ptr, InternalUtils.check_arr_len(payment_id, 32), retry_strategy.ptr, max_total_routing_fee_msat.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(offer); Reference.reachabilityFence(quantity); @@ -1107,7 +1873,7 @@ public class ChannelManager extends CommonBase { * * The resulting invoice uses a [`PaymentHash`] recognized by the [`ChannelManager`] and a * [`BlindedPath`] containing the [`PaymentSecret`] needed to reconstruct the corresponding - * [`PaymentPreimage`]. + * [`PaymentPreimage`]. It is returned purely for informational purposes. * * # Limitations * @@ -1118,17 +1884,19 @@ public class ChannelManager extends CommonBase { * * # Errors * - * Errors if the parameterized [`Router`] is unable to create a blinded payment path or reply - * path for the invoice. + * Errors if: + * - the refund is for an unsupported chain, or + * - the parameterized [`Router`] is unable to create a blinded payment path or reply path for + * the invoice. * * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice */ - public Result_NoneBolt12SemanticErrorZ request_refund_payment(org.ldk.structs.Refund refund) { - long ret = bindings.ChannelManager_request_refund_payment(this.ptr, refund == null ? 0 : refund.ptr); + public Result_Bolt12InvoiceBolt12SemanticErrorZ request_refund_payment(org.ldk.structs.Refund refund) { + long ret = bindings.ChannelManager_request_refund_payment(this.ptr, refund.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(refund); if (ret >= 0 && ret <= 4096) { return null; } - Result_NoneBolt12SemanticErrorZ ret_hu_conv = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret); + Result_Bolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_Bolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret); if (this != null) { this.ptrs_to.add(refund); }; return ret_hu_conv; } @@ -1140,10 +1908,9 @@ public class ChannelManager extends CommonBase { * This differs from [`create_inbound_payment_for_hash`] only in that it generates the * [`PaymentHash`] and [`PaymentPreimage`] for you. * - * The [`PaymentPreimage`] will ultimately be returned to you in the [`PaymentClaimable`], which - * will have the [`PaymentClaimable::purpose`] be [`PaymentPurpose::InvoicePayment`] with - * its [`PaymentPurpose::InvoicePayment::payment_preimage`] field filled in. That should then be - * passed directly to [`claim_funds`]. + * The [`PaymentPreimage`] will ultimately be returned to you in the [`PaymentClaimable`] event, which + * will have the [`PaymentClaimable::purpose`] return `Some` for [`PaymentPurpose::preimage`]. That + * should then be passed directly to [`claim_funds`]. * * See [`create_inbound_payment_for_hash`] for detailed documentation on behavior and requirements. * @@ -1163,8 +1930,7 @@ public class ChannelManager extends CommonBase { * [`claim_funds`]: Self::claim_funds * [`PaymentClaimable`]: events::Event::PaymentClaimable * [`PaymentClaimable::purpose`]: events::Event::PaymentClaimable::purpose - * [`PaymentPurpose::InvoicePayment`]: events::PaymentPurpose::InvoicePayment - * [`PaymentPurpose::InvoicePayment::payment_preimage`]: events::PaymentPurpose::InvoicePayment::payment_preimage + * [`PaymentPurpose::preimage`]: events::PaymentPurpose::preimage * [`create_inbound_payment_for_hash`]: Self::create_inbound_payment_for_hash */ public Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ create_inbound_payment(org.ldk.structs.Option_u64Z min_value_msat, int invoice_expiry_delta_secs, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) { @@ -1384,6 +2150,9 @@ public class ChannelManager extends CommonBase { /** * Returns true if this [`ChannelManager`] needs to be persisted. + * + * See [`Self::get_event_or_persistence_needed_future`] for retrieving a [`Future`] that + * indicates this should be checked. */ public boolean get_and_clear_needs_persistence() { boolean ret = bindings.ChannelManager_get_and_clear_needs_persistence(this.ptr); @@ -1482,6 +2251,19 @@ public class ChannelManager extends CommonBase { return ret_hu_conv; } + /** + * Constructs a new NodeIdLookUp which calls the relevant methods on this_arg. + * This copies the `inner` pointer in this_arg and thus the returned NodeIdLookUp must be freed before this_arg is + */ + public NodeIdLookUp as_NodeIdLookUp() { + long ret = bindings.ChannelManager_as_NodeIdLookUp(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + NodeIdLookUp ret_hu_conv = new NodeIdLookUp(null, ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + /** * Serialize the ChannelManager object into a byte array which can be read by ChannelManager_read */ diff --git a/src/main/java/org/ldk/structs/ChannelManagerReadArgs.java b/src/main/java/org/ldk/structs/ChannelManagerReadArgs.java index 95703760..614f0825 100644 --- a/src/main/java/org/ldk/structs/ChannelManagerReadArgs.java +++ b/src/main/java/org/ldk/structs/ChannelManagerReadArgs.java @@ -273,7 +273,7 @@ public class ChannelManagerReadArgs extends CommonBase { * runtime settings which were stored when the ChannelManager was serialized. */ public void set_default_config(org.ldk.structs.UserConfig val) { - bindings.ChannelManagerReadArgs_set_default_config(this.ptr, val == null ? 0 : val.ptr); + bindings.ChannelManagerReadArgs_set_default_config(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -285,7 +285,7 @@ public class ChannelManagerReadArgs extends CommonBase { * populate a HashMap directly from C. */ public static ChannelManagerReadArgs of(org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.SignerProvider signer_provider, org.ldk.structs.FeeEstimator fee_estimator, org.ldk.structs.Watch chain_monitor, org.ldk.structs.BroadcasterInterface tx_broadcaster, org.ldk.structs.Router router, org.ldk.structs.Logger logger, org.ldk.structs.UserConfig default_config, ChannelMonitor[] channel_monitors) { - long ret = bindings.ChannelManagerReadArgs_new(entropy_source.ptr, node_signer.ptr, signer_provider.ptr, fee_estimator.ptr, chain_monitor.ptr, tx_broadcaster.ptr, router.ptr, logger.ptr, default_config == null ? 0 : default_config.ptr, channel_monitors != null ? Arrays.stream(channel_monitors).mapToLong(channel_monitors_conv_16 -> channel_monitors_conv_16 == null ? 0 : channel_monitors_conv_16.ptr).toArray() : null); + long ret = bindings.ChannelManagerReadArgs_new(entropy_source.ptr, node_signer.ptr, signer_provider.ptr, fee_estimator.ptr, chain_monitor.ptr, tx_broadcaster.ptr, router.ptr, logger.ptr, default_config.ptr, channel_monitors != null ? Arrays.stream(channel_monitors).mapToLong(channel_monitors_conv_16 -> channel_monitors_conv_16.ptr).toArray() : null); Reference.reachabilityFence(entropy_source); Reference.reachabilityFence(node_signer); Reference.reachabilityFence(signer_provider); diff --git a/src/main/java/org/ldk/structs/ChannelMessageHandler.java b/src/main/java/org/ldk/structs/ChannelMessageHandler.java index c815ecdb..3b16cb18 100644 --- a/src/main/java/org/ldk/structs/ChannelMessageHandler.java +++ b/src/main/java/org/ldk/structs/ChannelMessageHandler.java @@ -81,18 +81,6 @@ public class ChannelMessageHandler extends CommonBase { * Handle an incoming `stfu` message from the given peer. */ void handle_stfu(byte[] their_node_id, Stfu msg); - /** - * Handle an incoming `splice` message from the given peer. - */ - void handle_splice(byte[] their_node_id, Splice msg); - /** - * Handle an incoming `splice_ack` message from the given peer. - */ - void handle_splice_ack(byte[] their_node_id, SpliceAck msg); - /** - * Handle an incoming `splice_locked` message from the given peer. - */ - void handle_splice_locked(byte[] their_node_id, SpliceLocked msg); /** * Handle an incoming `tx_add_input message` from the given peer. */ @@ -261,21 +249,6 @@ public class ChannelMessageHandler extends CommonBase { arg.handle_stfu(their_node_id, msg_hu_conv); Reference.reachabilityFence(arg); } - @Override public void handle_splice(byte[] their_node_id, long msg) { - org.ldk.structs.Splice msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.Splice(null, msg); } - arg.handle_splice(their_node_id, msg_hu_conv); - Reference.reachabilityFence(arg); - } - @Override public void handle_splice_ack(byte[] their_node_id, long msg) { - org.ldk.structs.SpliceAck msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.SpliceAck(null, msg); } - arg.handle_splice_ack(their_node_id, msg_hu_conv); - Reference.reachabilityFence(arg); - } - @Override public void handle_splice_locked(byte[] their_node_id, long msg) { - org.ldk.structs.SpliceLocked msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.SpliceLocked(null, msg); } - arg.handle_splice_locked(their_node_id, msg_hu_conv); - Reference.reachabilityFence(arg); - } @Override public void handle_tx_add_input(byte[] their_node_id, long msg) { org.ldk.structs.TxAddInput msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.TxAddInput(null, msg); } arg.handle_tx_add_input(their_node_id, msg_hu_conv); @@ -369,7 +342,7 @@ public class ChannelMessageHandler extends CommonBase { org.ldk.structs.Init msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.Init(null, msg); } Result_NoneNoneZ ret = arg.peer_connected(their_node_id, msg_hu_conv, inbound); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public void handle_channel_reestablish(byte[] their_node_id, long msg) { @@ -390,19 +363,19 @@ public class ChannelMessageHandler extends CommonBase { @Override public long provided_node_features() { NodeFeatures ret = arg.provided_node_features(); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long provided_init_features(byte[] their_node_id) { InitFeatures ret = arg.provided_init_features(their_node_id); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long get_chain_hashes() { Option_CVec_ThirtyTwoBytesZZ ret = arg.get_chain_hashes(); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); if (impl_holder.held != null) { impl_holder.held.ptrs_to.add(ret); }; return result; } @@ -423,7 +396,7 @@ public class ChannelMessageHandler extends CommonBase { * Handle an incoming `open_channel` message from the given peer. */ public void handle_open_channel(byte[] their_node_id, org.ldk.structs.OpenChannel msg) { - bindings.ChannelMessageHandler_handle_open_channel(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_open_channel(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(msg); @@ -434,7 +407,7 @@ public class ChannelMessageHandler extends CommonBase { * Handle an incoming `open_channel2` message from the given peer. */ public void handle_open_channel_v2(byte[] their_node_id, org.ldk.structs.OpenChannelV2 msg) { - bindings.ChannelMessageHandler_handle_open_channel_v2(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_open_channel_v2(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(msg); @@ -445,7 +418,7 @@ public class ChannelMessageHandler extends CommonBase { * Handle an incoming `accept_channel` message from the given peer. */ public void handle_accept_channel(byte[] their_node_id, org.ldk.structs.AcceptChannel msg) { - bindings.ChannelMessageHandler_handle_accept_channel(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_accept_channel(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(msg); @@ -456,7 +429,7 @@ public class ChannelMessageHandler extends CommonBase { * Handle an incoming `accept_channel2` message from the given peer. */ public void handle_accept_channel_v2(byte[] their_node_id, org.ldk.structs.AcceptChannelV2 msg) { - bindings.ChannelMessageHandler_handle_accept_channel_v2(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_accept_channel_v2(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(msg); @@ -467,7 +440,7 @@ public class ChannelMessageHandler extends CommonBase { * Handle an incoming `funding_created` message from the given peer. */ public void handle_funding_created(byte[] their_node_id, org.ldk.structs.FundingCreated msg) { - bindings.ChannelMessageHandler_handle_funding_created(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_funding_created(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(msg); @@ -478,7 +451,7 @@ public class ChannelMessageHandler extends CommonBase { * Handle an incoming `funding_signed` message from the given peer. */ public void handle_funding_signed(byte[] their_node_id, org.ldk.structs.FundingSigned msg) { - bindings.ChannelMessageHandler_handle_funding_signed(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_funding_signed(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(msg); @@ -489,7 +462,7 @@ public class ChannelMessageHandler extends CommonBase { * Handle an incoming `channel_ready` message from the given peer. */ public void handle_channel_ready(byte[] their_node_id, org.ldk.structs.ChannelReady msg) { - bindings.ChannelMessageHandler_handle_channel_ready(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_channel_ready(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(msg); @@ -500,7 +473,7 @@ public class ChannelMessageHandler extends CommonBase { * Handle an incoming `shutdown` message from the given peer. */ public void handle_shutdown(byte[] their_node_id, org.ldk.structs.Shutdown msg) { - bindings.ChannelMessageHandler_handle_shutdown(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_shutdown(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(msg); @@ -511,7 +484,7 @@ public class ChannelMessageHandler extends CommonBase { * Handle an incoming `closing_signed` message from the given peer. */ public void handle_closing_signed(byte[] their_node_id, org.ldk.structs.ClosingSigned msg) { - bindings.ChannelMessageHandler_handle_closing_signed(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_closing_signed(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(msg); @@ -522,40 +495,7 @@ public class ChannelMessageHandler extends CommonBase { * Handle an incoming `stfu` message from the given peer. */ public void handle_stfu(byte[] their_node_id, org.ldk.structs.Stfu msg) { - bindings.ChannelMessageHandler_handle_stfu(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); - Reference.reachabilityFence(this); - Reference.reachabilityFence(their_node_id); - Reference.reachabilityFence(msg); - if (this != null) { this.ptrs_to.add(msg); }; - } - - /** - * Handle an incoming `splice` message from the given peer. - */ - public void handle_splice(byte[] their_node_id, org.ldk.structs.Splice msg) { - bindings.ChannelMessageHandler_handle_splice(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); - Reference.reachabilityFence(this); - Reference.reachabilityFence(their_node_id); - Reference.reachabilityFence(msg); - if (this != null) { this.ptrs_to.add(msg); }; - } - - /** - * Handle an incoming `splice_ack` message from the given peer. - */ - public void handle_splice_ack(byte[] their_node_id, org.ldk.structs.SpliceAck msg) { - bindings.ChannelMessageHandler_handle_splice_ack(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); - Reference.reachabilityFence(this); - Reference.reachabilityFence(their_node_id); - Reference.reachabilityFence(msg); - if (this != null) { this.ptrs_to.add(msg); }; - } - - /** - * Handle an incoming `splice_locked` message from the given peer. - */ - public void handle_splice_locked(byte[] their_node_id, org.ldk.structs.SpliceLocked msg) { - bindings.ChannelMessageHandler_handle_splice_locked(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_stfu(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(msg); @@ -566,7 +506,7 @@ public class ChannelMessageHandler extends CommonBase { * Handle an incoming `tx_add_input message` from the given peer. */ public void handle_tx_add_input(byte[] their_node_id, org.ldk.structs.TxAddInput msg) { - bindings.ChannelMessageHandler_handle_tx_add_input(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_tx_add_input(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(msg); @@ -577,7 +517,7 @@ public class ChannelMessageHandler extends CommonBase { * Handle an incoming `tx_add_output` message from the given peer. */ public void handle_tx_add_output(byte[] their_node_id, org.ldk.structs.TxAddOutput msg) { - bindings.ChannelMessageHandler_handle_tx_add_output(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_tx_add_output(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(msg); @@ -588,7 +528,7 @@ public class ChannelMessageHandler extends CommonBase { * Handle an incoming `tx_remove_input` message from the given peer. */ public void handle_tx_remove_input(byte[] their_node_id, org.ldk.structs.TxRemoveInput msg) { - bindings.ChannelMessageHandler_handle_tx_remove_input(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_tx_remove_input(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(msg); @@ -599,7 +539,7 @@ public class ChannelMessageHandler extends CommonBase { * Handle an incoming `tx_remove_output` message from the given peer. */ public void handle_tx_remove_output(byte[] their_node_id, org.ldk.structs.TxRemoveOutput msg) { - bindings.ChannelMessageHandler_handle_tx_remove_output(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_tx_remove_output(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(msg); @@ -610,7 +550,7 @@ public class ChannelMessageHandler extends CommonBase { * Handle an incoming `tx_complete message` from the given peer. */ public void handle_tx_complete(byte[] their_node_id, org.ldk.structs.TxComplete msg) { - bindings.ChannelMessageHandler_handle_tx_complete(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_tx_complete(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(msg); @@ -621,7 +561,7 @@ public class ChannelMessageHandler extends CommonBase { * Handle an incoming `tx_signatures` message from the given peer. */ public void handle_tx_signatures(byte[] their_node_id, org.ldk.structs.TxSignatures msg) { - bindings.ChannelMessageHandler_handle_tx_signatures(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_tx_signatures(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(msg); @@ -632,7 +572,7 @@ public class ChannelMessageHandler extends CommonBase { * Handle an incoming `tx_init_rbf` message from the given peer. */ public void handle_tx_init_rbf(byte[] their_node_id, org.ldk.structs.TxInitRbf msg) { - bindings.ChannelMessageHandler_handle_tx_init_rbf(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_tx_init_rbf(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(msg); @@ -643,7 +583,7 @@ public class ChannelMessageHandler extends CommonBase { * Handle an incoming `tx_ack_rbf` message from the given peer. */ public void handle_tx_ack_rbf(byte[] their_node_id, org.ldk.structs.TxAckRbf msg) { - bindings.ChannelMessageHandler_handle_tx_ack_rbf(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_tx_ack_rbf(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(msg); @@ -654,7 +594,7 @@ public class ChannelMessageHandler extends CommonBase { * Handle an incoming `tx_abort message` from the given peer. */ public void handle_tx_abort(byte[] their_node_id, org.ldk.structs.TxAbort msg) { - bindings.ChannelMessageHandler_handle_tx_abort(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_tx_abort(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(msg); @@ -665,7 +605,7 @@ public class ChannelMessageHandler extends CommonBase { * Handle an incoming `update_add_htlc` message from the given peer. */ public void handle_update_add_htlc(byte[] their_node_id, org.ldk.structs.UpdateAddHTLC msg) { - bindings.ChannelMessageHandler_handle_update_add_htlc(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_update_add_htlc(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(msg); @@ -676,7 +616,7 @@ public class ChannelMessageHandler extends CommonBase { * Handle an incoming `update_fulfill_htlc` message from the given peer. */ public void handle_update_fulfill_htlc(byte[] their_node_id, org.ldk.structs.UpdateFulfillHTLC msg) { - bindings.ChannelMessageHandler_handle_update_fulfill_htlc(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_update_fulfill_htlc(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(msg); @@ -687,7 +627,7 @@ public class ChannelMessageHandler extends CommonBase { * Handle an incoming `update_fail_htlc` message from the given peer. */ public void handle_update_fail_htlc(byte[] their_node_id, org.ldk.structs.UpdateFailHTLC msg) { - bindings.ChannelMessageHandler_handle_update_fail_htlc(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_update_fail_htlc(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(msg); @@ -698,7 +638,7 @@ public class ChannelMessageHandler extends CommonBase { * Handle an incoming `update_fail_malformed_htlc` message from the given peer. */ public void handle_update_fail_malformed_htlc(byte[] their_node_id, org.ldk.structs.UpdateFailMalformedHTLC msg) { - bindings.ChannelMessageHandler_handle_update_fail_malformed_htlc(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_update_fail_malformed_htlc(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(msg); @@ -709,7 +649,7 @@ public class ChannelMessageHandler extends CommonBase { * Handle an incoming `commitment_signed` message from the given peer. */ public void handle_commitment_signed(byte[] their_node_id, org.ldk.structs.CommitmentSigned msg) { - bindings.ChannelMessageHandler_handle_commitment_signed(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_commitment_signed(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(msg); @@ -720,7 +660,7 @@ public class ChannelMessageHandler extends CommonBase { * Handle an incoming `revoke_and_ack` message from the given peer. */ public void handle_revoke_and_ack(byte[] their_node_id, org.ldk.structs.RevokeAndACK msg) { - bindings.ChannelMessageHandler_handle_revoke_and_ack(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_revoke_and_ack(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(msg); @@ -731,7 +671,7 @@ public class ChannelMessageHandler extends CommonBase { * Handle an incoming `update_fee` message from the given peer. */ public void handle_update_fee(byte[] their_node_id, org.ldk.structs.UpdateFee msg) { - bindings.ChannelMessageHandler_handle_update_fee(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_update_fee(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(msg); @@ -742,7 +682,7 @@ public class ChannelMessageHandler extends CommonBase { * Handle an incoming `announcement_signatures` message from the given peer. */ public void handle_announcement_signatures(byte[] their_node_id, org.ldk.structs.AnnouncementSignatures msg) { - bindings.ChannelMessageHandler_handle_announcement_signatures(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_announcement_signatures(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(msg); @@ -766,7 +706,7 @@ public class ChannelMessageHandler extends CommonBase { * message handlers may still wish to communicate with this peer. */ public Result_NoneNoneZ peer_connected(byte[] their_node_id, org.ldk.structs.Init msg, boolean inbound) { - long ret = bindings.ChannelMessageHandler_peer_connected(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr, inbound); + long ret = bindings.ChannelMessageHandler_peer_connected(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr, inbound); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(msg); @@ -781,7 +721,7 @@ public class ChannelMessageHandler extends CommonBase { * Handle an incoming `channel_reestablish` message from the given peer. */ public void handle_channel_reestablish(byte[] their_node_id, org.ldk.structs.ChannelReestablish msg) { - bindings.ChannelMessageHandler_handle_channel_reestablish(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_channel_reestablish(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(msg); @@ -792,7 +732,7 @@ public class ChannelMessageHandler extends CommonBase { * Handle an incoming `channel_update` message from the given peer. */ public void handle_channel_update(byte[] their_node_id, org.ldk.structs.ChannelUpdate msg) { - bindings.ChannelMessageHandler_handle_channel_update(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_channel_update(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(msg); @@ -803,7 +743,7 @@ public class ChannelMessageHandler extends CommonBase { * Handle an incoming `error` message from the given peer. */ public void handle_error(byte[] their_node_id, org.ldk.structs.ErrorMessage msg) { - bindings.ChannelMessageHandler_handle_error(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_error(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(msg); diff --git a/src/main/java/org/ldk/structs/ChannelMonitor.java b/src/main/java/org/ldk/structs/ChannelMonitor.java index 642c097a..a255bbcf 100644 --- a/src/main/java/org/ldk/structs/ChannelMonitor.java +++ b/src/main/java/org/ldk/structs/ChannelMonitor.java @@ -64,7 +64,7 @@ public class ChannelMonitor extends CommonBase { * panics if the given update is not the next update by update_id. */ public Result_NoneNoneZ update_monitor(org.ldk.structs.ChannelMonitorUpdate updates, org.ldk.structs.BroadcasterInterface broadcaster, org.ldk.structs.FeeEstimator fee_estimator, org.ldk.structs.Logger logger) { - long ret = bindings.ChannelMonitor_update_monitor(this.ptr, updates == null ? 0 : updates.ptr, broadcaster.ptr, fee_estimator.ptr, logger.ptr); + long ret = bindings.ChannelMonitor_update_monitor(this.ptr, updates.ptr, broadcaster.ptr, fee_estimator.ptr, logger.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(updates); Reference.reachabilityFence(broadcaster); @@ -101,6 +101,18 @@ public class ChannelMonitor extends CommonBase { return ret_hu_conv; } + /** + * Gets the channel_id of the channel this ChannelMonitor is monitoring for. + */ + public ChannelId channel_id() { + long ret = bindings.ChannelMonitor_channel_id(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + /** * Gets a list of txids, with their output scripts (in the order they appear in the * transaction), which we must learn about spends of via block_connected(). @@ -222,7 +234,7 @@ public class ChannelMonitor extends CommonBase { * [`Persist::update_persisted_channel`]: crate::chain::chainmonitor::Persist::update_persisted_channel */ public CommitmentTransaction[] counterparty_commitment_txs_from_update(org.ldk.structs.ChannelMonitorUpdate update) { - long[] ret = bindings.ChannelMonitor_counterparty_commitment_txs_from_update(this.ptr, update == null ? 0 : update.ptr); + long[] ret = bindings.ChannelMonitor_counterparty_commitment_txs_from_update(this.ptr, update.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(update); int ret_conv_23_len = ret.length; @@ -284,27 +296,25 @@ public class ChannelMonitor extends CommonBase { } /** - * Used by [`ChannelManager`] deserialization to broadcast the latest holder state if its copy - * of the channel state was out-of-date. - * - * You may also use this to broadcast the latest local commitment transaction, either because + * You may use this to broadcast the latest local commitment transaction, either because * a monitor update failed or because we've fallen behind (i.e. we've received proof that our * counterparty side knows a revocation secret we gave them that they shouldn't know). * - * Broadcasting these transactions in the second case is UNSAFE, as they allow counterparty + * Broadcasting these transactions in this manner is UNSAFE, as they allow counterparty * side to punish you. Nevertheless you may want to broadcast them if counterparty doesn't * close channel with their commitment transaction after a substantial amount of time. Best * may be to contact the other node operator out-of-band to coordinate other options available * to you. - * - * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager */ - public byte[][] get_latest_holder_commitment_txn(org.ldk.structs.Logger logger) { - byte[][] ret = bindings.ChannelMonitor_get_latest_holder_commitment_txn(this.ptr, logger.ptr); + public void broadcast_latest_holder_commitment_txn(org.ldk.structs.BroadcasterInterface broadcaster, org.ldk.structs.FeeEstimator fee_estimator, org.ldk.structs.Logger logger) { + bindings.ChannelMonitor_broadcast_latest_holder_commitment_txn(this.ptr, broadcaster.ptr, fee_estimator.ptr, logger.ptr); Reference.reachabilityFence(this); + Reference.reachabilityFence(broadcaster); + Reference.reachabilityFence(fee_estimator); Reference.reachabilityFence(logger); + if (this != null) { this.ptrs_to.add(broadcaster); }; + if (this != null) { this.ptrs_to.add(fee_estimator); }; if (this != null) { this.ptrs_to.add(logger); }; - return ret; } /** @@ -321,7 +331,7 @@ public class ChannelMonitor extends CommonBase { * [`get_outputs_to_watch`]: #method.get_outputs_to_watch */ public TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ[] block_connected(byte[] header, TwoTuple_usizeTransactionZ[] txdata, int height, org.ldk.structs.BroadcasterInterface broadcaster, org.ldk.structs.FeeEstimator fee_estimator, org.ldk.structs.Logger logger) { - long[] ret = bindings.ChannelMonitor_block_connected(this.ptr, InternalUtils.check_arr_len(header, 80), txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_28 -> txdata_conv_28 != null ? txdata_conv_28.ptr : 0).toArray() : null, height, broadcaster.ptr, fee_estimator.ptr, logger.ptr); + long[] ret = bindings.ChannelMonitor_block_connected(this.ptr, InternalUtils.check_arr_len(header, 80), txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_28 -> txdata_conv_28.ptr).toArray() : null, height, broadcaster.ptr, fee_estimator.ptr, logger.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(header); Reference.reachabilityFence(txdata); @@ -370,7 +380,7 @@ public class ChannelMonitor extends CommonBase { * [`block_connected`]: Self::block_connected */ public TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ[] transactions_confirmed(byte[] header, TwoTuple_usizeTransactionZ[] txdata, int height, org.ldk.structs.BroadcasterInterface broadcaster, org.ldk.structs.FeeEstimator fee_estimator, org.ldk.structs.Logger logger) { - long[] ret = bindings.ChannelMonitor_transactions_confirmed(this.ptr, InternalUtils.check_arr_len(header, 80), txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_28 -> txdata_conv_28 != null ? txdata_conv_28.ptr : 0).toArray() : null, height, broadcaster.ptr, fee_estimator.ptr, logger.ptr); + long[] ret = bindings.ChannelMonitor_transactions_confirmed(this.ptr, InternalUtils.check_arr_len(header, 80), txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_28 -> txdata_conv_28.ptr).toArray() : null, height, broadcaster.ptr, fee_estimator.ptr, logger.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(header); Reference.reachabilityFence(txdata); @@ -491,6 +501,21 @@ public class ChannelMonitor extends CommonBase { if (this != null) { this.ptrs_to.add(logger); }; } + /** + * Triggers rebroadcasts of pending claims from a force-closed channel after a transaction + * signature generation failure. + */ + public void signer_unblocked(org.ldk.structs.BroadcasterInterface broadcaster, org.ldk.structs.FeeEstimator fee_estimator, org.ldk.structs.Logger logger) { + bindings.ChannelMonitor_signer_unblocked(this.ptr, broadcaster.ptr, fee_estimator.ptr, logger.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(broadcaster); + Reference.reachabilityFence(fee_estimator); + Reference.reachabilityFence(logger); + if (this != null) { this.ptrs_to.add(broadcaster); }; + if (this != null) { this.ptrs_to.add(fee_estimator); }; + if (this != null) { this.ptrs_to.add(logger); }; + } + /** * Returns the descriptors for relevant outputs (i.e., those that we can spend) within the * transaction if they exist and the transaction has at least [`ANTI_REORG_DELAY`] @@ -527,6 +552,21 @@ public class ChannelMonitor extends CommonBase { return ret_conv_27_arr; } + /** + * Checks if the monitor is fully resolved. Resolved monitor is one that has claimed all of + * its outputs and balances (i.e. [`Self::get_claimable_balances`] returns an empty set). + * + * This function returns true only if [`Self::get_claimable_balances`] has been empty for at least + * 4032 blocks as an additional protection against any bugs resulting in spuriously empty balance sets. + */ + public boolean is_fully_resolved(org.ldk.structs.Logger logger) { + boolean ret = bindings.ChannelMonitor_is_fully_resolved(this.ptr, logger.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(logger); + if (this != null) { this.ptrs_to.add(logger); }; + return ret; + } + /** * Gets the balances in this channel which are either claimable by us if we were to * force-close the channel now or which are claimable on-chain (possibly awaiting diff --git a/src/main/java/org/ldk/structs/ChannelMonitorUpdate.java b/src/main/java/org/ldk/structs/ChannelMonitorUpdate.java index 05913a2f..5579309f 100644 --- a/src/main/java/org/ldk/structs/ChannelMonitorUpdate.java +++ b/src/main/java/org/ldk/structs/ChannelMonitorUpdate.java @@ -72,6 +72,39 @@ public class ChannelMonitorUpdate extends CommonBase { Reference.reachabilityFence(val); } + /** + * The channel ID associated with these updates. + * + * Will be `None` for `ChannelMonitorUpdate`s constructed on LDK versions prior to 0.0.121 and + * always `Some` otherwise. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + @Nullable + public ChannelId get_channel_id() { + long ret = bindings.ChannelMonitorUpdate_get_channel_id(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * The channel ID associated with these updates. + * + * Will be `None` for `ChannelMonitorUpdate`s constructed on LDK versions prior to 0.0.121 and + * always `Some` otherwise. + * + * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public void set_channel_id(@Nullable org.ldk.structs.ChannelId val) { + bindings.ChannelMonitorUpdate_set_channel_id(this.ptr, val == null ? 0 : val.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; + } + long clone_ptr() { long ret = bindings.ChannelMonitorUpdate_clone_ptr(this.ptr); Reference.reachabilityFence(this); @@ -96,7 +129,7 @@ public class ChannelMonitorUpdate extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.ChannelMonitorUpdate b) { - boolean ret = bindings.ChannelMonitorUpdate_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.ChannelMonitorUpdate_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/ChannelPublicKeys.java b/src/main/java/org/ldk/structs/ChannelPublicKeys.java index 28a7706c..2bec9de0 100644 --- a/src/main/java/org/ldk/structs/ChannelPublicKeys.java +++ b/src/main/java/org/ldk/structs/ChannelPublicKeys.java @@ -62,7 +62,7 @@ public class ChannelPublicKeys extends CommonBase { * states. */ public void set_revocation_basepoint(org.ldk.structs.RevocationBasepoint val) { - bindings.ChannelPublicKeys_set_revocation_basepoint(this.ptr, val == null ? 0 : val.ptr); + bindings.ChannelPublicKeys_set_revocation_basepoint(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -110,7 +110,7 @@ public class ChannelPublicKeys extends CommonBase { * after some delay (or can be claimed via the revocation path). */ public void set_delayed_payment_basepoint(org.ldk.structs.DelayedPaymentBasepoint val) { - bindings.ChannelPublicKeys_set_delayed_payment_basepoint(this.ptr, val == null ? 0 : val.ptr); + bindings.ChannelPublicKeys_set_delayed_payment_basepoint(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -134,7 +134,7 @@ public class ChannelPublicKeys extends CommonBase { * which is used to encumber HTLC-in-flight outputs. */ public void set_htlc_basepoint(org.ldk.structs.HtlcBasepoint val) { - bindings.ChannelPublicKeys_set_htlc_basepoint(this.ptr, val == null ? 0 : val.ptr); + bindings.ChannelPublicKeys_set_htlc_basepoint(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -144,7 +144,7 @@ public class ChannelPublicKeys extends CommonBase { * Constructs a new ChannelPublicKeys given each field */ public static ChannelPublicKeys of(byte[] funding_pubkey_arg, org.ldk.structs.RevocationBasepoint revocation_basepoint_arg, byte[] payment_point_arg, org.ldk.structs.DelayedPaymentBasepoint delayed_payment_basepoint_arg, org.ldk.structs.HtlcBasepoint htlc_basepoint_arg) { - long ret = bindings.ChannelPublicKeys_new(InternalUtils.check_arr_len(funding_pubkey_arg, 33), revocation_basepoint_arg == null ? 0 : revocation_basepoint_arg.ptr, InternalUtils.check_arr_len(payment_point_arg, 33), delayed_payment_basepoint_arg == null ? 0 : delayed_payment_basepoint_arg.ptr, htlc_basepoint_arg == null ? 0 : htlc_basepoint_arg.ptr); + long ret = bindings.ChannelPublicKeys_new(InternalUtils.check_arr_len(funding_pubkey_arg, 33), revocation_basepoint_arg.ptr, InternalUtils.check_arr_len(payment_point_arg, 33), delayed_payment_basepoint_arg.ptr, htlc_basepoint_arg.ptr); Reference.reachabilityFence(funding_pubkey_arg); Reference.reachabilityFence(revocation_basepoint_arg); Reference.reachabilityFence(payment_point_arg); @@ -195,7 +195,7 @@ public class ChannelPublicKeys extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.ChannelPublicKeys b) { - boolean ret = bindings.ChannelPublicKeys_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.ChannelPublicKeys_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/ChannelReady.java b/src/main/java/org/ldk/structs/ChannelReady.java index 8a78bdea..95364b2c 100644 --- a/src/main/java/org/ldk/structs/ChannelReady.java +++ b/src/main/java/org/ldk/structs/ChannelReady.java @@ -25,19 +25,23 @@ public class ChannelReady extends CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { - byte[] ret = bindings.ChannelReady_get_channel_id(this.ptr); + public ChannelId get_channel_id() { + long ret = bindings.ChannelReady_get_channel_id(this.ptr); Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.ChannelReady_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.ChannelReady_set_channel_id(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** @@ -89,14 +93,15 @@ public class ChannelReady extends CommonBase { /** * Constructs a new ChannelReady given each field */ - public static ChannelReady of(byte[] channel_id_arg, byte[] next_per_commitment_point_arg, org.ldk.structs.Option_u64Z short_channel_id_alias_arg) { - long ret = bindings.ChannelReady_new(InternalUtils.check_arr_len(channel_id_arg, 32), InternalUtils.check_arr_len(next_per_commitment_point_arg, 33), short_channel_id_alias_arg.ptr); + public static ChannelReady of(org.ldk.structs.ChannelId channel_id_arg, byte[] next_per_commitment_point_arg, org.ldk.structs.Option_u64Z short_channel_id_alias_arg) { + long ret = bindings.ChannelReady_new(channel_id_arg.ptr, InternalUtils.check_arr_len(next_per_commitment_point_arg, 33), short_channel_id_alias_arg.ptr); Reference.reachabilityFence(channel_id_arg); Reference.reachabilityFence(next_per_commitment_point_arg); Reference.reachabilityFence(short_channel_id_alias_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.ChannelReady ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelReady(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(short_channel_id_alias_arg); }; return ret_hu_conv; } @@ -137,7 +142,7 @@ public class ChannelReady extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.ChannelReady b) { - boolean ret = bindings.ChannelReady_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.ChannelReady_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/ChannelReestablish.java b/src/main/java/org/ldk/structs/ChannelReestablish.java index ff195639..42c7696c 100644 --- a/src/main/java/org/ldk/structs/ChannelReestablish.java +++ b/src/main/java/org/ldk/structs/ChannelReestablish.java @@ -25,19 +25,23 @@ public class ChannelReestablish extends CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { - byte[] ret = bindings.ChannelReestablish_get_channel_id(this.ptr); + public ChannelId get_channel_id() { + long ret = bindings.ChannelReestablish_get_channel_id(this.ptr); Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.ChannelReestablish_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.ChannelReestablish_set_channel_id(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** @@ -139,8 +143,8 @@ public class ChannelReestablish extends CommonBase { /** * Constructs a new ChannelReestablish given each field */ - public static ChannelReestablish of(byte[] channel_id_arg, long next_local_commitment_number_arg, long next_remote_commitment_number_arg, byte[] your_last_per_commitment_secret_arg, byte[] my_current_per_commitment_point_arg, org.ldk.structs.Option_ThirtyTwoBytesZ next_funding_txid_arg) { - long ret = bindings.ChannelReestablish_new(InternalUtils.check_arr_len(channel_id_arg, 32), next_local_commitment_number_arg, next_remote_commitment_number_arg, InternalUtils.check_arr_len(your_last_per_commitment_secret_arg, 32), InternalUtils.check_arr_len(my_current_per_commitment_point_arg, 33), next_funding_txid_arg.ptr); + public static ChannelReestablish of(org.ldk.structs.ChannelId channel_id_arg, long next_local_commitment_number_arg, long next_remote_commitment_number_arg, byte[] your_last_per_commitment_secret_arg, byte[] my_current_per_commitment_point_arg, org.ldk.structs.Option_ThirtyTwoBytesZ next_funding_txid_arg) { + long ret = bindings.ChannelReestablish_new(channel_id_arg.ptr, next_local_commitment_number_arg, next_remote_commitment_number_arg, InternalUtils.check_arr_len(your_last_per_commitment_secret_arg, 32), InternalUtils.check_arr_len(my_current_per_commitment_point_arg, 33), next_funding_txid_arg.ptr); Reference.reachabilityFence(channel_id_arg); Reference.reachabilityFence(next_local_commitment_number_arg); Reference.reachabilityFence(next_remote_commitment_number_arg); @@ -150,6 +154,7 @@ public class ChannelReestablish extends CommonBase { if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.ChannelReestablish ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelReestablish(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(next_funding_txid_arg); }; return ret_hu_conv; } @@ -190,7 +195,7 @@ public class ChannelReestablish extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.ChannelReestablish b) { - boolean ret = bindings.ChannelReestablish_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.ChannelReestablish_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/ChannelSigner.java b/src/main/java/org/ldk/structs/ChannelSigner.java index ccd977dc..b5e02934 100644 --- a/src/main/java/org/ldk/structs/ChannelSigner.java +++ b/src/main/java/org/ldk/structs/ChannelSigner.java @@ -16,7 +16,7 @@ public class ChannelSigner extends CommonBase { final bindings.LDKChannelSigner bindings_instance; ChannelSigner(Object _dummy, long ptr) { super(ptr); bindings_instance = null; } private ChannelSigner(bindings.LDKChannelSigner arg, ChannelPublicKeys pubkeys) { - super(bindings.LDKChannelSigner_new(arg, pubkeys == null ? 0 : pubkeys.clone_ptr())); + super(bindings.LDKChannelSigner_new(arg, pubkeys.clone_ptr())); this.ptrs_to.add(arg); this.bindings_instance = arg; } @@ -117,13 +117,13 @@ public class ChannelSigner extends CommonBase { org.ldk.structs.HolderCommitmentTransaction holder_tx_hu_conv = null; if (holder_tx < 0 || holder_tx > 4096) { holder_tx_hu_conv = new org.ldk.structs.HolderCommitmentTransaction(null, holder_tx); } Result_NoneNoneZ ret = arg.validate_holder_commitment(holder_tx_hu_conv, outbound_htlc_preimages); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long validate_counterparty_revocation(long idx, byte[] secret) { Result_NoneNoneZ ret = arg.validate_counterparty_revocation(idx, secret); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public byte[] channel_keys_id() { @@ -185,7 +185,7 @@ public class ChannelSigner extends CommonBase { * irrelevant or duplicate preimages. */ public Result_NoneNoneZ validate_holder_commitment(org.ldk.structs.HolderCommitmentTransaction holder_tx, byte[][] outbound_htlc_preimages) { - long ret = bindings.ChannelSigner_validate_holder_commitment(this.ptr, holder_tx == null ? 0 : holder_tx.ptr, outbound_htlc_preimages != null ? Arrays.stream(outbound_htlc_preimages).map(outbound_htlc_preimages_conv_8 -> InternalUtils.check_arr_len(outbound_htlc_preimages_conv_8, 32)).toArray(byte[][]::new) : null); + long ret = bindings.ChannelSigner_validate_holder_commitment(this.ptr, holder_tx.ptr, outbound_htlc_preimages != null ? Arrays.stream(outbound_htlc_preimages).map(outbound_htlc_preimages_conv_8 -> InternalUtils.check_arr_len(outbound_htlc_preimages_conv_8, 32)).toArray(byte[][]::new) : null); Reference.reachabilityFence(this); Reference.reachabilityFence(holder_tx); Reference.reachabilityFence(outbound_htlc_preimages); @@ -234,7 +234,7 @@ public class ChannelSigner extends CommonBase { * channel_parameters.is_populated() MUST be true. */ public void provide_channel_parameters(org.ldk.structs.ChannelTransactionParameters channel_parameters) { - bindings.ChannelSigner_provide_channel_parameters(this.ptr, channel_parameters == null ? 0 : channel_parameters.ptr); + bindings.ChannelSigner_provide_channel_parameters(this.ptr, channel_parameters.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(channel_parameters); if (this != null) { this.ptrs_to.add(channel_parameters); }; diff --git a/src/main/java/org/ldk/structs/ChannelTransactionParameters.java b/src/main/java/org/ldk/structs/ChannelTransactionParameters.java index cba45038..17c6ffed 100644 --- a/src/main/java/org/ldk/structs/ChannelTransactionParameters.java +++ b/src/main/java/org/ldk/structs/ChannelTransactionParameters.java @@ -40,7 +40,7 @@ public class ChannelTransactionParameters extends CommonBase { * Holder public keys */ public void set_holder_pubkeys(org.ldk.structs.ChannelPublicKeys val) { - bindings.ChannelTransactionParameters_set_holder_pubkeys(this.ptr, val == null ? 0 : val.ptr); + bindings.ChannelTransactionParameters_set_holder_pubkeys(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -158,7 +158,7 @@ public class ChannelTransactionParameters extends CommonBase { * wasn't serialized, it will default to static_remote_key at deserialization. */ public void set_channel_type_features(org.ldk.structs.ChannelTypeFeatures val) { - bindings.ChannelTransactionParameters_set_channel_type_features(this.ptr, val == null ? 0 : val.ptr); + bindings.ChannelTransactionParameters_set_channel_type_features(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -171,7 +171,7 @@ public class ChannelTransactionParameters extends CommonBase { * Note that funding_outpoint_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ public static ChannelTransactionParameters of(org.ldk.structs.ChannelPublicKeys holder_pubkeys_arg, short holder_selected_contest_delay_arg, boolean is_outbound_from_holder_arg, @Nullable org.ldk.structs.CounterpartyChannelTransactionParameters counterparty_parameters_arg, @Nullable org.ldk.structs.OutPoint funding_outpoint_arg, org.ldk.structs.ChannelTypeFeatures channel_type_features_arg) { - long ret = bindings.ChannelTransactionParameters_new(holder_pubkeys_arg == null ? 0 : holder_pubkeys_arg.ptr, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg == null ? 0 : counterparty_parameters_arg.ptr, funding_outpoint_arg == null ? 0 : funding_outpoint_arg.ptr, channel_type_features_arg == null ? 0 : channel_type_features_arg.ptr); + long ret = bindings.ChannelTransactionParameters_new(holder_pubkeys_arg.ptr, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg == null ? 0 : counterparty_parameters_arg.ptr, funding_outpoint_arg == null ? 0 : funding_outpoint_arg.ptr, channel_type_features_arg.ptr); Reference.reachabilityFence(holder_pubkeys_arg); Reference.reachabilityFence(holder_selected_contest_delay_arg); Reference.reachabilityFence(is_outbound_from_holder_arg); @@ -224,7 +224,7 @@ public class ChannelTransactionParameters extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.ChannelTransactionParameters b) { - boolean ret = bindings.ChannelTransactionParameters_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.ChannelTransactionParameters_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/ChannelTypeFeatures.java b/src/main/java/org/ldk/structs/ChannelTypeFeatures.java index 8071b043..2ca97505 100644 --- a/src/main/java/org/ldk/structs/ChannelTypeFeatures.java +++ b/src/main/java/org/ldk/structs/ChannelTypeFeatures.java @@ -35,7 +35,7 @@ public class ChannelTypeFeatures extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.ChannelTypeFeatures b) { - boolean ret = bindings.ChannelTypeFeatures_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.ChannelTypeFeatures_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; @@ -91,7 +91,7 @@ public class ChannelTypeFeatures extends CommonBase { * Returns true if this `Features` object contains required features unknown by `other`. */ public boolean requires_unknown_bits_from(org.ldk.structs.ChannelTypeFeatures other) { - boolean ret = bindings.ChannelTypeFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr); + boolean ret = bindings.ChannelTypeFeatures_requires_unknown_bits_from(this.ptr, other.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(other); if (this != null) { this.ptrs_to.add(other); }; diff --git a/src/main/java/org/ldk/structs/ChannelUpdate.java b/src/main/java/org/ldk/structs/ChannelUpdate.java index e4b52005..93f1cd2c 100644 --- a/src/main/java/org/ldk/structs/ChannelUpdate.java +++ b/src/main/java/org/ldk/structs/ChannelUpdate.java @@ -56,7 +56,7 @@ public class ChannelUpdate extends CommonBase { * The actual channel update */ public void set_contents(org.ldk.structs.UnsignedChannelUpdate val) { - bindings.ChannelUpdate_set_contents(this.ptr, val == null ? 0 : val.ptr); + bindings.ChannelUpdate_set_contents(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -66,7 +66,7 @@ public class ChannelUpdate extends CommonBase { * Constructs a new ChannelUpdate given each field */ public static ChannelUpdate of(byte[] signature_arg, org.ldk.structs.UnsignedChannelUpdate contents_arg) { - long ret = bindings.ChannelUpdate_new(InternalUtils.check_arr_len(signature_arg, 64), contents_arg == null ? 0 : contents_arg.ptr); + long ret = bindings.ChannelUpdate_new(InternalUtils.check_arr_len(signature_arg, 64), contents_arg.ptr); Reference.reachabilityFence(signature_arg); Reference.reachabilityFence(contents_arg); if (ret >= 0 && ret <= 4096) { return null; } @@ -112,7 +112,7 @@ public class ChannelUpdate extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.ChannelUpdate b) { - boolean ret = bindings.ChannelUpdate_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.ChannelUpdate_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/ChannelUpdateInfo.java b/src/main/java/org/ldk/structs/ChannelUpdateInfo.java index 19e2ffc0..75741d29 100644 --- a/src/main/java/org/ldk/structs/ChannelUpdateInfo.java +++ b/src/main/java/org/ldk/structs/ChannelUpdateInfo.java @@ -128,7 +128,7 @@ public class ChannelUpdateInfo extends CommonBase { * Fees charged when the channel is used for routing */ public void set_fees(org.ldk.structs.RoutingFees val) { - bindings.ChannelUpdateInfo_set_fees(this.ptr, val == null ? 0 : val.ptr); + bindings.ChannelUpdateInfo_set_fees(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -173,7 +173,7 @@ public class ChannelUpdateInfo extends CommonBase { * Note that last_update_message_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ public static ChannelUpdateInfo of(int last_update_arg, boolean enabled_arg, short cltv_expiry_delta_arg, long htlc_minimum_msat_arg, long htlc_maximum_msat_arg, org.ldk.structs.RoutingFees fees_arg, @Nullable org.ldk.structs.ChannelUpdate last_update_message_arg) { - long ret = bindings.ChannelUpdateInfo_new(last_update_arg, enabled_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg, fees_arg == null ? 0 : fees_arg.ptr, last_update_message_arg == null ? 0 : last_update_message_arg.ptr); + long ret = bindings.ChannelUpdateInfo_new(last_update_arg, enabled_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg, fees_arg.ptr, last_update_message_arg == null ? 0 : last_update_message_arg.ptr); Reference.reachabilityFence(last_update_arg); Reference.reachabilityFence(enabled_arg); Reference.reachabilityFence(cltv_expiry_delta_arg); @@ -213,7 +213,7 @@ public class ChannelUpdateInfo extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.ChannelUpdateInfo b) { - boolean ret = bindings.ChannelUpdateInfo_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.ChannelUpdateInfo_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/ClaimedHTLC.java b/src/main/java/org/ldk/structs/ClaimedHTLC.java index fb629795..fdb68c06 100644 --- a/src/main/java/org/ldk/structs/ClaimedHTLC.java +++ b/src/main/java/org/ldk/structs/ClaimedHTLC.java @@ -23,19 +23,23 @@ public class ClaimedHTLC extends CommonBase { /** * The `channel_id` of the channel over which the HTLC was received. */ - public byte[] get_channel_id() { - byte[] ret = bindings.ClaimedHTLC_get_channel_id(this.ptr); + public ChannelId get_channel_id() { + long ret = bindings.ClaimedHTLC_get_channel_id(this.ptr); Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** * The `channel_id` of the channel over which the HTLC was received. */ - public void set_channel_id(byte[] val) { - bindings.ClaimedHTLC_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.ClaimedHTLC_set_channel_id(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** @@ -144,8 +148,8 @@ public class ClaimedHTLC extends CommonBase { /** * Constructs a new ClaimedHTLC given each field */ - public static ClaimedHTLC of(byte[] channel_id_arg, org.ldk.util.UInt128 user_channel_id_arg, int cltv_expiry_arg, long value_msat_arg, long counterparty_skimmed_fee_msat_arg) { - long ret = bindings.ClaimedHTLC_new(InternalUtils.check_arr_len(channel_id_arg, 32), user_channel_id_arg.getLEBytes(), cltv_expiry_arg, value_msat_arg, counterparty_skimmed_fee_msat_arg); + public static ClaimedHTLC of(org.ldk.structs.ChannelId channel_id_arg, org.ldk.util.UInt128 user_channel_id_arg, int cltv_expiry_arg, long value_msat_arg, long counterparty_skimmed_fee_msat_arg) { + long ret = bindings.ClaimedHTLC_new(channel_id_arg.ptr, user_channel_id_arg.getLEBytes(), cltv_expiry_arg, value_msat_arg, counterparty_skimmed_fee_msat_arg); Reference.reachabilityFence(channel_id_arg); Reference.reachabilityFence(user_channel_id_arg); Reference.reachabilityFence(cltv_expiry_arg); @@ -154,6 +158,7 @@ public class ClaimedHTLC extends CommonBase { if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.ClaimedHTLC ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ClaimedHTLC(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); }; return ret_hu_conv; } @@ -181,7 +186,7 @@ public class ClaimedHTLC extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.ClaimedHTLC b) { - boolean ret = bindings.ClaimedHTLC_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.ClaimedHTLC_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/ClosingSigned.java b/src/main/java/org/ldk/structs/ClosingSigned.java index bcedc0db..f2bb6b5a 100644 --- a/src/main/java/org/ldk/structs/ClosingSigned.java +++ b/src/main/java/org/ldk/structs/ClosingSigned.java @@ -25,19 +25,23 @@ public class ClosingSigned extends CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { - byte[] ret = bindings.ClosingSigned_get_channel_id(this.ptr); + public ChannelId get_channel_id() { + long ret = bindings.ClosingSigned_get_channel_id(this.ptr); Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.ClosingSigned_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.ClosingSigned_set_channel_id(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** @@ -110,8 +114,8 @@ public class ClosingSigned extends CommonBase { * * Note that fee_range_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public static ClosingSigned of(byte[] channel_id_arg, long fee_satoshis_arg, byte[] signature_arg, @Nullable org.ldk.structs.ClosingSignedFeeRange fee_range_arg) { - long ret = bindings.ClosingSigned_new(InternalUtils.check_arr_len(channel_id_arg, 32), fee_satoshis_arg, InternalUtils.check_arr_len(signature_arg, 64), fee_range_arg == null ? 0 : fee_range_arg.ptr); + public static ClosingSigned of(org.ldk.structs.ChannelId channel_id_arg, long fee_satoshis_arg, byte[] signature_arg, @Nullable org.ldk.structs.ClosingSignedFeeRange fee_range_arg) { + long ret = bindings.ClosingSigned_new(channel_id_arg.ptr, fee_satoshis_arg, InternalUtils.check_arr_len(signature_arg, 64), fee_range_arg == null ? 0 : fee_range_arg.ptr); Reference.reachabilityFence(channel_id_arg); Reference.reachabilityFence(fee_satoshis_arg); Reference.reachabilityFence(signature_arg); @@ -119,6 +123,7 @@ public class ClosingSigned extends CommonBase { if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.ClosingSigned ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ClosingSigned(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(fee_range_arg); }; return ret_hu_conv; } @@ -159,7 +164,7 @@ public class ClosingSigned extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.ClosingSigned b) { - boolean ret = bindings.ClosingSigned_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.ClosingSigned_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/ClosingSignedFeeRange.java b/src/main/java/org/ldk/structs/ClosingSignedFeeRange.java index 3832b4c3..dc0e6a06 100644 --- a/src/main/java/org/ldk/structs/ClosingSignedFeeRange.java +++ b/src/main/java/org/ldk/structs/ClosingSignedFeeRange.java @@ -112,7 +112,7 @@ public class ClosingSignedFeeRange extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.ClosingSignedFeeRange b) { - boolean ret = bindings.ClosingSignedFeeRange_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.ClosingSignedFeeRange_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/ClosingTransaction.java b/src/main/java/org/ldk/structs/ClosingTransaction.java index bbe3475d..8dbc3a8e 100644 --- a/src/main/java/org/ldk/structs/ClosingTransaction.java +++ b/src/main/java/org/ldk/structs/ClosingTransaction.java @@ -60,7 +60,7 @@ public class ClosingTransaction extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.ClosingTransaction b) { - boolean ret = bindings.ClosingTransaction_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.ClosingTransaction_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; @@ -75,7 +75,7 @@ public class ClosingTransaction extends CommonBase { * Construct an object of the class */ public static ClosingTransaction of(long to_holder_value_sat, long to_counterparty_value_sat, byte[] to_holder_script, byte[] to_counterparty_script, org.ldk.structs.OutPoint funding_outpoint) { - long ret = bindings.ClosingTransaction_new(to_holder_value_sat, to_counterparty_value_sat, to_holder_script, to_counterparty_script, funding_outpoint == null ? 0 : funding_outpoint.ptr); + long ret = bindings.ClosingTransaction_new(to_holder_value_sat, to_counterparty_value_sat, to_holder_script, to_counterparty_script, funding_outpoint.ptr); Reference.reachabilityFence(to_holder_value_sat); Reference.reachabilityFence(to_counterparty_value_sat); Reference.reachabilityFence(to_holder_script); @@ -114,7 +114,7 @@ public class ClosingTransaction extends CommonBase { * or using the built transaction. */ public Result_TrustedClosingTransactionNoneZ verify(org.ldk.structs.OutPoint funding_outpoint) { - long ret = bindings.ClosingTransaction_verify(this.ptr, funding_outpoint == null ? 0 : funding_outpoint.ptr); + long ret = bindings.ClosingTransaction_verify(this.ptr, funding_outpoint.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(funding_outpoint); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/src/main/java/org/ldk/structs/ClosureReason.java b/src/main/java/org/ldk/structs/ClosureReason.java index b4da105e..75dddc61 100644 --- a/src/main/java/org/ldk/structs/ClosureReason.java +++ b/src/main/java/org/ldk/structs/ClosureReason.java @@ -27,8 +27,14 @@ public class ClosureReason extends CommonBase { if (raw_val.getClass() == bindings.LDKClosureReason.HolderForceClosed.class) { return new HolderForceClosed(ptr, (bindings.LDKClosureReason.HolderForceClosed)raw_val); } - if (raw_val.getClass() == bindings.LDKClosureReason.CooperativeClosure.class) { - return new CooperativeClosure(ptr, (bindings.LDKClosureReason.CooperativeClosure)raw_val); + if (raw_val.getClass() == bindings.LDKClosureReason.LegacyCooperativeClosure.class) { + return new LegacyCooperativeClosure(ptr, (bindings.LDKClosureReason.LegacyCooperativeClosure)raw_val); + } + if (raw_val.getClass() == bindings.LDKClosureReason.CounterpartyInitiatedCooperativeClosure.class) { + return new CounterpartyInitiatedCooperativeClosure(ptr, (bindings.LDKClosureReason.CounterpartyInitiatedCooperativeClosure)raw_val); + } + if (raw_val.getClass() == bindings.LDKClosureReason.LocallyInitiatedCooperativeClosure.class) { + return new LocallyInitiatedCooperativeClosure(ptr, (bindings.LDKClosureReason.LocallyInitiatedCooperativeClosure)raw_val); } if (raw_val.getClass() == bindings.LDKClosureReason.CommitmentTxConfirmed.class) { return new CommitmentTxConfirmed(ptr, (bindings.LDKClosureReason.CommitmentTxConfirmed)raw_val); @@ -51,6 +57,9 @@ public class ClosureReason extends CommonBase { if (raw_val.getClass() == bindings.LDKClosureReason.FundingBatchClosure.class) { return new FundingBatchClosure(ptr, (bindings.LDKClosureReason.FundingBatchClosure)raw_val); } + if (raw_val.getClass() == bindings.LDKClosureReason.HTLCsTimedOut.class) { + return new HTLCsTimedOut(ptr, (bindings.LDKClosureReason.HTLCsTimedOut)raw_val); + } assert false; return null; // Unreachable without extending the (internal) bindings interface } @@ -92,9 +101,33 @@ public class ClosureReason extends CommonBase { /** * The channel was closed after negotiating a cooperative close and we've now broadcasted * the cooperative close transaction. Note the shutdown may have been initiated by us. + * + * This was only set in versions of LDK prior to 0.0.122. + */ + public final static class LegacyCooperativeClosure extends ClosureReason { + private LegacyCooperativeClosure(long ptr, bindings.LDKClosureReason.LegacyCooperativeClosure obj) { + super(null, ptr); + } + } + /** + * The channel was closed after negotiating a cooperative close and we've now broadcasted + * the cooperative close transaction. This indicates that the shutdown was initiated by our + * counterparty. + * + * In rare cases where we initiated closure immediately prior to shutting down without + * persisting, this value may be provided for channels we initiated closure for. */ - public final static class CooperativeClosure extends ClosureReason { - private CooperativeClosure(long ptr, bindings.LDKClosureReason.CooperativeClosure obj) { + public final static class CounterpartyInitiatedCooperativeClosure extends ClosureReason { + private CounterpartyInitiatedCooperativeClosure(long ptr, bindings.LDKClosureReason.CounterpartyInitiatedCooperativeClosure obj) { + super(null, ptr); + } + } + /** + * The channel was closed after negotiating a cooperative close and we've now broadcasted + * the cooperative close transaction. This indicates that the shutdown was initiated by us. + */ + public final static class LocallyInitiatedCooperativeClosure extends ClosureReason { + private LocallyInitiatedCooperativeClosure(long ptr, bindings.LDKClosureReason.LocallyInitiatedCooperativeClosure obj) { super(null, ptr); } } @@ -176,6 +209,14 @@ public class ClosureReason extends CommonBase { super(null, ptr); } } + /** + * One of our HTLCs timed out in a channel, causing us to force close the channel. + */ + public final static class HTLCsTimedOut extends ClosureReason { + private HTLCsTimedOut(long ptr, bindings.LDKClosureReason.HTLCsTimedOut obj) { + super(null, ptr); + } + } long clone_ptr() { long ret = bindings.ClosureReason_clone_ptr(this.ptr); Reference.reachabilityFence(this); @@ -198,7 +239,7 @@ public class ClosureReason extends CommonBase { * Utility method to constructs a new CounterpartyForceClosed-variant ClosureReason */ public static ClosureReason counterparty_force_closed(org.ldk.structs.UntrustedString peer_msg) { - long ret = bindings.ClosureReason_counterparty_force_closed(peer_msg == null ? 0 : peer_msg.ptr); + long ret = bindings.ClosureReason_counterparty_force_closed(peer_msg.ptr); Reference.reachabilityFence(peer_msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.ClosureReason ret_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(ret); @@ -219,10 +260,32 @@ public class ClosureReason extends CommonBase { } /** - * Utility method to constructs a new CooperativeClosure-variant ClosureReason + * Utility method to constructs a new LegacyCooperativeClosure-variant ClosureReason + */ + public static ClosureReason legacy_cooperative_closure() { + long ret = bindings.ClosureReason_legacy_cooperative_closure(); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ClosureReason ret_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new CounterpartyInitiatedCooperativeClosure-variant ClosureReason */ - public static ClosureReason cooperative_closure() { - long ret = bindings.ClosureReason_cooperative_closure(); + public static ClosureReason counterparty_initiated_cooperative_closure() { + long ret = bindings.ClosureReason_counterparty_initiated_cooperative_closure(); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ClosureReason ret_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new LocallyInitiatedCooperativeClosure-variant ClosureReason + */ + public static ClosureReason locally_initiated_cooperative_closure() { + long ret = bindings.ClosureReason_locally_initiated_cooperative_closure(); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.ClosureReason ret_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; @@ -307,12 +370,23 @@ public class ClosureReason extends CommonBase { return ret_hu_conv; } + /** + * Utility method to constructs a new HTLCsTimedOut-variant ClosureReason + */ + public static ClosureReason htlcs_timed_out() { + long ret = bindings.ClosureReason_htlcs_timed_out(); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ClosureReason ret_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + /** * Checks if two ClosureReasons contain equal inner contents. * This ignores pointers and is_owned flags and looks at the values in fields. */ public boolean eq(org.ldk.structs.ClosureReason b) { - boolean ret = bindings.ClosureReason_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.ClosureReason_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); return ret; diff --git a/src/main/java/org/ldk/structs/CoinSelection.java b/src/main/java/org/ldk/structs/CoinSelection.java index f9ec6495..182ed5ec 100644 --- a/src/main/java/org/ldk/structs/CoinSelection.java +++ b/src/main/java/org/ldk/structs/CoinSelection.java @@ -44,7 +44,7 @@ public class CoinSelection extends CommonBase { * requiring additional fees. */ public void set_confirmed_utxos(Utxo[] val) { - bindings.CoinSelection_set_confirmed_utxos(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_6 -> val_conv_6 == null ? 0 : val_conv_6.ptr).toArray() : null); + bindings.CoinSelection_set_confirmed_utxos(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_6 -> val_conv_6.ptr).toArray() : null); Reference.reachabilityFence(this); Reference.reachabilityFence(val); for (Utxo val_conv_6: val) { if (this != null) { this.ptrs_to.add(val_conv_6); }; }; @@ -82,7 +82,7 @@ public class CoinSelection extends CommonBase { * Constructs a new CoinSelection given each field */ public static CoinSelection of(Utxo[] confirmed_utxos_arg, org.ldk.structs.Option_TxOutZ change_output_arg) { - long ret = bindings.CoinSelection_new(confirmed_utxos_arg != null ? Arrays.stream(confirmed_utxos_arg).mapToLong(confirmed_utxos_arg_conv_6 -> confirmed_utxos_arg_conv_6 == null ? 0 : confirmed_utxos_arg_conv_6.ptr).toArray() : null, change_output_arg.ptr); + long ret = bindings.CoinSelection_new(confirmed_utxos_arg != null ? Arrays.stream(confirmed_utxos_arg).mapToLong(confirmed_utxos_arg_conv_6 -> confirmed_utxos_arg_conv_6.ptr).toArray() : null, change_output_arg.ptr); Reference.reachabilityFence(confirmed_utxos_arg); Reference.reachabilityFence(change_output_arg); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/src/main/java/org/ldk/structs/CoinSelectionSource.java b/src/main/java/org/ldk/structs/CoinSelectionSource.java index 53451dff..47b28f5c 100644 --- a/src/main/java/org/ldk/structs/CoinSelectionSource.java +++ b/src/main/java/org/ldk/structs/CoinSelectionSource.java @@ -100,13 +100,13 @@ public class CoinSelectionSource extends CommonBase { } Result_CoinSelectionNoneZ ret = arg.select_confirmed_utxos(claim_id, must_spend_conv_7_arr, must_pay_to_conv_7_arr, target_feerate_sat_per_1000_weight); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long sign_psbt(byte[] psbt) { Result_TransactionNoneZ ret = arg.sign_psbt(psbt); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } }); @@ -141,7 +141,7 @@ public class CoinSelectionSource extends CommonBase { * set of other claims being double spent to a minimum. */ public Result_CoinSelectionNoneZ select_confirmed_utxos(byte[] claim_id, Input[] must_spend, TxOut[] must_pay_to, int target_feerate_sat_per_1000_weight) { - long ret = bindings.CoinSelectionSource_select_confirmed_utxos(this.ptr, InternalUtils.check_arr_len(claim_id, 32), must_spend != null ? Arrays.stream(must_spend).mapToLong(must_spend_conv_7 -> must_spend_conv_7 == null ? 0 : must_spend_conv_7.ptr).toArray() : null, must_pay_to != null ? Arrays.stream(must_pay_to).mapToLong(must_pay_to_conv_7 -> must_pay_to_conv_7.ptr).toArray() : null, target_feerate_sat_per_1000_weight); + long ret = bindings.CoinSelectionSource_select_confirmed_utxos(this.ptr, InternalUtils.check_arr_len(claim_id, 32), must_spend != null ? Arrays.stream(must_spend).mapToLong(must_spend_conv_7 -> must_spend_conv_7.ptr).toArray() : null, must_pay_to != null ? Arrays.stream(must_pay_to).mapToLong(must_pay_to_conv_7 -> must_pay_to_conv_7.ptr).toArray() : null, target_feerate_sat_per_1000_weight); Reference.reachabilityFence(this); Reference.reachabilityFence(claim_id); Reference.reachabilityFence(must_spend); diff --git a/src/main/java/org/ldk/structs/CommitmentSigned.java b/src/main/java/org/ldk/structs/CommitmentSigned.java index 49a550fc..d9f6f2df 100644 --- a/src/main/java/org/ldk/structs/CommitmentSigned.java +++ b/src/main/java/org/ldk/structs/CommitmentSigned.java @@ -25,19 +25,23 @@ public class CommitmentSigned extends CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { - byte[] ret = bindings.CommitmentSigned_get_channel_id(this.ptr); + public ChannelId get_channel_id() { + long ret = bindings.CommitmentSigned_get_channel_id(this.ptr); Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.CommitmentSigned_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.CommitmentSigned_set_channel_id(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** @@ -81,14 +85,15 @@ public class CommitmentSigned extends CommonBase { /** * Constructs a new CommitmentSigned given each field */ - public static CommitmentSigned of(byte[] channel_id_arg, byte[] signature_arg, byte[][] htlc_signatures_arg) { - long ret = bindings.CommitmentSigned_new(InternalUtils.check_arr_len(channel_id_arg, 32), InternalUtils.check_arr_len(signature_arg, 64), htlc_signatures_arg != null ? Arrays.stream(htlc_signatures_arg).map(htlc_signatures_arg_conv_8 -> InternalUtils.check_arr_len(htlc_signatures_arg_conv_8, 64)).toArray(byte[][]::new) : null); + public static CommitmentSigned of(org.ldk.structs.ChannelId channel_id_arg, byte[] signature_arg, byte[][] htlc_signatures_arg) { + long ret = bindings.CommitmentSigned_new(channel_id_arg.ptr, InternalUtils.check_arr_len(signature_arg, 64), htlc_signatures_arg != null ? Arrays.stream(htlc_signatures_arg).map(htlc_signatures_arg_conv_8 -> InternalUtils.check_arr_len(htlc_signatures_arg_conv_8, 64)).toArray(byte[][]::new) : null); Reference.reachabilityFence(channel_id_arg); Reference.reachabilityFence(signature_arg); Reference.reachabilityFence(htlc_signatures_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.CommitmentSigned ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommitmentSigned(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); }; return ret_hu_conv; } @@ -128,7 +133,7 @@ public class CommitmentSigned extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.CommitmentSigned b) { - boolean ret = bindings.CommitmentSigned_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.CommitmentSigned_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/CommitmentTransaction.java b/src/main/java/org/ldk/structs/CommitmentTransaction.java index 9c1a693b..0e67862d 100644 --- a/src/main/java/org/ldk/structs/CommitmentTransaction.java +++ b/src/main/java/org/ldk/structs/CommitmentTransaction.java @@ -134,7 +134,7 @@ public class CommitmentTransaction extends CommonBase { * or using the built transaction. */ public Result_TrustedCommitmentTransactionNoneZ verify(org.ldk.structs.DirectedChannelTransactionParameters channel_parameters, org.ldk.structs.ChannelPublicKeys broadcaster_keys, org.ldk.structs.ChannelPublicKeys countersignatory_keys) { - long ret = bindings.CommitmentTransaction_verify(this.ptr, channel_parameters == null ? 0 : channel_parameters.ptr, broadcaster_keys == null ? 0 : broadcaster_keys.ptr, countersignatory_keys == null ? 0 : countersignatory_keys.ptr); + long ret = bindings.CommitmentTransaction_verify(this.ptr, channel_parameters.ptr, broadcaster_keys.ptr, countersignatory_keys.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(channel_parameters); Reference.reachabilityFence(broadcaster_keys); diff --git a/src/main/java/org/ldk/structs/CommitmentUpdate.java b/src/main/java/org/ldk/structs/CommitmentUpdate.java index 4d8af11b..7ee8b0b2 100644 --- a/src/main/java/org/ldk/structs/CommitmentUpdate.java +++ b/src/main/java/org/ldk/structs/CommitmentUpdate.java @@ -42,7 +42,7 @@ public class CommitmentUpdate extends CommonBase { * `update_add_htlc` messages which should be sent */ public void set_update_add_htlcs(UpdateAddHTLC[] val) { - bindings.CommitmentUpdate_set_update_add_htlcs(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_15 -> val_conv_15 == null ? 0 : val_conv_15.ptr).toArray() : null); + bindings.CommitmentUpdate_set_update_add_htlcs(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_15 -> val_conv_15.ptr).toArray() : null); Reference.reachabilityFence(this); Reference.reachabilityFence(val); for (UpdateAddHTLC val_conv_15: val) { if (this != null) { this.ptrs_to.add(val_conv_15); }; }; @@ -69,7 +69,7 @@ public class CommitmentUpdate extends CommonBase { * `update_fulfill_htlc` messages which should be sent */ public void set_update_fulfill_htlcs(UpdateFulfillHTLC[] val) { - bindings.CommitmentUpdate_set_update_fulfill_htlcs(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_19 -> val_conv_19 == null ? 0 : val_conv_19.ptr).toArray() : null); + bindings.CommitmentUpdate_set_update_fulfill_htlcs(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_19 -> val_conv_19.ptr).toArray() : null); Reference.reachabilityFence(this); Reference.reachabilityFence(val); for (UpdateFulfillHTLC val_conv_19: val) { if (this != null) { this.ptrs_to.add(val_conv_19); }; }; @@ -96,7 +96,7 @@ public class CommitmentUpdate extends CommonBase { * `update_fail_htlc` messages which should be sent */ public void set_update_fail_htlcs(UpdateFailHTLC[] val) { - bindings.CommitmentUpdate_set_update_fail_htlcs(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_16 -> val_conv_16 == null ? 0 : val_conv_16.ptr).toArray() : null); + bindings.CommitmentUpdate_set_update_fail_htlcs(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_16 -> val_conv_16.ptr).toArray() : null); Reference.reachabilityFence(this); Reference.reachabilityFence(val); for (UpdateFailHTLC val_conv_16: val) { if (this != null) { this.ptrs_to.add(val_conv_16); }; }; @@ -123,7 +123,7 @@ public class CommitmentUpdate extends CommonBase { * `update_fail_malformed_htlc` messages which should be sent */ public void set_update_fail_malformed_htlcs(UpdateFailMalformedHTLC[] val) { - bindings.CommitmentUpdate_set_update_fail_malformed_htlcs(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_25 -> val_conv_25 == null ? 0 : val_conv_25.ptr).toArray() : null); + bindings.CommitmentUpdate_set_update_fail_malformed_htlcs(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_25 -> val_conv_25.ptr).toArray() : null); Reference.reachabilityFence(this); Reference.reachabilityFence(val); for (UpdateFailMalformedHTLC val_conv_25: val) { if (this != null) { this.ptrs_to.add(val_conv_25); }; }; @@ -172,7 +172,7 @@ public class CommitmentUpdate extends CommonBase { * A `commitment_signed` message which should be sent */ public void set_commitment_signed(org.ldk.structs.CommitmentSigned val) { - bindings.CommitmentUpdate_set_commitment_signed(this.ptr, val == null ? 0 : val.ptr); + bindings.CommitmentUpdate_set_commitment_signed(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -184,7 +184,7 @@ public class CommitmentUpdate extends CommonBase { * Note that update_fee_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ public static CommitmentUpdate of(UpdateAddHTLC[] update_add_htlcs_arg, UpdateFulfillHTLC[] update_fulfill_htlcs_arg, UpdateFailHTLC[] update_fail_htlcs_arg, UpdateFailMalformedHTLC[] update_fail_malformed_htlcs_arg, @Nullable org.ldk.structs.UpdateFee update_fee_arg, org.ldk.structs.CommitmentSigned commitment_signed_arg) { - long ret = bindings.CommitmentUpdate_new(update_add_htlcs_arg != null ? Arrays.stream(update_add_htlcs_arg).mapToLong(update_add_htlcs_arg_conv_15 -> update_add_htlcs_arg_conv_15 == null ? 0 : update_add_htlcs_arg_conv_15.ptr).toArray() : null, update_fulfill_htlcs_arg != null ? Arrays.stream(update_fulfill_htlcs_arg).mapToLong(update_fulfill_htlcs_arg_conv_19 -> update_fulfill_htlcs_arg_conv_19 == null ? 0 : update_fulfill_htlcs_arg_conv_19.ptr).toArray() : null, update_fail_htlcs_arg != null ? Arrays.stream(update_fail_htlcs_arg).mapToLong(update_fail_htlcs_arg_conv_16 -> update_fail_htlcs_arg_conv_16 == null ? 0 : update_fail_htlcs_arg_conv_16.ptr).toArray() : null, update_fail_malformed_htlcs_arg != null ? Arrays.stream(update_fail_malformed_htlcs_arg).mapToLong(update_fail_malformed_htlcs_arg_conv_25 -> update_fail_malformed_htlcs_arg_conv_25 == null ? 0 : update_fail_malformed_htlcs_arg_conv_25.ptr).toArray() : null, update_fee_arg == null ? 0 : update_fee_arg.ptr, commitment_signed_arg == null ? 0 : commitment_signed_arg.ptr); + long ret = bindings.CommitmentUpdate_new(update_add_htlcs_arg != null ? Arrays.stream(update_add_htlcs_arg).mapToLong(update_add_htlcs_arg_conv_15 -> update_add_htlcs_arg_conv_15.ptr).toArray() : null, update_fulfill_htlcs_arg != null ? Arrays.stream(update_fulfill_htlcs_arg).mapToLong(update_fulfill_htlcs_arg_conv_19 -> update_fulfill_htlcs_arg_conv_19.ptr).toArray() : null, update_fail_htlcs_arg != null ? Arrays.stream(update_fail_htlcs_arg).mapToLong(update_fail_htlcs_arg_conv_16 -> update_fail_htlcs_arg_conv_16.ptr).toArray() : null, update_fail_malformed_htlcs_arg != null ? Arrays.stream(update_fail_malformed_htlcs_arg).mapToLong(update_fail_malformed_htlcs_arg_conv_25 -> update_fail_malformed_htlcs_arg_conv_25.ptr).toArray() : null, update_fee_arg == null ? 0 : update_fee_arg.ptr, commitment_signed_arg.ptr); Reference.reachabilityFence(update_add_htlcs_arg); Reference.reachabilityFence(update_fulfill_htlcs_arg); Reference.reachabilityFence(update_fail_htlcs_arg); @@ -239,7 +239,7 @@ public class CommitmentUpdate extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.CommitmentUpdate b) { - boolean ret = bindings.CommitmentUpdate_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.CommitmentUpdate_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/CommonAcceptChannelFields.java b/src/main/java/org/ldk/structs/CommonAcceptChannelFields.java new file mode 100644 index 00000000..398ae349 --- /dev/null +++ b/src/main/java/org/ldk/structs/CommonAcceptChannelFields.java @@ -0,0 +1,408 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + + +/** + * Contains fields that are both common to [`accept_channel`] and `accept_channel2` messages. + * + * [`accept_channel`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-accept_channel-message + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class CommonAcceptChannelFields extends CommonBase { + CommonAcceptChannelFields(Object _dummy, long ptr) { super(ptr); } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + if (ptr != 0) { bindings.CommonAcceptChannelFields_free(ptr); } + } + + /** + * The same `temporary_channel_id` received from the initiator's `open_channel2` or `open_channel` message. + */ + public ChannelId get_temporary_channel_id() { + long ret = bindings.CommonAcceptChannelFields_get_temporary_channel_id(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * The same `temporary_channel_id` received from the initiator's `open_channel2` or `open_channel` message. + */ + public void set_temporary_channel_id(org.ldk.structs.ChannelId val) { + bindings.CommonAcceptChannelFields_set_temporary_channel_id(this.ptr, val.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; + } + + /** + * The threshold below which outputs on transactions broadcast by the channel acceptor will be + * omitted + */ + public long get_dust_limit_satoshis() { + long ret = bindings.CommonAcceptChannelFields_get_dust_limit_satoshis(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * The threshold below which outputs on transactions broadcast by the channel acceptor will be + * omitted + */ + public void set_dust_limit_satoshis(long val) { + bindings.CommonAcceptChannelFields_set_dust_limit_satoshis(this.ptr, val); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * The maximum inbound HTLC value in flight towards sender, in milli-satoshi + */ + public long get_max_htlc_value_in_flight_msat() { + long ret = bindings.CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * The maximum inbound HTLC value in flight towards sender, in milli-satoshi + */ + public void set_max_htlc_value_in_flight_msat(long val) { + bindings.CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat(this.ptr, val); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * The minimum HTLC size incoming to channel acceptor, in milli-satoshi + */ + public long get_htlc_minimum_msat() { + long ret = bindings.CommonAcceptChannelFields_get_htlc_minimum_msat(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * The minimum HTLC size incoming to channel acceptor, in milli-satoshi + */ + public void set_htlc_minimum_msat(long val) { + bindings.CommonAcceptChannelFields_set_htlc_minimum_msat(this.ptr, val); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * Minimum depth of the funding transaction before the channel is considered open + */ + public int get_minimum_depth() { + int ret = bindings.CommonAcceptChannelFields_get_minimum_depth(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Minimum depth of the funding transaction before the channel is considered open + */ + public void set_minimum_depth(int val) { + bindings.CommonAcceptChannelFields_set_minimum_depth(this.ptr, val); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * The number of blocks which the counterparty will have to wait to claim on-chain funds if they + * broadcast a commitment transaction + */ + public short get_to_self_delay() { + short ret = bindings.CommonAcceptChannelFields_get_to_self_delay(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * The number of blocks which the counterparty will have to wait to claim on-chain funds if they + * broadcast a commitment transaction + */ + public void set_to_self_delay(short val) { + bindings.CommonAcceptChannelFields_set_to_self_delay(this.ptr, val); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * The maximum number of inbound HTLCs towards channel acceptor + */ + public short get_max_accepted_htlcs() { + short ret = bindings.CommonAcceptChannelFields_get_max_accepted_htlcs(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * The maximum number of inbound HTLCs towards channel acceptor + */ + public void set_max_accepted_htlcs(short val) { + bindings.CommonAcceptChannelFields_set_max_accepted_htlcs(this.ptr, val); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * The channel acceptor's key controlling the funding transaction + */ + public byte[] get_funding_pubkey() { + byte[] ret = bindings.CommonAcceptChannelFields_get_funding_pubkey(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * The channel acceptor's key controlling the funding transaction + */ + public void set_funding_pubkey(byte[] val) { + bindings.CommonAcceptChannelFields_set_funding_pubkey(this.ptr, InternalUtils.check_arr_len(val, 33)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * Used to derive a revocation key for transactions broadcast by counterparty + */ + public byte[] get_revocation_basepoint() { + byte[] ret = bindings.CommonAcceptChannelFields_get_revocation_basepoint(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Used to derive a revocation key for transactions broadcast by counterparty + */ + public void set_revocation_basepoint(byte[] val) { + bindings.CommonAcceptChannelFields_set_revocation_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * A payment key to channel acceptor for transactions broadcast by counterparty + */ + public byte[] get_payment_basepoint() { + byte[] ret = bindings.CommonAcceptChannelFields_get_payment_basepoint(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * A payment key to channel acceptor for transactions broadcast by counterparty + */ + public void set_payment_basepoint(byte[] val) { + bindings.CommonAcceptChannelFields_set_payment_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * Used to derive a payment key to channel acceptor for transactions broadcast by channel + * acceptor + */ + public byte[] get_delayed_payment_basepoint() { + byte[] ret = bindings.CommonAcceptChannelFields_get_delayed_payment_basepoint(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Used to derive a payment key to channel acceptor for transactions broadcast by channel + * acceptor + */ + public void set_delayed_payment_basepoint(byte[] val) { + bindings.CommonAcceptChannelFields_set_delayed_payment_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * Used to derive an HTLC payment key to channel acceptor for transactions broadcast by counterparty + */ + public byte[] get_htlc_basepoint() { + byte[] ret = bindings.CommonAcceptChannelFields_get_htlc_basepoint(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Used to derive an HTLC payment key to channel acceptor for transactions broadcast by counterparty + */ + public void set_htlc_basepoint(byte[] val) { + bindings.CommonAcceptChannelFields_set_htlc_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * The first to-be-broadcast-by-channel-acceptor transaction's per commitment point + */ + public byte[] get_first_per_commitment_point() { + byte[] ret = bindings.CommonAcceptChannelFields_get_first_per_commitment_point(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * The first to-be-broadcast-by-channel-acceptor transaction's per commitment point + */ + public void set_first_per_commitment_point(byte[] val) { + bindings.CommonAcceptChannelFields_set_first_per_commitment_point(this.ptr, InternalUtils.check_arr_len(val, 33)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * Optionally, a request to pre-set the to-channel-acceptor output's scriptPubkey for when we + * collaboratively close + */ + public Option_CVec_u8ZZ get_shutdown_scriptpubkey() { + long ret = bindings.CommonAcceptChannelFields_get_shutdown_scriptpubkey(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_CVec_u8ZZ ret_hu_conv = org.ldk.structs.Option_CVec_u8ZZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Optionally, a request to pre-set the to-channel-acceptor output's scriptPubkey for when we + * collaboratively close + */ + public void set_shutdown_scriptpubkey(org.ldk.structs.Option_CVec_u8ZZ val) { + bindings.CommonAcceptChannelFields_set_shutdown_scriptpubkey(this.ptr, val.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; + } + + /** + * The channel type that this channel will represent. If none is set, we derive the channel + * type from the intersection of our feature bits with our counterparty's feature bits from + * the Init message. + * + * This is required to match the equivalent field in [`OpenChannel`] or [`OpenChannelV2`]'s + * [`CommonOpenChannelFields::channel_type`]. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + @Nullable + public ChannelTypeFeatures get_channel_type() { + long ret = bindings.CommonAcceptChannelFields_get_channel_type(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelTypeFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelTypeFeatures(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * The channel type that this channel will represent. If none is set, we derive the channel + * type from the intersection of our feature bits with our counterparty's feature bits from + * the Init message. + * + * This is required to match the equivalent field in [`OpenChannel`] or [`OpenChannelV2`]'s + * [`CommonOpenChannelFields::channel_type`]. + * + * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public void set_channel_type(@Nullable org.ldk.structs.ChannelTypeFeatures val) { + bindings.CommonAcceptChannelFields_set_channel_type(this.ptr, val == null ? 0 : val.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; + } + + /** + * Constructs a new CommonAcceptChannelFields given each field + * + * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public static CommonAcceptChannelFields of(org.ldk.structs.ChannelId temporary_channel_id_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long htlc_minimum_msat_arg, int minimum_depth_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_basepoint_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, org.ldk.structs.Option_CVec_u8ZZ shutdown_scriptpubkey_arg, @Nullable org.ldk.structs.ChannelTypeFeatures channel_type_arg) { + long ret = bindings.CommonAcceptChannelFields_new(temporary_channel_id_arg.ptr, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, InternalUtils.check_arr_len(funding_pubkey_arg, 33), InternalUtils.check_arr_len(revocation_basepoint_arg, 33), InternalUtils.check_arr_len(payment_basepoint_arg, 33), InternalUtils.check_arr_len(delayed_payment_basepoint_arg, 33), InternalUtils.check_arr_len(htlc_basepoint_arg, 33), InternalUtils.check_arr_len(first_per_commitment_point_arg, 33), shutdown_scriptpubkey_arg.ptr, channel_type_arg == null ? 0 : channel_type_arg.ptr); + Reference.reachabilityFence(temporary_channel_id_arg); + Reference.reachabilityFence(dust_limit_satoshis_arg); + Reference.reachabilityFence(max_htlc_value_in_flight_msat_arg); + Reference.reachabilityFence(htlc_minimum_msat_arg); + Reference.reachabilityFence(minimum_depth_arg); + Reference.reachabilityFence(to_self_delay_arg); + Reference.reachabilityFence(max_accepted_htlcs_arg); + Reference.reachabilityFence(funding_pubkey_arg); + Reference.reachabilityFence(revocation_basepoint_arg); + Reference.reachabilityFence(payment_basepoint_arg); + Reference.reachabilityFence(delayed_payment_basepoint_arg); + Reference.reachabilityFence(htlc_basepoint_arg); + Reference.reachabilityFence(first_per_commitment_point_arg); + Reference.reachabilityFence(shutdown_scriptpubkey_arg); + Reference.reachabilityFence(channel_type_arg); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.CommonAcceptChannelFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommonAcceptChannelFields(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(temporary_channel_id_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(shutdown_scriptpubkey_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_type_arg); }; + return ret_hu_conv; + } + + long clone_ptr() { + long ret = bindings.CommonAcceptChannelFields_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a copy of the CommonAcceptChannelFields + */ + public CommonAcceptChannelFields clone() { + long ret = bindings.CommonAcceptChannelFields_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.CommonAcceptChannelFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommonAcceptChannelFields(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Generates a non-cryptographic 64-bit hash of the CommonAcceptChannelFields. + */ + public long hash() { + long ret = bindings.CommonAcceptChannelFields_hash(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + @Override public int hashCode() { + return (int)this.hash(); + } + /** + * Checks if two CommonAcceptChannelFieldss contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ + public boolean eq(org.ldk.structs.CommonAcceptChannelFields b) { + boolean ret = bindings.CommonAcceptChannelFields_eq(this.ptr, b.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(b); + if (this != null) { this.ptrs_to.add(b); }; + return ret; + } + + @Override public boolean equals(Object o) { + if (!(o instanceof CommonAcceptChannelFields)) return false; + return this.eq((CommonAcceptChannelFields)o); + } +} diff --git a/src/main/java/org/ldk/structs/CommonOpenChannelFields.java b/src/main/java/org/ldk/structs/CommonOpenChannelFields.java new file mode 100644 index 00000000..91ef7bf4 --- /dev/null +++ b/src/main/java/org/ldk/structs/CommonOpenChannelFields.java @@ -0,0 +1,469 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + + +/** + * Contains fields that are both common to [`open_channel`] and `open_channel2` messages. + * + * [`open_channel`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-open_channel-message + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class CommonOpenChannelFields extends CommonBase { + CommonOpenChannelFields(Object _dummy, long ptr) { super(ptr); } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + if (ptr != 0) { bindings.CommonOpenChannelFields_free(ptr); } + } + + /** + * The genesis hash of the blockchain where the channel is to be opened + */ + public byte[] get_chain_hash() { + byte[] ret = bindings.CommonOpenChannelFields_get_chain_hash(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * The genesis hash of the blockchain where the channel is to be opened + */ + public void set_chain_hash(byte[] val) { + bindings.CommonOpenChannelFields_set_chain_hash(this.ptr, InternalUtils.check_arr_len(val, 32)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * A temporary channel ID + * For V2 channels: derived using a zeroed out value for the channel acceptor's revocation basepoint + * For V1 channels: a temporary channel ID, until the funding outpoint is announced + */ + public ChannelId get_temporary_channel_id() { + long ret = bindings.CommonOpenChannelFields_get_temporary_channel_id(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * A temporary channel ID + * For V2 channels: derived using a zeroed out value for the channel acceptor's revocation basepoint + * For V1 channels: a temporary channel ID, until the funding outpoint is announced + */ + public void set_temporary_channel_id(org.ldk.structs.ChannelId val) { + bindings.CommonOpenChannelFields_set_temporary_channel_id(this.ptr, val.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; + } + + /** + * For V1 channels: The channel value + * For V2 channels: Part of the channel value contributed by the channel initiator + */ + public long get_funding_satoshis() { + long ret = bindings.CommonOpenChannelFields_get_funding_satoshis(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * For V1 channels: The channel value + * For V2 channels: Part of the channel value contributed by the channel initiator + */ + public void set_funding_satoshis(long val) { + bindings.CommonOpenChannelFields_set_funding_satoshis(this.ptr, val); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * The threshold below which outputs on transactions broadcast by the channel initiator will be + * omitted + */ + public long get_dust_limit_satoshis() { + long ret = bindings.CommonOpenChannelFields_get_dust_limit_satoshis(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * The threshold below which outputs on transactions broadcast by the channel initiator will be + * omitted + */ + public void set_dust_limit_satoshis(long val) { + bindings.CommonOpenChannelFields_set_dust_limit_satoshis(this.ptr, val); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * The maximum inbound HTLC value in flight towards channel initiator, in milli-satoshi + */ + public long get_max_htlc_value_in_flight_msat() { + long ret = bindings.CommonOpenChannelFields_get_max_htlc_value_in_flight_msat(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * The maximum inbound HTLC value in flight towards channel initiator, in milli-satoshi + */ + public void set_max_htlc_value_in_flight_msat(long val) { + bindings.CommonOpenChannelFields_set_max_htlc_value_in_flight_msat(this.ptr, val); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * The minimum HTLC size incoming to channel initiator, in milli-satoshi + */ + public long get_htlc_minimum_msat() { + long ret = bindings.CommonOpenChannelFields_get_htlc_minimum_msat(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * The minimum HTLC size incoming to channel initiator, in milli-satoshi + */ + public void set_htlc_minimum_msat(long val) { + bindings.CommonOpenChannelFields_set_htlc_minimum_msat(this.ptr, val); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * The feerate for the commitment transaction set by the channel initiator until updated by + * [`UpdateFee`] + */ + public int get_commitment_feerate_sat_per_1000_weight() { + int ret = bindings.CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * The feerate for the commitment transaction set by the channel initiator until updated by + * [`UpdateFee`] + */ + public void set_commitment_feerate_sat_per_1000_weight(int val) { + bindings.CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight(this.ptr, val); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * The number of blocks which the counterparty will have to wait to claim on-chain funds if they + * broadcast a commitment transaction + */ + public short get_to_self_delay() { + short ret = bindings.CommonOpenChannelFields_get_to_self_delay(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * The number of blocks which the counterparty will have to wait to claim on-chain funds if they + * broadcast a commitment transaction + */ + public void set_to_self_delay(short val) { + bindings.CommonOpenChannelFields_set_to_self_delay(this.ptr, val); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * The maximum number of inbound HTLCs towards channel initiator + */ + public short get_max_accepted_htlcs() { + short ret = bindings.CommonOpenChannelFields_get_max_accepted_htlcs(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * The maximum number of inbound HTLCs towards channel initiator + */ + public void set_max_accepted_htlcs(short val) { + bindings.CommonOpenChannelFields_set_max_accepted_htlcs(this.ptr, val); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * The channel initiator's key controlling the funding transaction + */ + public byte[] get_funding_pubkey() { + byte[] ret = bindings.CommonOpenChannelFields_get_funding_pubkey(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * The channel initiator's key controlling the funding transaction + */ + public void set_funding_pubkey(byte[] val) { + bindings.CommonOpenChannelFields_set_funding_pubkey(this.ptr, InternalUtils.check_arr_len(val, 33)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * Used to derive a revocation key for transactions broadcast by counterparty + */ + public byte[] get_revocation_basepoint() { + byte[] ret = bindings.CommonOpenChannelFields_get_revocation_basepoint(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Used to derive a revocation key for transactions broadcast by counterparty + */ + public void set_revocation_basepoint(byte[] val) { + bindings.CommonOpenChannelFields_set_revocation_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * A payment key to channel initiator for transactions broadcast by counterparty + */ + public byte[] get_payment_basepoint() { + byte[] ret = bindings.CommonOpenChannelFields_get_payment_basepoint(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * A payment key to channel initiator for transactions broadcast by counterparty + */ + public void set_payment_basepoint(byte[] val) { + bindings.CommonOpenChannelFields_set_payment_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * Used to derive a payment key to channel initiator for transactions broadcast by channel + * initiator + */ + public byte[] get_delayed_payment_basepoint() { + byte[] ret = bindings.CommonOpenChannelFields_get_delayed_payment_basepoint(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Used to derive a payment key to channel initiator for transactions broadcast by channel + * initiator + */ + public void set_delayed_payment_basepoint(byte[] val) { + bindings.CommonOpenChannelFields_set_delayed_payment_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * Used to derive an HTLC payment key to channel initiator + */ + public byte[] get_htlc_basepoint() { + byte[] ret = bindings.CommonOpenChannelFields_get_htlc_basepoint(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Used to derive an HTLC payment key to channel initiator + */ + public void set_htlc_basepoint(byte[] val) { + bindings.CommonOpenChannelFields_set_htlc_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * The first to-be-broadcast-by-channel-initiator transaction's per commitment point + */ + public byte[] get_first_per_commitment_point() { + byte[] ret = bindings.CommonOpenChannelFields_get_first_per_commitment_point(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * The first to-be-broadcast-by-channel-initiator transaction's per commitment point + */ + public void set_first_per_commitment_point(byte[] val) { + bindings.CommonOpenChannelFields_set_first_per_commitment_point(this.ptr, InternalUtils.check_arr_len(val, 33)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * The channel flags to be used + */ + public byte get_channel_flags() { + byte ret = bindings.CommonOpenChannelFields_get_channel_flags(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * The channel flags to be used + */ + public void set_channel_flags(byte val) { + bindings.CommonOpenChannelFields_set_channel_flags(this.ptr, val); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * Optionally, a request to pre-set the to-channel-initiator output's scriptPubkey for when we + * collaboratively close + */ + public Option_CVec_u8ZZ get_shutdown_scriptpubkey() { + long ret = bindings.CommonOpenChannelFields_get_shutdown_scriptpubkey(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_CVec_u8ZZ ret_hu_conv = org.ldk.structs.Option_CVec_u8ZZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Optionally, a request to pre-set the to-channel-initiator output's scriptPubkey for when we + * collaboratively close + */ + public void set_shutdown_scriptpubkey(org.ldk.structs.Option_CVec_u8ZZ val) { + bindings.CommonOpenChannelFields_set_shutdown_scriptpubkey(this.ptr, val.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; + } + + /** + * The channel type that this channel will represent + * + * If this is `None`, we derive the channel type from the intersection of our + * feature bits with our counterparty's feature bits from the [`Init`] message. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + @Nullable + public ChannelTypeFeatures get_channel_type() { + long ret = bindings.CommonOpenChannelFields_get_channel_type(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelTypeFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelTypeFeatures(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * The channel type that this channel will represent + * + * If this is `None`, we derive the channel type from the intersection of our + * feature bits with our counterparty's feature bits from the [`Init`] message. + * + * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public void set_channel_type(@Nullable org.ldk.structs.ChannelTypeFeatures val) { + bindings.CommonOpenChannelFields_set_channel_type(this.ptr, val == null ? 0 : val.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; + } + + /** + * Constructs a new CommonOpenChannelFields given each field + * + * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public static CommonOpenChannelFields of(byte[] chain_hash_arg, org.ldk.structs.ChannelId temporary_channel_id_arg, long funding_satoshis_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long htlc_minimum_msat_arg, int commitment_feerate_sat_per_1000_weight_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_basepoint_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, byte channel_flags_arg, org.ldk.structs.Option_CVec_u8ZZ shutdown_scriptpubkey_arg, @Nullable org.ldk.structs.ChannelTypeFeatures channel_type_arg) { + long ret = bindings.CommonOpenChannelFields_new(InternalUtils.check_arr_len(chain_hash_arg, 32), temporary_channel_id_arg.ptr, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, commitment_feerate_sat_per_1000_weight_arg, to_self_delay_arg, max_accepted_htlcs_arg, InternalUtils.check_arr_len(funding_pubkey_arg, 33), InternalUtils.check_arr_len(revocation_basepoint_arg, 33), InternalUtils.check_arr_len(payment_basepoint_arg, 33), InternalUtils.check_arr_len(delayed_payment_basepoint_arg, 33), InternalUtils.check_arr_len(htlc_basepoint_arg, 33), InternalUtils.check_arr_len(first_per_commitment_point_arg, 33), channel_flags_arg, shutdown_scriptpubkey_arg.ptr, channel_type_arg == null ? 0 : channel_type_arg.ptr); + Reference.reachabilityFence(chain_hash_arg); + Reference.reachabilityFence(temporary_channel_id_arg); + Reference.reachabilityFence(funding_satoshis_arg); + Reference.reachabilityFence(dust_limit_satoshis_arg); + Reference.reachabilityFence(max_htlc_value_in_flight_msat_arg); + Reference.reachabilityFence(htlc_minimum_msat_arg); + Reference.reachabilityFence(commitment_feerate_sat_per_1000_weight_arg); + Reference.reachabilityFence(to_self_delay_arg); + Reference.reachabilityFence(max_accepted_htlcs_arg); + Reference.reachabilityFence(funding_pubkey_arg); + Reference.reachabilityFence(revocation_basepoint_arg); + Reference.reachabilityFence(payment_basepoint_arg); + Reference.reachabilityFence(delayed_payment_basepoint_arg); + Reference.reachabilityFence(htlc_basepoint_arg); + Reference.reachabilityFence(first_per_commitment_point_arg); + Reference.reachabilityFence(channel_flags_arg); + Reference.reachabilityFence(shutdown_scriptpubkey_arg); + Reference.reachabilityFence(channel_type_arg); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.CommonOpenChannelFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommonOpenChannelFields(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(temporary_channel_id_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(shutdown_scriptpubkey_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_type_arg); }; + return ret_hu_conv; + } + + long clone_ptr() { + long ret = bindings.CommonOpenChannelFields_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a copy of the CommonOpenChannelFields + */ + public CommonOpenChannelFields clone() { + long ret = bindings.CommonOpenChannelFields_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.CommonOpenChannelFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommonOpenChannelFields(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Generates a non-cryptographic 64-bit hash of the CommonOpenChannelFields. + */ + public long hash() { + long ret = bindings.CommonOpenChannelFields_hash(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + @Override public int hashCode() { + return (int)this.hash(); + } + /** + * Checks if two CommonOpenChannelFieldss contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ + public boolean eq(org.ldk.structs.CommonOpenChannelFields b) { + boolean ret = bindings.CommonOpenChannelFields_eq(this.ptr, b.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(b); + if (this != null) { this.ptrs_to.add(b); }; + return ret; + } + + @Override public boolean equals(Object o) { + if (!(o instanceof CommonOpenChannelFields)) return false; + return this.eq((CommonOpenChannelFields)o); + } +} diff --git a/src/main/java/org/ldk/structs/Confirm.java b/src/main/java/org/ldk/structs/Confirm.java index df067cae..1c9e6629 100644 --- a/src/main/java/org/ldk/structs/Confirm.java +++ b/src/main/java/org/ldk/structs/Confirm.java @@ -159,7 +159,7 @@ public class Confirm extends CommonBase { @Override public long[] get_relevant_txids() { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ[] ret = arg.get_relevant_txids(); Reference.reachabilityFence(arg); - long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_54 -> ret_conv_54 == null ? 0 : ret_conv_54.clone_ptr()).toArray() : null; + long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_54 -> ret_conv_54.clone_ptr()).toArray() : null; return result; } }); @@ -181,7 +181,7 @@ public class Confirm extends CommonBase { * [`best_block_updated`]: Self::best_block_updated */ public void transactions_confirmed(byte[] header, TwoTuple_usizeTransactionZ[] txdata, int height) { - bindings.Confirm_transactions_confirmed(this.ptr, InternalUtils.check_arr_len(header, 80), txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_28 -> txdata_conv_28 != null ? txdata_conv_28.ptr : 0).toArray() : null, height); + bindings.Confirm_transactions_confirmed(this.ptr, InternalUtils.check_arr_len(header, 80), txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_28 -> txdata_conv_28.ptr).toArray() : null, height); Reference.reachabilityFence(this); Reference.reachabilityFence(header); Reference.reachabilityFence(txdata); diff --git a/src/main/java/org/ldk/structs/CounterpartyChannelTransactionParameters.java b/src/main/java/org/ldk/structs/CounterpartyChannelTransactionParameters.java index ce9db644..4d46bb4a 100644 --- a/src/main/java/org/ldk/structs/CounterpartyChannelTransactionParameters.java +++ b/src/main/java/org/ldk/structs/CounterpartyChannelTransactionParameters.java @@ -36,7 +36,7 @@ public class CounterpartyChannelTransactionParameters extends CommonBase { * Counter-party public keys */ public void set_pubkeys(org.ldk.structs.ChannelPublicKeys val) { - bindings.CounterpartyChannelTransactionParameters_set_pubkeys(this.ptr, val == null ? 0 : val.ptr); + bindings.CounterpartyChannelTransactionParameters_set_pubkeys(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -64,7 +64,7 @@ public class CounterpartyChannelTransactionParameters extends CommonBase { * Constructs a new CounterpartyChannelTransactionParameters given each field */ public static CounterpartyChannelTransactionParameters of(org.ldk.structs.ChannelPublicKeys pubkeys_arg, short selected_contest_delay_arg) { - long ret = bindings.CounterpartyChannelTransactionParameters_new(pubkeys_arg == null ? 0 : pubkeys_arg.ptr, selected_contest_delay_arg); + long ret = bindings.CounterpartyChannelTransactionParameters_new(pubkeys_arg.ptr, selected_contest_delay_arg); Reference.reachabilityFence(pubkeys_arg); Reference.reachabilityFence(selected_contest_delay_arg); if (ret >= 0 && ret <= 4096) { return null; } @@ -110,7 +110,7 @@ public class CounterpartyChannelTransactionParameters extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.CounterpartyChannelTransactionParameters b) { - boolean ret = bindings.CounterpartyChannelTransactionParameters_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.CounterpartyChannelTransactionParameters_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/CustomMessageHandler.java b/src/main/java/org/ldk/structs/CustomMessageHandler.java index b41d1a9a..5ca8853c 100644 --- a/src/main/java/org/ldk/structs/CustomMessageHandler.java +++ b/src/main/java/org/ldk/structs/CustomMessageHandler.java @@ -83,25 +83,25 @@ public class CustomMessageHandler extends CommonBase { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; Result_NoneLightningErrorZ ret = arg.handle_custom_message(ret_hu_conv, sender_node_id); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long[] get_and_clear_pending_msg() { TwoTuple_PublicKeyTypeZ[] ret = arg.get_and_clear_pending_msg(); Reference.reachabilityFence(arg); - long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_25 -> ret_conv_25 == null ? 0 : ret_conv_25.clone_ptr()).toArray() : null; + long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_25 -> ret_conv_25.clone_ptr()).toArray() : null; return result; } @Override public long provided_node_features() { NodeFeatures ret = arg.provided_node_features(); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long provided_init_features(byte[] their_node_id) { InitFeatures ret = arg.provided_init_features(their_node_id); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } }, CustomMessageReader.new_impl(CustomMessageReader_impl).bindings_instance); diff --git a/src/main/java/org/ldk/structs/CustomMessageReader.java b/src/main/java/org/ldk/structs/CustomMessageReader.java index fa2720f1..2ee51919 100644 --- a/src/main/java/org/ldk/structs/CustomMessageReader.java +++ b/src/main/java/org/ldk/structs/CustomMessageReader.java @@ -53,7 +53,7 @@ public class CustomMessageReader extends CommonBase { @Override public long read(short message_type, byte[] buffer) { Result_COption_TypeZDecodeErrorZ ret = arg.read(message_type, buffer); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } }); diff --git a/src/main/java/org/ldk/structs/CustomOnionMessageHandler.java b/src/main/java/org/ldk/structs/CustomOnionMessageHandler.java index 4c52481f..6a1e2be4 100644 --- a/src/main/java/org/ldk/structs/CustomOnionMessageHandler.java +++ b/src/main/java/org/ldk/structs/CustomOnionMessageHandler.java @@ -74,20 +74,20 @@ public class CustomOnionMessageHandler extends CommonBase { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; Option_OnionMessageContentsZ ret = arg.handle_custom_message(ret_hu_conv); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); if (impl_holder.held != null) { impl_holder.held.ptrs_to.add(ret); }; return result; } @Override public long read_custom_message(long message_type, byte[] buffer) { Result_COption_OnionMessageContentsZDecodeErrorZ ret = arg.read_custom_message(message_type, buffer); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long[] release_pending_custom_messages() { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ[] ret = arg.release_pending_custom_messages(); Reference.reachabilityFence(arg); - long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_56 -> ret_conv_56 == null ? 0 : ret_conv_56.clone_ptr()).toArray() : null; + long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_56 -> ret_conv_56.clone_ptr()).toArray() : null; return result; } }); diff --git a/src/main/java/org/ldk/structs/DecodeError.java b/src/main/java/org/ldk/structs/DecodeError.java index 5ad42b28..24739629 100644 --- a/src/main/java/org/ldk/structs/DecodeError.java +++ b/src/main/java/org/ldk/structs/DecodeError.java @@ -42,6 +42,9 @@ public class DecodeError extends CommonBase { if (raw_val.getClass() == bindings.LDKDecodeError.UnsupportedCompression.class) { return new UnsupportedCompression(ptr, (bindings.LDKDecodeError.UnsupportedCompression)raw_val); } + if (raw_val.getClass() == bindings.LDKDecodeError.DangerousValue.class) { + return new DangerousValue(ptr, (bindings.LDKDecodeError.DangerousValue)raw_val); + } assert false; return null; // Unreachable without extending the (internal) bindings interface } @@ -109,6 +112,22 @@ public class DecodeError extends CommonBase { super(null, ptr); } } + /** + * Value is validly encoded but is dangerous to use. + * + * This is used for things like [`ChannelManager`] deserialization where we want to ensure + * that we don't use a [`ChannelManager`] which is in out of sync with the [`ChannelMonitor`]. + * This indicates that there is a critical implementation flaw in the storage implementation + * and it's unsafe to continue. + * + * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager + * [`ChannelMonitor`]: crate::chain::channelmonitor::ChannelMonitor + */ + public final static class DangerousValue extends DecodeError { + private DangerousValue(long ptr, bindings.LDKDecodeError.DangerousValue obj) { + super(null, ptr); + } + } long clone_ptr() { long ret = bindings.DecodeError_clone_ptr(this.ptr); Reference.reachabilityFence(this); @@ -205,6 +224,17 @@ public class DecodeError extends CommonBase { return ret_hu_conv; } + /** + * Utility method to constructs a new DangerousValue-variant DecodeError + */ + public static DecodeError dangerous_value() { + long ret = bindings.DecodeError_dangerous_value(); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.DecodeError ret_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + /** * Generates a non-cryptographic 64-bit hash of the DecodeError. */ @@ -222,7 +252,7 @@ public class DecodeError extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public boolean eq(org.ldk.structs.DecodeError b) { - boolean ret = bindings.DecodeError_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.DecodeError_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); return ret; diff --git a/src/main/java/org/ldk/structs/DefaultMessageRouter.java b/src/main/java/org/ldk/structs/DefaultMessageRouter.java index 11ddcb87..24ce1e4b 100644 --- a/src/main/java/org/ldk/structs/DefaultMessageRouter.java +++ b/src/main/java/org/ldk/structs/DefaultMessageRouter.java @@ -24,7 +24,7 @@ public class DefaultMessageRouter extends CommonBase { * Creates a [`DefaultMessageRouter`] using the given [`NetworkGraph`]. */ public static DefaultMessageRouter of(org.ldk.structs.NetworkGraph network_graph, org.ldk.structs.EntropySource entropy_source) { - long ret = bindings.DefaultMessageRouter_new(network_graph == null ? 0 : network_graph.ptr, entropy_source.ptr); + long ret = bindings.DefaultMessageRouter_new(network_graph.ptr, entropy_source.ptr); Reference.reachabilityFence(network_graph); Reference.reachabilityFence(entropy_source); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/src/main/java/org/ldk/structs/DefaultRouter.java b/src/main/java/org/ldk/structs/DefaultRouter.java index 57d78568..ef86bda3 100644 --- a/src/main/java/org/ldk/structs/DefaultRouter.java +++ b/src/main/java/org/ldk/structs/DefaultRouter.java @@ -24,7 +24,7 @@ public class DefaultRouter extends CommonBase { * Creates a new router. */ public static DefaultRouter of(org.ldk.structs.NetworkGraph network_graph, org.ldk.structs.Logger logger, org.ldk.structs.EntropySource entropy_source, org.ldk.structs.LockableScore scorer, org.ldk.structs.ProbabilisticScoringFeeParameters score_params) { - long ret = bindings.DefaultRouter_new(network_graph == null ? 0 : network_graph.ptr, logger.ptr, entropy_source.ptr, scorer.ptr, score_params == null ? 0 : score_params.ptr); + long ret = bindings.DefaultRouter_new(network_graph.ptr, logger.ptr, entropy_source.ptr, scorer.ptr, score_params.ptr); Reference.reachabilityFence(network_graph); Reference.reachabilityFence(logger); Reference.reachabilityFence(entropy_source); diff --git a/src/main/java/org/ldk/structs/DelayedPaymentBasepoint.java b/src/main/java/org/ldk/structs/DelayedPaymentBasepoint.java index 9170bb89..a454f7e5 100644 --- a/src/main/java/org/ldk/structs/DelayedPaymentBasepoint.java +++ b/src/main/java/org/ldk/structs/DelayedPaymentBasepoint.java @@ -54,7 +54,7 @@ public class DelayedPaymentBasepoint extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.DelayedPaymentBasepoint b) { - boolean ret = bindings.DelayedPaymentBasepoint_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.DelayedPaymentBasepoint_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; @@ -104,6 +104,16 @@ public class DelayedPaymentBasepoint extends CommonBase { return ret; } + /** + * Derives the \"tweak\" used in calculate [`DelayedPaymentKey::from_basepoint`].\n\n[`DelayedPaymentKey::from_basepoint`] calculates a private key as:\n`privkey = basepoint_secret + SHA256(per_commitment_point || basepoint)`\n\nThis calculates the hash part in the tweak derivation process, which is used to\nensure that each key is unique and cannot be guessed by an external party. + */ + public byte[] derive_add_tweak(byte[] per_commitment_point) { + byte[] ret = bindings.DelayedPaymentBasepoint_derive_add_tweak(this.ptr, InternalUtils.check_arr_len(per_commitment_point, 33)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(per_commitment_point); + return ret; + } + /** * Serialize the DelayedPaymentBasepoint object into a byte array which can be read by DelayedPaymentBasepoint_read */ diff --git a/src/main/java/org/ldk/structs/DelayedPaymentKey.java b/src/main/java/org/ldk/structs/DelayedPaymentKey.java index 75be01fc..a849ce5c 100644 --- a/src/main/java/org/ldk/structs/DelayedPaymentKey.java +++ b/src/main/java/org/ldk/structs/DelayedPaymentKey.java @@ -58,7 +58,7 @@ public class DelayedPaymentKey extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.DelayedPaymentKey b) { - boolean ret = bindings.DelayedPaymentKey_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.DelayedPaymentKey_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; @@ -91,7 +91,7 @@ public class DelayedPaymentKey extends CommonBase { * Derive a public delayedpubkey using one node\'s `per_commitment_point` and its countersignatory\'s `basepoint` */ public static DelayedPaymentKey from_basepoint(org.ldk.structs.DelayedPaymentBasepoint countersignatory_basepoint, byte[] per_commitment_point) { - long ret = bindings.DelayedPaymentKey_from_basepoint(countersignatory_basepoint == null ? 0 : countersignatory_basepoint.ptr, InternalUtils.check_arr_len(per_commitment_point, 33)); + long ret = bindings.DelayedPaymentKey_from_basepoint(countersignatory_basepoint.ptr, InternalUtils.check_arr_len(per_commitment_point, 33)); Reference.reachabilityFence(countersignatory_basepoint); Reference.reachabilityFence(per_commitment_point); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/src/main/java/org/ldk/structs/DelayedPaymentOutputDescriptor.java b/src/main/java/org/ldk/structs/DelayedPaymentOutputDescriptor.java index e9ba8607..efaecbcc 100644 --- a/src/main/java/org/ldk/structs/DelayedPaymentOutputDescriptor.java +++ b/src/main/java/org/ldk/structs/DelayedPaymentOutputDescriptor.java @@ -38,7 +38,7 @@ public class DelayedPaymentOutputDescriptor extends CommonBase { * The outpoint which is spendable. */ public void set_outpoint(org.ldk.structs.OutPoint val) { - bindings.DelayedPaymentOutputDescriptor_set_outpoint(this.ptr, val == null ? 0 : val.ptr); + bindings.DelayedPaymentOutputDescriptor_set_outpoint(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -120,7 +120,7 @@ public class DelayedPaymentOutputDescriptor extends CommonBase { * derive the witnessScript for this output. */ public void set_revocation_pubkey(org.ldk.structs.RevocationKey val) { - bindings.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this.ptr, val == null ? 0 : val.ptr); + bindings.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -164,11 +164,46 @@ public class DelayedPaymentOutputDescriptor extends CommonBase { Reference.reachabilityFence(val); } + /** + * The channel public keys and other parameters needed to generate a spending transaction or + * to provide to a re-derived signer through [`ChannelSigner::provide_channel_parameters`]. + * + * Added as optional, but always `Some` if the descriptor was produced in v0.0.123 or later. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + @Nullable + public ChannelTransactionParameters get_channel_transaction_parameters() { + long ret = bindings.DelayedPaymentOutputDescriptor_get_channel_transaction_parameters(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelTransactionParameters ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelTransactionParameters(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * The channel public keys and other parameters needed to generate a spending transaction or + * to provide to a re-derived signer through [`ChannelSigner::provide_channel_parameters`]. + * + * Added as optional, but always `Some` if the descriptor was produced in v0.0.123 or later. + * + * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public void set_channel_transaction_parameters(@Nullable org.ldk.structs.ChannelTransactionParameters val) { + bindings.DelayedPaymentOutputDescriptor_set_channel_transaction_parameters(this.ptr, val == null ? 0 : val.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; + } + /** * Constructs a new DelayedPaymentOutputDescriptor given each field + * + * Note that channel_transaction_parameters_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public static DelayedPaymentOutputDescriptor of(org.ldk.structs.OutPoint outpoint_arg, byte[] per_commitment_point_arg, short to_self_delay_arg, org.ldk.structs.TxOut output_arg, org.ldk.structs.RevocationKey revocation_pubkey_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg) { - long ret = bindings.DelayedPaymentOutputDescriptor_new(outpoint_arg == null ? 0 : outpoint_arg.ptr, InternalUtils.check_arr_len(per_commitment_point_arg, 33), to_self_delay_arg, output_arg.ptr, revocation_pubkey_arg == null ? 0 : revocation_pubkey_arg.ptr, InternalUtils.check_arr_len(channel_keys_id_arg, 32), channel_value_satoshis_arg); + public static DelayedPaymentOutputDescriptor of(org.ldk.structs.OutPoint outpoint_arg, byte[] per_commitment_point_arg, short to_self_delay_arg, org.ldk.structs.TxOut output_arg, org.ldk.structs.RevocationKey revocation_pubkey_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg, @Nullable org.ldk.structs.ChannelTransactionParameters channel_transaction_parameters_arg) { + long ret = bindings.DelayedPaymentOutputDescriptor_new(outpoint_arg.ptr, InternalUtils.check_arr_len(per_commitment_point_arg, 33), to_self_delay_arg, output_arg.ptr, revocation_pubkey_arg.ptr, InternalUtils.check_arr_len(channel_keys_id_arg, 32), channel_value_satoshis_arg, channel_transaction_parameters_arg == null ? 0 : channel_transaction_parameters_arg.ptr); Reference.reachabilityFence(outpoint_arg); Reference.reachabilityFence(per_commitment_point_arg); Reference.reachabilityFence(to_self_delay_arg); @@ -176,11 +211,13 @@ public class DelayedPaymentOutputDescriptor extends CommonBase { Reference.reachabilityFence(revocation_pubkey_arg); Reference.reachabilityFence(channel_keys_id_arg); Reference.reachabilityFence(channel_value_satoshis_arg); + Reference.reachabilityFence(channel_transaction_parameters_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.DelayedPaymentOutputDescriptor ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.DelayedPaymentOutputDescriptor(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(outpoint_arg); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(revocation_pubkey_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_transaction_parameters_arg); }; return ret_hu_conv; } @@ -220,7 +257,7 @@ public class DelayedPaymentOutputDescriptor extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.DelayedPaymentOutputDescriptor b) { - boolean ret = bindings.DelayedPaymentOutputDescriptor_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.DelayedPaymentOutputDescriptor_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/Description.java b/src/main/java/org/ldk/structs/Description.java index 1ce3581d..0e203016 100644 --- a/src/main/java/org/ldk/structs/Description.java +++ b/src/main/java/org/ldk/structs/Description.java @@ -59,7 +59,7 @@ public class Description extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.Description b) { - boolean ret = bindings.Description_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.Description_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/Destination.java b/src/main/java/org/ldk/structs/Destination.java index e41c8223..dd4febe4 100644 --- a/src/main/java/org/ldk/structs/Destination.java +++ b/src/main/java/org/ldk/structs/Destination.java @@ -87,7 +87,7 @@ public class Destination extends CommonBase { * Utility method to constructs a new BlindedPath-variant Destination */ public static Destination blinded_path(org.ldk.structs.BlindedPath a) { - long ret = bindings.Destination_blinded_path(a == null ? 0 : a.ptr); + long ret = bindings.Destination_blinded_path(a.ptr); Reference.reachabilityFence(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Destination ret_hu_conv = org.ldk.structs.Destination.constr_from_ptr(ret); @@ -96,4 +96,43 @@ public class Destination extends CommonBase { return ret_hu_conv; } + /** + * Generates a non-cryptographic 64-bit hash of the Destination. + */ + public long hash() { + long ret = bindings.Destination_hash(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + @Override public int hashCode() { + return (int)this.hash(); + } + /** + * Checks if two Destinations contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + */ + public boolean eq(org.ldk.structs.Destination b) { + boolean ret = bindings.Destination_eq(this.ptr, b.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(b); + return ret; + } + + @Override public boolean equals(Object o) { + if (!(o instanceof Destination)) return false; + return this.eq((Destination)o); + } + /** + * Attempts to resolve the [`IntroductionNode::DirectedShortChannelId`] of a + * [`Destination::BlindedPath`] to a [`IntroductionNode::NodeId`], if applicable, using the + * provided [`ReadOnlyNetworkGraph`]. + */ + public void resolve(org.ldk.structs.ReadOnlyNetworkGraph network_graph) { + bindings.Destination_resolve(this.ptr, network_graph.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(network_graph); + if (this != null) { this.ptrs_to.add(network_graph); }; + } + } diff --git a/src/main/java/org/ldk/structs/DirectedChannelInfo.java b/src/main/java/org/ldk/structs/DirectedChannelInfo.java index 4be03838..c3b0714f 100644 --- a/src/main/java/org/ldk/structs/DirectedChannelInfo.java +++ b/src/main/java/org/ldk/structs/DirectedChannelInfo.java @@ -67,4 +67,32 @@ public class DirectedChannelInfo extends CommonBase { return ret_hu_conv; } + /** + * Returns the `node_id` of the source hop. + * + * Refers to the `node_id` forwarding the payment to the next hop. + */ + public NodeId source() { + long ret = bindings.DirectedChannelInfo_source(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.NodeId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.NodeId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Returns the `node_id` of the target hop. + * + * Refers to the `node_id` receiving the payment from the previous hop. + */ + public NodeId target() { + long ret = bindings.DirectedChannelInfo_target(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.NodeId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.NodeId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + } diff --git a/src/main/java/org/ldk/structs/EcdsaChannelSigner.java b/src/main/java/org/ldk/structs/EcdsaChannelSigner.java index a84b6c71..d5478d36 100644 --- a/src/main/java/org/ldk/structs/EcdsaChannelSigner.java +++ b/src/main/java/org/ldk/structs/EcdsaChannelSigner.java @@ -21,7 +21,7 @@ public class EcdsaChannelSigner extends CommonBase { final bindings.LDKEcdsaChannelSigner bindings_instance; EcdsaChannelSigner(Object _dummy, long ptr) { super(ptr); bindings_instance = null; } private EcdsaChannelSigner(bindings.LDKEcdsaChannelSigner arg, bindings.LDKChannelSigner ChannelSigner, ChannelPublicKeys pubkeys) { - super(bindings.LDKEcdsaChannelSigner_new(arg, ChannelSigner, pubkeys == null ? 0 : pubkeys.clone_ptr())); + super(bindings.LDKEcdsaChannelSigner_new(arg, ChannelSigner, pubkeys.clone_ptr())); this.ptrs_to.add(arg); this.ptrs_to.add(ChannelSigner); this.bindings_instance = arg; @@ -71,6 +71,13 @@ public class EcdsaChannelSigner extends CommonBase { * This may be called multiple times for the same transaction. * * An external signer implementation should check that the commitment has not been revoked. + * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ Result_ECDSASignatureNoneZ sign_holder_commitment(HolderCommitmentTransaction commitment_tx); /** @@ -88,6 +95,13 @@ public class EcdsaChannelSigner extends CommonBase { * revoked the state which they eventually broadcast. It's not a _holder_ secret key and does * not allow the spending of any funds by itself (you need our holder `revocation_secret` to do * so). + * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ Result_ECDSASignatureNoneZ sign_justice_revoked_output(byte[] justice_tx, long input, long amount, byte[] per_commitment_key); /** @@ -109,6 +123,13 @@ public class EcdsaChannelSigner extends CommonBase { * * `htlc` holds HTLC elements (hash, timelock), thus changing the format of the witness script * (which is committed to in the BIP 143 signatures). + * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ Result_ECDSASignatureNoneZ sign_justice_revoked_htlc(byte[] justice_tx, long input, long amount, byte[] per_commitment_key, HTLCOutputInCommitment htlc); /** @@ -120,8 +141,14 @@ public class EcdsaChannelSigner extends CommonBase { * [`ChannelMonitor`] [replica](https://github.com/lightningdevkit/rust-lightning/blob/main/GLOSSARY.md#monitor-replicas) * broadcasts it before receiving the update for the latest commitment transaction. * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * * [`EcdsaSighashType::All`]: bitcoin::sighash::EcdsaSighashType::All * [`ChannelMonitor`]: crate::chain::channelmonitor::ChannelMonitor + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ Result_ECDSASignatureNoneZ sign_holder_htlc_transaction(byte[] htlc_tx, long input, HTLCDescriptor htlc_descriptor); /** @@ -142,6 +169,13 @@ public class EcdsaChannelSigner extends CommonBase { * detected onchain. It has been generated by our counterparty and is used to derive * channel state keys, which are then included in the witness script and committed to in the * BIP 143 signature. + * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ Result_ECDSASignatureNoneZ sign_counterparty_htlc_transaction(byte[] htlc_tx, long input, long amount, byte[] per_commitment_point, HTLCOutputInCommitment htlc); /** @@ -154,6 +188,13 @@ public class EcdsaChannelSigner extends CommonBase { /** * Computes the signature for a commitment transaction's anchor output used as an * input within `anchor_tx`, which spends the commitment transaction, at index `input`. + * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ Result_ECDSASignatureNoneZ sign_holder_anchor_input(byte[] anchor_tx, long input); /** @@ -179,61 +220,61 @@ public class EcdsaChannelSigner extends CommonBase { org.ldk.structs.CommitmentTransaction commitment_tx_hu_conv = null; if (commitment_tx < 0 || commitment_tx > 4096) { commitment_tx_hu_conv = new org.ldk.structs.CommitmentTransaction(null, commitment_tx); } Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ ret = arg.sign_counterparty_commitment(commitment_tx_hu_conv, inbound_htlc_preimages, outbound_htlc_preimages); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long sign_holder_commitment(long commitment_tx) { org.ldk.structs.HolderCommitmentTransaction commitment_tx_hu_conv = null; if (commitment_tx < 0 || commitment_tx > 4096) { commitment_tx_hu_conv = new org.ldk.structs.HolderCommitmentTransaction(null, commitment_tx); } Result_ECDSASignatureNoneZ ret = arg.sign_holder_commitment(commitment_tx_hu_conv); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long sign_justice_revoked_output(byte[] justice_tx, long input, long amount, byte[] per_commitment_key) { Result_ECDSASignatureNoneZ ret = arg.sign_justice_revoked_output(justice_tx, input, amount, per_commitment_key); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long sign_justice_revoked_htlc(byte[] justice_tx, long input, long amount, byte[] per_commitment_key, long htlc) { org.ldk.structs.HTLCOutputInCommitment htlc_hu_conv = null; if (htlc < 0 || htlc > 4096) { htlc_hu_conv = new org.ldk.structs.HTLCOutputInCommitment(null, htlc); } Result_ECDSASignatureNoneZ ret = arg.sign_justice_revoked_htlc(justice_tx, input, amount, per_commitment_key, htlc_hu_conv); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long sign_holder_htlc_transaction(byte[] htlc_tx, long input, long htlc_descriptor) { org.ldk.structs.HTLCDescriptor htlc_descriptor_hu_conv = null; if (htlc_descriptor < 0 || htlc_descriptor > 4096) { htlc_descriptor_hu_conv = new org.ldk.structs.HTLCDescriptor(null, htlc_descriptor); } Result_ECDSASignatureNoneZ ret = arg.sign_holder_htlc_transaction(htlc_tx, input, htlc_descriptor_hu_conv); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long sign_counterparty_htlc_transaction(byte[] htlc_tx, long input, long amount, byte[] per_commitment_point, long htlc) { org.ldk.structs.HTLCOutputInCommitment htlc_hu_conv = null; if (htlc < 0 || htlc > 4096) { htlc_hu_conv = new org.ldk.structs.HTLCOutputInCommitment(null, htlc); } Result_ECDSASignatureNoneZ ret = arg.sign_counterparty_htlc_transaction(htlc_tx, input, amount, per_commitment_point, htlc_hu_conv); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long sign_closing_transaction(long closing_tx) { org.ldk.structs.ClosingTransaction closing_tx_hu_conv = null; if (closing_tx < 0 || closing_tx > 4096) { closing_tx_hu_conv = new org.ldk.structs.ClosingTransaction(null, closing_tx); } Result_ECDSASignatureNoneZ ret = arg.sign_closing_transaction(closing_tx_hu_conv); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long sign_holder_anchor_input(byte[] anchor_tx, long input) { Result_ECDSASignatureNoneZ ret = arg.sign_holder_anchor_input(anchor_tx, input); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long sign_channel_announcement_with_funding_key(long msg) { org.ldk.structs.UnsignedChannelAnnouncement msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.UnsignedChannelAnnouncement(null, msg); } Result_ECDSASignatureNoneZ ret = arg.sign_channel_announcement_with_funding_key(msg_hu_conv); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } }, ChannelSigner.new_impl(ChannelSigner_impl, pubkeys).bindings_instance, pubkeys); @@ -266,7 +307,7 @@ public class EcdsaChannelSigner extends CommonBase { * irrelevant or duplicate preimages. */ public Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ sign_counterparty_commitment(org.ldk.structs.CommitmentTransaction commitment_tx, byte[][] inbound_htlc_preimages, byte[][] outbound_htlc_preimages) { - long ret = bindings.EcdsaChannelSigner_sign_counterparty_commitment(this.ptr, commitment_tx == null ? 0 : commitment_tx.ptr, inbound_htlc_preimages != null ? Arrays.stream(inbound_htlc_preimages).map(inbound_htlc_preimages_conv_8 -> InternalUtils.check_arr_len(inbound_htlc_preimages_conv_8, 32)).toArray(byte[][]::new) : null, outbound_htlc_preimages != null ? Arrays.stream(outbound_htlc_preimages).map(outbound_htlc_preimages_conv_8 -> InternalUtils.check_arr_len(outbound_htlc_preimages_conv_8, 32)).toArray(byte[][]::new) : null); + long ret = bindings.EcdsaChannelSigner_sign_counterparty_commitment(this.ptr, commitment_tx.ptr, inbound_htlc_preimages != null ? Arrays.stream(inbound_htlc_preimages).map(inbound_htlc_preimages_conv_8 -> InternalUtils.check_arr_len(inbound_htlc_preimages_conv_8, 32)).toArray(byte[][]::new) : null, outbound_htlc_preimages != null ? Arrays.stream(outbound_htlc_preimages).map(outbound_htlc_preimages_conv_8 -> InternalUtils.check_arr_len(outbound_htlc_preimages_conv_8, 32)).toArray(byte[][]::new) : null); Reference.reachabilityFence(this); Reference.reachabilityFence(commitment_tx); Reference.reachabilityFence(inbound_htlc_preimages); @@ -287,9 +328,16 @@ public class EcdsaChannelSigner extends CommonBase { * This may be called multiple times for the same transaction. * * An external signer implementation should check that the commitment has not been revoked. + * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ public Result_ECDSASignatureNoneZ sign_holder_commitment(org.ldk.structs.HolderCommitmentTransaction commitment_tx) { - long ret = bindings.EcdsaChannelSigner_sign_holder_commitment(this.ptr, commitment_tx == null ? 0 : commitment_tx.ptr); + long ret = bindings.EcdsaChannelSigner_sign_holder_commitment(this.ptr, commitment_tx.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(commitment_tx); if (ret >= 0 && ret <= 4096) { return null; } @@ -313,6 +361,13 @@ public class EcdsaChannelSigner extends CommonBase { * revoked the state which they eventually broadcast. It's not a _holder_ secret key and does * not allow the spending of any funds by itself (you need our holder `revocation_secret` to do * so). + * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ public Result_ECDSASignatureNoneZ sign_justice_revoked_output(byte[] justice_tx, long input, long amount, byte[] per_commitment_key) { long ret = bindings.EcdsaChannelSigner_sign_justice_revoked_output(this.ptr, justice_tx, input, amount, InternalUtils.check_arr_len(per_commitment_key, 32)); @@ -345,9 +400,16 @@ public class EcdsaChannelSigner extends CommonBase { * * `htlc` holds HTLC elements (hash, timelock), thus changing the format of the witness script * (which is committed to in the BIP 143 signatures). + * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ public Result_ECDSASignatureNoneZ sign_justice_revoked_htlc(byte[] justice_tx, long input, long amount, byte[] per_commitment_key, org.ldk.structs.HTLCOutputInCommitment htlc) { - long ret = bindings.EcdsaChannelSigner_sign_justice_revoked_htlc(this.ptr, justice_tx, input, amount, InternalUtils.check_arr_len(per_commitment_key, 32), htlc == null ? 0 : htlc.ptr); + long ret = bindings.EcdsaChannelSigner_sign_justice_revoked_htlc(this.ptr, justice_tx, input, amount, InternalUtils.check_arr_len(per_commitment_key, 32), htlc.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(justice_tx); Reference.reachabilityFence(input); @@ -369,11 +431,17 @@ public class EcdsaChannelSigner extends CommonBase { * [`ChannelMonitor`] [replica](https://github.com/lightningdevkit/rust-lightning/blob/main/GLOSSARY.md#monitor-replicas) * broadcasts it before receiving the update for the latest commitment transaction. * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * * [`EcdsaSighashType::All`]: bitcoin::sighash::EcdsaSighashType::All * [`ChannelMonitor`]: crate::chain::channelmonitor::ChannelMonitor + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ public Result_ECDSASignatureNoneZ sign_holder_htlc_transaction(byte[] htlc_tx, long input, org.ldk.structs.HTLCDescriptor htlc_descriptor) { - long ret = bindings.EcdsaChannelSigner_sign_holder_htlc_transaction(this.ptr, htlc_tx, input, htlc_descriptor == null ? 0 : htlc_descriptor.ptr); + long ret = bindings.EcdsaChannelSigner_sign_holder_htlc_transaction(this.ptr, htlc_tx, input, htlc_descriptor.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(htlc_tx); Reference.reachabilityFence(input); @@ -402,9 +470,16 @@ public class EcdsaChannelSigner extends CommonBase { * detected onchain. It has been generated by our counterparty and is used to derive * channel state keys, which are then included in the witness script and committed to in the * BIP 143 signature. + * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ public Result_ECDSASignatureNoneZ sign_counterparty_htlc_transaction(byte[] htlc_tx, long input, long amount, byte[] per_commitment_point, org.ldk.structs.HTLCOutputInCommitment htlc) { - long ret = bindings.EcdsaChannelSigner_sign_counterparty_htlc_transaction(this.ptr, htlc_tx, input, amount, InternalUtils.check_arr_len(per_commitment_point, 33), htlc == null ? 0 : htlc.ptr); + long ret = bindings.EcdsaChannelSigner_sign_counterparty_htlc_transaction(this.ptr, htlc_tx, input, amount, InternalUtils.check_arr_len(per_commitment_point, 33), htlc.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(htlc_tx); Reference.reachabilityFence(input); @@ -424,7 +499,7 @@ public class EcdsaChannelSigner extends CommonBase { * chosen to forgo their output as dust. */ public Result_ECDSASignatureNoneZ sign_closing_transaction(org.ldk.structs.ClosingTransaction closing_tx) { - long ret = bindings.EcdsaChannelSigner_sign_closing_transaction(this.ptr, closing_tx == null ? 0 : closing_tx.ptr); + long ret = bindings.EcdsaChannelSigner_sign_closing_transaction(this.ptr, closing_tx.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(closing_tx); if (ret >= 0 && ret <= 4096) { return null; } @@ -436,6 +511,13 @@ public class EcdsaChannelSigner extends CommonBase { /** * Computes the signature for a commitment transaction's anchor output used as an * input within `anchor_tx`, which spends the commitment transaction, at index `input`. + * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ public Result_ECDSASignatureNoneZ sign_holder_anchor_input(byte[] anchor_tx, long input) { long ret = bindings.EcdsaChannelSigner_sign_holder_anchor_input(this.ptr, anchor_tx, input); @@ -461,7 +543,7 @@ public class EcdsaChannelSigner extends CommonBase { * [`NodeSigner::sign_gossip_message`]: crate::sign::NodeSigner::sign_gossip_message */ public Result_ECDSASignatureNoneZ sign_channel_announcement_with_funding_key(org.ldk.structs.UnsignedChannelAnnouncement msg) { - long ret = bindings.EcdsaChannelSigner_sign_channel_announcement_with_funding_key(this.ptr, msg == null ? 0 : msg.ptr); + long ret = bindings.EcdsaChannelSigner_sign_channel_announcement_with_funding_key(this.ptr, msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/src/main/java/org/ldk/structs/EmptyNodeIdLookUp.java b/src/main/java/org/ldk/structs/EmptyNodeIdLookUp.java new file mode 100644 index 00000000..b1472d55 --- /dev/null +++ b/src/main/java/org/ldk/structs/EmptyNodeIdLookUp.java @@ -0,0 +1,47 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + + +/** + * A [`NodeIdLookUp`] that always returns `None`. + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class EmptyNodeIdLookUp extends CommonBase { + EmptyNodeIdLookUp(Object _dummy, long ptr) { super(ptr); } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + if (ptr != 0) { bindings.EmptyNodeIdLookUp_free(ptr); } + } + + /** + * Constructs a new EmptyNodeIdLookUp given each field + */ + public static EmptyNodeIdLookUp of() { + long ret = bindings.EmptyNodeIdLookUp_new(); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.EmptyNodeIdLookUp ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.EmptyNodeIdLookUp(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Constructs a new NodeIdLookUp which calls the relevant methods on this_arg. + * This copies the `inner` pointer in this_arg and thus the returned NodeIdLookUp must be freed before this_arg is + */ + public NodeIdLookUp as_NodeIdLookUp() { + long ret = bindings.EmptyNodeIdLookUp_as_NodeIdLookUp(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + NodeIdLookUp ret_hu_conv = new NodeIdLookUp(null, ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/ErrorAction.java b/src/main/java/org/ldk/structs/ErrorAction.java index 4c082212..fbbc2384 100644 --- a/src/main/java/org/ldk/structs/ErrorAction.java +++ b/src/main/java/org/ldk/structs/ErrorAction.java @@ -169,7 +169,7 @@ public class ErrorAction extends CommonBase { * Utility method to constructs a new DisconnectPeer-variant ErrorAction */ public static ErrorAction disconnect_peer(org.ldk.structs.ErrorMessage msg) { - long ret = bindings.ErrorAction_disconnect_peer(msg == null ? 0 : msg.ptr); + long ret = bindings.ErrorAction_disconnect_peer(msg.ptr); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.ErrorAction ret_hu_conv = org.ldk.structs.ErrorAction.constr_from_ptr(ret); @@ -182,7 +182,7 @@ public class ErrorAction extends CommonBase { * Utility method to constructs a new DisconnectPeerWithWarning-variant ErrorAction */ public static ErrorAction disconnect_peer_with_warning(org.ldk.structs.WarningMessage msg) { - long ret = bindings.ErrorAction_disconnect_peer_with_warning(msg == null ? 0 : msg.ptr); + long ret = bindings.ErrorAction_disconnect_peer_with_warning(msg.ptr); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.ErrorAction ret_hu_conv = org.ldk.structs.ErrorAction.constr_from_ptr(ret); @@ -229,7 +229,7 @@ public class ErrorAction extends CommonBase { * Utility method to constructs a new SendErrorMessage-variant ErrorAction */ public static ErrorAction send_error_message(org.ldk.structs.ErrorMessage msg) { - long ret = bindings.ErrorAction_send_error_message(msg == null ? 0 : msg.ptr); + long ret = bindings.ErrorAction_send_error_message(msg.ptr); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.ErrorAction ret_hu_conv = org.ldk.structs.ErrorAction.constr_from_ptr(ret); @@ -242,7 +242,7 @@ public class ErrorAction extends CommonBase { * Utility method to constructs a new SendWarningMessage-variant ErrorAction */ public static ErrorAction send_warning_message(org.ldk.structs.WarningMessage msg, org.ldk.enums.Level log_level) { - long ret = bindings.ErrorAction_send_warning_message(msg == null ? 0 : msg.ptr, log_level); + long ret = bindings.ErrorAction_send_warning_message(msg.ptr, log_level); Reference.reachabilityFence(msg); Reference.reachabilityFence(log_level); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/src/main/java/org/ldk/structs/ErrorMessage.java b/src/main/java/org/ldk/structs/ErrorMessage.java index 3000aad1..77880a9f 100644 --- a/src/main/java/org/ldk/structs/ErrorMessage.java +++ b/src/main/java/org/ldk/structs/ErrorMessage.java @@ -28,10 +28,13 @@ public class ErrorMessage extends CommonBase { * All-0s indicates a general error unrelated to a specific channel, after which all channels * with the sending peer should be closed. */ - public byte[] get_channel_id() { - byte[] ret = bindings.ErrorMessage_get_channel_id(this.ptr); + public ChannelId get_channel_id() { + long ret = bindings.ErrorMessage_get_channel_id(this.ptr); Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** @@ -40,10 +43,11 @@ public class ErrorMessage extends CommonBase { * All-0s indicates a general error unrelated to a specific channel, after which all channels * with the sending peer should be closed. */ - public void set_channel_id(byte[] val) { - bindings.ErrorMessage_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.ErrorMessage_set_channel_id(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** @@ -75,13 +79,14 @@ public class ErrorMessage extends CommonBase { /** * Constructs a new ErrorMessage given each field */ - public static ErrorMessage of(byte[] channel_id_arg, java.lang.String data_arg) { - long ret = bindings.ErrorMessage_new(InternalUtils.check_arr_len(channel_id_arg, 32), data_arg); + public static ErrorMessage of(org.ldk.structs.ChannelId channel_id_arg, java.lang.String data_arg) { + long ret = bindings.ErrorMessage_new(channel_id_arg.ptr, data_arg); Reference.reachabilityFence(channel_id_arg); Reference.reachabilityFence(data_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.ErrorMessage ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ErrorMessage(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); }; return ret_hu_conv; } @@ -121,7 +126,7 @@ public class ErrorMessage extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.ErrorMessage b) { - boolean ret = bindings.ErrorMessage_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.ErrorMessage_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/Event.java b/src/main/java/org/ldk/structs/Event.java index 445b0bda..28b27e8b 100644 --- a/src/main/java/org/ldk/structs/Event.java +++ b/src/main/java/org/ldk/structs/Event.java @@ -111,7 +111,7 @@ public class Event extends CommonBase { * * [`ChannelManager::funding_transaction_generated`]: crate::ln::channelmanager::ChannelManager::funding_transaction_generated */ - public final byte[] temporary_channel_id; + public final org.ldk.structs.ChannelId temporary_channel_id; /** * The counterparty's node_id, which you'll need to pass back into * [`ChannelManager::funding_transaction_generated`]. @@ -141,7 +141,10 @@ public class Event extends CommonBase { public final org.ldk.util.UInt128 user_channel_id; private FundingGenerationReady(long ptr, bindings.LDKEvent.FundingGenerationReady obj) { super(null, ptr); - this.temporary_channel_id = obj.temporary_channel_id; + long temporary_channel_id = obj.temporary_channel_id; + org.ldk.structs.ChannelId temporary_channel_id_hu_conv = null; if (temporary_channel_id < 0 || temporary_channel_id > 4096) { temporary_channel_id_hu_conv = new org.ldk.structs.ChannelId(null, temporary_channel_id); } + if (temporary_channel_id_hu_conv != null) { temporary_channel_id_hu_conv.ptrs_to.add(this); }; + this.temporary_channel_id = temporary_channel_id_hu_conv; this.counterparty_node_id = obj.counterparty_node_id; this.channel_value_satoshis = obj.channel_value_satoshis; this.output_script = obj.output_script; @@ -242,8 +245,10 @@ public class Event extends CommonBase { public final org.ldk.structs.PaymentPurpose purpose; /** * The `channel_id` indicating over which channel we received the payment. + * + * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public final org.ldk.structs.Option_ThirtyTwoBytesZ via_channel_id; + @Nullable public final org.ldk.structs.ChannelId via_channel_id; /** * The `user_channel_id` indicating over which channel we received the payment. */ @@ -273,7 +278,7 @@ public class Event extends CommonBase { if (purpose_hu_conv != null) { purpose_hu_conv.ptrs_to.add(this); }; this.purpose = purpose_hu_conv; long via_channel_id = obj.via_channel_id; - org.ldk.structs.Option_ThirtyTwoBytesZ via_channel_id_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(via_channel_id); + org.ldk.structs.ChannelId via_channel_id_hu_conv = null; if (via_channel_id < 0 || via_channel_id > 4096) { via_channel_id_hu_conv = new org.ldk.structs.ChannelId(null, via_channel_id); } if (via_channel_id_hu_conv != null) { via_channel_id_hu_conv.ptrs_to.add(this); }; this.via_channel_id = via_channel_id_hu_conv; long via_user_channel_id = obj.via_user_channel_id; @@ -784,9 +789,15 @@ public class Event extends CommonBase { /** * Used to indicate that an output which you should know how to spend was confirmed on chain * and is now spendable. - * Such an output will *not* ever be spent by rust-lightning, and are not at risk of your + * + * Such an output will *never* be spent directly by LDK, and are not at risk of your * counterparty spending them due to some kind of timeout. Thus, you need to store them * somewhere and spend them when you create on-chain transactions. + * + * You may hand them to the [`OutputSweeper`] utility which will store and (re-)generate spending + * transactions for you. + * + * [`OutputSweeper`]: crate::util::sweep::OutputSweeper */ public final static class SpendableOutputs extends Event { /** @@ -797,8 +808,10 @@ public class Event extends CommonBase { * The `channel_id` indicating which channel the spendable outputs belong to. * * This will always be `Some` for events generated by LDK versions 0.0.117 and above. + * + * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public final org.ldk.structs.Option_ThirtyTwoBytesZ channel_id; + @Nullable public final org.ldk.structs.ChannelId channel_id; private SpendableOutputs(long ptr, bindings.LDKEvent.SpendableOutputs obj) { super(null, ptr); long[] outputs = obj.outputs; @@ -812,7 +825,7 @@ public class Event extends CommonBase { } this.outputs = outputs_conv_27_arr; long channel_id = obj.channel_id; - org.ldk.structs.Option_ThirtyTwoBytesZ channel_id_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(channel_id); + org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); } if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); }; this.channel_id = channel_id_hu_conv; } @@ -823,17 +836,37 @@ public class Event extends CommonBase { */ public final static class PaymentForwarded extends Event { /** - * The incoming channel between the previous node and us. This is only `None` for events - * generated or serialized by versions prior to 0.0.107. + * The channel id of the incoming channel between the previous node and us. + * + * This is only `None` for events generated or serialized by versions prior to 0.0.107. + * + * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + @Nullable public final org.ldk.structs.ChannelId prev_channel_id; + /** + * The channel id of the outgoing channel between the next node and us. + * + * This is only `None` for events generated or serialized by versions prior to 0.0.107. + * + * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + @Nullable public final org.ldk.structs.ChannelId next_channel_id; + /** + * The `user_channel_id` of the incoming channel between the previous node and us. + * + * This is only `None` for events generated or serialized by versions prior to 0.0.122. */ - public final org.ldk.structs.Option_ThirtyTwoBytesZ prev_channel_id; + public final org.ldk.structs.Option_U128Z prev_user_channel_id; /** - * The outgoing channel between the next node and us. This is only `None` for events - * generated or serialized by versions prior to 0.0.107. + * The `user_channel_id` of the outgoing channel between the next node and us. + * + * This will be `None` if the payment was settled via an on-chain transaction. See the + * caveat described for the `total_fee_earned_msat` field. Moreover it will be `None` for + * events generated or serialized by versions prior to 0.0.122. */ - public final org.ldk.structs.Option_ThirtyTwoBytesZ next_channel_id; + public final org.ldk.structs.Option_U128Z next_user_channel_id; /** - * The fee, in milli-satoshis, which was earned as a result of the payment. + * The total fee, in milli-satoshis, which was earned as a result of the payment. * * Note that if we force-closed the channel over which we forwarded an HTLC while the HTLC * was pending, the amount the next hop claimed will have been rounded down to the nearest @@ -844,10 +877,26 @@ public class Event extends CommonBase { * If the channel which sent us the payment has been force-closed, we will claim the funds * via an on-chain transaction. In that case we do not yet know the on-chain transaction * fees which we will spend and will instead set this to `None`. It is possible duplicate - * `PaymentForwarded` events are generated for the same payment iff `fee_earned_msat` is + * `PaymentForwarded` events are generated for the same payment iff `total_fee_earned_msat` is * `None`. */ - public final org.ldk.structs.Option_u64Z fee_earned_msat; + public final org.ldk.structs.Option_u64Z total_fee_earned_msat; + /** + * The share of the total fee, in milli-satoshis, which was withheld in addition to the + * forwarding fee. + * + * This will only be `Some` if we forwarded an intercepted HTLC with less than the + * expected amount. This means our counterparty accepted to receive less than the invoice + * amount, e.g., by claiming the payment featuring a corresponding + * [`PaymentClaimable::counterparty_skimmed_fee_msat`]. + * + * Will also always be `None` for events serialized with LDK prior to version 0.0.122. + * + * The caveat described above the `total_fee_earned_msat` field applies here as well. + * + * [`PaymentClaimable::counterparty_skimmed_fee_msat`]: Self::PaymentClaimable::counterparty_skimmed_fee_msat + */ + public final org.ldk.structs.Option_u64Z skimmed_fee_msat; /** * If this is `true`, the forwarded HTLC was claimed by our counterparty via an on-chain * transaction. @@ -856,23 +905,35 @@ public class Event extends CommonBase { /** * The final amount forwarded, in milli-satoshis, after the fee is deducted. * - * The caveat described above the `fee_earned_msat` field applies here as well. + * The caveat described above the `total_fee_earned_msat` field applies here as well. */ public final org.ldk.structs.Option_u64Z outbound_amount_forwarded_msat; private PaymentForwarded(long ptr, bindings.LDKEvent.PaymentForwarded obj) { super(null, ptr); long prev_channel_id = obj.prev_channel_id; - org.ldk.structs.Option_ThirtyTwoBytesZ prev_channel_id_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(prev_channel_id); + org.ldk.structs.ChannelId prev_channel_id_hu_conv = null; if (prev_channel_id < 0 || prev_channel_id > 4096) { prev_channel_id_hu_conv = new org.ldk.structs.ChannelId(null, prev_channel_id); } if (prev_channel_id_hu_conv != null) { prev_channel_id_hu_conv.ptrs_to.add(this); }; this.prev_channel_id = prev_channel_id_hu_conv; long next_channel_id = obj.next_channel_id; - org.ldk.structs.Option_ThirtyTwoBytesZ next_channel_id_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(next_channel_id); + org.ldk.structs.ChannelId next_channel_id_hu_conv = null; if (next_channel_id < 0 || next_channel_id > 4096) { next_channel_id_hu_conv = new org.ldk.structs.ChannelId(null, next_channel_id); } if (next_channel_id_hu_conv != null) { next_channel_id_hu_conv.ptrs_to.add(this); }; this.next_channel_id = next_channel_id_hu_conv; - long fee_earned_msat = obj.fee_earned_msat; - org.ldk.structs.Option_u64Z fee_earned_msat_hu_conv = org.ldk.structs.Option_u64Z.constr_from_ptr(fee_earned_msat); - if (fee_earned_msat_hu_conv != null) { fee_earned_msat_hu_conv.ptrs_to.add(this); }; - this.fee_earned_msat = fee_earned_msat_hu_conv; + long prev_user_channel_id = obj.prev_user_channel_id; + org.ldk.structs.Option_U128Z prev_user_channel_id_hu_conv = org.ldk.structs.Option_U128Z.constr_from_ptr(prev_user_channel_id); + if (prev_user_channel_id_hu_conv != null) { prev_user_channel_id_hu_conv.ptrs_to.add(this); }; + this.prev_user_channel_id = prev_user_channel_id_hu_conv; + long next_user_channel_id = obj.next_user_channel_id; + org.ldk.structs.Option_U128Z next_user_channel_id_hu_conv = org.ldk.structs.Option_U128Z.constr_from_ptr(next_user_channel_id); + if (next_user_channel_id_hu_conv != null) { next_user_channel_id_hu_conv.ptrs_to.add(this); }; + this.next_user_channel_id = next_user_channel_id_hu_conv; + long total_fee_earned_msat = obj.total_fee_earned_msat; + org.ldk.structs.Option_u64Z total_fee_earned_msat_hu_conv = org.ldk.structs.Option_u64Z.constr_from_ptr(total_fee_earned_msat); + if (total_fee_earned_msat_hu_conv != null) { total_fee_earned_msat_hu_conv.ptrs_to.add(this); }; + this.total_fee_earned_msat = total_fee_earned_msat_hu_conv; + long skimmed_fee_msat = obj.skimmed_fee_msat; + org.ldk.structs.Option_u64Z skimmed_fee_msat_hu_conv = org.ldk.structs.Option_u64Z.constr_from_ptr(skimmed_fee_msat); + if (skimmed_fee_msat_hu_conv != null) { skimmed_fee_msat_hu_conv.ptrs_to.add(this); }; + this.skimmed_fee_msat = skimmed_fee_msat_hu_conv; this.claim_from_onchain_tx = obj.claim_from_onchain_tx; long outbound_amount_forwarded_msat = obj.outbound_amount_forwarded_msat; org.ldk.structs.Option_u64Z outbound_amount_forwarded_msat_hu_conv = org.ldk.structs.Option_u64Z.constr_from_ptr(outbound_amount_forwarded_msat); @@ -892,7 +953,7 @@ public class Event extends CommonBase { /** * The `channel_id` of the channel that is pending confirmation. */ - public final byte[] channel_id; + public final org.ldk.structs.ChannelId channel_id; /** * The `user_channel_id` value passed in to [`ChannelManager::create_channel`] for outbound * channels, or to [`ChannelManager::accept_inbound_channel`] for inbound channels if @@ -908,8 +969,10 @@ public class Event extends CommonBase { * The `temporary_channel_id` this channel used to be known by during channel establishment. * * Will be `None` for channels created prior to LDK version 0.0.115. + * + * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public final org.ldk.structs.Option_ThirtyTwoBytesZ former_temporary_channel_id; + @Nullable public final org.ldk.structs.ChannelId former_temporary_channel_id; /** * The `node_id` of the channel counterparty. */ @@ -918,14 +981,25 @@ public class Event extends CommonBase { * The outpoint of the channel's funding transaction. */ public final org.ldk.structs.OutPoint funding_txo; + /** + * The features that this channel will operate with. + * + * Will be `None` for channels created prior to LDK version 0.0.122. + * + * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + @Nullable public final org.ldk.structs.ChannelTypeFeatures channel_type; private ChannelPending(long ptr, bindings.LDKEvent.ChannelPending obj) { super(null, ptr); - this.channel_id = obj.channel_id; + long channel_id = obj.channel_id; + org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); } + if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); }; + this.channel_id = channel_id_hu_conv; byte[] user_channel_id = obj.user_channel_id; org.ldk.util.UInt128 user_channel_id_conv = new org.ldk.util.UInt128(user_channel_id); this.user_channel_id = user_channel_id_conv; long former_temporary_channel_id = obj.former_temporary_channel_id; - org.ldk.structs.Option_ThirtyTwoBytesZ former_temporary_channel_id_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(former_temporary_channel_id); + org.ldk.structs.ChannelId former_temporary_channel_id_hu_conv = null; if (former_temporary_channel_id < 0 || former_temporary_channel_id > 4096) { former_temporary_channel_id_hu_conv = new org.ldk.structs.ChannelId(null, former_temporary_channel_id); } if (former_temporary_channel_id_hu_conv != null) { former_temporary_channel_id_hu_conv.ptrs_to.add(this); }; this.former_temporary_channel_id = former_temporary_channel_id_hu_conv; this.counterparty_node_id = obj.counterparty_node_id; @@ -933,6 +1007,10 @@ public class Event extends CommonBase { org.ldk.structs.OutPoint funding_txo_hu_conv = null; if (funding_txo < 0 || funding_txo > 4096) { funding_txo_hu_conv = new org.ldk.structs.OutPoint(null, funding_txo); } if (funding_txo_hu_conv != null) { funding_txo_hu_conv.ptrs_to.add(this); }; this.funding_txo = funding_txo_hu_conv; + long channel_type = obj.channel_type; + org.ldk.structs.ChannelTypeFeatures channel_type_hu_conv = null; if (channel_type < 0 || channel_type > 4096) { channel_type_hu_conv = new org.ldk.structs.ChannelTypeFeatures(null, channel_type); } + if (channel_type_hu_conv != null) { channel_type_hu_conv.ptrs_to.add(this); }; + this.channel_type = channel_type_hu_conv; } } /** @@ -945,7 +1023,7 @@ public class Event extends CommonBase { /** * The `channel_id` of the channel that is ready. */ - public final byte[] channel_id; + public final org.ldk.structs.ChannelId channel_id; /** * The `user_channel_id` value passed in to [`ChannelManager::create_channel`] for outbound * channels, or to [`ChannelManager::accept_inbound_channel`] for inbound channels if @@ -967,7 +1045,10 @@ public class Event extends CommonBase { public final org.ldk.structs.ChannelTypeFeatures channel_type; private ChannelReady(long ptr, bindings.LDKEvent.ChannelReady obj) { super(null, ptr); - this.channel_id = obj.channel_id; + long channel_id = obj.channel_id; + org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); } + if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); }; + this.channel_id = channel_id_hu_conv; byte[] user_channel_id = obj.user_channel_id; org.ldk.util.UInt128 user_channel_id_conv = new org.ldk.util.UInt128(user_channel_id); this.user_channel_id = user_channel_id_conv; @@ -979,8 +1060,8 @@ public class Event extends CommonBase { } } /** - * Used to indicate that a previously opened channel with the given `channel_id` is in the - * process of closure. + * Used to indicate that a channel that got past the initial handshake with the given `channel_id` is in the + * process of closure. This includes previously opened channels, and channels that time out from not being funded. * * Note that this event is only triggered for accepted channels: if the * [`UserConfig::manually_accept_inbound_channels`] config flag is set to true and the channel is @@ -994,7 +1075,7 @@ public class Event extends CommonBase { * The `channel_id` of the channel which has been closed. Note that on-chain transactions * resolving the channel are likely still awaiting confirmation. */ - public final byte[] channel_id; + public final org.ldk.structs.ChannelId channel_id; /** * The `user_channel_id` value passed in to [`ChannelManager::create_channel`] for outbound * channels, or to [`ChannelManager::accept_inbound_channel`] for inbound channels if @@ -1036,7 +1117,10 @@ public class Event extends CommonBase { @Nullable public final org.ldk.structs.OutPoint channel_funding_txo; private ChannelClosed(long ptr, bindings.LDKEvent.ChannelClosed obj) { super(null, ptr); - this.channel_id = obj.channel_id; + long channel_id = obj.channel_id; + org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); } + if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); }; + this.channel_id = channel_id_hu_conv; byte[] user_channel_id = obj.user_channel_id; org.ldk.util.UInt128 user_channel_id_conv = new org.ldk.util.UInt128(user_channel_id); this.user_channel_id = user_channel_id_conv; @@ -1065,14 +1149,17 @@ public class Event extends CommonBase { /** * The channel_id of the channel which has been closed. */ - public final byte[] channel_id; + public final org.ldk.structs.ChannelId channel_id; /** * The full transaction received from the user */ public final byte[] transaction; private DiscardFunding(long ptr, bindings.LDKEvent.DiscardFunding obj) { super(null, ptr); - this.channel_id = obj.channel_id; + long channel_id = obj.channel_id; + org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); } + if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); }; + this.channel_id = channel_id_hu_conv; this.transaction = obj.transaction; } } @@ -1101,7 +1188,7 @@ public class Event extends CommonBase { * [`ChannelManager::accept_inbound_channel`]: crate::ln::channelmanager::ChannelManager::accept_inbound_channel * [`ChannelManager::force_close_without_broadcasting_txn`]: crate::ln::channelmanager::ChannelManager::force_close_without_broadcasting_txn */ - public final byte[] temporary_channel_id; + public final org.ldk.structs.ChannelId temporary_channel_id; /** * The node_id of the counterparty requesting to open the channel. * @@ -1142,7 +1229,10 @@ public class Event extends CommonBase { public final org.ldk.structs.ChannelTypeFeatures channel_type; private OpenChannelRequest(long ptr, bindings.LDKEvent.OpenChannelRequest obj) { super(null, ptr); - this.temporary_channel_id = obj.temporary_channel_id; + long temporary_channel_id = obj.temporary_channel_id; + org.ldk.structs.ChannelId temporary_channel_id_hu_conv = null; if (temporary_channel_id < 0 || temporary_channel_id > 4096) { temporary_channel_id_hu_conv = new org.ldk.structs.ChannelId(null, temporary_channel_id); } + if (temporary_channel_id_hu_conv != null) { temporary_channel_id_hu_conv.ptrs_to.add(this); }; + this.temporary_channel_id = temporary_channel_id_hu_conv; this.counterparty_node_id = obj.counterparty_node_id; this.funding_satoshis = obj.funding_satoshis; this.push_msat = obj.push_msat; @@ -1170,14 +1260,17 @@ public class Event extends CommonBase { /** * The channel over which the HTLC was received. */ - public final byte[] prev_channel_id; + public final org.ldk.structs.ChannelId prev_channel_id; /** * Destination of the HTLC that failed to be processed. */ public final org.ldk.structs.HTLCDestination failed_next_destination; private HTLCHandlingFailed(long ptr, bindings.LDKEvent.HTLCHandlingFailed obj) { super(null, ptr); - this.prev_channel_id = obj.prev_channel_id; + long prev_channel_id = obj.prev_channel_id; + org.ldk.structs.ChannelId prev_channel_id_hu_conv = null; if (prev_channel_id < 0 || prev_channel_id > 4096) { prev_channel_id_hu_conv = new org.ldk.structs.ChannelId(null, prev_channel_id); } + if (prev_channel_id_hu_conv != null) { prev_channel_id_hu_conv.ptrs_to.add(this); }; + this.prev_channel_id = prev_channel_id_hu_conv; long failed_next_destination = obj.failed_next_destination; org.ldk.structs.HTLCDestination failed_next_destination_hu_conv = org.ldk.structs.HTLCDestination.constr_from_ptr(failed_next_destination); if (failed_next_destination_hu_conv != null) { failed_next_destination_hu_conv.ptrs_to.add(this); }; @@ -1225,8 +1318,8 @@ public class Event extends CommonBase { /** * Utility method to constructs a new FundingGenerationReady-variant Event */ - public static Event funding_generation_ready(byte[] temporary_channel_id, byte[] counterparty_node_id, long channel_value_satoshis, byte[] output_script, org.ldk.util.UInt128 user_channel_id) { - long ret = bindings.Event_funding_generation_ready(InternalUtils.check_arr_len(temporary_channel_id, 32), InternalUtils.check_arr_len(counterparty_node_id, 33), channel_value_satoshis, output_script, user_channel_id.getLEBytes()); + public static Event funding_generation_ready(org.ldk.structs.ChannelId temporary_channel_id, byte[] counterparty_node_id, long channel_value_satoshis, byte[] output_script, org.ldk.util.UInt128 user_channel_id) { + long ret = bindings.Event_funding_generation_ready(temporary_channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), channel_value_satoshis, output_script, user_channel_id.getLEBytes()); Reference.reachabilityFence(temporary_channel_id); Reference.reachabilityFence(counterparty_node_id); Reference.reachabilityFence(channel_value_satoshis); @@ -1235,14 +1328,15 @@ public class Event extends CommonBase { if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Event ret_hu_conv = org.ldk.structs.Event.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(temporary_channel_id); }; return ret_hu_conv; } /** * Utility method to constructs a new PaymentClaimable-variant Event */ - public static Event payment_claimable(byte[] receiver_node_id, byte[] payment_hash, org.ldk.structs.RecipientOnionFields onion_fields, long amount_msat, long counterparty_skimmed_fee_msat, org.ldk.structs.PaymentPurpose purpose, org.ldk.structs.Option_ThirtyTwoBytesZ via_channel_id, org.ldk.structs.Option_U128Z via_user_channel_id, org.ldk.structs.Option_u32Z claim_deadline) { - long ret = bindings.Event_payment_claimable(InternalUtils.check_arr_len(receiver_node_id, 33), InternalUtils.check_arr_len(payment_hash, 32), onion_fields == null ? 0 : onion_fields.ptr, amount_msat, counterparty_skimmed_fee_msat, purpose.ptr, via_channel_id.ptr, via_user_channel_id.ptr, claim_deadline.ptr); + public static Event payment_claimable(byte[] receiver_node_id, byte[] payment_hash, org.ldk.structs.RecipientOnionFields onion_fields, long amount_msat, long counterparty_skimmed_fee_msat, org.ldk.structs.PaymentPurpose purpose, org.ldk.structs.ChannelId via_channel_id, org.ldk.structs.Option_U128Z via_user_channel_id, org.ldk.structs.Option_u32Z claim_deadline) { + long ret = bindings.Event_payment_claimable(InternalUtils.check_arr_len(receiver_node_id, 33), InternalUtils.check_arr_len(payment_hash, 32), onion_fields.ptr, amount_msat, counterparty_skimmed_fee_msat, purpose.ptr, via_channel_id.ptr, via_user_channel_id.ptr, claim_deadline.ptr); Reference.reachabilityFence(receiver_node_id); Reference.reachabilityFence(payment_hash); Reference.reachabilityFence(onion_fields); @@ -1267,7 +1361,7 @@ public class Event extends CommonBase { * Utility method to constructs a new PaymentClaimed-variant Event */ public static Event payment_claimed(byte[] receiver_node_id, byte[] payment_hash, long amount_msat, org.ldk.structs.PaymentPurpose purpose, ClaimedHTLC[] htlcs, org.ldk.structs.Option_u64Z sender_intended_total_msat) { - long ret = bindings.Event_payment_claimed(InternalUtils.check_arr_len(receiver_node_id, 33), InternalUtils.check_arr_len(payment_hash, 32), amount_msat, purpose.ptr, htlcs != null ? Arrays.stream(htlcs).mapToLong(htlcs_conv_13 -> htlcs_conv_13 == null ? 0 : htlcs_conv_13.ptr).toArray() : null, sender_intended_total_msat.ptr); + long ret = bindings.Event_payment_claimed(InternalUtils.check_arr_len(receiver_node_id, 33), InternalUtils.check_arr_len(payment_hash, 32), amount_msat, purpose.ptr, htlcs != null ? Arrays.stream(htlcs).mapToLong(htlcs_conv_13 -> htlcs_conv_13.ptr).toArray() : null, sender_intended_total_msat.ptr); Reference.reachabilityFence(receiver_node_id); Reference.reachabilityFence(payment_hash); Reference.reachabilityFence(amount_msat); @@ -1345,7 +1439,7 @@ public class Event extends CommonBase { * Utility method to constructs a new PaymentPathSuccessful-variant Event */ public static Event payment_path_successful(byte[] payment_id, org.ldk.structs.Option_ThirtyTwoBytesZ payment_hash, org.ldk.structs.Path path) { - long ret = bindings.Event_payment_path_successful(InternalUtils.check_arr_len(payment_id, 32), payment_hash.ptr, path == null ? 0 : path.ptr); + long ret = bindings.Event_payment_path_successful(InternalUtils.check_arr_len(payment_id, 32), payment_hash.ptr, path.ptr); Reference.reachabilityFence(payment_id); Reference.reachabilityFence(payment_hash); Reference.reachabilityFence(path); @@ -1361,7 +1455,7 @@ public class Event extends CommonBase { * Utility method to constructs a new PaymentPathFailed-variant Event */ public static Event payment_path_failed(org.ldk.structs.Option_ThirtyTwoBytesZ payment_id, byte[] payment_hash, boolean payment_failed_permanently, org.ldk.structs.PathFailure failure, org.ldk.structs.Path path, org.ldk.structs.Option_u64Z short_channel_id) { - long ret = bindings.Event_payment_path_failed(payment_id.ptr, InternalUtils.check_arr_len(payment_hash, 32), payment_failed_permanently, failure.ptr, path == null ? 0 : path.ptr, short_channel_id.ptr); + long ret = bindings.Event_payment_path_failed(payment_id.ptr, InternalUtils.check_arr_len(payment_hash, 32), payment_failed_permanently, failure.ptr, path.ptr, short_channel_id.ptr); Reference.reachabilityFence(payment_id); Reference.reachabilityFence(payment_hash); Reference.reachabilityFence(payment_failed_permanently); @@ -1382,7 +1476,7 @@ public class Event extends CommonBase { * Utility method to constructs a new ProbeSuccessful-variant Event */ public static Event probe_successful(byte[] payment_id, byte[] payment_hash, org.ldk.structs.Path path) { - long ret = bindings.Event_probe_successful(InternalUtils.check_arr_len(payment_id, 32), InternalUtils.check_arr_len(payment_hash, 32), path == null ? 0 : path.ptr); + long ret = bindings.Event_probe_successful(InternalUtils.check_arr_len(payment_id, 32), InternalUtils.check_arr_len(payment_hash, 32), path.ptr); Reference.reachabilityFence(payment_id); Reference.reachabilityFence(payment_hash); Reference.reachabilityFence(path); @@ -1397,7 +1491,7 @@ public class Event extends CommonBase { * Utility method to constructs a new ProbeFailed-variant Event */ public static Event probe_failed(byte[] payment_id, byte[] payment_hash, org.ldk.structs.Path path, org.ldk.structs.Option_u64Z short_channel_id) { - long ret = bindings.Event_probe_failed(InternalUtils.check_arr_len(payment_id, 32), InternalUtils.check_arr_len(payment_hash, 32), path == null ? 0 : path.ptr, short_channel_id.ptr); + long ret = bindings.Event_probe_failed(InternalUtils.check_arr_len(payment_id, 32), InternalUtils.check_arr_len(payment_hash, 32), path.ptr, short_channel_id.ptr); Reference.reachabilityFence(payment_id); Reference.reachabilityFence(payment_hash); Reference.reachabilityFence(path); @@ -1441,7 +1535,7 @@ public class Event extends CommonBase { /** * Utility method to constructs a new SpendableOutputs-variant Event */ - public static Event spendable_outputs(SpendableOutputDescriptor[] outputs, org.ldk.structs.Option_ThirtyTwoBytesZ channel_id) { + public static Event spendable_outputs(SpendableOutputDescriptor[] outputs, org.ldk.structs.ChannelId channel_id) { long ret = bindings.Event_spendable_outputs(outputs != null ? Arrays.stream(outputs).mapToLong(outputs_conv_27 -> outputs_conv_27.ptr).toArray() : null, channel_id.ptr); Reference.reachabilityFence(outputs); Reference.reachabilityFence(channel_id); @@ -1456,11 +1550,14 @@ public class Event extends CommonBase { /** * Utility method to constructs a new PaymentForwarded-variant Event */ - public static Event payment_forwarded(org.ldk.structs.Option_ThirtyTwoBytesZ prev_channel_id, org.ldk.structs.Option_ThirtyTwoBytesZ next_channel_id, org.ldk.structs.Option_u64Z fee_earned_msat, boolean claim_from_onchain_tx, org.ldk.structs.Option_u64Z outbound_amount_forwarded_msat) { - long ret = bindings.Event_payment_forwarded(prev_channel_id.ptr, next_channel_id.ptr, fee_earned_msat.ptr, claim_from_onchain_tx, outbound_amount_forwarded_msat.ptr); + public static Event payment_forwarded(org.ldk.structs.ChannelId prev_channel_id, org.ldk.structs.ChannelId next_channel_id, org.ldk.structs.Option_U128Z prev_user_channel_id, org.ldk.structs.Option_U128Z next_user_channel_id, org.ldk.structs.Option_u64Z total_fee_earned_msat, org.ldk.structs.Option_u64Z skimmed_fee_msat, boolean claim_from_onchain_tx, org.ldk.structs.Option_u64Z outbound_amount_forwarded_msat) { + long ret = bindings.Event_payment_forwarded(prev_channel_id.ptr, next_channel_id.ptr, prev_user_channel_id.ptr, next_user_channel_id.ptr, total_fee_earned_msat.ptr, skimmed_fee_msat.ptr, claim_from_onchain_tx, outbound_amount_forwarded_msat.ptr); Reference.reachabilityFence(prev_channel_id); Reference.reachabilityFence(next_channel_id); - Reference.reachabilityFence(fee_earned_msat); + Reference.reachabilityFence(prev_user_channel_id); + Reference.reachabilityFence(next_user_channel_id); + Reference.reachabilityFence(total_fee_earned_msat); + Reference.reachabilityFence(skimmed_fee_msat); Reference.reachabilityFence(claim_from_onchain_tx); Reference.reachabilityFence(outbound_amount_forwarded_msat); if (ret >= 0 && ret <= 4096) { return null; } @@ -1468,7 +1565,10 @@ public class Event extends CommonBase { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(prev_channel_id); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(next_channel_id); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(fee_earned_msat); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(prev_user_channel_id); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(next_user_channel_id); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(total_fee_earned_msat); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(skimmed_fee_msat); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(outbound_amount_forwarded_msat); }; return ret_hu_conv; } @@ -1476,26 +1576,29 @@ public class Event extends CommonBase { /** * Utility method to constructs a new ChannelPending-variant Event */ - public static Event channel_pending(byte[] channel_id, org.ldk.util.UInt128 user_channel_id, org.ldk.structs.Option_ThirtyTwoBytesZ former_temporary_channel_id, byte[] counterparty_node_id, org.ldk.structs.OutPoint funding_txo) { - long ret = bindings.Event_channel_pending(InternalUtils.check_arr_len(channel_id, 32), user_channel_id.getLEBytes(), former_temporary_channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), funding_txo == null ? 0 : funding_txo.ptr); + public static Event channel_pending(org.ldk.structs.ChannelId channel_id, org.ldk.util.UInt128 user_channel_id, org.ldk.structs.ChannelId former_temporary_channel_id, byte[] counterparty_node_id, org.ldk.structs.OutPoint funding_txo, org.ldk.structs.ChannelTypeFeatures channel_type) { + long ret = bindings.Event_channel_pending(channel_id.ptr, user_channel_id.getLEBytes(), former_temporary_channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), funding_txo.ptr, channel_type.ptr); Reference.reachabilityFence(channel_id); Reference.reachabilityFence(user_channel_id); Reference.reachabilityFence(former_temporary_channel_id); Reference.reachabilityFence(counterparty_node_id); Reference.reachabilityFence(funding_txo); + Reference.reachabilityFence(channel_type); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Event ret_hu_conv = org.ldk.structs.Event.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(former_temporary_channel_id); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(funding_txo); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_type); }; return ret_hu_conv; } /** * Utility method to constructs a new ChannelReady-variant Event */ - public static Event channel_ready(byte[] channel_id, org.ldk.util.UInt128 user_channel_id, byte[] counterparty_node_id, org.ldk.structs.ChannelTypeFeatures channel_type) { - long ret = bindings.Event_channel_ready(InternalUtils.check_arr_len(channel_id, 32), user_channel_id.getLEBytes(), InternalUtils.check_arr_len(counterparty_node_id, 33), channel_type == null ? 0 : channel_type.ptr); + public static Event channel_ready(org.ldk.structs.ChannelId channel_id, org.ldk.util.UInt128 user_channel_id, byte[] counterparty_node_id, org.ldk.structs.ChannelTypeFeatures channel_type) { + long ret = bindings.Event_channel_ready(channel_id.ptr, user_channel_id.getLEBytes(), InternalUtils.check_arr_len(counterparty_node_id, 33), channel_type.ptr); Reference.reachabilityFence(channel_id); Reference.reachabilityFence(user_channel_id); Reference.reachabilityFence(counterparty_node_id); @@ -1503,6 +1606,7 @@ public class Event extends CommonBase { if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Event ret_hu_conv = org.ldk.structs.Event.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_type); }; return ret_hu_conv; } @@ -1510,8 +1614,8 @@ public class Event extends CommonBase { /** * Utility method to constructs a new ChannelClosed-variant Event */ - public static Event channel_closed(byte[] channel_id, org.ldk.util.UInt128 user_channel_id, org.ldk.structs.ClosureReason reason, byte[] counterparty_node_id, org.ldk.structs.Option_u64Z channel_capacity_sats, org.ldk.structs.OutPoint channel_funding_txo) { - long ret = bindings.Event_channel_closed(InternalUtils.check_arr_len(channel_id, 32), user_channel_id.getLEBytes(), reason.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), channel_capacity_sats.ptr, channel_funding_txo == null ? 0 : channel_funding_txo.ptr); + public static Event channel_closed(org.ldk.structs.ChannelId channel_id, org.ldk.util.UInt128 user_channel_id, org.ldk.structs.ClosureReason reason, byte[] counterparty_node_id, org.ldk.structs.Option_u64Z channel_capacity_sats, org.ldk.structs.OutPoint channel_funding_txo) { + long ret = bindings.Event_channel_closed(channel_id.ptr, user_channel_id.getLEBytes(), reason.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), channel_capacity_sats.ptr, channel_funding_txo.ptr); Reference.reachabilityFence(channel_id); Reference.reachabilityFence(user_channel_id); Reference.reachabilityFence(reason); @@ -1521,6 +1625,7 @@ public class Event extends CommonBase { if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Event ret_hu_conv = org.ldk.structs.Event.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(reason); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_capacity_sats); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_funding_txo); }; @@ -1530,21 +1635,22 @@ public class Event extends CommonBase { /** * Utility method to constructs a new DiscardFunding-variant Event */ - public static Event discard_funding(byte[] channel_id, byte[] transaction) { - long ret = bindings.Event_discard_funding(InternalUtils.check_arr_len(channel_id, 32), transaction); + public static Event discard_funding(org.ldk.structs.ChannelId channel_id, byte[] transaction) { + long ret = bindings.Event_discard_funding(channel_id.ptr, transaction); Reference.reachabilityFence(channel_id); Reference.reachabilityFence(transaction); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Event ret_hu_conv = org.ldk.structs.Event.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id); }; return ret_hu_conv; } /** * Utility method to constructs a new OpenChannelRequest-variant Event */ - public static Event open_channel_request(byte[] temporary_channel_id, byte[] counterparty_node_id, long funding_satoshis, long push_msat, org.ldk.structs.ChannelTypeFeatures channel_type) { - long ret = bindings.Event_open_channel_request(InternalUtils.check_arr_len(temporary_channel_id, 32), InternalUtils.check_arr_len(counterparty_node_id, 33), funding_satoshis, push_msat, channel_type == null ? 0 : channel_type.ptr); + public static Event open_channel_request(org.ldk.structs.ChannelId temporary_channel_id, byte[] counterparty_node_id, long funding_satoshis, long push_msat, org.ldk.structs.ChannelTypeFeatures channel_type) { + long ret = bindings.Event_open_channel_request(temporary_channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), funding_satoshis, push_msat, channel_type.ptr); Reference.reachabilityFence(temporary_channel_id); Reference.reachabilityFence(counterparty_node_id); Reference.reachabilityFence(funding_satoshis); @@ -1553,6 +1659,7 @@ public class Event extends CommonBase { if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Event ret_hu_conv = org.ldk.structs.Event.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(temporary_channel_id); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_type); }; return ret_hu_conv; } @@ -1560,13 +1667,14 @@ public class Event extends CommonBase { /** * Utility method to constructs a new HTLCHandlingFailed-variant Event */ - public static Event htlchandling_failed(byte[] prev_channel_id, org.ldk.structs.HTLCDestination failed_next_destination) { - long ret = bindings.Event_htlchandling_failed(InternalUtils.check_arr_len(prev_channel_id, 32), failed_next_destination.ptr); + public static Event htlchandling_failed(org.ldk.structs.ChannelId prev_channel_id, org.ldk.structs.HTLCDestination failed_next_destination) { + long ret = bindings.Event_htlchandling_failed(prev_channel_id.ptr, failed_next_destination.ptr); Reference.reachabilityFence(prev_channel_id); Reference.reachabilityFence(failed_next_destination); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Event ret_hu_conv = org.ldk.structs.Event.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(prev_channel_id); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(failed_next_destination); }; return ret_hu_conv; } @@ -1589,7 +1697,7 @@ public class Event extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public boolean eq(org.ldk.structs.Event b) { - boolean ret = bindings.Event_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.Event_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); return ret; diff --git a/src/main/java/org/ldk/structs/ExpiryTime.java b/src/main/java/org/ldk/structs/ExpiryTime.java index 5c916db3..a124b567 100644 --- a/src/main/java/org/ldk/structs/ExpiryTime.java +++ b/src/main/java/org/ldk/structs/ExpiryTime.java @@ -57,7 +57,7 @@ public class ExpiryTime extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.ExpiryTime b) { - boolean ret = bindings.ExpiryTime_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.ExpiryTime_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/Fallback.java b/src/main/java/org/ldk/structs/Fallback.java index abd00a27..190bbe90 100644 --- a/src/main/java/org/ldk/structs/Fallback.java +++ b/src/main/java/org/ldk/structs/Fallback.java @@ -130,7 +130,7 @@ public class Fallback extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public boolean eq(org.ldk.structs.Fallback b) { - boolean ret = bindings.Fallback_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.Fallback_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); return ret; diff --git a/src/main/java/org/ldk/structs/FeeEstimator.java b/src/main/java/org/ldk/structs/FeeEstimator.java index e9f6ba9e..ffb05837 100644 --- a/src/main/java/org/ldk/structs/FeeEstimator.java +++ b/src/main/java/org/ldk/structs/FeeEstimator.java @@ -18,6 +18,10 @@ import javax.annotation.Nullable; * * Note that all of the functions implemented here *must* be reentrant-safe (obviously - they're * called from inside the library in response to chain events, P2P events, or timer events). + * + * LDK may generate a substantial number of fee-estimation calls in some cases. You should + * pre-calculate and cache the fee estimate results to ensure you don't substantially slow HTLC + * handling. */ @SuppressWarnings("unchecked") // We correctly assign various generic arrays public class FeeEstimator extends CommonBase { diff --git a/src/main/java/org/ldk/structs/Filter.java b/src/main/java/org/ldk/structs/Filter.java index 0070014f..b5ab9fe7 100644 --- a/src/main/java/org/ldk/structs/Filter.java +++ b/src/main/java/org/ldk/structs/Filter.java @@ -108,7 +108,7 @@ public class Filter extends CommonBase { * registered mid-processing. */ public void register_output(org.ldk.structs.WatchedOutput output) { - bindings.Filter_register_output(this.ptr, output == null ? 0 : output.ptr); + bindings.Filter_register_output(this.ptr, output.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(output); if (this != null) { this.ptrs_to.add(output); }; diff --git a/src/main/java/org/ldk/structs/ForwardNode.java b/src/main/java/org/ldk/structs/ForwardNode.java index f57432a2..e651dcbb 100644 --- a/src/main/java/org/ldk/structs/ForwardNode.java +++ b/src/main/java/org/ldk/structs/ForwardNode.java @@ -38,7 +38,7 @@ public class ForwardNode extends CommonBase { * used for [`BlindedPayInfo`] construction. */ public void set_tlvs(org.ldk.structs.ForwardTlvs val) { - bindings.ForwardNode_set_tlvs(this.ptr, val == null ? 0 : val.ptr); + bindings.ForwardNode_set_tlvs(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -84,7 +84,7 @@ public class ForwardNode extends CommonBase { * Constructs a new ForwardNode given each field */ public static ForwardNode of(org.ldk.structs.ForwardTlvs tlvs_arg, byte[] node_id_arg, long htlc_maximum_msat_arg) { - long ret = bindings.ForwardNode_new(tlvs_arg == null ? 0 : tlvs_arg.ptr, InternalUtils.check_arr_len(node_id_arg, 33), htlc_maximum_msat_arg); + long ret = bindings.ForwardNode_new(tlvs_arg.ptr, InternalUtils.check_arr_len(node_id_arg, 33), htlc_maximum_msat_arg); Reference.reachabilityFence(tlvs_arg); Reference.reachabilityFence(node_id_arg); Reference.reachabilityFence(htlc_maximum_msat_arg); diff --git a/src/main/java/org/ldk/structs/ForwardTlvs.java b/src/main/java/org/ldk/structs/ForwardTlvs.java index 0dcc1063..5cc4d289 100644 --- a/src/main/java/org/ldk/structs/ForwardTlvs.java +++ b/src/main/java/org/ldk/structs/ForwardTlvs.java @@ -54,7 +54,7 @@ public class ForwardTlvs extends CommonBase { * Payment parameters for relaying over [`Self::short_channel_id`]. */ public void set_payment_relay(org.ldk.structs.PaymentRelay val) { - bindings.ForwardTlvs_set_payment_relay(this.ptr, val == null ? 0 : val.ptr); + bindings.ForwardTlvs_set_payment_relay(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -76,7 +76,7 @@ public class ForwardTlvs extends CommonBase { * Payment constraints for relaying over [`Self::short_channel_id`]. */ public void set_payment_constraints(org.ldk.structs.PaymentConstraints val) { - bindings.ForwardTlvs_set_payment_constraints(this.ptr, val == null ? 0 : val.ptr); + bindings.ForwardTlvs_set_payment_constraints(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -104,7 +104,7 @@ public class ForwardTlvs extends CommonBase { * [`BlindedHop::encrypted_payload`]: crate::blinded_path::BlindedHop::encrypted_payload */ public void set_features(org.ldk.structs.BlindedHopFeatures val) { - bindings.ForwardTlvs_set_features(this.ptr, val == null ? 0 : val.ptr); + bindings.ForwardTlvs_set_features(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -114,7 +114,7 @@ public class ForwardTlvs extends CommonBase { * Constructs a new ForwardTlvs given each field */ public static ForwardTlvs of(long short_channel_id_arg, org.ldk.structs.PaymentRelay payment_relay_arg, org.ldk.structs.PaymentConstraints payment_constraints_arg, org.ldk.structs.BlindedHopFeatures features_arg) { - long ret = bindings.ForwardTlvs_new(short_channel_id_arg, payment_relay_arg == null ? 0 : payment_relay_arg.ptr, payment_constraints_arg == null ? 0 : payment_constraints_arg.ptr, features_arg == null ? 0 : features_arg.ptr); + long ret = bindings.ForwardTlvs_new(short_channel_id_arg, payment_relay_arg.ptr, payment_constraints_arg.ptr, features_arg.ptr); Reference.reachabilityFence(short_channel_id_arg); Reference.reachabilityFence(payment_relay_arg); Reference.reachabilityFence(payment_constraints_arg); diff --git a/src/main/java/org/ldk/structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.java b/src/main/java/org/ldk/structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.java new file mode 100644 index 00000000..b9f7aaed --- /dev/null +++ b/src/main/java/org/ldk/structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.java @@ -0,0 +1,110 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + + +/** + * A Tuple + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ extends CommonBase { + FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ(Object _dummy, long ptr) { super(ptr); } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + if (ptr != 0) { bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free(ptr); } + } + + /** + * + */ + public OutPoint get_a() { + long ret = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OutPoint ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OutPoint(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * + */ + public ChannelId get_b() { + long ret = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * + */ + public MonitorEvent[] get_c() { + long[] ret = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(this.ptr); + Reference.reachabilityFence(this); + int ret_conv_14_len = ret.length; + MonitorEvent[] ret_conv_14_arr = new MonitorEvent[ret_conv_14_len]; + for (int o = 0; o < ret_conv_14_len; o++) { + long ret_conv_14 = ret[o]; + org.ldk.structs.MonitorEvent ret_conv_14_hu_conv = org.ldk.structs.MonitorEvent.constr_from_ptr(ret_conv_14); + if (ret_conv_14_hu_conv != null) { ret_conv_14_hu_conv.ptrs_to.add(this); }; + ret_conv_14_arr[o] = ret_conv_14_hu_conv; + } + return ret_conv_14_arr; + } + + /** + * + */ + public byte[] get_d() { + byte[] ret = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + long clone_ptr() { + long ret = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a new tuple which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ clone() { + long ret = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ ret_hu_conv = new FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ(null, ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Creates a new C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ from the contained elements. + */ + public static FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ of(org.ldk.structs.OutPoint a, org.ldk.structs.ChannelId b, MonitorEvent[] c, byte[] d) { + long ret = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new(a.ptr, b.ptr, c != null ? Arrays.stream(c).mapToLong(c_conv_14 -> c_conv_14.ptr).toArray() : null, InternalUtils.check_arr_len(d, 33)); + Reference.reachabilityFence(a); + Reference.reachabilityFence(b); + Reference.reachabilityFence(c); + Reference.reachabilityFence(d); + if (ret >= 0 && ret <= 4096) { return null; } + FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ ret_hu_conv = new FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ(null, ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(a); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b); }; + for (MonitorEvent c_conv_14: c) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(c_conv_14); }; }; + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/FundingCreated.java b/src/main/java/org/ldk/structs/FundingCreated.java index affc9527..f6d7cb4a 100644 --- a/src/main/java/org/ldk/structs/FundingCreated.java +++ b/src/main/java/org/ldk/structs/FundingCreated.java @@ -27,19 +27,23 @@ public class FundingCreated extends CommonBase { /** * A temporary channel ID, until the funding is established */ - public byte[] get_temporary_channel_id() { - byte[] ret = bindings.FundingCreated_get_temporary_channel_id(this.ptr); + public ChannelId get_temporary_channel_id() { + long ret = bindings.FundingCreated_get_temporary_channel_id(this.ptr); Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** * A temporary channel ID, until the funding is established */ - public void set_temporary_channel_id(byte[] val) { - bindings.FundingCreated_set_temporary_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); + public void set_temporary_channel_id(org.ldk.structs.ChannelId val) { + bindings.FundingCreated_set_temporary_channel_id(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** @@ -99,8 +103,8 @@ public class FundingCreated extends CommonBase { /** * Constructs a new FundingCreated given each field */ - public static FundingCreated of(byte[] temporary_channel_id_arg, byte[] funding_txid_arg, short funding_output_index_arg, byte[] signature_arg) { - long ret = bindings.FundingCreated_new(InternalUtils.check_arr_len(temporary_channel_id_arg, 32), InternalUtils.check_arr_len(funding_txid_arg, 32), funding_output_index_arg, InternalUtils.check_arr_len(signature_arg, 64)); + public static FundingCreated of(org.ldk.structs.ChannelId temporary_channel_id_arg, byte[] funding_txid_arg, short funding_output_index_arg, byte[] signature_arg) { + long ret = bindings.FundingCreated_new(temporary_channel_id_arg.ptr, InternalUtils.check_arr_len(funding_txid_arg, 32), funding_output_index_arg, InternalUtils.check_arr_len(signature_arg, 64)); Reference.reachabilityFence(temporary_channel_id_arg); Reference.reachabilityFence(funding_txid_arg); Reference.reachabilityFence(funding_output_index_arg); @@ -108,6 +112,7 @@ public class FundingCreated extends CommonBase { if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.FundingCreated ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.FundingCreated(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(temporary_channel_id_arg); }; return ret_hu_conv; } @@ -147,7 +152,7 @@ public class FundingCreated extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.FundingCreated b) { - boolean ret = bindings.FundingCreated_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.FundingCreated_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/FundingSigned.java b/src/main/java/org/ldk/structs/FundingSigned.java index 93e9a633..8a15428a 100644 --- a/src/main/java/org/ldk/structs/FundingSigned.java +++ b/src/main/java/org/ldk/structs/FundingSigned.java @@ -27,19 +27,23 @@ public class FundingSigned extends CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { - byte[] ret = bindings.FundingSigned_get_channel_id(this.ptr); + public ChannelId get_channel_id() { + long ret = bindings.FundingSigned_get_channel_id(this.ptr); Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.FundingSigned_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.FundingSigned_set_channel_id(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** @@ -63,13 +67,14 @@ public class FundingSigned extends CommonBase { /** * Constructs a new FundingSigned given each field */ - public static FundingSigned of(byte[] channel_id_arg, byte[] signature_arg) { - long ret = bindings.FundingSigned_new(InternalUtils.check_arr_len(channel_id_arg, 32), InternalUtils.check_arr_len(signature_arg, 64)); + public static FundingSigned of(org.ldk.structs.ChannelId channel_id_arg, byte[] signature_arg) { + long ret = bindings.FundingSigned_new(channel_id_arg.ptr, InternalUtils.check_arr_len(signature_arg, 64)); Reference.reachabilityFence(channel_id_arg); Reference.reachabilityFence(signature_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.FundingSigned ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.FundingSigned(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); }; return ret_hu_conv; } @@ -109,7 +114,7 @@ public class FundingSigned extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.FundingSigned b) { - boolean ret = bindings.FundingSigned_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.FundingSigned_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/Future.java b/src/main/java/org/ldk/structs/Future.java index 8e7b97fb..38eb28b1 100644 --- a/src/main/java/org/ldk/structs/Future.java +++ b/src/main/java/org/ldk/structs/Future.java @@ -10,8 +10,6 @@ import javax.annotation.Nullable; /** * A simple future which can complete once, and calls some callback(s) when it does so. - * - * Clones can be made and all futures cloned from the same source will complete at the same time. */ @SuppressWarnings("unchecked") // We correctly assign various generic arrays public class Future extends CommonBase { @@ -22,24 +20,6 @@ public class Future extends CommonBase { if (ptr != 0) { bindings.Future_free(ptr); } } - long clone_ptr() { - long ret = bindings.Future_clone_ptr(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * Creates a copy of the Future - */ - public Future clone() { - long ret = bindings.Future_clone(this.ptr); - Reference.reachabilityFence(this); - if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Future ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Future(null, ret); } - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; - return ret_hu_conv; - } - /** * Registers a callback to be called upon completion of this future. If the future has already * completed, the callback will be called immediately. @@ -57,7 +37,6 @@ public class Future extends CommonBase { public void wait_indefinite() { bindings.Future_wait(this.ptr); Reference.reachabilityFence(this); - if (this != null) { this.ptrs_to.add(this); }; } /** @@ -69,7 +48,6 @@ public class Future extends CommonBase { boolean ret = bindings.Future_wait_timeout(this.ptr, max_wait); Reference.reachabilityFence(this); Reference.reachabilityFence(max_wait); - if (this != null) { this.ptrs_to.add(this); }; return ret; } diff --git a/src/main/java/org/ldk/structs/GossipSync.java b/src/main/java/org/ldk/structs/GossipSync.java index 47a9a82a..88336521 100644 --- a/src/main/java/org/ldk/structs/GossipSync.java +++ b/src/main/java/org/ldk/structs/GossipSync.java @@ -71,7 +71,7 @@ public class GossipSync extends CommonBase { * Utility method to constructs a new P2P-variant GossipSync */ public static GossipSync p2_p(org.ldk.structs.P2PGossipSync a) { - long ret = bindings.GossipSync_p2_p(a == null ? 0 : a.ptr); + long ret = bindings.GossipSync_p2_p(a.ptr); Reference.reachabilityFence(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.GossipSync ret_hu_conv = org.ldk.structs.GossipSync.constr_from_ptr(ret); @@ -84,7 +84,7 @@ public class GossipSync extends CommonBase { * Utility method to constructs a new Rapid-variant GossipSync */ public static GossipSync rapid(org.ldk.structs.RapidGossipSync a) { - long ret = bindings.GossipSync_rapid(a == null ? 0 : a.ptr); + long ret = bindings.GossipSync_rapid(a.ptr); Reference.reachabilityFence(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.GossipSync ret_hu_conv = org.ldk.structs.GossipSync.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/GossipTimestampFilter.java b/src/main/java/org/ldk/structs/GossipTimestampFilter.java index 8983375e..e945041d 100644 --- a/src/main/java/org/ldk/structs/GossipTimestampFilter.java +++ b/src/main/java/org/ldk/structs/GossipTimestampFilter.java @@ -128,7 +128,7 @@ public class GossipTimestampFilter extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.GossipTimestampFilter b) { - boolean ret = bindings.GossipTimestampFilter_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.GossipTimestampFilter_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/GraphSyncError.java b/src/main/java/org/ldk/structs/GraphSyncError.java index cdc40d5e..6f55a704 100644 --- a/src/main/java/org/ldk/structs/GraphSyncError.java +++ b/src/main/java/org/ldk/structs/GraphSyncError.java @@ -93,7 +93,7 @@ public class GraphSyncError extends CommonBase { * Utility method to constructs a new LightningError-variant GraphSyncError */ public static GraphSyncError lightning_error(org.ldk.structs.LightningError a) { - long ret = bindings.GraphSyncError_lightning_error(a == null ? 0 : a.ptr); + long ret = bindings.GraphSyncError_lightning_error(a.ptr); Reference.reachabilityFence(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.GraphSyncError ret_hu_conv = org.ldk.structs.GraphSyncError.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/HTLCDescriptor.java b/src/main/java/org/ldk/structs/HTLCDescriptor.java index b80c2dce..b4cc5979 100644 --- a/src/main/java/org/ldk/structs/HTLCDescriptor.java +++ b/src/main/java/org/ldk/structs/HTLCDescriptor.java @@ -36,12 +36,30 @@ public class HTLCDescriptor extends CommonBase { * The parameters required to derive the signer for the HTLC input. */ public void set_channel_derivation_parameters(org.ldk.structs.ChannelDerivationParameters val) { - bindings.HTLCDescriptor_set_channel_derivation_parameters(this.ptr, val == null ? 0 : val.ptr); + bindings.HTLCDescriptor_set_channel_derivation_parameters(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; } + /** + * The txid of the commitment transaction in which the HTLC output lives. + */ + public byte[] get_commitment_txid() { + byte[] ret = bindings.HTLCDescriptor_get_commitment_txid(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * The txid of the commitment transaction in which the HTLC output lives. + */ + public void set_commitment_txid(byte[] val) { + bindings.HTLCDescriptor_set_commitment_txid(this.ptr, InternalUtils.check_arr_len(val, 32)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + /** * The number of the commitment transaction in which the HTLC output lives. */ @@ -124,7 +142,7 @@ public class HTLCDescriptor extends CommonBase { * The details of the HTLC as it appears in the commitment transaction. */ public void set_htlc(org.ldk.structs.HTLCOutputInCommitment val) { - bindings.HTLCDescriptor_set_htlc(this.ptr, val == null ? 0 : val.ptr); + bindings.HTLCDescriptor_set_htlc(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -172,6 +190,28 @@ public class HTLCDescriptor extends CommonBase { Reference.reachabilityFence(val); } + /** + * Constructs a new HTLCDescriptor given each field + */ + public static HTLCDescriptor of(org.ldk.structs.ChannelDerivationParameters channel_derivation_parameters_arg, byte[] commitment_txid_arg, long per_commitment_number_arg, byte[] per_commitment_point_arg, int feerate_per_kw_arg, org.ldk.structs.HTLCOutputInCommitment htlc_arg, org.ldk.structs.Option_ThirtyTwoBytesZ preimage_arg, byte[] counterparty_sig_arg) { + long ret = bindings.HTLCDescriptor_new(channel_derivation_parameters_arg.ptr, InternalUtils.check_arr_len(commitment_txid_arg, 32), per_commitment_number_arg, InternalUtils.check_arr_len(per_commitment_point_arg, 33), feerate_per_kw_arg, htlc_arg.ptr, preimage_arg.ptr, InternalUtils.check_arr_len(counterparty_sig_arg, 64)); + Reference.reachabilityFence(channel_derivation_parameters_arg); + Reference.reachabilityFence(commitment_txid_arg); + Reference.reachabilityFence(per_commitment_number_arg); + Reference.reachabilityFence(per_commitment_point_arg); + Reference.reachabilityFence(feerate_per_kw_arg); + Reference.reachabilityFence(htlc_arg); + Reference.reachabilityFence(preimage_arg); + Reference.reachabilityFence(counterparty_sig_arg); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.HTLCDescriptor ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.HTLCDescriptor(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_derivation_parameters_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(htlc_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(preimage_arg); }; + return ret_hu_conv; + } + long clone_ptr() { long ret = bindings.HTLCDescriptor_clone_ptr(this.ptr); Reference.reachabilityFence(this); @@ -196,7 +236,7 @@ public class HTLCDescriptor extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.HTLCDescriptor b) { - boolean ret = bindings.HTLCDescriptor_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.HTLCDescriptor_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/HTLCDestination.java b/src/main/java/org/ldk/structs/HTLCDestination.java index df280da4..f3f56ff1 100644 --- a/src/main/java/org/ldk/structs/HTLCDestination.java +++ b/src/main/java/org/ldk/structs/HTLCDestination.java @@ -30,6 +30,9 @@ public class HTLCDestination extends CommonBase { if (raw_val.getClass() == bindings.LDKHTLCDestination.InvalidForward.class) { return new InvalidForward(ptr, (bindings.LDKHTLCDestination.InvalidForward)raw_val); } + if (raw_val.getClass() == bindings.LDKHTLCDestination.InvalidOnion.class) { + return new InvalidOnion(ptr, (bindings.LDKHTLCDestination.InvalidOnion)raw_val); + } if (raw_val.getClass() == bindings.LDKHTLCDestination.FailedPayment.class) { return new FailedPayment(ptr, (bindings.LDKHTLCDestination.FailedPayment)raw_val); } @@ -52,11 +55,14 @@ public class HTLCDestination extends CommonBase { /** * The outgoing `channel_id` between us and the next node. */ - public final byte[] channel_id; + public final org.ldk.structs.ChannelId channel_id; private NextHopChannel(long ptr, bindings.LDKHTLCDestination.NextHopChannel obj) { super(null, ptr); this.node_id = obj.node_id; - this.channel_id = obj.channel_id; + long channel_id = obj.channel_id; + org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); } + if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); }; + this.channel_id = channel_id_hu_conv; } } /** @@ -86,6 +92,14 @@ public class HTLCDestination extends CommonBase { this.requested_forward_scid = obj.requested_forward_scid; } } + /** + * We couldn't decode the incoming onion to obtain the forwarding details. + */ + public final static class InvalidOnion extends HTLCDestination { + private InvalidOnion(long ptr, bindings.LDKHTLCDestination.InvalidOnion obj) { + super(null, ptr); + } + } /** * Failure scenario where an HTLC may have been forwarded to be intended for us, * but is invalid for some reason, so we reject it. @@ -129,13 +143,14 @@ public class HTLCDestination extends CommonBase { /** * Utility method to constructs a new NextHopChannel-variant HTLCDestination */ - public static HTLCDestination next_hop_channel(byte[] node_id, byte[] channel_id) { - long ret = bindings.HTLCDestination_next_hop_channel(InternalUtils.check_arr_len(node_id, 33), InternalUtils.check_arr_len(channel_id, 32)); + public static HTLCDestination next_hop_channel(byte[] node_id, org.ldk.structs.ChannelId channel_id) { + long ret = bindings.HTLCDestination_next_hop_channel(InternalUtils.check_arr_len(node_id, 33), channel_id.ptr); Reference.reachabilityFence(node_id); Reference.reachabilityFence(channel_id); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.HTLCDestination ret_hu_conv = org.ldk.structs.HTLCDestination.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id); }; return ret_hu_conv; } @@ -163,6 +178,17 @@ public class HTLCDestination extends CommonBase { return ret_hu_conv; } + /** + * Utility method to constructs a new InvalidOnion-variant HTLCDestination + */ + public static HTLCDestination invalid_onion() { + long ret = bindings.HTLCDestination_invalid_onion(); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.HTLCDestination ret_hu_conv = org.ldk.structs.HTLCDestination.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + /** * Utility method to constructs a new FailedPayment-variant HTLCDestination */ @@ -180,7 +206,7 @@ public class HTLCDestination extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public boolean eq(org.ldk.structs.HTLCDestination b) { - boolean ret = bindings.HTLCDestination_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.HTLCDestination_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); return ret; diff --git a/src/main/java/org/ldk/structs/HTLCOutputInCommitment.java b/src/main/java/org/ldk/structs/HTLCOutputInCommitment.java index 66a6de80..4a604c50 100644 --- a/src/main/java/org/ldk/structs/HTLCOutputInCommitment.java +++ b/src/main/java/org/ldk/structs/HTLCOutputInCommitment.java @@ -167,7 +167,7 @@ public class HTLCOutputInCommitment extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.HTLCOutputInCommitment b) { - boolean ret = bindings.HTLCOutputInCommitment_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.HTLCOutputInCommitment_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/HTLCUpdate.java b/src/main/java/org/ldk/structs/HTLCUpdate.java index 67050a5b..96121a2f 100644 --- a/src/main/java/org/ldk/structs/HTLCUpdate.java +++ b/src/main/java/org/ldk/structs/HTLCUpdate.java @@ -46,7 +46,7 @@ public class HTLCUpdate extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.HTLCUpdate b) { - boolean ret = bindings.HTLCUpdate_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.HTLCUpdate_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/HolderCommitmentTransaction.java b/src/main/java/org/ldk/structs/HolderCommitmentTransaction.java index 7458cc9b..3c2d930f 100644 --- a/src/main/java/org/ldk/structs/HolderCommitmentTransaction.java +++ b/src/main/java/org/ldk/structs/HolderCommitmentTransaction.java @@ -103,7 +103,7 @@ public class HolderCommitmentTransaction extends CommonBase { * The funding keys are used to figure out which signature should go first when building the transaction for broadcast. */ public static HolderCommitmentTransaction of(org.ldk.structs.CommitmentTransaction commitment_tx, byte[] counterparty_sig, byte[][] counterparty_htlc_sigs, byte[] holder_funding_key, byte[] counterparty_funding_key) { - long ret = bindings.HolderCommitmentTransaction_new(commitment_tx == null ? 0 : commitment_tx.ptr, InternalUtils.check_arr_len(counterparty_sig, 64), counterparty_htlc_sigs != null ? Arrays.stream(counterparty_htlc_sigs).map(counterparty_htlc_sigs_conv_8 -> InternalUtils.check_arr_len(counterparty_htlc_sigs_conv_8, 64)).toArray(byte[][]::new) : null, InternalUtils.check_arr_len(holder_funding_key, 33), InternalUtils.check_arr_len(counterparty_funding_key, 33)); + long ret = bindings.HolderCommitmentTransaction_new(commitment_tx.ptr, InternalUtils.check_arr_len(counterparty_sig, 64), counterparty_htlc_sigs != null ? Arrays.stream(counterparty_htlc_sigs).map(counterparty_htlc_sigs_conv_8 -> InternalUtils.check_arr_len(counterparty_htlc_sigs_conv_8, 64)).toArray(byte[][]::new) : null, InternalUtils.check_arr_len(holder_funding_key, 33), InternalUtils.check_arr_len(counterparty_funding_key, 33)); Reference.reachabilityFence(commitment_tx); Reference.reachabilityFence(counterparty_sig); Reference.reachabilityFence(counterparty_htlc_sigs); diff --git a/src/main/java/org/ldk/structs/Hostname.java b/src/main/java/org/ldk/structs/Hostname.java index a6d90d2c..35154e59 100644 --- a/src/main/java/org/ldk/structs/Hostname.java +++ b/src/main/java/org/ldk/structs/Hostname.java @@ -62,7 +62,7 @@ public class Hostname extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.Hostname b) { - boolean ret = bindings.Hostname_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.Hostname_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/HtlcBasepoint.java b/src/main/java/org/ldk/structs/HtlcBasepoint.java index 2240cced..308f089e 100644 --- a/src/main/java/org/ldk/structs/HtlcBasepoint.java +++ b/src/main/java/org/ldk/structs/HtlcBasepoint.java @@ -54,7 +54,7 @@ public class HtlcBasepoint extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.HtlcBasepoint b) { - boolean ret = bindings.HtlcBasepoint_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.HtlcBasepoint_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; @@ -104,6 +104,16 @@ public class HtlcBasepoint extends CommonBase { return ret; } + /** + * Derives the \"tweak\" used in calculate [`HtlcKey::from_basepoint`].\n\n[`HtlcKey::from_basepoint`] calculates a private key as:\n`privkey = basepoint_secret + SHA256(per_commitment_point || basepoint)`\n\nThis calculates the hash part in the tweak derivation process, which is used to\nensure that each key is unique and cannot be guessed by an external party. + */ + public byte[] derive_add_tweak(byte[] per_commitment_point) { + byte[] ret = bindings.HtlcBasepoint_derive_add_tweak(this.ptr, InternalUtils.check_arr_len(per_commitment_point, 33)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(per_commitment_point); + return ret; + } + /** * Serialize the HtlcBasepoint object into a byte array which can be read by HtlcBasepoint_read */ diff --git a/src/main/java/org/ldk/structs/HtlcKey.java b/src/main/java/org/ldk/structs/HtlcKey.java index 68a55b8c..ec96e612 100644 --- a/src/main/java/org/ldk/structs/HtlcKey.java +++ b/src/main/java/org/ldk/structs/HtlcKey.java @@ -58,7 +58,7 @@ public class HtlcKey extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.HtlcKey b) { - boolean ret = bindings.HtlcKey_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.HtlcKey_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; @@ -91,7 +91,7 @@ public class HtlcKey extends CommonBase { * Derive a public htlcpubkey using one node\'s `per_commitment_point` and its countersignatory\'s `basepoint` */ public static HtlcKey from_basepoint(org.ldk.structs.HtlcBasepoint countersignatory_basepoint, byte[] per_commitment_point) { - long ret = bindings.HtlcKey_from_basepoint(countersignatory_basepoint == null ? 0 : countersignatory_basepoint.ptr, InternalUtils.check_arr_len(per_commitment_point, 33)); + long ret = bindings.HtlcKey_from_basepoint(countersignatory_basepoint.ptr, InternalUtils.check_arr_len(per_commitment_point, 33)); Reference.reachabilityFence(countersignatory_basepoint); Reference.reachabilityFence(per_commitment_point); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/src/main/java/org/ldk/structs/InFlightHtlcs.java b/src/main/java/org/ldk/structs/InFlightHtlcs.java index 3282013a..de2c4ead 100644 --- a/src/main/java/org/ldk/structs/InFlightHtlcs.java +++ b/src/main/java/org/ldk/structs/InFlightHtlcs.java @@ -54,7 +54,7 @@ public class InFlightHtlcs extends CommonBase { * Takes in a path with payer's node id and adds the path's details to `InFlightHtlcs`. */ public void process_path(org.ldk.structs.Path path, byte[] payer_node_id) { - bindings.InFlightHtlcs_process_path(this.ptr, path == null ? 0 : path.ptr, InternalUtils.check_arr_len(payer_node_id, 33)); + bindings.InFlightHtlcs_process_path(this.ptr, path.ptr, InternalUtils.check_arr_len(payer_node_id, 33)); Reference.reachabilityFence(this); Reference.reachabilityFence(path); Reference.reachabilityFence(payer_node_id); @@ -66,7 +66,7 @@ public class InFlightHtlcs extends CommonBase { * id. */ public void add_inflight_htlc(org.ldk.structs.NodeId source, org.ldk.structs.NodeId target, long channel_scid, long used_msat) { - bindings.InFlightHtlcs_add_inflight_htlc(this.ptr, source == null ? 0 : source.ptr, target == null ? 0 : target.ptr, channel_scid, used_msat); + bindings.InFlightHtlcs_add_inflight_htlc(this.ptr, source.ptr, target.ptr, channel_scid, used_msat); Reference.reachabilityFence(this); Reference.reachabilityFence(source); Reference.reachabilityFence(target); @@ -81,7 +81,7 @@ public class InFlightHtlcs extends CommonBase { * id. */ public Option_u64Z used_liquidity_msat(org.ldk.structs.NodeId source, org.ldk.structs.NodeId target, long channel_scid) { - long ret = bindings.InFlightHtlcs_used_liquidity_msat(this.ptr, source == null ? 0 : source.ptr, target == null ? 0 : target.ptr, channel_scid); + long ret = bindings.InFlightHtlcs_used_liquidity_msat(this.ptr, source.ptr, target.ptr, channel_scid); Reference.reachabilityFence(this); Reference.reachabilityFence(source); Reference.reachabilityFence(target); diff --git a/src/main/java/org/ldk/structs/InMemorySigner.java b/src/main/java/org/ldk/structs/InMemorySigner.java index 1c5c25db..7e53df1f 100644 --- a/src/main/java/org/ldk/structs/InMemorySigner.java +++ b/src/main/java/org/ldk/structs/InMemorySigner.java @@ -305,7 +305,7 @@ public class InMemorySigner extends CommonBase { * [`descriptor.outpoint`]: StaticPaymentOutputDescriptor::outpoint */ public Result_WitnessNoneZ sign_counterparty_payment_input(byte[] spend_tx, long input_idx, org.ldk.structs.StaticPaymentOutputDescriptor descriptor) { - long ret = bindings.InMemorySigner_sign_counterparty_payment_input(this.ptr, spend_tx, input_idx, descriptor == null ? 0 : descriptor.ptr); + long ret = bindings.InMemorySigner_sign_counterparty_payment_input(this.ptr, spend_tx, input_idx, descriptor.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(spend_tx); Reference.reachabilityFence(input_idx); @@ -329,7 +329,7 @@ public class InMemorySigner extends CommonBase { * [`descriptor.to_self_delay`]: DelayedPaymentOutputDescriptor::to_self_delay */ public Result_WitnessNoneZ sign_dynamic_p2wsh_input(byte[] spend_tx, long input_idx, org.ldk.structs.DelayedPaymentOutputDescriptor descriptor) { - long ret = bindings.InMemorySigner_sign_dynamic_p2wsh_input(this.ptr, spend_tx, input_idx, descriptor == null ? 0 : descriptor.ptr); + long ret = bindings.InMemorySigner_sign_dynamic_p2wsh_input(this.ptr, spend_tx, input_idx, descriptor.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(spend_tx); Reference.reachabilityFence(input_idx); diff --git a/src/main/java/org/ldk/structs/InboundHTLCErr.java b/src/main/java/org/ldk/structs/InboundHTLCErr.java index 279e4d38..377c84c8 100644 --- a/src/main/java/org/ldk/structs/InboundHTLCErr.java +++ b/src/main/java/org/ldk/structs/InboundHTLCErr.java @@ -90,4 +90,51 @@ public class InboundHTLCErr extends CommonBase { return ret_hu_conv; } + long clone_ptr() { + long ret = bindings.InboundHTLCErr_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a copy of the InboundHTLCErr + */ + public InboundHTLCErr clone() { + long ret = bindings.InboundHTLCErr_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.InboundHTLCErr ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InboundHTLCErr(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Generates a non-cryptographic 64-bit hash of the InboundHTLCErr. + */ + public long hash() { + long ret = bindings.InboundHTLCErr_hash(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + @Override public int hashCode() { + return (int)this.hash(); + } + /** + * Checks if two InboundHTLCErrs contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ + public boolean eq(org.ldk.structs.InboundHTLCErr b) { + boolean ret = bindings.InboundHTLCErr_eq(this.ptr, b.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(b); + if (this != null) { this.ptrs_to.add(b); }; + return ret; + } + + @Override public boolean equals(Object o) { + if (!(o instanceof InboundHTLCErr)) return false; + return this.eq((InboundHTLCErr)o); + } } diff --git a/src/main/java/org/ldk/structs/Init.java b/src/main/java/org/ldk/structs/Init.java index 6379382b..b2abc86d 100644 --- a/src/main/java/org/ldk/structs/Init.java +++ b/src/main/java/org/ldk/structs/Init.java @@ -38,7 +38,7 @@ public class Init extends CommonBase { * The relevant features which the sender supports. */ public void set_features(org.ldk.structs.InitFeatures val) { - bindings.Init_set_features(this.ptr, val == null ? 0 : val.ptr); + bindings.Init_set_features(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -108,7 +108,7 @@ public class Init extends CommonBase { * Constructs a new Init given each field */ public static Init of(org.ldk.structs.InitFeatures features_arg, org.ldk.structs.Option_CVec_ThirtyTwoBytesZZ networks_arg, org.ldk.structs.Option_SocketAddressZ remote_network_address_arg) { - long ret = bindings.Init_new(features_arg == null ? 0 : features_arg.ptr, networks_arg.ptr, remote_network_address_arg.ptr); + long ret = bindings.Init_new(features_arg.ptr, networks_arg.ptr, remote_network_address_arg.ptr); Reference.reachabilityFence(features_arg); Reference.reachabilityFence(networks_arg); Reference.reachabilityFence(remote_network_address_arg); @@ -157,7 +157,7 @@ public class Init extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.Init b) { - boolean ret = bindings.Init_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.Init_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/InitFeatures.java b/src/main/java/org/ldk/structs/InitFeatures.java index fbd23d89..418f79e8 100644 --- a/src/main/java/org/ldk/structs/InitFeatures.java +++ b/src/main/java/org/ldk/structs/InitFeatures.java @@ -26,7 +26,7 @@ public class InitFeatures extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.InitFeatures b) { - boolean ret = bindings.InitFeatures_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.InitFeatures_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; @@ -82,7 +82,7 @@ public class InitFeatures extends CommonBase { * Returns true if this `Features` object contains required features unknown by `other`. */ public boolean requires_unknown_bits_from(org.ldk.structs.InitFeatures other) { - boolean ret = bindings.InitFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr); + boolean ret = bindings.InitFeatures_requires_unknown_bits_from(this.ptr, other.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(other); if (this != null) { this.ptrs_to.add(other); }; @@ -794,4 +794,38 @@ public class InitFeatures extends CommonBase { return ret; } + /** + * Set this feature as optional. + */ + public void set_trampoline_routing_optional() { + bindings.InitFeatures_set_trampoline_routing_optional(this.ptr); + Reference.reachabilityFence(this); + } + + /** + * Set this feature as required. + */ + public void set_trampoline_routing_required() { + bindings.InitFeatures_set_trampoline_routing_required(this.ptr); + Reference.reachabilityFence(this); + } + + /** + * Checks if this feature is supported. + */ + public boolean supports_trampoline_routing() { + boolean ret = bindings.InitFeatures_supports_trampoline_routing(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Checks if this feature is required. + */ + public boolean requires_trampoline_routing() { + boolean ret = bindings.InitFeatures_requires_trampoline_routing(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + } diff --git a/src/main/java/org/ldk/structs/Input.java b/src/main/java/org/ldk/structs/Input.java index d010bdb0..4f25ed3f 100644 --- a/src/main/java/org/ldk/structs/Input.java +++ b/src/main/java/org/ldk/structs/Input.java @@ -38,7 +38,7 @@ public class Input extends CommonBase { * The unique identifier of the input. */ public void set_outpoint(org.ldk.structs.OutPoint val) { - bindings.Input_set_outpoint(this.ptr, val == null ? 0 : val.ptr); + bindings.Input_set_outpoint(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -90,7 +90,7 @@ public class Input extends CommonBase { * Constructs a new Input given each field */ public static Input of(org.ldk.structs.OutPoint outpoint_arg, org.ldk.structs.TxOut previous_utxo_arg, long satisfaction_weight_arg) { - long ret = bindings.Input_new(outpoint_arg == null ? 0 : outpoint_arg.ptr, previous_utxo_arg.ptr, satisfaction_weight_arg); + long ret = bindings.Input_new(outpoint_arg.ptr, previous_utxo_arg.ptr, satisfaction_weight_arg); Reference.reachabilityFence(outpoint_arg); Reference.reachabilityFence(previous_utxo_arg); Reference.reachabilityFence(satisfaction_weight_arg); @@ -137,7 +137,7 @@ public class Input extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.Input b) { - boolean ret = bindings.Input_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.Input_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/IntroductionNode.java b/src/main/java/org/ldk/structs/IntroductionNode.java new file mode 100644 index 00000000..13d25d44 --- /dev/null +++ b/src/main/java/org/ldk/structs/IntroductionNode.java @@ -0,0 +1,126 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + + +/** + * The unblinded node in a [`BlindedPath`]. + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class IntroductionNode extends CommonBase { + private IntroductionNode(Object _dummy, long ptr) { super(ptr); } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + if (ptr != 0) { bindings.IntroductionNode_free(ptr); } + } + static IntroductionNode constr_from_ptr(long ptr) { + bindings.LDKIntroductionNode raw_val = bindings.LDKIntroductionNode_ref_from_ptr(ptr); + if (raw_val.getClass() == bindings.LDKIntroductionNode.NodeId.class) { + return new NodeId(ptr, (bindings.LDKIntroductionNode.NodeId)raw_val); + } + if (raw_val.getClass() == bindings.LDKIntroductionNode.DirectedShortChannelId.class) { + return new DirectedShortChannelId(ptr, (bindings.LDKIntroductionNode.DirectedShortChannelId)raw_val); + } + assert false; return null; // Unreachable without extending the (internal) bindings interface + } + + /** + * The node id of the introduction node. + */ + public final static class NodeId extends IntroductionNode { + public final byte[] node_id; + private NodeId(long ptr, bindings.LDKIntroductionNode.NodeId obj) { + super(null, ptr); + this.node_id = obj.node_id; + } + } + /** + * The short channel id of the channel leading to the introduction node. The [`Direction`] + * identifies which side of the channel is the introduction node. + */ + public final static class DirectedShortChannelId extends IntroductionNode { + public final org.ldk.enums.Direction _0; + public final long _1; + private DirectedShortChannelId(long ptr, bindings.LDKIntroductionNode.DirectedShortChannelId obj) { + super(null, ptr); + this._0 = obj._0; + this._1 = obj._1; + } + } + long clone_ptr() { + long ret = bindings.IntroductionNode_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a copy of the IntroductionNode + */ + public IntroductionNode clone() { + long ret = bindings.IntroductionNode_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.IntroductionNode ret_hu_conv = org.ldk.structs.IntroductionNode.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new NodeId-variant IntroductionNode + */ + public static IntroductionNode node_id(byte[] a) { + long ret = bindings.IntroductionNode_node_id(InternalUtils.check_arr_len(a, 33)); + Reference.reachabilityFence(a); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.IntroductionNode ret_hu_conv = org.ldk.structs.IntroductionNode.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new DirectedShortChannelId-variant IntroductionNode + */ + public static IntroductionNode directed_short_channel_id(org.ldk.enums.Direction a, long b) { + long ret = bindings.IntroductionNode_directed_short_channel_id(a, b); + Reference.reachabilityFence(a); + Reference.reachabilityFence(b); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.IntroductionNode ret_hu_conv = org.ldk.structs.IntroductionNode.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Generates a non-cryptographic 64-bit hash of the IntroductionNode. + */ + public long hash() { + long ret = bindings.IntroductionNode_hash(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + @Override public int hashCode() { + return (int)this.hash(); + } + /** + * Checks if two IntroductionNodes contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + */ + public boolean eq(org.ldk.structs.IntroductionNode b) { + boolean ret = bindings.IntroductionNode_eq(this.ptr, b.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(b); + return ret; + } + + @Override public boolean equals(Object o) { + if (!(o instanceof IntroductionNode)) return false; + return this.eq((IntroductionNode)o); + } +} diff --git a/src/main/java/org/ldk/structs/InvoiceError.java b/src/main/java/org/ldk/structs/InvoiceError.java index 658186fe..a61b339c 100644 --- a/src/main/java/org/ldk/structs/InvoiceError.java +++ b/src/main/java/org/ldk/structs/InvoiceError.java @@ -72,7 +72,7 @@ public class InvoiceError extends CommonBase { * An explanation of the error. */ public void set_message(org.ldk.structs.UntrustedString val) { - bindings.InvoiceError_set_message(this.ptr, val == null ? 0 : val.ptr); + bindings.InvoiceError_set_message(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -84,7 +84,7 @@ public class InvoiceError extends CommonBase { * Note that erroneous_field_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ public static InvoiceError of(@Nullable org.ldk.structs.ErroneousField erroneous_field_arg, org.ldk.structs.UntrustedString message_arg) { - long ret = bindings.InvoiceError_new(erroneous_field_arg == null ? 0 : erroneous_field_arg.ptr, message_arg == null ? 0 : message_arg.ptr); + long ret = bindings.InvoiceError_new(erroneous_field_arg == null ? 0 : erroneous_field_arg.ptr, message_arg.ptr); Reference.reachabilityFence(erroneous_field_arg); Reference.reachabilityFence(message_arg); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/src/main/java/org/ldk/structs/InvoiceRequest.java b/src/main/java/org/ldk/structs/InvoiceRequest.java index 2706e52d..8f96274f 100644 --- a/src/main/java/org/ldk/structs/InvoiceRequest.java +++ b/src/main/java/org/ldk/structs/InvoiceRequest.java @@ -70,15 +70,12 @@ public class InvoiceRequest extends CommonBase { /** * The minimum amount required for a successful payment of a single item. - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ - @Nullable - public Amount amount() { + public Option_AmountZ amount() { long ret = bindings.InvoiceRequest_amount(this.ptr); Reference.reachabilityFence(this); if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Amount ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Amount(null, ret); } + org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; return ret_hu_conv; } @@ -86,7 +83,10 @@ public class InvoiceRequest extends CommonBase { /** * A complete description of the purpose of the payment. Intended to be displayed to the user * but with the caveat that it has not been verified in any way. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ + @Nullable public PrintableString description() { long ret = bindings.InvoiceRequest_description(this.ptr); Reference.reachabilityFence(this); @@ -163,14 +163,17 @@ public class InvoiceRequest extends CommonBase { long ret = bindings.InvoiceRequest_supported_quantity(this.ptr); Reference.reachabilityFence(this); if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Quantity ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Quantity(null, ret); } + org.ldk.structs.Quantity ret_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; return ret_hu_conv; } /** * The public key used by the recipient to sign invoices. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ + @Nullable public byte[] signing_pubkey() { byte[] ret = bindings.InvoiceRequest_signing_pubkey(this.ptr); Reference.reachabilityFence(this); @@ -263,14 +266,58 @@ public class InvoiceRequest extends CommonBase { } /** - * Signature of the invoice request using [`payer_id`]. + * Creates an [`InvoiceBuilder`] for the request with the given required fields and using the + * [`Duration`] since [`std::time::SystemTime::UNIX_EPOCH`] as the creation time. * - * [`payer_id`]: Self::payer_id + * See [`InvoiceRequest::respond_with_no_std`] for further details where the aforementioned + * creation time is used for the `created_at` parameter. + * + * [`Duration`]: core::time::Duration */ - public byte[] signature() { - byte[] ret = bindings.InvoiceRequest_signature(this.ptr); + public Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ respond_with(TwoTuple_BlindedPayInfoBlindedPathZ[] payment_paths, byte[] payment_hash) { + long ret = bindings.InvoiceRequest_respond_with(this.ptr, payment_paths != null ? Arrays.stream(payment_paths).mapToLong(payment_paths_conv_37 -> payment_paths_conv_37.ptr).toArray() : null, InternalUtils.check_arr_len(payment_hash, 32)); Reference.reachabilityFence(this); - return ret; + Reference.reachabilityFence(payment_paths); + Reference.reachabilityFence(payment_hash); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Creates an [`InvoiceBuilder`] for the request with the given required fields. + * + * Unless [`InvoiceBuilder::relative_expiry`] is set, the invoice will expire two hours after + * `created_at`, which is used to set [`Bolt12Invoice::created_at`]. Useful for `no-std` builds + * where [`std::time::SystemTime`] is not available. + * + * The caller is expected to remember the preimage of `payment_hash` in order to claim a payment + * for the invoice. + * + * The `payment_paths` parameter is useful for maintaining the payment recipient's privacy. It + * must contain one or more elements ordered from most-preferred to least-preferred, if there's + * a preference. Note, however, that any privacy is lost if a public node id was used for + * [`Offer::signing_pubkey`]. + * + * Errors if the request contains unknown required features. + * + * # Note + * + * If the originating [`Offer`] was created using [`OfferBuilder::deriving_signing_pubkey`], + * then use [`InvoiceRequest::verify`] and [`VerifiedInvoiceRequest`] methods instead. + * + * [`Bolt12Invoice::created_at`]: crate::offers::invoice::Bolt12Invoice::created_at + * [`OfferBuilder::deriving_signing_pubkey`]: crate::offers::offer::OfferBuilder::deriving_signing_pubkey + */ + public Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ respond_with_no_std(TwoTuple_BlindedPayInfoBlindedPathZ[] payment_paths, byte[] payment_hash, long created_at) { + long ret = bindings.InvoiceRequest_respond_with_no_std(this.ptr, payment_paths != null ? Arrays.stream(payment_paths).mapToLong(payment_paths_conv_37 -> payment_paths_conv_37.ptr).toArray() : null, InternalUtils.check_arr_len(payment_hash, 32), created_at); + Reference.reachabilityFence(this); + Reference.reachabilityFence(payment_paths); + Reference.reachabilityFence(payment_hash); + Reference.reachabilityFence(created_at); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; } /** @@ -281,7 +328,7 @@ public class InvoiceRequest extends CommonBase { * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice */ public Result_VerifiedInvoiceRequestNoneZ verify(org.ldk.structs.ExpandedKey key) { - long ret = bindings.InvoiceRequest_verify(this.ptr, key == null ? 0 : key.ptr); + long ret = bindings.InvoiceRequest_verify(this.ptr, key.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(key); if (ret >= 0 && ret <= 4096) { return null; } @@ -291,6 +338,17 @@ public class InvoiceRequest extends CommonBase { return ret_hu_conv; } + /** + * Signature of the invoice request using [`payer_id`]. + * + * [`payer_id`]: Self::payer_id + */ + public byte[] signature() { + byte[] ret = bindings.InvoiceRequest_signature(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + /** * Serialize the InvoiceRequest object into a byte array which can be read by InvoiceRequest_read */ diff --git a/src/main/java/org/ldk/structs/InvoiceRequestFeatures.java b/src/main/java/org/ldk/structs/InvoiceRequestFeatures.java index bb0e10ae..3d761183 100644 --- a/src/main/java/org/ldk/structs/InvoiceRequestFeatures.java +++ b/src/main/java/org/ldk/structs/InvoiceRequestFeatures.java @@ -26,7 +26,7 @@ public class InvoiceRequestFeatures extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.InvoiceRequestFeatures b) { - boolean ret = bindings.InvoiceRequestFeatures_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.InvoiceRequestFeatures_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; @@ -82,7 +82,7 @@ public class InvoiceRequestFeatures extends CommonBase { * Returns true if this `Features` object contains required features unknown by `other`. */ public boolean requires_unknown_bits_from(org.ldk.structs.InvoiceRequestFeatures other) { - boolean ret = bindings.InvoiceRequestFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr); + boolean ret = bindings.InvoiceRequestFeatures_requires_unknown_bits_from(this.ptr, other.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(other); if (this != null) { this.ptrs_to.add(other); }; diff --git a/src/main/java/org/ldk/structs/InvoiceRequestFields.java b/src/main/java/org/ldk/structs/InvoiceRequestFields.java new file mode 100644 index 00000000..a44ad955 --- /dev/null +++ b/src/main/java/org/ldk/structs/InvoiceRequestFields.java @@ -0,0 +1,167 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + + +/** + * Fields sent in an [`InvoiceRequest`] message to include in [`PaymentContext::Bolt12Offer`]. + * + * [`PaymentContext::Bolt12Offer`]: crate::blinded_path::payment::PaymentContext::Bolt12Offer + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class InvoiceRequestFields extends CommonBase { + InvoiceRequestFields(Object _dummy, long ptr) { super(ptr); } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + if (ptr != 0) { bindings.InvoiceRequestFields_free(ptr); } + } + + /** + * A possibly transient pubkey used to sign the invoice request. + */ + public byte[] get_payer_id() { + byte[] ret = bindings.InvoiceRequestFields_get_payer_id(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * A possibly transient pubkey used to sign the invoice request. + */ + public void set_payer_id(byte[] val) { + bindings.InvoiceRequestFields_set_payer_id(this.ptr, InternalUtils.check_arr_len(val, 33)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * The quantity of the offer's item conforming to [`Offer::is_valid_quantity`]. + */ + public Option_u64Z get_quantity() { + long ret = bindings.InvoiceRequestFields_get_quantity(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_u64Z ret_hu_conv = org.ldk.structs.Option_u64Z.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * The quantity of the offer's item conforming to [`Offer::is_valid_quantity`]. + */ + public void set_quantity(org.ldk.structs.Option_u64Z val) { + bindings.InvoiceRequestFields_set_quantity(this.ptr, val.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; + } + + /** + * A payer-provided note which will be seen by the recipient and reflected back in the invoice + * response. Truncated to [`PAYER_NOTE_LIMIT`] characters. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + @Nullable + public UntrustedString get_payer_note_truncated() { + long ret = bindings.InvoiceRequestFields_get_payer_note_truncated(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.UntrustedString ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UntrustedString(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * A payer-provided note which will be seen by the recipient and reflected back in the invoice + * response. Truncated to [`PAYER_NOTE_LIMIT`] characters. + * + * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public void set_payer_note_truncated(@Nullable org.ldk.structs.UntrustedString val) { + bindings.InvoiceRequestFields_set_payer_note_truncated(this.ptr, val == null ? 0 : val.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; + } + + /** + * Constructs a new InvoiceRequestFields given each field + * + * Note that payer_note_truncated_arg (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public static InvoiceRequestFields of(byte[] payer_id_arg, org.ldk.structs.Option_u64Z quantity_arg, @Nullable org.ldk.structs.UntrustedString payer_note_truncated_arg) { + long ret = bindings.InvoiceRequestFields_new(InternalUtils.check_arr_len(payer_id_arg, 33), quantity_arg.ptr, payer_note_truncated_arg == null ? 0 : payer_note_truncated_arg.ptr); + Reference.reachabilityFence(payer_id_arg); + Reference.reachabilityFence(quantity_arg); + Reference.reachabilityFence(payer_note_truncated_arg); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.InvoiceRequestFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InvoiceRequestFields(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(quantity_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(payer_note_truncated_arg); }; + return ret_hu_conv; + } + + long clone_ptr() { + long ret = bindings.InvoiceRequestFields_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a copy of the InvoiceRequestFields + */ + public InvoiceRequestFields clone() { + long ret = bindings.InvoiceRequestFields_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.InvoiceRequestFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InvoiceRequestFields(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Checks if two InvoiceRequestFieldss contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ + public boolean eq(org.ldk.structs.InvoiceRequestFields b) { + boolean ret = bindings.InvoiceRequestFields_eq(this.ptr, b.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(b); + if (this != null) { this.ptrs_to.add(b); }; + return ret; + } + + @Override public boolean equals(Object o) { + if (!(o instanceof InvoiceRequestFields)) return false; + return this.eq((InvoiceRequestFields)o); + } + /** + * Serialize the InvoiceRequestFields object into a byte array which can be read by InvoiceRequestFields_read + */ + public byte[] write() { + byte[] ret = bindings.InvoiceRequestFields_write(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Read a InvoiceRequestFields from a byte array, created by InvoiceRequestFields_write + */ + public static Result_InvoiceRequestFieldsDecodeErrorZ read(byte[] ser) { + long ret = bindings.InvoiceRequestFields_read(ser); + Reference.reachabilityFence(ser); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceRequestFieldsDecodeErrorZ ret_hu_conv = Result_InvoiceRequestFieldsDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/InvoiceRequestWithDerivedPayerIdBuilder.java b/src/main/java/org/ldk/structs/InvoiceRequestWithDerivedPayerIdBuilder.java new file mode 100644 index 00000000..4ac13bdd --- /dev/null +++ b/src/main/java/org/ldk/structs/InvoiceRequestWithDerivedPayerIdBuilder.java @@ -0,0 +1,142 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + + +/** + * Builds an [`InvoiceRequest`] from an [`Offer`] for the \"offer to be paid\" flow. + * + * See [module-level documentation] for usage. + * + * [module-level documentation]: self + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class InvoiceRequestWithDerivedPayerIdBuilder extends CommonBase { + InvoiceRequestWithDerivedPayerIdBuilder(Object _dummy, long ptr) { super(ptr); } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + if (ptr != 0) { bindings.InvoiceRequestWithDerivedPayerIdBuilder_free(ptr); } + } + + /** + * Builds a signed [`InvoiceRequest`] after checking for valid semantics. + */ + public Result_InvoiceRequestBolt12SemanticErrorZ build_and_sign() { + long ret = bindings.InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceRequestBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.add(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + return ret_hu_conv; + } + + /** + * Sets the [`InvoiceRequest::chain`] of the given [`Network`] for paying an invoice. If not + * called, [`Network::Bitcoin`] is assumed. Errors if the chain for `network` is not supported + * by the offer. + * + * Successive calls to this method will override the previous setting. + */ + public Result_NoneBolt12SemanticErrorZ chain(org.ldk.enums.Network network) { + long ret = bindings.InvoiceRequestWithDerivedPayerIdBuilder_chain(this.ptr, network); + Reference.reachabilityFence(this); + Reference.reachabilityFence(network); + if (ret >= 0 && ret <= 4096) { return null; } + Result_NoneBolt12SemanticErrorZ ret_hu_conv = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.add(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + return ret_hu_conv; + } + + /** + * Sets the [`InvoiceRequest::amount_msats`] for paying an invoice. Errors if `amount_msats` is + * not at least the expected invoice amount (i.e., [`Offer::amount`] times [`quantity`]). + * + * Successive calls to this method will override the previous setting. + * + * [`quantity`]: Self::quantity + */ + public Result_NoneBolt12SemanticErrorZ amount_msats(long amount_msats) { + long ret = bindings.InvoiceRequestWithDerivedPayerIdBuilder_amount_msats(this.ptr, amount_msats); + Reference.reachabilityFence(this); + Reference.reachabilityFence(amount_msats); + if (ret >= 0 && ret <= 4096) { return null; } + Result_NoneBolt12SemanticErrorZ ret_hu_conv = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.add(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + return ret_hu_conv; + } + + /** + * Sets [`InvoiceRequest::quantity`] of items. If not set, `1` is assumed. Errors if `quantity` + * does not conform to [`Offer::is_valid_quantity`]. + * + * Successive calls to this method will override the previous setting. + */ + public Result_NoneBolt12SemanticErrorZ quantity(long quantity) { + long ret = bindings.InvoiceRequestWithDerivedPayerIdBuilder_quantity(this.ptr, quantity); + Reference.reachabilityFence(this); + Reference.reachabilityFence(quantity); + if (ret >= 0 && ret <= 4096) { return null; } + Result_NoneBolt12SemanticErrorZ ret_hu_conv = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.add(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + return ret_hu_conv; + } + + /** + * Sets the [`InvoiceRequest::payer_note`]. + * + * Successive calls to this method will override the previous setting. + */ + public void payer_note(java.lang.String payer_note) { + bindings.InvoiceRequestWithDerivedPayerIdBuilder_payer_note(this.ptr, payer_note); + Reference.reachabilityFence(this); + Reference.reachabilityFence(payer_note); + if (this != null) { this.ptrs_to.add(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + } + +} diff --git a/src/main/java/org/ldk/structs/InvoiceRequestWithExplicitPayerIdBuilder.java b/src/main/java/org/ldk/structs/InvoiceRequestWithExplicitPayerIdBuilder.java new file mode 100644 index 00000000..974301c4 --- /dev/null +++ b/src/main/java/org/ldk/structs/InvoiceRequestWithExplicitPayerIdBuilder.java @@ -0,0 +1,143 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + + +/** + * Builds an [`InvoiceRequest`] from an [`Offer`] for the \"offer to be paid\" flow. + * + * See [module-level documentation] for usage. + * + * [module-level documentation]: self + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class InvoiceRequestWithExplicitPayerIdBuilder extends CommonBase { + InvoiceRequestWithExplicitPayerIdBuilder(Object _dummy, long ptr) { super(ptr); } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + if (ptr != 0) { bindings.InvoiceRequestWithExplicitPayerIdBuilder_free(ptr); } + } + + /** + * Builds an unsigned [`InvoiceRequest`] after checking for valid semantics. It can be signed + * by [`UnsignedInvoiceRequest::sign`]. + */ + public Result_UnsignedInvoiceRequestBolt12SemanticErrorZ build() { + long ret = bindings.InvoiceRequestWithExplicitPayerIdBuilder_build(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_UnsignedInvoiceRequestBolt12SemanticErrorZ ret_hu_conv = Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.add(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + return ret_hu_conv; + } + + /** + * Sets the [`InvoiceRequest::chain`] of the given [`Network`] for paying an invoice. If not + * called, [`Network::Bitcoin`] is assumed. Errors if the chain for `network` is not supported + * by the offer. + * + * Successive calls to this method will override the previous setting. + */ + public Result_NoneBolt12SemanticErrorZ chain(org.ldk.enums.Network network) { + long ret = bindings.InvoiceRequestWithExplicitPayerIdBuilder_chain(this.ptr, network); + Reference.reachabilityFence(this); + Reference.reachabilityFence(network); + if (ret >= 0 && ret <= 4096) { return null; } + Result_NoneBolt12SemanticErrorZ ret_hu_conv = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.add(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + return ret_hu_conv; + } + + /** + * Sets the [`InvoiceRequest::amount_msats`] for paying an invoice. Errors if `amount_msats` is + * not at least the expected invoice amount (i.e., [`Offer::amount`] times [`quantity`]). + * + * Successive calls to this method will override the previous setting. + * + * [`quantity`]: Self::quantity + */ + public Result_NoneBolt12SemanticErrorZ amount_msats(long amount_msats) { + long ret = bindings.InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(this.ptr, amount_msats); + Reference.reachabilityFence(this); + Reference.reachabilityFence(amount_msats); + if (ret >= 0 && ret <= 4096) { return null; } + Result_NoneBolt12SemanticErrorZ ret_hu_conv = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.add(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + return ret_hu_conv; + } + + /** + * Sets [`InvoiceRequest::quantity`] of items. If not set, `1` is assumed. Errors if `quantity` + * does not conform to [`Offer::is_valid_quantity`]. + * + * Successive calls to this method will override the previous setting. + */ + public Result_NoneBolt12SemanticErrorZ quantity(long quantity) { + long ret = bindings.InvoiceRequestWithExplicitPayerIdBuilder_quantity(this.ptr, quantity); + Reference.reachabilityFence(this); + Reference.reachabilityFence(quantity); + if (ret >= 0 && ret <= 4096) { return null; } + Result_NoneBolt12SemanticErrorZ ret_hu_conv = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.add(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + return ret_hu_conv; + } + + /** + * Sets the [`InvoiceRequest::payer_note`]. + * + * Successive calls to this method will override the previous setting. + */ + public void payer_note(java.lang.String payer_note) { + bindings.InvoiceRequestWithExplicitPayerIdBuilder_payer_note(this.ptr, payer_note); + Reference.reachabilityFence(this); + Reference.reachabilityFence(payer_note); + if (this != null) { this.ptrs_to.add(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + } + +} diff --git a/src/main/java/org/ldk/structs/InvoiceWithDerivedSigningPubkeyBuilder.java b/src/main/java/org/ldk/structs/InvoiceWithDerivedSigningPubkeyBuilder.java new file mode 100644 index 00000000..be96052d --- /dev/null +++ b/src/main/java/org/ldk/structs/InvoiceWithDerivedSigningPubkeyBuilder.java @@ -0,0 +1,154 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + + +/** + * Builds a [`Bolt12Invoice`] from either: + * - an [`InvoiceRequest`] for the \"offer to be paid\" flow or + * - a [`Refund`] for the \"offer for money\" flow. + * + * See [module-level documentation] for usage. + * + * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest + * [`Refund`]: crate::offers::refund::Refund + * [module-level documentation]: self + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class InvoiceWithDerivedSigningPubkeyBuilder extends CommonBase { + InvoiceWithDerivedSigningPubkeyBuilder(Object _dummy, long ptr) { super(ptr); } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + if (ptr != 0) { bindings.InvoiceWithDerivedSigningPubkeyBuilder_free(ptr); } + } + + /** + * Builds a signed [`Bolt12Invoice`] after checking for valid semantics. + */ + public Result_Bolt12InvoiceBolt12SemanticErrorZ build_and_sign() { + long ret = bindings.InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_Bolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_Bolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.add(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + return ret_hu_conv; + } + + /** + * Sets the [`Bolt12Invoice::relative_expiry`] as seconds since [`Bolt12Invoice::created_at`]. + * Any expiry that has already passed is valid and can be checked for using + * [`Bolt12Invoice::is_expired`]. + * + * Successive calls to this method will override the previous setting. + */ + public void relative_expiry(int relative_expiry_secs) { + bindings.InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry(this.ptr, relative_expiry_secs); + Reference.reachabilityFence(this); + Reference.reachabilityFence(relative_expiry_secs); + if (this != null) { this.ptrs_to.add(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + } + + /** + * Adds a P2WSH address to [`Bolt12Invoice::fallbacks`]. + * + * Successive calls to this method will add another address. Caller is responsible for not + * adding duplicate addresses and only calling if capable of receiving to P2WSH addresses. + */ + public void fallback_v0_p2wsh(byte[] script_hash) { + bindings.InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh(this.ptr, InternalUtils.check_arr_len(script_hash, 32)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(script_hash); + if (this != null) { this.ptrs_to.add(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + } + + /** + * Adds a P2WPKH address to [`Bolt12Invoice::fallbacks`]. + * + * Successive calls to this method will add another address. Caller is responsible for not + * adding duplicate addresses and only calling if capable of receiving to P2WPKH addresses. + */ + public void fallback_v0_p2wpkh(byte[] pubkey_hash) { + bindings.InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh(this.ptr, InternalUtils.check_arr_len(pubkey_hash, 20)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(pubkey_hash); + if (this != null) { this.ptrs_to.add(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + } + + /** + * Adds a P2TR address to [`Bolt12Invoice::fallbacks`]. + * + * Successive calls to this method will add another address. Caller is responsible for not + * adding duplicate addresses and only calling if capable of receiving to P2TR addresses. + */ + public void fallback_v1_p2tr_tweaked(byte[] utput_key) { + bindings.InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(this.ptr, InternalUtils.check_arr_len(utput_key, 32)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(utput_key); + if (this != null) { this.ptrs_to.add(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + } + + /** + * Sets [`Bolt12Invoice::invoice_features`] to indicate MPP may be used. Otherwise, MPP is + * disallowed. + */ + public void allow_mpp() { + bindings.InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp(this.ptr); + Reference.reachabilityFence(this); + if (this != null) { this.ptrs_to.add(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + } + +} diff --git a/src/main/java/org/ldk/structs/InvoiceWithExplicitSigningPubkeyBuilder.java b/src/main/java/org/ldk/structs/InvoiceWithExplicitSigningPubkeyBuilder.java new file mode 100644 index 00000000..5843ee22 --- /dev/null +++ b/src/main/java/org/ldk/structs/InvoiceWithExplicitSigningPubkeyBuilder.java @@ -0,0 +1,155 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + + +/** + * Builds a [`Bolt12Invoice`] from either: + * - an [`InvoiceRequest`] for the \"offer to be paid\" flow or + * - a [`Refund`] for the \"offer for money\" flow. + * + * See [module-level documentation] for usage. + * + * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest + * [`Refund`]: crate::offers::refund::Refund + * [module-level documentation]: self + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class InvoiceWithExplicitSigningPubkeyBuilder extends CommonBase { + InvoiceWithExplicitSigningPubkeyBuilder(Object _dummy, long ptr) { super(ptr); } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + if (ptr != 0) { bindings.InvoiceWithExplicitSigningPubkeyBuilder_free(ptr); } + } + + /** + * Builds an unsigned [`Bolt12Invoice`] after checking for valid semantics. It can be signed by + * [`UnsignedBolt12Invoice::sign`]. + */ + public Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ build() { + long ret = bindings.InvoiceWithExplicitSigningPubkeyBuilder_build(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.add(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + return ret_hu_conv; + } + + /** + * Sets the [`Bolt12Invoice::relative_expiry`] as seconds since [`Bolt12Invoice::created_at`]. + * Any expiry that has already passed is valid and can be checked for using + * [`Bolt12Invoice::is_expired`]. + * + * Successive calls to this method will override the previous setting. + */ + public void relative_expiry(int relative_expiry_secs) { + bindings.InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry(this.ptr, relative_expiry_secs); + Reference.reachabilityFence(this); + Reference.reachabilityFence(relative_expiry_secs); + if (this != null) { this.ptrs_to.add(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + } + + /** + * Adds a P2WSH address to [`Bolt12Invoice::fallbacks`]. + * + * Successive calls to this method will add another address. Caller is responsible for not + * adding duplicate addresses and only calling if capable of receiving to P2WSH addresses. + */ + public void fallback_v0_p2wsh(byte[] script_hash) { + bindings.InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh(this.ptr, InternalUtils.check_arr_len(script_hash, 32)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(script_hash); + if (this != null) { this.ptrs_to.add(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + } + + /** + * Adds a P2WPKH address to [`Bolt12Invoice::fallbacks`]. + * + * Successive calls to this method will add another address. Caller is responsible for not + * adding duplicate addresses and only calling if capable of receiving to P2WPKH addresses. + */ + public void fallback_v0_p2wpkh(byte[] pubkey_hash) { + bindings.InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh(this.ptr, InternalUtils.check_arr_len(pubkey_hash, 20)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(pubkey_hash); + if (this != null) { this.ptrs_to.add(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + } + + /** + * Adds a P2TR address to [`Bolt12Invoice::fallbacks`]. + * + * Successive calls to this method will add another address. Caller is responsible for not + * adding duplicate addresses and only calling if capable of receiving to P2TR addresses. + */ + public void fallback_v1_p2tr_tweaked(byte[] utput_key) { + bindings.InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(this.ptr, InternalUtils.check_arr_len(utput_key, 32)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(utput_key); + if (this != null) { this.ptrs_to.add(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + } + + /** + * Sets [`Bolt12Invoice::invoice_features`] to indicate MPP may be used. Otherwise, MPP is + * disallowed. + */ + public void allow_mpp() { + bindings.InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp(this.ptr); + Reference.reachabilityFence(this); + if (this != null) { this.ptrs_to.add(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + } + +} diff --git a/src/main/java/org/ldk/structs/KVStore.java b/src/main/java/org/ldk/structs/KVStore.java index ed39c4d6..9864b42b 100644 --- a/src/main/java/org/ldk/structs/KVStore.java +++ b/src/main/java/org/ldk/structs/KVStore.java @@ -108,25 +108,25 @@ public class KVStore extends CommonBase { @Override public long read(String primary_namespace, String secondary_namespace, String key) { Result_CVec_u8ZIOErrorZ ret = arg.read(primary_namespace, secondary_namespace, key); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long write(String primary_namespace, String secondary_namespace, String key, byte[] buf) { Result_NoneIOErrorZ ret = arg.write(primary_namespace, secondary_namespace, key, buf); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long remove(String primary_namespace, String secondary_namespace, String key, boolean lazy) { Result_NoneIOErrorZ ret = arg.remove(primary_namespace, secondary_namespace, key, lazy); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long list(String primary_namespace, String secondary_namespace) { Result_CVec_StrZIOErrorZ ret = arg.list(primary_namespace, secondary_namespace); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } }); diff --git a/src/main/java/org/ldk/structs/KeysManager.java b/src/main/java/org/ldk/structs/KeysManager.java index 02fcf711..4aa05cae 100644 --- a/src/main/java/org/ldk/structs/KeysManager.java +++ b/src/main/java/org/ldk/structs/KeysManager.java @@ -106,40 +106,6 @@ public class KeysManager extends CommonBase { return ret_hu_conv; } - /** - * Creates a [`Transaction`] which spends the given descriptors to the given outputs, plus an - * output to the given change destination (if sufficient change value remains). The - * transaction will have a feerate, at least, of the given value. - * - * The `locktime` argument is used to set the transaction's locktime. If `None`, the - * transaction will have a locktime of 0. It it recommended to set this to the current block - * height to avoid fee sniping, unless you have some specific reason to use a different - * locktime. - * - * Returns `Err(())` if the output value is greater than the input value minus required fee, - * if a descriptor was duplicated, or if an output descriptor `script_pubkey` - * does not match the one we can spend. - * - * We do not enforce that outputs meet the dust limit or that any output scripts are standard. - * - * May panic if the [`SpendableOutputDescriptor`]s were not generated by channels which used - * this [`KeysManager`] or one of the [`InMemorySigner`] created by this [`KeysManager`]. - */ - public Result_TransactionNoneZ spend_spendable_outputs(SpendableOutputDescriptor[] descriptors, TxOut[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, org.ldk.structs.Option_u32Z locktime) { - long ret = bindings.KeysManager_spend_spendable_outputs(this.ptr, descriptors != null ? Arrays.stream(descriptors).mapToLong(descriptors_conv_27 -> descriptors_conv_27.ptr).toArray() : null, outputs != null ? Arrays.stream(outputs).mapToLong(outputs_conv_7 -> outputs_conv_7.ptr).toArray() : null, change_destination_script, feerate_sat_per_1000_weight, locktime.ptr); - Reference.reachabilityFence(this); - Reference.reachabilityFence(descriptors); - Reference.reachabilityFence(outputs); - Reference.reachabilityFence(change_destination_script); - Reference.reachabilityFence(feerate_sat_per_1000_weight); - Reference.reachabilityFence(locktime); - if (ret >= 0 && ret <= 4096) { return null; } - Result_TransactionNoneZ ret_hu_conv = Result_TransactionNoneZ.constr_from_ptr(ret); - for (SpendableOutputDescriptor descriptors_conv_27: descriptors) { if (this != null) { this.ptrs_to.add(descriptors_conv_27); }; }; - if (this != null) { this.ptrs_to.add(locktime); }; - return ret_hu_conv; - } - /** * Constructs a new EntropySource which calls the relevant methods on this_arg. * This copies the `inner` pointer in this_arg and thus the returned EntropySource must be freed before this_arg is @@ -166,6 +132,19 @@ public class KeysManager extends CommonBase { return ret_hu_conv; } + /** + * Constructs a new OutputSpender which calls the relevant methods on this_arg. + * This copies the `inner` pointer in this_arg and thus the returned OutputSpender must be freed before this_arg is + */ + public OutputSpender as_OutputSpender() { + long ret = bindings.KeysManager_as_OutputSpender(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + OutputSpender ret_hu_conv = new OutputSpender(null, ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + /** * Constructs a new SignerProvider which calls the relevant methods on this_arg. * This copies the `inner` pointer in this_arg and thus the returned SignerProvider must be freed before this_arg is diff --git a/src/main/java/org/ldk/structs/Listen.java b/src/main/java/org/ldk/structs/Listen.java index 80794622..ada394d9 100644 --- a/src/main/java/org/ldk/structs/Listen.java +++ b/src/main/java/org/ldk/structs/Listen.java @@ -93,7 +93,7 @@ public class Listen extends CommonBase { * possibly filtered. */ public void filtered_block_connected(byte[] header, TwoTuple_usizeTransactionZ[] txdata, int height) { - bindings.Listen_filtered_block_connected(this.ptr, InternalUtils.check_arr_len(header, 80), txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_28 -> txdata_conv_28 != null ? txdata_conv_28.ptr : 0).toArray() : null, height); + bindings.Listen_filtered_block_connected(this.ptr, InternalUtils.check_arr_len(header, 80), txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_28 -> txdata_conv_28.ptr).toArray() : null, height); Reference.reachabilityFence(this); Reference.reachabilityFence(header); Reference.reachabilityFence(txdata); diff --git a/src/main/java/org/ldk/structs/MaxDustHTLCExposure.java b/src/main/java/org/ldk/structs/MaxDustHTLCExposure.java index 15837fd3..2bd6f0c1 100644 --- a/src/main/java/org/ldk/structs/MaxDustHTLCExposure.java +++ b/src/main/java/org/ldk/structs/MaxDustHTLCExposure.java @@ -9,7 +9,7 @@ import javax.annotation.Nullable; /** - * Options for how to set the max dust HTLC exposure allowed on a channel. See + * Options for how to set the max dust exposure allowed on a channel. See * [`ChannelConfig::max_dust_htlc_exposure`] for details. */ @SuppressWarnings("unchecked") // We correctly assign various generic arrays @@ -50,19 +50,17 @@ public class MaxDustHTLCExposure extends CommonBase { } } /** - * This sets a multiplier on the estimated high priority feerate (sats/KW, as obtained from - * [`FeeEstimator`]) to determine the maximum allowed dust exposure. If this variant is used - * then the maximum dust exposure in millisatoshis is calculated as: - * `high_priority_feerate_per_kw * value`. For example, with our default value - * `FeeRateMultiplier(5000)`: + * This sets a multiplier on the [`ConfirmationTarget::OnChainSweep`] feerate (in sats/KW) to + * determine the maximum allowed dust exposure. If this variant is used then the maximum dust + * exposure in millisatoshis is calculated as: + * `feerate_per_kw * value`. For example, with our default value + * `FeeRateMultiplier(10_000)`: * * - For the minimum fee rate of 1 sat/vByte (250 sat/KW, although the minimum * defaults to 253 sats/KW for rounding, see [`FeeEstimator`]), the max dust exposure would - * be 253 * 5000 = 1,265,000 msats. + * be 253 * 10_000 = 2,530,000 msats. * - For a fee rate of 30 sat/vByte (7500 sat/KW), the max dust exposure would be - * 7500 * 5000 = 37,500,000 msats. - * - * This allows the maximum dust exposure to automatically scale with fee rate changes. + * 7500 * 50_000 = 75,000,000 msats (0.00075 BTC). * * Note, if you're using a third-party fee estimator, this may leave you more exposed to a * fee griefing attack, where your fee estimator may purposely overestimate the fee rate, @@ -77,6 +75,7 @@ public class MaxDustHTLCExposure extends CommonBase { * by default this will be set to a [`Self::FixedLimitMsat`] of 5,000,000 msat. * * [`FeeEstimator`]: crate::chain::chaininterface::FeeEstimator + * [`ConfirmationTarget::OnChainSweep`]: crate::chain::chaininterface::ConfirmationTarget::OnChainSweep */ public final static class FeeRateMultiplier extends MaxDustHTLCExposure { public final long fee_rate_multiplier; @@ -132,7 +131,7 @@ public class MaxDustHTLCExposure extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public boolean eq(org.ldk.structs.MaxDustHTLCExposure b) { - boolean ret = bindings.MaxDustHTLCExposure_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.MaxDustHTLCExposure_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); return ret; diff --git a/src/main/java/org/ldk/structs/MessageRouter.java b/src/main/java/org/ldk/structs/MessageRouter.java index a00d5e0a..04c36d21 100644 --- a/src/main/java/org/ldk/structs/MessageRouter.java +++ b/src/main/java/org/ldk/structs/MessageRouter.java @@ -56,13 +56,13 @@ public class MessageRouter extends CommonBase { if (destination_hu_conv != null) { destination_hu_conv.ptrs_to.add(this); }; Result_OnionMessagePathNoneZ ret = arg.find_path(sender, peers, destination_hu_conv); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long create_blinded_paths(byte[] recipient, byte[][] peers) { Result_CVec_BlindedPathZNoneZ ret = arg.create_blinded_paths(recipient, peers); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } }); diff --git a/src/main/java/org/ldk/structs/MessageSendEvent.java b/src/main/java/org/ldk/structs/MessageSendEvent.java index 595ad52f..61d968b9 100644 --- a/src/main/java/org/ldk/structs/MessageSendEvent.java +++ b/src/main/java/org/ldk/structs/MessageSendEvent.java @@ -935,7 +935,7 @@ public class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendAcceptChannel-variant MessageSendEvent */ public static MessageSendEvent send_accept_channel(byte[] node_id, org.ldk.structs.AcceptChannel msg) { - long ret = bindings.MessageSendEvent_send_accept_channel(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_accept_channel(InternalUtils.check_arr_len(node_id, 33), msg.ptr); Reference.reachabilityFence(node_id); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -949,7 +949,7 @@ public class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendAcceptChannelV2-variant MessageSendEvent */ public static MessageSendEvent send_accept_channel_v2(byte[] node_id, org.ldk.structs.AcceptChannelV2 msg) { - long ret = bindings.MessageSendEvent_send_accept_channel_v2(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_accept_channel_v2(InternalUtils.check_arr_len(node_id, 33), msg.ptr); Reference.reachabilityFence(node_id); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -963,7 +963,7 @@ public class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendOpenChannel-variant MessageSendEvent */ public static MessageSendEvent send_open_channel(byte[] node_id, org.ldk.structs.OpenChannel msg) { - long ret = bindings.MessageSendEvent_send_open_channel(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_open_channel(InternalUtils.check_arr_len(node_id, 33), msg.ptr); Reference.reachabilityFence(node_id); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -977,7 +977,7 @@ public class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendOpenChannelV2-variant MessageSendEvent */ public static MessageSendEvent send_open_channel_v2(byte[] node_id, org.ldk.structs.OpenChannelV2 msg) { - long ret = bindings.MessageSendEvent_send_open_channel_v2(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_open_channel_v2(InternalUtils.check_arr_len(node_id, 33), msg.ptr); Reference.reachabilityFence(node_id); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -991,7 +991,7 @@ public class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendFundingCreated-variant MessageSendEvent */ public static MessageSendEvent send_funding_created(byte[] node_id, org.ldk.structs.FundingCreated msg) { - long ret = bindings.MessageSendEvent_send_funding_created(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_funding_created(InternalUtils.check_arr_len(node_id, 33), msg.ptr); Reference.reachabilityFence(node_id); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1005,7 +1005,7 @@ public class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendFundingSigned-variant MessageSendEvent */ public static MessageSendEvent send_funding_signed(byte[] node_id, org.ldk.structs.FundingSigned msg) { - long ret = bindings.MessageSendEvent_send_funding_signed(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_funding_signed(InternalUtils.check_arr_len(node_id, 33), msg.ptr); Reference.reachabilityFence(node_id); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1019,7 +1019,7 @@ public class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendStfu-variant MessageSendEvent */ public static MessageSendEvent send_stfu(byte[] node_id, org.ldk.structs.Stfu msg) { - long ret = bindings.MessageSendEvent_send_stfu(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_stfu(InternalUtils.check_arr_len(node_id, 33), msg.ptr); Reference.reachabilityFence(node_id); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1033,7 +1033,7 @@ public class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendSplice-variant MessageSendEvent */ public static MessageSendEvent send_splice(byte[] node_id, org.ldk.structs.Splice msg) { - long ret = bindings.MessageSendEvent_send_splice(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_splice(InternalUtils.check_arr_len(node_id, 33), msg.ptr); Reference.reachabilityFence(node_id); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1047,7 +1047,7 @@ public class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendSpliceAck-variant MessageSendEvent */ public static MessageSendEvent send_splice_ack(byte[] node_id, org.ldk.structs.SpliceAck msg) { - long ret = bindings.MessageSendEvent_send_splice_ack(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_splice_ack(InternalUtils.check_arr_len(node_id, 33), msg.ptr); Reference.reachabilityFence(node_id); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1061,7 +1061,7 @@ public class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendSpliceLocked-variant MessageSendEvent */ public static MessageSendEvent send_splice_locked(byte[] node_id, org.ldk.structs.SpliceLocked msg) { - long ret = bindings.MessageSendEvent_send_splice_locked(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_splice_locked(InternalUtils.check_arr_len(node_id, 33), msg.ptr); Reference.reachabilityFence(node_id); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1075,7 +1075,7 @@ public class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendTxAddInput-variant MessageSendEvent */ public static MessageSendEvent send_tx_add_input(byte[] node_id, org.ldk.structs.TxAddInput msg) { - long ret = bindings.MessageSendEvent_send_tx_add_input(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_tx_add_input(InternalUtils.check_arr_len(node_id, 33), msg.ptr); Reference.reachabilityFence(node_id); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1089,7 +1089,7 @@ public class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendTxAddOutput-variant MessageSendEvent */ public static MessageSendEvent send_tx_add_output(byte[] node_id, org.ldk.structs.TxAddOutput msg) { - long ret = bindings.MessageSendEvent_send_tx_add_output(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_tx_add_output(InternalUtils.check_arr_len(node_id, 33), msg.ptr); Reference.reachabilityFence(node_id); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1103,7 +1103,7 @@ public class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendTxRemoveInput-variant MessageSendEvent */ public static MessageSendEvent send_tx_remove_input(byte[] node_id, org.ldk.structs.TxRemoveInput msg) { - long ret = bindings.MessageSendEvent_send_tx_remove_input(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_tx_remove_input(InternalUtils.check_arr_len(node_id, 33), msg.ptr); Reference.reachabilityFence(node_id); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1117,7 +1117,7 @@ public class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendTxRemoveOutput-variant MessageSendEvent */ public static MessageSendEvent send_tx_remove_output(byte[] node_id, org.ldk.structs.TxRemoveOutput msg) { - long ret = bindings.MessageSendEvent_send_tx_remove_output(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_tx_remove_output(InternalUtils.check_arr_len(node_id, 33), msg.ptr); Reference.reachabilityFence(node_id); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1131,7 +1131,7 @@ public class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendTxComplete-variant MessageSendEvent */ public static MessageSendEvent send_tx_complete(byte[] node_id, org.ldk.structs.TxComplete msg) { - long ret = bindings.MessageSendEvent_send_tx_complete(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_tx_complete(InternalUtils.check_arr_len(node_id, 33), msg.ptr); Reference.reachabilityFence(node_id); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1145,7 +1145,7 @@ public class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendTxSignatures-variant MessageSendEvent */ public static MessageSendEvent send_tx_signatures(byte[] node_id, org.ldk.structs.TxSignatures msg) { - long ret = bindings.MessageSendEvent_send_tx_signatures(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_tx_signatures(InternalUtils.check_arr_len(node_id, 33), msg.ptr); Reference.reachabilityFence(node_id); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1159,7 +1159,7 @@ public class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendTxInitRbf-variant MessageSendEvent */ public static MessageSendEvent send_tx_init_rbf(byte[] node_id, org.ldk.structs.TxInitRbf msg) { - long ret = bindings.MessageSendEvent_send_tx_init_rbf(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_tx_init_rbf(InternalUtils.check_arr_len(node_id, 33), msg.ptr); Reference.reachabilityFence(node_id); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1173,7 +1173,7 @@ public class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendTxAckRbf-variant MessageSendEvent */ public static MessageSendEvent send_tx_ack_rbf(byte[] node_id, org.ldk.structs.TxAckRbf msg) { - long ret = bindings.MessageSendEvent_send_tx_ack_rbf(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_tx_ack_rbf(InternalUtils.check_arr_len(node_id, 33), msg.ptr); Reference.reachabilityFence(node_id); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1187,7 +1187,7 @@ public class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendTxAbort-variant MessageSendEvent */ public static MessageSendEvent send_tx_abort(byte[] node_id, org.ldk.structs.TxAbort msg) { - long ret = bindings.MessageSendEvent_send_tx_abort(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_tx_abort(InternalUtils.check_arr_len(node_id, 33), msg.ptr); Reference.reachabilityFence(node_id); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1201,7 +1201,7 @@ public class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendChannelReady-variant MessageSendEvent */ public static MessageSendEvent send_channel_ready(byte[] node_id, org.ldk.structs.ChannelReady msg) { - long ret = bindings.MessageSendEvent_send_channel_ready(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_channel_ready(InternalUtils.check_arr_len(node_id, 33), msg.ptr); Reference.reachabilityFence(node_id); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1215,7 +1215,7 @@ public class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendAnnouncementSignatures-variant MessageSendEvent */ public static MessageSendEvent send_announcement_signatures(byte[] node_id, org.ldk.structs.AnnouncementSignatures msg) { - long ret = bindings.MessageSendEvent_send_announcement_signatures(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_announcement_signatures(InternalUtils.check_arr_len(node_id, 33), msg.ptr); Reference.reachabilityFence(node_id); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1229,7 +1229,7 @@ public class MessageSendEvent extends CommonBase { * Utility method to constructs a new UpdateHTLCs-variant MessageSendEvent */ public static MessageSendEvent update_htlcs(byte[] node_id, org.ldk.structs.CommitmentUpdate updates) { - long ret = bindings.MessageSendEvent_update_htlcs(InternalUtils.check_arr_len(node_id, 33), updates == null ? 0 : updates.ptr); + long ret = bindings.MessageSendEvent_update_htlcs(InternalUtils.check_arr_len(node_id, 33), updates.ptr); Reference.reachabilityFence(node_id); Reference.reachabilityFence(updates); if (ret >= 0 && ret <= 4096) { return null; } @@ -1243,7 +1243,7 @@ public class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendRevokeAndACK-variant MessageSendEvent */ public static MessageSendEvent send_revoke_and_ack(byte[] node_id, org.ldk.structs.RevokeAndACK msg) { - long ret = bindings.MessageSendEvent_send_revoke_and_ack(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_revoke_and_ack(InternalUtils.check_arr_len(node_id, 33), msg.ptr); Reference.reachabilityFence(node_id); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1257,7 +1257,7 @@ public class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendClosingSigned-variant MessageSendEvent */ public static MessageSendEvent send_closing_signed(byte[] node_id, org.ldk.structs.ClosingSigned msg) { - long ret = bindings.MessageSendEvent_send_closing_signed(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_closing_signed(InternalUtils.check_arr_len(node_id, 33), msg.ptr); Reference.reachabilityFence(node_id); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1271,7 +1271,7 @@ public class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendShutdown-variant MessageSendEvent */ public static MessageSendEvent send_shutdown(byte[] node_id, org.ldk.structs.Shutdown msg) { - long ret = bindings.MessageSendEvent_send_shutdown(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_shutdown(InternalUtils.check_arr_len(node_id, 33), msg.ptr); Reference.reachabilityFence(node_id); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1285,7 +1285,7 @@ public class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendChannelReestablish-variant MessageSendEvent */ public static MessageSendEvent send_channel_reestablish(byte[] node_id, org.ldk.structs.ChannelReestablish msg) { - long ret = bindings.MessageSendEvent_send_channel_reestablish(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_channel_reestablish(InternalUtils.check_arr_len(node_id, 33), msg.ptr); Reference.reachabilityFence(node_id); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1299,7 +1299,7 @@ public class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendChannelAnnouncement-variant MessageSendEvent */ public static MessageSendEvent send_channel_announcement(byte[] node_id, org.ldk.structs.ChannelAnnouncement msg, org.ldk.structs.ChannelUpdate update_msg) { - long ret = bindings.MessageSendEvent_send_channel_announcement(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr, update_msg == null ? 0 : update_msg.ptr); + long ret = bindings.MessageSendEvent_send_channel_announcement(InternalUtils.check_arr_len(node_id, 33), msg.ptr, update_msg.ptr); Reference.reachabilityFence(node_id); Reference.reachabilityFence(msg); Reference.reachabilityFence(update_msg); @@ -1315,7 +1315,7 @@ public class MessageSendEvent extends CommonBase { * Utility method to constructs a new BroadcastChannelAnnouncement-variant MessageSendEvent */ public static MessageSendEvent broadcast_channel_announcement(org.ldk.structs.ChannelAnnouncement msg, org.ldk.structs.ChannelUpdate update_msg) { - long ret = bindings.MessageSendEvent_broadcast_channel_announcement(msg == null ? 0 : msg.ptr, update_msg == null ? 0 : update_msg.ptr); + long ret = bindings.MessageSendEvent_broadcast_channel_announcement(msg.ptr, update_msg.ptr); Reference.reachabilityFence(msg); Reference.reachabilityFence(update_msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1330,7 +1330,7 @@ public class MessageSendEvent extends CommonBase { * Utility method to constructs a new BroadcastChannelUpdate-variant MessageSendEvent */ public static MessageSendEvent broadcast_channel_update(org.ldk.structs.ChannelUpdate msg) { - long ret = bindings.MessageSendEvent_broadcast_channel_update(msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_broadcast_channel_update(msg.ptr); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); @@ -1343,7 +1343,7 @@ public class MessageSendEvent extends CommonBase { * Utility method to constructs a new BroadcastNodeAnnouncement-variant MessageSendEvent */ public static MessageSendEvent broadcast_node_announcement(org.ldk.structs.NodeAnnouncement msg) { - long ret = bindings.MessageSendEvent_broadcast_node_announcement(msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_broadcast_node_announcement(msg.ptr); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); @@ -1356,7 +1356,7 @@ public class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendChannelUpdate-variant MessageSendEvent */ public static MessageSendEvent send_channel_update(byte[] node_id, org.ldk.structs.ChannelUpdate msg) { - long ret = bindings.MessageSendEvent_send_channel_update(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_channel_update(InternalUtils.check_arr_len(node_id, 33), msg.ptr); Reference.reachabilityFence(node_id); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1384,7 +1384,7 @@ public class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendChannelRangeQuery-variant MessageSendEvent */ public static MessageSendEvent send_channel_range_query(byte[] node_id, org.ldk.structs.QueryChannelRange msg) { - long ret = bindings.MessageSendEvent_send_channel_range_query(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_channel_range_query(InternalUtils.check_arr_len(node_id, 33), msg.ptr); Reference.reachabilityFence(node_id); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1398,7 +1398,7 @@ public class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendShortIdsQuery-variant MessageSendEvent */ public static MessageSendEvent send_short_ids_query(byte[] node_id, org.ldk.structs.QueryShortChannelIds msg) { - long ret = bindings.MessageSendEvent_send_short_ids_query(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_short_ids_query(InternalUtils.check_arr_len(node_id, 33), msg.ptr); Reference.reachabilityFence(node_id); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1412,7 +1412,7 @@ public class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendReplyChannelRange-variant MessageSendEvent */ public static MessageSendEvent send_reply_channel_range(byte[] node_id, org.ldk.structs.ReplyChannelRange msg) { - long ret = bindings.MessageSendEvent_send_reply_channel_range(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_reply_channel_range(InternalUtils.check_arr_len(node_id, 33), msg.ptr); Reference.reachabilityFence(node_id); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1426,7 +1426,7 @@ public class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendGossipTimestampFilter-variant MessageSendEvent */ public static MessageSendEvent send_gossip_timestamp_filter(byte[] node_id, org.ldk.structs.GossipTimestampFilter msg) { - long ret = bindings.MessageSendEvent_send_gossip_timestamp_filter(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_gossip_timestamp_filter(InternalUtils.check_arr_len(node_id, 33), msg.ptr); Reference.reachabilityFence(node_id); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/src/main/java/org/ldk/structs/MessageSendEventsProvider.java b/src/main/java/org/ldk/structs/MessageSendEventsProvider.java index 85194aea..05e7e154 100644 --- a/src/main/java/org/ldk/structs/MessageSendEventsProvider.java +++ b/src/main/java/org/ldk/structs/MessageSendEventsProvider.java @@ -50,7 +50,7 @@ public class MessageSendEventsProvider extends CommonBase { @Override public long[] get_and_clear_pending_msg_events() { MessageSendEvent[] ret = arg.get_and_clear_pending_msg_events(); Reference.reachabilityFence(arg); - long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_18 -> ret_conv_18 == null ? 0 : ret_conv_18.clone_ptr()).toArray() : null; + long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_18 -> ret_conv_18.clone_ptr()).toArray() : null; for (MessageSendEvent ret_conv_18: ret) { if (impl_holder.held != null) { impl_holder.held.ptrs_to.add(ret_conv_18); }; }; return result; } diff --git a/src/main/java/org/ldk/structs/MinFinalCltvExpiryDelta.java b/src/main/java/org/ldk/structs/MinFinalCltvExpiryDelta.java index c67801dc..67cdf11e 100644 --- a/src/main/java/org/ldk/structs/MinFinalCltvExpiryDelta.java +++ b/src/main/java/org/ldk/structs/MinFinalCltvExpiryDelta.java @@ -80,7 +80,7 @@ public class MinFinalCltvExpiryDelta extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.MinFinalCltvExpiryDelta b) { - boolean ret = bindings.MinFinalCltvExpiryDelta_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.MinFinalCltvExpiryDelta_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/MonitorEvent.java b/src/main/java/org/ldk/structs/MonitorEvent.java index 7f8ae11f..5908a1de 100644 --- a/src/main/java/org/ldk/structs/MonitorEvent.java +++ b/src/main/java/org/ldk/structs/MonitorEvent.java @@ -24,6 +24,9 @@ public class MonitorEvent extends CommonBase { if (raw_val.getClass() == bindings.LDKMonitorEvent.HTLCEvent.class) { return new HTLCEvent(ptr, (bindings.LDKMonitorEvent.HTLCEvent)raw_val); } + if (raw_val.getClass() == bindings.LDKMonitorEvent.HolderForceClosedWithInfo.class) { + return new HolderForceClosedWithInfo(ptr, (bindings.LDKMonitorEvent.HolderForceClosedWithInfo)raw_val); + } if (raw_val.getClass() == bindings.LDKMonitorEvent.HolderForceClosed.class) { return new HolderForceClosed(ptr, (bindings.LDKMonitorEvent.HolderForceClosed)raw_val); } @@ -46,6 +49,39 @@ public class MonitorEvent extends CommonBase { this.htlc_event = htlc_event_hu_conv; } } + /** + * Indicates we broadcasted the channel's latest commitment transaction and thus closed the + * channel. Holds information about the channel and why it was closed. + */ + public final static class HolderForceClosedWithInfo extends MonitorEvent { + /** + * The reason the channel was closed. + */ + public final org.ldk.structs.ClosureReason reason; + /** + * The funding outpoint of the channel. + */ + public final org.ldk.structs.OutPoint outpoint; + /** + * The channel ID of the channel. + */ + public final org.ldk.structs.ChannelId channel_id; + private HolderForceClosedWithInfo(long ptr, bindings.LDKMonitorEvent.HolderForceClosedWithInfo obj) { + super(null, ptr); + long reason = obj.reason; + org.ldk.structs.ClosureReason reason_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(reason); + if (reason_hu_conv != null) { reason_hu_conv.ptrs_to.add(this); }; + this.reason = reason_hu_conv; + long outpoint = obj.outpoint; + org.ldk.structs.OutPoint outpoint_hu_conv = null; if (outpoint < 0 || outpoint > 4096) { outpoint_hu_conv = new org.ldk.structs.OutPoint(null, outpoint); } + if (outpoint_hu_conv != null) { outpoint_hu_conv.ptrs_to.add(this); }; + this.outpoint = outpoint_hu_conv; + long channel_id = obj.channel_id; + org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); } + if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); }; + this.channel_id = channel_id_hu_conv; + } + } /** * Indicates we broadcasted the channel's latest commitment transaction and thus closed the * channel. @@ -71,6 +107,10 @@ public class MonitorEvent extends CommonBase { * The funding outpoint of the [`ChannelMonitor`] that was updated */ public final org.ldk.structs.OutPoint funding_txo; + /** + * The channel ID of the channel associated with the [`ChannelMonitor`] + */ + public final org.ldk.structs.ChannelId channel_id; /** * The Update ID from [`ChannelMonitorUpdate::update_id`] which was applied or * [`ChannelMonitor::get_latest_update_id`]. @@ -85,6 +125,10 @@ public class MonitorEvent extends CommonBase { org.ldk.structs.OutPoint funding_txo_hu_conv = null; if (funding_txo < 0 || funding_txo > 4096) { funding_txo_hu_conv = new org.ldk.structs.OutPoint(null, funding_txo); } if (funding_txo_hu_conv != null) { funding_txo_hu_conv.ptrs_to.add(this); }; this.funding_txo = funding_txo_hu_conv; + long channel_id = obj.channel_id; + org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); } + if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); }; + this.channel_id = channel_id_hu_conv; this.monitor_update_id = obj.monitor_update_id; } } @@ -110,7 +154,7 @@ public class MonitorEvent extends CommonBase { * Utility method to constructs a new HTLCEvent-variant MonitorEvent */ public static MonitorEvent htlcevent(org.ldk.structs.HTLCUpdate a) { - long ret = bindings.MonitorEvent_htlcevent(a == null ? 0 : a.ptr); + long ret = bindings.MonitorEvent_htlcevent(a.ptr); Reference.reachabilityFence(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MonitorEvent ret_hu_conv = org.ldk.structs.MonitorEvent.constr_from_ptr(ret); @@ -119,11 +163,28 @@ public class MonitorEvent extends CommonBase { return ret_hu_conv; } + /** + * Utility method to constructs a new HolderForceClosedWithInfo-variant MonitorEvent + */ + public static MonitorEvent holder_force_closed_with_info(org.ldk.structs.ClosureReason reason, org.ldk.structs.OutPoint outpoint, org.ldk.structs.ChannelId channel_id) { + long ret = bindings.MonitorEvent_holder_force_closed_with_info(reason.ptr, outpoint.ptr, channel_id.ptr); + Reference.reachabilityFence(reason); + Reference.reachabilityFence(outpoint); + Reference.reachabilityFence(channel_id); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.MonitorEvent ret_hu_conv = org.ldk.structs.MonitorEvent.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(reason); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(outpoint); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id); }; + return ret_hu_conv; + } + /** * Utility method to constructs a new HolderForceClosed-variant MonitorEvent */ public static MonitorEvent holder_force_closed(org.ldk.structs.OutPoint a) { - long ret = bindings.MonitorEvent_holder_force_closed(a == null ? 0 : a.ptr); + long ret = bindings.MonitorEvent_holder_force_closed(a.ptr); Reference.reachabilityFence(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MonitorEvent ret_hu_conv = org.ldk.structs.MonitorEvent.constr_from_ptr(ret); @@ -135,14 +196,16 @@ public class MonitorEvent extends CommonBase { /** * Utility method to constructs a new Completed-variant MonitorEvent */ - public static MonitorEvent completed(org.ldk.structs.OutPoint funding_txo, long monitor_update_id) { - long ret = bindings.MonitorEvent_completed(funding_txo == null ? 0 : funding_txo.ptr, monitor_update_id); + public static MonitorEvent completed(org.ldk.structs.OutPoint funding_txo, org.ldk.structs.ChannelId channel_id, long monitor_update_id) { + long ret = bindings.MonitorEvent_completed(funding_txo.ptr, channel_id.ptr, monitor_update_id); Reference.reachabilityFence(funding_txo); + Reference.reachabilityFence(channel_id); Reference.reachabilityFence(monitor_update_id); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MonitorEvent ret_hu_conv = org.ldk.structs.MonitorEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(funding_txo); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id); }; return ret_hu_conv; } @@ -151,7 +214,7 @@ public class MonitorEvent extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public boolean eq(org.ldk.structs.MonitorEvent b) { - boolean ret = bindings.MonitorEvent_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.MonitorEvent_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); return ret; diff --git a/src/main/java/org/ldk/structs/MonitorUpdateId.java b/src/main/java/org/ldk/structs/MonitorUpdateId.java index eb3e74c9..14c6d5ca 100644 --- a/src/main/java/org/ldk/structs/MonitorUpdateId.java +++ b/src/main/java/org/ldk/structs/MonitorUpdateId.java @@ -56,7 +56,7 @@ public class MonitorUpdateId extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.MonitorUpdateId b) { - boolean ret = bindings.MonitorUpdateId_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.MonitorUpdateId_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/NetworkGraph.java b/src/main/java/org/ldk/structs/NetworkGraph.java index adb402ff..fd665128 100644 --- a/src/main/java/org/ldk/structs/NetworkGraph.java +++ b/src/main/java/org/ldk/structs/NetworkGraph.java @@ -28,7 +28,7 @@ public class NetworkGraph extends CommonBase { * [`Event`]: crate::events::Event */ public void handle_network_update(org.ldk.structs.NetworkUpdate network_update) { - bindings.NetworkGraph_handle_network_update(this.ptr, network_update == null ? 0 : network_update.ptr); + bindings.NetworkGraph_handle_network_update(this.ptr, network_update.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(network_update); } @@ -122,7 +122,7 @@ public class NetworkGraph extends CommonBase { * routing messages from a source using a protocol other than the lightning P2P protocol. */ public Result_NoneLightningErrorZ update_node_from_announcement(org.ldk.structs.NodeAnnouncement msg) { - long ret = bindings.NetworkGraph_update_node_from_announcement(this.ptr, msg == null ? 0 : msg.ptr); + long ret = bindings.NetworkGraph_update_node_from_announcement(this.ptr, msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -138,7 +138,7 @@ public class NetworkGraph extends CommonBase { * peers. */ public Result_NoneLightningErrorZ update_node_from_unsigned_announcement(org.ldk.structs.UnsignedNodeAnnouncement msg) { - long ret = bindings.NetworkGraph_update_node_from_unsigned_announcement(this.ptr, msg == null ? 0 : msg.ptr); + long ret = bindings.NetworkGraph_update_node_from_unsigned_announcement(this.ptr, msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -158,7 +158,7 @@ public class NetworkGraph extends CommonBase { * the corresponding UTXO exists on chain and is correctly-formatted. */ public Result_NoneLightningErrorZ update_channel_from_announcement(org.ldk.structs.ChannelAnnouncement msg, org.ldk.structs.Option_UtxoLookupZ utxo_lookup) { - long ret = bindings.NetworkGraph_update_channel_from_announcement(this.ptr, msg == null ? 0 : msg.ptr, utxo_lookup.ptr); + long ret = bindings.NetworkGraph_update_channel_from_announcement(this.ptr, msg.ptr, utxo_lookup.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(msg); Reference.reachabilityFence(utxo_lookup); @@ -179,7 +179,7 @@ public class NetworkGraph extends CommonBase { * This will skip verification of if the channel is actually on-chain. */ public Result_NoneLightningErrorZ update_channel_from_announcement_no_lookup(org.ldk.structs.ChannelAnnouncement msg) { - long ret = bindings.NetworkGraph_update_channel_from_announcement_no_lookup(this.ptr, msg == null ? 0 : msg.ptr); + long ret = bindings.NetworkGraph_update_channel_from_announcement_no_lookup(this.ptr, msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -197,7 +197,7 @@ public class NetworkGraph extends CommonBase { * the corresponding UTXO exists on chain and is correctly-formatted. */ public Result_NoneLightningErrorZ update_channel_from_unsigned_announcement(org.ldk.structs.UnsignedChannelAnnouncement msg, org.ldk.structs.Option_UtxoLookupZ utxo_lookup) { - long ret = bindings.NetworkGraph_update_channel_from_unsigned_announcement(this.ptr, msg == null ? 0 : msg.ptr, utxo_lookup.ptr); + long ret = bindings.NetworkGraph_update_channel_from_unsigned_announcement(this.ptr, msg.ptr, utxo_lookup.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(msg); Reference.reachabilityFence(utxo_lookup); @@ -217,7 +217,7 @@ public class NetworkGraph extends CommonBase { * All other parameters as used in [`msgs::UnsignedChannelAnnouncement`] fields. */ public Result_NoneLightningErrorZ add_channel_from_partial_announcement(long short_channel_id, long timestamp, org.ldk.structs.ChannelFeatures features, byte[] node_id_1, byte[] node_id_2) { - long ret = bindings.NetworkGraph_add_channel_from_partial_announcement(this.ptr, short_channel_id, timestamp, features == null ? 0 : features.ptr, InternalUtils.check_arr_len(node_id_1, 33), InternalUtils.check_arr_len(node_id_2, 33)); + long ret = bindings.NetworkGraph_add_channel_from_partial_announcement(this.ptr, short_channel_id, timestamp, features.ptr, InternalUtils.check_arr_len(node_id_1, 33), InternalUtils.check_arr_len(node_id_2, 33)); Reference.reachabilityFence(this); Reference.reachabilityFence(short_channel_id); Reference.reachabilityFence(timestamp); @@ -307,7 +307,7 @@ public class NetworkGraph extends CommonBase { * materially in the future will be rejected. */ public Result_NoneLightningErrorZ update_channel(org.ldk.structs.ChannelUpdate msg) { - long ret = bindings.NetworkGraph_update_channel(this.ptr, msg == null ? 0 : msg.ptr); + long ret = bindings.NetworkGraph_update_channel(this.ptr, msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -325,7 +325,7 @@ public class NetworkGraph extends CommonBase { * materially in the future will be rejected. */ public Result_NoneLightningErrorZ update_channel_unsigned(org.ldk.structs.UnsignedChannelUpdate msg) { - long ret = bindings.NetworkGraph_update_channel_unsigned(this.ptr, msg == null ? 0 : msg.ptr); + long ret = bindings.NetworkGraph_update_channel_unsigned(this.ptr, msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -343,7 +343,7 @@ public class NetworkGraph extends CommonBase { * materially in the future will be rejected. */ public Result_NoneLightningErrorZ verify_channel_update(org.ldk.structs.ChannelUpdate msg) { - long ret = bindings.NetworkGraph_verify_channel_update(this.ptr, msg == null ? 0 : msg.ptr); + long ret = bindings.NetworkGraph_verify_channel_update(this.ptr, msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/src/main/java/org/ldk/structs/NetworkUpdate.java b/src/main/java/org/ldk/structs/NetworkUpdate.java index d03c58f0..e1d1be45 100644 --- a/src/main/java/org/ldk/structs/NetworkUpdate.java +++ b/src/main/java/org/ldk/structs/NetworkUpdate.java @@ -115,7 +115,7 @@ public class NetworkUpdate extends CommonBase { * Utility method to constructs a new ChannelUpdateMessage-variant NetworkUpdate */ public static NetworkUpdate channel_update_message(org.ldk.structs.ChannelUpdate msg) { - long ret = bindings.NetworkUpdate_channel_update_message(msg == null ? 0 : msg.ptr); + long ret = bindings.NetworkUpdate_channel_update_message(msg.ptr); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.NetworkUpdate ret_hu_conv = org.ldk.structs.NetworkUpdate.constr_from_ptr(ret); @@ -155,7 +155,7 @@ public class NetworkUpdate extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public boolean eq(org.ldk.structs.NetworkUpdate b) { - boolean ret = bindings.NetworkUpdate_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.NetworkUpdate_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); return ret; diff --git a/src/main/java/org/ldk/structs/NextMessageHop.java b/src/main/java/org/ldk/structs/NextMessageHop.java new file mode 100644 index 00000000..8dd7d3df --- /dev/null +++ b/src/main/java/org/ldk/structs/NextMessageHop.java @@ -0,0 +1,124 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + + +/** + * The next hop to forward an onion message along its path. + * + * Note that payment blinded paths always specify their next hop using an explicit node id. + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class NextMessageHop extends CommonBase { + private NextMessageHop(Object _dummy, long ptr) { super(ptr); } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + if (ptr != 0) { bindings.NextMessageHop_free(ptr); } + } + static NextMessageHop constr_from_ptr(long ptr) { + bindings.LDKNextMessageHop raw_val = bindings.LDKNextMessageHop_ref_from_ptr(ptr); + if (raw_val.getClass() == bindings.LDKNextMessageHop.NodeId.class) { + return new NodeId(ptr, (bindings.LDKNextMessageHop.NodeId)raw_val); + } + if (raw_val.getClass() == bindings.LDKNextMessageHop.ShortChannelId.class) { + return new ShortChannelId(ptr, (bindings.LDKNextMessageHop.ShortChannelId)raw_val); + } + assert false; return null; // Unreachable without extending the (internal) bindings interface + } + + /** + * The node id of the next hop. + */ + public final static class NodeId extends NextMessageHop { + public final byte[] node_id; + private NodeId(long ptr, bindings.LDKNextMessageHop.NodeId obj) { + super(null, ptr); + this.node_id = obj.node_id; + } + } + /** + * The short channel id leading to the next hop. + */ + public final static class ShortChannelId extends NextMessageHop { + public final long short_channel_id; + private ShortChannelId(long ptr, bindings.LDKNextMessageHop.ShortChannelId obj) { + super(null, ptr); + this.short_channel_id = obj.short_channel_id; + } + } + long clone_ptr() { + long ret = bindings.NextMessageHop_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a copy of the NextMessageHop + */ + public NextMessageHop clone() { + long ret = bindings.NextMessageHop_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.NextMessageHop ret_hu_conv = org.ldk.structs.NextMessageHop.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new NodeId-variant NextMessageHop + */ + public static NextMessageHop node_id(byte[] a) { + long ret = bindings.NextMessageHop_node_id(InternalUtils.check_arr_len(a, 33)); + Reference.reachabilityFence(a); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.NextMessageHop ret_hu_conv = org.ldk.structs.NextMessageHop.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new ShortChannelId-variant NextMessageHop + */ + public static NextMessageHop short_channel_id(long a) { + long ret = bindings.NextMessageHop_short_channel_id(a); + Reference.reachabilityFence(a); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.NextMessageHop ret_hu_conv = org.ldk.structs.NextMessageHop.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Generates a non-cryptographic 64-bit hash of the NextMessageHop. + */ + public long hash() { + long ret = bindings.NextMessageHop_hash(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + @Override public int hashCode() { + return (int)this.hash(); + } + /** + * Checks if two NextMessageHops contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + */ + public boolean eq(org.ldk.structs.NextMessageHop b) { + boolean ret = bindings.NextMessageHop_eq(this.ptr, b.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(b); + return ret; + } + + @Override public boolean equals(Object o) { + if (!(o instanceof NextMessageHop)) return false; + return this.eq((NextMessageHop)o); + } +} diff --git a/src/main/java/org/ldk/structs/NodeAlias.java b/src/main/java/org/ldk/structs/NodeAlias.java index 472b597b..73230499 100644 --- a/src/main/java/org/ldk/structs/NodeAlias.java +++ b/src/main/java/org/ldk/structs/NodeAlias.java @@ -83,7 +83,7 @@ public class NodeAlias extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.NodeAlias b) { - boolean ret = bindings.NodeAlias_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.NodeAlias_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/NodeAnnouncement.java b/src/main/java/org/ldk/structs/NodeAnnouncement.java index f665ee65..d4323176 100644 --- a/src/main/java/org/ldk/structs/NodeAnnouncement.java +++ b/src/main/java/org/ldk/structs/NodeAnnouncement.java @@ -56,7 +56,7 @@ public class NodeAnnouncement extends CommonBase { * The actual content of the announcement */ public void set_contents(org.ldk.structs.UnsignedNodeAnnouncement val) { - bindings.NodeAnnouncement_set_contents(this.ptr, val == null ? 0 : val.ptr); + bindings.NodeAnnouncement_set_contents(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -66,7 +66,7 @@ public class NodeAnnouncement extends CommonBase { * Constructs a new NodeAnnouncement given each field */ public static NodeAnnouncement of(byte[] signature_arg, org.ldk.structs.UnsignedNodeAnnouncement contents_arg) { - long ret = bindings.NodeAnnouncement_new(InternalUtils.check_arr_len(signature_arg, 64), contents_arg == null ? 0 : contents_arg.ptr); + long ret = bindings.NodeAnnouncement_new(InternalUtils.check_arr_len(signature_arg, 64), contents_arg.ptr); Reference.reachabilityFence(signature_arg); Reference.reachabilityFence(contents_arg); if (ret >= 0 && ret <= 4096) { return null; } @@ -112,7 +112,7 @@ public class NodeAnnouncement extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.NodeAnnouncement b) { - boolean ret = bindings.NodeAnnouncement_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.NodeAnnouncement_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/NodeAnnouncementInfo.java b/src/main/java/org/ldk/structs/NodeAnnouncementInfo.java index 6dd6c51c..92b69eaf 100644 --- a/src/main/java/org/ldk/structs/NodeAnnouncementInfo.java +++ b/src/main/java/org/ldk/structs/NodeAnnouncementInfo.java @@ -36,7 +36,7 @@ public class NodeAnnouncementInfo extends CommonBase { * Protocol features the node announced support for */ public void set_features(org.ldk.structs.NodeFeatures val) { - bindings.NodeAnnouncementInfo_set_features(this.ptr, val == null ? 0 : val.ptr); + bindings.NodeAnnouncementInfo_set_features(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -100,7 +100,7 @@ public class NodeAnnouncementInfo extends CommonBase { * should not be exposed to the user. */ public void set_alias(org.ldk.structs.NodeAlias val) { - bindings.NodeAnnouncementInfo_set_alias(this.ptr, val == null ? 0 : val.ptr); + bindings.NodeAnnouncementInfo_set_alias(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -145,7 +145,7 @@ public class NodeAnnouncementInfo extends CommonBase { * Note that announcement_message_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ public static NodeAnnouncementInfo of(org.ldk.structs.NodeFeatures features_arg, int last_update_arg, byte[] rgb_arg, org.ldk.structs.NodeAlias alias_arg, @Nullable org.ldk.structs.NodeAnnouncement announcement_message_arg) { - long ret = bindings.NodeAnnouncementInfo_new(features_arg == null ? 0 : features_arg.ptr, last_update_arg, InternalUtils.check_arr_len(rgb_arg, 3), alias_arg == null ? 0 : alias_arg.ptr, announcement_message_arg == null ? 0 : announcement_message_arg.ptr); + long ret = bindings.NodeAnnouncementInfo_new(features_arg.ptr, last_update_arg, InternalUtils.check_arr_len(rgb_arg, 3), alias_arg.ptr, announcement_message_arg == null ? 0 : announcement_message_arg.ptr); Reference.reachabilityFence(features_arg); Reference.reachabilityFence(last_update_arg); Reference.reachabilityFence(rgb_arg); @@ -184,7 +184,7 @@ public class NodeAnnouncementInfo extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.NodeAnnouncementInfo b) { - boolean ret = bindings.NodeAnnouncementInfo_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.NodeAnnouncementInfo_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/NodeFeatures.java b/src/main/java/org/ldk/structs/NodeFeatures.java index 032f6f67..bebcc26b 100644 --- a/src/main/java/org/ldk/structs/NodeFeatures.java +++ b/src/main/java/org/ldk/structs/NodeFeatures.java @@ -26,7 +26,7 @@ public class NodeFeatures extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.NodeFeatures b) { - boolean ret = bindings.NodeFeatures_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.NodeFeatures_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; @@ -82,7 +82,7 @@ public class NodeFeatures extends CommonBase { * Returns true if this `Features` object contains required features unknown by `other`. */ public boolean requires_unknown_bits_from(org.ldk.structs.NodeFeatures other) { - boolean ret = bindings.NodeFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr); + boolean ret = bindings.NodeFeatures_requires_unknown_bits_from(this.ptr, other.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(other); if (this != null) { this.ptrs_to.add(other); }; @@ -803,4 +803,38 @@ public class NodeFeatures extends CommonBase { return ret; } + /** + * Set this feature as optional. + */ + public void set_trampoline_routing_optional() { + bindings.NodeFeatures_set_trampoline_routing_optional(this.ptr); + Reference.reachabilityFence(this); + } + + /** + * Set this feature as required. + */ + public void set_trampoline_routing_required() { + bindings.NodeFeatures_set_trampoline_routing_required(this.ptr); + Reference.reachabilityFence(this); + } + + /** + * Checks if this feature is supported. + */ + public boolean supports_trampoline_routing() { + boolean ret = bindings.NodeFeatures_supports_trampoline_routing(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Checks if this feature is required. + */ + public boolean requires_trampoline_routing() { + boolean ret = bindings.NodeFeatures_requires_trampoline_routing(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + } diff --git a/src/main/java/org/ldk/structs/NodeId.java b/src/main/java/org/ldk/structs/NodeId.java index 830cfdc3..73e903f9 100644 --- a/src/main/java/org/ldk/structs/NodeId.java +++ b/src/main/java/org/ldk/structs/NodeId.java @@ -50,6 +50,17 @@ public class NodeId extends CommonBase { return ret_hu_conv; } + /** + * Create a new NodeId from a slice of bytes + */ + public static Result_NodeIdDecodeErrorZ from_slice(byte[] bytes) { + long ret = bindings.NodeId_from_slice(bytes); + Reference.reachabilityFence(bytes); + if (ret >= 0 && ret <= 4096) { return null; } + Result_NodeIdDecodeErrorZ ret_hu_conv = Result_NodeIdDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + /** * Get the public key slice from this NodeId */ diff --git a/src/main/java/org/ldk/structs/NodeIdLookUp.java b/src/main/java/org/ldk/structs/NodeIdLookUp.java new file mode 100644 index 00000000..8351d905 --- /dev/null +++ b/src/main/java/org/ldk/structs/NodeIdLookUp.java @@ -0,0 +1,86 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + +/** + * An interface for looking up the node id of a channel counterparty for the purpose of forwarding + * an [`OnionMessage`]. + * + * [`OnionMessage`]: crate::ln::msgs::OnionMessage + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class NodeIdLookUp extends CommonBase { + final bindings.LDKNodeIdLookUp bindings_instance; + NodeIdLookUp(Object _dummy, long ptr) { super(ptr); bindings_instance = null; } + private NodeIdLookUp(bindings.LDKNodeIdLookUp arg) { + super(bindings.LDKNodeIdLookUp_new(arg)); + this.ptrs_to.add(arg); + this.bindings_instance = arg; + } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + if (ptr != 0) { bindings.NodeIdLookUp_free(ptr); } super.finalize(); + } + /** + * Destroys the object, freeing associated resources. After this call, any access + * to this object may result in a SEGFAULT or worse. + * + * You should generally NEVER call this method. You should let the garbage collector + * do this for you when it finalizes objects. However, it may be useful for types + * which represent locks and should be closed immediately to avoid holding locks + * until the GC runs. + */ + public void destroy() { + if (ptr != 0) { bindings.NodeIdLookUp_free(ptr); } + ptr = 0; + } + public static interface NodeIdLookUpInterface { + /** + * Returns the node id of the forwarding node's channel counterparty with `short_channel_id`. + * + * Here, the forwarding node is referring to the node of the [`OnionMessenger`] parameterized + * by the [`NodeIdLookUp`] and the counterparty to one of that node's peers. + * + * [`OnionMessenger`]: crate::onion_message::messenger::OnionMessenger + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + byte[] next_node_id(long short_channel_id); + } + private static class LDKNodeIdLookUpHolder { NodeIdLookUp held; } + public static NodeIdLookUp new_impl(NodeIdLookUpInterface arg) { + final LDKNodeIdLookUpHolder impl_holder = new LDKNodeIdLookUpHolder(); + impl_holder.held = new NodeIdLookUp(new bindings.LDKNodeIdLookUp() { + @Override public byte[] next_node_id(long short_channel_id) { + byte[] ret = arg.next_node_id(short_channel_id); + Reference.reachabilityFence(arg); + byte[] result = InternalUtils.check_arr_len(ret, 33); + return result; + } + }); + return impl_holder.held; + } + /** + * Returns the node id of the forwarding node's channel counterparty with `short_channel_id`. + * + * Here, the forwarding node is referring to the node of the [`OnionMessenger`] parameterized + * by the [`NodeIdLookUp`] and the counterparty to one of that node's peers. + * + * [`OnionMessenger`]: crate::onion_message::messenger::OnionMessenger + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + @Nullable + public byte[] next_node_id(long short_channel_id) { + byte[] ret = bindings.NodeIdLookUp_next_node_id(this.ptr, short_channel_id); + Reference.reachabilityFence(this); + Reference.reachabilityFence(short_channel_id); + return ret; + } + +} diff --git a/src/main/java/org/ldk/structs/NodeInfo.java b/src/main/java/org/ldk/structs/NodeInfo.java index e1617e84..d65f4332 100644 --- a/src/main/java/org/ldk/structs/NodeInfo.java +++ b/src/main/java/org/ldk/structs/NodeInfo.java @@ -111,7 +111,7 @@ public class NodeInfo extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.NodeInfo b) { - boolean ret = bindings.NodeInfo_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.NodeInfo_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; @@ -122,6 +122,15 @@ public class NodeInfo extends CommonBase { if (!(o instanceof NodeInfo)) return false; return this.eq((NodeInfo)o); } + /** + * Returns whether the node has only announced Tor addresses. + */ + public boolean is_tor_only() { + boolean ret = bindings.NodeInfo_is_tor_only(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + /** * Serialize the NodeInfo object into a byte array which can be read by NodeInfo_read */ diff --git a/src/main/java/org/ldk/structs/NodeSigner.java b/src/main/java/org/ldk/structs/NodeSigner.java index 3b3a7f2b..21250887 100644 --- a/src/main/java/org/ldk/structs/NodeSigner.java +++ b/src/main/java/org/ldk/structs/NodeSigner.java @@ -134,7 +134,7 @@ public class NodeSigner extends CommonBase { @Override public long get_node_id(Recipient recipient) { Result_PublicKeyNoneZ ret = arg.get_node_id(recipient); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long ecdh(Recipient recipient, byte[] other_key, long tweak) { @@ -142,7 +142,7 @@ public class NodeSigner extends CommonBase { if (tweak_hu_conv != null) { tweak_hu_conv.ptrs_to.add(this); }; Result_ThirtyTwoBytesNoneZ ret = arg.ecdh(recipient, other_key, tweak_hu_conv); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long sign_invoice(byte[] hrp_bytes, byte[] invoice_data, Recipient recipient) { @@ -155,21 +155,21 @@ public class NodeSigner extends CommonBase { } Result_RecoverableSignatureNoneZ ret = arg.sign_invoice(hrp_bytes, invoice_data_conv_7_arr, recipient); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long sign_bolt12_invoice_request(long invoice_request) { org.ldk.structs.UnsignedInvoiceRequest invoice_request_hu_conv = null; if (invoice_request < 0 || invoice_request > 4096) { invoice_request_hu_conv = new org.ldk.structs.UnsignedInvoiceRequest(null, invoice_request); } Result_SchnorrSignatureNoneZ ret = arg.sign_bolt12_invoice_request(invoice_request_hu_conv); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long sign_bolt12_invoice(long invoice) { org.ldk.structs.UnsignedBolt12Invoice invoice_hu_conv = null; if (invoice < 0 || invoice > 4096) { invoice_hu_conv = new org.ldk.structs.UnsignedBolt12Invoice(null, invoice); } Result_SchnorrSignatureNoneZ ret = arg.sign_bolt12_invoice(invoice_hu_conv); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long sign_gossip_message(long msg) { @@ -177,7 +177,7 @@ public class NodeSigner extends CommonBase { if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.add(this); }; Result_ECDSASignatureNoneZ ret = arg.sign_gossip_message(msg_hu_conv); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } }); @@ -277,7 +277,7 @@ public class NodeSigner extends CommonBase { * [`TaggedHash`]: crate::offers::merkle::TaggedHash */ public Result_SchnorrSignatureNoneZ sign_bolt12_invoice_request(org.ldk.structs.UnsignedInvoiceRequest invoice_request) { - long ret = bindings.NodeSigner_sign_bolt12_invoice_request(this.ptr, invoice_request == null ? 0 : invoice_request.ptr); + long ret = bindings.NodeSigner_sign_bolt12_invoice_request(this.ptr, invoice_request.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(invoice_request); if (ret >= 0 && ret <= 4096) { return null; } @@ -300,7 +300,7 @@ public class NodeSigner extends CommonBase { * [`TaggedHash`]: crate::offers::merkle::TaggedHash */ public Result_SchnorrSignatureNoneZ sign_bolt12_invoice(org.ldk.structs.UnsignedBolt12Invoice invoice) { - long ret = bindings.NodeSigner_sign_bolt12_invoice(this.ptr, invoice == null ? 0 : invoice.ptr); + long ret = bindings.NodeSigner_sign_bolt12_invoice(this.ptr, invoice.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(invoice); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/src/main/java/org/ldk/structs/Offer.java b/src/main/java/org/ldk/structs/Offer.java index 5a982790..6a4cf62b 100644 --- a/src/main/java/org/ldk/structs/Offer.java +++ b/src/main/java/org/ldk/structs/Offer.java @@ -76,15 +76,12 @@ public class Offer extends CommonBase { /** * The minimum amount required for a successful payment of a single item. - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ - @Nullable - public Amount amount() { + public Option_AmountZ amount() { long ret = bindings.Offer_amount(this.ptr); Reference.reachabilityFence(this); if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Amount ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Amount(null, ret); } + org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; return ret_hu_conv; } @@ -92,7 +89,10 @@ public class Offer extends CommonBase { /** * A complete description of the purpose of the payment. Intended to be displayed to the user * but with the caveat that it has not been verified in any way. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ + @Nullable public PrintableString description() { long ret = bindings.Offer_description(this.ptr); Reference.reachabilityFence(this); @@ -169,20 +169,35 @@ public class Offer extends CommonBase { long ret = bindings.Offer_supported_quantity(this.ptr); Reference.reachabilityFence(this); if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Quantity ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Quantity(null, ret); } + org.ldk.structs.Quantity ret_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; return ret_hu_conv; } /** * The public key used by the recipient to sign invoices. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ + @Nullable public byte[] signing_pubkey() { byte[] ret = bindings.Offer_signing_pubkey(this.ptr); Reference.reachabilityFence(this); return ret; } + /** + * Returns the id of the offer. + */ + public OfferId id() { + long ret = bindings.Offer_id(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OfferId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + /** * Returns whether the given chain is supported by the offer. */ @@ -233,6 +248,95 @@ public class Offer extends CommonBase { return ret; } + /** + * Similar to [`Offer::request_invoice`] except it: + * - derives the [`InvoiceRequest::payer_id`] such that a different key can be used for each + * request, + * - sets [`InvoiceRequest::payer_metadata`] when [`InvoiceRequestBuilder::build`] is called + * such that it can be used by [`Bolt12Invoice::verify`] to determine if the invoice was + * requested using a base [`ExpandedKey`] from which the payer id was derived, and + * - includes the [`PaymentId`] encrypted in [`InvoiceRequest::payer_metadata`] so that it can + * be used when sending the payment for the requested invoice. + * + * Useful to protect the sender's privacy. + * + * [`InvoiceRequest::payer_id`]: crate::offers::invoice_request::InvoiceRequest::payer_id + * [`InvoiceRequest::payer_metadata`]: crate::offers::invoice_request::InvoiceRequest::payer_metadata + * [`Bolt12Invoice::verify`]: crate::offers::invoice::Bolt12Invoice::verify + * [`ExpandedKey`]: crate::ln::inbound_payment::ExpandedKey + */ + public Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ request_invoice_deriving_payer_id(org.ldk.structs.ExpandedKey expanded_key, org.ldk.structs.EntropySource entropy_source, byte[] payment_id) { + long ret = bindings.Offer_request_invoice_deriving_payer_id(this.ptr, expanded_key.ptr, entropy_source.ptr, InternalUtils.check_arr_len(payment_id, 32)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(expanded_key); + Reference.reachabilityFence(entropy_source); + Reference.reachabilityFence(payment_id); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.add(expanded_key); }; + if (this != null) { this.ptrs_to.add(entropy_source); }; + return ret_hu_conv; + } + + /** + * Similar to [`Offer::request_invoice_deriving_payer_id`] except uses `payer_id` for the + * [`InvoiceRequest::payer_id`] instead of deriving a different key for each request. + * + * Useful for recurring payments using the same `payer_id` with different invoices. + * + * [`InvoiceRequest::payer_id`]: crate::offers::invoice_request::InvoiceRequest::payer_id + */ + public Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ request_invoice_deriving_metadata(byte[] payer_id, org.ldk.structs.ExpandedKey expanded_key, org.ldk.structs.EntropySource entropy_source, byte[] payment_id) { + long ret = bindings.Offer_request_invoice_deriving_metadata(this.ptr, InternalUtils.check_arr_len(payer_id, 33), expanded_key.ptr, entropy_source.ptr, InternalUtils.check_arr_len(payment_id, 32)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(payer_id); + Reference.reachabilityFence(expanded_key); + Reference.reachabilityFence(entropy_source); + Reference.reachabilityFence(payment_id); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.add(expanded_key); }; + if (this != null) { this.ptrs_to.add(entropy_source); }; + return ret_hu_conv; + } + + /** + * Creates an [`InvoiceRequestBuilder`] for the offer with the given `metadata` and `payer_id`, + * which will be reflected in the `Bolt12Invoice` response. + * + * The `metadata` is useful for including information about the derivation of `payer_id` such + * that invoice response handling can be stateless. Also serves as payer-provided entropy while + * hashing in the signature calculation. + * + * This should not leak any information such as by using a simple BIP-32 derivation path. + * Otherwise, payments may be correlated. + * + * Errors if the offer contains unknown required features. + * + * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest + */ + public Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ request_invoice(byte[] metadata, byte[] payer_id) { + long ret = bindings.Offer_request_invoice(this.ptr, metadata, InternalUtils.check_arr_len(payer_id, 33)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(metadata); + Reference.reachabilityFence(payer_id); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Generates a non-cryptographic 64-bit hash of the Offer. + */ + public long hash() { + long ret = bindings.Offer_hash(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + @Override public int hashCode() { + return (int)this.hash(); + } /** * Serialize the Offer object into a byte array which can be read by Offer_read */ diff --git a/src/main/java/org/ldk/structs/OfferFeatures.java b/src/main/java/org/ldk/structs/OfferFeatures.java index c560267e..e269852c 100644 --- a/src/main/java/org/ldk/structs/OfferFeatures.java +++ b/src/main/java/org/ldk/structs/OfferFeatures.java @@ -26,7 +26,7 @@ public class OfferFeatures extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.OfferFeatures b) { - boolean ret = bindings.OfferFeatures_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.OfferFeatures_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; @@ -82,7 +82,7 @@ public class OfferFeatures extends CommonBase { * Returns true if this `Features` object contains required features unknown by `other`. */ public boolean requires_unknown_bits_from(org.ldk.structs.OfferFeatures other) { - boolean ret = bindings.OfferFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr); + boolean ret = bindings.OfferFeatures_requires_unknown_bits_from(this.ptr, other.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(other); if (this != null) { this.ptrs_to.add(other); }; diff --git a/src/main/java/org/ldk/structs/OfferId.java b/src/main/java/org/ldk/structs/OfferId.java new file mode 100644 index 00000000..b5e5ba1d --- /dev/null +++ b/src/main/java/org/ldk/structs/OfferId.java @@ -0,0 +1,102 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + + +/** + * An identifier for an [`Offer`] built using [`DerivedMetadata`]. + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class OfferId extends CommonBase { + OfferId(Object _dummy, long ptr) { super(ptr); } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + if (ptr != 0) { bindings.OfferId_free(ptr); } + } + + public byte[] get_a() { + byte[] ret = bindings.OfferId_get_a(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + public void set_a(byte[] val) { + bindings.OfferId_set_a(this.ptr, InternalUtils.check_arr_len(val, 32)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * Constructs a new OfferId given each field + */ + public static OfferId of(byte[] a_arg) { + long ret = bindings.OfferId_new(InternalUtils.check_arr_len(a_arg, 32)); + Reference.reachabilityFence(a_arg); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OfferId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + + long clone_ptr() { + long ret = bindings.OfferId_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a copy of the OfferId + */ + public OfferId clone() { + long ret = bindings.OfferId_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OfferId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Checks if two OfferIds contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ + public boolean eq(org.ldk.structs.OfferId b) { + boolean ret = bindings.OfferId_eq(this.ptr, b.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(b); + if (this != null) { this.ptrs_to.add(b); }; + return ret; + } + + @Override public boolean equals(Object o) { + if (!(o instanceof OfferId)) return false; + return this.eq((OfferId)o); + } + /** + * Serialize the OfferId object into a byte array which can be read by OfferId_read + */ + public byte[] write() { + byte[] ret = bindings.OfferId_write(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Read a OfferId from a byte array, created by OfferId_write + */ + public static Result_OfferIdDecodeErrorZ read(byte[] ser) { + long ret = bindings.OfferId_read(ser); + Reference.reachabilityFence(ser); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OfferIdDecodeErrorZ ret_hu_conv = Result_OfferIdDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/OfferWithDerivedMetadataBuilder.java b/src/main/java/org/ldk/structs/OfferWithDerivedMetadataBuilder.java new file mode 100644 index 00000000..ca06e84c --- /dev/null +++ b/src/main/java/org/ldk/structs/OfferWithDerivedMetadataBuilder.java @@ -0,0 +1,176 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + + +/** + * Builds an [`Offer`] for the \"offer to be paid\" flow. + * + * See [module-level documentation] for usage. + * + * [module-level documentation]: self + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class OfferWithDerivedMetadataBuilder extends CommonBase { + OfferWithDerivedMetadataBuilder(Object _dummy, long ptr) { super(ptr); } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + if (ptr != 0) { bindings.OfferWithDerivedMetadataBuilder_free(ptr); } + } + + long clone_ptr() { + long ret = bindings.OfferWithDerivedMetadataBuilder_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a copy of the OfferWithDerivedMetadataBuilder + */ + public OfferWithDerivedMetadataBuilder clone() { + long ret = bindings.OfferWithDerivedMetadataBuilder_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OfferWithDerivedMetadataBuilder ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferWithDerivedMetadataBuilder(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Similar to [`OfferBuilder::new`] except, if [`OfferBuilder::path`] is called, the signing + * pubkey is derived from the given [`ExpandedKey`] and [`EntropySource`]. This provides + * recipient privacy by using a different signing pubkey for each offer. Otherwise, the + * provided `node_id` is used for the signing pubkey. + * + * Also, sets the metadata when [`OfferBuilder::build`] is called such that it can be used by + * [`InvoiceRequest::verify`] to determine if the request was produced for the offer given an + * [`ExpandedKey`]. + * + * [`InvoiceRequest::verify`]: crate::offers::invoice_request::InvoiceRequest::verify + * [`ExpandedKey`]: crate::ln::inbound_payment::ExpandedKey + */ + public static OfferWithDerivedMetadataBuilder deriving_signing_pubkey(byte[] node_id, org.ldk.structs.ExpandedKey expanded_key, org.ldk.structs.EntropySource entropy_source) { + long ret = bindings.OfferWithDerivedMetadataBuilder_deriving_signing_pubkey(InternalUtils.check_arr_len(node_id, 33), expanded_key.ptr, entropy_source.ptr); + Reference.reachabilityFence(node_id); + Reference.reachabilityFence(expanded_key); + Reference.reachabilityFence(entropy_source); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OfferWithDerivedMetadataBuilder ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferWithDerivedMetadataBuilder(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(expanded_key); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(entropy_source); }; + return ret_hu_conv; + } + + /** + * Adds the chain hash of the given [`Network`] to [`Offer::chains`]. If not called, + * the chain hash of [`Network::Bitcoin`] is assumed to be the only one supported. + * + * See [`Offer::chains`] on how this relates to the payment currency. + * + * Successive calls to this method will add another chain hash. + */ + public void chain(org.ldk.enums.Network network) { + bindings.OfferWithDerivedMetadataBuilder_chain(this.ptr, network); + Reference.reachabilityFence(this); + Reference.reachabilityFence(network); + if (this != null) { this.ptrs_to.add(this); }; + } + + /** + * Sets the [`Offer::amount`] as an [`Amount::Bitcoin`]. + * + * Successive calls to this method will override the previous setting. + */ + public void amount_msats(long amount_msats) { + bindings.OfferWithDerivedMetadataBuilder_amount_msats(this.ptr, amount_msats); + Reference.reachabilityFence(this); + Reference.reachabilityFence(amount_msats); + if (this != null) { this.ptrs_to.add(this); }; + } + + /** + * Sets the [`Offer::absolute_expiry`] as seconds since the Unix epoch. Any expiry that has + * already passed is valid and can be checked for using [`Offer::is_expired`]. + * + * Successive calls to this method will override the previous setting. + */ + public void absolute_expiry(long absolute_expiry) { + bindings.OfferWithDerivedMetadataBuilder_absolute_expiry(this.ptr, absolute_expiry); + Reference.reachabilityFence(this); + Reference.reachabilityFence(absolute_expiry); + if (this != null) { this.ptrs_to.add(this); }; + } + + /** + * Sets the [`Offer::description`]. + * + * Successive calls to this method will override the previous setting. + */ + public void description(java.lang.String description) { + bindings.OfferWithDerivedMetadataBuilder_description(this.ptr, description); + Reference.reachabilityFence(this); + Reference.reachabilityFence(description); + if (this != null) { this.ptrs_to.add(this); }; + } + + /** + * Sets the [`Offer::issuer`]. + * + * Successive calls to this method will override the previous setting. + */ + public void issuer(java.lang.String issuer) { + bindings.OfferWithDerivedMetadataBuilder_issuer(this.ptr, issuer); + Reference.reachabilityFence(this); + Reference.reachabilityFence(issuer); + if (this != null) { this.ptrs_to.add(this); }; + } + + /** + * Adds a blinded path to [`Offer::paths`]. Must include at least one path if only connected by + * private channels or if [`Offer::signing_pubkey`] is not a public node id. + * + * Successive calls to this method will add another blinded path. Caller is responsible for not + * adding duplicate paths. + */ + public void path(org.ldk.structs.BlindedPath path) { + bindings.OfferWithDerivedMetadataBuilder_path(this.ptr, path.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(path); + if (this != null) { this.ptrs_to.add(path); }; + if (this != null) { this.ptrs_to.add(this); }; + } + + /** + * Sets the quantity of items for [`Offer::supported_quantity`]. If not called, defaults to + * [`Quantity::One`]. + * + * Successive calls to this method will override the previous setting. + */ + public void supported_quantity(org.ldk.structs.Quantity quantity) { + bindings.OfferWithDerivedMetadataBuilder_supported_quantity(this.ptr, quantity.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(quantity); + if (this != null) { this.ptrs_to.add(quantity); }; + if (this != null) { this.ptrs_to.add(this); }; + } + + /** + * Builds an [`Offer`] from the builder's settings. + */ + public Result_OfferBolt12SemanticErrorZ build() { + long ret = bindings.OfferWithDerivedMetadataBuilder_build(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OfferBolt12SemanticErrorZ ret_hu_conv = Result_OfferBolt12SemanticErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.add(this); }; + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/OfferWithExplicitMetadataBuilder.java b/src/main/java/org/ldk/structs/OfferWithExplicitMetadataBuilder.java new file mode 100644 index 00000000..d92f2632 --- /dev/null +++ b/src/main/java/org/ldk/structs/OfferWithExplicitMetadataBuilder.java @@ -0,0 +1,188 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + + +/** + * Builds an [`Offer`] for the \"offer to be paid\" flow. + * + * See [module-level documentation] for usage. + * + * [module-level documentation]: self + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class OfferWithExplicitMetadataBuilder extends CommonBase { + OfferWithExplicitMetadataBuilder(Object _dummy, long ptr) { super(ptr); } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + if (ptr != 0) { bindings.OfferWithExplicitMetadataBuilder_free(ptr); } + } + + long clone_ptr() { + long ret = bindings.OfferWithExplicitMetadataBuilder_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a copy of the OfferWithExplicitMetadataBuilder + */ + public OfferWithExplicitMetadataBuilder clone() { + long ret = bindings.OfferWithExplicitMetadataBuilder_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OfferWithExplicitMetadataBuilder ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferWithExplicitMetadataBuilder(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Creates a new builder for an offer using the [`Offer::signing_pubkey`] for signing invoices. + * The associated secret key must be remembered while the offer is valid. + * + * Use a different pubkey per offer to avoid correlating offers. + * + * # Note + * + * If constructing an [`Offer`] for use with a [`ChannelManager`], use + * [`ChannelManager::create_offer_builder`] instead of [`OfferBuilder::new`]. + * + * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager + * [`ChannelManager::create_offer_builder`]: crate::ln::channelmanager::ChannelManager::create_offer_builder + */ + public static OfferWithExplicitMetadataBuilder of(byte[] signing_pubkey) { + long ret = bindings.OfferWithExplicitMetadataBuilder_new(InternalUtils.check_arr_len(signing_pubkey, 33)); + Reference.reachabilityFence(signing_pubkey); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OfferWithExplicitMetadataBuilder ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferWithExplicitMetadataBuilder(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Sets the [`Offer::metadata`] to the given bytes. + * + * Successive calls to this method will override the previous setting. + */ + public Result_NoneBolt12SemanticErrorZ metadata(byte[] metadata) { + long ret = bindings.OfferWithExplicitMetadataBuilder_metadata(this.ptr, metadata); + Reference.reachabilityFence(this); + Reference.reachabilityFence(metadata); + if (ret >= 0 && ret <= 4096) { return null; } + Result_NoneBolt12SemanticErrorZ ret_hu_conv = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Adds the chain hash of the given [`Network`] to [`Offer::chains`]. If not called, + * the chain hash of [`Network::Bitcoin`] is assumed to be the only one supported. + * + * See [`Offer::chains`] on how this relates to the payment currency. + * + * Successive calls to this method will add another chain hash. + */ + public void chain(org.ldk.enums.Network network) { + bindings.OfferWithExplicitMetadataBuilder_chain(this.ptr, network); + Reference.reachabilityFence(this); + Reference.reachabilityFence(network); + if (this != null) { this.ptrs_to.add(this); }; + } + + /** + * Sets the [`Offer::amount`] as an [`Amount::Bitcoin`]. + * + * Successive calls to this method will override the previous setting. + */ + public void amount_msats(long amount_msats) { + bindings.OfferWithExplicitMetadataBuilder_amount_msats(this.ptr, amount_msats); + Reference.reachabilityFence(this); + Reference.reachabilityFence(amount_msats); + if (this != null) { this.ptrs_to.add(this); }; + } + + /** + * Sets the [`Offer::absolute_expiry`] as seconds since the Unix epoch. Any expiry that has + * already passed is valid and can be checked for using [`Offer::is_expired`]. + * + * Successive calls to this method will override the previous setting. + */ + public void absolute_expiry(long absolute_expiry) { + bindings.OfferWithExplicitMetadataBuilder_absolute_expiry(this.ptr, absolute_expiry); + Reference.reachabilityFence(this); + Reference.reachabilityFence(absolute_expiry); + if (this != null) { this.ptrs_to.add(this); }; + } + + /** + * Sets the [`Offer::description`]. + * + * Successive calls to this method will override the previous setting. + */ + public void description(java.lang.String description) { + bindings.OfferWithExplicitMetadataBuilder_description(this.ptr, description); + Reference.reachabilityFence(this); + Reference.reachabilityFence(description); + if (this != null) { this.ptrs_to.add(this); }; + } + + /** + * Sets the [`Offer::issuer`]. + * + * Successive calls to this method will override the previous setting. + */ + public void issuer(java.lang.String issuer) { + bindings.OfferWithExplicitMetadataBuilder_issuer(this.ptr, issuer); + Reference.reachabilityFence(this); + Reference.reachabilityFence(issuer); + if (this != null) { this.ptrs_to.add(this); }; + } + + /** + * Adds a blinded path to [`Offer::paths`]. Must include at least one path if only connected by + * private channels or if [`Offer::signing_pubkey`] is not a public node id. + * + * Successive calls to this method will add another blinded path. Caller is responsible for not + * adding duplicate paths. + */ + public void path(org.ldk.structs.BlindedPath path) { + bindings.OfferWithExplicitMetadataBuilder_path(this.ptr, path.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(path); + if (this != null) { this.ptrs_to.add(path); }; + if (this != null) { this.ptrs_to.add(this); }; + } + + /** + * Sets the quantity of items for [`Offer::supported_quantity`]. If not called, defaults to + * [`Quantity::One`]. + * + * Successive calls to this method will override the previous setting. + */ + public void supported_quantity(org.ldk.structs.Quantity quantity) { + bindings.OfferWithExplicitMetadataBuilder_supported_quantity(this.ptr, quantity.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(quantity); + if (this != null) { this.ptrs_to.add(quantity); }; + if (this != null) { this.ptrs_to.add(this); }; + } + + /** + * Builds an [`Offer`] from the builder's settings. + */ + public Result_OfferBolt12SemanticErrorZ build() { + long ret = bindings.OfferWithExplicitMetadataBuilder_build(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OfferBolt12SemanticErrorZ ret_hu_conv = Result_OfferBolt12SemanticErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.add(this); }; + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/OffersMessage.java b/src/main/java/org/ldk/structs/OffersMessage.java index a3c2da2c..9ce51311 100644 --- a/src/main/java/org/ldk/structs/OffersMessage.java +++ b/src/main/java/org/ldk/structs/OffersMessage.java @@ -100,7 +100,7 @@ public class OffersMessage extends CommonBase { * Utility method to constructs a new InvoiceRequest-variant OffersMessage */ public static OffersMessage invoice_request(org.ldk.structs.InvoiceRequest a) { - long ret = bindings.OffersMessage_invoice_request(a == null ? 0 : a.ptr); + long ret = bindings.OffersMessage_invoice_request(a.ptr); Reference.reachabilityFence(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.OffersMessage ret_hu_conv = org.ldk.structs.OffersMessage.constr_from_ptr(ret); @@ -113,7 +113,7 @@ public class OffersMessage extends CommonBase { * Utility method to constructs a new Invoice-variant OffersMessage */ public static OffersMessage invoice(org.ldk.structs.Bolt12Invoice a) { - long ret = bindings.OffersMessage_invoice(a == null ? 0 : a.ptr); + long ret = bindings.OffersMessage_invoice(a.ptr); Reference.reachabilityFence(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.OffersMessage ret_hu_conv = org.ldk.structs.OffersMessage.constr_from_ptr(ret); @@ -126,7 +126,7 @@ public class OffersMessage extends CommonBase { * Utility method to constructs a new InvoiceError-variant OffersMessage */ public static OffersMessage invoice_error(org.ldk.structs.InvoiceError a) { - long ret = bindings.OffersMessage_invoice_error(a == null ? 0 : a.ptr); + long ret = bindings.OffersMessage_invoice_error(a.ptr); Reference.reachabilityFence(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.OffersMessage ret_hu_conv = org.ldk.structs.OffersMessage.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/OffersMessageHandler.java b/src/main/java/org/ldk/structs/OffersMessageHandler.java index 14046d51..471e53c2 100644 --- a/src/main/java/org/ldk/structs/OffersMessageHandler.java +++ b/src/main/java/org/ldk/structs/OffersMessageHandler.java @@ -65,14 +65,14 @@ public class OffersMessageHandler extends CommonBase { if (message_hu_conv != null) { message_hu_conv.ptrs_to.add(this); }; Option_OffersMessageZ ret = arg.handle_message(message_hu_conv); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); if (impl_holder.held != null) { impl_holder.held.ptrs_to.add(ret); }; return result; } @Override public long[] release_pending_messages() { ThreeTuple_OffersMessageDestinationBlindedPathZ[] ret = arg.release_pending_messages(); Reference.reachabilityFence(arg); - long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_49 -> ret_conv_49 == null ? 0 : ret_conv_49.clone_ptr()).toArray() : null; + long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_49 -> ret_conv_49.clone_ptr()).toArray() : null; return result; } }); diff --git a/src/main/java/org/ldk/structs/OnionMessage.java b/src/main/java/org/ldk/structs/OnionMessage.java index c171b0a9..d16ba3a5 100644 --- a/src/main/java/org/ldk/structs/OnionMessage.java +++ b/src/main/java/org/ldk/structs/OnionMessage.java @@ -54,7 +54,7 @@ public class OnionMessage extends CommonBase { * The full onion packet including hop data, pubkey, and hmac */ public void set_onion_routing_packet(org.ldk.structs.Packet val) { - bindings.OnionMessage_set_onion_routing_packet(this.ptr, val == null ? 0 : val.ptr); + bindings.OnionMessage_set_onion_routing_packet(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -64,7 +64,7 @@ public class OnionMessage extends CommonBase { * Constructs a new OnionMessage given each field */ public static OnionMessage of(byte[] blinding_point_arg, org.ldk.structs.Packet onion_routing_packet_arg) { - long ret = bindings.OnionMessage_new(InternalUtils.check_arr_len(blinding_point_arg, 33), onion_routing_packet_arg == null ? 0 : onion_routing_packet_arg.ptr); + long ret = bindings.OnionMessage_new(InternalUtils.check_arr_len(blinding_point_arg, 33), onion_routing_packet_arg.ptr); Reference.reachabilityFence(blinding_point_arg); Reference.reachabilityFence(onion_routing_packet_arg); if (ret >= 0 && ret <= 4096) { return null; } @@ -110,7 +110,7 @@ public class OnionMessage extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.OnionMessage b) { - boolean ret = bindings.OnionMessage_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.OnionMessage_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/OnionMessageHandler.java b/src/main/java/org/ldk/structs/OnionMessageHandler.java index 4b8abe04..3667968f 100644 --- a/src/main/java/org/ldk/structs/OnionMessageHandler.java +++ b/src/main/java/org/ldk/structs/OnionMessageHandler.java @@ -98,7 +98,7 @@ public class OnionMessageHandler extends CommonBase { @Override public long[] get_and_clear_connections_needed() { TwoTuple_PublicKeyCVec_SocketAddressZZ[] ret = arg.get_and_clear_connections_needed(); Reference.reachabilityFence(arg); - long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_40 -> ret_conv_40 == null ? 0 : ret_conv_40.clone_ptr()).toArray() : null; + long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_40 -> ret_conv_40.clone_ptr()).toArray() : null; return result; } @Override public void handle_onion_message(byte[] peer_node_id, long msg) { @@ -116,7 +116,7 @@ public class OnionMessageHandler extends CommonBase { org.ldk.structs.Init init_hu_conv = null; if (init < 0 || init > 4096) { init_hu_conv = new org.ldk.structs.Init(null, init); } Result_NoneNoneZ ret = arg.peer_connected(their_node_id, init_hu_conv, inbound); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public void peer_disconnected(byte[] their_node_id) { @@ -130,13 +130,13 @@ public class OnionMessageHandler extends CommonBase { @Override public long provided_node_features() { NodeFeatures ret = arg.provided_node_features(); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long provided_init_features(byte[] their_node_id) { InitFeatures ret = arg.provided_init_features(their_node_id); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } }); @@ -169,7 +169,7 @@ public class OnionMessageHandler extends CommonBase { * Handle an incoming `onion_message` message from the given peer. */ public void handle_onion_message(byte[] peer_node_id, org.ldk.structs.OnionMessage msg) { - bindings.OnionMessageHandler_handle_onion_message(this.ptr, InternalUtils.check_arr_len(peer_node_id, 33), msg == null ? 0 : msg.ptr); + bindings.OnionMessageHandler_handle_onion_message(this.ptr, InternalUtils.check_arr_len(peer_node_id, 33), msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(peer_node_id); Reference.reachabilityFence(msg); @@ -201,7 +201,7 @@ public class OnionMessageHandler extends CommonBase { * message handlers may still wish to communicate with this peer. */ public Result_NoneNoneZ peer_connected(byte[] their_node_id, org.ldk.structs.Init init, boolean inbound) { - long ret = bindings.OnionMessageHandler_peer_connected(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), init == null ? 0 : init.ptr, inbound); + long ret = bindings.OnionMessageHandler_peer_connected(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), init.ptr, inbound); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(init); diff --git a/src/main/java/org/ldk/structs/OnionMessagePath.java b/src/main/java/org/ldk/structs/OnionMessagePath.java index 758a784f..6aa48fdf 100644 --- a/src/main/java/org/ldk/structs/OnionMessagePath.java +++ b/src/main/java/org/ldk/structs/OnionMessagePath.java @@ -128,7 +128,10 @@ public class OnionMessagePath extends CommonBase { /** * Returns the first node in the path. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ + @Nullable public byte[] first_node() { byte[] ret = bindings.OnionMessagePath_first_node(this.ptr); Reference.reachabilityFence(this); diff --git a/src/main/java/org/ldk/structs/OnionMessenger.java b/src/main/java/org/ldk/structs/OnionMessenger.java index 6096f379..0f877193 100644 --- a/src/main/java/org/ldk/structs/OnionMessenger.java +++ b/src/main/java/org/ldk/structs/OnionMessenger.java @@ -32,7 +32,7 @@ import javax.annotation.Nullable; * # use bitcoin::hashes::_export::_core::time::Duration; * # use bitcoin::hashes::hex::FromHex; * # use bitcoin::secp256k1::{PublicKey, Secp256k1, SecretKey, self}; - * # use lightning::blinded_path::BlindedPath; + * # use lightning::blinded_path::{BlindedPath, EmptyNodeIdLookUp}; * # use lightning::sign::{EntropySource, KeysManager}; * # use lightning::ln::peer_handler::IgnoringMessageHandler; * # use lightning::onion_message::messenger::{Destination, MessageRouter, OnionMessagePath, OnionMessenger}; @@ -73,14 +73,15 @@ import javax.annotation.Nullable; * # let hop_node_id1 = PublicKey::from_secret_key(&secp_ctx, &node_secret); * # let (hop_node_id3, hop_node_id4) = (hop_node_id1, hop_node_id1); * # let destination_node_id = hop_node_id1; + * # let node_id_lookup = EmptyNodeIdLookUp {}; * # let message_router = Arc::new(FakeMessageRouter {}); * # let custom_message_handler = IgnoringMessageHandler {}; * # let offers_message_handler = IgnoringMessageHandler {}; * Create the onion messenger. This must use the same `keys_manager` as is passed to your * ChannelManager. * let onion_messenger = OnionMessenger::new( - * &keys_manager, &keys_manager, logger, message_router, &offers_message_handler, - * &custom_message_handler + * &keys_manager, &keys_manager, logger, &node_id_lookup, message_router, + * &offers_message_handler, &custom_message_handler * ); * * # #[derive(Debug, Clone)] @@ -131,11 +132,12 @@ public class OnionMessenger extends CommonBase { * Constructs a new `OnionMessenger` to send, forward, and delegate received onion messages to * their respective handlers. */ - public static OnionMessenger of(org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.structs.MessageRouter message_router, org.ldk.structs.OffersMessageHandler offers_handler, org.ldk.structs.CustomOnionMessageHandler custom_handler) { - long ret = bindings.OnionMessenger_new(entropy_source.ptr, node_signer.ptr, logger.ptr, message_router.ptr, offers_handler.ptr, custom_handler.ptr); + public static OnionMessenger of(org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.structs.NodeIdLookUp node_id_lookup, org.ldk.structs.MessageRouter message_router, org.ldk.structs.OffersMessageHandler offers_handler, org.ldk.structs.CustomOnionMessageHandler custom_handler) { + long ret = bindings.OnionMessenger_new(entropy_source.ptr, node_signer.ptr, logger.ptr, node_id_lookup.ptr, message_router.ptr, offers_handler.ptr, custom_handler.ptr); Reference.reachabilityFence(entropy_source); Reference.reachabilityFence(node_signer); Reference.reachabilityFence(logger); + Reference.reachabilityFence(node_id_lookup); Reference.reachabilityFence(message_router); Reference.reachabilityFence(offers_handler); Reference.reachabilityFence(custom_handler); @@ -145,6 +147,7 @@ public class OnionMessenger extends CommonBase { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(entropy_source); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(node_signer); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(logger); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(node_id_lookup); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(message_router); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(offers_handler); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(custom_handler); }; diff --git a/src/main/java/org/ldk/structs/OnionPacket.java b/src/main/java/org/ldk/structs/OnionPacket.java index 8db0a310..38e8c6c8 100644 --- a/src/main/java/org/ldk/structs/OnionPacket.java +++ b/src/main/java/org/ldk/structs/OnionPacket.java @@ -63,7 +63,7 @@ public class OnionPacket extends CommonBase { * like. */ public void set_public_key(org.ldk.structs.Result_PublicKeySecp256k1ErrorZ val) { - bindings.OnionPacket_set_public_key(this.ptr, val != null ? val.ptr : 0); + bindings.OnionPacket_set_public_key(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); } @@ -122,7 +122,7 @@ public class OnionPacket extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.OnionPacket b) { - boolean ret = bindings.OnionPacket_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.OnionPacket_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/OpenChannel.java b/src/main/java/org/ldk/structs/OpenChannel.java index 7040d9ea..7df31138 100644 --- a/src/main/java/org/ldk/structs/OpenChannel.java +++ b/src/main/java/org/ldk/structs/OpenChannel.java @@ -25,57 +25,25 @@ public class OpenChannel extends CommonBase { } /** - * The genesis hash of the blockchain where the channel is to be opened + * Common fields of `open_channel(2)`-like messages */ - public byte[] get_chain_hash() { - byte[] ret = bindings.OpenChannel_get_chain_hash(this.ptr); + public CommonOpenChannelFields get_common_fields() { + long ret = bindings.OpenChannel_get_common_fields(this.ptr); Reference.reachabilityFence(this); - return ret; - } - - /** - * The genesis hash of the blockchain where the channel is to be opened - */ - public void set_chain_hash(byte[] val) { - bindings.OpenChannel_set_chain_hash(this.ptr, InternalUtils.check_arr_len(val, 32)); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * A temporary channel ID, until the funding outpoint is announced - */ - public byte[] get_temporary_channel_id() { - byte[] ret = bindings.OpenChannel_get_temporary_channel_id(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * A temporary channel ID, until the funding outpoint is announced - */ - public void set_temporary_channel_id(byte[] val) { - bindings.OpenChannel_set_temporary_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * The channel value - */ - public long get_funding_satoshis() { - long ret = bindings.OpenChannel_get_funding_satoshis(this.ptr); - Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.CommonOpenChannelFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommonOpenChannelFields(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** - * The channel value + * Common fields of `open_channel(2)`-like messages */ - public void set_funding_satoshis(long val) { - bindings.OpenChannel_set_funding_satoshis(this.ptr, val); + public void set_common_fields(org.ldk.structs.CommonOpenChannelFields val) { + bindings.OpenChannel_set_common_fields(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** @@ -96,42 +64,6 @@ public class OpenChannel extends CommonBase { Reference.reachabilityFence(val); } - /** - * The threshold below which outputs on transactions broadcast by sender will be omitted - */ - public long get_dust_limit_satoshis() { - long ret = bindings.OpenChannel_get_dust_limit_satoshis(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * The threshold below which outputs on transactions broadcast by sender will be omitted - */ - public void set_dust_limit_satoshis(long val) { - bindings.OpenChannel_set_dust_limit_satoshis(this.ptr, val); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * The maximum inbound HTLC value in flight towards sender, in milli-satoshi - */ - public long get_max_htlc_value_in_flight_msat() { - long ret = bindings.OpenChannel_get_max_htlc_value_in_flight_msat(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * The maximum inbound HTLC value in flight towards sender, in milli-satoshi - */ - public void set_max_htlc_value_in_flight_msat(long val) { - bindings.OpenChannel_set_max_htlc_value_in_flight_msat(this.ptr, val); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - /** * The minimum value unencumbered by HTLCs for the counterparty to keep in the channel */ @@ -150,295 +82,18 @@ public class OpenChannel extends CommonBase { Reference.reachabilityFence(val); } - /** - * The minimum HTLC size incoming to sender, in milli-satoshi - */ - public long get_htlc_minimum_msat() { - long ret = bindings.OpenChannel_get_htlc_minimum_msat(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * The minimum HTLC size incoming to sender, in milli-satoshi - */ - public void set_htlc_minimum_msat(long val) { - bindings.OpenChannel_set_htlc_minimum_msat(this.ptr, val); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * The feerate per 1000-weight of sender generated transactions, until updated by - * [`UpdateFee`] - */ - public int get_feerate_per_kw() { - int ret = bindings.OpenChannel_get_feerate_per_kw(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * The feerate per 1000-weight of sender generated transactions, until updated by - * [`UpdateFee`] - */ - public void set_feerate_per_kw(int val) { - bindings.OpenChannel_set_feerate_per_kw(this.ptr, val); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * The number of blocks which the counterparty will have to wait to claim on-chain funds if - * they broadcast a commitment transaction - */ - public short get_to_self_delay() { - short ret = bindings.OpenChannel_get_to_self_delay(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * The number of blocks which the counterparty will have to wait to claim on-chain funds if - * they broadcast a commitment transaction - */ - public void set_to_self_delay(short val) { - bindings.OpenChannel_set_to_self_delay(this.ptr, val); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * The maximum number of inbound HTLCs towards sender - */ - public short get_max_accepted_htlcs() { - short ret = bindings.OpenChannel_get_max_accepted_htlcs(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * The maximum number of inbound HTLCs towards sender - */ - public void set_max_accepted_htlcs(short val) { - bindings.OpenChannel_set_max_accepted_htlcs(this.ptr, val); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * The sender's key controlling the funding transaction - */ - public byte[] get_funding_pubkey() { - byte[] ret = bindings.OpenChannel_get_funding_pubkey(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * The sender's key controlling the funding transaction - */ - public void set_funding_pubkey(byte[] val) { - bindings.OpenChannel_set_funding_pubkey(this.ptr, InternalUtils.check_arr_len(val, 33)); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * Used to derive a revocation key for transactions broadcast by counterparty - */ - public byte[] get_revocation_basepoint() { - byte[] ret = bindings.OpenChannel_get_revocation_basepoint(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * Used to derive a revocation key for transactions broadcast by counterparty - */ - public void set_revocation_basepoint(byte[] val) { - bindings.OpenChannel_set_revocation_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33)); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * A payment key to sender for transactions broadcast by counterparty - */ - public byte[] get_payment_point() { - byte[] ret = bindings.OpenChannel_get_payment_point(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * A payment key to sender for transactions broadcast by counterparty - */ - public void set_payment_point(byte[] val) { - bindings.OpenChannel_set_payment_point(this.ptr, InternalUtils.check_arr_len(val, 33)); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * Used to derive a payment key to sender for transactions broadcast by sender - */ - public byte[] get_delayed_payment_basepoint() { - byte[] ret = bindings.OpenChannel_get_delayed_payment_basepoint(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * Used to derive a payment key to sender for transactions broadcast by sender - */ - public void set_delayed_payment_basepoint(byte[] val) { - bindings.OpenChannel_set_delayed_payment_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33)); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * Used to derive an HTLC payment key to sender - */ - public byte[] get_htlc_basepoint() { - byte[] ret = bindings.OpenChannel_get_htlc_basepoint(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * Used to derive an HTLC payment key to sender - */ - public void set_htlc_basepoint(byte[] val) { - bindings.OpenChannel_set_htlc_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33)); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * The first to-be-broadcast-by-sender transaction's per commitment point - */ - public byte[] get_first_per_commitment_point() { - byte[] ret = bindings.OpenChannel_get_first_per_commitment_point(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * The first to-be-broadcast-by-sender transaction's per commitment point - */ - public void set_first_per_commitment_point(byte[] val) { - bindings.OpenChannel_set_first_per_commitment_point(this.ptr, InternalUtils.check_arr_len(val, 33)); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * The channel flags to be used - */ - public byte get_channel_flags() { - byte ret = bindings.OpenChannel_get_channel_flags(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * The channel flags to be used - */ - public void set_channel_flags(byte val) { - bindings.OpenChannel_set_channel_flags(this.ptr, val); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * A request to pre-set the to-sender output's `scriptPubkey` for when we collaboratively close - */ - public Option_CVec_u8ZZ get_shutdown_scriptpubkey() { - long ret = bindings.OpenChannel_get_shutdown_scriptpubkey(this.ptr); - Reference.reachabilityFence(this); - if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Option_CVec_u8ZZ ret_hu_conv = org.ldk.structs.Option_CVec_u8ZZ.constr_from_ptr(ret); - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; - return ret_hu_conv; - } - - /** - * A request to pre-set the to-sender output's `scriptPubkey` for when we collaboratively close - */ - public void set_shutdown_scriptpubkey(org.ldk.structs.Option_CVec_u8ZZ val) { - bindings.OpenChannel_set_shutdown_scriptpubkey(this.ptr, val.ptr); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - if (this != null) { this.ptrs_to.add(val); }; - } - - /** - * The channel type that this channel will represent - * - * If this is `None`, we derive the channel type from the intersection of our - * feature bits with our counterparty's feature bits from the [`Init`] message. - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None - */ - @Nullable - public ChannelTypeFeatures get_channel_type() { - long ret = bindings.OpenChannel_get_channel_type(this.ptr); - Reference.reachabilityFence(this); - if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.ChannelTypeFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelTypeFeatures(null, ret); } - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; - return ret_hu_conv; - } - - /** - * The channel type that this channel will represent - * - * If this is `None`, we derive the channel type from the intersection of our - * feature bits with our counterparty's feature bits from the [`Init`] message. - * - * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None - */ - public void set_channel_type(@Nullable org.ldk.structs.ChannelTypeFeatures val) { - bindings.OpenChannel_set_channel_type(this.ptr, val == null ? 0 : val.ptr); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - if (this != null) { this.ptrs_to.add(val); }; - } - /** * Constructs a new OpenChannel given each field - * - * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public static OpenChannel of(byte[] chain_hash_arg, byte[] temporary_channel_id_arg, long funding_satoshis_arg, long push_msat_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long channel_reserve_satoshis_arg, long htlc_minimum_msat_arg, int feerate_per_kw_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_point_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, byte channel_flags_arg, org.ldk.structs.Option_CVec_u8ZZ shutdown_scriptpubkey_arg, @Nullable org.ldk.structs.ChannelTypeFeatures channel_type_arg) { - long ret = bindings.OpenChannel_new(InternalUtils.check_arr_len(chain_hash_arg, 32), InternalUtils.check_arr_len(temporary_channel_id_arg, 32), funding_satoshis_arg, push_msat_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, feerate_per_kw_arg, to_self_delay_arg, max_accepted_htlcs_arg, InternalUtils.check_arr_len(funding_pubkey_arg, 33), InternalUtils.check_arr_len(revocation_basepoint_arg, 33), InternalUtils.check_arr_len(payment_point_arg, 33), InternalUtils.check_arr_len(delayed_payment_basepoint_arg, 33), InternalUtils.check_arr_len(htlc_basepoint_arg, 33), InternalUtils.check_arr_len(first_per_commitment_point_arg, 33), channel_flags_arg, shutdown_scriptpubkey_arg.ptr, channel_type_arg == null ? 0 : channel_type_arg.ptr); - Reference.reachabilityFence(chain_hash_arg); - Reference.reachabilityFence(temporary_channel_id_arg); - Reference.reachabilityFence(funding_satoshis_arg); + public static OpenChannel of(org.ldk.structs.CommonOpenChannelFields common_fields_arg, long push_msat_arg, long channel_reserve_satoshis_arg) { + long ret = bindings.OpenChannel_new(common_fields_arg.ptr, push_msat_arg, channel_reserve_satoshis_arg); + Reference.reachabilityFence(common_fields_arg); Reference.reachabilityFence(push_msat_arg); - Reference.reachabilityFence(dust_limit_satoshis_arg); - Reference.reachabilityFence(max_htlc_value_in_flight_msat_arg); Reference.reachabilityFence(channel_reserve_satoshis_arg); - Reference.reachabilityFence(htlc_minimum_msat_arg); - Reference.reachabilityFence(feerate_per_kw_arg); - Reference.reachabilityFence(to_self_delay_arg); - Reference.reachabilityFence(max_accepted_htlcs_arg); - Reference.reachabilityFence(funding_pubkey_arg); - Reference.reachabilityFence(revocation_basepoint_arg); - Reference.reachabilityFence(payment_point_arg); - Reference.reachabilityFence(delayed_payment_basepoint_arg); - Reference.reachabilityFence(htlc_basepoint_arg); - Reference.reachabilityFence(first_per_commitment_point_arg); - Reference.reachabilityFence(channel_flags_arg); - Reference.reachabilityFence(shutdown_scriptpubkey_arg); - Reference.reachabilityFence(channel_type_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.OpenChannel ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OpenChannel(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(shutdown_scriptpubkey_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_type_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(common_fields_arg); }; return ret_hu_conv; } @@ -478,7 +133,7 @@ public class OpenChannel extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.OpenChannel b) { - boolean ret = bindings.OpenChannel_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.OpenChannel_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/OpenChannelV2.java b/src/main/java/org/ldk/structs/OpenChannelV2.java index 93fad935..114e942a 100644 --- a/src/main/java/org/ldk/structs/OpenChannelV2.java +++ b/src/main/java/org/ldk/structs/OpenChannelV2.java @@ -23,39 +23,25 @@ public class OpenChannelV2 extends CommonBase { } /** - * The genesis hash of the blockchain where the channel is to be opened + * Common fields of `open_channel(2)`-like messages */ - public byte[] get_chain_hash() { - byte[] ret = bindings.OpenChannelV2_get_chain_hash(this.ptr); + public CommonOpenChannelFields get_common_fields() { + long ret = bindings.OpenChannelV2_get_common_fields(this.ptr); Reference.reachabilityFence(this); - return ret; - } - - /** - * The genesis hash of the blockchain where the channel is to be opened - */ - public void set_chain_hash(byte[] val) { - bindings.OpenChannelV2_set_chain_hash(this.ptr, InternalUtils.check_arr_len(val, 32)); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * A temporary channel ID derived using a zeroed out value for the channel acceptor's revocation basepoint - */ - public byte[] get_temporary_channel_id() { - byte[] ret = bindings.OpenChannelV2_get_temporary_channel_id(this.ptr); - Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.CommonOpenChannelFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommonOpenChannelFields(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** - * A temporary channel ID derived using a zeroed out value for the channel acceptor's revocation basepoint + * Common fields of `open_channel(2)`-like messages */ - public void set_temporary_channel_id(byte[] val) { - bindings.OpenChannelV2_set_temporary_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); + public void set_common_fields(org.ldk.structs.CommonOpenChannelFields val) { + bindings.OpenChannelV2_set_common_fields(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** @@ -76,136 +62,6 @@ public class OpenChannelV2 extends CommonBase { Reference.reachabilityFence(val); } - /** - * The feerate for the commitment transaction set by the channel initiator - */ - public int get_commitment_feerate_sat_per_1000_weight() { - int ret = bindings.OpenChannelV2_get_commitment_feerate_sat_per_1000_weight(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * The feerate for the commitment transaction set by the channel initiator - */ - public void set_commitment_feerate_sat_per_1000_weight(int val) { - bindings.OpenChannelV2_set_commitment_feerate_sat_per_1000_weight(this.ptr, val); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * Part of the channel value contributed by the channel initiator - */ - public long get_funding_satoshis() { - long ret = bindings.OpenChannelV2_get_funding_satoshis(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * Part of the channel value contributed by the channel initiator - */ - public void set_funding_satoshis(long val) { - bindings.OpenChannelV2_set_funding_satoshis(this.ptr, val); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * The threshold below which outputs on transactions broadcast by the channel initiator will be - * omitted - */ - public long get_dust_limit_satoshis() { - long ret = bindings.OpenChannelV2_get_dust_limit_satoshis(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * The threshold below which outputs on transactions broadcast by the channel initiator will be - * omitted - */ - public void set_dust_limit_satoshis(long val) { - bindings.OpenChannelV2_set_dust_limit_satoshis(this.ptr, val); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * The maximum inbound HTLC value in flight towards channel initiator, in milli-satoshi - */ - public long get_max_htlc_value_in_flight_msat() { - long ret = bindings.OpenChannelV2_get_max_htlc_value_in_flight_msat(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * The maximum inbound HTLC value in flight towards channel initiator, in milli-satoshi - */ - public void set_max_htlc_value_in_flight_msat(long val) { - bindings.OpenChannelV2_set_max_htlc_value_in_flight_msat(this.ptr, val); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * The minimum HTLC size incoming to channel initiator, in milli-satoshi - */ - public long get_htlc_minimum_msat() { - long ret = bindings.OpenChannelV2_get_htlc_minimum_msat(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * The minimum HTLC size incoming to channel initiator, in milli-satoshi - */ - public void set_htlc_minimum_msat(long val) { - bindings.OpenChannelV2_set_htlc_minimum_msat(this.ptr, val); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * The number of blocks which the counterparty will have to wait to claim on-chain funds if they - * broadcast a commitment transaction - */ - public short get_to_self_delay() { - short ret = bindings.OpenChannelV2_get_to_self_delay(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * The number of blocks which the counterparty will have to wait to claim on-chain funds if they - * broadcast a commitment transaction - */ - public void set_to_self_delay(short val) { - bindings.OpenChannelV2_set_to_self_delay(this.ptr, val); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * The maximum number of inbound HTLCs towards channel initiator - */ - public short get_max_accepted_htlcs() { - short ret = bindings.OpenChannelV2_get_max_accepted_htlcs(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * The maximum number of inbound HTLCs towards channel initiator - */ - public void set_max_accepted_htlcs(short val) { - bindings.OpenChannelV2_set_max_accepted_htlcs(this.ptr, val); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - /** * The locktime for the funding transaction */ @@ -224,116 +80,6 @@ public class OpenChannelV2 extends CommonBase { Reference.reachabilityFence(val); } - /** - * The channel initiator's key controlling the funding transaction - */ - public byte[] get_funding_pubkey() { - byte[] ret = bindings.OpenChannelV2_get_funding_pubkey(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * The channel initiator's key controlling the funding transaction - */ - public void set_funding_pubkey(byte[] val) { - bindings.OpenChannelV2_set_funding_pubkey(this.ptr, InternalUtils.check_arr_len(val, 33)); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * Used to derive a revocation key for transactions broadcast by counterparty - */ - public byte[] get_revocation_basepoint() { - byte[] ret = bindings.OpenChannelV2_get_revocation_basepoint(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * Used to derive a revocation key for transactions broadcast by counterparty - */ - public void set_revocation_basepoint(byte[] val) { - bindings.OpenChannelV2_set_revocation_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33)); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * A payment key to channel initiator for transactions broadcast by counterparty - */ - public byte[] get_payment_basepoint() { - byte[] ret = bindings.OpenChannelV2_get_payment_basepoint(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * A payment key to channel initiator for transactions broadcast by counterparty - */ - public void set_payment_basepoint(byte[] val) { - bindings.OpenChannelV2_set_payment_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33)); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * Used to derive a payment key to channel initiator for transactions broadcast by channel - * initiator - */ - public byte[] get_delayed_payment_basepoint() { - byte[] ret = bindings.OpenChannelV2_get_delayed_payment_basepoint(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * Used to derive a payment key to channel initiator for transactions broadcast by channel - * initiator - */ - public void set_delayed_payment_basepoint(byte[] val) { - bindings.OpenChannelV2_set_delayed_payment_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33)); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * Used to derive an HTLC payment key to channel initiator - */ - public byte[] get_htlc_basepoint() { - byte[] ret = bindings.OpenChannelV2_get_htlc_basepoint(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * Used to derive an HTLC payment key to channel initiator - */ - public void set_htlc_basepoint(byte[] val) { - bindings.OpenChannelV2_set_htlc_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33)); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * The first to-be-broadcast-by-channel-initiator transaction's per commitment point - */ - public byte[] get_first_per_commitment_point() { - byte[] ret = bindings.OpenChannelV2_get_first_per_commitment_point(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * The first to-be-broadcast-by-channel-initiator transaction's per commitment point - */ - public void set_first_per_commitment_point(byte[] val) { - bindings.OpenChannelV2_set_first_per_commitment_point(this.ptr, InternalUtils.check_arr_len(val, 33)); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - /** * The second to-be-broadcast-by-channel-initiator transaction's per commitment point */ @@ -352,79 +98,6 @@ public class OpenChannelV2 extends CommonBase { Reference.reachabilityFence(val); } - /** - * Channel flags - */ - public byte get_channel_flags() { - byte ret = bindings.OpenChannelV2_get_channel_flags(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * Channel flags - */ - public void set_channel_flags(byte val) { - bindings.OpenChannelV2_set_channel_flags(this.ptr, val); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - } - - /** - * Optionally, a request to pre-set the to-channel-initiator output's scriptPubkey for when we - * collaboratively close - */ - public Option_CVec_u8ZZ get_shutdown_scriptpubkey() { - long ret = bindings.OpenChannelV2_get_shutdown_scriptpubkey(this.ptr); - Reference.reachabilityFence(this); - if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Option_CVec_u8ZZ ret_hu_conv = org.ldk.structs.Option_CVec_u8ZZ.constr_from_ptr(ret); - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; - return ret_hu_conv; - } - - /** - * Optionally, a request to pre-set the to-channel-initiator output's scriptPubkey for when we - * collaboratively close - */ - public void set_shutdown_scriptpubkey(org.ldk.structs.Option_CVec_u8ZZ val) { - bindings.OpenChannelV2_set_shutdown_scriptpubkey(this.ptr, val.ptr); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - if (this != null) { this.ptrs_to.add(val); }; - } - - /** - * The channel type that this channel will represent. If none is set, we derive the channel - * type from the intersection of our feature bits with our counterparty's feature bits from - * the Init message. - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None - */ - @Nullable - public ChannelTypeFeatures get_channel_type() { - long ret = bindings.OpenChannelV2_get_channel_type(this.ptr); - Reference.reachabilityFence(this); - if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.ChannelTypeFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelTypeFeatures(null, ret); } - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; - return ret_hu_conv; - } - - /** - * The channel type that this channel will represent. If none is set, we derive the channel - * type from the intersection of our feature bits with our counterparty's feature bits from - * the Init message. - * - * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None - */ - public void set_channel_type(@Nullable org.ldk.structs.ChannelTypeFeatures val) { - bindings.OpenChannelV2_set_channel_type(this.ptr, val == null ? 0 : val.ptr); - Reference.reachabilityFence(this); - Reference.reachabilityFence(val); - if (this != null) { this.ptrs_to.add(val); }; - } - /** * Optionally, a requirement that only confirmed inputs can be added */ @@ -445,38 +118,18 @@ public class OpenChannelV2 extends CommonBase { /** * Constructs a new OpenChannelV2 given each field - * - * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public static OpenChannelV2 of(byte[] chain_hash_arg, byte[] temporary_channel_id_arg, int funding_feerate_sat_per_1000_weight_arg, int commitment_feerate_sat_per_1000_weight_arg, long funding_satoshis_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long htlc_minimum_msat_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, int locktime_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_basepoint_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, byte[] second_per_commitment_point_arg, byte channel_flags_arg, org.ldk.structs.Option_CVec_u8ZZ shutdown_scriptpubkey_arg, @Nullable org.ldk.structs.ChannelTypeFeatures channel_type_arg, org.ldk.enums.COption_NoneZ require_confirmed_inputs_arg) { - long ret = bindings.OpenChannelV2_new(InternalUtils.check_arr_len(chain_hash_arg, 32), InternalUtils.check_arr_len(temporary_channel_id_arg, 32), funding_feerate_sat_per_1000_weight_arg, commitment_feerate_sat_per_1000_weight_arg, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, to_self_delay_arg, max_accepted_htlcs_arg, locktime_arg, InternalUtils.check_arr_len(funding_pubkey_arg, 33), InternalUtils.check_arr_len(revocation_basepoint_arg, 33), InternalUtils.check_arr_len(payment_basepoint_arg, 33), InternalUtils.check_arr_len(delayed_payment_basepoint_arg, 33), InternalUtils.check_arr_len(htlc_basepoint_arg, 33), InternalUtils.check_arr_len(first_per_commitment_point_arg, 33), InternalUtils.check_arr_len(second_per_commitment_point_arg, 33), channel_flags_arg, shutdown_scriptpubkey_arg.ptr, channel_type_arg == null ? 0 : channel_type_arg.ptr, require_confirmed_inputs_arg); - Reference.reachabilityFence(chain_hash_arg); - Reference.reachabilityFence(temporary_channel_id_arg); + public static OpenChannelV2 of(org.ldk.structs.CommonOpenChannelFields common_fields_arg, int funding_feerate_sat_per_1000_weight_arg, int locktime_arg, byte[] second_per_commitment_point_arg, org.ldk.enums.COption_NoneZ require_confirmed_inputs_arg) { + long ret = bindings.OpenChannelV2_new(common_fields_arg.ptr, funding_feerate_sat_per_1000_weight_arg, locktime_arg, InternalUtils.check_arr_len(second_per_commitment_point_arg, 33), require_confirmed_inputs_arg); + Reference.reachabilityFence(common_fields_arg); Reference.reachabilityFence(funding_feerate_sat_per_1000_weight_arg); - Reference.reachabilityFence(commitment_feerate_sat_per_1000_weight_arg); - Reference.reachabilityFence(funding_satoshis_arg); - Reference.reachabilityFence(dust_limit_satoshis_arg); - Reference.reachabilityFence(max_htlc_value_in_flight_msat_arg); - Reference.reachabilityFence(htlc_minimum_msat_arg); - Reference.reachabilityFence(to_self_delay_arg); - Reference.reachabilityFence(max_accepted_htlcs_arg); Reference.reachabilityFence(locktime_arg); - Reference.reachabilityFence(funding_pubkey_arg); - Reference.reachabilityFence(revocation_basepoint_arg); - Reference.reachabilityFence(payment_basepoint_arg); - Reference.reachabilityFence(delayed_payment_basepoint_arg); - Reference.reachabilityFence(htlc_basepoint_arg); - Reference.reachabilityFence(first_per_commitment_point_arg); Reference.reachabilityFence(second_per_commitment_point_arg); - Reference.reachabilityFence(channel_flags_arg); - Reference.reachabilityFence(shutdown_scriptpubkey_arg); - Reference.reachabilityFence(channel_type_arg); Reference.reachabilityFence(require_confirmed_inputs_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.OpenChannelV2 ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OpenChannelV2(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(shutdown_scriptpubkey_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_type_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(common_fields_arg); }; return ret_hu_conv; } @@ -516,7 +169,7 @@ public class OpenChannelV2 extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.OpenChannelV2 b) { - boolean ret = bindings.OpenChannelV2_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.OpenChannelV2_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/Option_AmountZ.java b/src/main/java/org/ldk/structs/Option_AmountZ.java new file mode 100644 index 00000000..e65d45d2 --- /dev/null +++ b/src/main/java/org/ldk/structs/Option_AmountZ.java @@ -0,0 +1,97 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + + +/** + * An enum which can either contain a crate::lightning::offers::offer::Amount or not + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class Option_AmountZ extends CommonBase { + private Option_AmountZ(Object _dummy, long ptr) { super(ptr); } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + if (ptr != 0) { bindings.COption_AmountZ_free(ptr); } + } + static Option_AmountZ constr_from_ptr(long ptr) { + bindings.LDKCOption_AmountZ raw_val = bindings.LDKCOption_AmountZ_ref_from_ptr(ptr); + if (raw_val.getClass() == bindings.LDKCOption_AmountZ.Some.class) { + return new Some(ptr, (bindings.LDKCOption_AmountZ.Some)raw_val); + } + if (raw_val.getClass() == bindings.LDKCOption_AmountZ.None.class) { + return new None(ptr, (bindings.LDKCOption_AmountZ.None)raw_val); + } + assert false; return null; // Unreachable without extending the (internal) bindings interface + } + + /** + * When we're in this state, this COption_AmountZ contains a crate::lightning::offers::offer::Amount + */ + public final static class Some extends Option_AmountZ { + public final org.ldk.structs.Amount some; + private Some(long ptr, bindings.LDKCOption_AmountZ.Some obj) { + super(null, ptr); + long some = obj.some; + org.ldk.structs.Amount some_hu_conv = org.ldk.structs.Amount.constr_from_ptr(some); + if (some_hu_conv != null) { some_hu_conv.ptrs_to.add(this); }; + this.some = some_hu_conv; + } + } + /** + * When we're in this state, this COption_AmountZ contains nothing + */ + public final static class None extends Option_AmountZ { + private None(long ptr, bindings.LDKCOption_AmountZ.None obj) { + super(null, ptr); + } + } + /** + * Constructs a new COption_AmountZ containing a crate::lightning::offers::offer::Amount + */ + public static Option_AmountZ some(org.ldk.structs.Amount o) { + long ret = bindings.COption_AmountZ_some(o.ptr); + Reference.reachabilityFence(o); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); }; + return ret_hu_conv; + } + + /** + * Constructs a new COption_AmountZ containing nothing + */ + public static Option_AmountZ none() { + long ret = bindings.COption_AmountZ_none(); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + + long clone_ptr() { + long ret = bindings.COption_AmountZ_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a new COption_AmountZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Option_AmountZ clone() { + long ret = bindings.COption_AmountZ_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/Option_BigEndianScalarZ.java b/src/main/java/org/ldk/structs/Option_BigEndianScalarZ.java index 6b6df6a0..36995059 100644 --- a/src/main/java/org/ldk/structs/Option_BigEndianScalarZ.java +++ b/src/main/java/org/ldk/structs/Option_BigEndianScalarZ.java @@ -53,13 +53,12 @@ public class Option_BigEndianScalarZ extends CommonBase { /** * Constructs a new COption_BigEndianScalarZ containing a crate::c_types::BigEndianScalar */ - public static Option_BigEndianScalarZ some(byte[] o_big_endian_bytes) { - long ret = bindings.COption_BigEndianScalarZ_some(bindings.BigEndianScalar_new(InternalUtils.check_arr_len(o_big_endian_bytes, 32))); - Reference.reachabilityFence(o_big_endian_bytes); + public static Option_BigEndianScalarZ some(org.ldk.structs.BigEndianScalar o) { + long ret = bindings.COption_BigEndianScalarZ_some(o.ptr); + Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Option_BigEndianScalarZ ret_hu_conv = org.ldk.structs.Option_BigEndianScalarZ.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; - ; return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.java b/src/main/java/org/ldk/structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.java index 55decc80..2c858205 100644 --- a/src/main/java/org/ldk/structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.java +++ b/src/main/java/org/ldk/structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.java @@ -55,7 +55,7 @@ public class Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ extends CommonBase { * Constructs a new COption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ containing a crate::c_types::derived::C2Tuple__u1632_u1632Z */ public static Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ some(org.ldk.structs.TwoTuple__u1632_u1632Z o) { - long ret = bindings.COption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ_some(o != null ? o.ptr : 0); + long ret = bindings.COption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ_some(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ ret_hu_conv = org.ldk.structs.Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Option_C2Tuple_u64u16ZZ.java b/src/main/java/org/ldk/structs/Option_C2Tuple_u64u16ZZ.java index bfb9fd98..8f56bd90 100644 --- a/src/main/java/org/ldk/structs/Option_C2Tuple_u64u16ZZ.java +++ b/src/main/java/org/ldk/structs/Option_C2Tuple_u64u16ZZ.java @@ -55,7 +55,7 @@ public class Option_C2Tuple_u64u16ZZ extends CommonBase { * Constructs a new COption_C2Tuple_u64u16ZZ containing a crate::c_types::derived::C2Tuple_u64u16Z */ public static Option_C2Tuple_u64u16ZZ some(org.ldk.structs.TwoTuple_u64u16Z o) { - long ret = bindings.COption_C2Tuple_u64u16ZZ_some(o != null ? o.ptr : 0); + long ret = bindings.COption_C2Tuple_u64u16ZZ_some(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Option_C2Tuple_u64u16ZZ ret_hu_conv = org.ldk.structs.Option_C2Tuple_u64u16ZZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Option_C2Tuple_u64u64ZZ.java b/src/main/java/org/ldk/structs/Option_C2Tuple_u64u64ZZ.java index c8ba0da5..d0a1ab80 100644 --- a/src/main/java/org/ldk/structs/Option_C2Tuple_u64u64ZZ.java +++ b/src/main/java/org/ldk/structs/Option_C2Tuple_u64u64ZZ.java @@ -55,7 +55,7 @@ public class Option_C2Tuple_u64u64ZZ extends CommonBase { * Constructs a new COption_C2Tuple_u64u64ZZ containing a crate::c_types::derived::C2Tuple_u64u64Z */ public static Option_C2Tuple_u64u64ZZ some(org.ldk.structs.TwoTuple_u64u64Z o) { - long ret = bindings.COption_C2Tuple_u64u64ZZ_some(o != null ? o.ptr : 0); + long ret = bindings.COption_C2Tuple_u64u64ZZ_some(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Option_C2Tuple_u64u64ZZ ret_hu_conv = org.ldk.structs.Option_C2Tuple_u64u64ZZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.java b/src/main/java/org/ldk/structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.java index 4e9f8d38..9d1971e6 100644 --- a/src/main/java/org/ldk/structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.java +++ b/src/main/java/org/ldk/structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.java @@ -55,7 +55,7 @@ public class Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ exte * Constructs a new COption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ containing a crate::c_types::derived::C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ */ public static Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ some(org.ldk.structs.ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ o) { - long ret = bindings.COption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_some(o != null ? o.ptr : 0); + long ret = bindings.COption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_some(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret_hu_conv = org.ldk.structs.Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Option_ECDSASignatureZ.java b/src/main/java/org/ldk/structs/Option_ECDSASignatureZ.java new file mode 100644 index 00000000..ebdc68d0 --- /dev/null +++ b/src/main/java/org/ldk/structs/Option_ECDSASignatureZ.java @@ -0,0 +1,93 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + + +/** + * An enum which can either contain a crate::c_types::ECDSASignature or not + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class Option_ECDSASignatureZ extends CommonBase { + private Option_ECDSASignatureZ(Object _dummy, long ptr) { super(ptr); } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + if (ptr != 0) { bindings.COption_ECDSASignatureZ_free(ptr); } + } + static Option_ECDSASignatureZ constr_from_ptr(long ptr) { + bindings.LDKCOption_ECDSASignatureZ raw_val = bindings.LDKCOption_ECDSASignatureZ_ref_from_ptr(ptr); + if (raw_val.getClass() == bindings.LDKCOption_ECDSASignatureZ.Some.class) { + return new Some(ptr, (bindings.LDKCOption_ECDSASignatureZ.Some)raw_val); + } + if (raw_val.getClass() == bindings.LDKCOption_ECDSASignatureZ.None.class) { + return new None(ptr, (bindings.LDKCOption_ECDSASignatureZ.None)raw_val); + } + assert false; return null; // Unreachable without extending the (internal) bindings interface + } + + /** + * When we're in this state, this COption_ECDSASignatureZ contains a crate::c_types::ECDSASignature + */ + public final static class Some extends Option_ECDSASignatureZ { + public final byte[] some; + private Some(long ptr, bindings.LDKCOption_ECDSASignatureZ.Some obj) { + super(null, ptr); + this.some = obj.some; + } + } + /** + * When we're in this state, this COption_ECDSASignatureZ contains nothing + */ + public final static class None extends Option_ECDSASignatureZ { + private None(long ptr, bindings.LDKCOption_ECDSASignatureZ.None obj) { + super(null, ptr); + } + } + /** + * Constructs a new COption_ECDSASignatureZ containing a crate::c_types::ECDSASignature + */ + public static Option_ECDSASignatureZ some(byte[] o) { + long ret = bindings.COption_ECDSASignatureZ_some(InternalUtils.check_arr_len(o, 64)); + Reference.reachabilityFence(o); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_ECDSASignatureZ ret_hu_conv = org.ldk.structs.Option_ECDSASignatureZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Constructs a new COption_ECDSASignatureZ containing nothing + */ + public static Option_ECDSASignatureZ none() { + long ret = bindings.COption_ECDSASignatureZ_none(); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_ECDSASignatureZ ret_hu_conv = org.ldk.structs.Option_ECDSASignatureZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + + long clone_ptr() { + long ret = bindings.COption_ECDSASignatureZ_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a new COption_ECDSASignatureZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Option_ECDSASignatureZ clone() { + long ret = bindings.COption_ECDSASignatureZ_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_ECDSASignatureZ ret_hu_conv = org.ldk.structs.Option_ECDSASignatureZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/Option_PaymentContextZ.java b/src/main/java/org/ldk/structs/Option_PaymentContextZ.java new file mode 100644 index 00000000..89dec36f --- /dev/null +++ b/src/main/java/org/ldk/structs/Option_PaymentContextZ.java @@ -0,0 +1,97 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + + +/** + * An enum which can either contain a crate::lightning::blinded_path::payment::PaymentContext or not + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class Option_PaymentContextZ extends CommonBase { + private Option_PaymentContextZ(Object _dummy, long ptr) { super(ptr); } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + if (ptr != 0) { bindings.COption_PaymentContextZ_free(ptr); } + } + static Option_PaymentContextZ constr_from_ptr(long ptr) { + bindings.LDKCOption_PaymentContextZ raw_val = bindings.LDKCOption_PaymentContextZ_ref_from_ptr(ptr); + if (raw_val.getClass() == bindings.LDKCOption_PaymentContextZ.Some.class) { + return new Some(ptr, (bindings.LDKCOption_PaymentContextZ.Some)raw_val); + } + if (raw_val.getClass() == bindings.LDKCOption_PaymentContextZ.None.class) { + return new None(ptr, (bindings.LDKCOption_PaymentContextZ.None)raw_val); + } + assert false; return null; // Unreachable without extending the (internal) bindings interface + } + + /** + * When we're in this state, this COption_PaymentContextZ contains a crate::lightning::blinded_path::payment::PaymentContext + */ + public final static class Some extends Option_PaymentContextZ { + public final org.ldk.structs.PaymentContext some; + private Some(long ptr, bindings.LDKCOption_PaymentContextZ.Some obj) { + super(null, ptr); + long some = obj.some; + org.ldk.structs.PaymentContext some_hu_conv = org.ldk.structs.PaymentContext.constr_from_ptr(some); + if (some_hu_conv != null) { some_hu_conv.ptrs_to.add(this); }; + this.some = some_hu_conv; + } + } + /** + * When we're in this state, this COption_PaymentContextZ contains nothing + */ + public final static class None extends Option_PaymentContextZ { + private None(long ptr, bindings.LDKCOption_PaymentContextZ.None obj) { + super(null, ptr); + } + } + /** + * Constructs a new COption_PaymentContextZ containing a crate::lightning::blinded_path::payment::PaymentContext + */ + public static Option_PaymentContextZ some(org.ldk.structs.PaymentContext o) { + long ret = bindings.COption_PaymentContextZ_some(o.ptr); + Reference.reachabilityFence(o); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_PaymentContextZ ret_hu_conv = org.ldk.structs.Option_PaymentContextZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); }; + return ret_hu_conv; + } + + /** + * Constructs a new COption_PaymentContextZ containing nothing + */ + public static Option_PaymentContextZ none() { + long ret = bindings.COption_PaymentContextZ_none(); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_PaymentContextZ ret_hu_conv = org.ldk.structs.Option_PaymentContextZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + + long clone_ptr() { + long ret = bindings.COption_PaymentContextZ_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a new COption_PaymentContextZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Option_PaymentContextZ clone() { + long ret = bindings.COption_PaymentContextZ_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_PaymentContextZ ret_hu_conv = org.ldk.structs.Option_PaymentContextZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/Option_QuantityZ.java b/src/main/java/org/ldk/structs/Option_QuantityZ.java new file mode 100644 index 00000000..e457bb1a --- /dev/null +++ b/src/main/java/org/ldk/structs/Option_QuantityZ.java @@ -0,0 +1,97 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + + +/** + * An enum which can either contain a crate::lightning::offers::offer::Quantity or not + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class Option_QuantityZ extends CommonBase { + private Option_QuantityZ(Object _dummy, long ptr) { super(ptr); } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + if (ptr != 0) { bindings.COption_QuantityZ_free(ptr); } + } + static Option_QuantityZ constr_from_ptr(long ptr) { + bindings.LDKCOption_QuantityZ raw_val = bindings.LDKCOption_QuantityZ_ref_from_ptr(ptr); + if (raw_val.getClass() == bindings.LDKCOption_QuantityZ.Some.class) { + return new Some(ptr, (bindings.LDKCOption_QuantityZ.Some)raw_val); + } + if (raw_val.getClass() == bindings.LDKCOption_QuantityZ.None.class) { + return new None(ptr, (bindings.LDKCOption_QuantityZ.None)raw_val); + } + assert false; return null; // Unreachable without extending the (internal) bindings interface + } + + /** + * When we're in this state, this COption_QuantityZ contains a crate::lightning::offers::offer::Quantity + */ + public final static class Some extends Option_QuantityZ { + public final org.ldk.structs.Quantity some; + private Some(long ptr, bindings.LDKCOption_QuantityZ.Some obj) { + super(null, ptr); + long some = obj.some; + org.ldk.structs.Quantity some_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(some); + if (some_hu_conv != null) { some_hu_conv.ptrs_to.add(this); }; + this.some = some_hu_conv; + } + } + /** + * When we're in this state, this COption_QuantityZ contains nothing + */ + public final static class None extends Option_QuantityZ { + private None(long ptr, bindings.LDKCOption_QuantityZ.None obj) { + super(null, ptr); + } + } + /** + * Constructs a new COption_QuantityZ containing a crate::lightning::offers::offer::Quantity + */ + public static Option_QuantityZ some(org.ldk.structs.Quantity o) { + long ret = bindings.COption_QuantityZ_some(o.ptr); + Reference.reachabilityFence(o); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_QuantityZ ret_hu_conv = org.ldk.structs.Option_QuantityZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); }; + return ret_hu_conv; + } + + /** + * Constructs a new COption_QuantityZ containing nothing + */ + public static Option_QuantityZ none() { + long ret = bindings.COption_QuantityZ_none(); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_QuantityZ ret_hu_conv = org.ldk.structs.Option_QuantityZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + + long clone_ptr() { + long ret = bindings.COption_QuantityZ_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a new COption_QuantityZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Option_QuantityZ clone() { + long ret = bindings.COption_QuantityZ_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_QuantityZ ret_hu_conv = org.ldk.structs.Option_QuantityZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/OutPoint.java b/src/main/java/org/ldk/structs/OutPoint.java index 22125dd3..c3b6137c 100644 --- a/src/main/java/org/ldk/structs/OutPoint.java +++ b/src/main/java/org/ldk/structs/OutPoint.java @@ -96,7 +96,7 @@ public class OutPoint extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.OutPoint b) { - boolean ret = bindings.OutPoint_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.OutPoint_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; @@ -119,15 +119,6 @@ public class OutPoint extends CommonBase { @Override public int hashCode() { return (int)this.hash(); } - /** - * Convert an `OutPoint` to a lightning channel id. - */ - public byte[] to_channel_id() { - byte[] ret = bindings.OutPoint_to_channel_id(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - /** * Serialize the OutPoint object into a byte array which can be read by OutPoint_read */ diff --git a/src/main/java/org/ldk/structs/OutputSpendStatus.java b/src/main/java/org/ldk/structs/OutputSpendStatus.java new file mode 100644 index 00000000..ed4f80d0 --- /dev/null +++ b/src/main/java/org/ldk/structs/OutputSpendStatus.java @@ -0,0 +1,206 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + + +/** + * The current status of the output spend. + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class OutputSpendStatus extends CommonBase { + private OutputSpendStatus(Object _dummy, long ptr) { super(ptr); } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + if (ptr != 0) { bindings.OutputSpendStatus_free(ptr); } + } + static OutputSpendStatus constr_from_ptr(long ptr) { + bindings.LDKOutputSpendStatus raw_val = bindings.LDKOutputSpendStatus_ref_from_ptr(ptr); + if (raw_val.getClass() == bindings.LDKOutputSpendStatus.PendingInitialBroadcast.class) { + return new PendingInitialBroadcast(ptr, (bindings.LDKOutputSpendStatus.PendingInitialBroadcast)raw_val); + } + if (raw_val.getClass() == bindings.LDKOutputSpendStatus.PendingFirstConfirmation.class) { + return new PendingFirstConfirmation(ptr, (bindings.LDKOutputSpendStatus.PendingFirstConfirmation)raw_val); + } + if (raw_val.getClass() == bindings.LDKOutputSpendStatus.PendingThresholdConfirmations.class) { + return new PendingThresholdConfirmations(ptr, (bindings.LDKOutputSpendStatus.PendingThresholdConfirmations)raw_val); + } + assert false; return null; // Unreachable without extending the (internal) bindings interface + } + + /** + * The output is tracked but an initial spending transaction hasn't been generated and + * broadcasted yet. + */ + public final static class PendingInitialBroadcast extends OutputSpendStatus { + /** + * The height at which we will first generate and broadcast a spending transaction. + */ + public final org.ldk.structs.Option_u32Z delayed_until_height; + private PendingInitialBroadcast(long ptr, bindings.LDKOutputSpendStatus.PendingInitialBroadcast obj) { + super(null, ptr); + long delayed_until_height = obj.delayed_until_height; + org.ldk.structs.Option_u32Z delayed_until_height_hu_conv = org.ldk.structs.Option_u32Z.constr_from_ptr(delayed_until_height); + if (delayed_until_height_hu_conv != null) { delayed_until_height_hu_conv.ptrs_to.add(this); }; + this.delayed_until_height = delayed_until_height_hu_conv; + } + } + /** + * A transaction spending the output has been broadcasted but is pending its first confirmation on-chain. + */ + public final static class PendingFirstConfirmation extends OutputSpendStatus { + /** + * The hash of the chain tip when we first broadcast a transaction spending this output. + */ + public final byte[] first_broadcast_hash; + /** + * The best height when we last broadcast a transaction spending this output. + */ + public final int latest_broadcast_height; + /** + * The transaction spending this output we last broadcasted. + */ + public final byte[] latest_spending_tx; + private PendingFirstConfirmation(long ptr, bindings.LDKOutputSpendStatus.PendingFirstConfirmation obj) { + super(null, ptr); + this.first_broadcast_hash = obj.first_broadcast_hash; + this.latest_broadcast_height = obj.latest_broadcast_height; + this.latest_spending_tx = obj.latest_spending_tx; + } + } + /** + * A transaction spending the output has been confirmed on-chain but will be tracked until it + * reaches [`ANTI_REORG_DELAY`] confirmations. + */ + public final static class PendingThresholdConfirmations extends OutputSpendStatus { + /** + * The hash of the chain tip when we first broadcast a transaction spending this output. + */ + public final byte[] first_broadcast_hash; + /** + * The best height when we last broadcast a transaction spending this output. + */ + public final int latest_broadcast_height; + /** + * The transaction spending this output we saw confirmed on-chain. + */ + public final byte[] latest_spending_tx; + /** + * The height at which the spending transaction was confirmed. + */ + public final int confirmation_height; + /** + * The hash of the block in which the spending transaction was confirmed. + */ + public final byte[] confirmation_hash; + private PendingThresholdConfirmations(long ptr, bindings.LDKOutputSpendStatus.PendingThresholdConfirmations obj) { + super(null, ptr); + this.first_broadcast_hash = obj.first_broadcast_hash; + this.latest_broadcast_height = obj.latest_broadcast_height; + this.latest_spending_tx = obj.latest_spending_tx; + this.confirmation_height = obj.confirmation_height; + this.confirmation_hash = obj.confirmation_hash; + } + } + long clone_ptr() { + long ret = bindings.OutputSpendStatus_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a copy of the OutputSpendStatus + */ + public OutputSpendStatus clone() { + long ret = bindings.OutputSpendStatus_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OutputSpendStatus ret_hu_conv = org.ldk.structs.OutputSpendStatus.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new PendingInitialBroadcast-variant OutputSpendStatus + */ + public static OutputSpendStatus pending_initial_broadcast(org.ldk.structs.Option_u32Z delayed_until_height) { + long ret = bindings.OutputSpendStatus_pending_initial_broadcast(delayed_until_height.ptr); + Reference.reachabilityFence(delayed_until_height); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OutputSpendStatus ret_hu_conv = org.ldk.structs.OutputSpendStatus.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(delayed_until_height); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new PendingFirstConfirmation-variant OutputSpendStatus + */ + public static OutputSpendStatus pending_first_confirmation(byte[] first_broadcast_hash, int latest_broadcast_height, byte[] latest_spending_tx) { + long ret = bindings.OutputSpendStatus_pending_first_confirmation(InternalUtils.check_arr_len(first_broadcast_hash, 32), latest_broadcast_height, latest_spending_tx); + Reference.reachabilityFence(first_broadcast_hash); + Reference.reachabilityFence(latest_broadcast_height); + Reference.reachabilityFence(latest_spending_tx); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OutputSpendStatus ret_hu_conv = org.ldk.structs.OutputSpendStatus.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new PendingThresholdConfirmations-variant OutputSpendStatus + */ + public static OutputSpendStatus pending_threshold_confirmations(byte[] first_broadcast_hash, int latest_broadcast_height, byte[] latest_spending_tx, int confirmation_height, byte[] confirmation_hash) { + long ret = bindings.OutputSpendStatus_pending_threshold_confirmations(InternalUtils.check_arr_len(first_broadcast_hash, 32), latest_broadcast_height, latest_spending_tx, confirmation_height, InternalUtils.check_arr_len(confirmation_hash, 32)); + Reference.reachabilityFence(first_broadcast_hash); + Reference.reachabilityFence(latest_broadcast_height); + Reference.reachabilityFence(latest_spending_tx); + Reference.reachabilityFence(confirmation_height); + Reference.reachabilityFence(confirmation_hash); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OutputSpendStatus ret_hu_conv = org.ldk.structs.OutputSpendStatus.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Checks if two OutputSpendStatuss contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + */ + public boolean eq(org.ldk.structs.OutputSpendStatus b) { + boolean ret = bindings.OutputSpendStatus_eq(this.ptr, b.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(b); + return ret; + } + + @Override public boolean equals(Object o) { + if (!(o instanceof OutputSpendStatus)) return false; + return this.eq((OutputSpendStatus)o); + } + /** + * Serialize the OutputSpendStatus object into a byte array which can be read by OutputSpendStatus_read + */ + public byte[] write() { + byte[] ret = bindings.OutputSpendStatus_write(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Read a OutputSpendStatus from a byte array, created by OutputSpendStatus_write + */ + public static Result_OutputSpendStatusDecodeErrorZ read(byte[] ser) { + long ret = bindings.OutputSpendStatus_read(ser); + Reference.reachabilityFence(ser); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OutputSpendStatusDecodeErrorZ ret_hu_conv = Result_OutputSpendStatusDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/OutputSpender.java b/src/main/java/org/ldk/structs/OutputSpender.java new file mode 100644 index 00000000..325ba25d --- /dev/null +++ b/src/main/java/org/ldk/structs/OutputSpender.java @@ -0,0 +1,116 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + +/** + * A trait that describes a wallet capable of creating a spending [`Transaction`] from a set of + * [`SpendableOutputDescriptor`]s. + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class OutputSpender extends CommonBase { + final bindings.LDKOutputSpender bindings_instance; + OutputSpender(Object _dummy, long ptr) { super(ptr); bindings_instance = null; } + private OutputSpender(bindings.LDKOutputSpender arg) { + super(bindings.LDKOutputSpender_new(arg)); + this.ptrs_to.add(arg); + this.bindings_instance = arg; + } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + if (ptr != 0) { bindings.OutputSpender_free(ptr); } super.finalize(); + } + /** + * Destroys the object, freeing associated resources. After this call, any access + * to this object may result in a SEGFAULT or worse. + * + * You should generally NEVER call this method. You should let the garbage collector + * do this for you when it finalizes objects. However, it may be useful for types + * which represent locks and should be closed immediately to avoid holding locks + * until the GC runs. + */ + public void destroy() { + if (ptr != 0) { bindings.OutputSpender_free(ptr); } + ptr = 0; + } + public static interface OutputSpenderInterface { + /** + * Creates a [`Transaction`] which spends the given descriptors to the given outputs, plus an + * output to the given change destination (if sufficient change value remains). The + * transaction will have a feerate, at least, of the given value. + * + * The `locktime` argument is used to set the transaction's locktime. If `None`, the + * transaction will have a locktime of 0. It it recommended to set this to the current block + * height to avoid fee sniping, unless you have some specific reason to use a different + * locktime. + * + * Returns `Err(())` if the output value is greater than the input value minus required fee, + * if a descriptor was duplicated, or if an output descriptor `script_pubkey` + * does not match the one we can spend. + */ + Result_TransactionNoneZ spend_spendable_outputs(SpendableOutputDescriptor[] descriptors, TxOut[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, Option_u32Z locktime); + } + private static class LDKOutputSpenderHolder { OutputSpender held; } + public static OutputSpender new_impl(OutputSpenderInterface arg) { + final LDKOutputSpenderHolder impl_holder = new LDKOutputSpenderHolder(); + impl_holder.held = new OutputSpender(new bindings.LDKOutputSpender() { + @Override public long spend_spendable_outputs(long[] descriptors, long[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, long locktime) { + int descriptors_conv_27_len = descriptors.length; + SpendableOutputDescriptor[] descriptors_conv_27_arr = new SpendableOutputDescriptor[descriptors_conv_27_len]; + for (int b = 0; b < descriptors_conv_27_len; b++) { + long descriptors_conv_27 = descriptors[b]; + org.ldk.structs.SpendableOutputDescriptor descriptors_conv_27_hu_conv = org.ldk.structs.SpendableOutputDescriptor.constr_from_ptr(descriptors_conv_27); + if (descriptors_conv_27_hu_conv != null) { descriptors_conv_27_hu_conv.ptrs_to.add(this); }; + descriptors_conv_27_arr[b] = descriptors_conv_27_hu_conv; + } + int outputs_conv_7_len = outputs.length; + TxOut[] outputs_conv_7_arr = new TxOut[outputs_conv_7_len]; + for (int h = 0; h < outputs_conv_7_len; h++) { + long outputs_conv_7 = outputs[h]; + TxOut outputs_conv_7_conv = new TxOut(null, outputs_conv_7); + outputs_conv_7_arr[h] = outputs_conv_7_conv; + } + org.ldk.structs.Option_u32Z locktime_hu_conv = org.ldk.structs.Option_u32Z.constr_from_ptr(locktime); + if (locktime_hu_conv != null) { locktime_hu_conv.ptrs_to.add(this); }; + Result_TransactionNoneZ ret = arg.spend_spendable_outputs(descriptors_conv_27_arr, outputs_conv_7_arr, change_destination_script, feerate_sat_per_1000_weight, locktime_hu_conv); + Reference.reachabilityFence(arg); + long result = ret.clone_ptr(); + return result; + } + }); + return impl_holder.held; + } + /** + * Creates a [`Transaction`] which spends the given descriptors to the given outputs, plus an + * output to the given change destination (if sufficient change value remains). The + * transaction will have a feerate, at least, of the given value. + * + * The `locktime` argument is used to set the transaction's locktime. If `None`, the + * transaction will have a locktime of 0. It it recommended to set this to the current block + * height to avoid fee sniping, unless you have some specific reason to use a different + * locktime. + * + * Returns `Err(())` if the output value is greater than the input value minus required fee, + * if a descriptor was duplicated, or if an output descriptor `script_pubkey` + * does not match the one we can spend. + */ + public Result_TransactionNoneZ spend_spendable_outputs(SpendableOutputDescriptor[] descriptors, TxOut[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, org.ldk.structs.Option_u32Z locktime) { + long ret = bindings.OutputSpender_spend_spendable_outputs(this.ptr, descriptors != null ? Arrays.stream(descriptors).mapToLong(descriptors_conv_27 -> descriptors_conv_27.ptr).toArray() : null, outputs != null ? Arrays.stream(outputs).mapToLong(outputs_conv_7 -> outputs_conv_7.ptr).toArray() : null, change_destination_script, feerate_sat_per_1000_weight, locktime.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(descriptors); + Reference.reachabilityFence(outputs); + Reference.reachabilityFence(change_destination_script); + Reference.reachabilityFence(feerate_sat_per_1000_weight); + Reference.reachabilityFence(locktime); + if (ret >= 0 && ret <= 4096) { return null; } + Result_TransactionNoneZ ret_hu_conv = Result_TransactionNoneZ.constr_from_ptr(ret); + for (SpendableOutputDescriptor descriptors_conv_27: descriptors) { if (this != null) { this.ptrs_to.add(descriptors_conv_27); }; }; + if (this != null) { this.ptrs_to.add(locktime); }; + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/OutputSweeper.java b/src/main/java/org/ldk/structs/OutputSweeper.java new file mode 100644 index 00000000..a42f8340 --- /dev/null +++ b/src/main/java/org/ldk/structs/OutputSweeper.java @@ -0,0 +1,181 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + + +/** + * A utility that keeps track of [`SpendableOutputDescriptor`]s, persists them in a given + * [`KVStore`] and regularly retries sweeping them based on a callback given to the constructor + * methods. + * + * Users should call [`Self::track_spendable_outputs`] for any [`SpendableOutputDescriptor`]s received via [`Event::SpendableOutputs`]. + * + * This needs to be notified of chain state changes either via its [`Listen`] or [`Confirm`] + * implementation and hence has to be connected with the utilized chain data sources. + * + * If chain data is provided via the [`Confirm`] interface or via filtered blocks, users are + * required to give their chain data sources (i.e., [`Filter`] implementation) to the respective + * constructor. + * + * [`Event::SpendableOutputs`]: crate::events::Event::SpendableOutputs + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class OutputSweeper extends CommonBase { + OutputSweeper(Object _dummy, long ptr) { super(ptr); } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + if (ptr != 0) { bindings.OutputSweeper_free(ptr); } + } + + /** + * Constructs a new [`OutputSweeper`]. + * + * If chain data is provided via the [`Confirm`] interface or via filtered blocks, users also + * need to register their [`Filter`] implementation via the given `chain_data_source`. + */ + public static OutputSweeper of(org.ldk.structs.BestBlock best_block, org.ldk.structs.BroadcasterInterface broadcaster, org.ldk.structs.FeeEstimator fee_estimator, org.ldk.structs.Option_FilterZ chain_data_source, org.ldk.structs.OutputSpender output_spender, org.ldk.structs.ChangeDestinationSource change_destination_source, org.ldk.structs.KVStore kv_store, org.ldk.structs.Logger logger) { + long ret = bindings.OutputSweeper_new(best_block.ptr, broadcaster.ptr, fee_estimator.ptr, chain_data_source.ptr, output_spender.ptr, change_destination_source.ptr, kv_store.ptr, logger.ptr); + Reference.reachabilityFence(best_block); + Reference.reachabilityFence(broadcaster); + Reference.reachabilityFence(fee_estimator); + Reference.reachabilityFence(chain_data_source); + Reference.reachabilityFence(output_spender); + Reference.reachabilityFence(change_destination_source); + Reference.reachabilityFence(kv_store); + Reference.reachabilityFence(logger); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OutputSweeper ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OutputSweeper(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(best_block); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(broadcaster); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(fee_estimator); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(chain_data_source); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(output_spender); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(change_destination_source); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(kv_store); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(logger); }; + return ret_hu_conv; + } + + /** + * Tells the sweeper to track the given outputs descriptors. + * + * Usually, this should be called based on the values emitted by the + * [`Event::SpendableOutputs`]. + * + * The given `exclude_static_outputs` flag controls whether the sweeper will filter out + * [`SpendableOutputDescriptor::StaticOutput`]s, which may be handled directly by the on-chain + * wallet implementation. + * + * If `delay_until_height` is set, we will delay the spending until the respective block + * height is reached. This can be used to batch spends, e.g., to reduce on-chain fees. + * + * Returns `Err` on persistence failure, in which case the call may be safely retried. + * + * [`Event::SpendableOutputs`]: crate::events::Event::SpendableOutputs + * + * Note that channel_id (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public Result_NoneNoneZ track_spendable_outputs(SpendableOutputDescriptor[] output_descriptors, @Nullable org.ldk.structs.ChannelId channel_id, boolean exclude_static_outputs, org.ldk.structs.Option_u32Z delay_until_height) { + long ret = bindings.OutputSweeper_track_spendable_outputs(this.ptr, output_descriptors != null ? Arrays.stream(output_descriptors).mapToLong(output_descriptors_conv_27 -> output_descriptors_conv_27.ptr).toArray() : null, channel_id == null ? 0 : channel_id.ptr, exclude_static_outputs, delay_until_height.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(output_descriptors); + Reference.reachabilityFence(channel_id); + Reference.reachabilityFence(exclude_static_outputs); + Reference.reachabilityFence(delay_until_height); + if (ret >= 0 && ret <= 4096) { return null; } + Result_NoneNoneZ ret_hu_conv = Result_NoneNoneZ.constr_from_ptr(ret); + for (SpendableOutputDescriptor output_descriptors_conv_27: output_descriptors) { if (this != null) { this.ptrs_to.add(output_descriptors_conv_27); }; }; + if (this != null) { this.ptrs_to.add(channel_id); }; + if (this != null) { this.ptrs_to.add(delay_until_height); }; + return ret_hu_conv; + } + + /** + * Returns a list of the currently tracked spendable outputs. + */ + public TrackedSpendableOutput[] tracked_spendable_outputs() { + long[] ret = bindings.OutputSweeper_tracked_spendable_outputs(this.ptr); + Reference.reachabilityFence(this); + int ret_conv_24_len = ret.length; + TrackedSpendableOutput[] ret_conv_24_arr = new TrackedSpendableOutput[ret_conv_24_len]; + for (int y = 0; y < ret_conv_24_len; y++) { + long ret_conv_24 = ret[y]; + org.ldk.structs.TrackedSpendableOutput ret_conv_24_hu_conv = null; if (ret_conv_24 < 0 || ret_conv_24 > 4096) { ret_conv_24_hu_conv = new org.ldk.structs.TrackedSpendableOutput(null, ret_conv_24); } + if (ret_conv_24_hu_conv != null) { ret_conv_24_hu_conv.ptrs_to.add(this); }; + ret_conv_24_arr[y] = ret_conv_24_hu_conv; + } + return ret_conv_24_arr; + } + + /** + * Gets the latest best block which was connected either via the [`Listen`] or + * [`Confirm`] interfaces. + */ + public BestBlock current_best_block() { + long ret = bindings.OutputSweeper_current_best_block(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.BestBlock ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.BestBlock(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Constructs a new Listen which calls the relevant methods on this_arg. + * This copies the `inner` pointer in this_arg and thus the returned Listen must be freed before this_arg is + */ + public Listen as_Listen() { + long ret = bindings.OutputSweeper_as_Listen(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + Listen ret_hu_conv = new Listen(null, ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Constructs a new Confirm which calls the relevant methods on this_arg. + * This copies the `inner` pointer in this_arg and thus the returned Confirm must be freed before this_arg is + */ + public Confirm as_Confirm() { + long ret = bindings.OutputSweeper_as_Confirm(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + Confirm ret_hu_conv = new Confirm(null, ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Read a OutputSweeper from a byte array, created by OutputSweeper_write + */ + public static Result_OutputSweeperDecodeErrorZ read(byte[] ser, org.ldk.structs.BroadcasterInterface arg_a, org.ldk.structs.FeeEstimator arg_b, org.ldk.structs.Option_FilterZ arg_c, org.ldk.structs.OutputSpender arg_d, org.ldk.structs.ChangeDestinationSource arg_e, org.ldk.structs.KVStore arg_f, org.ldk.structs.Logger arg_g) { + long ret = bindings.OutputSweeper_read(ser, arg_a.ptr, arg_b.ptr, arg_c.ptr, arg_d.ptr, arg_e.ptr, arg_f.ptr, arg_g.ptr); + Reference.reachabilityFence(ser); + Reference.reachabilityFence(arg_a); + Reference.reachabilityFence(arg_b); + Reference.reachabilityFence(arg_c); + Reference.reachabilityFence(arg_d); + Reference.reachabilityFence(arg_e); + Reference.reachabilityFence(arg_f); + Reference.reachabilityFence(arg_g); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OutputSweeperDecodeErrorZ ret_hu_conv = Result_OutputSweeperDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_a); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_b); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_c); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_d); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_e); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_f); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_g); }; + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/P2PGossipSync.java b/src/main/java/org/ldk/structs/P2PGossipSync.java index 57544fdc..31647390 100644 --- a/src/main/java/org/ldk/structs/P2PGossipSync.java +++ b/src/main/java/org/ldk/structs/P2PGossipSync.java @@ -31,7 +31,7 @@ public class P2PGossipSync extends CommonBase { * correct, and the announcement is signed with channel owners' keys. */ public static P2PGossipSync of(org.ldk.structs.NetworkGraph network_graph, org.ldk.structs.Option_UtxoLookupZ utxo_lookup, org.ldk.structs.Logger logger) { - long ret = bindings.P2PGossipSync_new(network_graph == null ? 0 : network_graph.ptr, utxo_lookup.ptr, logger.ptr); + long ret = bindings.P2PGossipSync_new(network_graph.ptr, utxo_lookup.ptr, logger.ptr); Reference.reachabilityFence(network_graph); Reference.reachabilityFence(utxo_lookup); Reference.reachabilityFence(logger); diff --git a/src/main/java/org/ldk/structs/Packet.java b/src/main/java/org/ldk/structs/Packet.java index ada9a681..68f4f834 100644 --- a/src/main/java/org/ldk/structs/Packet.java +++ b/src/main/java/org/ldk/structs/Packet.java @@ -145,7 +145,7 @@ public class Packet extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.Packet b) { - boolean ret = bindings.Packet_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.Packet_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/ParseOrSemanticError.java b/src/main/java/org/ldk/structs/ParseOrSemanticError.java index 8e002737..66fd0ed6 100644 --- a/src/main/java/org/ldk/structs/ParseOrSemanticError.java +++ b/src/main/java/org/ldk/structs/ParseOrSemanticError.java @@ -103,7 +103,7 @@ public class ParseOrSemanticError extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public boolean eq(org.ldk.structs.ParseOrSemanticError b) { - boolean ret = bindings.ParseOrSemanticError_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.ParseOrSemanticError_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); return ret; diff --git a/src/main/java/org/ldk/structs/Path.java b/src/main/java/org/ldk/structs/Path.java index e7b777d4..72b6a875 100644 --- a/src/main/java/org/ldk/structs/Path.java +++ b/src/main/java/org/ldk/structs/Path.java @@ -42,7 +42,7 @@ public class Path extends CommonBase { * The list of unblinded hops in this [`Path`]. Must be at least length one. */ public void set_hops(RouteHop[] val) { - bindings.Path_set_hops(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_10 -> val_conv_10 == null ? 0 : val_conv_10.ptr).toArray() : null); + bindings.Path_set_hops(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_10 -> val_conv_10.ptr).toArray() : null); Reference.reachabilityFence(this); Reference.reachabilityFence(val); for (RouteHop val_conv_10: val) { if (this != null) { this.ptrs_to.add(val_conv_10); }; }; @@ -81,7 +81,7 @@ public class Path extends CommonBase { * Note that blinded_tail_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ public static Path of(RouteHop[] hops_arg, @Nullable org.ldk.structs.BlindedTail blinded_tail_arg) { - long ret = bindings.Path_new(hops_arg != null ? Arrays.stream(hops_arg).mapToLong(hops_arg_conv_10 -> hops_arg_conv_10 == null ? 0 : hops_arg_conv_10.ptr).toArray() : null, blinded_tail_arg == null ? 0 : blinded_tail_arg.ptr); + long ret = bindings.Path_new(hops_arg != null ? Arrays.stream(hops_arg).mapToLong(hops_arg_conv_10 -> hops_arg_conv_10.ptr).toArray() : null, blinded_tail_arg == null ? 0 : blinded_tail_arg.ptr); Reference.reachabilityFence(hops_arg); Reference.reachabilityFence(blinded_tail_arg); if (ret >= 0 && ret <= 4096) { return null; } @@ -128,7 +128,7 @@ public class Path extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.Path b) { - boolean ret = bindings.Path_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.Path_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/PathFailure.java b/src/main/java/org/ldk/structs/PathFailure.java index 67266244..7c631d80 100644 --- a/src/main/java/org/ldk/structs/PathFailure.java +++ b/src/main/java/org/ldk/structs/PathFailure.java @@ -120,7 +120,7 @@ public class PathFailure extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public boolean eq(org.ldk.structs.PathFailure b) { - boolean ret = bindings.PathFailure_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.PathFailure_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); return ret; diff --git a/src/main/java/org/ldk/structs/Payee.java b/src/main/java/org/ldk/structs/Payee.java index 74dad1a5..bf515f7a 100644 --- a/src/main/java/org/ldk/structs/Payee.java +++ b/src/main/java/org/ldk/structs/Payee.java @@ -137,7 +137,7 @@ public class Payee extends CommonBase { * Utility method to constructs a new Blinded-variant Payee */ public static Payee blinded(TwoTuple_BlindedPayInfoBlindedPathZ[] route_hints, org.ldk.structs.Bolt12InvoiceFeatures features) { - long ret = bindings.Payee_blinded(route_hints != null ? Arrays.stream(route_hints).mapToLong(route_hints_conv_37 -> route_hints_conv_37 != null ? route_hints_conv_37.ptr : 0).toArray() : null, features == null ? 0 : features.ptr); + long ret = bindings.Payee_blinded(route_hints != null ? Arrays.stream(route_hints).mapToLong(route_hints_conv_37 -> route_hints_conv_37.ptr).toArray() : null, features.ptr); Reference.reachabilityFence(route_hints); Reference.reachabilityFence(features); if (ret >= 0 && ret <= 4096) { return null; } @@ -151,7 +151,7 @@ public class Payee extends CommonBase { * Utility method to constructs a new Clear-variant Payee */ public static Payee clear(byte[] node_id, RouteHint[] route_hints, org.ldk.structs.Bolt11InvoiceFeatures features, int final_cltv_expiry_delta) { - long ret = bindings.Payee_clear(InternalUtils.check_arr_len(node_id, 33), route_hints != null ? Arrays.stream(route_hints).mapToLong(route_hints_conv_11 -> route_hints_conv_11 == null ? 0 : route_hints_conv_11.ptr).toArray() : null, features == null ? 0 : features.ptr, final_cltv_expiry_delta); + long ret = bindings.Payee_clear(InternalUtils.check_arr_len(node_id, 33), route_hints != null ? Arrays.stream(route_hints).mapToLong(route_hints_conv_11 -> route_hints_conv_11.ptr).toArray() : null, features.ptr, final_cltv_expiry_delta); Reference.reachabilityFence(node_id); Reference.reachabilityFence(route_hints); Reference.reachabilityFence(features); @@ -181,7 +181,7 @@ public class Payee extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public boolean eq(org.ldk.structs.Payee b) { - boolean ret = bindings.Payee_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.Payee_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); return ret; diff --git a/src/main/java/org/ldk/structs/PayeePubKey.java b/src/main/java/org/ldk/structs/PayeePubKey.java index 53ad74f3..26053802 100644 --- a/src/main/java/org/ldk/structs/PayeePubKey.java +++ b/src/main/java/org/ldk/structs/PayeePubKey.java @@ -80,7 +80,7 @@ public class PayeePubKey extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.PayeePubKey b) { - boolean ret = bindings.PayeePubKey_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.PayeePubKey_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/PaymentContext.java b/src/main/java/org/ldk/structs/PaymentContext.java new file mode 100644 index 00000000..0204f15c --- /dev/null +++ b/src/main/java/org/ldk/structs/PaymentContext.java @@ -0,0 +1,175 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + + +/** + * The context of an inbound payment, which is included in a [`BlindedPath`] via [`ReceiveTlvs`] + * and surfaced in [`PaymentPurpose`]. + * + * [`BlindedPath`]: crate::blinded_path::BlindedPath + * [`PaymentPurpose`]: crate::events::PaymentPurpose + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class PaymentContext extends CommonBase { + private PaymentContext(Object _dummy, long ptr) { super(ptr); } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + if (ptr != 0) { bindings.PaymentContext_free(ptr); } + } + static PaymentContext constr_from_ptr(long ptr) { + bindings.LDKPaymentContext raw_val = bindings.LDKPaymentContext_ref_from_ptr(ptr); + if (raw_val.getClass() == bindings.LDKPaymentContext.Unknown.class) { + return new Unknown(ptr, (bindings.LDKPaymentContext.Unknown)raw_val); + } + if (raw_val.getClass() == bindings.LDKPaymentContext.Bolt12Offer.class) { + return new Bolt12Offer(ptr, (bindings.LDKPaymentContext.Bolt12Offer)raw_val); + } + if (raw_val.getClass() == bindings.LDKPaymentContext.Bolt12Refund.class) { + return new Bolt12Refund(ptr, (bindings.LDKPaymentContext.Bolt12Refund)raw_val); + } + assert false; return null; // Unreachable without extending the (internal) bindings interface + } + + /** + * The payment context was unknown. + */ + public final static class Unknown extends PaymentContext { + public final org.ldk.structs.UnknownPaymentContext unknown; + private Unknown(long ptr, bindings.LDKPaymentContext.Unknown obj) { + super(null, ptr); + long unknown = obj.unknown; + org.ldk.structs.UnknownPaymentContext unknown_hu_conv = null; if (unknown < 0 || unknown > 4096) { unknown_hu_conv = new org.ldk.structs.UnknownPaymentContext(null, unknown); } + if (unknown_hu_conv != null) { unknown_hu_conv.ptrs_to.add(this); }; + this.unknown = unknown_hu_conv; + } + } + /** + * The payment was made for an invoice requested from a BOLT 12 [`Offer`]. + * + * [`Offer`]: crate::offers::offer::Offer + */ + public final static class Bolt12Offer extends PaymentContext { + public final org.ldk.structs.Bolt12OfferContext bolt12_offer; + private Bolt12Offer(long ptr, bindings.LDKPaymentContext.Bolt12Offer obj) { + super(null, ptr); + long bolt12_offer = obj.bolt12_offer; + org.ldk.structs.Bolt12OfferContext bolt12_offer_hu_conv = null; if (bolt12_offer < 0 || bolt12_offer > 4096) { bolt12_offer_hu_conv = new org.ldk.structs.Bolt12OfferContext(null, bolt12_offer); } + if (bolt12_offer_hu_conv != null) { bolt12_offer_hu_conv.ptrs_to.add(this); }; + this.bolt12_offer = bolt12_offer_hu_conv; + } + } + /** + * The payment was made for an invoice sent for a BOLT 12 [`Refund`]. + * + * [`Refund`]: crate::offers::refund::Refund + */ + public final static class Bolt12Refund extends PaymentContext { + public final org.ldk.structs.Bolt12RefundContext bolt12_refund; + private Bolt12Refund(long ptr, bindings.LDKPaymentContext.Bolt12Refund obj) { + super(null, ptr); + long bolt12_refund = obj.bolt12_refund; + org.ldk.structs.Bolt12RefundContext bolt12_refund_hu_conv = null; if (bolt12_refund < 0 || bolt12_refund > 4096) { bolt12_refund_hu_conv = new org.ldk.structs.Bolt12RefundContext(null, bolt12_refund); } + if (bolt12_refund_hu_conv != null) { bolt12_refund_hu_conv.ptrs_to.add(this); }; + this.bolt12_refund = bolt12_refund_hu_conv; + } + } + long clone_ptr() { + long ret = bindings.PaymentContext_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a copy of the PaymentContext + */ + public PaymentContext clone() { + long ret = bindings.PaymentContext_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.PaymentContext ret_hu_conv = org.ldk.structs.PaymentContext.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new Unknown-variant PaymentContext + */ + public static PaymentContext unknown(org.ldk.structs.UnknownPaymentContext a) { + long ret = bindings.PaymentContext_unknown(a.ptr); + Reference.reachabilityFence(a); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.PaymentContext ret_hu_conv = org.ldk.structs.PaymentContext.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(a); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new Bolt12Offer-variant PaymentContext + */ + public static PaymentContext bolt12_offer(org.ldk.structs.Bolt12OfferContext a) { + long ret = bindings.PaymentContext_bolt12_offer(a.ptr); + Reference.reachabilityFence(a); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.PaymentContext ret_hu_conv = org.ldk.structs.PaymentContext.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(a); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new Bolt12Refund-variant PaymentContext + */ + public static PaymentContext bolt12_refund(org.ldk.structs.Bolt12RefundContext a) { + long ret = bindings.PaymentContext_bolt12_refund(a.ptr); + Reference.reachabilityFence(a); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.PaymentContext ret_hu_conv = org.ldk.structs.PaymentContext.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(a); }; + return ret_hu_conv; + } + + /** + * Checks if two PaymentContexts contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + */ + public boolean eq(org.ldk.structs.PaymentContext b) { + boolean ret = bindings.PaymentContext_eq(this.ptr, b.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(b); + return ret; + } + + @Override public boolean equals(Object o) { + if (!(o instanceof PaymentContext)) return false; + return this.eq((PaymentContext)o); + } + /** + * Serialize the PaymentContext object into a byte array which can be read by PaymentContext_read + */ + public byte[] write() { + byte[] ret = bindings.PaymentContext_write(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Read a PaymentContext from a byte array, created by PaymentContext_write + */ + public static Result_PaymentContextDecodeErrorZ read(byte[] ser) { + long ret = bindings.PaymentContext_read(ser); + Reference.reachabilityFence(ser); + if (ret >= 0 && ret <= 4096) { return null; } + Result_PaymentContextDecodeErrorZ ret_hu_conv = Result_PaymentContextDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/PaymentParameters.java b/src/main/java/org/ldk/structs/PaymentParameters.java index edf8d24c..4be6c024 100644 --- a/src/main/java/org/ldk/structs/PaymentParameters.java +++ b/src/main/java/org/ldk/structs/PaymentParameters.java @@ -250,7 +250,7 @@ public class PaymentParameters extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.PaymentParameters b) { - boolean ret = bindings.PaymentParameters_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.PaymentParameters_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; @@ -328,7 +328,7 @@ public class PaymentParameters extends CommonBase { * [`PaymentParameters::expiry_time`]. */ public static PaymentParameters from_bolt12_invoice(org.ldk.structs.Bolt12Invoice invoice) { - long ret = bindings.PaymentParameters_from_bolt12_invoice(invoice == null ? 0 : invoice.ptr); + long ret = bindings.PaymentParameters_from_bolt12_invoice(invoice.ptr); Reference.reachabilityFence(invoice); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.PaymentParameters ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.PaymentParameters(null, ret); } @@ -341,7 +341,7 @@ public class PaymentParameters extends CommonBase { * Creates parameters for paying to a blinded payee from the provided blinded route hints. */ public static PaymentParameters blinded(TwoTuple_BlindedPayInfoBlindedPathZ[] blinded_route_hints) { - long ret = bindings.PaymentParameters_blinded(blinded_route_hints != null ? Arrays.stream(blinded_route_hints).mapToLong(blinded_route_hints_conv_37 -> blinded_route_hints_conv_37 != null ? blinded_route_hints_conv_37.ptr : 0).toArray() : null); + long ret = bindings.PaymentParameters_blinded(blinded_route_hints != null ? Arrays.stream(blinded_route_hints).mapToLong(blinded_route_hints_conv_37 -> blinded_route_hints_conv_37.ptr).toArray() : null); Reference.reachabilityFence(blinded_route_hints); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.PaymentParameters ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.PaymentParameters(null, ret); } diff --git a/src/main/java/org/ldk/structs/PaymentPurpose.java b/src/main/java/org/ldk/structs/PaymentPurpose.java index 4b969dd1..5b915e2f 100644 --- a/src/main/java/org/ldk/structs/PaymentPurpose.java +++ b/src/main/java/org/ldk/structs/PaymentPurpose.java @@ -22,8 +22,14 @@ public class PaymentPurpose extends CommonBase { } static PaymentPurpose constr_from_ptr(long ptr) { bindings.LDKPaymentPurpose raw_val = bindings.LDKPaymentPurpose_ref_from_ptr(ptr); - if (raw_val.getClass() == bindings.LDKPaymentPurpose.InvoicePayment.class) { - return new InvoicePayment(ptr, (bindings.LDKPaymentPurpose.InvoicePayment)raw_val); + if (raw_val.getClass() == bindings.LDKPaymentPurpose.Bolt11InvoicePayment.class) { + return new Bolt11InvoicePayment(ptr, (bindings.LDKPaymentPurpose.Bolt11InvoicePayment)raw_val); + } + if (raw_val.getClass() == bindings.LDKPaymentPurpose.Bolt12OfferPayment.class) { + return new Bolt12OfferPayment(ptr, (bindings.LDKPaymentPurpose.Bolt12OfferPayment)raw_val); + } + if (raw_val.getClass() == bindings.LDKPaymentPurpose.Bolt12RefundPayment.class) { + return new Bolt12RefundPayment(ptr, (bindings.LDKPaymentPurpose.Bolt12RefundPayment)raw_val); } if (raw_val.getClass() == bindings.LDKPaymentPurpose.SpontaneousPayment.class) { return new SpontaneousPayment(ptr, (bindings.LDKPaymentPurpose.SpontaneousPayment)raw_val); @@ -32,13 +38,14 @@ public class PaymentPurpose extends CommonBase { } /** - * Information for receiving a payment that we generated an invoice for. + * A payment for a BOLT 11 invoice. */ - public final static class InvoicePayment extends PaymentPurpose { + public final static class Bolt11InvoicePayment extends PaymentPurpose { /** * The preimage to the payment_hash, if the payment hash (and secret) were fetched via - * [`ChannelManager::create_inbound_payment`]. If provided, this can be handed directly to - * [`ChannelManager::claim_funds`]. + * [`ChannelManager::create_inbound_payment`]. When handling [`Event::PaymentClaimable`], + * this can be passed directly to [`ChannelManager::claim_funds`] to claim the payment. No + * action is needed when seen in [`Event::PaymentClaimed`]. * * [`ChannelManager::create_inbound_payment`]: crate::ln::channelmanager::ChannelManager::create_inbound_payment * [`ChannelManager::claim_funds`]: crate::ln::channelmanager::ChannelManager::claim_funds @@ -57,13 +64,95 @@ public class PaymentPurpose extends CommonBase { * [`ChannelManager::create_inbound_payment_for_hash`]: crate::ln::channelmanager::ChannelManager::create_inbound_payment_for_hash */ public final byte[] payment_secret; - private InvoicePayment(long ptr, bindings.LDKPaymentPurpose.InvoicePayment obj) { + private Bolt11InvoicePayment(long ptr, bindings.LDKPaymentPurpose.Bolt11InvoicePayment obj) { + super(null, ptr); + long payment_preimage = obj.payment_preimage; + org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(payment_preimage); + if (payment_preimage_hu_conv != null) { payment_preimage_hu_conv.ptrs_to.add(this); }; + this.payment_preimage = payment_preimage_hu_conv; + this.payment_secret = obj.payment_secret; + } + } + /** + * A payment for a BOLT 12 [`Offer`]. + * + * [`Offer`]: crate::offers::offer::Offer + */ + public final static class Bolt12OfferPayment extends PaymentPurpose { + /** + * The preimage to the payment hash. When handling [`Event::PaymentClaimable`], this can be + * passed directly to [`ChannelManager::claim_funds`], if provided. No action is needed + * when seen in [`Event::PaymentClaimed`]. + * + * [`ChannelManager::claim_funds`]: crate::ln::channelmanager::ChannelManager::claim_funds + */ + public final org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage; + /** + * The secret used to authenticate the sender to the recipient, preventing a number of + * de-anonymization attacks while routing a payment. + * + * See [`PaymentPurpose::Bolt11InvoicePayment::payment_secret`] for further details. + */ + public final byte[] payment_secret; + /** + * The context of the payment such as information about the corresponding [`Offer`] and + * [`InvoiceRequest`]. + * + * [`Offer`]: crate::offers::offer::Offer + * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest + */ + public final org.ldk.structs.Bolt12OfferContext payment_context; + private Bolt12OfferPayment(long ptr, bindings.LDKPaymentPurpose.Bolt12OfferPayment obj) { + super(null, ptr); + long payment_preimage = obj.payment_preimage; + org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(payment_preimage); + if (payment_preimage_hu_conv != null) { payment_preimage_hu_conv.ptrs_to.add(this); }; + this.payment_preimage = payment_preimage_hu_conv; + this.payment_secret = obj.payment_secret; + long payment_context = obj.payment_context; + org.ldk.structs.Bolt12OfferContext payment_context_hu_conv = null; if (payment_context < 0 || payment_context > 4096) { payment_context_hu_conv = new org.ldk.structs.Bolt12OfferContext(null, payment_context); } + if (payment_context_hu_conv != null) { payment_context_hu_conv.ptrs_to.add(this); }; + this.payment_context = payment_context_hu_conv; + } + } + /** + * A payment for a BOLT 12 [`Refund`]. + * + * [`Refund`]: crate::offers::refund::Refund + */ + public final static class Bolt12RefundPayment extends PaymentPurpose { + /** + * The preimage to the payment hash. When handling [`Event::PaymentClaimable`], this can be + * passed directly to [`ChannelManager::claim_funds`], if provided. No action is needed + * when seen in [`Event::PaymentClaimed`]. + * + * [`ChannelManager::claim_funds`]: crate::ln::channelmanager::ChannelManager::claim_funds + */ + public final org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage; + /** + * The secret used to authenticate the sender to the recipient, preventing a number of + * de-anonymization attacks while routing a payment. + * + * See [`PaymentPurpose::Bolt11InvoicePayment::payment_secret`] for further details. + */ + public final byte[] payment_secret; + /** + * The context of the payment such as information about the corresponding [`Refund`]. + * + * [`Refund`]: crate::offers::refund::Refund + */ + public final org.ldk.structs.Bolt12RefundContext payment_context; + private Bolt12RefundPayment(long ptr, bindings.LDKPaymentPurpose.Bolt12RefundPayment obj) { super(null, ptr); long payment_preimage = obj.payment_preimage; org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(payment_preimage); if (payment_preimage_hu_conv != null) { payment_preimage_hu_conv.ptrs_to.add(this); }; this.payment_preimage = payment_preimage_hu_conv; this.payment_secret = obj.payment_secret; + long payment_context = obj.payment_context; + org.ldk.structs.Bolt12RefundContext payment_context_hu_conv = null; if (payment_context < 0 || payment_context > 4096) { payment_context_hu_conv = new org.ldk.structs.Bolt12RefundContext(null, payment_context); } + if (payment_context_hu_conv != null) { payment_context_hu_conv.ptrs_to.add(this); }; + this.payment_context = payment_context_hu_conv; } } /** @@ -96,16 +185,48 @@ public class PaymentPurpose extends CommonBase { } /** - * Utility method to constructs a new InvoicePayment-variant PaymentPurpose + * Utility method to constructs a new Bolt11InvoicePayment-variant PaymentPurpose + */ + public static PaymentPurpose bolt11_invoice_payment(org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage, byte[] payment_secret) { + long ret = bindings.PaymentPurpose_bolt11_invoice_payment(payment_preimage.ptr, InternalUtils.check_arr_len(payment_secret, 32)); + Reference.reachabilityFence(payment_preimage); + Reference.reachabilityFence(payment_secret); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.PaymentPurpose ret_hu_conv = org.ldk.structs.PaymentPurpose.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(payment_preimage); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new Bolt12OfferPayment-variant PaymentPurpose + */ + public static PaymentPurpose bolt12_offer_payment(org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage, byte[] payment_secret, org.ldk.structs.Bolt12OfferContext payment_context) { + long ret = bindings.PaymentPurpose_bolt12_offer_payment(payment_preimage.ptr, InternalUtils.check_arr_len(payment_secret, 32), payment_context.ptr); + Reference.reachabilityFence(payment_preimage); + Reference.reachabilityFence(payment_secret); + Reference.reachabilityFence(payment_context); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.PaymentPurpose ret_hu_conv = org.ldk.structs.PaymentPurpose.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(payment_preimage); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(payment_context); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new Bolt12RefundPayment-variant PaymentPurpose */ - public static PaymentPurpose invoice_payment(org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage, byte[] payment_secret) { - long ret = bindings.PaymentPurpose_invoice_payment(payment_preimage.ptr, InternalUtils.check_arr_len(payment_secret, 32)); + public static PaymentPurpose bolt12_refund_payment(org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage, byte[] payment_secret, org.ldk.structs.Bolt12RefundContext payment_context) { + long ret = bindings.PaymentPurpose_bolt12_refund_payment(payment_preimage.ptr, InternalUtils.check_arr_len(payment_secret, 32), payment_context.ptr); Reference.reachabilityFence(payment_preimage); Reference.reachabilityFence(payment_secret); + Reference.reachabilityFence(payment_context); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.PaymentPurpose ret_hu_conv = org.ldk.structs.PaymentPurpose.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(payment_preimage); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(payment_context); }; return ret_hu_conv; } @@ -126,7 +247,7 @@ public class PaymentPurpose extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public boolean eq(org.ldk.structs.PaymentPurpose b) { - boolean ret = bindings.PaymentPurpose_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.PaymentPurpose_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); return ret; diff --git a/src/main/java/org/ldk/structs/PaymentSendFailure.java b/src/main/java/org/ldk/structs/PaymentSendFailure.java index 19bf83e5..5805c66b 100644 --- a/src/main/java/org/ldk/structs/PaymentSendFailure.java +++ b/src/main/java/org/ldk/structs/PaymentSendFailure.java @@ -216,7 +216,7 @@ public class PaymentSendFailure extends CommonBase { * Utility method to constructs a new PathParameterError-variant PaymentSendFailure */ public static PaymentSendFailure path_parameter_error(Result_NoneAPIErrorZ[] a) { - long ret = bindings.PaymentSendFailure_path_parameter_error(a != null ? Arrays.stream(a).mapToLong(a_conv_22 -> a_conv_22 != null ? a_conv_22.ptr : 0).toArray() : null); + long ret = bindings.PaymentSendFailure_path_parameter_error(a != null ? Arrays.stream(a).mapToLong(a_conv_22 -> a_conv_22.ptr).toArray() : null); Reference.reachabilityFence(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.PaymentSendFailure ret_hu_conv = org.ldk.structs.PaymentSendFailure.constr_from_ptr(ret); @@ -252,7 +252,7 @@ public class PaymentSendFailure extends CommonBase { * Utility method to constructs a new PartialFailure-variant PaymentSendFailure */ public static PaymentSendFailure partial_failure(Result_NoneAPIErrorZ[] results, org.ldk.structs.RouteParameters failed_paths_retry, byte[] payment_id) { - long ret = bindings.PaymentSendFailure_partial_failure(results != null ? Arrays.stream(results).mapToLong(results_conv_22 -> results_conv_22 != null ? results_conv_22.ptr : 0).toArray() : null, failed_paths_retry == null ? 0 : failed_paths_retry.ptr, InternalUtils.check_arr_len(payment_id, 32)); + long ret = bindings.PaymentSendFailure_partial_failure(results != null ? Arrays.stream(results).mapToLong(results_conv_22 -> results_conv_22.ptr).toArray() : null, failed_paths_retry.ptr, InternalUtils.check_arr_len(payment_id, 32)); Reference.reachabilityFence(results); Reference.reachabilityFence(failed_paths_retry); Reference.reachabilityFence(payment_id); @@ -268,7 +268,7 @@ public class PaymentSendFailure extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public boolean eq(org.ldk.structs.PaymentSendFailure b) { - boolean ret = bindings.PaymentSendFailure_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.PaymentSendFailure_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); return ret; diff --git a/src/main/java/org/ldk/structs/PeeledOnion.java b/src/main/java/org/ldk/structs/PeeledOnion.java index 7787d1f4..587c32b9 100644 --- a/src/main/java/org/ldk/structs/PeeledOnion.java +++ b/src/main/java/org/ldk/structs/PeeledOnion.java @@ -35,11 +35,14 @@ public class PeeledOnion extends CommonBase { * Forwarded onion, with the next node id and a new onion */ public final static class Forward extends PeeledOnion { - public final byte[] _0; + public final org.ldk.structs.NextMessageHop _0; public final org.ldk.structs.OnionMessage _1; private Forward(long ptr, bindings.LDKPeeledOnion.Forward obj) { super(null, ptr); - this._0 = obj._0; + long _0 = obj._0; + org.ldk.structs.NextMessageHop _0_hu_conv = org.ldk.structs.NextMessageHop.constr_from_ptr(_0); + if (_0_hu_conv != null) { _0_hu_conv.ptrs_to.add(this); }; + this._0 = _0_hu_conv; long _1 = obj._1; org.ldk.structs.OnionMessage _1_hu_conv = null; if (_1 < 0 || _1 > 4096) { _1_hu_conv = new org.ldk.structs.OnionMessage(null, _1); } if (_1_hu_conv != null) { _1_hu_conv.ptrs_to.add(this); }; @@ -93,13 +96,14 @@ public class PeeledOnion extends CommonBase { /** * Utility method to constructs a new Forward-variant PeeledOnion */ - public static PeeledOnion forward(byte[] a, org.ldk.structs.OnionMessage b) { - long ret = bindings.PeeledOnion_forward(InternalUtils.check_arr_len(a, 33), b == null ? 0 : b.ptr); + public static PeeledOnion forward(org.ldk.structs.NextMessageHop a, org.ldk.structs.OnionMessage b) { + long ret = bindings.PeeledOnion_forward(a.ptr, b.ptr); Reference.reachabilityFence(a); Reference.reachabilityFence(b); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.PeeledOnion ret_hu_conv = org.ldk.structs.PeeledOnion.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(a); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b); }; return ret_hu_conv; } @@ -108,7 +112,7 @@ public class PeeledOnion extends CommonBase { * Utility method to constructs a new Receive-variant PeeledOnion */ public static PeeledOnion receive(org.ldk.structs.ParsedOnionMessageContents a, byte[] b, org.ldk.structs.BlindedPath c) { - long ret = bindings.PeeledOnion_receive(a.ptr, InternalUtils.check_arr_len(b, 32), c == null ? 0 : c.ptr); + long ret = bindings.PeeledOnion_receive(a.ptr, InternalUtils.check_arr_len(b, 32), c.ptr); Reference.reachabilityFence(a); Reference.reachabilityFence(b); Reference.reachabilityFence(c); diff --git a/src/main/java/org/ldk/structs/PeerDetails.java b/src/main/java/org/ldk/structs/PeerDetails.java new file mode 100644 index 00000000..9e449104 --- /dev/null +++ b/src/main/java/org/ldk/structs/PeerDetails.java @@ -0,0 +1,138 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + + +/** + * Details of a connected peer as returned by [`PeerManager::list_peers`]. + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class PeerDetails extends CommonBase { + PeerDetails(Object _dummy, long ptr) { super(ptr); } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + if (ptr != 0) { bindings.PeerDetails_free(ptr); } + } + + /** + * The node id of the peer. + * + * For outbound connections, this [`PublicKey`] will be the same as the `their_node_id` parameter + * passed in to [`PeerManager::new_outbound_connection`]. + */ + public byte[] get_counterparty_node_id() { + byte[] ret = bindings.PeerDetails_get_counterparty_node_id(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * The node id of the peer. + * + * For outbound connections, this [`PublicKey`] will be the same as the `their_node_id` parameter + * passed in to [`PeerManager::new_outbound_connection`]. + */ + public void set_counterparty_node_id(byte[] val) { + bindings.PeerDetails_set_counterparty_node_id(this.ptr, InternalUtils.check_arr_len(val, 33)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * The socket address the peer provided in the initial handshake. + * + * Will only be `Some` if an address had been previously provided to + * [`PeerManager::new_outbound_connection`] or [`PeerManager::new_inbound_connection`]. + * + * Returns a copy of the field. + */ + public Option_SocketAddressZ get_socket_address() { + long ret = bindings.PeerDetails_get_socket_address(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_SocketAddressZ ret_hu_conv = org.ldk.structs.Option_SocketAddressZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * The socket address the peer provided in the initial handshake. + * + * Will only be `Some` if an address had been previously provided to + * [`PeerManager::new_outbound_connection`] or [`PeerManager::new_inbound_connection`]. + */ + public void set_socket_address(org.ldk.structs.Option_SocketAddressZ val) { + bindings.PeerDetails_set_socket_address(this.ptr, val.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; + } + + /** + * The features the peer provided in the initial handshake. + */ + public InitFeatures get_init_features() { + long ret = bindings.PeerDetails_get_init_features(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.InitFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InitFeatures(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * The features the peer provided in the initial handshake. + */ + public void set_init_features(org.ldk.structs.InitFeatures val) { + bindings.PeerDetails_set_init_features(this.ptr, val.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; + } + + /** + * Indicates the direction of the peer connection. + * + * Will be `true` for inbound connections, and `false` for outbound connections. + */ + public boolean get_is_inbound_connection() { + boolean ret = bindings.PeerDetails_get_is_inbound_connection(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Indicates the direction of the peer connection. + * + * Will be `true` for inbound connections, and `false` for outbound connections. + */ + public void set_is_inbound_connection(boolean val) { + bindings.PeerDetails_set_is_inbound_connection(this.ptr, val); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * Constructs a new PeerDetails given each field + */ + public static PeerDetails of(byte[] counterparty_node_id_arg, org.ldk.structs.Option_SocketAddressZ socket_address_arg, org.ldk.structs.InitFeatures init_features_arg, boolean is_inbound_connection_arg) { + long ret = bindings.PeerDetails_new(InternalUtils.check_arr_len(counterparty_node_id_arg, 33), socket_address_arg.ptr, init_features_arg.ptr, is_inbound_connection_arg); + Reference.reachabilityFence(counterparty_node_id_arg); + Reference.reachabilityFence(socket_address_arg); + Reference.reachabilityFence(init_features_arg); + Reference.reachabilityFence(is_inbound_connection_arg); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.PeerDetails ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.PeerDetails(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(socket_address_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(init_features_arg); }; + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/PeerManager.java b/src/main/java/org/ldk/structs/PeerManager.java index c12f1d15..fbec38a6 100644 --- a/src/main/java/org/ldk/structs/PeerManager.java +++ b/src/main/java/org/ldk/structs/PeerManager.java @@ -72,29 +72,39 @@ public class PeerManager extends CommonBase { } /** - * Get a list of tuples mapping from node id to network addresses for peers which have - * completed the initial handshake. + * Returns a list of [`PeerDetails`] for connected peers that have completed the initial + * handshake. + */ + public PeerDetails[] list_peers() { + long[] ret = bindings.PeerManager_list_peers(this.ptr); + Reference.reachabilityFence(this); + int ret_conv_13_len = ret.length; + PeerDetails[] ret_conv_13_arr = new PeerDetails[ret_conv_13_len]; + for (int n = 0; n < ret_conv_13_len; n++) { + long ret_conv_13 = ret[n]; + org.ldk.structs.PeerDetails ret_conv_13_hu_conv = null; if (ret_conv_13 < 0 || ret_conv_13 > 4096) { ret_conv_13_hu_conv = new org.ldk.structs.PeerDetails(null, ret_conv_13); } + if (ret_conv_13_hu_conv != null) { ret_conv_13_hu_conv.ptrs_to.add(this); }; + ret_conv_13_arr[n] = ret_conv_13_hu_conv; + } + return ret_conv_13_arr; + } + + /** + * Returns the [`PeerDetails`] of a connected peer that has completed the initial handshake. * - * For outbound connections, the [`PublicKey`] will be the same as the `their_node_id` parameter - * passed in to [`Self::new_outbound_connection`], however entries will only appear once the initial - * handshake has completed and we are sure the remote peer has the private key for the given - * [`PublicKey`]. + * Will return `None` if the peer is unknown or it hasn't completed the initial handshake. * - * The returned `Option`s will only be `Some` if an address had been previously given via - * [`Self::new_outbound_connection`] or [`Self::new_inbound_connection`]. + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public TwoTuple_PublicKeyCOption_SocketAddressZZ[] get_peer_node_ids() { - long[] ret = bindings.PeerManager_get_peer_node_ids(this.ptr); + @Nullable + public PeerDetails peer_by_node_id(byte[] their_node_id) { + long ret = bindings.PeerManager_peer_by_node_id(this.ptr, InternalUtils.check_arr_len(their_node_id, 33)); Reference.reachabilityFence(this); - int ret_conv_43_len = ret.length; - TwoTuple_PublicKeyCOption_SocketAddressZZ[] ret_conv_43_arr = new TwoTuple_PublicKeyCOption_SocketAddressZZ[ret_conv_43_len]; - for (int r = 0; r < ret_conv_43_len; r++) { - long ret_conv_43 = ret[r]; - TwoTuple_PublicKeyCOption_SocketAddressZZ ret_conv_43_hu_conv = new TwoTuple_PublicKeyCOption_SocketAddressZZ(null, ret_conv_43); - if (ret_conv_43_hu_conv != null) { ret_conv_43_hu_conv.ptrs_to.add(this); }; - ret_conv_43_arr[r] = ret_conv_43_hu_conv; - } - return ret_conv_43_arr; + Reference.reachabilityFence(their_node_id); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.PeerDetails ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.PeerDetails(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** diff --git a/src/main/java/org/ldk/structs/PendingHTLCRouting.java b/src/main/java/org/ldk/structs/PendingHTLCRouting.java index 58e3433a..2284ea64 100644 --- a/src/main/java/org/ldk/structs/PendingHTLCRouting.java +++ b/src/main/java/org/ldk/structs/PendingHTLCRouting.java @@ -90,6 +90,13 @@ public class PendingHTLCRouting extends CommonBase { * [`RecipientOnionFields::payment_metadata`]. */ public final org.ldk.structs.Option_CVec_u8ZZ payment_metadata; + /** + * The context of the payment included by the recipient in a blinded path, or `None` if a + * blinded path was not used. + * + * Used in part to determine the [`events::PaymentPurpose`]. + */ + public final org.ldk.structs.Option_PaymentContextZ payment_context; /** * CLTV expiry of the received HTLC. * @@ -126,6 +133,10 @@ public class PendingHTLCRouting extends CommonBase { org.ldk.structs.Option_CVec_u8ZZ payment_metadata_hu_conv = org.ldk.structs.Option_CVec_u8ZZ.constr_from_ptr(payment_metadata); if (payment_metadata_hu_conv != null) { payment_metadata_hu_conv.ptrs_to.add(this); }; this.payment_metadata = payment_metadata_hu_conv; + long payment_context = obj.payment_context; + org.ldk.structs.Option_PaymentContextZ payment_context_hu_conv = org.ldk.structs.Option_PaymentContextZ.constr_from_ptr(payment_context); + if (payment_context_hu_conv != null) { payment_context_hu_conv.ptrs_to.add(this); }; + this.payment_context = payment_context_hu_conv; this.incoming_cltv_expiry = obj.incoming_cltv_expiry; this.phantom_shared_secret = obj.phantom_shared_secret; long[] custom_tlvs = obj.custom_tlvs; @@ -182,6 +193,10 @@ public class PendingHTLCRouting extends CommonBase { * [`RecipientOnionFields::custom_tlvs`]. */ public final TwoTuple_u64CVec_u8ZZ[] custom_tlvs; + /** + * Set if this HTLC is the final hop in a multi-hop blinded path. + */ + public final boolean requires_blinded_error; private ReceiveKeysend(long ptr, bindings.LDKPendingHTLCRouting.ReceiveKeysend obj) { super(null, ptr); long payment_data = obj.payment_data; @@ -204,6 +219,7 @@ public class PendingHTLCRouting extends CommonBase { custom_tlvs_conv_23_arr[x] = custom_tlvs_conv_23_hu_conv; } this.custom_tlvs = custom_tlvs_conv_23_arr; + this.requires_blinded_error = obj.requires_blinded_error; } } long clone_ptr() { @@ -228,7 +244,7 @@ public class PendingHTLCRouting extends CommonBase { * Utility method to constructs a new Forward-variant PendingHTLCRouting */ public static PendingHTLCRouting forward(org.ldk.structs.OnionPacket onion_packet, long short_channel_id, org.ldk.structs.BlindedForward blinded) { - long ret = bindings.PendingHTLCRouting_forward(onion_packet == null ? 0 : onion_packet.ptr, short_channel_id, blinded == null ? 0 : blinded.ptr); + long ret = bindings.PendingHTLCRouting_forward(onion_packet.ptr, short_channel_id, blinded.ptr); Reference.reachabilityFence(onion_packet); Reference.reachabilityFence(short_channel_id); Reference.reachabilityFence(blinded); @@ -243,10 +259,11 @@ public class PendingHTLCRouting extends CommonBase { /** * Utility method to constructs a new Receive-variant PendingHTLCRouting */ - public static PendingHTLCRouting receive(org.ldk.structs.FinalOnionHopData payment_data, org.ldk.structs.Option_CVec_u8ZZ payment_metadata, int incoming_cltv_expiry, byte[] phantom_shared_secret, TwoTuple_u64CVec_u8ZZ[] custom_tlvs, boolean requires_blinded_error) { - long ret = bindings.PendingHTLCRouting_receive(payment_data == null ? 0 : payment_data.ptr, payment_metadata.ptr, incoming_cltv_expiry, InternalUtils.check_arr_len(phantom_shared_secret, 32), custom_tlvs != null ? Arrays.stream(custom_tlvs).mapToLong(custom_tlvs_conv_23 -> custom_tlvs_conv_23 != null ? custom_tlvs_conv_23.ptr : 0).toArray() : null, requires_blinded_error); + public static PendingHTLCRouting receive(org.ldk.structs.FinalOnionHopData payment_data, org.ldk.structs.Option_CVec_u8ZZ payment_metadata, org.ldk.structs.Option_PaymentContextZ payment_context, int incoming_cltv_expiry, byte[] phantom_shared_secret, TwoTuple_u64CVec_u8ZZ[] custom_tlvs, boolean requires_blinded_error) { + long ret = bindings.PendingHTLCRouting_receive(payment_data.ptr, payment_metadata.ptr, payment_context.ptr, incoming_cltv_expiry, InternalUtils.check_arr_len(phantom_shared_secret, 32), custom_tlvs != null ? Arrays.stream(custom_tlvs).mapToLong(custom_tlvs_conv_23 -> custom_tlvs_conv_23.ptr).toArray() : null, requires_blinded_error); Reference.reachabilityFence(payment_data); Reference.reachabilityFence(payment_metadata); + Reference.reachabilityFence(payment_context); Reference.reachabilityFence(incoming_cltv_expiry); Reference.reachabilityFence(phantom_shared_secret); Reference.reachabilityFence(custom_tlvs); @@ -256,19 +273,21 @@ public class PendingHTLCRouting extends CommonBase { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(payment_data); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(payment_metadata); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(payment_context); }; return ret_hu_conv; } /** * Utility method to constructs a new ReceiveKeysend-variant PendingHTLCRouting */ - public static PendingHTLCRouting receive_keysend(org.ldk.structs.FinalOnionHopData payment_data, byte[] payment_preimage, org.ldk.structs.Option_CVec_u8ZZ payment_metadata, int incoming_cltv_expiry, TwoTuple_u64CVec_u8ZZ[] custom_tlvs) { - long ret = bindings.PendingHTLCRouting_receive_keysend(payment_data == null ? 0 : payment_data.ptr, InternalUtils.check_arr_len(payment_preimage, 32), payment_metadata.ptr, incoming_cltv_expiry, custom_tlvs != null ? Arrays.stream(custom_tlvs).mapToLong(custom_tlvs_conv_23 -> custom_tlvs_conv_23 != null ? custom_tlvs_conv_23.ptr : 0).toArray() : null); + public static PendingHTLCRouting receive_keysend(org.ldk.structs.FinalOnionHopData payment_data, byte[] payment_preimage, org.ldk.structs.Option_CVec_u8ZZ payment_metadata, int incoming_cltv_expiry, TwoTuple_u64CVec_u8ZZ[] custom_tlvs, boolean requires_blinded_error) { + long ret = bindings.PendingHTLCRouting_receive_keysend(payment_data.ptr, InternalUtils.check_arr_len(payment_preimage, 32), payment_metadata.ptr, incoming_cltv_expiry, custom_tlvs != null ? Arrays.stream(custom_tlvs).mapToLong(custom_tlvs_conv_23 -> custom_tlvs_conv_23.ptr).toArray() : null, requires_blinded_error); Reference.reachabilityFence(payment_data); Reference.reachabilityFence(payment_preimage); Reference.reachabilityFence(payment_metadata); Reference.reachabilityFence(incoming_cltv_expiry); Reference.reachabilityFence(custom_tlvs); + Reference.reachabilityFence(requires_blinded_error); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.PendingHTLCRouting ret_hu_conv = org.ldk.structs.PendingHTLCRouting.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; diff --git a/src/main/java/org/ldk/structs/Persist.java b/src/main/java/org/ldk/structs/Persist.java index db7a6114..baf592f1 100644 --- a/src/main/java/org/ldk/structs/Persist.java +++ b/src/main/java/org/ldk/structs/Persist.java @@ -108,7 +108,7 @@ public class Persist extends CommonBase { * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager * [`Writeable::write`]: crate::util::ser::Writeable::write */ - ChannelMonitorUpdateStatus persist_new_channel(OutPoint channel_id, ChannelMonitor data, MonitorUpdateId update_id); + ChannelMonitorUpdateStatus persist_new_channel(OutPoint channel_funding_outpoint, ChannelMonitor data, MonitorUpdateId update_id); /** * Update one channel's data. The provided [`ChannelMonitor`] has already applied the given * update. @@ -146,34 +146,47 @@ public class Persist extends CommonBase { * * Note that update (or a relevant inner pointer) may be NULL or all-0s to represent None */ - ChannelMonitorUpdateStatus update_persisted_channel(OutPoint channel_id, ChannelMonitorUpdate update, ChannelMonitor data, MonitorUpdateId update_id); + ChannelMonitorUpdateStatus update_persisted_channel(OutPoint channel_funding_outpoint, ChannelMonitorUpdate update, ChannelMonitor data, MonitorUpdateId update_id); + /** + * Prevents the channel monitor from being loaded on startup. + * + * Archiving the data in a backup location (rather than deleting it fully) is useful for + * hedging against data loss in case of unexpected failure. + */ + void archive_persisted_channel(OutPoint channel_funding_outpoint); } private static class LDKPersistHolder { Persist held; } public static Persist new_impl(PersistInterface arg) { final LDKPersistHolder impl_holder = new LDKPersistHolder(); impl_holder.held = new Persist(new bindings.LDKPersist() { - @Override public ChannelMonitorUpdateStatus persist_new_channel(long channel_id, long data, long update_id) { - org.ldk.structs.OutPoint channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.OutPoint(null, channel_id); } - if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); }; + @Override public ChannelMonitorUpdateStatus persist_new_channel(long channel_funding_outpoint, long data, long update_id) { + org.ldk.structs.OutPoint channel_funding_outpoint_hu_conv = null; if (channel_funding_outpoint < 0 || channel_funding_outpoint > 4096) { channel_funding_outpoint_hu_conv = new org.ldk.structs.OutPoint(null, channel_funding_outpoint); } + if (channel_funding_outpoint_hu_conv != null) { channel_funding_outpoint_hu_conv.ptrs_to.add(this); }; org.ldk.structs.ChannelMonitor data_hu_conv = null; if (data < 0 || data > 4096) { data_hu_conv = new org.ldk.structs.ChannelMonitor(null, data); } org.ldk.structs.MonitorUpdateId update_id_hu_conv = null; if (update_id < 0 || update_id > 4096) { update_id_hu_conv = new org.ldk.structs.MonitorUpdateId(null, update_id); } if (update_id_hu_conv != null) { update_id_hu_conv.ptrs_to.add(this); }; - ChannelMonitorUpdateStatus ret = arg.persist_new_channel(channel_id_hu_conv, data_hu_conv, update_id_hu_conv); + ChannelMonitorUpdateStatus ret = arg.persist_new_channel(channel_funding_outpoint_hu_conv, data_hu_conv, update_id_hu_conv); Reference.reachabilityFence(arg); return ret; } - @Override public ChannelMonitorUpdateStatus update_persisted_channel(long channel_id, long update, long data, long update_id) { - org.ldk.structs.OutPoint channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.OutPoint(null, channel_id); } - if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); }; + @Override public ChannelMonitorUpdateStatus update_persisted_channel(long channel_funding_outpoint, long update, long data, long update_id) { + org.ldk.structs.OutPoint channel_funding_outpoint_hu_conv = null; if (channel_funding_outpoint < 0 || channel_funding_outpoint > 4096) { channel_funding_outpoint_hu_conv = new org.ldk.structs.OutPoint(null, channel_funding_outpoint); } + if (channel_funding_outpoint_hu_conv != null) { channel_funding_outpoint_hu_conv.ptrs_to.add(this); }; org.ldk.structs.ChannelMonitorUpdate update_hu_conv = null; if (update < 0 || update > 4096) { update_hu_conv = new org.ldk.structs.ChannelMonitorUpdate(null, update); } if (update_hu_conv != null) { update_hu_conv.ptrs_to.add(this); }; org.ldk.structs.ChannelMonitor data_hu_conv = null; if (data < 0 || data > 4096) { data_hu_conv = new org.ldk.structs.ChannelMonitor(null, data); } org.ldk.structs.MonitorUpdateId update_id_hu_conv = null; if (update_id < 0 || update_id > 4096) { update_id_hu_conv = new org.ldk.structs.MonitorUpdateId(null, update_id); } if (update_id_hu_conv != null) { update_id_hu_conv.ptrs_to.add(this); }; - ChannelMonitorUpdateStatus ret = arg.update_persisted_channel(channel_id_hu_conv, update_hu_conv, data_hu_conv, update_id_hu_conv); + ChannelMonitorUpdateStatus ret = arg.update_persisted_channel(channel_funding_outpoint_hu_conv, update_hu_conv, data_hu_conv, update_id_hu_conv); Reference.reachabilityFence(arg); return ret; } + @Override public void archive_persisted_channel(long channel_funding_outpoint) { + org.ldk.structs.OutPoint channel_funding_outpoint_hu_conv = null; if (channel_funding_outpoint < 0 || channel_funding_outpoint > 4096) { channel_funding_outpoint_hu_conv = new org.ldk.structs.OutPoint(null, channel_funding_outpoint); } + if (channel_funding_outpoint_hu_conv != null) { channel_funding_outpoint_hu_conv.ptrs_to.add(this); }; + arg.archive_persisted_channel(channel_funding_outpoint_hu_conv); + Reference.reachabilityFence(arg); + } }); return impl_holder.held; } @@ -194,13 +207,13 @@ public class Persist extends CommonBase { * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager * [`Writeable::write`]: crate::util::ser::Writeable::write */ - public ChannelMonitorUpdateStatus persist_new_channel(org.ldk.structs.OutPoint channel_id, org.ldk.structs.ChannelMonitor data, org.ldk.structs.MonitorUpdateId update_id) { - ChannelMonitorUpdateStatus ret = bindings.Persist_persist_new_channel(this.ptr, channel_id == null ? 0 : channel_id.ptr, data == null ? 0 : data.ptr, update_id == null ? 0 : update_id.ptr); + public ChannelMonitorUpdateStatus persist_new_channel(org.ldk.structs.OutPoint channel_funding_outpoint, org.ldk.structs.ChannelMonitor data, org.ldk.structs.MonitorUpdateId update_id) { + ChannelMonitorUpdateStatus ret = bindings.Persist_persist_new_channel(this.ptr, channel_funding_outpoint.ptr, data.ptr, update_id.ptr); Reference.reachabilityFence(this); - Reference.reachabilityFence(channel_id); + Reference.reachabilityFence(channel_funding_outpoint); Reference.reachabilityFence(data); Reference.reachabilityFence(update_id); - if (this != null) { this.ptrs_to.add(channel_id); }; + if (this != null) { this.ptrs_to.add(channel_funding_outpoint); }; if (this != null) { this.ptrs_to.add(data); }; if (this != null) { this.ptrs_to.add(update_id); }; return ret; @@ -243,18 +256,31 @@ public class Persist extends CommonBase { * * Note that update (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public ChannelMonitorUpdateStatus update_persisted_channel(org.ldk.structs.OutPoint channel_id, @Nullable org.ldk.structs.ChannelMonitorUpdate update, org.ldk.structs.ChannelMonitor data, org.ldk.structs.MonitorUpdateId update_id) { - ChannelMonitorUpdateStatus ret = bindings.Persist_update_persisted_channel(this.ptr, channel_id == null ? 0 : channel_id.ptr, update == null ? 0 : update.ptr, data == null ? 0 : data.ptr, update_id == null ? 0 : update_id.ptr); + public ChannelMonitorUpdateStatus update_persisted_channel(org.ldk.structs.OutPoint channel_funding_outpoint, @Nullable org.ldk.structs.ChannelMonitorUpdate update, org.ldk.structs.ChannelMonitor data, org.ldk.structs.MonitorUpdateId update_id) { + ChannelMonitorUpdateStatus ret = bindings.Persist_update_persisted_channel(this.ptr, channel_funding_outpoint.ptr, update == null ? 0 : update.ptr, data.ptr, update_id.ptr); Reference.reachabilityFence(this); - Reference.reachabilityFence(channel_id); + Reference.reachabilityFence(channel_funding_outpoint); Reference.reachabilityFence(update); Reference.reachabilityFence(data); Reference.reachabilityFence(update_id); - if (this != null) { this.ptrs_to.add(channel_id); }; + if (this != null) { this.ptrs_to.add(channel_funding_outpoint); }; if (this != null) { this.ptrs_to.add(update); }; if (this != null) { this.ptrs_to.add(data); }; if (this != null) { this.ptrs_to.add(update_id); }; return ret; } + /** + * Prevents the channel monitor from being loaded on startup. + * + * Archiving the data in a backup location (rather than deleting it fully) is useful for + * hedging against data loss in case of unexpected failure. + */ + public void archive_persisted_channel(org.ldk.structs.OutPoint channel_funding_outpoint) { + bindings.Persist_archive_persisted_channel(this.ptr, channel_funding_outpoint.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(channel_funding_outpoint); + if (this != null) { this.ptrs_to.add(channel_funding_outpoint); }; + } + } diff --git a/src/main/java/org/ldk/structs/Persister.java b/src/main/java/org/ldk/structs/Persister.java index 3a63215f..039004fb 100644 --- a/src/main/java/org/ldk/structs/Persister.java +++ b/src/main/java/org/ldk/structs/Persister.java @@ -9,6 +9,8 @@ import javax.annotation.Nullable; /** * Trait that handles persisting a [`ChannelManager`], [`NetworkGraph`], and [`WriteableScore`] to disk. + * + * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager */ @SuppressWarnings("unchecked") // We correctly assign various generic arrays public class Persister extends CommonBase { @@ -39,6 +41,8 @@ public class Persister extends CommonBase { public static interface PersisterInterface { /** * Persist the given ['ChannelManager'] to disk, returning an error if persistence failed. + * + * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager */ Result_NoneIOErrorZ persist_manager(ChannelManager channel_manager); /** @@ -58,14 +62,14 @@ public class Persister extends CommonBase { org.ldk.structs.ChannelManager channel_manager_hu_conv = null; if (channel_manager < 0 || channel_manager > 4096) { channel_manager_hu_conv = new org.ldk.structs.ChannelManager(null, channel_manager); } Result_NoneIOErrorZ ret = arg.persist_manager(channel_manager_hu_conv); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long persist_graph(long network_graph) { org.ldk.structs.NetworkGraph network_graph_hu_conv = null; if (network_graph < 0 || network_graph > 4096) { network_graph_hu_conv = new org.ldk.structs.NetworkGraph(null, network_graph); } Result_NoneIOErrorZ ret = arg.persist_graph(network_graph_hu_conv); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long persist_scorer(long scorer) { @@ -73,7 +77,7 @@ public class Persister extends CommonBase { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; Result_NoneIOErrorZ ret = arg.persist_scorer(ret_hu_conv); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } }); @@ -81,9 +85,11 @@ public class Persister extends CommonBase { } /** * Persist the given ['ChannelManager'] to disk, returning an error if persistence failed. + * + * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager */ public Result_NoneIOErrorZ persist_manager(org.ldk.structs.ChannelManager channel_manager) { - long ret = bindings.Persister_persist_manager(this.ptr, channel_manager == null ? 0 : channel_manager.ptr); + long ret = bindings.Persister_persist_manager(this.ptr, channel_manager.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(channel_manager); if (ret >= 0 && ret <= 4096) { return null; } @@ -96,7 +102,7 @@ public class Persister extends CommonBase { * Persist the given [`NetworkGraph`] to disk, returning an error if persistence failed. */ public Result_NoneIOErrorZ persist_graph(org.ldk.structs.NetworkGraph network_graph) { - long ret = bindings.Persister_persist_graph(this.ptr, network_graph == null ? 0 : network_graph.ptr); + long ret = bindings.Persister_persist_graph(this.ptr, network_graph.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(network_graph); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/src/main/java/org/ldk/structs/PhantomKeysManager.java b/src/main/java/org/ldk/structs/PhantomKeysManager.java index f3791cf6..3d8e66f6 100644 --- a/src/main/java/org/ldk/structs/PhantomKeysManager.java +++ b/src/main/java/org/ldk/structs/PhantomKeysManager.java @@ -60,6 +60,19 @@ public class PhantomKeysManager extends CommonBase { return ret_hu_conv; } + /** + * Constructs a new OutputSpender which calls the relevant methods on this_arg. + * This copies the `inner` pointer in this_arg and thus the returned OutputSpender must be freed before this_arg is + */ + public OutputSpender as_OutputSpender() { + long ret = bindings.PhantomKeysManager_as_OutputSpender(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + OutputSpender ret_hu_conv = new OutputSpender(null, ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + /** * Constructs a new SignerProvider which calls the relevant methods on this_arg. * This copies the `inner` pointer in this_arg and thus the returned SignerProvider must be freed before this_arg is @@ -98,24 +111,6 @@ public class PhantomKeysManager extends CommonBase { return ret_hu_conv; } - /** - * See [`KeysManager::spend_spendable_outputs`] for documentation on this method. - */ - public Result_TransactionNoneZ spend_spendable_outputs(SpendableOutputDescriptor[] descriptors, TxOut[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, org.ldk.structs.Option_u32Z locktime) { - long ret = bindings.PhantomKeysManager_spend_spendable_outputs(this.ptr, descriptors != null ? Arrays.stream(descriptors).mapToLong(descriptors_conv_27 -> descriptors_conv_27.ptr).toArray() : null, outputs != null ? Arrays.stream(outputs).mapToLong(outputs_conv_7 -> outputs_conv_7.ptr).toArray() : null, change_destination_script, feerate_sat_per_1000_weight, locktime.ptr); - Reference.reachabilityFence(this); - Reference.reachabilityFence(descriptors); - Reference.reachabilityFence(outputs); - Reference.reachabilityFence(change_destination_script); - Reference.reachabilityFence(feerate_sat_per_1000_weight); - Reference.reachabilityFence(locktime); - if (ret >= 0 && ret <= 4096) { return null; } - Result_TransactionNoneZ ret_hu_conv = Result_TransactionNoneZ.constr_from_ptr(ret); - for (SpendableOutputDescriptor descriptors_conv_27: descriptors) { if (this != null) { this.ptrs_to.add(descriptors_conv_27); }; }; - if (this != null) { this.ptrs_to.add(locktime); }; - return ret_hu_conv; - } - /** * See [`KeysManager::derive_channel_keys`] for documentation on this method. */ diff --git a/src/main/java/org/ldk/structs/PhantomRouteHints.java b/src/main/java/org/ldk/structs/PhantomRouteHints.java index 680ad1cd..19b2686b 100644 --- a/src/main/java/org/ldk/structs/PhantomRouteHints.java +++ b/src/main/java/org/ldk/structs/PhantomRouteHints.java @@ -43,7 +43,7 @@ public class PhantomRouteHints extends CommonBase { * The list of channels to be included in the invoice route hints. */ public void set_channels(ChannelDetails[] val) { - bindings.PhantomRouteHints_set_channels(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_16 -> val_conv_16 == null ? 0 : val_conv_16.ptr).toArray() : null); + bindings.PhantomRouteHints_set_channels(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_16 -> val_conv_16.ptr).toArray() : null); Reference.reachabilityFence(this); Reference.reachabilityFence(val); for (ChannelDetails val_conv_16: val) { if (this != null) { this.ptrs_to.add(val_conv_16); }; }; @@ -91,7 +91,7 @@ public class PhantomRouteHints extends CommonBase { * Constructs a new PhantomRouteHints given each field */ public static PhantomRouteHints of(ChannelDetails[] channels_arg, long phantom_scid_arg, byte[] real_node_pubkey_arg) { - long ret = bindings.PhantomRouteHints_new(channels_arg != null ? Arrays.stream(channels_arg).mapToLong(channels_arg_conv_16 -> channels_arg_conv_16 == null ? 0 : channels_arg_conv_16.ptr).toArray() : null, phantom_scid_arg, InternalUtils.check_arr_len(real_node_pubkey_arg, 33)); + long ret = bindings.PhantomRouteHints_new(channels_arg != null ? Arrays.stream(channels_arg).mapToLong(channels_arg_conv_16 -> channels_arg_conv_16.ptr).toArray() : null, phantom_scid_arg, InternalUtils.check_arr_len(real_node_pubkey_arg, 33)); Reference.reachabilityFence(channels_arg); Reference.reachabilityFence(phantom_scid_arg); Reference.reachabilityFence(real_node_pubkey_arg); diff --git a/src/main/java/org/ldk/structs/Ping.java b/src/main/java/org/ldk/structs/Ping.java index e36edb4c..bf082037 100644 --- a/src/main/java/org/ldk/structs/Ping.java +++ b/src/main/java/org/ldk/structs/Ping.java @@ -111,7 +111,7 @@ public class Ping extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.Ping b) { - boolean ret = bindings.Ping_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.Ping_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/Pong.java b/src/main/java/org/ldk/structs/Pong.java index 822558a5..f77f89cb 100644 --- a/src/main/java/org/ldk/structs/Pong.java +++ b/src/main/java/org/ldk/structs/Pong.java @@ -92,7 +92,7 @@ public class Pong extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.Pong b) { - boolean ret = bindings.Pong_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.Pong_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/PositiveTimestamp.java b/src/main/java/org/ldk/structs/PositiveTimestamp.java index bbb55597..5a7cbc9b 100644 --- a/src/main/java/org/ldk/structs/PositiveTimestamp.java +++ b/src/main/java/org/ldk/structs/PositiveTimestamp.java @@ -31,7 +31,7 @@ public class PositiveTimestamp extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.PositiveTimestamp b) { - boolean ret = bindings.PositiveTimestamp_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.PositiveTimestamp_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/PrivateRoute.java b/src/main/java/org/ldk/structs/PrivateRoute.java index c4168ae5..5524d3c2 100644 --- a/src/main/java/org/ldk/structs/PrivateRoute.java +++ b/src/main/java/org/ldk/structs/PrivateRoute.java @@ -59,7 +59,7 @@ public class PrivateRoute extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.PrivateRoute b) { - boolean ret = bindings.PrivateRoute_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.PrivateRoute_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; @@ -74,7 +74,7 @@ public class PrivateRoute extends CommonBase { * Creates a new (partial) route from a list of hops */ public static Result_PrivateRouteCreationErrorZ of(org.ldk.structs.RouteHint hops) { - long ret = bindings.PrivateRoute_new(hops == null ? 0 : hops.ptr); + long ret = bindings.PrivateRoute_new(hops.ptr); Reference.reachabilityFence(hops); if (ret >= 0 && ret <= 4096) { return null; } Result_PrivateRouteCreationErrorZ ret_hu_conv = Result_PrivateRouteCreationErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/ProbabilisticScorer.java b/src/main/java/org/ldk/structs/ProbabilisticScorer.java index 92288925..6ade87c7 100644 --- a/src/main/java/org/ldk/structs/ProbabilisticScorer.java +++ b/src/main/java/org/ldk/structs/ProbabilisticScorer.java @@ -55,7 +55,7 @@ public class ProbabilisticScorer extends CommonBase { * through a network graph. */ public static ProbabilisticScorer of(org.ldk.structs.ProbabilisticScoringDecayParameters decay_params, org.ldk.structs.NetworkGraph network_graph, org.ldk.structs.Logger logger) { - long ret = bindings.ProbabilisticScorer_new(decay_params == null ? 0 : decay_params.ptr, network_graph == null ? 0 : network_graph.ptr, logger.ptr); + long ret = bindings.ProbabilisticScorer_new(decay_params.ptr, network_graph.ptr, logger.ptr); Reference.reachabilityFence(decay_params); Reference.reachabilityFence(network_graph); Reference.reachabilityFence(logger); @@ -84,7 +84,7 @@ public class ProbabilisticScorer extends CommonBase { * channel with `scid` towards the given `target` node. */ public Option_C2Tuple_u64u64ZZ estimated_channel_liquidity_range(long scid, org.ldk.structs.NodeId target) { - long ret = bindings.ProbabilisticScorer_estimated_channel_liquidity_range(this.ptr, scid, target == null ? 0 : target.ptr); + long ret = bindings.ProbabilisticScorer_estimated_channel_liquidity_range(this.ptr, scid, target.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(scid); Reference.reachabilityFence(target); @@ -124,7 +124,7 @@ public class ProbabilisticScorer extends CommonBase { * the scoring model, see [`Self::historical_estimated_payment_success_probability`]. */ public Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ historical_estimated_channel_liquidity_probabilities(long scid, org.ldk.structs.NodeId target) { - long ret = bindings.ProbabilisticScorer_historical_estimated_channel_liquidity_probabilities(this.ptr, scid, target == null ? 0 : target.ptr); + long ret = bindings.ProbabilisticScorer_historical_estimated_channel_liquidity_probabilities(this.ptr, scid, target.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(scid); Reference.reachabilityFence(target); @@ -145,7 +145,7 @@ public class ProbabilisticScorer extends CommonBase { * [`Self::estimated_channel_liquidity_range`]). */ public Option_f64Z historical_estimated_payment_success_probability(long scid, org.ldk.structs.NodeId target, long amount_msat, org.ldk.structs.ProbabilisticScoringFeeParameters params) { - long ret = bindings.ProbabilisticScorer_historical_estimated_payment_success_probability(this.ptr, scid, target == null ? 0 : target.ptr, amount_msat, params == null ? 0 : params.ptr); + long ret = bindings.ProbabilisticScorer_historical_estimated_payment_success_probability(this.ptr, scid, target.ptr, amount_msat, params.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(scid); Reference.reachabilityFence(target); @@ -211,7 +211,7 @@ public class ProbabilisticScorer extends CommonBase { * Read a ProbabilisticScorer from a byte array, created by ProbabilisticScorer_write */ public static Result_ProbabilisticScorerDecodeErrorZ read(byte[] ser, org.ldk.structs.ProbabilisticScoringDecayParameters arg_a, org.ldk.structs.NetworkGraph arg_b, org.ldk.structs.Logger arg_c) { - long ret = bindings.ProbabilisticScorer_read(ser, arg_a == null ? 0 : arg_a.ptr, arg_b == null ? 0 : arg_b.ptr, arg_c.ptr); + long ret = bindings.ProbabilisticScorer_read(ser, arg_a.ptr, arg_b.ptr, arg_c.ptr); Reference.reachabilityFence(ser); Reference.reachabilityFence(arg_a); Reference.reachabilityFence(arg_b); diff --git a/src/main/java/org/ldk/structs/ProbabilisticScoringFeeParameters.java b/src/main/java/org/ldk/structs/ProbabilisticScoringFeeParameters.java index 68e5e545..82489802 100644 --- a/src/main/java/org/ldk/structs/ProbabilisticScoringFeeParameters.java +++ b/src/main/java/org/ldk/structs/ProbabilisticScoringFeeParameters.java @@ -462,7 +462,7 @@ public class ProbabilisticScoringFeeParameters extends CommonBase { * i.e it will be avoided during path finding. */ public void add_banned(org.ldk.structs.NodeId node_id) { - bindings.ProbabilisticScoringFeeParameters_add_banned(this.ptr, node_id == null ? 0 : node_id.ptr); + bindings.ProbabilisticScoringFeeParameters_add_banned(this.ptr, node_id.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(node_id); if (this != null) { this.ptrs_to.add(node_id); }; @@ -473,7 +473,7 @@ public class ProbabilisticScoringFeeParameters extends CommonBase { * they will be avoided during path finding. */ public void add_banned_from_list(NodeId[] node_ids) { - bindings.ProbabilisticScoringFeeParameters_add_banned_from_list(this.ptr, node_ids != null ? Arrays.stream(node_ids).mapToLong(node_ids_conv_8 -> node_ids_conv_8 == null ? 0 : node_ids_conv_8.ptr).toArray() : null); + bindings.ProbabilisticScoringFeeParameters_add_banned_from_list(this.ptr, node_ids != null ? Arrays.stream(node_ids).mapToLong(node_ids_conv_8 -> node_ids_conv_8.ptr).toArray() : null); Reference.reachabilityFence(this); Reference.reachabilityFence(node_ids); for (NodeId node_ids_conv_8: node_ids) { if (this != null) { this.ptrs_to.add(node_ids_conv_8); }; }; @@ -483,7 +483,7 @@ public class ProbabilisticScoringFeeParameters extends CommonBase { * Removes the node with the given `node_id` from the list of nodes to avoid. */ public void remove_banned(org.ldk.structs.NodeId node_id) { - bindings.ProbabilisticScoringFeeParameters_remove_banned(this.ptr, node_id == null ? 0 : node_id.ptr); + bindings.ProbabilisticScoringFeeParameters_remove_banned(this.ptr, node_id.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(node_id); if (this != null) { this.ptrs_to.add(node_id); }; @@ -493,7 +493,7 @@ public class ProbabilisticScoringFeeParameters extends CommonBase { * Sets a manual penalty for the given node. */ public void set_manual_penalty(org.ldk.structs.NodeId node_id, long penalty) { - bindings.ProbabilisticScoringFeeParameters_set_manual_penalty(this.ptr, node_id == null ? 0 : node_id.ptr, penalty); + bindings.ProbabilisticScoringFeeParameters_set_manual_penalty(this.ptr, node_id.ptr, penalty); Reference.reachabilityFence(this); Reference.reachabilityFence(node_id); Reference.reachabilityFence(penalty); @@ -504,7 +504,7 @@ public class ProbabilisticScoringFeeParameters extends CommonBase { * Removes the node with the given `node_id` from the list of manual penalties. */ public void remove_manual_penalty(org.ldk.structs.NodeId node_id) { - bindings.ProbabilisticScoringFeeParameters_remove_manual_penalty(this.ptr, node_id == null ? 0 : node_id.ptr); + bindings.ProbabilisticScoringFeeParameters_remove_manual_penalty(this.ptr, node_id.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(node_id); if (this != null) { this.ptrs_to.add(node_id); }; diff --git a/src/main/java/org/ldk/structs/ProbeSendFailure.java b/src/main/java/org/ldk/structs/ProbeSendFailure.java index 927c3f4f..bb1438dd 100644 --- a/src/main/java/org/ldk/structs/ProbeSendFailure.java +++ b/src/main/java/org/ldk/structs/ProbeSendFailure.java @@ -101,7 +101,7 @@ public class ProbeSendFailure extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public boolean eq(org.ldk.structs.ProbeSendFailure b) { - boolean ret = bindings.ProbeSendFailure_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.ProbeSendFailure_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); return ret; diff --git a/src/main/java/org/ldk/structs/Quantity.java b/src/main/java/org/ldk/structs/Quantity.java index cd6d3863..6cf03047 100644 --- a/src/main/java/org/ldk/structs/Quantity.java +++ b/src/main/java/org/ldk/structs/Quantity.java @@ -13,13 +13,56 @@ import javax.annotation.Nullable; */ @SuppressWarnings("unchecked") // We correctly assign various generic arrays public class Quantity extends CommonBase { - Quantity(Object _dummy, long ptr) { super(ptr); } + private Quantity(Object _dummy, long ptr) { super(ptr); } @Override @SuppressWarnings("deprecation") protected void finalize() throws Throwable { super.finalize(); if (ptr != 0) { bindings.Quantity_free(ptr); } } + static Quantity constr_from_ptr(long ptr) { + bindings.LDKQuantity raw_val = bindings.LDKQuantity_ref_from_ptr(ptr); + if (raw_val.getClass() == bindings.LDKQuantity.Bounded.class) { + return new Bounded(ptr, (bindings.LDKQuantity.Bounded)raw_val); + } + if (raw_val.getClass() == bindings.LDKQuantity.Unbounded.class) { + return new Unbounded(ptr, (bindings.LDKQuantity.Unbounded)raw_val); + } + if (raw_val.getClass() == bindings.LDKQuantity.One.class) { + return new One(ptr, (bindings.LDKQuantity.One)raw_val); + } + assert false; return null; // Unreachable without extending the (internal) bindings interface + } + /** + * Up to a specific number of items (inclusive). Use when more than one item can be requested + * but is limited (e.g., because of per customer or inventory limits). + * + * May be used with `NonZeroU64::new(1)` but prefer to use [`Quantity::One`] if only one item + * is supported. + */ + public final static class Bounded extends Quantity { + public final long bounded; + private Bounded(long ptr, bindings.LDKQuantity.Bounded obj) { + super(null, ptr); + this.bounded = obj.bounded; + } + } + /** + * One or more items. Use when more than one item can be requested without any limit. + */ + public final static class Unbounded extends Quantity { + private Unbounded(long ptr, bindings.LDKQuantity.Unbounded obj) { + super(null, ptr); + } + } + /** + * Only one item. Use when only a single item can be requested. + */ + public final static class One extends Quantity { + private One(long ptr, bindings.LDKQuantity.One obj) { + super(null, ptr); + } + } long clone_ptr() { long ret = bindings.Quantity_clone_ptr(this.ptr); Reference.reachabilityFence(this); @@ -33,9 +76,43 @@ public class Quantity extends CommonBase { long ret = bindings.Quantity_clone(this.ptr); Reference.reachabilityFence(this); if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Quantity ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Quantity(null, ret); } + org.ldk.structs.Quantity ret_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; return ret_hu_conv; } + /** + * Utility method to constructs a new Bounded-variant Quantity + */ + public static Quantity bounded(long a) { + long ret = bindings.Quantity_bounded(a); + Reference.reachabilityFence(a); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Quantity ret_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new Unbounded-variant Quantity + */ + public static Quantity unbounded() { + long ret = bindings.Quantity_unbounded(); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Quantity ret_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new One-variant Quantity + */ + public static Quantity one() { + long ret = bindings.Quantity_one(); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Quantity ret_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + } diff --git a/src/main/java/org/ldk/structs/QueryChannelRange.java b/src/main/java/org/ldk/structs/QueryChannelRange.java index c4a416e7..30095f03 100644 --- a/src/main/java/org/ldk/structs/QueryChannelRange.java +++ b/src/main/java/org/ldk/structs/QueryChannelRange.java @@ -129,7 +129,7 @@ public class QueryChannelRange extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.QueryChannelRange b) { - boolean ret = bindings.QueryChannelRange_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.QueryChannelRange_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/QueryShortChannelIds.java b/src/main/java/org/ldk/structs/QueryShortChannelIds.java index 46b6edd1..67a9bc86 100644 --- a/src/main/java/org/ldk/structs/QueryShortChannelIds.java +++ b/src/main/java/org/ldk/structs/QueryShortChannelIds.java @@ -117,7 +117,7 @@ public class QueryShortChannelIds extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.QueryShortChannelIds b) { - boolean ret = bindings.QueryShortChannelIds_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.QueryShortChannelIds_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/RandomBytes.java b/src/main/java/org/ldk/structs/RandomBytes.java new file mode 100644 index 00000000..32af07f3 --- /dev/null +++ b/src/main/java/org/ldk/structs/RandomBytes.java @@ -0,0 +1,48 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + + +/** + * An implementation of [`EntropySource`] using ChaCha20. + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class RandomBytes extends CommonBase { + RandomBytes(Object _dummy, long ptr) { super(ptr); } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + if (ptr != 0) { bindings.RandomBytes_free(ptr); } + } + + /** + * Creates a new instance using the given seed. + */ + public static RandomBytes of(byte[] seed) { + long ret = bindings.RandomBytes_new(InternalUtils.check_arr_len(seed, 32)); + Reference.reachabilityFence(seed); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.RandomBytes ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.RandomBytes(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Constructs a new EntropySource which calls the relevant methods on this_arg. + * This copies the `inner` pointer in this_arg and thus the returned EntropySource must be freed before this_arg is + */ + public EntropySource as_EntropySource() { + long ret = bindings.RandomBytes_as_EntropySource(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + EntropySource ret_hu_conv = new EntropySource(null, ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/RapidGossipSync.java b/src/main/java/org/ldk/structs/RapidGossipSync.java index 46cd9b5b..54e4717b 100644 --- a/src/main/java/org/ldk/structs/RapidGossipSync.java +++ b/src/main/java/org/ldk/structs/RapidGossipSync.java @@ -28,7 +28,7 @@ public class RapidGossipSync extends CommonBase { * Instantiate a new [`RapidGossipSync`] instance. */ public static RapidGossipSync of(org.ldk.structs.NetworkGraph network_graph, org.ldk.structs.Logger logger) { - long ret = bindings.RapidGossipSync_new(network_graph == null ? 0 : network_graph.ptr, logger.ptr); + long ret = bindings.RapidGossipSync_new(network_graph.ptr, logger.ptr); Reference.reachabilityFence(network_graph); Reference.reachabilityFence(logger); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/src/main/java/org/ldk/structs/RawBolt11Invoice.java b/src/main/java/org/ldk/structs/RawBolt11Invoice.java index f40cf8c7..29e49b8b 100644 --- a/src/main/java/org/ldk/structs/RawBolt11Invoice.java +++ b/src/main/java/org/ldk/structs/RawBolt11Invoice.java @@ -40,7 +40,7 @@ public class RawBolt11Invoice extends CommonBase { * data part */ public void set_data(org.ldk.structs.RawDataPart val) { - bindings.RawBolt11Invoice_set_data(this.ptr, val == null ? 0 : val.ptr); + bindings.RawBolt11Invoice_set_data(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -52,7 +52,7 @@ public class RawBolt11Invoice extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.RawBolt11Invoice b) { - boolean ret = bindings.RawBolt11Invoice_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.RawBolt11Invoice_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; @@ -225,6 +225,9 @@ public class RawBolt11Invoice extends CommonBase { return ret_conv_14_arr; } + /** + * Returns `None` if no amount is set or on overflow. + */ public Option_u64Z amount_pico_btc() { long ret = bindings.RawBolt11Invoice_amount_pico_btc(this.ptr); Reference.reachabilityFence(this); diff --git a/src/main/java/org/ldk/structs/RawDataPart.java b/src/main/java/org/ldk/structs/RawDataPart.java index d7885133..3c730c9c 100644 --- a/src/main/java/org/ldk/structs/RawDataPart.java +++ b/src/main/java/org/ldk/structs/RawDataPart.java @@ -36,7 +36,7 @@ public class RawDataPart extends CommonBase { * generation time of the invoice */ public void set_timestamp(org.ldk.structs.PositiveTimestamp val) { - bindings.RawDataPart_set_timestamp(this.ptr, val == null ? 0 : val.ptr); + bindings.RawDataPart_set_timestamp(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -48,7 +48,7 @@ public class RawDataPart extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.RawDataPart b) { - boolean ret = bindings.RawDataPart_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.RawDataPart_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/ReadOnlyNetworkGraph.java b/src/main/java/org/ldk/structs/ReadOnlyNetworkGraph.java index 81f29a32..0271d998 100644 --- a/src/main/java/org/ldk/structs/ReadOnlyNetworkGraph.java +++ b/src/main/java/org/ldk/structs/ReadOnlyNetworkGraph.java @@ -50,7 +50,7 @@ public class ReadOnlyNetworkGraph extends CommonBase implements AutoCloseable { */ @Nullable public NodeInfo node(org.ldk.structs.NodeId node_id) { - long ret = bindings.ReadOnlyNetworkGraph_node(this.ptr, node_id == null ? 0 : node_id.ptr); + long ret = bindings.ReadOnlyNetworkGraph_node(this.ptr, node_id.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(node_id); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/src/main/java/org/ldk/structs/ReceiveTlvs.java b/src/main/java/org/ldk/structs/ReceiveTlvs.java index a3b87f33..9b095526 100644 --- a/src/main/java/org/ldk/structs/ReceiveTlvs.java +++ b/src/main/java/org/ldk/structs/ReceiveTlvs.java @@ -55,7 +55,29 @@ public class ReceiveTlvs extends CommonBase { * Constraints for the receiver of this payment. */ public void set_payment_constraints(org.ldk.structs.PaymentConstraints val) { - bindings.ReceiveTlvs_set_payment_constraints(this.ptr, val == null ? 0 : val.ptr); + bindings.ReceiveTlvs_set_payment_constraints(this.ptr, val.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; + } + + /** + * Context for the receiver of this payment. + */ + public PaymentContext get_payment_context() { + long ret = bindings.ReceiveTlvs_get_payment_context(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.PaymentContext ret_hu_conv = org.ldk.structs.PaymentContext.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Context for the receiver of this payment. + */ + public void set_payment_context(org.ldk.structs.PaymentContext val) { + bindings.ReceiveTlvs_set_payment_context(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -64,14 +86,16 @@ public class ReceiveTlvs extends CommonBase { /** * Constructs a new ReceiveTlvs given each field */ - public static ReceiveTlvs of(byte[] payment_secret_arg, org.ldk.structs.PaymentConstraints payment_constraints_arg) { - long ret = bindings.ReceiveTlvs_new(InternalUtils.check_arr_len(payment_secret_arg, 32), payment_constraints_arg == null ? 0 : payment_constraints_arg.ptr); + public static ReceiveTlvs of(byte[] payment_secret_arg, org.ldk.structs.PaymentConstraints payment_constraints_arg, org.ldk.structs.PaymentContext payment_context_arg) { + long ret = bindings.ReceiveTlvs_new(InternalUtils.check_arr_len(payment_secret_arg, 32), payment_constraints_arg.ptr, payment_context_arg.ptr); Reference.reachabilityFence(payment_secret_arg); Reference.reachabilityFence(payment_constraints_arg); + Reference.reachabilityFence(payment_context_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.ReceiveTlvs ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ReceiveTlvs(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(payment_constraints_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(payment_context_arg); }; return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/RecipientOnionFields.java b/src/main/java/org/ldk/structs/RecipientOnionFields.java index b9ca6082..cf4a3094 100644 --- a/src/main/java/org/ldk/structs/RecipientOnionFields.java +++ b/src/main/java/org/ldk/structs/RecipientOnionFields.java @@ -135,7 +135,7 @@ public class RecipientOnionFields extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.RecipientOnionFields b) { - boolean ret = bindings.RecipientOnionFields_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.RecipientOnionFields_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; @@ -210,7 +210,7 @@ public class RecipientOnionFields extends CommonBase { * See [`Self::custom_tlvs`] for more info. */ public Result_RecipientOnionFieldsNoneZ with_custom_tlvs(TwoTuple_u64CVec_u8ZZ[] custom_tlvs) { - long ret = bindings.RecipientOnionFields_with_custom_tlvs(this.ptr, custom_tlvs != null ? Arrays.stream(custom_tlvs).mapToLong(custom_tlvs_conv_23 -> custom_tlvs_conv_23 != null ? custom_tlvs_conv_23.ptr : 0).toArray() : null); + long ret = bindings.RecipientOnionFields_with_custom_tlvs(this.ptr, custom_tlvs != null ? Arrays.stream(custom_tlvs).mapToLong(custom_tlvs_conv_23 -> custom_tlvs_conv_23.ptr).toArray() : null); Reference.reachabilityFence(this); Reference.reachabilityFence(custom_tlvs); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/src/main/java/org/ldk/structs/Record.java b/src/main/java/org/ldk/structs/Record.java index 200bbf5f..6e9bd3e6 100644 --- a/src/main/java/org/ldk/structs/Record.java +++ b/src/main/java/org/ldk/structs/Record.java @@ -73,12 +73,15 @@ public class Record extends CommonBase { /** * The channel id of the channel pertaining to the logged record. May be a temporary id before * the channel has been funded. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public Option_ThirtyTwoBytesZ get_channel_id() { + @Nullable + public ChannelId get_channel_id() { long ret = bindings.Record_get_channel_id(this.ptr); Reference.reachabilityFence(this); if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Option_ThirtyTwoBytesZ ret_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(ret); + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; return ret_hu_conv; } @@ -86,9 +89,11 @@ public class Record extends CommonBase { /** * The channel id of the channel pertaining to the logged record. May be a temporary id before * the channel has been funded. + * + * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public void set_channel_id(org.ldk.structs.Option_ThirtyTwoBytesZ val) { - bindings.Record_set_channel_id(this.ptr, val.ptr); + public void set_channel_id(@Nullable org.ldk.structs.ChannelId val) { + bindings.Record_set_channel_id(this.ptr, val == null ? 0 : val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -170,9 +175,10 @@ public class Record extends CommonBase { * Constructs a new Record given each field * * Note that peer_id_arg (or a relevant inner pointer) may be NULL or all-0s to represent None + * Note that channel_id_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public static Record of(org.ldk.enums.Level level_arg, @Nullable byte[] peer_id_arg, org.ldk.structs.Option_ThirtyTwoBytesZ channel_id_arg, java.lang.String args_arg, java.lang.String module_path_arg, java.lang.String file_arg, int line_arg) { - long ret = bindings.Record_new(level_arg, InternalUtils.check_arr_len(peer_id_arg, 33), channel_id_arg.ptr, args_arg, module_path_arg, file_arg, line_arg); + public static Record of(org.ldk.enums.Level level_arg, @Nullable byte[] peer_id_arg, @Nullable org.ldk.structs.ChannelId channel_id_arg, java.lang.String args_arg, java.lang.String module_path_arg, java.lang.String file_arg, int line_arg) { + long ret = bindings.Record_new(level_arg, InternalUtils.check_arr_len(peer_id_arg, 33), channel_id_arg == null ? 0 : channel_id_arg.ptr, args_arg, module_path_arg, file_arg, line_arg); Reference.reachabilityFence(level_arg); Reference.reachabilityFence(peer_id_arg); Reference.reachabilityFence(channel_id_arg); diff --git a/src/main/java/org/ldk/structs/Refund.java b/src/main/java/org/ldk/structs/Refund.java index 2479eb9b..f7750ac0 100644 --- a/src/main/java/org/ldk/structs/Refund.java +++ b/src/main/java/org/ldk/structs/Refund.java @@ -208,6 +208,18 @@ public class Refund extends CommonBase { return ret_hu_conv; } + /** + * Generates a non-cryptographic 64-bit hash of the Refund. + */ + public long hash() { + long ret = bindings.Refund_hash(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + @Override public int hashCode() { + return (int)this.hash(); + } /** * Serialize the Refund object into a byte array which can be read by Refund_read */ diff --git a/src/main/java/org/ldk/structs/RefundMaybeWithDerivedMetadataBuilder.java b/src/main/java/org/ldk/structs/RefundMaybeWithDerivedMetadataBuilder.java new file mode 100644 index 00000000..0d347006 --- /dev/null +++ b/src/main/java/org/ldk/structs/RefundMaybeWithDerivedMetadataBuilder.java @@ -0,0 +1,206 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + + +/** + * Builds a [`Refund`] for the \"offer for money\" flow. + * + * See [module-level documentation] for usage. + * + * [module-level documentation]: self + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class RefundMaybeWithDerivedMetadataBuilder extends CommonBase { + RefundMaybeWithDerivedMetadataBuilder(Object _dummy, long ptr) { super(ptr); } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + if (ptr != 0) { bindings.RefundMaybeWithDerivedMetadataBuilder_free(ptr); } + } + + long clone_ptr() { + long ret = bindings.RefundMaybeWithDerivedMetadataBuilder_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a copy of the RefundMaybeWithDerivedMetadataBuilder + */ + public RefundMaybeWithDerivedMetadataBuilder clone() { + long ret = bindings.RefundMaybeWithDerivedMetadataBuilder_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.RefundMaybeWithDerivedMetadataBuilder ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.RefundMaybeWithDerivedMetadataBuilder(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Creates a new builder for a refund using the [`Refund::payer_id`] for the public node id to + * send to if no [`Refund::paths`] are set. Otherwise, it may be a transient pubkey. + * + * Additionally, sets the required (empty) [`Refund::description`], [`Refund::payer_metadata`], + * and [`Refund::amount_msats`]. + * + * # Note + * + * If constructing a [`Refund`] for use with a [`ChannelManager`], use + * [`ChannelManager::create_refund_builder`] instead of [`RefundBuilder::new`]. + * + * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager + * [`ChannelManager::create_refund_builder`]: crate::ln::channelmanager::ChannelManager::create_refund_builder + */ + public static Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ of(byte[] metadata, byte[] payer_id, long amount_msats) { + long ret = bindings.RefundMaybeWithDerivedMetadataBuilder_new(metadata, InternalUtils.check_arr_len(payer_id, 33), amount_msats); + Reference.reachabilityFence(metadata); + Reference.reachabilityFence(payer_id); + Reference.reachabilityFence(amount_msats); + if (ret >= 0 && ret <= 4096) { return null; } + Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Similar to [`RefundBuilder::new`] except, if [`RefundBuilder::path`] is called, the payer id + * is derived from the given [`ExpandedKey`] and nonce. This provides sender privacy by using a + * different payer id for each refund, assuming a different nonce is used. Otherwise, the + * provided `node_id` is used for the payer id. + * + * Also, sets the metadata when [`RefundBuilder::build`] is called such that it can be used to + * verify that an [`InvoiceRequest`] was produced for the refund given an [`ExpandedKey`]. + * + * The `payment_id` is encrypted in the metadata and should be unique. This ensures that only + * one invoice will be paid for the refund and that payments can be uniquely identified. + * + * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest + * [`ExpandedKey`]: crate::ln::inbound_payment::ExpandedKey + */ + public static Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ deriving_payer_id(byte[] node_id, org.ldk.structs.ExpandedKey expanded_key, org.ldk.structs.EntropySource entropy_source, long amount_msats, byte[] payment_id) { + long ret = bindings.RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(InternalUtils.check_arr_len(node_id, 33), expanded_key.ptr, entropy_source.ptr, amount_msats, InternalUtils.check_arr_len(payment_id, 32)); + Reference.reachabilityFence(node_id); + Reference.reachabilityFence(expanded_key); + Reference.reachabilityFence(entropy_source); + Reference.reachabilityFence(amount_msats); + Reference.reachabilityFence(payment_id); + if (ret >= 0 && ret <= 4096) { return null; } + Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(expanded_key); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(entropy_source); }; + return ret_hu_conv; + } + + /** + * Sets the [`Refund::description`]. + * + * Successive calls to this method will override the previous setting. + */ + public void description(java.lang.String description) { + bindings.RefundMaybeWithDerivedMetadataBuilder_description(this.ptr, description); + Reference.reachabilityFence(this); + Reference.reachabilityFence(description); + if (this != null) { this.ptrs_to.add(this); }; + } + + /** + * Sets the [`Refund::absolute_expiry`] as seconds since the Unix epoch. Any expiry that has + * already passed is valid and can be checked for using [`Refund::is_expired`]. + * + * Successive calls to this method will override the previous setting. + */ + public void absolute_expiry(long absolute_expiry) { + bindings.RefundMaybeWithDerivedMetadataBuilder_absolute_expiry(this.ptr, absolute_expiry); + Reference.reachabilityFence(this); + Reference.reachabilityFence(absolute_expiry); + if (this != null) { this.ptrs_to.add(this); }; + } + + /** + * Sets the [`Refund::issuer`]. + * + * Successive calls to this method will override the previous setting. + */ + public void issuer(java.lang.String issuer) { + bindings.RefundMaybeWithDerivedMetadataBuilder_issuer(this.ptr, issuer); + Reference.reachabilityFence(this); + Reference.reachabilityFence(issuer); + if (this != null) { this.ptrs_to.add(this); }; + } + + /** + * Adds a blinded path to [`Refund::paths`]. Must include at least one path if only connected + * by private channels or if [`Refund::payer_id`] is not a public node id. + * + * Successive calls to this method will add another blinded path. Caller is responsible for not + * adding duplicate paths. + */ + public void path(org.ldk.structs.BlindedPath path) { + bindings.RefundMaybeWithDerivedMetadataBuilder_path(this.ptr, path.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(path); + if (this != null) { this.ptrs_to.add(path); }; + if (this != null) { this.ptrs_to.add(this); }; + } + + /** + * Sets the [`Refund::chain`] of the given [`Network`] for paying an invoice. If not + * called, [`Network::Bitcoin`] is assumed. + * + * Successive calls to this method will override the previous setting. + */ + public void chain(org.ldk.enums.Network network) { + bindings.RefundMaybeWithDerivedMetadataBuilder_chain(this.ptr, network); + Reference.reachabilityFence(this); + Reference.reachabilityFence(network); + if (this != null) { this.ptrs_to.add(this); }; + } + + /** + * Sets [`Refund::quantity`] of items. This is purely for informational purposes. It is useful + * when the refund pertains to a [`Bolt12Invoice`] that paid for more than one item from an + * [`Offer`] as specified by [`InvoiceRequest::quantity`]. + * + * Successive calls to this method will override the previous setting. + * + * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice + * [`InvoiceRequest::quantity`]: crate::offers::invoice_request::InvoiceRequest::quantity + * [`Offer`]: crate::offers::offer::Offer + */ + public void quantity(long quantity) { + bindings.RefundMaybeWithDerivedMetadataBuilder_quantity(this.ptr, quantity); + Reference.reachabilityFence(this); + Reference.reachabilityFence(quantity); + if (this != null) { this.ptrs_to.add(this); }; + } + + /** + * Sets the [`Refund::payer_note`]. + * + * Successive calls to this method will override the previous setting. + */ + public void payer_note(java.lang.String payer_note) { + bindings.RefundMaybeWithDerivedMetadataBuilder_payer_note(this.ptr, payer_note); + Reference.reachabilityFence(this); + Reference.reachabilityFence(payer_note); + if (this != null) { this.ptrs_to.add(this); }; + } + + /** + * Builds a [`Refund`] after checking for valid semantics. + */ + public Result_RefundBolt12SemanticErrorZ build() { + long ret = bindings.RefundMaybeWithDerivedMetadataBuilder_build(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_RefundBolt12SemanticErrorZ ret_hu_conv = Result_RefundBolt12SemanticErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.add(this); }; + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/ReplyChannelRange.java b/src/main/java/org/ldk/structs/ReplyChannelRange.java index 10ca61a3..0e703d10 100644 --- a/src/main/java/org/ldk/structs/ReplyChannelRange.java +++ b/src/main/java/org/ldk/structs/ReplyChannelRange.java @@ -174,7 +174,7 @@ public class ReplyChannelRange extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.ReplyChannelRange b) { - boolean ret = bindings.ReplyChannelRange_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.ReplyChannelRange_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/ReplyShortChannelIdsEnd.java b/src/main/java/org/ldk/structs/ReplyShortChannelIdsEnd.java index 8af922d8..f272db04 100644 --- a/src/main/java/org/ldk/structs/ReplyShortChannelIdsEnd.java +++ b/src/main/java/org/ldk/structs/ReplyShortChannelIdsEnd.java @@ -112,7 +112,7 @@ public class ReplyShortChannelIdsEnd extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.ReplyShortChannelIdsEnd b) { - boolean ret = bindings.ReplyShortChannelIdsEnd_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.ReplyShortChannelIdsEnd_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/Result_AcceptChannelDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_AcceptChannelDecodeErrorZ.java index 61100382..9d542e44 100644 --- a/src/main/java/org/ldk/structs/Result_AcceptChannelDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_AcceptChannelDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_AcceptChannelDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_AcceptChannelDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_AcceptChannelDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_AcceptChannelDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_AcceptChannelDecodeErrorZ_is_ok(ptr)) { return new Result_AcceptChannelDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_AcceptChannelDecodeErrorZ extends CommonBase { * Creates a new CResult_AcceptChannelDecodeErrorZ in the success state. */ public static Result_AcceptChannelDecodeErrorZ ok(org.ldk.structs.AcceptChannel o) { - long ret = bindings.CResult_AcceptChannelDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_AcceptChannelDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_AcceptChannelV2DecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_AcceptChannelV2DecodeErrorZ.java index f66c4113..04d923a3 100644 --- a/src/main/java/org/ldk/structs/Result_AcceptChannelV2DecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_AcceptChannelV2DecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_AcceptChannelV2DecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_AcceptChannelV2DecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_AcceptChannelV2DecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_AcceptChannelV2DecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_AcceptChannelV2DecodeErrorZ_is_ok(ptr)) { return new Result_AcceptChannelV2DecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_AcceptChannelV2DecodeErrorZ extends CommonBase { * Creates a new CResult_AcceptChannelV2DecodeErrorZ in the success state. */ public static Result_AcceptChannelV2DecodeErrorZ ok(org.ldk.structs.AcceptChannelV2 o) { - long ret = bindings.CResult_AcceptChannelV2DecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_AcceptChannelV2DecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_AcceptChannelV2DecodeErrorZ ret_hu_conv = Result_AcceptChannelV2DecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_AnnouncementSignaturesDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_AnnouncementSignaturesDecodeErrorZ.java index c0021221..af832ca4 100644 --- a/src/main/java/org/ldk/structs/Result_AnnouncementSignaturesDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_AnnouncementSignaturesDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_AnnouncementSignaturesDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_AnnouncementSignaturesDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_AnnouncementSignaturesDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_AnnouncementSignaturesDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_AnnouncementSignaturesDecodeErrorZ_is_ok(ptr)) { return new Result_AnnouncementSignaturesDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_AnnouncementSignaturesDecodeErrorZ extends CommonBase { * Creates a new CResult_AnnouncementSignaturesDecodeErrorZ in the success state. */ public static Result_AnnouncementSignaturesDecodeErrorZ ok(org.ldk.structs.AnnouncementSignatures o) { - long ret = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_AnnouncementSignaturesDecodeErrorZ ret_hu_conv = Result_AnnouncementSignaturesDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_BestBlockDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_BestBlockDecodeErrorZ.java new file mode 100644 index 00000000..a0272313 --- /dev/null +++ b/src/main/java/org/ldk/structs/Result_BestBlockDecodeErrorZ.java @@ -0,0 +1,100 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + +public class Result_BestBlockDecodeErrorZ extends CommonBase { + private Result_BestBlockDecodeErrorZ(Object _dummy, long ptr) { super(ptr); } + protected void finalize() throws Throwable { + if (ptr != 0) { bindings.CResult_BestBlockDecodeErrorZ_free(ptr); } super.finalize(); + } + + protected void force_free() { + if (ptr != 0) { bindings.CResult_BestBlockDecodeErrorZ_free(ptr); ptr = 0; } + } + + static Result_BestBlockDecodeErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_BestBlockDecodeErrorZ_is_ok(ptr)) { + return new Result_BestBlockDecodeErrorZ_OK(null, ptr); + } else { + return new Result_BestBlockDecodeErrorZ_Err(null, ptr); + } + } + public static final class Result_BestBlockDecodeErrorZ_OK extends Result_BestBlockDecodeErrorZ { + public final BestBlock res; + private Result_BestBlockDecodeErrorZ_OK(Object _dummy, long ptr) { + super(_dummy, ptr); + long res = bindings.CResult_BestBlockDecodeErrorZ_get_ok(ptr); + org.ldk.structs.BestBlock res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.BestBlock(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); }; + this.res = res_hu_conv; + } + } + + public static final class Result_BestBlockDecodeErrorZ_Err extends Result_BestBlockDecodeErrorZ { + public final DecodeError err; + private Result_BestBlockDecodeErrorZ_Err(Object _dummy, long ptr) { + super(_dummy, ptr); + long err = bindings.CResult_BestBlockDecodeErrorZ_get_err(ptr); + org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err); + if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); }; + this.err = err_hu_conv; + } + } + + /** + * Creates a new CResult_BestBlockDecodeErrorZ in the success state. + */ + public static Result_BestBlockDecodeErrorZ ok(org.ldk.structs.BestBlock o) { + long ret = bindings.CResult_BestBlockDecodeErrorZ_ok(o.ptr); + Reference.reachabilityFence(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_BestBlockDecodeErrorZ ret_hu_conv = Result_BestBlockDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_BestBlockDecodeErrorZ in the error state. + */ + public static Result_BestBlockDecodeErrorZ err(org.ldk.structs.DecodeError e) { + long ret = bindings.CResult_BestBlockDecodeErrorZ_err(e.ptr); + Reference.reachabilityFence(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_BestBlockDecodeErrorZ ret_hu_conv = Result_BestBlockDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); }; + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public boolean is_ok() { + boolean ret = bindings.CResult_BestBlockDecodeErrorZ_is_ok(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + long clone_ptr() { + long ret = bindings.CResult_BestBlockDecodeErrorZ_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a new CResult_BestBlockDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_BestBlockDecodeErrorZ clone() { + long ret = bindings.CResult_BestBlockDecodeErrorZ_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_BestBlockDecodeErrorZ ret_hu_conv = Result_BestBlockDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/Result_BigSizeDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_BigSizeDecodeErrorZ.java index be248c02..63d1f604 100644 --- a/src/main/java/org/ldk/structs/Result_BigSizeDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_BigSizeDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_BigSizeDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_BigSizeDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_BigSizeDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_BigSizeDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_BigSizeDecodeErrorZ_is_ok(ptr)) { return new Result_BigSizeDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_BigSizeDecodeErrorZ extends CommonBase { * Creates a new CResult_BigSizeDecodeErrorZ in the success state. */ public static Result_BigSizeDecodeErrorZ ok(org.ldk.structs.BigSize o) { - long ret = bindings.CResult_BigSizeDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_BigSizeDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_BigSizeDecodeErrorZ ret_hu_conv = Result_BigSizeDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_BlindedFailureDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_BlindedFailureDecodeErrorZ.java index 02583506..dc95d603 100644 --- a/src/main/java/org/ldk/structs/Result_BlindedFailureDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_BlindedFailureDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_BlindedFailureDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_BlindedFailureDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_BlindedFailureDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_BlindedFailureDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_BlindedFailureDecodeErrorZ_is_ok(ptr)) { return new Result_BlindedFailureDecodeErrorZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_BlindedForwardDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_BlindedForwardDecodeErrorZ.java index 7ba9ed1c..1bf34cc0 100644 --- a/src/main/java/org/ldk/structs/Result_BlindedForwardDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_BlindedForwardDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_BlindedForwardDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_BlindedForwardDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_BlindedForwardDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_BlindedForwardDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_BlindedForwardDecodeErrorZ_is_ok(ptr)) { return new Result_BlindedForwardDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_BlindedForwardDecodeErrorZ extends CommonBase { * Creates a new CResult_BlindedForwardDecodeErrorZ in the success state. */ public static Result_BlindedForwardDecodeErrorZ ok(org.ldk.structs.BlindedForward o) { - long ret = bindings.CResult_BlindedForwardDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_BlindedForwardDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_BlindedForwardDecodeErrorZ ret_hu_conv = Result_BlindedForwardDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_BlindedHopDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_BlindedHopDecodeErrorZ.java index 2d9d6021..def09774 100644 --- a/src/main/java/org/ldk/structs/Result_BlindedHopDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_BlindedHopDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_BlindedHopDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_BlindedHopDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_BlindedHopDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_BlindedHopDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_BlindedHopDecodeErrorZ_is_ok(ptr)) { return new Result_BlindedHopDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_BlindedHopDecodeErrorZ extends CommonBase { * Creates a new CResult_BlindedHopDecodeErrorZ in the success state. */ public static Result_BlindedHopDecodeErrorZ ok(org.ldk.structs.BlindedHop o) { - long ret = bindings.CResult_BlindedHopDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_BlindedHopDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_BlindedHopDecodeErrorZ ret_hu_conv = Result_BlindedHopDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_BlindedHopFeaturesDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_BlindedHopFeaturesDecodeErrorZ.java index 80ffa046..aa5d82de 100644 --- a/src/main/java/org/ldk/structs/Result_BlindedHopFeaturesDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_BlindedHopFeaturesDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_BlindedHopFeaturesDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_BlindedHopFeaturesDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_BlindedHopFeaturesDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_BlindedHopFeaturesDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_BlindedHopFeaturesDecodeErrorZ_is_ok(ptr)) { return new Result_BlindedHopFeaturesDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_BlindedHopFeaturesDecodeErrorZ extends CommonBase { * Creates a new CResult_BlindedHopFeaturesDecodeErrorZ in the success state. */ public static Result_BlindedHopFeaturesDecodeErrorZ ok(org.ldk.structs.BlindedHopFeatures o) { - long ret = bindings.CResult_BlindedHopFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_BlindedHopFeaturesDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_BlindedHopFeaturesDecodeErrorZ ret_hu_conv = Result_BlindedHopFeaturesDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_BlindedPathDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_BlindedPathDecodeErrorZ.java index 16c4efbb..28364c14 100644 --- a/src/main/java/org/ldk/structs/Result_BlindedPathDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_BlindedPathDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_BlindedPathDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_BlindedPathDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_BlindedPathDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_BlindedPathDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_BlindedPathDecodeErrorZ_is_ok(ptr)) { return new Result_BlindedPathDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_BlindedPathDecodeErrorZ extends CommonBase { * Creates a new CResult_BlindedPathDecodeErrorZ in the success state. */ public static Result_BlindedPathDecodeErrorZ ok(org.ldk.structs.BlindedPath o) { - long ret = bindings.CResult_BlindedPathDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_BlindedPathDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_BlindedPathDecodeErrorZ ret_hu_conv = Result_BlindedPathDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_BlindedPathNoneZ.java b/src/main/java/org/ldk/structs/Result_BlindedPathNoneZ.java index 6dcd916d..81d152bd 100644 --- a/src/main/java/org/ldk/structs/Result_BlindedPathNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_BlindedPathNoneZ.java @@ -13,6 +13,10 @@ public class Result_BlindedPathNoneZ extends CommonBase { if (ptr != 0) { bindings.CResult_BlindedPathNoneZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_BlindedPathNoneZ_free(ptr); ptr = 0; } + } + static Result_BlindedPathNoneZ constr_from_ptr(long ptr) { if (bindings.CResult_BlindedPathNoneZ_is_ok(ptr)) { return new Result_BlindedPathNoneZ_OK(null, ptr); @@ -41,7 +45,7 @@ public class Result_BlindedPathNoneZ extends CommonBase { * Creates a new CResult_BlindedPathNoneZ in the success state. */ public static Result_BlindedPathNoneZ ok(org.ldk.structs.BlindedPath o) { - long ret = bindings.CResult_BlindedPathNoneZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_BlindedPathNoneZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_BlindedPathNoneZ ret_hu_conv = Result_BlindedPathNoneZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_BlindedPayInfoDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_BlindedPayInfoDecodeErrorZ.java index d492a4ad..25eb505d 100644 --- a/src/main/java/org/ldk/structs/Result_BlindedPayInfoDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_BlindedPayInfoDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_BlindedPayInfoDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_BlindedPayInfoDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_BlindedPayInfoDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_BlindedPayInfoDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_BlindedPayInfoDecodeErrorZ_is_ok(ptr)) { return new Result_BlindedPayInfoDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_BlindedPayInfoDecodeErrorZ extends CommonBase { * Creates a new CResult_BlindedPayInfoDecodeErrorZ in the success state. */ public static Result_BlindedPayInfoDecodeErrorZ ok(org.ldk.structs.BlindedPayInfo o) { - long ret = bindings.CResult_BlindedPayInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_BlindedPayInfoDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_BlindedPayInfoDecodeErrorZ ret_hu_conv = Result_BlindedPayInfoDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_BlindedTailDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_BlindedTailDecodeErrorZ.java index a88a5277..cf61db88 100644 --- a/src/main/java/org/ldk/structs/Result_BlindedTailDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_BlindedTailDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_BlindedTailDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_BlindedTailDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_BlindedTailDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_BlindedTailDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_BlindedTailDecodeErrorZ_is_ok(ptr)) { return new Result_BlindedTailDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_BlindedTailDecodeErrorZ extends CommonBase { * Creates a new CResult_BlindedTailDecodeErrorZ in the success state. */ public static Result_BlindedTailDecodeErrorZ ok(org.ldk.structs.BlindedTail o) { - long ret = bindings.CResult_BlindedTailDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_BlindedTailDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_BlindedTailDecodeErrorZ ret_hu_conv = Result_BlindedTailDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.java b/src/main/java/org/ldk/structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.java index ab490892..8e58721d 100644 --- a/src/main/java/org/ldk/structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.java @@ -13,6 +13,10 @@ public class Result_Bolt11InvoiceBolt11SemanticErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_Bolt11InvoiceBolt11SemanticErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_Bolt11InvoiceBolt11SemanticErrorZ_free(ptr); ptr = 0; } + } + static Result_Bolt11InvoiceBolt11SemanticErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_Bolt11InvoiceBolt11SemanticErrorZ_is_ok(ptr)) { return new Result_Bolt11InvoiceBolt11SemanticErrorZ_OK(null, ptr); @@ -43,7 +47,7 @@ public class Result_Bolt11InvoiceBolt11SemanticErrorZ extends CommonBase { * Creates a new CResult_Bolt11InvoiceBolt11SemanticErrorZ in the success state. */ public static Result_Bolt11InvoiceBolt11SemanticErrorZ ok(org.ldk.structs.Bolt11Invoice o) { - long ret = bindings.CResult_Bolt11InvoiceBolt11SemanticErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_Bolt11InvoiceBolt11SemanticErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_Bolt11InvoiceBolt11SemanticErrorZ ret_hu_conv = Result_Bolt11InvoiceBolt11SemanticErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.java index c323da94..a6641c36 100644 --- a/src/main/java/org/ldk/structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_Bolt11InvoiceFeaturesDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_Bolt11InvoiceFeaturesDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_Bolt11InvoiceFeaturesDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_Bolt11InvoiceFeaturesDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_Bolt11InvoiceFeaturesDecodeErrorZ_is_ok(ptr)) { return new Result_Bolt11InvoiceFeaturesDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_Bolt11InvoiceFeaturesDecodeErrorZ extends CommonBase { * Creates a new CResult_Bolt11InvoiceFeaturesDecodeErrorZ in the success state. */ public static Result_Bolt11InvoiceFeaturesDecodeErrorZ ok(org.ldk.structs.Bolt11InvoiceFeatures o) { - long ret = bindings.CResult_Bolt11InvoiceFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_Bolt11InvoiceFeaturesDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_Bolt11InvoiceFeaturesDecodeErrorZ ret_hu_conv = Result_Bolt11InvoiceFeaturesDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.java b/src/main/java/org/ldk/structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.java index fa81ba36..14b185e7 100644 --- a/src/main/java/org/ldk/structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.java @@ -13,6 +13,10 @@ public class Result_Bolt11InvoiceParseOrSemanticErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_Bolt11InvoiceParseOrSemanticErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_Bolt11InvoiceParseOrSemanticErrorZ_free(ptr); ptr = 0; } + } + static Result_Bolt11InvoiceParseOrSemanticErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_Bolt11InvoiceParseOrSemanticErrorZ_is_ok(ptr)) { return new Result_Bolt11InvoiceParseOrSemanticErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_Bolt11InvoiceParseOrSemanticErrorZ extends CommonBase { * Creates a new CResult_Bolt11InvoiceParseOrSemanticErrorZ in the success state. */ public static Result_Bolt11InvoiceParseOrSemanticErrorZ ok(org.ldk.structs.Bolt11Invoice o) { - long ret = bindings.CResult_Bolt11InvoiceParseOrSemanticErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_Bolt11InvoiceParseOrSemanticErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_Bolt11InvoiceParseOrSemanticErrorZ ret_hu_conv = Result_Bolt11InvoiceParseOrSemanticErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_Bolt11InvoiceSignOrCreationErrorZ.java b/src/main/java/org/ldk/structs/Result_Bolt11InvoiceSignOrCreationErrorZ.java index 61dc6572..46677b31 100644 --- a/src/main/java/org/ldk/structs/Result_Bolt11InvoiceSignOrCreationErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_Bolt11InvoiceSignOrCreationErrorZ.java @@ -13,6 +13,10 @@ public class Result_Bolt11InvoiceSignOrCreationErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_Bolt11InvoiceSignOrCreationErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_Bolt11InvoiceSignOrCreationErrorZ_free(ptr); ptr = 0; } + } + static Result_Bolt11InvoiceSignOrCreationErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_Bolt11InvoiceSignOrCreationErrorZ_is_ok(ptr)) { return new Result_Bolt11InvoiceSignOrCreationErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_Bolt11InvoiceSignOrCreationErrorZ extends CommonBase { * Creates a new CResult_Bolt11InvoiceSignOrCreationErrorZ in the success state. */ public static Result_Bolt11InvoiceSignOrCreationErrorZ ok(org.ldk.structs.Bolt11Invoice o) { - long ret = bindings.CResult_Bolt11InvoiceSignOrCreationErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_Bolt11InvoiceSignOrCreationErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_Bolt11InvoiceSignOrCreationErrorZ ret_hu_conv = Result_Bolt11InvoiceSignOrCreationErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.java b/src/main/java/org/ldk/structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.java new file mode 100644 index 00000000..3797f9f5 --- /dev/null +++ b/src/main/java/org/ldk/structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.java @@ -0,0 +1,96 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + +public class Result_Bolt12InvoiceBolt12SemanticErrorZ extends CommonBase { + private Result_Bolt12InvoiceBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); } + protected void finalize() throws Throwable { + if (ptr != 0) { bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_free(ptr); } super.finalize(); + } + + protected void force_free() { + if (ptr != 0) { bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_free(ptr); ptr = 0; } + } + + static Result_Bolt12InvoiceBolt12SemanticErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_Bolt12InvoiceBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_Bolt12InvoiceBolt12SemanticErrorZ_Err(null, ptr); + } + } + public static final class Result_Bolt12InvoiceBolt12SemanticErrorZ_OK extends Result_Bolt12InvoiceBolt12SemanticErrorZ { + public final Bolt12Invoice res; + private Result_Bolt12InvoiceBolt12SemanticErrorZ_OK(Object _dummy, long ptr) { + super(_dummy, ptr); + long res = bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(ptr); + org.ldk.structs.Bolt12Invoice res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.Bolt12Invoice(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); }; + this.res = res_hu_conv; + } + } + + public static final class Result_Bolt12InvoiceBolt12SemanticErrorZ_Err extends Result_Bolt12InvoiceBolt12SemanticErrorZ { + public final Bolt12SemanticError err; + private Result_Bolt12InvoiceBolt12SemanticErrorZ_Err(Object _dummy, long ptr) { + super(_dummy, ptr); + this.err = bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(ptr); + } + } + + /** + * Creates a new CResult_Bolt12InvoiceBolt12SemanticErrorZ in the success state. + */ + public static Result_Bolt12InvoiceBolt12SemanticErrorZ ok(org.ldk.structs.Bolt12Invoice o) { + long ret = bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok(o.ptr); + Reference.reachabilityFence(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_Bolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_Bolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_Bolt12InvoiceBolt12SemanticErrorZ in the error state. + */ + public static Result_Bolt12InvoiceBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) { + long ret = bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_err(e); + Reference.reachabilityFence(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_Bolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_Bolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public boolean is_ok() { + boolean ret = bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + long clone_ptr() { + long ret = bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a new CResult_Bolt12InvoiceBolt12SemanticErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_Bolt12InvoiceBolt12SemanticErrorZ clone() { + long ret = bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_Bolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_Bolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.java index 9e57f95f..2eb37a3a 100644 --- a/src/main/java/org/ldk/structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_Bolt12InvoiceFeaturesDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_Bolt12InvoiceFeaturesDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_Bolt12InvoiceFeaturesDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_Bolt12InvoiceFeaturesDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_Bolt12InvoiceFeaturesDecodeErrorZ_is_ok(ptr)) { return new Result_Bolt12InvoiceFeaturesDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_Bolt12InvoiceFeaturesDecodeErrorZ extends CommonBase { * Creates a new CResult_Bolt12InvoiceFeaturesDecodeErrorZ in the success state. */ public static Result_Bolt12InvoiceFeaturesDecodeErrorZ ok(org.ldk.structs.Bolt12InvoiceFeatures o) { - long ret = bindings.CResult_Bolt12InvoiceFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_Bolt12InvoiceFeaturesDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_Bolt12InvoiceFeaturesDecodeErrorZ ret_hu_conv = Result_Bolt12InvoiceFeaturesDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_Bolt12OfferContextDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_Bolt12OfferContextDecodeErrorZ.java new file mode 100644 index 00000000..2534878e --- /dev/null +++ b/src/main/java/org/ldk/structs/Result_Bolt12OfferContextDecodeErrorZ.java @@ -0,0 +1,100 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + +public class Result_Bolt12OfferContextDecodeErrorZ extends CommonBase { + private Result_Bolt12OfferContextDecodeErrorZ(Object _dummy, long ptr) { super(ptr); } + protected void finalize() throws Throwable { + if (ptr != 0) { bindings.CResult_Bolt12OfferContextDecodeErrorZ_free(ptr); } super.finalize(); + } + + protected void force_free() { + if (ptr != 0) { bindings.CResult_Bolt12OfferContextDecodeErrorZ_free(ptr); ptr = 0; } + } + + static Result_Bolt12OfferContextDecodeErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_Bolt12OfferContextDecodeErrorZ_is_ok(ptr)) { + return new Result_Bolt12OfferContextDecodeErrorZ_OK(null, ptr); + } else { + return new Result_Bolt12OfferContextDecodeErrorZ_Err(null, ptr); + } + } + public static final class Result_Bolt12OfferContextDecodeErrorZ_OK extends Result_Bolt12OfferContextDecodeErrorZ { + public final Bolt12OfferContext res; + private Result_Bolt12OfferContextDecodeErrorZ_OK(Object _dummy, long ptr) { + super(_dummy, ptr); + long res = bindings.CResult_Bolt12OfferContextDecodeErrorZ_get_ok(ptr); + org.ldk.structs.Bolt12OfferContext res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.Bolt12OfferContext(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); }; + this.res = res_hu_conv; + } + } + + public static final class Result_Bolt12OfferContextDecodeErrorZ_Err extends Result_Bolt12OfferContextDecodeErrorZ { + public final DecodeError err; + private Result_Bolt12OfferContextDecodeErrorZ_Err(Object _dummy, long ptr) { + super(_dummy, ptr); + long err = bindings.CResult_Bolt12OfferContextDecodeErrorZ_get_err(ptr); + org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err); + if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); }; + this.err = err_hu_conv; + } + } + + /** + * Creates a new CResult_Bolt12OfferContextDecodeErrorZ in the success state. + */ + public static Result_Bolt12OfferContextDecodeErrorZ ok(org.ldk.structs.Bolt12OfferContext o) { + long ret = bindings.CResult_Bolt12OfferContextDecodeErrorZ_ok(o.ptr); + Reference.reachabilityFence(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_Bolt12OfferContextDecodeErrorZ ret_hu_conv = Result_Bolt12OfferContextDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_Bolt12OfferContextDecodeErrorZ in the error state. + */ + public static Result_Bolt12OfferContextDecodeErrorZ err(org.ldk.structs.DecodeError e) { + long ret = bindings.CResult_Bolt12OfferContextDecodeErrorZ_err(e.ptr); + Reference.reachabilityFence(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_Bolt12OfferContextDecodeErrorZ ret_hu_conv = Result_Bolt12OfferContextDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); }; + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public boolean is_ok() { + boolean ret = bindings.CResult_Bolt12OfferContextDecodeErrorZ_is_ok(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + long clone_ptr() { + long ret = bindings.CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a new CResult_Bolt12OfferContextDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_Bolt12OfferContextDecodeErrorZ clone() { + long ret = bindings.CResult_Bolt12OfferContextDecodeErrorZ_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_Bolt12OfferContextDecodeErrorZ ret_hu_conv = Result_Bolt12OfferContextDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/Result_Bolt12RefundContextDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_Bolt12RefundContextDecodeErrorZ.java new file mode 100644 index 00000000..55cbc6ba --- /dev/null +++ b/src/main/java/org/ldk/structs/Result_Bolt12RefundContextDecodeErrorZ.java @@ -0,0 +1,100 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + +public class Result_Bolt12RefundContextDecodeErrorZ extends CommonBase { + private Result_Bolt12RefundContextDecodeErrorZ(Object _dummy, long ptr) { super(ptr); } + protected void finalize() throws Throwable { + if (ptr != 0) { bindings.CResult_Bolt12RefundContextDecodeErrorZ_free(ptr); } super.finalize(); + } + + protected void force_free() { + if (ptr != 0) { bindings.CResult_Bolt12RefundContextDecodeErrorZ_free(ptr); ptr = 0; } + } + + static Result_Bolt12RefundContextDecodeErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_Bolt12RefundContextDecodeErrorZ_is_ok(ptr)) { + return new Result_Bolt12RefundContextDecodeErrorZ_OK(null, ptr); + } else { + return new Result_Bolt12RefundContextDecodeErrorZ_Err(null, ptr); + } + } + public static final class Result_Bolt12RefundContextDecodeErrorZ_OK extends Result_Bolt12RefundContextDecodeErrorZ { + public final Bolt12RefundContext res; + private Result_Bolt12RefundContextDecodeErrorZ_OK(Object _dummy, long ptr) { + super(_dummy, ptr); + long res = bindings.CResult_Bolt12RefundContextDecodeErrorZ_get_ok(ptr); + org.ldk.structs.Bolt12RefundContext res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.Bolt12RefundContext(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); }; + this.res = res_hu_conv; + } + } + + public static final class Result_Bolt12RefundContextDecodeErrorZ_Err extends Result_Bolt12RefundContextDecodeErrorZ { + public final DecodeError err; + private Result_Bolt12RefundContextDecodeErrorZ_Err(Object _dummy, long ptr) { + super(_dummy, ptr); + long err = bindings.CResult_Bolt12RefundContextDecodeErrorZ_get_err(ptr); + org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err); + if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); }; + this.err = err_hu_conv; + } + } + + /** + * Creates a new CResult_Bolt12RefundContextDecodeErrorZ in the success state. + */ + public static Result_Bolt12RefundContextDecodeErrorZ ok(org.ldk.structs.Bolt12RefundContext o) { + long ret = bindings.CResult_Bolt12RefundContextDecodeErrorZ_ok(o.ptr); + Reference.reachabilityFence(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_Bolt12RefundContextDecodeErrorZ ret_hu_conv = Result_Bolt12RefundContextDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_Bolt12RefundContextDecodeErrorZ in the error state. + */ + public static Result_Bolt12RefundContextDecodeErrorZ err(org.ldk.structs.DecodeError e) { + long ret = bindings.CResult_Bolt12RefundContextDecodeErrorZ_err(e.ptr); + Reference.reachabilityFence(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_Bolt12RefundContextDecodeErrorZ ret_hu_conv = Result_Bolt12RefundContextDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); }; + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public boolean is_ok() { + boolean ret = bindings.CResult_Bolt12RefundContextDecodeErrorZ_is_ok(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + long clone_ptr() { + long ret = bindings.CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a new CResult_Bolt12RefundContextDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_Bolt12RefundContextDecodeErrorZ clone() { + long ret = bindings.CResult_Bolt12RefundContextDecodeErrorZ_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_Bolt12RefundContextDecodeErrorZ ret_hu_conv = Result_Bolt12RefundContextDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/Result_BuiltCommitmentTransactionDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_BuiltCommitmentTransactionDecodeErrorZ.java index 950d36ea..82cc7840 100644 --- a/src/main/java/org/ldk/structs/Result_BuiltCommitmentTransactionDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_BuiltCommitmentTransactionDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_BuiltCommitmentTransactionDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_BuiltCommitmentTransactionDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_is_ok(ptr)) { return new Result_BuiltCommitmentTransactionDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_BuiltCommitmentTransactionDecodeErrorZ extends CommonBase { * Creates a new CResult_BuiltCommitmentTransactionDecodeErrorZ in the success state. */ public static Result_BuiltCommitmentTransactionDecodeErrorZ ok(org.ldk.structs.BuiltCommitmentTransaction o) { - long ret = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_BuiltCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_BuiltCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.java new file mode 100644 index 00000000..a0cdbcc3 --- /dev/null +++ b/src/main/java/org/ldk/structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.java @@ -0,0 +1,81 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + +public class Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ extends CommonBase { + private Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ(Object _dummy, long ptr) { super(ptr); } + protected void finalize() throws Throwable { + if (ptr != 0) { bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free(ptr); } super.finalize(); + } + + protected void force_free() { + if (ptr != 0) { bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free(ptr); ptr = 0; } + } + + static Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(ptr)) { + return new Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_OK(null, ptr); + } else { + return new Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_Err(null, ptr); + } + } + public static final class Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_OK extends Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ { + public final TwoTuple_BestBlockOutputSweeperZ res; + private Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_OK(Object _dummy, long ptr) { + super(_dummy, ptr); + long res = bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(ptr); + TwoTuple_BestBlockOutputSweeperZ res_hu_conv = new TwoTuple_BestBlockOutputSweeperZ(null, res); + if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); }; + this.res = res_hu_conv; + } + } + + public static final class Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_Err extends Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ { + public final DecodeError err; + private Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_Err(Object _dummy, long ptr) { + super(_dummy, ptr); + long err = bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(ptr); + org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err); + if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); }; + this.err = err_hu_conv; + } + } + + /** + * Creates a new CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ in the success state. + */ + public static Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ ok(org.ldk.structs.TwoTuple_BestBlockOutputSweeperZ o) { + long ret = bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok(o.ptr); + Reference.reachabilityFence(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Creates a new CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ in the error state. + */ + public static Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ err(org.ldk.structs.DecodeError e) { + long ret = bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err(e.ptr); + Reference.reachabilityFence(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); }; + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public boolean is_ok() { + boolean ret = bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + +} diff --git a/src/main/java/org/ldk/structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.java b/src/main/java/org/ldk/structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.java index 9b355c0f..dbd9cadb 100644 --- a/src/main/java/org/ldk/structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.java @@ -13,6 +13,10 @@ public class Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ extends CommonBase { if (ptr != 0) { bindings.CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ_free(ptr); ptr = 0; } + } + static Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ constr_from_ptr(long ptr) { if (bindings.CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ_is_ok(ptr)) { return new Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ_OK(null, ptr); @@ -41,7 +45,7 @@ public class Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ extends CommonBase { * Creates a new CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ in the success state. */ public static Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ ok(org.ldk.structs.TwoTuple_BlindedPayInfoBlindedPathZ o) { - long ret = bindings.CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ_ok(o != null ? o.ptr : 0); + long ret = bindings.CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ ret_hu_conv = Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.java b/src/main/java/org/ldk/structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.java index cf046b2e..b801ab69 100644 --- a/src/main/java/org/ldk/structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.java @@ -13,6 +13,10 @@ public class Result_C2Tuple_CVec_u8Zu64ZNoneZ extends CommonBase { if (ptr != 0) { bindings.CResult_C2Tuple_CVec_u8Zu64ZNoneZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_C2Tuple_CVec_u8Zu64ZNoneZ_free(ptr); ptr = 0; } + } + static Result_C2Tuple_CVec_u8Zu64ZNoneZ constr_from_ptr(long ptr) { if (bindings.CResult_C2Tuple_CVec_u8Zu64ZNoneZ_is_ok(ptr)) { return new Result_C2Tuple_CVec_u8Zu64ZNoneZ_OK(null, ptr); @@ -41,7 +45,7 @@ public class Result_C2Tuple_CVec_u8Zu64ZNoneZ extends CommonBase { * Creates a new CResult_C2Tuple_CVec_u8Zu64ZNoneZ in the success state. */ public static Result_C2Tuple_CVec_u8Zu64ZNoneZ ok(org.ldk.structs.TwoTuple_CVec_u8Zu64Z o) { - long ret = bindings.CResult_C2Tuple_CVec_u8Zu64ZNoneZ_ok(o != null ? o.ptr : 0); + long ret = bindings.CResult_C2Tuple_CVec_u8Zu64ZNoneZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_C2Tuple_CVec_u8Zu64ZNoneZ ret_hu_conv = Result_C2Tuple_CVec_u8Zu64ZNoneZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.java b/src/main/java/org/ldk/structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.java index 250d9eb4..aeda5411 100644 --- a/src/main/java/org/ldk/structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.java @@ -13,6 +13,10 @@ public class Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ extends Com if (ptr != 0) { bindings.CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_free(ptr); ptr = 0; } + } + static Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ constr_from_ptr(long ptr) { if (bindings.CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_is_ok(ptr)) { return new Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_OK(null, ptr); @@ -41,7 +45,7 @@ public class Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ extends Com * Creates a new CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ in the success state. */ public static Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ ok(org.ldk.structs.TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ o) { - long ret = bindings.CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_ok(o != null ? o.ptr : 0); + long ret = bindings.CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ ret_hu_conv = Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.java index ac6e16dd..16cbce6c 100644 --- a/src/main/java/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ extends Co if (ptr != 0) { bindings.CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_is_ok(ptr)) { return new Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ extends Co * Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ in the success state. */ public static Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ ok(org.ldk.structs.TwoTuple_ThirtyTwoBytesChannelManagerZ o) { - long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_ok(o != null ? o.ptr : 0); + long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ ret_hu_conv = Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.java index 7b90888f..c5e191c9 100644 --- a/src/main/java/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ extends Co if (ptr != 0) { bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_is_ok(ptr)) { return new Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ extends Co * Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ in the success state. */ public static Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ ok(org.ldk.structs.TwoTuple_ThirtyTwoBytesChannelMonitorZ o) { - long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_ok(o != null ? o.ptr : 0); + long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ ret_hu_conv = Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.java b/src/main/java/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.java index 4b3c5979..90be3b54 100644 --- a/src/main/java/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.java @@ -13,6 +13,10 @@ public class Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ extends Common if (ptr != 0) { bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_free(ptr); ptr = 0; } + } + static Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_is_ok(ptr)) { return new Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_OK(null, ptr); @@ -43,7 +47,7 @@ public class Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ extends Common * Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ in the success state. */ public static Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ ok(org.ldk.structs.TwoTuple_ThirtyTwoBytesChannelMonitorZ o) { - long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_ok(o != null ? o.ptr : 0); + long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ ret_hu_conv = Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.java b/src/main/java/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.java index 907955e2..ce082d71 100644 --- a/src/main/java/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.java @@ -13,6 +13,10 @@ public class Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ extends CommonBas if (ptr != 0) { bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_free(ptr); ptr = 0; } + } + static Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ constr_from_ptr(long ptr) { if (bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_is_ok(ptr)) { return new Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_OK(null, ptr); @@ -41,7 +45,7 @@ public class Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ extends CommonBas * Creates a new CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ in the success state. */ public static Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ ok(org.ldk.structs.TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ o) { - long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok(o != null ? o.ptr : 0); + long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ ret_hu_conv = Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.java b/src/main/java/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.java index 9ab468bf..c3cd1ccb 100644 --- a/src/main/java/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.java +++ b/src/main/java/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.java @@ -13,6 +13,10 @@ public class Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ ext if (ptr != 0) { bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_free(ptr); ptr = 0; } + } + static Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ constr_from_ptr(long ptr) { if (bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_is_ok(ptr)) { return new Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ ext * Creates a new CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ in the success state. */ public static Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ ok(org.ldk.structs.TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ o) { - long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_ok(o != null ? o.ptr : 0); + long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ ret_hu_conv = Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.java b/src/main/java/org/ldk/structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.java index 73f0e2ea..8e31a770 100644 --- a/src/main/java/org/ldk/structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.java @@ -13,6 +13,10 @@ public class Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSe if (ptr != 0) { bindings.CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_free(ptr); ptr = 0; } + } + static Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_is_ok(ptr)) { return new Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSe * Creates a new CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ in the success state. */ public static Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ ok(org.ldk.structs.ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ o) { - long ret = bindings.CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_ok(o != null ? o.ptr : 0); + long ret = bindings.CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ ret_hu_conv = Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.constr_from_ptr(ret); @@ -74,4 +78,22 @@ public class Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSe return ret; } + long clone_ptr() { + long ret = bindings.CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a new CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ clone() { + long ret = bindings.CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ ret_hu_conv = Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + } diff --git a/src/main/java/org/ldk/structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.java b/src/main/java/org/ldk/structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.java index 2d0ca841..724c48f9 100644 --- a/src/main/java/org/ldk/structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.java @@ -13,6 +13,10 @@ public class Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNo if (ptr != 0) { bindings.CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free(ptr); ptr = 0; } + } + static Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ constr_from_ptr(long ptr) { if (bindings.CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok(ptr)) { return new Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_OK(null, ptr); @@ -41,7 +45,7 @@ public class Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNo * Creates a new CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ in the success state. */ public static Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ ok(org.ldk.structs.ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ o) { - long ret = bindings.CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok(o != null ? o.ptr : 0); + long ret = bindings.CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ ret_hu_conv = Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_COption_APIErrorZDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_COption_APIErrorZDecodeErrorZ.java index d549e507..01947c94 100644 --- a/src/main/java/org/ldk/structs/Result_COption_APIErrorZDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_COption_APIErrorZDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_COption_APIErrorZDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_COption_APIErrorZDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_COption_APIErrorZDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_COption_APIErrorZDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_COption_APIErrorZDecodeErrorZ_is_ok(ptr)) { return new Result_COption_APIErrorZDecodeErrorZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_COption_ClosureReasonZDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_COption_ClosureReasonZDecodeErrorZ.java index 01e399da..ac6831ec 100644 --- a/src/main/java/org/ldk/structs/Result_COption_ClosureReasonZDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_COption_ClosureReasonZDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_COption_ClosureReasonZDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_COption_ClosureReasonZDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_COption_ClosureReasonZDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_COption_ClosureReasonZDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_COption_ClosureReasonZDecodeErrorZ_is_ok(ptr)) { return new Result_COption_ClosureReasonZDecodeErrorZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_COption_EventZDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_COption_EventZDecodeErrorZ.java index 97941634..11de4281 100644 --- a/src/main/java/org/ldk/structs/Result_COption_EventZDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_COption_EventZDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_COption_EventZDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_COption_EventZDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_COption_EventZDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_COption_EventZDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_COption_EventZDecodeErrorZ_is_ok(ptr)) { return new Result_COption_EventZDecodeErrorZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_COption_HTLCDestinationZDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_COption_HTLCDestinationZDecodeErrorZ.java index e147f1f0..a9f4097c 100644 --- a/src/main/java/org/ldk/structs/Result_COption_HTLCDestinationZDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_COption_HTLCDestinationZDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_COption_HTLCDestinationZDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_COption_HTLCDestinationZDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_COption_HTLCDestinationZDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_COption_HTLCDestinationZDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_COption_HTLCDestinationZDecodeErrorZ_is_ok(ptr)) { return new Result_COption_HTLCDestinationZDecodeErrorZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_COption_MonitorEventZDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_COption_MonitorEventZDecodeErrorZ.java index 427e9fae..52dd23c1 100644 --- a/src/main/java/org/ldk/structs/Result_COption_MonitorEventZDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_COption_MonitorEventZDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_COption_MonitorEventZDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_COption_MonitorEventZDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_COption_MonitorEventZDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_COption_MonitorEventZDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_COption_MonitorEventZDecodeErrorZ_is_ok(ptr)) { return new Result_COption_MonitorEventZDecodeErrorZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_COption_NetworkUpdateZDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_COption_NetworkUpdateZDecodeErrorZ.java index b8e241e1..329513e1 100644 --- a/src/main/java/org/ldk/structs/Result_COption_NetworkUpdateZDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_COption_NetworkUpdateZDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_COption_NetworkUpdateZDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_COption_NetworkUpdateZDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_COption_NetworkUpdateZDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_COption_NetworkUpdateZDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_COption_NetworkUpdateZDecodeErrorZ_is_ok(ptr)) { return new Result_COption_NetworkUpdateZDecodeErrorZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_COption_OnionMessageContentsZDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_COption_OnionMessageContentsZDecodeErrorZ.java index 43492616..d48fb1fe 100644 --- a/src/main/java/org/ldk/structs/Result_COption_OnionMessageContentsZDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_COption_OnionMessageContentsZDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_COption_OnionMessageContentsZDecodeErrorZ extends CommonBase if (ptr != 0) { bindings.CResult_COption_OnionMessageContentsZDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_COption_OnionMessageContentsZDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_COption_OnionMessageContentsZDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_COption_OnionMessageContentsZDecodeErrorZ_is_ok(ptr)) { return new Result_COption_OnionMessageContentsZDecodeErrorZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_COption_PathFailureZDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_COption_PathFailureZDecodeErrorZ.java index 3c4d8f2e..4fc09432 100644 --- a/src/main/java/org/ldk/structs/Result_COption_PathFailureZDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_COption_PathFailureZDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_COption_PathFailureZDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_COption_PathFailureZDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_COption_PathFailureZDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_COption_PathFailureZDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_COption_PathFailureZDecodeErrorZ_is_ok(ptr)) { return new Result_COption_PathFailureZDecodeErrorZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_COption_TypeZDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_COption_TypeZDecodeErrorZ.java index 210a7ef2..7f6903db 100644 --- a/src/main/java/org/ldk/structs/Result_COption_TypeZDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_COption_TypeZDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_COption_TypeZDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_COption_TypeZDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_COption_TypeZDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_COption_TypeZDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_COption_TypeZDecodeErrorZ_is_ok(ptr)) { return new Result_COption_TypeZDecodeErrorZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_CVec_BlindedPathZNoneZ.java b/src/main/java/org/ldk/structs/Result_CVec_BlindedPathZNoneZ.java index e539c7e0..d6a8765c 100644 --- a/src/main/java/org/ldk/structs/Result_CVec_BlindedPathZNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_CVec_BlindedPathZNoneZ.java @@ -13,6 +13,10 @@ public class Result_CVec_BlindedPathZNoneZ extends CommonBase { if (ptr != 0) { bindings.CResult_CVec_BlindedPathZNoneZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_CVec_BlindedPathZNoneZ_free(ptr); ptr = 0; } + } + static Result_CVec_BlindedPathZNoneZ constr_from_ptr(long ptr) { if (bindings.CResult_CVec_BlindedPathZNoneZ_is_ok(ptr)) { return new Result_CVec_BlindedPathZNoneZ_OK(null, ptr); @@ -47,7 +51,7 @@ public class Result_CVec_BlindedPathZNoneZ extends CommonBase { * Creates a new CResult_CVec_BlindedPathZNoneZ in the success state. */ public static Result_CVec_BlindedPathZNoneZ ok(BlindedPath[] o) { - long ret = bindings.CResult_CVec_BlindedPathZNoneZ_ok(o != null ? Arrays.stream(o).mapToLong(o_conv_13 -> o_conv_13 == null ? 0 : o_conv_13.ptr).toArray() : null); + long ret = bindings.CResult_CVec_BlindedPathZNoneZ_ok(o != null ? Arrays.stream(o).mapToLong(o_conv_13 -> o_conv_13.ptr).toArray() : null); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_CVec_BlindedPathZNoneZ ret_hu_conv = Result_CVec_BlindedPathZNoneZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.java b/src/main/java/org/ldk/structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.java index 242ff063..665ca480 100644 --- a/src/main/java/org/ldk/structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.java @@ -13,6 +13,10 @@ public class Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ extends Common if (ptr != 0) { bindings.CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_free(ptr); ptr = 0; } + } + static Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ constr_from_ptr(long ptr) { if (bindings.CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_is_ok(ptr)) { return new Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_OK(null, ptr); @@ -47,7 +51,7 @@ public class Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ extends Common * Creates a new CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ in the success state. */ public static Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ ok(TwoTuple_BlindedPayInfoBlindedPathZ[] o) { - long ret = bindings.CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_ok(o != null ? Arrays.stream(o).mapToLong(o_conv_37 -> o_conv_37 != null ? o_conv_37.ptr : 0).toArray() : null); + long ret = bindings.CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_ok(o != null ? Arrays.stream(o).mapToLong(o_conv_37 -> o_conv_37.ptr).toArray() : null); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ ret_hu_conv = Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.java b/src/main/java/org/ldk/structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.java index 8416d019..e9066752 100644 --- a/src/main/java/org/ldk/structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.java @@ -13,6 +13,10 @@ public class Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ extends if (ptr != 0) { bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_free(ptr); ptr = 0; } + } + static Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_is_ok(ptr)) { return new Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_OK(null, ptr); @@ -49,7 +53,7 @@ public class Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ extends * Creates a new CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ in the success state. */ public static Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ ok(TwoTuple_ThirtyTwoBytesChannelMonitorZ[] o) { - long ret = bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_ok(o != null ? Arrays.stream(o).mapToLong(o_conv_40 -> o_conv_40 != null ? o_conv_40.ptr : 0).toArray() : null); + long ret = bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_ok(o != null ? Arrays.stream(o).mapToLong(o_conv_40 -> o_conv_40.ptr).toArray() : null); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ ret_hu_conv = Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.java b/src/main/java/org/ldk/structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.java index e32bc767..a762cddc 100644 --- a/src/main/java/org/ldk/structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.java +++ b/src/main/java/org/ldk/structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.java @@ -13,6 +13,10 @@ public class Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ if (ptr != 0) { bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_free(ptr); ptr = 0; } + } + static Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ constr_from_ptr(long ptr) { if (bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_is_ok(ptr)) { return new Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_OK(null, ptr); @@ -52,7 +56,7 @@ public class Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ * Creates a new CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ in the success state. */ public static Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ ok(TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ[] o) { - long ret = bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_ok(o != null ? Arrays.stream(o).mapToLong(o_conv_40 -> o_conv_40 != null ? o_conv_40.ptr : 0).toArray() : null); + long ret = bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_ok(o != null ? Arrays.stream(o).mapToLong(o_conv_40 -> o_conv_40.ptr).toArray() : null); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ ret_hu_conv = Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_CVec_ECDSASignatureZNoneZ.java b/src/main/java/org/ldk/structs/Result_CVec_ECDSASignatureZNoneZ.java index 1c6f0d3b..a3867705 100644 --- a/src/main/java/org/ldk/structs/Result_CVec_ECDSASignatureZNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_CVec_ECDSASignatureZNoneZ.java @@ -13,6 +13,10 @@ public class Result_CVec_ECDSASignatureZNoneZ extends CommonBase { if (ptr != 0) { bindings.CResult_CVec_ECDSASignatureZNoneZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_CVec_ECDSASignatureZNoneZ_free(ptr); ptr = 0; } + } + static Result_CVec_ECDSASignatureZNoneZ constr_from_ptr(long ptr) { if (bindings.CResult_CVec_ECDSASignatureZNoneZ_is_ok(ptr)) { return new Result_CVec_ECDSASignatureZNoneZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_CVec_StrZIOErrorZ.java b/src/main/java/org/ldk/structs/Result_CVec_StrZIOErrorZ.java index cc4ac521..fe436db2 100644 --- a/src/main/java/org/ldk/structs/Result_CVec_StrZIOErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_CVec_StrZIOErrorZ.java @@ -13,6 +13,10 @@ public class Result_CVec_StrZIOErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_CVec_StrZIOErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_CVec_StrZIOErrorZ_free(ptr); ptr = 0; } + } + static Result_CVec_StrZIOErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_CVec_StrZIOErrorZ_is_ok(ptr)) { return new Result_CVec_StrZIOErrorZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_CVec_UtxoZNoneZ.java b/src/main/java/org/ldk/structs/Result_CVec_UtxoZNoneZ.java index 74a8ef41..5d655e53 100644 --- a/src/main/java/org/ldk/structs/Result_CVec_UtxoZNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_CVec_UtxoZNoneZ.java @@ -13,6 +13,10 @@ public class Result_CVec_UtxoZNoneZ extends CommonBase { if (ptr != 0) { bindings.CResult_CVec_UtxoZNoneZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_CVec_UtxoZNoneZ_free(ptr); ptr = 0; } + } + static Result_CVec_UtxoZNoneZ constr_from_ptr(long ptr) { if (bindings.CResult_CVec_UtxoZNoneZ_is_ok(ptr)) { return new Result_CVec_UtxoZNoneZ_OK(null, ptr); @@ -47,7 +51,7 @@ public class Result_CVec_UtxoZNoneZ extends CommonBase { * Creates a new CResult_CVec_UtxoZNoneZ in the success state. */ public static Result_CVec_UtxoZNoneZ ok(Utxo[] o) { - long ret = bindings.CResult_CVec_UtxoZNoneZ_ok(o != null ? Arrays.stream(o).mapToLong(o_conv_6 -> o_conv_6 == null ? 0 : o_conv_6.ptr).toArray() : null); + long ret = bindings.CResult_CVec_UtxoZNoneZ_ok(o != null ? Arrays.stream(o).mapToLong(o_conv_6 -> o_conv_6.ptr).toArray() : null); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_CVec_UtxoZNoneZ ret_hu_conv = Result_CVec_UtxoZNoneZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_CVec_u8ZIOErrorZ.java b/src/main/java/org/ldk/structs/Result_CVec_u8ZIOErrorZ.java index 047148d5..1e4888e5 100644 --- a/src/main/java/org/ldk/structs/Result_CVec_u8ZIOErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_CVec_u8ZIOErrorZ.java @@ -13,6 +13,10 @@ public class Result_CVec_u8ZIOErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_CVec_u8ZIOErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_CVec_u8ZIOErrorZ_free(ptr); ptr = 0; } + } + static Result_CVec_u8ZIOErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_CVec_u8ZIOErrorZ_is_ok(ptr)) { return new Result_CVec_u8ZIOErrorZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_CVec_u8ZNoneZ.java b/src/main/java/org/ldk/structs/Result_CVec_u8ZNoneZ.java index a0d450f6..a6021e9e 100644 --- a/src/main/java/org/ldk/structs/Result_CVec_u8ZNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_CVec_u8ZNoneZ.java @@ -13,6 +13,10 @@ public class Result_CVec_u8ZNoneZ extends CommonBase { if (ptr != 0) { bindings.CResult_CVec_u8ZNoneZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_CVec_u8ZNoneZ_free(ptr); ptr = 0; } + } + static Result_CVec_u8ZNoneZ constr_from_ptr(long ptr) { if (bindings.CResult_CVec_u8ZNoneZ_is_ok(ptr)) { return new Result_CVec_u8ZNoneZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_CVec_u8ZPeerHandleErrorZ.java b/src/main/java/org/ldk/structs/Result_CVec_u8ZPeerHandleErrorZ.java index 8b2b9ce7..d1bbc791 100644 --- a/src/main/java/org/ldk/structs/Result_CVec_u8ZPeerHandleErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_CVec_u8ZPeerHandleErrorZ.java @@ -13,6 +13,10 @@ public class Result_CVec_u8ZPeerHandleErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_CVec_u8ZPeerHandleErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_CVec_u8ZPeerHandleErrorZ_free(ptr); ptr = 0; } + } + static Result_CVec_u8ZPeerHandleErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_CVec_u8ZPeerHandleErrorZ_is_ok(ptr)) { return new Result_CVec_u8ZPeerHandleErrorZ_OK(null, ptr); @@ -54,7 +58,7 @@ public class Result_CVec_u8ZPeerHandleErrorZ extends CommonBase { * Creates a new CResult_CVec_u8ZPeerHandleErrorZ in the error state. */ public static Result_CVec_u8ZPeerHandleErrorZ err(org.ldk.structs.PeerHandleError e) { - long ret = bindings.CResult_CVec_u8ZPeerHandleErrorZ_err(e == null ? 0 : e.ptr); + long ret = bindings.CResult_CVec_u8ZPeerHandleErrorZ_err(e.ptr); Reference.reachabilityFence(e); if (ret >= 0 && ret <= 4096) { return null; } Result_CVec_u8ZPeerHandleErrorZ ret_hu_conv = Result_CVec_u8ZPeerHandleErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_ChannelAnnouncementDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelAnnouncementDecodeErrorZ.java index 0a658ef4..61313ceb 100644 --- a/src/main/java/org/ldk/structs/Result_ChannelAnnouncementDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ChannelAnnouncementDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_ChannelAnnouncementDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_ChannelAnnouncementDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_ChannelAnnouncementDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_ChannelAnnouncementDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_ChannelAnnouncementDecodeErrorZ_is_ok(ptr)) { return new Result_ChannelAnnouncementDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_ChannelAnnouncementDecodeErrorZ extends CommonBase { * Creates a new CResult_ChannelAnnouncementDecodeErrorZ in the success state. */ public static Result_ChannelAnnouncementDecodeErrorZ ok(org.ldk.structs.ChannelAnnouncement o) { - long ret = bindings.CResult_ChannelAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ChannelAnnouncementDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_ChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_ChannelConfigDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelConfigDecodeErrorZ.java index f11c6a46..ad213054 100644 --- a/src/main/java/org/ldk/structs/Result_ChannelConfigDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ChannelConfigDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_ChannelConfigDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_ChannelConfigDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_ChannelConfigDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_ChannelConfigDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_ChannelConfigDecodeErrorZ_is_ok(ptr)) { return new Result_ChannelConfigDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_ChannelConfigDecodeErrorZ extends CommonBase { * Creates a new CResult_ChannelConfigDecodeErrorZ in the success state. */ public static Result_ChannelConfigDecodeErrorZ ok(org.ldk.structs.ChannelConfig o) { - long ret = bindings.CResult_ChannelConfigDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ChannelConfigDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ChannelConfigDecodeErrorZ ret_hu_conv = Result_ChannelConfigDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_ChannelCounterpartyDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelCounterpartyDecodeErrorZ.java index be39ca20..974986ca 100644 --- a/src/main/java/org/ldk/structs/Result_ChannelCounterpartyDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ChannelCounterpartyDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_ChannelCounterpartyDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_ChannelCounterpartyDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_ChannelCounterpartyDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_ChannelCounterpartyDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_ChannelCounterpartyDecodeErrorZ_is_ok(ptr)) { return new Result_ChannelCounterpartyDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_ChannelCounterpartyDecodeErrorZ extends CommonBase { * Creates a new CResult_ChannelCounterpartyDecodeErrorZ in the success state. */ public static Result_ChannelCounterpartyDecodeErrorZ ok(org.ldk.structs.ChannelCounterparty o) { - long ret = bindings.CResult_ChannelCounterpartyDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ChannelCounterpartyDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ChannelCounterpartyDecodeErrorZ ret_hu_conv = Result_ChannelCounterpartyDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_ChannelDerivationParametersDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelDerivationParametersDecodeErrorZ.java index 7da2e629..a43619aa 100644 --- a/src/main/java/org/ldk/structs/Result_ChannelDerivationParametersDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ChannelDerivationParametersDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_ChannelDerivationParametersDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_ChannelDerivationParametersDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_ChannelDerivationParametersDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_ChannelDerivationParametersDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_ChannelDerivationParametersDecodeErrorZ_is_ok(ptr)) { return new Result_ChannelDerivationParametersDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_ChannelDerivationParametersDecodeErrorZ extends CommonBase { * Creates a new CResult_ChannelDerivationParametersDecodeErrorZ in the success state. */ public static Result_ChannelDerivationParametersDecodeErrorZ ok(org.ldk.structs.ChannelDerivationParameters o) { - long ret = bindings.CResult_ChannelDerivationParametersDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ChannelDerivationParametersDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ChannelDerivationParametersDecodeErrorZ ret_hu_conv = Result_ChannelDerivationParametersDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_ChannelDetailsDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelDetailsDecodeErrorZ.java index 0ed7390d..d552e370 100644 --- a/src/main/java/org/ldk/structs/Result_ChannelDetailsDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ChannelDetailsDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_ChannelDetailsDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_ChannelDetailsDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_ChannelDetailsDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_ChannelDetailsDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_ChannelDetailsDecodeErrorZ_is_ok(ptr)) { return new Result_ChannelDetailsDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_ChannelDetailsDecodeErrorZ extends CommonBase { * Creates a new CResult_ChannelDetailsDecodeErrorZ in the success state. */ public static Result_ChannelDetailsDecodeErrorZ ok(org.ldk.structs.ChannelDetails o) { - long ret = bindings.CResult_ChannelDetailsDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ChannelDetailsDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ChannelDetailsDecodeErrorZ ret_hu_conv = Result_ChannelDetailsDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_ChannelFeaturesDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelFeaturesDecodeErrorZ.java index dbe81743..5f89bd74 100644 --- a/src/main/java/org/ldk/structs/Result_ChannelFeaturesDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ChannelFeaturesDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_ChannelFeaturesDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_ChannelFeaturesDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_ChannelFeaturesDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_ChannelFeaturesDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_ChannelFeaturesDecodeErrorZ_is_ok(ptr)) { return new Result_ChannelFeaturesDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_ChannelFeaturesDecodeErrorZ extends CommonBase { * Creates a new CResult_ChannelFeaturesDecodeErrorZ in the success state. */ public static Result_ChannelFeaturesDecodeErrorZ ok(org.ldk.structs.ChannelFeatures o) { - long ret = bindings.CResult_ChannelFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ChannelFeaturesDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ChannelFeaturesDecodeErrorZ ret_hu_conv = Result_ChannelFeaturesDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_ChannelIdAPIErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelIdAPIErrorZ.java new file mode 100644 index 00000000..f07bda69 --- /dev/null +++ b/src/main/java/org/ldk/structs/Result_ChannelIdAPIErrorZ.java @@ -0,0 +1,100 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + +public class Result_ChannelIdAPIErrorZ extends CommonBase { + private Result_ChannelIdAPIErrorZ(Object _dummy, long ptr) { super(ptr); } + protected void finalize() throws Throwable { + if (ptr != 0) { bindings.CResult_ChannelIdAPIErrorZ_free(ptr); } super.finalize(); + } + + protected void force_free() { + if (ptr != 0) { bindings.CResult_ChannelIdAPIErrorZ_free(ptr); ptr = 0; } + } + + static Result_ChannelIdAPIErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_ChannelIdAPIErrorZ_is_ok(ptr)) { + return new Result_ChannelIdAPIErrorZ_OK(null, ptr); + } else { + return new Result_ChannelIdAPIErrorZ_Err(null, ptr); + } + } + public static final class Result_ChannelIdAPIErrorZ_OK extends Result_ChannelIdAPIErrorZ { + public final ChannelId res; + private Result_ChannelIdAPIErrorZ_OK(Object _dummy, long ptr) { + super(_dummy, ptr); + long res = bindings.CResult_ChannelIdAPIErrorZ_get_ok(ptr); + org.ldk.structs.ChannelId res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.ChannelId(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); }; + this.res = res_hu_conv; + } + } + + public static final class Result_ChannelIdAPIErrorZ_Err extends Result_ChannelIdAPIErrorZ { + public final APIError err; + private Result_ChannelIdAPIErrorZ_Err(Object _dummy, long ptr) { + super(_dummy, ptr); + long err = bindings.CResult_ChannelIdAPIErrorZ_get_err(ptr); + org.ldk.structs.APIError err_hu_conv = org.ldk.structs.APIError.constr_from_ptr(err); + if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); }; + this.err = err_hu_conv; + } + } + + /** + * Creates a new CResult_ChannelIdAPIErrorZ in the success state. + */ + public static Result_ChannelIdAPIErrorZ ok(org.ldk.structs.ChannelId o) { + long ret = bindings.CResult_ChannelIdAPIErrorZ_ok(o.ptr); + Reference.reachabilityFence(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_ChannelIdAPIErrorZ ret_hu_conv = Result_ChannelIdAPIErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_ChannelIdAPIErrorZ in the error state. + */ + public static Result_ChannelIdAPIErrorZ err(org.ldk.structs.APIError e) { + long ret = bindings.CResult_ChannelIdAPIErrorZ_err(e.ptr); + Reference.reachabilityFence(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_ChannelIdAPIErrorZ ret_hu_conv = Result_ChannelIdAPIErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); }; + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public boolean is_ok() { + boolean ret = bindings.CResult_ChannelIdAPIErrorZ_is_ok(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + long clone_ptr() { + long ret = bindings.CResult_ChannelIdAPIErrorZ_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a new CResult_ChannelIdAPIErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_ChannelIdAPIErrorZ clone() { + long ret = bindings.CResult_ChannelIdAPIErrorZ_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_ChannelIdAPIErrorZ ret_hu_conv = Result_ChannelIdAPIErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/Result_ChannelIdDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelIdDecodeErrorZ.java new file mode 100644 index 00000000..2859b766 --- /dev/null +++ b/src/main/java/org/ldk/structs/Result_ChannelIdDecodeErrorZ.java @@ -0,0 +1,100 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + +public class Result_ChannelIdDecodeErrorZ extends CommonBase { + private Result_ChannelIdDecodeErrorZ(Object _dummy, long ptr) { super(ptr); } + protected void finalize() throws Throwable { + if (ptr != 0) { bindings.CResult_ChannelIdDecodeErrorZ_free(ptr); } super.finalize(); + } + + protected void force_free() { + if (ptr != 0) { bindings.CResult_ChannelIdDecodeErrorZ_free(ptr); ptr = 0; } + } + + static Result_ChannelIdDecodeErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_ChannelIdDecodeErrorZ_is_ok(ptr)) { + return new Result_ChannelIdDecodeErrorZ_OK(null, ptr); + } else { + return new Result_ChannelIdDecodeErrorZ_Err(null, ptr); + } + } + public static final class Result_ChannelIdDecodeErrorZ_OK extends Result_ChannelIdDecodeErrorZ { + public final ChannelId res; + private Result_ChannelIdDecodeErrorZ_OK(Object _dummy, long ptr) { + super(_dummy, ptr); + long res = bindings.CResult_ChannelIdDecodeErrorZ_get_ok(ptr); + org.ldk.structs.ChannelId res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.ChannelId(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); }; + this.res = res_hu_conv; + } + } + + public static final class Result_ChannelIdDecodeErrorZ_Err extends Result_ChannelIdDecodeErrorZ { + public final DecodeError err; + private Result_ChannelIdDecodeErrorZ_Err(Object _dummy, long ptr) { + super(_dummy, ptr); + long err = bindings.CResult_ChannelIdDecodeErrorZ_get_err(ptr); + org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err); + if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); }; + this.err = err_hu_conv; + } + } + + /** + * Creates a new CResult_ChannelIdDecodeErrorZ in the success state. + */ + public static Result_ChannelIdDecodeErrorZ ok(org.ldk.structs.ChannelId o) { + long ret = bindings.CResult_ChannelIdDecodeErrorZ_ok(o.ptr); + Reference.reachabilityFence(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_ChannelIdDecodeErrorZ ret_hu_conv = Result_ChannelIdDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_ChannelIdDecodeErrorZ in the error state. + */ + public static Result_ChannelIdDecodeErrorZ err(org.ldk.structs.DecodeError e) { + long ret = bindings.CResult_ChannelIdDecodeErrorZ_err(e.ptr); + Reference.reachabilityFence(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_ChannelIdDecodeErrorZ ret_hu_conv = Result_ChannelIdDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); }; + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public boolean is_ok() { + boolean ret = bindings.CResult_ChannelIdDecodeErrorZ_is_ok(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + long clone_ptr() { + long ret = bindings.CResult_ChannelIdDecodeErrorZ_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a new CResult_ChannelIdDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_ChannelIdDecodeErrorZ clone() { + long ret = bindings.CResult_ChannelIdDecodeErrorZ_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_ChannelIdDecodeErrorZ ret_hu_conv = Result_ChannelIdDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/Result_ChannelInfoDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelInfoDecodeErrorZ.java index 38da077b..8ac44525 100644 --- a/src/main/java/org/ldk/structs/Result_ChannelInfoDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ChannelInfoDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_ChannelInfoDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_ChannelInfoDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_ChannelInfoDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_ChannelInfoDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_ChannelInfoDecodeErrorZ_is_ok(ptr)) { return new Result_ChannelInfoDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_ChannelInfoDecodeErrorZ extends CommonBase { * Creates a new CResult_ChannelInfoDecodeErrorZ in the success state. */ public static Result_ChannelInfoDecodeErrorZ ok(org.ldk.structs.ChannelInfo o) { - long ret = bindings.CResult_ChannelInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ChannelInfoDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ChannelInfoDecodeErrorZ ret_hu_conv = Result_ChannelInfoDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_ChannelMonitorUpdateDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelMonitorUpdateDecodeErrorZ.java index cfd46659..08374261 100644 --- a/src/main/java/org/ldk/structs/Result_ChannelMonitorUpdateDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ChannelMonitorUpdateDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_ChannelMonitorUpdateDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_ChannelMonitorUpdateDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_is_ok(ptr)) { return new Result_ChannelMonitorUpdateDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_ChannelMonitorUpdateDecodeErrorZ extends CommonBase { * Creates a new CResult_ChannelMonitorUpdateDecodeErrorZ in the success state. */ public static Result_ChannelMonitorUpdateDecodeErrorZ ok(org.ldk.structs.ChannelMonitorUpdate o) { - long ret = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ChannelMonitorUpdateDecodeErrorZ ret_hu_conv = Result_ChannelMonitorUpdateDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_ChannelMonitorUpdateStatusNoneZ.java b/src/main/java/org/ldk/structs/Result_ChannelMonitorUpdateStatusNoneZ.java index e1f81471..1e587967 100644 --- a/src/main/java/org/ldk/structs/Result_ChannelMonitorUpdateStatusNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_ChannelMonitorUpdateStatusNoneZ.java @@ -13,6 +13,10 @@ public class Result_ChannelMonitorUpdateStatusNoneZ extends CommonBase { if (ptr != 0) { bindings.CResult_ChannelMonitorUpdateStatusNoneZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_ChannelMonitorUpdateStatusNoneZ_free(ptr); ptr = 0; } + } + static Result_ChannelMonitorUpdateStatusNoneZ constr_from_ptr(long ptr) { if (bindings.CResult_ChannelMonitorUpdateStatusNoneZ_is_ok(ptr)) { return new Result_ChannelMonitorUpdateStatusNoneZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_ChannelPublicKeysDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelPublicKeysDecodeErrorZ.java index 66e82f04..cad6c6d1 100644 --- a/src/main/java/org/ldk/structs/Result_ChannelPublicKeysDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ChannelPublicKeysDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_ChannelPublicKeysDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_ChannelPublicKeysDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_ChannelPublicKeysDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_ChannelPublicKeysDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_ChannelPublicKeysDecodeErrorZ_is_ok(ptr)) { return new Result_ChannelPublicKeysDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_ChannelPublicKeysDecodeErrorZ extends CommonBase { * Creates a new CResult_ChannelPublicKeysDecodeErrorZ in the success state. */ public static Result_ChannelPublicKeysDecodeErrorZ ok(org.ldk.structs.ChannelPublicKeys o) { - long ret = bindings.CResult_ChannelPublicKeysDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ChannelPublicKeysDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ChannelPublicKeysDecodeErrorZ ret_hu_conv = Result_ChannelPublicKeysDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_ChannelReadyDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelReadyDecodeErrorZ.java index c1e395f3..6924ba76 100644 --- a/src/main/java/org/ldk/structs/Result_ChannelReadyDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ChannelReadyDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_ChannelReadyDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_ChannelReadyDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_ChannelReadyDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_ChannelReadyDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_ChannelReadyDecodeErrorZ_is_ok(ptr)) { return new Result_ChannelReadyDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_ChannelReadyDecodeErrorZ extends CommonBase { * Creates a new CResult_ChannelReadyDecodeErrorZ in the success state. */ public static Result_ChannelReadyDecodeErrorZ ok(org.ldk.structs.ChannelReady o) { - long ret = bindings.CResult_ChannelReadyDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ChannelReadyDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ChannelReadyDecodeErrorZ ret_hu_conv = Result_ChannelReadyDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_ChannelReestablishDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelReestablishDecodeErrorZ.java index 0855b800..19a55604 100644 --- a/src/main/java/org/ldk/structs/Result_ChannelReestablishDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ChannelReestablishDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_ChannelReestablishDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_ChannelReestablishDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_ChannelReestablishDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_ChannelReestablishDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_ChannelReestablishDecodeErrorZ_is_ok(ptr)) { return new Result_ChannelReestablishDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_ChannelReestablishDecodeErrorZ extends CommonBase { * Creates a new CResult_ChannelReestablishDecodeErrorZ in the success state. */ public static Result_ChannelReestablishDecodeErrorZ ok(org.ldk.structs.ChannelReestablish o) { - long ret = bindings.CResult_ChannelReestablishDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ChannelReestablishDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ChannelReestablishDecodeErrorZ ret_hu_conv = Result_ChannelReestablishDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_ChannelShutdownStateDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelShutdownStateDecodeErrorZ.java index fdd92696..a2bc6c33 100644 --- a/src/main/java/org/ldk/structs/Result_ChannelShutdownStateDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ChannelShutdownStateDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_ChannelShutdownStateDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_ChannelShutdownStateDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_ChannelShutdownStateDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_ChannelShutdownStateDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_ChannelShutdownStateDecodeErrorZ_is_ok(ptr)) { return new Result_ChannelShutdownStateDecodeErrorZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_ChannelTransactionParametersDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelTransactionParametersDecodeErrorZ.java index 6a293d18..8e1b0a5f 100644 --- a/src/main/java/org/ldk/structs/Result_ChannelTransactionParametersDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ChannelTransactionParametersDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_ChannelTransactionParametersDecodeErrorZ extends CommonBase if (ptr != 0) { bindings.CResult_ChannelTransactionParametersDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_ChannelTransactionParametersDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_ChannelTransactionParametersDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_ChannelTransactionParametersDecodeErrorZ_is_ok(ptr)) { return new Result_ChannelTransactionParametersDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_ChannelTransactionParametersDecodeErrorZ extends CommonBase * Creates a new CResult_ChannelTransactionParametersDecodeErrorZ in the success state. */ public static Result_ChannelTransactionParametersDecodeErrorZ ok(org.ldk.structs.ChannelTransactionParameters o) { - long ret = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_ChannelTypeFeaturesDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelTypeFeaturesDecodeErrorZ.java index d72b8edb..e485a360 100644 --- a/src/main/java/org/ldk/structs/Result_ChannelTypeFeaturesDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ChannelTypeFeaturesDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_ChannelTypeFeaturesDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_ChannelTypeFeaturesDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_ChannelTypeFeaturesDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_ChannelTypeFeaturesDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok(ptr)) { return new Result_ChannelTypeFeaturesDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_ChannelTypeFeaturesDecodeErrorZ extends CommonBase { * Creates a new CResult_ChannelTypeFeaturesDecodeErrorZ in the success state. */ public static Result_ChannelTypeFeaturesDecodeErrorZ ok(org.ldk.structs.ChannelTypeFeatures o) { - long ret = bindings.CResult_ChannelTypeFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ChannelTypeFeaturesDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ChannelTypeFeaturesDecodeErrorZ ret_hu_conv = Result_ChannelTypeFeaturesDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_ChannelUpdateDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelUpdateDecodeErrorZ.java index a9849cdd..ce7b2f30 100644 --- a/src/main/java/org/ldk/structs/Result_ChannelUpdateDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ChannelUpdateDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_ChannelUpdateDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_ChannelUpdateDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_ChannelUpdateDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_ChannelUpdateDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_ChannelUpdateDecodeErrorZ_is_ok(ptr)) { return new Result_ChannelUpdateDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_ChannelUpdateDecodeErrorZ extends CommonBase { * Creates a new CResult_ChannelUpdateDecodeErrorZ in the success state. */ public static Result_ChannelUpdateDecodeErrorZ ok(org.ldk.structs.ChannelUpdate o) { - long ret = bindings.CResult_ChannelUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ChannelUpdateDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ChannelUpdateDecodeErrorZ ret_hu_conv = Result_ChannelUpdateDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_ChannelUpdateInfoDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelUpdateInfoDecodeErrorZ.java index 8648d4d9..f80e32ba 100644 --- a/src/main/java/org/ldk/structs/Result_ChannelUpdateInfoDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ChannelUpdateInfoDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_ChannelUpdateInfoDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_ChannelUpdateInfoDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_ChannelUpdateInfoDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_ChannelUpdateInfoDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_ChannelUpdateInfoDecodeErrorZ_is_ok(ptr)) { return new Result_ChannelUpdateInfoDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_ChannelUpdateInfoDecodeErrorZ extends CommonBase { * Creates a new CResult_ChannelUpdateInfoDecodeErrorZ in the success state. */ public static Result_ChannelUpdateInfoDecodeErrorZ ok(org.ldk.structs.ChannelUpdateInfo o) { - long ret = bindings.CResult_ChannelUpdateInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ChannelUpdateInfoDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ChannelUpdateInfoDecodeErrorZ ret_hu_conv = Result_ChannelUpdateInfoDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_ClaimedHTLCDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ClaimedHTLCDecodeErrorZ.java index 842ceb74..b565a2c5 100644 --- a/src/main/java/org/ldk/structs/Result_ClaimedHTLCDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ClaimedHTLCDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_ClaimedHTLCDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_ClaimedHTLCDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_ClaimedHTLCDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_ClaimedHTLCDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_ClaimedHTLCDecodeErrorZ_is_ok(ptr)) { return new Result_ClaimedHTLCDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_ClaimedHTLCDecodeErrorZ extends CommonBase { * Creates a new CResult_ClaimedHTLCDecodeErrorZ in the success state. */ public static Result_ClaimedHTLCDecodeErrorZ ok(org.ldk.structs.ClaimedHTLC o) { - long ret = bindings.CResult_ClaimedHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ClaimedHTLCDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ClaimedHTLCDecodeErrorZ ret_hu_conv = Result_ClaimedHTLCDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_ClosingSignedDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ClosingSignedDecodeErrorZ.java index e1e3d217..9bcfa2df 100644 --- a/src/main/java/org/ldk/structs/Result_ClosingSignedDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ClosingSignedDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_ClosingSignedDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_ClosingSignedDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_ClosingSignedDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_ClosingSignedDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_ClosingSignedDecodeErrorZ_is_ok(ptr)) { return new Result_ClosingSignedDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_ClosingSignedDecodeErrorZ extends CommonBase { * Creates a new CResult_ClosingSignedDecodeErrorZ in the success state. */ public static Result_ClosingSignedDecodeErrorZ ok(org.ldk.structs.ClosingSigned o) { - long ret = bindings.CResult_ClosingSignedDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ClosingSignedDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ClosingSignedDecodeErrorZ ret_hu_conv = Result_ClosingSignedDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_ClosingSignedFeeRangeDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ClosingSignedFeeRangeDecodeErrorZ.java index b3f37dbe..9f8bfbef 100644 --- a/src/main/java/org/ldk/structs/Result_ClosingSignedFeeRangeDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ClosingSignedFeeRangeDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_ClosingSignedFeeRangeDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_ClosingSignedFeeRangeDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_is_ok(ptr)) { return new Result_ClosingSignedFeeRangeDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_ClosingSignedFeeRangeDecodeErrorZ extends CommonBase { * Creates a new CResult_ClosingSignedFeeRangeDecodeErrorZ in the success state. */ public static Result_ClosingSignedFeeRangeDecodeErrorZ ok(org.ldk.structs.ClosingSignedFeeRange o) { - long ret = bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ClosingSignedFeeRangeDecodeErrorZ ret_hu_conv = Result_ClosingSignedFeeRangeDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_CoinSelectionNoneZ.java b/src/main/java/org/ldk/structs/Result_CoinSelectionNoneZ.java index 4e01174c..d8d6ca93 100644 --- a/src/main/java/org/ldk/structs/Result_CoinSelectionNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_CoinSelectionNoneZ.java @@ -13,6 +13,10 @@ public class Result_CoinSelectionNoneZ extends CommonBase { if (ptr != 0) { bindings.CResult_CoinSelectionNoneZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_CoinSelectionNoneZ_free(ptr); ptr = 0; } + } + static Result_CoinSelectionNoneZ constr_from_ptr(long ptr) { if (bindings.CResult_CoinSelectionNoneZ_is_ok(ptr)) { return new Result_CoinSelectionNoneZ_OK(null, ptr); @@ -41,7 +45,7 @@ public class Result_CoinSelectionNoneZ extends CommonBase { * Creates a new CResult_CoinSelectionNoneZ in the success state. */ public static Result_CoinSelectionNoneZ ok(org.ldk.structs.CoinSelection o) { - long ret = bindings.CResult_CoinSelectionNoneZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_CoinSelectionNoneZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_CoinSelectionNoneZ ret_hu_conv = Result_CoinSelectionNoneZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_CommitmentSignedDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_CommitmentSignedDecodeErrorZ.java index c1ba1c82..081b57c8 100644 --- a/src/main/java/org/ldk/structs/Result_CommitmentSignedDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_CommitmentSignedDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_CommitmentSignedDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_CommitmentSignedDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_CommitmentSignedDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_CommitmentSignedDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_CommitmentSignedDecodeErrorZ_is_ok(ptr)) { return new Result_CommitmentSignedDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_CommitmentSignedDecodeErrorZ extends CommonBase { * Creates a new CResult_CommitmentSignedDecodeErrorZ in the success state. */ public static Result_CommitmentSignedDecodeErrorZ ok(org.ldk.structs.CommitmentSigned o) { - long ret = bindings.CResult_CommitmentSignedDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_CommitmentSignedDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_CommitmentSignedDecodeErrorZ ret_hu_conv = Result_CommitmentSignedDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_CommitmentTransactionDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_CommitmentTransactionDecodeErrorZ.java index 76678e81..2f2a2627 100644 --- a/src/main/java/org/ldk/structs/Result_CommitmentTransactionDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_CommitmentTransactionDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_CommitmentTransactionDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_CommitmentTransactionDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_CommitmentTransactionDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_CommitmentTransactionDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_CommitmentTransactionDecodeErrorZ_is_ok(ptr)) { return new Result_CommitmentTransactionDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_CommitmentTransactionDecodeErrorZ extends CommonBase { * Creates a new CResult_CommitmentTransactionDecodeErrorZ in the success state. */ public static Result_CommitmentTransactionDecodeErrorZ ok(org.ldk.structs.CommitmentTransaction o) { - long ret = bindings.CResult_CommitmentTransactionDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_CommitmentTransactionDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_CommitmentTransactionDecodeErrorZ ret_hu_conv = Result_CommitmentTransactionDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.java index e9a67e08..2dbd8abf 100644 --- a/src/main/java/org/ldk/structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_CounterpartyChannelTransactionParametersDecodeErrorZ extends if (ptr != 0) { bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_CounterpartyChannelTransactionParametersDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_is_ok(ptr)) { return new Result_CounterpartyChannelTransactionParametersDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_CounterpartyChannelTransactionParametersDecodeErrorZ extends * Creates a new CResult_CounterpartyChannelTransactionParametersDecodeErrorZ in the success state. */ public static Result_CounterpartyChannelTransactionParametersDecodeErrorZ ok(org.ldk.structs.CounterpartyChannelTransactionParameters o) { - long ret = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_CounterpartyChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_CounterpartyChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.java index b4c513d3..e5d22b14 100644 --- a/src/main/java/org/ldk/structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_CounterpartyCommitmentSecretsDecodeErrorZ extends CommonBase if (ptr != 0) { bindings.CResult_CounterpartyCommitmentSecretsDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_CounterpartyCommitmentSecretsDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_CounterpartyCommitmentSecretsDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_CounterpartyCommitmentSecretsDecodeErrorZ_is_ok(ptr)) { return new Result_CounterpartyCommitmentSecretsDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_CounterpartyCommitmentSecretsDecodeErrorZ extends CommonBase * Creates a new CResult_CounterpartyCommitmentSecretsDecodeErrorZ in the success state. */ public static Result_CounterpartyCommitmentSecretsDecodeErrorZ ok(org.ldk.structs.CounterpartyCommitmentSecrets o) { - long ret = bindings.CResult_CounterpartyCommitmentSecretsDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_CounterpartyCommitmentSecretsDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_CounterpartyCommitmentSecretsDecodeErrorZ ret_hu_conv = Result_CounterpartyCommitmentSecretsDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_CounterpartyForwardingInfoDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_CounterpartyForwardingInfoDecodeErrorZ.java index bb415a5e..fc5f8f59 100644 --- a/src/main/java/org/ldk/structs/Result_CounterpartyForwardingInfoDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_CounterpartyForwardingInfoDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_CounterpartyForwardingInfoDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_CounterpartyForwardingInfoDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_CounterpartyForwardingInfoDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_CounterpartyForwardingInfoDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_CounterpartyForwardingInfoDecodeErrorZ_is_ok(ptr)) { return new Result_CounterpartyForwardingInfoDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_CounterpartyForwardingInfoDecodeErrorZ extends CommonBase { * Creates a new CResult_CounterpartyForwardingInfoDecodeErrorZ in the success state. */ public static Result_CounterpartyForwardingInfoDecodeErrorZ ok(org.ldk.structs.CounterpartyForwardingInfo o) { - long ret = bindings.CResult_CounterpartyForwardingInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_CounterpartyForwardingInfoDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_CounterpartyForwardingInfoDecodeErrorZ ret_hu_conv = Result_CounterpartyForwardingInfoDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_DelayedPaymentBasepointDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_DelayedPaymentBasepointDecodeErrorZ.java index 671f391c..860921c3 100644 --- a/src/main/java/org/ldk/structs/Result_DelayedPaymentBasepointDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_DelayedPaymentBasepointDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_DelayedPaymentBasepointDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_DelayedPaymentBasepointDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_DelayedPaymentBasepointDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_DelayedPaymentBasepointDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_DelayedPaymentBasepointDecodeErrorZ_is_ok(ptr)) { return new Result_DelayedPaymentBasepointDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_DelayedPaymentBasepointDecodeErrorZ extends CommonBase { * Creates a new CResult_DelayedPaymentBasepointDecodeErrorZ in the success state. */ public static Result_DelayedPaymentBasepointDecodeErrorZ ok(org.ldk.structs.DelayedPaymentBasepoint o) { - long ret = bindings.CResult_DelayedPaymentBasepointDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_DelayedPaymentBasepointDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_DelayedPaymentBasepointDecodeErrorZ ret_hu_conv = Result_DelayedPaymentBasepointDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_DelayedPaymentKeyDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_DelayedPaymentKeyDecodeErrorZ.java index fcbc55b9..ba4a1548 100644 --- a/src/main/java/org/ldk/structs/Result_DelayedPaymentKeyDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_DelayedPaymentKeyDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_DelayedPaymentKeyDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_DelayedPaymentKeyDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_DelayedPaymentKeyDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_DelayedPaymentKeyDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_DelayedPaymentKeyDecodeErrorZ_is_ok(ptr)) { return new Result_DelayedPaymentKeyDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_DelayedPaymentKeyDecodeErrorZ extends CommonBase { * Creates a new CResult_DelayedPaymentKeyDecodeErrorZ in the success state. */ public static Result_DelayedPaymentKeyDecodeErrorZ ok(org.ldk.structs.DelayedPaymentKey o) { - long ret = bindings.CResult_DelayedPaymentKeyDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_DelayedPaymentKeyDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_DelayedPaymentKeyDecodeErrorZ ret_hu_conv = Result_DelayedPaymentKeyDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.java index 81f5d24f..a5dbe2de 100644 --- a/src/main/java/org/ldk/structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_DelayedPaymentOutputDescriptorDecodeErrorZ extends CommonBas if (ptr != 0) { bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_DelayedPaymentOutputDescriptorDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_is_ok(ptr)) { return new Result_DelayedPaymentOutputDescriptorDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_DelayedPaymentOutputDescriptorDecodeErrorZ extends CommonBas * Creates a new CResult_DelayedPaymentOutputDescriptorDecodeErrorZ in the success state. */ public static Result_DelayedPaymentOutputDescriptorDecodeErrorZ ok(org.ldk.structs.DelayedPaymentOutputDescriptor o) { - long ret = bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_DelayedPaymentOutputDescriptorDecodeErrorZ ret_hu_conv = Result_DelayedPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_DescriptionCreationErrorZ.java b/src/main/java/org/ldk/structs/Result_DescriptionCreationErrorZ.java index f141a163..86aaf524 100644 --- a/src/main/java/org/ldk/structs/Result_DescriptionCreationErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_DescriptionCreationErrorZ.java @@ -13,6 +13,10 @@ public class Result_DescriptionCreationErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_DescriptionCreationErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_DescriptionCreationErrorZ_free(ptr); ptr = 0; } + } + static Result_DescriptionCreationErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_DescriptionCreationErrorZ_is_ok(ptr)) { return new Result_DescriptionCreationErrorZ_OK(null, ptr); @@ -43,7 +47,7 @@ public class Result_DescriptionCreationErrorZ extends CommonBase { * Creates a new CResult_DescriptionCreationErrorZ in the success state. */ public static Result_DescriptionCreationErrorZ ok(org.ldk.structs.Description o) { - long ret = bindings.CResult_DescriptionCreationErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_DescriptionCreationErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_DescriptionCreationErrorZ ret_hu_conv = Result_DescriptionCreationErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_ECDSASignatureNoneZ.java b/src/main/java/org/ldk/structs/Result_ECDSASignatureNoneZ.java index 7e32f8e4..78f03cc1 100644 --- a/src/main/java/org/ldk/structs/Result_ECDSASignatureNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_ECDSASignatureNoneZ.java @@ -13,6 +13,10 @@ public class Result_ECDSASignatureNoneZ extends CommonBase { if (ptr != 0) { bindings.CResult_ECDSASignatureNoneZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_ECDSASignatureNoneZ_free(ptr); ptr = 0; } + } + static Result_ECDSASignatureNoneZ constr_from_ptr(long ptr) { if (bindings.CResult_ECDSASignatureNoneZ_is_ok(ptr)) { return new Result_ECDSASignatureNoneZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_ErrorMessageDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ErrorMessageDecodeErrorZ.java index 53bc8baf..ff8ca532 100644 --- a/src/main/java/org/ldk/structs/Result_ErrorMessageDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ErrorMessageDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_ErrorMessageDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_ErrorMessageDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_ErrorMessageDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_ErrorMessageDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_ErrorMessageDecodeErrorZ_is_ok(ptr)) { return new Result_ErrorMessageDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_ErrorMessageDecodeErrorZ extends CommonBase { * Creates a new CResult_ErrorMessageDecodeErrorZ in the success state. */ public static Result_ErrorMessageDecodeErrorZ ok(org.ldk.structs.ErrorMessage o) { - long ret = bindings.CResult_ErrorMessageDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ErrorMessageDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ErrorMessageDecodeErrorZ ret_hu_conv = Result_ErrorMessageDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_FinalOnionHopDataDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_FinalOnionHopDataDecodeErrorZ.java index c21157f3..7933c85f 100644 --- a/src/main/java/org/ldk/structs/Result_FinalOnionHopDataDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_FinalOnionHopDataDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_FinalOnionHopDataDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_FinalOnionHopDataDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_FinalOnionHopDataDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_FinalOnionHopDataDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_FinalOnionHopDataDecodeErrorZ_is_ok(ptr)) { return new Result_FinalOnionHopDataDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_FinalOnionHopDataDecodeErrorZ extends CommonBase { * Creates a new CResult_FinalOnionHopDataDecodeErrorZ in the success state. */ public static Result_FinalOnionHopDataDecodeErrorZ ok(org.ldk.structs.FinalOnionHopData o) { - long ret = bindings.CResult_FinalOnionHopDataDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_FinalOnionHopDataDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_FinalOnionHopDataDecodeErrorZ ret_hu_conv = Result_FinalOnionHopDataDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_FixedPenaltyScorerDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_FixedPenaltyScorerDecodeErrorZ.java index 24ce57de..8b5079be 100644 --- a/src/main/java/org/ldk/structs/Result_FixedPenaltyScorerDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_FixedPenaltyScorerDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_FixedPenaltyScorerDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_FixedPenaltyScorerDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_FixedPenaltyScorerDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_FixedPenaltyScorerDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_FixedPenaltyScorerDecodeErrorZ_is_ok(ptr)) { return new Result_FixedPenaltyScorerDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_FixedPenaltyScorerDecodeErrorZ extends CommonBase { * Creates a new CResult_FixedPenaltyScorerDecodeErrorZ in the success state. */ public static Result_FixedPenaltyScorerDecodeErrorZ ok(org.ldk.structs.FixedPenaltyScorer o) { - long ret = bindings.CResult_FixedPenaltyScorerDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_FixedPenaltyScorerDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_FixedPenaltyScorerDecodeErrorZ ret_hu_conv = Result_FixedPenaltyScorerDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_FundingCreatedDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_FundingCreatedDecodeErrorZ.java index 0625eb8b..bbff99a0 100644 --- a/src/main/java/org/ldk/structs/Result_FundingCreatedDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_FundingCreatedDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_FundingCreatedDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_FundingCreatedDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_FundingCreatedDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_FundingCreatedDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_FundingCreatedDecodeErrorZ_is_ok(ptr)) { return new Result_FundingCreatedDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_FundingCreatedDecodeErrorZ extends CommonBase { * Creates a new CResult_FundingCreatedDecodeErrorZ in the success state. */ public static Result_FundingCreatedDecodeErrorZ ok(org.ldk.structs.FundingCreated o) { - long ret = bindings.CResult_FundingCreatedDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_FundingCreatedDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_FundingCreatedDecodeErrorZ ret_hu_conv = Result_FundingCreatedDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_FundingSignedDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_FundingSignedDecodeErrorZ.java index 8037ac37..b7dd6681 100644 --- a/src/main/java/org/ldk/structs/Result_FundingSignedDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_FundingSignedDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_FundingSignedDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_FundingSignedDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_FundingSignedDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_FundingSignedDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_FundingSignedDecodeErrorZ_is_ok(ptr)) { return new Result_FundingSignedDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_FundingSignedDecodeErrorZ extends CommonBase { * Creates a new CResult_FundingSignedDecodeErrorZ in the success state. */ public static Result_FundingSignedDecodeErrorZ ok(org.ldk.structs.FundingSigned o) { - long ret = bindings.CResult_FundingSignedDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_FundingSignedDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_FundingSignedDecodeErrorZ ret_hu_conv = Result_FundingSignedDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_GossipTimestampFilterDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_GossipTimestampFilterDecodeErrorZ.java index aa5bed90..803eadef 100644 --- a/src/main/java/org/ldk/structs/Result_GossipTimestampFilterDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_GossipTimestampFilterDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_GossipTimestampFilterDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_GossipTimestampFilterDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_GossipTimestampFilterDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_GossipTimestampFilterDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_GossipTimestampFilterDecodeErrorZ_is_ok(ptr)) { return new Result_GossipTimestampFilterDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_GossipTimestampFilterDecodeErrorZ extends CommonBase { * Creates a new CResult_GossipTimestampFilterDecodeErrorZ in the success state. */ public static Result_GossipTimestampFilterDecodeErrorZ ok(org.ldk.structs.GossipTimestampFilter o) { - long ret = bindings.CResult_GossipTimestampFilterDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_GossipTimestampFilterDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_GossipTimestampFilterDecodeErrorZ ret_hu_conv = Result_GossipTimestampFilterDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_HTLCDescriptorDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_HTLCDescriptorDecodeErrorZ.java index 644bf998..2086027a 100644 --- a/src/main/java/org/ldk/structs/Result_HTLCDescriptorDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_HTLCDescriptorDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_HTLCDescriptorDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_HTLCDescriptorDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_HTLCDescriptorDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_HTLCDescriptorDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_HTLCDescriptorDecodeErrorZ_is_ok(ptr)) { return new Result_HTLCDescriptorDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_HTLCDescriptorDecodeErrorZ extends CommonBase { * Creates a new CResult_HTLCDescriptorDecodeErrorZ in the success state. */ public static Result_HTLCDescriptorDecodeErrorZ ok(org.ldk.structs.HTLCDescriptor o) { - long ret = bindings.CResult_HTLCDescriptorDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_HTLCDescriptorDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_HTLCDescriptorDecodeErrorZ ret_hu_conv = Result_HTLCDescriptorDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_HTLCOutputInCommitmentDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_HTLCOutputInCommitmentDecodeErrorZ.java index bd76d557..2b4b5f9d 100644 --- a/src/main/java/org/ldk/structs/Result_HTLCOutputInCommitmentDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_HTLCOutputInCommitmentDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_HTLCOutputInCommitmentDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_HTLCOutputInCommitmentDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_is_ok(ptr)) { return new Result_HTLCOutputInCommitmentDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_HTLCOutputInCommitmentDecodeErrorZ extends CommonBase { * Creates a new CResult_HTLCOutputInCommitmentDecodeErrorZ in the success state. */ public static Result_HTLCOutputInCommitmentDecodeErrorZ ok(org.ldk.structs.HTLCOutputInCommitment o) { - long ret = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_HTLCOutputInCommitmentDecodeErrorZ ret_hu_conv = Result_HTLCOutputInCommitmentDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_HTLCUpdateDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_HTLCUpdateDecodeErrorZ.java index b63eae8c..40514adb 100644 --- a/src/main/java/org/ldk/structs/Result_HTLCUpdateDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_HTLCUpdateDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_HTLCUpdateDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_HTLCUpdateDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_HTLCUpdateDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_HTLCUpdateDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_HTLCUpdateDecodeErrorZ_is_ok(ptr)) { return new Result_HTLCUpdateDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_HTLCUpdateDecodeErrorZ extends CommonBase { * Creates a new CResult_HTLCUpdateDecodeErrorZ in the success state. */ public static Result_HTLCUpdateDecodeErrorZ ok(org.ldk.structs.HTLCUpdate o) { - long ret = bindings.CResult_HTLCUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_HTLCUpdateDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_HTLCUpdateDecodeErrorZ ret_hu_conv = Result_HTLCUpdateDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_HolderCommitmentTransactionDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_HolderCommitmentTransactionDecodeErrorZ.java index a91cae28..f5402c87 100644 --- a/src/main/java/org/ldk/structs/Result_HolderCommitmentTransactionDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_HolderCommitmentTransactionDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_HolderCommitmentTransactionDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_HolderCommitmentTransactionDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_is_ok(ptr)) { return new Result_HolderCommitmentTransactionDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_HolderCommitmentTransactionDecodeErrorZ extends CommonBase { * Creates a new CResult_HolderCommitmentTransactionDecodeErrorZ in the success state. */ public static Result_HolderCommitmentTransactionDecodeErrorZ ok(org.ldk.structs.HolderCommitmentTransaction o) { - long ret = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_HolderCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_HolderCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_HostnameDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_HostnameDecodeErrorZ.java index fc3831a1..e970bab3 100644 --- a/src/main/java/org/ldk/structs/Result_HostnameDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_HostnameDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_HostnameDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_HostnameDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_HostnameDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_HostnameDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_HostnameDecodeErrorZ_is_ok(ptr)) { return new Result_HostnameDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_HostnameDecodeErrorZ extends CommonBase { * Creates a new CResult_HostnameDecodeErrorZ in the success state. */ public static Result_HostnameDecodeErrorZ ok(org.ldk.structs.Hostname o) { - long ret = bindings.CResult_HostnameDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_HostnameDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_HostnameDecodeErrorZ ret_hu_conv = Result_HostnameDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_HtlcBasepointDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_HtlcBasepointDecodeErrorZ.java index 2183302a..b0e92b03 100644 --- a/src/main/java/org/ldk/structs/Result_HtlcBasepointDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_HtlcBasepointDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_HtlcBasepointDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_HtlcBasepointDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_HtlcBasepointDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_HtlcBasepointDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_HtlcBasepointDecodeErrorZ_is_ok(ptr)) { return new Result_HtlcBasepointDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_HtlcBasepointDecodeErrorZ extends CommonBase { * Creates a new CResult_HtlcBasepointDecodeErrorZ in the success state. */ public static Result_HtlcBasepointDecodeErrorZ ok(org.ldk.structs.HtlcBasepoint o) { - long ret = bindings.CResult_HtlcBasepointDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_HtlcBasepointDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_HtlcBasepointDecodeErrorZ ret_hu_conv = Result_HtlcBasepointDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_HtlcKeyDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_HtlcKeyDecodeErrorZ.java index 0a4b7678..171cdb14 100644 --- a/src/main/java/org/ldk/structs/Result_HtlcKeyDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_HtlcKeyDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_HtlcKeyDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_HtlcKeyDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_HtlcKeyDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_HtlcKeyDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_HtlcKeyDecodeErrorZ_is_ok(ptr)) { return new Result_HtlcKeyDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_HtlcKeyDecodeErrorZ extends CommonBase { * Creates a new CResult_HtlcKeyDecodeErrorZ in the success state. */ public static Result_HtlcKeyDecodeErrorZ ok(org.ldk.structs.HtlcKey o) { - long ret = bindings.CResult_HtlcKeyDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_HtlcKeyDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_HtlcKeyDecodeErrorZ ret_hu_conv = Result_HtlcKeyDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_InFlightHtlcsDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_InFlightHtlcsDecodeErrorZ.java index 024cc29f..ef6b85cb 100644 --- a/src/main/java/org/ldk/structs/Result_InFlightHtlcsDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_InFlightHtlcsDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_InFlightHtlcsDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_InFlightHtlcsDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_InFlightHtlcsDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_InFlightHtlcsDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_InFlightHtlcsDecodeErrorZ_is_ok(ptr)) { return new Result_InFlightHtlcsDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_InFlightHtlcsDecodeErrorZ extends CommonBase { * Creates a new CResult_InFlightHtlcsDecodeErrorZ in the success state. */ public static Result_InFlightHtlcsDecodeErrorZ ok(org.ldk.structs.InFlightHtlcs o) { - long ret = bindings.CResult_InFlightHtlcsDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_InFlightHtlcsDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_InFlightHtlcsDecodeErrorZ ret_hu_conv = Result_InFlightHtlcsDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_InMemorySignerDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_InMemorySignerDecodeErrorZ.java index 8dff6858..8b17bc02 100644 --- a/src/main/java/org/ldk/structs/Result_InMemorySignerDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_InMemorySignerDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_InMemorySignerDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_InMemorySignerDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_InMemorySignerDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_InMemorySignerDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_InMemorySignerDecodeErrorZ_is_ok(ptr)) { return new Result_InMemorySignerDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_InMemorySignerDecodeErrorZ extends CommonBase { * Creates a new CResult_InMemorySignerDecodeErrorZ in the success state. */ public static Result_InMemorySignerDecodeErrorZ ok(org.ldk.structs.InMemorySigner o) { - long ret = bindings.CResult_InMemorySignerDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_InMemorySignerDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_InMemorySignerDecodeErrorZ ret_hu_conv = Result_InMemorySignerDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_InitDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_InitDecodeErrorZ.java index 35ddbb36..6dea0a02 100644 --- a/src/main/java/org/ldk/structs/Result_InitDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_InitDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_InitDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_InitDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_InitDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_InitDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_InitDecodeErrorZ_is_ok(ptr)) { return new Result_InitDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_InitDecodeErrorZ extends CommonBase { * Creates a new CResult_InitDecodeErrorZ in the success state. */ public static Result_InitDecodeErrorZ ok(org.ldk.structs.Init o) { - long ret = bindings.CResult_InitDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_InitDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_InitDecodeErrorZ ret_hu_conv = Result_InitDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_InitFeaturesDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_InitFeaturesDecodeErrorZ.java index b191a5db..a9f7bbd5 100644 --- a/src/main/java/org/ldk/structs/Result_InitFeaturesDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_InitFeaturesDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_InitFeaturesDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_InitFeaturesDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_InitFeaturesDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_InitFeaturesDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_InitFeaturesDecodeErrorZ_is_ok(ptr)) { return new Result_InitFeaturesDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_InitFeaturesDecodeErrorZ extends CommonBase { * Creates a new CResult_InitFeaturesDecodeErrorZ in the success state. */ public static Result_InitFeaturesDecodeErrorZ ok(org.ldk.structs.InitFeatures o) { - long ret = bindings.CResult_InitFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_InitFeaturesDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_InitFeaturesDecodeErrorZ ret_hu_conv = Result_InitFeaturesDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_InvoiceErrorDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_InvoiceErrorDecodeErrorZ.java index 6d1dd181..b8cf9d29 100644 --- a/src/main/java/org/ldk/structs/Result_InvoiceErrorDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_InvoiceErrorDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_InvoiceErrorDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_InvoiceErrorDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_InvoiceErrorDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_InvoiceErrorDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_InvoiceErrorDecodeErrorZ_is_ok(ptr)) { return new Result_InvoiceErrorDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_InvoiceErrorDecodeErrorZ extends CommonBase { * Creates a new CResult_InvoiceErrorDecodeErrorZ in the success state. */ public static Result_InvoiceErrorDecodeErrorZ ok(org.ldk.structs.InvoiceError o) { - long ret = bindings.CResult_InvoiceErrorDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_InvoiceErrorDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_InvoiceErrorDecodeErrorZ ret_hu_conv = Result_InvoiceErrorDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_InvoiceRequestBolt12SemanticErrorZ.java b/src/main/java/org/ldk/structs/Result_InvoiceRequestBolt12SemanticErrorZ.java new file mode 100644 index 00000000..8d2ebb5b --- /dev/null +++ b/src/main/java/org/ldk/structs/Result_InvoiceRequestBolt12SemanticErrorZ.java @@ -0,0 +1,96 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + +public class Result_InvoiceRequestBolt12SemanticErrorZ extends CommonBase { + private Result_InvoiceRequestBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); } + protected void finalize() throws Throwable { + if (ptr != 0) { bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_free(ptr); } super.finalize(); + } + + protected void force_free() { + if (ptr != 0) { bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_free(ptr); ptr = 0; } + } + + static Result_InvoiceRequestBolt12SemanticErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_InvoiceRequestBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_InvoiceRequestBolt12SemanticErrorZ_Err(null, ptr); + } + } + public static final class Result_InvoiceRequestBolt12SemanticErrorZ_OK extends Result_InvoiceRequestBolt12SemanticErrorZ { + public final InvoiceRequest res; + private Result_InvoiceRequestBolt12SemanticErrorZ_OK(Object _dummy, long ptr) { + super(_dummy, ptr); + long res = bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(ptr); + org.ldk.structs.InvoiceRequest res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.InvoiceRequest(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); }; + this.res = res_hu_conv; + } + } + + public static final class Result_InvoiceRequestBolt12SemanticErrorZ_Err extends Result_InvoiceRequestBolt12SemanticErrorZ { + public final Bolt12SemanticError err; + private Result_InvoiceRequestBolt12SemanticErrorZ_Err(Object _dummy, long ptr) { + super(_dummy, ptr); + this.err = bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(ptr); + } + } + + /** + * Creates a new CResult_InvoiceRequestBolt12SemanticErrorZ in the success state. + */ + public static Result_InvoiceRequestBolt12SemanticErrorZ ok(org.ldk.structs.InvoiceRequest o) { + long ret = bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_ok(o.ptr); + Reference.reachabilityFence(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceRequestBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_InvoiceRequestBolt12SemanticErrorZ in the error state. + */ + public static Result_InvoiceRequestBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) { + long ret = bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_err(e); + Reference.reachabilityFence(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceRequestBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public boolean is_ok() { + boolean ret = bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + long clone_ptr() { + long ret = bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a new CResult_InvoiceRequestBolt12SemanticErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_InvoiceRequestBolt12SemanticErrorZ clone() { + long ret = bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceRequestBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/Result_InvoiceRequestFieldsDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_InvoiceRequestFieldsDecodeErrorZ.java new file mode 100644 index 00000000..246e990a --- /dev/null +++ b/src/main/java/org/ldk/structs/Result_InvoiceRequestFieldsDecodeErrorZ.java @@ -0,0 +1,100 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + +public class Result_InvoiceRequestFieldsDecodeErrorZ extends CommonBase { + private Result_InvoiceRequestFieldsDecodeErrorZ(Object _dummy, long ptr) { super(ptr); } + protected void finalize() throws Throwable { + if (ptr != 0) { bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_free(ptr); } super.finalize(); + } + + protected void force_free() { + if (ptr != 0) { bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_free(ptr); ptr = 0; } + } + + static Result_InvoiceRequestFieldsDecodeErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(ptr)) { + return new Result_InvoiceRequestFieldsDecodeErrorZ_OK(null, ptr); + } else { + return new Result_InvoiceRequestFieldsDecodeErrorZ_Err(null, ptr); + } + } + public static final class Result_InvoiceRequestFieldsDecodeErrorZ_OK extends Result_InvoiceRequestFieldsDecodeErrorZ { + public final InvoiceRequestFields res; + private Result_InvoiceRequestFieldsDecodeErrorZ_OK(Object _dummy, long ptr) { + super(_dummy, ptr); + long res = bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(ptr); + org.ldk.structs.InvoiceRequestFields res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.InvoiceRequestFields(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); }; + this.res = res_hu_conv; + } + } + + public static final class Result_InvoiceRequestFieldsDecodeErrorZ_Err extends Result_InvoiceRequestFieldsDecodeErrorZ { + public final DecodeError err; + private Result_InvoiceRequestFieldsDecodeErrorZ_Err(Object _dummy, long ptr) { + super(_dummy, ptr); + long err = bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(ptr); + org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err); + if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); }; + this.err = err_hu_conv; + } + } + + /** + * Creates a new CResult_InvoiceRequestFieldsDecodeErrorZ in the success state. + */ + public static Result_InvoiceRequestFieldsDecodeErrorZ ok(org.ldk.structs.InvoiceRequestFields o) { + long ret = bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_ok(o.ptr); + Reference.reachabilityFence(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceRequestFieldsDecodeErrorZ ret_hu_conv = Result_InvoiceRequestFieldsDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_InvoiceRequestFieldsDecodeErrorZ in the error state. + */ + public static Result_InvoiceRequestFieldsDecodeErrorZ err(org.ldk.structs.DecodeError e) { + long ret = bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_err(e.ptr); + Reference.reachabilityFence(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceRequestFieldsDecodeErrorZ ret_hu_conv = Result_InvoiceRequestFieldsDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); }; + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public boolean is_ok() { + boolean ret = bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + long clone_ptr() { + long ret = bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a new CResult_InvoiceRequestFieldsDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_InvoiceRequestFieldsDecodeErrorZ clone() { + long ret = bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceRequestFieldsDecodeErrorZ ret_hu_conv = Result_InvoiceRequestFieldsDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.java b/src/main/java/org/ldk/structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.java new file mode 100644 index 00000000..e25fd5fc --- /dev/null +++ b/src/main/java/org/ldk/structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.java @@ -0,0 +1,86 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + +public class Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ extends CommonBase { + private Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); } + protected void finalize() throws Throwable { + if (ptr != 0) { bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(ptr); } super.finalize(); + } + + protected void force_free() { + if (ptr != 0) { bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(ptr); ptr = 0; } + } + + static Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_Err(null, ptr); + } + } + public static final class Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_OK extends Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ { + public final InvoiceRequestWithDerivedPayerIdBuilder res; + private Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_OK(Object _dummy, long ptr) { + super(_dummy, ptr); + long res = bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(ptr); + org.ldk.structs.InvoiceRequestWithDerivedPayerIdBuilder res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.InvoiceRequestWithDerivedPayerIdBuilder(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); }; + this.res = res_hu_conv; + } + } + + public static final class Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_Err extends Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ { + public final Bolt12SemanticError err; + private Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_Err(Object _dummy, long ptr) { + super(_dummy, ptr); + this.err = bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(ptr); + } + } + + /** + * Creates a new CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ in the success state. + */ + public static Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ ok(org.ldk.structs.InvoiceRequestWithDerivedPayerIdBuilder o) { + long ret = bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(o.ptr); + Reference.reachabilityFence(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid ret_hu_conv being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after ret_hu_conv call, o is reset to null and is now a dummy object. + o.ptr = 0;; + return ret_hu_conv; + } + + /** + * Creates a new CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ in the error state. + */ + public static Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) { + long ret = bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(e); + Reference.reachabilityFence(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public boolean is_ok() { + boolean ret = bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + +} diff --git a/src/main/java/org/ldk/structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.java b/src/main/java/org/ldk/structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.java new file mode 100644 index 00000000..9e7a22bb --- /dev/null +++ b/src/main/java/org/ldk/structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.java @@ -0,0 +1,86 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + +public class Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ extends CommonBase { + private Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); } + protected void finalize() throws Throwable { + if (ptr != 0) { bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(ptr); } super.finalize(); + } + + protected void force_free() { + if (ptr != 0) { bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(ptr); ptr = 0; } + } + + static Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_Err(null, ptr); + } + } + public static final class Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_OK extends Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ { + public final InvoiceRequestWithExplicitPayerIdBuilder res; + private Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_OK(Object _dummy, long ptr) { + super(_dummy, ptr); + long res = bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(ptr); + org.ldk.structs.InvoiceRequestWithExplicitPayerIdBuilder res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.InvoiceRequestWithExplicitPayerIdBuilder(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); }; + this.res = res_hu_conv; + } + } + + public static final class Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_Err extends Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ { + public final Bolt12SemanticError err; + private Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_Err(Object _dummy, long ptr) { + super(_dummy, ptr); + this.err = bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(ptr); + } + } + + /** + * Creates a new CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ in the success state. + */ + public static Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ ok(org.ldk.structs.InvoiceRequestWithExplicitPayerIdBuilder o) { + long ret = bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok(o.ptr); + Reference.reachabilityFence(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid ret_hu_conv being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after ret_hu_conv call, o is reset to null and is now a dummy object. + o.ptr = 0;; + return ret_hu_conv; + } + + /** + * Creates a new CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ in the error state. + */ + public static Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) { + long ret = bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(e); + Reference.reachabilityFence(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public boolean is_ok() { + boolean ret = bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + +} diff --git a/src/main/java/org/ldk/structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.java b/src/main/java/org/ldk/structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.java new file mode 100644 index 00000000..7129be33 --- /dev/null +++ b/src/main/java/org/ldk/structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.java @@ -0,0 +1,86 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + +public class Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ extends CommonBase { + private Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); } + protected void finalize() throws Throwable { + if (ptr != 0) { bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(ptr); } super.finalize(); + } + + protected void force_free() { + if (ptr != 0) { bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(ptr); ptr = 0; } + } + + static Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_Err(null, ptr); + } + } + public static final class Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_OK extends Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ { + public final InvoiceWithDerivedSigningPubkeyBuilder res; + private Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_OK(Object _dummy, long ptr) { + super(_dummy, ptr); + long res = bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(ptr); + org.ldk.structs.InvoiceWithDerivedSigningPubkeyBuilder res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.InvoiceWithDerivedSigningPubkeyBuilder(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); }; + this.res = res_hu_conv; + } + } + + public static final class Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_Err extends Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ { + public final Bolt12SemanticError err; + private Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_Err(Object _dummy, long ptr) { + super(_dummy, ptr); + this.err = bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(ptr); + } + } + + /** + * Creates a new CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ in the success state. + */ + public static Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ ok(org.ldk.structs.InvoiceWithDerivedSigningPubkeyBuilder o) { + long ret = bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o.ptr); + Reference.reachabilityFence(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid ret_hu_conv being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after ret_hu_conv call, o is reset to null and is now a dummy object. + o.ptr = 0;; + return ret_hu_conv; + } + + /** + * Creates a new CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ in the error state. + */ + public static Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) { + long ret = bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err(e); + Reference.reachabilityFence(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public boolean is_ok() { + boolean ret = bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + +} diff --git a/src/main/java/org/ldk/structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.java b/src/main/java/org/ldk/structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.java new file mode 100644 index 00000000..de2c1038 --- /dev/null +++ b/src/main/java/org/ldk/structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.java @@ -0,0 +1,86 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + +public class Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ extends CommonBase { + private Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); } + protected void finalize() throws Throwable { + if (ptr != 0) { bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free(ptr); } super.finalize(); + } + + protected void force_free() { + if (ptr != 0) { bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free(ptr); ptr = 0; } + } + + static Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_Err(null, ptr); + } + } + public static final class Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_OK extends Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ { + public final InvoiceWithExplicitSigningPubkeyBuilder res; + private Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_OK(Object _dummy, long ptr) { + super(_dummy, ptr); + long res = bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(ptr); + org.ldk.structs.InvoiceWithExplicitSigningPubkeyBuilder res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.InvoiceWithExplicitSigningPubkeyBuilder(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); }; + this.res = res_hu_conv; + } + } + + public static final class Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_Err extends Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ { + public final Bolt12SemanticError err; + private Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_Err(Object _dummy, long ptr) { + super(_dummy, ptr); + this.err = bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(ptr); + } + } + + /** + * Creates a new CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ in the success state. + */ + public static Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ ok(org.ldk.structs.InvoiceWithExplicitSigningPubkeyBuilder o) { + long ret = bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o.ptr); + Reference.reachabilityFence(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid ret_hu_conv being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after ret_hu_conv call, o is reset to null and is now a dummy object. + o.ptr = 0;; + return ret_hu_conv; + } + + /** + * Creates a new CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ in the error state. + */ + public static Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) { + long ret = bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err(e); + Reference.reachabilityFence(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public boolean is_ok() { + boolean ret = bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + +} diff --git a/src/main/java/org/ldk/structs/Result_LockedChannelMonitorNoneZ.java b/src/main/java/org/ldk/structs/Result_LockedChannelMonitorNoneZ.java index 47332e4c..8a2b4937 100644 --- a/src/main/java/org/ldk/structs/Result_LockedChannelMonitorNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_LockedChannelMonitorNoneZ.java @@ -13,6 +13,10 @@ public class Result_LockedChannelMonitorNoneZ extends CommonBase { if (ptr != 0) { bindings.CResult_LockedChannelMonitorNoneZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_LockedChannelMonitorNoneZ_free(ptr); ptr = 0; } + } + static Result_LockedChannelMonitorNoneZ constr_from_ptr(long ptr) { if (bindings.CResult_LockedChannelMonitorNoneZ_is_ok(ptr)) { return new Result_LockedChannelMonitorNoneZ_OK(null, ptr); @@ -41,7 +45,7 @@ public class Result_LockedChannelMonitorNoneZ extends CommonBase { * Creates a new CResult_LockedChannelMonitorNoneZ in the success state. */ public static Result_LockedChannelMonitorNoneZ ok(org.ldk.structs.LockedChannelMonitor o) { - long ret = bindings.CResult_LockedChannelMonitorNoneZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_LockedChannelMonitorNoneZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_LockedChannelMonitorNoneZ ret_hu_conv = Result_LockedChannelMonitorNoneZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_MaxDustHTLCExposureDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_MaxDustHTLCExposureDecodeErrorZ.java index 084aed88..6bcb58ff 100644 --- a/src/main/java/org/ldk/structs/Result_MaxDustHTLCExposureDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_MaxDustHTLCExposureDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_MaxDustHTLCExposureDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_MaxDustHTLCExposureDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_MaxDustHTLCExposureDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_MaxDustHTLCExposureDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_MaxDustHTLCExposureDecodeErrorZ_is_ok(ptr)) { return new Result_MaxDustHTLCExposureDecodeErrorZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_NetworkGraphDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_NetworkGraphDecodeErrorZ.java index b285d0c9..6cac05e0 100644 --- a/src/main/java/org/ldk/structs/Result_NetworkGraphDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_NetworkGraphDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_NetworkGraphDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_NetworkGraphDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_NetworkGraphDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_NetworkGraphDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_NetworkGraphDecodeErrorZ_is_ok(ptr)) { return new Result_NetworkGraphDecodeErrorZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_NodeAliasDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_NodeAliasDecodeErrorZ.java index d4a481e7..8c39b8c4 100644 --- a/src/main/java/org/ldk/structs/Result_NodeAliasDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_NodeAliasDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_NodeAliasDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_NodeAliasDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_NodeAliasDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_NodeAliasDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_NodeAliasDecodeErrorZ_is_ok(ptr)) { return new Result_NodeAliasDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_NodeAliasDecodeErrorZ extends CommonBase { * Creates a new CResult_NodeAliasDecodeErrorZ in the success state. */ public static Result_NodeAliasDecodeErrorZ ok(org.ldk.structs.NodeAlias o) { - long ret = bindings.CResult_NodeAliasDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_NodeAliasDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_NodeAliasDecodeErrorZ ret_hu_conv = Result_NodeAliasDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_NodeAnnouncementDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_NodeAnnouncementDecodeErrorZ.java index 1288434d..b016b264 100644 --- a/src/main/java/org/ldk/structs/Result_NodeAnnouncementDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_NodeAnnouncementDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_NodeAnnouncementDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_NodeAnnouncementDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_NodeAnnouncementDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_NodeAnnouncementDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_NodeAnnouncementDecodeErrorZ_is_ok(ptr)) { return new Result_NodeAnnouncementDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_NodeAnnouncementDecodeErrorZ extends CommonBase { * Creates a new CResult_NodeAnnouncementDecodeErrorZ in the success state. */ public static Result_NodeAnnouncementDecodeErrorZ ok(org.ldk.structs.NodeAnnouncement o) { - long ret = bindings.CResult_NodeAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_NodeAnnouncementDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_NodeAnnouncementDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_NodeAnnouncementInfoDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_NodeAnnouncementInfoDecodeErrorZ.java index 12c1309a..414412b8 100644 --- a/src/main/java/org/ldk/structs/Result_NodeAnnouncementInfoDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_NodeAnnouncementInfoDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_NodeAnnouncementInfoDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_NodeAnnouncementInfoDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_is_ok(ptr)) { return new Result_NodeAnnouncementInfoDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_NodeAnnouncementInfoDecodeErrorZ extends CommonBase { * Creates a new CResult_NodeAnnouncementInfoDecodeErrorZ in the success state. */ public static Result_NodeAnnouncementInfoDecodeErrorZ ok(org.ldk.structs.NodeAnnouncementInfo o) { - long ret = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_NodeAnnouncementInfoDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementInfoDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_NodeFeaturesDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_NodeFeaturesDecodeErrorZ.java index 71ce2926..4de5c15d 100644 --- a/src/main/java/org/ldk/structs/Result_NodeFeaturesDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_NodeFeaturesDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_NodeFeaturesDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_NodeFeaturesDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_NodeFeaturesDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_NodeFeaturesDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_NodeFeaturesDecodeErrorZ_is_ok(ptr)) { return new Result_NodeFeaturesDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_NodeFeaturesDecodeErrorZ extends CommonBase { * Creates a new CResult_NodeFeaturesDecodeErrorZ in the success state. */ public static Result_NodeFeaturesDecodeErrorZ ok(org.ldk.structs.NodeFeatures o) { - long ret = bindings.CResult_NodeFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_NodeFeaturesDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_NodeFeaturesDecodeErrorZ ret_hu_conv = Result_NodeFeaturesDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_NodeIdDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_NodeIdDecodeErrorZ.java index 2701159b..30f71e9f 100644 --- a/src/main/java/org/ldk/structs/Result_NodeIdDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_NodeIdDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_NodeIdDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_NodeIdDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_NodeIdDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_NodeIdDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_NodeIdDecodeErrorZ_is_ok(ptr)) { return new Result_NodeIdDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_NodeIdDecodeErrorZ extends CommonBase { * Creates a new CResult_NodeIdDecodeErrorZ in the success state. */ public static Result_NodeIdDecodeErrorZ ok(org.ldk.structs.NodeId o) { - long ret = bindings.CResult_NodeIdDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_NodeIdDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_NodeIdDecodeErrorZ ret_hu_conv = Result_NodeIdDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_NodeInfoDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_NodeInfoDecodeErrorZ.java index da911db9..d5acc85a 100644 --- a/src/main/java/org/ldk/structs/Result_NodeInfoDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_NodeInfoDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_NodeInfoDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_NodeInfoDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_NodeInfoDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_NodeInfoDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_NodeInfoDecodeErrorZ_is_ok(ptr)) { return new Result_NodeInfoDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_NodeInfoDecodeErrorZ extends CommonBase { * Creates a new CResult_NodeInfoDecodeErrorZ in the success state. */ public static Result_NodeInfoDecodeErrorZ ok(org.ldk.structs.NodeInfo o) { - long ret = bindings.CResult_NodeInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_NodeInfoDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_NodeInfoDecodeErrorZ ret_hu_conv = Result_NodeInfoDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_NoneAPIErrorZ.java b/src/main/java/org/ldk/structs/Result_NoneAPIErrorZ.java index 17b3a56e..9fa3dc42 100644 --- a/src/main/java/org/ldk/structs/Result_NoneAPIErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_NoneAPIErrorZ.java @@ -13,6 +13,10 @@ public class Result_NoneAPIErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_NoneAPIErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_NoneAPIErrorZ_free(ptr); ptr = 0; } + } + static Result_NoneAPIErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_NoneAPIErrorZ_is_ok(ptr)) { return new Result_NoneAPIErrorZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_NoneBolt11SemanticErrorZ.java b/src/main/java/org/ldk/structs/Result_NoneBolt11SemanticErrorZ.java index cef0dddc..bf1c165e 100644 --- a/src/main/java/org/ldk/structs/Result_NoneBolt11SemanticErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_NoneBolt11SemanticErrorZ.java @@ -13,6 +13,10 @@ public class Result_NoneBolt11SemanticErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_NoneBolt11SemanticErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_NoneBolt11SemanticErrorZ_free(ptr); ptr = 0; } + } + static Result_NoneBolt11SemanticErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_NoneBolt11SemanticErrorZ_is_ok(ptr)) { return new Result_NoneBolt11SemanticErrorZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_NoneBolt12SemanticErrorZ.java b/src/main/java/org/ldk/structs/Result_NoneBolt12SemanticErrorZ.java index 7e796587..15dedcf3 100644 --- a/src/main/java/org/ldk/structs/Result_NoneBolt12SemanticErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_NoneBolt12SemanticErrorZ.java @@ -13,6 +13,10 @@ public class Result_NoneBolt12SemanticErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_NoneBolt12SemanticErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_NoneBolt12SemanticErrorZ_free(ptr); ptr = 0; } + } + static Result_NoneBolt12SemanticErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_NoneBolt12SemanticErrorZ_is_ok(ptr)) { return new Result_NoneBolt12SemanticErrorZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_NoneIOErrorZ.java b/src/main/java/org/ldk/structs/Result_NoneIOErrorZ.java index 38c7ae65..5ba4b5d9 100644 --- a/src/main/java/org/ldk/structs/Result_NoneIOErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_NoneIOErrorZ.java @@ -13,6 +13,10 @@ public class Result_NoneIOErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_NoneIOErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_NoneIOErrorZ_free(ptr); ptr = 0; } + } + static Result_NoneIOErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_NoneIOErrorZ_is_ok(ptr)) { return new Result_NoneIOErrorZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_NoneLightningErrorZ.java b/src/main/java/org/ldk/structs/Result_NoneLightningErrorZ.java index 823a07e3..ee0d03f4 100644 --- a/src/main/java/org/ldk/structs/Result_NoneLightningErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_NoneLightningErrorZ.java @@ -13,6 +13,10 @@ public class Result_NoneLightningErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_NoneLightningErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_NoneLightningErrorZ_free(ptr); ptr = 0; } + } + static Result_NoneLightningErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_NoneLightningErrorZ_is_ok(ptr)) { return new Result_NoneLightningErrorZ_OK(null, ptr); @@ -51,7 +55,7 @@ public class Result_NoneLightningErrorZ extends CommonBase { * Creates a new CResult_NoneLightningErrorZ in the error state. */ public static Result_NoneLightningErrorZ err(org.ldk.structs.LightningError e) { - long ret = bindings.CResult_NoneLightningErrorZ_err(e == null ? 0 : e.ptr); + long ret = bindings.CResult_NoneLightningErrorZ_err(e.ptr); Reference.reachabilityFence(e); if (ret >= 0 && ret <= 4096) { return null; } Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_NoneNoneZ.java b/src/main/java/org/ldk/structs/Result_NoneNoneZ.java index 937001df..fec49f53 100644 --- a/src/main/java/org/ldk/structs/Result_NoneNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_NoneNoneZ.java @@ -13,6 +13,10 @@ public class Result_NoneNoneZ extends CommonBase { if (ptr != 0) { bindings.CResult_NoneNoneZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_NoneNoneZ_free(ptr); ptr = 0; } + } + static Result_NoneNoneZ constr_from_ptr(long ptr) { if (bindings.CResult_NoneNoneZ_is_ok(ptr)) { return new Result_NoneNoneZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_NonePaymentSendFailureZ.java b/src/main/java/org/ldk/structs/Result_NonePaymentSendFailureZ.java index 865b587d..7a07c131 100644 --- a/src/main/java/org/ldk/structs/Result_NonePaymentSendFailureZ.java +++ b/src/main/java/org/ldk/structs/Result_NonePaymentSendFailureZ.java @@ -13,6 +13,10 @@ public class Result_NonePaymentSendFailureZ extends CommonBase { if (ptr != 0) { bindings.CResult_NonePaymentSendFailureZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_NonePaymentSendFailureZ_free(ptr); ptr = 0; } + } + static Result_NonePaymentSendFailureZ constr_from_ptr(long ptr) { if (bindings.CResult_NonePaymentSendFailureZ_is_ok(ptr)) { return new Result_NonePaymentSendFailureZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_NonePeerHandleErrorZ.java b/src/main/java/org/ldk/structs/Result_NonePeerHandleErrorZ.java index 58114ca6..30987513 100644 --- a/src/main/java/org/ldk/structs/Result_NonePeerHandleErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_NonePeerHandleErrorZ.java @@ -13,6 +13,10 @@ public class Result_NonePeerHandleErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_NonePeerHandleErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_NonePeerHandleErrorZ_free(ptr); ptr = 0; } + } + static Result_NonePeerHandleErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_NonePeerHandleErrorZ_is_ok(ptr)) { return new Result_NonePeerHandleErrorZ_OK(null, ptr); @@ -51,7 +55,7 @@ public class Result_NonePeerHandleErrorZ extends CommonBase { * Creates a new CResult_NonePeerHandleErrorZ in the error state. */ public static Result_NonePeerHandleErrorZ err(org.ldk.structs.PeerHandleError e) { - long ret = bindings.CResult_NonePeerHandleErrorZ_err(e == null ? 0 : e.ptr); + long ret = bindings.CResult_NonePeerHandleErrorZ_err(e.ptr); Reference.reachabilityFence(e); if (ret >= 0 && ret <= 4096) { return null; } Result_NonePeerHandleErrorZ ret_hu_conv = Result_NonePeerHandleErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_NoneRetryableSendFailureZ.java b/src/main/java/org/ldk/structs/Result_NoneRetryableSendFailureZ.java index 4022f7b8..10d7fd0a 100644 --- a/src/main/java/org/ldk/structs/Result_NoneRetryableSendFailureZ.java +++ b/src/main/java/org/ldk/structs/Result_NoneRetryableSendFailureZ.java @@ -13,6 +13,10 @@ public class Result_NoneRetryableSendFailureZ extends CommonBase { if (ptr != 0) { bindings.CResult_NoneRetryableSendFailureZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_NoneRetryableSendFailureZ_free(ptr); ptr = 0; } + } + static Result_NoneRetryableSendFailureZ constr_from_ptr(long ptr) { if (bindings.CResult_NoneRetryableSendFailureZ_is_ok(ptr)) { return new Result_NoneRetryableSendFailureZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_OfferBolt12ParseErrorZ.java b/src/main/java/org/ldk/structs/Result_OfferBolt12ParseErrorZ.java index e1e91ded..1727c94f 100644 --- a/src/main/java/org/ldk/structs/Result_OfferBolt12ParseErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_OfferBolt12ParseErrorZ.java @@ -13,6 +13,10 @@ public class Result_OfferBolt12ParseErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_OfferBolt12ParseErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_OfferBolt12ParseErrorZ_free(ptr); ptr = 0; } + } + static Result_OfferBolt12ParseErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_OfferBolt12ParseErrorZ_is_ok(ptr)) { return new Result_OfferBolt12ParseErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_OfferBolt12ParseErrorZ extends CommonBase { * Creates a new CResult_OfferBolt12ParseErrorZ in the success state. */ public static Result_OfferBolt12ParseErrorZ ok(org.ldk.structs.Offer o) { - long ret = bindings.CResult_OfferBolt12ParseErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_OfferBolt12ParseErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_OfferBolt12ParseErrorZ ret_hu_conv = Result_OfferBolt12ParseErrorZ.constr_from_ptr(ret); @@ -58,7 +62,7 @@ public class Result_OfferBolt12ParseErrorZ extends CommonBase { * Creates a new CResult_OfferBolt12ParseErrorZ in the error state. */ public static Result_OfferBolt12ParseErrorZ err(org.ldk.structs.Bolt12ParseError e) { - long ret = bindings.CResult_OfferBolt12ParseErrorZ_err(e == null ? 0 : e.ptr); + long ret = bindings.CResult_OfferBolt12ParseErrorZ_err(e.ptr); Reference.reachabilityFence(e); if (ret >= 0 && ret <= 4096) { return null; } Result_OfferBolt12ParseErrorZ ret_hu_conv = Result_OfferBolt12ParseErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_OfferBolt12SemanticErrorZ.java b/src/main/java/org/ldk/structs/Result_OfferBolt12SemanticErrorZ.java new file mode 100644 index 00000000..a4d28603 --- /dev/null +++ b/src/main/java/org/ldk/structs/Result_OfferBolt12SemanticErrorZ.java @@ -0,0 +1,96 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + +public class Result_OfferBolt12SemanticErrorZ extends CommonBase { + private Result_OfferBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); } + protected void finalize() throws Throwable { + if (ptr != 0) { bindings.CResult_OfferBolt12SemanticErrorZ_free(ptr); } super.finalize(); + } + + protected void force_free() { + if (ptr != 0) { bindings.CResult_OfferBolt12SemanticErrorZ_free(ptr); ptr = 0; } + } + + static Result_OfferBolt12SemanticErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_OfferBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_OfferBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_OfferBolt12SemanticErrorZ_Err(null, ptr); + } + } + public static final class Result_OfferBolt12SemanticErrorZ_OK extends Result_OfferBolt12SemanticErrorZ { + public final Offer res; + private Result_OfferBolt12SemanticErrorZ_OK(Object _dummy, long ptr) { + super(_dummy, ptr); + long res = bindings.CResult_OfferBolt12SemanticErrorZ_get_ok(ptr); + org.ldk.structs.Offer res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.Offer(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); }; + this.res = res_hu_conv; + } + } + + public static final class Result_OfferBolt12SemanticErrorZ_Err extends Result_OfferBolt12SemanticErrorZ { + public final Bolt12SemanticError err; + private Result_OfferBolt12SemanticErrorZ_Err(Object _dummy, long ptr) { + super(_dummy, ptr); + this.err = bindings.CResult_OfferBolt12SemanticErrorZ_get_err(ptr); + } + } + + /** + * Creates a new CResult_OfferBolt12SemanticErrorZ in the success state. + */ + public static Result_OfferBolt12SemanticErrorZ ok(org.ldk.structs.Offer o) { + long ret = bindings.CResult_OfferBolt12SemanticErrorZ_ok(o.ptr); + Reference.reachabilityFence(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OfferBolt12SemanticErrorZ ret_hu_conv = Result_OfferBolt12SemanticErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_OfferBolt12SemanticErrorZ in the error state. + */ + public static Result_OfferBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) { + long ret = bindings.CResult_OfferBolt12SemanticErrorZ_err(e); + Reference.reachabilityFence(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OfferBolt12SemanticErrorZ ret_hu_conv = Result_OfferBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public boolean is_ok() { + boolean ret = bindings.CResult_OfferBolt12SemanticErrorZ_is_ok(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + long clone_ptr() { + long ret = bindings.CResult_OfferBolt12SemanticErrorZ_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a new CResult_OfferBolt12SemanticErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_OfferBolt12SemanticErrorZ clone() { + long ret = bindings.CResult_OfferBolt12SemanticErrorZ_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OfferBolt12SemanticErrorZ ret_hu_conv = Result_OfferBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/Result_OfferIdDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_OfferIdDecodeErrorZ.java new file mode 100644 index 00000000..863fa6df --- /dev/null +++ b/src/main/java/org/ldk/structs/Result_OfferIdDecodeErrorZ.java @@ -0,0 +1,100 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + +public class Result_OfferIdDecodeErrorZ extends CommonBase { + private Result_OfferIdDecodeErrorZ(Object _dummy, long ptr) { super(ptr); } + protected void finalize() throws Throwable { + if (ptr != 0) { bindings.CResult_OfferIdDecodeErrorZ_free(ptr); } super.finalize(); + } + + protected void force_free() { + if (ptr != 0) { bindings.CResult_OfferIdDecodeErrorZ_free(ptr); ptr = 0; } + } + + static Result_OfferIdDecodeErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_OfferIdDecodeErrorZ_is_ok(ptr)) { + return new Result_OfferIdDecodeErrorZ_OK(null, ptr); + } else { + return new Result_OfferIdDecodeErrorZ_Err(null, ptr); + } + } + public static final class Result_OfferIdDecodeErrorZ_OK extends Result_OfferIdDecodeErrorZ { + public final OfferId res; + private Result_OfferIdDecodeErrorZ_OK(Object _dummy, long ptr) { + super(_dummy, ptr); + long res = bindings.CResult_OfferIdDecodeErrorZ_get_ok(ptr); + org.ldk.structs.OfferId res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.OfferId(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); }; + this.res = res_hu_conv; + } + } + + public static final class Result_OfferIdDecodeErrorZ_Err extends Result_OfferIdDecodeErrorZ { + public final DecodeError err; + private Result_OfferIdDecodeErrorZ_Err(Object _dummy, long ptr) { + super(_dummy, ptr); + long err = bindings.CResult_OfferIdDecodeErrorZ_get_err(ptr); + org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err); + if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); }; + this.err = err_hu_conv; + } + } + + /** + * Creates a new CResult_OfferIdDecodeErrorZ in the success state. + */ + public static Result_OfferIdDecodeErrorZ ok(org.ldk.structs.OfferId o) { + long ret = bindings.CResult_OfferIdDecodeErrorZ_ok(o.ptr); + Reference.reachabilityFence(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OfferIdDecodeErrorZ ret_hu_conv = Result_OfferIdDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_OfferIdDecodeErrorZ in the error state. + */ + public static Result_OfferIdDecodeErrorZ err(org.ldk.structs.DecodeError e) { + long ret = bindings.CResult_OfferIdDecodeErrorZ_err(e.ptr); + Reference.reachabilityFence(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OfferIdDecodeErrorZ ret_hu_conv = Result_OfferIdDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); }; + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public boolean is_ok() { + boolean ret = bindings.CResult_OfferIdDecodeErrorZ_is_ok(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + long clone_ptr() { + long ret = bindings.CResult_OfferIdDecodeErrorZ_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a new CResult_OfferIdDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_OfferIdDecodeErrorZ clone() { + long ret = bindings.CResult_OfferIdDecodeErrorZ_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OfferIdDecodeErrorZ ret_hu_conv = Result_OfferIdDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.java b/src/main/java/org/ldk/structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.java new file mode 100644 index 00000000..714a9d5f --- /dev/null +++ b/src/main/java/org/ldk/structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.java @@ -0,0 +1,96 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + +public class Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ extends CommonBase { + private Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); } + protected void finalize() throws Throwable { + if (ptr != 0) { bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(ptr); } super.finalize(); + } + + protected void force_free() { + if (ptr != 0) { bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(ptr); ptr = 0; } + } + + static Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_Err(null, ptr); + } + } + public static final class Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_OK extends Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ { + public final OfferWithDerivedMetadataBuilder res; + private Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_OK(Object _dummy, long ptr) { + super(_dummy, ptr); + long res = bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(ptr); + org.ldk.structs.OfferWithDerivedMetadataBuilder res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.OfferWithDerivedMetadataBuilder(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); }; + this.res = res_hu_conv; + } + } + + public static final class Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_Err extends Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ { + public final Bolt12SemanticError err; + private Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_Err(Object _dummy, long ptr) { + super(_dummy, ptr); + this.err = bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(ptr); + } + } + + /** + * Creates a new CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ in the success state. + */ + public static Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ ok(org.ldk.structs.OfferWithDerivedMetadataBuilder o) { + long ret = bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(o.ptr); + Reference.reachabilityFence(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ in the error state. + */ + public static Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) { + long ret = bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(e); + Reference.reachabilityFence(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public boolean is_ok() { + boolean ret = bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + long clone_ptr() { + long ret = bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a new CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ clone() { + long ret = bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/Result_OffersMessageDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_OffersMessageDecodeErrorZ.java index aa6933d9..498447ad 100644 --- a/src/main/java/org/ldk/structs/Result_OffersMessageDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_OffersMessageDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_OffersMessageDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_OffersMessageDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_OffersMessageDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_OffersMessageDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_OffersMessageDecodeErrorZ_is_ok(ptr)) { return new Result_OffersMessageDecodeErrorZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_OnionMessageDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_OnionMessageDecodeErrorZ.java index c2279de0..597160e8 100644 --- a/src/main/java/org/ldk/structs/Result_OnionMessageDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_OnionMessageDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_OnionMessageDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_OnionMessageDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_OnionMessageDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_OnionMessageDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_OnionMessageDecodeErrorZ_is_ok(ptr)) { return new Result_OnionMessageDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_OnionMessageDecodeErrorZ extends CommonBase { * Creates a new CResult_OnionMessageDecodeErrorZ in the success state. */ public static Result_OnionMessageDecodeErrorZ ok(org.ldk.structs.OnionMessage o) { - long ret = bindings.CResult_OnionMessageDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_OnionMessageDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_OnionMessageDecodeErrorZ ret_hu_conv = Result_OnionMessageDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_OnionMessagePathNoneZ.java b/src/main/java/org/ldk/structs/Result_OnionMessagePathNoneZ.java index d8838ee1..3e5d72fd 100644 --- a/src/main/java/org/ldk/structs/Result_OnionMessagePathNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_OnionMessagePathNoneZ.java @@ -13,6 +13,10 @@ public class Result_OnionMessagePathNoneZ extends CommonBase { if (ptr != 0) { bindings.CResult_OnionMessagePathNoneZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_OnionMessagePathNoneZ_free(ptr); ptr = 0; } + } + static Result_OnionMessagePathNoneZ constr_from_ptr(long ptr) { if (bindings.CResult_OnionMessagePathNoneZ_is_ok(ptr)) { return new Result_OnionMessagePathNoneZ_OK(null, ptr); @@ -41,7 +45,7 @@ public class Result_OnionMessagePathNoneZ extends CommonBase { * Creates a new CResult_OnionMessagePathNoneZ in the success state. */ public static Result_OnionMessagePathNoneZ ok(org.ldk.structs.OnionMessagePath o) { - long ret = bindings.CResult_OnionMessagePathNoneZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_OnionMessagePathNoneZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_OnionMessagePathNoneZ ret_hu_conv = Result_OnionMessagePathNoneZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_OnionPacketDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_OnionPacketDecodeErrorZ.java index cf5d4349..c352b0b5 100644 --- a/src/main/java/org/ldk/structs/Result_OnionPacketDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_OnionPacketDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_OnionPacketDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_OnionPacketDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_OnionPacketDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_OnionPacketDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_OnionPacketDecodeErrorZ_is_ok(ptr)) { return new Result_OnionPacketDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_OnionPacketDecodeErrorZ extends CommonBase { * Creates a new CResult_OnionPacketDecodeErrorZ in the success state. */ public static Result_OnionPacketDecodeErrorZ ok(org.ldk.structs.OnionPacket o) { - long ret = bindings.CResult_OnionPacketDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_OnionPacketDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_OnionPacketDecodeErrorZ ret_hu_conv = Result_OnionPacketDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_OpenChannelDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_OpenChannelDecodeErrorZ.java index bb32c17f..78ffd06a 100644 --- a/src/main/java/org/ldk/structs/Result_OpenChannelDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_OpenChannelDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_OpenChannelDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_OpenChannelDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_OpenChannelDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_OpenChannelDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_OpenChannelDecodeErrorZ_is_ok(ptr)) { return new Result_OpenChannelDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_OpenChannelDecodeErrorZ extends CommonBase { * Creates a new CResult_OpenChannelDecodeErrorZ in the success state. */ public static Result_OpenChannelDecodeErrorZ ok(org.ldk.structs.OpenChannel o) { - long ret = bindings.CResult_OpenChannelDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_OpenChannelDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_OpenChannelDecodeErrorZ ret_hu_conv = Result_OpenChannelDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_OpenChannelV2DecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_OpenChannelV2DecodeErrorZ.java index 43bdc183..44b428d5 100644 --- a/src/main/java/org/ldk/structs/Result_OpenChannelV2DecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_OpenChannelV2DecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_OpenChannelV2DecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_OpenChannelV2DecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_OpenChannelV2DecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_OpenChannelV2DecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_OpenChannelV2DecodeErrorZ_is_ok(ptr)) { return new Result_OpenChannelV2DecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_OpenChannelV2DecodeErrorZ extends CommonBase { * Creates a new CResult_OpenChannelV2DecodeErrorZ in the success state. */ public static Result_OpenChannelV2DecodeErrorZ ok(org.ldk.structs.OpenChannelV2 o) { - long ret = bindings.CResult_OpenChannelV2DecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_OpenChannelV2DecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_OpenChannelV2DecodeErrorZ ret_hu_conv = Result_OpenChannelV2DecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_OutPointDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_OutPointDecodeErrorZ.java index 23eb904f..ec68f22c 100644 --- a/src/main/java/org/ldk/structs/Result_OutPointDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_OutPointDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_OutPointDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_OutPointDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_OutPointDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_OutPointDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_OutPointDecodeErrorZ_is_ok(ptr)) { return new Result_OutPointDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_OutPointDecodeErrorZ extends CommonBase { * Creates a new CResult_OutPointDecodeErrorZ in the success state. */ public static Result_OutPointDecodeErrorZ ok(org.ldk.structs.OutPoint o) { - long ret = bindings.CResult_OutPointDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_OutPointDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_OutPointDecodeErrorZ ret_hu_conv = Result_OutPointDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_OutputSpendStatusDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_OutputSpendStatusDecodeErrorZ.java new file mode 100644 index 00000000..8a1f1974 --- /dev/null +++ b/src/main/java/org/ldk/structs/Result_OutputSpendStatusDecodeErrorZ.java @@ -0,0 +1,100 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + +public class Result_OutputSpendStatusDecodeErrorZ extends CommonBase { + private Result_OutputSpendStatusDecodeErrorZ(Object _dummy, long ptr) { super(ptr); } + protected void finalize() throws Throwable { + if (ptr != 0) { bindings.CResult_OutputSpendStatusDecodeErrorZ_free(ptr); } super.finalize(); + } + + protected void force_free() { + if (ptr != 0) { bindings.CResult_OutputSpendStatusDecodeErrorZ_free(ptr); ptr = 0; } + } + + static Result_OutputSpendStatusDecodeErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_OutputSpendStatusDecodeErrorZ_is_ok(ptr)) { + return new Result_OutputSpendStatusDecodeErrorZ_OK(null, ptr); + } else { + return new Result_OutputSpendStatusDecodeErrorZ_Err(null, ptr); + } + } + public static final class Result_OutputSpendStatusDecodeErrorZ_OK extends Result_OutputSpendStatusDecodeErrorZ { + public final OutputSpendStatus res; + private Result_OutputSpendStatusDecodeErrorZ_OK(Object _dummy, long ptr) { + super(_dummy, ptr); + long res = bindings.CResult_OutputSpendStatusDecodeErrorZ_get_ok(ptr); + org.ldk.structs.OutputSpendStatus res_hu_conv = org.ldk.structs.OutputSpendStatus.constr_from_ptr(res); + if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); }; + this.res = res_hu_conv; + } + } + + public static final class Result_OutputSpendStatusDecodeErrorZ_Err extends Result_OutputSpendStatusDecodeErrorZ { + public final DecodeError err; + private Result_OutputSpendStatusDecodeErrorZ_Err(Object _dummy, long ptr) { + super(_dummy, ptr); + long err = bindings.CResult_OutputSpendStatusDecodeErrorZ_get_err(ptr); + org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err); + if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); }; + this.err = err_hu_conv; + } + } + + /** + * Creates a new CResult_OutputSpendStatusDecodeErrorZ in the success state. + */ + public static Result_OutputSpendStatusDecodeErrorZ ok(org.ldk.structs.OutputSpendStatus o) { + long ret = bindings.CResult_OutputSpendStatusDecodeErrorZ_ok(o.ptr); + Reference.reachabilityFence(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OutputSpendStatusDecodeErrorZ ret_hu_conv = Result_OutputSpendStatusDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_OutputSpendStatusDecodeErrorZ in the error state. + */ + public static Result_OutputSpendStatusDecodeErrorZ err(org.ldk.structs.DecodeError e) { + long ret = bindings.CResult_OutputSpendStatusDecodeErrorZ_err(e.ptr); + Reference.reachabilityFence(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OutputSpendStatusDecodeErrorZ ret_hu_conv = Result_OutputSpendStatusDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); }; + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public boolean is_ok() { + boolean ret = bindings.CResult_OutputSpendStatusDecodeErrorZ_is_ok(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + long clone_ptr() { + long ret = bindings.CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a new CResult_OutputSpendStatusDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_OutputSpendStatusDecodeErrorZ clone() { + long ret = bindings.CResult_OutputSpendStatusDecodeErrorZ_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OutputSpendStatusDecodeErrorZ ret_hu_conv = Result_OutputSpendStatusDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/Result_OutputSweeperDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_OutputSweeperDecodeErrorZ.java new file mode 100644 index 00000000..a1ebaa4b --- /dev/null +++ b/src/main/java/org/ldk/structs/Result_OutputSweeperDecodeErrorZ.java @@ -0,0 +1,96 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + +public class Result_OutputSweeperDecodeErrorZ extends CommonBase { + private Result_OutputSweeperDecodeErrorZ(Object _dummy, long ptr) { super(ptr); } + protected void finalize() throws Throwable { + if (ptr != 0) { bindings.CResult_OutputSweeperDecodeErrorZ_free(ptr); } super.finalize(); + } + + protected void force_free() { + if (ptr != 0) { bindings.CResult_OutputSweeperDecodeErrorZ_free(ptr); ptr = 0; } + } + + static Result_OutputSweeperDecodeErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_OutputSweeperDecodeErrorZ_is_ok(ptr)) { + return new Result_OutputSweeperDecodeErrorZ_OK(null, ptr); + } else { + return new Result_OutputSweeperDecodeErrorZ_Err(null, ptr); + } + } + public static final class Result_OutputSweeperDecodeErrorZ_OK extends Result_OutputSweeperDecodeErrorZ { + public final OutputSweeper res; + private Result_OutputSweeperDecodeErrorZ_OK(Object _dummy, long ptr) { + super(_dummy, ptr); + long res = bindings.CResult_OutputSweeperDecodeErrorZ_get_ok(ptr); + org.ldk.structs.OutputSweeper res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.OutputSweeper(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); }; + this.res = res_hu_conv; + } + } + + public static final class Result_OutputSweeperDecodeErrorZ_Err extends Result_OutputSweeperDecodeErrorZ { + public final DecodeError err; + private Result_OutputSweeperDecodeErrorZ_Err(Object _dummy, long ptr) { + super(_dummy, ptr); + long err = bindings.CResult_OutputSweeperDecodeErrorZ_get_err(ptr); + org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err); + if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); }; + this.err = err_hu_conv; + } + } + + /** + * Creates a new CResult_OutputSweeperDecodeErrorZ in the success state. + */ + public static Result_OutputSweeperDecodeErrorZ ok(BestBlock o_best_block, BroadcasterInterface o_broadcaster, FeeEstimator o_fee_estimator, Option_FilterZ o_chain_data_source, OutputSpender o_output_spender, ChangeDestinationSource o_change_destination_source, KVStore o_kv_store, Logger o_logger) { + long ret = bindings.CResult_OutputSweeperDecodeErrorZ_ok(bindings.OutputSweeper_new(o_best_block.ptr, o_broadcaster.ptr, o_fee_estimator.ptr, o_chain_data_source.ptr, o_output_spender.ptr, o_change_destination_source.ptr, o_kv_store.ptr, o_logger.ptr)); + Reference.reachabilityFence(o_best_block); + Reference.reachabilityFence(o_broadcaster); + Reference.reachabilityFence(o_fee_estimator); + Reference.reachabilityFence(o_chain_data_source); + Reference.reachabilityFence(o_output_spender); + Reference.reachabilityFence(o_change_destination_source); + Reference.reachabilityFence(o_kv_store); + Reference.reachabilityFence(o_logger); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OutputSweeperDecodeErrorZ ret_hu_conv = Result_OutputSweeperDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o_best_block); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o_broadcaster); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o_fee_estimator); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o_chain_data_source); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o_output_spender); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o_change_destination_source); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o_kv_store); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o_logger); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_OutputSweeperDecodeErrorZ in the error state. + */ + public static Result_OutputSweeperDecodeErrorZ err(org.ldk.structs.DecodeError e) { + long ret = bindings.CResult_OutputSweeperDecodeErrorZ_err(e.ptr); + Reference.reachabilityFence(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OutputSweeperDecodeErrorZ ret_hu_conv = Result_OutputSweeperDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); }; + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public boolean is_ok() { + boolean ret = bindings.CResult_OutputSweeperDecodeErrorZ_is_ok(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + +} diff --git a/src/main/java/org/ldk/structs/Result_PayeePubKeySecp256k1ErrorZ.java b/src/main/java/org/ldk/structs/Result_PayeePubKeySecp256k1ErrorZ.java index 298eae93..ab4f5434 100644 --- a/src/main/java/org/ldk/structs/Result_PayeePubKeySecp256k1ErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_PayeePubKeySecp256k1ErrorZ.java @@ -13,6 +13,10 @@ public class Result_PayeePubKeySecp256k1ErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_PayeePubKeySecp256k1ErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_PayeePubKeySecp256k1ErrorZ_free(ptr); ptr = 0; } + } + static Result_PayeePubKeySecp256k1ErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_PayeePubKeySecp256k1ErrorZ_is_ok(ptr)) { return new Result_PayeePubKeySecp256k1ErrorZ_OK(null, ptr); @@ -43,7 +47,7 @@ public class Result_PayeePubKeySecp256k1ErrorZ extends CommonBase { * Creates a new CResult_PayeePubKeySecp256k1ErrorZ in the success state. */ public static Result_PayeePubKeySecp256k1ErrorZ ok(org.ldk.structs.PayeePubKey o) { - long ret = bindings.CResult_PayeePubKeySecp256k1ErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_PayeePubKeySecp256k1ErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_PayeePubKeySecp256k1ErrorZ ret_hu_conv = Result_PayeePubKeySecp256k1ErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_PaymentConstraintsDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_PaymentConstraintsDecodeErrorZ.java index 996aa1b6..b7558b76 100644 --- a/src/main/java/org/ldk/structs/Result_PaymentConstraintsDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_PaymentConstraintsDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_PaymentConstraintsDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_PaymentConstraintsDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_PaymentConstraintsDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_PaymentConstraintsDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_PaymentConstraintsDecodeErrorZ_is_ok(ptr)) { return new Result_PaymentConstraintsDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_PaymentConstraintsDecodeErrorZ extends CommonBase { * Creates a new CResult_PaymentConstraintsDecodeErrorZ in the success state. */ public static Result_PaymentConstraintsDecodeErrorZ ok(org.ldk.structs.PaymentConstraints o) { - long ret = bindings.CResult_PaymentConstraintsDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_PaymentConstraintsDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_PaymentConstraintsDecodeErrorZ ret_hu_conv = Result_PaymentConstraintsDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_PaymentContextDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_PaymentContextDecodeErrorZ.java new file mode 100644 index 00000000..6d52c315 --- /dev/null +++ b/src/main/java/org/ldk/structs/Result_PaymentContextDecodeErrorZ.java @@ -0,0 +1,100 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + +public class Result_PaymentContextDecodeErrorZ extends CommonBase { + private Result_PaymentContextDecodeErrorZ(Object _dummy, long ptr) { super(ptr); } + protected void finalize() throws Throwable { + if (ptr != 0) { bindings.CResult_PaymentContextDecodeErrorZ_free(ptr); } super.finalize(); + } + + protected void force_free() { + if (ptr != 0) { bindings.CResult_PaymentContextDecodeErrorZ_free(ptr); ptr = 0; } + } + + static Result_PaymentContextDecodeErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_PaymentContextDecodeErrorZ_is_ok(ptr)) { + return new Result_PaymentContextDecodeErrorZ_OK(null, ptr); + } else { + return new Result_PaymentContextDecodeErrorZ_Err(null, ptr); + } + } + public static final class Result_PaymentContextDecodeErrorZ_OK extends Result_PaymentContextDecodeErrorZ { + public final PaymentContext res; + private Result_PaymentContextDecodeErrorZ_OK(Object _dummy, long ptr) { + super(_dummy, ptr); + long res = bindings.CResult_PaymentContextDecodeErrorZ_get_ok(ptr); + org.ldk.structs.PaymentContext res_hu_conv = org.ldk.structs.PaymentContext.constr_from_ptr(res); + if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); }; + this.res = res_hu_conv; + } + } + + public static final class Result_PaymentContextDecodeErrorZ_Err extends Result_PaymentContextDecodeErrorZ { + public final DecodeError err; + private Result_PaymentContextDecodeErrorZ_Err(Object _dummy, long ptr) { + super(_dummy, ptr); + long err = bindings.CResult_PaymentContextDecodeErrorZ_get_err(ptr); + org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err); + if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); }; + this.err = err_hu_conv; + } + } + + /** + * Creates a new CResult_PaymentContextDecodeErrorZ in the success state. + */ + public static Result_PaymentContextDecodeErrorZ ok(org.ldk.structs.PaymentContext o) { + long ret = bindings.CResult_PaymentContextDecodeErrorZ_ok(o.ptr); + Reference.reachabilityFence(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_PaymentContextDecodeErrorZ ret_hu_conv = Result_PaymentContextDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_PaymentContextDecodeErrorZ in the error state. + */ + public static Result_PaymentContextDecodeErrorZ err(org.ldk.structs.DecodeError e) { + long ret = bindings.CResult_PaymentContextDecodeErrorZ_err(e.ptr); + Reference.reachabilityFence(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_PaymentContextDecodeErrorZ ret_hu_conv = Result_PaymentContextDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); }; + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public boolean is_ok() { + boolean ret = bindings.CResult_PaymentContextDecodeErrorZ_is_ok(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + long clone_ptr() { + long ret = bindings.CResult_PaymentContextDecodeErrorZ_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a new CResult_PaymentContextDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_PaymentContextDecodeErrorZ clone() { + long ret = bindings.CResult_PaymentContextDecodeErrorZ_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_PaymentContextDecodeErrorZ ret_hu_conv = Result_PaymentContextDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/Result_PaymentFailureReasonDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_PaymentFailureReasonDecodeErrorZ.java index e6504829..e46a155b 100644 --- a/src/main/java/org/ldk/structs/Result_PaymentFailureReasonDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_PaymentFailureReasonDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_PaymentFailureReasonDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_PaymentFailureReasonDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_PaymentFailureReasonDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_PaymentFailureReasonDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_PaymentFailureReasonDecodeErrorZ_is_ok(ptr)) { return new Result_PaymentFailureReasonDecodeErrorZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_PaymentParametersDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_PaymentParametersDecodeErrorZ.java index 83308530..014eb046 100644 --- a/src/main/java/org/ldk/structs/Result_PaymentParametersDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_PaymentParametersDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_PaymentParametersDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_PaymentParametersDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_PaymentParametersDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_PaymentParametersDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_PaymentParametersDecodeErrorZ_is_ok(ptr)) { return new Result_PaymentParametersDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_PaymentParametersDecodeErrorZ extends CommonBase { * Creates a new CResult_PaymentParametersDecodeErrorZ in the success state. */ public static Result_PaymentParametersDecodeErrorZ ok(org.ldk.structs.PaymentParameters o) { - long ret = bindings.CResult_PaymentParametersDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_PaymentParametersDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_PaymentParametersDecodeErrorZ ret_hu_conv = Result_PaymentParametersDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_PaymentPurposeDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_PaymentPurposeDecodeErrorZ.java index 1507c258..36905ddf 100644 --- a/src/main/java/org/ldk/structs/Result_PaymentPurposeDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_PaymentPurposeDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_PaymentPurposeDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_PaymentPurposeDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_PaymentPurposeDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_PaymentPurposeDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_PaymentPurposeDecodeErrorZ_is_ok(ptr)) { return new Result_PaymentPurposeDecodeErrorZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_PaymentRelayDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_PaymentRelayDecodeErrorZ.java index 1da104e1..482c209c 100644 --- a/src/main/java/org/ldk/structs/Result_PaymentRelayDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_PaymentRelayDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_PaymentRelayDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_PaymentRelayDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_PaymentRelayDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_PaymentRelayDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_PaymentRelayDecodeErrorZ_is_ok(ptr)) { return new Result_PaymentRelayDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_PaymentRelayDecodeErrorZ extends CommonBase { * Creates a new CResult_PaymentRelayDecodeErrorZ in the success state. */ public static Result_PaymentRelayDecodeErrorZ ok(org.ldk.structs.PaymentRelay o) { - long ret = bindings.CResult_PaymentRelayDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_PaymentRelayDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_PaymentRelayDecodeErrorZ ret_hu_conv = Result_PaymentRelayDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_PeeledOnionNoneZ.java b/src/main/java/org/ldk/structs/Result_PeeledOnionNoneZ.java index cb22bcee..9b7508ec 100644 --- a/src/main/java/org/ldk/structs/Result_PeeledOnionNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_PeeledOnionNoneZ.java @@ -13,6 +13,10 @@ public class Result_PeeledOnionNoneZ extends CommonBase { if (ptr != 0) { bindings.CResult_PeeledOnionNoneZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_PeeledOnionNoneZ_free(ptr); ptr = 0; } + } + static Result_PeeledOnionNoneZ constr_from_ptr(long ptr) { if (bindings.CResult_PeeledOnionNoneZ_is_ok(ptr)) { return new Result_PeeledOnionNoneZ_OK(null, ptr); @@ -68,4 +72,22 @@ public class Result_PeeledOnionNoneZ extends CommonBase { return ret; } + long clone_ptr() { + long ret = bindings.CResult_PeeledOnionNoneZ_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a new CResult_PeeledOnionNoneZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_PeeledOnionNoneZ clone() { + long ret = bindings.CResult_PeeledOnionNoneZ_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_PeeledOnionNoneZ ret_hu_conv = Result_PeeledOnionNoneZ.constr_from_ptr(ret); + return ret_hu_conv; + } + } diff --git a/src/main/java/org/ldk/structs/Result_PendingHTLCInfoDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_PendingHTLCInfoDecodeErrorZ.java index df6ed4c5..6e100392 100644 --- a/src/main/java/org/ldk/structs/Result_PendingHTLCInfoDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_PendingHTLCInfoDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_PendingHTLCInfoDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_PendingHTLCInfoDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_PendingHTLCInfoDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_PendingHTLCInfoDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_PendingHTLCInfoDecodeErrorZ_is_ok(ptr)) { return new Result_PendingHTLCInfoDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_PendingHTLCInfoDecodeErrorZ extends CommonBase { * Creates a new CResult_PendingHTLCInfoDecodeErrorZ in the success state. */ public static Result_PendingHTLCInfoDecodeErrorZ ok(org.ldk.structs.PendingHTLCInfo o) { - long ret = bindings.CResult_PendingHTLCInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_PendingHTLCInfoDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_PendingHTLCInfoDecodeErrorZ ret_hu_conv = Result_PendingHTLCInfoDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_PendingHTLCInfoInboundHTLCErrZ.java b/src/main/java/org/ldk/structs/Result_PendingHTLCInfoInboundHTLCErrZ.java index ea9cc8aa..77402cb3 100644 --- a/src/main/java/org/ldk/structs/Result_PendingHTLCInfoInboundHTLCErrZ.java +++ b/src/main/java/org/ldk/structs/Result_PendingHTLCInfoInboundHTLCErrZ.java @@ -13,6 +13,10 @@ public class Result_PendingHTLCInfoInboundHTLCErrZ extends CommonBase { if (ptr != 0) { bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_free(ptr); ptr = 0; } + } + static Result_PendingHTLCInfoInboundHTLCErrZ constr_from_ptr(long ptr) { if (bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_is_ok(ptr)) { return new Result_PendingHTLCInfoInboundHTLCErrZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_PendingHTLCInfoInboundHTLCErrZ extends CommonBase { * Creates a new CResult_PendingHTLCInfoInboundHTLCErrZ in the success state. */ public static Result_PendingHTLCInfoInboundHTLCErrZ ok(org.ldk.structs.PendingHTLCInfo o) { - long ret = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_PendingHTLCInfoInboundHTLCErrZ ret_hu_conv = Result_PendingHTLCInfoInboundHTLCErrZ.constr_from_ptr(ret); @@ -57,13 +61,12 @@ public class Result_PendingHTLCInfoInboundHTLCErrZ extends CommonBase { /** * Creates a new CResult_PendingHTLCInfoInboundHTLCErrZ in the error state. */ - public static Result_PendingHTLCInfoInboundHTLCErrZ err(short e_err_code_arg, byte[] e_err_data_arg, String e_msg_arg) { - long ret = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_err(bindings.InboundHTLCErr_new(e_err_code_arg, e_err_data_arg, e_msg_arg)); - Reference.reachabilityFence(e_err_code_arg); - Reference.reachabilityFence(e_err_data_arg); - Reference.reachabilityFence(e_msg_arg); + public static Result_PendingHTLCInfoInboundHTLCErrZ err(org.ldk.structs.InboundHTLCErr e) { + long ret = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_err(e.ptr); + Reference.reachabilityFence(e); if (ret >= 0 && ret <= 4096) { return null; } Result_PendingHTLCInfoInboundHTLCErrZ ret_hu_conv = Result_PendingHTLCInfoInboundHTLCErrZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); }; return ret_hu_conv; } @@ -76,4 +79,22 @@ public class Result_PendingHTLCInfoInboundHTLCErrZ extends CommonBase { return ret; } + long clone_ptr() { + long ret = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a new CResult_PendingHTLCInfoInboundHTLCErrZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_PendingHTLCInfoInboundHTLCErrZ clone() { + long ret = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_PendingHTLCInfoInboundHTLCErrZ ret_hu_conv = Result_PendingHTLCInfoInboundHTLCErrZ.constr_from_ptr(ret); + return ret_hu_conv; + } + } diff --git a/src/main/java/org/ldk/structs/Result_PendingHTLCRoutingDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_PendingHTLCRoutingDecodeErrorZ.java index fda7351d..fab60787 100644 --- a/src/main/java/org/ldk/structs/Result_PendingHTLCRoutingDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_PendingHTLCRoutingDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_PendingHTLCRoutingDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_PendingHTLCRoutingDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_PendingHTLCRoutingDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_PendingHTLCRoutingDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_PendingHTLCRoutingDecodeErrorZ_is_ok(ptr)) { return new Result_PendingHTLCRoutingDecodeErrorZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_PhantomRouteHintsDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_PhantomRouteHintsDecodeErrorZ.java index c4c3df71..6f3910e6 100644 --- a/src/main/java/org/ldk/structs/Result_PhantomRouteHintsDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_PhantomRouteHintsDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_PhantomRouteHintsDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_PhantomRouteHintsDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_PhantomRouteHintsDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_PhantomRouteHintsDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_PhantomRouteHintsDecodeErrorZ_is_ok(ptr)) { return new Result_PhantomRouteHintsDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_PhantomRouteHintsDecodeErrorZ extends CommonBase { * Creates a new CResult_PhantomRouteHintsDecodeErrorZ in the success state. */ public static Result_PhantomRouteHintsDecodeErrorZ ok(org.ldk.structs.PhantomRouteHints o) { - long ret = bindings.CResult_PhantomRouteHintsDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_PhantomRouteHintsDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_PhantomRouteHintsDecodeErrorZ ret_hu_conv = Result_PhantomRouteHintsDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_PingDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_PingDecodeErrorZ.java index bdda2c54..f175e020 100644 --- a/src/main/java/org/ldk/structs/Result_PingDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_PingDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_PingDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_PingDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_PingDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_PingDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_PingDecodeErrorZ_is_ok(ptr)) { return new Result_PingDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_PingDecodeErrorZ extends CommonBase { * Creates a new CResult_PingDecodeErrorZ in the success state. */ public static Result_PingDecodeErrorZ ok(org.ldk.structs.Ping o) { - long ret = bindings.CResult_PingDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_PingDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_PingDecodeErrorZ ret_hu_conv = Result_PingDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_PongDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_PongDecodeErrorZ.java index c9c5e096..a25d8560 100644 --- a/src/main/java/org/ldk/structs/Result_PongDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_PongDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_PongDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_PongDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_PongDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_PongDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_PongDecodeErrorZ_is_ok(ptr)) { return new Result_PongDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_PongDecodeErrorZ extends CommonBase { * Creates a new CResult_PongDecodeErrorZ in the success state. */ public static Result_PongDecodeErrorZ ok(org.ldk.structs.Pong o) { - long ret = bindings.CResult_PongDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_PongDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_PongDecodeErrorZ ret_hu_conv = Result_PongDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_PositiveTimestampCreationErrorZ.java b/src/main/java/org/ldk/structs/Result_PositiveTimestampCreationErrorZ.java index 62c3ba5e..d52ed203 100644 --- a/src/main/java/org/ldk/structs/Result_PositiveTimestampCreationErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_PositiveTimestampCreationErrorZ.java @@ -13,6 +13,10 @@ public class Result_PositiveTimestampCreationErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_PositiveTimestampCreationErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_PositiveTimestampCreationErrorZ_free(ptr); ptr = 0; } + } + static Result_PositiveTimestampCreationErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_PositiveTimestampCreationErrorZ_is_ok(ptr)) { return new Result_PositiveTimestampCreationErrorZ_OK(null, ptr); @@ -43,7 +47,7 @@ public class Result_PositiveTimestampCreationErrorZ extends CommonBase { * Creates a new CResult_PositiveTimestampCreationErrorZ in the success state. */ public static Result_PositiveTimestampCreationErrorZ ok(org.ldk.structs.PositiveTimestamp o) { - long ret = bindings.CResult_PositiveTimestampCreationErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_PositiveTimestampCreationErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_PositiveTimestampCreationErrorZ ret_hu_conv = Result_PositiveTimestampCreationErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_PrivateRouteCreationErrorZ.java b/src/main/java/org/ldk/structs/Result_PrivateRouteCreationErrorZ.java index 25213ffa..40d19ab1 100644 --- a/src/main/java/org/ldk/structs/Result_PrivateRouteCreationErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_PrivateRouteCreationErrorZ.java @@ -13,6 +13,10 @@ public class Result_PrivateRouteCreationErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_PrivateRouteCreationErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_PrivateRouteCreationErrorZ_free(ptr); ptr = 0; } + } + static Result_PrivateRouteCreationErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_PrivateRouteCreationErrorZ_is_ok(ptr)) { return new Result_PrivateRouteCreationErrorZ_OK(null, ptr); @@ -43,7 +47,7 @@ public class Result_PrivateRouteCreationErrorZ extends CommonBase { * Creates a new CResult_PrivateRouteCreationErrorZ in the success state. */ public static Result_PrivateRouteCreationErrorZ ok(org.ldk.structs.PrivateRoute o) { - long ret = bindings.CResult_PrivateRouteCreationErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_PrivateRouteCreationErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_PrivateRouteCreationErrorZ ret_hu_conv = Result_PrivateRouteCreationErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_ProbabilisticScorerDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ProbabilisticScorerDecodeErrorZ.java index a8d7302b..8ec63d24 100644 --- a/src/main/java/org/ldk/structs/Result_ProbabilisticScorerDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ProbabilisticScorerDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_ProbabilisticScorerDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_ProbabilisticScorerDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_ProbabilisticScorerDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_ProbabilisticScorerDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_ProbabilisticScorerDecodeErrorZ_is_ok(ptr)) { return new Result_ProbabilisticScorerDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_ProbabilisticScorerDecodeErrorZ extends CommonBase { * Creates a new CResult_ProbabilisticScorerDecodeErrorZ in the success state. */ public static Result_ProbabilisticScorerDecodeErrorZ ok(ProbabilisticScoringDecayParameters o_decay_params, NetworkGraph o_network_graph, Logger o_logger) { - long ret = bindings.CResult_ProbabilisticScorerDecodeErrorZ_ok(bindings.ProbabilisticScorer_new(o_decay_params == null ? 0 : o_decay_params.ptr, o_network_graph == null ? 0 : o_network_graph.ptr, o_logger.ptr)); + long ret = bindings.CResult_ProbabilisticScorerDecodeErrorZ_ok(bindings.ProbabilisticScorer_new(o_decay_params.ptr, o_network_graph.ptr, o_logger.ptr)); Reference.reachabilityFence(o_decay_params); Reference.reachabilityFence(o_network_graph); Reference.reachabilityFence(o_logger); diff --git a/src/main/java/org/ldk/structs/Result_PublicKeyNoneZ.java b/src/main/java/org/ldk/structs/Result_PublicKeyNoneZ.java index 3629c96e..d2a6f206 100644 --- a/src/main/java/org/ldk/structs/Result_PublicKeyNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_PublicKeyNoneZ.java @@ -13,6 +13,10 @@ public class Result_PublicKeyNoneZ extends CommonBase { if (ptr != 0) { bindings.CResult_PublicKeyNoneZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_PublicKeyNoneZ_free(ptr); ptr = 0; } + } + static Result_PublicKeyNoneZ constr_from_ptr(long ptr) { if (bindings.CResult_PublicKeyNoneZ_is_ok(ptr)) { return new Result_PublicKeyNoneZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_PublicKeySecp256k1ErrorZ.java b/src/main/java/org/ldk/structs/Result_PublicKeySecp256k1ErrorZ.java index a3025352..ff3b4774 100644 --- a/src/main/java/org/ldk/structs/Result_PublicKeySecp256k1ErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_PublicKeySecp256k1ErrorZ.java @@ -13,6 +13,10 @@ public class Result_PublicKeySecp256k1ErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_PublicKeySecp256k1ErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_PublicKeySecp256k1ErrorZ_free(ptr); ptr = 0; } + } + static Result_PublicKeySecp256k1ErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_PublicKeySecp256k1ErrorZ_is_ok(ptr)) { return new Result_PublicKeySecp256k1ErrorZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_QueryChannelRangeDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_QueryChannelRangeDecodeErrorZ.java index 2c3b1f8b..e2032c15 100644 --- a/src/main/java/org/ldk/structs/Result_QueryChannelRangeDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_QueryChannelRangeDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_QueryChannelRangeDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_QueryChannelRangeDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_QueryChannelRangeDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_QueryChannelRangeDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_QueryChannelRangeDecodeErrorZ_is_ok(ptr)) { return new Result_QueryChannelRangeDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_QueryChannelRangeDecodeErrorZ extends CommonBase { * Creates a new CResult_QueryChannelRangeDecodeErrorZ in the success state. */ public static Result_QueryChannelRangeDecodeErrorZ ok(org.ldk.structs.QueryChannelRange o) { - long ret = bindings.CResult_QueryChannelRangeDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_QueryChannelRangeDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_QueryChannelRangeDecodeErrorZ ret_hu_conv = Result_QueryChannelRangeDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_QueryShortChannelIdsDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_QueryShortChannelIdsDecodeErrorZ.java index 2d0ad1ca..6096c479 100644 --- a/src/main/java/org/ldk/structs/Result_QueryShortChannelIdsDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_QueryShortChannelIdsDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_QueryShortChannelIdsDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_QueryShortChannelIdsDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_QueryShortChannelIdsDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_QueryShortChannelIdsDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_QueryShortChannelIdsDecodeErrorZ_is_ok(ptr)) { return new Result_QueryShortChannelIdsDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_QueryShortChannelIdsDecodeErrorZ extends CommonBase { * Creates a new CResult_QueryShortChannelIdsDecodeErrorZ in the success state. */ public static Result_QueryShortChannelIdsDecodeErrorZ ok(org.ldk.structs.QueryShortChannelIds o) { - long ret = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_QueryShortChannelIdsDecodeErrorZ ret_hu_conv = Result_QueryShortChannelIdsDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_RecipientOnionFieldsDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_RecipientOnionFieldsDecodeErrorZ.java index d7124dcf..078ef6d5 100644 --- a/src/main/java/org/ldk/structs/Result_RecipientOnionFieldsDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_RecipientOnionFieldsDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_RecipientOnionFieldsDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_RecipientOnionFieldsDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_RecipientOnionFieldsDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_RecipientOnionFieldsDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_RecipientOnionFieldsDecodeErrorZ_is_ok(ptr)) { return new Result_RecipientOnionFieldsDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_RecipientOnionFieldsDecodeErrorZ extends CommonBase { * Creates a new CResult_RecipientOnionFieldsDecodeErrorZ in the success state. */ public static Result_RecipientOnionFieldsDecodeErrorZ ok(org.ldk.structs.RecipientOnionFields o) { - long ret = bindings.CResult_RecipientOnionFieldsDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_RecipientOnionFieldsDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_RecipientOnionFieldsDecodeErrorZ ret_hu_conv = Result_RecipientOnionFieldsDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_RecipientOnionFieldsNoneZ.java b/src/main/java/org/ldk/structs/Result_RecipientOnionFieldsNoneZ.java index 506e3d74..9320d6a0 100644 --- a/src/main/java/org/ldk/structs/Result_RecipientOnionFieldsNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_RecipientOnionFieldsNoneZ.java @@ -13,6 +13,10 @@ public class Result_RecipientOnionFieldsNoneZ extends CommonBase { if (ptr != 0) { bindings.CResult_RecipientOnionFieldsNoneZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_RecipientOnionFieldsNoneZ_free(ptr); ptr = 0; } + } + static Result_RecipientOnionFieldsNoneZ constr_from_ptr(long ptr) { if (bindings.CResult_RecipientOnionFieldsNoneZ_is_ok(ptr)) { return new Result_RecipientOnionFieldsNoneZ_OK(null, ptr); @@ -41,7 +45,7 @@ public class Result_RecipientOnionFieldsNoneZ extends CommonBase { * Creates a new CResult_RecipientOnionFieldsNoneZ in the success state. */ public static Result_RecipientOnionFieldsNoneZ ok(org.ldk.structs.RecipientOnionFields o) { - long ret = bindings.CResult_RecipientOnionFieldsNoneZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_RecipientOnionFieldsNoneZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_RecipientOnionFieldsNoneZ ret_hu_conv = Result_RecipientOnionFieldsNoneZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_RecoverableSignatureNoneZ.java b/src/main/java/org/ldk/structs/Result_RecoverableSignatureNoneZ.java index e2b0a08e..8fc25c3d 100644 --- a/src/main/java/org/ldk/structs/Result_RecoverableSignatureNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_RecoverableSignatureNoneZ.java @@ -13,6 +13,10 @@ public class Result_RecoverableSignatureNoneZ extends CommonBase { if (ptr != 0) { bindings.CResult_RecoverableSignatureNoneZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_RecoverableSignatureNoneZ_free(ptr); ptr = 0; } + } + static Result_RecoverableSignatureNoneZ constr_from_ptr(long ptr) { if (bindings.CResult_RecoverableSignatureNoneZ_is_ok(ptr)) { return new Result_RecoverableSignatureNoneZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_RefundBolt12ParseErrorZ.java b/src/main/java/org/ldk/structs/Result_RefundBolt12ParseErrorZ.java index 2cabbdd4..5f63d024 100644 --- a/src/main/java/org/ldk/structs/Result_RefundBolt12ParseErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_RefundBolt12ParseErrorZ.java @@ -13,6 +13,10 @@ public class Result_RefundBolt12ParseErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_RefundBolt12ParseErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_RefundBolt12ParseErrorZ_free(ptr); ptr = 0; } + } + static Result_RefundBolt12ParseErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_RefundBolt12ParseErrorZ_is_ok(ptr)) { return new Result_RefundBolt12ParseErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_RefundBolt12ParseErrorZ extends CommonBase { * Creates a new CResult_RefundBolt12ParseErrorZ in the success state. */ public static Result_RefundBolt12ParseErrorZ ok(org.ldk.structs.Refund o) { - long ret = bindings.CResult_RefundBolt12ParseErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_RefundBolt12ParseErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_RefundBolt12ParseErrorZ ret_hu_conv = Result_RefundBolt12ParseErrorZ.constr_from_ptr(ret); @@ -58,7 +62,7 @@ public class Result_RefundBolt12ParseErrorZ extends CommonBase { * Creates a new CResult_RefundBolt12ParseErrorZ in the error state. */ public static Result_RefundBolt12ParseErrorZ err(org.ldk.structs.Bolt12ParseError e) { - long ret = bindings.CResult_RefundBolt12ParseErrorZ_err(e == null ? 0 : e.ptr); + long ret = bindings.CResult_RefundBolt12ParseErrorZ_err(e.ptr); Reference.reachabilityFence(e); if (ret >= 0 && ret <= 4096) { return null; } Result_RefundBolt12ParseErrorZ ret_hu_conv = Result_RefundBolt12ParseErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_RefundBolt12SemanticErrorZ.java b/src/main/java/org/ldk/structs/Result_RefundBolt12SemanticErrorZ.java new file mode 100644 index 00000000..731608dc --- /dev/null +++ b/src/main/java/org/ldk/structs/Result_RefundBolt12SemanticErrorZ.java @@ -0,0 +1,96 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + +public class Result_RefundBolt12SemanticErrorZ extends CommonBase { + private Result_RefundBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); } + protected void finalize() throws Throwable { + if (ptr != 0) { bindings.CResult_RefundBolt12SemanticErrorZ_free(ptr); } super.finalize(); + } + + protected void force_free() { + if (ptr != 0) { bindings.CResult_RefundBolt12SemanticErrorZ_free(ptr); ptr = 0; } + } + + static Result_RefundBolt12SemanticErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_RefundBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_RefundBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_RefundBolt12SemanticErrorZ_Err(null, ptr); + } + } + public static final class Result_RefundBolt12SemanticErrorZ_OK extends Result_RefundBolt12SemanticErrorZ { + public final Refund res; + private Result_RefundBolt12SemanticErrorZ_OK(Object _dummy, long ptr) { + super(_dummy, ptr); + long res = bindings.CResult_RefundBolt12SemanticErrorZ_get_ok(ptr); + org.ldk.structs.Refund res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.Refund(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); }; + this.res = res_hu_conv; + } + } + + public static final class Result_RefundBolt12SemanticErrorZ_Err extends Result_RefundBolt12SemanticErrorZ { + public final Bolt12SemanticError err; + private Result_RefundBolt12SemanticErrorZ_Err(Object _dummy, long ptr) { + super(_dummy, ptr); + this.err = bindings.CResult_RefundBolt12SemanticErrorZ_get_err(ptr); + } + } + + /** + * Creates a new CResult_RefundBolt12SemanticErrorZ in the success state. + */ + public static Result_RefundBolt12SemanticErrorZ ok(org.ldk.structs.Refund o) { + long ret = bindings.CResult_RefundBolt12SemanticErrorZ_ok(o.ptr); + Reference.reachabilityFence(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_RefundBolt12SemanticErrorZ ret_hu_conv = Result_RefundBolt12SemanticErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_RefundBolt12SemanticErrorZ in the error state. + */ + public static Result_RefundBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) { + long ret = bindings.CResult_RefundBolt12SemanticErrorZ_err(e); + Reference.reachabilityFence(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_RefundBolt12SemanticErrorZ ret_hu_conv = Result_RefundBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public boolean is_ok() { + boolean ret = bindings.CResult_RefundBolt12SemanticErrorZ_is_ok(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + long clone_ptr() { + long ret = bindings.CResult_RefundBolt12SemanticErrorZ_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a new CResult_RefundBolt12SemanticErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_RefundBolt12SemanticErrorZ clone() { + long ret = bindings.CResult_RefundBolt12SemanticErrorZ_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_RefundBolt12SemanticErrorZ ret_hu_conv = Result_RefundBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.java b/src/main/java/org/ldk/structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.java new file mode 100644 index 00000000..21cb7681 --- /dev/null +++ b/src/main/java/org/ldk/structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.java @@ -0,0 +1,96 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + +public class Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ extends CommonBase { + private Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); } + protected void finalize() throws Throwable { + if (ptr != 0) { bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(ptr); } super.finalize(); + } + + protected void force_free() { + if (ptr != 0) { bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(ptr); ptr = 0; } + } + + static Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_Err(null, ptr); + } + } + public static final class Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_OK extends Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ { + public final RefundMaybeWithDerivedMetadataBuilder res; + private Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_OK(Object _dummy, long ptr) { + super(_dummy, ptr); + long res = bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(ptr); + org.ldk.structs.RefundMaybeWithDerivedMetadataBuilder res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.RefundMaybeWithDerivedMetadataBuilder(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); }; + this.res = res_hu_conv; + } + } + + public static final class Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_Err extends Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ { + public final Bolt12SemanticError err; + private Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_Err(Object _dummy, long ptr) { + super(_dummy, ptr); + this.err = bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(ptr); + } + } + + /** + * Creates a new CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ in the success state. + */ + public static Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ ok(org.ldk.structs.RefundMaybeWithDerivedMetadataBuilder o) { + long ret = bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(o.ptr); + Reference.reachabilityFence(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ in the error state. + */ + public static Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) { + long ret = bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(e); + Reference.reachabilityFence(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public boolean is_ok() { + boolean ret = bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + long clone_ptr() { + long ret = bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a new CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ clone() { + long ret = bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/Result_ReplyChannelRangeDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ReplyChannelRangeDecodeErrorZ.java index 54ce2771..cd3309cc 100644 --- a/src/main/java/org/ldk/structs/Result_ReplyChannelRangeDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ReplyChannelRangeDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_ReplyChannelRangeDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_ReplyChannelRangeDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_ReplyChannelRangeDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_ReplyChannelRangeDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_ReplyChannelRangeDecodeErrorZ_is_ok(ptr)) { return new Result_ReplyChannelRangeDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_ReplyChannelRangeDecodeErrorZ extends CommonBase { * Creates a new CResult_ReplyChannelRangeDecodeErrorZ in the success state. */ public static Result_ReplyChannelRangeDecodeErrorZ ok(org.ldk.structs.ReplyChannelRange o) { - long ret = bindings.CResult_ReplyChannelRangeDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ReplyChannelRangeDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ReplyChannelRangeDecodeErrorZ ret_hu_conv = Result_ReplyChannelRangeDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.java index 62cb3e03..9fb1474e 100644 --- a/src/main/java/org/ldk/structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_ReplyShortChannelIdsEndDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_ReplyShortChannelIdsEndDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_is_ok(ptr)) { return new Result_ReplyShortChannelIdsEndDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_ReplyShortChannelIdsEndDecodeErrorZ extends CommonBase { * Creates a new CResult_ReplyShortChannelIdsEndDecodeErrorZ in the success state. */ public static Result_ReplyShortChannelIdsEndDecodeErrorZ ok(org.ldk.structs.ReplyShortChannelIdsEnd o) { - long ret = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ReplyShortChannelIdsEndDecodeErrorZ ret_hu_conv = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_RetryDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_RetryDecodeErrorZ.java index 787890b9..e1d233bc 100644 --- a/src/main/java/org/ldk/structs/Result_RetryDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_RetryDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_RetryDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_RetryDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_RetryDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_RetryDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_RetryDecodeErrorZ_is_ok(ptr)) { return new Result_RetryDecodeErrorZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_RevocationBasepointDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_RevocationBasepointDecodeErrorZ.java index 94702bb8..6ec454a9 100644 --- a/src/main/java/org/ldk/structs/Result_RevocationBasepointDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_RevocationBasepointDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_RevocationBasepointDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_RevocationBasepointDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_RevocationBasepointDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_RevocationBasepointDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_RevocationBasepointDecodeErrorZ_is_ok(ptr)) { return new Result_RevocationBasepointDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_RevocationBasepointDecodeErrorZ extends CommonBase { * Creates a new CResult_RevocationBasepointDecodeErrorZ in the success state. */ public static Result_RevocationBasepointDecodeErrorZ ok(org.ldk.structs.RevocationBasepoint o) { - long ret = bindings.CResult_RevocationBasepointDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_RevocationBasepointDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_RevocationBasepointDecodeErrorZ ret_hu_conv = Result_RevocationBasepointDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_RevocationKeyDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_RevocationKeyDecodeErrorZ.java index 1b67095b..6bcda022 100644 --- a/src/main/java/org/ldk/structs/Result_RevocationKeyDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_RevocationKeyDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_RevocationKeyDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_RevocationKeyDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_RevocationKeyDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_RevocationKeyDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_RevocationKeyDecodeErrorZ_is_ok(ptr)) { return new Result_RevocationKeyDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_RevocationKeyDecodeErrorZ extends CommonBase { * Creates a new CResult_RevocationKeyDecodeErrorZ in the success state. */ public static Result_RevocationKeyDecodeErrorZ ok(org.ldk.structs.RevocationKey o) { - long ret = bindings.CResult_RevocationKeyDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_RevocationKeyDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_RevocationKeyDecodeErrorZ ret_hu_conv = Result_RevocationKeyDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_RevokeAndACKDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_RevokeAndACKDecodeErrorZ.java index 0db1a0af..c4beddd7 100644 --- a/src/main/java/org/ldk/structs/Result_RevokeAndACKDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_RevokeAndACKDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_RevokeAndACKDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_RevokeAndACKDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_RevokeAndACKDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_RevokeAndACKDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_RevokeAndACKDecodeErrorZ_is_ok(ptr)) { return new Result_RevokeAndACKDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_RevokeAndACKDecodeErrorZ extends CommonBase { * Creates a new CResult_RevokeAndACKDecodeErrorZ in the success state. */ public static Result_RevokeAndACKDecodeErrorZ ok(org.ldk.structs.RevokeAndACK o) { - long ret = bindings.CResult_RevokeAndACKDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_RevokeAndACKDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_RevokeAndACKDecodeErrorZ ret_hu_conv = Result_RevokeAndACKDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_RouteDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_RouteDecodeErrorZ.java index 604f13f7..fdf4b95d 100644 --- a/src/main/java/org/ldk/structs/Result_RouteDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_RouteDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_RouteDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_RouteDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_RouteDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_RouteDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_RouteDecodeErrorZ_is_ok(ptr)) { return new Result_RouteDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_RouteDecodeErrorZ extends CommonBase { * Creates a new CResult_RouteDecodeErrorZ in the success state. */ public static Result_RouteDecodeErrorZ ok(org.ldk.structs.Route o) { - long ret = bindings.CResult_RouteDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_RouteDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_RouteDecodeErrorZ ret_hu_conv = Result_RouteDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_RouteHintDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_RouteHintDecodeErrorZ.java index c98b7367..8791ca35 100644 --- a/src/main/java/org/ldk/structs/Result_RouteHintDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_RouteHintDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_RouteHintDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_RouteHintDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_RouteHintDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_RouteHintDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_RouteHintDecodeErrorZ_is_ok(ptr)) { return new Result_RouteHintDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_RouteHintDecodeErrorZ extends CommonBase { * Creates a new CResult_RouteHintDecodeErrorZ in the success state. */ public static Result_RouteHintDecodeErrorZ ok(org.ldk.structs.RouteHint o) { - long ret = bindings.CResult_RouteHintDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_RouteHintDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_RouteHintDecodeErrorZ ret_hu_conv = Result_RouteHintDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_RouteHintHopDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_RouteHintHopDecodeErrorZ.java index ed89d430..26a07c94 100644 --- a/src/main/java/org/ldk/structs/Result_RouteHintHopDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_RouteHintHopDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_RouteHintHopDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_RouteHintHopDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_RouteHintHopDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_RouteHintHopDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_RouteHintHopDecodeErrorZ_is_ok(ptr)) { return new Result_RouteHintHopDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_RouteHintHopDecodeErrorZ extends CommonBase { * Creates a new CResult_RouteHintHopDecodeErrorZ in the success state. */ public static Result_RouteHintHopDecodeErrorZ ok(org.ldk.structs.RouteHintHop o) { - long ret = bindings.CResult_RouteHintHopDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_RouteHintHopDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_RouteHintHopDecodeErrorZ ret_hu_conv = Result_RouteHintHopDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_RouteHopDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_RouteHopDecodeErrorZ.java index 67b0dcca..83bca000 100644 --- a/src/main/java/org/ldk/structs/Result_RouteHopDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_RouteHopDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_RouteHopDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_RouteHopDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_RouteHopDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_RouteHopDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_RouteHopDecodeErrorZ_is_ok(ptr)) { return new Result_RouteHopDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_RouteHopDecodeErrorZ extends CommonBase { * Creates a new CResult_RouteHopDecodeErrorZ in the success state. */ public static Result_RouteHopDecodeErrorZ ok(org.ldk.structs.RouteHop o) { - long ret = bindings.CResult_RouteHopDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_RouteHopDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_RouteHopDecodeErrorZ ret_hu_conv = Result_RouteHopDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_RouteLightningErrorZ.java b/src/main/java/org/ldk/structs/Result_RouteLightningErrorZ.java index 83b7b8b1..8d0baba4 100644 --- a/src/main/java/org/ldk/structs/Result_RouteLightningErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_RouteLightningErrorZ.java @@ -13,6 +13,10 @@ public class Result_RouteLightningErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_RouteLightningErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_RouteLightningErrorZ_free(ptr); ptr = 0; } + } + static Result_RouteLightningErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_RouteLightningErrorZ_is_ok(ptr)) { return new Result_RouteLightningErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_RouteLightningErrorZ extends CommonBase { * Creates a new CResult_RouteLightningErrorZ in the success state. */ public static Result_RouteLightningErrorZ ok(org.ldk.structs.Route o) { - long ret = bindings.CResult_RouteLightningErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_RouteLightningErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_RouteLightningErrorZ ret_hu_conv = Result_RouteLightningErrorZ.constr_from_ptr(ret); @@ -58,7 +62,7 @@ public class Result_RouteLightningErrorZ extends CommonBase { * Creates a new CResult_RouteLightningErrorZ in the error state. */ public static Result_RouteLightningErrorZ err(org.ldk.structs.LightningError e) { - long ret = bindings.CResult_RouteLightningErrorZ_err(e == null ? 0 : e.ptr); + long ret = bindings.CResult_RouteLightningErrorZ_err(e.ptr); Reference.reachabilityFence(e); if (ret >= 0 && ret <= 4096) { return null; } Result_RouteLightningErrorZ ret_hu_conv = Result_RouteLightningErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_RouteParametersDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_RouteParametersDecodeErrorZ.java index 460fbc4d..11c5fae1 100644 --- a/src/main/java/org/ldk/structs/Result_RouteParametersDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_RouteParametersDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_RouteParametersDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_RouteParametersDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_RouteParametersDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_RouteParametersDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_RouteParametersDecodeErrorZ_is_ok(ptr)) { return new Result_RouteParametersDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_RouteParametersDecodeErrorZ extends CommonBase { * Creates a new CResult_RouteParametersDecodeErrorZ in the success state. */ public static Result_RouteParametersDecodeErrorZ ok(org.ldk.structs.RouteParameters o) { - long ret = bindings.CResult_RouteParametersDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_RouteParametersDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_RouteParametersDecodeErrorZ ret_hu_conv = Result_RouteParametersDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_RoutingFeesDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_RoutingFeesDecodeErrorZ.java index 5e34a8ab..5b7e94ee 100644 --- a/src/main/java/org/ldk/structs/Result_RoutingFeesDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_RoutingFeesDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_RoutingFeesDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_RoutingFeesDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_RoutingFeesDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_RoutingFeesDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_RoutingFeesDecodeErrorZ_is_ok(ptr)) { return new Result_RoutingFeesDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_RoutingFeesDecodeErrorZ extends CommonBase { * Creates a new CResult_RoutingFeesDecodeErrorZ in the success state. */ public static Result_RoutingFeesDecodeErrorZ ok(org.ldk.structs.RoutingFees o) { - long ret = bindings.CResult_RoutingFeesDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_RoutingFeesDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_RoutingFeesDecodeErrorZ ret_hu_conv = Result_RoutingFeesDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_SchnorrSignatureNoneZ.java b/src/main/java/org/ldk/structs/Result_SchnorrSignatureNoneZ.java index ddb18a0b..c3e5784a 100644 --- a/src/main/java/org/ldk/structs/Result_SchnorrSignatureNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_SchnorrSignatureNoneZ.java @@ -13,6 +13,10 @@ public class Result_SchnorrSignatureNoneZ extends CommonBase { if (ptr != 0) { bindings.CResult_SchnorrSignatureNoneZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_SchnorrSignatureNoneZ_free(ptr); ptr = 0; } + } + static Result_SchnorrSignatureNoneZ constr_from_ptr(long ptr) { if (bindings.CResult_SchnorrSignatureNoneZ_is_ok(ptr)) { return new Result_SchnorrSignatureNoneZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_SendSuccessSendErrorZ.java b/src/main/java/org/ldk/structs/Result_SendSuccessSendErrorZ.java index fcb729e1..cd7260d5 100644 --- a/src/main/java/org/ldk/structs/Result_SendSuccessSendErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_SendSuccessSendErrorZ.java @@ -13,6 +13,10 @@ public class Result_SendSuccessSendErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_SendSuccessSendErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_SendSuccessSendErrorZ_free(ptr); ptr = 0; } + } + static Result_SendSuccessSendErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_SendSuccessSendErrorZ_is_ok(ptr)) { return new Result_SendSuccessSendErrorZ_OK(null, ptr); @@ -75,4 +79,22 @@ public class Result_SendSuccessSendErrorZ extends CommonBase { return ret; } + long clone_ptr() { + long ret = bindings.CResult_SendSuccessSendErrorZ_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a new CResult_SendSuccessSendErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_SendSuccessSendErrorZ clone() { + long ret = bindings.CResult_SendSuccessSendErrorZ_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_SendSuccessSendErrorZ ret_hu_conv = Result_SendSuccessSendErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + } diff --git a/src/main/java/org/ldk/structs/Result_ShutdownDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ShutdownDecodeErrorZ.java index 9772f3c7..403a2002 100644 --- a/src/main/java/org/ldk/structs/Result_ShutdownDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ShutdownDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_ShutdownDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_ShutdownDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_ShutdownDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_ShutdownDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_ShutdownDecodeErrorZ_is_ok(ptr)) { return new Result_ShutdownDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_ShutdownDecodeErrorZ extends CommonBase { * Creates a new CResult_ShutdownDecodeErrorZ in the success state. */ public static Result_ShutdownDecodeErrorZ ok(org.ldk.structs.Shutdown o) { - long ret = bindings.CResult_ShutdownDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ShutdownDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ShutdownDecodeErrorZ ret_hu_conv = Result_ShutdownDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_ShutdownScriptDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ShutdownScriptDecodeErrorZ.java index 8d366a97..45ca0059 100644 --- a/src/main/java/org/ldk/structs/Result_ShutdownScriptDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ShutdownScriptDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_ShutdownScriptDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_ShutdownScriptDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_ShutdownScriptDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_ShutdownScriptDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_ShutdownScriptDecodeErrorZ_is_ok(ptr)) { return new Result_ShutdownScriptDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_ShutdownScriptDecodeErrorZ extends CommonBase { * Creates a new CResult_ShutdownScriptDecodeErrorZ in the success state. */ public static Result_ShutdownScriptDecodeErrorZ ok(org.ldk.structs.ShutdownScript o) { - long ret = bindings.CResult_ShutdownScriptDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ShutdownScriptDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ShutdownScriptDecodeErrorZ ret_hu_conv = Result_ShutdownScriptDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_ShutdownScriptInvalidShutdownScriptZ.java b/src/main/java/org/ldk/structs/Result_ShutdownScriptInvalidShutdownScriptZ.java index af239094..dbaa23b4 100644 --- a/src/main/java/org/ldk/structs/Result_ShutdownScriptInvalidShutdownScriptZ.java +++ b/src/main/java/org/ldk/structs/Result_ShutdownScriptInvalidShutdownScriptZ.java @@ -13,6 +13,10 @@ public class Result_ShutdownScriptInvalidShutdownScriptZ extends CommonBase { if (ptr != 0) { bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_free(ptr); ptr = 0; } + } + static Result_ShutdownScriptInvalidShutdownScriptZ constr_from_ptr(long ptr) { if (bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_is_ok(ptr)) { return new Result_ShutdownScriptInvalidShutdownScriptZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_ShutdownScriptInvalidShutdownScriptZ extends CommonBase { * Creates a new CResult_ShutdownScriptInvalidShutdownScriptZ in the success state. */ public static Result_ShutdownScriptInvalidShutdownScriptZ ok(org.ldk.structs.ShutdownScript o) { - long ret = bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ShutdownScriptInvalidShutdownScriptZ ret_hu_conv = Result_ShutdownScriptInvalidShutdownScriptZ.constr_from_ptr(ret); @@ -58,7 +62,7 @@ public class Result_ShutdownScriptInvalidShutdownScriptZ extends CommonBase { * Creates a new CResult_ShutdownScriptInvalidShutdownScriptZ in the error state. */ public static Result_ShutdownScriptInvalidShutdownScriptZ err(org.ldk.structs.InvalidShutdownScript e) { - long ret = bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_err(e == null ? 0 : e.ptr); + long ret = bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_err(e.ptr); Reference.reachabilityFence(e); if (ret >= 0 && ret <= 4096) { return null; } Result_ShutdownScriptInvalidShutdownScriptZ ret_hu_conv = Result_ShutdownScriptInvalidShutdownScriptZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_ShutdownScriptNoneZ.java b/src/main/java/org/ldk/structs/Result_ShutdownScriptNoneZ.java index 62e48ee3..6db73945 100644 --- a/src/main/java/org/ldk/structs/Result_ShutdownScriptNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_ShutdownScriptNoneZ.java @@ -13,6 +13,10 @@ public class Result_ShutdownScriptNoneZ extends CommonBase { if (ptr != 0) { bindings.CResult_ShutdownScriptNoneZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_ShutdownScriptNoneZ_free(ptr); ptr = 0; } + } + static Result_ShutdownScriptNoneZ constr_from_ptr(long ptr) { if (bindings.CResult_ShutdownScriptNoneZ_is_ok(ptr)) { return new Result_ShutdownScriptNoneZ_OK(null, ptr); @@ -41,7 +45,7 @@ public class Result_ShutdownScriptNoneZ extends CommonBase { * Creates a new CResult_ShutdownScriptNoneZ in the success state. */ public static Result_ShutdownScriptNoneZ ok(org.ldk.structs.ShutdownScript o) { - long ret = bindings.CResult_ShutdownScriptNoneZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ShutdownScriptNoneZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ShutdownScriptNoneZ ret_hu_conv = Result_ShutdownScriptNoneZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_SiPrefixBolt11ParseErrorZ.java b/src/main/java/org/ldk/structs/Result_SiPrefixBolt11ParseErrorZ.java index 8d5e1fbe..3aea9dc9 100644 --- a/src/main/java/org/ldk/structs/Result_SiPrefixBolt11ParseErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_SiPrefixBolt11ParseErrorZ.java @@ -13,6 +13,10 @@ public class Result_SiPrefixBolt11ParseErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_SiPrefixBolt11ParseErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_SiPrefixBolt11ParseErrorZ_free(ptr); ptr = 0; } + } + static Result_SiPrefixBolt11ParseErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_SiPrefixBolt11ParseErrorZ_is_ok(ptr)) { return new Result_SiPrefixBolt11ParseErrorZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.java b/src/main/java/org/ldk/structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.java index f5565725..4adaa1af 100644 --- a/src/main/java/org/ldk/structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.java @@ -13,6 +13,10 @@ public class Result_SignedRawBolt11InvoiceBolt11ParseErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ_free(ptr); ptr = 0; } + } + static Result_SignedRawBolt11InvoiceBolt11ParseErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ_is_ok(ptr)) { return new Result_SignedRawBolt11InvoiceBolt11ParseErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_SignedRawBolt11InvoiceBolt11ParseErrorZ extends CommonBase { * Creates a new CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ in the success state. */ public static Result_SignedRawBolt11InvoiceBolt11ParseErrorZ ok(org.ldk.structs.SignedRawBolt11Invoice o) { - long ret = bindings.CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_SignedRawBolt11InvoiceBolt11ParseErrorZ ret_hu_conv = Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_SocketAddressDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_SocketAddressDecodeErrorZ.java index c2367c5d..271d4608 100644 --- a/src/main/java/org/ldk/structs/Result_SocketAddressDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_SocketAddressDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_SocketAddressDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_SocketAddressDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_SocketAddressDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_SocketAddressDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_SocketAddressDecodeErrorZ_is_ok(ptr)) { return new Result_SocketAddressDecodeErrorZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_SocketAddressSocketAddressParseErrorZ.java b/src/main/java/org/ldk/structs/Result_SocketAddressSocketAddressParseErrorZ.java index d50e39e6..99138640 100644 --- a/src/main/java/org/ldk/structs/Result_SocketAddressSocketAddressParseErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_SocketAddressSocketAddressParseErrorZ.java @@ -13,6 +13,10 @@ public class Result_SocketAddressSocketAddressParseErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_SocketAddressSocketAddressParseErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_SocketAddressSocketAddressParseErrorZ_free(ptr); ptr = 0; } + } + static Result_SocketAddressSocketAddressParseErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_SocketAddressSocketAddressParseErrorZ_is_ok(ptr)) { return new Result_SocketAddressSocketAddressParseErrorZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_SpendableOutputDescriptorDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_SpendableOutputDescriptorDecodeErrorZ.java index 63db2371..b352ab51 100644 --- a/src/main/java/org/ldk/structs/Result_SpendableOutputDescriptorDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_SpendableOutputDescriptorDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_SpendableOutputDescriptorDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_SpendableOutputDescriptorDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_is_ok(ptr)) { return new Result_SpendableOutputDescriptorDecodeErrorZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_SpliceAckDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_SpliceAckDecodeErrorZ.java index bc410b14..6ed42cc1 100644 --- a/src/main/java/org/ldk/structs/Result_SpliceAckDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_SpliceAckDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_SpliceAckDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_SpliceAckDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_SpliceAckDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_SpliceAckDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_SpliceAckDecodeErrorZ_is_ok(ptr)) { return new Result_SpliceAckDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_SpliceAckDecodeErrorZ extends CommonBase { * Creates a new CResult_SpliceAckDecodeErrorZ in the success state. */ public static Result_SpliceAckDecodeErrorZ ok(org.ldk.structs.SpliceAck o) { - long ret = bindings.CResult_SpliceAckDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_SpliceAckDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_SpliceAckDecodeErrorZ ret_hu_conv = Result_SpliceAckDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_SpliceDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_SpliceDecodeErrorZ.java index ca4e9357..19bd2401 100644 --- a/src/main/java/org/ldk/structs/Result_SpliceDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_SpliceDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_SpliceDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_SpliceDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_SpliceDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_SpliceDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_SpliceDecodeErrorZ_is_ok(ptr)) { return new Result_SpliceDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_SpliceDecodeErrorZ extends CommonBase { * Creates a new CResult_SpliceDecodeErrorZ in the success state. */ public static Result_SpliceDecodeErrorZ ok(org.ldk.structs.Splice o) { - long ret = bindings.CResult_SpliceDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_SpliceDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_SpliceDecodeErrorZ ret_hu_conv = Result_SpliceDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_SpliceLockedDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_SpliceLockedDecodeErrorZ.java index 7797504c..312c4241 100644 --- a/src/main/java/org/ldk/structs/Result_SpliceLockedDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_SpliceLockedDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_SpliceLockedDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_SpliceLockedDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_SpliceLockedDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_SpliceLockedDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_SpliceLockedDecodeErrorZ_is_ok(ptr)) { return new Result_SpliceLockedDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_SpliceLockedDecodeErrorZ extends CommonBase { * Creates a new CResult_SpliceLockedDecodeErrorZ in the success state. */ public static Result_SpliceLockedDecodeErrorZ ok(org.ldk.structs.SpliceLocked o) { - long ret = bindings.CResult_SpliceLockedDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_SpliceLockedDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_SpliceLockedDecodeErrorZ ret_hu_conv = Result_SpliceLockedDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.java index e91d80ee..656c4a9a 100644 --- a/src/main/java/org/ldk/structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_StaticPaymentOutputDescriptorDecodeErrorZ extends CommonBase if (ptr != 0) { bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_StaticPaymentOutputDescriptorDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_is_ok(ptr)) { return new Result_StaticPaymentOutputDescriptorDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_StaticPaymentOutputDescriptorDecodeErrorZ extends CommonBase * Creates a new CResult_StaticPaymentOutputDescriptorDecodeErrorZ in the success state. */ public static Result_StaticPaymentOutputDescriptorDecodeErrorZ ok(org.ldk.structs.StaticPaymentOutputDescriptor o) { - long ret = bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_StaticPaymentOutputDescriptorDecodeErrorZ ret_hu_conv = Result_StaticPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_StfuDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_StfuDecodeErrorZ.java index 22ff12f7..2fb2f029 100644 --- a/src/main/java/org/ldk/structs/Result_StfuDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_StfuDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_StfuDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_StfuDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_StfuDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_StfuDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_StfuDecodeErrorZ_is_ok(ptr)) { return new Result_StfuDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_StfuDecodeErrorZ extends CommonBase { * Creates a new CResult_StfuDecodeErrorZ in the success state. */ public static Result_StfuDecodeErrorZ ok(org.ldk.structs.Stfu o) { - long ret = bindings.CResult_StfuDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_StfuDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_StfuDecodeErrorZ ret_hu_conv = Result_StfuDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_StrSecp256k1ErrorZ.java b/src/main/java/org/ldk/structs/Result_StrSecp256k1ErrorZ.java index 69bc0f5b..2e61bb8f 100644 --- a/src/main/java/org/ldk/structs/Result_StrSecp256k1ErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_StrSecp256k1ErrorZ.java @@ -13,6 +13,10 @@ public class Result_StrSecp256k1ErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_StrSecp256k1ErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_StrSecp256k1ErrorZ_free(ptr); ptr = 0; } + } + static Result_StrSecp256k1ErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_StrSecp256k1ErrorZ_is_ok(ptr)) { return new Result_StrSecp256k1ErrorZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_ThirtyTwoBytesAPIErrorZ.java b/src/main/java/org/ldk/structs/Result_ThirtyTwoBytesAPIErrorZ.java index 04ae4c5e..09425d63 100644 --- a/src/main/java/org/ldk/structs/Result_ThirtyTwoBytesAPIErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ThirtyTwoBytesAPIErrorZ.java @@ -13,6 +13,10 @@ public class Result_ThirtyTwoBytesAPIErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_ThirtyTwoBytesAPIErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_ThirtyTwoBytesAPIErrorZ_free(ptr); ptr = 0; } + } + static Result_ThirtyTwoBytesAPIErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_ThirtyTwoBytesAPIErrorZ_is_ok(ptr)) { return new Result_ThirtyTwoBytesAPIErrorZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_ThirtyTwoBytesNoneZ.java b/src/main/java/org/ldk/structs/Result_ThirtyTwoBytesNoneZ.java index d184261e..96b82888 100644 --- a/src/main/java/org/ldk/structs/Result_ThirtyTwoBytesNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_ThirtyTwoBytesNoneZ.java @@ -13,6 +13,10 @@ public class Result_ThirtyTwoBytesNoneZ extends CommonBase { if (ptr != 0) { bindings.CResult_ThirtyTwoBytesNoneZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_ThirtyTwoBytesNoneZ_free(ptr); ptr = 0; } + } + static Result_ThirtyTwoBytesNoneZ constr_from_ptr(long ptr) { if (bindings.CResult_ThirtyTwoBytesNoneZ_is_ok(ptr)) { return new Result_ThirtyTwoBytesNoneZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_ThirtyTwoBytesPaymentSendFailureZ.java b/src/main/java/org/ldk/structs/Result_ThirtyTwoBytesPaymentSendFailureZ.java index 71ee2695..034f62a3 100644 --- a/src/main/java/org/ldk/structs/Result_ThirtyTwoBytesPaymentSendFailureZ.java +++ b/src/main/java/org/ldk/structs/Result_ThirtyTwoBytesPaymentSendFailureZ.java @@ -13,6 +13,10 @@ public class Result_ThirtyTwoBytesPaymentSendFailureZ extends CommonBase { if (ptr != 0) { bindings.CResult_ThirtyTwoBytesPaymentSendFailureZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_ThirtyTwoBytesPaymentSendFailureZ_free(ptr); ptr = 0; } + } + static Result_ThirtyTwoBytesPaymentSendFailureZ constr_from_ptr(long ptr) { if (bindings.CResult_ThirtyTwoBytesPaymentSendFailureZ_is_ok(ptr)) { return new Result_ThirtyTwoBytesPaymentSendFailureZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_ThirtyTwoBytesRetryableSendFailureZ.java b/src/main/java/org/ldk/structs/Result_ThirtyTwoBytesRetryableSendFailureZ.java index 45e73e07..c267e15f 100644 --- a/src/main/java/org/ldk/structs/Result_ThirtyTwoBytesRetryableSendFailureZ.java +++ b/src/main/java/org/ldk/structs/Result_ThirtyTwoBytesRetryableSendFailureZ.java @@ -13,6 +13,10 @@ public class Result_ThirtyTwoBytesRetryableSendFailureZ extends CommonBase { if (ptr != 0) { bindings.CResult_ThirtyTwoBytesRetryableSendFailureZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_ThirtyTwoBytesRetryableSendFailureZ_free(ptr); ptr = 0; } + } + static Result_ThirtyTwoBytesRetryableSendFailureZ constr_from_ptr(long ptr) { if (bindings.CResult_ThirtyTwoBytesRetryableSendFailureZ_is_ok(ptr)) { return new Result_ThirtyTwoBytesRetryableSendFailureZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_TrackedSpendableOutputDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_TrackedSpendableOutputDecodeErrorZ.java new file mode 100644 index 00000000..e430f2be --- /dev/null +++ b/src/main/java/org/ldk/structs/Result_TrackedSpendableOutputDecodeErrorZ.java @@ -0,0 +1,100 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + +public class Result_TrackedSpendableOutputDecodeErrorZ extends CommonBase { + private Result_TrackedSpendableOutputDecodeErrorZ(Object _dummy, long ptr) { super(ptr); } + protected void finalize() throws Throwable { + if (ptr != 0) { bindings.CResult_TrackedSpendableOutputDecodeErrorZ_free(ptr); } super.finalize(); + } + + protected void force_free() { + if (ptr != 0) { bindings.CResult_TrackedSpendableOutputDecodeErrorZ_free(ptr); ptr = 0; } + } + + static Result_TrackedSpendableOutputDecodeErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(ptr)) { + return new Result_TrackedSpendableOutputDecodeErrorZ_OK(null, ptr); + } else { + return new Result_TrackedSpendableOutputDecodeErrorZ_Err(null, ptr); + } + } + public static final class Result_TrackedSpendableOutputDecodeErrorZ_OK extends Result_TrackedSpendableOutputDecodeErrorZ { + public final TrackedSpendableOutput res; + private Result_TrackedSpendableOutputDecodeErrorZ_OK(Object _dummy, long ptr) { + super(_dummy, ptr); + long res = bindings.CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(ptr); + org.ldk.structs.TrackedSpendableOutput res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.TrackedSpendableOutput(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); }; + this.res = res_hu_conv; + } + } + + public static final class Result_TrackedSpendableOutputDecodeErrorZ_Err extends Result_TrackedSpendableOutputDecodeErrorZ { + public final DecodeError err; + private Result_TrackedSpendableOutputDecodeErrorZ_Err(Object _dummy, long ptr) { + super(_dummy, ptr); + long err = bindings.CResult_TrackedSpendableOutputDecodeErrorZ_get_err(ptr); + org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err); + if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); }; + this.err = err_hu_conv; + } + } + + /** + * Creates a new CResult_TrackedSpendableOutputDecodeErrorZ in the success state. + */ + public static Result_TrackedSpendableOutputDecodeErrorZ ok(org.ldk.structs.TrackedSpendableOutput o) { + long ret = bindings.CResult_TrackedSpendableOutputDecodeErrorZ_ok(o.ptr); + Reference.reachabilityFence(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_TrackedSpendableOutputDecodeErrorZ ret_hu_conv = Result_TrackedSpendableOutputDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_TrackedSpendableOutputDecodeErrorZ in the error state. + */ + public static Result_TrackedSpendableOutputDecodeErrorZ err(org.ldk.structs.DecodeError e) { + long ret = bindings.CResult_TrackedSpendableOutputDecodeErrorZ_err(e.ptr); + Reference.reachabilityFence(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_TrackedSpendableOutputDecodeErrorZ ret_hu_conv = Result_TrackedSpendableOutputDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); }; + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public boolean is_ok() { + boolean ret = bindings.CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + long clone_ptr() { + long ret = bindings.CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a new CResult_TrackedSpendableOutputDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_TrackedSpendableOutputDecodeErrorZ clone() { + long ret = bindings.CResult_TrackedSpendableOutputDecodeErrorZ_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_TrackedSpendableOutputDecodeErrorZ ret_hu_conv = Result_TrackedSpendableOutputDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/Result_TransactionNoneZ.java b/src/main/java/org/ldk/structs/Result_TransactionNoneZ.java index 9ed0fb6e..ea942230 100644 --- a/src/main/java/org/ldk/structs/Result_TransactionNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_TransactionNoneZ.java @@ -13,6 +13,10 @@ public class Result_TransactionNoneZ extends CommonBase { if (ptr != 0) { bindings.CResult_TransactionNoneZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_TransactionNoneZ_free(ptr); ptr = 0; } + } + static Result_TransactionNoneZ constr_from_ptr(long ptr) { if (bindings.CResult_TransactionNoneZ_is_ok(ptr)) { return new Result_TransactionNoneZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_TransactionU16LenLimitedDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_TransactionU16LenLimitedDecodeErrorZ.java index a3887e23..538e7b7e 100644 --- a/src/main/java/org/ldk/structs/Result_TransactionU16LenLimitedDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_TransactionU16LenLimitedDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_TransactionU16LenLimitedDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_TransactionU16LenLimitedDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_TransactionU16LenLimitedDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_TransactionU16LenLimitedDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_TransactionU16LenLimitedDecodeErrorZ_is_ok(ptr)) { return new Result_TransactionU16LenLimitedDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_TransactionU16LenLimitedDecodeErrorZ extends CommonBase { * Creates a new CResult_TransactionU16LenLimitedDecodeErrorZ in the success state. */ public static Result_TransactionU16LenLimitedDecodeErrorZ ok(org.ldk.structs.TransactionU16LenLimited o) { - long ret = bindings.CResult_TransactionU16LenLimitedDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_TransactionU16LenLimitedDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_TransactionU16LenLimitedDecodeErrorZ ret_hu_conv = Result_TransactionU16LenLimitedDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_TransactionU16LenLimitedNoneZ.java b/src/main/java/org/ldk/structs/Result_TransactionU16LenLimitedNoneZ.java index fc8c01b6..39e9f8e3 100644 --- a/src/main/java/org/ldk/structs/Result_TransactionU16LenLimitedNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_TransactionU16LenLimitedNoneZ.java @@ -13,6 +13,10 @@ public class Result_TransactionU16LenLimitedNoneZ extends CommonBase { if (ptr != 0) { bindings.CResult_TransactionU16LenLimitedNoneZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_TransactionU16LenLimitedNoneZ_free(ptr); ptr = 0; } + } + static Result_TransactionU16LenLimitedNoneZ constr_from_ptr(long ptr) { if (bindings.CResult_TransactionU16LenLimitedNoneZ_is_ok(ptr)) { return new Result_TransactionU16LenLimitedNoneZ_OK(null, ptr); @@ -41,7 +45,7 @@ public class Result_TransactionU16LenLimitedNoneZ extends CommonBase { * Creates a new CResult_TransactionU16LenLimitedNoneZ in the success state. */ public static Result_TransactionU16LenLimitedNoneZ ok(org.ldk.structs.TransactionU16LenLimited o) { - long ret = bindings.CResult_TransactionU16LenLimitedNoneZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_TransactionU16LenLimitedNoneZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_TransactionU16LenLimitedNoneZ ret_hu_conv = Result_TransactionU16LenLimitedNoneZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_TrustedClosingTransactionNoneZ.java b/src/main/java/org/ldk/structs/Result_TrustedClosingTransactionNoneZ.java index 618a55d8..e97e8c75 100644 --- a/src/main/java/org/ldk/structs/Result_TrustedClosingTransactionNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_TrustedClosingTransactionNoneZ.java @@ -13,6 +13,10 @@ public class Result_TrustedClosingTransactionNoneZ extends CommonBase { if (ptr != 0) { bindings.CResult_TrustedClosingTransactionNoneZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_TrustedClosingTransactionNoneZ_free(ptr); ptr = 0; } + } + static Result_TrustedClosingTransactionNoneZ constr_from_ptr(long ptr) { if (bindings.CResult_TrustedClosingTransactionNoneZ_is_ok(ptr)) { return new Result_TrustedClosingTransactionNoneZ_OK(null, ptr); @@ -41,7 +45,7 @@ public class Result_TrustedClosingTransactionNoneZ extends CommonBase { * Creates a new CResult_TrustedClosingTransactionNoneZ in the success state. */ public static Result_TrustedClosingTransactionNoneZ ok(org.ldk.structs.TrustedClosingTransaction o) { - long ret = bindings.CResult_TrustedClosingTransactionNoneZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_TrustedClosingTransactionNoneZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_TrustedClosingTransactionNoneZ ret_hu_conv = Result_TrustedClosingTransactionNoneZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_TrustedCommitmentTransactionNoneZ.java b/src/main/java/org/ldk/structs/Result_TrustedCommitmentTransactionNoneZ.java index 20b98f07..10ff54b3 100644 --- a/src/main/java/org/ldk/structs/Result_TrustedCommitmentTransactionNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_TrustedCommitmentTransactionNoneZ.java @@ -13,6 +13,10 @@ public class Result_TrustedCommitmentTransactionNoneZ extends CommonBase { if (ptr != 0) { bindings.CResult_TrustedCommitmentTransactionNoneZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_TrustedCommitmentTransactionNoneZ_free(ptr); ptr = 0; } + } + static Result_TrustedCommitmentTransactionNoneZ constr_from_ptr(long ptr) { if (bindings.CResult_TrustedCommitmentTransactionNoneZ_is_ok(ptr)) { return new Result_TrustedCommitmentTransactionNoneZ_OK(null, ptr); @@ -41,7 +45,7 @@ public class Result_TrustedCommitmentTransactionNoneZ extends CommonBase { * Creates a new CResult_TrustedCommitmentTransactionNoneZ in the success state. */ public static Result_TrustedCommitmentTransactionNoneZ ok(org.ldk.structs.TrustedCommitmentTransaction o) { - long ret = bindings.CResult_TrustedCommitmentTransactionNoneZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_TrustedCommitmentTransactionNoneZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_TrustedCommitmentTransactionNoneZ ret_hu_conv = Result_TrustedCommitmentTransactionNoneZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_TxAbortDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_TxAbortDecodeErrorZ.java index 0f37d60e..333892d2 100644 --- a/src/main/java/org/ldk/structs/Result_TxAbortDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_TxAbortDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_TxAbortDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_TxAbortDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_TxAbortDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_TxAbortDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_TxAbortDecodeErrorZ_is_ok(ptr)) { return new Result_TxAbortDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_TxAbortDecodeErrorZ extends CommonBase { * Creates a new CResult_TxAbortDecodeErrorZ in the success state. */ public static Result_TxAbortDecodeErrorZ ok(org.ldk.structs.TxAbort o) { - long ret = bindings.CResult_TxAbortDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_TxAbortDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_TxAbortDecodeErrorZ ret_hu_conv = Result_TxAbortDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_TxAckRbfDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_TxAckRbfDecodeErrorZ.java index a95ddc84..32f4a363 100644 --- a/src/main/java/org/ldk/structs/Result_TxAckRbfDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_TxAckRbfDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_TxAckRbfDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_TxAckRbfDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_TxAckRbfDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_TxAckRbfDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_TxAckRbfDecodeErrorZ_is_ok(ptr)) { return new Result_TxAckRbfDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_TxAckRbfDecodeErrorZ extends CommonBase { * Creates a new CResult_TxAckRbfDecodeErrorZ in the success state. */ public static Result_TxAckRbfDecodeErrorZ ok(org.ldk.structs.TxAckRbf o) { - long ret = bindings.CResult_TxAckRbfDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_TxAckRbfDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_TxAckRbfDecodeErrorZ ret_hu_conv = Result_TxAckRbfDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_TxAddInputDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_TxAddInputDecodeErrorZ.java index f0fb9a6a..c77173b6 100644 --- a/src/main/java/org/ldk/structs/Result_TxAddInputDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_TxAddInputDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_TxAddInputDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_TxAddInputDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_TxAddInputDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_TxAddInputDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_TxAddInputDecodeErrorZ_is_ok(ptr)) { return new Result_TxAddInputDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_TxAddInputDecodeErrorZ extends CommonBase { * Creates a new CResult_TxAddInputDecodeErrorZ in the success state. */ public static Result_TxAddInputDecodeErrorZ ok(org.ldk.structs.TxAddInput o) { - long ret = bindings.CResult_TxAddInputDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_TxAddInputDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_TxAddInputDecodeErrorZ ret_hu_conv = Result_TxAddInputDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_TxAddOutputDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_TxAddOutputDecodeErrorZ.java index a0df5276..1f2df8a3 100644 --- a/src/main/java/org/ldk/structs/Result_TxAddOutputDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_TxAddOutputDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_TxAddOutputDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_TxAddOutputDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_TxAddOutputDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_TxAddOutputDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_TxAddOutputDecodeErrorZ_is_ok(ptr)) { return new Result_TxAddOutputDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_TxAddOutputDecodeErrorZ extends CommonBase { * Creates a new CResult_TxAddOutputDecodeErrorZ in the success state. */ public static Result_TxAddOutputDecodeErrorZ ok(org.ldk.structs.TxAddOutput o) { - long ret = bindings.CResult_TxAddOutputDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_TxAddOutputDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_TxAddOutputDecodeErrorZ ret_hu_conv = Result_TxAddOutputDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_TxCompleteDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_TxCompleteDecodeErrorZ.java index ec0f10f2..c4ab9114 100644 --- a/src/main/java/org/ldk/structs/Result_TxCompleteDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_TxCompleteDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_TxCompleteDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_TxCompleteDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_TxCompleteDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_TxCompleteDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_TxCompleteDecodeErrorZ_is_ok(ptr)) { return new Result_TxCompleteDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_TxCompleteDecodeErrorZ extends CommonBase { * Creates a new CResult_TxCompleteDecodeErrorZ in the success state. */ public static Result_TxCompleteDecodeErrorZ ok(org.ldk.structs.TxComplete o) { - long ret = bindings.CResult_TxCompleteDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_TxCompleteDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_TxCompleteDecodeErrorZ ret_hu_conv = Result_TxCompleteDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_TxCreationKeysDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_TxCreationKeysDecodeErrorZ.java index 9c2c18db..925c8e6e 100644 --- a/src/main/java/org/ldk/structs/Result_TxCreationKeysDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_TxCreationKeysDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_TxCreationKeysDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_TxCreationKeysDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_TxCreationKeysDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_TxCreationKeysDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_TxCreationKeysDecodeErrorZ_is_ok(ptr)) { return new Result_TxCreationKeysDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_TxCreationKeysDecodeErrorZ extends CommonBase { * Creates a new CResult_TxCreationKeysDecodeErrorZ in the success state. */ public static Result_TxCreationKeysDecodeErrorZ ok(org.ldk.structs.TxCreationKeys o) { - long ret = bindings.CResult_TxCreationKeysDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_TxCreationKeysDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_TxCreationKeysDecodeErrorZ ret_hu_conv = Result_TxCreationKeysDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_TxInitRbfDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_TxInitRbfDecodeErrorZ.java index 69c17d96..7884c626 100644 --- a/src/main/java/org/ldk/structs/Result_TxInitRbfDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_TxInitRbfDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_TxInitRbfDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_TxInitRbfDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_TxInitRbfDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_TxInitRbfDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_TxInitRbfDecodeErrorZ_is_ok(ptr)) { return new Result_TxInitRbfDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_TxInitRbfDecodeErrorZ extends CommonBase { * Creates a new CResult_TxInitRbfDecodeErrorZ in the success state. */ public static Result_TxInitRbfDecodeErrorZ ok(org.ldk.structs.TxInitRbf o) { - long ret = bindings.CResult_TxInitRbfDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_TxInitRbfDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_TxInitRbfDecodeErrorZ ret_hu_conv = Result_TxInitRbfDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_TxOutUtxoLookupErrorZ.java b/src/main/java/org/ldk/structs/Result_TxOutUtxoLookupErrorZ.java index bf2b49f9..0afbc53e 100644 --- a/src/main/java/org/ldk/structs/Result_TxOutUtxoLookupErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_TxOutUtxoLookupErrorZ.java @@ -13,6 +13,10 @@ public class Result_TxOutUtxoLookupErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_TxOutUtxoLookupErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_TxOutUtxoLookupErrorZ_free(ptr); ptr = 0; } + } + static Result_TxOutUtxoLookupErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_TxOutUtxoLookupErrorZ_is_ok(ptr)) { return new Result_TxOutUtxoLookupErrorZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_TxRemoveInputDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_TxRemoveInputDecodeErrorZ.java index bb4d7e9f..198929cf 100644 --- a/src/main/java/org/ldk/structs/Result_TxRemoveInputDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_TxRemoveInputDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_TxRemoveInputDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_TxRemoveInputDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_TxRemoveInputDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_TxRemoveInputDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_TxRemoveInputDecodeErrorZ_is_ok(ptr)) { return new Result_TxRemoveInputDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_TxRemoveInputDecodeErrorZ extends CommonBase { * Creates a new CResult_TxRemoveInputDecodeErrorZ in the success state. */ public static Result_TxRemoveInputDecodeErrorZ ok(org.ldk.structs.TxRemoveInput o) { - long ret = bindings.CResult_TxRemoveInputDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_TxRemoveInputDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_TxRemoveInputDecodeErrorZ ret_hu_conv = Result_TxRemoveInputDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_TxRemoveOutputDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_TxRemoveOutputDecodeErrorZ.java index fc58a24e..fc63045e 100644 --- a/src/main/java/org/ldk/structs/Result_TxRemoveOutputDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_TxRemoveOutputDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_TxRemoveOutputDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_TxRemoveOutputDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_TxRemoveOutputDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_TxRemoveOutputDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_TxRemoveOutputDecodeErrorZ_is_ok(ptr)) { return new Result_TxRemoveOutputDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_TxRemoveOutputDecodeErrorZ extends CommonBase { * Creates a new CResult_TxRemoveOutputDecodeErrorZ in the success state. */ public static Result_TxRemoveOutputDecodeErrorZ ok(org.ldk.structs.TxRemoveOutput o) { - long ret = bindings.CResult_TxRemoveOutputDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_TxRemoveOutputDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_TxRemoveOutputDecodeErrorZ ret_hu_conv = Result_TxRemoveOutputDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_TxSignaturesDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_TxSignaturesDecodeErrorZ.java index b76313b8..012c0e51 100644 --- a/src/main/java/org/ldk/structs/Result_TxSignaturesDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_TxSignaturesDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_TxSignaturesDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_TxSignaturesDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_TxSignaturesDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_TxSignaturesDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_TxSignaturesDecodeErrorZ_is_ok(ptr)) { return new Result_TxSignaturesDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_TxSignaturesDecodeErrorZ extends CommonBase { * Creates a new CResult_TxSignaturesDecodeErrorZ in the success state. */ public static Result_TxSignaturesDecodeErrorZ ok(org.ldk.structs.TxSignatures o) { - long ret = bindings.CResult_TxSignaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_TxSignaturesDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_TxSignaturesDecodeErrorZ ret_hu_conv = Result_TxSignaturesDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_UnknownPaymentContextDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_UnknownPaymentContextDecodeErrorZ.java new file mode 100644 index 00000000..4355bce6 --- /dev/null +++ b/src/main/java/org/ldk/structs/Result_UnknownPaymentContextDecodeErrorZ.java @@ -0,0 +1,100 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + +public class Result_UnknownPaymentContextDecodeErrorZ extends CommonBase { + private Result_UnknownPaymentContextDecodeErrorZ(Object _dummy, long ptr) { super(ptr); } + protected void finalize() throws Throwable { + if (ptr != 0) { bindings.CResult_UnknownPaymentContextDecodeErrorZ_free(ptr); } super.finalize(); + } + + protected void force_free() { + if (ptr != 0) { bindings.CResult_UnknownPaymentContextDecodeErrorZ_free(ptr); ptr = 0; } + } + + static Result_UnknownPaymentContextDecodeErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_UnknownPaymentContextDecodeErrorZ_is_ok(ptr)) { + return new Result_UnknownPaymentContextDecodeErrorZ_OK(null, ptr); + } else { + return new Result_UnknownPaymentContextDecodeErrorZ_Err(null, ptr); + } + } + public static final class Result_UnknownPaymentContextDecodeErrorZ_OK extends Result_UnknownPaymentContextDecodeErrorZ { + public final UnknownPaymentContext res; + private Result_UnknownPaymentContextDecodeErrorZ_OK(Object _dummy, long ptr) { + super(_dummy, ptr); + long res = bindings.CResult_UnknownPaymentContextDecodeErrorZ_get_ok(ptr); + org.ldk.structs.UnknownPaymentContext res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.UnknownPaymentContext(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); }; + this.res = res_hu_conv; + } + } + + public static final class Result_UnknownPaymentContextDecodeErrorZ_Err extends Result_UnknownPaymentContextDecodeErrorZ { + public final DecodeError err; + private Result_UnknownPaymentContextDecodeErrorZ_Err(Object _dummy, long ptr) { + super(_dummy, ptr); + long err = bindings.CResult_UnknownPaymentContextDecodeErrorZ_get_err(ptr); + org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err); + if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); }; + this.err = err_hu_conv; + } + } + + /** + * Creates a new CResult_UnknownPaymentContextDecodeErrorZ in the success state. + */ + public static Result_UnknownPaymentContextDecodeErrorZ ok(org.ldk.structs.UnknownPaymentContext o) { + long ret = bindings.CResult_UnknownPaymentContextDecodeErrorZ_ok(o.ptr); + Reference.reachabilityFence(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_UnknownPaymentContextDecodeErrorZ ret_hu_conv = Result_UnknownPaymentContextDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_UnknownPaymentContextDecodeErrorZ in the error state. + */ + public static Result_UnknownPaymentContextDecodeErrorZ err(org.ldk.structs.DecodeError e) { + long ret = bindings.CResult_UnknownPaymentContextDecodeErrorZ_err(e.ptr); + Reference.reachabilityFence(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_UnknownPaymentContextDecodeErrorZ ret_hu_conv = Result_UnknownPaymentContextDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); }; + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public boolean is_ok() { + boolean ret = bindings.CResult_UnknownPaymentContextDecodeErrorZ_is_ok(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + long clone_ptr() { + long ret = bindings.CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a new CResult_UnknownPaymentContextDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_UnknownPaymentContextDecodeErrorZ clone() { + long ret = bindings.CResult_UnknownPaymentContextDecodeErrorZ_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_UnknownPaymentContextDecodeErrorZ ret_hu_conv = Result_UnknownPaymentContextDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.java b/src/main/java/org/ldk/structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.java new file mode 100644 index 00000000..7bdf559b --- /dev/null +++ b/src/main/java/org/ldk/structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.java @@ -0,0 +1,96 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + +public class Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ extends CommonBase { + private Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); } + protected void finalize() throws Throwable { + if (ptr != 0) { bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free(ptr); } super.finalize(); + } + + protected void force_free() { + if (ptr != 0) { bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free(ptr); ptr = 0; } + } + + static Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ_Err(null, ptr); + } + } + public static final class Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ_OK extends Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ { + public final UnsignedBolt12Invoice res; + private Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ_OK(Object _dummy, long ptr) { + super(_dummy, ptr); + long res = bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(ptr); + org.ldk.structs.UnsignedBolt12Invoice res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.UnsignedBolt12Invoice(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); }; + this.res = res_hu_conv; + } + } + + public static final class Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ_Err extends Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ { + public final Bolt12SemanticError err; + private Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ_Err(Object _dummy, long ptr) { + super(_dummy, ptr); + this.err = bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(ptr); + } + } + + /** + * Creates a new CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ in the success state. + */ + public static Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ ok(org.ldk.structs.UnsignedBolt12Invoice o) { + long ret = bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok(o.ptr); + Reference.reachabilityFence(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ in the error state. + */ + public static Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) { + long ret = bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err(e); + Reference.reachabilityFence(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public boolean is_ok() { + boolean ret = bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + long clone_ptr() { + long ret = bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a new CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ clone() { + long ret = bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.java index d8f29a70..01203170 100644 --- a/src/main/java/org/ldk/structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_UnsignedChannelAnnouncementDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_UnsignedChannelAnnouncementDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_is_ok(ptr)) { return new Result_UnsignedChannelAnnouncementDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_UnsignedChannelAnnouncementDecodeErrorZ extends CommonBase { * Creates a new CResult_UnsignedChannelAnnouncementDecodeErrorZ in the success state. */ public static Result_UnsignedChannelAnnouncementDecodeErrorZ ok(org.ldk.structs.UnsignedChannelAnnouncement o) { - long ret = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_UnsignedChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_UnsignedChannelUpdateDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_UnsignedChannelUpdateDecodeErrorZ.java index 1bfcff67..d8dba7b9 100644 --- a/src/main/java/org/ldk/structs/Result_UnsignedChannelUpdateDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_UnsignedChannelUpdateDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_UnsignedChannelUpdateDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_UnsignedChannelUpdateDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_is_ok(ptr)) { return new Result_UnsignedChannelUpdateDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_UnsignedChannelUpdateDecodeErrorZ extends CommonBase { * Creates a new CResult_UnsignedChannelUpdateDecodeErrorZ in the success state. */ public static Result_UnsignedChannelUpdateDecodeErrorZ ok(org.ldk.structs.UnsignedChannelUpdate o) { - long ret = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_UnsignedChannelUpdateDecodeErrorZ ret_hu_conv = Result_UnsignedChannelUpdateDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.java b/src/main/java/org/ldk/structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.java new file mode 100644 index 00000000..4054d932 --- /dev/null +++ b/src/main/java/org/ldk/structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.java @@ -0,0 +1,96 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + +public class Result_UnsignedInvoiceRequestBolt12SemanticErrorZ extends CommonBase { + private Result_UnsignedInvoiceRequestBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); } + protected void finalize() throws Throwable { + if (ptr != 0) { bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(ptr); } super.finalize(); + } + + protected void force_free() { + if (ptr != 0) { bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(ptr); ptr = 0; } + } + + static Result_UnsignedInvoiceRequestBolt12SemanticErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_UnsignedInvoiceRequestBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_UnsignedInvoiceRequestBolt12SemanticErrorZ_Err(null, ptr); + } + } + public static final class Result_UnsignedInvoiceRequestBolt12SemanticErrorZ_OK extends Result_UnsignedInvoiceRequestBolt12SemanticErrorZ { + public final UnsignedInvoiceRequest res; + private Result_UnsignedInvoiceRequestBolt12SemanticErrorZ_OK(Object _dummy, long ptr) { + super(_dummy, ptr); + long res = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(ptr); + org.ldk.structs.UnsignedInvoiceRequest res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.UnsignedInvoiceRequest(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); }; + this.res = res_hu_conv; + } + } + + public static final class Result_UnsignedInvoiceRequestBolt12SemanticErrorZ_Err extends Result_UnsignedInvoiceRequestBolt12SemanticErrorZ { + public final Bolt12SemanticError err; + private Result_UnsignedInvoiceRequestBolt12SemanticErrorZ_Err(Object _dummy, long ptr) { + super(_dummy, ptr); + this.err = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(ptr); + } + } + + /** + * Creates a new CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ in the success state. + */ + public static Result_UnsignedInvoiceRequestBolt12SemanticErrorZ ok(org.ldk.structs.UnsignedInvoiceRequest o) { + long ret = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(o.ptr); + Reference.reachabilityFence(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_UnsignedInvoiceRequestBolt12SemanticErrorZ ret_hu_conv = Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ in the error state. + */ + public static Result_UnsignedInvoiceRequestBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) { + long ret = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(e); + Reference.reachabilityFence(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_UnsignedInvoiceRequestBolt12SemanticErrorZ ret_hu_conv = Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public boolean is_ok() { + boolean ret = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + long clone_ptr() { + long ret = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a new CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_UnsignedInvoiceRequestBolt12SemanticErrorZ clone() { + long ret = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_UnsignedInvoiceRequestBolt12SemanticErrorZ ret_hu_conv = Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.java index d87fde9b..5578fbc1 100644 --- a/src/main/java/org/ldk/structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_UnsignedNodeAnnouncementDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_UnsignedNodeAnnouncementDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_is_ok(ptr)) { return new Result_UnsignedNodeAnnouncementDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_UnsignedNodeAnnouncementDecodeErrorZ extends CommonBase { * Creates a new CResult_UnsignedNodeAnnouncementDecodeErrorZ in the success state. */ public static Result_UnsignedNodeAnnouncementDecodeErrorZ ok(org.ldk.structs.UnsignedNodeAnnouncement o) { - long ret = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_UnsignedNodeAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedNodeAnnouncementDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_UntrustedStringDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_UntrustedStringDecodeErrorZ.java index 77b94c0f..c55f0eda 100644 --- a/src/main/java/org/ldk/structs/Result_UntrustedStringDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_UntrustedStringDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_UntrustedStringDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_UntrustedStringDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_UntrustedStringDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_UntrustedStringDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_UntrustedStringDecodeErrorZ_is_ok(ptr)) { return new Result_UntrustedStringDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_UntrustedStringDecodeErrorZ extends CommonBase { * Creates a new CResult_UntrustedStringDecodeErrorZ in the success state. */ public static Result_UntrustedStringDecodeErrorZ ok(org.ldk.structs.UntrustedString o) { - long ret = bindings.CResult_UntrustedStringDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_UntrustedStringDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_UntrustedStringDecodeErrorZ ret_hu_conv = Result_UntrustedStringDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_UpdateAddHTLCDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_UpdateAddHTLCDecodeErrorZ.java index 3f56fa50..57541e91 100644 --- a/src/main/java/org/ldk/structs/Result_UpdateAddHTLCDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_UpdateAddHTLCDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_UpdateAddHTLCDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_UpdateAddHTLCDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_UpdateAddHTLCDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_UpdateAddHTLCDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_UpdateAddHTLCDecodeErrorZ_is_ok(ptr)) { return new Result_UpdateAddHTLCDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_UpdateAddHTLCDecodeErrorZ extends CommonBase { * Creates a new CResult_UpdateAddHTLCDecodeErrorZ in the success state. */ public static Result_UpdateAddHTLCDecodeErrorZ ok(org.ldk.structs.UpdateAddHTLC o) { - long ret = bindings.CResult_UpdateAddHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_UpdateAddHTLCDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_UpdateAddHTLCDecodeErrorZ ret_hu_conv = Result_UpdateAddHTLCDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_UpdateFailHTLCDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_UpdateFailHTLCDecodeErrorZ.java index c3b12b97..720d482a 100644 --- a/src/main/java/org/ldk/structs/Result_UpdateFailHTLCDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_UpdateFailHTLCDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_UpdateFailHTLCDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_UpdateFailHTLCDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_UpdateFailHTLCDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_UpdateFailHTLCDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_UpdateFailHTLCDecodeErrorZ_is_ok(ptr)) { return new Result_UpdateFailHTLCDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_UpdateFailHTLCDecodeErrorZ extends CommonBase { * Creates a new CResult_UpdateFailHTLCDecodeErrorZ in the success state. */ public static Result_UpdateFailHTLCDecodeErrorZ ok(org.ldk.structs.UpdateFailHTLC o) { - long ret = bindings.CResult_UpdateFailHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_UpdateFailHTLCDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_UpdateFailHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailHTLCDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.java index 424b2514..0047423d 100644 --- a/src/main/java/org/ldk/structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_UpdateFailMalformedHTLCDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_UpdateFailMalformedHTLCDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_is_ok(ptr)) { return new Result_UpdateFailMalformedHTLCDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_UpdateFailMalformedHTLCDecodeErrorZ extends CommonBase { * Creates a new CResult_UpdateFailMalformedHTLCDecodeErrorZ in the success state. */ public static Result_UpdateFailMalformedHTLCDecodeErrorZ ok(org.ldk.structs.UpdateFailMalformedHTLC o) { - long ret = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_UpdateFailMalformedHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailMalformedHTLCDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_UpdateFeeDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_UpdateFeeDecodeErrorZ.java index da32f084..73b2f9eb 100644 --- a/src/main/java/org/ldk/structs/Result_UpdateFeeDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_UpdateFeeDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_UpdateFeeDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_UpdateFeeDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_UpdateFeeDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_UpdateFeeDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_UpdateFeeDecodeErrorZ_is_ok(ptr)) { return new Result_UpdateFeeDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_UpdateFeeDecodeErrorZ extends CommonBase { * Creates a new CResult_UpdateFeeDecodeErrorZ in the success state. */ public static Result_UpdateFeeDecodeErrorZ ok(org.ldk.structs.UpdateFee o) { - long ret = bindings.CResult_UpdateFeeDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_UpdateFeeDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_UpdateFeeDecodeErrorZ ret_hu_conv = Result_UpdateFeeDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_UpdateFulfillHTLCDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_UpdateFulfillHTLCDecodeErrorZ.java index 7879891d..14d410a9 100644 --- a/src/main/java/org/ldk/structs/Result_UpdateFulfillHTLCDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_UpdateFulfillHTLCDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_UpdateFulfillHTLCDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_UpdateFulfillHTLCDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_is_ok(ptr)) { return new Result_UpdateFulfillHTLCDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_UpdateFulfillHTLCDecodeErrorZ extends CommonBase { * Creates a new CResult_UpdateFulfillHTLCDecodeErrorZ in the success state. */ public static Result_UpdateFulfillHTLCDecodeErrorZ ok(org.ldk.structs.UpdateFulfillHTLC o) { - long ret = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_UpdateFulfillHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFulfillHTLCDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_VerifiedInvoiceRequestNoneZ.java b/src/main/java/org/ldk/structs/Result_VerifiedInvoiceRequestNoneZ.java index d6bd2d12..dd0c91dc 100644 --- a/src/main/java/org/ldk/structs/Result_VerifiedInvoiceRequestNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_VerifiedInvoiceRequestNoneZ.java @@ -13,6 +13,10 @@ public class Result_VerifiedInvoiceRequestNoneZ extends CommonBase { if (ptr != 0) { bindings.CResult_VerifiedInvoiceRequestNoneZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_VerifiedInvoiceRequestNoneZ_free(ptr); ptr = 0; } + } + static Result_VerifiedInvoiceRequestNoneZ constr_from_ptr(long ptr) { if (bindings.CResult_VerifiedInvoiceRequestNoneZ_is_ok(ptr)) { return new Result_VerifiedInvoiceRequestNoneZ_OK(null, ptr); @@ -41,7 +45,7 @@ public class Result_VerifiedInvoiceRequestNoneZ extends CommonBase { * Creates a new CResult_VerifiedInvoiceRequestNoneZ in the success state. */ public static Result_VerifiedInvoiceRequestNoneZ ok(org.ldk.structs.VerifiedInvoiceRequest o) { - long ret = bindings.CResult_VerifiedInvoiceRequestNoneZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_VerifiedInvoiceRequestNoneZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_VerifiedInvoiceRequestNoneZ ret_hu_conv = Result_VerifiedInvoiceRequestNoneZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_WarningMessageDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_WarningMessageDecodeErrorZ.java index d04f910a..b8520f01 100644 --- a/src/main/java/org/ldk/structs/Result_WarningMessageDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_WarningMessageDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_WarningMessageDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_WarningMessageDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_WarningMessageDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_WarningMessageDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_WarningMessageDecodeErrorZ_is_ok(ptr)) { return new Result_WarningMessageDecodeErrorZ_OK(null, ptr); @@ -46,7 +50,7 @@ public class Result_WarningMessageDecodeErrorZ extends CommonBase { * Creates a new CResult_WarningMessageDecodeErrorZ in the success state. */ public static Result_WarningMessageDecodeErrorZ ok(org.ldk.structs.WarningMessage o) { - long ret = bindings.CResult_WarningMessageDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_WarningMessageDecodeErrorZ_ok(o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_WarningMessageDecodeErrorZ ret_hu_conv = Result_WarningMessageDecodeErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_WitnessNoneZ.java b/src/main/java/org/ldk/structs/Result_WitnessNoneZ.java index ea9f7883..edd24f2f 100644 --- a/src/main/java/org/ldk/structs/Result_WitnessNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_WitnessNoneZ.java @@ -13,6 +13,10 @@ public class Result_WitnessNoneZ extends CommonBase { if (ptr != 0) { bindings.CResult_WitnessNoneZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_WitnessNoneZ_free(ptr); ptr = 0; } + } + static Result_WitnessNoneZ constr_from_ptr(long ptr) { if (bindings.CResult_WitnessNoneZ_is_ok(ptr)) { return new Result_WitnessNoneZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.java index bad96df5..b877b344 100644 --- a/src/main/java/org/ldk/structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.java @@ -13,6 +13,10 @@ public class Result_WriteableEcdsaChannelSignerDecodeErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_WriteableEcdsaChannelSignerDecodeErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_WriteableEcdsaChannelSignerDecodeErrorZ_free(ptr); ptr = 0; } + } + static Result_WriteableEcdsaChannelSignerDecodeErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_WriteableEcdsaChannelSignerDecodeErrorZ_is_ok(ptr)) { return new Result_WriteableEcdsaChannelSignerDecodeErrorZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_boolLightningErrorZ.java b/src/main/java/org/ldk/structs/Result_boolLightningErrorZ.java index 48488d82..f57d7c5f 100644 --- a/src/main/java/org/ldk/structs/Result_boolLightningErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_boolLightningErrorZ.java @@ -13,6 +13,10 @@ public class Result_boolLightningErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_boolLightningErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_boolLightningErrorZ_free(ptr); ptr = 0; } + } + static Result_boolLightningErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_boolLightningErrorZ_is_ok(ptr)) { return new Result_boolLightningErrorZ_OK(null, ptr); @@ -54,7 +58,7 @@ public class Result_boolLightningErrorZ extends CommonBase { * Creates a new CResult_boolLightningErrorZ in the error state. */ public static Result_boolLightningErrorZ err(org.ldk.structs.LightningError e) { - long ret = bindings.CResult_boolLightningErrorZ_err(e == null ? 0 : e.ptr); + long ret = bindings.CResult_boolLightningErrorZ_err(e.ptr); Reference.reachabilityFence(e); if (ret >= 0 && ret <= 4096) { return null; } Result_boolLightningErrorZ ret_hu_conv = Result_boolLightningErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_boolPeerHandleErrorZ.java b/src/main/java/org/ldk/structs/Result_boolPeerHandleErrorZ.java index 43880448..8d6e37b2 100644 --- a/src/main/java/org/ldk/structs/Result_boolPeerHandleErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_boolPeerHandleErrorZ.java @@ -13,6 +13,10 @@ public class Result_boolPeerHandleErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_boolPeerHandleErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_boolPeerHandleErrorZ_free(ptr); ptr = 0; } + } + static Result_boolPeerHandleErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_boolPeerHandleErrorZ_is_ok(ptr)) { return new Result_boolPeerHandleErrorZ_OK(null, ptr); @@ -54,7 +58,7 @@ public class Result_boolPeerHandleErrorZ extends CommonBase { * Creates a new CResult_boolPeerHandleErrorZ in the error state. */ public static Result_boolPeerHandleErrorZ err(org.ldk.structs.PeerHandleError e) { - long ret = bindings.CResult_boolPeerHandleErrorZ_err(e == null ? 0 : e.ptr); + long ret = bindings.CResult_boolPeerHandleErrorZ_err(e.ptr); Reference.reachabilityFence(e); if (ret >= 0 && ret <= 4096) { return null; } Result_boolPeerHandleErrorZ ret_hu_conv = Result_boolPeerHandleErrorZ.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/Result_u32GraphSyncErrorZ.java b/src/main/java/org/ldk/structs/Result_u32GraphSyncErrorZ.java index 07d5b5d5..ae52bee8 100644 --- a/src/main/java/org/ldk/structs/Result_u32GraphSyncErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_u32GraphSyncErrorZ.java @@ -13,6 +13,10 @@ public class Result_u32GraphSyncErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_u32GraphSyncErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_u32GraphSyncErrorZ_free(ptr); ptr = 0; } + } + static Result_u32GraphSyncErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_u32GraphSyncErrorZ_is_ok(ptr)) { return new Result_u32GraphSyncErrorZ_OK(null, ptr); diff --git a/src/main/java/org/ldk/structs/Result_u64ShortChannelIdErrorZ.java b/src/main/java/org/ldk/structs/Result_u64ShortChannelIdErrorZ.java new file mode 100644 index 00000000..2dd88b25 --- /dev/null +++ b/src/main/java/org/ldk/structs/Result_u64ShortChannelIdErrorZ.java @@ -0,0 +1,74 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + +public class Result_u64ShortChannelIdErrorZ extends CommonBase { + private Result_u64ShortChannelIdErrorZ(Object _dummy, long ptr) { super(ptr); } + protected void finalize() throws Throwable { + if (ptr != 0) { bindings.CResult_u64ShortChannelIdErrorZ_free(ptr); } super.finalize(); + } + + protected void force_free() { + if (ptr != 0) { bindings.CResult_u64ShortChannelIdErrorZ_free(ptr); ptr = 0; } + } + + static Result_u64ShortChannelIdErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_u64ShortChannelIdErrorZ_is_ok(ptr)) { + return new Result_u64ShortChannelIdErrorZ_OK(null, ptr); + } else { + return new Result_u64ShortChannelIdErrorZ_Err(null, ptr); + } + } + public static final class Result_u64ShortChannelIdErrorZ_OK extends Result_u64ShortChannelIdErrorZ { + public final long res; + private Result_u64ShortChannelIdErrorZ_OK(Object _dummy, long ptr) { + super(_dummy, ptr); + this.res = bindings.CResult_u64ShortChannelIdErrorZ_get_ok(ptr); + } + } + + public static final class Result_u64ShortChannelIdErrorZ_Err extends Result_u64ShortChannelIdErrorZ { + public final ShortChannelIdError err; + private Result_u64ShortChannelIdErrorZ_Err(Object _dummy, long ptr) { + super(_dummy, ptr); + this.err = bindings.CResult_u64ShortChannelIdErrorZ_get_err(ptr); + } + } + + /** + * Creates a new CResult_u64ShortChannelIdErrorZ in the success state. + */ + public static Result_u64ShortChannelIdErrorZ ok(long o) { + long ret = bindings.CResult_u64ShortChannelIdErrorZ_ok(o); + Reference.reachabilityFence(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_u64ShortChannelIdErrorZ ret_hu_conv = Result_u64ShortChannelIdErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Creates a new CResult_u64ShortChannelIdErrorZ in the error state. + */ + public static Result_u64ShortChannelIdErrorZ err(org.ldk.enums.ShortChannelIdError e) { + long ret = bindings.CResult_u64ShortChannelIdErrorZ_err(e); + Reference.reachabilityFence(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_u64ShortChannelIdErrorZ ret_hu_conv = Result_u64ShortChannelIdErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public boolean is_ok() { + boolean ret = bindings.CResult_u64ShortChannelIdErrorZ_is_ok(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + +} diff --git a/src/main/java/org/ldk/structs/Retry.java b/src/main/java/org/ldk/structs/Retry.java index c1bbe96c..3ca33a69 100644 --- a/src/main/java/org/ldk/structs/Retry.java +++ b/src/main/java/org/ldk/structs/Retry.java @@ -104,7 +104,7 @@ public class Retry extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public boolean eq(org.ldk.structs.Retry b) { - boolean ret = bindings.Retry_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.Retry_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); return ret; diff --git a/src/main/java/org/ldk/structs/RevocationBasepoint.java b/src/main/java/org/ldk/structs/RevocationBasepoint.java index 954df43c..bb532a7a 100644 --- a/src/main/java/org/ldk/structs/RevocationBasepoint.java +++ b/src/main/java/org/ldk/structs/RevocationBasepoint.java @@ -51,7 +51,7 @@ public class RevocationBasepoint extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.RevocationBasepoint b) { - boolean ret = bindings.RevocationBasepoint_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.RevocationBasepoint_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/RevocationKey.java b/src/main/java/org/ldk/structs/RevocationKey.java index f52d4ae9..a749e1c0 100644 --- a/src/main/java/org/ldk/structs/RevocationKey.java +++ b/src/main/java/org/ldk/structs/RevocationKey.java @@ -57,7 +57,7 @@ public class RevocationKey extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.RevocationKey b) { - boolean ret = bindings.RevocationKey_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.RevocationKey_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; @@ -110,7 +110,7 @@ public class RevocationKey extends CommonBase { * [`chan_utils::derive_private_revocation_key`]: crate::ln::chan_utils::derive_private_revocation_key */ public static RevocationKey from_basepoint(org.ldk.structs.RevocationBasepoint countersignatory_basepoint, byte[] per_commitment_point) { - long ret = bindings.RevocationKey_from_basepoint(countersignatory_basepoint == null ? 0 : countersignatory_basepoint.ptr, InternalUtils.check_arr_len(per_commitment_point, 33)); + long ret = bindings.RevocationKey_from_basepoint(countersignatory_basepoint.ptr, InternalUtils.check_arr_len(per_commitment_point, 33)); Reference.reachabilityFence(countersignatory_basepoint); Reference.reachabilityFence(per_commitment_point); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/src/main/java/org/ldk/structs/RevokeAndACK.java b/src/main/java/org/ldk/structs/RevokeAndACK.java index fb6f7ea9..102afadd 100644 --- a/src/main/java/org/ldk/structs/RevokeAndACK.java +++ b/src/main/java/org/ldk/structs/RevokeAndACK.java @@ -25,19 +25,23 @@ public class RevokeAndACK extends CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { - byte[] ret = bindings.RevokeAndACK_get_channel_id(this.ptr); + public ChannelId get_channel_id() { + long ret = bindings.RevokeAndACK_get_channel_id(this.ptr); Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.RevokeAndACK_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.RevokeAndACK_set_channel_id(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** @@ -79,14 +83,15 @@ public class RevokeAndACK extends CommonBase { /** * Constructs a new RevokeAndACK given each field */ - public static RevokeAndACK of(byte[] channel_id_arg, byte[] per_commitment_secret_arg, byte[] next_per_commitment_point_arg) { - long ret = bindings.RevokeAndACK_new(InternalUtils.check_arr_len(channel_id_arg, 32), InternalUtils.check_arr_len(per_commitment_secret_arg, 32), InternalUtils.check_arr_len(next_per_commitment_point_arg, 33)); + public static RevokeAndACK of(org.ldk.structs.ChannelId channel_id_arg, byte[] per_commitment_secret_arg, byte[] next_per_commitment_point_arg) { + long ret = bindings.RevokeAndACK_new(channel_id_arg.ptr, InternalUtils.check_arr_len(per_commitment_secret_arg, 32), InternalUtils.check_arr_len(next_per_commitment_point_arg, 33)); Reference.reachabilityFence(channel_id_arg); Reference.reachabilityFence(per_commitment_secret_arg); Reference.reachabilityFence(next_per_commitment_point_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.RevokeAndACK ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.RevokeAndACK(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); }; return ret_hu_conv; } @@ -126,7 +131,7 @@ public class RevokeAndACK extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.RevokeAndACK b) { - boolean ret = bindings.RevokeAndACK_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.RevokeAndACK_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/Route.java b/src/main/java/org/ldk/structs/Route.java index 03b59117..70776327 100644 --- a/src/main/java/org/ldk/structs/Route.java +++ b/src/main/java/org/ldk/structs/Route.java @@ -46,7 +46,7 @@ public class Route extends CommonBase { * the same. */ public void set_paths(Path[] val) { - bindings.Route_set_paths(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_6 -> val_conv_6 == null ? 0 : val_conv_6.ptr).toArray() : null); + bindings.Route_set_paths(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_6 -> val_conv_6.ptr).toArray() : null); Reference.reachabilityFence(this); Reference.reachabilityFence(val); for (Path val_conv_6: val) { if (this != null) { this.ptrs_to.add(val_conv_6); }; }; @@ -93,7 +93,7 @@ public class Route extends CommonBase { * Note that route_params_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ public static Route of(Path[] paths_arg, @Nullable org.ldk.structs.RouteParameters route_params_arg) { - long ret = bindings.Route_new(paths_arg != null ? Arrays.stream(paths_arg).mapToLong(paths_arg_conv_6 -> paths_arg_conv_6 == null ? 0 : paths_arg_conv_6.ptr).toArray() : null, route_params_arg == null ? 0 : route_params_arg.ptr); + long ret = bindings.Route_new(paths_arg != null ? Arrays.stream(paths_arg).mapToLong(paths_arg_conv_6 -> paths_arg_conv_6.ptr).toArray() : null, route_params_arg == null ? 0 : route_params_arg.ptr); Reference.reachabilityFence(paths_arg); Reference.reachabilityFence(route_params_arg); if (ret >= 0 && ret <= 4096) { return null; } @@ -140,7 +140,7 @@ public class Route extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.Route b) { - boolean ret = bindings.Route_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.Route_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/RouteHint.java b/src/main/java/org/ldk/structs/RouteHint.java index 7a4215bc..a966ea7b 100644 --- a/src/main/java/org/ldk/structs/RouteHint.java +++ b/src/main/java/org/ldk/structs/RouteHint.java @@ -35,7 +35,7 @@ public class RouteHint extends CommonBase { } public void set_a(RouteHintHop[] val) { - bindings.RouteHint_set_a(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_14 -> val_conv_14 == null ? 0 : val_conv_14.ptr).toArray() : null); + bindings.RouteHint_set_a(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_14 -> val_conv_14.ptr).toArray() : null); Reference.reachabilityFence(this); Reference.reachabilityFence(val); for (RouteHintHop val_conv_14: val) { if (this != null) { this.ptrs_to.add(val_conv_14); }; }; @@ -45,7 +45,7 @@ public class RouteHint extends CommonBase { * Constructs a new RouteHint given each field */ public static RouteHint of(RouteHintHop[] a_arg) { - long ret = bindings.RouteHint_new(a_arg != null ? Arrays.stream(a_arg).mapToLong(a_arg_conv_14 -> a_arg_conv_14 == null ? 0 : a_arg_conv_14.ptr).toArray() : null); + long ret = bindings.RouteHint_new(a_arg != null ? Arrays.stream(a_arg).mapToLong(a_arg_conv_14 -> a_arg_conv_14.ptr).toArray() : null); Reference.reachabilityFence(a_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.RouteHint ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.RouteHint(null, ret); } @@ -90,7 +90,7 @@ public class RouteHint extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.RouteHint b) { - boolean ret = bindings.RouteHint_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.RouteHint_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/RouteHintHop.java b/src/main/java/org/ldk/structs/RouteHintHop.java index cc7e19c5..4177a858 100644 --- a/src/main/java/org/ldk/structs/RouteHintHop.java +++ b/src/main/java/org/ldk/structs/RouteHintHop.java @@ -76,7 +76,7 @@ public class RouteHintHop extends CommonBase { * The fees which must be paid to use this channel */ public void set_fees(org.ldk.structs.RoutingFees val) { - bindings.RouteHintHop_set_fees(this.ptr, val == null ? 0 : val.ptr); + bindings.RouteHintHop_set_fees(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -148,7 +148,7 @@ public class RouteHintHop extends CommonBase { * Constructs a new RouteHintHop given each field */ public static RouteHintHop of(byte[] src_node_id_arg, long short_channel_id_arg, org.ldk.structs.RoutingFees fees_arg, short cltv_expiry_delta_arg, org.ldk.structs.Option_u64Z htlc_minimum_msat_arg, org.ldk.structs.Option_u64Z htlc_maximum_msat_arg) { - long ret = bindings.RouteHintHop_new(InternalUtils.check_arr_len(src_node_id_arg, 33), short_channel_id_arg, fees_arg == null ? 0 : fees_arg.ptr, cltv_expiry_delta_arg, htlc_minimum_msat_arg.ptr, htlc_maximum_msat_arg.ptr); + long ret = bindings.RouteHintHop_new(InternalUtils.check_arr_len(src_node_id_arg, 33), short_channel_id_arg, fees_arg.ptr, cltv_expiry_delta_arg, htlc_minimum_msat_arg.ptr, htlc_maximum_msat_arg.ptr); Reference.reachabilityFence(src_node_id_arg); Reference.reachabilityFence(short_channel_id_arg); Reference.reachabilityFence(fees_arg); @@ -200,7 +200,7 @@ public class RouteHintHop extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.RouteHintHop b) { - boolean ret = bindings.RouteHintHop_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.RouteHintHop_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/RouteHop.java b/src/main/java/org/ldk/structs/RouteHop.java index 37b97bc9..4b9efdb5 100644 --- a/src/main/java/org/ldk/structs/RouteHop.java +++ b/src/main/java/org/ldk/structs/RouteHop.java @@ -57,7 +57,7 @@ public class RouteHop extends CommonBase { * amended to match the features present in the invoice this node generated. */ public void set_node_features(org.ldk.structs.NodeFeatures val) { - bindings.RouteHop_set_node_features(this.ptr, val == null ? 0 : val.ptr); + bindings.RouteHop_set_node_features(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -99,7 +99,7 @@ public class RouteHop extends CommonBase { * to reach this node. */ public void set_channel_features(org.ldk.structs.ChannelFeatures val) { - bindings.RouteHop_set_channel_features(this.ptr, val == null ? 0 : val.ptr); + bindings.RouteHop_set_channel_features(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -197,7 +197,7 @@ public class RouteHop extends CommonBase { * Constructs a new RouteHop given each field */ public static RouteHop of(byte[] pubkey_arg, org.ldk.structs.NodeFeatures node_features_arg, long short_channel_id_arg, org.ldk.structs.ChannelFeatures channel_features_arg, long fee_msat_arg, int cltv_expiry_delta_arg, boolean maybe_announced_channel_arg) { - long ret = bindings.RouteHop_new(InternalUtils.check_arr_len(pubkey_arg, 33), node_features_arg == null ? 0 : node_features_arg.ptr, short_channel_id_arg, channel_features_arg == null ? 0 : channel_features_arg.ptr, fee_msat_arg, cltv_expiry_delta_arg, maybe_announced_channel_arg); + long ret = bindings.RouteHop_new(InternalUtils.check_arr_len(pubkey_arg, 33), node_features_arg.ptr, short_channel_id_arg, channel_features_arg.ptr, fee_msat_arg, cltv_expiry_delta_arg, maybe_announced_channel_arg); Reference.reachabilityFence(pubkey_arg); Reference.reachabilityFence(node_features_arg); Reference.reachabilityFence(short_channel_id_arg); @@ -249,7 +249,7 @@ public class RouteHop extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.RouteHop b) { - boolean ret = bindings.RouteHop_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.RouteHop_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/RouteParameters.java b/src/main/java/org/ldk/structs/RouteParameters.java index 469a5bcb..f81e9b7b 100644 --- a/src/main/java/org/ldk/structs/RouteParameters.java +++ b/src/main/java/org/ldk/structs/RouteParameters.java @@ -38,7 +38,7 @@ public class RouteParameters extends CommonBase { * The parameters of the failed payment path. */ public void set_payment_params(org.ldk.structs.PaymentParameters val) { - bindings.RouteParameters_set_payment_params(this.ptr, val == null ? 0 : val.ptr); + bindings.RouteParameters_set_payment_params(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -98,7 +98,7 @@ public class RouteParameters extends CommonBase { * Constructs a new RouteParameters given each field */ public static RouteParameters of(org.ldk.structs.PaymentParameters payment_params_arg, long final_value_msat_arg, org.ldk.structs.Option_u64Z max_total_routing_fee_msat_arg) { - long ret = bindings.RouteParameters_new(payment_params_arg == null ? 0 : payment_params_arg.ptr, final_value_msat_arg, max_total_routing_fee_msat_arg.ptr); + long ret = bindings.RouteParameters_new(payment_params_arg.ptr, final_value_msat_arg, max_total_routing_fee_msat_arg.ptr); Reference.reachabilityFence(payment_params_arg); Reference.reachabilityFence(final_value_msat_arg); Reference.reachabilityFence(max_total_routing_fee_msat_arg); @@ -146,7 +146,7 @@ public class RouteParameters extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.RouteParameters b) { - boolean ret = bindings.RouteParameters_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.RouteParameters_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; @@ -163,7 +163,7 @@ public class RouteParameters extends CommonBase { * [`Self::max_total_routing_fee_msat`] defaults to 1% of the payment amount + 50 sats */ public static RouteParameters from_payment_params_and_value(org.ldk.structs.PaymentParameters payment_params, long final_value_msat) { - long ret = bindings.RouteParameters_from_payment_params_and_value(payment_params == null ? 0 : payment_params.ptr, final_value_msat); + long ret = bindings.RouteParameters_from_payment_params_and_value(payment_params.ptr, final_value_msat); Reference.reachabilityFence(payment_params); Reference.reachabilityFence(final_value_msat); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/src/main/java/org/ldk/structs/Router.java b/src/main/java/org/ldk/structs/Router.java index c7608adf..ca667d23 100644 --- a/src/main/java/org/ldk/structs/Router.java +++ b/src/main/java/org/ldk/structs/Router.java @@ -86,7 +86,7 @@ public class Router extends CommonBase { if (inflight_htlcs_hu_conv != null) { inflight_htlcs_hu_conv.ptrs_to.add(this); }; Result_RouteLightningErrorZ ret = arg.find_route(payer, route_params_hu_conv, first_hops_conv_16_arr, inflight_htlcs_hu_conv); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long find_route_with_id(byte[] payer, long route_params, long[] first_hops, long inflight_htlcs, byte[] _payment_hash, byte[] _payment_id) { @@ -105,7 +105,7 @@ public class Router extends CommonBase { if (inflight_htlcs_hu_conv != null) { inflight_htlcs_hu_conv.ptrs_to.add(this); }; Result_RouteLightningErrorZ ret = arg.find_route_with_id(payer, route_params_hu_conv, first_hops_conv_16_arr, inflight_htlcs_hu_conv, _payment_hash, _payment_id); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long create_blinded_payment_paths(byte[] recipient, long[] first_hops, long tlvs, long amount_msats) { @@ -121,7 +121,7 @@ public class Router extends CommonBase { if (tlvs_hu_conv != null) { tlvs_hu_conv.ptrs_to.add(this); }; Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ ret = arg.create_blinded_payment_paths(recipient, first_hops_conv_16_arr, tlvs_hu_conv, amount_msats); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } }, MessageRouter.new_impl(MessageRouter_impl).bindings_instance); @@ -146,7 +146,7 @@ public class Router extends CommonBase { * Note that first_hops (or a relevant inner pointer) may be NULL or all-0s to represent None */ public Result_RouteLightningErrorZ find_route(byte[] payer, org.ldk.structs.RouteParameters route_params, @Nullable ChannelDetails[] first_hops, org.ldk.structs.InFlightHtlcs inflight_htlcs) { - long ret = bindings.Router_find_route(this.ptr, InternalUtils.check_arr_len(payer, 33), route_params == null ? 0 : route_params.ptr, first_hops != null ? Arrays.stream(first_hops).mapToLong(first_hops_conv_16 -> first_hops_conv_16 == null ? 0 : first_hops_conv_16.ptr).toArray() : null, inflight_htlcs == null ? 0 : inflight_htlcs.ptr); + long ret = bindings.Router_find_route(this.ptr, InternalUtils.check_arr_len(payer, 33), route_params.ptr, first_hops != null ? Arrays.stream(first_hops).mapToLong(first_hops_conv_16 -> first_hops_conv_16.ptr).toArray() : null, inflight_htlcs.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(payer); Reference.reachabilityFence(route_params); @@ -172,7 +172,7 @@ public class Router extends CommonBase { * Note that first_hops (or a relevant inner pointer) may be NULL or all-0s to represent None */ public Result_RouteLightningErrorZ find_route_with_id(byte[] payer, org.ldk.structs.RouteParameters route_params, @Nullable ChannelDetails[] first_hops, org.ldk.structs.InFlightHtlcs inflight_htlcs, byte[] _payment_hash, byte[] _payment_id) { - long ret = bindings.Router_find_route_with_id(this.ptr, InternalUtils.check_arr_len(payer, 33), route_params == null ? 0 : route_params.ptr, first_hops != null ? Arrays.stream(first_hops).mapToLong(first_hops_conv_16 -> first_hops_conv_16 == null ? 0 : first_hops_conv_16.ptr).toArray() : null, inflight_htlcs == null ? 0 : inflight_htlcs.ptr, InternalUtils.check_arr_len(_payment_hash, 32), InternalUtils.check_arr_len(_payment_id, 32)); + long ret = bindings.Router_find_route_with_id(this.ptr, InternalUtils.check_arr_len(payer, 33), route_params.ptr, first_hops != null ? Arrays.stream(first_hops).mapToLong(first_hops_conv_16 -> first_hops_conv_16.ptr).toArray() : null, inflight_htlcs.ptr, InternalUtils.check_arr_len(_payment_hash, 32), InternalUtils.check_arr_len(_payment_id, 32)); Reference.reachabilityFence(this); Reference.reachabilityFence(payer); Reference.reachabilityFence(route_params); @@ -194,7 +194,7 @@ public class Router extends CommonBase { * given in `tlvs`. */ public Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ create_blinded_payment_paths(byte[] recipient, ChannelDetails[] first_hops, org.ldk.structs.ReceiveTlvs tlvs, long amount_msats) { - long ret = bindings.Router_create_blinded_payment_paths(this.ptr, InternalUtils.check_arr_len(recipient, 33), first_hops != null ? Arrays.stream(first_hops).mapToLong(first_hops_conv_16 -> first_hops_conv_16 == null ? 0 : first_hops_conv_16.ptr).toArray() : null, tlvs == null ? 0 : tlvs.ptr, amount_msats); + long ret = bindings.Router_create_blinded_payment_paths(this.ptr, InternalUtils.check_arr_len(recipient, 33), first_hops != null ? Arrays.stream(first_hops).mapToLong(first_hops_conv_16 -> first_hops_conv_16.ptr).toArray() : null, tlvs.ptr, amount_msats); Reference.reachabilityFence(this); Reference.reachabilityFence(recipient); Reference.reachabilityFence(first_hops); diff --git a/src/main/java/org/ldk/structs/RoutingFees.java b/src/main/java/org/ldk/structs/RoutingFees.java index 0abd5a3d..bbb610f7 100644 --- a/src/main/java/org/ldk/structs/RoutingFees.java +++ b/src/main/java/org/ldk/structs/RoutingFees.java @@ -77,7 +77,7 @@ public class RoutingFees extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.RoutingFees b) { - boolean ret = bindings.RoutingFees_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.RoutingFees_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/RoutingMessageHandler.java b/src/main/java/org/ldk/structs/RoutingMessageHandler.java index 64988f24..9c5ac5af 100644 --- a/src/main/java/org/ldk/structs/RoutingMessageHandler.java +++ b/src/main/java/org/ldk/structs/RoutingMessageHandler.java @@ -138,27 +138,27 @@ public class RoutingMessageHandler extends CommonBase { org.ldk.structs.NodeAnnouncement msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.NodeAnnouncement(null, msg); } Result_boolLightningErrorZ ret = arg.handle_node_announcement(msg_hu_conv); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long handle_channel_announcement(long msg) { org.ldk.structs.ChannelAnnouncement msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.ChannelAnnouncement(null, msg); } Result_boolLightningErrorZ ret = arg.handle_channel_announcement(msg_hu_conv); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long handle_channel_update(long msg) { org.ldk.structs.ChannelUpdate msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.ChannelUpdate(null, msg); } Result_boolLightningErrorZ ret = arg.handle_channel_update(msg_hu_conv); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long get_next_channel_announcement(long starting_point) { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret = arg.get_next_channel_announcement(starting_point); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); if (impl_holder.held != null) { impl_holder.held.ptrs_to.add(ret); }; return result; } @@ -174,7 +174,7 @@ public class RoutingMessageHandler extends CommonBase { org.ldk.structs.Init init_hu_conv = null; if (init < 0 || init > 4096) { init_hu_conv = new org.ldk.structs.Init(null, init); } Result_NoneNoneZ ret = arg.peer_connected(their_node_id, init_hu_conv, inbound); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long handle_reply_channel_range(byte[] their_node_id, long msg) { @@ -182,7 +182,7 @@ public class RoutingMessageHandler extends CommonBase { if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.add(this); }; Result_NoneLightningErrorZ ret = arg.handle_reply_channel_range(their_node_id, msg_hu_conv); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long handle_reply_short_channel_ids_end(byte[] their_node_id, long msg) { @@ -190,7 +190,7 @@ public class RoutingMessageHandler extends CommonBase { if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.add(this); }; Result_NoneLightningErrorZ ret = arg.handle_reply_short_channel_ids_end(their_node_id, msg_hu_conv); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long handle_query_channel_range(byte[] their_node_id, long msg) { @@ -198,7 +198,7 @@ public class RoutingMessageHandler extends CommonBase { if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.add(this); }; Result_NoneLightningErrorZ ret = arg.handle_query_channel_range(their_node_id, msg_hu_conv); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long handle_query_short_channel_ids(byte[] their_node_id, long msg) { @@ -206,7 +206,7 @@ public class RoutingMessageHandler extends CommonBase { if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.add(this); }; Result_NoneLightningErrorZ ret = arg.handle_query_short_channel_ids(their_node_id, msg_hu_conv); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public boolean processing_queue_high() { @@ -217,13 +217,13 @@ public class RoutingMessageHandler extends CommonBase { @Override public long provided_node_features() { NodeFeatures ret = arg.provided_node_features(); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long provided_init_features(byte[] their_node_id) { InitFeatures ret = arg.provided_init_features(their_node_id); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } }, MessageSendEventsProvider.new_impl(MessageSendEventsProvider_impl).bindings_instance); @@ -244,7 +244,7 @@ public class RoutingMessageHandler extends CommonBase { * `false` or returning an `Err` otherwise. */ public Result_boolLightningErrorZ handle_node_announcement(org.ldk.structs.NodeAnnouncement msg) { - long ret = bindings.RoutingMessageHandler_handle_node_announcement(this.ptr, msg == null ? 0 : msg.ptr); + long ret = bindings.RoutingMessageHandler_handle_node_announcement(this.ptr, msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -258,7 +258,7 @@ public class RoutingMessageHandler extends CommonBase { * or returning an `Err` otherwise. */ public Result_boolLightningErrorZ handle_channel_announcement(org.ldk.structs.ChannelAnnouncement msg) { - long ret = bindings.RoutingMessageHandler_handle_channel_announcement(this.ptr, msg == null ? 0 : msg.ptr); + long ret = bindings.RoutingMessageHandler_handle_channel_announcement(this.ptr, msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -272,7 +272,7 @@ public class RoutingMessageHandler extends CommonBase { * `false` or returning an `Err` otherwise. */ public Result_boolLightningErrorZ handle_channel_update(org.ldk.structs.ChannelUpdate msg) { - long ret = bindings.RoutingMessageHandler_handle_channel_update(this.ptr, msg == null ? 0 : msg.ptr); + long ret = bindings.RoutingMessageHandler_handle_channel_update(this.ptr, msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -327,7 +327,7 @@ public class RoutingMessageHandler extends CommonBase { * message handlers may still wish to communicate with this peer. */ public Result_NoneNoneZ peer_connected(byte[] their_node_id, org.ldk.structs.Init init, boolean inbound) { - long ret = bindings.RoutingMessageHandler_peer_connected(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), init == null ? 0 : init.ptr, inbound); + long ret = bindings.RoutingMessageHandler_peer_connected(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), init.ptr, inbound); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(init); @@ -344,7 +344,7 @@ public class RoutingMessageHandler extends CommonBase { * replies to a single query. */ public Result_NoneLightningErrorZ handle_reply_channel_range(byte[] their_node_id, org.ldk.structs.ReplyChannelRange msg) { - long ret = bindings.RoutingMessageHandler_handle_reply_channel_range(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); + long ret = bindings.RoutingMessageHandler_handle_reply_channel_range(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(msg); @@ -361,7 +361,7 @@ public class RoutingMessageHandler extends CommonBase { * gossip messages. */ public Result_NoneLightningErrorZ handle_reply_short_channel_ids_end(byte[] their_node_id, org.ldk.structs.ReplyShortChannelIdsEnd msg) { - long ret = bindings.RoutingMessageHandler_handle_reply_short_channel_ids_end(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); + long ret = bindings.RoutingMessageHandler_handle_reply_short_channel_ids_end(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(msg); @@ -376,7 +376,7 @@ public class RoutingMessageHandler extends CommonBase { * for the requested range of blocks. */ public Result_NoneLightningErrorZ handle_query_channel_range(byte[] their_node_id, org.ldk.structs.QueryChannelRange msg) { - long ret = bindings.RoutingMessageHandler_handle_query_channel_range(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); + long ret = bindings.RoutingMessageHandler_handle_query_channel_range(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(msg); @@ -391,7 +391,7 @@ public class RoutingMessageHandler extends CommonBase { * list of `short_channel_id`s. */ public Result_NoneLightningErrorZ handle_query_short_channel_ids(byte[] their_node_id, org.ldk.structs.QueryShortChannelIds msg) { - long ret = bindings.RoutingMessageHandler_handle_query_short_channel_ids(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr); + long ret = bindings.RoutingMessageHandler_handle_query_short_channel_ids(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(their_node_id); Reference.reachabilityFence(msg); diff --git a/src/main/java/org/ldk/structs/ScoreLookUp.java b/src/main/java/org/ldk/structs/ScoreLookUp.java index 022b74ec..961f554b 100644 --- a/src/main/java/org/ldk/structs/ScoreLookUp.java +++ b/src/main/java/org/ldk/structs/ScoreLookUp.java @@ -80,7 +80,7 @@ public class ScoreLookUp extends CommonBase { * Thus, implementations should be overflow-safe. */ public long channel_penalty_msat(org.ldk.structs.CandidateRouteHop candidate, org.ldk.structs.ChannelUsage usage, org.ldk.structs.ProbabilisticScoringFeeParameters score_params) { - long ret = bindings.ScoreLookUp_channel_penalty_msat(this.ptr, candidate == null ? 0 : candidate.ptr, usage == null ? 0 : usage.ptr, score_params == null ? 0 : score_params.ptr); + long ret = bindings.ScoreLookUp_channel_penalty_msat(this.ptr, candidate.ptr, usage.ptr, score_params.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(candidate); Reference.reachabilityFence(usage); diff --git a/src/main/java/org/ldk/structs/ScoreUpdate.java b/src/main/java/org/ldk/structs/ScoreUpdate.java index bdc24320..495a1023 100644 --- a/src/main/java/org/ldk/structs/ScoreUpdate.java +++ b/src/main/java/org/ldk/structs/ScoreUpdate.java @@ -96,7 +96,7 @@ public class ScoreUpdate extends CommonBase { * Handles updating channel penalties after failing to route through a channel. */ public void payment_path_failed(org.ldk.structs.Path path, long short_channel_id, long duration_since_epoch) { - bindings.ScoreUpdate_payment_path_failed(this.ptr, path == null ? 0 : path.ptr, short_channel_id, duration_since_epoch); + bindings.ScoreUpdate_payment_path_failed(this.ptr, path.ptr, short_channel_id, duration_since_epoch); Reference.reachabilityFence(this); Reference.reachabilityFence(path); Reference.reachabilityFence(short_channel_id); @@ -108,7 +108,7 @@ public class ScoreUpdate extends CommonBase { * Handles updating channel penalties after successfully routing along a path. */ public void payment_path_successful(org.ldk.structs.Path path, long duration_since_epoch) { - bindings.ScoreUpdate_payment_path_successful(this.ptr, path == null ? 0 : path.ptr, duration_since_epoch); + bindings.ScoreUpdate_payment_path_successful(this.ptr, path.ptr, duration_since_epoch); Reference.reachabilityFence(this); Reference.reachabilityFence(path); Reference.reachabilityFence(duration_since_epoch); @@ -119,7 +119,7 @@ public class ScoreUpdate extends CommonBase { * Handles updating channel penalties after a probe over the given path failed. */ public void probe_failed(org.ldk.structs.Path path, long short_channel_id, long duration_since_epoch) { - bindings.ScoreUpdate_probe_failed(this.ptr, path == null ? 0 : path.ptr, short_channel_id, duration_since_epoch); + bindings.ScoreUpdate_probe_failed(this.ptr, path.ptr, short_channel_id, duration_since_epoch); Reference.reachabilityFence(this); Reference.reachabilityFence(path); Reference.reachabilityFence(short_channel_id); @@ -131,7 +131,7 @@ public class ScoreUpdate extends CommonBase { * Handles updating channel penalties after a probe over the given path succeeded. */ public void probe_successful(org.ldk.structs.Path path, long duration_since_epoch) { - bindings.ScoreUpdate_probe_successful(this.ptr, path == null ? 0 : path.ptr, duration_since_epoch); + bindings.ScoreUpdate_probe_successful(this.ptr, path.ptr, duration_since_epoch); Reference.reachabilityFence(this); Reference.reachabilityFence(path); Reference.reachabilityFence(duration_since_epoch); diff --git a/src/main/java/org/ldk/structs/ScorerAccountingForInFlightHtlcs.java b/src/main/java/org/ldk/structs/ScorerAccountingForInFlightHtlcs.java index b6b8ad2f..51944170 100644 --- a/src/main/java/org/ldk/structs/ScorerAccountingForInFlightHtlcs.java +++ b/src/main/java/org/ldk/structs/ScorerAccountingForInFlightHtlcs.java @@ -29,7 +29,7 @@ public class ScorerAccountingForInFlightHtlcs extends CommonBase { * Initialize a new `ScorerAccountingForInFlightHtlcs`. */ public static ScorerAccountingForInFlightHtlcs of(org.ldk.structs.ScoreLookUp scorer, org.ldk.structs.InFlightHtlcs inflight_htlcs) { - long ret = bindings.ScorerAccountingForInFlightHtlcs_new(scorer.ptr, inflight_htlcs == null ? 0 : inflight_htlcs.ptr); + long ret = bindings.ScorerAccountingForInFlightHtlcs_new(scorer.ptr, inflight_htlcs.ptr); Reference.reachabilityFence(scorer); Reference.reachabilityFence(inflight_htlcs); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/src/main/java/org/ldk/structs/SendError.java b/src/main/java/org/ldk/structs/SendError.java index a6be0b7f..295b29cb 100644 --- a/src/main/java/org/ldk/structs/SendError.java +++ b/src/main/java/org/ldk/structs/SendError.java @@ -47,6 +47,9 @@ public class SendError extends CommonBase { if (raw_val.getClass() == bindings.LDKSendError.GetNodeIdFailed.class) { return new GetNodeIdFailed(ptr, (bindings.LDKSendError.GetNodeIdFailed)raw_val); } + if (raw_val.getClass() == bindings.LDKSendError.UnresolvedIntroductionNode.class) { + return new UnresolvedIntroductionNode(ptr, (bindings.LDKSendError.UnresolvedIntroductionNode)raw_val); + } if (raw_val.getClass() == bindings.LDKSendError.BlindedPathAdvanceFailed.class) { return new BlindedPathAdvanceFailed(ptr, (bindings.LDKSendError.BlindedPathAdvanceFailed)raw_val); } @@ -125,6 +128,16 @@ public class SendError extends CommonBase { super(null, ptr); } } + /** + * The provided [`Destination`] has a blinded path with an unresolved introduction node. An + * attempt to resolve it in the [`MessageRouter`] when finding an [`OnionMessagePath`] likely + * failed. + */ + public final static class UnresolvedIntroductionNode extends SendError { + private UnresolvedIntroductionNode(long ptr, bindings.LDKSendError.UnresolvedIntroductionNode obj) { + super(null, ptr); + } + } /** * We attempted to send to a blinded path where we are the introduction node, and failed to * advance the blinded path to make the second hop the new introduction node. Either @@ -244,6 +257,17 @@ public class SendError extends CommonBase { return ret_hu_conv; } + /** + * Utility method to constructs a new UnresolvedIntroductionNode-variant SendError + */ + public static SendError unresolved_introduction_node() { + long ret = bindings.SendError_unresolved_introduction_node(); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.SendError ret_hu_conv = org.ldk.structs.SendError.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + /** * Utility method to constructs a new BlindedPathAdvanceFailed-variant SendError */ @@ -255,12 +279,24 @@ public class SendError extends CommonBase { return ret_hu_conv; } + /** + * Generates a non-cryptographic 64-bit hash of the SendError. + */ + public long hash() { + long ret = bindings.SendError_hash(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + @Override public int hashCode() { + return (int)this.hash(); + } /** * Checks if two SendErrors contain equal inner contents. * This ignores pointers and is_owned flags and looks at the values in fields. */ public boolean eq(org.ldk.structs.SendError b) { - boolean ret = bindings.SendError_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.SendError_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); return ret; diff --git a/src/main/java/org/ldk/structs/SendSuccess.java b/src/main/java/org/ldk/structs/SendSuccess.java index 949685f4..1a11e9f1 100644 --- a/src/main/java/org/ldk/structs/SendSuccess.java +++ b/src/main/java/org/ldk/structs/SendSuccess.java @@ -93,12 +93,24 @@ public class SendSuccess extends CommonBase { return ret_hu_conv; } + /** + * Generates a non-cryptographic 64-bit hash of the SendSuccess. + */ + public long hash() { + long ret = bindings.SendSuccess_hash(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + @Override public int hashCode() { + return (int)this.hash(); + } /** * Checks if two SendSuccesss contain equal inner contents. * This ignores pointers and is_owned flags and looks at the values in fields. */ public boolean eq(org.ldk.structs.SendSuccess b) { - boolean ret = bindings.SendSuccess_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.SendSuccess_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); return ret; diff --git a/src/main/java/org/ldk/structs/Sha256.java b/src/main/java/org/ldk/structs/Sha256.java index 8f380798..074f7bb9 100644 --- a/src/main/java/org/ldk/structs/Sha256.java +++ b/src/main/java/org/ldk/structs/Sha256.java @@ -56,7 +56,7 @@ public class Sha256 extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.Sha256 b) { - boolean ret = bindings.Sha256_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.Sha256_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/Shutdown.java b/src/main/java/org/ldk/structs/Shutdown.java index 56f8712a..08b4aada 100644 --- a/src/main/java/org/ldk/structs/Shutdown.java +++ b/src/main/java/org/ldk/structs/Shutdown.java @@ -25,19 +25,23 @@ public class Shutdown extends CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { - byte[] ret = bindings.Shutdown_get_channel_id(this.ptr); + public ChannelId get_channel_id() { + long ret = bindings.Shutdown_get_channel_id(this.ptr); Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.Shutdown_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.Shutdown_set_channel_id(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** @@ -65,13 +69,14 @@ public class Shutdown extends CommonBase { /** * Constructs a new Shutdown given each field */ - public static Shutdown of(byte[] channel_id_arg, byte[] scriptpubkey_arg) { - long ret = bindings.Shutdown_new(InternalUtils.check_arr_len(channel_id_arg, 32), scriptpubkey_arg); + public static Shutdown of(org.ldk.structs.ChannelId channel_id_arg, byte[] scriptpubkey_arg) { + long ret = bindings.Shutdown_new(channel_id_arg.ptr, scriptpubkey_arg); Reference.reachabilityFence(channel_id_arg); Reference.reachabilityFence(scriptpubkey_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Shutdown ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Shutdown(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); }; return ret_hu_conv; } @@ -111,7 +116,7 @@ public class Shutdown extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.Shutdown b) { - boolean ret = bindings.Shutdown_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.Shutdown_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/ShutdownScript.java b/src/main/java/org/ldk/structs/ShutdownScript.java index 4a422d06..3dbbde51 100644 --- a/src/main/java/org/ldk/structs/ShutdownScript.java +++ b/src/main/java/org/ldk/structs/ShutdownScript.java @@ -46,7 +46,7 @@ public class ShutdownScript extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.ShutdownScript b) { - boolean ret = bindings.ShutdownScript_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.ShutdownScript_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; @@ -147,7 +147,7 @@ public class ShutdownScript extends CommonBase { * Specifically, checks for compliance with feature `option_shutdown_anysegwit`. */ public boolean is_compatible(org.ldk.structs.InitFeatures features) { - boolean ret = bindings.ShutdownScript_is_compatible(this.ptr, features == null ? 0 : features.ptr); + boolean ret = bindings.ShutdownScript_is_compatible(this.ptr, features.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(features); if (this != null) { this.ptrs_to.add(features); }; diff --git a/src/main/java/org/ldk/structs/SignBolt12InvoiceFn.java b/src/main/java/org/ldk/structs/SignBolt12InvoiceFn.java new file mode 100644 index 00000000..40e63659 --- /dev/null +++ b/src/main/java/org/ldk/structs/SignBolt12InvoiceFn.java @@ -0,0 +1,72 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + +/** + * A function for signing an [`UnsignedBolt12Invoice`]. + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class SignBolt12InvoiceFn extends CommonBase { + final bindings.LDKSignBolt12InvoiceFn bindings_instance; + SignBolt12InvoiceFn(Object _dummy, long ptr) { super(ptr); bindings_instance = null; } + private SignBolt12InvoiceFn(bindings.LDKSignBolt12InvoiceFn arg) { + super(bindings.LDKSignBolt12InvoiceFn_new(arg)); + this.ptrs_to.add(arg); + this.bindings_instance = arg; + } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + if (ptr != 0) { bindings.SignBolt12InvoiceFn_free(ptr); } super.finalize(); + } + /** + * Destroys the object, freeing associated resources. After this call, any access + * to this object may result in a SEGFAULT or worse. + * + * You should generally NEVER call this method. You should let the garbage collector + * do this for you when it finalizes objects. However, it may be useful for types + * which represent locks and should be closed immediately to avoid holding locks + * until the GC runs. + */ + public void destroy() { + if (ptr != 0) { bindings.SignBolt12InvoiceFn_free(ptr); } + ptr = 0; + } + public static interface SignBolt12InvoiceFnInterface { + /** + * Signs a [`TaggedHash`] computed over the merkle root of `message`'s TLV stream. + */ + Result_SchnorrSignatureNoneZ sign_invoice(UnsignedBolt12Invoice message); + } + private static class LDKSignBolt12InvoiceFnHolder { SignBolt12InvoiceFn held; } + public static SignBolt12InvoiceFn new_impl(SignBolt12InvoiceFnInterface arg) { + final LDKSignBolt12InvoiceFnHolder impl_holder = new LDKSignBolt12InvoiceFnHolder(); + impl_holder.held = new SignBolt12InvoiceFn(new bindings.LDKSignBolt12InvoiceFn() { + @Override public long sign_invoice(long message) { + org.ldk.structs.UnsignedBolt12Invoice message_hu_conv = null; if (message < 0 || message > 4096) { message_hu_conv = new org.ldk.structs.UnsignedBolt12Invoice(null, message); } + Result_SchnorrSignatureNoneZ ret = arg.sign_invoice(message_hu_conv); + Reference.reachabilityFence(arg); + long result = ret.clone_ptr(); + return result; + } + }); + return impl_holder.held; + } + /** + * Signs a [`TaggedHash`] computed over the merkle root of `message`'s TLV stream. + */ + public Result_SchnorrSignatureNoneZ sign_invoice(org.ldk.structs.UnsignedBolt12Invoice message) { + long ret = bindings.SignBolt12InvoiceFn_sign_invoice(this.ptr, message.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(message); + if (ret >= 0 && ret <= 4096) { return null; } + Result_SchnorrSignatureNoneZ ret_hu_conv = Result_SchnorrSignatureNoneZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.add(message); }; + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/SignError.java b/src/main/java/org/ldk/structs/SignError.java new file mode 100644 index 00000000..c54c4ea2 --- /dev/null +++ b/src/main/java/org/ldk/structs/SignError.java @@ -0,0 +1,92 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + + +/** + * Error when signing messages. + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class SignError extends CommonBase { + private SignError(Object _dummy, long ptr) { super(ptr); } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + if (ptr != 0) { bindings.SignError_free(ptr); } + } + static SignError constr_from_ptr(long ptr) { + bindings.LDKSignError raw_val = bindings.LDKSignError_ref_from_ptr(ptr); + if (raw_val.getClass() == bindings.LDKSignError.Signing.class) { + return new Signing(ptr, (bindings.LDKSignError.Signing)raw_val); + } + if (raw_val.getClass() == bindings.LDKSignError.Verification.class) { + return new Verification(ptr, (bindings.LDKSignError.Verification)raw_val); + } + assert false; return null; // Unreachable without extending the (internal) bindings interface + } + + /** + * User-defined error when signing the message. + */ + public final static class Signing extends SignError { + private Signing(long ptr, bindings.LDKSignError.Signing obj) { + super(null, ptr); + } + } + /** + * Error when verifying the produced signature using the given pubkey. + */ + public final static class Verification extends SignError { + public final org.ldk.enums.Secp256k1Error verification; + private Verification(long ptr, bindings.LDKSignError.Verification obj) { + super(null, ptr); + this.verification = obj.verification; + } + } + long clone_ptr() { + long ret = bindings.SignError_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a copy of the SignError + */ + public SignError clone() { + long ret = bindings.SignError_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.SignError ret_hu_conv = org.ldk.structs.SignError.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new Signing-variant SignError + */ + public static SignError signing() { + long ret = bindings.SignError_signing(); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.SignError ret_hu_conv = org.ldk.structs.SignError.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new Verification-variant SignError + */ + public static SignError verification(org.ldk.enums.Secp256k1Error a) { + long ret = bindings.SignError_verification(a); + Reference.reachabilityFence(a); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.SignError ret_hu_conv = org.ldk.structs.SignError.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/SignInvoiceRequestFn.java b/src/main/java/org/ldk/structs/SignInvoiceRequestFn.java new file mode 100644 index 00000000..94258563 --- /dev/null +++ b/src/main/java/org/ldk/structs/SignInvoiceRequestFn.java @@ -0,0 +1,72 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + +/** + * A function for signing an [`UnsignedInvoiceRequest`]. + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class SignInvoiceRequestFn extends CommonBase { + final bindings.LDKSignInvoiceRequestFn bindings_instance; + SignInvoiceRequestFn(Object _dummy, long ptr) { super(ptr); bindings_instance = null; } + private SignInvoiceRequestFn(bindings.LDKSignInvoiceRequestFn arg) { + super(bindings.LDKSignInvoiceRequestFn_new(arg)); + this.ptrs_to.add(arg); + this.bindings_instance = arg; + } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + if (ptr != 0) { bindings.SignInvoiceRequestFn_free(ptr); } super.finalize(); + } + /** + * Destroys the object, freeing associated resources. After this call, any access + * to this object may result in a SEGFAULT or worse. + * + * You should generally NEVER call this method. You should let the garbage collector + * do this for you when it finalizes objects. However, it may be useful for types + * which represent locks and should be closed immediately to avoid holding locks + * until the GC runs. + */ + public void destroy() { + if (ptr != 0) { bindings.SignInvoiceRequestFn_free(ptr); } + ptr = 0; + } + public static interface SignInvoiceRequestFnInterface { + /** + * Signs a [`TaggedHash`] computed over the merkle root of `message`'s TLV stream. + */ + Result_SchnorrSignatureNoneZ sign_invoice_request(UnsignedInvoiceRequest message); + } + private static class LDKSignInvoiceRequestFnHolder { SignInvoiceRequestFn held; } + public static SignInvoiceRequestFn new_impl(SignInvoiceRequestFnInterface arg) { + final LDKSignInvoiceRequestFnHolder impl_holder = new LDKSignInvoiceRequestFnHolder(); + impl_holder.held = new SignInvoiceRequestFn(new bindings.LDKSignInvoiceRequestFn() { + @Override public long sign_invoice_request(long message) { + org.ldk.structs.UnsignedInvoiceRequest message_hu_conv = null; if (message < 0 || message > 4096) { message_hu_conv = new org.ldk.structs.UnsignedInvoiceRequest(null, message); } + Result_SchnorrSignatureNoneZ ret = arg.sign_invoice_request(message_hu_conv); + Reference.reachabilityFence(arg); + long result = ret.clone_ptr(); + return result; + } + }); + return impl_holder.held; + } + /** + * Signs a [`TaggedHash`] computed over the merkle root of `message`'s TLV stream. + */ + public Result_SchnorrSignatureNoneZ sign_invoice_request(org.ldk.structs.UnsignedInvoiceRequest message) { + long ret = bindings.SignInvoiceRequestFn_sign_invoice_request(this.ptr, message.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(message); + if (ret >= 0 && ret <= 4096) { return null; } + Result_SchnorrSignatureNoneZ ret_hu_conv = Result_SchnorrSignatureNoneZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.add(message); }; + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/SignOrCreationError.java b/src/main/java/org/ldk/structs/SignOrCreationError.java index 2ef83285..70437b37 100644 --- a/src/main/java/org/ldk/structs/SignOrCreationError.java +++ b/src/main/java/org/ldk/structs/SignOrCreationError.java @@ -95,7 +95,7 @@ public class SignOrCreationError extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public boolean eq(org.ldk.structs.SignOrCreationError b) { - boolean ret = bindings.SignOrCreationError_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.SignOrCreationError_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); return ret; diff --git a/src/main/java/org/ldk/structs/SignedRawBolt11Invoice.java b/src/main/java/org/ldk/structs/SignedRawBolt11Invoice.java index 4859f660..6bc7ce23 100644 --- a/src/main/java/org/ldk/structs/SignedRawBolt11Invoice.java +++ b/src/main/java/org/ldk/structs/SignedRawBolt11Invoice.java @@ -30,7 +30,7 @@ public class SignedRawBolt11Invoice extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.SignedRawBolt11Invoice b) { - boolean ret = bindings.SignedRawBolt11Invoice_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.SignedRawBolt11Invoice_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/SignerProvider.java b/src/main/java/org/ldk/structs/SignerProvider.java index 4de9147c..9a4cac9e 100644 --- a/src/main/java/org/ldk/structs/SignerProvider.java +++ b/src/main/java/org/ldk/structs/SignerProvider.java @@ -114,19 +114,19 @@ public class SignerProvider extends CommonBase { @Override public long read_chan_signer(byte[] reader) { Result_WriteableEcdsaChannelSignerDecodeErrorZ ret = arg.read_chan_signer(reader); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long get_destination_script(byte[] channel_keys_id) { Result_CVec_u8ZNoneZ ret = arg.get_destination_script(channel_keys_id); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long get_shutdown_scriptpubkey() { Result_ShutdownScriptNoneZ ret = arg.get_shutdown_scriptpubkey(); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } }); diff --git a/src/main/java/org/ldk/structs/Sleeper.java b/src/main/java/org/ldk/structs/Sleeper.java index 60bce88f..189e2bb0 100644 --- a/src/main/java/org/ldk/structs/Sleeper.java +++ b/src/main/java/org/ldk/structs/Sleeper.java @@ -25,7 +25,7 @@ public class Sleeper extends CommonBase { * Constructs a new sleeper from one future, allowing blocking on it. */ public static Sleeper from_single_future(org.ldk.structs.Future future) { - long ret = bindings.Sleeper_from_single_future(future == null ? 0 : future.ptr); + long ret = bindings.Sleeper_from_single_future(future.ptr); Reference.reachabilityFence(future); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Sleeper ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Sleeper(null, ret); } @@ -38,7 +38,7 @@ public class Sleeper extends CommonBase { * Constructs a new sleeper from two futures, allowing blocking on both at once. */ public static Sleeper from_two_futures(org.ldk.structs.Future fut_a, org.ldk.structs.Future fut_b) { - long ret = bindings.Sleeper_from_two_futures(fut_a == null ? 0 : fut_a.ptr, fut_b == null ? 0 : fut_b.ptr); + long ret = bindings.Sleeper_from_two_futures(fut_a.ptr, fut_b.ptr); Reference.reachabilityFence(fut_a); Reference.reachabilityFence(fut_b); if (ret >= 0 && ret <= 4096) { return null; } @@ -53,12 +53,20 @@ public class Sleeper extends CommonBase { * Constructs a new sleeper on many futures, allowing blocking on all at once. */ public static Sleeper of(Future[] futures) { - long ret = bindings.Sleeper_new(futures != null ? Arrays.stream(futures).mapToLong(futures_conv_8 -> futures_conv_8 == null ? 0 : futures_conv_8.ptr).toArray() : null); + long ret = bindings.Sleeper_new(futures != null ? Arrays.stream(futures).mapToLong(futures_conv_8 -> futures_conv_8.ptr).toArray() : null); Reference.reachabilityFence(futures); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Sleeper ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Sleeper(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; - for (Future futures_conv_8: futures) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(futures_conv_8); }; }; + for (Future futures_conv_8: futures) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(futures_conv_8); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid ret_hu_conv being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after ret_hu_conv call, futures_conv_8 is reset to null and is now a dummy object. + futures_conv_8.ptr = 0;; }; return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/SocketAddress.java b/src/main/java/org/ldk/structs/SocketAddress.java index 4b108bc3..0582f9ff 100644 --- a/src/main/java/org/ldk/structs/SocketAddress.java +++ b/src/main/java/org/ldk/structs/SocketAddress.java @@ -215,7 +215,7 @@ public class SocketAddress extends CommonBase { * Utility method to constructs a new Hostname-variant SocketAddress */ public static SocketAddress hostname(org.ldk.structs.Hostname hostname, short port) { - long ret = bindings.SocketAddress_hostname(hostname == null ? 0 : hostname.ptr, port); + long ret = bindings.SocketAddress_hostname(hostname.ptr, port); Reference.reachabilityFence(hostname); Reference.reachabilityFence(port); if (ret >= 0 && ret <= 4096) { return null; } @@ -242,7 +242,7 @@ public class SocketAddress extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public boolean eq(org.ldk.structs.SocketAddress b) { - boolean ret = bindings.SocketAddress_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.SocketAddress_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); return ret; diff --git a/src/main/java/org/ldk/structs/SpendableOutputDescriptor.java b/src/main/java/org/ldk/structs/SpendableOutputDescriptor.java index cdb05d5e..31f48461 100644 --- a/src/main/java/org/ldk/structs/SpendableOutputDescriptor.java +++ b/src/main/java/org/ldk/structs/SpendableOutputDescriptor.java @@ -186,7 +186,7 @@ public class SpendableOutputDescriptor extends CommonBase { * Utility method to constructs a new StaticOutput-variant SpendableOutputDescriptor */ public static SpendableOutputDescriptor static_output(org.ldk.structs.OutPoint outpoint, org.ldk.structs.TxOut output, byte[] channel_keys_id) { - long ret = bindings.SpendableOutputDescriptor_static_output(outpoint == null ? 0 : outpoint.ptr, output.ptr, InternalUtils.check_arr_len(channel_keys_id, 32)); + long ret = bindings.SpendableOutputDescriptor_static_output(outpoint.ptr, output.ptr, InternalUtils.check_arr_len(channel_keys_id, 32)); Reference.reachabilityFence(outpoint); Reference.reachabilityFence(output); Reference.reachabilityFence(channel_keys_id); @@ -201,7 +201,7 @@ public class SpendableOutputDescriptor extends CommonBase { * Utility method to constructs a new DelayedPaymentOutput-variant SpendableOutputDescriptor */ public static SpendableOutputDescriptor delayed_payment_output(org.ldk.structs.DelayedPaymentOutputDescriptor a) { - long ret = bindings.SpendableOutputDescriptor_delayed_payment_output(a == null ? 0 : a.ptr); + long ret = bindings.SpendableOutputDescriptor_delayed_payment_output(a.ptr); Reference.reachabilityFence(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.SpendableOutputDescriptor ret_hu_conv = org.ldk.structs.SpendableOutputDescriptor.constr_from_ptr(ret); @@ -214,7 +214,7 @@ public class SpendableOutputDescriptor extends CommonBase { * Utility method to constructs a new StaticPaymentOutput-variant SpendableOutputDescriptor */ public static SpendableOutputDescriptor static_payment_output(org.ldk.structs.StaticPaymentOutputDescriptor a) { - long ret = bindings.SpendableOutputDescriptor_static_payment_output(a == null ? 0 : a.ptr); + long ret = bindings.SpendableOutputDescriptor_static_payment_output(a.ptr); Reference.reachabilityFence(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.SpendableOutputDescriptor ret_hu_conv = org.ldk.structs.SpendableOutputDescriptor.constr_from_ptr(ret); @@ -240,7 +240,7 @@ public class SpendableOutputDescriptor extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public boolean eq(org.ldk.structs.SpendableOutputDescriptor b) { - boolean ret = bindings.SpendableOutputDescriptor_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.SpendableOutputDescriptor_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); return ret; diff --git a/src/main/java/org/ldk/structs/SpendingDelay.java b/src/main/java/org/ldk/structs/SpendingDelay.java new file mode 100644 index 00000000..334beee0 --- /dev/null +++ b/src/main/java/org/ldk/structs/SpendingDelay.java @@ -0,0 +1,103 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + + +/** + * A `enum` signalling to the [`OutputSweeper`] that it should delay spending an output until a + * future block height is reached. + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class SpendingDelay extends CommonBase { + private SpendingDelay(Object _dummy, long ptr) { super(ptr); } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + if (ptr != 0) { bindings.SpendingDelay_free(ptr); } + } + static SpendingDelay constr_from_ptr(long ptr) { + bindings.LDKSpendingDelay raw_val = bindings.LDKSpendingDelay_ref_from_ptr(ptr); + if (raw_val.getClass() == bindings.LDKSpendingDelay.Relative.class) { + return new Relative(ptr, (bindings.LDKSpendingDelay.Relative)raw_val); + } + if (raw_val.getClass() == bindings.LDKSpendingDelay.Absolute.class) { + return new Absolute(ptr, (bindings.LDKSpendingDelay.Absolute)raw_val); + } + assert false; return null; // Unreachable without extending the (internal) bindings interface + } + + /** + * A relative delay indicating we shouldn't spend the output before `cur_height + num_blocks` + * is reached. + */ + public final static class Relative extends SpendingDelay { + /** + * The number of blocks until we'll generate and broadcast the spending transaction. + */ + public final int num_blocks; + private Relative(long ptr, bindings.LDKSpendingDelay.Relative obj) { + super(null, ptr); + this.num_blocks = obj.num_blocks; + } + } + /** + * An absolute delay indicating we shouldn't spend the output before `height` is reached. + */ + public final static class Absolute extends SpendingDelay { + /** + * The height at which we'll generate and broadcast the spending transaction. + */ + public final int height; + private Absolute(long ptr, bindings.LDKSpendingDelay.Absolute obj) { + super(null, ptr); + this.height = obj.height; + } + } + long clone_ptr() { + long ret = bindings.SpendingDelay_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a copy of the SpendingDelay + */ + public SpendingDelay clone() { + long ret = bindings.SpendingDelay_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.SpendingDelay ret_hu_conv = org.ldk.structs.SpendingDelay.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new Relative-variant SpendingDelay + */ + public static SpendingDelay relative(int num_blocks) { + long ret = bindings.SpendingDelay_relative(num_blocks); + Reference.reachabilityFence(num_blocks); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.SpendingDelay ret_hu_conv = org.ldk.structs.SpendingDelay.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new Absolute-variant SpendingDelay + */ + public static SpendingDelay absolute(int height) { + long ret = bindings.SpendingDelay_absolute(height); + Reference.reachabilityFence(height); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.SpendingDelay ret_hu_conv = org.ldk.structs.SpendingDelay.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/Splice.java b/src/main/java/org/ldk/structs/Splice.java index 0f4e26a8..5dae71a7 100644 --- a/src/main/java/org/ldk/structs/Splice.java +++ b/src/main/java/org/ldk/structs/Splice.java @@ -23,19 +23,23 @@ public class Splice extends CommonBase { /** * The channel ID where splicing is intended */ - public byte[] get_channel_id() { - byte[] ret = bindings.Splice_get_channel_id(this.ptr); + public ChannelId get_channel_id() { + long ret = bindings.Splice_get_channel_id(this.ptr); Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** * The channel ID where splicing is intended */ - public void set_channel_id(byte[] val) { - bindings.Splice_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.Splice_set_channel_id(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** @@ -133,8 +137,8 @@ public class Splice extends CommonBase { /** * Constructs a new Splice given each field */ - public static Splice of(byte[] channel_id_arg, byte[] chain_hash_arg, long relative_satoshis_arg, int funding_feerate_perkw_arg, int locktime_arg, byte[] funding_pubkey_arg) { - long ret = bindings.Splice_new(InternalUtils.check_arr_len(channel_id_arg, 32), InternalUtils.check_arr_len(chain_hash_arg, 32), relative_satoshis_arg, funding_feerate_perkw_arg, locktime_arg, InternalUtils.check_arr_len(funding_pubkey_arg, 33)); + public static Splice of(org.ldk.structs.ChannelId channel_id_arg, byte[] chain_hash_arg, long relative_satoshis_arg, int funding_feerate_perkw_arg, int locktime_arg, byte[] funding_pubkey_arg) { + long ret = bindings.Splice_new(channel_id_arg.ptr, InternalUtils.check_arr_len(chain_hash_arg, 32), relative_satoshis_arg, funding_feerate_perkw_arg, locktime_arg, InternalUtils.check_arr_len(funding_pubkey_arg, 33)); Reference.reachabilityFence(channel_id_arg); Reference.reachabilityFence(chain_hash_arg); Reference.reachabilityFence(relative_satoshis_arg); @@ -144,6 +148,7 @@ public class Splice extends CommonBase { if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Splice ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Splice(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); }; return ret_hu_conv; } @@ -171,7 +176,7 @@ public class Splice extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.Splice b) { - boolean ret = bindings.Splice_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.Splice_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/SpliceAck.java b/src/main/java/org/ldk/structs/SpliceAck.java index c0519f6b..5de9488e 100644 --- a/src/main/java/org/ldk/structs/SpliceAck.java +++ b/src/main/java/org/ldk/structs/SpliceAck.java @@ -23,19 +23,23 @@ public class SpliceAck extends CommonBase { /** * The channel ID where splicing is intended */ - public byte[] get_channel_id() { - byte[] ret = bindings.SpliceAck_get_channel_id(this.ptr); + public ChannelId get_channel_id() { + long ret = bindings.SpliceAck_get_channel_id(this.ptr); Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** * The channel ID where splicing is intended */ - public void set_channel_id(byte[] val) { - bindings.SpliceAck_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.SpliceAck_set_channel_id(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** @@ -97,8 +101,8 @@ public class SpliceAck extends CommonBase { /** * Constructs a new SpliceAck given each field */ - public static SpliceAck of(byte[] channel_id_arg, byte[] chain_hash_arg, long relative_satoshis_arg, byte[] funding_pubkey_arg) { - long ret = bindings.SpliceAck_new(InternalUtils.check_arr_len(channel_id_arg, 32), InternalUtils.check_arr_len(chain_hash_arg, 32), relative_satoshis_arg, InternalUtils.check_arr_len(funding_pubkey_arg, 33)); + public static SpliceAck of(org.ldk.structs.ChannelId channel_id_arg, byte[] chain_hash_arg, long relative_satoshis_arg, byte[] funding_pubkey_arg) { + long ret = bindings.SpliceAck_new(channel_id_arg.ptr, InternalUtils.check_arr_len(chain_hash_arg, 32), relative_satoshis_arg, InternalUtils.check_arr_len(funding_pubkey_arg, 33)); Reference.reachabilityFence(channel_id_arg); Reference.reachabilityFence(chain_hash_arg); Reference.reachabilityFence(relative_satoshis_arg); @@ -106,6 +110,7 @@ public class SpliceAck extends CommonBase { if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.SpliceAck ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.SpliceAck(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); }; return ret_hu_conv; } @@ -133,7 +138,7 @@ public class SpliceAck extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.SpliceAck b) { - boolean ret = bindings.SpliceAck_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.SpliceAck_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/SpliceLocked.java b/src/main/java/org/ldk/structs/SpliceLocked.java index c36c7291..84233bc5 100644 --- a/src/main/java/org/ldk/structs/SpliceLocked.java +++ b/src/main/java/org/ldk/structs/SpliceLocked.java @@ -23,30 +23,35 @@ public class SpliceLocked extends CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { - byte[] ret = bindings.SpliceLocked_get_channel_id(this.ptr); + public ChannelId get_channel_id() { + long ret = bindings.SpliceLocked_get_channel_id(this.ptr); Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.SpliceLocked_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.SpliceLocked_set_channel_id(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** * Constructs a new SpliceLocked given each field */ - public static SpliceLocked of(byte[] channel_id_arg) { - long ret = bindings.SpliceLocked_new(InternalUtils.check_arr_len(channel_id_arg, 32)); + public static SpliceLocked of(org.ldk.structs.ChannelId channel_id_arg) { + long ret = bindings.SpliceLocked_new(channel_id_arg.ptr); Reference.reachabilityFence(channel_id_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.SpliceLocked ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.SpliceLocked(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); }; return ret_hu_conv; } @@ -74,7 +79,7 @@ public class SpliceLocked extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.SpliceLocked b) { - boolean ret = bindings.SpliceLocked_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.SpliceLocked_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/StaticPaymentOutputDescriptor.java b/src/main/java/org/ldk/structs/StaticPaymentOutputDescriptor.java index 356bc045..4a82daa9 100644 --- a/src/main/java/org/ldk/structs/StaticPaymentOutputDescriptor.java +++ b/src/main/java/org/ldk/structs/StaticPaymentOutputDescriptor.java @@ -38,7 +38,7 @@ public class StaticPaymentOutputDescriptor extends CommonBase { * The outpoint which is spendable. */ public void set_outpoint(org.ldk.structs.OutPoint val) { - bindings.StaticPaymentOutputDescriptor_set_outpoint(this.ptr, val == null ? 0 : val.ptr); + bindings.StaticPaymentOutputDescriptor_set_outpoint(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -141,7 +141,7 @@ public class StaticPaymentOutputDescriptor extends CommonBase { * Note that channel_transaction_parameters_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ public static StaticPaymentOutputDescriptor of(org.ldk.structs.OutPoint outpoint_arg, org.ldk.structs.TxOut output_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg, @Nullable org.ldk.structs.ChannelTransactionParameters channel_transaction_parameters_arg) { - long ret = bindings.StaticPaymentOutputDescriptor_new(outpoint_arg == null ? 0 : outpoint_arg.ptr, output_arg.ptr, InternalUtils.check_arr_len(channel_keys_id_arg, 32), channel_value_satoshis_arg, channel_transaction_parameters_arg == null ? 0 : channel_transaction_parameters_arg.ptr); + long ret = bindings.StaticPaymentOutputDescriptor_new(outpoint_arg.ptr, output_arg.ptr, InternalUtils.check_arr_len(channel_keys_id_arg, 32), channel_value_satoshis_arg, channel_transaction_parameters_arg == null ? 0 : channel_transaction_parameters_arg.ptr); Reference.reachabilityFence(outpoint_arg); Reference.reachabilityFence(output_arg); Reference.reachabilityFence(channel_keys_id_arg); @@ -191,7 +191,7 @@ public class StaticPaymentOutputDescriptor extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.StaticPaymentOutputDescriptor b) { - boolean ret = bindings.StaticPaymentOutputDescriptor_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.StaticPaymentOutputDescriptor_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/Stfu.java b/src/main/java/org/ldk/structs/Stfu.java index be437225..2fd33917 100644 --- a/src/main/java/org/ldk/structs/Stfu.java +++ b/src/main/java/org/ldk/structs/Stfu.java @@ -23,19 +23,23 @@ public class Stfu extends CommonBase { /** * The channel ID where quiescence is intended */ - public byte[] get_channel_id() { - byte[] ret = bindings.Stfu_get_channel_id(this.ptr); + public ChannelId get_channel_id() { + long ret = bindings.Stfu_get_channel_id(this.ptr); Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** * The channel ID where quiescence is intended */ - public void set_channel_id(byte[] val) { - bindings.Stfu_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.Stfu_set_channel_id(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** @@ -59,13 +63,14 @@ public class Stfu extends CommonBase { /** * Constructs a new Stfu given each field */ - public static Stfu of(byte[] channel_id_arg, byte initiator_arg) { - long ret = bindings.Stfu_new(InternalUtils.check_arr_len(channel_id_arg, 32), initiator_arg); + public static Stfu of(org.ldk.structs.ChannelId channel_id_arg, byte initiator_arg) { + long ret = bindings.Stfu_new(channel_id_arg.ptr, initiator_arg); Reference.reachabilityFence(channel_id_arg); Reference.reachabilityFence(initiator_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Stfu ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Stfu(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); }; return ret_hu_conv; } @@ -93,7 +98,7 @@ public class Stfu extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.Stfu b) { - boolean ret = bindings.Stfu_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.Stfu_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.java b/src/main/java/org/ldk/structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.java index 84ee50f9..1af008aa 100644 --- a/src/main/java/org/ldk/structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.java +++ b/src/main/java/org/ldk/structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.java @@ -79,7 +79,7 @@ public class ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ extends C * Creates a new C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ from the contained elements. */ public static ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ of(org.ldk.structs.ChannelAnnouncement a, org.ldk.structs.ChannelUpdate b, org.ldk.structs.ChannelUpdate c) { - long ret = bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a == null ? 0 : a.ptr, b == null ? 0 : b.ptr, c == null ? 0 : c.ptr); + long ret = bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a.ptr, b.ptr, c.ptr); Reference.reachabilityFence(a); Reference.reachabilityFence(b); Reference.reachabilityFence(c); diff --git a/src/main/java/org/ldk/structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.java b/src/main/java/org/ldk/structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.java index 65ae23c5..5249a09c 100644 --- a/src/main/java/org/ldk/structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.java +++ b/src/main/java/org/ldk/structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.java @@ -79,7 +79,7 @@ public class ThreeTuple_OffersMessageDestinationBlindedPathZ extends CommonBase * Creates a new C3Tuple_OffersMessageDestinationBlindedPathZ from the contained elements. */ public static ThreeTuple_OffersMessageDestinationBlindedPathZ of(org.ldk.structs.OffersMessage a, org.ldk.structs.Destination b, org.ldk.structs.BlindedPath c) { - long ret = bindings.C3Tuple_OffersMessageDestinationBlindedPathZ_new(a.ptr, b.ptr, c == null ? 0 : c.ptr); + long ret = bindings.C3Tuple_OffersMessageDestinationBlindedPathZ_new(a.ptr, b.ptr, c.ptr); Reference.reachabilityFence(a); Reference.reachabilityFence(b); Reference.reachabilityFence(c); diff --git a/src/main/java/org/ldk/structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.java b/src/main/java/org/ldk/structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.java index f9c41bf6..fb0341ec 100644 --- a/src/main/java/org/ldk/structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.java +++ b/src/main/java/org/ldk/structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.java @@ -79,7 +79,7 @@ public class ThreeTuple_OnionMessageContentsDestinationBlindedPathZ extends Comm * Creates a new C3Tuple_OnionMessageContentsDestinationBlindedPathZ from the contained elements. */ public static ThreeTuple_OnionMessageContentsDestinationBlindedPathZ of(org.ldk.structs.OnionMessageContents a, org.ldk.structs.Destination b, org.ldk.structs.BlindedPath c) { - long ret = bindings.C3Tuple_OnionMessageContentsDestinationBlindedPathZ_new(a.ptr, b.ptr, c == null ? 0 : c.ptr); + long ret = bindings.C3Tuple_OnionMessageContentsDestinationBlindedPathZ_new(a.ptr, b.ptr, c.ptr); Reference.reachabilityFence(a); Reference.reachabilityFence(b); Reference.reachabilityFence(c); diff --git a/src/main/java/org/ldk/structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.java b/src/main/java/org/ldk/structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.java deleted file mode 100644 index 0b7ac8c0..00000000 --- a/src/main/java/org/ldk/structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.java +++ /dev/null @@ -1,96 +0,0 @@ -package org.ldk.structs; - -import org.ldk.impl.bindings; -import org.ldk.enums.*; -import org.ldk.util.*; -import java.util.Arrays; -import java.lang.ref.Reference; -import javax.annotation.Nullable; - - -/** - * A Tuple - */ -@SuppressWarnings("unchecked") // We correctly assign various generic arrays -public class ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ extends CommonBase { - ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ(Object _dummy, long ptr) { super(ptr); } - @Override @SuppressWarnings("deprecation") - protected void finalize() throws Throwable { - super.finalize(); - if (ptr != 0) { bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(ptr); } - } - - /** - * - */ - public OutPoint get_a() { - long ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(this.ptr); - Reference.reachabilityFence(this); - if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.OutPoint ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OutPoint(null, ret); } - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; - return ret_hu_conv; - } - - /** - * - */ - public MonitorEvent[] get_b() { - long[] ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(this.ptr); - Reference.reachabilityFence(this); - int ret_conv_14_len = ret.length; - MonitorEvent[] ret_conv_14_arr = new MonitorEvent[ret_conv_14_len]; - for (int o = 0; o < ret_conv_14_len; o++) { - long ret_conv_14 = ret[o]; - org.ldk.structs.MonitorEvent ret_conv_14_hu_conv = org.ldk.structs.MonitorEvent.constr_from_ptr(ret_conv_14); - if (ret_conv_14_hu_conv != null) { ret_conv_14_hu_conv.ptrs_to.add(this); }; - ret_conv_14_arr[o] = ret_conv_14_hu_conv; - } - return ret_conv_14_arr; - } - - /** - * - */ - public byte[] get_c() { - byte[] ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - long clone_ptr() { - long ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * Creates a new tuple which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. - */ - public ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ clone() { - long ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(this.ptr); - Reference.reachabilityFence(this); - if (ret >= 0 && ret <= 4096) { return null; } - ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ ret_hu_conv = new ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ(null, ret); - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; - return ret_hu_conv; - } - - /** - * Creates a new C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ from the contained elements. - */ - public static ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ of(org.ldk.structs.OutPoint a, MonitorEvent[] b, byte[] c) { - long ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(a == null ? 0 : a.ptr, b != null ? Arrays.stream(b).mapToLong(b_conv_14 -> b_conv_14.ptr).toArray() : null, InternalUtils.check_arr_len(c, 33)); - Reference.reachabilityFence(a); - Reference.reachabilityFence(b); - Reference.reachabilityFence(c); - if (ret >= 0 && ret <= 4096) { return null; } - ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ ret_hu_conv = new ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ(null, ret); - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(a); }; - for (MonitorEvent b_conv_14: b) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b_conv_14); }; }; - return ret_hu_conv; - } - -} diff --git a/src/main/java/org/ldk/structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.java b/src/main/java/org/ldk/structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.java index da6d5a6f..16877fcc 100644 --- a/src/main/java/org/ldk/structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.java +++ b/src/main/java/org/ldk/structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.java @@ -76,7 +76,7 @@ public class ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ exten * Creates a new C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ from the contained elements. */ public static ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ of(byte[] a, org.ldk.structs.OnionMessage b, org.ldk.structs.Option_CVec_SocketAddressZZ c) { - long ret = bindings.C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_new(InternalUtils.check_arr_len(a, 33), b == null ? 0 : b.ptr, c.ptr); + long ret = bindings.C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_new(InternalUtils.check_arr_len(a, 33), b.ptr, c.ptr); Reference.reachabilityFence(a); Reference.reachabilityFence(b); Reference.reachabilityFence(c); diff --git a/src/main/java/org/ldk/structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.java b/src/main/java/org/ldk/structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.java index 87d63450..b90d91e1 100644 --- a/src/main/java/org/ldk/structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.java +++ b/src/main/java/org/ldk/structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.java @@ -76,7 +76,7 @@ public class ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ extends Com * Creates a new C3Tuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ from the contained elements. */ public static ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ of(org.ldk.structs.RawBolt11Invoice a, byte[] b, org.ldk.structs.Bolt11InvoiceSignature c) { - long ret = bindings.C3Tuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ_new(a == null ? 0 : a.ptr, InternalUtils.check_arr_len(b, 32), c == null ? 0 : c.ptr); + long ret = bindings.C3Tuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ_new(a.ptr, InternalUtils.check_arr_len(b, 32), c.ptr); Reference.reachabilityFence(a); Reference.reachabilityFence(b); Reference.reachabilityFence(c); diff --git a/src/main/java/org/ldk/structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.java b/src/main/java/org/ldk/structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.java index 127a868c..936d75ae 100644 --- a/src/main/java/org/ldk/structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.java +++ b/src/main/java/org/ldk/structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.java @@ -76,7 +76,7 @@ public class ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ exten * Creates a new C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ from the contained elements. */ public static ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ of(byte[] a, org.ldk.structs.RecipientOnionFields b, org.ldk.structs.RouteParameters c) { - long ret = bindings.C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new(InternalUtils.check_arr_len(a, 32), b == null ? 0 : b.ptr, c == null ? 0 : c.ptr); + long ret = bindings.C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new(InternalUtils.check_arr_len(a, 32), b.ptr, c.ptr); Reference.reachabilityFence(a); Reference.reachabilityFence(b); Reference.reachabilityFence(c); diff --git a/src/main/java/org/ldk/structs/TrackedSpendableOutput.java b/src/main/java/org/ldk/structs/TrackedSpendableOutput.java new file mode 100644 index 00000000..5cd542a2 --- /dev/null +++ b/src/main/java/org/ldk/structs/TrackedSpendableOutput.java @@ -0,0 +1,182 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + + +/** + * The state of a spendable output currently tracked by an [`OutputSweeper`]. + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class TrackedSpendableOutput extends CommonBase { + TrackedSpendableOutput(Object _dummy, long ptr) { super(ptr); } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + if (ptr != 0) { bindings.TrackedSpendableOutput_free(ptr); } + } + + /** + * The tracked output descriptor. + */ + public SpendableOutputDescriptor get_descriptor() { + long ret = bindings.TrackedSpendableOutput_get_descriptor(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.SpendableOutputDescriptor ret_hu_conv = org.ldk.structs.SpendableOutputDescriptor.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * The tracked output descriptor. + */ + public void set_descriptor(org.ldk.structs.SpendableOutputDescriptor val) { + bindings.TrackedSpendableOutput_set_descriptor(this.ptr, val.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; + } + + /** + * The channel this output belongs to. + * + * Will be `None` if no `channel_id` was given to [`OutputSweeper::track_spendable_outputs`] + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + @Nullable + public ChannelId get_channel_id() { + long ret = bindings.TrackedSpendableOutput_get_channel_id(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * The channel this output belongs to. + * + * Will be `None` if no `channel_id` was given to [`OutputSweeper::track_spendable_outputs`] + * + * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public void set_channel_id(@Nullable org.ldk.structs.ChannelId val) { + bindings.TrackedSpendableOutput_set_channel_id(this.ptr, val == null ? 0 : val.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; + } + + /** + * The current status of the output spend. + */ + public OutputSpendStatus get_status() { + long ret = bindings.TrackedSpendableOutput_get_status(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OutputSpendStatus ret_hu_conv = org.ldk.structs.OutputSpendStatus.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * The current status of the output spend. + */ + public void set_status(org.ldk.structs.OutputSpendStatus val) { + bindings.TrackedSpendableOutput_set_status(this.ptr, val.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; + } + + /** + * Constructs a new TrackedSpendableOutput given each field + * + * Note that channel_id_arg (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public static TrackedSpendableOutput of(org.ldk.structs.SpendableOutputDescriptor descriptor_arg, @Nullable org.ldk.structs.ChannelId channel_id_arg, org.ldk.structs.OutputSpendStatus status_arg) { + long ret = bindings.TrackedSpendableOutput_new(descriptor_arg.ptr, channel_id_arg == null ? 0 : channel_id_arg.ptr, status_arg.ptr); + Reference.reachabilityFence(descriptor_arg); + Reference.reachabilityFence(channel_id_arg); + Reference.reachabilityFence(status_arg); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.TrackedSpendableOutput ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TrackedSpendableOutput(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(descriptor_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(status_arg); }; + return ret_hu_conv; + } + + long clone_ptr() { + long ret = bindings.TrackedSpendableOutput_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a copy of the TrackedSpendableOutput + */ + public TrackedSpendableOutput clone() { + long ret = bindings.TrackedSpendableOutput_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.TrackedSpendableOutput ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TrackedSpendableOutput(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Checks if two TrackedSpendableOutputs contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ + public boolean eq(org.ldk.structs.TrackedSpendableOutput b) { + boolean ret = bindings.TrackedSpendableOutput_eq(this.ptr, b.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(b); + if (this != null) { this.ptrs_to.add(b); }; + return ret; + } + + @Override public boolean equals(Object o) { + if (!(o instanceof TrackedSpendableOutput)) return false; + return this.eq((TrackedSpendableOutput)o); + } + /** + * Returns whether the output is spent in the given transaction. + */ + public boolean is_spent_in(byte[] tx) { + boolean ret = bindings.TrackedSpendableOutput_is_spent_in(this.ptr, tx); + Reference.reachabilityFence(this); + Reference.reachabilityFence(tx); + return ret; + } + + /** + * Serialize the TrackedSpendableOutput object into a byte array which can be read by TrackedSpendableOutput_read + */ + public byte[] write() { + byte[] ret = bindings.TrackedSpendableOutput_write(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Read a TrackedSpendableOutput from a byte array, created by TrackedSpendableOutput_write + */ + public static Result_TrackedSpendableOutputDecodeErrorZ read(byte[] ser) { + long ret = bindings.TrackedSpendableOutput_read(ser); + Reference.reachabilityFence(ser); + if (ret >= 0 && ret <= 4096) { return null; } + Result_TrackedSpendableOutputDecodeErrorZ ret_hu_conv = Result_TrackedSpendableOutputDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/TrampolineOnionPacket.java b/src/main/java/org/ldk/structs/TrampolineOnionPacket.java new file mode 100644 index 00000000..8cb46b57 --- /dev/null +++ b/src/main/java/org/ldk/structs/TrampolineOnionPacket.java @@ -0,0 +1,168 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + + +/** + * BOLT 4 onion packet including hop data for the next peer. + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class TrampolineOnionPacket extends CommonBase { + TrampolineOnionPacket(Object _dummy, long ptr) { super(ptr); } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + if (ptr != 0) { bindings.TrampolineOnionPacket_free(ptr); } + } + + /** + * Bolt 04 version number + */ + public byte get_version() { + byte ret = bindings.TrampolineOnionPacket_get_version(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Bolt 04 version number + */ + public void set_version(byte val) { + bindings.TrampolineOnionPacket_set_version(this.ptr, val); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * A random sepc256k1 point, used to build the ECDH shared secret to decrypt hop_data + */ + public byte[] get_public_key() { + byte[] ret = bindings.TrampolineOnionPacket_get_public_key(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * A random sepc256k1 point, used to build the ECDH shared secret to decrypt hop_data + */ + public void set_public_key(byte[] val) { + bindings.TrampolineOnionPacket_set_public_key(this.ptr, InternalUtils.check_arr_len(val, 33)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * Encrypted payload for the next hop + * + * Returns a copy of the field. + */ + public byte[] get_hop_data() { + byte[] ret = bindings.TrampolineOnionPacket_get_hop_data(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Encrypted payload for the next hop + */ + public void set_hop_data(byte[] val) { + bindings.TrampolineOnionPacket_set_hop_data(this.ptr, val); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * HMAC to verify the integrity of hop_data + */ + public byte[] get_hmac() { + byte[] ret = bindings.TrampolineOnionPacket_get_hmac(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * HMAC to verify the integrity of hop_data + */ + public void set_hmac(byte[] val) { + bindings.TrampolineOnionPacket_set_hmac(this.ptr, InternalUtils.check_arr_len(val, 32)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * Constructs a new TrampolineOnionPacket given each field + */ + public static TrampolineOnionPacket of(byte version_arg, byte[] public_key_arg, byte[] hop_data_arg, byte[] hmac_arg) { + long ret = bindings.TrampolineOnionPacket_new(version_arg, InternalUtils.check_arr_len(public_key_arg, 33), hop_data_arg, InternalUtils.check_arr_len(hmac_arg, 32)); + Reference.reachabilityFence(version_arg); + Reference.reachabilityFence(public_key_arg); + Reference.reachabilityFence(hop_data_arg); + Reference.reachabilityFence(hmac_arg); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.TrampolineOnionPacket ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TrampolineOnionPacket(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + + long clone_ptr() { + long ret = bindings.TrampolineOnionPacket_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a copy of the TrampolineOnionPacket + */ + public TrampolineOnionPacket clone() { + long ret = bindings.TrampolineOnionPacket_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.TrampolineOnionPacket ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TrampolineOnionPacket(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Generates a non-cryptographic 64-bit hash of the TrampolineOnionPacket. + */ + public long hash() { + long ret = bindings.TrampolineOnionPacket_hash(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + @Override public int hashCode() { + return (int)this.hash(); + } + /** + * Checks if two TrampolineOnionPackets contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ + public boolean eq(org.ldk.structs.TrampolineOnionPacket b) { + boolean ret = bindings.TrampolineOnionPacket_eq(this.ptr, b.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(b); + if (this != null) { this.ptrs_to.add(b); }; + return ret; + } + + @Override public boolean equals(Object o) { + if (!(o instanceof TrampolineOnionPacket)) return false; + return this.eq((TrampolineOnionPacket)o); + } + /** + * Serialize the TrampolineOnionPacket object into a byte array which can be read by TrampolineOnionPacket_read + */ + public byte[] write() { + byte[] ret = bindings.TrampolineOnionPacket_write(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + +} diff --git a/src/main/java/org/ldk/structs/TransactionU16LenLimited.java b/src/main/java/org/ldk/structs/TransactionU16LenLimited.java index ae82f09f..67fac554 100644 --- a/src/main/java/org/ldk/structs/TransactionU16LenLimited.java +++ b/src/main/java/org/ldk/structs/TransactionU16LenLimited.java @@ -59,7 +59,7 @@ public class TransactionU16LenLimited extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.TransactionU16LenLimited b) { - boolean ret = bindings.TransactionU16LenLimited_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.TransactionU16LenLimited_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; @@ -92,6 +92,15 @@ public class TransactionU16LenLimited extends CommonBase { return ret; } + /** + * Returns a reference to the contained `Transaction` + */ + public byte[] as_transaction() { + byte[] ret = bindings.TransactionU16LenLimited_as_transaction(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + /** * Serialize the TransactionU16LenLimited object into a byte array which can be read by TransactionU16LenLimited_read */ diff --git a/src/main/java/org/ldk/structs/TrustedCommitmentTransaction.java b/src/main/java/org/ldk/structs/TrustedCommitmentTransaction.java index 9e7aa762..7dbc8369 100644 --- a/src/main/java/org/ldk/structs/TrustedCommitmentTransaction.java +++ b/src/main/java/org/ldk/structs/TrustedCommitmentTransaction.java @@ -79,7 +79,7 @@ public class TrustedCommitmentTransaction extends CommonBase { * This function is only valid in the holder commitment context, it always uses EcdsaSighashType::All. */ public Result_CVec_ECDSASignatureZNoneZ get_htlc_sigs(byte[] htlc_base_key, org.ldk.structs.DirectedChannelTransactionParameters channel_parameters, org.ldk.structs.EntropySource entropy_source) { - long ret = bindings.TrustedCommitmentTransaction_get_htlc_sigs(this.ptr, InternalUtils.check_arr_len(htlc_base_key, 32), channel_parameters == null ? 0 : channel_parameters.ptr, entropy_source.ptr); + long ret = bindings.TrustedCommitmentTransaction_get_htlc_sigs(this.ptr, InternalUtils.check_arr_len(htlc_base_key, 32), channel_parameters.ptr, entropy_source.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(htlc_base_key); Reference.reachabilityFence(channel_parameters); diff --git a/src/main/java/org/ldk/structs/TwoTuple_BestBlockOutputSweeperZ.java b/src/main/java/org/ldk/structs/TwoTuple_BestBlockOutputSweeperZ.java new file mode 100644 index 00000000..d145884d --- /dev/null +++ b/src/main/java/org/ldk/structs/TwoTuple_BestBlockOutputSweeperZ.java @@ -0,0 +1,76 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + + +/** + * A Tuple + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class TwoTuple_BestBlockOutputSweeperZ extends CommonBase { + TwoTuple_BestBlockOutputSweeperZ(Object _dummy, long ptr) { super(ptr); } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + if (ptr != 0) { bindings.C2Tuple_BestBlockOutputSweeperZ_free(ptr); } + } + + /** + * + */ + public BestBlock get_a() { + long ret = bindings.C2Tuple_BestBlockOutputSweeperZ_get_a(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.BestBlock ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.BestBlock(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * + */ + public OutputSweeper get_b() { + long ret = bindings.C2Tuple_BestBlockOutputSweeperZ_get_b(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OutputSweeper ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OutputSweeper(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Creates a new C2Tuple_BestBlockOutputSweeperZ from the contained elements. + */ + public static TwoTuple_BestBlockOutputSweeperZ of(org.ldk.structs.BestBlock a, BestBlock b_best_block, BroadcasterInterface b_broadcaster, FeeEstimator b_fee_estimator, Option_FilterZ b_chain_data_source, OutputSpender b_output_spender, ChangeDestinationSource b_change_destination_source, KVStore b_kv_store, Logger b_logger) { + long ret = bindings.C2Tuple_BestBlockOutputSweeperZ_new(a.ptr, bindings.OutputSweeper_new(b_best_block.ptr, b_broadcaster.ptr, b_fee_estimator.ptr, b_chain_data_source.ptr, b_output_spender.ptr, b_change_destination_source.ptr, b_kv_store.ptr, b_logger.ptr)); + Reference.reachabilityFence(a); + Reference.reachabilityFence(b_best_block); + Reference.reachabilityFence(b_broadcaster); + Reference.reachabilityFence(b_fee_estimator); + Reference.reachabilityFence(b_chain_data_source); + Reference.reachabilityFence(b_output_spender); + Reference.reachabilityFence(b_change_destination_source); + Reference.reachabilityFence(b_kv_store); + Reference.reachabilityFence(b_logger); + if (ret >= 0 && ret <= 4096) { return null; } + TwoTuple_BestBlockOutputSweeperZ ret_hu_conv = new TwoTuple_BestBlockOutputSweeperZ(null, ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(a); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b_best_block); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b_broadcaster); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b_fee_estimator); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b_chain_data_source); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b_output_spender); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b_change_destination_source); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b_kv_store); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b_logger); }; + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/TwoTuple_BlindedPayInfoBlindedPathZ.java b/src/main/java/org/ldk/structs/TwoTuple_BlindedPayInfoBlindedPathZ.java index 4ae37499..ff721e1a 100644 --- a/src/main/java/org/ldk/structs/TwoTuple_BlindedPayInfoBlindedPathZ.java +++ b/src/main/java/org/ldk/structs/TwoTuple_BlindedPayInfoBlindedPathZ.java @@ -67,7 +67,7 @@ public class TwoTuple_BlindedPayInfoBlindedPathZ extends CommonBase { * Creates a new C2Tuple_BlindedPayInfoBlindedPathZ from the contained elements. */ public static TwoTuple_BlindedPayInfoBlindedPathZ of(org.ldk.structs.BlindedPayInfo a, org.ldk.structs.BlindedPath b) { - long ret = bindings.C2Tuple_BlindedPayInfoBlindedPathZ_new(a == null ? 0 : a.ptr, b == null ? 0 : b.ptr); + long ret = bindings.C2Tuple_BlindedPayInfoBlindedPathZ_new(a.ptr, b.ptr); Reference.reachabilityFence(a); Reference.reachabilityFence(b); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/src/main/java/org/ldk/structs/TwoTuple_ChannelIdPublicKeyZ.java b/src/main/java/org/ldk/structs/TwoTuple_ChannelIdPublicKeyZ.java new file mode 100644 index 00000000..c65fa928 --- /dev/null +++ b/src/main/java/org/ldk/structs/TwoTuple_ChannelIdPublicKeyZ.java @@ -0,0 +1,77 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + + +/** + * A Tuple + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class TwoTuple_ChannelIdPublicKeyZ extends CommonBase { + TwoTuple_ChannelIdPublicKeyZ(Object _dummy, long ptr) { super(ptr); } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + if (ptr != 0) { bindings.C2Tuple_ChannelIdPublicKeyZ_free(ptr); } + } + + /** + * + */ + public ChannelId get_a() { + long ret = bindings.C2Tuple_ChannelIdPublicKeyZ_get_a(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * + */ + public byte[] get_b() { + byte[] ret = bindings.C2Tuple_ChannelIdPublicKeyZ_get_b(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + long clone_ptr() { + long ret = bindings.C2Tuple_ChannelIdPublicKeyZ_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a new tuple which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public TwoTuple_ChannelIdPublicKeyZ clone() { + long ret = bindings.C2Tuple_ChannelIdPublicKeyZ_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + TwoTuple_ChannelIdPublicKeyZ ret_hu_conv = new TwoTuple_ChannelIdPublicKeyZ(null, ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Creates a new C2Tuple_ChannelIdPublicKeyZ from the contained elements. + */ + public static TwoTuple_ChannelIdPublicKeyZ of(org.ldk.structs.ChannelId a, byte[] b) { + long ret = bindings.C2Tuple_ChannelIdPublicKeyZ_new(a.ptr, InternalUtils.check_arr_len(b, 33)); + Reference.reachabilityFence(a); + Reference.reachabilityFence(b); + if (ret >= 0 && ret <= 4096) { return null; } + TwoTuple_ChannelIdPublicKeyZ ret_hu_conv = new TwoTuple_ChannelIdPublicKeyZ(null, ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(a); }; + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.java b/src/main/java/org/ldk/structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.java index 6fe50d48..4dffe524 100644 --- a/src/main/java/org/ldk/structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.java +++ b/src/main/java/org/ldk/structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.java @@ -72,7 +72,7 @@ public class TwoTuple_OutPointCVec_MonitorUpdateIdZZ extends CommonBase { * Creates a new C2Tuple_OutPointCVec_MonitorUpdateIdZZ from the contained elements. */ public static TwoTuple_OutPointCVec_MonitorUpdateIdZZ of(org.ldk.structs.OutPoint a, MonitorUpdateId[] b) { - long ret = bindings.C2Tuple_OutPointCVec_MonitorUpdateIdZZ_new(a == null ? 0 : a.ptr, b != null ? Arrays.stream(b).mapToLong(b_conv_17 -> b_conv_17 == null ? 0 : b_conv_17.ptr).toArray() : null); + long ret = bindings.C2Tuple_OutPointCVec_MonitorUpdateIdZZ_new(a.ptr, b != null ? Arrays.stream(b).mapToLong(b_conv_17 -> b_conv_17.ptr).toArray() : null); Reference.reachabilityFence(a); Reference.reachabilityFence(b); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/src/main/java/org/ldk/structs/TwoTuple_OutPointCVec_u8ZZ.java b/src/main/java/org/ldk/structs/TwoTuple_OutPointCVec_u8ZZ.java index e8024d5e..ed0db076 100644 --- a/src/main/java/org/ldk/structs/TwoTuple_OutPointCVec_u8ZZ.java +++ b/src/main/java/org/ldk/structs/TwoTuple_OutPointCVec_u8ZZ.java @@ -64,7 +64,7 @@ public class TwoTuple_OutPointCVec_u8ZZ extends CommonBase { * Creates a new C2Tuple_OutPointCVec_u8ZZ from the contained elements. */ public static TwoTuple_OutPointCVec_u8ZZ of(org.ldk.structs.OutPoint a, byte[] b) { - long ret = bindings.C2Tuple_OutPointCVec_u8ZZ_new(a == null ? 0 : a.ptr, b); + long ret = bindings.C2Tuple_OutPointCVec_u8ZZ_new(a.ptr, b); Reference.reachabilityFence(a); Reference.reachabilityFence(b); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/src/main/java/org/ldk/structs/TwoTuple_OutPointChannelIdZ.java b/src/main/java/org/ldk/structs/TwoTuple_OutPointChannelIdZ.java new file mode 100644 index 00000000..04e38fc0 --- /dev/null +++ b/src/main/java/org/ldk/structs/TwoTuple_OutPointChannelIdZ.java @@ -0,0 +1,81 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + + +/** + * A Tuple + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class TwoTuple_OutPointChannelIdZ extends CommonBase { + TwoTuple_OutPointChannelIdZ(Object _dummy, long ptr) { super(ptr); } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + if (ptr != 0) { bindings.C2Tuple_OutPointChannelIdZ_free(ptr); } + } + + /** + * + */ + public OutPoint get_a() { + long ret = bindings.C2Tuple_OutPointChannelIdZ_get_a(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OutPoint ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OutPoint(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * + */ + public ChannelId get_b() { + long ret = bindings.C2Tuple_OutPointChannelIdZ_get_b(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + long clone_ptr() { + long ret = bindings.C2Tuple_OutPointChannelIdZ_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a new tuple which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public TwoTuple_OutPointChannelIdZ clone() { + long ret = bindings.C2Tuple_OutPointChannelIdZ_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + TwoTuple_OutPointChannelIdZ ret_hu_conv = new TwoTuple_OutPointChannelIdZ(null, ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Creates a new C2Tuple_OutPointChannelIdZ from the contained elements. + */ + public static TwoTuple_OutPointChannelIdZ of(org.ldk.structs.OutPoint a, org.ldk.structs.ChannelId b) { + long ret = bindings.C2Tuple_OutPointChannelIdZ_new(a.ptr, b.ptr); + Reference.reachabilityFence(a); + Reference.reachabilityFence(b); + if (ret >= 0 && ret <= 4096) { return null; } + TwoTuple_OutPointChannelIdZ ret_hu_conv = new TwoTuple_OutPointChannelIdZ(null, ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(a); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b); }; + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.java b/src/main/java/org/ldk/structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.java deleted file mode 100644 index 75f709a9..00000000 --- a/src/main/java/org/ldk/structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.java +++ /dev/null @@ -1,77 +0,0 @@ -package org.ldk.structs; - -import org.ldk.impl.bindings; -import org.ldk.enums.*; -import org.ldk.util.*; -import java.util.Arrays; -import java.lang.ref.Reference; -import javax.annotation.Nullable; - - -/** - * A Tuple - */ -@SuppressWarnings("unchecked") // We correctly assign various generic arrays -public class TwoTuple_PublicKeyCOption_SocketAddressZZ extends CommonBase { - TwoTuple_PublicKeyCOption_SocketAddressZZ(Object _dummy, long ptr) { super(ptr); } - @Override @SuppressWarnings("deprecation") - protected void finalize() throws Throwable { - super.finalize(); - if (ptr != 0) { bindings.C2Tuple_PublicKeyCOption_SocketAddressZZ_free(ptr); } - } - - /** - * - */ - public byte[] get_a() { - byte[] ret = bindings.C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * - */ - public Option_SocketAddressZ get_b() { - long ret = bindings.C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(this.ptr); - Reference.reachabilityFence(this); - if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Option_SocketAddressZ ret_hu_conv = org.ldk.structs.Option_SocketAddressZ.constr_from_ptr(ret); - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; - return ret_hu_conv; - } - - long clone_ptr() { - long ret = bindings.C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * Creates a new tuple which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. - */ - public TwoTuple_PublicKeyCOption_SocketAddressZZ clone() { - long ret = bindings.C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(this.ptr); - Reference.reachabilityFence(this); - if (ret >= 0 && ret <= 4096) { return null; } - TwoTuple_PublicKeyCOption_SocketAddressZZ ret_hu_conv = new TwoTuple_PublicKeyCOption_SocketAddressZZ(null, ret); - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; - return ret_hu_conv; - } - - /** - * Creates a new C2Tuple_PublicKeyCOption_SocketAddressZZ from the contained elements. - */ - public static TwoTuple_PublicKeyCOption_SocketAddressZZ of(byte[] a, org.ldk.structs.Option_SocketAddressZ b) { - long ret = bindings.C2Tuple_PublicKeyCOption_SocketAddressZZ_new(InternalUtils.check_arr_len(a, 33), b.ptr); - Reference.reachabilityFence(a); - Reference.reachabilityFence(b); - if (ret >= 0 && ret <= 4096) { return null; } - TwoTuple_PublicKeyCOption_SocketAddressZZ ret_hu_conv = new TwoTuple_PublicKeyCOption_SocketAddressZZ(null, ret); - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b); }; - return ret_hu_conv; - } - -} diff --git a/src/main/java/org/ldk/structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.java b/src/main/java/org/ldk/structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.java index 6d3dcc75..6ebba4eb 100644 --- a/src/main/java/org/ldk/structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.java +++ b/src/main/java/org/ldk/structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.java @@ -69,7 +69,7 @@ public class TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ extends CommonBa * Creates a new C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ from the contained elements. */ public static TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ of(byte[] a, TwoTuple_u32CVec_u8ZZ[] b) { - long ret = bindings.C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ_new(InternalUtils.check_arr_len(a, 32), b != null ? Arrays.stream(b).mapToLong(b_conv_23 -> b_conv_23 != null ? b_conv_23.ptr : 0).toArray() : null); + long ret = bindings.C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ_new(InternalUtils.check_arr_len(a, 32), b != null ? Arrays.stream(b).mapToLong(b_conv_23 -> b_conv_23.ptr).toArray() : null); Reference.reachabilityFence(a); Reference.reachabilityFence(b); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/src/main/java/org/ldk/structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.java b/src/main/java/org/ldk/structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.java index e2e9d499..fba1e343 100644 --- a/src/main/java/org/ldk/structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.java +++ b/src/main/java/org/ldk/structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.java @@ -69,7 +69,7 @@ public class TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ extends CommonBase * Creates a new C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ from the contained elements. */ public static TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ of(byte[] a, TwoTuple_u32TxOutZ[] b) { - long ret = bindings.C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ_new(InternalUtils.check_arr_len(a, 32), b != null ? Arrays.stream(b).mapToLong(b_conv_20 -> b_conv_20 != null ? b_conv_20.ptr : 0).toArray() : null); + long ret = bindings.C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ_new(InternalUtils.check_arr_len(a, 32), b != null ? Arrays.stream(b).mapToLong(b_conv_20 -> b_conv_20.ptr).toArray() : null); Reference.reachabilityFence(a); Reference.reachabilityFence(b); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/src/main/java/org/ldk/structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.java b/src/main/java/org/ldk/structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.java index c13a92fa..843865b2 100644 --- a/src/main/java/org/ldk/structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.java +++ b/src/main/java/org/ldk/structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.java @@ -45,7 +45,7 @@ public class TwoTuple_ThirtyTwoBytesChannelManagerZ extends CommonBase { * Creates a new C2Tuple_ThirtyTwoBytesChannelManagerZ from the contained elements. */ public static TwoTuple_ThirtyTwoBytesChannelManagerZ of(byte[] a, FeeEstimator b_fee_est, Watch b_chain_monitor, BroadcasterInterface b_tx_broadcaster, Router b_router, Logger b_logger, EntropySource b_entropy_source, NodeSigner b_node_signer, SignerProvider b_signer_provider, UserConfig b_config, ChainParameters b_params, int b_current_timestamp) { - long ret = bindings.C2Tuple_ThirtyTwoBytesChannelManagerZ_new(InternalUtils.check_arr_len(a, 32), bindings.ChannelManager_new(b_fee_est.ptr, b_chain_monitor.ptr, b_tx_broadcaster.ptr, b_router.ptr, b_logger.ptr, b_entropy_source.ptr, b_node_signer.ptr, b_signer_provider.ptr, b_config == null ? 0 : b_config.ptr, b_params == null ? 0 : b_params.ptr, b_current_timestamp)); + long ret = bindings.C2Tuple_ThirtyTwoBytesChannelManagerZ_new(InternalUtils.check_arr_len(a, 32), bindings.ChannelManager_new(b_fee_est.ptr, b_chain_monitor.ptr, b_tx_broadcaster.ptr, b_router.ptr, b_logger.ptr, b_entropy_source.ptr, b_node_signer.ptr, b_signer_provider.ptr, b_config.ptr, b_params.ptr, b_current_timestamp)); Reference.reachabilityFence(a); Reference.reachabilityFence(b_fee_est); Reference.reachabilityFence(b_chain_monitor); diff --git a/src/main/java/org/ldk/structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.java b/src/main/java/org/ldk/structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.java index 87f5d6cd..78f73055 100644 --- a/src/main/java/org/ldk/structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.java +++ b/src/main/java/org/ldk/structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.java @@ -64,7 +64,7 @@ public class TwoTuple_ThirtyTwoBytesChannelMonitorZ extends CommonBase { * Creates a new C2Tuple_ThirtyTwoBytesChannelMonitorZ from the contained elements. */ public static TwoTuple_ThirtyTwoBytesChannelMonitorZ of(byte[] a, org.ldk.structs.ChannelMonitor b) { - long ret = bindings.C2Tuple_ThirtyTwoBytesChannelMonitorZ_new(InternalUtils.check_arr_len(a, 32), b == null ? 0 : b.ptr); + long ret = bindings.C2Tuple_ThirtyTwoBytesChannelMonitorZ_new(InternalUtils.check_arr_len(a, 32), b.ptr); Reference.reachabilityFence(a); Reference.reachabilityFence(b); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/src/main/java/org/ldk/structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.java b/src/main/java/org/ldk/structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.java deleted file mode 100644 index 991d88b4..00000000 --- a/src/main/java/org/ldk/structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.java +++ /dev/null @@ -1,73 +0,0 @@ -package org.ldk.structs; - -import org.ldk.impl.bindings; -import org.ldk.enums.*; -import org.ldk.util.*; -import java.util.Arrays; -import java.lang.ref.Reference; -import javax.annotation.Nullable; - - -/** - * A Tuple - */ -@SuppressWarnings("unchecked") // We correctly assign various generic arrays -public class TwoTuple_ThirtyTwoBytesPublicKeyZ extends CommonBase { - TwoTuple_ThirtyTwoBytesPublicKeyZ(Object _dummy, long ptr) { super(ptr); } - @Override @SuppressWarnings("deprecation") - protected void finalize() throws Throwable { - super.finalize(); - if (ptr != 0) { bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_free(ptr); } - } - - /** - * - */ - public byte[] get_a() { - byte[] ret = bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * - */ - public byte[] get_b() { - byte[] ret = bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - long clone_ptr() { - long ret = bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(this.ptr); - Reference.reachabilityFence(this); - return ret; - } - - /** - * Creates a new tuple which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. - */ - public TwoTuple_ThirtyTwoBytesPublicKeyZ clone() { - long ret = bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(this.ptr); - Reference.reachabilityFence(this); - if (ret >= 0 && ret <= 4096) { return null; } - TwoTuple_ThirtyTwoBytesPublicKeyZ ret_hu_conv = new TwoTuple_ThirtyTwoBytesPublicKeyZ(null, ret); - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; - return ret_hu_conv; - } - - /** - * Creates a new C2Tuple_ThirtyTwoBytesPublicKeyZ from the contained elements. - */ - public static TwoTuple_ThirtyTwoBytesPublicKeyZ of(byte[] a, byte[] b) { - long ret = bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_new(InternalUtils.check_arr_len(a, 32), InternalUtils.check_arr_len(b, 33)); - Reference.reachabilityFence(a); - Reference.reachabilityFence(b); - if (ret >= 0 && ret <= 4096) { return null; } - TwoTuple_ThirtyTwoBytesPublicKeyZ ret_hu_conv = new TwoTuple_ThirtyTwoBytesPublicKeyZ(null, ret); - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; - return ret_hu_conv; - } - -} diff --git a/src/main/java/org/ldk/structs/TxAbort.java b/src/main/java/org/ldk/structs/TxAbort.java index 27fb31b3..db50da5c 100644 --- a/src/main/java/org/ldk/structs/TxAbort.java +++ b/src/main/java/org/ldk/structs/TxAbort.java @@ -23,19 +23,23 @@ public class TxAbort extends CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { - byte[] ret = bindings.TxAbort_get_channel_id(this.ptr); + public ChannelId get_channel_id() { + long ret = bindings.TxAbort_get_channel_id(this.ptr); Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.TxAbort_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.TxAbort_set_channel_id(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** @@ -61,13 +65,14 @@ public class TxAbort extends CommonBase { /** * Constructs a new TxAbort given each field */ - public static TxAbort of(byte[] channel_id_arg, byte[] data_arg) { - long ret = bindings.TxAbort_new(InternalUtils.check_arr_len(channel_id_arg, 32), data_arg); + public static TxAbort of(org.ldk.structs.ChannelId channel_id_arg, byte[] data_arg) { + long ret = bindings.TxAbort_new(channel_id_arg.ptr, data_arg); Reference.reachabilityFence(channel_id_arg); Reference.reachabilityFence(data_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.TxAbort ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxAbort(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); }; return ret_hu_conv; } @@ -107,7 +112,7 @@ public class TxAbort extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.TxAbort b) { - boolean ret = bindings.TxAbort_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.TxAbort_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/TxAckRbf.java b/src/main/java/org/ldk/structs/TxAckRbf.java index 46ddf6b7..2f70fbf3 100644 --- a/src/main/java/org/ldk/structs/TxAckRbf.java +++ b/src/main/java/org/ldk/structs/TxAckRbf.java @@ -24,19 +24,23 @@ public class TxAckRbf extends CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { - byte[] ret = bindings.TxAckRbf_get_channel_id(this.ptr); + public ChannelId get_channel_id() { + long ret = bindings.TxAckRbf_get_channel_id(this.ptr); Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.TxAckRbf_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.TxAckRbf_set_channel_id(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** @@ -66,13 +70,14 @@ public class TxAckRbf extends CommonBase { /** * Constructs a new TxAckRbf given each field */ - public static TxAckRbf of(byte[] channel_id_arg, org.ldk.structs.Option_i64Z funding_output_contribution_arg) { - long ret = bindings.TxAckRbf_new(InternalUtils.check_arr_len(channel_id_arg, 32), funding_output_contribution_arg.ptr); + public static TxAckRbf of(org.ldk.structs.ChannelId channel_id_arg, org.ldk.structs.Option_i64Z funding_output_contribution_arg) { + long ret = bindings.TxAckRbf_new(channel_id_arg.ptr, funding_output_contribution_arg.ptr); Reference.reachabilityFence(channel_id_arg); Reference.reachabilityFence(funding_output_contribution_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.TxAckRbf ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxAckRbf(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(funding_output_contribution_arg); }; return ret_hu_conv; } @@ -113,7 +118,7 @@ public class TxAckRbf extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.TxAckRbf b) { - boolean ret = bindings.TxAckRbf_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.TxAckRbf_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/TxAddInput.java b/src/main/java/org/ldk/structs/TxAddInput.java index be009a87..dbe72f9c 100644 --- a/src/main/java/org/ldk/structs/TxAddInput.java +++ b/src/main/java/org/ldk/structs/TxAddInput.java @@ -23,19 +23,23 @@ public class TxAddInput extends CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { - byte[] ret = bindings.TxAddInput_get_channel_id(this.ptr); + public ChannelId get_channel_id() { + long ret = bindings.TxAddInput_get_channel_id(this.ptr); Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.TxAddInput_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.TxAddInput_set_channel_id(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** @@ -76,7 +80,7 @@ public class TxAddInput extends CommonBase { * malleable. */ public void set_prevtx(org.ldk.structs.TransactionU16LenLimited val) { - bindings.TxAddInput_set_prevtx(this.ptr, val == null ? 0 : val.ptr); + bindings.TxAddInput_set_prevtx(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -121,8 +125,8 @@ public class TxAddInput extends CommonBase { /** * Constructs a new TxAddInput given each field */ - public static TxAddInput of(byte[] channel_id_arg, long serial_id_arg, org.ldk.structs.TransactionU16LenLimited prevtx_arg, int prevtx_out_arg, int sequence_arg) { - long ret = bindings.TxAddInput_new(InternalUtils.check_arr_len(channel_id_arg, 32), serial_id_arg, prevtx_arg == null ? 0 : prevtx_arg.ptr, prevtx_out_arg, sequence_arg); + public static TxAddInput of(org.ldk.structs.ChannelId channel_id_arg, long serial_id_arg, org.ldk.structs.TransactionU16LenLimited prevtx_arg, int prevtx_out_arg, int sequence_arg) { + long ret = bindings.TxAddInput_new(channel_id_arg.ptr, serial_id_arg, prevtx_arg.ptr, prevtx_out_arg, sequence_arg); Reference.reachabilityFence(channel_id_arg); Reference.reachabilityFence(serial_id_arg); Reference.reachabilityFence(prevtx_arg); @@ -131,6 +135,7 @@ public class TxAddInput extends CommonBase { if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.TxAddInput ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxAddInput(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(prevtx_arg); }; return ret_hu_conv; } @@ -171,7 +176,7 @@ public class TxAddInput extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.TxAddInput b) { - boolean ret = bindings.TxAddInput_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.TxAddInput_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/TxAddOutput.java b/src/main/java/org/ldk/structs/TxAddOutput.java index 56bae5e6..2bd09e25 100644 --- a/src/main/java/org/ldk/structs/TxAddOutput.java +++ b/src/main/java/org/ldk/structs/TxAddOutput.java @@ -23,19 +23,23 @@ public class TxAddOutput extends CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { - byte[] ret = bindings.TxAddOutput_get_channel_id(this.ptr); + public ChannelId get_channel_id() { + long ret = bindings.TxAddOutput_get_channel_id(this.ptr); Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.TxAddOutput_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.TxAddOutput_set_channel_id(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** @@ -97,8 +101,8 @@ public class TxAddOutput extends CommonBase { /** * Constructs a new TxAddOutput given each field */ - public static TxAddOutput of(byte[] channel_id_arg, long serial_id_arg, long sats_arg, byte[] script_arg) { - long ret = bindings.TxAddOutput_new(InternalUtils.check_arr_len(channel_id_arg, 32), serial_id_arg, sats_arg, script_arg); + public static TxAddOutput of(org.ldk.structs.ChannelId channel_id_arg, long serial_id_arg, long sats_arg, byte[] script_arg) { + long ret = bindings.TxAddOutput_new(channel_id_arg.ptr, serial_id_arg, sats_arg, script_arg); Reference.reachabilityFence(channel_id_arg); Reference.reachabilityFence(serial_id_arg); Reference.reachabilityFence(sats_arg); @@ -106,6 +110,7 @@ public class TxAddOutput extends CommonBase { if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.TxAddOutput ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxAddOutput(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); }; return ret_hu_conv; } @@ -145,7 +150,7 @@ public class TxAddOutput extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.TxAddOutput b) { - boolean ret = bindings.TxAddOutput_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.TxAddOutput_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/TxComplete.java b/src/main/java/org/ldk/structs/TxComplete.java index bd5e7209..46cf83a0 100644 --- a/src/main/java/org/ldk/structs/TxComplete.java +++ b/src/main/java/org/ldk/structs/TxComplete.java @@ -24,30 +24,35 @@ public class TxComplete extends CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { - byte[] ret = bindings.TxComplete_get_channel_id(this.ptr); + public ChannelId get_channel_id() { + long ret = bindings.TxComplete_get_channel_id(this.ptr); Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.TxComplete_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.TxComplete_set_channel_id(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** * Constructs a new TxComplete given each field */ - public static TxComplete of(byte[] channel_id_arg) { - long ret = bindings.TxComplete_new(InternalUtils.check_arr_len(channel_id_arg, 32)); + public static TxComplete of(org.ldk.structs.ChannelId channel_id_arg) { + long ret = bindings.TxComplete_new(channel_id_arg.ptr); Reference.reachabilityFence(channel_id_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.TxComplete ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxComplete(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); }; return ret_hu_conv; } @@ -87,7 +92,7 @@ public class TxComplete extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.TxComplete b) { - boolean ret = bindings.TxComplete_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.TxComplete_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/TxCreationKeys.java b/src/main/java/org/ldk/structs/TxCreationKeys.java index d65e1ba8..634a8eba 100644 --- a/src/main/java/org/ldk/structs/TxCreationKeys.java +++ b/src/main/java/org/ldk/structs/TxCreationKeys.java @@ -68,7 +68,7 @@ public class TxCreationKeys extends CommonBase { * an old state. */ public void set_revocation_key(org.ldk.structs.RevocationKey val) { - bindings.TxCreationKeys_set_revocation_key(this.ptr, val == null ? 0 : val.ptr); + bindings.TxCreationKeys_set_revocation_key(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -90,7 +90,7 @@ public class TxCreationKeys extends CommonBase { * Broadcaster's HTLC Key */ public void set_broadcaster_htlc_key(org.ldk.structs.HtlcKey val) { - bindings.TxCreationKeys_set_broadcaster_htlc_key(this.ptr, val == null ? 0 : val.ptr); + bindings.TxCreationKeys_set_broadcaster_htlc_key(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -112,7 +112,7 @@ public class TxCreationKeys extends CommonBase { * Countersignatory's HTLC Key */ public void set_countersignatory_htlc_key(org.ldk.structs.HtlcKey val) { - bindings.TxCreationKeys_set_countersignatory_htlc_key(this.ptr, val == null ? 0 : val.ptr); + bindings.TxCreationKeys_set_countersignatory_htlc_key(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -134,7 +134,7 @@ public class TxCreationKeys extends CommonBase { * Broadcaster's Payment Key (which isn't allowed to be spent from for some delay) */ public void set_broadcaster_delayed_payment_key(org.ldk.structs.DelayedPaymentKey val) { - bindings.TxCreationKeys_set_broadcaster_delayed_payment_key(this.ptr, val == null ? 0 : val.ptr); + bindings.TxCreationKeys_set_broadcaster_delayed_payment_key(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -144,7 +144,7 @@ public class TxCreationKeys extends CommonBase { * Constructs a new TxCreationKeys given each field */ public static TxCreationKeys of(byte[] per_commitment_point_arg, org.ldk.structs.RevocationKey revocation_key_arg, org.ldk.structs.HtlcKey broadcaster_htlc_key_arg, org.ldk.structs.HtlcKey countersignatory_htlc_key_arg, org.ldk.structs.DelayedPaymentKey broadcaster_delayed_payment_key_arg) { - long ret = bindings.TxCreationKeys_new(InternalUtils.check_arr_len(per_commitment_point_arg, 33), revocation_key_arg == null ? 0 : revocation_key_arg.ptr, broadcaster_htlc_key_arg == null ? 0 : broadcaster_htlc_key_arg.ptr, countersignatory_htlc_key_arg == null ? 0 : countersignatory_htlc_key_arg.ptr, broadcaster_delayed_payment_key_arg == null ? 0 : broadcaster_delayed_payment_key_arg.ptr); + long ret = bindings.TxCreationKeys_new(InternalUtils.check_arr_len(per_commitment_point_arg, 33), revocation_key_arg.ptr, broadcaster_htlc_key_arg.ptr, countersignatory_htlc_key_arg.ptr, broadcaster_delayed_payment_key_arg.ptr); Reference.reachabilityFence(per_commitment_point_arg); Reference.reachabilityFence(revocation_key_arg); Reference.reachabilityFence(broadcaster_htlc_key_arg); @@ -166,7 +166,7 @@ public class TxCreationKeys extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.TxCreationKeys b) { - boolean ret = bindings.TxCreationKeys_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.TxCreationKeys_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; @@ -220,7 +220,7 @@ public class TxCreationKeys extends CommonBase { * Key set is asymmetric and can't be used as part of counter-signatory set of transactions. */ public static TxCreationKeys derive_new(byte[] per_commitment_point, org.ldk.structs.DelayedPaymentBasepoint broadcaster_delayed_payment_base, org.ldk.structs.HtlcBasepoint broadcaster_htlc_base, org.ldk.structs.RevocationBasepoint countersignatory_revocation_base, org.ldk.structs.HtlcBasepoint countersignatory_htlc_base) { - long ret = bindings.TxCreationKeys_derive_new(InternalUtils.check_arr_len(per_commitment_point, 33), broadcaster_delayed_payment_base == null ? 0 : broadcaster_delayed_payment_base.ptr, broadcaster_htlc_base == null ? 0 : broadcaster_htlc_base.ptr, countersignatory_revocation_base == null ? 0 : countersignatory_revocation_base.ptr, countersignatory_htlc_base == null ? 0 : countersignatory_htlc_base.ptr); + long ret = bindings.TxCreationKeys_derive_new(InternalUtils.check_arr_len(per_commitment_point, 33), broadcaster_delayed_payment_base.ptr, broadcaster_htlc_base.ptr, countersignatory_revocation_base.ptr, countersignatory_htlc_base.ptr); Reference.reachabilityFence(per_commitment_point); Reference.reachabilityFence(broadcaster_delayed_payment_base); Reference.reachabilityFence(broadcaster_htlc_base); @@ -241,7 +241,7 @@ public class TxCreationKeys extends CommonBase { * Key set is asymmetric and can't be used as part of counter-signatory set of transactions. */ public static TxCreationKeys from_channel_static_keys(byte[] per_commitment_point, org.ldk.structs.ChannelPublicKeys broadcaster_keys, org.ldk.structs.ChannelPublicKeys countersignatory_keys) { - long ret = bindings.TxCreationKeys_from_channel_static_keys(InternalUtils.check_arr_len(per_commitment_point, 33), broadcaster_keys == null ? 0 : broadcaster_keys.ptr, countersignatory_keys == null ? 0 : countersignatory_keys.ptr); + long ret = bindings.TxCreationKeys_from_channel_static_keys(InternalUtils.check_arr_len(per_commitment_point, 33), broadcaster_keys.ptr, countersignatory_keys.ptr); Reference.reachabilityFence(per_commitment_point); Reference.reachabilityFence(broadcaster_keys); Reference.reachabilityFence(countersignatory_keys); diff --git a/src/main/java/org/ldk/structs/TxInitRbf.java b/src/main/java/org/ldk/structs/TxInitRbf.java index ea1e7b01..59f956d6 100644 --- a/src/main/java/org/ldk/structs/TxInitRbf.java +++ b/src/main/java/org/ldk/structs/TxInitRbf.java @@ -24,19 +24,23 @@ public class TxInitRbf extends CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { - byte[] ret = bindings.TxInitRbf_get_channel_id(this.ptr); + public ChannelId get_channel_id() { + long ret = bindings.TxInitRbf_get_channel_id(this.ptr); Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.TxInitRbf_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.TxInitRbf_set_channel_id(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** @@ -102,8 +106,8 @@ public class TxInitRbf extends CommonBase { /** * Constructs a new TxInitRbf given each field */ - public static TxInitRbf of(byte[] channel_id_arg, int locktime_arg, int feerate_sat_per_1000_weight_arg, org.ldk.structs.Option_i64Z funding_output_contribution_arg) { - long ret = bindings.TxInitRbf_new(InternalUtils.check_arr_len(channel_id_arg, 32), locktime_arg, feerate_sat_per_1000_weight_arg, funding_output_contribution_arg.ptr); + public static TxInitRbf of(org.ldk.structs.ChannelId channel_id_arg, int locktime_arg, int feerate_sat_per_1000_weight_arg, org.ldk.structs.Option_i64Z funding_output_contribution_arg) { + long ret = bindings.TxInitRbf_new(channel_id_arg.ptr, locktime_arg, feerate_sat_per_1000_weight_arg, funding_output_contribution_arg.ptr); Reference.reachabilityFence(channel_id_arg); Reference.reachabilityFence(locktime_arg); Reference.reachabilityFence(feerate_sat_per_1000_weight_arg); @@ -111,6 +115,7 @@ public class TxInitRbf extends CommonBase { if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.TxInitRbf ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxInitRbf(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(funding_output_contribution_arg); }; return ret_hu_conv; } @@ -151,7 +156,7 @@ public class TxInitRbf extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.TxInitRbf b) { - boolean ret = bindings.TxInitRbf_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.TxInitRbf_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/TxRemoveInput.java b/src/main/java/org/ldk/structs/TxRemoveInput.java index da528a50..f2abf19c 100644 --- a/src/main/java/org/ldk/structs/TxRemoveInput.java +++ b/src/main/java/org/ldk/structs/TxRemoveInput.java @@ -23,19 +23,23 @@ public class TxRemoveInput extends CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { - byte[] ret = bindings.TxRemoveInput_get_channel_id(this.ptr); + public ChannelId get_channel_id() { + long ret = bindings.TxRemoveInput_get_channel_id(this.ptr); Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.TxRemoveInput_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.TxRemoveInput_set_channel_id(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** @@ -59,13 +63,14 @@ public class TxRemoveInput extends CommonBase { /** * Constructs a new TxRemoveInput given each field */ - public static TxRemoveInput of(byte[] channel_id_arg, long serial_id_arg) { - long ret = bindings.TxRemoveInput_new(InternalUtils.check_arr_len(channel_id_arg, 32), serial_id_arg); + public static TxRemoveInput of(org.ldk.structs.ChannelId channel_id_arg, long serial_id_arg) { + long ret = bindings.TxRemoveInput_new(channel_id_arg.ptr, serial_id_arg); Reference.reachabilityFence(channel_id_arg); Reference.reachabilityFence(serial_id_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.TxRemoveInput ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxRemoveInput(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); }; return ret_hu_conv; } @@ -105,7 +110,7 @@ public class TxRemoveInput extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.TxRemoveInput b) { - boolean ret = bindings.TxRemoveInput_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.TxRemoveInput_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/TxRemoveOutput.java b/src/main/java/org/ldk/structs/TxRemoveOutput.java index 70e9648f..fd6e00da 100644 --- a/src/main/java/org/ldk/structs/TxRemoveOutput.java +++ b/src/main/java/org/ldk/structs/TxRemoveOutput.java @@ -23,19 +23,23 @@ public class TxRemoveOutput extends CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { - byte[] ret = bindings.TxRemoveOutput_get_channel_id(this.ptr); + public ChannelId get_channel_id() { + long ret = bindings.TxRemoveOutput_get_channel_id(this.ptr); Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.TxRemoveOutput_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.TxRemoveOutput_set_channel_id(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** @@ -59,13 +63,14 @@ public class TxRemoveOutput extends CommonBase { /** * Constructs a new TxRemoveOutput given each field */ - public static TxRemoveOutput of(byte[] channel_id_arg, long serial_id_arg) { - long ret = bindings.TxRemoveOutput_new(InternalUtils.check_arr_len(channel_id_arg, 32), serial_id_arg); + public static TxRemoveOutput of(org.ldk.structs.ChannelId channel_id_arg, long serial_id_arg) { + long ret = bindings.TxRemoveOutput_new(channel_id_arg.ptr, serial_id_arg); Reference.reachabilityFence(channel_id_arg); Reference.reachabilityFence(serial_id_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.TxRemoveOutput ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxRemoveOutput(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); }; return ret_hu_conv; } @@ -105,7 +110,7 @@ public class TxRemoveOutput extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.TxRemoveOutput b) { - boolean ret = bindings.TxRemoveOutput_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.TxRemoveOutput_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/TxSignatures.java b/src/main/java/org/ldk/structs/TxSignatures.java index 1d7185f9..dd1eb95b 100644 --- a/src/main/java/org/ldk/structs/TxSignatures.java +++ b/src/main/java/org/ldk/structs/TxSignatures.java @@ -24,19 +24,23 @@ public class TxSignatures extends CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { - byte[] ret = bindings.TxSignatures_get_channel_id(this.ptr); + public ChannelId get_channel_id() { + long ret = bindings.TxSignatures_get_channel_id(this.ptr); Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.TxSignatures_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.TxSignatures_set_channel_id(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** @@ -77,17 +81,42 @@ public class TxSignatures extends CommonBase { Reference.reachabilityFence(val); } + /** + * Optional signature for the shared input -- the previous funding outpoint -- signed by both peers + */ + public Option_ECDSASignatureZ get_funding_outpoint_sig() { + long ret = bindings.TxSignatures_get_funding_outpoint_sig(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_ECDSASignatureZ ret_hu_conv = org.ldk.structs.Option_ECDSASignatureZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Optional signature for the shared input -- the previous funding outpoint -- signed by both peers + */ + public void set_funding_outpoint_sig(org.ldk.structs.Option_ECDSASignatureZ val) { + bindings.TxSignatures_set_funding_outpoint_sig(this.ptr, val.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; + } + /** * Constructs a new TxSignatures given each field */ - public static TxSignatures of(byte[] channel_id_arg, byte[] tx_hash_arg, byte[][] witnesses_arg) { - long ret = bindings.TxSignatures_new(InternalUtils.check_arr_len(channel_id_arg, 32), InternalUtils.check_arr_len(tx_hash_arg, 32), witnesses_arg); + public static TxSignatures of(org.ldk.structs.ChannelId channel_id_arg, byte[] tx_hash_arg, byte[][] witnesses_arg, org.ldk.structs.Option_ECDSASignatureZ funding_outpoint_sig_arg) { + long ret = bindings.TxSignatures_new(channel_id_arg.ptr, InternalUtils.check_arr_len(tx_hash_arg, 32), witnesses_arg, funding_outpoint_sig_arg.ptr); Reference.reachabilityFence(channel_id_arg); Reference.reachabilityFence(tx_hash_arg); Reference.reachabilityFence(witnesses_arg); + Reference.reachabilityFence(funding_outpoint_sig_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.TxSignatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxSignatures(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(funding_outpoint_sig_arg); }; return ret_hu_conv; } @@ -127,7 +156,7 @@ public class TxSignatures extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.TxSignatures b) { - boolean ret = bindings.TxSignatures_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.TxSignatures_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/UnknownPaymentContext.java b/src/main/java/org/ldk/structs/UnknownPaymentContext.java new file mode 100644 index 00000000..e1052927 --- /dev/null +++ b/src/main/java/org/ldk/structs/UnknownPaymentContext.java @@ -0,0 +1,78 @@ +package org.ldk.structs; + +import org.ldk.impl.bindings; +import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; + + +/** + * An unknown payment context. + */ +@SuppressWarnings("unchecked") // We correctly assign various generic arrays +public class UnknownPaymentContext extends CommonBase { + UnknownPaymentContext(Object _dummy, long ptr) { super(ptr); } + @Override @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + if (ptr != 0) { bindings.UnknownPaymentContext_free(ptr); } + } + + long clone_ptr() { + long ret = bindings.UnknownPaymentContext_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a copy of the UnknownPaymentContext + */ + public UnknownPaymentContext clone() { + long ret = bindings.UnknownPaymentContext_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.UnknownPaymentContext ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UnknownPaymentContext(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Checks if two UnknownPaymentContexts contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ + public boolean eq(org.ldk.structs.UnknownPaymentContext b) { + boolean ret = bindings.UnknownPaymentContext_eq(this.ptr, b.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(b); + if (this != null) { this.ptrs_to.add(b); }; + return ret; + } + + @Override public boolean equals(Object o) { + if (!(o instanceof UnknownPaymentContext)) return false; + return this.eq((UnknownPaymentContext)o); + } + /** + * Serialize the UnknownPaymentContext object into a byte array which can be read by UnknownPaymentContext_read + */ + public byte[] write() { + byte[] ret = bindings.UnknownPaymentContext_write(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Read a UnknownPaymentContext from a byte array, created by UnknownPaymentContext_write + */ + public static Result_UnknownPaymentContextDecodeErrorZ read(byte[] ser) { + long ret = bindings.UnknownPaymentContext_read(ser); + Reference.reachabilityFence(ser); + if (ret >= 0 && ret <= 4096) { return null; } + Result_UnknownPaymentContextDecodeErrorZ ret_hu_conv = Result_UnknownPaymentContextDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/src/main/java/org/ldk/structs/UnsignedBolt12Invoice.java b/src/main/java/org/ldk/structs/UnsignedBolt12Invoice.java index c9e47658..0fcbbe03 100644 --- a/src/main/java/org/ldk/structs/UnsignedBolt12Invoice.java +++ b/src/main/java/org/ldk/structs/UnsignedBolt12Invoice.java @@ -25,6 +25,24 @@ public class UnsignedBolt12Invoice extends CommonBase { if (ptr != 0) { bindings.UnsignedBolt12Invoice_free(ptr); } } + long clone_ptr() { + long ret = bindings.UnsignedBolt12Invoice_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a copy of the UnsignedBolt12Invoice + */ + public UnsignedBolt12Invoice clone() { + long ret = bindings.UnsignedBolt12Invoice_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.UnsignedBolt12Invoice ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UnsignedBolt12Invoice(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + /** * Returns the [`TaggedHash`] of the invoice to sign. */ @@ -94,15 +112,12 @@ public class UnsignedBolt12Invoice extends CommonBase { * * [`Offer`]: crate::offers::offer::Offer * [`Offer::amount`]: crate::offers::offer::Offer::amount - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ - @Nullable - public Amount amount() { + public Option_AmountZ amount() { long ret = bindings.UnsignedBolt12Invoice_amount(this.ptr); Reference.reachabilityFence(this); if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Amount ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Amount(null, ret); } + org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; return ret_hu_conv; } @@ -134,7 +149,10 @@ public class UnsignedBolt12Invoice extends CommonBase { * From [`Offer::description`] or [`Refund::description`]. * * [`Offer::description`]: crate::offers::offer::Offer::description + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ + @Nullable public PrintableString description() { long ret = bindings.UnsignedBolt12Invoice_description(this.ptr); Reference.reachabilityFence(this); @@ -207,15 +225,12 @@ public class UnsignedBolt12Invoice extends CommonBase { * [`Refund`]. * * [`Offer::supported_quantity`]: crate::offers::offer::Offer::supported_quantity - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ - @Nullable - public Quantity supported_quantity() { + public Option_QuantityZ supported_quantity() { long ret = bindings.UnsignedBolt12Invoice_supported_quantity(this.ptr); Reference.reachabilityFence(this); if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Quantity ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Quantity(null, ret); } + org.ldk.structs.Option_QuantityZ ret_hu_conv = org.ldk.structs.Option_QuantityZ.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/UnsignedChannelAnnouncement.java b/src/main/java/org/ldk/structs/UnsignedChannelAnnouncement.java index 9d6bd1a4..ebf3bc6e 100644 --- a/src/main/java/org/ldk/structs/UnsignedChannelAnnouncement.java +++ b/src/main/java/org/ldk/structs/UnsignedChannelAnnouncement.java @@ -38,7 +38,7 @@ public class UnsignedChannelAnnouncement extends CommonBase { * The advertised channel features */ public void set_features(org.ldk.structs.ChannelFeatures val) { - bindings.UnsignedChannelAnnouncement_set_features(this.ptr, val == null ? 0 : val.ptr); + bindings.UnsignedChannelAnnouncement_set_features(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -96,7 +96,7 @@ public class UnsignedChannelAnnouncement extends CommonBase { * One of the two `node_id`s which are endpoints of this channel */ public void set_node_id_1(org.ldk.structs.NodeId val) { - bindings.UnsignedChannelAnnouncement_set_node_id_1(this.ptr, val == null ? 0 : val.ptr); + bindings.UnsignedChannelAnnouncement_set_node_id_1(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -118,7 +118,7 @@ public class UnsignedChannelAnnouncement extends CommonBase { * The other of the two `node_id`s which are endpoints of this channel */ public void set_node_id_2(org.ldk.structs.NodeId val) { - bindings.UnsignedChannelAnnouncement_set_node_id_2(this.ptr, val == null ? 0 : val.ptr); + bindings.UnsignedChannelAnnouncement_set_node_id_2(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -140,7 +140,7 @@ public class UnsignedChannelAnnouncement extends CommonBase { * The funding key for the first node */ public void set_bitcoin_key_1(org.ldk.structs.NodeId val) { - bindings.UnsignedChannelAnnouncement_set_bitcoin_key_1(this.ptr, val == null ? 0 : val.ptr); + bindings.UnsignedChannelAnnouncement_set_bitcoin_key_1(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -162,7 +162,7 @@ public class UnsignedChannelAnnouncement extends CommonBase { * The funding key for the second node */ public void set_bitcoin_key_2(org.ldk.structs.NodeId val) { - bindings.UnsignedChannelAnnouncement_set_bitcoin_key_2(this.ptr, val == null ? 0 : val.ptr); + bindings.UnsignedChannelAnnouncement_set_bitcoin_key_2(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -198,7 +198,7 @@ public class UnsignedChannelAnnouncement extends CommonBase { * Constructs a new UnsignedChannelAnnouncement given each field */ public static UnsignedChannelAnnouncement of(org.ldk.structs.ChannelFeatures features_arg, byte[] chain_hash_arg, long short_channel_id_arg, org.ldk.structs.NodeId node_id_1_arg, org.ldk.structs.NodeId node_id_2_arg, org.ldk.structs.NodeId bitcoin_key_1_arg, org.ldk.structs.NodeId bitcoin_key_2_arg, byte[] excess_data_arg) { - long ret = bindings.UnsignedChannelAnnouncement_new(features_arg == null ? 0 : features_arg.ptr, InternalUtils.check_arr_len(chain_hash_arg, 32), short_channel_id_arg, node_id_1_arg == null ? 0 : node_id_1_arg.ptr, node_id_2_arg == null ? 0 : node_id_2_arg.ptr, bitcoin_key_1_arg == null ? 0 : bitcoin_key_1_arg.ptr, bitcoin_key_2_arg == null ? 0 : bitcoin_key_2_arg.ptr, excess_data_arg); + long ret = bindings.UnsignedChannelAnnouncement_new(features_arg.ptr, InternalUtils.check_arr_len(chain_hash_arg, 32), short_channel_id_arg, node_id_1_arg.ptr, node_id_2_arg.ptr, bitcoin_key_1_arg.ptr, bitcoin_key_2_arg.ptr, excess_data_arg); Reference.reachabilityFence(features_arg); Reference.reachabilityFence(chain_hash_arg); Reference.reachabilityFence(short_channel_id_arg); @@ -254,7 +254,7 @@ public class UnsignedChannelAnnouncement extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.UnsignedChannelAnnouncement b) { - boolean ret = bindings.UnsignedChannelAnnouncement_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.UnsignedChannelAnnouncement_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/UnsignedChannelUpdate.java b/src/main/java/org/ldk/structs/UnsignedChannelUpdate.java index ee0802b8..ba8dfd22 100644 --- a/src/main/java/org/ldk/structs/UnsignedChannelUpdate.java +++ b/src/main/java/org/ldk/structs/UnsignedChannelUpdate.java @@ -285,7 +285,7 @@ public class UnsignedChannelUpdate extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.UnsignedChannelUpdate b) { - boolean ret = bindings.UnsignedChannelUpdate_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.UnsignedChannelUpdate_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/UnsignedGossipMessage.java b/src/main/java/org/ldk/structs/UnsignedGossipMessage.java index f895fbef..6789b185 100644 --- a/src/main/java/org/ldk/structs/UnsignedGossipMessage.java +++ b/src/main/java/org/ldk/structs/UnsignedGossipMessage.java @@ -94,7 +94,7 @@ public class UnsignedGossipMessage extends CommonBase { * Utility method to constructs a new ChannelAnnouncement-variant UnsignedGossipMessage */ public static UnsignedGossipMessage channel_announcement(org.ldk.structs.UnsignedChannelAnnouncement a) { - long ret = bindings.UnsignedGossipMessage_channel_announcement(a == null ? 0 : a.ptr); + long ret = bindings.UnsignedGossipMessage_channel_announcement(a.ptr); Reference.reachabilityFence(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.UnsignedGossipMessage ret_hu_conv = org.ldk.structs.UnsignedGossipMessage.constr_from_ptr(ret); @@ -107,7 +107,7 @@ public class UnsignedGossipMessage extends CommonBase { * Utility method to constructs a new ChannelUpdate-variant UnsignedGossipMessage */ public static UnsignedGossipMessage channel_update(org.ldk.structs.UnsignedChannelUpdate a) { - long ret = bindings.UnsignedGossipMessage_channel_update(a == null ? 0 : a.ptr); + long ret = bindings.UnsignedGossipMessage_channel_update(a.ptr); Reference.reachabilityFence(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.UnsignedGossipMessage ret_hu_conv = org.ldk.structs.UnsignedGossipMessage.constr_from_ptr(ret); @@ -120,7 +120,7 @@ public class UnsignedGossipMessage extends CommonBase { * Utility method to constructs a new NodeAnnouncement-variant UnsignedGossipMessage */ public static UnsignedGossipMessage node_announcement(org.ldk.structs.UnsignedNodeAnnouncement a) { - long ret = bindings.UnsignedGossipMessage_node_announcement(a == null ? 0 : a.ptr); + long ret = bindings.UnsignedGossipMessage_node_announcement(a.ptr); Reference.reachabilityFence(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.UnsignedGossipMessage ret_hu_conv = org.ldk.structs.UnsignedGossipMessage.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/UnsignedInvoiceRequest.java b/src/main/java/org/ldk/structs/UnsignedInvoiceRequest.java index b8b19b9c..8034c154 100644 --- a/src/main/java/org/ldk/structs/UnsignedInvoiceRequest.java +++ b/src/main/java/org/ldk/structs/UnsignedInvoiceRequest.java @@ -25,6 +25,24 @@ public class UnsignedInvoiceRequest extends CommonBase { if (ptr != 0) { bindings.UnsignedInvoiceRequest_free(ptr); } } + long clone_ptr() { + long ret = bindings.UnsignedInvoiceRequest_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a copy of the UnsignedInvoiceRequest + */ + public UnsignedInvoiceRequest clone() { + long ret = bindings.UnsignedInvoiceRequest_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.UnsignedInvoiceRequest ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UnsignedInvoiceRequest(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + /** * Returns the [`TaggedHash`] of the invoice to sign. */ @@ -63,15 +81,12 @@ public class UnsignedInvoiceRequest extends CommonBase { /** * The minimum amount required for a successful payment of a single item. - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ - @Nullable - public Amount amount() { + public Option_AmountZ amount() { long ret = bindings.UnsignedInvoiceRequest_amount(this.ptr); Reference.reachabilityFence(this); if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Amount ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Amount(null, ret); } + org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; return ret_hu_conv; } @@ -79,7 +94,10 @@ public class UnsignedInvoiceRequest extends CommonBase { /** * A complete description of the purpose of the payment. Intended to be displayed to the user * but with the caveat that it has not been verified in any way. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ + @Nullable public PrintableString description() { long ret = bindings.UnsignedInvoiceRequest_description(this.ptr); Reference.reachabilityFence(this); @@ -156,14 +174,17 @@ public class UnsignedInvoiceRequest extends CommonBase { long ret = bindings.UnsignedInvoiceRequest_supported_quantity(this.ptr); Reference.reachabilityFence(this); if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Quantity ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Quantity(null, ret); } + org.ldk.structs.Quantity ret_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; return ret_hu_conv; } /** * The public key used by the recipient to sign invoices. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ + @Nullable public byte[] signing_pubkey() { byte[] ret = bindings.UnsignedInvoiceRequest_signing_pubkey(this.ptr); Reference.reachabilityFence(this); diff --git a/src/main/java/org/ldk/structs/UnsignedNodeAnnouncement.java b/src/main/java/org/ldk/structs/UnsignedNodeAnnouncement.java index e2503758..99d4420d 100644 --- a/src/main/java/org/ldk/structs/UnsignedNodeAnnouncement.java +++ b/src/main/java/org/ldk/structs/UnsignedNodeAnnouncement.java @@ -38,7 +38,7 @@ public class UnsignedNodeAnnouncement extends CommonBase { * The advertised features */ public void set_features(org.ldk.structs.NodeFeatures val) { - bindings.UnsignedNodeAnnouncement_set_features(this.ptr, val == null ? 0 : val.ptr); + bindings.UnsignedNodeAnnouncement_set_features(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -80,7 +80,7 @@ public class UnsignedNodeAnnouncement extends CommonBase { * to this node). */ public void set_node_id(org.ldk.structs.NodeId val) { - bindings.UnsignedNodeAnnouncement_set_node_id(this.ptr, val == null ? 0 : val.ptr); + bindings.UnsignedNodeAnnouncement_set_node_id(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -124,7 +124,7 @@ public class UnsignedNodeAnnouncement extends CommonBase { * This should be sanitized before use. There is no guarantee of uniqueness. */ public void set_alias(org.ldk.structs.NodeAlias val) { - bindings.UnsignedNodeAnnouncement_set_alias(this.ptr, val == null ? 0 : val.ptr); + bindings.UnsignedNodeAnnouncement_set_alias(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -159,6 +159,81 @@ public class UnsignedNodeAnnouncement extends CommonBase { for (SocketAddress val_conv_15: val) { if (this != null) { this.ptrs_to.add(val_conv_15); }; }; } + /** + * Excess address data which was signed as a part of the message which we do not (yet) understand how + * to decode. + * + * This is stored to ensure forward-compatibility as new address types are added to the lightning gossip protocol. + * + * Returns a copy of the field. + */ + public byte[] get_excess_address_data() { + byte[] ret = bindings.UnsignedNodeAnnouncement_get_excess_address_data(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Excess address data which was signed as a part of the message which we do not (yet) understand how + * to decode. + * + * This is stored to ensure forward-compatibility as new address types are added to the lightning gossip protocol. + */ + public void set_excess_address_data(byte[] val) { + bindings.UnsignedNodeAnnouncement_set_excess_address_data(this.ptr, val); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * Excess data which was signed as a part of the message which we do not (yet) understand how + * to decode. + * + * This is stored to ensure forward-compatibility as new fields are added to the lightning gossip protocol. + * + * Returns a copy of the field. + */ + public byte[] get_excess_data() { + byte[] ret = bindings.UnsignedNodeAnnouncement_get_excess_data(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Excess data which was signed as a part of the message which we do not (yet) understand how + * to decode. + * + * This is stored to ensure forward-compatibility as new fields are added to the lightning gossip protocol. + */ + public void set_excess_data(byte[] val) { + bindings.UnsignedNodeAnnouncement_set_excess_data(this.ptr, val); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + + /** + * Constructs a new UnsignedNodeAnnouncement given each field + */ + public static UnsignedNodeAnnouncement of(org.ldk.structs.NodeFeatures features_arg, int timestamp_arg, org.ldk.structs.NodeId node_id_arg, byte[] rgb_arg, org.ldk.structs.NodeAlias alias_arg, SocketAddress[] addresses_arg, byte[] excess_address_data_arg, byte[] excess_data_arg) { + long ret = bindings.UnsignedNodeAnnouncement_new(features_arg.ptr, timestamp_arg, node_id_arg.ptr, InternalUtils.check_arr_len(rgb_arg, 3), alias_arg.ptr, addresses_arg != null ? Arrays.stream(addresses_arg).mapToLong(addresses_arg_conv_15 -> addresses_arg_conv_15.ptr).toArray() : null, excess_address_data_arg, excess_data_arg); + Reference.reachabilityFence(features_arg); + Reference.reachabilityFence(timestamp_arg); + Reference.reachabilityFence(node_id_arg); + Reference.reachabilityFence(rgb_arg); + Reference.reachabilityFence(alias_arg); + Reference.reachabilityFence(addresses_arg); + Reference.reachabilityFence(excess_address_data_arg); + Reference.reachabilityFence(excess_data_arg); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.UnsignedNodeAnnouncement ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UnsignedNodeAnnouncement(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(features_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(node_id_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(alias_arg); }; + for (SocketAddress addresses_arg_conv_15: addresses_arg) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(addresses_arg_conv_15); }; }; + return ret_hu_conv; + } + long clone_ptr() { long ret = bindings.UnsignedNodeAnnouncement_clone_ptr(this.ptr); Reference.reachabilityFence(this); @@ -195,7 +270,7 @@ public class UnsignedNodeAnnouncement extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.UnsignedNodeAnnouncement b) { - boolean ret = bindings.UnsignedNodeAnnouncement_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.UnsignedNodeAnnouncement_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/UntrustedString.java b/src/main/java/org/ldk/structs/UntrustedString.java index ab654a54..0eeacfaf 100644 --- a/src/main/java/org/ldk/structs/UntrustedString.java +++ b/src/main/java/org/ldk/structs/UntrustedString.java @@ -68,7 +68,7 @@ public class UntrustedString extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.UntrustedString b) { - boolean ret = bindings.UntrustedString_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.UntrustedString_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/UpdateAddHTLC.java b/src/main/java/org/ldk/structs/UpdateAddHTLC.java index ed574d30..b6986b98 100644 --- a/src/main/java/org/ldk/structs/UpdateAddHTLC.java +++ b/src/main/java/org/ldk/structs/UpdateAddHTLC.java @@ -25,19 +25,23 @@ public class UpdateAddHTLC extends CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { - byte[] ret = bindings.UpdateAddHTLC_get_channel_id(this.ptr); + public ChannelId get_channel_id() { + long ret = bindings.UpdateAddHTLC_get_channel_id(this.ptr); Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.UpdateAddHTLC_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.UpdateAddHTLC_set_channel_id(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** @@ -156,7 +160,7 @@ public class UpdateAddHTLC extends CommonBase { * The onion routing packet with encrypted data for the next hop. */ public void set_onion_routing_packet(org.ldk.structs.OnionPacket val) { - bindings.UpdateAddHTLC_set_onion_routing_packet(this.ptr, val == null ? 0 : val.ptr); + bindings.UpdateAddHTLC_set_onion_routing_packet(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -192,8 +196,8 @@ public class UpdateAddHTLC extends CommonBase { * * Note that blinding_point_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public static UpdateAddHTLC of(byte[] channel_id_arg, long htlc_id_arg, long amount_msat_arg, byte[] payment_hash_arg, int cltv_expiry_arg, org.ldk.structs.Option_u64Z skimmed_fee_msat_arg, org.ldk.structs.OnionPacket onion_routing_packet_arg, @Nullable byte[] blinding_point_arg) { - long ret = bindings.UpdateAddHTLC_new(InternalUtils.check_arr_len(channel_id_arg, 32), htlc_id_arg, amount_msat_arg, InternalUtils.check_arr_len(payment_hash_arg, 32), cltv_expiry_arg, skimmed_fee_msat_arg.ptr, onion_routing_packet_arg == null ? 0 : onion_routing_packet_arg.ptr, InternalUtils.check_arr_len(blinding_point_arg, 33)); + public static UpdateAddHTLC of(org.ldk.structs.ChannelId channel_id_arg, long htlc_id_arg, long amount_msat_arg, byte[] payment_hash_arg, int cltv_expiry_arg, org.ldk.structs.Option_u64Z skimmed_fee_msat_arg, org.ldk.structs.OnionPacket onion_routing_packet_arg, @Nullable byte[] blinding_point_arg) { + long ret = bindings.UpdateAddHTLC_new(channel_id_arg.ptr, htlc_id_arg, amount_msat_arg, InternalUtils.check_arr_len(payment_hash_arg, 32), cltv_expiry_arg, skimmed_fee_msat_arg.ptr, onion_routing_packet_arg.ptr, InternalUtils.check_arr_len(blinding_point_arg, 33)); Reference.reachabilityFence(channel_id_arg); Reference.reachabilityFence(htlc_id_arg); Reference.reachabilityFence(amount_msat_arg); @@ -205,6 +209,7 @@ public class UpdateAddHTLC extends CommonBase { if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.UpdateAddHTLC ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UpdateAddHTLC(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(skimmed_fee_msat_arg); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(onion_routing_packet_arg); }; return ret_hu_conv; @@ -246,7 +251,7 @@ public class UpdateAddHTLC extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.UpdateAddHTLC b) { - boolean ret = bindings.UpdateAddHTLC_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.UpdateAddHTLC_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/UpdateFailHTLC.java b/src/main/java/org/ldk/structs/UpdateFailHTLC.java index e003c0d6..004c1a89 100644 --- a/src/main/java/org/ldk/structs/UpdateFailHTLC.java +++ b/src/main/java/org/ldk/structs/UpdateFailHTLC.java @@ -25,19 +25,23 @@ public class UpdateFailHTLC extends CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { - byte[] ret = bindings.UpdateFailHTLC_get_channel_id(this.ptr); + public ChannelId get_channel_id() { + long ret = bindings.UpdateFailHTLC_get_channel_id(this.ptr); Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.UpdateFailHTLC_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.UpdateFailHTLC_set_channel_id(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** @@ -94,7 +98,7 @@ public class UpdateFailHTLC extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.UpdateFailHTLC b) { - boolean ret = bindings.UpdateFailHTLC_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.UpdateFailHTLC_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/UpdateFailMalformedHTLC.java b/src/main/java/org/ldk/structs/UpdateFailMalformedHTLC.java index 7bfc2ffc..03767ddd 100644 --- a/src/main/java/org/ldk/structs/UpdateFailMalformedHTLC.java +++ b/src/main/java/org/ldk/structs/UpdateFailMalformedHTLC.java @@ -25,19 +25,23 @@ public class UpdateFailMalformedHTLC extends CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { - byte[] ret = bindings.UpdateFailMalformedHTLC_get_channel_id(this.ptr); + public ChannelId get_channel_id() { + long ret = bindings.UpdateFailMalformedHTLC_get_channel_id(this.ptr); Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.UpdateFailMalformedHTLC_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.UpdateFailMalformedHTLC_set_channel_id(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** @@ -112,7 +116,7 @@ public class UpdateFailMalformedHTLC extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.UpdateFailMalformedHTLC b) { - boolean ret = bindings.UpdateFailMalformedHTLC_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.UpdateFailMalformedHTLC_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/UpdateFee.java b/src/main/java/org/ldk/structs/UpdateFee.java index 64e4c26e..0a8c588a 100644 --- a/src/main/java/org/ldk/structs/UpdateFee.java +++ b/src/main/java/org/ldk/structs/UpdateFee.java @@ -25,19 +25,23 @@ public class UpdateFee extends CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { - byte[] ret = bindings.UpdateFee_get_channel_id(this.ptr); + public ChannelId get_channel_id() { + long ret = bindings.UpdateFee_get_channel_id(this.ptr); Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.UpdateFee_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.UpdateFee_set_channel_id(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** @@ -61,13 +65,14 @@ public class UpdateFee extends CommonBase { /** * Constructs a new UpdateFee given each field */ - public static UpdateFee of(byte[] channel_id_arg, int feerate_per_kw_arg) { - long ret = bindings.UpdateFee_new(InternalUtils.check_arr_len(channel_id_arg, 32), feerate_per_kw_arg); + public static UpdateFee of(org.ldk.structs.ChannelId channel_id_arg, int feerate_per_kw_arg) { + long ret = bindings.UpdateFee_new(channel_id_arg.ptr, feerate_per_kw_arg); Reference.reachabilityFence(channel_id_arg); Reference.reachabilityFence(feerate_per_kw_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.UpdateFee ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UpdateFee(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); }; return ret_hu_conv; } @@ -107,7 +112,7 @@ public class UpdateFee extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.UpdateFee b) { - boolean ret = bindings.UpdateFee_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.UpdateFee_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/UpdateFulfillHTLC.java b/src/main/java/org/ldk/structs/UpdateFulfillHTLC.java index 1878e2c4..1f9efc65 100644 --- a/src/main/java/org/ldk/structs/UpdateFulfillHTLC.java +++ b/src/main/java/org/ldk/structs/UpdateFulfillHTLC.java @@ -25,19 +25,23 @@ public class UpdateFulfillHTLC extends CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { - byte[] ret = bindings.UpdateFulfillHTLC_get_channel_id(this.ptr); + public ChannelId get_channel_id() { + long ret = bindings.UpdateFulfillHTLC_get_channel_id(this.ptr); Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.UpdateFulfillHTLC_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.UpdateFulfillHTLC_set_channel_id(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** @@ -79,14 +83,15 @@ public class UpdateFulfillHTLC extends CommonBase { /** * Constructs a new UpdateFulfillHTLC given each field */ - public static UpdateFulfillHTLC of(byte[] channel_id_arg, long htlc_id_arg, byte[] payment_preimage_arg) { - long ret = bindings.UpdateFulfillHTLC_new(InternalUtils.check_arr_len(channel_id_arg, 32), htlc_id_arg, InternalUtils.check_arr_len(payment_preimage_arg, 32)); + public static UpdateFulfillHTLC of(org.ldk.structs.ChannelId channel_id_arg, long htlc_id_arg, byte[] payment_preimage_arg) { + long ret = bindings.UpdateFulfillHTLC_new(channel_id_arg.ptr, htlc_id_arg, InternalUtils.check_arr_len(payment_preimage_arg, 32)); Reference.reachabilityFence(channel_id_arg); Reference.reachabilityFence(htlc_id_arg); Reference.reachabilityFence(payment_preimage_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.UpdateFulfillHTLC ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UpdateFulfillHTLC(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); }; return ret_hu_conv; } @@ -126,7 +131,7 @@ public class UpdateFulfillHTLC extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.UpdateFulfillHTLC b) { - boolean ret = bindings.UpdateFulfillHTLC_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.UpdateFulfillHTLC_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/UserConfig.java b/src/main/java/org/ldk/structs/UserConfig.java index 7a3a99a8..c995f6e4 100644 --- a/src/main/java/org/ldk/structs/UserConfig.java +++ b/src/main/java/org/ldk/structs/UserConfig.java @@ -39,7 +39,7 @@ public class UserConfig extends CommonBase { * Channel handshake config that we propose to our counterparty. */ public void set_channel_handshake_config(org.ldk.structs.ChannelHandshakeConfig val) { - bindings.UserConfig_set_channel_handshake_config(this.ptr, val == null ? 0 : val.ptr); + bindings.UserConfig_set_channel_handshake_config(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -61,7 +61,7 @@ public class UserConfig extends CommonBase { * Limits applied to our counterparty's proposed channel handshake config settings. */ public void set_channel_handshake_limits(org.ldk.structs.ChannelHandshakeLimits val) { - bindings.UserConfig_set_channel_handshake_limits(this.ptr, val == null ? 0 : val.ptr); + bindings.UserConfig_set_channel_handshake_limits(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -83,7 +83,7 @@ public class UserConfig extends CommonBase { * Channel config which affects behavior during channel lifetime. */ public void set_channel_config(org.ldk.structs.ChannelConfig val) { - bindings.UserConfig_set_channel_config(this.ptr, val == null ? 0 : val.ptr); + bindings.UserConfig_set_channel_config(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -275,7 +275,7 @@ public class UserConfig extends CommonBase { * Constructs a new UserConfig given each field */ public static UserConfig of(org.ldk.structs.ChannelHandshakeConfig channel_handshake_config_arg, org.ldk.structs.ChannelHandshakeLimits channel_handshake_limits_arg, org.ldk.structs.ChannelConfig channel_config_arg, boolean accept_forwards_to_priv_channels_arg, boolean accept_inbound_channels_arg, boolean manually_accept_inbound_channels_arg, boolean accept_intercept_htlcs_arg, boolean accept_mpp_keysend_arg) { - long ret = bindings.UserConfig_new(channel_handshake_config_arg == null ? 0 : channel_handshake_config_arg.ptr, channel_handshake_limits_arg == null ? 0 : channel_handshake_limits_arg.ptr, channel_config_arg == null ? 0 : channel_config_arg.ptr, accept_forwards_to_priv_channels_arg, accept_inbound_channels_arg, manually_accept_inbound_channels_arg, accept_intercept_htlcs_arg, accept_mpp_keysend_arg); + long ret = bindings.UserConfig_new(channel_handshake_config_arg.ptr, channel_handshake_limits_arg.ptr, channel_config_arg.ptr, accept_forwards_to_priv_channels_arg, accept_inbound_channels_arg, manually_accept_inbound_channels_arg, accept_intercept_htlcs_arg, accept_mpp_keysend_arg); Reference.reachabilityFence(channel_handshake_config_arg); Reference.reachabilityFence(channel_handshake_limits_arg); Reference.reachabilityFence(channel_config_arg); diff --git a/src/main/java/org/ldk/structs/UtilMethods.java b/src/main/java/org/ldk/structs/UtilMethods.java index 156d1e93..72e27179 100644 --- a/src/main/java/org/ldk/structs/UtilMethods.java +++ b/src/main/java/org/ldk/structs/UtilMethods.java @@ -117,6 +117,72 @@ public class UtilMethods { return ret_hu_conv; } + /** + * Extracts the block height (most significant 3-bytes) from the `short_channel_id` + */ + public static int block_from_scid(long short_channel_id) { + int ret = bindings.block_from_scid(short_channel_id); + Reference.reachabilityFence(short_channel_id); + return ret; + } + + /** + * Extracts the tx index (bytes [2..4]) from the `short_channel_id` + */ + public static int tx_index_from_scid(long short_channel_id) { + int ret = bindings.tx_index_from_scid(short_channel_id); + Reference.reachabilityFence(short_channel_id); + return ret; + } + + /** + * Extracts the vout (bytes [0..2]) from the `short_channel_id` + */ + public static short vout_from_scid(long short_channel_id) { + short ret = bindings.vout_from_scid(short_channel_id); + Reference.reachabilityFence(short_channel_id); + return ret; + } + + /** + * Constructs a `short_channel_id` using the components pieces. Results in an error + * if the block height, tx index, or vout index overflow the maximum sizes. + */ + public static Result_u64ShortChannelIdErrorZ scid_from_parts(long block, long tx_index, long vout_index) { + long ret = bindings.scid_from_parts(block, tx_index, vout_index); + Reference.reachabilityFence(block); + Reference.reachabilityFence(tx_index); + Reference.reachabilityFence(vout_index); + if (ret >= 0 && ret <= 4096) { return null; } + Result_u64ShortChannelIdErrorZ ret_hu_conv = Result_u64ShortChannelIdErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Read a C2Tuple_BestBlockOutputSweeperZ from a byte array, created by C2Tuple_BestBlockOutputSweeperZ_write + */ + public static Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ C2Tuple_BestBlockOutputSweeperZ_read(byte[] ser, org.ldk.structs.BroadcasterInterface arg_a, org.ldk.structs.FeeEstimator arg_b, org.ldk.structs.Option_FilterZ arg_c, org.ldk.structs.OutputSpender arg_d, org.ldk.structs.ChangeDestinationSource arg_e, org.ldk.structs.KVStore arg_f, org.ldk.structs.Logger arg_g) { + long ret = bindings.C2Tuple_BestBlockOutputSweeperZ_read(ser, arg_a.ptr, arg_b.ptr, arg_c.ptr, arg_d.ptr, arg_e.ptr, arg_f.ptr, arg_g.ptr); + Reference.reachabilityFence(ser); + Reference.reachabilityFence(arg_a); + Reference.reachabilityFence(arg_b); + Reference.reachabilityFence(arg_c); + Reference.reachabilityFence(arg_d); + Reference.reachabilityFence(arg_e); + Reference.reachabilityFence(arg_f); + Reference.reachabilityFence(arg_g); + if (ret >= 0 && ret <= 4096) { return null; } + Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_a); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_b); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_c); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_d); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_e); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_f); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_g); }; + return ret_hu_conv; + } + /** * Read a MonitorEvent from a byte array, created by MonitorEvent_write */ @@ -155,7 +221,7 @@ public class UtilMethods { * [`Event::PaymentClaimable`]: crate::events::Event::PaymentClaimable */ public static Result_PendingHTLCInfoInboundHTLCErrZ peel_payment_onion(org.ldk.structs.UpdateAddHTLC msg, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, int cur_height, boolean accept_mpp_keysend, boolean allow_skimmed_fees) { - long ret = bindings.peel_payment_onion(msg == null ? 0 : msg.ptr, node_signer.ptr, logger.ptr, cur_height, accept_mpp_keysend, allow_skimmed_fees); + long ret = bindings.peel_payment_onion(msg.ptr, node_signer.ptr, logger.ptr, cur_height, accept_mpp_keysend, allow_skimmed_fees); Reference.reachabilityFence(msg); Reference.reachabilityFence(node_signer); Reference.reachabilityFence(logger); @@ -175,7 +241,7 @@ public class UtilMethods { * [`ChannelManager`]. */ public static InitFeatures provided_init_features(org.ldk.structs.UserConfig config) { - long ret = bindings.provided_init_features(config == null ? 0 : config.ptr); + long ret = bindings.provided_init_features(config.ptr); Reference.reachabilityFence(config); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.InitFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InitFeatures(null, ret); } @@ -188,7 +254,7 @@ public class UtilMethods { * Read a C2Tuple_ThirtyTwoBytesChannelManagerZ from a byte array, created by C2Tuple_ThirtyTwoBytesChannelManagerZ_write */ public static Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ C2Tuple_ThirtyTwoBytesChannelManagerZ_read(byte[] ser, EntropySource arg_entropy_source, NodeSigner arg_node_signer, SignerProvider arg_signer_provider, FeeEstimator arg_fee_estimator, Watch arg_chain_monitor, BroadcasterInterface arg_tx_broadcaster, Router arg_router, Logger arg_logger, UserConfig arg_default_config, ChannelMonitor[] arg_channel_monitors) { - long ret = bindings.C2Tuple_ThirtyTwoBytesChannelManagerZ_read(ser, bindings.ChannelManagerReadArgs_new(arg_entropy_source.ptr, arg_node_signer.ptr, arg_signer_provider.ptr, arg_fee_estimator.ptr, arg_chain_monitor.ptr, arg_tx_broadcaster.ptr, arg_router.ptr, arg_logger.ptr, arg_default_config == null ? 0 : arg_default_config.ptr, arg_channel_monitors != null ? Arrays.stream(arg_channel_monitors).mapToLong(arg_channel_monitors_conv_16 -> arg_channel_monitors_conv_16 == null ? 0 : arg_channel_monitors_conv_16.ptr).toArray() : null)); + long ret = bindings.C2Tuple_ThirtyTwoBytesChannelManagerZ_read(ser, bindings.ChannelManagerReadArgs_new(arg_entropy_source.ptr, arg_node_signer.ptr, arg_signer_provider.ptr, arg_fee_estimator.ptr, arg_chain_monitor.ptr, arg_tx_broadcaster.ptr, arg_router.ptr, arg_logger.ptr, arg_default_config.ptr, arg_channel_monitors != null ? Arrays.stream(arg_channel_monitors).mapToLong(arg_channel_monitors_conv_16 -> arg_channel_monitors_conv_16.ptr).toArray() : null)); Reference.reachabilityFence(ser); Reference.reachabilityFence(arg_entropy_source); Reference.reachabilityFence(arg_node_signer); @@ -215,6 +281,18 @@ public class UtilMethods { return ret_hu_conv; } + /** + * Adds a tweak to a public key to derive a new public key. + * + * May panic if `tweak` is not the output of a SHA-256 hash. + */ + public static byte[] add_public_key_tweak(byte[] base_point, byte[] tweak) { + byte[] ret = bindings.add_public_key_tweak(InternalUtils.check_arr_len(base_point, 33), InternalUtils.check_arr_len(tweak, 32)); + Reference.reachabilityFence(base_point); + Reference.reachabilityFence(tweak); + return ret; + } + /** * Equivalent to [`crate::ln::channelmanager::ChannelManager::create_inbound_payment`], but no * `ChannelManager` is required. Useful for generating invoices for [phantom node payments] without @@ -233,7 +311,7 @@ public class UtilMethods { * [`NodeSigner::get_inbound_payment_key_material`]: crate::sign::NodeSigner::get_inbound_payment_key_material */ public static Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ create(org.ldk.structs.ExpandedKey keys, org.ldk.structs.Option_u64Z min_value_msat, int invoice_expiry_delta_secs, org.ldk.structs.EntropySource entropy_source, long current_time, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) { - long ret = bindings.create(keys == null ? 0 : keys.ptr, min_value_msat.ptr, invoice_expiry_delta_secs, entropy_source.ptr, current_time, min_final_cltv_expiry_delta.ptr); + long ret = bindings.create(keys.ptr, min_value_msat.ptr, invoice_expiry_delta_secs, entropy_source.ptr, current_time, min_final_cltv_expiry_delta.ptr); Reference.reachabilityFence(keys); Reference.reachabilityFence(min_value_msat); Reference.reachabilityFence(invoice_expiry_delta_secs); @@ -262,7 +340,7 @@ public class UtilMethods { * [phantom node payments]: crate::sign::PhantomKeysManager */ public static Result_ThirtyTwoBytesNoneZ create_from_hash(org.ldk.structs.ExpandedKey keys, org.ldk.structs.Option_u64Z min_value_msat, byte[] payment_hash, int invoice_expiry_delta_secs, long current_time, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) { - long ret = bindings.create_from_hash(keys == null ? 0 : keys.ptr, min_value_msat.ptr, InternalUtils.check_arr_len(payment_hash, 32), invoice_expiry_delta_secs, current_time, min_final_cltv_expiry_delta.ptr); + long ret = bindings.create_from_hash(keys.ptr, min_value_msat.ptr, InternalUtils.check_arr_len(payment_hash, 32), invoice_expiry_delta_secs, current_time, min_final_cltv_expiry_delta.ptr); Reference.reachabilityFence(keys); Reference.reachabilityFence(min_value_msat); Reference.reachabilityFence(payment_hash); @@ -295,7 +373,7 @@ public class UtilMethods { * Gets the weight for an HTLC-Success transaction. */ public static long htlc_success_tx_weight(org.ldk.structs.ChannelTypeFeatures channel_type_features) { - long ret = bindings.htlc_success_tx_weight(channel_type_features == null ? 0 : channel_type_features.ptr); + long ret = bindings.htlc_success_tx_weight(channel_type_features.ptr); Reference.reachabilityFence(channel_type_features); return ret; } @@ -304,7 +382,7 @@ public class UtilMethods { * Gets the weight for an HTLC-Timeout transaction. */ public static long htlc_timeout_tx_weight(org.ldk.structs.ChannelTypeFeatures channel_type_features) { - long ret = bindings.htlc_timeout_tx_weight(channel_type_features == null ? 0 : channel_type_features.ptr); + long ret = bindings.htlc_timeout_tx_weight(channel_type_features.ptr); Reference.reachabilityFence(channel_type_features); return ret; } @@ -335,7 +413,7 @@ public class UtilMethods { * Build a closing transaction */ public static byte[] build_closing_transaction(long to_holder_value_sat, long to_counterparty_value_sat, byte[] to_holder_script, byte[] to_counterparty_script, org.ldk.structs.OutPoint funding_outpoint) { - byte[] ret = bindings.build_closing_transaction(to_holder_value_sat, to_counterparty_value_sat, to_holder_script, to_counterparty_script, funding_outpoint == null ? 0 : funding_outpoint.ptr); + byte[] ret = bindings.build_closing_transaction(to_holder_value_sat, to_counterparty_value_sat, to_holder_script, to_counterparty_script, funding_outpoint.ptr); Reference.reachabilityFence(to_holder_value_sat); Reference.reachabilityFence(to_counterparty_value_sat); Reference.reachabilityFence(to_holder_script); @@ -376,7 +454,7 @@ public class UtilMethods { * Encumbering a `to_holder` output on a commitment transaction or 2nd-stage HTLC transactions. */ public static byte[] get_revokeable_redeemscript(org.ldk.structs.RevocationKey revocation_key, short contest_delay, org.ldk.structs.DelayedPaymentKey broadcaster_delayed_payment_key) { - byte[] ret = bindings.get_revokeable_redeemscript(revocation_key == null ? 0 : revocation_key.ptr, contest_delay, broadcaster_delayed_payment_key == null ? 0 : broadcaster_delayed_payment_key.ptr); + byte[] ret = bindings.get_revokeable_redeemscript(revocation_key.ptr, contest_delay, broadcaster_delayed_payment_key.ptr); Reference.reachabilityFence(revocation_key); Reference.reachabilityFence(contest_delay); Reference.reachabilityFence(broadcaster_delayed_payment_key); @@ -388,7 +466,7 @@ public class UtilMethods { * the channel type. */ public static byte[] get_counterparty_payment_script(org.ldk.structs.ChannelTypeFeatures channel_type_features, byte[] payment_key) { - byte[] ret = bindings.get_counterparty_payment_script(channel_type_features == null ? 0 : channel_type_features.ptr, InternalUtils.check_arr_len(payment_key, 33)); + byte[] ret = bindings.get_counterparty_payment_script(channel_type_features.ptr, InternalUtils.check_arr_len(payment_key, 33)); Reference.reachabilityFence(channel_type_features); Reference.reachabilityFence(payment_key); return ret; @@ -399,7 +477,7 @@ public class UtilMethods { * does not need to have its previous_output_index filled. */ public static byte[] get_htlc_redeemscript(org.ldk.structs.HTLCOutputInCommitment htlc, org.ldk.structs.ChannelTypeFeatures channel_type_features, org.ldk.structs.TxCreationKeys keys) { - byte[] ret = bindings.get_htlc_redeemscript(htlc == null ? 0 : htlc.ptr, channel_type_features == null ? 0 : channel_type_features.ptr, keys == null ? 0 : keys.ptr); + byte[] ret = bindings.get_htlc_redeemscript(htlc.ptr, channel_type_features.ptr, keys.ptr); Reference.reachabilityFence(htlc); Reference.reachabilityFence(channel_type_features); Reference.reachabilityFence(keys); @@ -427,7 +505,7 @@ public class UtilMethods { * commitment transaction). */ public static byte[] build_htlc_transaction(byte[] commitment_txid, int feerate_per_kw, short contest_delay, org.ldk.structs.HTLCOutputInCommitment htlc, org.ldk.structs.ChannelTypeFeatures channel_type_features, org.ldk.structs.DelayedPaymentKey broadcaster_delayed_payment_key, org.ldk.structs.RevocationKey revocation_key) { - byte[] ret = bindings.build_htlc_transaction(InternalUtils.check_arr_len(commitment_txid, 32), feerate_per_kw, contest_delay, htlc == null ? 0 : htlc.ptr, channel_type_features == null ? 0 : channel_type_features.ptr, broadcaster_delayed_payment_key == null ? 0 : broadcaster_delayed_payment_key.ptr, revocation_key == null ? 0 : revocation_key.ptr); + byte[] ret = bindings.build_htlc_transaction(InternalUtils.check_arr_len(commitment_txid, 32), feerate_per_kw, contest_delay, htlc.ptr, channel_type_features.ptr, broadcaster_delayed_payment_key.ptr, revocation_key.ptr); Reference.reachabilityFence(commitment_txid); Reference.reachabilityFence(feerate_per_kw); Reference.reachabilityFence(contest_delay); @@ -442,7 +520,7 @@ public class UtilMethods { * Returns the witness required to satisfy and spend a HTLC input. */ public static byte[] build_htlc_input_witness(byte[] local_sig, byte[] remote_sig, org.ldk.structs.Option_ThirtyTwoBytesZ preimage, byte[] redeem_script, org.ldk.structs.ChannelTypeFeatures channel_type_features) { - byte[] ret = bindings.build_htlc_input_witness(InternalUtils.check_arr_len(local_sig, 64), InternalUtils.check_arr_len(remote_sig, 64), preimage.ptr, redeem_script, channel_type_features == null ? 0 : channel_type_features.ptr); + byte[] ret = bindings.build_htlc_input_witness(InternalUtils.check_arr_len(local_sig, 64), InternalUtils.check_arr_len(remote_sig, 64), preimage.ptr, redeem_script, channel_type_features.ptr); Reference.reachabilityFence(local_sig); Reference.reachabilityFence(remote_sig); Reference.reachabilityFence(preimage); @@ -517,7 +595,7 @@ public class UtilMethods { * Returns an error if it is invalid. */ public static Result_NoneLightningErrorZ verify_node_announcement(org.ldk.structs.NodeAnnouncement msg) { - long ret = bindings.verify_node_announcement(msg == null ? 0 : msg.ptr); + long ret = bindings.verify_node_announcement(msg.ptr); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret); @@ -531,7 +609,7 @@ public class UtilMethods { * Returns an error if one of the signatures is invalid. */ public static Result_NoneLightningErrorZ verify_channel_announcement(org.ldk.structs.ChannelAnnouncement msg) { - long ret = bindings.verify_channel_announcement(msg == null ? 0 : msg.ptr); + long ret = bindings.verify_channel_announcement(msg.ptr); Reference.reachabilityFence(msg); if (ret >= 0 && ret <= 4096) { return null; } Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret); @@ -569,7 +647,7 @@ public class UtilMethods { * Note that first_hops (or a relevant inner pointer) may be NULL or all-0s to represent None */ public static Result_RouteLightningErrorZ find_route(byte[] our_node_pubkey, org.ldk.structs.RouteParameters route_params, org.ldk.structs.NetworkGraph network_graph, @Nullable ChannelDetails[] first_hops, org.ldk.structs.Logger logger, org.ldk.structs.ScoreLookUp scorer, org.ldk.structs.ProbabilisticScoringFeeParameters score_params, byte[] random_seed_bytes) { - long ret = bindings.find_route(InternalUtils.check_arr_len(our_node_pubkey, 33), route_params == null ? 0 : route_params.ptr, network_graph == null ? 0 : network_graph.ptr, first_hops != null ? Arrays.stream(first_hops).mapToLong(first_hops_conv_16 -> first_hops_conv_16 == null ? 0 : first_hops_conv_16.ptr).toArray() : null, logger.ptr, scorer.ptr, score_params == null ? 0 : score_params.ptr, InternalUtils.check_arr_len(random_seed_bytes, 32)); + long ret = bindings.find_route(InternalUtils.check_arr_len(our_node_pubkey, 33), route_params.ptr, network_graph.ptr, first_hops != null ? Arrays.stream(first_hops).mapToLong(first_hops_conv_16 -> first_hops_conv_16.ptr).toArray() : null, logger.ptr, scorer.ptr, score_params.ptr, InternalUtils.check_arr_len(random_seed_bytes, 32)); Reference.reachabilityFence(our_node_pubkey); Reference.reachabilityFence(route_params); Reference.reachabilityFence(network_graph); @@ -596,7 +674,7 @@ public class UtilMethods { * Re-uses logic from `find_route`, so the restrictions described there also apply here. */ public static Result_RouteLightningErrorZ build_route_from_hops(byte[] our_node_pubkey, byte[][] hops, org.ldk.structs.RouteParameters route_params, org.ldk.structs.NetworkGraph network_graph, org.ldk.structs.Logger logger, byte[] random_seed_bytes) { - long ret = bindings.build_route_from_hops(InternalUtils.check_arr_len(our_node_pubkey, 33), hops != null ? Arrays.stream(hops).map(hops_conv_8 -> InternalUtils.check_arr_len(hops_conv_8, 33)).toArray(byte[][]::new) : null, route_params == null ? 0 : route_params.ptr, network_graph == null ? 0 : network_graph.ptr, logger.ptr, InternalUtils.check_arr_len(random_seed_bytes, 32)); + long ret = bindings.build_route_from_hops(InternalUtils.check_arr_len(our_node_pubkey, 33), hops != null ? Arrays.stream(hops).map(hops_conv_8 -> InternalUtils.check_arr_len(hops_conv_8, 33)).toArray(byte[][]::new) : null, route_params.ptr, network_graph.ptr, logger.ptr, InternalUtils.check_arr_len(random_seed_bytes, 32)); Reference.reachabilityFence(our_node_pubkey); Reference.reachabilityFence(hops); Reference.reachabilityFence(route_params); @@ -643,19 +721,57 @@ public class UtilMethods { return ret_hu_conv; } + /** + * Creates an [`OnionMessage`] with the given `contents` for sending to the destination of + * `path`, first calling [`Destination::resolve`] on `path.destination` with the given + * [`ReadOnlyNetworkGraph`]. + * + * Returns the node id of the peer to send the message to, the message itself, and any addresses + * needed to connect to the first node. + * + * Note that reply_path (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public static Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ create_onion_message_resolving_destination(org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.NodeIdLookUp node_id_lookup, org.ldk.structs.ReadOnlyNetworkGraph network_graph, org.ldk.structs.OnionMessagePath path, org.ldk.structs.OnionMessageContents contents, @Nullable org.ldk.structs.BlindedPath reply_path) { + long ret = bindings.create_onion_message_resolving_destination(entropy_source.ptr, node_signer.ptr, node_id_lookup.ptr, network_graph.ptr, path.ptr, contents.ptr, reply_path == null ? 0 : reply_path.ptr); + Reference.reachabilityFence(entropy_source); + Reference.reachabilityFence(node_signer); + Reference.reachabilityFence(node_id_lookup); + Reference.reachabilityFence(network_graph); + Reference.reachabilityFence(path); + Reference.reachabilityFence(contents); + Reference.reachabilityFence(reply_path); + if (ret >= 0 && ret <= 4096) { return null; } + Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ ret_hu_conv = Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(entropy_source); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(node_signer); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(node_id_lookup); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(network_graph); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(path); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(contents); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(reply_path); }; + return ret_hu_conv; + } + /** * Creates an [`OnionMessage`] with the given `contents` for sending to the destination of * `path`. * * Returns the node id of the peer to send the message to, the message itself, and any addresses - * need to connect to the first node. + * needed to connect to the first node. + * + * Returns [`SendError::UnresolvedIntroductionNode`] if: + * - `destination` contains a blinded path with an [`IntroductionNode::DirectedShortChannelId`], + * - unless it can be resolved by [`NodeIdLookUp::next_node_id`]. + * Use [`create_onion_message_resolving_destination`] instead to resolve the introduction node + * first with a [`ReadOnlyNetworkGraph`]. * * Note that reply_path (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public static Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ create_onion_message(org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.OnionMessagePath path, org.ldk.structs.OnionMessageContents contents, @Nullable org.ldk.structs.BlindedPath reply_path) { - long ret = bindings.create_onion_message(entropy_source.ptr, node_signer.ptr, path == null ? 0 : path.ptr, contents.ptr, reply_path == null ? 0 : reply_path.ptr); + public static Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ create_onion_message(org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.NodeIdLookUp node_id_lookup, org.ldk.structs.OnionMessagePath path, org.ldk.structs.OnionMessageContents contents, @Nullable org.ldk.structs.BlindedPath reply_path) { + long ret = bindings.create_onion_message(entropy_source.ptr, node_signer.ptr, node_id_lookup.ptr, path.ptr, contents.ptr, reply_path == null ? 0 : reply_path.ptr); Reference.reachabilityFence(entropy_source); Reference.reachabilityFence(node_signer); + Reference.reachabilityFence(node_id_lookup); Reference.reachabilityFence(path); Reference.reachabilityFence(contents); Reference.reachabilityFence(reply_path); @@ -663,6 +779,7 @@ public class UtilMethods { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ ret_hu_conv = Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(entropy_source); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(node_signer); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(node_id_lookup); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(path); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(contents); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(reply_path); }; @@ -676,7 +793,7 @@ public class UtilMethods { * receiver. */ public static Result_PeeledOnionNoneZ peel_onion_message(org.ldk.structs.OnionMessage msg, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.structs.CustomOnionMessageHandler custom_handler) { - long ret = bindings.peel_onion_message(msg == null ? 0 : msg.ptr, node_signer.ptr, logger.ptr, custom_handler.ptr); + long ret = bindings.peel_onion_message(msg.ptr, node_signer.ptr, logger.ptr, custom_handler.ptr); Reference.reachabilityFence(msg); Reference.reachabilityFence(node_signer); Reference.reachabilityFence(logger); @@ -702,10 +819,11 @@ public class UtilMethods { /** * Create a one-hop blinded path for a payment. */ - public static Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_one_hop_for_payment(byte[] payee_node_id, org.ldk.structs.ReceiveTlvs payee_tlvs, org.ldk.structs.EntropySource entropy_source) { - long ret = bindings.BlindedPath_one_hop_for_payment(InternalUtils.check_arr_len(payee_node_id, 33), payee_tlvs == null ? 0 : payee_tlvs.ptr, entropy_source.ptr); + public static Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_one_hop_for_payment(byte[] payee_node_id, org.ldk.structs.ReceiveTlvs payee_tlvs, short min_final_cltv_expiry_delta, org.ldk.structs.EntropySource entropy_source) { + long ret = bindings.BlindedPath_one_hop_for_payment(InternalUtils.check_arr_len(payee_node_id, 33), payee_tlvs.ptr, min_final_cltv_expiry_delta, entropy_source.ptr); Reference.reachabilityFence(payee_node_id); Reference.reachabilityFence(payee_tlvs); + Reference.reachabilityFence(min_final_cltv_expiry_delta); Reference.reachabilityFence(entropy_source); if (ret >= 0 && ret <= 4096) { return null; } Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ ret_hu_conv = Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.constr_from_ptr(ret); @@ -724,12 +842,13 @@ public class UtilMethods { * * [`ForwardTlvs`]: crate::blinded_path::payment::ForwardTlvs */ - public static Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_new_for_payment(ForwardNode[] intermediate_nodes, byte[] payee_node_id, org.ldk.structs.ReceiveTlvs payee_tlvs, long htlc_maximum_msat, org.ldk.structs.EntropySource entropy_source) { - long ret = bindings.BlindedPath_new_for_payment(intermediate_nodes != null ? Arrays.stream(intermediate_nodes).mapToLong(intermediate_nodes_conv_13 -> intermediate_nodes_conv_13 == null ? 0 : intermediate_nodes_conv_13.ptr).toArray() : null, InternalUtils.check_arr_len(payee_node_id, 33), payee_tlvs == null ? 0 : payee_tlvs.ptr, htlc_maximum_msat, entropy_source.ptr); + public static Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_new_for_payment(ForwardNode[] intermediate_nodes, byte[] payee_node_id, org.ldk.structs.ReceiveTlvs payee_tlvs, long htlc_maximum_msat, short min_final_cltv_expiry_delta, org.ldk.structs.EntropySource entropy_source) { + long ret = bindings.BlindedPath_new_for_payment(intermediate_nodes != null ? Arrays.stream(intermediate_nodes).mapToLong(intermediate_nodes_conv_13 -> intermediate_nodes_conv_13.ptr).toArray() : null, InternalUtils.check_arr_len(payee_node_id, 33), payee_tlvs.ptr, htlc_maximum_msat, min_final_cltv_expiry_delta, entropy_source.ptr); Reference.reachabilityFence(intermediate_nodes); Reference.reachabilityFence(payee_node_id); Reference.reachabilityFence(payee_tlvs); Reference.reachabilityFence(htlc_maximum_msat); + Reference.reachabilityFence(min_final_cltv_expiry_delta); Reference.reachabilityFence(entropy_source); if (ret >= 0 && ret <= 4096) { return null; } Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ ret_hu_conv = Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.constr_from_ptr(ret); @@ -798,7 +917,7 @@ public class UtilMethods { * [`ChannelManager::send_preflight_probes`]: lightning::ln::channelmanager::ChannelManager::send_preflight_probes */ public static Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ payment_parameters_from_zero_amount_invoice(org.ldk.structs.Bolt11Invoice invoice, long amount_msat) { - long ret = bindings.payment_parameters_from_zero_amount_invoice(invoice == null ? 0 : invoice.ptr, amount_msat); + long ret = bindings.payment_parameters_from_zero_amount_invoice(invoice.ptr, amount_msat); Reference.reachabilityFence(invoice); Reference.reachabilityFence(amount_msat); if (ret >= 0 && ret <= 4096) { return null; } @@ -821,7 +940,7 @@ public class UtilMethods { * [`ChannelManager::send_preflight_probes`]: lightning::ln::channelmanager::ChannelManager::send_preflight_probes */ public static Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ payment_parameters_from_invoice(org.ldk.structs.Bolt11Invoice invoice) { - long ret = bindings.payment_parameters_from_invoice(invoice == null ? 0 : invoice.ptr); + long ret = bindings.payment_parameters_from_invoice(invoice.ptr); Reference.reachabilityFence(invoice); if (ret >= 0 && ret <= 4096) { return null; } Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ ret_hu_conv = Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.constr_from_ptr(ret); @@ -872,7 +991,7 @@ public class UtilMethods { * available and the current time is supplied by the caller. */ public static Result_Bolt11InvoiceSignOrCreationErrorZ create_phantom_invoice(org.ldk.structs.Option_u64Z amt_msat, org.ldk.structs.Option_ThirtyTwoBytesZ payment_hash, java.lang.String description, int invoice_expiry_delta_secs, PhantomRouteHints[] phantom_route_hints, org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.enums.Currency network, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta, long duration_since_epoch) { - long ret = bindings.create_phantom_invoice(amt_msat.ptr, payment_hash.ptr, description, invoice_expiry_delta_secs, phantom_route_hints != null ? Arrays.stream(phantom_route_hints).mapToLong(phantom_route_hints_conv_19 -> phantom_route_hints_conv_19 == null ? 0 : phantom_route_hints_conv_19.ptr).toArray() : null, entropy_source.ptr, node_signer.ptr, logger.ptr, network, min_final_cltv_expiry_delta.ptr, duration_since_epoch); + long ret = bindings.create_phantom_invoice(amt_msat.ptr, payment_hash.ptr, description, invoice_expiry_delta_secs, phantom_route_hints != null ? Arrays.stream(phantom_route_hints).mapToLong(phantom_route_hints_conv_19 -> phantom_route_hints_conv_19.ptr).toArray() : null, entropy_source.ptr, node_signer.ptr, logger.ptr, network, min_final_cltv_expiry_delta.ptr, duration_since_epoch); Reference.reachabilityFence(amt_msat); Reference.reachabilityFence(payment_hash); Reference.reachabilityFence(description); @@ -937,7 +1056,7 @@ public class UtilMethods { * available and the current time is supplied by the caller. */ public static Result_Bolt11InvoiceSignOrCreationErrorZ create_phantom_invoice_with_description_hash(org.ldk.structs.Option_u64Z amt_msat, org.ldk.structs.Option_ThirtyTwoBytesZ payment_hash, int invoice_expiry_delta_secs, org.ldk.structs.Sha256 description_hash, PhantomRouteHints[] phantom_route_hints, org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.enums.Currency network, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta, long duration_since_epoch) { - long ret = bindings.create_phantom_invoice_with_description_hash(amt_msat.ptr, payment_hash.ptr, invoice_expiry_delta_secs, description_hash == null ? 0 : description_hash.ptr, phantom_route_hints != null ? Arrays.stream(phantom_route_hints).mapToLong(phantom_route_hints_conv_19 -> phantom_route_hints_conv_19 == null ? 0 : phantom_route_hints_conv_19.ptr).toArray() : null, entropy_source.ptr, node_signer.ptr, logger.ptr, network, min_final_cltv_expiry_delta.ptr, duration_since_epoch); + long ret = bindings.create_phantom_invoice_with_description_hash(amt_msat.ptr, payment_hash.ptr, invoice_expiry_delta_secs, description_hash.ptr, phantom_route_hints != null ? Arrays.stream(phantom_route_hints).mapToLong(phantom_route_hints_conv_19 -> phantom_route_hints_conv_19.ptr).toArray() : null, entropy_source.ptr, node_signer.ptr, logger.ptr, network, min_final_cltv_expiry_delta.ptr, duration_since_epoch); Reference.reachabilityFence(amt_msat); Reference.reachabilityFence(payment_hash); Reference.reachabilityFence(invoice_expiry_delta_secs); @@ -980,7 +1099,7 @@ public class UtilMethods { * [`MIN_FINAL_CLTV_EXPIRY_DETLA`]: lightning::ln::channelmanager::MIN_FINAL_CLTV_EXPIRY_DELTA */ public static Result_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager(org.ldk.structs.ChannelManager channelmanager, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.enums.Currency network, org.ldk.structs.Option_u64Z amt_msat, java.lang.String description, int invoice_expiry_delta_secs, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) { - long ret = bindings.create_invoice_from_channelmanager(channelmanager == null ? 0 : channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr); + long ret = bindings.create_invoice_from_channelmanager(channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr); Reference.reachabilityFence(channelmanager); Reference.reachabilityFence(node_signer); Reference.reachabilityFence(logger); @@ -1018,7 +1137,7 @@ public class UtilMethods { * [`MIN_FINAL_CLTV_EXPIRY_DETLA`]: lightning::ln::channelmanager::MIN_FINAL_CLTV_EXPIRY_DELTA */ public static Result_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_with_description_hash(org.ldk.structs.ChannelManager channelmanager, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.enums.Currency network, org.ldk.structs.Option_u64Z amt_msat, org.ldk.structs.Sha256 description_hash, int invoice_expiry_delta_secs, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) { - long ret = bindings.create_invoice_from_channelmanager_with_description_hash(channelmanager == null ? 0 : channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description_hash == null ? 0 : description_hash.ptr, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr); + long ret = bindings.create_invoice_from_channelmanager_with_description_hash(channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description_hash.ptr, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr); Reference.reachabilityFence(channelmanager); Reference.reachabilityFence(node_signer); Reference.reachabilityFence(logger); @@ -1044,7 +1163,7 @@ public class UtilMethods { * available and the current time is supplied by the caller. */ public static Result_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(org.ldk.structs.ChannelManager channelmanager, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.enums.Currency network, org.ldk.structs.Option_u64Z amt_msat, org.ldk.structs.Sha256 description_hash, long duration_since_epoch, int invoice_expiry_delta_secs, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) { - long ret = bindings.create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(channelmanager == null ? 0 : channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description_hash == null ? 0 : description_hash.ptr, duration_since_epoch, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr); + long ret = bindings.create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description_hash.ptr, duration_since_epoch, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr); Reference.reachabilityFence(channelmanager); Reference.reachabilityFence(node_signer); Reference.reachabilityFence(logger); @@ -1071,7 +1190,7 @@ public class UtilMethods { * available and the current time is supplied by the caller. */ public static Result_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_and_duration_since_epoch(org.ldk.structs.ChannelManager channelmanager, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.enums.Currency network, org.ldk.structs.Option_u64Z amt_msat, java.lang.String description, long duration_since_epoch, int invoice_expiry_delta_secs, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) { - long ret = bindings.create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager == null ? 0 : channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description, duration_since_epoch, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr); + long ret = bindings.create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description, duration_since_epoch, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr); Reference.reachabilityFence(channelmanager); Reference.reachabilityFence(node_signer); Reference.reachabilityFence(logger); @@ -1098,7 +1217,7 @@ public class UtilMethods { * the payment hash is also involved outside the scope of lightning. */ public static Result_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_and_duration_since_epoch_with_payment_hash(org.ldk.structs.ChannelManager channelmanager, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.enums.Currency network, org.ldk.structs.Option_u64Z amt_msat, java.lang.String description, long duration_since_epoch, int invoice_expiry_delta_secs, byte[] payment_hash, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) { - long ret = bindings.create_invoice_from_channelmanager_and_duration_since_epoch_with_payment_hash(channelmanager == null ? 0 : channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description, duration_since_epoch, invoice_expiry_delta_secs, InternalUtils.check_arr_len(payment_hash, 32), min_final_cltv_expiry_delta.ptr); + long ret = bindings.create_invoice_from_channelmanager_and_duration_since_epoch_with_payment_hash(channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description, duration_since_epoch, invoice_expiry_delta_secs, InternalUtils.check_arr_len(payment_hash, 32), min_final_cltv_expiry_delta.ptr); Reference.reachabilityFence(channelmanager); Reference.reachabilityFence(node_signer); Reference.reachabilityFence(logger); diff --git a/src/main/java/org/ldk/structs/Utxo.java b/src/main/java/org/ldk/structs/Utxo.java index c9b06cb8..0787f349 100644 --- a/src/main/java/org/ldk/structs/Utxo.java +++ b/src/main/java/org/ldk/structs/Utxo.java @@ -37,7 +37,7 @@ public class Utxo extends CommonBase { * The unique identifier of the output. */ public void set_outpoint(org.ldk.structs.OutPoint val) { - bindings.Utxo_set_outpoint(this.ptr, val == null ? 0 : val.ptr); + bindings.Utxo_set_outpoint(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -89,7 +89,7 @@ public class Utxo extends CommonBase { * Constructs a new Utxo given each field */ public static Utxo of(org.ldk.structs.OutPoint outpoint_arg, org.ldk.structs.TxOut output_arg, long satisfaction_weight_arg) { - long ret = bindings.Utxo_new(outpoint_arg == null ? 0 : outpoint_arg.ptr, output_arg.ptr, satisfaction_weight_arg); + long ret = bindings.Utxo_new(outpoint_arg.ptr, output_arg.ptr, satisfaction_weight_arg); Reference.reachabilityFence(outpoint_arg); Reference.reachabilityFence(output_arg); Reference.reachabilityFence(satisfaction_weight_arg); @@ -136,7 +136,7 @@ public class Utxo extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.Utxo b) { - boolean ret = bindings.Utxo_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.Utxo_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; @@ -151,7 +151,7 @@ public class Utxo extends CommonBase { * Returns a `Utxo` with the `satisfaction_weight` estimate for a legacy P2PKH output. */ public static Utxo new_p2pkh(org.ldk.structs.OutPoint outpoint, long value, byte[] pubkey_hash) { - long ret = bindings.Utxo_new_p2pkh(outpoint == null ? 0 : outpoint.ptr, value, InternalUtils.check_arr_len(pubkey_hash, 20)); + long ret = bindings.Utxo_new_p2pkh(outpoint.ptr, value, InternalUtils.check_arr_len(pubkey_hash, 20)); Reference.reachabilityFence(outpoint); Reference.reachabilityFence(value); Reference.reachabilityFence(pubkey_hash); diff --git a/src/main/java/org/ldk/structs/UtxoFuture.java b/src/main/java/org/ldk/structs/UtxoFuture.java index 139098a3..9db9b628 100644 --- a/src/main/java/org/ldk/structs/UtxoFuture.java +++ b/src/main/java/org/ldk/structs/UtxoFuture.java @@ -65,7 +65,7 @@ public class UtxoFuture extends CommonBase { * [`PeerManager::process_events`]: crate::ln::peer_handler::PeerManager::process_events */ public void resolve_without_forwarding(org.ldk.structs.NetworkGraph graph, org.ldk.structs.Result_TxOutUtxoLookupErrorZ result) { - bindings.UtxoFuture_resolve_without_forwarding(this.ptr, graph == null ? 0 : graph.ptr, result != null ? result.ptr : 0); + bindings.UtxoFuture_resolve_without_forwarding(this.ptr, graph.ptr, result.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(graph); Reference.reachabilityFence(result); @@ -86,7 +86,7 @@ public class UtxoFuture extends CommonBase { * [`PeerManager::process_events`]: crate::ln::peer_handler::PeerManager::process_events */ public void resolve(org.ldk.structs.NetworkGraph graph, org.ldk.structs.P2PGossipSync gossip, org.ldk.structs.Result_TxOutUtxoLookupErrorZ result) { - bindings.UtxoFuture_resolve(this.ptr, graph == null ? 0 : graph.ptr, gossip == null ? 0 : gossip.ptr, result != null ? result.ptr : 0); + bindings.UtxoFuture_resolve(this.ptr, graph.ptr, gossip.ptr, result.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(graph); Reference.reachabilityFence(gossip); diff --git a/src/main/java/org/ldk/structs/UtxoLookup.java b/src/main/java/org/ldk/structs/UtxoLookup.java index c9346de4..776ff806 100644 --- a/src/main/java/org/ldk/structs/UtxoLookup.java +++ b/src/main/java/org/ldk/structs/UtxoLookup.java @@ -53,7 +53,7 @@ public class UtxoLookup extends CommonBase { @Override public long get_utxo(byte[] chain_hash, long short_channel_id) { UtxoResult ret = arg.get_utxo(chain_hash, short_channel_id); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); if (impl_holder.held != null) { impl_holder.held.ptrs_to.add(ret); }; return result; } diff --git a/src/main/java/org/ldk/structs/UtxoResult.java b/src/main/java/org/ldk/structs/UtxoResult.java index 0d4d3469..c9abe3c3 100644 --- a/src/main/java/org/ldk/structs/UtxoResult.java +++ b/src/main/java/org/ldk/structs/UtxoResult.java @@ -86,7 +86,7 @@ public class UtxoResult extends CommonBase { * Utility method to constructs a new Sync-variant UtxoResult */ public static UtxoResult sync(org.ldk.structs.Result_TxOutUtxoLookupErrorZ a) { - long ret = bindings.UtxoResult_sync(a != null ? a.ptr : 0); + long ret = bindings.UtxoResult_sync(a.ptr); Reference.reachabilityFence(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.UtxoResult ret_hu_conv = org.ldk.structs.UtxoResult.constr_from_ptr(ret); @@ -98,7 +98,7 @@ public class UtxoResult extends CommonBase { * Utility method to constructs a new Async-variant UtxoResult */ public static UtxoResult async(org.ldk.structs.UtxoFuture a) { - long ret = bindings.UtxoResult_async(a == null ? 0 : a.ptr); + long ret = bindings.UtxoResult_async(a.ptr); Reference.reachabilityFence(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.UtxoResult ret_hu_conv = org.ldk.structs.UtxoResult.constr_from_ptr(ret); diff --git a/src/main/java/org/ldk/structs/VerifiedInvoiceRequest.java b/src/main/java/org/ldk/structs/VerifiedInvoiceRequest.java index 38b0d8ff..902fd3b5 100644 --- a/src/main/java/org/ldk/structs/VerifiedInvoiceRequest.java +++ b/src/main/java/org/ldk/structs/VerifiedInvoiceRequest.java @@ -21,6 +21,28 @@ public class VerifiedInvoiceRequest extends CommonBase { if (ptr != 0) { bindings.VerifiedInvoiceRequest_free(ptr); } } + /** + * The identifier of the [`Offer`] for which the [`InvoiceRequest`] was made. + */ + public OfferId get_offer_id() { + long ret = bindings.VerifiedInvoiceRequest_get_offer_id(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OfferId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * The identifier of the [`Offer`] for which the [`InvoiceRequest`] was made. + */ + public void set_offer_id(org.ldk.structs.OfferId val) { + bindings.VerifiedInvoiceRequest_set_offer_id(this.ptr, val.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; + } + /** * Keys used for signing a [`Bolt12Invoice`] if they can be derived. * @@ -101,15 +123,12 @@ public class VerifiedInvoiceRequest extends CommonBase { /** * The minimum amount required for a successful payment of a single item. - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ - @Nullable - public Amount amount() { + public Option_AmountZ amount() { long ret = bindings.VerifiedInvoiceRequest_amount(this.ptr); Reference.reachabilityFence(this); if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Amount ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Amount(null, ret); } + org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; return ret_hu_conv; } @@ -117,7 +136,10 @@ public class VerifiedInvoiceRequest extends CommonBase { /** * A complete description of the purpose of the payment. Intended to be displayed to the user * but with the caveat that it has not been verified in any way. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ + @Nullable public PrintableString description() { long ret = bindings.VerifiedInvoiceRequest_description(this.ptr); Reference.reachabilityFence(this); @@ -194,14 +216,17 @@ public class VerifiedInvoiceRequest extends CommonBase { long ret = bindings.VerifiedInvoiceRequest_supported_quantity(this.ptr); Reference.reachabilityFence(this); if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Quantity ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Quantity(null, ret); } + org.ldk.structs.Quantity ret_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; return ret_hu_conv; } /** * The public key used by the recipient to sign invoices. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ + @Nullable public byte[] signing_pubkey() { byte[] ret = bindings.VerifiedInvoiceRequest_signing_pubkey(this.ptr); Reference.reachabilityFence(this); @@ -293,4 +318,98 @@ public class VerifiedInvoiceRequest extends CommonBase { return ret_hu_conv; } + /** + * Creates an [`InvoiceBuilder`] for the request with the given required fields and using the + * [`Duration`] since [`std::time::SystemTime::UNIX_EPOCH`] as the creation time. + * + * See [`InvoiceRequest::respond_with_no_std`] for further details where the aforementioned + * creation time is used for the `created_at` parameter. + * + * [`Duration`]: core::time::Duration + */ + public Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ respond_with(TwoTuple_BlindedPayInfoBlindedPathZ[] payment_paths, byte[] payment_hash) { + long ret = bindings.VerifiedInvoiceRequest_respond_with(this.ptr, payment_paths != null ? Arrays.stream(payment_paths).mapToLong(payment_paths_conv_37 -> payment_paths_conv_37.ptr).toArray() : null, InternalUtils.check_arr_len(payment_hash, 32)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(payment_paths); + Reference.reachabilityFence(payment_hash); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Creates an [`InvoiceBuilder`] for the request with the given required fields. + * + * Unless [`InvoiceBuilder::relative_expiry`] is set, the invoice will expire two hours after + * `created_at`, which is used to set [`Bolt12Invoice::created_at`]. Useful for `no-std` builds + * where [`std::time::SystemTime`] is not available. + * + * The caller is expected to remember the preimage of `payment_hash` in order to claim a payment + * for the invoice. + * + * The `payment_paths` parameter is useful for maintaining the payment recipient's privacy. It + * must contain one or more elements ordered from most-preferred to least-preferred, if there's + * a preference. Note, however, that any privacy is lost if a public node id was used for + * [`Offer::signing_pubkey`]. + * + * Errors if the request contains unknown required features. + * + * # Note + * + * If the originating [`Offer`] was created using [`OfferBuilder::deriving_signing_pubkey`], + * then use [`InvoiceRequest::verify`] and [`VerifiedInvoiceRequest`] methods instead. + * + * [`Bolt12Invoice::created_at`]: crate::offers::invoice::Bolt12Invoice::created_at + * [`OfferBuilder::deriving_signing_pubkey`]: crate::offers::offer::OfferBuilder::deriving_signing_pubkey + */ + public Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ respond_with_no_std(TwoTuple_BlindedPayInfoBlindedPathZ[] payment_paths, byte[] payment_hash, long created_at) { + long ret = bindings.VerifiedInvoiceRequest_respond_with_no_std(this.ptr, payment_paths != null ? Arrays.stream(payment_paths).mapToLong(payment_paths_conv_37 -> payment_paths_conv_37.ptr).toArray() : null, InternalUtils.check_arr_len(payment_hash, 32), created_at); + Reference.reachabilityFence(this); + Reference.reachabilityFence(payment_paths); + Reference.reachabilityFence(payment_hash); + Reference.reachabilityFence(created_at); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Creates an [`InvoiceBuilder`] for the request using the given required fields and that uses + * derived signing keys from the originating [`Offer`] to sign the [`Bolt12Invoice`]. Must use + * the same [`ExpandedKey`] as the one used to create the offer. + * + * See [`InvoiceRequest::respond_with`] for further details. + * + * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice + */ + public Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ respond_using_derived_keys(TwoTuple_BlindedPayInfoBlindedPathZ[] payment_paths, byte[] payment_hash) { + long ret = bindings.VerifiedInvoiceRequest_respond_using_derived_keys(this.ptr, payment_paths != null ? Arrays.stream(payment_paths).mapToLong(payment_paths_conv_37 -> payment_paths_conv_37.ptr).toArray() : null, InternalUtils.check_arr_len(payment_hash, 32)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(payment_paths); + Reference.reachabilityFence(payment_hash); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Creates an [`InvoiceBuilder`] for the request using the given required fields and that uses + * derived signing keys from the originating [`Offer`] to sign the [`Bolt12Invoice`]. Must use + * the same [`ExpandedKey`] as the one used to create the offer. + * + * See [`InvoiceRequest::respond_with_no_std`] for further details. + * + * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice + */ + public Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ respond_using_derived_keys_no_std(TwoTuple_BlindedPayInfoBlindedPathZ[] payment_paths, byte[] payment_hash, long created_at) { + long ret = bindings.VerifiedInvoiceRequest_respond_using_derived_keys_no_std(this.ptr, payment_paths != null ? Arrays.stream(payment_paths).mapToLong(payment_paths_conv_37 -> payment_paths_conv_37.ptr).toArray() : null, InternalUtils.check_arr_len(payment_hash, 32), created_at); + Reference.reachabilityFence(this); + Reference.reachabilityFence(payment_paths); + Reference.reachabilityFence(payment_hash); + Reference.reachabilityFence(created_at); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + } diff --git a/src/main/java/org/ldk/structs/WalletSource.java b/src/main/java/org/ldk/structs/WalletSource.java index 8975da54..de198506 100644 --- a/src/main/java/org/ldk/structs/WalletSource.java +++ b/src/main/java/org/ldk/structs/WalletSource.java @@ -64,19 +64,19 @@ public class WalletSource extends CommonBase { @Override public long list_confirmed_utxos() { Result_CVec_UtxoZNoneZ ret = arg.list_confirmed_utxos(); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long get_change_script() { Result_CVec_u8ZNoneZ ret = arg.get_change_script(); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public long sign_psbt(byte[] psbt) { Result_TransactionNoneZ ret = arg.sign_psbt(psbt); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } }); diff --git a/src/main/java/org/ldk/structs/WarningMessage.java b/src/main/java/org/ldk/structs/WarningMessage.java index daeeea40..5b5197da 100644 --- a/src/main/java/org/ldk/structs/WarningMessage.java +++ b/src/main/java/org/ldk/structs/WarningMessage.java @@ -27,10 +27,13 @@ public class WarningMessage extends CommonBase { * * All-0s indicates a warning unrelated to a specific channel. */ - public byte[] get_channel_id() { - byte[] ret = bindings.WarningMessage_get_channel_id(this.ptr); + public ChannelId get_channel_id() { + long ret = bindings.WarningMessage_get_channel_id(this.ptr); Reference.reachabilityFence(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; } /** @@ -38,10 +41,11 @@ public class WarningMessage extends CommonBase { * * All-0s indicates a warning unrelated to a specific channel. */ - public void set_channel_id(byte[] val) { - bindings.WarningMessage_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.WarningMessage_set_channel_id(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); + if (this != null) { this.ptrs_to.add(val); }; } /** @@ -73,13 +77,14 @@ public class WarningMessage extends CommonBase { /** * Constructs a new WarningMessage given each field */ - public static WarningMessage of(byte[] channel_id_arg, java.lang.String data_arg) { - long ret = bindings.WarningMessage_new(InternalUtils.check_arr_len(channel_id_arg, 32), data_arg); + public static WarningMessage of(org.ldk.structs.ChannelId channel_id_arg, java.lang.String data_arg) { + long ret = bindings.WarningMessage_new(channel_id_arg.ptr, data_arg); Reference.reachabilityFence(channel_id_arg); Reference.reachabilityFence(data_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.WarningMessage ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.WarningMessage(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); }; return ret_hu_conv; } @@ -119,7 +124,7 @@ public class WarningMessage extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.WarningMessage b) { - boolean ret = bindings.WarningMessage_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.WarningMessage_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/Watch.java b/src/main/java/org/ldk/structs/Watch.java index 5f6ee548..6cf9760c 100644 --- a/src/main/java/org/ldk/structs/Watch.java +++ b/src/main/java/org/ldk/structs/Watch.java @@ -93,7 +93,7 @@ public class Watch extends CommonBase { * For details on asynchronous [`ChannelMonitor`] updating and returning * [`MonitorEvent::Completed`] here, see [`ChannelMonitorUpdateStatus::InProgress`]. */ - ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[] release_pending_monitor_events(); + FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ[] release_pending_monitor_events(); } private static class LDKWatchHolder { Watch held; } public static Watch new_impl(WatchInterface arg) { @@ -106,7 +106,7 @@ public class Watch extends CommonBase { if (monitor_hu_conv != null) { monitor_hu_conv.ptrs_to.add(this); }; Result_ChannelMonitorUpdateStatusNoneZ ret = arg.watch_channel(funding_txo_hu_conv, monitor_hu_conv); Reference.reachabilityFence(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } @Override public ChannelMonitorUpdateStatus update_channel(long funding_txo, long update) { @@ -118,9 +118,9 @@ public class Watch extends CommonBase { return ret; } @Override public long[] release_pending_monitor_events() { - ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[] ret = arg.release_pending_monitor_events(); + FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ[] ret = arg.release_pending_monitor_events(); Reference.reachabilityFence(arg); - long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_49 -> ret_conv_49 == null ? 0 : ret_conv_49.clone_ptr()).toArray() : null; + long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_57 -> ret_conv_57.clone_ptr()).toArray() : null; return result; } }); @@ -144,7 +144,7 @@ public class Watch extends CommonBase { * [`block_disconnected`]: channelmonitor::ChannelMonitor::block_disconnected */ public Result_ChannelMonitorUpdateStatusNoneZ watch_channel(org.ldk.structs.OutPoint funding_txo, org.ldk.structs.ChannelMonitor monitor) { - long ret = bindings.Watch_watch_channel(this.ptr, funding_txo == null ? 0 : funding_txo.ptr, monitor == null ? 0 : monitor.ptr); + long ret = bindings.Watch_watch_channel(this.ptr, funding_txo.ptr, monitor.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(funding_txo); Reference.reachabilityFence(monitor); @@ -173,7 +173,7 @@ public class Watch extends CommonBase { * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager */ public ChannelMonitorUpdateStatus update_channel(org.ldk.structs.OutPoint funding_txo, org.ldk.structs.ChannelMonitorUpdate update) { - ChannelMonitorUpdateStatus ret = bindings.Watch_update_channel(this.ptr, funding_txo == null ? 0 : funding_txo.ptr, update == null ? 0 : update.ptr); + ChannelMonitorUpdateStatus ret = bindings.Watch_update_channel(this.ptr, funding_txo.ptr, update.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(funding_txo); Reference.reachabilityFence(update); @@ -193,18 +193,18 @@ public class Watch extends CommonBase { * For details on asynchronous [`ChannelMonitor`] updating and returning * [`MonitorEvent::Completed`] here, see [`ChannelMonitorUpdateStatus::InProgress`]. */ - public ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[] release_pending_monitor_events() { + public FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ[] release_pending_monitor_events() { long[] ret = bindings.Watch_release_pending_monitor_events(this.ptr); Reference.reachabilityFence(this); - int ret_conv_49_len = ret.length; - ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[] ret_conv_49_arr = new ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[ret_conv_49_len]; - for (int x = 0; x < ret_conv_49_len; x++) { - long ret_conv_49 = ret[x]; - ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ ret_conv_49_hu_conv = new ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ(null, ret_conv_49); - if (ret_conv_49_hu_conv != null) { ret_conv_49_hu_conv.ptrs_to.add(this); }; - ret_conv_49_arr[x] = ret_conv_49_hu_conv; + int ret_conv_57_len = ret.length; + FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ[] ret_conv_57_arr = new FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ[ret_conv_57_len]; + for (int f = 0; f < ret_conv_57_len; f++) { + long ret_conv_57 = ret[f]; + FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ ret_conv_57_hu_conv = new FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ(null, ret_conv_57); + if (ret_conv_57_hu_conv != null) { ret_conv_57_hu_conv.ptrs_to.add(this); }; + ret_conv_57_arr[f] = ret_conv_57_hu_conv; } - return ret_conv_49_arr; + return ret_conv_57_arr; } } diff --git a/src/main/java/org/ldk/structs/WatchedOutput.java b/src/main/java/org/ldk/structs/WatchedOutput.java index 4319efec..0f5a607e 100644 --- a/src/main/java/org/ldk/structs/WatchedOutput.java +++ b/src/main/java/org/ldk/structs/WatchedOutput.java @@ -68,7 +68,7 @@ public class WatchedOutput extends CommonBase { * Outpoint identifying the transaction output. */ public void set_outpoint(org.ldk.structs.OutPoint val) { - bindings.WatchedOutput_set_outpoint(this.ptr, val == null ? 0 : val.ptr); + bindings.WatchedOutput_set_outpoint(this.ptr, val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); if (this != null) { this.ptrs_to.add(val); }; @@ -96,7 +96,7 @@ public class WatchedOutput extends CommonBase { * Constructs a new WatchedOutput given each field */ public static WatchedOutput of(org.ldk.structs.Option_ThirtyTwoBytesZ block_hash_arg, org.ldk.structs.OutPoint outpoint_arg, byte[] script_pubkey_arg) { - long ret = bindings.WatchedOutput_new(block_hash_arg.ptr, outpoint_arg == null ? 0 : outpoint_arg.ptr, script_pubkey_arg); + long ret = bindings.WatchedOutput_new(block_hash_arg.ptr, outpoint_arg.ptr, script_pubkey_arg); Reference.reachabilityFence(block_hash_arg); Reference.reachabilityFence(outpoint_arg); Reference.reachabilityFence(script_pubkey_arg); @@ -132,7 +132,7 @@ public class WatchedOutput extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.WatchedOutput b) { - boolean ret = bindings.WatchedOutput_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.WatchedOutput_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; diff --git a/src/main/java/org/ldk/structs/WriteableEcdsaChannelSigner.java b/src/main/java/org/ldk/structs/WriteableEcdsaChannelSigner.java index 7575d368..8509f831 100644 --- a/src/main/java/org/ldk/structs/WriteableEcdsaChannelSigner.java +++ b/src/main/java/org/ldk/structs/WriteableEcdsaChannelSigner.java @@ -21,7 +21,7 @@ public class WriteableEcdsaChannelSigner extends CommonBase { final bindings.LDKWriteableEcdsaChannelSigner bindings_instance; WriteableEcdsaChannelSigner(Object _dummy, long ptr) { super(ptr); bindings_instance = null; } private WriteableEcdsaChannelSigner(bindings.LDKWriteableEcdsaChannelSigner arg, bindings.LDKEcdsaChannelSigner EcdsaChannelSigner, bindings.LDKChannelSigner ChannelSigner, ChannelPublicKeys pubkeys) { - super(bindings.LDKWriteableEcdsaChannelSigner_new(arg, EcdsaChannelSigner, ChannelSigner, pubkeys == null ? 0 : pubkeys.clone_ptr())); + super(bindings.LDKWriteableEcdsaChannelSigner_new(arg, EcdsaChannelSigner, ChannelSigner, pubkeys.clone_ptr())); this.ptrs_to.add(arg); this.ptrs_to.add(EcdsaChannelSigner); this.ptrs_to.add(ChannelSigner); diff --git a/src/main/jni/bindings.c b/src/main/jni/bindings.c index 175a178c..c7202b27 100644 --- a/src/main/jni/bindings.c +++ b/src/main/jni/bindings.c @@ -393,10 +393,11 @@ static inline LDKBolt12SemanticError LDKBolt12SemanticError_from_java(JNIEnv *en case 20: return LDKBolt12SemanticError_MissingPayerId; case 21: return LDKBolt12SemanticError_DuplicatePaymentId; case 22: return LDKBolt12SemanticError_MissingPaths; - case 23: return LDKBolt12SemanticError_InvalidPayInfo; - case 24: return LDKBolt12SemanticError_MissingCreationTime; - case 25: return LDKBolt12SemanticError_MissingPaymentHash; - case 26: return LDKBolt12SemanticError_MissingSignature; + case 23: return LDKBolt12SemanticError_UnexpectedPaths; + case 24: return LDKBolt12SemanticError_InvalidPayInfo; + case 25: return LDKBolt12SemanticError_MissingCreationTime; + case 26: return LDKBolt12SemanticError_MissingPaymentHash; + case 27: return LDKBolt12SemanticError_MissingSignature; } (*env)->FatalError(env, "A call to Bolt12SemanticError.ordinal() from rust returned an invalid value."); abort(); // Unreachable, but will let the compiler know we don't return here @@ -425,6 +426,7 @@ static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_MissingPayerMetadata static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_MissingPayerId = NULL; static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_DuplicatePaymentId = NULL; static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_MissingPaths = NULL; +static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_UnexpectedPaths = NULL; static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_InvalidPayInfo = NULL; static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_MissingCreationTime = NULL; static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_MissingPaymentHash = NULL; @@ -478,6 +480,8 @@ JNIEXPORT void JNICALL Java_org_ldk_enums_Bolt12SemanticError_init (JNIEnv *env, CHECK(Bolt12SemanticError_LDKBolt12SemanticError_DuplicatePaymentId != NULL); Bolt12SemanticError_LDKBolt12SemanticError_MissingPaths = (*env)->GetStaticFieldID(env, Bolt12SemanticError_class, "LDKBolt12SemanticError_MissingPaths", "Lorg/ldk/enums/Bolt12SemanticError;"); CHECK(Bolt12SemanticError_LDKBolt12SemanticError_MissingPaths != NULL); + Bolt12SemanticError_LDKBolt12SemanticError_UnexpectedPaths = (*env)->GetStaticFieldID(env, Bolt12SemanticError_class, "LDKBolt12SemanticError_UnexpectedPaths", "Lorg/ldk/enums/Bolt12SemanticError;"); + CHECK(Bolt12SemanticError_LDKBolt12SemanticError_UnexpectedPaths != NULL); Bolt12SemanticError_LDKBolt12SemanticError_InvalidPayInfo = (*env)->GetStaticFieldID(env, Bolt12SemanticError_class, "LDKBolt12SemanticError_InvalidPayInfo", "Lorg/ldk/enums/Bolt12SemanticError;"); CHECK(Bolt12SemanticError_LDKBolt12SemanticError_InvalidPayInfo != NULL); Bolt12SemanticError_LDKBolt12SemanticError_MissingCreationTime = (*env)->GetStaticFieldID(env, Bolt12SemanticError_class, "LDKBolt12SemanticError_MissingCreationTime", "Lorg/ldk/enums/Bolt12SemanticError;"); @@ -535,6 +539,8 @@ static inline jclass LDKBolt12SemanticError_to_java(JNIEnv *env, LDKBolt12Semant return (*env)->GetStaticObjectField(env, Bolt12SemanticError_class, Bolt12SemanticError_LDKBolt12SemanticError_DuplicatePaymentId); case LDKBolt12SemanticError_MissingPaths: return (*env)->GetStaticObjectField(env, Bolt12SemanticError_class, Bolt12SemanticError_LDKBolt12SemanticError_MissingPaths); + case LDKBolt12SemanticError_UnexpectedPaths: + return (*env)->GetStaticObjectField(env, Bolt12SemanticError_class, Bolt12SemanticError_LDKBolt12SemanticError_UnexpectedPaths); case LDKBolt12SemanticError_InvalidPayInfo: return (*env)->GetStaticObjectField(env, Bolt12SemanticError_class, Bolt12SemanticError_LDKBolt12SemanticError_InvalidPayInfo); case LDKBolt12SemanticError_MissingCreationTime: @@ -686,6 +692,7 @@ static inline LDKConfirmationTarget LDKConfirmationTarget_from_java(JNIEnv *env, case 3: return LDKConfirmationTarget_AnchorChannelFee; case 4: return LDKConfirmationTarget_NonAnchorChannelFee; case 5: return LDKConfirmationTarget_ChannelCloseMinimum; + case 6: return LDKConfirmationTarget_OutputSpendingFee; } (*env)->FatalError(env, "A call to ConfirmationTarget.ordinal() from rust returned an invalid value."); abort(); // Unreachable, but will let the compiler know we don't return here @@ -697,6 +704,7 @@ static jfieldID ConfirmationTarget_LDKConfirmationTarget_MinAllowedNonAnchorChan static jfieldID ConfirmationTarget_LDKConfirmationTarget_AnchorChannelFee = NULL; static jfieldID ConfirmationTarget_LDKConfirmationTarget_NonAnchorChannelFee = NULL; static jfieldID ConfirmationTarget_LDKConfirmationTarget_ChannelCloseMinimum = NULL; +static jfieldID ConfirmationTarget_LDKConfirmationTarget_OutputSpendingFee = NULL; JNIEXPORT void JNICALL Java_org_ldk_enums_ConfirmationTarget_init (JNIEnv *env, jclass clz) { ConfirmationTarget_class = (*env)->NewGlobalRef(env, clz); CHECK(ConfirmationTarget_class != NULL); @@ -712,6 +720,8 @@ JNIEXPORT void JNICALL Java_org_ldk_enums_ConfirmationTarget_init (JNIEnv *env, CHECK(ConfirmationTarget_LDKConfirmationTarget_NonAnchorChannelFee != NULL); ConfirmationTarget_LDKConfirmationTarget_ChannelCloseMinimum = (*env)->GetStaticFieldID(env, ConfirmationTarget_class, "LDKConfirmationTarget_ChannelCloseMinimum", "Lorg/ldk/enums/ConfirmationTarget;"); CHECK(ConfirmationTarget_LDKConfirmationTarget_ChannelCloseMinimum != NULL); + ConfirmationTarget_LDKConfirmationTarget_OutputSpendingFee = (*env)->GetStaticFieldID(env, ConfirmationTarget_class, "LDKConfirmationTarget_OutputSpendingFee", "Lorg/ldk/enums/ConfirmationTarget;"); + CHECK(ConfirmationTarget_LDKConfirmationTarget_OutputSpendingFee != NULL); } static inline jclass LDKConfirmationTarget_to_java(JNIEnv *env, LDKConfirmationTarget val) { switch (val) { @@ -727,6 +737,8 @@ static inline jclass LDKConfirmationTarget_to_java(JNIEnv *env, LDKConfirmationT return (*env)->GetStaticObjectField(env, ConfirmationTarget_class, ConfirmationTarget_LDKConfirmationTarget_NonAnchorChannelFee); case LDKConfirmationTarget_ChannelCloseMinimum: return (*env)->GetStaticObjectField(env, ConfirmationTarget_class, ConfirmationTarget_LDKConfirmationTarget_ChannelCloseMinimum); + case LDKConfirmationTarget_OutputSpendingFee: + return (*env)->GetStaticObjectField(env, ConfirmationTarget_class, ConfirmationTarget_LDKConfirmationTarget_OutputSpendingFee); default: abort(); } } @@ -841,6 +853,40 @@ static inline jclass LDKCurrency_to_java(JNIEnv *env, LDKCurrency val) { } } +static inline LDKDirection LDKDirection_from_java(JNIEnv *env, jclass clz) { + jint ord = (*env)->CallIntMethod(env, clz, ordinal_meth); + if (UNLIKELY((*env)->ExceptionCheck(env))) { + (*env)->ExceptionDescribe(env); + (*env)->FatalError(env, "A call to Direction.ordinal() from rust threw an exception."); + } + switch (ord) { + case 0: return LDKDirection_NodeOne; + case 1: return LDKDirection_NodeTwo; + } + (*env)->FatalError(env, "A call to Direction.ordinal() from rust returned an invalid value."); + abort(); // Unreachable, but will let the compiler know we don't return here +} +static jclass Direction_class = NULL; +static jfieldID Direction_LDKDirection_NodeOne = NULL; +static jfieldID Direction_LDKDirection_NodeTwo = NULL; +JNIEXPORT void JNICALL Java_org_ldk_enums_Direction_init (JNIEnv *env, jclass clz) { + Direction_class = (*env)->NewGlobalRef(env, clz); + CHECK(Direction_class != NULL); + Direction_LDKDirection_NodeOne = (*env)->GetStaticFieldID(env, Direction_class, "LDKDirection_NodeOne", "Lorg/ldk/enums/Direction;"); + CHECK(Direction_LDKDirection_NodeOne != NULL); + Direction_LDKDirection_NodeTwo = (*env)->GetStaticFieldID(env, Direction_class, "LDKDirection_NodeTwo", "Lorg/ldk/enums/Direction;"); + CHECK(Direction_LDKDirection_NodeTwo != NULL); +} +static inline jclass LDKDirection_to_java(JNIEnv *env, LDKDirection val) { + switch (val) { + case LDKDirection_NodeOne: + return (*env)->GetStaticObjectField(env, Direction_class, Direction_LDKDirection_NodeOne); + case LDKDirection_NodeTwo: + return (*env)->GetStaticObjectField(env, Direction_class, Direction_LDKDirection_NodeTwo); + default: abort(); + } +} + static inline LDKHTLCClaim LDKHTLCClaim_from_java(JNIEnv *env, jclass clz) { jint ord = (*env)->CallIntMethod(env, clz, ordinal_meth); if (UNLIKELY((*env)->ExceptionCheck(env))) { @@ -1347,6 +1393,46 @@ static inline jclass LDKSecp256k1Error_to_java(JNIEnv *env, LDKSecp256k1Error va } } +static inline LDKShortChannelIdError LDKShortChannelIdError_from_java(JNIEnv *env, jclass clz) { + jint ord = (*env)->CallIntMethod(env, clz, ordinal_meth); + if (UNLIKELY((*env)->ExceptionCheck(env))) { + (*env)->ExceptionDescribe(env); + (*env)->FatalError(env, "A call to ShortChannelIdError.ordinal() from rust threw an exception."); + } + switch (ord) { + case 0: return LDKShortChannelIdError_BlockOverflow; + case 1: return LDKShortChannelIdError_TxIndexOverflow; + case 2: return LDKShortChannelIdError_VoutIndexOverflow; + } + (*env)->FatalError(env, "A call to ShortChannelIdError.ordinal() from rust returned an invalid value."); + abort(); // Unreachable, but will let the compiler know we don't return here +} +static jclass ShortChannelIdError_class = NULL; +static jfieldID ShortChannelIdError_LDKShortChannelIdError_BlockOverflow = NULL; +static jfieldID ShortChannelIdError_LDKShortChannelIdError_TxIndexOverflow = NULL; +static jfieldID ShortChannelIdError_LDKShortChannelIdError_VoutIndexOverflow = NULL; +JNIEXPORT void JNICALL Java_org_ldk_enums_ShortChannelIdError_init (JNIEnv *env, jclass clz) { + ShortChannelIdError_class = (*env)->NewGlobalRef(env, clz); + CHECK(ShortChannelIdError_class != NULL); + ShortChannelIdError_LDKShortChannelIdError_BlockOverflow = (*env)->GetStaticFieldID(env, ShortChannelIdError_class, "LDKShortChannelIdError_BlockOverflow", "Lorg/ldk/enums/ShortChannelIdError;"); + CHECK(ShortChannelIdError_LDKShortChannelIdError_BlockOverflow != NULL); + ShortChannelIdError_LDKShortChannelIdError_TxIndexOverflow = (*env)->GetStaticFieldID(env, ShortChannelIdError_class, "LDKShortChannelIdError_TxIndexOverflow", "Lorg/ldk/enums/ShortChannelIdError;"); + CHECK(ShortChannelIdError_LDKShortChannelIdError_TxIndexOverflow != NULL); + ShortChannelIdError_LDKShortChannelIdError_VoutIndexOverflow = (*env)->GetStaticFieldID(env, ShortChannelIdError_class, "LDKShortChannelIdError_VoutIndexOverflow", "Lorg/ldk/enums/ShortChannelIdError;"); + CHECK(ShortChannelIdError_LDKShortChannelIdError_VoutIndexOverflow != NULL); +} +static inline jclass LDKShortChannelIdError_to_java(JNIEnv *env, LDKShortChannelIdError val) { + switch (val) { + case LDKShortChannelIdError_BlockOverflow: + return (*env)->GetStaticObjectField(env, ShortChannelIdError_class, ShortChannelIdError_LDKShortChannelIdError_BlockOverflow); + case LDKShortChannelIdError_TxIndexOverflow: + return (*env)->GetStaticObjectField(env, ShortChannelIdError_class, ShortChannelIdError_LDKShortChannelIdError_TxIndexOverflow); + case LDKShortChannelIdError_VoutIndexOverflow: + return (*env)->GetStaticObjectField(env, ShortChannelIdError_class, ShortChannelIdError_LDKShortChannelIdError_VoutIndexOverflow); + default: abort(); + } +} + static inline LDKSiPrefix LDKSiPrefix_from_java(JNIEnv *env, jclass clz) { jint ord = (*env)->CallIntMethod(env, clz, ordinal_meth); if (UNLIKELY((*env)->ExceptionCheck(env))) { @@ -1579,6 +1665,54 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKBech32Error_1ref_1from_1 default: abort(); } } +static inline struct LDKRefundMaybeWithDerivedMetadataBuilder CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKRefundMaybeWithDerivedMetadataBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKRefundMaybeWithDerivedMetadataBuilder ret_var = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKRefund CResult_RefundBolt12SemanticErrorZ_get_ok(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKRefund ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_RefundBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(owner); + LDKRefund ret_var = CResult_RefundBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_RefundBolt12SemanticErrorZ_get_err(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_RefundBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(owner); + jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_RefundBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + static jclass LDKCOption_u64Z_Some_class = NULL; static jmethodID LDKCOption_u64Z_Some_meth = NULL; static jclass LDKCOption_u64Z_None_class = NULL; @@ -1687,6 +1821,8 @@ static jclass LDKDecodeError_Io_class = NULL; static jmethodID LDKDecodeError_Io_meth = NULL; static jclass LDKDecodeError_UnsupportedCompression_class = NULL; static jmethodID LDKDecodeError_UnsupportedCompression_meth = NULL; +static jclass LDKDecodeError_DangerousValue_class = NULL; +static jmethodID LDKDecodeError_DangerousValue_meth = NULL; JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKDecodeError_init (JNIEnv *env, jclass clz) { LDKDecodeError_UnknownVersion_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKDecodeError$UnknownVersion")); @@ -1723,6 +1859,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKDecodeError_init (JNIE CHECK(LDKDecodeError_UnsupportedCompression_class != NULL); LDKDecodeError_UnsupportedCompression_meth = (*env)->GetMethodID(env, LDKDecodeError_UnsupportedCompression_class, "", "()V"); CHECK(LDKDecodeError_UnsupportedCompression_meth != NULL); + LDKDecodeError_DangerousValue_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKDecodeError$DangerousValue")); + CHECK(LDKDecodeError_DangerousValue_class != NULL); + LDKDecodeError_DangerousValue_meth = (*env)->GetMethodID(env, LDKDecodeError_DangerousValue_class, "", "()V"); + CHECK(LDKDecodeError_DangerousValue_meth != NULL); } JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKDecodeError_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { LDKDecodeError *obj = (LDKDecodeError*)untag_ptr(ptr); @@ -1749,6 +1890,9 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKDecodeError_1ref_1from_1 case LDKDecodeError_UnsupportedCompression: { return (*env)->NewObject(env, LDKDecodeError_UnsupportedCompression_class, LDKDecodeError_UnsupportedCompression_meth); } + case LDKDecodeError_DangerousValue: { + return (*env)->NewObject(env, LDKDecodeError_DangerousValue_class, LDKDecodeError_DangerousValue_meth); + } default: abort(); } } @@ -2030,6 +2174,74 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RecipientOnionFieldsN CResult_RecipientOnionFieldsNoneZ_get_err(owner_conv); } +static inline struct LDKUnsignedBolt12Invoice CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKUnsignedBolt12Invoice ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner); + LDKUnsignedBolt12Invoice ret_var = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner); + jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKBolt12Invoice CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKBolt12Invoice ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner); + LDKBolt12Invoice ret_var = CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner); + jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKSchnorrSignature CResult_SchnorrSignatureNoneZ_get_ok(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return *owner->contents.result; +} +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner); + int8_tArray ret_arr = (*env)->NewByteArray(env, 64); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, CResult_SchnorrSignatureNoneZ_get_ok(owner_conv).compact_form); + return ret_arr; +} + +static inline void CResult_SchnorrSignatureNoneZ_get_err(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return *owner->contents.err; +} +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner); + CResult_SchnorrSignatureNoneZ_get_err(owner_conv); +} + static inline LDKCVec_ThirtyTwoBytesZ CVec_ThirtyTwoBytesZ_clone(const LDKCVec_ThirtyTwoBytesZ *orig) { LDKCVec_ThirtyTwoBytesZ ret = { .data = MALLOC(sizeof(LDKThirtyTwoBytes) * orig->datalen, "LDKCVec_ThirtyTwoBytesZ clone bytes"), .datalen = orig->datalen }; for (size_t i = 0; i < ret.datalen; i++) { @@ -2075,6 +2287,135 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1CVec_1ThirtyTwo default: abort(); } } +static jclass LDKAmount_Bitcoin_class = NULL; +static jmethodID LDKAmount_Bitcoin_meth = NULL; +static jclass LDKAmount_Currency_class = NULL; +static jmethodID LDKAmount_Currency_meth = NULL; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKAmount_init (JNIEnv *env, jclass clz) { + LDKAmount_Bitcoin_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKAmount$Bitcoin")); + CHECK(LDKAmount_Bitcoin_class != NULL); + LDKAmount_Bitcoin_meth = (*env)->GetMethodID(env, LDKAmount_Bitcoin_class, "", "(J)V"); + CHECK(LDKAmount_Bitcoin_meth != NULL); + LDKAmount_Currency_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKAmount$Currency")); + CHECK(LDKAmount_Currency_class != NULL); + LDKAmount_Currency_meth = (*env)->GetMethodID(env, LDKAmount_Currency_class, "", "([BJ)V"); + CHECK(LDKAmount_Currency_meth != NULL); +} +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKAmount_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { + LDKAmount *obj = (LDKAmount*)untag_ptr(ptr); + switch(obj->tag) { + case LDKAmount_Bitcoin: { + int64_t amount_msats_conv = obj->bitcoin.amount_msats; + return (*env)->NewObject(env, LDKAmount_Bitcoin_class, LDKAmount_Bitcoin_meth, amount_msats_conv); + } + case LDKAmount_Currency: { + int8_tArray iso4217_code_arr = (*env)->NewByteArray(env, 3); + (*env)->SetByteArrayRegion(env, iso4217_code_arr, 0, 3, obj->currency.iso4217_code.data); + int64_t amount_conv = obj->currency.amount; + return (*env)->NewObject(env, LDKAmount_Currency_class, LDKAmount_Currency_meth, iso4217_code_arr, amount_conv); + } + default: abort(); + } +} +static jclass LDKCOption_AmountZ_Some_class = NULL; +static jmethodID LDKCOption_AmountZ_Some_meth = NULL; +static jclass LDKCOption_AmountZ_None_class = NULL; +static jmethodID LDKCOption_AmountZ_None_meth = NULL; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1AmountZ_init (JNIEnv *env, jclass clz) { + LDKCOption_AmountZ_Some_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_AmountZ$Some")); + CHECK(LDKCOption_AmountZ_Some_class != NULL); + LDKCOption_AmountZ_Some_meth = (*env)->GetMethodID(env, LDKCOption_AmountZ_Some_class, "", "(J)V"); + CHECK(LDKCOption_AmountZ_Some_meth != NULL); + LDKCOption_AmountZ_None_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_AmountZ$None")); + CHECK(LDKCOption_AmountZ_None_class != NULL); + LDKCOption_AmountZ_None_meth = (*env)->GetMethodID(env, LDKCOption_AmountZ_None_class, "", "()V"); + CHECK(LDKCOption_AmountZ_None_meth != NULL); +} +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1AmountZ_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { + LDKCOption_AmountZ *obj = (LDKCOption_AmountZ*)untag_ptr(ptr); + switch(obj->tag) { + case LDKCOption_AmountZ_Some: { + int64_t some_ref = tag_ptr(&obj->some, false); + return (*env)->NewObject(env, LDKCOption_AmountZ_Some_class, LDKCOption_AmountZ_Some_meth, some_ref); + } + case LDKCOption_AmountZ_None: { + return (*env)->NewObject(env, LDKCOption_AmountZ_None_class, LDKCOption_AmountZ_None_meth); + } + default: abort(); + } +} +static jclass LDKQuantity_Bounded_class = NULL; +static jmethodID LDKQuantity_Bounded_meth = NULL; +static jclass LDKQuantity_Unbounded_class = NULL; +static jmethodID LDKQuantity_Unbounded_meth = NULL; +static jclass LDKQuantity_One_class = NULL; +static jmethodID LDKQuantity_One_meth = NULL; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKQuantity_init (JNIEnv *env, jclass clz) { + LDKQuantity_Bounded_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKQuantity$Bounded")); + CHECK(LDKQuantity_Bounded_class != NULL); + LDKQuantity_Bounded_meth = (*env)->GetMethodID(env, LDKQuantity_Bounded_class, "", "(J)V"); + CHECK(LDKQuantity_Bounded_meth != NULL); + LDKQuantity_Unbounded_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKQuantity$Unbounded")); + CHECK(LDKQuantity_Unbounded_class != NULL); + LDKQuantity_Unbounded_meth = (*env)->GetMethodID(env, LDKQuantity_Unbounded_class, "", "()V"); + CHECK(LDKQuantity_Unbounded_meth != NULL); + LDKQuantity_One_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKQuantity$One")); + CHECK(LDKQuantity_One_class != NULL); + LDKQuantity_One_meth = (*env)->GetMethodID(env, LDKQuantity_One_class, "", "()V"); + CHECK(LDKQuantity_One_meth != NULL); +} +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKQuantity_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { + LDKQuantity *obj = (LDKQuantity*)untag_ptr(ptr); + switch(obj->tag) { + case LDKQuantity_Bounded: { + int64_t bounded_conv = obj->bounded; + return (*env)->NewObject(env, LDKQuantity_Bounded_class, LDKQuantity_Bounded_meth, bounded_conv); + } + case LDKQuantity_Unbounded: { + return (*env)->NewObject(env, LDKQuantity_Unbounded_class, LDKQuantity_Unbounded_meth); + } + case LDKQuantity_One: { + return (*env)->NewObject(env, LDKQuantity_One_class, LDKQuantity_One_meth); + } + default: abort(); + } +} +static jclass LDKCOption_QuantityZ_Some_class = NULL; +static jmethodID LDKCOption_QuantityZ_Some_meth = NULL; +static jclass LDKCOption_QuantityZ_None_class = NULL; +static jmethodID LDKCOption_QuantityZ_None_meth = NULL; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1QuantityZ_init (JNIEnv *env, jclass clz) { + LDKCOption_QuantityZ_Some_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_QuantityZ$Some")); + CHECK(LDKCOption_QuantityZ_Some_class != NULL); + LDKCOption_QuantityZ_Some_meth = (*env)->GetMethodID(env, LDKCOption_QuantityZ_Some_class, "", "(J)V"); + CHECK(LDKCOption_QuantityZ_Some_meth != NULL); + LDKCOption_QuantityZ_None_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_QuantityZ$None")); + CHECK(LDKCOption_QuantityZ_None_class != NULL); + LDKCOption_QuantityZ_None_meth = (*env)->GetMethodID(env, LDKCOption_QuantityZ_None_class, "", "()V"); + CHECK(LDKCOption_QuantityZ_None_meth != NULL); +} +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1QuantityZ_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { + LDKCOption_QuantityZ *obj = (LDKCOption_QuantityZ*)untag_ptr(ptr); + switch(obj->tag) { + case LDKCOption_QuantityZ_Some: { + int64_t some_ref = tag_ptr(&obj->some, false); + return (*env)->NewObject(env, LDKCOption_QuantityZ_Some_class, LDKCOption_QuantityZ_Some_meth, some_ref); + } + case LDKCOption_QuantityZ_None: { + return (*env)->NewObject(env, LDKCOption_QuantityZ_None_class, LDKCOption_QuantityZ_None_meth); + } + default: abort(); + } +} static inline struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesNoneZ_get_ok(LDKCResult_ThirtyTwoBytesNoneZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return ThirtyTwoBytes_clone(&*owner->contents.result); @@ -2473,44 +2814,45 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RecoverableSignatureN CResult_RecoverableSignatureNoneZ_get_err(owner_conv); } -static inline struct LDKSchnorrSignature CResult_SchnorrSignatureNoneZ_get_ok(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){ +static inline struct LDKECDSASignature CResult_ECDSASignatureNoneZ_get_ok(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return *owner->contents.result; } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner); +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner); int8_tArray ret_arr = (*env)->NewByteArray(env, 64); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, CResult_SchnorrSignatureNoneZ_get_ok(owner_conv).compact_form); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, CResult_ECDSASignatureNoneZ_get_ok(owner_conv).compact_form); return ret_arr; } -static inline void CResult_SchnorrSignatureNoneZ_get_err(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){ +static inline void CResult_ECDSASignatureNoneZ_get_err(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){ CHECK(!owner->result_ok); return *owner->contents.err; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner); - CResult_SchnorrSignatureNoneZ_get_err(owner_conv); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner); + CResult_ECDSASignatureNoneZ_get_err(owner_conv); } -static inline struct LDKECDSASignature CResult_ECDSASignatureNoneZ_get_ok(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){ +static inline struct LDKTransaction CResult_TransactionNoneZ_get_ok(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return *owner->contents.result; } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner); - int8_tArray ret_arr = (*env)->NewByteArray(env, 64); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, CResult_ECDSASignatureNoneZ_get_ok(owner_conv).compact_form); +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner); + LDKTransaction ret_var = CResult_TransactionNoneZ_get_ok(owner_conv); + int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen); + (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data); return ret_arr; } -static inline void CResult_ECDSASignatureNoneZ_get_err(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){ +static inline void CResult_TransactionNoneZ_get_err(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){ CHECK(!owner->result_ok); return *owner->contents.err; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner); - CResult_ECDSASignatureNoneZ_get_err(owner_conv); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner); + CResult_TransactionNoneZ_get_err(owner_conv); } static inline struct LDKECDSASignature C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_a(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ *NONNULL_PTR owner){ @@ -3764,27 +4106,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InMemorySignerDeco return ret_ref; } -static inline struct LDKTransaction CResult_TransactionNoneZ_get_ok(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){ -CHECK(owner->result_ok); - return *owner->contents.result; -} -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner); - LDKTransaction ret_var = CResult_TransactionNoneZ_get_ok(owner_conv); - int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen); - (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data); - return ret_arr; -} - -static inline void CResult_TransactionNoneZ_get_err(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return *owner->contents.err; -} -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner); - CResult_TransactionNoneZ_get_err(owner_conv); -} - static jclass LDKCandidateRouteHop_FirstHop_class = NULL; static jmethodID LDKCandidateRouteHop_FirstHop_meth = NULL; static jclass LDKCandidateRouteHop_PublicHop_class = NULL; @@ -5168,6 +5489,32 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScore return ret_ref; } +static inline struct LDKBestBlock CResult_BestBlockDecodeErrorZ_get_ok(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR owner){ + LDKBestBlock ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_BestBlockDecodeErrorZ* owner_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(owner); + LDKBestBlock ret_var = CResult_BestBlockDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_BestBlockDecodeErrorZ_get_err(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_BestBlockDecodeErrorZ* owner_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_BestBlockDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + static inline uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR owner){ return owner->a; } @@ -5251,8 +5598,154 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpdateS CResult_ChannelMonitorUpdateStatusNoneZ_get_err(owner_conv); } +static jclass LDKClosureReason_CounterpartyForceClosed_class = NULL; +static jmethodID LDKClosureReason_CounterpartyForceClosed_meth = NULL; +static jclass LDKClosureReason_HolderForceClosed_class = NULL; +static jmethodID LDKClosureReason_HolderForceClosed_meth = NULL; +static jclass LDKClosureReason_LegacyCooperativeClosure_class = NULL; +static jmethodID LDKClosureReason_LegacyCooperativeClosure_meth = NULL; +static jclass LDKClosureReason_CounterpartyInitiatedCooperativeClosure_class = NULL; +static jmethodID LDKClosureReason_CounterpartyInitiatedCooperativeClosure_meth = NULL; +static jclass LDKClosureReason_LocallyInitiatedCooperativeClosure_class = NULL; +static jmethodID LDKClosureReason_LocallyInitiatedCooperativeClosure_meth = NULL; +static jclass LDKClosureReason_CommitmentTxConfirmed_class = NULL; +static jmethodID LDKClosureReason_CommitmentTxConfirmed_meth = NULL; +static jclass LDKClosureReason_FundingTimedOut_class = NULL; +static jmethodID LDKClosureReason_FundingTimedOut_meth = NULL; +static jclass LDKClosureReason_ProcessingError_class = NULL; +static jmethodID LDKClosureReason_ProcessingError_meth = NULL; +static jclass LDKClosureReason_DisconnectedPeer_class = NULL; +static jmethodID LDKClosureReason_DisconnectedPeer_meth = NULL; +static jclass LDKClosureReason_OutdatedChannelManager_class = NULL; +static jmethodID LDKClosureReason_OutdatedChannelManager_meth = NULL; +static jclass LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class = NULL; +static jmethodID LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth = NULL; +static jclass LDKClosureReason_FundingBatchClosure_class = NULL; +static jmethodID LDKClosureReason_FundingBatchClosure_meth = NULL; +static jclass LDKClosureReason_HTLCsTimedOut_class = NULL; +static jmethodID LDKClosureReason_HTLCsTimedOut_meth = NULL; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKClosureReason_init (JNIEnv *env, jclass clz) { + LDKClosureReason_CounterpartyForceClosed_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CounterpartyForceClosed")); + CHECK(LDKClosureReason_CounterpartyForceClosed_class != NULL); + LDKClosureReason_CounterpartyForceClosed_meth = (*env)->GetMethodID(env, LDKClosureReason_CounterpartyForceClosed_class, "", "(J)V"); + CHECK(LDKClosureReason_CounterpartyForceClosed_meth != NULL); + LDKClosureReason_HolderForceClosed_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$HolderForceClosed")); + CHECK(LDKClosureReason_HolderForceClosed_class != NULL); + LDKClosureReason_HolderForceClosed_meth = (*env)->GetMethodID(env, LDKClosureReason_HolderForceClosed_class, "", "()V"); + CHECK(LDKClosureReason_HolderForceClosed_meth != NULL); + LDKClosureReason_LegacyCooperativeClosure_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$LegacyCooperativeClosure")); + CHECK(LDKClosureReason_LegacyCooperativeClosure_class != NULL); + LDKClosureReason_LegacyCooperativeClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_LegacyCooperativeClosure_class, "", "()V"); + CHECK(LDKClosureReason_LegacyCooperativeClosure_meth != NULL); + LDKClosureReason_CounterpartyInitiatedCooperativeClosure_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CounterpartyInitiatedCooperativeClosure")); + CHECK(LDKClosureReason_CounterpartyInitiatedCooperativeClosure_class != NULL); + LDKClosureReason_CounterpartyInitiatedCooperativeClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_CounterpartyInitiatedCooperativeClosure_class, "", "()V"); + CHECK(LDKClosureReason_CounterpartyInitiatedCooperativeClosure_meth != NULL); + LDKClosureReason_LocallyInitiatedCooperativeClosure_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$LocallyInitiatedCooperativeClosure")); + CHECK(LDKClosureReason_LocallyInitiatedCooperativeClosure_class != NULL); + LDKClosureReason_LocallyInitiatedCooperativeClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_LocallyInitiatedCooperativeClosure_class, "", "()V"); + CHECK(LDKClosureReason_LocallyInitiatedCooperativeClosure_meth != NULL); + LDKClosureReason_CommitmentTxConfirmed_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CommitmentTxConfirmed")); + CHECK(LDKClosureReason_CommitmentTxConfirmed_class != NULL); + LDKClosureReason_CommitmentTxConfirmed_meth = (*env)->GetMethodID(env, LDKClosureReason_CommitmentTxConfirmed_class, "", "()V"); + CHECK(LDKClosureReason_CommitmentTxConfirmed_meth != NULL); + LDKClosureReason_FundingTimedOut_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$FundingTimedOut")); + CHECK(LDKClosureReason_FundingTimedOut_class != NULL); + LDKClosureReason_FundingTimedOut_meth = (*env)->GetMethodID(env, LDKClosureReason_FundingTimedOut_class, "", "()V"); + CHECK(LDKClosureReason_FundingTimedOut_meth != NULL); + LDKClosureReason_ProcessingError_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$ProcessingError")); + CHECK(LDKClosureReason_ProcessingError_class != NULL); + LDKClosureReason_ProcessingError_meth = (*env)->GetMethodID(env, LDKClosureReason_ProcessingError_class, "", "(Ljava/lang/String;)V"); + CHECK(LDKClosureReason_ProcessingError_meth != NULL); + LDKClosureReason_DisconnectedPeer_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$DisconnectedPeer")); + CHECK(LDKClosureReason_DisconnectedPeer_class != NULL); + LDKClosureReason_DisconnectedPeer_meth = (*env)->GetMethodID(env, LDKClosureReason_DisconnectedPeer_class, "", "()V"); + CHECK(LDKClosureReason_DisconnectedPeer_meth != NULL); + LDKClosureReason_OutdatedChannelManager_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$OutdatedChannelManager")); + CHECK(LDKClosureReason_OutdatedChannelManager_class != NULL); + LDKClosureReason_OutdatedChannelManager_meth = (*env)->GetMethodID(env, LDKClosureReason_OutdatedChannelManager_class, "", "()V"); + CHECK(LDKClosureReason_OutdatedChannelManager_meth != NULL); + LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CounterpartyCoopClosedUnfundedChannel")); + CHECK(LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class != NULL); + LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth = (*env)->GetMethodID(env, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class, "", "()V"); + CHECK(LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth != NULL); + LDKClosureReason_FundingBatchClosure_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$FundingBatchClosure")); + CHECK(LDKClosureReason_FundingBatchClosure_class != NULL); + LDKClosureReason_FundingBatchClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_FundingBatchClosure_class, "", "()V"); + CHECK(LDKClosureReason_FundingBatchClosure_meth != NULL); + LDKClosureReason_HTLCsTimedOut_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$HTLCsTimedOut")); + CHECK(LDKClosureReason_HTLCsTimedOut_class != NULL); + LDKClosureReason_HTLCsTimedOut_meth = (*env)->GetMethodID(env, LDKClosureReason_HTLCsTimedOut_class, "", "()V"); + CHECK(LDKClosureReason_HTLCsTimedOut_meth != NULL); +} +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKClosureReason_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { + LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr); + switch(obj->tag) { + case LDKClosureReason_CounterpartyForceClosed: { + LDKUntrustedString peer_msg_var = obj->counterparty_force_closed.peer_msg; + int64_t peer_msg_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(peer_msg_var); + peer_msg_ref = tag_ptr(peer_msg_var.inner, false); + return (*env)->NewObject(env, LDKClosureReason_CounterpartyForceClosed_class, LDKClosureReason_CounterpartyForceClosed_meth, peer_msg_ref); + } + case LDKClosureReason_HolderForceClosed: { + return (*env)->NewObject(env, LDKClosureReason_HolderForceClosed_class, LDKClosureReason_HolderForceClosed_meth); + } + case LDKClosureReason_LegacyCooperativeClosure: { + return (*env)->NewObject(env, LDKClosureReason_LegacyCooperativeClosure_class, LDKClosureReason_LegacyCooperativeClosure_meth); + } + case LDKClosureReason_CounterpartyInitiatedCooperativeClosure: { + return (*env)->NewObject(env, LDKClosureReason_CounterpartyInitiatedCooperativeClosure_class, LDKClosureReason_CounterpartyInitiatedCooperativeClosure_meth); + } + case LDKClosureReason_LocallyInitiatedCooperativeClosure: { + return (*env)->NewObject(env, LDKClosureReason_LocallyInitiatedCooperativeClosure_class, LDKClosureReason_LocallyInitiatedCooperativeClosure_meth); + } + case LDKClosureReason_CommitmentTxConfirmed: { + return (*env)->NewObject(env, LDKClosureReason_CommitmentTxConfirmed_class, LDKClosureReason_CommitmentTxConfirmed_meth); + } + case LDKClosureReason_FundingTimedOut: { + return (*env)->NewObject(env, LDKClosureReason_FundingTimedOut_class, LDKClosureReason_FundingTimedOut_meth); + } + case LDKClosureReason_ProcessingError: { + LDKStr err_str = obj->processing_error.err; + jstring err_conv = str_ref_to_java(env, err_str.chars, err_str.len); + return (*env)->NewObject(env, LDKClosureReason_ProcessingError_class, LDKClosureReason_ProcessingError_meth, err_conv); + } + case LDKClosureReason_DisconnectedPeer: { + return (*env)->NewObject(env, LDKClosureReason_DisconnectedPeer_class, LDKClosureReason_DisconnectedPeer_meth); + } + case LDKClosureReason_OutdatedChannelManager: { + return (*env)->NewObject(env, LDKClosureReason_OutdatedChannelManager_class, LDKClosureReason_OutdatedChannelManager_meth); + } + case LDKClosureReason_CounterpartyCoopClosedUnfundedChannel: { + return (*env)->NewObject(env, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth); + } + case LDKClosureReason_FundingBatchClosure: { + return (*env)->NewObject(env, LDKClosureReason_FundingBatchClosure_class, LDKClosureReason_FundingBatchClosure_meth); + } + case LDKClosureReason_HTLCsTimedOut: { + return (*env)->NewObject(env, LDKClosureReason_HTLCsTimedOut_class, LDKClosureReason_HTLCsTimedOut_meth); + } + default: abort(); + } +} static jclass LDKMonitorEvent_HTLCEvent_class = NULL; static jmethodID LDKMonitorEvent_HTLCEvent_meth = NULL; +static jclass LDKMonitorEvent_HolderForceClosedWithInfo_class = NULL; +static jmethodID LDKMonitorEvent_HolderForceClosedWithInfo_meth = NULL; static jclass LDKMonitorEvent_HolderForceClosed_class = NULL; static jmethodID LDKMonitorEvent_HolderForceClosed_meth = NULL; static jclass LDKMonitorEvent_Completed_class = NULL; @@ -5263,6 +5756,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKMonitorEvent_init (JNI CHECK(LDKMonitorEvent_HTLCEvent_class != NULL); LDKMonitorEvent_HTLCEvent_meth = (*env)->GetMethodID(env, LDKMonitorEvent_HTLCEvent_class, "", "(J)V"); CHECK(LDKMonitorEvent_HTLCEvent_meth != NULL); + LDKMonitorEvent_HolderForceClosedWithInfo_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKMonitorEvent$HolderForceClosedWithInfo")); + CHECK(LDKMonitorEvent_HolderForceClosedWithInfo_class != NULL); + LDKMonitorEvent_HolderForceClosedWithInfo_meth = (*env)->GetMethodID(env, LDKMonitorEvent_HolderForceClosedWithInfo_class, "", "(JJJ)V"); + CHECK(LDKMonitorEvent_HolderForceClosedWithInfo_meth != NULL); LDKMonitorEvent_HolderForceClosed_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKMonitorEvent$HolderForceClosed")); CHECK(LDKMonitorEvent_HolderForceClosed_class != NULL); @@ -5271,7 +5769,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKMonitorEvent_init (JNI LDKMonitorEvent_Completed_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKMonitorEvent$Completed")); CHECK(LDKMonitorEvent_Completed_class != NULL); - LDKMonitorEvent_Completed_meth = (*env)->GetMethodID(env, LDKMonitorEvent_Completed_class, "", "(JJ)V"); + LDKMonitorEvent_Completed_meth = (*env)->GetMethodID(env, LDKMonitorEvent_Completed_class, "", "(JJJ)V"); CHECK(LDKMonitorEvent_Completed_meth != NULL); } JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKMonitorEvent_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { @@ -5284,6 +5782,18 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKMonitorEvent_1ref_1from_ htlc_event_ref = tag_ptr(htlc_event_var.inner, false); return (*env)->NewObject(env, LDKMonitorEvent_HTLCEvent_class, LDKMonitorEvent_HTLCEvent_meth, htlc_event_ref); } + case LDKMonitorEvent_HolderForceClosedWithInfo: { + int64_t reason_ref = tag_ptr(&obj->holder_force_closed_with_info.reason, false); + LDKOutPoint outpoint_var = obj->holder_force_closed_with_info.outpoint; + int64_t outpoint_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_var); + outpoint_ref = tag_ptr(outpoint_var.inner, false); + LDKChannelId channel_id_var = obj->holder_force_closed_with_info.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return (*env)->NewObject(env, LDKMonitorEvent_HolderForceClosedWithInfo_class, LDKMonitorEvent_HolderForceClosedWithInfo_meth, reason_ref, outpoint_ref, channel_id_ref); + } case LDKMonitorEvent_HolderForceClosed: { LDKOutPoint holder_force_closed_var = obj->holder_force_closed; int64_t holder_force_closed_ref = 0; @@ -5296,8 +5806,12 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKMonitorEvent_1ref_1from_ int64_t funding_txo_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_var); funding_txo_ref = tag_ptr(funding_txo_var.inner, false); + LDKChannelId channel_id_var = obj->completed.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); int64_t monitor_update_id_conv = obj->completed.monitor_update_id; - return (*env)->NewObject(env, LDKMonitorEvent_Completed_class, LDKMonitorEvent_Completed_meth, funding_txo_ref, monitor_update_id_conv); + return (*env)->NewObject(env, LDKMonitorEvent_Completed_class, LDKMonitorEvent_Completed_meth, funding_txo_ref, channel_id_ref, monitor_update_id_conv); } default: abort(); } @@ -5309,26 +5823,40 @@ static inline LDKCVec_MonitorEventZ CVec_MonitorEventZ_clone(const LDKCVec_Monit } return ret; } -static inline struct LDKOutPoint C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ +static inline struct LDKOutPoint C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ LDKOutPoint ret = owner->a; ret.is_owned = false; return ret; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); - LDKOutPoint ret_var = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(owner_conv); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); + LDKOutPoint ret_var = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(owner_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -static inline struct LDKCVec_MonitorEventZ C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ - return CVec_MonitorEventZ_clone(&owner->b); +static inline struct LDKChannelId C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ + LDKChannelId ret = owner->b; + ret.is_owned = false; + return ret; } -JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); - LDKCVec_MonitorEventZ ret_var = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(owner_conv); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); + LDKChannelId ret_var = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKCVec_MonitorEventZ C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ + return CVec_MonitorEventZ_clone(&owner->c); +} +JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1c(JNIEnv *env, jclass clz, int64_t owner) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); + LDKCVec_MonitorEventZ ret_var = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(owner_conv); int64_tArray ret_arr = NULL; ret_arr = (*env)->NewLongArray(env, ret_var.datalen); int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL); @@ -5343,20 +5871,20 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_ return ret_arr; } -static inline struct LDKPublicKey C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ - return owner->c; +static inline struct LDKPublicKey C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ + return owner->d; } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1get_1c(JNIEnv *env, jclass clz, int64_t owner) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1d(JNIEnv *env, jclass clz, int64_t owner) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(owner_conv).compressed_form); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(owner_conv).compressed_form); return ret_arr; } -static inline LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_clone(const LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ *orig) { - LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ) * orig->datalen, "LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ clone bytes"), .datalen = orig->datalen }; +static inline LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_clone(const LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ *orig) { + LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ) * orig->datalen, "LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ clone bytes"), .datalen = orig->datalen }; for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(&orig->data[i]); + ret.data[i] = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(&orig->data[i]); } return ret; } @@ -5542,6 +6070,123 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTypeFeature return ret_ref; } +static inline struct LDKOfferId CResult_OfferIdDecodeErrorZ_get_ok(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR owner){ + LDKOfferId ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_OfferIdDecodeErrorZ* owner_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(owner); + LDKOfferId ret_var = CResult_OfferIdDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_OfferIdDecodeErrorZ_get_err(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_OfferIdDecodeErrorZ* owner_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_OfferIdDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline void CResult_NoneBolt12SemanticErrorZ_get_ok(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return *owner->contents.result; +} +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner); + CResult_NoneBolt12SemanticErrorZ_get_ok(owner_conv); +} + +static inline enum LDKBolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner); + jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_NoneBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKOffer CResult_OfferBolt12SemanticErrorZ_get_ok(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKOffer ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_OfferBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(owner); + LDKOffer ret_var = CResult_OfferBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_OfferBolt12SemanticErrorZ_get_err(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_OfferBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(owner); + jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_OfferBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKInvoiceRequestWithDerivedPayerIdBuilder CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKInvoiceRequestWithDerivedPayerIdBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKInvoiceRequestWithDerivedPayerIdBuilder ret_var = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKInvoiceRequestWithExplicitPayerIdBuilder CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKInvoiceRequestWithExplicitPayerIdBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKInvoiceRequestWithExplicitPayerIdBuilder ret_var = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + static inline struct LDKOffer CResult_OfferBolt12ParseErrorZ_get_ok(LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR owner){ LDKOffer ret = *owner->contents.result; ret.is_owned = false; @@ -5570,27 +6215,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12ParseEr return ret_ref; } -static inline struct LDKPublicKey CResult_PublicKeySecp256k1ErrorZ_get_ok(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){ -CHECK(owner->result_ok); - return *owner->contents.result; -} -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner); - int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CResult_PublicKeySecp256k1ErrorZ_get_ok(owner_conv).compressed_form); - return ret_arr; -} - -static inline enum LDKSecp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return *owner->contents.err; -} -JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner); - jclass ret_conv = LDKSecp256k1Error_to_java(env, CResult_PublicKeySecp256k1ErrorZ_get_err(owner_conv)); - return ret_conv; -} - static inline struct LDKNodeId CResult_NodeIdDecodeErrorZ_get_ok(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR owner){ LDKNodeId ret = *owner->contents.result; ret.is_owned = false; @@ -5617,6 +6241,27 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ return ret_ref; } +static inline struct LDKPublicKey CResult_PublicKeySecp256k1ErrorZ_get_ok(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return *owner->contents.result; +} +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner); + int8_tArray ret_arr = (*env)->NewByteArray(env, 33); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CResult_PublicKeySecp256k1ErrorZ_get_ok(owner_conv).compressed_form); + return ret_arr; +} + +static inline enum LDKSecp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return *owner->contents.err; +} +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner); + jclass ret_conv = LDKSecp256k1Error_to_java(env, CResult_PublicKeySecp256k1ErrorZ_get_err(owner_conv)); + return ret_conv; +} + static jclass LDKNetworkUpdate_ChannelUpdateMessage_class = NULL; static jmethodID LDKNetworkUpdate_ChannelUpdateMessage_meth = NULL; static jclass LDKNetworkUpdate_ChannelFailure_class = NULL; @@ -7007,6 +7652,26 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1CVec_1SocketAdd default: abort(); } } +static inline uint64_t CResult_u64ShortChannelIdErrorZ_get_ok(LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return *owner->contents.result; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_u64ShortChannelIdErrorZ* owner_conv = (LDKCResult_u64ShortChannelIdErrorZ*)untag_ptr(owner); + int64_t ret_conv = CResult_u64ShortChannelIdErrorZ_get_ok(owner_conv); + return ret_conv; +} + +static inline enum LDKShortChannelIdError CResult_u64ShortChannelIdErrorZ_get_err(LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return ShortChannelIdError_clone(&*owner->contents.err); +} +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_u64ShortChannelIdErrorZ* owner_conv = (LDKCResult_u64ShortChannelIdErrorZ*)untag_ptr(owner); + jclass ret_conv = LDKShortChannelIdError_to_java(env, CResult_u64ShortChannelIdErrorZ_get_err(owner_conv)); + return ret_conv; +} + static inline struct LDKPendingHTLCInfo CResult_PendingHTLCInfoInboundHTLCErrZ_get_ok(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR owner){ LDKPendingHTLCInfo ret = *owner->contents.result; ret.is_owned = false; @@ -7146,6 +7811,85 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1UtxoZNoneZ_1get CResult_CVec_UtxoZNoneZ_get_err(owner_conv); } +static jclass LDKPaymentContext_Unknown_class = NULL; +static jmethodID LDKPaymentContext_Unknown_meth = NULL; +static jclass LDKPaymentContext_Bolt12Offer_class = NULL; +static jmethodID LDKPaymentContext_Bolt12Offer_meth = NULL; +static jclass LDKPaymentContext_Bolt12Refund_class = NULL; +static jmethodID LDKPaymentContext_Bolt12Refund_meth = NULL; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKPaymentContext_init (JNIEnv *env, jclass clz) { + LDKPaymentContext_Unknown_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentContext$Unknown")); + CHECK(LDKPaymentContext_Unknown_class != NULL); + LDKPaymentContext_Unknown_meth = (*env)->GetMethodID(env, LDKPaymentContext_Unknown_class, "", "(J)V"); + CHECK(LDKPaymentContext_Unknown_meth != NULL); + LDKPaymentContext_Bolt12Offer_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentContext$Bolt12Offer")); + CHECK(LDKPaymentContext_Bolt12Offer_class != NULL); + LDKPaymentContext_Bolt12Offer_meth = (*env)->GetMethodID(env, LDKPaymentContext_Bolt12Offer_class, "", "(J)V"); + CHECK(LDKPaymentContext_Bolt12Offer_meth != NULL); + LDKPaymentContext_Bolt12Refund_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentContext$Bolt12Refund")); + CHECK(LDKPaymentContext_Bolt12Refund_class != NULL); + LDKPaymentContext_Bolt12Refund_meth = (*env)->GetMethodID(env, LDKPaymentContext_Bolt12Refund_class, "", "(J)V"); + CHECK(LDKPaymentContext_Bolt12Refund_meth != NULL); +} +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPaymentContext_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { + LDKPaymentContext *obj = (LDKPaymentContext*)untag_ptr(ptr); + switch(obj->tag) { + case LDKPaymentContext_Unknown: { + LDKUnknownPaymentContext unknown_var = obj->unknown; + int64_t unknown_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(unknown_var); + unknown_ref = tag_ptr(unknown_var.inner, false); + return (*env)->NewObject(env, LDKPaymentContext_Unknown_class, LDKPaymentContext_Unknown_meth, unknown_ref); + } + case LDKPaymentContext_Bolt12Offer: { + LDKBolt12OfferContext bolt12_offer_var = obj->bolt12_offer; + int64_t bolt12_offer_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(bolt12_offer_var); + bolt12_offer_ref = tag_ptr(bolt12_offer_var.inner, false); + return (*env)->NewObject(env, LDKPaymentContext_Bolt12Offer_class, LDKPaymentContext_Bolt12Offer_meth, bolt12_offer_ref); + } + case LDKPaymentContext_Bolt12Refund: { + LDKBolt12RefundContext bolt12_refund_var = obj->bolt12_refund; + int64_t bolt12_refund_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(bolt12_refund_var); + bolt12_refund_ref = tag_ptr(bolt12_refund_var.inner, false); + return (*env)->NewObject(env, LDKPaymentContext_Bolt12Refund_class, LDKPaymentContext_Bolt12Refund_meth, bolt12_refund_ref); + } + default: abort(); + } +} +static jclass LDKCOption_PaymentContextZ_Some_class = NULL; +static jmethodID LDKCOption_PaymentContextZ_Some_meth = NULL; +static jclass LDKCOption_PaymentContextZ_None_class = NULL; +static jmethodID LDKCOption_PaymentContextZ_None_meth = NULL; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1PaymentContextZ_init (JNIEnv *env, jclass clz) { + LDKCOption_PaymentContextZ_Some_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_PaymentContextZ$Some")); + CHECK(LDKCOption_PaymentContextZ_Some_class != NULL); + LDKCOption_PaymentContextZ_Some_meth = (*env)->GetMethodID(env, LDKCOption_PaymentContextZ_Some_class, "", "(J)V"); + CHECK(LDKCOption_PaymentContextZ_Some_meth != NULL); + LDKCOption_PaymentContextZ_None_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_PaymentContextZ$None")); + CHECK(LDKCOption_PaymentContextZ_None_class != NULL); + LDKCOption_PaymentContextZ_None_meth = (*env)->GetMethodID(env, LDKCOption_PaymentContextZ_None_class, "", "()V"); + CHECK(LDKCOption_PaymentContextZ_None_meth != NULL); +} +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1PaymentContextZ_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { + LDKCOption_PaymentContextZ *obj = (LDKCOption_PaymentContextZ*)untag_ptr(ptr); + switch(obj->tag) { + case LDKCOption_PaymentContextZ_Some: { + int64_t some_ref = tag_ptr(&obj->some, false); + return (*env)->NewObject(env, LDKCOption_PaymentContextZ_Some_class, LDKCOption_PaymentContextZ_Some_meth, some_ref); + } + case LDKCOption_PaymentContextZ_None: { + return (*env)->NewObject(env, LDKCOption_PaymentContextZ_None_class, LDKCOption_PaymentContextZ_None_meth); + } + default: abort(); + } +} static inline uint64_t C2Tuple_u64u16Z_get_a(LDKC2Tuple_u64u16Z *NONNULL_PTR owner){ return owner->a; } @@ -7224,25 +7968,28 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1ChannelShutdown default: abort(); } } -static inline struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesAPIErrorZ_get_ok(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){ -CHECK(owner->result_ok); - return ThirtyTwoBytes_clone(&*owner->contents.result); +static inline struct LDKChannelId CResult_ChannelIdAPIErrorZ_get_ok(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR owner){ + LDKChannelId ret = *owner->contents.result; + ret.is_owned = false; + return ret; } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner); - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, CResult_ThirtyTwoBytesAPIErrorZ_get_ok(owner_conv).data); - return ret_arr; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_ChannelIdAPIErrorZ* owner_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(owner); + LDKChannelId ret_var = CResult_ChannelIdAPIErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -static inline struct LDKAPIError CResult_ThirtyTwoBytesAPIErrorZ_get_err(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){ +static inline struct LDKAPIError CResult_ChannelIdAPIErrorZ_get_err(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR owner){ CHECK(!owner->result_ok); return APIError_clone(&*owner->contents.err); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_ChannelIdAPIErrorZ* owner_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(owner); LDKAPIError *ret_copy = MALLOC(sizeof(LDKAPIError), "LDKAPIError"); - *ret_copy = CResult_ThirtyTwoBytesAPIErrorZ_get_err(owner_conv); + *ret_copy = CResult_ChannelIdAPIErrorZ_get_err(owner_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -7607,33 +8354,68 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1C2Tuple_1Thi return ret_ref; } -static inline struct LDKThirtyTwoBytes C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR owner){ - return ThirtyTwoBytes_clone(&owner->a); +static inline struct LDKChannelId C2Tuple_ChannelIdPublicKeyZ_get_a(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR owner){ + LDKChannelId ret = owner->a; + ret.is_owned = false; + return ret; } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) { - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* owner_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(owner); - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(owner_conv).data); - return ret_arr; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) { + LDKC2Tuple_ChannelIdPublicKeyZ* owner_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(owner); + LDKChannelId ret_var = C2Tuple_ChannelIdPublicKeyZ_get_a(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -static inline struct LDKPublicKey C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR owner){ +static inline struct LDKPublicKey C2Tuple_ChannelIdPublicKeyZ_get_b(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR owner){ return owner->b; } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) { - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* owner_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(owner); +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) { + LDKC2Tuple_ChannelIdPublicKeyZ* owner_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(owner); int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(owner_conv).compressed_form); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, C2Tuple_ChannelIdPublicKeyZ_get_b(owner_conv).compressed_form); return ret_arr; } -static inline LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_clone(const LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ *orig) { - LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ) * orig->datalen, "LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ clone bytes"), .datalen = orig->datalen }; +static inline LDKCVec_C2Tuple_ChannelIdPublicKeyZZ CVec_C2Tuple_ChannelIdPublicKeyZZ_clone(const LDKCVec_C2Tuple_ChannelIdPublicKeyZZ *orig) { + LDKCVec_C2Tuple_ChannelIdPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ) * orig->datalen, "LDKCVec_C2Tuple_ChannelIdPublicKeyZZ clone bytes"), .datalen = orig->datalen }; + for (size_t i = 0; i < ret.datalen; i++) { + ret.data[i] = C2Tuple_ChannelIdPublicKeyZ_clone(&orig->data[i]); + } + return ret; +} +static inline LDKCVec_ChannelIdZ CVec_ChannelIdZ_clone(const LDKCVec_ChannelIdZ *orig) { + LDKCVec_ChannelIdZ ret = { .data = MALLOC(sizeof(LDKChannelId) * orig->datalen, "LDKCVec_ChannelIdZ clone bytes"), .datalen = orig->datalen }; for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(&orig->data[i]); + ret.data[i] = ChannelId_clone(&orig->data[i]); } return ret; } +static inline struct LDKOfferWithDerivedMetadataBuilder CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKOfferWithDerivedMetadataBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKOfferWithDerivedMetadataBuilder ret_var = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + static jclass LDKCOption_StrZ_Some_class = NULL; static jmethodID LDKCOption_StrZ_Some_meth = NULL; static jclass LDKCOption_StrZ_None_class = NULL; @@ -7664,25 +8446,6 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1StrZ_1ref_1from default: abort(); } } -static inline void CResult_NoneBolt12SemanticErrorZ_get_ok(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){ -CHECK(owner->result_ok); - return *owner->contents.result; -} -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner); - CResult_NoneBolt12SemanticErrorZ_get_ok(owner_conv); -} - -static inline enum LDKBolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return Bolt12SemanticError_clone(&*owner->contents.err); -} -JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner); - jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_NoneBolt12SemanticErrorZ_get_err(owner_conv)); - return ret_conv; -} - static inline struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_ok(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return C2Tuple_ThirtyTwoBytesThirtyTwoBytesZ_clone(&*owner->contents.result); @@ -7703,6 +8466,29 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoByt CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_err(owner_conv); } +static inline struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesAPIErrorZ_get_ok(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return ThirtyTwoBytes_clone(&*owner->contents.result); +} +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner); + int8_tArray ret_arr = (*env)->NewByteArray(env, 32); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, CResult_ThirtyTwoBytesAPIErrorZ_get_ok(owner_conv).data); + return ret_arr; +} + +static inline struct LDKAPIError CResult_ThirtyTwoBytesAPIErrorZ_get_err(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return APIError_clone(&*owner->contents.err); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner); + LDKAPIError *ret_copy = MALLOC(sizeof(LDKAPIError), "LDKAPIError"); + *ret_copy = CResult_ThirtyTwoBytesAPIErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + static jclass LDKOffersMessage_InvoiceRequest_class = NULL; static jmethodID LDKOffersMessage_InvoiceRequest_meth = NULL; static jclass LDKOffersMessage_Invoice_class = NULL; @@ -8004,12 +8790,12 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKPendingHTLCRouting_ini LDKPendingHTLCRouting_Receive_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPendingHTLCRouting$Receive")); CHECK(LDKPendingHTLCRouting_Receive_class != NULL); - LDKPendingHTLCRouting_Receive_meth = (*env)->GetMethodID(env, LDKPendingHTLCRouting_Receive_class, "", "(JJI[B[JZ)V"); + LDKPendingHTLCRouting_Receive_meth = (*env)->GetMethodID(env, LDKPendingHTLCRouting_Receive_class, "", "(JJJI[B[JZ)V"); CHECK(LDKPendingHTLCRouting_Receive_meth != NULL); LDKPendingHTLCRouting_ReceiveKeysend_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPendingHTLCRouting$ReceiveKeysend")); CHECK(LDKPendingHTLCRouting_ReceiveKeysend_class != NULL); - LDKPendingHTLCRouting_ReceiveKeysend_meth = (*env)->GetMethodID(env, LDKPendingHTLCRouting_ReceiveKeysend_class, "", "(J[BJI[J)V"); + LDKPendingHTLCRouting_ReceiveKeysend_meth = (*env)->GetMethodID(env, LDKPendingHTLCRouting_ReceiveKeysend_class, "", "(J[BJI[JZ)V"); CHECK(LDKPendingHTLCRouting_ReceiveKeysend_meth != NULL); } JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPendingHTLCRouting_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { @@ -8033,6 +8819,7 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPendingHTLCRouting_1ref_ CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_data_var); payment_data_ref = tag_ptr(payment_data_var.inner, false); int64_t payment_metadata_ref = tag_ptr(&obj->receive.payment_metadata, false); + int64_t payment_context_ref = tag_ptr(&obj->receive.payment_context, false); int32_t incoming_cltv_expiry_conv = obj->receive.incoming_cltv_expiry; int8_tArray phantom_shared_secret_arr = (*env)->NewByteArray(env, 32); (*env)->SetByteArrayRegion(env, phantom_shared_secret_arr, 0, 32, obj->receive.phantom_shared_secret.data); @@ -8048,7 +8835,7 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPendingHTLCRouting_1ref_ } (*env)->ReleasePrimitiveArrayCritical(env, custom_tlvs_arr, custom_tlvs_arr_ptr, 0); jboolean requires_blinded_error_conv = obj->receive.requires_blinded_error; - return (*env)->NewObject(env, LDKPendingHTLCRouting_Receive_class, LDKPendingHTLCRouting_Receive_meth, payment_data_ref, payment_metadata_ref, incoming_cltv_expiry_conv, phantom_shared_secret_arr, custom_tlvs_arr, requires_blinded_error_conv); + return (*env)->NewObject(env, LDKPendingHTLCRouting_Receive_class, LDKPendingHTLCRouting_Receive_meth, payment_data_ref, payment_metadata_ref, payment_context_ref, incoming_cltv_expiry_conv, phantom_shared_secret_arr, custom_tlvs_arr, requires_blinded_error_conv); } case LDKPendingHTLCRouting_ReceiveKeysend: { LDKFinalOnionHopData payment_data_var = obj->receive_keysend.payment_data; @@ -8070,7 +8857,8 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPendingHTLCRouting_1ref_ custom_tlvs_arr_ptr[x] = tag_ptr(custom_tlvs_conv_23_conv, true); } (*env)->ReleasePrimitiveArrayCritical(env, custom_tlvs_arr, custom_tlvs_arr_ptr, 0); - return (*env)->NewObject(env, LDKPendingHTLCRouting_ReceiveKeysend_class, LDKPendingHTLCRouting_ReceiveKeysend_meth, payment_data_ref, payment_preimage_arr, payment_metadata_ref, incoming_cltv_expiry_conv, custom_tlvs_arr); + jboolean requires_blinded_error_conv = obj->receive_keysend.requires_blinded_error; + return (*env)->NewObject(env, LDKPendingHTLCRouting_ReceiveKeysend_class, LDKPendingHTLCRouting_ReceiveKeysend_meth, payment_data_ref, payment_preimage_arr, payment_metadata_ref, incoming_cltv_expiry_conv, custom_tlvs_arr, requires_blinded_error_conv); } default: abort(); } @@ -8265,7 +9053,7 @@ LDKChannelMonitorUpdateStatus update_channel_LDKWatch_jcall(const void* this_arg } return ret_conv; } -LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ release_pending_monitor_events_LDKWatch_jcall(const void* this_arg) { +LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ release_pending_monitor_events_LDKWatch_jcall(const void* this_arg) { LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg; JNIEnv *env; jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); @@ -8281,20 +9069,20 @@ LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ release_pending_monitor_ev (*env)->ExceptionDescribe(env); (*env)->FatalError(env, "A call to release_pending_monitor_events in LDKWatch from rust threw an exception."); } - LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret_constr; + LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ ret_constr; ret_constr.datalen = (*env)->GetArrayLength(env, ret); if (ret_constr.datalen > 0) - ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ Elements"); + ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ Elements"); else ret_constr.data = NULL; int64_t* ret_vals = (*env)->GetLongArrayElements (env, ret, NULL); - for (size_t x = 0; x < ret_constr.datalen; x++) { - int64_t ret_conv_49 = ret_vals[x]; - void* ret_conv_49_ptr = untag_ptr(ret_conv_49); - CHECK_ACCESS(ret_conv_49_ptr); - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ ret_conv_49_conv = *(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)(ret_conv_49_ptr); - FREE(untag_ptr(ret_conv_49)); - ret_constr.data[x] = ret_conv_49_conv; + for (size_t f = 0; f < ret_constr.datalen; f++) { + int64_t ret_conv_57 = ret_vals[f]; + void* ret_conv_57_ptr = untag_ptr(ret_conv_57); + CHECK_ACCESS(ret_conv_57_ptr); + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ ret_conv_57_conv = *(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)(ret_conv_57_ptr); + FREE(untag_ptr(ret_conv_57)); + ret_constr.data[f] = ret_conv_57_conv; } (*env)->ReleaseLongArrayElements(env, ret, ret_vals, 0); if (get_jenv_res == JNI_EDETACHED) { @@ -8375,14 +9163,14 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_Watch_1release_1pendin void* this_arg_ptr = untag_ptr(this_arg); if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } LDKWatch* this_arg_conv = (LDKWatch*)this_arg_ptr; - LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret_var = (this_arg_conv->release_pending_monitor_events)(this_arg_conv->this_arg); + LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ ret_var = (this_arg_conv->release_pending_monitor_events)(this_arg_conv->this_arg); int64_tArray ret_arr = NULL; ret_arr = (*env)->NewLongArray(env, ret_var.datalen); int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL); - for (size_t x = 0; x < ret_var.datalen; x++) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv_49_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ"); - *ret_conv_49_conv = ret_var.data[x]; - ret_arr_ptr[x] = tag_ptr(ret_conv_49_conv, true); + for (size_t f = 0; f < ret_var.datalen; f++) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv_57_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ"); + *ret_conv_57_conv = ret_var.data[f]; + ret_arr_ptr[f] = tag_ptr(ret_conv_57_conv, true); } (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0); FREE(ret_var.data); @@ -8785,7 +9573,7 @@ LDKCResult_SchnorrSignatureNoneZ sign_bolt12_invoice_request_LDKNodeSigner_jcall } LDKUnsignedInvoiceRequest invoice_request_var = *invoice_request; int64_t invoice_request_ref = 0; - // WARNING: we may need a move here but no clone is available for LDKUnsignedInvoiceRequest + invoice_request_var = UnsignedInvoiceRequest_clone(&invoice_request_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_request_var); invoice_request_ref = tag_ptr(invoice_request_var.inner, invoice_request_var.is_owned); jobject obj = (*env)->NewLocalRef(env, j_calls->o); @@ -8815,7 +9603,7 @@ LDKCResult_SchnorrSignatureNoneZ sign_bolt12_invoice_LDKNodeSigner_jcall(const v } LDKUnsignedBolt12Invoice invoice_var = *invoice; int64_t invoice_ref = 0; - // WARNING: we may need a move here but no clone is available for LDKUnsignedBolt12Invoice + invoice_var = UnsignedBolt12Invoice_clone(&invoice_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_var); invoice_ref = tag_ptr(invoice_var.inner, invoice_var.is_owned); jobject obj = (*env)->NewLocalRef(env, j_calls->o); @@ -11044,34 +11832,6 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1SocketAddressZ_ default: abort(); } } -static inline struct LDKPublicKey C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR owner){ - return owner->a; -} -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* owner_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(owner); - int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(owner_conv).compressed_form); - return ret_arr; -} - -static inline struct LDKCOption_SocketAddressZ C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR owner){ - return COption_SocketAddressZ_clone(&owner->b); -} -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* owner_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(owner); - LDKCOption_SocketAddressZ *ret_copy = MALLOC(sizeof(LDKCOption_SocketAddressZ), "LDKCOption_SocketAddressZ"); - *ret_copy = C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(owner_conv); - int64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -static inline LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_clone(const LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ *orig) { - LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ) * orig->datalen, "LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ clone bytes"), .datalen = orig->datalen }; - for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(&orig->data[i]); - } - return ret; -} static inline struct LDKCVec_u8Z CResult_CVec_u8ZPeerHandleErrorZ_get_ok(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return CVec_u8Z_clone(&*owner->contents.result); @@ -11312,6 +12072,54 @@ JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoB return ret_conv; } +static inline struct LDKUnsignedInvoiceRequest CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKUnsignedInvoiceRequest ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner); + LDKUnsignedInvoiceRequest ret_var = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner); + jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKInvoiceRequest CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKInvoiceRequest ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner); + LDKInvoiceRequest ret_var = CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner); + jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + static jclass LDKCOption_SecretKeyZ_Some_class = NULL; static jmethodID LDKCOption_SecretKeyZ_Some_meth = NULL; static jclass LDKCOption_SecretKeyZ_None_class = NULL; @@ -11342,6 +12150,30 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1SecretKeyZ_1ref default: abort(); } } +static inline struct LDKInvoiceWithExplicitSigningPubkeyBuilder CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKInvoiceWithExplicitSigningPubkeyBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKInvoiceWithExplicitSigningPubkeyBuilder ret_var = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + static inline struct LDKVerifiedInvoiceRequest CResult_VerifiedInvoiceRequestNoneZ_get_ok(LDKCResult_VerifiedInvoiceRequestNoneZ *NONNULL_PTR owner){ LDKVerifiedInvoiceRequest ret = *owner->contents.result; ret.is_owned = false; @@ -11365,6 +12197,56 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1VerifiedInvoiceReques CResult_VerifiedInvoiceRequestNoneZ_get_err(owner_conv); } +static inline struct LDKInvoiceWithDerivedSigningPubkeyBuilder CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKInvoiceWithDerivedSigningPubkeyBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKInvoiceWithDerivedSigningPubkeyBuilder ret_var = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKInvoiceRequestFields CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR owner){ + LDKInvoiceRequestFields ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* owner_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(owner); + LDKInvoiceRequestFields ret_var = CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* owner_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + static inline LDKCVec_WitnessZ CVec_WitnessZ_clone(const LDKCVec_WitnessZ *orig) { LDKCVec_WitnessZ ret = { .data = MALLOC(sizeof(LDKWitness) * orig->datalen, "LDKCVec_WitnessZ clone bytes"), .datalen = orig->datalen }; for (size_t i = 0; i < ret.datalen; i++) { @@ -11372,6 +12254,36 @@ static inline LDKCVec_WitnessZ CVec_WitnessZ_clone(const LDKCVec_WitnessZ *orig) } return ret; } +static jclass LDKCOption_ECDSASignatureZ_Some_class = NULL; +static jmethodID LDKCOption_ECDSASignatureZ_Some_meth = NULL; +static jclass LDKCOption_ECDSASignatureZ_None_class = NULL; +static jmethodID LDKCOption_ECDSASignatureZ_None_meth = NULL; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1ECDSASignatureZ_init (JNIEnv *env, jclass clz) { + LDKCOption_ECDSASignatureZ_Some_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_ECDSASignatureZ$Some")); + CHECK(LDKCOption_ECDSASignatureZ_Some_class != NULL); + LDKCOption_ECDSASignatureZ_Some_meth = (*env)->GetMethodID(env, LDKCOption_ECDSASignatureZ_Some_class, "", "([B)V"); + CHECK(LDKCOption_ECDSASignatureZ_Some_meth != NULL); + LDKCOption_ECDSASignatureZ_None_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_ECDSASignatureZ$None")); + CHECK(LDKCOption_ECDSASignatureZ_None_class != NULL); + LDKCOption_ECDSASignatureZ_None_meth = (*env)->GetMethodID(env, LDKCOption_ECDSASignatureZ_None_class, "", "()V"); + CHECK(LDKCOption_ECDSASignatureZ_None_meth != NULL); +} +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1ECDSASignatureZ_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { + LDKCOption_ECDSASignatureZ *obj = (LDKCOption_ECDSASignatureZ*)untag_ptr(ptr); + switch(obj->tag) { + case LDKCOption_ECDSASignatureZ_Some: { + int8_tArray some_arr = (*env)->NewByteArray(env, 64); + (*env)->SetByteArrayRegion(env, some_arr, 0, 64, obj->some.compact_form); + return (*env)->NewObject(env, LDKCOption_ECDSASignatureZ_Some_class, LDKCOption_ECDSASignatureZ_Some_meth, some_arr); + } + case LDKCOption_ECDSASignatureZ_None: { + return (*env)->NewObject(env, LDKCOption_ECDSASignatureZ_None_class, LDKCOption_ECDSASignatureZ_None_meth); + } + default: abort(); + } +} static jclass LDKCOption_i64Z_Some_class = NULL; static jmethodID LDKCOption_i64Z_Some_meth = NULL; static jclass LDKCOption_i64Z_None_class = NULL; @@ -12863,13 +13775,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt11InvoiceSignO return ret_ref; } -static inline LDKCVec_FutureZ CVec_FutureZ_clone(const LDKCVec_FutureZ *orig) { - LDKCVec_FutureZ ret = { .data = MALLOC(sizeof(LDKFuture) * orig->datalen, "LDKCVec_FutureZ clone bytes"), .datalen = orig->datalen }; - for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = Future_clone(&orig->data[i]); - } - return ret; -} static inline struct LDKOffersMessage CResult_OffersMessageDecodeErrorZ_get_ok(LDKCResult_OffersMessageDecodeErrorZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return OffersMessage_clone(&*owner->contents.result); @@ -13314,16 +14219,30 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownScriptInva return ret_ref; } -static jclass LDKPaymentPurpose_InvoicePayment_class = NULL; -static jmethodID LDKPaymentPurpose_InvoicePayment_meth = NULL; +static jclass LDKPaymentPurpose_Bolt11InvoicePayment_class = NULL; +static jmethodID LDKPaymentPurpose_Bolt11InvoicePayment_meth = NULL; +static jclass LDKPaymentPurpose_Bolt12OfferPayment_class = NULL; +static jmethodID LDKPaymentPurpose_Bolt12OfferPayment_meth = NULL; +static jclass LDKPaymentPurpose_Bolt12RefundPayment_class = NULL; +static jmethodID LDKPaymentPurpose_Bolt12RefundPayment_meth = NULL; static jclass LDKPaymentPurpose_SpontaneousPayment_class = NULL; static jmethodID LDKPaymentPurpose_SpontaneousPayment_meth = NULL; JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKPaymentPurpose_init (JNIEnv *env, jclass clz) { - LDKPaymentPurpose_InvoicePayment_class = - (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentPurpose$InvoicePayment")); - CHECK(LDKPaymentPurpose_InvoicePayment_class != NULL); - LDKPaymentPurpose_InvoicePayment_meth = (*env)->GetMethodID(env, LDKPaymentPurpose_InvoicePayment_class, "", "(J[B)V"); - CHECK(LDKPaymentPurpose_InvoicePayment_meth != NULL); + LDKPaymentPurpose_Bolt11InvoicePayment_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentPurpose$Bolt11InvoicePayment")); + CHECK(LDKPaymentPurpose_Bolt11InvoicePayment_class != NULL); + LDKPaymentPurpose_Bolt11InvoicePayment_meth = (*env)->GetMethodID(env, LDKPaymentPurpose_Bolt11InvoicePayment_class, "", "(J[B)V"); + CHECK(LDKPaymentPurpose_Bolt11InvoicePayment_meth != NULL); + LDKPaymentPurpose_Bolt12OfferPayment_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentPurpose$Bolt12OfferPayment")); + CHECK(LDKPaymentPurpose_Bolt12OfferPayment_class != NULL); + LDKPaymentPurpose_Bolt12OfferPayment_meth = (*env)->GetMethodID(env, LDKPaymentPurpose_Bolt12OfferPayment_class, "", "(J[BJ)V"); + CHECK(LDKPaymentPurpose_Bolt12OfferPayment_meth != NULL); + LDKPaymentPurpose_Bolt12RefundPayment_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentPurpose$Bolt12RefundPayment")); + CHECK(LDKPaymentPurpose_Bolt12RefundPayment_class != NULL); + LDKPaymentPurpose_Bolt12RefundPayment_meth = (*env)->GetMethodID(env, LDKPaymentPurpose_Bolt12RefundPayment_class, "", "(J[BJ)V"); + CHECK(LDKPaymentPurpose_Bolt12RefundPayment_meth != NULL); LDKPaymentPurpose_SpontaneousPayment_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentPurpose$SpontaneousPayment")); CHECK(LDKPaymentPurpose_SpontaneousPayment_class != NULL); @@ -13333,11 +14252,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKPaymentPurpose_init (J JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPaymentPurpose_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); switch(obj->tag) { - case LDKPaymentPurpose_InvoicePayment: { - int64_t payment_preimage_ref = tag_ptr(&obj->invoice_payment.payment_preimage, false); + case LDKPaymentPurpose_Bolt11InvoicePayment: { + int64_t payment_preimage_ref = tag_ptr(&obj->bolt11_invoice_payment.payment_preimage, false); + int8_tArray payment_secret_arr = (*env)->NewByteArray(env, 32); + (*env)->SetByteArrayRegion(env, payment_secret_arr, 0, 32, obj->bolt11_invoice_payment.payment_secret.data); + return (*env)->NewObject(env, LDKPaymentPurpose_Bolt11InvoicePayment_class, LDKPaymentPurpose_Bolt11InvoicePayment_meth, payment_preimage_ref, payment_secret_arr); + } + case LDKPaymentPurpose_Bolt12OfferPayment: { + int64_t payment_preimage_ref = tag_ptr(&obj->bolt12_offer_payment.payment_preimage, false); int8_tArray payment_secret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, payment_secret_arr, 0, 32, obj->invoice_payment.payment_secret.data); - return (*env)->NewObject(env, LDKPaymentPurpose_InvoicePayment_class, LDKPaymentPurpose_InvoicePayment_meth, payment_preimage_ref, payment_secret_arr); + (*env)->SetByteArrayRegion(env, payment_secret_arr, 0, 32, obj->bolt12_offer_payment.payment_secret.data); + LDKBolt12OfferContext payment_context_var = obj->bolt12_offer_payment.payment_context; + int64_t payment_context_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_var); + payment_context_ref = tag_ptr(payment_context_var.inner, false); + return (*env)->NewObject(env, LDKPaymentPurpose_Bolt12OfferPayment_class, LDKPaymentPurpose_Bolt12OfferPayment_meth, payment_preimage_ref, payment_secret_arr, payment_context_ref); + } + case LDKPaymentPurpose_Bolt12RefundPayment: { + int64_t payment_preimage_ref = tag_ptr(&obj->bolt12_refund_payment.payment_preimage, false); + int8_tArray payment_secret_arr = (*env)->NewByteArray(env, 32); + (*env)->SetByteArrayRegion(env, payment_secret_arr, 0, 32, obj->bolt12_refund_payment.payment_secret.data); + LDKBolt12RefundContext payment_context_var = obj->bolt12_refund_payment.payment_context; + int64_t payment_context_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_var); + payment_context_ref = tag_ptr(payment_context_var.inner, false); + return (*env)->NewObject(env, LDKPaymentPurpose_Bolt12RefundPayment_class, LDKPaymentPurpose_Bolt12RefundPayment_meth, payment_preimage_ref, payment_secret_arr, payment_context_ref); } case LDKPaymentPurpose_SpontaneousPayment: { int8_tArray spontaneous_payment_arr = (*env)->NewByteArray(env, 32); @@ -13480,120 +14419,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1PathFailu return ret_ref; } -static jclass LDKClosureReason_CounterpartyForceClosed_class = NULL; -static jmethodID LDKClosureReason_CounterpartyForceClosed_meth = NULL; -static jclass LDKClosureReason_HolderForceClosed_class = NULL; -static jmethodID LDKClosureReason_HolderForceClosed_meth = NULL; -static jclass LDKClosureReason_CooperativeClosure_class = NULL; -static jmethodID LDKClosureReason_CooperativeClosure_meth = NULL; -static jclass LDKClosureReason_CommitmentTxConfirmed_class = NULL; -static jmethodID LDKClosureReason_CommitmentTxConfirmed_meth = NULL; -static jclass LDKClosureReason_FundingTimedOut_class = NULL; -static jmethodID LDKClosureReason_FundingTimedOut_meth = NULL; -static jclass LDKClosureReason_ProcessingError_class = NULL; -static jmethodID LDKClosureReason_ProcessingError_meth = NULL; -static jclass LDKClosureReason_DisconnectedPeer_class = NULL; -static jmethodID LDKClosureReason_DisconnectedPeer_meth = NULL; -static jclass LDKClosureReason_OutdatedChannelManager_class = NULL; -static jmethodID LDKClosureReason_OutdatedChannelManager_meth = NULL; -static jclass LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class = NULL; -static jmethodID LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth = NULL; -static jclass LDKClosureReason_FundingBatchClosure_class = NULL; -static jmethodID LDKClosureReason_FundingBatchClosure_meth = NULL; -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKClosureReason_init (JNIEnv *env, jclass clz) { - LDKClosureReason_CounterpartyForceClosed_class = - (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CounterpartyForceClosed")); - CHECK(LDKClosureReason_CounterpartyForceClosed_class != NULL); - LDKClosureReason_CounterpartyForceClosed_meth = (*env)->GetMethodID(env, LDKClosureReason_CounterpartyForceClosed_class, "", "(J)V"); - CHECK(LDKClosureReason_CounterpartyForceClosed_meth != NULL); - LDKClosureReason_HolderForceClosed_class = - (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$HolderForceClosed")); - CHECK(LDKClosureReason_HolderForceClosed_class != NULL); - LDKClosureReason_HolderForceClosed_meth = (*env)->GetMethodID(env, LDKClosureReason_HolderForceClosed_class, "", "()V"); - CHECK(LDKClosureReason_HolderForceClosed_meth != NULL); - LDKClosureReason_CooperativeClosure_class = - (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CooperativeClosure")); - CHECK(LDKClosureReason_CooperativeClosure_class != NULL); - LDKClosureReason_CooperativeClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_CooperativeClosure_class, "", "()V"); - CHECK(LDKClosureReason_CooperativeClosure_meth != NULL); - LDKClosureReason_CommitmentTxConfirmed_class = - (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CommitmentTxConfirmed")); - CHECK(LDKClosureReason_CommitmentTxConfirmed_class != NULL); - LDKClosureReason_CommitmentTxConfirmed_meth = (*env)->GetMethodID(env, LDKClosureReason_CommitmentTxConfirmed_class, "", "()V"); - CHECK(LDKClosureReason_CommitmentTxConfirmed_meth != NULL); - LDKClosureReason_FundingTimedOut_class = - (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$FundingTimedOut")); - CHECK(LDKClosureReason_FundingTimedOut_class != NULL); - LDKClosureReason_FundingTimedOut_meth = (*env)->GetMethodID(env, LDKClosureReason_FundingTimedOut_class, "", "()V"); - CHECK(LDKClosureReason_FundingTimedOut_meth != NULL); - LDKClosureReason_ProcessingError_class = - (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$ProcessingError")); - CHECK(LDKClosureReason_ProcessingError_class != NULL); - LDKClosureReason_ProcessingError_meth = (*env)->GetMethodID(env, LDKClosureReason_ProcessingError_class, "", "(Ljava/lang/String;)V"); - CHECK(LDKClosureReason_ProcessingError_meth != NULL); - LDKClosureReason_DisconnectedPeer_class = - (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$DisconnectedPeer")); - CHECK(LDKClosureReason_DisconnectedPeer_class != NULL); - LDKClosureReason_DisconnectedPeer_meth = (*env)->GetMethodID(env, LDKClosureReason_DisconnectedPeer_class, "", "()V"); - CHECK(LDKClosureReason_DisconnectedPeer_meth != NULL); - LDKClosureReason_OutdatedChannelManager_class = - (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$OutdatedChannelManager")); - CHECK(LDKClosureReason_OutdatedChannelManager_class != NULL); - LDKClosureReason_OutdatedChannelManager_meth = (*env)->GetMethodID(env, LDKClosureReason_OutdatedChannelManager_class, "", "()V"); - CHECK(LDKClosureReason_OutdatedChannelManager_meth != NULL); - LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class = - (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CounterpartyCoopClosedUnfundedChannel")); - CHECK(LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class != NULL); - LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth = (*env)->GetMethodID(env, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class, "", "()V"); - CHECK(LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth != NULL); - LDKClosureReason_FundingBatchClosure_class = - (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$FundingBatchClosure")); - CHECK(LDKClosureReason_FundingBatchClosure_class != NULL); - LDKClosureReason_FundingBatchClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_FundingBatchClosure_class, "", "()V"); - CHECK(LDKClosureReason_FundingBatchClosure_meth != NULL); -} -JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKClosureReason_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { - LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr); - switch(obj->tag) { - case LDKClosureReason_CounterpartyForceClosed: { - LDKUntrustedString peer_msg_var = obj->counterparty_force_closed.peer_msg; - int64_t peer_msg_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(peer_msg_var); - peer_msg_ref = tag_ptr(peer_msg_var.inner, false); - return (*env)->NewObject(env, LDKClosureReason_CounterpartyForceClosed_class, LDKClosureReason_CounterpartyForceClosed_meth, peer_msg_ref); - } - case LDKClosureReason_HolderForceClosed: { - return (*env)->NewObject(env, LDKClosureReason_HolderForceClosed_class, LDKClosureReason_HolderForceClosed_meth); - } - case LDKClosureReason_CooperativeClosure: { - return (*env)->NewObject(env, LDKClosureReason_CooperativeClosure_class, LDKClosureReason_CooperativeClosure_meth); - } - case LDKClosureReason_CommitmentTxConfirmed: { - return (*env)->NewObject(env, LDKClosureReason_CommitmentTxConfirmed_class, LDKClosureReason_CommitmentTxConfirmed_meth); - } - case LDKClosureReason_FundingTimedOut: { - return (*env)->NewObject(env, LDKClosureReason_FundingTimedOut_class, LDKClosureReason_FundingTimedOut_meth); - } - case LDKClosureReason_ProcessingError: { - LDKStr err_str = obj->processing_error.err; - jstring err_conv = str_ref_to_java(env, err_str.chars, err_str.len); - return (*env)->NewObject(env, LDKClosureReason_ProcessingError_class, LDKClosureReason_ProcessingError_meth, err_conv); - } - case LDKClosureReason_DisconnectedPeer: { - return (*env)->NewObject(env, LDKClosureReason_DisconnectedPeer_class, LDKClosureReason_DisconnectedPeer_meth); - } - case LDKClosureReason_OutdatedChannelManager: { - return (*env)->NewObject(env, LDKClosureReason_OutdatedChannelManager_class, LDKClosureReason_OutdatedChannelManager_meth); - } - case LDKClosureReason_CounterpartyCoopClosedUnfundedChannel: { - return (*env)->NewObject(env, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth); - } - case LDKClosureReason_FundingBatchClosure: { - return (*env)->NewObject(env, LDKClosureReason_FundingBatchClosure_class, LDKClosureReason_FundingBatchClosure_meth); - } - default: abort(); - } -} static jclass LDKCOption_ClosureReasonZ_Some_class = NULL; static jmethodID LDKCOption_ClosureReasonZ_Some_meth = NULL; static jclass LDKCOption_ClosureReasonZ_None_class = NULL; @@ -13653,13 +14478,15 @@ static jclass LDKHTLCDestination_UnknownNextHop_class = NULL; static jmethodID LDKHTLCDestination_UnknownNextHop_meth = NULL; static jclass LDKHTLCDestination_InvalidForward_class = NULL; static jmethodID LDKHTLCDestination_InvalidForward_meth = NULL; +static jclass LDKHTLCDestination_InvalidOnion_class = NULL; +static jmethodID LDKHTLCDestination_InvalidOnion_meth = NULL; static jclass LDKHTLCDestination_FailedPayment_class = NULL; static jmethodID LDKHTLCDestination_FailedPayment_meth = NULL; JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKHTLCDestination_init (JNIEnv *env, jclass clz) { LDKHTLCDestination_NextHopChannel_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKHTLCDestination$NextHopChannel")); CHECK(LDKHTLCDestination_NextHopChannel_class != NULL); - LDKHTLCDestination_NextHopChannel_meth = (*env)->GetMethodID(env, LDKHTLCDestination_NextHopChannel_class, "", "([B[B)V"); + LDKHTLCDestination_NextHopChannel_meth = (*env)->GetMethodID(env, LDKHTLCDestination_NextHopChannel_class, "", "([BJ)V"); CHECK(LDKHTLCDestination_NextHopChannel_meth != NULL); LDKHTLCDestination_UnknownNextHop_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKHTLCDestination$UnknownNextHop")); @@ -13671,6 +14498,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKHTLCDestination_init ( CHECK(LDKHTLCDestination_InvalidForward_class != NULL); LDKHTLCDestination_InvalidForward_meth = (*env)->GetMethodID(env, LDKHTLCDestination_InvalidForward_class, "", "(J)V"); CHECK(LDKHTLCDestination_InvalidForward_meth != NULL); + LDKHTLCDestination_InvalidOnion_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKHTLCDestination$InvalidOnion")); + CHECK(LDKHTLCDestination_InvalidOnion_class != NULL); + LDKHTLCDestination_InvalidOnion_meth = (*env)->GetMethodID(env, LDKHTLCDestination_InvalidOnion_class, "", "()V"); + CHECK(LDKHTLCDestination_InvalidOnion_meth != NULL); LDKHTLCDestination_FailedPayment_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKHTLCDestination$FailedPayment")); CHECK(LDKHTLCDestination_FailedPayment_class != NULL); @@ -13683,9 +14515,11 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKHTLCDestination_1ref_1fr case LDKHTLCDestination_NextHopChannel: { int8_tArray node_id_arr = (*env)->NewByteArray(env, 33); (*env)->SetByteArrayRegion(env, node_id_arr, 0, 33, obj->next_hop_channel.node_id.compressed_form); - int8_tArray channel_id_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, channel_id_arr, 0, 32, obj->next_hop_channel.channel_id.data); - return (*env)->NewObject(env, LDKHTLCDestination_NextHopChannel_class, LDKHTLCDestination_NextHopChannel_meth, node_id_arr, channel_id_arr); + LDKChannelId channel_id_var = obj->next_hop_channel.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return (*env)->NewObject(env, LDKHTLCDestination_NextHopChannel_class, LDKHTLCDestination_NextHopChannel_meth, node_id_arr, channel_id_ref); } case LDKHTLCDestination_UnknownNextHop: { int64_t requested_forward_scid_conv = obj->unknown_next_hop.requested_forward_scid; @@ -13695,6 +14529,9 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKHTLCDestination_1ref_1fr int64_t requested_forward_scid_conv = obj->invalid_forward.requested_forward_scid; return (*env)->NewObject(env, LDKHTLCDestination_InvalidForward_class, LDKHTLCDestination_InvalidForward_meth, requested_forward_scid_conv); } + case LDKHTLCDestination_InvalidOnion: { + return (*env)->NewObject(env, LDKHTLCDestination_InvalidOnion_class, LDKHTLCDestination_InvalidOnion_meth); + } case LDKHTLCDestination_FailedPayment: { int8_tArray payment_hash_arr = (*env)->NewByteArray(env, 32); (*env)->SetByteArrayRegion(env, payment_hash_arr, 0, 32, obj->failed_payment.payment_hash.data); @@ -13852,18 +14689,24 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKBumpTransactionEvent_i LDKBumpTransactionEvent_ChannelClose_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKBumpTransactionEvent$ChannelClose")); CHECK(LDKBumpTransactionEvent_ChannelClose_class != NULL); - LDKBumpTransactionEvent_ChannelClose_meth = (*env)->GetMethodID(env, LDKBumpTransactionEvent_ChannelClose_class, "", "([BI[BJJ[J)V"); + LDKBumpTransactionEvent_ChannelClose_meth = (*env)->GetMethodID(env, LDKBumpTransactionEvent_ChannelClose_class, "", "(J[B[BI[BJJ[J)V"); CHECK(LDKBumpTransactionEvent_ChannelClose_meth != NULL); LDKBumpTransactionEvent_HTLCResolution_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKBumpTransactionEvent$HTLCResolution")); CHECK(LDKBumpTransactionEvent_HTLCResolution_class != NULL); - LDKBumpTransactionEvent_HTLCResolution_meth = (*env)->GetMethodID(env, LDKBumpTransactionEvent_HTLCResolution_class, "", "([BI[JI)V"); + LDKBumpTransactionEvent_HTLCResolution_meth = (*env)->GetMethodID(env, LDKBumpTransactionEvent_HTLCResolution_class, "", "(J[B[BI[JI)V"); CHECK(LDKBumpTransactionEvent_HTLCResolution_meth != NULL); } JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKBumpTransactionEvent_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr); switch(obj->tag) { case LDKBumpTransactionEvent_ChannelClose: { + LDKChannelId channel_id_var = obj->channel_close.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33); + (*env)->SetByteArrayRegion(env, counterparty_node_id_arr, 0, 33, obj->channel_close.counterparty_node_id.compressed_form); int8_tArray claim_id_arr = (*env)->NewByteArray(env, 32); (*env)->SetByteArrayRegion(env, claim_id_arr, 0, 32, obj->channel_close.claim_id.data); int32_t package_target_feerate_sat_per_1000_weight_conv = obj->channel_close.package_target_feerate_sat_per_1000_weight; @@ -13887,9 +14730,15 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKBumpTransactionEvent_1re pending_htlcs_arr_ptr[y] = pending_htlcs_conv_24_ref; } (*env)->ReleasePrimitiveArrayCritical(env, pending_htlcs_arr, pending_htlcs_arr_ptr, 0); - return (*env)->NewObject(env, LDKBumpTransactionEvent_ChannelClose_class, LDKBumpTransactionEvent_ChannelClose_meth, claim_id_arr, package_target_feerate_sat_per_1000_weight_conv, commitment_tx_arr, commitment_tx_fee_satoshis_conv, anchor_descriptor_ref, pending_htlcs_arr); + return (*env)->NewObject(env, LDKBumpTransactionEvent_ChannelClose_class, LDKBumpTransactionEvent_ChannelClose_meth, channel_id_ref, counterparty_node_id_arr, claim_id_arr, package_target_feerate_sat_per_1000_weight_conv, commitment_tx_arr, commitment_tx_fee_satoshis_conv, anchor_descriptor_ref, pending_htlcs_arr); } case LDKBumpTransactionEvent_HTLCResolution: { + LDKChannelId channel_id_var = obj->htlc_resolution.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33); + (*env)->SetByteArrayRegion(env, counterparty_node_id_arr, 0, 33, obj->htlc_resolution.counterparty_node_id.compressed_form); int8_tArray claim_id_arr = (*env)->NewByteArray(env, 32); (*env)->SetByteArrayRegion(env, claim_id_arr, 0, 32, obj->htlc_resolution.claim_id.data); int32_t target_feerate_sat_per_1000_weight_conv = obj->htlc_resolution.target_feerate_sat_per_1000_weight; @@ -13906,7 +14755,7 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKBumpTransactionEvent_1re } (*env)->ReleasePrimitiveArrayCritical(env, htlc_descriptors_arr, htlc_descriptors_arr_ptr, 0); int32_t tx_lock_time_conv = obj->htlc_resolution.tx_lock_time; - return (*env)->NewObject(env, LDKBumpTransactionEvent_HTLCResolution_class, LDKBumpTransactionEvent_HTLCResolution_meth, claim_id_arr, target_feerate_sat_per_1000_weight_conv, htlc_descriptors_arr, tx_lock_time_conv); + return (*env)->NewObject(env, LDKBumpTransactionEvent_HTLCResolution_class, LDKBumpTransactionEvent_HTLCResolution_meth, channel_id_ref, counterparty_node_id_arr, claim_id_arr, target_feerate_sat_per_1000_weight_conv, htlc_descriptors_arr, tx_lock_time_conv); } default: abort(); } @@ -13959,7 +14808,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKEvent_init (JNIEnv *en LDKEvent_FundingGenerationReady_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$FundingGenerationReady")); CHECK(LDKEvent_FundingGenerationReady_class != NULL); - LDKEvent_FundingGenerationReady_meth = (*env)->GetMethodID(env, LDKEvent_FundingGenerationReady_class, "", "([B[BJ[B[B)V"); + LDKEvent_FundingGenerationReady_meth = (*env)->GetMethodID(env, LDKEvent_FundingGenerationReady_class, "", "(J[BJ[B[B)V"); CHECK(LDKEvent_FundingGenerationReady_meth != NULL); LDKEvent_PaymentClaimable_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$PaymentClaimable")); @@ -14029,37 +14878,37 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKEvent_init (JNIEnv *en LDKEvent_PaymentForwarded_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$PaymentForwarded")); CHECK(LDKEvent_PaymentForwarded_class != NULL); - LDKEvent_PaymentForwarded_meth = (*env)->GetMethodID(env, LDKEvent_PaymentForwarded_class, "", "(JJJZJ)V"); + LDKEvent_PaymentForwarded_meth = (*env)->GetMethodID(env, LDKEvent_PaymentForwarded_class, "", "(JJJJJJZJ)V"); CHECK(LDKEvent_PaymentForwarded_meth != NULL); LDKEvent_ChannelPending_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$ChannelPending")); CHECK(LDKEvent_ChannelPending_class != NULL); - LDKEvent_ChannelPending_meth = (*env)->GetMethodID(env, LDKEvent_ChannelPending_class, "", "([B[BJ[BJ)V"); + LDKEvent_ChannelPending_meth = (*env)->GetMethodID(env, LDKEvent_ChannelPending_class, "", "(J[BJ[BJJ)V"); CHECK(LDKEvent_ChannelPending_meth != NULL); LDKEvent_ChannelReady_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$ChannelReady")); CHECK(LDKEvent_ChannelReady_class != NULL); - LDKEvent_ChannelReady_meth = (*env)->GetMethodID(env, LDKEvent_ChannelReady_class, "", "([B[B[BJ)V"); + LDKEvent_ChannelReady_meth = (*env)->GetMethodID(env, LDKEvent_ChannelReady_class, "", "(J[B[BJ)V"); CHECK(LDKEvent_ChannelReady_meth != NULL); LDKEvent_ChannelClosed_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$ChannelClosed")); CHECK(LDKEvent_ChannelClosed_class != NULL); - LDKEvent_ChannelClosed_meth = (*env)->GetMethodID(env, LDKEvent_ChannelClosed_class, "", "([B[BJ[BJJ)V"); + LDKEvent_ChannelClosed_meth = (*env)->GetMethodID(env, LDKEvent_ChannelClosed_class, "", "(J[BJ[BJJ)V"); CHECK(LDKEvent_ChannelClosed_meth != NULL); LDKEvent_DiscardFunding_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$DiscardFunding")); CHECK(LDKEvent_DiscardFunding_class != NULL); - LDKEvent_DiscardFunding_meth = (*env)->GetMethodID(env, LDKEvent_DiscardFunding_class, "", "([B[B)V"); + LDKEvent_DiscardFunding_meth = (*env)->GetMethodID(env, LDKEvent_DiscardFunding_class, "", "(J[B)V"); CHECK(LDKEvent_DiscardFunding_meth != NULL); LDKEvent_OpenChannelRequest_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$OpenChannelRequest")); CHECK(LDKEvent_OpenChannelRequest_class != NULL); - LDKEvent_OpenChannelRequest_meth = (*env)->GetMethodID(env, LDKEvent_OpenChannelRequest_class, "", "([B[BJJJ)V"); + LDKEvent_OpenChannelRequest_meth = (*env)->GetMethodID(env, LDKEvent_OpenChannelRequest_class, "", "(J[BJJJ)V"); CHECK(LDKEvent_OpenChannelRequest_meth != NULL); LDKEvent_HTLCHandlingFailed_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$HTLCHandlingFailed")); CHECK(LDKEvent_HTLCHandlingFailed_class != NULL); - LDKEvent_HTLCHandlingFailed_meth = (*env)->GetMethodID(env, LDKEvent_HTLCHandlingFailed_class, "", "([BJ)V"); + LDKEvent_HTLCHandlingFailed_meth = (*env)->GetMethodID(env, LDKEvent_HTLCHandlingFailed_class, "", "(JJ)V"); CHECK(LDKEvent_HTLCHandlingFailed_meth != NULL); LDKEvent_BumpTransaction_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$BumpTransaction")); @@ -14071,8 +14920,10 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr(JN LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); switch(obj->tag) { case LDKEvent_FundingGenerationReady: { - int8_tArray temporary_channel_id_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, temporary_channel_id_arr, 0, 32, obj->funding_generation_ready.temporary_channel_id.data); + LDKChannelId temporary_channel_id_var = obj->funding_generation_ready.temporary_channel_id; + int64_t temporary_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_var); + temporary_channel_id_ref = tag_ptr(temporary_channel_id_var.inner, false); int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33); (*env)->SetByteArrayRegion(env, counterparty_node_id_arr, 0, 33, obj->funding_generation_ready.counterparty_node_id.compressed_form); int64_t channel_value_satoshis_conv = obj->funding_generation_ready.channel_value_satoshis; @@ -14081,7 +14932,7 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr(JN (*env)->SetByteArrayRegion(env, output_script_arr, 0, output_script_var.datalen, output_script_var.data); int8_tArray user_channel_id_arr = (*env)->NewByteArray(env, 16); (*env)->SetByteArrayRegion(env, user_channel_id_arr, 0, 16, obj->funding_generation_ready.user_channel_id.le_bytes); - return (*env)->NewObject(env, LDKEvent_FundingGenerationReady_class, LDKEvent_FundingGenerationReady_meth, temporary_channel_id_arr, counterparty_node_id_arr, channel_value_satoshis_conv, output_script_arr, user_channel_id_arr); + return (*env)->NewObject(env, LDKEvent_FundingGenerationReady_class, LDKEvent_FundingGenerationReady_meth, temporary_channel_id_ref, counterparty_node_id_arr, channel_value_satoshis_conv, output_script_arr, user_channel_id_arr); } case LDKEvent_PaymentClaimable: { int8_tArray receiver_node_id_arr = (*env)->NewByteArray(env, 33); @@ -14095,7 +14946,10 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr(JN int64_t amount_msat_conv = obj->payment_claimable.amount_msat; int64_t counterparty_skimmed_fee_msat_conv = obj->payment_claimable.counterparty_skimmed_fee_msat; int64_t purpose_ref = tag_ptr(&obj->payment_claimable.purpose, false); - int64_t via_channel_id_ref = tag_ptr(&obj->payment_claimable.via_channel_id, false); + LDKChannelId via_channel_id_var = obj->payment_claimable.via_channel_id; + int64_t via_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(via_channel_id_var); + via_channel_id_ref = tag_ptr(via_channel_id_var.inner, false); int64_t via_user_channel_id_ref = tag_ptr(&obj->payment_claimable.via_user_channel_id, false); int64_t claim_deadline_ref = tag_ptr(&obj->payment_claimable.claim_deadline, false); return (*env)->NewObject(env, LDKEvent_PaymentClaimable_class, LDKEvent_PaymentClaimable_meth, receiver_node_id_arr, payment_hash_arr, onion_fields_ref, amount_msat_conv, counterparty_skimmed_fee_msat_conv, purpose_ref, via_channel_id_ref, via_user_channel_id_ref, claim_deadline_ref); @@ -14228,34 +15082,57 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr(JN outputs_arr_ptr[b] = outputs_conv_27_ref; } (*env)->ReleasePrimitiveArrayCritical(env, outputs_arr, outputs_arr_ptr, 0); - int64_t channel_id_ref = tag_ptr(&obj->spendable_outputs.channel_id, false); + LDKChannelId channel_id_var = obj->spendable_outputs.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); return (*env)->NewObject(env, LDKEvent_SpendableOutputs_class, LDKEvent_SpendableOutputs_meth, outputs_arr, channel_id_ref); } case LDKEvent_PaymentForwarded: { - int64_t prev_channel_id_ref = tag_ptr(&obj->payment_forwarded.prev_channel_id, false); - int64_t next_channel_id_ref = tag_ptr(&obj->payment_forwarded.next_channel_id, false); - int64_t fee_earned_msat_ref = tag_ptr(&obj->payment_forwarded.fee_earned_msat, false); + LDKChannelId prev_channel_id_var = obj->payment_forwarded.prev_channel_id; + int64_t prev_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_var); + prev_channel_id_ref = tag_ptr(prev_channel_id_var.inner, false); + LDKChannelId next_channel_id_var = obj->payment_forwarded.next_channel_id; + int64_t next_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(next_channel_id_var); + next_channel_id_ref = tag_ptr(next_channel_id_var.inner, false); + int64_t prev_user_channel_id_ref = tag_ptr(&obj->payment_forwarded.prev_user_channel_id, false); + int64_t next_user_channel_id_ref = tag_ptr(&obj->payment_forwarded.next_user_channel_id, false); + int64_t total_fee_earned_msat_ref = tag_ptr(&obj->payment_forwarded.total_fee_earned_msat, false); + int64_t skimmed_fee_msat_ref = tag_ptr(&obj->payment_forwarded.skimmed_fee_msat, false); jboolean claim_from_onchain_tx_conv = obj->payment_forwarded.claim_from_onchain_tx; int64_t outbound_amount_forwarded_msat_ref = tag_ptr(&obj->payment_forwarded.outbound_amount_forwarded_msat, false); - return (*env)->NewObject(env, LDKEvent_PaymentForwarded_class, LDKEvent_PaymentForwarded_meth, prev_channel_id_ref, next_channel_id_ref, fee_earned_msat_ref, claim_from_onchain_tx_conv, outbound_amount_forwarded_msat_ref); + return (*env)->NewObject(env, LDKEvent_PaymentForwarded_class, LDKEvent_PaymentForwarded_meth, prev_channel_id_ref, next_channel_id_ref, prev_user_channel_id_ref, next_user_channel_id_ref, total_fee_earned_msat_ref, skimmed_fee_msat_ref, claim_from_onchain_tx_conv, outbound_amount_forwarded_msat_ref); } case LDKEvent_ChannelPending: { - int8_tArray channel_id_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, channel_id_arr, 0, 32, obj->channel_pending.channel_id.data); + LDKChannelId channel_id_var = obj->channel_pending.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); int8_tArray user_channel_id_arr = (*env)->NewByteArray(env, 16); (*env)->SetByteArrayRegion(env, user_channel_id_arr, 0, 16, obj->channel_pending.user_channel_id.le_bytes); - int64_t former_temporary_channel_id_ref = tag_ptr(&obj->channel_pending.former_temporary_channel_id, false); + LDKChannelId former_temporary_channel_id_var = obj->channel_pending.former_temporary_channel_id; + int64_t former_temporary_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(former_temporary_channel_id_var); + former_temporary_channel_id_ref = tag_ptr(former_temporary_channel_id_var.inner, false); int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33); (*env)->SetByteArrayRegion(env, counterparty_node_id_arr, 0, 33, obj->channel_pending.counterparty_node_id.compressed_form); LDKOutPoint funding_txo_var = obj->channel_pending.funding_txo; int64_t funding_txo_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_var); funding_txo_ref = tag_ptr(funding_txo_var.inner, false); - return (*env)->NewObject(env, LDKEvent_ChannelPending_class, LDKEvent_ChannelPending_meth, channel_id_arr, user_channel_id_arr, former_temporary_channel_id_ref, counterparty_node_id_arr, funding_txo_ref); + LDKChannelTypeFeatures channel_type_var = obj->channel_pending.channel_type; + int64_t channel_type_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_var); + channel_type_ref = tag_ptr(channel_type_var.inner, false); + return (*env)->NewObject(env, LDKEvent_ChannelPending_class, LDKEvent_ChannelPending_meth, channel_id_ref, user_channel_id_arr, former_temporary_channel_id_ref, counterparty_node_id_arr, funding_txo_ref, channel_type_ref); } case LDKEvent_ChannelReady: { - int8_tArray channel_id_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, channel_id_arr, 0, 32, obj->channel_ready.channel_id.data); + LDKChannelId channel_id_var = obj->channel_ready.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); int8_tArray user_channel_id_arr = (*env)->NewByteArray(env, 16); (*env)->SetByteArrayRegion(env, user_channel_id_arr, 0, 16, obj->channel_ready.user_channel_id.le_bytes); int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33); @@ -14264,11 +15141,13 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr(JN int64_t channel_type_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_var); channel_type_ref = tag_ptr(channel_type_var.inner, false); - return (*env)->NewObject(env, LDKEvent_ChannelReady_class, LDKEvent_ChannelReady_meth, channel_id_arr, user_channel_id_arr, counterparty_node_id_arr, channel_type_ref); + return (*env)->NewObject(env, LDKEvent_ChannelReady_class, LDKEvent_ChannelReady_meth, channel_id_ref, user_channel_id_arr, counterparty_node_id_arr, channel_type_ref); } case LDKEvent_ChannelClosed: { - int8_tArray channel_id_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, channel_id_arr, 0, 32, obj->channel_closed.channel_id.data); + LDKChannelId channel_id_var = obj->channel_closed.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); int8_tArray user_channel_id_arr = (*env)->NewByteArray(env, 16); (*env)->SetByteArrayRegion(env, user_channel_id_arr, 0, 16, obj->channel_closed.user_channel_id.le_bytes); int64_t reason_ref = tag_ptr(&obj->channel_closed.reason, false); @@ -14279,19 +15158,23 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr(JN int64_t channel_funding_txo_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_txo_var); channel_funding_txo_ref = tag_ptr(channel_funding_txo_var.inner, false); - return (*env)->NewObject(env, LDKEvent_ChannelClosed_class, LDKEvent_ChannelClosed_meth, channel_id_arr, user_channel_id_arr, reason_ref, counterparty_node_id_arr, channel_capacity_sats_ref, channel_funding_txo_ref); + return (*env)->NewObject(env, LDKEvent_ChannelClosed_class, LDKEvent_ChannelClosed_meth, channel_id_ref, user_channel_id_arr, reason_ref, counterparty_node_id_arr, channel_capacity_sats_ref, channel_funding_txo_ref); } case LDKEvent_DiscardFunding: { - int8_tArray channel_id_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, channel_id_arr, 0, 32, obj->discard_funding.channel_id.data); + LDKChannelId channel_id_var = obj->discard_funding.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); LDKTransaction transaction_var = obj->discard_funding.transaction; int8_tArray transaction_arr = (*env)->NewByteArray(env, transaction_var.datalen); (*env)->SetByteArrayRegion(env, transaction_arr, 0, transaction_var.datalen, transaction_var.data); - return (*env)->NewObject(env, LDKEvent_DiscardFunding_class, LDKEvent_DiscardFunding_meth, channel_id_arr, transaction_arr); + return (*env)->NewObject(env, LDKEvent_DiscardFunding_class, LDKEvent_DiscardFunding_meth, channel_id_ref, transaction_arr); } case LDKEvent_OpenChannelRequest: { - int8_tArray temporary_channel_id_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, temporary_channel_id_arr, 0, 32, obj->open_channel_request.temporary_channel_id.data); + LDKChannelId temporary_channel_id_var = obj->open_channel_request.temporary_channel_id; + int64_t temporary_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_var); + temporary_channel_id_ref = tag_ptr(temporary_channel_id_var.inner, false); int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33); (*env)->SetByteArrayRegion(env, counterparty_node_id_arr, 0, 33, obj->open_channel_request.counterparty_node_id.compressed_form); int64_t funding_satoshis_conv = obj->open_channel_request.funding_satoshis; @@ -14300,13 +15183,15 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr(JN int64_t channel_type_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_var); channel_type_ref = tag_ptr(channel_type_var.inner, false); - return (*env)->NewObject(env, LDKEvent_OpenChannelRequest_class, LDKEvent_OpenChannelRequest_meth, temporary_channel_id_arr, counterparty_node_id_arr, funding_satoshis_conv, push_msat_conv, channel_type_ref); + return (*env)->NewObject(env, LDKEvent_OpenChannelRequest_class, LDKEvent_OpenChannelRequest_meth, temporary_channel_id_ref, counterparty_node_id_arr, funding_satoshis_conv, push_msat_conv, channel_type_ref); } case LDKEvent_HTLCHandlingFailed: { - int8_tArray prev_channel_id_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, prev_channel_id_arr, 0, 32, obj->htlc_handling_failed.prev_channel_id.data); + LDKChannelId prev_channel_id_var = obj->htlc_handling_failed.prev_channel_id; + int64_t prev_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_var); + prev_channel_id_ref = tag_ptr(prev_channel_id_var.inner, false); int64_t failed_next_destination_ref = tag_ptr(&obj->htlc_handling_failed.failed_next_destination, false); - return (*env)->NewObject(env, LDKEvent_HTLCHandlingFailed_class, LDKEvent_HTLCHandlingFailed_meth, prev_channel_id_arr, failed_next_destination_ref); + return (*env)->NewObject(env, LDKEvent_HTLCHandlingFailed_class, LDKEvent_HTLCHandlingFailed_meth, prev_channel_id_ref, failed_next_destination_ref); } case LDKEvent_BumpTransaction: { int64_t bump_transaction_ref = tag_ptr(&obj->bump_transaction, false); @@ -15003,6 +15888,32 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UntrustedStringDec return ret_ref; } +static inline struct LDKChannelId CResult_ChannelIdDecodeErrorZ_get_ok(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR owner){ + LDKChannelId ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_ChannelIdDecodeErrorZ* owner_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(owner); + LDKChannelId ret_var = CResult_ChannelIdDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_ChannelIdDecodeErrorZ_get_err(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_ChannelIdDecodeErrorZ* owner_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_ChannelIdDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + static inline struct LDKThirtyTwoBytes C2Tuple__u832u16Z_get_a(LDKC2Tuple__u832u16Z *NONNULL_PTR owner){ return ThirtyTwoBytes_clone(&owner->a); } @@ -15074,62 +15985,106 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentConstraints return ret_ref; } -static inline struct LDKThirtyTwoBytes C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){ - return ThirtyTwoBytes_clone(&owner->a); +static inline struct LDKPaymentContext CResult_PaymentContextDecodeErrorZ_get_ok(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return PaymentContext_clone(&*owner->contents.result); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) { - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner); - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(owner_conv).data); - return ret_arr; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_PaymentContextDecodeErrorZ* owner_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(owner); + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = CResult_PaymentContextDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; } -static inline struct LDKRecipientOnionFields C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){ - LDKRecipientOnionFields ret = owner->b; +static inline struct LDKDecodeError CResult_PaymentContextDecodeErrorZ_get_err(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_PaymentContextDecodeErrorZ* owner_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_PaymentContextDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKUnknownPaymentContext CResult_UnknownPaymentContextDecodeErrorZ_get_ok(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR owner){ + LDKUnknownPaymentContext ret = *owner->contents.result; ret.is_owned = false; return ret; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) { - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner); - LDKRecipientOnionFields ret_var = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(owner_conv); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* owner_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(owner); + LDKUnknownPaymentContext ret_var = CResult_UnknownPaymentContextDecodeErrorZ_get_ok(owner_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -static inline struct LDKRouteParameters C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){ - LDKRouteParameters ret = owner->c; +static inline struct LDKDecodeError CResult_UnknownPaymentContextDecodeErrorZ_get_err(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* owner_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_UnknownPaymentContextDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKBolt12OfferContext CResult_Bolt12OfferContextDecodeErrorZ_get_ok(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR owner){ + LDKBolt12OfferContext ret = *owner->contents.result; ret.is_owned = false; return ret; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1c(JNIEnv *env, jclass clz, int64_t owner) { - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner); - LDKRouteParameters ret_var = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c(owner_conv); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(owner); + LDKBolt12OfferContext ret_var = CResult_Bolt12OfferContextDecodeErrorZ_get_ok(owner_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -static inline struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR owner){ -CHECK(owner->result_ok); - return C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(&*owner->contents.result); +static inline struct LDKDecodeError CResult_Bolt12OfferContextDecodeErrorZ_get_err(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* owner_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(owner); - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ"); - *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(owner_conv); - return tag_ptr(ret_conv, true); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_Bolt12OfferContextDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; } -static inline void CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR owner){ +static inline struct LDKBolt12RefundContext CResult_Bolt12RefundContextDecodeErrorZ_get_ok(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR owner){ + LDKBolt12RefundContext ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(owner); + LDKBolt12RefundContext ret_var = CResult_Bolt12RefundContextDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_Bolt12RefundContextDecodeErrorZ_get_err(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR owner){ CHECK(!owner->result_ok); - return *owner->contents.err; + return DecodeError_clone(&*owner->contents.err); } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* owner_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(owner); - CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(owner_conv); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_Bolt12RefundContextDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; } static inline struct LDKStr CResult_StrSecp256k1ErrorZ_get_ok(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner){ @@ -15153,6 +16108,64 @@ JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_ return ret_conv; } +static inline struct LDKThirtyTwoBytes C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){ + return ThirtyTwoBytes_clone(&owner->a); +} +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) { + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner); + int8_tArray ret_arr = (*env)->NewByteArray(env, 32); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(owner_conv).data); + return ret_arr; +} + +static inline struct LDKRecipientOnionFields C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){ + LDKRecipientOnionFields ret = owner->b; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) { + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner); + LDKRecipientOnionFields ret_var = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKRouteParameters C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){ + LDKRouteParameters ret = owner->c; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1c(JNIEnv *env, jclass clz, int64_t owner) { + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner); + LDKRouteParameters ret_var = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(&*owner->contents.result); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* owner_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(owner); + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ"); + *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(owner_conv); + return tag_ptr(ret_conv, true); +} + +static inline void CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return *owner->contents.err; +} +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* owner_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(owner); + CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(owner_conv); +} + static inline struct LDKPublicKey C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_a(LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ *NONNULL_PTR owner){ return owner->a; } @@ -15204,6 +16217,8 @@ static jclass LDKSendError_BufferFull_class = NULL; static jmethodID LDKSendError_BufferFull_meth = NULL; static jclass LDKSendError_GetNodeIdFailed_class = NULL; static jmethodID LDKSendError_GetNodeIdFailed_meth = NULL; +static jclass LDKSendError_UnresolvedIntroductionNode_class = NULL; +static jmethodID LDKSendError_UnresolvedIntroductionNode_meth = NULL; static jclass LDKSendError_BlindedPathAdvanceFailed_class = NULL; static jmethodID LDKSendError_BlindedPathAdvanceFailed_meth = NULL; JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSendError_init (JNIEnv *env, jclass clz) { @@ -15247,6 +16262,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSendError_init (JNIEnv CHECK(LDKSendError_GetNodeIdFailed_class != NULL); LDKSendError_GetNodeIdFailed_meth = (*env)->GetMethodID(env, LDKSendError_GetNodeIdFailed_class, "", "()V"); CHECK(LDKSendError_GetNodeIdFailed_meth != NULL); + LDKSendError_UnresolvedIntroductionNode_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSendError$UnresolvedIntroductionNode")); + CHECK(LDKSendError_UnresolvedIntroductionNode_class != NULL); + LDKSendError_UnresolvedIntroductionNode_meth = (*env)->GetMethodID(env, LDKSendError_UnresolvedIntroductionNode_class, "", "()V"); + CHECK(LDKSendError_UnresolvedIntroductionNode_meth != NULL); LDKSendError_BlindedPathAdvanceFailed_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSendError$BlindedPathAdvanceFailed")); CHECK(LDKSendError_BlindedPathAdvanceFailed_class != NULL); @@ -15283,6 +16303,9 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSendError_1ref_1from_1pt case LDKSendError_GetNodeIdFailed: { return (*env)->NewObject(env, LDKSendError_GetNodeIdFailed_class, LDKSendError_GetNodeIdFailed_meth); } + case LDKSendError_UnresolvedIntroductionNode: { + return (*env)->NewObject(env, LDKSendError_UnresolvedIntroductionNode_class, LDKSendError_UnresolvedIntroductionNode_meth); + } case LDKSendError_BlindedPathAdvanceFailed: { return (*env)->NewObject(env, LDKSendError_BlindedPathAdvanceFailed_class, LDKSendError_BlindedPathAdvanceFailed_meth); } @@ -15312,6 +16335,37 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKey return ret_ref; } +static jclass LDKNextMessageHop_NodeId_class = NULL; +static jmethodID LDKNextMessageHop_NodeId_meth = NULL; +static jclass LDKNextMessageHop_ShortChannelId_class = NULL; +static jmethodID LDKNextMessageHop_ShortChannelId_meth = NULL; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKNextMessageHop_init (JNIEnv *env, jclass clz) { + LDKNextMessageHop_NodeId_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKNextMessageHop$NodeId")); + CHECK(LDKNextMessageHop_NodeId_class != NULL); + LDKNextMessageHop_NodeId_meth = (*env)->GetMethodID(env, LDKNextMessageHop_NodeId_class, "", "([B)V"); + CHECK(LDKNextMessageHop_NodeId_meth != NULL); + LDKNextMessageHop_ShortChannelId_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKNextMessageHop$ShortChannelId")); + CHECK(LDKNextMessageHop_ShortChannelId_class != NULL); + LDKNextMessageHop_ShortChannelId_meth = (*env)->GetMethodID(env, LDKNextMessageHop_ShortChannelId_class, "", "(J)V"); + CHECK(LDKNextMessageHop_ShortChannelId_meth != NULL); +} +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKNextMessageHop_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { + LDKNextMessageHop *obj = (LDKNextMessageHop*)untag_ptr(ptr); + switch(obj->tag) { + case LDKNextMessageHop_NodeId: { + int8_tArray node_id_arr = (*env)->NewByteArray(env, 33); + (*env)->SetByteArrayRegion(env, node_id_arr, 0, 33, obj->node_id.compressed_form); + return (*env)->NewObject(env, LDKNextMessageHop_NodeId_class, LDKNextMessageHop_NodeId_meth, node_id_arr); + } + case LDKNextMessageHop_ShortChannelId: { + int64_t short_channel_id_conv = obj->short_channel_id; + return (*env)->NewObject(env, LDKNextMessageHop_ShortChannelId_class, LDKNextMessageHop_ShortChannelId_meth, short_channel_id_conv); + } + default: abort(); + } +} static jclass LDKParsedOnionMessageContents_Offers_class = NULL; static jmethodID LDKParsedOnionMessageContents_Offers_meth = NULL; static jclass LDKParsedOnionMessageContents_Custom_class = NULL; @@ -15351,7 +16405,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKPeeledOnion_init (JNIE LDKPeeledOnion_Forward_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPeeledOnion$Forward")); CHECK(LDKPeeledOnion_Forward_class != NULL); - LDKPeeledOnion_Forward_meth = (*env)->GetMethodID(env, LDKPeeledOnion_Forward_class, "", "([BJ)V"); + LDKPeeledOnion_Forward_meth = (*env)->GetMethodID(env, LDKPeeledOnion_Forward_class, "", "(JJ)V"); CHECK(LDKPeeledOnion_Forward_meth != NULL); LDKPeeledOnion_Receive_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPeeledOnion$Receive")); @@ -15363,13 +16417,12 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPeeledOnion_1ref_1from_1 LDKPeeledOnion *obj = (LDKPeeledOnion*)untag_ptr(ptr); switch(obj->tag) { case LDKPeeledOnion_Forward: { - int8_tArray _0_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, _0_arr, 0, 33, obj->forward._0.compressed_form); + int64_t _0_ref = tag_ptr(&obj->forward._0, false); LDKOnionMessage _1_var = obj->forward._1; int64_t _1_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(_1_var); _1_ref = tag_ptr(_1_var.inner, false); - return (*env)->NewObject(env, LDKPeeledOnion_Forward_class, LDKPeeledOnion_Forward_meth, _0_arr, _1_ref); + return (*env)->NewObject(env, LDKPeeledOnion_Forward_class, LDKPeeledOnion_Forward_meth, _0_ref, _1_ref); } case LDKPeeledOnion_Receive: { int64_t _0_ref = tag_ptr(&obj->receive._0, false); @@ -15587,158 +16640,106 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceErrorDecode return ret_ref; } -static inline struct LDKDelayedPaymentBasepoint CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){ - LDKDelayedPaymentBasepoint ret = *owner->contents.result; +static inline struct LDKTrackedSpendableOutput CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR owner){ + LDKTrackedSpendableOutput ret = *owner->contents.result; ret.is_owned = false; return ret; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner); - LDKDelayedPaymentBasepoint ret_var = CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(owner_conv); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* owner_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(owner); + LDKTrackedSpendableOutput ret_var = CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(owner_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -static inline struct LDKDecodeError CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){ +static inline struct LDKDecodeError CResult_TrackedSpendableOutputDecodeErrorZ_get_err(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR owner){ CHECK(!owner->result_ok); return DecodeError_clone(&*owner->contents.err); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* owner_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(owner); LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(owner_conv); - int64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -static inline struct LDKDelayedPaymentKey CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){ - LDKDelayedPaymentKey ret = *owner->contents.result; - ret.is_owned = false; - return ret; -} -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner); - LDKDelayedPaymentKey ret_var = CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(owner_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -static inline struct LDKDecodeError CResult_DelayedPaymentKeyDecodeErrorZ_get_err(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return DecodeError_clone(&*owner->contents.err); -} -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner); - LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_DelayedPaymentKeyDecodeErrorZ_get_err(owner_conv); - int64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -static inline struct LDKHtlcBasepoint CResult_HtlcBasepointDecodeErrorZ_get_ok(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){ - LDKHtlcBasepoint ret = *owner->contents.result; - ret.is_owned = false; - return ret; -} -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner); - LDKHtlcBasepoint ret_var = CResult_HtlcBasepointDecodeErrorZ_get_ok(owner_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -static inline struct LDKDecodeError CResult_HtlcBasepointDecodeErrorZ_get_err(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return DecodeError_clone(&*owner->contents.err); -} -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner); - LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_HtlcBasepointDecodeErrorZ_get_err(owner_conv); - int64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -static inline struct LDKHtlcKey CResult_HtlcKeyDecodeErrorZ_get_ok(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){ - LDKHtlcKey ret = *owner->contents.result; - ret.is_owned = false; - return ret; -} -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner); - LDKHtlcKey ret_var = CResult_HtlcKeyDecodeErrorZ_get_ok(owner_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -static inline struct LDKDecodeError CResult_HtlcKeyDecodeErrorZ_get_err(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return DecodeError_clone(&*owner->contents.err); -} -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner); - LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_HtlcKeyDecodeErrorZ_get_err(owner_conv); - int64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -static inline struct LDKRevocationBasepoint CResult_RevocationBasepointDecodeErrorZ_get_ok(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){ - LDKRevocationBasepoint ret = *owner->contents.result; - ret.is_owned = false; - return ret; -} -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner); - LDKRevocationBasepoint ret_var = CResult_RevocationBasepointDecodeErrorZ_get_ok(owner_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; + *ret_copy = CResult_TrackedSpendableOutputDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static jclass LDKOutputSpendStatus_PendingInitialBroadcast_class = NULL; +static jmethodID LDKOutputSpendStatus_PendingInitialBroadcast_meth = NULL; +static jclass LDKOutputSpendStatus_PendingFirstConfirmation_class = NULL; +static jmethodID LDKOutputSpendStatus_PendingFirstConfirmation_meth = NULL; +static jclass LDKOutputSpendStatus_PendingThresholdConfirmations_class = NULL; +static jmethodID LDKOutputSpendStatus_PendingThresholdConfirmations_meth = NULL; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKOutputSpendStatus_init (JNIEnv *env, jclass clz) { + LDKOutputSpendStatus_PendingInitialBroadcast_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKOutputSpendStatus$PendingInitialBroadcast")); + CHECK(LDKOutputSpendStatus_PendingInitialBroadcast_class != NULL); + LDKOutputSpendStatus_PendingInitialBroadcast_meth = (*env)->GetMethodID(env, LDKOutputSpendStatus_PendingInitialBroadcast_class, "", "(J)V"); + CHECK(LDKOutputSpendStatus_PendingInitialBroadcast_meth != NULL); + LDKOutputSpendStatus_PendingFirstConfirmation_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKOutputSpendStatus$PendingFirstConfirmation")); + CHECK(LDKOutputSpendStatus_PendingFirstConfirmation_class != NULL); + LDKOutputSpendStatus_PendingFirstConfirmation_meth = (*env)->GetMethodID(env, LDKOutputSpendStatus_PendingFirstConfirmation_class, "", "([BI[B)V"); + CHECK(LDKOutputSpendStatus_PendingFirstConfirmation_meth != NULL); + LDKOutputSpendStatus_PendingThresholdConfirmations_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKOutputSpendStatus$PendingThresholdConfirmations")); + CHECK(LDKOutputSpendStatus_PendingThresholdConfirmations_class != NULL); + LDKOutputSpendStatus_PendingThresholdConfirmations_meth = (*env)->GetMethodID(env, LDKOutputSpendStatus_PendingThresholdConfirmations_class, "", "([BI[BI[B)V"); + CHECK(LDKOutputSpendStatus_PendingThresholdConfirmations_meth != NULL); +} +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKOutputSpendStatus_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + switch(obj->tag) { + case LDKOutputSpendStatus_PendingInitialBroadcast: { + int64_t delayed_until_height_ref = tag_ptr(&obj->pending_initial_broadcast.delayed_until_height, false); + return (*env)->NewObject(env, LDKOutputSpendStatus_PendingInitialBroadcast_class, LDKOutputSpendStatus_PendingInitialBroadcast_meth, delayed_until_height_ref); + } + case LDKOutputSpendStatus_PendingFirstConfirmation: { + int8_tArray first_broadcast_hash_arr = (*env)->NewByteArray(env, 32); + (*env)->SetByteArrayRegion(env, first_broadcast_hash_arr, 0, 32, obj->pending_first_confirmation.first_broadcast_hash.data); + int32_t latest_broadcast_height_conv = obj->pending_first_confirmation.latest_broadcast_height; + LDKTransaction latest_spending_tx_var = obj->pending_first_confirmation.latest_spending_tx; + int8_tArray latest_spending_tx_arr = (*env)->NewByteArray(env, latest_spending_tx_var.datalen); + (*env)->SetByteArrayRegion(env, latest_spending_tx_arr, 0, latest_spending_tx_var.datalen, latest_spending_tx_var.data); + return (*env)->NewObject(env, LDKOutputSpendStatus_PendingFirstConfirmation_class, LDKOutputSpendStatus_PendingFirstConfirmation_meth, first_broadcast_hash_arr, latest_broadcast_height_conv, latest_spending_tx_arr); + } + case LDKOutputSpendStatus_PendingThresholdConfirmations: { + int8_tArray first_broadcast_hash_arr = (*env)->NewByteArray(env, 32); + (*env)->SetByteArrayRegion(env, first_broadcast_hash_arr, 0, 32, obj->pending_threshold_confirmations.first_broadcast_hash.data); + int32_t latest_broadcast_height_conv = obj->pending_threshold_confirmations.latest_broadcast_height; + LDKTransaction latest_spending_tx_var = obj->pending_threshold_confirmations.latest_spending_tx; + int8_tArray latest_spending_tx_arr = (*env)->NewByteArray(env, latest_spending_tx_var.datalen); + (*env)->SetByteArrayRegion(env, latest_spending_tx_arr, 0, latest_spending_tx_var.datalen, latest_spending_tx_var.data); + int32_t confirmation_height_conv = obj->pending_threshold_confirmations.confirmation_height; + int8_tArray confirmation_hash_arr = (*env)->NewByteArray(env, 32); + (*env)->SetByteArrayRegion(env, confirmation_hash_arr, 0, 32, obj->pending_threshold_confirmations.confirmation_hash.data); + return (*env)->NewObject(env, LDKOutputSpendStatus_PendingThresholdConfirmations_class, LDKOutputSpendStatus_PendingThresholdConfirmations_meth, first_broadcast_hash_arr, latest_broadcast_height_conv, latest_spending_tx_arr, confirmation_height_conv, confirmation_hash_arr); + } + default: abort(); + } } - -static inline struct LDKDecodeError CResult_RevocationBasepointDecodeErrorZ_get_err(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return DecodeError_clone(&*owner->contents.err); +static inline struct LDKOutputSpendStatus CResult_OutputSpendStatusDecodeErrorZ_get_ok(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return OutputSpendStatus_clone(&*owner->contents.result); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner); - LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_RevocationBasepointDecodeErrorZ_get_err(owner_conv); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_OutputSpendStatusDecodeErrorZ* owner_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(owner); + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = CResult_OutputSpendStatusDecodeErrorZ_get_ok(owner_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -static inline struct LDKRevocationKey CResult_RevocationKeyDecodeErrorZ_get_ok(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){ - LDKRevocationKey ret = *owner->contents.result; - ret.is_owned = false; - return ret; -} -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner); - LDKRevocationKey ret_var = CResult_RevocationKeyDecodeErrorZ_get_ok(owner_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -static inline struct LDKDecodeError CResult_RevocationKeyDecodeErrorZ_get_err(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){ +static inline struct LDKDecodeError CResult_OutputSpendStatusDecodeErrorZ_get_err(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR owner){ CHECK(!owner->result_ok); return DecodeError_clone(&*owner->contents.err); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_OutputSpendStatusDecodeErrorZ* owner_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(owner); LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_RevocationKeyDecodeErrorZ_get_err(owner_conv); + *ret_copy = CResult_OutputSpendStatusDecodeErrorZ_get_err(owner_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -15907,85 +16908,96 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1FilterZ_1ref_1f default: abort(); } } -static inline struct LDKLockedChannelMonitor CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){ - LDKLockedChannelMonitor ret = *owner->contents.result; - ret.is_owned = false; - return ret; -} -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner); - LDKLockedChannelMonitor ret_var = CResult_LockedChannelMonitorNoneZ_get_ok(owner_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -static inline void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return *owner->contents.err; -} -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner); - CResult_LockedChannelMonitorNoneZ_get_err(owner_conv); -} - -static inline LDKCVec_OutPointZ CVec_OutPointZ_clone(const LDKCVec_OutPointZ *orig) { - LDKCVec_OutPointZ ret = { .data = MALLOC(sizeof(LDKOutPoint) * orig->datalen, "LDKCVec_OutPointZ clone bytes"), .datalen = orig->datalen }; +static inline LDKCVec_TrackedSpendableOutputZ CVec_TrackedSpendableOutputZ_clone(const LDKCVec_TrackedSpendableOutputZ *orig) { + LDKCVec_TrackedSpendableOutputZ ret = { .data = MALLOC(sizeof(LDKTrackedSpendableOutput) * orig->datalen, "LDKCVec_TrackedSpendableOutputZ clone bytes"), .datalen = orig->datalen }; for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = OutPoint_clone(&orig->data[i]); + ret.data[i] = TrackedSpendableOutput_clone(&orig->data[i]); } return ret; } -static inline LDKCVec_MonitorUpdateIdZ CVec_MonitorUpdateIdZ_clone(const LDKCVec_MonitorUpdateIdZ *orig) { - LDKCVec_MonitorUpdateIdZ ret = { .data = MALLOC(sizeof(LDKMonitorUpdateId) * orig->datalen, "LDKCVec_MonitorUpdateIdZ clone bytes"), .datalen = orig->datalen }; - for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = MonitorUpdateId_clone(&orig->data[i]); +typedef struct LDKChangeDestinationSource_JCalls { + atomic_size_t refcnt; + JavaVM *vm; + jweak o; + jmethodID get_change_destination_script_meth; +} LDKChangeDestinationSource_JCalls; +static void LDKChangeDestinationSource_JCalls_free(void* this_arg) { + LDKChangeDestinationSource_JCalls *j_calls = (LDKChangeDestinationSource_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + JNIEnv *env; + jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); + } else { + DO_ASSERT(get_jenv_res == JNI_OK); + } + (*env)->DeleteWeakGlobalRef(env, j_calls->o); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); + } + FREE(j_calls); } - return ret; } -static inline struct LDKOutPoint C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){ - LDKOutPoint ret = owner->a; - ret.is_owned = false; - return ret; +LDKCResult_CVec_u8ZNoneZ get_change_destination_script_LDKChangeDestinationSource_jcall(const void* this_arg) { + LDKChangeDestinationSource_JCalls *j_calls = (LDKChangeDestinationSource_JCalls*) this_arg; + JNIEnv *env; + jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); + } else { + DO_ASSERT(get_jenv_res == JNI_OK); + } + jobject obj = (*env)->NewLocalRef(env, j_calls->o); + CHECK(obj != NULL); + uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->get_change_destination_script_meth); + if (UNLIKELY((*env)->ExceptionCheck(env))) { + (*env)->ExceptionDescribe(env); + (*env)->FatalError(env, "A call to get_change_destination_script in LDKChangeDestinationSource from rust threw an exception."); + } + void* ret_ptr = untag_ptr(ret); + CHECK_ACCESS(ret_ptr); + LDKCResult_CVec_u8ZNoneZ ret_conv = *(LDKCResult_CVec_u8ZNoneZ*)(ret_ptr); + FREE(untag_ptr(ret)); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); + } + return ret_conv; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) { - LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner); - LDKOutPoint ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(owner_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; +static void LDKChangeDestinationSource_JCalls_cloned(LDKChangeDestinationSource* new_obj) { + LDKChangeDestinationSource_JCalls *j_calls = (LDKChangeDestinationSource_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); } +static inline LDKChangeDestinationSource LDKChangeDestinationSource_init (JNIEnv *env, jclass clz, jobject o) { + jclass c = (*env)->GetObjectClass(env, o); + CHECK(c != NULL); + LDKChangeDestinationSource_JCalls *calls = MALLOC(sizeof(LDKChangeDestinationSource_JCalls), "LDKChangeDestinationSource_JCalls"); + atomic_init(&calls->refcnt, 1); + DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0); + calls->o = (*env)->NewWeakGlobalRef(env, o); + calls->get_change_destination_script_meth = (*env)->GetMethodID(env, c, "get_change_destination_script", "()J"); + CHECK(calls->get_change_destination_script_meth != NULL); -static inline struct LDKCVec_MonitorUpdateIdZ C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){ - return CVec_MonitorUpdateIdZ_clone(&owner->b); + LDKChangeDestinationSource ret = { + .this_arg = (void*) calls, + .get_change_destination_script = get_change_destination_script_LDKChangeDestinationSource_jcall, + .free = LDKChangeDestinationSource_JCalls_free, + }; + return ret; } -JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) { - LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner); - LDKCVec_MonitorUpdateIdZ ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(owner_conv); - int64_tArray ret_arr = NULL; - ret_arr = (*env)->NewLongArray(env, ret_var.datalen); - int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL); - for (size_t r = 0; r < ret_var.datalen; r++) { - LDKMonitorUpdateId ret_conv_17_var = ret_var.data[r]; - int64_t ret_conv_17_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_17_var); - ret_conv_17_ref = tag_ptr(ret_conv_17_var.inner, ret_conv_17_var.is_owned); - ret_arr_ptr[r] = ret_conv_17_ref; - } - (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0); - FREE(ret_var.data); - return ret_arr; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKChangeDestinationSource_1new(JNIEnv *env, jclass clz, jobject o) { + LDKChangeDestinationSource *res_ptr = MALLOC(sizeof(LDKChangeDestinationSource), "LDKChangeDestinationSource"); + *res_ptr = LDKChangeDestinationSource_init(env, clz, o); + return tag_ptr(res_ptr, true); } - -static inline LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ CVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ_clone(const LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ *orig) { - LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ) * orig->datalen, "LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ clone bytes"), .datalen = orig->datalen }; - for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_clone(&orig->data[i]); - } - return ret; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChangeDestinationSource_1get_1change_1destination_1script(JNIEnv *env, jclass clz, int64_t this_arg) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKChangeDestinationSource* this_arg_conv = (LDKChangeDestinationSource*)this_arg_ptr; + LDKCResult_CVec_u8ZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_u8ZNoneZ), "LDKCResult_CVec_u8ZNoneZ"); + *ret_conv = (this_arg_conv->get_change_destination_script)(this_arg_conv->this_arg); + return tag_ptr(ret_conv, true); } + typedef struct LDKKVStore_JCalls { atomic_size_t refcnt; JavaVM *vm; @@ -16235,6 +17247,499 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KVStore_1list(JNIEnv *env, return tag_ptr(ret_conv, true); } +typedef struct LDKOutputSpender_JCalls { + atomic_size_t refcnt; + JavaVM *vm; + jweak o; + jmethodID spend_spendable_outputs_meth; +} LDKOutputSpender_JCalls; +static void LDKOutputSpender_JCalls_free(void* this_arg) { + LDKOutputSpender_JCalls *j_calls = (LDKOutputSpender_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + JNIEnv *env; + jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); + } else { + DO_ASSERT(get_jenv_res == JNI_OK); + } + (*env)->DeleteWeakGlobalRef(env, j_calls->o); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); + } + FREE(j_calls); + } +} +LDKCResult_TransactionNoneZ spend_spendable_outputs_LDKOutputSpender_jcall(const void* this_arg, LDKCVec_SpendableOutputDescriptorZ descriptors, LDKCVec_TxOutZ outputs, LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight, LDKCOption_u32Z locktime) { + LDKOutputSpender_JCalls *j_calls = (LDKOutputSpender_JCalls*) this_arg; + JNIEnv *env; + jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); + } else { + DO_ASSERT(get_jenv_res == JNI_OK); + } + LDKCVec_SpendableOutputDescriptorZ descriptors_var = descriptors; + int64_tArray descriptors_arr = NULL; + descriptors_arr = (*env)->NewLongArray(env, descriptors_var.datalen); + int64_t *descriptors_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, descriptors_arr, NULL); + for (size_t b = 0; b < descriptors_var.datalen; b++) { + LDKSpendableOutputDescriptor *descriptors_conv_27_copy = MALLOC(sizeof(LDKSpendableOutputDescriptor), "LDKSpendableOutputDescriptor"); + *descriptors_conv_27_copy = descriptors_var.data[b]; + int64_t descriptors_conv_27_ref = tag_ptr(descriptors_conv_27_copy, true); + descriptors_arr_ptr[b] = descriptors_conv_27_ref; + } + (*env)->ReleasePrimitiveArrayCritical(env, descriptors_arr, descriptors_arr_ptr, 0); + FREE(descriptors_var.data); + LDKCVec_TxOutZ outputs_var = outputs; + int64_tArray outputs_arr = NULL; + outputs_arr = (*env)->NewLongArray(env, outputs_var.datalen); + int64_t *outputs_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, outputs_arr, NULL); + for (size_t h = 0; h < outputs_var.datalen; h++) { + LDKTxOut* outputs_conv_7_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut"); + *outputs_conv_7_ref = outputs_var.data[h]; + outputs_arr_ptr[h] = tag_ptr(outputs_conv_7_ref, true); + } + (*env)->ReleasePrimitiveArrayCritical(env, outputs_arr, outputs_arr_ptr, 0); + FREE(outputs_var.data); + LDKCVec_u8Z change_destination_script_var = change_destination_script; + int8_tArray change_destination_script_arr = (*env)->NewByteArray(env, change_destination_script_var.datalen); + (*env)->SetByteArrayRegion(env, change_destination_script_arr, 0, change_destination_script_var.datalen, change_destination_script_var.data); + CVec_u8Z_free(change_destination_script_var); + int32_t feerate_sat_per_1000_weight_conv = feerate_sat_per_1000_weight; + LDKCOption_u32Z *locktime_copy = MALLOC(sizeof(LDKCOption_u32Z), "LDKCOption_u32Z"); + *locktime_copy = locktime; + int64_t locktime_ref = tag_ptr(locktime_copy, true); + jobject obj = (*env)->NewLocalRef(env, j_calls->o); + CHECK(obj != NULL); + uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->spend_spendable_outputs_meth, descriptors_arr, outputs_arr, change_destination_script_arr, feerate_sat_per_1000_weight_conv, locktime_ref); + if (UNLIKELY((*env)->ExceptionCheck(env))) { + (*env)->ExceptionDescribe(env); + (*env)->FatalError(env, "A call to spend_spendable_outputs in LDKOutputSpender from rust threw an exception."); + } + void* ret_ptr = untag_ptr(ret); + CHECK_ACCESS(ret_ptr); + LDKCResult_TransactionNoneZ ret_conv = *(LDKCResult_TransactionNoneZ*)(ret_ptr); + FREE(untag_ptr(ret)); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); + } + return ret_conv; +} +static void LDKOutputSpender_JCalls_cloned(LDKOutputSpender* new_obj) { + LDKOutputSpender_JCalls *j_calls = (LDKOutputSpender_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +} +static inline LDKOutputSpender LDKOutputSpender_init (JNIEnv *env, jclass clz, jobject o) { + jclass c = (*env)->GetObjectClass(env, o); + CHECK(c != NULL); + LDKOutputSpender_JCalls *calls = MALLOC(sizeof(LDKOutputSpender_JCalls), "LDKOutputSpender_JCalls"); + atomic_init(&calls->refcnt, 1); + DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0); + calls->o = (*env)->NewWeakGlobalRef(env, o); + calls->spend_spendable_outputs_meth = (*env)->GetMethodID(env, c, "spend_spendable_outputs", "([J[J[BIJ)J"); + CHECK(calls->spend_spendable_outputs_meth != NULL); + + LDKOutputSpender ret = { + .this_arg = (void*) calls, + .spend_spendable_outputs = spend_spendable_outputs_LDKOutputSpender_jcall, + .free = LDKOutputSpender_JCalls_free, + }; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKOutputSpender_1new(JNIEnv *env, jclass clz, jobject o) { + LDKOutputSpender *res_ptr = MALLOC(sizeof(LDKOutputSpender), "LDKOutputSpender"); + *res_ptr = LDKOutputSpender_init(env, clz, o); + return tag_ptr(res_ptr, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpender_1spend_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray descriptors, int64_tArray outputs, int8_tArray change_destination_script, int32_t feerate_sat_per_1000_weight, int64_t locktime) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKOutputSpender* this_arg_conv = (LDKOutputSpender*)this_arg_ptr; + LDKCVec_SpendableOutputDescriptorZ descriptors_constr; + descriptors_constr.datalen = (*env)->GetArrayLength(env, descriptors); + if (descriptors_constr.datalen > 0) + descriptors_constr.data = MALLOC(descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements"); + else + descriptors_constr.data = NULL; + int64_t* descriptors_vals = (*env)->GetLongArrayElements (env, descriptors, NULL); + for (size_t b = 0; b < descriptors_constr.datalen; b++) { + int64_t descriptors_conv_27 = descriptors_vals[b]; + void* descriptors_conv_27_ptr = untag_ptr(descriptors_conv_27); + CHECK_ACCESS(descriptors_conv_27_ptr); + LDKSpendableOutputDescriptor descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(descriptors_conv_27_ptr); + descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptors_conv_27)); + descriptors_constr.data[b] = descriptors_conv_27_conv; + } + (*env)->ReleaseLongArrayElements(env, descriptors, descriptors_vals, 0); + LDKCVec_TxOutZ outputs_constr; + outputs_constr.datalen = (*env)->GetArrayLength(env, outputs); + if (outputs_constr.datalen > 0) + outputs_constr.data = MALLOC(outputs_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements"); + else + outputs_constr.data = NULL; + int64_t* outputs_vals = (*env)->GetLongArrayElements (env, outputs, NULL); + for (size_t h = 0; h < outputs_constr.datalen; h++) { + int64_t outputs_conv_7 = outputs_vals[h]; + void* outputs_conv_7_ptr = untag_ptr(outputs_conv_7); + CHECK_ACCESS(outputs_conv_7_ptr); + LDKTxOut outputs_conv_7_conv = *(LDKTxOut*)(outputs_conv_7_ptr); + outputs_conv_7_conv = TxOut_clone((LDKTxOut*)untag_ptr(outputs_conv_7)); + outputs_constr.data[h] = outputs_conv_7_conv; + } + (*env)->ReleaseLongArrayElements(env, outputs, outputs_vals, 0); + LDKCVec_u8Z change_destination_script_ref; + change_destination_script_ref.datalen = (*env)->GetArrayLength(env, change_destination_script); + change_destination_script_ref.data = MALLOC(change_destination_script_ref.datalen, "LDKCVec_u8Z Bytes"); + (*env)->GetByteArrayRegion(env, change_destination_script, 0, change_destination_script_ref.datalen, change_destination_script_ref.data); + void* locktime_ptr = untag_ptr(locktime); + CHECK_ACCESS(locktime_ptr); + LDKCOption_u32Z locktime_conv = *(LDKCOption_u32Z*)(locktime_ptr); + locktime_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(locktime)); + LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); + *ret_conv = (this_arg_conv->spend_spendable_outputs)(this_arg_conv->this_arg, descriptors_constr, outputs_constr, change_destination_script_ref, feerate_sat_per_1000_weight, locktime_conv); + return tag_ptr(ret_conv, true); +} + +static inline struct LDKOutputSweeper CResult_OutputSweeperDecodeErrorZ_get_ok(LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR owner){ + LDKOutputSweeper ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_OutputSweeperDecodeErrorZ* owner_conv = (LDKCResult_OutputSweeperDecodeErrorZ*)untag_ptr(owner); + LDKOutputSweeper ret_var = CResult_OutputSweeperDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_OutputSweeperDecodeErrorZ_get_err(LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_OutputSweeperDecodeErrorZ* owner_conv = (LDKCResult_OutputSweeperDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_OutputSweeperDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKBestBlock C2Tuple_BestBlockOutputSweeperZ_get_a(LDKC2Tuple_BestBlockOutputSweeperZ *NONNULL_PTR owner){ + LDKBestBlock ret = owner->a; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) { + LDKC2Tuple_BestBlockOutputSweeperZ* owner_conv = (LDKC2Tuple_BestBlockOutputSweeperZ*)untag_ptr(owner); + LDKBestBlock ret_var = C2Tuple_BestBlockOutputSweeperZ_get_a(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKOutputSweeper C2Tuple_BestBlockOutputSweeperZ_get_b(LDKC2Tuple_BestBlockOutputSweeperZ *NONNULL_PTR owner){ + LDKOutputSweeper ret = owner->b; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) { + LDKC2Tuple_BestBlockOutputSweeperZ* owner_conv = (LDKC2Tuple_BestBlockOutputSweeperZ*)untag_ptr(owner); + LDKOutputSweeper ret_var = C2Tuple_BestBlockOutputSweeperZ_get_b(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKC2Tuple_BestBlockOutputSweeperZ *CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return &*owner->contents.result; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* owner_conv = (LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)untag_ptr(owner); + int64_t ret_ret = tag_ptr(CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(owner_conv), false); + return ret_ret; +} + +static inline struct LDKDecodeError CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* owner_conv = (LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKDelayedPaymentBasepoint CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){ + LDKDelayedPaymentBasepoint ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner); + LDKDelayedPaymentBasepoint ret_var = CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKDelayedPaymentKey CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){ + LDKDelayedPaymentKey ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner); + LDKDelayedPaymentKey ret_var = CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_DelayedPaymentKeyDecodeErrorZ_get_err(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_DelayedPaymentKeyDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKHtlcBasepoint CResult_HtlcBasepointDecodeErrorZ_get_ok(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){ + LDKHtlcBasepoint ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner); + LDKHtlcBasepoint ret_var = CResult_HtlcBasepointDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_HtlcBasepointDecodeErrorZ_get_err(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_HtlcBasepointDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKHtlcKey CResult_HtlcKeyDecodeErrorZ_get_ok(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){ + LDKHtlcKey ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner); + LDKHtlcKey ret_var = CResult_HtlcKeyDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_HtlcKeyDecodeErrorZ_get_err(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_HtlcKeyDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKRevocationBasepoint CResult_RevocationBasepointDecodeErrorZ_get_ok(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){ + LDKRevocationBasepoint ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner); + LDKRevocationBasepoint ret_var = CResult_RevocationBasepointDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_RevocationBasepointDecodeErrorZ_get_err(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_RevocationBasepointDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKRevocationKey CResult_RevocationKeyDecodeErrorZ_get_ok(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){ + LDKRevocationKey ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner); + LDKRevocationKey ret_var = CResult_RevocationKeyDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_RevocationKeyDecodeErrorZ_get_err(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_RevocationKeyDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKLockedChannelMonitor CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){ + LDKLockedChannelMonitor ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner); + LDKLockedChannelMonitor ret_var = CResult_LockedChannelMonitorNoneZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return *owner->contents.err; +} +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner); + CResult_LockedChannelMonitorNoneZ_get_err(owner_conv); +} + +static inline struct LDKOutPoint C2Tuple_OutPointChannelIdZ_get_a(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR owner){ + LDKOutPoint ret = owner->a; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) { + LDKC2Tuple_OutPointChannelIdZ* owner_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(owner); + LDKOutPoint ret_var = C2Tuple_OutPointChannelIdZ_get_a(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKChannelId C2Tuple_OutPointChannelIdZ_get_b(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR owner){ + LDKChannelId ret = owner->b; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) { + LDKC2Tuple_OutPointChannelIdZ* owner_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(owner); + LDKChannelId ret_var = C2Tuple_OutPointChannelIdZ_get_b(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline LDKCVec_C2Tuple_OutPointChannelIdZZ CVec_C2Tuple_OutPointChannelIdZZ_clone(const LDKCVec_C2Tuple_OutPointChannelIdZZ *orig) { + LDKCVec_C2Tuple_OutPointChannelIdZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ) * orig->datalen, "LDKCVec_C2Tuple_OutPointChannelIdZZ clone bytes"), .datalen = orig->datalen }; + for (size_t i = 0; i < ret.datalen; i++) { + ret.data[i] = C2Tuple_OutPointChannelIdZ_clone(&orig->data[i]); + } + return ret; +} +static inline LDKCVec_MonitorUpdateIdZ CVec_MonitorUpdateIdZ_clone(const LDKCVec_MonitorUpdateIdZ *orig) { + LDKCVec_MonitorUpdateIdZ ret = { .data = MALLOC(sizeof(LDKMonitorUpdateId) * orig->datalen, "LDKCVec_MonitorUpdateIdZ clone bytes"), .datalen = orig->datalen }; + for (size_t i = 0; i < ret.datalen; i++) { + ret.data[i] = MonitorUpdateId_clone(&orig->data[i]); + } + return ret; +} +static inline struct LDKOutPoint C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){ + LDKOutPoint ret = owner->a; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) { + LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner); + LDKOutPoint ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKCVec_MonitorUpdateIdZ C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){ + return CVec_MonitorUpdateIdZ_clone(&owner->b); +} +JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) { + LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner); + LDKCVec_MonitorUpdateIdZ ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(owner_conv); + int64_tArray ret_arr = NULL; + ret_arr = (*env)->NewLongArray(env, ret_var.datalen); + int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL); + for (size_t r = 0; r < ret_var.datalen; r++) { + LDKMonitorUpdateId ret_conv_17_var = ret_var.data[r]; + int64_t ret_conv_17_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_17_var); + ret_conv_17_ref = tag_ptr(ret_conv_17_var.inner, ret_conv_17_var.is_owned); + ret_arr_ptr[r] = ret_conv_17_ref; + } + (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0); + FREE(ret_var.data); + return ret_arr; +} + +static inline LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ CVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ_clone(const LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ *orig) { + LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ) * orig->datalen, "LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ clone bytes"), .datalen = orig->datalen }; + for (size_t i = 0; i < ret.datalen; i++) { + ret.data[i] = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_clone(&orig->data[i]); + } + return ret; +} typedef struct LDKPersister_JCalls { atomic_size_t refcnt; JavaVM *vm; @@ -16425,6 +17930,7 @@ typedef struct LDKPersist_JCalls { jweak o; jmethodID persist_new_channel_meth; jmethodID update_persisted_channel_meth; + jmethodID archive_persisted_channel_meth; } LDKPersist_JCalls; static void LDKPersist_JCalls_free(void* this_arg) { LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg; @@ -16443,7 +17949,7 @@ static void LDKPersist_JCalls_free(void* this_arg) { FREE(j_calls); } } -LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) { +LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_funding_outpoint, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) { LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg; JNIEnv *env; jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); @@ -16452,10 +17958,10 @@ LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* t } else { DO_ASSERT(get_jenv_res == JNI_OK); } - LDKOutPoint channel_id_var = channel_id; - int64_t channel_id_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); - channel_id_ref = tag_ptr(channel_id_var.inner, channel_id_var.is_owned); + LDKOutPoint channel_funding_outpoint_var = channel_funding_outpoint; + int64_t channel_funding_outpoint_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_var); + channel_funding_outpoint_ref = tag_ptr(channel_funding_outpoint_var.inner, channel_funding_outpoint_var.is_owned); LDKChannelMonitor data_var = *data; int64_t data_ref = 0; data_var = ChannelMonitor_clone(&data_var); @@ -16467,7 +17973,7 @@ LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* t update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned); jobject obj = (*env)->NewLocalRef(env, j_calls->o); CHECK(obj != NULL); - jclass ret = (*env)->CallObjectMethod(env, obj, j_calls->persist_new_channel_meth, channel_id_ref, data_ref, update_id_ref); + jclass ret = (*env)->CallObjectMethod(env, obj, j_calls->persist_new_channel_meth, channel_funding_outpoint_ref, data_ref, update_id_ref); if (UNLIKELY((*env)->ExceptionCheck(env))) { (*env)->ExceptionDescribe(env); (*env)->FatalError(env, "A call to persist_new_channel in LDKPersist from rust threw an exception."); @@ -16478,7 +17984,7 @@ LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* t } return ret_conv; } -LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, LDKChannelMonitorUpdate update, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) { +LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_funding_outpoint, LDKChannelMonitorUpdate update, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) { LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg; JNIEnv *env; jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); @@ -16487,10 +17993,10 @@ LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const vo } else { DO_ASSERT(get_jenv_res == JNI_OK); } - LDKOutPoint channel_id_var = channel_id; - int64_t channel_id_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); - channel_id_ref = tag_ptr(channel_id_var.inner, channel_id_var.is_owned); + LDKOutPoint channel_funding_outpoint_var = channel_funding_outpoint; + int64_t channel_funding_outpoint_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_var); + channel_funding_outpoint_ref = tag_ptr(channel_funding_outpoint_var.inner, channel_funding_outpoint_var.is_owned); LDKChannelMonitorUpdate update_var = update; int64_t update_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(update_var); @@ -16506,7 +18012,7 @@ LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const vo update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned); jobject obj = (*env)->NewLocalRef(env, j_calls->o); CHECK(obj != NULL); - jclass ret = (*env)->CallObjectMethod(env, obj, j_calls->update_persisted_channel_meth, channel_id_ref, update_ref, data_ref, update_id_ref); + jclass ret = (*env)->CallObjectMethod(env, obj, j_calls->update_persisted_channel_meth, channel_funding_outpoint_ref, update_ref, data_ref, update_id_ref); if (UNLIKELY((*env)->ExceptionCheck(env))) { (*env)->ExceptionDescribe(env); (*env)->FatalError(env, "A call to update_persisted_channel in LDKPersist from rust threw an exception."); @@ -16517,6 +18023,30 @@ LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const vo } return ret_conv; } +void archive_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_funding_outpoint) { + LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg; + JNIEnv *env; + jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); + } else { + DO_ASSERT(get_jenv_res == JNI_OK); + } + LDKOutPoint channel_funding_outpoint_var = channel_funding_outpoint; + int64_t channel_funding_outpoint_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_var); + channel_funding_outpoint_ref = tag_ptr(channel_funding_outpoint_var.inner, channel_funding_outpoint_var.is_owned); + jobject obj = (*env)->NewLocalRef(env, j_calls->o); + CHECK(obj != NULL); + (*env)->CallVoidMethod(env, obj, j_calls->archive_persisted_channel_meth, channel_funding_outpoint_ref); + if (UNLIKELY((*env)->ExceptionCheck(env))) { + (*env)->ExceptionDescribe(env); + (*env)->FatalError(env, "A call to archive_persisted_channel in LDKPersist from rust threw an exception."); + } + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); + } +} static void LDKPersist_JCalls_cloned(LDKPersist* new_obj) { LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) new_obj->this_arg; atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); @@ -16532,11 +18062,14 @@ static inline LDKPersist LDKPersist_init (JNIEnv *env, jclass clz, jobject o) { CHECK(calls->persist_new_channel_meth != NULL); calls->update_persisted_channel_meth = (*env)->GetMethodID(env, c, "update_persisted_channel", "(JJJJ)Lorg/ldk/enums/ChannelMonitorUpdateStatus;"); CHECK(calls->update_persisted_channel_meth != NULL); + calls->archive_persisted_channel_meth = (*env)->GetMethodID(env, c, "archive_persisted_channel", "(J)V"); + CHECK(calls->archive_persisted_channel_meth != NULL); LDKPersist ret = { .this_arg = (void*) calls, .persist_new_channel = persist_new_channel_LDKPersist_jcall, .update_persisted_channel = update_persisted_channel_LDKPersist_jcall, + .archive_persisted_channel = archive_persisted_channel_LDKPersist_jcall, .free = LDKPersist_JCalls_free, }; return ret; @@ -16546,15 +18079,15 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKPersist_1new(JNIEnv *env *res_ptr = LDKPersist_init(env, clz, o); return tag_ptr(res_ptr, true); } -JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1persist_1new_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int64_t data, int64_t update_id) { +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1persist_1new_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_funding_outpoint, int64_t data, int64_t update_id) { void* this_arg_ptr = untag_ptr(this_arg); if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr; - LDKOutPoint channel_id_conv; - channel_id_conv.inner = untag_ptr(channel_id); - channel_id_conv.is_owned = ptr_is_owned(channel_id); - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); - channel_id_conv = OutPoint_clone(&channel_id_conv); + LDKOutPoint channel_funding_outpoint_conv; + channel_funding_outpoint_conv.inner = untag_ptr(channel_funding_outpoint); + channel_funding_outpoint_conv.is_owned = ptr_is_owned(channel_funding_outpoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_conv); + channel_funding_outpoint_conv = OutPoint_clone(&channel_funding_outpoint_conv); LDKChannelMonitor data_conv; data_conv.inner = untag_ptr(data); data_conv.is_owned = ptr_is_owned(data); @@ -16565,19 +18098,19 @@ JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1persist_1new_1chann update_id_conv.is_owned = ptr_is_owned(update_id); CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv); update_id_conv = MonitorUpdateId_clone(&update_id_conv); - jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, (this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, channel_id_conv, &data_conv, update_id_conv)); + jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, (this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, channel_funding_outpoint_conv, &data_conv, update_id_conv)); return ret_conv; } -JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1update_1persisted_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int64_t update, int64_t data, int64_t update_id) { +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1update_1persisted_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_funding_outpoint, int64_t update, int64_t data, int64_t update_id) { void* this_arg_ptr = untag_ptr(this_arg); if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr; - LDKOutPoint channel_id_conv; - channel_id_conv.inner = untag_ptr(channel_id); - channel_id_conv.is_owned = ptr_is_owned(channel_id); - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); - channel_id_conv = OutPoint_clone(&channel_id_conv); + LDKOutPoint channel_funding_outpoint_conv; + channel_funding_outpoint_conv.inner = untag_ptr(channel_funding_outpoint); + channel_funding_outpoint_conv.is_owned = ptr_is_owned(channel_funding_outpoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_conv); + channel_funding_outpoint_conv = OutPoint_clone(&channel_funding_outpoint_conv); LDKChannelMonitorUpdate update_conv; update_conv.inner = untag_ptr(update); update_conv.is_owned = ptr_is_owned(update); @@ -16593,84 +18126,20 @@ JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1update_1persisted_1 update_id_conv.is_owned = ptr_is_owned(update_id); CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv); update_id_conv = MonitorUpdateId_clone(&update_id_conv); - jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, (this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, channel_id_conv, update_conv, &data_conv, update_id_conv)); + jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, (this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, channel_funding_outpoint_conv, update_conv, &data_conv, update_id_conv)); return ret_conv; } -typedef struct LDKFutureCallback_JCalls { - atomic_size_t refcnt; - JavaVM *vm; - jweak o; - jmethodID call_meth; -} LDKFutureCallback_JCalls; -static void LDKFutureCallback_JCalls_free(void* this_arg) { - LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg; - if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { - JNIEnv *env; - jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); - if (get_jenv_res == JNI_EDETACHED) { - DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); - } else { - DO_ASSERT(get_jenv_res == JNI_OK); - } - (*env)->DeleteWeakGlobalRef(env, j_calls->o); - if (get_jenv_res == JNI_EDETACHED) { - DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); - } - FREE(j_calls); - } -} -void call_LDKFutureCallback_jcall(const void* this_arg) { - LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg; - JNIEnv *env; - jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); - if (get_jenv_res == JNI_EDETACHED) { - DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); - } else { - DO_ASSERT(get_jenv_res == JNI_OK); - } - jobject obj = (*env)->NewLocalRef(env, j_calls->o); - CHECK(obj != NULL); - (*env)->CallVoidMethod(env, obj, j_calls->call_meth); - if (UNLIKELY((*env)->ExceptionCheck(env))) { - (*env)->ExceptionDescribe(env); - (*env)->FatalError(env, "A call to call in LDKFutureCallback from rust threw an exception."); - } - if (get_jenv_res == JNI_EDETACHED) { - DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); - } -} -static void LDKFutureCallback_JCalls_cloned(LDKFutureCallback* new_obj) { - LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) new_obj->this_arg; - atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); -} -static inline LDKFutureCallback LDKFutureCallback_init (JNIEnv *env, jclass clz, jobject o) { - jclass c = (*env)->GetObjectClass(env, o); - CHECK(c != NULL); - LDKFutureCallback_JCalls *calls = MALLOC(sizeof(LDKFutureCallback_JCalls), "LDKFutureCallback_JCalls"); - atomic_init(&calls->refcnt, 1); - DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0); - calls->o = (*env)->NewWeakGlobalRef(env, o); - calls->call_meth = (*env)->GetMethodID(env, c, "call", "()V"); - CHECK(calls->call_meth != NULL); - - LDKFutureCallback ret = { - .this_arg = (void*) calls, - .call = call_LDKFutureCallback_jcall, - .free = LDKFutureCallback_JCalls_free, - }; - return ret; -} -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKFutureCallback_1new(JNIEnv *env, jclass clz, jobject o) { - LDKFutureCallback *res_ptr = MALLOC(sizeof(LDKFutureCallback), "LDKFutureCallback"); - *res_ptr = LDKFutureCallback_init(env, clz, o); - return tag_ptr(res_ptr, true); -} -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1call(JNIEnv *env, jclass clz, int64_t this_arg) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Persist_1archive_1persisted_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_funding_outpoint) { void* this_arg_ptr = untag_ptr(this_arg); if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } - LDKFutureCallback* this_arg_conv = (LDKFutureCallback*)this_arg_ptr; - (this_arg_conv->call)(this_arg_conv->this_arg); + LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr; + LDKOutPoint channel_funding_outpoint_conv; + channel_funding_outpoint_conv.inner = untag_ptr(channel_funding_outpoint); + channel_funding_outpoint_conv.is_owned = ptr_is_owned(channel_funding_outpoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_conv); + channel_funding_outpoint_conv = OutPoint_clone(&channel_funding_outpoint_conv); + (this_arg_conv->archive_persisted_channel)(this_arg_conv->this_arg, channel_funding_outpoint_conv); } typedef struct LDKListen_JCalls { @@ -17104,14 +18573,44 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_Confirm_1get_1relevant return ret_arr; } -typedef struct LDKEventHandler_JCalls { +static jclass LDKSpendingDelay_Relative_class = NULL; +static jmethodID LDKSpendingDelay_Relative_meth = NULL; +static jclass LDKSpendingDelay_Absolute_class = NULL; +static jmethodID LDKSpendingDelay_Absolute_meth = NULL; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSpendingDelay_init (JNIEnv *env, jclass clz) { + LDKSpendingDelay_Relative_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSpendingDelay$Relative")); + CHECK(LDKSpendingDelay_Relative_class != NULL); + LDKSpendingDelay_Relative_meth = (*env)->GetMethodID(env, LDKSpendingDelay_Relative_class, "", "(I)V"); + CHECK(LDKSpendingDelay_Relative_meth != NULL); + LDKSpendingDelay_Absolute_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSpendingDelay$Absolute")); + CHECK(LDKSpendingDelay_Absolute_class != NULL); + LDKSpendingDelay_Absolute_meth = (*env)->GetMethodID(env, LDKSpendingDelay_Absolute_class, "", "(I)V"); + CHECK(LDKSpendingDelay_Absolute_meth != NULL); +} +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSpendingDelay_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { + LDKSpendingDelay *obj = (LDKSpendingDelay*)untag_ptr(ptr); + switch(obj->tag) { + case LDKSpendingDelay_Relative: { + int32_t num_blocks_conv = obj->relative.num_blocks; + return (*env)->NewObject(env, LDKSpendingDelay_Relative_class, LDKSpendingDelay_Relative_meth, num_blocks_conv); + } + case LDKSpendingDelay_Absolute: { + int32_t height_conv = obj->absolute.height; + return (*env)->NewObject(env, LDKSpendingDelay_Absolute_class, LDKSpendingDelay_Absolute_meth, height_conv); + } + default: abort(); + } +} +typedef struct LDKFutureCallback_JCalls { atomic_size_t refcnt; JavaVM *vm; jweak o; - jmethodID handle_event_meth; -} LDKEventHandler_JCalls; -static void LDKEventHandler_JCalls_free(void* this_arg) { - LDKEventHandler_JCalls *j_calls = (LDKEventHandler_JCalls*) this_arg; + jmethodID call_meth; +} LDKFutureCallback_JCalls; +static void LDKFutureCallback_JCalls_free(void* this_arg) { + LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg; if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { JNIEnv *env; jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); @@ -17127,7 +18626,83 @@ static void LDKEventHandler_JCalls_free(void* this_arg) { FREE(j_calls); } } -void handle_event_LDKEventHandler_jcall(const void* this_arg, LDKEvent event) { +void call_LDKFutureCallback_jcall(const void* this_arg) { + LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg; + JNIEnv *env; + jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); + } else { + DO_ASSERT(get_jenv_res == JNI_OK); + } + jobject obj = (*env)->NewLocalRef(env, j_calls->o); + CHECK(obj != NULL); + (*env)->CallVoidMethod(env, obj, j_calls->call_meth); + if (UNLIKELY((*env)->ExceptionCheck(env))) { + (*env)->ExceptionDescribe(env); + (*env)->FatalError(env, "A call to call in LDKFutureCallback from rust threw an exception."); + } + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); + } +} +static void LDKFutureCallback_JCalls_cloned(LDKFutureCallback* new_obj) { + LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +} +static inline LDKFutureCallback LDKFutureCallback_init (JNIEnv *env, jclass clz, jobject o) { + jclass c = (*env)->GetObjectClass(env, o); + CHECK(c != NULL); + LDKFutureCallback_JCalls *calls = MALLOC(sizeof(LDKFutureCallback_JCalls), "LDKFutureCallback_JCalls"); + atomic_init(&calls->refcnt, 1); + DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0); + calls->o = (*env)->NewWeakGlobalRef(env, o); + calls->call_meth = (*env)->GetMethodID(env, c, "call", "()V"); + CHECK(calls->call_meth != NULL); + + LDKFutureCallback ret = { + .this_arg = (void*) calls, + .call = call_LDKFutureCallback_jcall, + .free = LDKFutureCallback_JCalls_free, + }; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKFutureCallback_1new(JNIEnv *env, jclass clz, jobject o) { + LDKFutureCallback *res_ptr = MALLOC(sizeof(LDKFutureCallback), "LDKFutureCallback"); + *res_ptr = LDKFutureCallback_init(env, clz, o); + return tag_ptr(res_ptr, true); +} +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1call(JNIEnv *env, jclass clz, int64_t this_arg) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKFutureCallback* this_arg_conv = (LDKFutureCallback*)this_arg_ptr; + (this_arg_conv->call)(this_arg_conv->this_arg); +} + +typedef struct LDKEventHandler_JCalls { + atomic_size_t refcnt; + JavaVM *vm; + jweak o; + jmethodID handle_event_meth; +} LDKEventHandler_JCalls; +static void LDKEventHandler_JCalls_free(void* this_arg) { + LDKEventHandler_JCalls *j_calls = (LDKEventHandler_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + JNIEnv *env; + jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); + } else { + DO_ASSERT(get_jenv_res == JNI_OK); + } + (*env)->DeleteWeakGlobalRef(env, j_calls->o); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); + } + FREE(j_calls); + } +} +void handle_event_LDKEventHandler_jcall(const void* this_arg, LDKEvent event) { LDKEventHandler_JCalls *j_calls = (LDKEventHandler_JCalls*) this_arg; JNIEnv *env; jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); @@ -17441,9 +19016,6 @@ typedef struct LDKChannelMessageHandler_JCalls { jmethodID handle_shutdown_meth; jmethodID handle_closing_signed_meth; jmethodID handle_stfu_meth; - jmethodID handle_splice_meth; - jmethodID handle_splice_ack_meth; - jmethodID handle_splice_locked_meth; jmethodID handle_tx_add_input_meth; jmethodID handle_tx_add_output_meth; jmethodID handle_tx_remove_input_meth; @@ -17757,87 +19329,6 @@ void handle_stfu_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicK DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); } } -void handle_splice_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKSplice * msg) { - LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; - JNIEnv *env; - jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); - if (get_jenv_res == JNI_EDETACHED) { - DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); - } else { - DO_ASSERT(get_jenv_res == JNI_OK); - } - int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form); - LDKSplice msg_var = *msg; - int64_t msg_ref = 0; - msg_var = Splice_clone(&msg_var); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); - msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - jobject obj = (*env)->NewLocalRef(env, j_calls->o); - CHECK(obj != NULL); - (*env)->CallVoidMethod(env, obj, j_calls->handle_splice_meth, their_node_id_arr, msg_ref); - if (UNLIKELY((*env)->ExceptionCheck(env))) { - (*env)->ExceptionDescribe(env); - (*env)->FatalError(env, "A call to handle_splice in LDKChannelMessageHandler from rust threw an exception."); - } - if (get_jenv_res == JNI_EDETACHED) { - DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); - } -} -void handle_splice_ack_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKSpliceAck * msg) { - LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; - JNIEnv *env; - jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); - if (get_jenv_res == JNI_EDETACHED) { - DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); - } else { - DO_ASSERT(get_jenv_res == JNI_OK); - } - int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form); - LDKSpliceAck msg_var = *msg; - int64_t msg_ref = 0; - msg_var = SpliceAck_clone(&msg_var); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); - msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - jobject obj = (*env)->NewLocalRef(env, j_calls->o); - CHECK(obj != NULL); - (*env)->CallVoidMethod(env, obj, j_calls->handle_splice_ack_meth, their_node_id_arr, msg_ref); - if (UNLIKELY((*env)->ExceptionCheck(env))) { - (*env)->ExceptionDescribe(env); - (*env)->FatalError(env, "A call to handle_splice_ack in LDKChannelMessageHandler from rust threw an exception."); - } - if (get_jenv_res == JNI_EDETACHED) { - DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); - } -} -void handle_splice_locked_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKSpliceLocked * msg) { - LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; - JNIEnv *env; - jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); - if (get_jenv_res == JNI_EDETACHED) { - DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); - } else { - DO_ASSERT(get_jenv_res == JNI_OK); - } - int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form); - LDKSpliceLocked msg_var = *msg; - int64_t msg_ref = 0; - msg_var = SpliceLocked_clone(&msg_var); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); - msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - jobject obj = (*env)->NewLocalRef(env, j_calls->o); - CHECK(obj != NULL); - (*env)->CallVoidMethod(env, obj, j_calls->handle_splice_locked_meth, their_node_id_arr, msg_ref); - if (UNLIKELY((*env)->ExceptionCheck(env))) { - (*env)->ExceptionDescribe(env); - (*env)->FatalError(env, "A call to handle_splice_locked in LDKChannelMessageHandler from rust threw an exception."); - } - if (get_jenv_res == JNI_EDETACHED) { - DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); - } -} void handle_tx_add_input_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKTxAddInput * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; JNIEnv *env; @@ -18542,12 +20033,6 @@ static inline LDKChannelMessageHandler LDKChannelMessageHandler_init (JNIEnv *en CHECK(calls->handle_closing_signed_meth != NULL); calls->handle_stfu_meth = (*env)->GetMethodID(env, c, "handle_stfu", "([BJ)V"); CHECK(calls->handle_stfu_meth != NULL); - calls->handle_splice_meth = (*env)->GetMethodID(env, c, "handle_splice", "([BJ)V"); - CHECK(calls->handle_splice_meth != NULL); - calls->handle_splice_ack_meth = (*env)->GetMethodID(env, c, "handle_splice_ack", "([BJ)V"); - CHECK(calls->handle_splice_ack_meth != NULL); - calls->handle_splice_locked_meth = (*env)->GetMethodID(env, c, "handle_splice_locked", "([BJ)V"); - CHECK(calls->handle_splice_locked_meth != NULL); calls->handle_tx_add_input_meth = (*env)->GetMethodID(env, c, "handle_tx_add_input", "([BJ)V"); CHECK(calls->handle_tx_add_input_meth != NULL); calls->handle_tx_add_output_meth = (*env)->GetMethodID(env, c, "handle_tx_add_output", "([BJ)V"); @@ -18611,9 +20096,6 @@ static inline LDKChannelMessageHandler LDKChannelMessageHandler_init (JNIEnv *en .handle_shutdown = handle_shutdown_LDKChannelMessageHandler_jcall, .handle_closing_signed = handle_closing_signed_LDKChannelMessageHandler_jcall, .handle_stfu = handle_stfu_LDKChannelMessageHandler_jcall, - .handle_splice = handle_splice_LDKChannelMessageHandler_jcall, - .handle_splice_ack = handle_splice_ack_LDKChannelMessageHandler_jcall, - .handle_splice_locked = handle_splice_locked_LDKChannelMessageHandler_jcall, .handle_tx_add_input = handle_tx_add_input_LDKChannelMessageHandler_jcall, .handle_tx_add_output = handle_tx_add_output_LDKChannelMessageHandler_jcall, .handle_tx_remove_input = handle_tx_remove_input_LDKChannelMessageHandler_jcall, @@ -18804,51 +20286,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_ (this_arg_conv->handle_stfu)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv); } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1splice(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) { - void* this_arg_ptr = untag_ptr(this_arg); - if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } - LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr; - LDKPublicKey their_node_id_ref; - CHECK((*env)->GetArrayLength(env, their_node_id) == 33); - (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form); - LDKSplice msg_conv; - msg_conv.inner = untag_ptr(msg); - msg_conv.is_owned = ptr_is_owned(msg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv); - msg_conv.is_owned = false; - (this_arg_conv->handle_splice)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv); -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1splice_1ack(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) { - void* this_arg_ptr = untag_ptr(this_arg); - if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } - LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr; - LDKPublicKey their_node_id_ref; - CHECK((*env)->GetArrayLength(env, their_node_id) == 33); - (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form); - LDKSpliceAck msg_conv; - msg_conv.inner = untag_ptr(msg); - msg_conv.is_owned = ptr_is_owned(msg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv); - msg_conv.is_owned = false; - (this_arg_conv->handle_splice_ack)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv); -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1splice_1locked(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) { - void* this_arg_ptr = untag_ptr(this_arg); - if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } - LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr; - LDKPublicKey their_node_id_ref; - CHECK((*env)->GetArrayLength(env, their_node_id) == 33); - (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form); - LDKSpliceLocked msg_conv; - msg_conv.inner = untag_ptr(msg); - msg_conv.is_owned = ptr_is_owned(msg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv); - msg_conv.is_owned = false; - (this_arg_conv->handle_splice_locked)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv); -} - JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1tx_1add_1input(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) { void* this_arg_ptr = untag_ptr(this_arg); if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } @@ -19361,6 +20798,89 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_OffersMessageHandler_1 return ret_arr; } +typedef struct LDKNodeIdLookUp_JCalls { + atomic_size_t refcnt; + JavaVM *vm; + jweak o; + jmethodID next_node_id_meth; +} LDKNodeIdLookUp_JCalls; +static void LDKNodeIdLookUp_JCalls_free(void* this_arg) { + LDKNodeIdLookUp_JCalls *j_calls = (LDKNodeIdLookUp_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + JNIEnv *env; + jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); + } else { + DO_ASSERT(get_jenv_res == JNI_OK); + } + (*env)->DeleteWeakGlobalRef(env, j_calls->o); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); + } + FREE(j_calls); + } +} +LDKPublicKey next_node_id_LDKNodeIdLookUp_jcall(const void* this_arg, uint64_t short_channel_id) { + LDKNodeIdLookUp_JCalls *j_calls = (LDKNodeIdLookUp_JCalls*) this_arg; + JNIEnv *env; + jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); + } else { + DO_ASSERT(get_jenv_res == JNI_OK); + } + int64_t short_channel_id_conv = short_channel_id; + jobject obj = (*env)->NewLocalRef(env, j_calls->o); + CHECK(obj != NULL); + int8_tArray ret = (*env)->CallObjectMethod(env, obj, j_calls->next_node_id_meth, short_channel_id_conv); + if (UNLIKELY((*env)->ExceptionCheck(env))) { + (*env)->ExceptionDescribe(env); + (*env)->FatalError(env, "A call to next_node_id in LDKNodeIdLookUp from rust threw an exception."); + } + LDKPublicKey ret_ref; + CHECK((*env)->GetArrayLength(env, ret) == 33); + (*env)->GetByteArrayRegion(env, ret, 0, 33, ret_ref.compressed_form); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); + } + return ret_ref; +} +static void LDKNodeIdLookUp_JCalls_cloned(LDKNodeIdLookUp* new_obj) { + LDKNodeIdLookUp_JCalls *j_calls = (LDKNodeIdLookUp_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +} +static inline LDKNodeIdLookUp LDKNodeIdLookUp_init (JNIEnv *env, jclass clz, jobject o) { + jclass c = (*env)->GetObjectClass(env, o); + CHECK(c != NULL); + LDKNodeIdLookUp_JCalls *calls = MALLOC(sizeof(LDKNodeIdLookUp_JCalls), "LDKNodeIdLookUp_JCalls"); + atomic_init(&calls->refcnt, 1); + DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0); + calls->o = (*env)->NewWeakGlobalRef(env, o); + calls->next_node_id_meth = (*env)->GetMethodID(env, c, "next_node_id", "(J)[B"); + CHECK(calls->next_node_id_meth != NULL); + + LDKNodeIdLookUp ret = { + .this_arg = (void*) calls, + .next_node_id = next_node_id_LDKNodeIdLookUp_jcall, + .free = LDKNodeIdLookUp_JCalls_free, + }; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKNodeIdLookUp_1new(JNIEnv *env, jclass clz, jobject o) { + LDKNodeIdLookUp *res_ptr = MALLOC(sizeof(LDKNodeIdLookUp), "LDKNodeIdLookUp"); + *res_ptr = LDKNodeIdLookUp_init(env, clz, o); + return tag_ptr(res_ptr, true); +} +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NodeIdLookUp_1next_1node_1id(JNIEnv *env, jclass clz, int64_t this_arg, int64_t short_channel_id) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKNodeIdLookUp* this_arg_conv = (LDKNodeIdLookUp*)this_arg_ptr; + int8_tArray ret_arr = (*env)->NewByteArray(env, 33); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, (this_arg_conv->next_node_id)(this_arg_conv->this_arg, short_channel_id).compressed_form); + return ret_arr; +} + typedef struct LDKRoutingMessageHandler_JCalls { atomic_size_t refcnt; JavaVM *vm; @@ -21144,6 +22664,221 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1hash(JNIE return ret_conv; } +typedef struct LDKSignBolt12InvoiceFn_JCalls { + atomic_size_t refcnt; + JavaVM *vm; + jweak o; + jmethodID sign_invoice_meth; +} LDKSignBolt12InvoiceFn_JCalls; +static void LDKSignBolt12InvoiceFn_JCalls_free(void* this_arg) { + LDKSignBolt12InvoiceFn_JCalls *j_calls = (LDKSignBolt12InvoiceFn_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + JNIEnv *env; + jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); + } else { + DO_ASSERT(get_jenv_res == JNI_OK); + } + (*env)->DeleteWeakGlobalRef(env, j_calls->o); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); + } + FREE(j_calls); + } +} +LDKCResult_SchnorrSignatureNoneZ sign_invoice_LDKSignBolt12InvoiceFn_jcall(const void* this_arg, const LDKUnsignedBolt12Invoice * message) { + LDKSignBolt12InvoiceFn_JCalls *j_calls = (LDKSignBolt12InvoiceFn_JCalls*) this_arg; + JNIEnv *env; + jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); + } else { + DO_ASSERT(get_jenv_res == JNI_OK); + } + LDKUnsignedBolt12Invoice message_var = *message; + int64_t message_ref = 0; + message_var = UnsignedBolt12Invoice_clone(&message_var); + CHECK_INNER_FIELD_ACCESS_OR_NULL(message_var); + message_ref = tag_ptr(message_var.inner, message_var.is_owned); + jobject obj = (*env)->NewLocalRef(env, j_calls->o); + CHECK(obj != NULL); + uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->sign_invoice_meth, message_ref); + if (UNLIKELY((*env)->ExceptionCheck(env))) { + (*env)->ExceptionDescribe(env); + (*env)->FatalError(env, "A call to sign_invoice in LDKSignBolt12InvoiceFn from rust threw an exception."); + } + void* ret_ptr = untag_ptr(ret); + CHECK_ACCESS(ret_ptr); + LDKCResult_SchnorrSignatureNoneZ ret_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(ret_ptr); + FREE(untag_ptr(ret)); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); + } + return ret_conv; +} +static void LDKSignBolt12InvoiceFn_JCalls_cloned(LDKSignBolt12InvoiceFn* new_obj) { + LDKSignBolt12InvoiceFn_JCalls *j_calls = (LDKSignBolt12InvoiceFn_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +} +static inline LDKSignBolt12InvoiceFn LDKSignBolt12InvoiceFn_init (JNIEnv *env, jclass clz, jobject o) { + jclass c = (*env)->GetObjectClass(env, o); + CHECK(c != NULL); + LDKSignBolt12InvoiceFn_JCalls *calls = MALLOC(sizeof(LDKSignBolt12InvoiceFn_JCalls), "LDKSignBolt12InvoiceFn_JCalls"); + atomic_init(&calls->refcnt, 1); + DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0); + calls->o = (*env)->NewWeakGlobalRef(env, o); + calls->sign_invoice_meth = (*env)->GetMethodID(env, c, "sign_invoice", "(J)J"); + CHECK(calls->sign_invoice_meth != NULL); + + LDKSignBolt12InvoiceFn ret = { + .this_arg = (void*) calls, + .sign_invoice = sign_invoice_LDKSignBolt12InvoiceFn_jcall, + .free = LDKSignBolt12InvoiceFn_JCalls_free, + }; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKSignBolt12InvoiceFn_1new(JNIEnv *env, jclass clz, jobject o) { + LDKSignBolt12InvoiceFn *res_ptr = MALLOC(sizeof(LDKSignBolt12InvoiceFn), "LDKSignBolt12InvoiceFn"); + *res_ptr = LDKSignBolt12InvoiceFn_init(env, clz, o); + return tag_ptr(res_ptr, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignBolt12InvoiceFn_1sign_1invoice(JNIEnv *env, jclass clz, int64_t this_arg, int64_t message) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKSignBolt12InvoiceFn* this_arg_conv = (LDKSignBolt12InvoiceFn*)this_arg_ptr; + LDKUnsignedBolt12Invoice message_conv; + message_conv.inner = untag_ptr(message); + message_conv.is_owned = ptr_is_owned(message); + CHECK_INNER_FIELD_ACCESS_OR_NULL(message_conv); + message_conv.is_owned = false; + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = (this_arg_conv->sign_invoice)(this_arg_conv->this_arg, &message_conv); + return tag_ptr(ret_conv, true); +} + +typedef struct LDKSignInvoiceRequestFn_JCalls { + atomic_size_t refcnt; + JavaVM *vm; + jweak o; + jmethodID sign_invoice_request_meth; +} LDKSignInvoiceRequestFn_JCalls; +static void LDKSignInvoiceRequestFn_JCalls_free(void* this_arg) { + LDKSignInvoiceRequestFn_JCalls *j_calls = (LDKSignInvoiceRequestFn_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + JNIEnv *env; + jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); + } else { + DO_ASSERT(get_jenv_res == JNI_OK); + } + (*env)->DeleteWeakGlobalRef(env, j_calls->o); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); + } + FREE(j_calls); + } +} +LDKCResult_SchnorrSignatureNoneZ sign_invoice_request_LDKSignInvoiceRequestFn_jcall(const void* this_arg, const LDKUnsignedInvoiceRequest * message) { + LDKSignInvoiceRequestFn_JCalls *j_calls = (LDKSignInvoiceRequestFn_JCalls*) this_arg; + JNIEnv *env; + jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); + } else { + DO_ASSERT(get_jenv_res == JNI_OK); + } + LDKUnsignedInvoiceRequest message_var = *message; + int64_t message_ref = 0; + message_var = UnsignedInvoiceRequest_clone(&message_var); + CHECK_INNER_FIELD_ACCESS_OR_NULL(message_var); + message_ref = tag_ptr(message_var.inner, message_var.is_owned); + jobject obj = (*env)->NewLocalRef(env, j_calls->o); + CHECK(obj != NULL); + uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->sign_invoice_request_meth, message_ref); + if (UNLIKELY((*env)->ExceptionCheck(env))) { + (*env)->ExceptionDescribe(env); + (*env)->FatalError(env, "A call to sign_invoice_request in LDKSignInvoiceRequestFn from rust threw an exception."); + } + void* ret_ptr = untag_ptr(ret); + CHECK_ACCESS(ret_ptr); + LDKCResult_SchnorrSignatureNoneZ ret_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(ret_ptr); + FREE(untag_ptr(ret)); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); + } + return ret_conv; +} +static void LDKSignInvoiceRequestFn_JCalls_cloned(LDKSignInvoiceRequestFn* new_obj) { + LDKSignInvoiceRequestFn_JCalls *j_calls = (LDKSignInvoiceRequestFn_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +} +static inline LDKSignInvoiceRequestFn LDKSignInvoiceRequestFn_init (JNIEnv *env, jclass clz, jobject o) { + jclass c = (*env)->GetObjectClass(env, o); + CHECK(c != NULL); + LDKSignInvoiceRequestFn_JCalls *calls = MALLOC(sizeof(LDKSignInvoiceRequestFn_JCalls), "LDKSignInvoiceRequestFn_JCalls"); + atomic_init(&calls->refcnt, 1); + DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0); + calls->o = (*env)->NewWeakGlobalRef(env, o); + calls->sign_invoice_request_meth = (*env)->GetMethodID(env, c, "sign_invoice_request", "(J)J"); + CHECK(calls->sign_invoice_request_meth != NULL); + + LDKSignInvoiceRequestFn ret = { + .this_arg = (void*) calls, + .sign_invoice_request = sign_invoice_request_LDKSignInvoiceRequestFn_jcall, + .free = LDKSignInvoiceRequestFn_JCalls_free, + }; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKSignInvoiceRequestFn_1new(JNIEnv *env, jclass clz, jobject o) { + LDKSignInvoiceRequestFn *res_ptr = MALLOC(sizeof(LDKSignInvoiceRequestFn), "LDKSignInvoiceRequestFn"); + *res_ptr = LDKSignInvoiceRequestFn_init(env, clz, o); + return tag_ptr(res_ptr, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignInvoiceRequestFn_1sign_1invoice_1request(JNIEnv *env, jclass clz, int64_t this_arg, int64_t message) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKSignInvoiceRequestFn* this_arg_conv = (LDKSignInvoiceRequestFn*)this_arg_ptr; + LDKUnsignedInvoiceRequest message_conv; + message_conv.inner = untag_ptr(message); + message_conv.is_owned = ptr_is_owned(message); + CHECK_INNER_FIELD_ACCESS_OR_NULL(message_conv); + message_conv.is_owned = false; + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = (this_arg_conv->sign_invoice_request)(this_arg_conv->this_arg, &message_conv); + return tag_ptr(ret_conv, true); +} + +static jclass LDKSignError_Signing_class = NULL; +static jmethodID LDKSignError_Signing_meth = NULL; +static jclass LDKSignError_Verification_class = NULL; +static jmethodID LDKSignError_Verification_meth = NULL; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSignError_init (JNIEnv *env, jclass clz) { + LDKSignError_Signing_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSignError$Signing")); + CHECK(LDKSignError_Signing_class != NULL); + LDKSignError_Signing_meth = (*env)->GetMethodID(env, LDKSignError_Signing_class, "", "()V"); + CHECK(LDKSignError_Signing_meth != NULL); + LDKSignError_Verification_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSignError$Verification")); + CHECK(LDKSignError_Verification_class != NULL); + LDKSignError_Verification_meth = (*env)->GetMethodID(env, LDKSignError_Verification_class, "", "(Lorg/ldk/enums/Secp256k1Error;)V"); + CHECK(LDKSignError_Verification_meth != NULL); +} +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSignError_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { + LDKSignError *obj = (LDKSignError*)untag_ptr(ptr); + switch(obj->tag) { + case LDKSignError_Signing: { + return (*env)->NewObject(env, LDKSignError_Signing_class, LDKSignError_Signing_meth); + } + case LDKSignError_Verification: { + jclass verification_conv = LDKSecp256k1Error_to_java(env, obj->verification); + return (*env)->NewObject(env, LDKSignError_Verification_class, LDKSignError_Verification_meth, verification_conv); + } + default: abort(); + } +} static jclass LDKEffectiveCapacity_ExactLiquidity_class = NULL; static jmethodID LDKEffectiveCapacity_ExactLiquidity_meth = NULL; static jclass LDKEffectiveCapacity_AdvertisedMaxHTLC_class = NULL; @@ -21380,6 +23115,38 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Score_1write(JNIEnv *en return ret_arr; } +static jclass LDKIntroductionNode_NodeId_class = NULL; +static jmethodID LDKIntroductionNode_NodeId_meth = NULL; +static jclass LDKIntroductionNode_DirectedShortChannelId_class = NULL; +static jmethodID LDKIntroductionNode_DirectedShortChannelId_meth = NULL; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKIntroductionNode_init (JNIEnv *env, jclass clz) { + LDKIntroductionNode_NodeId_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKIntroductionNode$NodeId")); + CHECK(LDKIntroductionNode_NodeId_class != NULL); + LDKIntroductionNode_NodeId_meth = (*env)->GetMethodID(env, LDKIntroductionNode_NodeId_class, "", "([B)V"); + CHECK(LDKIntroductionNode_NodeId_meth != NULL); + LDKIntroductionNode_DirectedShortChannelId_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKIntroductionNode$DirectedShortChannelId")); + CHECK(LDKIntroductionNode_DirectedShortChannelId_class != NULL); + LDKIntroductionNode_DirectedShortChannelId_meth = (*env)->GetMethodID(env, LDKIntroductionNode_DirectedShortChannelId_class, "", "(Lorg/ldk/enums/Direction;J)V"); + CHECK(LDKIntroductionNode_DirectedShortChannelId_meth != NULL); +} +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKIntroductionNode_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { + LDKIntroductionNode *obj = (LDKIntroductionNode*)untag_ptr(ptr); + switch(obj->tag) { + case LDKIntroductionNode_NodeId: { + int8_tArray node_id_arr = (*env)->NewByteArray(env, 33); + (*env)->SetByteArrayRegion(env, node_id_arr, 0, 33, obj->node_id.compressed_form); + return (*env)->NewObject(env, LDKIntroductionNode_NodeId_class, LDKIntroductionNode_NodeId_meth, node_id_arr); + } + case LDKIntroductionNode_DirectedShortChannelId: { + jclass _0_conv = LDKDirection_to_java(env, obj->directed_short_channel_id._0); + int64_t _1_conv = obj->directed_short_channel_id._1; + return (*env)->NewObject(env, LDKIntroductionNode_DirectedShortChannelId_class, LDKIntroductionNode_DirectedShortChannelId_meth, _0_conv, _1_conv); + } + default: abort(); + } +} typedef struct LDKCoinSelectionSource_JCalls { atomic_size_t refcnt; JavaVM *vm; @@ -21924,6 +23691,24 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BigEndianScalar_1new(JNIEnv return tag_ptr(ret_ref, true); } +static inline uint64_t BigEndianScalar_clone_ptr(LDKBigEndianScalar *NONNULL_PTR arg) { + LDKBigEndianScalar* ret_ref = MALLOC(sizeof(LDKBigEndianScalar), "LDKBigEndianScalar"); + *ret_ref = BigEndianScalar_clone(arg); + return tag_ptr(ret_ref, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BigEndianScalar_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKBigEndianScalar* arg_conv = (LDKBigEndianScalar*)untag_ptr(arg); + int64_t ret_conv = BigEndianScalar_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BigEndianScalar_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKBigEndianScalar* orig_conv = (LDKBigEndianScalar*)untag_ptr(orig); + LDKBigEndianScalar* ret_ref = MALLOC(sizeof(LDKBigEndianScalar), "LDKBigEndianScalar"); + *ret_ref = BigEndianScalar_clone(orig_conv); + return tag_ptr(ret_ref, true); +} + static inline uint64_t Bech32Error_clone_ptr(LDKBech32Error *NONNULL_PTR arg) { LDKBech32Error *ret_copy = MALLOC(sizeof(LDKBech32Error), "LDKBech32Error"); *ret_copy = Bech32Error_clone(arg); @@ -22090,6 +23875,116 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Str_1free(JNIEnv *env, jclass Str_free(dummy); } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u8Z_1free(JNIEnv *env, jclass clz, int8_tArray _res) { + LDKCVec_u8Z _res_ref; + _res_ref.datalen = (*env)->GetArrayLength(env, _res); + _res_ref.data = MALLOC(_res_ref.datalen, "LDKCVec_u8Z Bytes"); + (*env)->GetByteArrayRegion(env, _res, 0, _res_ref.datalen, _res_ref.data); + CVec_u8Z_free(_res_ref); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKRefundMaybeWithDerivedMetadataBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&o_conv); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* arg_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* orig_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKRefund o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = Refund_clone(&o_conv); + LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e); + LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_RefundBolt12SemanticErrorZ* o_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_RefundBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_RefundBolt12SemanticErrorZ _res_conv = *(LDKCResult_RefundBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_RefundBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_RefundBolt12SemanticErrorZ_clone_ptr(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_RefundBolt12SemanticErrorZ* arg_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_RefundBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_RefundBolt12SemanticErrorZ* orig_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1u64Z_1some(JNIEnv *env, jclass clz, int64_t o) { LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z"); *ret_copy = COption_u64Z_some(o); @@ -22396,14 +24291,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1ThirtyTwoBytesZ_1c return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u8Z_1free(JNIEnv *env, jclass clz, int8_tArray _res) { - LDKCVec_u8Z _res_ref; - _res_ref.datalen = (*env)->GetArrayLength(env, _res); - _res_ref.data = MALLOC(_res_ref.datalen, "LDKCVec_u8Z Bytes"); - (*env)->GetByteArrayRegion(env, _res, 0, _res_ref.datalen, _res_ref.data); - CVec_u8Z_free(_res_ref); -} - JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1CVec_1u8ZZ_1some(JNIEnv *env, jclass clz, int8_tArray o) { LDKCVec_u8Z o_ref; o_ref.datalen = (*env)->GetArrayLength(env, o); @@ -22612,6 +24499,156 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RecipientOnionFiel return tag_ptr(ret_conv, true); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKUnsignedBolt12Invoice o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = UnsignedBolt12Invoice_clone(&o_conv); + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e); + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* o_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ _res_conv = *(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* arg_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* orig_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKBolt12Invoice o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = Bolt12Invoice_clone(&o_conv); + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e); + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* o_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ _res_conv = *(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_Bolt12InvoiceBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* arg_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* orig_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) { + LDKSchnorrSignature o_ref; + CHECK((*env)->GetArrayLength(env, o) == 64); + (*env)->GetByteArrayRegion(env, o, 0, 64, o_ref.compact_form); + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = CResult_SchnorrSignatureNoneZ_ok(o_ref); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1err(JNIEnv *env, jclass clz) { + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = CResult_SchnorrSignatureNoneZ_err(); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_SchnorrSignatureNoneZ* o_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(o); + jboolean ret_conv = CResult_SchnorrSignatureNoneZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_SchnorrSignatureNoneZ _res_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_SchnorrSignatureNoneZ_free(_res_conv); +} + +static inline uint64_t CResult_SchnorrSignatureNoneZ_clone_ptr(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR arg) { + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = CResult_SchnorrSignatureNoneZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_SchnorrSignatureNoneZ* arg_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(arg); + int64_t ret_conv = CResult_SchnorrSignatureNoneZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_SchnorrSignatureNoneZ* orig_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(orig); + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = CResult_SchnorrSignatureNoneZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ThirtyTwoBytesZ_1free(JNIEnv *env, jclass clz, jobjectArray _res) { LDKCVec_ThirtyTwoBytesZ _res_constr; _res_constr.datalen = (*env)->GetArrayLength(env, _res); @@ -22685,6 +24722,100 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1CVec_1ThirtyTwoByt return ret_ref; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1some(JNIEnv *env, jclass clz, int64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKAmount o_conv = *(LDKAmount*)(o_ptr); + o_conv = Amount_clone((LDKAmount*)untag_ptr(o)); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = COption_AmountZ_some(o_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1none(JNIEnv *env, jclass clz) { + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = COption_AmountZ_none(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCOption_AmountZ _res_conv = *(LDKCOption_AmountZ*)(_res_ptr); + FREE(untag_ptr(_res)); + COption_AmountZ_free(_res_conv); +} + +static inline uint64_t COption_AmountZ_clone_ptr(LDKCOption_AmountZ *NONNULL_PTR arg) { + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = COption_AmountZ_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCOption_AmountZ* arg_conv = (LDKCOption_AmountZ*)untag_ptr(arg); + int64_t ret_conv = COption_AmountZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCOption_AmountZ* orig_conv = (LDKCOption_AmountZ*)untag_ptr(orig); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = COption_AmountZ_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1some(JNIEnv *env, jclass clz, int64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKQuantity o_conv = *(LDKQuantity*)(o_ptr); + o_conv = Quantity_clone((LDKQuantity*)untag_ptr(o)); + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = COption_QuantityZ_some(o_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1none(JNIEnv *env, jclass clz) { + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = COption_QuantityZ_none(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCOption_QuantityZ _res_conv = *(LDKCOption_QuantityZ*)(_res_ptr); + FREE(untag_ptr(_res)); + COption_QuantityZ_free(_res_conv); +} + +static inline uint64_t COption_QuantityZ_clone_ptr(LDKCOption_QuantityZ *NONNULL_PTR arg) { + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = COption_QuantityZ_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCOption_QuantityZ* arg_conv = (LDKCOption_QuantityZ*)untag_ptr(arg); + int64_t ret_conv = COption_QuantityZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCOption_QuantityZ* orig_conv = (LDKCOption_QuantityZ*)untag_ptr(orig); + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = COption_QuantityZ_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) { LDKThirtyTwoBytes o_ref; CHECK((*env)->GetArrayLength(env, o) == 32); @@ -23322,7 +25453,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1BigEndianScalarZ_1 void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); LDKBigEndianScalar o_conv = *(LDKBigEndianScalar*)(o_ptr); - // WARNING: we may need a move here but no clone is available for LDKBigEndianScalar + o_conv = BigEndianScalar_clone((LDKBigEndianScalar*)untag_ptr(o)); LDKCOption_BigEndianScalarZ *ret_copy = MALLOC(sizeof(LDKCOption_BigEndianScalarZ), "LDKCOption_BigEndianScalarZ"); *ret_copy = COption_BigEndianScalarZ_some(o_conv); int64_t ret_ref = tag_ptr(ret_copy, true); @@ -23430,54 +25561,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RecoverableSignatu return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) { - LDKSchnorrSignature o_ref; - CHECK((*env)->GetArrayLength(env, o) == 64); - (*env)->GetByteArrayRegion(env, o, 0, 64, o_ref.compact_form); - LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); - *ret_conv = CResult_SchnorrSignatureNoneZ_ok(o_ref); - return tag_ptr(ret_conv, true); -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1err(JNIEnv *env, jclass clz) { - LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); - *ret_conv = CResult_SchnorrSignatureNoneZ_err(); - return tag_ptr(ret_conv, true); -} - -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { - LDKCResult_SchnorrSignatureNoneZ* o_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(o); - jboolean ret_conv = CResult_SchnorrSignatureNoneZ_is_ok(o_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKCResult_SchnorrSignatureNoneZ _res_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(_res_ptr); - FREE(untag_ptr(_res)); - CResult_SchnorrSignatureNoneZ_free(_res_conv); -} - -static inline uint64_t CResult_SchnorrSignatureNoneZ_clone_ptr(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR arg) { - LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); - *ret_conv = CResult_SchnorrSignatureNoneZ_clone(arg); - return tag_ptr(ret_conv, true); -} -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { - LDKCResult_SchnorrSignatureNoneZ* arg_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(arg); - int64_t ret_conv = CResult_SchnorrSignatureNoneZ_clone_ptr(arg_conv); - return ret_conv; -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { - LDKCResult_SchnorrSignatureNoneZ* orig_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(orig); - LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); - *ret_conv = CResult_SchnorrSignatureNoneZ_clone(orig_conv); - return tag_ptr(ret_conv, true); -} - JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) { LDKECDSASignature o_ref; CHECK((*env)->GetArrayLength(env, o) == 64); @@ -23526,6 +25609,56 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNone return tag_ptr(ret_conv, true); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) { + LDKTransaction o_ref; + o_ref.datalen = (*env)->GetArrayLength(env, o); + o_ref.data = MALLOC(o_ref.datalen, "LDKTransaction Bytes"); + (*env)->GetByteArrayRegion(env, o, 0, o_ref.datalen, o_ref.data); + o_ref.data_is_owned = true; + LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); + *ret_conv = CResult_TransactionNoneZ_ok(o_ref); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1err(JNIEnv *env, jclass clz) { + LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); + *ret_conv = CResult_TransactionNoneZ_err(); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_TransactionNoneZ* o_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(o); + jboolean ret_conv = CResult_TransactionNoneZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_TransactionNoneZ _res_conv = *(LDKCResult_TransactionNoneZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_TransactionNoneZ_free(_res_conv); +} + +static inline uint64_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg) { + LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); + *ret_conv = CResult_TransactionNoneZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_TransactionNoneZ* arg_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(arg); + int64_t ret_conv = CResult_TransactionNoneZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_TransactionNoneZ* orig_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(orig); + LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); + *ret_conv = CResult_TransactionNoneZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1WriteableEcdsaChannelSignerDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -23986,56 +26119,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InMemorySignerDeco return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) { - LDKTransaction o_ref; - o_ref.datalen = (*env)->GetArrayLength(env, o); - o_ref.data = MALLOC(o_ref.datalen, "LDKTransaction Bytes"); - (*env)->GetByteArrayRegion(env, o, 0, o_ref.datalen, o_ref.data); - o_ref.data_is_owned = true; - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = CResult_TransactionNoneZ_ok(o_ref); - return tag_ptr(ret_conv, true); -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1err(JNIEnv *env, jclass clz) { - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = CResult_TransactionNoneZ_err(); - return tag_ptr(ret_conv, true); -} - -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { - LDKCResult_TransactionNoneZ* o_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(o); - jboolean ret_conv = CResult_TransactionNoneZ_is_ok(o_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKCResult_TransactionNoneZ _res_conv = *(LDKCResult_TransactionNoneZ*)(_res_ptr); - FREE(untag_ptr(_res)); - CResult_TransactionNoneZ_free(_res_conv); -} - -static inline uint64_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg) { - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = CResult_TransactionNoneZ_clone(arg); - return tag_ptr(ret_conv, true); -} -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { - LDKCResult_TransactionNoneZ* arg_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(arg); - int64_t ret_conv = CResult_TransactionNoneZ_clone_ptr(arg_conv); - return ret_conv; -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { - LDKCResult_TransactionNoneZ* orig_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(orig); - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = CResult_TransactionNoneZ_clone(orig_conv); - return tag_ptr(ret_conv, true); -} - JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1WriteableScoreZ_1some(JNIEnv *env, jclass clz, int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -25291,6 +27374,60 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScorerDe CResult_ProbabilisticScorerDecodeErrorZ_free(_res_conv); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKBestBlock o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = BestBlock_clone(&o_conv); + LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ"); + *ret_conv = CResult_BestBlockDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ"); + *ret_conv = CResult_BestBlockDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_BestBlockDecodeErrorZ* o_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_BestBlockDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_BestBlockDecodeErrorZ _res_conv = *(LDKCResult_BestBlockDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_BestBlockDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_BestBlockDecodeErrorZ_clone_ptr(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ"); + *ret_conv = CResult_BestBlockDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_BestBlockDecodeErrorZ* arg_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_BestBlockDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_BestBlockDecodeErrorZ* orig_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(orig); + LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ"); + *ret_conv = CResult_BestBlockDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + static inline uint64_t C2Tuple_usizeTransactionZ_clone_ptr(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR arg) { LDKC2Tuple_usizeTransactionZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ"); *ret_conv = C2Tuple_usizeTransactionZ_clone(arg); @@ -25475,81 +27612,86 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MonitorEventZ_1free(JNIE CVec_MonitorEventZ_free(_res_constr); } -static inline uint64_t C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR arg) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ"); - *ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(arg); +static inline uint64_t C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR arg) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ"); + *ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(arg); return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* arg_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(arg); - int64_t ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(arg_conv); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* arg_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(arg); + int64_t ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(arg_conv); return ret_conv; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* orig_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(orig); - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ"); - *ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(orig_conv); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* orig_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(orig); + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ"); + *ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(orig_conv); return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_tArray b, int8_tArray c) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b, int64_tArray c, int8_tArray d) { LDKOutPoint a_conv; a_conv.inner = untag_ptr(a); a_conv.is_owned = ptr_is_owned(a); CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); a_conv = OutPoint_clone(&a_conv); - LDKCVec_MonitorEventZ b_constr; - b_constr.datalen = (*env)->GetArrayLength(env, b); - if (b_constr.datalen > 0) - b_constr.data = MALLOC(b_constr.datalen * sizeof(LDKMonitorEvent), "LDKCVec_MonitorEventZ Elements"); + LDKChannelId b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv = ChannelId_clone(&b_conv); + LDKCVec_MonitorEventZ c_constr; + c_constr.datalen = (*env)->GetArrayLength(env, c); + if (c_constr.datalen > 0) + c_constr.data = MALLOC(c_constr.datalen * sizeof(LDKMonitorEvent), "LDKCVec_MonitorEventZ Elements"); else - b_constr.data = NULL; - int64_t* b_vals = (*env)->GetLongArrayElements (env, b, NULL); - for (size_t o = 0; o < b_constr.datalen; o++) { - int64_t b_conv_14 = b_vals[o]; - void* b_conv_14_ptr = untag_ptr(b_conv_14); - CHECK_ACCESS(b_conv_14_ptr); - LDKMonitorEvent b_conv_14_conv = *(LDKMonitorEvent*)(b_conv_14_ptr); - b_conv_14_conv = MonitorEvent_clone((LDKMonitorEvent*)untag_ptr(b_conv_14)); - b_constr.data[o] = b_conv_14_conv; - } - (*env)->ReleaseLongArrayElements(env, b, b_vals, 0); - LDKPublicKey c_ref; - CHECK((*env)->GetArrayLength(env, c) == 33); - (*env)->GetByteArrayRegion(env, c, 0, 33, c_ref.compressed_form); - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ"); - *ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(a_conv, b_constr, c_ref); - return tag_ptr(ret_conv, true); -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + c_constr.data = NULL; + int64_t* c_vals = (*env)->GetLongArrayElements (env, c, NULL); + for (size_t o = 0; o < c_constr.datalen; o++) { + int64_t c_conv_14 = c_vals[o]; + void* c_conv_14_ptr = untag_ptr(c_conv_14); + CHECK_ACCESS(c_conv_14_ptr); + LDKMonitorEvent c_conv_14_conv = *(LDKMonitorEvent*)(c_conv_14_ptr); + c_conv_14_conv = MonitorEvent_clone((LDKMonitorEvent*)untag_ptr(c_conv_14)); + c_constr.data[o] = c_conv_14_conv; + } + (*env)->ReleaseLongArrayElements(env, c, c_vals, 0); + LDKPublicKey d_ref; + CHECK((*env)->GetArrayLength(env, d) == 33); + (*env)->GetByteArrayRegion(env, d, 0, 33, d_ref.compressed_form); + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ"); + *ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new(a_conv, b_conv, c_constr, d_ref); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1free(JNIEnv *env, jclass clz, int64_t _res) { if (!ptr_is_owned(_res)) return; void* _res_ptr = untag_ptr(_res); CHECK_ACCESS(_res_ptr); - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ _res_conv = *(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)(_res_ptr); + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ _res_conv = *(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)(_res_ptr); FREE(untag_ptr(_res)); - C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(_res_conv); + C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free(_res_conv); } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) { - LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ _res_constr; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) { + LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ _res_constr; _res_constr.datalen = (*env)->GetArrayLength(env, _res); if (_res_constr.datalen > 0) - _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ Elements"); + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ Elements"); else _res_constr.data = NULL; int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL); - for (size_t x = 0; x < _res_constr.datalen; x++) { - int64_t _res_conv_49 = _res_vals[x]; - void* _res_conv_49_ptr = untag_ptr(_res_conv_49); - CHECK_ACCESS(_res_conv_49_ptr); - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ _res_conv_49_conv = *(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)(_res_conv_49_ptr); - FREE(untag_ptr(_res_conv_49)); - _res_constr.data[x] = _res_conv_49_conv; + for (size_t f = 0; f < _res_constr.datalen; f++) { + int64_t _res_conv_57 = _res_vals[f]; + void* _res_conv_57_ptr = untag_ptr(_res_conv_57); + CHECK_ACCESS(_res_conv_57_ptr); + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ _res_conv_57_conv = *(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)(_res_conv_57_ptr); + FREE(untag_ptr(_res_conv_57)); + _res_constr.data[f] = _res_conv_57_conv; } (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0); - CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free(_res_constr); + CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free(_res_constr); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InitFeaturesDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { @@ -25930,6 +28072,225 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTypeFeature return tag_ptr(ret_conv, true); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKOfferId o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = OfferId_clone(&o_conv); + LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ"); + *ret_conv = CResult_OfferIdDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ"); + *ret_conv = CResult_OfferIdDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_OfferIdDecodeErrorZ* o_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_OfferIdDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_OfferIdDecodeErrorZ _res_conv = *(LDKCResult_OfferIdDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_OfferIdDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_OfferIdDecodeErrorZ_clone_ptr(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ"); + *ret_conv = CResult_OfferIdDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_OfferIdDecodeErrorZ* arg_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_OfferIdDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_OfferIdDecodeErrorZ* orig_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(orig); + LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ"); + *ret_conv = CResult_OfferIdDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz) { + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = CResult_NoneBolt12SemanticErrorZ_ok(); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e); + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = CResult_NoneBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_NoneBolt12SemanticErrorZ* o_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_NoneBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_NoneBolt12SemanticErrorZ _res_conv = *(LDKCResult_NoneBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_NoneBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_NoneBolt12SemanticErrorZ_clone_ptr(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_NoneBolt12SemanticErrorZ* arg_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_NoneBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_NoneBolt12SemanticErrorZ* orig_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKOffer o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = Offer_clone(&o_conv); + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e); + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_OfferBolt12SemanticErrorZ* o_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_OfferBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_OfferBolt12SemanticErrorZ _res_conv = *(LDKCResult_OfferBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_OfferBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_OfferBolt12SemanticErrorZ_clone_ptr(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_OfferBolt12SemanticErrorZ* arg_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_OfferBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_OfferBolt12SemanticErrorZ* orig_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKInvoiceRequestWithDerivedPayerIdBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e); + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(_res_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKInvoiceRequestWithExplicitPayerIdBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e); + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(_res_conv); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12ParseErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { LDKOffer o_conv; o_conv.inner = untag_ptr(o); @@ -25985,55 +28346,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12ParseEr return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) { - LDKPublicKey o_ref; - CHECK((*env)->GetArrayLength(env, o) == 33); - (*env)->GetByteArrayRegion(env, o, 0, 33, o_ref.compressed_form); - LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); - *ret_conv = CResult_PublicKeySecp256k1ErrorZ_ok(o_ref); - return tag_ptr(ret_conv, true); -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { - LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e); - LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); - *ret_conv = CResult_PublicKeySecp256k1ErrorZ_err(e_conv); - return tag_ptr(ret_conv, true); -} - -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { - LDKCResult_PublicKeySecp256k1ErrorZ* o_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(o); - jboolean ret_conv = CResult_PublicKeySecp256k1ErrorZ_is_ok(o_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKCResult_PublicKeySecp256k1ErrorZ _res_conv = *(LDKCResult_PublicKeySecp256k1ErrorZ*)(_res_ptr); - FREE(untag_ptr(_res)); - CResult_PublicKeySecp256k1ErrorZ_free(_res_conv); -} - -static inline uint64_t CResult_PublicKeySecp256k1ErrorZ_clone_ptr(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR arg) { - LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); - *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(arg); - return tag_ptr(ret_conv, true); -} -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { - LDKCResult_PublicKeySecp256k1ErrorZ* arg_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(arg); - int64_t ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone_ptr(arg_conv); - return ret_conv; -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { - LDKCResult_PublicKeySecp256k1ErrorZ* orig_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(orig); - LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); - *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(orig_conv); - return tag_ptr(ret_conv, true); -} - JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { LDKNodeId o_conv; o_conv.inner = untag_ptr(o); @@ -26088,6 +28400,55 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ return tag_ptr(ret_conv, true); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) { + LDKPublicKey o_ref; + CHECK((*env)->GetArrayLength(env, o) == 33); + (*env)->GetByteArrayRegion(env, o, 0, 33, o_ref.compressed_form); + LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); + *ret_conv = CResult_PublicKeySecp256k1ErrorZ_ok(o_ref); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { + LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e); + LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); + *ret_conv = CResult_PublicKeySecp256k1ErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_PublicKeySecp256k1ErrorZ* o_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_PublicKeySecp256k1ErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_PublicKeySecp256k1ErrorZ _res_conv = *(LDKCResult_PublicKeySecp256k1ErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_PublicKeySecp256k1ErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_PublicKeySecp256k1ErrorZ_clone_ptr(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR arg) { + LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); + *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_PublicKeySecp256k1ErrorZ* arg_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_PublicKeySecp256k1ErrorZ* orig_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(orig); + LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); + *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1NetworkUpdateZ_1some(JNIEnv *env, jclass clz, int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -26873,6 +29234,34 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1CVec_1SocketAddres return ret_ref; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_u64ShortChannelIdErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u64ShortChannelIdErrorZ), "LDKCResult_u64ShortChannelIdErrorZ"); + *ret_conv = CResult_u64ShortChannelIdErrorZ_ok(o); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { + LDKShortChannelIdError e_conv = LDKShortChannelIdError_from_java(env, e); + LDKCResult_u64ShortChannelIdErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u64ShortChannelIdErrorZ), "LDKCResult_u64ShortChannelIdErrorZ"); + *ret_conv = CResult_u64ShortChannelIdErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_u64ShortChannelIdErrorZ* o_conv = (LDKCResult_u64ShortChannelIdErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_u64ShortChannelIdErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_u64ShortChannelIdErrorZ _res_conv = *(LDKCResult_u64ShortChannelIdErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_u64ShortChannelIdErrorZ_free(_res_conv); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoInboundHTLCErrZ_1ok(JNIEnv *env, jclass clz, int64_t o) { LDKPendingHTLCInfo o_conv; o_conv.inner = untag_ptr(o); @@ -26889,8 +29278,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoInb e_conv.inner = untag_ptr(e); e_conv.is_owned = ptr_is_owned(e); CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv); - // WARNING: we need a move here but no clone is available for LDKInboundHTLCErr - + e_conv = InboundHTLCErr_clone(&e_conv); LDKCResult_PendingHTLCInfoInboundHTLCErrZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoInboundHTLCErrZ), "LDKCResult_PendingHTLCInfoInboundHTLCErrZ"); *ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_err(e_conv); return tag_ptr(ret_conv, true); @@ -26911,6 +29299,24 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoInboun CResult_PendingHTLCInfoInboundHTLCErrZ_free(_res_conv); } +static inline uint64_t CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR arg) { + LDKCResult_PendingHTLCInfoInboundHTLCErrZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoInboundHTLCErrZ), "LDKCResult_PendingHTLCInfoInboundHTLCErrZ"); + *ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoInboundHTLCErrZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_PendingHTLCInfoInboundHTLCErrZ* arg_conv = (LDKCResult_PendingHTLCInfoInboundHTLCErrZ*)untag_ptr(arg); + int64_t ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoInboundHTLCErrZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_PendingHTLCInfoInboundHTLCErrZ* orig_conv = (LDKCResult_PendingHTLCInfoInboundHTLCErrZ*)untag_ptr(orig); + LDKCResult_PendingHTLCInfoInboundHTLCErrZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoInboundHTLCErrZ), "LDKCResult_PendingHTLCInfoInboundHTLCErrZ"); + *ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1HTLCOutputInCommitmentZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) { LDKCVec_HTLCOutputInCommitmentZ _res_constr; _res_constr.datalen = (*env)->GetArrayLength(env, _res); @@ -27150,6 +29556,53 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1UtxoZNoneZ_1 return tag_ptr(ret_conv, true); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1some(JNIEnv *env, jclass clz, int64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKPaymentContext o_conv = *(LDKPaymentContext*)(o_ptr); + o_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(o)); + LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ"); + *ret_copy = COption_PaymentContextZ_some(o_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1none(JNIEnv *env, jclass clz) { + LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ"); + *ret_copy = COption_PaymentContextZ_none(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCOption_PaymentContextZ _res_conv = *(LDKCOption_PaymentContextZ*)(_res_ptr); + FREE(untag_ptr(_res)); + COption_PaymentContextZ_free(_res_conv); +} + +static inline uint64_t COption_PaymentContextZ_clone_ptr(LDKCOption_PaymentContextZ *NONNULL_PTR arg) { + LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ"); + *ret_copy = COption_PaymentContextZ_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCOption_PaymentContextZ* arg_conv = (LDKCOption_PaymentContextZ*)untag_ptr(arg); + int64_t ret_conv = COption_PaymentContextZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCOption_PaymentContextZ* orig_conv = (LDKCOption_PaymentContextZ*)untag_ptr(orig); + LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ"); + *ret_copy = COption_PaymentContextZ_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + static inline uint64_t C2Tuple_u64u16Z_clone_ptr(LDKC2Tuple_u64u16Z *NONNULL_PTR arg) { LDKC2Tuple_u64u16Z* ret_conv = MALLOC(sizeof(LDKC2Tuple_u64u16Z), "LDKC2Tuple_u64u16Z"); *ret_conv = C2Tuple_u64u16Z_clone(arg); @@ -27274,55 +29727,57 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1ChannelShutdownSta return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) { - LDKThirtyTwoBytes o_ref; - CHECK((*env)->GetArrayLength(env, o) == 32); - (*env)->GetByteArrayRegion(env, o, 0, 32, o_ref.data); - LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); - *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_ok(o_ref); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKChannelId o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = ChannelId_clone(&o_conv); + LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ"); + *ret_conv = CResult_ChannelIdAPIErrorZ_ok(o_conv); return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) { void* e_ptr = untag_ptr(e); CHECK_ACCESS(e_ptr); LDKAPIError e_conv = *(LDKAPIError*)(e_ptr); e_conv = APIError_clone((LDKAPIError*)untag_ptr(e)); - LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); - *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_err(e_conv); + LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ"); + *ret_conv = CResult_ChannelIdAPIErrorZ_err(e_conv); return tag_ptr(ret_conv, true); } -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* o_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(o); - jboolean ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_is_ok(o_conv); +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_ChannelIdAPIErrorZ* o_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_ChannelIdAPIErrorZ_is_ok(o_conv); return ret_conv; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { if (!ptr_is_owned(_res)) return; void* _res_ptr = untag_ptr(_res); CHECK_ACCESS(_res_ptr); - LDKCResult_ThirtyTwoBytesAPIErrorZ _res_conv = *(LDKCResult_ThirtyTwoBytesAPIErrorZ*)(_res_ptr); + LDKCResult_ChannelIdAPIErrorZ _res_conv = *(LDKCResult_ChannelIdAPIErrorZ*)(_res_ptr); FREE(untag_ptr(_res)); - CResult_ThirtyTwoBytesAPIErrorZ_free(_res_conv); + CResult_ChannelIdAPIErrorZ_free(_res_conv); } -static inline uint64_t CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR arg) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); - *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(arg); +static inline uint64_t CResult_ChannelIdAPIErrorZ_clone_ptr(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR arg) { + LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ"); + *ret_conv = CResult_ChannelIdAPIErrorZ_clone(arg); return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* arg_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(arg); - int64_t ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(arg_conv); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_ChannelIdAPIErrorZ* arg_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_ChannelIdAPIErrorZ_clone_ptr(arg_conv); return ret_conv; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* orig_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(orig); - LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); - *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(orig_conv); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_ChannelIdAPIErrorZ* orig_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(orig); + LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ"); + *ret_conv = CResult_ChannelIdAPIErrorZ_clone(orig_conv); return tag_ptr(ret_conv, true); } @@ -27719,63 +30174,136 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1C2Tuple_1Thi return tag_ptr(ret_conv, true); } -static inline uint64_t C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR arg) { - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKC2Tuple_ThirtyTwoBytesPublicKeyZ"); - *ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(arg); +static inline uint64_t C2Tuple_ChannelIdPublicKeyZ_clone_ptr(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR arg) { + LDKC2Tuple_ChannelIdPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKC2Tuple_ChannelIdPublicKeyZ"); + *ret_conv = C2Tuple_ChannelIdPublicKeyZ_clone(arg); return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* arg_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(arg); - int64_t ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(arg_conv); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKC2Tuple_ChannelIdPublicKeyZ* arg_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(arg); + int64_t ret_conv = C2Tuple_ChannelIdPublicKeyZ_clone_ptr(arg_conv); return ret_conv; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* orig_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(orig); - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKC2Tuple_ThirtyTwoBytesPublicKeyZ"); - *ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(orig_conv); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKC2Tuple_ChannelIdPublicKeyZ* orig_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(orig); + LDKC2Tuple_ChannelIdPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKC2Tuple_ChannelIdPublicKeyZ"); + *ret_conv = C2Tuple_ChannelIdPublicKeyZ_clone(orig_conv); return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int8_tArray b) { - LDKThirtyTwoBytes a_ref; - CHECK((*env)->GetArrayLength(env, a) == 32); - (*env)->GetByteArrayRegion(env, a, 0, 32, a_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1new(JNIEnv *env, jclass clz, int64_t a, int8_tArray b) { + LDKChannelId a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = ChannelId_clone(&a_conv); LDKPublicKey b_ref; CHECK((*env)->GetArrayLength(env, b) == 33); (*env)->GetByteArrayRegion(env, b, 0, 33, b_ref.compressed_form); - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKC2Tuple_ThirtyTwoBytesPublicKeyZ"); - *ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_new(a_ref, b_ref); + LDKC2Tuple_ChannelIdPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKC2Tuple_ChannelIdPublicKeyZ"); + *ret_conv = C2Tuple_ChannelIdPublicKeyZ_new(a_conv, b_ref); return tag_ptr(ret_conv, true); } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1free(JNIEnv *env, jclass clz, int64_t _res) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1free(JNIEnv *env, jclass clz, int64_t _res) { if (!ptr_is_owned(_res)) return; void* _res_ptr = untag_ptr(_res); CHECK_ACCESS(_res_ptr); - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ _res_conv = *(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)(_res_ptr); + LDKC2Tuple_ChannelIdPublicKeyZ _res_conv = *(LDKC2Tuple_ChannelIdPublicKeyZ*)(_res_ptr); FREE(untag_ptr(_res)); - C2Tuple_ThirtyTwoBytesPublicKeyZ_free(_res_conv); + C2Tuple_ChannelIdPublicKeyZ_free(_res_conv); } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1ThirtyTwoBytesPublicKeyZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) { - LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ _res_constr; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1ChannelIdPublicKeyZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) { + LDKCVec_C2Tuple_ChannelIdPublicKeyZZ _res_constr; _res_constr.datalen = (*env)->GetArrayLength(env, _res); if (_res_constr.datalen > 0) - _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ Elements"); + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKCVec_C2Tuple_ChannelIdPublicKeyZZ Elements"); else _res_constr.data = NULL; int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL); - for (size_t j = 0; j < _res_constr.datalen; j++) { - int64_t _res_conv_35 = _res_vals[j]; - void* _res_conv_35_ptr = untag_ptr(_res_conv_35); - CHECK_ACCESS(_res_conv_35_ptr); - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ _res_conv_35_conv = *(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)(_res_conv_35_ptr); - FREE(untag_ptr(_res_conv_35)); - _res_constr.data[j] = _res_conv_35_conv; + for (size_t e = 0; e < _res_constr.datalen; e++) { + int64_t _res_conv_30 = _res_vals[e]; + void* _res_conv_30_ptr = untag_ptr(_res_conv_30); + CHECK_ACCESS(_res_conv_30_ptr); + LDKC2Tuple_ChannelIdPublicKeyZ _res_conv_30_conv = *(LDKC2Tuple_ChannelIdPublicKeyZ*)(_res_conv_30_ptr); + FREE(untag_ptr(_res_conv_30)); + _res_constr.data[e] = _res_conv_30_conv; + } + (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0); + CVec_C2Tuple_ChannelIdPublicKeyZZ_free(_res_constr); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelIdZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) { + LDKCVec_ChannelIdZ _res_constr; + _res_constr.datalen = (*env)->GetArrayLength(env, _res); + if (_res_constr.datalen > 0) + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKChannelId), "LDKCVec_ChannelIdZ Elements"); + else + _res_constr.data = NULL; + int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL); + for (size_t l = 0; l < _res_constr.datalen; l++) { + int64_t _res_conv_11 = _res_vals[l]; + LDKChannelId _res_conv_11_conv; + _res_conv_11_conv.inner = untag_ptr(_res_conv_11); + _res_conv_11_conv.is_owned = ptr_is_owned(_res_conv_11); + CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_11_conv); + _res_constr.data[l] = _res_conv_11_conv; } (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0); - CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_free(_res_constr); + CVec_ChannelIdZ_free(_res_constr); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKOfferWithDerivedMetadataBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = OfferWithDerivedMetadataBuilder_clone(&o_conv); + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e); + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* arg_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* orig_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1StrZ_1some(JNIEnv *env, jclass clz, jstring o) { @@ -27822,52 +30350,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1StrZ_1clone(JNIEnv return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz) { - LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); - *ret_conv = CResult_NoneBolt12SemanticErrorZ_ok(); - return tag_ptr(ret_conv, true); -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { - LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e); - LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); - *ret_conv = CResult_NoneBolt12SemanticErrorZ_err(e_conv); - return tag_ptr(ret_conv, true); -} - -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { - LDKCResult_NoneBolt12SemanticErrorZ* o_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(o); - jboolean ret_conv = CResult_NoneBolt12SemanticErrorZ_is_ok(o_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKCResult_NoneBolt12SemanticErrorZ _res_conv = *(LDKCResult_NoneBolt12SemanticErrorZ*)(_res_ptr); - FREE(untag_ptr(_res)); - CResult_NoneBolt12SemanticErrorZ_free(_res_conv); -} - -static inline uint64_t CResult_NoneBolt12SemanticErrorZ_clone_ptr(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR arg) { - LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); - *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(arg); - return tag_ptr(ret_conv, true); -} -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { - LDKCResult_NoneBolt12SemanticErrorZ* arg_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(arg); - int64_t ret_conv = CResult_NoneBolt12SemanticErrorZ_clone_ptr(arg_conv); - return ret_conv; -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { - LDKCResult_NoneBolt12SemanticErrorZ* orig_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(orig); - LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); - *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(orig_conv); - return tag_ptr(ret_conv, true); -} - JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -27917,6 +30399,58 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwo return tag_ptr(ret_conv, true); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) { + LDKThirtyTwoBytes o_ref; + CHECK((*env)->GetArrayLength(env, o) == 32); + (*env)->GetByteArrayRegion(env, o, 0, 32, o_ref.data); + LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); + *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_ok(o_ref); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKAPIError e_conv = *(LDKAPIError*)(e_ptr); + e_conv = APIError_clone((LDKAPIError*)untag_ptr(e)); + LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); + *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* o_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_ThirtyTwoBytesAPIErrorZ _res_conv = *(LDKCResult_ThirtyTwoBytesAPIErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_ThirtyTwoBytesAPIErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR arg) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); + *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* arg_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* orig_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(orig); + LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); + *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1OffersMessageZ_1some(JNIEnv *env, jclass clz, int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -29239,25 +31773,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1CommitmentTransactionZ_1 CVec_CommitmentTransactionZ_free(_res_constr); } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TransactionZ_1free(JNIEnv *env, jclass clz, jobjectArray _res) { - LDKCVec_TransactionZ _res_constr; - _res_constr.datalen = (*env)->GetArrayLength(env, _res); - if (_res_constr.datalen > 0) - _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKTransaction), "LDKCVec_TransactionZ Elements"); - else - _res_constr.data = NULL; - for (size_t i = 0; i < _res_constr.datalen; i++) { - int8_tArray _res_conv_8 = (*env)->GetObjectArrayElement(env, _res, i); - LDKTransaction _res_conv_8_ref; - _res_conv_8_ref.datalen = (*env)->GetArrayLength(env, _res_conv_8); - _res_conv_8_ref.data = MALLOC(_res_conv_8_ref.datalen, "LDKTransaction Bytes"); - (*env)->GetByteArrayRegion(env, _res_conv_8, 0, _res_conv_8_ref.datalen, _res_conv_8_ref.data); - _res_conv_8_ref.data_is_owned = true; - _res_constr.data[i] = _res_conv_8_ref; - } - CVec_TransactionZ_free(_res_constr); -} - static inline uint64_t C2Tuple_u32TxOutZ_clone_ptr(LDKC2Tuple_u32TxOutZ *NONNULL_PTR arg) { LDKC2Tuple_u32TxOutZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ"); *ret_conv = C2Tuple_u32TxOutZ_clone(arg); @@ -29958,64 +32473,24 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1SocketAddressZ_1cl return ret_ref; } -static inline uint64_t C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR arg) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ"); - *ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(arg); - return tag_ptr(ret_conv, true); -} -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* arg_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(arg); - int64_t ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(arg_conv); - return ret_conv; -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* orig_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(orig); - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ"); - *ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(orig_conv); - return tag_ptr(ret_conv, true); -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_t b) { - LDKPublicKey a_ref; - CHECK((*env)->GetArrayLength(env, a) == 33); - (*env)->GetByteArrayRegion(env, a, 0, 33, a_ref.compressed_form); - void* b_ptr = untag_ptr(b); - CHECK_ACCESS(b_ptr); - LDKCOption_SocketAddressZ b_conv = *(LDKCOption_SocketAddressZ*)(b_ptr); - b_conv = COption_SocketAddressZ_clone((LDKCOption_SocketAddressZ*)untag_ptr(b)); - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ"); - *ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_new(a_ref, b_conv); - return tag_ptr(ret_conv, true); -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1free(JNIEnv *env, jclass clz, int64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ _res_conv = *(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)(_res_ptr); - FREE(untag_ptr(_res)); - C2Tuple_PublicKeyCOption_SocketAddressZZ_free(_res_conv); -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1PublicKeyCOption_1SocketAddressZZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) { - LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ _res_constr; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1PeerDetailsZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) { + LDKCVec_PeerDetailsZ _res_constr; _res_constr.datalen = (*env)->GetArrayLength(env, _res); if (_res_constr.datalen > 0) - _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ Elements"); + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKPeerDetails), "LDKCVec_PeerDetailsZ Elements"); else _res_constr.data = NULL; int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL); - for (size_t r = 0; r < _res_constr.datalen; r++) { - int64_t _res_conv_43 = _res_vals[r]; - void* _res_conv_43_ptr = untag_ptr(_res_conv_43); - CHECK_ACCESS(_res_conv_43_ptr); - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ _res_conv_43_conv = *(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)(_res_conv_43_ptr); - FREE(untag_ptr(_res_conv_43)); - _res_constr.data[r] = _res_conv_43_conv; + for (size_t n = 0; n < _res_constr.datalen; n++) { + int64_t _res_conv_13 = _res_vals[n]; + LDKPeerDetails _res_conv_13_conv; + _res_conv_13_conv.inner = untag_ptr(_res_conv_13); + _res_conv_13_conv.is_owned = ptr_is_owned(_res_conv_13); + CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_13_conv); + _res_constr.data[n] = _res_conv_13_conv; } (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0); - CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_free(_res_constr); + CVec_PeerDetailsZ_free(_res_constr); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) { @@ -30457,6 +32932,108 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwo return tag_ptr(ret_conv, true); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKUnsignedInvoiceRequest o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = UnsignedInvoiceRequest_clone(&o_conv); + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e); + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* o_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ _res_conv = *(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* arg_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* orig_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKInvoiceRequest o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = InvoiceRequest_clone(&o_conv); + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e); + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceRequestBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceRequestBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* arg_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* orig_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1SecretKeyZ_1some(JNIEnv *env, jclass clz, int8_tArray o) { LDKSecretKey o_ref; CHECK((*env)->GetArrayLength(env, o) == 32); @@ -30503,6 +33080,40 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1SecretKeyZ_1clone( return ret_ref; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKInvoiceWithExplicitSigningPubkeyBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e); + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free(_res_conv); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1VerifiedInvoiceRequestNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) { LDKVerifiedInvoiceRequest o_conv; o_conv.inner = untag_ptr(o); @@ -30553,6 +33164,94 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1VerifiedInvoiceReq return tag_ptr(ret_conv, true); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKInvoiceWithDerivedSigningPubkeyBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e); + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(_res_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKInvoiceRequestFields o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = InvoiceRequestFields_clone(&o_conv); + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ"); + *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ"); + *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* o_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceRequestFieldsDecodeErrorZ _res_conv = *(LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceRequestFieldsDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ"); + *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* arg_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* orig_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(orig); + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ"); + *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_COption_1NoneZ_1some(JNIEnv *env, jclass clz) { jclass ret_conv = LDKCOption_NoneZ_to_java(env, COption_NoneZ_some()); return ret_conv; @@ -30587,6 +33286,52 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1WitnessZ_1free(JNIEnv *e CVec_WitnessZ_free(_res_constr); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1some(JNIEnv *env, jclass clz, int8_tArray o) { + LDKECDSASignature o_ref; + CHECK((*env)->GetArrayLength(env, o) == 64); + (*env)->GetByteArrayRegion(env, o, 0, 64, o_ref.compact_form); + LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ"); + *ret_copy = COption_ECDSASignatureZ_some(o_ref); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1none(JNIEnv *env, jclass clz) { + LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ"); + *ret_copy = COption_ECDSASignatureZ_none(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCOption_ECDSASignatureZ _res_conv = *(LDKCOption_ECDSASignatureZ*)(_res_ptr); + FREE(untag_ptr(_res)); + COption_ECDSASignatureZ_free(_res_conv); +} + +static inline uint64_t COption_ECDSASignatureZ_clone_ptr(LDKCOption_ECDSASignatureZ *NONNULL_PTR arg) { + LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ"); + *ret_copy = COption_ECDSASignatureZ_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCOption_ECDSASignatureZ* arg_conv = (LDKCOption_ECDSASignatureZ*)untag_ptr(arg); + int64_t ret_conv = COption_ECDSASignatureZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCOption_ECDSASignatureZ* orig_conv = (LDKCOption_ECDSASignatureZ*)untag_ptr(orig); + LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ"); + *ret_copy = COption_ECDSASignatureZ_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1i64Z_1some(JNIEnv *env, jclass clz, int64_t o) { LDKCOption_i64Z *ret_copy = MALLOC(sizeof(LDKCOption_i64Z), "LDKCOption_i64Z"); *ret_copy = COption_i64Z_some(o); @@ -34500,6 +37245,25 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownScriptInva return tag_ptr(ret_conv, true); } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TransactionZ_1free(JNIEnv *env, jclass clz, jobjectArray _res) { + LDKCVec_TransactionZ _res_constr; + _res_constr.datalen = (*env)->GetArrayLength(env, _res); + if (_res_constr.datalen > 0) + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKTransaction), "LDKCVec_TransactionZ Elements"); + else + _res_constr.data = NULL; + for (size_t i = 0; i < _res_constr.datalen; i++) { + int8_tArray _res_conv_8 = (*env)->GetObjectArrayElement(env, _res, i); + LDKTransaction _res_conv_8_ref; + _res_conv_8_ref.datalen = (*env)->GetArrayLength(env, _res_conv_8); + _res_conv_8_ref.data = MALLOC(_res_conv_8_ref.datalen, "LDKTransaction Bytes"); + (*env)->GetByteArrayRegion(env, _res_conv_8, 0, _res_conv_8_ref.datalen, _res_conv_8_ref.data); + _res_conv_8_ref.data_is_owned = true; + _res_constr.data[i] = _res_conv_8_ref; + } + CVec_TransactionZ_free(_res_constr); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentPurposeDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -36012,6 +38776,60 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UntrustedStringDec return tag_ptr(ret_conv, true); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKChannelId o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = ChannelId_clone(&o_conv); + LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ"); + *ret_conv = CResult_ChannelIdDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ"); + *ret_conv = CResult_ChannelIdDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_ChannelIdDecodeErrorZ* o_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_ChannelIdDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_ChannelIdDecodeErrorZ _res_conv = *(LDKCResult_ChannelIdDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_ChannelIdDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_ChannelIdDecodeErrorZ_clone_ptr(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ"); + *ret_conv = CResult_ChannelIdDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_ChannelIdDecodeErrorZ* arg_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_ChannelIdDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_ChannelIdDecodeErrorZ* orig_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(orig); + LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ"); + *ret_conv = CResult_ChannelIdDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + static inline uint64_t C2Tuple__u832u16Z_clone_ptr(LDKC2Tuple__u832u16Z *NONNULL_PTR arg) { LDKC2Tuple__u832u16Z* ret_conv = MALLOC(sizeof(LDKC2Tuple__u832u16Z), "LDKC2Tuple__u832u16Z"); *ret_conv = C2Tuple__u832u16Z_clone(arg); @@ -36156,6 +38974,268 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentConstraints return tag_ptr(ret_conv, true); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKPaymentContext o_conv = *(LDKPaymentContext*)(o_ptr); + o_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(o)); + LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ"); + *ret_conv = CResult_PaymentContextDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ"); + *ret_conv = CResult_PaymentContextDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_PaymentContextDecodeErrorZ* o_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_PaymentContextDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_PaymentContextDecodeErrorZ _res_conv = *(LDKCResult_PaymentContextDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_PaymentContextDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_PaymentContextDecodeErrorZ_clone_ptr(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ"); + *ret_conv = CResult_PaymentContextDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_PaymentContextDecodeErrorZ* arg_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_PaymentContextDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_PaymentContextDecodeErrorZ* orig_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(orig); + LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ"); + *ret_conv = CResult_PaymentContextDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKUnknownPaymentContext o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = UnknownPaymentContext_clone(&o_conv); + LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ"); + *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ"); + *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* o_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_UnknownPaymentContextDecodeErrorZ _res_conv = *(LDKCResult_UnknownPaymentContextDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_UnknownPaymentContextDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ"); + *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* arg_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* orig_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(orig); + LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ"); + *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKBolt12OfferContext o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = Bolt12OfferContext_clone(&o_conv); + LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* o_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_Bolt12OfferContextDecodeErrorZ _res_conv = *(LDKCResult_Bolt12OfferContextDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_Bolt12OfferContextDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* arg_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* orig_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(orig); + LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKBolt12RefundContext o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = Bolt12RefundContext_clone(&o_conv); + LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* o_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_Bolt12RefundContextDecodeErrorZ _res_conv = *(LDKCResult_Bolt12RefundContextDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_Bolt12RefundContextDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* arg_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* orig_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(orig); + LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1ok(JNIEnv *env, jclass clz, jstring o) { + LDKStr o_conv = java_to_owned_str(env, o); + LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ"); + *ret_conv = CResult_StrSecp256k1ErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { + LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e); + LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ"); + *ret_conv = CResult_StrSecp256k1ErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_StrSecp256k1ErrorZ* o_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_StrSecp256k1ErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_StrSecp256k1ErrorZ _res_conv = *(LDKCResult_StrSecp256k1ErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_StrSecp256k1ErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_StrSecp256k1ErrorZ_clone_ptr(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR arg) { + LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ"); + *ret_conv = CResult_StrSecp256k1ErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_StrSecp256k1ErrorZ* arg_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_StrSecp256k1ErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_StrSecp256k1ErrorZ* orig_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(orig); + LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ"); + *ret_conv = CResult_StrSecp256k1ErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + static inline uint64_t C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR arg) { LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ"); *ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(arg); @@ -36251,53 +39331,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwo return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1ok(JNIEnv *env, jclass clz, jstring o) { - LDKStr o_conv = java_to_owned_str(env, o); - LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ"); - *ret_conv = CResult_StrSecp256k1ErrorZ_ok(o_conv); - return tag_ptr(ret_conv, true); -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { - LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e); - LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ"); - *ret_conv = CResult_StrSecp256k1ErrorZ_err(e_conv); - return tag_ptr(ret_conv, true); -} - -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { - LDKCResult_StrSecp256k1ErrorZ* o_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(o); - jboolean ret_conv = CResult_StrSecp256k1ErrorZ_is_ok(o_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKCResult_StrSecp256k1ErrorZ _res_conv = *(LDKCResult_StrSecp256k1ErrorZ*)(_res_ptr); - FREE(untag_ptr(_res)); - CResult_StrSecp256k1ErrorZ_free(_res_conv); -} - -static inline uint64_t CResult_StrSecp256k1ErrorZ_clone_ptr(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR arg) { - LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ"); - *ret_conv = CResult_StrSecp256k1ErrorZ_clone(arg); - return tag_ptr(ret_conv, true); -} -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { - LDKCResult_StrSecp256k1ErrorZ* arg_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(arg); - int64_t ret_conv = CResult_StrSecp256k1ErrorZ_clone_ptr(arg_conv); - return ret_conv; -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { - LDKCResult_StrSecp256k1ErrorZ* orig_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(orig); - LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ"); - *ret_conv = CResult_StrSecp256k1ErrorZ_clone(orig_conv); - return tag_ptr(ret_conv, true); -} - JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutUtxoLookupErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -36428,6 +39461,24 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKeyOni CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_free(_res_conv); } +static inline uint64_t CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ *NONNULL_PTR arg) { + LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ"); + *ret_conv = CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKeyOnionMessageCOption_1CVec_1SocketAddressZZZSendErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* arg_conv = (LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKeyOnionMessageCOption_1CVec_1SocketAddressZZZSendErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* orig_conv = (LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ*)untag_ptr(orig); + LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ"); + *ret_conv = CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PeeledOnionNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -36459,6 +39510,24 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PeeledOnionNoneZ_1fre CResult_PeeledOnionNoneZ_free(_res_conv); } +static inline uint64_t CResult_PeeledOnionNoneZ_clone_ptr(LDKCResult_PeeledOnionNoneZ *NONNULL_PTR arg) { + LDKCResult_PeeledOnionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PeeledOnionNoneZ), "LDKCResult_PeeledOnionNoneZ"); + *ret_conv = CResult_PeeledOnionNoneZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PeeledOnionNoneZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_PeeledOnionNoneZ* arg_conv = (LDKCResult_PeeledOnionNoneZ*)untag_ptr(arg); + int64_t ret_conv = CResult_PeeledOnionNoneZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PeeledOnionNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_PeeledOnionNoneZ* orig_conv = (LDKCResult_PeeledOnionNoneZ*)untag_ptr(orig); + LDKCResult_PeeledOnionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PeeledOnionNoneZ), "LDKCResult_PeeledOnionNoneZ"); + *ret_conv = CResult_PeeledOnionNoneZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SendSuccessSendErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -36494,6 +39563,24 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SendSuccessSendErrorZ CResult_SendSuccessSendErrorZ_free(_res_conv); } +static inline uint64_t CResult_SendSuccessSendErrorZ_clone_ptr(LDKCResult_SendSuccessSendErrorZ *NONNULL_PTR arg) { + LDKCResult_SendSuccessSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SendSuccessSendErrorZ), "LDKCResult_SendSuccessSendErrorZ"); + *ret_conv = CResult_SendSuccessSendErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SendSuccessSendErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_SendSuccessSendErrorZ* arg_conv = (LDKCResult_SendSuccessSendErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_SendSuccessSendErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SendSuccessSendErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_SendSuccessSendErrorZ* orig_conv = (LDKCResult_SendSuccessSendErrorZ*)untag_ptr(orig); + LDKCResult_SendSuccessSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SendSuccessSendErrorZ), "LDKCResult_SendSuccessSendErrorZ"); + *ret_conv = CResult_SendSuccessSendErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BlindedPathNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) { LDKBlindedPath o_conv; o_conv.inner = untag_ptr(o); @@ -36775,6 +39862,261 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceErrorDecode return tag_ptr(ret_conv, true); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKTrackedSpendableOutput o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = TrackedSpendableOutput_clone(&o_conv); + LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ"); + *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ"); + *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* o_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_TrackedSpendableOutputDecodeErrorZ _res_conv = *(LDKCResult_TrackedSpendableOutputDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_TrackedSpendableOutputDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ"); + *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* arg_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* orig_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(orig); + LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ"); + *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKOutputSpendStatus o_conv = *(LDKOutputSpendStatus*)(o_ptr); + o_conv = OutputSpendStatus_clone((LDKOutputSpendStatus*)untag_ptr(o)); + LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ"); + *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ"); + *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_OutputSpendStatusDecodeErrorZ* o_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_OutputSpendStatusDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_OutputSpendStatusDecodeErrorZ _res_conv = *(LDKCResult_OutputSpendStatusDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_OutputSpendStatusDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ"); + *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_OutputSpendStatusDecodeErrorZ* arg_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_OutputSpendStatusDecodeErrorZ* orig_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(orig); + LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ"); + *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1some(JNIEnv *env, jclass clz, int64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKFilter o_conv = *(LDKFilter*)(o_ptr); + if (o_conv.free == LDKFilter_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFilter_JCalls_cloned(&o_conv); + } + LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ"); + *ret_copy = COption_FilterZ_some(o_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1none(JNIEnv *env, jclass clz) { + LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ"); + *ret_copy = COption_FilterZ_none(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCOption_FilterZ _res_conv = *(LDKCOption_FilterZ*)(_res_ptr); + FREE(untag_ptr(_res)); + COption_FilterZ_free(_res_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TrackedSpendableOutputZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) { + LDKCVec_TrackedSpendableOutputZ _res_constr; + _res_constr.datalen = (*env)->GetArrayLength(env, _res); + if (_res_constr.datalen > 0) + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKTrackedSpendableOutput), "LDKCVec_TrackedSpendableOutputZ Elements"); + else + _res_constr.data = NULL; + int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL); + for (size_t y = 0; y < _res_constr.datalen; y++) { + int64_t _res_conv_24 = _res_vals[y]; + LDKTrackedSpendableOutput _res_conv_24_conv; + _res_conv_24_conv.inner = untag_ptr(_res_conv_24); + _res_conv_24_conv.is_owned = ptr_is_owned(_res_conv_24); + CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_24_conv); + _res_constr.data[y] = _res_conv_24_conv; + } + (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0); + CVec_TrackedSpendableOutputZ_free(_res_constr); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKOutputSweeper o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + // WARNING: we need a move here but no clone is available for LDKOutputSweeper + + LDKCResult_OutputSweeperDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSweeperDecodeErrorZ), "LDKCResult_OutputSweeperDecodeErrorZ"); + *ret_conv = CResult_OutputSweeperDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_OutputSweeperDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSweeperDecodeErrorZ), "LDKCResult_OutputSweeperDecodeErrorZ"); + *ret_conv = CResult_OutputSweeperDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_OutputSweeperDecodeErrorZ* o_conv = (LDKCResult_OutputSweeperDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_OutputSweeperDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_OutputSweeperDecodeErrorZ _res_conv = *(LDKCResult_OutputSweeperDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_OutputSweeperDecodeErrorZ_free(_res_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKBestBlock a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = BestBlock_clone(&a_conv); + LDKOutputSweeper b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + // WARNING: we need a move here but no clone is available for LDKOutputSweeper + + LDKC2Tuple_BestBlockOutputSweeperZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BestBlockOutputSweeperZ), "LDKC2Tuple_BestBlockOutputSweeperZ"); + *ret_conv = C2Tuple_BestBlockOutputSweeperZ_new(a_conv, b_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKC2Tuple_BestBlockOutputSweeperZ _res_conv = *(LDKC2Tuple_BestBlockOutputSweeperZ*)(_res_ptr); + FREE(untag_ptr(_res)); + C2Tuple_BestBlockOutputSweeperZ_free(_res_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKC2Tuple_BestBlockOutputSweeperZ o_conv = *(LDKC2Tuple_BestBlockOutputSweeperZ*)(o_ptr); + // WARNING: we may need a move here but no clone is available for LDKC2Tuple_BestBlockOutputSweeperZ + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ), "LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ"); + *ret_conv = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ), "LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ"); + *ret_conv = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* o_conv = (LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ _res_conv = *(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free(_res_conv); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { LDKDelayedPaymentBasepoint o_conv; o_conv.inner = untag_ptr(o); @@ -37099,36 +40441,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecod return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1some(JNIEnv *env, jclass clz, int64_t o) { - void* o_ptr = untag_ptr(o); - CHECK_ACCESS(o_ptr); - LDKFilter o_conv = *(LDKFilter*)(o_ptr); - if (o_conv.free == LDKFilter_JCalls_free) { - // If this_arg is a JCalls struct, then we need to increment the refcnt in it. - LDKFilter_JCalls_cloned(&o_conv); - } - LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ"); - *ret_copy = COption_FilterZ_some(o_conv); - int64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1none(JNIEnv *env, jclass clz) { - LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ"); - *ret_copy = COption_FilterZ_none(); - int64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1free(JNIEnv *env, jclass clz, int64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKCOption_FilterZ _res_conv = *(LDKCOption_FilterZ*)(_res_ptr); - FREE(untag_ptr(_res)); - COption_FilterZ_free(_res_conv); -} - JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) { LDKLockedChannelMonitor o_conv; o_conv.inner = untag_ptr(o); @@ -37162,24 +40474,67 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorN CResult_LockedChannelMonitorNoneZ_free(_res_conv); } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1OutPointZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) { - LDKCVec_OutPointZ _res_constr; +static inline uint64_t C2Tuple_OutPointChannelIdZ_clone_ptr(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR arg) { + LDKC2Tuple_OutPointChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ"); + *ret_conv = C2Tuple_OutPointChannelIdZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKC2Tuple_OutPointChannelIdZ* arg_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(arg); + int64_t ret_conv = C2Tuple_OutPointChannelIdZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKC2Tuple_OutPointChannelIdZ* orig_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(orig); + LDKC2Tuple_OutPointChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ"); + *ret_conv = C2Tuple_OutPointChannelIdZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKOutPoint a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = OutPoint_clone(&a_conv); + LDKChannelId b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv = ChannelId_clone(&b_conv); + LDKC2Tuple_OutPointChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ"); + *ret_conv = C2Tuple_OutPointChannelIdZ_new(a_conv, b_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKC2Tuple_OutPointChannelIdZ _res_conv = *(LDKC2Tuple_OutPointChannelIdZ*)(_res_ptr); + FREE(untag_ptr(_res)); + C2Tuple_OutPointChannelIdZ_free(_res_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1OutPointChannelIdZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) { + LDKCVec_C2Tuple_OutPointChannelIdZZ _res_constr; _res_constr.datalen = (*env)->GetArrayLength(env, _res); if (_res_constr.datalen > 0) - _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKOutPoint), "LDKCVec_OutPointZ Elements"); + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKCVec_C2Tuple_OutPointChannelIdZZ Elements"); else _res_constr.data = NULL; int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL); - for (size_t k = 0; k < _res_constr.datalen; k++) { - int64_t _res_conv_10 = _res_vals[k]; - LDKOutPoint _res_conv_10_conv; - _res_conv_10_conv.inner = untag_ptr(_res_conv_10); - _res_conv_10_conv.is_owned = ptr_is_owned(_res_conv_10); - CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_10_conv); - _res_constr.data[k] = _res_conv_10_conv; + for (size_t d = 0; d < _res_constr.datalen; d++) { + int64_t _res_conv_29 = _res_vals[d]; + void* _res_conv_29_ptr = untag_ptr(_res_conv_29); + CHECK_ACCESS(_res_conv_29_ptr); + LDKC2Tuple_OutPointChannelIdZ _res_conv_29_conv = *(LDKC2Tuple_OutPointChannelIdZ*)(_res_conv_29_ptr); + FREE(untag_ptr(_res_conv_29)); + _res_constr.data[d] = _res_conv_29_conv; } (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0); - CVec_OutPointZ_free(_res_constr); + CVec_C2Tuple_OutPointChannelIdZZ_free(_res_constr); } JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MonitorUpdateIdZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) { @@ -37679,6 +41034,19 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TransactionU16LenLimite return ret_arr; } +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TransactionU16LenLimited_1as_1transaction(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKTransactionU16LenLimited this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKTransaction ret_var = TransactionU16LenLimited_as_transaction(&this_arg_conv); + int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen); + (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data); + Transaction_free(ret_var); + return ret_arr; +} + JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TransactionU16LenLimited_1write(JNIEnv *env, jclass clz, int64_t obj) { LDKTransactionU16LenLimited obj_conv; obj_conv.inner = untag_ptr(obj); @@ -37911,6 +41279,55 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorUpdatingPersister_1a return tag_ptr(ret_ret, true); } +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKShortChannelIdError* orig_conv = (LDKShortChannelIdError*)untag_ptr(orig); + jclass ret_conv = LDKShortChannelIdError_to_java(env, ShortChannelIdError_clone(orig_conv)); + return ret_conv; +} + +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1block_1overflow(JNIEnv *env, jclass clz) { + jclass ret_conv = LDKShortChannelIdError_to_java(env, ShortChannelIdError_block_overflow()); + return ret_conv; +} + +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1tx_1index_1overflow(JNIEnv *env, jclass clz) { + jclass ret_conv = LDKShortChannelIdError_to_java(env, ShortChannelIdError_tx_index_overflow()); + return ret_conv; +} + +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1vout_1index_1overflow(JNIEnv *env, jclass clz) { + jclass ret_conv = LDKShortChannelIdError_to_java(env, ShortChannelIdError_vout_index_overflow()); + return ret_conv; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKShortChannelIdError* a_conv = (LDKShortChannelIdError*)untag_ptr(a); + LDKShortChannelIdError* b_conv = (LDKShortChannelIdError*)untag_ptr(b); + jboolean ret_conv = ShortChannelIdError_eq(a_conv, b_conv); + return ret_conv; +} + +JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_block_1from_1scid(JNIEnv *env, jclass clz, int64_t short_channel_id) { + int32_t ret_conv = block_from_scid(short_channel_id); + return ret_conv; +} + +JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_tx_1index_1from_1scid(JNIEnv *env, jclass clz, int64_t short_channel_id) { + int32_t ret_conv = tx_index_from_scid(short_channel_id); + return ret_conv; +} + +JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_vout_1from_1scid(JNIEnv *env, jclass clz, int64_t short_channel_id) { + int16_t ret_conv = vout_from_scid(short_channel_id); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_scid_1from_1parts(JNIEnv *env, jclass clz, int64_t block, int64_t tx_index, int64_t vout_index) { + LDKCResult_u64ShortChannelIdErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u64ShortChannelIdErrorZ), "LDKCResult_u64ShortChannelIdErrorZ"); + *ret_conv = scid_from_parts(block, tx_index, vout_index); + return tag_ptr(ret_conv, true); +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UntrustedString_1free(JNIEnv *env, jclass clz, int64_t this_obj) { LDKUntrustedString this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -38067,53 +41484,647 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PrintableString_1new(JNIEnv return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { - if (!ptr_is_owned(this_ptr)) return; - void* this_ptr_ptr = untag_ptr(this_ptr); - CHECK_ACCESS(this_ptr_ptr); - LDKFutureCallback this_ptr_conv = *(LDKFutureCallback*)(this_ptr_ptr); - FREE(untag_ptr(this_ptr)); - FutureCallback_free(this_ptr_conv); -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Future_1free(JNIEnv *env, jclass clz, int64_t this_obj) { - LDKFuture this_obj_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKTrackedSpendableOutput this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); this_obj_conv.is_owned = ptr_is_owned(this_obj); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - Future_free(this_obj_conv); + TrackedSpendableOutput_free(this_obj_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1get_1descriptor(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKSpendableOutputDescriptor *ret_copy = MALLOC(sizeof(LDKSpendableOutputDescriptor), "LDKSpendableOutputDescriptor"); + *ret_copy = TrackedSpendableOutput_get_descriptor(&this_ptr_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1set_1descriptor(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKSpendableOutputDescriptor val_conv = *(LDKSpendableOutputDescriptor*)(val_ptr); + val_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(val)); + TrackedSpendableOutput_set_descriptor(&this_ptr_conv, val_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelId ret_var = TrackedSpendableOutput_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TrackedSpendableOutput_set_channel_id(&this_ptr_conv, val_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1get_1status(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = TrackedSpendableOutput_get_status(&this_ptr_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1set_1status(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKOutputSpendStatus val_conv = *(LDKOutputSpendStatus*)(val_ptr); + val_conv = OutputSpendStatus_clone((LDKOutputSpendStatus*)untag_ptr(val)); + TrackedSpendableOutput_set_status(&this_ptr_conv, val_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1new(JNIEnv *env, jclass clz, int64_t descriptor_arg, int64_t channel_id_arg, int64_t status_arg) { + void* descriptor_arg_ptr = untag_ptr(descriptor_arg); + CHECK_ACCESS(descriptor_arg_ptr); + LDKSpendableOutputDescriptor descriptor_arg_conv = *(LDKSpendableOutputDescriptor*)(descriptor_arg_ptr); + descriptor_arg_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptor_arg)); + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + void* status_arg_ptr = untag_ptr(status_arg); + CHECK_ACCESS(status_arg_ptr); + LDKOutputSpendStatus status_arg_conv = *(LDKOutputSpendStatus*)(status_arg_ptr); + status_arg_conv = OutputSpendStatus_clone((LDKOutputSpendStatus*)untag_ptr(status_arg)); + LDKTrackedSpendableOutput ret_var = TrackedSpendableOutput_new(descriptor_arg_conv, channel_id_arg_conv, status_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -static inline uint64_t Future_clone_ptr(LDKFuture *NONNULL_PTR arg) { - LDKFuture ret_var = Future_clone(arg); +static inline uint64_t TrackedSpendableOutput_clone_ptr(LDKTrackedSpendableOutput *NONNULL_PTR arg) { + LDKTrackedSpendableOutput ret_var = TrackedSpendableOutput_clone(arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Future_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { - LDKFuture arg_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKTrackedSpendableOutput arg_conv; arg_conv.inner = untag_ptr(arg); arg_conv.is_owned = ptr_is_owned(arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); arg_conv.is_owned = false; - int64_t ret_conv = Future_clone_ptr(&arg_conv); + int64_t ret_conv = TrackedSpendableOutput_clone_ptr(&arg_conv); return ret_conv; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Future_1clone(JNIEnv *env, jclass clz, int64_t orig) { - LDKFuture orig_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKTrackedSpendableOutput orig_conv; orig_conv.inner = untag_ptr(orig); orig_conv.is_owned = ptr_is_owned(orig); CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); orig_conv.is_owned = false; - LDKFuture ret_var = Future_clone(&orig_conv); + LDKTrackedSpendableOutput ret_var = TrackedSpendableOutput_clone(&orig_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKTrackedSpendableOutput a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKTrackedSpendableOutput b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = TrackedSpendableOutput_eq(&a_conv, &b_conv); + return ret_conv; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1is_1spent_1in(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray tx) { + LDKTrackedSpendableOutput this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKTransaction tx_ref; + tx_ref.datalen = (*env)->GetArrayLength(env, tx); + tx_ref.data = MALLOC(tx_ref.datalen, "LDKTransaction Bytes"); + (*env)->GetByteArrayRegion(env, tx, 0, tx_ref.datalen, tx_ref.data); + tx_ref.data_is_owned = true; + jboolean ret_conv = TrackedSpendableOutput_is_spent_in(&this_arg_conv, tx_ref); + return ret_conv; +} + +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1write(JNIEnv *env, jclass clz, int64_t obj) { + LDKTrackedSpendableOutput obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = TrackedSpendableOutput_write(&obj_conv); + int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen); + (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1read(JNIEnv *env, jclass clz, int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = (*env)->GetArrayLength(env, ser); + ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL); + LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ"); + *ret_conv = TrackedSpendableOutput_read(ser_ref); + (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKOutputSpendStatus this_ptr_conv = *(LDKOutputSpendStatus*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + OutputSpendStatus_free(this_ptr_conv); +} + +static inline uint64_t OutputSpendStatus_clone_ptr(LDKOutputSpendStatus *NONNULL_PTR arg) { + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = OutputSpendStatus_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKOutputSpendStatus* arg_conv = (LDKOutputSpendStatus*)untag_ptr(arg); + int64_t ret_conv = OutputSpendStatus_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKOutputSpendStatus* orig_conv = (LDKOutputSpendStatus*)untag_ptr(orig); + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = OutputSpendStatus_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1pending_1initial_1broadcast(JNIEnv *env, jclass clz, int64_t delayed_until_height) { + void* delayed_until_height_ptr = untag_ptr(delayed_until_height); + CHECK_ACCESS(delayed_until_height_ptr); + LDKCOption_u32Z delayed_until_height_conv = *(LDKCOption_u32Z*)(delayed_until_height_ptr); + delayed_until_height_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(delayed_until_height)); + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = OutputSpendStatus_pending_initial_broadcast(delayed_until_height_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1pending_1first_1confirmation(JNIEnv *env, jclass clz, int8_tArray first_broadcast_hash, int32_t latest_broadcast_height, int8_tArray latest_spending_tx) { + LDKThirtyTwoBytes first_broadcast_hash_ref; + CHECK((*env)->GetArrayLength(env, first_broadcast_hash) == 32); + (*env)->GetByteArrayRegion(env, first_broadcast_hash, 0, 32, first_broadcast_hash_ref.data); + LDKTransaction latest_spending_tx_ref; + latest_spending_tx_ref.datalen = (*env)->GetArrayLength(env, latest_spending_tx); + latest_spending_tx_ref.data = MALLOC(latest_spending_tx_ref.datalen, "LDKTransaction Bytes"); + (*env)->GetByteArrayRegion(env, latest_spending_tx, 0, latest_spending_tx_ref.datalen, latest_spending_tx_ref.data); + latest_spending_tx_ref.data_is_owned = true; + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = OutputSpendStatus_pending_first_confirmation(first_broadcast_hash_ref, latest_broadcast_height, latest_spending_tx_ref); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1pending_1threshold_1confirmations(JNIEnv *env, jclass clz, int8_tArray first_broadcast_hash, int32_t latest_broadcast_height, int8_tArray latest_spending_tx, int32_t confirmation_height, int8_tArray confirmation_hash) { + LDKThirtyTwoBytes first_broadcast_hash_ref; + CHECK((*env)->GetArrayLength(env, first_broadcast_hash) == 32); + (*env)->GetByteArrayRegion(env, first_broadcast_hash, 0, 32, first_broadcast_hash_ref.data); + LDKTransaction latest_spending_tx_ref; + latest_spending_tx_ref.datalen = (*env)->GetArrayLength(env, latest_spending_tx); + latest_spending_tx_ref.data = MALLOC(latest_spending_tx_ref.datalen, "LDKTransaction Bytes"); + (*env)->GetByteArrayRegion(env, latest_spending_tx, 0, latest_spending_tx_ref.datalen, latest_spending_tx_ref.data); + latest_spending_tx_ref.data_is_owned = true; + LDKThirtyTwoBytes confirmation_hash_ref; + CHECK((*env)->GetArrayLength(env, confirmation_hash) == 32); + (*env)->GetByteArrayRegion(env, confirmation_hash, 0, 32, confirmation_hash_ref.data); + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = OutputSpendStatus_pending_threshold_confirmations(first_broadcast_hash_ref, latest_broadcast_height, latest_spending_tx_ref, confirmation_height, confirmation_hash_ref); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKOutputSpendStatus* a_conv = (LDKOutputSpendStatus*)untag_ptr(a); + LDKOutputSpendStatus* b_conv = (LDKOutputSpendStatus*)untag_ptr(b); + jboolean ret_conv = OutputSpendStatus_eq(a_conv, b_conv); + return ret_conv; +} + +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1write(JNIEnv *env, jclass clz, int64_t obj) { + LDKOutputSpendStatus* obj_conv = (LDKOutputSpendStatus*)untag_ptr(obj); + LDKCVec_u8Z ret_var = OutputSpendStatus_write(obj_conv); + int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen); + (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1read(JNIEnv *env, jclass clz, int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = (*env)->GetArrayLength(env, ser); + ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL); + LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ"); + *ret_conv = OutputSpendStatus_read(ser_ref); + (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKOutputSweeper this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + OutputSweeper_free(this_obj_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1new(JNIEnv *env, jclass clz, int64_t best_block, int64_t broadcaster, int64_t fee_estimator, int64_t chain_data_source, int64_t output_spender, int64_t change_destination_source, int64_t kv_store, int64_t logger) { + LDKBestBlock best_block_conv; + best_block_conv.inner = untag_ptr(best_block); + best_block_conv.is_owned = ptr_is_owned(best_block); + CHECK_INNER_FIELD_ACCESS_OR_NULL(best_block_conv); + best_block_conv = BestBlock_clone(&best_block_conv); + void* broadcaster_ptr = untag_ptr(broadcaster); + CHECK_ACCESS(broadcaster_ptr); + LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(broadcaster_ptr); + if (broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKBroadcasterInterface_JCalls_cloned(&broadcaster_conv); + } + void* fee_estimator_ptr = untag_ptr(fee_estimator); + CHECK_ACCESS(fee_estimator_ptr); + LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(fee_estimator_ptr); + if (fee_estimator_conv.free == LDKFeeEstimator_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFeeEstimator_JCalls_cloned(&fee_estimator_conv); + } + void* chain_data_source_ptr = untag_ptr(chain_data_source); + CHECK_ACCESS(chain_data_source_ptr); + LDKCOption_FilterZ chain_data_source_conv = *(LDKCOption_FilterZ*)(chain_data_source_ptr); + // WARNING: we may need a move here but no clone is available for LDKCOption_FilterZ + if (chain_data_source_conv.tag == LDKCOption_FilterZ_Some) { + // Manually implement clone for Java trait instances + if (chain_data_source_conv.some.free == LDKFilter_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFilter_JCalls_cloned(&chain_data_source_conv.some); + } + } + void* output_spender_ptr = untag_ptr(output_spender); + CHECK_ACCESS(output_spender_ptr); + LDKOutputSpender output_spender_conv = *(LDKOutputSpender*)(output_spender_ptr); + if (output_spender_conv.free == LDKOutputSpender_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKOutputSpender_JCalls_cloned(&output_spender_conv); + } + void* change_destination_source_ptr = untag_ptr(change_destination_source); + CHECK_ACCESS(change_destination_source_ptr); + LDKChangeDestinationSource change_destination_source_conv = *(LDKChangeDestinationSource*)(change_destination_source_ptr); + if (change_destination_source_conv.free == LDKChangeDestinationSource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKChangeDestinationSource_JCalls_cloned(&change_destination_source_conv); + } + void* kv_store_ptr = untag_ptr(kv_store); + CHECK_ACCESS(kv_store_ptr); + LDKKVStore kv_store_conv = *(LDKKVStore*)(kv_store_ptr); + if (kv_store_conv.free == LDKKVStore_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKKVStore_JCalls_cloned(&kv_store_conv); + } + void* logger_ptr = untag_ptr(logger); + CHECK_ACCESS(logger_ptr); + LDKLogger logger_conv = *(LDKLogger*)(logger_ptr); + if (logger_conv.free == LDKLogger_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKLogger_JCalls_cloned(&logger_conv); + } + LDKOutputSweeper ret_var = OutputSweeper_new(best_block_conv, broadcaster_conv, fee_estimator_conv, chain_data_source_conv, output_spender_conv, change_destination_source_conv, kv_store_conv, logger_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1track_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray output_descriptors, int64_t channel_id, jboolean exclude_static_outputs, int64_t delay_until_height) { + LDKOutputSweeper this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_SpendableOutputDescriptorZ output_descriptors_constr; + output_descriptors_constr.datalen = (*env)->GetArrayLength(env, output_descriptors); + if (output_descriptors_constr.datalen > 0) + output_descriptors_constr.data = MALLOC(output_descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements"); + else + output_descriptors_constr.data = NULL; + int64_t* output_descriptors_vals = (*env)->GetLongArrayElements (env, output_descriptors, NULL); + for (size_t b = 0; b < output_descriptors_constr.datalen; b++) { + int64_t output_descriptors_conv_27 = output_descriptors_vals[b]; + void* output_descriptors_conv_27_ptr = untag_ptr(output_descriptors_conv_27); + CHECK_ACCESS(output_descriptors_conv_27_ptr); + LDKSpendableOutputDescriptor output_descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(output_descriptors_conv_27_ptr); + output_descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(output_descriptors_conv_27)); + output_descriptors_constr.data[b] = output_descriptors_conv_27_conv; + } + (*env)->ReleaseLongArrayElements(env, output_descriptors, output_descriptors_vals, 0); + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); + void* delay_until_height_ptr = untag_ptr(delay_until_height); + CHECK_ACCESS(delay_until_height_ptr); + LDKCOption_u32Z delay_until_height_conv = *(LDKCOption_u32Z*)(delay_until_height_ptr); + delay_until_height_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(delay_until_height)); + LDKCResult_NoneNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneNoneZ), "LDKCResult_NoneNoneZ"); + *ret_conv = OutputSweeper_track_spendable_outputs(&this_arg_conv, output_descriptors_constr, channel_id_conv, exclude_static_outputs, delay_until_height_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1tracked_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKOutputSweeper this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_TrackedSpendableOutputZ ret_var = OutputSweeper_tracked_spendable_outputs(&this_arg_conv); + int64_tArray ret_arr = NULL; + ret_arr = (*env)->NewLongArray(env, ret_var.datalen); + int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL); + for (size_t y = 0; y < ret_var.datalen; y++) { + LDKTrackedSpendableOutput ret_conv_24_var = ret_var.data[y]; + int64_t ret_conv_24_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_24_var); + ret_conv_24_ref = tag_ptr(ret_conv_24_var.inner, ret_conv_24_var.is_owned); + ret_arr_ptr[y] = ret_conv_24_ref; + } + (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0); + FREE(ret_var.data); + return ret_arr; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1current_1best_1block(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKOutputSweeper this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKBestBlock ret_var = OutputSweeper_current_best_block(&this_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1as_1Listen(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKOutputSweeper this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKListen* ret_ret = MALLOC(sizeof(LDKListen), "LDKListen"); + *ret_ret = OutputSweeper_as_Listen(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1as_1Confirm(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKOutputSweeper this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKConfirm* ret_ret = MALLOC(sizeof(LDKConfirm), "LDKConfirm"); + *ret_ret = OutputSweeper_as_Confirm(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKSpendingDelay this_ptr_conv = *(LDKSpendingDelay*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + SpendingDelay_free(this_ptr_conv); +} + +static inline uint64_t SpendingDelay_clone_ptr(LDKSpendingDelay *NONNULL_PTR arg) { + LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay"); + *ret_copy = SpendingDelay_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKSpendingDelay* arg_conv = (LDKSpendingDelay*)untag_ptr(arg); + int64_t ret_conv = SpendingDelay_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKSpendingDelay* orig_conv = (LDKSpendingDelay*)untag_ptr(orig); + LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay"); + *ret_copy = SpendingDelay_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1relative(JNIEnv *env, jclass clz, int32_t num_blocks) { + LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay"); + *ret_copy = SpendingDelay_relative(num_blocks); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1absolute(JNIEnv *env, jclass clz, int32_t height) { + LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay"); + *ret_copy = SpendingDelay_absolute(height); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1read(JNIEnv *env, jclass clz, int8_tArray ser, int64_t arg_a, int64_t arg_b, int64_t arg_c, int64_t arg_d, int64_t arg_e, int64_t arg_f, int64_t arg_g) { + LDKu8slice ser_ref; + ser_ref.datalen = (*env)->GetArrayLength(env, ser); + ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL); + void* arg_a_ptr = untag_ptr(arg_a); + CHECK_ACCESS(arg_a_ptr); + LDKBroadcasterInterface arg_a_conv = *(LDKBroadcasterInterface*)(arg_a_ptr); + if (arg_a_conv.free == LDKBroadcasterInterface_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKBroadcasterInterface_JCalls_cloned(&arg_a_conv); + } + void* arg_b_ptr = untag_ptr(arg_b); + CHECK_ACCESS(arg_b_ptr); + LDKFeeEstimator arg_b_conv = *(LDKFeeEstimator*)(arg_b_ptr); + if (arg_b_conv.free == LDKFeeEstimator_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFeeEstimator_JCalls_cloned(&arg_b_conv); + } + void* arg_c_ptr = untag_ptr(arg_c); + CHECK_ACCESS(arg_c_ptr); + LDKCOption_FilterZ arg_c_conv = *(LDKCOption_FilterZ*)(arg_c_ptr); + // WARNING: we may need a move here but no clone is available for LDKCOption_FilterZ + if (arg_c_conv.tag == LDKCOption_FilterZ_Some) { + // Manually implement clone for Java trait instances + if (arg_c_conv.some.free == LDKFilter_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFilter_JCalls_cloned(&arg_c_conv.some); + } + } + void* arg_d_ptr = untag_ptr(arg_d); + CHECK_ACCESS(arg_d_ptr); + LDKOutputSpender arg_d_conv = *(LDKOutputSpender*)(arg_d_ptr); + if (arg_d_conv.free == LDKOutputSpender_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKOutputSpender_JCalls_cloned(&arg_d_conv); + } + void* arg_e_ptr = untag_ptr(arg_e); + CHECK_ACCESS(arg_e_ptr); + LDKChangeDestinationSource arg_e_conv = *(LDKChangeDestinationSource*)(arg_e_ptr); + if (arg_e_conv.free == LDKChangeDestinationSource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKChangeDestinationSource_JCalls_cloned(&arg_e_conv); + } + void* arg_f_ptr = untag_ptr(arg_f); + CHECK_ACCESS(arg_f_ptr); + LDKKVStore arg_f_conv = *(LDKKVStore*)(arg_f_ptr); + if (arg_f_conv.free == LDKKVStore_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKKVStore_JCalls_cloned(&arg_f_conv); + } + void* arg_g_ptr = untag_ptr(arg_g); + CHECK_ACCESS(arg_g_ptr); + LDKLogger arg_g_conv = *(LDKLogger*)(arg_g_ptr); + if (arg_g_conv.free == LDKLogger_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKLogger_JCalls_cloned(&arg_g_conv); + } + LDKCResult_OutputSweeperDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSweeperDecodeErrorZ), "LDKCResult_OutputSweeperDecodeErrorZ"); + *ret_conv = OutputSweeper_read(ser_ref, arg_a_conv, arg_b_conv, arg_c_conv, arg_d_conv, arg_e_conv, arg_f_conv, arg_g_conv); + (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1read(JNIEnv *env, jclass clz, int8_tArray ser, int64_t arg_a, int64_t arg_b, int64_t arg_c, int64_t arg_d, int64_t arg_e, int64_t arg_f, int64_t arg_g) { + LDKu8slice ser_ref; + ser_ref.datalen = (*env)->GetArrayLength(env, ser); + ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL); + void* arg_a_ptr = untag_ptr(arg_a); + CHECK_ACCESS(arg_a_ptr); + LDKBroadcasterInterface arg_a_conv = *(LDKBroadcasterInterface*)(arg_a_ptr); + if (arg_a_conv.free == LDKBroadcasterInterface_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKBroadcasterInterface_JCalls_cloned(&arg_a_conv); + } + void* arg_b_ptr = untag_ptr(arg_b); + CHECK_ACCESS(arg_b_ptr); + LDKFeeEstimator arg_b_conv = *(LDKFeeEstimator*)(arg_b_ptr); + if (arg_b_conv.free == LDKFeeEstimator_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFeeEstimator_JCalls_cloned(&arg_b_conv); + } + void* arg_c_ptr = untag_ptr(arg_c); + CHECK_ACCESS(arg_c_ptr); + LDKCOption_FilterZ arg_c_conv = *(LDKCOption_FilterZ*)(arg_c_ptr); + // WARNING: we may need a move here but no clone is available for LDKCOption_FilterZ + if (arg_c_conv.tag == LDKCOption_FilterZ_Some) { + // Manually implement clone for Java trait instances + if (arg_c_conv.some.free == LDKFilter_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFilter_JCalls_cloned(&arg_c_conv.some); + } + } + void* arg_d_ptr = untag_ptr(arg_d); + CHECK_ACCESS(arg_d_ptr); + LDKOutputSpender arg_d_conv = *(LDKOutputSpender*)(arg_d_ptr); + if (arg_d_conv.free == LDKOutputSpender_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKOutputSpender_JCalls_cloned(&arg_d_conv); + } + void* arg_e_ptr = untag_ptr(arg_e); + CHECK_ACCESS(arg_e_ptr); + LDKChangeDestinationSource arg_e_conv = *(LDKChangeDestinationSource*)(arg_e_ptr); + if (arg_e_conv.free == LDKChangeDestinationSource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKChangeDestinationSource_JCalls_cloned(&arg_e_conv); + } + void* arg_f_ptr = untag_ptr(arg_f); + CHECK_ACCESS(arg_f_ptr); + LDKKVStore arg_f_conv = *(LDKKVStore*)(arg_f_ptr); + if (arg_f_conv.free == LDKKVStore_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKKVStore_JCalls_cloned(&arg_f_conv); + } + void* arg_g_ptr = untag_ptr(arg_g); + CHECK_ACCESS(arg_g_ptr); + LDKLogger arg_g_conv = *(LDKLogger*)(arg_g_ptr); + if (arg_g_conv.free == LDKLogger_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKLogger_JCalls_cloned(&arg_g_conv); + } + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ), "LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ"); + *ret_conv = C2Tuple_BestBlockOutputSweeperZ_read(ser_ref, arg_a_conv, arg_b_conv, arg_c_conv, arg_d_conv, arg_e_conv, arg_f_conv, arg_g_conv); + (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKFutureCallback this_ptr_conv = *(LDKFutureCallback*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + FutureCallback_free(this_ptr_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Future_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKFuture this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + Future_free(this_obj_conv); +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Future_1register_1callback_1fn(JNIEnv *env, jclass clz, int64_t this_arg, int64_t callback) { LDKFuture this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -38135,8 +42146,8 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Future_1wait(JNIEnv *env, jcla this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv = Future_clone(&this_arg_conv); - Future_wait(this_arg_conv); + this_arg_conv.is_owned = false; + Future_wait(&this_arg_conv); } JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Future_1wait_1timeout(JNIEnv *env, jclass clz, int64_t this_arg, int64_t max_wait) { @@ -38144,8 +42155,8 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Future_1wait_1timeout(JNIE this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv = Future_clone(&this_arg_conv); - jboolean ret_conv = Future_wait_timeout(this_arg_conv, max_wait); + this_arg_conv.is_owned = false; + jboolean ret_conv = Future_wait_timeout(&this_arg_conv, max_wait); return ret_conv; } @@ -38162,8 +42173,8 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Sleeper_1from_1single_1futu future_conv.inner = untag_ptr(future); future_conv.is_owned = ptr_is_owned(future); CHECK_INNER_FIELD_ACCESS_OR_NULL(future_conv); - future_conv = Future_clone(&future_conv); - LDKSleeper ret_var = Sleeper_from_single_future(future_conv); + future_conv.is_owned = false; + LDKSleeper ret_var = Sleeper_from_single_future(&future_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -38175,13 +42186,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Sleeper_1from_1two_1futures fut_a_conv.inner = untag_ptr(fut_a); fut_a_conv.is_owned = ptr_is_owned(fut_a); CHECK_INNER_FIELD_ACCESS_OR_NULL(fut_a_conv); - fut_a_conv = Future_clone(&fut_a_conv); + fut_a_conv.is_owned = false; LDKFuture fut_b_conv; fut_b_conv.inner = untag_ptr(fut_b); fut_b_conv.is_owned = ptr_is_owned(fut_b); CHECK_INNER_FIELD_ACCESS_OR_NULL(fut_b_conv); - fut_b_conv = Future_clone(&fut_b_conv); - LDKSleeper ret_var = Sleeper_from_two_futures(fut_a_conv, fut_b_conv); + fut_b_conv.is_owned = false; + LDKSleeper ret_var = Sleeper_from_two_futures(&fut_a_conv, &fut_b_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -38202,7 +42213,8 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Sleeper_1new(JNIEnv *env, j futures_conv_8_conv.inner = untag_ptr(futures_conv_8); futures_conv_8_conv.is_owned = ptr_is_owned(futures_conv_8); CHECK_INNER_FIELD_ACCESS_OR_NULL(futures_conv_8_conv); - futures_conv_8_conv = Future_clone(&futures_conv_8_conv); + // WARNING: we need a move here but no clone is available for LDKFuture + futures_constr.data[i] = futures_conv_8_conv; } (*env)->ReleaseLongArrayElements(env, futures, futures_vals, 0); @@ -38343,9 +42355,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Record_1get_1channel_1id(JN this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKCOption_ThirtyTwoBytesZ *ret_copy = MALLOC(sizeof(LDKCOption_ThirtyTwoBytesZ), "LDKCOption_ThirtyTwoBytesZ"); - *ret_copy = Record_get_channel_id(&this_ptr_conv); - int64_t ret_ref = tag_ptr(ret_copy, true); + LDKChannelId ret_var = Record_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } @@ -38355,10 +42368,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Record_1set_1channel_1id(JNIEn this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - void* val_ptr = untag_ptr(val); - CHECK_ACCESS(val_ptr); - LDKCOption_ThirtyTwoBytesZ val_conv = *(LDKCOption_ThirtyTwoBytesZ*)(val_ptr); - val_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(val)); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); Record_set_channel_id(&this_ptr_conv, val_conv); } @@ -38452,10 +42466,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Record_1new(JNIEnv *env, jc LDKPublicKey peer_id_arg_ref; CHECK((*env)->GetArrayLength(env, peer_id_arg) == 33); (*env)->GetByteArrayRegion(env, peer_id_arg, 0, 33, peer_id_arg_ref.compressed_form); - void* channel_id_arg_ptr = untag_ptr(channel_id_arg); - CHECK_ACCESS(channel_id_arg_ptr); - LDKCOption_ThirtyTwoBytesZ channel_id_arg_conv = *(LDKCOption_ThirtyTwoBytesZ*)(channel_id_arg_ptr); - channel_id_arg_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(channel_id_arg)); + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKStr args_arg_conv = java_to_owned_str(env, args_arg); LDKStr module_path_arg_conv = java_to_owned_str(env, module_path_arg); LDKStr file_arg_conv = java_to_owned_str(env, file_arg); @@ -39714,6 +43729,59 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BestBlock_1free(JNIEnv *env, j BestBlock_free(this_obj_conv); } +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BestBlock_1get_1block_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKBestBlock this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = (*env)->NewByteArray(env, 32); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *BestBlock_get_block_hash(&this_ptr_conv)); + return ret_arr; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BestBlock_1set_1block_1hash(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKBestBlock this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKThirtyTwoBytes val_ref; + CHECK((*env)->GetArrayLength(env, val) == 32); + (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); + BestBlock_set_block_hash(&this_ptr_conv, val_ref); +} + +JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1get_1height(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKBestBlock this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int32_t ret_conv = BestBlock_get_height(&this_ptr_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BestBlock_1set_1height(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) { + LDKBestBlock this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + BestBlock_set_height(&this_ptr_conv, val); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1new(JNIEnv *env, jclass clz, int8_tArray block_hash_arg, int32_t height_arg) { + LDKThirtyTwoBytes block_hash_arg_ref; + CHECK((*env)->GetArrayLength(env, block_hash_arg) == 32); + (*env)->GetByteArrayRegion(env, block_hash_arg, 0, 32, block_hash_arg_ref.data); + LDKBestBlock ret_var = BestBlock_new(block_hash_arg_ref, height_arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + static inline uint64_t BestBlock_clone_ptr(LDKBestBlock *NONNULL_PTR arg) { LDKBestBlock ret_var = BestBlock_clone(arg); int64_t ret_ref = 0; @@ -39744,6 +43812,16 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1clone(JNIEnv *en return ret_ref; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1hash(JNIEnv *env, jclass clz, int64_t o) { + LDKBestBlock o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = BestBlock_hash(&o_conv); + return ret_conv; +} + JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_BestBlock_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { LDKBestBlock a_conv; a_conv.inner = untag_ptr(a); @@ -39768,36 +43846,27 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1from_1network(JN return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1new(JNIEnv *env, jclass clz, int8_tArray block_hash, int32_t height) { - LDKThirtyTwoBytes block_hash_ref; - CHECK((*env)->GetArrayLength(env, block_hash) == 32); - (*env)->GetByteArrayRegion(env, block_hash, 0, 32, block_hash_ref.data); - LDKBestBlock ret_var = BestBlock_new(block_hash_ref, height); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BestBlock_1block_1hash(JNIEnv *env, jclass clz, int64_t this_arg) { - LDKBestBlock this_arg_conv; - this_arg_conv.inner = untag_ptr(this_arg); - this_arg_conv.is_owned = ptr_is_owned(this_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, BestBlock_block_hash(&this_arg_conv).data); +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BestBlock_1write(JNIEnv *env, jclass clz, int64_t obj) { + LDKBestBlock obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = BestBlock_write(&obj_conv); + int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen); + (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data); + CVec_u8Z_free(ret_var); return ret_arr; } -JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1height(JNIEnv *env, jclass clz, int64_t this_arg) { - LDKBestBlock this_arg_conv; - this_arg_conv.inner = untag_ptr(this_arg); - this_arg_conv.is_owned = ptr_is_owned(this_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv.is_owned = false; - int32_t ret_conv = BestBlock_height(&this_arg_conv); - return ret_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1read(JNIEnv *env, jclass clz, int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = (*env)->GetArrayLength(env, ser); + ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL); + LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ"); + *ret_conv = BestBlock_read(ser_ref); + (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0); + return tag_ptr(ret_conv, true); } JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Listen_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -40071,6 +44140,11 @@ JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ConfirmationTarget_1channel_ return ret_conv; } +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ConfirmationTarget_1output_1spending_1fee(JNIEnv *env, jclass clz) { + jclass ret_conv = LDKConfirmationTarget_to_java(env, ConfirmationTarget_output_spending_fee()); + return ret_conv; +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ConfirmationTarget_1hash(JNIEnv *env, jclass clz, int64_t o) { LDKConfirmationTarget* o_conv = (LDKConfirmationTarget*)untag_ptr(o); int64_t ret_conv = ConfirmationTarget_hash(o_conv); @@ -40288,16 +44362,14 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1list_1mo this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKCVec_OutPointZ ret_var = ChainMonitor_list_monitors(&this_arg_conv); + LDKCVec_C2Tuple_OutPointChannelIdZZ ret_var = ChainMonitor_list_monitors(&this_arg_conv); int64_tArray ret_arr = NULL; ret_arr = (*env)->NewLongArray(env, ret_var.datalen); int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL); - for (size_t k = 0; k < ret_var.datalen; k++) { - LDKOutPoint ret_conv_10_var = ret_var.data[k]; - int64_t ret_conv_10_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_10_var); - ret_conv_10_ref = tag_ptr(ret_conv_10_var.inner, ret_conv_10_var.is_owned); - ret_arr_ptr[k] = ret_conv_10_ref; + for (size_t d = 0; d < ret_var.datalen; d++) { + LDKC2Tuple_OutPointChannelIdZ* ret_conv_29_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ"); + *ret_conv_29_conv = ret_var.data[d]; + ret_arr_ptr[d] = tag_ptr(ret_conv_29_conv, true); } (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0); FREE(ret_var.data); @@ -40367,6 +44439,29 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1rebroadcast_1pen ChainMonitor_rebroadcast_pending_claims(&this_arg_conv); } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1signer_1unblocked(JNIEnv *env, jclass clz, int64_t this_arg, int64_t monitor_opt) { + LDKChainMonitor this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKOutPoint monitor_opt_conv; + monitor_opt_conv.inner = untag_ptr(monitor_opt); + monitor_opt_conv.is_owned = ptr_is_owned(monitor_opt); + CHECK_INNER_FIELD_ACCESS_OR_NULL(monitor_opt_conv); + monitor_opt_conv = OutPoint_clone(&monitor_opt_conv); + ChainMonitor_signer_unblocked(&this_arg_conv, monitor_opt_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1archive_1fully_1resolved_1channel_1monitors(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKChainMonitor this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + ChainMonitor_archive_fully_resolved_channel_monitors(&this_arg_conv); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1as_1Listen(JNIEnv *env, jclass clz, int64_t this_arg) { LDKChainMonitor this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -40438,6 +44533,33 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1set_1upd ChannelMonitorUpdate_set_update_id(&this_ptr_conv, val); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKChannelMonitorUpdate this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelId ret_var = ChannelMonitorUpdate_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKChannelMonitorUpdate this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ChannelMonitorUpdate_set_channel_id(&this_ptr_conv, val_conv); +} + static inline uint64_t ChannelMonitorUpdate_clone_ptr(LDKChannelMonitorUpdate *NONNULL_PTR arg) { LDKChannelMonitorUpdate ret_var = ChannelMonitorUpdate_clone(arg); int64_t ret_ref = 0; @@ -40547,6 +44669,27 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1htlcevent(JNI return ret_ref; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1holder_1force_1closed_1with_1info(JNIEnv *env, jclass clz, int64_t reason, int64_t outpoint, int64_t channel_id) { + void* reason_ptr = untag_ptr(reason); + CHECK_ACCESS(reason_ptr); + LDKClosureReason reason_conv = *(LDKClosureReason*)(reason_ptr); + reason_conv = ClosureReason_clone((LDKClosureReason*)untag_ptr(reason)); + LDKOutPoint outpoint_conv; + outpoint_conv.inner = untag_ptr(outpoint); + outpoint_conv.is_owned = ptr_is_owned(outpoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_conv); + outpoint_conv = OutPoint_clone(&outpoint_conv); + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); + LDKMonitorEvent *ret_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent"); + *ret_copy = MonitorEvent_holder_force_closed_with_info(reason_conv, outpoint_conv, channel_id_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1holder_1force_1closed(JNIEnv *env, jclass clz, int64_t a) { LDKOutPoint a_conv; a_conv.inner = untag_ptr(a); @@ -40559,14 +44702,19 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1holder_1force return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1completed(JNIEnv *env, jclass clz, int64_t funding_txo, int64_t monitor_update_id) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1completed(JNIEnv *env, jclass clz, int64_t funding_txo, int64_t channel_id, int64_t monitor_update_id) { LDKOutPoint funding_txo_conv; funding_txo_conv.inner = untag_ptr(funding_txo); funding_txo_conv.is_owned = ptr_is_owned(funding_txo); CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_conv); funding_txo_conv = OutPoint_clone(&funding_txo_conv); + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKMonitorEvent *ret_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent"); - *ret_copy = MonitorEvent_completed(funding_txo_conv, monitor_update_id); + *ret_copy = MonitorEvent_completed(funding_txo_conv, channel_id_conv, monitor_update_id); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -40866,6 +45014,19 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1fundin return tag_ptr(ret_conv, true); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1channel_1id(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKChannelMonitor this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKChannelId ret_var = ChannelMonitor_channel_id(&this_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1outputs_1to_1watch(JNIEnv *env, jclass clz, int64_t this_arg) { LDKChannelMonitor this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -41001,29 +45162,22 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1co return ret_arr; } -JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1latest_1holder_1commitment_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int64_t logger) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1broadcast_1latest_1holder_1commitment_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int64_t broadcaster, int64_t fee_estimator, int64_t logger) { LDKChannelMonitor this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; + void* broadcaster_ptr = untag_ptr(broadcaster); + if (ptr_is_owned(broadcaster)) { CHECK_ACCESS(broadcaster_ptr); } + LDKBroadcasterInterface* broadcaster_conv = (LDKBroadcasterInterface*)broadcaster_ptr; + void* fee_estimator_ptr = untag_ptr(fee_estimator); + if (ptr_is_owned(fee_estimator)) { CHECK_ACCESS(fee_estimator_ptr); } + LDKFeeEstimator* fee_estimator_conv = (LDKFeeEstimator*)fee_estimator_ptr; void* logger_ptr = untag_ptr(logger); if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); } LDKLogger* logger_conv = (LDKLogger*)logger_ptr; - LDKCVec_TransactionZ ret_var = ChannelMonitor_get_latest_holder_commitment_txn(&this_arg_conv, logger_conv); - jobjectArray ret_arr = NULL; - ret_arr = (*env)->NewObjectArray(env, ret_var.datalen, arr_of_B_clz, NULL); - ; - for (size_t i = 0; i < ret_var.datalen; i++) { - LDKTransaction ret_conv_8_var = ret_var.data[i]; - int8_tArray ret_conv_8_arr = (*env)->NewByteArray(env, ret_conv_8_var.datalen); - (*env)->SetByteArrayRegion(env, ret_conv_8_arr, 0, ret_conv_8_var.datalen, ret_conv_8_var.data); - Transaction_free(ret_conv_8_var); - (*env)->SetObjectArrayElement(env, ret_arr, i, ret_conv_8_arr); - } - - FREE(ret_var.data); - return ret_arr; + ChannelMonitor_broadcast_latest_holder_commitment_txn(&this_arg_conv, broadcaster_conv, fee_estimator_conv, logger_conv); } JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1block_1connected(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray header, int64_tArray txdata, int32_t height, int64_t broadcaster, int64_t fee_estimator, int64_t logger) { @@ -41300,6 +45454,32 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1rebroadcast_1p ChannelMonitor_rebroadcast_pending_claims(&this_arg_conv, broadcaster_conv, fee_estimator_conv, logger_conv); } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1signer_1unblocked(JNIEnv *env, jclass clz, int64_t this_arg, int64_t broadcaster, int64_t fee_estimator, int64_t logger) { + LDKChannelMonitor this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + void* broadcaster_ptr = untag_ptr(broadcaster); + CHECK_ACCESS(broadcaster_ptr); + LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(broadcaster_ptr); + if (broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKBroadcasterInterface_JCalls_cloned(&broadcaster_conv); + } + void* fee_estimator_ptr = untag_ptr(fee_estimator); + CHECK_ACCESS(fee_estimator_ptr); + LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(fee_estimator_ptr); + if (fee_estimator_conv.free == LDKFeeEstimator_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFeeEstimator_JCalls_cloned(&fee_estimator_conv); + } + void* logger_ptr = untag_ptr(logger); + if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); } + LDKLogger* logger_conv = (LDKLogger*)logger_ptr; + ChannelMonitor_signer_unblocked(&this_arg_conv, broadcaster_conv, fee_estimator_conv, logger_conv); +} + JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray tx, int32_t confirmation_height) { LDKChannelMonitor this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -41326,6 +45506,19 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1s return ret_arr; } +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1is_1fully_1resolved(JNIEnv *env, jclass clz, int64_t this_arg, int64_t logger) { + LDKChannelMonitor this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + void* logger_ptr = untag_ptr(logger); + if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); } + LDKLogger* logger_conv = (LDKLogger*)logger_ptr; + jboolean ret_conv = ChannelMonitor_is_fully_resolved(&this_arg_conv, logger_conv); + return ret_conv; +} + JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1claimable_1balances(JNIEnv *env, jclass clz, int64_t this_arg) { LDKChannelMonitor this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -41479,17 +45672,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutPoint_1hash(JNIEnv *env, return ret_conv; } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OutPoint_1to_1channel_1id(JNIEnv *env, jclass clz, int64_t this_arg) { - LDKOutPoint this_arg_conv; - this_arg_conv.inner = untag_ptr(this_arg); - this_arg_conv.is_owned = ptr_is_owned(this_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, OutPoint_to_channel_id(&this_arg_conv).data); - return ret_arr; -} - JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OutPoint_1write(JNIEnv *env, jclass clz, int64_t obj) { LDKOutPoint obj_conv; obj_conv.inner = untag_ptr(obj); @@ -41601,6 +45783,61 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1new(JNIEnv return ret_ref; } +static inline uint64_t InboundHTLCErr_clone_ptr(LDKInboundHTLCErr *NONNULL_PTR arg) { + LDKInboundHTLCErr ret_var = InboundHTLCErr_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKInboundHTLCErr arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = InboundHTLCErr_clone_ptr(&arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKInboundHTLCErr orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKInboundHTLCErr ret_var = InboundHTLCErr_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1hash(JNIEnv *env, jclass clz, int64_t o) { + LDKInboundHTLCErr o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = InboundHTLCErr_hash(&o_conv); + return ret_conv; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKInboundHTLCErr a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKInboundHTLCErr b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = InboundHTLCErr_eq(&a_conv, &b_conv); + return ret_conv; +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_peel_1payment_1onion(JNIEnv *env, jclass clz, int64_t msg, int64_t node_signer, int64_t logger, int32_t cur_height, jboolean accept_mpp_keysend, jboolean allow_skimmed_fees) { LDKUpdateAddHTLC msg_conv; msg_conv.inner = untag_ptr(msg); @@ -41664,7 +45901,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1forward return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive(JNIEnv *env, jclass clz, int64_t payment_data, int64_t payment_metadata, int32_t incoming_cltv_expiry, int8_tArray phantom_shared_secret, int64_tArray custom_tlvs, jboolean requires_blinded_error) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive(JNIEnv *env, jclass clz, int64_t payment_data, int64_t payment_metadata, int64_t payment_context, int32_t incoming_cltv_expiry, int8_tArray phantom_shared_secret, int64_tArray custom_tlvs, jboolean requires_blinded_error) { LDKFinalOnionHopData payment_data_conv; payment_data_conv.inner = untag_ptr(payment_data); payment_data_conv.is_owned = ptr_is_owned(payment_data); @@ -41674,6 +45911,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive CHECK_ACCESS(payment_metadata_ptr); LDKCOption_CVec_u8ZZ payment_metadata_conv = *(LDKCOption_CVec_u8ZZ*)(payment_metadata_ptr); payment_metadata_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(payment_metadata)); + void* payment_context_ptr = untag_ptr(payment_context); + CHECK_ACCESS(payment_context_ptr); + LDKCOption_PaymentContextZ payment_context_conv = *(LDKCOption_PaymentContextZ*)(payment_context_ptr); + payment_context_conv = COption_PaymentContextZ_clone((LDKCOption_PaymentContextZ*)untag_ptr(payment_context)); LDKThirtyTwoBytes phantom_shared_secret_ref; CHECK((*env)->GetArrayLength(env, phantom_shared_secret) == 32); (*env)->GetByteArrayRegion(env, phantom_shared_secret, 0, 32, phantom_shared_secret_ref.data); @@ -41694,12 +45935,12 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive } (*env)->ReleaseLongArrayElements(env, custom_tlvs, custom_tlvs_vals, 0); LDKPendingHTLCRouting *ret_copy = MALLOC(sizeof(LDKPendingHTLCRouting), "LDKPendingHTLCRouting"); - *ret_copy = PendingHTLCRouting_receive(payment_data_conv, payment_metadata_conv, incoming_cltv_expiry, phantom_shared_secret_ref, custom_tlvs_constr, requires_blinded_error); + *ret_copy = PendingHTLCRouting_receive(payment_data_conv, payment_metadata_conv, payment_context_conv, incoming_cltv_expiry, phantom_shared_secret_ref, custom_tlvs_constr, requires_blinded_error); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive_1keysend(JNIEnv *env, jclass clz, int64_t payment_data, int8_tArray payment_preimage, int64_t payment_metadata, int32_t incoming_cltv_expiry, int64_tArray custom_tlvs) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive_1keysend(JNIEnv *env, jclass clz, int64_t payment_data, int8_tArray payment_preimage, int64_t payment_metadata, int32_t incoming_cltv_expiry, int64_tArray custom_tlvs, jboolean requires_blinded_error) { LDKFinalOnionHopData payment_data_conv; payment_data_conv.inner = untag_ptr(payment_data); payment_data_conv.is_owned = ptr_is_owned(payment_data); @@ -41729,7 +45970,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive } (*env)->ReleaseLongArrayElements(env, custom_tlvs, custom_tlvs_vals, 0); LDKPendingHTLCRouting *ret_copy = MALLOC(sizeof(LDKPendingHTLCRouting), "LDKPendingHTLCRouting"); - *ret_copy = PendingHTLCRouting_receive_keysend(payment_data_conv, payment_preimage_ref, payment_metadata_conv, incoming_cltv_expiry, custom_tlvs_constr); + *ret_copy = PendingHTLCRouting_receive_keysend(payment_data_conv, payment_preimage_ref, payment_metadata_conv, incoming_cltv_expiry, custom_tlvs_constr, requires_blinded_error); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -42596,27 +46837,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1free(JNIEnv *e ChannelDetails_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKChannelDetails this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ChannelDetails_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = ChannelDetails_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKChannelDetails this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - ChannelDetails_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ChannelDetails_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1counterparty(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -43215,83 +47460,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1config(JN ChannelDetails_set_config(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t counterparty_arg, int64_t funding_txo_arg, int64_t channel_type_arg, int64_t short_channel_id_arg, int64_t outbound_scid_alias_arg, int64_t inbound_scid_alias_arg, int64_t channel_value_satoshis_arg, int64_t unspendable_punishment_reserve_arg, int8_tArray user_channel_id_arg, int64_t feerate_sat_per_1000_weight_arg, int64_t balance_msat_arg, int64_t outbound_capacity_msat_arg, int64_t next_outbound_htlc_limit_msat_arg, int64_t next_outbound_htlc_minimum_msat_arg, int64_t inbound_capacity_msat_arg, int64_t confirmations_required_arg, int64_t confirmations_arg, int64_t force_close_spend_delay_arg, jboolean is_outbound_arg, jboolean is_channel_ready_arg, int64_t channel_shutdown_state_arg, jboolean is_usable_arg, jboolean is_public_arg, int64_t inbound_htlc_minimum_msat_arg, int64_t inbound_htlc_maximum_msat_arg, int64_t config_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); - LDKChannelCounterparty counterparty_arg_conv; - counterparty_arg_conv.inner = untag_ptr(counterparty_arg); - counterparty_arg_conv.is_owned = ptr_is_owned(counterparty_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(counterparty_arg_conv); - counterparty_arg_conv = ChannelCounterparty_clone(&counterparty_arg_conv); - LDKOutPoint funding_txo_arg_conv; - funding_txo_arg_conv.inner = untag_ptr(funding_txo_arg); - funding_txo_arg_conv.is_owned = ptr_is_owned(funding_txo_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_arg_conv); - funding_txo_arg_conv = OutPoint_clone(&funding_txo_arg_conv); - LDKChannelTypeFeatures channel_type_arg_conv; - channel_type_arg_conv.inner = untag_ptr(channel_type_arg); - channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv); - channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv); - void* short_channel_id_arg_ptr = untag_ptr(short_channel_id_arg); - CHECK_ACCESS(short_channel_id_arg_ptr); - LDKCOption_u64Z short_channel_id_arg_conv = *(LDKCOption_u64Z*)(short_channel_id_arg_ptr); - short_channel_id_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(short_channel_id_arg)); - void* outbound_scid_alias_arg_ptr = untag_ptr(outbound_scid_alias_arg); - CHECK_ACCESS(outbound_scid_alias_arg_ptr); - LDKCOption_u64Z outbound_scid_alias_arg_conv = *(LDKCOption_u64Z*)(outbound_scid_alias_arg_ptr); - outbound_scid_alias_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(outbound_scid_alias_arg)); - void* inbound_scid_alias_arg_ptr = untag_ptr(inbound_scid_alias_arg); - CHECK_ACCESS(inbound_scid_alias_arg_ptr); - LDKCOption_u64Z inbound_scid_alias_arg_conv = *(LDKCOption_u64Z*)(inbound_scid_alias_arg_ptr); - inbound_scid_alias_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(inbound_scid_alias_arg)); - void* unspendable_punishment_reserve_arg_ptr = untag_ptr(unspendable_punishment_reserve_arg); - CHECK_ACCESS(unspendable_punishment_reserve_arg_ptr); - LDKCOption_u64Z unspendable_punishment_reserve_arg_conv = *(LDKCOption_u64Z*)(unspendable_punishment_reserve_arg_ptr); - LDKU128 user_channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, user_channel_id_arg) == 16); - (*env)->GetByteArrayRegion(env, user_channel_id_arg, 0, 16, user_channel_id_arg_ref.le_bytes); - void* feerate_sat_per_1000_weight_arg_ptr = untag_ptr(feerate_sat_per_1000_weight_arg); - CHECK_ACCESS(feerate_sat_per_1000_weight_arg_ptr); - LDKCOption_u32Z feerate_sat_per_1000_weight_arg_conv = *(LDKCOption_u32Z*)(feerate_sat_per_1000_weight_arg_ptr); - feerate_sat_per_1000_weight_arg_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(feerate_sat_per_1000_weight_arg)); - void* confirmations_required_arg_ptr = untag_ptr(confirmations_required_arg); - CHECK_ACCESS(confirmations_required_arg_ptr); - LDKCOption_u32Z confirmations_required_arg_conv = *(LDKCOption_u32Z*)(confirmations_required_arg_ptr); - confirmations_required_arg_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(confirmations_required_arg)); - void* confirmations_arg_ptr = untag_ptr(confirmations_arg); - CHECK_ACCESS(confirmations_arg_ptr); - LDKCOption_u32Z confirmations_arg_conv = *(LDKCOption_u32Z*)(confirmations_arg_ptr); - confirmations_arg_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(confirmations_arg)); - void* force_close_spend_delay_arg_ptr = untag_ptr(force_close_spend_delay_arg); - CHECK_ACCESS(force_close_spend_delay_arg_ptr); - LDKCOption_u16Z force_close_spend_delay_arg_conv = *(LDKCOption_u16Z*)(force_close_spend_delay_arg_ptr); - force_close_spend_delay_arg_conv = COption_u16Z_clone((LDKCOption_u16Z*)untag_ptr(force_close_spend_delay_arg)); - void* channel_shutdown_state_arg_ptr = untag_ptr(channel_shutdown_state_arg); - CHECK_ACCESS(channel_shutdown_state_arg_ptr); - LDKCOption_ChannelShutdownStateZ channel_shutdown_state_arg_conv = *(LDKCOption_ChannelShutdownStateZ*)(channel_shutdown_state_arg_ptr); - channel_shutdown_state_arg_conv = COption_ChannelShutdownStateZ_clone((LDKCOption_ChannelShutdownStateZ*)untag_ptr(channel_shutdown_state_arg)); - void* inbound_htlc_minimum_msat_arg_ptr = untag_ptr(inbound_htlc_minimum_msat_arg); - CHECK_ACCESS(inbound_htlc_minimum_msat_arg_ptr); - LDKCOption_u64Z inbound_htlc_minimum_msat_arg_conv = *(LDKCOption_u64Z*)(inbound_htlc_minimum_msat_arg_ptr); - inbound_htlc_minimum_msat_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(inbound_htlc_minimum_msat_arg)); - void* inbound_htlc_maximum_msat_arg_ptr = untag_ptr(inbound_htlc_maximum_msat_arg); - CHECK_ACCESS(inbound_htlc_maximum_msat_arg_ptr); - LDKCOption_u64Z inbound_htlc_maximum_msat_arg_conv = *(LDKCOption_u64Z*)(inbound_htlc_maximum_msat_arg_ptr); - inbound_htlc_maximum_msat_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(inbound_htlc_maximum_msat_arg)); - LDKChannelConfig config_arg_conv; - config_arg_conv.inner = untag_ptr(config_arg); - config_arg_conv.is_owned = ptr_is_owned(config_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(config_arg_conv); - config_arg_conv = ChannelConfig_clone(&config_arg_conv); - LDKChannelDetails ret_var = ChannelDetails_new(channel_id_arg_ref, counterparty_arg_conv, funding_txo_arg_conv, channel_type_arg_conv, short_channel_id_arg_conv, outbound_scid_alias_arg_conv, inbound_scid_alias_arg_conv, channel_value_satoshis_arg, unspendable_punishment_reserve_arg_conv, user_channel_id_arg_ref, feerate_sat_per_1000_weight_arg_conv, balance_msat_arg, outbound_capacity_msat_arg, next_outbound_htlc_limit_msat_arg, next_outbound_htlc_minimum_msat_arg, inbound_capacity_msat_arg, confirmations_required_arg_conv, confirmations_arg_conv, force_close_spend_delay_arg_conv, is_outbound_arg, is_channel_ready_arg, channel_shutdown_state_arg_conv, is_usable_arg, is_public_arg, inbound_htlc_minimum_msat_arg_conv, inbound_htlc_maximum_msat_arg_conv, config_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - static inline uint64_t ChannelDetails_clone_ptr(LDKChannelDetails *NONNULL_PTR arg) { LDKChannelDetails ret_var = ChannelDetails_clone(arg); int64_t ret_ref = 0; @@ -43718,16 +47886,17 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1create_1cha LDKU128 user_channel_id_ref; CHECK((*env)->GetArrayLength(env, user_channel_id) == 16); (*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes); - void* temporary_channel_id_ptr = untag_ptr(temporary_channel_id); - CHECK_ACCESS(temporary_channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ temporary_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(temporary_channel_id_ptr); - temporary_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(temporary_channel_id)); + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv = ChannelId_clone(&temporary_channel_id_conv); LDKUserConfig override_config_conv; override_config_conv.inner = untag_ptr(override_config); override_config_conv.is_owned = ptr_is_owned(override_config); CHECK_INNER_FIELD_ACCESS_OR_NULL(override_config_conv); override_config_conv = UserConfig_clone(&override_config_conv); - LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); + LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ"); *ret_conv = ChannelManager_create_channel(&this_arg_conv, their_network_key_ref, channel_value_satoshis, push_msat, user_channel_id_ref, temporary_channel_id_conv, override_config_conv); return tag_ptr(ret_conv, true); } @@ -43822,34 +47991,36 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelManager_1list_1 return ret_arr; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int8_tArray counterparty_node_id) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t channel_id_arr[32]; - CHECK((*env)->GetArrayLength(env, channel_id) == 32); - (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_arr); - uint8_t (*channel_id_ref)[32] = &channel_id_arr; + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33); (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_close_channel(&this_arg_conv, channel_id_ref, counterparty_node_id_ref); + *ret_conv = ChannelManager_close_channel(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref); return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1channel_1with_1feerate_1and_1script(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id, int64_t target_feerate_sats_per_1000_weight, int64_t shutdown_script) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1channel_1with_1feerate_1and_1script(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int8_tArray counterparty_node_id, int64_t target_feerate_sats_per_1000_weight, int64_t shutdown_script) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t channel_id_arr[32]; - CHECK((*env)->GetArrayLength(env, channel_id) == 32); - (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_arr); - uint8_t (*channel_id_ref)[32] = &channel_id_arr; + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33); (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form); @@ -43863,43 +48034,45 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1chan CHECK_INNER_FIELD_ACCESS_OR_NULL(shutdown_script_conv); shutdown_script_conv = ShutdownScript_clone(&shutdown_script_conv); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_close_channel_with_feerate_and_script(&this_arg_conv, channel_id_ref, counterparty_node_id_ref, target_feerate_sats_per_1000_weight_conv, shutdown_script_conv); + *ret_conv = ChannelManager_close_channel_with_feerate_and_script(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref, target_feerate_sats_per_1000_weight_conv, shutdown_script_conv); return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1broadcasting_1latest_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1broadcasting_1latest_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int8_tArray counterparty_node_id) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t channel_id_arr[32]; - CHECK((*env)->GetArrayLength(env, channel_id) == 32); - (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_arr); - uint8_t (*channel_id_ref)[32] = &channel_id_arr; + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33); (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_force_close_broadcasting_latest_txn(&this_arg_conv, channel_id_ref, counterparty_node_id_ref); + *ret_conv = ChannelManager_force_close_broadcasting_latest_txn(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref); return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1without_1broadcasting_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1without_1broadcasting_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int8_tArray counterparty_node_id) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t channel_id_arr[32]; - CHECK((*env)->GetArrayLength(env, channel_id) == 32); - (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_arr); - uint8_t (*channel_id_ref)[32] = &channel_id_arr; + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33); (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_force_close_without_broadcasting_txn(&this_arg_conv, channel_id_ref, counterparty_node_id_ref); + *ret_conv = ChannelManager_force_close_without_broadcasting_txn(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref); return tag_ptr(ret_conv, true); } @@ -44105,16 +48278,17 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1send_1prefl return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1funding_1transaction_1generated(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray funding_transaction) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1funding_1transaction_1generated(JNIEnv *env, jclass clz, int64_t this_arg, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray funding_transaction) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t temporary_channel_id_arr[32]; - CHECK((*env)->GetArrayLength(env, temporary_channel_id) == 32); - (*env)->GetByteArrayRegion(env, temporary_channel_id, 0, 32, temporary_channel_id_arr); - uint8_t (*temporary_channel_id_ref)[32] = &temporary_channel_id_arr; + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33); (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form); @@ -44124,7 +48298,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1funding_1tr (*env)->GetByteArrayRegion(env, funding_transaction, 0, funding_transaction_ref.datalen, funding_transaction_ref.data); funding_transaction_ref.data_is_owned = true; LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_funding_transaction_generated(&this_arg_conv, temporary_channel_id_ref, counterparty_node_id_ref, funding_transaction_ref); + *ret_conv = ChannelManager_funding_transaction_generated(&this_arg_conv, &temporary_channel_id_conv, counterparty_node_id_ref, funding_transaction_ref); return tag_ptr(ret_conv, true); } @@ -44134,20 +48308,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1batch_1fund this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ temporary_channels_constr; + LDKCVec_C2Tuple_ChannelIdPublicKeyZZ temporary_channels_constr; temporary_channels_constr.datalen = (*env)->GetArrayLength(env, temporary_channels); if (temporary_channels_constr.datalen > 0) - temporary_channels_constr.data = MALLOC(temporary_channels_constr.datalen * sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ Elements"); + temporary_channels_constr.data = MALLOC(temporary_channels_constr.datalen * sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKCVec_C2Tuple_ChannelIdPublicKeyZZ Elements"); else temporary_channels_constr.data = NULL; int64_t* temporary_channels_vals = (*env)->GetLongArrayElements (env, temporary_channels, NULL); - for (size_t j = 0; j < temporary_channels_constr.datalen; j++) { - int64_t temporary_channels_conv_35 = temporary_channels_vals[j]; - void* temporary_channels_conv_35_ptr = untag_ptr(temporary_channels_conv_35); - CHECK_ACCESS(temporary_channels_conv_35_ptr); - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ temporary_channels_conv_35_conv = *(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)(temporary_channels_conv_35_ptr); - temporary_channels_conv_35_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone((LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(temporary_channels_conv_35)); - temporary_channels_constr.data[j] = temporary_channels_conv_35_conv; + for (size_t e = 0; e < temporary_channels_constr.datalen; e++) { + int64_t temporary_channels_conv_30 = temporary_channels_vals[e]; + void* temporary_channels_conv_30_ptr = untag_ptr(temporary_channels_conv_30); + CHECK_ACCESS(temporary_channels_conv_30_ptr); + LDKC2Tuple_ChannelIdPublicKeyZ temporary_channels_conv_30_conv = *(LDKC2Tuple_ChannelIdPublicKeyZ*)(temporary_channels_conv_30_ptr); + temporary_channels_conv_30_conv = C2Tuple_ChannelIdPublicKeyZ_clone((LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(temporary_channels_conv_30)); + temporary_channels_constr.data[e] = temporary_channels_conv_30_conv; } (*env)->ReleaseLongArrayElements(env, temporary_channels, temporary_channels_vals, 0); LDKTransaction funding_transaction_ref; @@ -44160,7 +48334,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1batch_1fund return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1partial_1channel_1config(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray counterparty_node_id, jobjectArray channel_ids, int64_t config_update) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1partial_1channel_1config(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray counterparty_node_id, int64_tArray channel_ids, int64_t config_update) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); @@ -44169,19 +48343,23 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1par LDKPublicKey counterparty_node_id_ref; CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33); (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form); - LDKCVec_ThirtyTwoBytesZ channel_ids_constr; + LDKCVec_ChannelIdZ channel_ids_constr; channel_ids_constr.datalen = (*env)->GetArrayLength(env, channel_ids); if (channel_ids_constr.datalen > 0) - channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKThirtyTwoBytes), "LDKCVec_ThirtyTwoBytesZ Elements"); + channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKChannelId), "LDKCVec_ChannelIdZ Elements"); else channel_ids_constr.data = NULL; - for (size_t i = 0; i < channel_ids_constr.datalen; i++) { - int8_tArray channel_ids_conv_8 = (*env)->GetObjectArrayElement(env, channel_ids, i); - LDKThirtyTwoBytes channel_ids_conv_8_ref; - CHECK((*env)->GetArrayLength(env, channel_ids_conv_8) == 32); - (*env)->GetByteArrayRegion(env, channel_ids_conv_8, 0, 32, channel_ids_conv_8_ref.data); - channel_ids_constr.data[i] = channel_ids_conv_8_ref; - } + int64_t* channel_ids_vals = (*env)->GetLongArrayElements (env, channel_ids, NULL); + for (size_t l = 0; l < channel_ids_constr.datalen; l++) { + int64_t channel_ids_conv_11 = channel_ids_vals[l]; + LDKChannelId channel_ids_conv_11_conv; + channel_ids_conv_11_conv.inner = untag_ptr(channel_ids_conv_11); + channel_ids_conv_11_conv.is_owned = ptr_is_owned(channel_ids_conv_11); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_ids_conv_11_conv); + channel_ids_conv_11_conv = ChannelId_clone(&channel_ids_conv_11_conv); + channel_ids_constr.data[l] = channel_ids_conv_11_conv; + } + (*env)->ReleaseLongArrayElements(env, channel_ids, channel_ids_vals, 0); LDKChannelConfigUpdate config_update_conv; config_update_conv.inner = untag_ptr(config_update); config_update_conv.is_owned = ptr_is_owned(config_update); @@ -44192,7 +48370,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1par return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1channel_1config(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray counterparty_node_id, jobjectArray channel_ids, int64_t config) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1channel_1config(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray counterparty_node_id, int64_tArray channel_ids, int64_t config) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); @@ -44201,19 +48379,23 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1cha LDKPublicKey counterparty_node_id_ref; CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33); (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form); - LDKCVec_ThirtyTwoBytesZ channel_ids_constr; + LDKCVec_ChannelIdZ channel_ids_constr; channel_ids_constr.datalen = (*env)->GetArrayLength(env, channel_ids); if (channel_ids_constr.datalen > 0) - channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKThirtyTwoBytes), "LDKCVec_ThirtyTwoBytesZ Elements"); + channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKChannelId), "LDKCVec_ChannelIdZ Elements"); else channel_ids_constr.data = NULL; - for (size_t i = 0; i < channel_ids_constr.datalen; i++) { - int8_tArray channel_ids_conv_8 = (*env)->GetObjectArrayElement(env, channel_ids, i); - LDKThirtyTwoBytes channel_ids_conv_8_ref; - CHECK((*env)->GetArrayLength(env, channel_ids_conv_8) == 32); - (*env)->GetByteArrayRegion(env, channel_ids_conv_8, 0, 32, channel_ids_conv_8_ref.data); - channel_ids_constr.data[i] = channel_ids_conv_8_ref; - } + int64_t* channel_ids_vals = (*env)->GetLongArrayElements (env, channel_ids, NULL); + for (size_t l = 0; l < channel_ids_constr.datalen; l++) { + int64_t channel_ids_conv_11 = channel_ids_vals[l]; + LDKChannelId channel_ids_conv_11_conv; + channel_ids_conv_11_conv.inner = untag_ptr(channel_ids_conv_11); + channel_ids_conv_11_conv.is_owned = ptr_is_owned(channel_ids_conv_11); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_ids_conv_11_conv); + channel_ids_conv_11_conv = ChannelId_clone(&channel_ids_conv_11_conv); + channel_ids_constr.data[l] = channel_ids_conv_11_conv; + } + (*env)->ReleaseLongArrayElements(env, channel_ids, channel_ids_vals, 0); LDKChannelConfig config_conv; config_conv.inner = untag_ptr(config); config_conv.is_owned = ptr_is_owned(config); @@ -44224,7 +48406,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1cha return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1forward_1intercepted_1htlc(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray intercept_id, int8_tArray next_hop_channel_id, int8_tArray next_node_id, int64_t amt_to_forward_msat) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1forward_1intercepted_1htlc(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray intercept_id, int64_t next_hop_channel_id, int8_tArray next_node_id, int64_t amt_to_forward_msat) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); @@ -44233,15 +48415,16 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1forward_1in LDKThirtyTwoBytes intercept_id_ref; CHECK((*env)->GetArrayLength(env, intercept_id) == 32); (*env)->GetByteArrayRegion(env, intercept_id, 0, 32, intercept_id_ref.data); - uint8_t next_hop_channel_id_arr[32]; - CHECK((*env)->GetArrayLength(env, next_hop_channel_id) == 32); - (*env)->GetByteArrayRegion(env, next_hop_channel_id, 0, 32, next_hop_channel_id_arr); - uint8_t (*next_hop_channel_id_ref)[32] = &next_hop_channel_id_arr; + LDKChannelId next_hop_channel_id_conv; + next_hop_channel_id_conv.inner = untag_ptr(next_hop_channel_id); + next_hop_channel_id_conv.is_owned = ptr_is_owned(next_hop_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(next_hop_channel_id_conv); + next_hop_channel_id_conv.is_owned = false; LDKPublicKey next_node_id_ref; CHECK((*env)->GetArrayLength(env, next_node_id) == 33); (*env)->GetByteArrayRegion(env, next_node_id, 0, 33, next_node_id_ref.compressed_form); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_forward_intercepted_htlc(&this_arg_conv, intercept_id_ref, next_hop_channel_id_ref, next_node_id_ref, amt_to_forward_msat); + *ret_conv = ChannelManager_forward_intercepted_htlc(&this_arg_conv, intercept_id_ref, &next_hop_channel_id_conv, next_node_id_ref, amt_to_forward_msat); return tag_ptr(ret_conv, true); } @@ -44342,16 +48525,17 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelManager_1get_1ou return ret_arr; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inbound_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inbound_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t temporary_channel_id_arr[32]; - CHECK((*env)->GetArrayLength(env, temporary_channel_id) == 32); - (*env)->GetByteArrayRegion(env, temporary_channel_id, 0, 32, temporary_channel_id_arr); - uint8_t (*temporary_channel_id_ref)[32] = &temporary_channel_id_arr; + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33); (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form); @@ -44359,20 +48543,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inb CHECK((*env)->GetArrayLength(env, user_channel_id) == 16); (*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_accept_inbound_channel(&this_arg_conv, temporary_channel_id_ref, counterparty_node_id_ref, user_channel_id_ref); + *ret_conv = ChannelManager_accept_inbound_channel(&this_arg_conv, &temporary_channel_id_conv, counterparty_node_id_ref, user_channel_id_ref); return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inbound_1channel_1from_1trusted_1peer_10conf(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inbound_1channel_1from_1trusted_1peer_10conf(JNIEnv *env, jclass clz, int64_t this_arg, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t temporary_channel_id_arr[32]; - CHECK((*env)->GetArrayLength(env, temporary_channel_id) == 32); - (*env)->GetByteArrayRegion(env, temporary_channel_id, 0, 32, temporary_channel_id_arr); - uint8_t (*temporary_channel_id_ref)[32] = &temporary_channel_id_arr; + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33); (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form); @@ -44380,7 +48565,40 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inb CHECK((*env)->GetArrayLength(env, user_channel_id) == 16); (*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(&this_arg_conv, temporary_channel_id_ref, counterparty_node_id_ref, user_channel_id_ref); + *ret_conv = ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(&this_arg_conv, &temporary_channel_id_conv, counterparty_node_id_ref, user_channel_id_ref); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1create_1offer_1builder(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKChannelManager this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = ChannelManager_create_offer_builder(&this_arg_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1create_1refund_1builder(JNIEnv *env, jclass clz, int64_t this_arg, int64_t amount_msats, int64_t absolute_expiry, int8_tArray payment_id, int64_t retry_strategy, int64_t max_total_routing_fee_msat) { + LDKChannelManager this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKThirtyTwoBytes payment_id_ref; + CHECK((*env)->GetArrayLength(env, payment_id) == 32); + (*env)->GetByteArrayRegion(env, payment_id, 0, 32, payment_id_ref.data); + void* retry_strategy_ptr = untag_ptr(retry_strategy); + CHECK_ACCESS(retry_strategy_ptr); + LDKRetry retry_strategy_conv = *(LDKRetry*)(retry_strategy_ptr); + retry_strategy_conv = Retry_clone((LDKRetry*)untag_ptr(retry_strategy)); + void* max_total_routing_fee_msat_ptr = untag_ptr(max_total_routing_fee_msat); + CHECK_ACCESS(max_total_routing_fee_msat_ptr); + LDKCOption_u64Z max_total_routing_fee_msat_conv = *(LDKCOption_u64Z*)(max_total_routing_fee_msat_ptr); + max_total_routing_fee_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(max_total_routing_fee_msat)); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = ChannelManager_create_refund_builder(&this_arg_conv, amount_msats, absolute_expiry, payment_id_ref, retry_strategy_conv, max_total_routing_fee_msat_conv); return tag_ptr(ret_conv, true); } @@ -44434,7 +48652,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1request_1re refund_conv.is_owned = ptr_is_owned(refund); CHECK_INNER_FIELD_ACCESS_OR_NULL(refund_conv); refund_conv.is_owned = false; - LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); *ret_conv = ChannelManager_request_refund_payment(&this_arg_conv, &refund_conv); return tag_ptr(ret_conv, true); } @@ -44697,6 +48915,17 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1OffersM return tag_ptr(ret_ret, true); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1NodeIdLookUp(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKChannelManager this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKNodeIdLookUp* ret_ret = MALLOC(sizeof(LDKNodeIdLookUp), "LDKNodeIdLookUp"); + *ret_ret = ChannelManager_as_NodeIdLookUp(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_provided_1init_1features(JNIEnv *env, jclass clz, int64_t config) { LDKUserConfig config_conv; config_conv.inner = untag_ptr(config); @@ -45379,6 +49608,20 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_DelayedPaymentBasepoint return ret_arr; } +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_DelayedPaymentBasepoint_1derive_1add_1tweak(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray per_commitment_point) { + LDKDelayedPaymentBasepoint this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKPublicKey per_commitment_point_ref; + CHECK((*env)->GetArrayLength(env, per_commitment_point) == 33); + (*env)->GetByteArrayRegion(env, per_commitment_point, 0, 33, per_commitment_point_ref.compressed_form); + int8_tArray ret_arr = (*env)->NewByteArray(env, 32); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, DelayedPaymentBasepoint_derive_add_tweak(&this_arg_conv, per_commitment_point_ref).data); + return ret_arr; +} + JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_DelayedPaymentBasepoint_1write(JNIEnv *env, jclass clz, int64_t obj) { LDKDelayedPaymentBasepoint obj_conv; obj_conv.inner = untag_ptr(obj); @@ -45659,6 +49902,20 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_HtlcBasepoint_1to_1publ return ret_arr; } +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_HtlcBasepoint_1derive_1add_1tweak(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray per_commitment_point) { + LDKHtlcBasepoint this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKPublicKey per_commitment_point_ref; + CHECK((*env)->GetArrayLength(env, per_commitment_point) == 33); + (*env)->GetByteArrayRegion(env, per_commitment_point, 0, 33, per_commitment_point_ref.compressed_form); + int8_tArray ret_arr = (*env)->NewByteArray(env, 32); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, HtlcBasepoint_derive_add_tweak(&this_arg_conv, per_commitment_point_ref).data); + return ret_arr; +} + JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_HtlcBasepoint_1write(JNIEnv *env, jclass clz, int64_t obj) { LDKHtlcBasepoint obj_conv; obj_conv.inner = untag_ptr(obj); @@ -45831,6 +50088,19 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HtlcKey_1read(JNIEnv *env, return tag_ptr(ret_conv, true); } +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_add_1public_1key_1tweak(JNIEnv *env, jclass clz, int8_tArray base_point, int8_tArray tweak) { + LDKPublicKey base_point_ref; + CHECK((*env)->GetArrayLength(env, base_point) == 33); + (*env)->GetByteArrayRegion(env, base_point, 0, 33, base_point_ref.compressed_form); + uint8_t tweak_arr[32]; + CHECK((*env)->GetArrayLength(env, tweak) == 32); + (*env)->GetByteArrayRegion(env, tweak, 0, 32, tweak_arr); + uint8_t (*tweak_ref)[32] = &tweak_arr; + int8_tArray ret_arr = (*env)->NewByteArray(env, 33); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, add_public_key_tweak(base_point_ref, tweak_ref).compressed_form); + return ret_arr; +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevocationBasepoint_1free(JNIEnv *env, jclass clz, int64_t this_obj) { LDKRevocationBasepoint this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -46252,6 +50522,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DecodeError_1unsupported_1c return ret_ref; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DecodeError_1dangerous_1value(JNIEnv *env, jclass clz) { + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = DecodeError_dangerous_value(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DecodeError_1hash(JNIEnv *env, jclass clz, int64_t o) { LDKDecodeError* o_conv = (LDKDecodeError*)untag_ptr(o); int64_t ret_conv = DecodeError_hash(o_conv); @@ -46433,27 +50710,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1free(JNIEnv *env ErrorMessage_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKErrorMessage this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ErrorMessage_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = ErrorMessage_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKErrorMessage this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - ErrorMessage_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ErrorMessage_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT jstring JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1data(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -46478,12 +50759,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1set_1data(JNIEnv ErrorMessage_set_data(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, jstring data_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, jstring data_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKStr data_arg_conv = java_to_owned_str(env, data_arg); - LDKErrorMessage ret_var = ErrorMessage_new(channel_id_arg_ref, data_arg_conv); + LDKErrorMessage ret_var = ErrorMessage_new(channel_id_arg_conv, data_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -46553,27 +50836,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WarningMessage_1free(JNIEnv *e WarningMessage_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_WarningMessage_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_WarningMessage_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKWarningMessage this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *WarningMessage_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = WarningMessage_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WarningMessage_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WarningMessage_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKWarningMessage this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - WarningMessage_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + WarningMessage_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT jstring JNICALL Java_org_ldk_impl_bindings_WarningMessage_1get_1data(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -46598,12 +50885,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WarningMessage_1set_1data(JNIE WarningMessage_set_data(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_WarningMessage_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, jstring data_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_WarningMessage_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, jstring data_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKStr data_arg_conv = java_to_owned_str(env, data_arg); - LDKWarningMessage ret_var = WarningMessage_new(channel_id_arg_ref, data_arg_conv); + LDKWarningMessage ret_var = WarningMessage_new(channel_id_arg_conv, data_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -46864,27 +51153,27 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Pong_1eq(JNIEnv *env, jcla return ret_conv; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1free(JNIEnv *env, jclass clz, int64_t this_obj) { - LDKOpenChannel this_obj_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKCommonOpenChannelFields this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); this_obj_conv.is_owned = ptr_is_owned(this_obj); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - OpenChannel_free(this_obj_conv); + CommonOpenChannelFields_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *OpenChannel_get_chain_hash(&this_ptr_conv)); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *CommonOpenChannelFields_get_chain_hash(&this_ptr_conv)); return ret_arr; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -46892,216 +51181,182 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1chain_1hash( LDKThirtyTwoBytes val_ref; CHECK((*env)->GetArrayLength(env, val) == 32); (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - OpenChannel_set_chain_hash(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_chain_hash(&this_ptr_conv, val_ref); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *OpenChannel_get_temporary_channel_id(&this_ptr_conv)); - return ret_arr; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - OpenChannel_set_temporary_channel_id(&this_ptr_conv, val_ref); -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_funding_satoshis(&this_ptr_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannel_set_funding_satoshis(&this_ptr_conv, val); -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1push_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_push_msat(&this_ptr_conv); - return ret_conv; + LDKChannelId ret_var = CommonOpenChannelFields_get_temporary_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1push_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_push_msat(&this_ptr_conv, val); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + CommonOpenChannelFields_set_temporary_channel_id(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_dust_limit_satoshis(&this_ptr_conv); + int64_t ret_conv = CommonOpenChannelFields_get_funding_satoshis(&this_ptr_conv); return ret_conv; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_dust_limit_satoshis(&this_ptr_conv, val); + CommonOpenChannelFields_set_funding_satoshis(&this_ptr_conv, val); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_max_htlc_value_in_flight_msat(&this_ptr_conv); + int64_t ret_conv = CommonOpenChannelFields_get_dust_limit_satoshis(&this_ptr_conv); return ret_conv; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); + CommonOpenChannelFields_set_dust_limit_satoshis(&this_ptr_conv, val); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_channel_reserve_satoshis(&this_ptr_conv); + int64_t ret_conv = CommonOpenChannelFields_get_max_htlc_value_in_flight_msat(&this_ptr_conv); return ret_conv; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_channel_reserve_satoshis(&this_ptr_conv, val); + CommonOpenChannelFields_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_htlc_minimum_msat(&this_ptr_conv); + int64_t ret_conv = CommonOpenChannelFields_get_htlc_minimum_msat(&this_ptr_conv); return ret_conv; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_htlc_minimum_msat(&this_ptr_conv, val); + CommonOpenChannelFields_set_htlc_minimum_msat(&this_ptr_conv, val); } -JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1feerate_1per_1kw(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1commitment_1feerate_1sat_1per_11000_1weight(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int32_t ret_conv = OpenChannel_get_feerate_per_kw(&this_ptr_conv); + int32_t ret_conv = CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight(&this_ptr_conv); return ret_conv; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1feerate_1per_1kw(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1commitment_1feerate_1sat_1per_11000_1weight(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_feerate_per_kw(&this_ptr_conv, val); + CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight(&this_ptr_conv, val); } -JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int16_t ret_conv = OpenChannel_get_to_self_delay(&this_ptr_conv); + int16_t ret_conv = CommonOpenChannelFields_get_to_self_delay(&this_ptr_conv); return ret_conv; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_to_self_delay(&this_ptr_conv, val); + CommonOpenChannelFields_set_to_self_delay(&this_ptr_conv, val); } -JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int16_t ret_conv = OpenChannel_get_max_accepted_htlcs(&this_ptr_conv); + int16_t ret_conv = CommonOpenChannelFields_get_max_accepted_htlcs(&this_ptr_conv); return ret_conv; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_max_accepted_htlcs(&this_ptr_conv, val); + CommonOpenChannelFields_set_max_accepted_htlcs(&this_ptr_conv, val); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_funding_pubkey(&this_ptr_conv).compressed_form); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_funding_pubkey(&this_ptr_conv).compressed_form); return ret_arr; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -47109,22 +51364,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1funding_1pub LDKPublicKey val_ref; CHECK((*env)->GetArrayLength(env, val) == 33); (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - OpenChannel_set_funding_pubkey(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_funding_pubkey(&this_ptr_conv, val_ref); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_revocation_basepoint(&this_ptr_conv).compressed_form); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_revocation_basepoint(&this_ptr_conv).compressed_form); return ret_arr; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -47132,22 +51387,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1revocation_1 LDKPublicKey val_ref; CHECK((*env)->GetArrayLength(env, val) == 33); (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - OpenChannel_set_revocation_basepoint(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_revocation_basepoint(&this_ptr_conv, val_ref); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1payment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_payment_point(&this_ptr_conv).compressed_form); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_payment_basepoint(&this_ptr_conv).compressed_form); return ret_arr; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1payment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -47155,22 +51410,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1payment_1poi LDKPublicKey val_ref; CHECK((*env)->GetArrayLength(env, val) == 33); (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - OpenChannel_set_payment_point(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_payment_basepoint(&this_ptr_conv, val_ref); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form); return ret_arr; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -47178,22 +51433,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1delayed_1pay LDKPublicKey val_ref; CHECK((*env)->GetArrayLength(env, val) == 33); (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - OpenChannel_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_htlc_basepoint(&this_ptr_conv).compressed_form); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_htlc_basepoint(&this_ptr_conv).compressed_form); return ret_arr; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -47201,22 +51456,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1htlc_1basepo LDKPublicKey val_ref; CHECK((*env)->GetArrayLength(env, val) == 33); (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - OpenChannel_set_htlc_basepoint(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_htlc_basepoint(&this_ptr_conv, val_ref); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_first_per_commitment_point(&this_ptr_conv).compressed_form); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_first_per_commitment_point(&this_ptr_conv).compressed_form); return ret_arr; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -47224,42 +51479,42 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1first_1per_1 LDKPublicKey val_ref; CHECK((*env)->GetArrayLength(env, val) == 33); (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - OpenChannel_set_first_per_commitment_point(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_first_per_commitment_point(&this_ptr_conv, val_ref); } -JNIEXPORT int8_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int8_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_t ret_conv = OpenChannel_get_channel_flags(&this_ptr_conv); + int8_t ret_conv = CommonOpenChannelFields_get_channel_flags(&this_ptr_conv); return ret_conv; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr, int8_t val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr, int8_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_channel_flags(&this_ptr_conv, val); + CommonOpenChannelFields_set_channel_flags(&this_ptr_conv, val); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ"); - *ret_copy = OpenChannel_get_shutdown_scriptpubkey(&this_ptr_conv); + *ret_copy = CommonOpenChannelFields_get_shutdown_scriptpubkey(&this_ptr_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -47268,24 +51523,24 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1shutdown_1sc CHECK_ACCESS(val_ptr); LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr); val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val)); - OpenChannel_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); + CommonOpenChannelFields_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures ret_var = OpenChannel_get_channel_type(&this_ptr_conv); + LDKChannelTypeFeatures ret_var = CommonOpenChannelFields_get_channel_type(&this_ptr_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -47295,25 +51550,27 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1typ val_conv.is_owned = ptr_is_owned(val); CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); val_conv = ChannelTypeFeatures_clone(&val_conv); - OpenChannel_set_channel_type(&this_ptr_conv, val_conv); + CommonOpenChannelFields_set_channel_type(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1new(JNIEnv *env, jclass clz, int8_tArray chain_hash_arg, int8_tArray temporary_channel_id_arg, int64_t funding_satoshis_arg, int64_t push_msat_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t channel_reserve_satoshis_arg, int64_t htlc_minimum_msat_arg, int32_t feerate_per_kw_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_point_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_t channel_flags_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1new(JNIEnv *env, jclass clz, int8_tArray chain_hash_arg, int64_t temporary_channel_id_arg, int64_t funding_satoshis_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int32_t commitment_feerate_sat_per_1000_weight_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_t channel_flags_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg) { LDKThirtyTwoBytes chain_hash_arg_ref; CHECK((*env)->GetArrayLength(env, chain_hash_arg) == 32); (*env)->GetByteArrayRegion(env, chain_hash_arg, 0, 32, chain_hash_arg_ref.data); - LDKThirtyTwoBytes temporary_channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, temporary_channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, temporary_channel_id_arg, 0, 32, temporary_channel_id_arg_ref.data); + LDKChannelId temporary_channel_id_arg_conv; + temporary_channel_id_arg_conv.inner = untag_ptr(temporary_channel_id_arg); + temporary_channel_id_arg_conv.is_owned = ptr_is_owned(temporary_channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_arg_conv); + temporary_channel_id_arg_conv = ChannelId_clone(&temporary_channel_id_arg_conv); LDKPublicKey funding_pubkey_arg_ref; CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33); (*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form); LDKPublicKey revocation_basepoint_arg_ref; CHECK((*env)->GetArrayLength(env, revocation_basepoint_arg) == 33); (*env)->GetByteArrayRegion(env, revocation_basepoint_arg, 0, 33, revocation_basepoint_arg_ref.compressed_form); - LDKPublicKey payment_point_arg_ref; - CHECK((*env)->GetArrayLength(env, payment_point_arg) == 33); - (*env)->GetByteArrayRegion(env, payment_point_arg, 0, 33, payment_point_arg_ref.compressed_form); + LDKPublicKey payment_basepoint_arg_ref; + CHECK((*env)->GetArrayLength(env, payment_basepoint_arg) == 33); + (*env)->GetByteArrayRegion(env, payment_basepoint_arg, 0, 33, payment_basepoint_arg_ref.compressed_form); LDKPublicKey delayed_payment_basepoint_arg_ref; CHECK((*env)->GetArrayLength(env, delayed_payment_basepoint_arg) == 33); (*env)->GetByteArrayRegion(env, delayed_payment_basepoint_arg, 0, 33, delayed_payment_basepoint_arg_ref.compressed_form); @@ -47332,7 +51589,148 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1new(JNIEnv *en channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv); channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv); - LDKOpenChannel ret_var = OpenChannel_new(chain_hash_arg_ref, temporary_channel_id_arg_ref, funding_satoshis_arg, push_msat_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, feerate_per_kw_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_point_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, channel_flags_arg, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv); + LDKCommonOpenChannelFields ret_var = CommonOpenChannelFields_new(chain_hash_arg_ref, temporary_channel_id_arg_conv, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, commitment_feerate_sat_per_1000_weight_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, channel_flags_arg, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t CommonOpenChannelFields_clone_ptr(LDKCommonOpenChannelFields *NONNULL_PTR arg) { + LDKCommonOpenChannelFields ret_var = CommonOpenChannelFields_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCommonOpenChannelFields arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = CommonOpenChannelFields_clone_ptr(&arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCommonOpenChannelFields orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKCommonOpenChannelFields ret_var = CommonOpenChannelFields_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1hash(JNIEnv *env, jclass clz, int64_t o) { + LDKCommonOpenChannelFields o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = CommonOpenChannelFields_hash(&o_conv); + return ret_conv; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKCommonOpenChannelFields a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKCommonOpenChannelFields b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = CommonOpenChannelFields_eq(&a_conv, &b_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKOpenChannel this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + OpenChannel_free(this_obj_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCommonOpenChannelFields ret_var = OpenChannel_get_common_fields(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCommonOpenChannelFields val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = CommonOpenChannelFields_clone(&val_conv); + OpenChannel_set_common_fields(&this_ptr_conv, val_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1push_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int64_t ret_conv = OpenChannel_get_push_msat(&this_ptr_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1push_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + OpenChannel_set_push_msat(&this_ptr_conv, val); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int64_t ret_conv = OpenChannel_get_channel_reserve_satoshis(&this_ptr_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + OpenChannel_set_channel_reserve_satoshis(&this_ptr_conv, val); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1new(JNIEnv *env, jclass clz, int64_t common_fields_arg, int64_t push_msat_arg, int64_t channel_reserve_satoshis_arg) { + LDKCommonOpenChannelFields common_fields_arg_conv; + common_fields_arg_conv.inner = untag_ptr(common_fields_arg); + common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv); + common_fields_arg_conv = CommonOpenChannelFields_clone(&common_fields_arg_conv); + LDKOpenChannel ret_var = OpenChannel_new(common_fields_arg_conv, push_msat_arg, channel_reserve_satoshis_arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -47402,50 +51800,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1free(JNIEnv *en OpenChannelV2_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKOpenChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *OpenChannelV2_get_chain_hash(&this_ptr_conv)); - return ret_arr; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - OpenChannelV2_set_chain_hash(&this_ptr_conv, val_ref); -} - -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *OpenChannelV2_get_temporary_channel_id(&this_ptr_conv)); - return ret_arr; + LDKCommonOpenChannelFields ret_var = OpenChannelV2_get_common_fields(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKOpenChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - OpenChannelV2_set_temporary_channel_id(&this_ptr_conv, val_ref); + LDKCommonOpenChannelFields val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = CommonOpenChannelFields_clone(&val_conv); + OpenChannelV2_set_common_fields(&this_ptr_conv, val_conv); } JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1funding_1feerate_1sat_1per_11000_1weight(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -47467,139 +51846,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1funding_1f OpenChannelV2_set_funding_feerate_sat_per_1000_weight(&this_ptr_conv, val); } -JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1commitment_1feerate_1sat_1per_11000_1weight(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int32_t ret_conv = OpenChannelV2_get_commitment_feerate_sat_per_1000_weight(&this_ptr_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1commitment_1feerate_1sat_1per_11000_1weight(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_commitment_feerate_sat_per_1000_weight(&this_ptr_conv, val); -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannelV2_get_funding_satoshis(&this_ptr_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_funding_satoshis(&this_ptr_conv, val); -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannelV2_get_dust_limit_satoshis(&this_ptr_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_dust_limit_satoshis(&this_ptr_conv, val); -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannelV2_get_max_htlc_value_in_flight_msat(&this_ptr_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannelV2_get_htlc_minimum_msat(&this_ptr_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_htlc_minimum_msat(&this_ptr_conv, val); -} - -JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int16_t ret_conv = OpenChannelV2_get_to_self_delay(&this_ptr_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_to_self_delay(&this_ptr_conv, val); -} - -JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int16_t ret_conv = OpenChannelV2_get_max_accepted_htlcs(&this_ptr_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_max_accepted_htlcs(&this_ptr_conv, val); -} - JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1locktime(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKOpenChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -47619,144 +51865,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1locktime(J OpenChannelV2_set_locktime(&this_ptr_conv, val); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_funding_pubkey(&this_ptr_conv).compressed_form); - return ret_arr; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK((*env)->GetArrayLength(env, val) == 33); - (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - OpenChannelV2_set_funding_pubkey(&this_ptr_conv, val_ref); -} - -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_revocation_basepoint(&this_ptr_conv).compressed_form); - return ret_arr; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK((*env)->GetArrayLength(env, val) == 33); - (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - OpenChannelV2_set_revocation_basepoint(&this_ptr_conv, val_ref); -} - -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_payment_basepoint(&this_ptr_conv).compressed_form); - return ret_arr; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK((*env)->GetArrayLength(env, val) == 33); - (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - OpenChannelV2_set_payment_basepoint(&this_ptr_conv, val_ref); -} - -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form); - return ret_arr; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK((*env)->GetArrayLength(env, val) == 33); - (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - OpenChannelV2_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); -} - -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_htlc_basepoint(&this_ptr_conv).compressed_form); - return ret_arr; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK((*env)->GetArrayLength(env, val) == 33); - (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - OpenChannelV2_set_htlc_basepoint(&this_ptr_conv, val_ref); -} - -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_first_per_commitment_point(&this_ptr_conv).compressed_form); - return ret_arr; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK((*env)->GetArrayLength(env, val) == 33); - (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - OpenChannelV2_set_first_per_commitment_point(&this_ptr_conv, val_ref); -} - JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1second_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKOpenChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -47780,77 +51888,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1second_1pe OpenChannelV2_set_second_per_commitment_point(&this_ptr_conv, val_ref); } -JNIEXPORT int8_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_t ret_conv = OpenChannelV2_get_channel_flags(&this_ptr_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr, int8_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_channel_flags(&this_ptr_conv, val); -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ"); - *ret_copy = OpenChannelV2_get_shutdown_scriptpubkey(&this_ptr_conv); - int64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - void* val_ptr = untag_ptr(val); - CHECK_ACCESS(val_ptr); - LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr); - val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val)); - OpenChannelV2_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures ret_var = OpenChannelV2_get_channel_type(&this_ptr_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures val_conv; - val_conv.inner = untag_ptr(val); - val_conv.is_owned = ptr_is_owned(val); - CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); - val_conv = ChannelTypeFeatures_clone(&val_conv); - OpenChannelV2_set_channel_type(&this_ptr_conv, val_conv); -} - JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1require_1confirmed_1inputs(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKOpenChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -47871,45 +51908,17 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1require_1c OpenChannelV2_set_require_confirmed_inputs(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1new(JNIEnv *env, jclass clz, int8_tArray chain_hash_arg, int8_tArray temporary_channel_id_arg, int32_t funding_feerate_sat_per_1000_weight_arg, int32_t commitment_feerate_sat_per_1000_weight_arg, int64_t funding_satoshis_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int32_t locktime_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_tArray second_per_commitment_point_arg, int8_t channel_flags_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg, jclass require_confirmed_inputs_arg) { - LDKThirtyTwoBytes chain_hash_arg_ref; - CHECK((*env)->GetArrayLength(env, chain_hash_arg) == 32); - (*env)->GetByteArrayRegion(env, chain_hash_arg, 0, 32, chain_hash_arg_ref.data); - LDKThirtyTwoBytes temporary_channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, temporary_channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, temporary_channel_id_arg, 0, 32, temporary_channel_id_arg_ref.data); - LDKPublicKey funding_pubkey_arg_ref; - CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33); - (*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form); - LDKPublicKey revocation_basepoint_arg_ref; - CHECK((*env)->GetArrayLength(env, revocation_basepoint_arg) == 33); - (*env)->GetByteArrayRegion(env, revocation_basepoint_arg, 0, 33, revocation_basepoint_arg_ref.compressed_form); - LDKPublicKey payment_basepoint_arg_ref; - CHECK((*env)->GetArrayLength(env, payment_basepoint_arg) == 33); - (*env)->GetByteArrayRegion(env, payment_basepoint_arg, 0, 33, payment_basepoint_arg_ref.compressed_form); - LDKPublicKey delayed_payment_basepoint_arg_ref; - CHECK((*env)->GetArrayLength(env, delayed_payment_basepoint_arg) == 33); - (*env)->GetByteArrayRegion(env, delayed_payment_basepoint_arg, 0, 33, delayed_payment_basepoint_arg_ref.compressed_form); - LDKPublicKey htlc_basepoint_arg_ref; - CHECK((*env)->GetArrayLength(env, htlc_basepoint_arg) == 33); - (*env)->GetByteArrayRegion(env, htlc_basepoint_arg, 0, 33, htlc_basepoint_arg_ref.compressed_form); - LDKPublicKey first_per_commitment_point_arg_ref; - CHECK((*env)->GetArrayLength(env, first_per_commitment_point_arg) == 33); - (*env)->GetByteArrayRegion(env, first_per_commitment_point_arg, 0, 33, first_per_commitment_point_arg_ref.compressed_form); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1new(JNIEnv *env, jclass clz, int64_t common_fields_arg, int32_t funding_feerate_sat_per_1000_weight_arg, int32_t locktime_arg, int8_tArray second_per_commitment_point_arg, jclass require_confirmed_inputs_arg) { + LDKCommonOpenChannelFields common_fields_arg_conv; + common_fields_arg_conv.inner = untag_ptr(common_fields_arg); + common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv); + common_fields_arg_conv = CommonOpenChannelFields_clone(&common_fields_arg_conv); LDKPublicKey second_per_commitment_point_arg_ref; CHECK((*env)->GetArrayLength(env, second_per_commitment_point_arg) == 33); (*env)->GetByteArrayRegion(env, second_per_commitment_point_arg, 0, 33, second_per_commitment_point_arg_ref.compressed_form); - void* shutdown_scriptpubkey_arg_ptr = untag_ptr(shutdown_scriptpubkey_arg); - CHECK_ACCESS(shutdown_scriptpubkey_arg_ptr); - LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg_conv = *(LDKCOption_CVec_u8ZZ*)(shutdown_scriptpubkey_arg_ptr); - shutdown_scriptpubkey_arg_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(shutdown_scriptpubkey_arg)); - LDKChannelTypeFeatures channel_type_arg_conv; - channel_type_arg_conv.inner = untag_ptr(channel_type_arg); - channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv); - channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv); LDKCOption_NoneZ require_confirmed_inputs_arg_conv = LDKCOption_NoneZ_from_java(env, require_confirmed_inputs_arg); - LDKOpenChannelV2 ret_var = OpenChannelV2_new(chain_hash_arg_ref, temporary_channel_id_arg_ref, funding_feerate_sat_per_1000_weight_arg, commitment_feerate_sat_per_1000_weight_arg, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, to_self_delay_arg, max_accepted_htlcs_arg, locktime_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, second_per_commitment_point_arg_ref, channel_flags_arg, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv, require_confirmed_inputs_arg_conv); + LDKOpenChannelV2 ret_var = OpenChannelV2_new(common_fields_arg_conv, funding_feerate_sat_per_1000_weight_arg, locktime_arg, second_per_commitment_point_arg_ref, require_confirmed_inputs_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -47971,183 +51980,168 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1eq(JNIEnv * return ret_conv; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1free(JNIEnv *env, jclass clz, int64_t this_obj) { - LDKAcceptChannel this_obj_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKCommonAcceptChannelFields this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); this_obj_conv.is_owned = ptr_is_owned(this_obj); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - AcceptChannel_free(this_obj_conv); + CommonAcceptChannelFields_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *AcceptChannel_get_temporary_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = CommonAcceptChannelFields_get_temporary_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - AcceptChannel_set_temporary_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + CommonAcceptChannelFields_set_temporary_channel_id(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannel_get_dust_limit_satoshis(&this_ptr_conv); + int64_t ret_conv = CommonAcceptChannelFields_get_dust_limit_satoshis(&this_ptr_conv); return ret_conv; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_dust_limit_satoshis(&this_ptr_conv, val); + CommonAcceptChannelFields_set_dust_limit_satoshis(&this_ptr_conv, val); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannel_get_max_htlc_value_in_flight_msat(&this_ptr_conv); + int64_t ret_conv = CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat(&this_ptr_conv); return ret_conv; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); + CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannel_get_channel_reserve_satoshis(&this_ptr_conv); + int64_t ret_conv = CommonAcceptChannelFields_get_htlc_minimum_msat(&this_ptr_conv); return ret_conv; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_channel_reserve_satoshis(&this_ptr_conv, val); + CommonAcceptChannelFields_set_htlc_minimum_msat(&this_ptr_conv, val); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannel_get_htlc_minimum_msat(&this_ptr_conv); + int32_t ret_conv = CommonAcceptChannelFields_get_minimum_depth(&this_ptr_conv); return ret_conv; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_htlc_minimum_msat(&this_ptr_conv, val); + CommonAcceptChannelFields_set_minimum_depth(&this_ptr_conv, val); } -JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int32_t ret_conv = AcceptChannel_get_minimum_depth(&this_ptr_conv); + int16_t ret_conv = CommonAcceptChannelFields_get_to_self_delay(&this_ptr_conv); return ret_conv; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_minimum_depth(&this_ptr_conv, val); + CommonAcceptChannelFields_set_to_self_delay(&this_ptr_conv, val); } -JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int16_t ret_conv = AcceptChannel_get_to_self_delay(&this_ptr_conv); + int16_t ret_conv = CommonAcceptChannelFields_get_max_accepted_htlcs(&this_ptr_conv); return ret_conv; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_to_self_delay(&this_ptr_conv, val); + CommonAcceptChannelFields_set_max_accepted_htlcs(&this_ptr_conv, val); } -JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int16_t ret_conv = AcceptChannel_get_max_accepted_htlcs(&this_ptr_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) { - LDKAcceptChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannel_set_max_accepted_htlcs(&this_ptr_conv, val); -} - -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_funding_pubkey(&this_ptr_conv).compressed_form); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_funding_pubkey(&this_ptr_conv).compressed_form); return ret_arr; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -48155,22 +52149,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1funding_1p LDKPublicKey val_ref; CHECK((*env)->GetArrayLength(env, val) == 33); (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - AcceptChannel_set_funding_pubkey(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_funding_pubkey(&this_ptr_conv, val_ref); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_revocation_basepoint(&this_ptr_conv).compressed_form); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_revocation_basepoint(&this_ptr_conv).compressed_form); return ret_arr; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -48178,22 +52172,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1revocation LDKPublicKey val_ref; CHECK((*env)->GetArrayLength(env, val) == 33); (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - AcceptChannel_set_revocation_basepoint(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_revocation_basepoint(&this_ptr_conv, val_ref); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1payment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_payment_point(&this_ptr_conv).compressed_form); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_payment_basepoint(&this_ptr_conv).compressed_form); return ret_arr; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1payment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -48201,22 +52195,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1payment_1p LDKPublicKey val_ref; CHECK((*env)->GetArrayLength(env, val) == 33); (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - AcceptChannel_set_payment_point(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_payment_basepoint(&this_ptr_conv, val_ref); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form); return ret_arr; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -48224,22 +52218,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1delayed_1p LDKPublicKey val_ref; CHECK((*env)->GetArrayLength(env, val) == 33); (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - AcceptChannel_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_htlc_basepoint(&this_ptr_conv).compressed_form); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_htlc_basepoint(&this_ptr_conv).compressed_form); return ret_arr; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -48247,22 +52241,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1htlc_1base LDKPublicKey val_ref; CHECK((*env)->GetArrayLength(env, val) == 33); (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - AcceptChannel_set_htlc_basepoint(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_htlc_basepoint(&this_ptr_conv, val_ref); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_first_per_commitment_point(&this_ptr_conv).compressed_form); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_first_per_commitment_point(&this_ptr_conv).compressed_form); return ret_arr; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -48270,23 +52264,23 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1first_1per LDKPublicKey val_ref; CHECK((*env)->GetArrayLength(env, val) == 33); (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - AcceptChannel_set_first_per_commitment_point(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_first_per_commitment_point(&this_ptr_conv, val_ref); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ"); - *ret_copy = AcceptChannel_get_shutdown_scriptpubkey(&this_ptr_conv); + *ret_copy = CommonAcceptChannelFields_get_shutdown_scriptpubkey(&this_ptr_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -48295,24 +52289,24 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1shutdown_1 CHECK_ACCESS(val_ptr); LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr); val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val)); - AcceptChannel_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); + CommonAcceptChannelFields_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures ret_var = AcceptChannel_get_channel_type(&this_ptr_conv); + LDKChannelTypeFeatures ret_var = CommonAcceptChannelFields_get_channel_type(&this_ptr_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -48322,22 +52316,24 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1t val_conv.is_owned = ptr_is_owned(val); CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); val_conv = ChannelTypeFeatures_clone(&val_conv); - AcceptChannel_set_channel_type(&this_ptr_conv, val_conv); + CommonAcceptChannelFields_set_channel_type(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1new(JNIEnv *env, jclass clz, int8_tArray temporary_channel_id_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t channel_reserve_satoshis_arg, int64_t htlc_minimum_msat_arg, int32_t minimum_depth_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_point_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg) { - LDKThirtyTwoBytes temporary_channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, temporary_channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, temporary_channel_id_arg, 0, 32, temporary_channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1new(JNIEnv *env, jclass clz, int64_t temporary_channel_id_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int32_t minimum_depth_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg) { + LDKChannelId temporary_channel_id_arg_conv; + temporary_channel_id_arg_conv.inner = untag_ptr(temporary_channel_id_arg); + temporary_channel_id_arg_conv.is_owned = ptr_is_owned(temporary_channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_arg_conv); + temporary_channel_id_arg_conv = ChannelId_clone(&temporary_channel_id_arg_conv); LDKPublicKey funding_pubkey_arg_ref; CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33); (*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form); LDKPublicKey revocation_basepoint_arg_ref; CHECK((*env)->GetArrayLength(env, revocation_basepoint_arg) == 33); (*env)->GetByteArrayRegion(env, revocation_basepoint_arg, 0, 33, revocation_basepoint_arg_ref.compressed_form); - LDKPublicKey payment_point_arg_ref; - CHECK((*env)->GetArrayLength(env, payment_point_arg) == 33); - (*env)->GetByteArrayRegion(env, payment_point_arg, 0, 33, payment_point_arg_ref.compressed_form); + LDKPublicKey payment_basepoint_arg_ref; + CHECK((*env)->GetArrayLength(env, payment_basepoint_arg) == 33); + (*env)->GetByteArrayRegion(env, payment_basepoint_arg, 0, 33, payment_basepoint_arg_ref.compressed_form); LDKPublicKey delayed_payment_basepoint_arg_ref; CHECK((*env)->GetArrayLength(env, delayed_payment_basepoint_arg) == 33); (*env)->GetByteArrayRegion(env, delayed_payment_basepoint_arg, 0, 33, delayed_payment_basepoint_arg_ref.compressed_form); @@ -48356,7 +52352,129 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1new(JNIEnv * channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv); channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv); - LDKAcceptChannel ret_var = AcceptChannel_new(temporary_channel_id_arg_ref, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_point_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv); + LDKCommonAcceptChannelFields ret_var = CommonAcceptChannelFields_new(temporary_channel_id_arg_conv, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t CommonAcceptChannelFields_clone_ptr(LDKCommonAcceptChannelFields *NONNULL_PTR arg) { + LDKCommonAcceptChannelFields ret_var = CommonAcceptChannelFields_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCommonAcceptChannelFields arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = CommonAcceptChannelFields_clone_ptr(&arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCommonAcceptChannelFields orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKCommonAcceptChannelFields ret_var = CommonAcceptChannelFields_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1hash(JNIEnv *env, jclass clz, int64_t o) { + LDKCommonAcceptChannelFields o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = CommonAcceptChannelFields_hash(&o_conv); + return ret_conv; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKCommonAcceptChannelFields a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKCommonAcceptChannelFields b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = CommonAcceptChannelFields_eq(&a_conv, &b_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKAcceptChannel this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + AcceptChannel_free(this_obj_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKAcceptChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCommonAcceptChannelFields ret_var = AcceptChannel_get_common_fields(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKAcceptChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCommonAcceptChannelFields val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = CommonAcceptChannelFields_clone(&val_conv); + AcceptChannel_set_common_fields(&this_ptr_conv, val_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKAcceptChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int64_t ret_conv = AcceptChannel_get_channel_reserve_satoshis(&this_ptr_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKAcceptChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + AcceptChannel_set_channel_reserve_satoshis(&this_ptr_conv, val); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1new(JNIEnv *env, jclass clz, int64_t common_fields_arg, int64_t channel_reserve_satoshis_arg) { + LDKCommonAcceptChannelFields common_fields_arg_conv; + common_fields_arg_conv.inner = untag_ptr(common_fields_arg); + common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv); + common_fields_arg_conv = CommonAcceptChannelFields_clone(&common_fields_arg_conv); + LDKAcceptChannel ret_var = AcceptChannel_new(common_fields_arg_conv, channel_reserve_satoshis_arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -48426,27 +52544,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1free(JNIEnv * AcceptChannelV2_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKAcceptChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *AcceptChannelV2_get_temporary_channel_id(&this_ptr_conv)); - return ret_arr; + LDKCommonAcceptChannelFields ret_var = AcceptChannelV2_get_common_fields(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKAcceptChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - AcceptChannelV2_set_temporary_channel_id(&this_ptr_conv, val_ref); + LDKCommonAcceptChannelFields val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = CommonAcceptChannelFields_clone(&val_conv); + AcceptChannelV2_set_common_fields(&this_ptr_conv, val_conv); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -48468,258 +52590,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1funding_ AcceptChannelV2_set_funding_satoshis(&this_ptr_conv, val); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannelV2_get_dust_limit_satoshis(&this_ptr_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_dust_limit_satoshis(&this_ptr_conv, val); -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannelV2_get_max_htlc_value_in_flight_msat(&this_ptr_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannelV2_get_htlc_minimum_msat(&this_ptr_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_htlc_minimum_msat(&this_ptr_conv, val); -} - -JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int32_t ret_conv = AcceptChannelV2_get_minimum_depth(&this_ptr_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_minimum_depth(&this_ptr_conv, val); -} - -JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int16_t ret_conv = AcceptChannelV2_get_to_self_delay(&this_ptr_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_to_self_delay(&this_ptr_conv, val); -} - -JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int16_t ret_conv = AcceptChannelV2_get_max_accepted_htlcs(&this_ptr_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_max_accepted_htlcs(&this_ptr_conv, val); -} - -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_funding_pubkey(&this_ptr_conv).compressed_form); - return ret_arr; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK((*env)->GetArrayLength(env, val) == 33); - (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - AcceptChannelV2_set_funding_pubkey(&this_ptr_conv, val_ref); -} - -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_revocation_basepoint(&this_ptr_conv).compressed_form); - return ret_arr; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK((*env)->GetArrayLength(env, val) == 33); - (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - AcceptChannelV2_set_revocation_basepoint(&this_ptr_conv, val_ref); -} - -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_payment_basepoint(&this_ptr_conv).compressed_form); - return ret_arr; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK((*env)->GetArrayLength(env, val) == 33); - (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - AcceptChannelV2_set_payment_basepoint(&this_ptr_conv, val_ref); -} - -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form); - return ret_arr; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK((*env)->GetArrayLength(env, val) == 33); - (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - AcceptChannelV2_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); -} - -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_htlc_basepoint(&this_ptr_conv).compressed_form); - return ret_arr; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK((*env)->GetArrayLength(env, val) == 33); - (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - AcceptChannelV2_set_htlc_basepoint(&this_ptr_conv, val_ref); -} - -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_first_per_commitment_point(&this_ptr_conv).compressed_form); - return ret_arr; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK((*env)->GetArrayLength(env, val) == 33); - (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - AcceptChannelV2_set_first_per_commitment_point(&this_ptr_conv, val_ref); -} - JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1second_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKAcceptChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -48743,58 +52613,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1second_1 AcceptChannelV2_set_second_per_commitment_point(&this_ptr_conv, val_ref); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ"); - *ret_copy = AcceptChannelV2_get_shutdown_scriptpubkey(&this_ptr_conv); - int64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - void* val_ptr = untag_ptr(val); - CHECK_ACCESS(val_ptr); - LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr); - val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val)); - AcceptChannelV2_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures ret_var = AcceptChannelV2_get_channel_type(&this_ptr_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures val_conv; - val_conv.inner = untag_ptr(val); - val_conv.is_owned = ptr_is_owned(val); - CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); - val_conv = ChannelTypeFeatures_clone(&val_conv); - AcceptChannelV2_set_channel_type(&this_ptr_conv, val_conv); -} - JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1require_1confirmed_1inputs(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKAcceptChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -48815,42 +52633,17 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1require_ AcceptChannelV2_set_require_confirmed_inputs(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1new(JNIEnv *env, jclass clz, int8_tArray temporary_channel_id_arg, int64_t funding_satoshis_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int32_t minimum_depth_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_tArray second_per_commitment_point_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg, jclass require_confirmed_inputs_arg) { - LDKThirtyTwoBytes temporary_channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, temporary_channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, temporary_channel_id_arg, 0, 32, temporary_channel_id_arg_ref.data); - LDKPublicKey funding_pubkey_arg_ref; - CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33); - (*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form); - LDKPublicKey revocation_basepoint_arg_ref; - CHECK((*env)->GetArrayLength(env, revocation_basepoint_arg) == 33); - (*env)->GetByteArrayRegion(env, revocation_basepoint_arg, 0, 33, revocation_basepoint_arg_ref.compressed_form); - LDKPublicKey payment_basepoint_arg_ref; - CHECK((*env)->GetArrayLength(env, payment_basepoint_arg) == 33); - (*env)->GetByteArrayRegion(env, payment_basepoint_arg, 0, 33, payment_basepoint_arg_ref.compressed_form); - LDKPublicKey delayed_payment_basepoint_arg_ref; - CHECK((*env)->GetArrayLength(env, delayed_payment_basepoint_arg) == 33); - (*env)->GetByteArrayRegion(env, delayed_payment_basepoint_arg, 0, 33, delayed_payment_basepoint_arg_ref.compressed_form); - LDKPublicKey htlc_basepoint_arg_ref; - CHECK((*env)->GetArrayLength(env, htlc_basepoint_arg) == 33); - (*env)->GetByteArrayRegion(env, htlc_basepoint_arg, 0, 33, htlc_basepoint_arg_ref.compressed_form); - LDKPublicKey first_per_commitment_point_arg_ref; - CHECK((*env)->GetArrayLength(env, first_per_commitment_point_arg) == 33); - (*env)->GetByteArrayRegion(env, first_per_commitment_point_arg, 0, 33, first_per_commitment_point_arg_ref.compressed_form); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1new(JNIEnv *env, jclass clz, int64_t common_fields_arg, int64_t funding_satoshis_arg, int8_tArray second_per_commitment_point_arg, jclass require_confirmed_inputs_arg) { + LDKCommonAcceptChannelFields common_fields_arg_conv; + common_fields_arg_conv.inner = untag_ptr(common_fields_arg); + common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv); + common_fields_arg_conv = CommonAcceptChannelFields_clone(&common_fields_arg_conv); LDKPublicKey second_per_commitment_point_arg_ref; CHECK((*env)->GetArrayLength(env, second_per_commitment_point_arg) == 33); (*env)->GetByteArrayRegion(env, second_per_commitment_point_arg, 0, 33, second_per_commitment_point_arg_ref.compressed_form); - void* shutdown_scriptpubkey_arg_ptr = untag_ptr(shutdown_scriptpubkey_arg); - CHECK_ACCESS(shutdown_scriptpubkey_arg_ptr); - LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg_conv = *(LDKCOption_CVec_u8ZZ*)(shutdown_scriptpubkey_arg_ptr); - shutdown_scriptpubkey_arg_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(shutdown_scriptpubkey_arg)); - LDKChannelTypeFeatures channel_type_arg_conv; - channel_type_arg_conv.inner = untag_ptr(channel_type_arg); - channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv); - channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv); LDKCOption_NoneZ require_confirmed_inputs_arg_conv = LDKCOption_NoneZ_from_java(env, require_confirmed_inputs_arg); - LDKAcceptChannelV2 ret_var = AcceptChannelV2_new(temporary_channel_id_arg_ref, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, second_per_commitment_point_arg_ref, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv, require_confirmed_inputs_arg_conv); + LDKAcceptChannelV2 ret_var = AcceptChannelV2_new(common_fields_arg_conv, funding_satoshis_arg, second_per_commitment_point_arg_ref, require_confirmed_inputs_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -48920,27 +52713,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1free(JNIEnv *e FundingCreated_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKFundingCreated this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *FundingCreated_get_temporary_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = FundingCreated_get_temporary_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKFundingCreated this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - FundingCreated_set_temporary_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + FundingCreated_set_temporary_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1funding_1txid(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -49008,17 +52805,19 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1signature FundingCreated_set_signature(&this_ptr_conv, val_ref); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingCreated_1new(JNIEnv *env, jclass clz, int8_tArray temporary_channel_id_arg, int8_tArray funding_txid_arg, int16_t funding_output_index_arg, int8_tArray signature_arg) { - LDKThirtyTwoBytes temporary_channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, temporary_channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, temporary_channel_id_arg, 0, 32, temporary_channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingCreated_1new(JNIEnv *env, jclass clz, int64_t temporary_channel_id_arg, int8_tArray funding_txid_arg, int16_t funding_output_index_arg, int8_tArray signature_arg) { + LDKChannelId temporary_channel_id_arg_conv; + temporary_channel_id_arg_conv.inner = untag_ptr(temporary_channel_id_arg); + temporary_channel_id_arg_conv.is_owned = ptr_is_owned(temporary_channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_arg_conv); + temporary_channel_id_arg_conv = ChannelId_clone(&temporary_channel_id_arg_conv); LDKThirtyTwoBytes funding_txid_arg_ref; CHECK((*env)->GetArrayLength(env, funding_txid_arg) == 32); (*env)->GetByteArrayRegion(env, funding_txid_arg, 0, 32, funding_txid_arg_ref.data); LDKECDSASignature signature_arg_ref; CHECK((*env)->GetArrayLength(env, signature_arg) == 64); (*env)->GetByteArrayRegion(env, signature_arg, 0, 64, signature_arg_ref.compact_form); - LDKFundingCreated ret_var = FundingCreated_new(temporary_channel_id_arg_ref, funding_txid_arg_ref, funding_output_index_arg, signature_arg_ref); + LDKFundingCreated ret_var = FundingCreated_new(temporary_channel_id_arg_conv, funding_txid_arg_ref, funding_output_index_arg, signature_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -49088,27 +52887,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1free(JNIEnv *en FundingSigned_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKFundingSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *FundingSigned_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = FundingSigned_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKFundingSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - FundingSigned_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + FundingSigned_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingSigned_1get_1signature(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -49134,14 +52937,16 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1set_1signature( FundingSigned_set_signature(&this_ptr_conv, val_ref); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingSigned_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray signature_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingSigned_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray signature_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKECDSASignature signature_arg_ref; CHECK((*env)->GetArrayLength(env, signature_arg) == 64); (*env)->GetByteArrayRegion(env, signature_arg, 0, 64, signature_arg_ref.compact_form); - LDKFundingSigned ret_var = FundingSigned_new(channel_id_arg_ref, signature_arg_ref); + LDKFundingSigned ret_var = FundingSigned_new(channel_id_arg_conv, signature_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -49211,27 +53016,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReady_1free(JNIEnv *env ChannelReady_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelReady_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReady_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKChannelReady this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ChannelReady_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = ChannelReady_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReady_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReady_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKChannelReady this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - ChannelReady_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ChannelReady_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelReady_1get_1next_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -49282,10 +53091,12 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReady_1set_1short_1chan ChannelReady_set_short_channel_id_alias(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReady_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray next_per_commitment_point_arg, int64_t short_channel_id_alias_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReady_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray next_per_commitment_point_arg, int64_t short_channel_id_alias_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKPublicKey next_per_commitment_point_arg_ref; CHECK((*env)->GetArrayLength(env, next_per_commitment_point_arg) == 33); (*env)->GetByteArrayRegion(env, next_per_commitment_point_arg, 0, 33, next_per_commitment_point_arg_ref.compressed_form); @@ -49293,7 +53104,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReady_1new(JNIEnv *e CHECK_ACCESS(short_channel_id_alias_arg_ptr); LDKCOption_u64Z short_channel_id_alias_arg_conv = *(LDKCOption_u64Z*)(short_channel_id_alias_arg_ptr); short_channel_id_alias_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(short_channel_id_alias_arg)); - LDKChannelReady ret_var = ChannelReady_new(channel_id_arg_ref, next_per_commitment_point_arg_ref, short_channel_id_alias_arg_conv); + LDKChannelReady ret_var = ChannelReady_new(channel_id_arg_conv, next_per_commitment_point_arg_ref, short_channel_id_alias_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -49363,27 +53174,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Stfu_1free(JNIEnv *env, jclass Stfu_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Stfu_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Stfu_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKStfu this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *Stfu_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = Stfu_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Stfu_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Stfu_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKStfu this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - Stfu_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + Stfu_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int8_t JNICALL Java_org_ldk_impl_bindings_Stfu_1get_1initiator(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -49405,11 +53220,13 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Stfu_1set_1initiator(JNIEnv *e Stfu_set_initiator(&this_ptr_conv, val); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Stfu_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_t initiator_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); - LDKStfu ret_var = Stfu_new(channel_id_arg_ref, initiator_arg); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Stfu_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_t initiator_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKStfu ret_var = Stfu_new(channel_id_arg_conv, initiator_arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -49469,27 +53286,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Splice_1free(JNIEnv *env, jcla Splice_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Splice_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Splice_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKSplice this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *Splice_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = Splice_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Splice_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Splice_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKSplice this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - Splice_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + Splice_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Splice_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -49595,17 +53416,19 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Splice_1set_1funding_1pubkey(J Splice_set_funding_pubkey(&this_ptr_conv, val_ref); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Splice_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int32_t funding_feerate_perkw_arg, int32_t locktime_arg, int8_tArray funding_pubkey_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Splice_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int32_t funding_feerate_perkw_arg, int32_t locktime_arg, int8_tArray funding_pubkey_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes chain_hash_arg_ref; CHECK((*env)->GetArrayLength(env, chain_hash_arg) == 32); (*env)->GetByteArrayRegion(env, chain_hash_arg, 0, 32, chain_hash_arg_ref.data); LDKPublicKey funding_pubkey_arg_ref; CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33); (*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form); - LDKSplice ret_var = Splice_new(channel_id_arg_ref, chain_hash_arg_ref, relative_satoshis_arg, funding_feerate_perkw_arg, locktime_arg, funding_pubkey_arg_ref); + LDKSplice ret_var = Splice_new(channel_id_arg_conv, chain_hash_arg_ref, relative_satoshis_arg, funding_feerate_perkw_arg, locktime_arg, funding_pubkey_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -49665,27 +53488,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceAck_1free(JNIEnv *env, j SpliceAck_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_SpliceAck_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceAck_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKSpliceAck this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *SpliceAck_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = SpliceAck_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceAck_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceAck_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKSpliceAck this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - SpliceAck_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + SpliceAck_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_SpliceAck_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -49753,17 +53580,19 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceAck_1set_1funding_1pubke SpliceAck_set_funding_pubkey(&this_ptr_conv, val_ref); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceAck_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int8_tArray funding_pubkey_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceAck_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int8_tArray funding_pubkey_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes chain_hash_arg_ref; CHECK((*env)->GetArrayLength(env, chain_hash_arg) == 32); (*env)->GetByteArrayRegion(env, chain_hash_arg, 0, 32, chain_hash_arg_ref.data); LDKPublicKey funding_pubkey_arg_ref; CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33); (*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form); - LDKSpliceAck ret_var = SpliceAck_new(channel_id_arg_ref, chain_hash_arg_ref, relative_satoshis_arg, funding_pubkey_arg_ref); + LDKSpliceAck ret_var = SpliceAck_new(channel_id_arg_conv, chain_hash_arg_ref, relative_satoshis_arg, funding_pubkey_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -49823,34 +53652,40 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1free(JNIEnv *env SpliceLocked_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKSpliceLocked this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *SpliceLocked_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = SpliceLocked_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKSpliceLocked this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - SpliceLocked_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + SpliceLocked_set_channel_id(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); - LDKSpliceLocked ret_var = SpliceLocked_new(channel_id_arg_ref); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKSpliceLocked ret_var = SpliceLocked_new(channel_id_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -49910,27 +53745,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddInput_1free(JNIEnv *env, TxAddInput_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxAddInput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddInput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKTxAddInput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxAddInput_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = TxAddInput_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddInput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddInput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKTxAddInput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - TxAddInput_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxAddInput_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddInput_1get_1serial_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -50017,16 +53856,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddInput_1set_1sequence(JNIE TxAddInput_set_sequence(&this_ptr_conv, val); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddInput_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t serial_id_arg, int64_t prevtx_arg, int32_t prevtx_out_arg, int32_t sequence_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddInput_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t serial_id_arg, int64_t prevtx_arg, int32_t prevtx_out_arg, int32_t sequence_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKTransactionU16LenLimited prevtx_arg_conv; prevtx_arg_conv.inner = untag_ptr(prevtx_arg); prevtx_arg_conv.is_owned = ptr_is_owned(prevtx_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(prevtx_arg_conv); prevtx_arg_conv = TransactionU16LenLimited_clone(&prevtx_arg_conv); - LDKTxAddInput ret_var = TxAddInput_new(channel_id_arg_ref, serial_id_arg, prevtx_arg_conv, prevtx_out_arg, sequence_arg); + LDKTxAddInput ret_var = TxAddInput_new(channel_id_arg_conv, serial_id_arg, prevtx_arg_conv, prevtx_out_arg, sequence_arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -50096,27 +53937,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1free(JNIEnv *env, TxAddOutput_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKTxAddOutput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxAddOutput_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = TxAddOutput_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKTxAddOutput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - TxAddOutput_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxAddOutput_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1get_1serial_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -50183,15 +54028,17 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1set_1script(JNIEn TxAddOutput_set_script(&this_ptr_conv, val_ref); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t serial_id_arg, int64_t sats_arg, int8_tArray script_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t serial_id_arg, int64_t sats_arg, int8_tArray script_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKCVec_u8Z script_arg_ref; script_arg_ref.datalen = (*env)->GetArrayLength(env, script_arg); script_arg_ref.data = MALLOC(script_arg_ref.datalen, "LDKCVec_u8Z Bytes"); (*env)->GetByteArrayRegion(env, script_arg, 0, script_arg_ref.datalen, script_arg_ref.data); - LDKTxAddOutput ret_var = TxAddOutput_new(channel_id_arg_ref, serial_id_arg, sats_arg, script_arg_ref); + LDKTxAddOutput ret_var = TxAddOutput_new(channel_id_arg_conv, serial_id_arg, sats_arg, script_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -50261,27 +54108,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1free(JNIEnv *en TxRemoveInput_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKTxRemoveInput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxRemoveInput_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = TxRemoveInput_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKTxRemoveInput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - TxRemoveInput_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxRemoveInput_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1get_1serial_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -50303,11 +54154,13 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1set_1serial_1id TxRemoveInput_set_serial_id(&this_ptr_conv, val); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t serial_id_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); - LDKTxRemoveInput ret_var = TxRemoveInput_new(channel_id_arg_ref, serial_id_arg); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t serial_id_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKTxRemoveInput ret_var = TxRemoveInput_new(channel_id_arg_conv, serial_id_arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -50377,27 +54230,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1free(JNIEnv *e TxRemoveOutput_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKTxRemoveOutput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxRemoveOutput_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = TxRemoveOutput_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKTxRemoveOutput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - TxRemoveOutput_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxRemoveOutput_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1get_1serial_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -50419,11 +54276,13 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1set_1serial_1i TxRemoveOutput_set_serial_id(&this_ptr_conv, val); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t serial_id_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); - LDKTxRemoveOutput ret_var = TxRemoveOutput_new(channel_id_arg_ref, serial_id_arg); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t serial_id_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKTxRemoveOutput ret_var = TxRemoveOutput_new(channel_id_arg_conv, serial_id_arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -50493,34 +54352,40 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxComplete_1free(JNIEnv *env, TxComplete_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxComplete_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxComplete_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKTxComplete this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxComplete_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = TxComplete_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxComplete_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxComplete_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKTxComplete this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - TxComplete_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxComplete_set_channel_id(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxComplete_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); - LDKTxComplete ret_var = TxComplete_new(channel_id_arg_ref); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxComplete_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKTxComplete ret_var = TxComplete_new(channel_id_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -50590,27 +54455,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1free(JNIEnv *env TxSignatures_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxSignatures_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxSignatures_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKTxSignatures this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxSignatures_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = TxSignatures_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKTxSignatures this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - TxSignatures_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxSignatures_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxSignatures_1get_1tx_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -50682,10 +54551,37 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1set_1witnesses(J TxSignatures_set_witnesses(&this_ptr_conv, val_constr); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxSignatures_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray tx_hash_arg, jobjectArray witnesses_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxSignatures_1get_1funding_1outpoint_1sig(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKTxSignatures this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ"); + *ret_copy = TxSignatures_get_funding_outpoint_sig(&this_ptr_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1set_1funding_1outpoint_1sig(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKTxSignatures this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKCOption_ECDSASignatureZ val_conv = *(LDKCOption_ECDSASignatureZ*)(val_ptr); + val_conv = COption_ECDSASignatureZ_clone((LDKCOption_ECDSASignatureZ*)untag_ptr(val)); + TxSignatures_set_funding_outpoint_sig(&this_ptr_conv, val_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxSignatures_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray tx_hash_arg, jobjectArray witnesses_arg, int64_t funding_outpoint_sig_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes tx_hash_arg_ref; CHECK((*env)->GetArrayLength(env, tx_hash_arg) == 32); (*env)->GetByteArrayRegion(env, tx_hash_arg, 0, 32, tx_hash_arg_ref.data); @@ -50704,7 +54600,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxSignatures_1new(JNIEnv *e witnesses_arg_conv_8_ref.data_is_owned = true; witnesses_arg_constr.data[i] = witnesses_arg_conv_8_ref; } - LDKTxSignatures ret_var = TxSignatures_new(channel_id_arg_ref, tx_hash_arg_ref, witnesses_arg_constr); + void* funding_outpoint_sig_arg_ptr = untag_ptr(funding_outpoint_sig_arg); + CHECK_ACCESS(funding_outpoint_sig_arg_ptr); + LDKCOption_ECDSASignatureZ funding_outpoint_sig_arg_conv = *(LDKCOption_ECDSASignatureZ*)(funding_outpoint_sig_arg_ptr); + funding_outpoint_sig_arg_conv = COption_ECDSASignatureZ_clone((LDKCOption_ECDSASignatureZ*)untag_ptr(funding_outpoint_sig_arg)); + LDKTxSignatures ret_var = TxSignatures_new(channel_id_arg_conv, tx_hash_arg_ref, witnesses_arg_constr, funding_outpoint_sig_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -50774,27 +54674,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1free(JNIEnv *env, j TxInitRbf_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKTxInitRbf this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxInitRbf_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = TxInitRbf_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKTxInitRbf this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - TxInitRbf_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxInitRbf_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1get_1locktime(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -50860,15 +54764,17 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1set_1funding_1outpu TxInitRbf_set_funding_output_contribution(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int32_t locktime_arg, int32_t feerate_sat_per_1000_weight_arg, int64_t funding_output_contribution_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int32_t locktime_arg, int32_t feerate_sat_per_1000_weight_arg, int64_t funding_output_contribution_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); void* funding_output_contribution_arg_ptr = untag_ptr(funding_output_contribution_arg); CHECK_ACCESS(funding_output_contribution_arg_ptr); LDKCOption_i64Z funding_output_contribution_arg_conv = *(LDKCOption_i64Z*)(funding_output_contribution_arg_ptr); funding_output_contribution_arg_conv = COption_i64Z_clone((LDKCOption_i64Z*)untag_ptr(funding_output_contribution_arg)); - LDKTxInitRbf ret_var = TxInitRbf_new(channel_id_arg_ref, locktime_arg, feerate_sat_per_1000_weight_arg, funding_output_contribution_arg_conv); + LDKTxInitRbf ret_var = TxInitRbf_new(channel_id_arg_conv, locktime_arg, feerate_sat_per_1000_weight_arg, funding_output_contribution_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -50938,27 +54844,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1free(JNIEnv *env, jc TxAckRbf_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKTxAckRbf this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxAckRbf_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = TxAckRbf_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKTxAckRbf this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - TxAckRbf_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxAckRbf_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1get_1funding_1output_1contribution(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -50986,15 +54896,17 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1set_1funding_1output TxAckRbf_set_funding_output_contribution(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t funding_output_contribution_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t funding_output_contribution_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); void* funding_output_contribution_arg_ptr = untag_ptr(funding_output_contribution_arg); CHECK_ACCESS(funding_output_contribution_arg_ptr); LDKCOption_i64Z funding_output_contribution_arg_conv = *(LDKCOption_i64Z*)(funding_output_contribution_arg_ptr); funding_output_contribution_arg_conv = COption_i64Z_clone((LDKCOption_i64Z*)untag_ptr(funding_output_contribution_arg)); - LDKTxAckRbf ret_var = TxAckRbf_new(channel_id_arg_ref, funding_output_contribution_arg_conv); + LDKTxAckRbf ret_var = TxAckRbf_new(channel_id_arg_conv, funding_output_contribution_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -51064,27 +54976,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAbort_1free(JNIEnv *env, jcl TxAbort_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxAbort_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAbort_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKTxAbort this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxAbort_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = TxAbort_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAbort_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAbort_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKTxAbort this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - TxAbort_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxAbort_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxAbort_1get_1data(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -51113,15 +55029,17 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAbort_1set_1data(JNIEnv *env TxAbort_set_data(&this_ptr_conv, val_ref); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAbort_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray data_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAbort_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray data_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKCVec_u8Z data_arg_ref; data_arg_ref.datalen = (*env)->GetArrayLength(env, data_arg); data_arg_ref.data = MALLOC(data_arg_ref.datalen, "LDKCVec_u8Z Bytes"); (*env)->GetByteArrayRegion(env, data_arg, 0, data_arg_ref.datalen, data_arg_ref.data); - LDKTxAbort ret_var = TxAbort_new(channel_id_arg_ref, data_arg_ref); + LDKTxAbort ret_var = TxAbort_new(channel_id_arg_conv, data_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -51191,27 +55109,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1free(JNIEnv *env, jc Shutdown_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Shutdown_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Shutdown_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKShutdown this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *Shutdown_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = Shutdown_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKShutdown this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - Shutdown_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + Shutdown_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Shutdown_1get_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -51240,15 +55162,17 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1set_1scriptpubkey(JN Shutdown_set_scriptpubkey(&this_ptr_conv, val_ref); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Shutdown_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray scriptpubkey_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Shutdown_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray scriptpubkey_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKCVec_u8Z scriptpubkey_arg_ref; scriptpubkey_arg_ref.datalen = (*env)->GetArrayLength(env, scriptpubkey_arg); scriptpubkey_arg_ref.data = MALLOC(scriptpubkey_arg_ref.datalen, "LDKCVec_u8Z Bytes"); (*env)->GetByteArrayRegion(env, scriptpubkey_arg, 0, scriptpubkey_arg_ref.datalen, scriptpubkey_arg_ref.data); - LDKShutdown ret_var = Shutdown_new(channel_id_arg_ref, scriptpubkey_arg_ref); + LDKShutdown ret_var = Shutdown_new(channel_id_arg_conv, scriptpubkey_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -51427,27 +55351,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1free(JNIEnv *en ClosingSigned_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKClosingSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ClosingSigned_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = ClosingSigned_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKClosingSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - ClosingSigned_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ClosingSigned_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1fee_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -51519,10 +55447,12 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1fee_1range ClosingSigned_set_fee_range(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t fee_satoshis_arg, int8_tArray signature_arg, int64_t fee_range_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t fee_satoshis_arg, int8_tArray signature_arg, int64_t fee_range_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKECDSASignature signature_arg_ref; CHECK((*env)->GetArrayLength(env, signature_arg) == 64); (*env)->GetByteArrayRegion(env, signature_arg, 0, 64, signature_arg_ref.compact_form); @@ -51531,7 +55461,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1new(JNIEnv * fee_range_arg_conv.is_owned = ptr_is_owned(fee_range_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(fee_range_arg_conv); fee_range_arg_conv = ClosingSignedFeeRange_clone(&fee_range_arg_conv); - LDKClosingSigned ret_var = ClosingSigned_new(channel_id_arg_ref, fee_satoshis_arg, signature_arg_ref, fee_range_arg_conv); + LDKClosingSigned ret_var = ClosingSigned_new(channel_id_arg_conv, fee_satoshis_arg, signature_arg_ref, fee_range_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -51601,27 +55531,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1free(JNIEnv *en UpdateAddHTLC_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKUpdateAddHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *UpdateAddHTLC_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = UpdateAddHTLC_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKUpdateAddHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - UpdateAddHTLC_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + UpdateAddHTLC_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1htlc_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -51779,10 +55713,12 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1blinding_1 UpdateAddHTLC_set_blinding_point(&this_ptr_conv, val_ref); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t htlc_id_arg, int64_t amount_msat_arg, int8_tArray payment_hash_arg, int32_t cltv_expiry_arg, int64_t skimmed_fee_msat_arg, int64_t onion_routing_packet_arg, int8_tArray blinding_point_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t htlc_id_arg, int64_t amount_msat_arg, int8_tArray payment_hash_arg, int32_t cltv_expiry_arg, int64_t skimmed_fee_msat_arg, int64_t onion_routing_packet_arg, int8_tArray blinding_point_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes payment_hash_arg_ref; CHECK((*env)->GetArrayLength(env, payment_hash_arg) == 32); (*env)->GetByteArrayRegion(env, payment_hash_arg, 0, 32, payment_hash_arg_ref.data); @@ -51798,7 +55734,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1new(JNIEnv * LDKPublicKey blinding_point_arg_ref; CHECK((*env)->GetArrayLength(env, blinding_point_arg) == 33); (*env)->GetByteArrayRegion(env, blinding_point_arg, 0, 33, blinding_point_arg_ref.compressed_form); - LDKUpdateAddHTLC ret_var = UpdateAddHTLC_new(channel_id_arg_ref, htlc_id_arg, amount_msat_arg, payment_hash_arg_ref, cltv_expiry_arg, skimmed_fee_msat_arg_conv, onion_routing_packet_arg_conv, blinding_point_arg_ref); + LDKUpdateAddHTLC ret_var = UpdateAddHTLC_new(channel_id_arg_conv, htlc_id_arg, amount_msat_arg, payment_hash_arg_ref, cltv_expiry_arg, skimmed_fee_msat_arg_conv, onion_routing_packet_arg_conv, blinding_point_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -51997,27 +55933,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1free(JNIEnv UpdateFulfillHTLC_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKUpdateFulfillHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *UpdateFulfillHTLC_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = UpdateFulfillHTLC_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKUpdateFulfillHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - UpdateFulfillHTLC_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + UpdateFulfillHTLC_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1htlc_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -52062,14 +56002,16 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1paymen UpdateFulfillHTLC_set_payment_preimage(&this_ptr_conv, val_ref); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t htlc_id_arg, int8_tArray payment_preimage_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t htlc_id_arg, int8_tArray payment_preimage_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes payment_preimage_arg_ref; CHECK((*env)->GetArrayLength(env, payment_preimage_arg) == 32); (*env)->GetByteArrayRegion(env, payment_preimage_arg, 0, 32, payment_preimage_arg_ref.data); - LDKUpdateFulfillHTLC ret_var = UpdateFulfillHTLC_new(channel_id_arg_ref, htlc_id_arg, payment_preimage_arg_ref); + LDKUpdateFulfillHTLC ret_var = UpdateFulfillHTLC_new(channel_id_arg_conv, htlc_id_arg, payment_preimage_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -52139,27 +56081,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1free(JNIEnv *e UpdateFailHTLC_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKUpdateFailHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *UpdateFailHTLC_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = UpdateFailHTLC_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKUpdateFailHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - UpdateFailHTLC_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + UpdateFailHTLC_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1get_1htlc_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -52244,27 +56190,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1free( UpdateFailMalformedHTLC_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKUpdateFailMalformedHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *UpdateFailMalformedHTLC_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = UpdateFailMalformedHTLC_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKUpdateFailMalformedHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - UpdateFailMalformedHTLC_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + UpdateFailMalformedHTLC_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1htlc_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -52368,27 +56318,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1free(JNIEnv CommitmentSigned_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKCommitmentSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *CommitmentSigned_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = CommitmentSigned_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKCommitmentSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - CommitmentSigned_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + CommitmentSigned_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1signature(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -52456,10 +56410,12 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1htlc_1s CommitmentSigned_set_htlc_signatures(&this_ptr_conv, val_constr); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray signature_arg, jobjectArray htlc_signatures_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray signature_arg, jobjectArray htlc_signatures_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKECDSASignature signature_arg_ref; CHECK((*env)->GetArrayLength(env, signature_arg) == 64); (*env)->GetByteArrayRegion(env, signature_arg, 0, 64, signature_arg_ref.compact_form); @@ -52476,7 +56432,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1new(JNIEn (*env)->GetByteArrayRegion(env, htlc_signatures_arg_conv_8, 0, 64, htlc_signatures_arg_conv_8_ref.compact_form); htlc_signatures_arg_constr.data[i] = htlc_signatures_arg_conv_8_ref; } - LDKCommitmentSigned ret_var = CommitmentSigned_new(channel_id_arg_ref, signature_arg_ref, htlc_signatures_arg_constr); + LDKCommitmentSigned ret_var = CommitmentSigned_new(channel_id_arg_conv, signature_arg_ref, htlc_signatures_arg_constr); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -52546,27 +56502,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1free(JNIEnv *env RevokeAndACK_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKRevokeAndACK this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *RevokeAndACK_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = RevokeAndACK_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKRevokeAndACK this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - RevokeAndACK_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + RevokeAndACK_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1per_1commitment_1secret(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -52615,17 +56575,19 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1next_1per_1 RevokeAndACK_set_next_per_commitment_point(&this_ptr_conv, val_ref); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray per_commitment_secret_arg, int8_tArray next_per_commitment_point_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray per_commitment_secret_arg, int8_tArray next_per_commitment_point_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes per_commitment_secret_arg_ref; CHECK((*env)->GetArrayLength(env, per_commitment_secret_arg) == 32); (*env)->GetByteArrayRegion(env, per_commitment_secret_arg, 0, 32, per_commitment_secret_arg_ref.data); LDKPublicKey next_per_commitment_point_arg_ref; CHECK((*env)->GetArrayLength(env, next_per_commitment_point_arg) == 33); (*env)->GetByteArrayRegion(env, next_per_commitment_point_arg, 0, 33, next_per_commitment_point_arg_ref.compressed_form); - LDKRevokeAndACK ret_var = RevokeAndACK_new(channel_id_arg_ref, per_commitment_secret_arg_ref, next_per_commitment_point_arg_ref); + LDKRevokeAndACK ret_var = RevokeAndACK_new(channel_id_arg_conv, per_commitment_secret_arg_ref, next_per_commitment_point_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -52695,27 +56657,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1free(JNIEnv *env, j UpdateFee_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFee_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFee_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKUpdateFee this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *UpdateFee_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = UpdateFee_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKUpdateFee this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - UpdateFee_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + UpdateFee_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_UpdateFee_1get_1feerate_1per_1kw(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -52737,11 +56703,13 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1set_1feerate_1per_1 UpdateFee_set_feerate_per_kw(&this_ptr_conv, val); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFee_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int32_t feerate_per_kw_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); - LDKUpdateFee ret_var = UpdateFee_new(channel_id_arg_ref, feerate_per_kw_arg); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFee_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int32_t feerate_per_kw_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKUpdateFee ret_var = UpdateFee_new(channel_id_arg_conv, feerate_per_kw_arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -52811,27 +56779,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1free(JNIEn ChannelReestablish_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKChannelReestablish this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ChannelReestablish_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = ChannelReestablish_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKChannelReestablish this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - ChannelReestablish_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ChannelReestablish_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1next_1local_1commitment_1number(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -52943,10 +56915,12 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1next_ ChannelReestablish_set_next_funding_txid(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t next_local_commitment_number_arg, int64_t next_remote_commitment_number_arg, int8_tArray your_last_per_commitment_secret_arg, int8_tArray my_current_per_commitment_point_arg, int64_t next_funding_txid_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t next_local_commitment_number_arg, int64_t next_remote_commitment_number_arg, int8_tArray your_last_per_commitment_secret_arg, int8_tArray my_current_per_commitment_point_arg, int64_t next_funding_txid_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes your_last_per_commitment_secret_arg_ref; CHECK((*env)->GetArrayLength(env, your_last_per_commitment_secret_arg) == 32); (*env)->GetByteArrayRegion(env, your_last_per_commitment_secret_arg, 0, 32, your_last_per_commitment_secret_arg_ref.data); @@ -52957,7 +56931,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1new(JNI CHECK_ACCESS(next_funding_txid_arg_ptr); LDKCOption_ThirtyTwoBytesZ next_funding_txid_arg_conv = *(LDKCOption_ThirtyTwoBytesZ*)(next_funding_txid_arg_ptr); next_funding_txid_arg_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(next_funding_txid_arg)); - LDKChannelReestablish ret_var = ChannelReestablish_new(channel_id_arg_ref, next_local_commitment_number_arg, next_remote_commitment_number_arg, your_last_per_commitment_secret_arg_ref, my_current_per_commitment_point_arg_ref, next_funding_txid_arg_conv); + LDKChannelReestablish ret_var = ChannelReestablish_new(channel_id_arg_conv, next_local_commitment_number_arg, next_remote_commitment_number_arg, your_last_per_commitment_secret_arg_ref, my_current_per_commitment_point_arg_ref, next_funding_txid_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -53027,27 +57001,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1free(J AnnouncementSignatures_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKAnnouncementSignatures this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *AnnouncementSignatures_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = AnnouncementSignatures_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKAnnouncementSignatures this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - AnnouncementSignatures_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + AnnouncementSignatures_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1short_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -53115,17 +57093,19 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1b AnnouncementSignatures_set_bitcoin_signature(&this_ptr_conv, val_ref); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t short_channel_id_arg, int8_tArray node_signature_arg, int8_tArray bitcoin_signature_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t short_channel_id_arg, int8_tArray node_signature_arg, int8_tArray bitcoin_signature_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKECDSASignature node_signature_arg_ref; CHECK((*env)->GetArrayLength(env, node_signature_arg) == 64); (*env)->GetByteArrayRegion(env, node_signature_arg, 0, 64, node_signature_arg_ref.compact_form); LDKECDSASignature bitcoin_signature_arg_ref; CHECK((*env)->GetArrayLength(env, bitcoin_signature_arg) == 64); (*env)->GetByteArrayRegion(env, bitcoin_signature_arg, 0, 64, bitcoin_signature_arg_ref.compact_form); - LDKAnnouncementSignatures ret_var = AnnouncementSignatures_new(channel_id_arg_ref, short_channel_id_arg, node_signature_arg_ref, bitcoin_signature_arg_ref); + LDKAnnouncementSignatures ret_var = AnnouncementSignatures_new(channel_id_arg_conv, short_channel_id_arg, node_signature_arg_ref, bitcoin_signature_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -53612,6 +57592,107 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_ UnsignedNodeAnnouncement_set_addresses(&this_ptr_conv, val_constr); } +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1excess_1address_1data(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKUnsignedNodeAnnouncement this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z ret_var = UnsignedNodeAnnouncement_get_excess_address_data(&this_ptr_conv); + int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen); + (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1excess_1address_1data(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKUnsignedNodeAnnouncement this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z val_ref; + val_ref.datalen = (*env)->GetArrayLength(env, val); + val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes"); + (*env)->GetByteArrayRegion(env, val, 0, val_ref.datalen, val_ref.data); + UnsignedNodeAnnouncement_set_excess_address_data(&this_ptr_conv, val_ref); +} + +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1excess_1data(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKUnsignedNodeAnnouncement this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z ret_var = UnsignedNodeAnnouncement_get_excess_data(&this_ptr_conv); + int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen); + (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1excess_1data(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKUnsignedNodeAnnouncement this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z val_ref; + val_ref.datalen = (*env)->GetArrayLength(env, val); + val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes"); + (*env)->GetByteArrayRegion(env, val, 0, val_ref.datalen, val_ref.data); + UnsignedNodeAnnouncement_set_excess_data(&this_ptr_conv, val_ref); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1new(JNIEnv *env, jclass clz, int64_t features_arg, int32_t timestamp_arg, int64_t node_id_arg, int8_tArray rgb_arg, int64_t alias_arg, int64_tArray addresses_arg, int8_tArray excess_address_data_arg, int8_tArray excess_data_arg) { + LDKNodeFeatures features_arg_conv; + features_arg_conv.inner = untag_ptr(features_arg); + features_arg_conv.is_owned = ptr_is_owned(features_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(features_arg_conv); + features_arg_conv = NodeFeatures_clone(&features_arg_conv); + LDKNodeId node_id_arg_conv; + node_id_arg_conv.inner = untag_ptr(node_id_arg); + node_id_arg_conv.is_owned = ptr_is_owned(node_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(node_id_arg_conv); + node_id_arg_conv = NodeId_clone(&node_id_arg_conv); + LDKThreeBytes rgb_arg_ref; + CHECK((*env)->GetArrayLength(env, rgb_arg) == 3); + (*env)->GetByteArrayRegion(env, rgb_arg, 0, 3, rgb_arg_ref.data); + LDKNodeAlias alias_arg_conv; + alias_arg_conv.inner = untag_ptr(alias_arg); + alias_arg_conv.is_owned = ptr_is_owned(alias_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(alias_arg_conv); + alias_arg_conv = NodeAlias_clone(&alias_arg_conv); + LDKCVec_SocketAddressZ addresses_arg_constr; + addresses_arg_constr.datalen = (*env)->GetArrayLength(env, addresses_arg); + if (addresses_arg_constr.datalen > 0) + addresses_arg_constr.data = MALLOC(addresses_arg_constr.datalen * sizeof(LDKSocketAddress), "LDKCVec_SocketAddressZ Elements"); + else + addresses_arg_constr.data = NULL; + int64_t* addresses_arg_vals = (*env)->GetLongArrayElements (env, addresses_arg, NULL); + for (size_t p = 0; p < addresses_arg_constr.datalen; p++) { + int64_t addresses_arg_conv_15 = addresses_arg_vals[p]; + void* addresses_arg_conv_15_ptr = untag_ptr(addresses_arg_conv_15); + CHECK_ACCESS(addresses_arg_conv_15_ptr); + LDKSocketAddress addresses_arg_conv_15_conv = *(LDKSocketAddress*)(addresses_arg_conv_15_ptr); + addresses_arg_constr.data[p] = addresses_arg_conv_15_conv; + } + (*env)->ReleaseLongArrayElements(env, addresses_arg, addresses_arg_vals, 0); + LDKCVec_u8Z excess_address_data_arg_ref; + excess_address_data_arg_ref.datalen = (*env)->GetArrayLength(env, excess_address_data_arg); + excess_address_data_arg_ref.data = MALLOC(excess_address_data_arg_ref.datalen, "LDKCVec_u8Z Bytes"); + (*env)->GetByteArrayRegion(env, excess_address_data_arg, 0, excess_address_data_arg_ref.datalen, excess_address_data_arg_ref.data); + LDKCVec_u8Z excess_data_arg_ref; + excess_data_arg_ref.datalen = (*env)->GetArrayLength(env, excess_data_arg); + excess_data_arg_ref.data = MALLOC(excess_data_arg_ref.datalen, "LDKCVec_u8Z Bytes"); + (*env)->GetByteArrayRegion(env, excess_data_arg, 0, excess_data_arg_ref.datalen, excess_data_arg_ref.data); + LDKUnsignedNodeAnnouncement ret_var = UnsignedNodeAnnouncement_new(features_arg_conv, timestamp_arg, node_id_arg_conv, rgb_arg_ref, alias_arg_conv, addresses_arg_constr, excess_address_data_arg_ref, excess_data_arg_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + static inline uint64_t UnsignedNodeAnnouncement_clone_ptr(LDKUnsignedNodeAnnouncement *NONNULL_PTR arg) { LDKUnsignedNodeAnnouncement ret_var = UnsignedNodeAnnouncement_clone(arg); int64_t ret_ref = 0; @@ -56304,6 +60385,191 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OnionPacket_1eq(JNIEnv *en return ret_conv; } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKTrampolineOnionPacket this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + TrampolineOnionPacket_free(this_obj_conv); +} + +JNIEXPORT int8_t JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1version(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_t ret_conv = TrampolineOnionPacket_get_version(&this_ptr_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1version(JNIEnv *env, jclass clz, int64_t this_ptr, int8_t val) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + TrampolineOnionPacket_set_version(&this_ptr_conv, val); +} + +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1public_1key(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = (*env)->NewByteArray(env, 33); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, TrampolineOnionPacket_get_public_key(&this_ptr_conv).compressed_form); + return ret_arr; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1public_1key(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKPublicKey val_ref; + CHECK((*env)->GetArrayLength(env, val) == 33); + (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); + TrampolineOnionPacket_set_public_key(&this_ptr_conv, val_ref); +} + +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1hop_1data(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z ret_var = TrampolineOnionPacket_get_hop_data(&this_ptr_conv); + int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen); + (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1hop_1data(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z val_ref; + val_ref.datalen = (*env)->GetArrayLength(env, val); + val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes"); + (*env)->GetByteArrayRegion(env, val, 0, val_ref.datalen, val_ref.data); + TrampolineOnionPacket_set_hop_data(&this_ptr_conv, val_ref); +} + +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1hmac(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = (*env)->NewByteArray(env, 32); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TrampolineOnionPacket_get_hmac(&this_ptr_conv)); + return ret_arr; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1hmac(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKThirtyTwoBytes val_ref; + CHECK((*env)->GetArrayLength(env, val) == 32); + (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); + TrampolineOnionPacket_set_hmac(&this_ptr_conv, val_ref); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1new(JNIEnv *env, jclass clz, int8_t version_arg, int8_tArray public_key_arg, int8_tArray hop_data_arg, int8_tArray hmac_arg) { + LDKPublicKey public_key_arg_ref; + CHECK((*env)->GetArrayLength(env, public_key_arg) == 33); + (*env)->GetByteArrayRegion(env, public_key_arg, 0, 33, public_key_arg_ref.compressed_form); + LDKCVec_u8Z hop_data_arg_ref; + hop_data_arg_ref.datalen = (*env)->GetArrayLength(env, hop_data_arg); + hop_data_arg_ref.data = MALLOC(hop_data_arg_ref.datalen, "LDKCVec_u8Z Bytes"); + (*env)->GetByteArrayRegion(env, hop_data_arg, 0, hop_data_arg_ref.datalen, hop_data_arg_ref.data); + LDKThirtyTwoBytes hmac_arg_ref; + CHECK((*env)->GetArrayLength(env, hmac_arg) == 32); + (*env)->GetByteArrayRegion(env, hmac_arg, 0, 32, hmac_arg_ref.data); + LDKTrampolineOnionPacket ret_var = TrampolineOnionPacket_new(version_arg, public_key_arg_ref, hop_data_arg_ref, hmac_arg_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t TrampolineOnionPacket_clone_ptr(LDKTrampolineOnionPacket *NONNULL_PTR arg) { + LDKTrampolineOnionPacket ret_var = TrampolineOnionPacket_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKTrampolineOnionPacket arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = TrampolineOnionPacket_clone_ptr(&arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKTrampolineOnionPacket orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKTrampolineOnionPacket ret_var = TrampolineOnionPacket_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1hash(JNIEnv *env, jclass clz, int64_t o) { + LDKTrampolineOnionPacket o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = TrampolineOnionPacket_hash(&o_conv); + return ret_conv; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKTrampolineOnionPacket a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKTrampolineOnionPacket b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = TrampolineOnionPacket_eq(&a_conv, &b_conv); + return ret_conv; +} + +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1write(JNIEnv *env, jclass clz, int64_t obj) { + LDKTrampolineOnionPacket obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = TrampolineOnionPacket_write(&obj_conv); + int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen); + (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data); + CVec_u8Z_free(ret_var); + return ret_arr; +} + JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1write(JNIEnv *env, jclass clz, int64_t obj) { LDKAcceptChannel obj_conv; obj_conv.inner = untag_ptr(obj); @@ -57821,6 +62087,127 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1free(JNIEnv SocketDescriptor_free(this_ptr_conv); } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKPeerDetails this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + PeerDetails_free(this_obj_conv); +} + +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1counterparty_1node_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = (*env)->NewByteArray(env, 33); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, PeerDetails_get_counterparty_node_id(&this_ptr_conv).compressed_form); + return ret_arr; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1counterparty_1node_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKPublicKey val_ref; + CHECK((*env)->GetArrayLength(env, val) == 33); + (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); + PeerDetails_set_counterparty_node_id(&this_ptr_conv, val_ref); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1socket_1address(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCOption_SocketAddressZ *ret_copy = MALLOC(sizeof(LDKCOption_SocketAddressZ), "LDKCOption_SocketAddressZ"); + *ret_copy = PeerDetails_get_socket_address(&this_ptr_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1socket_1address(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKCOption_SocketAddressZ val_conv = *(LDKCOption_SocketAddressZ*)(val_ptr); + val_conv = COption_SocketAddressZ_clone((LDKCOption_SocketAddressZ*)untag_ptr(val)); + PeerDetails_set_socket_address(&this_ptr_conv, val_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1init_1features(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKInitFeatures ret_var = PeerDetails_get_init_features(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1init_1features(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKInitFeatures val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = InitFeatures_clone(&val_conv); + PeerDetails_set_init_features(&this_ptr_conv, val_conv); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1is_1inbound_1connection(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + jboolean ret_conv = PeerDetails_get_is_inbound_connection(&this_ptr_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1is_1inbound_1connection(JNIEnv *env, jclass clz, int64_t this_ptr, jboolean val) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + PeerDetails_set_is_inbound_connection(&this_ptr_conv, val); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerDetails_1new(JNIEnv *env, jclass clz, int8_tArray counterparty_node_id_arg, int64_t socket_address_arg, int64_t init_features_arg, jboolean is_inbound_connection_arg) { + LDKPublicKey counterparty_node_id_arg_ref; + CHECK((*env)->GetArrayLength(env, counterparty_node_id_arg) == 33); + (*env)->GetByteArrayRegion(env, counterparty_node_id_arg, 0, 33, counterparty_node_id_arg_ref.compressed_form); + void* socket_address_arg_ptr = untag_ptr(socket_address_arg); + CHECK_ACCESS(socket_address_arg_ptr); + LDKCOption_SocketAddressZ socket_address_arg_conv = *(LDKCOption_SocketAddressZ*)(socket_address_arg_ptr); + LDKInitFeatures init_features_arg_conv; + init_features_arg_conv.inner = untag_ptr(init_features_arg); + init_features_arg_conv.is_owned = ptr_is_owned(init_features_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(init_features_arg_conv); + init_features_arg_conv = InitFeatures_clone(&init_features_arg_conv); + LDKPeerDetails ret_var = PeerDetails_new(counterparty_node_id_arg_ref, socket_address_arg_conv, init_features_arg_conv, is_inbound_connection_arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1free(JNIEnv *env, jclass clz, int64_t this_obj) { LDKPeerHandleError this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -57907,26 +62294,44 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerManager_1new(JNIEnv *en return ret_ref; } -JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_PeerManager_1get_1peer_1node_1ids(JNIEnv *env, jclass clz, int64_t this_arg) { +JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_PeerManager_1list_1peers(JNIEnv *env, jclass clz, int64_t this_arg) { LDKPeerManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ ret_var = PeerManager_get_peer_node_ids(&this_arg_conv); + LDKCVec_PeerDetailsZ ret_var = PeerManager_list_peers(&this_arg_conv); int64_tArray ret_arr = NULL; ret_arr = (*env)->NewLongArray(env, ret_var.datalen); int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL); - for (size_t r = 0; r < ret_var.datalen; r++) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv_43_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ"); - *ret_conv_43_conv = ret_var.data[r]; - ret_arr_ptr[r] = tag_ptr(ret_conv_43_conv, true); + for (size_t n = 0; n < ret_var.datalen; n++) { + LDKPeerDetails ret_conv_13_var = ret_var.data[n]; + int64_t ret_conv_13_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_13_var); + ret_conv_13_ref = tag_ptr(ret_conv_13_var.inner, ret_conv_13_var.is_owned); + ret_arr_ptr[n] = ret_conv_13_ref; } (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0); FREE(ret_var.data); return ret_arr; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerManager_1peer_1by_1node_1id(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id) { + LDKPeerManager this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKPublicKey their_node_id_ref; + CHECK((*env)->GetArrayLength(env, their_node_id) == 33); + (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form); + LDKPeerDetails ret_var = PeerManager_peer_by_node_id(&this_arg_conv, their_node_id_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerManager_1new_1outbound_1connection(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t descriptor, int64_t remote_network_address) { LDKPeerManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -63755,6 +68160,120 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1requires_1ke return ret_conv; } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InitFeatures_1set_1trampoline_1routing_1optional(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKInitFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + InitFeatures_set_trampoline_routing_optional(&this_arg_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InitFeatures_1set_1trampoline_1routing_1required(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKInitFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + InitFeatures_set_trampoline_routing_required(&this_arg_conv); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InitFeatures_1supports_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKInitFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = InitFeatures_supports_trampoline_routing(&this_arg_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1set_1trampoline_1routing_1optional(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKNodeFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + NodeFeatures_set_trampoline_routing_optional(&this_arg_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1set_1trampoline_1routing_1required(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKNodeFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + NodeFeatures_set_trampoline_routing_required(&this_arg_conv); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1supports_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKNodeFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = NodeFeatures_supports_trampoline_routing(&this_arg_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1set_1trampoline_1routing_1optional(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKBolt11InvoiceFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + Bolt11InvoiceFeatures_set_trampoline_routing_optional(&this_arg_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1set_1trampoline_1routing_1required(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKBolt11InvoiceFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + Bolt11InvoiceFeatures_set_trampoline_routing_required(&this_arg_conv); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1supports_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKBolt11InvoiceFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = Bolt11InvoiceFeatures_supports_trampoline_routing(&this_arg_conv); + return ret_conv; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InitFeatures_1requires_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKInitFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = InitFeatures_requires_trampoline_routing(&this_arg_conv); + return ret_conv; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1requires_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKNodeFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = NodeFeatures_requires_trampoline_routing(&this_arg_conv); + return ret_conv; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1requires_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKBolt11InvoiceFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = Bolt11InvoiceFeatures_requires_trampoline_routing(&this_arg_conv); + return ret_conv; +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ShutdownScript_1free(JNIEnv *env, jclass clz, int64_t this_obj) { LDKShutdownScript this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -63980,6 +68499,222 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ShutdownScript_1is_1compat return ret_conv; } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelId_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKChannelId this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + ChannelId_free(this_obj_conv); +} + +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelId_1get_1a(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKChannelId this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = (*env)->NewByteArray(env, 32); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ChannelId_get_a(&this_ptr_conv)); + return ret_arr; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelId_1set_1a(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKChannelId this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKThirtyTwoBytes val_ref; + CHECK((*env)->GetArrayLength(env, val) == 32); + (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); + ChannelId_set_a(&this_ptr_conv, val_ref); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1new(JNIEnv *env, jclass clz, int8_tArray a_arg) { + LDKThirtyTwoBytes a_arg_ref; + CHECK((*env)->GetArrayLength(env, a_arg) == 32); + (*env)->GetByteArrayRegion(env, a_arg, 0, 32, a_arg_ref.data); + LDKChannelId ret_var = ChannelId_new(a_arg_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t ChannelId_clone_ptr(LDKChannelId *NONNULL_PTR arg) { + LDKChannelId ret_var = ChannelId_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKChannelId arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = ChannelId_clone_ptr(&arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKChannelId orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKChannelId ret_var = ChannelId_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelId_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKChannelId a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKChannelId b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = ChannelId_eq(&a_conv, &b_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1hash(JNIEnv *env, jclass clz, int64_t o) { + LDKChannelId o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = ChannelId_hash(&o_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1v1_1from_1funding_1txid(JNIEnv *env, jclass clz, int8_tArray txid, int16_t output_index) { + uint8_t txid_arr[32]; + CHECK((*env)->GetArrayLength(env, txid) == 32); + (*env)->GetByteArrayRegion(env, txid, 0, 32, txid_arr); + uint8_t (*txid_ref)[32] = &txid_arr; + LDKChannelId ret_var = ChannelId_v1_from_funding_txid(txid_ref, output_index); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1v1_1from_1funding_1outpoint(JNIEnv *env, jclass clz, int64_t outpoint) { + LDKOutPoint outpoint_conv; + outpoint_conv.inner = untag_ptr(outpoint); + outpoint_conv.is_owned = ptr_is_owned(outpoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_conv); + outpoint_conv = OutPoint_clone(&outpoint_conv); + LDKChannelId ret_var = ChannelId_v1_from_funding_outpoint(outpoint_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1temporary_1from_1entropy_1source(JNIEnv *env, jclass clz, int64_t entropy_source) { + void* entropy_source_ptr = untag_ptr(entropy_source); + if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } + LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + LDKChannelId ret_var = ChannelId_temporary_from_entropy_source(entropy_source_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1from_1bytes(JNIEnv *env, jclass clz, int8_tArray data) { + LDKThirtyTwoBytes data_ref; + CHECK((*env)->GetArrayLength(env, data) == 32); + (*env)->GetByteArrayRegion(env, data, 0, 32, data_ref.data); + LDKChannelId ret_var = ChannelId_from_bytes(data_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1new_1zero(JNIEnv *env, jclass clz) { + LDKChannelId ret_var = ChannelId_new_zero(); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelId_1is_1zero(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKChannelId this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = ChannelId_is_zero(&this_arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1v2_1from_1revocation_1basepoints(JNIEnv *env, jclass clz, int64_t ours, int64_t theirs) { + LDKRevocationBasepoint ours_conv; + ours_conv.inner = untag_ptr(ours); + ours_conv.is_owned = ptr_is_owned(ours); + CHECK_INNER_FIELD_ACCESS_OR_NULL(ours_conv); + ours_conv.is_owned = false; + LDKRevocationBasepoint theirs_conv; + theirs_conv.inner = untag_ptr(theirs); + theirs_conv.is_owned = ptr_is_owned(theirs); + CHECK_INNER_FIELD_ACCESS_OR_NULL(theirs_conv); + theirs_conv.is_owned = false; + LDKChannelId ret_var = ChannelId_v2_from_revocation_basepoints(&ours_conv, &theirs_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1temporary_1v2_1from_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t our_revocation_basepoint) { + LDKRevocationBasepoint our_revocation_basepoint_conv; + our_revocation_basepoint_conv.inner = untag_ptr(our_revocation_basepoint); + our_revocation_basepoint_conv.is_owned = ptr_is_owned(our_revocation_basepoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(our_revocation_basepoint_conv); + our_revocation_basepoint_conv.is_owned = false; + LDKChannelId ret_var = ChannelId_temporary_v2_from_revocation_basepoint(&our_revocation_basepoint_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelId_1write(JNIEnv *env, jclass clz, int64_t obj) { + LDKChannelId obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = ChannelId_write(&obj_conv); + int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen); + (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1read(JNIEnv *env, jclass clz, int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = (*env)->GetArrayLength(env, ser); + ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL); + LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ"); + *ret_conv = ChannelId_read(ser_ref); + (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0); + return tag_ptr(ret_conv, true); +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Retry_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -64499,6 +69234,413 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Type_1free(JNIEnv *env, jclass Type_free(this_ptr_conv); } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferId_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKOfferId this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + OfferId_free(this_obj_conv); +} + +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OfferId_1get_1a(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKOfferId this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = (*env)->NewByteArray(env, 32); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *OfferId_get_a(&this_ptr_conv)); + return ret_arr; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferId_1set_1a(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKOfferId this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKThirtyTwoBytes val_ref; + CHECK((*env)->GetArrayLength(env, val) == 32); + (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); + OfferId_set_a(&this_ptr_conv, val_ref); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferId_1new(JNIEnv *env, jclass clz, int8_tArray a_arg) { + LDKThirtyTwoBytes a_arg_ref; + CHECK((*env)->GetArrayLength(env, a_arg) == 32); + (*env)->GetByteArrayRegion(env, a_arg, 0, 32, a_arg_ref.data); + LDKOfferId ret_var = OfferId_new(a_arg_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t OfferId_clone_ptr(LDKOfferId *NONNULL_PTR arg) { + LDKOfferId ret_var = OfferId_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferId_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKOfferId arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = OfferId_clone_ptr(&arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferId_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKOfferId orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKOfferId ret_var = OfferId_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OfferId_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKOfferId a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKOfferId b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = OfferId_eq(&a_conv, &b_conv); + return ret_conv; +} + +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OfferId_1write(JNIEnv *env, jclass clz, int64_t obj) { + LDKOfferId obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = OfferId_write(&obj_conv); + int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen); + (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferId_1read(JNIEnv *env, jclass clz, int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = (*env)->GetArrayLength(env, ser); + ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL); + LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ"); + *ret_conv = OfferId_read(ser_ref); + (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKOfferWithExplicitMetadataBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + OfferWithExplicitMetadataBuilder_free(this_obj_conv); +} + +static inline uint64_t OfferWithExplicitMetadataBuilder_clone_ptr(LDKOfferWithExplicitMetadataBuilder *NONNULL_PTR arg) { + LDKOfferWithExplicitMetadataBuilder ret_var = OfferWithExplicitMetadataBuilder_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKOfferWithExplicitMetadataBuilder arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = OfferWithExplicitMetadataBuilder_clone_ptr(&arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKOfferWithExplicitMetadataBuilder orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKOfferWithExplicitMetadataBuilder ret_var = OfferWithExplicitMetadataBuilder_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKOfferWithDerivedMetadataBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + OfferWithDerivedMetadataBuilder_free(this_obj_conv); +} + +static inline uint64_t OfferWithDerivedMetadataBuilder_clone_ptr(LDKOfferWithDerivedMetadataBuilder *NONNULL_PTR arg) { + LDKOfferWithDerivedMetadataBuilder ret_var = OfferWithDerivedMetadataBuilder_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKOfferWithDerivedMetadataBuilder arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = OfferWithDerivedMetadataBuilder_clone_ptr(&arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKOfferWithDerivedMetadataBuilder orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKOfferWithDerivedMetadataBuilder ret_var = OfferWithDerivedMetadataBuilder_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1new(JNIEnv *env, jclass clz, int8_tArray signing_pubkey) { + LDKPublicKey signing_pubkey_ref; + CHECK((*env)->GetArrayLength(env, signing_pubkey) == 33); + (*env)->GetByteArrayRegion(env, signing_pubkey, 0, 33, signing_pubkey_ref.compressed_form); + LDKOfferWithExplicitMetadataBuilder ret_var = OfferWithExplicitMetadataBuilder_new(signing_pubkey_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1metadata(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray metadata) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKCVec_u8Z metadata_ref; + metadata_ref.datalen = (*env)->GetArrayLength(env, metadata); + metadata_ref.data = MALLOC(metadata_ref.datalen, "LDKCVec_u8Z Bytes"); + (*env)->GetByteArrayRegion(env, metadata, 0, metadata_ref.datalen, metadata_ref.data); + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = OfferWithExplicitMetadataBuilder_metadata(this_arg_conv, metadata_ref); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1chain(JNIEnv *env, jclass clz, int64_t this_arg, jclass network) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKNetwork network_conv = LDKNetwork_from_java(env, network); + OfferWithExplicitMetadataBuilder_chain(this_arg_conv, network_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1amount_1msats(JNIEnv *env, jclass clz, int64_t this_arg, int64_t amount_msats) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + OfferWithExplicitMetadataBuilder_amount_msats(this_arg_conv, amount_msats); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1absolute_1expiry(JNIEnv *env, jclass clz, int64_t this_arg, int64_t absolute_expiry) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + OfferWithExplicitMetadataBuilder_absolute_expiry(this_arg_conv, absolute_expiry); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1description(JNIEnv *env, jclass clz, int64_t this_arg, jstring description) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKStr description_conv = java_to_owned_str(env, description); + OfferWithExplicitMetadataBuilder_description(this_arg_conv, description_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1issuer(JNIEnv *env, jclass clz, int64_t this_arg, jstring issuer) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKStr issuer_conv = java_to_owned_str(env, issuer); + OfferWithExplicitMetadataBuilder_issuer(this_arg_conv, issuer_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1path(JNIEnv *env, jclass clz, int64_t this_arg, int64_t path) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKBlindedPath path_conv; + path_conv.inner = untag_ptr(path); + path_conv.is_owned = ptr_is_owned(path); + CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv); + path_conv = BlindedPath_clone(&path_conv); + OfferWithExplicitMetadataBuilder_path(this_arg_conv, path_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1supported_1quantity(JNIEnv *env, jclass clz, int64_t this_arg, int64_t quantity) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + void* quantity_ptr = untag_ptr(quantity); + CHECK_ACCESS(quantity_ptr); + LDKQuantity quantity_conv = *(LDKQuantity*)(quantity_ptr); + quantity_conv = Quantity_clone((LDKQuantity*)untag_ptr(quantity)); + OfferWithExplicitMetadataBuilder_supported_quantity(this_arg_conv, quantity_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1build(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = OfferWithExplicitMetadataBuilder_build(this_arg_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1deriving_1signing_1pubkey(JNIEnv *env, jclass clz, int8_tArray node_id, int64_t expanded_key, int64_t entropy_source) { + LDKPublicKey node_id_ref; + CHECK((*env)->GetArrayLength(env, node_id) == 33); + (*env)->GetByteArrayRegion(env, node_id, 0, 33, node_id_ref.compressed_form); + LDKExpandedKey expanded_key_conv; + expanded_key_conv.inner = untag_ptr(expanded_key); + expanded_key_conv.is_owned = ptr_is_owned(expanded_key); + CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv); + expanded_key_conv.is_owned = false; + void* entropy_source_ptr = untag_ptr(entropy_source); + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } + LDKOfferWithDerivedMetadataBuilder ret_var = OfferWithDerivedMetadataBuilder_deriving_signing_pubkey(node_id_ref, &expanded_key_conv, entropy_source_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1chain(JNIEnv *env, jclass clz, int64_t this_arg, jclass network) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKNetwork network_conv = LDKNetwork_from_java(env, network); + OfferWithDerivedMetadataBuilder_chain(this_arg_conv, network_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1amount_1msats(JNIEnv *env, jclass clz, int64_t this_arg, int64_t amount_msats) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + OfferWithDerivedMetadataBuilder_amount_msats(this_arg_conv, amount_msats); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1absolute_1expiry(JNIEnv *env, jclass clz, int64_t this_arg, int64_t absolute_expiry) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + OfferWithDerivedMetadataBuilder_absolute_expiry(this_arg_conv, absolute_expiry); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1description(JNIEnv *env, jclass clz, int64_t this_arg, jstring description) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKStr description_conv = java_to_owned_str(env, description); + OfferWithDerivedMetadataBuilder_description(this_arg_conv, description_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1issuer(JNIEnv *env, jclass clz, int64_t this_arg, jstring issuer) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKStr issuer_conv = java_to_owned_str(env, issuer); + OfferWithDerivedMetadataBuilder_issuer(this_arg_conv, issuer_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1path(JNIEnv *env, jclass clz, int64_t this_arg, int64_t path) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKBlindedPath path_conv; + path_conv.inner = untag_ptr(path); + path_conv.is_owned = ptr_is_owned(path); + CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv); + path_conv = BlindedPath_clone(&path_conv); + OfferWithDerivedMetadataBuilder_path(this_arg_conv, path_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1supported_1quantity(JNIEnv *env, jclass clz, int64_t this_arg, int64_t quantity) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + void* quantity_ptr = untag_ptr(quantity); + CHECK_ACCESS(quantity_ptr); + LDKQuantity quantity_conv = *(LDKQuantity*)(quantity_ptr); + quantity_conv = Quantity_clone((LDKQuantity*)untag_ptr(quantity)); + OfferWithDerivedMetadataBuilder_supported_quantity(this_arg_conv, quantity_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1build(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = OfferWithDerivedMetadataBuilder_build(this_arg_conv); + return tag_ptr(ret_conv, true); +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Offer_1free(JNIEnv *env, jclass clz, int64_t this_obj) { LDKOffer this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -64575,10 +69717,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1amount(JNIEnv *env, this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = Offer_amount(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = Offer_amount(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -64661,10 +69802,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1supported_1quantity( this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = Offer_supported_quantity(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Offer_supported_quantity(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -64679,6 +69819,19 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Offer_1signing_1pubkey( return ret_arr; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1id(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKOffer this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKOfferId ret_var = Offer_id(&this_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Offer_1supports_1chain(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray chain) { LDKOffer this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -64732,6 +69885,89 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Offer_1expects_1quantity(J return ret_conv; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1request_1invoice_1deriving_1payer_1id(JNIEnv *env, jclass clz, int64_t this_arg, int64_t expanded_key, int64_t entropy_source, int8_tArray payment_id) { + LDKOffer this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKExpandedKey expanded_key_conv; + expanded_key_conv.inner = untag_ptr(expanded_key); + expanded_key_conv.is_owned = ptr_is_owned(expanded_key); + CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv); + expanded_key_conv.is_owned = false; + void* entropy_source_ptr = untag_ptr(entropy_source); + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } + LDKThirtyTwoBytes payment_id_ref; + CHECK((*env)->GetArrayLength(env, payment_id) == 32); + (*env)->GetByteArrayRegion(env, payment_id, 0, 32, payment_id_ref.data); + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = Offer_request_invoice_deriving_payer_id(&this_arg_conv, &expanded_key_conv, entropy_source_conv, payment_id_ref); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1request_1invoice_1deriving_1metadata(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray payer_id, int64_t expanded_key, int64_t entropy_source, int8_tArray payment_id) { + LDKOffer this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKPublicKey payer_id_ref; + CHECK((*env)->GetArrayLength(env, payer_id) == 33); + (*env)->GetByteArrayRegion(env, payer_id, 0, 33, payer_id_ref.compressed_form); + LDKExpandedKey expanded_key_conv; + expanded_key_conv.inner = untag_ptr(expanded_key); + expanded_key_conv.is_owned = ptr_is_owned(expanded_key); + CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv); + expanded_key_conv.is_owned = false; + void* entropy_source_ptr = untag_ptr(entropy_source); + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } + LDKThirtyTwoBytes payment_id_ref; + CHECK((*env)->GetArrayLength(env, payment_id) == 32); + (*env)->GetByteArrayRegion(env, payment_id, 0, 32, payment_id_ref.data); + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = Offer_request_invoice_deriving_metadata(&this_arg_conv, payer_id_ref, &expanded_key_conv, entropy_source_conv, payment_id_ref); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1request_1invoice(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray metadata, int8_tArray payer_id) { + LDKOffer this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_u8Z metadata_ref; + metadata_ref.datalen = (*env)->GetArrayLength(env, metadata); + metadata_ref.data = MALLOC(metadata_ref.datalen, "LDKCVec_u8Z Bytes"); + (*env)->GetByteArrayRegion(env, metadata, 0, metadata_ref.datalen, metadata_ref.data); + LDKPublicKey payer_id_ref; + CHECK((*env)->GetArrayLength(env, payer_id) == 33); + (*env)->GetByteArrayRegion(env, payer_id, 0, 33, payer_id_ref.compressed_form); + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = Offer_request_invoice(&this_arg_conv, metadata_ref, payer_id_ref); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1hash(JNIEnv *env, jclass clz, int64_t o) { + LDKOffer o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = Offer_hash(&o_conv); + return ret_conv; +} + JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Offer_1write(JNIEnv *env, jclass clz, int64_t obj) { LDKOffer obj_conv; obj_conv.inner = untag_ptr(obj); @@ -64745,95 +69981,316 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Offer_1write(JNIEnv *en return ret_arr; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Amount_1free(JNIEnv *env, jclass clz, int64_t this_obj) { - LDKAmount this_obj_conv; - this_obj_conv.inner = untag_ptr(this_obj); - this_obj_conv.is_owned = ptr_is_owned(this_obj); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - Amount_free(this_obj_conv); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Amount_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKAmount this_ptr_conv = *(LDKAmount*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + Amount_free(this_ptr_conv); } static inline uint64_t Amount_clone_ptr(LDKAmount *NONNULL_PTR arg) { - LDKAmount ret_var = Amount_clone(arg); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount"); + *ret_copy = Amount_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Amount_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { - LDKAmount arg_conv; - arg_conv.inner = untag_ptr(arg); - arg_conv.is_owned = ptr_is_owned(arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); - arg_conv.is_owned = false; - int64_t ret_conv = Amount_clone_ptr(&arg_conv); + LDKAmount* arg_conv = (LDKAmount*)untag_ptr(arg); + int64_t ret_conv = Amount_clone_ptr(arg_conv); return ret_conv; } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Amount_1clone(JNIEnv *env, jclass clz, int64_t orig) { - LDKAmount orig_conv; - orig_conv.inner = untag_ptr(orig); - orig_conv.is_owned = ptr_is_owned(orig); - CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); - orig_conv.is_owned = false; - LDKAmount ret_var = Amount_clone(&orig_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKAmount* orig_conv = (LDKAmount*)untag_ptr(orig); + LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount"); + *ret_copy = Amount_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Amount_1bitcoin(JNIEnv *env, jclass clz, int64_t amount_msats) { + LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount"); + *ret_copy = Amount_bitcoin(amount_msats); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Amount_1currency(JNIEnv *env, jclass clz, int8_tArray iso4217_code, int64_t amount) { + LDKThreeBytes iso4217_code_ref; + CHECK((*env)->GetArrayLength(env, iso4217_code) == 3); + (*env)->GetByteArrayRegion(env, iso4217_code, 0, 3, iso4217_code_ref.data); + LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount"); + *ret_copy = Amount_currency(iso4217_code_ref, amount); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Quantity_1free(JNIEnv *env, jclass clz, int64_t this_obj) { - LDKQuantity this_obj_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Quantity_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKQuantity this_ptr_conv = *(LDKQuantity*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + Quantity_free(this_ptr_conv); +} + +static inline uint64_t Quantity_clone_ptr(LDKQuantity *NONNULL_PTR arg) { + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Quantity_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKQuantity* arg_conv = (LDKQuantity*)untag_ptr(arg); + int64_t ret_conv = Quantity_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKQuantity* orig_conv = (LDKQuantity*)untag_ptr(orig); + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Quantity_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1bounded(JNIEnv *env, jclass clz, int64_t a) { + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Quantity_bounded(a); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1unbounded(JNIEnv *env, jclass clz) { + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Quantity_unbounded(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1one(JNIEnv *env, jclass clz) { + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Quantity_one(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1from_1str(JNIEnv *env, jclass clz, jstring s) { + LDKStr s_conv = java_to_owned_str(env, s); + LDKCResult_OfferBolt12ParseErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12ParseErrorZ), "LDKCResult_OfferBolt12ParseErrorZ"); + *ret_conv = Offer_from_str(s_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); this_obj_conv.is_owned = ptr_is_owned(this_obj); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - Quantity_free(this_obj_conv); + InvoiceWithExplicitSigningPubkeyBuilder_free(this_obj_conv); } -static inline uint64_t Quantity_clone_ptr(LDKQuantity *NONNULL_PTR arg) { - LDKQuantity ret_var = Quantity_clone(arg); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + InvoiceWithDerivedSigningPubkeyBuilder_free(this_obj_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1build(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = InvoiceWithExplicitSigningPubkeyBuilder_build(this_arg_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1relative_1expiry(JNIEnv *env, jclass clz, int64_t this_arg, int32_t relative_expiry_secs) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry(this_arg_conv, relative_expiry_secs); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1fallback_1v0_1p2wsh(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray script_hash) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + uint8_t script_hash_arr[32]; + CHECK((*env)->GetArrayLength(env, script_hash) == 32); + (*env)->GetByteArrayRegion(env, script_hash, 0, 32, script_hash_arr); + uint8_t (*script_hash_ref)[32] = &script_hash_arr; + InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh(this_arg_conv, script_hash_ref); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1fallback_1v0_1p2wpkh(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray pubkey_hash) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + uint8_t pubkey_hash_arr[20]; + CHECK((*env)->GetArrayLength(env, pubkey_hash) == 20); + (*env)->GetByteArrayRegion(env, pubkey_hash, 0, 20, pubkey_hash_arr); + uint8_t (*pubkey_hash_ref)[20] = &pubkey_hash_arr; + InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh(this_arg_conv, pubkey_hash_ref); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1fallback_1v1_1p2tr_1tweaked(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray utput_key) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + LDKTweakedPublicKey utput_key_ref; + CHECK((*env)->GetArrayLength(env, utput_key) == 32); + (*env)->GetByteArrayRegion(env, utput_key, 0, 32, utput_key_ref.x_coordinate); + InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(this_arg_conv, utput_key_ref); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1allow_1mpp(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp(this_arg_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1build_1and_1sign(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign(this_arg_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1relative_1expiry(JNIEnv *env, jclass clz, int64_t this_arg, int32_t relative_expiry_secs) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry(this_arg_conv, relative_expiry_secs); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1fallback_1v0_1p2wsh(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray script_hash) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + uint8_t script_hash_arr[32]; + CHECK((*env)->GetArrayLength(env, script_hash) == 32); + (*env)->GetByteArrayRegion(env, script_hash, 0, 32, script_hash_arr); + uint8_t (*script_hash_ref)[32] = &script_hash_arr; + InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh(this_arg_conv, script_hash_ref); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1fallback_1v0_1p2wpkh(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray pubkey_hash) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + uint8_t pubkey_hash_arr[20]; + CHECK((*env)->GetArrayLength(env, pubkey_hash) == 20); + (*env)->GetByteArrayRegion(env, pubkey_hash, 0, 20, pubkey_hash_arr); + uint8_t (*pubkey_hash_ref)[20] = &pubkey_hash_arr; + InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh(this_arg_conv, pubkey_hash_ref); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1fallback_1v1_1p2tr_1tweaked(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray utput_key) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + LDKTweakedPublicKey utput_key_ref; + CHECK((*env)->GetArrayLength(env, utput_key) == 32); + (*env)->GetByteArrayRegion(env, utput_key, 0, 32, utput_key_ref.x_coordinate); + InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(this_arg_conv, utput_key_ref); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1allow_1mpp(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp(this_arg_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKUnsignedBolt12Invoice this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + UnsignedBolt12Invoice_free(this_obj_conv); +} + +static inline uint64_t UnsignedBolt12Invoice_clone_ptr(LDKUnsignedBolt12Invoice *NONNULL_PTR arg) { + LDKUnsignedBolt12Invoice ret_var = UnsignedBolt12Invoice_clone(arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { - LDKQuantity arg_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKUnsignedBolt12Invoice arg_conv; arg_conv.inner = untag_ptr(arg); arg_conv.is_owned = ptr_is_owned(arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); arg_conv.is_owned = false; - int64_t ret_conv = Quantity_clone_ptr(&arg_conv); + int64_t ret_conv = UnsignedBolt12Invoice_clone_ptr(&arg_conv); return ret_conv; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1clone(JNIEnv *env, jclass clz, int64_t orig) { - LDKQuantity orig_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKUnsignedBolt12Invoice orig_conv; orig_conv.inner = untag_ptr(orig); orig_conv.is_owned = ptr_is_owned(orig); CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); orig_conv.is_owned = false; - LDKQuantity ret_var = Quantity_clone(&orig_conv); + LDKUnsignedBolt12Invoice ret_var = UnsignedBolt12Invoice_clone(&orig_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1from_1str(JNIEnv *env, jclass clz, jstring s) { - LDKStr s_conv = java_to_owned_str(env, s); - LDKCResult_OfferBolt12ParseErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12ParseErrorZ), "LDKCResult_OfferBolt12ParseErrorZ"); - *ret_conv = Offer_from_str(s_conv); - return tag_ptr(ret_conv, true); -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1free(JNIEnv *env, jclass clz, int64_t this_obj) { - LDKUnsignedBolt12Invoice this_obj_conv; - this_obj_conv.inner = untag_ptr(this_obj); - this_obj_conv.is_owned = ptr_is_owned(this_obj); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - UnsignedBolt12Invoice_free(this_obj_conv); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignBolt12InvoiceFn_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKSignBolt12InvoiceFn this_ptr_conv = *(LDKSignBolt12InvoiceFn*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + SignBolt12InvoiceFn_free(this_ptr_conv); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1tagged_1hash(JNIEnv *env, jclass clz, int64_t this_arg) { @@ -64928,10 +70385,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1amou this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = UnsignedBolt12Invoice_amount(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = UnsignedBolt12Invoice_amount(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -65014,10 +70470,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1supp this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = UnsignedBolt12Invoice_supported_quantity(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = UnsignedBolt12Invoice_supported_quantity(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -65198,10 +70653,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12Invoice_1amount(JNIEn this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = Bolt12Invoice_amount(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = Bolt12Invoice_amount(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -65284,10 +70738,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12Invoice_1supported_1q this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = Bolt12Invoice_supported_quantity(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = Bolt12Invoice_supported_quantity(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -65465,6 +70918,16 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12Invoice_1verify(JNIEn return tag_ptr(ret_conv, true); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12Invoice_1hash(JNIEnv *env, jclass clz, int64_t o) { + LDKBolt12Invoice o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = Bolt12Invoice_hash(&o_conv); + return ret_conv; +} + JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1write(JNIEnv *env, jclass clz, int64_t obj) { LDKUnsignedBolt12Invoice obj_conv; obj_conv.inner = untag_ptr(obj); @@ -65948,6 +71411,142 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceError_1read(JNIEnv * return tag_ptr(ret_conv, true); } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + InvoiceRequestWithExplicitPayerIdBuilder_free(this_obj_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + InvoiceRequestWithDerivedPayerIdBuilder_free(this_obj_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1build(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_build(this_arg_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1chain(JNIEnv *env, jclass clz, int64_t this_arg, jclass network) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKNetwork network_conv = LDKNetwork_from_java(env, network); + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_chain(this_arg_conv, network_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1amount_1msats(JNIEnv *env, jclass clz, int64_t this_arg, int64_t amount_msats) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(this_arg_conv, amount_msats); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1quantity(JNIEnv *env, jclass clz, int64_t this_arg, int64_t quantity) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_quantity(this_arg_conv, quantity); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1payer_1note(JNIEnv *env, jclass clz, int64_t this_arg, jstring payer_note) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKStr payer_note_conv = java_to_owned_str(env, payer_note); + InvoiceRequestWithExplicitPayerIdBuilder_payer_note(this_arg_conv, payer_note_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1build_1and_1sign(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(this_arg_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1chain(JNIEnv *env, jclass clz, int64_t this_arg, jclass network) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKNetwork network_conv = LDKNetwork_from_java(env, network); + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_chain(this_arg_conv, network_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1amount_1msats(JNIEnv *env, jclass clz, int64_t this_arg, int64_t amount_msats) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_amount_msats(this_arg_conv, amount_msats); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1quantity(JNIEnv *env, jclass clz, int64_t this_arg, int64_t quantity) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_quantity(this_arg_conv, quantity); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1payer_1note(JNIEnv *env, jclass clz, int64_t this_arg, jstring payer_note) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKStr payer_note_conv = java_to_owned_str(env, payer_note); + InvoiceRequestWithDerivedPayerIdBuilder_payer_note(this_arg_conv, payer_note_conv); +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1free(JNIEnv *env, jclass clz, int64_t this_obj) { LDKUnsignedInvoiceRequest this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -65956,6 +71555,45 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1free(J UnsignedInvoiceRequest_free(this_obj_conv); } +static inline uint64_t UnsignedInvoiceRequest_clone_ptr(LDKUnsignedInvoiceRequest *NONNULL_PTR arg) { + LDKUnsignedInvoiceRequest ret_var = UnsignedInvoiceRequest_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKUnsignedInvoiceRequest arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = UnsignedInvoiceRequest_clone_ptr(&arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKUnsignedInvoiceRequest orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKUnsignedInvoiceRequest ret_var = UnsignedInvoiceRequest_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignInvoiceRequestFn_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKSignInvoiceRequestFn this_ptr_conv = *(LDKSignInvoiceRequestFn*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + SignInvoiceRequestFn_free(this_ptr_conv); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1tagged_1hash(JNIEnv *env, jclass clz, int64_t this_arg) { LDKUnsignedInvoiceRequest this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -66015,6 +71653,33 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1free(J VerifiedInvoiceRequest_free(this_obj_conv); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1get_1offer_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKVerifiedInvoiceRequest this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKOfferId ret_var = VerifiedInvoiceRequest_get_offer_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1set_1offer_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKVerifiedInvoiceRequest this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKOfferId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = OfferId_clone(&val_conv); + VerifiedInvoiceRequest_set_offer_id(&this_ptr_conv, val_conv); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1get_1keys(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKVerifiedInvoiceRequest this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -66108,10 +71773,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1amo this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = UnsignedInvoiceRequest_amount(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = UnsignedInvoiceRequest_amount(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -66194,10 +71858,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1sup this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = UnsignedInvoiceRequest_supported_quantity(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = UnsignedInvoiceRequest_supported_quantity(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -66334,10 +71997,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1amount(JNIE this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = InvoiceRequest_amount(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = InvoiceRequest_amount(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -66420,10 +72082,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1supported_1 this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = InvoiceRequest_supported_quantity(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = InvoiceRequest_supported_quantity(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -66522,15 +72183,64 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1payer_1note return ret_ref; } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1signature(JNIEnv *env, jclass clz, int64_t this_arg) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1respond_1with(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash) { LDKInvoiceRequest this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 64); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, InvoiceRequest_signature(&this_arg_conv).compact_form); - return ret_arr; + LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr; + payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths); + if (payment_paths_constr.datalen > 0) + payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements"); + else + payment_paths_constr.data = NULL; + int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL); + for (size_t l = 0; l < payment_paths_constr.datalen; l++) { + int64_t payment_paths_conv_37 = payment_paths_vals[l]; + void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37); + CHECK_ACCESS(payment_paths_conv_37_ptr); + LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr); + payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37)); + payment_paths_constr.data[l] = payment_paths_conv_37_conv; + } + (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0); + LDKThirtyTwoBytes payment_hash_ref; + CHECK((*env)->GetArrayLength(env, payment_hash) == 32); + (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data); + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequest_respond_with(&this_arg_conv, payment_paths_constr, payment_hash_ref); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1respond_1with_1no_1std(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash, int64_t created_at) { + LDKInvoiceRequest this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr; + payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths); + if (payment_paths_constr.datalen > 0) + payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements"); + else + payment_paths_constr.data = NULL; + int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL); + for (size_t l = 0; l < payment_paths_constr.datalen; l++) { + int64_t payment_paths_conv_37 = payment_paths_vals[l]; + void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37); + CHECK_ACCESS(payment_paths_conv_37_ptr); + LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr); + payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37)); + payment_paths_constr.data[l] = payment_paths_conv_37_conv; + } + (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0); + LDKThirtyTwoBytes payment_hash_ref; + CHECK((*env)->GetArrayLength(env, payment_hash) == 32); + (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data); + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequest_respond_with_no_std(&this_arg_conv, payment_paths_constr, payment_hash_ref, created_at); + return tag_ptr(ret_conv, true); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1verify(JNIEnv *env, jclass clz, int64_t this_arg, int64_t key) { @@ -66549,6 +72259,17 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1verify(JNIE return tag_ptr(ret_conv, true); } +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1signature(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKInvoiceRequest this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + int8_tArray ret_arr = (*env)->NewByteArray(env, 64); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, InvoiceRequest_signature(&this_arg_conv).compact_form); + return ret_arr; +} + JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1chains(JNIEnv *env, jclass clz, int64_t this_arg) { LDKVerifiedInvoiceRequest this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -66587,10 +72308,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1amo this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = VerifiedInvoiceRequest_amount(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = VerifiedInvoiceRequest_amount(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -66673,10 +72393,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1sup this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = VerifiedInvoiceRequest_supported_quantity(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = VerifiedInvoiceRequest_supported_quantity(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -66775,6 +72494,126 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1pay return ret_ref; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1with(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash) { + LDKVerifiedInvoiceRequest this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr; + payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths); + if (payment_paths_constr.datalen > 0) + payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements"); + else + payment_paths_constr.data = NULL; + int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL); + for (size_t l = 0; l < payment_paths_constr.datalen; l++) { + int64_t payment_paths_conv_37 = payment_paths_vals[l]; + void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37); + CHECK_ACCESS(payment_paths_conv_37_ptr); + LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr); + payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37)); + payment_paths_constr.data[l] = payment_paths_conv_37_conv; + } + (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0); + LDKThirtyTwoBytes payment_hash_ref; + CHECK((*env)->GetArrayLength(env, payment_hash) == 32); + (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data); + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = VerifiedInvoiceRequest_respond_with(&this_arg_conv, payment_paths_constr, payment_hash_ref); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1with_1no_1std(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash, int64_t created_at) { + LDKVerifiedInvoiceRequest this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr; + payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths); + if (payment_paths_constr.datalen > 0) + payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements"); + else + payment_paths_constr.data = NULL; + int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL); + for (size_t l = 0; l < payment_paths_constr.datalen; l++) { + int64_t payment_paths_conv_37 = payment_paths_vals[l]; + void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37); + CHECK_ACCESS(payment_paths_conv_37_ptr); + LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr); + payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37)); + payment_paths_constr.data[l] = payment_paths_conv_37_conv; + } + (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0); + LDKThirtyTwoBytes payment_hash_ref; + CHECK((*env)->GetArrayLength(env, payment_hash) == 32); + (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data); + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = VerifiedInvoiceRequest_respond_with_no_std(&this_arg_conv, payment_paths_constr, payment_hash_ref, created_at); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1using_1derived_1keys(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash) { + LDKVerifiedInvoiceRequest this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr; + payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths); + if (payment_paths_constr.datalen > 0) + payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements"); + else + payment_paths_constr.data = NULL; + int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL); + for (size_t l = 0; l < payment_paths_constr.datalen; l++) { + int64_t payment_paths_conv_37 = payment_paths_vals[l]; + void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37); + CHECK_ACCESS(payment_paths_conv_37_ptr); + LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr); + payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37)); + payment_paths_constr.data[l] = payment_paths_conv_37_conv; + } + (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0); + LDKThirtyTwoBytes payment_hash_ref; + CHECK((*env)->GetArrayLength(env, payment_hash) == 32); + (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data); + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = VerifiedInvoiceRequest_respond_using_derived_keys(&this_arg_conv, payment_paths_constr, payment_hash_ref); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1using_1derived_1keys_1no_1std(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash, int64_t created_at) { + LDKVerifiedInvoiceRequest this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr; + payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths); + if (payment_paths_constr.datalen > 0) + payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements"); + else + payment_paths_constr.data = NULL; + int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL); + for (size_t l = 0; l < payment_paths_constr.datalen; l++) { + int64_t payment_paths_conv_37 = payment_paths_vals[l]; + void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37); + CHECK_ACCESS(payment_paths_conv_37_ptr); + LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr); + payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37)); + payment_paths_constr.data[l] = payment_paths_conv_37_conv; + } + (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0); + LDKThirtyTwoBytes payment_hash_ref; + CHECK((*env)->GetArrayLength(env, payment_hash) == 32); + (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data); + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = VerifiedInvoiceRequest_respond_using_derived_keys_no_std(&this_arg_conv, payment_paths_constr, payment_hash_ref, created_at); + return tag_ptr(ret_conv, true); +} + JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1write(JNIEnv *env, jclass clz, int64_t obj) { LDKUnsignedInvoiceRequest obj_conv; obj_conv.inner = untag_ptr(obj); @@ -66801,6 +72640,177 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1write(J return ret_arr; } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKInvoiceRequestFields this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + InvoiceRequestFields_free(this_obj_conv); +} + +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1get_1payer_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = (*env)->NewByteArray(env, 33); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, InvoiceRequestFields_get_payer_id(&this_ptr_conv).compressed_form); + return ret_arr; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1set_1payer_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKPublicKey val_ref; + CHECK((*env)->GetArrayLength(env, val) == 33); + (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); + InvoiceRequestFields_set_payer_id(&this_ptr_conv, val_ref); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1get_1quantity(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z"); + *ret_copy = InvoiceRequestFields_get_quantity(&this_ptr_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1set_1quantity(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKCOption_u64Z val_conv = *(LDKCOption_u64Z*)(val_ptr); + val_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(val)); + InvoiceRequestFields_set_quantity(&this_ptr_conv, val_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1get_1payer_1note_1truncated(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKUntrustedString ret_var = InvoiceRequestFields_get_payer_note_truncated(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1set_1payer_1note_1truncated(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKUntrustedString val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = UntrustedString_clone(&val_conv); + InvoiceRequestFields_set_payer_note_truncated(&this_ptr_conv, val_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1new(JNIEnv *env, jclass clz, int8_tArray payer_id_arg, int64_t quantity_arg, int64_t payer_note_truncated_arg) { + LDKPublicKey payer_id_arg_ref; + CHECK((*env)->GetArrayLength(env, payer_id_arg) == 33); + (*env)->GetByteArrayRegion(env, payer_id_arg, 0, 33, payer_id_arg_ref.compressed_form); + void* quantity_arg_ptr = untag_ptr(quantity_arg); + CHECK_ACCESS(quantity_arg_ptr); + LDKCOption_u64Z quantity_arg_conv = *(LDKCOption_u64Z*)(quantity_arg_ptr); + quantity_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(quantity_arg)); + LDKUntrustedString payer_note_truncated_arg_conv; + payer_note_truncated_arg_conv.inner = untag_ptr(payer_note_truncated_arg); + payer_note_truncated_arg_conv.is_owned = ptr_is_owned(payer_note_truncated_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(payer_note_truncated_arg_conv); + payer_note_truncated_arg_conv = UntrustedString_clone(&payer_note_truncated_arg_conv); + LDKInvoiceRequestFields ret_var = InvoiceRequestFields_new(payer_id_arg_ref, quantity_arg_conv, payer_note_truncated_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t InvoiceRequestFields_clone_ptr(LDKInvoiceRequestFields *NONNULL_PTR arg) { + LDKInvoiceRequestFields ret_var = InvoiceRequestFields_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKInvoiceRequestFields arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = InvoiceRequestFields_clone_ptr(&arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKInvoiceRequestFields orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKInvoiceRequestFields ret_var = InvoiceRequestFields_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKInvoiceRequestFields a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKInvoiceRequestFields b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = InvoiceRequestFields_eq(&a_conv, &b_conv); + return ret_conv; +} + +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1write(JNIEnv *env, jclass clz, int64_t obj) { + LDKInvoiceRequestFields obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = InvoiceRequestFields_write(&obj_conv); + int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen); + (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1read(JNIEnv *env, jclass clz, int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = (*env)->GetArrayLength(env, ser); + ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL); + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ"); + *ret_conv = InvoiceRequestFields_read(ser_ref); + (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0); + return tag_ptr(ret_conv, true); +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TaggedHash_1free(JNIEnv *env, jclass clz, int64_t this_obj) { LDKTaggedHash this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -66873,6 +72883,50 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TaggedHash_1merkle_1roo return ret_arr; } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignError_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKSignError this_ptr_conv = *(LDKSignError*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + SignError_free(this_ptr_conv); +} + +static inline uint64_t SignError_clone_ptr(LDKSignError *NONNULL_PTR arg) { + LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError"); + *ret_copy = SignError_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignError_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKSignError* arg_conv = (LDKSignError*)untag_ptr(arg); + int64_t ret_conv = SignError_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignError_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKSignError* orig_conv = (LDKSignError*)untag_ptr(orig); + LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError"); + *ret_copy = SignError_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignError_1signing(JNIEnv *env, jclass clz) { + LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError"); + *ret_copy = SignError_signing(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignError_1verification(JNIEnv *env, jclass clz, jclass a) { + LDKSecp256k1Error a_conv = LDKSecp256k1Error_from_java(env, a); + LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError"); + *ret_copy = SignError_verification(a_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12ParseError_1free(JNIEnv *env, jclass clz, int64_t this_obj) { LDKBolt12ParseError this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -67032,6 +73086,11 @@ JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Bolt12SemanticError_1missing return ret_conv; } +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Bolt12SemanticError_1unexpected_1paths(JNIEnv *env, jclass clz) { + jclass ret_conv = LDKBolt12SemanticError_to_java(env, Bolt12SemanticError_unexpected_paths()); + return ret_conv; +} + JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Bolt12SemanticError_1invalid_1pay_1info(JNIEnv *env, jclass clz) { jclass ret_conv = LDKBolt12SemanticError_to_java(env, Bolt12SemanticError_invalid_pay_info()); return ret_conv; @@ -67052,6 +73111,164 @@ JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Bolt12SemanticError_1missing return ret_conv; } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKRefundMaybeWithDerivedMetadataBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + RefundMaybeWithDerivedMetadataBuilder_free(this_obj_conv); +} + +static inline uint64_t RefundMaybeWithDerivedMetadataBuilder_clone_ptr(LDKRefundMaybeWithDerivedMetadataBuilder *NONNULL_PTR arg) { + LDKRefundMaybeWithDerivedMetadataBuilder ret_var = RefundMaybeWithDerivedMetadataBuilder_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKRefundMaybeWithDerivedMetadataBuilder arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = RefundMaybeWithDerivedMetadataBuilder_clone_ptr(&arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKRefundMaybeWithDerivedMetadataBuilder orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKRefundMaybeWithDerivedMetadataBuilder ret_var = RefundMaybeWithDerivedMetadataBuilder_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1new(JNIEnv *env, jclass clz, int8_tArray metadata, int8_tArray payer_id, int64_t amount_msats) { + LDKCVec_u8Z metadata_ref; + metadata_ref.datalen = (*env)->GetArrayLength(env, metadata); + metadata_ref.data = MALLOC(metadata_ref.datalen, "LDKCVec_u8Z Bytes"); + (*env)->GetByteArrayRegion(env, metadata, 0, metadata_ref.datalen, metadata_ref.data); + LDKPublicKey payer_id_ref; + CHECK((*env)->GetArrayLength(env, payer_id) == 33); + (*env)->GetByteArrayRegion(env, payer_id, 0, 33, payer_id_ref.compressed_form); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = RefundMaybeWithDerivedMetadataBuilder_new(metadata_ref, payer_id_ref, amount_msats); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1deriving_1payer_1id(JNIEnv *env, jclass clz, int8_tArray node_id, int64_t expanded_key, int64_t entropy_source, int64_t amount_msats, int8_tArray payment_id) { + LDKPublicKey node_id_ref; + CHECK((*env)->GetArrayLength(env, node_id) == 33); + (*env)->GetByteArrayRegion(env, node_id, 0, 33, node_id_ref.compressed_form); + LDKExpandedKey expanded_key_conv; + expanded_key_conv.inner = untag_ptr(expanded_key); + expanded_key_conv.is_owned = ptr_is_owned(expanded_key); + CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv); + expanded_key_conv.is_owned = false; + void* entropy_source_ptr = untag_ptr(entropy_source); + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } + LDKThirtyTwoBytes payment_id_ref; + CHECK((*env)->GetArrayLength(env, payment_id) == 32); + (*env)->GetByteArrayRegion(env, payment_id, 0, 32, payment_id_ref.data); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(node_id_ref, &expanded_key_conv, entropy_source_conv, amount_msats, payment_id_ref); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1description(JNIEnv *env, jclass clz, int64_t this_arg, jstring description) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKStr description_conv = java_to_owned_str(env, description); + RefundMaybeWithDerivedMetadataBuilder_description(this_arg_conv, description_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1absolute_1expiry(JNIEnv *env, jclass clz, int64_t this_arg, int64_t absolute_expiry) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + RefundMaybeWithDerivedMetadataBuilder_absolute_expiry(this_arg_conv, absolute_expiry); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1issuer(JNIEnv *env, jclass clz, int64_t this_arg, jstring issuer) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKStr issuer_conv = java_to_owned_str(env, issuer); + RefundMaybeWithDerivedMetadataBuilder_issuer(this_arg_conv, issuer_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1path(JNIEnv *env, jclass clz, int64_t this_arg, int64_t path) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKBlindedPath path_conv; + path_conv.inner = untag_ptr(path); + path_conv.is_owned = ptr_is_owned(path); + CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv); + path_conv = BlindedPath_clone(&path_conv); + RefundMaybeWithDerivedMetadataBuilder_path(this_arg_conv, path_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1chain(JNIEnv *env, jclass clz, int64_t this_arg, jclass network) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKNetwork network_conv = LDKNetwork_from_java(env, network); + RefundMaybeWithDerivedMetadataBuilder_chain(this_arg_conv, network_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1quantity(JNIEnv *env, jclass clz, int64_t this_arg, int64_t quantity) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + RefundMaybeWithDerivedMetadataBuilder_quantity(this_arg_conv, quantity); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1payer_1note(JNIEnv *env, jclass clz, int64_t this_arg, jstring payer_note) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKStr payer_note_conv = java_to_owned_str(env, payer_note); + RefundMaybeWithDerivedMetadataBuilder_payer_note(this_arg_conv, payer_note_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1build(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ"); + *ret_conv = RefundMaybeWithDerivedMetadataBuilder_build(this_arg_conv); + return tag_ptr(ret_conv, true); +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Refund_1free(JNIEnv *env, jclass clz, int64_t this_obj) { LDKRefund this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -67252,6 +73469,16 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Refund_1payer_1note(JNIEnv return ret_ref; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Refund_1hash(JNIEnv *env, jclass clz, int64_t o) { + LDKRefund o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = Refund_hash(&o_conv); + return ret_conv; +} + JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Refund_1write(JNIEnv *env, jclass clz, int64_t obj) { LDKRefund obj_conv; obj_conv.inner = untag_ptr(obj); @@ -67483,6 +73710,16 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeId_1from_1pubkey(JNIEnv return ret_ref; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeId_1from_1slice(JNIEnv *env, jclass clz, int8_tArray bytes) { + LDKu8slice bytes_ref; + bytes_ref.datalen = (*env)->GetArrayLength(env, bytes); + bytes_ref.data = (*env)->GetByteArrayElements (env, bytes, NULL); + LDKCResult_NodeIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeIdDecodeErrorZ), "LDKCResult_NodeIdDecodeErrorZ"); + *ret_conv = NodeId_from_slice(bytes_ref); + (*env)->ReleaseByteArrayElements(env, bytes, (int8_t*)bytes_ref.data, 0); + return tag_ptr(ret_conv, true); +} + JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NodeId_1as_1slice(JNIEnv *env, jclass clz, int64_t this_arg) { LDKNodeId this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -68356,6 +74593,32 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DirectedChannelInfo_1effect return ret_ref; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DirectedChannelInfo_1source(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKDirectedChannelInfo this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKNodeId ret_var = DirectedChannelInfo_source(&this_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DirectedChannelInfo_1target(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKDirectedChannelInfo this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKNodeId ret_var = DirectedChannelInfo_target(&this_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_EffectiveCapacity_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -69076,6 +75339,16 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeInfo_1eq(JNIEnv *env, return ret_conv; } +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeInfo_1is_1tor_1only(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKNodeInfo this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = NodeInfo_is_tor_only(&this_arg_conv); + return ret_conv; +} + JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NodeInfo_1write(JNIEnv *env, jclass clz, int64_t obj) { LDKNodeInfo obj_conv; obj_conv.inner = untag_ptr(obj); @@ -73230,7 +79503,34 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_set_channel_value_satoshis(&this_ptr_conv, val); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1new(JNIEnv *env, jclass clz, int64_t outpoint_arg, int8_tArray per_commitment_point_arg, int16_t to_self_delay_arg, int64_t output_arg, int64_t revocation_pubkey_arg, int8_tArray channel_keys_id_arg, int64_t channel_value_satoshis_arg) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1get_1channel_1transaction_1parameters(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKDelayedPaymentOutputDescriptor this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelTransactionParameters ret_var = DelayedPaymentOutputDescriptor_get_channel_transaction_parameters(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1set_1channel_1transaction_1parameters(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKDelayedPaymentOutputDescriptor this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelTransactionParameters val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelTransactionParameters_clone(&val_conv); + DelayedPaymentOutputDescriptor_set_channel_transaction_parameters(&this_ptr_conv, val_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1new(JNIEnv *env, jclass clz, int64_t outpoint_arg, int8_tArray per_commitment_point_arg, int16_t to_self_delay_arg, int64_t output_arg, int64_t revocation_pubkey_arg, int8_tArray channel_keys_id_arg, int64_t channel_value_satoshis_arg, int64_t channel_transaction_parameters_arg) { LDKOutPoint outpoint_arg_conv; outpoint_arg_conv.inner = untag_ptr(outpoint_arg); outpoint_arg_conv.is_owned = ptr_is_owned(outpoint_arg); @@ -73251,7 +79551,12 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescrip LDKThirtyTwoBytes channel_keys_id_arg_ref; CHECK((*env)->GetArrayLength(env, channel_keys_id_arg) == 32); (*env)->GetByteArrayRegion(env, channel_keys_id_arg, 0, 32, channel_keys_id_arg_ref.data); - LDKDelayedPaymentOutputDescriptor ret_var = DelayedPaymentOutputDescriptor_new(outpoint_arg_conv, per_commitment_point_arg_ref, to_self_delay_arg, output_arg_conv, revocation_pubkey_arg_conv, channel_keys_id_arg_ref, channel_value_satoshis_arg); + LDKChannelTransactionParameters channel_transaction_parameters_arg_conv; + channel_transaction_parameters_arg_conv.inner = untag_ptr(channel_transaction_parameters_arg); + channel_transaction_parameters_arg_conv.is_owned = ptr_is_owned(channel_transaction_parameters_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_transaction_parameters_arg_conv); + channel_transaction_parameters_arg_conv = ChannelTransactionParameters_clone(&channel_transaction_parameters_arg_conv); + LDKDelayedPaymentOutputDescriptor ret_var = DelayedPaymentOutputDescriptor_new(outpoint_arg_conv, per_commitment_point_arg_ref, to_self_delay_arg, output_arg_conv, revocation_pubkey_arg_conv, channel_keys_id_arg_ref, channel_value_satoshis_arg, channel_transaction_parameters_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -73935,6 +80240,29 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1set_1channel_1 HTLCDescriptor_set_channel_derivation_parameters(&this_ptr_conv, val_conv); } +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1get_1commitment_1txid(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKHTLCDescriptor this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = (*env)->NewByteArray(env, 32); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *HTLCDescriptor_get_commitment_txid(&this_ptr_conv)); + return ret_arr; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1set_1commitment_1txid(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKHTLCDescriptor this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKThirtyTwoBytes val_ref; + CHECK((*env)->GetArrayLength(env, val) == 32); + (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); + HTLCDescriptor_set_commitment_txid(&this_ptr_conv, val_ref); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1get_1per_1commitment_1number(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKHTLCDescriptor this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -74071,6 +80399,37 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1set_1counterpa HTLCDescriptor_set_counterparty_sig(&this_ptr_conv, val_ref); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1new(JNIEnv *env, jclass clz, int64_t channel_derivation_parameters_arg, int8_tArray commitment_txid_arg, int64_t per_commitment_number_arg, int8_tArray per_commitment_point_arg, int32_t feerate_per_kw_arg, int64_t htlc_arg, int64_t preimage_arg, int8_tArray counterparty_sig_arg) { + LDKChannelDerivationParameters channel_derivation_parameters_arg_conv; + channel_derivation_parameters_arg_conv.inner = untag_ptr(channel_derivation_parameters_arg); + channel_derivation_parameters_arg_conv.is_owned = ptr_is_owned(channel_derivation_parameters_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_derivation_parameters_arg_conv); + channel_derivation_parameters_arg_conv = ChannelDerivationParameters_clone(&channel_derivation_parameters_arg_conv); + LDKThirtyTwoBytes commitment_txid_arg_ref; + CHECK((*env)->GetArrayLength(env, commitment_txid_arg) == 32); + (*env)->GetByteArrayRegion(env, commitment_txid_arg, 0, 32, commitment_txid_arg_ref.data); + LDKPublicKey per_commitment_point_arg_ref; + CHECK((*env)->GetArrayLength(env, per_commitment_point_arg) == 33); + (*env)->GetByteArrayRegion(env, per_commitment_point_arg, 0, 33, per_commitment_point_arg_ref.compressed_form); + LDKHTLCOutputInCommitment htlc_arg_conv; + htlc_arg_conv.inner = untag_ptr(htlc_arg); + htlc_arg_conv.is_owned = ptr_is_owned(htlc_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(htlc_arg_conv); + htlc_arg_conv = HTLCOutputInCommitment_clone(&htlc_arg_conv); + void* preimage_arg_ptr = untag_ptr(preimage_arg); + CHECK_ACCESS(preimage_arg_ptr); + LDKCOption_ThirtyTwoBytesZ preimage_arg_conv = *(LDKCOption_ThirtyTwoBytesZ*)(preimage_arg_ptr); + preimage_arg_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(preimage_arg)); + LDKECDSASignature counterparty_sig_arg_ref; + CHECK((*env)->GetArrayLength(env, counterparty_sig_arg) == 64); + (*env)->GetByteArrayRegion(env, counterparty_sig_arg, 0, 64, counterparty_sig_arg_ref.compact_form); + LDKHTLCDescriptor ret_var = HTLCDescriptor_new(channel_derivation_parameters_arg_conv, commitment_txid_arg_ref, per_commitment_number_arg, per_commitment_point_arg_ref, feerate_per_kw_arg, htlc_arg_conv, preimage_arg_conv, counterparty_sig_arg_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + static inline uint64_t HTLCDescriptor_clone_ptr(LDKHTLCDescriptor *NONNULL_PTR arg) { LDKHTLCDescriptor ret_var = HTLCDescriptor_clone(arg); int64_t ret_ref = 0; @@ -74275,6 +80634,15 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeSigner_1free(JNIEnv *env, NodeSigner_free(this_ptr_conv); } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutputSpender_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKOutputSpender this_ptr_conv = *(LDKOutputSpender*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + OutputSpender_free(this_ptr_conv); +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignerProvider_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -74284,6 +80652,15 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignerProvider_1free(JNIEnv *e SignerProvider_free(this_ptr_conv); } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChangeDestinationSource_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKChangeDestinationSource this_ptr_conv = *(LDKChangeDestinationSource*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + ChangeDestinationSource_free(this_ptr_conv); +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1free(JNIEnv *env, jclass clz, int64_t this_obj) { LDKInMemorySigner this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -74775,76 +81152,36 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1sign_1spendabl return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1spend_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray descriptors, int64_tArray outputs, int8_tArray change_destination_script, int32_t feerate_sat_per_1000_weight, int64_t locktime) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1EntropySource(JNIEnv *env, jclass clz, int64_t this_arg) { LDKKeysManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKCVec_SpendableOutputDescriptorZ descriptors_constr; - descriptors_constr.datalen = (*env)->GetArrayLength(env, descriptors); - if (descriptors_constr.datalen > 0) - descriptors_constr.data = MALLOC(descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements"); - else - descriptors_constr.data = NULL; - int64_t* descriptors_vals = (*env)->GetLongArrayElements (env, descriptors, NULL); - for (size_t b = 0; b < descriptors_constr.datalen; b++) { - int64_t descriptors_conv_27 = descriptors_vals[b]; - void* descriptors_conv_27_ptr = untag_ptr(descriptors_conv_27); - CHECK_ACCESS(descriptors_conv_27_ptr); - LDKSpendableOutputDescriptor descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(descriptors_conv_27_ptr); - descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptors_conv_27)); - descriptors_constr.data[b] = descriptors_conv_27_conv; - } - (*env)->ReleaseLongArrayElements(env, descriptors, descriptors_vals, 0); - LDKCVec_TxOutZ outputs_constr; - outputs_constr.datalen = (*env)->GetArrayLength(env, outputs); - if (outputs_constr.datalen > 0) - outputs_constr.data = MALLOC(outputs_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements"); - else - outputs_constr.data = NULL; - int64_t* outputs_vals = (*env)->GetLongArrayElements (env, outputs, NULL); - for (size_t h = 0; h < outputs_constr.datalen; h++) { - int64_t outputs_conv_7 = outputs_vals[h]; - void* outputs_conv_7_ptr = untag_ptr(outputs_conv_7); - CHECK_ACCESS(outputs_conv_7_ptr); - LDKTxOut outputs_conv_7_conv = *(LDKTxOut*)(outputs_conv_7_ptr); - outputs_conv_7_conv = TxOut_clone((LDKTxOut*)untag_ptr(outputs_conv_7)); - outputs_constr.data[h] = outputs_conv_7_conv; - } - (*env)->ReleaseLongArrayElements(env, outputs, outputs_vals, 0); - LDKCVec_u8Z change_destination_script_ref; - change_destination_script_ref.datalen = (*env)->GetArrayLength(env, change_destination_script); - change_destination_script_ref.data = MALLOC(change_destination_script_ref.datalen, "LDKCVec_u8Z Bytes"); - (*env)->GetByteArrayRegion(env, change_destination_script, 0, change_destination_script_ref.datalen, change_destination_script_ref.data); - void* locktime_ptr = untag_ptr(locktime); - CHECK_ACCESS(locktime_ptr); - LDKCOption_u32Z locktime_conv = *(LDKCOption_u32Z*)(locktime_ptr); - locktime_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(locktime)); - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = KeysManager_spend_spendable_outputs(&this_arg_conv, descriptors_constr, outputs_constr, change_destination_script_ref, feerate_sat_per_1000_weight, locktime_conv); - return tag_ptr(ret_conv, true); + LDKEntropySource* ret_ret = MALLOC(sizeof(LDKEntropySource), "LDKEntropySource"); + *ret_ret = KeysManager_as_EntropySource(&this_arg_conv); + return tag_ptr(ret_ret, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1EntropySource(JNIEnv *env, jclass clz, int64_t this_arg) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1NodeSigner(JNIEnv *env, jclass clz, int64_t this_arg) { LDKKeysManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKEntropySource* ret_ret = MALLOC(sizeof(LDKEntropySource), "LDKEntropySource"); - *ret_ret = KeysManager_as_EntropySource(&this_arg_conv); + LDKNodeSigner* ret_ret = MALLOC(sizeof(LDKNodeSigner), "LDKNodeSigner"); + *ret_ret = KeysManager_as_NodeSigner(&this_arg_conv); return tag_ptr(ret_ret, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1NodeSigner(JNIEnv *env, jclass clz, int64_t this_arg) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1OutputSpender(JNIEnv *env, jclass clz, int64_t this_arg) { LDKKeysManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKNodeSigner* ret_ret = MALLOC(sizeof(LDKNodeSigner), "LDKNodeSigner"); - *ret_ret = KeysManager_as_NodeSigner(&this_arg_conv); + LDKOutputSpender* ret_ret = MALLOC(sizeof(LDKOutputSpender), "LDKOutputSpender"); + *ret_ret = KeysManager_as_OutputSpender(&this_arg_conv); return tag_ptr(ret_ret, true); } @@ -74889,6 +81226,17 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1as_1Nod return tag_ptr(ret_ret, true); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1as_1OutputSpender(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKPhantomKeysManager this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKOutputSpender* ret_ret = MALLOC(sizeof(LDKOutputSpender), "LDKOutputSpender"); + *ret_ret = PhantomKeysManager_as_OutputSpender(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1as_1SignerProvider(JNIEnv *env, jclass clz, int64_t this_arg) { LDKPhantomKeysManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -74916,57 +81264,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1new(JNI return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1spend_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray descriptors, int64_tArray outputs, int8_tArray change_destination_script, int32_t feerate_sat_per_1000_weight, int64_t locktime) { - LDKPhantomKeysManager this_arg_conv; - this_arg_conv.inner = untag_ptr(this_arg); - this_arg_conv.is_owned = ptr_is_owned(this_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv.is_owned = false; - LDKCVec_SpendableOutputDescriptorZ descriptors_constr; - descriptors_constr.datalen = (*env)->GetArrayLength(env, descriptors); - if (descriptors_constr.datalen > 0) - descriptors_constr.data = MALLOC(descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements"); - else - descriptors_constr.data = NULL; - int64_t* descriptors_vals = (*env)->GetLongArrayElements (env, descriptors, NULL); - for (size_t b = 0; b < descriptors_constr.datalen; b++) { - int64_t descriptors_conv_27 = descriptors_vals[b]; - void* descriptors_conv_27_ptr = untag_ptr(descriptors_conv_27); - CHECK_ACCESS(descriptors_conv_27_ptr); - LDKSpendableOutputDescriptor descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(descriptors_conv_27_ptr); - descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptors_conv_27)); - descriptors_constr.data[b] = descriptors_conv_27_conv; - } - (*env)->ReleaseLongArrayElements(env, descriptors, descriptors_vals, 0); - LDKCVec_TxOutZ outputs_constr; - outputs_constr.datalen = (*env)->GetArrayLength(env, outputs); - if (outputs_constr.datalen > 0) - outputs_constr.data = MALLOC(outputs_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements"); - else - outputs_constr.data = NULL; - int64_t* outputs_vals = (*env)->GetLongArrayElements (env, outputs, NULL); - for (size_t h = 0; h < outputs_constr.datalen; h++) { - int64_t outputs_conv_7 = outputs_vals[h]; - void* outputs_conv_7_ptr = untag_ptr(outputs_conv_7); - CHECK_ACCESS(outputs_conv_7_ptr); - LDKTxOut outputs_conv_7_conv = *(LDKTxOut*)(outputs_conv_7_ptr); - outputs_conv_7_conv = TxOut_clone((LDKTxOut*)untag_ptr(outputs_conv_7)); - outputs_constr.data[h] = outputs_conv_7_conv; - } - (*env)->ReleaseLongArrayElements(env, outputs, outputs_vals, 0); - LDKCVec_u8Z change_destination_script_ref; - change_destination_script_ref.datalen = (*env)->GetArrayLength(env, change_destination_script); - change_destination_script_ref.data = MALLOC(change_destination_script_ref.datalen, "LDKCVec_u8Z Bytes"); - (*env)->GetByteArrayRegion(env, change_destination_script, 0, change_destination_script_ref.datalen, change_destination_script_ref.data); - void* locktime_ptr = untag_ptr(locktime); - CHECK_ACCESS(locktime_ptr); - LDKCOption_u32Z locktime_conv = *(LDKCOption_u32Z*)(locktime_ptr); - locktime_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(locktime)); - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = PhantomKeysManager_spend_spendable_outputs(&this_arg_conv, descriptors_constr, outputs_constr, change_destination_script_ref, feerate_sat_per_1000_weight, locktime_conv); - return tag_ptr(ret_conv, true); -} - JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1derive_1channel_1keys(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_value_satoshis, int8_tArray params) { LDKPhantomKeysManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -75006,6 +81303,36 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1get return ret_arr; } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RandomBytes_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKRandomBytes this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + RandomBytes_free(this_obj_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RandomBytes_1new(JNIEnv *env, jclass clz, int8_tArray seed) { + LDKThirtyTwoBytes seed_ref; + CHECK((*env)->GetArrayLength(env, seed) == 32); + (*env)->GetByteArrayRegion(env, seed, 0, 32, seed_ref.data); + LDKRandomBytes ret_var = RandomBytes_new(seed_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RandomBytes_1as_1EntropySource(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKRandomBytes this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKEntropySource* ret_ret = MALLOC(sizeof(LDKEntropySource), "LDKEntropySource"); + *ret_ret = RandomBytes_as_EntropySource(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_EcdsaChannelSigner_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -75322,6 +81649,29 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Destination_1blinded_1path( return ret_ref; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Destination_1hash(JNIEnv *env, jclass clz, int64_t o) { + LDKDestination* o_conv = (LDKDestination*)untag_ptr(o); + int64_t ret_conv = Destination_hash(o_conv); + return ret_conv; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Destination_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKDestination* a_conv = (LDKDestination*)untag_ptr(a); + LDKDestination* b_conv = (LDKDestination*)untag_ptr(b); + jboolean ret_conv = Destination_eq(a_conv, b_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Destination_1resolve(JNIEnv *env, jclass clz, int64_t this_arg, int64_t network_graph) { + LDKDestination* this_arg_conv = (LDKDestination*)untag_ptr(this_arg); + LDKReadOnlyNetworkGraph network_graph_conv; + network_graph_conv.inner = untag_ptr(network_graph); + network_graph_conv.is_owned = ptr_is_owned(network_graph); + CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv); + network_graph_conv.is_owned = false; + Destination_resolve(this_arg_conv, &network_graph_conv); +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SendSuccess_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -75368,6 +81718,12 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendSuccess_1buffered_1awai return ret_ref; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendSuccess_1hash(JNIEnv *env, jclass clz, int64_t o) { + LDKSendSuccess* o_conv = (LDKSendSuccess*)untag_ptr(o); + int64_t ret_conv = SendSuccess_hash(o_conv); + return ret_conv; +} + JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_SendSuccess_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { LDKSendSuccess* a_conv = (LDKSendSuccess*)untag_ptr(a); LDKSendSuccess* b_conv = (LDKSendSuccess*)untag_ptr(b); @@ -75464,6 +81820,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendError_1get_1node_1id_1f return ret_ref; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendError_1unresolved_1introduction_1node(JNIEnv *env, jclass clz) { + LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError"); + *ret_copy = SendError_unresolved_introduction_node(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendError_1blinded_1path_1advance_1failed(JNIEnv *env, jclass clz) { LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError"); *ret_copy = SendError_blinded_path_advance_failed(); @@ -75471,6 +81834,12 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendError_1blinded_1path_1a return ret_ref; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendError_1hash(JNIEnv *env, jclass clz, int64_t o) { + LDKSendError* o_conv = (LDKSendError*)untag_ptr(o); + int64_t ret_conv = SendError_hash(o_conv); + return ret_conv; +} + JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_SendError_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { LDKSendError* a_conv = (LDKSendError*)untag_ptr(a); LDKSendError* b_conv = (LDKSendError*)untag_ptr(b); @@ -75516,17 +81885,18 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeeledOnion_1clone(JNIEnv * return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeeledOnion_1forward(JNIEnv *env, jclass clz, int8_tArray a, int64_t b) { - LDKPublicKey a_ref; - CHECK((*env)->GetArrayLength(env, a) == 33); - (*env)->GetByteArrayRegion(env, a, 0, 33, a_ref.compressed_form); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeeledOnion_1forward(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + void* a_ptr = untag_ptr(a); + CHECK_ACCESS(a_ptr); + LDKNextMessageHop a_conv = *(LDKNextMessageHop*)(a_ptr); + a_conv = NextMessageHop_clone((LDKNextMessageHop*)untag_ptr(a)); LDKOnionMessage b_conv; b_conv.inner = untag_ptr(b); b_conv.is_owned = ptr_is_owned(b); CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); b_conv = OnionMessage_clone(&b_conv); LDKPeeledOnion *ret_copy = MALLOC(sizeof(LDKPeeledOnion), "LDKPeeledOnion"); - *ret_copy = PeeledOnion_forward(a_ref, b_conv); + *ret_copy = PeeledOnion_forward(a_conv, b_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -75550,13 +81920,53 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeeledOnion_1receive(JNIEnv return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1onion_1message(JNIEnv *env, jclass clz, int64_t entropy_source, int64_t node_signer, int64_t path, int64_t contents, int64_t reply_path) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1onion_1message_1resolving_1destination(JNIEnv *env, jclass clz, int64_t entropy_source, int64_t node_signer, int64_t node_id_lookup, int64_t network_graph, int64_t path, int64_t contents, int64_t reply_path) { + void* entropy_source_ptr = untag_ptr(entropy_source); + if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } + LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + void* node_signer_ptr = untag_ptr(node_signer); + if (ptr_is_owned(node_signer)) { CHECK_ACCESS(node_signer_ptr); } + LDKNodeSigner* node_signer_conv = (LDKNodeSigner*)node_signer_ptr; + void* node_id_lookup_ptr = untag_ptr(node_id_lookup); + if (ptr_is_owned(node_id_lookup)) { CHECK_ACCESS(node_id_lookup_ptr); } + LDKNodeIdLookUp* node_id_lookup_conv = (LDKNodeIdLookUp*)node_id_lookup_ptr; + LDKReadOnlyNetworkGraph network_graph_conv; + network_graph_conv.inner = untag_ptr(network_graph); + network_graph_conv.is_owned = ptr_is_owned(network_graph); + CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv); + network_graph_conv.is_owned = false; + LDKOnionMessagePath path_conv; + path_conv.inner = untag_ptr(path); + path_conv.is_owned = ptr_is_owned(path); + CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv); + path_conv = OnionMessagePath_clone(&path_conv); + void* contents_ptr = untag_ptr(contents); + CHECK_ACCESS(contents_ptr); + LDKOnionMessageContents contents_conv = *(LDKOnionMessageContents*)(contents_ptr); + if (contents_conv.free == LDKOnionMessageContents_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKOnionMessageContents_JCalls_cloned(&contents_conv); + } + LDKBlindedPath reply_path_conv; + reply_path_conv.inner = untag_ptr(reply_path); + reply_path_conv.is_owned = ptr_is_owned(reply_path); + CHECK_INNER_FIELD_ACCESS_OR_NULL(reply_path_conv); + reply_path_conv = BlindedPath_clone(&reply_path_conv); + LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ"); + *ret_conv = create_onion_message_resolving_destination(entropy_source_conv, node_signer_conv, node_id_lookup_conv, &network_graph_conv, path_conv, contents_conv, reply_path_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1onion_1message(JNIEnv *env, jclass clz, int64_t entropy_source, int64_t node_signer, int64_t node_id_lookup, int64_t path, int64_t contents, int64_t reply_path) { void* entropy_source_ptr = untag_ptr(entropy_source); if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; void* node_signer_ptr = untag_ptr(node_signer); if (ptr_is_owned(node_signer)) { CHECK_ACCESS(node_signer_ptr); } LDKNodeSigner* node_signer_conv = (LDKNodeSigner*)node_signer_ptr; + void* node_id_lookup_ptr = untag_ptr(node_id_lookup); + if (ptr_is_owned(node_id_lookup)) { CHECK_ACCESS(node_id_lookup_ptr); } + LDKNodeIdLookUp* node_id_lookup_conv = (LDKNodeIdLookUp*)node_id_lookup_ptr; LDKOnionMessagePath path_conv; path_conv.inner = untag_ptr(path); path_conv.is_owned = ptr_is_owned(path); @@ -75575,7 +81985,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1onion_1message(JNIE CHECK_INNER_FIELD_ACCESS_OR_NULL(reply_path_conv); reply_path_conv = BlindedPath_clone(&reply_path_conv); LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ"); - *ret_conv = create_onion_message(entropy_source_conv, node_signer_conv, path_conv, contents_conv, reply_path_conv); + *ret_conv = create_onion_message(entropy_source_conv, node_signer_conv, node_id_lookup_conv, path_conv, contents_conv, reply_path_conv); return tag_ptr(ret_conv, true); } @@ -75611,7 +82021,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_peel_1onion_1message(JNIEnv return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1new(JNIEnv *env, jclass clz, int64_t entropy_source, int64_t node_signer, int64_t logger, int64_t message_router, int64_t offers_handler, int64_t custom_handler) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1new(JNIEnv *env, jclass clz, int64_t entropy_source, int64_t node_signer, int64_t logger, int64_t node_id_lookup, int64_t message_router, int64_t offers_handler, int64_t custom_handler) { void* entropy_source_ptr = untag_ptr(entropy_source); CHECK_ACCESS(entropy_source_ptr); LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); @@ -75633,6 +82043,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1new(JNIEnv // If this_arg is a JCalls struct, then we need to increment the refcnt in it. LDKLogger_JCalls_cloned(&logger_conv); } + void* node_id_lookup_ptr = untag_ptr(node_id_lookup); + CHECK_ACCESS(node_id_lookup_ptr); + LDKNodeIdLookUp node_id_lookup_conv = *(LDKNodeIdLookUp*)(node_id_lookup_ptr); + if (node_id_lookup_conv.free == LDKNodeIdLookUp_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKNodeIdLookUp_JCalls_cloned(&node_id_lookup_conv); + } void* message_router_ptr = untag_ptr(message_router); CHECK_ACCESS(message_router_ptr); LDKMessageRouter message_router_conv = *(LDKMessageRouter*)(message_router_ptr); @@ -75654,7 +82071,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1new(JNIEnv // If this_arg is a JCalls struct, then we need to increment the refcnt in it. LDKCustomOnionMessageHandler_JCalls_cloned(&custom_handler_conv); } - LDKOnionMessenger ret_var = OnionMessenger_new(entropy_source_conv, node_signer_conv, logger_conv, message_router_conv, offers_handler_conv, custom_handler_conv); + LDKOnionMessenger ret_var = OnionMessenger_new(entropy_source_conv, node_signer_conv, logger_conv, node_id_lookup_conv, message_router_conv, offers_handler_conv, custom_handler_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -76093,6 +82510,65 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OnionMessageContents_1free(JNI OnionMessageContents_free(this_ptr_conv); } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKNextMessageHop this_ptr_conv = *(LDKNextMessageHop*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + NextMessageHop_free(this_ptr_conv); +} + +static inline uint64_t NextMessageHop_clone_ptr(LDKNextMessageHop *NONNULL_PTR arg) { + LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop"); + *ret_copy = NextMessageHop_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKNextMessageHop* arg_conv = (LDKNextMessageHop*)untag_ptr(arg); + int64_t ret_conv = NextMessageHop_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKNextMessageHop* orig_conv = (LDKNextMessageHop*)untag_ptr(orig); + LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop"); + *ret_copy = NextMessageHop_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1node_1id(JNIEnv *env, jclass clz, int8_tArray a) { + LDKPublicKey a_ref; + CHECK((*env)->GetArrayLength(env, a) == 33); + (*env)->GetByteArrayRegion(env, a, 0, 33, a_ref.compressed_form); + LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop"); + *ret_copy = NextMessageHop_node_id(a_ref); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1short_1channel_1id(JNIEnv *env, jclass clz, int64_t a) { + LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop"); + *ret_copy = NextMessageHop_short_channel_id(a); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1hash(JNIEnv *env, jclass clz, int64_t o) { + LDKNextMessageHop* o_conv = (LDKNextMessageHop*)untag_ptr(o); + int64_t ret_conv = NextMessageHop_hash(o_conv); + return ret_conv; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKNextMessageHop* a_conv = (LDKNextMessageHop*)untag_ptr(a); + LDKNextMessageHop* b_conv = (LDKNextMessageHop*)untag_ptr(b); + jboolean ret_conv = NextMessageHop_eq(a_conv, b_conv); + return ret_conv; +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1free(JNIEnv *env, jclass clz, int64_t this_obj) { LDKBlindedPath this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -76101,27 +82577,29 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1free(JNIEnv *env, BlindedPath_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BlindedPath_1get_1introduction_1node_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1get_1introduction_1node(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKBlindedPath this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, BlindedPath_get_introduction_node_id(&this_ptr_conv).compressed_form); - return ret_arr; + LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode"); + *ret_copy = BlindedPath_get_introduction_node(&this_ptr_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1set_1introduction_1node_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1set_1introduction_1node(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKBlindedPath this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK((*env)->GetArrayLength(env, val) == 33); - (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - BlindedPath_set_introduction_node_id(&this_ptr_conv, val_ref); + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKIntroductionNode val_conv = *(LDKIntroductionNode*)(val_ptr); + val_conv = IntroductionNode_clone((LDKIntroductionNode*)untag_ptr(val)); + BlindedPath_set_introduction_node(&this_ptr_conv, val_conv); } JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BlindedPath_1get_1blinding_1point(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -76195,10 +82673,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1set_1blinded_1hop BlindedPath_set_blinded_hops(&this_ptr_conv, val_constr); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new(JNIEnv *env, jclass clz, int8_tArray introduction_node_id_arg, int8_tArray blinding_point_arg, int64_tArray blinded_hops_arg) { - LDKPublicKey introduction_node_id_arg_ref; - CHECK((*env)->GetArrayLength(env, introduction_node_id_arg) == 33); - (*env)->GetByteArrayRegion(env, introduction_node_id_arg, 0, 33, introduction_node_id_arg_ref.compressed_form); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new(JNIEnv *env, jclass clz, int64_t introduction_node_arg, int8_tArray blinding_point_arg, int64_tArray blinded_hops_arg) { + void* introduction_node_arg_ptr = untag_ptr(introduction_node_arg); + CHECK_ACCESS(introduction_node_arg_ptr); + LDKIntroductionNode introduction_node_arg_conv = *(LDKIntroductionNode*)(introduction_node_arg_ptr); + introduction_node_arg_conv = IntroductionNode_clone((LDKIntroductionNode*)untag_ptr(introduction_node_arg)); LDKPublicKey blinding_point_arg_ref; CHECK((*env)->GetArrayLength(env, blinding_point_arg) == 33); (*env)->GetByteArrayRegion(env, blinding_point_arg, 0, 33, blinding_point_arg_ref.compressed_form); @@ -76219,7 +82698,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new(JNIEnv *en blinded_hops_arg_constr.data[m] = blinded_hops_arg_conv_12_conv; } (*env)->ReleaseLongArrayElements(env, blinded_hops_arg, blinded_hops_arg_vals, 0); - LDKBlindedPath ret_var = BlindedPath_new(introduction_node_id_arg_ref, blinding_point_arg_ref, blinded_hops_arg_constr); + LDKBlindedPath ret_var = BlindedPath_new(introduction_node_arg_conv, blinding_point_arg_ref, blinded_hops_arg_constr); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -76281,6 +82760,131 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_BlindedPath_1eq(JNIEnv *en return ret_conv; } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKIntroductionNode this_ptr_conv = *(LDKIntroductionNode*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + IntroductionNode_free(this_ptr_conv); +} + +static inline uint64_t IntroductionNode_clone_ptr(LDKIntroductionNode *NONNULL_PTR arg) { + LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode"); + *ret_copy = IntroductionNode_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKIntroductionNode* arg_conv = (LDKIntroductionNode*)untag_ptr(arg); + int64_t ret_conv = IntroductionNode_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKIntroductionNode* orig_conv = (LDKIntroductionNode*)untag_ptr(orig); + LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode"); + *ret_copy = IntroductionNode_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1node_1id(JNIEnv *env, jclass clz, int8_tArray a) { + LDKPublicKey a_ref; + CHECK((*env)->GetArrayLength(env, a) == 33); + (*env)->GetByteArrayRegion(env, a, 0, 33, a_ref.compressed_form); + LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode"); + *ret_copy = IntroductionNode_node_id(a_ref); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1directed_1short_1channel_1id(JNIEnv *env, jclass clz, jclass a, int64_t b) { + LDKDirection a_conv = LDKDirection_from_java(env, a); + LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode"); + *ret_copy = IntroductionNode_directed_short_channel_id(a_conv, b); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1hash(JNIEnv *env, jclass clz, int64_t o) { + LDKIntroductionNode* o_conv = (LDKIntroductionNode*)untag_ptr(o); + int64_t ret_conv = IntroductionNode_hash(o_conv); + return ret_conv; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKIntroductionNode* a_conv = (LDKIntroductionNode*)untag_ptr(a); + LDKIntroductionNode* b_conv = (LDKIntroductionNode*)untag_ptr(b); + jboolean ret_conv = IntroductionNode_eq(a_conv, b_conv); + return ret_conv; +} + +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Direction_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKDirection* orig_conv = (LDKDirection*)untag_ptr(orig); + jclass ret_conv = LDKDirection_to_java(env, Direction_clone(orig_conv)); + return ret_conv; +} + +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Direction_1node_1one(JNIEnv *env, jclass clz) { + jclass ret_conv = LDKDirection_to_java(env, Direction_node_one()); + return ret_conv; +} + +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Direction_1node_1two(JNIEnv *env, jclass clz) { + jclass ret_conv = LDKDirection_to_java(env, Direction_node_two()); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Direction_1hash(JNIEnv *env, jclass clz, int64_t o) { + LDKDirection* o_conv = (LDKDirection*)untag_ptr(o); + int64_t ret_conv = Direction_hash(o_conv); + return ret_conv; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Direction_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKDirection* a_conv = (LDKDirection*)untag_ptr(a); + LDKDirection* b_conv = (LDKDirection*)untag_ptr(b); + jboolean ret_conv = Direction_eq(a_conv, b_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeIdLookUp_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKNodeIdLookUp this_ptr_conv = *(LDKNodeIdLookUp*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + NodeIdLookUp_free(this_ptr_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_EmptyNodeIdLookUp_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKEmptyNodeIdLookUp this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + EmptyNodeIdLookUp_free(this_obj_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_EmptyNodeIdLookUp_1new(JNIEnv *env, jclass clz) { + LDKEmptyNodeIdLookUp ret_var = EmptyNodeIdLookUp_new(); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_EmptyNodeIdLookUp_1as_1NodeIdLookUp(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKEmptyNodeIdLookUp this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKNodeIdLookUp* ret_ret = MALLOC(sizeof(LDKNodeIdLookUp), "LDKNodeIdLookUp"); + *ret_ret = EmptyNodeIdLookUp_as_NodeIdLookUp(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedHop_1free(JNIEnv *env, jclass clz, int64_t this_obj) { LDKBlindedHop this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -76413,8 +83017,12 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1one_1hop_1for_ CHECK((*env)->GetArrayLength(env, recipient_node_id) == 33); (*env)->GetByteArrayRegion(env, recipient_node_id, 0, 33, recipient_node_id_ref.compressed_form); void* entropy_source_ptr = untag_ptr(entropy_source); - if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } - LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } LDKCResult_BlindedPathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedPathNoneZ), "LDKCResult_BlindedPathNoneZ"); *ret_conv = BlindedPath_one_hop_for_message(recipient_node_id_ref, entropy_source_conv); return tag_ptr(ret_conv, true); @@ -76435,14 +83043,18 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new_1for_1mess node_pks_constr.data[i] = node_pks_conv_8_ref; } void* entropy_source_ptr = untag_ptr(entropy_source); - if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } - LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } LDKCResult_BlindedPathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedPathNoneZ), "LDKCResult_BlindedPathNoneZ"); *ret_conv = BlindedPath_new_for_message(node_pks_constr, entropy_source_conv); return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1one_1hop_1for_1payment(JNIEnv *env, jclass clz, int8_tArray payee_node_id, int64_t payee_tlvs, int64_t entropy_source) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1one_1hop_1for_1payment(JNIEnv *env, jclass clz, int8_tArray payee_node_id, int64_t payee_tlvs, int16_t min_final_cltv_expiry_delta, int64_t entropy_source) { LDKPublicKey payee_node_id_ref; CHECK((*env)->GetArrayLength(env, payee_node_id) == 33); (*env)->GetByteArrayRegion(env, payee_node_id, 0, 33, payee_node_id_ref.compressed_form); @@ -76452,14 +83064,18 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1one_1hop_1for_ CHECK_INNER_FIELD_ACCESS_OR_NULL(payee_tlvs_conv); payee_tlvs_conv = ReceiveTlvs_clone(&payee_tlvs_conv); void* entropy_source_ptr = untag_ptr(entropy_source); - if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } - LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ), "LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ"); - *ret_conv = BlindedPath_one_hop_for_payment(payee_node_id_ref, payee_tlvs_conv, entropy_source_conv); + *ret_conv = BlindedPath_one_hop_for_payment(payee_node_id_ref, payee_tlvs_conv, min_final_cltv_expiry_delta, entropy_source_conv); return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new_1for_1payment(JNIEnv *env, jclass clz, int64_tArray intermediate_nodes, int8_tArray payee_node_id, int64_t payee_tlvs, int64_t htlc_maximum_msat, int64_t entropy_source) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new_1for_1payment(JNIEnv *env, jclass clz, int64_tArray intermediate_nodes, int8_tArray payee_node_id, int64_t payee_tlvs, int64_t htlc_maximum_msat, int16_t min_final_cltv_expiry_delta, int64_t entropy_source) { LDKCVec_ForwardNodeZ intermediate_nodes_constr; intermediate_nodes_constr.datalen = (*env)->GetArrayLength(env, intermediate_nodes); if (intermediate_nodes_constr.datalen > 0) @@ -76486,13 +83102,35 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new_1for_1paym CHECK_INNER_FIELD_ACCESS_OR_NULL(payee_tlvs_conv); payee_tlvs_conv = ReceiveTlvs_clone(&payee_tlvs_conv); void* entropy_source_ptr = untag_ptr(entropy_source); - if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } - LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ), "LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ"); - *ret_conv = BlindedPath_new_for_payment(intermediate_nodes_constr, payee_node_id_ref, payee_tlvs_conv, htlc_maximum_msat, entropy_source_conv); + *ret_conv = BlindedPath_new_for_payment(intermediate_nodes_constr, payee_node_id_ref, payee_tlvs_conv, htlc_maximum_msat, min_final_cltv_expiry_delta, entropy_source_conv); return tag_ptr(ret_conv, true); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1public_1introduction_1node_1id(JNIEnv *env, jclass clz, int64_t this_arg, int64_t network_graph) { + LDKBlindedPath this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKReadOnlyNetworkGraph network_graph_conv; + network_graph_conv.inner = untag_ptr(network_graph); + network_graph_conv.is_owned = ptr_is_owned(network_graph); + CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv); + network_graph_conv.is_owned = false; + LDKNodeId ret_var = BlindedPath_public_introduction_node_id(&this_arg_conv, &network_graph_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BlindedPath_1write(JNIEnv *env, jclass clz, int64_t obj) { LDKBlindedPath obj_conv; obj_conv.inner = untag_ptr(obj); @@ -76881,7 +83519,32 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1set_1payment_1con ReceiveTlvs_set_payment_constraints(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1new(JNIEnv *env, jclass clz, int8_tArray payment_secret_arg, int64_t payment_constraints_arg) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1get_1payment_1context(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKReceiveTlvs this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = ReceiveTlvs_get_payment_context(&this_ptr_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1set_1payment_1context(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKReceiveTlvs this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKPaymentContext val_conv = *(LDKPaymentContext*)(val_ptr); + val_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(val)); + ReceiveTlvs_set_payment_context(&this_ptr_conv, val_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1new(JNIEnv *env, jclass clz, int8_tArray payment_secret_arg, int64_t payment_constraints_arg, int64_t payment_context_arg) { LDKThirtyTwoBytes payment_secret_arg_ref; CHECK((*env)->GetArrayLength(env, payment_secret_arg) == 32); (*env)->GetByteArrayRegion(env, payment_secret_arg, 0, 32, payment_secret_arg_ref.data); @@ -76890,7 +83553,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1new(JNIEnv *en payment_constraints_arg_conv.is_owned = ptr_is_owned(payment_constraints_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_constraints_arg_conv); payment_constraints_arg_conv = PaymentConstraints_clone(&payment_constraints_arg_conv); - LDKReceiveTlvs ret_var = ReceiveTlvs_new(payment_secret_arg_ref, payment_constraints_arg_conv); + void* payment_context_arg_ptr = untag_ptr(payment_context_arg); + CHECK_ACCESS(payment_context_arg_ptr); + LDKPaymentContext payment_context_arg_conv = *(LDKPaymentContext*)(payment_context_arg_ptr); + payment_context_arg_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(payment_context_arg)); + LDKReceiveTlvs ret_var = ReceiveTlvs_new(payment_secret_arg_ref, payment_constraints_arg_conv, payment_context_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -77114,6 +83781,317 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentConstraints_1clone(J return ret_ref; } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PaymentContext_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKPaymentContext this_ptr_conv = *(LDKPaymentContext*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + PaymentContext_free(this_ptr_conv); +} + +static inline uint64_t PaymentContext_clone_ptr(LDKPaymentContext *NONNULL_PTR arg) { + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = PaymentContext_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKPaymentContext* arg_conv = (LDKPaymentContext*)untag_ptr(arg); + int64_t ret_conv = PaymentContext_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKPaymentContext* orig_conv = (LDKPaymentContext*)untag_ptr(orig); + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = PaymentContext_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1unknown(JNIEnv *env, jclass clz, int64_t a) { + LDKUnknownPaymentContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = UnknownPaymentContext_clone(&a_conv); + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = PaymentContext_unknown(a_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1bolt12_1offer(JNIEnv *env, jclass clz, int64_t a) { + LDKBolt12OfferContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = Bolt12OfferContext_clone(&a_conv); + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = PaymentContext_bolt12_offer(a_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1bolt12_1refund(JNIEnv *env, jclass clz, int64_t a) { + LDKBolt12RefundContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = Bolt12RefundContext_clone(&a_conv); + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = PaymentContext_bolt12_refund(a_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_PaymentContext_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKPaymentContext* a_conv = (LDKPaymentContext*)untag_ptr(a); + LDKPaymentContext* b_conv = (LDKPaymentContext*)untag_ptr(b); + jboolean ret_conv = PaymentContext_eq(a_conv, b_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKUnknownPaymentContext this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + UnknownPaymentContext_free(this_obj_conv); +} + +static inline uint64_t UnknownPaymentContext_clone_ptr(LDKUnknownPaymentContext *NONNULL_PTR arg) { + LDKUnknownPaymentContext ret_var = UnknownPaymentContext_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKUnknownPaymentContext arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = UnknownPaymentContext_clone_ptr(&arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKUnknownPaymentContext orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKUnknownPaymentContext ret_var = UnknownPaymentContext_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKUnknownPaymentContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKUnknownPaymentContext b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = UnknownPaymentContext_eq(&a_conv, &b_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKBolt12OfferContext this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + Bolt12OfferContext_free(this_obj_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1get_1offer_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKBolt12OfferContext this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKOfferId ret_var = Bolt12OfferContext_get_offer_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1set_1offer_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKBolt12OfferContext this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKOfferId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = OfferId_clone(&val_conv); + Bolt12OfferContext_set_offer_id(&this_ptr_conv, val_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1get_1invoice_1request(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKBolt12OfferContext this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKInvoiceRequestFields ret_var = Bolt12OfferContext_get_invoice_request(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1set_1invoice_1request(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKBolt12OfferContext this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKInvoiceRequestFields val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = InvoiceRequestFields_clone(&val_conv); + Bolt12OfferContext_set_invoice_request(&this_ptr_conv, val_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1new(JNIEnv *env, jclass clz, int64_t offer_id_arg, int64_t invoice_request_arg) { + LDKOfferId offer_id_arg_conv; + offer_id_arg_conv.inner = untag_ptr(offer_id_arg); + offer_id_arg_conv.is_owned = ptr_is_owned(offer_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(offer_id_arg_conv); + offer_id_arg_conv = OfferId_clone(&offer_id_arg_conv); + LDKInvoiceRequestFields invoice_request_arg_conv; + invoice_request_arg_conv.inner = untag_ptr(invoice_request_arg); + invoice_request_arg_conv.is_owned = ptr_is_owned(invoice_request_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_request_arg_conv); + invoice_request_arg_conv = InvoiceRequestFields_clone(&invoice_request_arg_conv); + LDKBolt12OfferContext ret_var = Bolt12OfferContext_new(offer_id_arg_conv, invoice_request_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t Bolt12OfferContext_clone_ptr(LDKBolt12OfferContext *NONNULL_PTR arg) { + LDKBolt12OfferContext ret_var = Bolt12OfferContext_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKBolt12OfferContext arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = Bolt12OfferContext_clone_ptr(&arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKBolt12OfferContext orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKBolt12OfferContext ret_var = Bolt12OfferContext_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKBolt12OfferContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKBolt12OfferContext b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = Bolt12OfferContext_eq(&a_conv, &b_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKBolt12RefundContext this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + Bolt12RefundContext_free(this_obj_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1new(JNIEnv *env, jclass clz) { + LDKBolt12RefundContext ret_var = Bolt12RefundContext_new(); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t Bolt12RefundContext_clone_ptr(LDKBolt12RefundContext *NONNULL_PTR arg) { + LDKBolt12RefundContext ret_var = Bolt12RefundContext_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKBolt12RefundContext arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = Bolt12RefundContext_clone_ptr(&arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKBolt12RefundContext orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKBolt12RefundContext ret_var = Bolt12RefundContext_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKBolt12RefundContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKBolt12RefundContext b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = Bolt12RefundContext_eq(&a_conv, &b_conv); + return ret_conv; +} + JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ForwardTlvs_1write(JNIEnv *env, jclass clz, int64_t obj) { LDKForwardTlvs obj_conv; obj_conv.inner = untag_ptr(obj); @@ -77186,6 +84164,94 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentConstraints_1read(JN return tag_ptr(ret_conv, true); } +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_PaymentContext_1write(JNIEnv *env, jclass clz, int64_t obj) { + LDKPaymentContext* obj_conv = (LDKPaymentContext*)untag_ptr(obj); + LDKCVec_u8Z ret_var = PaymentContext_write(obj_conv); + int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen); + (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1read(JNIEnv *env, jclass clz, int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = (*env)->GetArrayLength(env, ser); + ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL); + LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ"); + *ret_conv = PaymentContext_read(ser_ref); + (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1write(JNIEnv *env, jclass clz, int64_t obj) { + LDKUnknownPaymentContext obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = UnknownPaymentContext_write(&obj_conv); + int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen); + (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1read(JNIEnv *env, jclass clz, int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = (*env)->GetArrayLength(env, ser); + ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL); + LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ"); + *ret_conv = UnknownPaymentContext_read(ser_ref); + (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1write(JNIEnv *env, jclass clz, int64_t obj) { + LDKBolt12OfferContext obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = Bolt12OfferContext_write(&obj_conv); + int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen); + (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1read(JNIEnv *env, jclass clz, int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = (*env)->GetArrayLength(env, ser); + ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL); + LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ"); + *ret_conv = Bolt12OfferContext_read(ser_ref); + (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1write(JNIEnv *env, jclass clz, int64_t obj) { + LDKBolt12RefundContext obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = Bolt12RefundContext_write(&obj_conv); + int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen); + (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1read(JNIEnv *env, jclass clz, int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = (*env)->GetArrayLength(env, ser); + ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL); + LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ"); + *ret_conv = Bolt12RefundContext_read(ser_ref); + (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0); + return tag_ptr(ret_conv, true); +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -77215,7 +84281,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1clone(JNIEn return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1invoice_1payment(JNIEnv *env, jclass clz, int64_t payment_preimage, int8_tArray payment_secret) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1bolt11_1invoice_1payment(JNIEnv *env, jclass clz, int64_t payment_preimage, int8_tArray payment_secret) { + void* payment_preimage_ptr = untag_ptr(payment_preimage); + CHECK_ACCESS(payment_preimage_ptr); + LDKCOption_ThirtyTwoBytesZ payment_preimage_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_preimage_ptr); + payment_preimage_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(payment_preimage)); + LDKThirtyTwoBytes payment_secret_ref; + CHECK((*env)->GetArrayLength(env, payment_secret) == 32); + (*env)->GetByteArrayRegion(env, payment_secret, 0, 32, payment_secret_ref.data); + LDKPaymentPurpose *ret_copy = MALLOC(sizeof(LDKPaymentPurpose), "LDKPaymentPurpose"); + *ret_copy = PaymentPurpose_bolt11_invoice_payment(payment_preimage_conv, payment_secret_ref); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1bolt12_1offer_1payment(JNIEnv *env, jclass clz, int64_t payment_preimage, int8_tArray payment_secret, int64_t payment_context) { void* payment_preimage_ptr = untag_ptr(payment_preimage); CHECK_ACCESS(payment_preimage_ptr); LDKCOption_ThirtyTwoBytesZ payment_preimage_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_preimage_ptr); @@ -77223,8 +84303,32 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1invoice_1pa LDKThirtyTwoBytes payment_secret_ref; CHECK((*env)->GetArrayLength(env, payment_secret) == 32); (*env)->GetByteArrayRegion(env, payment_secret, 0, 32, payment_secret_ref.data); + LDKBolt12OfferContext payment_context_conv; + payment_context_conv.inner = untag_ptr(payment_context); + payment_context_conv.is_owned = ptr_is_owned(payment_context); + CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_conv); + payment_context_conv = Bolt12OfferContext_clone(&payment_context_conv); LDKPaymentPurpose *ret_copy = MALLOC(sizeof(LDKPaymentPurpose), "LDKPaymentPurpose"); - *ret_copy = PaymentPurpose_invoice_payment(payment_preimage_conv, payment_secret_ref); + *ret_copy = PaymentPurpose_bolt12_offer_payment(payment_preimage_conv, payment_secret_ref, payment_context_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1bolt12_1refund_1payment(JNIEnv *env, jclass clz, int64_t payment_preimage, int8_tArray payment_secret, int64_t payment_context) { + void* payment_preimage_ptr = untag_ptr(payment_preimage); + CHECK_ACCESS(payment_preimage_ptr); + LDKCOption_ThirtyTwoBytesZ payment_preimage_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_preimage_ptr); + payment_preimage_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(payment_preimage)); + LDKThirtyTwoBytes payment_secret_ref; + CHECK((*env)->GetArrayLength(env, payment_secret) == 32); + (*env)->GetByteArrayRegion(env, payment_secret, 0, 32, payment_secret_ref.data); + LDKBolt12RefundContext payment_context_conv; + payment_context_conv.inner = untag_ptr(payment_context); + payment_context_conv.is_owned = ptr_is_owned(payment_context); + CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_conv); + payment_context_conv = Bolt12RefundContext_clone(&payment_context_conv); + LDKPaymentPurpose *ret_copy = MALLOC(sizeof(LDKPaymentPurpose), "LDKPaymentPurpose"); + *ret_copy = PaymentPurpose_bolt12_refund_payment(payment_preimage_conv, payment_secret_ref, payment_context_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -77281,27 +84385,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1free(JNIEnv *env, ClaimedHTLC_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKClaimedHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ClaimedHTLC_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = ClaimedHTLC_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKClaimedHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - ClaimedHTLC_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ClaimedHTLC_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1get_1user_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -77384,14 +84492,16 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1set_1counterparty ClaimedHTLC_set_counterparty_skimmed_fee_msat(&this_ptr_conv, val); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray user_channel_id_arg, int32_t cltv_expiry_arg, int64_t value_msat_arg, int64_t counterparty_skimmed_fee_msat_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray user_channel_id_arg, int32_t cltv_expiry_arg, int64_t value_msat_arg, int64_t counterparty_skimmed_fee_msat_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKU128 user_channel_id_arg_ref; CHECK((*env)->GetArrayLength(env, user_channel_id_arg) == 16); (*env)->GetByteArrayRegion(env, user_channel_id_arg, 0, 16, user_channel_id_arg_ref.le_bytes); - LDKClaimedHTLC ret_var = ClaimedHTLC_new(channel_id_arg_ref, user_channel_id_arg_ref, cltv_expiry_arg, value_msat_arg, counterparty_skimmed_fee_msat_arg); + LDKClaimedHTLC ret_var = ClaimedHTLC_new(channel_id_arg_conv, user_channel_id_arg_ref, cltv_expiry_arg, value_msat_arg, counterparty_skimmed_fee_msat_arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -77591,9 +84701,23 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1holder_1forc return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1cooperative_1closure(JNIEnv *env, jclass clz) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1legacy_1cooperative_1closure(JNIEnv *env, jclass clz) { + LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason"); + *ret_copy = ClosureReason_legacy_cooperative_closure(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1counterparty_1initiated_1cooperative_1closure(JNIEnv *env, jclass clz) { LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason"); - *ret_copy = ClosureReason_cooperative_closure(); + *ret_copy = ClosureReason_counterparty_initiated_cooperative_closure(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1locally_1initiated_1cooperative_1closure(JNIEnv *env, jclass clz) { + LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason"); + *ret_copy = ClosureReason_locally_initiated_cooperative_closure(); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -77648,6 +84772,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1funding_1bat return ret_ref; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1htlcs_1timed_1out(JNIEnv *env, jclass clz) { + LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason"); + *ret_copy = ClosureReason_htlcs_timed_out(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ClosureReason_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { LDKClosureReason* a_conv = (LDKClosureReason*)untag_ptr(a); LDKClosureReason* b_conv = (LDKClosureReason*)untag_ptr(b); @@ -77703,15 +84834,17 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1clone(JNIE return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1next_1hop_1channel(JNIEnv *env, jclass clz, int8_tArray node_id, int8_tArray channel_id) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1next_1hop_1channel(JNIEnv *env, jclass clz, int8_tArray node_id, int64_t channel_id) { LDKPublicKey node_id_ref; CHECK((*env)->GetArrayLength(env, node_id) == 33); (*env)->GetByteArrayRegion(env, node_id, 0, 33, node_id_ref.compressed_form); - LDKThirtyTwoBytes channel_id_ref; - CHECK((*env)->GetArrayLength(env, channel_id) == 32); - (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_ref.data); + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKHTLCDestination *ret_copy = MALLOC(sizeof(LDKHTLCDestination), "LDKHTLCDestination"); - *ret_copy = HTLCDestination_next_hop_channel(node_id_ref, channel_id_ref); + *ret_copy = HTLCDestination_next_hop_channel(node_id_ref, channel_id_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -77730,6 +84863,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1invalid_1f return ret_ref; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1invalid_1onion(JNIEnv *env, jclass clz) { + LDKHTLCDestination *ret_copy = MALLOC(sizeof(LDKHTLCDestination), "LDKHTLCDestination"); + *ret_copy = HTLCDestination_invalid_onion(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1failed_1payment(JNIEnv *env, jclass clz, int8_tArray payment_hash) { LDKThirtyTwoBytes payment_hash_ref; CHECK((*env)->GetArrayLength(env, payment_hash) == 32); @@ -77857,10 +84997,12 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1clone(JNIEnv *env, j return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1funding_1generation_1ready(JNIEnv *env, jclass clz, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int64_t channel_value_satoshis, int8_tArray output_script, int8_tArray user_channel_id) { - LDKThirtyTwoBytes temporary_channel_id_ref; - CHECK((*env)->GetArrayLength(env, temporary_channel_id) == 32); - (*env)->GetByteArrayRegion(env, temporary_channel_id, 0, 32, temporary_channel_id_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1funding_1generation_1ready(JNIEnv *env, jclass clz, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int64_t channel_value_satoshis, int8_tArray output_script, int8_tArray user_channel_id) { + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv = ChannelId_clone(&temporary_channel_id_conv); LDKPublicKey counterparty_node_id_ref; CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33); (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form); @@ -77872,7 +85014,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1funding_1generation_ CHECK((*env)->GetArrayLength(env, user_channel_id) == 16); (*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_funding_generation_ready(temporary_channel_id_ref, counterparty_node_id_ref, channel_value_satoshis, output_script_ref, user_channel_id_ref); + *ret_copy = Event_funding_generation_ready(temporary_channel_id_conv, counterparty_node_id_ref, channel_value_satoshis, output_script_ref, user_channel_id_ref); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -77893,10 +85035,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1payment_1claimable(J CHECK_ACCESS(purpose_ptr); LDKPaymentPurpose purpose_conv = *(LDKPaymentPurpose*)(purpose_ptr); purpose_conv = PaymentPurpose_clone((LDKPaymentPurpose*)untag_ptr(purpose)); - void* via_channel_id_ptr = untag_ptr(via_channel_id); - CHECK_ACCESS(via_channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ via_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(via_channel_id_ptr); - via_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(via_channel_id)); + LDKChannelId via_channel_id_conv; + via_channel_id_conv.inner = untag_ptr(via_channel_id); + via_channel_id_conv.is_owned = ptr_is_owned(via_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(via_channel_id_conv); + via_channel_id_conv = ChannelId_clone(&via_channel_id_conv); void* via_user_channel_id_ptr = untag_ptr(via_user_channel_id); CHECK_ACCESS(via_user_channel_id_ptr); LDKCOption_U128Z via_user_channel_id_conv = *(LDKCOption_U128Z*)(via_user_channel_id_ptr); @@ -78145,50 +85288,68 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1spendable_1outputs(J outputs_constr.data[b] = outputs_conv_27_conv; } (*env)->ReleaseLongArrayElements(env, outputs, outputs_vals, 0); - void* channel_id_ptr = untag_ptr(channel_id); - CHECK_ACCESS(channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(channel_id_ptr); - channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(channel_id)); + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); *ret_copy = Event_spendable_outputs(outputs_constr, channel_id_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1payment_1forwarded(JNIEnv *env, jclass clz, int64_t prev_channel_id, int64_t next_channel_id, int64_t fee_earned_msat, jboolean claim_from_onchain_tx, int64_t outbound_amount_forwarded_msat) { - void* prev_channel_id_ptr = untag_ptr(prev_channel_id); - CHECK_ACCESS(prev_channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ prev_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(prev_channel_id_ptr); - prev_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(prev_channel_id)); - void* next_channel_id_ptr = untag_ptr(next_channel_id); - CHECK_ACCESS(next_channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ next_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(next_channel_id_ptr); - next_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(next_channel_id)); - void* fee_earned_msat_ptr = untag_ptr(fee_earned_msat); - CHECK_ACCESS(fee_earned_msat_ptr); - LDKCOption_u64Z fee_earned_msat_conv = *(LDKCOption_u64Z*)(fee_earned_msat_ptr); - fee_earned_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(fee_earned_msat)); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1payment_1forwarded(JNIEnv *env, jclass clz, int64_t prev_channel_id, int64_t next_channel_id, int64_t prev_user_channel_id, int64_t next_user_channel_id, int64_t total_fee_earned_msat, int64_t skimmed_fee_msat, jboolean claim_from_onchain_tx, int64_t outbound_amount_forwarded_msat) { + LDKChannelId prev_channel_id_conv; + prev_channel_id_conv.inner = untag_ptr(prev_channel_id); + prev_channel_id_conv.is_owned = ptr_is_owned(prev_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_conv); + prev_channel_id_conv = ChannelId_clone(&prev_channel_id_conv); + LDKChannelId next_channel_id_conv; + next_channel_id_conv.inner = untag_ptr(next_channel_id); + next_channel_id_conv.is_owned = ptr_is_owned(next_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(next_channel_id_conv); + next_channel_id_conv = ChannelId_clone(&next_channel_id_conv); + void* prev_user_channel_id_ptr = untag_ptr(prev_user_channel_id); + CHECK_ACCESS(prev_user_channel_id_ptr); + LDKCOption_U128Z prev_user_channel_id_conv = *(LDKCOption_U128Z*)(prev_user_channel_id_ptr); + prev_user_channel_id_conv = COption_U128Z_clone((LDKCOption_U128Z*)untag_ptr(prev_user_channel_id)); + void* next_user_channel_id_ptr = untag_ptr(next_user_channel_id); + CHECK_ACCESS(next_user_channel_id_ptr); + LDKCOption_U128Z next_user_channel_id_conv = *(LDKCOption_U128Z*)(next_user_channel_id_ptr); + next_user_channel_id_conv = COption_U128Z_clone((LDKCOption_U128Z*)untag_ptr(next_user_channel_id)); + void* total_fee_earned_msat_ptr = untag_ptr(total_fee_earned_msat); + CHECK_ACCESS(total_fee_earned_msat_ptr); + LDKCOption_u64Z total_fee_earned_msat_conv = *(LDKCOption_u64Z*)(total_fee_earned_msat_ptr); + total_fee_earned_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(total_fee_earned_msat)); + void* skimmed_fee_msat_ptr = untag_ptr(skimmed_fee_msat); + CHECK_ACCESS(skimmed_fee_msat_ptr); + LDKCOption_u64Z skimmed_fee_msat_conv = *(LDKCOption_u64Z*)(skimmed_fee_msat_ptr); + skimmed_fee_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(skimmed_fee_msat)); void* outbound_amount_forwarded_msat_ptr = untag_ptr(outbound_amount_forwarded_msat); CHECK_ACCESS(outbound_amount_forwarded_msat_ptr); LDKCOption_u64Z outbound_amount_forwarded_msat_conv = *(LDKCOption_u64Z*)(outbound_amount_forwarded_msat_ptr); outbound_amount_forwarded_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(outbound_amount_forwarded_msat)); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_payment_forwarded(prev_channel_id_conv, next_channel_id_conv, fee_earned_msat_conv, claim_from_onchain_tx, outbound_amount_forwarded_msat_conv); + *ret_copy = Event_payment_forwarded(prev_channel_id_conv, next_channel_id_conv, prev_user_channel_id_conv, next_user_channel_id_conv, total_fee_earned_msat_conv, skimmed_fee_msat_conv, claim_from_onchain_tx, outbound_amount_forwarded_msat_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1pending(JNIEnv *env, jclass clz, int8_tArray channel_id, int8_tArray user_channel_id, int64_t former_temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_txo) { - LDKThirtyTwoBytes channel_id_ref; - CHECK((*env)->GetArrayLength(env, channel_id) == 32); - (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1pending(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray user_channel_id, int64_t former_temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_txo, int64_t channel_type) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKU128 user_channel_id_ref; CHECK((*env)->GetArrayLength(env, user_channel_id) == 16); (*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes); - void* former_temporary_channel_id_ptr = untag_ptr(former_temporary_channel_id); - CHECK_ACCESS(former_temporary_channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ former_temporary_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(former_temporary_channel_id_ptr); - former_temporary_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(former_temporary_channel_id)); + LDKChannelId former_temporary_channel_id_conv; + former_temporary_channel_id_conv.inner = untag_ptr(former_temporary_channel_id); + former_temporary_channel_id_conv.is_owned = ptr_is_owned(former_temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(former_temporary_channel_id_conv); + former_temporary_channel_id_conv = ChannelId_clone(&former_temporary_channel_id_conv); LDKPublicKey counterparty_node_id_ref; CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33); (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form); @@ -78197,16 +85358,23 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1pending(JNI funding_txo_conv.is_owned = ptr_is_owned(funding_txo); CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_conv); funding_txo_conv = OutPoint_clone(&funding_txo_conv); + LDKChannelTypeFeatures channel_type_conv; + channel_type_conv.inner = untag_ptr(channel_type); + channel_type_conv.is_owned = ptr_is_owned(channel_type); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_conv); + channel_type_conv = ChannelTypeFeatures_clone(&channel_type_conv); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_channel_pending(channel_id_ref, user_channel_id_ref, former_temporary_channel_id_conv, counterparty_node_id_ref, funding_txo_conv); + *ret_copy = Event_channel_pending(channel_id_conv, user_channel_id_ref, former_temporary_channel_id_conv, counterparty_node_id_ref, funding_txo_conv, channel_type_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1ready(JNIEnv *env, jclass clz, int8_tArray channel_id, int8_tArray user_channel_id, int8_tArray counterparty_node_id, int64_t channel_type) { - LDKThirtyTwoBytes channel_id_ref; - CHECK((*env)->GetArrayLength(env, channel_id) == 32); - (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1ready(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray user_channel_id, int8_tArray counterparty_node_id, int64_t channel_type) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKU128 user_channel_id_ref; CHECK((*env)->GetArrayLength(env, user_channel_id) == 16); (*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes); @@ -78219,15 +85387,17 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1ready(JNIEn CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_conv); channel_type_conv = ChannelTypeFeatures_clone(&channel_type_conv); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_channel_ready(channel_id_ref, user_channel_id_ref, counterparty_node_id_ref, channel_type_conv); + *ret_copy = Event_channel_ready(channel_id_conv, user_channel_id_ref, counterparty_node_id_ref, channel_type_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1closed(JNIEnv *env, jclass clz, int8_tArray channel_id, int8_tArray user_channel_id, int64_t reason, int8_tArray counterparty_node_id, int64_t channel_capacity_sats, int64_t channel_funding_txo) { - LDKThirtyTwoBytes channel_id_ref; - CHECK((*env)->GetArrayLength(env, channel_id) == 32); - (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1closed(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray user_channel_id, int64_t reason, int8_tArray counterparty_node_id, int64_t channel_capacity_sats, int64_t channel_funding_txo) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKU128 user_channel_id_ref; CHECK((*env)->GetArrayLength(env, user_channel_id) == 16); (*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes); @@ -78248,30 +85418,34 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1closed(JNIE CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_txo_conv); channel_funding_txo_conv = OutPoint_clone(&channel_funding_txo_conv); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_channel_closed(channel_id_ref, user_channel_id_ref, reason_conv, counterparty_node_id_ref, channel_capacity_sats_conv, channel_funding_txo_conv); + *ret_copy = Event_channel_closed(channel_id_conv, user_channel_id_ref, reason_conv, counterparty_node_id_ref, channel_capacity_sats_conv, channel_funding_txo_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1discard_1funding(JNIEnv *env, jclass clz, int8_tArray channel_id, int8_tArray transaction) { - LDKThirtyTwoBytes channel_id_ref; - CHECK((*env)->GetArrayLength(env, channel_id) == 32); - (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1discard_1funding(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray transaction) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKTransaction transaction_ref; transaction_ref.datalen = (*env)->GetArrayLength(env, transaction); transaction_ref.data = MALLOC(transaction_ref.datalen, "LDKTransaction Bytes"); (*env)->GetByteArrayRegion(env, transaction, 0, transaction_ref.datalen, transaction_ref.data); transaction_ref.data_is_owned = true; LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_discard_funding(channel_id_ref, transaction_ref); + *ret_copy = Event_discard_funding(channel_id_conv, transaction_ref); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1open_1channel_1request(JNIEnv *env, jclass clz, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_satoshis, int64_t push_msat, int64_t channel_type) { - LDKThirtyTwoBytes temporary_channel_id_ref; - CHECK((*env)->GetArrayLength(env, temporary_channel_id) == 32); - (*env)->GetByteArrayRegion(env, temporary_channel_id, 0, 32, temporary_channel_id_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1open_1channel_1request(JNIEnv *env, jclass clz, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_satoshis, int64_t push_msat, int64_t channel_type) { + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv = ChannelId_clone(&temporary_channel_id_conv); LDKPublicKey counterparty_node_id_ref; CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33); (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form); @@ -78281,21 +85455,23 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1open_1channel_1reque CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_conv); channel_type_conv = ChannelTypeFeatures_clone(&channel_type_conv); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_open_channel_request(temporary_channel_id_ref, counterparty_node_id_ref, funding_satoshis, push_msat, channel_type_conv); + *ret_copy = Event_open_channel_request(temporary_channel_id_conv, counterparty_node_id_ref, funding_satoshis, push_msat, channel_type_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1htlchandling_1failed(JNIEnv *env, jclass clz, int8_tArray prev_channel_id, int64_t failed_next_destination) { - LDKThirtyTwoBytes prev_channel_id_ref; - CHECK((*env)->GetArrayLength(env, prev_channel_id) == 32); - (*env)->GetByteArrayRegion(env, prev_channel_id, 0, 32, prev_channel_id_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1htlchandling_1failed(JNIEnv *env, jclass clz, int64_t prev_channel_id, int64_t failed_next_destination) { + LDKChannelId prev_channel_id_conv; + prev_channel_id_conv.inner = untag_ptr(prev_channel_id); + prev_channel_id_conv.is_owned = ptr_is_owned(prev_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_conv); + prev_channel_id_conv = ChannelId_clone(&prev_channel_id_conv); void* failed_next_destination_ptr = untag_ptr(failed_next_destination); CHECK_ACCESS(failed_next_destination_ptr); LDKHTLCDestination failed_next_destination_conv = *(LDKHTLCDestination*)(failed_next_destination_ptr); failed_next_destination_conv = HTLCDestination_clone((LDKHTLCDestination*)untag_ptr(failed_next_destination)); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_htlchandling_failed(prev_channel_id_ref, failed_next_destination_conv); + *ret_copy = Event_htlchandling_failed(prev_channel_id_conv, failed_next_destination_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -79152,7 +86328,15 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1clone return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1channel_1close(JNIEnv *env, jclass clz, int8_tArray claim_id, int32_t package_target_feerate_sat_per_1000_weight, int8_tArray commitment_tx, int64_t commitment_tx_fee_satoshis, int64_t anchor_descriptor, int64_tArray pending_htlcs) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1channel_1close(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray counterparty_node_id, int8_tArray claim_id, int32_t package_target_feerate_sat_per_1000_weight, int8_tArray commitment_tx, int64_t commitment_tx_fee_satoshis, int64_t anchor_descriptor, int64_tArray pending_htlcs) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); + LDKPublicKey counterparty_node_id_ref; + CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33); + (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form); LDKThirtyTwoBytes claim_id_ref; CHECK((*env)->GetArrayLength(env, claim_id) == 32); (*env)->GetByteArrayRegion(env, claim_id, 0, 32, claim_id_ref.data); @@ -79184,12 +86368,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1chann } (*env)->ReleaseLongArrayElements(env, pending_htlcs, pending_htlcs_vals, 0); LDKBumpTransactionEvent *ret_copy = MALLOC(sizeof(LDKBumpTransactionEvent), "LDKBumpTransactionEvent"); - *ret_copy = BumpTransactionEvent_channel_close(claim_id_ref, package_target_feerate_sat_per_1000_weight, commitment_tx_ref, commitment_tx_fee_satoshis, anchor_descriptor_conv, pending_htlcs_constr); + *ret_copy = BumpTransactionEvent_channel_close(channel_id_conv, counterparty_node_id_ref, claim_id_ref, package_target_feerate_sat_per_1000_weight, commitment_tx_ref, commitment_tx_fee_satoshis, anchor_descriptor_conv, pending_htlcs_constr); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1htlcresolution(JNIEnv *env, jclass clz, int8_tArray claim_id, int32_t target_feerate_sat_per_1000_weight, int64_tArray htlc_descriptors, int32_t tx_lock_time) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1htlcresolution(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray counterparty_node_id, int8_tArray claim_id, int32_t target_feerate_sat_per_1000_weight, int64_tArray htlc_descriptors, int32_t tx_lock_time) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); + LDKPublicKey counterparty_node_id_ref; + CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33); + (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form); LDKThirtyTwoBytes claim_id_ref; CHECK((*env)->GetArrayLength(env, claim_id) == 32); (*env)->GetByteArrayRegion(env, claim_id, 0, 32, claim_id_ref.data); @@ -79211,7 +86403,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1htlcr } (*env)->ReleaseLongArrayElements(env, htlc_descriptors, htlc_descriptors_vals, 0); LDKBumpTransactionEvent *ret_copy = MALLOC(sizeof(LDKBumpTransactionEvent), "LDKBumpTransactionEvent"); - *ret_copy = BumpTransactionEvent_htlcresolution(claim_id_ref, target_feerate_sat_per_1000_weight, htlc_descriptors_constr, tx_lock_time); + *ret_copy = BumpTransactionEvent_htlcresolution(channel_id_conv, counterparty_node_id_ref, claim_id_ref, target_feerate_sat_per_1000_weight, htlc_descriptors_constr, tx_lock_time); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -81657,6 +88849,17 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Bolt11Invoice_1recover_ return ret_arr; } +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Bolt11Invoice_1get_1payee_1pub_1key(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKBolt11Invoice this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + int8_tArray ret_arr = (*env)->NewByteArray(env, 33); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, Bolt11Invoice_get_payee_pub_key(&this_arg_conv).compressed_form); + return ret_arr; +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt11Invoice_1expires_1at(JNIEnv *env, jclass clz, int64_t this_arg) { LDKBolt11Invoice this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); diff --git a/src/main/jni/bindings.c.body b/src/main/jni/bindings.c.body index 219d2bd9..cf58ecb4 100644 --- a/src/main/jni/bindings.c.body +++ b/src/main/jni/bindings.c.body @@ -389,10 +389,11 @@ static inline LDKBolt12SemanticError LDKBolt12SemanticError_from_java(JNIEnv *en case 20: return LDKBolt12SemanticError_MissingPayerId; case 21: return LDKBolt12SemanticError_DuplicatePaymentId; case 22: return LDKBolt12SemanticError_MissingPaths; - case 23: return LDKBolt12SemanticError_InvalidPayInfo; - case 24: return LDKBolt12SemanticError_MissingCreationTime; - case 25: return LDKBolt12SemanticError_MissingPaymentHash; - case 26: return LDKBolt12SemanticError_MissingSignature; + case 23: return LDKBolt12SemanticError_UnexpectedPaths; + case 24: return LDKBolt12SemanticError_InvalidPayInfo; + case 25: return LDKBolt12SemanticError_MissingCreationTime; + case 26: return LDKBolt12SemanticError_MissingPaymentHash; + case 27: return LDKBolt12SemanticError_MissingSignature; } (*env)->FatalError(env, "A call to Bolt12SemanticError.ordinal() from rust returned an invalid value."); abort(); // Unreachable, but will let the compiler know we don't return here @@ -421,6 +422,7 @@ static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_MissingPayerMetadata static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_MissingPayerId = NULL; static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_DuplicatePaymentId = NULL; static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_MissingPaths = NULL; +static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_UnexpectedPaths = NULL; static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_InvalidPayInfo = NULL; static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_MissingCreationTime = NULL; static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_MissingPaymentHash = NULL; @@ -474,6 +476,8 @@ JNIEXPORT void JNICALL Java_org_ldk_enums_Bolt12SemanticError_init (JNIEnv *env, CHECK(Bolt12SemanticError_LDKBolt12SemanticError_DuplicatePaymentId != NULL); Bolt12SemanticError_LDKBolt12SemanticError_MissingPaths = (*env)->GetStaticFieldID(env, Bolt12SemanticError_class, "LDKBolt12SemanticError_MissingPaths", "Lorg/ldk/enums/Bolt12SemanticError;"); CHECK(Bolt12SemanticError_LDKBolt12SemanticError_MissingPaths != NULL); + Bolt12SemanticError_LDKBolt12SemanticError_UnexpectedPaths = (*env)->GetStaticFieldID(env, Bolt12SemanticError_class, "LDKBolt12SemanticError_UnexpectedPaths", "Lorg/ldk/enums/Bolt12SemanticError;"); + CHECK(Bolt12SemanticError_LDKBolt12SemanticError_UnexpectedPaths != NULL); Bolt12SemanticError_LDKBolt12SemanticError_InvalidPayInfo = (*env)->GetStaticFieldID(env, Bolt12SemanticError_class, "LDKBolt12SemanticError_InvalidPayInfo", "Lorg/ldk/enums/Bolt12SemanticError;"); CHECK(Bolt12SemanticError_LDKBolt12SemanticError_InvalidPayInfo != NULL); Bolt12SemanticError_LDKBolt12SemanticError_MissingCreationTime = (*env)->GetStaticFieldID(env, Bolt12SemanticError_class, "LDKBolt12SemanticError_MissingCreationTime", "Lorg/ldk/enums/Bolt12SemanticError;"); @@ -531,6 +535,8 @@ static inline jclass LDKBolt12SemanticError_to_java(JNIEnv *env, LDKBolt12Semant return (*env)->GetStaticObjectField(env, Bolt12SemanticError_class, Bolt12SemanticError_LDKBolt12SemanticError_DuplicatePaymentId); case LDKBolt12SemanticError_MissingPaths: return (*env)->GetStaticObjectField(env, Bolt12SemanticError_class, Bolt12SemanticError_LDKBolt12SemanticError_MissingPaths); + case LDKBolt12SemanticError_UnexpectedPaths: + return (*env)->GetStaticObjectField(env, Bolt12SemanticError_class, Bolt12SemanticError_LDKBolt12SemanticError_UnexpectedPaths); case LDKBolt12SemanticError_InvalidPayInfo: return (*env)->GetStaticObjectField(env, Bolt12SemanticError_class, Bolt12SemanticError_LDKBolt12SemanticError_InvalidPayInfo); case LDKBolt12SemanticError_MissingCreationTime: @@ -682,6 +688,7 @@ static inline LDKConfirmationTarget LDKConfirmationTarget_from_java(JNIEnv *env, case 3: return LDKConfirmationTarget_AnchorChannelFee; case 4: return LDKConfirmationTarget_NonAnchorChannelFee; case 5: return LDKConfirmationTarget_ChannelCloseMinimum; + case 6: return LDKConfirmationTarget_OutputSpendingFee; } (*env)->FatalError(env, "A call to ConfirmationTarget.ordinal() from rust returned an invalid value."); abort(); // Unreachable, but will let the compiler know we don't return here @@ -693,6 +700,7 @@ static jfieldID ConfirmationTarget_LDKConfirmationTarget_MinAllowedNonAnchorChan static jfieldID ConfirmationTarget_LDKConfirmationTarget_AnchorChannelFee = NULL; static jfieldID ConfirmationTarget_LDKConfirmationTarget_NonAnchorChannelFee = NULL; static jfieldID ConfirmationTarget_LDKConfirmationTarget_ChannelCloseMinimum = NULL; +static jfieldID ConfirmationTarget_LDKConfirmationTarget_OutputSpendingFee = NULL; JNIEXPORT void JNICALL Java_org_ldk_enums_ConfirmationTarget_init (JNIEnv *env, jclass clz) { ConfirmationTarget_class = (*env)->NewGlobalRef(env, clz); CHECK(ConfirmationTarget_class != NULL); @@ -708,6 +716,8 @@ JNIEXPORT void JNICALL Java_org_ldk_enums_ConfirmationTarget_init (JNIEnv *env, CHECK(ConfirmationTarget_LDKConfirmationTarget_NonAnchorChannelFee != NULL); ConfirmationTarget_LDKConfirmationTarget_ChannelCloseMinimum = (*env)->GetStaticFieldID(env, ConfirmationTarget_class, "LDKConfirmationTarget_ChannelCloseMinimum", "Lorg/ldk/enums/ConfirmationTarget;"); CHECK(ConfirmationTarget_LDKConfirmationTarget_ChannelCloseMinimum != NULL); + ConfirmationTarget_LDKConfirmationTarget_OutputSpendingFee = (*env)->GetStaticFieldID(env, ConfirmationTarget_class, "LDKConfirmationTarget_OutputSpendingFee", "Lorg/ldk/enums/ConfirmationTarget;"); + CHECK(ConfirmationTarget_LDKConfirmationTarget_OutputSpendingFee != NULL); } static inline jclass LDKConfirmationTarget_to_java(JNIEnv *env, LDKConfirmationTarget val) { switch (val) { @@ -723,6 +733,8 @@ static inline jclass LDKConfirmationTarget_to_java(JNIEnv *env, LDKConfirmationT return (*env)->GetStaticObjectField(env, ConfirmationTarget_class, ConfirmationTarget_LDKConfirmationTarget_NonAnchorChannelFee); case LDKConfirmationTarget_ChannelCloseMinimum: return (*env)->GetStaticObjectField(env, ConfirmationTarget_class, ConfirmationTarget_LDKConfirmationTarget_ChannelCloseMinimum); + case LDKConfirmationTarget_OutputSpendingFee: + return (*env)->GetStaticObjectField(env, ConfirmationTarget_class, ConfirmationTarget_LDKConfirmationTarget_OutputSpendingFee); default: abort(); } } @@ -837,6 +849,40 @@ static inline jclass LDKCurrency_to_java(JNIEnv *env, LDKCurrency val) { } } +static inline LDKDirection LDKDirection_from_java(JNIEnv *env, jclass clz) { + jint ord = (*env)->CallIntMethod(env, clz, ordinal_meth); + if (UNLIKELY((*env)->ExceptionCheck(env))) { + (*env)->ExceptionDescribe(env); + (*env)->FatalError(env, "A call to Direction.ordinal() from rust threw an exception."); + } + switch (ord) { + case 0: return LDKDirection_NodeOne; + case 1: return LDKDirection_NodeTwo; + } + (*env)->FatalError(env, "A call to Direction.ordinal() from rust returned an invalid value."); + abort(); // Unreachable, but will let the compiler know we don't return here +} +static jclass Direction_class = NULL; +static jfieldID Direction_LDKDirection_NodeOne = NULL; +static jfieldID Direction_LDKDirection_NodeTwo = NULL; +JNIEXPORT void JNICALL Java_org_ldk_enums_Direction_init (JNIEnv *env, jclass clz) { + Direction_class = (*env)->NewGlobalRef(env, clz); + CHECK(Direction_class != NULL); + Direction_LDKDirection_NodeOne = (*env)->GetStaticFieldID(env, Direction_class, "LDKDirection_NodeOne", "Lorg/ldk/enums/Direction;"); + CHECK(Direction_LDKDirection_NodeOne != NULL); + Direction_LDKDirection_NodeTwo = (*env)->GetStaticFieldID(env, Direction_class, "LDKDirection_NodeTwo", "Lorg/ldk/enums/Direction;"); + CHECK(Direction_LDKDirection_NodeTwo != NULL); +} +static inline jclass LDKDirection_to_java(JNIEnv *env, LDKDirection val) { + switch (val) { + case LDKDirection_NodeOne: + return (*env)->GetStaticObjectField(env, Direction_class, Direction_LDKDirection_NodeOne); + case LDKDirection_NodeTwo: + return (*env)->GetStaticObjectField(env, Direction_class, Direction_LDKDirection_NodeTwo); + default: abort(); + } +} + static inline LDKHTLCClaim LDKHTLCClaim_from_java(JNIEnv *env, jclass clz) { jint ord = (*env)->CallIntMethod(env, clz, ordinal_meth); if (UNLIKELY((*env)->ExceptionCheck(env))) { @@ -1343,6 +1389,46 @@ static inline jclass LDKSecp256k1Error_to_java(JNIEnv *env, LDKSecp256k1Error va } } +static inline LDKShortChannelIdError LDKShortChannelIdError_from_java(JNIEnv *env, jclass clz) { + jint ord = (*env)->CallIntMethod(env, clz, ordinal_meth); + if (UNLIKELY((*env)->ExceptionCheck(env))) { + (*env)->ExceptionDescribe(env); + (*env)->FatalError(env, "A call to ShortChannelIdError.ordinal() from rust threw an exception."); + } + switch (ord) { + case 0: return LDKShortChannelIdError_BlockOverflow; + case 1: return LDKShortChannelIdError_TxIndexOverflow; + case 2: return LDKShortChannelIdError_VoutIndexOverflow; + } + (*env)->FatalError(env, "A call to ShortChannelIdError.ordinal() from rust returned an invalid value."); + abort(); // Unreachable, but will let the compiler know we don't return here +} +static jclass ShortChannelIdError_class = NULL; +static jfieldID ShortChannelIdError_LDKShortChannelIdError_BlockOverflow = NULL; +static jfieldID ShortChannelIdError_LDKShortChannelIdError_TxIndexOverflow = NULL; +static jfieldID ShortChannelIdError_LDKShortChannelIdError_VoutIndexOverflow = NULL; +JNIEXPORT void JNICALL Java_org_ldk_enums_ShortChannelIdError_init (JNIEnv *env, jclass clz) { + ShortChannelIdError_class = (*env)->NewGlobalRef(env, clz); + CHECK(ShortChannelIdError_class != NULL); + ShortChannelIdError_LDKShortChannelIdError_BlockOverflow = (*env)->GetStaticFieldID(env, ShortChannelIdError_class, "LDKShortChannelIdError_BlockOverflow", "Lorg/ldk/enums/ShortChannelIdError;"); + CHECK(ShortChannelIdError_LDKShortChannelIdError_BlockOverflow != NULL); + ShortChannelIdError_LDKShortChannelIdError_TxIndexOverflow = (*env)->GetStaticFieldID(env, ShortChannelIdError_class, "LDKShortChannelIdError_TxIndexOverflow", "Lorg/ldk/enums/ShortChannelIdError;"); + CHECK(ShortChannelIdError_LDKShortChannelIdError_TxIndexOverflow != NULL); + ShortChannelIdError_LDKShortChannelIdError_VoutIndexOverflow = (*env)->GetStaticFieldID(env, ShortChannelIdError_class, "LDKShortChannelIdError_VoutIndexOverflow", "Lorg/ldk/enums/ShortChannelIdError;"); + CHECK(ShortChannelIdError_LDKShortChannelIdError_VoutIndexOverflow != NULL); +} +static inline jclass LDKShortChannelIdError_to_java(JNIEnv *env, LDKShortChannelIdError val) { + switch (val) { + case LDKShortChannelIdError_BlockOverflow: + return (*env)->GetStaticObjectField(env, ShortChannelIdError_class, ShortChannelIdError_LDKShortChannelIdError_BlockOverflow); + case LDKShortChannelIdError_TxIndexOverflow: + return (*env)->GetStaticObjectField(env, ShortChannelIdError_class, ShortChannelIdError_LDKShortChannelIdError_TxIndexOverflow); + case LDKShortChannelIdError_VoutIndexOverflow: + return (*env)->GetStaticObjectField(env, ShortChannelIdError_class, ShortChannelIdError_LDKShortChannelIdError_VoutIndexOverflow); + default: abort(); + } +} + static inline LDKSiPrefix LDKSiPrefix_from_java(JNIEnv *env, jclass clz) { jint ord = (*env)->CallIntMethod(env, clz, ordinal_meth); if (UNLIKELY((*env)->ExceptionCheck(env))) { @@ -1575,6 +1661,54 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKBech32Error_1ref_1from_1 default: abort(); } } +static inline struct LDKRefundMaybeWithDerivedMetadataBuilder CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKRefundMaybeWithDerivedMetadataBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKRefundMaybeWithDerivedMetadataBuilder ret_var = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKRefund CResult_RefundBolt12SemanticErrorZ_get_ok(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKRefund ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_RefundBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(owner); + LDKRefund ret_var = CResult_RefundBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_RefundBolt12SemanticErrorZ_get_err(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_RefundBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(owner); + jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_RefundBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + static jclass LDKCOption_u64Z_Some_class = NULL; static jmethodID LDKCOption_u64Z_Some_meth = NULL; static jclass LDKCOption_u64Z_None_class = NULL; @@ -1683,6 +1817,8 @@ static jclass LDKDecodeError_Io_class = NULL; static jmethodID LDKDecodeError_Io_meth = NULL; static jclass LDKDecodeError_UnsupportedCompression_class = NULL; static jmethodID LDKDecodeError_UnsupportedCompression_meth = NULL; +static jclass LDKDecodeError_DangerousValue_class = NULL; +static jmethodID LDKDecodeError_DangerousValue_meth = NULL; JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKDecodeError_init (JNIEnv *env, jclass clz) { LDKDecodeError_UnknownVersion_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKDecodeError$UnknownVersion")); @@ -1719,6 +1855,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKDecodeError_init (JNIE CHECK(LDKDecodeError_UnsupportedCompression_class != NULL); LDKDecodeError_UnsupportedCompression_meth = (*env)->GetMethodID(env, LDKDecodeError_UnsupportedCompression_class, "", "()V"); CHECK(LDKDecodeError_UnsupportedCompression_meth != NULL); + LDKDecodeError_DangerousValue_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKDecodeError$DangerousValue")); + CHECK(LDKDecodeError_DangerousValue_class != NULL); + LDKDecodeError_DangerousValue_meth = (*env)->GetMethodID(env, LDKDecodeError_DangerousValue_class, "", "()V"); + CHECK(LDKDecodeError_DangerousValue_meth != NULL); } JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKDecodeError_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { LDKDecodeError *obj = (LDKDecodeError*)untag_ptr(ptr); @@ -1745,6 +1886,9 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKDecodeError_1ref_1from_1 case LDKDecodeError_UnsupportedCompression: { return (*env)->NewObject(env, LDKDecodeError_UnsupportedCompression_class, LDKDecodeError_UnsupportedCompression_meth); } + case LDKDecodeError_DangerousValue: { + return (*env)->NewObject(env, LDKDecodeError_DangerousValue_class, LDKDecodeError_DangerousValue_meth); + } default: abort(); } } @@ -2026,6 +2170,74 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RecipientOnionFieldsN CResult_RecipientOnionFieldsNoneZ_get_err(owner_conv); } +static inline struct LDKUnsignedBolt12Invoice CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKUnsignedBolt12Invoice ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner); + LDKUnsignedBolt12Invoice ret_var = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner); + jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKBolt12Invoice CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKBolt12Invoice ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner); + LDKBolt12Invoice ret_var = CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner); + jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKSchnorrSignature CResult_SchnorrSignatureNoneZ_get_ok(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return *owner->contents.result; +} +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner); + int8_tArray ret_arr = (*env)->NewByteArray(env, 64); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, CResult_SchnorrSignatureNoneZ_get_ok(owner_conv).compact_form); + return ret_arr; +} + +static inline void CResult_SchnorrSignatureNoneZ_get_err(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return *owner->contents.err; +} +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner); + CResult_SchnorrSignatureNoneZ_get_err(owner_conv); +} + static inline LDKCVec_ThirtyTwoBytesZ CVec_ThirtyTwoBytesZ_clone(const LDKCVec_ThirtyTwoBytesZ *orig) { LDKCVec_ThirtyTwoBytesZ ret = { .data = MALLOC(sizeof(LDKThirtyTwoBytes) * orig->datalen, "LDKCVec_ThirtyTwoBytesZ clone bytes"), .datalen = orig->datalen }; for (size_t i = 0; i < ret.datalen; i++) { @@ -2071,6 +2283,135 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1CVec_1ThirtyTwo default: abort(); } } +static jclass LDKAmount_Bitcoin_class = NULL; +static jmethodID LDKAmount_Bitcoin_meth = NULL; +static jclass LDKAmount_Currency_class = NULL; +static jmethodID LDKAmount_Currency_meth = NULL; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKAmount_init (JNIEnv *env, jclass clz) { + LDKAmount_Bitcoin_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKAmount$Bitcoin")); + CHECK(LDKAmount_Bitcoin_class != NULL); + LDKAmount_Bitcoin_meth = (*env)->GetMethodID(env, LDKAmount_Bitcoin_class, "", "(J)V"); + CHECK(LDKAmount_Bitcoin_meth != NULL); + LDKAmount_Currency_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKAmount$Currency")); + CHECK(LDKAmount_Currency_class != NULL); + LDKAmount_Currency_meth = (*env)->GetMethodID(env, LDKAmount_Currency_class, "", "([BJ)V"); + CHECK(LDKAmount_Currency_meth != NULL); +} +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKAmount_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { + LDKAmount *obj = (LDKAmount*)untag_ptr(ptr); + switch(obj->tag) { + case LDKAmount_Bitcoin: { + int64_t amount_msats_conv = obj->bitcoin.amount_msats; + return (*env)->NewObject(env, LDKAmount_Bitcoin_class, LDKAmount_Bitcoin_meth, amount_msats_conv); + } + case LDKAmount_Currency: { + int8_tArray iso4217_code_arr = (*env)->NewByteArray(env, 3); + (*env)->SetByteArrayRegion(env, iso4217_code_arr, 0, 3, obj->currency.iso4217_code.data); + int64_t amount_conv = obj->currency.amount; + return (*env)->NewObject(env, LDKAmount_Currency_class, LDKAmount_Currency_meth, iso4217_code_arr, amount_conv); + } + default: abort(); + } +} +static jclass LDKCOption_AmountZ_Some_class = NULL; +static jmethodID LDKCOption_AmountZ_Some_meth = NULL; +static jclass LDKCOption_AmountZ_None_class = NULL; +static jmethodID LDKCOption_AmountZ_None_meth = NULL; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1AmountZ_init (JNIEnv *env, jclass clz) { + LDKCOption_AmountZ_Some_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_AmountZ$Some")); + CHECK(LDKCOption_AmountZ_Some_class != NULL); + LDKCOption_AmountZ_Some_meth = (*env)->GetMethodID(env, LDKCOption_AmountZ_Some_class, "", "(J)V"); + CHECK(LDKCOption_AmountZ_Some_meth != NULL); + LDKCOption_AmountZ_None_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_AmountZ$None")); + CHECK(LDKCOption_AmountZ_None_class != NULL); + LDKCOption_AmountZ_None_meth = (*env)->GetMethodID(env, LDKCOption_AmountZ_None_class, "", "()V"); + CHECK(LDKCOption_AmountZ_None_meth != NULL); +} +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1AmountZ_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { + LDKCOption_AmountZ *obj = (LDKCOption_AmountZ*)untag_ptr(ptr); + switch(obj->tag) { + case LDKCOption_AmountZ_Some: { + int64_t some_ref = tag_ptr(&obj->some, false); + return (*env)->NewObject(env, LDKCOption_AmountZ_Some_class, LDKCOption_AmountZ_Some_meth, some_ref); + } + case LDKCOption_AmountZ_None: { + return (*env)->NewObject(env, LDKCOption_AmountZ_None_class, LDKCOption_AmountZ_None_meth); + } + default: abort(); + } +} +static jclass LDKQuantity_Bounded_class = NULL; +static jmethodID LDKQuantity_Bounded_meth = NULL; +static jclass LDKQuantity_Unbounded_class = NULL; +static jmethodID LDKQuantity_Unbounded_meth = NULL; +static jclass LDKQuantity_One_class = NULL; +static jmethodID LDKQuantity_One_meth = NULL; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKQuantity_init (JNIEnv *env, jclass clz) { + LDKQuantity_Bounded_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKQuantity$Bounded")); + CHECK(LDKQuantity_Bounded_class != NULL); + LDKQuantity_Bounded_meth = (*env)->GetMethodID(env, LDKQuantity_Bounded_class, "", "(J)V"); + CHECK(LDKQuantity_Bounded_meth != NULL); + LDKQuantity_Unbounded_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKQuantity$Unbounded")); + CHECK(LDKQuantity_Unbounded_class != NULL); + LDKQuantity_Unbounded_meth = (*env)->GetMethodID(env, LDKQuantity_Unbounded_class, "", "()V"); + CHECK(LDKQuantity_Unbounded_meth != NULL); + LDKQuantity_One_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKQuantity$One")); + CHECK(LDKQuantity_One_class != NULL); + LDKQuantity_One_meth = (*env)->GetMethodID(env, LDKQuantity_One_class, "", "()V"); + CHECK(LDKQuantity_One_meth != NULL); +} +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKQuantity_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { + LDKQuantity *obj = (LDKQuantity*)untag_ptr(ptr); + switch(obj->tag) { + case LDKQuantity_Bounded: { + int64_t bounded_conv = obj->bounded; + return (*env)->NewObject(env, LDKQuantity_Bounded_class, LDKQuantity_Bounded_meth, bounded_conv); + } + case LDKQuantity_Unbounded: { + return (*env)->NewObject(env, LDKQuantity_Unbounded_class, LDKQuantity_Unbounded_meth); + } + case LDKQuantity_One: { + return (*env)->NewObject(env, LDKQuantity_One_class, LDKQuantity_One_meth); + } + default: abort(); + } +} +static jclass LDKCOption_QuantityZ_Some_class = NULL; +static jmethodID LDKCOption_QuantityZ_Some_meth = NULL; +static jclass LDKCOption_QuantityZ_None_class = NULL; +static jmethodID LDKCOption_QuantityZ_None_meth = NULL; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1QuantityZ_init (JNIEnv *env, jclass clz) { + LDKCOption_QuantityZ_Some_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_QuantityZ$Some")); + CHECK(LDKCOption_QuantityZ_Some_class != NULL); + LDKCOption_QuantityZ_Some_meth = (*env)->GetMethodID(env, LDKCOption_QuantityZ_Some_class, "", "(J)V"); + CHECK(LDKCOption_QuantityZ_Some_meth != NULL); + LDKCOption_QuantityZ_None_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_QuantityZ$None")); + CHECK(LDKCOption_QuantityZ_None_class != NULL); + LDKCOption_QuantityZ_None_meth = (*env)->GetMethodID(env, LDKCOption_QuantityZ_None_class, "", "()V"); + CHECK(LDKCOption_QuantityZ_None_meth != NULL); +} +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1QuantityZ_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { + LDKCOption_QuantityZ *obj = (LDKCOption_QuantityZ*)untag_ptr(ptr); + switch(obj->tag) { + case LDKCOption_QuantityZ_Some: { + int64_t some_ref = tag_ptr(&obj->some, false); + return (*env)->NewObject(env, LDKCOption_QuantityZ_Some_class, LDKCOption_QuantityZ_Some_meth, some_ref); + } + case LDKCOption_QuantityZ_None: { + return (*env)->NewObject(env, LDKCOption_QuantityZ_None_class, LDKCOption_QuantityZ_None_meth); + } + default: abort(); + } +} static inline struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesNoneZ_get_ok(LDKCResult_ThirtyTwoBytesNoneZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return ThirtyTwoBytes_clone(&*owner->contents.result); @@ -2469,44 +2810,45 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RecoverableSignatureN CResult_RecoverableSignatureNoneZ_get_err(owner_conv); } -static inline struct LDKSchnorrSignature CResult_SchnorrSignatureNoneZ_get_ok(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){ +static inline struct LDKECDSASignature CResult_ECDSASignatureNoneZ_get_ok(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return *owner->contents.result; } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner); +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner); int8_tArray ret_arr = (*env)->NewByteArray(env, 64); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, CResult_SchnorrSignatureNoneZ_get_ok(owner_conv).compact_form); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, CResult_ECDSASignatureNoneZ_get_ok(owner_conv).compact_form); return ret_arr; } -static inline void CResult_SchnorrSignatureNoneZ_get_err(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){ +static inline void CResult_ECDSASignatureNoneZ_get_err(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){ CHECK(!owner->result_ok); return *owner->contents.err; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner); - CResult_SchnorrSignatureNoneZ_get_err(owner_conv); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner); + CResult_ECDSASignatureNoneZ_get_err(owner_conv); } -static inline struct LDKECDSASignature CResult_ECDSASignatureNoneZ_get_ok(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){ +static inline struct LDKTransaction CResult_TransactionNoneZ_get_ok(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return *owner->contents.result; } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner); - int8_tArray ret_arr = (*env)->NewByteArray(env, 64); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, CResult_ECDSASignatureNoneZ_get_ok(owner_conv).compact_form); +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner); + LDKTransaction ret_var = CResult_TransactionNoneZ_get_ok(owner_conv); + int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen); + (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data); return ret_arr; } -static inline void CResult_ECDSASignatureNoneZ_get_err(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){ +static inline void CResult_TransactionNoneZ_get_err(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){ CHECK(!owner->result_ok); return *owner->contents.err; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner); - CResult_ECDSASignatureNoneZ_get_err(owner_conv); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner); + CResult_TransactionNoneZ_get_err(owner_conv); } static inline struct LDKECDSASignature C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_a(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ *NONNULL_PTR owner){ @@ -3760,27 +4102,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InMemorySignerDeco return ret_ref; } -static inline struct LDKTransaction CResult_TransactionNoneZ_get_ok(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){ -CHECK(owner->result_ok); - return *owner->contents.result; -} -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner); - LDKTransaction ret_var = CResult_TransactionNoneZ_get_ok(owner_conv); - int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen); - (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data); - return ret_arr; -} - -static inline void CResult_TransactionNoneZ_get_err(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return *owner->contents.err; -} -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner); - CResult_TransactionNoneZ_get_err(owner_conv); -} - static jclass LDKCandidateRouteHop_FirstHop_class = NULL; static jmethodID LDKCandidateRouteHop_FirstHop_meth = NULL; static jclass LDKCandidateRouteHop_PublicHop_class = NULL; @@ -5164,6 +5485,32 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScore return ret_ref; } +static inline struct LDKBestBlock CResult_BestBlockDecodeErrorZ_get_ok(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR owner){ + LDKBestBlock ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_BestBlockDecodeErrorZ* owner_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(owner); + LDKBestBlock ret_var = CResult_BestBlockDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_BestBlockDecodeErrorZ_get_err(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_BestBlockDecodeErrorZ* owner_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_BestBlockDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + static inline uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR owner){ return owner->a; } @@ -5247,8 +5594,154 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpdateS CResult_ChannelMonitorUpdateStatusNoneZ_get_err(owner_conv); } +static jclass LDKClosureReason_CounterpartyForceClosed_class = NULL; +static jmethodID LDKClosureReason_CounterpartyForceClosed_meth = NULL; +static jclass LDKClosureReason_HolderForceClosed_class = NULL; +static jmethodID LDKClosureReason_HolderForceClosed_meth = NULL; +static jclass LDKClosureReason_LegacyCooperativeClosure_class = NULL; +static jmethodID LDKClosureReason_LegacyCooperativeClosure_meth = NULL; +static jclass LDKClosureReason_CounterpartyInitiatedCooperativeClosure_class = NULL; +static jmethodID LDKClosureReason_CounterpartyInitiatedCooperativeClosure_meth = NULL; +static jclass LDKClosureReason_LocallyInitiatedCooperativeClosure_class = NULL; +static jmethodID LDKClosureReason_LocallyInitiatedCooperativeClosure_meth = NULL; +static jclass LDKClosureReason_CommitmentTxConfirmed_class = NULL; +static jmethodID LDKClosureReason_CommitmentTxConfirmed_meth = NULL; +static jclass LDKClosureReason_FundingTimedOut_class = NULL; +static jmethodID LDKClosureReason_FundingTimedOut_meth = NULL; +static jclass LDKClosureReason_ProcessingError_class = NULL; +static jmethodID LDKClosureReason_ProcessingError_meth = NULL; +static jclass LDKClosureReason_DisconnectedPeer_class = NULL; +static jmethodID LDKClosureReason_DisconnectedPeer_meth = NULL; +static jclass LDKClosureReason_OutdatedChannelManager_class = NULL; +static jmethodID LDKClosureReason_OutdatedChannelManager_meth = NULL; +static jclass LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class = NULL; +static jmethodID LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth = NULL; +static jclass LDKClosureReason_FundingBatchClosure_class = NULL; +static jmethodID LDKClosureReason_FundingBatchClosure_meth = NULL; +static jclass LDKClosureReason_HTLCsTimedOut_class = NULL; +static jmethodID LDKClosureReason_HTLCsTimedOut_meth = NULL; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKClosureReason_init (JNIEnv *env, jclass clz) { + LDKClosureReason_CounterpartyForceClosed_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CounterpartyForceClosed")); + CHECK(LDKClosureReason_CounterpartyForceClosed_class != NULL); + LDKClosureReason_CounterpartyForceClosed_meth = (*env)->GetMethodID(env, LDKClosureReason_CounterpartyForceClosed_class, "", "(J)V"); + CHECK(LDKClosureReason_CounterpartyForceClosed_meth != NULL); + LDKClosureReason_HolderForceClosed_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$HolderForceClosed")); + CHECK(LDKClosureReason_HolderForceClosed_class != NULL); + LDKClosureReason_HolderForceClosed_meth = (*env)->GetMethodID(env, LDKClosureReason_HolderForceClosed_class, "", "()V"); + CHECK(LDKClosureReason_HolderForceClosed_meth != NULL); + LDKClosureReason_LegacyCooperativeClosure_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$LegacyCooperativeClosure")); + CHECK(LDKClosureReason_LegacyCooperativeClosure_class != NULL); + LDKClosureReason_LegacyCooperativeClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_LegacyCooperativeClosure_class, "", "()V"); + CHECK(LDKClosureReason_LegacyCooperativeClosure_meth != NULL); + LDKClosureReason_CounterpartyInitiatedCooperativeClosure_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CounterpartyInitiatedCooperativeClosure")); + CHECK(LDKClosureReason_CounterpartyInitiatedCooperativeClosure_class != NULL); + LDKClosureReason_CounterpartyInitiatedCooperativeClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_CounterpartyInitiatedCooperativeClosure_class, "", "()V"); + CHECK(LDKClosureReason_CounterpartyInitiatedCooperativeClosure_meth != NULL); + LDKClosureReason_LocallyInitiatedCooperativeClosure_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$LocallyInitiatedCooperativeClosure")); + CHECK(LDKClosureReason_LocallyInitiatedCooperativeClosure_class != NULL); + LDKClosureReason_LocallyInitiatedCooperativeClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_LocallyInitiatedCooperativeClosure_class, "", "()V"); + CHECK(LDKClosureReason_LocallyInitiatedCooperativeClosure_meth != NULL); + LDKClosureReason_CommitmentTxConfirmed_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CommitmentTxConfirmed")); + CHECK(LDKClosureReason_CommitmentTxConfirmed_class != NULL); + LDKClosureReason_CommitmentTxConfirmed_meth = (*env)->GetMethodID(env, LDKClosureReason_CommitmentTxConfirmed_class, "", "()V"); + CHECK(LDKClosureReason_CommitmentTxConfirmed_meth != NULL); + LDKClosureReason_FundingTimedOut_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$FundingTimedOut")); + CHECK(LDKClosureReason_FundingTimedOut_class != NULL); + LDKClosureReason_FundingTimedOut_meth = (*env)->GetMethodID(env, LDKClosureReason_FundingTimedOut_class, "", "()V"); + CHECK(LDKClosureReason_FundingTimedOut_meth != NULL); + LDKClosureReason_ProcessingError_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$ProcessingError")); + CHECK(LDKClosureReason_ProcessingError_class != NULL); + LDKClosureReason_ProcessingError_meth = (*env)->GetMethodID(env, LDKClosureReason_ProcessingError_class, "", "(Ljava/lang/String;)V"); + CHECK(LDKClosureReason_ProcessingError_meth != NULL); + LDKClosureReason_DisconnectedPeer_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$DisconnectedPeer")); + CHECK(LDKClosureReason_DisconnectedPeer_class != NULL); + LDKClosureReason_DisconnectedPeer_meth = (*env)->GetMethodID(env, LDKClosureReason_DisconnectedPeer_class, "", "()V"); + CHECK(LDKClosureReason_DisconnectedPeer_meth != NULL); + LDKClosureReason_OutdatedChannelManager_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$OutdatedChannelManager")); + CHECK(LDKClosureReason_OutdatedChannelManager_class != NULL); + LDKClosureReason_OutdatedChannelManager_meth = (*env)->GetMethodID(env, LDKClosureReason_OutdatedChannelManager_class, "", "()V"); + CHECK(LDKClosureReason_OutdatedChannelManager_meth != NULL); + LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CounterpartyCoopClosedUnfundedChannel")); + CHECK(LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class != NULL); + LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth = (*env)->GetMethodID(env, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class, "", "()V"); + CHECK(LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth != NULL); + LDKClosureReason_FundingBatchClosure_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$FundingBatchClosure")); + CHECK(LDKClosureReason_FundingBatchClosure_class != NULL); + LDKClosureReason_FundingBatchClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_FundingBatchClosure_class, "", "()V"); + CHECK(LDKClosureReason_FundingBatchClosure_meth != NULL); + LDKClosureReason_HTLCsTimedOut_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$HTLCsTimedOut")); + CHECK(LDKClosureReason_HTLCsTimedOut_class != NULL); + LDKClosureReason_HTLCsTimedOut_meth = (*env)->GetMethodID(env, LDKClosureReason_HTLCsTimedOut_class, "", "()V"); + CHECK(LDKClosureReason_HTLCsTimedOut_meth != NULL); +} +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKClosureReason_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { + LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr); + switch(obj->tag) { + case LDKClosureReason_CounterpartyForceClosed: { + LDKUntrustedString peer_msg_var = obj->counterparty_force_closed.peer_msg; + int64_t peer_msg_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(peer_msg_var); + peer_msg_ref = tag_ptr(peer_msg_var.inner, false); + return (*env)->NewObject(env, LDKClosureReason_CounterpartyForceClosed_class, LDKClosureReason_CounterpartyForceClosed_meth, peer_msg_ref); + } + case LDKClosureReason_HolderForceClosed: { + return (*env)->NewObject(env, LDKClosureReason_HolderForceClosed_class, LDKClosureReason_HolderForceClosed_meth); + } + case LDKClosureReason_LegacyCooperativeClosure: { + return (*env)->NewObject(env, LDKClosureReason_LegacyCooperativeClosure_class, LDKClosureReason_LegacyCooperativeClosure_meth); + } + case LDKClosureReason_CounterpartyInitiatedCooperativeClosure: { + return (*env)->NewObject(env, LDKClosureReason_CounterpartyInitiatedCooperativeClosure_class, LDKClosureReason_CounterpartyInitiatedCooperativeClosure_meth); + } + case LDKClosureReason_LocallyInitiatedCooperativeClosure: { + return (*env)->NewObject(env, LDKClosureReason_LocallyInitiatedCooperativeClosure_class, LDKClosureReason_LocallyInitiatedCooperativeClosure_meth); + } + case LDKClosureReason_CommitmentTxConfirmed: { + return (*env)->NewObject(env, LDKClosureReason_CommitmentTxConfirmed_class, LDKClosureReason_CommitmentTxConfirmed_meth); + } + case LDKClosureReason_FundingTimedOut: { + return (*env)->NewObject(env, LDKClosureReason_FundingTimedOut_class, LDKClosureReason_FundingTimedOut_meth); + } + case LDKClosureReason_ProcessingError: { + LDKStr err_str = obj->processing_error.err; + jstring err_conv = str_ref_to_java(env, err_str.chars, err_str.len); + return (*env)->NewObject(env, LDKClosureReason_ProcessingError_class, LDKClosureReason_ProcessingError_meth, err_conv); + } + case LDKClosureReason_DisconnectedPeer: { + return (*env)->NewObject(env, LDKClosureReason_DisconnectedPeer_class, LDKClosureReason_DisconnectedPeer_meth); + } + case LDKClosureReason_OutdatedChannelManager: { + return (*env)->NewObject(env, LDKClosureReason_OutdatedChannelManager_class, LDKClosureReason_OutdatedChannelManager_meth); + } + case LDKClosureReason_CounterpartyCoopClosedUnfundedChannel: { + return (*env)->NewObject(env, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth); + } + case LDKClosureReason_FundingBatchClosure: { + return (*env)->NewObject(env, LDKClosureReason_FundingBatchClosure_class, LDKClosureReason_FundingBatchClosure_meth); + } + case LDKClosureReason_HTLCsTimedOut: { + return (*env)->NewObject(env, LDKClosureReason_HTLCsTimedOut_class, LDKClosureReason_HTLCsTimedOut_meth); + } + default: abort(); + } +} static jclass LDKMonitorEvent_HTLCEvent_class = NULL; static jmethodID LDKMonitorEvent_HTLCEvent_meth = NULL; +static jclass LDKMonitorEvent_HolderForceClosedWithInfo_class = NULL; +static jmethodID LDKMonitorEvent_HolderForceClosedWithInfo_meth = NULL; static jclass LDKMonitorEvent_HolderForceClosed_class = NULL; static jmethodID LDKMonitorEvent_HolderForceClosed_meth = NULL; static jclass LDKMonitorEvent_Completed_class = NULL; @@ -5259,6 +5752,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKMonitorEvent_init (JNI CHECK(LDKMonitorEvent_HTLCEvent_class != NULL); LDKMonitorEvent_HTLCEvent_meth = (*env)->GetMethodID(env, LDKMonitorEvent_HTLCEvent_class, "", "(J)V"); CHECK(LDKMonitorEvent_HTLCEvent_meth != NULL); + LDKMonitorEvent_HolderForceClosedWithInfo_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKMonitorEvent$HolderForceClosedWithInfo")); + CHECK(LDKMonitorEvent_HolderForceClosedWithInfo_class != NULL); + LDKMonitorEvent_HolderForceClosedWithInfo_meth = (*env)->GetMethodID(env, LDKMonitorEvent_HolderForceClosedWithInfo_class, "", "(JJJ)V"); + CHECK(LDKMonitorEvent_HolderForceClosedWithInfo_meth != NULL); LDKMonitorEvent_HolderForceClosed_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKMonitorEvent$HolderForceClosed")); CHECK(LDKMonitorEvent_HolderForceClosed_class != NULL); @@ -5267,7 +5765,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKMonitorEvent_init (JNI LDKMonitorEvent_Completed_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKMonitorEvent$Completed")); CHECK(LDKMonitorEvent_Completed_class != NULL); - LDKMonitorEvent_Completed_meth = (*env)->GetMethodID(env, LDKMonitorEvent_Completed_class, "", "(JJ)V"); + LDKMonitorEvent_Completed_meth = (*env)->GetMethodID(env, LDKMonitorEvent_Completed_class, "", "(JJJ)V"); CHECK(LDKMonitorEvent_Completed_meth != NULL); } JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKMonitorEvent_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { @@ -5280,6 +5778,18 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKMonitorEvent_1ref_1from_ htlc_event_ref = tag_ptr(htlc_event_var.inner, false); return (*env)->NewObject(env, LDKMonitorEvent_HTLCEvent_class, LDKMonitorEvent_HTLCEvent_meth, htlc_event_ref); } + case LDKMonitorEvent_HolderForceClosedWithInfo: { + int64_t reason_ref = tag_ptr(&obj->holder_force_closed_with_info.reason, false); + LDKOutPoint outpoint_var = obj->holder_force_closed_with_info.outpoint; + int64_t outpoint_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_var); + outpoint_ref = tag_ptr(outpoint_var.inner, false); + LDKChannelId channel_id_var = obj->holder_force_closed_with_info.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return (*env)->NewObject(env, LDKMonitorEvent_HolderForceClosedWithInfo_class, LDKMonitorEvent_HolderForceClosedWithInfo_meth, reason_ref, outpoint_ref, channel_id_ref); + } case LDKMonitorEvent_HolderForceClosed: { LDKOutPoint holder_force_closed_var = obj->holder_force_closed; int64_t holder_force_closed_ref = 0; @@ -5292,8 +5802,12 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKMonitorEvent_1ref_1from_ int64_t funding_txo_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_var); funding_txo_ref = tag_ptr(funding_txo_var.inner, false); + LDKChannelId channel_id_var = obj->completed.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); int64_t monitor_update_id_conv = obj->completed.monitor_update_id; - return (*env)->NewObject(env, LDKMonitorEvent_Completed_class, LDKMonitorEvent_Completed_meth, funding_txo_ref, monitor_update_id_conv); + return (*env)->NewObject(env, LDKMonitorEvent_Completed_class, LDKMonitorEvent_Completed_meth, funding_txo_ref, channel_id_ref, monitor_update_id_conv); } default: abort(); } @@ -5305,26 +5819,40 @@ static inline LDKCVec_MonitorEventZ CVec_MonitorEventZ_clone(const LDKCVec_Monit } return ret; } -static inline struct LDKOutPoint C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ +static inline struct LDKOutPoint C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ LDKOutPoint ret = owner->a; ret.is_owned = false; return ret; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); - LDKOutPoint ret_var = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(owner_conv); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); + LDKOutPoint ret_var = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(owner_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -static inline struct LDKCVec_MonitorEventZ C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ - return CVec_MonitorEventZ_clone(&owner->b); +static inline struct LDKChannelId C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ + LDKChannelId ret = owner->b; + ret.is_owned = false; + return ret; } -JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); - LDKCVec_MonitorEventZ ret_var = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(owner_conv); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); + LDKChannelId ret_var = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKCVec_MonitorEventZ C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ + return CVec_MonitorEventZ_clone(&owner->c); +} +JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1c(JNIEnv *env, jclass clz, int64_t owner) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); + LDKCVec_MonitorEventZ ret_var = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(owner_conv); int64_tArray ret_arr = NULL; ret_arr = (*env)->NewLongArray(env, ret_var.datalen); int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL); @@ -5339,20 +5867,20 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_ return ret_arr; } -static inline struct LDKPublicKey C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ - return owner->c; +static inline struct LDKPublicKey C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ + return owner->d; } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1get_1c(JNIEnv *env, jclass clz, int64_t owner) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1d(JNIEnv *env, jclass clz, int64_t owner) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(owner_conv).compressed_form); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(owner_conv).compressed_form); return ret_arr; } -static inline LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_clone(const LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ *orig) { - LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ) * orig->datalen, "LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ clone bytes"), .datalen = orig->datalen }; +static inline LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_clone(const LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ *orig) { + LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ) * orig->datalen, "LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ clone bytes"), .datalen = orig->datalen }; for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(&orig->data[i]); + ret.data[i] = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(&orig->data[i]); } return ret; } @@ -5538,6 +6066,123 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTypeFeature return ret_ref; } +static inline struct LDKOfferId CResult_OfferIdDecodeErrorZ_get_ok(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR owner){ + LDKOfferId ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_OfferIdDecodeErrorZ* owner_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(owner); + LDKOfferId ret_var = CResult_OfferIdDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_OfferIdDecodeErrorZ_get_err(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_OfferIdDecodeErrorZ* owner_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_OfferIdDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline void CResult_NoneBolt12SemanticErrorZ_get_ok(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return *owner->contents.result; +} +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner); + CResult_NoneBolt12SemanticErrorZ_get_ok(owner_conv); +} + +static inline enum LDKBolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner); + jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_NoneBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKOffer CResult_OfferBolt12SemanticErrorZ_get_ok(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKOffer ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_OfferBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(owner); + LDKOffer ret_var = CResult_OfferBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_OfferBolt12SemanticErrorZ_get_err(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_OfferBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(owner); + jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_OfferBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKInvoiceRequestWithDerivedPayerIdBuilder CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKInvoiceRequestWithDerivedPayerIdBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKInvoiceRequestWithDerivedPayerIdBuilder ret_var = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKInvoiceRequestWithExplicitPayerIdBuilder CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKInvoiceRequestWithExplicitPayerIdBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKInvoiceRequestWithExplicitPayerIdBuilder ret_var = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + static inline struct LDKOffer CResult_OfferBolt12ParseErrorZ_get_ok(LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR owner){ LDKOffer ret = *owner->contents.result; ret.is_owned = false; @@ -5566,27 +6211,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12ParseEr return ret_ref; } -static inline struct LDKPublicKey CResult_PublicKeySecp256k1ErrorZ_get_ok(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){ -CHECK(owner->result_ok); - return *owner->contents.result; -} -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner); - int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CResult_PublicKeySecp256k1ErrorZ_get_ok(owner_conv).compressed_form); - return ret_arr; -} - -static inline enum LDKSecp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return *owner->contents.err; -} -JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner); - jclass ret_conv = LDKSecp256k1Error_to_java(env, CResult_PublicKeySecp256k1ErrorZ_get_err(owner_conv)); - return ret_conv; -} - static inline struct LDKNodeId CResult_NodeIdDecodeErrorZ_get_ok(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR owner){ LDKNodeId ret = *owner->contents.result; ret.is_owned = false; @@ -5613,6 +6237,27 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ return ret_ref; } +static inline struct LDKPublicKey CResult_PublicKeySecp256k1ErrorZ_get_ok(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return *owner->contents.result; +} +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner); + int8_tArray ret_arr = (*env)->NewByteArray(env, 33); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CResult_PublicKeySecp256k1ErrorZ_get_ok(owner_conv).compressed_form); + return ret_arr; +} + +static inline enum LDKSecp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return *owner->contents.err; +} +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner); + jclass ret_conv = LDKSecp256k1Error_to_java(env, CResult_PublicKeySecp256k1ErrorZ_get_err(owner_conv)); + return ret_conv; +} + static jclass LDKNetworkUpdate_ChannelUpdateMessage_class = NULL; static jmethodID LDKNetworkUpdate_ChannelUpdateMessage_meth = NULL; static jclass LDKNetworkUpdate_ChannelFailure_class = NULL; @@ -7003,6 +7648,26 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1CVec_1SocketAdd default: abort(); } } +static inline uint64_t CResult_u64ShortChannelIdErrorZ_get_ok(LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return *owner->contents.result; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_u64ShortChannelIdErrorZ* owner_conv = (LDKCResult_u64ShortChannelIdErrorZ*)untag_ptr(owner); + int64_t ret_conv = CResult_u64ShortChannelIdErrorZ_get_ok(owner_conv); + return ret_conv; +} + +static inline enum LDKShortChannelIdError CResult_u64ShortChannelIdErrorZ_get_err(LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return ShortChannelIdError_clone(&*owner->contents.err); +} +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_u64ShortChannelIdErrorZ* owner_conv = (LDKCResult_u64ShortChannelIdErrorZ*)untag_ptr(owner); + jclass ret_conv = LDKShortChannelIdError_to_java(env, CResult_u64ShortChannelIdErrorZ_get_err(owner_conv)); + return ret_conv; +} + static inline struct LDKPendingHTLCInfo CResult_PendingHTLCInfoInboundHTLCErrZ_get_ok(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR owner){ LDKPendingHTLCInfo ret = *owner->contents.result; ret.is_owned = false; @@ -7142,6 +7807,85 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1UtxoZNoneZ_1get CResult_CVec_UtxoZNoneZ_get_err(owner_conv); } +static jclass LDKPaymentContext_Unknown_class = NULL; +static jmethodID LDKPaymentContext_Unknown_meth = NULL; +static jclass LDKPaymentContext_Bolt12Offer_class = NULL; +static jmethodID LDKPaymentContext_Bolt12Offer_meth = NULL; +static jclass LDKPaymentContext_Bolt12Refund_class = NULL; +static jmethodID LDKPaymentContext_Bolt12Refund_meth = NULL; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKPaymentContext_init (JNIEnv *env, jclass clz) { + LDKPaymentContext_Unknown_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentContext$Unknown")); + CHECK(LDKPaymentContext_Unknown_class != NULL); + LDKPaymentContext_Unknown_meth = (*env)->GetMethodID(env, LDKPaymentContext_Unknown_class, "", "(J)V"); + CHECK(LDKPaymentContext_Unknown_meth != NULL); + LDKPaymentContext_Bolt12Offer_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentContext$Bolt12Offer")); + CHECK(LDKPaymentContext_Bolt12Offer_class != NULL); + LDKPaymentContext_Bolt12Offer_meth = (*env)->GetMethodID(env, LDKPaymentContext_Bolt12Offer_class, "", "(J)V"); + CHECK(LDKPaymentContext_Bolt12Offer_meth != NULL); + LDKPaymentContext_Bolt12Refund_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentContext$Bolt12Refund")); + CHECK(LDKPaymentContext_Bolt12Refund_class != NULL); + LDKPaymentContext_Bolt12Refund_meth = (*env)->GetMethodID(env, LDKPaymentContext_Bolt12Refund_class, "", "(J)V"); + CHECK(LDKPaymentContext_Bolt12Refund_meth != NULL); +} +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPaymentContext_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { + LDKPaymentContext *obj = (LDKPaymentContext*)untag_ptr(ptr); + switch(obj->tag) { + case LDKPaymentContext_Unknown: { + LDKUnknownPaymentContext unknown_var = obj->unknown; + int64_t unknown_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(unknown_var); + unknown_ref = tag_ptr(unknown_var.inner, false); + return (*env)->NewObject(env, LDKPaymentContext_Unknown_class, LDKPaymentContext_Unknown_meth, unknown_ref); + } + case LDKPaymentContext_Bolt12Offer: { + LDKBolt12OfferContext bolt12_offer_var = obj->bolt12_offer; + int64_t bolt12_offer_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(bolt12_offer_var); + bolt12_offer_ref = tag_ptr(bolt12_offer_var.inner, false); + return (*env)->NewObject(env, LDKPaymentContext_Bolt12Offer_class, LDKPaymentContext_Bolt12Offer_meth, bolt12_offer_ref); + } + case LDKPaymentContext_Bolt12Refund: { + LDKBolt12RefundContext bolt12_refund_var = obj->bolt12_refund; + int64_t bolt12_refund_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(bolt12_refund_var); + bolt12_refund_ref = tag_ptr(bolt12_refund_var.inner, false); + return (*env)->NewObject(env, LDKPaymentContext_Bolt12Refund_class, LDKPaymentContext_Bolt12Refund_meth, bolt12_refund_ref); + } + default: abort(); + } +} +static jclass LDKCOption_PaymentContextZ_Some_class = NULL; +static jmethodID LDKCOption_PaymentContextZ_Some_meth = NULL; +static jclass LDKCOption_PaymentContextZ_None_class = NULL; +static jmethodID LDKCOption_PaymentContextZ_None_meth = NULL; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1PaymentContextZ_init (JNIEnv *env, jclass clz) { + LDKCOption_PaymentContextZ_Some_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_PaymentContextZ$Some")); + CHECK(LDKCOption_PaymentContextZ_Some_class != NULL); + LDKCOption_PaymentContextZ_Some_meth = (*env)->GetMethodID(env, LDKCOption_PaymentContextZ_Some_class, "", "(J)V"); + CHECK(LDKCOption_PaymentContextZ_Some_meth != NULL); + LDKCOption_PaymentContextZ_None_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_PaymentContextZ$None")); + CHECK(LDKCOption_PaymentContextZ_None_class != NULL); + LDKCOption_PaymentContextZ_None_meth = (*env)->GetMethodID(env, LDKCOption_PaymentContextZ_None_class, "", "()V"); + CHECK(LDKCOption_PaymentContextZ_None_meth != NULL); +} +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1PaymentContextZ_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { + LDKCOption_PaymentContextZ *obj = (LDKCOption_PaymentContextZ*)untag_ptr(ptr); + switch(obj->tag) { + case LDKCOption_PaymentContextZ_Some: { + int64_t some_ref = tag_ptr(&obj->some, false); + return (*env)->NewObject(env, LDKCOption_PaymentContextZ_Some_class, LDKCOption_PaymentContextZ_Some_meth, some_ref); + } + case LDKCOption_PaymentContextZ_None: { + return (*env)->NewObject(env, LDKCOption_PaymentContextZ_None_class, LDKCOption_PaymentContextZ_None_meth); + } + default: abort(); + } +} static inline uint64_t C2Tuple_u64u16Z_get_a(LDKC2Tuple_u64u16Z *NONNULL_PTR owner){ return owner->a; } @@ -7220,25 +7964,28 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1ChannelShutdown default: abort(); } } -static inline struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesAPIErrorZ_get_ok(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){ -CHECK(owner->result_ok); - return ThirtyTwoBytes_clone(&*owner->contents.result); +static inline struct LDKChannelId CResult_ChannelIdAPIErrorZ_get_ok(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR owner){ + LDKChannelId ret = *owner->contents.result; + ret.is_owned = false; + return ret; } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner); - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, CResult_ThirtyTwoBytesAPIErrorZ_get_ok(owner_conv).data); - return ret_arr; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_ChannelIdAPIErrorZ* owner_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(owner); + LDKChannelId ret_var = CResult_ChannelIdAPIErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -static inline struct LDKAPIError CResult_ThirtyTwoBytesAPIErrorZ_get_err(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){ +static inline struct LDKAPIError CResult_ChannelIdAPIErrorZ_get_err(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR owner){ CHECK(!owner->result_ok); return APIError_clone(&*owner->contents.err); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_ChannelIdAPIErrorZ* owner_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(owner); LDKAPIError *ret_copy = MALLOC(sizeof(LDKAPIError), "LDKAPIError"); - *ret_copy = CResult_ThirtyTwoBytesAPIErrorZ_get_err(owner_conv); + *ret_copy = CResult_ChannelIdAPIErrorZ_get_err(owner_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -7603,33 +8350,68 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1C2Tuple_1Thi return ret_ref; } -static inline struct LDKThirtyTwoBytes C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR owner){ - return ThirtyTwoBytes_clone(&owner->a); +static inline struct LDKChannelId C2Tuple_ChannelIdPublicKeyZ_get_a(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR owner){ + LDKChannelId ret = owner->a; + ret.is_owned = false; + return ret; } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) { - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* owner_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(owner); - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(owner_conv).data); - return ret_arr; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) { + LDKC2Tuple_ChannelIdPublicKeyZ* owner_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(owner); + LDKChannelId ret_var = C2Tuple_ChannelIdPublicKeyZ_get_a(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -static inline struct LDKPublicKey C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR owner){ +static inline struct LDKPublicKey C2Tuple_ChannelIdPublicKeyZ_get_b(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR owner){ return owner->b; } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) { - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* owner_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(owner); +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) { + LDKC2Tuple_ChannelIdPublicKeyZ* owner_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(owner); int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(owner_conv).compressed_form); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, C2Tuple_ChannelIdPublicKeyZ_get_b(owner_conv).compressed_form); return ret_arr; } -static inline LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_clone(const LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ *orig) { - LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ) * orig->datalen, "LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ clone bytes"), .datalen = orig->datalen }; +static inline LDKCVec_C2Tuple_ChannelIdPublicKeyZZ CVec_C2Tuple_ChannelIdPublicKeyZZ_clone(const LDKCVec_C2Tuple_ChannelIdPublicKeyZZ *orig) { + LDKCVec_C2Tuple_ChannelIdPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ) * orig->datalen, "LDKCVec_C2Tuple_ChannelIdPublicKeyZZ clone bytes"), .datalen = orig->datalen }; + for (size_t i = 0; i < ret.datalen; i++) { + ret.data[i] = C2Tuple_ChannelIdPublicKeyZ_clone(&orig->data[i]); + } + return ret; +} +static inline LDKCVec_ChannelIdZ CVec_ChannelIdZ_clone(const LDKCVec_ChannelIdZ *orig) { + LDKCVec_ChannelIdZ ret = { .data = MALLOC(sizeof(LDKChannelId) * orig->datalen, "LDKCVec_ChannelIdZ clone bytes"), .datalen = orig->datalen }; for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(&orig->data[i]); + ret.data[i] = ChannelId_clone(&orig->data[i]); } return ret; } +static inline struct LDKOfferWithDerivedMetadataBuilder CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKOfferWithDerivedMetadataBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKOfferWithDerivedMetadataBuilder ret_var = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + static jclass LDKCOption_StrZ_Some_class = NULL; static jmethodID LDKCOption_StrZ_Some_meth = NULL; static jclass LDKCOption_StrZ_None_class = NULL; @@ -7660,25 +8442,6 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1StrZ_1ref_1from default: abort(); } } -static inline void CResult_NoneBolt12SemanticErrorZ_get_ok(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){ -CHECK(owner->result_ok); - return *owner->contents.result; -} -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner); - CResult_NoneBolt12SemanticErrorZ_get_ok(owner_conv); -} - -static inline enum LDKBolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return Bolt12SemanticError_clone(&*owner->contents.err); -} -JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner); - jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_NoneBolt12SemanticErrorZ_get_err(owner_conv)); - return ret_conv; -} - static inline struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_ok(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return C2Tuple_ThirtyTwoBytesThirtyTwoBytesZ_clone(&*owner->contents.result); @@ -7699,6 +8462,29 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoByt CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_err(owner_conv); } +static inline struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesAPIErrorZ_get_ok(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return ThirtyTwoBytes_clone(&*owner->contents.result); +} +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner); + int8_tArray ret_arr = (*env)->NewByteArray(env, 32); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, CResult_ThirtyTwoBytesAPIErrorZ_get_ok(owner_conv).data); + return ret_arr; +} + +static inline struct LDKAPIError CResult_ThirtyTwoBytesAPIErrorZ_get_err(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return APIError_clone(&*owner->contents.err); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner); + LDKAPIError *ret_copy = MALLOC(sizeof(LDKAPIError), "LDKAPIError"); + *ret_copy = CResult_ThirtyTwoBytesAPIErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + static jclass LDKOffersMessage_InvoiceRequest_class = NULL; static jmethodID LDKOffersMessage_InvoiceRequest_meth = NULL; static jclass LDKOffersMessage_Invoice_class = NULL; @@ -8000,12 +8786,12 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKPendingHTLCRouting_ini LDKPendingHTLCRouting_Receive_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPendingHTLCRouting$Receive")); CHECK(LDKPendingHTLCRouting_Receive_class != NULL); - LDKPendingHTLCRouting_Receive_meth = (*env)->GetMethodID(env, LDKPendingHTLCRouting_Receive_class, "", "(JJI[B[JZ)V"); + LDKPendingHTLCRouting_Receive_meth = (*env)->GetMethodID(env, LDKPendingHTLCRouting_Receive_class, "", "(JJJI[B[JZ)V"); CHECK(LDKPendingHTLCRouting_Receive_meth != NULL); LDKPendingHTLCRouting_ReceiveKeysend_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPendingHTLCRouting$ReceiveKeysend")); CHECK(LDKPendingHTLCRouting_ReceiveKeysend_class != NULL); - LDKPendingHTLCRouting_ReceiveKeysend_meth = (*env)->GetMethodID(env, LDKPendingHTLCRouting_ReceiveKeysend_class, "", "(J[BJI[J)V"); + LDKPendingHTLCRouting_ReceiveKeysend_meth = (*env)->GetMethodID(env, LDKPendingHTLCRouting_ReceiveKeysend_class, "", "(J[BJI[JZ)V"); CHECK(LDKPendingHTLCRouting_ReceiveKeysend_meth != NULL); } JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPendingHTLCRouting_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { @@ -8029,6 +8815,7 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPendingHTLCRouting_1ref_ CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_data_var); payment_data_ref = tag_ptr(payment_data_var.inner, false); int64_t payment_metadata_ref = tag_ptr(&obj->receive.payment_metadata, false); + int64_t payment_context_ref = tag_ptr(&obj->receive.payment_context, false); int32_t incoming_cltv_expiry_conv = obj->receive.incoming_cltv_expiry; int8_tArray phantom_shared_secret_arr = (*env)->NewByteArray(env, 32); (*env)->SetByteArrayRegion(env, phantom_shared_secret_arr, 0, 32, obj->receive.phantom_shared_secret.data); @@ -8044,7 +8831,7 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPendingHTLCRouting_1ref_ } (*env)->ReleasePrimitiveArrayCritical(env, custom_tlvs_arr, custom_tlvs_arr_ptr, 0); jboolean requires_blinded_error_conv = obj->receive.requires_blinded_error; - return (*env)->NewObject(env, LDKPendingHTLCRouting_Receive_class, LDKPendingHTLCRouting_Receive_meth, payment_data_ref, payment_metadata_ref, incoming_cltv_expiry_conv, phantom_shared_secret_arr, custom_tlvs_arr, requires_blinded_error_conv); + return (*env)->NewObject(env, LDKPendingHTLCRouting_Receive_class, LDKPendingHTLCRouting_Receive_meth, payment_data_ref, payment_metadata_ref, payment_context_ref, incoming_cltv_expiry_conv, phantom_shared_secret_arr, custom_tlvs_arr, requires_blinded_error_conv); } case LDKPendingHTLCRouting_ReceiveKeysend: { LDKFinalOnionHopData payment_data_var = obj->receive_keysend.payment_data; @@ -8066,7 +8853,8 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPendingHTLCRouting_1ref_ custom_tlvs_arr_ptr[x] = tag_ptr(custom_tlvs_conv_23_conv, true); } (*env)->ReleasePrimitiveArrayCritical(env, custom_tlvs_arr, custom_tlvs_arr_ptr, 0); - return (*env)->NewObject(env, LDKPendingHTLCRouting_ReceiveKeysend_class, LDKPendingHTLCRouting_ReceiveKeysend_meth, payment_data_ref, payment_preimage_arr, payment_metadata_ref, incoming_cltv_expiry_conv, custom_tlvs_arr); + jboolean requires_blinded_error_conv = obj->receive_keysend.requires_blinded_error; + return (*env)->NewObject(env, LDKPendingHTLCRouting_ReceiveKeysend_class, LDKPendingHTLCRouting_ReceiveKeysend_meth, payment_data_ref, payment_preimage_arr, payment_metadata_ref, incoming_cltv_expiry_conv, custom_tlvs_arr, requires_blinded_error_conv); } default: abort(); } @@ -8261,7 +9049,7 @@ LDKChannelMonitorUpdateStatus update_channel_LDKWatch_jcall(const void* this_arg } return ret_conv; } -LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ release_pending_monitor_events_LDKWatch_jcall(const void* this_arg) { +LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ release_pending_monitor_events_LDKWatch_jcall(const void* this_arg) { LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg; JNIEnv *env; jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); @@ -8277,20 +9065,20 @@ LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ release_pending_monitor_ev (*env)->ExceptionDescribe(env); (*env)->FatalError(env, "A call to release_pending_monitor_events in LDKWatch from rust threw an exception."); } - LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret_constr; + LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ ret_constr; ret_constr.datalen = (*env)->GetArrayLength(env, ret); if (ret_constr.datalen > 0) - ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ Elements"); + ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ Elements"); else ret_constr.data = NULL; int64_t* ret_vals = (*env)->GetLongArrayElements (env, ret, NULL); - for (size_t x = 0; x < ret_constr.datalen; x++) { - int64_t ret_conv_49 = ret_vals[x]; - void* ret_conv_49_ptr = untag_ptr(ret_conv_49); - CHECK_ACCESS(ret_conv_49_ptr); - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ ret_conv_49_conv = *(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)(ret_conv_49_ptr); - FREE(untag_ptr(ret_conv_49)); - ret_constr.data[x] = ret_conv_49_conv; + for (size_t f = 0; f < ret_constr.datalen; f++) { + int64_t ret_conv_57 = ret_vals[f]; + void* ret_conv_57_ptr = untag_ptr(ret_conv_57); + CHECK_ACCESS(ret_conv_57_ptr); + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ ret_conv_57_conv = *(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)(ret_conv_57_ptr); + FREE(untag_ptr(ret_conv_57)); + ret_constr.data[f] = ret_conv_57_conv; } (*env)->ReleaseLongArrayElements(env, ret, ret_vals, 0); if (get_jenv_res == JNI_EDETACHED) { @@ -8371,14 +9159,14 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_Watch_1release_1pendin void* this_arg_ptr = untag_ptr(this_arg); if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } LDKWatch* this_arg_conv = (LDKWatch*)this_arg_ptr; - LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret_var = (this_arg_conv->release_pending_monitor_events)(this_arg_conv->this_arg); + LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ ret_var = (this_arg_conv->release_pending_monitor_events)(this_arg_conv->this_arg); int64_tArray ret_arr = NULL; ret_arr = (*env)->NewLongArray(env, ret_var.datalen); int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL); - for (size_t x = 0; x < ret_var.datalen; x++) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv_49_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ"); - *ret_conv_49_conv = ret_var.data[x]; - ret_arr_ptr[x] = tag_ptr(ret_conv_49_conv, true); + for (size_t f = 0; f < ret_var.datalen; f++) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv_57_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ"); + *ret_conv_57_conv = ret_var.data[f]; + ret_arr_ptr[f] = tag_ptr(ret_conv_57_conv, true); } (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0); FREE(ret_var.data); @@ -8781,7 +9569,7 @@ LDKCResult_SchnorrSignatureNoneZ sign_bolt12_invoice_request_LDKNodeSigner_jcall } LDKUnsignedInvoiceRequest invoice_request_var = *invoice_request; int64_t invoice_request_ref = 0; - // WARNING: we may need a move here but no clone is available for LDKUnsignedInvoiceRequest + invoice_request_var = UnsignedInvoiceRequest_clone(&invoice_request_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_request_var); invoice_request_ref = tag_ptr(invoice_request_var.inner, invoice_request_var.is_owned); jobject obj = (*env)->NewLocalRef(env, j_calls->o); @@ -8811,7 +9599,7 @@ LDKCResult_SchnorrSignatureNoneZ sign_bolt12_invoice_LDKNodeSigner_jcall(const v } LDKUnsignedBolt12Invoice invoice_var = *invoice; int64_t invoice_ref = 0; - // WARNING: we may need a move here but no clone is available for LDKUnsignedBolt12Invoice + invoice_var = UnsignedBolt12Invoice_clone(&invoice_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_var); invoice_ref = tag_ptr(invoice_var.inner, invoice_var.is_owned); jobject obj = (*env)->NewLocalRef(env, j_calls->o); @@ -11040,34 +11828,6 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1SocketAddressZ_ default: abort(); } } -static inline struct LDKPublicKey C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR owner){ - return owner->a; -} -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* owner_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(owner); - int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(owner_conv).compressed_form); - return ret_arr; -} - -static inline struct LDKCOption_SocketAddressZ C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR owner){ - return COption_SocketAddressZ_clone(&owner->b); -} -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* owner_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(owner); - LDKCOption_SocketAddressZ *ret_copy = MALLOC(sizeof(LDKCOption_SocketAddressZ), "LDKCOption_SocketAddressZ"); - *ret_copy = C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(owner_conv); - int64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -static inline LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_clone(const LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ *orig) { - LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ) * orig->datalen, "LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ clone bytes"), .datalen = orig->datalen }; - for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(&orig->data[i]); - } - return ret; -} static inline struct LDKCVec_u8Z CResult_CVec_u8ZPeerHandleErrorZ_get_ok(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return CVec_u8Z_clone(&*owner->contents.result); @@ -11308,6 +12068,54 @@ JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoB return ret_conv; } +static inline struct LDKUnsignedInvoiceRequest CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKUnsignedInvoiceRequest ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner); + LDKUnsignedInvoiceRequest ret_var = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner); + jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKInvoiceRequest CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKInvoiceRequest ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner); + LDKInvoiceRequest ret_var = CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner); + jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + static jclass LDKCOption_SecretKeyZ_Some_class = NULL; static jmethodID LDKCOption_SecretKeyZ_Some_meth = NULL; static jclass LDKCOption_SecretKeyZ_None_class = NULL; @@ -11338,6 +12146,30 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1SecretKeyZ_1ref default: abort(); } } +static inline struct LDKInvoiceWithExplicitSigningPubkeyBuilder CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKInvoiceWithExplicitSigningPubkeyBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKInvoiceWithExplicitSigningPubkeyBuilder ret_var = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + static inline struct LDKVerifiedInvoiceRequest CResult_VerifiedInvoiceRequestNoneZ_get_ok(LDKCResult_VerifiedInvoiceRequestNoneZ *NONNULL_PTR owner){ LDKVerifiedInvoiceRequest ret = *owner->contents.result; ret.is_owned = false; @@ -11361,6 +12193,56 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1VerifiedInvoiceReques CResult_VerifiedInvoiceRequestNoneZ_get_err(owner_conv); } +static inline struct LDKInvoiceWithDerivedSigningPubkeyBuilder CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKInvoiceWithDerivedSigningPubkeyBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKInvoiceWithDerivedSigningPubkeyBuilder ret_var = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKInvoiceRequestFields CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR owner){ + LDKInvoiceRequestFields ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* owner_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(owner); + LDKInvoiceRequestFields ret_var = CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* owner_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + static inline LDKCVec_WitnessZ CVec_WitnessZ_clone(const LDKCVec_WitnessZ *orig) { LDKCVec_WitnessZ ret = { .data = MALLOC(sizeof(LDKWitness) * orig->datalen, "LDKCVec_WitnessZ clone bytes"), .datalen = orig->datalen }; for (size_t i = 0; i < ret.datalen; i++) { @@ -11368,6 +12250,36 @@ static inline LDKCVec_WitnessZ CVec_WitnessZ_clone(const LDKCVec_WitnessZ *orig) } return ret; } +static jclass LDKCOption_ECDSASignatureZ_Some_class = NULL; +static jmethodID LDKCOption_ECDSASignatureZ_Some_meth = NULL; +static jclass LDKCOption_ECDSASignatureZ_None_class = NULL; +static jmethodID LDKCOption_ECDSASignatureZ_None_meth = NULL; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1ECDSASignatureZ_init (JNIEnv *env, jclass clz) { + LDKCOption_ECDSASignatureZ_Some_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_ECDSASignatureZ$Some")); + CHECK(LDKCOption_ECDSASignatureZ_Some_class != NULL); + LDKCOption_ECDSASignatureZ_Some_meth = (*env)->GetMethodID(env, LDKCOption_ECDSASignatureZ_Some_class, "", "([B)V"); + CHECK(LDKCOption_ECDSASignatureZ_Some_meth != NULL); + LDKCOption_ECDSASignatureZ_None_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_ECDSASignatureZ$None")); + CHECK(LDKCOption_ECDSASignatureZ_None_class != NULL); + LDKCOption_ECDSASignatureZ_None_meth = (*env)->GetMethodID(env, LDKCOption_ECDSASignatureZ_None_class, "", "()V"); + CHECK(LDKCOption_ECDSASignatureZ_None_meth != NULL); +} +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1ECDSASignatureZ_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { + LDKCOption_ECDSASignatureZ *obj = (LDKCOption_ECDSASignatureZ*)untag_ptr(ptr); + switch(obj->tag) { + case LDKCOption_ECDSASignatureZ_Some: { + int8_tArray some_arr = (*env)->NewByteArray(env, 64); + (*env)->SetByteArrayRegion(env, some_arr, 0, 64, obj->some.compact_form); + return (*env)->NewObject(env, LDKCOption_ECDSASignatureZ_Some_class, LDKCOption_ECDSASignatureZ_Some_meth, some_arr); + } + case LDKCOption_ECDSASignatureZ_None: { + return (*env)->NewObject(env, LDKCOption_ECDSASignatureZ_None_class, LDKCOption_ECDSASignatureZ_None_meth); + } + default: abort(); + } +} static jclass LDKCOption_i64Z_Some_class = NULL; static jmethodID LDKCOption_i64Z_Some_meth = NULL; static jclass LDKCOption_i64Z_None_class = NULL; @@ -12859,13 +13771,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt11InvoiceSignO return ret_ref; } -static inline LDKCVec_FutureZ CVec_FutureZ_clone(const LDKCVec_FutureZ *orig) { - LDKCVec_FutureZ ret = { .data = MALLOC(sizeof(LDKFuture) * orig->datalen, "LDKCVec_FutureZ clone bytes"), .datalen = orig->datalen }; - for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = Future_clone(&orig->data[i]); - } - return ret; -} static inline struct LDKOffersMessage CResult_OffersMessageDecodeErrorZ_get_ok(LDKCResult_OffersMessageDecodeErrorZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return OffersMessage_clone(&*owner->contents.result); @@ -13310,16 +14215,30 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownScriptInva return ret_ref; } -static jclass LDKPaymentPurpose_InvoicePayment_class = NULL; -static jmethodID LDKPaymentPurpose_InvoicePayment_meth = NULL; +static jclass LDKPaymentPurpose_Bolt11InvoicePayment_class = NULL; +static jmethodID LDKPaymentPurpose_Bolt11InvoicePayment_meth = NULL; +static jclass LDKPaymentPurpose_Bolt12OfferPayment_class = NULL; +static jmethodID LDKPaymentPurpose_Bolt12OfferPayment_meth = NULL; +static jclass LDKPaymentPurpose_Bolt12RefundPayment_class = NULL; +static jmethodID LDKPaymentPurpose_Bolt12RefundPayment_meth = NULL; static jclass LDKPaymentPurpose_SpontaneousPayment_class = NULL; static jmethodID LDKPaymentPurpose_SpontaneousPayment_meth = NULL; JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKPaymentPurpose_init (JNIEnv *env, jclass clz) { - LDKPaymentPurpose_InvoicePayment_class = - (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentPurpose$InvoicePayment")); - CHECK(LDKPaymentPurpose_InvoicePayment_class != NULL); - LDKPaymentPurpose_InvoicePayment_meth = (*env)->GetMethodID(env, LDKPaymentPurpose_InvoicePayment_class, "", "(J[B)V"); - CHECK(LDKPaymentPurpose_InvoicePayment_meth != NULL); + LDKPaymentPurpose_Bolt11InvoicePayment_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentPurpose$Bolt11InvoicePayment")); + CHECK(LDKPaymentPurpose_Bolt11InvoicePayment_class != NULL); + LDKPaymentPurpose_Bolt11InvoicePayment_meth = (*env)->GetMethodID(env, LDKPaymentPurpose_Bolt11InvoicePayment_class, "", "(J[B)V"); + CHECK(LDKPaymentPurpose_Bolt11InvoicePayment_meth != NULL); + LDKPaymentPurpose_Bolt12OfferPayment_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentPurpose$Bolt12OfferPayment")); + CHECK(LDKPaymentPurpose_Bolt12OfferPayment_class != NULL); + LDKPaymentPurpose_Bolt12OfferPayment_meth = (*env)->GetMethodID(env, LDKPaymentPurpose_Bolt12OfferPayment_class, "", "(J[BJ)V"); + CHECK(LDKPaymentPurpose_Bolt12OfferPayment_meth != NULL); + LDKPaymentPurpose_Bolt12RefundPayment_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentPurpose$Bolt12RefundPayment")); + CHECK(LDKPaymentPurpose_Bolt12RefundPayment_class != NULL); + LDKPaymentPurpose_Bolt12RefundPayment_meth = (*env)->GetMethodID(env, LDKPaymentPurpose_Bolt12RefundPayment_class, "", "(J[BJ)V"); + CHECK(LDKPaymentPurpose_Bolt12RefundPayment_meth != NULL); LDKPaymentPurpose_SpontaneousPayment_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentPurpose$SpontaneousPayment")); CHECK(LDKPaymentPurpose_SpontaneousPayment_class != NULL); @@ -13329,11 +14248,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKPaymentPurpose_init (J JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPaymentPurpose_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); switch(obj->tag) { - case LDKPaymentPurpose_InvoicePayment: { - int64_t payment_preimage_ref = tag_ptr(&obj->invoice_payment.payment_preimage, false); + case LDKPaymentPurpose_Bolt11InvoicePayment: { + int64_t payment_preimage_ref = tag_ptr(&obj->bolt11_invoice_payment.payment_preimage, false); + int8_tArray payment_secret_arr = (*env)->NewByteArray(env, 32); + (*env)->SetByteArrayRegion(env, payment_secret_arr, 0, 32, obj->bolt11_invoice_payment.payment_secret.data); + return (*env)->NewObject(env, LDKPaymentPurpose_Bolt11InvoicePayment_class, LDKPaymentPurpose_Bolt11InvoicePayment_meth, payment_preimage_ref, payment_secret_arr); + } + case LDKPaymentPurpose_Bolt12OfferPayment: { + int64_t payment_preimage_ref = tag_ptr(&obj->bolt12_offer_payment.payment_preimage, false); int8_tArray payment_secret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, payment_secret_arr, 0, 32, obj->invoice_payment.payment_secret.data); - return (*env)->NewObject(env, LDKPaymentPurpose_InvoicePayment_class, LDKPaymentPurpose_InvoicePayment_meth, payment_preimage_ref, payment_secret_arr); + (*env)->SetByteArrayRegion(env, payment_secret_arr, 0, 32, obj->bolt12_offer_payment.payment_secret.data); + LDKBolt12OfferContext payment_context_var = obj->bolt12_offer_payment.payment_context; + int64_t payment_context_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_var); + payment_context_ref = tag_ptr(payment_context_var.inner, false); + return (*env)->NewObject(env, LDKPaymentPurpose_Bolt12OfferPayment_class, LDKPaymentPurpose_Bolt12OfferPayment_meth, payment_preimage_ref, payment_secret_arr, payment_context_ref); + } + case LDKPaymentPurpose_Bolt12RefundPayment: { + int64_t payment_preimage_ref = tag_ptr(&obj->bolt12_refund_payment.payment_preimage, false); + int8_tArray payment_secret_arr = (*env)->NewByteArray(env, 32); + (*env)->SetByteArrayRegion(env, payment_secret_arr, 0, 32, obj->bolt12_refund_payment.payment_secret.data); + LDKBolt12RefundContext payment_context_var = obj->bolt12_refund_payment.payment_context; + int64_t payment_context_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_var); + payment_context_ref = tag_ptr(payment_context_var.inner, false); + return (*env)->NewObject(env, LDKPaymentPurpose_Bolt12RefundPayment_class, LDKPaymentPurpose_Bolt12RefundPayment_meth, payment_preimage_ref, payment_secret_arr, payment_context_ref); } case LDKPaymentPurpose_SpontaneousPayment: { int8_tArray spontaneous_payment_arr = (*env)->NewByteArray(env, 32); @@ -13476,120 +14415,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1PathFailu return ret_ref; } -static jclass LDKClosureReason_CounterpartyForceClosed_class = NULL; -static jmethodID LDKClosureReason_CounterpartyForceClosed_meth = NULL; -static jclass LDKClosureReason_HolderForceClosed_class = NULL; -static jmethodID LDKClosureReason_HolderForceClosed_meth = NULL; -static jclass LDKClosureReason_CooperativeClosure_class = NULL; -static jmethodID LDKClosureReason_CooperativeClosure_meth = NULL; -static jclass LDKClosureReason_CommitmentTxConfirmed_class = NULL; -static jmethodID LDKClosureReason_CommitmentTxConfirmed_meth = NULL; -static jclass LDKClosureReason_FundingTimedOut_class = NULL; -static jmethodID LDKClosureReason_FundingTimedOut_meth = NULL; -static jclass LDKClosureReason_ProcessingError_class = NULL; -static jmethodID LDKClosureReason_ProcessingError_meth = NULL; -static jclass LDKClosureReason_DisconnectedPeer_class = NULL; -static jmethodID LDKClosureReason_DisconnectedPeer_meth = NULL; -static jclass LDKClosureReason_OutdatedChannelManager_class = NULL; -static jmethodID LDKClosureReason_OutdatedChannelManager_meth = NULL; -static jclass LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class = NULL; -static jmethodID LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth = NULL; -static jclass LDKClosureReason_FundingBatchClosure_class = NULL; -static jmethodID LDKClosureReason_FundingBatchClosure_meth = NULL; -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKClosureReason_init (JNIEnv *env, jclass clz) { - LDKClosureReason_CounterpartyForceClosed_class = - (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CounterpartyForceClosed")); - CHECK(LDKClosureReason_CounterpartyForceClosed_class != NULL); - LDKClosureReason_CounterpartyForceClosed_meth = (*env)->GetMethodID(env, LDKClosureReason_CounterpartyForceClosed_class, "", "(J)V"); - CHECK(LDKClosureReason_CounterpartyForceClosed_meth != NULL); - LDKClosureReason_HolderForceClosed_class = - (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$HolderForceClosed")); - CHECK(LDKClosureReason_HolderForceClosed_class != NULL); - LDKClosureReason_HolderForceClosed_meth = (*env)->GetMethodID(env, LDKClosureReason_HolderForceClosed_class, "", "()V"); - CHECK(LDKClosureReason_HolderForceClosed_meth != NULL); - LDKClosureReason_CooperativeClosure_class = - (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CooperativeClosure")); - CHECK(LDKClosureReason_CooperativeClosure_class != NULL); - LDKClosureReason_CooperativeClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_CooperativeClosure_class, "", "()V"); - CHECK(LDKClosureReason_CooperativeClosure_meth != NULL); - LDKClosureReason_CommitmentTxConfirmed_class = - (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CommitmentTxConfirmed")); - CHECK(LDKClosureReason_CommitmentTxConfirmed_class != NULL); - LDKClosureReason_CommitmentTxConfirmed_meth = (*env)->GetMethodID(env, LDKClosureReason_CommitmentTxConfirmed_class, "", "()V"); - CHECK(LDKClosureReason_CommitmentTxConfirmed_meth != NULL); - LDKClosureReason_FundingTimedOut_class = - (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$FundingTimedOut")); - CHECK(LDKClosureReason_FundingTimedOut_class != NULL); - LDKClosureReason_FundingTimedOut_meth = (*env)->GetMethodID(env, LDKClosureReason_FundingTimedOut_class, "", "()V"); - CHECK(LDKClosureReason_FundingTimedOut_meth != NULL); - LDKClosureReason_ProcessingError_class = - (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$ProcessingError")); - CHECK(LDKClosureReason_ProcessingError_class != NULL); - LDKClosureReason_ProcessingError_meth = (*env)->GetMethodID(env, LDKClosureReason_ProcessingError_class, "", "(Ljava/lang/String;)V"); - CHECK(LDKClosureReason_ProcessingError_meth != NULL); - LDKClosureReason_DisconnectedPeer_class = - (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$DisconnectedPeer")); - CHECK(LDKClosureReason_DisconnectedPeer_class != NULL); - LDKClosureReason_DisconnectedPeer_meth = (*env)->GetMethodID(env, LDKClosureReason_DisconnectedPeer_class, "", "()V"); - CHECK(LDKClosureReason_DisconnectedPeer_meth != NULL); - LDKClosureReason_OutdatedChannelManager_class = - (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$OutdatedChannelManager")); - CHECK(LDKClosureReason_OutdatedChannelManager_class != NULL); - LDKClosureReason_OutdatedChannelManager_meth = (*env)->GetMethodID(env, LDKClosureReason_OutdatedChannelManager_class, "", "()V"); - CHECK(LDKClosureReason_OutdatedChannelManager_meth != NULL); - LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class = - (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CounterpartyCoopClosedUnfundedChannel")); - CHECK(LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class != NULL); - LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth = (*env)->GetMethodID(env, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class, "", "()V"); - CHECK(LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth != NULL); - LDKClosureReason_FundingBatchClosure_class = - (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$FundingBatchClosure")); - CHECK(LDKClosureReason_FundingBatchClosure_class != NULL); - LDKClosureReason_FundingBatchClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_FundingBatchClosure_class, "", "()V"); - CHECK(LDKClosureReason_FundingBatchClosure_meth != NULL); -} -JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKClosureReason_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { - LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr); - switch(obj->tag) { - case LDKClosureReason_CounterpartyForceClosed: { - LDKUntrustedString peer_msg_var = obj->counterparty_force_closed.peer_msg; - int64_t peer_msg_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(peer_msg_var); - peer_msg_ref = tag_ptr(peer_msg_var.inner, false); - return (*env)->NewObject(env, LDKClosureReason_CounterpartyForceClosed_class, LDKClosureReason_CounterpartyForceClosed_meth, peer_msg_ref); - } - case LDKClosureReason_HolderForceClosed: { - return (*env)->NewObject(env, LDKClosureReason_HolderForceClosed_class, LDKClosureReason_HolderForceClosed_meth); - } - case LDKClosureReason_CooperativeClosure: { - return (*env)->NewObject(env, LDKClosureReason_CooperativeClosure_class, LDKClosureReason_CooperativeClosure_meth); - } - case LDKClosureReason_CommitmentTxConfirmed: { - return (*env)->NewObject(env, LDKClosureReason_CommitmentTxConfirmed_class, LDKClosureReason_CommitmentTxConfirmed_meth); - } - case LDKClosureReason_FundingTimedOut: { - return (*env)->NewObject(env, LDKClosureReason_FundingTimedOut_class, LDKClosureReason_FundingTimedOut_meth); - } - case LDKClosureReason_ProcessingError: { - LDKStr err_str = obj->processing_error.err; - jstring err_conv = str_ref_to_java(env, err_str.chars, err_str.len); - return (*env)->NewObject(env, LDKClosureReason_ProcessingError_class, LDKClosureReason_ProcessingError_meth, err_conv); - } - case LDKClosureReason_DisconnectedPeer: { - return (*env)->NewObject(env, LDKClosureReason_DisconnectedPeer_class, LDKClosureReason_DisconnectedPeer_meth); - } - case LDKClosureReason_OutdatedChannelManager: { - return (*env)->NewObject(env, LDKClosureReason_OutdatedChannelManager_class, LDKClosureReason_OutdatedChannelManager_meth); - } - case LDKClosureReason_CounterpartyCoopClosedUnfundedChannel: { - return (*env)->NewObject(env, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth); - } - case LDKClosureReason_FundingBatchClosure: { - return (*env)->NewObject(env, LDKClosureReason_FundingBatchClosure_class, LDKClosureReason_FundingBatchClosure_meth); - } - default: abort(); - } -} static jclass LDKCOption_ClosureReasonZ_Some_class = NULL; static jmethodID LDKCOption_ClosureReasonZ_Some_meth = NULL; static jclass LDKCOption_ClosureReasonZ_None_class = NULL; @@ -13649,13 +14474,15 @@ static jclass LDKHTLCDestination_UnknownNextHop_class = NULL; static jmethodID LDKHTLCDestination_UnknownNextHop_meth = NULL; static jclass LDKHTLCDestination_InvalidForward_class = NULL; static jmethodID LDKHTLCDestination_InvalidForward_meth = NULL; +static jclass LDKHTLCDestination_InvalidOnion_class = NULL; +static jmethodID LDKHTLCDestination_InvalidOnion_meth = NULL; static jclass LDKHTLCDestination_FailedPayment_class = NULL; static jmethodID LDKHTLCDestination_FailedPayment_meth = NULL; JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKHTLCDestination_init (JNIEnv *env, jclass clz) { LDKHTLCDestination_NextHopChannel_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKHTLCDestination$NextHopChannel")); CHECK(LDKHTLCDestination_NextHopChannel_class != NULL); - LDKHTLCDestination_NextHopChannel_meth = (*env)->GetMethodID(env, LDKHTLCDestination_NextHopChannel_class, "", "([B[B)V"); + LDKHTLCDestination_NextHopChannel_meth = (*env)->GetMethodID(env, LDKHTLCDestination_NextHopChannel_class, "", "([BJ)V"); CHECK(LDKHTLCDestination_NextHopChannel_meth != NULL); LDKHTLCDestination_UnknownNextHop_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKHTLCDestination$UnknownNextHop")); @@ -13667,6 +14494,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKHTLCDestination_init ( CHECK(LDKHTLCDestination_InvalidForward_class != NULL); LDKHTLCDestination_InvalidForward_meth = (*env)->GetMethodID(env, LDKHTLCDestination_InvalidForward_class, "", "(J)V"); CHECK(LDKHTLCDestination_InvalidForward_meth != NULL); + LDKHTLCDestination_InvalidOnion_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKHTLCDestination$InvalidOnion")); + CHECK(LDKHTLCDestination_InvalidOnion_class != NULL); + LDKHTLCDestination_InvalidOnion_meth = (*env)->GetMethodID(env, LDKHTLCDestination_InvalidOnion_class, "", "()V"); + CHECK(LDKHTLCDestination_InvalidOnion_meth != NULL); LDKHTLCDestination_FailedPayment_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKHTLCDestination$FailedPayment")); CHECK(LDKHTLCDestination_FailedPayment_class != NULL); @@ -13679,9 +14511,11 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKHTLCDestination_1ref_1fr case LDKHTLCDestination_NextHopChannel: { int8_tArray node_id_arr = (*env)->NewByteArray(env, 33); (*env)->SetByteArrayRegion(env, node_id_arr, 0, 33, obj->next_hop_channel.node_id.compressed_form); - int8_tArray channel_id_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, channel_id_arr, 0, 32, obj->next_hop_channel.channel_id.data); - return (*env)->NewObject(env, LDKHTLCDestination_NextHopChannel_class, LDKHTLCDestination_NextHopChannel_meth, node_id_arr, channel_id_arr); + LDKChannelId channel_id_var = obj->next_hop_channel.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return (*env)->NewObject(env, LDKHTLCDestination_NextHopChannel_class, LDKHTLCDestination_NextHopChannel_meth, node_id_arr, channel_id_ref); } case LDKHTLCDestination_UnknownNextHop: { int64_t requested_forward_scid_conv = obj->unknown_next_hop.requested_forward_scid; @@ -13691,6 +14525,9 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKHTLCDestination_1ref_1fr int64_t requested_forward_scid_conv = obj->invalid_forward.requested_forward_scid; return (*env)->NewObject(env, LDKHTLCDestination_InvalidForward_class, LDKHTLCDestination_InvalidForward_meth, requested_forward_scid_conv); } + case LDKHTLCDestination_InvalidOnion: { + return (*env)->NewObject(env, LDKHTLCDestination_InvalidOnion_class, LDKHTLCDestination_InvalidOnion_meth); + } case LDKHTLCDestination_FailedPayment: { int8_tArray payment_hash_arr = (*env)->NewByteArray(env, 32); (*env)->SetByteArrayRegion(env, payment_hash_arr, 0, 32, obj->failed_payment.payment_hash.data); @@ -13848,18 +14685,24 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKBumpTransactionEvent_i LDKBumpTransactionEvent_ChannelClose_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKBumpTransactionEvent$ChannelClose")); CHECK(LDKBumpTransactionEvent_ChannelClose_class != NULL); - LDKBumpTransactionEvent_ChannelClose_meth = (*env)->GetMethodID(env, LDKBumpTransactionEvent_ChannelClose_class, "", "([BI[BJJ[J)V"); + LDKBumpTransactionEvent_ChannelClose_meth = (*env)->GetMethodID(env, LDKBumpTransactionEvent_ChannelClose_class, "", "(J[B[BI[BJJ[J)V"); CHECK(LDKBumpTransactionEvent_ChannelClose_meth != NULL); LDKBumpTransactionEvent_HTLCResolution_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKBumpTransactionEvent$HTLCResolution")); CHECK(LDKBumpTransactionEvent_HTLCResolution_class != NULL); - LDKBumpTransactionEvent_HTLCResolution_meth = (*env)->GetMethodID(env, LDKBumpTransactionEvent_HTLCResolution_class, "", "([BI[JI)V"); + LDKBumpTransactionEvent_HTLCResolution_meth = (*env)->GetMethodID(env, LDKBumpTransactionEvent_HTLCResolution_class, "", "(J[B[BI[JI)V"); CHECK(LDKBumpTransactionEvent_HTLCResolution_meth != NULL); } JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKBumpTransactionEvent_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr); switch(obj->tag) { case LDKBumpTransactionEvent_ChannelClose: { + LDKChannelId channel_id_var = obj->channel_close.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33); + (*env)->SetByteArrayRegion(env, counterparty_node_id_arr, 0, 33, obj->channel_close.counterparty_node_id.compressed_form); int8_tArray claim_id_arr = (*env)->NewByteArray(env, 32); (*env)->SetByteArrayRegion(env, claim_id_arr, 0, 32, obj->channel_close.claim_id.data); int32_t package_target_feerate_sat_per_1000_weight_conv = obj->channel_close.package_target_feerate_sat_per_1000_weight; @@ -13883,9 +14726,15 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKBumpTransactionEvent_1re pending_htlcs_arr_ptr[y] = pending_htlcs_conv_24_ref; } (*env)->ReleasePrimitiveArrayCritical(env, pending_htlcs_arr, pending_htlcs_arr_ptr, 0); - return (*env)->NewObject(env, LDKBumpTransactionEvent_ChannelClose_class, LDKBumpTransactionEvent_ChannelClose_meth, claim_id_arr, package_target_feerate_sat_per_1000_weight_conv, commitment_tx_arr, commitment_tx_fee_satoshis_conv, anchor_descriptor_ref, pending_htlcs_arr); + return (*env)->NewObject(env, LDKBumpTransactionEvent_ChannelClose_class, LDKBumpTransactionEvent_ChannelClose_meth, channel_id_ref, counterparty_node_id_arr, claim_id_arr, package_target_feerate_sat_per_1000_weight_conv, commitment_tx_arr, commitment_tx_fee_satoshis_conv, anchor_descriptor_ref, pending_htlcs_arr); } case LDKBumpTransactionEvent_HTLCResolution: { + LDKChannelId channel_id_var = obj->htlc_resolution.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33); + (*env)->SetByteArrayRegion(env, counterparty_node_id_arr, 0, 33, obj->htlc_resolution.counterparty_node_id.compressed_form); int8_tArray claim_id_arr = (*env)->NewByteArray(env, 32); (*env)->SetByteArrayRegion(env, claim_id_arr, 0, 32, obj->htlc_resolution.claim_id.data); int32_t target_feerate_sat_per_1000_weight_conv = obj->htlc_resolution.target_feerate_sat_per_1000_weight; @@ -13902,7 +14751,7 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKBumpTransactionEvent_1re } (*env)->ReleasePrimitiveArrayCritical(env, htlc_descriptors_arr, htlc_descriptors_arr_ptr, 0); int32_t tx_lock_time_conv = obj->htlc_resolution.tx_lock_time; - return (*env)->NewObject(env, LDKBumpTransactionEvent_HTLCResolution_class, LDKBumpTransactionEvent_HTLCResolution_meth, claim_id_arr, target_feerate_sat_per_1000_weight_conv, htlc_descriptors_arr, tx_lock_time_conv); + return (*env)->NewObject(env, LDKBumpTransactionEvent_HTLCResolution_class, LDKBumpTransactionEvent_HTLCResolution_meth, channel_id_ref, counterparty_node_id_arr, claim_id_arr, target_feerate_sat_per_1000_weight_conv, htlc_descriptors_arr, tx_lock_time_conv); } default: abort(); } @@ -13955,7 +14804,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKEvent_init (JNIEnv *en LDKEvent_FundingGenerationReady_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$FundingGenerationReady")); CHECK(LDKEvent_FundingGenerationReady_class != NULL); - LDKEvent_FundingGenerationReady_meth = (*env)->GetMethodID(env, LDKEvent_FundingGenerationReady_class, "", "([B[BJ[B[B)V"); + LDKEvent_FundingGenerationReady_meth = (*env)->GetMethodID(env, LDKEvent_FundingGenerationReady_class, "", "(J[BJ[B[B)V"); CHECK(LDKEvent_FundingGenerationReady_meth != NULL); LDKEvent_PaymentClaimable_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$PaymentClaimable")); @@ -14025,37 +14874,37 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKEvent_init (JNIEnv *en LDKEvent_PaymentForwarded_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$PaymentForwarded")); CHECK(LDKEvent_PaymentForwarded_class != NULL); - LDKEvent_PaymentForwarded_meth = (*env)->GetMethodID(env, LDKEvent_PaymentForwarded_class, "", "(JJJZJ)V"); + LDKEvent_PaymentForwarded_meth = (*env)->GetMethodID(env, LDKEvent_PaymentForwarded_class, "", "(JJJJJJZJ)V"); CHECK(LDKEvent_PaymentForwarded_meth != NULL); LDKEvent_ChannelPending_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$ChannelPending")); CHECK(LDKEvent_ChannelPending_class != NULL); - LDKEvent_ChannelPending_meth = (*env)->GetMethodID(env, LDKEvent_ChannelPending_class, "", "([B[BJ[BJ)V"); + LDKEvent_ChannelPending_meth = (*env)->GetMethodID(env, LDKEvent_ChannelPending_class, "", "(J[BJ[BJJ)V"); CHECK(LDKEvent_ChannelPending_meth != NULL); LDKEvent_ChannelReady_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$ChannelReady")); CHECK(LDKEvent_ChannelReady_class != NULL); - LDKEvent_ChannelReady_meth = (*env)->GetMethodID(env, LDKEvent_ChannelReady_class, "", "([B[B[BJ)V"); + LDKEvent_ChannelReady_meth = (*env)->GetMethodID(env, LDKEvent_ChannelReady_class, "", "(J[B[BJ)V"); CHECK(LDKEvent_ChannelReady_meth != NULL); LDKEvent_ChannelClosed_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$ChannelClosed")); CHECK(LDKEvent_ChannelClosed_class != NULL); - LDKEvent_ChannelClosed_meth = (*env)->GetMethodID(env, LDKEvent_ChannelClosed_class, "", "([B[BJ[BJJ)V"); + LDKEvent_ChannelClosed_meth = (*env)->GetMethodID(env, LDKEvent_ChannelClosed_class, "", "(J[BJ[BJJ)V"); CHECK(LDKEvent_ChannelClosed_meth != NULL); LDKEvent_DiscardFunding_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$DiscardFunding")); CHECK(LDKEvent_DiscardFunding_class != NULL); - LDKEvent_DiscardFunding_meth = (*env)->GetMethodID(env, LDKEvent_DiscardFunding_class, "", "([B[B)V"); + LDKEvent_DiscardFunding_meth = (*env)->GetMethodID(env, LDKEvent_DiscardFunding_class, "", "(J[B)V"); CHECK(LDKEvent_DiscardFunding_meth != NULL); LDKEvent_OpenChannelRequest_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$OpenChannelRequest")); CHECK(LDKEvent_OpenChannelRequest_class != NULL); - LDKEvent_OpenChannelRequest_meth = (*env)->GetMethodID(env, LDKEvent_OpenChannelRequest_class, "", "([B[BJJJ)V"); + LDKEvent_OpenChannelRequest_meth = (*env)->GetMethodID(env, LDKEvent_OpenChannelRequest_class, "", "(J[BJJJ)V"); CHECK(LDKEvent_OpenChannelRequest_meth != NULL); LDKEvent_HTLCHandlingFailed_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$HTLCHandlingFailed")); CHECK(LDKEvent_HTLCHandlingFailed_class != NULL); - LDKEvent_HTLCHandlingFailed_meth = (*env)->GetMethodID(env, LDKEvent_HTLCHandlingFailed_class, "", "([BJ)V"); + LDKEvent_HTLCHandlingFailed_meth = (*env)->GetMethodID(env, LDKEvent_HTLCHandlingFailed_class, "", "(JJ)V"); CHECK(LDKEvent_HTLCHandlingFailed_meth != NULL); LDKEvent_BumpTransaction_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$BumpTransaction")); @@ -14067,8 +14916,10 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr(JN LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); switch(obj->tag) { case LDKEvent_FundingGenerationReady: { - int8_tArray temporary_channel_id_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, temporary_channel_id_arr, 0, 32, obj->funding_generation_ready.temporary_channel_id.data); + LDKChannelId temporary_channel_id_var = obj->funding_generation_ready.temporary_channel_id; + int64_t temporary_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_var); + temporary_channel_id_ref = tag_ptr(temporary_channel_id_var.inner, false); int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33); (*env)->SetByteArrayRegion(env, counterparty_node_id_arr, 0, 33, obj->funding_generation_ready.counterparty_node_id.compressed_form); int64_t channel_value_satoshis_conv = obj->funding_generation_ready.channel_value_satoshis; @@ -14077,7 +14928,7 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr(JN (*env)->SetByteArrayRegion(env, output_script_arr, 0, output_script_var.datalen, output_script_var.data); int8_tArray user_channel_id_arr = (*env)->NewByteArray(env, 16); (*env)->SetByteArrayRegion(env, user_channel_id_arr, 0, 16, obj->funding_generation_ready.user_channel_id.le_bytes); - return (*env)->NewObject(env, LDKEvent_FundingGenerationReady_class, LDKEvent_FundingGenerationReady_meth, temporary_channel_id_arr, counterparty_node_id_arr, channel_value_satoshis_conv, output_script_arr, user_channel_id_arr); + return (*env)->NewObject(env, LDKEvent_FundingGenerationReady_class, LDKEvent_FundingGenerationReady_meth, temporary_channel_id_ref, counterparty_node_id_arr, channel_value_satoshis_conv, output_script_arr, user_channel_id_arr); } case LDKEvent_PaymentClaimable: { int8_tArray receiver_node_id_arr = (*env)->NewByteArray(env, 33); @@ -14091,7 +14942,10 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr(JN int64_t amount_msat_conv = obj->payment_claimable.amount_msat; int64_t counterparty_skimmed_fee_msat_conv = obj->payment_claimable.counterparty_skimmed_fee_msat; int64_t purpose_ref = tag_ptr(&obj->payment_claimable.purpose, false); - int64_t via_channel_id_ref = tag_ptr(&obj->payment_claimable.via_channel_id, false); + LDKChannelId via_channel_id_var = obj->payment_claimable.via_channel_id; + int64_t via_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(via_channel_id_var); + via_channel_id_ref = tag_ptr(via_channel_id_var.inner, false); int64_t via_user_channel_id_ref = tag_ptr(&obj->payment_claimable.via_user_channel_id, false); int64_t claim_deadline_ref = tag_ptr(&obj->payment_claimable.claim_deadline, false); return (*env)->NewObject(env, LDKEvent_PaymentClaimable_class, LDKEvent_PaymentClaimable_meth, receiver_node_id_arr, payment_hash_arr, onion_fields_ref, amount_msat_conv, counterparty_skimmed_fee_msat_conv, purpose_ref, via_channel_id_ref, via_user_channel_id_ref, claim_deadline_ref); @@ -14224,34 +15078,57 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr(JN outputs_arr_ptr[b] = outputs_conv_27_ref; } (*env)->ReleasePrimitiveArrayCritical(env, outputs_arr, outputs_arr_ptr, 0); - int64_t channel_id_ref = tag_ptr(&obj->spendable_outputs.channel_id, false); + LDKChannelId channel_id_var = obj->spendable_outputs.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); return (*env)->NewObject(env, LDKEvent_SpendableOutputs_class, LDKEvent_SpendableOutputs_meth, outputs_arr, channel_id_ref); } case LDKEvent_PaymentForwarded: { - int64_t prev_channel_id_ref = tag_ptr(&obj->payment_forwarded.prev_channel_id, false); - int64_t next_channel_id_ref = tag_ptr(&obj->payment_forwarded.next_channel_id, false); - int64_t fee_earned_msat_ref = tag_ptr(&obj->payment_forwarded.fee_earned_msat, false); + LDKChannelId prev_channel_id_var = obj->payment_forwarded.prev_channel_id; + int64_t prev_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_var); + prev_channel_id_ref = tag_ptr(prev_channel_id_var.inner, false); + LDKChannelId next_channel_id_var = obj->payment_forwarded.next_channel_id; + int64_t next_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(next_channel_id_var); + next_channel_id_ref = tag_ptr(next_channel_id_var.inner, false); + int64_t prev_user_channel_id_ref = tag_ptr(&obj->payment_forwarded.prev_user_channel_id, false); + int64_t next_user_channel_id_ref = tag_ptr(&obj->payment_forwarded.next_user_channel_id, false); + int64_t total_fee_earned_msat_ref = tag_ptr(&obj->payment_forwarded.total_fee_earned_msat, false); + int64_t skimmed_fee_msat_ref = tag_ptr(&obj->payment_forwarded.skimmed_fee_msat, false); jboolean claim_from_onchain_tx_conv = obj->payment_forwarded.claim_from_onchain_tx; int64_t outbound_amount_forwarded_msat_ref = tag_ptr(&obj->payment_forwarded.outbound_amount_forwarded_msat, false); - return (*env)->NewObject(env, LDKEvent_PaymentForwarded_class, LDKEvent_PaymentForwarded_meth, prev_channel_id_ref, next_channel_id_ref, fee_earned_msat_ref, claim_from_onchain_tx_conv, outbound_amount_forwarded_msat_ref); + return (*env)->NewObject(env, LDKEvent_PaymentForwarded_class, LDKEvent_PaymentForwarded_meth, prev_channel_id_ref, next_channel_id_ref, prev_user_channel_id_ref, next_user_channel_id_ref, total_fee_earned_msat_ref, skimmed_fee_msat_ref, claim_from_onchain_tx_conv, outbound_amount_forwarded_msat_ref); } case LDKEvent_ChannelPending: { - int8_tArray channel_id_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, channel_id_arr, 0, 32, obj->channel_pending.channel_id.data); + LDKChannelId channel_id_var = obj->channel_pending.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); int8_tArray user_channel_id_arr = (*env)->NewByteArray(env, 16); (*env)->SetByteArrayRegion(env, user_channel_id_arr, 0, 16, obj->channel_pending.user_channel_id.le_bytes); - int64_t former_temporary_channel_id_ref = tag_ptr(&obj->channel_pending.former_temporary_channel_id, false); + LDKChannelId former_temporary_channel_id_var = obj->channel_pending.former_temporary_channel_id; + int64_t former_temporary_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(former_temporary_channel_id_var); + former_temporary_channel_id_ref = tag_ptr(former_temporary_channel_id_var.inner, false); int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33); (*env)->SetByteArrayRegion(env, counterparty_node_id_arr, 0, 33, obj->channel_pending.counterparty_node_id.compressed_form); LDKOutPoint funding_txo_var = obj->channel_pending.funding_txo; int64_t funding_txo_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_var); funding_txo_ref = tag_ptr(funding_txo_var.inner, false); - return (*env)->NewObject(env, LDKEvent_ChannelPending_class, LDKEvent_ChannelPending_meth, channel_id_arr, user_channel_id_arr, former_temporary_channel_id_ref, counterparty_node_id_arr, funding_txo_ref); + LDKChannelTypeFeatures channel_type_var = obj->channel_pending.channel_type; + int64_t channel_type_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_var); + channel_type_ref = tag_ptr(channel_type_var.inner, false); + return (*env)->NewObject(env, LDKEvent_ChannelPending_class, LDKEvent_ChannelPending_meth, channel_id_ref, user_channel_id_arr, former_temporary_channel_id_ref, counterparty_node_id_arr, funding_txo_ref, channel_type_ref); } case LDKEvent_ChannelReady: { - int8_tArray channel_id_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, channel_id_arr, 0, 32, obj->channel_ready.channel_id.data); + LDKChannelId channel_id_var = obj->channel_ready.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); int8_tArray user_channel_id_arr = (*env)->NewByteArray(env, 16); (*env)->SetByteArrayRegion(env, user_channel_id_arr, 0, 16, obj->channel_ready.user_channel_id.le_bytes); int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33); @@ -14260,11 +15137,13 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr(JN int64_t channel_type_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_var); channel_type_ref = tag_ptr(channel_type_var.inner, false); - return (*env)->NewObject(env, LDKEvent_ChannelReady_class, LDKEvent_ChannelReady_meth, channel_id_arr, user_channel_id_arr, counterparty_node_id_arr, channel_type_ref); + return (*env)->NewObject(env, LDKEvent_ChannelReady_class, LDKEvent_ChannelReady_meth, channel_id_ref, user_channel_id_arr, counterparty_node_id_arr, channel_type_ref); } case LDKEvent_ChannelClosed: { - int8_tArray channel_id_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, channel_id_arr, 0, 32, obj->channel_closed.channel_id.data); + LDKChannelId channel_id_var = obj->channel_closed.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); int8_tArray user_channel_id_arr = (*env)->NewByteArray(env, 16); (*env)->SetByteArrayRegion(env, user_channel_id_arr, 0, 16, obj->channel_closed.user_channel_id.le_bytes); int64_t reason_ref = tag_ptr(&obj->channel_closed.reason, false); @@ -14275,19 +15154,23 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr(JN int64_t channel_funding_txo_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_txo_var); channel_funding_txo_ref = tag_ptr(channel_funding_txo_var.inner, false); - return (*env)->NewObject(env, LDKEvent_ChannelClosed_class, LDKEvent_ChannelClosed_meth, channel_id_arr, user_channel_id_arr, reason_ref, counterparty_node_id_arr, channel_capacity_sats_ref, channel_funding_txo_ref); + return (*env)->NewObject(env, LDKEvent_ChannelClosed_class, LDKEvent_ChannelClosed_meth, channel_id_ref, user_channel_id_arr, reason_ref, counterparty_node_id_arr, channel_capacity_sats_ref, channel_funding_txo_ref); } case LDKEvent_DiscardFunding: { - int8_tArray channel_id_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, channel_id_arr, 0, 32, obj->discard_funding.channel_id.data); + LDKChannelId channel_id_var = obj->discard_funding.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); LDKTransaction transaction_var = obj->discard_funding.transaction; int8_tArray transaction_arr = (*env)->NewByteArray(env, transaction_var.datalen); (*env)->SetByteArrayRegion(env, transaction_arr, 0, transaction_var.datalen, transaction_var.data); - return (*env)->NewObject(env, LDKEvent_DiscardFunding_class, LDKEvent_DiscardFunding_meth, channel_id_arr, transaction_arr); + return (*env)->NewObject(env, LDKEvent_DiscardFunding_class, LDKEvent_DiscardFunding_meth, channel_id_ref, transaction_arr); } case LDKEvent_OpenChannelRequest: { - int8_tArray temporary_channel_id_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, temporary_channel_id_arr, 0, 32, obj->open_channel_request.temporary_channel_id.data); + LDKChannelId temporary_channel_id_var = obj->open_channel_request.temporary_channel_id; + int64_t temporary_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_var); + temporary_channel_id_ref = tag_ptr(temporary_channel_id_var.inner, false); int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33); (*env)->SetByteArrayRegion(env, counterparty_node_id_arr, 0, 33, obj->open_channel_request.counterparty_node_id.compressed_form); int64_t funding_satoshis_conv = obj->open_channel_request.funding_satoshis; @@ -14296,13 +15179,15 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr(JN int64_t channel_type_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_var); channel_type_ref = tag_ptr(channel_type_var.inner, false); - return (*env)->NewObject(env, LDKEvent_OpenChannelRequest_class, LDKEvent_OpenChannelRequest_meth, temporary_channel_id_arr, counterparty_node_id_arr, funding_satoshis_conv, push_msat_conv, channel_type_ref); + return (*env)->NewObject(env, LDKEvent_OpenChannelRequest_class, LDKEvent_OpenChannelRequest_meth, temporary_channel_id_ref, counterparty_node_id_arr, funding_satoshis_conv, push_msat_conv, channel_type_ref); } case LDKEvent_HTLCHandlingFailed: { - int8_tArray prev_channel_id_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, prev_channel_id_arr, 0, 32, obj->htlc_handling_failed.prev_channel_id.data); + LDKChannelId prev_channel_id_var = obj->htlc_handling_failed.prev_channel_id; + int64_t prev_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_var); + prev_channel_id_ref = tag_ptr(prev_channel_id_var.inner, false); int64_t failed_next_destination_ref = tag_ptr(&obj->htlc_handling_failed.failed_next_destination, false); - return (*env)->NewObject(env, LDKEvent_HTLCHandlingFailed_class, LDKEvent_HTLCHandlingFailed_meth, prev_channel_id_arr, failed_next_destination_ref); + return (*env)->NewObject(env, LDKEvent_HTLCHandlingFailed_class, LDKEvent_HTLCHandlingFailed_meth, prev_channel_id_ref, failed_next_destination_ref); } case LDKEvent_BumpTransaction: { int64_t bump_transaction_ref = tag_ptr(&obj->bump_transaction, false); @@ -14999,6 +15884,32 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UntrustedStringDec return ret_ref; } +static inline struct LDKChannelId CResult_ChannelIdDecodeErrorZ_get_ok(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR owner){ + LDKChannelId ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_ChannelIdDecodeErrorZ* owner_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(owner); + LDKChannelId ret_var = CResult_ChannelIdDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_ChannelIdDecodeErrorZ_get_err(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_ChannelIdDecodeErrorZ* owner_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_ChannelIdDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + static inline struct LDKThirtyTwoBytes C2Tuple__u832u16Z_get_a(LDKC2Tuple__u832u16Z *NONNULL_PTR owner){ return ThirtyTwoBytes_clone(&owner->a); } @@ -15070,62 +15981,106 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentConstraints return ret_ref; } -static inline struct LDKThirtyTwoBytes C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){ - return ThirtyTwoBytes_clone(&owner->a); +static inline struct LDKPaymentContext CResult_PaymentContextDecodeErrorZ_get_ok(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return PaymentContext_clone(&*owner->contents.result); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) { - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner); - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(owner_conv).data); - return ret_arr; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_PaymentContextDecodeErrorZ* owner_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(owner); + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = CResult_PaymentContextDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; } -static inline struct LDKRecipientOnionFields C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){ - LDKRecipientOnionFields ret = owner->b; +static inline struct LDKDecodeError CResult_PaymentContextDecodeErrorZ_get_err(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_PaymentContextDecodeErrorZ* owner_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_PaymentContextDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKUnknownPaymentContext CResult_UnknownPaymentContextDecodeErrorZ_get_ok(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR owner){ + LDKUnknownPaymentContext ret = *owner->contents.result; ret.is_owned = false; return ret; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) { - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner); - LDKRecipientOnionFields ret_var = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(owner_conv); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* owner_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(owner); + LDKUnknownPaymentContext ret_var = CResult_UnknownPaymentContextDecodeErrorZ_get_ok(owner_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -static inline struct LDKRouteParameters C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){ - LDKRouteParameters ret = owner->c; +static inline struct LDKDecodeError CResult_UnknownPaymentContextDecodeErrorZ_get_err(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* owner_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_UnknownPaymentContextDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKBolt12OfferContext CResult_Bolt12OfferContextDecodeErrorZ_get_ok(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR owner){ + LDKBolt12OfferContext ret = *owner->contents.result; ret.is_owned = false; return ret; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1c(JNIEnv *env, jclass clz, int64_t owner) { - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner); - LDKRouteParameters ret_var = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c(owner_conv); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(owner); + LDKBolt12OfferContext ret_var = CResult_Bolt12OfferContextDecodeErrorZ_get_ok(owner_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -static inline struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR owner){ -CHECK(owner->result_ok); - return C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(&*owner->contents.result); +static inline struct LDKDecodeError CResult_Bolt12OfferContextDecodeErrorZ_get_err(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* owner_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(owner); - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ"); - *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(owner_conv); - return tag_ptr(ret_conv, true); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_Bolt12OfferContextDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; } -static inline void CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR owner){ +static inline struct LDKBolt12RefundContext CResult_Bolt12RefundContextDecodeErrorZ_get_ok(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR owner){ + LDKBolt12RefundContext ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(owner); + LDKBolt12RefundContext ret_var = CResult_Bolt12RefundContextDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_Bolt12RefundContextDecodeErrorZ_get_err(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR owner){ CHECK(!owner->result_ok); - return *owner->contents.err; + return DecodeError_clone(&*owner->contents.err); } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* owner_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(owner); - CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(owner_conv); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_Bolt12RefundContextDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; } static inline struct LDKStr CResult_StrSecp256k1ErrorZ_get_ok(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner){ @@ -15149,6 +16104,64 @@ JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_ return ret_conv; } +static inline struct LDKThirtyTwoBytes C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){ + return ThirtyTwoBytes_clone(&owner->a); +} +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) { + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner); + int8_tArray ret_arr = (*env)->NewByteArray(env, 32); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(owner_conv).data); + return ret_arr; +} + +static inline struct LDKRecipientOnionFields C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){ + LDKRecipientOnionFields ret = owner->b; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) { + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner); + LDKRecipientOnionFields ret_var = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKRouteParameters C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){ + LDKRouteParameters ret = owner->c; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1c(JNIEnv *env, jclass clz, int64_t owner) { + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner); + LDKRouteParameters ret_var = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(&*owner->contents.result); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* owner_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(owner); + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ"); + *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(owner_conv); + return tag_ptr(ret_conv, true); +} + +static inline void CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return *owner->contents.err; +} +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* owner_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(owner); + CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(owner_conv); +} + static inline struct LDKPublicKey C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_a(LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ *NONNULL_PTR owner){ return owner->a; } @@ -15200,6 +16213,8 @@ static jclass LDKSendError_BufferFull_class = NULL; static jmethodID LDKSendError_BufferFull_meth = NULL; static jclass LDKSendError_GetNodeIdFailed_class = NULL; static jmethodID LDKSendError_GetNodeIdFailed_meth = NULL; +static jclass LDKSendError_UnresolvedIntroductionNode_class = NULL; +static jmethodID LDKSendError_UnresolvedIntroductionNode_meth = NULL; static jclass LDKSendError_BlindedPathAdvanceFailed_class = NULL; static jmethodID LDKSendError_BlindedPathAdvanceFailed_meth = NULL; JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSendError_init (JNIEnv *env, jclass clz) { @@ -15243,6 +16258,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSendError_init (JNIEnv CHECK(LDKSendError_GetNodeIdFailed_class != NULL); LDKSendError_GetNodeIdFailed_meth = (*env)->GetMethodID(env, LDKSendError_GetNodeIdFailed_class, "", "()V"); CHECK(LDKSendError_GetNodeIdFailed_meth != NULL); + LDKSendError_UnresolvedIntroductionNode_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSendError$UnresolvedIntroductionNode")); + CHECK(LDKSendError_UnresolvedIntroductionNode_class != NULL); + LDKSendError_UnresolvedIntroductionNode_meth = (*env)->GetMethodID(env, LDKSendError_UnresolvedIntroductionNode_class, "", "()V"); + CHECK(LDKSendError_UnresolvedIntroductionNode_meth != NULL); LDKSendError_BlindedPathAdvanceFailed_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSendError$BlindedPathAdvanceFailed")); CHECK(LDKSendError_BlindedPathAdvanceFailed_class != NULL); @@ -15279,6 +16299,9 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSendError_1ref_1from_1pt case LDKSendError_GetNodeIdFailed: { return (*env)->NewObject(env, LDKSendError_GetNodeIdFailed_class, LDKSendError_GetNodeIdFailed_meth); } + case LDKSendError_UnresolvedIntroductionNode: { + return (*env)->NewObject(env, LDKSendError_UnresolvedIntroductionNode_class, LDKSendError_UnresolvedIntroductionNode_meth); + } case LDKSendError_BlindedPathAdvanceFailed: { return (*env)->NewObject(env, LDKSendError_BlindedPathAdvanceFailed_class, LDKSendError_BlindedPathAdvanceFailed_meth); } @@ -15308,6 +16331,37 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKey return ret_ref; } +static jclass LDKNextMessageHop_NodeId_class = NULL; +static jmethodID LDKNextMessageHop_NodeId_meth = NULL; +static jclass LDKNextMessageHop_ShortChannelId_class = NULL; +static jmethodID LDKNextMessageHop_ShortChannelId_meth = NULL; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKNextMessageHop_init (JNIEnv *env, jclass clz) { + LDKNextMessageHop_NodeId_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKNextMessageHop$NodeId")); + CHECK(LDKNextMessageHop_NodeId_class != NULL); + LDKNextMessageHop_NodeId_meth = (*env)->GetMethodID(env, LDKNextMessageHop_NodeId_class, "", "([B)V"); + CHECK(LDKNextMessageHop_NodeId_meth != NULL); + LDKNextMessageHop_ShortChannelId_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKNextMessageHop$ShortChannelId")); + CHECK(LDKNextMessageHop_ShortChannelId_class != NULL); + LDKNextMessageHop_ShortChannelId_meth = (*env)->GetMethodID(env, LDKNextMessageHop_ShortChannelId_class, "", "(J)V"); + CHECK(LDKNextMessageHop_ShortChannelId_meth != NULL); +} +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKNextMessageHop_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { + LDKNextMessageHop *obj = (LDKNextMessageHop*)untag_ptr(ptr); + switch(obj->tag) { + case LDKNextMessageHop_NodeId: { + int8_tArray node_id_arr = (*env)->NewByteArray(env, 33); + (*env)->SetByteArrayRegion(env, node_id_arr, 0, 33, obj->node_id.compressed_form); + return (*env)->NewObject(env, LDKNextMessageHop_NodeId_class, LDKNextMessageHop_NodeId_meth, node_id_arr); + } + case LDKNextMessageHop_ShortChannelId: { + int64_t short_channel_id_conv = obj->short_channel_id; + return (*env)->NewObject(env, LDKNextMessageHop_ShortChannelId_class, LDKNextMessageHop_ShortChannelId_meth, short_channel_id_conv); + } + default: abort(); + } +} static jclass LDKParsedOnionMessageContents_Offers_class = NULL; static jmethodID LDKParsedOnionMessageContents_Offers_meth = NULL; static jclass LDKParsedOnionMessageContents_Custom_class = NULL; @@ -15347,7 +16401,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKPeeledOnion_init (JNIE LDKPeeledOnion_Forward_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPeeledOnion$Forward")); CHECK(LDKPeeledOnion_Forward_class != NULL); - LDKPeeledOnion_Forward_meth = (*env)->GetMethodID(env, LDKPeeledOnion_Forward_class, "", "([BJ)V"); + LDKPeeledOnion_Forward_meth = (*env)->GetMethodID(env, LDKPeeledOnion_Forward_class, "", "(JJ)V"); CHECK(LDKPeeledOnion_Forward_meth != NULL); LDKPeeledOnion_Receive_class = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPeeledOnion$Receive")); @@ -15359,13 +16413,12 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPeeledOnion_1ref_1from_1 LDKPeeledOnion *obj = (LDKPeeledOnion*)untag_ptr(ptr); switch(obj->tag) { case LDKPeeledOnion_Forward: { - int8_tArray _0_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, _0_arr, 0, 33, obj->forward._0.compressed_form); + int64_t _0_ref = tag_ptr(&obj->forward._0, false); LDKOnionMessage _1_var = obj->forward._1; int64_t _1_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(_1_var); _1_ref = tag_ptr(_1_var.inner, false); - return (*env)->NewObject(env, LDKPeeledOnion_Forward_class, LDKPeeledOnion_Forward_meth, _0_arr, _1_ref); + return (*env)->NewObject(env, LDKPeeledOnion_Forward_class, LDKPeeledOnion_Forward_meth, _0_ref, _1_ref); } case LDKPeeledOnion_Receive: { int64_t _0_ref = tag_ptr(&obj->receive._0, false); @@ -15583,158 +16636,106 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceErrorDecode return ret_ref; } -static inline struct LDKDelayedPaymentBasepoint CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){ - LDKDelayedPaymentBasepoint ret = *owner->contents.result; +static inline struct LDKTrackedSpendableOutput CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR owner){ + LDKTrackedSpendableOutput ret = *owner->contents.result; ret.is_owned = false; return ret; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner); - LDKDelayedPaymentBasepoint ret_var = CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(owner_conv); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* owner_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(owner); + LDKTrackedSpendableOutput ret_var = CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(owner_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -static inline struct LDKDecodeError CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){ +static inline struct LDKDecodeError CResult_TrackedSpendableOutputDecodeErrorZ_get_err(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR owner){ CHECK(!owner->result_ok); return DecodeError_clone(&*owner->contents.err); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* owner_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(owner); LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(owner_conv); - int64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -static inline struct LDKDelayedPaymentKey CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){ - LDKDelayedPaymentKey ret = *owner->contents.result; - ret.is_owned = false; - return ret; -} -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner); - LDKDelayedPaymentKey ret_var = CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(owner_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -static inline struct LDKDecodeError CResult_DelayedPaymentKeyDecodeErrorZ_get_err(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return DecodeError_clone(&*owner->contents.err); -} -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner); - LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_DelayedPaymentKeyDecodeErrorZ_get_err(owner_conv); - int64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -static inline struct LDKHtlcBasepoint CResult_HtlcBasepointDecodeErrorZ_get_ok(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){ - LDKHtlcBasepoint ret = *owner->contents.result; - ret.is_owned = false; - return ret; -} -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner); - LDKHtlcBasepoint ret_var = CResult_HtlcBasepointDecodeErrorZ_get_ok(owner_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -static inline struct LDKDecodeError CResult_HtlcBasepointDecodeErrorZ_get_err(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return DecodeError_clone(&*owner->contents.err); -} -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner); - LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_HtlcBasepointDecodeErrorZ_get_err(owner_conv); - int64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -static inline struct LDKHtlcKey CResult_HtlcKeyDecodeErrorZ_get_ok(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){ - LDKHtlcKey ret = *owner->contents.result; - ret.is_owned = false; - return ret; -} -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner); - LDKHtlcKey ret_var = CResult_HtlcKeyDecodeErrorZ_get_ok(owner_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -static inline struct LDKDecodeError CResult_HtlcKeyDecodeErrorZ_get_err(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return DecodeError_clone(&*owner->contents.err); -} -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner); - LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_HtlcKeyDecodeErrorZ_get_err(owner_conv); - int64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -static inline struct LDKRevocationBasepoint CResult_RevocationBasepointDecodeErrorZ_get_ok(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){ - LDKRevocationBasepoint ret = *owner->contents.result; - ret.is_owned = false; - return ret; -} -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner); - LDKRevocationBasepoint ret_var = CResult_RevocationBasepointDecodeErrorZ_get_ok(owner_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; + *ret_copy = CResult_TrackedSpendableOutputDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static jclass LDKOutputSpendStatus_PendingInitialBroadcast_class = NULL; +static jmethodID LDKOutputSpendStatus_PendingInitialBroadcast_meth = NULL; +static jclass LDKOutputSpendStatus_PendingFirstConfirmation_class = NULL; +static jmethodID LDKOutputSpendStatus_PendingFirstConfirmation_meth = NULL; +static jclass LDKOutputSpendStatus_PendingThresholdConfirmations_class = NULL; +static jmethodID LDKOutputSpendStatus_PendingThresholdConfirmations_meth = NULL; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKOutputSpendStatus_init (JNIEnv *env, jclass clz) { + LDKOutputSpendStatus_PendingInitialBroadcast_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKOutputSpendStatus$PendingInitialBroadcast")); + CHECK(LDKOutputSpendStatus_PendingInitialBroadcast_class != NULL); + LDKOutputSpendStatus_PendingInitialBroadcast_meth = (*env)->GetMethodID(env, LDKOutputSpendStatus_PendingInitialBroadcast_class, "", "(J)V"); + CHECK(LDKOutputSpendStatus_PendingInitialBroadcast_meth != NULL); + LDKOutputSpendStatus_PendingFirstConfirmation_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKOutputSpendStatus$PendingFirstConfirmation")); + CHECK(LDKOutputSpendStatus_PendingFirstConfirmation_class != NULL); + LDKOutputSpendStatus_PendingFirstConfirmation_meth = (*env)->GetMethodID(env, LDKOutputSpendStatus_PendingFirstConfirmation_class, "", "([BI[B)V"); + CHECK(LDKOutputSpendStatus_PendingFirstConfirmation_meth != NULL); + LDKOutputSpendStatus_PendingThresholdConfirmations_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKOutputSpendStatus$PendingThresholdConfirmations")); + CHECK(LDKOutputSpendStatus_PendingThresholdConfirmations_class != NULL); + LDKOutputSpendStatus_PendingThresholdConfirmations_meth = (*env)->GetMethodID(env, LDKOutputSpendStatus_PendingThresholdConfirmations_class, "", "([BI[BI[B)V"); + CHECK(LDKOutputSpendStatus_PendingThresholdConfirmations_meth != NULL); +} +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKOutputSpendStatus_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + switch(obj->tag) { + case LDKOutputSpendStatus_PendingInitialBroadcast: { + int64_t delayed_until_height_ref = tag_ptr(&obj->pending_initial_broadcast.delayed_until_height, false); + return (*env)->NewObject(env, LDKOutputSpendStatus_PendingInitialBroadcast_class, LDKOutputSpendStatus_PendingInitialBroadcast_meth, delayed_until_height_ref); + } + case LDKOutputSpendStatus_PendingFirstConfirmation: { + int8_tArray first_broadcast_hash_arr = (*env)->NewByteArray(env, 32); + (*env)->SetByteArrayRegion(env, first_broadcast_hash_arr, 0, 32, obj->pending_first_confirmation.first_broadcast_hash.data); + int32_t latest_broadcast_height_conv = obj->pending_first_confirmation.latest_broadcast_height; + LDKTransaction latest_spending_tx_var = obj->pending_first_confirmation.latest_spending_tx; + int8_tArray latest_spending_tx_arr = (*env)->NewByteArray(env, latest_spending_tx_var.datalen); + (*env)->SetByteArrayRegion(env, latest_spending_tx_arr, 0, latest_spending_tx_var.datalen, latest_spending_tx_var.data); + return (*env)->NewObject(env, LDKOutputSpendStatus_PendingFirstConfirmation_class, LDKOutputSpendStatus_PendingFirstConfirmation_meth, first_broadcast_hash_arr, latest_broadcast_height_conv, latest_spending_tx_arr); + } + case LDKOutputSpendStatus_PendingThresholdConfirmations: { + int8_tArray first_broadcast_hash_arr = (*env)->NewByteArray(env, 32); + (*env)->SetByteArrayRegion(env, first_broadcast_hash_arr, 0, 32, obj->pending_threshold_confirmations.first_broadcast_hash.data); + int32_t latest_broadcast_height_conv = obj->pending_threshold_confirmations.latest_broadcast_height; + LDKTransaction latest_spending_tx_var = obj->pending_threshold_confirmations.latest_spending_tx; + int8_tArray latest_spending_tx_arr = (*env)->NewByteArray(env, latest_spending_tx_var.datalen); + (*env)->SetByteArrayRegion(env, latest_spending_tx_arr, 0, latest_spending_tx_var.datalen, latest_spending_tx_var.data); + int32_t confirmation_height_conv = obj->pending_threshold_confirmations.confirmation_height; + int8_tArray confirmation_hash_arr = (*env)->NewByteArray(env, 32); + (*env)->SetByteArrayRegion(env, confirmation_hash_arr, 0, 32, obj->pending_threshold_confirmations.confirmation_hash.data); + return (*env)->NewObject(env, LDKOutputSpendStatus_PendingThresholdConfirmations_class, LDKOutputSpendStatus_PendingThresholdConfirmations_meth, first_broadcast_hash_arr, latest_broadcast_height_conv, latest_spending_tx_arr, confirmation_height_conv, confirmation_hash_arr); + } + default: abort(); + } } - -static inline struct LDKDecodeError CResult_RevocationBasepointDecodeErrorZ_get_err(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return DecodeError_clone(&*owner->contents.err); +static inline struct LDKOutputSpendStatus CResult_OutputSpendStatusDecodeErrorZ_get_ok(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return OutputSpendStatus_clone(&*owner->contents.result); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner); - LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_RevocationBasepointDecodeErrorZ_get_err(owner_conv); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_OutputSpendStatusDecodeErrorZ* owner_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(owner); + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = CResult_OutputSpendStatusDecodeErrorZ_get_ok(owner_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -static inline struct LDKRevocationKey CResult_RevocationKeyDecodeErrorZ_get_ok(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){ - LDKRevocationKey ret = *owner->contents.result; - ret.is_owned = false; - return ret; -} -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner); - LDKRevocationKey ret_var = CResult_RevocationKeyDecodeErrorZ_get_ok(owner_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -static inline struct LDKDecodeError CResult_RevocationKeyDecodeErrorZ_get_err(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){ +static inline struct LDKDecodeError CResult_OutputSpendStatusDecodeErrorZ_get_err(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR owner){ CHECK(!owner->result_ok); return DecodeError_clone(&*owner->contents.err); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_OutputSpendStatusDecodeErrorZ* owner_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(owner); LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_RevocationKeyDecodeErrorZ_get_err(owner_conv); + *ret_copy = CResult_OutputSpendStatusDecodeErrorZ_get_err(owner_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -15903,85 +16904,96 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1FilterZ_1ref_1f default: abort(); } } -static inline struct LDKLockedChannelMonitor CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){ - LDKLockedChannelMonitor ret = *owner->contents.result; - ret.is_owned = false; - return ret; -} -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner); - LDKLockedChannelMonitor ret_var = CResult_LockedChannelMonitorNoneZ_get_ok(owner_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -static inline void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return *owner->contents.err; -} -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { - LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner); - CResult_LockedChannelMonitorNoneZ_get_err(owner_conv); -} - -static inline LDKCVec_OutPointZ CVec_OutPointZ_clone(const LDKCVec_OutPointZ *orig) { - LDKCVec_OutPointZ ret = { .data = MALLOC(sizeof(LDKOutPoint) * orig->datalen, "LDKCVec_OutPointZ clone bytes"), .datalen = orig->datalen }; +static inline LDKCVec_TrackedSpendableOutputZ CVec_TrackedSpendableOutputZ_clone(const LDKCVec_TrackedSpendableOutputZ *orig) { + LDKCVec_TrackedSpendableOutputZ ret = { .data = MALLOC(sizeof(LDKTrackedSpendableOutput) * orig->datalen, "LDKCVec_TrackedSpendableOutputZ clone bytes"), .datalen = orig->datalen }; for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = OutPoint_clone(&orig->data[i]); + ret.data[i] = TrackedSpendableOutput_clone(&orig->data[i]); } return ret; } -static inline LDKCVec_MonitorUpdateIdZ CVec_MonitorUpdateIdZ_clone(const LDKCVec_MonitorUpdateIdZ *orig) { - LDKCVec_MonitorUpdateIdZ ret = { .data = MALLOC(sizeof(LDKMonitorUpdateId) * orig->datalen, "LDKCVec_MonitorUpdateIdZ clone bytes"), .datalen = orig->datalen }; - for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = MonitorUpdateId_clone(&orig->data[i]); +typedef struct LDKChangeDestinationSource_JCalls { + atomic_size_t refcnt; + JavaVM *vm; + jweak o; + jmethodID get_change_destination_script_meth; +} LDKChangeDestinationSource_JCalls; +static void LDKChangeDestinationSource_JCalls_free(void* this_arg) { + LDKChangeDestinationSource_JCalls *j_calls = (LDKChangeDestinationSource_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + JNIEnv *env; + jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); + } else { + DO_ASSERT(get_jenv_res == JNI_OK); + } + (*env)->DeleteWeakGlobalRef(env, j_calls->o); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); + } + FREE(j_calls); } - return ret; } -static inline struct LDKOutPoint C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){ - LDKOutPoint ret = owner->a; - ret.is_owned = false; - return ret; +LDKCResult_CVec_u8ZNoneZ get_change_destination_script_LDKChangeDestinationSource_jcall(const void* this_arg) { + LDKChangeDestinationSource_JCalls *j_calls = (LDKChangeDestinationSource_JCalls*) this_arg; + JNIEnv *env; + jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); + } else { + DO_ASSERT(get_jenv_res == JNI_OK); + } + jobject obj = (*env)->NewLocalRef(env, j_calls->o); + CHECK(obj != NULL); + uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->get_change_destination_script_meth); + if (UNLIKELY((*env)->ExceptionCheck(env))) { + (*env)->ExceptionDescribe(env); + (*env)->FatalError(env, "A call to get_change_destination_script in LDKChangeDestinationSource from rust threw an exception."); + } + void* ret_ptr = untag_ptr(ret); + CHECK_ACCESS(ret_ptr); + LDKCResult_CVec_u8ZNoneZ ret_conv = *(LDKCResult_CVec_u8ZNoneZ*)(ret_ptr); + FREE(untag_ptr(ret)); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); + } + return ret_conv; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) { - LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner); - LDKOutPoint ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(owner_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; +static void LDKChangeDestinationSource_JCalls_cloned(LDKChangeDestinationSource* new_obj) { + LDKChangeDestinationSource_JCalls *j_calls = (LDKChangeDestinationSource_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); } +static inline LDKChangeDestinationSource LDKChangeDestinationSource_init (JNIEnv *env, jclass clz, jobject o) { + jclass c = (*env)->GetObjectClass(env, o); + CHECK(c != NULL); + LDKChangeDestinationSource_JCalls *calls = MALLOC(sizeof(LDKChangeDestinationSource_JCalls), "LDKChangeDestinationSource_JCalls"); + atomic_init(&calls->refcnt, 1); + DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0); + calls->o = (*env)->NewWeakGlobalRef(env, o); + calls->get_change_destination_script_meth = (*env)->GetMethodID(env, c, "get_change_destination_script", "()J"); + CHECK(calls->get_change_destination_script_meth != NULL); -static inline struct LDKCVec_MonitorUpdateIdZ C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){ - return CVec_MonitorUpdateIdZ_clone(&owner->b); + LDKChangeDestinationSource ret = { + .this_arg = (void*) calls, + .get_change_destination_script = get_change_destination_script_LDKChangeDestinationSource_jcall, + .free = LDKChangeDestinationSource_JCalls_free, + }; + return ret; } -JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) { - LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner); - LDKCVec_MonitorUpdateIdZ ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(owner_conv); - int64_tArray ret_arr = NULL; - ret_arr = (*env)->NewLongArray(env, ret_var.datalen); - int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL); - for (size_t r = 0; r < ret_var.datalen; r++) { - LDKMonitorUpdateId ret_conv_17_var = ret_var.data[r]; - int64_t ret_conv_17_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_17_var); - ret_conv_17_ref = tag_ptr(ret_conv_17_var.inner, ret_conv_17_var.is_owned); - ret_arr_ptr[r] = ret_conv_17_ref; - } - (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0); - FREE(ret_var.data); - return ret_arr; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKChangeDestinationSource_1new(JNIEnv *env, jclass clz, jobject o) { + LDKChangeDestinationSource *res_ptr = MALLOC(sizeof(LDKChangeDestinationSource), "LDKChangeDestinationSource"); + *res_ptr = LDKChangeDestinationSource_init(env, clz, o); + return tag_ptr(res_ptr, true); } - -static inline LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ CVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ_clone(const LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ *orig) { - LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ) * orig->datalen, "LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ clone bytes"), .datalen = orig->datalen }; - for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_clone(&orig->data[i]); - } - return ret; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChangeDestinationSource_1get_1change_1destination_1script(JNIEnv *env, jclass clz, int64_t this_arg) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKChangeDestinationSource* this_arg_conv = (LDKChangeDestinationSource*)this_arg_ptr; + LDKCResult_CVec_u8ZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_u8ZNoneZ), "LDKCResult_CVec_u8ZNoneZ"); + *ret_conv = (this_arg_conv->get_change_destination_script)(this_arg_conv->this_arg); + return tag_ptr(ret_conv, true); } + typedef struct LDKKVStore_JCalls { atomic_size_t refcnt; JavaVM *vm; @@ -16231,6 +17243,499 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KVStore_1list(JNIEnv *env, return tag_ptr(ret_conv, true); } +typedef struct LDKOutputSpender_JCalls { + atomic_size_t refcnt; + JavaVM *vm; + jweak o; + jmethodID spend_spendable_outputs_meth; +} LDKOutputSpender_JCalls; +static void LDKOutputSpender_JCalls_free(void* this_arg) { + LDKOutputSpender_JCalls *j_calls = (LDKOutputSpender_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + JNIEnv *env; + jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); + } else { + DO_ASSERT(get_jenv_res == JNI_OK); + } + (*env)->DeleteWeakGlobalRef(env, j_calls->o); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); + } + FREE(j_calls); + } +} +LDKCResult_TransactionNoneZ spend_spendable_outputs_LDKOutputSpender_jcall(const void* this_arg, LDKCVec_SpendableOutputDescriptorZ descriptors, LDKCVec_TxOutZ outputs, LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight, LDKCOption_u32Z locktime) { + LDKOutputSpender_JCalls *j_calls = (LDKOutputSpender_JCalls*) this_arg; + JNIEnv *env; + jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); + } else { + DO_ASSERT(get_jenv_res == JNI_OK); + } + LDKCVec_SpendableOutputDescriptorZ descriptors_var = descriptors; + int64_tArray descriptors_arr = NULL; + descriptors_arr = (*env)->NewLongArray(env, descriptors_var.datalen); + int64_t *descriptors_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, descriptors_arr, NULL); + for (size_t b = 0; b < descriptors_var.datalen; b++) { + LDKSpendableOutputDescriptor *descriptors_conv_27_copy = MALLOC(sizeof(LDKSpendableOutputDescriptor), "LDKSpendableOutputDescriptor"); + *descriptors_conv_27_copy = descriptors_var.data[b]; + int64_t descriptors_conv_27_ref = tag_ptr(descriptors_conv_27_copy, true); + descriptors_arr_ptr[b] = descriptors_conv_27_ref; + } + (*env)->ReleasePrimitiveArrayCritical(env, descriptors_arr, descriptors_arr_ptr, 0); + FREE(descriptors_var.data); + LDKCVec_TxOutZ outputs_var = outputs; + int64_tArray outputs_arr = NULL; + outputs_arr = (*env)->NewLongArray(env, outputs_var.datalen); + int64_t *outputs_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, outputs_arr, NULL); + for (size_t h = 0; h < outputs_var.datalen; h++) { + LDKTxOut* outputs_conv_7_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut"); + *outputs_conv_7_ref = outputs_var.data[h]; + outputs_arr_ptr[h] = tag_ptr(outputs_conv_7_ref, true); + } + (*env)->ReleasePrimitiveArrayCritical(env, outputs_arr, outputs_arr_ptr, 0); + FREE(outputs_var.data); + LDKCVec_u8Z change_destination_script_var = change_destination_script; + int8_tArray change_destination_script_arr = (*env)->NewByteArray(env, change_destination_script_var.datalen); + (*env)->SetByteArrayRegion(env, change_destination_script_arr, 0, change_destination_script_var.datalen, change_destination_script_var.data); + CVec_u8Z_free(change_destination_script_var); + int32_t feerate_sat_per_1000_weight_conv = feerate_sat_per_1000_weight; + LDKCOption_u32Z *locktime_copy = MALLOC(sizeof(LDKCOption_u32Z), "LDKCOption_u32Z"); + *locktime_copy = locktime; + int64_t locktime_ref = tag_ptr(locktime_copy, true); + jobject obj = (*env)->NewLocalRef(env, j_calls->o); + CHECK(obj != NULL); + uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->spend_spendable_outputs_meth, descriptors_arr, outputs_arr, change_destination_script_arr, feerate_sat_per_1000_weight_conv, locktime_ref); + if (UNLIKELY((*env)->ExceptionCheck(env))) { + (*env)->ExceptionDescribe(env); + (*env)->FatalError(env, "A call to spend_spendable_outputs in LDKOutputSpender from rust threw an exception."); + } + void* ret_ptr = untag_ptr(ret); + CHECK_ACCESS(ret_ptr); + LDKCResult_TransactionNoneZ ret_conv = *(LDKCResult_TransactionNoneZ*)(ret_ptr); + FREE(untag_ptr(ret)); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); + } + return ret_conv; +} +static void LDKOutputSpender_JCalls_cloned(LDKOutputSpender* new_obj) { + LDKOutputSpender_JCalls *j_calls = (LDKOutputSpender_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +} +static inline LDKOutputSpender LDKOutputSpender_init (JNIEnv *env, jclass clz, jobject o) { + jclass c = (*env)->GetObjectClass(env, o); + CHECK(c != NULL); + LDKOutputSpender_JCalls *calls = MALLOC(sizeof(LDKOutputSpender_JCalls), "LDKOutputSpender_JCalls"); + atomic_init(&calls->refcnt, 1); + DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0); + calls->o = (*env)->NewWeakGlobalRef(env, o); + calls->spend_spendable_outputs_meth = (*env)->GetMethodID(env, c, "spend_spendable_outputs", "([J[J[BIJ)J"); + CHECK(calls->spend_spendable_outputs_meth != NULL); + + LDKOutputSpender ret = { + .this_arg = (void*) calls, + .spend_spendable_outputs = spend_spendable_outputs_LDKOutputSpender_jcall, + .free = LDKOutputSpender_JCalls_free, + }; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKOutputSpender_1new(JNIEnv *env, jclass clz, jobject o) { + LDKOutputSpender *res_ptr = MALLOC(sizeof(LDKOutputSpender), "LDKOutputSpender"); + *res_ptr = LDKOutputSpender_init(env, clz, o); + return tag_ptr(res_ptr, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpender_1spend_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray descriptors, int64_tArray outputs, int8_tArray change_destination_script, int32_t feerate_sat_per_1000_weight, int64_t locktime) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKOutputSpender* this_arg_conv = (LDKOutputSpender*)this_arg_ptr; + LDKCVec_SpendableOutputDescriptorZ descriptors_constr; + descriptors_constr.datalen = (*env)->GetArrayLength(env, descriptors); + if (descriptors_constr.datalen > 0) + descriptors_constr.data = MALLOC(descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements"); + else + descriptors_constr.data = NULL; + int64_t* descriptors_vals = (*env)->GetLongArrayElements (env, descriptors, NULL); + for (size_t b = 0; b < descriptors_constr.datalen; b++) { + int64_t descriptors_conv_27 = descriptors_vals[b]; + void* descriptors_conv_27_ptr = untag_ptr(descriptors_conv_27); + CHECK_ACCESS(descriptors_conv_27_ptr); + LDKSpendableOutputDescriptor descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(descriptors_conv_27_ptr); + descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptors_conv_27)); + descriptors_constr.data[b] = descriptors_conv_27_conv; + } + (*env)->ReleaseLongArrayElements(env, descriptors, descriptors_vals, 0); + LDKCVec_TxOutZ outputs_constr; + outputs_constr.datalen = (*env)->GetArrayLength(env, outputs); + if (outputs_constr.datalen > 0) + outputs_constr.data = MALLOC(outputs_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements"); + else + outputs_constr.data = NULL; + int64_t* outputs_vals = (*env)->GetLongArrayElements (env, outputs, NULL); + for (size_t h = 0; h < outputs_constr.datalen; h++) { + int64_t outputs_conv_7 = outputs_vals[h]; + void* outputs_conv_7_ptr = untag_ptr(outputs_conv_7); + CHECK_ACCESS(outputs_conv_7_ptr); + LDKTxOut outputs_conv_7_conv = *(LDKTxOut*)(outputs_conv_7_ptr); + outputs_conv_7_conv = TxOut_clone((LDKTxOut*)untag_ptr(outputs_conv_7)); + outputs_constr.data[h] = outputs_conv_7_conv; + } + (*env)->ReleaseLongArrayElements(env, outputs, outputs_vals, 0); + LDKCVec_u8Z change_destination_script_ref; + change_destination_script_ref.datalen = (*env)->GetArrayLength(env, change_destination_script); + change_destination_script_ref.data = MALLOC(change_destination_script_ref.datalen, "LDKCVec_u8Z Bytes"); + (*env)->GetByteArrayRegion(env, change_destination_script, 0, change_destination_script_ref.datalen, change_destination_script_ref.data); + void* locktime_ptr = untag_ptr(locktime); + CHECK_ACCESS(locktime_ptr); + LDKCOption_u32Z locktime_conv = *(LDKCOption_u32Z*)(locktime_ptr); + locktime_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(locktime)); + LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); + *ret_conv = (this_arg_conv->spend_spendable_outputs)(this_arg_conv->this_arg, descriptors_constr, outputs_constr, change_destination_script_ref, feerate_sat_per_1000_weight, locktime_conv); + return tag_ptr(ret_conv, true); +} + +static inline struct LDKOutputSweeper CResult_OutputSweeperDecodeErrorZ_get_ok(LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR owner){ + LDKOutputSweeper ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_OutputSweeperDecodeErrorZ* owner_conv = (LDKCResult_OutputSweeperDecodeErrorZ*)untag_ptr(owner); + LDKOutputSweeper ret_var = CResult_OutputSweeperDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_OutputSweeperDecodeErrorZ_get_err(LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_OutputSweeperDecodeErrorZ* owner_conv = (LDKCResult_OutputSweeperDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_OutputSweeperDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKBestBlock C2Tuple_BestBlockOutputSweeperZ_get_a(LDKC2Tuple_BestBlockOutputSweeperZ *NONNULL_PTR owner){ + LDKBestBlock ret = owner->a; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) { + LDKC2Tuple_BestBlockOutputSweeperZ* owner_conv = (LDKC2Tuple_BestBlockOutputSweeperZ*)untag_ptr(owner); + LDKBestBlock ret_var = C2Tuple_BestBlockOutputSweeperZ_get_a(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKOutputSweeper C2Tuple_BestBlockOutputSweeperZ_get_b(LDKC2Tuple_BestBlockOutputSweeperZ *NONNULL_PTR owner){ + LDKOutputSweeper ret = owner->b; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) { + LDKC2Tuple_BestBlockOutputSweeperZ* owner_conv = (LDKC2Tuple_BestBlockOutputSweeperZ*)untag_ptr(owner); + LDKOutputSweeper ret_var = C2Tuple_BestBlockOutputSweeperZ_get_b(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKC2Tuple_BestBlockOutputSweeperZ *CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return &*owner->contents.result; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* owner_conv = (LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)untag_ptr(owner); + int64_t ret_ret = tag_ptr(CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(owner_conv), false); + return ret_ret; +} + +static inline struct LDKDecodeError CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* owner_conv = (LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKDelayedPaymentBasepoint CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){ + LDKDelayedPaymentBasepoint ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner); + LDKDelayedPaymentBasepoint ret_var = CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKDelayedPaymentKey CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){ + LDKDelayedPaymentKey ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner); + LDKDelayedPaymentKey ret_var = CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_DelayedPaymentKeyDecodeErrorZ_get_err(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_DelayedPaymentKeyDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKHtlcBasepoint CResult_HtlcBasepointDecodeErrorZ_get_ok(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){ + LDKHtlcBasepoint ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner); + LDKHtlcBasepoint ret_var = CResult_HtlcBasepointDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_HtlcBasepointDecodeErrorZ_get_err(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_HtlcBasepointDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKHtlcKey CResult_HtlcKeyDecodeErrorZ_get_ok(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){ + LDKHtlcKey ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner); + LDKHtlcKey ret_var = CResult_HtlcKeyDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_HtlcKeyDecodeErrorZ_get_err(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_HtlcKeyDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKRevocationBasepoint CResult_RevocationBasepointDecodeErrorZ_get_ok(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){ + LDKRevocationBasepoint ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner); + LDKRevocationBasepoint ret_var = CResult_RevocationBasepointDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_RevocationBasepointDecodeErrorZ_get_err(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_RevocationBasepointDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKRevocationKey CResult_RevocationKeyDecodeErrorZ_get_ok(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){ + LDKRevocationKey ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner); + LDKRevocationKey ret_var = CResult_RevocationKeyDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_RevocationKeyDecodeErrorZ_get_err(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_RevocationKeyDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKLockedChannelMonitor CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){ + LDKLockedChannelMonitor ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner); + LDKLockedChannelMonitor ret_var = CResult_LockedChannelMonitorNoneZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return *owner->contents.err; +} +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) { + LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner); + CResult_LockedChannelMonitorNoneZ_get_err(owner_conv); +} + +static inline struct LDKOutPoint C2Tuple_OutPointChannelIdZ_get_a(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR owner){ + LDKOutPoint ret = owner->a; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) { + LDKC2Tuple_OutPointChannelIdZ* owner_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(owner); + LDKOutPoint ret_var = C2Tuple_OutPointChannelIdZ_get_a(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKChannelId C2Tuple_OutPointChannelIdZ_get_b(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR owner){ + LDKChannelId ret = owner->b; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) { + LDKC2Tuple_OutPointChannelIdZ* owner_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(owner); + LDKChannelId ret_var = C2Tuple_OutPointChannelIdZ_get_b(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline LDKCVec_C2Tuple_OutPointChannelIdZZ CVec_C2Tuple_OutPointChannelIdZZ_clone(const LDKCVec_C2Tuple_OutPointChannelIdZZ *orig) { + LDKCVec_C2Tuple_OutPointChannelIdZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ) * orig->datalen, "LDKCVec_C2Tuple_OutPointChannelIdZZ clone bytes"), .datalen = orig->datalen }; + for (size_t i = 0; i < ret.datalen; i++) { + ret.data[i] = C2Tuple_OutPointChannelIdZ_clone(&orig->data[i]); + } + return ret; +} +static inline LDKCVec_MonitorUpdateIdZ CVec_MonitorUpdateIdZ_clone(const LDKCVec_MonitorUpdateIdZ *orig) { + LDKCVec_MonitorUpdateIdZ ret = { .data = MALLOC(sizeof(LDKMonitorUpdateId) * orig->datalen, "LDKCVec_MonitorUpdateIdZ clone bytes"), .datalen = orig->datalen }; + for (size_t i = 0; i < ret.datalen; i++) { + ret.data[i] = MonitorUpdateId_clone(&orig->data[i]); + } + return ret; +} +static inline struct LDKOutPoint C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){ + LDKOutPoint ret = owner->a; + ret.is_owned = false; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) { + LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner); + LDKOutPoint ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKCVec_MonitorUpdateIdZ C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){ + return CVec_MonitorUpdateIdZ_clone(&owner->b); +} +JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) { + LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner); + LDKCVec_MonitorUpdateIdZ ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(owner_conv); + int64_tArray ret_arr = NULL; + ret_arr = (*env)->NewLongArray(env, ret_var.datalen); + int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL); + for (size_t r = 0; r < ret_var.datalen; r++) { + LDKMonitorUpdateId ret_conv_17_var = ret_var.data[r]; + int64_t ret_conv_17_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_17_var); + ret_conv_17_ref = tag_ptr(ret_conv_17_var.inner, ret_conv_17_var.is_owned); + ret_arr_ptr[r] = ret_conv_17_ref; + } + (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0); + FREE(ret_var.data); + return ret_arr; +} + +static inline LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ CVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ_clone(const LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ *orig) { + LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ) * orig->datalen, "LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ clone bytes"), .datalen = orig->datalen }; + for (size_t i = 0; i < ret.datalen; i++) { + ret.data[i] = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_clone(&orig->data[i]); + } + return ret; +} typedef struct LDKPersister_JCalls { atomic_size_t refcnt; JavaVM *vm; @@ -16421,6 +17926,7 @@ typedef struct LDKPersist_JCalls { jweak o; jmethodID persist_new_channel_meth; jmethodID update_persisted_channel_meth; + jmethodID archive_persisted_channel_meth; } LDKPersist_JCalls; static void LDKPersist_JCalls_free(void* this_arg) { LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg; @@ -16439,7 +17945,7 @@ static void LDKPersist_JCalls_free(void* this_arg) { FREE(j_calls); } } -LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) { +LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_funding_outpoint, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) { LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg; JNIEnv *env; jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); @@ -16448,10 +17954,10 @@ LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* t } else { DO_ASSERT(get_jenv_res == JNI_OK); } - LDKOutPoint channel_id_var = channel_id; - int64_t channel_id_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); - channel_id_ref = tag_ptr(channel_id_var.inner, channel_id_var.is_owned); + LDKOutPoint channel_funding_outpoint_var = channel_funding_outpoint; + int64_t channel_funding_outpoint_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_var); + channel_funding_outpoint_ref = tag_ptr(channel_funding_outpoint_var.inner, channel_funding_outpoint_var.is_owned); LDKChannelMonitor data_var = *data; int64_t data_ref = 0; data_var = ChannelMonitor_clone(&data_var); @@ -16463,7 +17969,7 @@ LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* t update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned); jobject obj = (*env)->NewLocalRef(env, j_calls->o); CHECK(obj != NULL); - jclass ret = (*env)->CallObjectMethod(env, obj, j_calls->persist_new_channel_meth, channel_id_ref, data_ref, update_id_ref); + jclass ret = (*env)->CallObjectMethod(env, obj, j_calls->persist_new_channel_meth, channel_funding_outpoint_ref, data_ref, update_id_ref); if (UNLIKELY((*env)->ExceptionCheck(env))) { (*env)->ExceptionDescribe(env); (*env)->FatalError(env, "A call to persist_new_channel in LDKPersist from rust threw an exception."); @@ -16474,7 +17980,7 @@ LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* t } return ret_conv; } -LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, LDKChannelMonitorUpdate update, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) { +LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_funding_outpoint, LDKChannelMonitorUpdate update, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) { LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg; JNIEnv *env; jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); @@ -16483,10 +17989,10 @@ LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const vo } else { DO_ASSERT(get_jenv_res == JNI_OK); } - LDKOutPoint channel_id_var = channel_id; - int64_t channel_id_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); - channel_id_ref = tag_ptr(channel_id_var.inner, channel_id_var.is_owned); + LDKOutPoint channel_funding_outpoint_var = channel_funding_outpoint; + int64_t channel_funding_outpoint_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_var); + channel_funding_outpoint_ref = tag_ptr(channel_funding_outpoint_var.inner, channel_funding_outpoint_var.is_owned); LDKChannelMonitorUpdate update_var = update; int64_t update_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(update_var); @@ -16502,7 +18008,7 @@ LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const vo update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned); jobject obj = (*env)->NewLocalRef(env, j_calls->o); CHECK(obj != NULL); - jclass ret = (*env)->CallObjectMethod(env, obj, j_calls->update_persisted_channel_meth, channel_id_ref, update_ref, data_ref, update_id_ref); + jclass ret = (*env)->CallObjectMethod(env, obj, j_calls->update_persisted_channel_meth, channel_funding_outpoint_ref, update_ref, data_ref, update_id_ref); if (UNLIKELY((*env)->ExceptionCheck(env))) { (*env)->ExceptionDescribe(env); (*env)->FatalError(env, "A call to update_persisted_channel in LDKPersist from rust threw an exception."); @@ -16513,6 +18019,30 @@ LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const vo } return ret_conv; } +void archive_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_funding_outpoint) { + LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg; + JNIEnv *env; + jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); + } else { + DO_ASSERT(get_jenv_res == JNI_OK); + } + LDKOutPoint channel_funding_outpoint_var = channel_funding_outpoint; + int64_t channel_funding_outpoint_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_var); + channel_funding_outpoint_ref = tag_ptr(channel_funding_outpoint_var.inner, channel_funding_outpoint_var.is_owned); + jobject obj = (*env)->NewLocalRef(env, j_calls->o); + CHECK(obj != NULL); + (*env)->CallVoidMethod(env, obj, j_calls->archive_persisted_channel_meth, channel_funding_outpoint_ref); + if (UNLIKELY((*env)->ExceptionCheck(env))) { + (*env)->ExceptionDescribe(env); + (*env)->FatalError(env, "A call to archive_persisted_channel in LDKPersist from rust threw an exception."); + } + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); + } +} static void LDKPersist_JCalls_cloned(LDKPersist* new_obj) { LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) new_obj->this_arg; atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); @@ -16528,11 +18058,14 @@ static inline LDKPersist LDKPersist_init (JNIEnv *env, jclass clz, jobject o) { CHECK(calls->persist_new_channel_meth != NULL); calls->update_persisted_channel_meth = (*env)->GetMethodID(env, c, "update_persisted_channel", "(JJJJ)Lorg/ldk/enums/ChannelMonitorUpdateStatus;"); CHECK(calls->update_persisted_channel_meth != NULL); + calls->archive_persisted_channel_meth = (*env)->GetMethodID(env, c, "archive_persisted_channel", "(J)V"); + CHECK(calls->archive_persisted_channel_meth != NULL); LDKPersist ret = { .this_arg = (void*) calls, .persist_new_channel = persist_new_channel_LDKPersist_jcall, .update_persisted_channel = update_persisted_channel_LDKPersist_jcall, + .archive_persisted_channel = archive_persisted_channel_LDKPersist_jcall, .free = LDKPersist_JCalls_free, }; return ret; @@ -16542,15 +18075,15 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKPersist_1new(JNIEnv *env *res_ptr = LDKPersist_init(env, clz, o); return tag_ptr(res_ptr, true); } -JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1persist_1new_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int64_t data, int64_t update_id) { +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1persist_1new_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_funding_outpoint, int64_t data, int64_t update_id) { void* this_arg_ptr = untag_ptr(this_arg); if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr; - LDKOutPoint channel_id_conv; - channel_id_conv.inner = untag_ptr(channel_id); - channel_id_conv.is_owned = ptr_is_owned(channel_id); - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); - channel_id_conv = OutPoint_clone(&channel_id_conv); + LDKOutPoint channel_funding_outpoint_conv; + channel_funding_outpoint_conv.inner = untag_ptr(channel_funding_outpoint); + channel_funding_outpoint_conv.is_owned = ptr_is_owned(channel_funding_outpoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_conv); + channel_funding_outpoint_conv = OutPoint_clone(&channel_funding_outpoint_conv); LDKChannelMonitor data_conv; data_conv.inner = untag_ptr(data); data_conv.is_owned = ptr_is_owned(data); @@ -16561,19 +18094,19 @@ JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1persist_1new_1chann update_id_conv.is_owned = ptr_is_owned(update_id); CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv); update_id_conv = MonitorUpdateId_clone(&update_id_conv); - jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, (this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, channel_id_conv, &data_conv, update_id_conv)); + jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, (this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, channel_funding_outpoint_conv, &data_conv, update_id_conv)); return ret_conv; } -JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1update_1persisted_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int64_t update, int64_t data, int64_t update_id) { +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1update_1persisted_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_funding_outpoint, int64_t update, int64_t data, int64_t update_id) { void* this_arg_ptr = untag_ptr(this_arg); if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr; - LDKOutPoint channel_id_conv; - channel_id_conv.inner = untag_ptr(channel_id); - channel_id_conv.is_owned = ptr_is_owned(channel_id); - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); - channel_id_conv = OutPoint_clone(&channel_id_conv); + LDKOutPoint channel_funding_outpoint_conv; + channel_funding_outpoint_conv.inner = untag_ptr(channel_funding_outpoint); + channel_funding_outpoint_conv.is_owned = ptr_is_owned(channel_funding_outpoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_conv); + channel_funding_outpoint_conv = OutPoint_clone(&channel_funding_outpoint_conv); LDKChannelMonitorUpdate update_conv; update_conv.inner = untag_ptr(update); update_conv.is_owned = ptr_is_owned(update); @@ -16589,84 +18122,20 @@ JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1update_1persisted_1 update_id_conv.is_owned = ptr_is_owned(update_id); CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv); update_id_conv = MonitorUpdateId_clone(&update_id_conv); - jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, (this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, channel_id_conv, update_conv, &data_conv, update_id_conv)); + jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, (this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, channel_funding_outpoint_conv, update_conv, &data_conv, update_id_conv)); return ret_conv; } -typedef struct LDKFutureCallback_JCalls { - atomic_size_t refcnt; - JavaVM *vm; - jweak o; - jmethodID call_meth; -} LDKFutureCallback_JCalls; -static void LDKFutureCallback_JCalls_free(void* this_arg) { - LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg; - if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { - JNIEnv *env; - jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); - if (get_jenv_res == JNI_EDETACHED) { - DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); - } else { - DO_ASSERT(get_jenv_res == JNI_OK); - } - (*env)->DeleteWeakGlobalRef(env, j_calls->o); - if (get_jenv_res == JNI_EDETACHED) { - DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); - } - FREE(j_calls); - } -} -void call_LDKFutureCallback_jcall(const void* this_arg) { - LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg; - JNIEnv *env; - jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); - if (get_jenv_res == JNI_EDETACHED) { - DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); - } else { - DO_ASSERT(get_jenv_res == JNI_OK); - } - jobject obj = (*env)->NewLocalRef(env, j_calls->o); - CHECK(obj != NULL); - (*env)->CallVoidMethod(env, obj, j_calls->call_meth); - if (UNLIKELY((*env)->ExceptionCheck(env))) { - (*env)->ExceptionDescribe(env); - (*env)->FatalError(env, "A call to call in LDKFutureCallback from rust threw an exception."); - } - if (get_jenv_res == JNI_EDETACHED) { - DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); - } -} -static void LDKFutureCallback_JCalls_cloned(LDKFutureCallback* new_obj) { - LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) new_obj->this_arg; - atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); -} -static inline LDKFutureCallback LDKFutureCallback_init (JNIEnv *env, jclass clz, jobject o) { - jclass c = (*env)->GetObjectClass(env, o); - CHECK(c != NULL); - LDKFutureCallback_JCalls *calls = MALLOC(sizeof(LDKFutureCallback_JCalls), "LDKFutureCallback_JCalls"); - atomic_init(&calls->refcnt, 1); - DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0); - calls->o = (*env)->NewWeakGlobalRef(env, o); - calls->call_meth = (*env)->GetMethodID(env, c, "call", "()V"); - CHECK(calls->call_meth != NULL); - - LDKFutureCallback ret = { - .this_arg = (void*) calls, - .call = call_LDKFutureCallback_jcall, - .free = LDKFutureCallback_JCalls_free, - }; - return ret; -} -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKFutureCallback_1new(JNIEnv *env, jclass clz, jobject o) { - LDKFutureCallback *res_ptr = MALLOC(sizeof(LDKFutureCallback), "LDKFutureCallback"); - *res_ptr = LDKFutureCallback_init(env, clz, o); - return tag_ptr(res_ptr, true); -} -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1call(JNIEnv *env, jclass clz, int64_t this_arg) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Persist_1archive_1persisted_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_funding_outpoint) { void* this_arg_ptr = untag_ptr(this_arg); if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } - LDKFutureCallback* this_arg_conv = (LDKFutureCallback*)this_arg_ptr; - (this_arg_conv->call)(this_arg_conv->this_arg); + LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr; + LDKOutPoint channel_funding_outpoint_conv; + channel_funding_outpoint_conv.inner = untag_ptr(channel_funding_outpoint); + channel_funding_outpoint_conv.is_owned = ptr_is_owned(channel_funding_outpoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_conv); + channel_funding_outpoint_conv = OutPoint_clone(&channel_funding_outpoint_conv); + (this_arg_conv->archive_persisted_channel)(this_arg_conv->this_arg, channel_funding_outpoint_conv); } typedef struct LDKListen_JCalls { @@ -17100,14 +18569,44 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_Confirm_1get_1relevant return ret_arr; } -typedef struct LDKEventHandler_JCalls { +static jclass LDKSpendingDelay_Relative_class = NULL; +static jmethodID LDKSpendingDelay_Relative_meth = NULL; +static jclass LDKSpendingDelay_Absolute_class = NULL; +static jmethodID LDKSpendingDelay_Absolute_meth = NULL; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSpendingDelay_init (JNIEnv *env, jclass clz) { + LDKSpendingDelay_Relative_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSpendingDelay$Relative")); + CHECK(LDKSpendingDelay_Relative_class != NULL); + LDKSpendingDelay_Relative_meth = (*env)->GetMethodID(env, LDKSpendingDelay_Relative_class, "", "(I)V"); + CHECK(LDKSpendingDelay_Relative_meth != NULL); + LDKSpendingDelay_Absolute_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSpendingDelay$Absolute")); + CHECK(LDKSpendingDelay_Absolute_class != NULL); + LDKSpendingDelay_Absolute_meth = (*env)->GetMethodID(env, LDKSpendingDelay_Absolute_class, "", "(I)V"); + CHECK(LDKSpendingDelay_Absolute_meth != NULL); +} +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSpendingDelay_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { + LDKSpendingDelay *obj = (LDKSpendingDelay*)untag_ptr(ptr); + switch(obj->tag) { + case LDKSpendingDelay_Relative: { + int32_t num_blocks_conv = obj->relative.num_blocks; + return (*env)->NewObject(env, LDKSpendingDelay_Relative_class, LDKSpendingDelay_Relative_meth, num_blocks_conv); + } + case LDKSpendingDelay_Absolute: { + int32_t height_conv = obj->absolute.height; + return (*env)->NewObject(env, LDKSpendingDelay_Absolute_class, LDKSpendingDelay_Absolute_meth, height_conv); + } + default: abort(); + } +} +typedef struct LDKFutureCallback_JCalls { atomic_size_t refcnt; JavaVM *vm; jweak o; - jmethodID handle_event_meth; -} LDKEventHandler_JCalls; -static void LDKEventHandler_JCalls_free(void* this_arg) { - LDKEventHandler_JCalls *j_calls = (LDKEventHandler_JCalls*) this_arg; + jmethodID call_meth; +} LDKFutureCallback_JCalls; +static void LDKFutureCallback_JCalls_free(void* this_arg) { + LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg; if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { JNIEnv *env; jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); @@ -17123,7 +18622,83 @@ static void LDKEventHandler_JCalls_free(void* this_arg) { FREE(j_calls); } } -void handle_event_LDKEventHandler_jcall(const void* this_arg, LDKEvent event) { +void call_LDKFutureCallback_jcall(const void* this_arg) { + LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg; + JNIEnv *env; + jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); + } else { + DO_ASSERT(get_jenv_res == JNI_OK); + } + jobject obj = (*env)->NewLocalRef(env, j_calls->o); + CHECK(obj != NULL); + (*env)->CallVoidMethod(env, obj, j_calls->call_meth); + if (UNLIKELY((*env)->ExceptionCheck(env))) { + (*env)->ExceptionDescribe(env); + (*env)->FatalError(env, "A call to call in LDKFutureCallback from rust threw an exception."); + } + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); + } +} +static void LDKFutureCallback_JCalls_cloned(LDKFutureCallback* new_obj) { + LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +} +static inline LDKFutureCallback LDKFutureCallback_init (JNIEnv *env, jclass clz, jobject o) { + jclass c = (*env)->GetObjectClass(env, o); + CHECK(c != NULL); + LDKFutureCallback_JCalls *calls = MALLOC(sizeof(LDKFutureCallback_JCalls), "LDKFutureCallback_JCalls"); + atomic_init(&calls->refcnt, 1); + DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0); + calls->o = (*env)->NewWeakGlobalRef(env, o); + calls->call_meth = (*env)->GetMethodID(env, c, "call", "()V"); + CHECK(calls->call_meth != NULL); + + LDKFutureCallback ret = { + .this_arg = (void*) calls, + .call = call_LDKFutureCallback_jcall, + .free = LDKFutureCallback_JCalls_free, + }; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKFutureCallback_1new(JNIEnv *env, jclass clz, jobject o) { + LDKFutureCallback *res_ptr = MALLOC(sizeof(LDKFutureCallback), "LDKFutureCallback"); + *res_ptr = LDKFutureCallback_init(env, clz, o); + return tag_ptr(res_ptr, true); +} +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1call(JNIEnv *env, jclass clz, int64_t this_arg) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKFutureCallback* this_arg_conv = (LDKFutureCallback*)this_arg_ptr; + (this_arg_conv->call)(this_arg_conv->this_arg); +} + +typedef struct LDKEventHandler_JCalls { + atomic_size_t refcnt; + JavaVM *vm; + jweak o; + jmethodID handle_event_meth; +} LDKEventHandler_JCalls; +static void LDKEventHandler_JCalls_free(void* this_arg) { + LDKEventHandler_JCalls *j_calls = (LDKEventHandler_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + JNIEnv *env; + jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); + } else { + DO_ASSERT(get_jenv_res == JNI_OK); + } + (*env)->DeleteWeakGlobalRef(env, j_calls->o); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); + } + FREE(j_calls); + } +} +void handle_event_LDKEventHandler_jcall(const void* this_arg, LDKEvent event) { LDKEventHandler_JCalls *j_calls = (LDKEventHandler_JCalls*) this_arg; JNIEnv *env; jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); @@ -17437,9 +19012,6 @@ typedef struct LDKChannelMessageHandler_JCalls { jmethodID handle_shutdown_meth; jmethodID handle_closing_signed_meth; jmethodID handle_stfu_meth; - jmethodID handle_splice_meth; - jmethodID handle_splice_ack_meth; - jmethodID handle_splice_locked_meth; jmethodID handle_tx_add_input_meth; jmethodID handle_tx_add_output_meth; jmethodID handle_tx_remove_input_meth; @@ -17753,87 +19325,6 @@ void handle_stfu_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicK DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); } } -void handle_splice_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKSplice * msg) { - LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; - JNIEnv *env; - jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); - if (get_jenv_res == JNI_EDETACHED) { - DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); - } else { - DO_ASSERT(get_jenv_res == JNI_OK); - } - int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form); - LDKSplice msg_var = *msg; - int64_t msg_ref = 0; - msg_var = Splice_clone(&msg_var); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); - msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - jobject obj = (*env)->NewLocalRef(env, j_calls->o); - CHECK(obj != NULL); - (*env)->CallVoidMethod(env, obj, j_calls->handle_splice_meth, their_node_id_arr, msg_ref); - if (UNLIKELY((*env)->ExceptionCheck(env))) { - (*env)->ExceptionDescribe(env); - (*env)->FatalError(env, "A call to handle_splice in LDKChannelMessageHandler from rust threw an exception."); - } - if (get_jenv_res == JNI_EDETACHED) { - DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); - } -} -void handle_splice_ack_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKSpliceAck * msg) { - LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; - JNIEnv *env; - jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); - if (get_jenv_res == JNI_EDETACHED) { - DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); - } else { - DO_ASSERT(get_jenv_res == JNI_OK); - } - int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form); - LDKSpliceAck msg_var = *msg; - int64_t msg_ref = 0; - msg_var = SpliceAck_clone(&msg_var); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); - msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - jobject obj = (*env)->NewLocalRef(env, j_calls->o); - CHECK(obj != NULL); - (*env)->CallVoidMethod(env, obj, j_calls->handle_splice_ack_meth, their_node_id_arr, msg_ref); - if (UNLIKELY((*env)->ExceptionCheck(env))) { - (*env)->ExceptionDescribe(env); - (*env)->FatalError(env, "A call to handle_splice_ack in LDKChannelMessageHandler from rust threw an exception."); - } - if (get_jenv_res == JNI_EDETACHED) { - DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); - } -} -void handle_splice_locked_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKSpliceLocked * msg) { - LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; - JNIEnv *env; - jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); - if (get_jenv_res == JNI_EDETACHED) { - DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); - } else { - DO_ASSERT(get_jenv_res == JNI_OK); - } - int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form); - LDKSpliceLocked msg_var = *msg; - int64_t msg_ref = 0; - msg_var = SpliceLocked_clone(&msg_var); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); - msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - jobject obj = (*env)->NewLocalRef(env, j_calls->o); - CHECK(obj != NULL); - (*env)->CallVoidMethod(env, obj, j_calls->handle_splice_locked_meth, their_node_id_arr, msg_ref); - if (UNLIKELY((*env)->ExceptionCheck(env))) { - (*env)->ExceptionDescribe(env); - (*env)->FatalError(env, "A call to handle_splice_locked in LDKChannelMessageHandler from rust threw an exception."); - } - if (get_jenv_res == JNI_EDETACHED) { - DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); - } -} void handle_tx_add_input_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKTxAddInput * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; JNIEnv *env; @@ -18538,12 +20029,6 @@ static inline LDKChannelMessageHandler LDKChannelMessageHandler_init (JNIEnv *en CHECK(calls->handle_closing_signed_meth != NULL); calls->handle_stfu_meth = (*env)->GetMethodID(env, c, "handle_stfu", "([BJ)V"); CHECK(calls->handle_stfu_meth != NULL); - calls->handle_splice_meth = (*env)->GetMethodID(env, c, "handle_splice", "([BJ)V"); - CHECK(calls->handle_splice_meth != NULL); - calls->handle_splice_ack_meth = (*env)->GetMethodID(env, c, "handle_splice_ack", "([BJ)V"); - CHECK(calls->handle_splice_ack_meth != NULL); - calls->handle_splice_locked_meth = (*env)->GetMethodID(env, c, "handle_splice_locked", "([BJ)V"); - CHECK(calls->handle_splice_locked_meth != NULL); calls->handle_tx_add_input_meth = (*env)->GetMethodID(env, c, "handle_tx_add_input", "([BJ)V"); CHECK(calls->handle_tx_add_input_meth != NULL); calls->handle_tx_add_output_meth = (*env)->GetMethodID(env, c, "handle_tx_add_output", "([BJ)V"); @@ -18607,9 +20092,6 @@ static inline LDKChannelMessageHandler LDKChannelMessageHandler_init (JNIEnv *en .handle_shutdown = handle_shutdown_LDKChannelMessageHandler_jcall, .handle_closing_signed = handle_closing_signed_LDKChannelMessageHandler_jcall, .handle_stfu = handle_stfu_LDKChannelMessageHandler_jcall, - .handle_splice = handle_splice_LDKChannelMessageHandler_jcall, - .handle_splice_ack = handle_splice_ack_LDKChannelMessageHandler_jcall, - .handle_splice_locked = handle_splice_locked_LDKChannelMessageHandler_jcall, .handle_tx_add_input = handle_tx_add_input_LDKChannelMessageHandler_jcall, .handle_tx_add_output = handle_tx_add_output_LDKChannelMessageHandler_jcall, .handle_tx_remove_input = handle_tx_remove_input_LDKChannelMessageHandler_jcall, @@ -18800,51 +20282,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_ (this_arg_conv->handle_stfu)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv); } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1splice(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) { - void* this_arg_ptr = untag_ptr(this_arg); - if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } - LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr; - LDKPublicKey their_node_id_ref; - CHECK((*env)->GetArrayLength(env, their_node_id) == 33); - (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form); - LDKSplice msg_conv; - msg_conv.inner = untag_ptr(msg); - msg_conv.is_owned = ptr_is_owned(msg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv); - msg_conv.is_owned = false; - (this_arg_conv->handle_splice)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv); -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1splice_1ack(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) { - void* this_arg_ptr = untag_ptr(this_arg); - if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } - LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr; - LDKPublicKey their_node_id_ref; - CHECK((*env)->GetArrayLength(env, their_node_id) == 33); - (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form); - LDKSpliceAck msg_conv; - msg_conv.inner = untag_ptr(msg); - msg_conv.is_owned = ptr_is_owned(msg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv); - msg_conv.is_owned = false; - (this_arg_conv->handle_splice_ack)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv); -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1splice_1locked(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) { - void* this_arg_ptr = untag_ptr(this_arg); - if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } - LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr; - LDKPublicKey their_node_id_ref; - CHECK((*env)->GetArrayLength(env, their_node_id) == 33); - (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form); - LDKSpliceLocked msg_conv; - msg_conv.inner = untag_ptr(msg); - msg_conv.is_owned = ptr_is_owned(msg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv); - msg_conv.is_owned = false; - (this_arg_conv->handle_splice_locked)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv); -} - JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1tx_1add_1input(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) { void* this_arg_ptr = untag_ptr(this_arg); if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } @@ -19357,6 +20794,89 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_OffersMessageHandler_1 return ret_arr; } +typedef struct LDKNodeIdLookUp_JCalls { + atomic_size_t refcnt; + JavaVM *vm; + jweak o; + jmethodID next_node_id_meth; +} LDKNodeIdLookUp_JCalls; +static void LDKNodeIdLookUp_JCalls_free(void* this_arg) { + LDKNodeIdLookUp_JCalls *j_calls = (LDKNodeIdLookUp_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + JNIEnv *env; + jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); + } else { + DO_ASSERT(get_jenv_res == JNI_OK); + } + (*env)->DeleteWeakGlobalRef(env, j_calls->o); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); + } + FREE(j_calls); + } +} +LDKPublicKey next_node_id_LDKNodeIdLookUp_jcall(const void* this_arg, uint64_t short_channel_id) { + LDKNodeIdLookUp_JCalls *j_calls = (LDKNodeIdLookUp_JCalls*) this_arg; + JNIEnv *env; + jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); + } else { + DO_ASSERT(get_jenv_res == JNI_OK); + } + int64_t short_channel_id_conv = short_channel_id; + jobject obj = (*env)->NewLocalRef(env, j_calls->o); + CHECK(obj != NULL); + int8_tArray ret = (*env)->CallObjectMethod(env, obj, j_calls->next_node_id_meth, short_channel_id_conv); + if (UNLIKELY((*env)->ExceptionCheck(env))) { + (*env)->ExceptionDescribe(env); + (*env)->FatalError(env, "A call to next_node_id in LDKNodeIdLookUp from rust threw an exception."); + } + LDKPublicKey ret_ref; + CHECK((*env)->GetArrayLength(env, ret) == 33); + (*env)->GetByteArrayRegion(env, ret, 0, 33, ret_ref.compressed_form); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); + } + return ret_ref; +} +static void LDKNodeIdLookUp_JCalls_cloned(LDKNodeIdLookUp* new_obj) { + LDKNodeIdLookUp_JCalls *j_calls = (LDKNodeIdLookUp_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +} +static inline LDKNodeIdLookUp LDKNodeIdLookUp_init (JNIEnv *env, jclass clz, jobject o) { + jclass c = (*env)->GetObjectClass(env, o); + CHECK(c != NULL); + LDKNodeIdLookUp_JCalls *calls = MALLOC(sizeof(LDKNodeIdLookUp_JCalls), "LDKNodeIdLookUp_JCalls"); + atomic_init(&calls->refcnt, 1); + DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0); + calls->o = (*env)->NewWeakGlobalRef(env, o); + calls->next_node_id_meth = (*env)->GetMethodID(env, c, "next_node_id", "(J)[B"); + CHECK(calls->next_node_id_meth != NULL); + + LDKNodeIdLookUp ret = { + .this_arg = (void*) calls, + .next_node_id = next_node_id_LDKNodeIdLookUp_jcall, + .free = LDKNodeIdLookUp_JCalls_free, + }; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKNodeIdLookUp_1new(JNIEnv *env, jclass clz, jobject o) { + LDKNodeIdLookUp *res_ptr = MALLOC(sizeof(LDKNodeIdLookUp), "LDKNodeIdLookUp"); + *res_ptr = LDKNodeIdLookUp_init(env, clz, o); + return tag_ptr(res_ptr, true); +} +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NodeIdLookUp_1next_1node_1id(JNIEnv *env, jclass clz, int64_t this_arg, int64_t short_channel_id) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKNodeIdLookUp* this_arg_conv = (LDKNodeIdLookUp*)this_arg_ptr; + int8_tArray ret_arr = (*env)->NewByteArray(env, 33); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, (this_arg_conv->next_node_id)(this_arg_conv->this_arg, short_channel_id).compressed_form); + return ret_arr; +} + typedef struct LDKRoutingMessageHandler_JCalls { atomic_size_t refcnt; JavaVM *vm; @@ -21140,6 +22660,221 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1hash(JNIE return ret_conv; } +typedef struct LDKSignBolt12InvoiceFn_JCalls { + atomic_size_t refcnt; + JavaVM *vm; + jweak o; + jmethodID sign_invoice_meth; +} LDKSignBolt12InvoiceFn_JCalls; +static void LDKSignBolt12InvoiceFn_JCalls_free(void* this_arg) { + LDKSignBolt12InvoiceFn_JCalls *j_calls = (LDKSignBolt12InvoiceFn_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + JNIEnv *env; + jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); + } else { + DO_ASSERT(get_jenv_res == JNI_OK); + } + (*env)->DeleteWeakGlobalRef(env, j_calls->o); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); + } + FREE(j_calls); + } +} +LDKCResult_SchnorrSignatureNoneZ sign_invoice_LDKSignBolt12InvoiceFn_jcall(const void* this_arg, const LDKUnsignedBolt12Invoice * message) { + LDKSignBolt12InvoiceFn_JCalls *j_calls = (LDKSignBolt12InvoiceFn_JCalls*) this_arg; + JNIEnv *env; + jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); + } else { + DO_ASSERT(get_jenv_res == JNI_OK); + } + LDKUnsignedBolt12Invoice message_var = *message; + int64_t message_ref = 0; + message_var = UnsignedBolt12Invoice_clone(&message_var); + CHECK_INNER_FIELD_ACCESS_OR_NULL(message_var); + message_ref = tag_ptr(message_var.inner, message_var.is_owned); + jobject obj = (*env)->NewLocalRef(env, j_calls->o); + CHECK(obj != NULL); + uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->sign_invoice_meth, message_ref); + if (UNLIKELY((*env)->ExceptionCheck(env))) { + (*env)->ExceptionDescribe(env); + (*env)->FatalError(env, "A call to sign_invoice in LDKSignBolt12InvoiceFn from rust threw an exception."); + } + void* ret_ptr = untag_ptr(ret); + CHECK_ACCESS(ret_ptr); + LDKCResult_SchnorrSignatureNoneZ ret_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(ret_ptr); + FREE(untag_ptr(ret)); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); + } + return ret_conv; +} +static void LDKSignBolt12InvoiceFn_JCalls_cloned(LDKSignBolt12InvoiceFn* new_obj) { + LDKSignBolt12InvoiceFn_JCalls *j_calls = (LDKSignBolt12InvoiceFn_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +} +static inline LDKSignBolt12InvoiceFn LDKSignBolt12InvoiceFn_init (JNIEnv *env, jclass clz, jobject o) { + jclass c = (*env)->GetObjectClass(env, o); + CHECK(c != NULL); + LDKSignBolt12InvoiceFn_JCalls *calls = MALLOC(sizeof(LDKSignBolt12InvoiceFn_JCalls), "LDKSignBolt12InvoiceFn_JCalls"); + atomic_init(&calls->refcnt, 1); + DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0); + calls->o = (*env)->NewWeakGlobalRef(env, o); + calls->sign_invoice_meth = (*env)->GetMethodID(env, c, "sign_invoice", "(J)J"); + CHECK(calls->sign_invoice_meth != NULL); + + LDKSignBolt12InvoiceFn ret = { + .this_arg = (void*) calls, + .sign_invoice = sign_invoice_LDKSignBolt12InvoiceFn_jcall, + .free = LDKSignBolt12InvoiceFn_JCalls_free, + }; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKSignBolt12InvoiceFn_1new(JNIEnv *env, jclass clz, jobject o) { + LDKSignBolt12InvoiceFn *res_ptr = MALLOC(sizeof(LDKSignBolt12InvoiceFn), "LDKSignBolt12InvoiceFn"); + *res_ptr = LDKSignBolt12InvoiceFn_init(env, clz, o); + return tag_ptr(res_ptr, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignBolt12InvoiceFn_1sign_1invoice(JNIEnv *env, jclass clz, int64_t this_arg, int64_t message) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKSignBolt12InvoiceFn* this_arg_conv = (LDKSignBolt12InvoiceFn*)this_arg_ptr; + LDKUnsignedBolt12Invoice message_conv; + message_conv.inner = untag_ptr(message); + message_conv.is_owned = ptr_is_owned(message); + CHECK_INNER_FIELD_ACCESS_OR_NULL(message_conv); + message_conv.is_owned = false; + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = (this_arg_conv->sign_invoice)(this_arg_conv->this_arg, &message_conv); + return tag_ptr(ret_conv, true); +} + +typedef struct LDKSignInvoiceRequestFn_JCalls { + atomic_size_t refcnt; + JavaVM *vm; + jweak o; + jmethodID sign_invoice_request_meth; +} LDKSignInvoiceRequestFn_JCalls; +static void LDKSignInvoiceRequestFn_JCalls_free(void* this_arg) { + LDKSignInvoiceRequestFn_JCalls *j_calls = (LDKSignInvoiceRequestFn_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + JNIEnv *env; + jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); + } else { + DO_ASSERT(get_jenv_res == JNI_OK); + } + (*env)->DeleteWeakGlobalRef(env, j_calls->o); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); + } + FREE(j_calls); + } +} +LDKCResult_SchnorrSignatureNoneZ sign_invoice_request_LDKSignInvoiceRequestFn_jcall(const void* this_arg, const LDKUnsignedInvoiceRequest * message) { + LDKSignInvoiceRequestFn_JCalls *j_calls = (LDKSignInvoiceRequestFn_JCalls*) this_arg; + JNIEnv *env; + jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK); + } else { + DO_ASSERT(get_jenv_res == JNI_OK); + } + LDKUnsignedInvoiceRequest message_var = *message; + int64_t message_ref = 0; + message_var = UnsignedInvoiceRequest_clone(&message_var); + CHECK_INNER_FIELD_ACCESS_OR_NULL(message_var); + message_ref = tag_ptr(message_var.inner, message_var.is_owned); + jobject obj = (*env)->NewLocalRef(env, j_calls->o); + CHECK(obj != NULL); + uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->sign_invoice_request_meth, message_ref); + if (UNLIKELY((*env)->ExceptionCheck(env))) { + (*env)->ExceptionDescribe(env); + (*env)->FatalError(env, "A call to sign_invoice_request in LDKSignInvoiceRequestFn from rust threw an exception."); + } + void* ret_ptr = untag_ptr(ret); + CHECK_ACCESS(ret_ptr); + LDKCResult_SchnorrSignatureNoneZ ret_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(ret_ptr); + FREE(untag_ptr(ret)); + if (get_jenv_res == JNI_EDETACHED) { + DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK); + } + return ret_conv; +} +static void LDKSignInvoiceRequestFn_JCalls_cloned(LDKSignInvoiceRequestFn* new_obj) { + LDKSignInvoiceRequestFn_JCalls *j_calls = (LDKSignInvoiceRequestFn_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +} +static inline LDKSignInvoiceRequestFn LDKSignInvoiceRequestFn_init (JNIEnv *env, jclass clz, jobject o) { + jclass c = (*env)->GetObjectClass(env, o); + CHECK(c != NULL); + LDKSignInvoiceRequestFn_JCalls *calls = MALLOC(sizeof(LDKSignInvoiceRequestFn_JCalls), "LDKSignInvoiceRequestFn_JCalls"); + atomic_init(&calls->refcnt, 1); + DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0); + calls->o = (*env)->NewWeakGlobalRef(env, o); + calls->sign_invoice_request_meth = (*env)->GetMethodID(env, c, "sign_invoice_request", "(J)J"); + CHECK(calls->sign_invoice_request_meth != NULL); + + LDKSignInvoiceRequestFn ret = { + .this_arg = (void*) calls, + .sign_invoice_request = sign_invoice_request_LDKSignInvoiceRequestFn_jcall, + .free = LDKSignInvoiceRequestFn_JCalls_free, + }; + return ret; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKSignInvoiceRequestFn_1new(JNIEnv *env, jclass clz, jobject o) { + LDKSignInvoiceRequestFn *res_ptr = MALLOC(sizeof(LDKSignInvoiceRequestFn), "LDKSignInvoiceRequestFn"); + *res_ptr = LDKSignInvoiceRequestFn_init(env, clz, o); + return tag_ptr(res_ptr, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignInvoiceRequestFn_1sign_1invoice_1request(JNIEnv *env, jclass clz, int64_t this_arg, int64_t message) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKSignInvoiceRequestFn* this_arg_conv = (LDKSignInvoiceRequestFn*)this_arg_ptr; + LDKUnsignedInvoiceRequest message_conv; + message_conv.inner = untag_ptr(message); + message_conv.is_owned = ptr_is_owned(message); + CHECK_INNER_FIELD_ACCESS_OR_NULL(message_conv); + message_conv.is_owned = false; + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = (this_arg_conv->sign_invoice_request)(this_arg_conv->this_arg, &message_conv); + return tag_ptr(ret_conv, true); +} + +static jclass LDKSignError_Signing_class = NULL; +static jmethodID LDKSignError_Signing_meth = NULL; +static jclass LDKSignError_Verification_class = NULL; +static jmethodID LDKSignError_Verification_meth = NULL; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSignError_init (JNIEnv *env, jclass clz) { + LDKSignError_Signing_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSignError$Signing")); + CHECK(LDKSignError_Signing_class != NULL); + LDKSignError_Signing_meth = (*env)->GetMethodID(env, LDKSignError_Signing_class, "", "()V"); + CHECK(LDKSignError_Signing_meth != NULL); + LDKSignError_Verification_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSignError$Verification")); + CHECK(LDKSignError_Verification_class != NULL); + LDKSignError_Verification_meth = (*env)->GetMethodID(env, LDKSignError_Verification_class, "", "(Lorg/ldk/enums/Secp256k1Error;)V"); + CHECK(LDKSignError_Verification_meth != NULL); +} +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSignError_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { + LDKSignError *obj = (LDKSignError*)untag_ptr(ptr); + switch(obj->tag) { + case LDKSignError_Signing: { + return (*env)->NewObject(env, LDKSignError_Signing_class, LDKSignError_Signing_meth); + } + case LDKSignError_Verification: { + jclass verification_conv = LDKSecp256k1Error_to_java(env, obj->verification); + return (*env)->NewObject(env, LDKSignError_Verification_class, LDKSignError_Verification_meth, verification_conv); + } + default: abort(); + } +} static jclass LDKEffectiveCapacity_ExactLiquidity_class = NULL; static jmethodID LDKEffectiveCapacity_ExactLiquidity_meth = NULL; static jclass LDKEffectiveCapacity_AdvertisedMaxHTLC_class = NULL; @@ -21376,6 +23111,38 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Score_1write(JNIEnv *en return ret_arr; } +static jclass LDKIntroductionNode_NodeId_class = NULL; +static jmethodID LDKIntroductionNode_NodeId_meth = NULL; +static jclass LDKIntroductionNode_DirectedShortChannelId_class = NULL; +static jmethodID LDKIntroductionNode_DirectedShortChannelId_meth = NULL; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKIntroductionNode_init (JNIEnv *env, jclass clz) { + LDKIntroductionNode_NodeId_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKIntroductionNode$NodeId")); + CHECK(LDKIntroductionNode_NodeId_class != NULL); + LDKIntroductionNode_NodeId_meth = (*env)->GetMethodID(env, LDKIntroductionNode_NodeId_class, "", "([B)V"); + CHECK(LDKIntroductionNode_NodeId_meth != NULL); + LDKIntroductionNode_DirectedShortChannelId_class = + (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKIntroductionNode$DirectedShortChannelId")); + CHECK(LDKIntroductionNode_DirectedShortChannelId_class != NULL); + LDKIntroductionNode_DirectedShortChannelId_meth = (*env)->GetMethodID(env, LDKIntroductionNode_DirectedShortChannelId_class, "", "(Lorg/ldk/enums/Direction;J)V"); + CHECK(LDKIntroductionNode_DirectedShortChannelId_meth != NULL); +} +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKIntroductionNode_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) { + LDKIntroductionNode *obj = (LDKIntroductionNode*)untag_ptr(ptr); + switch(obj->tag) { + case LDKIntroductionNode_NodeId: { + int8_tArray node_id_arr = (*env)->NewByteArray(env, 33); + (*env)->SetByteArrayRegion(env, node_id_arr, 0, 33, obj->node_id.compressed_form); + return (*env)->NewObject(env, LDKIntroductionNode_NodeId_class, LDKIntroductionNode_NodeId_meth, node_id_arr); + } + case LDKIntroductionNode_DirectedShortChannelId: { + jclass _0_conv = LDKDirection_to_java(env, obj->directed_short_channel_id._0); + int64_t _1_conv = obj->directed_short_channel_id._1; + return (*env)->NewObject(env, LDKIntroductionNode_DirectedShortChannelId_class, LDKIntroductionNode_DirectedShortChannelId_meth, _0_conv, _1_conv); + } + default: abort(); + } +} typedef struct LDKCoinSelectionSource_JCalls { atomic_size_t refcnt; JavaVM *vm; @@ -21920,6 +23687,24 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BigEndianScalar_1new(JNIEnv return tag_ptr(ret_ref, true); } +static inline uint64_t BigEndianScalar_clone_ptr(LDKBigEndianScalar *NONNULL_PTR arg) { + LDKBigEndianScalar* ret_ref = MALLOC(sizeof(LDKBigEndianScalar), "LDKBigEndianScalar"); + *ret_ref = BigEndianScalar_clone(arg); + return tag_ptr(ret_ref, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BigEndianScalar_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKBigEndianScalar* arg_conv = (LDKBigEndianScalar*)untag_ptr(arg); + int64_t ret_conv = BigEndianScalar_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BigEndianScalar_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKBigEndianScalar* orig_conv = (LDKBigEndianScalar*)untag_ptr(orig); + LDKBigEndianScalar* ret_ref = MALLOC(sizeof(LDKBigEndianScalar), "LDKBigEndianScalar"); + *ret_ref = BigEndianScalar_clone(orig_conv); + return tag_ptr(ret_ref, true); +} + static inline uint64_t Bech32Error_clone_ptr(LDKBech32Error *NONNULL_PTR arg) { LDKBech32Error *ret_copy = MALLOC(sizeof(LDKBech32Error), "LDKBech32Error"); *ret_copy = Bech32Error_clone(arg); @@ -22086,6 +23871,116 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Str_1free(JNIEnv *env, jclass Str_free(dummy); } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u8Z_1free(JNIEnv *env, jclass clz, int8_tArray _res) { + LDKCVec_u8Z _res_ref; + _res_ref.datalen = (*env)->GetArrayLength(env, _res); + _res_ref.data = MALLOC(_res_ref.datalen, "LDKCVec_u8Z Bytes"); + (*env)->GetByteArrayRegion(env, _res, 0, _res_ref.datalen, _res_ref.data); + CVec_u8Z_free(_res_ref); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKRefundMaybeWithDerivedMetadataBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&o_conv); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* arg_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* orig_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKRefund o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = Refund_clone(&o_conv); + LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e); + LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_RefundBolt12SemanticErrorZ* o_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_RefundBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_RefundBolt12SemanticErrorZ _res_conv = *(LDKCResult_RefundBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_RefundBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_RefundBolt12SemanticErrorZ_clone_ptr(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_RefundBolt12SemanticErrorZ* arg_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_RefundBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_RefundBolt12SemanticErrorZ* orig_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1u64Z_1some(JNIEnv *env, jclass clz, int64_t o) { LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z"); *ret_copy = COption_u64Z_some(o); @@ -22392,14 +24287,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1ThirtyTwoBytesZ_1c return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u8Z_1free(JNIEnv *env, jclass clz, int8_tArray _res) { - LDKCVec_u8Z _res_ref; - _res_ref.datalen = (*env)->GetArrayLength(env, _res); - _res_ref.data = MALLOC(_res_ref.datalen, "LDKCVec_u8Z Bytes"); - (*env)->GetByteArrayRegion(env, _res, 0, _res_ref.datalen, _res_ref.data); - CVec_u8Z_free(_res_ref); -} - JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1CVec_1u8ZZ_1some(JNIEnv *env, jclass clz, int8_tArray o) { LDKCVec_u8Z o_ref; o_ref.datalen = (*env)->GetArrayLength(env, o); @@ -22608,6 +24495,156 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RecipientOnionFiel return tag_ptr(ret_conv, true); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKUnsignedBolt12Invoice o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = UnsignedBolt12Invoice_clone(&o_conv); + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e); + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* o_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ _res_conv = *(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* arg_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* orig_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKBolt12Invoice o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = Bolt12Invoice_clone(&o_conv); + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e); + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* o_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ _res_conv = *(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_Bolt12InvoiceBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* arg_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* orig_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) { + LDKSchnorrSignature o_ref; + CHECK((*env)->GetArrayLength(env, o) == 64); + (*env)->GetByteArrayRegion(env, o, 0, 64, o_ref.compact_form); + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = CResult_SchnorrSignatureNoneZ_ok(o_ref); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1err(JNIEnv *env, jclass clz) { + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = CResult_SchnorrSignatureNoneZ_err(); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_SchnorrSignatureNoneZ* o_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(o); + jboolean ret_conv = CResult_SchnorrSignatureNoneZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_SchnorrSignatureNoneZ _res_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_SchnorrSignatureNoneZ_free(_res_conv); +} + +static inline uint64_t CResult_SchnorrSignatureNoneZ_clone_ptr(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR arg) { + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = CResult_SchnorrSignatureNoneZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_SchnorrSignatureNoneZ* arg_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(arg); + int64_t ret_conv = CResult_SchnorrSignatureNoneZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_SchnorrSignatureNoneZ* orig_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(orig); + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = CResult_SchnorrSignatureNoneZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ThirtyTwoBytesZ_1free(JNIEnv *env, jclass clz, jobjectArray _res) { LDKCVec_ThirtyTwoBytesZ _res_constr; _res_constr.datalen = (*env)->GetArrayLength(env, _res); @@ -22681,6 +24718,100 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1CVec_1ThirtyTwoByt return ret_ref; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1some(JNIEnv *env, jclass clz, int64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKAmount o_conv = *(LDKAmount*)(o_ptr); + o_conv = Amount_clone((LDKAmount*)untag_ptr(o)); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = COption_AmountZ_some(o_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1none(JNIEnv *env, jclass clz) { + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = COption_AmountZ_none(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCOption_AmountZ _res_conv = *(LDKCOption_AmountZ*)(_res_ptr); + FREE(untag_ptr(_res)); + COption_AmountZ_free(_res_conv); +} + +static inline uint64_t COption_AmountZ_clone_ptr(LDKCOption_AmountZ *NONNULL_PTR arg) { + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = COption_AmountZ_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCOption_AmountZ* arg_conv = (LDKCOption_AmountZ*)untag_ptr(arg); + int64_t ret_conv = COption_AmountZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCOption_AmountZ* orig_conv = (LDKCOption_AmountZ*)untag_ptr(orig); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = COption_AmountZ_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1some(JNIEnv *env, jclass clz, int64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKQuantity o_conv = *(LDKQuantity*)(o_ptr); + o_conv = Quantity_clone((LDKQuantity*)untag_ptr(o)); + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = COption_QuantityZ_some(o_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1none(JNIEnv *env, jclass clz) { + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = COption_QuantityZ_none(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCOption_QuantityZ _res_conv = *(LDKCOption_QuantityZ*)(_res_ptr); + FREE(untag_ptr(_res)); + COption_QuantityZ_free(_res_conv); +} + +static inline uint64_t COption_QuantityZ_clone_ptr(LDKCOption_QuantityZ *NONNULL_PTR arg) { + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = COption_QuantityZ_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCOption_QuantityZ* arg_conv = (LDKCOption_QuantityZ*)untag_ptr(arg); + int64_t ret_conv = COption_QuantityZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCOption_QuantityZ* orig_conv = (LDKCOption_QuantityZ*)untag_ptr(orig); + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = COption_QuantityZ_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) { LDKThirtyTwoBytes o_ref; CHECK((*env)->GetArrayLength(env, o) == 32); @@ -23318,7 +25449,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1BigEndianScalarZ_1 void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); LDKBigEndianScalar o_conv = *(LDKBigEndianScalar*)(o_ptr); - // WARNING: we may need a move here but no clone is available for LDKBigEndianScalar + o_conv = BigEndianScalar_clone((LDKBigEndianScalar*)untag_ptr(o)); LDKCOption_BigEndianScalarZ *ret_copy = MALLOC(sizeof(LDKCOption_BigEndianScalarZ), "LDKCOption_BigEndianScalarZ"); *ret_copy = COption_BigEndianScalarZ_some(o_conv); int64_t ret_ref = tag_ptr(ret_copy, true); @@ -23426,54 +25557,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RecoverableSignatu return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) { - LDKSchnorrSignature o_ref; - CHECK((*env)->GetArrayLength(env, o) == 64); - (*env)->GetByteArrayRegion(env, o, 0, 64, o_ref.compact_form); - LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); - *ret_conv = CResult_SchnorrSignatureNoneZ_ok(o_ref); - return tag_ptr(ret_conv, true); -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1err(JNIEnv *env, jclass clz) { - LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); - *ret_conv = CResult_SchnorrSignatureNoneZ_err(); - return tag_ptr(ret_conv, true); -} - -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { - LDKCResult_SchnorrSignatureNoneZ* o_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(o); - jboolean ret_conv = CResult_SchnorrSignatureNoneZ_is_ok(o_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKCResult_SchnorrSignatureNoneZ _res_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(_res_ptr); - FREE(untag_ptr(_res)); - CResult_SchnorrSignatureNoneZ_free(_res_conv); -} - -static inline uint64_t CResult_SchnorrSignatureNoneZ_clone_ptr(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR arg) { - LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); - *ret_conv = CResult_SchnorrSignatureNoneZ_clone(arg); - return tag_ptr(ret_conv, true); -} -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { - LDKCResult_SchnorrSignatureNoneZ* arg_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(arg); - int64_t ret_conv = CResult_SchnorrSignatureNoneZ_clone_ptr(arg_conv); - return ret_conv; -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { - LDKCResult_SchnorrSignatureNoneZ* orig_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(orig); - LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); - *ret_conv = CResult_SchnorrSignatureNoneZ_clone(orig_conv); - return tag_ptr(ret_conv, true); -} - JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) { LDKECDSASignature o_ref; CHECK((*env)->GetArrayLength(env, o) == 64); @@ -23522,6 +25605,56 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNone return tag_ptr(ret_conv, true); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) { + LDKTransaction o_ref; + o_ref.datalen = (*env)->GetArrayLength(env, o); + o_ref.data = MALLOC(o_ref.datalen, "LDKTransaction Bytes"); + (*env)->GetByteArrayRegion(env, o, 0, o_ref.datalen, o_ref.data); + o_ref.data_is_owned = true; + LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); + *ret_conv = CResult_TransactionNoneZ_ok(o_ref); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1err(JNIEnv *env, jclass clz) { + LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); + *ret_conv = CResult_TransactionNoneZ_err(); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_TransactionNoneZ* o_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(o); + jboolean ret_conv = CResult_TransactionNoneZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_TransactionNoneZ _res_conv = *(LDKCResult_TransactionNoneZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_TransactionNoneZ_free(_res_conv); +} + +static inline uint64_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg) { + LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); + *ret_conv = CResult_TransactionNoneZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_TransactionNoneZ* arg_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(arg); + int64_t ret_conv = CResult_TransactionNoneZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_TransactionNoneZ* orig_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(orig); + LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); + *ret_conv = CResult_TransactionNoneZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1WriteableEcdsaChannelSignerDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -23982,56 +26115,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InMemorySignerDeco return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) { - LDKTransaction o_ref; - o_ref.datalen = (*env)->GetArrayLength(env, o); - o_ref.data = MALLOC(o_ref.datalen, "LDKTransaction Bytes"); - (*env)->GetByteArrayRegion(env, o, 0, o_ref.datalen, o_ref.data); - o_ref.data_is_owned = true; - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = CResult_TransactionNoneZ_ok(o_ref); - return tag_ptr(ret_conv, true); -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1err(JNIEnv *env, jclass clz) { - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = CResult_TransactionNoneZ_err(); - return tag_ptr(ret_conv, true); -} - -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { - LDKCResult_TransactionNoneZ* o_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(o); - jboolean ret_conv = CResult_TransactionNoneZ_is_ok(o_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKCResult_TransactionNoneZ _res_conv = *(LDKCResult_TransactionNoneZ*)(_res_ptr); - FREE(untag_ptr(_res)); - CResult_TransactionNoneZ_free(_res_conv); -} - -static inline uint64_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg) { - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = CResult_TransactionNoneZ_clone(arg); - return tag_ptr(ret_conv, true); -} -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { - LDKCResult_TransactionNoneZ* arg_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(arg); - int64_t ret_conv = CResult_TransactionNoneZ_clone_ptr(arg_conv); - return ret_conv; -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { - LDKCResult_TransactionNoneZ* orig_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(orig); - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = CResult_TransactionNoneZ_clone(orig_conv); - return tag_ptr(ret_conv, true); -} - JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1WriteableScoreZ_1some(JNIEnv *env, jclass clz, int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -25287,6 +27370,60 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScorerDe CResult_ProbabilisticScorerDecodeErrorZ_free(_res_conv); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKBestBlock o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = BestBlock_clone(&o_conv); + LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ"); + *ret_conv = CResult_BestBlockDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ"); + *ret_conv = CResult_BestBlockDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_BestBlockDecodeErrorZ* o_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_BestBlockDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_BestBlockDecodeErrorZ _res_conv = *(LDKCResult_BestBlockDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_BestBlockDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_BestBlockDecodeErrorZ_clone_ptr(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ"); + *ret_conv = CResult_BestBlockDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_BestBlockDecodeErrorZ* arg_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_BestBlockDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_BestBlockDecodeErrorZ* orig_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(orig); + LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ"); + *ret_conv = CResult_BestBlockDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + static inline uint64_t C2Tuple_usizeTransactionZ_clone_ptr(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR arg) { LDKC2Tuple_usizeTransactionZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ"); *ret_conv = C2Tuple_usizeTransactionZ_clone(arg); @@ -25471,81 +27608,86 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MonitorEventZ_1free(JNIE CVec_MonitorEventZ_free(_res_constr); } -static inline uint64_t C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR arg) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ"); - *ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(arg); +static inline uint64_t C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR arg) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ"); + *ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(arg); return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* arg_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(arg); - int64_t ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(arg_conv); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* arg_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(arg); + int64_t ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(arg_conv); return ret_conv; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* orig_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(orig); - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ"); - *ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(orig_conv); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* orig_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(orig); + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ"); + *ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(orig_conv); return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_tArray b, int8_tArray c) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b, int64_tArray c, int8_tArray d) { LDKOutPoint a_conv; a_conv.inner = untag_ptr(a); a_conv.is_owned = ptr_is_owned(a); CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); a_conv = OutPoint_clone(&a_conv); - LDKCVec_MonitorEventZ b_constr; - b_constr.datalen = (*env)->GetArrayLength(env, b); - if (b_constr.datalen > 0) - b_constr.data = MALLOC(b_constr.datalen * sizeof(LDKMonitorEvent), "LDKCVec_MonitorEventZ Elements"); + LDKChannelId b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv = ChannelId_clone(&b_conv); + LDKCVec_MonitorEventZ c_constr; + c_constr.datalen = (*env)->GetArrayLength(env, c); + if (c_constr.datalen > 0) + c_constr.data = MALLOC(c_constr.datalen * sizeof(LDKMonitorEvent), "LDKCVec_MonitorEventZ Elements"); else - b_constr.data = NULL; - int64_t* b_vals = (*env)->GetLongArrayElements (env, b, NULL); - for (size_t o = 0; o < b_constr.datalen; o++) { - int64_t b_conv_14 = b_vals[o]; - void* b_conv_14_ptr = untag_ptr(b_conv_14); - CHECK_ACCESS(b_conv_14_ptr); - LDKMonitorEvent b_conv_14_conv = *(LDKMonitorEvent*)(b_conv_14_ptr); - b_conv_14_conv = MonitorEvent_clone((LDKMonitorEvent*)untag_ptr(b_conv_14)); - b_constr.data[o] = b_conv_14_conv; - } - (*env)->ReleaseLongArrayElements(env, b, b_vals, 0); - LDKPublicKey c_ref; - CHECK((*env)->GetArrayLength(env, c) == 33); - (*env)->GetByteArrayRegion(env, c, 0, 33, c_ref.compressed_form); - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ"); - *ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(a_conv, b_constr, c_ref); - return tag_ptr(ret_conv, true); -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + c_constr.data = NULL; + int64_t* c_vals = (*env)->GetLongArrayElements (env, c, NULL); + for (size_t o = 0; o < c_constr.datalen; o++) { + int64_t c_conv_14 = c_vals[o]; + void* c_conv_14_ptr = untag_ptr(c_conv_14); + CHECK_ACCESS(c_conv_14_ptr); + LDKMonitorEvent c_conv_14_conv = *(LDKMonitorEvent*)(c_conv_14_ptr); + c_conv_14_conv = MonitorEvent_clone((LDKMonitorEvent*)untag_ptr(c_conv_14)); + c_constr.data[o] = c_conv_14_conv; + } + (*env)->ReleaseLongArrayElements(env, c, c_vals, 0); + LDKPublicKey d_ref; + CHECK((*env)->GetArrayLength(env, d) == 33); + (*env)->GetByteArrayRegion(env, d, 0, 33, d_ref.compressed_form); + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ"); + *ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new(a_conv, b_conv, c_constr, d_ref); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1free(JNIEnv *env, jclass clz, int64_t _res) { if (!ptr_is_owned(_res)) return; void* _res_ptr = untag_ptr(_res); CHECK_ACCESS(_res_ptr); - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ _res_conv = *(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)(_res_ptr); + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ _res_conv = *(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)(_res_ptr); FREE(untag_ptr(_res)); - C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(_res_conv); + C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free(_res_conv); } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) { - LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ _res_constr; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) { + LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ _res_constr; _res_constr.datalen = (*env)->GetArrayLength(env, _res); if (_res_constr.datalen > 0) - _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ Elements"); + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ Elements"); else _res_constr.data = NULL; int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL); - for (size_t x = 0; x < _res_constr.datalen; x++) { - int64_t _res_conv_49 = _res_vals[x]; - void* _res_conv_49_ptr = untag_ptr(_res_conv_49); - CHECK_ACCESS(_res_conv_49_ptr); - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ _res_conv_49_conv = *(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)(_res_conv_49_ptr); - FREE(untag_ptr(_res_conv_49)); - _res_constr.data[x] = _res_conv_49_conv; + for (size_t f = 0; f < _res_constr.datalen; f++) { + int64_t _res_conv_57 = _res_vals[f]; + void* _res_conv_57_ptr = untag_ptr(_res_conv_57); + CHECK_ACCESS(_res_conv_57_ptr); + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ _res_conv_57_conv = *(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)(_res_conv_57_ptr); + FREE(untag_ptr(_res_conv_57)); + _res_constr.data[f] = _res_conv_57_conv; } (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0); - CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free(_res_constr); + CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free(_res_constr); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InitFeaturesDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { @@ -25926,6 +28068,225 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTypeFeature return tag_ptr(ret_conv, true); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKOfferId o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = OfferId_clone(&o_conv); + LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ"); + *ret_conv = CResult_OfferIdDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ"); + *ret_conv = CResult_OfferIdDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_OfferIdDecodeErrorZ* o_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_OfferIdDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_OfferIdDecodeErrorZ _res_conv = *(LDKCResult_OfferIdDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_OfferIdDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_OfferIdDecodeErrorZ_clone_ptr(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ"); + *ret_conv = CResult_OfferIdDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_OfferIdDecodeErrorZ* arg_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_OfferIdDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_OfferIdDecodeErrorZ* orig_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(orig); + LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ"); + *ret_conv = CResult_OfferIdDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz) { + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = CResult_NoneBolt12SemanticErrorZ_ok(); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e); + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = CResult_NoneBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_NoneBolt12SemanticErrorZ* o_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_NoneBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_NoneBolt12SemanticErrorZ _res_conv = *(LDKCResult_NoneBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_NoneBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_NoneBolt12SemanticErrorZ_clone_ptr(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_NoneBolt12SemanticErrorZ* arg_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_NoneBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_NoneBolt12SemanticErrorZ* orig_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKOffer o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = Offer_clone(&o_conv); + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e); + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_OfferBolt12SemanticErrorZ* o_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_OfferBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_OfferBolt12SemanticErrorZ _res_conv = *(LDKCResult_OfferBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_OfferBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_OfferBolt12SemanticErrorZ_clone_ptr(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_OfferBolt12SemanticErrorZ* arg_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_OfferBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_OfferBolt12SemanticErrorZ* orig_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKInvoiceRequestWithDerivedPayerIdBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e); + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(_res_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKInvoiceRequestWithExplicitPayerIdBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e); + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(_res_conv); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12ParseErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { LDKOffer o_conv; o_conv.inner = untag_ptr(o); @@ -25981,55 +28342,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12ParseEr return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) { - LDKPublicKey o_ref; - CHECK((*env)->GetArrayLength(env, o) == 33); - (*env)->GetByteArrayRegion(env, o, 0, 33, o_ref.compressed_form); - LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); - *ret_conv = CResult_PublicKeySecp256k1ErrorZ_ok(o_ref); - return tag_ptr(ret_conv, true); -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { - LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e); - LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); - *ret_conv = CResult_PublicKeySecp256k1ErrorZ_err(e_conv); - return tag_ptr(ret_conv, true); -} - -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { - LDKCResult_PublicKeySecp256k1ErrorZ* o_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(o); - jboolean ret_conv = CResult_PublicKeySecp256k1ErrorZ_is_ok(o_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKCResult_PublicKeySecp256k1ErrorZ _res_conv = *(LDKCResult_PublicKeySecp256k1ErrorZ*)(_res_ptr); - FREE(untag_ptr(_res)); - CResult_PublicKeySecp256k1ErrorZ_free(_res_conv); -} - -static inline uint64_t CResult_PublicKeySecp256k1ErrorZ_clone_ptr(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR arg) { - LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); - *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(arg); - return tag_ptr(ret_conv, true); -} -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { - LDKCResult_PublicKeySecp256k1ErrorZ* arg_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(arg); - int64_t ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone_ptr(arg_conv); - return ret_conv; -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { - LDKCResult_PublicKeySecp256k1ErrorZ* orig_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(orig); - LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); - *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(orig_conv); - return tag_ptr(ret_conv, true); -} - JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { LDKNodeId o_conv; o_conv.inner = untag_ptr(o); @@ -26084,6 +28396,55 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ return tag_ptr(ret_conv, true); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) { + LDKPublicKey o_ref; + CHECK((*env)->GetArrayLength(env, o) == 33); + (*env)->GetByteArrayRegion(env, o, 0, 33, o_ref.compressed_form); + LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); + *ret_conv = CResult_PublicKeySecp256k1ErrorZ_ok(o_ref); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { + LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e); + LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); + *ret_conv = CResult_PublicKeySecp256k1ErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_PublicKeySecp256k1ErrorZ* o_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_PublicKeySecp256k1ErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_PublicKeySecp256k1ErrorZ _res_conv = *(LDKCResult_PublicKeySecp256k1ErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_PublicKeySecp256k1ErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_PublicKeySecp256k1ErrorZ_clone_ptr(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR arg) { + LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); + *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_PublicKeySecp256k1ErrorZ* arg_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_PublicKeySecp256k1ErrorZ* orig_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(orig); + LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); + *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1NetworkUpdateZ_1some(JNIEnv *env, jclass clz, int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -26869,6 +29230,34 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1CVec_1SocketAddres return ret_ref; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_u64ShortChannelIdErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u64ShortChannelIdErrorZ), "LDKCResult_u64ShortChannelIdErrorZ"); + *ret_conv = CResult_u64ShortChannelIdErrorZ_ok(o); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { + LDKShortChannelIdError e_conv = LDKShortChannelIdError_from_java(env, e); + LDKCResult_u64ShortChannelIdErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u64ShortChannelIdErrorZ), "LDKCResult_u64ShortChannelIdErrorZ"); + *ret_conv = CResult_u64ShortChannelIdErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_u64ShortChannelIdErrorZ* o_conv = (LDKCResult_u64ShortChannelIdErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_u64ShortChannelIdErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_u64ShortChannelIdErrorZ _res_conv = *(LDKCResult_u64ShortChannelIdErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_u64ShortChannelIdErrorZ_free(_res_conv); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoInboundHTLCErrZ_1ok(JNIEnv *env, jclass clz, int64_t o) { LDKPendingHTLCInfo o_conv; o_conv.inner = untag_ptr(o); @@ -26885,8 +29274,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoInb e_conv.inner = untag_ptr(e); e_conv.is_owned = ptr_is_owned(e); CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv); - // WARNING: we need a move here but no clone is available for LDKInboundHTLCErr - + e_conv = InboundHTLCErr_clone(&e_conv); LDKCResult_PendingHTLCInfoInboundHTLCErrZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoInboundHTLCErrZ), "LDKCResult_PendingHTLCInfoInboundHTLCErrZ"); *ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_err(e_conv); return tag_ptr(ret_conv, true); @@ -26907,6 +29295,24 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoInboun CResult_PendingHTLCInfoInboundHTLCErrZ_free(_res_conv); } +static inline uint64_t CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR arg) { + LDKCResult_PendingHTLCInfoInboundHTLCErrZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoInboundHTLCErrZ), "LDKCResult_PendingHTLCInfoInboundHTLCErrZ"); + *ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoInboundHTLCErrZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_PendingHTLCInfoInboundHTLCErrZ* arg_conv = (LDKCResult_PendingHTLCInfoInboundHTLCErrZ*)untag_ptr(arg); + int64_t ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoInboundHTLCErrZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_PendingHTLCInfoInboundHTLCErrZ* orig_conv = (LDKCResult_PendingHTLCInfoInboundHTLCErrZ*)untag_ptr(orig); + LDKCResult_PendingHTLCInfoInboundHTLCErrZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoInboundHTLCErrZ), "LDKCResult_PendingHTLCInfoInboundHTLCErrZ"); + *ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1HTLCOutputInCommitmentZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) { LDKCVec_HTLCOutputInCommitmentZ _res_constr; _res_constr.datalen = (*env)->GetArrayLength(env, _res); @@ -27146,6 +29552,53 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1UtxoZNoneZ_1 return tag_ptr(ret_conv, true); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1some(JNIEnv *env, jclass clz, int64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKPaymentContext o_conv = *(LDKPaymentContext*)(o_ptr); + o_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(o)); + LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ"); + *ret_copy = COption_PaymentContextZ_some(o_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1none(JNIEnv *env, jclass clz) { + LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ"); + *ret_copy = COption_PaymentContextZ_none(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCOption_PaymentContextZ _res_conv = *(LDKCOption_PaymentContextZ*)(_res_ptr); + FREE(untag_ptr(_res)); + COption_PaymentContextZ_free(_res_conv); +} + +static inline uint64_t COption_PaymentContextZ_clone_ptr(LDKCOption_PaymentContextZ *NONNULL_PTR arg) { + LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ"); + *ret_copy = COption_PaymentContextZ_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCOption_PaymentContextZ* arg_conv = (LDKCOption_PaymentContextZ*)untag_ptr(arg); + int64_t ret_conv = COption_PaymentContextZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCOption_PaymentContextZ* orig_conv = (LDKCOption_PaymentContextZ*)untag_ptr(orig); + LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ"); + *ret_copy = COption_PaymentContextZ_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + static inline uint64_t C2Tuple_u64u16Z_clone_ptr(LDKC2Tuple_u64u16Z *NONNULL_PTR arg) { LDKC2Tuple_u64u16Z* ret_conv = MALLOC(sizeof(LDKC2Tuple_u64u16Z), "LDKC2Tuple_u64u16Z"); *ret_conv = C2Tuple_u64u16Z_clone(arg); @@ -27270,55 +29723,57 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1ChannelShutdownSta return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) { - LDKThirtyTwoBytes o_ref; - CHECK((*env)->GetArrayLength(env, o) == 32); - (*env)->GetByteArrayRegion(env, o, 0, 32, o_ref.data); - LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); - *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_ok(o_ref); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKChannelId o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = ChannelId_clone(&o_conv); + LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ"); + *ret_conv = CResult_ChannelIdAPIErrorZ_ok(o_conv); return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) { void* e_ptr = untag_ptr(e); CHECK_ACCESS(e_ptr); LDKAPIError e_conv = *(LDKAPIError*)(e_ptr); e_conv = APIError_clone((LDKAPIError*)untag_ptr(e)); - LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); - *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_err(e_conv); + LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ"); + *ret_conv = CResult_ChannelIdAPIErrorZ_err(e_conv); return tag_ptr(ret_conv, true); } -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* o_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(o); - jboolean ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_is_ok(o_conv); +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_ChannelIdAPIErrorZ* o_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_ChannelIdAPIErrorZ_is_ok(o_conv); return ret_conv; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { if (!ptr_is_owned(_res)) return; void* _res_ptr = untag_ptr(_res); CHECK_ACCESS(_res_ptr); - LDKCResult_ThirtyTwoBytesAPIErrorZ _res_conv = *(LDKCResult_ThirtyTwoBytesAPIErrorZ*)(_res_ptr); + LDKCResult_ChannelIdAPIErrorZ _res_conv = *(LDKCResult_ChannelIdAPIErrorZ*)(_res_ptr); FREE(untag_ptr(_res)); - CResult_ThirtyTwoBytesAPIErrorZ_free(_res_conv); + CResult_ChannelIdAPIErrorZ_free(_res_conv); } -static inline uint64_t CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR arg) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); - *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(arg); +static inline uint64_t CResult_ChannelIdAPIErrorZ_clone_ptr(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR arg) { + LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ"); + *ret_conv = CResult_ChannelIdAPIErrorZ_clone(arg); return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* arg_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(arg); - int64_t ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(arg_conv); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_ChannelIdAPIErrorZ* arg_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_ChannelIdAPIErrorZ_clone_ptr(arg_conv); return ret_conv; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* orig_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(orig); - LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); - *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(orig_conv); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_ChannelIdAPIErrorZ* orig_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(orig); + LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ"); + *ret_conv = CResult_ChannelIdAPIErrorZ_clone(orig_conv); return tag_ptr(ret_conv, true); } @@ -27715,63 +30170,136 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1C2Tuple_1Thi return tag_ptr(ret_conv, true); } -static inline uint64_t C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR arg) { - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKC2Tuple_ThirtyTwoBytesPublicKeyZ"); - *ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(arg); +static inline uint64_t C2Tuple_ChannelIdPublicKeyZ_clone_ptr(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR arg) { + LDKC2Tuple_ChannelIdPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKC2Tuple_ChannelIdPublicKeyZ"); + *ret_conv = C2Tuple_ChannelIdPublicKeyZ_clone(arg); return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* arg_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(arg); - int64_t ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(arg_conv); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKC2Tuple_ChannelIdPublicKeyZ* arg_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(arg); + int64_t ret_conv = C2Tuple_ChannelIdPublicKeyZ_clone_ptr(arg_conv); return ret_conv; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* orig_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(orig); - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKC2Tuple_ThirtyTwoBytesPublicKeyZ"); - *ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(orig_conv); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKC2Tuple_ChannelIdPublicKeyZ* orig_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(orig); + LDKC2Tuple_ChannelIdPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKC2Tuple_ChannelIdPublicKeyZ"); + *ret_conv = C2Tuple_ChannelIdPublicKeyZ_clone(orig_conv); return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int8_tArray b) { - LDKThirtyTwoBytes a_ref; - CHECK((*env)->GetArrayLength(env, a) == 32); - (*env)->GetByteArrayRegion(env, a, 0, 32, a_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1new(JNIEnv *env, jclass clz, int64_t a, int8_tArray b) { + LDKChannelId a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = ChannelId_clone(&a_conv); LDKPublicKey b_ref; CHECK((*env)->GetArrayLength(env, b) == 33); (*env)->GetByteArrayRegion(env, b, 0, 33, b_ref.compressed_form); - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKC2Tuple_ThirtyTwoBytesPublicKeyZ"); - *ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_new(a_ref, b_ref); + LDKC2Tuple_ChannelIdPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKC2Tuple_ChannelIdPublicKeyZ"); + *ret_conv = C2Tuple_ChannelIdPublicKeyZ_new(a_conv, b_ref); return tag_ptr(ret_conv, true); } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1free(JNIEnv *env, jclass clz, int64_t _res) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1free(JNIEnv *env, jclass clz, int64_t _res) { if (!ptr_is_owned(_res)) return; void* _res_ptr = untag_ptr(_res); CHECK_ACCESS(_res_ptr); - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ _res_conv = *(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)(_res_ptr); + LDKC2Tuple_ChannelIdPublicKeyZ _res_conv = *(LDKC2Tuple_ChannelIdPublicKeyZ*)(_res_ptr); FREE(untag_ptr(_res)); - C2Tuple_ThirtyTwoBytesPublicKeyZ_free(_res_conv); + C2Tuple_ChannelIdPublicKeyZ_free(_res_conv); } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1ThirtyTwoBytesPublicKeyZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) { - LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ _res_constr; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1ChannelIdPublicKeyZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) { + LDKCVec_C2Tuple_ChannelIdPublicKeyZZ _res_constr; _res_constr.datalen = (*env)->GetArrayLength(env, _res); if (_res_constr.datalen > 0) - _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ Elements"); + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKCVec_C2Tuple_ChannelIdPublicKeyZZ Elements"); else _res_constr.data = NULL; int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL); - for (size_t j = 0; j < _res_constr.datalen; j++) { - int64_t _res_conv_35 = _res_vals[j]; - void* _res_conv_35_ptr = untag_ptr(_res_conv_35); - CHECK_ACCESS(_res_conv_35_ptr); - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ _res_conv_35_conv = *(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)(_res_conv_35_ptr); - FREE(untag_ptr(_res_conv_35)); - _res_constr.data[j] = _res_conv_35_conv; + for (size_t e = 0; e < _res_constr.datalen; e++) { + int64_t _res_conv_30 = _res_vals[e]; + void* _res_conv_30_ptr = untag_ptr(_res_conv_30); + CHECK_ACCESS(_res_conv_30_ptr); + LDKC2Tuple_ChannelIdPublicKeyZ _res_conv_30_conv = *(LDKC2Tuple_ChannelIdPublicKeyZ*)(_res_conv_30_ptr); + FREE(untag_ptr(_res_conv_30)); + _res_constr.data[e] = _res_conv_30_conv; + } + (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0); + CVec_C2Tuple_ChannelIdPublicKeyZZ_free(_res_constr); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelIdZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) { + LDKCVec_ChannelIdZ _res_constr; + _res_constr.datalen = (*env)->GetArrayLength(env, _res); + if (_res_constr.datalen > 0) + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKChannelId), "LDKCVec_ChannelIdZ Elements"); + else + _res_constr.data = NULL; + int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL); + for (size_t l = 0; l < _res_constr.datalen; l++) { + int64_t _res_conv_11 = _res_vals[l]; + LDKChannelId _res_conv_11_conv; + _res_conv_11_conv.inner = untag_ptr(_res_conv_11); + _res_conv_11_conv.is_owned = ptr_is_owned(_res_conv_11); + CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_11_conv); + _res_constr.data[l] = _res_conv_11_conv; } (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0); - CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_free(_res_constr); + CVec_ChannelIdZ_free(_res_constr); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKOfferWithDerivedMetadataBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = OfferWithDerivedMetadataBuilder_clone(&o_conv); + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e); + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* arg_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* orig_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1StrZ_1some(JNIEnv *env, jclass clz, jstring o) { @@ -27818,52 +30346,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1StrZ_1clone(JNIEnv return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz) { - LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); - *ret_conv = CResult_NoneBolt12SemanticErrorZ_ok(); - return tag_ptr(ret_conv, true); -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { - LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e); - LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); - *ret_conv = CResult_NoneBolt12SemanticErrorZ_err(e_conv); - return tag_ptr(ret_conv, true); -} - -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { - LDKCResult_NoneBolt12SemanticErrorZ* o_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(o); - jboolean ret_conv = CResult_NoneBolt12SemanticErrorZ_is_ok(o_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKCResult_NoneBolt12SemanticErrorZ _res_conv = *(LDKCResult_NoneBolt12SemanticErrorZ*)(_res_ptr); - FREE(untag_ptr(_res)); - CResult_NoneBolt12SemanticErrorZ_free(_res_conv); -} - -static inline uint64_t CResult_NoneBolt12SemanticErrorZ_clone_ptr(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR arg) { - LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); - *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(arg); - return tag_ptr(ret_conv, true); -} -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { - LDKCResult_NoneBolt12SemanticErrorZ* arg_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(arg); - int64_t ret_conv = CResult_NoneBolt12SemanticErrorZ_clone_ptr(arg_conv); - return ret_conv; -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { - LDKCResult_NoneBolt12SemanticErrorZ* orig_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(orig); - LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); - *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(orig_conv); - return tag_ptr(ret_conv, true); -} - JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -27913,6 +30395,58 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwo return tag_ptr(ret_conv, true); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) { + LDKThirtyTwoBytes o_ref; + CHECK((*env)->GetArrayLength(env, o) == 32); + (*env)->GetByteArrayRegion(env, o, 0, 32, o_ref.data); + LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); + *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_ok(o_ref); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKAPIError e_conv = *(LDKAPIError*)(e_ptr); + e_conv = APIError_clone((LDKAPIError*)untag_ptr(e)); + LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); + *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* o_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_ThirtyTwoBytesAPIErrorZ _res_conv = *(LDKCResult_ThirtyTwoBytesAPIErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_ThirtyTwoBytesAPIErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR arg) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); + *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* arg_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* orig_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(orig); + LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); + *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1OffersMessageZ_1some(JNIEnv *env, jclass clz, int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -29235,25 +31769,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1CommitmentTransactionZ_1 CVec_CommitmentTransactionZ_free(_res_constr); } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TransactionZ_1free(JNIEnv *env, jclass clz, jobjectArray _res) { - LDKCVec_TransactionZ _res_constr; - _res_constr.datalen = (*env)->GetArrayLength(env, _res); - if (_res_constr.datalen > 0) - _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKTransaction), "LDKCVec_TransactionZ Elements"); - else - _res_constr.data = NULL; - for (size_t i = 0; i < _res_constr.datalen; i++) { - int8_tArray _res_conv_8 = (*env)->GetObjectArrayElement(env, _res, i); - LDKTransaction _res_conv_8_ref; - _res_conv_8_ref.datalen = (*env)->GetArrayLength(env, _res_conv_8); - _res_conv_8_ref.data = MALLOC(_res_conv_8_ref.datalen, "LDKTransaction Bytes"); - (*env)->GetByteArrayRegion(env, _res_conv_8, 0, _res_conv_8_ref.datalen, _res_conv_8_ref.data); - _res_conv_8_ref.data_is_owned = true; - _res_constr.data[i] = _res_conv_8_ref; - } - CVec_TransactionZ_free(_res_constr); -} - static inline uint64_t C2Tuple_u32TxOutZ_clone_ptr(LDKC2Tuple_u32TxOutZ *NONNULL_PTR arg) { LDKC2Tuple_u32TxOutZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ"); *ret_conv = C2Tuple_u32TxOutZ_clone(arg); @@ -29954,64 +32469,24 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1SocketAddressZ_1cl return ret_ref; } -static inline uint64_t C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR arg) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ"); - *ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(arg); - return tag_ptr(ret_conv, true); -} -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* arg_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(arg); - int64_t ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(arg_conv); - return ret_conv; -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* orig_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(orig); - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ"); - *ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(orig_conv); - return tag_ptr(ret_conv, true); -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_t b) { - LDKPublicKey a_ref; - CHECK((*env)->GetArrayLength(env, a) == 33); - (*env)->GetByteArrayRegion(env, a, 0, 33, a_ref.compressed_form); - void* b_ptr = untag_ptr(b); - CHECK_ACCESS(b_ptr); - LDKCOption_SocketAddressZ b_conv = *(LDKCOption_SocketAddressZ*)(b_ptr); - b_conv = COption_SocketAddressZ_clone((LDKCOption_SocketAddressZ*)untag_ptr(b)); - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ"); - *ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_new(a_ref, b_conv); - return tag_ptr(ret_conv, true); -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1free(JNIEnv *env, jclass clz, int64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ _res_conv = *(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)(_res_ptr); - FREE(untag_ptr(_res)); - C2Tuple_PublicKeyCOption_SocketAddressZZ_free(_res_conv); -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1PublicKeyCOption_1SocketAddressZZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) { - LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ _res_constr; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1PeerDetailsZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) { + LDKCVec_PeerDetailsZ _res_constr; _res_constr.datalen = (*env)->GetArrayLength(env, _res); if (_res_constr.datalen > 0) - _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ Elements"); + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKPeerDetails), "LDKCVec_PeerDetailsZ Elements"); else _res_constr.data = NULL; int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL); - for (size_t r = 0; r < _res_constr.datalen; r++) { - int64_t _res_conv_43 = _res_vals[r]; - void* _res_conv_43_ptr = untag_ptr(_res_conv_43); - CHECK_ACCESS(_res_conv_43_ptr); - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ _res_conv_43_conv = *(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)(_res_conv_43_ptr); - FREE(untag_ptr(_res_conv_43)); - _res_constr.data[r] = _res_conv_43_conv; + for (size_t n = 0; n < _res_constr.datalen; n++) { + int64_t _res_conv_13 = _res_vals[n]; + LDKPeerDetails _res_conv_13_conv; + _res_conv_13_conv.inner = untag_ptr(_res_conv_13); + _res_conv_13_conv.is_owned = ptr_is_owned(_res_conv_13); + CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_13_conv); + _res_constr.data[n] = _res_conv_13_conv; } (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0); - CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_free(_res_constr); + CVec_PeerDetailsZ_free(_res_constr); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) { @@ -30453,6 +32928,108 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwo return tag_ptr(ret_conv, true); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKUnsignedInvoiceRequest o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = UnsignedInvoiceRequest_clone(&o_conv); + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e); + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* o_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ _res_conv = *(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* arg_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* orig_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKInvoiceRequest o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = InvoiceRequest_clone(&o_conv); + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e); + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceRequestBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceRequestBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* arg_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* orig_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1SecretKeyZ_1some(JNIEnv *env, jclass clz, int8_tArray o) { LDKSecretKey o_ref; CHECK((*env)->GetArrayLength(env, o) == 32); @@ -30499,6 +33076,40 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1SecretKeyZ_1clone( return ret_ref; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKInvoiceWithExplicitSigningPubkeyBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e); + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free(_res_conv); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1VerifiedInvoiceRequestNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) { LDKVerifiedInvoiceRequest o_conv; o_conv.inner = untag_ptr(o); @@ -30549,6 +33160,94 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1VerifiedInvoiceReq return tag_ptr(ret_conv, true); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKInvoiceWithDerivedSigningPubkeyBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e); + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(_res_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKInvoiceRequestFields o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = InvoiceRequestFields_clone(&o_conv); + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ"); + *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ"); + *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* o_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceRequestFieldsDecodeErrorZ _res_conv = *(LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceRequestFieldsDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ"); + *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* arg_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* orig_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(orig); + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ"); + *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_COption_1NoneZ_1some(JNIEnv *env, jclass clz) { jclass ret_conv = LDKCOption_NoneZ_to_java(env, COption_NoneZ_some()); return ret_conv; @@ -30583,6 +33282,52 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1WitnessZ_1free(JNIEnv *e CVec_WitnessZ_free(_res_constr); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1some(JNIEnv *env, jclass clz, int8_tArray o) { + LDKECDSASignature o_ref; + CHECK((*env)->GetArrayLength(env, o) == 64); + (*env)->GetByteArrayRegion(env, o, 0, 64, o_ref.compact_form); + LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ"); + *ret_copy = COption_ECDSASignatureZ_some(o_ref); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1none(JNIEnv *env, jclass clz) { + LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ"); + *ret_copy = COption_ECDSASignatureZ_none(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCOption_ECDSASignatureZ _res_conv = *(LDKCOption_ECDSASignatureZ*)(_res_ptr); + FREE(untag_ptr(_res)); + COption_ECDSASignatureZ_free(_res_conv); +} + +static inline uint64_t COption_ECDSASignatureZ_clone_ptr(LDKCOption_ECDSASignatureZ *NONNULL_PTR arg) { + LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ"); + *ret_copy = COption_ECDSASignatureZ_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCOption_ECDSASignatureZ* arg_conv = (LDKCOption_ECDSASignatureZ*)untag_ptr(arg); + int64_t ret_conv = COption_ECDSASignatureZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCOption_ECDSASignatureZ* orig_conv = (LDKCOption_ECDSASignatureZ*)untag_ptr(orig); + LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ"); + *ret_copy = COption_ECDSASignatureZ_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1i64Z_1some(JNIEnv *env, jclass clz, int64_t o) { LDKCOption_i64Z *ret_copy = MALLOC(sizeof(LDKCOption_i64Z), "LDKCOption_i64Z"); *ret_copy = COption_i64Z_some(o); @@ -34496,6 +37241,25 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownScriptInva return tag_ptr(ret_conv, true); } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TransactionZ_1free(JNIEnv *env, jclass clz, jobjectArray _res) { + LDKCVec_TransactionZ _res_constr; + _res_constr.datalen = (*env)->GetArrayLength(env, _res); + if (_res_constr.datalen > 0) + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKTransaction), "LDKCVec_TransactionZ Elements"); + else + _res_constr.data = NULL; + for (size_t i = 0; i < _res_constr.datalen; i++) { + int8_tArray _res_conv_8 = (*env)->GetObjectArrayElement(env, _res, i); + LDKTransaction _res_conv_8_ref; + _res_conv_8_ref.datalen = (*env)->GetArrayLength(env, _res_conv_8); + _res_conv_8_ref.data = MALLOC(_res_conv_8_ref.datalen, "LDKTransaction Bytes"); + (*env)->GetByteArrayRegion(env, _res_conv_8, 0, _res_conv_8_ref.datalen, _res_conv_8_ref.data); + _res_conv_8_ref.data_is_owned = true; + _res_constr.data[i] = _res_conv_8_ref; + } + CVec_TransactionZ_free(_res_constr); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentPurposeDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -36008,6 +38772,60 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UntrustedStringDec return tag_ptr(ret_conv, true); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKChannelId o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = ChannelId_clone(&o_conv); + LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ"); + *ret_conv = CResult_ChannelIdDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ"); + *ret_conv = CResult_ChannelIdDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_ChannelIdDecodeErrorZ* o_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_ChannelIdDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_ChannelIdDecodeErrorZ _res_conv = *(LDKCResult_ChannelIdDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_ChannelIdDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_ChannelIdDecodeErrorZ_clone_ptr(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ"); + *ret_conv = CResult_ChannelIdDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_ChannelIdDecodeErrorZ* arg_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_ChannelIdDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_ChannelIdDecodeErrorZ* orig_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(orig); + LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ"); + *ret_conv = CResult_ChannelIdDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + static inline uint64_t C2Tuple__u832u16Z_clone_ptr(LDKC2Tuple__u832u16Z *NONNULL_PTR arg) { LDKC2Tuple__u832u16Z* ret_conv = MALLOC(sizeof(LDKC2Tuple__u832u16Z), "LDKC2Tuple__u832u16Z"); *ret_conv = C2Tuple__u832u16Z_clone(arg); @@ -36152,6 +38970,268 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentConstraints return tag_ptr(ret_conv, true); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKPaymentContext o_conv = *(LDKPaymentContext*)(o_ptr); + o_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(o)); + LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ"); + *ret_conv = CResult_PaymentContextDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ"); + *ret_conv = CResult_PaymentContextDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_PaymentContextDecodeErrorZ* o_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_PaymentContextDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_PaymentContextDecodeErrorZ _res_conv = *(LDKCResult_PaymentContextDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_PaymentContextDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_PaymentContextDecodeErrorZ_clone_ptr(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ"); + *ret_conv = CResult_PaymentContextDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_PaymentContextDecodeErrorZ* arg_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_PaymentContextDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_PaymentContextDecodeErrorZ* orig_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(orig); + LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ"); + *ret_conv = CResult_PaymentContextDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKUnknownPaymentContext o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = UnknownPaymentContext_clone(&o_conv); + LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ"); + *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ"); + *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* o_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_UnknownPaymentContextDecodeErrorZ _res_conv = *(LDKCResult_UnknownPaymentContextDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_UnknownPaymentContextDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ"); + *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* arg_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* orig_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(orig); + LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ"); + *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKBolt12OfferContext o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = Bolt12OfferContext_clone(&o_conv); + LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* o_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_Bolt12OfferContextDecodeErrorZ _res_conv = *(LDKCResult_Bolt12OfferContextDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_Bolt12OfferContextDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* arg_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* orig_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(orig); + LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKBolt12RefundContext o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = Bolt12RefundContext_clone(&o_conv); + LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* o_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_Bolt12RefundContextDecodeErrorZ _res_conv = *(LDKCResult_Bolt12RefundContextDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_Bolt12RefundContextDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* arg_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* orig_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(orig); + LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1ok(JNIEnv *env, jclass clz, jstring o) { + LDKStr o_conv = java_to_owned_str(env, o); + LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ"); + *ret_conv = CResult_StrSecp256k1ErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { + LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e); + LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ"); + *ret_conv = CResult_StrSecp256k1ErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_StrSecp256k1ErrorZ* o_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_StrSecp256k1ErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_StrSecp256k1ErrorZ _res_conv = *(LDKCResult_StrSecp256k1ErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_StrSecp256k1ErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_StrSecp256k1ErrorZ_clone_ptr(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR arg) { + LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ"); + *ret_conv = CResult_StrSecp256k1ErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_StrSecp256k1ErrorZ* arg_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_StrSecp256k1ErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_StrSecp256k1ErrorZ* orig_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(orig); + LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ"); + *ret_conv = CResult_StrSecp256k1ErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + static inline uint64_t C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR arg) { LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ"); *ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(arg); @@ -36247,53 +39327,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwo return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1ok(JNIEnv *env, jclass clz, jstring o) { - LDKStr o_conv = java_to_owned_str(env, o); - LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ"); - *ret_conv = CResult_StrSecp256k1ErrorZ_ok(o_conv); - return tag_ptr(ret_conv, true); -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1err(JNIEnv *env, jclass clz, jclass e) { - LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e); - LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ"); - *ret_conv = CResult_StrSecp256k1ErrorZ_err(e_conv); - return tag_ptr(ret_conv, true); -} - -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { - LDKCResult_StrSecp256k1ErrorZ* o_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(o); - jboolean ret_conv = CResult_StrSecp256k1ErrorZ_is_ok(o_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKCResult_StrSecp256k1ErrorZ _res_conv = *(LDKCResult_StrSecp256k1ErrorZ*)(_res_ptr); - FREE(untag_ptr(_res)); - CResult_StrSecp256k1ErrorZ_free(_res_conv); -} - -static inline uint64_t CResult_StrSecp256k1ErrorZ_clone_ptr(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR arg) { - LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ"); - *ret_conv = CResult_StrSecp256k1ErrorZ_clone(arg); - return tag_ptr(ret_conv, true); -} -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { - LDKCResult_StrSecp256k1ErrorZ* arg_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(arg); - int64_t ret_conv = CResult_StrSecp256k1ErrorZ_clone_ptr(arg_conv); - return ret_conv; -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { - LDKCResult_StrSecp256k1ErrorZ* orig_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(orig); - LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ"); - *ret_conv = CResult_StrSecp256k1ErrorZ_clone(orig_conv); - return tag_ptr(ret_conv, true); -} - JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutUtxoLookupErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -36424,6 +39457,24 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKeyOni CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_free(_res_conv); } +static inline uint64_t CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ *NONNULL_PTR arg) { + LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ"); + *ret_conv = CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKeyOnionMessageCOption_1CVec_1SocketAddressZZZSendErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* arg_conv = (LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKeyOnionMessageCOption_1CVec_1SocketAddressZZZSendErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* orig_conv = (LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ*)untag_ptr(orig); + LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ"); + *ret_conv = CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PeeledOnionNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -36455,6 +39506,24 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PeeledOnionNoneZ_1fre CResult_PeeledOnionNoneZ_free(_res_conv); } +static inline uint64_t CResult_PeeledOnionNoneZ_clone_ptr(LDKCResult_PeeledOnionNoneZ *NONNULL_PTR arg) { + LDKCResult_PeeledOnionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PeeledOnionNoneZ), "LDKCResult_PeeledOnionNoneZ"); + *ret_conv = CResult_PeeledOnionNoneZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PeeledOnionNoneZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_PeeledOnionNoneZ* arg_conv = (LDKCResult_PeeledOnionNoneZ*)untag_ptr(arg); + int64_t ret_conv = CResult_PeeledOnionNoneZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PeeledOnionNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_PeeledOnionNoneZ* orig_conv = (LDKCResult_PeeledOnionNoneZ*)untag_ptr(orig); + LDKCResult_PeeledOnionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PeeledOnionNoneZ), "LDKCResult_PeeledOnionNoneZ"); + *ret_conv = CResult_PeeledOnionNoneZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SendSuccessSendErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -36490,6 +39559,24 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SendSuccessSendErrorZ CResult_SendSuccessSendErrorZ_free(_res_conv); } +static inline uint64_t CResult_SendSuccessSendErrorZ_clone_ptr(LDKCResult_SendSuccessSendErrorZ *NONNULL_PTR arg) { + LDKCResult_SendSuccessSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SendSuccessSendErrorZ), "LDKCResult_SendSuccessSendErrorZ"); + *ret_conv = CResult_SendSuccessSendErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SendSuccessSendErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_SendSuccessSendErrorZ* arg_conv = (LDKCResult_SendSuccessSendErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_SendSuccessSendErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SendSuccessSendErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_SendSuccessSendErrorZ* orig_conv = (LDKCResult_SendSuccessSendErrorZ*)untag_ptr(orig); + LDKCResult_SendSuccessSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SendSuccessSendErrorZ), "LDKCResult_SendSuccessSendErrorZ"); + *ret_conv = CResult_SendSuccessSendErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BlindedPathNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) { LDKBlindedPath o_conv; o_conv.inner = untag_ptr(o); @@ -36771,6 +39858,261 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceErrorDecode return tag_ptr(ret_conv, true); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKTrackedSpendableOutput o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = TrackedSpendableOutput_clone(&o_conv); + LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ"); + *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ"); + *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* o_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_TrackedSpendableOutputDecodeErrorZ _res_conv = *(LDKCResult_TrackedSpendableOutputDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_TrackedSpendableOutputDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ"); + *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* arg_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* orig_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(orig); + LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ"); + *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKOutputSpendStatus o_conv = *(LDKOutputSpendStatus*)(o_ptr); + o_conv = OutputSpendStatus_clone((LDKOutputSpendStatus*)untag_ptr(o)); + LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ"); + *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ"); + *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_OutputSpendStatusDecodeErrorZ* o_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_OutputSpendStatusDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_OutputSpendStatusDecodeErrorZ _res_conv = *(LDKCResult_OutputSpendStatusDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_OutputSpendStatusDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ"); + *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCResult_OutputSpendStatusDecodeErrorZ* arg_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCResult_OutputSpendStatusDecodeErrorZ* orig_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(orig); + LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ"); + *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1some(JNIEnv *env, jclass clz, int64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKFilter o_conv = *(LDKFilter*)(o_ptr); + if (o_conv.free == LDKFilter_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFilter_JCalls_cloned(&o_conv); + } + LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ"); + *ret_copy = COption_FilterZ_some(o_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1none(JNIEnv *env, jclass clz) { + LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ"); + *ret_copy = COption_FilterZ_none(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCOption_FilterZ _res_conv = *(LDKCOption_FilterZ*)(_res_ptr); + FREE(untag_ptr(_res)); + COption_FilterZ_free(_res_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TrackedSpendableOutputZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) { + LDKCVec_TrackedSpendableOutputZ _res_constr; + _res_constr.datalen = (*env)->GetArrayLength(env, _res); + if (_res_constr.datalen > 0) + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKTrackedSpendableOutput), "LDKCVec_TrackedSpendableOutputZ Elements"); + else + _res_constr.data = NULL; + int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL); + for (size_t y = 0; y < _res_constr.datalen; y++) { + int64_t _res_conv_24 = _res_vals[y]; + LDKTrackedSpendableOutput _res_conv_24_conv; + _res_conv_24_conv.inner = untag_ptr(_res_conv_24); + _res_conv_24_conv.is_owned = ptr_is_owned(_res_conv_24); + CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_24_conv); + _res_constr.data[y] = _res_conv_24_conv; + } + (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0); + CVec_TrackedSpendableOutputZ_free(_res_constr); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKOutputSweeper o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + // WARNING: we need a move here but no clone is available for LDKOutputSweeper + + LDKCResult_OutputSweeperDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSweeperDecodeErrorZ), "LDKCResult_OutputSweeperDecodeErrorZ"); + *ret_conv = CResult_OutputSweeperDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_OutputSweeperDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSweeperDecodeErrorZ), "LDKCResult_OutputSweeperDecodeErrorZ"); + *ret_conv = CResult_OutputSweeperDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_OutputSweeperDecodeErrorZ* o_conv = (LDKCResult_OutputSweeperDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_OutputSweeperDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_OutputSweeperDecodeErrorZ _res_conv = *(LDKCResult_OutputSweeperDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_OutputSweeperDecodeErrorZ_free(_res_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKBestBlock a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = BestBlock_clone(&a_conv); + LDKOutputSweeper b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + // WARNING: we need a move here but no clone is available for LDKOutputSweeper + + LDKC2Tuple_BestBlockOutputSweeperZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BestBlockOutputSweeperZ), "LDKC2Tuple_BestBlockOutputSweeperZ"); + *ret_conv = C2Tuple_BestBlockOutputSweeperZ_new(a_conv, b_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKC2Tuple_BestBlockOutputSweeperZ _res_conv = *(LDKC2Tuple_BestBlockOutputSweeperZ*)(_res_ptr); + FREE(untag_ptr(_res)); + C2Tuple_BestBlockOutputSweeperZ_free(_res_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKC2Tuple_BestBlockOutputSweeperZ o_conv = *(LDKC2Tuple_BestBlockOutputSweeperZ*)(o_ptr); + // WARNING: we may need a move here but no clone is available for LDKC2Tuple_BestBlockOutputSweeperZ + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ), "LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ"); + *ret_conv = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ), "LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ"); + *ret_conv = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) { + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* o_conv = (LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ _res_conv = *(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free(_res_conv); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) { LDKDelayedPaymentBasepoint o_conv; o_conv.inner = untag_ptr(o); @@ -37095,36 +40437,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecod return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1some(JNIEnv *env, jclass clz, int64_t o) { - void* o_ptr = untag_ptr(o); - CHECK_ACCESS(o_ptr); - LDKFilter o_conv = *(LDKFilter*)(o_ptr); - if (o_conv.free == LDKFilter_JCalls_free) { - // If this_arg is a JCalls struct, then we need to increment the refcnt in it. - LDKFilter_JCalls_cloned(&o_conv); - } - LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ"); - *ret_copy = COption_FilterZ_some(o_conv); - int64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1none(JNIEnv *env, jclass clz) { - LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ"); - *ret_copy = COption_FilterZ_none(); - int64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1free(JNIEnv *env, jclass clz, int64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKCOption_FilterZ _res_conv = *(LDKCOption_FilterZ*)(_res_ptr); - FREE(untag_ptr(_res)); - COption_FilterZ_free(_res_conv); -} - JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) { LDKLockedChannelMonitor o_conv; o_conv.inner = untag_ptr(o); @@ -37158,24 +40470,67 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorN CResult_LockedChannelMonitorNoneZ_free(_res_conv); } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1OutPointZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) { - LDKCVec_OutPointZ _res_constr; +static inline uint64_t C2Tuple_OutPointChannelIdZ_clone_ptr(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR arg) { + LDKC2Tuple_OutPointChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ"); + *ret_conv = C2Tuple_OutPointChannelIdZ_clone(arg); + return tag_ptr(ret_conv, true); +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKC2Tuple_OutPointChannelIdZ* arg_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(arg); + int64_t ret_conv = C2Tuple_OutPointChannelIdZ_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKC2Tuple_OutPointChannelIdZ* orig_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(orig); + LDKC2Tuple_OutPointChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ"); + *ret_conv = C2Tuple_OutPointChannelIdZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKOutPoint a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = OutPoint_clone(&a_conv); + LDKChannelId b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv = ChannelId_clone(&b_conv); + LDKC2Tuple_OutPointChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ"); + *ret_conv = C2Tuple_OutPointChannelIdZ_new(a_conv, b_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1free(JNIEnv *env, jclass clz, int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKC2Tuple_OutPointChannelIdZ _res_conv = *(LDKC2Tuple_OutPointChannelIdZ*)(_res_ptr); + FREE(untag_ptr(_res)); + C2Tuple_OutPointChannelIdZ_free(_res_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1OutPointChannelIdZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) { + LDKCVec_C2Tuple_OutPointChannelIdZZ _res_constr; _res_constr.datalen = (*env)->GetArrayLength(env, _res); if (_res_constr.datalen > 0) - _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKOutPoint), "LDKCVec_OutPointZ Elements"); + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKCVec_C2Tuple_OutPointChannelIdZZ Elements"); else _res_constr.data = NULL; int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL); - for (size_t k = 0; k < _res_constr.datalen; k++) { - int64_t _res_conv_10 = _res_vals[k]; - LDKOutPoint _res_conv_10_conv; - _res_conv_10_conv.inner = untag_ptr(_res_conv_10); - _res_conv_10_conv.is_owned = ptr_is_owned(_res_conv_10); - CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_10_conv); - _res_constr.data[k] = _res_conv_10_conv; + for (size_t d = 0; d < _res_constr.datalen; d++) { + int64_t _res_conv_29 = _res_vals[d]; + void* _res_conv_29_ptr = untag_ptr(_res_conv_29); + CHECK_ACCESS(_res_conv_29_ptr); + LDKC2Tuple_OutPointChannelIdZ _res_conv_29_conv = *(LDKC2Tuple_OutPointChannelIdZ*)(_res_conv_29_ptr); + FREE(untag_ptr(_res_conv_29)); + _res_constr.data[d] = _res_conv_29_conv; } (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0); - CVec_OutPointZ_free(_res_constr); + CVec_C2Tuple_OutPointChannelIdZZ_free(_res_constr); } JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MonitorUpdateIdZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) { @@ -37675,6 +41030,19 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TransactionU16LenLimite return ret_arr; } +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TransactionU16LenLimited_1as_1transaction(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKTransactionU16LenLimited this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKTransaction ret_var = TransactionU16LenLimited_as_transaction(&this_arg_conv); + int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen); + (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data); + Transaction_free(ret_var); + return ret_arr; +} + JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TransactionU16LenLimited_1write(JNIEnv *env, jclass clz, int64_t obj) { LDKTransactionU16LenLimited obj_conv; obj_conv.inner = untag_ptr(obj); @@ -37907,6 +41275,55 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorUpdatingPersister_1a return tag_ptr(ret_ret, true); } +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKShortChannelIdError* orig_conv = (LDKShortChannelIdError*)untag_ptr(orig); + jclass ret_conv = LDKShortChannelIdError_to_java(env, ShortChannelIdError_clone(orig_conv)); + return ret_conv; +} + +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1block_1overflow(JNIEnv *env, jclass clz) { + jclass ret_conv = LDKShortChannelIdError_to_java(env, ShortChannelIdError_block_overflow()); + return ret_conv; +} + +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1tx_1index_1overflow(JNIEnv *env, jclass clz) { + jclass ret_conv = LDKShortChannelIdError_to_java(env, ShortChannelIdError_tx_index_overflow()); + return ret_conv; +} + +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1vout_1index_1overflow(JNIEnv *env, jclass clz) { + jclass ret_conv = LDKShortChannelIdError_to_java(env, ShortChannelIdError_vout_index_overflow()); + return ret_conv; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKShortChannelIdError* a_conv = (LDKShortChannelIdError*)untag_ptr(a); + LDKShortChannelIdError* b_conv = (LDKShortChannelIdError*)untag_ptr(b); + jboolean ret_conv = ShortChannelIdError_eq(a_conv, b_conv); + return ret_conv; +} + +JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_block_1from_1scid(JNIEnv *env, jclass clz, int64_t short_channel_id) { + int32_t ret_conv = block_from_scid(short_channel_id); + return ret_conv; +} + +JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_tx_1index_1from_1scid(JNIEnv *env, jclass clz, int64_t short_channel_id) { + int32_t ret_conv = tx_index_from_scid(short_channel_id); + return ret_conv; +} + +JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_vout_1from_1scid(JNIEnv *env, jclass clz, int64_t short_channel_id) { + int16_t ret_conv = vout_from_scid(short_channel_id); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_scid_1from_1parts(JNIEnv *env, jclass clz, int64_t block, int64_t tx_index, int64_t vout_index) { + LDKCResult_u64ShortChannelIdErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u64ShortChannelIdErrorZ), "LDKCResult_u64ShortChannelIdErrorZ"); + *ret_conv = scid_from_parts(block, tx_index, vout_index); + return tag_ptr(ret_conv, true); +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UntrustedString_1free(JNIEnv *env, jclass clz, int64_t this_obj) { LDKUntrustedString this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -38063,53 +41480,647 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PrintableString_1new(JNIEnv return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { - if (!ptr_is_owned(this_ptr)) return; - void* this_ptr_ptr = untag_ptr(this_ptr); - CHECK_ACCESS(this_ptr_ptr); - LDKFutureCallback this_ptr_conv = *(LDKFutureCallback*)(this_ptr_ptr); - FREE(untag_ptr(this_ptr)); - FutureCallback_free(this_ptr_conv); -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Future_1free(JNIEnv *env, jclass clz, int64_t this_obj) { - LDKFuture this_obj_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKTrackedSpendableOutput this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); this_obj_conv.is_owned = ptr_is_owned(this_obj); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - Future_free(this_obj_conv); + TrackedSpendableOutput_free(this_obj_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1get_1descriptor(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKSpendableOutputDescriptor *ret_copy = MALLOC(sizeof(LDKSpendableOutputDescriptor), "LDKSpendableOutputDescriptor"); + *ret_copy = TrackedSpendableOutput_get_descriptor(&this_ptr_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1set_1descriptor(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKSpendableOutputDescriptor val_conv = *(LDKSpendableOutputDescriptor*)(val_ptr); + val_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(val)); + TrackedSpendableOutput_set_descriptor(&this_ptr_conv, val_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelId ret_var = TrackedSpendableOutput_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TrackedSpendableOutput_set_channel_id(&this_ptr_conv, val_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1get_1status(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = TrackedSpendableOutput_get_status(&this_ptr_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1set_1status(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKOutputSpendStatus val_conv = *(LDKOutputSpendStatus*)(val_ptr); + val_conv = OutputSpendStatus_clone((LDKOutputSpendStatus*)untag_ptr(val)); + TrackedSpendableOutput_set_status(&this_ptr_conv, val_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1new(JNIEnv *env, jclass clz, int64_t descriptor_arg, int64_t channel_id_arg, int64_t status_arg) { + void* descriptor_arg_ptr = untag_ptr(descriptor_arg); + CHECK_ACCESS(descriptor_arg_ptr); + LDKSpendableOutputDescriptor descriptor_arg_conv = *(LDKSpendableOutputDescriptor*)(descriptor_arg_ptr); + descriptor_arg_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptor_arg)); + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + void* status_arg_ptr = untag_ptr(status_arg); + CHECK_ACCESS(status_arg_ptr); + LDKOutputSpendStatus status_arg_conv = *(LDKOutputSpendStatus*)(status_arg_ptr); + status_arg_conv = OutputSpendStatus_clone((LDKOutputSpendStatus*)untag_ptr(status_arg)); + LDKTrackedSpendableOutput ret_var = TrackedSpendableOutput_new(descriptor_arg_conv, channel_id_arg_conv, status_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -static inline uint64_t Future_clone_ptr(LDKFuture *NONNULL_PTR arg) { - LDKFuture ret_var = Future_clone(arg); +static inline uint64_t TrackedSpendableOutput_clone_ptr(LDKTrackedSpendableOutput *NONNULL_PTR arg) { + LDKTrackedSpendableOutput ret_var = TrackedSpendableOutput_clone(arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Future_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { - LDKFuture arg_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKTrackedSpendableOutput arg_conv; arg_conv.inner = untag_ptr(arg); arg_conv.is_owned = ptr_is_owned(arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); arg_conv.is_owned = false; - int64_t ret_conv = Future_clone_ptr(&arg_conv); + int64_t ret_conv = TrackedSpendableOutput_clone_ptr(&arg_conv); return ret_conv; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Future_1clone(JNIEnv *env, jclass clz, int64_t orig) { - LDKFuture orig_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKTrackedSpendableOutput orig_conv; orig_conv.inner = untag_ptr(orig); orig_conv.is_owned = ptr_is_owned(orig); CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); orig_conv.is_owned = false; - LDKFuture ret_var = Future_clone(&orig_conv); + LDKTrackedSpendableOutput ret_var = TrackedSpendableOutput_clone(&orig_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKTrackedSpendableOutput a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKTrackedSpendableOutput b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = TrackedSpendableOutput_eq(&a_conv, &b_conv); + return ret_conv; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1is_1spent_1in(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray tx) { + LDKTrackedSpendableOutput this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKTransaction tx_ref; + tx_ref.datalen = (*env)->GetArrayLength(env, tx); + tx_ref.data = MALLOC(tx_ref.datalen, "LDKTransaction Bytes"); + (*env)->GetByteArrayRegion(env, tx, 0, tx_ref.datalen, tx_ref.data); + tx_ref.data_is_owned = true; + jboolean ret_conv = TrackedSpendableOutput_is_spent_in(&this_arg_conv, tx_ref); + return ret_conv; +} + +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1write(JNIEnv *env, jclass clz, int64_t obj) { + LDKTrackedSpendableOutput obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = TrackedSpendableOutput_write(&obj_conv); + int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen); + (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1read(JNIEnv *env, jclass clz, int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = (*env)->GetArrayLength(env, ser); + ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL); + LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ"); + *ret_conv = TrackedSpendableOutput_read(ser_ref); + (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKOutputSpendStatus this_ptr_conv = *(LDKOutputSpendStatus*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + OutputSpendStatus_free(this_ptr_conv); +} + +static inline uint64_t OutputSpendStatus_clone_ptr(LDKOutputSpendStatus *NONNULL_PTR arg) { + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = OutputSpendStatus_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKOutputSpendStatus* arg_conv = (LDKOutputSpendStatus*)untag_ptr(arg); + int64_t ret_conv = OutputSpendStatus_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKOutputSpendStatus* orig_conv = (LDKOutputSpendStatus*)untag_ptr(orig); + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = OutputSpendStatus_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1pending_1initial_1broadcast(JNIEnv *env, jclass clz, int64_t delayed_until_height) { + void* delayed_until_height_ptr = untag_ptr(delayed_until_height); + CHECK_ACCESS(delayed_until_height_ptr); + LDKCOption_u32Z delayed_until_height_conv = *(LDKCOption_u32Z*)(delayed_until_height_ptr); + delayed_until_height_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(delayed_until_height)); + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = OutputSpendStatus_pending_initial_broadcast(delayed_until_height_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1pending_1first_1confirmation(JNIEnv *env, jclass clz, int8_tArray first_broadcast_hash, int32_t latest_broadcast_height, int8_tArray latest_spending_tx) { + LDKThirtyTwoBytes first_broadcast_hash_ref; + CHECK((*env)->GetArrayLength(env, first_broadcast_hash) == 32); + (*env)->GetByteArrayRegion(env, first_broadcast_hash, 0, 32, first_broadcast_hash_ref.data); + LDKTransaction latest_spending_tx_ref; + latest_spending_tx_ref.datalen = (*env)->GetArrayLength(env, latest_spending_tx); + latest_spending_tx_ref.data = MALLOC(latest_spending_tx_ref.datalen, "LDKTransaction Bytes"); + (*env)->GetByteArrayRegion(env, latest_spending_tx, 0, latest_spending_tx_ref.datalen, latest_spending_tx_ref.data); + latest_spending_tx_ref.data_is_owned = true; + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = OutputSpendStatus_pending_first_confirmation(first_broadcast_hash_ref, latest_broadcast_height, latest_spending_tx_ref); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1pending_1threshold_1confirmations(JNIEnv *env, jclass clz, int8_tArray first_broadcast_hash, int32_t latest_broadcast_height, int8_tArray latest_spending_tx, int32_t confirmation_height, int8_tArray confirmation_hash) { + LDKThirtyTwoBytes first_broadcast_hash_ref; + CHECK((*env)->GetArrayLength(env, first_broadcast_hash) == 32); + (*env)->GetByteArrayRegion(env, first_broadcast_hash, 0, 32, first_broadcast_hash_ref.data); + LDKTransaction latest_spending_tx_ref; + latest_spending_tx_ref.datalen = (*env)->GetArrayLength(env, latest_spending_tx); + latest_spending_tx_ref.data = MALLOC(latest_spending_tx_ref.datalen, "LDKTransaction Bytes"); + (*env)->GetByteArrayRegion(env, latest_spending_tx, 0, latest_spending_tx_ref.datalen, latest_spending_tx_ref.data); + latest_spending_tx_ref.data_is_owned = true; + LDKThirtyTwoBytes confirmation_hash_ref; + CHECK((*env)->GetArrayLength(env, confirmation_hash) == 32); + (*env)->GetByteArrayRegion(env, confirmation_hash, 0, 32, confirmation_hash_ref.data); + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = OutputSpendStatus_pending_threshold_confirmations(first_broadcast_hash_ref, latest_broadcast_height, latest_spending_tx_ref, confirmation_height, confirmation_hash_ref); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKOutputSpendStatus* a_conv = (LDKOutputSpendStatus*)untag_ptr(a); + LDKOutputSpendStatus* b_conv = (LDKOutputSpendStatus*)untag_ptr(b); + jboolean ret_conv = OutputSpendStatus_eq(a_conv, b_conv); + return ret_conv; +} + +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1write(JNIEnv *env, jclass clz, int64_t obj) { + LDKOutputSpendStatus* obj_conv = (LDKOutputSpendStatus*)untag_ptr(obj); + LDKCVec_u8Z ret_var = OutputSpendStatus_write(obj_conv); + int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen); + (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1read(JNIEnv *env, jclass clz, int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = (*env)->GetArrayLength(env, ser); + ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL); + LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ"); + *ret_conv = OutputSpendStatus_read(ser_ref); + (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKOutputSweeper this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + OutputSweeper_free(this_obj_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1new(JNIEnv *env, jclass clz, int64_t best_block, int64_t broadcaster, int64_t fee_estimator, int64_t chain_data_source, int64_t output_spender, int64_t change_destination_source, int64_t kv_store, int64_t logger) { + LDKBestBlock best_block_conv; + best_block_conv.inner = untag_ptr(best_block); + best_block_conv.is_owned = ptr_is_owned(best_block); + CHECK_INNER_FIELD_ACCESS_OR_NULL(best_block_conv); + best_block_conv = BestBlock_clone(&best_block_conv); + void* broadcaster_ptr = untag_ptr(broadcaster); + CHECK_ACCESS(broadcaster_ptr); + LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(broadcaster_ptr); + if (broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKBroadcasterInterface_JCalls_cloned(&broadcaster_conv); + } + void* fee_estimator_ptr = untag_ptr(fee_estimator); + CHECK_ACCESS(fee_estimator_ptr); + LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(fee_estimator_ptr); + if (fee_estimator_conv.free == LDKFeeEstimator_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFeeEstimator_JCalls_cloned(&fee_estimator_conv); + } + void* chain_data_source_ptr = untag_ptr(chain_data_source); + CHECK_ACCESS(chain_data_source_ptr); + LDKCOption_FilterZ chain_data_source_conv = *(LDKCOption_FilterZ*)(chain_data_source_ptr); + // WARNING: we may need a move here but no clone is available for LDKCOption_FilterZ + if (chain_data_source_conv.tag == LDKCOption_FilterZ_Some) { + // Manually implement clone for Java trait instances + if (chain_data_source_conv.some.free == LDKFilter_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFilter_JCalls_cloned(&chain_data_source_conv.some); + } + } + void* output_spender_ptr = untag_ptr(output_spender); + CHECK_ACCESS(output_spender_ptr); + LDKOutputSpender output_spender_conv = *(LDKOutputSpender*)(output_spender_ptr); + if (output_spender_conv.free == LDKOutputSpender_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKOutputSpender_JCalls_cloned(&output_spender_conv); + } + void* change_destination_source_ptr = untag_ptr(change_destination_source); + CHECK_ACCESS(change_destination_source_ptr); + LDKChangeDestinationSource change_destination_source_conv = *(LDKChangeDestinationSource*)(change_destination_source_ptr); + if (change_destination_source_conv.free == LDKChangeDestinationSource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKChangeDestinationSource_JCalls_cloned(&change_destination_source_conv); + } + void* kv_store_ptr = untag_ptr(kv_store); + CHECK_ACCESS(kv_store_ptr); + LDKKVStore kv_store_conv = *(LDKKVStore*)(kv_store_ptr); + if (kv_store_conv.free == LDKKVStore_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKKVStore_JCalls_cloned(&kv_store_conv); + } + void* logger_ptr = untag_ptr(logger); + CHECK_ACCESS(logger_ptr); + LDKLogger logger_conv = *(LDKLogger*)(logger_ptr); + if (logger_conv.free == LDKLogger_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKLogger_JCalls_cloned(&logger_conv); + } + LDKOutputSweeper ret_var = OutputSweeper_new(best_block_conv, broadcaster_conv, fee_estimator_conv, chain_data_source_conv, output_spender_conv, change_destination_source_conv, kv_store_conv, logger_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1track_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray output_descriptors, int64_t channel_id, jboolean exclude_static_outputs, int64_t delay_until_height) { + LDKOutputSweeper this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_SpendableOutputDescriptorZ output_descriptors_constr; + output_descriptors_constr.datalen = (*env)->GetArrayLength(env, output_descriptors); + if (output_descriptors_constr.datalen > 0) + output_descriptors_constr.data = MALLOC(output_descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements"); + else + output_descriptors_constr.data = NULL; + int64_t* output_descriptors_vals = (*env)->GetLongArrayElements (env, output_descriptors, NULL); + for (size_t b = 0; b < output_descriptors_constr.datalen; b++) { + int64_t output_descriptors_conv_27 = output_descriptors_vals[b]; + void* output_descriptors_conv_27_ptr = untag_ptr(output_descriptors_conv_27); + CHECK_ACCESS(output_descriptors_conv_27_ptr); + LDKSpendableOutputDescriptor output_descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(output_descriptors_conv_27_ptr); + output_descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(output_descriptors_conv_27)); + output_descriptors_constr.data[b] = output_descriptors_conv_27_conv; + } + (*env)->ReleaseLongArrayElements(env, output_descriptors, output_descriptors_vals, 0); + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); + void* delay_until_height_ptr = untag_ptr(delay_until_height); + CHECK_ACCESS(delay_until_height_ptr); + LDKCOption_u32Z delay_until_height_conv = *(LDKCOption_u32Z*)(delay_until_height_ptr); + delay_until_height_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(delay_until_height)); + LDKCResult_NoneNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneNoneZ), "LDKCResult_NoneNoneZ"); + *ret_conv = OutputSweeper_track_spendable_outputs(&this_arg_conv, output_descriptors_constr, channel_id_conv, exclude_static_outputs, delay_until_height_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1tracked_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKOutputSweeper this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_TrackedSpendableOutputZ ret_var = OutputSweeper_tracked_spendable_outputs(&this_arg_conv); + int64_tArray ret_arr = NULL; + ret_arr = (*env)->NewLongArray(env, ret_var.datalen); + int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL); + for (size_t y = 0; y < ret_var.datalen; y++) { + LDKTrackedSpendableOutput ret_conv_24_var = ret_var.data[y]; + int64_t ret_conv_24_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_24_var); + ret_conv_24_ref = tag_ptr(ret_conv_24_var.inner, ret_conv_24_var.is_owned); + ret_arr_ptr[y] = ret_conv_24_ref; + } + (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0); + FREE(ret_var.data); + return ret_arr; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1current_1best_1block(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKOutputSweeper this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKBestBlock ret_var = OutputSweeper_current_best_block(&this_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1as_1Listen(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKOutputSweeper this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKListen* ret_ret = MALLOC(sizeof(LDKListen), "LDKListen"); + *ret_ret = OutputSweeper_as_Listen(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1as_1Confirm(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKOutputSweeper this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKConfirm* ret_ret = MALLOC(sizeof(LDKConfirm), "LDKConfirm"); + *ret_ret = OutputSweeper_as_Confirm(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKSpendingDelay this_ptr_conv = *(LDKSpendingDelay*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + SpendingDelay_free(this_ptr_conv); +} + +static inline uint64_t SpendingDelay_clone_ptr(LDKSpendingDelay *NONNULL_PTR arg) { + LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay"); + *ret_copy = SpendingDelay_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKSpendingDelay* arg_conv = (LDKSpendingDelay*)untag_ptr(arg); + int64_t ret_conv = SpendingDelay_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKSpendingDelay* orig_conv = (LDKSpendingDelay*)untag_ptr(orig); + LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay"); + *ret_copy = SpendingDelay_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1relative(JNIEnv *env, jclass clz, int32_t num_blocks) { + LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay"); + *ret_copy = SpendingDelay_relative(num_blocks); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1absolute(JNIEnv *env, jclass clz, int32_t height) { + LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay"); + *ret_copy = SpendingDelay_absolute(height); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1read(JNIEnv *env, jclass clz, int8_tArray ser, int64_t arg_a, int64_t arg_b, int64_t arg_c, int64_t arg_d, int64_t arg_e, int64_t arg_f, int64_t arg_g) { + LDKu8slice ser_ref; + ser_ref.datalen = (*env)->GetArrayLength(env, ser); + ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL); + void* arg_a_ptr = untag_ptr(arg_a); + CHECK_ACCESS(arg_a_ptr); + LDKBroadcasterInterface arg_a_conv = *(LDKBroadcasterInterface*)(arg_a_ptr); + if (arg_a_conv.free == LDKBroadcasterInterface_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKBroadcasterInterface_JCalls_cloned(&arg_a_conv); + } + void* arg_b_ptr = untag_ptr(arg_b); + CHECK_ACCESS(arg_b_ptr); + LDKFeeEstimator arg_b_conv = *(LDKFeeEstimator*)(arg_b_ptr); + if (arg_b_conv.free == LDKFeeEstimator_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFeeEstimator_JCalls_cloned(&arg_b_conv); + } + void* arg_c_ptr = untag_ptr(arg_c); + CHECK_ACCESS(arg_c_ptr); + LDKCOption_FilterZ arg_c_conv = *(LDKCOption_FilterZ*)(arg_c_ptr); + // WARNING: we may need a move here but no clone is available for LDKCOption_FilterZ + if (arg_c_conv.tag == LDKCOption_FilterZ_Some) { + // Manually implement clone for Java trait instances + if (arg_c_conv.some.free == LDKFilter_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFilter_JCalls_cloned(&arg_c_conv.some); + } + } + void* arg_d_ptr = untag_ptr(arg_d); + CHECK_ACCESS(arg_d_ptr); + LDKOutputSpender arg_d_conv = *(LDKOutputSpender*)(arg_d_ptr); + if (arg_d_conv.free == LDKOutputSpender_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKOutputSpender_JCalls_cloned(&arg_d_conv); + } + void* arg_e_ptr = untag_ptr(arg_e); + CHECK_ACCESS(arg_e_ptr); + LDKChangeDestinationSource arg_e_conv = *(LDKChangeDestinationSource*)(arg_e_ptr); + if (arg_e_conv.free == LDKChangeDestinationSource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKChangeDestinationSource_JCalls_cloned(&arg_e_conv); + } + void* arg_f_ptr = untag_ptr(arg_f); + CHECK_ACCESS(arg_f_ptr); + LDKKVStore arg_f_conv = *(LDKKVStore*)(arg_f_ptr); + if (arg_f_conv.free == LDKKVStore_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKKVStore_JCalls_cloned(&arg_f_conv); + } + void* arg_g_ptr = untag_ptr(arg_g); + CHECK_ACCESS(arg_g_ptr); + LDKLogger arg_g_conv = *(LDKLogger*)(arg_g_ptr); + if (arg_g_conv.free == LDKLogger_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKLogger_JCalls_cloned(&arg_g_conv); + } + LDKCResult_OutputSweeperDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSweeperDecodeErrorZ), "LDKCResult_OutputSweeperDecodeErrorZ"); + *ret_conv = OutputSweeper_read(ser_ref, arg_a_conv, arg_b_conv, arg_c_conv, arg_d_conv, arg_e_conv, arg_f_conv, arg_g_conv); + (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1read(JNIEnv *env, jclass clz, int8_tArray ser, int64_t arg_a, int64_t arg_b, int64_t arg_c, int64_t arg_d, int64_t arg_e, int64_t arg_f, int64_t arg_g) { + LDKu8slice ser_ref; + ser_ref.datalen = (*env)->GetArrayLength(env, ser); + ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL); + void* arg_a_ptr = untag_ptr(arg_a); + CHECK_ACCESS(arg_a_ptr); + LDKBroadcasterInterface arg_a_conv = *(LDKBroadcasterInterface*)(arg_a_ptr); + if (arg_a_conv.free == LDKBroadcasterInterface_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKBroadcasterInterface_JCalls_cloned(&arg_a_conv); + } + void* arg_b_ptr = untag_ptr(arg_b); + CHECK_ACCESS(arg_b_ptr); + LDKFeeEstimator arg_b_conv = *(LDKFeeEstimator*)(arg_b_ptr); + if (arg_b_conv.free == LDKFeeEstimator_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFeeEstimator_JCalls_cloned(&arg_b_conv); + } + void* arg_c_ptr = untag_ptr(arg_c); + CHECK_ACCESS(arg_c_ptr); + LDKCOption_FilterZ arg_c_conv = *(LDKCOption_FilterZ*)(arg_c_ptr); + // WARNING: we may need a move here but no clone is available for LDKCOption_FilterZ + if (arg_c_conv.tag == LDKCOption_FilterZ_Some) { + // Manually implement clone for Java trait instances + if (arg_c_conv.some.free == LDKFilter_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFilter_JCalls_cloned(&arg_c_conv.some); + } + } + void* arg_d_ptr = untag_ptr(arg_d); + CHECK_ACCESS(arg_d_ptr); + LDKOutputSpender arg_d_conv = *(LDKOutputSpender*)(arg_d_ptr); + if (arg_d_conv.free == LDKOutputSpender_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKOutputSpender_JCalls_cloned(&arg_d_conv); + } + void* arg_e_ptr = untag_ptr(arg_e); + CHECK_ACCESS(arg_e_ptr); + LDKChangeDestinationSource arg_e_conv = *(LDKChangeDestinationSource*)(arg_e_ptr); + if (arg_e_conv.free == LDKChangeDestinationSource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKChangeDestinationSource_JCalls_cloned(&arg_e_conv); + } + void* arg_f_ptr = untag_ptr(arg_f); + CHECK_ACCESS(arg_f_ptr); + LDKKVStore arg_f_conv = *(LDKKVStore*)(arg_f_ptr); + if (arg_f_conv.free == LDKKVStore_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKKVStore_JCalls_cloned(&arg_f_conv); + } + void* arg_g_ptr = untag_ptr(arg_g); + CHECK_ACCESS(arg_g_ptr); + LDKLogger arg_g_conv = *(LDKLogger*)(arg_g_ptr); + if (arg_g_conv.free == LDKLogger_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKLogger_JCalls_cloned(&arg_g_conv); + } + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ), "LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ"); + *ret_conv = C2Tuple_BestBlockOutputSweeperZ_read(ser_ref, arg_a_conv, arg_b_conv, arg_c_conv, arg_d_conv, arg_e_conv, arg_f_conv, arg_g_conv); + (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKFutureCallback this_ptr_conv = *(LDKFutureCallback*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + FutureCallback_free(this_ptr_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Future_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKFuture this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + Future_free(this_obj_conv); +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Future_1register_1callback_1fn(JNIEnv *env, jclass clz, int64_t this_arg, int64_t callback) { LDKFuture this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -38131,8 +42142,8 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Future_1wait(JNIEnv *env, jcla this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv = Future_clone(&this_arg_conv); - Future_wait(this_arg_conv); + this_arg_conv.is_owned = false; + Future_wait(&this_arg_conv); } JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Future_1wait_1timeout(JNIEnv *env, jclass clz, int64_t this_arg, int64_t max_wait) { @@ -38140,8 +42151,8 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Future_1wait_1timeout(JNIE this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv = Future_clone(&this_arg_conv); - jboolean ret_conv = Future_wait_timeout(this_arg_conv, max_wait); + this_arg_conv.is_owned = false; + jboolean ret_conv = Future_wait_timeout(&this_arg_conv, max_wait); return ret_conv; } @@ -38158,8 +42169,8 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Sleeper_1from_1single_1futu future_conv.inner = untag_ptr(future); future_conv.is_owned = ptr_is_owned(future); CHECK_INNER_FIELD_ACCESS_OR_NULL(future_conv); - future_conv = Future_clone(&future_conv); - LDKSleeper ret_var = Sleeper_from_single_future(future_conv); + future_conv.is_owned = false; + LDKSleeper ret_var = Sleeper_from_single_future(&future_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -38171,13 +42182,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Sleeper_1from_1two_1futures fut_a_conv.inner = untag_ptr(fut_a); fut_a_conv.is_owned = ptr_is_owned(fut_a); CHECK_INNER_FIELD_ACCESS_OR_NULL(fut_a_conv); - fut_a_conv = Future_clone(&fut_a_conv); + fut_a_conv.is_owned = false; LDKFuture fut_b_conv; fut_b_conv.inner = untag_ptr(fut_b); fut_b_conv.is_owned = ptr_is_owned(fut_b); CHECK_INNER_FIELD_ACCESS_OR_NULL(fut_b_conv); - fut_b_conv = Future_clone(&fut_b_conv); - LDKSleeper ret_var = Sleeper_from_two_futures(fut_a_conv, fut_b_conv); + fut_b_conv.is_owned = false; + LDKSleeper ret_var = Sleeper_from_two_futures(&fut_a_conv, &fut_b_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -38198,7 +42209,8 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Sleeper_1new(JNIEnv *env, j futures_conv_8_conv.inner = untag_ptr(futures_conv_8); futures_conv_8_conv.is_owned = ptr_is_owned(futures_conv_8); CHECK_INNER_FIELD_ACCESS_OR_NULL(futures_conv_8_conv); - futures_conv_8_conv = Future_clone(&futures_conv_8_conv); + // WARNING: we need a move here but no clone is available for LDKFuture + futures_constr.data[i] = futures_conv_8_conv; } (*env)->ReleaseLongArrayElements(env, futures, futures_vals, 0); @@ -38339,9 +42351,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Record_1get_1channel_1id(JN this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKCOption_ThirtyTwoBytesZ *ret_copy = MALLOC(sizeof(LDKCOption_ThirtyTwoBytesZ), "LDKCOption_ThirtyTwoBytesZ"); - *ret_copy = Record_get_channel_id(&this_ptr_conv); - int64_t ret_ref = tag_ptr(ret_copy, true); + LDKChannelId ret_var = Record_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } @@ -38351,10 +42364,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Record_1set_1channel_1id(JNIEn this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - void* val_ptr = untag_ptr(val); - CHECK_ACCESS(val_ptr); - LDKCOption_ThirtyTwoBytesZ val_conv = *(LDKCOption_ThirtyTwoBytesZ*)(val_ptr); - val_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(val)); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); Record_set_channel_id(&this_ptr_conv, val_conv); } @@ -38448,10 +42462,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Record_1new(JNIEnv *env, jc LDKPublicKey peer_id_arg_ref; CHECK((*env)->GetArrayLength(env, peer_id_arg) == 33); (*env)->GetByteArrayRegion(env, peer_id_arg, 0, 33, peer_id_arg_ref.compressed_form); - void* channel_id_arg_ptr = untag_ptr(channel_id_arg); - CHECK_ACCESS(channel_id_arg_ptr); - LDKCOption_ThirtyTwoBytesZ channel_id_arg_conv = *(LDKCOption_ThirtyTwoBytesZ*)(channel_id_arg_ptr); - channel_id_arg_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(channel_id_arg)); + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKStr args_arg_conv = java_to_owned_str(env, args_arg); LDKStr module_path_arg_conv = java_to_owned_str(env, module_path_arg); LDKStr file_arg_conv = java_to_owned_str(env, file_arg); @@ -39710,6 +43725,59 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BestBlock_1free(JNIEnv *env, j BestBlock_free(this_obj_conv); } +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BestBlock_1get_1block_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKBestBlock this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = (*env)->NewByteArray(env, 32); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *BestBlock_get_block_hash(&this_ptr_conv)); + return ret_arr; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BestBlock_1set_1block_1hash(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKBestBlock this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKThirtyTwoBytes val_ref; + CHECK((*env)->GetArrayLength(env, val) == 32); + (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); + BestBlock_set_block_hash(&this_ptr_conv, val_ref); +} + +JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1get_1height(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKBestBlock this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int32_t ret_conv = BestBlock_get_height(&this_ptr_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BestBlock_1set_1height(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) { + LDKBestBlock this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + BestBlock_set_height(&this_ptr_conv, val); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1new(JNIEnv *env, jclass clz, int8_tArray block_hash_arg, int32_t height_arg) { + LDKThirtyTwoBytes block_hash_arg_ref; + CHECK((*env)->GetArrayLength(env, block_hash_arg) == 32); + (*env)->GetByteArrayRegion(env, block_hash_arg, 0, 32, block_hash_arg_ref.data); + LDKBestBlock ret_var = BestBlock_new(block_hash_arg_ref, height_arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + static inline uint64_t BestBlock_clone_ptr(LDKBestBlock *NONNULL_PTR arg) { LDKBestBlock ret_var = BestBlock_clone(arg); int64_t ret_ref = 0; @@ -39740,6 +43808,16 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1clone(JNIEnv *en return ret_ref; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1hash(JNIEnv *env, jclass clz, int64_t o) { + LDKBestBlock o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = BestBlock_hash(&o_conv); + return ret_conv; +} + JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_BestBlock_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { LDKBestBlock a_conv; a_conv.inner = untag_ptr(a); @@ -39764,36 +43842,27 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1from_1network(JN return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1new(JNIEnv *env, jclass clz, int8_tArray block_hash, int32_t height) { - LDKThirtyTwoBytes block_hash_ref; - CHECK((*env)->GetArrayLength(env, block_hash) == 32); - (*env)->GetByteArrayRegion(env, block_hash, 0, 32, block_hash_ref.data); - LDKBestBlock ret_var = BestBlock_new(block_hash_ref, height); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BestBlock_1block_1hash(JNIEnv *env, jclass clz, int64_t this_arg) { - LDKBestBlock this_arg_conv; - this_arg_conv.inner = untag_ptr(this_arg); - this_arg_conv.is_owned = ptr_is_owned(this_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, BestBlock_block_hash(&this_arg_conv).data); +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BestBlock_1write(JNIEnv *env, jclass clz, int64_t obj) { + LDKBestBlock obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = BestBlock_write(&obj_conv); + int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen); + (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data); + CVec_u8Z_free(ret_var); return ret_arr; } -JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1height(JNIEnv *env, jclass clz, int64_t this_arg) { - LDKBestBlock this_arg_conv; - this_arg_conv.inner = untag_ptr(this_arg); - this_arg_conv.is_owned = ptr_is_owned(this_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv.is_owned = false; - int32_t ret_conv = BestBlock_height(&this_arg_conv); - return ret_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1read(JNIEnv *env, jclass clz, int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = (*env)->GetArrayLength(env, ser); + ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL); + LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ"); + *ret_conv = BestBlock_read(ser_ref); + (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0); + return tag_ptr(ret_conv, true); } JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Listen_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -40067,6 +44136,11 @@ JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ConfirmationTarget_1channel_ return ret_conv; } +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ConfirmationTarget_1output_1spending_1fee(JNIEnv *env, jclass clz) { + jclass ret_conv = LDKConfirmationTarget_to_java(env, ConfirmationTarget_output_spending_fee()); + return ret_conv; +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ConfirmationTarget_1hash(JNIEnv *env, jclass clz, int64_t o) { LDKConfirmationTarget* o_conv = (LDKConfirmationTarget*)untag_ptr(o); int64_t ret_conv = ConfirmationTarget_hash(o_conv); @@ -40284,16 +44358,14 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1list_1mo this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKCVec_OutPointZ ret_var = ChainMonitor_list_monitors(&this_arg_conv); + LDKCVec_C2Tuple_OutPointChannelIdZZ ret_var = ChainMonitor_list_monitors(&this_arg_conv); int64_tArray ret_arr = NULL; ret_arr = (*env)->NewLongArray(env, ret_var.datalen); int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL); - for (size_t k = 0; k < ret_var.datalen; k++) { - LDKOutPoint ret_conv_10_var = ret_var.data[k]; - int64_t ret_conv_10_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_10_var); - ret_conv_10_ref = tag_ptr(ret_conv_10_var.inner, ret_conv_10_var.is_owned); - ret_arr_ptr[k] = ret_conv_10_ref; + for (size_t d = 0; d < ret_var.datalen; d++) { + LDKC2Tuple_OutPointChannelIdZ* ret_conv_29_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ"); + *ret_conv_29_conv = ret_var.data[d]; + ret_arr_ptr[d] = tag_ptr(ret_conv_29_conv, true); } (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0); FREE(ret_var.data); @@ -40363,6 +44435,29 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1rebroadcast_1pen ChainMonitor_rebroadcast_pending_claims(&this_arg_conv); } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1signer_1unblocked(JNIEnv *env, jclass clz, int64_t this_arg, int64_t monitor_opt) { + LDKChainMonitor this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKOutPoint monitor_opt_conv; + monitor_opt_conv.inner = untag_ptr(monitor_opt); + monitor_opt_conv.is_owned = ptr_is_owned(monitor_opt); + CHECK_INNER_FIELD_ACCESS_OR_NULL(monitor_opt_conv); + monitor_opt_conv = OutPoint_clone(&monitor_opt_conv); + ChainMonitor_signer_unblocked(&this_arg_conv, monitor_opt_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1archive_1fully_1resolved_1channel_1monitors(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKChainMonitor this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + ChainMonitor_archive_fully_resolved_channel_monitors(&this_arg_conv); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1as_1Listen(JNIEnv *env, jclass clz, int64_t this_arg) { LDKChainMonitor this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -40434,6 +44529,33 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1set_1upd ChannelMonitorUpdate_set_update_id(&this_ptr_conv, val); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKChannelMonitorUpdate this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelId ret_var = ChannelMonitorUpdate_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKChannelMonitorUpdate this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ChannelMonitorUpdate_set_channel_id(&this_ptr_conv, val_conv); +} + static inline uint64_t ChannelMonitorUpdate_clone_ptr(LDKChannelMonitorUpdate *NONNULL_PTR arg) { LDKChannelMonitorUpdate ret_var = ChannelMonitorUpdate_clone(arg); int64_t ret_ref = 0; @@ -40543,6 +44665,27 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1htlcevent(JNI return ret_ref; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1holder_1force_1closed_1with_1info(JNIEnv *env, jclass clz, int64_t reason, int64_t outpoint, int64_t channel_id) { + void* reason_ptr = untag_ptr(reason); + CHECK_ACCESS(reason_ptr); + LDKClosureReason reason_conv = *(LDKClosureReason*)(reason_ptr); + reason_conv = ClosureReason_clone((LDKClosureReason*)untag_ptr(reason)); + LDKOutPoint outpoint_conv; + outpoint_conv.inner = untag_ptr(outpoint); + outpoint_conv.is_owned = ptr_is_owned(outpoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_conv); + outpoint_conv = OutPoint_clone(&outpoint_conv); + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); + LDKMonitorEvent *ret_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent"); + *ret_copy = MonitorEvent_holder_force_closed_with_info(reason_conv, outpoint_conv, channel_id_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1holder_1force_1closed(JNIEnv *env, jclass clz, int64_t a) { LDKOutPoint a_conv; a_conv.inner = untag_ptr(a); @@ -40555,14 +44698,19 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1holder_1force return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1completed(JNIEnv *env, jclass clz, int64_t funding_txo, int64_t monitor_update_id) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1completed(JNIEnv *env, jclass clz, int64_t funding_txo, int64_t channel_id, int64_t monitor_update_id) { LDKOutPoint funding_txo_conv; funding_txo_conv.inner = untag_ptr(funding_txo); funding_txo_conv.is_owned = ptr_is_owned(funding_txo); CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_conv); funding_txo_conv = OutPoint_clone(&funding_txo_conv); + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKMonitorEvent *ret_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent"); - *ret_copy = MonitorEvent_completed(funding_txo_conv, monitor_update_id); + *ret_copy = MonitorEvent_completed(funding_txo_conv, channel_id_conv, monitor_update_id); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -40862,6 +45010,19 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1fundin return tag_ptr(ret_conv, true); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1channel_1id(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKChannelMonitor this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKChannelId ret_var = ChannelMonitor_channel_id(&this_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1outputs_1to_1watch(JNIEnv *env, jclass clz, int64_t this_arg) { LDKChannelMonitor this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -40997,29 +45158,22 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1co return ret_arr; } -JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1latest_1holder_1commitment_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int64_t logger) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1broadcast_1latest_1holder_1commitment_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int64_t broadcaster, int64_t fee_estimator, int64_t logger) { LDKChannelMonitor this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; + void* broadcaster_ptr = untag_ptr(broadcaster); + if (ptr_is_owned(broadcaster)) { CHECK_ACCESS(broadcaster_ptr); } + LDKBroadcasterInterface* broadcaster_conv = (LDKBroadcasterInterface*)broadcaster_ptr; + void* fee_estimator_ptr = untag_ptr(fee_estimator); + if (ptr_is_owned(fee_estimator)) { CHECK_ACCESS(fee_estimator_ptr); } + LDKFeeEstimator* fee_estimator_conv = (LDKFeeEstimator*)fee_estimator_ptr; void* logger_ptr = untag_ptr(logger); if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); } LDKLogger* logger_conv = (LDKLogger*)logger_ptr; - LDKCVec_TransactionZ ret_var = ChannelMonitor_get_latest_holder_commitment_txn(&this_arg_conv, logger_conv); - jobjectArray ret_arr = NULL; - ret_arr = (*env)->NewObjectArray(env, ret_var.datalen, arr_of_B_clz, NULL); - ; - for (size_t i = 0; i < ret_var.datalen; i++) { - LDKTransaction ret_conv_8_var = ret_var.data[i]; - int8_tArray ret_conv_8_arr = (*env)->NewByteArray(env, ret_conv_8_var.datalen); - (*env)->SetByteArrayRegion(env, ret_conv_8_arr, 0, ret_conv_8_var.datalen, ret_conv_8_var.data); - Transaction_free(ret_conv_8_var); - (*env)->SetObjectArrayElement(env, ret_arr, i, ret_conv_8_arr); - } - - FREE(ret_var.data); - return ret_arr; + ChannelMonitor_broadcast_latest_holder_commitment_txn(&this_arg_conv, broadcaster_conv, fee_estimator_conv, logger_conv); } JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1block_1connected(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray header, int64_tArray txdata, int32_t height, int64_t broadcaster, int64_t fee_estimator, int64_t logger) { @@ -41296,6 +45450,32 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1rebroadcast_1p ChannelMonitor_rebroadcast_pending_claims(&this_arg_conv, broadcaster_conv, fee_estimator_conv, logger_conv); } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1signer_1unblocked(JNIEnv *env, jclass clz, int64_t this_arg, int64_t broadcaster, int64_t fee_estimator, int64_t logger) { + LDKChannelMonitor this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + void* broadcaster_ptr = untag_ptr(broadcaster); + CHECK_ACCESS(broadcaster_ptr); + LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(broadcaster_ptr); + if (broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKBroadcasterInterface_JCalls_cloned(&broadcaster_conv); + } + void* fee_estimator_ptr = untag_ptr(fee_estimator); + CHECK_ACCESS(fee_estimator_ptr); + LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(fee_estimator_ptr); + if (fee_estimator_conv.free == LDKFeeEstimator_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFeeEstimator_JCalls_cloned(&fee_estimator_conv); + } + void* logger_ptr = untag_ptr(logger); + if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); } + LDKLogger* logger_conv = (LDKLogger*)logger_ptr; + ChannelMonitor_signer_unblocked(&this_arg_conv, broadcaster_conv, fee_estimator_conv, logger_conv); +} + JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray tx, int32_t confirmation_height) { LDKChannelMonitor this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -41322,6 +45502,19 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1s return ret_arr; } +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1is_1fully_1resolved(JNIEnv *env, jclass clz, int64_t this_arg, int64_t logger) { + LDKChannelMonitor this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + void* logger_ptr = untag_ptr(logger); + if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); } + LDKLogger* logger_conv = (LDKLogger*)logger_ptr; + jboolean ret_conv = ChannelMonitor_is_fully_resolved(&this_arg_conv, logger_conv); + return ret_conv; +} + JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1claimable_1balances(JNIEnv *env, jclass clz, int64_t this_arg) { LDKChannelMonitor this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -41475,17 +45668,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutPoint_1hash(JNIEnv *env, return ret_conv; } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OutPoint_1to_1channel_1id(JNIEnv *env, jclass clz, int64_t this_arg) { - LDKOutPoint this_arg_conv; - this_arg_conv.inner = untag_ptr(this_arg); - this_arg_conv.is_owned = ptr_is_owned(this_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, OutPoint_to_channel_id(&this_arg_conv).data); - return ret_arr; -} - JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OutPoint_1write(JNIEnv *env, jclass clz, int64_t obj) { LDKOutPoint obj_conv; obj_conv.inner = untag_ptr(obj); @@ -41597,6 +45779,61 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1new(JNIEnv return ret_ref; } +static inline uint64_t InboundHTLCErr_clone_ptr(LDKInboundHTLCErr *NONNULL_PTR arg) { + LDKInboundHTLCErr ret_var = InboundHTLCErr_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKInboundHTLCErr arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = InboundHTLCErr_clone_ptr(&arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKInboundHTLCErr orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKInboundHTLCErr ret_var = InboundHTLCErr_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1hash(JNIEnv *env, jclass clz, int64_t o) { + LDKInboundHTLCErr o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = InboundHTLCErr_hash(&o_conv); + return ret_conv; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKInboundHTLCErr a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKInboundHTLCErr b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = InboundHTLCErr_eq(&a_conv, &b_conv); + return ret_conv; +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_peel_1payment_1onion(JNIEnv *env, jclass clz, int64_t msg, int64_t node_signer, int64_t logger, int32_t cur_height, jboolean accept_mpp_keysend, jboolean allow_skimmed_fees) { LDKUpdateAddHTLC msg_conv; msg_conv.inner = untag_ptr(msg); @@ -41660,7 +45897,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1forward return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive(JNIEnv *env, jclass clz, int64_t payment_data, int64_t payment_metadata, int32_t incoming_cltv_expiry, int8_tArray phantom_shared_secret, int64_tArray custom_tlvs, jboolean requires_blinded_error) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive(JNIEnv *env, jclass clz, int64_t payment_data, int64_t payment_metadata, int64_t payment_context, int32_t incoming_cltv_expiry, int8_tArray phantom_shared_secret, int64_tArray custom_tlvs, jboolean requires_blinded_error) { LDKFinalOnionHopData payment_data_conv; payment_data_conv.inner = untag_ptr(payment_data); payment_data_conv.is_owned = ptr_is_owned(payment_data); @@ -41670,6 +45907,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive CHECK_ACCESS(payment_metadata_ptr); LDKCOption_CVec_u8ZZ payment_metadata_conv = *(LDKCOption_CVec_u8ZZ*)(payment_metadata_ptr); payment_metadata_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(payment_metadata)); + void* payment_context_ptr = untag_ptr(payment_context); + CHECK_ACCESS(payment_context_ptr); + LDKCOption_PaymentContextZ payment_context_conv = *(LDKCOption_PaymentContextZ*)(payment_context_ptr); + payment_context_conv = COption_PaymentContextZ_clone((LDKCOption_PaymentContextZ*)untag_ptr(payment_context)); LDKThirtyTwoBytes phantom_shared_secret_ref; CHECK((*env)->GetArrayLength(env, phantom_shared_secret) == 32); (*env)->GetByteArrayRegion(env, phantom_shared_secret, 0, 32, phantom_shared_secret_ref.data); @@ -41690,12 +45931,12 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive } (*env)->ReleaseLongArrayElements(env, custom_tlvs, custom_tlvs_vals, 0); LDKPendingHTLCRouting *ret_copy = MALLOC(sizeof(LDKPendingHTLCRouting), "LDKPendingHTLCRouting"); - *ret_copy = PendingHTLCRouting_receive(payment_data_conv, payment_metadata_conv, incoming_cltv_expiry, phantom_shared_secret_ref, custom_tlvs_constr, requires_blinded_error); + *ret_copy = PendingHTLCRouting_receive(payment_data_conv, payment_metadata_conv, payment_context_conv, incoming_cltv_expiry, phantom_shared_secret_ref, custom_tlvs_constr, requires_blinded_error); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive_1keysend(JNIEnv *env, jclass clz, int64_t payment_data, int8_tArray payment_preimage, int64_t payment_metadata, int32_t incoming_cltv_expiry, int64_tArray custom_tlvs) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive_1keysend(JNIEnv *env, jclass clz, int64_t payment_data, int8_tArray payment_preimage, int64_t payment_metadata, int32_t incoming_cltv_expiry, int64_tArray custom_tlvs, jboolean requires_blinded_error) { LDKFinalOnionHopData payment_data_conv; payment_data_conv.inner = untag_ptr(payment_data); payment_data_conv.is_owned = ptr_is_owned(payment_data); @@ -41725,7 +45966,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive } (*env)->ReleaseLongArrayElements(env, custom_tlvs, custom_tlvs_vals, 0); LDKPendingHTLCRouting *ret_copy = MALLOC(sizeof(LDKPendingHTLCRouting), "LDKPendingHTLCRouting"); - *ret_copy = PendingHTLCRouting_receive_keysend(payment_data_conv, payment_preimage_ref, payment_metadata_conv, incoming_cltv_expiry, custom_tlvs_constr); + *ret_copy = PendingHTLCRouting_receive_keysend(payment_data_conv, payment_preimage_ref, payment_metadata_conv, incoming_cltv_expiry, custom_tlvs_constr, requires_blinded_error); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -42592,27 +46833,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1free(JNIEnv *e ChannelDetails_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKChannelDetails this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ChannelDetails_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = ChannelDetails_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKChannelDetails this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - ChannelDetails_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ChannelDetails_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1counterparty(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -43211,83 +47456,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1config(JN ChannelDetails_set_config(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t counterparty_arg, int64_t funding_txo_arg, int64_t channel_type_arg, int64_t short_channel_id_arg, int64_t outbound_scid_alias_arg, int64_t inbound_scid_alias_arg, int64_t channel_value_satoshis_arg, int64_t unspendable_punishment_reserve_arg, int8_tArray user_channel_id_arg, int64_t feerate_sat_per_1000_weight_arg, int64_t balance_msat_arg, int64_t outbound_capacity_msat_arg, int64_t next_outbound_htlc_limit_msat_arg, int64_t next_outbound_htlc_minimum_msat_arg, int64_t inbound_capacity_msat_arg, int64_t confirmations_required_arg, int64_t confirmations_arg, int64_t force_close_spend_delay_arg, jboolean is_outbound_arg, jboolean is_channel_ready_arg, int64_t channel_shutdown_state_arg, jboolean is_usable_arg, jboolean is_public_arg, int64_t inbound_htlc_minimum_msat_arg, int64_t inbound_htlc_maximum_msat_arg, int64_t config_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); - LDKChannelCounterparty counterparty_arg_conv; - counterparty_arg_conv.inner = untag_ptr(counterparty_arg); - counterparty_arg_conv.is_owned = ptr_is_owned(counterparty_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(counterparty_arg_conv); - counterparty_arg_conv = ChannelCounterparty_clone(&counterparty_arg_conv); - LDKOutPoint funding_txo_arg_conv; - funding_txo_arg_conv.inner = untag_ptr(funding_txo_arg); - funding_txo_arg_conv.is_owned = ptr_is_owned(funding_txo_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_arg_conv); - funding_txo_arg_conv = OutPoint_clone(&funding_txo_arg_conv); - LDKChannelTypeFeatures channel_type_arg_conv; - channel_type_arg_conv.inner = untag_ptr(channel_type_arg); - channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv); - channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv); - void* short_channel_id_arg_ptr = untag_ptr(short_channel_id_arg); - CHECK_ACCESS(short_channel_id_arg_ptr); - LDKCOption_u64Z short_channel_id_arg_conv = *(LDKCOption_u64Z*)(short_channel_id_arg_ptr); - short_channel_id_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(short_channel_id_arg)); - void* outbound_scid_alias_arg_ptr = untag_ptr(outbound_scid_alias_arg); - CHECK_ACCESS(outbound_scid_alias_arg_ptr); - LDKCOption_u64Z outbound_scid_alias_arg_conv = *(LDKCOption_u64Z*)(outbound_scid_alias_arg_ptr); - outbound_scid_alias_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(outbound_scid_alias_arg)); - void* inbound_scid_alias_arg_ptr = untag_ptr(inbound_scid_alias_arg); - CHECK_ACCESS(inbound_scid_alias_arg_ptr); - LDKCOption_u64Z inbound_scid_alias_arg_conv = *(LDKCOption_u64Z*)(inbound_scid_alias_arg_ptr); - inbound_scid_alias_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(inbound_scid_alias_arg)); - void* unspendable_punishment_reserve_arg_ptr = untag_ptr(unspendable_punishment_reserve_arg); - CHECK_ACCESS(unspendable_punishment_reserve_arg_ptr); - LDKCOption_u64Z unspendable_punishment_reserve_arg_conv = *(LDKCOption_u64Z*)(unspendable_punishment_reserve_arg_ptr); - LDKU128 user_channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, user_channel_id_arg) == 16); - (*env)->GetByteArrayRegion(env, user_channel_id_arg, 0, 16, user_channel_id_arg_ref.le_bytes); - void* feerate_sat_per_1000_weight_arg_ptr = untag_ptr(feerate_sat_per_1000_weight_arg); - CHECK_ACCESS(feerate_sat_per_1000_weight_arg_ptr); - LDKCOption_u32Z feerate_sat_per_1000_weight_arg_conv = *(LDKCOption_u32Z*)(feerate_sat_per_1000_weight_arg_ptr); - feerate_sat_per_1000_weight_arg_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(feerate_sat_per_1000_weight_arg)); - void* confirmations_required_arg_ptr = untag_ptr(confirmations_required_arg); - CHECK_ACCESS(confirmations_required_arg_ptr); - LDKCOption_u32Z confirmations_required_arg_conv = *(LDKCOption_u32Z*)(confirmations_required_arg_ptr); - confirmations_required_arg_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(confirmations_required_arg)); - void* confirmations_arg_ptr = untag_ptr(confirmations_arg); - CHECK_ACCESS(confirmations_arg_ptr); - LDKCOption_u32Z confirmations_arg_conv = *(LDKCOption_u32Z*)(confirmations_arg_ptr); - confirmations_arg_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(confirmations_arg)); - void* force_close_spend_delay_arg_ptr = untag_ptr(force_close_spend_delay_arg); - CHECK_ACCESS(force_close_spend_delay_arg_ptr); - LDKCOption_u16Z force_close_spend_delay_arg_conv = *(LDKCOption_u16Z*)(force_close_spend_delay_arg_ptr); - force_close_spend_delay_arg_conv = COption_u16Z_clone((LDKCOption_u16Z*)untag_ptr(force_close_spend_delay_arg)); - void* channel_shutdown_state_arg_ptr = untag_ptr(channel_shutdown_state_arg); - CHECK_ACCESS(channel_shutdown_state_arg_ptr); - LDKCOption_ChannelShutdownStateZ channel_shutdown_state_arg_conv = *(LDKCOption_ChannelShutdownStateZ*)(channel_shutdown_state_arg_ptr); - channel_shutdown_state_arg_conv = COption_ChannelShutdownStateZ_clone((LDKCOption_ChannelShutdownStateZ*)untag_ptr(channel_shutdown_state_arg)); - void* inbound_htlc_minimum_msat_arg_ptr = untag_ptr(inbound_htlc_minimum_msat_arg); - CHECK_ACCESS(inbound_htlc_minimum_msat_arg_ptr); - LDKCOption_u64Z inbound_htlc_minimum_msat_arg_conv = *(LDKCOption_u64Z*)(inbound_htlc_minimum_msat_arg_ptr); - inbound_htlc_minimum_msat_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(inbound_htlc_minimum_msat_arg)); - void* inbound_htlc_maximum_msat_arg_ptr = untag_ptr(inbound_htlc_maximum_msat_arg); - CHECK_ACCESS(inbound_htlc_maximum_msat_arg_ptr); - LDKCOption_u64Z inbound_htlc_maximum_msat_arg_conv = *(LDKCOption_u64Z*)(inbound_htlc_maximum_msat_arg_ptr); - inbound_htlc_maximum_msat_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(inbound_htlc_maximum_msat_arg)); - LDKChannelConfig config_arg_conv; - config_arg_conv.inner = untag_ptr(config_arg); - config_arg_conv.is_owned = ptr_is_owned(config_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(config_arg_conv); - config_arg_conv = ChannelConfig_clone(&config_arg_conv); - LDKChannelDetails ret_var = ChannelDetails_new(channel_id_arg_ref, counterparty_arg_conv, funding_txo_arg_conv, channel_type_arg_conv, short_channel_id_arg_conv, outbound_scid_alias_arg_conv, inbound_scid_alias_arg_conv, channel_value_satoshis_arg, unspendable_punishment_reserve_arg_conv, user_channel_id_arg_ref, feerate_sat_per_1000_weight_arg_conv, balance_msat_arg, outbound_capacity_msat_arg, next_outbound_htlc_limit_msat_arg, next_outbound_htlc_minimum_msat_arg, inbound_capacity_msat_arg, confirmations_required_arg_conv, confirmations_arg_conv, force_close_spend_delay_arg_conv, is_outbound_arg, is_channel_ready_arg, channel_shutdown_state_arg_conv, is_usable_arg, is_public_arg, inbound_htlc_minimum_msat_arg_conv, inbound_htlc_maximum_msat_arg_conv, config_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - static inline uint64_t ChannelDetails_clone_ptr(LDKChannelDetails *NONNULL_PTR arg) { LDKChannelDetails ret_var = ChannelDetails_clone(arg); int64_t ret_ref = 0; @@ -43714,16 +47882,17 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1create_1cha LDKU128 user_channel_id_ref; CHECK((*env)->GetArrayLength(env, user_channel_id) == 16); (*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes); - void* temporary_channel_id_ptr = untag_ptr(temporary_channel_id); - CHECK_ACCESS(temporary_channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ temporary_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(temporary_channel_id_ptr); - temporary_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(temporary_channel_id)); + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv = ChannelId_clone(&temporary_channel_id_conv); LDKUserConfig override_config_conv; override_config_conv.inner = untag_ptr(override_config); override_config_conv.is_owned = ptr_is_owned(override_config); CHECK_INNER_FIELD_ACCESS_OR_NULL(override_config_conv); override_config_conv = UserConfig_clone(&override_config_conv); - LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); + LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ"); *ret_conv = ChannelManager_create_channel(&this_arg_conv, their_network_key_ref, channel_value_satoshis, push_msat, user_channel_id_ref, temporary_channel_id_conv, override_config_conv); return tag_ptr(ret_conv, true); } @@ -43818,34 +47987,36 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelManager_1list_1 return ret_arr; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int8_tArray counterparty_node_id) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t channel_id_arr[32]; - CHECK((*env)->GetArrayLength(env, channel_id) == 32); - (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_arr); - uint8_t (*channel_id_ref)[32] = &channel_id_arr; + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33); (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_close_channel(&this_arg_conv, channel_id_ref, counterparty_node_id_ref); + *ret_conv = ChannelManager_close_channel(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref); return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1channel_1with_1feerate_1and_1script(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id, int64_t target_feerate_sats_per_1000_weight, int64_t shutdown_script) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1channel_1with_1feerate_1and_1script(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int8_tArray counterparty_node_id, int64_t target_feerate_sats_per_1000_weight, int64_t shutdown_script) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t channel_id_arr[32]; - CHECK((*env)->GetArrayLength(env, channel_id) == 32); - (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_arr); - uint8_t (*channel_id_ref)[32] = &channel_id_arr; + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33); (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form); @@ -43859,43 +48030,45 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1chan CHECK_INNER_FIELD_ACCESS_OR_NULL(shutdown_script_conv); shutdown_script_conv = ShutdownScript_clone(&shutdown_script_conv); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_close_channel_with_feerate_and_script(&this_arg_conv, channel_id_ref, counterparty_node_id_ref, target_feerate_sats_per_1000_weight_conv, shutdown_script_conv); + *ret_conv = ChannelManager_close_channel_with_feerate_and_script(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref, target_feerate_sats_per_1000_weight_conv, shutdown_script_conv); return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1broadcasting_1latest_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1broadcasting_1latest_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int8_tArray counterparty_node_id) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t channel_id_arr[32]; - CHECK((*env)->GetArrayLength(env, channel_id) == 32); - (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_arr); - uint8_t (*channel_id_ref)[32] = &channel_id_arr; + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33); (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_force_close_broadcasting_latest_txn(&this_arg_conv, channel_id_ref, counterparty_node_id_ref); + *ret_conv = ChannelManager_force_close_broadcasting_latest_txn(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref); return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1without_1broadcasting_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1without_1broadcasting_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int8_tArray counterparty_node_id) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t channel_id_arr[32]; - CHECK((*env)->GetArrayLength(env, channel_id) == 32); - (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_arr); - uint8_t (*channel_id_ref)[32] = &channel_id_arr; + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33); (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_force_close_without_broadcasting_txn(&this_arg_conv, channel_id_ref, counterparty_node_id_ref); + *ret_conv = ChannelManager_force_close_without_broadcasting_txn(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref); return tag_ptr(ret_conv, true); } @@ -44101,16 +48274,17 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1send_1prefl return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1funding_1transaction_1generated(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray funding_transaction) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1funding_1transaction_1generated(JNIEnv *env, jclass clz, int64_t this_arg, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray funding_transaction) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t temporary_channel_id_arr[32]; - CHECK((*env)->GetArrayLength(env, temporary_channel_id) == 32); - (*env)->GetByteArrayRegion(env, temporary_channel_id, 0, 32, temporary_channel_id_arr); - uint8_t (*temporary_channel_id_ref)[32] = &temporary_channel_id_arr; + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33); (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form); @@ -44120,7 +48294,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1funding_1tr (*env)->GetByteArrayRegion(env, funding_transaction, 0, funding_transaction_ref.datalen, funding_transaction_ref.data); funding_transaction_ref.data_is_owned = true; LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_funding_transaction_generated(&this_arg_conv, temporary_channel_id_ref, counterparty_node_id_ref, funding_transaction_ref); + *ret_conv = ChannelManager_funding_transaction_generated(&this_arg_conv, &temporary_channel_id_conv, counterparty_node_id_ref, funding_transaction_ref); return tag_ptr(ret_conv, true); } @@ -44130,20 +48304,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1batch_1fund this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ temporary_channels_constr; + LDKCVec_C2Tuple_ChannelIdPublicKeyZZ temporary_channels_constr; temporary_channels_constr.datalen = (*env)->GetArrayLength(env, temporary_channels); if (temporary_channels_constr.datalen > 0) - temporary_channels_constr.data = MALLOC(temporary_channels_constr.datalen * sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ Elements"); + temporary_channels_constr.data = MALLOC(temporary_channels_constr.datalen * sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKCVec_C2Tuple_ChannelIdPublicKeyZZ Elements"); else temporary_channels_constr.data = NULL; int64_t* temporary_channels_vals = (*env)->GetLongArrayElements (env, temporary_channels, NULL); - for (size_t j = 0; j < temporary_channels_constr.datalen; j++) { - int64_t temporary_channels_conv_35 = temporary_channels_vals[j]; - void* temporary_channels_conv_35_ptr = untag_ptr(temporary_channels_conv_35); - CHECK_ACCESS(temporary_channels_conv_35_ptr); - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ temporary_channels_conv_35_conv = *(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)(temporary_channels_conv_35_ptr); - temporary_channels_conv_35_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone((LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(temporary_channels_conv_35)); - temporary_channels_constr.data[j] = temporary_channels_conv_35_conv; + for (size_t e = 0; e < temporary_channels_constr.datalen; e++) { + int64_t temporary_channels_conv_30 = temporary_channels_vals[e]; + void* temporary_channels_conv_30_ptr = untag_ptr(temporary_channels_conv_30); + CHECK_ACCESS(temporary_channels_conv_30_ptr); + LDKC2Tuple_ChannelIdPublicKeyZ temporary_channels_conv_30_conv = *(LDKC2Tuple_ChannelIdPublicKeyZ*)(temporary_channels_conv_30_ptr); + temporary_channels_conv_30_conv = C2Tuple_ChannelIdPublicKeyZ_clone((LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(temporary_channels_conv_30)); + temporary_channels_constr.data[e] = temporary_channels_conv_30_conv; } (*env)->ReleaseLongArrayElements(env, temporary_channels, temporary_channels_vals, 0); LDKTransaction funding_transaction_ref; @@ -44156,7 +48330,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1batch_1fund return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1partial_1channel_1config(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray counterparty_node_id, jobjectArray channel_ids, int64_t config_update) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1partial_1channel_1config(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray counterparty_node_id, int64_tArray channel_ids, int64_t config_update) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); @@ -44165,19 +48339,23 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1par LDKPublicKey counterparty_node_id_ref; CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33); (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form); - LDKCVec_ThirtyTwoBytesZ channel_ids_constr; + LDKCVec_ChannelIdZ channel_ids_constr; channel_ids_constr.datalen = (*env)->GetArrayLength(env, channel_ids); if (channel_ids_constr.datalen > 0) - channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKThirtyTwoBytes), "LDKCVec_ThirtyTwoBytesZ Elements"); + channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKChannelId), "LDKCVec_ChannelIdZ Elements"); else channel_ids_constr.data = NULL; - for (size_t i = 0; i < channel_ids_constr.datalen; i++) { - int8_tArray channel_ids_conv_8 = (*env)->GetObjectArrayElement(env, channel_ids, i); - LDKThirtyTwoBytes channel_ids_conv_8_ref; - CHECK((*env)->GetArrayLength(env, channel_ids_conv_8) == 32); - (*env)->GetByteArrayRegion(env, channel_ids_conv_8, 0, 32, channel_ids_conv_8_ref.data); - channel_ids_constr.data[i] = channel_ids_conv_8_ref; - } + int64_t* channel_ids_vals = (*env)->GetLongArrayElements (env, channel_ids, NULL); + for (size_t l = 0; l < channel_ids_constr.datalen; l++) { + int64_t channel_ids_conv_11 = channel_ids_vals[l]; + LDKChannelId channel_ids_conv_11_conv; + channel_ids_conv_11_conv.inner = untag_ptr(channel_ids_conv_11); + channel_ids_conv_11_conv.is_owned = ptr_is_owned(channel_ids_conv_11); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_ids_conv_11_conv); + channel_ids_conv_11_conv = ChannelId_clone(&channel_ids_conv_11_conv); + channel_ids_constr.data[l] = channel_ids_conv_11_conv; + } + (*env)->ReleaseLongArrayElements(env, channel_ids, channel_ids_vals, 0); LDKChannelConfigUpdate config_update_conv; config_update_conv.inner = untag_ptr(config_update); config_update_conv.is_owned = ptr_is_owned(config_update); @@ -44188,7 +48366,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1par return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1channel_1config(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray counterparty_node_id, jobjectArray channel_ids, int64_t config) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1channel_1config(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray counterparty_node_id, int64_tArray channel_ids, int64_t config) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); @@ -44197,19 +48375,23 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1cha LDKPublicKey counterparty_node_id_ref; CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33); (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form); - LDKCVec_ThirtyTwoBytesZ channel_ids_constr; + LDKCVec_ChannelIdZ channel_ids_constr; channel_ids_constr.datalen = (*env)->GetArrayLength(env, channel_ids); if (channel_ids_constr.datalen > 0) - channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKThirtyTwoBytes), "LDKCVec_ThirtyTwoBytesZ Elements"); + channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKChannelId), "LDKCVec_ChannelIdZ Elements"); else channel_ids_constr.data = NULL; - for (size_t i = 0; i < channel_ids_constr.datalen; i++) { - int8_tArray channel_ids_conv_8 = (*env)->GetObjectArrayElement(env, channel_ids, i); - LDKThirtyTwoBytes channel_ids_conv_8_ref; - CHECK((*env)->GetArrayLength(env, channel_ids_conv_8) == 32); - (*env)->GetByteArrayRegion(env, channel_ids_conv_8, 0, 32, channel_ids_conv_8_ref.data); - channel_ids_constr.data[i] = channel_ids_conv_8_ref; - } + int64_t* channel_ids_vals = (*env)->GetLongArrayElements (env, channel_ids, NULL); + for (size_t l = 0; l < channel_ids_constr.datalen; l++) { + int64_t channel_ids_conv_11 = channel_ids_vals[l]; + LDKChannelId channel_ids_conv_11_conv; + channel_ids_conv_11_conv.inner = untag_ptr(channel_ids_conv_11); + channel_ids_conv_11_conv.is_owned = ptr_is_owned(channel_ids_conv_11); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_ids_conv_11_conv); + channel_ids_conv_11_conv = ChannelId_clone(&channel_ids_conv_11_conv); + channel_ids_constr.data[l] = channel_ids_conv_11_conv; + } + (*env)->ReleaseLongArrayElements(env, channel_ids, channel_ids_vals, 0); LDKChannelConfig config_conv; config_conv.inner = untag_ptr(config); config_conv.is_owned = ptr_is_owned(config); @@ -44220,7 +48402,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1cha return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1forward_1intercepted_1htlc(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray intercept_id, int8_tArray next_hop_channel_id, int8_tArray next_node_id, int64_t amt_to_forward_msat) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1forward_1intercepted_1htlc(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray intercept_id, int64_t next_hop_channel_id, int8_tArray next_node_id, int64_t amt_to_forward_msat) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); @@ -44229,15 +48411,16 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1forward_1in LDKThirtyTwoBytes intercept_id_ref; CHECK((*env)->GetArrayLength(env, intercept_id) == 32); (*env)->GetByteArrayRegion(env, intercept_id, 0, 32, intercept_id_ref.data); - uint8_t next_hop_channel_id_arr[32]; - CHECK((*env)->GetArrayLength(env, next_hop_channel_id) == 32); - (*env)->GetByteArrayRegion(env, next_hop_channel_id, 0, 32, next_hop_channel_id_arr); - uint8_t (*next_hop_channel_id_ref)[32] = &next_hop_channel_id_arr; + LDKChannelId next_hop_channel_id_conv; + next_hop_channel_id_conv.inner = untag_ptr(next_hop_channel_id); + next_hop_channel_id_conv.is_owned = ptr_is_owned(next_hop_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(next_hop_channel_id_conv); + next_hop_channel_id_conv.is_owned = false; LDKPublicKey next_node_id_ref; CHECK((*env)->GetArrayLength(env, next_node_id) == 33); (*env)->GetByteArrayRegion(env, next_node_id, 0, 33, next_node_id_ref.compressed_form); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_forward_intercepted_htlc(&this_arg_conv, intercept_id_ref, next_hop_channel_id_ref, next_node_id_ref, amt_to_forward_msat); + *ret_conv = ChannelManager_forward_intercepted_htlc(&this_arg_conv, intercept_id_ref, &next_hop_channel_id_conv, next_node_id_ref, amt_to_forward_msat); return tag_ptr(ret_conv, true); } @@ -44338,16 +48521,17 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelManager_1get_1ou return ret_arr; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inbound_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inbound_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t temporary_channel_id_arr[32]; - CHECK((*env)->GetArrayLength(env, temporary_channel_id) == 32); - (*env)->GetByteArrayRegion(env, temporary_channel_id, 0, 32, temporary_channel_id_arr); - uint8_t (*temporary_channel_id_ref)[32] = &temporary_channel_id_arr; + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33); (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form); @@ -44355,20 +48539,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inb CHECK((*env)->GetArrayLength(env, user_channel_id) == 16); (*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_accept_inbound_channel(&this_arg_conv, temporary_channel_id_ref, counterparty_node_id_ref, user_channel_id_ref); + *ret_conv = ChannelManager_accept_inbound_channel(&this_arg_conv, &temporary_channel_id_conv, counterparty_node_id_ref, user_channel_id_ref); return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inbound_1channel_1from_1trusted_1peer_10conf(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inbound_1channel_1from_1trusted_1peer_10conf(JNIEnv *env, jclass clz, int64_t this_arg, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t temporary_channel_id_arr[32]; - CHECK((*env)->GetArrayLength(env, temporary_channel_id) == 32); - (*env)->GetByteArrayRegion(env, temporary_channel_id, 0, 32, temporary_channel_id_arr); - uint8_t (*temporary_channel_id_ref)[32] = &temporary_channel_id_arr; + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33); (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form); @@ -44376,7 +48561,40 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inb CHECK((*env)->GetArrayLength(env, user_channel_id) == 16); (*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(&this_arg_conv, temporary_channel_id_ref, counterparty_node_id_ref, user_channel_id_ref); + *ret_conv = ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(&this_arg_conv, &temporary_channel_id_conv, counterparty_node_id_ref, user_channel_id_ref); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1create_1offer_1builder(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKChannelManager this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = ChannelManager_create_offer_builder(&this_arg_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1create_1refund_1builder(JNIEnv *env, jclass clz, int64_t this_arg, int64_t amount_msats, int64_t absolute_expiry, int8_tArray payment_id, int64_t retry_strategy, int64_t max_total_routing_fee_msat) { + LDKChannelManager this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKThirtyTwoBytes payment_id_ref; + CHECK((*env)->GetArrayLength(env, payment_id) == 32); + (*env)->GetByteArrayRegion(env, payment_id, 0, 32, payment_id_ref.data); + void* retry_strategy_ptr = untag_ptr(retry_strategy); + CHECK_ACCESS(retry_strategy_ptr); + LDKRetry retry_strategy_conv = *(LDKRetry*)(retry_strategy_ptr); + retry_strategy_conv = Retry_clone((LDKRetry*)untag_ptr(retry_strategy)); + void* max_total_routing_fee_msat_ptr = untag_ptr(max_total_routing_fee_msat); + CHECK_ACCESS(max_total_routing_fee_msat_ptr); + LDKCOption_u64Z max_total_routing_fee_msat_conv = *(LDKCOption_u64Z*)(max_total_routing_fee_msat_ptr); + max_total_routing_fee_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(max_total_routing_fee_msat)); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = ChannelManager_create_refund_builder(&this_arg_conv, amount_msats, absolute_expiry, payment_id_ref, retry_strategy_conv, max_total_routing_fee_msat_conv); return tag_ptr(ret_conv, true); } @@ -44430,7 +48648,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1request_1re refund_conv.is_owned = ptr_is_owned(refund); CHECK_INNER_FIELD_ACCESS_OR_NULL(refund_conv); refund_conv.is_owned = false; - LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); *ret_conv = ChannelManager_request_refund_payment(&this_arg_conv, &refund_conv); return tag_ptr(ret_conv, true); } @@ -44693,6 +48911,17 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1OffersM return tag_ptr(ret_ret, true); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1NodeIdLookUp(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKChannelManager this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKNodeIdLookUp* ret_ret = MALLOC(sizeof(LDKNodeIdLookUp), "LDKNodeIdLookUp"); + *ret_ret = ChannelManager_as_NodeIdLookUp(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_provided_1init_1features(JNIEnv *env, jclass clz, int64_t config) { LDKUserConfig config_conv; config_conv.inner = untag_ptr(config); @@ -45375,6 +49604,20 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_DelayedPaymentBasepoint return ret_arr; } +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_DelayedPaymentBasepoint_1derive_1add_1tweak(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray per_commitment_point) { + LDKDelayedPaymentBasepoint this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKPublicKey per_commitment_point_ref; + CHECK((*env)->GetArrayLength(env, per_commitment_point) == 33); + (*env)->GetByteArrayRegion(env, per_commitment_point, 0, 33, per_commitment_point_ref.compressed_form); + int8_tArray ret_arr = (*env)->NewByteArray(env, 32); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, DelayedPaymentBasepoint_derive_add_tweak(&this_arg_conv, per_commitment_point_ref).data); + return ret_arr; +} + JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_DelayedPaymentBasepoint_1write(JNIEnv *env, jclass clz, int64_t obj) { LDKDelayedPaymentBasepoint obj_conv; obj_conv.inner = untag_ptr(obj); @@ -45655,6 +49898,20 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_HtlcBasepoint_1to_1publ return ret_arr; } +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_HtlcBasepoint_1derive_1add_1tweak(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray per_commitment_point) { + LDKHtlcBasepoint this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKPublicKey per_commitment_point_ref; + CHECK((*env)->GetArrayLength(env, per_commitment_point) == 33); + (*env)->GetByteArrayRegion(env, per_commitment_point, 0, 33, per_commitment_point_ref.compressed_form); + int8_tArray ret_arr = (*env)->NewByteArray(env, 32); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, HtlcBasepoint_derive_add_tweak(&this_arg_conv, per_commitment_point_ref).data); + return ret_arr; +} + JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_HtlcBasepoint_1write(JNIEnv *env, jclass clz, int64_t obj) { LDKHtlcBasepoint obj_conv; obj_conv.inner = untag_ptr(obj); @@ -45827,6 +50084,19 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HtlcKey_1read(JNIEnv *env, return tag_ptr(ret_conv, true); } +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_add_1public_1key_1tweak(JNIEnv *env, jclass clz, int8_tArray base_point, int8_tArray tweak) { + LDKPublicKey base_point_ref; + CHECK((*env)->GetArrayLength(env, base_point) == 33); + (*env)->GetByteArrayRegion(env, base_point, 0, 33, base_point_ref.compressed_form); + uint8_t tweak_arr[32]; + CHECK((*env)->GetArrayLength(env, tweak) == 32); + (*env)->GetByteArrayRegion(env, tweak, 0, 32, tweak_arr); + uint8_t (*tweak_ref)[32] = &tweak_arr; + int8_tArray ret_arr = (*env)->NewByteArray(env, 33); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, add_public_key_tweak(base_point_ref, tweak_ref).compressed_form); + return ret_arr; +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevocationBasepoint_1free(JNIEnv *env, jclass clz, int64_t this_obj) { LDKRevocationBasepoint this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -46248,6 +50518,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DecodeError_1unsupported_1c return ret_ref; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DecodeError_1dangerous_1value(JNIEnv *env, jclass clz) { + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = DecodeError_dangerous_value(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DecodeError_1hash(JNIEnv *env, jclass clz, int64_t o) { LDKDecodeError* o_conv = (LDKDecodeError*)untag_ptr(o); int64_t ret_conv = DecodeError_hash(o_conv); @@ -46429,27 +50706,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1free(JNIEnv *env ErrorMessage_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKErrorMessage this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ErrorMessage_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = ErrorMessage_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKErrorMessage this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - ErrorMessage_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ErrorMessage_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT jstring JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1data(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -46474,12 +50755,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1set_1data(JNIEnv ErrorMessage_set_data(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, jstring data_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, jstring data_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKStr data_arg_conv = java_to_owned_str(env, data_arg); - LDKErrorMessage ret_var = ErrorMessage_new(channel_id_arg_ref, data_arg_conv); + LDKErrorMessage ret_var = ErrorMessage_new(channel_id_arg_conv, data_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -46549,27 +50832,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WarningMessage_1free(JNIEnv *e WarningMessage_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_WarningMessage_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_WarningMessage_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKWarningMessage this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *WarningMessage_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = WarningMessage_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WarningMessage_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WarningMessage_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKWarningMessage this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - WarningMessage_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + WarningMessage_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT jstring JNICALL Java_org_ldk_impl_bindings_WarningMessage_1get_1data(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -46594,12 +50881,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WarningMessage_1set_1data(JNIE WarningMessage_set_data(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_WarningMessage_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, jstring data_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_WarningMessage_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, jstring data_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKStr data_arg_conv = java_to_owned_str(env, data_arg); - LDKWarningMessage ret_var = WarningMessage_new(channel_id_arg_ref, data_arg_conv); + LDKWarningMessage ret_var = WarningMessage_new(channel_id_arg_conv, data_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -46860,27 +51149,27 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Pong_1eq(JNIEnv *env, jcla return ret_conv; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1free(JNIEnv *env, jclass clz, int64_t this_obj) { - LDKOpenChannel this_obj_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKCommonOpenChannelFields this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); this_obj_conv.is_owned = ptr_is_owned(this_obj); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - OpenChannel_free(this_obj_conv); + CommonOpenChannelFields_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *OpenChannel_get_chain_hash(&this_ptr_conv)); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *CommonOpenChannelFields_get_chain_hash(&this_ptr_conv)); return ret_arr; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -46888,216 +51177,182 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1chain_1hash( LDKThirtyTwoBytes val_ref; CHECK((*env)->GetArrayLength(env, val) == 32); (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - OpenChannel_set_chain_hash(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_chain_hash(&this_ptr_conv, val_ref); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *OpenChannel_get_temporary_channel_id(&this_ptr_conv)); - return ret_arr; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - OpenChannel_set_temporary_channel_id(&this_ptr_conv, val_ref); -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_funding_satoshis(&this_ptr_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannel_set_funding_satoshis(&this_ptr_conv, val); -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1push_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_push_msat(&this_ptr_conv); - return ret_conv; + LDKChannelId ret_var = CommonOpenChannelFields_get_temporary_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1push_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_push_msat(&this_ptr_conv, val); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + CommonOpenChannelFields_set_temporary_channel_id(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_dust_limit_satoshis(&this_ptr_conv); + int64_t ret_conv = CommonOpenChannelFields_get_funding_satoshis(&this_ptr_conv); return ret_conv; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_dust_limit_satoshis(&this_ptr_conv, val); + CommonOpenChannelFields_set_funding_satoshis(&this_ptr_conv, val); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_max_htlc_value_in_flight_msat(&this_ptr_conv); + int64_t ret_conv = CommonOpenChannelFields_get_dust_limit_satoshis(&this_ptr_conv); return ret_conv; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); + CommonOpenChannelFields_set_dust_limit_satoshis(&this_ptr_conv, val); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_channel_reserve_satoshis(&this_ptr_conv); + int64_t ret_conv = CommonOpenChannelFields_get_max_htlc_value_in_flight_msat(&this_ptr_conv); return ret_conv; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_channel_reserve_satoshis(&this_ptr_conv, val); + CommonOpenChannelFields_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_htlc_minimum_msat(&this_ptr_conv); + int64_t ret_conv = CommonOpenChannelFields_get_htlc_minimum_msat(&this_ptr_conv); return ret_conv; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_htlc_minimum_msat(&this_ptr_conv, val); + CommonOpenChannelFields_set_htlc_minimum_msat(&this_ptr_conv, val); } -JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1feerate_1per_1kw(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1commitment_1feerate_1sat_1per_11000_1weight(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int32_t ret_conv = OpenChannel_get_feerate_per_kw(&this_ptr_conv); + int32_t ret_conv = CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight(&this_ptr_conv); return ret_conv; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1feerate_1per_1kw(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1commitment_1feerate_1sat_1per_11000_1weight(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_feerate_per_kw(&this_ptr_conv, val); + CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight(&this_ptr_conv, val); } -JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int16_t ret_conv = OpenChannel_get_to_self_delay(&this_ptr_conv); + int16_t ret_conv = CommonOpenChannelFields_get_to_self_delay(&this_ptr_conv); return ret_conv; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_to_self_delay(&this_ptr_conv, val); + CommonOpenChannelFields_set_to_self_delay(&this_ptr_conv, val); } -JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int16_t ret_conv = OpenChannel_get_max_accepted_htlcs(&this_ptr_conv); + int16_t ret_conv = CommonOpenChannelFields_get_max_accepted_htlcs(&this_ptr_conv); return ret_conv; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_max_accepted_htlcs(&this_ptr_conv, val); + CommonOpenChannelFields_set_max_accepted_htlcs(&this_ptr_conv, val); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_funding_pubkey(&this_ptr_conv).compressed_form); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_funding_pubkey(&this_ptr_conv).compressed_form); return ret_arr; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -47105,22 +51360,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1funding_1pub LDKPublicKey val_ref; CHECK((*env)->GetArrayLength(env, val) == 33); (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - OpenChannel_set_funding_pubkey(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_funding_pubkey(&this_ptr_conv, val_ref); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_revocation_basepoint(&this_ptr_conv).compressed_form); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_revocation_basepoint(&this_ptr_conv).compressed_form); return ret_arr; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -47128,22 +51383,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1revocation_1 LDKPublicKey val_ref; CHECK((*env)->GetArrayLength(env, val) == 33); (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - OpenChannel_set_revocation_basepoint(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_revocation_basepoint(&this_ptr_conv, val_ref); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1payment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_payment_point(&this_ptr_conv).compressed_form); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_payment_basepoint(&this_ptr_conv).compressed_form); return ret_arr; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1payment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -47151,22 +51406,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1payment_1poi LDKPublicKey val_ref; CHECK((*env)->GetArrayLength(env, val) == 33); (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - OpenChannel_set_payment_point(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_payment_basepoint(&this_ptr_conv, val_ref); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form); return ret_arr; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -47174,22 +51429,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1delayed_1pay LDKPublicKey val_ref; CHECK((*env)->GetArrayLength(env, val) == 33); (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - OpenChannel_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_htlc_basepoint(&this_ptr_conv).compressed_form); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_htlc_basepoint(&this_ptr_conv).compressed_form); return ret_arr; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -47197,22 +51452,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1htlc_1basepo LDKPublicKey val_ref; CHECK((*env)->GetArrayLength(env, val) == 33); (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - OpenChannel_set_htlc_basepoint(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_htlc_basepoint(&this_ptr_conv, val_ref); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_first_per_commitment_point(&this_ptr_conv).compressed_form); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_first_per_commitment_point(&this_ptr_conv).compressed_form); return ret_arr; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -47220,42 +51475,42 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1first_1per_1 LDKPublicKey val_ref; CHECK((*env)->GetArrayLength(env, val) == 33); (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - OpenChannel_set_first_per_commitment_point(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_first_per_commitment_point(&this_ptr_conv, val_ref); } -JNIEXPORT int8_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int8_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_t ret_conv = OpenChannel_get_channel_flags(&this_ptr_conv); + int8_t ret_conv = CommonOpenChannelFields_get_channel_flags(&this_ptr_conv); return ret_conv; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr, int8_t val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr, int8_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_channel_flags(&this_ptr_conv, val); + CommonOpenChannelFields_set_channel_flags(&this_ptr_conv, val); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ"); - *ret_copy = OpenChannel_get_shutdown_scriptpubkey(&this_ptr_conv); + *ret_copy = CommonOpenChannelFields_get_shutdown_scriptpubkey(&this_ptr_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -47264,24 +51519,24 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1shutdown_1sc CHECK_ACCESS(val_ptr); LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr); val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val)); - OpenChannel_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); + CommonOpenChannelFields_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures ret_var = OpenChannel_get_channel_type(&this_ptr_conv); + LDKChannelTypeFeatures ret_var = CommonOpenChannelFields_get_channel_type(&this_ptr_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -47291,25 +51546,27 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1typ val_conv.is_owned = ptr_is_owned(val); CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); val_conv = ChannelTypeFeatures_clone(&val_conv); - OpenChannel_set_channel_type(&this_ptr_conv, val_conv); + CommonOpenChannelFields_set_channel_type(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1new(JNIEnv *env, jclass clz, int8_tArray chain_hash_arg, int8_tArray temporary_channel_id_arg, int64_t funding_satoshis_arg, int64_t push_msat_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t channel_reserve_satoshis_arg, int64_t htlc_minimum_msat_arg, int32_t feerate_per_kw_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_point_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_t channel_flags_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1new(JNIEnv *env, jclass clz, int8_tArray chain_hash_arg, int64_t temporary_channel_id_arg, int64_t funding_satoshis_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int32_t commitment_feerate_sat_per_1000_weight_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_t channel_flags_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg) { LDKThirtyTwoBytes chain_hash_arg_ref; CHECK((*env)->GetArrayLength(env, chain_hash_arg) == 32); (*env)->GetByteArrayRegion(env, chain_hash_arg, 0, 32, chain_hash_arg_ref.data); - LDKThirtyTwoBytes temporary_channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, temporary_channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, temporary_channel_id_arg, 0, 32, temporary_channel_id_arg_ref.data); + LDKChannelId temporary_channel_id_arg_conv; + temporary_channel_id_arg_conv.inner = untag_ptr(temporary_channel_id_arg); + temporary_channel_id_arg_conv.is_owned = ptr_is_owned(temporary_channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_arg_conv); + temporary_channel_id_arg_conv = ChannelId_clone(&temporary_channel_id_arg_conv); LDKPublicKey funding_pubkey_arg_ref; CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33); (*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form); LDKPublicKey revocation_basepoint_arg_ref; CHECK((*env)->GetArrayLength(env, revocation_basepoint_arg) == 33); (*env)->GetByteArrayRegion(env, revocation_basepoint_arg, 0, 33, revocation_basepoint_arg_ref.compressed_form); - LDKPublicKey payment_point_arg_ref; - CHECK((*env)->GetArrayLength(env, payment_point_arg) == 33); - (*env)->GetByteArrayRegion(env, payment_point_arg, 0, 33, payment_point_arg_ref.compressed_form); + LDKPublicKey payment_basepoint_arg_ref; + CHECK((*env)->GetArrayLength(env, payment_basepoint_arg) == 33); + (*env)->GetByteArrayRegion(env, payment_basepoint_arg, 0, 33, payment_basepoint_arg_ref.compressed_form); LDKPublicKey delayed_payment_basepoint_arg_ref; CHECK((*env)->GetArrayLength(env, delayed_payment_basepoint_arg) == 33); (*env)->GetByteArrayRegion(env, delayed_payment_basepoint_arg, 0, 33, delayed_payment_basepoint_arg_ref.compressed_form); @@ -47328,7 +51585,148 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1new(JNIEnv *en channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv); channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv); - LDKOpenChannel ret_var = OpenChannel_new(chain_hash_arg_ref, temporary_channel_id_arg_ref, funding_satoshis_arg, push_msat_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, feerate_per_kw_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_point_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, channel_flags_arg, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv); + LDKCommonOpenChannelFields ret_var = CommonOpenChannelFields_new(chain_hash_arg_ref, temporary_channel_id_arg_conv, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, commitment_feerate_sat_per_1000_weight_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, channel_flags_arg, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t CommonOpenChannelFields_clone_ptr(LDKCommonOpenChannelFields *NONNULL_PTR arg) { + LDKCommonOpenChannelFields ret_var = CommonOpenChannelFields_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCommonOpenChannelFields arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = CommonOpenChannelFields_clone_ptr(&arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCommonOpenChannelFields orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKCommonOpenChannelFields ret_var = CommonOpenChannelFields_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1hash(JNIEnv *env, jclass clz, int64_t o) { + LDKCommonOpenChannelFields o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = CommonOpenChannelFields_hash(&o_conv); + return ret_conv; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKCommonOpenChannelFields a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKCommonOpenChannelFields b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = CommonOpenChannelFields_eq(&a_conv, &b_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKOpenChannel this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + OpenChannel_free(this_obj_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCommonOpenChannelFields ret_var = OpenChannel_get_common_fields(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCommonOpenChannelFields val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = CommonOpenChannelFields_clone(&val_conv); + OpenChannel_set_common_fields(&this_ptr_conv, val_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1push_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int64_t ret_conv = OpenChannel_get_push_msat(&this_ptr_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1push_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + OpenChannel_set_push_msat(&this_ptr_conv, val); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int64_t ret_conv = OpenChannel_get_channel_reserve_satoshis(&this_ptr_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + OpenChannel_set_channel_reserve_satoshis(&this_ptr_conv, val); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1new(JNIEnv *env, jclass clz, int64_t common_fields_arg, int64_t push_msat_arg, int64_t channel_reserve_satoshis_arg) { + LDKCommonOpenChannelFields common_fields_arg_conv; + common_fields_arg_conv.inner = untag_ptr(common_fields_arg); + common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv); + common_fields_arg_conv = CommonOpenChannelFields_clone(&common_fields_arg_conv); + LDKOpenChannel ret_var = OpenChannel_new(common_fields_arg_conv, push_msat_arg, channel_reserve_satoshis_arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -47398,50 +51796,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1free(JNIEnv *en OpenChannelV2_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKOpenChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *OpenChannelV2_get_chain_hash(&this_ptr_conv)); - return ret_arr; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - OpenChannelV2_set_chain_hash(&this_ptr_conv, val_ref); -} - -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *OpenChannelV2_get_temporary_channel_id(&this_ptr_conv)); - return ret_arr; + LDKCommonOpenChannelFields ret_var = OpenChannelV2_get_common_fields(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKOpenChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - OpenChannelV2_set_temporary_channel_id(&this_ptr_conv, val_ref); + LDKCommonOpenChannelFields val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = CommonOpenChannelFields_clone(&val_conv); + OpenChannelV2_set_common_fields(&this_ptr_conv, val_conv); } JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1funding_1feerate_1sat_1per_11000_1weight(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -47463,139 +51842,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1funding_1f OpenChannelV2_set_funding_feerate_sat_per_1000_weight(&this_ptr_conv, val); } -JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1commitment_1feerate_1sat_1per_11000_1weight(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int32_t ret_conv = OpenChannelV2_get_commitment_feerate_sat_per_1000_weight(&this_ptr_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1commitment_1feerate_1sat_1per_11000_1weight(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_commitment_feerate_sat_per_1000_weight(&this_ptr_conv, val); -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannelV2_get_funding_satoshis(&this_ptr_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_funding_satoshis(&this_ptr_conv, val); -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannelV2_get_dust_limit_satoshis(&this_ptr_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_dust_limit_satoshis(&this_ptr_conv, val); -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannelV2_get_max_htlc_value_in_flight_msat(&this_ptr_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannelV2_get_htlc_minimum_msat(&this_ptr_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_htlc_minimum_msat(&this_ptr_conv, val); -} - -JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int16_t ret_conv = OpenChannelV2_get_to_self_delay(&this_ptr_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_to_self_delay(&this_ptr_conv, val); -} - -JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int16_t ret_conv = OpenChannelV2_get_max_accepted_htlcs(&this_ptr_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_max_accepted_htlcs(&this_ptr_conv, val); -} - JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1locktime(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKOpenChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -47615,144 +51861,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1locktime(J OpenChannelV2_set_locktime(&this_ptr_conv, val); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_funding_pubkey(&this_ptr_conv).compressed_form); - return ret_arr; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK((*env)->GetArrayLength(env, val) == 33); - (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - OpenChannelV2_set_funding_pubkey(&this_ptr_conv, val_ref); -} - -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_revocation_basepoint(&this_ptr_conv).compressed_form); - return ret_arr; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK((*env)->GetArrayLength(env, val) == 33); - (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - OpenChannelV2_set_revocation_basepoint(&this_ptr_conv, val_ref); -} - -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_payment_basepoint(&this_ptr_conv).compressed_form); - return ret_arr; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK((*env)->GetArrayLength(env, val) == 33); - (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - OpenChannelV2_set_payment_basepoint(&this_ptr_conv, val_ref); -} - -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form); - return ret_arr; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK((*env)->GetArrayLength(env, val) == 33); - (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - OpenChannelV2_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); -} - -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_htlc_basepoint(&this_ptr_conv).compressed_form); - return ret_arr; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK((*env)->GetArrayLength(env, val) == 33); - (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - OpenChannelV2_set_htlc_basepoint(&this_ptr_conv, val_ref); -} - -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_first_per_commitment_point(&this_ptr_conv).compressed_form); - return ret_arr; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK((*env)->GetArrayLength(env, val) == 33); - (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - OpenChannelV2_set_first_per_commitment_point(&this_ptr_conv, val_ref); -} - JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1second_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKOpenChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -47776,77 +51884,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1second_1pe OpenChannelV2_set_second_per_commitment_point(&this_ptr_conv, val_ref); } -JNIEXPORT int8_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_t ret_conv = OpenChannelV2_get_channel_flags(&this_ptr_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr, int8_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_channel_flags(&this_ptr_conv, val); -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ"); - *ret_copy = OpenChannelV2_get_shutdown_scriptpubkey(&this_ptr_conv); - int64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - void* val_ptr = untag_ptr(val); - CHECK_ACCESS(val_ptr); - LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr); - val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val)); - OpenChannelV2_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures ret_var = OpenChannelV2_get_channel_type(&this_ptr_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures val_conv; - val_conv.inner = untag_ptr(val); - val_conv.is_owned = ptr_is_owned(val); - CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); - val_conv = ChannelTypeFeatures_clone(&val_conv); - OpenChannelV2_set_channel_type(&this_ptr_conv, val_conv); -} - JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1require_1confirmed_1inputs(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKOpenChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -47867,45 +51904,17 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1require_1c OpenChannelV2_set_require_confirmed_inputs(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1new(JNIEnv *env, jclass clz, int8_tArray chain_hash_arg, int8_tArray temporary_channel_id_arg, int32_t funding_feerate_sat_per_1000_weight_arg, int32_t commitment_feerate_sat_per_1000_weight_arg, int64_t funding_satoshis_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int32_t locktime_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_tArray second_per_commitment_point_arg, int8_t channel_flags_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg, jclass require_confirmed_inputs_arg) { - LDKThirtyTwoBytes chain_hash_arg_ref; - CHECK((*env)->GetArrayLength(env, chain_hash_arg) == 32); - (*env)->GetByteArrayRegion(env, chain_hash_arg, 0, 32, chain_hash_arg_ref.data); - LDKThirtyTwoBytes temporary_channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, temporary_channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, temporary_channel_id_arg, 0, 32, temporary_channel_id_arg_ref.data); - LDKPublicKey funding_pubkey_arg_ref; - CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33); - (*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form); - LDKPublicKey revocation_basepoint_arg_ref; - CHECK((*env)->GetArrayLength(env, revocation_basepoint_arg) == 33); - (*env)->GetByteArrayRegion(env, revocation_basepoint_arg, 0, 33, revocation_basepoint_arg_ref.compressed_form); - LDKPublicKey payment_basepoint_arg_ref; - CHECK((*env)->GetArrayLength(env, payment_basepoint_arg) == 33); - (*env)->GetByteArrayRegion(env, payment_basepoint_arg, 0, 33, payment_basepoint_arg_ref.compressed_form); - LDKPublicKey delayed_payment_basepoint_arg_ref; - CHECK((*env)->GetArrayLength(env, delayed_payment_basepoint_arg) == 33); - (*env)->GetByteArrayRegion(env, delayed_payment_basepoint_arg, 0, 33, delayed_payment_basepoint_arg_ref.compressed_form); - LDKPublicKey htlc_basepoint_arg_ref; - CHECK((*env)->GetArrayLength(env, htlc_basepoint_arg) == 33); - (*env)->GetByteArrayRegion(env, htlc_basepoint_arg, 0, 33, htlc_basepoint_arg_ref.compressed_form); - LDKPublicKey first_per_commitment_point_arg_ref; - CHECK((*env)->GetArrayLength(env, first_per_commitment_point_arg) == 33); - (*env)->GetByteArrayRegion(env, first_per_commitment_point_arg, 0, 33, first_per_commitment_point_arg_ref.compressed_form); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1new(JNIEnv *env, jclass clz, int64_t common_fields_arg, int32_t funding_feerate_sat_per_1000_weight_arg, int32_t locktime_arg, int8_tArray second_per_commitment_point_arg, jclass require_confirmed_inputs_arg) { + LDKCommonOpenChannelFields common_fields_arg_conv; + common_fields_arg_conv.inner = untag_ptr(common_fields_arg); + common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv); + common_fields_arg_conv = CommonOpenChannelFields_clone(&common_fields_arg_conv); LDKPublicKey second_per_commitment_point_arg_ref; CHECK((*env)->GetArrayLength(env, second_per_commitment_point_arg) == 33); (*env)->GetByteArrayRegion(env, second_per_commitment_point_arg, 0, 33, second_per_commitment_point_arg_ref.compressed_form); - void* shutdown_scriptpubkey_arg_ptr = untag_ptr(shutdown_scriptpubkey_arg); - CHECK_ACCESS(shutdown_scriptpubkey_arg_ptr); - LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg_conv = *(LDKCOption_CVec_u8ZZ*)(shutdown_scriptpubkey_arg_ptr); - shutdown_scriptpubkey_arg_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(shutdown_scriptpubkey_arg)); - LDKChannelTypeFeatures channel_type_arg_conv; - channel_type_arg_conv.inner = untag_ptr(channel_type_arg); - channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv); - channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv); LDKCOption_NoneZ require_confirmed_inputs_arg_conv = LDKCOption_NoneZ_from_java(env, require_confirmed_inputs_arg); - LDKOpenChannelV2 ret_var = OpenChannelV2_new(chain_hash_arg_ref, temporary_channel_id_arg_ref, funding_feerate_sat_per_1000_weight_arg, commitment_feerate_sat_per_1000_weight_arg, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, to_self_delay_arg, max_accepted_htlcs_arg, locktime_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, second_per_commitment_point_arg_ref, channel_flags_arg, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv, require_confirmed_inputs_arg_conv); + LDKOpenChannelV2 ret_var = OpenChannelV2_new(common_fields_arg_conv, funding_feerate_sat_per_1000_weight_arg, locktime_arg, second_per_commitment_point_arg_ref, require_confirmed_inputs_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -47967,183 +51976,168 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1eq(JNIEnv * return ret_conv; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1free(JNIEnv *env, jclass clz, int64_t this_obj) { - LDKAcceptChannel this_obj_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKCommonAcceptChannelFields this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); this_obj_conv.is_owned = ptr_is_owned(this_obj); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - AcceptChannel_free(this_obj_conv); + CommonAcceptChannelFields_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *AcceptChannel_get_temporary_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = CommonAcceptChannelFields_get_temporary_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - AcceptChannel_set_temporary_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + CommonAcceptChannelFields_set_temporary_channel_id(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannel_get_dust_limit_satoshis(&this_ptr_conv); + int64_t ret_conv = CommonAcceptChannelFields_get_dust_limit_satoshis(&this_ptr_conv); return ret_conv; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_dust_limit_satoshis(&this_ptr_conv, val); + CommonAcceptChannelFields_set_dust_limit_satoshis(&this_ptr_conv, val); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannel_get_max_htlc_value_in_flight_msat(&this_ptr_conv); + int64_t ret_conv = CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat(&this_ptr_conv); return ret_conv; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); + CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannel_get_channel_reserve_satoshis(&this_ptr_conv); + int64_t ret_conv = CommonAcceptChannelFields_get_htlc_minimum_msat(&this_ptr_conv); return ret_conv; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_channel_reserve_satoshis(&this_ptr_conv, val); + CommonAcceptChannelFields_set_htlc_minimum_msat(&this_ptr_conv, val); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannel_get_htlc_minimum_msat(&this_ptr_conv); + int32_t ret_conv = CommonAcceptChannelFields_get_minimum_depth(&this_ptr_conv); return ret_conv; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_htlc_minimum_msat(&this_ptr_conv, val); + CommonAcceptChannelFields_set_minimum_depth(&this_ptr_conv, val); } -JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int32_t ret_conv = AcceptChannel_get_minimum_depth(&this_ptr_conv); + int16_t ret_conv = CommonAcceptChannelFields_get_to_self_delay(&this_ptr_conv); return ret_conv; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_minimum_depth(&this_ptr_conv, val); + CommonAcceptChannelFields_set_to_self_delay(&this_ptr_conv, val); } -JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int16_t ret_conv = AcceptChannel_get_to_self_delay(&this_ptr_conv); + int16_t ret_conv = CommonAcceptChannelFields_get_max_accepted_htlcs(&this_ptr_conv); return ret_conv; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_to_self_delay(&this_ptr_conv, val); + CommonAcceptChannelFields_set_max_accepted_htlcs(&this_ptr_conv, val); } -JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int16_t ret_conv = AcceptChannel_get_max_accepted_htlcs(&this_ptr_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) { - LDKAcceptChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannel_set_max_accepted_htlcs(&this_ptr_conv, val); -} - -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_funding_pubkey(&this_ptr_conv).compressed_form); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_funding_pubkey(&this_ptr_conv).compressed_form); return ret_arr; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -48151,22 +52145,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1funding_1p LDKPublicKey val_ref; CHECK((*env)->GetArrayLength(env, val) == 33); (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - AcceptChannel_set_funding_pubkey(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_funding_pubkey(&this_ptr_conv, val_ref); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_revocation_basepoint(&this_ptr_conv).compressed_form); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_revocation_basepoint(&this_ptr_conv).compressed_form); return ret_arr; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -48174,22 +52168,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1revocation LDKPublicKey val_ref; CHECK((*env)->GetArrayLength(env, val) == 33); (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - AcceptChannel_set_revocation_basepoint(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_revocation_basepoint(&this_ptr_conv, val_ref); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1payment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_payment_point(&this_ptr_conv).compressed_form); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_payment_basepoint(&this_ptr_conv).compressed_form); return ret_arr; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1payment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -48197,22 +52191,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1payment_1p LDKPublicKey val_ref; CHECK((*env)->GetArrayLength(env, val) == 33); (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - AcceptChannel_set_payment_point(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_payment_basepoint(&this_ptr_conv, val_ref); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form); return ret_arr; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -48220,22 +52214,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1delayed_1p LDKPublicKey val_ref; CHECK((*env)->GetArrayLength(env, val) == 33); (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - AcceptChannel_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_htlc_basepoint(&this_ptr_conv).compressed_form); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_htlc_basepoint(&this_ptr_conv).compressed_form); return ret_arr; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -48243,22 +52237,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1htlc_1base LDKPublicKey val_ref; CHECK((*env)->GetArrayLength(env, val) == 33); (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - AcceptChannel_set_htlc_basepoint(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_htlc_basepoint(&this_ptr_conv, val_ref); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_first_per_commitment_point(&this_ptr_conv).compressed_form); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_first_per_commitment_point(&this_ptr_conv).compressed_form); return ret_arr; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -48266,23 +52260,23 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1first_1per LDKPublicKey val_ref; CHECK((*env)->GetArrayLength(env, val) == 33); (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - AcceptChannel_set_first_per_commitment_point(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_first_per_commitment_point(&this_ptr_conv, val_ref); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ"); - *ret_copy = AcceptChannel_get_shutdown_scriptpubkey(&this_ptr_conv); + *ret_copy = CommonAcceptChannelFields_get_shutdown_scriptpubkey(&this_ptr_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -48291,24 +52285,24 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1shutdown_1 CHECK_ACCESS(val_ptr); LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr); val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val)); - AcceptChannel_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); + CommonAcceptChannelFields_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures ret_var = AcceptChannel_get_channel_type(&this_ptr_conv); + LDKChannelTypeFeatures ret_var = CommonAcceptChannelFields_get_channel_type(&this_ptr_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKAcceptChannel this_ptr_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -48318,22 +52312,24 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1t val_conv.is_owned = ptr_is_owned(val); CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); val_conv = ChannelTypeFeatures_clone(&val_conv); - AcceptChannel_set_channel_type(&this_ptr_conv, val_conv); + CommonAcceptChannelFields_set_channel_type(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1new(JNIEnv *env, jclass clz, int8_tArray temporary_channel_id_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t channel_reserve_satoshis_arg, int64_t htlc_minimum_msat_arg, int32_t minimum_depth_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_point_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg) { - LDKThirtyTwoBytes temporary_channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, temporary_channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, temporary_channel_id_arg, 0, 32, temporary_channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1new(JNIEnv *env, jclass clz, int64_t temporary_channel_id_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int32_t minimum_depth_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg) { + LDKChannelId temporary_channel_id_arg_conv; + temporary_channel_id_arg_conv.inner = untag_ptr(temporary_channel_id_arg); + temporary_channel_id_arg_conv.is_owned = ptr_is_owned(temporary_channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_arg_conv); + temporary_channel_id_arg_conv = ChannelId_clone(&temporary_channel_id_arg_conv); LDKPublicKey funding_pubkey_arg_ref; CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33); (*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form); LDKPublicKey revocation_basepoint_arg_ref; CHECK((*env)->GetArrayLength(env, revocation_basepoint_arg) == 33); (*env)->GetByteArrayRegion(env, revocation_basepoint_arg, 0, 33, revocation_basepoint_arg_ref.compressed_form); - LDKPublicKey payment_point_arg_ref; - CHECK((*env)->GetArrayLength(env, payment_point_arg) == 33); - (*env)->GetByteArrayRegion(env, payment_point_arg, 0, 33, payment_point_arg_ref.compressed_form); + LDKPublicKey payment_basepoint_arg_ref; + CHECK((*env)->GetArrayLength(env, payment_basepoint_arg) == 33); + (*env)->GetByteArrayRegion(env, payment_basepoint_arg, 0, 33, payment_basepoint_arg_ref.compressed_form); LDKPublicKey delayed_payment_basepoint_arg_ref; CHECK((*env)->GetArrayLength(env, delayed_payment_basepoint_arg) == 33); (*env)->GetByteArrayRegion(env, delayed_payment_basepoint_arg, 0, 33, delayed_payment_basepoint_arg_ref.compressed_form); @@ -48352,7 +52348,129 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1new(JNIEnv * channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv); channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv); - LDKAcceptChannel ret_var = AcceptChannel_new(temporary_channel_id_arg_ref, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_point_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv); + LDKCommonAcceptChannelFields ret_var = CommonAcceptChannelFields_new(temporary_channel_id_arg_conv, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t CommonAcceptChannelFields_clone_ptr(LDKCommonAcceptChannelFields *NONNULL_PTR arg) { + LDKCommonAcceptChannelFields ret_var = CommonAcceptChannelFields_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKCommonAcceptChannelFields arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = CommonAcceptChannelFields_clone_ptr(&arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKCommonAcceptChannelFields orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKCommonAcceptChannelFields ret_var = CommonAcceptChannelFields_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1hash(JNIEnv *env, jclass clz, int64_t o) { + LDKCommonAcceptChannelFields o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = CommonAcceptChannelFields_hash(&o_conv); + return ret_conv; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKCommonAcceptChannelFields a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKCommonAcceptChannelFields b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = CommonAcceptChannelFields_eq(&a_conv, &b_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKAcceptChannel this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + AcceptChannel_free(this_obj_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKAcceptChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCommonAcceptChannelFields ret_var = AcceptChannel_get_common_fields(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKAcceptChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCommonAcceptChannelFields val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = CommonAcceptChannelFields_clone(&val_conv); + AcceptChannel_set_common_fields(&this_ptr_conv, val_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKAcceptChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int64_t ret_conv = AcceptChannel_get_channel_reserve_satoshis(&this_ptr_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKAcceptChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + AcceptChannel_set_channel_reserve_satoshis(&this_ptr_conv, val); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1new(JNIEnv *env, jclass clz, int64_t common_fields_arg, int64_t channel_reserve_satoshis_arg) { + LDKCommonAcceptChannelFields common_fields_arg_conv; + common_fields_arg_conv.inner = untag_ptr(common_fields_arg); + common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv); + common_fields_arg_conv = CommonAcceptChannelFields_clone(&common_fields_arg_conv); + LDKAcceptChannel ret_var = AcceptChannel_new(common_fields_arg_conv, channel_reserve_satoshis_arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -48422,27 +52540,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1free(JNIEnv * AcceptChannelV2_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKAcceptChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *AcceptChannelV2_get_temporary_channel_id(&this_ptr_conv)); - return ret_arr; + LDKCommonAcceptChannelFields ret_var = AcceptChannelV2_get_common_fields(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKAcceptChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - AcceptChannelV2_set_temporary_channel_id(&this_ptr_conv, val_ref); + LDKCommonAcceptChannelFields val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = CommonAcceptChannelFields_clone(&val_conv); + AcceptChannelV2_set_common_fields(&this_ptr_conv, val_conv); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -48464,258 +52586,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1funding_ AcceptChannelV2_set_funding_satoshis(&this_ptr_conv, val); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannelV2_get_dust_limit_satoshis(&this_ptr_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_dust_limit_satoshis(&this_ptr_conv, val); -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannelV2_get_max_htlc_value_in_flight_msat(&this_ptr_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannelV2_get_htlc_minimum_msat(&this_ptr_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_htlc_minimum_msat(&this_ptr_conv, val); -} - -JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int32_t ret_conv = AcceptChannelV2_get_minimum_depth(&this_ptr_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_minimum_depth(&this_ptr_conv, val); -} - -JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int16_t ret_conv = AcceptChannelV2_get_to_self_delay(&this_ptr_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_to_self_delay(&this_ptr_conv, val); -} - -JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int16_t ret_conv = AcceptChannelV2_get_max_accepted_htlcs(&this_ptr_conv); - return ret_conv; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_max_accepted_htlcs(&this_ptr_conv, val); -} - -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_funding_pubkey(&this_ptr_conv).compressed_form); - return ret_arr; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK((*env)->GetArrayLength(env, val) == 33); - (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - AcceptChannelV2_set_funding_pubkey(&this_ptr_conv, val_ref); -} - -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_revocation_basepoint(&this_ptr_conv).compressed_form); - return ret_arr; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK((*env)->GetArrayLength(env, val) == 33); - (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - AcceptChannelV2_set_revocation_basepoint(&this_ptr_conv, val_ref); -} - -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_payment_basepoint(&this_ptr_conv).compressed_form); - return ret_arr; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK((*env)->GetArrayLength(env, val) == 33); - (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - AcceptChannelV2_set_payment_basepoint(&this_ptr_conv, val_ref); -} - -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form); - return ret_arr; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK((*env)->GetArrayLength(env, val) == 33); - (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - AcceptChannelV2_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); -} - -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_htlc_basepoint(&this_ptr_conv).compressed_form); - return ret_arr; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK((*env)->GetArrayLength(env, val) == 33); - (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - AcceptChannelV2_set_htlc_basepoint(&this_ptr_conv, val_ref); -} - -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_first_per_commitment_point(&this_ptr_conv).compressed_form); - return ret_arr; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK((*env)->GetArrayLength(env, val) == 33); - (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - AcceptChannelV2_set_first_per_commitment_point(&this_ptr_conv, val_ref); -} - JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1second_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKAcceptChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -48739,58 +52609,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1second_1 AcceptChannelV2_set_second_per_commitment_point(&this_ptr_conv, val_ref); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ"); - *ret_copy = AcceptChannelV2_get_shutdown_scriptpubkey(&this_ptr_conv); - int64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - void* val_ptr = untag_ptr(val); - CHECK_ACCESS(val_ptr); - LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr); - val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val)); - AcceptChannelV2_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); -} - -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures ret_var = AcceptChannelV2_get_channel_type(&this_ptr_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures val_conv; - val_conv.inner = untag_ptr(val); - val_conv.is_owned = ptr_is_owned(val); - CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); - val_conv = ChannelTypeFeatures_clone(&val_conv); - AcceptChannelV2_set_channel_type(&this_ptr_conv, val_conv); -} - JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1require_1confirmed_1inputs(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKAcceptChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -48811,42 +52629,17 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1require_ AcceptChannelV2_set_require_confirmed_inputs(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1new(JNIEnv *env, jclass clz, int8_tArray temporary_channel_id_arg, int64_t funding_satoshis_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int32_t minimum_depth_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_tArray second_per_commitment_point_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg, jclass require_confirmed_inputs_arg) { - LDKThirtyTwoBytes temporary_channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, temporary_channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, temporary_channel_id_arg, 0, 32, temporary_channel_id_arg_ref.data); - LDKPublicKey funding_pubkey_arg_ref; - CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33); - (*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form); - LDKPublicKey revocation_basepoint_arg_ref; - CHECK((*env)->GetArrayLength(env, revocation_basepoint_arg) == 33); - (*env)->GetByteArrayRegion(env, revocation_basepoint_arg, 0, 33, revocation_basepoint_arg_ref.compressed_form); - LDKPublicKey payment_basepoint_arg_ref; - CHECK((*env)->GetArrayLength(env, payment_basepoint_arg) == 33); - (*env)->GetByteArrayRegion(env, payment_basepoint_arg, 0, 33, payment_basepoint_arg_ref.compressed_form); - LDKPublicKey delayed_payment_basepoint_arg_ref; - CHECK((*env)->GetArrayLength(env, delayed_payment_basepoint_arg) == 33); - (*env)->GetByteArrayRegion(env, delayed_payment_basepoint_arg, 0, 33, delayed_payment_basepoint_arg_ref.compressed_form); - LDKPublicKey htlc_basepoint_arg_ref; - CHECK((*env)->GetArrayLength(env, htlc_basepoint_arg) == 33); - (*env)->GetByteArrayRegion(env, htlc_basepoint_arg, 0, 33, htlc_basepoint_arg_ref.compressed_form); - LDKPublicKey first_per_commitment_point_arg_ref; - CHECK((*env)->GetArrayLength(env, first_per_commitment_point_arg) == 33); - (*env)->GetByteArrayRegion(env, first_per_commitment_point_arg, 0, 33, first_per_commitment_point_arg_ref.compressed_form); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1new(JNIEnv *env, jclass clz, int64_t common_fields_arg, int64_t funding_satoshis_arg, int8_tArray second_per_commitment_point_arg, jclass require_confirmed_inputs_arg) { + LDKCommonAcceptChannelFields common_fields_arg_conv; + common_fields_arg_conv.inner = untag_ptr(common_fields_arg); + common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv); + common_fields_arg_conv = CommonAcceptChannelFields_clone(&common_fields_arg_conv); LDKPublicKey second_per_commitment_point_arg_ref; CHECK((*env)->GetArrayLength(env, second_per_commitment_point_arg) == 33); (*env)->GetByteArrayRegion(env, second_per_commitment_point_arg, 0, 33, second_per_commitment_point_arg_ref.compressed_form); - void* shutdown_scriptpubkey_arg_ptr = untag_ptr(shutdown_scriptpubkey_arg); - CHECK_ACCESS(shutdown_scriptpubkey_arg_ptr); - LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg_conv = *(LDKCOption_CVec_u8ZZ*)(shutdown_scriptpubkey_arg_ptr); - shutdown_scriptpubkey_arg_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(shutdown_scriptpubkey_arg)); - LDKChannelTypeFeatures channel_type_arg_conv; - channel_type_arg_conv.inner = untag_ptr(channel_type_arg); - channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv); - channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv); LDKCOption_NoneZ require_confirmed_inputs_arg_conv = LDKCOption_NoneZ_from_java(env, require_confirmed_inputs_arg); - LDKAcceptChannelV2 ret_var = AcceptChannelV2_new(temporary_channel_id_arg_ref, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, second_per_commitment_point_arg_ref, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv, require_confirmed_inputs_arg_conv); + LDKAcceptChannelV2 ret_var = AcceptChannelV2_new(common_fields_arg_conv, funding_satoshis_arg, second_per_commitment_point_arg_ref, require_confirmed_inputs_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -48916,27 +52709,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1free(JNIEnv *e FundingCreated_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKFundingCreated this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *FundingCreated_get_temporary_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = FundingCreated_get_temporary_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKFundingCreated this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - FundingCreated_set_temporary_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + FundingCreated_set_temporary_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1funding_1txid(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -49004,17 +52801,19 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1signature FundingCreated_set_signature(&this_ptr_conv, val_ref); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingCreated_1new(JNIEnv *env, jclass clz, int8_tArray temporary_channel_id_arg, int8_tArray funding_txid_arg, int16_t funding_output_index_arg, int8_tArray signature_arg) { - LDKThirtyTwoBytes temporary_channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, temporary_channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, temporary_channel_id_arg, 0, 32, temporary_channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingCreated_1new(JNIEnv *env, jclass clz, int64_t temporary_channel_id_arg, int8_tArray funding_txid_arg, int16_t funding_output_index_arg, int8_tArray signature_arg) { + LDKChannelId temporary_channel_id_arg_conv; + temporary_channel_id_arg_conv.inner = untag_ptr(temporary_channel_id_arg); + temporary_channel_id_arg_conv.is_owned = ptr_is_owned(temporary_channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_arg_conv); + temporary_channel_id_arg_conv = ChannelId_clone(&temporary_channel_id_arg_conv); LDKThirtyTwoBytes funding_txid_arg_ref; CHECK((*env)->GetArrayLength(env, funding_txid_arg) == 32); (*env)->GetByteArrayRegion(env, funding_txid_arg, 0, 32, funding_txid_arg_ref.data); LDKECDSASignature signature_arg_ref; CHECK((*env)->GetArrayLength(env, signature_arg) == 64); (*env)->GetByteArrayRegion(env, signature_arg, 0, 64, signature_arg_ref.compact_form); - LDKFundingCreated ret_var = FundingCreated_new(temporary_channel_id_arg_ref, funding_txid_arg_ref, funding_output_index_arg, signature_arg_ref); + LDKFundingCreated ret_var = FundingCreated_new(temporary_channel_id_arg_conv, funding_txid_arg_ref, funding_output_index_arg, signature_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -49084,27 +52883,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1free(JNIEnv *en FundingSigned_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKFundingSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *FundingSigned_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = FundingSigned_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKFundingSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - FundingSigned_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + FundingSigned_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingSigned_1get_1signature(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -49130,14 +52933,16 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1set_1signature( FundingSigned_set_signature(&this_ptr_conv, val_ref); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingSigned_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray signature_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingSigned_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray signature_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKECDSASignature signature_arg_ref; CHECK((*env)->GetArrayLength(env, signature_arg) == 64); (*env)->GetByteArrayRegion(env, signature_arg, 0, 64, signature_arg_ref.compact_form); - LDKFundingSigned ret_var = FundingSigned_new(channel_id_arg_ref, signature_arg_ref); + LDKFundingSigned ret_var = FundingSigned_new(channel_id_arg_conv, signature_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -49207,27 +53012,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReady_1free(JNIEnv *env ChannelReady_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelReady_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReady_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKChannelReady this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ChannelReady_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = ChannelReady_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReady_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReady_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKChannelReady this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - ChannelReady_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ChannelReady_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelReady_1get_1next_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -49278,10 +53087,12 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReady_1set_1short_1chan ChannelReady_set_short_channel_id_alias(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReady_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray next_per_commitment_point_arg, int64_t short_channel_id_alias_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReady_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray next_per_commitment_point_arg, int64_t short_channel_id_alias_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKPublicKey next_per_commitment_point_arg_ref; CHECK((*env)->GetArrayLength(env, next_per_commitment_point_arg) == 33); (*env)->GetByteArrayRegion(env, next_per_commitment_point_arg, 0, 33, next_per_commitment_point_arg_ref.compressed_form); @@ -49289,7 +53100,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReady_1new(JNIEnv *e CHECK_ACCESS(short_channel_id_alias_arg_ptr); LDKCOption_u64Z short_channel_id_alias_arg_conv = *(LDKCOption_u64Z*)(short_channel_id_alias_arg_ptr); short_channel_id_alias_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(short_channel_id_alias_arg)); - LDKChannelReady ret_var = ChannelReady_new(channel_id_arg_ref, next_per_commitment_point_arg_ref, short_channel_id_alias_arg_conv); + LDKChannelReady ret_var = ChannelReady_new(channel_id_arg_conv, next_per_commitment_point_arg_ref, short_channel_id_alias_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -49359,27 +53170,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Stfu_1free(JNIEnv *env, jclass Stfu_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Stfu_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Stfu_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKStfu this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *Stfu_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = Stfu_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Stfu_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Stfu_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKStfu this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - Stfu_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + Stfu_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int8_t JNICALL Java_org_ldk_impl_bindings_Stfu_1get_1initiator(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -49401,11 +53216,13 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Stfu_1set_1initiator(JNIEnv *e Stfu_set_initiator(&this_ptr_conv, val); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Stfu_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_t initiator_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); - LDKStfu ret_var = Stfu_new(channel_id_arg_ref, initiator_arg); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Stfu_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_t initiator_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKStfu ret_var = Stfu_new(channel_id_arg_conv, initiator_arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -49465,27 +53282,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Splice_1free(JNIEnv *env, jcla Splice_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Splice_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Splice_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKSplice this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *Splice_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = Splice_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Splice_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Splice_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKSplice this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - Splice_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + Splice_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Splice_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -49591,17 +53412,19 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Splice_1set_1funding_1pubkey(J Splice_set_funding_pubkey(&this_ptr_conv, val_ref); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Splice_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int32_t funding_feerate_perkw_arg, int32_t locktime_arg, int8_tArray funding_pubkey_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Splice_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int32_t funding_feerate_perkw_arg, int32_t locktime_arg, int8_tArray funding_pubkey_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes chain_hash_arg_ref; CHECK((*env)->GetArrayLength(env, chain_hash_arg) == 32); (*env)->GetByteArrayRegion(env, chain_hash_arg, 0, 32, chain_hash_arg_ref.data); LDKPublicKey funding_pubkey_arg_ref; CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33); (*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form); - LDKSplice ret_var = Splice_new(channel_id_arg_ref, chain_hash_arg_ref, relative_satoshis_arg, funding_feerate_perkw_arg, locktime_arg, funding_pubkey_arg_ref); + LDKSplice ret_var = Splice_new(channel_id_arg_conv, chain_hash_arg_ref, relative_satoshis_arg, funding_feerate_perkw_arg, locktime_arg, funding_pubkey_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -49661,27 +53484,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceAck_1free(JNIEnv *env, j SpliceAck_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_SpliceAck_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceAck_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKSpliceAck this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *SpliceAck_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = SpliceAck_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceAck_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceAck_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKSpliceAck this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - SpliceAck_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + SpliceAck_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_SpliceAck_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -49749,17 +53576,19 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceAck_1set_1funding_1pubke SpliceAck_set_funding_pubkey(&this_ptr_conv, val_ref); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceAck_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int8_tArray funding_pubkey_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceAck_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int8_tArray funding_pubkey_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes chain_hash_arg_ref; CHECK((*env)->GetArrayLength(env, chain_hash_arg) == 32); (*env)->GetByteArrayRegion(env, chain_hash_arg, 0, 32, chain_hash_arg_ref.data); LDKPublicKey funding_pubkey_arg_ref; CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33); (*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form); - LDKSpliceAck ret_var = SpliceAck_new(channel_id_arg_ref, chain_hash_arg_ref, relative_satoshis_arg, funding_pubkey_arg_ref); + LDKSpliceAck ret_var = SpliceAck_new(channel_id_arg_conv, chain_hash_arg_ref, relative_satoshis_arg, funding_pubkey_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -49819,34 +53648,40 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1free(JNIEnv *env SpliceLocked_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKSpliceLocked this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *SpliceLocked_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = SpliceLocked_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKSpliceLocked this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - SpliceLocked_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + SpliceLocked_set_channel_id(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); - LDKSpliceLocked ret_var = SpliceLocked_new(channel_id_arg_ref); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKSpliceLocked ret_var = SpliceLocked_new(channel_id_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -49906,27 +53741,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddInput_1free(JNIEnv *env, TxAddInput_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxAddInput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddInput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKTxAddInput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxAddInput_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = TxAddInput_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddInput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddInput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKTxAddInput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - TxAddInput_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxAddInput_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddInput_1get_1serial_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -50013,16 +53852,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddInput_1set_1sequence(JNIE TxAddInput_set_sequence(&this_ptr_conv, val); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddInput_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t serial_id_arg, int64_t prevtx_arg, int32_t prevtx_out_arg, int32_t sequence_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddInput_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t serial_id_arg, int64_t prevtx_arg, int32_t prevtx_out_arg, int32_t sequence_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKTransactionU16LenLimited prevtx_arg_conv; prevtx_arg_conv.inner = untag_ptr(prevtx_arg); prevtx_arg_conv.is_owned = ptr_is_owned(prevtx_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(prevtx_arg_conv); prevtx_arg_conv = TransactionU16LenLimited_clone(&prevtx_arg_conv); - LDKTxAddInput ret_var = TxAddInput_new(channel_id_arg_ref, serial_id_arg, prevtx_arg_conv, prevtx_out_arg, sequence_arg); + LDKTxAddInput ret_var = TxAddInput_new(channel_id_arg_conv, serial_id_arg, prevtx_arg_conv, prevtx_out_arg, sequence_arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -50092,27 +53933,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1free(JNIEnv *env, TxAddOutput_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKTxAddOutput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxAddOutput_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = TxAddOutput_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKTxAddOutput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - TxAddOutput_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxAddOutput_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1get_1serial_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -50179,15 +54024,17 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1set_1script(JNIEn TxAddOutput_set_script(&this_ptr_conv, val_ref); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t serial_id_arg, int64_t sats_arg, int8_tArray script_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t serial_id_arg, int64_t sats_arg, int8_tArray script_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKCVec_u8Z script_arg_ref; script_arg_ref.datalen = (*env)->GetArrayLength(env, script_arg); script_arg_ref.data = MALLOC(script_arg_ref.datalen, "LDKCVec_u8Z Bytes"); (*env)->GetByteArrayRegion(env, script_arg, 0, script_arg_ref.datalen, script_arg_ref.data); - LDKTxAddOutput ret_var = TxAddOutput_new(channel_id_arg_ref, serial_id_arg, sats_arg, script_arg_ref); + LDKTxAddOutput ret_var = TxAddOutput_new(channel_id_arg_conv, serial_id_arg, sats_arg, script_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -50257,27 +54104,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1free(JNIEnv *en TxRemoveInput_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKTxRemoveInput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxRemoveInput_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = TxRemoveInput_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKTxRemoveInput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - TxRemoveInput_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxRemoveInput_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1get_1serial_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -50299,11 +54150,13 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1set_1serial_1id TxRemoveInput_set_serial_id(&this_ptr_conv, val); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t serial_id_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); - LDKTxRemoveInput ret_var = TxRemoveInput_new(channel_id_arg_ref, serial_id_arg); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t serial_id_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKTxRemoveInput ret_var = TxRemoveInput_new(channel_id_arg_conv, serial_id_arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -50373,27 +54226,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1free(JNIEnv *e TxRemoveOutput_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKTxRemoveOutput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxRemoveOutput_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = TxRemoveOutput_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKTxRemoveOutput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - TxRemoveOutput_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxRemoveOutput_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1get_1serial_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -50415,11 +54272,13 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1set_1serial_1i TxRemoveOutput_set_serial_id(&this_ptr_conv, val); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t serial_id_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); - LDKTxRemoveOutput ret_var = TxRemoveOutput_new(channel_id_arg_ref, serial_id_arg); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t serial_id_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKTxRemoveOutput ret_var = TxRemoveOutput_new(channel_id_arg_conv, serial_id_arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -50489,34 +54348,40 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxComplete_1free(JNIEnv *env, TxComplete_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxComplete_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxComplete_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKTxComplete this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxComplete_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = TxComplete_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxComplete_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxComplete_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKTxComplete this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - TxComplete_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxComplete_set_channel_id(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxComplete_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); - LDKTxComplete ret_var = TxComplete_new(channel_id_arg_ref); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxComplete_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKTxComplete ret_var = TxComplete_new(channel_id_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -50586,27 +54451,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1free(JNIEnv *env TxSignatures_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxSignatures_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxSignatures_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKTxSignatures this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxSignatures_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = TxSignatures_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKTxSignatures this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - TxSignatures_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxSignatures_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxSignatures_1get_1tx_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -50678,10 +54547,37 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1set_1witnesses(J TxSignatures_set_witnesses(&this_ptr_conv, val_constr); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxSignatures_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray tx_hash_arg, jobjectArray witnesses_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxSignatures_1get_1funding_1outpoint_1sig(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKTxSignatures this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ"); + *ret_copy = TxSignatures_get_funding_outpoint_sig(&this_ptr_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1set_1funding_1outpoint_1sig(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKTxSignatures this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKCOption_ECDSASignatureZ val_conv = *(LDKCOption_ECDSASignatureZ*)(val_ptr); + val_conv = COption_ECDSASignatureZ_clone((LDKCOption_ECDSASignatureZ*)untag_ptr(val)); + TxSignatures_set_funding_outpoint_sig(&this_ptr_conv, val_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxSignatures_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray tx_hash_arg, jobjectArray witnesses_arg, int64_t funding_outpoint_sig_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes tx_hash_arg_ref; CHECK((*env)->GetArrayLength(env, tx_hash_arg) == 32); (*env)->GetByteArrayRegion(env, tx_hash_arg, 0, 32, tx_hash_arg_ref.data); @@ -50700,7 +54596,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxSignatures_1new(JNIEnv *e witnesses_arg_conv_8_ref.data_is_owned = true; witnesses_arg_constr.data[i] = witnesses_arg_conv_8_ref; } - LDKTxSignatures ret_var = TxSignatures_new(channel_id_arg_ref, tx_hash_arg_ref, witnesses_arg_constr); + void* funding_outpoint_sig_arg_ptr = untag_ptr(funding_outpoint_sig_arg); + CHECK_ACCESS(funding_outpoint_sig_arg_ptr); + LDKCOption_ECDSASignatureZ funding_outpoint_sig_arg_conv = *(LDKCOption_ECDSASignatureZ*)(funding_outpoint_sig_arg_ptr); + funding_outpoint_sig_arg_conv = COption_ECDSASignatureZ_clone((LDKCOption_ECDSASignatureZ*)untag_ptr(funding_outpoint_sig_arg)); + LDKTxSignatures ret_var = TxSignatures_new(channel_id_arg_conv, tx_hash_arg_ref, witnesses_arg_constr, funding_outpoint_sig_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -50770,27 +54670,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1free(JNIEnv *env, j TxInitRbf_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKTxInitRbf this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxInitRbf_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = TxInitRbf_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKTxInitRbf this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - TxInitRbf_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxInitRbf_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1get_1locktime(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -50856,15 +54760,17 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1set_1funding_1outpu TxInitRbf_set_funding_output_contribution(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int32_t locktime_arg, int32_t feerate_sat_per_1000_weight_arg, int64_t funding_output_contribution_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int32_t locktime_arg, int32_t feerate_sat_per_1000_weight_arg, int64_t funding_output_contribution_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); void* funding_output_contribution_arg_ptr = untag_ptr(funding_output_contribution_arg); CHECK_ACCESS(funding_output_contribution_arg_ptr); LDKCOption_i64Z funding_output_contribution_arg_conv = *(LDKCOption_i64Z*)(funding_output_contribution_arg_ptr); funding_output_contribution_arg_conv = COption_i64Z_clone((LDKCOption_i64Z*)untag_ptr(funding_output_contribution_arg)); - LDKTxInitRbf ret_var = TxInitRbf_new(channel_id_arg_ref, locktime_arg, feerate_sat_per_1000_weight_arg, funding_output_contribution_arg_conv); + LDKTxInitRbf ret_var = TxInitRbf_new(channel_id_arg_conv, locktime_arg, feerate_sat_per_1000_weight_arg, funding_output_contribution_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -50934,27 +54840,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1free(JNIEnv *env, jc TxAckRbf_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKTxAckRbf this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxAckRbf_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = TxAckRbf_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKTxAckRbf this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - TxAckRbf_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxAckRbf_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1get_1funding_1output_1contribution(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -50982,15 +54892,17 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1set_1funding_1output TxAckRbf_set_funding_output_contribution(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t funding_output_contribution_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t funding_output_contribution_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); void* funding_output_contribution_arg_ptr = untag_ptr(funding_output_contribution_arg); CHECK_ACCESS(funding_output_contribution_arg_ptr); LDKCOption_i64Z funding_output_contribution_arg_conv = *(LDKCOption_i64Z*)(funding_output_contribution_arg_ptr); funding_output_contribution_arg_conv = COption_i64Z_clone((LDKCOption_i64Z*)untag_ptr(funding_output_contribution_arg)); - LDKTxAckRbf ret_var = TxAckRbf_new(channel_id_arg_ref, funding_output_contribution_arg_conv); + LDKTxAckRbf ret_var = TxAckRbf_new(channel_id_arg_conv, funding_output_contribution_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -51060,27 +54972,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAbort_1free(JNIEnv *env, jcl TxAbort_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxAbort_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAbort_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKTxAbort this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxAbort_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = TxAbort_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAbort_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAbort_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKTxAbort this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - TxAbort_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxAbort_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxAbort_1get_1data(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -51109,15 +55025,17 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAbort_1set_1data(JNIEnv *env TxAbort_set_data(&this_ptr_conv, val_ref); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAbort_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray data_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAbort_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray data_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKCVec_u8Z data_arg_ref; data_arg_ref.datalen = (*env)->GetArrayLength(env, data_arg); data_arg_ref.data = MALLOC(data_arg_ref.datalen, "LDKCVec_u8Z Bytes"); (*env)->GetByteArrayRegion(env, data_arg, 0, data_arg_ref.datalen, data_arg_ref.data); - LDKTxAbort ret_var = TxAbort_new(channel_id_arg_ref, data_arg_ref); + LDKTxAbort ret_var = TxAbort_new(channel_id_arg_conv, data_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -51187,27 +55105,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1free(JNIEnv *env, jc Shutdown_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Shutdown_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Shutdown_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKShutdown this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *Shutdown_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = Shutdown_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKShutdown this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - Shutdown_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + Shutdown_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Shutdown_1get_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -51236,15 +55158,17 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1set_1scriptpubkey(JN Shutdown_set_scriptpubkey(&this_ptr_conv, val_ref); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Shutdown_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray scriptpubkey_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Shutdown_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray scriptpubkey_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKCVec_u8Z scriptpubkey_arg_ref; scriptpubkey_arg_ref.datalen = (*env)->GetArrayLength(env, scriptpubkey_arg); scriptpubkey_arg_ref.data = MALLOC(scriptpubkey_arg_ref.datalen, "LDKCVec_u8Z Bytes"); (*env)->GetByteArrayRegion(env, scriptpubkey_arg, 0, scriptpubkey_arg_ref.datalen, scriptpubkey_arg_ref.data); - LDKShutdown ret_var = Shutdown_new(channel_id_arg_ref, scriptpubkey_arg_ref); + LDKShutdown ret_var = Shutdown_new(channel_id_arg_conv, scriptpubkey_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -51423,27 +55347,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1free(JNIEnv *en ClosingSigned_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKClosingSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ClosingSigned_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = ClosingSigned_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKClosingSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - ClosingSigned_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ClosingSigned_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1fee_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -51515,10 +55443,12 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1fee_1range ClosingSigned_set_fee_range(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t fee_satoshis_arg, int8_tArray signature_arg, int64_t fee_range_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t fee_satoshis_arg, int8_tArray signature_arg, int64_t fee_range_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKECDSASignature signature_arg_ref; CHECK((*env)->GetArrayLength(env, signature_arg) == 64); (*env)->GetByteArrayRegion(env, signature_arg, 0, 64, signature_arg_ref.compact_form); @@ -51527,7 +55457,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1new(JNIEnv * fee_range_arg_conv.is_owned = ptr_is_owned(fee_range_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(fee_range_arg_conv); fee_range_arg_conv = ClosingSignedFeeRange_clone(&fee_range_arg_conv); - LDKClosingSigned ret_var = ClosingSigned_new(channel_id_arg_ref, fee_satoshis_arg, signature_arg_ref, fee_range_arg_conv); + LDKClosingSigned ret_var = ClosingSigned_new(channel_id_arg_conv, fee_satoshis_arg, signature_arg_ref, fee_range_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -51597,27 +55527,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1free(JNIEnv *en UpdateAddHTLC_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKUpdateAddHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *UpdateAddHTLC_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = UpdateAddHTLC_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKUpdateAddHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - UpdateAddHTLC_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + UpdateAddHTLC_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1htlc_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -51775,10 +55709,12 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1blinding_1 UpdateAddHTLC_set_blinding_point(&this_ptr_conv, val_ref); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t htlc_id_arg, int64_t amount_msat_arg, int8_tArray payment_hash_arg, int32_t cltv_expiry_arg, int64_t skimmed_fee_msat_arg, int64_t onion_routing_packet_arg, int8_tArray blinding_point_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t htlc_id_arg, int64_t amount_msat_arg, int8_tArray payment_hash_arg, int32_t cltv_expiry_arg, int64_t skimmed_fee_msat_arg, int64_t onion_routing_packet_arg, int8_tArray blinding_point_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes payment_hash_arg_ref; CHECK((*env)->GetArrayLength(env, payment_hash_arg) == 32); (*env)->GetByteArrayRegion(env, payment_hash_arg, 0, 32, payment_hash_arg_ref.data); @@ -51794,7 +55730,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1new(JNIEnv * LDKPublicKey blinding_point_arg_ref; CHECK((*env)->GetArrayLength(env, blinding_point_arg) == 33); (*env)->GetByteArrayRegion(env, blinding_point_arg, 0, 33, blinding_point_arg_ref.compressed_form); - LDKUpdateAddHTLC ret_var = UpdateAddHTLC_new(channel_id_arg_ref, htlc_id_arg, amount_msat_arg, payment_hash_arg_ref, cltv_expiry_arg, skimmed_fee_msat_arg_conv, onion_routing_packet_arg_conv, blinding_point_arg_ref); + LDKUpdateAddHTLC ret_var = UpdateAddHTLC_new(channel_id_arg_conv, htlc_id_arg, amount_msat_arg, payment_hash_arg_ref, cltv_expiry_arg, skimmed_fee_msat_arg_conv, onion_routing_packet_arg_conv, blinding_point_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -51993,27 +55929,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1free(JNIEnv UpdateFulfillHTLC_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKUpdateFulfillHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *UpdateFulfillHTLC_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = UpdateFulfillHTLC_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKUpdateFulfillHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - UpdateFulfillHTLC_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + UpdateFulfillHTLC_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1htlc_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -52058,14 +55998,16 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1paymen UpdateFulfillHTLC_set_payment_preimage(&this_ptr_conv, val_ref); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t htlc_id_arg, int8_tArray payment_preimage_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t htlc_id_arg, int8_tArray payment_preimage_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes payment_preimage_arg_ref; CHECK((*env)->GetArrayLength(env, payment_preimage_arg) == 32); (*env)->GetByteArrayRegion(env, payment_preimage_arg, 0, 32, payment_preimage_arg_ref.data); - LDKUpdateFulfillHTLC ret_var = UpdateFulfillHTLC_new(channel_id_arg_ref, htlc_id_arg, payment_preimage_arg_ref); + LDKUpdateFulfillHTLC ret_var = UpdateFulfillHTLC_new(channel_id_arg_conv, htlc_id_arg, payment_preimage_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -52135,27 +56077,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1free(JNIEnv *e UpdateFailHTLC_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKUpdateFailHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *UpdateFailHTLC_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = UpdateFailHTLC_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKUpdateFailHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - UpdateFailHTLC_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + UpdateFailHTLC_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1get_1htlc_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -52240,27 +56186,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1free( UpdateFailMalformedHTLC_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKUpdateFailMalformedHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *UpdateFailMalformedHTLC_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = UpdateFailMalformedHTLC_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKUpdateFailMalformedHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - UpdateFailMalformedHTLC_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + UpdateFailMalformedHTLC_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1htlc_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -52364,27 +56314,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1free(JNIEnv CommitmentSigned_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKCommitmentSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *CommitmentSigned_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = CommitmentSigned_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKCommitmentSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - CommitmentSigned_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + CommitmentSigned_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1signature(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -52452,10 +56406,12 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1htlc_1s CommitmentSigned_set_htlc_signatures(&this_ptr_conv, val_constr); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray signature_arg, jobjectArray htlc_signatures_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray signature_arg, jobjectArray htlc_signatures_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKECDSASignature signature_arg_ref; CHECK((*env)->GetArrayLength(env, signature_arg) == 64); (*env)->GetByteArrayRegion(env, signature_arg, 0, 64, signature_arg_ref.compact_form); @@ -52472,7 +56428,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1new(JNIEn (*env)->GetByteArrayRegion(env, htlc_signatures_arg_conv_8, 0, 64, htlc_signatures_arg_conv_8_ref.compact_form); htlc_signatures_arg_constr.data[i] = htlc_signatures_arg_conv_8_ref; } - LDKCommitmentSigned ret_var = CommitmentSigned_new(channel_id_arg_ref, signature_arg_ref, htlc_signatures_arg_constr); + LDKCommitmentSigned ret_var = CommitmentSigned_new(channel_id_arg_conv, signature_arg_ref, htlc_signatures_arg_constr); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -52542,27 +56498,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1free(JNIEnv *env RevokeAndACK_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKRevokeAndACK this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *RevokeAndACK_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = RevokeAndACK_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKRevokeAndACK this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - RevokeAndACK_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + RevokeAndACK_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1per_1commitment_1secret(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -52611,17 +56571,19 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1next_1per_1 RevokeAndACK_set_next_per_commitment_point(&this_ptr_conv, val_ref); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray per_commitment_secret_arg, int8_tArray next_per_commitment_point_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray per_commitment_secret_arg, int8_tArray next_per_commitment_point_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes per_commitment_secret_arg_ref; CHECK((*env)->GetArrayLength(env, per_commitment_secret_arg) == 32); (*env)->GetByteArrayRegion(env, per_commitment_secret_arg, 0, 32, per_commitment_secret_arg_ref.data); LDKPublicKey next_per_commitment_point_arg_ref; CHECK((*env)->GetArrayLength(env, next_per_commitment_point_arg) == 33); (*env)->GetByteArrayRegion(env, next_per_commitment_point_arg, 0, 33, next_per_commitment_point_arg_ref.compressed_form); - LDKRevokeAndACK ret_var = RevokeAndACK_new(channel_id_arg_ref, per_commitment_secret_arg_ref, next_per_commitment_point_arg_ref); + LDKRevokeAndACK ret_var = RevokeAndACK_new(channel_id_arg_conv, per_commitment_secret_arg_ref, next_per_commitment_point_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -52691,27 +56653,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1free(JNIEnv *env, j UpdateFee_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFee_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFee_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKUpdateFee this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *UpdateFee_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = UpdateFee_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKUpdateFee this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - UpdateFee_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + UpdateFee_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_UpdateFee_1get_1feerate_1per_1kw(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -52733,11 +56699,13 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1set_1feerate_1per_1 UpdateFee_set_feerate_per_kw(&this_ptr_conv, val); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFee_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int32_t feerate_per_kw_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); - LDKUpdateFee ret_var = UpdateFee_new(channel_id_arg_ref, feerate_per_kw_arg); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFee_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int32_t feerate_per_kw_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKUpdateFee ret_var = UpdateFee_new(channel_id_arg_conv, feerate_per_kw_arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -52807,27 +56775,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1free(JNIEn ChannelReestablish_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKChannelReestablish this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ChannelReestablish_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = ChannelReestablish_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKChannelReestablish this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - ChannelReestablish_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ChannelReestablish_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1next_1local_1commitment_1number(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -52939,10 +56911,12 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1next_ ChannelReestablish_set_next_funding_txid(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t next_local_commitment_number_arg, int64_t next_remote_commitment_number_arg, int8_tArray your_last_per_commitment_secret_arg, int8_tArray my_current_per_commitment_point_arg, int64_t next_funding_txid_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t next_local_commitment_number_arg, int64_t next_remote_commitment_number_arg, int8_tArray your_last_per_commitment_secret_arg, int8_tArray my_current_per_commitment_point_arg, int64_t next_funding_txid_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes your_last_per_commitment_secret_arg_ref; CHECK((*env)->GetArrayLength(env, your_last_per_commitment_secret_arg) == 32); (*env)->GetByteArrayRegion(env, your_last_per_commitment_secret_arg, 0, 32, your_last_per_commitment_secret_arg_ref.data); @@ -52953,7 +56927,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1new(JNI CHECK_ACCESS(next_funding_txid_arg_ptr); LDKCOption_ThirtyTwoBytesZ next_funding_txid_arg_conv = *(LDKCOption_ThirtyTwoBytesZ*)(next_funding_txid_arg_ptr); next_funding_txid_arg_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(next_funding_txid_arg)); - LDKChannelReestablish ret_var = ChannelReestablish_new(channel_id_arg_ref, next_local_commitment_number_arg, next_remote_commitment_number_arg, your_last_per_commitment_secret_arg_ref, my_current_per_commitment_point_arg_ref, next_funding_txid_arg_conv); + LDKChannelReestablish ret_var = ChannelReestablish_new(channel_id_arg_conv, next_local_commitment_number_arg, next_remote_commitment_number_arg, your_last_per_commitment_secret_arg_ref, my_current_per_commitment_point_arg_ref, next_funding_txid_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -53023,27 +56997,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1free(J AnnouncementSignatures_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKAnnouncementSignatures this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *AnnouncementSignatures_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = AnnouncementSignatures_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKAnnouncementSignatures this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - AnnouncementSignatures_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + AnnouncementSignatures_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1short_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -53111,17 +57089,19 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1b AnnouncementSignatures_set_bitcoin_signature(&this_ptr_conv, val_ref); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t short_channel_id_arg, int8_tArray node_signature_arg, int8_tArray bitcoin_signature_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t short_channel_id_arg, int8_tArray node_signature_arg, int8_tArray bitcoin_signature_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKECDSASignature node_signature_arg_ref; CHECK((*env)->GetArrayLength(env, node_signature_arg) == 64); (*env)->GetByteArrayRegion(env, node_signature_arg, 0, 64, node_signature_arg_ref.compact_form); LDKECDSASignature bitcoin_signature_arg_ref; CHECK((*env)->GetArrayLength(env, bitcoin_signature_arg) == 64); (*env)->GetByteArrayRegion(env, bitcoin_signature_arg, 0, 64, bitcoin_signature_arg_ref.compact_form); - LDKAnnouncementSignatures ret_var = AnnouncementSignatures_new(channel_id_arg_ref, short_channel_id_arg, node_signature_arg_ref, bitcoin_signature_arg_ref); + LDKAnnouncementSignatures ret_var = AnnouncementSignatures_new(channel_id_arg_conv, short_channel_id_arg, node_signature_arg_ref, bitcoin_signature_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -53608,6 +57588,107 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_ UnsignedNodeAnnouncement_set_addresses(&this_ptr_conv, val_constr); } +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1excess_1address_1data(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKUnsignedNodeAnnouncement this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z ret_var = UnsignedNodeAnnouncement_get_excess_address_data(&this_ptr_conv); + int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen); + (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1excess_1address_1data(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKUnsignedNodeAnnouncement this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z val_ref; + val_ref.datalen = (*env)->GetArrayLength(env, val); + val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes"); + (*env)->GetByteArrayRegion(env, val, 0, val_ref.datalen, val_ref.data); + UnsignedNodeAnnouncement_set_excess_address_data(&this_ptr_conv, val_ref); +} + +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1excess_1data(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKUnsignedNodeAnnouncement this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z ret_var = UnsignedNodeAnnouncement_get_excess_data(&this_ptr_conv); + int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen); + (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1excess_1data(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKUnsignedNodeAnnouncement this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z val_ref; + val_ref.datalen = (*env)->GetArrayLength(env, val); + val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes"); + (*env)->GetByteArrayRegion(env, val, 0, val_ref.datalen, val_ref.data); + UnsignedNodeAnnouncement_set_excess_data(&this_ptr_conv, val_ref); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1new(JNIEnv *env, jclass clz, int64_t features_arg, int32_t timestamp_arg, int64_t node_id_arg, int8_tArray rgb_arg, int64_t alias_arg, int64_tArray addresses_arg, int8_tArray excess_address_data_arg, int8_tArray excess_data_arg) { + LDKNodeFeatures features_arg_conv; + features_arg_conv.inner = untag_ptr(features_arg); + features_arg_conv.is_owned = ptr_is_owned(features_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(features_arg_conv); + features_arg_conv = NodeFeatures_clone(&features_arg_conv); + LDKNodeId node_id_arg_conv; + node_id_arg_conv.inner = untag_ptr(node_id_arg); + node_id_arg_conv.is_owned = ptr_is_owned(node_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(node_id_arg_conv); + node_id_arg_conv = NodeId_clone(&node_id_arg_conv); + LDKThreeBytes rgb_arg_ref; + CHECK((*env)->GetArrayLength(env, rgb_arg) == 3); + (*env)->GetByteArrayRegion(env, rgb_arg, 0, 3, rgb_arg_ref.data); + LDKNodeAlias alias_arg_conv; + alias_arg_conv.inner = untag_ptr(alias_arg); + alias_arg_conv.is_owned = ptr_is_owned(alias_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(alias_arg_conv); + alias_arg_conv = NodeAlias_clone(&alias_arg_conv); + LDKCVec_SocketAddressZ addresses_arg_constr; + addresses_arg_constr.datalen = (*env)->GetArrayLength(env, addresses_arg); + if (addresses_arg_constr.datalen > 0) + addresses_arg_constr.data = MALLOC(addresses_arg_constr.datalen * sizeof(LDKSocketAddress), "LDKCVec_SocketAddressZ Elements"); + else + addresses_arg_constr.data = NULL; + int64_t* addresses_arg_vals = (*env)->GetLongArrayElements (env, addresses_arg, NULL); + for (size_t p = 0; p < addresses_arg_constr.datalen; p++) { + int64_t addresses_arg_conv_15 = addresses_arg_vals[p]; + void* addresses_arg_conv_15_ptr = untag_ptr(addresses_arg_conv_15); + CHECK_ACCESS(addresses_arg_conv_15_ptr); + LDKSocketAddress addresses_arg_conv_15_conv = *(LDKSocketAddress*)(addresses_arg_conv_15_ptr); + addresses_arg_constr.data[p] = addresses_arg_conv_15_conv; + } + (*env)->ReleaseLongArrayElements(env, addresses_arg, addresses_arg_vals, 0); + LDKCVec_u8Z excess_address_data_arg_ref; + excess_address_data_arg_ref.datalen = (*env)->GetArrayLength(env, excess_address_data_arg); + excess_address_data_arg_ref.data = MALLOC(excess_address_data_arg_ref.datalen, "LDKCVec_u8Z Bytes"); + (*env)->GetByteArrayRegion(env, excess_address_data_arg, 0, excess_address_data_arg_ref.datalen, excess_address_data_arg_ref.data); + LDKCVec_u8Z excess_data_arg_ref; + excess_data_arg_ref.datalen = (*env)->GetArrayLength(env, excess_data_arg); + excess_data_arg_ref.data = MALLOC(excess_data_arg_ref.datalen, "LDKCVec_u8Z Bytes"); + (*env)->GetByteArrayRegion(env, excess_data_arg, 0, excess_data_arg_ref.datalen, excess_data_arg_ref.data); + LDKUnsignedNodeAnnouncement ret_var = UnsignedNodeAnnouncement_new(features_arg_conv, timestamp_arg, node_id_arg_conv, rgb_arg_ref, alias_arg_conv, addresses_arg_constr, excess_address_data_arg_ref, excess_data_arg_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + static inline uint64_t UnsignedNodeAnnouncement_clone_ptr(LDKUnsignedNodeAnnouncement *NONNULL_PTR arg) { LDKUnsignedNodeAnnouncement ret_var = UnsignedNodeAnnouncement_clone(arg); int64_t ret_ref = 0; @@ -56300,6 +60381,191 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OnionPacket_1eq(JNIEnv *en return ret_conv; } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKTrampolineOnionPacket this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + TrampolineOnionPacket_free(this_obj_conv); +} + +JNIEXPORT int8_t JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1version(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_t ret_conv = TrampolineOnionPacket_get_version(&this_ptr_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1version(JNIEnv *env, jclass clz, int64_t this_ptr, int8_t val) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + TrampolineOnionPacket_set_version(&this_ptr_conv, val); +} + +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1public_1key(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = (*env)->NewByteArray(env, 33); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, TrampolineOnionPacket_get_public_key(&this_ptr_conv).compressed_form); + return ret_arr; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1public_1key(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKPublicKey val_ref; + CHECK((*env)->GetArrayLength(env, val) == 33); + (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); + TrampolineOnionPacket_set_public_key(&this_ptr_conv, val_ref); +} + +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1hop_1data(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z ret_var = TrampolineOnionPacket_get_hop_data(&this_ptr_conv); + int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen); + (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1hop_1data(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z val_ref; + val_ref.datalen = (*env)->GetArrayLength(env, val); + val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes"); + (*env)->GetByteArrayRegion(env, val, 0, val_ref.datalen, val_ref.data); + TrampolineOnionPacket_set_hop_data(&this_ptr_conv, val_ref); +} + +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1hmac(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = (*env)->NewByteArray(env, 32); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TrampolineOnionPacket_get_hmac(&this_ptr_conv)); + return ret_arr; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1hmac(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKThirtyTwoBytes val_ref; + CHECK((*env)->GetArrayLength(env, val) == 32); + (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); + TrampolineOnionPacket_set_hmac(&this_ptr_conv, val_ref); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1new(JNIEnv *env, jclass clz, int8_t version_arg, int8_tArray public_key_arg, int8_tArray hop_data_arg, int8_tArray hmac_arg) { + LDKPublicKey public_key_arg_ref; + CHECK((*env)->GetArrayLength(env, public_key_arg) == 33); + (*env)->GetByteArrayRegion(env, public_key_arg, 0, 33, public_key_arg_ref.compressed_form); + LDKCVec_u8Z hop_data_arg_ref; + hop_data_arg_ref.datalen = (*env)->GetArrayLength(env, hop_data_arg); + hop_data_arg_ref.data = MALLOC(hop_data_arg_ref.datalen, "LDKCVec_u8Z Bytes"); + (*env)->GetByteArrayRegion(env, hop_data_arg, 0, hop_data_arg_ref.datalen, hop_data_arg_ref.data); + LDKThirtyTwoBytes hmac_arg_ref; + CHECK((*env)->GetArrayLength(env, hmac_arg) == 32); + (*env)->GetByteArrayRegion(env, hmac_arg, 0, 32, hmac_arg_ref.data); + LDKTrampolineOnionPacket ret_var = TrampolineOnionPacket_new(version_arg, public_key_arg_ref, hop_data_arg_ref, hmac_arg_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t TrampolineOnionPacket_clone_ptr(LDKTrampolineOnionPacket *NONNULL_PTR arg) { + LDKTrampolineOnionPacket ret_var = TrampolineOnionPacket_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKTrampolineOnionPacket arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = TrampolineOnionPacket_clone_ptr(&arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKTrampolineOnionPacket orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKTrampolineOnionPacket ret_var = TrampolineOnionPacket_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1hash(JNIEnv *env, jclass clz, int64_t o) { + LDKTrampolineOnionPacket o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = TrampolineOnionPacket_hash(&o_conv); + return ret_conv; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKTrampolineOnionPacket a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKTrampolineOnionPacket b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = TrampolineOnionPacket_eq(&a_conv, &b_conv); + return ret_conv; +} + +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1write(JNIEnv *env, jclass clz, int64_t obj) { + LDKTrampolineOnionPacket obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = TrampolineOnionPacket_write(&obj_conv); + int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen); + (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data); + CVec_u8Z_free(ret_var); + return ret_arr; +} + JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1write(JNIEnv *env, jclass clz, int64_t obj) { LDKAcceptChannel obj_conv; obj_conv.inner = untag_ptr(obj); @@ -57817,6 +62083,127 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1free(JNIEnv SocketDescriptor_free(this_ptr_conv); } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKPeerDetails this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + PeerDetails_free(this_obj_conv); +} + +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1counterparty_1node_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = (*env)->NewByteArray(env, 33); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, PeerDetails_get_counterparty_node_id(&this_ptr_conv).compressed_form); + return ret_arr; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1counterparty_1node_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKPublicKey val_ref; + CHECK((*env)->GetArrayLength(env, val) == 33); + (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); + PeerDetails_set_counterparty_node_id(&this_ptr_conv, val_ref); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1socket_1address(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCOption_SocketAddressZ *ret_copy = MALLOC(sizeof(LDKCOption_SocketAddressZ), "LDKCOption_SocketAddressZ"); + *ret_copy = PeerDetails_get_socket_address(&this_ptr_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1socket_1address(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKCOption_SocketAddressZ val_conv = *(LDKCOption_SocketAddressZ*)(val_ptr); + val_conv = COption_SocketAddressZ_clone((LDKCOption_SocketAddressZ*)untag_ptr(val)); + PeerDetails_set_socket_address(&this_ptr_conv, val_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1init_1features(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKInitFeatures ret_var = PeerDetails_get_init_features(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1init_1features(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKInitFeatures val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = InitFeatures_clone(&val_conv); + PeerDetails_set_init_features(&this_ptr_conv, val_conv); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1is_1inbound_1connection(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + jboolean ret_conv = PeerDetails_get_is_inbound_connection(&this_ptr_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1is_1inbound_1connection(JNIEnv *env, jclass clz, int64_t this_ptr, jboolean val) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + PeerDetails_set_is_inbound_connection(&this_ptr_conv, val); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerDetails_1new(JNIEnv *env, jclass clz, int8_tArray counterparty_node_id_arg, int64_t socket_address_arg, int64_t init_features_arg, jboolean is_inbound_connection_arg) { + LDKPublicKey counterparty_node_id_arg_ref; + CHECK((*env)->GetArrayLength(env, counterparty_node_id_arg) == 33); + (*env)->GetByteArrayRegion(env, counterparty_node_id_arg, 0, 33, counterparty_node_id_arg_ref.compressed_form); + void* socket_address_arg_ptr = untag_ptr(socket_address_arg); + CHECK_ACCESS(socket_address_arg_ptr); + LDKCOption_SocketAddressZ socket_address_arg_conv = *(LDKCOption_SocketAddressZ*)(socket_address_arg_ptr); + LDKInitFeatures init_features_arg_conv; + init_features_arg_conv.inner = untag_ptr(init_features_arg); + init_features_arg_conv.is_owned = ptr_is_owned(init_features_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(init_features_arg_conv); + init_features_arg_conv = InitFeatures_clone(&init_features_arg_conv); + LDKPeerDetails ret_var = PeerDetails_new(counterparty_node_id_arg_ref, socket_address_arg_conv, init_features_arg_conv, is_inbound_connection_arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1free(JNIEnv *env, jclass clz, int64_t this_obj) { LDKPeerHandleError this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -57903,26 +62290,44 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerManager_1new(JNIEnv *en return ret_ref; } -JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_PeerManager_1get_1peer_1node_1ids(JNIEnv *env, jclass clz, int64_t this_arg) { +JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_PeerManager_1list_1peers(JNIEnv *env, jclass clz, int64_t this_arg) { LDKPeerManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ ret_var = PeerManager_get_peer_node_ids(&this_arg_conv); + LDKCVec_PeerDetailsZ ret_var = PeerManager_list_peers(&this_arg_conv); int64_tArray ret_arr = NULL; ret_arr = (*env)->NewLongArray(env, ret_var.datalen); int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL); - for (size_t r = 0; r < ret_var.datalen; r++) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv_43_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ"); - *ret_conv_43_conv = ret_var.data[r]; - ret_arr_ptr[r] = tag_ptr(ret_conv_43_conv, true); + for (size_t n = 0; n < ret_var.datalen; n++) { + LDKPeerDetails ret_conv_13_var = ret_var.data[n]; + int64_t ret_conv_13_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_13_var); + ret_conv_13_ref = tag_ptr(ret_conv_13_var.inner, ret_conv_13_var.is_owned); + ret_arr_ptr[n] = ret_conv_13_ref; } (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0); FREE(ret_var.data); return ret_arr; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerManager_1peer_1by_1node_1id(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id) { + LDKPeerManager this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKPublicKey their_node_id_ref; + CHECK((*env)->GetArrayLength(env, their_node_id) == 33); + (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form); + LDKPeerDetails ret_var = PeerManager_peer_by_node_id(&this_arg_conv, their_node_id_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerManager_1new_1outbound_1connection(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t descriptor, int64_t remote_network_address) { LDKPeerManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -63751,6 +68156,120 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1requires_1ke return ret_conv; } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InitFeatures_1set_1trampoline_1routing_1optional(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKInitFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + InitFeatures_set_trampoline_routing_optional(&this_arg_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InitFeatures_1set_1trampoline_1routing_1required(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKInitFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + InitFeatures_set_trampoline_routing_required(&this_arg_conv); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InitFeatures_1supports_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKInitFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = InitFeatures_supports_trampoline_routing(&this_arg_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1set_1trampoline_1routing_1optional(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKNodeFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + NodeFeatures_set_trampoline_routing_optional(&this_arg_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1set_1trampoline_1routing_1required(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKNodeFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + NodeFeatures_set_trampoline_routing_required(&this_arg_conv); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1supports_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKNodeFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = NodeFeatures_supports_trampoline_routing(&this_arg_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1set_1trampoline_1routing_1optional(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKBolt11InvoiceFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + Bolt11InvoiceFeatures_set_trampoline_routing_optional(&this_arg_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1set_1trampoline_1routing_1required(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKBolt11InvoiceFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + Bolt11InvoiceFeatures_set_trampoline_routing_required(&this_arg_conv); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1supports_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKBolt11InvoiceFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = Bolt11InvoiceFeatures_supports_trampoline_routing(&this_arg_conv); + return ret_conv; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InitFeatures_1requires_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKInitFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = InitFeatures_requires_trampoline_routing(&this_arg_conv); + return ret_conv; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1requires_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKNodeFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = NodeFeatures_requires_trampoline_routing(&this_arg_conv); + return ret_conv; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1requires_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKBolt11InvoiceFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = Bolt11InvoiceFeatures_requires_trampoline_routing(&this_arg_conv); + return ret_conv; +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ShutdownScript_1free(JNIEnv *env, jclass clz, int64_t this_obj) { LDKShutdownScript this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -63976,6 +68495,222 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ShutdownScript_1is_1compat return ret_conv; } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelId_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKChannelId this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + ChannelId_free(this_obj_conv); +} + +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelId_1get_1a(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKChannelId this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = (*env)->NewByteArray(env, 32); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ChannelId_get_a(&this_ptr_conv)); + return ret_arr; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelId_1set_1a(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKChannelId this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKThirtyTwoBytes val_ref; + CHECK((*env)->GetArrayLength(env, val) == 32); + (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); + ChannelId_set_a(&this_ptr_conv, val_ref); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1new(JNIEnv *env, jclass clz, int8_tArray a_arg) { + LDKThirtyTwoBytes a_arg_ref; + CHECK((*env)->GetArrayLength(env, a_arg) == 32); + (*env)->GetByteArrayRegion(env, a_arg, 0, 32, a_arg_ref.data); + LDKChannelId ret_var = ChannelId_new(a_arg_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t ChannelId_clone_ptr(LDKChannelId *NONNULL_PTR arg) { + LDKChannelId ret_var = ChannelId_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKChannelId arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = ChannelId_clone_ptr(&arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKChannelId orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKChannelId ret_var = ChannelId_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelId_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKChannelId a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKChannelId b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = ChannelId_eq(&a_conv, &b_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1hash(JNIEnv *env, jclass clz, int64_t o) { + LDKChannelId o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = ChannelId_hash(&o_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1v1_1from_1funding_1txid(JNIEnv *env, jclass clz, int8_tArray txid, int16_t output_index) { + uint8_t txid_arr[32]; + CHECK((*env)->GetArrayLength(env, txid) == 32); + (*env)->GetByteArrayRegion(env, txid, 0, 32, txid_arr); + uint8_t (*txid_ref)[32] = &txid_arr; + LDKChannelId ret_var = ChannelId_v1_from_funding_txid(txid_ref, output_index); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1v1_1from_1funding_1outpoint(JNIEnv *env, jclass clz, int64_t outpoint) { + LDKOutPoint outpoint_conv; + outpoint_conv.inner = untag_ptr(outpoint); + outpoint_conv.is_owned = ptr_is_owned(outpoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_conv); + outpoint_conv = OutPoint_clone(&outpoint_conv); + LDKChannelId ret_var = ChannelId_v1_from_funding_outpoint(outpoint_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1temporary_1from_1entropy_1source(JNIEnv *env, jclass clz, int64_t entropy_source) { + void* entropy_source_ptr = untag_ptr(entropy_source); + if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } + LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + LDKChannelId ret_var = ChannelId_temporary_from_entropy_source(entropy_source_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1from_1bytes(JNIEnv *env, jclass clz, int8_tArray data) { + LDKThirtyTwoBytes data_ref; + CHECK((*env)->GetArrayLength(env, data) == 32); + (*env)->GetByteArrayRegion(env, data, 0, 32, data_ref.data); + LDKChannelId ret_var = ChannelId_from_bytes(data_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1new_1zero(JNIEnv *env, jclass clz) { + LDKChannelId ret_var = ChannelId_new_zero(); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelId_1is_1zero(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKChannelId this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = ChannelId_is_zero(&this_arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1v2_1from_1revocation_1basepoints(JNIEnv *env, jclass clz, int64_t ours, int64_t theirs) { + LDKRevocationBasepoint ours_conv; + ours_conv.inner = untag_ptr(ours); + ours_conv.is_owned = ptr_is_owned(ours); + CHECK_INNER_FIELD_ACCESS_OR_NULL(ours_conv); + ours_conv.is_owned = false; + LDKRevocationBasepoint theirs_conv; + theirs_conv.inner = untag_ptr(theirs); + theirs_conv.is_owned = ptr_is_owned(theirs); + CHECK_INNER_FIELD_ACCESS_OR_NULL(theirs_conv); + theirs_conv.is_owned = false; + LDKChannelId ret_var = ChannelId_v2_from_revocation_basepoints(&ours_conv, &theirs_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1temporary_1v2_1from_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t our_revocation_basepoint) { + LDKRevocationBasepoint our_revocation_basepoint_conv; + our_revocation_basepoint_conv.inner = untag_ptr(our_revocation_basepoint); + our_revocation_basepoint_conv.is_owned = ptr_is_owned(our_revocation_basepoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(our_revocation_basepoint_conv); + our_revocation_basepoint_conv.is_owned = false; + LDKChannelId ret_var = ChannelId_temporary_v2_from_revocation_basepoint(&our_revocation_basepoint_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelId_1write(JNIEnv *env, jclass clz, int64_t obj) { + LDKChannelId obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = ChannelId_write(&obj_conv); + int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen); + (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1read(JNIEnv *env, jclass clz, int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = (*env)->GetArrayLength(env, ser); + ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL); + LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ"); + *ret_conv = ChannelId_read(ser_ref); + (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0); + return tag_ptr(ret_conv, true); +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Retry_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -64495,6 +69230,413 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Type_1free(JNIEnv *env, jclass Type_free(this_ptr_conv); } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferId_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKOfferId this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + OfferId_free(this_obj_conv); +} + +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OfferId_1get_1a(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKOfferId this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = (*env)->NewByteArray(env, 32); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *OfferId_get_a(&this_ptr_conv)); + return ret_arr; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferId_1set_1a(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKOfferId this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKThirtyTwoBytes val_ref; + CHECK((*env)->GetArrayLength(env, val) == 32); + (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); + OfferId_set_a(&this_ptr_conv, val_ref); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferId_1new(JNIEnv *env, jclass clz, int8_tArray a_arg) { + LDKThirtyTwoBytes a_arg_ref; + CHECK((*env)->GetArrayLength(env, a_arg) == 32); + (*env)->GetByteArrayRegion(env, a_arg, 0, 32, a_arg_ref.data); + LDKOfferId ret_var = OfferId_new(a_arg_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t OfferId_clone_ptr(LDKOfferId *NONNULL_PTR arg) { + LDKOfferId ret_var = OfferId_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferId_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKOfferId arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = OfferId_clone_ptr(&arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferId_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKOfferId orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKOfferId ret_var = OfferId_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OfferId_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKOfferId a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKOfferId b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = OfferId_eq(&a_conv, &b_conv); + return ret_conv; +} + +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OfferId_1write(JNIEnv *env, jclass clz, int64_t obj) { + LDKOfferId obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = OfferId_write(&obj_conv); + int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen); + (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferId_1read(JNIEnv *env, jclass clz, int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = (*env)->GetArrayLength(env, ser); + ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL); + LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ"); + *ret_conv = OfferId_read(ser_ref); + (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKOfferWithExplicitMetadataBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + OfferWithExplicitMetadataBuilder_free(this_obj_conv); +} + +static inline uint64_t OfferWithExplicitMetadataBuilder_clone_ptr(LDKOfferWithExplicitMetadataBuilder *NONNULL_PTR arg) { + LDKOfferWithExplicitMetadataBuilder ret_var = OfferWithExplicitMetadataBuilder_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKOfferWithExplicitMetadataBuilder arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = OfferWithExplicitMetadataBuilder_clone_ptr(&arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKOfferWithExplicitMetadataBuilder orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKOfferWithExplicitMetadataBuilder ret_var = OfferWithExplicitMetadataBuilder_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKOfferWithDerivedMetadataBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + OfferWithDerivedMetadataBuilder_free(this_obj_conv); +} + +static inline uint64_t OfferWithDerivedMetadataBuilder_clone_ptr(LDKOfferWithDerivedMetadataBuilder *NONNULL_PTR arg) { + LDKOfferWithDerivedMetadataBuilder ret_var = OfferWithDerivedMetadataBuilder_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKOfferWithDerivedMetadataBuilder arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = OfferWithDerivedMetadataBuilder_clone_ptr(&arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKOfferWithDerivedMetadataBuilder orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKOfferWithDerivedMetadataBuilder ret_var = OfferWithDerivedMetadataBuilder_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1new(JNIEnv *env, jclass clz, int8_tArray signing_pubkey) { + LDKPublicKey signing_pubkey_ref; + CHECK((*env)->GetArrayLength(env, signing_pubkey) == 33); + (*env)->GetByteArrayRegion(env, signing_pubkey, 0, 33, signing_pubkey_ref.compressed_form); + LDKOfferWithExplicitMetadataBuilder ret_var = OfferWithExplicitMetadataBuilder_new(signing_pubkey_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1metadata(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray metadata) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKCVec_u8Z metadata_ref; + metadata_ref.datalen = (*env)->GetArrayLength(env, metadata); + metadata_ref.data = MALLOC(metadata_ref.datalen, "LDKCVec_u8Z Bytes"); + (*env)->GetByteArrayRegion(env, metadata, 0, metadata_ref.datalen, metadata_ref.data); + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = OfferWithExplicitMetadataBuilder_metadata(this_arg_conv, metadata_ref); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1chain(JNIEnv *env, jclass clz, int64_t this_arg, jclass network) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKNetwork network_conv = LDKNetwork_from_java(env, network); + OfferWithExplicitMetadataBuilder_chain(this_arg_conv, network_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1amount_1msats(JNIEnv *env, jclass clz, int64_t this_arg, int64_t amount_msats) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + OfferWithExplicitMetadataBuilder_amount_msats(this_arg_conv, amount_msats); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1absolute_1expiry(JNIEnv *env, jclass clz, int64_t this_arg, int64_t absolute_expiry) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + OfferWithExplicitMetadataBuilder_absolute_expiry(this_arg_conv, absolute_expiry); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1description(JNIEnv *env, jclass clz, int64_t this_arg, jstring description) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKStr description_conv = java_to_owned_str(env, description); + OfferWithExplicitMetadataBuilder_description(this_arg_conv, description_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1issuer(JNIEnv *env, jclass clz, int64_t this_arg, jstring issuer) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKStr issuer_conv = java_to_owned_str(env, issuer); + OfferWithExplicitMetadataBuilder_issuer(this_arg_conv, issuer_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1path(JNIEnv *env, jclass clz, int64_t this_arg, int64_t path) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKBlindedPath path_conv; + path_conv.inner = untag_ptr(path); + path_conv.is_owned = ptr_is_owned(path); + CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv); + path_conv = BlindedPath_clone(&path_conv); + OfferWithExplicitMetadataBuilder_path(this_arg_conv, path_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1supported_1quantity(JNIEnv *env, jclass clz, int64_t this_arg, int64_t quantity) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + void* quantity_ptr = untag_ptr(quantity); + CHECK_ACCESS(quantity_ptr); + LDKQuantity quantity_conv = *(LDKQuantity*)(quantity_ptr); + quantity_conv = Quantity_clone((LDKQuantity*)untag_ptr(quantity)); + OfferWithExplicitMetadataBuilder_supported_quantity(this_arg_conv, quantity_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1build(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = OfferWithExplicitMetadataBuilder_build(this_arg_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1deriving_1signing_1pubkey(JNIEnv *env, jclass clz, int8_tArray node_id, int64_t expanded_key, int64_t entropy_source) { + LDKPublicKey node_id_ref; + CHECK((*env)->GetArrayLength(env, node_id) == 33); + (*env)->GetByteArrayRegion(env, node_id, 0, 33, node_id_ref.compressed_form); + LDKExpandedKey expanded_key_conv; + expanded_key_conv.inner = untag_ptr(expanded_key); + expanded_key_conv.is_owned = ptr_is_owned(expanded_key); + CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv); + expanded_key_conv.is_owned = false; + void* entropy_source_ptr = untag_ptr(entropy_source); + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } + LDKOfferWithDerivedMetadataBuilder ret_var = OfferWithDerivedMetadataBuilder_deriving_signing_pubkey(node_id_ref, &expanded_key_conv, entropy_source_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1chain(JNIEnv *env, jclass clz, int64_t this_arg, jclass network) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKNetwork network_conv = LDKNetwork_from_java(env, network); + OfferWithDerivedMetadataBuilder_chain(this_arg_conv, network_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1amount_1msats(JNIEnv *env, jclass clz, int64_t this_arg, int64_t amount_msats) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + OfferWithDerivedMetadataBuilder_amount_msats(this_arg_conv, amount_msats); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1absolute_1expiry(JNIEnv *env, jclass clz, int64_t this_arg, int64_t absolute_expiry) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + OfferWithDerivedMetadataBuilder_absolute_expiry(this_arg_conv, absolute_expiry); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1description(JNIEnv *env, jclass clz, int64_t this_arg, jstring description) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKStr description_conv = java_to_owned_str(env, description); + OfferWithDerivedMetadataBuilder_description(this_arg_conv, description_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1issuer(JNIEnv *env, jclass clz, int64_t this_arg, jstring issuer) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKStr issuer_conv = java_to_owned_str(env, issuer); + OfferWithDerivedMetadataBuilder_issuer(this_arg_conv, issuer_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1path(JNIEnv *env, jclass clz, int64_t this_arg, int64_t path) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKBlindedPath path_conv; + path_conv.inner = untag_ptr(path); + path_conv.is_owned = ptr_is_owned(path); + CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv); + path_conv = BlindedPath_clone(&path_conv); + OfferWithDerivedMetadataBuilder_path(this_arg_conv, path_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1supported_1quantity(JNIEnv *env, jclass clz, int64_t this_arg, int64_t quantity) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + void* quantity_ptr = untag_ptr(quantity); + CHECK_ACCESS(quantity_ptr); + LDKQuantity quantity_conv = *(LDKQuantity*)(quantity_ptr); + quantity_conv = Quantity_clone((LDKQuantity*)untag_ptr(quantity)); + OfferWithDerivedMetadataBuilder_supported_quantity(this_arg_conv, quantity_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1build(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = OfferWithDerivedMetadataBuilder_build(this_arg_conv); + return tag_ptr(ret_conv, true); +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Offer_1free(JNIEnv *env, jclass clz, int64_t this_obj) { LDKOffer this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -64571,10 +69713,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1amount(JNIEnv *env, this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = Offer_amount(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = Offer_amount(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -64657,10 +69798,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1supported_1quantity( this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = Offer_supported_quantity(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Offer_supported_quantity(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -64675,6 +69815,19 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Offer_1signing_1pubkey( return ret_arr; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1id(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKOffer this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKOfferId ret_var = Offer_id(&this_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Offer_1supports_1chain(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray chain) { LDKOffer this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -64728,6 +69881,89 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Offer_1expects_1quantity(J return ret_conv; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1request_1invoice_1deriving_1payer_1id(JNIEnv *env, jclass clz, int64_t this_arg, int64_t expanded_key, int64_t entropy_source, int8_tArray payment_id) { + LDKOffer this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKExpandedKey expanded_key_conv; + expanded_key_conv.inner = untag_ptr(expanded_key); + expanded_key_conv.is_owned = ptr_is_owned(expanded_key); + CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv); + expanded_key_conv.is_owned = false; + void* entropy_source_ptr = untag_ptr(entropy_source); + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } + LDKThirtyTwoBytes payment_id_ref; + CHECK((*env)->GetArrayLength(env, payment_id) == 32); + (*env)->GetByteArrayRegion(env, payment_id, 0, 32, payment_id_ref.data); + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = Offer_request_invoice_deriving_payer_id(&this_arg_conv, &expanded_key_conv, entropy_source_conv, payment_id_ref); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1request_1invoice_1deriving_1metadata(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray payer_id, int64_t expanded_key, int64_t entropy_source, int8_tArray payment_id) { + LDKOffer this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKPublicKey payer_id_ref; + CHECK((*env)->GetArrayLength(env, payer_id) == 33); + (*env)->GetByteArrayRegion(env, payer_id, 0, 33, payer_id_ref.compressed_form); + LDKExpandedKey expanded_key_conv; + expanded_key_conv.inner = untag_ptr(expanded_key); + expanded_key_conv.is_owned = ptr_is_owned(expanded_key); + CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv); + expanded_key_conv.is_owned = false; + void* entropy_source_ptr = untag_ptr(entropy_source); + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } + LDKThirtyTwoBytes payment_id_ref; + CHECK((*env)->GetArrayLength(env, payment_id) == 32); + (*env)->GetByteArrayRegion(env, payment_id, 0, 32, payment_id_ref.data); + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = Offer_request_invoice_deriving_metadata(&this_arg_conv, payer_id_ref, &expanded_key_conv, entropy_source_conv, payment_id_ref); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1request_1invoice(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray metadata, int8_tArray payer_id) { + LDKOffer this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_u8Z metadata_ref; + metadata_ref.datalen = (*env)->GetArrayLength(env, metadata); + metadata_ref.data = MALLOC(metadata_ref.datalen, "LDKCVec_u8Z Bytes"); + (*env)->GetByteArrayRegion(env, metadata, 0, metadata_ref.datalen, metadata_ref.data); + LDKPublicKey payer_id_ref; + CHECK((*env)->GetArrayLength(env, payer_id) == 33); + (*env)->GetByteArrayRegion(env, payer_id, 0, 33, payer_id_ref.compressed_form); + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = Offer_request_invoice(&this_arg_conv, metadata_ref, payer_id_ref); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1hash(JNIEnv *env, jclass clz, int64_t o) { + LDKOffer o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = Offer_hash(&o_conv); + return ret_conv; +} + JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Offer_1write(JNIEnv *env, jclass clz, int64_t obj) { LDKOffer obj_conv; obj_conv.inner = untag_ptr(obj); @@ -64741,95 +69977,316 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Offer_1write(JNIEnv *en return ret_arr; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Amount_1free(JNIEnv *env, jclass clz, int64_t this_obj) { - LDKAmount this_obj_conv; - this_obj_conv.inner = untag_ptr(this_obj); - this_obj_conv.is_owned = ptr_is_owned(this_obj); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - Amount_free(this_obj_conv); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Amount_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKAmount this_ptr_conv = *(LDKAmount*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + Amount_free(this_ptr_conv); } static inline uint64_t Amount_clone_ptr(LDKAmount *NONNULL_PTR arg) { - LDKAmount ret_var = Amount_clone(arg); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount"); + *ret_copy = Amount_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Amount_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { - LDKAmount arg_conv; - arg_conv.inner = untag_ptr(arg); - arg_conv.is_owned = ptr_is_owned(arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); - arg_conv.is_owned = false; - int64_t ret_conv = Amount_clone_ptr(&arg_conv); + LDKAmount* arg_conv = (LDKAmount*)untag_ptr(arg); + int64_t ret_conv = Amount_clone_ptr(arg_conv); return ret_conv; } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Amount_1clone(JNIEnv *env, jclass clz, int64_t orig) { - LDKAmount orig_conv; - orig_conv.inner = untag_ptr(orig); - orig_conv.is_owned = ptr_is_owned(orig); - CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); - orig_conv.is_owned = false; - LDKAmount ret_var = Amount_clone(&orig_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKAmount* orig_conv = (LDKAmount*)untag_ptr(orig); + LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount"); + *ret_copy = Amount_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Amount_1bitcoin(JNIEnv *env, jclass clz, int64_t amount_msats) { + LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount"); + *ret_copy = Amount_bitcoin(amount_msats); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Amount_1currency(JNIEnv *env, jclass clz, int8_tArray iso4217_code, int64_t amount) { + LDKThreeBytes iso4217_code_ref; + CHECK((*env)->GetArrayLength(env, iso4217_code) == 3); + (*env)->GetByteArrayRegion(env, iso4217_code, 0, 3, iso4217_code_ref.data); + LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount"); + *ret_copy = Amount_currency(iso4217_code_ref, amount); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Quantity_1free(JNIEnv *env, jclass clz, int64_t this_obj) { - LDKQuantity this_obj_conv; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Quantity_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKQuantity this_ptr_conv = *(LDKQuantity*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + Quantity_free(this_ptr_conv); +} + +static inline uint64_t Quantity_clone_ptr(LDKQuantity *NONNULL_PTR arg) { + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Quantity_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKQuantity* arg_conv = (LDKQuantity*)untag_ptr(arg); + int64_t ret_conv = Quantity_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKQuantity* orig_conv = (LDKQuantity*)untag_ptr(orig); + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Quantity_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1bounded(JNIEnv *env, jclass clz, int64_t a) { + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Quantity_bounded(a); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1unbounded(JNIEnv *env, jclass clz) { + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Quantity_unbounded(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1one(JNIEnv *env, jclass clz) { + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Quantity_one(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1from_1str(JNIEnv *env, jclass clz, jstring s) { + LDKStr s_conv = java_to_owned_str(env, s); + LDKCResult_OfferBolt12ParseErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12ParseErrorZ), "LDKCResult_OfferBolt12ParseErrorZ"); + *ret_conv = Offer_from_str(s_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); this_obj_conv.is_owned = ptr_is_owned(this_obj); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - Quantity_free(this_obj_conv); + InvoiceWithExplicitSigningPubkeyBuilder_free(this_obj_conv); } -static inline uint64_t Quantity_clone_ptr(LDKQuantity *NONNULL_PTR arg) { - LDKQuantity ret_var = Quantity_clone(arg); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + InvoiceWithDerivedSigningPubkeyBuilder_free(this_obj_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1build(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = InvoiceWithExplicitSigningPubkeyBuilder_build(this_arg_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1relative_1expiry(JNIEnv *env, jclass clz, int64_t this_arg, int32_t relative_expiry_secs) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry(this_arg_conv, relative_expiry_secs); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1fallback_1v0_1p2wsh(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray script_hash) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + uint8_t script_hash_arr[32]; + CHECK((*env)->GetArrayLength(env, script_hash) == 32); + (*env)->GetByteArrayRegion(env, script_hash, 0, 32, script_hash_arr); + uint8_t (*script_hash_ref)[32] = &script_hash_arr; + InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh(this_arg_conv, script_hash_ref); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1fallback_1v0_1p2wpkh(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray pubkey_hash) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + uint8_t pubkey_hash_arr[20]; + CHECK((*env)->GetArrayLength(env, pubkey_hash) == 20); + (*env)->GetByteArrayRegion(env, pubkey_hash, 0, 20, pubkey_hash_arr); + uint8_t (*pubkey_hash_ref)[20] = &pubkey_hash_arr; + InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh(this_arg_conv, pubkey_hash_ref); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1fallback_1v1_1p2tr_1tweaked(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray utput_key) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + LDKTweakedPublicKey utput_key_ref; + CHECK((*env)->GetArrayLength(env, utput_key) == 32); + (*env)->GetByteArrayRegion(env, utput_key, 0, 32, utput_key_ref.x_coordinate); + InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(this_arg_conv, utput_key_ref); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1allow_1mpp(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp(this_arg_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1build_1and_1sign(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign(this_arg_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1relative_1expiry(JNIEnv *env, jclass clz, int64_t this_arg, int32_t relative_expiry_secs) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry(this_arg_conv, relative_expiry_secs); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1fallback_1v0_1p2wsh(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray script_hash) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + uint8_t script_hash_arr[32]; + CHECK((*env)->GetArrayLength(env, script_hash) == 32); + (*env)->GetByteArrayRegion(env, script_hash, 0, 32, script_hash_arr); + uint8_t (*script_hash_ref)[32] = &script_hash_arr; + InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh(this_arg_conv, script_hash_ref); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1fallback_1v0_1p2wpkh(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray pubkey_hash) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + uint8_t pubkey_hash_arr[20]; + CHECK((*env)->GetArrayLength(env, pubkey_hash) == 20); + (*env)->GetByteArrayRegion(env, pubkey_hash, 0, 20, pubkey_hash_arr); + uint8_t (*pubkey_hash_ref)[20] = &pubkey_hash_arr; + InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh(this_arg_conv, pubkey_hash_ref); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1fallback_1v1_1p2tr_1tweaked(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray utput_key) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + LDKTweakedPublicKey utput_key_ref; + CHECK((*env)->GetArrayLength(env, utput_key) == 32); + (*env)->GetByteArrayRegion(env, utput_key, 0, 32, utput_key_ref.x_coordinate); + InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(this_arg_conv, utput_key_ref); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1allow_1mpp(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp(this_arg_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKUnsignedBolt12Invoice this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + UnsignedBolt12Invoice_free(this_obj_conv); +} + +static inline uint64_t UnsignedBolt12Invoice_clone_ptr(LDKUnsignedBolt12Invoice *NONNULL_PTR arg) { + LDKUnsignedBolt12Invoice ret_var = UnsignedBolt12Invoice_clone(arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { - LDKQuantity arg_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKUnsignedBolt12Invoice arg_conv; arg_conv.inner = untag_ptr(arg); arg_conv.is_owned = ptr_is_owned(arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); arg_conv.is_owned = false; - int64_t ret_conv = Quantity_clone_ptr(&arg_conv); + int64_t ret_conv = UnsignedBolt12Invoice_clone_ptr(&arg_conv); return ret_conv; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1clone(JNIEnv *env, jclass clz, int64_t orig) { - LDKQuantity orig_conv; +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKUnsignedBolt12Invoice orig_conv; orig_conv.inner = untag_ptr(orig); orig_conv.is_owned = ptr_is_owned(orig); CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); orig_conv.is_owned = false; - LDKQuantity ret_var = Quantity_clone(&orig_conv); + LDKUnsignedBolt12Invoice ret_var = UnsignedBolt12Invoice_clone(&orig_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1from_1str(JNIEnv *env, jclass clz, jstring s) { - LDKStr s_conv = java_to_owned_str(env, s); - LDKCResult_OfferBolt12ParseErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12ParseErrorZ), "LDKCResult_OfferBolt12ParseErrorZ"); - *ret_conv = Offer_from_str(s_conv); - return tag_ptr(ret_conv, true); -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1free(JNIEnv *env, jclass clz, int64_t this_obj) { - LDKUnsignedBolt12Invoice this_obj_conv; - this_obj_conv.inner = untag_ptr(this_obj); - this_obj_conv.is_owned = ptr_is_owned(this_obj); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - UnsignedBolt12Invoice_free(this_obj_conv); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignBolt12InvoiceFn_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKSignBolt12InvoiceFn this_ptr_conv = *(LDKSignBolt12InvoiceFn*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + SignBolt12InvoiceFn_free(this_ptr_conv); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1tagged_1hash(JNIEnv *env, jclass clz, int64_t this_arg) { @@ -64924,10 +70381,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1amou this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = UnsignedBolt12Invoice_amount(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = UnsignedBolt12Invoice_amount(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -65010,10 +70466,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1supp this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = UnsignedBolt12Invoice_supported_quantity(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = UnsignedBolt12Invoice_supported_quantity(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -65194,10 +70649,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12Invoice_1amount(JNIEn this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = Bolt12Invoice_amount(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = Bolt12Invoice_amount(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -65280,10 +70734,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12Invoice_1supported_1q this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = Bolt12Invoice_supported_quantity(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = Bolt12Invoice_supported_quantity(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -65461,6 +70914,16 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12Invoice_1verify(JNIEn return tag_ptr(ret_conv, true); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12Invoice_1hash(JNIEnv *env, jclass clz, int64_t o) { + LDKBolt12Invoice o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = Bolt12Invoice_hash(&o_conv); + return ret_conv; +} + JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1write(JNIEnv *env, jclass clz, int64_t obj) { LDKUnsignedBolt12Invoice obj_conv; obj_conv.inner = untag_ptr(obj); @@ -65944,6 +71407,142 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceError_1read(JNIEnv * return tag_ptr(ret_conv, true); } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + InvoiceRequestWithExplicitPayerIdBuilder_free(this_obj_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + InvoiceRequestWithDerivedPayerIdBuilder_free(this_obj_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1build(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_build(this_arg_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1chain(JNIEnv *env, jclass clz, int64_t this_arg, jclass network) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKNetwork network_conv = LDKNetwork_from_java(env, network); + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_chain(this_arg_conv, network_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1amount_1msats(JNIEnv *env, jclass clz, int64_t this_arg, int64_t amount_msats) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(this_arg_conv, amount_msats); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1quantity(JNIEnv *env, jclass clz, int64_t this_arg, int64_t quantity) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_quantity(this_arg_conv, quantity); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1payer_1note(JNIEnv *env, jclass clz, int64_t this_arg, jstring payer_note) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKStr payer_note_conv = java_to_owned_str(env, payer_note); + InvoiceRequestWithExplicitPayerIdBuilder_payer_note(this_arg_conv, payer_note_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1build_1and_1sign(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(this_arg_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1chain(JNIEnv *env, jclass clz, int64_t this_arg, jclass network) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKNetwork network_conv = LDKNetwork_from_java(env, network); + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_chain(this_arg_conv, network_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1amount_1msats(JNIEnv *env, jclass clz, int64_t this_arg, int64_t amount_msats) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_amount_msats(this_arg_conv, amount_msats); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1quantity(JNIEnv *env, jclass clz, int64_t this_arg, int64_t quantity) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_quantity(this_arg_conv, quantity); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1payer_1note(JNIEnv *env, jclass clz, int64_t this_arg, jstring payer_note) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKStr payer_note_conv = java_to_owned_str(env, payer_note); + InvoiceRequestWithDerivedPayerIdBuilder_payer_note(this_arg_conv, payer_note_conv); +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1free(JNIEnv *env, jclass clz, int64_t this_obj) { LDKUnsignedInvoiceRequest this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -65952,6 +71551,45 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1free(J UnsignedInvoiceRequest_free(this_obj_conv); } +static inline uint64_t UnsignedInvoiceRequest_clone_ptr(LDKUnsignedInvoiceRequest *NONNULL_PTR arg) { + LDKUnsignedInvoiceRequest ret_var = UnsignedInvoiceRequest_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKUnsignedInvoiceRequest arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = UnsignedInvoiceRequest_clone_ptr(&arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKUnsignedInvoiceRequest orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKUnsignedInvoiceRequest ret_var = UnsignedInvoiceRequest_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignInvoiceRequestFn_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKSignInvoiceRequestFn this_ptr_conv = *(LDKSignInvoiceRequestFn*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + SignInvoiceRequestFn_free(this_ptr_conv); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1tagged_1hash(JNIEnv *env, jclass clz, int64_t this_arg) { LDKUnsignedInvoiceRequest this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -66011,6 +71649,33 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1free(J VerifiedInvoiceRequest_free(this_obj_conv); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1get_1offer_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKVerifiedInvoiceRequest this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKOfferId ret_var = VerifiedInvoiceRequest_get_offer_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1set_1offer_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKVerifiedInvoiceRequest this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKOfferId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = OfferId_clone(&val_conv); + VerifiedInvoiceRequest_set_offer_id(&this_ptr_conv, val_conv); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1get_1keys(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKVerifiedInvoiceRequest this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -66104,10 +71769,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1amo this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = UnsignedInvoiceRequest_amount(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = UnsignedInvoiceRequest_amount(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -66190,10 +71854,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1sup this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = UnsignedInvoiceRequest_supported_quantity(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = UnsignedInvoiceRequest_supported_quantity(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -66330,10 +71993,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1amount(JNIE this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = InvoiceRequest_amount(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = InvoiceRequest_amount(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -66416,10 +72078,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1supported_1 this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = InvoiceRequest_supported_quantity(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = InvoiceRequest_supported_quantity(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -66518,15 +72179,64 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1payer_1note return ret_ref; } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1signature(JNIEnv *env, jclass clz, int64_t this_arg) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1respond_1with(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash) { LDKInvoiceRequest this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 64); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, InvoiceRequest_signature(&this_arg_conv).compact_form); - return ret_arr; + LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr; + payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths); + if (payment_paths_constr.datalen > 0) + payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements"); + else + payment_paths_constr.data = NULL; + int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL); + for (size_t l = 0; l < payment_paths_constr.datalen; l++) { + int64_t payment_paths_conv_37 = payment_paths_vals[l]; + void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37); + CHECK_ACCESS(payment_paths_conv_37_ptr); + LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr); + payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37)); + payment_paths_constr.data[l] = payment_paths_conv_37_conv; + } + (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0); + LDKThirtyTwoBytes payment_hash_ref; + CHECK((*env)->GetArrayLength(env, payment_hash) == 32); + (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data); + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequest_respond_with(&this_arg_conv, payment_paths_constr, payment_hash_ref); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1respond_1with_1no_1std(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash, int64_t created_at) { + LDKInvoiceRequest this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr; + payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths); + if (payment_paths_constr.datalen > 0) + payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements"); + else + payment_paths_constr.data = NULL; + int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL); + for (size_t l = 0; l < payment_paths_constr.datalen; l++) { + int64_t payment_paths_conv_37 = payment_paths_vals[l]; + void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37); + CHECK_ACCESS(payment_paths_conv_37_ptr); + LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr); + payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37)); + payment_paths_constr.data[l] = payment_paths_conv_37_conv; + } + (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0); + LDKThirtyTwoBytes payment_hash_ref; + CHECK((*env)->GetArrayLength(env, payment_hash) == 32); + (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data); + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequest_respond_with_no_std(&this_arg_conv, payment_paths_constr, payment_hash_ref, created_at); + return tag_ptr(ret_conv, true); } JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1verify(JNIEnv *env, jclass clz, int64_t this_arg, int64_t key) { @@ -66545,6 +72255,17 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1verify(JNIE return tag_ptr(ret_conv, true); } +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1signature(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKInvoiceRequest this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + int8_tArray ret_arr = (*env)->NewByteArray(env, 64); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, InvoiceRequest_signature(&this_arg_conv).compact_form); + return ret_arr; +} + JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1chains(JNIEnv *env, jclass clz, int64_t this_arg) { LDKVerifiedInvoiceRequest this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -66583,10 +72304,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1amo this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = VerifiedInvoiceRequest_amount(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = VerifiedInvoiceRequest_amount(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -66669,10 +72389,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1sup this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = VerifiedInvoiceRequest_supported_quantity(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = VerifiedInvoiceRequest_supported_quantity(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -66771,6 +72490,126 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1pay return ret_ref; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1with(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash) { + LDKVerifiedInvoiceRequest this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr; + payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths); + if (payment_paths_constr.datalen > 0) + payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements"); + else + payment_paths_constr.data = NULL; + int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL); + for (size_t l = 0; l < payment_paths_constr.datalen; l++) { + int64_t payment_paths_conv_37 = payment_paths_vals[l]; + void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37); + CHECK_ACCESS(payment_paths_conv_37_ptr); + LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr); + payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37)); + payment_paths_constr.data[l] = payment_paths_conv_37_conv; + } + (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0); + LDKThirtyTwoBytes payment_hash_ref; + CHECK((*env)->GetArrayLength(env, payment_hash) == 32); + (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data); + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = VerifiedInvoiceRequest_respond_with(&this_arg_conv, payment_paths_constr, payment_hash_ref); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1with_1no_1std(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash, int64_t created_at) { + LDKVerifiedInvoiceRequest this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr; + payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths); + if (payment_paths_constr.datalen > 0) + payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements"); + else + payment_paths_constr.data = NULL; + int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL); + for (size_t l = 0; l < payment_paths_constr.datalen; l++) { + int64_t payment_paths_conv_37 = payment_paths_vals[l]; + void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37); + CHECK_ACCESS(payment_paths_conv_37_ptr); + LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr); + payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37)); + payment_paths_constr.data[l] = payment_paths_conv_37_conv; + } + (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0); + LDKThirtyTwoBytes payment_hash_ref; + CHECK((*env)->GetArrayLength(env, payment_hash) == 32); + (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data); + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = VerifiedInvoiceRequest_respond_with_no_std(&this_arg_conv, payment_paths_constr, payment_hash_ref, created_at); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1using_1derived_1keys(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash) { + LDKVerifiedInvoiceRequest this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr; + payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths); + if (payment_paths_constr.datalen > 0) + payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements"); + else + payment_paths_constr.data = NULL; + int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL); + for (size_t l = 0; l < payment_paths_constr.datalen; l++) { + int64_t payment_paths_conv_37 = payment_paths_vals[l]; + void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37); + CHECK_ACCESS(payment_paths_conv_37_ptr); + LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr); + payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37)); + payment_paths_constr.data[l] = payment_paths_conv_37_conv; + } + (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0); + LDKThirtyTwoBytes payment_hash_ref; + CHECK((*env)->GetArrayLength(env, payment_hash) == 32); + (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data); + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = VerifiedInvoiceRequest_respond_using_derived_keys(&this_arg_conv, payment_paths_constr, payment_hash_ref); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1using_1derived_1keys_1no_1std(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash, int64_t created_at) { + LDKVerifiedInvoiceRequest this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr; + payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths); + if (payment_paths_constr.datalen > 0) + payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements"); + else + payment_paths_constr.data = NULL; + int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL); + for (size_t l = 0; l < payment_paths_constr.datalen; l++) { + int64_t payment_paths_conv_37 = payment_paths_vals[l]; + void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37); + CHECK_ACCESS(payment_paths_conv_37_ptr); + LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr); + payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37)); + payment_paths_constr.data[l] = payment_paths_conv_37_conv; + } + (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0); + LDKThirtyTwoBytes payment_hash_ref; + CHECK((*env)->GetArrayLength(env, payment_hash) == 32); + (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data); + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = VerifiedInvoiceRequest_respond_using_derived_keys_no_std(&this_arg_conv, payment_paths_constr, payment_hash_ref, created_at); + return tag_ptr(ret_conv, true); +} + JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1write(JNIEnv *env, jclass clz, int64_t obj) { LDKUnsignedInvoiceRequest obj_conv; obj_conv.inner = untag_ptr(obj); @@ -66797,6 +72636,177 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1write(J return ret_arr; } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKInvoiceRequestFields this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + InvoiceRequestFields_free(this_obj_conv); +} + +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1get_1payer_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = (*env)->NewByteArray(env, 33); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, InvoiceRequestFields_get_payer_id(&this_ptr_conv).compressed_form); + return ret_arr; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1set_1payer_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKPublicKey val_ref; + CHECK((*env)->GetArrayLength(env, val) == 33); + (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); + InvoiceRequestFields_set_payer_id(&this_ptr_conv, val_ref); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1get_1quantity(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z"); + *ret_copy = InvoiceRequestFields_get_quantity(&this_ptr_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1set_1quantity(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKCOption_u64Z val_conv = *(LDKCOption_u64Z*)(val_ptr); + val_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(val)); + InvoiceRequestFields_set_quantity(&this_ptr_conv, val_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1get_1payer_1note_1truncated(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKUntrustedString ret_var = InvoiceRequestFields_get_payer_note_truncated(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1set_1payer_1note_1truncated(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKUntrustedString val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = UntrustedString_clone(&val_conv); + InvoiceRequestFields_set_payer_note_truncated(&this_ptr_conv, val_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1new(JNIEnv *env, jclass clz, int8_tArray payer_id_arg, int64_t quantity_arg, int64_t payer_note_truncated_arg) { + LDKPublicKey payer_id_arg_ref; + CHECK((*env)->GetArrayLength(env, payer_id_arg) == 33); + (*env)->GetByteArrayRegion(env, payer_id_arg, 0, 33, payer_id_arg_ref.compressed_form); + void* quantity_arg_ptr = untag_ptr(quantity_arg); + CHECK_ACCESS(quantity_arg_ptr); + LDKCOption_u64Z quantity_arg_conv = *(LDKCOption_u64Z*)(quantity_arg_ptr); + quantity_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(quantity_arg)); + LDKUntrustedString payer_note_truncated_arg_conv; + payer_note_truncated_arg_conv.inner = untag_ptr(payer_note_truncated_arg); + payer_note_truncated_arg_conv.is_owned = ptr_is_owned(payer_note_truncated_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(payer_note_truncated_arg_conv); + payer_note_truncated_arg_conv = UntrustedString_clone(&payer_note_truncated_arg_conv); + LDKInvoiceRequestFields ret_var = InvoiceRequestFields_new(payer_id_arg_ref, quantity_arg_conv, payer_note_truncated_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t InvoiceRequestFields_clone_ptr(LDKInvoiceRequestFields *NONNULL_PTR arg) { + LDKInvoiceRequestFields ret_var = InvoiceRequestFields_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKInvoiceRequestFields arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = InvoiceRequestFields_clone_ptr(&arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKInvoiceRequestFields orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKInvoiceRequestFields ret_var = InvoiceRequestFields_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKInvoiceRequestFields a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKInvoiceRequestFields b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = InvoiceRequestFields_eq(&a_conv, &b_conv); + return ret_conv; +} + +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1write(JNIEnv *env, jclass clz, int64_t obj) { + LDKInvoiceRequestFields obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = InvoiceRequestFields_write(&obj_conv); + int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen); + (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1read(JNIEnv *env, jclass clz, int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = (*env)->GetArrayLength(env, ser); + ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL); + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ"); + *ret_conv = InvoiceRequestFields_read(ser_ref); + (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0); + return tag_ptr(ret_conv, true); +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TaggedHash_1free(JNIEnv *env, jclass clz, int64_t this_obj) { LDKTaggedHash this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -66869,6 +72879,50 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TaggedHash_1merkle_1roo return ret_arr; } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignError_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKSignError this_ptr_conv = *(LDKSignError*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + SignError_free(this_ptr_conv); +} + +static inline uint64_t SignError_clone_ptr(LDKSignError *NONNULL_PTR arg) { + LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError"); + *ret_copy = SignError_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignError_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKSignError* arg_conv = (LDKSignError*)untag_ptr(arg); + int64_t ret_conv = SignError_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignError_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKSignError* orig_conv = (LDKSignError*)untag_ptr(orig); + LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError"); + *ret_copy = SignError_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignError_1signing(JNIEnv *env, jclass clz) { + LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError"); + *ret_copy = SignError_signing(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignError_1verification(JNIEnv *env, jclass clz, jclass a) { + LDKSecp256k1Error a_conv = LDKSecp256k1Error_from_java(env, a); + LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError"); + *ret_copy = SignError_verification(a_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12ParseError_1free(JNIEnv *env, jclass clz, int64_t this_obj) { LDKBolt12ParseError this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -67028,6 +73082,11 @@ JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Bolt12SemanticError_1missing return ret_conv; } +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Bolt12SemanticError_1unexpected_1paths(JNIEnv *env, jclass clz) { + jclass ret_conv = LDKBolt12SemanticError_to_java(env, Bolt12SemanticError_unexpected_paths()); + return ret_conv; +} + JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Bolt12SemanticError_1invalid_1pay_1info(JNIEnv *env, jclass clz) { jclass ret_conv = LDKBolt12SemanticError_to_java(env, Bolt12SemanticError_invalid_pay_info()); return ret_conv; @@ -67048,6 +73107,164 @@ JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Bolt12SemanticError_1missing return ret_conv; } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKRefundMaybeWithDerivedMetadataBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + RefundMaybeWithDerivedMetadataBuilder_free(this_obj_conv); +} + +static inline uint64_t RefundMaybeWithDerivedMetadataBuilder_clone_ptr(LDKRefundMaybeWithDerivedMetadataBuilder *NONNULL_PTR arg) { + LDKRefundMaybeWithDerivedMetadataBuilder ret_var = RefundMaybeWithDerivedMetadataBuilder_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKRefundMaybeWithDerivedMetadataBuilder arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = RefundMaybeWithDerivedMetadataBuilder_clone_ptr(&arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKRefundMaybeWithDerivedMetadataBuilder orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKRefundMaybeWithDerivedMetadataBuilder ret_var = RefundMaybeWithDerivedMetadataBuilder_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1new(JNIEnv *env, jclass clz, int8_tArray metadata, int8_tArray payer_id, int64_t amount_msats) { + LDKCVec_u8Z metadata_ref; + metadata_ref.datalen = (*env)->GetArrayLength(env, metadata); + metadata_ref.data = MALLOC(metadata_ref.datalen, "LDKCVec_u8Z Bytes"); + (*env)->GetByteArrayRegion(env, metadata, 0, metadata_ref.datalen, metadata_ref.data); + LDKPublicKey payer_id_ref; + CHECK((*env)->GetArrayLength(env, payer_id) == 33); + (*env)->GetByteArrayRegion(env, payer_id, 0, 33, payer_id_ref.compressed_form); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = RefundMaybeWithDerivedMetadataBuilder_new(metadata_ref, payer_id_ref, amount_msats); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1deriving_1payer_1id(JNIEnv *env, jclass clz, int8_tArray node_id, int64_t expanded_key, int64_t entropy_source, int64_t amount_msats, int8_tArray payment_id) { + LDKPublicKey node_id_ref; + CHECK((*env)->GetArrayLength(env, node_id) == 33); + (*env)->GetByteArrayRegion(env, node_id, 0, 33, node_id_ref.compressed_form); + LDKExpandedKey expanded_key_conv; + expanded_key_conv.inner = untag_ptr(expanded_key); + expanded_key_conv.is_owned = ptr_is_owned(expanded_key); + CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv); + expanded_key_conv.is_owned = false; + void* entropy_source_ptr = untag_ptr(entropy_source); + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } + LDKThirtyTwoBytes payment_id_ref; + CHECK((*env)->GetArrayLength(env, payment_id) == 32); + (*env)->GetByteArrayRegion(env, payment_id, 0, 32, payment_id_ref.data); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(node_id_ref, &expanded_key_conv, entropy_source_conv, amount_msats, payment_id_ref); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1description(JNIEnv *env, jclass clz, int64_t this_arg, jstring description) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKStr description_conv = java_to_owned_str(env, description); + RefundMaybeWithDerivedMetadataBuilder_description(this_arg_conv, description_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1absolute_1expiry(JNIEnv *env, jclass clz, int64_t this_arg, int64_t absolute_expiry) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + RefundMaybeWithDerivedMetadataBuilder_absolute_expiry(this_arg_conv, absolute_expiry); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1issuer(JNIEnv *env, jclass clz, int64_t this_arg, jstring issuer) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKStr issuer_conv = java_to_owned_str(env, issuer); + RefundMaybeWithDerivedMetadataBuilder_issuer(this_arg_conv, issuer_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1path(JNIEnv *env, jclass clz, int64_t this_arg, int64_t path) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKBlindedPath path_conv; + path_conv.inner = untag_ptr(path); + path_conv.is_owned = ptr_is_owned(path); + CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv); + path_conv = BlindedPath_clone(&path_conv); + RefundMaybeWithDerivedMetadataBuilder_path(this_arg_conv, path_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1chain(JNIEnv *env, jclass clz, int64_t this_arg, jclass network) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKNetwork network_conv = LDKNetwork_from_java(env, network); + RefundMaybeWithDerivedMetadataBuilder_chain(this_arg_conv, network_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1quantity(JNIEnv *env, jclass clz, int64_t this_arg, int64_t quantity) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + RefundMaybeWithDerivedMetadataBuilder_quantity(this_arg_conv, quantity); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1payer_1note(JNIEnv *env, jclass clz, int64_t this_arg, jstring payer_note) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKStr payer_note_conv = java_to_owned_str(env, payer_note); + RefundMaybeWithDerivedMetadataBuilder_payer_note(this_arg_conv, payer_note_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1build(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ"); + *ret_conv = RefundMaybeWithDerivedMetadataBuilder_build(this_arg_conv); + return tag_ptr(ret_conv, true); +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Refund_1free(JNIEnv *env, jclass clz, int64_t this_obj) { LDKRefund this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -67248,6 +73465,16 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Refund_1payer_1note(JNIEnv return ret_ref; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Refund_1hash(JNIEnv *env, jclass clz, int64_t o) { + LDKRefund o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = Refund_hash(&o_conv); + return ret_conv; +} + JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Refund_1write(JNIEnv *env, jclass clz, int64_t obj) { LDKRefund obj_conv; obj_conv.inner = untag_ptr(obj); @@ -67479,6 +73706,16 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeId_1from_1pubkey(JNIEnv return ret_ref; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeId_1from_1slice(JNIEnv *env, jclass clz, int8_tArray bytes) { + LDKu8slice bytes_ref; + bytes_ref.datalen = (*env)->GetArrayLength(env, bytes); + bytes_ref.data = (*env)->GetByteArrayElements (env, bytes, NULL); + LDKCResult_NodeIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeIdDecodeErrorZ), "LDKCResult_NodeIdDecodeErrorZ"); + *ret_conv = NodeId_from_slice(bytes_ref); + (*env)->ReleaseByteArrayElements(env, bytes, (int8_t*)bytes_ref.data, 0); + return tag_ptr(ret_conv, true); +} + JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NodeId_1as_1slice(JNIEnv *env, jclass clz, int64_t this_arg) { LDKNodeId this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -68352,6 +74589,32 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DirectedChannelInfo_1effect return ret_ref; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DirectedChannelInfo_1source(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKDirectedChannelInfo this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKNodeId ret_var = DirectedChannelInfo_source(&this_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DirectedChannelInfo_1target(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKDirectedChannelInfo this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKNodeId ret_var = DirectedChannelInfo_target(&this_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_EffectiveCapacity_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -69072,6 +75335,16 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeInfo_1eq(JNIEnv *env, return ret_conv; } +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeInfo_1is_1tor_1only(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKNodeInfo this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = NodeInfo_is_tor_only(&this_arg_conv); + return ret_conv; +} + JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NodeInfo_1write(JNIEnv *env, jclass clz, int64_t obj) { LDKNodeInfo obj_conv; obj_conv.inner = untag_ptr(obj); @@ -73226,7 +79499,34 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_set_channel_value_satoshis(&this_ptr_conv, val); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1new(JNIEnv *env, jclass clz, int64_t outpoint_arg, int8_tArray per_commitment_point_arg, int16_t to_self_delay_arg, int64_t output_arg, int64_t revocation_pubkey_arg, int8_tArray channel_keys_id_arg, int64_t channel_value_satoshis_arg) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1get_1channel_1transaction_1parameters(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKDelayedPaymentOutputDescriptor this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelTransactionParameters ret_var = DelayedPaymentOutputDescriptor_get_channel_transaction_parameters(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1set_1channel_1transaction_1parameters(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKDelayedPaymentOutputDescriptor this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelTransactionParameters val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelTransactionParameters_clone(&val_conv); + DelayedPaymentOutputDescriptor_set_channel_transaction_parameters(&this_ptr_conv, val_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1new(JNIEnv *env, jclass clz, int64_t outpoint_arg, int8_tArray per_commitment_point_arg, int16_t to_self_delay_arg, int64_t output_arg, int64_t revocation_pubkey_arg, int8_tArray channel_keys_id_arg, int64_t channel_value_satoshis_arg, int64_t channel_transaction_parameters_arg) { LDKOutPoint outpoint_arg_conv; outpoint_arg_conv.inner = untag_ptr(outpoint_arg); outpoint_arg_conv.is_owned = ptr_is_owned(outpoint_arg); @@ -73247,7 +79547,12 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescrip LDKThirtyTwoBytes channel_keys_id_arg_ref; CHECK((*env)->GetArrayLength(env, channel_keys_id_arg) == 32); (*env)->GetByteArrayRegion(env, channel_keys_id_arg, 0, 32, channel_keys_id_arg_ref.data); - LDKDelayedPaymentOutputDescriptor ret_var = DelayedPaymentOutputDescriptor_new(outpoint_arg_conv, per_commitment_point_arg_ref, to_self_delay_arg, output_arg_conv, revocation_pubkey_arg_conv, channel_keys_id_arg_ref, channel_value_satoshis_arg); + LDKChannelTransactionParameters channel_transaction_parameters_arg_conv; + channel_transaction_parameters_arg_conv.inner = untag_ptr(channel_transaction_parameters_arg); + channel_transaction_parameters_arg_conv.is_owned = ptr_is_owned(channel_transaction_parameters_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_transaction_parameters_arg_conv); + channel_transaction_parameters_arg_conv = ChannelTransactionParameters_clone(&channel_transaction_parameters_arg_conv); + LDKDelayedPaymentOutputDescriptor ret_var = DelayedPaymentOutputDescriptor_new(outpoint_arg_conv, per_commitment_point_arg_ref, to_self_delay_arg, output_arg_conv, revocation_pubkey_arg_conv, channel_keys_id_arg_ref, channel_value_satoshis_arg, channel_transaction_parameters_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -73931,6 +80236,29 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1set_1channel_1 HTLCDescriptor_set_channel_derivation_parameters(&this_ptr_conv, val_conv); } +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1get_1commitment_1txid(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKHTLCDescriptor this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = (*env)->NewByteArray(env, 32); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *HTLCDescriptor_get_commitment_txid(&this_ptr_conv)); + return ret_arr; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1set_1commitment_1txid(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { + LDKHTLCDescriptor this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKThirtyTwoBytes val_ref; + CHECK((*env)->GetArrayLength(env, val) == 32); + (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); + HTLCDescriptor_set_commitment_txid(&this_ptr_conv, val_ref); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1get_1per_1commitment_1number(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKHTLCDescriptor this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -74067,6 +80395,37 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1set_1counterpa HTLCDescriptor_set_counterparty_sig(&this_ptr_conv, val_ref); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1new(JNIEnv *env, jclass clz, int64_t channel_derivation_parameters_arg, int8_tArray commitment_txid_arg, int64_t per_commitment_number_arg, int8_tArray per_commitment_point_arg, int32_t feerate_per_kw_arg, int64_t htlc_arg, int64_t preimage_arg, int8_tArray counterparty_sig_arg) { + LDKChannelDerivationParameters channel_derivation_parameters_arg_conv; + channel_derivation_parameters_arg_conv.inner = untag_ptr(channel_derivation_parameters_arg); + channel_derivation_parameters_arg_conv.is_owned = ptr_is_owned(channel_derivation_parameters_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_derivation_parameters_arg_conv); + channel_derivation_parameters_arg_conv = ChannelDerivationParameters_clone(&channel_derivation_parameters_arg_conv); + LDKThirtyTwoBytes commitment_txid_arg_ref; + CHECK((*env)->GetArrayLength(env, commitment_txid_arg) == 32); + (*env)->GetByteArrayRegion(env, commitment_txid_arg, 0, 32, commitment_txid_arg_ref.data); + LDKPublicKey per_commitment_point_arg_ref; + CHECK((*env)->GetArrayLength(env, per_commitment_point_arg) == 33); + (*env)->GetByteArrayRegion(env, per_commitment_point_arg, 0, 33, per_commitment_point_arg_ref.compressed_form); + LDKHTLCOutputInCommitment htlc_arg_conv; + htlc_arg_conv.inner = untag_ptr(htlc_arg); + htlc_arg_conv.is_owned = ptr_is_owned(htlc_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(htlc_arg_conv); + htlc_arg_conv = HTLCOutputInCommitment_clone(&htlc_arg_conv); + void* preimage_arg_ptr = untag_ptr(preimage_arg); + CHECK_ACCESS(preimage_arg_ptr); + LDKCOption_ThirtyTwoBytesZ preimage_arg_conv = *(LDKCOption_ThirtyTwoBytesZ*)(preimage_arg_ptr); + preimage_arg_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(preimage_arg)); + LDKECDSASignature counterparty_sig_arg_ref; + CHECK((*env)->GetArrayLength(env, counterparty_sig_arg) == 64); + (*env)->GetByteArrayRegion(env, counterparty_sig_arg, 0, 64, counterparty_sig_arg_ref.compact_form); + LDKHTLCDescriptor ret_var = HTLCDescriptor_new(channel_derivation_parameters_arg_conv, commitment_txid_arg_ref, per_commitment_number_arg, per_commitment_point_arg_ref, feerate_per_kw_arg, htlc_arg_conv, preimage_arg_conv, counterparty_sig_arg_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + static inline uint64_t HTLCDescriptor_clone_ptr(LDKHTLCDescriptor *NONNULL_PTR arg) { LDKHTLCDescriptor ret_var = HTLCDescriptor_clone(arg); int64_t ret_ref = 0; @@ -74271,6 +80630,15 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeSigner_1free(JNIEnv *env, NodeSigner_free(this_ptr_conv); } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutputSpender_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKOutputSpender this_ptr_conv = *(LDKOutputSpender*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + OutputSpender_free(this_ptr_conv); +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignerProvider_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -74280,6 +80648,15 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignerProvider_1free(JNIEnv *e SignerProvider_free(this_ptr_conv); } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChangeDestinationSource_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKChangeDestinationSource this_ptr_conv = *(LDKChangeDestinationSource*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + ChangeDestinationSource_free(this_ptr_conv); +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1free(JNIEnv *env, jclass clz, int64_t this_obj) { LDKInMemorySigner this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -74771,76 +81148,36 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1sign_1spendabl return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1spend_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray descriptors, int64_tArray outputs, int8_tArray change_destination_script, int32_t feerate_sat_per_1000_weight, int64_t locktime) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1EntropySource(JNIEnv *env, jclass clz, int64_t this_arg) { LDKKeysManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKCVec_SpendableOutputDescriptorZ descriptors_constr; - descriptors_constr.datalen = (*env)->GetArrayLength(env, descriptors); - if (descriptors_constr.datalen > 0) - descriptors_constr.data = MALLOC(descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements"); - else - descriptors_constr.data = NULL; - int64_t* descriptors_vals = (*env)->GetLongArrayElements (env, descriptors, NULL); - for (size_t b = 0; b < descriptors_constr.datalen; b++) { - int64_t descriptors_conv_27 = descriptors_vals[b]; - void* descriptors_conv_27_ptr = untag_ptr(descriptors_conv_27); - CHECK_ACCESS(descriptors_conv_27_ptr); - LDKSpendableOutputDescriptor descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(descriptors_conv_27_ptr); - descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptors_conv_27)); - descriptors_constr.data[b] = descriptors_conv_27_conv; - } - (*env)->ReleaseLongArrayElements(env, descriptors, descriptors_vals, 0); - LDKCVec_TxOutZ outputs_constr; - outputs_constr.datalen = (*env)->GetArrayLength(env, outputs); - if (outputs_constr.datalen > 0) - outputs_constr.data = MALLOC(outputs_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements"); - else - outputs_constr.data = NULL; - int64_t* outputs_vals = (*env)->GetLongArrayElements (env, outputs, NULL); - for (size_t h = 0; h < outputs_constr.datalen; h++) { - int64_t outputs_conv_7 = outputs_vals[h]; - void* outputs_conv_7_ptr = untag_ptr(outputs_conv_7); - CHECK_ACCESS(outputs_conv_7_ptr); - LDKTxOut outputs_conv_7_conv = *(LDKTxOut*)(outputs_conv_7_ptr); - outputs_conv_7_conv = TxOut_clone((LDKTxOut*)untag_ptr(outputs_conv_7)); - outputs_constr.data[h] = outputs_conv_7_conv; - } - (*env)->ReleaseLongArrayElements(env, outputs, outputs_vals, 0); - LDKCVec_u8Z change_destination_script_ref; - change_destination_script_ref.datalen = (*env)->GetArrayLength(env, change_destination_script); - change_destination_script_ref.data = MALLOC(change_destination_script_ref.datalen, "LDKCVec_u8Z Bytes"); - (*env)->GetByteArrayRegion(env, change_destination_script, 0, change_destination_script_ref.datalen, change_destination_script_ref.data); - void* locktime_ptr = untag_ptr(locktime); - CHECK_ACCESS(locktime_ptr); - LDKCOption_u32Z locktime_conv = *(LDKCOption_u32Z*)(locktime_ptr); - locktime_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(locktime)); - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = KeysManager_spend_spendable_outputs(&this_arg_conv, descriptors_constr, outputs_constr, change_destination_script_ref, feerate_sat_per_1000_weight, locktime_conv); - return tag_ptr(ret_conv, true); + LDKEntropySource* ret_ret = MALLOC(sizeof(LDKEntropySource), "LDKEntropySource"); + *ret_ret = KeysManager_as_EntropySource(&this_arg_conv); + return tag_ptr(ret_ret, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1EntropySource(JNIEnv *env, jclass clz, int64_t this_arg) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1NodeSigner(JNIEnv *env, jclass clz, int64_t this_arg) { LDKKeysManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKEntropySource* ret_ret = MALLOC(sizeof(LDKEntropySource), "LDKEntropySource"); - *ret_ret = KeysManager_as_EntropySource(&this_arg_conv); + LDKNodeSigner* ret_ret = MALLOC(sizeof(LDKNodeSigner), "LDKNodeSigner"); + *ret_ret = KeysManager_as_NodeSigner(&this_arg_conv); return tag_ptr(ret_ret, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1NodeSigner(JNIEnv *env, jclass clz, int64_t this_arg) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1OutputSpender(JNIEnv *env, jclass clz, int64_t this_arg) { LDKKeysManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKNodeSigner* ret_ret = MALLOC(sizeof(LDKNodeSigner), "LDKNodeSigner"); - *ret_ret = KeysManager_as_NodeSigner(&this_arg_conv); + LDKOutputSpender* ret_ret = MALLOC(sizeof(LDKOutputSpender), "LDKOutputSpender"); + *ret_ret = KeysManager_as_OutputSpender(&this_arg_conv); return tag_ptr(ret_ret, true); } @@ -74885,6 +81222,17 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1as_1Nod return tag_ptr(ret_ret, true); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1as_1OutputSpender(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKPhantomKeysManager this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKOutputSpender* ret_ret = MALLOC(sizeof(LDKOutputSpender), "LDKOutputSpender"); + *ret_ret = PhantomKeysManager_as_OutputSpender(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1as_1SignerProvider(JNIEnv *env, jclass clz, int64_t this_arg) { LDKPhantomKeysManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -74912,57 +81260,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1new(JNI return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1spend_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray descriptors, int64_tArray outputs, int8_tArray change_destination_script, int32_t feerate_sat_per_1000_weight, int64_t locktime) { - LDKPhantomKeysManager this_arg_conv; - this_arg_conv.inner = untag_ptr(this_arg); - this_arg_conv.is_owned = ptr_is_owned(this_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv.is_owned = false; - LDKCVec_SpendableOutputDescriptorZ descriptors_constr; - descriptors_constr.datalen = (*env)->GetArrayLength(env, descriptors); - if (descriptors_constr.datalen > 0) - descriptors_constr.data = MALLOC(descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements"); - else - descriptors_constr.data = NULL; - int64_t* descriptors_vals = (*env)->GetLongArrayElements (env, descriptors, NULL); - for (size_t b = 0; b < descriptors_constr.datalen; b++) { - int64_t descriptors_conv_27 = descriptors_vals[b]; - void* descriptors_conv_27_ptr = untag_ptr(descriptors_conv_27); - CHECK_ACCESS(descriptors_conv_27_ptr); - LDKSpendableOutputDescriptor descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(descriptors_conv_27_ptr); - descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptors_conv_27)); - descriptors_constr.data[b] = descriptors_conv_27_conv; - } - (*env)->ReleaseLongArrayElements(env, descriptors, descriptors_vals, 0); - LDKCVec_TxOutZ outputs_constr; - outputs_constr.datalen = (*env)->GetArrayLength(env, outputs); - if (outputs_constr.datalen > 0) - outputs_constr.data = MALLOC(outputs_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements"); - else - outputs_constr.data = NULL; - int64_t* outputs_vals = (*env)->GetLongArrayElements (env, outputs, NULL); - for (size_t h = 0; h < outputs_constr.datalen; h++) { - int64_t outputs_conv_7 = outputs_vals[h]; - void* outputs_conv_7_ptr = untag_ptr(outputs_conv_7); - CHECK_ACCESS(outputs_conv_7_ptr); - LDKTxOut outputs_conv_7_conv = *(LDKTxOut*)(outputs_conv_7_ptr); - outputs_conv_7_conv = TxOut_clone((LDKTxOut*)untag_ptr(outputs_conv_7)); - outputs_constr.data[h] = outputs_conv_7_conv; - } - (*env)->ReleaseLongArrayElements(env, outputs, outputs_vals, 0); - LDKCVec_u8Z change_destination_script_ref; - change_destination_script_ref.datalen = (*env)->GetArrayLength(env, change_destination_script); - change_destination_script_ref.data = MALLOC(change_destination_script_ref.datalen, "LDKCVec_u8Z Bytes"); - (*env)->GetByteArrayRegion(env, change_destination_script, 0, change_destination_script_ref.datalen, change_destination_script_ref.data); - void* locktime_ptr = untag_ptr(locktime); - CHECK_ACCESS(locktime_ptr); - LDKCOption_u32Z locktime_conv = *(LDKCOption_u32Z*)(locktime_ptr); - locktime_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(locktime)); - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = PhantomKeysManager_spend_spendable_outputs(&this_arg_conv, descriptors_constr, outputs_constr, change_destination_script_ref, feerate_sat_per_1000_weight, locktime_conv); - return tag_ptr(ret_conv, true); -} - JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1derive_1channel_1keys(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_value_satoshis, int8_tArray params) { LDKPhantomKeysManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -75002,6 +81299,36 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1get return ret_arr; } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RandomBytes_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKRandomBytes this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + RandomBytes_free(this_obj_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RandomBytes_1new(JNIEnv *env, jclass clz, int8_tArray seed) { + LDKThirtyTwoBytes seed_ref; + CHECK((*env)->GetArrayLength(env, seed) == 32); + (*env)->GetByteArrayRegion(env, seed, 0, 32, seed_ref.data); + LDKRandomBytes ret_var = RandomBytes_new(seed_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RandomBytes_1as_1EntropySource(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKRandomBytes this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKEntropySource* ret_ret = MALLOC(sizeof(LDKEntropySource), "LDKEntropySource"); + *ret_ret = RandomBytes_as_EntropySource(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_EcdsaChannelSigner_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -75318,6 +81645,29 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Destination_1blinded_1path( return ret_ref; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Destination_1hash(JNIEnv *env, jclass clz, int64_t o) { + LDKDestination* o_conv = (LDKDestination*)untag_ptr(o); + int64_t ret_conv = Destination_hash(o_conv); + return ret_conv; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Destination_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKDestination* a_conv = (LDKDestination*)untag_ptr(a); + LDKDestination* b_conv = (LDKDestination*)untag_ptr(b); + jboolean ret_conv = Destination_eq(a_conv, b_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Destination_1resolve(JNIEnv *env, jclass clz, int64_t this_arg, int64_t network_graph) { + LDKDestination* this_arg_conv = (LDKDestination*)untag_ptr(this_arg); + LDKReadOnlyNetworkGraph network_graph_conv; + network_graph_conv.inner = untag_ptr(network_graph); + network_graph_conv.is_owned = ptr_is_owned(network_graph); + CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv); + network_graph_conv.is_owned = false; + Destination_resolve(this_arg_conv, &network_graph_conv); +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SendSuccess_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -75364,6 +81714,12 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendSuccess_1buffered_1awai return ret_ref; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendSuccess_1hash(JNIEnv *env, jclass clz, int64_t o) { + LDKSendSuccess* o_conv = (LDKSendSuccess*)untag_ptr(o); + int64_t ret_conv = SendSuccess_hash(o_conv); + return ret_conv; +} + JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_SendSuccess_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { LDKSendSuccess* a_conv = (LDKSendSuccess*)untag_ptr(a); LDKSendSuccess* b_conv = (LDKSendSuccess*)untag_ptr(b); @@ -75460,6 +81816,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendError_1get_1node_1id_1f return ret_ref; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendError_1unresolved_1introduction_1node(JNIEnv *env, jclass clz) { + LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError"); + *ret_copy = SendError_unresolved_introduction_node(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendError_1blinded_1path_1advance_1failed(JNIEnv *env, jclass clz) { LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError"); *ret_copy = SendError_blinded_path_advance_failed(); @@ -75467,6 +81830,12 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendError_1blinded_1path_1a return ret_ref; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendError_1hash(JNIEnv *env, jclass clz, int64_t o) { + LDKSendError* o_conv = (LDKSendError*)untag_ptr(o); + int64_t ret_conv = SendError_hash(o_conv); + return ret_conv; +} + JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_SendError_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { LDKSendError* a_conv = (LDKSendError*)untag_ptr(a); LDKSendError* b_conv = (LDKSendError*)untag_ptr(b); @@ -75512,17 +81881,18 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeeledOnion_1clone(JNIEnv * return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeeledOnion_1forward(JNIEnv *env, jclass clz, int8_tArray a, int64_t b) { - LDKPublicKey a_ref; - CHECK((*env)->GetArrayLength(env, a) == 33); - (*env)->GetByteArrayRegion(env, a, 0, 33, a_ref.compressed_form); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeeledOnion_1forward(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + void* a_ptr = untag_ptr(a); + CHECK_ACCESS(a_ptr); + LDKNextMessageHop a_conv = *(LDKNextMessageHop*)(a_ptr); + a_conv = NextMessageHop_clone((LDKNextMessageHop*)untag_ptr(a)); LDKOnionMessage b_conv; b_conv.inner = untag_ptr(b); b_conv.is_owned = ptr_is_owned(b); CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); b_conv = OnionMessage_clone(&b_conv); LDKPeeledOnion *ret_copy = MALLOC(sizeof(LDKPeeledOnion), "LDKPeeledOnion"); - *ret_copy = PeeledOnion_forward(a_ref, b_conv); + *ret_copy = PeeledOnion_forward(a_conv, b_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -75546,13 +81916,53 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeeledOnion_1receive(JNIEnv return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1onion_1message(JNIEnv *env, jclass clz, int64_t entropy_source, int64_t node_signer, int64_t path, int64_t contents, int64_t reply_path) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1onion_1message_1resolving_1destination(JNIEnv *env, jclass clz, int64_t entropy_source, int64_t node_signer, int64_t node_id_lookup, int64_t network_graph, int64_t path, int64_t contents, int64_t reply_path) { + void* entropy_source_ptr = untag_ptr(entropy_source); + if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } + LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + void* node_signer_ptr = untag_ptr(node_signer); + if (ptr_is_owned(node_signer)) { CHECK_ACCESS(node_signer_ptr); } + LDKNodeSigner* node_signer_conv = (LDKNodeSigner*)node_signer_ptr; + void* node_id_lookup_ptr = untag_ptr(node_id_lookup); + if (ptr_is_owned(node_id_lookup)) { CHECK_ACCESS(node_id_lookup_ptr); } + LDKNodeIdLookUp* node_id_lookup_conv = (LDKNodeIdLookUp*)node_id_lookup_ptr; + LDKReadOnlyNetworkGraph network_graph_conv; + network_graph_conv.inner = untag_ptr(network_graph); + network_graph_conv.is_owned = ptr_is_owned(network_graph); + CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv); + network_graph_conv.is_owned = false; + LDKOnionMessagePath path_conv; + path_conv.inner = untag_ptr(path); + path_conv.is_owned = ptr_is_owned(path); + CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv); + path_conv = OnionMessagePath_clone(&path_conv); + void* contents_ptr = untag_ptr(contents); + CHECK_ACCESS(contents_ptr); + LDKOnionMessageContents contents_conv = *(LDKOnionMessageContents*)(contents_ptr); + if (contents_conv.free == LDKOnionMessageContents_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKOnionMessageContents_JCalls_cloned(&contents_conv); + } + LDKBlindedPath reply_path_conv; + reply_path_conv.inner = untag_ptr(reply_path); + reply_path_conv.is_owned = ptr_is_owned(reply_path); + CHECK_INNER_FIELD_ACCESS_OR_NULL(reply_path_conv); + reply_path_conv = BlindedPath_clone(&reply_path_conv); + LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ"); + *ret_conv = create_onion_message_resolving_destination(entropy_source_conv, node_signer_conv, node_id_lookup_conv, &network_graph_conv, path_conv, contents_conv, reply_path_conv); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1onion_1message(JNIEnv *env, jclass clz, int64_t entropy_source, int64_t node_signer, int64_t node_id_lookup, int64_t path, int64_t contents, int64_t reply_path) { void* entropy_source_ptr = untag_ptr(entropy_source); if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; void* node_signer_ptr = untag_ptr(node_signer); if (ptr_is_owned(node_signer)) { CHECK_ACCESS(node_signer_ptr); } LDKNodeSigner* node_signer_conv = (LDKNodeSigner*)node_signer_ptr; + void* node_id_lookup_ptr = untag_ptr(node_id_lookup); + if (ptr_is_owned(node_id_lookup)) { CHECK_ACCESS(node_id_lookup_ptr); } + LDKNodeIdLookUp* node_id_lookup_conv = (LDKNodeIdLookUp*)node_id_lookup_ptr; LDKOnionMessagePath path_conv; path_conv.inner = untag_ptr(path); path_conv.is_owned = ptr_is_owned(path); @@ -75571,7 +81981,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1onion_1message(JNIE CHECK_INNER_FIELD_ACCESS_OR_NULL(reply_path_conv); reply_path_conv = BlindedPath_clone(&reply_path_conv); LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ"); - *ret_conv = create_onion_message(entropy_source_conv, node_signer_conv, path_conv, contents_conv, reply_path_conv); + *ret_conv = create_onion_message(entropy_source_conv, node_signer_conv, node_id_lookup_conv, path_conv, contents_conv, reply_path_conv); return tag_ptr(ret_conv, true); } @@ -75607,7 +82017,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_peel_1onion_1message(JNIEnv return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1new(JNIEnv *env, jclass clz, int64_t entropy_source, int64_t node_signer, int64_t logger, int64_t message_router, int64_t offers_handler, int64_t custom_handler) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1new(JNIEnv *env, jclass clz, int64_t entropy_source, int64_t node_signer, int64_t logger, int64_t node_id_lookup, int64_t message_router, int64_t offers_handler, int64_t custom_handler) { void* entropy_source_ptr = untag_ptr(entropy_source); CHECK_ACCESS(entropy_source_ptr); LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); @@ -75629,6 +82039,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1new(JNIEnv // If this_arg is a JCalls struct, then we need to increment the refcnt in it. LDKLogger_JCalls_cloned(&logger_conv); } + void* node_id_lookup_ptr = untag_ptr(node_id_lookup); + CHECK_ACCESS(node_id_lookup_ptr); + LDKNodeIdLookUp node_id_lookup_conv = *(LDKNodeIdLookUp*)(node_id_lookup_ptr); + if (node_id_lookup_conv.free == LDKNodeIdLookUp_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKNodeIdLookUp_JCalls_cloned(&node_id_lookup_conv); + } void* message_router_ptr = untag_ptr(message_router); CHECK_ACCESS(message_router_ptr); LDKMessageRouter message_router_conv = *(LDKMessageRouter*)(message_router_ptr); @@ -75650,7 +82067,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1new(JNIEnv // If this_arg is a JCalls struct, then we need to increment the refcnt in it. LDKCustomOnionMessageHandler_JCalls_cloned(&custom_handler_conv); } - LDKOnionMessenger ret_var = OnionMessenger_new(entropy_source_conv, node_signer_conv, logger_conv, message_router_conv, offers_handler_conv, custom_handler_conv); + LDKOnionMessenger ret_var = OnionMessenger_new(entropy_source_conv, node_signer_conv, logger_conv, node_id_lookup_conv, message_router_conv, offers_handler_conv, custom_handler_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -76089,6 +82506,65 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OnionMessageContents_1free(JNI OnionMessageContents_free(this_ptr_conv); } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKNextMessageHop this_ptr_conv = *(LDKNextMessageHop*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + NextMessageHop_free(this_ptr_conv); +} + +static inline uint64_t NextMessageHop_clone_ptr(LDKNextMessageHop *NONNULL_PTR arg) { + LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop"); + *ret_copy = NextMessageHop_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKNextMessageHop* arg_conv = (LDKNextMessageHop*)untag_ptr(arg); + int64_t ret_conv = NextMessageHop_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKNextMessageHop* orig_conv = (LDKNextMessageHop*)untag_ptr(orig); + LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop"); + *ret_copy = NextMessageHop_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1node_1id(JNIEnv *env, jclass clz, int8_tArray a) { + LDKPublicKey a_ref; + CHECK((*env)->GetArrayLength(env, a) == 33); + (*env)->GetByteArrayRegion(env, a, 0, 33, a_ref.compressed_form); + LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop"); + *ret_copy = NextMessageHop_node_id(a_ref); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1short_1channel_1id(JNIEnv *env, jclass clz, int64_t a) { + LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop"); + *ret_copy = NextMessageHop_short_channel_id(a); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1hash(JNIEnv *env, jclass clz, int64_t o) { + LDKNextMessageHop* o_conv = (LDKNextMessageHop*)untag_ptr(o); + int64_t ret_conv = NextMessageHop_hash(o_conv); + return ret_conv; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKNextMessageHop* a_conv = (LDKNextMessageHop*)untag_ptr(a); + LDKNextMessageHop* b_conv = (LDKNextMessageHop*)untag_ptr(b); + jboolean ret_conv = NextMessageHop_eq(a_conv, b_conv); + return ret_conv; +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1free(JNIEnv *env, jclass clz, int64_t this_obj) { LDKBlindedPath this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -76097,27 +82573,29 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1free(JNIEnv *env, BlindedPath_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BlindedPath_1get_1introduction_1node_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1get_1introduction_1node(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKBlindedPath this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 33); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, BlindedPath_get_introduction_node_id(&this_ptr_conv).compressed_form); - return ret_arr; + LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode"); + *ret_copy = BlindedPath_get_introduction_node(&this_ptr_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1set_1introduction_1node_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1set_1introduction_1node(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKBlindedPath this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK((*env)->GetArrayLength(env, val) == 33); - (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form); - BlindedPath_set_introduction_node_id(&this_ptr_conv, val_ref); + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKIntroductionNode val_conv = *(LDKIntroductionNode*)(val_ptr); + val_conv = IntroductionNode_clone((LDKIntroductionNode*)untag_ptr(val)); + BlindedPath_set_introduction_node(&this_ptr_conv, val_conv); } JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BlindedPath_1get_1blinding_1point(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -76191,10 +82669,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1set_1blinded_1hop BlindedPath_set_blinded_hops(&this_ptr_conv, val_constr); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new(JNIEnv *env, jclass clz, int8_tArray introduction_node_id_arg, int8_tArray blinding_point_arg, int64_tArray blinded_hops_arg) { - LDKPublicKey introduction_node_id_arg_ref; - CHECK((*env)->GetArrayLength(env, introduction_node_id_arg) == 33); - (*env)->GetByteArrayRegion(env, introduction_node_id_arg, 0, 33, introduction_node_id_arg_ref.compressed_form); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new(JNIEnv *env, jclass clz, int64_t introduction_node_arg, int8_tArray blinding_point_arg, int64_tArray blinded_hops_arg) { + void* introduction_node_arg_ptr = untag_ptr(introduction_node_arg); + CHECK_ACCESS(introduction_node_arg_ptr); + LDKIntroductionNode introduction_node_arg_conv = *(LDKIntroductionNode*)(introduction_node_arg_ptr); + introduction_node_arg_conv = IntroductionNode_clone((LDKIntroductionNode*)untag_ptr(introduction_node_arg)); LDKPublicKey blinding_point_arg_ref; CHECK((*env)->GetArrayLength(env, blinding_point_arg) == 33); (*env)->GetByteArrayRegion(env, blinding_point_arg, 0, 33, blinding_point_arg_ref.compressed_form); @@ -76215,7 +82694,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new(JNIEnv *en blinded_hops_arg_constr.data[m] = blinded_hops_arg_conv_12_conv; } (*env)->ReleaseLongArrayElements(env, blinded_hops_arg, blinded_hops_arg_vals, 0); - LDKBlindedPath ret_var = BlindedPath_new(introduction_node_id_arg_ref, blinding_point_arg_ref, blinded_hops_arg_constr); + LDKBlindedPath ret_var = BlindedPath_new(introduction_node_arg_conv, blinding_point_arg_ref, blinded_hops_arg_constr); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -76277,6 +82756,131 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_BlindedPath_1eq(JNIEnv *en return ret_conv; } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKIntroductionNode this_ptr_conv = *(LDKIntroductionNode*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + IntroductionNode_free(this_ptr_conv); +} + +static inline uint64_t IntroductionNode_clone_ptr(LDKIntroductionNode *NONNULL_PTR arg) { + LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode"); + *ret_copy = IntroductionNode_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKIntroductionNode* arg_conv = (LDKIntroductionNode*)untag_ptr(arg); + int64_t ret_conv = IntroductionNode_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKIntroductionNode* orig_conv = (LDKIntroductionNode*)untag_ptr(orig); + LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode"); + *ret_copy = IntroductionNode_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1node_1id(JNIEnv *env, jclass clz, int8_tArray a) { + LDKPublicKey a_ref; + CHECK((*env)->GetArrayLength(env, a) == 33); + (*env)->GetByteArrayRegion(env, a, 0, 33, a_ref.compressed_form); + LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode"); + *ret_copy = IntroductionNode_node_id(a_ref); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1directed_1short_1channel_1id(JNIEnv *env, jclass clz, jclass a, int64_t b) { + LDKDirection a_conv = LDKDirection_from_java(env, a); + LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode"); + *ret_copy = IntroductionNode_directed_short_channel_id(a_conv, b); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1hash(JNIEnv *env, jclass clz, int64_t o) { + LDKIntroductionNode* o_conv = (LDKIntroductionNode*)untag_ptr(o); + int64_t ret_conv = IntroductionNode_hash(o_conv); + return ret_conv; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKIntroductionNode* a_conv = (LDKIntroductionNode*)untag_ptr(a); + LDKIntroductionNode* b_conv = (LDKIntroductionNode*)untag_ptr(b); + jboolean ret_conv = IntroductionNode_eq(a_conv, b_conv); + return ret_conv; +} + +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Direction_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKDirection* orig_conv = (LDKDirection*)untag_ptr(orig); + jclass ret_conv = LDKDirection_to_java(env, Direction_clone(orig_conv)); + return ret_conv; +} + +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Direction_1node_1one(JNIEnv *env, jclass clz) { + jclass ret_conv = LDKDirection_to_java(env, Direction_node_one()); + return ret_conv; +} + +JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Direction_1node_1two(JNIEnv *env, jclass clz) { + jclass ret_conv = LDKDirection_to_java(env, Direction_node_two()); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Direction_1hash(JNIEnv *env, jclass clz, int64_t o) { + LDKDirection* o_conv = (LDKDirection*)untag_ptr(o); + int64_t ret_conv = Direction_hash(o_conv); + return ret_conv; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Direction_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKDirection* a_conv = (LDKDirection*)untag_ptr(a); + LDKDirection* b_conv = (LDKDirection*)untag_ptr(b); + jboolean ret_conv = Direction_eq(a_conv, b_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeIdLookUp_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKNodeIdLookUp this_ptr_conv = *(LDKNodeIdLookUp*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + NodeIdLookUp_free(this_ptr_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_EmptyNodeIdLookUp_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKEmptyNodeIdLookUp this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + EmptyNodeIdLookUp_free(this_obj_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_EmptyNodeIdLookUp_1new(JNIEnv *env, jclass clz) { + LDKEmptyNodeIdLookUp ret_var = EmptyNodeIdLookUp_new(); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_EmptyNodeIdLookUp_1as_1NodeIdLookUp(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKEmptyNodeIdLookUp this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKNodeIdLookUp* ret_ret = MALLOC(sizeof(LDKNodeIdLookUp), "LDKNodeIdLookUp"); + *ret_ret = EmptyNodeIdLookUp_as_NodeIdLookUp(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedHop_1free(JNIEnv *env, jclass clz, int64_t this_obj) { LDKBlindedHop this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -76409,8 +83013,12 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1one_1hop_1for_ CHECK((*env)->GetArrayLength(env, recipient_node_id) == 33); (*env)->GetByteArrayRegion(env, recipient_node_id, 0, 33, recipient_node_id_ref.compressed_form); void* entropy_source_ptr = untag_ptr(entropy_source); - if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } - LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } LDKCResult_BlindedPathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedPathNoneZ), "LDKCResult_BlindedPathNoneZ"); *ret_conv = BlindedPath_one_hop_for_message(recipient_node_id_ref, entropy_source_conv); return tag_ptr(ret_conv, true); @@ -76431,14 +83039,18 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new_1for_1mess node_pks_constr.data[i] = node_pks_conv_8_ref; } void* entropy_source_ptr = untag_ptr(entropy_source); - if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } - LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } LDKCResult_BlindedPathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedPathNoneZ), "LDKCResult_BlindedPathNoneZ"); *ret_conv = BlindedPath_new_for_message(node_pks_constr, entropy_source_conv); return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1one_1hop_1for_1payment(JNIEnv *env, jclass clz, int8_tArray payee_node_id, int64_t payee_tlvs, int64_t entropy_source) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1one_1hop_1for_1payment(JNIEnv *env, jclass clz, int8_tArray payee_node_id, int64_t payee_tlvs, int16_t min_final_cltv_expiry_delta, int64_t entropy_source) { LDKPublicKey payee_node_id_ref; CHECK((*env)->GetArrayLength(env, payee_node_id) == 33); (*env)->GetByteArrayRegion(env, payee_node_id, 0, 33, payee_node_id_ref.compressed_form); @@ -76448,14 +83060,18 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1one_1hop_1for_ CHECK_INNER_FIELD_ACCESS_OR_NULL(payee_tlvs_conv); payee_tlvs_conv = ReceiveTlvs_clone(&payee_tlvs_conv); void* entropy_source_ptr = untag_ptr(entropy_source); - if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } - LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ), "LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ"); - *ret_conv = BlindedPath_one_hop_for_payment(payee_node_id_ref, payee_tlvs_conv, entropy_source_conv); + *ret_conv = BlindedPath_one_hop_for_payment(payee_node_id_ref, payee_tlvs_conv, min_final_cltv_expiry_delta, entropy_source_conv); return tag_ptr(ret_conv, true); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new_1for_1payment(JNIEnv *env, jclass clz, int64_tArray intermediate_nodes, int8_tArray payee_node_id, int64_t payee_tlvs, int64_t htlc_maximum_msat, int64_t entropy_source) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new_1for_1payment(JNIEnv *env, jclass clz, int64_tArray intermediate_nodes, int8_tArray payee_node_id, int64_t payee_tlvs, int64_t htlc_maximum_msat, int16_t min_final_cltv_expiry_delta, int64_t entropy_source) { LDKCVec_ForwardNodeZ intermediate_nodes_constr; intermediate_nodes_constr.datalen = (*env)->GetArrayLength(env, intermediate_nodes); if (intermediate_nodes_constr.datalen > 0) @@ -76482,13 +83098,35 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new_1for_1paym CHECK_INNER_FIELD_ACCESS_OR_NULL(payee_tlvs_conv); payee_tlvs_conv = ReceiveTlvs_clone(&payee_tlvs_conv); void* entropy_source_ptr = untag_ptr(entropy_source); - if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } - LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ), "LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ"); - *ret_conv = BlindedPath_new_for_payment(intermediate_nodes_constr, payee_node_id_ref, payee_tlvs_conv, htlc_maximum_msat, entropy_source_conv); + *ret_conv = BlindedPath_new_for_payment(intermediate_nodes_constr, payee_node_id_ref, payee_tlvs_conv, htlc_maximum_msat, min_final_cltv_expiry_delta, entropy_source_conv); return tag_ptr(ret_conv, true); } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1public_1introduction_1node_1id(JNIEnv *env, jclass clz, int64_t this_arg, int64_t network_graph) { + LDKBlindedPath this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKReadOnlyNetworkGraph network_graph_conv; + network_graph_conv.inner = untag_ptr(network_graph); + network_graph_conv.is_owned = ptr_is_owned(network_graph); + CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv); + network_graph_conv.is_owned = false; + LDKNodeId ret_var = BlindedPath_public_introduction_node_id(&this_arg_conv, &network_graph_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BlindedPath_1write(JNIEnv *env, jclass clz, int64_t obj) { LDKBlindedPath obj_conv; obj_conv.inner = untag_ptr(obj); @@ -76877,7 +83515,32 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1set_1payment_1con ReceiveTlvs_set_payment_constraints(&this_ptr_conv, val_conv); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1new(JNIEnv *env, jclass clz, int8_tArray payment_secret_arg, int64_t payment_constraints_arg) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1get_1payment_1context(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKReceiveTlvs this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = ReceiveTlvs_get_payment_context(&this_ptr_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1set_1payment_1context(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKReceiveTlvs this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKPaymentContext val_conv = *(LDKPaymentContext*)(val_ptr); + val_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(val)); + ReceiveTlvs_set_payment_context(&this_ptr_conv, val_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1new(JNIEnv *env, jclass clz, int8_tArray payment_secret_arg, int64_t payment_constraints_arg, int64_t payment_context_arg) { LDKThirtyTwoBytes payment_secret_arg_ref; CHECK((*env)->GetArrayLength(env, payment_secret_arg) == 32); (*env)->GetByteArrayRegion(env, payment_secret_arg, 0, 32, payment_secret_arg_ref.data); @@ -76886,7 +83549,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1new(JNIEnv *en payment_constraints_arg_conv.is_owned = ptr_is_owned(payment_constraints_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_constraints_arg_conv); payment_constraints_arg_conv = PaymentConstraints_clone(&payment_constraints_arg_conv); - LDKReceiveTlvs ret_var = ReceiveTlvs_new(payment_secret_arg_ref, payment_constraints_arg_conv); + void* payment_context_arg_ptr = untag_ptr(payment_context_arg); + CHECK_ACCESS(payment_context_arg_ptr); + LDKPaymentContext payment_context_arg_conv = *(LDKPaymentContext*)(payment_context_arg_ptr); + payment_context_arg_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(payment_context_arg)); + LDKReceiveTlvs ret_var = ReceiveTlvs_new(payment_secret_arg_ref, payment_constraints_arg_conv, payment_context_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -77110,6 +83777,317 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentConstraints_1clone(J return ret_ref; } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PaymentContext_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKPaymentContext this_ptr_conv = *(LDKPaymentContext*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + PaymentContext_free(this_ptr_conv); +} + +static inline uint64_t PaymentContext_clone_ptr(LDKPaymentContext *NONNULL_PTR arg) { + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = PaymentContext_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKPaymentContext* arg_conv = (LDKPaymentContext*)untag_ptr(arg); + int64_t ret_conv = PaymentContext_clone_ptr(arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKPaymentContext* orig_conv = (LDKPaymentContext*)untag_ptr(orig); + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = PaymentContext_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1unknown(JNIEnv *env, jclass clz, int64_t a) { + LDKUnknownPaymentContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = UnknownPaymentContext_clone(&a_conv); + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = PaymentContext_unknown(a_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1bolt12_1offer(JNIEnv *env, jclass clz, int64_t a) { + LDKBolt12OfferContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = Bolt12OfferContext_clone(&a_conv); + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = PaymentContext_bolt12_offer(a_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1bolt12_1refund(JNIEnv *env, jclass clz, int64_t a) { + LDKBolt12RefundContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = Bolt12RefundContext_clone(&a_conv); + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = PaymentContext_bolt12_refund(a_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_PaymentContext_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKPaymentContext* a_conv = (LDKPaymentContext*)untag_ptr(a); + LDKPaymentContext* b_conv = (LDKPaymentContext*)untag_ptr(b); + jboolean ret_conv = PaymentContext_eq(a_conv, b_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKUnknownPaymentContext this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + UnknownPaymentContext_free(this_obj_conv); +} + +static inline uint64_t UnknownPaymentContext_clone_ptr(LDKUnknownPaymentContext *NONNULL_PTR arg) { + LDKUnknownPaymentContext ret_var = UnknownPaymentContext_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKUnknownPaymentContext arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = UnknownPaymentContext_clone_ptr(&arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKUnknownPaymentContext orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKUnknownPaymentContext ret_var = UnknownPaymentContext_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKUnknownPaymentContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKUnknownPaymentContext b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = UnknownPaymentContext_eq(&a_conv, &b_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKBolt12OfferContext this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + Bolt12OfferContext_free(this_obj_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1get_1offer_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKBolt12OfferContext this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKOfferId ret_var = Bolt12OfferContext_get_offer_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1set_1offer_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKBolt12OfferContext this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKOfferId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = OfferId_clone(&val_conv); + Bolt12OfferContext_set_offer_id(&this_ptr_conv, val_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1get_1invoice_1request(JNIEnv *env, jclass clz, int64_t this_ptr) { + LDKBolt12OfferContext this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKInvoiceRequestFields ret_var = Bolt12OfferContext_get_invoice_request(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1set_1invoice_1request(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { + LDKBolt12OfferContext this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKInvoiceRequestFields val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = InvoiceRequestFields_clone(&val_conv); + Bolt12OfferContext_set_invoice_request(&this_ptr_conv, val_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1new(JNIEnv *env, jclass clz, int64_t offer_id_arg, int64_t invoice_request_arg) { + LDKOfferId offer_id_arg_conv; + offer_id_arg_conv.inner = untag_ptr(offer_id_arg); + offer_id_arg_conv.is_owned = ptr_is_owned(offer_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(offer_id_arg_conv); + offer_id_arg_conv = OfferId_clone(&offer_id_arg_conv); + LDKInvoiceRequestFields invoice_request_arg_conv; + invoice_request_arg_conv.inner = untag_ptr(invoice_request_arg); + invoice_request_arg_conv.is_owned = ptr_is_owned(invoice_request_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_request_arg_conv); + invoice_request_arg_conv = InvoiceRequestFields_clone(&invoice_request_arg_conv); + LDKBolt12OfferContext ret_var = Bolt12OfferContext_new(offer_id_arg_conv, invoice_request_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t Bolt12OfferContext_clone_ptr(LDKBolt12OfferContext *NONNULL_PTR arg) { + LDKBolt12OfferContext ret_var = Bolt12OfferContext_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKBolt12OfferContext arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = Bolt12OfferContext_clone_ptr(&arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKBolt12OfferContext orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKBolt12OfferContext ret_var = Bolt12OfferContext_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKBolt12OfferContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKBolt12OfferContext b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = Bolt12OfferContext_eq(&a_conv, &b_conv); + return ret_conv; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1free(JNIEnv *env, jclass clz, int64_t this_obj) { + LDKBolt12RefundContext this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + Bolt12RefundContext_free(this_obj_conv); +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1new(JNIEnv *env, jclass clz) { + LDKBolt12RefundContext ret_var = Bolt12RefundContext_new(); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t Bolt12RefundContext_clone_ptr(LDKBolt12RefundContext *NONNULL_PTR arg) { + LDKBolt12RefundContext ret_var = Bolt12RefundContext_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) { + LDKBolt12RefundContext arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = Bolt12RefundContext_clone_ptr(&arg_conv); + return ret_conv; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1clone(JNIEnv *env, jclass clz, int64_t orig) { + LDKBolt12RefundContext orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKBolt12RefundContext ret_var = Bolt12RefundContext_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { + LDKBolt12RefundContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKBolt12RefundContext b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = Bolt12RefundContext_eq(&a_conv, &b_conv); + return ret_conv; +} + JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ForwardTlvs_1write(JNIEnv *env, jclass clz, int64_t obj) { LDKForwardTlvs obj_conv; obj_conv.inner = untag_ptr(obj); @@ -77182,6 +84160,94 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentConstraints_1read(JN return tag_ptr(ret_conv, true); } +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_PaymentContext_1write(JNIEnv *env, jclass clz, int64_t obj) { + LDKPaymentContext* obj_conv = (LDKPaymentContext*)untag_ptr(obj); + LDKCVec_u8Z ret_var = PaymentContext_write(obj_conv); + int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen); + (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1read(JNIEnv *env, jclass clz, int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = (*env)->GetArrayLength(env, ser); + ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL); + LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ"); + *ret_conv = PaymentContext_read(ser_ref); + (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1write(JNIEnv *env, jclass clz, int64_t obj) { + LDKUnknownPaymentContext obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = UnknownPaymentContext_write(&obj_conv); + int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen); + (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1read(JNIEnv *env, jclass clz, int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = (*env)->GetArrayLength(env, ser); + ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL); + LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ"); + *ret_conv = UnknownPaymentContext_read(ser_ref); + (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1write(JNIEnv *env, jclass clz, int64_t obj) { + LDKBolt12OfferContext obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = Bolt12OfferContext_write(&obj_conv); + int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen); + (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1read(JNIEnv *env, jclass clz, int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = (*env)->GetArrayLength(env, ser); + ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL); + LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ"); + *ret_conv = Bolt12OfferContext_read(ser_ref); + (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0); + return tag_ptr(ret_conv, true); +} + +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1write(JNIEnv *env, jclass clz, int64_t obj) { + LDKBolt12RefundContext obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = Bolt12RefundContext_write(&obj_conv); + int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen); + (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1read(JNIEnv *env, jclass clz, int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = (*env)->GetArrayLength(env, ser); + ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL); + LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ"); + *ret_conv = Bolt12RefundContext_read(ser_ref); + (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0); + return tag_ptr(ret_conv, true); +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1free(JNIEnv *env, jclass clz, int64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -77211,7 +84277,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1clone(JNIEn return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1invoice_1payment(JNIEnv *env, jclass clz, int64_t payment_preimage, int8_tArray payment_secret) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1bolt11_1invoice_1payment(JNIEnv *env, jclass clz, int64_t payment_preimage, int8_tArray payment_secret) { + void* payment_preimage_ptr = untag_ptr(payment_preimage); + CHECK_ACCESS(payment_preimage_ptr); + LDKCOption_ThirtyTwoBytesZ payment_preimage_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_preimage_ptr); + payment_preimage_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(payment_preimage)); + LDKThirtyTwoBytes payment_secret_ref; + CHECK((*env)->GetArrayLength(env, payment_secret) == 32); + (*env)->GetByteArrayRegion(env, payment_secret, 0, 32, payment_secret_ref.data); + LDKPaymentPurpose *ret_copy = MALLOC(sizeof(LDKPaymentPurpose), "LDKPaymentPurpose"); + *ret_copy = PaymentPurpose_bolt11_invoice_payment(payment_preimage_conv, payment_secret_ref); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1bolt12_1offer_1payment(JNIEnv *env, jclass clz, int64_t payment_preimage, int8_tArray payment_secret, int64_t payment_context) { void* payment_preimage_ptr = untag_ptr(payment_preimage); CHECK_ACCESS(payment_preimage_ptr); LDKCOption_ThirtyTwoBytesZ payment_preimage_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_preimage_ptr); @@ -77219,8 +84299,32 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1invoice_1pa LDKThirtyTwoBytes payment_secret_ref; CHECK((*env)->GetArrayLength(env, payment_secret) == 32); (*env)->GetByteArrayRegion(env, payment_secret, 0, 32, payment_secret_ref.data); + LDKBolt12OfferContext payment_context_conv; + payment_context_conv.inner = untag_ptr(payment_context); + payment_context_conv.is_owned = ptr_is_owned(payment_context); + CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_conv); + payment_context_conv = Bolt12OfferContext_clone(&payment_context_conv); LDKPaymentPurpose *ret_copy = MALLOC(sizeof(LDKPaymentPurpose), "LDKPaymentPurpose"); - *ret_copy = PaymentPurpose_invoice_payment(payment_preimage_conv, payment_secret_ref); + *ret_copy = PaymentPurpose_bolt12_offer_payment(payment_preimage_conv, payment_secret_ref, payment_context_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1bolt12_1refund_1payment(JNIEnv *env, jclass clz, int64_t payment_preimage, int8_tArray payment_secret, int64_t payment_context) { + void* payment_preimage_ptr = untag_ptr(payment_preimage); + CHECK_ACCESS(payment_preimage_ptr); + LDKCOption_ThirtyTwoBytesZ payment_preimage_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_preimage_ptr); + payment_preimage_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(payment_preimage)); + LDKThirtyTwoBytes payment_secret_ref; + CHECK((*env)->GetArrayLength(env, payment_secret) == 32); + (*env)->GetByteArrayRegion(env, payment_secret, 0, 32, payment_secret_ref.data); + LDKBolt12RefundContext payment_context_conv; + payment_context_conv.inner = untag_ptr(payment_context); + payment_context_conv.is_owned = ptr_is_owned(payment_context); + CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_conv); + payment_context_conv = Bolt12RefundContext_clone(&payment_context_conv); + LDKPaymentPurpose *ret_copy = MALLOC(sizeof(LDKPaymentPurpose), "LDKPaymentPurpose"); + *ret_copy = PaymentPurpose_bolt12_refund_payment(payment_preimage_conv, payment_secret_ref, payment_context_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -77277,27 +84381,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1free(JNIEnv *env, ClaimedHTLC_free(this_obj_conv); } -JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { LDKClaimedHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = (*env)->NewByteArray(env, 32); - (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ClaimedHTLC_get_channel_id(&this_ptr_conv)); - return ret_arr; + LDKChannelId ret_var = ClaimedHTLC_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) { LDKClaimedHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK((*env)->GetArrayLength(env, val) == 32); - (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data); - ClaimedHTLC_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ClaimedHTLC_set_channel_id(&this_ptr_conv, val_conv); } JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1get_1user_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) { @@ -77380,14 +84488,16 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1set_1counterparty ClaimedHTLC_set_counterparty_skimmed_fee_msat(&this_ptr_conv, val); } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray user_channel_id_arg, int32_t cltv_expiry_arg, int64_t value_msat_arg, int64_t counterparty_skimmed_fee_msat_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32); - (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray user_channel_id_arg, int32_t cltv_expiry_arg, int64_t value_msat_arg, int64_t counterparty_skimmed_fee_msat_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKU128 user_channel_id_arg_ref; CHECK((*env)->GetArrayLength(env, user_channel_id_arg) == 16); (*env)->GetByteArrayRegion(env, user_channel_id_arg, 0, 16, user_channel_id_arg_ref.le_bytes); - LDKClaimedHTLC ret_var = ClaimedHTLC_new(channel_id_arg_ref, user_channel_id_arg_ref, cltv_expiry_arg, value_msat_arg, counterparty_skimmed_fee_msat_arg); + LDKClaimedHTLC ret_var = ClaimedHTLC_new(channel_id_arg_conv, user_channel_id_arg_ref, cltv_expiry_arg, value_msat_arg, counterparty_skimmed_fee_msat_arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -77587,9 +84697,23 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1holder_1forc return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1cooperative_1closure(JNIEnv *env, jclass clz) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1legacy_1cooperative_1closure(JNIEnv *env, jclass clz) { + LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason"); + *ret_copy = ClosureReason_legacy_cooperative_closure(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1counterparty_1initiated_1cooperative_1closure(JNIEnv *env, jclass clz) { LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason"); - *ret_copy = ClosureReason_cooperative_closure(); + *ret_copy = ClosureReason_counterparty_initiated_cooperative_closure(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1locally_1initiated_1cooperative_1closure(JNIEnv *env, jclass clz) { + LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason"); + *ret_copy = ClosureReason_locally_initiated_cooperative_closure(); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -77644,6 +84768,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1funding_1bat return ret_ref; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1htlcs_1timed_1out(JNIEnv *env, jclass clz) { + LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason"); + *ret_copy = ClosureReason_htlcs_timed_out(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ClosureReason_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) { LDKClosureReason* a_conv = (LDKClosureReason*)untag_ptr(a); LDKClosureReason* b_conv = (LDKClosureReason*)untag_ptr(b); @@ -77699,15 +84830,17 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1clone(JNIE return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1next_1hop_1channel(JNIEnv *env, jclass clz, int8_tArray node_id, int8_tArray channel_id) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1next_1hop_1channel(JNIEnv *env, jclass clz, int8_tArray node_id, int64_t channel_id) { LDKPublicKey node_id_ref; CHECK((*env)->GetArrayLength(env, node_id) == 33); (*env)->GetByteArrayRegion(env, node_id, 0, 33, node_id_ref.compressed_form); - LDKThirtyTwoBytes channel_id_ref; - CHECK((*env)->GetArrayLength(env, channel_id) == 32); - (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_ref.data); + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKHTLCDestination *ret_copy = MALLOC(sizeof(LDKHTLCDestination), "LDKHTLCDestination"); - *ret_copy = HTLCDestination_next_hop_channel(node_id_ref, channel_id_ref); + *ret_copy = HTLCDestination_next_hop_channel(node_id_ref, channel_id_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -77726,6 +84859,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1invalid_1f return ret_ref; } +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1invalid_1onion(JNIEnv *env, jclass clz) { + LDKHTLCDestination *ret_copy = MALLOC(sizeof(LDKHTLCDestination), "LDKHTLCDestination"); + *ret_copy = HTLCDestination_invalid_onion(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1failed_1payment(JNIEnv *env, jclass clz, int8_tArray payment_hash) { LDKThirtyTwoBytes payment_hash_ref; CHECK((*env)->GetArrayLength(env, payment_hash) == 32); @@ -77853,10 +84993,12 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1clone(JNIEnv *env, j return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1funding_1generation_1ready(JNIEnv *env, jclass clz, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int64_t channel_value_satoshis, int8_tArray output_script, int8_tArray user_channel_id) { - LDKThirtyTwoBytes temporary_channel_id_ref; - CHECK((*env)->GetArrayLength(env, temporary_channel_id) == 32); - (*env)->GetByteArrayRegion(env, temporary_channel_id, 0, 32, temporary_channel_id_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1funding_1generation_1ready(JNIEnv *env, jclass clz, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int64_t channel_value_satoshis, int8_tArray output_script, int8_tArray user_channel_id) { + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv = ChannelId_clone(&temporary_channel_id_conv); LDKPublicKey counterparty_node_id_ref; CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33); (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form); @@ -77868,7 +85010,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1funding_1generation_ CHECK((*env)->GetArrayLength(env, user_channel_id) == 16); (*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_funding_generation_ready(temporary_channel_id_ref, counterparty_node_id_ref, channel_value_satoshis, output_script_ref, user_channel_id_ref); + *ret_copy = Event_funding_generation_ready(temporary_channel_id_conv, counterparty_node_id_ref, channel_value_satoshis, output_script_ref, user_channel_id_ref); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -77889,10 +85031,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1payment_1claimable(J CHECK_ACCESS(purpose_ptr); LDKPaymentPurpose purpose_conv = *(LDKPaymentPurpose*)(purpose_ptr); purpose_conv = PaymentPurpose_clone((LDKPaymentPurpose*)untag_ptr(purpose)); - void* via_channel_id_ptr = untag_ptr(via_channel_id); - CHECK_ACCESS(via_channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ via_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(via_channel_id_ptr); - via_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(via_channel_id)); + LDKChannelId via_channel_id_conv; + via_channel_id_conv.inner = untag_ptr(via_channel_id); + via_channel_id_conv.is_owned = ptr_is_owned(via_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(via_channel_id_conv); + via_channel_id_conv = ChannelId_clone(&via_channel_id_conv); void* via_user_channel_id_ptr = untag_ptr(via_user_channel_id); CHECK_ACCESS(via_user_channel_id_ptr); LDKCOption_U128Z via_user_channel_id_conv = *(LDKCOption_U128Z*)(via_user_channel_id_ptr); @@ -78141,50 +85284,68 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1spendable_1outputs(J outputs_constr.data[b] = outputs_conv_27_conv; } (*env)->ReleaseLongArrayElements(env, outputs, outputs_vals, 0); - void* channel_id_ptr = untag_ptr(channel_id); - CHECK_ACCESS(channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(channel_id_ptr); - channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(channel_id)); + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); *ret_copy = Event_spendable_outputs(outputs_constr, channel_id_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1payment_1forwarded(JNIEnv *env, jclass clz, int64_t prev_channel_id, int64_t next_channel_id, int64_t fee_earned_msat, jboolean claim_from_onchain_tx, int64_t outbound_amount_forwarded_msat) { - void* prev_channel_id_ptr = untag_ptr(prev_channel_id); - CHECK_ACCESS(prev_channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ prev_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(prev_channel_id_ptr); - prev_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(prev_channel_id)); - void* next_channel_id_ptr = untag_ptr(next_channel_id); - CHECK_ACCESS(next_channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ next_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(next_channel_id_ptr); - next_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(next_channel_id)); - void* fee_earned_msat_ptr = untag_ptr(fee_earned_msat); - CHECK_ACCESS(fee_earned_msat_ptr); - LDKCOption_u64Z fee_earned_msat_conv = *(LDKCOption_u64Z*)(fee_earned_msat_ptr); - fee_earned_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(fee_earned_msat)); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1payment_1forwarded(JNIEnv *env, jclass clz, int64_t prev_channel_id, int64_t next_channel_id, int64_t prev_user_channel_id, int64_t next_user_channel_id, int64_t total_fee_earned_msat, int64_t skimmed_fee_msat, jboolean claim_from_onchain_tx, int64_t outbound_amount_forwarded_msat) { + LDKChannelId prev_channel_id_conv; + prev_channel_id_conv.inner = untag_ptr(prev_channel_id); + prev_channel_id_conv.is_owned = ptr_is_owned(prev_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_conv); + prev_channel_id_conv = ChannelId_clone(&prev_channel_id_conv); + LDKChannelId next_channel_id_conv; + next_channel_id_conv.inner = untag_ptr(next_channel_id); + next_channel_id_conv.is_owned = ptr_is_owned(next_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(next_channel_id_conv); + next_channel_id_conv = ChannelId_clone(&next_channel_id_conv); + void* prev_user_channel_id_ptr = untag_ptr(prev_user_channel_id); + CHECK_ACCESS(prev_user_channel_id_ptr); + LDKCOption_U128Z prev_user_channel_id_conv = *(LDKCOption_U128Z*)(prev_user_channel_id_ptr); + prev_user_channel_id_conv = COption_U128Z_clone((LDKCOption_U128Z*)untag_ptr(prev_user_channel_id)); + void* next_user_channel_id_ptr = untag_ptr(next_user_channel_id); + CHECK_ACCESS(next_user_channel_id_ptr); + LDKCOption_U128Z next_user_channel_id_conv = *(LDKCOption_U128Z*)(next_user_channel_id_ptr); + next_user_channel_id_conv = COption_U128Z_clone((LDKCOption_U128Z*)untag_ptr(next_user_channel_id)); + void* total_fee_earned_msat_ptr = untag_ptr(total_fee_earned_msat); + CHECK_ACCESS(total_fee_earned_msat_ptr); + LDKCOption_u64Z total_fee_earned_msat_conv = *(LDKCOption_u64Z*)(total_fee_earned_msat_ptr); + total_fee_earned_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(total_fee_earned_msat)); + void* skimmed_fee_msat_ptr = untag_ptr(skimmed_fee_msat); + CHECK_ACCESS(skimmed_fee_msat_ptr); + LDKCOption_u64Z skimmed_fee_msat_conv = *(LDKCOption_u64Z*)(skimmed_fee_msat_ptr); + skimmed_fee_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(skimmed_fee_msat)); void* outbound_amount_forwarded_msat_ptr = untag_ptr(outbound_amount_forwarded_msat); CHECK_ACCESS(outbound_amount_forwarded_msat_ptr); LDKCOption_u64Z outbound_amount_forwarded_msat_conv = *(LDKCOption_u64Z*)(outbound_amount_forwarded_msat_ptr); outbound_amount_forwarded_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(outbound_amount_forwarded_msat)); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_payment_forwarded(prev_channel_id_conv, next_channel_id_conv, fee_earned_msat_conv, claim_from_onchain_tx, outbound_amount_forwarded_msat_conv); + *ret_copy = Event_payment_forwarded(prev_channel_id_conv, next_channel_id_conv, prev_user_channel_id_conv, next_user_channel_id_conv, total_fee_earned_msat_conv, skimmed_fee_msat_conv, claim_from_onchain_tx, outbound_amount_forwarded_msat_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1pending(JNIEnv *env, jclass clz, int8_tArray channel_id, int8_tArray user_channel_id, int64_t former_temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_txo) { - LDKThirtyTwoBytes channel_id_ref; - CHECK((*env)->GetArrayLength(env, channel_id) == 32); - (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1pending(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray user_channel_id, int64_t former_temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_txo, int64_t channel_type) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKU128 user_channel_id_ref; CHECK((*env)->GetArrayLength(env, user_channel_id) == 16); (*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes); - void* former_temporary_channel_id_ptr = untag_ptr(former_temporary_channel_id); - CHECK_ACCESS(former_temporary_channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ former_temporary_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(former_temporary_channel_id_ptr); - former_temporary_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(former_temporary_channel_id)); + LDKChannelId former_temporary_channel_id_conv; + former_temporary_channel_id_conv.inner = untag_ptr(former_temporary_channel_id); + former_temporary_channel_id_conv.is_owned = ptr_is_owned(former_temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(former_temporary_channel_id_conv); + former_temporary_channel_id_conv = ChannelId_clone(&former_temporary_channel_id_conv); LDKPublicKey counterparty_node_id_ref; CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33); (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form); @@ -78193,16 +85354,23 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1pending(JNI funding_txo_conv.is_owned = ptr_is_owned(funding_txo); CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_conv); funding_txo_conv = OutPoint_clone(&funding_txo_conv); + LDKChannelTypeFeatures channel_type_conv; + channel_type_conv.inner = untag_ptr(channel_type); + channel_type_conv.is_owned = ptr_is_owned(channel_type); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_conv); + channel_type_conv = ChannelTypeFeatures_clone(&channel_type_conv); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_channel_pending(channel_id_ref, user_channel_id_ref, former_temporary_channel_id_conv, counterparty_node_id_ref, funding_txo_conv); + *ret_copy = Event_channel_pending(channel_id_conv, user_channel_id_ref, former_temporary_channel_id_conv, counterparty_node_id_ref, funding_txo_conv, channel_type_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1ready(JNIEnv *env, jclass clz, int8_tArray channel_id, int8_tArray user_channel_id, int8_tArray counterparty_node_id, int64_t channel_type) { - LDKThirtyTwoBytes channel_id_ref; - CHECK((*env)->GetArrayLength(env, channel_id) == 32); - (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1ready(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray user_channel_id, int8_tArray counterparty_node_id, int64_t channel_type) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKU128 user_channel_id_ref; CHECK((*env)->GetArrayLength(env, user_channel_id) == 16); (*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes); @@ -78215,15 +85383,17 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1ready(JNIEn CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_conv); channel_type_conv = ChannelTypeFeatures_clone(&channel_type_conv); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_channel_ready(channel_id_ref, user_channel_id_ref, counterparty_node_id_ref, channel_type_conv); + *ret_copy = Event_channel_ready(channel_id_conv, user_channel_id_ref, counterparty_node_id_ref, channel_type_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1closed(JNIEnv *env, jclass clz, int8_tArray channel_id, int8_tArray user_channel_id, int64_t reason, int8_tArray counterparty_node_id, int64_t channel_capacity_sats, int64_t channel_funding_txo) { - LDKThirtyTwoBytes channel_id_ref; - CHECK((*env)->GetArrayLength(env, channel_id) == 32); - (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1closed(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray user_channel_id, int64_t reason, int8_tArray counterparty_node_id, int64_t channel_capacity_sats, int64_t channel_funding_txo) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKU128 user_channel_id_ref; CHECK((*env)->GetArrayLength(env, user_channel_id) == 16); (*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes); @@ -78244,30 +85414,34 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1closed(JNIE CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_txo_conv); channel_funding_txo_conv = OutPoint_clone(&channel_funding_txo_conv); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_channel_closed(channel_id_ref, user_channel_id_ref, reason_conv, counterparty_node_id_ref, channel_capacity_sats_conv, channel_funding_txo_conv); + *ret_copy = Event_channel_closed(channel_id_conv, user_channel_id_ref, reason_conv, counterparty_node_id_ref, channel_capacity_sats_conv, channel_funding_txo_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1discard_1funding(JNIEnv *env, jclass clz, int8_tArray channel_id, int8_tArray transaction) { - LDKThirtyTwoBytes channel_id_ref; - CHECK((*env)->GetArrayLength(env, channel_id) == 32); - (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1discard_1funding(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray transaction) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKTransaction transaction_ref; transaction_ref.datalen = (*env)->GetArrayLength(env, transaction); transaction_ref.data = MALLOC(transaction_ref.datalen, "LDKTransaction Bytes"); (*env)->GetByteArrayRegion(env, transaction, 0, transaction_ref.datalen, transaction_ref.data); transaction_ref.data_is_owned = true; LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_discard_funding(channel_id_ref, transaction_ref); + *ret_copy = Event_discard_funding(channel_id_conv, transaction_ref); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1open_1channel_1request(JNIEnv *env, jclass clz, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_satoshis, int64_t push_msat, int64_t channel_type) { - LDKThirtyTwoBytes temporary_channel_id_ref; - CHECK((*env)->GetArrayLength(env, temporary_channel_id) == 32); - (*env)->GetByteArrayRegion(env, temporary_channel_id, 0, 32, temporary_channel_id_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1open_1channel_1request(JNIEnv *env, jclass clz, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_satoshis, int64_t push_msat, int64_t channel_type) { + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv = ChannelId_clone(&temporary_channel_id_conv); LDKPublicKey counterparty_node_id_ref; CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33); (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form); @@ -78277,21 +85451,23 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1open_1channel_1reque CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_conv); channel_type_conv = ChannelTypeFeatures_clone(&channel_type_conv); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_open_channel_request(temporary_channel_id_ref, counterparty_node_id_ref, funding_satoshis, push_msat, channel_type_conv); + *ret_copy = Event_open_channel_request(temporary_channel_id_conv, counterparty_node_id_ref, funding_satoshis, push_msat, channel_type_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1htlchandling_1failed(JNIEnv *env, jclass clz, int8_tArray prev_channel_id, int64_t failed_next_destination) { - LDKThirtyTwoBytes prev_channel_id_ref; - CHECK((*env)->GetArrayLength(env, prev_channel_id) == 32); - (*env)->GetByteArrayRegion(env, prev_channel_id, 0, 32, prev_channel_id_ref.data); +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1htlchandling_1failed(JNIEnv *env, jclass clz, int64_t prev_channel_id, int64_t failed_next_destination) { + LDKChannelId prev_channel_id_conv; + prev_channel_id_conv.inner = untag_ptr(prev_channel_id); + prev_channel_id_conv.is_owned = ptr_is_owned(prev_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_conv); + prev_channel_id_conv = ChannelId_clone(&prev_channel_id_conv); void* failed_next_destination_ptr = untag_ptr(failed_next_destination); CHECK_ACCESS(failed_next_destination_ptr); LDKHTLCDestination failed_next_destination_conv = *(LDKHTLCDestination*)(failed_next_destination_ptr); failed_next_destination_conv = HTLCDestination_clone((LDKHTLCDestination*)untag_ptr(failed_next_destination)); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_htlchandling_failed(prev_channel_id_ref, failed_next_destination_conv); + *ret_copy = Event_htlchandling_failed(prev_channel_id_conv, failed_next_destination_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -79148,7 +86324,15 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1clone return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1channel_1close(JNIEnv *env, jclass clz, int8_tArray claim_id, int32_t package_target_feerate_sat_per_1000_weight, int8_tArray commitment_tx, int64_t commitment_tx_fee_satoshis, int64_t anchor_descriptor, int64_tArray pending_htlcs) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1channel_1close(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray counterparty_node_id, int8_tArray claim_id, int32_t package_target_feerate_sat_per_1000_weight, int8_tArray commitment_tx, int64_t commitment_tx_fee_satoshis, int64_t anchor_descriptor, int64_tArray pending_htlcs) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); + LDKPublicKey counterparty_node_id_ref; + CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33); + (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form); LDKThirtyTwoBytes claim_id_ref; CHECK((*env)->GetArrayLength(env, claim_id) == 32); (*env)->GetByteArrayRegion(env, claim_id, 0, 32, claim_id_ref.data); @@ -79180,12 +86364,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1chann } (*env)->ReleaseLongArrayElements(env, pending_htlcs, pending_htlcs_vals, 0); LDKBumpTransactionEvent *ret_copy = MALLOC(sizeof(LDKBumpTransactionEvent), "LDKBumpTransactionEvent"); - *ret_copy = BumpTransactionEvent_channel_close(claim_id_ref, package_target_feerate_sat_per_1000_weight, commitment_tx_ref, commitment_tx_fee_satoshis, anchor_descriptor_conv, pending_htlcs_constr); + *ret_copy = BumpTransactionEvent_channel_close(channel_id_conv, counterparty_node_id_ref, claim_id_ref, package_target_feerate_sat_per_1000_weight, commitment_tx_ref, commitment_tx_fee_satoshis, anchor_descriptor_conv, pending_htlcs_constr); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1htlcresolution(JNIEnv *env, jclass clz, int8_tArray claim_id, int32_t target_feerate_sat_per_1000_weight, int64_tArray htlc_descriptors, int32_t tx_lock_time) { +JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1htlcresolution(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray counterparty_node_id, int8_tArray claim_id, int32_t target_feerate_sat_per_1000_weight, int64_tArray htlc_descriptors, int32_t tx_lock_time) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); + LDKPublicKey counterparty_node_id_ref; + CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33); + (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form); LDKThirtyTwoBytes claim_id_ref; CHECK((*env)->GetArrayLength(env, claim_id) == 32); (*env)->GetByteArrayRegion(env, claim_id, 0, 32, claim_id_ref.data); @@ -79207,7 +86399,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1htlcr } (*env)->ReleaseLongArrayElements(env, htlc_descriptors, htlc_descriptors_vals, 0); LDKBumpTransactionEvent *ret_copy = MALLOC(sizeof(LDKBumpTransactionEvent), "LDKBumpTransactionEvent"); - *ret_copy = BumpTransactionEvent_htlcresolution(claim_id_ref, target_feerate_sat_per_1000_weight, htlc_descriptors_constr, tx_lock_time); + *ret_copy = BumpTransactionEvent_htlcresolution(channel_id_conv, counterparty_node_id_ref, claim_id_ref, target_feerate_sat_per_1000_weight, htlc_descriptors_constr, tx_lock_time); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -81653,6 +88845,17 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Bolt11Invoice_1recover_ return ret_arr; } +JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Bolt11Invoice_1get_1payee_1pub_1key(JNIEnv *env, jclass clz, int64_t this_arg) { + LDKBolt11Invoice this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + int8_tArray ret_arr = (*env)->NewByteArray(env, 33); + (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, Bolt11Invoice_get_payee_pub_key(&this_arg_conv).compressed_form); + return ret_arr; +} + JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt11Invoice_1expires_1at(JNIEnv *env, jclass clz, int64_t this_arg) { LDKBolt11Invoice this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); diff --git a/src/main/jni/org_ldk_enums_Direction.h b/src/main/jni/org_ldk_enums_Direction.h new file mode 100644 index 00000000..6662f656 --- /dev/null +++ b/src/main/jni/org_ldk_enums_Direction.h @@ -0,0 +1,21 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_ldk_enums_Direction */ + +#ifndef _Included_org_ldk_enums_Direction +#define _Included_org_ldk_enums_Direction +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_ldk_enums_Direction + * Method: init + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_ldk_enums_Direction_init + (JNIEnv *, jclass); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/main/jni/org_ldk_enums_ShortChannelIdError.h b/src/main/jni/org_ldk_enums_ShortChannelIdError.h new file mode 100644 index 00000000..0a63cdff --- /dev/null +++ b/src/main/jni/org_ldk_enums_ShortChannelIdError.h @@ -0,0 +1,21 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_ldk_enums_ShortChannelIdError */ + +#ifndef _Included_org_ldk_enums_ShortChannelIdError +#define _Included_org_ldk_enums_ShortChannelIdError +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_ldk_enums_ShortChannelIdError + * Method: init + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_ldk_enums_ShortChannelIdError_init + (JNIEnv *, jclass); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/main/jni/org_ldk_impl_bindings.h b/src/main/jni/org_ldk_impl_bindings.h index 15da1452..6c237b91 100644 --- a/src/main/jni/org_ldk_impl_bindings.h +++ b/src/main/jni/org_ldk_impl_bindings.h @@ -71,6 +71,38 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BigEndianScalar_1free JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKBech32Error_1ref_1from_1ptr (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err + * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError; + */ +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1err + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_RefundBolt12SemanticErrorZ_get_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1get_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_RefundBolt12SemanticErrorZ_get_err + * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError; + */ +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1get_1err + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: LDKCOption_u64Z_ref_from_ptr @@ -215,6 +247,54 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RecipientOnionFields JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RecipientOnionFieldsNoneZ_1get_1err (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1get_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err + * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError; + */ +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1get_1err + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1get_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err + * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError; + */ +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1get_1err + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_SchnorrSignatureNoneZ_get_ok + * Signature: (J)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_SchnorrSignatureNoneZ_get_err + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1err + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: LDKCOption_CVec_ThirtyTwoBytesZZ_ref_from_ptr @@ -223,6 +303,38 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RecipientOnionFieldsN JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1CVec_1ThirtyTwoBytesZZ_1ref_1from_1ptr (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: LDKAmount_ref_from_ptr + * Signature: (J)Lorg/ldk/impl/bindings/LDKAmount; + */ +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKAmount_1ref_1from_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: LDKCOption_AmountZ_ref_from_ptr + * Signature: (J)Lorg/ldk/impl/bindings/LDKCOption_AmountZ; + */ +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1AmountZ_1ref_1from_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: LDKQuantity_ref_from_ptr + * Signature: (J)Lorg/ldk/impl/bindings/LDKQuantity; + */ +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKQuantity_1ref_1from_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: LDKCOption_QuantityZ_ref_from_ptr + * Signature: (J)Lorg/ldk/impl/bindings/LDKCOption_QuantityZ; + */ +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1QuantityZ_1ref_1from_1ptr + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: CResult_ThirtyTwoBytesNoneZ_get_ok @@ -441,34 +553,34 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RecoverableSignatureN /* * Class: org_ldk_impl_bindings - * Method: CResult_SchnorrSignatureNoneZ_get_ok + * Method: CResult_ECDSASignatureNoneZ_get_ok * Signature: (J)[B */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1ok +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1ok (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_SchnorrSignatureNoneZ_get_err + * Method: CResult_ECDSASignatureNoneZ_get_err * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1err +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1err (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_ECDSASignatureNoneZ_get_ok + * Method: CResult_TransactionNoneZ_get_ok * Signature: (J)[B */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1ok +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1ok (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_ECDSASignatureNoneZ_get_err + * Method: CResult_TransactionNoneZ_get_err * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1err +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1err (JNIEnv *, jclass, jlong); /* @@ -783,22 +895,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InMemorySignerDecode JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InMemorySignerDecodeErrorZ_1get_1err (JNIEnv *, jclass, jlong); -/* - * Class: org_ldk_impl_bindings - * Method: CResult_TransactionNoneZ_get_ok - * Signature: (J)[B - */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1ok - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: CResult_TransactionNoneZ_get_err - * Signature: (J)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1err - (JNIEnv *, jclass, jlong); - /* * Class: org_ldk_impl_bindings * Method: LDKCandidateRouteHop_ref_from_ptr @@ -1263,6 +1359,22 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScorerD JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScorerDecodeErrorZ_1get_1err (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: CResult_BestBlockDecodeErrorZ_get_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1get_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_BestBlockDecodeErrorZ_get_err + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1get_1err + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: C2Tuple_usizeTransactionZ_get_a @@ -1319,6 +1431,14 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpda JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpdateStatusNoneZ_1get_1err (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: LDKClosureReason_ref_from_ptr + * Signature: (J)Lorg/ldk/impl/bindings/LDKClosureReason; + */ +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKClosureReason_1ref_1from_1ptr + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: LDKMonitorEvent_ref_from_ptr @@ -1329,26 +1449,34 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKMonitorEvent_1ref_1from_ /* * Class: org_ldk_impl_bindings - * Method: C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a + * Method: C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1a + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1get_1a +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1b (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b + * Method: C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c * Signature: (J)[J */ -JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1get_1b +JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1c (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c + * Method: C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d * Signature: (J)[B */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1get_1c +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1d (JNIEnv *, jclass, jlong); /* @@ -1465,34 +1593,98 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTypeFeaturesD /* * Class: org_ldk_impl_bindings - * Method: CResult_OfferBolt12ParseErrorZ_get_ok + * Method: CResult_OfferIdDecodeErrorZ_get_ok * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12ParseErrorZ_1get_1ok +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1get_1ok (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_OfferBolt12ParseErrorZ_get_err + * Method: CResult_OfferIdDecodeErrorZ_get_err * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12ParseErrorZ_1get_1err +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1get_1err (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_PublicKeySecp256k1ErrorZ_get_ok - * Signature: (J)[B + * Method: CResult_NoneBolt12SemanticErrorZ_get_ok + * Signature: (J)V */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1ok +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1ok (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_PublicKeySecp256k1ErrorZ_get_err - * Signature: (J)Lorg/ldk/enums/Secp256k1Error; + * Method: CResult_NoneBolt12SemanticErrorZ_get_err + * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError; */ -JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1err +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1err + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_OfferBolt12SemanticErrorZ_get_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1get_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_OfferBolt12SemanticErrorZ_get_err + * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError; + */ +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1get_1err + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1get_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err + * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError; + */ +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1get_1err + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1get_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err + * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError; + */ +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1get_1err + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_OfferBolt12ParseErrorZ_get_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12ParseErrorZ_1get_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_OfferBolt12ParseErrorZ_get_err + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12ParseErrorZ_1get_1err (JNIEnv *, jclass, jlong); /* @@ -1511,6 +1703,22 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1get_1err (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: CResult_PublicKeySecp256k1ErrorZ_get_ok + * Signature: (J)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_PublicKeySecp256k1ErrorZ_get_err + * Signature: (J)Lorg/ldk/enums/Secp256k1Error; + */ +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1err + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: LDKNetworkUpdate_ref_from_ptr @@ -1799,6 +2007,22 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeEr JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1CVec_1SocketAddressZZ_1ref_1from_1ptr (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: CResult_u64ShortChannelIdErrorZ_get_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1get_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_u64ShortChannelIdErrorZ_get_err + * Signature: (J)Lorg/ldk/enums/ShortChannelIdError; + */ +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1get_1err + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: CResult_PendingHTLCInfoInboundHTLCErrZ_get_ok @@ -1855,6 +2079,22 @@ JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1UtxoZNone JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1UtxoZNoneZ_1get_1err (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: LDKPaymentContext_ref_from_ptr + * Signature: (J)Lorg/ldk/impl/bindings/LDKPaymentContext; + */ +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPaymentContext_1ref_1from_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: LDKCOption_PaymentContextZ_ref_from_ptr + * Signature: (J)Lorg/ldk/impl/bindings/LDKCOption_PaymentContextZ; + */ +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1PaymentContextZ_1ref_1from_1ptr + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: C2Tuple_u64u16Z_get_a @@ -1889,18 +2129,18 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1ChannelShutdown /* * Class: org_ldk_impl_bindings - * Method: CResult_ThirtyTwoBytesAPIErrorZ_get_ok - * Signature: (J)[B + * Method: CResult_ChannelIdAPIErrorZ_get_ok + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1ok +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1get_1ok (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_ThirtyTwoBytesAPIErrorZ_get_err + * Method: CResult_ChannelIdAPIErrorZ_get_err * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1err +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1get_1err (JNIEnv *, jclass, jlong); /* @@ -2041,42 +2281,42 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1C2Tuple_1Thirt /* * Class: org_ldk_impl_bindings - * Method: C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a - * Signature: (J)[B + * Method: C2Tuple_ChannelIdPublicKeyZ_get_a + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1get_1a +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1get_1a (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b + * Method: C2Tuple_ChannelIdPublicKeyZ_get_b * Signature: (J)[B */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1get_1b +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1get_1b (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: LDKCOption_StrZ_ref_from_ptr - * Signature: (J)Lorg/ldk/impl/bindings/LDKCOption_StrZ; + * Method: CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok + * Signature: (J)J */ -JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1StrZ_1ref_1from_1ptr +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1ok (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_NoneBolt12SemanticErrorZ_get_ok - * Signature: (J)V + * Method: CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err + * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError; */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1ok +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1err (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_NoneBolt12SemanticErrorZ_get_err - * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError; + * Method: LDKCOption_StrZ_ref_from_ptr + * Signature: (J)Lorg/ldk/impl/bindings/LDKCOption_StrZ; */ -JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1err +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1StrZ_1ref_1from_1ptr (JNIEnv *, jclass, jlong); /* @@ -2095,6 +2335,22 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBy JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1get_1err (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: CResult_ThirtyTwoBytesAPIErrorZ_get_ok + * Signature: (J)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_ThirtyTwoBytesAPIErrorZ_get_err + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1err + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: LDKOffersMessage_ref_from_ptr @@ -3015,22 +3271,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1TypeZDecode JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1SocketAddressZ_1ref_1from_1ptr (JNIEnv *, jclass, jlong); -/* - * Class: org_ldk_impl_bindings - * Method: C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a - * Signature: (J)[B - */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1get_1a - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1get_1b - (JNIEnv *, jclass, jlong); - /* * Class: org_ldk_impl_bindings * Method: CResult_CVec_u8ZPeerHandleErrorZ_get_ok @@ -3167,6 +3407,38 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBy JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesChannelMonitorZIOErrorZ_1get_1err (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1get_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err + * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError; + */ +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1get_1err + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1get_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceRequestBolt12SemanticErrorZ_get_err + * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError; + */ +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1get_1err + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: LDKCOption_SecretKeyZ_ref_from_ptr @@ -3175,6 +3447,22 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwo JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1SecretKeyZ_1ref_1from_1ptr (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err + * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError; + */ +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1err + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: CResult_VerifiedInvoiceRequestNoneZ_get_ok @@ -3191,6 +3479,46 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1VerifiedInvoiceReque JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1VerifiedInvoiceRequestNoneZ_1get_1err (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err + * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError; + */ +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1err + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1get_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceRequestFieldsDecodeErrorZ_get_err + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1get_1err + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: LDKCOption_ECDSASignatureZ_ref_from_ptr + * Signature: (J)Lorg/ldk/impl/bindings/LDKCOption_ECDSASignatureZ; + */ +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1ECDSASignatureZ_1ref_1from_1ptr + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: LDKCOption_i64Z_ref_from_ptr @@ -4399,14 +4727,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1PathFailure JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1PathFailureZDecodeErrorZ_1get_1err (JNIEnv *, jclass, jlong); -/* - * Class: org_ldk_impl_bindings - * Method: LDKClosureReason_ref_from_ptr - * Signature: (J)Lorg/ldk/impl/bindings/LDKClosureReason; - */ -JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKClosureReason_1ref_1from_1ptr - (JNIEnv *, jclass, jlong); - /* * Class: org_ldk_impl_bindings * Method: LDKCOption_ClosureReasonZ_ref_from_ptr @@ -4815,6 +5135,22 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UntrustedStringDecod JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UntrustedStringDecodeErrorZ_1get_1err (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: CResult_ChannelIdDecodeErrorZ_get_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1get_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_ChannelIdDecodeErrorZ_get_err + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1get_1err + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: C2Tuple__u832u16Z_get_a @@ -4865,42 +5201,66 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentConstraintsDe /* * Class: org_ldk_impl_bindings - * Method: C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a - * Signature: (J)[B + * Method: CResult_PaymentContextDecodeErrorZ_get_ok + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1a +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1get_1ok (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b + * Method: CResult_PaymentContextDecodeErrorZ_get_err * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1b +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1get_1err (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c + * Method: CResult_UnknownPaymentContextDecodeErrorZ_get_ok * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1c +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1get_1ok (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok + * Method: CResult_UnknownPaymentContextDecodeErrorZ_get_err * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1ok +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1get_1err (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err - * Signature: (J)V + * Method: CResult_Bolt12OfferContextDecodeErrorZ_get_ok + * Signature: (J)J */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1err +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1get_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_Bolt12OfferContextDecodeErrorZ_get_err + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1get_1err + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_Bolt12RefundContextDecodeErrorZ_get_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1get_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_Bolt12RefundContextDecodeErrorZ_get_err + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1get_1err (JNIEnv *, jclass, jlong); /* @@ -4919,6 +5279,46 @@ JNIEXPORT jstring JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1get_1err (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a + * Signature: (J)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1a + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1b + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1c + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1err + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_a @@ -4967,6 +5367,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKeyOn JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKeyOnionMessageCOption_1CVec_1SocketAddressZZZSendErrorZ_1get_1err (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: LDKNextMessageHop_ref_from_ptr + * Signature: (J)Lorg/ldk/impl/bindings/LDKNextMessageHop; + */ +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKNextMessageHop_1ref_1from_1ptr + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: LDKParsedOnionMessageContents_ref_from_ptr @@ -5105,98 +5513,42 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceErrorDecodeEr /* * Class: org_ldk_impl_bindings - * Method: CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1ok - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: CResult_DelayedPaymentBasepointDecodeErrorZ_get_err - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1err - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: CResult_DelayedPaymentKeyDecodeErrorZ_get_ok - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1ok - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: CResult_DelayedPaymentKeyDecodeErrorZ_get_err - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1err - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: CResult_HtlcBasepointDecodeErrorZ_get_ok - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1ok - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: CResult_HtlcBasepointDecodeErrorZ_get_err - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1err - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: CResult_HtlcKeyDecodeErrorZ_get_ok - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1ok - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: CResult_HtlcKeyDecodeErrorZ_get_err + * Method: CResult_TrackedSpendableOutputDecodeErrorZ_get_ok * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1err +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1get_1ok (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_RevocationBasepointDecodeErrorZ_get_ok + * Method: CResult_TrackedSpendableOutputDecodeErrorZ_get_err * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1ok +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1get_1err (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_RevocationBasepointDecodeErrorZ_get_err - * Signature: (J)J + * Method: LDKOutputSpendStatus_ref_from_ptr + * Signature: (J)Lorg/ldk/impl/bindings/LDKOutputSpendStatus; */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1err +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKOutputSpendStatus_1ref_1from_1ptr (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_RevocationKeyDecodeErrorZ_get_ok + * Method: CResult_OutputSpendStatusDecodeErrorZ_get_ok * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1ok +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1get_1ok (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_RevocationKeyDecodeErrorZ_get_err + * Method: CResult_OutputSpendStatusDecodeErrorZ_get_err * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1err +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1get_1err (JNIEnv *, jclass, jlong); /* @@ -5233,34 +5585,18 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1FilterZ_1ref_1f /* * Class: org_ldk_impl_bindings - * Method: CResult_LockedChannelMonitorNoneZ_get_ok - * Signature: (J)J + * Method: LDKChangeDestinationSource_new + * Signature: (Lorg/ldk/impl/bindings/LDKChangeDestinationSource;)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1ok - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: CResult_LockedChannelMonitorNoneZ_get_err - * Signature: (J)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1err - (JNIEnv *, jclass, jlong); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKChangeDestinationSource_1new + (JNIEnv *, jclass, jobject); /* * Class: org_ldk_impl_bindings - * Method: C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a + * Method: ChangeDestinationSource_get_change_destination_script * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1a - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b - * Signature: (J)[J - */ -JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1b +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChangeDestinationSource_1get_1change_1destination_1script (JNIEnv *, jclass, jlong); /* @@ -5303,6 +5639,214 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KVStore_1remove JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KVStore_1list (JNIEnv *, jclass, jlong, jstring, jstring); +/* + * Class: org_ldk_impl_bindings + * Method: LDKOutputSpender_new + * Signature: (Lorg/ldk/impl/bindings/LDKOutputSpender;)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKOutputSpender_1new + (JNIEnv *, jclass, jobject); + +/* + * Class: org_ldk_impl_bindings + * Method: OutputSpender_spend_spendable_outputs + * Signature: (J[J[J[BIJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSpender_1spend_1spendable_1outputs + (JNIEnv *, jclass, jlong, jlongArray, jlongArray, jbyteArray, jint, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_OutputSweeperDecodeErrorZ_get_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1get_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_OutputSweeperDecodeErrorZ_get_err + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1get_1err + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: C2Tuple_BestBlockOutputSweeperZ_get_a + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1get_1a + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: C2Tuple_BestBlockOutputSweeperZ_get_b + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1get_1b + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1get_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1get_1err + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_DelayedPaymentBasepointDecodeErrorZ_get_err + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1err + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_DelayedPaymentKeyDecodeErrorZ_get_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_DelayedPaymentKeyDecodeErrorZ_get_err + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1err + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_HtlcBasepointDecodeErrorZ_get_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_HtlcBasepointDecodeErrorZ_get_err + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1err + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_HtlcKeyDecodeErrorZ_get_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_HtlcKeyDecodeErrorZ_get_err + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1err + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_RevocationBasepointDecodeErrorZ_get_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_RevocationBasepointDecodeErrorZ_get_err + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1err + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_RevocationKeyDecodeErrorZ_get_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_RevocationKeyDecodeErrorZ_get_err + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1err + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_LockedChannelMonitorNoneZ_get_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_LockedChannelMonitorNoneZ_get_err + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1err + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: C2Tuple_OutPointChannelIdZ_get_a + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1get_1a + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: C2Tuple_OutPointChannelIdZ_get_b + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1get_1b + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1a + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b + * Signature: (J)[J + */ +JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1b + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: LDKPersister_new @@ -5361,19 +5905,11 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_Persist_1update_1persisted_ /* * Class: org_ldk_impl_bindings - * Method: LDKFutureCallback_new - * Signature: (Lorg/ldk/impl/bindings/LDKFutureCallback;)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKFutureCallback_1new - (JNIEnv *, jclass, jobject); - -/* - * Class: org_ldk_impl_bindings - * Method: FutureCallback_call - * Signature: (J)V + * Method: Persist_archive_persisted_channel + * Signature: (JJ)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1call - (JNIEnv *, jclass, jlong); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Persist_1archive_1persisted_1channel + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -5447,6 +5983,30 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Confirm_1best_1block_1updated JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_Confirm_1get_1relevant_1txids (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: LDKSpendingDelay_ref_from_ptr + * Signature: (J)Lorg/ldk/impl/bindings/LDKSpendingDelay; + */ +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSpendingDelay_1ref_1from_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: LDKFutureCallback_new + * Signature: (Lorg/ldk/impl/bindings/LDKFutureCallback;)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKFutureCallback_1new + (JNIEnv *, jclass, jobject); + +/* + * Class: org_ldk_impl_bindings + * Method: FutureCallback_call + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1call + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: LDKEventHandler_new @@ -5599,30 +6159,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1stfu (JNIEnv *, jclass, jlong, jbyteArray, jlong); -/* - * Class: org_ldk_impl_bindings - * Method: ChannelMessageHandler_handle_splice - * Signature: (J[BJ)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1splice - (JNIEnv *, jclass, jlong, jbyteArray, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: ChannelMessageHandler_handle_splice_ack - * Signature: (J[BJ)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1splice_1ack - (JNIEnv *, jclass, jlong, jbyteArray, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: ChannelMessageHandler_handle_splice_locked - * Signature: (J[BJ)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1splice_1locked - (JNIEnv *, jclass, jlong, jbyteArray, jlong); - /* * Class: org_ldk_impl_bindings * Method: ChannelMessageHandler_handle_tx_add_input @@ -5847,6 +6383,22 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OffersMessageHandler_1handle_ JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_OffersMessageHandler_1release_1pending_1messages (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: LDKNodeIdLookUp_new + * Signature: (Lorg/ldk/impl/bindings/LDKNodeIdLookUp;)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKNodeIdLookUp_1new + (JNIEnv *, jclass, jobject); + +/* + * Class: org_ldk_impl_bindings + * Method: NodeIdLookUp_next_node_id + * Signature: (JJ)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_NodeIdLookUp_1next_1node_1id + (JNIEnv *, jclass, jlong, jlong); + /* * Class: org_ldk_impl_bindings * Method: LDKRoutingMessageHandler_new @@ -6167,6 +6719,46 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1disconnect_1 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1hash (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: LDKSignBolt12InvoiceFn_new + * Signature: (Lorg/ldk/impl/bindings/LDKSignBolt12InvoiceFn;)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKSignBolt12InvoiceFn_1new + (JNIEnv *, jclass, jobject); + +/* + * Class: org_ldk_impl_bindings + * Method: SignBolt12InvoiceFn_sign_invoice + * Signature: (JJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SignBolt12InvoiceFn_1sign_1invoice + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: LDKSignInvoiceRequestFn_new + * Signature: (Lorg/ldk/impl/bindings/LDKSignInvoiceRequestFn;)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKSignInvoiceRequestFn_1new + (JNIEnv *, jclass, jobject); + +/* + * Class: org_ldk_impl_bindings + * Method: SignInvoiceRequestFn_sign_invoice_request + * Signature: (JJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SignInvoiceRequestFn_1sign_1invoice_1request + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: LDKSignError_ref_from_ptr + * Signature: (J)Lorg/ldk/impl/bindings/LDKSignError; + */ +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSignError_1ref_1from_1ptr + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: LDKEffectiveCapacity_ref_from_ptr @@ -6215,6 +6807,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKScore_1get_1ScoreUpdate JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Score_1write (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: LDKIntroductionNode_ref_from_ptr + * Signature: (J)Lorg/ldk/impl/bindings/LDKIntroductionNode; + */ +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKIntroductionNode_1ref_1from_1ptr + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: LDKCoinSelectionSource_new @@ -6375,6 +6975,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WitnessProgram_1free JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BigEndianScalar_1new (JNIEnv *, jclass, jbyteArray); +/* + * Class: org_ldk_impl_bindings + * Method: BigEndianScalar_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BigEndianScalar_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: BigEndianScalar_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BigEndianScalar_1clone + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: Bech32Error_clone_ptr @@ -6527,6 +7143,110 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxOut_1clone JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Str_1free (JNIEnv *, jclass, jstring); +/* + * Class: org_ldk_impl_bindings + * Method: CVec_u8Z_free + * Signature: ([B)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u8Z_1free + (JNIEnv *, jclass, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err + * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1err + (JNIEnv *, jclass, jobject); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1is_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_RefundBolt12SemanticErrorZ_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_RefundBolt12SemanticErrorZ_err + * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1err + (JNIEnv *, jclass, jobject); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_RefundBolt12SemanticErrorZ_is_ok + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1is_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_RefundBolt12SemanticErrorZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_RefundBolt12SemanticErrorZ_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_RefundBolt12SemanticErrorZ_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1clone + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: COption_u64Z_some @@ -6775,14 +7495,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1ThirtyTwoBytesZ_1clo JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1ThirtyTwoBytesZ_1clone (JNIEnv *, jclass, jlong); -/* - * Class: org_ldk_impl_bindings - * Method: CVec_u8Z_free - * Signature: ([B)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u8Z_1free - (JNIEnv *, jclass, jbyteArray); - /* * Class: org_ldk_impl_bindings * Method: COption_CVec_u8ZZ_some @@ -6959,6 +7671,150 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RecipientOnionFields JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RecipientOnionFieldsNoneZ_1clone (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err + * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1err + (JNIEnv *, jclass, jobject); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1is_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_Bolt12InvoiceBolt12SemanticErrorZ_err + * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1err + (JNIEnv *, jclass, jobject); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1is_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_Bolt12InvoiceBolt12SemanticErrorZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_SchnorrSignatureNoneZ_ok + * Signature: ([B)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1ok + (JNIEnv *, jclass, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_SchnorrSignatureNoneZ_err + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1err + (JNIEnv *, jclass); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_SchnorrSignatureNoneZ_is_ok + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1is_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_SchnorrSignatureNoneZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_SchnorrSignatureNoneZ_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_SchnorrSignatureNoneZ_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: CVec_ThirtyTwoBytesZ_free @@ -7007,6 +7863,86 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1CVec_1ThirtyTwoBytes JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1CVec_1ThirtyTwoBytesZZ_1clone (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: COption_AmountZ_some + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1some + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: COption_AmountZ_none + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1none + (JNIEnv *, jclass); + +/* + * Class: org_ldk_impl_bindings + * Method: COption_AmountZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: COption_AmountZ_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: COption_AmountZ_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: COption_QuantityZ_some + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1some + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: COption_QuantityZ_none + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1none + (JNIEnv *, jclass); + +/* + * Class: org_ldk_impl_bindings + * Method: COption_QuantityZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: COption_QuantityZ_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: COption_QuantityZ_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1clone + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: CResult_ThirtyTwoBytesNoneZ_ok @@ -7673,98 +8609,98 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RecoverableSignature /* * Class: org_ldk_impl_bindings - * Method: CResult_SchnorrSignatureNoneZ_ok + * Method: CResult_ECDSASignatureNoneZ_ok * Signature: ([B)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1ok +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1ok (JNIEnv *, jclass, jbyteArray); /* * Class: org_ldk_impl_bindings - * Method: CResult_SchnorrSignatureNoneZ_err + * Method: CResult_ECDSASignatureNoneZ_err * Signature: ()J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1err +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1err (JNIEnv *, jclass); /* * Class: org_ldk_impl_bindings - * Method: CResult_SchnorrSignatureNoneZ_is_ok + * Method: CResult_ECDSASignatureNoneZ_is_ok * Signature: (J)Z */ -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1is_1ok +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1is_1ok (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_SchnorrSignatureNoneZ_free + * Method: CResult_ECDSASignatureNoneZ_free * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1free +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1free (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_SchnorrSignatureNoneZ_clone_ptr + * Method: CResult_ECDSASignatureNoneZ_clone_ptr * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone_1ptr +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1clone_1ptr (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_SchnorrSignatureNoneZ_clone + * Method: CResult_ECDSASignatureNoneZ_clone * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1clone (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_ECDSASignatureNoneZ_ok + * Method: CResult_TransactionNoneZ_ok * Signature: ([B)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1ok +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1ok (JNIEnv *, jclass, jbyteArray); /* * Class: org_ldk_impl_bindings - * Method: CResult_ECDSASignatureNoneZ_err + * Method: CResult_TransactionNoneZ_err * Signature: ()J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1err +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1err (JNIEnv *, jclass); /* * Class: org_ldk_impl_bindings - * Method: CResult_ECDSASignatureNoneZ_is_ok + * Method: CResult_TransactionNoneZ_is_ok * Signature: (J)Z */ -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1is_1ok +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1is_1ok (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_ECDSASignatureNoneZ_free + * Method: CResult_TransactionNoneZ_free * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1free +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1free (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_ECDSASignatureNoneZ_clone_ptr + * Method: CResult_TransactionNoneZ_clone_ptr * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1clone_1ptr +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone_1ptr (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_ECDSASignatureNoneZ_clone + * Method: CResult_TransactionNoneZ_clone * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1clone +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone (JNIEnv *, jclass, jlong); /* @@ -8175,54 +9111,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InMemorySignerDecode JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InMemorySignerDecodeErrorZ_1clone (JNIEnv *, jclass, jlong); -/* - * Class: org_ldk_impl_bindings - * Method: CResult_TransactionNoneZ_ok - * Signature: ([B)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1ok - (JNIEnv *, jclass, jbyteArray); - -/* - * Class: org_ldk_impl_bindings - * Method: CResult_TransactionNoneZ_err - * Signature: ()J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1err - (JNIEnv *, jclass); - -/* - * Class: org_ldk_impl_bindings - * Method: CResult_TransactionNoneZ_is_ok - * Signature: (J)Z - */ -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1is_1ok - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: CResult_TransactionNoneZ_free - * Signature: (J)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1free - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: CResult_TransactionNoneZ_clone_ptr - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone_1ptr - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: CResult_TransactionNoneZ_clone - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone - (JNIEnv *, jclass, jlong); - /* * Class: org_ldk_impl_bindings * Method: COption_WriteableScoreZ_some @@ -9231,6 +10119,54 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScor JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScorerDecodeErrorZ_1free (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: CResult_BestBlockDecodeErrorZ_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_BestBlockDecodeErrorZ_err + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1err + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_BestBlockDecodeErrorZ_is_ok + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1is_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_BestBlockDecodeErrorZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_BestBlockDecodeErrorZ_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_BestBlockDecodeErrorZ_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1clone + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: C2Tuple_usizeTransactionZ_clone_ptr @@ -9369,42 +10305,42 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MonitorEventZ_1free /* * Class: org_ldk_impl_bindings - * Method: C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr + * Method: C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1clone_1ptr +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1clone_1ptr (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone + * Method: C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1clone +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1clone (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new - * Signature: (J[J[B)J + * Method: C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new + * Signature: (JJ[J[B)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1new - (JNIEnv *, jclass, jlong, jlongArray, jbyteArray); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1new + (JNIEnv *, jclass, jlong, jlong, jlongArray, jbyteArray); /* * Class: org_ldk_impl_bindings - * Method: C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free + * Method: C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1free +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1free (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free + * Method: CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free * Signature: ([J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZZ_1free +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZZ_1free (JNIEnv *, jclass, jlongArray); /* @@ -9743,6 +10679,214 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTypeFeaturesD JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTypeFeaturesDecodeErrorZ_1clone (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: CResult_OfferIdDecodeErrorZ_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_OfferIdDecodeErrorZ_err + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1err + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_OfferIdDecodeErrorZ_is_ok + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1is_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_OfferIdDecodeErrorZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_OfferIdDecodeErrorZ_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_OfferIdDecodeErrorZ_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_NoneBolt12SemanticErrorZ_ok + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1ok + (JNIEnv *, jclass); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_NoneBolt12SemanticErrorZ_err + * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1err + (JNIEnv *, jclass, jobject); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_NoneBolt12SemanticErrorZ_is_ok + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1is_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_NoneBolt12SemanticErrorZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_NoneBolt12SemanticErrorZ_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_NoneBolt12SemanticErrorZ_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_OfferBolt12SemanticErrorZ_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_OfferBolt12SemanticErrorZ_err + * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1err + (JNIEnv *, jclass, jobject); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_OfferBolt12SemanticErrorZ_is_ok + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1is_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_OfferBolt12SemanticErrorZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_OfferBolt12SemanticErrorZ_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_OfferBolt12SemanticErrorZ_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err + * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1err + (JNIEnv *, jclass, jobject); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1is_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err + * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1err + (JNIEnv *, jclass, jobject); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1is_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1free + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: CResult_OfferBolt12ParseErrorZ_ok @@ -9793,98 +10937,98 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12ParseErro /* * Class: org_ldk_impl_bindings - * Method: CResult_PublicKeySecp256k1ErrorZ_ok - * Signature: ([B)J + * Method: CResult_NodeIdDecodeErrorZ_ok + * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1ok - (JNIEnv *, jclass, jbyteArray); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1ok + (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_PublicKeySecp256k1ErrorZ_err - * Signature: (Lorg/ldk/enums/Secp256k1Error;)J + * Method: CResult_NodeIdDecodeErrorZ_err + * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1err - (JNIEnv *, jclass, jobject); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1err + (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_PublicKeySecp256k1ErrorZ_is_ok + * Method: CResult_NodeIdDecodeErrorZ_is_ok * Signature: (J)Z */ -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1is_1ok +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1is_1ok (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_PublicKeySecp256k1ErrorZ_free + * Method: CResult_NodeIdDecodeErrorZ_free * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1free +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1free (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_PublicKeySecp256k1ErrorZ_clone_ptr + * Method: CResult_NodeIdDecodeErrorZ_clone_ptr * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone_1ptr +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1clone_1ptr (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_PublicKeySecp256k1ErrorZ_clone + * Method: CResult_NodeIdDecodeErrorZ_clone * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1clone (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_NodeIdDecodeErrorZ_ok - * Signature: (J)J + * Method: CResult_PublicKeySecp256k1ErrorZ_ok + * Signature: ([B)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1ok - (JNIEnv *, jclass, jlong); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1ok + (JNIEnv *, jclass, jbyteArray); /* * Class: org_ldk_impl_bindings - * Method: CResult_NodeIdDecodeErrorZ_err - * Signature: (J)J + * Method: CResult_PublicKeySecp256k1ErrorZ_err + * Signature: (Lorg/ldk/enums/Secp256k1Error;)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1err - (JNIEnv *, jclass, jlong); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1err + (JNIEnv *, jclass, jobject); /* * Class: org_ldk_impl_bindings - * Method: CResult_NodeIdDecodeErrorZ_is_ok + * Method: CResult_PublicKeySecp256k1ErrorZ_is_ok * Signature: (J)Z */ -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1is_1ok +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1is_1ok (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_NodeIdDecodeErrorZ_free + * Method: CResult_PublicKeySecp256k1ErrorZ_free * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1free +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1free (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_NodeIdDecodeErrorZ_clone_ptr + * Method: CResult_PublicKeySecp256k1ErrorZ_clone_ptr * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1clone_1ptr +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone_1ptr (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_NodeIdDecodeErrorZ_clone + * Method: CResult_PublicKeySecp256k1ErrorZ_clone * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1clone +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone (JNIEnv *, jclass, jlong); /* @@ -10543,6 +11687,38 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1CVec_1SocketAddressZ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1CVec_1SocketAddressZZ_1clone (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: CResult_u64ShortChannelIdErrorZ_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_u64ShortChannelIdErrorZ_err + * Signature: (Lorg/ldk/enums/ShortChannelIdError;)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1err + (JNIEnv *, jclass, jobject); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_u64ShortChannelIdErrorZ_is_ok + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1is_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_u64ShortChannelIdErrorZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1free + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: CResult_PendingHTLCInfoInboundHTLCErrZ_ok @@ -10575,6 +11751,22 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoIn JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoInboundHTLCErrZ_1free (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoInboundHTLCErrZ_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_PendingHTLCInfoInboundHTLCErrZ_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoInboundHTLCErrZ_1clone + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: CVec_HTLCOutputInCommitmentZ_free @@ -10743,6 +11935,46 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1UtxoZNoneZ_1cl JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1UtxoZNoneZ_1clone (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: COption_PaymentContextZ_some + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1some + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: COption_PaymentContextZ_none + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1none + (JNIEnv *, jclass); + +/* + * Class: org_ldk_impl_bindings + * Method: COption_PaymentContextZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: COption_PaymentContextZ_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: COption_PaymentContextZ_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1clone + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: C2Tuple_u64u16Z_clone_ptr @@ -10857,50 +12089,50 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1ChannelShutdownState /* * Class: org_ldk_impl_bindings - * Method: CResult_ThirtyTwoBytesAPIErrorZ_ok - * Signature: ([B)J + * Method: CResult_ChannelIdAPIErrorZ_ok + * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1ok - (JNIEnv *, jclass, jbyteArray); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1ok + (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_ThirtyTwoBytesAPIErrorZ_err + * Method: CResult_ChannelIdAPIErrorZ_err * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1err +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1err (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_ThirtyTwoBytesAPIErrorZ_is_ok + * Method: CResult_ChannelIdAPIErrorZ_is_ok * Signature: (J)Z */ -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1is_1ok +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1is_1ok (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_ThirtyTwoBytesAPIErrorZ_free + * Method: CResult_ChannelIdAPIErrorZ_free * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1free +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1free (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr + * Method: CResult_ChannelIdAPIErrorZ_clone_ptr * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone_1ptr +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1clone_1ptr (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_ThirtyTwoBytesAPIErrorZ_clone + * Method: CResult_ChannelIdAPIErrorZ_clone * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1clone (JNIEnv *, jclass, jlong); /* @@ -11241,44 +12473,100 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1C2Tuple_1Thirt /* * Class: org_ldk_impl_bindings - * Method: C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr + * Method: C2Tuple_ChannelIdPublicKeyZ_clone_ptr * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1clone_1ptr +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1clone_1ptr (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: C2Tuple_ThirtyTwoBytesPublicKeyZ_clone + * Method: C2Tuple_ChannelIdPublicKeyZ_clone * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1clone +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1clone (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: C2Tuple_ThirtyTwoBytesPublicKeyZ_new - * Signature: ([B[B)J + * Method: C2Tuple_ChannelIdPublicKeyZ_new + * Signature: (J[B)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1new - (JNIEnv *, jclass, jbyteArray, jbyteArray); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1new + (JNIEnv *, jclass, jlong, jbyteArray); /* * Class: org_ldk_impl_bindings - * Method: C2Tuple_ThirtyTwoBytesPublicKeyZ_free + * Method: C2Tuple_ChannelIdPublicKeyZ_free * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1free +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1free (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_free + * Method: CVec_C2Tuple_ChannelIdPublicKeyZZ_free * Signature: ([J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1ThirtyTwoBytesPublicKeyZZ_1free +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1ChannelIdPublicKeyZZ_1free (JNIEnv *, jclass, jlongArray); +/* + * Class: org_ldk_impl_bindings + * Method: CVec_ChannelIdZ_free + * Signature: ([J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelIdZ_1free + (JNIEnv *, jclass, jlongArray); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err + * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1err + (JNIEnv *, jclass, jobject); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1is_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: COption_StrZ_some @@ -11321,98 +12609,98 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1StrZ_1clone /* * Class: org_ldk_impl_bindings - * Method: CResult_NoneBolt12SemanticErrorZ_ok - * Signature: ()J + * Method: CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok + * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1ok - (JNIEnv *, jclass); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1ok + (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_NoneBolt12SemanticErrorZ_err - * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J + * Method: CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_err + * Signature: ()J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1err - (JNIEnv *, jclass, jobject); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1err + (JNIEnv *, jclass); /* * Class: org_ldk_impl_bindings - * Method: CResult_NoneBolt12SemanticErrorZ_is_ok + * Method: CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_is_ok * Signature: (J)Z */ -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1is_1ok +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1is_1ok (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_NoneBolt12SemanticErrorZ_free + * Method: CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_free * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1free +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1free (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_NoneBolt12SemanticErrorZ_clone_ptr + * Method: CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_clone_ptr * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone_1ptr +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1clone_1ptr (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_NoneBolt12SemanticErrorZ_clone + * Method: CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_clone * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1clone (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok - * Signature: (J)J + * Method: CResult_ThirtyTwoBytesAPIErrorZ_ok + * Signature: ([B)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1ok - (JNIEnv *, jclass, jlong); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1ok + (JNIEnv *, jclass, jbyteArray); /* * Class: org_ldk_impl_bindings - * Method: CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_err - * Signature: ()J + * Method: CResult_ThirtyTwoBytesAPIErrorZ_err + * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1err - (JNIEnv *, jclass); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1err + (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_is_ok + * Method: CResult_ThirtyTwoBytesAPIErrorZ_is_ok * Signature: (J)Z */ -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1is_1ok +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1is_1ok (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_free + * Method: CResult_ThirtyTwoBytesAPIErrorZ_free * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1free +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1free (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_clone_ptr + * Method: CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1clone_1ptr +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone_1ptr (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_clone + * Method: CResult_ThirtyTwoBytesAPIErrorZ_clone * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1clone +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone (JNIEnv *, jclass, jlong); /* @@ -12511,14 +13799,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1ThirtyTwoBytesC JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1CommitmentTransactionZ_1free (JNIEnv *, jclass, jlongArray); -/* - * Class: org_ldk_impl_bindings - * Method: CVec_TransactionZ_free - * Signature: ([[B)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TransactionZ_1free - (JNIEnv *, jclass, jobjectArray); - /* * Class: org_ldk_impl_bindings * Method: C2Tuple_u32TxOutZ_clone_ptr @@ -13025,42 +14305,10 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1SocketAddressZ_1clon /* * Class: org_ldk_impl_bindings - * Method: C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1clone_1ptr - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: C2Tuple_PublicKeyCOption_SocketAddressZZ_clone - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1clone - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: C2Tuple_PublicKeyCOption_SocketAddressZZ_new - * Signature: ([BJ)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1new - (JNIEnv *, jclass, jbyteArray, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: C2Tuple_PublicKeyCOption_SocketAddressZZ_free - * Signature: (J)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1free - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_free + * Method: CVec_PeerDetailsZ_free * Signature: ([J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1PublicKeyCOption_1SocketAddressZZZ_1free +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1PeerDetailsZ_1free (JNIEnv *, jclass, jlongArray); /* @@ -13447,6 +14695,102 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBy JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesChannelMonitorZIOErrorZ_1clone (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err + * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1err + (JNIEnv *, jclass, jobject); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1is_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceRequestBolt12SemanticErrorZ_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceRequestBolt12SemanticErrorZ_err + * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1err + (JNIEnv *, jclass, jobject); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1is_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceRequestBolt12SemanticErrorZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceRequestBolt12SemanticErrorZ_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1clone + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: COption_SecretKeyZ_some @@ -13487,6 +14831,38 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1SecretKeyZ_1clone_1p JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1SecretKeyZ_1clone (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err + * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1err + (JNIEnv *, jclass, jobject); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1is_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1free + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: CResult_VerifiedInvoiceRequestNoneZ_ok @@ -13535,6 +14911,86 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1VerifiedInvoiceReque JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1VerifiedInvoiceRequestNoneZ_1clone (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err + * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1err + (JNIEnv *, jclass, jobject); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1is_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceRequestFieldsDecodeErrorZ_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceRequestFieldsDecodeErrorZ_err + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1err + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1is_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceRequestFieldsDecodeErrorZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_InvoiceRequestFieldsDecodeErrorZ_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1clone + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: COption_NoneZ_some @@ -13567,6 +15023,46 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1NoneZ_1free JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1WitnessZ_1free (JNIEnv *, jclass, jobjectArray); +/* + * Class: org_ldk_impl_bindings + * Method: COption_ECDSASignatureZ_some + * Signature: ([B)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1some + (JNIEnv *, jclass, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: COption_ECDSASignatureZ_none + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1none + (JNIEnv *, jclass); + +/* + * Class: org_ldk_impl_bindings + * Method: COption_ECDSASignatureZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: COption_ECDSASignatureZ_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: COption_ECDSASignatureZ_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1clone + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: COption_i64Z_some @@ -16999,6 +18495,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownScriptInvali JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownScriptInvalidShutdownScriptZ_1clone (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: CVec_TransactionZ_free + * Signature: ([[B)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TransactionZ_1free + (JNIEnv *, jclass, jobjectArray); + /* * Class: org_ldk_impl_bindings * Method: CResult_PaymentPurposeDecodeErrorZ_ok @@ -18343,6 +19847,54 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UntrustedStringDecod JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UntrustedStringDecodeErrorZ_1clone (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: CResult_ChannelIdDecodeErrorZ_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_ChannelIdDecodeErrorZ_err + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1err + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_ChannelIdDecodeErrorZ_is_ok + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1is_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_ChannelIdDecodeErrorZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_ChannelIdDecodeErrorZ_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_ChannelIdDecodeErrorZ_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1clone + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: C2Tuple__u832u16Z_clone_ptr @@ -18473,82 +20025,194 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentConstraintsDe /* * Class: org_ldk_impl_bindings - * Method: C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr + * Method: CResult_PaymentContextDecodeErrorZ_ok * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1clone_1ptr +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1ok (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone + * Method: CResult_PaymentContextDecodeErrorZ_err * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1clone +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1err (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new - * Signature: ([BJJ)J + * Method: CResult_PaymentContextDecodeErrorZ_is_ok + * Signature: (J)Z */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1new - (JNIEnv *, jclass, jbyteArray, jlong, jlong); +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1is_1ok + (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free + * Method: CResult_PaymentContextDecodeErrorZ_free * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1free +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1free (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok + * Method: CResult_PaymentContextDecodeErrorZ_clone_ptr * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1ok +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1clone_1ptr (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err - * Signature: ()J + * Method: CResult_PaymentContextDecodeErrorZ_clone + * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1err - (JNIEnv *, jclass); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1clone + (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok + * Method: CResult_UnknownPaymentContextDecodeErrorZ_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_UnknownPaymentContextDecodeErrorZ_err + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1err + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_UnknownPaymentContextDecodeErrorZ_is_ok * Signature: (J)Z */ -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1is_1ok +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1is_1ok (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free + * Method: CResult_UnknownPaymentContextDecodeErrorZ_free * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1free +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1free (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr + * Method: CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1clone_1ptr +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1clone_1ptr (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone + * Method: CResult_UnknownPaymentContextDecodeErrorZ_clone * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1clone +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_Bolt12OfferContextDecodeErrorZ_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_Bolt12OfferContextDecodeErrorZ_err + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1err + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_Bolt12OfferContextDecodeErrorZ_is_ok + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1is_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_Bolt12OfferContextDecodeErrorZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_Bolt12OfferContextDecodeErrorZ_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_Bolt12RefundContextDecodeErrorZ_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_Bolt12RefundContextDecodeErrorZ_err + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1err + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_Bolt12RefundContextDecodeErrorZ_is_ok + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1is_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_Bolt12RefundContextDecodeErrorZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_Bolt12RefundContextDecodeErrorZ_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1clone (JNIEnv *, jclass, jlong); /* @@ -18599,6 +20263,86 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1clone (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new + * Signature: ([BJJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1new + (JNIEnv *, jclass, jbyteArray, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1err + (JNIEnv *, jclass); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1is_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1clone + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: CResult_TxOutUtxoLookupErrorZ_ok @@ -18711,6 +20455,22 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKe JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKeyOnionMessageCOption_1CVec_1SocketAddressZZZSendErrorZ_1free (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKeyOnionMessageCOption_1CVec_1SocketAddressZZZSendErrorZ_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKeyOnionMessageCOption_1CVec_1SocketAddressZZZSendErrorZ_1clone + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: CResult_PeeledOnionNoneZ_ok @@ -18743,6 +20503,22 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1PeeledOnionNoneZ_ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PeeledOnionNoneZ_1free (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: CResult_PeeledOnionNoneZ_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PeeledOnionNoneZ_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_PeeledOnionNoneZ_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PeeledOnionNoneZ_1clone + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: CResult_SendSuccessSendErrorZ_ok @@ -18775,6 +20551,22 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1SendSuccessSendEr JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SendSuccessSendErrorZ_1free (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: CResult_SendSuccessSendErrorZ_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SendSuccessSendErrorZ_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_SendSuccessSendErrorZ_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SendSuccessSendErrorZ_1clone + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: CResult_BlindedPathNoneZ_ok @@ -19023,6 +20815,214 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceErrorDecodeEr JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceErrorDecodeErrorZ_1clone (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: CResult_TrackedSpendableOutputDecodeErrorZ_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_TrackedSpendableOutputDecodeErrorZ_err + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1err + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_TrackedSpendableOutputDecodeErrorZ_is_ok + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1is_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_TrackedSpendableOutputDecodeErrorZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_TrackedSpendableOutputDecodeErrorZ_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_OutputSpendStatusDecodeErrorZ_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_OutputSpendStatusDecodeErrorZ_err + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1err + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_OutputSpendStatusDecodeErrorZ_is_ok + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1is_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_OutputSpendStatusDecodeErrorZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_OutputSpendStatusDecodeErrorZ_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_OutputSpendStatusDecodeErrorZ_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: COption_FilterZ_some + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1some + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: COption_FilterZ_none + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1none + (JNIEnv *, jclass); + +/* + * Class: org_ldk_impl_bindings + * Method: COption_FilterZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CVec_TrackedSpendableOutputZ_free + * Signature: ([J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TrackedSpendableOutputZ_1free + (JNIEnv *, jclass, jlongArray); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_OutputSweeperDecodeErrorZ_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_OutputSweeperDecodeErrorZ_err + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1err + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_OutputSweeperDecodeErrorZ_is_ok + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1is_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_OutputSweeperDecodeErrorZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: C2Tuple_BestBlockOutputSweeperZ_new + * Signature: (JJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1new + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: C2Tuple_BestBlockOutputSweeperZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1err + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1is_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1free + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: CResult_DelayedPaymentBasepointDecodeErrorZ_ok @@ -19313,66 +21313,74 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeE /* * Class: org_ldk_impl_bindings - * Method: COption_FilterZ_some + * Method: CResult_LockedChannelMonitorNoneZ_ok * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1some +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1ok (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: COption_FilterZ_none + * Method: CResult_LockedChannelMonitorNoneZ_err * Signature: ()J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1none +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1err (JNIEnv *, jclass); /* * Class: org_ldk_impl_bindings - * Method: COption_FilterZ_free + * Method: CResult_LockedChannelMonitorNoneZ_is_ok + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1is_1ok + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_LockedChannelMonitorNoneZ_free * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1free +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1free (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_LockedChannelMonitorNoneZ_ok + * Method: C2Tuple_OutPointChannelIdZ_clone_ptr * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1ok +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1clone_1ptr (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_LockedChannelMonitorNoneZ_err - * Signature: ()J + * Method: C2Tuple_OutPointChannelIdZ_clone + * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1err - (JNIEnv *, jclass); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1clone + (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_LockedChannelMonitorNoneZ_is_ok - * Signature: (J)Z + * Method: C2Tuple_OutPointChannelIdZ_new + * Signature: (JJ)J */ -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1is_1ok - (JNIEnv *, jclass, jlong); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1new + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_LockedChannelMonitorNoneZ_free + * Method: C2Tuple_OutPointChannelIdZ_free * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1free +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1free (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CVec_OutPointZ_free + * Method: CVec_C2Tuple_OutPointChannelIdZZ_free * Signature: ([J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1OutPointZ_1free +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1OutPointChannelIdZZ_1free (JNIEnv *, jclass, jlongArray); /* @@ -19719,6 +21727,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TransactionU16LenLimited_1new JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TransactionU16LenLimited_1into_1transaction (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: TransactionU16LenLimited_as_transaction + * Signature: (J)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TransactionU16LenLimited_1as_1transaction + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: TransactionU16LenLimited_write @@ -19839,6 +21855,78 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_MonitorUpdatingPersister_1cle JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_MonitorUpdatingPersister_1as_1Persist (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: ShortChannelIdError_clone + * Signature: (J)Lorg/ldk/enums/ShortChannelIdError; + */ +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ShortChannelIdError_block_overflow + * Signature: ()Lorg/ldk/enums/ShortChannelIdError; + */ +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1block_1overflow + (JNIEnv *, jclass); + +/* + * Class: org_ldk_impl_bindings + * Method: ShortChannelIdError_tx_index_overflow + * Signature: ()Lorg/ldk/enums/ShortChannelIdError; + */ +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1tx_1index_1overflow + (JNIEnv *, jclass); + +/* + * Class: org_ldk_impl_bindings + * Method: ShortChannelIdError_vout_index_overflow + * Signature: ()Lorg/ldk/enums/ShortChannelIdError; + */ +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1vout_1index_1overflow + (JNIEnv *, jclass); + +/* + * Class: org_ldk_impl_bindings + * Method: ShortChannelIdError_eq + * Signature: (JJ)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1eq + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: block_from_scid + * Signature: (J)I + */ +JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_block_1from_1scid + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: tx_index_from_scid + * Signature: (J)I + */ +JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_tx_1index_1from_1scid + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: vout_from_scid + * Signature: (J)S + */ +JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_vout_1from_1scid + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: scid_from_parts + * Signature: (JJJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_scid_1from_1parts + (JNIEnv *, jclass, jlong, jlong, jlong); + /* * Class: org_ldk_impl_bindings * Method: UntrustedString_free @@ -19953,34 +22041,314 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PrintableString_1new /* * Class: org_ldk_impl_bindings - * Method: FutureCallback_free + * Method: TrackedSpendableOutput_free * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1free +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1free (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: Future_free + * Method: TrackedSpendableOutput_get_descriptor + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1get_1descriptor + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: TrackedSpendableOutput_set_descriptor + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1set_1descriptor + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: TrackedSpendableOutput_get_channel_id + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1get_1channel_1id + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: TrackedSpendableOutput_set_channel_id + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1set_1channel_1id + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: TrackedSpendableOutput_get_status + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1get_1status + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: TrackedSpendableOutput_set_status + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1set_1status + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: TrackedSpendableOutput_new + * Signature: (JJJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1new + (JNIEnv *, jclass, jlong, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: TrackedSpendableOutput_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: TrackedSpendableOutput_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: TrackedSpendableOutput_eq + * Signature: (JJ)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1eq + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: TrackedSpendableOutput_is_spent_in + * Signature: (J[B)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1is_1spent_1in + (JNIEnv *, jclass, jlong, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: TrackedSpendableOutput_write + * Signature: (J)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1write + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: TrackedSpendableOutput_read + * Signature: ([B)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1read + (JNIEnv *, jclass, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: OutputSpendStatus_free * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Future_1free +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OutputSpendStatus_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OutputSpendStatus_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OutputSpendStatus_pending_initial_broadcast + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1pending_1initial_1broadcast + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OutputSpendStatus_pending_first_confirmation + * Signature: ([BI[B)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1pending_1first_1confirmation + (JNIEnv *, jclass, jbyteArray, jint, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: OutputSpendStatus_pending_threshold_confirmations + * Signature: ([BI[BI[B)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1pending_1threshold_1confirmations + (JNIEnv *, jclass, jbyteArray, jint, jbyteArray, jint, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: OutputSpendStatus_eq + * Signature: (JJ)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1eq + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OutputSpendStatus_write + * Signature: (J)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1write + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OutputSpendStatus_read + * Signature: ([B)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1read + (JNIEnv *, jclass, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: OutputSweeper_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OutputSweeper_new + * Signature: (JJJJJJJJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1new + (JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OutputSweeper_track_spendable_outputs + * Signature: (J[JJZJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1track_1spendable_1outputs + (JNIEnv *, jclass, jlong, jlongArray, jlong, jboolean, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OutputSweeper_tracked_spendable_outputs + * Signature: (J)[J + */ +JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1tracked_1spendable_1outputs + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OutputSweeper_current_best_block + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1current_1best_1block (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: Future_clone_ptr + * Method: OutputSweeper_as_Listen * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Future_1clone_1ptr +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1as_1Listen (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: Future_clone + * Method: OutputSweeper_as_Confirm * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Future_1clone +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1as_1Confirm + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: SpendingDelay_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: SpendingDelay_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: SpendingDelay_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: SpendingDelay_relative + * Signature: (I)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1relative + (JNIEnv *, jclass, jint); + +/* + * Class: org_ldk_impl_bindings + * Method: SpendingDelay_absolute + * Signature: (I)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1absolute + (JNIEnv *, jclass, jint); + +/* + * Class: org_ldk_impl_bindings + * Method: OutputSweeper_read + * Signature: ([BJJJJJJJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1read + (JNIEnv *, jclass, jbyteArray, jlong, jlong, jlong, jlong, jlong, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: C2Tuple_BestBlockOutputSweeperZ_read + * Signature: ([BJJJJJJJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1read + (JNIEnv *, jclass, jbyteArray, jlong, jlong, jlong, jlong, jlong, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: FutureCallback_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: Future_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Future_1free (JNIEnv *, jclass, jlong); /* @@ -21199,6 +23567,46 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UserConfig_1default JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BestBlock_1free (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: BestBlock_get_block_hash + * Signature: (J)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_BestBlock_1get_1block_1hash + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: BestBlock_set_block_hash + * Signature: (J[B)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BestBlock_1set_1block_1hash + (JNIEnv *, jclass, jlong, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: BestBlock_get_height + * Signature: (J)I + */ +JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_BestBlock_1get_1height + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: BestBlock_set_height + * Signature: (JI)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BestBlock_1set_1height + (JNIEnv *, jclass, jlong, jint); + +/* + * Class: org_ldk_impl_bindings + * Method: BestBlock_new + * Signature: ([BI)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BestBlock_1new + (JNIEnv *, jclass, jbyteArray, jint); + /* * Class: org_ldk_impl_bindings * Method: BestBlock_clone_ptr @@ -21215,6 +23623,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BestBlock_1clone_1ptr JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BestBlock_1clone (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: BestBlock_hash + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BestBlock_1hash + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: BestBlock_eq @@ -21233,27 +23649,19 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BestBlock_1from_1network /* * Class: org_ldk_impl_bindings - * Method: BestBlock_new - * Signature: ([BI)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BestBlock_1new - (JNIEnv *, jclass, jbyteArray, jint); - -/* - * Class: org_ldk_impl_bindings - * Method: BestBlock_block_hash + * Method: BestBlock_write * Signature: (J)[B */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_BestBlock_1block_1hash +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_BestBlock_1write (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: BestBlock_height - * Signature: (J)I + * Method: BestBlock_read + * Signature: ([B)J */ -JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_BestBlock_1height - (JNIEnv *, jclass, jlong); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BestBlock_1read + (JNIEnv *, jclass, jbyteArray); /* * Class: org_ldk_impl_bindings @@ -21487,6 +23895,14 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_ConfirmationTarget_1non_1an JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_ConfirmationTarget_1channel_1close_1minimum (JNIEnv *, jclass); +/* + * Class: org_ldk_impl_bindings + * Method: ConfirmationTarget_output_spending_fee + * Signature: ()Lorg/ldk/enums/ConfirmationTarget; + */ +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_ConfirmationTarget_1output_1spending_1fee + (JNIEnv *, jclass); + /* * Class: org_ldk_impl_bindings * Method: ConfirmationTarget_hash @@ -21639,6 +24055,22 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1get_1update_1fu JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1rebroadcast_1pending_1claims (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: ChainMonitor_signer_unblocked + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1signer_1unblocked + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ChainMonitor_archive_fully_resolved_channel_monitors + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1archive_1fully_1resolved_1channel_1monitors + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: ChainMonitor_as_Listen @@ -21695,6 +24127,22 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1get_1up JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1set_1update_1id (JNIEnv *, jclass, jlong, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: ChannelMonitorUpdate_get_channel_id + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1get_1channel_1id + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ChannelMonitorUpdate_set_channel_id + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1set_1channel_1id + (JNIEnv *, jclass, jlong, jlong); + /* * Class: org_ldk_impl_bindings * Method: ChannelMonitorUpdate_clone_ptr @@ -21767,6 +24215,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1clone JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1htlcevent (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: MonitorEvent_holder_force_closed_with_info + * Signature: (JJJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1holder_1force_1closed_1with_1info + (JNIEnv *, jclass, jlong, jlong, jlong); + /* * Class: org_ldk_impl_bindings * Method: MonitorEvent_holder_force_closed @@ -21778,10 +24234,10 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1holder_1force_1 /* * Class: org_ldk_impl_bindings * Method: MonitorEvent_completed - * Signature: (JJ)J + * Signature: (JJJ)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1completed - (JNIEnv *, jclass, jlong, jlong); + (JNIEnv *, jclass, jlong, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -21999,6 +24455,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1latest_1 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1funding_1txo (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: ChannelMonitor_channel_id + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1channel_1id + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: ChannelMonitor_get_outputs_to_watch @@ -22065,11 +24529,11 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1cou /* * Class: org_ldk_impl_bindings - * Method: ChannelMonitor_get_latest_holder_commitment_txn - * Signature: (JJ)[[B + * Method: ChannelMonitor_broadcast_latest_holder_commitment_txn + * Signature: (JJJJ)V */ -JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1latest_1holder_1commitment_1txn - (JNIEnv *, jclass, jlong, jlong); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1broadcast_1latest_1holder_1commitment_1txn + (JNIEnv *, jclass, jlong, jlong, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -22135,6 +24599,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1current_1best JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1rebroadcast_1pending_1claims (JNIEnv *, jclass, jlong, jlong, jlong, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: ChannelMonitor_signer_unblocked + * Signature: (JJJJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1signer_1unblocked + (JNIEnv *, jclass, jlong, jlong, jlong, jlong); + /* * Class: org_ldk_impl_bindings * Method: ChannelMonitor_get_spendable_outputs @@ -22143,6 +24615,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1rebroadcast_1p JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1spendable_1outputs (JNIEnv *, jclass, jlong, jbyteArray, jint); +/* + * Class: org_ldk_impl_bindings + * Method: ChannelMonitor_is_fully_resolved + * Signature: (JJ)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1is_1fully_1resolved + (JNIEnv *, jclass, jlong, jlong); + /* * Class: org_ldk_impl_bindings * Method: ChannelMonitor_get_claimable_balances @@ -22239,14 +24719,6 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OutPoint_1eq JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1hash (JNIEnv *, jclass, jlong); -/* - * Class: org_ldk_impl_bindings - * Method: OutPoint_to_channel_id - * Signature: (J)[B - */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OutPoint_1to_1channel_1id - (JNIEnv *, jclass, jlong); - /* * Class: org_ldk_impl_bindings * Method: OutPoint_write @@ -22327,6 +24799,38 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1set_1msg JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1new (JNIEnv *, jclass, jshort, jbyteArray, jstring); +/* + * Class: org_ldk_impl_bindings + * Method: InboundHTLCErr_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: InboundHTLCErr_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: InboundHTLCErr_hash + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1hash + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: InboundHTLCErr_eq + * Signature: (JJ)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1eq + (JNIEnv *, jclass, jlong, jlong); + /* * Class: org_ldk_impl_bindings * Method: peel_payment_onion @@ -22370,18 +24874,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1forward /* * Class: org_ldk_impl_bindings * Method: PendingHTLCRouting_receive - * Signature: (JJI[B[JZ)J + * Signature: (JJJI[B[JZ)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive - (JNIEnv *, jclass, jlong, jlong, jint, jbyteArray, jlongArray, jboolean); + (JNIEnv *, jclass, jlong, jlong, jlong, jint, jbyteArray, jlongArray, jboolean); /* * Class: org_ldk_impl_bindings * Method: PendingHTLCRouting_receive_keysend - * Signature: (J[BJI[J)J + * Signature: (J[BJI[JZ)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive_1keysend - (JNIEnv *, jclass, jlong, jbyteArray, jlong, jint, jlongArray); + (JNIEnv *, jclass, jlong, jbyteArray, jlong, jint, jlongArray, jboolean); /* * Class: org_ldk_impl_bindings @@ -22994,18 +25498,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1free /* * Class: org_ldk_impl_bindings * Method: ChannelDetails_get_channel_id - * Signature: (J)[B + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1channel_1id +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1channel_1id (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings * Method: ChannelDetails_set_channel_id - * Signature: (J[B)V + * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1channel_1id - (JNIEnv *, jclass, jlong, jbyteArray); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -23423,14 +25927,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1config JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1config (JNIEnv *, jclass, jlong, jlong); -/* - * Class: org_ldk_impl_bindings - * Method: ChannelDetails_new - * Signature: ([BJJJJJJJJ[BJJJJJJJJJZZJZZJJJ)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1new - (JNIEnv *, jclass, jbyteArray, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jbyteArray, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jboolean, jboolean, jlong, jboolean, jboolean, jlong, jlong, jlong); - /* * Class: org_ldk_impl_bindings * Method: ChannelDetails_clone_ptr @@ -23714,34 +26210,34 @@ JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_ChannelManager_1list_1re /* * Class: org_ldk_impl_bindings * Method: ChannelManager_close_channel - * Signature: (J[B[B)J + * Signature: (JJ[B)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1channel - (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray); + (JNIEnv *, jclass, jlong, jlong, jbyteArray); /* * Class: org_ldk_impl_bindings * Method: ChannelManager_close_channel_with_feerate_and_script - * Signature: (J[B[BJJ)J + * Signature: (JJ[BJJ)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1channel_1with_1feerate_1and_1script - (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray, jlong, jlong); + (JNIEnv *, jclass, jlong, jlong, jbyteArray, jlong, jlong); /* * Class: org_ldk_impl_bindings * Method: ChannelManager_force_close_broadcasting_latest_txn - * Signature: (J[B[B)J + * Signature: (JJ[B)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1broadcasting_1latest_1txn - (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray); + (JNIEnv *, jclass, jlong, jlong, jbyteArray); /* * Class: org_ldk_impl_bindings * Method: ChannelManager_force_close_without_broadcasting_txn - * Signature: (J[B[B)J + * Signature: (JJ[B)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1without_1broadcasting_1txn - (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray); + (JNIEnv *, jclass, jlong, jlong, jbyteArray); /* * Class: org_ldk_impl_bindings @@ -23826,10 +26322,10 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1send_1preflig /* * Class: org_ldk_impl_bindings * Method: ChannelManager_funding_transaction_generated - * Signature: (J[B[B[B)J + * Signature: (JJ[B[B)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1funding_1transaction_1generated - (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray, jbyteArray); + (JNIEnv *, jclass, jlong, jlong, jbyteArray, jbyteArray); /* * Class: org_ldk_impl_bindings @@ -23842,26 +26338,26 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1batch_1fundin /* * Class: org_ldk_impl_bindings * Method: ChannelManager_update_partial_channel_config - * Signature: (J[B[[BJ)J + * Signature: (J[B[JJ)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1partial_1channel_1config - (JNIEnv *, jclass, jlong, jbyteArray, jobjectArray, jlong); + (JNIEnv *, jclass, jlong, jbyteArray, jlongArray, jlong); /* * Class: org_ldk_impl_bindings * Method: ChannelManager_update_channel_config - * Signature: (J[B[[BJ)J + * Signature: (J[B[JJ)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1channel_1config - (JNIEnv *, jclass, jlong, jbyteArray, jobjectArray, jlong); + (JNIEnv *, jclass, jlong, jbyteArray, jlongArray, jlong); /* * Class: org_ldk_impl_bindings * Method: ChannelManager_forward_intercepted_htlc - * Signature: (J[B[B[BJ)J + * Signature: (J[BJ[BJ)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1forward_1intercepted_1htlc - (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray, jbyteArray, jlong); + (JNIEnv *, jclass, jlong, jbyteArray, jlong, jbyteArray, jlong); /* * Class: org_ldk_impl_bindings @@ -23930,18 +26426,34 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelManager_1get_1our /* * Class: org_ldk_impl_bindings * Method: ChannelManager_accept_inbound_channel - * Signature: (J[B[B[B)J + * Signature: (JJ[B[B)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inbound_1channel - (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray, jbyteArray); + (JNIEnv *, jclass, jlong, jlong, jbyteArray, jbyteArray); /* * Class: org_ldk_impl_bindings * Method: ChannelManager_accept_inbound_channel_from_trusted_peer_0conf - * Signature: (J[B[B[B)J + * Signature: (JJ[B[B)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inbound_1channel_1from_1trusted_1peer_10conf - (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray, jbyteArray); + (JNIEnv *, jclass, jlong, jlong, jbyteArray, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: ChannelManager_create_offer_builder + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1create_1offer_1builder + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ChannelManager_create_refund_builder + * Signature: (JJJ[BJJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1create_1refund_1builder + (JNIEnv *, jclass, jlong, jlong, jlong, jbyteArray, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -24119,6 +26631,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1ChannelMe JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1OffersMessageHandler (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: ChannelManager_as_NodeIdLookUp + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1NodeIdLookUp + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: provided_init_features @@ -24519,6 +27039,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DelayedPaymentBasepoint_1hash JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_DelayedPaymentBasepoint_1to_1public_1key (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: DelayedPaymentBasepoint_derive_add_tweak + * Signature: (J[B)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_DelayedPaymentBasepoint_1derive_1add_1tweak + (JNIEnv *, jclass, jlong, jbyteArray); + /* * Class: org_ldk_impl_bindings * Method: DelayedPaymentBasepoint_write @@ -24703,6 +27231,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HtlcBasepoint_1hash JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_HtlcBasepoint_1to_1public_1key (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: HtlcBasepoint_derive_add_tweak + * Signature: (J[B)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_HtlcBasepoint_1derive_1add_1tweak + (JNIEnv *, jclass, jlong, jbyteArray); + /* * Class: org_ldk_impl_bindings * Method: HtlcBasepoint_write @@ -24815,6 +27351,14 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_HtlcKey_1write JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HtlcKey_1read (JNIEnv *, jclass, jbyteArray); +/* + * Class: org_ldk_impl_bindings + * Method: add_public_key_tweak + * Signature: ([B[B)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_add_1public_1key_1tweak + (JNIEnv *, jclass, jbyteArray, jbyteArray); + /* * Class: org_ldk_impl_bindings * Method: RevocationBasepoint_free @@ -25111,6 +27655,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DecodeError_1io JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DecodeError_1unsupported_1compression (JNIEnv *, jclass); +/* + * Class: org_ldk_impl_bindings + * Method: DecodeError_dangerous_value + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DecodeError_1dangerous_1value + (JNIEnv *, jclass); + /* * Class: org_ldk_impl_bindings * Method: DecodeError_hash @@ -25234,18 +27786,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1free /* * Class: org_ldk_impl_bindings * Method: ErrorMessage_get_channel_id - * Signature: (J)[B + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1channel_1id +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1channel_1id (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings * Method: ErrorMessage_set_channel_id - * Signature: (J[B)V + * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1set_1channel_1id - (JNIEnv *, jclass, jlong, jbyteArray); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -25266,10 +27818,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1set_1data /* * Class: org_ldk_impl_bindings * Method: ErrorMessage_new - * Signature: ([BLjava/lang/String;)J + * Signature: (JLjava/lang/String;)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1new - (JNIEnv *, jclass, jbyteArray, jstring); + (JNIEnv *, jclass, jlong, jstring); /* * Class: org_ldk_impl_bindings @@ -25314,18 +27866,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WarningMessage_1free /* * Class: org_ldk_impl_bindings * Method: WarningMessage_get_channel_id - * Signature: (J)[B + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_WarningMessage_1get_1channel_1id +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_WarningMessage_1get_1channel_1id (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings * Method: WarningMessage_set_channel_id - * Signature: (J[B)V + * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WarningMessage_1set_1channel_1id - (JNIEnv *, jclass, jlong, jbyteArray); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -25346,10 +27898,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WarningMessage_1set_1data /* * Class: org_ldk_impl_bindings * Method: WarningMessage_new - * Signature: ([BLjava/lang/String;)J + * Signature: (JLjava/lang/String;)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_WarningMessage_1new - (JNIEnv *, jclass, jbyteArray, jstring); + (JNIEnv *, jclass, jlong, jstring); /* * Class: org_ldk_impl_bindings @@ -25529,539 +28081,475 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Pong_1eq /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_free + * Method: CommonOpenChannelFields_free * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1free +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1free (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_get_chain_hash + * Method: CommonOpenChannelFields_get_chain_hash * Signature: (J)[B */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1chain_1hash +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1chain_1hash (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_set_chain_hash + * Method: CommonOpenChannelFields_set_chain_hash * Signature: (J[B)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1chain_1hash +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1chain_1hash (JNIEnv *, jclass, jlong, jbyteArray); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_get_temporary_channel_id - * Signature: (J)[B - */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1temporary_1channel_1id - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: OpenChannel_set_temporary_channel_id - * Signature: (J[B)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1temporary_1channel_1id - (JNIEnv *, jclass, jlong, jbyteArray); - -/* - * Class: org_ldk_impl_bindings - * Method: OpenChannel_get_funding_satoshis + * Method: CommonOpenChannelFields_get_temporary_channel_id * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1funding_1satoshis +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1temporary_1channel_1id (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_set_funding_satoshis + * Method: CommonOpenChannelFields_set_temporary_channel_id * Signature: (JJ)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1funding_1satoshis +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1temporary_1channel_1id (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_get_push_msat + * Method: CommonOpenChannelFields_get_funding_satoshis * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1push_1msat +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1funding_1satoshis (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_set_push_msat + * Method: CommonOpenChannelFields_set_funding_satoshis * Signature: (JJ)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1push_1msat +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1funding_1satoshis (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_get_dust_limit_satoshis + * Method: CommonOpenChannelFields_get_dust_limit_satoshis * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1dust_1limit_1satoshis +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1dust_1limit_1satoshis (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_set_dust_limit_satoshis + * Method: CommonOpenChannelFields_set_dust_limit_satoshis * Signature: (JJ)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1dust_1limit_1satoshis +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1dust_1limit_1satoshis (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_get_max_htlc_value_in_flight_msat + * Method: CommonOpenChannelFields_get_max_htlc_value_in_flight_msat * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1max_1htlc_1value_1in_1flight_1msat +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1max_1htlc_1value_1in_1flight_1msat (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_set_max_htlc_value_in_flight_msat + * Method: CommonOpenChannelFields_set_max_htlc_value_in_flight_msat * Signature: (JJ)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1max_1htlc_1value_1in_1flight_1msat - (JNIEnv *, jclass, jlong, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: OpenChannel_get_channel_reserve_satoshis - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1reserve_1satoshis - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: OpenChannel_set_channel_reserve_satoshis - * Signature: (JJ)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1reserve_1satoshis +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1max_1htlc_1value_1in_1flight_1msat (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_get_htlc_minimum_msat + * Method: CommonOpenChannelFields_get_htlc_minimum_msat * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1htlc_1minimum_1msat +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1htlc_1minimum_1msat (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_set_htlc_minimum_msat + * Method: CommonOpenChannelFields_set_htlc_minimum_msat * Signature: (JJ)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1htlc_1minimum_1msat +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1htlc_1minimum_1msat (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_get_feerate_per_kw + * Method: CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight * Signature: (J)I */ -JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1feerate_1per_1kw +JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1commitment_1feerate_1sat_1per_11000_1weight (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_set_feerate_per_kw + * Method: CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight * Signature: (JI)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1feerate_1per_1kw +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1commitment_1feerate_1sat_1per_11000_1weight (JNIEnv *, jclass, jlong, jint); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_get_to_self_delay + * Method: CommonOpenChannelFields_get_to_self_delay * Signature: (J)S */ -JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1to_1self_1delay +JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1to_1self_1delay (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_set_to_self_delay + * Method: CommonOpenChannelFields_set_to_self_delay * Signature: (JS)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1to_1self_1delay +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1to_1self_1delay (JNIEnv *, jclass, jlong, jshort); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_get_max_accepted_htlcs + * Method: CommonOpenChannelFields_get_max_accepted_htlcs * Signature: (J)S */ -JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1max_1accepted_1htlcs +JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1max_1accepted_1htlcs (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_set_max_accepted_htlcs + * Method: CommonOpenChannelFields_set_max_accepted_htlcs * Signature: (JS)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1max_1accepted_1htlcs +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1max_1accepted_1htlcs (JNIEnv *, jclass, jlong, jshort); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_get_funding_pubkey + * Method: CommonOpenChannelFields_get_funding_pubkey * Signature: (J)[B */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1funding_1pubkey +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1funding_1pubkey (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_set_funding_pubkey + * Method: CommonOpenChannelFields_set_funding_pubkey * Signature: (J[B)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1funding_1pubkey +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1funding_1pubkey (JNIEnv *, jclass, jlong, jbyteArray); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_get_revocation_basepoint + * Method: CommonOpenChannelFields_get_revocation_basepoint * Signature: (J)[B */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1revocation_1basepoint +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1revocation_1basepoint (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_set_revocation_basepoint + * Method: CommonOpenChannelFields_set_revocation_basepoint * Signature: (J[B)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1revocation_1basepoint +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1revocation_1basepoint (JNIEnv *, jclass, jlong, jbyteArray); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_get_payment_point + * Method: CommonOpenChannelFields_get_payment_basepoint * Signature: (J)[B */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1payment_1point +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1payment_1basepoint (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_set_payment_point + * Method: CommonOpenChannelFields_set_payment_basepoint * Signature: (J[B)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1payment_1point +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1payment_1basepoint (JNIEnv *, jclass, jlong, jbyteArray); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_get_delayed_payment_basepoint + * Method: CommonOpenChannelFields_get_delayed_payment_basepoint * Signature: (J)[B */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1delayed_1payment_1basepoint +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1delayed_1payment_1basepoint (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_set_delayed_payment_basepoint + * Method: CommonOpenChannelFields_set_delayed_payment_basepoint * Signature: (J[B)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1delayed_1payment_1basepoint +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1delayed_1payment_1basepoint (JNIEnv *, jclass, jlong, jbyteArray); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_get_htlc_basepoint + * Method: CommonOpenChannelFields_get_htlc_basepoint * Signature: (J)[B */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1htlc_1basepoint +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1htlc_1basepoint (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_set_htlc_basepoint + * Method: CommonOpenChannelFields_set_htlc_basepoint * Signature: (J[B)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1htlc_1basepoint +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1htlc_1basepoint (JNIEnv *, jclass, jlong, jbyteArray); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_get_first_per_commitment_point + * Method: CommonOpenChannelFields_get_first_per_commitment_point * Signature: (J)[B */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1first_1per_1commitment_1point +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1first_1per_1commitment_1point (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_set_first_per_commitment_point + * Method: CommonOpenChannelFields_set_first_per_commitment_point * Signature: (J[B)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1first_1per_1commitment_1point +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1first_1per_1commitment_1point (JNIEnv *, jclass, jlong, jbyteArray); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_get_channel_flags + * Method: CommonOpenChannelFields_get_channel_flags * Signature: (J)B */ -JNIEXPORT jbyte JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1flags +JNIEXPORT jbyte JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1channel_1flags (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_set_channel_flags + * Method: CommonOpenChannelFields_set_channel_flags * Signature: (JB)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1flags +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1channel_1flags (JNIEnv *, jclass, jlong, jbyte); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_get_shutdown_scriptpubkey + * Method: CommonOpenChannelFields_get_shutdown_scriptpubkey * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1shutdown_1scriptpubkey +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1shutdown_1scriptpubkey (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_set_shutdown_scriptpubkey + * Method: CommonOpenChannelFields_set_shutdown_scriptpubkey * Signature: (JJ)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1shutdown_1scriptpubkey +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1shutdown_1scriptpubkey (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_get_channel_type + * Method: CommonOpenChannelFields_get_channel_type * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1type +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1channel_1type (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_set_channel_type + * Method: CommonOpenChannelFields_set_channel_type * Signature: (JJ)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1type +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1channel_1type (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_new - * Signature: ([B[BJJJJJJISS[B[B[B[B[B[BBJJ)J + * Method: CommonOpenChannelFields_new + * Signature: ([BJJJJJISS[B[B[B[B[B[BBJJ)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1new - (JNIEnv *, jclass, jbyteArray, jbyteArray, jlong, jlong, jlong, jlong, jlong, jlong, jint, jshort, jshort, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyte, jlong, jlong); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1new + (JNIEnv *, jclass, jbyteArray, jlong, jlong, jlong, jlong, jlong, jint, jshort, jshort, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyte, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_clone_ptr + * Method: CommonOpenChannelFields_clone_ptr * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1clone_1ptr +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1clone_1ptr (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_clone + * Method: CommonOpenChannelFields_clone * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1clone +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1clone (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_hash + * Method: CommonOpenChannelFields_hash * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1hash +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1hash (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannel_eq + * Method: CommonOpenChannelFields_eq * Signature: (JJ)Z */ -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OpenChannel_1eq +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1eq (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_free + * Method: OpenChannel_free * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1free +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1free (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_get_chain_hash - * Signature: (J)[B + * Method: OpenChannel_get_common_fields + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1chain_1hash +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1common_1fields (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_set_chain_hash - * Signature: (J[B)V + * Method: OpenChannel_set_common_fields + * Signature: (JJ)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1chain_1hash - (JNIEnv *, jclass, jlong, jbyteArray); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1common_1fields + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_get_temporary_channel_id - * Signature: (J)[B + * Method: OpenChannel_get_push_msat + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1temporary_1channel_1id +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1push_1msat (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_set_temporary_channel_id - * Signature: (J[B)V + * Method: OpenChannel_set_push_msat + * Signature: (JJ)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1temporary_1channel_1id - (JNIEnv *, jclass, jlong, jbyteArray); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1push_1msat + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_get_funding_feerate_sat_per_1000_weight - * Signature: (J)I + * Method: OpenChannel_get_channel_reserve_satoshis + * Signature: (J)J */ -JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1funding_1feerate_1sat_1per_11000_1weight +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1reserve_1satoshis (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_set_funding_feerate_sat_per_1000_weight - * Signature: (JI)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1funding_1feerate_1sat_1per_11000_1weight - (JNIEnv *, jclass, jlong, jint); - -/* - * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_get_commitment_feerate_sat_per_1000_weight - * Signature: (J)I + * Method: OpenChannel_set_channel_reserve_satoshis + * Signature: (JJ)V */ -JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1commitment_1feerate_1sat_1per_11000_1weight - (JNIEnv *, jclass, jlong); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1reserve_1satoshis + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_set_commitment_feerate_sat_per_1000_weight - * Signature: (JI)V + * Method: OpenChannel_new + * Signature: (JJJ)J */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1commitment_1feerate_1sat_1per_11000_1weight - (JNIEnv *, jclass, jlong, jint); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1new + (JNIEnv *, jclass, jlong, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_get_funding_satoshis + * Method: OpenChannel_clone_ptr * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1funding_1satoshis +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1clone_1ptr (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_set_funding_satoshis - * Signature: (JJ)V + * Method: OpenChannel_clone + * Signature: (J)J */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1funding_1satoshis - (JNIEnv *, jclass, jlong, jlong); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1clone + (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_get_dust_limit_satoshis + * Method: OpenChannel_hash * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1dust_1limit_1satoshis +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1hash (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_set_dust_limit_satoshis - * Signature: (JJ)V + * Method: OpenChannel_eq + * Signature: (JJ)Z */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1dust_1limit_1satoshis +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OpenChannel_1eq (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_get_max_htlc_value_in_flight_msat - * Signature: (J)J + * Method: OpenChannelV2_free + * Signature: (J)V */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1max_1htlc_1value_1in_1flight_1msat +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1free (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_set_max_htlc_value_in_flight_msat - * Signature: (JJ)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1max_1htlc_1value_1in_1flight_1msat - (JNIEnv *, jclass, jlong, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_get_htlc_minimum_msat + * Method: OpenChannelV2_get_common_fields * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1htlc_1minimum_1msat +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1common_1fields (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_set_htlc_minimum_msat + * Method: OpenChannelV2_set_common_fields * Signature: (JJ)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1htlc_1minimum_1msat +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1common_1fields (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_get_to_self_delay - * Signature: (J)S - */ -JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1to_1self_1delay - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_set_to_self_delay - * Signature: (JS)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1to_1self_1delay - (JNIEnv *, jclass, jlong, jshort); - -/* - * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_get_max_accepted_htlcs - * Signature: (J)S + * Method: OpenChannelV2_get_funding_feerate_sat_per_1000_weight + * Signature: (J)I */ -JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1max_1accepted_1htlcs +JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1funding_1feerate_1sat_1per_11000_1weight (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_set_max_accepted_htlcs - * Signature: (JS)V + * Method: OpenChannelV2_set_funding_feerate_sat_per_1000_weight + * Signature: (JI)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1max_1accepted_1htlcs - (JNIEnv *, jclass, jlong, jshort); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1funding_1feerate_1sat_1per_11000_1weight + (JNIEnv *, jclass, jlong, jint); /* * Class: org_ldk_impl_bindings @@ -26079,102 +28567,6 @@ JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1locktime JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1locktime (JNIEnv *, jclass, jlong, jint); -/* - * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_get_funding_pubkey - * Signature: (J)[B - */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1funding_1pubkey - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_set_funding_pubkey - * Signature: (J[B)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1funding_1pubkey - (JNIEnv *, jclass, jlong, jbyteArray); - -/* - * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_get_revocation_basepoint - * Signature: (J)[B - */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1revocation_1basepoint - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_set_revocation_basepoint - * Signature: (J[B)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1revocation_1basepoint - (JNIEnv *, jclass, jlong, jbyteArray); - -/* - * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_get_payment_basepoint - * Signature: (J)[B - */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1payment_1basepoint - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_set_payment_basepoint - * Signature: (J[B)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1payment_1basepoint - (JNIEnv *, jclass, jlong, jbyteArray); - -/* - * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_get_delayed_payment_basepoint - * Signature: (J)[B - */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1delayed_1payment_1basepoint - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_set_delayed_payment_basepoint - * Signature: (J[B)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1delayed_1payment_1basepoint - (JNIEnv *, jclass, jlong, jbyteArray); - -/* - * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_get_htlc_basepoint - * Signature: (J)[B - */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1htlc_1basepoint - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_set_htlc_basepoint - * Signature: (J[B)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1htlc_1basepoint - (JNIEnv *, jclass, jlong, jbyteArray); - -/* - * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_get_first_per_commitment_point - * Signature: (J)[B - */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1first_1per_1commitment_1point - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_set_first_per_commitment_point - * Signature: (J[B)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1first_1per_1commitment_1point - (JNIEnv *, jclass, jlong, jbyteArray); - /* * Class: org_ldk_impl_bindings * Method: OpenChannelV2_get_second_per_commitment_point @@ -26191,54 +28583,6 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1seco JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1second_1per_1commitment_1point (JNIEnv *, jclass, jlong, jbyteArray); -/* - * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_get_channel_flags - * Signature: (J)B - */ -JNIEXPORT jbyte JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1channel_1flags - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_set_channel_flags - * Signature: (JB)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1channel_1flags - (JNIEnv *, jclass, jlong, jbyte); - -/* - * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_get_shutdown_scriptpubkey - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1shutdown_1scriptpubkey - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_set_shutdown_scriptpubkey - * Signature: (JJ)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1shutdown_1scriptpubkey - (JNIEnv *, jclass, jlong, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_get_channel_type - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1channel_1type - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: OpenChannelV2_set_channel_type - * Signature: (JJ)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1channel_1type - (JNIEnv *, jclass, jlong, jlong); - /* * Class: org_ldk_impl_bindings * Method: OpenChannelV2_get_require_confirmed_inputs @@ -26258,10 +28602,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1require_1c /* * Class: org_ldk_impl_bindings * Method: OpenChannelV2_new - * Signature: ([B[BIIJJJJSSI[B[B[B[B[B[B[BBJJLorg/ldk/enums/COption_NoneZ;)J + * Signature: (JII[BLorg/ldk/enums/COption_NoneZ;)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1new - (JNIEnv *, jclass, jbyteArray, jbyteArray, jint, jint, jlong, jlong, jlong, jlong, jshort, jshort, jint, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyte, jlong, jlong, jobject); + (JNIEnv *, jclass, jlong, jint, jint, jbyteArray, jobject); /* * Class: org_ldk_impl_bindings @@ -26297,539 +28641,411 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1eq /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_free + * Method: CommonAcceptChannelFields_free * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1free +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1free (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_get_temporary_channel_id - * Signature: (J)[B - */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1temporary_1channel_1id - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: AcceptChannel_set_temporary_channel_id - * Signature: (J[B)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1temporary_1channel_1id - (JNIEnv *, jclass, jlong, jbyteArray); - -/* - * Class: org_ldk_impl_bindings - * Method: AcceptChannel_get_dust_limit_satoshis + * Method: CommonAcceptChannelFields_get_temporary_channel_id * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1dust_1limit_1satoshis +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1temporary_1channel_1id (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_set_dust_limit_satoshis + * Method: CommonAcceptChannelFields_set_temporary_channel_id * Signature: (JJ)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1dust_1limit_1satoshis +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1temporary_1channel_1id (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_get_max_htlc_value_in_flight_msat + * Method: CommonAcceptChannelFields_get_dust_limit_satoshis * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1max_1htlc_1value_1in_1flight_1msat +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1dust_1limit_1satoshis (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_set_max_htlc_value_in_flight_msat + * Method: CommonAcceptChannelFields_set_dust_limit_satoshis * Signature: (JJ)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1max_1htlc_1value_1in_1flight_1msat +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1dust_1limit_1satoshis (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_get_channel_reserve_satoshis + * Method: CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1channel_1reserve_1satoshis +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1max_1htlc_1value_1in_1flight_1msat (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_set_channel_reserve_satoshis + * Method: CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat * Signature: (JJ)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1reserve_1satoshis +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1max_1htlc_1value_1in_1flight_1msat (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_get_htlc_minimum_msat + * Method: CommonAcceptChannelFields_get_htlc_minimum_msat * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1htlc_1minimum_1msat +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1htlc_1minimum_1msat (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_set_htlc_minimum_msat + * Method: CommonAcceptChannelFields_set_htlc_minimum_msat * Signature: (JJ)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1htlc_1minimum_1msat +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1htlc_1minimum_1msat (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_get_minimum_depth + * Method: CommonAcceptChannelFields_get_minimum_depth * Signature: (J)I */ -JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1minimum_1depth +JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1minimum_1depth (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_set_minimum_depth + * Method: CommonAcceptChannelFields_set_minimum_depth * Signature: (JI)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1minimum_1depth +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1minimum_1depth (JNIEnv *, jclass, jlong, jint); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_get_to_self_delay + * Method: CommonAcceptChannelFields_get_to_self_delay * Signature: (J)S */ -JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1to_1self_1delay +JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1to_1self_1delay (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_set_to_self_delay + * Method: CommonAcceptChannelFields_set_to_self_delay * Signature: (JS)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1to_1self_1delay +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1to_1self_1delay (JNIEnv *, jclass, jlong, jshort); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_get_max_accepted_htlcs + * Method: CommonAcceptChannelFields_get_max_accepted_htlcs * Signature: (J)S */ -JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1max_1accepted_1htlcs +JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1max_1accepted_1htlcs (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_set_max_accepted_htlcs + * Method: CommonAcceptChannelFields_set_max_accepted_htlcs * Signature: (JS)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1max_1accepted_1htlcs +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1max_1accepted_1htlcs (JNIEnv *, jclass, jlong, jshort); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_get_funding_pubkey + * Method: CommonAcceptChannelFields_get_funding_pubkey * Signature: (J)[B */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1funding_1pubkey +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1funding_1pubkey (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_set_funding_pubkey + * Method: CommonAcceptChannelFields_set_funding_pubkey * Signature: (J[B)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1funding_1pubkey +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1funding_1pubkey (JNIEnv *, jclass, jlong, jbyteArray); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_get_revocation_basepoint + * Method: CommonAcceptChannelFields_get_revocation_basepoint * Signature: (J)[B */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1revocation_1basepoint +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1revocation_1basepoint (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_set_revocation_basepoint + * Method: CommonAcceptChannelFields_set_revocation_basepoint * Signature: (J[B)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1revocation_1basepoint +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1revocation_1basepoint (JNIEnv *, jclass, jlong, jbyteArray); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_get_payment_point + * Method: CommonAcceptChannelFields_get_payment_basepoint * Signature: (J)[B */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1payment_1point +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1payment_1basepoint (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_set_payment_point + * Method: CommonAcceptChannelFields_set_payment_basepoint * Signature: (J[B)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1payment_1point +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1payment_1basepoint (JNIEnv *, jclass, jlong, jbyteArray); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_get_delayed_payment_basepoint + * Method: CommonAcceptChannelFields_get_delayed_payment_basepoint * Signature: (J)[B */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1delayed_1payment_1basepoint +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1delayed_1payment_1basepoint (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_set_delayed_payment_basepoint + * Method: CommonAcceptChannelFields_set_delayed_payment_basepoint * Signature: (J[B)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1delayed_1payment_1basepoint +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1delayed_1payment_1basepoint (JNIEnv *, jclass, jlong, jbyteArray); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_get_htlc_basepoint + * Method: CommonAcceptChannelFields_get_htlc_basepoint * Signature: (J)[B */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1htlc_1basepoint +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1htlc_1basepoint (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_set_htlc_basepoint + * Method: CommonAcceptChannelFields_set_htlc_basepoint * Signature: (J[B)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1htlc_1basepoint +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1htlc_1basepoint (JNIEnv *, jclass, jlong, jbyteArray); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_get_first_per_commitment_point + * Method: CommonAcceptChannelFields_get_first_per_commitment_point * Signature: (J)[B */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1first_1per_1commitment_1point +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1first_1per_1commitment_1point (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_set_first_per_commitment_point + * Method: CommonAcceptChannelFields_set_first_per_commitment_point * Signature: (J[B)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1first_1per_1commitment_1point +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1first_1per_1commitment_1point (JNIEnv *, jclass, jlong, jbyteArray); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_get_shutdown_scriptpubkey + * Method: CommonAcceptChannelFields_get_shutdown_scriptpubkey * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1shutdown_1scriptpubkey +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1shutdown_1scriptpubkey (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_set_shutdown_scriptpubkey + * Method: CommonAcceptChannelFields_set_shutdown_scriptpubkey * Signature: (JJ)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1shutdown_1scriptpubkey +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1shutdown_1scriptpubkey (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_get_channel_type + * Method: CommonAcceptChannelFields_get_channel_type * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1channel_1type +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1channel_1type (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_set_channel_type + * Method: CommonAcceptChannelFields_set_channel_type * Signature: (JJ)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1type +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1channel_1type (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_new - * Signature: ([BJJJJISS[B[B[B[B[B[BJJ)J + * Method: CommonAcceptChannelFields_new + * Signature: (JJJJISS[B[B[B[B[B[BJJ)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1new - (JNIEnv *, jclass, jbyteArray, jlong, jlong, jlong, jlong, jint, jshort, jshort, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jlong, jlong); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1new + (JNIEnv *, jclass, jlong, jlong, jlong, jlong, jint, jshort, jshort, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_clone_ptr + * Method: CommonAcceptChannelFields_clone_ptr * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1clone_1ptr +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1clone_1ptr (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_clone + * Method: CommonAcceptChannelFields_clone * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1clone +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1clone (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_hash + * Method: CommonAcceptChannelFields_hash * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1hash +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1hash (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannel_eq + * Method: CommonAcceptChannelFields_eq * Signature: (JJ)Z */ -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1eq +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1eq (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannelV2_free + * Method: AcceptChannel_free * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1free - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: AcceptChannelV2_get_temporary_channel_id - * Signature: (J)[B - */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1temporary_1channel_1id +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1free (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannelV2_set_temporary_channel_id - * Signature: (J[B)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1temporary_1channel_1id - (JNIEnv *, jclass, jlong, jbyteArray); - -/* - * Class: org_ldk_impl_bindings - * Method: AcceptChannelV2_get_funding_satoshis + * Method: AcceptChannel_get_common_fields * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1funding_1satoshis +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1common_1fields (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannelV2_set_funding_satoshis + * Method: AcceptChannel_set_common_fields * Signature: (JJ)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1funding_1satoshis +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1common_1fields (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannelV2_get_dust_limit_satoshis + * Method: AcceptChannel_get_channel_reserve_satoshis * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1dust_1limit_1satoshis +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1channel_1reserve_1satoshis (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannelV2_set_dust_limit_satoshis + * Method: AcceptChannel_set_channel_reserve_satoshis * Signature: (JJ)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1dust_1limit_1satoshis +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1reserve_1satoshis (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannelV2_get_max_htlc_value_in_flight_msat - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1max_1htlc_1value_1in_1flight_1msat - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: AcceptChannelV2_set_max_htlc_value_in_flight_msat - * Signature: (JJ)V + * Method: AcceptChannel_new + * Signature: (JJ)J */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1max_1htlc_1value_1in_1flight_1msat +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1new (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannelV2_get_htlc_minimum_msat + * Method: AcceptChannel_clone_ptr * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1htlc_1minimum_1msat - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: AcceptChannelV2_set_htlc_minimum_msat - * Signature: (JJ)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1htlc_1minimum_1msat - (JNIEnv *, jclass, jlong, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: AcceptChannelV2_get_minimum_depth - * Signature: (J)I - */ -JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1minimum_1depth - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: AcceptChannelV2_set_minimum_depth - * Signature: (JI)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1minimum_1depth - (JNIEnv *, jclass, jlong, jint); - -/* - * Class: org_ldk_impl_bindings - * Method: AcceptChannelV2_get_to_self_delay - * Signature: (J)S - */ -JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1to_1self_1delay - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: AcceptChannelV2_set_to_self_delay - * Signature: (JS)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1to_1self_1delay - (JNIEnv *, jclass, jlong, jshort); - -/* - * Class: org_ldk_impl_bindings - * Method: AcceptChannelV2_get_max_accepted_htlcs - * Signature: (J)S - */ -JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1max_1accepted_1htlcs - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: AcceptChannelV2_set_max_accepted_htlcs - * Signature: (JS)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1max_1accepted_1htlcs - (JNIEnv *, jclass, jlong, jshort); - -/* - * Class: org_ldk_impl_bindings - * Method: AcceptChannelV2_get_funding_pubkey - * Signature: (J)[B - */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1funding_1pubkey +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1clone_1ptr (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannelV2_set_funding_pubkey - * Signature: (J[B)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1funding_1pubkey - (JNIEnv *, jclass, jlong, jbyteArray); - -/* - * Class: org_ldk_impl_bindings - * Method: AcceptChannelV2_get_revocation_basepoint - * Signature: (J)[B + * Method: AcceptChannel_clone + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1revocation_1basepoint +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1clone (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannelV2_set_revocation_basepoint - * Signature: (J[B)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1revocation_1basepoint - (JNIEnv *, jclass, jlong, jbyteArray); - -/* - * Class: org_ldk_impl_bindings - * Method: AcceptChannelV2_get_payment_basepoint - * Signature: (J)[B + * Method: AcceptChannel_hash + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1payment_1basepoint +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1hash (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannelV2_set_payment_basepoint - * Signature: (J[B)V + * Method: AcceptChannel_eq + * Signature: (JJ)Z */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1payment_1basepoint - (JNIEnv *, jclass, jlong, jbyteArray); +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1eq + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannelV2_get_delayed_payment_basepoint - * Signature: (J)[B + * Method: AcceptChannelV2_free + * Signature: (J)V */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1delayed_1payment_1basepoint +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1free (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannelV2_set_delayed_payment_basepoint - * Signature: (J[B)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1delayed_1payment_1basepoint - (JNIEnv *, jclass, jlong, jbyteArray); - -/* - * Class: org_ldk_impl_bindings - * Method: AcceptChannelV2_get_htlc_basepoint - * Signature: (J)[B + * Method: AcceptChannelV2_get_common_fields + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1htlc_1basepoint +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1common_1fields (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannelV2_set_htlc_basepoint - * Signature: (J[B)V + * Method: AcceptChannelV2_set_common_fields + * Signature: (JJ)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1htlc_1basepoint - (JNIEnv *, jclass, jlong, jbyteArray); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1common_1fields + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannelV2_get_first_per_commitment_point - * Signature: (J)[B + * Method: AcceptChannelV2_get_funding_satoshis + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1first_1per_1commitment_1point +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1funding_1satoshis (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: AcceptChannelV2_set_first_per_commitment_point - * Signature: (J[B)V + * Method: AcceptChannelV2_set_funding_satoshis + * Signature: (JJ)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1first_1per_1commitment_1point - (JNIEnv *, jclass, jlong, jbyteArray); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1funding_1satoshis + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -26847,38 +29063,6 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1se JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1second_1per_1commitment_1point (JNIEnv *, jclass, jlong, jbyteArray); -/* - * Class: org_ldk_impl_bindings - * Method: AcceptChannelV2_get_shutdown_scriptpubkey - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1shutdown_1scriptpubkey - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: AcceptChannelV2_set_shutdown_scriptpubkey - * Signature: (JJ)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1shutdown_1scriptpubkey - (JNIEnv *, jclass, jlong, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: AcceptChannelV2_get_channel_type - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1channel_1type - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: AcceptChannelV2_set_channel_type - * Signature: (JJ)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1channel_1type - (JNIEnv *, jclass, jlong, jlong); - /* * Class: org_ldk_impl_bindings * Method: AcceptChannelV2_get_require_confirmed_inputs @@ -26898,10 +29082,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1require_ /* * Class: org_ldk_impl_bindings * Method: AcceptChannelV2_new - * Signature: ([BJJJJISS[B[B[B[B[B[B[BJJLorg/ldk/enums/COption_NoneZ;)J + * Signature: (JJ[BLorg/ldk/enums/COption_NoneZ;)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1new - (JNIEnv *, jclass, jbyteArray, jlong, jlong, jlong, jlong, jint, jshort, jshort, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jlong, jlong, jobject); + (JNIEnv *, jclass, jlong, jlong, jbyteArray, jobject); /* * Class: org_ldk_impl_bindings @@ -26946,18 +29130,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1free /* * Class: org_ldk_impl_bindings * Method: FundingCreated_get_temporary_channel_id - * Signature: (J)[B + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1temporary_1channel_1id +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1temporary_1channel_1id (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings * Method: FundingCreated_set_temporary_channel_id - * Signature: (J[B)V + * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1temporary_1channel_1id - (JNIEnv *, jclass, jlong, jbyteArray); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -27010,10 +29194,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1signature /* * Class: org_ldk_impl_bindings * Method: FundingCreated_new - * Signature: ([B[BS[B)J + * Signature: (J[BS[B)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingCreated_1new - (JNIEnv *, jclass, jbyteArray, jbyteArray, jshort, jbyteArray); + (JNIEnv *, jclass, jlong, jbyteArray, jshort, jbyteArray); /* * Class: org_ldk_impl_bindings @@ -27058,18 +29242,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1free /* * Class: org_ldk_impl_bindings * Method: FundingSigned_get_channel_id - * Signature: (J)[B + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_FundingSigned_1get_1channel_1id +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingSigned_1get_1channel_1id (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings * Method: FundingSigned_set_channel_id - * Signature: (J[B)V + * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1set_1channel_1id - (JNIEnv *, jclass, jlong, jbyteArray); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -27090,10 +29274,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1set_1signature /* * Class: org_ldk_impl_bindings * Method: FundingSigned_new - * Signature: ([B[B)J + * Signature: (J[B)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingSigned_1new - (JNIEnv *, jclass, jbyteArray, jbyteArray); + (JNIEnv *, jclass, jlong, jbyteArray); /* * Class: org_ldk_impl_bindings @@ -27138,18 +29322,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReady_1free /* * Class: org_ldk_impl_bindings * Method: ChannelReady_get_channel_id - * Signature: (J)[B + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelReady_1get_1channel_1id +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReady_1get_1channel_1id (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings * Method: ChannelReady_set_channel_id - * Signature: (J[B)V + * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReady_1set_1channel_1id - (JNIEnv *, jclass, jlong, jbyteArray); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -27186,10 +29370,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReady_1set_1short_1chan /* * Class: org_ldk_impl_bindings * Method: ChannelReady_new - * Signature: ([B[BJ)J + * Signature: (J[BJ)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReady_1new - (JNIEnv *, jclass, jbyteArray, jbyteArray, jlong); + (JNIEnv *, jclass, jlong, jbyteArray, jlong); /* * Class: org_ldk_impl_bindings @@ -27234,18 +29418,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Stfu_1free /* * Class: org_ldk_impl_bindings * Method: Stfu_get_channel_id - * Signature: (J)[B + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Stfu_1get_1channel_1id +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Stfu_1get_1channel_1id (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings * Method: Stfu_set_channel_id - * Signature: (J[B)V + * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Stfu_1set_1channel_1id - (JNIEnv *, jclass, jlong, jbyteArray); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -27266,10 +29450,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Stfu_1set_1initiator /* * Class: org_ldk_impl_bindings * Method: Stfu_new - * Signature: ([BB)J + * Signature: (JB)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Stfu_1new - (JNIEnv *, jclass, jbyteArray, jbyte); + (JNIEnv *, jclass, jlong, jbyte); /* * Class: org_ldk_impl_bindings @@ -27306,18 +29490,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Splice_1free /* * Class: org_ldk_impl_bindings * Method: Splice_get_channel_id - * Signature: (J)[B + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Splice_1get_1channel_1id +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Splice_1get_1channel_1id (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings * Method: Splice_set_channel_id - * Signature: (J[B)V + * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Splice_1set_1channel_1id - (JNIEnv *, jclass, jlong, jbyteArray); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -27402,10 +29586,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Splice_1set_1funding_1pubkey /* * Class: org_ldk_impl_bindings * Method: Splice_new - * Signature: ([B[BJII[B)J + * Signature: (J[BJII[B)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Splice_1new - (JNIEnv *, jclass, jbyteArray, jbyteArray, jlong, jint, jint, jbyteArray); + (JNIEnv *, jclass, jlong, jbyteArray, jlong, jint, jint, jbyteArray); /* * Class: org_ldk_impl_bindings @@ -27442,18 +29626,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceAck_1free /* * Class: org_ldk_impl_bindings * Method: SpliceAck_get_channel_id - * Signature: (J)[B + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_SpliceAck_1get_1channel_1id +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SpliceAck_1get_1channel_1id (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings * Method: SpliceAck_set_channel_id - * Signature: (J[B)V + * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceAck_1set_1channel_1id - (JNIEnv *, jclass, jlong, jbyteArray); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -27506,10 +29690,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceAck_1set_1funding_1pubke /* * Class: org_ldk_impl_bindings * Method: SpliceAck_new - * Signature: ([B[BJ[B)J + * Signature: (J[BJ[B)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SpliceAck_1new - (JNIEnv *, jclass, jbyteArray, jbyteArray, jlong, jbyteArray); + (JNIEnv *, jclass, jlong, jbyteArray, jlong, jbyteArray); /* * Class: org_ldk_impl_bindings @@ -27546,26 +29730,26 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1free /* * Class: org_ldk_impl_bindings * Method: SpliceLocked_get_channel_id - * Signature: (J)[B + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1get_1channel_1id +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1get_1channel_1id (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings * Method: SpliceLocked_set_channel_id - * Signature: (J[B)V + * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1set_1channel_1id - (JNIEnv *, jclass, jlong, jbyteArray); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings * Method: SpliceLocked_new - * Signature: ([B)J + * Signature: (J)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1new - (JNIEnv *, jclass, jbyteArray); + (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings @@ -27602,18 +29786,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddInput_1free /* * Class: org_ldk_impl_bindings * Method: TxAddInput_get_channel_id - * Signature: (J)[B + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TxAddInput_1get_1channel_1id +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxAddInput_1get_1channel_1id (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings * Method: TxAddInput_set_channel_id - * Signature: (J[B)V + * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddInput_1set_1channel_1id - (JNIEnv *, jclass, jlong, jbyteArray); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -27682,10 +29866,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddInput_1set_1sequence /* * Class: org_ldk_impl_bindings * Method: TxAddInput_new - * Signature: ([BJJII)J + * Signature: (JJJII)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxAddInput_1new - (JNIEnv *, jclass, jbyteArray, jlong, jlong, jint, jint); + (JNIEnv *, jclass, jlong, jlong, jlong, jint, jint); /* * Class: org_ldk_impl_bindings @@ -27730,18 +29914,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1free /* * Class: org_ldk_impl_bindings * Method: TxAddOutput_get_channel_id - * Signature: (J)[B + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1get_1channel_1id +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1get_1channel_1id (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings * Method: TxAddOutput_set_channel_id - * Signature: (J[B)V + * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1set_1channel_1id - (JNIEnv *, jclass, jlong, jbyteArray); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -27794,10 +29978,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1set_1script /* * Class: org_ldk_impl_bindings * Method: TxAddOutput_new - * Signature: ([BJJ[B)J + * Signature: (JJJ[B)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1new - (JNIEnv *, jclass, jbyteArray, jlong, jlong, jbyteArray); + (JNIEnv *, jclass, jlong, jlong, jlong, jbyteArray); /* * Class: org_ldk_impl_bindings @@ -27842,18 +30026,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1free /* * Class: org_ldk_impl_bindings * Method: TxRemoveInput_get_channel_id - * Signature: (J)[B + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1get_1channel_1id +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1get_1channel_1id (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings * Method: TxRemoveInput_set_channel_id - * Signature: (J[B)V + * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1set_1channel_1id - (JNIEnv *, jclass, jlong, jbyteArray); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -27874,10 +30058,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1set_1serial_1id /* * Class: org_ldk_impl_bindings * Method: TxRemoveInput_new - * Signature: ([BJ)J + * Signature: (JJ)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1new - (JNIEnv *, jclass, jbyteArray, jlong); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -27922,18 +30106,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1free /* * Class: org_ldk_impl_bindings * Method: TxRemoveOutput_get_channel_id - * Signature: (J)[B + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1get_1channel_1id +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1get_1channel_1id (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings * Method: TxRemoveOutput_set_channel_id - * Signature: (J[B)V + * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1set_1channel_1id - (JNIEnv *, jclass, jlong, jbyteArray); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -27954,10 +30138,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1set_1serial_1i /* * Class: org_ldk_impl_bindings * Method: TxRemoveOutput_new - * Signature: ([BJ)J + * Signature: (JJ)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1new - (JNIEnv *, jclass, jbyteArray, jlong); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -28002,26 +30186,26 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxComplete_1free /* * Class: org_ldk_impl_bindings * Method: TxComplete_get_channel_id - * Signature: (J)[B + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TxComplete_1get_1channel_1id +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxComplete_1get_1channel_1id (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings * Method: TxComplete_set_channel_id - * Signature: (J[B)V + * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxComplete_1set_1channel_1id - (JNIEnv *, jclass, jlong, jbyteArray); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings * Method: TxComplete_new - * Signature: ([B)J + * Signature: (J)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxComplete_1new - (JNIEnv *, jclass, jbyteArray); + (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings @@ -28066,18 +30250,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1free /* * Class: org_ldk_impl_bindings * Method: TxSignatures_get_channel_id - * Signature: (J)[B + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TxSignatures_1get_1channel_1id +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxSignatures_1get_1channel_1id (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings * Method: TxSignatures_set_channel_id - * Signature: (J[B)V + * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1set_1channel_1id - (JNIEnv *, jclass, jlong, jbyteArray); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -28111,13 +30295,29 @@ JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_TxSignatures_1get_1wit JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1set_1witnesses (JNIEnv *, jclass, jlong, jobjectArray); +/* + * Class: org_ldk_impl_bindings + * Method: TxSignatures_get_funding_outpoint_sig + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxSignatures_1get_1funding_1outpoint_1sig + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: TxSignatures_set_funding_outpoint_sig + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1set_1funding_1outpoint_1sig + (JNIEnv *, jclass, jlong, jlong); + /* * Class: org_ldk_impl_bindings * Method: TxSignatures_new - * Signature: ([B[B[[B)J + * Signature: (J[B[[BJ)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxSignatures_1new - (JNIEnv *, jclass, jbyteArray, jbyteArray, jobjectArray); + (JNIEnv *, jclass, jlong, jbyteArray, jobjectArray, jlong); /* * Class: org_ldk_impl_bindings @@ -28162,18 +30362,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1free /* * Class: org_ldk_impl_bindings * Method: TxInitRbf_get_channel_id - * Signature: (J)[B + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1get_1channel_1id +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1get_1channel_1id (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings * Method: TxInitRbf_set_channel_id - * Signature: (J[B)V + * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1set_1channel_1id - (JNIEnv *, jclass, jlong, jbyteArray); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -28226,10 +30426,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1set_1funding_1outpu /* * Class: org_ldk_impl_bindings * Method: TxInitRbf_new - * Signature: ([BIIJ)J + * Signature: (JIIJ)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1new - (JNIEnv *, jclass, jbyteArray, jint, jint, jlong); + (JNIEnv *, jclass, jlong, jint, jint, jlong); /* * Class: org_ldk_impl_bindings @@ -28274,18 +30474,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1free /* * Class: org_ldk_impl_bindings * Method: TxAckRbf_get_channel_id - * Signature: (J)[B + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1get_1channel_1id +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1get_1channel_1id (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings * Method: TxAckRbf_set_channel_id - * Signature: (J[B)V + * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1set_1channel_1id - (JNIEnv *, jclass, jlong, jbyteArray); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -28306,10 +30506,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1set_1funding_1output /* * Class: org_ldk_impl_bindings * Method: TxAckRbf_new - * Signature: ([BJ)J + * Signature: (JJ)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1new - (JNIEnv *, jclass, jbyteArray, jlong); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -28354,18 +30554,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAbort_1free /* * Class: org_ldk_impl_bindings * Method: TxAbort_get_channel_id - * Signature: (J)[B + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TxAbort_1get_1channel_1id +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxAbort_1get_1channel_1id (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings * Method: TxAbort_set_channel_id - * Signature: (J[B)V + * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAbort_1set_1channel_1id - (JNIEnv *, jclass, jlong, jbyteArray); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -28386,10 +30586,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAbort_1set_1data /* * Class: org_ldk_impl_bindings * Method: TxAbort_new - * Signature: ([B[B)J + * Signature: (J[B)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxAbort_1new - (JNIEnv *, jclass, jbyteArray, jbyteArray); + (JNIEnv *, jclass, jlong, jbyteArray); /* * Class: org_ldk_impl_bindings @@ -28434,18 +30634,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1free /* * Class: org_ldk_impl_bindings * Method: Shutdown_get_channel_id - * Signature: (J)[B + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Shutdown_1get_1channel_1id +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Shutdown_1get_1channel_1id (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings * Method: Shutdown_set_channel_id - * Signature: (J[B)V + * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1set_1channel_1id - (JNIEnv *, jclass, jlong, jbyteArray); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -28466,10 +30666,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1set_1scriptpubkey /* * Class: org_ldk_impl_bindings * Method: Shutdown_new - * Signature: ([B[B)J + * Signature: (J[B)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Shutdown_1new - (JNIEnv *, jclass, jbyteArray, jbyteArray); + (JNIEnv *, jclass, jlong, jbyteArray); /* * Class: org_ldk_impl_bindings @@ -28594,18 +30794,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1free /* * Class: org_ldk_impl_bindings * Method: ClosingSigned_get_channel_id - * Signature: (J)[B + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1channel_1id +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1channel_1id (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings * Method: ClosingSigned_set_channel_id - * Signature: (J[B)V + * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1channel_1id - (JNIEnv *, jclass, jlong, jbyteArray); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -28658,10 +30858,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1fee_1range /* * Class: org_ldk_impl_bindings * Method: ClosingSigned_new - * Signature: ([BJ[BJ)J + * Signature: (JJ[BJ)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1new - (JNIEnv *, jclass, jbyteArray, jlong, jbyteArray, jlong); + (JNIEnv *, jclass, jlong, jlong, jbyteArray, jlong); /* * Class: org_ldk_impl_bindings @@ -28706,18 +30906,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1free /* * Class: org_ldk_impl_bindings * Method: UpdateAddHTLC_get_channel_id - * Signature: (J)[B + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1channel_1id +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1channel_1id (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings * Method: UpdateAddHTLC_set_channel_id - * Signature: (J[B)V + * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1channel_1id - (JNIEnv *, jclass, jlong, jbyteArray); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -28834,10 +31034,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1blinding_1 /* * Class: org_ldk_impl_bindings * Method: UpdateAddHTLC_new - * Signature: ([BJJ[BIJJ[B)J + * Signature: (JJJ[BIJJ[B)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1new - (JNIEnv *, jclass, jbyteArray, jlong, jlong, jbyteArray, jint, jlong, jlong, jbyteArray); + (JNIEnv *, jclass, jlong, jlong, jlong, jbyteArray, jint, jlong, jlong, jbyteArray); /* * Class: org_ldk_impl_bindings @@ -28962,18 +31162,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1free /* * Class: org_ldk_impl_bindings * Method: UpdateFulfillHTLC_get_channel_id - * Signature: (J)[B + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1channel_1id +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1channel_1id (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings * Method: UpdateFulfillHTLC_set_channel_id - * Signature: (J[B)V + * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1channel_1id - (JNIEnv *, jclass, jlong, jbyteArray); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -29010,10 +31210,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1paymen /* * Class: org_ldk_impl_bindings * Method: UpdateFulfillHTLC_new - * Signature: ([BJ[B)J + * Signature: (JJ[B)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1new - (JNIEnv *, jclass, jbyteArray, jlong, jbyteArray); + (JNIEnv *, jclass, jlong, jlong, jbyteArray); /* * Class: org_ldk_impl_bindings @@ -29058,18 +31258,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1free /* * Class: org_ldk_impl_bindings * Method: UpdateFailHTLC_get_channel_id - * Signature: (J)[B + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1get_1channel_1id +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1get_1channel_1id (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings * Method: UpdateFailHTLC_set_channel_id - * Signature: (J[B)V + * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1set_1channel_1id - (JNIEnv *, jclass, jlong, jbyteArray); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -29130,18 +31330,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1free /* * Class: org_ldk_impl_bindings * Method: UpdateFailMalformedHTLC_get_channel_id - * Signature: (J)[B + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1channel_1id +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1channel_1id (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings * Method: UpdateFailMalformedHTLC_set_channel_id - * Signature: (J[B)V + * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1set_1channel_1id - (JNIEnv *, jclass, jlong, jbyteArray); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -29218,18 +31418,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1free /* * Class: org_ldk_impl_bindings * Method: CommitmentSigned_get_channel_id - * Signature: (J)[B + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1channel_1id +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1channel_1id (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings * Method: CommitmentSigned_set_channel_id - * Signature: (J[B)V + * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1channel_1id - (JNIEnv *, jclass, jlong, jbyteArray); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -29266,10 +31466,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1htlc_1s /* * Class: org_ldk_impl_bindings * Method: CommitmentSigned_new - * Signature: ([B[B[[B)J + * Signature: (J[B[[B)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1new - (JNIEnv *, jclass, jbyteArray, jbyteArray, jobjectArray); + (JNIEnv *, jclass, jlong, jbyteArray, jobjectArray); /* * Class: org_ldk_impl_bindings @@ -29314,18 +31514,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1free /* * Class: org_ldk_impl_bindings * Method: RevokeAndACK_get_channel_id - * Signature: (J)[B + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1channel_1id +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1channel_1id (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings * Method: RevokeAndACK_set_channel_id - * Signature: (J[B)V + * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1channel_1id - (JNIEnv *, jclass, jlong, jbyteArray); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -29362,10 +31562,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1next_1per_1 /* * Class: org_ldk_impl_bindings * Method: RevokeAndACK_new - * Signature: ([B[B[B)J + * Signature: (J[B[B)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1new - (JNIEnv *, jclass, jbyteArray, jbyteArray, jbyteArray); + (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray); /* * Class: org_ldk_impl_bindings @@ -29410,18 +31610,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1free /* * Class: org_ldk_impl_bindings * Method: UpdateFee_get_channel_id - * Signature: (J)[B + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateFee_1get_1channel_1id +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFee_1get_1channel_1id (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings * Method: UpdateFee_set_channel_id - * Signature: (J[B)V + * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1set_1channel_1id - (JNIEnv *, jclass, jlong, jbyteArray); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -29442,10 +31642,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1set_1feerate_1per_1 /* * Class: org_ldk_impl_bindings * Method: UpdateFee_new - * Signature: ([BI)J + * Signature: (JI)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFee_1new - (JNIEnv *, jclass, jbyteArray, jint); + (JNIEnv *, jclass, jlong, jint); /* * Class: org_ldk_impl_bindings @@ -29490,18 +31690,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1free /* * Class: org_ldk_impl_bindings * Method: ChannelReestablish_get_channel_id - * Signature: (J)[B + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1channel_1id +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1channel_1id (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings * Method: ChannelReestablish_set_channel_id - * Signature: (J[B)V + * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1channel_1id - (JNIEnv *, jclass, jlong, jbyteArray); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -29586,10 +31786,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1next_ /* * Class: org_ldk_impl_bindings * Method: ChannelReestablish_new - * Signature: ([BJJ[B[BJ)J + * Signature: (JJJ[B[BJ)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1new - (JNIEnv *, jclass, jbyteArray, jlong, jlong, jbyteArray, jbyteArray, jlong); + (JNIEnv *, jclass, jlong, jlong, jlong, jbyteArray, jbyteArray, jlong); /* * Class: org_ldk_impl_bindings @@ -29634,18 +31834,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1free /* * Class: org_ldk_impl_bindings * Method: AnnouncementSignatures_get_channel_id - * Signature: (J)[B + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1channel_1id +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1channel_1id (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings * Method: AnnouncementSignatures_set_channel_id - * Signature: (J[B)V + * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1channel_1id - (JNIEnv *, jclass, jlong, jbyteArray); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -29698,10 +31898,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1b /* * Class: org_ldk_impl_bindings * Method: AnnouncementSignatures_new - * Signature: ([BJ[B[B)J + * Signature: (JJ[B[B)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1new - (JNIEnv *, jclass, jbyteArray, jlong, jbyteArray, jbyteArray); + (JNIEnv *, jclass, jlong, jlong, jbyteArray, jbyteArray); /* * Class: org_ldk_impl_bindings @@ -30071,6 +32271,46 @@ JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1addresses (JNIEnv *, jclass, jlong, jlongArray); +/* + * Class: org_ldk_impl_bindings + * Method: UnsignedNodeAnnouncement_get_excess_address_data + * Signature: (J)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1excess_1address_1data + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: UnsignedNodeAnnouncement_set_excess_address_data + * Signature: (J[B)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1excess_1address_1data + (JNIEnv *, jclass, jlong, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: UnsignedNodeAnnouncement_get_excess_data + * Signature: (J)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1excess_1data + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: UnsignedNodeAnnouncement_set_excess_data + * Signature: (J[B)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1excess_1data + (JNIEnv *, jclass, jlong, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: UnsignedNodeAnnouncement_new + * Signature: (JIJ[BJ[J[B[B)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1new + (JNIEnv *, jclass, jlong, jint, jlong, jbyteArray, jlong, jlongArray, jbyteArray, jbyteArray); + /* * Class: org_ldk_impl_bindings * Method: UnsignedNodeAnnouncement_clone_ptr @@ -31727,6 +33967,126 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OnionPacket_1hash JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OnionPacket_1eq (JNIEnv *, jclass, jlong, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: TrampolineOnionPacket_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: TrampolineOnionPacket_get_version + * Signature: (J)B + */ +JNIEXPORT jbyte JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1version + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: TrampolineOnionPacket_set_version + * Signature: (JB)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1version + (JNIEnv *, jclass, jlong, jbyte); + +/* + * Class: org_ldk_impl_bindings + * Method: TrampolineOnionPacket_get_public_key + * Signature: (J)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1public_1key + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: TrampolineOnionPacket_set_public_key + * Signature: (J[B)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1public_1key + (JNIEnv *, jclass, jlong, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: TrampolineOnionPacket_get_hop_data + * Signature: (J)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1hop_1data + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: TrampolineOnionPacket_set_hop_data + * Signature: (J[B)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1hop_1data + (JNIEnv *, jclass, jlong, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: TrampolineOnionPacket_get_hmac + * Signature: (J)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1hmac + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: TrampolineOnionPacket_set_hmac + * Signature: (J[B)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1hmac + (JNIEnv *, jclass, jlong, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: TrampolineOnionPacket_new + * Signature: (B[B[B[B)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1new + (JNIEnv *, jclass, jbyte, jbyteArray, jbyteArray, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: TrampolineOnionPacket_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: TrampolineOnionPacket_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: TrampolineOnionPacket_hash + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1hash + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: TrampolineOnionPacket_eq + * Signature: (JJ)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1eq + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: TrampolineOnionPacket_write + * Signature: (J)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1write + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: AcceptChannel_write @@ -32775,6 +35135,86 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1clone JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1free (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: PeerDetails_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: PeerDetails_get_counterparty_node_id + * Signature: (J)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1counterparty_1node_1id + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: PeerDetails_set_counterparty_node_id + * Signature: (J[B)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1counterparty_1node_1id + (JNIEnv *, jclass, jlong, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: PeerDetails_get_socket_address + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1socket_1address + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: PeerDetails_set_socket_address + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1socket_1address + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: PeerDetails_get_init_features + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1init_1features + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: PeerDetails_set_init_features + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1init_1features + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: PeerDetails_get_is_inbound_connection + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1is_1inbound_1connection + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: PeerDetails_set_is_inbound_connection + * Signature: (JZ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1is_1inbound_1connection + (JNIEnv *, jclass, jlong, jboolean); + +/* + * Class: org_ldk_impl_bindings + * Method: PeerDetails_new + * Signature: ([BJJZ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerDetails_1new + (JNIEnv *, jclass, jbyteArray, jlong, jlong, jboolean); + /* * Class: org_ldk_impl_bindings * Method: PeerHandleError_free @@ -32825,12 +35265,20 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerManager_1new /* * Class: org_ldk_impl_bindings - * Method: PeerManager_get_peer_node_ids + * Method: PeerManager_list_peers * Signature: (J)[J */ -JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_PeerManager_1get_1peer_1node_1ids +JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_PeerManager_1list_1peers (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: PeerManager_peer_by_node_id + * Signature: (J[B)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerManager_1peer_1by_1node_1id + (JNIEnv *, jclass, jlong, jbyteArray); + /* * Class: org_ldk_impl_bindings * Method: PeerManager_new_outbound_connection @@ -36887,6 +39335,102 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1supports_1ke JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1requires_1keysend (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: InitFeatures_set_trampoline_routing_optional + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InitFeatures_1set_1trampoline_1routing_1optional + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: InitFeatures_set_trampoline_routing_required + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InitFeatures_1set_1trampoline_1routing_1required + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: InitFeatures_supports_trampoline_routing + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InitFeatures_1supports_1trampoline_1routing + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: NodeFeatures_set_trampoline_routing_optional + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1set_1trampoline_1routing_1optional + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: NodeFeatures_set_trampoline_routing_required + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1set_1trampoline_1routing_1required + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: NodeFeatures_supports_trampoline_routing + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1supports_1trampoline_1routing + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: Bolt11InvoiceFeatures_set_trampoline_routing_optional + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1set_1trampoline_1routing_1optional + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: Bolt11InvoiceFeatures_set_trampoline_routing_required + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1set_1trampoline_1routing_1required + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: Bolt11InvoiceFeatures_supports_trampoline_routing + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1supports_1trampoline_1routing + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: InitFeatures_requires_trampoline_routing + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InitFeatures_1requires_1trampoline_1routing + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: NodeFeatures_requires_trampoline_routing + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1requires_1trampoline_1routing + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: Bolt11InvoiceFeatures_requires_trampoline_routing + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1requires_1trampoline_1routing + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: ShutdownScript_free @@ -37031,6 +39575,150 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ShutdownScript_1as_1lega JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ShutdownScript_1is_1compatible (JNIEnv *, jclass, jlong, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: ChannelId_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelId_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ChannelId_get_a + * Signature: (J)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelId_1get_1a + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ChannelId_set_a + * Signature: (J[B)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelId_1set_1a + (JNIEnv *, jclass, jlong, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: ChannelId_new + * Signature: ([B)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1new + (JNIEnv *, jclass, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: ChannelId_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ChannelId_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ChannelId_eq + * Signature: (JJ)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelId_1eq + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ChannelId_hash + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1hash + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ChannelId_v1_from_funding_txid + * Signature: ([BS)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1v1_1from_1funding_1txid + (JNIEnv *, jclass, jbyteArray, jshort); + +/* + * Class: org_ldk_impl_bindings + * Method: ChannelId_v1_from_funding_outpoint + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1v1_1from_1funding_1outpoint + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ChannelId_temporary_from_entropy_source + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1temporary_1from_1entropy_1source + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ChannelId_from_bytes + * Signature: ([B)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1from_1bytes + (JNIEnv *, jclass, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: ChannelId_new_zero + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1new_1zero + (JNIEnv *, jclass); + +/* + * Class: org_ldk_impl_bindings + * Method: ChannelId_is_zero + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelId_1is_1zero + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ChannelId_v2_from_revocation_basepoints + * Signature: (JJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1v2_1from_1revocation_1basepoints + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ChannelId_temporary_v2_from_revocation_basepoint + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1temporary_1v2_1from_1revocation_1basepoint + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ChannelId_write + * Signature: (J)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelId_1write + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ChannelId_read + * Signature: ([B)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1read + (JNIEnv *, jclass, jbyteArray); + /* * Class: org_ldk_impl_bindings * Method: Retry_free @@ -37407,6 +40095,278 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Type_1clone JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Type_1free (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: OfferId_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferId_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OfferId_get_a + * Signature: (J)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OfferId_1get_1a + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OfferId_set_a + * Signature: (J[B)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferId_1set_1a + (JNIEnv *, jclass, jlong, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: OfferId_new + * Signature: ([B)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferId_1new + (JNIEnv *, jclass, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: OfferId_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferId_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OfferId_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferId_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OfferId_eq + * Signature: (JJ)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OfferId_1eq + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OfferId_write + * Signature: (J)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OfferId_1write + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OfferId_read + * Signature: ([B)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferId_1read + (JNIEnv *, jclass, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: OfferWithExplicitMetadataBuilder_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OfferWithExplicitMetadataBuilder_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OfferWithExplicitMetadataBuilder_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OfferWithDerivedMetadataBuilder_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OfferWithDerivedMetadataBuilder_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OfferWithDerivedMetadataBuilder_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OfferWithExplicitMetadataBuilder_new + * Signature: ([B)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1new + (JNIEnv *, jclass, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: OfferWithExplicitMetadataBuilder_metadata + * Signature: (J[B)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1metadata + (JNIEnv *, jclass, jlong, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: OfferWithExplicitMetadataBuilder_chain + * Signature: (JLorg/ldk/enums/Network;)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1chain + (JNIEnv *, jclass, jlong, jobject); + +/* + * Class: org_ldk_impl_bindings + * Method: OfferWithExplicitMetadataBuilder_amount_msats + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1amount_1msats + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OfferWithExplicitMetadataBuilder_absolute_expiry + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1absolute_1expiry + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OfferWithExplicitMetadataBuilder_description + * Signature: (JLjava/lang/String;)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1description + (JNIEnv *, jclass, jlong, jstring); + +/* + * Class: org_ldk_impl_bindings + * Method: OfferWithExplicitMetadataBuilder_issuer + * Signature: (JLjava/lang/String;)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1issuer + (JNIEnv *, jclass, jlong, jstring); + +/* + * Class: org_ldk_impl_bindings + * Method: OfferWithExplicitMetadataBuilder_path + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1path + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OfferWithExplicitMetadataBuilder_supported_quantity + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1supported_1quantity + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OfferWithExplicitMetadataBuilder_build + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1build + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OfferWithDerivedMetadataBuilder_deriving_signing_pubkey + * Signature: ([BJJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1deriving_1signing_1pubkey + (JNIEnv *, jclass, jbyteArray, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OfferWithDerivedMetadataBuilder_chain + * Signature: (JLorg/ldk/enums/Network;)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1chain + (JNIEnv *, jclass, jlong, jobject); + +/* + * Class: org_ldk_impl_bindings + * Method: OfferWithDerivedMetadataBuilder_amount_msats + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1amount_1msats + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OfferWithDerivedMetadataBuilder_absolute_expiry + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1absolute_1expiry + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OfferWithDerivedMetadataBuilder_description + * Signature: (JLjava/lang/String;)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1description + (JNIEnv *, jclass, jlong, jstring); + +/* + * Class: org_ldk_impl_bindings + * Method: OfferWithDerivedMetadataBuilder_issuer + * Signature: (JLjava/lang/String;)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1issuer + (JNIEnv *, jclass, jlong, jstring); + +/* + * Class: org_ldk_impl_bindings + * Method: OfferWithDerivedMetadataBuilder_path + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1path + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OfferWithDerivedMetadataBuilder_supported_quantity + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1supported_1quantity + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OfferWithDerivedMetadataBuilder_build + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1build + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: Offer_free @@ -37511,6 +40471,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Offer_1supported_1quantity JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Offer_1signing_1pubkey (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: Offer_id + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Offer_1id + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: Offer_supports_chain @@ -37551,6 +40519,38 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Offer_1is_1valid_1quantity JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Offer_1expects_1quantity (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: Offer_request_invoice_deriving_payer_id + * Signature: (JJJ[B)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Offer_1request_1invoice_1deriving_1payer_1id + (JNIEnv *, jclass, jlong, jlong, jlong, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: Offer_request_invoice_deriving_metadata + * Signature: (J[BJJ[B)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Offer_1request_1invoice_1deriving_1metadata + (JNIEnv *, jclass, jlong, jbyteArray, jlong, jlong, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: Offer_request_invoice + * Signature: (J[B[B)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Offer_1request_1invoice + (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: Offer_hash + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Offer_1hash + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: Offer_write @@ -37583,6 +40583,22 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Amount_1clone_1ptr JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Amount_1clone (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: Amount_bitcoin + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Amount_1bitcoin + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: Amount_currency + * Signature: ([BJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Amount_1currency + (JNIEnv *, jclass, jbyteArray, jlong); + /* * Class: org_ldk_impl_bindings * Method: Quantity_free @@ -37607,6 +40623,30 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Quantity_1clone_1ptr JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Quantity_1clone (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: Quantity_bounded + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Quantity_1bounded + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: Quantity_unbounded + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Quantity_1unbounded + (JNIEnv *, jclass); + +/* + * Class: org_ldk_impl_bindings + * Method: Quantity_one + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Quantity_1one + (JNIEnv *, jclass); + /* * Class: org_ldk_impl_bindings * Method: Offer_from_str @@ -37615,6 +40655,118 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Quantity_1clone JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Offer_1from_1str (JNIEnv *, jclass, jstring); +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceWithExplicitSigningPubkeyBuilder_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceWithDerivedSigningPubkeyBuilder_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceWithExplicitSigningPubkeyBuilder_build + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1build + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry + * Signature: (JI)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1relative_1expiry + (JNIEnv *, jclass, jlong, jint); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh + * Signature: (J[B)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1fallback_1v0_1p2wsh + (JNIEnv *, jclass, jlong, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh + * Signature: (J[B)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1fallback_1v0_1p2wpkh + (JNIEnv *, jclass, jlong, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked + * Signature: (J[B)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1fallback_1v1_1p2tr_1tweaked + (JNIEnv *, jclass, jlong, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1allow_1mpp + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1build_1and_1sign + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry + * Signature: (JI)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1relative_1expiry + (JNIEnv *, jclass, jlong, jint); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh + * Signature: (J[B)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1fallback_1v0_1p2wsh + (JNIEnv *, jclass, jlong, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh + * Signature: (J[B)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1fallback_1v0_1p2wpkh + (JNIEnv *, jclass, jlong, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked + * Signature: (J[B)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1fallback_1v1_1p2tr_1tweaked + (JNIEnv *, jclass, jlong, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1allow_1mpp + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: UnsignedBolt12Invoice_free @@ -37623,6 +40775,30 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Offer_1from_1str JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1free (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: UnsignedBolt12Invoice_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: UnsignedBolt12Invoice_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: SignBolt12InvoiceFn_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignBolt12InvoiceFn_1free + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: UnsignedBolt12Invoice_tagged_hash @@ -38031,6 +41207,14 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Bolt12Invoice_1signable_ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12Invoice_1verify (JNIEnv *, jclass, jlong, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: Bolt12Invoice_hash + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12Invoice_1hash + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: UnsignedBolt12Invoice_write @@ -38359,6 +41543,102 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InvoiceError_1write JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceError_1read (JNIEnv *, jclass, jbyteArray); +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceRequestWithExplicitPayerIdBuilder_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceRequestWithDerivedPayerIdBuilder_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceRequestWithExplicitPayerIdBuilder_build + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1build + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceRequestWithExplicitPayerIdBuilder_chain + * Signature: (JLorg/ldk/enums/Network;)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1chain + (JNIEnv *, jclass, jlong, jobject); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceRequestWithExplicitPayerIdBuilder_amount_msats + * Signature: (JJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1amount_1msats + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceRequestWithExplicitPayerIdBuilder_quantity + * Signature: (JJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1quantity + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceRequestWithExplicitPayerIdBuilder_payer_note + * Signature: (JLjava/lang/String;)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1payer_1note + (JNIEnv *, jclass, jlong, jstring); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1build_1and_1sign + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceRequestWithDerivedPayerIdBuilder_chain + * Signature: (JLorg/ldk/enums/Network;)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1chain + (JNIEnv *, jclass, jlong, jobject); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceRequestWithDerivedPayerIdBuilder_amount_msats + * Signature: (JJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1amount_1msats + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceRequestWithDerivedPayerIdBuilder_quantity + * Signature: (JJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1quantity + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceRequestWithDerivedPayerIdBuilder_payer_note + * Signature: (JLjava/lang/String;)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1payer_1note + (JNIEnv *, jclass, jlong, jstring); + /* * Class: org_ldk_impl_bindings * Method: UnsignedInvoiceRequest_free @@ -38367,6 +41647,30 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceError_1read JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1free (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: UnsignedInvoiceRequest_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: UnsignedInvoiceRequest_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: SignInvoiceRequestFn_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignInvoiceRequestFn_1free + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: UnsignedInvoiceRequest_tagged_hash @@ -38407,6 +41711,22 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1clone JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1free (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: VerifiedInvoiceRequest_get_offer_id + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1get_1offer_1id + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: VerifiedInvoiceRequest_set_offer_id + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1set_1offer_1id + (JNIEnv *, jclass, jlong, jlong); + /* * Class: org_ldk_impl_bindings * Method: VerifiedInvoiceRequest_get_keys @@ -38713,11 +42033,19 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1payer_1note /* * Class: org_ldk_impl_bindings - * Method: InvoiceRequest_signature - * Signature: (J)[B + * Method: InvoiceRequest_respond_with + * Signature: (J[J[B)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1signature - (JNIEnv *, jclass, jlong); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1respond_1with + (JNIEnv *, jclass, jlong, jlongArray, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceRequest_respond_with_no_std + * Signature: (J[J[BJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1respond_1with_1no_1std + (JNIEnv *, jclass, jlong, jlongArray, jbyteArray, jlong); /* * Class: org_ldk_impl_bindings @@ -38727,6 +42055,14 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1signatur JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1verify (JNIEnv *, jclass, jlong, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceRequest_signature + * Signature: (J)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1signature + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: VerifiedInvoiceRequest_chains @@ -38863,6 +42199,38 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1payer_1note (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: VerifiedInvoiceRequest_respond_with + * Signature: (J[J[B)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1with + (JNIEnv *, jclass, jlong, jlongArray, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: VerifiedInvoiceRequest_respond_with_no_std + * Signature: (J[J[BJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1with_1no_1std + (JNIEnv *, jclass, jlong, jlongArray, jbyteArray, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: VerifiedInvoiceRequest_respond_using_derived_keys + * Signature: (J[J[B)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1using_1derived_1keys + (JNIEnv *, jclass, jlong, jlongArray, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: VerifiedInvoiceRequest_respond_using_derived_keys_no_std + * Signature: (J[J[BJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1using_1derived_1keys_1no_1std + (JNIEnv *, jclass, jlong, jlongArray, jbyteArray, jlong); + /* * Class: org_ldk_impl_bindings * Method: UnsignedInvoiceRequest_write @@ -38879,6 +42247,110 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1write (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceRequestFields_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceRequestFields_get_payer_id + * Signature: (J)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1get_1payer_1id + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceRequestFields_set_payer_id + * Signature: (J[B)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1set_1payer_1id + (JNIEnv *, jclass, jlong, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceRequestFields_get_quantity + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1get_1quantity + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceRequestFields_set_quantity + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1set_1quantity + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceRequestFields_get_payer_note_truncated + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1get_1payer_1note_1truncated + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceRequestFields_set_payer_note_truncated + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1set_1payer_1note_1truncated + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceRequestFields_new + * Signature: ([BJJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1new + (JNIEnv *, jclass, jbyteArray, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceRequestFields_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceRequestFields_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceRequestFields_eq + * Signature: (JJ)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1eq + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceRequestFields_write + * Signature: (J)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1write + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: InvoiceRequestFields_read + * Signature: ([B)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1read + (JNIEnv *, jclass, jbyteArray); + /* * Class: org_ldk_impl_bindings * Method: TaggedHash_free @@ -38927,6 +42399,46 @@ JNIEXPORT jstring JNICALL Java_org_ldk_impl_bindings_TaggedHash_1tag JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TaggedHash_1merkle_1root (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: SignError_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignError_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: SignError_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SignError_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: SignError_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SignError_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: SignError_signing + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SignError_1signing + (JNIEnv *, jclass); + +/* + * Class: org_ldk_impl_bindings + * Method: SignError_verification + * Signature: (Lorg/ldk/enums/Secp256k1Error;)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SignError_1verification + (JNIEnv *, jclass, jobject); + /* * Class: org_ldk_impl_bindings * Method: Bolt12ParseError_free @@ -39143,6 +42655,14 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_Bolt12SemanticError_1duplic JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_Bolt12SemanticError_1missing_1paths (JNIEnv *, jclass); +/* + * Class: org_ldk_impl_bindings + * Method: Bolt12SemanticError_unexpected_paths + * Signature: ()Lorg/ldk/enums/Bolt12SemanticError; + */ +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_Bolt12SemanticError_1unexpected_1paths + (JNIEnv *, jclass); + /* * Class: org_ldk_impl_bindings * Method: Bolt12SemanticError_invalid_pay_info @@ -39175,6 +42695,110 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_Bolt12SemanticError_1missin JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_Bolt12SemanticError_1missing_1signature (JNIEnv *, jclass); +/* + * Class: org_ldk_impl_bindings + * Method: RefundMaybeWithDerivedMetadataBuilder_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: RefundMaybeWithDerivedMetadataBuilder_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: RefundMaybeWithDerivedMetadataBuilder_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: RefundMaybeWithDerivedMetadataBuilder_new + * Signature: ([B[BJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1new + (JNIEnv *, jclass, jbyteArray, jbyteArray, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id + * Signature: ([BJJJ[B)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1deriving_1payer_1id + (JNIEnv *, jclass, jbyteArray, jlong, jlong, jlong, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: RefundMaybeWithDerivedMetadataBuilder_description + * Signature: (JLjava/lang/String;)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1description + (JNIEnv *, jclass, jlong, jstring); + +/* + * Class: org_ldk_impl_bindings + * Method: RefundMaybeWithDerivedMetadataBuilder_absolute_expiry + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1absolute_1expiry + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: RefundMaybeWithDerivedMetadataBuilder_issuer + * Signature: (JLjava/lang/String;)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1issuer + (JNIEnv *, jclass, jlong, jstring); + +/* + * Class: org_ldk_impl_bindings + * Method: RefundMaybeWithDerivedMetadataBuilder_path + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1path + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: RefundMaybeWithDerivedMetadataBuilder_chain + * Signature: (JLorg/ldk/enums/Network;)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1chain + (JNIEnv *, jclass, jlong, jobject); + +/* + * Class: org_ldk_impl_bindings + * Method: RefundMaybeWithDerivedMetadataBuilder_quantity + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1quantity + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: RefundMaybeWithDerivedMetadataBuilder_payer_note + * Signature: (JLjava/lang/String;)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1payer_1note + (JNIEnv *, jclass, jlong, jstring); + +/* + * Class: org_ldk_impl_bindings + * Method: RefundMaybeWithDerivedMetadataBuilder_build + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1build + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: Refund_free @@ -39303,6 +42927,14 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Refund_1payer_1id JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Refund_1payer_1note (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: Refund_hash + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Refund_1hash + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: Refund_write @@ -39471,6 +43103,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeId_1clone JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeId_1from_1pubkey (JNIEnv *, jclass, jbyteArray); +/* + * Class: org_ldk_impl_bindings + * Method: NodeId_from_slice + * Signature: ([B)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeId_1from_1slice + (JNIEnv *, jclass, jbyteArray); + /* * Class: org_ldk_impl_bindings * Method: NodeId_as_slice @@ -40055,6 +43695,22 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectedChannelInfo_1channel JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectedChannelInfo_1effective_1capacity (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: DirectedChannelInfo_source + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectedChannelInfo_1source + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: DirectedChannelInfo_target + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectedChannelInfo_1target + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: EffectiveCapacity_free @@ -40527,6 +44183,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeInfo_1clone JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeInfo_1eq (JNIEnv *, jclass, jlong, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: NodeInfo_is_tor_only + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeInfo_1is_1tor_1only + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: NodeInfo_write @@ -43047,13 +46711,29 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescripto JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1set_1channel_1value_1satoshis (JNIEnv *, jclass, jlong, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: DelayedPaymentOutputDescriptor_get_channel_transaction_parameters + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1get_1channel_1transaction_1parameters + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: DelayedPaymentOutputDescriptor_set_channel_transaction_parameters + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1set_1channel_1transaction_1parameters + (JNIEnv *, jclass, jlong, jlong); + /* * Class: org_ldk_impl_bindings * Method: DelayedPaymentOutputDescriptor_new - * Signature: (J[BSJJ[BJ)J + * Signature: (J[BSJJ[BJJ)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1new - (JNIEnv *, jclass, jlong, jbyteArray, jshort, jlong, jlong, jbyteArray, jlong); + (JNIEnv *, jclass, jlong, jbyteArray, jshort, jlong, jlong, jbyteArray, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -43479,6 +47159,22 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1get_1channel_ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1set_1channel_1derivation_1parameters (JNIEnv *, jclass, jlong, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: HTLCDescriptor_get_commitment_txid + * Signature: (J)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1get_1commitment_1txid + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: HTLCDescriptor_set_commitment_txid + * Signature: (J[B)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1set_1commitment_1txid + (JNIEnv *, jclass, jlong, jbyteArray); + /* * Class: org_ldk_impl_bindings * Method: HTLCDescriptor_get_per_commitment_number @@ -43575,6 +47271,14 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1get_1cou JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1set_1counterparty_1sig (JNIEnv *, jclass, jlong, jbyteArray); +/* + * Class: org_ldk_impl_bindings + * Method: HTLCDescriptor_new + * Signature: (J[BJ[BIJJ[B)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1new + (JNIEnv *, jclass, jlong, jbyteArray, jlong, jbyteArray, jint, jlong, jlong, jbyteArray); + /* * Class: org_ldk_impl_bindings * Method: HTLCDescriptor_clone_ptr @@ -43719,6 +47423,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_EntropySource_1free JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeSigner_1free (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: OutputSpender_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutputSpender_1free + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: SignerProvider_free @@ -43727,6 +47439,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeSigner_1free JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignerProvider_1free (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: ChangeDestinationSource_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChangeDestinationSource_1free + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: InMemorySigner_free @@ -44015,14 +47735,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysManager_1derive_1channel_ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysManager_1sign_1spendable_1outputs_1psbt (JNIEnv *, jclass, jlong, jlongArray, jbyteArray); -/* - * Class: org_ldk_impl_bindings - * Method: KeysManager_spend_spendable_outputs - * Signature: (J[J[J[BIJ)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysManager_1spend_1spendable_1outputs - (JNIEnv *, jclass, jlong, jlongArray, jlongArray, jbyteArray, jint, jlong); - /* * Class: org_ldk_impl_bindings * Method: KeysManager_as_EntropySource @@ -44039,6 +47751,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1EntropySourc JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1NodeSigner (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: KeysManager_as_OutputSpender + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1OutputSpender + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: KeysManager_as_SignerProvider @@ -44071,6 +47791,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1as_1Entro JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1as_1NodeSigner (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: PhantomKeysManager_as_OutputSpender + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1as_1OutputSpender + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: PhantomKeysManager_as_SignerProvider @@ -44087,14 +47815,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1as_1Signe JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1new (JNIEnv *, jclass, jbyteArray, jlong, jint, jbyteArray); -/* - * Class: org_ldk_impl_bindings - * Method: PhantomKeysManager_spend_spendable_outputs - * Signature: (J[J[J[BIJ)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1spend_1spendable_1outputs - (JNIEnv *, jclass, jlong, jlongArray, jlongArray, jbyteArray, jint, jlong); - /* * Class: org_ldk_impl_bindings * Method: PhantomKeysManager_derive_channel_keys @@ -44119,6 +47839,30 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1get_ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1get_1phantom_1node_1secret_1key (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: RandomBytes_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RandomBytes_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: RandomBytes_new + * Signature: ([B)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RandomBytes_1new + (JNIEnv *, jclass, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: RandomBytes_as_EntropySource + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RandomBytes_1as_1EntropySource + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: EcdsaChannelSigner_free @@ -44319,6 +48063,30 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Destination_1node JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Destination_1blinded_1path (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: Destination_hash + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Destination_1hash + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: Destination_eq + * Signature: (JJ)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Destination_1eq + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: Destination_resolve + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Destination_1resolve + (JNIEnv *, jclass, jlong, jlong); + /* * Class: org_ldk_impl_bindings * Method: SendSuccess_free @@ -44359,6 +48127,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SendSuccess_1buffered JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SendSuccess_1buffered_1awaiting_1connection (JNIEnv *, jclass, jbyteArray); +/* + * Class: org_ldk_impl_bindings + * Method: SendSuccess_hash + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SendSuccess_1hash + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: SendSuccess_eq @@ -44455,6 +48231,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SendError_1buffer_1full JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SendError_1get_1node_1id_1failed (JNIEnv *, jclass); +/* + * Class: org_ldk_impl_bindings + * Method: SendError_unresolved_introduction_node + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SendError_1unresolved_1introduction_1node + (JNIEnv *, jclass); + /* * Class: org_ldk_impl_bindings * Method: SendError_blinded_path_advance_failed @@ -44463,6 +48247,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SendError_1get_1node_1id_1fai JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SendError_1blinded_1path_1advance_1failed (JNIEnv *, jclass); +/* + * Class: org_ldk_impl_bindings + * Method: SendError_hash + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SendError_1hash + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: SendError_eq @@ -44506,10 +48298,10 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeeledOnion_1clone /* * Class: org_ldk_impl_bindings * Method: PeeledOnion_forward - * Signature: ([BJ)J + * Signature: (JJ)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeeledOnion_1forward - (JNIEnv *, jclass, jbyteArray, jlong); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -44519,13 +48311,21 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeeledOnion_1forward JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeeledOnion_1receive (JNIEnv *, jclass, jlong, jbyteArray, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: create_onion_message_resolving_destination + * Signature: (JJJJJJJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_create_1onion_1message_1resolving_1destination + (JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong, jlong, jlong); + /* * Class: org_ldk_impl_bindings * Method: create_onion_message - * Signature: (JJJJJ)J + * Signature: (JJJJJJ)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_create_1onion_1message - (JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong); + (JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -44538,10 +48338,10 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_peel_1onion_1message /* * Class: org_ldk_impl_bindings * Method: OnionMessenger_new - * Signature: (JJJJJJ)J + * Signature: (JJJJJJJ)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1new - (JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong, jlong); + (JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -44847,6 +48647,62 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OnionMessageContents_1clone JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OnionMessageContents_1free (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: NextMessageHop_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: NextMessageHop_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: NextMessageHop_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: NextMessageHop_node_id + * Signature: ([B)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1node_1id + (JNIEnv *, jclass, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: NextMessageHop_short_channel_id + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1short_1channel_1id + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: NextMessageHop_hash + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1hash + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: NextMessageHop_eq + * Signature: (JJ)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1eq + (JNIEnv *, jclass, jlong, jlong); + /* * Class: org_ldk_impl_bindings * Method: BlindedPath_free @@ -44857,19 +48713,19 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1free /* * Class: org_ldk_impl_bindings - * Method: BlindedPath_get_introduction_node_id - * Signature: (J)[B + * Method: BlindedPath_get_introduction_node + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_BlindedPath_1get_1introduction_1node_1id +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BlindedPath_1get_1introduction_1node (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: BlindedPath_set_introduction_node_id - * Signature: (J[B)V + * Method: BlindedPath_set_introduction_node + * Signature: (JJ)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1set_1introduction_1node_1id - (JNIEnv *, jclass, jlong, jbyteArray); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1set_1introduction_1node + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -44906,10 +48762,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1set_1blinded_1hop /* * Class: org_ldk_impl_bindings * Method: BlindedPath_new - * Signature: ([B[B[J)J + * Signature: (J[B[J)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new - (JNIEnv *, jclass, jbyteArray, jbyteArray, jlongArray); + (JNIEnv *, jclass, jlong, jbyteArray, jlongArray); /* * Class: org_ldk_impl_bindings @@ -44943,6 +48799,134 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BlindedPath_1hash JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_BlindedPath_1eq (JNIEnv *, jclass, jlong, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: IntroductionNode_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: IntroductionNode_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: IntroductionNode_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: IntroductionNode_node_id + * Signature: ([B)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1node_1id + (JNIEnv *, jclass, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: IntroductionNode_directed_short_channel_id + * Signature: (Lorg/ldk/enums/Direction;J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1directed_1short_1channel_1id + (JNIEnv *, jclass, jobject, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: IntroductionNode_hash + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1hash + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: IntroductionNode_eq + * Signature: (JJ)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1eq + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: Direction_clone + * Signature: (J)Lorg/ldk/enums/Direction; + */ +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_Direction_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: Direction_node_one + * Signature: ()Lorg/ldk/enums/Direction; + */ +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_Direction_1node_1one + (JNIEnv *, jclass); + +/* + * Class: org_ldk_impl_bindings + * Method: Direction_node_two + * Signature: ()Lorg/ldk/enums/Direction; + */ +JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_Direction_1node_1two + (JNIEnv *, jclass); + +/* + * Class: org_ldk_impl_bindings + * Method: Direction_hash + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Direction_1hash + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: Direction_eq + * Signature: (JJ)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Direction_1eq + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: NodeIdLookUp_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeIdLookUp_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: EmptyNodeIdLookUp_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_EmptyNodeIdLookUp_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: EmptyNodeIdLookUp_new + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_EmptyNodeIdLookUp_1new + (JNIEnv *, jclass); + +/* + * Class: org_ldk_impl_bindings + * Method: EmptyNodeIdLookUp_as_NodeIdLookUp + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_EmptyNodeIdLookUp_1as_1NodeIdLookUp + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: BlindedHop_free @@ -45042,18 +49026,26 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new_1for_1messag /* * Class: org_ldk_impl_bindings * Method: BlindedPath_one_hop_for_payment - * Signature: ([BJJ)J + * Signature: ([BJSJ)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BlindedPath_1one_1hop_1for_1payment - (JNIEnv *, jclass, jbyteArray, jlong, jlong); + (JNIEnv *, jclass, jbyteArray, jlong, jshort, jlong); /* * Class: org_ldk_impl_bindings * Method: BlindedPath_new_for_payment - * Signature: ([J[BJJJ)J + * Signature: ([J[BJJSJ)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new_1for_1payment - (JNIEnv *, jclass, jlongArray, jbyteArray, jlong, jlong, jlong); + (JNIEnv *, jclass, jlongArray, jbyteArray, jlong, jlong, jshort, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: BlindedPath_public_introduction_node_id + * Signature: (JJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BlindedPath_1public_1introduction_1node_1id + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -45303,13 +49295,29 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1get_1payment_1co JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1set_1payment_1constraints (JNIEnv *, jclass, jlong, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: ReceiveTlvs_get_payment_context + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1get_1payment_1context + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ReceiveTlvs_set_payment_context + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1set_1payment_1context + (JNIEnv *, jclass, jlong, jlong); + /* * Class: org_ldk_impl_bindings * Method: ReceiveTlvs_new - * Signature: ([BJ)J + * Signature: ([BJJ)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1new - (JNIEnv *, jclass, jbyteArray, jlong); + (JNIEnv *, jclass, jbyteArray, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -45471,6 +49479,206 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentConstraints_1clone_1pt JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentConstraints_1clone (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: PaymentContext_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PaymentContext_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: PaymentContext_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentContext_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: PaymentContext_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentContext_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: PaymentContext_unknown + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentContext_1unknown + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: PaymentContext_bolt12_offer + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentContext_1bolt12_1offer + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: PaymentContext_bolt12_refund + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentContext_1bolt12_1refund + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: PaymentContext_eq + * Signature: (JJ)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_PaymentContext_1eq + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: UnknownPaymentContext_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: UnknownPaymentContext_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: UnknownPaymentContext_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: UnknownPaymentContext_eq + * Signature: (JJ)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1eq + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: Bolt12OfferContext_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: Bolt12OfferContext_get_offer_id + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1get_1offer_1id + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: Bolt12OfferContext_set_offer_id + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1set_1offer_1id + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: Bolt12OfferContext_get_invoice_request + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1get_1invoice_1request + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: Bolt12OfferContext_set_invoice_request + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1set_1invoice_1request + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: Bolt12OfferContext_new + * Signature: (JJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1new + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: Bolt12OfferContext_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: Bolt12OfferContext_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: Bolt12OfferContext_eq + * Signature: (JJ)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1eq + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: Bolt12RefundContext_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: Bolt12RefundContext_new + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1new + (JNIEnv *, jclass); + +/* + * Class: org_ldk_impl_bindings + * Method: Bolt12RefundContext_clone_ptr + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1clone_1ptr + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: Bolt12RefundContext_clone + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: Bolt12RefundContext_eq + * Signature: (JJ)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1eq + (JNIEnv *, jclass, jlong, jlong); + /* * Class: org_ldk_impl_bindings * Method: ForwardTlvs_write @@ -45519,6 +49727,70 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_PaymentConstraints_1writ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentConstraints_1read (JNIEnv *, jclass, jbyteArray); +/* + * Class: org_ldk_impl_bindings + * Method: PaymentContext_write + * Signature: (J)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_PaymentContext_1write + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: PaymentContext_read + * Signature: ([B)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentContext_1read + (JNIEnv *, jclass, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: UnknownPaymentContext_write + * Signature: (J)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1write + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: UnknownPaymentContext_read + * Signature: ([B)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1read + (JNIEnv *, jclass, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: Bolt12OfferContext_write + * Signature: (J)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1write + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: Bolt12OfferContext_read + * Signature: ([B)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1read + (JNIEnv *, jclass, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: Bolt12RefundContext_write + * Signature: (J)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1write + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: Bolt12RefundContext_read + * Signature: ([B)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1read + (JNIEnv *, jclass, jbyteArray); + /* * Class: org_ldk_impl_bindings * Method: PaymentPurpose_free @@ -45545,12 +49817,28 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1clone /* * Class: org_ldk_impl_bindings - * Method: PaymentPurpose_invoice_payment + * Method: PaymentPurpose_bolt11_invoice_payment * Signature: (J[B)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1invoice_1payment +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1bolt11_1invoice_1payment (JNIEnv *, jclass, jlong, jbyteArray); +/* + * Class: org_ldk_impl_bindings + * Method: PaymentPurpose_bolt12_offer_payment + * Signature: (J[BJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1bolt12_1offer_1payment + (JNIEnv *, jclass, jlong, jbyteArray, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: PaymentPurpose_bolt12_refund_payment + * Signature: (J[BJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1bolt12_1refund_1payment + (JNIEnv *, jclass, jlong, jbyteArray, jlong); + /* * Class: org_ldk_impl_bindings * Method: PaymentPurpose_spontaneous_payment @@ -45602,18 +49890,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1free /* * Class: org_ldk_impl_bindings * Method: ClaimedHTLC_get_channel_id - * Signature: (J)[B + * Signature: (J)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1get_1channel_1id +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1get_1channel_1id (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings * Method: ClaimedHTLC_set_channel_id - * Signature: (J[B)V + * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1set_1channel_1id - (JNIEnv *, jclass, jlong, jbyteArray); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -45682,10 +49970,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1set_1counterparty /* * Class: org_ldk_impl_bindings * Method: ClaimedHTLC_new - * Signature: ([B[BIJJ)J + * Signature: (J[BIJJ)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1new - (JNIEnv *, jclass, jbyteArray, jbyteArray, jint, jlong, jlong); + (JNIEnv *, jclass, jlong, jbyteArray, jint, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -45833,10 +50121,26 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosureReason_1holder_1force_ /* * Class: org_ldk_impl_bindings - * Method: ClosureReason_cooperative_closure + * Method: ClosureReason_legacy_cooperative_closure * Signature: ()J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosureReason_1cooperative_1closure +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosureReason_1legacy_1cooperative_1closure + (JNIEnv *, jclass); + +/* + * Class: org_ldk_impl_bindings + * Method: ClosureReason_counterparty_initiated_cooperative_closure + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosureReason_1counterparty_1initiated_1cooperative_1closure + (JNIEnv *, jclass); + +/* + * Class: org_ldk_impl_bindings + * Method: ClosureReason_locally_initiated_cooperative_closure + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosureReason_1locally_1initiated_1cooperative_1closure (JNIEnv *, jclass); /* @@ -45895,6 +50199,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosureReason_1counterparty_1 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosureReason_1funding_1batch_1closure (JNIEnv *, jclass); +/* + * Class: org_ldk_impl_bindings + * Method: ClosureReason_htlcs_timed_out + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosureReason_1htlcs_1timed_1out + (JNIEnv *, jclass); + /* * Class: org_ldk_impl_bindings * Method: ClosureReason_eq @@ -45946,10 +50258,10 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1clone /* * Class: org_ldk_impl_bindings * Method: HTLCDestination_next_hop_channel - * Signature: ([B[B)J + * Signature: ([BJ)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1next_1hop_1channel - (JNIEnv *, jclass, jbyteArray, jbyteArray); + (JNIEnv *, jclass, jbyteArray, jlong); /* * Class: org_ldk_impl_bindings @@ -45967,6 +50279,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1unknown_1nex JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1invalid_1forward (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: HTLCDestination_invalid_onion + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1invalid_1onion + (JNIEnv *, jclass); + /* * Class: org_ldk_impl_bindings * Method: HTLCDestination_failed_payment @@ -46106,10 +50426,10 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Event_1clone /* * Class: org_ldk_impl_bindings * Method: Event_funding_generation_ready - * Signature: ([B[BJ[B[B)J + * Signature: (J[BJ[B[B)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Event_1funding_1generation_1ready - (JNIEnv *, jclass, jbyteArray, jbyteArray, jlong, jbyteArray, jbyteArray); + (JNIEnv *, jclass, jlong, jbyteArray, jlong, jbyteArray, jbyteArray); /* * Class: org_ldk_impl_bindings @@ -46218,58 +50538,58 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Event_1spendable_1outputs /* * Class: org_ldk_impl_bindings * Method: Event_payment_forwarded - * Signature: (JJJZJ)J + * Signature: (JJJJJJZJ)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Event_1payment_1forwarded - (JNIEnv *, jclass, jlong, jlong, jlong, jboolean, jlong); + (JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong, jlong, jboolean, jlong); /* * Class: org_ldk_impl_bindings * Method: Event_channel_pending - * Signature: ([B[BJ[BJ)J + * Signature: (J[BJ[BJJ)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Event_1channel_1pending - (JNIEnv *, jclass, jbyteArray, jbyteArray, jlong, jbyteArray, jlong); + (JNIEnv *, jclass, jlong, jbyteArray, jlong, jbyteArray, jlong, jlong); /* * Class: org_ldk_impl_bindings * Method: Event_channel_ready - * Signature: ([B[B[BJ)J + * Signature: (J[B[BJ)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Event_1channel_1ready - (JNIEnv *, jclass, jbyteArray, jbyteArray, jbyteArray, jlong); + (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray, jlong); /* * Class: org_ldk_impl_bindings * Method: Event_channel_closed - * Signature: ([B[BJ[BJJ)J + * Signature: (J[BJ[BJJ)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Event_1channel_1closed - (JNIEnv *, jclass, jbyteArray, jbyteArray, jlong, jbyteArray, jlong, jlong); + (JNIEnv *, jclass, jlong, jbyteArray, jlong, jbyteArray, jlong, jlong); /* * Class: org_ldk_impl_bindings * Method: Event_discard_funding - * Signature: ([B[B)J + * Signature: (J[B)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Event_1discard_1funding - (JNIEnv *, jclass, jbyteArray, jbyteArray); + (JNIEnv *, jclass, jlong, jbyteArray); /* * Class: org_ldk_impl_bindings * Method: Event_open_channel_request - * Signature: ([B[BJJJ)J + * Signature: (J[BJJJ)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Event_1open_1channel_1request - (JNIEnv *, jclass, jbyteArray, jbyteArray, jlong, jlong, jlong); + (JNIEnv *, jclass, jlong, jbyteArray, jlong, jlong, jlong); /* * Class: org_ldk_impl_bindings * Method: Event_htlchandling_failed - * Signature: ([BJ)J + * Signature: (JJ)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Event_1htlchandling_1failed - (JNIEnv *, jclass, jbyteArray, jlong); + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings @@ -46778,18 +51098,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1clone /* * Class: org_ldk_impl_bindings * Method: BumpTransactionEvent_channel_close - * Signature: ([BI[BJJ[J)J + * Signature: (J[B[BI[BJJ[J)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1channel_1close - (JNIEnv *, jclass, jbyteArray, jint, jbyteArray, jlong, jlong, jlongArray); + (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray, jint, jbyteArray, jlong, jlong, jlongArray); /* * Class: org_ldk_impl_bindings * Method: BumpTransactionEvent_htlcresolution - * Signature: ([BI[JI)J + * Signature: (J[B[BI[JI)J */ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1htlcresolution - (JNIEnv *, jclass, jbyteArray, jint, jlongArray, jint); + (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray, jint, jlongArray, jint); /* * Class: org_ldk_impl_bindings @@ -48503,6 +52823,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt11Invoice_1features JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Bolt11Invoice_1recover_1payee_1pub_1key (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: Bolt11Invoice_get_payee_pub_key + * Signature: (J)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Bolt11Invoice_1get_1payee_1pub_1key + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: Bolt11Invoice_expires_at diff --git a/src/main/jni/org_ldk_impl_bindings_LDKAmount.h b/src/main/jni/org_ldk_impl_bindings_LDKAmount.h new file mode 100644 index 00000000..fa3c2cda --- /dev/null +++ b/src/main/jni/org_ldk_impl_bindings_LDKAmount.h @@ -0,0 +1,21 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_ldk_impl_bindings_LDKAmount */ + +#ifndef _Included_org_ldk_impl_bindings_LDKAmount +#define _Included_org_ldk_impl_bindings_LDKAmount +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_ldk_impl_bindings_LDKAmount + * Method: init + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKAmount_init + (JNIEnv *, jclass); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/main/jni/org_ldk_impl_bindings_LDKCOption_AmountZ.h b/src/main/jni/org_ldk_impl_bindings_LDKCOption_AmountZ.h new file mode 100644 index 00000000..93b43637 --- /dev/null +++ b/src/main/jni/org_ldk_impl_bindings_LDKCOption_AmountZ.h @@ -0,0 +1,21 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_ldk_impl_bindings_LDKCOption_AmountZ */ + +#ifndef _Included_org_ldk_impl_bindings_LDKCOption_AmountZ +#define _Included_org_ldk_impl_bindings_LDKCOption_AmountZ +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_ldk_impl_bindings_LDKCOption_AmountZ + * Method: init + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1AmountZ_init + (JNIEnv *, jclass); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/main/jni/org_ldk_impl_bindings_LDKCOption_ECDSASignatureZ.h b/src/main/jni/org_ldk_impl_bindings_LDKCOption_ECDSASignatureZ.h new file mode 100644 index 00000000..c3978c8a --- /dev/null +++ b/src/main/jni/org_ldk_impl_bindings_LDKCOption_ECDSASignatureZ.h @@ -0,0 +1,21 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_ldk_impl_bindings_LDKCOption_ECDSASignatureZ */ + +#ifndef _Included_org_ldk_impl_bindings_LDKCOption_ECDSASignatureZ +#define _Included_org_ldk_impl_bindings_LDKCOption_ECDSASignatureZ +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_ldk_impl_bindings_LDKCOption_ECDSASignatureZ + * Method: init + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1ECDSASignatureZ_init + (JNIEnv *, jclass); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/main/jni/org_ldk_impl_bindings_LDKCOption_PaymentContextZ.h b/src/main/jni/org_ldk_impl_bindings_LDKCOption_PaymentContextZ.h new file mode 100644 index 00000000..8b999237 --- /dev/null +++ b/src/main/jni/org_ldk_impl_bindings_LDKCOption_PaymentContextZ.h @@ -0,0 +1,21 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_ldk_impl_bindings_LDKCOption_PaymentContextZ */ + +#ifndef _Included_org_ldk_impl_bindings_LDKCOption_PaymentContextZ +#define _Included_org_ldk_impl_bindings_LDKCOption_PaymentContextZ +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_ldk_impl_bindings_LDKCOption_PaymentContextZ + * Method: init + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1PaymentContextZ_init + (JNIEnv *, jclass); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/main/jni/org_ldk_impl_bindings_LDKCOption_QuantityZ.h b/src/main/jni/org_ldk_impl_bindings_LDKCOption_QuantityZ.h new file mode 100644 index 00000000..c4f5eb7b --- /dev/null +++ b/src/main/jni/org_ldk_impl_bindings_LDKCOption_QuantityZ.h @@ -0,0 +1,21 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_ldk_impl_bindings_LDKCOption_QuantityZ */ + +#ifndef _Included_org_ldk_impl_bindings_LDKCOption_QuantityZ +#define _Included_org_ldk_impl_bindings_LDKCOption_QuantityZ +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_ldk_impl_bindings_LDKCOption_QuantityZ + * Method: init + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1QuantityZ_init + (JNIEnv *, jclass); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/main/jni/org_ldk_impl_bindings_LDKIntroductionNode.h b/src/main/jni/org_ldk_impl_bindings_LDKIntroductionNode.h new file mode 100644 index 00000000..fa0df7e8 --- /dev/null +++ b/src/main/jni/org_ldk_impl_bindings_LDKIntroductionNode.h @@ -0,0 +1,21 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_ldk_impl_bindings_LDKIntroductionNode */ + +#ifndef _Included_org_ldk_impl_bindings_LDKIntroductionNode +#define _Included_org_ldk_impl_bindings_LDKIntroductionNode +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_ldk_impl_bindings_LDKIntroductionNode + * Method: init + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKIntroductionNode_init + (JNIEnv *, jclass); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/main/jni/org_ldk_impl_bindings_LDKNextMessageHop.h b/src/main/jni/org_ldk_impl_bindings_LDKNextMessageHop.h new file mode 100644 index 00000000..4f0659ad --- /dev/null +++ b/src/main/jni/org_ldk_impl_bindings_LDKNextMessageHop.h @@ -0,0 +1,21 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_ldk_impl_bindings_LDKNextMessageHop */ + +#ifndef _Included_org_ldk_impl_bindings_LDKNextMessageHop +#define _Included_org_ldk_impl_bindings_LDKNextMessageHop +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_ldk_impl_bindings_LDKNextMessageHop + * Method: init + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKNextMessageHop_init + (JNIEnv *, jclass); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/main/jni/org_ldk_impl_bindings_LDKOutputSpendStatus.h b/src/main/jni/org_ldk_impl_bindings_LDKOutputSpendStatus.h new file mode 100644 index 00000000..ad04e20f --- /dev/null +++ b/src/main/jni/org_ldk_impl_bindings_LDKOutputSpendStatus.h @@ -0,0 +1,21 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_ldk_impl_bindings_LDKOutputSpendStatus */ + +#ifndef _Included_org_ldk_impl_bindings_LDKOutputSpendStatus +#define _Included_org_ldk_impl_bindings_LDKOutputSpendStatus +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_ldk_impl_bindings_LDKOutputSpendStatus + * Method: init + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKOutputSpendStatus_init + (JNIEnv *, jclass); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/main/jni/org_ldk_impl_bindings_LDKPaymentContext.h b/src/main/jni/org_ldk_impl_bindings_LDKPaymentContext.h new file mode 100644 index 00000000..3c2ad12a --- /dev/null +++ b/src/main/jni/org_ldk_impl_bindings_LDKPaymentContext.h @@ -0,0 +1,21 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_ldk_impl_bindings_LDKPaymentContext */ + +#ifndef _Included_org_ldk_impl_bindings_LDKPaymentContext +#define _Included_org_ldk_impl_bindings_LDKPaymentContext +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_ldk_impl_bindings_LDKPaymentContext + * Method: init + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKPaymentContext_init + (JNIEnv *, jclass); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/main/jni/org_ldk_impl_bindings_LDKQuantity.h b/src/main/jni/org_ldk_impl_bindings_LDKQuantity.h new file mode 100644 index 00000000..441a7614 --- /dev/null +++ b/src/main/jni/org_ldk_impl_bindings_LDKQuantity.h @@ -0,0 +1,21 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_ldk_impl_bindings_LDKQuantity */ + +#ifndef _Included_org_ldk_impl_bindings_LDKQuantity +#define _Included_org_ldk_impl_bindings_LDKQuantity +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_ldk_impl_bindings_LDKQuantity + * Method: init + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKQuantity_init + (JNIEnv *, jclass); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/main/jni/org_ldk_impl_bindings_LDKSignError.h b/src/main/jni/org_ldk_impl_bindings_LDKSignError.h new file mode 100644 index 00000000..49c0a937 --- /dev/null +++ b/src/main/jni/org_ldk_impl_bindings_LDKSignError.h @@ -0,0 +1,21 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_ldk_impl_bindings_LDKSignError */ + +#ifndef _Included_org_ldk_impl_bindings_LDKSignError +#define _Included_org_ldk_impl_bindings_LDKSignError +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_ldk_impl_bindings_LDKSignError + * Method: init + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSignError_init + (JNIEnv *, jclass); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/main/jni/org_ldk_impl_bindings_LDKSpendingDelay.h b/src/main/jni/org_ldk_impl_bindings_LDKSpendingDelay.h new file mode 100644 index 00000000..048016d5 --- /dev/null +++ b/src/main/jni/org_ldk_impl_bindings_LDKSpendingDelay.h @@ -0,0 +1,21 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_ldk_impl_bindings_LDKSpendingDelay */ + +#ifndef _Included_org_ldk_impl_bindings_LDKSpendingDelay +#define _Included_org_ldk_impl_bindings_LDKSpendingDelay +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_ldk_impl_bindings_LDKSpendingDelay + * Method: init + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSpendingDelay_init + (JNIEnv *, jclass); + +#ifdef __cplusplus +} +#endif +#endif -- 2.30.2 From c4aec38795fb1d0d5cadaa055b4dfa7370cd75fd Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sun, 12 May 2024 19:49:18 +0000 Subject: [PATCH 08/16] [Java] Update CMC and Human peer test to LDK 0.0.123 --- .../batteries/ChannelManagerConstructor.java | 2 +- .../java/org/ldk/HumanObjectPeerTest.java | 53 ++++++++++--------- 2 files changed, 28 insertions(+), 27 deletions(-) diff --git a/src/main/java/org/ldk/batteries/ChannelManagerConstructor.java b/src/main/java/org/ldk/batteries/ChannelManagerConstructor.java index 2c96bd30..7c724013 100644 --- a/src/main/java/org/ldk/batteries/ChannelManagerConstructor.java +++ b/src/main/java/org/ldk/batteries/ChannelManagerConstructor.java @@ -314,7 +314,7 @@ public class ChannelManagerConstructor { routing_msg_handler = graph_msg_handler.as_RoutingMessageHandler(); else routing_msg_handler = ignoring_handler.as_RoutingMessageHandler(); - OnionMessenger messenger = OnionMessenger.of(this.entropy_source, this.node_signer, this.logger, this.router.get_message_router(), channel_manager.as_OffersMessageHandler(), IgnoringMessageHandler.of().as_CustomOnionMessageHandler()); + OnionMessenger messenger = OnionMessenger.of(this.entropy_source, this.node_signer, this.logger, this.channel_manager.as_NodeIdLookUp(), this.router.get_message_router(), channel_manager.as_OffersMessageHandler(), IgnoringMessageHandler.of().as_CustomOnionMessageHandler()); this.peer_manager = PeerManager.of(channel_manager.as_ChannelMessageHandler(), routing_msg_handler, messenger.as_OnionMessageHandler(), ignoring_handler.as_CustomMessageHandler(), (int)(System.currentTimeMillis() / 1000), diff --git a/src/test/java/org/ldk/HumanObjectPeerTest.java b/src/test/java/org/ldk/HumanObjectPeerTest.java index 5485f3e3..f61864cc 100644 --- a/src/test/java/org/ldk/HumanObjectPeerTest.java +++ b/src/test/java/org/ldk/HumanObjectPeerTest.java @@ -178,16 +178,16 @@ class HumanObjectPeerTestInstance { } @Override - public ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[] release_pending_monitor_events() { + public FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ[] release_pending_monitor_events() { synchronized (monitors) { assert monitors.size() <= 1; for (ChannelMonitor mon : monitors.values()) { - ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[] res = new ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[1]; - res[0] = ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.of(mon.get_funding_txo().get_a(), mon.get_and_clear_pending_monitor_events(), mon.get_counterparty_node_id()); + FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ[] res = new FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ[1]; + res[0] = FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.of(mon.get_funding_txo().get_a(), ChannelId.of(new byte[32]), mon.get_and_clear_pending_monitor_events(), mon.get_counterparty_node_id()); return res; } } - return new ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[0]; + return new FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ[0]; } }; Watch watch = Watch.new_impl(watch_impl); @@ -277,7 +277,7 @@ class HumanObjectPeerTestInstance { @Override public ChannelMonitorUpdateStatus persist_new_channel(OutPoint id, ChannelMonitor data, MonitorUpdateId update_id) { synchronized (monitors) { - String key = Arrays.toString(id.to_channel_id()); + String key = Arrays.toString(ChannelId.v1_from_funding_outpoint(id).get_a()); ChannelMonitor res = test_mon_roundtrip(id, data.write()); assert monitors.put(key, res) == null; } @@ -287,7 +287,7 @@ class HumanObjectPeerTestInstance { @Override public ChannelMonitorUpdateStatus update_persisted_channel(OutPoint id, ChannelMonitorUpdate update, ChannelMonitor data, MonitorUpdateId update_id) { synchronized (monitors) { - String key = Arrays.toString(id.to_channel_id()); + String key = Arrays.toString(ChannelId.v1_from_funding_outpoint(id).get_a()); ChannelMonitor res = test_mon_roundtrip(id, data.write()); // Note that we use a serialization-roundtrip copy of data here, not the original, as this can // expose the JVM JIT bug where it finalize()s things still being called. @@ -295,6 +295,11 @@ class HumanObjectPeerTestInstance { } return ChannelMonitorUpdateStatus.LDKChannelMonitorUpdateStatus_Completed; } + + @Override + public void archive_persisted_channel(OutPoint channel_funding_outpoint) { + assert false; + } }); filter_additions = new HashSet<>(); @@ -822,7 +827,7 @@ class HumanObjectPeerTestInstance { try { peer1.nio_peer_handler.connect(peer2.chan_manager.get_our_node_id(), new InetSocketAddress("127.0.0.1", peer2.nio_port), 100); } catch (IOException e) { assert false; } - while (peer1.peer_manager.get_peer_node_ids().length == 0 || peer2.peer_manager.get_peer_node_ids().length == 0) { + while (peer1.peer_manager.list_peers().length == 0 || peer2.peer_manager.list_peers().length == 0) { Thread.yield(); } } else { @@ -871,8 +876,8 @@ class HumanObjectPeerTestInstance { UInt128 user_id = new UInt128(new byte[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}); - Result_ThirtyTwoBytesAPIErrorZ cc_res = peer1.chan_manager.create_channel(peer2.node_id, 100000, 1000, user_id, Option_ThirtyTwoBytesZ.none(), null); - assert cc_res instanceof Result_ThirtyTwoBytesAPIErrorZ.Result_ThirtyTwoBytesAPIErrorZ_OK; + Result_ChannelIdAPIErrorZ cc_res = peer1.chan_manager.create_channel(peer2.node_id, 100000, 1000, user_id, null, null); + assert cc_res instanceof Result_ChannelIdAPIErrorZ.Result_ChannelIdAPIErrorZ_OK; // Previously, this was a SEGFAULT instead of get_funding_txo() returning null. ChannelDetails pre_funding_chan = peer1.chan_manager.list_channels()[0]; @@ -884,7 +889,7 @@ class HumanObjectPeerTestInstance { assert ((Event.FundingGenerationReady) events[0]).user_channel_id.equals(user_id); byte[] funding_spk = ((Event.FundingGenerationReady) events[0]).output_script; assert funding_spk.length == 34 && funding_spk[0] == 0 && funding_spk[1] == 32; // P2WSH - byte[] chan_id = ((Event.FundingGenerationReady) events[0]).temporary_channel_id; + ChannelId chan_id = ((Event.FundingGenerationReady) events[0]).temporary_channel_id; BitcoinNetworkParams bitcoinj_net = BitcoinNetworkParams.of(BitcoinNetwork.MAINNET); @@ -945,8 +950,8 @@ class HumanObjectPeerTestInstance { Option_u64Z short_chan_id = peer1_chans[0].get_short_channel_id(); assert short_chan_id instanceof Option_u64Z.Some; assert ((Option_u64Z.Some)short_chan_id).some == (1L << 40); // 0th output in the 0th transaction in the 1st block - assert Arrays.equals(peer1_chans[0].get_channel_id(), funding.getTxId().getReversedBytes()); - assert Arrays.equals(peer2_chans[0].get_channel_id(), funding.getTxId().getReversedBytes()); + assert Arrays.equals(peer1_chans[0].get_channel_id().get_a(), funding.getTxId().getReversedBytes()); + assert Arrays.equals(peer2_chans[0].get_channel_id().get_a(), funding.getTxId().getReversedBytes()); // Generate a random invoice description to exercise the string conversion logic a good bit String invoice_description; @@ -1101,17 +1106,17 @@ if (parsed_invoice instanceof Result_Bolt11InvoiceParseOrSemanticErrorZ.Result_B events = state.peer2.get_manager_events(1, state.peer1, state.peer2); assert events[0] instanceof Event.PaymentClaimable; - assert ((Event.PaymentClaimable)events[0]).purpose instanceof PaymentPurpose.InvoicePayment; - assert ((PaymentPurpose.InvoicePayment) ((Event.PaymentClaimable)events[0]).purpose).payment_preimage instanceof Option_ThirtyTwoBytesZ.Some; - byte[] payment_preimage = ((Option_ThirtyTwoBytesZ.Some) ((PaymentPurpose.InvoicePayment)((Event.PaymentClaimable)events[0]).purpose).payment_preimage).some; + assert ((Event.PaymentClaimable)events[0]).purpose instanceof PaymentPurpose.Bolt11InvoicePayment; + assert ((PaymentPurpose.Bolt11InvoicePayment) ((Event.PaymentClaimable)events[0]).purpose).payment_preimage instanceof Option_ThirtyTwoBytesZ.Some; + byte[] payment_preimage = ((Option_ThirtyTwoBytesZ.Some) ((PaymentPurpose.Bolt11InvoicePayment)((Event.PaymentClaimable)events[0]).purpose).payment_preimage).some; assert !Arrays.equals(payment_preimage, new byte[32]); state.peer2.chan_manager.claim_funds(payment_preimage); events = state.peer2.get_manager_events(1, state.peer1, state.peer2); assert events[0] instanceof Event.PaymentClaimed; - assert ((Event.PaymentClaimed)events[0]).purpose instanceof PaymentPurpose.InvoicePayment; - assert ((PaymentPurpose.InvoicePayment) ((Event.PaymentClaimed)events[0]).purpose).payment_preimage instanceof Option_ThirtyTwoBytesZ.Some; - payment_preimage = ((Option_ThirtyTwoBytesZ.Some)((PaymentPurpose.InvoicePayment)((Event.PaymentClaimed)events[0]).purpose).payment_preimage).some; + assert ((Event.PaymentClaimed)events[0]).purpose instanceof PaymentPurpose.Bolt11InvoicePayment; + assert ((PaymentPurpose.Bolt11InvoicePayment) ((Event.PaymentClaimed)events[0]).purpose).payment_preimage instanceof Option_ThirtyTwoBytesZ.Some; + payment_preimage = ((Option_ThirtyTwoBytesZ.Some)((PaymentPurpose.Bolt11InvoicePayment)((Event.PaymentClaimed)events[0]).purpose).payment_preimage).some; assert !Arrays.equals(payment_preimage, new byte[32]); events = state.peer1.get_manager_events(2, state.peer1, state.peer2); @@ -1202,15 +1207,11 @@ if (parsed_invoice instanceof Result_Bolt11InvoiceParseOrSemanticErrorZ.Result_B } Event[] broadcastable_event = state.peer2.get_monitor_events(1); - for (ChannelMonitor mon : state.peer2.monitors.values()) { - // This used to be buggy and double-free, so go ahead and fetch them! - byte[][] txn = mon.get_latest_holder_commitment_txn(state.peer2.logger); - } assert broadcastable_event.length == 1; assert broadcastable_event[0] instanceof Event.SpendableOutputs; if (state.peer2.explicit_keys_manager != null) { TxOut[] additional_outputs = new TxOut[]{new TxOut(420, new byte[]{0x42})}; - Result_TransactionNoneZ tx_res = state.peer2.explicit_keys_manager.spend_spendable_outputs(((Event.SpendableOutputs) broadcastable_event[0]).outputs, additional_outputs, new byte[]{0x00}, 253, Option_u32Z.none()); + Result_TransactionNoneZ tx_res = state.peer2.explicit_keys_manager.as_OutputSpender().spend_spendable_outputs(((Event.SpendableOutputs) broadcastable_event[0]).outputs, additional_outputs, new byte[]{0x00}, 253, Option_u32Z.none()); assert tx_res instanceof Result_TransactionNoneZ.Result_TransactionNoneZ_OK; Transaction built_tx = new Transaction(bitcoinj_net, ((Result_TransactionNoneZ.Result_TransactionNoneZ_OK) tx_res).res); assert built_tx.getOutputs().size() == 2; @@ -1219,7 +1220,7 @@ if (parsed_invoice instanceof Result_Bolt11InvoiceParseOrSemanticErrorZ.Result_B assert built_tx.getOutput(0).getValue().value == 420; } - while (state.peer1.peer_manager.get_peer_node_ids().length != 0 || state.peer2.peer_manager.get_peer_node_ids().length != 0) { + while (state.peer1.peer_manager.list_peers().length != 0 || state.peer2.peer_manager.list_peers().length != 0) { // LDK disconnects peers before sending an error message, so wait for disconnection. Thread.sleep(10); } @@ -1250,8 +1251,8 @@ if (parsed_invoice instanceof Result_Bolt11InvoiceParseOrSemanticErrorZ.Result_B if (use_nio_peer_handler) { state.peer1.peer_manager.disconnect_by_node_id(state.peer2.chan_manager.get_our_node_id()); - while (state.peer1.peer_manager.get_peer_node_ids().length != 0) Thread.yield(); - while (state.peer2.peer_manager.get_peer_node_ids().length != 0) Thread.yield(); + while (state.peer1.peer_manager.list_peers().length != 0) Thread.yield(); + while (state.peer2.peer_manager.list_peers().length != 0) Thread.yield(); state.peer1.nio_peer_handler.interrupt(); state.peer2.nio_peer_handler.interrupt(); } -- 2.30.2 From 2ad0c7ad6e86c8d43f3d5b77ba5248a6da08b834 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sun, 12 May 2024 20:49:35 +0000 Subject: [PATCH 09/16] [TS] Add one more method style for callback definitions --- ts/js-wasm.h | 1 + typescript_strings.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ts/js-wasm.h b/ts/js-wasm.h index 4e246f72..c3fb7cf4 100644 --- a/ts/js-wasm.h +++ b/ts/js-wasm.h @@ -51,5 +51,6 @@ DECL_IMPORT(u, u, b, u, u, u) DECL_IMPORT(u, u, b, b, u, u) DECL_IMPORT(u, u, b, u, b, u) DECL_IMPORT(u, b, u, b, u, u) +DECL_IMPORT(u, u, u, u, b, u) #endif diff --git a/typescript_strings.py b/typescript_strings.py index 0d8b223e..9704a48f 100644 --- a/typescript_strings.py +++ b/typescript_strings.py @@ -129,7 +129,7 @@ async function finishInitializeWasm(wasmInstance: WebAssembly.Instance) { } const fn_list = ["uuuuuu", "buuuuu", "bbuuuu", "bbbuuu", "bbbbuu", "bbbbbu", - "bbbbbb", "ubuubu", "ubuuuu", "ubbuuu", "uubuuu", "uubbuu", "uububu", "ububuu"]; + "bbbbbb", "ubuubu", "ubuuuu", "ubbuuu", "uubuuu", "uubbuu", "uububu", "ububuu", "uuuubu"]; /* @internal */ export async function initializeWasmFromUint8Array(wasmBinary: Uint8Array) { -- 2.30.2 From b4df222b34babe346b975c4be9afb02eefc687b9 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sun, 12 May 2024 20:48:54 +0000 Subject: [PATCH 10/16] [TS] Update auto-generated bindings to LDK 0.0.123 --- ts/bindings.c | 13233 ++++++++++++---- ts/bindings.c.body | 13233 ++++++++++++---- ts/bindings.mts | 9042 ++++++++--- ts/enums/Direction.mts | 1 + ts/enums/ShortChannelIdError.mts | 1 + ts/index.mts | 111 +- ts/structs/APIError.mts | 115 +- ts/structs/AcceptChannel.mts | 374 +- ts/structs/AcceptChannelV2.mts | 382 +- ts/structs/Amount.mts | 174 +- ts/structs/AnchorDescriptor.mts | 119 +- ts/structs/AnnouncementSignatures.mts | 132 +- ts/structs/Balance.mts | 113 +- ts/structs/Bech32Error.mts | 111 +- ts/structs/BestBlock.mts | 185 +- ts/structs/BigEndianScalar.mts | 111 +- ts/structs/BigSize.mts | 113 +- ts/structs/BlindedForward.mts | 113 +- ts/structs/BlindedHop.mts | 113 +- ts/structs/BlindedHopFeatures.mts | 115 +- ts/structs/BlindedPath.mts | 152 +- ts/structs/BlindedPathCandidate.mts | 111 +- ts/structs/BlindedPayInfo.mts | 117 +- ts/structs/BlindedTail.mts | 117 +- ts/structs/Bolt11Invoice.mts | 125 +- ts/structs/Bolt11InvoiceFeatures.mts | 145 +- ts/structs/Bolt11InvoiceSignature.mts | 113 +- ts/structs/Bolt11ParseError.mts | 113 +- ts/structs/Bolt12Invoice.mts | 133 +- ts/structs/Bolt12InvoiceFeatures.mts | 115 +- ts/structs/Bolt12OfferContext.mts | 777 + ts/structs/Bolt12ParseError.mts | 111 +- ts/structs/Bolt12RefundContext.mts | 729 + ts/structs/BroadcasterInterface.mts | 111 +- ts/structs/BuiltCommitmentTransaction.mts | 111 +- ts/structs/BumpTransactionEvent.mts | 153 +- ts/structs/BumpTransactionEventHandler.mts | 113 +- ts/structs/CandidateRouteHop.mts | 121 +- ts/structs/ChainMonitor.mts | 165 +- ts/structs/ChainParameters.mts | 115 +- ts/structs/ChangeDestinationSource.mts | 729 + ts/structs/ChannelAnnouncement.mts | 117 +- ts/structs/ChannelConfig.mts | 197 +- ts/structs/ChannelConfigUpdate.mts | 111 +- ts/structs/ChannelCounterparty.mts | 115 +- ts/structs/ChannelDerivationParameters.mts | 117 +- ts/structs/ChannelDetails.mts | 162 +- ts/structs/ChannelFeatures.mts | 115 +- ts/structs/ChannelHandshakeConfig.mts | 111 +- ts/structs/ChannelHandshakeLimits.mts | 111 +- ts/structs/ChannelId.mts | 839 + ts/structs/ChannelInfo.mts | 119 +- ts/structs/ChannelManager.mts | 986 +- ts/structs/ChannelManagerReadArgs.mts | 115 +- ts/structs/ChannelMessageHandler.mts | 229 +- ts/structs/ChannelMonitor.mts | 177 +- ts/structs/ChannelMonitorUpdate.mts | 141 +- ts/structs/ChannelPublicKeys.mts | 121 +- ts/structs/ChannelReady.mts | 132 +- ts/structs/ChannelReestablish.mts | 132 +- ts/structs/ChannelSigner.mts | 121 +- ts/structs/ChannelTransactionParameters.mts | 119 +- ts/structs/ChannelTypeFeatures.mts | 115 +- ts/structs/ChannelUpdate.mts | 117 +- ts/structs/ChannelUpdateInfo.mts | 117 +- ts/structs/ChannelUsage.mts | 111 +- ts/structs/ClaimedHTLC.mts | 132 +- ts/structs/ClosingSigned.mts | 132 +- ts/structs/ClosingSignedFeeRange.mts | 113 +- ts/structs/ClosingTransaction.mts | 117 +- ts/structs/ClosureReason.mts | 193 +- ts/structs/CoinSelection.mts | 115 +- ts/structs/CoinSelectionSource.mts | 117 +- ts/structs/CommitmentSigned.mts | 132 +- ts/structs/CommitmentTransaction.mts | 113 +- ts/structs/CommitmentUpdate.mts | 125 +- ts/structs/CommonAcceptChannelFields.mts | 986 ++ ts/structs/CommonBase.mts | 111 +- ts/structs/CommonOpenChannelFields.mts | 1036 ++ ts/structs/Confirm.mts | 113 +- ...unterpartyChannelTransactionParameters.mts | 117 +- ts/structs/CounterpartyCommitmentSecrets.mts | 111 +- ts/structs/CounterpartyForwardingInfo.mts | 111 +- ts/structs/CustomMessageHandler.mts | 119 +- ts/structs/CustomMessageReader.mts | 113 +- ts/structs/CustomOnionMessageHandler.mts | 117 +- ts/structs/DecodeError.mts | 131 +- ts/structs/DefaultMessageRouter.mts | 113 +- ts/structs/DefaultRouter.mts | 113 +- ts/structs/DelayedPaymentBasepoint.mts | 122 +- ts/structs/DelayedPaymentKey.mts | 115 +- ts/structs/DelayedPaymentOutputDescriptor.mts | 152 +- ts/structs/Description.mts | 113 +- ts/structs/Destination.mts | 140 +- ts/structs/DirectedChannelInfo.mts | 135 +- .../DirectedChannelTransactionParameters.mts | 111 +- ts/structs/EcdsaChannelSigner.mts | 227 +- ts/structs/EffectiveCapacity.mts | 111 +- ...tZPublicKeyZ.mts => EmptyNodeIdLookUp.mts} | 178 +- ts/structs/EntropySource.mts | 111 +- ts/structs/ErroneousField.mts | 111 +- ts/structs/ErrorAction.mts | 119 +- ts/structs/ErrorMessage.mts | 132 +- ts/structs/ErroringMessageHandler.mts | 111 +- ts/structs/Event.mts | 347 +- ts/structs/EventHandler.mts | 111 +- ts/structs/EventsProvider.mts | 111 +- ts/structs/ExpandedKey.mts | 111 +- ts/structs/ExpiryTime.mts | 113 +- ts/structs/FailureCode.mts | 111 +- ts/structs/Fallback.mts | 113 +- ts/structs/FeeEstimator.mts | 115 +- ts/structs/Filter.mts | 111 +- ts/structs/FinalOnionHopData.mts | 111 +- ts/structs/FirstHopCandidate.mts | 111 +- ts/structs/FixedPenaltyScorer.mts | 111 +- ts/structs/ForwardNode.mts | 115 +- ts/structs/ForwardTlvs.mts | 119 +- ...tChannelIdCVec_MonitorEventZPublicKeyZ.mts | 748 + ts/structs/FundingCreated.mts | 132 +- ts/structs/FundingSigned.mts | 132 +- ts/structs/Future.mts | 128 +- ts/structs/FutureCallback.mts | 111 +- ts/structs/GossipSync.mts | 115 +- ts/structs/GossipTimestampFilter.mts | 113 +- ts/structs/GraphSyncError.mts | 113 +- ts/structs/HTLCDescriptor.mts | 146 +- ts/structs/HTLCDestination.mts | 147 +- ts/structs/HTLCOutputInCommitment.mts | 113 +- ts/structs/HTLCUpdate.mts | 113 +- ts/structs/HolderCommitmentTransaction.mts | 113 +- ts/structs/Hostname.mts | 113 +- ts/structs/HtlcBasepoint.mts | 122 +- ts/structs/HtlcKey.mts | 115 +- ts/structs/IgnoringMessageHandler.mts | 111 +- ts/structs/InFlightHtlcs.mts | 117 +- ts/structs/InMemorySigner.mts | 115 +- ts/structs/InboundHTLCErr.mts | 145 +- ts/structs/Init.mts | 117 +- ts/structs/InitFeatures.mts | 145 +- ts/structs/Input.mts | 117 +- ts/structs/IntroductionNode.mts | 753 + ts/structs/InvalidShutdownScript.mts | 111 +- ts/structs/InvoiceError.mts | 115 +- ts/structs/InvoiceRequest.mts | 168 +- ts/structs/InvoiceRequestFeatures.mts | 115 +- ts/structs/InvoiceRequestFields.mts | 791 + ...nvoiceRequestWithDerivedPayerIdBuilder.mts | 734 + ...voiceRequestWithExplicitPayerIdBuilder.mts | 735 + ...InvoiceWithDerivedSigningPubkeyBuilder.mts | 739 + ...nvoiceWithExplicitSigningPubkeyBuilder.mts | 740 + ts/structs/KVStore.mts | 117 +- ts/structs/KeysManager.mts | 149 +- ts/structs/LightningError.mts | 111 +- ts/structs/Listen.mts | 111 +- ts/structs/LockableScore.mts | 111 +- ts/structs/LockedChannelMonitor.mts | 111 +- ts/structs/Logger.mts | 111 +- ts/structs/MaxDustHTLCExposure.mts | 115 +- ts/structs/MessageHandler.mts | 111 +- ts/structs/MessageRouter.mts | 115 +- ts/structs/MessageSendEvent.mts | 181 +- ts/structs/MessageSendEventsProvider.mts | 113 +- ts/structs/MinFinalCltvExpiryDelta.mts | 113 +- ts/structs/MonitorEvent.mts | 179 +- ts/structs/MonitorUpdateId.mts | 113 +- ts/structs/MonitorUpdatingPersister.mts | 111 +- ts/structs/MultiThreadedLockableScore.mts | 111 +- ts/structs/MultiThreadedScoreLockRead.mts | 111 +- ts/structs/MultiThreadedScoreLockWrite.mts | 111 +- ts/structs/NetworkGraph.mts | 131 +- ts/structs/NetworkUpdate.mts | 115 +- ts/structs/NextMessageHop.mts | 753 + ts/structs/NodeAlias.mts | 113 +- ts/structs/NodeAnnouncement.mts | 117 +- ts/structs/NodeAnnouncementInfo.mts | 119 +- ts/structs/NodeFeatures.mts | 145 +- ts/structs/NodeId.mts | 120 +- ts/structs/NodeIdLookUp.mts | 737 + ts/structs/NodeInfo.mts | 121 +- ts/structs/NodeSigner.mts | 127 +- ts/structs/Offer.mts | 203 +- ts/structs/OfferFeatures.mts | 115 +- ts/structs/OfferId.mts | 737 + .../OfferWithDerivedMetadataBuilder.mts | 795 + .../OfferWithExplicitMetadataBuilder.mts | 805 + ts/structs/OffersMessage.mts | 117 +- ts/structs/OffersMessageHandler.mts | 115 +- ts/structs/OneHopBlindedPathCandidate.mts | 111 +- ts/structs/OnionMessage.mts | 117 +- ts/structs/OnionMessageContents.mts | 111 +- ts/structs/OnionMessageHandler.mts | 123 +- ts/structs/OnionMessagePath.mts | 113 +- ts/structs/OnionMessenger.mts | 123 +- ts/structs/OnionPacket.mts | 115 +- ts/structs/OpenChannel.mts | 422 +- ts/structs/OpenChannelV2.mts | 424 +- ts/structs/Option_APIErrorZ.mts | 111 +- ts/structs/Option_AmountZ.mts | 735 + ts/structs/Option_BigEndianScalarZ.mts | 116 +- ...n_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mts | 113 +- ts/structs/Option_C2Tuple_u64u16ZZ.mts | 113 +- ts/structs/Option_C2Tuple_u64u64ZZ.mts | 113 +- ...nouncementChannelUpdateChannelUpdateZZ.mts | 113 +- ts/structs/Option_CVec_SocketAddressZZ.mts | 111 +- ts/structs/Option_CVec_ThirtyTwoBytesZZ.mts | 111 +- ts/structs/Option_CVec_u8ZZ.mts | 111 +- ts/structs/Option_ChannelShutdownStateZ.mts | 111 +- ts/structs/Option_ClosureReasonZ.mts | 111 +- ts/structs/Option_ECDSASignatureZ.mts | 733 + ts/structs/Option_EventZ.mts | 111 +- ts/structs/Option_FilterZ.mts | 109 +- ts/structs/Option_HTLCClaimZ.mts | 111 +- ts/structs/Option_HTLCDestinationZ.mts | 111 +- ts/structs/Option_MaxDustHTLCExposureZ.mts | 111 +- ts/structs/Option_MonitorEventZ.mts | 111 +- ts/structs/Option_NetworkUpdateZ.mts | 111 +- ts/structs/Option_OffersMessageZ.mts | 111 +- ts/structs/Option_OnionMessageContentsZ.mts | 111 +- ts/structs/Option_PathFailureZ.mts | 111 +- ts/structs/Option_PaymentContextZ.mts | 735 + ts/structs/Option_PaymentFailureReasonZ.mts | 111 +- ts/structs/Option_QuantityZ.mts | 735 + ts/structs/Option_SecretKeyZ.mts | 111 +- ts/structs/Option_SocketAddressZ.mts | 111 +- ts/structs/Option_StrZ.mts | 111 +- ts/structs/Option_ThirtyTwoBytesZ.mts | 111 +- ts/structs/Option_TxOutZ.mts | 111 +- ts/structs/Option_TypeZ.mts | 111 +- ts/structs/Option_U128Z.mts | 111 +- ts/structs/Option_UtxoLookupZ.mts | 111 +- ts/structs/Option_boolZ.mts | 111 +- ts/structs/Option_f64Z.mts | 111 +- ts/structs/Option_i64Z.mts | 111 +- ts/structs/Option_u16Z.mts | 111 +- ts/structs/Option_u32Z.mts | 111 +- ts/structs/Option_u64Z.mts | 111 +- ts/structs/Option_usizeZ.mts | 111 +- ts/structs/OutPoint.mts | 122 +- ts/structs/OutputSpendStatus.mts | 832 + ts/structs/OutputSpender.mts | 765 + ts/structs/OutputSweeper.mts | 801 + ts/structs/P2PGossipSync.mts | 113 +- ts/structs/Packet.mts | 113 +- ts/structs/ParseOrSemanticError.mts | 113 +- ts/structs/ParsedOnionMessageContents.mts | 111 +- ts/structs/Path.mts | 117 +- ts/structs/PathFailure.mts | 113 +- ts/structs/Payee.mts | 117 +- ts/structs/PayeePubKey.mts | 113 +- ts/structs/PaymentConstraints.mts | 111 +- ts/structs/PaymentContext.mts | 795 + ts/structs/PaymentParameters.mts | 117 +- ts/structs/PaymentPurpose.mts | 242 +- ts/structs/PaymentRelay.mts | 111 +- ts/structs/PaymentSendFailure.mts | 117 +- ts/structs/PeeledOnion.mts | 127 +- ts/structs/PeerDetails.mts | 770 + ts/structs/PeerHandleError.mts | 111 +- ts/structs/PeerManager.mts | 157 +- ts/structs/PendingHTLCInfo.mts | 111 +- ts/structs/PendingHTLCRouting.mts | 138 +- ts/structs/Persist.mts | 165 +- ts/structs/Persister.mts | 127 +- ts/structs/PhantomKeysManager.mts | 133 +- ts/structs/PhantomRouteHints.mts | 115 +- ts/structs/Ping.mts | 113 +- ts/structs/Pong.mts | 113 +- ts/structs/PositiveTimestamp.mts | 113 +- ts/structs/PrintableString.mts | 111 +- ts/structs/PrivateHopCandidate.mts | 111 +- ts/structs/PrivateRoute.mts | 115 +- ts/structs/ProbabilisticScorer.mts | 121 +- .../ProbabilisticScoringDecayParameters.mts | 111 +- .../ProbabilisticScoringFeeParameters.mts | 121 +- ts/structs/ProbeSendFailure.mts | 113 +- ts/structs/PublicHopCandidate.mts | 111 +- ts/structs/Quantity.mts | 177 +- ts/structs/QueryChannelRange.mts | 113 +- ts/structs/QueryShortChannelIds.mts | 113 +- ...on_SocketAddressZZ.mts => RandomBytes.mts} | 160 +- ts/structs/RapidGossipSync.mts | 113 +- ts/structs/RawBolt11Invoice.mts | 118 +- ts/structs/RawDataPart.mts | 115 +- ts/structs/ReadOnlyNetworkGraph.mts | 113 +- ts/structs/ReceiveTlvs.mts | 136 +- ts/structs/RecentPaymentDetails.mts | 111 +- ts/structs/RecipientOnionFields.mts | 115 +- ts/structs/Record.mts | 128 +- ts/structs/Refund.mts | 117 +- .../RefundMaybeWithDerivedMetadataBuilder.mts | 819 + ts/structs/ReplyChannelRange.mts | 113 +- ts/structs/ReplyShortChannelIdsEnd.mts | 113 +- .../Result_AcceptChannelDecodeErrorZ.mts | 113 +- .../Result_AcceptChannelV2DecodeErrorZ.mts | 113 +- ...ult_AnnouncementSignaturesDecodeErrorZ.mts | 113 +- ts/structs/Result_BestBlockDecodeErrorZ.mts | 744 + ts/structs/Result_BigSizeDecodeErrorZ.mts | 113 +- .../Result_BlindedFailureDecodeErrorZ.mts | 111 +- .../Result_BlindedForwardDecodeErrorZ.mts | 113 +- ts/structs/Result_BlindedHopDecodeErrorZ.mts | 113 +- .../Result_BlindedHopFeaturesDecodeErrorZ.mts | 113 +- ts/structs/Result_BlindedPathDecodeErrorZ.mts | 113 +- ts/structs/Result_BlindedPathNoneZ.mts | 113 +- .../Result_BlindedPayInfoDecodeErrorZ.mts | 113 +- ts/structs/Result_BlindedTailDecodeErrorZ.mts | 113 +- ...sult_Bolt11InvoiceBolt11SemanticErrorZ.mts | 113 +- ...sult_Bolt11InvoiceFeaturesDecodeErrorZ.mts | 113 +- ...ult_Bolt11InvoiceParseOrSemanticErrorZ.mts | 113 +- ...sult_Bolt11InvoiceSignOrCreationErrorZ.mts | 113 +- ...sult_Bolt12InvoiceBolt12SemanticErrorZ.mts | 740 + ...sult_Bolt12InvoiceFeaturesDecodeErrorZ.mts | 113 +- .../Result_Bolt12OfferContextDecodeErrorZ.mts | 744 + ...Result_Bolt12RefundContextDecodeErrorZ.mts | 744 + ...BuiltCommitmentTransactionDecodeErrorZ.mts | 113 +- ...le_BestBlockOutputSweeperZDecodeErrorZ.mts | 728 + ...2Tuple_BlindedPayInfoBlindedPathZNoneZ.mts | 113 +- .../Result_C2Tuple_CVec_u8Zu64ZNoneZ.mts | 113 +- ...DSASignatureCVec_ECDSASignatureZZNoneZ.mts | 113 +- ...rtyTwoBytesChannelManagerZDecodeErrorZ.mts | 113 +- ...rtyTwoBytesChannelMonitorZDecodeErrorZ.mts | 113 +- ..._ThirtyTwoBytesChannelMonitorZIOErrorZ.mts | 113 +- ...ple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mts | 113 +- ...ytesThirtyTwoBytesZPaymentSendFailureZ.mts | 113 +- ...Option_CVec_SocketAddressZZZSendErrorZ.mts | 128 +- ...ipientOnionFieldsRouteParametersZNoneZ.mts | 113 +- .../Result_COption_APIErrorZDecodeErrorZ.mts | 111 +- ...ult_COption_ClosureReasonZDecodeErrorZ.mts | 111 +- .../Result_COption_EventZDecodeErrorZ.mts | 111 +- ...t_COption_HTLCDestinationZDecodeErrorZ.mts | 111 +- ...sult_COption_MonitorEventZDecodeErrorZ.mts | 111 +- ...ult_COption_NetworkUpdateZDecodeErrorZ.mts | 111 +- ...tion_OnionMessageContentsZDecodeErrorZ.mts | 111 +- ...esult_COption_PathFailureZDecodeErrorZ.mts | 111 +- .../Result_COption_TypeZDecodeErrorZ.mts | 111 +- ts/structs/Result_CVec_BlindedPathZNoneZ.mts | 113 +- ...Tuple_BlindedPayInfoBlindedPathZZNoneZ.mts | 113 +- ...ThirtyTwoBytesChannelMonitorZZIOErrorZ.mts | 113 +- ...BytesThirtyTwoBytesZZProbeSendFailureZ.mts | 113 +- .../Result_CVec_ECDSASignatureZNoneZ.mts | 111 +- ts/structs/Result_CVec_StrZIOErrorZ.mts | 111 +- ts/structs/Result_CVec_UtxoZNoneZ.mts | 113 +- ts/structs/Result_CVec_u8ZIOErrorZ.mts | 111 +- ts/structs/Result_CVec_u8ZNoneZ.mts | 111 +- .../Result_CVec_u8ZPeerHandleErrorZ.mts | 113 +- ...Result_ChannelAnnouncementDecodeErrorZ.mts | 113 +- .../Result_ChannelConfigDecodeErrorZ.mts | 113 +- ...Result_ChannelCounterpartyDecodeErrorZ.mts | 113 +- ...hannelDerivationParametersDecodeErrorZ.mts | 113 +- .../Result_ChannelDetailsDecodeErrorZ.mts | 113 +- .../Result_ChannelFeaturesDecodeErrorZ.mts | 113 +- ts/structs/Result_ChannelIdAPIErrorZ.mts | 744 + ts/structs/Result_ChannelIdDecodeErrorZ.mts | 744 + ts/structs/Result_ChannelInfoDecodeErrorZ.mts | 113 +- ...esult_ChannelMonitorUpdateDecodeErrorZ.mts | 113 +- ...Result_ChannelMonitorUpdateStatusNoneZ.mts | 111 +- .../Result_ChannelPublicKeysDecodeErrorZ.mts | 113 +- .../Result_ChannelReadyDecodeErrorZ.mts | 113 +- .../Result_ChannelReestablishDecodeErrorZ.mts | 113 +- ...esult_ChannelShutdownStateDecodeErrorZ.mts | 111 +- ...annelTransactionParametersDecodeErrorZ.mts | 113 +- ...Result_ChannelTypeFeaturesDecodeErrorZ.mts | 113 +- .../Result_ChannelUpdateDecodeErrorZ.mts | 113 +- .../Result_ChannelUpdateInfoDecodeErrorZ.mts | 113 +- ts/structs/Result_ClaimedHTLCDecodeErrorZ.mts | 113 +- .../Result_ClosingSignedDecodeErrorZ.mts | 113 +- ...sult_ClosingSignedFeeRangeDecodeErrorZ.mts | 113 +- ts/structs/Result_CoinSelectionNoneZ.mts | 113 +- .../Result_CommitmentSignedDecodeErrorZ.mts | 113 +- ...sult_CommitmentTransactionDecodeErrorZ.mts | 113 +- ...annelTransactionParametersDecodeErrorZ.mts | 113 +- ...nterpartyCommitmentSecretsDecodeErrorZ.mts | 113 +- ...CounterpartyForwardingInfoDecodeErrorZ.mts | 113 +- ...lt_DelayedPaymentBasepointDecodeErrorZ.mts | 113 +- .../Result_DelayedPaymentKeyDecodeErrorZ.mts | 113 +- ...yedPaymentOutputDescriptorDecodeErrorZ.mts | 113 +- .../Result_DescriptionCreationErrorZ.mts | 113 +- ts/structs/Result_ECDSASignatureNoneZ.mts | 111 +- .../Result_ErrorMessageDecodeErrorZ.mts | 113 +- .../Result_FinalOnionHopDataDecodeErrorZ.mts | 113 +- .../Result_FixedPenaltyScorerDecodeErrorZ.mts | 113 +- .../Result_FundingCreatedDecodeErrorZ.mts | 113 +- .../Result_FundingSignedDecodeErrorZ.mts | 113 +- ...sult_GossipTimestampFilterDecodeErrorZ.mts | 113 +- .../Result_HTLCDescriptorDecodeErrorZ.mts | 113 +- ...ult_HTLCOutputInCommitmentDecodeErrorZ.mts | 113 +- ts/structs/Result_HTLCUpdateDecodeErrorZ.mts | 113 +- ...olderCommitmentTransactionDecodeErrorZ.mts | 113 +- ts/structs/Result_HostnameDecodeErrorZ.mts | 113 +- .../Result_HtlcBasepointDecodeErrorZ.mts | 113 +- ts/structs/Result_HtlcKeyDecodeErrorZ.mts | 113 +- .../Result_InFlightHtlcsDecodeErrorZ.mts | 113 +- .../Result_InMemorySignerDecodeErrorZ.mts | 113 +- ts/structs/Result_InitDecodeErrorZ.mts | 113 +- .../Result_InitFeaturesDecodeErrorZ.mts | 113 +- .../Result_InvoiceErrorDecodeErrorZ.mts | 113 +- ...ult_InvoiceRequestBolt12SemanticErrorZ.mts | 740 + ...esult_InvoiceRequestFieldsDecodeErrorZ.mts | 744 + ...ivedPayerIdBuilderBolt12SemanticErrorZ.mts | 733 + ...icitPayerIdBuilderBolt12SemanticErrorZ.mts | 733 + ...gningPubkeyBuilderBolt12SemanticErrorZ.mts | 733 + ...gningPubkeyBuilderBolt12SemanticErrorZ.mts | 733 + .../Result_LockedChannelMonitorNoneZ.mts | 113 +- ...Result_MaxDustHTLCExposureDecodeErrorZ.mts | 111 +- .../Result_NetworkGraphDecodeErrorZ.mts | 111 +- ts/structs/Result_NodeAliasDecodeErrorZ.mts | 113 +- .../Result_NodeAnnouncementDecodeErrorZ.mts | 113 +- ...esult_NodeAnnouncementInfoDecodeErrorZ.mts | 113 +- .../Result_NodeFeaturesDecodeErrorZ.mts | 113 +- ts/structs/Result_NodeIdDecodeErrorZ.mts | 111 +- ts/structs/Result_NodeInfoDecodeErrorZ.mts | 113 +- ts/structs/Result_NoneAPIErrorZ.mts | 111 +- .../Result_NoneBolt11SemanticErrorZ.mts | 111 +- .../Result_NoneBolt12SemanticErrorZ.mts | 109 +- ts/structs/Result_NoneIOErrorZ.mts | 111 +- ts/structs/Result_NoneLightningErrorZ.mts | 113 +- ts/structs/Result_NoneNoneZ.mts | 111 +- ts/structs/Result_NonePaymentSendFailureZ.mts | 111 +- ts/structs/Result_NonePeerHandleErrorZ.mts | 113 +- .../Result_NoneRetryableSendFailureZ.mts | 111 +- ts/structs/Result_OfferBolt12ParseErrorZ.mts | 115 +- .../Result_OfferBolt12SemanticErrorZ.mts | 740 + ts/structs/Result_OfferIdDecodeErrorZ.mts | 744 + ...vedMetadataBuilderBolt12SemanticErrorZ.mts | 740 + .../Result_OffersMessageDecodeErrorZ.mts | 111 +- .../Result_OnionMessageDecodeErrorZ.mts | 113 +- ts/structs/Result_OnionMessagePathNoneZ.mts | 113 +- ts/structs/Result_OnionPacketDecodeErrorZ.mts | 113 +- ts/structs/Result_OpenChannelDecodeErrorZ.mts | 113 +- .../Result_OpenChannelV2DecodeErrorZ.mts | 113 +- ts/structs/Result_OutPointDecodeErrorZ.mts | 113 +- .../Result_OutputSpendStatusDecodeErrorZ.mts | 744 + .../Result_OutputSweeperDecodeErrorZ.mts | 736 + .../Result_PayeePubKeySecp256k1ErrorZ.mts | 113 +- .../Result_PaymentConstraintsDecodeErrorZ.mts | 113 +- .../Result_PaymentContextDecodeErrorZ.mts | 744 + ...esult_PaymentFailureReasonDecodeErrorZ.mts | 111 +- .../Result_PaymentParametersDecodeErrorZ.mts | 113 +- .../Result_PaymentPurposeDecodeErrorZ.mts | 111 +- .../Result_PaymentRelayDecodeErrorZ.mts | 113 +- ts/structs/Result_PeeledOnionNoneZ.mts | 126 +- .../Result_PendingHTLCInfoDecodeErrorZ.mts | 113 +- .../Result_PendingHTLCInfoInboundHTLCErrZ.mts | 135 +- .../Result_PendingHTLCRoutingDecodeErrorZ.mts | 111 +- .../Result_PhantomRouteHintsDecodeErrorZ.mts | 113 +- ts/structs/Result_PingDecodeErrorZ.mts | 113 +- ts/structs/Result_PongDecodeErrorZ.mts | 113 +- ...Result_PositiveTimestampCreationErrorZ.mts | 113 +- .../Result_PrivateRouteCreationErrorZ.mts | 113 +- ...Result_ProbabilisticScorerDecodeErrorZ.mts | 113 +- ts/structs/Result_PublicKeyNoneZ.mts | 111 +- .../Result_PublicKeySecp256k1ErrorZ.mts | 109 +- .../Result_QueryChannelRangeDecodeErrorZ.mts | 113 +- ...esult_QueryShortChannelIdsDecodeErrorZ.mts | 113 +- ...esult_RecipientOnionFieldsDecodeErrorZ.mts | 113 +- .../Result_RecipientOnionFieldsNoneZ.mts | 113 +- .../Result_RecoverableSignatureNoneZ.mts | 111 +- ts/structs/Result_RefundBolt12ParseErrorZ.mts | 115 +- .../Result_RefundBolt12SemanticErrorZ.mts | 740 + ...vedMetadataBuilderBolt12SemanticErrorZ.mts | 740 + .../Result_ReplyChannelRangeDecodeErrorZ.mts | 113 +- ...lt_ReplyShortChannelIdsEndDecodeErrorZ.mts | 113 +- ts/structs/Result_RetryDecodeErrorZ.mts | 111 +- ...Result_RevocationBasepointDecodeErrorZ.mts | 113 +- .../Result_RevocationKeyDecodeErrorZ.mts | 113 +- .../Result_RevokeAndACKDecodeErrorZ.mts | 113 +- ts/structs/Result_RouteDecodeErrorZ.mts | 113 +- ts/structs/Result_RouteHintDecodeErrorZ.mts | 113 +- .../Result_RouteHintHopDecodeErrorZ.mts | 113 +- ts/structs/Result_RouteHopDecodeErrorZ.mts | 113 +- ts/structs/Result_RouteLightningErrorZ.mts | 115 +- .../Result_RouteParametersDecodeErrorZ.mts | 113 +- ts/structs/Result_RoutingFeesDecodeErrorZ.mts | 113 +- ts/structs/Result_SchnorrSignatureNoneZ.mts | 109 +- ts/structs/Result_SendSuccessSendErrorZ.mts | 126 +- ts/structs/Result_ShutdownDecodeErrorZ.mts | 113 +- .../Result_ShutdownScriptDecodeErrorZ.mts | 113 +- ...t_ShutdownScriptInvalidShutdownScriptZ.mts | 115 +- ts/structs/Result_ShutdownScriptNoneZ.mts | 113 +- .../Result_SiPrefixBolt11ParseErrorZ.mts | 111 +- ...ignedRawBolt11InvoiceBolt11ParseErrorZ.mts | 113 +- .../Result_SocketAddressDecodeErrorZ.mts | 111 +- ..._SocketAddressSocketAddressParseErrorZ.mts | 111 +- ..._SpendableOutputDescriptorDecodeErrorZ.mts | 111 +- ts/structs/Result_SpliceAckDecodeErrorZ.mts | 113 +- ts/structs/Result_SpliceDecodeErrorZ.mts | 113 +- .../Result_SpliceLockedDecodeErrorZ.mts | 113 +- ...ticPaymentOutputDescriptorDecodeErrorZ.mts | 113 +- ts/structs/Result_StfuDecodeErrorZ.mts | 113 +- ts/structs/Result_StrSecp256k1ErrorZ.mts | 109 +- ts/structs/Result_ThirtyTwoBytesAPIErrorZ.mts | 109 +- ts/structs/Result_ThirtyTwoBytesNoneZ.mts | 111 +- ...sult_ThirtyTwoBytesPaymentSendFailureZ.mts | 111 +- ...lt_ThirtyTwoBytesRetryableSendFailureZ.mts | 111 +- ...ult_TrackedSpendableOutputDecodeErrorZ.mts | 744 + ts/structs/Result_TransactionNoneZ.mts | 109 +- ...t_TransactionU16LenLimitedDecodeErrorZ.mts | 113 +- .../Result_TransactionU16LenLimitedNoneZ.mts | 113 +- .../Result_TrustedClosingTransactionNoneZ.mts | 113 +- ...sult_TrustedCommitmentTransactionNoneZ.mts | 113 +- ts/structs/Result_TxAbortDecodeErrorZ.mts | 113 +- ts/structs/Result_TxAckRbfDecodeErrorZ.mts | 113 +- ts/structs/Result_TxAddInputDecodeErrorZ.mts | 113 +- ts/structs/Result_TxAddOutputDecodeErrorZ.mts | 113 +- ts/structs/Result_TxCompleteDecodeErrorZ.mts | 113 +- .../Result_TxCreationKeysDecodeErrorZ.mts | 113 +- ts/structs/Result_TxInitRbfDecodeErrorZ.mts | 113 +- ts/structs/Result_TxOutUtxoLookupErrorZ.mts | 111 +- .../Result_TxRemoveInputDecodeErrorZ.mts | 113 +- .../Result_TxRemoveOutputDecodeErrorZ.mts | 113 +- .../Result_TxSignaturesDecodeErrorZ.mts | 113 +- ...sult_UnknownPaymentContextDecodeErrorZ.mts | 744 + ...ignedBolt12InvoiceBolt12SemanticErrorZ.mts | 740 + ...nsignedChannelAnnouncementDecodeErrorZ.mts | 113 +- ...sult_UnsignedChannelUpdateDecodeErrorZ.mts | 113 +- ...gnedInvoiceRequestBolt12SemanticErrorZ.mts | 740 + ...t_UnsignedNodeAnnouncementDecodeErrorZ.mts | 113 +- .../Result_UntrustedStringDecodeErrorZ.mts | 113 +- .../Result_UpdateAddHTLCDecodeErrorZ.mts | 113 +- .../Result_UpdateFailHTLCDecodeErrorZ.mts | 113 +- ...lt_UpdateFailMalformedHTLCDecodeErrorZ.mts | 113 +- ts/structs/Result_UpdateFeeDecodeErrorZ.mts | 113 +- .../Result_UpdateFulfillHTLCDecodeErrorZ.mts | 113 +- .../Result_VerifiedInvoiceRequestNoneZ.mts | 113 +- .../Result_WarningMessageDecodeErrorZ.mts | 113 +- ts/structs/Result_WitnessNoneZ.mts | 111 +- ...riteableEcdsaChannelSignerDecodeErrorZ.mts | 111 +- ts/structs/Result_boolLightningErrorZ.mts | 113 +- ts/structs/Result_boolPeerHandleErrorZ.mts | 113 +- ts/structs/Result_u32GraphSyncErrorZ.mts | 111 +- ts/structs/Result_u64ShortChannelIdErrorZ.mts | 721 + ts/structs/Retry.mts | 113 +- ts/structs/RevocationBasepoint.mts | 113 +- ts/structs/RevocationKey.mts | 115 +- ts/structs/RevokeAndACK.mts | 132 +- ts/structs/Route.mts | 117 +- ts/structs/RouteHint.mts | 117 +- ts/structs/RouteHintHop.mts | 117 +- ts/structs/RouteHop.mts | 119 +- ts/structs/RouteParameters.mts | 119 +- ts/structs/Router.mts | 123 +- ts/structs/RoutingFees.mts | 113 +- ts/structs/RoutingMessageHandler.mts | 149 +- ts/structs/Score.mts | 111 +- ts/structs/ScoreLookUp.mts | 113 +- ts/structs/ScoreUpdate.mts | 119 +- .../ScorerAccountingForInFlightHtlcs.mts | 113 +- ts/structs/SendError.mts | 141 +- ts/structs/SendSuccess.mts | 121 +- ts/structs/Sha256.mts | 113 +- ts/structs/Shutdown.mts | 132 +- ts/structs/ShutdownScript.mts | 115 +- ts/structs/SignBolt12InvoiceFn.mts | 722 + ts/structs/SignError.mts | 730 + ts/structs/SignInvoiceRequestFn.mts | 722 + ts/structs/SignOrCreationError.mts | 113 +- ts/structs/SignedRawBolt11Invoice.mts | 113 +- ts/structs/SignerProvider.mts | 117 +- ts/structs/SocketAddress.mts | 115 +- ts/structs/SocketDescriptor.mts | 111 +- ts/structs/SpendableOutputDescriptor.mts | 119 +- ts/structs/SpendingDelay.mts | 739 + ts/structs/Splice.mts | 132 +- ts/structs/SpliceAck.mts | 132 +- ts/structs/SpliceLocked.mts | 132 +- ts/structs/StaticPaymentOutputDescriptor.mts | 117 +- ts/structs/Stfu.mts | 132 +- ts/structs/TaggedHash.mts | 111 +- ...nnouncementChannelUpdateChannelUpdateZ.mts | 113 +- ...e_OffersMessageDestinationBlindedPathZ.mts | 113 +- ...MessageContentsDestinationBlindedPathZ.mts | 113 +- ...onMessageCOption_CVec_SocketAddressZZZ.mts | 113 +- ...t11Invoice_u832Bolt11InvoiceSignatureZ.mts | 113 +- ...esRecipientOnionFieldsRouteParametersZ.mts | 113 +- ...rtyTwoBytesu32COption_ThirtyTwoBytesZZ.mts | 111 +- ts/structs/TrackedSpendableOutput.mts | 802 + ts/structs/TrampolineOnionPacket.mts | 791 + ts/structs/TransactionU16LenLimited.mts | 122 +- ts/structs/TrustedClosingTransaction.mts | 111 +- ts/structs/TrustedCommitmentTransaction.mts | 113 +- .../TwoTuple_BestBlockOutputSweeperZ.mts | 712 + .../TwoTuple_BlindedPayInfoBlindedPathZ.mts | 113 +- ts/structs/TwoTuple_CVec_u8Zu64Z.mts | 111 +- ...Z.mts => TwoTuple_ChannelIdPublicKeyZ.mts} | 141 +- ...le_ECDSASignatureCVec_ECDSASignatureZZ.mts | 111 +- ...woTuple_OutPointCVec_MonitorUpdateIdZZ.mts | 113 +- ts/structs/TwoTuple_OutPointCVec_u8ZZ.mts | 113 +- ts/structs/TwoTuple_OutPointChannelIdZ.mts | 721 + ...TwoTuple_PublicKeyCVec_SocketAddressZZ.mts | 111 +- ts/structs/TwoTuple_PublicKeyTypeZ.mts | 111 +- ...rtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mts | 113 +- ...ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mts | 113 +- ...TwoTuple_ThirtyTwoBytesChannelManagerZ.mts | 113 +- ...TwoTuple_ThirtyTwoBytesChannelMonitorZ.mts | 113 +- ...TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mts | 111 +- ts/structs/TwoTuple_Z.mts | 111 +- ts/structs/TwoTuple__u1632_u1632Z.mts | 111 +- ts/structs/TwoTuple__u832u16Z.mts | 111 +- ts/structs/TwoTuple_u32CVec_u8ZZ.mts | 111 +- ts/structs/TwoTuple_u32TxOutZ.mts | 111 +- ts/structs/TwoTuple_u64CVec_u8ZZ.mts | 111 +- ts/structs/TwoTuple_u64u16Z.mts | 111 +- ts/structs/TwoTuple_u64u64Z.mts | 111 +- ts/structs/TwoTuple_usizeTransactionZ.mts | 111 +- ts/structs/TxAbort.mts | 132 +- ts/structs/TxAckRbf.mts | 132 +- ts/structs/TxAddInput.mts | 134 +- ts/structs/TxAddOutput.mts | 132 +- ts/structs/TxComplete.mts | 132 +- ts/structs/TxCreationKeys.mts | 127 +- ts/structs/TxIn.mts | 111 +- ts/structs/TxInitRbf.mts | 132 +- ts/structs/TxOut.mts | 111 +- ts/structs/TxRemoveInput.mts | 132 +- ts/structs/TxRemoveOutput.mts | 132 +- ts/structs/TxSignatures.mts | 151 +- ts/structs/Type.mts | 111 +- ts/structs/UnknownPaymentContext.mts | 717 + ts/structs/UnsignedBolt12Invoice.mts | 138 +- ts/structs/UnsignedChannelAnnouncement.mts | 125 +- ts/structs/UnsignedChannelUpdate.mts | 113 +- ts/structs/UnsignedGossipMessage.mts | 117 +- ts/structs/UnsignedInvoiceRequest.mts | 138 +- ts/structs/UnsignedNodeAnnouncement.mts | 181 +- ts/structs/UntrustedString.mts | 111 +- ts/structs/UpdateAddHTLC.mts | 134 +- ts/structs/UpdateFailHTLC.mts | 127 +- ts/structs/UpdateFailMalformedHTLC.mts | 127 +- ts/structs/UpdateFee.mts | 132 +- ts/structs/UpdateFulfillHTLC.mts | 132 +- ts/structs/UserConfig.mts | 119 +- ts/structs/UtilMethods.mts | 266 +- ts/structs/Utxo.mts | 119 +- ts/structs/UtxoFuture.mts | 115 +- ts/structs/UtxoLookup.mts | 113 +- ts/structs/UtxoResult.mts | 115 +- ts/structs/VerifiedInvoiceRequest.mts | 187 +- ts/structs/Wallet.mts | 111 +- ts/structs/WalletSource.mts | 117 +- ts/structs/WarningMessage.mts | 132 +- ts/structs/Watch.mts | 141 +- ts/structs/WatchedOutput.mts | 115 +- ts/structs/WitnessProgram.mts | 111 +- ts/structs/WriteableEcdsaChannelSigner.mts | 113 +- ts/structs/WriteableScore.mts | 111 +- 645 files changed, 129744 insertions(+), 24210 deletions(-) create mode 100644 ts/enums/Direction.mts create mode 100644 ts/enums/ShortChannelIdError.mts create mode 100644 ts/structs/Bolt12OfferContext.mts create mode 100644 ts/structs/Bolt12RefundContext.mts create mode 100644 ts/structs/ChangeDestinationSource.mts create mode 100644 ts/structs/ChannelId.mts create mode 100644 ts/structs/CommonAcceptChannelFields.mts create mode 100644 ts/structs/CommonOpenChannelFields.mts rename ts/structs/{ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mts => EmptyNodeIdLookUp.mts} (87%) create mode 100644 ts/structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mts create mode 100644 ts/structs/IntroductionNode.mts create mode 100644 ts/structs/InvoiceRequestFields.mts create mode 100644 ts/structs/InvoiceRequestWithDerivedPayerIdBuilder.mts create mode 100644 ts/structs/InvoiceRequestWithExplicitPayerIdBuilder.mts create mode 100644 ts/structs/InvoiceWithDerivedSigningPubkeyBuilder.mts create mode 100644 ts/structs/InvoiceWithExplicitSigningPubkeyBuilder.mts create mode 100644 ts/structs/NextMessageHop.mts create mode 100644 ts/structs/NodeIdLookUp.mts create mode 100644 ts/structs/OfferId.mts create mode 100644 ts/structs/OfferWithDerivedMetadataBuilder.mts create mode 100644 ts/structs/OfferWithExplicitMetadataBuilder.mts create mode 100644 ts/structs/Option_AmountZ.mts create mode 100644 ts/structs/Option_ECDSASignatureZ.mts create mode 100644 ts/structs/Option_PaymentContextZ.mts create mode 100644 ts/structs/Option_QuantityZ.mts create mode 100644 ts/structs/OutputSpendStatus.mts create mode 100644 ts/structs/OutputSpender.mts create mode 100644 ts/structs/OutputSweeper.mts create mode 100644 ts/structs/PaymentContext.mts create mode 100644 ts/structs/PeerDetails.mts rename ts/structs/{TwoTuple_PublicKeyCOption_SocketAddressZZ.mts => RandomBytes.mts} (87%) create mode 100644 ts/structs/RefundMaybeWithDerivedMetadataBuilder.mts create mode 100644 ts/structs/Result_BestBlockDecodeErrorZ.mts create mode 100644 ts/structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mts create mode 100644 ts/structs/Result_Bolt12OfferContextDecodeErrorZ.mts create mode 100644 ts/structs/Result_Bolt12RefundContextDecodeErrorZ.mts create mode 100644 ts/structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mts create mode 100644 ts/structs/Result_ChannelIdAPIErrorZ.mts create mode 100644 ts/structs/Result_ChannelIdDecodeErrorZ.mts create mode 100644 ts/structs/Result_InvoiceRequestBolt12SemanticErrorZ.mts create mode 100644 ts/structs/Result_InvoiceRequestFieldsDecodeErrorZ.mts create mode 100644 ts/structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mts create mode 100644 ts/structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mts create mode 100644 ts/structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mts create mode 100644 ts/structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mts create mode 100644 ts/structs/Result_OfferBolt12SemanticErrorZ.mts create mode 100644 ts/structs/Result_OfferIdDecodeErrorZ.mts create mode 100644 ts/structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mts create mode 100644 ts/structs/Result_OutputSpendStatusDecodeErrorZ.mts create mode 100644 ts/structs/Result_OutputSweeperDecodeErrorZ.mts create mode 100644 ts/structs/Result_PaymentContextDecodeErrorZ.mts create mode 100644 ts/structs/Result_RefundBolt12SemanticErrorZ.mts create mode 100644 ts/structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mts create mode 100644 ts/structs/Result_TrackedSpendableOutputDecodeErrorZ.mts create mode 100644 ts/structs/Result_UnknownPaymentContextDecodeErrorZ.mts create mode 100644 ts/structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mts create mode 100644 ts/structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mts create mode 100644 ts/structs/Result_u64ShortChannelIdErrorZ.mts create mode 100644 ts/structs/SignBolt12InvoiceFn.mts create mode 100644 ts/structs/SignError.mts create mode 100644 ts/structs/SignInvoiceRequestFn.mts create mode 100644 ts/structs/SpendingDelay.mts create mode 100644 ts/structs/TrackedSpendableOutput.mts create mode 100644 ts/structs/TrampolineOnionPacket.mts create mode 100644 ts/structs/TwoTuple_BestBlockOutputSweeperZ.mts rename ts/structs/{TwoTuple_ThirtyTwoBytesPublicKeyZ.mts => TwoTuple_ChannelIdPublicKeyZ.mts} (86%) create mode 100644 ts/structs/TwoTuple_OutPointChannelIdZ.mts create mode 100644 ts/structs/UnknownPaymentContext.mts diff --git a/ts/bindings.c b/ts/bindings.c index 13073be9..994d0e4b 100644 --- a/ts/bindings.c +++ b/ts/bindings.c @@ -221,10 +221,11 @@ static inline LDKBolt12SemanticError LDKBolt12SemanticError_from_js(int32_t ord) case 20: return LDKBolt12SemanticError_MissingPayerId; case 21: return LDKBolt12SemanticError_DuplicatePaymentId; case 22: return LDKBolt12SemanticError_MissingPaths; - case 23: return LDKBolt12SemanticError_InvalidPayInfo; - case 24: return LDKBolt12SemanticError_MissingCreationTime; - case 25: return LDKBolt12SemanticError_MissingPaymentHash; - case 26: return LDKBolt12SemanticError_MissingSignature; + case 23: return LDKBolt12SemanticError_UnexpectedPaths; + case 24: return LDKBolt12SemanticError_InvalidPayInfo; + case 25: return LDKBolt12SemanticError_MissingCreationTime; + case 26: return LDKBolt12SemanticError_MissingPaymentHash; + case 27: return LDKBolt12SemanticError_MissingSignature; } abort(); } @@ -253,10 +254,11 @@ static inline int32_t LDKBolt12SemanticError_to_js(LDKBolt12SemanticError val) { case LDKBolt12SemanticError_MissingPayerId: return 20; case LDKBolt12SemanticError_DuplicatePaymentId: return 21; case LDKBolt12SemanticError_MissingPaths: return 22; - case LDKBolt12SemanticError_InvalidPayInfo: return 23; - case LDKBolt12SemanticError_MissingCreationTime: return 24; - case LDKBolt12SemanticError_MissingPaymentHash: return 25; - case LDKBolt12SemanticError_MissingSignature: return 26; + case LDKBolt12SemanticError_UnexpectedPaths: return 23; + case LDKBolt12SemanticError_InvalidPayInfo: return 24; + case LDKBolt12SemanticError_MissingCreationTime: return 25; + case LDKBolt12SemanticError_MissingPaymentHash: return 26; + case LDKBolt12SemanticError_MissingSignature: return 27; default: abort(); } } @@ -318,6 +320,7 @@ static inline LDKConfirmationTarget LDKConfirmationTarget_from_js(int32_t ord) { case 3: return LDKConfirmationTarget_AnchorChannelFee; case 4: return LDKConfirmationTarget_NonAnchorChannelFee; case 5: return LDKConfirmationTarget_ChannelCloseMinimum; + case 6: return LDKConfirmationTarget_OutputSpendingFee; } abort(); } @@ -329,6 +332,7 @@ static inline int32_t LDKConfirmationTarget_to_js(LDKConfirmationTarget val) { case LDKConfirmationTarget_AnchorChannelFee: return 3; case LDKConfirmationTarget_NonAnchorChannelFee: return 4; case LDKConfirmationTarget_ChannelCloseMinimum: return 5; + case LDKConfirmationTarget_OutputSpendingFee: return 6; default: abort(); } } @@ -374,6 +378,20 @@ static inline int32_t LDKCurrency_to_js(LDKCurrency val) { default: abort(); } } +static inline LDKDirection LDKDirection_from_js(int32_t ord) { + switch (ord) { + case 0: return LDKDirection_NodeOne; + case 1: return LDKDirection_NodeTwo; + } + abort(); +} +static inline int32_t LDKDirection_to_js(LDKDirection val) { + switch (val) { + case LDKDirection_NodeOne: return 0; + case LDKDirection_NodeTwo: return 1; + default: abort(); + } +} static inline LDKHTLCClaim LDKHTLCClaim_from_js(int32_t ord) { switch (ord) { case 0: return LDKHTLCClaim_OfferedTimeout; @@ -564,6 +582,22 @@ static inline int32_t LDKSecp256k1Error_to_js(LDKSecp256k1Error val) { default: abort(); } } +static inline LDKShortChannelIdError LDKShortChannelIdError_from_js(int32_t ord) { + switch (ord) { + case 0: return LDKShortChannelIdError_BlockOverflow; + case 1: return LDKShortChannelIdError_TxIndexOverflow; + case 2: return LDKShortChannelIdError_VoutIndexOverflow; + } + abort(); +} +static inline int32_t LDKShortChannelIdError_to_js(LDKShortChannelIdError val) { + switch (val) { + case LDKShortChannelIdError_BlockOverflow: return 0; + case LDKShortChannelIdError_TxIndexOverflow: return 1; + case LDKShortChannelIdError_VoutIndexOverflow: return 2; + default: abort(); + } +} static inline LDKSiPrefix LDKSiPrefix_from_js(int32_t ord) { switch (ord) { case 0: return LDKSiPrefix_Milli; @@ -665,6 +699,54 @@ int8_t __attribute__((export_name("TS_LDKBech32Error_InvalidData_get_invalid_dat int8_t invalid_data_conv = obj->invalid_data; return invalid_data_conv; } +static inline struct LDKRefundMaybeWithDerivedMetadataBuilder CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKRefundMaybeWithDerivedMetadataBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok"))) TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(uint64_t owner) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKRefundMaybeWithDerivedMetadataBuilder ret_var = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +uint32_t __attribute__((export_name("TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err"))) TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(uint64_t owner) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + uint32_t ret_conv = LDKBolt12SemanticError_to_js(CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKRefund CResult_RefundBolt12SemanticErrorZ_get_ok(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKRefund ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_RefundBolt12SemanticErrorZ_get_ok"))) TS_CResult_RefundBolt12SemanticErrorZ_get_ok(uint64_t owner) { + LDKCResult_RefundBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(owner); + LDKRefund ret_var = CResult_RefundBolt12SemanticErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_RefundBolt12SemanticErrorZ_get_err(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +uint32_t __attribute__((export_name("TS_CResult_RefundBolt12SemanticErrorZ_get_err"))) TS_CResult_RefundBolt12SemanticErrorZ_get_err(uint64_t owner) { + LDKCResult_RefundBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(owner); + uint32_t ret_conv = LDKBolt12SemanticError_to_js(CResult_RefundBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + uint32_t __attribute__((export_name("TS_LDKCOption_u64Z_ty_from_ptr"))) TS_LDKCOption_u64Z_ty_from_ptr(uint64_t ptr) { LDKCOption_u64Z *obj = (LDKCOption_u64Z*)untag_ptr(ptr); switch(obj->tag) { @@ -737,6 +819,7 @@ uint32_t __attribute__((export_name("TS_LDKDecodeError_ty_from_ptr"))) TS_LDKDec case LDKDecodeError_BadLengthDescriptor: return 4; case LDKDecodeError_Io: return 5; case LDKDecodeError_UnsupportedCompression: return 6; + case LDKDecodeError_DangerousValue: return 7; default: abort(); } } @@ -968,6 +1051,74 @@ void __attribute__((export_name("TS_CResult_RecipientOnionFieldsNoneZ_get_err") CResult_RecipientOnionFieldsNoneZ_get_err(owner_conv); } +static inline struct LDKUnsignedBolt12Invoice CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKUnsignedBolt12Invoice ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok"))) TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(uint64_t owner) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner); + LDKUnsignedBolt12Invoice ret_var = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +uint32_t __attribute__((export_name("TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err"))) TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(uint64_t owner) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner); + uint32_t ret_conv = LDKBolt12SemanticError_to_js(CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKBolt12Invoice CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKBolt12Invoice ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok"))) TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(uint64_t owner) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner); + LDKBolt12Invoice ret_var = CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +uint32_t __attribute__((export_name("TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err"))) TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(uint64_t owner) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner); + uint32_t ret_conv = LDKBolt12SemanticError_to_js(CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKSchnorrSignature CResult_SchnorrSignatureNoneZ_get_ok(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return *owner->contents.result; +} +int8_tArray __attribute__((export_name("TS_CResult_SchnorrSignatureNoneZ_get_ok"))) TS_CResult_SchnorrSignatureNoneZ_get_ok(uint64_t owner) { + LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner); + int8_tArray ret_arr = init_int8_tArray(64, __LINE__); + memcpy(ret_arr->elems, CResult_SchnorrSignatureNoneZ_get_ok(owner_conv).compact_form, 64); + return ret_arr; +} + +static inline void CResult_SchnorrSignatureNoneZ_get_err(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return *owner->contents.err; +} +void __attribute__((export_name("TS_CResult_SchnorrSignatureNoneZ_get_err"))) TS_CResult_SchnorrSignatureNoneZ_get_err(uint64_t owner) { + LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner); + CResult_SchnorrSignatureNoneZ_get_err(owner_conv); +} + static inline LDKCVec_ThirtyTwoBytesZ CVec_ThirtyTwoBytesZ_clone(const LDKCVec_ThirtyTwoBytesZ *orig) { LDKCVec_ThirtyTwoBytesZ ret = { .data = MALLOC(sizeof(LDKThirtyTwoBytes) * orig->datalen, "LDKCVec_ThirtyTwoBytesZ clone bytes"), .datalen = orig->datalen }; for (size_t i = 0; i < ret.datalen; i++) { @@ -998,6 +1149,76 @@ ptrArray __attribute__((export_name("TS_LDKCOption_CVec_ThirtyTwoBytesZZ_Some_ge return some_arr; } +uint32_t __attribute__((export_name("TS_LDKAmount_ty_from_ptr"))) TS_LDKAmount_ty_from_ptr(uint64_t ptr) { + LDKAmount *obj = (LDKAmount*)untag_ptr(ptr); + switch(obj->tag) { + case LDKAmount_Bitcoin: return 0; + case LDKAmount_Currency: return 1; + default: abort(); + } +} +int64_t __attribute__((export_name("TS_LDKAmount_Bitcoin_get_amount_msats"))) TS_LDKAmount_Bitcoin_get_amount_msats(uint64_t ptr) { + LDKAmount *obj = (LDKAmount*)untag_ptr(ptr); + assert(obj->tag == LDKAmount_Bitcoin); + int64_t amount_msats_conv = obj->bitcoin.amount_msats; + return amount_msats_conv; +} +int8_tArray __attribute__((export_name("TS_LDKAmount_Currency_get_iso4217_code"))) TS_LDKAmount_Currency_get_iso4217_code(uint64_t ptr) { + LDKAmount *obj = (LDKAmount*)untag_ptr(ptr); + assert(obj->tag == LDKAmount_Currency); + int8_tArray iso4217_code_arr = init_int8_tArray(3, __LINE__); + memcpy(iso4217_code_arr->elems, obj->currency.iso4217_code.data, 3); + return iso4217_code_arr; +} +int64_t __attribute__((export_name("TS_LDKAmount_Currency_get_amount"))) TS_LDKAmount_Currency_get_amount(uint64_t ptr) { + LDKAmount *obj = (LDKAmount*)untag_ptr(ptr); + assert(obj->tag == LDKAmount_Currency); + int64_t amount_conv = obj->currency.amount; + return amount_conv; +} +uint32_t __attribute__((export_name("TS_LDKCOption_AmountZ_ty_from_ptr"))) TS_LDKCOption_AmountZ_ty_from_ptr(uint64_t ptr) { + LDKCOption_AmountZ *obj = (LDKCOption_AmountZ*)untag_ptr(ptr); + switch(obj->tag) { + case LDKCOption_AmountZ_Some: return 0; + case LDKCOption_AmountZ_None: return 1; + default: abort(); + } +} +uint64_t __attribute__((export_name("TS_LDKCOption_AmountZ_Some_get_some"))) TS_LDKCOption_AmountZ_Some_get_some(uint64_t ptr) { + LDKCOption_AmountZ *obj = (LDKCOption_AmountZ*)untag_ptr(ptr); + assert(obj->tag == LDKCOption_AmountZ_Some); + uint64_t some_ref = tag_ptr(&obj->some, false); + return some_ref; +} +uint32_t __attribute__((export_name("TS_LDKQuantity_ty_from_ptr"))) TS_LDKQuantity_ty_from_ptr(uint64_t ptr) { + LDKQuantity *obj = (LDKQuantity*)untag_ptr(ptr); + switch(obj->tag) { + case LDKQuantity_Bounded: return 0; + case LDKQuantity_Unbounded: return 1; + case LDKQuantity_One: return 2; + default: abort(); + } +} +int64_t __attribute__((export_name("TS_LDKQuantity_Bounded_get_bounded"))) TS_LDKQuantity_Bounded_get_bounded(uint64_t ptr) { + LDKQuantity *obj = (LDKQuantity*)untag_ptr(ptr); + assert(obj->tag == LDKQuantity_Bounded); + int64_t bounded_conv = obj->bounded; + return bounded_conv; +} +uint32_t __attribute__((export_name("TS_LDKCOption_QuantityZ_ty_from_ptr"))) TS_LDKCOption_QuantityZ_ty_from_ptr(uint64_t ptr) { + LDKCOption_QuantityZ *obj = (LDKCOption_QuantityZ*)untag_ptr(ptr); + switch(obj->tag) { + case LDKCOption_QuantityZ_Some: return 0; + case LDKCOption_QuantityZ_None: return 1; + default: abort(); + } +} +uint64_t __attribute__((export_name("TS_LDKCOption_QuantityZ_Some_get_some"))) TS_LDKCOption_QuantityZ_Some_get_some(uint64_t ptr) { + LDKCOption_QuantityZ *obj = (LDKCOption_QuantityZ*)untag_ptr(ptr); + assert(obj->tag == LDKCOption_QuantityZ_Some); + uint64_t some_ref = tag_ptr(&obj->some, false); + return some_ref; +} static inline struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesNoneZ_get_ok(LDKCResult_ThirtyTwoBytesNoneZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return ThirtyTwoBytes_clone(&*owner->contents.result); @@ -1362,44 +1583,45 @@ void __attribute__((export_name("TS_CResult_RecoverableSignatureNoneZ_get_err") CResult_RecoverableSignatureNoneZ_get_err(owner_conv); } -static inline struct LDKSchnorrSignature CResult_SchnorrSignatureNoneZ_get_ok(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){ +static inline struct LDKECDSASignature CResult_ECDSASignatureNoneZ_get_ok(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return *owner->contents.result; } -int8_tArray __attribute__((export_name("TS_CResult_SchnorrSignatureNoneZ_get_ok"))) TS_CResult_SchnorrSignatureNoneZ_get_ok(uint64_t owner) { - LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner); +int8_tArray __attribute__((export_name("TS_CResult_ECDSASignatureNoneZ_get_ok"))) TS_CResult_ECDSASignatureNoneZ_get_ok(uint64_t owner) { + LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner); int8_tArray ret_arr = init_int8_tArray(64, __LINE__); - memcpy(ret_arr->elems, CResult_SchnorrSignatureNoneZ_get_ok(owner_conv).compact_form, 64); + memcpy(ret_arr->elems, CResult_ECDSASignatureNoneZ_get_ok(owner_conv).compact_form, 64); return ret_arr; } -static inline void CResult_SchnorrSignatureNoneZ_get_err(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){ +static inline void CResult_ECDSASignatureNoneZ_get_err(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){ CHECK(!owner->result_ok); return *owner->contents.err; } -void __attribute__((export_name("TS_CResult_SchnorrSignatureNoneZ_get_err"))) TS_CResult_SchnorrSignatureNoneZ_get_err(uint64_t owner) { - LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner); - CResult_SchnorrSignatureNoneZ_get_err(owner_conv); +void __attribute__((export_name("TS_CResult_ECDSASignatureNoneZ_get_err"))) TS_CResult_ECDSASignatureNoneZ_get_err(uint64_t owner) { + LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner); + CResult_ECDSASignatureNoneZ_get_err(owner_conv); } -static inline struct LDKECDSASignature CResult_ECDSASignatureNoneZ_get_ok(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){ +static inline struct LDKTransaction CResult_TransactionNoneZ_get_ok(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return *owner->contents.result; } -int8_tArray __attribute__((export_name("TS_CResult_ECDSASignatureNoneZ_get_ok"))) TS_CResult_ECDSASignatureNoneZ_get_ok(uint64_t owner) { - LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner); - int8_tArray ret_arr = init_int8_tArray(64, __LINE__); - memcpy(ret_arr->elems, CResult_ECDSASignatureNoneZ_get_ok(owner_conv).compact_form, 64); +int8_tArray __attribute__((export_name("TS_CResult_TransactionNoneZ_get_ok"))) TS_CResult_TransactionNoneZ_get_ok(uint64_t owner) { + LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner); + LDKTransaction ret_var = CResult_TransactionNoneZ_get_ok(owner_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); return ret_arr; } -static inline void CResult_ECDSASignatureNoneZ_get_err(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){ +static inline void CResult_TransactionNoneZ_get_err(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){ CHECK(!owner->result_ok); return *owner->contents.err; } -void __attribute__((export_name("TS_CResult_ECDSASignatureNoneZ_get_err"))) TS_CResult_ECDSASignatureNoneZ_get_err(uint64_t owner) { - LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner); - CResult_ECDSASignatureNoneZ_get_err(owner_conv); +void __attribute__((export_name("TS_CResult_TransactionNoneZ_get_err"))) TS_CResult_TransactionNoneZ_get_err(uint64_t owner) { + LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner); + CResult_TransactionNoneZ_get_err(owner_conv); } static inline struct LDKECDSASignature C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_a(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ *NONNULL_PTR owner){ @@ -2272,27 +2494,6 @@ uint64_t __attribute__((export_name("TS_CResult_InMemorySignerDecodeErrorZ_get_ return ret_ref; } -static inline struct LDKTransaction CResult_TransactionNoneZ_get_ok(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){ -CHECK(owner->result_ok); - return *owner->contents.result; -} -int8_tArray __attribute__((export_name("TS_CResult_TransactionNoneZ_get_ok"))) TS_CResult_TransactionNoneZ_get_ok(uint64_t owner) { - LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner); - LDKTransaction ret_var = CResult_TransactionNoneZ_get_ok(owner_conv); - int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); - memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); - return ret_arr; -} - -static inline void CResult_TransactionNoneZ_get_err(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return *owner->contents.err; -} -void __attribute__((export_name("TS_CResult_TransactionNoneZ_get_err"))) TS_CResult_TransactionNoneZ_get_err(uint64_t owner) { - LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner); - CResult_TransactionNoneZ_get_err(owner_conv); -} - static inline LDKCVec_ChannelDetailsZ CVec_ChannelDetailsZ_clone(const LDKCVec_ChannelDetailsZ *orig) { LDKCVec_ChannelDetailsZ ret = { .data = MALLOC(sizeof(LDKChannelDetails) * orig->datalen, "LDKCVec_ChannelDetailsZ clone bytes"), .datalen = orig->datalen }; for (size_t i = 0; i < ret.datalen; i++) { @@ -2895,6 +3096,32 @@ uint64_t __attribute__((export_name("TS_CResult_ProbabilisticScorerDecodeErrorZ return ret_ref; } +static inline struct LDKBestBlock CResult_BestBlockDecodeErrorZ_get_ok(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR owner){ + LDKBestBlock ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_BestBlockDecodeErrorZ_get_ok"))) TS_CResult_BestBlockDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_BestBlockDecodeErrorZ* owner_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(owner); + LDKBestBlock ret_var = CResult_BestBlockDecodeErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_BestBlockDecodeErrorZ_get_err(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +uint64_t __attribute__((export_name("TS_CResult_BestBlockDecodeErrorZ_get_err"))) TS_CResult_BestBlockDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_BestBlockDecodeErrorZ* owner_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_BestBlockDecodeErrorZ_get_err(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + static inline uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR owner){ return owner->a; } @@ -2978,12 +3205,48 @@ void __attribute__((export_name("TS_CResult_ChannelMonitorUpdateStatusNoneZ_get CResult_ChannelMonitorUpdateStatusNoneZ_get_err(owner_conv); } +uint32_t __attribute__((export_name("TS_LDKClosureReason_ty_from_ptr"))) TS_LDKClosureReason_ty_from_ptr(uint64_t ptr) { + LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr); + switch(obj->tag) { + case LDKClosureReason_CounterpartyForceClosed: return 0; + case LDKClosureReason_HolderForceClosed: return 1; + case LDKClosureReason_LegacyCooperativeClosure: return 2; + case LDKClosureReason_CounterpartyInitiatedCooperativeClosure: return 3; + case LDKClosureReason_LocallyInitiatedCooperativeClosure: return 4; + case LDKClosureReason_CommitmentTxConfirmed: return 5; + case LDKClosureReason_FundingTimedOut: return 6; + case LDKClosureReason_ProcessingError: return 7; + case LDKClosureReason_DisconnectedPeer: return 8; + case LDKClosureReason_OutdatedChannelManager: return 9; + case LDKClosureReason_CounterpartyCoopClosedUnfundedChannel: return 10; + case LDKClosureReason_FundingBatchClosure: return 11; + case LDKClosureReason_HTLCsTimedOut: return 12; + default: abort(); + } +} +uint64_t __attribute__((export_name("TS_LDKClosureReason_CounterpartyForceClosed_get_peer_msg"))) TS_LDKClosureReason_CounterpartyForceClosed_get_peer_msg(uint64_t ptr) { + LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr); + assert(obj->tag == LDKClosureReason_CounterpartyForceClosed); + LDKUntrustedString peer_msg_var = obj->counterparty_force_closed.peer_msg; + uint64_t peer_msg_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(peer_msg_var); + peer_msg_ref = tag_ptr(peer_msg_var.inner, false); + return peer_msg_ref; +} +jstring __attribute__((export_name("TS_LDKClosureReason_ProcessingError_get_err"))) TS_LDKClosureReason_ProcessingError_get_err(uint64_t ptr) { + LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr); + assert(obj->tag == LDKClosureReason_ProcessingError); + LDKStr err_str = obj->processing_error.err; + jstring err_conv = str_ref_to_ts(err_str.chars, err_str.len); + return err_conv; +} uint32_t __attribute__((export_name("TS_LDKMonitorEvent_ty_from_ptr"))) TS_LDKMonitorEvent_ty_from_ptr(uint64_t ptr) { LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr); switch(obj->tag) { case LDKMonitorEvent_HTLCEvent: return 0; - case LDKMonitorEvent_HolderForceClosed: return 1; - case LDKMonitorEvent_Completed: return 2; + case LDKMonitorEvent_HolderForceClosedWithInfo: return 1; + case LDKMonitorEvent_HolderForceClosed: return 2; + case LDKMonitorEvent_Completed: return 3; default: abort(); } } @@ -2996,6 +3259,30 @@ uint64_t __attribute__((export_name("TS_LDKMonitorEvent_HTLCEvent_get_htlc_event htlc_event_ref = tag_ptr(htlc_event_var.inner, false); return htlc_event_ref; } +uint64_t __attribute__((export_name("TS_LDKMonitorEvent_HolderForceClosedWithInfo_get_reason"))) TS_LDKMonitorEvent_HolderForceClosedWithInfo_get_reason(uint64_t ptr) { + LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr); + assert(obj->tag == LDKMonitorEvent_HolderForceClosedWithInfo); + uint64_t reason_ref = tag_ptr(&obj->holder_force_closed_with_info.reason, false); + return reason_ref; +} +uint64_t __attribute__((export_name("TS_LDKMonitorEvent_HolderForceClosedWithInfo_get_outpoint"))) TS_LDKMonitorEvent_HolderForceClosedWithInfo_get_outpoint(uint64_t ptr) { + LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr); + assert(obj->tag == LDKMonitorEvent_HolderForceClosedWithInfo); + LDKOutPoint outpoint_var = obj->holder_force_closed_with_info.outpoint; + uint64_t outpoint_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_var); + outpoint_ref = tag_ptr(outpoint_var.inner, false); + return outpoint_ref; +} +uint64_t __attribute__((export_name("TS_LDKMonitorEvent_HolderForceClosedWithInfo_get_channel_id"))) TS_LDKMonitorEvent_HolderForceClosedWithInfo_get_channel_id(uint64_t ptr) { + LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr); + assert(obj->tag == LDKMonitorEvent_HolderForceClosedWithInfo); + LDKChannelId channel_id_var = obj->holder_force_closed_with_info.channel_id; + uint64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; +} uint64_t __attribute__((export_name("TS_LDKMonitorEvent_HolderForceClosed_get_holder_force_closed"))) TS_LDKMonitorEvent_HolderForceClosed_get_holder_force_closed(uint64_t ptr) { LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr); assert(obj->tag == LDKMonitorEvent_HolderForceClosed); @@ -3014,6 +3301,15 @@ uint64_t __attribute__((export_name("TS_LDKMonitorEvent_Completed_get_funding_tx funding_txo_ref = tag_ptr(funding_txo_var.inner, false); return funding_txo_ref; } +uint64_t __attribute__((export_name("TS_LDKMonitorEvent_Completed_get_channel_id"))) TS_LDKMonitorEvent_Completed_get_channel_id(uint64_t ptr) { + LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr); + assert(obj->tag == LDKMonitorEvent_Completed); + LDKChannelId channel_id_var = obj->completed.channel_id; + uint64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; +} int64_t __attribute__((export_name("TS_LDKMonitorEvent_Completed_get_monitor_update_id"))) TS_LDKMonitorEvent_Completed_get_monitor_update_id(uint64_t ptr) { LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr); assert(obj->tag == LDKMonitorEvent_Completed); @@ -3027,26 +3323,40 @@ static inline LDKCVec_MonitorEventZ CVec_MonitorEventZ_clone(const LDKCVec_Monit } return ret; } -static inline struct LDKOutPoint C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ +static inline struct LDKOutPoint C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ LDKOutPoint ret = owner->a; ret.is_owned = false; return ret; } -uint64_t __attribute__((export_name("TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a"))) TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(uint64_t owner) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); - LDKOutPoint ret_var = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(owner_conv); +uint64_t __attribute__((export_name("TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a"))) TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(uint64_t owner) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); + LDKOutPoint ret_var = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(owner_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -static inline struct LDKCVec_MonitorEventZ C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ - return CVec_MonitorEventZ_clone(&owner->b); +static inline struct LDKChannelId C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ + LDKChannelId ret = owner->b; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b"))) TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(uint64_t owner) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); + LDKChannelId ret_var = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -uint64_tArray __attribute__((export_name("TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b"))) TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(uint64_t owner) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); - LDKCVec_MonitorEventZ ret_var = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(owner_conv); + +static inline struct LDKCVec_MonitorEventZ C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ + return CVec_MonitorEventZ_clone(&owner->c); +} +uint64_tArray __attribute__((export_name("TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c"))) TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(uint64_t owner) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); + LDKCVec_MonitorEventZ ret_var = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(owner_conv); uint64_tArray ret_arr = NULL; ret_arr = init_uint64_tArray(ret_var.datalen, __LINE__); uint64_t *ret_arr_ptr = (uint64_t*)(((uint8_t*)ret_arr) + 8); @@ -3061,20 +3371,20 @@ uint64_tArray __attribute__((export_name("TS_C3Tuple_OutPointCVec_MonitorEventZ return ret_arr; } -static inline struct LDKPublicKey C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ - return owner->c; +static inline struct LDKPublicKey C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ + return owner->d; } -int8_tArray __attribute__((export_name("TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c"))) TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(uint64_t owner) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); +int8_tArray __attribute__((export_name("TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d"))) TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(uint64_t owner) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(owner_conv).compressed_form, 33); + memcpy(ret_arr->elems, C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(owner_conv).compressed_form, 33); return ret_arr; } -static inline LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_clone(const LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ *orig) { - LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ) * orig->datalen, "LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ clone bytes"), .datalen = orig->datalen }; +static inline LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_clone(const LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ *orig) { + LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ) * orig->datalen, "LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ clone bytes"), .datalen = orig->datalen }; for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(&orig->data[i]); + ret.data[i] = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(&orig->data[i]); } return ret; } @@ -3260,6 +3570,123 @@ uint64_t __attribute__((export_name("TS_CResult_ChannelTypeFeaturesDecodeErrorZ return ret_ref; } +static inline struct LDKOfferId CResult_OfferIdDecodeErrorZ_get_ok(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR owner){ + LDKOfferId ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_OfferIdDecodeErrorZ_get_ok"))) TS_CResult_OfferIdDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_OfferIdDecodeErrorZ* owner_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(owner); + LDKOfferId ret_var = CResult_OfferIdDecodeErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_OfferIdDecodeErrorZ_get_err(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +uint64_t __attribute__((export_name("TS_CResult_OfferIdDecodeErrorZ_get_err"))) TS_CResult_OfferIdDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_OfferIdDecodeErrorZ* owner_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_OfferIdDecodeErrorZ_get_err(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline void CResult_NoneBolt12SemanticErrorZ_get_ok(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return *owner->contents.result; +} +void __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_get_ok"))) TS_CResult_NoneBolt12SemanticErrorZ_get_ok(uint64_t owner) { + LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner); + CResult_NoneBolt12SemanticErrorZ_get_ok(owner_conv); +} + +static inline enum LDKBolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +uint32_t __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_get_err"))) TS_CResult_NoneBolt12SemanticErrorZ_get_err(uint64_t owner) { + LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner); + uint32_t ret_conv = LDKBolt12SemanticError_to_js(CResult_NoneBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKOffer CResult_OfferBolt12SemanticErrorZ_get_ok(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKOffer ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_OfferBolt12SemanticErrorZ_get_ok"))) TS_CResult_OfferBolt12SemanticErrorZ_get_ok(uint64_t owner) { + LDKCResult_OfferBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(owner); + LDKOffer ret_var = CResult_OfferBolt12SemanticErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_OfferBolt12SemanticErrorZ_get_err(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +uint32_t __attribute__((export_name("TS_CResult_OfferBolt12SemanticErrorZ_get_err"))) TS_CResult_OfferBolt12SemanticErrorZ_get_err(uint64_t owner) { + LDKCResult_OfferBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(owner); + uint32_t ret_conv = LDKBolt12SemanticError_to_js(CResult_OfferBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKInvoiceRequestWithDerivedPayerIdBuilder CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKInvoiceRequestWithDerivedPayerIdBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok"))) TS_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(uint64_t owner) { + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKInvoiceRequestWithDerivedPayerIdBuilder ret_var = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +uint32_t __attribute__((export_name("TS_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err"))) TS_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(uint64_t owner) { + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + uint32_t ret_conv = LDKBolt12SemanticError_to_js(CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKInvoiceRequestWithExplicitPayerIdBuilder CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKInvoiceRequestWithExplicitPayerIdBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok"))) TS_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(uint64_t owner) { + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKInvoiceRequestWithExplicitPayerIdBuilder ret_var = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +uint32_t __attribute__((export_name("TS_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err"))) TS_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(uint64_t owner) { + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + uint32_t ret_conv = LDKBolt12SemanticError_to_js(CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + static inline struct LDKOffer CResult_OfferBolt12ParseErrorZ_get_ok(LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR owner){ LDKOffer ret = *owner->contents.result; ret.is_owned = false; @@ -3288,27 +3715,6 @@ uint64_t __attribute__((export_name("TS_CResult_OfferBolt12ParseErrorZ_get_err" return ret_ref; } -static inline struct LDKPublicKey CResult_PublicKeySecp256k1ErrorZ_get_ok(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){ -CHECK(owner->result_ok); - return *owner->contents.result; -} -int8_tArray __attribute__((export_name("TS_CResult_PublicKeySecp256k1ErrorZ_get_ok"))) TS_CResult_PublicKeySecp256k1ErrorZ_get_ok(uint64_t owner) { - LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner); - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, CResult_PublicKeySecp256k1ErrorZ_get_ok(owner_conv).compressed_form, 33); - return ret_arr; -} - -static inline enum LDKSecp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return *owner->contents.err; -} -uint32_t __attribute__((export_name("TS_CResult_PublicKeySecp256k1ErrorZ_get_err"))) TS_CResult_PublicKeySecp256k1ErrorZ_get_err(uint64_t owner) { - LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner); - uint32_t ret_conv = LDKSecp256k1Error_to_js(CResult_PublicKeySecp256k1ErrorZ_get_err(owner_conv)); - return ret_conv; -} - static inline struct LDKNodeId CResult_NodeIdDecodeErrorZ_get_ok(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR owner){ LDKNodeId ret = *owner->contents.result; ret.is_owned = false; @@ -3335,6 +3741,27 @@ uint64_t __attribute__((export_name("TS_CResult_NodeIdDecodeErrorZ_get_err"))) return ret_ref; } +static inline struct LDKPublicKey CResult_PublicKeySecp256k1ErrorZ_get_ok(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return *owner->contents.result; +} +int8_tArray __attribute__((export_name("TS_CResult_PublicKeySecp256k1ErrorZ_get_ok"))) TS_CResult_PublicKeySecp256k1ErrorZ_get_ok(uint64_t owner) { + LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner); + int8_tArray ret_arr = init_int8_tArray(33, __LINE__); + memcpy(ret_arr->elems, CResult_PublicKeySecp256k1ErrorZ_get_ok(owner_conv).compressed_form, 33); + return ret_arr; +} + +static inline enum LDKSecp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return *owner->contents.err; +} +uint32_t __attribute__((export_name("TS_CResult_PublicKeySecp256k1ErrorZ_get_err"))) TS_CResult_PublicKeySecp256k1ErrorZ_get_err(uint64_t owner) { + LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner); + uint32_t ret_conv = LDKSecp256k1Error_to_js(CResult_PublicKeySecp256k1ErrorZ_get_err(owner_conv)); + return ret_conv; +} + uint32_t __attribute__((export_name("TS_LDKNetworkUpdate_ty_from_ptr"))) TS_LDKNetworkUpdate_ty_from_ptr(uint64_t ptr) { LDKNetworkUpdate *obj = (LDKNetworkUpdate*)untag_ptr(ptr); switch(obj->tag) { @@ -4619,6 +5046,26 @@ uint64_tArray __attribute__((export_name("TS_LDKCOption_CVec_SocketAddressZZ_Som return some_arr; } +static inline uint64_t CResult_u64ShortChannelIdErrorZ_get_ok(LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return *owner->contents.result; +} +int64_t __attribute__((export_name("TS_CResult_u64ShortChannelIdErrorZ_get_ok"))) TS_CResult_u64ShortChannelIdErrorZ_get_ok(uint64_t owner) { + LDKCResult_u64ShortChannelIdErrorZ* owner_conv = (LDKCResult_u64ShortChannelIdErrorZ*)untag_ptr(owner); + int64_t ret_conv = CResult_u64ShortChannelIdErrorZ_get_ok(owner_conv); + return ret_conv; +} + +static inline enum LDKShortChannelIdError CResult_u64ShortChannelIdErrorZ_get_err(LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return ShortChannelIdError_clone(&*owner->contents.err); +} +uint32_t __attribute__((export_name("TS_CResult_u64ShortChannelIdErrorZ_get_err"))) TS_CResult_u64ShortChannelIdErrorZ_get_err(uint64_t owner) { + LDKCResult_u64ShortChannelIdErrorZ* owner_conv = (LDKCResult_u64ShortChannelIdErrorZ*)untag_ptr(owner); + uint32_t ret_conv = LDKShortChannelIdError_to_js(CResult_u64ShortChannelIdErrorZ_get_err(owner_conv)); + return ret_conv; +} + static inline struct LDKPendingHTLCInfo CResult_PendingHTLCInfoInboundHTLCErrZ_get_ok(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR owner){ LDKPendingHTLCInfo ret = *owner->contents.result; ret.is_owned = false; @@ -4743,6 +5190,56 @@ void __attribute__((export_name("TS_CResult_CVec_UtxoZNoneZ_get_err"))) TS_CRes CResult_CVec_UtxoZNoneZ_get_err(owner_conv); } +uint32_t __attribute__((export_name("TS_LDKPaymentContext_ty_from_ptr"))) TS_LDKPaymentContext_ty_from_ptr(uint64_t ptr) { + LDKPaymentContext *obj = (LDKPaymentContext*)untag_ptr(ptr); + switch(obj->tag) { + case LDKPaymentContext_Unknown: return 0; + case LDKPaymentContext_Bolt12Offer: return 1; + case LDKPaymentContext_Bolt12Refund: return 2; + default: abort(); + } +} +uint64_t __attribute__((export_name("TS_LDKPaymentContext_Unknown_get_unknown"))) TS_LDKPaymentContext_Unknown_get_unknown(uint64_t ptr) { + LDKPaymentContext *obj = (LDKPaymentContext*)untag_ptr(ptr); + assert(obj->tag == LDKPaymentContext_Unknown); + LDKUnknownPaymentContext unknown_var = obj->unknown; + uint64_t unknown_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(unknown_var); + unknown_ref = tag_ptr(unknown_var.inner, false); + return unknown_ref; +} +uint64_t __attribute__((export_name("TS_LDKPaymentContext_Bolt12Offer_get_bolt12_offer"))) TS_LDKPaymentContext_Bolt12Offer_get_bolt12_offer(uint64_t ptr) { + LDKPaymentContext *obj = (LDKPaymentContext*)untag_ptr(ptr); + assert(obj->tag == LDKPaymentContext_Bolt12Offer); + LDKBolt12OfferContext bolt12_offer_var = obj->bolt12_offer; + uint64_t bolt12_offer_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(bolt12_offer_var); + bolt12_offer_ref = tag_ptr(bolt12_offer_var.inner, false); + return bolt12_offer_ref; +} +uint64_t __attribute__((export_name("TS_LDKPaymentContext_Bolt12Refund_get_bolt12_refund"))) TS_LDKPaymentContext_Bolt12Refund_get_bolt12_refund(uint64_t ptr) { + LDKPaymentContext *obj = (LDKPaymentContext*)untag_ptr(ptr); + assert(obj->tag == LDKPaymentContext_Bolt12Refund); + LDKBolt12RefundContext bolt12_refund_var = obj->bolt12_refund; + uint64_t bolt12_refund_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(bolt12_refund_var); + bolt12_refund_ref = tag_ptr(bolt12_refund_var.inner, false); + return bolt12_refund_ref; +} +uint32_t __attribute__((export_name("TS_LDKCOption_PaymentContextZ_ty_from_ptr"))) TS_LDKCOption_PaymentContextZ_ty_from_ptr(uint64_t ptr) { + LDKCOption_PaymentContextZ *obj = (LDKCOption_PaymentContextZ*)untag_ptr(ptr); + switch(obj->tag) { + case LDKCOption_PaymentContextZ_Some: return 0; + case LDKCOption_PaymentContextZ_None: return 1; + default: abort(); + } +} +uint64_t __attribute__((export_name("TS_LDKCOption_PaymentContextZ_Some_get_some"))) TS_LDKCOption_PaymentContextZ_Some_get_some(uint64_t ptr) { + LDKCOption_PaymentContextZ *obj = (LDKCOption_PaymentContextZ*)untag_ptr(ptr); + assert(obj->tag == LDKCOption_PaymentContextZ_Some); + uint64_t some_ref = tag_ptr(&obj->some, false); + return some_ref; +} static inline uint64_t C2Tuple_u64u16Z_get_a(LDKC2Tuple_u64u16Z *NONNULL_PTR owner){ return owner->a; } @@ -4791,25 +5288,28 @@ uint32_t __attribute__((export_name("TS_LDKCOption_ChannelShutdownStateZ_Some_ge uint32_t some_conv = LDKChannelShutdownState_to_js(obj->some); return some_conv; } -static inline struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesAPIErrorZ_get_ok(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){ -CHECK(owner->result_ok); - return ThirtyTwoBytes_clone(&*owner->contents.result); +static inline struct LDKChannelId CResult_ChannelIdAPIErrorZ_get_ok(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR owner){ + LDKChannelId ret = *owner->contents.result; + ret.is_owned = false; + return ret; } -int8_tArray __attribute__((export_name("TS_CResult_ThirtyTwoBytesAPIErrorZ_get_ok"))) TS_CResult_ThirtyTwoBytesAPIErrorZ_get_ok(uint64_t owner) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner); - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, CResult_ThirtyTwoBytesAPIErrorZ_get_ok(owner_conv).data, 32); - return ret_arr; +uint64_t __attribute__((export_name("TS_CResult_ChannelIdAPIErrorZ_get_ok"))) TS_CResult_ChannelIdAPIErrorZ_get_ok(uint64_t owner) { + LDKCResult_ChannelIdAPIErrorZ* owner_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(owner); + LDKChannelId ret_var = CResult_ChannelIdAPIErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -static inline struct LDKAPIError CResult_ThirtyTwoBytesAPIErrorZ_get_err(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){ +static inline struct LDKAPIError CResult_ChannelIdAPIErrorZ_get_err(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR owner){ CHECK(!owner->result_ok); return APIError_clone(&*owner->contents.err); } -uint64_t __attribute__((export_name("TS_CResult_ThirtyTwoBytesAPIErrorZ_get_err"))) TS_CResult_ThirtyTwoBytesAPIErrorZ_get_err(uint64_t owner) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner); +uint64_t __attribute__((export_name("TS_CResult_ChannelIdAPIErrorZ_get_err"))) TS_CResult_ChannelIdAPIErrorZ_get_err(uint64_t owner) { + LDKCResult_ChannelIdAPIErrorZ* owner_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(owner); LDKAPIError *ret_copy = MALLOC(sizeof(LDKAPIError), "LDKAPIError"); - *ret_copy = CResult_ThirtyTwoBytesAPIErrorZ_get_err(owner_conv); + *ret_copy = CResult_ChannelIdAPIErrorZ_get_err(owner_conv); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -5144,33 +5644,68 @@ uint64_t __attribute__((export_name("TS_CResult_CVec_C2Tuple_ThirtyTwoBytesThir return ret_ref; } -static inline struct LDKThirtyTwoBytes C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR owner){ - return ThirtyTwoBytes_clone(&owner->a); +static inline struct LDKChannelId C2Tuple_ChannelIdPublicKeyZ_get_a(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR owner){ + LDKChannelId ret = owner->a; + ret.is_owned = false; + return ret; } -int8_tArray __attribute__((export_name("TS_C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a"))) TS_C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(uint64_t owner) { - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* owner_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(owner); - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(owner_conv).data, 32); - return ret_arr; +uint64_t __attribute__((export_name("TS_C2Tuple_ChannelIdPublicKeyZ_get_a"))) TS_C2Tuple_ChannelIdPublicKeyZ_get_a(uint64_t owner) { + LDKC2Tuple_ChannelIdPublicKeyZ* owner_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(owner); + LDKChannelId ret_var = C2Tuple_ChannelIdPublicKeyZ_get_a(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -static inline struct LDKPublicKey C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR owner){ +static inline struct LDKPublicKey C2Tuple_ChannelIdPublicKeyZ_get_b(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR owner){ return owner->b; } -int8_tArray __attribute__((export_name("TS_C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b"))) TS_C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(uint64_t owner) { - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* owner_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(owner); +int8_tArray __attribute__((export_name("TS_C2Tuple_ChannelIdPublicKeyZ_get_b"))) TS_C2Tuple_ChannelIdPublicKeyZ_get_b(uint64_t owner) { + LDKC2Tuple_ChannelIdPublicKeyZ* owner_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(owner); int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(owner_conv).compressed_form, 33); + memcpy(ret_arr->elems, C2Tuple_ChannelIdPublicKeyZ_get_b(owner_conv).compressed_form, 33); return ret_arr; } -static inline LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_clone(const LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ *orig) { - LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ) * orig->datalen, "LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ clone bytes"), .datalen = orig->datalen }; +static inline LDKCVec_C2Tuple_ChannelIdPublicKeyZZ CVec_C2Tuple_ChannelIdPublicKeyZZ_clone(const LDKCVec_C2Tuple_ChannelIdPublicKeyZZ *orig) { + LDKCVec_C2Tuple_ChannelIdPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ) * orig->datalen, "LDKCVec_C2Tuple_ChannelIdPublicKeyZZ clone bytes"), .datalen = orig->datalen }; for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(&orig->data[i]); + ret.data[i] = C2Tuple_ChannelIdPublicKeyZ_clone(&orig->data[i]); } return ret; } +static inline LDKCVec_ChannelIdZ CVec_ChannelIdZ_clone(const LDKCVec_ChannelIdZ *orig) { + LDKCVec_ChannelIdZ ret = { .data = MALLOC(sizeof(LDKChannelId) * orig->datalen, "LDKCVec_ChannelIdZ clone bytes"), .datalen = orig->datalen }; + for (size_t i = 0; i < ret.datalen; i++) { + ret.data[i] = ChannelId_clone(&orig->data[i]); + } + return ret; +} +static inline struct LDKOfferWithDerivedMetadataBuilder CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKOfferWithDerivedMetadataBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok"))) TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(uint64_t owner) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKOfferWithDerivedMetadataBuilder ret_var = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +uint32_t __attribute__((export_name("TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err"))) TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(uint64_t owner) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + uint32_t ret_conv = LDKBolt12SemanticError_to_js(CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + uint32_t __attribute__((export_name("TS_LDKCOption_StrZ_ty_from_ptr"))) TS_LDKCOption_StrZ_ty_from_ptr(uint64_t ptr) { LDKCOption_StrZ *obj = (LDKCOption_StrZ*)untag_ptr(ptr); switch(obj->tag) { @@ -5186,25 +5721,6 @@ jstring __attribute__((export_name("TS_LDKCOption_StrZ_Some_get_some"))) TS_LDKC jstring some_conv = str_ref_to_ts(some_str.chars, some_str.len); return some_conv; } -static inline void CResult_NoneBolt12SemanticErrorZ_get_ok(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){ -CHECK(owner->result_ok); - return *owner->contents.result; -} -void __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_get_ok"))) TS_CResult_NoneBolt12SemanticErrorZ_get_ok(uint64_t owner) { - LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner); - CResult_NoneBolt12SemanticErrorZ_get_ok(owner_conv); -} - -static inline enum LDKBolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return Bolt12SemanticError_clone(&*owner->contents.err); -} -uint32_t __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_get_err"))) TS_CResult_NoneBolt12SemanticErrorZ_get_err(uint64_t owner) { - LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner); - uint32_t ret_conv = LDKBolt12SemanticError_to_js(CResult_NoneBolt12SemanticErrorZ_get_err(owner_conv)); - return ret_conv; -} - static inline struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_ok(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return C2Tuple_ThirtyTwoBytesThirtyTwoBytesZ_clone(&*owner->contents.result); @@ -5225,6 +5741,29 @@ void __attribute__((export_name("TS_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoByte CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_err(owner_conv); } +static inline struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesAPIErrorZ_get_ok(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return ThirtyTwoBytes_clone(&*owner->contents.result); +} +int8_tArray __attribute__((export_name("TS_CResult_ThirtyTwoBytesAPIErrorZ_get_ok"))) TS_CResult_ThirtyTwoBytesAPIErrorZ_get_ok(uint64_t owner) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner); + int8_tArray ret_arr = init_int8_tArray(32, __LINE__); + memcpy(ret_arr->elems, CResult_ThirtyTwoBytesAPIErrorZ_get_ok(owner_conv).data, 32); + return ret_arr; +} + +static inline struct LDKAPIError CResult_ThirtyTwoBytesAPIErrorZ_get_err(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return APIError_clone(&*owner->contents.err); +} +uint64_t __attribute__((export_name("TS_CResult_ThirtyTwoBytesAPIErrorZ_get_err"))) TS_CResult_ThirtyTwoBytesAPIErrorZ_get_err(uint64_t owner) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner); + LDKAPIError *ret_copy = MALLOC(sizeof(LDKAPIError), "LDKAPIError"); + *ret_copy = CResult_ThirtyTwoBytesAPIErrorZ_get_err(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + uint32_t __attribute__((export_name("TS_LDKOffersMessage_ty_from_ptr"))) TS_LDKOffersMessage_ty_from_ptr(uint64_t ptr) { LDKOffersMessage *obj = (LDKOffersMessage*)untag_ptr(ptr); switch(obj->tag) { @@ -5520,6 +6059,12 @@ uint64_t __attribute__((export_name("TS_LDKPendingHTLCRouting_Receive_get_paymen uint64_t payment_metadata_ref = tag_ptr(&obj->receive.payment_metadata, false); return payment_metadata_ref; } +uint64_t __attribute__((export_name("TS_LDKPendingHTLCRouting_Receive_get_payment_context"))) TS_LDKPendingHTLCRouting_Receive_get_payment_context(uint64_t ptr) { + LDKPendingHTLCRouting *obj = (LDKPendingHTLCRouting*)untag_ptr(ptr); + assert(obj->tag == LDKPendingHTLCRouting_Receive); + uint64_t payment_context_ref = tag_ptr(&obj->receive.payment_context, false); + return payment_context_ref; +} int32_t __attribute__((export_name("TS_LDKPendingHTLCRouting_Receive_get_incoming_cltv_expiry"))) TS_LDKPendingHTLCRouting_Receive_get_incoming_cltv_expiry(uint64_t ptr) { LDKPendingHTLCRouting *obj = (LDKPendingHTLCRouting*)untag_ptr(ptr); assert(obj->tag == LDKPendingHTLCRouting_Receive); @@ -5599,6 +6144,12 @@ uint64_tArray __attribute__((export_name("TS_LDKPendingHTLCRouting_ReceiveKeysen return custom_tlvs_arr; } +jboolean __attribute__((export_name("TS_LDKPendingHTLCRouting_ReceiveKeysend_get_requires_blinded_error"))) TS_LDKPendingHTLCRouting_ReceiveKeysend_get_requires_blinded_error(uint64_t ptr) { + LDKPendingHTLCRouting *obj = (LDKPendingHTLCRouting*)untag_ptr(ptr); + assert(obj->tag == LDKPendingHTLCRouting_ReceiveKeysend); + jboolean requires_blinded_error_conv = obj->receive_keysend.requires_blinded_error; + return requires_blinded_error_conv; +} static inline struct LDKPendingHTLCRouting CResult_PendingHTLCRoutingDecodeErrorZ_get_ok(LDKCResult_PendingHTLCRoutingDecodeErrorZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return PendingHTLCRouting_clone(&*owner->contents.result); @@ -5742,23 +6293,23 @@ LDKChannelMonitorUpdateStatus update_channel_LDKWatch_jcall(const void* this_arg LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_js(ret); return ret_conv; } -LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ release_pending_monitor_events_LDKWatch_jcall(const void* this_arg) { +LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ release_pending_monitor_events_LDKWatch_jcall(const void* this_arg) { LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg; uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 20, 0, 0, 0, 0, 0, 0); - LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret_constr; + LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ ret_constr; ret_constr.datalen = ret->arr_len; if (ret_constr.datalen > 0) - ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ Elements"); + ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ Elements"); else ret_constr.data = NULL; uint64_t* ret_vals = ret->elems; - for (size_t x = 0; x < ret_constr.datalen; x++) { - uint64_t ret_conv_49 = ret_vals[x]; - void* ret_conv_49_ptr = untag_ptr(ret_conv_49); - CHECK_ACCESS(ret_conv_49_ptr); - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ ret_conv_49_conv = *(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)(ret_conv_49_ptr); - FREE(untag_ptr(ret_conv_49)); - ret_constr.data[x] = ret_conv_49_conv; + for (size_t f = 0; f < ret_constr.datalen; f++) { + uint64_t ret_conv_57 = ret_vals[f]; + void* ret_conv_57_ptr = untag_ptr(ret_conv_57); + CHECK_ACCESS(ret_conv_57_ptr); + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ ret_conv_57_conv = *(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)(ret_conv_57_ptr); + FREE(untag_ptr(ret_conv_57)); + ret_constr.data[f] = ret_conv_57_conv; } FREE(ret); return ret_constr; @@ -5827,14 +6378,14 @@ uint64_tArray __attribute__((export_name("TS_Watch_release_pending_monitor_even void* this_arg_ptr = untag_ptr(this_arg); if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } LDKWatch* this_arg_conv = (LDKWatch*)this_arg_ptr; - LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret_var = (this_arg_conv->release_pending_monitor_events)(this_arg_conv->this_arg); + LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ ret_var = (this_arg_conv->release_pending_monitor_events)(this_arg_conv->this_arg); uint64_tArray ret_arr = NULL; ret_arr = init_uint64_tArray(ret_var.datalen, __LINE__); uint64_t *ret_arr_ptr = (uint64_t*)(((uint8_t*)ret_arr) + 8); - for (size_t x = 0; x < ret_var.datalen; x++) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv_49_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ"); - *ret_conv_49_conv = ret_var.data[x]; - ret_arr_ptr[x] = tag_ptr(ret_conv_49_conv, true); + for (size_t f = 0; f < ret_var.datalen; f++) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv_57_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ"); + *ret_conv_57_conv = ret_var.data[f]; + ret_arr_ptr[f] = tag_ptr(ret_conv_57_conv, true); } FREE(ret_var.data); @@ -6067,7 +6618,7 @@ LDKCResult_SchnorrSignatureNoneZ sign_bolt12_invoice_request_LDKNodeSigner_jcall LDKNodeSigner_JCalls *j_calls = (LDKNodeSigner_JCalls*) this_arg; LDKUnsignedInvoiceRequest invoice_request_var = *invoice_request; uint64_t invoice_request_ref = 0; - // WARNING: we may need a move here but no clone is available for LDKUnsignedInvoiceRequest + invoice_request_var = UnsignedInvoiceRequest_clone(&invoice_request_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_request_var); invoice_request_ref = tag_ptr(invoice_request_var.inner, invoice_request_var.is_owned); uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 27, invoice_request_ref, 0, 0, 0, 0, 0); @@ -6081,7 +6632,7 @@ LDKCResult_SchnorrSignatureNoneZ sign_bolt12_invoice_LDKNodeSigner_jcall(const v LDKNodeSigner_JCalls *j_calls = (LDKNodeSigner_JCalls*) this_arg; LDKUnsignedBolt12Invoice invoice_var = *invoice; uint64_t invoice_ref = 0; - // WARNING: we may need a move here but no clone is available for LDKUnsignedBolt12Invoice + invoice_var = UnsignedBolt12Invoice_clone(&invoice_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_var); invoice_ref = tag_ptr(invoice_var.inner, invoice_var.is_owned); uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 28, invoice_ref, 0, 0, 0, 0, 0); @@ -7766,34 +8317,6 @@ uint64_t __attribute__((export_name("TS_LDKCOption_SocketAddressZ_Some_get_some" uint64_t some_ref = tag_ptr(&obj->some, false); return some_ref; } -static inline struct LDKPublicKey C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR owner){ - return owner->a; -} -int8_tArray __attribute__((export_name("TS_C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a"))) TS_C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(uint64_t owner) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* owner_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(owner); - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(owner_conv).compressed_form, 33); - return ret_arr; -} - -static inline struct LDKCOption_SocketAddressZ C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR owner){ - return COption_SocketAddressZ_clone(&owner->b); -} -uint64_t __attribute__((export_name("TS_C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b"))) TS_C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(uint64_t owner) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* owner_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(owner); - LDKCOption_SocketAddressZ *ret_copy = MALLOC(sizeof(LDKCOption_SocketAddressZ), "LDKCOption_SocketAddressZ"); - *ret_copy = C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(owner_conv); - uint64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -static inline LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_clone(const LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ *orig) { - LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ) * orig->datalen, "LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ clone bytes"), .datalen = orig->datalen }; - for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(&orig->data[i]); - } - return ret; -} static inline struct LDKCVec_u8Z CResult_CVec_u8ZPeerHandleErrorZ_get_ok(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return CVec_u8Z_clone(&*owner->contents.result); @@ -8042,6 +8565,54 @@ uint32_t __attribute__((export_name("TS_CResult_C2Tuple_ThirtyTwoBytesChannelMo return ret_conv; } +static inline struct LDKUnsignedInvoiceRequest CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKUnsignedInvoiceRequest ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok"))) TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(uint64_t owner) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner); + LDKUnsignedInvoiceRequest ret_var = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +uint32_t __attribute__((export_name("TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err"))) TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(uint64_t owner) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner); + uint32_t ret_conv = LDKBolt12SemanticError_to_js(CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKInvoiceRequest CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKInvoiceRequest ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok"))) TS_CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(uint64_t owner) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner); + LDKInvoiceRequest ret_var = CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +uint32_t __attribute__((export_name("TS_CResult_InvoiceRequestBolt12SemanticErrorZ_get_err"))) TS_CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(uint64_t owner) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner); + uint32_t ret_conv = LDKBolt12SemanticError_to_js(CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + uint32_t __attribute__((export_name("TS_LDKCOption_SecretKeyZ_ty_from_ptr"))) TS_LDKCOption_SecretKeyZ_ty_from_ptr(uint64_t ptr) { LDKCOption_SecretKeyZ *obj = (LDKCOption_SecretKeyZ*)untag_ptr(ptr); switch(obj->tag) { @@ -8057,6 +8628,30 @@ int8_tArray __attribute__((export_name("TS_LDKCOption_SecretKeyZ_Some_get_some") memcpy(some_arr->elems, obj->some.bytes, 32); return some_arr; } +static inline struct LDKInvoiceWithExplicitSigningPubkeyBuilder CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKInvoiceWithExplicitSigningPubkeyBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok"))) TS_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(uint64_t owner) { + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKInvoiceWithExplicitSigningPubkeyBuilder ret_var = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +uint32_t __attribute__((export_name("TS_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err"))) TS_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(uint64_t owner) { + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + uint32_t ret_conv = LDKBolt12SemanticError_to_js(CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + static inline struct LDKVerifiedInvoiceRequest CResult_VerifiedInvoiceRequestNoneZ_get_ok(LDKCResult_VerifiedInvoiceRequestNoneZ *NONNULL_PTR owner){ LDKVerifiedInvoiceRequest ret = *owner->contents.result; ret.is_owned = false; @@ -8080,6 +8675,56 @@ void __attribute__((export_name("TS_CResult_VerifiedInvoiceRequestNoneZ_get_err CResult_VerifiedInvoiceRequestNoneZ_get_err(owner_conv); } +static inline struct LDKInvoiceWithDerivedSigningPubkeyBuilder CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKInvoiceWithDerivedSigningPubkeyBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok"))) TS_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(uint64_t owner) { + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKInvoiceWithDerivedSigningPubkeyBuilder ret_var = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +uint32_t __attribute__((export_name("TS_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err"))) TS_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(uint64_t owner) { + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + uint32_t ret_conv = LDKBolt12SemanticError_to_js(CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKInvoiceRequestFields CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR owner){ + LDKInvoiceRequestFields ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok"))) TS_CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* owner_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(owner); + LDKInvoiceRequestFields ret_var = CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +uint64_t __attribute__((export_name("TS_CResult_InvoiceRequestFieldsDecodeErrorZ_get_err"))) TS_CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* owner_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + static inline LDKCVec_WitnessZ CVec_WitnessZ_clone(const LDKCVec_WitnessZ *orig) { LDKCVec_WitnessZ ret = { .data = MALLOC(sizeof(LDKWitness) * orig->datalen, "LDKCVec_WitnessZ clone bytes"), .datalen = orig->datalen }; for (size_t i = 0; i < ret.datalen; i++) { @@ -8087,6 +8732,21 @@ static inline LDKCVec_WitnessZ CVec_WitnessZ_clone(const LDKCVec_WitnessZ *orig) } return ret; } +uint32_t __attribute__((export_name("TS_LDKCOption_ECDSASignatureZ_ty_from_ptr"))) TS_LDKCOption_ECDSASignatureZ_ty_from_ptr(uint64_t ptr) { + LDKCOption_ECDSASignatureZ *obj = (LDKCOption_ECDSASignatureZ*)untag_ptr(ptr); + switch(obj->tag) { + case LDKCOption_ECDSASignatureZ_Some: return 0; + case LDKCOption_ECDSASignatureZ_None: return 1; + default: abort(); + } +} +int8_tArray __attribute__((export_name("TS_LDKCOption_ECDSASignatureZ_Some_get_some"))) TS_LDKCOption_ECDSASignatureZ_Some_get_some(uint64_t ptr) { + LDKCOption_ECDSASignatureZ *obj = (LDKCOption_ECDSASignatureZ*)untag_ptr(ptr); + assert(obj->tag == LDKCOption_ECDSASignatureZ_Some); + int8_tArray some_arr = init_int8_tArray(64, __LINE__); + memcpy(some_arr->elems, obj->some.compact_form, 64); + return some_arr; +} uint32_t __attribute__((export_name("TS_LDKCOption_i64Z_ty_from_ptr"))) TS_LDKCOption_i64Z_ty_from_ptr(uint64_t ptr) { LDKCOption_i64Z *obj = (LDKCOption_i64Z*)untag_ptr(ptr); switch(obj->tag) { @@ -9965,24 +10625,70 @@ uint64_t __attribute__((export_name("TS_CResult_ShutdownScriptInvalidShutdownSc uint32_t __attribute__((export_name("TS_LDKPaymentPurpose_ty_from_ptr"))) TS_LDKPaymentPurpose_ty_from_ptr(uint64_t ptr) { LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); switch(obj->tag) { - case LDKPaymentPurpose_InvoicePayment: return 0; - case LDKPaymentPurpose_SpontaneousPayment: return 1; + case LDKPaymentPurpose_Bolt11InvoicePayment: return 0; + case LDKPaymentPurpose_Bolt12OfferPayment: return 1; + case LDKPaymentPurpose_Bolt12RefundPayment: return 2; + case LDKPaymentPurpose_SpontaneousPayment: return 3; default: abort(); } } -uint64_t __attribute__((export_name("TS_LDKPaymentPurpose_InvoicePayment_get_payment_preimage"))) TS_LDKPaymentPurpose_InvoicePayment_get_payment_preimage(uint64_t ptr) { +uint64_t __attribute__((export_name("TS_LDKPaymentPurpose_Bolt11InvoicePayment_get_payment_preimage"))) TS_LDKPaymentPurpose_Bolt11InvoicePayment_get_payment_preimage(uint64_t ptr) { LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); - assert(obj->tag == LDKPaymentPurpose_InvoicePayment); - uint64_t payment_preimage_ref = tag_ptr(&obj->invoice_payment.payment_preimage, false); + assert(obj->tag == LDKPaymentPurpose_Bolt11InvoicePayment); + uint64_t payment_preimage_ref = tag_ptr(&obj->bolt11_invoice_payment.payment_preimage, false); return payment_preimage_ref; } -int8_tArray __attribute__((export_name("TS_LDKPaymentPurpose_InvoicePayment_get_payment_secret"))) TS_LDKPaymentPurpose_InvoicePayment_get_payment_secret(uint64_t ptr) { +int8_tArray __attribute__((export_name("TS_LDKPaymentPurpose_Bolt11InvoicePayment_get_payment_secret"))) TS_LDKPaymentPurpose_Bolt11InvoicePayment_get_payment_secret(uint64_t ptr) { LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); - assert(obj->tag == LDKPaymentPurpose_InvoicePayment); + assert(obj->tag == LDKPaymentPurpose_Bolt11InvoicePayment); int8_tArray payment_secret_arr = init_int8_tArray(32, __LINE__); - memcpy(payment_secret_arr->elems, obj->invoice_payment.payment_secret.data, 32); + memcpy(payment_secret_arr->elems, obj->bolt11_invoice_payment.payment_secret.data, 32); return payment_secret_arr; } +uint64_t __attribute__((export_name("TS_LDKPaymentPurpose_Bolt12OfferPayment_get_payment_preimage"))) TS_LDKPaymentPurpose_Bolt12OfferPayment_get_payment_preimage(uint64_t ptr) { + LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); + assert(obj->tag == LDKPaymentPurpose_Bolt12OfferPayment); + uint64_t payment_preimage_ref = tag_ptr(&obj->bolt12_offer_payment.payment_preimage, false); + return payment_preimage_ref; +} +int8_tArray __attribute__((export_name("TS_LDKPaymentPurpose_Bolt12OfferPayment_get_payment_secret"))) TS_LDKPaymentPurpose_Bolt12OfferPayment_get_payment_secret(uint64_t ptr) { + LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); + assert(obj->tag == LDKPaymentPurpose_Bolt12OfferPayment); + int8_tArray payment_secret_arr = init_int8_tArray(32, __LINE__); + memcpy(payment_secret_arr->elems, obj->bolt12_offer_payment.payment_secret.data, 32); + return payment_secret_arr; +} +uint64_t __attribute__((export_name("TS_LDKPaymentPurpose_Bolt12OfferPayment_get_payment_context"))) TS_LDKPaymentPurpose_Bolt12OfferPayment_get_payment_context(uint64_t ptr) { + LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); + assert(obj->tag == LDKPaymentPurpose_Bolt12OfferPayment); + LDKBolt12OfferContext payment_context_var = obj->bolt12_offer_payment.payment_context; + uint64_t payment_context_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_var); + payment_context_ref = tag_ptr(payment_context_var.inner, false); + return payment_context_ref; +} +uint64_t __attribute__((export_name("TS_LDKPaymentPurpose_Bolt12RefundPayment_get_payment_preimage"))) TS_LDKPaymentPurpose_Bolt12RefundPayment_get_payment_preimage(uint64_t ptr) { + LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); + assert(obj->tag == LDKPaymentPurpose_Bolt12RefundPayment); + uint64_t payment_preimage_ref = tag_ptr(&obj->bolt12_refund_payment.payment_preimage, false); + return payment_preimage_ref; +} +int8_tArray __attribute__((export_name("TS_LDKPaymentPurpose_Bolt12RefundPayment_get_payment_secret"))) TS_LDKPaymentPurpose_Bolt12RefundPayment_get_payment_secret(uint64_t ptr) { + LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); + assert(obj->tag == LDKPaymentPurpose_Bolt12RefundPayment); + int8_tArray payment_secret_arr = init_int8_tArray(32, __LINE__); + memcpy(payment_secret_arr->elems, obj->bolt12_refund_payment.payment_secret.data, 32); + return payment_secret_arr; +} +uint64_t __attribute__((export_name("TS_LDKPaymentPurpose_Bolt12RefundPayment_get_payment_context"))) TS_LDKPaymentPurpose_Bolt12RefundPayment_get_payment_context(uint64_t ptr) { + LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); + assert(obj->tag == LDKPaymentPurpose_Bolt12RefundPayment); + LDKBolt12RefundContext payment_context_var = obj->bolt12_refund_payment.payment_context; + uint64_t payment_context_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_var); + payment_context_ref = tag_ptr(payment_context_var.inner, false); + return payment_context_ref; +} int8_tArray __attribute__((export_name("TS_LDKPaymentPurpose_SpontaneousPayment_get_spontaneous_payment"))) TS_LDKPaymentPurpose_SpontaneousPayment_get_spontaneous_payment(uint64_t ptr) { LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); assert(obj->tag == LDKPaymentPurpose_SpontaneousPayment); @@ -10098,38 +10804,6 @@ uint64_t __attribute__((export_name("TS_CResult_COption_PathFailureZDecodeError return ret_ref; } -uint32_t __attribute__((export_name("TS_LDKClosureReason_ty_from_ptr"))) TS_LDKClosureReason_ty_from_ptr(uint64_t ptr) { - LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr); - switch(obj->tag) { - case LDKClosureReason_CounterpartyForceClosed: return 0; - case LDKClosureReason_HolderForceClosed: return 1; - case LDKClosureReason_CooperativeClosure: return 2; - case LDKClosureReason_CommitmentTxConfirmed: return 3; - case LDKClosureReason_FundingTimedOut: return 4; - case LDKClosureReason_ProcessingError: return 5; - case LDKClosureReason_DisconnectedPeer: return 6; - case LDKClosureReason_OutdatedChannelManager: return 7; - case LDKClosureReason_CounterpartyCoopClosedUnfundedChannel: return 8; - case LDKClosureReason_FundingBatchClosure: return 9; - default: abort(); - } -} -uint64_t __attribute__((export_name("TS_LDKClosureReason_CounterpartyForceClosed_get_peer_msg"))) TS_LDKClosureReason_CounterpartyForceClosed_get_peer_msg(uint64_t ptr) { - LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr); - assert(obj->tag == LDKClosureReason_CounterpartyForceClosed); - LDKUntrustedString peer_msg_var = obj->counterparty_force_closed.peer_msg; - uint64_t peer_msg_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(peer_msg_var); - peer_msg_ref = tag_ptr(peer_msg_var.inner, false); - return peer_msg_ref; -} -jstring __attribute__((export_name("TS_LDKClosureReason_ProcessingError_get_err"))) TS_LDKClosureReason_ProcessingError_get_err(uint64_t ptr) { - LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr); - assert(obj->tag == LDKClosureReason_ProcessingError); - LDKStr err_str = obj->processing_error.err; - jstring err_conv = str_ref_to_ts(err_str.chars, err_str.len); - return err_conv; -} uint32_t __attribute__((export_name("TS_LDKCOption_ClosureReasonZ_ty_from_ptr"))) TS_LDKCOption_ClosureReasonZ_ty_from_ptr(uint64_t ptr) { LDKCOption_ClosureReasonZ *obj = (LDKCOption_ClosureReasonZ*)untag_ptr(ptr); switch(obj->tag) { @@ -10174,7 +10848,8 @@ uint32_t __attribute__((export_name("TS_LDKHTLCDestination_ty_from_ptr"))) TS_LD case LDKHTLCDestination_NextHopChannel: return 0; case LDKHTLCDestination_UnknownNextHop: return 1; case LDKHTLCDestination_InvalidForward: return 2; - case LDKHTLCDestination_FailedPayment: return 3; + case LDKHTLCDestination_InvalidOnion: return 3; + case LDKHTLCDestination_FailedPayment: return 4; default: abort(); } } @@ -10185,12 +10860,14 @@ int8_tArray __attribute__((export_name("TS_LDKHTLCDestination_NextHopChannel_get memcpy(node_id_arr->elems, obj->next_hop_channel.node_id.compressed_form, 33); return node_id_arr; } -int8_tArray __attribute__((export_name("TS_LDKHTLCDestination_NextHopChannel_get_channel_id"))) TS_LDKHTLCDestination_NextHopChannel_get_channel_id(uint64_t ptr) { +uint64_t __attribute__((export_name("TS_LDKHTLCDestination_NextHopChannel_get_channel_id"))) TS_LDKHTLCDestination_NextHopChannel_get_channel_id(uint64_t ptr) { LDKHTLCDestination *obj = (LDKHTLCDestination*)untag_ptr(ptr); assert(obj->tag == LDKHTLCDestination_NextHopChannel); - int8_tArray channel_id_arr = init_int8_tArray(32, __LINE__); - memcpy(channel_id_arr->elems, obj->next_hop_channel.channel_id.data, 32); - return channel_id_arr; + LDKChannelId channel_id_var = obj->next_hop_channel.channel_id; + uint64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; } int64_t __attribute__((export_name("TS_LDKHTLCDestination_UnknownNextHop_get_requested_forward_scid"))) TS_LDKHTLCDestination_UnknownNextHop_get_requested_forward_scid(uint64_t ptr) { LDKHTLCDestination *obj = (LDKHTLCDestination*)untag_ptr(ptr); @@ -10315,6 +10992,22 @@ uint32_t __attribute__((export_name("TS_LDKBumpTransactionEvent_ty_from_ptr"))) default: abort(); } } +uint64_t __attribute__((export_name("TS_LDKBumpTransactionEvent_ChannelClose_get_channel_id"))) TS_LDKBumpTransactionEvent_ChannelClose_get_channel_id(uint64_t ptr) { + LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr); + assert(obj->tag == LDKBumpTransactionEvent_ChannelClose); + LDKChannelId channel_id_var = obj->channel_close.channel_id; + uint64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; +} +int8_tArray __attribute__((export_name("TS_LDKBumpTransactionEvent_ChannelClose_get_counterparty_node_id"))) TS_LDKBumpTransactionEvent_ChannelClose_get_counterparty_node_id(uint64_t ptr) { + LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr); + assert(obj->tag == LDKBumpTransactionEvent_ChannelClose); + int8_tArray counterparty_node_id_arr = init_int8_tArray(33, __LINE__); + memcpy(counterparty_node_id_arr->elems, obj->channel_close.counterparty_node_id.compressed_form, 33); + return counterparty_node_id_arr; +} int8_tArray __attribute__((export_name("TS_LDKBumpTransactionEvent_ChannelClose_get_claim_id"))) TS_LDKBumpTransactionEvent_ChannelClose_get_claim_id(uint64_t ptr) { LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr); assert(obj->tag == LDKBumpTransactionEvent_ChannelClose); @@ -10368,6 +11061,22 @@ uint64_tArray __attribute__((export_name("TS_LDKBumpTransactionEvent_ChannelClos return pending_htlcs_arr; } +uint64_t __attribute__((export_name("TS_LDKBumpTransactionEvent_HTLCResolution_get_channel_id"))) TS_LDKBumpTransactionEvent_HTLCResolution_get_channel_id(uint64_t ptr) { + LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr); + assert(obj->tag == LDKBumpTransactionEvent_HTLCResolution); + LDKChannelId channel_id_var = obj->htlc_resolution.channel_id; + uint64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; +} +int8_tArray __attribute__((export_name("TS_LDKBumpTransactionEvent_HTLCResolution_get_counterparty_node_id"))) TS_LDKBumpTransactionEvent_HTLCResolution_get_counterparty_node_id(uint64_t ptr) { + LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr); + assert(obj->tag == LDKBumpTransactionEvent_HTLCResolution); + int8_tArray counterparty_node_id_arr = init_int8_tArray(33, __LINE__); + memcpy(counterparty_node_id_arr->elems, obj->htlc_resolution.counterparty_node_id.compressed_form, 33); + return counterparty_node_id_arr; +} int8_tArray __attribute__((export_name("TS_LDKBumpTransactionEvent_HTLCResolution_get_claim_id"))) TS_LDKBumpTransactionEvent_HTLCResolution_get_claim_id(uint64_t ptr) { LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr); assert(obj->tag == LDKBumpTransactionEvent_HTLCResolution); @@ -10432,12 +11141,14 @@ uint32_t __attribute__((export_name("TS_LDKEvent_ty_from_ptr"))) TS_LDKEvent_ty_ default: abort(); } } -int8_tArray __attribute__((export_name("TS_LDKEvent_FundingGenerationReady_get_temporary_channel_id"))) TS_LDKEvent_FundingGenerationReady_get_temporary_channel_id(uint64_t ptr) { +uint64_t __attribute__((export_name("TS_LDKEvent_FundingGenerationReady_get_temporary_channel_id"))) TS_LDKEvent_FundingGenerationReady_get_temporary_channel_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); assert(obj->tag == LDKEvent_FundingGenerationReady); - int8_tArray temporary_channel_id_arr = init_int8_tArray(32, __LINE__); - memcpy(temporary_channel_id_arr->elems, obj->funding_generation_ready.temporary_channel_id.data, 32); - return temporary_channel_id_arr; + LDKChannelId temporary_channel_id_var = obj->funding_generation_ready.temporary_channel_id; + uint64_t temporary_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_var); + temporary_channel_id_ref = tag_ptr(temporary_channel_id_var.inner, false); + return temporary_channel_id_ref; } int8_tArray __attribute__((export_name("TS_LDKEvent_FundingGenerationReady_get_counterparty_node_id"))) TS_LDKEvent_FundingGenerationReady_get_counterparty_node_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); @@ -10511,7 +11222,10 @@ uint64_t __attribute__((export_name("TS_LDKEvent_PaymentClaimable_get_purpose")) uint64_t __attribute__((export_name("TS_LDKEvent_PaymentClaimable_get_via_channel_id"))) TS_LDKEvent_PaymentClaimable_get_via_channel_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); assert(obj->tag == LDKEvent_PaymentClaimable); - uint64_t via_channel_id_ref = tag_ptr(&obj->payment_claimable.via_channel_id, false); + LDKChannelId via_channel_id_var = obj->payment_claimable.via_channel_id; + uint64_t via_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(via_channel_id_var); + via_channel_id_ref = tag_ptr(via_channel_id_var.inner, false); return via_channel_id_ref; } uint64_t __attribute__((export_name("TS_LDKEvent_PaymentClaimable_get_via_user_channel_id"))) TS_LDKEvent_PaymentClaimable_get_via_user_channel_id(uint64_t ptr) { @@ -10818,26 +11532,53 @@ uint64_tArray __attribute__((export_name("TS_LDKEvent_SpendableOutputs_get_outpu uint64_t __attribute__((export_name("TS_LDKEvent_SpendableOutputs_get_channel_id"))) TS_LDKEvent_SpendableOutputs_get_channel_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); assert(obj->tag == LDKEvent_SpendableOutputs); - uint64_t channel_id_ref = tag_ptr(&obj->spendable_outputs.channel_id, false); + LDKChannelId channel_id_var = obj->spendable_outputs.channel_id; + uint64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); return channel_id_ref; } uint64_t __attribute__((export_name("TS_LDKEvent_PaymentForwarded_get_prev_channel_id"))) TS_LDKEvent_PaymentForwarded_get_prev_channel_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); assert(obj->tag == LDKEvent_PaymentForwarded); - uint64_t prev_channel_id_ref = tag_ptr(&obj->payment_forwarded.prev_channel_id, false); + LDKChannelId prev_channel_id_var = obj->payment_forwarded.prev_channel_id; + uint64_t prev_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_var); + prev_channel_id_ref = tag_ptr(prev_channel_id_var.inner, false); return prev_channel_id_ref; } uint64_t __attribute__((export_name("TS_LDKEvent_PaymentForwarded_get_next_channel_id"))) TS_LDKEvent_PaymentForwarded_get_next_channel_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); assert(obj->tag == LDKEvent_PaymentForwarded); - uint64_t next_channel_id_ref = tag_ptr(&obj->payment_forwarded.next_channel_id, false); + LDKChannelId next_channel_id_var = obj->payment_forwarded.next_channel_id; + uint64_t next_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(next_channel_id_var); + next_channel_id_ref = tag_ptr(next_channel_id_var.inner, false); return next_channel_id_ref; } -uint64_t __attribute__((export_name("TS_LDKEvent_PaymentForwarded_get_fee_earned_msat"))) TS_LDKEvent_PaymentForwarded_get_fee_earned_msat(uint64_t ptr) { +uint64_t __attribute__((export_name("TS_LDKEvent_PaymentForwarded_get_prev_user_channel_id"))) TS_LDKEvent_PaymentForwarded_get_prev_user_channel_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); assert(obj->tag == LDKEvent_PaymentForwarded); - uint64_t fee_earned_msat_ref = tag_ptr(&obj->payment_forwarded.fee_earned_msat, false); - return fee_earned_msat_ref; + uint64_t prev_user_channel_id_ref = tag_ptr(&obj->payment_forwarded.prev_user_channel_id, false); + return prev_user_channel_id_ref; +} +uint64_t __attribute__((export_name("TS_LDKEvent_PaymentForwarded_get_next_user_channel_id"))) TS_LDKEvent_PaymentForwarded_get_next_user_channel_id(uint64_t ptr) { + LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); + assert(obj->tag == LDKEvent_PaymentForwarded); + uint64_t next_user_channel_id_ref = tag_ptr(&obj->payment_forwarded.next_user_channel_id, false); + return next_user_channel_id_ref; +} +uint64_t __attribute__((export_name("TS_LDKEvent_PaymentForwarded_get_total_fee_earned_msat"))) TS_LDKEvent_PaymentForwarded_get_total_fee_earned_msat(uint64_t ptr) { + LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); + assert(obj->tag == LDKEvent_PaymentForwarded); + uint64_t total_fee_earned_msat_ref = tag_ptr(&obj->payment_forwarded.total_fee_earned_msat, false); + return total_fee_earned_msat_ref; +} +uint64_t __attribute__((export_name("TS_LDKEvent_PaymentForwarded_get_skimmed_fee_msat"))) TS_LDKEvent_PaymentForwarded_get_skimmed_fee_msat(uint64_t ptr) { + LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); + assert(obj->tag == LDKEvent_PaymentForwarded); + uint64_t skimmed_fee_msat_ref = tag_ptr(&obj->payment_forwarded.skimmed_fee_msat, false); + return skimmed_fee_msat_ref; } jboolean __attribute__((export_name("TS_LDKEvent_PaymentForwarded_get_claim_from_onchain_tx"))) TS_LDKEvent_PaymentForwarded_get_claim_from_onchain_tx(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); @@ -10851,12 +11592,14 @@ uint64_t __attribute__((export_name("TS_LDKEvent_PaymentForwarded_get_outbound_a uint64_t outbound_amount_forwarded_msat_ref = tag_ptr(&obj->payment_forwarded.outbound_amount_forwarded_msat, false); return outbound_amount_forwarded_msat_ref; } -int8_tArray __attribute__((export_name("TS_LDKEvent_ChannelPending_get_channel_id"))) TS_LDKEvent_ChannelPending_get_channel_id(uint64_t ptr) { +uint64_t __attribute__((export_name("TS_LDKEvent_ChannelPending_get_channel_id"))) TS_LDKEvent_ChannelPending_get_channel_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); assert(obj->tag == LDKEvent_ChannelPending); - int8_tArray channel_id_arr = init_int8_tArray(32, __LINE__); - memcpy(channel_id_arr->elems, obj->channel_pending.channel_id.data, 32); - return channel_id_arr; + LDKChannelId channel_id_var = obj->channel_pending.channel_id; + uint64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; } int8_tArray __attribute__((export_name("TS_LDKEvent_ChannelPending_get_user_channel_id"))) TS_LDKEvent_ChannelPending_get_user_channel_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); @@ -10868,7 +11611,10 @@ int8_tArray __attribute__((export_name("TS_LDKEvent_ChannelPending_get_user_chan uint64_t __attribute__((export_name("TS_LDKEvent_ChannelPending_get_former_temporary_channel_id"))) TS_LDKEvent_ChannelPending_get_former_temporary_channel_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); assert(obj->tag == LDKEvent_ChannelPending); - uint64_t former_temporary_channel_id_ref = tag_ptr(&obj->channel_pending.former_temporary_channel_id, false); + LDKChannelId former_temporary_channel_id_var = obj->channel_pending.former_temporary_channel_id; + uint64_t former_temporary_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(former_temporary_channel_id_var); + former_temporary_channel_id_ref = tag_ptr(former_temporary_channel_id_var.inner, false); return former_temporary_channel_id_ref; } int8_tArray __attribute__((export_name("TS_LDKEvent_ChannelPending_get_counterparty_node_id"))) TS_LDKEvent_ChannelPending_get_counterparty_node_id(uint64_t ptr) { @@ -10887,12 +11633,23 @@ uint64_t __attribute__((export_name("TS_LDKEvent_ChannelPending_get_funding_txo" funding_txo_ref = tag_ptr(funding_txo_var.inner, false); return funding_txo_ref; } -int8_tArray __attribute__((export_name("TS_LDKEvent_ChannelReady_get_channel_id"))) TS_LDKEvent_ChannelReady_get_channel_id(uint64_t ptr) { +uint64_t __attribute__((export_name("TS_LDKEvent_ChannelPending_get_channel_type"))) TS_LDKEvent_ChannelPending_get_channel_type(uint64_t ptr) { + LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); + assert(obj->tag == LDKEvent_ChannelPending); + LDKChannelTypeFeatures channel_type_var = obj->channel_pending.channel_type; + uint64_t channel_type_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_var); + channel_type_ref = tag_ptr(channel_type_var.inner, false); + return channel_type_ref; +} +uint64_t __attribute__((export_name("TS_LDKEvent_ChannelReady_get_channel_id"))) TS_LDKEvent_ChannelReady_get_channel_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); assert(obj->tag == LDKEvent_ChannelReady); - int8_tArray channel_id_arr = init_int8_tArray(32, __LINE__); - memcpy(channel_id_arr->elems, obj->channel_ready.channel_id.data, 32); - return channel_id_arr; + LDKChannelId channel_id_var = obj->channel_ready.channel_id; + uint64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; } int8_tArray __attribute__((export_name("TS_LDKEvent_ChannelReady_get_user_channel_id"))) TS_LDKEvent_ChannelReady_get_user_channel_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); @@ -10917,12 +11674,14 @@ uint64_t __attribute__((export_name("TS_LDKEvent_ChannelReady_get_channel_type") channel_type_ref = tag_ptr(channel_type_var.inner, false); return channel_type_ref; } -int8_tArray __attribute__((export_name("TS_LDKEvent_ChannelClosed_get_channel_id"))) TS_LDKEvent_ChannelClosed_get_channel_id(uint64_t ptr) { +uint64_t __attribute__((export_name("TS_LDKEvent_ChannelClosed_get_channel_id"))) TS_LDKEvent_ChannelClosed_get_channel_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); assert(obj->tag == LDKEvent_ChannelClosed); - int8_tArray channel_id_arr = init_int8_tArray(32, __LINE__); - memcpy(channel_id_arr->elems, obj->channel_closed.channel_id.data, 32); - return channel_id_arr; + LDKChannelId channel_id_var = obj->channel_closed.channel_id; + uint64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; } int8_tArray __attribute__((export_name("TS_LDKEvent_ChannelClosed_get_user_channel_id"))) TS_LDKEvent_ChannelClosed_get_user_channel_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); @@ -10959,12 +11718,14 @@ uint64_t __attribute__((export_name("TS_LDKEvent_ChannelClosed_get_channel_fundi channel_funding_txo_ref = tag_ptr(channel_funding_txo_var.inner, false); return channel_funding_txo_ref; } -int8_tArray __attribute__((export_name("TS_LDKEvent_DiscardFunding_get_channel_id"))) TS_LDKEvent_DiscardFunding_get_channel_id(uint64_t ptr) { +uint64_t __attribute__((export_name("TS_LDKEvent_DiscardFunding_get_channel_id"))) TS_LDKEvent_DiscardFunding_get_channel_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); assert(obj->tag == LDKEvent_DiscardFunding); - int8_tArray channel_id_arr = init_int8_tArray(32, __LINE__); - memcpy(channel_id_arr->elems, obj->discard_funding.channel_id.data, 32); - return channel_id_arr; + LDKChannelId channel_id_var = obj->discard_funding.channel_id; + uint64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; } int8_tArray __attribute__((export_name("TS_LDKEvent_DiscardFunding_get_transaction"))) TS_LDKEvent_DiscardFunding_get_transaction(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); @@ -10974,12 +11735,14 @@ int8_tArray __attribute__((export_name("TS_LDKEvent_DiscardFunding_get_transacti memcpy(transaction_arr->elems, transaction_var.data, transaction_var.datalen); return transaction_arr; } -int8_tArray __attribute__((export_name("TS_LDKEvent_OpenChannelRequest_get_temporary_channel_id"))) TS_LDKEvent_OpenChannelRequest_get_temporary_channel_id(uint64_t ptr) { +uint64_t __attribute__((export_name("TS_LDKEvent_OpenChannelRequest_get_temporary_channel_id"))) TS_LDKEvent_OpenChannelRequest_get_temporary_channel_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); assert(obj->tag == LDKEvent_OpenChannelRequest); - int8_tArray temporary_channel_id_arr = init_int8_tArray(32, __LINE__); - memcpy(temporary_channel_id_arr->elems, obj->open_channel_request.temporary_channel_id.data, 32); - return temporary_channel_id_arr; + LDKChannelId temporary_channel_id_var = obj->open_channel_request.temporary_channel_id; + uint64_t temporary_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_var); + temporary_channel_id_ref = tag_ptr(temporary_channel_id_var.inner, false); + return temporary_channel_id_ref; } int8_tArray __attribute__((export_name("TS_LDKEvent_OpenChannelRequest_get_counterparty_node_id"))) TS_LDKEvent_OpenChannelRequest_get_counterparty_node_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); @@ -11009,12 +11772,14 @@ uint64_t __attribute__((export_name("TS_LDKEvent_OpenChannelRequest_get_channel_ channel_type_ref = tag_ptr(channel_type_var.inner, false); return channel_type_ref; } -int8_tArray __attribute__((export_name("TS_LDKEvent_HTLCHandlingFailed_get_prev_channel_id"))) TS_LDKEvent_HTLCHandlingFailed_get_prev_channel_id(uint64_t ptr) { +uint64_t __attribute__((export_name("TS_LDKEvent_HTLCHandlingFailed_get_prev_channel_id"))) TS_LDKEvent_HTLCHandlingFailed_get_prev_channel_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); assert(obj->tag == LDKEvent_HTLCHandlingFailed); - int8_tArray prev_channel_id_arr = init_int8_tArray(32, __LINE__); - memcpy(prev_channel_id_arr->elems, obj->htlc_handling_failed.prev_channel_id.data, 32); - return prev_channel_id_arr; + LDKChannelId prev_channel_id_var = obj->htlc_handling_failed.prev_channel_id; + uint64_t prev_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_var); + prev_channel_id_ref = tag_ptr(prev_channel_id_var.inner, false); + return prev_channel_id_ref; } uint64_t __attribute__((export_name("TS_LDKEvent_HTLCHandlingFailed_get_failed_next_destination"))) TS_LDKEvent_HTLCHandlingFailed_get_failed_next_destination(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); @@ -11552,6 +12317,32 @@ uint64_t __attribute__((export_name("TS_CResult_UntrustedStringDecodeErrorZ_get return ret_ref; } +static inline struct LDKChannelId CResult_ChannelIdDecodeErrorZ_get_ok(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR owner){ + LDKChannelId ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_ChannelIdDecodeErrorZ_get_ok"))) TS_CResult_ChannelIdDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_ChannelIdDecodeErrorZ* owner_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(owner); + LDKChannelId ret_var = CResult_ChannelIdDecodeErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_ChannelIdDecodeErrorZ_get_err(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +uint64_t __attribute__((export_name("TS_CResult_ChannelIdDecodeErrorZ_get_err"))) TS_CResult_ChannelIdDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_ChannelIdDecodeErrorZ* owner_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_ChannelIdDecodeErrorZ_get_err(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + static inline struct LDKThirtyTwoBytes C2Tuple__u832u16Z_get_a(LDKC2Tuple__u832u16Z *NONNULL_PTR owner){ return ThirtyTwoBytes_clone(&owner->a); } @@ -11623,6 +12414,129 @@ uint64_t __attribute__((export_name("TS_CResult_PaymentConstraintsDecodeErrorZ_ return ret_ref; } +static inline struct LDKPaymentContext CResult_PaymentContextDecodeErrorZ_get_ok(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return PaymentContext_clone(&*owner->contents.result); +} +uint64_t __attribute__((export_name("TS_CResult_PaymentContextDecodeErrorZ_get_ok"))) TS_CResult_PaymentContextDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_PaymentContextDecodeErrorZ* owner_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(owner); + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = CResult_PaymentContextDecodeErrorZ_get_ok(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_PaymentContextDecodeErrorZ_get_err(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +uint64_t __attribute__((export_name("TS_CResult_PaymentContextDecodeErrorZ_get_err"))) TS_CResult_PaymentContextDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_PaymentContextDecodeErrorZ* owner_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_PaymentContextDecodeErrorZ_get_err(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKUnknownPaymentContext CResult_UnknownPaymentContextDecodeErrorZ_get_ok(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR owner){ + LDKUnknownPaymentContext ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_UnknownPaymentContextDecodeErrorZ_get_ok"))) TS_CResult_UnknownPaymentContextDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* owner_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(owner); + LDKUnknownPaymentContext ret_var = CResult_UnknownPaymentContextDecodeErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_UnknownPaymentContextDecodeErrorZ_get_err(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +uint64_t __attribute__((export_name("TS_CResult_UnknownPaymentContextDecodeErrorZ_get_err"))) TS_CResult_UnknownPaymentContextDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* owner_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_UnknownPaymentContextDecodeErrorZ_get_err(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKBolt12OfferContext CResult_Bolt12OfferContextDecodeErrorZ_get_ok(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR owner){ + LDKBolt12OfferContext ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_Bolt12OfferContextDecodeErrorZ_get_ok"))) TS_CResult_Bolt12OfferContextDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(owner); + LDKBolt12OfferContext ret_var = CResult_Bolt12OfferContextDecodeErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_Bolt12OfferContextDecodeErrorZ_get_err(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +uint64_t __attribute__((export_name("TS_CResult_Bolt12OfferContextDecodeErrorZ_get_err"))) TS_CResult_Bolt12OfferContextDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_Bolt12OfferContextDecodeErrorZ_get_err(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKBolt12RefundContext CResult_Bolt12RefundContextDecodeErrorZ_get_ok(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR owner){ + LDKBolt12RefundContext ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_Bolt12RefundContextDecodeErrorZ_get_ok"))) TS_CResult_Bolt12RefundContextDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(owner); + LDKBolt12RefundContext ret_var = CResult_Bolt12RefundContextDecodeErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_Bolt12RefundContextDecodeErrorZ_get_err(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +uint64_t __attribute__((export_name("TS_CResult_Bolt12RefundContextDecodeErrorZ_get_err"))) TS_CResult_Bolt12RefundContextDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_Bolt12RefundContextDecodeErrorZ_get_err(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKStr CResult_StrSecp256k1ErrorZ_get_ok(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return *owner->contents.result; +} +jstring __attribute__((export_name("TS_CResult_StrSecp256k1ErrorZ_get_ok"))) TS_CResult_StrSecp256k1ErrorZ_get_ok(uint64_t owner) { + LDKCResult_StrSecp256k1ErrorZ* owner_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(owner); + LDKStr ret_str = CResult_StrSecp256k1ErrorZ_get_ok(owner_conv); + jstring ret_conv = str_ref_to_ts(ret_str.chars, ret_str.len); + return ret_conv; +} + +static inline enum LDKSecp256k1Error CResult_StrSecp256k1ErrorZ_get_err(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return *owner->contents.err; +} +uint32_t __attribute__((export_name("TS_CResult_StrSecp256k1ErrorZ_get_err"))) TS_CResult_StrSecp256k1ErrorZ_get_err(uint64_t owner) { + LDKCResult_StrSecp256k1ErrorZ* owner_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(owner); + uint32_t ret_conv = LDKSecp256k1Error_to_js(CResult_StrSecp256k1ErrorZ_get_err(owner_conv)); + return ret_conv; +} + static inline struct LDKThirtyTwoBytes C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){ return ThirtyTwoBytes_clone(&owner->a); } @@ -11681,27 +12595,6 @@ void __attribute__((export_name("TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnio CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(owner_conv); } -static inline struct LDKStr CResult_StrSecp256k1ErrorZ_get_ok(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner){ -CHECK(owner->result_ok); - return *owner->contents.result; -} -jstring __attribute__((export_name("TS_CResult_StrSecp256k1ErrorZ_get_ok"))) TS_CResult_StrSecp256k1ErrorZ_get_ok(uint64_t owner) { - LDKCResult_StrSecp256k1ErrorZ* owner_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(owner); - LDKStr ret_str = CResult_StrSecp256k1ErrorZ_get_ok(owner_conv); - jstring ret_conv = str_ref_to_ts(ret_str.chars, ret_str.len); - return ret_conv; -} - -static inline enum LDKSecp256k1Error CResult_StrSecp256k1ErrorZ_get_err(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return *owner->contents.err; -} -uint32_t __attribute__((export_name("TS_CResult_StrSecp256k1ErrorZ_get_err"))) TS_CResult_StrSecp256k1ErrorZ_get_err(uint64_t owner) { - LDKCResult_StrSecp256k1ErrorZ* owner_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(owner); - uint32_t ret_conv = LDKSecp256k1Error_to_js(CResult_StrSecp256k1ErrorZ_get_err(owner_conv)); - return ret_conv; -} - static inline struct LDKPublicKey C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_a(LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ *NONNULL_PTR owner){ return owner->a; } @@ -11748,7 +12641,8 @@ uint32_t __attribute__((export_name("TS_LDKSendError_ty_from_ptr"))) TS_LDKSendE case LDKSendError_InvalidMessage: return 5; case LDKSendError_BufferFull: return 6; case LDKSendError_GetNodeIdFailed: return 7; - case LDKSendError_BlindedPathAdvanceFailed: return 8; + case LDKSendError_UnresolvedIntroductionNode: return 8; + case LDKSendError_BlindedPathAdvanceFailed: return 9; default: abort(); } } @@ -11788,6 +12682,27 @@ uint64_t __attribute__((export_name("TS_CResult_C3Tuple_PublicKeyOnionMessageCO return ret_ref; } +uint32_t __attribute__((export_name("TS_LDKNextMessageHop_ty_from_ptr"))) TS_LDKNextMessageHop_ty_from_ptr(uint64_t ptr) { + LDKNextMessageHop *obj = (LDKNextMessageHop*)untag_ptr(ptr); + switch(obj->tag) { + case LDKNextMessageHop_NodeId: return 0; + case LDKNextMessageHop_ShortChannelId: return 1; + default: abort(); + } +} +int8_tArray __attribute__((export_name("TS_LDKNextMessageHop_NodeId_get_node_id"))) TS_LDKNextMessageHop_NodeId_get_node_id(uint64_t ptr) { + LDKNextMessageHop *obj = (LDKNextMessageHop*)untag_ptr(ptr); + assert(obj->tag == LDKNextMessageHop_NodeId); + int8_tArray node_id_arr = init_int8_tArray(33, __LINE__); + memcpy(node_id_arr->elems, obj->node_id.compressed_form, 33); + return node_id_arr; +} +int64_t __attribute__((export_name("TS_LDKNextMessageHop_ShortChannelId_get_short_channel_id"))) TS_LDKNextMessageHop_ShortChannelId_get_short_channel_id(uint64_t ptr) { + LDKNextMessageHop *obj = (LDKNextMessageHop*)untag_ptr(ptr); + assert(obj->tag == LDKNextMessageHop_ShortChannelId); + int64_t short_channel_id_conv = obj->short_channel_id; + return short_channel_id_conv; +} uint32_t __attribute__((export_name("TS_LDKParsedOnionMessageContents_ty_from_ptr"))) TS_LDKParsedOnionMessageContents_ty_from_ptr(uint64_t ptr) { LDKParsedOnionMessageContents *obj = (LDKParsedOnionMessageContents*)untag_ptr(ptr); switch(obj->tag) { @@ -11817,12 +12732,11 @@ uint32_t __attribute__((export_name("TS_LDKPeeledOnion_ty_from_ptr"))) TS_LDKPee default: abort(); } } -int8_tArray __attribute__((export_name("TS_LDKPeeledOnion_Forward_get__0"))) TS_LDKPeeledOnion_Forward_get__0(uint64_t ptr) { +uint64_t __attribute__((export_name("TS_LDKPeeledOnion_Forward_get__0"))) TS_LDKPeeledOnion_Forward_get__0(uint64_t ptr) { LDKPeeledOnion *obj = (LDKPeeledOnion*)untag_ptr(ptr); assert(obj->tag == LDKPeeledOnion_Forward); - int8_tArray _0_arr = init_int8_tArray(33, __LINE__); - memcpy(_0_arr->elems, obj->forward._0.compressed_form, 33); - return _0_arr; + uint64_t _0_ref = tag_ptr(&obj->forward._0, false); + return _0_ref; } uint64_t __attribute__((export_name("TS_LDKPeeledOnion_Forward_get__1"))) TS_LDKPeeledOnion_Forward_get__1(uint64_t ptr) { LDKPeeledOnion *obj = (LDKPeeledOnion*)untag_ptr(ptr); @@ -12043,158 +12957,122 @@ uint64_t __attribute__((export_name("TS_CResult_InvoiceErrorDecodeErrorZ_get_er return ret_ref; } -static inline struct LDKDelayedPaymentBasepoint CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){ - LDKDelayedPaymentBasepoint ret = *owner->contents.result; +static inline struct LDKTrackedSpendableOutput CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR owner){ + LDKTrackedSpendableOutput ret = *owner->contents.result; ret.is_owned = false; return ret; } -uint64_t __attribute__((export_name("TS_CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok"))) TS_CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(uint64_t owner) { - LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner); - LDKDelayedPaymentBasepoint ret_var = CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(owner_conv); +uint64_t __attribute__((export_name("TS_CResult_TrackedSpendableOutputDecodeErrorZ_get_ok"))) TS_CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* owner_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(owner); + LDKTrackedSpendableOutput ret_var = CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(owner_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -static inline struct LDKDecodeError CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){ +static inline struct LDKDecodeError CResult_TrackedSpendableOutputDecodeErrorZ_get_err(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR owner){ CHECK(!owner->result_ok); return DecodeError_clone(&*owner->contents.err); } -uint64_t __attribute__((export_name("TS_CResult_DelayedPaymentBasepointDecodeErrorZ_get_err"))) TS_CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(uint64_t owner) { - LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner); +uint64_t __attribute__((export_name("TS_CResult_TrackedSpendableOutputDecodeErrorZ_get_err"))) TS_CResult_TrackedSpendableOutputDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* owner_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(owner); LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(owner_conv); + *ret_copy = CResult_TrackedSpendableOutputDecodeErrorZ_get_err(owner_conv); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -static inline struct LDKDelayedPaymentKey CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){ - LDKDelayedPaymentKey ret = *owner->contents.result; - ret.is_owned = false; - return ret; -} -uint64_t __attribute__((export_name("TS_CResult_DelayedPaymentKeyDecodeErrorZ_get_ok"))) TS_CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(uint64_t owner) { - LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner); - LDKDelayedPaymentKey ret_var = CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(owner_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -static inline struct LDKDecodeError CResult_DelayedPaymentKeyDecodeErrorZ_get_err(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return DecodeError_clone(&*owner->contents.err); -} -uint64_t __attribute__((export_name("TS_CResult_DelayedPaymentKeyDecodeErrorZ_get_err"))) TS_CResult_DelayedPaymentKeyDecodeErrorZ_get_err(uint64_t owner) { - LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner); - LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_DelayedPaymentKeyDecodeErrorZ_get_err(owner_conv); - uint64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -static inline struct LDKHtlcBasepoint CResult_HtlcBasepointDecodeErrorZ_get_ok(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){ - LDKHtlcBasepoint ret = *owner->contents.result; - ret.is_owned = false; - return ret; -} -uint64_t __attribute__((export_name("TS_CResult_HtlcBasepointDecodeErrorZ_get_ok"))) TS_CResult_HtlcBasepointDecodeErrorZ_get_ok(uint64_t owner) { - LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner); - LDKHtlcBasepoint ret_var = CResult_HtlcBasepointDecodeErrorZ_get_ok(owner_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -static inline struct LDKDecodeError CResult_HtlcBasepointDecodeErrorZ_get_err(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return DecodeError_clone(&*owner->contents.err); -} -uint64_t __attribute__((export_name("TS_CResult_HtlcBasepointDecodeErrorZ_get_err"))) TS_CResult_HtlcBasepointDecodeErrorZ_get_err(uint64_t owner) { - LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner); - LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_HtlcBasepointDecodeErrorZ_get_err(owner_conv); - uint64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -static inline struct LDKHtlcKey CResult_HtlcKeyDecodeErrorZ_get_ok(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){ - LDKHtlcKey ret = *owner->contents.result; - ret.is_owned = false; - return ret; -} -uint64_t __attribute__((export_name("TS_CResult_HtlcKeyDecodeErrorZ_get_ok"))) TS_CResult_HtlcKeyDecodeErrorZ_get_ok(uint64_t owner) { - LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner); - LDKHtlcKey ret_var = CResult_HtlcKeyDecodeErrorZ_get_ok(owner_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -static inline struct LDKDecodeError CResult_HtlcKeyDecodeErrorZ_get_err(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return DecodeError_clone(&*owner->contents.err); -} -uint64_t __attribute__((export_name("TS_CResult_HtlcKeyDecodeErrorZ_get_err"))) TS_CResult_HtlcKeyDecodeErrorZ_get_err(uint64_t owner) { - LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner); - LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_HtlcKeyDecodeErrorZ_get_err(owner_conv); - uint64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; +uint32_t __attribute__((export_name("TS_LDKOutputSpendStatus_ty_from_ptr"))) TS_LDKOutputSpendStatus_ty_from_ptr(uint64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + switch(obj->tag) { + case LDKOutputSpendStatus_PendingInitialBroadcast: return 0; + case LDKOutputSpendStatus_PendingFirstConfirmation: return 1; + case LDKOutputSpendStatus_PendingThresholdConfirmations: return 2; + default: abort(); + } } - -static inline struct LDKRevocationBasepoint CResult_RevocationBasepointDecodeErrorZ_get_ok(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){ - LDKRevocationBasepoint ret = *owner->contents.result; - ret.is_owned = false; - return ret; +uint64_t __attribute__((export_name("TS_LDKOutputSpendStatus_PendingInitialBroadcast_get_delayed_until_height"))) TS_LDKOutputSpendStatus_PendingInitialBroadcast_get_delayed_until_height(uint64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + assert(obj->tag == LDKOutputSpendStatus_PendingInitialBroadcast); + uint64_t delayed_until_height_ref = tag_ptr(&obj->pending_initial_broadcast.delayed_until_height, false); + return delayed_until_height_ref; +} +int8_tArray __attribute__((export_name("TS_LDKOutputSpendStatus_PendingFirstConfirmation_get_first_broadcast_hash"))) TS_LDKOutputSpendStatus_PendingFirstConfirmation_get_first_broadcast_hash(uint64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + assert(obj->tag == LDKOutputSpendStatus_PendingFirstConfirmation); + int8_tArray first_broadcast_hash_arr = init_int8_tArray(32, __LINE__); + memcpy(first_broadcast_hash_arr->elems, obj->pending_first_confirmation.first_broadcast_hash.data, 32); + return first_broadcast_hash_arr; +} +int32_t __attribute__((export_name("TS_LDKOutputSpendStatus_PendingFirstConfirmation_get_latest_broadcast_height"))) TS_LDKOutputSpendStatus_PendingFirstConfirmation_get_latest_broadcast_height(uint64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + assert(obj->tag == LDKOutputSpendStatus_PendingFirstConfirmation); + int32_t latest_broadcast_height_conv = obj->pending_first_confirmation.latest_broadcast_height; + return latest_broadcast_height_conv; +} +int8_tArray __attribute__((export_name("TS_LDKOutputSpendStatus_PendingFirstConfirmation_get_latest_spending_tx"))) TS_LDKOutputSpendStatus_PendingFirstConfirmation_get_latest_spending_tx(uint64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + assert(obj->tag == LDKOutputSpendStatus_PendingFirstConfirmation); + LDKTransaction latest_spending_tx_var = obj->pending_first_confirmation.latest_spending_tx; + int8_tArray latest_spending_tx_arr = init_int8_tArray(latest_spending_tx_var.datalen, __LINE__); + memcpy(latest_spending_tx_arr->elems, latest_spending_tx_var.data, latest_spending_tx_var.datalen); + return latest_spending_tx_arr; +} +int8_tArray __attribute__((export_name("TS_LDKOutputSpendStatus_PendingThresholdConfirmations_get_first_broadcast_hash"))) TS_LDKOutputSpendStatus_PendingThresholdConfirmations_get_first_broadcast_hash(uint64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + assert(obj->tag == LDKOutputSpendStatus_PendingThresholdConfirmations); + int8_tArray first_broadcast_hash_arr = init_int8_tArray(32, __LINE__); + memcpy(first_broadcast_hash_arr->elems, obj->pending_threshold_confirmations.first_broadcast_hash.data, 32); + return first_broadcast_hash_arr; +} +int32_t __attribute__((export_name("TS_LDKOutputSpendStatus_PendingThresholdConfirmations_get_latest_broadcast_height"))) TS_LDKOutputSpendStatus_PendingThresholdConfirmations_get_latest_broadcast_height(uint64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + assert(obj->tag == LDKOutputSpendStatus_PendingThresholdConfirmations); + int32_t latest_broadcast_height_conv = obj->pending_threshold_confirmations.latest_broadcast_height; + return latest_broadcast_height_conv; +} +int8_tArray __attribute__((export_name("TS_LDKOutputSpendStatus_PendingThresholdConfirmations_get_latest_spending_tx"))) TS_LDKOutputSpendStatus_PendingThresholdConfirmations_get_latest_spending_tx(uint64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + assert(obj->tag == LDKOutputSpendStatus_PendingThresholdConfirmations); + LDKTransaction latest_spending_tx_var = obj->pending_threshold_confirmations.latest_spending_tx; + int8_tArray latest_spending_tx_arr = init_int8_tArray(latest_spending_tx_var.datalen, __LINE__); + memcpy(latest_spending_tx_arr->elems, latest_spending_tx_var.data, latest_spending_tx_var.datalen); + return latest_spending_tx_arr; +} +int32_t __attribute__((export_name("TS_LDKOutputSpendStatus_PendingThresholdConfirmations_get_confirmation_height"))) TS_LDKOutputSpendStatus_PendingThresholdConfirmations_get_confirmation_height(uint64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + assert(obj->tag == LDKOutputSpendStatus_PendingThresholdConfirmations); + int32_t confirmation_height_conv = obj->pending_threshold_confirmations.confirmation_height; + return confirmation_height_conv; } -uint64_t __attribute__((export_name("TS_CResult_RevocationBasepointDecodeErrorZ_get_ok"))) TS_CResult_RevocationBasepointDecodeErrorZ_get_ok(uint64_t owner) { - LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner); - LDKRevocationBasepoint ret_var = CResult_RevocationBasepointDecodeErrorZ_get_ok(owner_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; +int8_tArray __attribute__((export_name("TS_LDKOutputSpendStatus_PendingThresholdConfirmations_get_confirmation_hash"))) TS_LDKOutputSpendStatus_PendingThresholdConfirmations_get_confirmation_hash(uint64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + assert(obj->tag == LDKOutputSpendStatus_PendingThresholdConfirmations); + int8_tArray confirmation_hash_arr = init_int8_tArray(32, __LINE__); + memcpy(confirmation_hash_arr->elems, obj->pending_threshold_confirmations.confirmation_hash.data, 32); + return confirmation_hash_arr; } - -static inline struct LDKDecodeError CResult_RevocationBasepointDecodeErrorZ_get_err(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return DecodeError_clone(&*owner->contents.err); +static inline struct LDKOutputSpendStatus CResult_OutputSpendStatusDecodeErrorZ_get_ok(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return OutputSpendStatus_clone(&*owner->contents.result); } -uint64_t __attribute__((export_name("TS_CResult_RevocationBasepointDecodeErrorZ_get_err"))) TS_CResult_RevocationBasepointDecodeErrorZ_get_err(uint64_t owner) { - LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner); - LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_RevocationBasepointDecodeErrorZ_get_err(owner_conv); +uint64_t __attribute__((export_name("TS_CResult_OutputSpendStatusDecodeErrorZ_get_ok"))) TS_CResult_OutputSpendStatusDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_OutputSpendStatusDecodeErrorZ* owner_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(owner); + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = CResult_OutputSpendStatusDecodeErrorZ_get_ok(owner_conv); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -static inline struct LDKRevocationKey CResult_RevocationKeyDecodeErrorZ_get_ok(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){ - LDKRevocationKey ret = *owner->contents.result; - ret.is_owned = false; - return ret; -} -uint64_t __attribute__((export_name("TS_CResult_RevocationKeyDecodeErrorZ_get_ok"))) TS_CResult_RevocationKeyDecodeErrorZ_get_ok(uint64_t owner) { - LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner); - LDKRevocationKey ret_var = CResult_RevocationKeyDecodeErrorZ_get_ok(owner_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -static inline struct LDKDecodeError CResult_RevocationKeyDecodeErrorZ_get_err(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){ +static inline struct LDKDecodeError CResult_OutputSpendStatusDecodeErrorZ_get_err(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR owner){ CHECK(!owner->result_ok); return DecodeError_clone(&*owner->contents.err); } -uint64_t __attribute__((export_name("TS_CResult_RevocationKeyDecodeErrorZ_get_err"))) TS_CResult_RevocationKeyDecodeErrorZ_get_err(uint64_t owner) { - LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner); +uint64_t __attribute__((export_name("TS_CResult_OutputSpendStatusDecodeErrorZ_get_err"))) TS_CResult_OutputSpendStatusDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_OutputSpendStatusDecodeErrorZ* owner_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(owner); LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_RevocationKeyDecodeErrorZ_get_err(owner_conv); + *ret_copy = CResult_OutputSpendStatusDecodeErrorZ_get_err(owner_conv); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -12295,85 +13173,62 @@ uint64_t __attribute__((export_name("TS_LDKCOption_FilterZ_Some_get_some"))) TS_ } return tag_ptr(some_ret, true); } -static inline struct LDKLockedChannelMonitor CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){ - LDKLockedChannelMonitor ret = *owner->contents.result; - ret.is_owned = false; - return ret; -} -uint64_t __attribute__((export_name("TS_CResult_LockedChannelMonitorNoneZ_get_ok"))) TS_CResult_LockedChannelMonitorNoneZ_get_ok(uint64_t owner) { - LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner); - LDKLockedChannelMonitor ret_var = CResult_LockedChannelMonitorNoneZ_get_ok(owner_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -static inline void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return *owner->contents.err; -} -void __attribute__((export_name("TS_CResult_LockedChannelMonitorNoneZ_get_err"))) TS_CResult_LockedChannelMonitorNoneZ_get_err(uint64_t owner) { - LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner); - CResult_LockedChannelMonitorNoneZ_get_err(owner_conv); -} - -static inline LDKCVec_OutPointZ CVec_OutPointZ_clone(const LDKCVec_OutPointZ *orig) { - LDKCVec_OutPointZ ret = { .data = MALLOC(sizeof(LDKOutPoint) * orig->datalen, "LDKCVec_OutPointZ clone bytes"), .datalen = orig->datalen }; +static inline LDKCVec_TrackedSpendableOutputZ CVec_TrackedSpendableOutputZ_clone(const LDKCVec_TrackedSpendableOutputZ *orig) { + LDKCVec_TrackedSpendableOutputZ ret = { .data = MALLOC(sizeof(LDKTrackedSpendableOutput) * orig->datalen, "LDKCVec_TrackedSpendableOutputZ clone bytes"), .datalen = orig->datalen }; for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = OutPoint_clone(&orig->data[i]); + ret.data[i] = TrackedSpendableOutput_clone(&orig->data[i]); } return ret; } -static inline LDKCVec_MonitorUpdateIdZ CVec_MonitorUpdateIdZ_clone(const LDKCVec_MonitorUpdateIdZ *orig) { - LDKCVec_MonitorUpdateIdZ ret = { .data = MALLOC(sizeof(LDKMonitorUpdateId) * orig->datalen, "LDKCVec_MonitorUpdateIdZ clone bytes"), .datalen = orig->datalen }; - for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = MonitorUpdateId_clone(&orig->data[i]); +typedef struct LDKChangeDestinationSource_JCalls { + atomic_size_t refcnt; + uint32_t instance_ptr; +} LDKChangeDestinationSource_JCalls; +static void LDKChangeDestinationSource_JCalls_free(void* this_arg) { + LDKChangeDestinationSource_JCalls *j_calls = (LDKChangeDestinationSource_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + FREE(j_calls); } - return ret; } -static inline struct LDKOutPoint C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){ - LDKOutPoint ret = owner->a; - ret.is_owned = false; - return ret; +LDKCResult_CVec_u8ZNoneZ get_change_destination_script_LDKChangeDestinationSource_jcall(const void* this_arg) { + LDKChangeDestinationSource_JCalls *j_calls = (LDKChangeDestinationSource_JCalls*) this_arg; + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 49, 0, 0, 0, 0, 0, 0); + void* ret_ptr = untag_ptr(ret); + CHECK_ACCESS(ret_ptr); + LDKCResult_CVec_u8ZNoneZ ret_conv = *(LDKCResult_CVec_u8ZNoneZ*)(ret_ptr); + FREE(untag_ptr(ret)); + return ret_conv; } -uint64_t __attribute__((export_name("TS_C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a"))) TS_C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(uint64_t owner) { - LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner); - LDKOutPoint ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(owner_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; +static void LDKChangeDestinationSource_JCalls_cloned(LDKChangeDestinationSource* new_obj) { + LDKChangeDestinationSource_JCalls *j_calls = (LDKChangeDestinationSource_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); } +static inline LDKChangeDestinationSource LDKChangeDestinationSource_init (JSValue o) { + LDKChangeDestinationSource_JCalls *calls = MALLOC(sizeof(LDKChangeDestinationSource_JCalls), "LDKChangeDestinationSource_JCalls"); + atomic_init(&calls->refcnt, 1); + calls->instance_ptr = o; -static inline struct LDKCVec_MonitorUpdateIdZ C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){ - return CVec_MonitorUpdateIdZ_clone(&owner->b); + LDKChangeDestinationSource ret = { + .this_arg = (void*) calls, + .get_change_destination_script = get_change_destination_script_LDKChangeDestinationSource_jcall, + .free = LDKChangeDestinationSource_JCalls_free, + }; + return ret; } -uint64_tArray __attribute__((export_name("TS_C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b"))) TS_C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(uint64_t owner) { - LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner); - LDKCVec_MonitorUpdateIdZ ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(owner_conv); - uint64_tArray ret_arr = NULL; - ret_arr = init_uint64_tArray(ret_var.datalen, __LINE__); - uint64_t *ret_arr_ptr = (uint64_t*)(((uint8_t*)ret_arr) + 8); - for (size_t r = 0; r < ret_var.datalen; r++) { - LDKMonitorUpdateId ret_conv_17_var = ret_var.data[r]; - uint64_t ret_conv_17_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_17_var); - ret_conv_17_ref = tag_ptr(ret_conv_17_var.inner, ret_conv_17_var.is_owned); - ret_arr_ptr[r] = ret_conv_17_ref; - } - - FREE(ret_var.data); - return ret_arr; +uint64_t __attribute__((export_name("TS_LDKChangeDestinationSource_new"))) TS_LDKChangeDestinationSource_new(JSValue o) { + LDKChangeDestinationSource *res_ptr = MALLOC(sizeof(LDKChangeDestinationSource), "LDKChangeDestinationSource"); + *res_ptr = LDKChangeDestinationSource_init(o); + return tag_ptr(res_ptr, true); } - -static inline LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ CVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ_clone(const LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ *orig) { - LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ) * orig->datalen, "LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ clone bytes"), .datalen = orig->datalen }; - for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_clone(&orig->data[i]); - } - return ret; +uint64_t __attribute__((export_name("TS_ChangeDestinationSource_get_change_destination_script"))) TS_ChangeDestinationSource_get_change_destination_script(uint64_t this_arg) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKChangeDestinationSource* this_arg_conv = (LDKChangeDestinationSource*)this_arg_ptr; + LDKCResult_CVec_u8ZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_u8ZNoneZ), "LDKCResult_CVec_u8ZNoneZ"); + *ret_conv = (this_arg_conv->get_change_destination_script)(this_arg_conv->this_arg); + return tag_ptr(ret_conv, true); } + typedef struct LDKKVStore_JCalls { atomic_size_t refcnt; uint32_t instance_ptr; @@ -12395,7 +13250,7 @@ LDKCResult_CVec_u8ZIOErrorZ read_LDKKVStore_jcall(const void* this_arg, LDKStr p LDKStr key_str = key; jstring key_conv = str_ref_to_ts(key_str.chars, key_str.len); Str_free(key_str); - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 49, primary_namespace_conv, secondary_namespace_conv, key_conv, 0, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 50, primary_namespace_conv, secondary_namespace_conv, key_conv, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_CVec_u8ZIOErrorZ ret_conv = *(LDKCResult_CVec_u8ZIOErrorZ*)(ret_ptr); @@ -12416,7 +13271,7 @@ LDKCResult_NoneIOErrorZ write_LDKKVStore_jcall(const void* this_arg, LDKStr prim LDKu8slice buf_var = buf; int8_tArray buf_arr = init_int8_tArray(buf_var.datalen, __LINE__); memcpy(buf_arr->elems, buf_var.data, buf_var.datalen); - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 50, primary_namespace_conv, secondary_namespace_conv, key_conv, (uint32_t)buf_arr, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 51, primary_namespace_conv, secondary_namespace_conv, key_conv, (uint32_t)buf_arr, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr); @@ -12435,7 +13290,7 @@ LDKCResult_NoneIOErrorZ remove_LDKKVStore_jcall(const void* this_arg, LDKStr pri jstring key_conv = str_ref_to_ts(key_str.chars, key_str.len); Str_free(key_str); jboolean lazy_conv = lazy; - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 51, primary_namespace_conv, secondary_namespace_conv, key_conv, lazy_conv, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 52, primary_namespace_conv, secondary_namespace_conv, key_conv, lazy_conv, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr); @@ -12450,7 +13305,7 @@ LDKCResult_CVec_StrZIOErrorZ list_LDKKVStore_jcall(const void* this_arg, LDKStr LDKStr secondary_namespace_str = secondary_namespace; jstring secondary_namespace_conv = str_ref_to_ts(secondary_namespace_str.chars, secondary_namespace_str.len); Str_free(secondary_namespace_str); - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 52, primary_namespace_conv, secondary_namespace_conv, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 53, primary_namespace_conv, secondary_namespace_conv, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_CVec_StrZIOErrorZ ret_conv = *(LDKCResult_CVec_StrZIOErrorZ*)(ret_ptr); @@ -12532,6 +13387,465 @@ uint64_t __attribute__((export_name("TS_KVStore_list"))) TS_KVStore_list(uint64 return tag_ptr(ret_conv, true); } +typedef struct LDKOutputSpender_JCalls { + atomic_size_t refcnt; + uint32_t instance_ptr; +} LDKOutputSpender_JCalls; +static void LDKOutputSpender_JCalls_free(void* this_arg) { + LDKOutputSpender_JCalls *j_calls = (LDKOutputSpender_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + FREE(j_calls); + } +} +LDKCResult_TransactionNoneZ spend_spendable_outputs_LDKOutputSpender_jcall(const void* this_arg, LDKCVec_SpendableOutputDescriptorZ descriptors, LDKCVec_TxOutZ outputs, LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight, LDKCOption_u32Z locktime) { + LDKOutputSpender_JCalls *j_calls = (LDKOutputSpender_JCalls*) this_arg; + LDKCVec_SpendableOutputDescriptorZ descriptors_var = descriptors; + uint64_tArray descriptors_arr = NULL; + descriptors_arr = init_uint64_tArray(descriptors_var.datalen, __LINE__); + uint64_t *descriptors_arr_ptr = (uint64_t*)(((uint8_t*)descriptors_arr) + 8); + for (size_t b = 0; b < descriptors_var.datalen; b++) { + LDKSpendableOutputDescriptor *descriptors_conv_27_copy = MALLOC(sizeof(LDKSpendableOutputDescriptor), "LDKSpendableOutputDescriptor"); + *descriptors_conv_27_copy = descriptors_var.data[b]; + uint64_t descriptors_conv_27_ref = tag_ptr(descriptors_conv_27_copy, true); + descriptors_arr_ptr[b] = descriptors_conv_27_ref; + } + + FREE(descriptors_var.data); + LDKCVec_TxOutZ outputs_var = outputs; + uint64_tArray outputs_arr = NULL; + outputs_arr = init_uint64_tArray(outputs_var.datalen, __LINE__); + uint64_t *outputs_arr_ptr = (uint64_t*)(((uint8_t*)outputs_arr) + 8); + for (size_t h = 0; h < outputs_var.datalen; h++) { + LDKTxOut* outputs_conv_7_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut"); + *outputs_conv_7_ref = outputs_var.data[h]; + outputs_arr_ptr[h] = tag_ptr(outputs_conv_7_ref, true); + } + + FREE(outputs_var.data); + LDKCVec_u8Z change_destination_script_var = change_destination_script; + int8_tArray change_destination_script_arr = init_int8_tArray(change_destination_script_var.datalen, __LINE__); + memcpy(change_destination_script_arr->elems, change_destination_script_var.data, change_destination_script_var.datalen); + CVec_u8Z_free(change_destination_script_var); + int32_t feerate_sat_per_1000_weight_conv = feerate_sat_per_1000_weight; + LDKCOption_u32Z *locktime_copy = MALLOC(sizeof(LDKCOption_u32Z), "LDKCOption_u32Z"); + *locktime_copy = locktime; + uint64_t locktime_ref = tag_ptr(locktime_copy, true); + uint64_t ret = js_invoke_function_uuuubu(j_calls->instance_ptr, 54, (uint32_t)descriptors_arr, (uint32_t)outputs_arr, (uint32_t)change_destination_script_arr, feerate_sat_per_1000_weight_conv, locktime_ref, 0); + void* ret_ptr = untag_ptr(ret); + CHECK_ACCESS(ret_ptr); + LDKCResult_TransactionNoneZ ret_conv = *(LDKCResult_TransactionNoneZ*)(ret_ptr); + FREE(untag_ptr(ret)); + return ret_conv; +} +static void LDKOutputSpender_JCalls_cloned(LDKOutputSpender* new_obj) { + LDKOutputSpender_JCalls *j_calls = (LDKOutputSpender_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +} +static inline LDKOutputSpender LDKOutputSpender_init (JSValue o) { + LDKOutputSpender_JCalls *calls = MALLOC(sizeof(LDKOutputSpender_JCalls), "LDKOutputSpender_JCalls"); + atomic_init(&calls->refcnt, 1); + calls->instance_ptr = o; + + LDKOutputSpender ret = { + .this_arg = (void*) calls, + .spend_spendable_outputs = spend_spendable_outputs_LDKOutputSpender_jcall, + .free = LDKOutputSpender_JCalls_free, + }; + return ret; +} +uint64_t __attribute__((export_name("TS_LDKOutputSpender_new"))) TS_LDKOutputSpender_new(JSValue o) { + LDKOutputSpender *res_ptr = MALLOC(sizeof(LDKOutputSpender), "LDKOutputSpender"); + *res_ptr = LDKOutputSpender_init(o); + return tag_ptr(res_ptr, true); +} +uint64_t __attribute__((export_name("TS_OutputSpender_spend_spendable_outputs"))) TS_OutputSpender_spend_spendable_outputs(uint64_t this_arg, uint64_tArray descriptors, uint64_tArray outputs, int8_tArray change_destination_script, int32_t feerate_sat_per_1000_weight, uint64_t locktime) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKOutputSpender* this_arg_conv = (LDKOutputSpender*)this_arg_ptr; + LDKCVec_SpendableOutputDescriptorZ descriptors_constr; + descriptors_constr.datalen = descriptors->arr_len; + if (descriptors_constr.datalen > 0) + descriptors_constr.data = MALLOC(descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements"); + else + descriptors_constr.data = NULL; + uint64_t* descriptors_vals = descriptors->elems; + for (size_t b = 0; b < descriptors_constr.datalen; b++) { + uint64_t descriptors_conv_27 = descriptors_vals[b]; + void* descriptors_conv_27_ptr = untag_ptr(descriptors_conv_27); + CHECK_ACCESS(descriptors_conv_27_ptr); + LDKSpendableOutputDescriptor descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(descriptors_conv_27_ptr); + descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptors_conv_27)); + descriptors_constr.data[b] = descriptors_conv_27_conv; + } + FREE(descriptors); + LDKCVec_TxOutZ outputs_constr; + outputs_constr.datalen = outputs->arr_len; + if (outputs_constr.datalen > 0) + outputs_constr.data = MALLOC(outputs_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements"); + else + outputs_constr.data = NULL; + uint64_t* outputs_vals = outputs->elems; + for (size_t h = 0; h < outputs_constr.datalen; h++) { + uint64_t outputs_conv_7 = outputs_vals[h]; + void* outputs_conv_7_ptr = untag_ptr(outputs_conv_7); + CHECK_ACCESS(outputs_conv_7_ptr); + LDKTxOut outputs_conv_7_conv = *(LDKTxOut*)(outputs_conv_7_ptr); + outputs_conv_7_conv = TxOut_clone((LDKTxOut*)untag_ptr(outputs_conv_7)); + outputs_constr.data[h] = outputs_conv_7_conv; + } + FREE(outputs); + LDKCVec_u8Z change_destination_script_ref; + change_destination_script_ref.datalen = change_destination_script->arr_len; + change_destination_script_ref.data = MALLOC(change_destination_script_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(change_destination_script_ref.data, change_destination_script->elems, change_destination_script_ref.datalen); FREE(change_destination_script); + void* locktime_ptr = untag_ptr(locktime); + CHECK_ACCESS(locktime_ptr); + LDKCOption_u32Z locktime_conv = *(LDKCOption_u32Z*)(locktime_ptr); + locktime_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(locktime)); + LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); + *ret_conv = (this_arg_conv->spend_spendable_outputs)(this_arg_conv->this_arg, descriptors_constr, outputs_constr, change_destination_script_ref, feerate_sat_per_1000_weight, locktime_conv); + return tag_ptr(ret_conv, true); +} + +static inline struct LDKOutputSweeper CResult_OutputSweeperDecodeErrorZ_get_ok(LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR owner){ + LDKOutputSweeper ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_OutputSweeperDecodeErrorZ_get_ok"))) TS_CResult_OutputSweeperDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_OutputSweeperDecodeErrorZ* owner_conv = (LDKCResult_OutputSweeperDecodeErrorZ*)untag_ptr(owner); + LDKOutputSweeper ret_var = CResult_OutputSweeperDecodeErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_OutputSweeperDecodeErrorZ_get_err(LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +uint64_t __attribute__((export_name("TS_CResult_OutputSweeperDecodeErrorZ_get_err"))) TS_CResult_OutputSweeperDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_OutputSweeperDecodeErrorZ* owner_conv = (LDKCResult_OutputSweeperDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_OutputSweeperDecodeErrorZ_get_err(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKBestBlock C2Tuple_BestBlockOutputSweeperZ_get_a(LDKC2Tuple_BestBlockOutputSweeperZ *NONNULL_PTR owner){ + LDKBestBlock ret = owner->a; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_C2Tuple_BestBlockOutputSweeperZ_get_a"))) TS_C2Tuple_BestBlockOutputSweeperZ_get_a(uint64_t owner) { + LDKC2Tuple_BestBlockOutputSweeperZ* owner_conv = (LDKC2Tuple_BestBlockOutputSweeperZ*)untag_ptr(owner); + LDKBestBlock ret_var = C2Tuple_BestBlockOutputSweeperZ_get_a(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKOutputSweeper C2Tuple_BestBlockOutputSweeperZ_get_b(LDKC2Tuple_BestBlockOutputSweeperZ *NONNULL_PTR owner){ + LDKOutputSweeper ret = owner->b; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_C2Tuple_BestBlockOutputSweeperZ_get_b"))) TS_C2Tuple_BestBlockOutputSweeperZ_get_b(uint64_t owner) { + LDKC2Tuple_BestBlockOutputSweeperZ* owner_conv = (LDKC2Tuple_BestBlockOutputSweeperZ*)untag_ptr(owner); + LDKOutputSweeper ret_var = C2Tuple_BestBlockOutputSweeperZ_get_b(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKC2Tuple_BestBlockOutputSweeperZ *CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return &*owner->contents.result; +} +uint64_t __attribute__((export_name("TS_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok"))) TS_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* owner_conv = (LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)untag_ptr(owner); + uint64_t ret_ret = tag_ptr(CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(owner_conv), false); + return ret_ret; +} + +static inline struct LDKDecodeError CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +uint64_t __attribute__((export_name("TS_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err"))) TS_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* owner_conv = (LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKDelayedPaymentBasepoint CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){ + LDKDelayedPaymentBasepoint ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok"))) TS_CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner); + LDKDelayedPaymentBasepoint ret_var = CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +uint64_t __attribute__((export_name("TS_CResult_DelayedPaymentBasepointDecodeErrorZ_get_err"))) TS_CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKDelayedPaymentKey CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){ + LDKDelayedPaymentKey ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_DelayedPaymentKeyDecodeErrorZ_get_ok"))) TS_CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner); + LDKDelayedPaymentKey ret_var = CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_DelayedPaymentKeyDecodeErrorZ_get_err(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +uint64_t __attribute__((export_name("TS_CResult_DelayedPaymentKeyDecodeErrorZ_get_err"))) TS_CResult_DelayedPaymentKeyDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_DelayedPaymentKeyDecodeErrorZ_get_err(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKHtlcBasepoint CResult_HtlcBasepointDecodeErrorZ_get_ok(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){ + LDKHtlcBasepoint ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_HtlcBasepointDecodeErrorZ_get_ok"))) TS_CResult_HtlcBasepointDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner); + LDKHtlcBasepoint ret_var = CResult_HtlcBasepointDecodeErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_HtlcBasepointDecodeErrorZ_get_err(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +uint64_t __attribute__((export_name("TS_CResult_HtlcBasepointDecodeErrorZ_get_err"))) TS_CResult_HtlcBasepointDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_HtlcBasepointDecodeErrorZ_get_err(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKHtlcKey CResult_HtlcKeyDecodeErrorZ_get_ok(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){ + LDKHtlcKey ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_HtlcKeyDecodeErrorZ_get_ok"))) TS_CResult_HtlcKeyDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner); + LDKHtlcKey ret_var = CResult_HtlcKeyDecodeErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_HtlcKeyDecodeErrorZ_get_err(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +uint64_t __attribute__((export_name("TS_CResult_HtlcKeyDecodeErrorZ_get_err"))) TS_CResult_HtlcKeyDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_HtlcKeyDecodeErrorZ_get_err(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKRevocationBasepoint CResult_RevocationBasepointDecodeErrorZ_get_ok(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){ + LDKRevocationBasepoint ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_RevocationBasepointDecodeErrorZ_get_ok"))) TS_CResult_RevocationBasepointDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner); + LDKRevocationBasepoint ret_var = CResult_RevocationBasepointDecodeErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_RevocationBasepointDecodeErrorZ_get_err(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +uint64_t __attribute__((export_name("TS_CResult_RevocationBasepointDecodeErrorZ_get_err"))) TS_CResult_RevocationBasepointDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_RevocationBasepointDecodeErrorZ_get_err(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKRevocationKey CResult_RevocationKeyDecodeErrorZ_get_ok(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){ + LDKRevocationKey ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_RevocationKeyDecodeErrorZ_get_ok"))) TS_CResult_RevocationKeyDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner); + LDKRevocationKey ret_var = CResult_RevocationKeyDecodeErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_RevocationKeyDecodeErrorZ_get_err(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +uint64_t __attribute__((export_name("TS_CResult_RevocationKeyDecodeErrorZ_get_err"))) TS_CResult_RevocationKeyDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_RevocationKeyDecodeErrorZ_get_err(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKLockedChannelMonitor CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){ + LDKLockedChannelMonitor ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_LockedChannelMonitorNoneZ_get_ok"))) TS_CResult_LockedChannelMonitorNoneZ_get_ok(uint64_t owner) { + LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner); + LDKLockedChannelMonitor ret_var = CResult_LockedChannelMonitorNoneZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return *owner->contents.err; +} +void __attribute__((export_name("TS_CResult_LockedChannelMonitorNoneZ_get_err"))) TS_CResult_LockedChannelMonitorNoneZ_get_err(uint64_t owner) { + LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner); + CResult_LockedChannelMonitorNoneZ_get_err(owner_conv); +} + +static inline struct LDKOutPoint C2Tuple_OutPointChannelIdZ_get_a(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR owner){ + LDKOutPoint ret = owner->a; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_C2Tuple_OutPointChannelIdZ_get_a"))) TS_C2Tuple_OutPointChannelIdZ_get_a(uint64_t owner) { + LDKC2Tuple_OutPointChannelIdZ* owner_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(owner); + LDKOutPoint ret_var = C2Tuple_OutPointChannelIdZ_get_a(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKChannelId C2Tuple_OutPointChannelIdZ_get_b(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR owner){ + LDKChannelId ret = owner->b; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_C2Tuple_OutPointChannelIdZ_get_b"))) TS_C2Tuple_OutPointChannelIdZ_get_b(uint64_t owner) { + LDKC2Tuple_OutPointChannelIdZ* owner_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(owner); + LDKChannelId ret_var = C2Tuple_OutPointChannelIdZ_get_b(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline LDKCVec_C2Tuple_OutPointChannelIdZZ CVec_C2Tuple_OutPointChannelIdZZ_clone(const LDKCVec_C2Tuple_OutPointChannelIdZZ *orig) { + LDKCVec_C2Tuple_OutPointChannelIdZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ) * orig->datalen, "LDKCVec_C2Tuple_OutPointChannelIdZZ clone bytes"), .datalen = orig->datalen }; + for (size_t i = 0; i < ret.datalen; i++) { + ret.data[i] = C2Tuple_OutPointChannelIdZ_clone(&orig->data[i]); + } + return ret; +} +static inline LDKCVec_MonitorUpdateIdZ CVec_MonitorUpdateIdZ_clone(const LDKCVec_MonitorUpdateIdZ *orig) { + LDKCVec_MonitorUpdateIdZ ret = { .data = MALLOC(sizeof(LDKMonitorUpdateId) * orig->datalen, "LDKCVec_MonitorUpdateIdZ clone bytes"), .datalen = orig->datalen }; + for (size_t i = 0; i < ret.datalen; i++) { + ret.data[i] = MonitorUpdateId_clone(&orig->data[i]); + } + return ret; +} +static inline struct LDKOutPoint C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){ + LDKOutPoint ret = owner->a; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a"))) TS_C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(uint64_t owner) { + LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner); + LDKOutPoint ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKCVec_MonitorUpdateIdZ C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){ + return CVec_MonitorUpdateIdZ_clone(&owner->b); +} +uint64_tArray __attribute__((export_name("TS_C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b"))) TS_C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(uint64_t owner) { + LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner); + LDKCVec_MonitorUpdateIdZ ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(owner_conv); + uint64_tArray ret_arr = NULL; + ret_arr = init_uint64_tArray(ret_var.datalen, __LINE__); + uint64_t *ret_arr_ptr = (uint64_t*)(((uint8_t*)ret_arr) + 8); + for (size_t r = 0; r < ret_var.datalen; r++) { + LDKMonitorUpdateId ret_conv_17_var = ret_var.data[r]; + uint64_t ret_conv_17_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_17_var); + ret_conv_17_ref = tag_ptr(ret_conv_17_var.inner, ret_conv_17_var.is_owned); + ret_arr_ptr[r] = ret_conv_17_ref; + } + + FREE(ret_var.data); + return ret_arr; +} + +static inline LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ CVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ_clone(const LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ *orig) { + LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ) * orig->datalen, "LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ clone bytes"), .datalen = orig->datalen }; + for (size_t i = 0; i < ret.datalen; i++) { + ret.data[i] = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_clone(&orig->data[i]); + } + return ret; +} uint32_t __attribute__((export_name("TS_LDKCandidateRouteHop_ty_from_ptr"))) TS_LDKCandidateRouteHop_ty_from_ptr(uint64_t ptr) { LDKCandidateRouteHop *obj = (LDKCandidateRouteHop*)untag_ptr(ptr); switch(obj->tag) { @@ -12612,7 +13926,7 @@ uint64_t channel_penalty_msat_LDKScoreLookUp_jcall(const void* this_arg, const L score_params_var = ProbabilisticScoringFeeParameters_clone(&score_params_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(score_params_var); score_params_ref = tag_ptr(score_params_var.inner, score_params_var.is_owned); - return js_invoke_function_bbbuuu(j_calls->instance_ptr, 53, ref_candidate, usage_ref, score_params_ref, 0, 0, 0); + return js_invoke_function_bbbuuu(j_calls->instance_ptr, 55, ref_candidate, usage_ref, score_params_ref, 0, 0, 0); } static void LDKScoreLookUp_JCalls_cloned(LDKScoreLookUp* new_obj) { LDKScoreLookUp_JCalls *j_calls = (LDKScoreLookUp_JCalls*) new_obj->this_arg; @@ -12673,7 +13987,7 @@ void payment_path_failed_LDKScoreUpdate_jcall(void* this_arg, const LDKPath * pa path_ref = tag_ptr(path_var.inner, path_var.is_owned); int64_t short_channel_id_conv = short_channel_id; int64_t duration_since_epoch_conv = duration_since_epoch; - js_invoke_function_bbbuuu(j_calls->instance_ptr, 54, path_ref, short_channel_id_conv, duration_since_epoch_conv, 0, 0, 0); + js_invoke_function_bbbuuu(j_calls->instance_ptr, 56, path_ref, short_channel_id_conv, duration_since_epoch_conv, 0, 0, 0); } void payment_path_successful_LDKScoreUpdate_jcall(void* this_arg, const LDKPath * path, uint64_t duration_since_epoch) { LDKScoreUpdate_JCalls *j_calls = (LDKScoreUpdate_JCalls*) this_arg; @@ -12683,7 +13997,7 @@ void payment_path_successful_LDKScoreUpdate_jcall(void* this_arg, const LDKPath CHECK_INNER_FIELD_ACCESS_OR_NULL(path_var); path_ref = tag_ptr(path_var.inner, path_var.is_owned); int64_t duration_since_epoch_conv = duration_since_epoch; - js_invoke_function_bbuuuu(j_calls->instance_ptr, 55, path_ref, duration_since_epoch_conv, 0, 0, 0, 0); + js_invoke_function_bbuuuu(j_calls->instance_ptr, 57, path_ref, duration_since_epoch_conv, 0, 0, 0, 0); } void probe_failed_LDKScoreUpdate_jcall(void* this_arg, const LDKPath * path, uint64_t short_channel_id, uint64_t duration_since_epoch) { LDKScoreUpdate_JCalls *j_calls = (LDKScoreUpdate_JCalls*) this_arg; @@ -12694,7 +14008,7 @@ void probe_failed_LDKScoreUpdate_jcall(void* this_arg, const LDKPath * path, uin path_ref = tag_ptr(path_var.inner, path_var.is_owned); int64_t short_channel_id_conv = short_channel_id; int64_t duration_since_epoch_conv = duration_since_epoch; - js_invoke_function_bbbuuu(j_calls->instance_ptr, 56, path_ref, short_channel_id_conv, duration_since_epoch_conv, 0, 0, 0); + js_invoke_function_bbbuuu(j_calls->instance_ptr, 58, path_ref, short_channel_id_conv, duration_since_epoch_conv, 0, 0, 0); } void probe_successful_LDKScoreUpdate_jcall(void* this_arg, const LDKPath * path, uint64_t duration_since_epoch) { LDKScoreUpdate_JCalls *j_calls = (LDKScoreUpdate_JCalls*) this_arg; @@ -12704,12 +14018,12 @@ void probe_successful_LDKScoreUpdate_jcall(void* this_arg, const LDKPath * path, CHECK_INNER_FIELD_ACCESS_OR_NULL(path_var); path_ref = tag_ptr(path_var.inner, path_var.is_owned); int64_t duration_since_epoch_conv = duration_since_epoch; - js_invoke_function_bbuuuu(j_calls->instance_ptr, 57, path_ref, duration_since_epoch_conv, 0, 0, 0, 0); + js_invoke_function_bbuuuu(j_calls->instance_ptr, 59, path_ref, duration_since_epoch_conv, 0, 0, 0, 0); } void time_passed_LDKScoreUpdate_jcall(void* this_arg, uint64_t duration_since_epoch) { LDKScoreUpdate_JCalls *j_calls = (LDKScoreUpdate_JCalls*) this_arg; int64_t duration_since_epoch_conv = duration_since_epoch; - js_invoke_function_buuuuu(j_calls->instance_ptr, 58, duration_since_epoch_conv, 0, 0, 0, 0, 0); + js_invoke_function_buuuuu(j_calls->instance_ptr, 60, duration_since_epoch_conv, 0, 0, 0, 0, 0); } static void LDKScoreUpdate_JCalls_cloned(LDKScoreUpdate* new_obj) { LDKScoreUpdate_JCalls *j_calls = (LDKScoreUpdate_JCalls*) new_obj->this_arg; @@ -12803,7 +14117,7 @@ static void LDKLockableScore_JCalls_free(void* this_arg) { } LDKScoreLookUp read_lock_LDKLockableScore_jcall(const void* this_arg) { LDKLockableScore_JCalls *j_calls = (LDKLockableScore_JCalls*) this_arg; - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 59, 0, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 61, 0, 0, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKScoreLookUp ret_conv = *(LDKScoreLookUp*)(ret_ptr); @@ -12816,7 +14130,7 @@ LDKScoreLookUp read_lock_LDKLockableScore_jcall(const void* this_arg) { } LDKScoreUpdate write_lock_LDKLockableScore_jcall(const void* this_arg) { LDKLockableScore_JCalls *j_calls = (LDKLockableScore_JCalls*) this_arg; - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 60, 0, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 62, 0, 0, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKScoreUpdate ret_conv = *(LDKScoreUpdate*)(ret_ptr); @@ -12880,7 +14194,7 @@ static void LDKWriteableScore_JCalls_free(void* this_arg) { } LDKCVec_u8Z write_LDKWriteableScore_jcall(const void* this_arg) { LDKWriteableScore_JCalls *j_calls = (LDKWriteableScore_JCalls*) this_arg; - int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 61, 0, 0, 0, 0, 0, 0); + int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 63, 0, 0, 0, 0, 0, 0); LDKCVec_u8Z ret_ref; ret_ref.datalen = ret->arr_len; ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes"); @@ -12939,7 +14253,7 @@ LDKCResult_NoneIOErrorZ persist_manager_LDKPersister_jcall(const void* this_arg, // WARNING: we may need a move here but no clone is available for LDKChannelManager CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_manager_var); channel_manager_ref = tag_ptr(channel_manager_var.inner, channel_manager_var.is_owned); - uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 62, channel_manager_ref, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 64, channel_manager_ref, 0, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr); @@ -12953,7 +14267,7 @@ LDKCResult_NoneIOErrorZ persist_graph_LDKPersister_jcall(const void* this_arg, c // WARNING: we may need a move here but no clone is available for LDKNetworkGraph CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_var); network_graph_ref = tag_ptr(network_graph_var.inner, network_graph_var.is_owned); - uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 63, network_graph_ref, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 65, network_graph_ref, 0, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr); @@ -12964,7 +14278,7 @@ LDKCResult_NoneIOErrorZ persist_scorer_LDKPersister_jcall(const void* this_arg, LDKPersister_JCalls *j_calls = (LDKPersister_JCalls*) this_arg; // WARNING: This object doesn't live past this scope, needs clone! uint64_t ret_scorer = tag_ptr(scorer, false); - uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 64, ret_scorer, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 66, ret_scorer, 0, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr); @@ -13044,12 +14358,12 @@ static void LDKPersist_JCalls_free(void* this_arg) { FREE(j_calls); } } -LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) { +LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_funding_outpoint, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) { LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg; - LDKOutPoint channel_id_var = channel_id; - uint64_t channel_id_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); - channel_id_ref = tag_ptr(channel_id_var.inner, channel_id_var.is_owned); + LDKOutPoint channel_funding_outpoint_var = channel_funding_outpoint; + uint64_t channel_funding_outpoint_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_var); + channel_funding_outpoint_ref = tag_ptr(channel_funding_outpoint_var.inner, channel_funding_outpoint_var.is_owned); LDKChannelMonitor data_var = *data; uint64_t data_ref = 0; data_var = ChannelMonitor_clone(&data_var); @@ -13059,16 +14373,16 @@ LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* t uint64_t update_id_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_var); update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned); - uint64_t ret = js_invoke_function_bbbuuu(j_calls->instance_ptr, 65, channel_id_ref, data_ref, update_id_ref, 0, 0, 0); + uint64_t ret = js_invoke_function_bbbuuu(j_calls->instance_ptr, 67, channel_funding_outpoint_ref, data_ref, update_id_ref, 0, 0, 0); LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_js(ret); return ret_conv; } -LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, LDKChannelMonitorUpdate update, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) { +LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_funding_outpoint, LDKChannelMonitorUpdate update, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) { LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg; - LDKOutPoint channel_id_var = channel_id; - uint64_t channel_id_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); - channel_id_ref = tag_ptr(channel_id_var.inner, channel_id_var.is_owned); + LDKOutPoint channel_funding_outpoint_var = channel_funding_outpoint; + uint64_t channel_funding_outpoint_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_var); + channel_funding_outpoint_ref = tag_ptr(channel_funding_outpoint_var.inner, channel_funding_outpoint_var.is_owned); LDKChannelMonitorUpdate update_var = update; uint64_t update_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(update_var); @@ -13082,10 +14396,18 @@ LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const vo uint64_t update_id_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_var); update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned); - uint64_t ret = js_invoke_function_bbbbuu(j_calls->instance_ptr, 66, channel_id_ref, update_ref, data_ref, update_id_ref, 0, 0); + uint64_t ret = js_invoke_function_bbbbuu(j_calls->instance_ptr, 68, channel_funding_outpoint_ref, update_ref, data_ref, update_id_ref, 0, 0); LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_js(ret); return ret_conv; } +void archive_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_funding_outpoint) { + LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg; + LDKOutPoint channel_funding_outpoint_var = channel_funding_outpoint; + uint64_t channel_funding_outpoint_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_var); + channel_funding_outpoint_ref = tag_ptr(channel_funding_outpoint_var.inner, channel_funding_outpoint_var.is_owned); + js_invoke_function_buuuuu(j_calls->instance_ptr, 69, channel_funding_outpoint_ref, 0, 0, 0, 0, 0); +} static void LDKPersist_JCalls_cloned(LDKPersist* new_obj) { LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) new_obj->this_arg; atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); @@ -13099,6 +14421,7 @@ static inline LDKPersist LDKPersist_init (JSValue o) { .this_arg = (void*) calls, .persist_new_channel = persist_new_channel_LDKPersist_jcall, .update_persisted_channel = update_persisted_channel_LDKPersist_jcall, + .archive_persisted_channel = archive_persisted_channel_LDKPersist_jcall, .free = LDKPersist_JCalls_free, }; return ret; @@ -13108,15 +14431,15 @@ uint64_t __attribute__((export_name("TS_LDKPersist_new"))) TS_LDKPersist_new(JS *res_ptr = LDKPersist_init(o); return tag_ptr(res_ptr, true); } -uint32_t __attribute__((export_name("TS_Persist_persist_new_channel"))) TS_Persist_persist_new_channel(uint64_t this_arg, uint64_t channel_id, uint64_t data, uint64_t update_id) { +uint32_t __attribute__((export_name("TS_Persist_persist_new_channel"))) TS_Persist_persist_new_channel(uint64_t this_arg, uint64_t channel_funding_outpoint, uint64_t data, uint64_t update_id) { void* this_arg_ptr = untag_ptr(this_arg); if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr; - LDKOutPoint channel_id_conv; - channel_id_conv.inner = untag_ptr(channel_id); - channel_id_conv.is_owned = ptr_is_owned(channel_id); - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); - channel_id_conv = OutPoint_clone(&channel_id_conv); + LDKOutPoint channel_funding_outpoint_conv; + channel_funding_outpoint_conv.inner = untag_ptr(channel_funding_outpoint); + channel_funding_outpoint_conv.is_owned = ptr_is_owned(channel_funding_outpoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_conv); + channel_funding_outpoint_conv = OutPoint_clone(&channel_funding_outpoint_conv); LDKChannelMonitor data_conv; data_conv.inner = untag_ptr(data); data_conv.is_owned = ptr_is_owned(data); @@ -13127,19 +14450,19 @@ uint32_t __attribute__((export_name("TS_Persist_persist_new_channel"))) TS_Pers update_id_conv.is_owned = ptr_is_owned(update_id); CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv); update_id_conv = MonitorUpdateId_clone(&update_id_conv); - uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js((this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, channel_id_conv, &data_conv, update_id_conv)); + uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js((this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, channel_funding_outpoint_conv, &data_conv, update_id_conv)); return ret_conv; } -uint32_t __attribute__((export_name("TS_Persist_update_persisted_channel"))) TS_Persist_update_persisted_channel(uint64_t this_arg, uint64_t channel_id, uint64_t update, uint64_t data, uint64_t update_id) { +uint32_t __attribute__((export_name("TS_Persist_update_persisted_channel"))) TS_Persist_update_persisted_channel(uint64_t this_arg, uint64_t channel_funding_outpoint, uint64_t update, uint64_t data, uint64_t update_id) { void* this_arg_ptr = untag_ptr(this_arg); if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr; - LDKOutPoint channel_id_conv; - channel_id_conv.inner = untag_ptr(channel_id); - channel_id_conv.is_owned = ptr_is_owned(channel_id); - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); - channel_id_conv = OutPoint_clone(&channel_id_conv); + LDKOutPoint channel_funding_outpoint_conv; + channel_funding_outpoint_conv.inner = untag_ptr(channel_funding_outpoint); + channel_funding_outpoint_conv.is_owned = ptr_is_owned(channel_funding_outpoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_conv); + channel_funding_outpoint_conv = OutPoint_clone(&channel_funding_outpoint_conv); LDKChannelMonitorUpdate update_conv; update_conv.inner = untag_ptr(update); update_conv.is_owned = ptr_is_owned(update); @@ -13155,50 +14478,20 @@ uint32_t __attribute__((export_name("TS_Persist_update_persisted_channel"))) TS update_id_conv.is_owned = ptr_is_owned(update_id); CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv); update_id_conv = MonitorUpdateId_clone(&update_id_conv); - uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js((this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, channel_id_conv, update_conv, &data_conv, update_id_conv)); + uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js((this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, channel_funding_outpoint_conv, update_conv, &data_conv, update_id_conv)); return ret_conv; } -typedef struct LDKFutureCallback_JCalls { - atomic_size_t refcnt; - uint32_t instance_ptr; -} LDKFutureCallback_JCalls; -static void LDKFutureCallback_JCalls_free(void* this_arg) { - LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg; - if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { - FREE(j_calls); - } -} -void call_LDKFutureCallback_jcall(const void* this_arg) { - LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg; - js_invoke_function_uuuuuu(j_calls->instance_ptr, 67, 0, 0, 0, 0, 0, 0); -} -static void LDKFutureCallback_JCalls_cloned(LDKFutureCallback* new_obj) { - LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) new_obj->this_arg; - atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); -} -static inline LDKFutureCallback LDKFutureCallback_init (JSValue o) { - LDKFutureCallback_JCalls *calls = MALLOC(sizeof(LDKFutureCallback_JCalls), "LDKFutureCallback_JCalls"); - atomic_init(&calls->refcnt, 1); - calls->instance_ptr = o; - - LDKFutureCallback ret = { - .this_arg = (void*) calls, - .call = call_LDKFutureCallback_jcall, - .free = LDKFutureCallback_JCalls_free, - }; - return ret; -} -uint64_t __attribute__((export_name("TS_LDKFutureCallback_new"))) TS_LDKFutureCallback_new(JSValue o) { - LDKFutureCallback *res_ptr = MALLOC(sizeof(LDKFutureCallback), "LDKFutureCallback"); - *res_ptr = LDKFutureCallback_init(o); - return tag_ptr(res_ptr, true); -} -void __attribute__((export_name("TS_FutureCallback_call"))) TS_FutureCallback_call(uint64_t this_arg) { +void __attribute__((export_name("TS_Persist_archive_persisted_channel"))) TS_Persist_archive_persisted_channel(uint64_t this_arg, uint64_t channel_funding_outpoint) { void* this_arg_ptr = untag_ptr(this_arg); if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } - LDKFutureCallback* this_arg_conv = (LDKFutureCallback*)this_arg_ptr; - (this_arg_conv->call)(this_arg_conv->this_arg); + LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr; + LDKOutPoint channel_funding_outpoint_conv; + channel_funding_outpoint_conv.inner = untag_ptr(channel_funding_outpoint); + channel_funding_outpoint_conv.is_owned = ptr_is_owned(channel_funding_outpoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_conv); + channel_funding_outpoint_conv = OutPoint_clone(&channel_funding_outpoint_conv); + (this_arg_conv->archive_persisted_channel)(this_arg_conv->this_arg, channel_funding_outpoint_conv); } typedef struct LDKListen_JCalls { @@ -13227,7 +14520,7 @@ void filtered_block_connected_LDKListen_jcall(const void* this_arg, const uint8_ FREE(txdata_var.data); int32_t height_conv = height; - js_invoke_function_uuuuuu(j_calls->instance_ptr, 68, (uint32_t)header_arr, (uint32_t)txdata_arr, height_conv, 0, 0, 0); + js_invoke_function_uuuuuu(j_calls->instance_ptr, 70, (uint32_t)header_arr, (uint32_t)txdata_arr, height_conv, 0, 0, 0); } void block_connected_LDKListen_jcall(const void* this_arg, LDKu8slice block, uint32_t height) { LDKListen_JCalls *j_calls = (LDKListen_JCalls*) this_arg; @@ -13235,14 +14528,14 @@ void block_connected_LDKListen_jcall(const void* this_arg, LDKu8slice block, uin int8_tArray block_arr = init_int8_tArray(block_var.datalen, __LINE__); memcpy(block_arr->elems, block_var.data, block_var.datalen); int32_t height_conv = height; - js_invoke_function_uuuuuu(j_calls->instance_ptr, 69, (uint32_t)block_arr, height_conv, 0, 0, 0, 0); + js_invoke_function_uuuuuu(j_calls->instance_ptr, 71, (uint32_t)block_arr, height_conv, 0, 0, 0, 0); } void block_disconnected_LDKListen_jcall(const void* this_arg, const uint8_t (* header)[80], uint32_t height) { LDKListen_JCalls *j_calls = (LDKListen_JCalls*) this_arg; int8_tArray header_arr = init_int8_tArray(80, __LINE__); memcpy(header_arr->elems, *header, 80); int32_t height_conv = height; - js_invoke_function_uuuuuu(j_calls->instance_ptr, 70, (uint32_t)header_arr, height_conv, 0, 0, 0, 0); + js_invoke_function_uuuuuu(j_calls->instance_ptr, 72, (uint32_t)header_arr, height_conv, 0, 0, 0, 0); } static void LDKListen_JCalls_cloned(LDKListen* new_obj) { LDKListen_JCalls *j_calls = (LDKListen_JCalls*) new_obj->this_arg; @@ -13342,24 +14635,24 @@ void transactions_confirmed_LDKConfirm_jcall(const void* this_arg, const uint8_t FREE(txdata_var.data); int32_t height_conv = height; - js_invoke_function_uuuuuu(j_calls->instance_ptr, 71, (uint32_t)header_arr, (uint32_t)txdata_arr, height_conv, 0, 0, 0); + js_invoke_function_uuuuuu(j_calls->instance_ptr, 73, (uint32_t)header_arr, (uint32_t)txdata_arr, height_conv, 0, 0, 0); } void transaction_unconfirmed_LDKConfirm_jcall(const void* this_arg, const uint8_t (* txid)[32]) { LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg; int8_tArray txid_arr = init_int8_tArray(32, __LINE__); memcpy(txid_arr->elems, *txid, 32); - js_invoke_function_uuuuuu(j_calls->instance_ptr, 72, (uint32_t)txid_arr, 0, 0, 0, 0, 0); + js_invoke_function_uuuuuu(j_calls->instance_ptr, 74, (uint32_t)txid_arr, 0, 0, 0, 0, 0); } void best_block_updated_LDKConfirm_jcall(const void* this_arg, const uint8_t (* header)[80], uint32_t height) { LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg; int8_tArray header_arr = init_int8_tArray(80, __LINE__); memcpy(header_arr->elems, *header, 80); int32_t height_conv = height; - js_invoke_function_uuuuuu(j_calls->instance_ptr, 73, (uint32_t)header_arr, height_conv, 0, 0, 0, 0); + js_invoke_function_uuuuuu(j_calls->instance_ptr, 75, (uint32_t)header_arr, height_conv, 0, 0, 0, 0); } LDKCVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ get_relevant_txids_LDKConfirm_jcall(const void* this_arg) { LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg; - uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 74, 0, 0, 0, 0, 0, 0); + uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 76, 0, 0, 0, 0, 0, 0); LDKCVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ ret_constr; ret_constr.datalen = ret->arr_len; if (ret_constr.datalen > 0) @@ -13469,6 +14762,68 @@ uint64_tArray __attribute__((export_name("TS_Confirm_get_relevant_txids"))) TS_ return ret_arr; } +uint32_t __attribute__((export_name("TS_LDKSpendingDelay_ty_from_ptr"))) TS_LDKSpendingDelay_ty_from_ptr(uint64_t ptr) { + LDKSpendingDelay *obj = (LDKSpendingDelay*)untag_ptr(ptr); + switch(obj->tag) { + case LDKSpendingDelay_Relative: return 0; + case LDKSpendingDelay_Absolute: return 1; + default: abort(); + } +} +int32_t __attribute__((export_name("TS_LDKSpendingDelay_Relative_get_num_blocks"))) TS_LDKSpendingDelay_Relative_get_num_blocks(uint64_t ptr) { + LDKSpendingDelay *obj = (LDKSpendingDelay*)untag_ptr(ptr); + assert(obj->tag == LDKSpendingDelay_Relative); + int32_t num_blocks_conv = obj->relative.num_blocks; + return num_blocks_conv; +} +int32_t __attribute__((export_name("TS_LDKSpendingDelay_Absolute_get_height"))) TS_LDKSpendingDelay_Absolute_get_height(uint64_t ptr) { + LDKSpendingDelay *obj = (LDKSpendingDelay*)untag_ptr(ptr); + assert(obj->tag == LDKSpendingDelay_Absolute); + int32_t height_conv = obj->absolute.height; + return height_conv; +} +typedef struct LDKFutureCallback_JCalls { + atomic_size_t refcnt; + uint32_t instance_ptr; +} LDKFutureCallback_JCalls; +static void LDKFutureCallback_JCalls_free(void* this_arg) { + LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + FREE(j_calls); + } +} +void call_LDKFutureCallback_jcall(const void* this_arg) { + LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg; + js_invoke_function_uuuuuu(j_calls->instance_ptr, 77, 0, 0, 0, 0, 0, 0); +} +static void LDKFutureCallback_JCalls_cloned(LDKFutureCallback* new_obj) { + LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +} +static inline LDKFutureCallback LDKFutureCallback_init (JSValue o) { + LDKFutureCallback_JCalls *calls = MALLOC(sizeof(LDKFutureCallback_JCalls), "LDKFutureCallback_JCalls"); + atomic_init(&calls->refcnt, 1); + calls->instance_ptr = o; + + LDKFutureCallback ret = { + .this_arg = (void*) calls, + .call = call_LDKFutureCallback_jcall, + .free = LDKFutureCallback_JCalls_free, + }; + return ret; +} +uint64_t __attribute__((export_name("TS_LDKFutureCallback_new"))) TS_LDKFutureCallback_new(JSValue o) { + LDKFutureCallback *res_ptr = MALLOC(sizeof(LDKFutureCallback), "LDKFutureCallback"); + *res_ptr = LDKFutureCallback_init(o); + return tag_ptr(res_ptr, true); +} +void __attribute__((export_name("TS_FutureCallback_call"))) TS_FutureCallback_call(uint64_t this_arg) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKFutureCallback* this_arg_conv = (LDKFutureCallback*)this_arg_ptr; + (this_arg_conv->call)(this_arg_conv->this_arg); +} + typedef struct LDKEventHandler_JCalls { atomic_size_t refcnt; uint32_t instance_ptr; @@ -13484,7 +14839,7 @@ void handle_event_LDKEventHandler_jcall(const void* this_arg, LDKEvent event) { LDKEvent *event_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); *event_copy = event; uint64_t event_ref = tag_ptr(event_copy, true); - js_invoke_function_buuuuu(j_calls->instance_ptr, 75, event_ref, 0, 0, 0, 0, 0); + js_invoke_function_buuuuu(j_calls->instance_ptr, 78, event_ref, 0, 0, 0, 0, 0); } static void LDKEventHandler_JCalls_cloned(LDKEventHandler* new_obj) { LDKEventHandler_JCalls *j_calls = (LDKEventHandler_JCalls*) new_obj->this_arg; @@ -13532,7 +14887,7 @@ void process_pending_events_LDKEventsProvider_jcall(const void* this_arg, LDKEve LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg; LDKEventHandler* handler_ret = MALLOC(sizeof(LDKEventHandler), "LDKEventHandler"); *handler_ret = handler; - js_invoke_function_buuuuu(j_calls->instance_ptr, 76, tag_ptr(handler_ret, true), 0, 0, 0, 0, 0); + js_invoke_function_buuuuu(j_calls->instance_ptr, 79, tag_ptr(handler_ret, true), 0, 0, 0, 0, 0); } static void LDKEventsProvider_JCalls_cloned(LDKEventsProvider* new_obj) { LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) new_obj->this_arg; @@ -13597,7 +14952,7 @@ static void LDKMessageSendEventsProvider_JCalls_free(void* this_arg) { } LDKCVec_MessageSendEventZ get_and_clear_pending_msg_events_LDKMessageSendEventsProvider_jcall(const void* this_arg) { LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg; - uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 77, 0, 0, 0, 0, 0, 0); + uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 80, 0, 0, 0, 0, 0, 0); LDKCVec_MessageSendEventZ ret_constr; ret_constr.datalen = ret->arr_len; if (ret_constr.datalen > 0) @@ -13676,7 +15031,7 @@ void handle_open_channel_LDKChannelMessageHandler_jcall(const void* this_arg, LD msg_var = OpenChannel_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_ubuuuu(j_calls->instance_ptr, 78, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); + js_invoke_function_ubuuuu(j_calls->instance_ptr, 81, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); } void handle_open_channel_v2_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKOpenChannelV2 * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -13687,7 +15042,7 @@ void handle_open_channel_v2_LDKChannelMessageHandler_jcall(const void* this_arg, msg_var = OpenChannelV2_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_ubuuuu(j_calls->instance_ptr, 79, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); + js_invoke_function_ubuuuu(j_calls->instance_ptr, 82, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); } void handle_accept_channel_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKAcceptChannel * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -13698,7 +15053,7 @@ void handle_accept_channel_LDKChannelMessageHandler_jcall(const void* this_arg, msg_var = AcceptChannel_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_ubuuuu(j_calls->instance_ptr, 80, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); + js_invoke_function_ubuuuu(j_calls->instance_ptr, 83, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); } void handle_accept_channel_v2_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKAcceptChannelV2 * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -13709,7 +15064,7 @@ void handle_accept_channel_v2_LDKChannelMessageHandler_jcall(const void* this_ar msg_var = AcceptChannelV2_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_ubuuuu(j_calls->instance_ptr, 81, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); + js_invoke_function_ubuuuu(j_calls->instance_ptr, 84, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); } void handle_funding_created_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingCreated * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -13720,7 +15075,7 @@ void handle_funding_created_LDKChannelMessageHandler_jcall(const void* this_arg, msg_var = FundingCreated_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_ubuuuu(j_calls->instance_ptr, 82, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); + js_invoke_function_ubuuuu(j_calls->instance_ptr, 85, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); } void handle_funding_signed_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingSigned * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -13731,7 +15086,7 @@ void handle_funding_signed_LDKChannelMessageHandler_jcall(const void* this_arg, msg_var = FundingSigned_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_ubuuuu(j_calls->instance_ptr, 83, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); + js_invoke_function_ubuuuu(j_calls->instance_ptr, 86, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); } void handle_channel_ready_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelReady * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -13742,7 +15097,7 @@ void handle_channel_ready_LDKChannelMessageHandler_jcall(const void* this_arg, L msg_var = ChannelReady_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_ubuuuu(j_calls->instance_ptr, 84, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); + js_invoke_function_ubuuuu(j_calls->instance_ptr, 87, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); } void handle_shutdown_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKShutdown * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -13753,7 +15108,7 @@ void handle_shutdown_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPub msg_var = Shutdown_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_ubuuuu(j_calls->instance_ptr, 85, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); + js_invoke_function_ubuuuu(j_calls->instance_ptr, 88, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); } void handle_closing_signed_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKClosingSigned * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -13764,7 +15119,7 @@ void handle_closing_signed_LDKChannelMessageHandler_jcall(const void* this_arg, msg_var = ClosingSigned_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_ubuuuu(j_calls->instance_ptr, 86, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); + js_invoke_function_ubuuuu(j_calls->instance_ptr, 89, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); } void handle_stfu_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKStfu * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -13775,39 +15130,6 @@ void handle_stfu_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicK msg_var = Stfu_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_ubuuuu(j_calls->instance_ptr, 87, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); -} -void handle_splice_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKSplice * msg) { - LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; - int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__); - memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33); - LDKSplice msg_var = *msg; - uint64_t msg_ref = 0; - msg_var = Splice_clone(&msg_var); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); - msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_ubuuuu(j_calls->instance_ptr, 88, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); -} -void handle_splice_ack_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKSpliceAck * msg) { - LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; - int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__); - memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33); - LDKSpliceAck msg_var = *msg; - uint64_t msg_ref = 0; - msg_var = SpliceAck_clone(&msg_var); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); - msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_ubuuuu(j_calls->instance_ptr, 89, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); -} -void handle_splice_locked_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKSpliceLocked * msg) { - LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; - int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__); - memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33); - LDKSpliceLocked msg_var = *msg; - uint64_t msg_ref = 0; - msg_var = SpliceLocked_clone(&msg_var); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); - msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); js_invoke_function_ubuuuu(j_calls->instance_ptr, 90, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); } void handle_tx_add_input_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKTxAddInput * msg) { @@ -14104,9 +15426,6 @@ static inline LDKChannelMessageHandler LDKChannelMessageHandler_init (JSValue o, .handle_shutdown = handle_shutdown_LDKChannelMessageHandler_jcall, .handle_closing_signed = handle_closing_signed_LDKChannelMessageHandler_jcall, .handle_stfu = handle_stfu_LDKChannelMessageHandler_jcall, - .handle_splice = handle_splice_LDKChannelMessageHandler_jcall, - .handle_splice_ack = handle_splice_ack_LDKChannelMessageHandler_jcall, - .handle_splice_locked = handle_splice_locked_LDKChannelMessageHandler_jcall, .handle_tx_add_input = handle_tx_add_input_LDKChannelMessageHandler_jcall, .handle_tx_add_output = handle_tx_add_output_LDKChannelMessageHandler_jcall, .handle_tx_remove_input = handle_tx_remove_input_LDKChannelMessageHandler_jcall, @@ -14293,51 +15612,6 @@ void __attribute__((export_name("TS_ChannelMessageHandler_handle_stfu"))) TS_Ch (this_arg_conv->handle_stfu)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv); } -void __attribute__((export_name("TS_ChannelMessageHandler_handle_splice"))) TS_ChannelMessageHandler_handle_splice(uint64_t this_arg, int8_tArray their_node_id, uint64_t msg) { - void* this_arg_ptr = untag_ptr(this_arg); - if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } - LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr; - LDKPublicKey their_node_id_ref; - CHECK(their_node_id->arr_len == 33); - memcpy(their_node_id_ref.compressed_form, their_node_id->elems, 33); FREE(their_node_id); - LDKSplice msg_conv; - msg_conv.inner = untag_ptr(msg); - msg_conv.is_owned = ptr_is_owned(msg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv); - msg_conv.is_owned = false; - (this_arg_conv->handle_splice)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv); -} - -void __attribute__((export_name("TS_ChannelMessageHandler_handle_splice_ack"))) TS_ChannelMessageHandler_handle_splice_ack(uint64_t this_arg, int8_tArray their_node_id, uint64_t msg) { - void* this_arg_ptr = untag_ptr(this_arg); - if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } - LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr; - LDKPublicKey their_node_id_ref; - CHECK(their_node_id->arr_len == 33); - memcpy(their_node_id_ref.compressed_form, their_node_id->elems, 33); FREE(their_node_id); - LDKSpliceAck msg_conv; - msg_conv.inner = untag_ptr(msg); - msg_conv.is_owned = ptr_is_owned(msg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv); - msg_conv.is_owned = false; - (this_arg_conv->handle_splice_ack)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv); -} - -void __attribute__((export_name("TS_ChannelMessageHandler_handle_splice_locked"))) TS_ChannelMessageHandler_handle_splice_locked(uint64_t this_arg, int8_tArray their_node_id, uint64_t msg) { - void* this_arg_ptr = untag_ptr(this_arg); - if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } - LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr; - LDKPublicKey their_node_id_ref; - CHECK(their_node_id->arr_len == 33); - memcpy(their_node_id_ref.compressed_form, their_node_id->elems, 33); FREE(their_node_id); - LDKSpliceLocked msg_conv; - msg_conv.inner = untag_ptr(msg); - msg_conv.is_owned = ptr_is_owned(msg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv); - msg_conv.is_owned = false; - (this_arg_conv->handle_splice_locked)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv); -} - void __attribute__((export_name("TS_ChannelMessageHandler_handle_tx_add_input"))) TS_ChannelMessageHandler_handle_tx_add_input(uint64_t this_arg, int8_tArray their_node_id, uint64_t msg) { void* this_arg_ptr = untag_ptr(this_arg); if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } @@ -14797,6 +16071,55 @@ uint64_tArray __attribute__((export_name("TS_OffersMessageHandler_release_pendi return ret_arr; } +typedef struct LDKNodeIdLookUp_JCalls { + atomic_size_t refcnt; + uint32_t instance_ptr; +} LDKNodeIdLookUp_JCalls; +static void LDKNodeIdLookUp_JCalls_free(void* this_arg) { + LDKNodeIdLookUp_JCalls *j_calls = (LDKNodeIdLookUp_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + FREE(j_calls); + } +} +LDKPublicKey next_node_id_LDKNodeIdLookUp_jcall(const void* this_arg, uint64_t short_channel_id) { + LDKNodeIdLookUp_JCalls *j_calls = (LDKNodeIdLookUp_JCalls*) this_arg; + int64_t short_channel_id_conv = short_channel_id; + int8_tArray ret = (int8_tArray)js_invoke_function_buuuuu(j_calls->instance_ptr, 118, short_channel_id_conv, 0, 0, 0, 0, 0); + LDKPublicKey ret_ref; + CHECK(ret->arr_len == 33); + memcpy(ret_ref.compressed_form, ret->elems, 33); FREE(ret); + return ret_ref; +} +static void LDKNodeIdLookUp_JCalls_cloned(LDKNodeIdLookUp* new_obj) { + LDKNodeIdLookUp_JCalls *j_calls = (LDKNodeIdLookUp_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +} +static inline LDKNodeIdLookUp LDKNodeIdLookUp_init (JSValue o) { + LDKNodeIdLookUp_JCalls *calls = MALLOC(sizeof(LDKNodeIdLookUp_JCalls), "LDKNodeIdLookUp_JCalls"); + atomic_init(&calls->refcnt, 1); + calls->instance_ptr = o; + + LDKNodeIdLookUp ret = { + .this_arg = (void*) calls, + .next_node_id = next_node_id_LDKNodeIdLookUp_jcall, + .free = LDKNodeIdLookUp_JCalls_free, + }; + return ret; +} +uint64_t __attribute__((export_name("TS_LDKNodeIdLookUp_new"))) TS_LDKNodeIdLookUp_new(JSValue o) { + LDKNodeIdLookUp *res_ptr = MALLOC(sizeof(LDKNodeIdLookUp), "LDKNodeIdLookUp"); + *res_ptr = LDKNodeIdLookUp_init(o); + return tag_ptr(res_ptr, true); +} +int8_tArray __attribute__((export_name("TS_NodeIdLookUp_next_node_id"))) TS_NodeIdLookUp_next_node_id(uint64_t this_arg, int64_t short_channel_id) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKNodeIdLookUp* this_arg_conv = (LDKNodeIdLookUp*)this_arg_ptr; + int8_tArray ret_arr = init_int8_tArray(33, __LINE__); + memcpy(ret_arr->elems, (this_arg_conv->next_node_id)(this_arg_conv->this_arg, short_channel_id).compressed_form, 33); + return ret_arr; +} + typedef struct LDKRoutingMessageHandler_JCalls { atomic_size_t refcnt; uint32_t instance_ptr; @@ -14815,7 +16138,7 @@ LDKCResult_boolLightningErrorZ handle_node_announcement_LDKRoutingMessageHandler msg_var = NodeAnnouncement_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 118, msg_ref, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 119, msg_ref, 0, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr); @@ -14829,7 +16152,7 @@ LDKCResult_boolLightningErrorZ handle_channel_announcement_LDKRoutingMessageHand msg_var = ChannelAnnouncement_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 119, msg_ref, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 120, msg_ref, 0, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr); @@ -14843,7 +16166,7 @@ LDKCResult_boolLightningErrorZ handle_channel_update_LDKRoutingMessageHandler_jc msg_var = ChannelUpdate_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 120, msg_ref, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 121, msg_ref, 0, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr); @@ -14853,7 +16176,7 @@ LDKCResult_boolLightningErrorZ handle_channel_update_LDKRoutingMessageHandler_jc LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ get_next_channel_announcement_LDKRoutingMessageHandler_jcall(const void* this_arg, uint64_t starting_point) { LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg; int64_t starting_point_conv = starting_point; - uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 121, starting_point_conv, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 122, starting_point_conv, 0, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret_conv = *(LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ*)(ret_ptr); @@ -14866,7 +16189,7 @@ LDKNodeAnnouncement get_next_node_announcement_LDKRoutingMessageHandler_jcall(co uint64_t starting_point_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(starting_point_var); starting_point_ref = tag_ptr(starting_point_var.inner, starting_point_var.is_owned); - uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 122, starting_point_ref, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 123, starting_point_ref, 0, 0, 0, 0, 0); LDKNodeAnnouncement ret_conv; ret_conv.inner = untag_ptr(ret); ret_conv.is_owned = ptr_is_owned(ret); @@ -14883,7 +16206,7 @@ LDKCResult_NoneNoneZ peer_connected_LDKRoutingMessageHandler_jcall(const void* t CHECK_INNER_FIELD_ACCESS_OR_NULL(init_var); init_ref = tag_ptr(init_var.inner, init_var.is_owned); jboolean inbound_conv = inbound; - uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 123, (uint32_t)their_node_id_arr, init_ref, inbound_conv, 0, 0, 0); + uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 124, (uint32_t)their_node_id_arr, init_ref, inbound_conv, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr); @@ -14898,7 +16221,7 @@ LDKCResult_NoneLightningErrorZ handle_reply_channel_range_LDKRoutingMessageHandl uint64_t msg_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 124, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 125, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr); @@ -14913,7 +16236,7 @@ LDKCResult_NoneLightningErrorZ handle_reply_short_channel_ids_end_LDKRoutingMess uint64_t msg_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 125, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 126, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr); @@ -14928,7 +16251,7 @@ LDKCResult_NoneLightningErrorZ handle_query_channel_range_LDKRoutingMessageHandl uint64_t msg_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 126, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 127, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr); @@ -14943,7 +16266,7 @@ LDKCResult_NoneLightningErrorZ handle_query_short_channel_ids_LDKRoutingMessageH uint64_t msg_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 127, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 128, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr); @@ -14952,11 +16275,11 @@ LDKCResult_NoneLightningErrorZ handle_query_short_channel_ids_LDKRoutingMessageH } bool processing_queue_high_LDKRoutingMessageHandler_jcall(const void* this_arg) { LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg; - return js_invoke_function_uuuuuu(j_calls->instance_ptr, 128, 0, 0, 0, 0, 0, 0); + return js_invoke_function_uuuuuu(j_calls->instance_ptr, 129, 0, 0, 0, 0, 0, 0); } LDKNodeFeatures provided_node_features_LDKRoutingMessageHandler_jcall(const void* this_arg) { LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg; - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 129, 0, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 130, 0, 0, 0, 0, 0, 0); LDKNodeFeatures ret_conv; ret_conv.inner = untag_ptr(ret); ret_conv.is_owned = ptr_is_owned(ret); @@ -14967,7 +16290,7 @@ LDKInitFeatures provided_init_features_LDKRoutingMessageHandler_jcall(const void LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg; int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__); memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33); - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 130, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 131, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0); LDKInitFeatures ret_conv; ret_conv.inner = untag_ptr(ret); ret_conv.is_owned = ptr_is_owned(ret); @@ -15208,7 +16531,7 @@ static void LDKOnionMessageHandler_JCalls_free(void* this_arg) { } LDKCVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ get_and_clear_connections_needed_LDKOnionMessageHandler_jcall(const void* this_arg) { LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg; - uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 131, 0, 0, 0, 0, 0, 0); + uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 132, 0, 0, 0, 0, 0, 0); LDKCVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ ret_constr; ret_constr.datalen = ret->arr_len; if (ret_constr.datalen > 0) @@ -15236,13 +16559,13 @@ void handle_onion_message_LDKOnionMessageHandler_jcall(const void* this_arg, LDK msg_var = OnionMessage_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_ubuuuu(j_calls->instance_ptr, 132, (uint32_t)peer_node_id_arr, msg_ref, 0, 0, 0, 0); + js_invoke_function_ubuuuu(j_calls->instance_ptr, 133, (uint32_t)peer_node_id_arr, msg_ref, 0, 0, 0, 0); } LDKOnionMessage next_onion_message_for_peer_LDKOnionMessageHandler_jcall(const void* this_arg, LDKPublicKey peer_node_id) { LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg; int8_tArray peer_node_id_arr = init_int8_tArray(33, __LINE__); memcpy(peer_node_id_arr->elems, peer_node_id.compressed_form, 33); - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 133, (uint32_t)peer_node_id_arr, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 134, (uint32_t)peer_node_id_arr, 0, 0, 0, 0, 0); LDKOnionMessage ret_conv; ret_conv.inner = untag_ptr(ret); ret_conv.is_owned = ptr_is_owned(ret); @@ -15259,7 +16582,7 @@ LDKCResult_NoneNoneZ peer_connected_LDKOnionMessageHandler_jcall(const void* thi CHECK_INNER_FIELD_ACCESS_OR_NULL(init_var); init_ref = tag_ptr(init_var.inner, init_var.is_owned); jboolean inbound_conv = inbound; - uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 134, (uint32_t)their_node_id_arr, init_ref, inbound_conv, 0, 0, 0); + uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 135, (uint32_t)their_node_id_arr, init_ref, inbound_conv, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr); @@ -15270,15 +16593,15 @@ void peer_disconnected_LDKOnionMessageHandler_jcall(const void* this_arg, LDKPub LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg; int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__); memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33); - js_invoke_function_uuuuuu(j_calls->instance_ptr, 135, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0); + js_invoke_function_uuuuuu(j_calls->instance_ptr, 136, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0); } void timer_tick_occurred_LDKOnionMessageHandler_jcall(const void* this_arg) { LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg; - js_invoke_function_uuuuuu(j_calls->instance_ptr, 136, 0, 0, 0, 0, 0, 0); + js_invoke_function_uuuuuu(j_calls->instance_ptr, 137, 0, 0, 0, 0, 0, 0); } LDKNodeFeatures provided_node_features_LDKOnionMessageHandler_jcall(const void* this_arg) { LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg; - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 137, 0, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 138, 0, 0, 0, 0, 0, 0); LDKNodeFeatures ret_conv; ret_conv.inner = untag_ptr(ret); ret_conv.is_owned = ptr_is_owned(ret); @@ -15289,7 +16612,7 @@ LDKInitFeatures provided_init_features_LDKOnionMessageHandler_jcall(const void* LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg; int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__); memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33); - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 138, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 139, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0); LDKInitFeatures ret_conv; ret_conv.inner = untag_ptr(ret); ret_conv.is_owned = ptr_is_owned(ret); @@ -15446,7 +16769,7 @@ LDKCResult_COption_TypeZDecodeErrorZ read_LDKCustomMessageReader_jcall(const voi LDKu8slice buffer_var = buffer; int8_tArray buffer_arr = init_int8_tArray(buffer_var.datalen, __LINE__); memcpy(buffer_arr->elems, buffer_var.data, buffer_var.datalen); - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 139, message_type_conv, (uint32_t)buffer_arr, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 140, message_type_conv, (uint32_t)buffer_arr, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_COption_TypeZDecodeErrorZ ret_conv = *(LDKCResult_COption_TypeZDecodeErrorZ*)(ret_ptr); @@ -15504,7 +16827,7 @@ LDKCResult_NoneLightningErrorZ handle_custom_message_LDKCustomMessageHandler_jca *msg_ret = msg; int8_tArray sender_node_id_arr = init_int8_tArray(33, __LINE__); memcpy(sender_node_id_arr->elems, sender_node_id.compressed_form, 33); - uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 140, tag_ptr(msg_ret, true), (uint32_t)sender_node_id_arr, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 141, tag_ptr(msg_ret, true), (uint32_t)sender_node_id_arr, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr); @@ -15513,7 +16836,7 @@ LDKCResult_NoneLightningErrorZ handle_custom_message_LDKCustomMessageHandler_jca } LDKCVec_C2Tuple_PublicKeyTypeZZ get_and_clear_pending_msg_LDKCustomMessageHandler_jcall(const void* this_arg) { LDKCustomMessageHandler_JCalls *j_calls = (LDKCustomMessageHandler_JCalls*) this_arg; - uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 141, 0, 0, 0, 0, 0, 0); + uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 142, 0, 0, 0, 0, 0, 0); LDKCVec_C2Tuple_PublicKeyTypeZZ ret_constr; ret_constr.datalen = ret->arr_len; if (ret_constr.datalen > 0) @@ -15534,7 +16857,7 @@ LDKCVec_C2Tuple_PublicKeyTypeZZ get_and_clear_pending_msg_LDKCustomMessageHandle } LDKNodeFeatures provided_node_features_LDKCustomMessageHandler_jcall(const void* this_arg) { LDKCustomMessageHandler_JCalls *j_calls = (LDKCustomMessageHandler_JCalls*) this_arg; - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 142, 0, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 143, 0, 0, 0, 0, 0, 0); LDKNodeFeatures ret_conv; ret_conv.inner = untag_ptr(ret); ret_conv.is_owned = ptr_is_owned(ret); @@ -15545,7 +16868,7 @@ LDKInitFeatures provided_init_features_LDKCustomMessageHandler_jcall(const void* LDKCustomMessageHandler_JCalls *j_calls = (LDKCustomMessageHandler_JCalls*) this_arg; int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__); memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33); - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 143, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 144, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0); LDKInitFeatures ret_conv; ret_conv.inner = untag_ptr(ret); ret_conv.is_owned = ptr_is_owned(ret); @@ -15655,7 +16978,7 @@ LDKCOption_OnionMessageContentsZ handle_custom_message_LDKCustomOnionMessageHand LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) this_arg; LDKOnionMessageContents* msg_ret = MALLOC(sizeof(LDKOnionMessageContents), "LDKOnionMessageContents"); *msg_ret = msg; - uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 144, tag_ptr(msg_ret, true), 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 145, tag_ptr(msg_ret, true), 0, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCOption_OnionMessageContentsZ ret_conv = *(LDKCOption_OnionMessageContentsZ*)(ret_ptr); @@ -15668,7 +16991,7 @@ LDKCResult_COption_OnionMessageContentsZDecodeErrorZ read_custom_message_LDKCust LDKu8slice buffer_var = buffer; int8_tArray buffer_arr = init_int8_tArray(buffer_var.datalen, __LINE__); memcpy(buffer_arr->elems, buffer_var.data, buffer_var.datalen); - uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 145, message_type_conv, (uint32_t)buffer_arr, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 146, message_type_conv, (uint32_t)buffer_arr, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_COption_OnionMessageContentsZDecodeErrorZ ret_conv = *(LDKCResult_COption_OnionMessageContentsZDecodeErrorZ*)(ret_ptr); @@ -15677,7 +17000,7 @@ LDKCResult_COption_OnionMessageContentsZDecodeErrorZ read_custom_message_LDKCust } LDKCVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ release_pending_custom_messages_LDKCustomOnionMessageHandler_jcall(const void* this_arg) { LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) this_arg; - uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 146, 0, 0, 0, 0, 0, 0); + uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 147, 0, 0, 0, 0, 0, 0); LDKCVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ ret_constr; ret_constr.datalen = ret->arr_len; if (ret_constr.datalen > 0) @@ -15783,21 +17106,21 @@ uintptr_t send_data_LDKSocketDescriptor_jcall(void* this_arg, LDKu8slice data, b int8_tArray data_arr = init_int8_tArray(data_var.datalen, __LINE__); memcpy(data_arr->elems, data_var.data, data_var.datalen); jboolean resume_read_conv = resume_read; - return js_invoke_function_uuuuuu(j_calls->instance_ptr, 147, (uint32_t)data_arr, resume_read_conv, 0, 0, 0, 0); + return js_invoke_function_uuuuuu(j_calls->instance_ptr, 148, (uint32_t)data_arr, resume_read_conv, 0, 0, 0, 0); } void disconnect_socket_LDKSocketDescriptor_jcall(void* this_arg) { LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg; - js_invoke_function_uuuuuu(j_calls->instance_ptr, 148, 0, 0, 0, 0, 0, 0); + js_invoke_function_uuuuuu(j_calls->instance_ptr, 149, 0, 0, 0, 0, 0, 0); } bool eq_LDKSocketDescriptor_jcall(const void* this_arg, const LDKSocketDescriptor * other_arg) { LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg; LDKSocketDescriptor *other_arg_clone = MALLOC(sizeof(LDKSocketDescriptor), "LDKSocketDescriptor"); *other_arg_clone = SocketDescriptor_clone(other_arg); - return js_invoke_function_buuuuu(j_calls->instance_ptr, 149, tag_ptr(other_arg_clone, true), 0, 0, 0, 0, 0); + return js_invoke_function_buuuuu(j_calls->instance_ptr, 150, tag_ptr(other_arg_clone, true), 0, 0, 0, 0, 0); } uint64_t hash_LDKSocketDescriptor_jcall(const void* this_arg) { LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg; - return js_invoke_function_uuuuuu(j_calls->instance_ptr, 150, 0, 0, 0, 0, 0, 0); + return js_invoke_function_uuuuuu(j_calls->instance_ptr, 151, 0, 0, 0, 0, 0, 0); } static void LDKSocketDescriptor_JCalls_cloned(LDKSocketDescriptor* new_obj) { LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) new_obj->this_arg; @@ -15851,6 +17174,138 @@ int64_t __attribute__((export_name("TS_SocketDescriptor_hash"))) TS_SocketDescr return ret_conv; } +typedef struct LDKSignBolt12InvoiceFn_JCalls { + atomic_size_t refcnt; + uint32_t instance_ptr; +} LDKSignBolt12InvoiceFn_JCalls; +static void LDKSignBolt12InvoiceFn_JCalls_free(void* this_arg) { + LDKSignBolt12InvoiceFn_JCalls *j_calls = (LDKSignBolt12InvoiceFn_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + FREE(j_calls); + } +} +LDKCResult_SchnorrSignatureNoneZ sign_invoice_LDKSignBolt12InvoiceFn_jcall(const void* this_arg, const LDKUnsignedBolt12Invoice * message) { + LDKSignBolt12InvoiceFn_JCalls *j_calls = (LDKSignBolt12InvoiceFn_JCalls*) this_arg; + LDKUnsignedBolt12Invoice message_var = *message; + uint64_t message_ref = 0; + message_var = UnsignedBolt12Invoice_clone(&message_var); + CHECK_INNER_FIELD_ACCESS_OR_NULL(message_var); + message_ref = tag_ptr(message_var.inner, message_var.is_owned); + uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 152, message_ref, 0, 0, 0, 0, 0); + void* ret_ptr = untag_ptr(ret); + CHECK_ACCESS(ret_ptr); + LDKCResult_SchnorrSignatureNoneZ ret_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(ret_ptr); + FREE(untag_ptr(ret)); + return ret_conv; +} +static void LDKSignBolt12InvoiceFn_JCalls_cloned(LDKSignBolt12InvoiceFn* new_obj) { + LDKSignBolt12InvoiceFn_JCalls *j_calls = (LDKSignBolt12InvoiceFn_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +} +static inline LDKSignBolt12InvoiceFn LDKSignBolt12InvoiceFn_init (JSValue o) { + LDKSignBolt12InvoiceFn_JCalls *calls = MALLOC(sizeof(LDKSignBolt12InvoiceFn_JCalls), "LDKSignBolt12InvoiceFn_JCalls"); + atomic_init(&calls->refcnt, 1); + calls->instance_ptr = o; + + LDKSignBolt12InvoiceFn ret = { + .this_arg = (void*) calls, + .sign_invoice = sign_invoice_LDKSignBolt12InvoiceFn_jcall, + .free = LDKSignBolt12InvoiceFn_JCalls_free, + }; + return ret; +} +uint64_t __attribute__((export_name("TS_LDKSignBolt12InvoiceFn_new"))) TS_LDKSignBolt12InvoiceFn_new(JSValue o) { + LDKSignBolt12InvoiceFn *res_ptr = MALLOC(sizeof(LDKSignBolt12InvoiceFn), "LDKSignBolt12InvoiceFn"); + *res_ptr = LDKSignBolt12InvoiceFn_init(o); + return tag_ptr(res_ptr, true); +} +uint64_t __attribute__((export_name("TS_SignBolt12InvoiceFn_sign_invoice"))) TS_SignBolt12InvoiceFn_sign_invoice(uint64_t this_arg, uint64_t message) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKSignBolt12InvoiceFn* this_arg_conv = (LDKSignBolt12InvoiceFn*)this_arg_ptr; + LDKUnsignedBolt12Invoice message_conv; + message_conv.inner = untag_ptr(message); + message_conv.is_owned = ptr_is_owned(message); + CHECK_INNER_FIELD_ACCESS_OR_NULL(message_conv); + message_conv.is_owned = false; + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = (this_arg_conv->sign_invoice)(this_arg_conv->this_arg, &message_conv); + return tag_ptr(ret_conv, true); +} + +typedef struct LDKSignInvoiceRequestFn_JCalls { + atomic_size_t refcnt; + uint32_t instance_ptr; +} LDKSignInvoiceRequestFn_JCalls; +static void LDKSignInvoiceRequestFn_JCalls_free(void* this_arg) { + LDKSignInvoiceRequestFn_JCalls *j_calls = (LDKSignInvoiceRequestFn_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + FREE(j_calls); + } +} +LDKCResult_SchnorrSignatureNoneZ sign_invoice_request_LDKSignInvoiceRequestFn_jcall(const void* this_arg, const LDKUnsignedInvoiceRequest * message) { + LDKSignInvoiceRequestFn_JCalls *j_calls = (LDKSignInvoiceRequestFn_JCalls*) this_arg; + LDKUnsignedInvoiceRequest message_var = *message; + uint64_t message_ref = 0; + message_var = UnsignedInvoiceRequest_clone(&message_var); + CHECK_INNER_FIELD_ACCESS_OR_NULL(message_var); + message_ref = tag_ptr(message_var.inner, message_var.is_owned); + uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 153, message_ref, 0, 0, 0, 0, 0); + void* ret_ptr = untag_ptr(ret); + CHECK_ACCESS(ret_ptr); + LDKCResult_SchnorrSignatureNoneZ ret_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(ret_ptr); + FREE(untag_ptr(ret)); + return ret_conv; +} +static void LDKSignInvoiceRequestFn_JCalls_cloned(LDKSignInvoiceRequestFn* new_obj) { + LDKSignInvoiceRequestFn_JCalls *j_calls = (LDKSignInvoiceRequestFn_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +} +static inline LDKSignInvoiceRequestFn LDKSignInvoiceRequestFn_init (JSValue o) { + LDKSignInvoiceRequestFn_JCalls *calls = MALLOC(sizeof(LDKSignInvoiceRequestFn_JCalls), "LDKSignInvoiceRequestFn_JCalls"); + atomic_init(&calls->refcnt, 1); + calls->instance_ptr = o; + + LDKSignInvoiceRequestFn ret = { + .this_arg = (void*) calls, + .sign_invoice_request = sign_invoice_request_LDKSignInvoiceRequestFn_jcall, + .free = LDKSignInvoiceRequestFn_JCalls_free, + }; + return ret; +} +uint64_t __attribute__((export_name("TS_LDKSignInvoiceRequestFn_new"))) TS_LDKSignInvoiceRequestFn_new(JSValue o) { + LDKSignInvoiceRequestFn *res_ptr = MALLOC(sizeof(LDKSignInvoiceRequestFn), "LDKSignInvoiceRequestFn"); + *res_ptr = LDKSignInvoiceRequestFn_init(o); + return tag_ptr(res_ptr, true); +} +uint64_t __attribute__((export_name("TS_SignInvoiceRequestFn_sign_invoice_request"))) TS_SignInvoiceRequestFn_sign_invoice_request(uint64_t this_arg, uint64_t message) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKSignInvoiceRequestFn* this_arg_conv = (LDKSignInvoiceRequestFn*)this_arg_ptr; + LDKUnsignedInvoiceRequest message_conv; + message_conv.inner = untag_ptr(message); + message_conv.is_owned = ptr_is_owned(message); + CHECK_INNER_FIELD_ACCESS_OR_NULL(message_conv); + message_conv.is_owned = false; + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = (this_arg_conv->sign_invoice_request)(this_arg_conv->this_arg, &message_conv); + return tag_ptr(ret_conv, true); +} + +uint32_t __attribute__((export_name("TS_LDKSignError_ty_from_ptr"))) TS_LDKSignError_ty_from_ptr(uint64_t ptr) { + LDKSignError *obj = (LDKSignError*)untag_ptr(ptr); + switch(obj->tag) { + case LDKSignError_Signing: return 0; + case LDKSignError_Verification: return 1; + default: abort(); + } +} +uint32_t __attribute__((export_name("TS_LDKSignError_Verification_get_verification"))) TS_LDKSignError_Verification_get_verification(uint64_t ptr) { + LDKSignError *obj = (LDKSignError*)untag_ptr(ptr); + assert(obj->tag == LDKSignError_Verification); + uint32_t verification_conv = LDKSecp256k1Error_to_js(obj->verification); + return verification_conv; +} uint32_t __attribute__((export_name("TS_LDKEffectiveCapacity_ty_from_ptr"))) TS_LDKEffectiveCapacity_ty_from_ptr(uint64_t ptr) { LDKEffectiveCapacity *obj = (LDKEffectiveCapacity*)untag_ptr(ptr); switch(obj->tag) { @@ -15979,7 +17434,7 @@ static void LDKScore_JCalls_free(void* this_arg) { } LDKCVec_u8Z write_LDKScore_jcall(const void* this_arg) { LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg; - int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 151, 0, 0, 0, 0, 0, 0); + int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 154, 0, 0, 0, 0, 0, 0); LDKCVec_u8Z ret_ref; ret_ref.datalen = ret->arr_len; ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes"); @@ -16024,6 +17479,33 @@ int8_tArray __attribute__((export_name("TS_Score_write"))) TS_Score_write(uint6 return ret_arr; } +uint32_t __attribute__((export_name("TS_LDKIntroductionNode_ty_from_ptr"))) TS_LDKIntroductionNode_ty_from_ptr(uint64_t ptr) { + LDKIntroductionNode *obj = (LDKIntroductionNode*)untag_ptr(ptr); + switch(obj->tag) { + case LDKIntroductionNode_NodeId: return 0; + case LDKIntroductionNode_DirectedShortChannelId: return 1; + default: abort(); + } +} +int8_tArray __attribute__((export_name("TS_LDKIntroductionNode_NodeId_get_node_id"))) TS_LDKIntroductionNode_NodeId_get_node_id(uint64_t ptr) { + LDKIntroductionNode *obj = (LDKIntroductionNode*)untag_ptr(ptr); + assert(obj->tag == LDKIntroductionNode_NodeId); + int8_tArray node_id_arr = init_int8_tArray(33, __LINE__); + memcpy(node_id_arr->elems, obj->node_id.compressed_form, 33); + return node_id_arr; +} +uint32_t __attribute__((export_name("TS_LDKIntroductionNode_DirectedShortChannelId_get__0"))) TS_LDKIntroductionNode_DirectedShortChannelId_get__0(uint64_t ptr) { + LDKIntroductionNode *obj = (LDKIntroductionNode*)untag_ptr(ptr); + assert(obj->tag == LDKIntroductionNode_DirectedShortChannelId); + uint32_t _0_conv = LDKDirection_to_js(obj->directed_short_channel_id._0); + return _0_conv; +} +int64_t __attribute__((export_name("TS_LDKIntroductionNode_DirectedShortChannelId_get__1"))) TS_LDKIntroductionNode_DirectedShortChannelId_get__1(uint64_t ptr) { + LDKIntroductionNode *obj = (LDKIntroductionNode*)untag_ptr(ptr); + assert(obj->tag == LDKIntroductionNode_DirectedShortChannelId); + int64_t _1_conv = obj->directed_short_channel_id._1; + return _1_conv; +} typedef struct LDKCoinSelectionSource_JCalls { atomic_size_t refcnt; uint32_t instance_ptr; @@ -16063,7 +17545,7 @@ LDKCResult_CoinSelectionNoneZ select_confirmed_utxos_LDKCoinSelectionSource_jcal FREE(must_pay_to_var.data); int32_t target_feerate_sat_per_1000_weight_conv = target_feerate_sat_per_1000_weight; - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 152, (uint32_t)claim_id_arr, (uint32_t)must_spend_arr, (uint32_t)must_pay_to_arr, target_feerate_sat_per_1000_weight_conv, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 155, (uint32_t)claim_id_arr, (uint32_t)must_spend_arr, (uint32_t)must_pay_to_arr, target_feerate_sat_per_1000_weight_conv, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_CoinSelectionNoneZ ret_conv = *(LDKCResult_CoinSelectionNoneZ*)(ret_ptr); @@ -16076,7 +17558,7 @@ LDKCResult_TransactionNoneZ sign_psbt_LDKCoinSelectionSource_jcall(const void* t int8_tArray psbt_arr = init_int8_tArray(psbt_var.datalen, __LINE__); memcpy(psbt_arr->elems, psbt_var.data, psbt_var.datalen); CVec_u8Z_free(psbt_var); - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 153, (uint32_t)psbt_arr, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 156, (uint32_t)psbt_arr, 0, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_TransactionNoneZ ret_conv = *(LDKCResult_TransactionNoneZ*)(ret_ptr); @@ -16175,7 +17657,7 @@ static void LDKWalletSource_JCalls_free(void* this_arg) { } LDKCResult_CVec_UtxoZNoneZ list_confirmed_utxos_LDKWalletSource_jcall(const void* this_arg) { LDKWalletSource_JCalls *j_calls = (LDKWalletSource_JCalls*) this_arg; - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 154, 0, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 157, 0, 0, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_CVec_UtxoZNoneZ ret_conv = *(LDKCResult_CVec_UtxoZNoneZ*)(ret_ptr); @@ -16184,7 +17666,7 @@ LDKCResult_CVec_UtxoZNoneZ list_confirmed_utxos_LDKWalletSource_jcall(const void } LDKCResult_CVec_u8ZNoneZ get_change_script_LDKWalletSource_jcall(const void* this_arg) { LDKWalletSource_JCalls *j_calls = (LDKWalletSource_JCalls*) this_arg; - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 155, 0, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 158, 0, 0, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_CVec_u8ZNoneZ ret_conv = *(LDKCResult_CVec_u8ZNoneZ*)(ret_ptr); @@ -16197,7 +17679,7 @@ LDKCResult_TransactionNoneZ sign_psbt_LDKWalletSource_jcall(const void* this_arg int8_tArray psbt_arr = init_int8_tArray(psbt_var.datalen, __LINE__); memcpy(psbt_arr->elems, psbt_var.data, psbt_var.datalen); CVec_u8Z_free(psbt_var); - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 156, (uint32_t)psbt_arr, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 159, (uint32_t)psbt_arr, 0, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_TransactionNoneZ ret_conv = *(LDKCResult_TransactionNoneZ*)(ret_ptr); @@ -16415,6 +17897,24 @@ uint64_t __attribute__((export_name("TS_BigEndianScalar_new"))) TS_BigEndianSca return tag_ptr(ret_ref, true); } +static inline uint64_t BigEndianScalar_clone_ptr(LDKBigEndianScalar *NONNULL_PTR arg) { + LDKBigEndianScalar* ret_ref = MALLOC(sizeof(LDKBigEndianScalar), "LDKBigEndianScalar"); + *ret_ref = BigEndianScalar_clone(arg); + return tag_ptr(ret_ref, true); +} +int64_t __attribute__((export_name("TS_BigEndianScalar_clone_ptr"))) TS_BigEndianScalar_clone_ptr(uint64_t arg) { + LDKBigEndianScalar* arg_conv = (LDKBigEndianScalar*)untag_ptr(arg); + int64_t ret_conv = BigEndianScalar_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_BigEndianScalar_clone"))) TS_BigEndianScalar_clone(uint64_t orig) { + LDKBigEndianScalar* orig_conv = (LDKBigEndianScalar*)untag_ptr(orig); + LDKBigEndianScalar* ret_ref = MALLOC(sizeof(LDKBigEndianScalar), "LDKBigEndianScalar"); + *ret_ref = BigEndianScalar_clone(orig_conv); + return tag_ptr(ret_ref, true); +} + static inline uint64_t Bech32Error_clone_ptr(LDKBech32Error *NONNULL_PTR arg) { LDKBech32Error *ret_copy = MALLOC(sizeof(LDKBech32Error), "LDKBech32Error"); *ret_copy = Bech32Error_clone(arg); @@ -16581,6 +18081,116 @@ void __attribute__((export_name("TS_Str_free"))) TS_Str_free(jstring _res) { Str_free(dummy); } +void __attribute__((export_name("TS_CVec_u8Z_free"))) TS_CVec_u8Z_free(int8_tArray _res) { + LDKCVec_u8Z _res_ref; + _res_ref.datalen = _res->arr_len; + _res_ref.data = MALLOC(_res_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(_res_ref.data, _res->elems, _res_ref.datalen); FREE(_res); + CVec_u8Z_free(_res_ref); +} + +uint64_t __attribute__((export_name("TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok"))) TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(uint64_t o) { + LDKRefundMaybeWithDerivedMetadataBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&o_conv); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err"))) TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(uint32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_js(e); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok"))) TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(uint64_t o) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free"))) TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr"))) TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* arg_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone"))) TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(uint64_t orig) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* orig_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_RefundBolt12SemanticErrorZ_ok"))) TS_CResult_RefundBolt12SemanticErrorZ_ok(uint64_t o) { + LDKRefund o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = Refund_clone(&o_conv); + LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_RefundBolt12SemanticErrorZ_err"))) TS_CResult_RefundBolt12SemanticErrorZ_err(uint32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_js(e); + LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_RefundBolt12SemanticErrorZ_is_ok"))) TS_CResult_RefundBolt12SemanticErrorZ_is_ok(uint64_t o) { + LDKCResult_RefundBolt12SemanticErrorZ* o_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_RefundBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_RefundBolt12SemanticErrorZ_free"))) TS_CResult_RefundBolt12SemanticErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_RefundBolt12SemanticErrorZ _res_conv = *(LDKCResult_RefundBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_RefundBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_RefundBolt12SemanticErrorZ_clone_ptr(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_RefundBolt12SemanticErrorZ_clone_ptr"))) TS_CResult_RefundBolt12SemanticErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_RefundBolt12SemanticErrorZ* arg_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_RefundBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_RefundBolt12SemanticErrorZ_clone"))) TS_CResult_RefundBolt12SemanticErrorZ_clone(uint64_t orig) { + LDKCResult_RefundBolt12SemanticErrorZ* orig_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + uint64_t __attribute__((export_name("TS_COption_u64Z_some"))) TS_COption_u64Z_some(int64_t o) { LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z"); *ret_copy = COption_u64Z_some(o); @@ -16887,14 +18497,6 @@ uint64_t __attribute__((export_name("TS_COption_ThirtyTwoBytesZ_clone"))) TS_CO return ret_ref; } -void __attribute__((export_name("TS_CVec_u8Z_free"))) TS_CVec_u8Z_free(int8_tArray _res) { - LDKCVec_u8Z _res_ref; - _res_ref.datalen = _res->arr_len; - _res_ref.data = MALLOC(_res_ref.datalen, "LDKCVec_u8Z Bytes"); - memcpy(_res_ref.data, _res->elems, _res_ref.datalen); FREE(_res); - CVec_u8Z_free(_res_ref); -} - uint64_t __attribute__((export_name("TS_COption_CVec_u8ZZ_some"))) TS_COption_CVec_u8ZZ_some(int8_tArray o) { LDKCVec_u8Z o_ref; o_ref.datalen = o->arr_len; @@ -17103,6 +18705,156 @@ uint64_t __attribute__((export_name("TS_CResult_RecipientOnionFieldsNoneZ_clone return tag_ptr(ret_conv, true); } +uint64_t __attribute__((export_name("TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok"))) TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok(uint64_t o) { + LDKUnsignedBolt12Invoice o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = UnsignedBolt12Invoice_clone(&o_conv); + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err"))) TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err(uint32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_js(e); + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok"))) TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(uint64_t o) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* o_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free"))) TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ _res_conv = *(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr"))) TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* arg_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone"))) TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(uint64_t orig) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* orig_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok"))) TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok(uint64_t o) { + LDKBolt12Invoice o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = Bolt12Invoice_clone(&o_conv); + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_err"))) TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_err(uint32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_js(e); + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok"))) TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(uint64_t o) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* o_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_free"))) TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ _res_conv = *(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_Bolt12InvoiceBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr"))) TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* arg_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone"))) TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(uint64_t orig) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* orig_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_SchnorrSignatureNoneZ_ok"))) TS_CResult_SchnorrSignatureNoneZ_ok(int8_tArray o) { + LDKSchnorrSignature o_ref; + CHECK(o->arr_len == 64); + memcpy(o_ref.compact_form, o->elems, 64); FREE(o); + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = CResult_SchnorrSignatureNoneZ_ok(o_ref); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_SchnorrSignatureNoneZ_err"))) TS_CResult_SchnorrSignatureNoneZ_err() { + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = CResult_SchnorrSignatureNoneZ_err(); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_SchnorrSignatureNoneZ_is_ok"))) TS_CResult_SchnorrSignatureNoneZ_is_ok(uint64_t o) { + LDKCResult_SchnorrSignatureNoneZ* o_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(o); + jboolean ret_conv = CResult_SchnorrSignatureNoneZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_SchnorrSignatureNoneZ_free"))) TS_CResult_SchnorrSignatureNoneZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_SchnorrSignatureNoneZ _res_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_SchnorrSignatureNoneZ_free(_res_conv); +} + +static inline uint64_t CResult_SchnorrSignatureNoneZ_clone_ptr(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR arg) { + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = CResult_SchnorrSignatureNoneZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_SchnorrSignatureNoneZ_clone_ptr"))) TS_CResult_SchnorrSignatureNoneZ_clone_ptr(uint64_t arg) { + LDKCResult_SchnorrSignatureNoneZ* arg_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(arg); + int64_t ret_conv = CResult_SchnorrSignatureNoneZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_SchnorrSignatureNoneZ_clone"))) TS_CResult_SchnorrSignatureNoneZ_clone(uint64_t orig) { + LDKCResult_SchnorrSignatureNoneZ* orig_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(orig); + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = CResult_SchnorrSignatureNoneZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + void __attribute__((export_name("TS_CVec_ThirtyTwoBytesZ_free"))) TS_CVec_ThirtyTwoBytesZ_free(ptrArray _res) { LDKCVec_ThirtyTwoBytesZ _res_constr; _res_constr.datalen = _res->arr_len; @@ -17180,6 +18932,100 @@ uint64_t __attribute__((export_name("TS_COption_CVec_ThirtyTwoBytesZZ_clone"))) return ret_ref; } +uint64_t __attribute__((export_name("TS_COption_AmountZ_some"))) TS_COption_AmountZ_some(uint64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKAmount o_conv = *(LDKAmount*)(o_ptr); + o_conv = Amount_clone((LDKAmount*)untag_ptr(o)); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = COption_AmountZ_some(o_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_COption_AmountZ_none"))) TS_COption_AmountZ_none() { + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = COption_AmountZ_none(); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void __attribute__((export_name("TS_COption_AmountZ_free"))) TS_COption_AmountZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCOption_AmountZ _res_conv = *(LDKCOption_AmountZ*)(_res_ptr); + FREE(untag_ptr(_res)); + COption_AmountZ_free(_res_conv); +} + +static inline uint64_t COption_AmountZ_clone_ptr(LDKCOption_AmountZ *NONNULL_PTR arg) { + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = COption_AmountZ_clone(arg); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t __attribute__((export_name("TS_COption_AmountZ_clone_ptr"))) TS_COption_AmountZ_clone_ptr(uint64_t arg) { + LDKCOption_AmountZ* arg_conv = (LDKCOption_AmountZ*)untag_ptr(arg); + int64_t ret_conv = COption_AmountZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_COption_AmountZ_clone"))) TS_COption_AmountZ_clone(uint64_t orig) { + LDKCOption_AmountZ* orig_conv = (LDKCOption_AmountZ*)untag_ptr(orig); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = COption_AmountZ_clone(orig_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_COption_QuantityZ_some"))) TS_COption_QuantityZ_some(uint64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKQuantity o_conv = *(LDKQuantity*)(o_ptr); + o_conv = Quantity_clone((LDKQuantity*)untag_ptr(o)); + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = COption_QuantityZ_some(o_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_COption_QuantityZ_none"))) TS_COption_QuantityZ_none() { + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = COption_QuantityZ_none(); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void __attribute__((export_name("TS_COption_QuantityZ_free"))) TS_COption_QuantityZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCOption_QuantityZ _res_conv = *(LDKCOption_QuantityZ*)(_res_ptr); + FREE(untag_ptr(_res)); + COption_QuantityZ_free(_res_conv); +} + +static inline uint64_t COption_QuantityZ_clone_ptr(LDKCOption_QuantityZ *NONNULL_PTR arg) { + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = COption_QuantityZ_clone(arg); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t __attribute__((export_name("TS_COption_QuantityZ_clone_ptr"))) TS_COption_QuantityZ_clone_ptr(uint64_t arg) { + LDKCOption_QuantityZ* arg_conv = (LDKCOption_QuantityZ*)untag_ptr(arg); + int64_t ret_conv = COption_QuantityZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_COption_QuantityZ_clone"))) TS_COption_QuantityZ_clone(uint64_t orig) { + LDKCOption_QuantityZ* orig_conv = (LDKCOption_QuantityZ*)untag_ptr(orig); + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = COption_QuantityZ_clone(orig_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + uint64_t __attribute__((export_name("TS_CResult_ThirtyTwoBytesNoneZ_ok"))) TS_CResult_ThirtyTwoBytesNoneZ_ok(int8_tArray o) { LDKThirtyTwoBytes o_ref; CHECK(o->arr_len == 32); @@ -17817,7 +19663,7 @@ uint64_t __attribute__((export_name("TS_COption_BigEndianScalarZ_some"))) TS_CO void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); LDKBigEndianScalar o_conv = *(LDKBigEndianScalar*)(o_ptr); - // WARNING: we may need a move here but no clone is available for LDKBigEndianScalar + o_conv = BigEndianScalar_clone((LDKBigEndianScalar*)untag_ptr(o)); LDKCOption_BigEndianScalarZ *ret_copy = MALLOC(sizeof(LDKCOption_BigEndianScalarZ), "LDKCOption_BigEndianScalarZ"); *ret_copy = COption_BigEndianScalarZ_some(o_conv); uint64_t ret_ref = tag_ptr(ret_copy, true); @@ -17925,54 +19771,6 @@ uint64_t __attribute__((export_name("TS_CResult_RecoverableSignatureNoneZ_clone return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_CResult_SchnorrSignatureNoneZ_ok"))) TS_CResult_SchnorrSignatureNoneZ_ok(int8_tArray o) { - LDKSchnorrSignature o_ref; - CHECK(o->arr_len == 64); - memcpy(o_ref.compact_form, o->elems, 64); FREE(o); - LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); - *ret_conv = CResult_SchnorrSignatureNoneZ_ok(o_ref); - return tag_ptr(ret_conv, true); -} - -uint64_t __attribute__((export_name("TS_CResult_SchnorrSignatureNoneZ_err"))) TS_CResult_SchnorrSignatureNoneZ_err() { - LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); - *ret_conv = CResult_SchnorrSignatureNoneZ_err(); - return tag_ptr(ret_conv, true); -} - -jboolean __attribute__((export_name("TS_CResult_SchnorrSignatureNoneZ_is_ok"))) TS_CResult_SchnorrSignatureNoneZ_is_ok(uint64_t o) { - LDKCResult_SchnorrSignatureNoneZ* o_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(o); - jboolean ret_conv = CResult_SchnorrSignatureNoneZ_is_ok(o_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_CResult_SchnorrSignatureNoneZ_free"))) TS_CResult_SchnorrSignatureNoneZ_free(uint64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKCResult_SchnorrSignatureNoneZ _res_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(_res_ptr); - FREE(untag_ptr(_res)); - CResult_SchnorrSignatureNoneZ_free(_res_conv); -} - -static inline uint64_t CResult_SchnorrSignatureNoneZ_clone_ptr(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR arg) { - LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); - *ret_conv = CResult_SchnorrSignatureNoneZ_clone(arg); - return tag_ptr(ret_conv, true); -} -int64_t __attribute__((export_name("TS_CResult_SchnorrSignatureNoneZ_clone_ptr"))) TS_CResult_SchnorrSignatureNoneZ_clone_ptr(uint64_t arg) { - LDKCResult_SchnorrSignatureNoneZ* arg_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(arg); - int64_t ret_conv = CResult_SchnorrSignatureNoneZ_clone_ptr(arg_conv); - return ret_conv; -} - -uint64_t __attribute__((export_name("TS_CResult_SchnorrSignatureNoneZ_clone"))) TS_CResult_SchnorrSignatureNoneZ_clone(uint64_t orig) { - LDKCResult_SchnorrSignatureNoneZ* orig_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(orig); - LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); - *ret_conv = CResult_SchnorrSignatureNoneZ_clone(orig_conv); - return tag_ptr(ret_conv, true); -} - uint64_t __attribute__((export_name("TS_CResult_ECDSASignatureNoneZ_ok"))) TS_CResult_ECDSASignatureNoneZ_ok(int8_tArray o) { LDKECDSASignature o_ref; CHECK(o->arr_len == 64); @@ -18021,6 +19819,56 @@ uint64_t __attribute__((export_name("TS_CResult_ECDSASignatureNoneZ_clone"))) T return tag_ptr(ret_conv, true); } +uint64_t __attribute__((export_name("TS_CResult_TransactionNoneZ_ok"))) TS_CResult_TransactionNoneZ_ok(int8_tArray o) { + LDKTransaction o_ref; + o_ref.datalen = o->arr_len; + o_ref.data = MALLOC(o_ref.datalen, "LDKTransaction Bytes"); + memcpy(o_ref.data, o->elems, o_ref.datalen); FREE(o); + o_ref.data_is_owned = true; + LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); + *ret_conv = CResult_TransactionNoneZ_ok(o_ref); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_TransactionNoneZ_err"))) TS_CResult_TransactionNoneZ_err() { + LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); + *ret_conv = CResult_TransactionNoneZ_err(); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_TransactionNoneZ_is_ok"))) TS_CResult_TransactionNoneZ_is_ok(uint64_t o) { + LDKCResult_TransactionNoneZ* o_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(o); + jboolean ret_conv = CResult_TransactionNoneZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_TransactionNoneZ_free"))) TS_CResult_TransactionNoneZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_TransactionNoneZ _res_conv = *(LDKCResult_TransactionNoneZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_TransactionNoneZ_free(_res_conv); +} + +static inline uint64_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg) { + LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); + *ret_conv = CResult_TransactionNoneZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_TransactionNoneZ_clone_ptr"))) TS_CResult_TransactionNoneZ_clone_ptr(uint64_t arg) { + LDKCResult_TransactionNoneZ* arg_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(arg); + int64_t ret_conv = CResult_TransactionNoneZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_TransactionNoneZ_clone"))) TS_CResult_TransactionNoneZ_clone(uint64_t orig) { + LDKCResult_TransactionNoneZ* orig_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(orig); + LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); + *ret_conv = CResult_TransactionNoneZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + uint64_t __attribute__((export_name("TS_CResult_WriteableEcdsaChannelSignerDecodeErrorZ_ok"))) TS_CResult_WriteableEcdsaChannelSignerDecodeErrorZ_ok(uint64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -18485,56 +20333,6 @@ uint64_t __attribute__((export_name("TS_CResult_InMemorySignerDecodeErrorZ_clon return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_CResult_TransactionNoneZ_ok"))) TS_CResult_TransactionNoneZ_ok(int8_tArray o) { - LDKTransaction o_ref; - o_ref.datalen = o->arr_len; - o_ref.data = MALLOC(o_ref.datalen, "LDKTransaction Bytes"); - memcpy(o_ref.data, o->elems, o_ref.datalen); FREE(o); - o_ref.data_is_owned = true; - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = CResult_TransactionNoneZ_ok(o_ref); - return tag_ptr(ret_conv, true); -} - -uint64_t __attribute__((export_name("TS_CResult_TransactionNoneZ_err"))) TS_CResult_TransactionNoneZ_err() { - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = CResult_TransactionNoneZ_err(); - return tag_ptr(ret_conv, true); -} - -jboolean __attribute__((export_name("TS_CResult_TransactionNoneZ_is_ok"))) TS_CResult_TransactionNoneZ_is_ok(uint64_t o) { - LDKCResult_TransactionNoneZ* o_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(o); - jboolean ret_conv = CResult_TransactionNoneZ_is_ok(o_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_CResult_TransactionNoneZ_free"))) TS_CResult_TransactionNoneZ_free(uint64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKCResult_TransactionNoneZ _res_conv = *(LDKCResult_TransactionNoneZ*)(_res_ptr); - FREE(untag_ptr(_res)); - CResult_TransactionNoneZ_free(_res_conv); -} - -static inline uint64_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg) { - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = CResult_TransactionNoneZ_clone(arg); - return tag_ptr(ret_conv, true); -} -int64_t __attribute__((export_name("TS_CResult_TransactionNoneZ_clone_ptr"))) TS_CResult_TransactionNoneZ_clone_ptr(uint64_t arg) { - LDKCResult_TransactionNoneZ* arg_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(arg); - int64_t ret_conv = CResult_TransactionNoneZ_clone_ptr(arg_conv); - return ret_conv; -} - -uint64_t __attribute__((export_name("TS_CResult_TransactionNoneZ_clone"))) TS_CResult_TransactionNoneZ_clone(uint64_t orig) { - LDKCResult_TransactionNoneZ* orig_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(orig); - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = CResult_TransactionNoneZ_clone(orig_conv); - return tag_ptr(ret_conv, true); -} - void __attribute__((export_name("TS_CVec_ChannelDetailsZ_free"))) TS_CVec_ChannelDetailsZ_free(uint64_tArray _res) { LDKCVec_ChannelDetailsZ _res_constr; _res_constr.datalen = _res->arr_len; @@ -19716,6 +21514,60 @@ void __attribute__((export_name("TS_CResult_ProbabilisticScorerDecodeErrorZ_fre CResult_ProbabilisticScorerDecodeErrorZ_free(_res_conv); } +uint64_t __attribute__((export_name("TS_CResult_BestBlockDecodeErrorZ_ok"))) TS_CResult_BestBlockDecodeErrorZ_ok(uint64_t o) { + LDKBestBlock o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = BestBlock_clone(&o_conv); + LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ"); + *ret_conv = CResult_BestBlockDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_BestBlockDecodeErrorZ_err"))) TS_CResult_BestBlockDecodeErrorZ_err(uint64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ"); + *ret_conv = CResult_BestBlockDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_BestBlockDecodeErrorZ_is_ok"))) TS_CResult_BestBlockDecodeErrorZ_is_ok(uint64_t o) { + LDKCResult_BestBlockDecodeErrorZ* o_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_BestBlockDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_BestBlockDecodeErrorZ_free"))) TS_CResult_BestBlockDecodeErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_BestBlockDecodeErrorZ _res_conv = *(LDKCResult_BestBlockDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_BestBlockDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_BestBlockDecodeErrorZ_clone_ptr(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ"); + *ret_conv = CResult_BestBlockDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_BestBlockDecodeErrorZ_clone_ptr"))) TS_CResult_BestBlockDecodeErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_BestBlockDecodeErrorZ* arg_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_BestBlockDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_BestBlockDecodeErrorZ_clone"))) TS_CResult_BestBlockDecodeErrorZ_clone(uint64_t orig) { + LDKCResult_BestBlockDecodeErrorZ* orig_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(orig); + LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ"); + *ret_conv = CResult_BestBlockDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + static inline uint64_t C2Tuple_usizeTransactionZ_clone_ptr(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR arg) { LDKC2Tuple_usizeTransactionZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ"); *ret_conv = C2Tuple_usizeTransactionZ_clone(arg); @@ -19900,81 +21752,86 @@ void __attribute__((export_name("TS_CVec_MonitorEventZ_free"))) TS_CVec_Monitor CVec_MonitorEventZ_free(_res_constr); } -static inline uint64_t C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR arg) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ"); - *ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(arg); +static inline uint64_t C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR arg) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ"); + *ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(arg); return tag_ptr(ret_conv, true); } -int64_t __attribute__((export_name("TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr"))) TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(uint64_t arg) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* arg_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(arg); - int64_t ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(arg_conv); +int64_t __attribute__((export_name("TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr"))) TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(uint64_t arg) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* arg_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(arg); + int64_t ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(arg_conv); return ret_conv; } -uint64_t __attribute__((export_name("TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone"))) TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(uint64_t orig) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* orig_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(orig); - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ"); - *ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(orig_conv); +uint64_t __attribute__((export_name("TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone"))) TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(uint64_t orig) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* orig_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(orig); + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ"); + *ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(orig_conv); return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new"))) TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(uint64_t a, uint64_tArray b, int8_tArray c) { +uint64_t __attribute__((export_name("TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new"))) TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new(uint64_t a, uint64_t b, uint64_tArray c, int8_tArray d) { LDKOutPoint a_conv; a_conv.inner = untag_ptr(a); a_conv.is_owned = ptr_is_owned(a); CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); a_conv = OutPoint_clone(&a_conv); - LDKCVec_MonitorEventZ b_constr; - b_constr.datalen = b->arr_len; - if (b_constr.datalen > 0) - b_constr.data = MALLOC(b_constr.datalen * sizeof(LDKMonitorEvent), "LDKCVec_MonitorEventZ Elements"); + LDKChannelId b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv = ChannelId_clone(&b_conv); + LDKCVec_MonitorEventZ c_constr; + c_constr.datalen = c->arr_len; + if (c_constr.datalen > 0) + c_constr.data = MALLOC(c_constr.datalen * sizeof(LDKMonitorEvent), "LDKCVec_MonitorEventZ Elements"); else - b_constr.data = NULL; - uint64_t* b_vals = b->elems; - for (size_t o = 0; o < b_constr.datalen; o++) { - uint64_t b_conv_14 = b_vals[o]; - void* b_conv_14_ptr = untag_ptr(b_conv_14); - CHECK_ACCESS(b_conv_14_ptr); - LDKMonitorEvent b_conv_14_conv = *(LDKMonitorEvent*)(b_conv_14_ptr); - b_conv_14_conv = MonitorEvent_clone((LDKMonitorEvent*)untag_ptr(b_conv_14)); - b_constr.data[o] = b_conv_14_conv; - } - FREE(b); - LDKPublicKey c_ref; - CHECK(c->arr_len == 33); - memcpy(c_ref.compressed_form, c->elems, 33); FREE(c); - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ"); - *ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(a_conv, b_constr, c_ref); - return tag_ptr(ret_conv, true); -} - -void __attribute__((export_name("TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free"))) TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(uint64_t _res) { + c_constr.data = NULL; + uint64_t* c_vals = c->elems; + for (size_t o = 0; o < c_constr.datalen; o++) { + uint64_t c_conv_14 = c_vals[o]; + void* c_conv_14_ptr = untag_ptr(c_conv_14); + CHECK_ACCESS(c_conv_14_ptr); + LDKMonitorEvent c_conv_14_conv = *(LDKMonitorEvent*)(c_conv_14_ptr); + c_conv_14_conv = MonitorEvent_clone((LDKMonitorEvent*)untag_ptr(c_conv_14)); + c_constr.data[o] = c_conv_14_conv; + } + FREE(c); + LDKPublicKey d_ref; + CHECK(d->arr_len == 33); + memcpy(d_ref.compressed_form, d->elems, 33); FREE(d); + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ"); + *ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new(a_conv, b_conv, c_constr, d_ref); + return tag_ptr(ret_conv, true); +} + +void __attribute__((export_name("TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free"))) TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free(uint64_t _res) { if (!ptr_is_owned(_res)) return; void* _res_ptr = untag_ptr(_res); CHECK_ACCESS(_res_ptr); - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ _res_conv = *(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)(_res_ptr); + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ _res_conv = *(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)(_res_ptr); FREE(untag_ptr(_res)); - C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(_res_conv); + C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free(_res_conv); } -void __attribute__((export_name("TS_CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free"))) TS_CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free(uint64_tArray _res) { - LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ _res_constr; +void __attribute__((export_name("TS_CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free"))) TS_CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free(uint64_tArray _res) { + LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ _res_constr; _res_constr.datalen = _res->arr_len; if (_res_constr.datalen > 0) - _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ Elements"); + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ Elements"); else _res_constr.data = NULL; uint64_t* _res_vals = _res->elems; - for (size_t x = 0; x < _res_constr.datalen; x++) { - uint64_t _res_conv_49 = _res_vals[x]; - void* _res_conv_49_ptr = untag_ptr(_res_conv_49); - CHECK_ACCESS(_res_conv_49_ptr); - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ _res_conv_49_conv = *(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)(_res_conv_49_ptr); - FREE(untag_ptr(_res_conv_49)); - _res_constr.data[x] = _res_conv_49_conv; + for (size_t f = 0; f < _res_constr.datalen; f++) { + uint64_t _res_conv_57 = _res_vals[f]; + void* _res_conv_57_ptr = untag_ptr(_res_conv_57); + CHECK_ACCESS(_res_conv_57_ptr); + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ _res_conv_57_conv = *(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)(_res_conv_57_ptr); + FREE(untag_ptr(_res_conv_57)); + _res_constr.data[f] = _res_conv_57_conv; } FREE(_res); - CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free(_res_constr); + CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free(_res_constr); } uint64_t __attribute__((export_name("TS_CResult_InitFeaturesDecodeErrorZ_ok"))) TS_CResult_InitFeaturesDecodeErrorZ_ok(uint64_t o) { @@ -20355,6 +22212,225 @@ uint64_t __attribute__((export_name("TS_CResult_ChannelTypeFeaturesDecodeErrorZ return tag_ptr(ret_conv, true); } +uint64_t __attribute__((export_name("TS_CResult_OfferIdDecodeErrorZ_ok"))) TS_CResult_OfferIdDecodeErrorZ_ok(uint64_t o) { + LDKOfferId o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = OfferId_clone(&o_conv); + LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ"); + *ret_conv = CResult_OfferIdDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_OfferIdDecodeErrorZ_err"))) TS_CResult_OfferIdDecodeErrorZ_err(uint64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ"); + *ret_conv = CResult_OfferIdDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_OfferIdDecodeErrorZ_is_ok"))) TS_CResult_OfferIdDecodeErrorZ_is_ok(uint64_t o) { + LDKCResult_OfferIdDecodeErrorZ* o_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_OfferIdDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_OfferIdDecodeErrorZ_free"))) TS_CResult_OfferIdDecodeErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_OfferIdDecodeErrorZ _res_conv = *(LDKCResult_OfferIdDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_OfferIdDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_OfferIdDecodeErrorZ_clone_ptr(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ"); + *ret_conv = CResult_OfferIdDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_OfferIdDecodeErrorZ_clone_ptr"))) TS_CResult_OfferIdDecodeErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_OfferIdDecodeErrorZ* arg_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_OfferIdDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_OfferIdDecodeErrorZ_clone"))) TS_CResult_OfferIdDecodeErrorZ_clone(uint64_t orig) { + LDKCResult_OfferIdDecodeErrorZ* orig_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(orig); + LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ"); + *ret_conv = CResult_OfferIdDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_ok"))) TS_CResult_NoneBolt12SemanticErrorZ_ok() { + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = CResult_NoneBolt12SemanticErrorZ_ok(); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_err"))) TS_CResult_NoneBolt12SemanticErrorZ_err(uint32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_js(e); + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = CResult_NoneBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_is_ok"))) TS_CResult_NoneBolt12SemanticErrorZ_is_ok(uint64_t o) { + LDKCResult_NoneBolt12SemanticErrorZ* o_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_NoneBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_free"))) TS_CResult_NoneBolt12SemanticErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_NoneBolt12SemanticErrorZ _res_conv = *(LDKCResult_NoneBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_NoneBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_NoneBolt12SemanticErrorZ_clone_ptr(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_clone_ptr"))) TS_CResult_NoneBolt12SemanticErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_NoneBolt12SemanticErrorZ* arg_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_NoneBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_clone"))) TS_CResult_NoneBolt12SemanticErrorZ_clone(uint64_t orig) { + LDKCResult_NoneBolt12SemanticErrorZ* orig_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_OfferBolt12SemanticErrorZ_ok"))) TS_CResult_OfferBolt12SemanticErrorZ_ok(uint64_t o) { + LDKOffer o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = Offer_clone(&o_conv); + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_OfferBolt12SemanticErrorZ_err"))) TS_CResult_OfferBolt12SemanticErrorZ_err(uint32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_js(e); + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_OfferBolt12SemanticErrorZ_is_ok"))) TS_CResult_OfferBolt12SemanticErrorZ_is_ok(uint64_t o) { + LDKCResult_OfferBolt12SemanticErrorZ* o_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_OfferBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_OfferBolt12SemanticErrorZ_free"))) TS_CResult_OfferBolt12SemanticErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_OfferBolt12SemanticErrorZ _res_conv = *(LDKCResult_OfferBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_OfferBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_OfferBolt12SemanticErrorZ_clone_ptr(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_OfferBolt12SemanticErrorZ_clone_ptr"))) TS_CResult_OfferBolt12SemanticErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_OfferBolt12SemanticErrorZ* arg_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_OfferBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_OfferBolt12SemanticErrorZ_clone"))) TS_CResult_OfferBolt12SemanticErrorZ_clone(uint64_t orig) { + LDKCResult_OfferBolt12SemanticErrorZ* orig_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok"))) TS_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(uint64_t o) { + LDKInvoiceRequestWithDerivedPayerIdBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err"))) TS_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(uint32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_js(e); + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok"))) TS_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(uint64_t o) { + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free"))) TS_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(_res_conv); +} + +uint64_t __attribute__((export_name("TS_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok"))) TS_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok(uint64_t o) { + LDKInvoiceRequestWithExplicitPayerIdBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err"))) TS_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(uint32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_js(e); + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok"))) TS_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(uint64_t o) { + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free"))) TS_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(_res_conv); +} + uint64_t __attribute__((export_name("TS_CResult_OfferBolt12ParseErrorZ_ok"))) TS_CResult_OfferBolt12ParseErrorZ_ok(uint64_t o) { LDKOffer o_conv; o_conv.inner = untag_ptr(o); @@ -20410,55 +22486,6 @@ uint64_t __attribute__((export_name("TS_CResult_OfferBolt12ParseErrorZ_clone")) return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_CResult_PublicKeySecp256k1ErrorZ_ok"))) TS_CResult_PublicKeySecp256k1ErrorZ_ok(int8_tArray o) { - LDKPublicKey o_ref; - CHECK(o->arr_len == 33); - memcpy(o_ref.compressed_form, o->elems, 33); FREE(o); - LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); - *ret_conv = CResult_PublicKeySecp256k1ErrorZ_ok(o_ref); - return tag_ptr(ret_conv, true); -} - -uint64_t __attribute__((export_name("TS_CResult_PublicKeySecp256k1ErrorZ_err"))) TS_CResult_PublicKeySecp256k1ErrorZ_err(uint32_t e) { - LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_js(e); - LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); - *ret_conv = CResult_PublicKeySecp256k1ErrorZ_err(e_conv); - return tag_ptr(ret_conv, true); -} - -jboolean __attribute__((export_name("TS_CResult_PublicKeySecp256k1ErrorZ_is_ok"))) TS_CResult_PublicKeySecp256k1ErrorZ_is_ok(uint64_t o) { - LDKCResult_PublicKeySecp256k1ErrorZ* o_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(o); - jboolean ret_conv = CResult_PublicKeySecp256k1ErrorZ_is_ok(o_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_CResult_PublicKeySecp256k1ErrorZ_free"))) TS_CResult_PublicKeySecp256k1ErrorZ_free(uint64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKCResult_PublicKeySecp256k1ErrorZ _res_conv = *(LDKCResult_PublicKeySecp256k1ErrorZ*)(_res_ptr); - FREE(untag_ptr(_res)); - CResult_PublicKeySecp256k1ErrorZ_free(_res_conv); -} - -static inline uint64_t CResult_PublicKeySecp256k1ErrorZ_clone_ptr(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR arg) { - LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); - *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(arg); - return tag_ptr(ret_conv, true); -} -int64_t __attribute__((export_name("TS_CResult_PublicKeySecp256k1ErrorZ_clone_ptr"))) TS_CResult_PublicKeySecp256k1ErrorZ_clone_ptr(uint64_t arg) { - LDKCResult_PublicKeySecp256k1ErrorZ* arg_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(arg); - int64_t ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone_ptr(arg_conv); - return ret_conv; -} - -uint64_t __attribute__((export_name("TS_CResult_PublicKeySecp256k1ErrorZ_clone"))) TS_CResult_PublicKeySecp256k1ErrorZ_clone(uint64_t orig) { - LDKCResult_PublicKeySecp256k1ErrorZ* orig_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(orig); - LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); - *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(orig_conv); - return tag_ptr(ret_conv, true); -} - uint64_t __attribute__((export_name("TS_CResult_NodeIdDecodeErrorZ_ok"))) TS_CResult_NodeIdDecodeErrorZ_ok(uint64_t o) { LDKNodeId o_conv; o_conv.inner = untag_ptr(o); @@ -20513,6 +22540,55 @@ uint64_t __attribute__((export_name("TS_CResult_NodeIdDecodeErrorZ_clone"))) TS return tag_ptr(ret_conv, true); } +uint64_t __attribute__((export_name("TS_CResult_PublicKeySecp256k1ErrorZ_ok"))) TS_CResult_PublicKeySecp256k1ErrorZ_ok(int8_tArray o) { + LDKPublicKey o_ref; + CHECK(o->arr_len == 33); + memcpy(o_ref.compressed_form, o->elems, 33); FREE(o); + LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); + *ret_conv = CResult_PublicKeySecp256k1ErrorZ_ok(o_ref); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_PublicKeySecp256k1ErrorZ_err"))) TS_CResult_PublicKeySecp256k1ErrorZ_err(uint32_t e) { + LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_js(e); + LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); + *ret_conv = CResult_PublicKeySecp256k1ErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_PublicKeySecp256k1ErrorZ_is_ok"))) TS_CResult_PublicKeySecp256k1ErrorZ_is_ok(uint64_t o) { + LDKCResult_PublicKeySecp256k1ErrorZ* o_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_PublicKeySecp256k1ErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_PublicKeySecp256k1ErrorZ_free"))) TS_CResult_PublicKeySecp256k1ErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_PublicKeySecp256k1ErrorZ _res_conv = *(LDKCResult_PublicKeySecp256k1ErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_PublicKeySecp256k1ErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_PublicKeySecp256k1ErrorZ_clone_ptr(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR arg) { + LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); + *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_PublicKeySecp256k1ErrorZ_clone_ptr"))) TS_CResult_PublicKeySecp256k1ErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_PublicKeySecp256k1ErrorZ* arg_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_PublicKeySecp256k1ErrorZ_clone"))) TS_CResult_PublicKeySecp256k1ErrorZ_clone(uint64_t orig) { + LDKCResult_PublicKeySecp256k1ErrorZ* orig_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(orig); + LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); + *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + uint64_t __attribute__((export_name("TS_COption_NetworkUpdateZ_some"))) TS_COption_NetworkUpdateZ_some(uint64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -21298,6 +23374,34 @@ uint64_t __attribute__((export_name("TS_COption_CVec_SocketAddressZZ_clone"))) return ret_ref; } +uint64_t __attribute__((export_name("TS_CResult_u64ShortChannelIdErrorZ_ok"))) TS_CResult_u64ShortChannelIdErrorZ_ok(int64_t o) { + LDKCResult_u64ShortChannelIdErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u64ShortChannelIdErrorZ), "LDKCResult_u64ShortChannelIdErrorZ"); + *ret_conv = CResult_u64ShortChannelIdErrorZ_ok(o); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_u64ShortChannelIdErrorZ_err"))) TS_CResult_u64ShortChannelIdErrorZ_err(uint32_t e) { + LDKShortChannelIdError e_conv = LDKShortChannelIdError_from_js(e); + LDKCResult_u64ShortChannelIdErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u64ShortChannelIdErrorZ), "LDKCResult_u64ShortChannelIdErrorZ"); + *ret_conv = CResult_u64ShortChannelIdErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_u64ShortChannelIdErrorZ_is_ok"))) TS_CResult_u64ShortChannelIdErrorZ_is_ok(uint64_t o) { + LDKCResult_u64ShortChannelIdErrorZ* o_conv = (LDKCResult_u64ShortChannelIdErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_u64ShortChannelIdErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_u64ShortChannelIdErrorZ_free"))) TS_CResult_u64ShortChannelIdErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_u64ShortChannelIdErrorZ _res_conv = *(LDKCResult_u64ShortChannelIdErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_u64ShortChannelIdErrorZ_free(_res_conv); +} + uint64_t __attribute__((export_name("TS_CResult_PendingHTLCInfoInboundHTLCErrZ_ok"))) TS_CResult_PendingHTLCInfoInboundHTLCErrZ_ok(uint64_t o) { LDKPendingHTLCInfo o_conv; o_conv.inner = untag_ptr(o); @@ -21314,8 +23418,7 @@ uint64_t __attribute__((export_name("TS_CResult_PendingHTLCInfoInboundHTLCErrZ_ e_conv.inner = untag_ptr(e); e_conv.is_owned = ptr_is_owned(e); CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv); - // WARNING: we need a move here but no clone is available for LDKInboundHTLCErr - + e_conv = InboundHTLCErr_clone(&e_conv); LDKCResult_PendingHTLCInfoInboundHTLCErrZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoInboundHTLCErrZ), "LDKCResult_PendingHTLCInfoInboundHTLCErrZ"); *ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_err(e_conv); return tag_ptr(ret_conv, true); @@ -21336,6 +23439,24 @@ void __attribute__((export_name("TS_CResult_PendingHTLCInfoInboundHTLCErrZ_free CResult_PendingHTLCInfoInboundHTLCErrZ_free(_res_conv); } +static inline uint64_t CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR arg) { + LDKCResult_PendingHTLCInfoInboundHTLCErrZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoInboundHTLCErrZ), "LDKCResult_PendingHTLCInfoInboundHTLCErrZ"); + *ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr"))) TS_CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(uint64_t arg) { + LDKCResult_PendingHTLCInfoInboundHTLCErrZ* arg_conv = (LDKCResult_PendingHTLCInfoInboundHTLCErrZ*)untag_ptr(arg); + int64_t ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_PendingHTLCInfoInboundHTLCErrZ_clone"))) TS_CResult_PendingHTLCInfoInboundHTLCErrZ_clone(uint64_t orig) { + LDKCResult_PendingHTLCInfoInboundHTLCErrZ* orig_conv = (LDKCResult_PendingHTLCInfoInboundHTLCErrZ*)untag_ptr(orig); + LDKCResult_PendingHTLCInfoInboundHTLCErrZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoInboundHTLCErrZ), "LDKCResult_PendingHTLCInfoInboundHTLCErrZ"); + *ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + void __attribute__((export_name("TS_CVec_HTLCOutputInCommitmentZ_free"))) TS_CVec_HTLCOutputInCommitmentZ_free(uint64_tArray _res) { LDKCVec_HTLCOutputInCommitmentZ _res_constr; _res_constr.datalen = _res->arr_len; @@ -21575,6 +23696,53 @@ uint64_t __attribute__((export_name("TS_CResult_CVec_UtxoZNoneZ_clone"))) TS_CR return tag_ptr(ret_conv, true); } +uint64_t __attribute__((export_name("TS_COption_PaymentContextZ_some"))) TS_COption_PaymentContextZ_some(uint64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKPaymentContext o_conv = *(LDKPaymentContext*)(o_ptr); + o_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(o)); + LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ"); + *ret_copy = COption_PaymentContextZ_some(o_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_COption_PaymentContextZ_none"))) TS_COption_PaymentContextZ_none() { + LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ"); + *ret_copy = COption_PaymentContextZ_none(); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void __attribute__((export_name("TS_COption_PaymentContextZ_free"))) TS_COption_PaymentContextZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCOption_PaymentContextZ _res_conv = *(LDKCOption_PaymentContextZ*)(_res_ptr); + FREE(untag_ptr(_res)); + COption_PaymentContextZ_free(_res_conv); +} + +static inline uint64_t COption_PaymentContextZ_clone_ptr(LDKCOption_PaymentContextZ *NONNULL_PTR arg) { + LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ"); + *ret_copy = COption_PaymentContextZ_clone(arg); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t __attribute__((export_name("TS_COption_PaymentContextZ_clone_ptr"))) TS_COption_PaymentContextZ_clone_ptr(uint64_t arg) { + LDKCOption_PaymentContextZ* arg_conv = (LDKCOption_PaymentContextZ*)untag_ptr(arg); + int64_t ret_conv = COption_PaymentContextZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_COption_PaymentContextZ_clone"))) TS_COption_PaymentContextZ_clone(uint64_t orig) { + LDKCOption_PaymentContextZ* orig_conv = (LDKCOption_PaymentContextZ*)untag_ptr(orig); + LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ"); + *ret_copy = COption_PaymentContextZ_clone(orig_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + static inline uint64_t C2Tuple_u64u16Z_clone_ptr(LDKC2Tuple_u64u16Z *NONNULL_PTR arg) { LDKC2Tuple_u64u16Z* ret_conv = MALLOC(sizeof(LDKC2Tuple_u64u16Z), "LDKC2Tuple_u64u16Z"); *ret_conv = C2Tuple_u64u16Z_clone(arg); @@ -21699,55 +23867,57 @@ uint64_t __attribute__((export_name("TS_COption_ChannelShutdownStateZ_clone"))) return ret_ref; } -uint64_t __attribute__((export_name("TS_CResult_ThirtyTwoBytesAPIErrorZ_ok"))) TS_CResult_ThirtyTwoBytesAPIErrorZ_ok(int8_tArray o) { - LDKThirtyTwoBytes o_ref; - CHECK(o->arr_len == 32); - memcpy(o_ref.data, o->elems, 32); FREE(o); - LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); - *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_ok(o_ref); +uint64_t __attribute__((export_name("TS_CResult_ChannelIdAPIErrorZ_ok"))) TS_CResult_ChannelIdAPIErrorZ_ok(uint64_t o) { + LDKChannelId o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = ChannelId_clone(&o_conv); + LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ"); + *ret_conv = CResult_ChannelIdAPIErrorZ_ok(o_conv); return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_CResult_ThirtyTwoBytesAPIErrorZ_err"))) TS_CResult_ThirtyTwoBytesAPIErrorZ_err(uint64_t e) { +uint64_t __attribute__((export_name("TS_CResult_ChannelIdAPIErrorZ_err"))) TS_CResult_ChannelIdAPIErrorZ_err(uint64_t e) { void* e_ptr = untag_ptr(e); CHECK_ACCESS(e_ptr); LDKAPIError e_conv = *(LDKAPIError*)(e_ptr); e_conv = APIError_clone((LDKAPIError*)untag_ptr(e)); - LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); - *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_err(e_conv); + LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ"); + *ret_conv = CResult_ChannelIdAPIErrorZ_err(e_conv); return tag_ptr(ret_conv, true); } -jboolean __attribute__((export_name("TS_CResult_ThirtyTwoBytesAPIErrorZ_is_ok"))) TS_CResult_ThirtyTwoBytesAPIErrorZ_is_ok(uint64_t o) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* o_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(o); - jboolean ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_is_ok(o_conv); +jboolean __attribute__((export_name("TS_CResult_ChannelIdAPIErrorZ_is_ok"))) TS_CResult_ChannelIdAPIErrorZ_is_ok(uint64_t o) { + LDKCResult_ChannelIdAPIErrorZ* o_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_ChannelIdAPIErrorZ_is_ok(o_conv); return ret_conv; } -void __attribute__((export_name("TS_CResult_ThirtyTwoBytesAPIErrorZ_free"))) TS_CResult_ThirtyTwoBytesAPIErrorZ_free(uint64_t _res) { +void __attribute__((export_name("TS_CResult_ChannelIdAPIErrorZ_free"))) TS_CResult_ChannelIdAPIErrorZ_free(uint64_t _res) { if (!ptr_is_owned(_res)) return; void* _res_ptr = untag_ptr(_res); CHECK_ACCESS(_res_ptr); - LDKCResult_ThirtyTwoBytesAPIErrorZ _res_conv = *(LDKCResult_ThirtyTwoBytesAPIErrorZ*)(_res_ptr); + LDKCResult_ChannelIdAPIErrorZ _res_conv = *(LDKCResult_ChannelIdAPIErrorZ*)(_res_ptr); FREE(untag_ptr(_res)); - CResult_ThirtyTwoBytesAPIErrorZ_free(_res_conv); + CResult_ChannelIdAPIErrorZ_free(_res_conv); } -static inline uint64_t CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR arg) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); - *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(arg); +static inline uint64_t CResult_ChannelIdAPIErrorZ_clone_ptr(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR arg) { + LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ"); + *ret_conv = CResult_ChannelIdAPIErrorZ_clone(arg); return tag_ptr(ret_conv, true); } -int64_t __attribute__((export_name("TS_CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr"))) TS_CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(uint64_t arg) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* arg_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(arg); - int64_t ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(arg_conv); +int64_t __attribute__((export_name("TS_CResult_ChannelIdAPIErrorZ_clone_ptr"))) TS_CResult_ChannelIdAPIErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_ChannelIdAPIErrorZ* arg_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_ChannelIdAPIErrorZ_clone_ptr(arg_conv); return ret_conv; } -uint64_t __attribute__((export_name("TS_CResult_ThirtyTwoBytesAPIErrorZ_clone"))) TS_CResult_ThirtyTwoBytesAPIErrorZ_clone(uint64_t orig) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* orig_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(orig); - LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); - *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(orig_conv); +uint64_t __attribute__((export_name("TS_CResult_ChannelIdAPIErrorZ_clone"))) TS_CResult_ChannelIdAPIErrorZ_clone(uint64_t orig) { + LDKCResult_ChannelIdAPIErrorZ* orig_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(orig); + LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ"); + *ret_conv = CResult_ChannelIdAPIErrorZ_clone(orig_conv); return tag_ptr(ret_conv, true); } @@ -22144,63 +24314,136 @@ uint64_t __attribute__((export_name("TS_CResult_CVec_C2Tuple_ThirtyTwoBytesThir return tag_ptr(ret_conv, true); } -static inline uint64_t C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR arg) { - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKC2Tuple_ThirtyTwoBytesPublicKeyZ"); - *ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(arg); +static inline uint64_t C2Tuple_ChannelIdPublicKeyZ_clone_ptr(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR arg) { + LDKC2Tuple_ChannelIdPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKC2Tuple_ChannelIdPublicKeyZ"); + *ret_conv = C2Tuple_ChannelIdPublicKeyZ_clone(arg); return tag_ptr(ret_conv, true); } -int64_t __attribute__((export_name("TS_C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr"))) TS_C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(uint64_t arg) { - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* arg_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(arg); - int64_t ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(arg_conv); +int64_t __attribute__((export_name("TS_C2Tuple_ChannelIdPublicKeyZ_clone_ptr"))) TS_C2Tuple_ChannelIdPublicKeyZ_clone_ptr(uint64_t arg) { + LDKC2Tuple_ChannelIdPublicKeyZ* arg_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(arg); + int64_t ret_conv = C2Tuple_ChannelIdPublicKeyZ_clone_ptr(arg_conv); return ret_conv; } -uint64_t __attribute__((export_name("TS_C2Tuple_ThirtyTwoBytesPublicKeyZ_clone"))) TS_C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(uint64_t orig) { - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* orig_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(orig); - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKC2Tuple_ThirtyTwoBytesPublicKeyZ"); - *ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(orig_conv); +uint64_t __attribute__((export_name("TS_C2Tuple_ChannelIdPublicKeyZ_clone"))) TS_C2Tuple_ChannelIdPublicKeyZ_clone(uint64_t orig) { + LDKC2Tuple_ChannelIdPublicKeyZ* orig_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(orig); + LDKC2Tuple_ChannelIdPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKC2Tuple_ChannelIdPublicKeyZ"); + *ret_conv = C2Tuple_ChannelIdPublicKeyZ_clone(orig_conv); return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_C2Tuple_ThirtyTwoBytesPublicKeyZ_new"))) TS_C2Tuple_ThirtyTwoBytesPublicKeyZ_new(int8_tArray a, int8_tArray b) { - LDKThirtyTwoBytes a_ref; - CHECK(a->arr_len == 32); - memcpy(a_ref.data, a->elems, 32); FREE(a); +uint64_t __attribute__((export_name("TS_C2Tuple_ChannelIdPublicKeyZ_new"))) TS_C2Tuple_ChannelIdPublicKeyZ_new(uint64_t a, int8_tArray b) { + LDKChannelId a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = ChannelId_clone(&a_conv); LDKPublicKey b_ref; CHECK(b->arr_len == 33); memcpy(b_ref.compressed_form, b->elems, 33); FREE(b); - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKC2Tuple_ThirtyTwoBytesPublicKeyZ"); - *ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_new(a_ref, b_ref); + LDKC2Tuple_ChannelIdPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKC2Tuple_ChannelIdPublicKeyZ"); + *ret_conv = C2Tuple_ChannelIdPublicKeyZ_new(a_conv, b_ref); return tag_ptr(ret_conv, true); } -void __attribute__((export_name("TS_C2Tuple_ThirtyTwoBytesPublicKeyZ_free"))) TS_C2Tuple_ThirtyTwoBytesPublicKeyZ_free(uint64_t _res) { +void __attribute__((export_name("TS_C2Tuple_ChannelIdPublicKeyZ_free"))) TS_C2Tuple_ChannelIdPublicKeyZ_free(uint64_t _res) { if (!ptr_is_owned(_res)) return; void* _res_ptr = untag_ptr(_res); CHECK_ACCESS(_res_ptr); - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ _res_conv = *(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)(_res_ptr); + LDKC2Tuple_ChannelIdPublicKeyZ _res_conv = *(LDKC2Tuple_ChannelIdPublicKeyZ*)(_res_ptr); FREE(untag_ptr(_res)); - C2Tuple_ThirtyTwoBytesPublicKeyZ_free(_res_conv); + C2Tuple_ChannelIdPublicKeyZ_free(_res_conv); } -void __attribute__((export_name("TS_CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_free"))) TS_CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_free(uint64_tArray _res) { - LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ _res_constr; +void __attribute__((export_name("TS_CVec_C2Tuple_ChannelIdPublicKeyZZ_free"))) TS_CVec_C2Tuple_ChannelIdPublicKeyZZ_free(uint64_tArray _res) { + LDKCVec_C2Tuple_ChannelIdPublicKeyZZ _res_constr; _res_constr.datalen = _res->arr_len; if (_res_constr.datalen > 0) - _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ Elements"); + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKCVec_C2Tuple_ChannelIdPublicKeyZZ Elements"); else _res_constr.data = NULL; uint64_t* _res_vals = _res->elems; - for (size_t j = 0; j < _res_constr.datalen; j++) { - uint64_t _res_conv_35 = _res_vals[j]; - void* _res_conv_35_ptr = untag_ptr(_res_conv_35); - CHECK_ACCESS(_res_conv_35_ptr); - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ _res_conv_35_conv = *(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)(_res_conv_35_ptr); - FREE(untag_ptr(_res_conv_35)); - _res_constr.data[j] = _res_conv_35_conv; + for (size_t e = 0; e < _res_constr.datalen; e++) { + uint64_t _res_conv_30 = _res_vals[e]; + void* _res_conv_30_ptr = untag_ptr(_res_conv_30); + CHECK_ACCESS(_res_conv_30_ptr); + LDKC2Tuple_ChannelIdPublicKeyZ _res_conv_30_conv = *(LDKC2Tuple_ChannelIdPublicKeyZ*)(_res_conv_30_ptr); + FREE(untag_ptr(_res_conv_30)); + _res_constr.data[e] = _res_conv_30_conv; } FREE(_res); - CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_free(_res_constr); + CVec_C2Tuple_ChannelIdPublicKeyZZ_free(_res_constr); +} + +void __attribute__((export_name("TS_CVec_ChannelIdZ_free"))) TS_CVec_ChannelIdZ_free(uint64_tArray _res) { + LDKCVec_ChannelIdZ _res_constr; + _res_constr.datalen = _res->arr_len; + if (_res_constr.datalen > 0) + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKChannelId), "LDKCVec_ChannelIdZ Elements"); + else + _res_constr.data = NULL; + uint64_t* _res_vals = _res->elems; + for (size_t l = 0; l < _res_constr.datalen; l++) { + uint64_t _res_conv_11 = _res_vals[l]; + LDKChannelId _res_conv_11_conv; + _res_conv_11_conv.inner = untag_ptr(_res_conv_11); + _res_conv_11_conv.is_owned = ptr_is_owned(_res_conv_11); + CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_11_conv); + _res_constr.data[l] = _res_conv_11_conv; + } + FREE(_res); + CVec_ChannelIdZ_free(_res_constr); +} + +uint64_t __attribute__((export_name("TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok"))) TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(uint64_t o) { + LDKOfferWithDerivedMetadataBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = OfferWithDerivedMetadataBuilder_clone(&o_conv); + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err"))) TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(uint32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_js(e); + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok"))) TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(uint64_t o) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free"))) TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr"))) TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* arg_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone"))) TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(uint64_t orig) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* orig_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); } uint64_t __attribute__((export_name("TS_COption_StrZ_some"))) TS_COption_StrZ_some(jstring o) { @@ -22247,52 +24490,6 @@ uint64_t __attribute__((export_name("TS_COption_StrZ_clone"))) TS_COption_StrZ_ return ret_ref; } -uint64_t __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_ok"))) TS_CResult_NoneBolt12SemanticErrorZ_ok() { - LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); - *ret_conv = CResult_NoneBolt12SemanticErrorZ_ok(); - return tag_ptr(ret_conv, true); -} - -uint64_t __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_err"))) TS_CResult_NoneBolt12SemanticErrorZ_err(uint32_t e) { - LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_js(e); - LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); - *ret_conv = CResult_NoneBolt12SemanticErrorZ_err(e_conv); - return tag_ptr(ret_conv, true); -} - -jboolean __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_is_ok"))) TS_CResult_NoneBolt12SemanticErrorZ_is_ok(uint64_t o) { - LDKCResult_NoneBolt12SemanticErrorZ* o_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(o); - jboolean ret_conv = CResult_NoneBolt12SemanticErrorZ_is_ok(o_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_free"))) TS_CResult_NoneBolt12SemanticErrorZ_free(uint64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKCResult_NoneBolt12SemanticErrorZ _res_conv = *(LDKCResult_NoneBolt12SemanticErrorZ*)(_res_ptr); - FREE(untag_ptr(_res)); - CResult_NoneBolt12SemanticErrorZ_free(_res_conv); -} - -static inline uint64_t CResult_NoneBolt12SemanticErrorZ_clone_ptr(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR arg) { - LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); - *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(arg); - return tag_ptr(ret_conv, true); -} -int64_t __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_clone_ptr"))) TS_CResult_NoneBolt12SemanticErrorZ_clone_ptr(uint64_t arg) { - LDKCResult_NoneBolt12SemanticErrorZ* arg_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(arg); - int64_t ret_conv = CResult_NoneBolt12SemanticErrorZ_clone_ptr(arg_conv); - return ret_conv; -} - -uint64_t __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_clone"))) TS_CResult_NoneBolt12SemanticErrorZ_clone(uint64_t orig) { - LDKCResult_NoneBolt12SemanticErrorZ* orig_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(orig); - LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); - *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(orig_conv); - return tag_ptr(ret_conv, true); -} - uint64_t __attribute__((export_name("TS_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok"))) TS_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok(uint64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -22342,6 +24539,58 @@ uint64_t __attribute__((export_name("TS_CResult_C2Tuple_ThirtyTwoBytesThirtyTwo return tag_ptr(ret_conv, true); } +uint64_t __attribute__((export_name("TS_CResult_ThirtyTwoBytesAPIErrorZ_ok"))) TS_CResult_ThirtyTwoBytesAPIErrorZ_ok(int8_tArray o) { + LDKThirtyTwoBytes o_ref; + CHECK(o->arr_len == 32); + memcpy(o_ref.data, o->elems, 32); FREE(o); + LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); + *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_ok(o_ref); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_ThirtyTwoBytesAPIErrorZ_err"))) TS_CResult_ThirtyTwoBytesAPIErrorZ_err(uint64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKAPIError e_conv = *(LDKAPIError*)(e_ptr); + e_conv = APIError_clone((LDKAPIError*)untag_ptr(e)); + LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); + *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_ThirtyTwoBytesAPIErrorZ_is_ok"))) TS_CResult_ThirtyTwoBytesAPIErrorZ_is_ok(uint64_t o) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* o_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_ThirtyTwoBytesAPIErrorZ_free"))) TS_CResult_ThirtyTwoBytesAPIErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_ThirtyTwoBytesAPIErrorZ _res_conv = *(LDKCResult_ThirtyTwoBytesAPIErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_ThirtyTwoBytesAPIErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR arg) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); + *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr"))) TS_CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* arg_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_ThirtyTwoBytesAPIErrorZ_clone"))) TS_CResult_ThirtyTwoBytesAPIErrorZ_clone(uint64_t orig) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* orig_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(orig); + LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); + *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + uint64_t __attribute__((export_name("TS_COption_OffersMessageZ_some"))) TS_COption_OffersMessageZ_some(uint64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -23664,27 +25913,6 @@ void __attribute__((export_name("TS_CVec_CommitmentTransactionZ_free"))) TS_CVe CVec_CommitmentTransactionZ_free(_res_constr); } -void __attribute__((export_name("TS_CVec_TransactionZ_free"))) TS_CVec_TransactionZ_free(ptrArray _res) { - LDKCVec_TransactionZ _res_constr; - _res_constr.datalen = _res->arr_len; - if (_res_constr.datalen > 0) - _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKTransaction), "LDKCVec_TransactionZ Elements"); - else - _res_constr.data = NULL; - int8_tArray* _res_vals = (void*) _res->elems; - for (size_t m = 0; m < _res_constr.datalen; m++) { - int8_tArray _res_conv_12 = _res_vals[m]; - LDKTransaction _res_conv_12_ref; - _res_conv_12_ref.datalen = _res_conv_12->arr_len; - _res_conv_12_ref.data = MALLOC(_res_conv_12_ref.datalen, "LDKTransaction Bytes"); - memcpy(_res_conv_12_ref.data, _res_conv_12->elems, _res_conv_12_ref.datalen); FREE(_res_conv_12); - _res_conv_12_ref.data_is_owned = true; - _res_constr.data[m] = _res_conv_12_ref; - } - FREE(_res); - CVec_TransactionZ_free(_res_constr); -} - static inline uint64_t C2Tuple_u32TxOutZ_clone_ptr(LDKC2Tuple_u32TxOutZ *NONNULL_PTR arg) { LDKC2Tuple_u32TxOutZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ"); *ret_conv = C2Tuple_u32TxOutZ_clone(arg); @@ -24385,64 +26613,24 @@ uint64_t __attribute__((export_name("TS_COption_SocketAddressZ_clone"))) TS_COp return ret_ref; } -static inline uint64_t C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR arg) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ"); - *ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(arg); - return tag_ptr(ret_conv, true); -} -int64_t __attribute__((export_name("TS_C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr"))) TS_C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(uint64_t arg) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* arg_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(arg); - int64_t ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(arg_conv); - return ret_conv; -} - -uint64_t __attribute__((export_name("TS_C2Tuple_PublicKeyCOption_SocketAddressZZ_clone"))) TS_C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(uint64_t orig) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* orig_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(orig); - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ"); - *ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(orig_conv); - return tag_ptr(ret_conv, true); -} - -uint64_t __attribute__((export_name("TS_C2Tuple_PublicKeyCOption_SocketAddressZZ_new"))) TS_C2Tuple_PublicKeyCOption_SocketAddressZZ_new(int8_tArray a, uint64_t b) { - LDKPublicKey a_ref; - CHECK(a->arr_len == 33); - memcpy(a_ref.compressed_form, a->elems, 33); FREE(a); - void* b_ptr = untag_ptr(b); - CHECK_ACCESS(b_ptr); - LDKCOption_SocketAddressZ b_conv = *(LDKCOption_SocketAddressZ*)(b_ptr); - b_conv = COption_SocketAddressZ_clone((LDKCOption_SocketAddressZ*)untag_ptr(b)); - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ"); - *ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_new(a_ref, b_conv); - return tag_ptr(ret_conv, true); -} - -void __attribute__((export_name("TS_C2Tuple_PublicKeyCOption_SocketAddressZZ_free"))) TS_C2Tuple_PublicKeyCOption_SocketAddressZZ_free(uint64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ _res_conv = *(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)(_res_ptr); - FREE(untag_ptr(_res)); - C2Tuple_PublicKeyCOption_SocketAddressZZ_free(_res_conv); -} - -void __attribute__((export_name("TS_CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_free"))) TS_CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_free(uint64_tArray _res) { - LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ _res_constr; +void __attribute__((export_name("TS_CVec_PeerDetailsZ_free"))) TS_CVec_PeerDetailsZ_free(uint64_tArray _res) { + LDKCVec_PeerDetailsZ _res_constr; _res_constr.datalen = _res->arr_len; if (_res_constr.datalen > 0) - _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ Elements"); + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKPeerDetails), "LDKCVec_PeerDetailsZ Elements"); else _res_constr.data = NULL; uint64_t* _res_vals = _res->elems; - for (size_t r = 0; r < _res_constr.datalen; r++) { - uint64_t _res_conv_43 = _res_vals[r]; - void* _res_conv_43_ptr = untag_ptr(_res_conv_43); - CHECK_ACCESS(_res_conv_43_ptr); - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ _res_conv_43_conv = *(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)(_res_conv_43_ptr); - FREE(untag_ptr(_res_conv_43)); - _res_constr.data[r] = _res_conv_43_conv; + for (size_t n = 0; n < _res_constr.datalen; n++) { + uint64_t _res_conv_13 = _res_vals[n]; + LDKPeerDetails _res_conv_13_conv; + _res_conv_13_conv.inner = untag_ptr(_res_conv_13); + _res_conv_13_conv.is_owned = ptr_is_owned(_res_conv_13); + CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_13_conv); + _res_constr.data[n] = _res_conv_13_conv; } FREE(_res); - CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_free(_res_constr); + CVec_PeerDetailsZ_free(_res_constr); } uint64_t __attribute__((export_name("TS_CResult_CVec_u8ZPeerHandleErrorZ_ok"))) TS_CResult_CVec_u8ZPeerHandleErrorZ_ok(int8_tArray o) { @@ -24934,6 +27122,108 @@ uint64_t __attribute__((export_name("TS_CResult_C2Tuple_ThirtyTwoBytesChannelMo return tag_ptr(ret_conv, true); } +uint64_t __attribute__((export_name("TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok"))) TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(uint64_t o) { + LDKUnsignedInvoiceRequest o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = UnsignedInvoiceRequest_clone(&o_conv); + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err"))) TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(uint32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_js(e); + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok"))) TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(uint64_t o) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* o_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free"))) TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ _res_conv = *(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr"))) TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* arg_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone"))) TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(uint64_t orig) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* orig_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_InvoiceRequestBolt12SemanticErrorZ_ok"))) TS_CResult_InvoiceRequestBolt12SemanticErrorZ_ok(uint64_t o) { + LDKInvoiceRequest o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = InvoiceRequest_clone(&o_conv); + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_InvoiceRequestBolt12SemanticErrorZ_err"))) TS_CResult_InvoiceRequestBolt12SemanticErrorZ_err(uint32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_js(e); + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok"))) TS_CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(uint64_t o) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_InvoiceRequestBolt12SemanticErrorZ_free"))) TS_CResult_InvoiceRequestBolt12SemanticErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceRequestBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceRequestBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr"))) TS_CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* arg_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_InvoiceRequestBolt12SemanticErrorZ_clone"))) TS_CResult_InvoiceRequestBolt12SemanticErrorZ_clone(uint64_t orig) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* orig_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + uint64_t __attribute__((export_name("TS_COption_SecretKeyZ_some"))) TS_COption_SecretKeyZ_some(int8_tArray o) { LDKSecretKey o_ref; CHECK(o->arr_len == 32); @@ -24980,6 +27270,40 @@ uint64_t __attribute__((export_name("TS_COption_SecretKeyZ_clone"))) TS_COption return ret_ref; } +uint64_t __attribute__((export_name("TS_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok"))) TS_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok(uint64_t o) { + LDKInvoiceWithExplicitSigningPubkeyBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err"))) TS_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err(uint32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_js(e); + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok"))) TS_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(uint64_t o) { + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free"))) TS_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free(_res_conv); +} + uint64_t __attribute__((export_name("TS_CResult_VerifiedInvoiceRequestNoneZ_ok"))) TS_CResult_VerifiedInvoiceRequestNoneZ_ok(uint64_t o) { LDKVerifiedInvoiceRequest o_conv; o_conv.inner = untag_ptr(o); @@ -25030,6 +27354,94 @@ uint64_t __attribute__((export_name("TS_CResult_VerifiedInvoiceRequestNoneZ_clo return tag_ptr(ret_conv, true); } +uint64_t __attribute__((export_name("TS_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok"))) TS_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok(uint64_t o) { + LDKInvoiceWithDerivedSigningPubkeyBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err"))) TS_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err(uint32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_js(e); + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok"))) TS_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(uint64_t o) { + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free"))) TS_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(_res_conv); +} + +uint64_t __attribute__((export_name("TS_CResult_InvoiceRequestFieldsDecodeErrorZ_ok"))) TS_CResult_InvoiceRequestFieldsDecodeErrorZ_ok(uint64_t o) { + LDKInvoiceRequestFields o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = InvoiceRequestFields_clone(&o_conv); + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ"); + *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_InvoiceRequestFieldsDecodeErrorZ_err"))) TS_CResult_InvoiceRequestFieldsDecodeErrorZ_err(uint64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ"); + *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok"))) TS_CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(uint64_t o) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* o_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_InvoiceRequestFieldsDecodeErrorZ_free"))) TS_CResult_InvoiceRequestFieldsDecodeErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceRequestFieldsDecodeErrorZ _res_conv = *(LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceRequestFieldsDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ"); + *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr"))) TS_CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* arg_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_InvoiceRequestFieldsDecodeErrorZ_clone"))) TS_CResult_InvoiceRequestFieldsDecodeErrorZ_clone(uint64_t orig) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* orig_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(orig); + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ"); + *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + uint32_t __attribute__((export_name("TS_COption_NoneZ_some"))) TS_COption_NoneZ_some() { uint32_t ret_conv = LDKCOption_NoneZ_to_js(COption_NoneZ_some()); return ret_conv; @@ -25066,6 +27478,52 @@ void __attribute__((export_name("TS_CVec_WitnessZ_free"))) TS_CVec_WitnessZ_fre CVec_WitnessZ_free(_res_constr); } +uint64_t __attribute__((export_name("TS_COption_ECDSASignatureZ_some"))) TS_COption_ECDSASignatureZ_some(int8_tArray o) { + LDKECDSASignature o_ref; + CHECK(o->arr_len == 64); + memcpy(o_ref.compact_form, o->elems, 64); FREE(o); + LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ"); + *ret_copy = COption_ECDSASignatureZ_some(o_ref); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_COption_ECDSASignatureZ_none"))) TS_COption_ECDSASignatureZ_none() { + LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ"); + *ret_copy = COption_ECDSASignatureZ_none(); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void __attribute__((export_name("TS_COption_ECDSASignatureZ_free"))) TS_COption_ECDSASignatureZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCOption_ECDSASignatureZ _res_conv = *(LDKCOption_ECDSASignatureZ*)(_res_ptr); + FREE(untag_ptr(_res)); + COption_ECDSASignatureZ_free(_res_conv); +} + +static inline uint64_t COption_ECDSASignatureZ_clone_ptr(LDKCOption_ECDSASignatureZ *NONNULL_PTR arg) { + LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ"); + *ret_copy = COption_ECDSASignatureZ_clone(arg); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t __attribute__((export_name("TS_COption_ECDSASignatureZ_clone_ptr"))) TS_COption_ECDSASignatureZ_clone_ptr(uint64_t arg) { + LDKCOption_ECDSASignatureZ* arg_conv = (LDKCOption_ECDSASignatureZ*)untag_ptr(arg); + int64_t ret_conv = COption_ECDSASignatureZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_COption_ECDSASignatureZ_clone"))) TS_COption_ECDSASignatureZ_clone(uint64_t orig) { + LDKCOption_ECDSASignatureZ* orig_conv = (LDKCOption_ECDSASignatureZ*)untag_ptr(orig); + LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ"); + *ret_copy = COption_ECDSASignatureZ_clone(orig_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + uint64_t __attribute__((export_name("TS_COption_i64Z_some"))) TS_COption_i64Z_some(int64_t o) { LDKCOption_i64Z *ret_copy = MALLOC(sizeof(LDKCOption_i64Z), "LDKCOption_i64Z"); *ret_copy = COption_i64Z_some(o); @@ -28961,6 +31419,27 @@ uint64_t __attribute__((export_name("TS_CResult_ShutdownScriptInvalidShutdownSc return tag_ptr(ret_conv, true); } +void __attribute__((export_name("TS_CVec_TransactionZ_free"))) TS_CVec_TransactionZ_free(ptrArray _res) { + LDKCVec_TransactionZ _res_constr; + _res_constr.datalen = _res->arr_len; + if (_res_constr.datalen > 0) + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKTransaction), "LDKCVec_TransactionZ Elements"); + else + _res_constr.data = NULL; + int8_tArray* _res_vals = (void*) _res->elems; + for (size_t m = 0; m < _res_constr.datalen; m++) { + int8_tArray _res_conv_12 = _res_vals[m]; + LDKTransaction _res_conv_12_ref; + _res_conv_12_ref.datalen = _res_conv_12->arr_len; + _res_conv_12_ref.data = MALLOC(_res_conv_12_ref.datalen, "LDKTransaction Bytes"); + memcpy(_res_conv_12_ref.data, _res_conv_12->elems, _res_conv_12_ref.datalen); FREE(_res_conv_12); + _res_conv_12_ref.data_is_owned = true; + _res_constr.data[m] = _res_conv_12_ref; + } + FREE(_res); + CVec_TransactionZ_free(_res_constr); +} + uint64_t __attribute__((export_name("TS_CResult_PaymentPurposeDecodeErrorZ_ok"))) TS_CResult_PaymentPurposeDecodeErrorZ_ok(uint64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -30473,6 +32952,60 @@ uint64_t __attribute__((export_name("TS_CResult_UntrustedStringDecodeErrorZ_clo return tag_ptr(ret_conv, true); } +uint64_t __attribute__((export_name("TS_CResult_ChannelIdDecodeErrorZ_ok"))) TS_CResult_ChannelIdDecodeErrorZ_ok(uint64_t o) { + LDKChannelId o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = ChannelId_clone(&o_conv); + LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ"); + *ret_conv = CResult_ChannelIdDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_ChannelIdDecodeErrorZ_err"))) TS_CResult_ChannelIdDecodeErrorZ_err(uint64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ"); + *ret_conv = CResult_ChannelIdDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_ChannelIdDecodeErrorZ_is_ok"))) TS_CResult_ChannelIdDecodeErrorZ_is_ok(uint64_t o) { + LDKCResult_ChannelIdDecodeErrorZ* o_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_ChannelIdDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_ChannelIdDecodeErrorZ_free"))) TS_CResult_ChannelIdDecodeErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_ChannelIdDecodeErrorZ _res_conv = *(LDKCResult_ChannelIdDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_ChannelIdDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_ChannelIdDecodeErrorZ_clone_ptr(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ"); + *ret_conv = CResult_ChannelIdDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_ChannelIdDecodeErrorZ_clone_ptr"))) TS_CResult_ChannelIdDecodeErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_ChannelIdDecodeErrorZ* arg_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_ChannelIdDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_ChannelIdDecodeErrorZ_clone"))) TS_CResult_ChannelIdDecodeErrorZ_clone(uint64_t orig) { + LDKCResult_ChannelIdDecodeErrorZ* orig_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(orig); + LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ"); + *ret_conv = CResult_ChannelIdDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + static inline uint64_t C2Tuple__u832u16Z_clone_ptr(LDKC2Tuple__u832u16Z *NONNULL_PTR arg) { LDKC2Tuple__u832u16Z* ret_conv = MALLOC(sizeof(LDKC2Tuple__u832u16Z), "LDKC2Tuple__u832u16Z"); *ret_conv = C2Tuple__u832u16Z_clone(arg); @@ -30617,98 +33150,218 @@ uint64_t __attribute__((export_name("TS_CResult_PaymentConstraintsDecodeErrorZ_ return tag_ptr(ret_conv, true); } -static inline uint64_t C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR arg) { - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ"); - *ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(arg); +uint64_t __attribute__((export_name("TS_CResult_PaymentContextDecodeErrorZ_ok"))) TS_CResult_PaymentContextDecodeErrorZ_ok(uint64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKPaymentContext o_conv = *(LDKPaymentContext*)(o_ptr); + o_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(o)); + LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ"); + *ret_conv = CResult_PaymentContextDecodeErrorZ_ok(o_conv); return tag_ptr(ret_conv, true); } -int64_t __attribute__((export_name("TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr"))) TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(uint64_t arg) { - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* arg_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(arg); - int64_t ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(arg_conv); + +uint64_t __attribute__((export_name("TS_CResult_PaymentContextDecodeErrorZ_err"))) TS_CResult_PaymentContextDecodeErrorZ_err(uint64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ"); + *ret_conv = CResult_PaymentContextDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_PaymentContextDecodeErrorZ_is_ok"))) TS_CResult_PaymentContextDecodeErrorZ_is_ok(uint64_t o) { + LDKCResult_PaymentContextDecodeErrorZ* o_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_PaymentContextDecodeErrorZ_is_ok(o_conv); return ret_conv; } -uint64_t __attribute__((export_name("TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone"))) TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(uint64_t orig) { - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* orig_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(orig); - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ"); - *ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(orig_conv); +void __attribute__((export_name("TS_CResult_PaymentContextDecodeErrorZ_free"))) TS_CResult_PaymentContextDecodeErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_PaymentContextDecodeErrorZ _res_conv = *(LDKCResult_PaymentContextDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_PaymentContextDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_PaymentContextDecodeErrorZ_clone_ptr(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ"); + *ret_conv = CResult_PaymentContextDecodeErrorZ_clone(arg); return tag_ptr(ret_conv, true); } +int64_t __attribute__((export_name("TS_CResult_PaymentContextDecodeErrorZ_clone_ptr"))) TS_CResult_PaymentContextDecodeErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_PaymentContextDecodeErrorZ* arg_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_PaymentContextDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} -uint64_t __attribute__((export_name("TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new"))) TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new(int8_tArray a, uint64_t b, uint64_t c) { - LDKThirtyTwoBytes a_ref; - CHECK(a->arr_len == 32); - memcpy(a_ref.data, a->elems, 32); FREE(a); - LDKRecipientOnionFields b_conv; - b_conv.inner = untag_ptr(b); - b_conv.is_owned = ptr_is_owned(b); - CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); - b_conv = RecipientOnionFields_clone(&b_conv); - LDKRouteParameters c_conv; - c_conv.inner = untag_ptr(c); - c_conv.is_owned = ptr_is_owned(c); - CHECK_INNER_FIELD_ACCESS_OR_NULL(c_conv); - c_conv = RouteParameters_clone(&c_conv); - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ"); - *ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new(a_ref, b_conv, c_conv); +uint64_t __attribute__((export_name("TS_CResult_PaymentContextDecodeErrorZ_clone"))) TS_CResult_PaymentContextDecodeErrorZ_clone(uint64_t orig) { + LDKCResult_PaymentContextDecodeErrorZ* orig_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(orig); + LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ"); + *ret_conv = CResult_PaymentContextDecodeErrorZ_clone(orig_conv); return tag_ptr(ret_conv, true); } -void __attribute__((export_name("TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free"))) TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free(uint64_t _res) { +uint64_t __attribute__((export_name("TS_CResult_UnknownPaymentContextDecodeErrorZ_ok"))) TS_CResult_UnknownPaymentContextDecodeErrorZ_ok(uint64_t o) { + LDKUnknownPaymentContext o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = UnknownPaymentContext_clone(&o_conv); + LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ"); + *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_UnknownPaymentContextDecodeErrorZ_err"))) TS_CResult_UnknownPaymentContextDecodeErrorZ_err(uint64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ"); + *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_UnknownPaymentContextDecodeErrorZ_is_ok"))) TS_CResult_UnknownPaymentContextDecodeErrorZ_is_ok(uint64_t o) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* o_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_UnknownPaymentContextDecodeErrorZ_free"))) TS_CResult_UnknownPaymentContextDecodeErrorZ_free(uint64_t _res) { if (!ptr_is_owned(_res)) return; void* _res_ptr = untag_ptr(_res); CHECK_ACCESS(_res_ptr); - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ _res_conv = *(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)(_res_ptr); + LDKCResult_UnknownPaymentContextDecodeErrorZ _res_conv = *(LDKCResult_UnknownPaymentContextDecodeErrorZ*)(_res_ptr); FREE(untag_ptr(_res)); - C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free(_res_conv); + CResult_UnknownPaymentContextDecodeErrorZ_free(_res_conv); } -uint64_t __attribute__((export_name("TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok"))) TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok(uint64_t o) { - void* o_ptr = untag_ptr(o); - CHECK_ACCESS(o_ptr); - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ o_conv = *(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)(o_ptr); - o_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone((LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(o)); - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ"); - *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok(o_conv); +static inline uint64_t CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ"); + *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_clone(arg); return tag_ptr(ret_conv, true); } +int64_t __attribute__((export_name("TS_CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr"))) TS_CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* arg_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} -uint64_t __attribute__((export_name("TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err"))) TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err() { - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ"); - *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err(); +uint64_t __attribute__((export_name("TS_CResult_UnknownPaymentContextDecodeErrorZ_clone"))) TS_CResult_UnknownPaymentContextDecodeErrorZ_clone(uint64_t orig) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* orig_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(orig); + LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ"); + *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_clone(orig_conv); return tag_ptr(ret_conv, true); } -jboolean __attribute__((export_name("TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok"))) TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok(uint64_t o) { - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* o_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(o); - jboolean ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok(o_conv); +uint64_t __attribute__((export_name("TS_CResult_Bolt12OfferContextDecodeErrorZ_ok"))) TS_CResult_Bolt12OfferContextDecodeErrorZ_ok(uint64_t o) { + LDKBolt12OfferContext o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = Bolt12OfferContext_clone(&o_conv); + LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_Bolt12OfferContextDecodeErrorZ_err"))) TS_CResult_Bolt12OfferContextDecodeErrorZ_err(uint64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_Bolt12OfferContextDecodeErrorZ_is_ok"))) TS_CResult_Bolt12OfferContextDecodeErrorZ_is_ok(uint64_t o) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* o_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_is_ok(o_conv); return ret_conv; } -void __attribute__((export_name("TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free"))) TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free(uint64_t _res) { +void __attribute__((export_name("TS_CResult_Bolt12OfferContextDecodeErrorZ_free"))) TS_CResult_Bolt12OfferContextDecodeErrorZ_free(uint64_t _res) { if (!ptr_is_owned(_res)) return; void* _res_ptr = untag_ptr(_res); CHECK_ACCESS(_res_ptr); - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ _res_conv = *(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)(_res_ptr); + LDKCResult_Bolt12OfferContextDecodeErrorZ _res_conv = *(LDKCResult_Bolt12OfferContextDecodeErrorZ*)(_res_ptr); FREE(untag_ptr(_res)); - CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free(_res_conv); + CResult_Bolt12OfferContextDecodeErrorZ_free(_res_conv); } -static inline uint64_t CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR arg) { - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ"); - *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(arg); +static inline uint64_t CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_clone(arg); return tag_ptr(ret_conv, true); } -int64_t __attribute__((export_name("TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr"))) TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(uint64_t arg) { - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* arg_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(arg); - int64_t ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(arg_conv); +int64_t __attribute__((export_name("TS_CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr"))) TS_CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* arg_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(arg_conv); return ret_conv; } -uint64_t __attribute__((export_name("TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone"))) TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(uint64_t orig) { - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* orig_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(orig); - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ"); - *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(orig_conv); +uint64_t __attribute__((export_name("TS_CResult_Bolt12OfferContextDecodeErrorZ_clone"))) TS_CResult_Bolt12OfferContextDecodeErrorZ_clone(uint64_t orig) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* orig_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(orig); + LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_Bolt12RefundContextDecodeErrorZ_ok"))) TS_CResult_Bolt12RefundContextDecodeErrorZ_ok(uint64_t o) { + LDKBolt12RefundContext o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = Bolt12RefundContext_clone(&o_conv); + LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_Bolt12RefundContextDecodeErrorZ_err"))) TS_CResult_Bolt12RefundContextDecodeErrorZ_err(uint64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_Bolt12RefundContextDecodeErrorZ_is_ok"))) TS_CResult_Bolt12RefundContextDecodeErrorZ_is_ok(uint64_t o) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* o_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_Bolt12RefundContextDecodeErrorZ_free"))) TS_CResult_Bolt12RefundContextDecodeErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_Bolt12RefundContextDecodeErrorZ _res_conv = *(LDKCResult_Bolt12RefundContextDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_Bolt12RefundContextDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr"))) TS_CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* arg_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_Bolt12RefundContextDecodeErrorZ_clone"))) TS_CResult_Bolt12RefundContextDecodeErrorZ_clone(uint64_t orig) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* orig_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(orig); + LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_clone(orig_conv); return tag_ptr(ret_conv, true); } @@ -30759,6 +33412,101 @@ uint64_t __attribute__((export_name("TS_CResult_StrSecp256k1ErrorZ_clone"))) TS return tag_ptr(ret_conv, true); } +static inline uint64_t C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR arg) { + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ"); + *ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr"))) TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(uint64_t arg) { + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* arg_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(arg); + int64_t ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone"))) TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(uint64_t orig) { + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* orig_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(orig); + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ"); + *ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new"))) TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new(int8_tArray a, uint64_t b, uint64_t c) { + LDKThirtyTwoBytes a_ref; + CHECK(a->arr_len == 32); + memcpy(a_ref.data, a->elems, 32); FREE(a); + LDKRecipientOnionFields b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv = RecipientOnionFields_clone(&b_conv); + LDKRouteParameters c_conv; + c_conv.inner = untag_ptr(c); + c_conv.is_owned = ptr_is_owned(c); + CHECK_INNER_FIELD_ACCESS_OR_NULL(c_conv); + c_conv = RouteParameters_clone(&c_conv); + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ"); + *ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new(a_ref, b_conv, c_conv); + return tag_ptr(ret_conv, true); +} + +void __attribute__((export_name("TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free"))) TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ _res_conv = *(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)(_res_ptr); + FREE(untag_ptr(_res)); + C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free(_res_conv); +} + +uint64_t __attribute__((export_name("TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok"))) TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok(uint64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ o_conv = *(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)(o_ptr); + o_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone((LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(o)); + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ"); + *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err"))) TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err() { + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ"); + *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err(); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok"))) TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok(uint64_t o) { + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* o_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(o); + jboolean ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free"))) TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ _res_conv = *(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free(_res_conv); +} + +static inline uint64_t CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR arg) { + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ"); + *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr"))) TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(uint64_t arg) { + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* arg_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(arg); + int64_t ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone"))) TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(uint64_t orig) { + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* orig_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(orig); + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ"); + *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + uint64_t __attribute__((export_name("TS_CResult_TxOutUtxoLookupErrorZ_ok"))) TS_CResult_TxOutUtxoLookupErrorZ_ok(uint64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -30889,6 +33637,24 @@ void __attribute__((export_name("TS_CResult_C3Tuple_PublicKeyOnionMessageCOptio CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_free(_res_conv); } +static inline uint64_t CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ *NONNULL_PTR arg) { + LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ"); + *ret_conv = CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr"))) TS_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* arg_conv = (LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone"))) TS_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(uint64_t orig) { + LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* orig_conv = (LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ*)untag_ptr(orig); + LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ"); + *ret_conv = CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + uint64_t __attribute__((export_name("TS_CResult_PeeledOnionNoneZ_ok"))) TS_CResult_PeeledOnionNoneZ_ok(uint64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -30920,6 +33686,24 @@ void __attribute__((export_name("TS_CResult_PeeledOnionNoneZ_free"))) TS_CResul CResult_PeeledOnionNoneZ_free(_res_conv); } +static inline uint64_t CResult_PeeledOnionNoneZ_clone_ptr(LDKCResult_PeeledOnionNoneZ *NONNULL_PTR arg) { + LDKCResult_PeeledOnionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PeeledOnionNoneZ), "LDKCResult_PeeledOnionNoneZ"); + *ret_conv = CResult_PeeledOnionNoneZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_PeeledOnionNoneZ_clone_ptr"))) TS_CResult_PeeledOnionNoneZ_clone_ptr(uint64_t arg) { + LDKCResult_PeeledOnionNoneZ* arg_conv = (LDKCResult_PeeledOnionNoneZ*)untag_ptr(arg); + int64_t ret_conv = CResult_PeeledOnionNoneZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_PeeledOnionNoneZ_clone"))) TS_CResult_PeeledOnionNoneZ_clone(uint64_t orig) { + LDKCResult_PeeledOnionNoneZ* orig_conv = (LDKCResult_PeeledOnionNoneZ*)untag_ptr(orig); + LDKCResult_PeeledOnionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PeeledOnionNoneZ), "LDKCResult_PeeledOnionNoneZ"); + *ret_conv = CResult_PeeledOnionNoneZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + uint64_t __attribute__((export_name("TS_CResult_SendSuccessSendErrorZ_ok"))) TS_CResult_SendSuccessSendErrorZ_ok(uint64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -30955,6 +33739,24 @@ void __attribute__((export_name("TS_CResult_SendSuccessSendErrorZ_free"))) TS_C CResult_SendSuccessSendErrorZ_free(_res_conv); } +static inline uint64_t CResult_SendSuccessSendErrorZ_clone_ptr(LDKCResult_SendSuccessSendErrorZ *NONNULL_PTR arg) { + LDKCResult_SendSuccessSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SendSuccessSendErrorZ), "LDKCResult_SendSuccessSendErrorZ"); + *ret_conv = CResult_SendSuccessSendErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_SendSuccessSendErrorZ_clone_ptr"))) TS_CResult_SendSuccessSendErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_SendSuccessSendErrorZ* arg_conv = (LDKCResult_SendSuccessSendErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_SendSuccessSendErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_SendSuccessSendErrorZ_clone"))) TS_CResult_SendSuccessSendErrorZ_clone(uint64_t orig) { + LDKCResult_SendSuccessSendErrorZ* orig_conv = (LDKCResult_SendSuccessSendErrorZ*)untag_ptr(orig); + LDKCResult_SendSuccessSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SendSuccessSendErrorZ), "LDKCResult_SendSuccessSendErrorZ"); + *ret_conv = CResult_SendSuccessSendErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + uint64_t __attribute__((export_name("TS_CResult_BlindedPathNoneZ_ok"))) TS_CResult_BlindedPathNoneZ_ok(uint64_t o) { LDKBlindedPath o_conv; o_conv.inner = untag_ptr(o); @@ -31236,6 +34038,261 @@ uint64_t __attribute__((export_name("TS_CResult_InvoiceErrorDecodeErrorZ_clone" return tag_ptr(ret_conv, true); } +uint64_t __attribute__((export_name("TS_CResult_TrackedSpendableOutputDecodeErrorZ_ok"))) TS_CResult_TrackedSpendableOutputDecodeErrorZ_ok(uint64_t o) { + LDKTrackedSpendableOutput o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = TrackedSpendableOutput_clone(&o_conv); + LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ"); + *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_TrackedSpendableOutputDecodeErrorZ_err"))) TS_CResult_TrackedSpendableOutputDecodeErrorZ_err(uint64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ"); + *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_TrackedSpendableOutputDecodeErrorZ_is_ok"))) TS_CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(uint64_t o) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* o_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_TrackedSpendableOutputDecodeErrorZ_free"))) TS_CResult_TrackedSpendableOutputDecodeErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_TrackedSpendableOutputDecodeErrorZ _res_conv = *(LDKCResult_TrackedSpendableOutputDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_TrackedSpendableOutputDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ"); + *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr"))) TS_CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* arg_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_TrackedSpendableOutputDecodeErrorZ_clone"))) TS_CResult_TrackedSpendableOutputDecodeErrorZ_clone(uint64_t orig) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* orig_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(orig); + LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ"); + *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_OutputSpendStatusDecodeErrorZ_ok"))) TS_CResult_OutputSpendStatusDecodeErrorZ_ok(uint64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKOutputSpendStatus o_conv = *(LDKOutputSpendStatus*)(o_ptr); + o_conv = OutputSpendStatus_clone((LDKOutputSpendStatus*)untag_ptr(o)); + LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ"); + *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_OutputSpendStatusDecodeErrorZ_err"))) TS_CResult_OutputSpendStatusDecodeErrorZ_err(uint64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ"); + *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_OutputSpendStatusDecodeErrorZ_is_ok"))) TS_CResult_OutputSpendStatusDecodeErrorZ_is_ok(uint64_t o) { + LDKCResult_OutputSpendStatusDecodeErrorZ* o_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_OutputSpendStatusDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_OutputSpendStatusDecodeErrorZ_free"))) TS_CResult_OutputSpendStatusDecodeErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_OutputSpendStatusDecodeErrorZ _res_conv = *(LDKCResult_OutputSpendStatusDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_OutputSpendStatusDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ"); + *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_OutputSpendStatusDecodeErrorZ_clone_ptr"))) TS_CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_OutputSpendStatusDecodeErrorZ* arg_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_OutputSpendStatusDecodeErrorZ_clone"))) TS_CResult_OutputSpendStatusDecodeErrorZ_clone(uint64_t orig) { + LDKCResult_OutputSpendStatusDecodeErrorZ* orig_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(orig); + LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ"); + *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_COption_FilterZ_some"))) TS_COption_FilterZ_some(uint64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKFilter o_conv = *(LDKFilter*)(o_ptr); + if (o_conv.free == LDKFilter_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFilter_JCalls_cloned(&o_conv); + } + LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ"); + *ret_copy = COption_FilterZ_some(o_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_COption_FilterZ_none"))) TS_COption_FilterZ_none() { + LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ"); + *ret_copy = COption_FilterZ_none(); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void __attribute__((export_name("TS_COption_FilterZ_free"))) TS_COption_FilterZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCOption_FilterZ _res_conv = *(LDKCOption_FilterZ*)(_res_ptr); + FREE(untag_ptr(_res)); + COption_FilterZ_free(_res_conv); +} + +void __attribute__((export_name("TS_CVec_TrackedSpendableOutputZ_free"))) TS_CVec_TrackedSpendableOutputZ_free(uint64_tArray _res) { + LDKCVec_TrackedSpendableOutputZ _res_constr; + _res_constr.datalen = _res->arr_len; + if (_res_constr.datalen > 0) + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKTrackedSpendableOutput), "LDKCVec_TrackedSpendableOutputZ Elements"); + else + _res_constr.data = NULL; + uint64_t* _res_vals = _res->elems; + for (size_t y = 0; y < _res_constr.datalen; y++) { + uint64_t _res_conv_24 = _res_vals[y]; + LDKTrackedSpendableOutput _res_conv_24_conv; + _res_conv_24_conv.inner = untag_ptr(_res_conv_24); + _res_conv_24_conv.is_owned = ptr_is_owned(_res_conv_24); + CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_24_conv); + _res_constr.data[y] = _res_conv_24_conv; + } + FREE(_res); + CVec_TrackedSpendableOutputZ_free(_res_constr); +} + +uint64_t __attribute__((export_name("TS_CResult_OutputSweeperDecodeErrorZ_ok"))) TS_CResult_OutputSweeperDecodeErrorZ_ok(uint64_t o) { + LDKOutputSweeper o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + // WARNING: we need a move here but no clone is available for LDKOutputSweeper + + LDKCResult_OutputSweeperDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSweeperDecodeErrorZ), "LDKCResult_OutputSweeperDecodeErrorZ"); + *ret_conv = CResult_OutputSweeperDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_OutputSweeperDecodeErrorZ_err"))) TS_CResult_OutputSweeperDecodeErrorZ_err(uint64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_OutputSweeperDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSweeperDecodeErrorZ), "LDKCResult_OutputSweeperDecodeErrorZ"); + *ret_conv = CResult_OutputSweeperDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_OutputSweeperDecodeErrorZ_is_ok"))) TS_CResult_OutputSweeperDecodeErrorZ_is_ok(uint64_t o) { + LDKCResult_OutputSweeperDecodeErrorZ* o_conv = (LDKCResult_OutputSweeperDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_OutputSweeperDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_OutputSweeperDecodeErrorZ_free"))) TS_CResult_OutputSweeperDecodeErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_OutputSweeperDecodeErrorZ _res_conv = *(LDKCResult_OutputSweeperDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_OutputSweeperDecodeErrorZ_free(_res_conv); +} + +uint64_t __attribute__((export_name("TS_C2Tuple_BestBlockOutputSweeperZ_new"))) TS_C2Tuple_BestBlockOutputSweeperZ_new(uint64_t a, uint64_t b) { + LDKBestBlock a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = BestBlock_clone(&a_conv); + LDKOutputSweeper b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + // WARNING: we need a move here but no clone is available for LDKOutputSweeper + + LDKC2Tuple_BestBlockOutputSweeperZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BestBlockOutputSweeperZ), "LDKC2Tuple_BestBlockOutputSweeperZ"); + *ret_conv = C2Tuple_BestBlockOutputSweeperZ_new(a_conv, b_conv); + return tag_ptr(ret_conv, true); +} + +void __attribute__((export_name("TS_C2Tuple_BestBlockOutputSweeperZ_free"))) TS_C2Tuple_BestBlockOutputSweeperZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKC2Tuple_BestBlockOutputSweeperZ _res_conv = *(LDKC2Tuple_BestBlockOutputSweeperZ*)(_res_ptr); + FREE(untag_ptr(_res)); + C2Tuple_BestBlockOutputSweeperZ_free(_res_conv); +} + +uint64_t __attribute__((export_name("TS_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok"))) TS_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok(uint64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKC2Tuple_BestBlockOutputSweeperZ o_conv = *(LDKC2Tuple_BestBlockOutputSweeperZ*)(o_ptr); + // WARNING: we may need a move here but no clone is available for LDKC2Tuple_BestBlockOutputSweeperZ + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ), "LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ"); + *ret_conv = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err"))) TS_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err(uint64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ), "LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ"); + *ret_conv = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok"))) TS_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(uint64_t o) { + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* o_conv = (LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free"))) TS_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ _res_conv = *(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free(_res_conv); +} + uint64_t __attribute__((export_name("TS_CResult_DelayedPaymentBasepointDecodeErrorZ_ok"))) TS_CResult_DelayedPaymentBasepointDecodeErrorZ_ok(uint64_t o) { LDKDelayedPaymentBasepoint o_conv; o_conv.inner = untag_ptr(o); @@ -31560,36 +34617,6 @@ uint64_t __attribute__((export_name("TS_CResult_RevocationKeyDecodeErrorZ_clone return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_COption_FilterZ_some"))) TS_COption_FilterZ_some(uint64_t o) { - void* o_ptr = untag_ptr(o); - CHECK_ACCESS(o_ptr); - LDKFilter o_conv = *(LDKFilter*)(o_ptr); - if (o_conv.free == LDKFilter_JCalls_free) { - // If this_arg is a JCalls struct, then we need to increment the refcnt in it. - LDKFilter_JCalls_cloned(&o_conv); - } - LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ"); - *ret_copy = COption_FilterZ_some(o_conv); - uint64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -uint64_t __attribute__((export_name("TS_COption_FilterZ_none"))) TS_COption_FilterZ_none() { - LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ"); - *ret_copy = COption_FilterZ_none(); - uint64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -void __attribute__((export_name("TS_COption_FilterZ_free"))) TS_COption_FilterZ_free(uint64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKCOption_FilterZ _res_conv = *(LDKCOption_FilterZ*)(_res_ptr); - FREE(untag_ptr(_res)); - COption_FilterZ_free(_res_conv); -} - uint64_t __attribute__((export_name("TS_CResult_LockedChannelMonitorNoneZ_ok"))) TS_CResult_LockedChannelMonitorNoneZ_ok(uint64_t o) { LDKLockedChannelMonitor o_conv; o_conv.inner = untag_ptr(o); @@ -31623,24 +34650,67 @@ void __attribute__((export_name("TS_CResult_LockedChannelMonitorNoneZ_free"))) CResult_LockedChannelMonitorNoneZ_free(_res_conv); } -void __attribute__((export_name("TS_CVec_OutPointZ_free"))) TS_CVec_OutPointZ_free(uint64_tArray _res) { - LDKCVec_OutPointZ _res_constr; +static inline uint64_t C2Tuple_OutPointChannelIdZ_clone_ptr(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR arg) { + LDKC2Tuple_OutPointChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ"); + *ret_conv = C2Tuple_OutPointChannelIdZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_C2Tuple_OutPointChannelIdZ_clone_ptr"))) TS_C2Tuple_OutPointChannelIdZ_clone_ptr(uint64_t arg) { + LDKC2Tuple_OutPointChannelIdZ* arg_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(arg); + int64_t ret_conv = C2Tuple_OutPointChannelIdZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_C2Tuple_OutPointChannelIdZ_clone"))) TS_C2Tuple_OutPointChannelIdZ_clone(uint64_t orig) { + LDKC2Tuple_OutPointChannelIdZ* orig_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(orig); + LDKC2Tuple_OutPointChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ"); + *ret_conv = C2Tuple_OutPointChannelIdZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_C2Tuple_OutPointChannelIdZ_new"))) TS_C2Tuple_OutPointChannelIdZ_new(uint64_t a, uint64_t b) { + LDKOutPoint a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = OutPoint_clone(&a_conv); + LDKChannelId b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv = ChannelId_clone(&b_conv); + LDKC2Tuple_OutPointChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ"); + *ret_conv = C2Tuple_OutPointChannelIdZ_new(a_conv, b_conv); + return tag_ptr(ret_conv, true); +} + +void __attribute__((export_name("TS_C2Tuple_OutPointChannelIdZ_free"))) TS_C2Tuple_OutPointChannelIdZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKC2Tuple_OutPointChannelIdZ _res_conv = *(LDKC2Tuple_OutPointChannelIdZ*)(_res_ptr); + FREE(untag_ptr(_res)); + C2Tuple_OutPointChannelIdZ_free(_res_conv); +} + +void __attribute__((export_name("TS_CVec_C2Tuple_OutPointChannelIdZZ_free"))) TS_CVec_C2Tuple_OutPointChannelIdZZ_free(uint64_tArray _res) { + LDKCVec_C2Tuple_OutPointChannelIdZZ _res_constr; _res_constr.datalen = _res->arr_len; if (_res_constr.datalen > 0) - _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKOutPoint), "LDKCVec_OutPointZ Elements"); + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKCVec_C2Tuple_OutPointChannelIdZZ Elements"); else _res_constr.data = NULL; uint64_t* _res_vals = _res->elems; - for (size_t k = 0; k < _res_constr.datalen; k++) { - uint64_t _res_conv_10 = _res_vals[k]; - LDKOutPoint _res_conv_10_conv; - _res_conv_10_conv.inner = untag_ptr(_res_conv_10); - _res_conv_10_conv.is_owned = ptr_is_owned(_res_conv_10); - CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_10_conv); - _res_constr.data[k] = _res_conv_10_conv; + for (size_t d = 0; d < _res_constr.datalen; d++) { + uint64_t _res_conv_29 = _res_vals[d]; + void* _res_conv_29_ptr = untag_ptr(_res_conv_29); + CHECK_ACCESS(_res_conv_29_ptr); + LDKC2Tuple_OutPointChannelIdZ _res_conv_29_conv = *(LDKC2Tuple_OutPointChannelIdZ*)(_res_conv_29_ptr); + FREE(untag_ptr(_res_conv_29)); + _res_constr.data[d] = _res_conv_29_conv; } FREE(_res); - CVec_OutPointZ_free(_res_constr); + CVec_C2Tuple_OutPointChannelIdZZ_free(_res_constr); } void __attribute__((export_name("TS_CVec_MonitorUpdateIdZ_free"))) TS_CVec_MonitorUpdateIdZ_free(uint64_tArray _res) { @@ -32140,6 +35210,19 @@ int8_tArray __attribute__((export_name("TS_TransactionU16LenLimited_into_transa return ret_arr; } +int8_tArray __attribute__((export_name("TS_TransactionU16LenLimited_as_transaction"))) TS_TransactionU16LenLimited_as_transaction(uint64_t this_arg) { + LDKTransactionU16LenLimited this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKTransaction ret_var = TransactionU16LenLimited_as_transaction(&this_arg_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + Transaction_free(ret_var); + return ret_arr; +} + int8_tArray __attribute__((export_name("TS_TransactionU16LenLimited_write"))) TS_TransactionU16LenLimited_write(uint64_t obj) { LDKTransactionU16LenLimited obj_conv; obj_conv.inner = untag_ptr(obj); @@ -32372,6 +35455,55 @@ uint64_t __attribute__((export_name("TS_MonitorUpdatingPersister_as_Persist"))) return tag_ptr(ret_ret, true); } +uint32_t __attribute__((export_name("TS_ShortChannelIdError_clone"))) TS_ShortChannelIdError_clone(uint64_t orig) { + LDKShortChannelIdError* orig_conv = (LDKShortChannelIdError*)untag_ptr(orig); + uint32_t ret_conv = LDKShortChannelIdError_to_js(ShortChannelIdError_clone(orig_conv)); + return ret_conv; +} + +uint32_t __attribute__((export_name("TS_ShortChannelIdError_block_overflow"))) TS_ShortChannelIdError_block_overflow() { + uint32_t ret_conv = LDKShortChannelIdError_to_js(ShortChannelIdError_block_overflow()); + return ret_conv; +} + +uint32_t __attribute__((export_name("TS_ShortChannelIdError_tx_index_overflow"))) TS_ShortChannelIdError_tx_index_overflow() { + uint32_t ret_conv = LDKShortChannelIdError_to_js(ShortChannelIdError_tx_index_overflow()); + return ret_conv; +} + +uint32_t __attribute__((export_name("TS_ShortChannelIdError_vout_index_overflow"))) TS_ShortChannelIdError_vout_index_overflow() { + uint32_t ret_conv = LDKShortChannelIdError_to_js(ShortChannelIdError_vout_index_overflow()); + return ret_conv; +} + +jboolean __attribute__((export_name("TS_ShortChannelIdError_eq"))) TS_ShortChannelIdError_eq(uint64_t a, uint64_t b) { + LDKShortChannelIdError* a_conv = (LDKShortChannelIdError*)untag_ptr(a); + LDKShortChannelIdError* b_conv = (LDKShortChannelIdError*)untag_ptr(b); + jboolean ret_conv = ShortChannelIdError_eq(a_conv, b_conv); + return ret_conv; +} + +int32_t __attribute__((export_name("TS_block_from_scid"))) TS_block_from_scid(int64_t short_channel_id) { + int32_t ret_conv = block_from_scid(short_channel_id); + return ret_conv; +} + +int32_t __attribute__((export_name("TS_tx_index_from_scid"))) TS_tx_index_from_scid(int64_t short_channel_id) { + int32_t ret_conv = tx_index_from_scid(short_channel_id); + return ret_conv; +} + +int16_t __attribute__((export_name("TS_vout_from_scid"))) TS_vout_from_scid(int64_t short_channel_id) { + int16_t ret_conv = vout_from_scid(short_channel_id); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_scid_from_parts"))) TS_scid_from_parts(int64_t block, int64_t tx_index, int64_t vout_index) { + LDKCResult_u64ShortChannelIdErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u64ShortChannelIdErrorZ), "LDKCResult_u64ShortChannelIdErrorZ"); + *ret_conv = scid_from_parts(block, tx_index, vout_index); + return tag_ptr(ret_conv, true); +} + void __attribute__((export_name("TS_UntrustedString_free"))) TS_UntrustedString_free(uint64_t this_obj) { LDKUntrustedString this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -32528,53 +35660,647 @@ uint64_t __attribute__((export_name("TS_PrintableString_new"))) TS_PrintableStr return ret_ref; } -void __attribute__((export_name("TS_FutureCallback_free"))) TS_FutureCallback_free(uint64_t this_ptr) { - if (!ptr_is_owned(this_ptr)) return; - void* this_ptr_ptr = untag_ptr(this_ptr); - CHECK_ACCESS(this_ptr_ptr); - LDKFutureCallback this_ptr_conv = *(LDKFutureCallback*)(this_ptr_ptr); - FREE(untag_ptr(this_ptr)); - FutureCallback_free(this_ptr_conv); -} - -void __attribute__((export_name("TS_Future_free"))) TS_Future_free(uint64_t this_obj) { - LDKFuture this_obj_conv; +void __attribute__((export_name("TS_TrackedSpendableOutput_free"))) TS_TrackedSpendableOutput_free(uint64_t this_obj) { + LDKTrackedSpendableOutput this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); this_obj_conv.is_owned = ptr_is_owned(this_obj); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - Future_free(this_obj_conv); + TrackedSpendableOutput_free(this_obj_conv); } -static inline uint64_t Future_clone_ptr(LDKFuture *NONNULL_PTR arg) { - LDKFuture ret_var = Future_clone(arg); +uint64_t __attribute__((export_name("TS_TrackedSpendableOutput_get_descriptor"))) TS_TrackedSpendableOutput_get_descriptor(uint64_t this_ptr) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKSpendableOutputDescriptor *ret_copy = MALLOC(sizeof(LDKSpendableOutputDescriptor), "LDKSpendableOutputDescriptor"); + *ret_copy = TrackedSpendableOutput_get_descriptor(&this_ptr_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void __attribute__((export_name("TS_TrackedSpendableOutput_set_descriptor"))) TS_TrackedSpendableOutput_set_descriptor(uint64_t this_ptr, uint64_t val) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKSpendableOutputDescriptor val_conv = *(LDKSpendableOutputDescriptor*)(val_ptr); + val_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(val)); + TrackedSpendableOutput_set_descriptor(&this_ptr_conv, val_conv); +} + +uint64_t __attribute__((export_name("TS_TrackedSpendableOutput_get_channel_id"))) TS_TrackedSpendableOutput_get_channel_id(uint64_t this_ptr) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelId ret_var = TrackedSpendableOutput_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void __attribute__((export_name("TS_TrackedSpendableOutput_set_channel_id"))) TS_TrackedSpendableOutput_set_channel_id(uint64_t this_ptr, uint64_t val) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TrackedSpendableOutput_set_channel_id(&this_ptr_conv, val_conv); +} + +uint64_t __attribute__((export_name("TS_TrackedSpendableOutput_get_status"))) TS_TrackedSpendableOutput_get_status(uint64_t this_ptr) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = TrackedSpendableOutput_get_status(&this_ptr_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void __attribute__((export_name("TS_TrackedSpendableOutput_set_status"))) TS_TrackedSpendableOutput_set_status(uint64_t this_ptr, uint64_t val) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKOutputSpendStatus val_conv = *(LDKOutputSpendStatus*)(val_ptr); + val_conv = OutputSpendStatus_clone((LDKOutputSpendStatus*)untag_ptr(val)); + TrackedSpendableOutput_set_status(&this_ptr_conv, val_conv); +} + +uint64_t __attribute__((export_name("TS_TrackedSpendableOutput_new"))) TS_TrackedSpendableOutput_new(uint64_t descriptor_arg, uint64_t channel_id_arg, uint64_t status_arg) { + void* descriptor_arg_ptr = untag_ptr(descriptor_arg); + CHECK_ACCESS(descriptor_arg_ptr); + LDKSpendableOutputDescriptor descriptor_arg_conv = *(LDKSpendableOutputDescriptor*)(descriptor_arg_ptr); + descriptor_arg_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptor_arg)); + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + void* status_arg_ptr = untag_ptr(status_arg); + CHECK_ACCESS(status_arg_ptr); + LDKOutputSpendStatus status_arg_conv = *(LDKOutputSpendStatus*)(status_arg_ptr); + status_arg_conv = OutputSpendStatus_clone((LDKOutputSpendStatus*)untag_ptr(status_arg)); + LDKTrackedSpendableOutput ret_var = TrackedSpendableOutput_new(descriptor_arg_conv, channel_id_arg_conv, status_arg_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t TrackedSpendableOutput_clone_ptr(LDKTrackedSpendableOutput *NONNULL_PTR arg) { + LDKTrackedSpendableOutput ret_var = TrackedSpendableOutput_clone(arg); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -int64_t __attribute__((export_name("TS_Future_clone_ptr"))) TS_Future_clone_ptr(uint64_t arg) { - LDKFuture arg_conv; +int64_t __attribute__((export_name("TS_TrackedSpendableOutput_clone_ptr"))) TS_TrackedSpendableOutput_clone_ptr(uint64_t arg) { + LDKTrackedSpendableOutput arg_conv; arg_conv.inner = untag_ptr(arg); arg_conv.is_owned = ptr_is_owned(arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); arg_conv.is_owned = false; - int64_t ret_conv = Future_clone_ptr(&arg_conv); + int64_t ret_conv = TrackedSpendableOutput_clone_ptr(&arg_conv); return ret_conv; } -uint64_t __attribute__((export_name("TS_Future_clone"))) TS_Future_clone(uint64_t orig) { - LDKFuture orig_conv; +uint64_t __attribute__((export_name("TS_TrackedSpendableOutput_clone"))) TS_TrackedSpendableOutput_clone(uint64_t orig) { + LDKTrackedSpendableOutput orig_conv; orig_conv.inner = untag_ptr(orig); orig_conv.is_owned = ptr_is_owned(orig); CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); orig_conv.is_owned = false; - LDKFuture ret_var = Future_clone(&orig_conv); + LDKTrackedSpendableOutput ret_var = TrackedSpendableOutput_clone(&orig_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } +jboolean __attribute__((export_name("TS_TrackedSpendableOutput_eq"))) TS_TrackedSpendableOutput_eq(uint64_t a, uint64_t b) { + LDKTrackedSpendableOutput a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKTrackedSpendableOutput b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = TrackedSpendableOutput_eq(&a_conv, &b_conv); + return ret_conv; +} + +jboolean __attribute__((export_name("TS_TrackedSpendableOutput_is_spent_in"))) TS_TrackedSpendableOutput_is_spent_in(uint64_t this_arg, int8_tArray tx) { + LDKTrackedSpendableOutput this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKTransaction tx_ref; + tx_ref.datalen = tx->arr_len; + tx_ref.data = MALLOC(tx_ref.datalen, "LDKTransaction Bytes"); + memcpy(tx_ref.data, tx->elems, tx_ref.datalen); FREE(tx); + tx_ref.data_is_owned = true; + jboolean ret_conv = TrackedSpendableOutput_is_spent_in(&this_arg_conv, tx_ref); + return ret_conv; +} + +int8_tArray __attribute__((export_name("TS_TrackedSpendableOutput_write"))) TS_TrackedSpendableOutput_write(uint64_t obj) { + LDKTrackedSpendableOutput obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = TrackedSpendableOutput_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +uint64_t __attribute__((export_name("TS_TrackedSpendableOutput_read"))) TS_TrackedSpendableOutput_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ"); + *ret_conv = TrackedSpendableOutput_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + +void __attribute__((export_name("TS_OutputSpendStatus_free"))) TS_OutputSpendStatus_free(uint64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKOutputSpendStatus this_ptr_conv = *(LDKOutputSpendStatus*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + OutputSpendStatus_free(this_ptr_conv); +} + +static inline uint64_t OutputSpendStatus_clone_ptr(LDKOutputSpendStatus *NONNULL_PTR arg) { + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = OutputSpendStatus_clone(arg); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t __attribute__((export_name("TS_OutputSpendStatus_clone_ptr"))) TS_OutputSpendStatus_clone_ptr(uint64_t arg) { + LDKOutputSpendStatus* arg_conv = (LDKOutputSpendStatus*)untag_ptr(arg); + int64_t ret_conv = OutputSpendStatus_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_OutputSpendStatus_clone"))) TS_OutputSpendStatus_clone(uint64_t orig) { + LDKOutputSpendStatus* orig_conv = (LDKOutputSpendStatus*)untag_ptr(orig); + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = OutputSpendStatus_clone(orig_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_OutputSpendStatus_pending_initial_broadcast"))) TS_OutputSpendStatus_pending_initial_broadcast(uint64_t delayed_until_height) { + void* delayed_until_height_ptr = untag_ptr(delayed_until_height); + CHECK_ACCESS(delayed_until_height_ptr); + LDKCOption_u32Z delayed_until_height_conv = *(LDKCOption_u32Z*)(delayed_until_height_ptr); + delayed_until_height_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(delayed_until_height)); + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = OutputSpendStatus_pending_initial_broadcast(delayed_until_height_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_OutputSpendStatus_pending_first_confirmation"))) TS_OutputSpendStatus_pending_first_confirmation(int8_tArray first_broadcast_hash, int32_t latest_broadcast_height, int8_tArray latest_spending_tx) { + LDKThirtyTwoBytes first_broadcast_hash_ref; + CHECK(first_broadcast_hash->arr_len == 32); + memcpy(first_broadcast_hash_ref.data, first_broadcast_hash->elems, 32); FREE(first_broadcast_hash); + LDKTransaction latest_spending_tx_ref; + latest_spending_tx_ref.datalen = latest_spending_tx->arr_len; + latest_spending_tx_ref.data = MALLOC(latest_spending_tx_ref.datalen, "LDKTransaction Bytes"); + memcpy(latest_spending_tx_ref.data, latest_spending_tx->elems, latest_spending_tx_ref.datalen); FREE(latest_spending_tx); + latest_spending_tx_ref.data_is_owned = true; + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = OutputSpendStatus_pending_first_confirmation(first_broadcast_hash_ref, latest_broadcast_height, latest_spending_tx_ref); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_OutputSpendStatus_pending_threshold_confirmations"))) TS_OutputSpendStatus_pending_threshold_confirmations(int8_tArray first_broadcast_hash, int32_t latest_broadcast_height, int8_tArray latest_spending_tx, int32_t confirmation_height, int8_tArray confirmation_hash) { + LDKThirtyTwoBytes first_broadcast_hash_ref; + CHECK(first_broadcast_hash->arr_len == 32); + memcpy(first_broadcast_hash_ref.data, first_broadcast_hash->elems, 32); FREE(first_broadcast_hash); + LDKTransaction latest_spending_tx_ref; + latest_spending_tx_ref.datalen = latest_spending_tx->arr_len; + latest_spending_tx_ref.data = MALLOC(latest_spending_tx_ref.datalen, "LDKTransaction Bytes"); + memcpy(latest_spending_tx_ref.data, latest_spending_tx->elems, latest_spending_tx_ref.datalen); FREE(latest_spending_tx); + latest_spending_tx_ref.data_is_owned = true; + LDKThirtyTwoBytes confirmation_hash_ref; + CHECK(confirmation_hash->arr_len == 32); + memcpy(confirmation_hash_ref.data, confirmation_hash->elems, 32); FREE(confirmation_hash); + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = OutputSpendStatus_pending_threshold_confirmations(first_broadcast_hash_ref, latest_broadcast_height, latest_spending_tx_ref, confirmation_height, confirmation_hash_ref); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +jboolean __attribute__((export_name("TS_OutputSpendStatus_eq"))) TS_OutputSpendStatus_eq(uint64_t a, uint64_t b) { + LDKOutputSpendStatus* a_conv = (LDKOutputSpendStatus*)untag_ptr(a); + LDKOutputSpendStatus* b_conv = (LDKOutputSpendStatus*)untag_ptr(b); + jboolean ret_conv = OutputSpendStatus_eq(a_conv, b_conv); + return ret_conv; +} + +int8_tArray __attribute__((export_name("TS_OutputSpendStatus_write"))) TS_OutputSpendStatus_write(uint64_t obj) { + LDKOutputSpendStatus* obj_conv = (LDKOutputSpendStatus*)untag_ptr(obj); + LDKCVec_u8Z ret_var = OutputSpendStatus_write(obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +uint64_t __attribute__((export_name("TS_OutputSpendStatus_read"))) TS_OutputSpendStatus_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ"); + *ret_conv = OutputSpendStatus_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + +void __attribute__((export_name("TS_OutputSweeper_free"))) TS_OutputSweeper_free(uint64_t this_obj) { + LDKOutputSweeper this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + OutputSweeper_free(this_obj_conv); +} + +uint64_t __attribute__((export_name("TS_OutputSweeper_new"))) TS_OutputSweeper_new(uint64_t best_block, uint64_t broadcaster, uint64_t fee_estimator, uint64_t chain_data_source, uint64_t output_spender, uint64_t change_destination_source, uint64_t kv_store, uint64_t logger) { + LDKBestBlock best_block_conv; + best_block_conv.inner = untag_ptr(best_block); + best_block_conv.is_owned = ptr_is_owned(best_block); + CHECK_INNER_FIELD_ACCESS_OR_NULL(best_block_conv); + best_block_conv = BestBlock_clone(&best_block_conv); + void* broadcaster_ptr = untag_ptr(broadcaster); + CHECK_ACCESS(broadcaster_ptr); + LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(broadcaster_ptr); + if (broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKBroadcasterInterface_JCalls_cloned(&broadcaster_conv); + } + void* fee_estimator_ptr = untag_ptr(fee_estimator); + CHECK_ACCESS(fee_estimator_ptr); + LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(fee_estimator_ptr); + if (fee_estimator_conv.free == LDKFeeEstimator_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFeeEstimator_JCalls_cloned(&fee_estimator_conv); + } + void* chain_data_source_ptr = untag_ptr(chain_data_source); + CHECK_ACCESS(chain_data_source_ptr); + LDKCOption_FilterZ chain_data_source_conv = *(LDKCOption_FilterZ*)(chain_data_source_ptr); + // WARNING: we may need a move here but no clone is available for LDKCOption_FilterZ + if (chain_data_source_conv.tag == LDKCOption_FilterZ_Some) { + // Manually implement clone for Java trait instances + if (chain_data_source_conv.some.free == LDKFilter_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFilter_JCalls_cloned(&chain_data_source_conv.some); + } + } + void* output_spender_ptr = untag_ptr(output_spender); + CHECK_ACCESS(output_spender_ptr); + LDKOutputSpender output_spender_conv = *(LDKOutputSpender*)(output_spender_ptr); + if (output_spender_conv.free == LDKOutputSpender_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKOutputSpender_JCalls_cloned(&output_spender_conv); + } + void* change_destination_source_ptr = untag_ptr(change_destination_source); + CHECK_ACCESS(change_destination_source_ptr); + LDKChangeDestinationSource change_destination_source_conv = *(LDKChangeDestinationSource*)(change_destination_source_ptr); + if (change_destination_source_conv.free == LDKChangeDestinationSource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKChangeDestinationSource_JCalls_cloned(&change_destination_source_conv); + } + void* kv_store_ptr = untag_ptr(kv_store); + CHECK_ACCESS(kv_store_ptr); + LDKKVStore kv_store_conv = *(LDKKVStore*)(kv_store_ptr); + if (kv_store_conv.free == LDKKVStore_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKKVStore_JCalls_cloned(&kv_store_conv); + } + void* logger_ptr = untag_ptr(logger); + CHECK_ACCESS(logger_ptr); + LDKLogger logger_conv = *(LDKLogger*)(logger_ptr); + if (logger_conv.free == LDKLogger_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKLogger_JCalls_cloned(&logger_conv); + } + LDKOutputSweeper ret_var = OutputSweeper_new(best_block_conv, broadcaster_conv, fee_estimator_conv, chain_data_source_conv, output_spender_conv, change_destination_source_conv, kv_store_conv, logger_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_OutputSweeper_track_spendable_outputs"))) TS_OutputSweeper_track_spendable_outputs(uint64_t this_arg, uint64_tArray output_descriptors, uint64_t channel_id, jboolean exclude_static_outputs, uint64_t delay_until_height) { + LDKOutputSweeper this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_SpendableOutputDescriptorZ output_descriptors_constr; + output_descriptors_constr.datalen = output_descriptors->arr_len; + if (output_descriptors_constr.datalen > 0) + output_descriptors_constr.data = MALLOC(output_descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements"); + else + output_descriptors_constr.data = NULL; + uint64_t* output_descriptors_vals = output_descriptors->elems; + for (size_t b = 0; b < output_descriptors_constr.datalen; b++) { + uint64_t output_descriptors_conv_27 = output_descriptors_vals[b]; + void* output_descriptors_conv_27_ptr = untag_ptr(output_descriptors_conv_27); + CHECK_ACCESS(output_descriptors_conv_27_ptr); + LDKSpendableOutputDescriptor output_descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(output_descriptors_conv_27_ptr); + output_descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(output_descriptors_conv_27)); + output_descriptors_constr.data[b] = output_descriptors_conv_27_conv; + } + FREE(output_descriptors); + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); + void* delay_until_height_ptr = untag_ptr(delay_until_height); + CHECK_ACCESS(delay_until_height_ptr); + LDKCOption_u32Z delay_until_height_conv = *(LDKCOption_u32Z*)(delay_until_height_ptr); + delay_until_height_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(delay_until_height)); + LDKCResult_NoneNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneNoneZ), "LDKCResult_NoneNoneZ"); + *ret_conv = OutputSweeper_track_spendable_outputs(&this_arg_conv, output_descriptors_constr, channel_id_conv, exclude_static_outputs, delay_until_height_conv); + return tag_ptr(ret_conv, true); +} + +uint64_tArray __attribute__((export_name("TS_OutputSweeper_tracked_spendable_outputs"))) TS_OutputSweeper_tracked_spendable_outputs(uint64_t this_arg) { + LDKOutputSweeper this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_TrackedSpendableOutputZ ret_var = OutputSweeper_tracked_spendable_outputs(&this_arg_conv); + uint64_tArray ret_arr = NULL; + ret_arr = init_uint64_tArray(ret_var.datalen, __LINE__); + uint64_t *ret_arr_ptr = (uint64_t*)(((uint8_t*)ret_arr) + 8); + for (size_t y = 0; y < ret_var.datalen; y++) { + LDKTrackedSpendableOutput ret_conv_24_var = ret_var.data[y]; + uint64_t ret_conv_24_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_24_var); + ret_conv_24_ref = tag_ptr(ret_conv_24_var.inner, ret_conv_24_var.is_owned); + ret_arr_ptr[y] = ret_conv_24_ref; + } + + FREE(ret_var.data); + return ret_arr; +} + +uint64_t __attribute__((export_name("TS_OutputSweeper_current_best_block"))) TS_OutputSweeper_current_best_block(uint64_t this_arg) { + LDKOutputSweeper this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKBestBlock ret_var = OutputSweeper_current_best_block(&this_arg_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_OutputSweeper_as_Listen"))) TS_OutputSweeper_as_Listen(uint64_t this_arg) { + LDKOutputSweeper this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKListen* ret_ret = MALLOC(sizeof(LDKListen), "LDKListen"); + *ret_ret = OutputSweeper_as_Listen(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + +uint64_t __attribute__((export_name("TS_OutputSweeper_as_Confirm"))) TS_OutputSweeper_as_Confirm(uint64_t this_arg) { + LDKOutputSweeper this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKConfirm* ret_ret = MALLOC(sizeof(LDKConfirm), "LDKConfirm"); + *ret_ret = OutputSweeper_as_Confirm(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + +void __attribute__((export_name("TS_SpendingDelay_free"))) TS_SpendingDelay_free(uint64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKSpendingDelay this_ptr_conv = *(LDKSpendingDelay*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + SpendingDelay_free(this_ptr_conv); +} + +static inline uint64_t SpendingDelay_clone_ptr(LDKSpendingDelay *NONNULL_PTR arg) { + LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay"); + *ret_copy = SpendingDelay_clone(arg); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t __attribute__((export_name("TS_SpendingDelay_clone_ptr"))) TS_SpendingDelay_clone_ptr(uint64_t arg) { + LDKSpendingDelay* arg_conv = (LDKSpendingDelay*)untag_ptr(arg); + int64_t ret_conv = SpendingDelay_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_SpendingDelay_clone"))) TS_SpendingDelay_clone(uint64_t orig) { + LDKSpendingDelay* orig_conv = (LDKSpendingDelay*)untag_ptr(orig); + LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay"); + *ret_copy = SpendingDelay_clone(orig_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_SpendingDelay_relative"))) TS_SpendingDelay_relative(int32_t num_blocks) { + LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay"); + *ret_copy = SpendingDelay_relative(num_blocks); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_SpendingDelay_absolute"))) TS_SpendingDelay_absolute(int32_t height) { + LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay"); + *ret_copy = SpendingDelay_absolute(height); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_OutputSweeper_read"))) TS_OutputSweeper_read(int8_tArray ser, uint64_t arg_a, uint64_t arg_b, uint64_t arg_c, uint64_t arg_d, uint64_t arg_e, uint64_t arg_f, uint64_t arg_g) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + void* arg_a_ptr = untag_ptr(arg_a); + CHECK_ACCESS(arg_a_ptr); + LDKBroadcasterInterface arg_a_conv = *(LDKBroadcasterInterface*)(arg_a_ptr); + if (arg_a_conv.free == LDKBroadcasterInterface_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKBroadcasterInterface_JCalls_cloned(&arg_a_conv); + } + void* arg_b_ptr = untag_ptr(arg_b); + CHECK_ACCESS(arg_b_ptr); + LDKFeeEstimator arg_b_conv = *(LDKFeeEstimator*)(arg_b_ptr); + if (arg_b_conv.free == LDKFeeEstimator_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFeeEstimator_JCalls_cloned(&arg_b_conv); + } + void* arg_c_ptr = untag_ptr(arg_c); + CHECK_ACCESS(arg_c_ptr); + LDKCOption_FilterZ arg_c_conv = *(LDKCOption_FilterZ*)(arg_c_ptr); + // WARNING: we may need a move here but no clone is available for LDKCOption_FilterZ + if (arg_c_conv.tag == LDKCOption_FilterZ_Some) { + // Manually implement clone for Java trait instances + if (arg_c_conv.some.free == LDKFilter_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFilter_JCalls_cloned(&arg_c_conv.some); + } + } + void* arg_d_ptr = untag_ptr(arg_d); + CHECK_ACCESS(arg_d_ptr); + LDKOutputSpender arg_d_conv = *(LDKOutputSpender*)(arg_d_ptr); + if (arg_d_conv.free == LDKOutputSpender_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKOutputSpender_JCalls_cloned(&arg_d_conv); + } + void* arg_e_ptr = untag_ptr(arg_e); + CHECK_ACCESS(arg_e_ptr); + LDKChangeDestinationSource arg_e_conv = *(LDKChangeDestinationSource*)(arg_e_ptr); + if (arg_e_conv.free == LDKChangeDestinationSource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKChangeDestinationSource_JCalls_cloned(&arg_e_conv); + } + void* arg_f_ptr = untag_ptr(arg_f); + CHECK_ACCESS(arg_f_ptr); + LDKKVStore arg_f_conv = *(LDKKVStore*)(arg_f_ptr); + if (arg_f_conv.free == LDKKVStore_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKKVStore_JCalls_cloned(&arg_f_conv); + } + void* arg_g_ptr = untag_ptr(arg_g); + CHECK_ACCESS(arg_g_ptr); + LDKLogger arg_g_conv = *(LDKLogger*)(arg_g_ptr); + if (arg_g_conv.free == LDKLogger_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKLogger_JCalls_cloned(&arg_g_conv); + } + LDKCResult_OutputSweeperDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSweeperDecodeErrorZ), "LDKCResult_OutputSweeperDecodeErrorZ"); + *ret_conv = OutputSweeper_read(ser_ref, arg_a_conv, arg_b_conv, arg_c_conv, arg_d_conv, arg_e_conv, arg_f_conv, arg_g_conv); + FREE(ser); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_C2Tuple_BestBlockOutputSweeperZ_read"))) TS_C2Tuple_BestBlockOutputSweeperZ_read(int8_tArray ser, uint64_t arg_a, uint64_t arg_b, uint64_t arg_c, uint64_t arg_d, uint64_t arg_e, uint64_t arg_f, uint64_t arg_g) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + void* arg_a_ptr = untag_ptr(arg_a); + CHECK_ACCESS(arg_a_ptr); + LDKBroadcasterInterface arg_a_conv = *(LDKBroadcasterInterface*)(arg_a_ptr); + if (arg_a_conv.free == LDKBroadcasterInterface_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKBroadcasterInterface_JCalls_cloned(&arg_a_conv); + } + void* arg_b_ptr = untag_ptr(arg_b); + CHECK_ACCESS(arg_b_ptr); + LDKFeeEstimator arg_b_conv = *(LDKFeeEstimator*)(arg_b_ptr); + if (arg_b_conv.free == LDKFeeEstimator_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFeeEstimator_JCalls_cloned(&arg_b_conv); + } + void* arg_c_ptr = untag_ptr(arg_c); + CHECK_ACCESS(arg_c_ptr); + LDKCOption_FilterZ arg_c_conv = *(LDKCOption_FilterZ*)(arg_c_ptr); + // WARNING: we may need a move here but no clone is available for LDKCOption_FilterZ + if (arg_c_conv.tag == LDKCOption_FilterZ_Some) { + // Manually implement clone for Java trait instances + if (arg_c_conv.some.free == LDKFilter_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFilter_JCalls_cloned(&arg_c_conv.some); + } + } + void* arg_d_ptr = untag_ptr(arg_d); + CHECK_ACCESS(arg_d_ptr); + LDKOutputSpender arg_d_conv = *(LDKOutputSpender*)(arg_d_ptr); + if (arg_d_conv.free == LDKOutputSpender_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKOutputSpender_JCalls_cloned(&arg_d_conv); + } + void* arg_e_ptr = untag_ptr(arg_e); + CHECK_ACCESS(arg_e_ptr); + LDKChangeDestinationSource arg_e_conv = *(LDKChangeDestinationSource*)(arg_e_ptr); + if (arg_e_conv.free == LDKChangeDestinationSource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKChangeDestinationSource_JCalls_cloned(&arg_e_conv); + } + void* arg_f_ptr = untag_ptr(arg_f); + CHECK_ACCESS(arg_f_ptr); + LDKKVStore arg_f_conv = *(LDKKVStore*)(arg_f_ptr); + if (arg_f_conv.free == LDKKVStore_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKKVStore_JCalls_cloned(&arg_f_conv); + } + void* arg_g_ptr = untag_ptr(arg_g); + CHECK_ACCESS(arg_g_ptr); + LDKLogger arg_g_conv = *(LDKLogger*)(arg_g_ptr); + if (arg_g_conv.free == LDKLogger_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKLogger_JCalls_cloned(&arg_g_conv); + } + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ), "LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ"); + *ret_conv = C2Tuple_BestBlockOutputSweeperZ_read(ser_ref, arg_a_conv, arg_b_conv, arg_c_conv, arg_d_conv, arg_e_conv, arg_f_conv, arg_g_conv); + FREE(ser); + return tag_ptr(ret_conv, true); +} + +void __attribute__((export_name("TS_FutureCallback_free"))) TS_FutureCallback_free(uint64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKFutureCallback this_ptr_conv = *(LDKFutureCallback*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + FutureCallback_free(this_ptr_conv); +} + +void __attribute__((export_name("TS_Future_free"))) TS_Future_free(uint64_t this_obj) { + LDKFuture this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + Future_free(this_obj_conv); +} + void __attribute__((export_name("TS_Future_register_callback_fn"))) TS_Future_register_callback_fn(uint64_t this_arg, uint64_t callback) { LDKFuture this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -32702,9 +36428,10 @@ uint64_t __attribute__((export_name("TS_Record_get_channel_id"))) TS_Record_get this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKCOption_ThirtyTwoBytesZ *ret_copy = MALLOC(sizeof(LDKCOption_ThirtyTwoBytesZ), "LDKCOption_ThirtyTwoBytesZ"); - *ret_copy = Record_get_channel_id(&this_ptr_conv); - uint64_t ret_ref = tag_ptr(ret_copy, true); + LDKChannelId ret_var = Record_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } @@ -32714,10 +36441,11 @@ void __attribute__((export_name("TS_Record_set_channel_id"))) TS_Record_set_cha this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - void* val_ptr = untag_ptr(val); - CHECK_ACCESS(val_ptr); - LDKCOption_ThirtyTwoBytesZ val_conv = *(LDKCOption_ThirtyTwoBytesZ*)(val_ptr); - val_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(val)); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); Record_set_channel_id(&this_ptr_conv, val_conv); } @@ -32811,10 +36539,11 @@ uint64_t __attribute__((export_name("TS_Record_new"))) TS_Record_new(uint32_t l LDKPublicKey peer_id_arg_ref; CHECK(peer_id_arg->arr_len == 33); memcpy(peer_id_arg_ref.compressed_form, peer_id_arg->elems, 33); FREE(peer_id_arg); - void* channel_id_arg_ptr = untag_ptr(channel_id_arg); - CHECK_ACCESS(channel_id_arg_ptr); - LDKCOption_ThirtyTwoBytesZ channel_id_arg_conv = *(LDKCOption_ThirtyTwoBytesZ*)(channel_id_arg_ptr); - channel_id_arg_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(channel_id_arg)); + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKStr args_arg_conv = str_ref_to_owned_c(args_arg); LDKStr module_path_arg_conv = str_ref_to_owned_c(module_path_arg); LDKStr file_arg_conv = str_ref_to_owned_c(file_arg); @@ -34073,6 +37802,59 @@ void __attribute__((export_name("TS_BestBlock_free"))) TS_BestBlock_free(uint64 BestBlock_free(this_obj_conv); } +int8_tArray __attribute__((export_name("TS_BestBlock_get_block_hash"))) TS_BestBlock_get_block_hash(uint64_t this_ptr) { + LDKBestBlock this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(32, __LINE__); + memcpy(ret_arr->elems, *BestBlock_get_block_hash(&this_ptr_conv), 32); + return ret_arr; +} + +void __attribute__((export_name("TS_BestBlock_set_block_hash"))) TS_BestBlock_set_block_hash(uint64_t this_ptr, int8_tArray val) { + LDKBestBlock this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKThirtyTwoBytes val_ref; + CHECK(val->arr_len == 32); + memcpy(val_ref.data, val->elems, 32); FREE(val); + BestBlock_set_block_hash(&this_ptr_conv, val_ref); +} + +int32_t __attribute__((export_name("TS_BestBlock_get_height"))) TS_BestBlock_get_height(uint64_t this_ptr) { + LDKBestBlock this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int32_t ret_conv = BestBlock_get_height(&this_ptr_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_BestBlock_set_height"))) TS_BestBlock_set_height(uint64_t this_ptr, int32_t val) { + LDKBestBlock this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + BestBlock_set_height(&this_ptr_conv, val); +} + +uint64_t __attribute__((export_name("TS_BestBlock_new"))) TS_BestBlock_new(int8_tArray block_hash_arg, int32_t height_arg) { + LDKThirtyTwoBytes block_hash_arg_ref; + CHECK(block_hash_arg->arr_len == 32); + memcpy(block_hash_arg_ref.data, block_hash_arg->elems, 32); FREE(block_hash_arg); + LDKBestBlock ret_var = BestBlock_new(block_hash_arg_ref, height_arg); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + static inline uint64_t BestBlock_clone_ptr(LDKBestBlock *NONNULL_PTR arg) { LDKBestBlock ret_var = BestBlock_clone(arg); uint64_t ret_ref = 0; @@ -34103,6 +37885,16 @@ uint64_t __attribute__((export_name("TS_BestBlock_clone"))) TS_BestBlock_clone( return ret_ref; } +int64_t __attribute__((export_name("TS_BestBlock_hash"))) TS_BestBlock_hash(uint64_t o) { + LDKBestBlock o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = BestBlock_hash(&o_conv); + return ret_conv; +} + jboolean __attribute__((export_name("TS_BestBlock_eq"))) TS_BestBlock_eq(uint64_t a, uint64_t b) { LDKBestBlock a_conv; a_conv.inner = untag_ptr(a); @@ -34127,36 +37919,27 @@ uint64_t __attribute__((export_name("TS_BestBlock_from_network"))) TS_BestBlock return ret_ref; } -uint64_t __attribute__((export_name("TS_BestBlock_new"))) TS_BestBlock_new(int8_tArray block_hash, int32_t height) { - LDKThirtyTwoBytes block_hash_ref; - CHECK(block_hash->arr_len == 32); - memcpy(block_hash_ref.data, block_hash->elems, 32); FREE(block_hash); - LDKBestBlock ret_var = BestBlock_new(block_hash_ref, height); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -int8_tArray __attribute__((export_name("TS_BestBlock_block_hash"))) TS_BestBlock_block_hash(uint64_t this_arg) { - LDKBestBlock this_arg_conv; - this_arg_conv.inner = untag_ptr(this_arg); - this_arg_conv.is_owned = ptr_is_owned(this_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, BestBlock_block_hash(&this_arg_conv).data, 32); +int8_tArray __attribute__((export_name("TS_BestBlock_write"))) TS_BestBlock_write(uint64_t obj) { + LDKBestBlock obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = BestBlock_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); return ret_arr; } -int32_t __attribute__((export_name("TS_BestBlock_height"))) TS_BestBlock_height(uint64_t this_arg) { - LDKBestBlock this_arg_conv; - this_arg_conv.inner = untag_ptr(this_arg); - this_arg_conv.is_owned = ptr_is_owned(this_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv.is_owned = false; - int32_t ret_conv = BestBlock_height(&this_arg_conv); - return ret_conv; +uint64_t __attribute__((export_name("TS_BestBlock_read"))) TS_BestBlock_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ"); + *ret_conv = BestBlock_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); } void __attribute__((export_name("TS_Listen_free"))) TS_Listen_free(uint64_t this_ptr) { @@ -34430,6 +38213,11 @@ uint32_t __attribute__((export_name("TS_ConfirmationTarget_channel_close_minimu return ret_conv; } +uint32_t __attribute__((export_name("TS_ConfirmationTarget_output_spending_fee"))) TS_ConfirmationTarget_output_spending_fee() { + uint32_t ret_conv = LDKConfirmationTarget_to_js(ConfirmationTarget_output_spending_fee()); + return ret_conv; +} + int64_t __attribute__((export_name("TS_ConfirmationTarget_hash"))) TS_ConfirmationTarget_hash(uint64_t o) { LDKConfirmationTarget* o_conv = (LDKConfirmationTarget*)untag_ptr(o); int64_t ret_conv = ConfirmationTarget_hash(o_conv); @@ -34647,16 +38435,14 @@ uint64_tArray __attribute__((export_name("TS_ChainMonitor_list_monitors"))) TS_ this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKCVec_OutPointZ ret_var = ChainMonitor_list_monitors(&this_arg_conv); + LDKCVec_C2Tuple_OutPointChannelIdZZ ret_var = ChainMonitor_list_monitors(&this_arg_conv); uint64_tArray ret_arr = NULL; ret_arr = init_uint64_tArray(ret_var.datalen, __LINE__); uint64_t *ret_arr_ptr = (uint64_t*)(((uint8_t*)ret_arr) + 8); - for (size_t k = 0; k < ret_var.datalen; k++) { - LDKOutPoint ret_conv_10_var = ret_var.data[k]; - uint64_t ret_conv_10_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_10_var); - ret_conv_10_ref = tag_ptr(ret_conv_10_var.inner, ret_conv_10_var.is_owned); - ret_arr_ptr[k] = ret_conv_10_ref; + for (size_t d = 0; d < ret_var.datalen; d++) { + LDKC2Tuple_OutPointChannelIdZ* ret_conv_29_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ"); + *ret_conv_29_conv = ret_var.data[d]; + ret_arr_ptr[d] = tag_ptr(ret_conv_29_conv, true); } FREE(ret_var.data); @@ -34726,6 +38512,29 @@ void __attribute__((export_name("TS_ChainMonitor_rebroadcast_pending_claims"))) ChainMonitor_rebroadcast_pending_claims(&this_arg_conv); } +void __attribute__((export_name("TS_ChainMonitor_signer_unblocked"))) TS_ChainMonitor_signer_unblocked(uint64_t this_arg, uint64_t monitor_opt) { + LDKChainMonitor this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKOutPoint monitor_opt_conv; + monitor_opt_conv.inner = untag_ptr(monitor_opt); + monitor_opt_conv.is_owned = ptr_is_owned(monitor_opt); + CHECK_INNER_FIELD_ACCESS_OR_NULL(monitor_opt_conv); + monitor_opt_conv = OutPoint_clone(&monitor_opt_conv); + ChainMonitor_signer_unblocked(&this_arg_conv, monitor_opt_conv); +} + +void __attribute__((export_name("TS_ChainMonitor_archive_fully_resolved_channel_monitors"))) TS_ChainMonitor_archive_fully_resolved_channel_monitors(uint64_t this_arg) { + LDKChainMonitor this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + ChainMonitor_archive_fully_resolved_channel_monitors(&this_arg_conv); +} + uint64_t __attribute__((export_name("TS_ChainMonitor_as_Listen"))) TS_ChainMonitor_as_Listen(uint64_t this_arg) { LDKChainMonitor this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -34797,6 +38606,33 @@ void __attribute__((export_name("TS_ChannelMonitorUpdate_set_update_id"))) TS_C ChannelMonitorUpdate_set_update_id(&this_ptr_conv, val); } +uint64_t __attribute__((export_name("TS_ChannelMonitorUpdate_get_channel_id"))) TS_ChannelMonitorUpdate_get_channel_id(uint64_t this_ptr) { + LDKChannelMonitorUpdate this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelId ret_var = ChannelMonitorUpdate_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void __attribute__((export_name("TS_ChannelMonitorUpdate_set_channel_id"))) TS_ChannelMonitorUpdate_set_channel_id(uint64_t this_ptr, uint64_t val) { + LDKChannelMonitorUpdate this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ChannelMonitorUpdate_set_channel_id(&this_ptr_conv, val_conv); +} + static inline uint64_t ChannelMonitorUpdate_clone_ptr(LDKChannelMonitorUpdate *NONNULL_PTR arg) { LDKChannelMonitorUpdate ret_var = ChannelMonitorUpdate_clone(arg); uint64_t ret_ref = 0; @@ -34906,6 +38742,27 @@ uint64_t __attribute__((export_name("TS_MonitorEvent_htlcevent"))) TS_MonitorEv return ret_ref; } +uint64_t __attribute__((export_name("TS_MonitorEvent_holder_force_closed_with_info"))) TS_MonitorEvent_holder_force_closed_with_info(uint64_t reason, uint64_t outpoint, uint64_t channel_id) { + void* reason_ptr = untag_ptr(reason); + CHECK_ACCESS(reason_ptr); + LDKClosureReason reason_conv = *(LDKClosureReason*)(reason_ptr); + reason_conv = ClosureReason_clone((LDKClosureReason*)untag_ptr(reason)); + LDKOutPoint outpoint_conv; + outpoint_conv.inner = untag_ptr(outpoint); + outpoint_conv.is_owned = ptr_is_owned(outpoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_conv); + outpoint_conv = OutPoint_clone(&outpoint_conv); + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); + LDKMonitorEvent *ret_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent"); + *ret_copy = MonitorEvent_holder_force_closed_with_info(reason_conv, outpoint_conv, channel_id_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + uint64_t __attribute__((export_name("TS_MonitorEvent_holder_force_closed"))) TS_MonitorEvent_holder_force_closed(uint64_t a) { LDKOutPoint a_conv; a_conv.inner = untag_ptr(a); @@ -34918,14 +38775,19 @@ uint64_t __attribute__((export_name("TS_MonitorEvent_holder_force_closed"))) TS return ret_ref; } -uint64_t __attribute__((export_name("TS_MonitorEvent_completed"))) TS_MonitorEvent_completed(uint64_t funding_txo, int64_t monitor_update_id) { +uint64_t __attribute__((export_name("TS_MonitorEvent_completed"))) TS_MonitorEvent_completed(uint64_t funding_txo, uint64_t channel_id, int64_t monitor_update_id) { LDKOutPoint funding_txo_conv; funding_txo_conv.inner = untag_ptr(funding_txo); funding_txo_conv.is_owned = ptr_is_owned(funding_txo); CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_conv); funding_txo_conv = OutPoint_clone(&funding_txo_conv); + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKMonitorEvent *ret_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent"); - *ret_copy = MonitorEvent_completed(funding_txo_conv, monitor_update_id); + *ret_copy = MonitorEvent_completed(funding_txo_conv, channel_id_conv, monitor_update_id); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -35225,6 +39087,19 @@ uint64_t __attribute__((export_name("TS_ChannelMonitor_get_funding_txo"))) TS_C return tag_ptr(ret_conv, true); } +uint64_t __attribute__((export_name("TS_ChannelMonitor_channel_id"))) TS_ChannelMonitor_channel_id(uint64_t this_arg) { + LDKChannelMonitor this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKChannelId ret_var = ChannelMonitor_channel_id(&this_arg_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + uint64_tArray __attribute__((export_name("TS_ChannelMonitor_get_outputs_to_watch"))) TS_ChannelMonitor_get_outputs_to_watch(uint64_t this_arg) { LDKChannelMonitor this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -35360,29 +39235,22 @@ int8_tArray __attribute__((export_name("TS_ChannelMonitor_get_counterparty_node return ret_arr; } -ptrArray __attribute__((export_name("TS_ChannelMonitor_get_latest_holder_commitment_txn"))) TS_ChannelMonitor_get_latest_holder_commitment_txn(uint64_t this_arg, uint64_t logger) { +void __attribute__((export_name("TS_ChannelMonitor_broadcast_latest_holder_commitment_txn"))) TS_ChannelMonitor_broadcast_latest_holder_commitment_txn(uint64_t this_arg, uint64_t broadcaster, uint64_t fee_estimator, uint64_t logger) { LDKChannelMonitor this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; + void* broadcaster_ptr = untag_ptr(broadcaster); + if (ptr_is_owned(broadcaster)) { CHECK_ACCESS(broadcaster_ptr); } + LDKBroadcasterInterface* broadcaster_conv = (LDKBroadcasterInterface*)broadcaster_ptr; + void* fee_estimator_ptr = untag_ptr(fee_estimator); + if (ptr_is_owned(fee_estimator)) { CHECK_ACCESS(fee_estimator_ptr); } + LDKFeeEstimator* fee_estimator_conv = (LDKFeeEstimator*)fee_estimator_ptr; void* logger_ptr = untag_ptr(logger); if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); } LDKLogger* logger_conv = (LDKLogger*)logger_ptr; - LDKCVec_TransactionZ ret_var = ChannelMonitor_get_latest_holder_commitment_txn(&this_arg_conv, logger_conv); - ptrArray ret_arr = NULL; - ret_arr = init_ptrArray(ret_var.datalen, __LINE__); - int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 8); - for (size_t m = 0; m < ret_var.datalen; m++) { - LDKTransaction ret_conv_12_var = ret_var.data[m]; - int8_tArray ret_conv_12_arr = init_int8_tArray(ret_conv_12_var.datalen, __LINE__); - memcpy(ret_conv_12_arr->elems, ret_conv_12_var.data, ret_conv_12_var.datalen); - Transaction_free(ret_conv_12_var); - ret_arr_ptr[m] = ret_conv_12_arr; - } - - FREE(ret_var.data); - return ret_arr; + ChannelMonitor_broadcast_latest_holder_commitment_txn(&this_arg_conv, broadcaster_conv, fee_estimator_conv, logger_conv); } uint64_tArray __attribute__((export_name("TS_ChannelMonitor_block_connected"))) TS_ChannelMonitor_block_connected(uint64_t this_arg, int8_tArray header, uint64_tArray txdata, int32_t height, uint64_t broadcaster, uint64_t fee_estimator, uint64_t logger) { @@ -35659,6 +39527,32 @@ void __attribute__((export_name("TS_ChannelMonitor_rebroadcast_pending_claims") ChannelMonitor_rebroadcast_pending_claims(&this_arg_conv, broadcaster_conv, fee_estimator_conv, logger_conv); } +void __attribute__((export_name("TS_ChannelMonitor_signer_unblocked"))) TS_ChannelMonitor_signer_unblocked(uint64_t this_arg, uint64_t broadcaster, uint64_t fee_estimator, uint64_t logger) { + LDKChannelMonitor this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + void* broadcaster_ptr = untag_ptr(broadcaster); + CHECK_ACCESS(broadcaster_ptr); + LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(broadcaster_ptr); + if (broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKBroadcasterInterface_JCalls_cloned(&broadcaster_conv); + } + void* fee_estimator_ptr = untag_ptr(fee_estimator); + CHECK_ACCESS(fee_estimator_ptr); + LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(fee_estimator_ptr); + if (fee_estimator_conv.free == LDKFeeEstimator_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFeeEstimator_JCalls_cloned(&fee_estimator_conv); + } + void* logger_ptr = untag_ptr(logger); + if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); } + LDKLogger* logger_conv = (LDKLogger*)logger_ptr; + ChannelMonitor_signer_unblocked(&this_arg_conv, broadcaster_conv, fee_estimator_conv, logger_conv); +} + uint64_tArray __attribute__((export_name("TS_ChannelMonitor_get_spendable_outputs"))) TS_ChannelMonitor_get_spendable_outputs(uint64_t this_arg, int8_tArray tx, int32_t confirmation_height) { LDKChannelMonitor this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -35685,6 +39579,19 @@ uint64_tArray __attribute__((export_name("TS_ChannelMonitor_get_spendable_outpu return ret_arr; } +jboolean __attribute__((export_name("TS_ChannelMonitor_is_fully_resolved"))) TS_ChannelMonitor_is_fully_resolved(uint64_t this_arg, uint64_t logger) { + LDKChannelMonitor this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + void* logger_ptr = untag_ptr(logger); + if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); } + LDKLogger* logger_conv = (LDKLogger*)logger_ptr; + jboolean ret_conv = ChannelMonitor_is_fully_resolved(&this_arg_conv, logger_conv); + return ret_conv; +} + uint64_tArray __attribute__((export_name("TS_ChannelMonitor_get_claimable_balances"))) TS_ChannelMonitor_get_claimable_balances(uint64_t this_arg) { LDKChannelMonitor this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -35838,17 +39745,6 @@ int64_t __attribute__((export_name("TS_OutPoint_hash"))) TS_OutPoint_hash(uint6 return ret_conv; } -int8_tArray __attribute__((export_name("TS_OutPoint_to_channel_id"))) TS_OutPoint_to_channel_id(uint64_t this_arg) { - LDKOutPoint this_arg_conv; - this_arg_conv.inner = untag_ptr(this_arg); - this_arg_conv.is_owned = ptr_is_owned(this_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, OutPoint_to_channel_id(&this_arg_conv).data, 32); - return ret_arr; -} - int8_tArray __attribute__((export_name("TS_OutPoint_write"))) TS_OutPoint_write(uint64_t obj) { LDKOutPoint obj_conv; obj_conv.inner = untag_ptr(obj); @@ -35960,6 +39856,61 @@ uint64_t __attribute__((export_name("TS_InboundHTLCErr_new"))) TS_InboundHTLCEr return ret_ref; } +static inline uint64_t InboundHTLCErr_clone_ptr(LDKInboundHTLCErr *NONNULL_PTR arg) { + LDKInboundHTLCErr ret_var = InboundHTLCErr_clone(arg); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t __attribute__((export_name("TS_InboundHTLCErr_clone_ptr"))) TS_InboundHTLCErr_clone_ptr(uint64_t arg) { + LDKInboundHTLCErr arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = InboundHTLCErr_clone_ptr(&arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_InboundHTLCErr_clone"))) TS_InboundHTLCErr_clone(uint64_t orig) { + LDKInboundHTLCErr orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKInboundHTLCErr ret_var = InboundHTLCErr_clone(&orig_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t __attribute__((export_name("TS_InboundHTLCErr_hash"))) TS_InboundHTLCErr_hash(uint64_t o) { + LDKInboundHTLCErr o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = InboundHTLCErr_hash(&o_conv); + return ret_conv; +} + +jboolean __attribute__((export_name("TS_InboundHTLCErr_eq"))) TS_InboundHTLCErr_eq(uint64_t a, uint64_t b) { + LDKInboundHTLCErr a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKInboundHTLCErr b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = InboundHTLCErr_eq(&a_conv, &b_conv); + return ret_conv; +} + uint64_t __attribute__((export_name("TS_peel_payment_onion"))) TS_peel_payment_onion(uint64_t msg, uint64_t node_signer, uint64_t logger, int32_t cur_height, jboolean accept_mpp_keysend, jboolean allow_skimmed_fees) { LDKUpdateAddHTLC msg_conv; msg_conv.inner = untag_ptr(msg); @@ -36023,7 +39974,7 @@ uint64_t __attribute__((export_name("TS_PendingHTLCRouting_forward"))) TS_Pendi return ret_ref; } -uint64_t __attribute__((export_name("TS_PendingHTLCRouting_receive"))) TS_PendingHTLCRouting_receive(uint64_t payment_data, uint64_t payment_metadata, int32_t incoming_cltv_expiry, int8_tArray phantom_shared_secret, uint64_tArray custom_tlvs, jboolean requires_blinded_error) { +uint64_t __attribute__((export_name("TS_PendingHTLCRouting_receive"))) TS_PendingHTLCRouting_receive(uint64_t payment_data, uint64_t payment_metadata, uint64_t payment_context, int32_t incoming_cltv_expiry, int8_tArray phantom_shared_secret, uint64_tArray custom_tlvs, jboolean requires_blinded_error) { LDKFinalOnionHopData payment_data_conv; payment_data_conv.inner = untag_ptr(payment_data); payment_data_conv.is_owned = ptr_is_owned(payment_data); @@ -36033,6 +39984,10 @@ uint64_t __attribute__((export_name("TS_PendingHTLCRouting_receive"))) TS_Pendi CHECK_ACCESS(payment_metadata_ptr); LDKCOption_CVec_u8ZZ payment_metadata_conv = *(LDKCOption_CVec_u8ZZ*)(payment_metadata_ptr); payment_metadata_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(payment_metadata)); + void* payment_context_ptr = untag_ptr(payment_context); + CHECK_ACCESS(payment_context_ptr); + LDKCOption_PaymentContextZ payment_context_conv = *(LDKCOption_PaymentContextZ*)(payment_context_ptr); + payment_context_conv = COption_PaymentContextZ_clone((LDKCOption_PaymentContextZ*)untag_ptr(payment_context)); LDKThirtyTwoBytes phantom_shared_secret_ref; CHECK(phantom_shared_secret->arr_len == 32); memcpy(phantom_shared_secret_ref.data, phantom_shared_secret->elems, 32); FREE(phantom_shared_secret); @@ -36053,12 +40008,12 @@ uint64_t __attribute__((export_name("TS_PendingHTLCRouting_receive"))) TS_Pendi } FREE(custom_tlvs); LDKPendingHTLCRouting *ret_copy = MALLOC(sizeof(LDKPendingHTLCRouting), "LDKPendingHTLCRouting"); - *ret_copy = PendingHTLCRouting_receive(payment_data_conv, payment_metadata_conv, incoming_cltv_expiry, phantom_shared_secret_ref, custom_tlvs_constr, requires_blinded_error); + *ret_copy = PendingHTLCRouting_receive(payment_data_conv, payment_metadata_conv, payment_context_conv, incoming_cltv_expiry, phantom_shared_secret_ref, custom_tlvs_constr, requires_blinded_error); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -uint64_t __attribute__((export_name("TS_PendingHTLCRouting_receive_keysend"))) TS_PendingHTLCRouting_receive_keysend(uint64_t payment_data, int8_tArray payment_preimage, uint64_t payment_metadata, int32_t incoming_cltv_expiry, uint64_tArray custom_tlvs) { +uint64_t __attribute__((export_name("TS_PendingHTLCRouting_receive_keysend"))) TS_PendingHTLCRouting_receive_keysend(uint64_t payment_data, int8_tArray payment_preimage, uint64_t payment_metadata, int32_t incoming_cltv_expiry, uint64_tArray custom_tlvs, jboolean requires_blinded_error) { LDKFinalOnionHopData payment_data_conv; payment_data_conv.inner = untag_ptr(payment_data); payment_data_conv.is_owned = ptr_is_owned(payment_data); @@ -36088,7 +40043,7 @@ uint64_t __attribute__((export_name("TS_PendingHTLCRouting_receive_keysend"))) } FREE(custom_tlvs); LDKPendingHTLCRouting *ret_copy = MALLOC(sizeof(LDKPendingHTLCRouting), "LDKPendingHTLCRouting"); - *ret_copy = PendingHTLCRouting_receive_keysend(payment_data_conv, payment_preimage_ref, payment_metadata_conv, incoming_cltv_expiry, custom_tlvs_constr); + *ret_copy = PendingHTLCRouting_receive_keysend(payment_data_conv, payment_preimage_ref, payment_metadata_conv, incoming_cltv_expiry, custom_tlvs_constr, requires_blinded_error); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -36955,27 +40910,31 @@ void __attribute__((export_name("TS_ChannelDetails_free"))) TS_ChannelDetails_f ChannelDetails_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_ChannelDetails_get_channel_id"))) TS_ChannelDetails_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_ChannelDetails_get_channel_id"))) TS_ChannelDetails_get_channel_id(uint64_t this_ptr) { LDKChannelDetails this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *ChannelDetails_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = ChannelDetails_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_ChannelDetails_set_channel_id"))) TS_ChannelDetails_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_ChannelDetails_set_channel_id"))) TS_ChannelDetails_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKChannelDetails this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - ChannelDetails_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ChannelDetails_set_channel_id(&this_ptr_conv, val_conv); } uint64_t __attribute__((export_name("TS_ChannelDetails_get_counterparty"))) TS_ChannelDetails_get_counterparty(uint64_t this_ptr) { @@ -37574,83 +41533,6 @@ void __attribute__((export_name("TS_ChannelDetails_set_config"))) TS_ChannelDet ChannelDetails_set_config(&this_ptr_conv, val_conv); } -uint64_t __attribute__((export_name("TS_ChannelDetails_new"))) TS_ChannelDetails_new(int8_tArray channel_id_arg, uint64_t counterparty_arg, uint64_t funding_txo_arg, uint64_t channel_type_arg, uint64_t short_channel_id_arg, uint64_t outbound_scid_alias_arg, uint64_t inbound_scid_alias_arg, int64_t channel_value_satoshis_arg, uint64_t unspendable_punishment_reserve_arg, int8_tArray user_channel_id_arg, uint64_t feerate_sat_per_1000_weight_arg, int64_t balance_msat_arg, int64_t outbound_capacity_msat_arg, int64_t next_outbound_htlc_limit_msat_arg, int64_t next_outbound_htlc_minimum_msat_arg, int64_t inbound_capacity_msat_arg, uint64_t confirmations_required_arg, uint64_t confirmations_arg, uint64_t force_close_spend_delay_arg, jboolean is_outbound_arg, jboolean is_channel_ready_arg, uint64_t channel_shutdown_state_arg, jboolean is_usable_arg, jboolean is_public_arg, uint64_t inbound_htlc_minimum_msat_arg, uint64_t inbound_htlc_maximum_msat_arg, uint64_t config_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); - LDKChannelCounterparty counterparty_arg_conv; - counterparty_arg_conv.inner = untag_ptr(counterparty_arg); - counterparty_arg_conv.is_owned = ptr_is_owned(counterparty_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(counterparty_arg_conv); - counterparty_arg_conv = ChannelCounterparty_clone(&counterparty_arg_conv); - LDKOutPoint funding_txo_arg_conv; - funding_txo_arg_conv.inner = untag_ptr(funding_txo_arg); - funding_txo_arg_conv.is_owned = ptr_is_owned(funding_txo_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_arg_conv); - funding_txo_arg_conv = OutPoint_clone(&funding_txo_arg_conv); - LDKChannelTypeFeatures channel_type_arg_conv; - channel_type_arg_conv.inner = untag_ptr(channel_type_arg); - channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv); - channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv); - void* short_channel_id_arg_ptr = untag_ptr(short_channel_id_arg); - CHECK_ACCESS(short_channel_id_arg_ptr); - LDKCOption_u64Z short_channel_id_arg_conv = *(LDKCOption_u64Z*)(short_channel_id_arg_ptr); - short_channel_id_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(short_channel_id_arg)); - void* outbound_scid_alias_arg_ptr = untag_ptr(outbound_scid_alias_arg); - CHECK_ACCESS(outbound_scid_alias_arg_ptr); - LDKCOption_u64Z outbound_scid_alias_arg_conv = *(LDKCOption_u64Z*)(outbound_scid_alias_arg_ptr); - outbound_scid_alias_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(outbound_scid_alias_arg)); - void* inbound_scid_alias_arg_ptr = untag_ptr(inbound_scid_alias_arg); - CHECK_ACCESS(inbound_scid_alias_arg_ptr); - LDKCOption_u64Z inbound_scid_alias_arg_conv = *(LDKCOption_u64Z*)(inbound_scid_alias_arg_ptr); - inbound_scid_alias_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(inbound_scid_alias_arg)); - void* unspendable_punishment_reserve_arg_ptr = untag_ptr(unspendable_punishment_reserve_arg); - CHECK_ACCESS(unspendable_punishment_reserve_arg_ptr); - LDKCOption_u64Z unspendable_punishment_reserve_arg_conv = *(LDKCOption_u64Z*)(unspendable_punishment_reserve_arg_ptr); - LDKU128 user_channel_id_arg_ref; - CHECK(user_channel_id_arg->arr_len == 16); - memcpy(user_channel_id_arg_ref.le_bytes, user_channel_id_arg->elems, 16); FREE(user_channel_id_arg); - void* feerate_sat_per_1000_weight_arg_ptr = untag_ptr(feerate_sat_per_1000_weight_arg); - CHECK_ACCESS(feerate_sat_per_1000_weight_arg_ptr); - LDKCOption_u32Z feerate_sat_per_1000_weight_arg_conv = *(LDKCOption_u32Z*)(feerate_sat_per_1000_weight_arg_ptr); - feerate_sat_per_1000_weight_arg_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(feerate_sat_per_1000_weight_arg)); - void* confirmations_required_arg_ptr = untag_ptr(confirmations_required_arg); - CHECK_ACCESS(confirmations_required_arg_ptr); - LDKCOption_u32Z confirmations_required_arg_conv = *(LDKCOption_u32Z*)(confirmations_required_arg_ptr); - confirmations_required_arg_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(confirmations_required_arg)); - void* confirmations_arg_ptr = untag_ptr(confirmations_arg); - CHECK_ACCESS(confirmations_arg_ptr); - LDKCOption_u32Z confirmations_arg_conv = *(LDKCOption_u32Z*)(confirmations_arg_ptr); - confirmations_arg_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(confirmations_arg)); - void* force_close_spend_delay_arg_ptr = untag_ptr(force_close_spend_delay_arg); - CHECK_ACCESS(force_close_spend_delay_arg_ptr); - LDKCOption_u16Z force_close_spend_delay_arg_conv = *(LDKCOption_u16Z*)(force_close_spend_delay_arg_ptr); - force_close_spend_delay_arg_conv = COption_u16Z_clone((LDKCOption_u16Z*)untag_ptr(force_close_spend_delay_arg)); - void* channel_shutdown_state_arg_ptr = untag_ptr(channel_shutdown_state_arg); - CHECK_ACCESS(channel_shutdown_state_arg_ptr); - LDKCOption_ChannelShutdownStateZ channel_shutdown_state_arg_conv = *(LDKCOption_ChannelShutdownStateZ*)(channel_shutdown_state_arg_ptr); - channel_shutdown_state_arg_conv = COption_ChannelShutdownStateZ_clone((LDKCOption_ChannelShutdownStateZ*)untag_ptr(channel_shutdown_state_arg)); - void* inbound_htlc_minimum_msat_arg_ptr = untag_ptr(inbound_htlc_minimum_msat_arg); - CHECK_ACCESS(inbound_htlc_minimum_msat_arg_ptr); - LDKCOption_u64Z inbound_htlc_minimum_msat_arg_conv = *(LDKCOption_u64Z*)(inbound_htlc_minimum_msat_arg_ptr); - inbound_htlc_minimum_msat_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(inbound_htlc_minimum_msat_arg)); - void* inbound_htlc_maximum_msat_arg_ptr = untag_ptr(inbound_htlc_maximum_msat_arg); - CHECK_ACCESS(inbound_htlc_maximum_msat_arg_ptr); - LDKCOption_u64Z inbound_htlc_maximum_msat_arg_conv = *(LDKCOption_u64Z*)(inbound_htlc_maximum_msat_arg_ptr); - inbound_htlc_maximum_msat_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(inbound_htlc_maximum_msat_arg)); - LDKChannelConfig config_arg_conv; - config_arg_conv.inner = untag_ptr(config_arg); - config_arg_conv.is_owned = ptr_is_owned(config_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(config_arg_conv); - config_arg_conv = ChannelConfig_clone(&config_arg_conv); - LDKChannelDetails ret_var = ChannelDetails_new(channel_id_arg_ref, counterparty_arg_conv, funding_txo_arg_conv, channel_type_arg_conv, short_channel_id_arg_conv, outbound_scid_alias_arg_conv, inbound_scid_alias_arg_conv, channel_value_satoshis_arg, unspendable_punishment_reserve_arg_conv, user_channel_id_arg_ref, feerate_sat_per_1000_weight_arg_conv, balance_msat_arg, outbound_capacity_msat_arg, next_outbound_htlc_limit_msat_arg, next_outbound_htlc_minimum_msat_arg, inbound_capacity_msat_arg, confirmations_required_arg_conv, confirmations_arg_conv, force_close_spend_delay_arg_conv, is_outbound_arg, is_channel_ready_arg, channel_shutdown_state_arg_conv, is_usable_arg, is_public_arg, inbound_htlc_minimum_msat_arg_conv, inbound_htlc_maximum_msat_arg_conv, config_arg_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - static inline uint64_t ChannelDetails_clone_ptr(LDKChannelDetails *NONNULL_PTR arg) { LDKChannelDetails ret_var = ChannelDetails_clone(arg); uint64_t ret_ref = 0; @@ -38077,16 +41959,17 @@ uint64_t __attribute__((export_name("TS_ChannelManager_create_channel"))) TS_Ch LDKU128 user_channel_id_ref; CHECK(user_channel_id->arr_len == 16); memcpy(user_channel_id_ref.le_bytes, user_channel_id->elems, 16); FREE(user_channel_id); - void* temporary_channel_id_ptr = untag_ptr(temporary_channel_id); - CHECK_ACCESS(temporary_channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ temporary_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(temporary_channel_id_ptr); - temporary_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(temporary_channel_id)); + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv = ChannelId_clone(&temporary_channel_id_conv); LDKUserConfig override_config_conv; override_config_conv.inner = untag_ptr(override_config); override_config_conv.is_owned = ptr_is_owned(override_config); CHECK_INNER_FIELD_ACCESS_OR_NULL(override_config_conv); override_config_conv = UserConfig_clone(&override_config_conv); - LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); + LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ"); *ret_conv = ChannelManager_create_channel(&this_arg_conv, their_network_key_ref, channel_value_satoshis, push_msat, user_channel_id_ref, temporary_channel_id_conv, override_config_conv); return tag_ptr(ret_conv, true); } @@ -38181,34 +42064,36 @@ uint64_tArray __attribute__((export_name("TS_ChannelManager_list_recent_payment return ret_arr; } -uint64_t __attribute__((export_name("TS_ChannelManager_close_channel"))) TS_ChannelManager_close_channel(uint64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id) { +uint64_t __attribute__((export_name("TS_ChannelManager_close_channel"))) TS_ChannelManager_close_channel(uint64_t this_arg, uint64_t channel_id, int8_tArray counterparty_node_id) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t channel_id_arr[32]; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_arr, channel_id->elems, 32); FREE(channel_id); - uint8_t (*channel_id_ref)[32] = &channel_id_arr; + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_close_channel(&this_arg_conv, channel_id_ref, counterparty_node_id_ref); + *ret_conv = ChannelManager_close_channel(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref); return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_ChannelManager_close_channel_with_feerate_and_script"))) TS_ChannelManager_close_channel_with_feerate_and_script(uint64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id, uint64_t target_feerate_sats_per_1000_weight, uint64_t shutdown_script) { +uint64_t __attribute__((export_name("TS_ChannelManager_close_channel_with_feerate_and_script"))) TS_ChannelManager_close_channel_with_feerate_and_script(uint64_t this_arg, uint64_t channel_id, int8_tArray counterparty_node_id, uint64_t target_feerate_sats_per_1000_weight, uint64_t shutdown_script) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t channel_id_arr[32]; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_arr, channel_id->elems, 32); FREE(channel_id); - uint8_t (*channel_id_ref)[32] = &channel_id_arr; + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); @@ -38222,43 +42107,45 @@ uint64_t __attribute__((export_name("TS_ChannelManager_close_channel_with_feera CHECK_INNER_FIELD_ACCESS_OR_NULL(shutdown_script_conv); shutdown_script_conv = ShutdownScript_clone(&shutdown_script_conv); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_close_channel_with_feerate_and_script(&this_arg_conv, channel_id_ref, counterparty_node_id_ref, target_feerate_sats_per_1000_weight_conv, shutdown_script_conv); + *ret_conv = ChannelManager_close_channel_with_feerate_and_script(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref, target_feerate_sats_per_1000_weight_conv, shutdown_script_conv); return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_ChannelManager_force_close_broadcasting_latest_txn"))) TS_ChannelManager_force_close_broadcasting_latest_txn(uint64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id) { +uint64_t __attribute__((export_name("TS_ChannelManager_force_close_broadcasting_latest_txn"))) TS_ChannelManager_force_close_broadcasting_latest_txn(uint64_t this_arg, uint64_t channel_id, int8_tArray counterparty_node_id) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t channel_id_arr[32]; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_arr, channel_id->elems, 32); FREE(channel_id); - uint8_t (*channel_id_ref)[32] = &channel_id_arr; + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_force_close_broadcasting_latest_txn(&this_arg_conv, channel_id_ref, counterparty_node_id_ref); + *ret_conv = ChannelManager_force_close_broadcasting_latest_txn(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref); return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_ChannelManager_force_close_without_broadcasting_txn"))) TS_ChannelManager_force_close_without_broadcasting_txn(uint64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id) { +uint64_t __attribute__((export_name("TS_ChannelManager_force_close_without_broadcasting_txn"))) TS_ChannelManager_force_close_without_broadcasting_txn(uint64_t this_arg, uint64_t channel_id, int8_tArray counterparty_node_id) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t channel_id_arr[32]; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_arr, channel_id->elems, 32); FREE(channel_id); - uint8_t (*channel_id_ref)[32] = &channel_id_arr; + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_force_close_without_broadcasting_txn(&this_arg_conv, channel_id_ref, counterparty_node_id_ref); + *ret_conv = ChannelManager_force_close_without_broadcasting_txn(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref); return tag_ptr(ret_conv, true); } @@ -38464,16 +42351,17 @@ uint64_t __attribute__((export_name("TS_ChannelManager_send_preflight_probes")) return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_ChannelManager_funding_transaction_generated"))) TS_ChannelManager_funding_transaction_generated(uint64_t this_arg, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray funding_transaction) { +uint64_t __attribute__((export_name("TS_ChannelManager_funding_transaction_generated"))) TS_ChannelManager_funding_transaction_generated(uint64_t this_arg, uint64_t temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray funding_transaction) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t temporary_channel_id_arr[32]; - CHECK(temporary_channel_id->arr_len == 32); - memcpy(temporary_channel_id_arr, temporary_channel_id->elems, 32); FREE(temporary_channel_id); - uint8_t (*temporary_channel_id_ref)[32] = &temporary_channel_id_arr; + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); @@ -38483,7 +42371,7 @@ uint64_t __attribute__((export_name("TS_ChannelManager_funding_transaction_gene memcpy(funding_transaction_ref.data, funding_transaction->elems, funding_transaction_ref.datalen); FREE(funding_transaction); funding_transaction_ref.data_is_owned = true; LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_funding_transaction_generated(&this_arg_conv, temporary_channel_id_ref, counterparty_node_id_ref, funding_transaction_ref); + *ret_conv = ChannelManager_funding_transaction_generated(&this_arg_conv, &temporary_channel_id_conv, counterparty_node_id_ref, funding_transaction_ref); return tag_ptr(ret_conv, true); } @@ -38493,20 +42381,20 @@ uint64_t __attribute__((export_name("TS_ChannelManager_batch_funding_transactio this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ temporary_channels_constr; + LDKCVec_C2Tuple_ChannelIdPublicKeyZZ temporary_channels_constr; temporary_channels_constr.datalen = temporary_channels->arr_len; if (temporary_channels_constr.datalen > 0) - temporary_channels_constr.data = MALLOC(temporary_channels_constr.datalen * sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ Elements"); + temporary_channels_constr.data = MALLOC(temporary_channels_constr.datalen * sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKCVec_C2Tuple_ChannelIdPublicKeyZZ Elements"); else temporary_channels_constr.data = NULL; uint64_t* temporary_channels_vals = temporary_channels->elems; - for (size_t j = 0; j < temporary_channels_constr.datalen; j++) { - uint64_t temporary_channels_conv_35 = temporary_channels_vals[j]; - void* temporary_channels_conv_35_ptr = untag_ptr(temporary_channels_conv_35); - CHECK_ACCESS(temporary_channels_conv_35_ptr); - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ temporary_channels_conv_35_conv = *(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)(temporary_channels_conv_35_ptr); - temporary_channels_conv_35_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone((LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(temporary_channels_conv_35)); - temporary_channels_constr.data[j] = temporary_channels_conv_35_conv; + for (size_t e = 0; e < temporary_channels_constr.datalen; e++) { + uint64_t temporary_channels_conv_30 = temporary_channels_vals[e]; + void* temporary_channels_conv_30_ptr = untag_ptr(temporary_channels_conv_30); + CHECK_ACCESS(temporary_channels_conv_30_ptr); + LDKC2Tuple_ChannelIdPublicKeyZ temporary_channels_conv_30_conv = *(LDKC2Tuple_ChannelIdPublicKeyZ*)(temporary_channels_conv_30_ptr); + temporary_channels_conv_30_conv = C2Tuple_ChannelIdPublicKeyZ_clone((LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(temporary_channels_conv_30)); + temporary_channels_constr.data[e] = temporary_channels_conv_30_conv; } FREE(temporary_channels); LDKTransaction funding_transaction_ref; @@ -38519,7 +42407,7 @@ uint64_t __attribute__((export_name("TS_ChannelManager_batch_funding_transactio return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_ChannelManager_update_partial_channel_config"))) TS_ChannelManager_update_partial_channel_config(uint64_t this_arg, int8_tArray counterparty_node_id, ptrArray channel_ids, uint64_t config_update) { +uint64_t __attribute__((export_name("TS_ChannelManager_update_partial_channel_config"))) TS_ChannelManager_update_partial_channel_config(uint64_t this_arg, int8_tArray counterparty_node_id, uint64_tArray channel_ids, uint64_t config_update) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); @@ -38528,19 +42416,21 @@ uint64_t __attribute__((export_name("TS_ChannelManager_update_partial_channel_c LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); - LDKCVec_ThirtyTwoBytesZ channel_ids_constr; + LDKCVec_ChannelIdZ channel_ids_constr; channel_ids_constr.datalen = channel_ids->arr_len; if (channel_ids_constr.datalen > 0) - channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKThirtyTwoBytes), "LDKCVec_ThirtyTwoBytesZ Elements"); + channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKChannelId), "LDKCVec_ChannelIdZ Elements"); else channel_ids_constr.data = NULL; - int8_tArray* channel_ids_vals = (void*) channel_ids->elems; - for (size_t m = 0; m < channel_ids_constr.datalen; m++) { - int8_tArray channel_ids_conv_12 = channel_ids_vals[m]; - LDKThirtyTwoBytes channel_ids_conv_12_ref; - CHECK(channel_ids_conv_12->arr_len == 32); - memcpy(channel_ids_conv_12_ref.data, channel_ids_conv_12->elems, 32); FREE(channel_ids_conv_12); - channel_ids_constr.data[m] = channel_ids_conv_12_ref; + uint64_t* channel_ids_vals = channel_ids->elems; + for (size_t l = 0; l < channel_ids_constr.datalen; l++) { + uint64_t channel_ids_conv_11 = channel_ids_vals[l]; + LDKChannelId channel_ids_conv_11_conv; + channel_ids_conv_11_conv.inner = untag_ptr(channel_ids_conv_11); + channel_ids_conv_11_conv.is_owned = ptr_is_owned(channel_ids_conv_11); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_ids_conv_11_conv); + channel_ids_conv_11_conv = ChannelId_clone(&channel_ids_conv_11_conv); + channel_ids_constr.data[l] = channel_ids_conv_11_conv; } FREE(channel_ids); LDKChannelConfigUpdate config_update_conv; @@ -38553,7 +42443,7 @@ uint64_t __attribute__((export_name("TS_ChannelManager_update_partial_channel_c return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_ChannelManager_update_channel_config"))) TS_ChannelManager_update_channel_config(uint64_t this_arg, int8_tArray counterparty_node_id, ptrArray channel_ids, uint64_t config) { +uint64_t __attribute__((export_name("TS_ChannelManager_update_channel_config"))) TS_ChannelManager_update_channel_config(uint64_t this_arg, int8_tArray counterparty_node_id, uint64_tArray channel_ids, uint64_t config) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); @@ -38562,19 +42452,21 @@ uint64_t __attribute__((export_name("TS_ChannelManager_update_channel_config")) LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); - LDKCVec_ThirtyTwoBytesZ channel_ids_constr; + LDKCVec_ChannelIdZ channel_ids_constr; channel_ids_constr.datalen = channel_ids->arr_len; if (channel_ids_constr.datalen > 0) - channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKThirtyTwoBytes), "LDKCVec_ThirtyTwoBytesZ Elements"); + channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKChannelId), "LDKCVec_ChannelIdZ Elements"); else channel_ids_constr.data = NULL; - int8_tArray* channel_ids_vals = (void*) channel_ids->elems; - for (size_t m = 0; m < channel_ids_constr.datalen; m++) { - int8_tArray channel_ids_conv_12 = channel_ids_vals[m]; - LDKThirtyTwoBytes channel_ids_conv_12_ref; - CHECK(channel_ids_conv_12->arr_len == 32); - memcpy(channel_ids_conv_12_ref.data, channel_ids_conv_12->elems, 32); FREE(channel_ids_conv_12); - channel_ids_constr.data[m] = channel_ids_conv_12_ref; + uint64_t* channel_ids_vals = channel_ids->elems; + for (size_t l = 0; l < channel_ids_constr.datalen; l++) { + uint64_t channel_ids_conv_11 = channel_ids_vals[l]; + LDKChannelId channel_ids_conv_11_conv; + channel_ids_conv_11_conv.inner = untag_ptr(channel_ids_conv_11); + channel_ids_conv_11_conv.is_owned = ptr_is_owned(channel_ids_conv_11); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_ids_conv_11_conv); + channel_ids_conv_11_conv = ChannelId_clone(&channel_ids_conv_11_conv); + channel_ids_constr.data[l] = channel_ids_conv_11_conv; } FREE(channel_ids); LDKChannelConfig config_conv; @@ -38587,7 +42479,7 @@ uint64_t __attribute__((export_name("TS_ChannelManager_update_channel_config")) return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_ChannelManager_forward_intercepted_htlc"))) TS_ChannelManager_forward_intercepted_htlc(uint64_t this_arg, int8_tArray intercept_id, int8_tArray next_hop_channel_id, int8_tArray next_node_id, int64_t amt_to_forward_msat) { +uint64_t __attribute__((export_name("TS_ChannelManager_forward_intercepted_htlc"))) TS_ChannelManager_forward_intercepted_htlc(uint64_t this_arg, int8_tArray intercept_id, uint64_t next_hop_channel_id, int8_tArray next_node_id, int64_t amt_to_forward_msat) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); @@ -38596,15 +42488,16 @@ uint64_t __attribute__((export_name("TS_ChannelManager_forward_intercepted_htlc LDKThirtyTwoBytes intercept_id_ref; CHECK(intercept_id->arr_len == 32); memcpy(intercept_id_ref.data, intercept_id->elems, 32); FREE(intercept_id); - uint8_t next_hop_channel_id_arr[32]; - CHECK(next_hop_channel_id->arr_len == 32); - memcpy(next_hop_channel_id_arr, next_hop_channel_id->elems, 32); FREE(next_hop_channel_id); - uint8_t (*next_hop_channel_id_ref)[32] = &next_hop_channel_id_arr; + LDKChannelId next_hop_channel_id_conv; + next_hop_channel_id_conv.inner = untag_ptr(next_hop_channel_id); + next_hop_channel_id_conv.is_owned = ptr_is_owned(next_hop_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(next_hop_channel_id_conv); + next_hop_channel_id_conv.is_owned = false; LDKPublicKey next_node_id_ref; CHECK(next_node_id->arr_len == 33); memcpy(next_node_id_ref.compressed_form, next_node_id->elems, 33); FREE(next_node_id); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_forward_intercepted_htlc(&this_arg_conv, intercept_id_ref, next_hop_channel_id_ref, next_node_id_ref, amt_to_forward_msat); + *ret_conv = ChannelManager_forward_intercepted_htlc(&this_arg_conv, intercept_id_ref, &next_hop_channel_id_conv, next_node_id_ref, amt_to_forward_msat); return tag_ptr(ret_conv, true); } @@ -38705,16 +42598,17 @@ int8_tArray __attribute__((export_name("TS_ChannelManager_get_our_node_id"))) T return ret_arr; } -uint64_t __attribute__((export_name("TS_ChannelManager_accept_inbound_channel"))) TS_ChannelManager_accept_inbound_channel(uint64_t this_arg, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) { +uint64_t __attribute__((export_name("TS_ChannelManager_accept_inbound_channel"))) TS_ChannelManager_accept_inbound_channel(uint64_t this_arg, uint64_t temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t temporary_channel_id_arr[32]; - CHECK(temporary_channel_id->arr_len == 32); - memcpy(temporary_channel_id_arr, temporary_channel_id->elems, 32); FREE(temporary_channel_id); - uint8_t (*temporary_channel_id_ref)[32] = &temporary_channel_id_arr; + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); @@ -38722,20 +42616,21 @@ uint64_t __attribute__((export_name("TS_ChannelManager_accept_inbound_channel") CHECK(user_channel_id->arr_len == 16); memcpy(user_channel_id_ref.le_bytes, user_channel_id->elems, 16); FREE(user_channel_id); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_accept_inbound_channel(&this_arg_conv, temporary_channel_id_ref, counterparty_node_id_ref, user_channel_id_ref); + *ret_conv = ChannelManager_accept_inbound_channel(&this_arg_conv, &temporary_channel_id_conv, counterparty_node_id_ref, user_channel_id_ref); return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_ChannelManager_accept_inbound_channel_from_trusted_peer_0conf"))) TS_ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(uint64_t this_arg, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) { +uint64_t __attribute__((export_name("TS_ChannelManager_accept_inbound_channel_from_trusted_peer_0conf"))) TS_ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(uint64_t this_arg, uint64_t temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t temporary_channel_id_arr[32]; - CHECK(temporary_channel_id->arr_len == 32); - memcpy(temporary_channel_id_arr, temporary_channel_id->elems, 32); FREE(temporary_channel_id); - uint8_t (*temporary_channel_id_ref)[32] = &temporary_channel_id_arr; + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); @@ -38743,7 +42638,40 @@ uint64_t __attribute__((export_name("TS_ChannelManager_accept_inbound_channel_f CHECK(user_channel_id->arr_len == 16); memcpy(user_channel_id_ref.le_bytes, user_channel_id->elems, 16); FREE(user_channel_id); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(&this_arg_conv, temporary_channel_id_ref, counterparty_node_id_ref, user_channel_id_ref); + *ret_conv = ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(&this_arg_conv, &temporary_channel_id_conv, counterparty_node_id_ref, user_channel_id_ref); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_ChannelManager_create_offer_builder"))) TS_ChannelManager_create_offer_builder(uint64_t this_arg) { + LDKChannelManager this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = ChannelManager_create_offer_builder(&this_arg_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_ChannelManager_create_refund_builder"))) TS_ChannelManager_create_refund_builder(uint64_t this_arg, int64_t amount_msats, int64_t absolute_expiry, int8_tArray payment_id, uint64_t retry_strategy, uint64_t max_total_routing_fee_msat) { + LDKChannelManager this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKThirtyTwoBytes payment_id_ref; + CHECK(payment_id->arr_len == 32); + memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id); + void* retry_strategy_ptr = untag_ptr(retry_strategy); + CHECK_ACCESS(retry_strategy_ptr); + LDKRetry retry_strategy_conv = *(LDKRetry*)(retry_strategy_ptr); + retry_strategy_conv = Retry_clone((LDKRetry*)untag_ptr(retry_strategy)); + void* max_total_routing_fee_msat_ptr = untag_ptr(max_total_routing_fee_msat); + CHECK_ACCESS(max_total_routing_fee_msat_ptr); + LDKCOption_u64Z max_total_routing_fee_msat_conv = *(LDKCOption_u64Z*)(max_total_routing_fee_msat_ptr); + max_total_routing_fee_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(max_total_routing_fee_msat)); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = ChannelManager_create_refund_builder(&this_arg_conv, amount_msats, absolute_expiry, payment_id_ref, retry_strategy_conv, max_total_routing_fee_msat_conv); return tag_ptr(ret_conv, true); } @@ -38797,7 +42725,7 @@ uint64_t __attribute__((export_name("TS_ChannelManager_request_refund_payment") refund_conv.is_owned = ptr_is_owned(refund); CHECK_INNER_FIELD_ACCESS_OR_NULL(refund_conv); refund_conv.is_owned = false; - LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); *ret_conv = ChannelManager_request_refund_payment(&this_arg_conv, &refund_conv); return tag_ptr(ret_conv, true); } @@ -39060,6 +42988,17 @@ uint64_t __attribute__((export_name("TS_ChannelManager_as_OffersMessageHandler" return tag_ptr(ret_ret, true); } +uint64_t __attribute__((export_name("TS_ChannelManager_as_NodeIdLookUp"))) TS_ChannelManager_as_NodeIdLookUp(uint64_t this_arg) { + LDKChannelManager this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKNodeIdLookUp* ret_ret = MALLOC(sizeof(LDKNodeIdLookUp), "LDKNodeIdLookUp"); + *ret_ret = ChannelManager_as_NodeIdLookUp(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + uint64_t __attribute__((export_name("TS_provided_init_features"))) TS_provided_init_features(uint64_t config) { LDKUserConfig config_conv; config_conv.inner = untag_ptr(config); @@ -39742,6 +43681,20 @@ int8_tArray __attribute__((export_name("TS_DelayedPaymentBasepoint_to_public_ke return ret_arr; } +int8_tArray __attribute__((export_name("TS_DelayedPaymentBasepoint_derive_add_tweak"))) TS_DelayedPaymentBasepoint_derive_add_tweak(uint64_t this_arg, int8_tArray per_commitment_point) { + LDKDelayedPaymentBasepoint this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKPublicKey per_commitment_point_ref; + CHECK(per_commitment_point->arr_len == 33); + memcpy(per_commitment_point_ref.compressed_form, per_commitment_point->elems, 33); FREE(per_commitment_point); + int8_tArray ret_arr = init_int8_tArray(32, __LINE__); + memcpy(ret_arr->elems, DelayedPaymentBasepoint_derive_add_tweak(&this_arg_conv, per_commitment_point_ref).data, 32); + return ret_arr; +} + int8_tArray __attribute__((export_name("TS_DelayedPaymentBasepoint_write"))) TS_DelayedPaymentBasepoint_write(uint64_t obj) { LDKDelayedPaymentBasepoint obj_conv; obj_conv.inner = untag_ptr(obj); @@ -40022,6 +43975,20 @@ int8_tArray __attribute__((export_name("TS_HtlcBasepoint_to_public_key"))) TS_H return ret_arr; } +int8_tArray __attribute__((export_name("TS_HtlcBasepoint_derive_add_tweak"))) TS_HtlcBasepoint_derive_add_tweak(uint64_t this_arg, int8_tArray per_commitment_point) { + LDKHtlcBasepoint this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKPublicKey per_commitment_point_ref; + CHECK(per_commitment_point->arr_len == 33); + memcpy(per_commitment_point_ref.compressed_form, per_commitment_point->elems, 33); FREE(per_commitment_point); + int8_tArray ret_arr = init_int8_tArray(32, __LINE__); + memcpy(ret_arr->elems, HtlcBasepoint_derive_add_tweak(&this_arg_conv, per_commitment_point_ref).data, 32); + return ret_arr; +} + int8_tArray __attribute__((export_name("TS_HtlcBasepoint_write"))) TS_HtlcBasepoint_write(uint64_t obj) { LDKHtlcBasepoint obj_conv; obj_conv.inner = untag_ptr(obj); @@ -40194,6 +44161,19 @@ uint64_t __attribute__((export_name("TS_HtlcKey_read"))) TS_HtlcKey_read(int8_t return tag_ptr(ret_conv, true); } +int8_tArray __attribute__((export_name("TS_add_public_key_tweak"))) TS_add_public_key_tweak(int8_tArray base_point, int8_tArray tweak) { + LDKPublicKey base_point_ref; + CHECK(base_point->arr_len == 33); + memcpy(base_point_ref.compressed_form, base_point->elems, 33); FREE(base_point); + uint8_t tweak_arr[32]; + CHECK(tweak->arr_len == 32); + memcpy(tweak_arr, tweak->elems, 32); FREE(tweak); + uint8_t (*tweak_ref)[32] = &tweak_arr; + int8_tArray ret_arr = init_int8_tArray(33, __LINE__); + memcpy(ret_arr->elems, add_public_key_tweak(base_point_ref, tweak_ref).compressed_form, 33); + return ret_arr; +} + void __attribute__((export_name("TS_RevocationBasepoint_free"))) TS_RevocationBasepoint_free(uint64_t this_obj) { LDKRevocationBasepoint this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -40615,6 +44595,13 @@ uint64_t __attribute__((export_name("TS_DecodeError_unsupported_compression"))) return ret_ref; } +uint64_t __attribute__((export_name("TS_DecodeError_dangerous_value"))) TS_DecodeError_dangerous_value() { + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = DecodeError_dangerous_value(); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + int64_t __attribute__((export_name("TS_DecodeError_hash"))) TS_DecodeError_hash(uint64_t o) { LDKDecodeError* o_conv = (LDKDecodeError*)untag_ptr(o); int64_t ret_conv = DecodeError_hash(o_conv); @@ -40796,27 +44783,31 @@ void __attribute__((export_name("TS_ErrorMessage_free"))) TS_ErrorMessage_free( ErrorMessage_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_ErrorMessage_get_channel_id"))) TS_ErrorMessage_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_ErrorMessage_get_channel_id"))) TS_ErrorMessage_get_channel_id(uint64_t this_ptr) { LDKErrorMessage this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *ErrorMessage_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = ErrorMessage_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_ErrorMessage_set_channel_id"))) TS_ErrorMessage_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_ErrorMessage_set_channel_id"))) TS_ErrorMessage_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKErrorMessage this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - ErrorMessage_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ErrorMessage_set_channel_id(&this_ptr_conv, val_conv); } jstring __attribute__((export_name("TS_ErrorMessage_get_data"))) TS_ErrorMessage_get_data(uint64_t this_ptr) { @@ -40841,12 +44832,14 @@ void __attribute__((export_name("TS_ErrorMessage_set_data"))) TS_ErrorMessage_s ErrorMessage_set_data(&this_ptr_conv, val_conv); } -uint64_t __attribute__((export_name("TS_ErrorMessage_new"))) TS_ErrorMessage_new(int8_tArray channel_id_arg, jstring data_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_ErrorMessage_new"))) TS_ErrorMessage_new(uint64_t channel_id_arg, jstring data_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKStr data_arg_conv = str_ref_to_owned_c(data_arg); - LDKErrorMessage ret_var = ErrorMessage_new(channel_id_arg_ref, data_arg_conv); + LDKErrorMessage ret_var = ErrorMessage_new(channel_id_arg_conv, data_arg_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -40916,27 +44909,31 @@ void __attribute__((export_name("TS_WarningMessage_free"))) TS_WarningMessage_f WarningMessage_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_WarningMessage_get_channel_id"))) TS_WarningMessage_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_WarningMessage_get_channel_id"))) TS_WarningMessage_get_channel_id(uint64_t this_ptr) { LDKWarningMessage this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *WarningMessage_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = WarningMessage_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_WarningMessage_set_channel_id"))) TS_WarningMessage_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_WarningMessage_set_channel_id"))) TS_WarningMessage_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKWarningMessage this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - WarningMessage_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + WarningMessage_set_channel_id(&this_ptr_conv, val_conv); } jstring __attribute__((export_name("TS_WarningMessage_get_data"))) TS_WarningMessage_get_data(uint64_t this_ptr) { @@ -40961,12 +44958,14 @@ void __attribute__((export_name("TS_WarningMessage_set_data"))) TS_WarningMessa WarningMessage_set_data(&this_ptr_conv, val_conv); } -uint64_t __attribute__((export_name("TS_WarningMessage_new"))) TS_WarningMessage_new(int8_tArray channel_id_arg, jstring data_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_WarningMessage_new"))) TS_WarningMessage_new(uint64_t channel_id_arg, jstring data_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKStr data_arg_conv = str_ref_to_owned_c(data_arg); - LDKWarningMessage ret_var = WarningMessage_new(channel_id_arg_ref, data_arg_conv); + LDKWarningMessage ret_var = WarningMessage_new(channel_id_arg_conv, data_arg_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -41227,50 +45226,27 @@ jboolean __attribute__((export_name("TS_Pong_eq"))) TS_Pong_eq(uint64_t a, uint return ret_conv; } -void __attribute__((export_name("TS_OpenChannel_free"))) TS_OpenChannel_free(uint64_t this_obj) { - LDKOpenChannel this_obj_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_free"))) TS_CommonOpenChannelFields_free(uint64_t this_obj) { + LDKCommonOpenChannelFields this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); this_obj_conv.is_owned = ptr_is_owned(this_obj); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - OpenChannel_free(this_obj_conv); -} - -int8_tArray __attribute__((export_name("TS_OpenChannel_get_chain_hash"))) TS_OpenChannel_get_chain_hash(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *OpenChannel_get_chain_hash(&this_ptr_conv), 32); - return ret_arr; -} - -void __attribute__((export_name("TS_OpenChannel_set_chain_hash"))) TS_OpenChannel_set_chain_hash(uint64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - OpenChannel_set_chain_hash(&this_ptr_conv, val_ref); + CommonOpenChannelFields_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_OpenChannel_get_temporary_channel_id"))) TS_OpenChannel_get_temporary_channel_id(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +int8_tArray __attribute__((export_name("TS_CommonOpenChannelFields_get_chain_hash"))) TS_CommonOpenChannelFields_get_chain_hash(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *OpenChannel_get_temporary_channel_id(&this_ptr_conv), 32); + memcpy(ret_arr->elems, *CommonOpenChannelFields_get_chain_hash(&this_ptr_conv), 32); return ret_arr; } -void __attribute__((export_name("TS_OpenChannel_set_temporary_channel_id"))) TS_OpenChannel_set_temporary_channel_id(uint64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_chain_hash"))) TS_CommonOpenChannelFields_set_chain_hash(uint64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -41278,193 +45254,182 @@ void __attribute__((export_name("TS_OpenChannel_set_temporary_channel_id"))) TS LDKThirtyTwoBytes val_ref; CHECK(val->arr_len == 32); memcpy(val_ref.data, val->elems, 32); FREE(val); - OpenChannel_set_temporary_channel_id(&this_ptr_conv, val_ref); -} - -int64_t __attribute__((export_name("TS_OpenChannel_get_funding_satoshis"))) TS_OpenChannel_get_funding_satoshis(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_funding_satoshis(&this_ptr_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_OpenChannel_set_funding_satoshis"))) TS_OpenChannel_set_funding_satoshis(uint64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannel_set_funding_satoshis(&this_ptr_conv, val); + CommonOpenChannelFields_set_chain_hash(&this_ptr_conv, val_ref); } -int64_t __attribute__((export_name("TS_OpenChannel_get_push_msat"))) TS_OpenChannel_get_push_msat(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +uint64_t __attribute__((export_name("TS_CommonOpenChannelFields_get_temporary_channel_id"))) TS_CommonOpenChannelFields_get_temporary_channel_id(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_push_msat(&this_ptr_conv); - return ret_conv; + LDKChannelId ret_var = CommonOpenChannelFields_get_temporary_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_OpenChannel_set_push_msat"))) TS_OpenChannel_set_push_msat(uint64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_temporary_channel_id"))) TS_CommonOpenChannelFields_set_temporary_channel_id(uint64_t this_ptr, uint64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_push_msat(&this_ptr_conv, val); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + CommonOpenChannelFields_set_temporary_channel_id(&this_ptr_conv, val_conv); } -int64_t __attribute__((export_name("TS_OpenChannel_get_dust_limit_satoshis"))) TS_OpenChannel_get_dust_limit_satoshis(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +int64_t __attribute__((export_name("TS_CommonOpenChannelFields_get_funding_satoshis"))) TS_CommonOpenChannelFields_get_funding_satoshis(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_dust_limit_satoshis(&this_ptr_conv); + int64_t ret_conv = CommonOpenChannelFields_get_funding_satoshis(&this_ptr_conv); return ret_conv; } -void __attribute__((export_name("TS_OpenChannel_set_dust_limit_satoshis"))) TS_OpenChannel_set_dust_limit_satoshis(uint64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_funding_satoshis"))) TS_CommonOpenChannelFields_set_funding_satoshis(uint64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_dust_limit_satoshis(&this_ptr_conv, val); + CommonOpenChannelFields_set_funding_satoshis(&this_ptr_conv, val); } -int64_t __attribute__((export_name("TS_OpenChannel_get_max_htlc_value_in_flight_msat"))) TS_OpenChannel_get_max_htlc_value_in_flight_msat(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +int64_t __attribute__((export_name("TS_CommonOpenChannelFields_get_dust_limit_satoshis"))) TS_CommonOpenChannelFields_get_dust_limit_satoshis(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_max_htlc_value_in_flight_msat(&this_ptr_conv); + int64_t ret_conv = CommonOpenChannelFields_get_dust_limit_satoshis(&this_ptr_conv); return ret_conv; } -void __attribute__((export_name("TS_OpenChannel_set_max_htlc_value_in_flight_msat"))) TS_OpenChannel_set_max_htlc_value_in_flight_msat(uint64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_dust_limit_satoshis"))) TS_CommonOpenChannelFields_set_dust_limit_satoshis(uint64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); + CommonOpenChannelFields_set_dust_limit_satoshis(&this_ptr_conv, val); } -int64_t __attribute__((export_name("TS_OpenChannel_get_channel_reserve_satoshis"))) TS_OpenChannel_get_channel_reserve_satoshis(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +int64_t __attribute__((export_name("TS_CommonOpenChannelFields_get_max_htlc_value_in_flight_msat"))) TS_CommonOpenChannelFields_get_max_htlc_value_in_flight_msat(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_channel_reserve_satoshis(&this_ptr_conv); + int64_t ret_conv = CommonOpenChannelFields_get_max_htlc_value_in_flight_msat(&this_ptr_conv); return ret_conv; } -void __attribute__((export_name("TS_OpenChannel_set_channel_reserve_satoshis"))) TS_OpenChannel_set_channel_reserve_satoshis(uint64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_max_htlc_value_in_flight_msat"))) TS_CommonOpenChannelFields_set_max_htlc_value_in_flight_msat(uint64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_channel_reserve_satoshis(&this_ptr_conv, val); + CommonOpenChannelFields_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); } -int64_t __attribute__((export_name("TS_OpenChannel_get_htlc_minimum_msat"))) TS_OpenChannel_get_htlc_minimum_msat(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +int64_t __attribute__((export_name("TS_CommonOpenChannelFields_get_htlc_minimum_msat"))) TS_CommonOpenChannelFields_get_htlc_minimum_msat(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_htlc_minimum_msat(&this_ptr_conv); + int64_t ret_conv = CommonOpenChannelFields_get_htlc_minimum_msat(&this_ptr_conv); return ret_conv; } -void __attribute__((export_name("TS_OpenChannel_set_htlc_minimum_msat"))) TS_OpenChannel_set_htlc_minimum_msat(uint64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_htlc_minimum_msat"))) TS_CommonOpenChannelFields_set_htlc_minimum_msat(uint64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_htlc_minimum_msat(&this_ptr_conv, val); + CommonOpenChannelFields_set_htlc_minimum_msat(&this_ptr_conv, val); } -int32_t __attribute__((export_name("TS_OpenChannel_get_feerate_per_kw"))) TS_OpenChannel_get_feerate_per_kw(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +int32_t __attribute__((export_name("TS_CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight"))) TS_CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int32_t ret_conv = OpenChannel_get_feerate_per_kw(&this_ptr_conv); + int32_t ret_conv = CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight(&this_ptr_conv); return ret_conv; } -void __attribute__((export_name("TS_OpenChannel_set_feerate_per_kw"))) TS_OpenChannel_set_feerate_per_kw(uint64_t this_ptr, int32_t val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight"))) TS_CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight(uint64_t this_ptr, int32_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_feerate_per_kw(&this_ptr_conv, val); + CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight(&this_ptr_conv, val); } -int16_t __attribute__((export_name("TS_OpenChannel_get_to_self_delay"))) TS_OpenChannel_get_to_self_delay(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +int16_t __attribute__((export_name("TS_CommonOpenChannelFields_get_to_self_delay"))) TS_CommonOpenChannelFields_get_to_self_delay(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int16_t ret_conv = OpenChannel_get_to_self_delay(&this_ptr_conv); + int16_t ret_conv = CommonOpenChannelFields_get_to_self_delay(&this_ptr_conv); return ret_conv; } -void __attribute__((export_name("TS_OpenChannel_set_to_self_delay"))) TS_OpenChannel_set_to_self_delay(uint64_t this_ptr, int16_t val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_to_self_delay"))) TS_CommonOpenChannelFields_set_to_self_delay(uint64_t this_ptr, int16_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_to_self_delay(&this_ptr_conv, val); + CommonOpenChannelFields_set_to_self_delay(&this_ptr_conv, val); } -int16_t __attribute__((export_name("TS_OpenChannel_get_max_accepted_htlcs"))) TS_OpenChannel_get_max_accepted_htlcs(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +int16_t __attribute__((export_name("TS_CommonOpenChannelFields_get_max_accepted_htlcs"))) TS_CommonOpenChannelFields_get_max_accepted_htlcs(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int16_t ret_conv = OpenChannel_get_max_accepted_htlcs(&this_ptr_conv); + int16_t ret_conv = CommonOpenChannelFields_get_max_accepted_htlcs(&this_ptr_conv); return ret_conv; } -void __attribute__((export_name("TS_OpenChannel_set_max_accepted_htlcs"))) TS_OpenChannel_set_max_accepted_htlcs(uint64_t this_ptr, int16_t val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_max_accepted_htlcs"))) TS_CommonOpenChannelFields_set_max_accepted_htlcs(uint64_t this_ptr, int16_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_max_accepted_htlcs(&this_ptr_conv, val); + CommonOpenChannelFields_set_max_accepted_htlcs(&this_ptr_conv, val); } -int8_tArray __attribute__((export_name("TS_OpenChannel_get_funding_pubkey"))) TS_OpenChannel_get_funding_pubkey(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +int8_tArray __attribute__((export_name("TS_CommonOpenChannelFields_get_funding_pubkey"))) TS_CommonOpenChannelFields_get_funding_pubkey(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannel_get_funding_pubkey(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonOpenChannelFields_get_funding_pubkey(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void __attribute__((export_name("TS_OpenChannel_set_funding_pubkey"))) TS_OpenChannel_set_funding_pubkey(uint64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_funding_pubkey"))) TS_CommonOpenChannelFields_set_funding_pubkey(uint64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -41472,22 +45437,22 @@ void __attribute__((export_name("TS_OpenChannel_set_funding_pubkey"))) TS_OpenC LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannel_set_funding_pubkey(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_funding_pubkey(&this_ptr_conv, val_ref); } -int8_tArray __attribute__((export_name("TS_OpenChannel_get_revocation_basepoint"))) TS_OpenChannel_get_revocation_basepoint(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +int8_tArray __attribute__((export_name("TS_CommonOpenChannelFields_get_revocation_basepoint"))) TS_CommonOpenChannelFields_get_revocation_basepoint(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannel_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonOpenChannelFields_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void __attribute__((export_name("TS_OpenChannel_set_revocation_basepoint"))) TS_OpenChannel_set_revocation_basepoint(uint64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_revocation_basepoint"))) TS_CommonOpenChannelFields_set_revocation_basepoint(uint64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -41495,22 +45460,22 @@ void __attribute__((export_name("TS_OpenChannel_set_revocation_basepoint"))) TS LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannel_set_revocation_basepoint(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_revocation_basepoint(&this_ptr_conv, val_ref); } -int8_tArray __attribute__((export_name("TS_OpenChannel_get_payment_point"))) TS_OpenChannel_get_payment_point(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +int8_tArray __attribute__((export_name("TS_CommonOpenChannelFields_get_payment_basepoint"))) TS_CommonOpenChannelFields_get_payment_basepoint(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannel_get_payment_point(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonOpenChannelFields_get_payment_basepoint(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void __attribute__((export_name("TS_OpenChannel_set_payment_point"))) TS_OpenChannel_set_payment_point(uint64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_payment_basepoint"))) TS_CommonOpenChannelFields_set_payment_basepoint(uint64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -41518,22 +45483,22 @@ void __attribute__((export_name("TS_OpenChannel_set_payment_point"))) TS_OpenCh LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannel_set_payment_point(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_payment_basepoint(&this_ptr_conv, val_ref); } -int8_tArray __attribute__((export_name("TS_OpenChannel_get_delayed_payment_basepoint"))) TS_OpenChannel_get_delayed_payment_basepoint(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +int8_tArray __attribute__((export_name("TS_CommonOpenChannelFields_get_delayed_payment_basepoint"))) TS_CommonOpenChannelFields_get_delayed_payment_basepoint(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannel_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonOpenChannelFields_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void __attribute__((export_name("TS_OpenChannel_set_delayed_payment_basepoint"))) TS_OpenChannel_set_delayed_payment_basepoint(uint64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_delayed_payment_basepoint"))) TS_CommonOpenChannelFields_set_delayed_payment_basepoint(uint64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -41541,22 +45506,22 @@ void __attribute__((export_name("TS_OpenChannel_set_delayed_payment_basepoint") LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannel_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); } -int8_tArray __attribute__((export_name("TS_OpenChannel_get_htlc_basepoint"))) TS_OpenChannel_get_htlc_basepoint(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +int8_tArray __attribute__((export_name("TS_CommonOpenChannelFields_get_htlc_basepoint"))) TS_CommonOpenChannelFields_get_htlc_basepoint(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannel_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonOpenChannelFields_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void __attribute__((export_name("TS_OpenChannel_set_htlc_basepoint"))) TS_OpenChannel_set_htlc_basepoint(uint64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_htlc_basepoint"))) TS_CommonOpenChannelFields_set_htlc_basepoint(uint64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -41564,22 +45529,22 @@ void __attribute__((export_name("TS_OpenChannel_set_htlc_basepoint"))) TS_OpenC LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannel_set_htlc_basepoint(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_htlc_basepoint(&this_ptr_conv, val_ref); } -int8_tArray __attribute__((export_name("TS_OpenChannel_get_first_per_commitment_point"))) TS_OpenChannel_get_first_per_commitment_point(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +int8_tArray __attribute__((export_name("TS_CommonOpenChannelFields_get_first_per_commitment_point"))) TS_CommonOpenChannelFields_get_first_per_commitment_point(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannel_get_first_per_commitment_point(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonOpenChannelFields_get_first_per_commitment_point(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void __attribute__((export_name("TS_OpenChannel_set_first_per_commitment_point"))) TS_OpenChannel_set_first_per_commitment_point(uint64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_first_per_commitment_point"))) TS_CommonOpenChannelFields_set_first_per_commitment_point(uint64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -41587,42 +45552,42 @@ void __attribute__((export_name("TS_OpenChannel_set_first_per_commitment_point" LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannel_set_first_per_commitment_point(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_first_per_commitment_point(&this_ptr_conv, val_ref); } -int8_t __attribute__((export_name("TS_OpenChannel_get_channel_flags"))) TS_OpenChannel_get_channel_flags(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +int8_t __attribute__((export_name("TS_CommonOpenChannelFields_get_channel_flags"))) TS_CommonOpenChannelFields_get_channel_flags(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_t ret_conv = OpenChannel_get_channel_flags(&this_ptr_conv); + int8_t ret_conv = CommonOpenChannelFields_get_channel_flags(&this_ptr_conv); return ret_conv; } -void __attribute__((export_name("TS_OpenChannel_set_channel_flags"))) TS_OpenChannel_set_channel_flags(uint64_t this_ptr, int8_t val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_channel_flags"))) TS_CommonOpenChannelFields_set_channel_flags(uint64_t this_ptr, int8_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_channel_flags(&this_ptr_conv, val); + CommonOpenChannelFields_set_channel_flags(&this_ptr_conv, val); } -uint64_t __attribute__((export_name("TS_OpenChannel_get_shutdown_scriptpubkey"))) TS_OpenChannel_get_shutdown_scriptpubkey(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +uint64_t __attribute__((export_name("TS_CommonOpenChannelFields_get_shutdown_scriptpubkey"))) TS_CommonOpenChannelFields_get_shutdown_scriptpubkey(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ"); - *ret_copy = OpenChannel_get_shutdown_scriptpubkey(&this_ptr_conv); + *ret_copy = CommonOpenChannelFields_get_shutdown_scriptpubkey(&this_ptr_conv); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -void __attribute__((export_name("TS_OpenChannel_set_shutdown_scriptpubkey"))) TS_OpenChannel_set_shutdown_scriptpubkey(uint64_t this_ptr, uint64_t val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_shutdown_scriptpubkey"))) TS_CommonOpenChannelFields_set_shutdown_scriptpubkey(uint64_t this_ptr, uint64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -41631,24 +45596,24 @@ void __attribute__((export_name("TS_OpenChannel_set_shutdown_scriptpubkey"))) T CHECK_ACCESS(val_ptr); LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr); val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val)); - OpenChannel_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); + CommonOpenChannelFields_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); } -uint64_t __attribute__((export_name("TS_OpenChannel_get_channel_type"))) TS_OpenChannel_get_channel_type(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +uint64_t __attribute__((export_name("TS_CommonOpenChannelFields_get_channel_type"))) TS_CommonOpenChannelFields_get_channel_type(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures ret_var = OpenChannel_get_channel_type(&this_ptr_conv); + LDKChannelTypeFeatures ret_var = CommonOpenChannelFields_get_channel_type(&this_ptr_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -void __attribute__((export_name("TS_OpenChannel_set_channel_type"))) TS_OpenChannel_set_channel_type(uint64_t this_ptr, uint64_t val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_channel_type"))) TS_CommonOpenChannelFields_set_channel_type(uint64_t this_ptr, uint64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -41658,25 +45623,27 @@ void __attribute__((export_name("TS_OpenChannel_set_channel_type"))) TS_OpenCha val_conv.is_owned = ptr_is_owned(val); CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); val_conv = ChannelTypeFeatures_clone(&val_conv); - OpenChannel_set_channel_type(&this_ptr_conv, val_conv); + CommonOpenChannelFields_set_channel_type(&this_ptr_conv, val_conv); } -uint64_t __attribute__((export_name("TS_OpenChannel_new"))) TS_OpenChannel_new(int8_tArray chain_hash_arg, int8_tArray temporary_channel_id_arg, int64_t funding_satoshis_arg, int64_t push_msat_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t channel_reserve_satoshis_arg, int64_t htlc_minimum_msat_arg, int32_t feerate_per_kw_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_point_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_t channel_flags_arg, uint64_t shutdown_scriptpubkey_arg, uint64_t channel_type_arg) { +uint64_t __attribute__((export_name("TS_CommonOpenChannelFields_new"))) TS_CommonOpenChannelFields_new(int8_tArray chain_hash_arg, uint64_t temporary_channel_id_arg, int64_t funding_satoshis_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int32_t commitment_feerate_sat_per_1000_weight_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_t channel_flags_arg, uint64_t shutdown_scriptpubkey_arg, uint64_t channel_type_arg) { LDKThirtyTwoBytes chain_hash_arg_ref; CHECK(chain_hash_arg->arr_len == 32); memcpy(chain_hash_arg_ref.data, chain_hash_arg->elems, 32); FREE(chain_hash_arg); - LDKThirtyTwoBytes temporary_channel_id_arg_ref; - CHECK(temporary_channel_id_arg->arr_len == 32); - memcpy(temporary_channel_id_arg_ref.data, temporary_channel_id_arg->elems, 32); FREE(temporary_channel_id_arg); + LDKChannelId temporary_channel_id_arg_conv; + temporary_channel_id_arg_conv.inner = untag_ptr(temporary_channel_id_arg); + temporary_channel_id_arg_conv.is_owned = ptr_is_owned(temporary_channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_arg_conv); + temporary_channel_id_arg_conv = ChannelId_clone(&temporary_channel_id_arg_conv); LDKPublicKey funding_pubkey_arg_ref; CHECK(funding_pubkey_arg->arr_len == 33); memcpy(funding_pubkey_arg_ref.compressed_form, funding_pubkey_arg->elems, 33); FREE(funding_pubkey_arg); LDKPublicKey revocation_basepoint_arg_ref; CHECK(revocation_basepoint_arg->arr_len == 33); memcpy(revocation_basepoint_arg_ref.compressed_form, revocation_basepoint_arg->elems, 33); FREE(revocation_basepoint_arg); - LDKPublicKey payment_point_arg_ref; - CHECK(payment_point_arg->arr_len == 33); - memcpy(payment_point_arg_ref.compressed_form, payment_point_arg->elems, 33); FREE(payment_point_arg); + LDKPublicKey payment_basepoint_arg_ref; + CHECK(payment_basepoint_arg->arr_len == 33); + memcpy(payment_basepoint_arg_ref.compressed_form, payment_basepoint_arg->elems, 33); FREE(payment_basepoint_arg); LDKPublicKey delayed_payment_basepoint_arg_ref; CHECK(delayed_payment_basepoint_arg->arr_len == 33); memcpy(delayed_payment_basepoint_arg_ref.compressed_form, delayed_payment_basepoint_arg->elems, 33); FREE(delayed_payment_basepoint_arg); @@ -41695,7 +45662,148 @@ uint64_t __attribute__((export_name("TS_OpenChannel_new"))) TS_OpenChannel_new( channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv); channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv); - LDKOpenChannel ret_var = OpenChannel_new(chain_hash_arg_ref, temporary_channel_id_arg_ref, funding_satoshis_arg, push_msat_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, feerate_per_kw_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_point_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, channel_flags_arg, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv); + LDKCommonOpenChannelFields ret_var = CommonOpenChannelFields_new(chain_hash_arg_ref, temporary_channel_id_arg_conv, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, commitment_feerate_sat_per_1000_weight_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, channel_flags_arg, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t CommonOpenChannelFields_clone_ptr(LDKCommonOpenChannelFields *NONNULL_PTR arg) { + LDKCommonOpenChannelFields ret_var = CommonOpenChannelFields_clone(arg); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t __attribute__((export_name("TS_CommonOpenChannelFields_clone_ptr"))) TS_CommonOpenChannelFields_clone_ptr(uint64_t arg) { + LDKCommonOpenChannelFields arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = CommonOpenChannelFields_clone_ptr(&arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CommonOpenChannelFields_clone"))) TS_CommonOpenChannelFields_clone(uint64_t orig) { + LDKCommonOpenChannelFields orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKCommonOpenChannelFields ret_var = CommonOpenChannelFields_clone(&orig_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t __attribute__((export_name("TS_CommonOpenChannelFields_hash"))) TS_CommonOpenChannelFields_hash(uint64_t o) { + LDKCommonOpenChannelFields o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = CommonOpenChannelFields_hash(&o_conv); + return ret_conv; +} + +jboolean __attribute__((export_name("TS_CommonOpenChannelFields_eq"))) TS_CommonOpenChannelFields_eq(uint64_t a, uint64_t b) { + LDKCommonOpenChannelFields a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKCommonOpenChannelFields b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = CommonOpenChannelFields_eq(&a_conv, &b_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_OpenChannel_free"))) TS_OpenChannel_free(uint64_t this_obj) { + LDKOpenChannel this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + OpenChannel_free(this_obj_conv); +} + +uint64_t __attribute__((export_name("TS_OpenChannel_get_common_fields"))) TS_OpenChannel_get_common_fields(uint64_t this_ptr) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCommonOpenChannelFields ret_var = OpenChannel_get_common_fields(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void __attribute__((export_name("TS_OpenChannel_set_common_fields"))) TS_OpenChannel_set_common_fields(uint64_t this_ptr, uint64_t val) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCommonOpenChannelFields val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = CommonOpenChannelFields_clone(&val_conv); + OpenChannel_set_common_fields(&this_ptr_conv, val_conv); +} + +int64_t __attribute__((export_name("TS_OpenChannel_get_push_msat"))) TS_OpenChannel_get_push_msat(uint64_t this_ptr) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int64_t ret_conv = OpenChannel_get_push_msat(&this_ptr_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_OpenChannel_set_push_msat"))) TS_OpenChannel_set_push_msat(uint64_t this_ptr, int64_t val) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + OpenChannel_set_push_msat(&this_ptr_conv, val); +} + +int64_t __attribute__((export_name("TS_OpenChannel_get_channel_reserve_satoshis"))) TS_OpenChannel_get_channel_reserve_satoshis(uint64_t this_ptr) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int64_t ret_conv = OpenChannel_get_channel_reserve_satoshis(&this_ptr_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_OpenChannel_set_channel_reserve_satoshis"))) TS_OpenChannel_set_channel_reserve_satoshis(uint64_t this_ptr, int64_t val) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + OpenChannel_set_channel_reserve_satoshis(&this_ptr_conv, val); +} + +uint64_t __attribute__((export_name("TS_OpenChannel_new"))) TS_OpenChannel_new(uint64_t common_fields_arg, int64_t push_msat_arg, int64_t channel_reserve_satoshis_arg) { + LDKCommonOpenChannelFields common_fields_arg_conv; + common_fields_arg_conv.inner = untag_ptr(common_fields_arg); + common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv); + common_fields_arg_conv = CommonOpenChannelFields_clone(&common_fields_arg_conv); + LDKOpenChannel ret_var = OpenChannel_new(common_fields_arg_conv, push_msat_arg, channel_reserve_satoshis_arg); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -41765,50 +45873,31 @@ void __attribute__((export_name("TS_OpenChannelV2_free"))) TS_OpenChannelV2_fre OpenChannelV2_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_chain_hash"))) TS_OpenChannelV2_get_chain_hash(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_OpenChannelV2_get_common_fields"))) TS_OpenChannelV2_get_common_fields(uint64_t this_ptr) { LDKOpenChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *OpenChannelV2_get_chain_hash(&this_ptr_conv), 32); - return ret_arr; -} - -void __attribute__((export_name("TS_OpenChannelV2_set_chain_hash"))) TS_OpenChannelV2_set_chain_hash(uint64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - OpenChannelV2_set_chain_hash(&this_ptr_conv, val_ref); -} - -int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_temporary_channel_id"))) TS_OpenChannelV2_get_temporary_channel_id(uint64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *OpenChannelV2_get_temporary_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKCommonOpenChannelFields ret_var = OpenChannelV2_get_common_fields(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_OpenChannelV2_set_temporary_channel_id"))) TS_OpenChannelV2_set_temporary_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_OpenChannelV2_set_common_fields"))) TS_OpenChannelV2_set_common_fields(uint64_t this_ptr, uint64_t val) { LDKOpenChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - OpenChannelV2_set_temporary_channel_id(&this_ptr_conv, val_ref); + LDKCommonOpenChannelFields val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = CommonOpenChannelFields_clone(&val_conv); + OpenChannelV2_set_common_fields(&this_ptr_conv, val_conv); } int32_t __attribute__((export_name("TS_OpenChannelV2_get_funding_feerate_sat_per_1000_weight"))) TS_OpenChannelV2_get_funding_feerate_sat_per_1000_weight(uint64_t this_ptr) { @@ -41830,139 +45919,6 @@ void __attribute__((export_name("TS_OpenChannelV2_set_funding_feerate_sat_per_1 OpenChannelV2_set_funding_feerate_sat_per_1000_weight(&this_ptr_conv, val); } -int32_t __attribute__((export_name("TS_OpenChannelV2_get_commitment_feerate_sat_per_1000_weight"))) TS_OpenChannelV2_get_commitment_feerate_sat_per_1000_weight(uint64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int32_t ret_conv = OpenChannelV2_get_commitment_feerate_sat_per_1000_weight(&this_ptr_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_OpenChannelV2_set_commitment_feerate_sat_per_1000_weight"))) TS_OpenChannelV2_set_commitment_feerate_sat_per_1000_weight(uint64_t this_ptr, int32_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_commitment_feerate_sat_per_1000_weight(&this_ptr_conv, val); -} - -int64_t __attribute__((export_name("TS_OpenChannelV2_get_funding_satoshis"))) TS_OpenChannelV2_get_funding_satoshis(uint64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannelV2_get_funding_satoshis(&this_ptr_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_OpenChannelV2_set_funding_satoshis"))) TS_OpenChannelV2_set_funding_satoshis(uint64_t this_ptr, int64_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_funding_satoshis(&this_ptr_conv, val); -} - -int64_t __attribute__((export_name("TS_OpenChannelV2_get_dust_limit_satoshis"))) TS_OpenChannelV2_get_dust_limit_satoshis(uint64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannelV2_get_dust_limit_satoshis(&this_ptr_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_OpenChannelV2_set_dust_limit_satoshis"))) TS_OpenChannelV2_set_dust_limit_satoshis(uint64_t this_ptr, int64_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_dust_limit_satoshis(&this_ptr_conv, val); -} - -int64_t __attribute__((export_name("TS_OpenChannelV2_get_max_htlc_value_in_flight_msat"))) TS_OpenChannelV2_get_max_htlc_value_in_flight_msat(uint64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannelV2_get_max_htlc_value_in_flight_msat(&this_ptr_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_OpenChannelV2_set_max_htlc_value_in_flight_msat"))) TS_OpenChannelV2_set_max_htlc_value_in_flight_msat(uint64_t this_ptr, int64_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); -} - -int64_t __attribute__((export_name("TS_OpenChannelV2_get_htlc_minimum_msat"))) TS_OpenChannelV2_get_htlc_minimum_msat(uint64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannelV2_get_htlc_minimum_msat(&this_ptr_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_OpenChannelV2_set_htlc_minimum_msat"))) TS_OpenChannelV2_set_htlc_minimum_msat(uint64_t this_ptr, int64_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_htlc_minimum_msat(&this_ptr_conv, val); -} - -int16_t __attribute__((export_name("TS_OpenChannelV2_get_to_self_delay"))) TS_OpenChannelV2_get_to_self_delay(uint64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int16_t ret_conv = OpenChannelV2_get_to_self_delay(&this_ptr_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_OpenChannelV2_set_to_self_delay"))) TS_OpenChannelV2_set_to_self_delay(uint64_t this_ptr, int16_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_to_self_delay(&this_ptr_conv, val); -} - -int16_t __attribute__((export_name("TS_OpenChannelV2_get_max_accepted_htlcs"))) TS_OpenChannelV2_get_max_accepted_htlcs(uint64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int16_t ret_conv = OpenChannelV2_get_max_accepted_htlcs(&this_ptr_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_OpenChannelV2_set_max_accepted_htlcs"))) TS_OpenChannelV2_set_max_accepted_htlcs(uint64_t this_ptr, int16_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_max_accepted_htlcs(&this_ptr_conv, val); -} - int32_t __attribute__((export_name("TS_OpenChannelV2_get_locktime"))) TS_OpenChannelV2_get_locktime(uint64_t this_ptr) { LDKOpenChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -41982,144 +45938,6 @@ void __attribute__((export_name("TS_OpenChannelV2_set_locktime"))) TS_OpenChann OpenChannelV2_set_locktime(&this_ptr_conv, val); } -int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_funding_pubkey"))) TS_OpenChannelV2_get_funding_pubkey(uint64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannelV2_get_funding_pubkey(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void __attribute__((export_name("TS_OpenChannelV2_set_funding_pubkey"))) TS_OpenChannelV2_set_funding_pubkey(uint64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannelV2_set_funding_pubkey(&this_ptr_conv, val_ref); -} - -int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_revocation_basepoint"))) TS_OpenChannelV2_get_revocation_basepoint(uint64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannelV2_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void __attribute__((export_name("TS_OpenChannelV2_set_revocation_basepoint"))) TS_OpenChannelV2_set_revocation_basepoint(uint64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannelV2_set_revocation_basepoint(&this_ptr_conv, val_ref); -} - -int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_payment_basepoint"))) TS_OpenChannelV2_get_payment_basepoint(uint64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannelV2_get_payment_basepoint(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void __attribute__((export_name("TS_OpenChannelV2_set_payment_basepoint"))) TS_OpenChannelV2_set_payment_basepoint(uint64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannelV2_set_payment_basepoint(&this_ptr_conv, val_ref); -} - -int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_delayed_payment_basepoint"))) TS_OpenChannelV2_get_delayed_payment_basepoint(uint64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannelV2_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void __attribute__((export_name("TS_OpenChannelV2_set_delayed_payment_basepoint"))) TS_OpenChannelV2_set_delayed_payment_basepoint(uint64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannelV2_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); -} - -int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_htlc_basepoint"))) TS_OpenChannelV2_get_htlc_basepoint(uint64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannelV2_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void __attribute__((export_name("TS_OpenChannelV2_set_htlc_basepoint"))) TS_OpenChannelV2_set_htlc_basepoint(uint64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannelV2_set_htlc_basepoint(&this_ptr_conv, val_ref); -} - -int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_first_per_commitment_point"))) TS_OpenChannelV2_get_first_per_commitment_point(uint64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannelV2_get_first_per_commitment_point(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void __attribute__((export_name("TS_OpenChannelV2_set_first_per_commitment_point"))) TS_OpenChannelV2_set_first_per_commitment_point(uint64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannelV2_set_first_per_commitment_point(&this_ptr_conv, val_ref); -} - int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_second_per_commitment_point"))) TS_OpenChannelV2_get_second_per_commitment_point(uint64_t this_ptr) { LDKOpenChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -42143,77 +45961,6 @@ void __attribute__((export_name("TS_OpenChannelV2_set_second_per_commitment_poi OpenChannelV2_set_second_per_commitment_point(&this_ptr_conv, val_ref); } -int8_t __attribute__((export_name("TS_OpenChannelV2_get_channel_flags"))) TS_OpenChannelV2_get_channel_flags(uint64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_t ret_conv = OpenChannelV2_get_channel_flags(&this_ptr_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_OpenChannelV2_set_channel_flags"))) TS_OpenChannelV2_set_channel_flags(uint64_t this_ptr, int8_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_channel_flags(&this_ptr_conv, val); -} - -uint64_t __attribute__((export_name("TS_OpenChannelV2_get_shutdown_scriptpubkey"))) TS_OpenChannelV2_get_shutdown_scriptpubkey(uint64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ"); - *ret_copy = OpenChannelV2_get_shutdown_scriptpubkey(&this_ptr_conv); - uint64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -void __attribute__((export_name("TS_OpenChannelV2_set_shutdown_scriptpubkey"))) TS_OpenChannelV2_set_shutdown_scriptpubkey(uint64_t this_ptr, uint64_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - void* val_ptr = untag_ptr(val); - CHECK_ACCESS(val_ptr); - LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr); - val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val)); - OpenChannelV2_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); -} - -uint64_t __attribute__((export_name("TS_OpenChannelV2_get_channel_type"))) TS_OpenChannelV2_get_channel_type(uint64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures ret_var = OpenChannelV2_get_channel_type(&this_ptr_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -void __attribute__((export_name("TS_OpenChannelV2_set_channel_type"))) TS_OpenChannelV2_set_channel_type(uint64_t this_ptr, uint64_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures val_conv; - val_conv.inner = untag_ptr(val); - val_conv.is_owned = ptr_is_owned(val); - CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); - val_conv = ChannelTypeFeatures_clone(&val_conv); - OpenChannelV2_set_channel_type(&this_ptr_conv, val_conv); -} - uint32_t __attribute__((export_name("TS_OpenChannelV2_get_require_confirmed_inputs"))) TS_OpenChannelV2_get_require_confirmed_inputs(uint64_t this_ptr) { LDKOpenChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -42234,45 +45981,17 @@ void __attribute__((export_name("TS_OpenChannelV2_set_require_confirmed_inputs" OpenChannelV2_set_require_confirmed_inputs(&this_ptr_conv, val_conv); } -uint64_t __attribute__((export_name("TS_OpenChannelV2_new"))) TS_OpenChannelV2_new(int8_tArray chain_hash_arg, int8_tArray temporary_channel_id_arg, int32_t funding_feerate_sat_per_1000_weight_arg, int32_t commitment_feerate_sat_per_1000_weight_arg, int64_t funding_satoshis_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int32_t locktime_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_tArray second_per_commitment_point_arg, int8_t channel_flags_arg, uint64_t shutdown_scriptpubkey_arg, uint64_t channel_type_arg, uint32_t require_confirmed_inputs_arg) { - LDKThirtyTwoBytes chain_hash_arg_ref; - CHECK(chain_hash_arg->arr_len == 32); - memcpy(chain_hash_arg_ref.data, chain_hash_arg->elems, 32); FREE(chain_hash_arg); - LDKThirtyTwoBytes temporary_channel_id_arg_ref; - CHECK(temporary_channel_id_arg->arr_len == 32); - memcpy(temporary_channel_id_arg_ref.data, temporary_channel_id_arg->elems, 32); FREE(temporary_channel_id_arg); - LDKPublicKey funding_pubkey_arg_ref; - CHECK(funding_pubkey_arg->arr_len == 33); - memcpy(funding_pubkey_arg_ref.compressed_form, funding_pubkey_arg->elems, 33); FREE(funding_pubkey_arg); - LDKPublicKey revocation_basepoint_arg_ref; - CHECK(revocation_basepoint_arg->arr_len == 33); - memcpy(revocation_basepoint_arg_ref.compressed_form, revocation_basepoint_arg->elems, 33); FREE(revocation_basepoint_arg); - LDKPublicKey payment_basepoint_arg_ref; - CHECK(payment_basepoint_arg->arr_len == 33); - memcpy(payment_basepoint_arg_ref.compressed_form, payment_basepoint_arg->elems, 33); FREE(payment_basepoint_arg); - LDKPublicKey delayed_payment_basepoint_arg_ref; - CHECK(delayed_payment_basepoint_arg->arr_len == 33); - memcpy(delayed_payment_basepoint_arg_ref.compressed_form, delayed_payment_basepoint_arg->elems, 33); FREE(delayed_payment_basepoint_arg); - LDKPublicKey htlc_basepoint_arg_ref; - CHECK(htlc_basepoint_arg->arr_len == 33); - memcpy(htlc_basepoint_arg_ref.compressed_form, htlc_basepoint_arg->elems, 33); FREE(htlc_basepoint_arg); - LDKPublicKey first_per_commitment_point_arg_ref; - CHECK(first_per_commitment_point_arg->arr_len == 33); - memcpy(first_per_commitment_point_arg_ref.compressed_form, first_per_commitment_point_arg->elems, 33); FREE(first_per_commitment_point_arg); +uint64_t __attribute__((export_name("TS_OpenChannelV2_new"))) TS_OpenChannelV2_new(uint64_t common_fields_arg, int32_t funding_feerate_sat_per_1000_weight_arg, int32_t locktime_arg, int8_tArray second_per_commitment_point_arg, uint32_t require_confirmed_inputs_arg) { + LDKCommonOpenChannelFields common_fields_arg_conv; + common_fields_arg_conv.inner = untag_ptr(common_fields_arg); + common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv); + common_fields_arg_conv = CommonOpenChannelFields_clone(&common_fields_arg_conv); LDKPublicKey second_per_commitment_point_arg_ref; CHECK(second_per_commitment_point_arg->arr_len == 33); memcpy(second_per_commitment_point_arg_ref.compressed_form, second_per_commitment_point_arg->elems, 33); FREE(second_per_commitment_point_arg); - void* shutdown_scriptpubkey_arg_ptr = untag_ptr(shutdown_scriptpubkey_arg); - CHECK_ACCESS(shutdown_scriptpubkey_arg_ptr); - LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg_conv = *(LDKCOption_CVec_u8ZZ*)(shutdown_scriptpubkey_arg_ptr); - shutdown_scriptpubkey_arg_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(shutdown_scriptpubkey_arg)); - LDKChannelTypeFeatures channel_type_arg_conv; - channel_type_arg_conv.inner = untag_ptr(channel_type_arg); - channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv); - channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv); LDKCOption_NoneZ require_confirmed_inputs_arg_conv = LDKCOption_NoneZ_from_js(require_confirmed_inputs_arg); - LDKOpenChannelV2 ret_var = OpenChannelV2_new(chain_hash_arg_ref, temporary_channel_id_arg_ref, funding_feerate_sat_per_1000_weight_arg, commitment_feerate_sat_per_1000_weight_arg, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, to_self_delay_arg, max_accepted_htlcs_arg, locktime_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, second_per_commitment_point_arg_ref, channel_flags_arg, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv, require_confirmed_inputs_arg_conv); + LDKOpenChannelV2 ret_var = OpenChannelV2_new(common_fields_arg_conv, funding_feerate_sat_per_1000_weight_arg, locktime_arg, second_per_commitment_point_arg_ref, require_confirmed_inputs_arg_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -42334,183 +46053,168 @@ jboolean __attribute__((export_name("TS_OpenChannelV2_eq"))) TS_OpenChannelV2_e return ret_conv; } -void __attribute__((export_name("TS_AcceptChannel_free"))) TS_AcceptChannel_free(uint64_t this_obj) { - LDKAcceptChannel this_obj_conv; +void __attribute__((export_name("TS_CommonAcceptChannelFields_free"))) TS_CommonAcceptChannelFields_free(uint64_t this_obj) { + LDKCommonAcceptChannelFields this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); this_obj_conv.is_owned = ptr_is_owned(this_obj); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - AcceptChannel_free(this_obj_conv); + CommonAcceptChannelFields_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_AcceptChannel_get_temporary_channel_id"))) TS_AcceptChannel_get_temporary_channel_id(uint64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +uint64_t __attribute__((export_name("TS_CommonAcceptChannelFields_get_temporary_channel_id"))) TS_CommonAcceptChannelFields_get_temporary_channel_id(uint64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *AcceptChannel_get_temporary_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = CommonAcceptChannelFields_get_temporary_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_AcceptChannel_set_temporary_channel_id"))) TS_AcceptChannel_set_temporary_channel_id(uint64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonAcceptChannelFields_set_temporary_channel_id"))) TS_CommonAcceptChannelFields_set_temporary_channel_id(uint64_t this_ptr, uint64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - AcceptChannel_set_temporary_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + CommonAcceptChannelFields_set_temporary_channel_id(&this_ptr_conv, val_conv); } -int64_t __attribute__((export_name("TS_AcceptChannel_get_dust_limit_satoshis"))) TS_AcceptChannel_get_dust_limit_satoshis(uint64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int64_t __attribute__((export_name("TS_CommonAcceptChannelFields_get_dust_limit_satoshis"))) TS_CommonAcceptChannelFields_get_dust_limit_satoshis(uint64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannel_get_dust_limit_satoshis(&this_ptr_conv); + int64_t ret_conv = CommonAcceptChannelFields_get_dust_limit_satoshis(&this_ptr_conv); return ret_conv; } -void __attribute__((export_name("TS_AcceptChannel_set_dust_limit_satoshis"))) TS_AcceptChannel_set_dust_limit_satoshis(uint64_t this_ptr, int64_t val) { - LDKAcceptChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonAcceptChannelFields_set_dust_limit_satoshis"))) TS_CommonAcceptChannelFields_set_dust_limit_satoshis(uint64_t this_ptr, int64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_dust_limit_satoshis(&this_ptr_conv, val); + CommonAcceptChannelFields_set_dust_limit_satoshis(&this_ptr_conv, val); } -int64_t __attribute__((export_name("TS_AcceptChannel_get_max_htlc_value_in_flight_msat"))) TS_AcceptChannel_get_max_htlc_value_in_flight_msat(uint64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int64_t __attribute__((export_name("TS_CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat"))) TS_CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat(uint64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannel_get_max_htlc_value_in_flight_msat(&this_ptr_conv); + int64_t ret_conv = CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat(&this_ptr_conv); return ret_conv; } -void __attribute__((export_name("TS_AcceptChannel_set_max_htlc_value_in_flight_msat"))) TS_AcceptChannel_set_max_htlc_value_in_flight_msat(uint64_t this_ptr, int64_t val) { - LDKAcceptChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat"))) TS_CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat(uint64_t this_ptr, int64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); + CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); } -int64_t __attribute__((export_name("TS_AcceptChannel_get_channel_reserve_satoshis"))) TS_AcceptChannel_get_channel_reserve_satoshis(uint64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int64_t __attribute__((export_name("TS_CommonAcceptChannelFields_get_htlc_minimum_msat"))) TS_CommonAcceptChannelFields_get_htlc_minimum_msat(uint64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannel_get_channel_reserve_satoshis(&this_ptr_conv); + int64_t ret_conv = CommonAcceptChannelFields_get_htlc_minimum_msat(&this_ptr_conv); return ret_conv; } -void __attribute__((export_name("TS_AcceptChannel_set_channel_reserve_satoshis"))) TS_AcceptChannel_set_channel_reserve_satoshis(uint64_t this_ptr, int64_t val) { - LDKAcceptChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonAcceptChannelFields_set_htlc_minimum_msat"))) TS_CommonAcceptChannelFields_set_htlc_minimum_msat(uint64_t this_ptr, int64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_channel_reserve_satoshis(&this_ptr_conv, val); + CommonAcceptChannelFields_set_htlc_minimum_msat(&this_ptr_conv, val); } -int64_t __attribute__((export_name("TS_AcceptChannel_get_htlc_minimum_msat"))) TS_AcceptChannel_get_htlc_minimum_msat(uint64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int32_t __attribute__((export_name("TS_CommonAcceptChannelFields_get_minimum_depth"))) TS_CommonAcceptChannelFields_get_minimum_depth(uint64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannel_get_htlc_minimum_msat(&this_ptr_conv); + int32_t ret_conv = CommonAcceptChannelFields_get_minimum_depth(&this_ptr_conv); return ret_conv; } -void __attribute__((export_name("TS_AcceptChannel_set_htlc_minimum_msat"))) TS_AcceptChannel_set_htlc_minimum_msat(uint64_t this_ptr, int64_t val) { - LDKAcceptChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonAcceptChannelFields_set_minimum_depth"))) TS_CommonAcceptChannelFields_set_minimum_depth(uint64_t this_ptr, int32_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_htlc_minimum_msat(&this_ptr_conv, val); + CommonAcceptChannelFields_set_minimum_depth(&this_ptr_conv, val); } -int32_t __attribute__((export_name("TS_AcceptChannel_get_minimum_depth"))) TS_AcceptChannel_get_minimum_depth(uint64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int16_t __attribute__((export_name("TS_CommonAcceptChannelFields_get_to_self_delay"))) TS_CommonAcceptChannelFields_get_to_self_delay(uint64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int32_t ret_conv = AcceptChannel_get_minimum_depth(&this_ptr_conv); + int16_t ret_conv = CommonAcceptChannelFields_get_to_self_delay(&this_ptr_conv); return ret_conv; } -void __attribute__((export_name("TS_AcceptChannel_set_minimum_depth"))) TS_AcceptChannel_set_minimum_depth(uint64_t this_ptr, int32_t val) { - LDKAcceptChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonAcceptChannelFields_set_to_self_delay"))) TS_CommonAcceptChannelFields_set_to_self_delay(uint64_t this_ptr, int16_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_minimum_depth(&this_ptr_conv, val); + CommonAcceptChannelFields_set_to_self_delay(&this_ptr_conv, val); } -int16_t __attribute__((export_name("TS_AcceptChannel_get_to_self_delay"))) TS_AcceptChannel_get_to_self_delay(uint64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int16_t __attribute__((export_name("TS_CommonAcceptChannelFields_get_max_accepted_htlcs"))) TS_CommonAcceptChannelFields_get_max_accepted_htlcs(uint64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int16_t ret_conv = AcceptChannel_get_to_self_delay(&this_ptr_conv); + int16_t ret_conv = CommonAcceptChannelFields_get_max_accepted_htlcs(&this_ptr_conv); return ret_conv; } -void __attribute__((export_name("TS_AcceptChannel_set_to_self_delay"))) TS_AcceptChannel_set_to_self_delay(uint64_t this_ptr, int16_t val) { - LDKAcceptChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonAcceptChannelFields_set_max_accepted_htlcs"))) TS_CommonAcceptChannelFields_set_max_accepted_htlcs(uint64_t this_ptr, int16_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_to_self_delay(&this_ptr_conv, val); + CommonAcceptChannelFields_set_max_accepted_htlcs(&this_ptr_conv, val); } -int16_t __attribute__((export_name("TS_AcceptChannel_get_max_accepted_htlcs"))) TS_AcceptChannel_get_max_accepted_htlcs(uint64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int16_t ret_conv = AcceptChannel_get_max_accepted_htlcs(&this_ptr_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_AcceptChannel_set_max_accepted_htlcs"))) TS_AcceptChannel_set_max_accepted_htlcs(uint64_t this_ptr, int16_t val) { - LDKAcceptChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannel_set_max_accepted_htlcs(&this_ptr_conv, val); -} - -int8_tArray __attribute__((export_name("TS_AcceptChannel_get_funding_pubkey"))) TS_AcceptChannel_get_funding_pubkey(uint64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int8_tArray __attribute__((export_name("TS_CommonAcceptChannelFields_get_funding_pubkey"))) TS_CommonAcceptChannelFields_get_funding_pubkey(uint64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannel_get_funding_pubkey(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonAcceptChannelFields_get_funding_pubkey(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void __attribute__((export_name("TS_AcceptChannel_set_funding_pubkey"))) TS_AcceptChannel_set_funding_pubkey(uint64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonAcceptChannelFields_set_funding_pubkey"))) TS_CommonAcceptChannelFields_set_funding_pubkey(uint64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42518,22 +46222,22 @@ void __attribute__((export_name("TS_AcceptChannel_set_funding_pubkey"))) TS_Acc LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannel_set_funding_pubkey(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_funding_pubkey(&this_ptr_conv, val_ref); } -int8_tArray __attribute__((export_name("TS_AcceptChannel_get_revocation_basepoint"))) TS_AcceptChannel_get_revocation_basepoint(uint64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int8_tArray __attribute__((export_name("TS_CommonAcceptChannelFields_get_revocation_basepoint"))) TS_CommonAcceptChannelFields_get_revocation_basepoint(uint64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannel_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonAcceptChannelFields_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void __attribute__((export_name("TS_AcceptChannel_set_revocation_basepoint"))) TS_AcceptChannel_set_revocation_basepoint(uint64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonAcceptChannelFields_set_revocation_basepoint"))) TS_CommonAcceptChannelFields_set_revocation_basepoint(uint64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42541,22 +46245,22 @@ void __attribute__((export_name("TS_AcceptChannel_set_revocation_basepoint"))) LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannel_set_revocation_basepoint(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_revocation_basepoint(&this_ptr_conv, val_ref); } -int8_tArray __attribute__((export_name("TS_AcceptChannel_get_payment_point"))) TS_AcceptChannel_get_payment_point(uint64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int8_tArray __attribute__((export_name("TS_CommonAcceptChannelFields_get_payment_basepoint"))) TS_CommonAcceptChannelFields_get_payment_basepoint(uint64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannel_get_payment_point(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonAcceptChannelFields_get_payment_basepoint(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void __attribute__((export_name("TS_AcceptChannel_set_payment_point"))) TS_AcceptChannel_set_payment_point(uint64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonAcceptChannelFields_set_payment_basepoint"))) TS_CommonAcceptChannelFields_set_payment_basepoint(uint64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42564,22 +46268,22 @@ void __attribute__((export_name("TS_AcceptChannel_set_payment_point"))) TS_Acce LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannel_set_payment_point(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_payment_basepoint(&this_ptr_conv, val_ref); } -int8_tArray __attribute__((export_name("TS_AcceptChannel_get_delayed_payment_basepoint"))) TS_AcceptChannel_get_delayed_payment_basepoint(uint64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int8_tArray __attribute__((export_name("TS_CommonAcceptChannelFields_get_delayed_payment_basepoint"))) TS_CommonAcceptChannelFields_get_delayed_payment_basepoint(uint64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannel_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonAcceptChannelFields_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void __attribute__((export_name("TS_AcceptChannel_set_delayed_payment_basepoint"))) TS_AcceptChannel_set_delayed_payment_basepoint(uint64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonAcceptChannelFields_set_delayed_payment_basepoint"))) TS_CommonAcceptChannelFields_set_delayed_payment_basepoint(uint64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42587,22 +46291,22 @@ void __attribute__((export_name("TS_AcceptChannel_set_delayed_payment_basepoint LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannel_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); } -int8_tArray __attribute__((export_name("TS_AcceptChannel_get_htlc_basepoint"))) TS_AcceptChannel_get_htlc_basepoint(uint64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int8_tArray __attribute__((export_name("TS_CommonAcceptChannelFields_get_htlc_basepoint"))) TS_CommonAcceptChannelFields_get_htlc_basepoint(uint64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannel_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonAcceptChannelFields_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void __attribute__((export_name("TS_AcceptChannel_set_htlc_basepoint"))) TS_AcceptChannel_set_htlc_basepoint(uint64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonAcceptChannelFields_set_htlc_basepoint"))) TS_CommonAcceptChannelFields_set_htlc_basepoint(uint64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42610,22 +46314,22 @@ void __attribute__((export_name("TS_AcceptChannel_set_htlc_basepoint"))) TS_Acc LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannel_set_htlc_basepoint(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_htlc_basepoint(&this_ptr_conv, val_ref); } -int8_tArray __attribute__((export_name("TS_AcceptChannel_get_first_per_commitment_point"))) TS_AcceptChannel_get_first_per_commitment_point(uint64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int8_tArray __attribute__((export_name("TS_CommonAcceptChannelFields_get_first_per_commitment_point"))) TS_CommonAcceptChannelFields_get_first_per_commitment_point(uint64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannel_get_first_per_commitment_point(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonAcceptChannelFields_get_first_per_commitment_point(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void __attribute__((export_name("TS_AcceptChannel_set_first_per_commitment_point"))) TS_AcceptChannel_set_first_per_commitment_point(uint64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonAcceptChannelFields_set_first_per_commitment_point"))) TS_CommonAcceptChannelFields_set_first_per_commitment_point(uint64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42633,23 +46337,23 @@ void __attribute__((export_name("TS_AcceptChannel_set_first_per_commitment_poin LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannel_set_first_per_commitment_point(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_first_per_commitment_point(&this_ptr_conv, val_ref); } -uint64_t __attribute__((export_name("TS_AcceptChannel_get_shutdown_scriptpubkey"))) TS_AcceptChannel_get_shutdown_scriptpubkey(uint64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +uint64_t __attribute__((export_name("TS_CommonAcceptChannelFields_get_shutdown_scriptpubkey"))) TS_CommonAcceptChannelFields_get_shutdown_scriptpubkey(uint64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ"); - *ret_copy = AcceptChannel_get_shutdown_scriptpubkey(&this_ptr_conv); + *ret_copy = CommonAcceptChannelFields_get_shutdown_scriptpubkey(&this_ptr_conv); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -void __attribute__((export_name("TS_AcceptChannel_set_shutdown_scriptpubkey"))) TS_AcceptChannel_set_shutdown_scriptpubkey(uint64_t this_ptr, uint64_t val) { - LDKAcceptChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonAcceptChannelFields_set_shutdown_scriptpubkey"))) TS_CommonAcceptChannelFields_set_shutdown_scriptpubkey(uint64_t this_ptr, uint64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42658,24 +46362,24 @@ void __attribute__((export_name("TS_AcceptChannel_set_shutdown_scriptpubkey"))) CHECK_ACCESS(val_ptr); LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr); val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val)); - AcceptChannel_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); + CommonAcceptChannelFields_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); } -uint64_t __attribute__((export_name("TS_AcceptChannel_get_channel_type"))) TS_AcceptChannel_get_channel_type(uint64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +uint64_t __attribute__((export_name("TS_CommonAcceptChannelFields_get_channel_type"))) TS_CommonAcceptChannelFields_get_channel_type(uint64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures ret_var = AcceptChannel_get_channel_type(&this_ptr_conv); + LDKChannelTypeFeatures ret_var = CommonAcceptChannelFields_get_channel_type(&this_ptr_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -void __attribute__((export_name("TS_AcceptChannel_set_channel_type"))) TS_AcceptChannel_set_channel_type(uint64_t this_ptr, uint64_t val) { - LDKAcceptChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonAcceptChannelFields_set_channel_type"))) TS_CommonAcceptChannelFields_set_channel_type(uint64_t this_ptr, uint64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42685,22 +46389,24 @@ void __attribute__((export_name("TS_AcceptChannel_set_channel_type"))) TS_Accep val_conv.is_owned = ptr_is_owned(val); CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); val_conv = ChannelTypeFeatures_clone(&val_conv); - AcceptChannel_set_channel_type(&this_ptr_conv, val_conv); + CommonAcceptChannelFields_set_channel_type(&this_ptr_conv, val_conv); } -uint64_t __attribute__((export_name("TS_AcceptChannel_new"))) TS_AcceptChannel_new(int8_tArray temporary_channel_id_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t channel_reserve_satoshis_arg, int64_t htlc_minimum_msat_arg, int32_t minimum_depth_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_point_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, uint64_t shutdown_scriptpubkey_arg, uint64_t channel_type_arg) { - LDKThirtyTwoBytes temporary_channel_id_arg_ref; - CHECK(temporary_channel_id_arg->arr_len == 32); - memcpy(temporary_channel_id_arg_ref.data, temporary_channel_id_arg->elems, 32); FREE(temporary_channel_id_arg); +uint64_t __attribute__((export_name("TS_CommonAcceptChannelFields_new"))) TS_CommonAcceptChannelFields_new(uint64_t temporary_channel_id_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int32_t minimum_depth_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, uint64_t shutdown_scriptpubkey_arg, uint64_t channel_type_arg) { + LDKChannelId temporary_channel_id_arg_conv; + temporary_channel_id_arg_conv.inner = untag_ptr(temporary_channel_id_arg); + temporary_channel_id_arg_conv.is_owned = ptr_is_owned(temporary_channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_arg_conv); + temporary_channel_id_arg_conv = ChannelId_clone(&temporary_channel_id_arg_conv); LDKPublicKey funding_pubkey_arg_ref; CHECK(funding_pubkey_arg->arr_len == 33); memcpy(funding_pubkey_arg_ref.compressed_form, funding_pubkey_arg->elems, 33); FREE(funding_pubkey_arg); LDKPublicKey revocation_basepoint_arg_ref; CHECK(revocation_basepoint_arg->arr_len == 33); memcpy(revocation_basepoint_arg_ref.compressed_form, revocation_basepoint_arg->elems, 33); FREE(revocation_basepoint_arg); - LDKPublicKey payment_point_arg_ref; - CHECK(payment_point_arg->arr_len == 33); - memcpy(payment_point_arg_ref.compressed_form, payment_point_arg->elems, 33); FREE(payment_point_arg); + LDKPublicKey payment_basepoint_arg_ref; + CHECK(payment_basepoint_arg->arr_len == 33); + memcpy(payment_basepoint_arg_ref.compressed_form, payment_basepoint_arg->elems, 33); FREE(payment_basepoint_arg); LDKPublicKey delayed_payment_basepoint_arg_ref; CHECK(delayed_payment_basepoint_arg->arr_len == 33); memcpy(delayed_payment_basepoint_arg_ref.compressed_form, delayed_payment_basepoint_arg->elems, 33); FREE(delayed_payment_basepoint_arg); @@ -42719,7 +46425,129 @@ uint64_t __attribute__((export_name("TS_AcceptChannel_new"))) TS_AcceptChannel_ channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv); channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv); - LDKAcceptChannel ret_var = AcceptChannel_new(temporary_channel_id_arg_ref, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_point_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv); + LDKCommonAcceptChannelFields ret_var = CommonAcceptChannelFields_new(temporary_channel_id_arg_conv, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t CommonAcceptChannelFields_clone_ptr(LDKCommonAcceptChannelFields *NONNULL_PTR arg) { + LDKCommonAcceptChannelFields ret_var = CommonAcceptChannelFields_clone(arg); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t __attribute__((export_name("TS_CommonAcceptChannelFields_clone_ptr"))) TS_CommonAcceptChannelFields_clone_ptr(uint64_t arg) { + LDKCommonAcceptChannelFields arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = CommonAcceptChannelFields_clone_ptr(&arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CommonAcceptChannelFields_clone"))) TS_CommonAcceptChannelFields_clone(uint64_t orig) { + LDKCommonAcceptChannelFields orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKCommonAcceptChannelFields ret_var = CommonAcceptChannelFields_clone(&orig_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t __attribute__((export_name("TS_CommonAcceptChannelFields_hash"))) TS_CommonAcceptChannelFields_hash(uint64_t o) { + LDKCommonAcceptChannelFields o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = CommonAcceptChannelFields_hash(&o_conv); + return ret_conv; +} + +jboolean __attribute__((export_name("TS_CommonAcceptChannelFields_eq"))) TS_CommonAcceptChannelFields_eq(uint64_t a, uint64_t b) { + LDKCommonAcceptChannelFields a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKCommonAcceptChannelFields b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = CommonAcceptChannelFields_eq(&a_conv, &b_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_AcceptChannel_free"))) TS_AcceptChannel_free(uint64_t this_obj) { + LDKAcceptChannel this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + AcceptChannel_free(this_obj_conv); +} + +uint64_t __attribute__((export_name("TS_AcceptChannel_get_common_fields"))) TS_AcceptChannel_get_common_fields(uint64_t this_ptr) { + LDKAcceptChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCommonAcceptChannelFields ret_var = AcceptChannel_get_common_fields(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void __attribute__((export_name("TS_AcceptChannel_set_common_fields"))) TS_AcceptChannel_set_common_fields(uint64_t this_ptr, uint64_t val) { + LDKAcceptChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCommonAcceptChannelFields val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = CommonAcceptChannelFields_clone(&val_conv); + AcceptChannel_set_common_fields(&this_ptr_conv, val_conv); +} + +int64_t __attribute__((export_name("TS_AcceptChannel_get_channel_reserve_satoshis"))) TS_AcceptChannel_get_channel_reserve_satoshis(uint64_t this_ptr) { + LDKAcceptChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int64_t ret_conv = AcceptChannel_get_channel_reserve_satoshis(&this_ptr_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_AcceptChannel_set_channel_reserve_satoshis"))) TS_AcceptChannel_set_channel_reserve_satoshis(uint64_t this_ptr, int64_t val) { + LDKAcceptChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + AcceptChannel_set_channel_reserve_satoshis(&this_ptr_conv, val); +} + +uint64_t __attribute__((export_name("TS_AcceptChannel_new"))) TS_AcceptChannel_new(uint64_t common_fields_arg, int64_t channel_reserve_satoshis_arg) { + LDKCommonAcceptChannelFields common_fields_arg_conv; + common_fields_arg_conv.inner = untag_ptr(common_fields_arg); + common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv); + common_fields_arg_conv = CommonAcceptChannelFields_clone(&common_fields_arg_conv); + LDKAcceptChannel ret_var = AcceptChannel_new(common_fields_arg_conv, channel_reserve_satoshis_arg); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -42789,27 +46617,31 @@ void __attribute__((export_name("TS_AcceptChannelV2_free"))) TS_AcceptChannelV2 AcceptChannelV2_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_AcceptChannelV2_get_temporary_channel_id"))) TS_AcceptChannelV2_get_temporary_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_AcceptChannelV2_get_common_fields"))) TS_AcceptChannelV2_get_common_fields(uint64_t this_ptr) { LDKAcceptChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *AcceptChannelV2_get_temporary_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKCommonAcceptChannelFields ret_var = AcceptChannelV2_get_common_fields(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_AcceptChannelV2_set_temporary_channel_id"))) TS_AcceptChannelV2_set_temporary_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_AcceptChannelV2_set_common_fields"))) TS_AcceptChannelV2_set_common_fields(uint64_t this_ptr, uint64_t val) { LDKAcceptChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - AcceptChannelV2_set_temporary_channel_id(&this_ptr_conv, val_ref); + LDKCommonAcceptChannelFields val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = CommonAcceptChannelFields_clone(&val_conv); + AcceptChannelV2_set_common_fields(&this_ptr_conv, val_conv); } int64_t __attribute__((export_name("TS_AcceptChannelV2_get_funding_satoshis"))) TS_AcceptChannelV2_get_funding_satoshis(uint64_t this_ptr) { @@ -42831,258 +46663,6 @@ void __attribute__((export_name("TS_AcceptChannelV2_set_funding_satoshis"))) TS AcceptChannelV2_set_funding_satoshis(&this_ptr_conv, val); } -int64_t __attribute__((export_name("TS_AcceptChannelV2_get_dust_limit_satoshis"))) TS_AcceptChannelV2_get_dust_limit_satoshis(uint64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannelV2_get_dust_limit_satoshis(&this_ptr_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_AcceptChannelV2_set_dust_limit_satoshis"))) TS_AcceptChannelV2_set_dust_limit_satoshis(uint64_t this_ptr, int64_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_dust_limit_satoshis(&this_ptr_conv, val); -} - -int64_t __attribute__((export_name("TS_AcceptChannelV2_get_max_htlc_value_in_flight_msat"))) TS_AcceptChannelV2_get_max_htlc_value_in_flight_msat(uint64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannelV2_get_max_htlc_value_in_flight_msat(&this_ptr_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_AcceptChannelV2_set_max_htlc_value_in_flight_msat"))) TS_AcceptChannelV2_set_max_htlc_value_in_flight_msat(uint64_t this_ptr, int64_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); -} - -int64_t __attribute__((export_name("TS_AcceptChannelV2_get_htlc_minimum_msat"))) TS_AcceptChannelV2_get_htlc_minimum_msat(uint64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannelV2_get_htlc_minimum_msat(&this_ptr_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_AcceptChannelV2_set_htlc_minimum_msat"))) TS_AcceptChannelV2_set_htlc_minimum_msat(uint64_t this_ptr, int64_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_htlc_minimum_msat(&this_ptr_conv, val); -} - -int32_t __attribute__((export_name("TS_AcceptChannelV2_get_minimum_depth"))) TS_AcceptChannelV2_get_minimum_depth(uint64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int32_t ret_conv = AcceptChannelV2_get_minimum_depth(&this_ptr_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_AcceptChannelV2_set_minimum_depth"))) TS_AcceptChannelV2_set_minimum_depth(uint64_t this_ptr, int32_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_minimum_depth(&this_ptr_conv, val); -} - -int16_t __attribute__((export_name("TS_AcceptChannelV2_get_to_self_delay"))) TS_AcceptChannelV2_get_to_self_delay(uint64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int16_t ret_conv = AcceptChannelV2_get_to_self_delay(&this_ptr_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_AcceptChannelV2_set_to_self_delay"))) TS_AcceptChannelV2_set_to_self_delay(uint64_t this_ptr, int16_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_to_self_delay(&this_ptr_conv, val); -} - -int16_t __attribute__((export_name("TS_AcceptChannelV2_get_max_accepted_htlcs"))) TS_AcceptChannelV2_get_max_accepted_htlcs(uint64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int16_t ret_conv = AcceptChannelV2_get_max_accepted_htlcs(&this_ptr_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_AcceptChannelV2_set_max_accepted_htlcs"))) TS_AcceptChannelV2_set_max_accepted_htlcs(uint64_t this_ptr, int16_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_max_accepted_htlcs(&this_ptr_conv, val); -} - -int8_tArray __attribute__((export_name("TS_AcceptChannelV2_get_funding_pubkey"))) TS_AcceptChannelV2_get_funding_pubkey(uint64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannelV2_get_funding_pubkey(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void __attribute__((export_name("TS_AcceptChannelV2_set_funding_pubkey"))) TS_AcceptChannelV2_set_funding_pubkey(uint64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannelV2_set_funding_pubkey(&this_ptr_conv, val_ref); -} - -int8_tArray __attribute__((export_name("TS_AcceptChannelV2_get_revocation_basepoint"))) TS_AcceptChannelV2_get_revocation_basepoint(uint64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannelV2_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void __attribute__((export_name("TS_AcceptChannelV2_set_revocation_basepoint"))) TS_AcceptChannelV2_set_revocation_basepoint(uint64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannelV2_set_revocation_basepoint(&this_ptr_conv, val_ref); -} - -int8_tArray __attribute__((export_name("TS_AcceptChannelV2_get_payment_basepoint"))) TS_AcceptChannelV2_get_payment_basepoint(uint64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannelV2_get_payment_basepoint(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void __attribute__((export_name("TS_AcceptChannelV2_set_payment_basepoint"))) TS_AcceptChannelV2_set_payment_basepoint(uint64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannelV2_set_payment_basepoint(&this_ptr_conv, val_ref); -} - -int8_tArray __attribute__((export_name("TS_AcceptChannelV2_get_delayed_payment_basepoint"))) TS_AcceptChannelV2_get_delayed_payment_basepoint(uint64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannelV2_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void __attribute__((export_name("TS_AcceptChannelV2_set_delayed_payment_basepoint"))) TS_AcceptChannelV2_set_delayed_payment_basepoint(uint64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannelV2_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); -} - -int8_tArray __attribute__((export_name("TS_AcceptChannelV2_get_htlc_basepoint"))) TS_AcceptChannelV2_get_htlc_basepoint(uint64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannelV2_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void __attribute__((export_name("TS_AcceptChannelV2_set_htlc_basepoint"))) TS_AcceptChannelV2_set_htlc_basepoint(uint64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannelV2_set_htlc_basepoint(&this_ptr_conv, val_ref); -} - -int8_tArray __attribute__((export_name("TS_AcceptChannelV2_get_first_per_commitment_point"))) TS_AcceptChannelV2_get_first_per_commitment_point(uint64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannelV2_get_first_per_commitment_point(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void __attribute__((export_name("TS_AcceptChannelV2_set_first_per_commitment_point"))) TS_AcceptChannelV2_set_first_per_commitment_point(uint64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannelV2_set_first_per_commitment_point(&this_ptr_conv, val_ref); -} - int8_tArray __attribute__((export_name("TS_AcceptChannelV2_get_second_per_commitment_point"))) TS_AcceptChannelV2_get_second_per_commitment_point(uint64_t this_ptr) { LDKAcceptChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -43106,58 +46686,6 @@ void __attribute__((export_name("TS_AcceptChannelV2_set_second_per_commitment_p AcceptChannelV2_set_second_per_commitment_point(&this_ptr_conv, val_ref); } -uint64_t __attribute__((export_name("TS_AcceptChannelV2_get_shutdown_scriptpubkey"))) TS_AcceptChannelV2_get_shutdown_scriptpubkey(uint64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ"); - *ret_copy = AcceptChannelV2_get_shutdown_scriptpubkey(&this_ptr_conv); - uint64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -void __attribute__((export_name("TS_AcceptChannelV2_set_shutdown_scriptpubkey"))) TS_AcceptChannelV2_set_shutdown_scriptpubkey(uint64_t this_ptr, uint64_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - void* val_ptr = untag_ptr(val); - CHECK_ACCESS(val_ptr); - LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr); - val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val)); - AcceptChannelV2_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); -} - -uint64_t __attribute__((export_name("TS_AcceptChannelV2_get_channel_type"))) TS_AcceptChannelV2_get_channel_type(uint64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures ret_var = AcceptChannelV2_get_channel_type(&this_ptr_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -void __attribute__((export_name("TS_AcceptChannelV2_set_channel_type"))) TS_AcceptChannelV2_set_channel_type(uint64_t this_ptr, uint64_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures val_conv; - val_conv.inner = untag_ptr(val); - val_conv.is_owned = ptr_is_owned(val); - CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); - val_conv = ChannelTypeFeatures_clone(&val_conv); - AcceptChannelV2_set_channel_type(&this_ptr_conv, val_conv); -} - uint32_t __attribute__((export_name("TS_AcceptChannelV2_get_require_confirmed_inputs"))) TS_AcceptChannelV2_get_require_confirmed_inputs(uint64_t this_ptr) { LDKAcceptChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -43178,42 +46706,17 @@ void __attribute__((export_name("TS_AcceptChannelV2_set_require_confirmed_input AcceptChannelV2_set_require_confirmed_inputs(&this_ptr_conv, val_conv); } -uint64_t __attribute__((export_name("TS_AcceptChannelV2_new"))) TS_AcceptChannelV2_new(int8_tArray temporary_channel_id_arg, int64_t funding_satoshis_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int32_t minimum_depth_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_tArray second_per_commitment_point_arg, uint64_t shutdown_scriptpubkey_arg, uint64_t channel_type_arg, uint32_t require_confirmed_inputs_arg) { - LDKThirtyTwoBytes temporary_channel_id_arg_ref; - CHECK(temporary_channel_id_arg->arr_len == 32); - memcpy(temporary_channel_id_arg_ref.data, temporary_channel_id_arg->elems, 32); FREE(temporary_channel_id_arg); - LDKPublicKey funding_pubkey_arg_ref; - CHECK(funding_pubkey_arg->arr_len == 33); - memcpy(funding_pubkey_arg_ref.compressed_form, funding_pubkey_arg->elems, 33); FREE(funding_pubkey_arg); - LDKPublicKey revocation_basepoint_arg_ref; - CHECK(revocation_basepoint_arg->arr_len == 33); - memcpy(revocation_basepoint_arg_ref.compressed_form, revocation_basepoint_arg->elems, 33); FREE(revocation_basepoint_arg); - LDKPublicKey payment_basepoint_arg_ref; - CHECK(payment_basepoint_arg->arr_len == 33); - memcpy(payment_basepoint_arg_ref.compressed_form, payment_basepoint_arg->elems, 33); FREE(payment_basepoint_arg); - LDKPublicKey delayed_payment_basepoint_arg_ref; - CHECK(delayed_payment_basepoint_arg->arr_len == 33); - memcpy(delayed_payment_basepoint_arg_ref.compressed_form, delayed_payment_basepoint_arg->elems, 33); FREE(delayed_payment_basepoint_arg); - LDKPublicKey htlc_basepoint_arg_ref; - CHECK(htlc_basepoint_arg->arr_len == 33); - memcpy(htlc_basepoint_arg_ref.compressed_form, htlc_basepoint_arg->elems, 33); FREE(htlc_basepoint_arg); - LDKPublicKey first_per_commitment_point_arg_ref; - CHECK(first_per_commitment_point_arg->arr_len == 33); - memcpy(first_per_commitment_point_arg_ref.compressed_form, first_per_commitment_point_arg->elems, 33); FREE(first_per_commitment_point_arg); +uint64_t __attribute__((export_name("TS_AcceptChannelV2_new"))) TS_AcceptChannelV2_new(uint64_t common_fields_arg, int64_t funding_satoshis_arg, int8_tArray second_per_commitment_point_arg, uint32_t require_confirmed_inputs_arg) { + LDKCommonAcceptChannelFields common_fields_arg_conv; + common_fields_arg_conv.inner = untag_ptr(common_fields_arg); + common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv); + common_fields_arg_conv = CommonAcceptChannelFields_clone(&common_fields_arg_conv); LDKPublicKey second_per_commitment_point_arg_ref; CHECK(second_per_commitment_point_arg->arr_len == 33); memcpy(second_per_commitment_point_arg_ref.compressed_form, second_per_commitment_point_arg->elems, 33); FREE(second_per_commitment_point_arg); - void* shutdown_scriptpubkey_arg_ptr = untag_ptr(shutdown_scriptpubkey_arg); - CHECK_ACCESS(shutdown_scriptpubkey_arg_ptr); - LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg_conv = *(LDKCOption_CVec_u8ZZ*)(shutdown_scriptpubkey_arg_ptr); - shutdown_scriptpubkey_arg_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(shutdown_scriptpubkey_arg)); - LDKChannelTypeFeatures channel_type_arg_conv; - channel_type_arg_conv.inner = untag_ptr(channel_type_arg); - channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv); - channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv); LDKCOption_NoneZ require_confirmed_inputs_arg_conv = LDKCOption_NoneZ_from_js(require_confirmed_inputs_arg); - LDKAcceptChannelV2 ret_var = AcceptChannelV2_new(temporary_channel_id_arg_ref, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, second_per_commitment_point_arg_ref, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv, require_confirmed_inputs_arg_conv); + LDKAcceptChannelV2 ret_var = AcceptChannelV2_new(common_fields_arg_conv, funding_satoshis_arg, second_per_commitment_point_arg_ref, require_confirmed_inputs_arg_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -43283,27 +46786,31 @@ void __attribute__((export_name("TS_FundingCreated_free"))) TS_FundingCreated_f FundingCreated_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_FundingCreated_get_temporary_channel_id"))) TS_FundingCreated_get_temporary_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_FundingCreated_get_temporary_channel_id"))) TS_FundingCreated_get_temporary_channel_id(uint64_t this_ptr) { LDKFundingCreated this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *FundingCreated_get_temporary_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = FundingCreated_get_temporary_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_FundingCreated_set_temporary_channel_id"))) TS_FundingCreated_set_temporary_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_FundingCreated_set_temporary_channel_id"))) TS_FundingCreated_set_temporary_channel_id(uint64_t this_ptr, uint64_t val) { LDKFundingCreated this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - FundingCreated_set_temporary_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + FundingCreated_set_temporary_channel_id(&this_ptr_conv, val_conv); } int8_tArray __attribute__((export_name("TS_FundingCreated_get_funding_txid"))) TS_FundingCreated_get_funding_txid(uint64_t this_ptr) { @@ -43371,17 +46878,19 @@ void __attribute__((export_name("TS_FundingCreated_set_signature"))) TS_Funding FundingCreated_set_signature(&this_ptr_conv, val_ref); } -uint64_t __attribute__((export_name("TS_FundingCreated_new"))) TS_FundingCreated_new(int8_tArray temporary_channel_id_arg, int8_tArray funding_txid_arg, int16_t funding_output_index_arg, int8_tArray signature_arg) { - LDKThirtyTwoBytes temporary_channel_id_arg_ref; - CHECK(temporary_channel_id_arg->arr_len == 32); - memcpy(temporary_channel_id_arg_ref.data, temporary_channel_id_arg->elems, 32); FREE(temporary_channel_id_arg); +uint64_t __attribute__((export_name("TS_FundingCreated_new"))) TS_FundingCreated_new(uint64_t temporary_channel_id_arg, int8_tArray funding_txid_arg, int16_t funding_output_index_arg, int8_tArray signature_arg) { + LDKChannelId temporary_channel_id_arg_conv; + temporary_channel_id_arg_conv.inner = untag_ptr(temporary_channel_id_arg); + temporary_channel_id_arg_conv.is_owned = ptr_is_owned(temporary_channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_arg_conv); + temporary_channel_id_arg_conv = ChannelId_clone(&temporary_channel_id_arg_conv); LDKThirtyTwoBytes funding_txid_arg_ref; CHECK(funding_txid_arg->arr_len == 32); memcpy(funding_txid_arg_ref.data, funding_txid_arg->elems, 32); FREE(funding_txid_arg); LDKECDSASignature signature_arg_ref; CHECK(signature_arg->arr_len == 64); memcpy(signature_arg_ref.compact_form, signature_arg->elems, 64); FREE(signature_arg); - LDKFundingCreated ret_var = FundingCreated_new(temporary_channel_id_arg_ref, funding_txid_arg_ref, funding_output_index_arg, signature_arg_ref); + LDKFundingCreated ret_var = FundingCreated_new(temporary_channel_id_arg_conv, funding_txid_arg_ref, funding_output_index_arg, signature_arg_ref); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -43451,27 +46960,31 @@ void __attribute__((export_name("TS_FundingSigned_free"))) TS_FundingSigned_fre FundingSigned_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_FundingSigned_get_channel_id"))) TS_FundingSigned_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_FundingSigned_get_channel_id"))) TS_FundingSigned_get_channel_id(uint64_t this_ptr) { LDKFundingSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *FundingSigned_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = FundingSigned_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_FundingSigned_set_channel_id"))) TS_FundingSigned_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_FundingSigned_set_channel_id"))) TS_FundingSigned_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKFundingSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - FundingSigned_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + FundingSigned_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray __attribute__((export_name("TS_FundingSigned_get_signature"))) TS_FundingSigned_get_signature(uint64_t this_ptr) { @@ -43497,14 +47010,16 @@ void __attribute__((export_name("TS_FundingSigned_set_signature"))) TS_FundingS FundingSigned_set_signature(&this_ptr_conv, val_ref); } -uint64_t __attribute__((export_name("TS_FundingSigned_new"))) TS_FundingSigned_new(int8_tArray channel_id_arg, int8_tArray signature_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_FundingSigned_new"))) TS_FundingSigned_new(uint64_t channel_id_arg, int8_tArray signature_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKECDSASignature signature_arg_ref; CHECK(signature_arg->arr_len == 64); memcpy(signature_arg_ref.compact_form, signature_arg->elems, 64); FREE(signature_arg); - LDKFundingSigned ret_var = FundingSigned_new(channel_id_arg_ref, signature_arg_ref); + LDKFundingSigned ret_var = FundingSigned_new(channel_id_arg_conv, signature_arg_ref); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -43574,27 +47089,31 @@ void __attribute__((export_name("TS_ChannelReady_free"))) TS_ChannelReady_free( ChannelReady_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_ChannelReady_get_channel_id"))) TS_ChannelReady_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_ChannelReady_get_channel_id"))) TS_ChannelReady_get_channel_id(uint64_t this_ptr) { LDKChannelReady this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *ChannelReady_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = ChannelReady_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_ChannelReady_set_channel_id"))) TS_ChannelReady_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_ChannelReady_set_channel_id"))) TS_ChannelReady_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKChannelReady this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - ChannelReady_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ChannelReady_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray __attribute__((export_name("TS_ChannelReady_get_next_per_commitment_point"))) TS_ChannelReady_get_next_per_commitment_point(uint64_t this_ptr) { @@ -43645,10 +47164,12 @@ void __attribute__((export_name("TS_ChannelReady_set_short_channel_id_alias"))) ChannelReady_set_short_channel_id_alias(&this_ptr_conv, val_conv); } -uint64_t __attribute__((export_name("TS_ChannelReady_new"))) TS_ChannelReady_new(int8_tArray channel_id_arg, int8_tArray next_per_commitment_point_arg, uint64_t short_channel_id_alias_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_ChannelReady_new"))) TS_ChannelReady_new(uint64_t channel_id_arg, int8_tArray next_per_commitment_point_arg, uint64_t short_channel_id_alias_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKPublicKey next_per_commitment_point_arg_ref; CHECK(next_per_commitment_point_arg->arr_len == 33); memcpy(next_per_commitment_point_arg_ref.compressed_form, next_per_commitment_point_arg->elems, 33); FREE(next_per_commitment_point_arg); @@ -43656,7 +47177,7 @@ uint64_t __attribute__((export_name("TS_ChannelReady_new"))) TS_ChannelReady_ne CHECK_ACCESS(short_channel_id_alias_arg_ptr); LDKCOption_u64Z short_channel_id_alias_arg_conv = *(LDKCOption_u64Z*)(short_channel_id_alias_arg_ptr); short_channel_id_alias_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(short_channel_id_alias_arg)); - LDKChannelReady ret_var = ChannelReady_new(channel_id_arg_ref, next_per_commitment_point_arg_ref, short_channel_id_alias_arg_conv); + LDKChannelReady ret_var = ChannelReady_new(channel_id_arg_conv, next_per_commitment_point_arg_ref, short_channel_id_alias_arg_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -43726,27 +47247,31 @@ void __attribute__((export_name("TS_Stfu_free"))) TS_Stfu_free(uint64_t this_ob Stfu_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_Stfu_get_channel_id"))) TS_Stfu_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_Stfu_get_channel_id"))) TS_Stfu_get_channel_id(uint64_t this_ptr) { LDKStfu this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *Stfu_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = Stfu_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_Stfu_set_channel_id"))) TS_Stfu_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_Stfu_set_channel_id"))) TS_Stfu_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKStfu this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - Stfu_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + Stfu_set_channel_id(&this_ptr_conv, val_conv); } int8_t __attribute__((export_name("TS_Stfu_get_initiator"))) TS_Stfu_get_initiator(uint64_t this_ptr) { @@ -43768,11 +47293,13 @@ void __attribute__((export_name("TS_Stfu_set_initiator"))) TS_Stfu_set_initiato Stfu_set_initiator(&this_ptr_conv, val); } -uint64_t __attribute__((export_name("TS_Stfu_new"))) TS_Stfu_new(int8_tArray channel_id_arg, int8_t initiator_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); - LDKStfu ret_var = Stfu_new(channel_id_arg_ref, initiator_arg); +uint64_t __attribute__((export_name("TS_Stfu_new"))) TS_Stfu_new(uint64_t channel_id_arg, int8_t initiator_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKStfu ret_var = Stfu_new(channel_id_arg_conv, initiator_arg); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -43832,27 +47359,31 @@ void __attribute__((export_name("TS_Splice_free"))) TS_Splice_free(uint64_t thi Splice_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_Splice_get_channel_id"))) TS_Splice_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_Splice_get_channel_id"))) TS_Splice_get_channel_id(uint64_t this_ptr) { LDKSplice this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *Splice_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = Splice_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_Splice_set_channel_id"))) TS_Splice_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_Splice_set_channel_id"))) TS_Splice_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKSplice this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - Splice_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + Splice_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray __attribute__((export_name("TS_Splice_get_chain_hash"))) TS_Splice_get_chain_hash(uint64_t this_ptr) { @@ -43958,17 +47489,19 @@ void __attribute__((export_name("TS_Splice_set_funding_pubkey"))) TS_Splice_set Splice_set_funding_pubkey(&this_ptr_conv, val_ref); } -uint64_t __attribute__((export_name("TS_Splice_new"))) TS_Splice_new(int8_tArray channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int32_t funding_feerate_perkw_arg, int32_t locktime_arg, int8_tArray funding_pubkey_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_Splice_new"))) TS_Splice_new(uint64_t channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int32_t funding_feerate_perkw_arg, int32_t locktime_arg, int8_tArray funding_pubkey_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes chain_hash_arg_ref; CHECK(chain_hash_arg->arr_len == 32); memcpy(chain_hash_arg_ref.data, chain_hash_arg->elems, 32); FREE(chain_hash_arg); LDKPublicKey funding_pubkey_arg_ref; CHECK(funding_pubkey_arg->arr_len == 33); memcpy(funding_pubkey_arg_ref.compressed_form, funding_pubkey_arg->elems, 33); FREE(funding_pubkey_arg); - LDKSplice ret_var = Splice_new(channel_id_arg_ref, chain_hash_arg_ref, relative_satoshis_arg, funding_feerate_perkw_arg, locktime_arg, funding_pubkey_arg_ref); + LDKSplice ret_var = Splice_new(channel_id_arg_conv, chain_hash_arg_ref, relative_satoshis_arg, funding_feerate_perkw_arg, locktime_arg, funding_pubkey_arg_ref); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -44028,27 +47561,31 @@ void __attribute__((export_name("TS_SpliceAck_free"))) TS_SpliceAck_free(uint64 SpliceAck_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_SpliceAck_get_channel_id"))) TS_SpliceAck_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_SpliceAck_get_channel_id"))) TS_SpliceAck_get_channel_id(uint64_t this_ptr) { LDKSpliceAck this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *SpliceAck_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = SpliceAck_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_SpliceAck_set_channel_id"))) TS_SpliceAck_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_SpliceAck_set_channel_id"))) TS_SpliceAck_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKSpliceAck this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - SpliceAck_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + SpliceAck_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray __attribute__((export_name("TS_SpliceAck_get_chain_hash"))) TS_SpliceAck_get_chain_hash(uint64_t this_ptr) { @@ -44116,17 +47653,19 @@ void __attribute__((export_name("TS_SpliceAck_set_funding_pubkey"))) TS_SpliceA SpliceAck_set_funding_pubkey(&this_ptr_conv, val_ref); } -uint64_t __attribute__((export_name("TS_SpliceAck_new"))) TS_SpliceAck_new(int8_tArray channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int8_tArray funding_pubkey_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_SpliceAck_new"))) TS_SpliceAck_new(uint64_t channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int8_tArray funding_pubkey_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes chain_hash_arg_ref; CHECK(chain_hash_arg->arr_len == 32); memcpy(chain_hash_arg_ref.data, chain_hash_arg->elems, 32); FREE(chain_hash_arg); LDKPublicKey funding_pubkey_arg_ref; CHECK(funding_pubkey_arg->arr_len == 33); memcpy(funding_pubkey_arg_ref.compressed_form, funding_pubkey_arg->elems, 33); FREE(funding_pubkey_arg); - LDKSpliceAck ret_var = SpliceAck_new(channel_id_arg_ref, chain_hash_arg_ref, relative_satoshis_arg, funding_pubkey_arg_ref); + LDKSpliceAck ret_var = SpliceAck_new(channel_id_arg_conv, chain_hash_arg_ref, relative_satoshis_arg, funding_pubkey_arg_ref); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -44186,34 +47725,40 @@ void __attribute__((export_name("TS_SpliceLocked_free"))) TS_SpliceLocked_free( SpliceLocked_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_SpliceLocked_get_channel_id"))) TS_SpliceLocked_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_SpliceLocked_get_channel_id"))) TS_SpliceLocked_get_channel_id(uint64_t this_ptr) { LDKSpliceLocked this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *SpliceLocked_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = SpliceLocked_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_SpliceLocked_set_channel_id"))) TS_SpliceLocked_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_SpliceLocked_set_channel_id"))) TS_SpliceLocked_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKSpliceLocked this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - SpliceLocked_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + SpliceLocked_set_channel_id(&this_ptr_conv, val_conv); } -uint64_t __attribute__((export_name("TS_SpliceLocked_new"))) TS_SpliceLocked_new(int8_tArray channel_id_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); - LDKSpliceLocked ret_var = SpliceLocked_new(channel_id_arg_ref); +uint64_t __attribute__((export_name("TS_SpliceLocked_new"))) TS_SpliceLocked_new(uint64_t channel_id_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKSpliceLocked ret_var = SpliceLocked_new(channel_id_arg_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -44273,27 +47818,31 @@ void __attribute__((export_name("TS_TxAddInput_free"))) TS_TxAddInput_free(uint TxAddInput_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_TxAddInput_get_channel_id"))) TS_TxAddInput_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_TxAddInput_get_channel_id"))) TS_TxAddInput_get_channel_id(uint64_t this_ptr) { LDKTxAddInput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxAddInput_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxAddInput_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_TxAddInput_set_channel_id"))) TS_TxAddInput_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_TxAddInput_set_channel_id"))) TS_TxAddInput_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKTxAddInput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxAddInput_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxAddInput_set_channel_id(&this_ptr_conv, val_conv); } int64_t __attribute__((export_name("TS_TxAddInput_get_serial_id"))) TS_TxAddInput_get_serial_id(uint64_t this_ptr) { @@ -44380,16 +47929,18 @@ void __attribute__((export_name("TS_TxAddInput_set_sequence"))) TS_TxAddInput_s TxAddInput_set_sequence(&this_ptr_conv, val); } -uint64_t __attribute__((export_name("TS_TxAddInput_new"))) TS_TxAddInput_new(int8_tArray channel_id_arg, int64_t serial_id_arg, uint64_t prevtx_arg, int32_t prevtx_out_arg, int32_t sequence_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_TxAddInput_new"))) TS_TxAddInput_new(uint64_t channel_id_arg, int64_t serial_id_arg, uint64_t prevtx_arg, int32_t prevtx_out_arg, int32_t sequence_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKTransactionU16LenLimited prevtx_arg_conv; prevtx_arg_conv.inner = untag_ptr(prevtx_arg); prevtx_arg_conv.is_owned = ptr_is_owned(prevtx_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(prevtx_arg_conv); prevtx_arg_conv = TransactionU16LenLimited_clone(&prevtx_arg_conv); - LDKTxAddInput ret_var = TxAddInput_new(channel_id_arg_ref, serial_id_arg, prevtx_arg_conv, prevtx_out_arg, sequence_arg); + LDKTxAddInput ret_var = TxAddInput_new(channel_id_arg_conv, serial_id_arg, prevtx_arg_conv, prevtx_out_arg, sequence_arg); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -44459,27 +48010,31 @@ void __attribute__((export_name("TS_TxAddOutput_free"))) TS_TxAddOutput_free(ui TxAddOutput_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_TxAddOutput_get_channel_id"))) TS_TxAddOutput_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_TxAddOutput_get_channel_id"))) TS_TxAddOutput_get_channel_id(uint64_t this_ptr) { LDKTxAddOutput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxAddOutput_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxAddOutput_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_TxAddOutput_set_channel_id"))) TS_TxAddOutput_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_TxAddOutput_set_channel_id"))) TS_TxAddOutput_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKTxAddOutput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxAddOutput_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxAddOutput_set_channel_id(&this_ptr_conv, val_conv); } int64_t __attribute__((export_name("TS_TxAddOutput_get_serial_id"))) TS_TxAddOutput_get_serial_id(uint64_t this_ptr) { @@ -44546,15 +48101,17 @@ void __attribute__((export_name("TS_TxAddOutput_set_script"))) TS_TxAddOutput_s TxAddOutput_set_script(&this_ptr_conv, val_ref); } -uint64_t __attribute__((export_name("TS_TxAddOutput_new"))) TS_TxAddOutput_new(int8_tArray channel_id_arg, int64_t serial_id_arg, int64_t sats_arg, int8_tArray script_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_TxAddOutput_new"))) TS_TxAddOutput_new(uint64_t channel_id_arg, int64_t serial_id_arg, int64_t sats_arg, int8_tArray script_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKCVec_u8Z script_arg_ref; script_arg_ref.datalen = script_arg->arr_len; script_arg_ref.data = MALLOC(script_arg_ref.datalen, "LDKCVec_u8Z Bytes"); memcpy(script_arg_ref.data, script_arg->elems, script_arg_ref.datalen); FREE(script_arg); - LDKTxAddOutput ret_var = TxAddOutput_new(channel_id_arg_ref, serial_id_arg, sats_arg, script_arg_ref); + LDKTxAddOutput ret_var = TxAddOutput_new(channel_id_arg_conv, serial_id_arg, sats_arg, script_arg_ref); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -44624,27 +48181,31 @@ void __attribute__((export_name("TS_TxRemoveInput_free"))) TS_TxRemoveInput_fre TxRemoveInput_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_TxRemoveInput_get_channel_id"))) TS_TxRemoveInput_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_TxRemoveInput_get_channel_id"))) TS_TxRemoveInput_get_channel_id(uint64_t this_ptr) { LDKTxRemoveInput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxRemoveInput_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxRemoveInput_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_TxRemoveInput_set_channel_id"))) TS_TxRemoveInput_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_TxRemoveInput_set_channel_id"))) TS_TxRemoveInput_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKTxRemoveInput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxRemoveInput_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxRemoveInput_set_channel_id(&this_ptr_conv, val_conv); } int64_t __attribute__((export_name("TS_TxRemoveInput_get_serial_id"))) TS_TxRemoveInput_get_serial_id(uint64_t this_ptr) { @@ -44666,11 +48227,13 @@ void __attribute__((export_name("TS_TxRemoveInput_set_serial_id"))) TS_TxRemove TxRemoveInput_set_serial_id(&this_ptr_conv, val); } -uint64_t __attribute__((export_name("TS_TxRemoveInput_new"))) TS_TxRemoveInput_new(int8_tArray channel_id_arg, int64_t serial_id_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); - LDKTxRemoveInput ret_var = TxRemoveInput_new(channel_id_arg_ref, serial_id_arg); +uint64_t __attribute__((export_name("TS_TxRemoveInput_new"))) TS_TxRemoveInput_new(uint64_t channel_id_arg, int64_t serial_id_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKTxRemoveInput ret_var = TxRemoveInput_new(channel_id_arg_conv, serial_id_arg); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -44740,27 +48303,31 @@ void __attribute__((export_name("TS_TxRemoveOutput_free"))) TS_TxRemoveOutput_f TxRemoveOutput_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_TxRemoveOutput_get_channel_id"))) TS_TxRemoveOutput_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_TxRemoveOutput_get_channel_id"))) TS_TxRemoveOutput_get_channel_id(uint64_t this_ptr) { LDKTxRemoveOutput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxRemoveOutput_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxRemoveOutput_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_TxRemoveOutput_set_channel_id"))) TS_TxRemoveOutput_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_TxRemoveOutput_set_channel_id"))) TS_TxRemoveOutput_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKTxRemoveOutput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxRemoveOutput_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxRemoveOutput_set_channel_id(&this_ptr_conv, val_conv); } int64_t __attribute__((export_name("TS_TxRemoveOutput_get_serial_id"))) TS_TxRemoveOutput_get_serial_id(uint64_t this_ptr) { @@ -44782,11 +48349,13 @@ void __attribute__((export_name("TS_TxRemoveOutput_set_serial_id"))) TS_TxRemov TxRemoveOutput_set_serial_id(&this_ptr_conv, val); } -uint64_t __attribute__((export_name("TS_TxRemoveOutput_new"))) TS_TxRemoveOutput_new(int8_tArray channel_id_arg, int64_t serial_id_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); - LDKTxRemoveOutput ret_var = TxRemoveOutput_new(channel_id_arg_ref, serial_id_arg); +uint64_t __attribute__((export_name("TS_TxRemoveOutput_new"))) TS_TxRemoveOutput_new(uint64_t channel_id_arg, int64_t serial_id_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKTxRemoveOutput ret_var = TxRemoveOutput_new(channel_id_arg_conv, serial_id_arg); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -44856,34 +48425,40 @@ void __attribute__((export_name("TS_TxComplete_free"))) TS_TxComplete_free(uint TxComplete_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_TxComplete_get_channel_id"))) TS_TxComplete_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_TxComplete_get_channel_id"))) TS_TxComplete_get_channel_id(uint64_t this_ptr) { LDKTxComplete this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxComplete_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxComplete_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_TxComplete_set_channel_id"))) TS_TxComplete_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_TxComplete_set_channel_id"))) TS_TxComplete_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKTxComplete this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxComplete_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxComplete_set_channel_id(&this_ptr_conv, val_conv); } -uint64_t __attribute__((export_name("TS_TxComplete_new"))) TS_TxComplete_new(int8_tArray channel_id_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); - LDKTxComplete ret_var = TxComplete_new(channel_id_arg_ref); +uint64_t __attribute__((export_name("TS_TxComplete_new"))) TS_TxComplete_new(uint64_t channel_id_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKTxComplete ret_var = TxComplete_new(channel_id_arg_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -44953,27 +48528,31 @@ void __attribute__((export_name("TS_TxSignatures_free"))) TS_TxSignatures_free( TxSignatures_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_TxSignatures_get_channel_id"))) TS_TxSignatures_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_TxSignatures_get_channel_id"))) TS_TxSignatures_get_channel_id(uint64_t this_ptr) { LDKTxSignatures this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxSignatures_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxSignatures_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_TxSignatures_set_channel_id"))) TS_TxSignatures_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_TxSignatures_set_channel_id"))) TS_TxSignatures_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKTxSignatures this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxSignatures_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxSignatures_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray __attribute__((export_name("TS_TxSignatures_get_tx_hash"))) TS_TxSignatures_get_tx_hash(uint64_t this_ptr) { @@ -45047,10 +48626,37 @@ void __attribute__((export_name("TS_TxSignatures_set_witnesses"))) TS_TxSignatu TxSignatures_set_witnesses(&this_ptr_conv, val_constr); } -uint64_t __attribute__((export_name("TS_TxSignatures_new"))) TS_TxSignatures_new(int8_tArray channel_id_arg, int8_tArray tx_hash_arg, ptrArray witnesses_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_TxSignatures_get_funding_outpoint_sig"))) TS_TxSignatures_get_funding_outpoint_sig(uint64_t this_ptr) { + LDKTxSignatures this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ"); + *ret_copy = TxSignatures_get_funding_outpoint_sig(&this_ptr_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void __attribute__((export_name("TS_TxSignatures_set_funding_outpoint_sig"))) TS_TxSignatures_set_funding_outpoint_sig(uint64_t this_ptr, uint64_t val) { + LDKTxSignatures this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKCOption_ECDSASignatureZ val_conv = *(LDKCOption_ECDSASignatureZ*)(val_ptr); + val_conv = COption_ECDSASignatureZ_clone((LDKCOption_ECDSASignatureZ*)untag_ptr(val)); + TxSignatures_set_funding_outpoint_sig(&this_ptr_conv, val_conv); +} + +uint64_t __attribute__((export_name("TS_TxSignatures_new"))) TS_TxSignatures_new(uint64_t channel_id_arg, int8_tArray tx_hash_arg, ptrArray witnesses_arg, uint64_t funding_outpoint_sig_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes tx_hash_arg_ref; CHECK(tx_hash_arg->arr_len == 32); memcpy(tx_hash_arg_ref.data, tx_hash_arg->elems, 32); FREE(tx_hash_arg); @@ -45071,7 +48677,11 @@ uint64_t __attribute__((export_name("TS_TxSignatures_new"))) TS_TxSignatures_ne witnesses_arg_constr.data[m] = witnesses_arg_conv_12_ref; } FREE(witnesses_arg); - LDKTxSignatures ret_var = TxSignatures_new(channel_id_arg_ref, tx_hash_arg_ref, witnesses_arg_constr); + void* funding_outpoint_sig_arg_ptr = untag_ptr(funding_outpoint_sig_arg); + CHECK_ACCESS(funding_outpoint_sig_arg_ptr); + LDKCOption_ECDSASignatureZ funding_outpoint_sig_arg_conv = *(LDKCOption_ECDSASignatureZ*)(funding_outpoint_sig_arg_ptr); + funding_outpoint_sig_arg_conv = COption_ECDSASignatureZ_clone((LDKCOption_ECDSASignatureZ*)untag_ptr(funding_outpoint_sig_arg)); + LDKTxSignatures ret_var = TxSignatures_new(channel_id_arg_conv, tx_hash_arg_ref, witnesses_arg_constr, funding_outpoint_sig_arg_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -45141,27 +48751,31 @@ void __attribute__((export_name("TS_TxInitRbf_free"))) TS_TxInitRbf_free(uint64 TxInitRbf_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_TxInitRbf_get_channel_id"))) TS_TxInitRbf_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_TxInitRbf_get_channel_id"))) TS_TxInitRbf_get_channel_id(uint64_t this_ptr) { LDKTxInitRbf this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxInitRbf_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxInitRbf_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_TxInitRbf_set_channel_id"))) TS_TxInitRbf_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_TxInitRbf_set_channel_id"))) TS_TxInitRbf_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKTxInitRbf this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxInitRbf_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxInitRbf_set_channel_id(&this_ptr_conv, val_conv); } int32_t __attribute__((export_name("TS_TxInitRbf_get_locktime"))) TS_TxInitRbf_get_locktime(uint64_t this_ptr) { @@ -45227,15 +48841,17 @@ void __attribute__((export_name("TS_TxInitRbf_set_funding_output_contribution") TxInitRbf_set_funding_output_contribution(&this_ptr_conv, val_conv); } -uint64_t __attribute__((export_name("TS_TxInitRbf_new"))) TS_TxInitRbf_new(int8_tArray channel_id_arg, int32_t locktime_arg, int32_t feerate_sat_per_1000_weight_arg, uint64_t funding_output_contribution_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_TxInitRbf_new"))) TS_TxInitRbf_new(uint64_t channel_id_arg, int32_t locktime_arg, int32_t feerate_sat_per_1000_weight_arg, uint64_t funding_output_contribution_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); void* funding_output_contribution_arg_ptr = untag_ptr(funding_output_contribution_arg); CHECK_ACCESS(funding_output_contribution_arg_ptr); LDKCOption_i64Z funding_output_contribution_arg_conv = *(LDKCOption_i64Z*)(funding_output_contribution_arg_ptr); funding_output_contribution_arg_conv = COption_i64Z_clone((LDKCOption_i64Z*)untag_ptr(funding_output_contribution_arg)); - LDKTxInitRbf ret_var = TxInitRbf_new(channel_id_arg_ref, locktime_arg, feerate_sat_per_1000_weight_arg, funding_output_contribution_arg_conv); + LDKTxInitRbf ret_var = TxInitRbf_new(channel_id_arg_conv, locktime_arg, feerate_sat_per_1000_weight_arg, funding_output_contribution_arg_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -45305,27 +48921,31 @@ void __attribute__((export_name("TS_TxAckRbf_free"))) TS_TxAckRbf_free(uint64_t TxAckRbf_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_TxAckRbf_get_channel_id"))) TS_TxAckRbf_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_TxAckRbf_get_channel_id"))) TS_TxAckRbf_get_channel_id(uint64_t this_ptr) { LDKTxAckRbf this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxAckRbf_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxAckRbf_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_TxAckRbf_set_channel_id"))) TS_TxAckRbf_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_TxAckRbf_set_channel_id"))) TS_TxAckRbf_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKTxAckRbf this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxAckRbf_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxAckRbf_set_channel_id(&this_ptr_conv, val_conv); } uint64_t __attribute__((export_name("TS_TxAckRbf_get_funding_output_contribution"))) TS_TxAckRbf_get_funding_output_contribution(uint64_t this_ptr) { @@ -45353,15 +48973,17 @@ void __attribute__((export_name("TS_TxAckRbf_set_funding_output_contribution")) TxAckRbf_set_funding_output_contribution(&this_ptr_conv, val_conv); } -uint64_t __attribute__((export_name("TS_TxAckRbf_new"))) TS_TxAckRbf_new(int8_tArray channel_id_arg, uint64_t funding_output_contribution_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_TxAckRbf_new"))) TS_TxAckRbf_new(uint64_t channel_id_arg, uint64_t funding_output_contribution_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); void* funding_output_contribution_arg_ptr = untag_ptr(funding_output_contribution_arg); CHECK_ACCESS(funding_output_contribution_arg_ptr); LDKCOption_i64Z funding_output_contribution_arg_conv = *(LDKCOption_i64Z*)(funding_output_contribution_arg_ptr); funding_output_contribution_arg_conv = COption_i64Z_clone((LDKCOption_i64Z*)untag_ptr(funding_output_contribution_arg)); - LDKTxAckRbf ret_var = TxAckRbf_new(channel_id_arg_ref, funding_output_contribution_arg_conv); + LDKTxAckRbf ret_var = TxAckRbf_new(channel_id_arg_conv, funding_output_contribution_arg_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -45431,27 +49053,31 @@ void __attribute__((export_name("TS_TxAbort_free"))) TS_TxAbort_free(uint64_t t TxAbort_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_TxAbort_get_channel_id"))) TS_TxAbort_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_TxAbort_get_channel_id"))) TS_TxAbort_get_channel_id(uint64_t this_ptr) { LDKTxAbort this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxAbort_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxAbort_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_TxAbort_set_channel_id"))) TS_TxAbort_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_TxAbort_set_channel_id"))) TS_TxAbort_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKTxAbort this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxAbort_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxAbort_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray __attribute__((export_name("TS_TxAbort_get_data"))) TS_TxAbort_get_data(uint64_t this_ptr) { @@ -45480,15 +49106,17 @@ void __attribute__((export_name("TS_TxAbort_set_data"))) TS_TxAbort_set_data(ui TxAbort_set_data(&this_ptr_conv, val_ref); } -uint64_t __attribute__((export_name("TS_TxAbort_new"))) TS_TxAbort_new(int8_tArray channel_id_arg, int8_tArray data_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_TxAbort_new"))) TS_TxAbort_new(uint64_t channel_id_arg, int8_tArray data_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKCVec_u8Z data_arg_ref; data_arg_ref.datalen = data_arg->arr_len; data_arg_ref.data = MALLOC(data_arg_ref.datalen, "LDKCVec_u8Z Bytes"); memcpy(data_arg_ref.data, data_arg->elems, data_arg_ref.datalen); FREE(data_arg); - LDKTxAbort ret_var = TxAbort_new(channel_id_arg_ref, data_arg_ref); + LDKTxAbort ret_var = TxAbort_new(channel_id_arg_conv, data_arg_ref); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -45558,27 +49186,31 @@ void __attribute__((export_name("TS_Shutdown_free"))) TS_Shutdown_free(uint64_t Shutdown_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_Shutdown_get_channel_id"))) TS_Shutdown_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_Shutdown_get_channel_id"))) TS_Shutdown_get_channel_id(uint64_t this_ptr) { LDKShutdown this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *Shutdown_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = Shutdown_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_Shutdown_set_channel_id"))) TS_Shutdown_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_Shutdown_set_channel_id"))) TS_Shutdown_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKShutdown this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - Shutdown_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + Shutdown_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray __attribute__((export_name("TS_Shutdown_get_scriptpubkey"))) TS_Shutdown_get_scriptpubkey(uint64_t this_ptr) { @@ -45607,15 +49239,17 @@ void __attribute__((export_name("TS_Shutdown_set_scriptpubkey"))) TS_Shutdown_s Shutdown_set_scriptpubkey(&this_ptr_conv, val_ref); } -uint64_t __attribute__((export_name("TS_Shutdown_new"))) TS_Shutdown_new(int8_tArray channel_id_arg, int8_tArray scriptpubkey_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_Shutdown_new"))) TS_Shutdown_new(uint64_t channel_id_arg, int8_tArray scriptpubkey_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKCVec_u8Z scriptpubkey_arg_ref; scriptpubkey_arg_ref.datalen = scriptpubkey_arg->arr_len; scriptpubkey_arg_ref.data = MALLOC(scriptpubkey_arg_ref.datalen, "LDKCVec_u8Z Bytes"); memcpy(scriptpubkey_arg_ref.data, scriptpubkey_arg->elems, scriptpubkey_arg_ref.datalen); FREE(scriptpubkey_arg); - LDKShutdown ret_var = Shutdown_new(channel_id_arg_ref, scriptpubkey_arg_ref); + LDKShutdown ret_var = Shutdown_new(channel_id_arg_conv, scriptpubkey_arg_ref); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -45794,27 +49428,31 @@ void __attribute__((export_name("TS_ClosingSigned_free"))) TS_ClosingSigned_fre ClosingSigned_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_ClosingSigned_get_channel_id"))) TS_ClosingSigned_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_ClosingSigned_get_channel_id"))) TS_ClosingSigned_get_channel_id(uint64_t this_ptr) { LDKClosingSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *ClosingSigned_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = ClosingSigned_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_ClosingSigned_set_channel_id"))) TS_ClosingSigned_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_ClosingSigned_set_channel_id"))) TS_ClosingSigned_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKClosingSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - ClosingSigned_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ClosingSigned_set_channel_id(&this_ptr_conv, val_conv); } int64_t __attribute__((export_name("TS_ClosingSigned_get_fee_satoshis"))) TS_ClosingSigned_get_fee_satoshis(uint64_t this_ptr) { @@ -45886,10 +49524,12 @@ void __attribute__((export_name("TS_ClosingSigned_set_fee_range"))) TS_ClosingS ClosingSigned_set_fee_range(&this_ptr_conv, val_conv); } -uint64_t __attribute__((export_name("TS_ClosingSigned_new"))) TS_ClosingSigned_new(int8_tArray channel_id_arg, int64_t fee_satoshis_arg, int8_tArray signature_arg, uint64_t fee_range_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_ClosingSigned_new"))) TS_ClosingSigned_new(uint64_t channel_id_arg, int64_t fee_satoshis_arg, int8_tArray signature_arg, uint64_t fee_range_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKECDSASignature signature_arg_ref; CHECK(signature_arg->arr_len == 64); memcpy(signature_arg_ref.compact_form, signature_arg->elems, 64); FREE(signature_arg); @@ -45898,7 +49538,7 @@ uint64_t __attribute__((export_name("TS_ClosingSigned_new"))) TS_ClosingSigned_ fee_range_arg_conv.is_owned = ptr_is_owned(fee_range_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(fee_range_arg_conv); fee_range_arg_conv = ClosingSignedFeeRange_clone(&fee_range_arg_conv); - LDKClosingSigned ret_var = ClosingSigned_new(channel_id_arg_ref, fee_satoshis_arg, signature_arg_ref, fee_range_arg_conv); + LDKClosingSigned ret_var = ClosingSigned_new(channel_id_arg_conv, fee_satoshis_arg, signature_arg_ref, fee_range_arg_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -45968,27 +49608,31 @@ void __attribute__((export_name("TS_UpdateAddHTLC_free"))) TS_UpdateAddHTLC_fre UpdateAddHTLC_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_UpdateAddHTLC_get_channel_id"))) TS_UpdateAddHTLC_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_UpdateAddHTLC_get_channel_id"))) TS_UpdateAddHTLC_get_channel_id(uint64_t this_ptr) { LDKUpdateAddHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *UpdateAddHTLC_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = UpdateAddHTLC_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_UpdateAddHTLC_set_channel_id"))) TS_UpdateAddHTLC_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_UpdateAddHTLC_set_channel_id"))) TS_UpdateAddHTLC_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKUpdateAddHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - UpdateAddHTLC_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + UpdateAddHTLC_set_channel_id(&this_ptr_conv, val_conv); } int64_t __attribute__((export_name("TS_UpdateAddHTLC_get_htlc_id"))) TS_UpdateAddHTLC_get_htlc_id(uint64_t this_ptr) { @@ -46146,10 +49790,12 @@ void __attribute__((export_name("TS_UpdateAddHTLC_set_blinding_point"))) TS_Upd UpdateAddHTLC_set_blinding_point(&this_ptr_conv, val_ref); } -uint64_t __attribute__((export_name("TS_UpdateAddHTLC_new"))) TS_UpdateAddHTLC_new(int8_tArray channel_id_arg, int64_t htlc_id_arg, int64_t amount_msat_arg, int8_tArray payment_hash_arg, int32_t cltv_expiry_arg, uint64_t skimmed_fee_msat_arg, uint64_t onion_routing_packet_arg, int8_tArray blinding_point_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_UpdateAddHTLC_new"))) TS_UpdateAddHTLC_new(uint64_t channel_id_arg, int64_t htlc_id_arg, int64_t amount_msat_arg, int8_tArray payment_hash_arg, int32_t cltv_expiry_arg, uint64_t skimmed_fee_msat_arg, uint64_t onion_routing_packet_arg, int8_tArray blinding_point_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes payment_hash_arg_ref; CHECK(payment_hash_arg->arr_len == 32); memcpy(payment_hash_arg_ref.data, payment_hash_arg->elems, 32); FREE(payment_hash_arg); @@ -46165,7 +49811,7 @@ uint64_t __attribute__((export_name("TS_UpdateAddHTLC_new"))) TS_UpdateAddHTLC_ LDKPublicKey blinding_point_arg_ref; CHECK(blinding_point_arg->arr_len == 33); memcpy(blinding_point_arg_ref.compressed_form, blinding_point_arg->elems, 33); FREE(blinding_point_arg); - LDKUpdateAddHTLC ret_var = UpdateAddHTLC_new(channel_id_arg_ref, htlc_id_arg, amount_msat_arg, payment_hash_arg_ref, cltv_expiry_arg, skimmed_fee_msat_arg_conv, onion_routing_packet_arg_conv, blinding_point_arg_ref); + LDKUpdateAddHTLC ret_var = UpdateAddHTLC_new(channel_id_arg_conv, htlc_id_arg, amount_msat_arg, payment_hash_arg_ref, cltv_expiry_arg, skimmed_fee_msat_arg_conv, onion_routing_packet_arg_conv, blinding_point_arg_ref); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -46364,27 +50010,31 @@ void __attribute__((export_name("TS_UpdateFulfillHTLC_free"))) TS_UpdateFulfill UpdateFulfillHTLC_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_UpdateFulfillHTLC_get_channel_id"))) TS_UpdateFulfillHTLC_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_UpdateFulfillHTLC_get_channel_id"))) TS_UpdateFulfillHTLC_get_channel_id(uint64_t this_ptr) { LDKUpdateFulfillHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *UpdateFulfillHTLC_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = UpdateFulfillHTLC_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_UpdateFulfillHTLC_set_channel_id"))) TS_UpdateFulfillHTLC_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_UpdateFulfillHTLC_set_channel_id"))) TS_UpdateFulfillHTLC_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKUpdateFulfillHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - UpdateFulfillHTLC_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + UpdateFulfillHTLC_set_channel_id(&this_ptr_conv, val_conv); } int64_t __attribute__((export_name("TS_UpdateFulfillHTLC_get_htlc_id"))) TS_UpdateFulfillHTLC_get_htlc_id(uint64_t this_ptr) { @@ -46429,14 +50079,16 @@ void __attribute__((export_name("TS_UpdateFulfillHTLC_set_payment_preimage"))) UpdateFulfillHTLC_set_payment_preimage(&this_ptr_conv, val_ref); } -uint64_t __attribute__((export_name("TS_UpdateFulfillHTLC_new"))) TS_UpdateFulfillHTLC_new(int8_tArray channel_id_arg, int64_t htlc_id_arg, int8_tArray payment_preimage_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_UpdateFulfillHTLC_new"))) TS_UpdateFulfillHTLC_new(uint64_t channel_id_arg, int64_t htlc_id_arg, int8_tArray payment_preimage_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes payment_preimage_arg_ref; CHECK(payment_preimage_arg->arr_len == 32); memcpy(payment_preimage_arg_ref.data, payment_preimage_arg->elems, 32); FREE(payment_preimage_arg); - LDKUpdateFulfillHTLC ret_var = UpdateFulfillHTLC_new(channel_id_arg_ref, htlc_id_arg, payment_preimage_arg_ref); + LDKUpdateFulfillHTLC ret_var = UpdateFulfillHTLC_new(channel_id_arg_conv, htlc_id_arg, payment_preimage_arg_ref); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -46506,27 +50158,31 @@ void __attribute__((export_name("TS_UpdateFailHTLC_free"))) TS_UpdateFailHTLC_f UpdateFailHTLC_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_UpdateFailHTLC_get_channel_id"))) TS_UpdateFailHTLC_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_UpdateFailHTLC_get_channel_id"))) TS_UpdateFailHTLC_get_channel_id(uint64_t this_ptr) { LDKUpdateFailHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *UpdateFailHTLC_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = UpdateFailHTLC_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_UpdateFailHTLC_set_channel_id"))) TS_UpdateFailHTLC_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_UpdateFailHTLC_set_channel_id"))) TS_UpdateFailHTLC_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKUpdateFailHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - UpdateFailHTLC_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + UpdateFailHTLC_set_channel_id(&this_ptr_conv, val_conv); } int64_t __attribute__((export_name("TS_UpdateFailHTLC_get_htlc_id"))) TS_UpdateFailHTLC_get_htlc_id(uint64_t this_ptr) { @@ -46611,27 +50267,31 @@ void __attribute__((export_name("TS_UpdateFailMalformedHTLC_free"))) TS_UpdateF UpdateFailMalformedHTLC_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_UpdateFailMalformedHTLC_get_channel_id"))) TS_UpdateFailMalformedHTLC_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_UpdateFailMalformedHTLC_get_channel_id"))) TS_UpdateFailMalformedHTLC_get_channel_id(uint64_t this_ptr) { LDKUpdateFailMalformedHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *UpdateFailMalformedHTLC_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = UpdateFailMalformedHTLC_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_UpdateFailMalformedHTLC_set_channel_id"))) TS_UpdateFailMalformedHTLC_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_UpdateFailMalformedHTLC_set_channel_id"))) TS_UpdateFailMalformedHTLC_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKUpdateFailMalformedHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - UpdateFailMalformedHTLC_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + UpdateFailMalformedHTLC_set_channel_id(&this_ptr_conv, val_conv); } int64_t __attribute__((export_name("TS_UpdateFailMalformedHTLC_get_htlc_id"))) TS_UpdateFailMalformedHTLC_get_htlc_id(uint64_t this_ptr) { @@ -46735,27 +50395,31 @@ void __attribute__((export_name("TS_CommitmentSigned_free"))) TS_CommitmentSign CommitmentSigned_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_CommitmentSigned_get_channel_id"))) TS_CommitmentSigned_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_CommitmentSigned_get_channel_id"))) TS_CommitmentSigned_get_channel_id(uint64_t this_ptr) { LDKCommitmentSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *CommitmentSigned_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = CommitmentSigned_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_CommitmentSigned_set_channel_id"))) TS_CommitmentSigned_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_CommitmentSigned_set_channel_id"))) TS_CommitmentSigned_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKCommitmentSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - CommitmentSigned_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + CommitmentSigned_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray __attribute__((export_name("TS_CommitmentSigned_get_signature"))) TS_CommitmentSigned_get_signature(uint64_t this_ptr) { @@ -46825,10 +50489,12 @@ void __attribute__((export_name("TS_CommitmentSigned_set_htlc_signatures"))) TS CommitmentSigned_set_htlc_signatures(&this_ptr_conv, val_constr); } -uint64_t __attribute__((export_name("TS_CommitmentSigned_new"))) TS_CommitmentSigned_new(int8_tArray channel_id_arg, int8_tArray signature_arg, ptrArray htlc_signatures_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_CommitmentSigned_new"))) TS_CommitmentSigned_new(uint64_t channel_id_arg, int8_tArray signature_arg, ptrArray htlc_signatures_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKECDSASignature signature_arg_ref; CHECK(signature_arg->arr_len == 64); memcpy(signature_arg_ref.compact_form, signature_arg->elems, 64); FREE(signature_arg); @@ -46847,7 +50513,7 @@ uint64_t __attribute__((export_name("TS_CommitmentSigned_new"))) TS_CommitmentS htlc_signatures_arg_constr.data[m] = htlc_signatures_arg_conv_12_ref; } FREE(htlc_signatures_arg); - LDKCommitmentSigned ret_var = CommitmentSigned_new(channel_id_arg_ref, signature_arg_ref, htlc_signatures_arg_constr); + LDKCommitmentSigned ret_var = CommitmentSigned_new(channel_id_arg_conv, signature_arg_ref, htlc_signatures_arg_constr); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -46917,27 +50583,31 @@ void __attribute__((export_name("TS_RevokeAndACK_free"))) TS_RevokeAndACK_free( RevokeAndACK_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_RevokeAndACK_get_channel_id"))) TS_RevokeAndACK_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_RevokeAndACK_get_channel_id"))) TS_RevokeAndACK_get_channel_id(uint64_t this_ptr) { LDKRevokeAndACK this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *RevokeAndACK_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = RevokeAndACK_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_RevokeAndACK_set_channel_id"))) TS_RevokeAndACK_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_RevokeAndACK_set_channel_id"))) TS_RevokeAndACK_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKRevokeAndACK this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - RevokeAndACK_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + RevokeAndACK_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray __attribute__((export_name("TS_RevokeAndACK_get_per_commitment_secret"))) TS_RevokeAndACK_get_per_commitment_secret(uint64_t this_ptr) { @@ -46986,17 +50656,19 @@ void __attribute__((export_name("TS_RevokeAndACK_set_next_per_commitment_point" RevokeAndACK_set_next_per_commitment_point(&this_ptr_conv, val_ref); } -uint64_t __attribute__((export_name("TS_RevokeAndACK_new"))) TS_RevokeAndACK_new(int8_tArray channel_id_arg, int8_tArray per_commitment_secret_arg, int8_tArray next_per_commitment_point_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_RevokeAndACK_new"))) TS_RevokeAndACK_new(uint64_t channel_id_arg, int8_tArray per_commitment_secret_arg, int8_tArray next_per_commitment_point_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes per_commitment_secret_arg_ref; CHECK(per_commitment_secret_arg->arr_len == 32); memcpy(per_commitment_secret_arg_ref.data, per_commitment_secret_arg->elems, 32); FREE(per_commitment_secret_arg); LDKPublicKey next_per_commitment_point_arg_ref; CHECK(next_per_commitment_point_arg->arr_len == 33); memcpy(next_per_commitment_point_arg_ref.compressed_form, next_per_commitment_point_arg->elems, 33); FREE(next_per_commitment_point_arg); - LDKRevokeAndACK ret_var = RevokeAndACK_new(channel_id_arg_ref, per_commitment_secret_arg_ref, next_per_commitment_point_arg_ref); + LDKRevokeAndACK ret_var = RevokeAndACK_new(channel_id_arg_conv, per_commitment_secret_arg_ref, next_per_commitment_point_arg_ref); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -47066,27 +50738,31 @@ void __attribute__((export_name("TS_UpdateFee_free"))) TS_UpdateFee_free(uint64 UpdateFee_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_UpdateFee_get_channel_id"))) TS_UpdateFee_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_UpdateFee_get_channel_id"))) TS_UpdateFee_get_channel_id(uint64_t this_ptr) { LDKUpdateFee this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *UpdateFee_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = UpdateFee_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_UpdateFee_set_channel_id"))) TS_UpdateFee_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_UpdateFee_set_channel_id"))) TS_UpdateFee_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKUpdateFee this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - UpdateFee_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + UpdateFee_set_channel_id(&this_ptr_conv, val_conv); } int32_t __attribute__((export_name("TS_UpdateFee_get_feerate_per_kw"))) TS_UpdateFee_get_feerate_per_kw(uint64_t this_ptr) { @@ -47108,11 +50784,13 @@ void __attribute__((export_name("TS_UpdateFee_set_feerate_per_kw"))) TS_UpdateF UpdateFee_set_feerate_per_kw(&this_ptr_conv, val); } -uint64_t __attribute__((export_name("TS_UpdateFee_new"))) TS_UpdateFee_new(int8_tArray channel_id_arg, int32_t feerate_per_kw_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); - LDKUpdateFee ret_var = UpdateFee_new(channel_id_arg_ref, feerate_per_kw_arg); +uint64_t __attribute__((export_name("TS_UpdateFee_new"))) TS_UpdateFee_new(uint64_t channel_id_arg, int32_t feerate_per_kw_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKUpdateFee ret_var = UpdateFee_new(channel_id_arg_conv, feerate_per_kw_arg); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -47182,27 +50860,31 @@ void __attribute__((export_name("TS_ChannelReestablish_free"))) TS_ChannelReest ChannelReestablish_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_ChannelReestablish_get_channel_id"))) TS_ChannelReestablish_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_ChannelReestablish_get_channel_id"))) TS_ChannelReestablish_get_channel_id(uint64_t this_ptr) { LDKChannelReestablish this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *ChannelReestablish_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = ChannelReestablish_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_ChannelReestablish_set_channel_id"))) TS_ChannelReestablish_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_ChannelReestablish_set_channel_id"))) TS_ChannelReestablish_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKChannelReestablish this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - ChannelReestablish_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ChannelReestablish_set_channel_id(&this_ptr_conv, val_conv); } int64_t __attribute__((export_name("TS_ChannelReestablish_get_next_local_commitment_number"))) TS_ChannelReestablish_get_next_local_commitment_number(uint64_t this_ptr) { @@ -47314,10 +50996,12 @@ void __attribute__((export_name("TS_ChannelReestablish_set_next_funding_txid")) ChannelReestablish_set_next_funding_txid(&this_ptr_conv, val_conv); } -uint64_t __attribute__((export_name("TS_ChannelReestablish_new"))) TS_ChannelReestablish_new(int8_tArray channel_id_arg, int64_t next_local_commitment_number_arg, int64_t next_remote_commitment_number_arg, int8_tArray your_last_per_commitment_secret_arg, int8_tArray my_current_per_commitment_point_arg, uint64_t next_funding_txid_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_ChannelReestablish_new"))) TS_ChannelReestablish_new(uint64_t channel_id_arg, int64_t next_local_commitment_number_arg, int64_t next_remote_commitment_number_arg, int8_tArray your_last_per_commitment_secret_arg, int8_tArray my_current_per_commitment_point_arg, uint64_t next_funding_txid_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes your_last_per_commitment_secret_arg_ref; CHECK(your_last_per_commitment_secret_arg->arr_len == 32); memcpy(your_last_per_commitment_secret_arg_ref.data, your_last_per_commitment_secret_arg->elems, 32); FREE(your_last_per_commitment_secret_arg); @@ -47328,7 +51012,7 @@ uint64_t __attribute__((export_name("TS_ChannelReestablish_new"))) TS_ChannelRe CHECK_ACCESS(next_funding_txid_arg_ptr); LDKCOption_ThirtyTwoBytesZ next_funding_txid_arg_conv = *(LDKCOption_ThirtyTwoBytesZ*)(next_funding_txid_arg_ptr); next_funding_txid_arg_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(next_funding_txid_arg)); - LDKChannelReestablish ret_var = ChannelReestablish_new(channel_id_arg_ref, next_local_commitment_number_arg, next_remote_commitment_number_arg, your_last_per_commitment_secret_arg_ref, my_current_per_commitment_point_arg_ref, next_funding_txid_arg_conv); + LDKChannelReestablish ret_var = ChannelReestablish_new(channel_id_arg_conv, next_local_commitment_number_arg, next_remote_commitment_number_arg, your_last_per_commitment_secret_arg_ref, my_current_per_commitment_point_arg_ref, next_funding_txid_arg_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -47398,27 +51082,31 @@ void __attribute__((export_name("TS_AnnouncementSignatures_free"))) TS_Announce AnnouncementSignatures_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_AnnouncementSignatures_get_channel_id"))) TS_AnnouncementSignatures_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_AnnouncementSignatures_get_channel_id"))) TS_AnnouncementSignatures_get_channel_id(uint64_t this_ptr) { LDKAnnouncementSignatures this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *AnnouncementSignatures_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = AnnouncementSignatures_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_AnnouncementSignatures_set_channel_id"))) TS_AnnouncementSignatures_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_AnnouncementSignatures_set_channel_id"))) TS_AnnouncementSignatures_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKAnnouncementSignatures this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - AnnouncementSignatures_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + AnnouncementSignatures_set_channel_id(&this_ptr_conv, val_conv); } int64_t __attribute__((export_name("TS_AnnouncementSignatures_get_short_channel_id"))) TS_AnnouncementSignatures_get_short_channel_id(uint64_t this_ptr) { @@ -47486,17 +51174,19 @@ void __attribute__((export_name("TS_AnnouncementSignatures_set_bitcoin_signatur AnnouncementSignatures_set_bitcoin_signature(&this_ptr_conv, val_ref); } -uint64_t __attribute__((export_name("TS_AnnouncementSignatures_new"))) TS_AnnouncementSignatures_new(int8_tArray channel_id_arg, int64_t short_channel_id_arg, int8_tArray node_signature_arg, int8_tArray bitcoin_signature_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_AnnouncementSignatures_new"))) TS_AnnouncementSignatures_new(uint64_t channel_id_arg, int64_t short_channel_id_arg, int8_tArray node_signature_arg, int8_tArray bitcoin_signature_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKECDSASignature node_signature_arg_ref; CHECK(node_signature_arg->arr_len == 64); memcpy(node_signature_arg_ref.compact_form, node_signature_arg->elems, 64); FREE(node_signature_arg); LDKECDSASignature bitcoin_signature_arg_ref; CHECK(bitcoin_signature_arg->arr_len == 64); memcpy(bitcoin_signature_arg_ref.compact_form, bitcoin_signature_arg->elems, 64); FREE(bitcoin_signature_arg); - LDKAnnouncementSignatures ret_var = AnnouncementSignatures_new(channel_id_arg_ref, short_channel_id_arg, node_signature_arg_ref, bitcoin_signature_arg_ref); + LDKAnnouncementSignatures ret_var = AnnouncementSignatures_new(channel_id_arg_conv, short_channel_id_arg, node_signature_arg_ref, bitcoin_signature_arg_ref); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -47976,6 +51666,107 @@ void __attribute__((export_name("TS_UnsignedNodeAnnouncement_set_addresses"))) UnsignedNodeAnnouncement_set_addresses(&this_ptr_conv, val_constr); } +int8_tArray __attribute__((export_name("TS_UnsignedNodeAnnouncement_get_excess_address_data"))) TS_UnsignedNodeAnnouncement_get_excess_address_data(uint64_t this_ptr) { + LDKUnsignedNodeAnnouncement this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z ret_var = UnsignedNodeAnnouncement_get_excess_address_data(&this_ptr_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +void __attribute__((export_name("TS_UnsignedNodeAnnouncement_set_excess_address_data"))) TS_UnsignedNodeAnnouncement_set_excess_address_data(uint64_t this_ptr, int8_tArray val) { + LDKUnsignedNodeAnnouncement this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z val_ref; + val_ref.datalen = val->arr_len; + val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(val_ref.data, val->elems, val_ref.datalen); FREE(val); + UnsignedNodeAnnouncement_set_excess_address_data(&this_ptr_conv, val_ref); +} + +int8_tArray __attribute__((export_name("TS_UnsignedNodeAnnouncement_get_excess_data"))) TS_UnsignedNodeAnnouncement_get_excess_data(uint64_t this_ptr) { + LDKUnsignedNodeAnnouncement this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z ret_var = UnsignedNodeAnnouncement_get_excess_data(&this_ptr_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +void __attribute__((export_name("TS_UnsignedNodeAnnouncement_set_excess_data"))) TS_UnsignedNodeAnnouncement_set_excess_data(uint64_t this_ptr, int8_tArray val) { + LDKUnsignedNodeAnnouncement this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z val_ref; + val_ref.datalen = val->arr_len; + val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(val_ref.data, val->elems, val_ref.datalen); FREE(val); + UnsignedNodeAnnouncement_set_excess_data(&this_ptr_conv, val_ref); +} + +uint64_t __attribute__((export_name("TS_UnsignedNodeAnnouncement_new"))) TS_UnsignedNodeAnnouncement_new(uint64_t features_arg, int32_t timestamp_arg, uint64_t node_id_arg, int8_tArray rgb_arg, uint64_t alias_arg, uint64_tArray addresses_arg, int8_tArray excess_address_data_arg, int8_tArray excess_data_arg) { + LDKNodeFeatures features_arg_conv; + features_arg_conv.inner = untag_ptr(features_arg); + features_arg_conv.is_owned = ptr_is_owned(features_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(features_arg_conv); + features_arg_conv = NodeFeatures_clone(&features_arg_conv); + LDKNodeId node_id_arg_conv; + node_id_arg_conv.inner = untag_ptr(node_id_arg); + node_id_arg_conv.is_owned = ptr_is_owned(node_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(node_id_arg_conv); + node_id_arg_conv = NodeId_clone(&node_id_arg_conv); + LDKThreeBytes rgb_arg_ref; + CHECK(rgb_arg->arr_len == 3); + memcpy(rgb_arg_ref.data, rgb_arg->elems, 3); FREE(rgb_arg); + LDKNodeAlias alias_arg_conv; + alias_arg_conv.inner = untag_ptr(alias_arg); + alias_arg_conv.is_owned = ptr_is_owned(alias_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(alias_arg_conv); + alias_arg_conv = NodeAlias_clone(&alias_arg_conv); + LDKCVec_SocketAddressZ addresses_arg_constr; + addresses_arg_constr.datalen = addresses_arg->arr_len; + if (addresses_arg_constr.datalen > 0) + addresses_arg_constr.data = MALLOC(addresses_arg_constr.datalen * sizeof(LDKSocketAddress), "LDKCVec_SocketAddressZ Elements"); + else + addresses_arg_constr.data = NULL; + uint64_t* addresses_arg_vals = addresses_arg->elems; + for (size_t p = 0; p < addresses_arg_constr.datalen; p++) { + uint64_t addresses_arg_conv_15 = addresses_arg_vals[p]; + void* addresses_arg_conv_15_ptr = untag_ptr(addresses_arg_conv_15); + CHECK_ACCESS(addresses_arg_conv_15_ptr); + LDKSocketAddress addresses_arg_conv_15_conv = *(LDKSocketAddress*)(addresses_arg_conv_15_ptr); + addresses_arg_constr.data[p] = addresses_arg_conv_15_conv; + } + FREE(addresses_arg); + LDKCVec_u8Z excess_address_data_arg_ref; + excess_address_data_arg_ref.datalen = excess_address_data_arg->arr_len; + excess_address_data_arg_ref.data = MALLOC(excess_address_data_arg_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(excess_address_data_arg_ref.data, excess_address_data_arg->elems, excess_address_data_arg_ref.datalen); FREE(excess_address_data_arg); + LDKCVec_u8Z excess_data_arg_ref; + excess_data_arg_ref.datalen = excess_data_arg->arr_len; + excess_data_arg_ref.data = MALLOC(excess_data_arg_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(excess_data_arg_ref.data, excess_data_arg->elems, excess_data_arg_ref.datalen); FREE(excess_data_arg); + LDKUnsignedNodeAnnouncement ret_var = UnsignedNodeAnnouncement_new(features_arg_conv, timestamp_arg, node_id_arg_conv, rgb_arg_ref, alias_arg_conv, addresses_arg_constr, excess_address_data_arg_ref, excess_data_arg_ref); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + static inline uint64_t UnsignedNodeAnnouncement_clone_ptr(LDKUnsignedNodeAnnouncement *NONNULL_PTR arg) { LDKUnsignedNodeAnnouncement ret_var = UnsignedNodeAnnouncement_clone(arg); uint64_t ret_ref = 0; @@ -50668,6 +54459,191 @@ jboolean __attribute__((export_name("TS_OnionPacket_eq"))) TS_OnionPacket_eq(ui return ret_conv; } +void __attribute__((export_name("TS_TrampolineOnionPacket_free"))) TS_TrampolineOnionPacket_free(uint64_t this_obj) { + LDKTrampolineOnionPacket this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + TrampolineOnionPacket_free(this_obj_conv); +} + +int8_t __attribute__((export_name("TS_TrampolineOnionPacket_get_version"))) TS_TrampolineOnionPacket_get_version(uint64_t this_ptr) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_t ret_conv = TrampolineOnionPacket_get_version(&this_ptr_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_TrampolineOnionPacket_set_version"))) TS_TrampolineOnionPacket_set_version(uint64_t this_ptr, int8_t val) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + TrampolineOnionPacket_set_version(&this_ptr_conv, val); +} + +int8_tArray __attribute__((export_name("TS_TrampolineOnionPacket_get_public_key"))) TS_TrampolineOnionPacket_get_public_key(uint64_t this_ptr) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(33, __LINE__); + memcpy(ret_arr->elems, TrampolineOnionPacket_get_public_key(&this_ptr_conv).compressed_form, 33); + return ret_arr; +} + +void __attribute__((export_name("TS_TrampolineOnionPacket_set_public_key"))) TS_TrampolineOnionPacket_set_public_key(uint64_t this_ptr, int8_tArray val) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKPublicKey val_ref; + CHECK(val->arr_len == 33); + memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); + TrampolineOnionPacket_set_public_key(&this_ptr_conv, val_ref); +} + +int8_tArray __attribute__((export_name("TS_TrampolineOnionPacket_get_hop_data"))) TS_TrampolineOnionPacket_get_hop_data(uint64_t this_ptr) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z ret_var = TrampolineOnionPacket_get_hop_data(&this_ptr_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +void __attribute__((export_name("TS_TrampolineOnionPacket_set_hop_data"))) TS_TrampolineOnionPacket_set_hop_data(uint64_t this_ptr, int8_tArray val) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z val_ref; + val_ref.datalen = val->arr_len; + val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(val_ref.data, val->elems, val_ref.datalen); FREE(val); + TrampolineOnionPacket_set_hop_data(&this_ptr_conv, val_ref); +} + +int8_tArray __attribute__((export_name("TS_TrampolineOnionPacket_get_hmac"))) TS_TrampolineOnionPacket_get_hmac(uint64_t this_ptr) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(32, __LINE__); + memcpy(ret_arr->elems, *TrampolineOnionPacket_get_hmac(&this_ptr_conv), 32); + return ret_arr; +} + +void __attribute__((export_name("TS_TrampolineOnionPacket_set_hmac"))) TS_TrampolineOnionPacket_set_hmac(uint64_t this_ptr, int8_tArray val) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKThirtyTwoBytes val_ref; + CHECK(val->arr_len == 32); + memcpy(val_ref.data, val->elems, 32); FREE(val); + TrampolineOnionPacket_set_hmac(&this_ptr_conv, val_ref); +} + +uint64_t __attribute__((export_name("TS_TrampolineOnionPacket_new"))) TS_TrampolineOnionPacket_new(int8_t version_arg, int8_tArray public_key_arg, int8_tArray hop_data_arg, int8_tArray hmac_arg) { + LDKPublicKey public_key_arg_ref; + CHECK(public_key_arg->arr_len == 33); + memcpy(public_key_arg_ref.compressed_form, public_key_arg->elems, 33); FREE(public_key_arg); + LDKCVec_u8Z hop_data_arg_ref; + hop_data_arg_ref.datalen = hop_data_arg->arr_len; + hop_data_arg_ref.data = MALLOC(hop_data_arg_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(hop_data_arg_ref.data, hop_data_arg->elems, hop_data_arg_ref.datalen); FREE(hop_data_arg); + LDKThirtyTwoBytes hmac_arg_ref; + CHECK(hmac_arg->arr_len == 32); + memcpy(hmac_arg_ref.data, hmac_arg->elems, 32); FREE(hmac_arg); + LDKTrampolineOnionPacket ret_var = TrampolineOnionPacket_new(version_arg, public_key_arg_ref, hop_data_arg_ref, hmac_arg_ref); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t TrampolineOnionPacket_clone_ptr(LDKTrampolineOnionPacket *NONNULL_PTR arg) { + LDKTrampolineOnionPacket ret_var = TrampolineOnionPacket_clone(arg); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t __attribute__((export_name("TS_TrampolineOnionPacket_clone_ptr"))) TS_TrampolineOnionPacket_clone_ptr(uint64_t arg) { + LDKTrampolineOnionPacket arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = TrampolineOnionPacket_clone_ptr(&arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_TrampolineOnionPacket_clone"))) TS_TrampolineOnionPacket_clone(uint64_t orig) { + LDKTrampolineOnionPacket orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKTrampolineOnionPacket ret_var = TrampolineOnionPacket_clone(&orig_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t __attribute__((export_name("TS_TrampolineOnionPacket_hash"))) TS_TrampolineOnionPacket_hash(uint64_t o) { + LDKTrampolineOnionPacket o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = TrampolineOnionPacket_hash(&o_conv); + return ret_conv; +} + +jboolean __attribute__((export_name("TS_TrampolineOnionPacket_eq"))) TS_TrampolineOnionPacket_eq(uint64_t a, uint64_t b) { + LDKTrampolineOnionPacket a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKTrampolineOnionPacket b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = TrampolineOnionPacket_eq(&a_conv, &b_conv); + return ret_conv; +} + +int8_tArray __attribute__((export_name("TS_TrampolineOnionPacket_write"))) TS_TrampolineOnionPacket_write(uint64_t obj) { + LDKTrampolineOnionPacket obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = TrampolineOnionPacket_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + int8_tArray __attribute__((export_name("TS_AcceptChannel_write"))) TS_AcceptChannel_write(uint64_t obj) { LDKAcceptChannel obj_conv; obj_conv.inner = untag_ptr(obj); @@ -52185,6 +56161,127 @@ void __attribute__((export_name("TS_SocketDescriptor_free"))) TS_SocketDescript SocketDescriptor_free(this_ptr_conv); } +void __attribute__((export_name("TS_PeerDetails_free"))) TS_PeerDetails_free(uint64_t this_obj) { + LDKPeerDetails this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + PeerDetails_free(this_obj_conv); +} + +int8_tArray __attribute__((export_name("TS_PeerDetails_get_counterparty_node_id"))) TS_PeerDetails_get_counterparty_node_id(uint64_t this_ptr) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(33, __LINE__); + memcpy(ret_arr->elems, PeerDetails_get_counterparty_node_id(&this_ptr_conv).compressed_form, 33); + return ret_arr; +} + +void __attribute__((export_name("TS_PeerDetails_set_counterparty_node_id"))) TS_PeerDetails_set_counterparty_node_id(uint64_t this_ptr, int8_tArray val) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKPublicKey val_ref; + CHECK(val->arr_len == 33); + memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); + PeerDetails_set_counterparty_node_id(&this_ptr_conv, val_ref); +} + +uint64_t __attribute__((export_name("TS_PeerDetails_get_socket_address"))) TS_PeerDetails_get_socket_address(uint64_t this_ptr) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCOption_SocketAddressZ *ret_copy = MALLOC(sizeof(LDKCOption_SocketAddressZ), "LDKCOption_SocketAddressZ"); + *ret_copy = PeerDetails_get_socket_address(&this_ptr_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void __attribute__((export_name("TS_PeerDetails_set_socket_address"))) TS_PeerDetails_set_socket_address(uint64_t this_ptr, uint64_t val) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKCOption_SocketAddressZ val_conv = *(LDKCOption_SocketAddressZ*)(val_ptr); + val_conv = COption_SocketAddressZ_clone((LDKCOption_SocketAddressZ*)untag_ptr(val)); + PeerDetails_set_socket_address(&this_ptr_conv, val_conv); +} + +uint64_t __attribute__((export_name("TS_PeerDetails_get_init_features"))) TS_PeerDetails_get_init_features(uint64_t this_ptr) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKInitFeatures ret_var = PeerDetails_get_init_features(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void __attribute__((export_name("TS_PeerDetails_set_init_features"))) TS_PeerDetails_set_init_features(uint64_t this_ptr, uint64_t val) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKInitFeatures val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = InitFeatures_clone(&val_conv); + PeerDetails_set_init_features(&this_ptr_conv, val_conv); +} + +jboolean __attribute__((export_name("TS_PeerDetails_get_is_inbound_connection"))) TS_PeerDetails_get_is_inbound_connection(uint64_t this_ptr) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + jboolean ret_conv = PeerDetails_get_is_inbound_connection(&this_ptr_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_PeerDetails_set_is_inbound_connection"))) TS_PeerDetails_set_is_inbound_connection(uint64_t this_ptr, jboolean val) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + PeerDetails_set_is_inbound_connection(&this_ptr_conv, val); +} + +uint64_t __attribute__((export_name("TS_PeerDetails_new"))) TS_PeerDetails_new(int8_tArray counterparty_node_id_arg, uint64_t socket_address_arg, uint64_t init_features_arg, jboolean is_inbound_connection_arg) { + LDKPublicKey counterparty_node_id_arg_ref; + CHECK(counterparty_node_id_arg->arr_len == 33); + memcpy(counterparty_node_id_arg_ref.compressed_form, counterparty_node_id_arg->elems, 33); FREE(counterparty_node_id_arg); + void* socket_address_arg_ptr = untag_ptr(socket_address_arg); + CHECK_ACCESS(socket_address_arg_ptr); + LDKCOption_SocketAddressZ socket_address_arg_conv = *(LDKCOption_SocketAddressZ*)(socket_address_arg_ptr); + LDKInitFeatures init_features_arg_conv; + init_features_arg_conv.inner = untag_ptr(init_features_arg); + init_features_arg_conv.is_owned = ptr_is_owned(init_features_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(init_features_arg_conv); + init_features_arg_conv = InitFeatures_clone(&init_features_arg_conv); + LDKPeerDetails ret_var = PeerDetails_new(counterparty_node_id_arg_ref, socket_address_arg_conv, init_features_arg_conv, is_inbound_connection_arg); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + void __attribute__((export_name("TS_PeerHandleError_free"))) TS_PeerHandleError_free(uint64_t this_obj) { LDKPeerHandleError this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -52271,26 +56368,44 @@ uint64_t __attribute__((export_name("TS_PeerManager_new"))) TS_PeerManager_new( return ret_ref; } -uint64_tArray __attribute__((export_name("TS_PeerManager_get_peer_node_ids"))) TS_PeerManager_get_peer_node_ids(uint64_t this_arg) { +uint64_tArray __attribute__((export_name("TS_PeerManager_list_peers"))) TS_PeerManager_list_peers(uint64_t this_arg) { LDKPeerManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ ret_var = PeerManager_get_peer_node_ids(&this_arg_conv); + LDKCVec_PeerDetailsZ ret_var = PeerManager_list_peers(&this_arg_conv); uint64_tArray ret_arr = NULL; ret_arr = init_uint64_tArray(ret_var.datalen, __LINE__); uint64_t *ret_arr_ptr = (uint64_t*)(((uint8_t*)ret_arr) + 8); - for (size_t r = 0; r < ret_var.datalen; r++) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv_43_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ"); - *ret_conv_43_conv = ret_var.data[r]; - ret_arr_ptr[r] = tag_ptr(ret_conv_43_conv, true); + for (size_t n = 0; n < ret_var.datalen; n++) { + LDKPeerDetails ret_conv_13_var = ret_var.data[n]; + uint64_t ret_conv_13_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_13_var); + ret_conv_13_ref = tag_ptr(ret_conv_13_var.inner, ret_conv_13_var.is_owned); + ret_arr_ptr[n] = ret_conv_13_ref; } FREE(ret_var.data); return ret_arr; } +uint64_t __attribute__((export_name("TS_PeerManager_peer_by_node_id"))) TS_PeerManager_peer_by_node_id(uint64_t this_arg, int8_tArray their_node_id) { + LDKPeerManager this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKPublicKey their_node_id_ref; + CHECK(their_node_id->arr_len == 33); + memcpy(their_node_id_ref.compressed_form, their_node_id->elems, 33); FREE(their_node_id); + LDKPeerDetails ret_var = PeerManager_peer_by_node_id(&this_arg_conv, their_node_id_ref); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + uint64_t __attribute__((export_name("TS_PeerManager_new_outbound_connection"))) TS_PeerManager_new_outbound_connection(uint64_t this_arg, int8_tArray their_node_id, uint64_t descriptor, uint64_t remote_network_address) { LDKPeerManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -58123,6 +62238,120 @@ jboolean __attribute__((export_name("TS_NodeFeatures_requires_keysend"))) TS_No return ret_conv; } +void __attribute__((export_name("TS_InitFeatures_set_trampoline_routing_optional"))) TS_InitFeatures_set_trampoline_routing_optional(uint64_t this_arg) { + LDKInitFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + InitFeatures_set_trampoline_routing_optional(&this_arg_conv); +} + +void __attribute__((export_name("TS_InitFeatures_set_trampoline_routing_required"))) TS_InitFeatures_set_trampoline_routing_required(uint64_t this_arg) { + LDKInitFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + InitFeatures_set_trampoline_routing_required(&this_arg_conv); +} + +jboolean __attribute__((export_name("TS_InitFeatures_supports_trampoline_routing"))) TS_InitFeatures_supports_trampoline_routing(uint64_t this_arg) { + LDKInitFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = InitFeatures_supports_trampoline_routing(&this_arg_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_NodeFeatures_set_trampoline_routing_optional"))) TS_NodeFeatures_set_trampoline_routing_optional(uint64_t this_arg) { + LDKNodeFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + NodeFeatures_set_trampoline_routing_optional(&this_arg_conv); +} + +void __attribute__((export_name("TS_NodeFeatures_set_trampoline_routing_required"))) TS_NodeFeatures_set_trampoline_routing_required(uint64_t this_arg) { + LDKNodeFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + NodeFeatures_set_trampoline_routing_required(&this_arg_conv); +} + +jboolean __attribute__((export_name("TS_NodeFeatures_supports_trampoline_routing"))) TS_NodeFeatures_supports_trampoline_routing(uint64_t this_arg) { + LDKNodeFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = NodeFeatures_supports_trampoline_routing(&this_arg_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_Bolt11InvoiceFeatures_set_trampoline_routing_optional"))) TS_Bolt11InvoiceFeatures_set_trampoline_routing_optional(uint64_t this_arg) { + LDKBolt11InvoiceFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + Bolt11InvoiceFeatures_set_trampoline_routing_optional(&this_arg_conv); +} + +void __attribute__((export_name("TS_Bolt11InvoiceFeatures_set_trampoline_routing_required"))) TS_Bolt11InvoiceFeatures_set_trampoline_routing_required(uint64_t this_arg) { + LDKBolt11InvoiceFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + Bolt11InvoiceFeatures_set_trampoline_routing_required(&this_arg_conv); +} + +jboolean __attribute__((export_name("TS_Bolt11InvoiceFeatures_supports_trampoline_routing"))) TS_Bolt11InvoiceFeatures_supports_trampoline_routing(uint64_t this_arg) { + LDKBolt11InvoiceFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = Bolt11InvoiceFeatures_supports_trampoline_routing(&this_arg_conv); + return ret_conv; +} + +jboolean __attribute__((export_name("TS_InitFeatures_requires_trampoline_routing"))) TS_InitFeatures_requires_trampoline_routing(uint64_t this_arg) { + LDKInitFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = InitFeatures_requires_trampoline_routing(&this_arg_conv); + return ret_conv; +} + +jboolean __attribute__((export_name("TS_NodeFeatures_requires_trampoline_routing"))) TS_NodeFeatures_requires_trampoline_routing(uint64_t this_arg) { + LDKNodeFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = NodeFeatures_requires_trampoline_routing(&this_arg_conv); + return ret_conv; +} + +jboolean __attribute__((export_name("TS_Bolt11InvoiceFeatures_requires_trampoline_routing"))) TS_Bolt11InvoiceFeatures_requires_trampoline_routing(uint64_t this_arg) { + LDKBolt11InvoiceFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = Bolt11InvoiceFeatures_requires_trampoline_routing(&this_arg_conv); + return ret_conv; +} + void __attribute__((export_name("TS_ShutdownScript_free"))) TS_ShutdownScript_free(uint64_t this_obj) { LDKShutdownScript this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -58348,6 +62577,222 @@ jboolean __attribute__((export_name("TS_ShutdownScript_is_compatible"))) TS_Shu return ret_conv; } +void __attribute__((export_name("TS_ChannelId_free"))) TS_ChannelId_free(uint64_t this_obj) { + LDKChannelId this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + ChannelId_free(this_obj_conv); +} + +int8_tArray __attribute__((export_name("TS_ChannelId_get_a"))) TS_ChannelId_get_a(uint64_t this_ptr) { + LDKChannelId this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(32, __LINE__); + memcpy(ret_arr->elems, *ChannelId_get_a(&this_ptr_conv), 32); + return ret_arr; +} + +void __attribute__((export_name("TS_ChannelId_set_a"))) TS_ChannelId_set_a(uint64_t this_ptr, int8_tArray val) { + LDKChannelId this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKThirtyTwoBytes val_ref; + CHECK(val->arr_len == 32); + memcpy(val_ref.data, val->elems, 32); FREE(val); + ChannelId_set_a(&this_ptr_conv, val_ref); +} + +uint64_t __attribute__((export_name("TS_ChannelId_new"))) TS_ChannelId_new(int8_tArray a_arg) { + LDKThirtyTwoBytes a_arg_ref; + CHECK(a_arg->arr_len == 32); + memcpy(a_arg_ref.data, a_arg->elems, 32); FREE(a_arg); + LDKChannelId ret_var = ChannelId_new(a_arg_ref); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t ChannelId_clone_ptr(LDKChannelId *NONNULL_PTR arg) { + LDKChannelId ret_var = ChannelId_clone(arg); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t __attribute__((export_name("TS_ChannelId_clone_ptr"))) TS_ChannelId_clone_ptr(uint64_t arg) { + LDKChannelId arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = ChannelId_clone_ptr(&arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_ChannelId_clone"))) TS_ChannelId_clone(uint64_t orig) { + LDKChannelId orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKChannelId ret_var = ChannelId_clone(&orig_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +jboolean __attribute__((export_name("TS_ChannelId_eq"))) TS_ChannelId_eq(uint64_t a, uint64_t b) { + LDKChannelId a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKChannelId b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = ChannelId_eq(&a_conv, &b_conv); + return ret_conv; +} + +int64_t __attribute__((export_name("TS_ChannelId_hash"))) TS_ChannelId_hash(uint64_t o) { + LDKChannelId o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = ChannelId_hash(&o_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_ChannelId_v1_from_funding_txid"))) TS_ChannelId_v1_from_funding_txid(int8_tArray txid, int16_t output_index) { + uint8_t txid_arr[32]; + CHECK(txid->arr_len == 32); + memcpy(txid_arr, txid->elems, 32); FREE(txid); + uint8_t (*txid_ref)[32] = &txid_arr; + LDKChannelId ret_var = ChannelId_v1_from_funding_txid(txid_ref, output_index); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_ChannelId_v1_from_funding_outpoint"))) TS_ChannelId_v1_from_funding_outpoint(uint64_t outpoint) { + LDKOutPoint outpoint_conv; + outpoint_conv.inner = untag_ptr(outpoint); + outpoint_conv.is_owned = ptr_is_owned(outpoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_conv); + outpoint_conv = OutPoint_clone(&outpoint_conv); + LDKChannelId ret_var = ChannelId_v1_from_funding_outpoint(outpoint_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_ChannelId_temporary_from_entropy_source"))) TS_ChannelId_temporary_from_entropy_source(uint64_t entropy_source) { + void* entropy_source_ptr = untag_ptr(entropy_source); + if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } + LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + LDKChannelId ret_var = ChannelId_temporary_from_entropy_source(entropy_source_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_ChannelId_from_bytes"))) TS_ChannelId_from_bytes(int8_tArray data) { + LDKThirtyTwoBytes data_ref; + CHECK(data->arr_len == 32); + memcpy(data_ref.data, data->elems, 32); FREE(data); + LDKChannelId ret_var = ChannelId_from_bytes(data_ref); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_ChannelId_new_zero"))) TS_ChannelId_new_zero() { + LDKChannelId ret_var = ChannelId_new_zero(); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +jboolean __attribute__((export_name("TS_ChannelId_is_zero"))) TS_ChannelId_is_zero(uint64_t this_arg) { + LDKChannelId this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = ChannelId_is_zero(&this_arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_ChannelId_v2_from_revocation_basepoints"))) TS_ChannelId_v2_from_revocation_basepoints(uint64_t ours, uint64_t theirs) { + LDKRevocationBasepoint ours_conv; + ours_conv.inner = untag_ptr(ours); + ours_conv.is_owned = ptr_is_owned(ours); + CHECK_INNER_FIELD_ACCESS_OR_NULL(ours_conv); + ours_conv.is_owned = false; + LDKRevocationBasepoint theirs_conv; + theirs_conv.inner = untag_ptr(theirs); + theirs_conv.is_owned = ptr_is_owned(theirs); + CHECK_INNER_FIELD_ACCESS_OR_NULL(theirs_conv); + theirs_conv.is_owned = false; + LDKChannelId ret_var = ChannelId_v2_from_revocation_basepoints(&ours_conv, &theirs_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_ChannelId_temporary_v2_from_revocation_basepoint"))) TS_ChannelId_temporary_v2_from_revocation_basepoint(uint64_t our_revocation_basepoint) { + LDKRevocationBasepoint our_revocation_basepoint_conv; + our_revocation_basepoint_conv.inner = untag_ptr(our_revocation_basepoint); + our_revocation_basepoint_conv.is_owned = ptr_is_owned(our_revocation_basepoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(our_revocation_basepoint_conv); + our_revocation_basepoint_conv.is_owned = false; + LDKChannelId ret_var = ChannelId_temporary_v2_from_revocation_basepoint(&our_revocation_basepoint_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int8_tArray __attribute__((export_name("TS_ChannelId_write"))) TS_ChannelId_write(uint64_t obj) { + LDKChannelId obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = ChannelId_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +uint64_t __attribute__((export_name("TS_ChannelId_read"))) TS_ChannelId_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ"); + *ret_conv = ChannelId_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + void __attribute__((export_name("TS_Retry_free"))) TS_Retry_free(uint64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -58860,6 +63305,413 @@ void __attribute__((export_name("TS_Type_free"))) TS_Type_free(uint64_t this_pt Type_free(this_ptr_conv); } +void __attribute__((export_name("TS_OfferId_free"))) TS_OfferId_free(uint64_t this_obj) { + LDKOfferId this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + OfferId_free(this_obj_conv); +} + +int8_tArray __attribute__((export_name("TS_OfferId_get_a"))) TS_OfferId_get_a(uint64_t this_ptr) { + LDKOfferId this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(32, __LINE__); + memcpy(ret_arr->elems, *OfferId_get_a(&this_ptr_conv), 32); + return ret_arr; +} + +void __attribute__((export_name("TS_OfferId_set_a"))) TS_OfferId_set_a(uint64_t this_ptr, int8_tArray val) { + LDKOfferId this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKThirtyTwoBytes val_ref; + CHECK(val->arr_len == 32); + memcpy(val_ref.data, val->elems, 32); FREE(val); + OfferId_set_a(&this_ptr_conv, val_ref); +} + +uint64_t __attribute__((export_name("TS_OfferId_new"))) TS_OfferId_new(int8_tArray a_arg) { + LDKThirtyTwoBytes a_arg_ref; + CHECK(a_arg->arr_len == 32); + memcpy(a_arg_ref.data, a_arg->elems, 32); FREE(a_arg); + LDKOfferId ret_var = OfferId_new(a_arg_ref); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t OfferId_clone_ptr(LDKOfferId *NONNULL_PTR arg) { + LDKOfferId ret_var = OfferId_clone(arg); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t __attribute__((export_name("TS_OfferId_clone_ptr"))) TS_OfferId_clone_ptr(uint64_t arg) { + LDKOfferId arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = OfferId_clone_ptr(&arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_OfferId_clone"))) TS_OfferId_clone(uint64_t orig) { + LDKOfferId orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKOfferId ret_var = OfferId_clone(&orig_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +jboolean __attribute__((export_name("TS_OfferId_eq"))) TS_OfferId_eq(uint64_t a, uint64_t b) { + LDKOfferId a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKOfferId b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = OfferId_eq(&a_conv, &b_conv); + return ret_conv; +} + +int8_tArray __attribute__((export_name("TS_OfferId_write"))) TS_OfferId_write(uint64_t obj) { + LDKOfferId obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = OfferId_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +uint64_t __attribute__((export_name("TS_OfferId_read"))) TS_OfferId_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ"); + *ret_conv = OfferId_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + +void __attribute__((export_name("TS_OfferWithExplicitMetadataBuilder_free"))) TS_OfferWithExplicitMetadataBuilder_free(uint64_t this_obj) { + LDKOfferWithExplicitMetadataBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + OfferWithExplicitMetadataBuilder_free(this_obj_conv); +} + +static inline uint64_t OfferWithExplicitMetadataBuilder_clone_ptr(LDKOfferWithExplicitMetadataBuilder *NONNULL_PTR arg) { + LDKOfferWithExplicitMetadataBuilder ret_var = OfferWithExplicitMetadataBuilder_clone(arg); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t __attribute__((export_name("TS_OfferWithExplicitMetadataBuilder_clone_ptr"))) TS_OfferWithExplicitMetadataBuilder_clone_ptr(uint64_t arg) { + LDKOfferWithExplicitMetadataBuilder arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = OfferWithExplicitMetadataBuilder_clone_ptr(&arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_OfferWithExplicitMetadataBuilder_clone"))) TS_OfferWithExplicitMetadataBuilder_clone(uint64_t orig) { + LDKOfferWithExplicitMetadataBuilder orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKOfferWithExplicitMetadataBuilder ret_var = OfferWithExplicitMetadataBuilder_clone(&orig_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void __attribute__((export_name("TS_OfferWithDerivedMetadataBuilder_free"))) TS_OfferWithDerivedMetadataBuilder_free(uint64_t this_obj) { + LDKOfferWithDerivedMetadataBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + OfferWithDerivedMetadataBuilder_free(this_obj_conv); +} + +static inline uint64_t OfferWithDerivedMetadataBuilder_clone_ptr(LDKOfferWithDerivedMetadataBuilder *NONNULL_PTR arg) { + LDKOfferWithDerivedMetadataBuilder ret_var = OfferWithDerivedMetadataBuilder_clone(arg); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t __attribute__((export_name("TS_OfferWithDerivedMetadataBuilder_clone_ptr"))) TS_OfferWithDerivedMetadataBuilder_clone_ptr(uint64_t arg) { + LDKOfferWithDerivedMetadataBuilder arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = OfferWithDerivedMetadataBuilder_clone_ptr(&arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_OfferWithDerivedMetadataBuilder_clone"))) TS_OfferWithDerivedMetadataBuilder_clone(uint64_t orig) { + LDKOfferWithDerivedMetadataBuilder orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKOfferWithDerivedMetadataBuilder ret_var = OfferWithDerivedMetadataBuilder_clone(&orig_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_OfferWithExplicitMetadataBuilder_new"))) TS_OfferWithExplicitMetadataBuilder_new(int8_tArray signing_pubkey) { + LDKPublicKey signing_pubkey_ref; + CHECK(signing_pubkey->arr_len == 33); + memcpy(signing_pubkey_ref.compressed_form, signing_pubkey->elems, 33); FREE(signing_pubkey); + LDKOfferWithExplicitMetadataBuilder ret_var = OfferWithExplicitMetadataBuilder_new(signing_pubkey_ref); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_OfferWithExplicitMetadataBuilder_metadata"))) TS_OfferWithExplicitMetadataBuilder_metadata(uint64_t this_arg, int8_tArray metadata) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKCVec_u8Z metadata_ref; + metadata_ref.datalen = metadata->arr_len; + metadata_ref.data = MALLOC(metadata_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(metadata_ref.data, metadata->elems, metadata_ref.datalen); FREE(metadata); + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = OfferWithExplicitMetadataBuilder_metadata(this_arg_conv, metadata_ref); + return tag_ptr(ret_conv, true); +} + +void __attribute__((export_name("TS_OfferWithExplicitMetadataBuilder_chain"))) TS_OfferWithExplicitMetadataBuilder_chain(uint64_t this_arg, uint32_t network) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKNetwork network_conv = LDKNetwork_from_js(network); + OfferWithExplicitMetadataBuilder_chain(this_arg_conv, network_conv); +} + +void __attribute__((export_name("TS_OfferWithExplicitMetadataBuilder_amount_msats"))) TS_OfferWithExplicitMetadataBuilder_amount_msats(uint64_t this_arg, int64_t amount_msats) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + OfferWithExplicitMetadataBuilder_amount_msats(this_arg_conv, amount_msats); +} + +void __attribute__((export_name("TS_OfferWithExplicitMetadataBuilder_absolute_expiry"))) TS_OfferWithExplicitMetadataBuilder_absolute_expiry(uint64_t this_arg, int64_t absolute_expiry) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + OfferWithExplicitMetadataBuilder_absolute_expiry(this_arg_conv, absolute_expiry); +} + +void __attribute__((export_name("TS_OfferWithExplicitMetadataBuilder_description"))) TS_OfferWithExplicitMetadataBuilder_description(uint64_t this_arg, jstring description) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKStr description_conv = str_ref_to_owned_c(description); + OfferWithExplicitMetadataBuilder_description(this_arg_conv, description_conv); +} + +void __attribute__((export_name("TS_OfferWithExplicitMetadataBuilder_issuer"))) TS_OfferWithExplicitMetadataBuilder_issuer(uint64_t this_arg, jstring issuer) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKStr issuer_conv = str_ref_to_owned_c(issuer); + OfferWithExplicitMetadataBuilder_issuer(this_arg_conv, issuer_conv); +} + +void __attribute__((export_name("TS_OfferWithExplicitMetadataBuilder_path"))) TS_OfferWithExplicitMetadataBuilder_path(uint64_t this_arg, uint64_t path) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKBlindedPath path_conv; + path_conv.inner = untag_ptr(path); + path_conv.is_owned = ptr_is_owned(path); + CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv); + path_conv = BlindedPath_clone(&path_conv); + OfferWithExplicitMetadataBuilder_path(this_arg_conv, path_conv); +} + +void __attribute__((export_name("TS_OfferWithExplicitMetadataBuilder_supported_quantity"))) TS_OfferWithExplicitMetadataBuilder_supported_quantity(uint64_t this_arg, uint64_t quantity) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + void* quantity_ptr = untag_ptr(quantity); + CHECK_ACCESS(quantity_ptr); + LDKQuantity quantity_conv = *(LDKQuantity*)(quantity_ptr); + quantity_conv = Quantity_clone((LDKQuantity*)untag_ptr(quantity)); + OfferWithExplicitMetadataBuilder_supported_quantity(this_arg_conv, quantity_conv); +} + +uint64_t __attribute__((export_name("TS_OfferWithExplicitMetadataBuilder_build"))) TS_OfferWithExplicitMetadataBuilder_build(uint64_t this_arg) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = OfferWithExplicitMetadataBuilder_build(this_arg_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_OfferWithDerivedMetadataBuilder_deriving_signing_pubkey"))) TS_OfferWithDerivedMetadataBuilder_deriving_signing_pubkey(int8_tArray node_id, uint64_t expanded_key, uint64_t entropy_source) { + LDKPublicKey node_id_ref; + CHECK(node_id->arr_len == 33); + memcpy(node_id_ref.compressed_form, node_id->elems, 33); FREE(node_id); + LDKExpandedKey expanded_key_conv; + expanded_key_conv.inner = untag_ptr(expanded_key); + expanded_key_conv.is_owned = ptr_is_owned(expanded_key); + CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv); + expanded_key_conv.is_owned = false; + void* entropy_source_ptr = untag_ptr(entropy_source); + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } + LDKOfferWithDerivedMetadataBuilder ret_var = OfferWithDerivedMetadataBuilder_deriving_signing_pubkey(node_id_ref, &expanded_key_conv, entropy_source_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void __attribute__((export_name("TS_OfferWithDerivedMetadataBuilder_chain"))) TS_OfferWithDerivedMetadataBuilder_chain(uint64_t this_arg, uint32_t network) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKNetwork network_conv = LDKNetwork_from_js(network); + OfferWithDerivedMetadataBuilder_chain(this_arg_conv, network_conv); +} + +void __attribute__((export_name("TS_OfferWithDerivedMetadataBuilder_amount_msats"))) TS_OfferWithDerivedMetadataBuilder_amount_msats(uint64_t this_arg, int64_t amount_msats) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + OfferWithDerivedMetadataBuilder_amount_msats(this_arg_conv, amount_msats); +} + +void __attribute__((export_name("TS_OfferWithDerivedMetadataBuilder_absolute_expiry"))) TS_OfferWithDerivedMetadataBuilder_absolute_expiry(uint64_t this_arg, int64_t absolute_expiry) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + OfferWithDerivedMetadataBuilder_absolute_expiry(this_arg_conv, absolute_expiry); +} + +void __attribute__((export_name("TS_OfferWithDerivedMetadataBuilder_description"))) TS_OfferWithDerivedMetadataBuilder_description(uint64_t this_arg, jstring description) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKStr description_conv = str_ref_to_owned_c(description); + OfferWithDerivedMetadataBuilder_description(this_arg_conv, description_conv); +} + +void __attribute__((export_name("TS_OfferWithDerivedMetadataBuilder_issuer"))) TS_OfferWithDerivedMetadataBuilder_issuer(uint64_t this_arg, jstring issuer) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKStr issuer_conv = str_ref_to_owned_c(issuer); + OfferWithDerivedMetadataBuilder_issuer(this_arg_conv, issuer_conv); +} + +void __attribute__((export_name("TS_OfferWithDerivedMetadataBuilder_path"))) TS_OfferWithDerivedMetadataBuilder_path(uint64_t this_arg, uint64_t path) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKBlindedPath path_conv; + path_conv.inner = untag_ptr(path); + path_conv.is_owned = ptr_is_owned(path); + CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv); + path_conv = BlindedPath_clone(&path_conv); + OfferWithDerivedMetadataBuilder_path(this_arg_conv, path_conv); +} + +void __attribute__((export_name("TS_OfferWithDerivedMetadataBuilder_supported_quantity"))) TS_OfferWithDerivedMetadataBuilder_supported_quantity(uint64_t this_arg, uint64_t quantity) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + void* quantity_ptr = untag_ptr(quantity); + CHECK_ACCESS(quantity_ptr); + LDKQuantity quantity_conv = *(LDKQuantity*)(quantity_ptr); + quantity_conv = Quantity_clone((LDKQuantity*)untag_ptr(quantity)); + OfferWithDerivedMetadataBuilder_supported_quantity(this_arg_conv, quantity_conv); +} + +uint64_t __attribute__((export_name("TS_OfferWithDerivedMetadataBuilder_build"))) TS_OfferWithDerivedMetadataBuilder_build(uint64_t this_arg) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = OfferWithDerivedMetadataBuilder_build(this_arg_conv); + return tag_ptr(ret_conv, true); +} + void __attribute__((export_name("TS_Offer_free"))) TS_Offer_free(uint64_t this_obj) { LDKOffer this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -58936,10 +63788,9 @@ uint64_t __attribute__((export_name("TS_Offer_amount"))) TS_Offer_amount(uint64 this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = Offer_amount(&this_arg_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = Offer_amount(&this_arg_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -59022,10 +63873,9 @@ uint64_t __attribute__((export_name("TS_Offer_supported_quantity"))) TS_Offer_s this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = Offer_supported_quantity(&this_arg_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Offer_supported_quantity(&this_arg_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -59040,6 +63890,19 @@ int8_tArray __attribute__((export_name("TS_Offer_signing_pubkey"))) TS_Offer_si return ret_arr; } +uint64_t __attribute__((export_name("TS_Offer_id"))) TS_Offer_id(uint64_t this_arg) { + LDKOffer this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKOfferId ret_var = Offer_id(&this_arg_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + jboolean __attribute__((export_name("TS_Offer_supports_chain"))) TS_Offer_supports_chain(uint64_t this_arg, int8_tArray chain) { LDKOffer this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -59083,6 +63946,89 @@ jboolean __attribute__((export_name("TS_Offer_expects_quantity"))) TS_Offer_exp return ret_conv; } +uint64_t __attribute__((export_name("TS_Offer_request_invoice_deriving_payer_id"))) TS_Offer_request_invoice_deriving_payer_id(uint64_t this_arg, uint64_t expanded_key, uint64_t entropy_source, int8_tArray payment_id) { + LDKOffer this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKExpandedKey expanded_key_conv; + expanded_key_conv.inner = untag_ptr(expanded_key); + expanded_key_conv.is_owned = ptr_is_owned(expanded_key); + CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv); + expanded_key_conv.is_owned = false; + void* entropy_source_ptr = untag_ptr(entropy_source); + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } + LDKThirtyTwoBytes payment_id_ref; + CHECK(payment_id->arr_len == 32); + memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id); + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = Offer_request_invoice_deriving_payer_id(&this_arg_conv, &expanded_key_conv, entropy_source_conv, payment_id_ref); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_Offer_request_invoice_deriving_metadata"))) TS_Offer_request_invoice_deriving_metadata(uint64_t this_arg, int8_tArray payer_id, uint64_t expanded_key, uint64_t entropy_source, int8_tArray payment_id) { + LDKOffer this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKPublicKey payer_id_ref; + CHECK(payer_id->arr_len == 33); + memcpy(payer_id_ref.compressed_form, payer_id->elems, 33); FREE(payer_id); + LDKExpandedKey expanded_key_conv; + expanded_key_conv.inner = untag_ptr(expanded_key); + expanded_key_conv.is_owned = ptr_is_owned(expanded_key); + CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv); + expanded_key_conv.is_owned = false; + void* entropy_source_ptr = untag_ptr(entropy_source); + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } + LDKThirtyTwoBytes payment_id_ref; + CHECK(payment_id->arr_len == 32); + memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id); + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = Offer_request_invoice_deriving_metadata(&this_arg_conv, payer_id_ref, &expanded_key_conv, entropy_source_conv, payment_id_ref); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_Offer_request_invoice"))) TS_Offer_request_invoice(uint64_t this_arg, int8_tArray metadata, int8_tArray payer_id) { + LDKOffer this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_u8Z metadata_ref; + metadata_ref.datalen = metadata->arr_len; + metadata_ref.data = MALLOC(metadata_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(metadata_ref.data, metadata->elems, metadata_ref.datalen); FREE(metadata); + LDKPublicKey payer_id_ref; + CHECK(payer_id->arr_len == 33); + memcpy(payer_id_ref.compressed_form, payer_id->elems, 33); FREE(payer_id); + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = Offer_request_invoice(&this_arg_conv, metadata_ref, payer_id_ref); + return tag_ptr(ret_conv, true); +} + +int64_t __attribute__((export_name("TS_Offer_hash"))) TS_Offer_hash(uint64_t o) { + LDKOffer o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = Offer_hash(&o_conv); + return ret_conv; +} + int8_tArray __attribute__((export_name("TS_Offer_write"))) TS_Offer_write(uint64_t obj) { LDKOffer obj_conv; obj_conv.inner = untag_ptr(obj); @@ -59096,95 +64042,316 @@ int8_tArray __attribute__((export_name("TS_Offer_write"))) TS_Offer_write(uint6 return ret_arr; } -void __attribute__((export_name("TS_Amount_free"))) TS_Amount_free(uint64_t this_obj) { - LDKAmount this_obj_conv; - this_obj_conv.inner = untag_ptr(this_obj); - this_obj_conv.is_owned = ptr_is_owned(this_obj); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - Amount_free(this_obj_conv); +void __attribute__((export_name("TS_Amount_free"))) TS_Amount_free(uint64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKAmount this_ptr_conv = *(LDKAmount*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + Amount_free(this_ptr_conv); } static inline uint64_t Amount_clone_ptr(LDKAmount *NONNULL_PTR arg) { - LDKAmount ret_var = Amount_clone(arg); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount"); + *ret_copy = Amount_clone(arg); + uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } int64_t __attribute__((export_name("TS_Amount_clone_ptr"))) TS_Amount_clone_ptr(uint64_t arg) { - LDKAmount arg_conv; - arg_conv.inner = untag_ptr(arg); - arg_conv.is_owned = ptr_is_owned(arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); - arg_conv.is_owned = false; - int64_t ret_conv = Amount_clone_ptr(&arg_conv); + LDKAmount* arg_conv = (LDKAmount*)untag_ptr(arg); + int64_t ret_conv = Amount_clone_ptr(arg_conv); return ret_conv; } uint64_t __attribute__((export_name("TS_Amount_clone"))) TS_Amount_clone(uint64_t orig) { - LDKAmount orig_conv; - orig_conv.inner = untag_ptr(orig); - orig_conv.is_owned = ptr_is_owned(orig); - CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); - orig_conv.is_owned = false; - LDKAmount ret_var = Amount_clone(&orig_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKAmount* orig_conv = (LDKAmount*)untag_ptr(orig); + LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount"); + *ret_copy = Amount_clone(orig_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_Amount_bitcoin"))) TS_Amount_bitcoin(int64_t amount_msats) { + LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount"); + *ret_copy = Amount_bitcoin(amount_msats); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_Amount_currency"))) TS_Amount_currency(int8_tArray iso4217_code, int64_t amount) { + LDKThreeBytes iso4217_code_ref; + CHECK(iso4217_code->arr_len == 3); + memcpy(iso4217_code_ref.data, iso4217_code->elems, 3); FREE(iso4217_code); + LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount"); + *ret_copy = Amount_currency(iso4217_code_ref, amount); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void __attribute__((export_name("TS_Quantity_free"))) TS_Quantity_free(uint64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKQuantity this_ptr_conv = *(LDKQuantity*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + Quantity_free(this_ptr_conv); +} + +static inline uint64_t Quantity_clone_ptr(LDKQuantity *NONNULL_PTR arg) { + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Quantity_clone(arg); + uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } +int64_t __attribute__((export_name("TS_Quantity_clone_ptr"))) TS_Quantity_clone_ptr(uint64_t arg) { + LDKQuantity* arg_conv = (LDKQuantity*)untag_ptr(arg); + int64_t ret_conv = Quantity_clone_ptr(arg_conv); + return ret_conv; +} -void __attribute__((export_name("TS_Quantity_free"))) TS_Quantity_free(uint64_t this_obj) { - LDKQuantity this_obj_conv; +uint64_t __attribute__((export_name("TS_Quantity_clone"))) TS_Quantity_clone(uint64_t orig) { + LDKQuantity* orig_conv = (LDKQuantity*)untag_ptr(orig); + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Quantity_clone(orig_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_Quantity_bounded"))) TS_Quantity_bounded(int64_t a) { + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Quantity_bounded(a); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_Quantity_unbounded"))) TS_Quantity_unbounded() { + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Quantity_unbounded(); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_Quantity_one"))) TS_Quantity_one() { + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Quantity_one(); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_Offer_from_str"))) TS_Offer_from_str(jstring s) { + LDKStr s_conv = str_ref_to_owned_c(s); + LDKCResult_OfferBolt12ParseErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12ParseErrorZ), "LDKCResult_OfferBolt12ParseErrorZ"); + *ret_conv = Offer_from_str(s_conv); + return tag_ptr(ret_conv, true); +} + +void __attribute__((export_name("TS_InvoiceWithExplicitSigningPubkeyBuilder_free"))) TS_InvoiceWithExplicitSigningPubkeyBuilder_free(uint64_t this_obj) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); this_obj_conv.is_owned = ptr_is_owned(this_obj); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - Quantity_free(this_obj_conv); + InvoiceWithExplicitSigningPubkeyBuilder_free(this_obj_conv); } -static inline uint64_t Quantity_clone_ptr(LDKQuantity *NONNULL_PTR arg) { - LDKQuantity ret_var = Quantity_clone(arg); +void __attribute__((export_name("TS_InvoiceWithDerivedSigningPubkeyBuilder_free"))) TS_InvoiceWithDerivedSigningPubkeyBuilder_free(uint64_t this_obj) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + InvoiceWithDerivedSigningPubkeyBuilder_free(this_obj_conv); +} + +uint64_t __attribute__((export_name("TS_InvoiceWithExplicitSigningPubkeyBuilder_build"))) TS_InvoiceWithExplicitSigningPubkeyBuilder_build(uint64_t this_arg) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = InvoiceWithExplicitSigningPubkeyBuilder_build(this_arg_conv); + return tag_ptr(ret_conv, true); +} + +void __attribute__((export_name("TS_InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry"))) TS_InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry(uint64_t this_arg, int32_t relative_expiry_secs) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry(this_arg_conv, relative_expiry_secs); +} + +void __attribute__((export_name("TS_InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh"))) TS_InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh(uint64_t this_arg, int8_tArray script_hash) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + uint8_t script_hash_arr[32]; + CHECK(script_hash->arr_len == 32); + memcpy(script_hash_arr, script_hash->elems, 32); FREE(script_hash); + uint8_t (*script_hash_ref)[32] = &script_hash_arr; + InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh(this_arg_conv, script_hash_ref); +} + +void __attribute__((export_name("TS_InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh"))) TS_InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh(uint64_t this_arg, int8_tArray pubkey_hash) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + uint8_t pubkey_hash_arr[20]; + CHECK(pubkey_hash->arr_len == 20); + memcpy(pubkey_hash_arr, pubkey_hash->elems, 20); FREE(pubkey_hash); + uint8_t (*pubkey_hash_ref)[20] = &pubkey_hash_arr; + InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh(this_arg_conv, pubkey_hash_ref); +} + +void __attribute__((export_name("TS_InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked"))) TS_InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(uint64_t this_arg, int8_tArray utput_key) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + LDKTweakedPublicKey utput_key_ref; + CHECK(utput_key->arr_len == 32); + memcpy(utput_key_ref.x_coordinate, utput_key->elems, 32); FREE(utput_key); + InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(this_arg_conv, utput_key_ref); +} + +void __attribute__((export_name("TS_InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp"))) TS_InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp(uint64_t this_arg) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp(this_arg_conv); +} + +uint64_t __attribute__((export_name("TS_InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign"))) TS_InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign(uint64_t this_arg) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign(this_arg_conv); + return tag_ptr(ret_conv, true); +} + +void __attribute__((export_name("TS_InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry"))) TS_InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry(uint64_t this_arg, int32_t relative_expiry_secs) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry(this_arg_conv, relative_expiry_secs); +} + +void __attribute__((export_name("TS_InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh"))) TS_InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh(uint64_t this_arg, int8_tArray script_hash) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + uint8_t script_hash_arr[32]; + CHECK(script_hash->arr_len == 32); + memcpy(script_hash_arr, script_hash->elems, 32); FREE(script_hash); + uint8_t (*script_hash_ref)[32] = &script_hash_arr; + InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh(this_arg_conv, script_hash_ref); +} + +void __attribute__((export_name("TS_InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh"))) TS_InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh(uint64_t this_arg, int8_tArray pubkey_hash) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + uint8_t pubkey_hash_arr[20]; + CHECK(pubkey_hash->arr_len == 20); + memcpy(pubkey_hash_arr, pubkey_hash->elems, 20); FREE(pubkey_hash); + uint8_t (*pubkey_hash_ref)[20] = &pubkey_hash_arr; + InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh(this_arg_conv, pubkey_hash_ref); +} + +void __attribute__((export_name("TS_InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked"))) TS_InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(uint64_t this_arg, int8_tArray utput_key) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + LDKTweakedPublicKey utput_key_ref; + CHECK(utput_key->arr_len == 32); + memcpy(utput_key_ref.x_coordinate, utput_key->elems, 32); FREE(utput_key); + InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(this_arg_conv, utput_key_ref); +} + +void __attribute__((export_name("TS_InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp"))) TS_InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp(uint64_t this_arg) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp(this_arg_conv); +} + +void __attribute__((export_name("TS_UnsignedBolt12Invoice_free"))) TS_UnsignedBolt12Invoice_free(uint64_t this_obj) { + LDKUnsignedBolt12Invoice this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + UnsignedBolt12Invoice_free(this_obj_conv); +} + +static inline uint64_t UnsignedBolt12Invoice_clone_ptr(LDKUnsignedBolt12Invoice *NONNULL_PTR arg) { + LDKUnsignedBolt12Invoice ret_var = UnsignedBolt12Invoice_clone(arg); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -int64_t __attribute__((export_name("TS_Quantity_clone_ptr"))) TS_Quantity_clone_ptr(uint64_t arg) { - LDKQuantity arg_conv; +int64_t __attribute__((export_name("TS_UnsignedBolt12Invoice_clone_ptr"))) TS_UnsignedBolt12Invoice_clone_ptr(uint64_t arg) { + LDKUnsignedBolt12Invoice arg_conv; arg_conv.inner = untag_ptr(arg); arg_conv.is_owned = ptr_is_owned(arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); arg_conv.is_owned = false; - int64_t ret_conv = Quantity_clone_ptr(&arg_conv); + int64_t ret_conv = UnsignedBolt12Invoice_clone_ptr(&arg_conv); return ret_conv; } -uint64_t __attribute__((export_name("TS_Quantity_clone"))) TS_Quantity_clone(uint64_t orig) { - LDKQuantity orig_conv; +uint64_t __attribute__((export_name("TS_UnsignedBolt12Invoice_clone"))) TS_UnsignedBolt12Invoice_clone(uint64_t orig) { + LDKUnsignedBolt12Invoice orig_conv; orig_conv.inner = untag_ptr(orig); orig_conv.is_owned = ptr_is_owned(orig); CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); orig_conv.is_owned = false; - LDKQuantity ret_var = Quantity_clone(&orig_conv); + LDKUnsignedBolt12Invoice ret_var = UnsignedBolt12Invoice_clone(&orig_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -uint64_t __attribute__((export_name("TS_Offer_from_str"))) TS_Offer_from_str(jstring s) { - LDKStr s_conv = str_ref_to_owned_c(s); - LDKCResult_OfferBolt12ParseErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12ParseErrorZ), "LDKCResult_OfferBolt12ParseErrorZ"); - *ret_conv = Offer_from_str(s_conv); - return tag_ptr(ret_conv, true); -} - -void __attribute__((export_name("TS_UnsignedBolt12Invoice_free"))) TS_UnsignedBolt12Invoice_free(uint64_t this_obj) { - LDKUnsignedBolt12Invoice this_obj_conv; - this_obj_conv.inner = untag_ptr(this_obj); - this_obj_conv.is_owned = ptr_is_owned(this_obj); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - UnsignedBolt12Invoice_free(this_obj_conv); +void __attribute__((export_name("TS_SignBolt12InvoiceFn_free"))) TS_SignBolt12InvoiceFn_free(uint64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKSignBolt12InvoiceFn this_ptr_conv = *(LDKSignBolt12InvoiceFn*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + SignBolt12InvoiceFn_free(this_ptr_conv); } uint64_t __attribute__((export_name("TS_UnsignedBolt12Invoice_tagged_hash"))) TS_UnsignedBolt12Invoice_tagged_hash(uint64_t this_arg) { @@ -59279,10 +64446,9 @@ uint64_t __attribute__((export_name("TS_UnsignedBolt12Invoice_amount"))) TS_Uns this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = UnsignedBolt12Invoice_amount(&this_arg_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = UnsignedBolt12Invoice_amount(&this_arg_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -59365,10 +64531,9 @@ uint64_t __attribute__((export_name("TS_UnsignedBolt12Invoice_supported_quantit this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = UnsignedBolt12Invoice_supported_quantity(&this_arg_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = UnsignedBolt12Invoice_supported_quantity(&this_arg_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -59539,10 +64704,9 @@ uint64_t __attribute__((export_name("TS_Bolt12Invoice_amount"))) TS_Bolt12Invoi this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = Bolt12Invoice_amount(&this_arg_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = Bolt12Invoice_amount(&this_arg_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -59625,10 +64789,9 @@ uint64_t __attribute__((export_name("TS_Bolt12Invoice_supported_quantity"))) TS this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = Bolt12Invoice_supported_quantity(&this_arg_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = Bolt12Invoice_supported_quantity(&this_arg_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -59796,6 +64959,16 @@ uint64_t __attribute__((export_name("TS_Bolt12Invoice_verify"))) TS_Bolt12Invoi return tag_ptr(ret_conv, true); } +int64_t __attribute__((export_name("TS_Bolt12Invoice_hash"))) TS_Bolt12Invoice_hash(uint64_t o) { + LDKBolt12Invoice o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = Bolt12Invoice_hash(&o_conv); + return ret_conv; +} + int8_tArray __attribute__((export_name("TS_UnsignedBolt12Invoice_write"))) TS_UnsignedBolt12Invoice_write(uint64_t obj) { LDKUnsignedBolt12Invoice obj_conv; obj_conv.inner = untag_ptr(obj); @@ -60279,6 +65452,142 @@ uint64_t __attribute__((export_name("TS_InvoiceError_read"))) TS_InvoiceError_r return tag_ptr(ret_conv, true); } +void __attribute__((export_name("TS_InvoiceRequestWithExplicitPayerIdBuilder_free"))) TS_InvoiceRequestWithExplicitPayerIdBuilder_free(uint64_t this_obj) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + InvoiceRequestWithExplicitPayerIdBuilder_free(this_obj_conv); +} + +void __attribute__((export_name("TS_InvoiceRequestWithDerivedPayerIdBuilder_free"))) TS_InvoiceRequestWithDerivedPayerIdBuilder_free(uint64_t this_obj) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + InvoiceRequestWithDerivedPayerIdBuilder_free(this_obj_conv); +} + +uint64_t __attribute__((export_name("TS_InvoiceRequestWithExplicitPayerIdBuilder_build"))) TS_InvoiceRequestWithExplicitPayerIdBuilder_build(uint64_t this_arg) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_build(this_arg_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_InvoiceRequestWithExplicitPayerIdBuilder_chain"))) TS_InvoiceRequestWithExplicitPayerIdBuilder_chain(uint64_t this_arg, uint32_t network) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKNetwork network_conv = LDKNetwork_from_js(network); + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_chain(this_arg_conv, network_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_InvoiceRequestWithExplicitPayerIdBuilder_amount_msats"))) TS_InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(uint64_t this_arg, int64_t amount_msats) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(this_arg_conv, amount_msats); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_InvoiceRequestWithExplicitPayerIdBuilder_quantity"))) TS_InvoiceRequestWithExplicitPayerIdBuilder_quantity(uint64_t this_arg, int64_t quantity) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_quantity(this_arg_conv, quantity); + return tag_ptr(ret_conv, true); +} + +void __attribute__((export_name("TS_InvoiceRequestWithExplicitPayerIdBuilder_payer_note"))) TS_InvoiceRequestWithExplicitPayerIdBuilder_payer_note(uint64_t this_arg, jstring payer_note) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKStr payer_note_conv = str_ref_to_owned_c(payer_note); + InvoiceRequestWithExplicitPayerIdBuilder_payer_note(this_arg_conv, payer_note_conv); +} + +uint64_t __attribute__((export_name("TS_InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign"))) TS_InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(uint64_t this_arg) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(this_arg_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_InvoiceRequestWithDerivedPayerIdBuilder_chain"))) TS_InvoiceRequestWithDerivedPayerIdBuilder_chain(uint64_t this_arg, uint32_t network) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKNetwork network_conv = LDKNetwork_from_js(network); + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_chain(this_arg_conv, network_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_InvoiceRequestWithDerivedPayerIdBuilder_amount_msats"))) TS_InvoiceRequestWithDerivedPayerIdBuilder_amount_msats(uint64_t this_arg, int64_t amount_msats) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_amount_msats(this_arg_conv, amount_msats); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_InvoiceRequestWithDerivedPayerIdBuilder_quantity"))) TS_InvoiceRequestWithDerivedPayerIdBuilder_quantity(uint64_t this_arg, int64_t quantity) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_quantity(this_arg_conv, quantity); + return tag_ptr(ret_conv, true); +} + +void __attribute__((export_name("TS_InvoiceRequestWithDerivedPayerIdBuilder_payer_note"))) TS_InvoiceRequestWithDerivedPayerIdBuilder_payer_note(uint64_t this_arg, jstring payer_note) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKStr payer_note_conv = str_ref_to_owned_c(payer_note); + InvoiceRequestWithDerivedPayerIdBuilder_payer_note(this_arg_conv, payer_note_conv); +} + void __attribute__((export_name("TS_UnsignedInvoiceRequest_free"))) TS_UnsignedInvoiceRequest_free(uint64_t this_obj) { LDKUnsignedInvoiceRequest this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -60287,6 +65596,45 @@ void __attribute__((export_name("TS_UnsignedInvoiceRequest_free"))) TS_Unsigned UnsignedInvoiceRequest_free(this_obj_conv); } +static inline uint64_t UnsignedInvoiceRequest_clone_ptr(LDKUnsignedInvoiceRequest *NONNULL_PTR arg) { + LDKUnsignedInvoiceRequest ret_var = UnsignedInvoiceRequest_clone(arg); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t __attribute__((export_name("TS_UnsignedInvoiceRequest_clone_ptr"))) TS_UnsignedInvoiceRequest_clone_ptr(uint64_t arg) { + LDKUnsignedInvoiceRequest arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = UnsignedInvoiceRequest_clone_ptr(&arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_UnsignedInvoiceRequest_clone"))) TS_UnsignedInvoiceRequest_clone(uint64_t orig) { + LDKUnsignedInvoiceRequest orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKUnsignedInvoiceRequest ret_var = UnsignedInvoiceRequest_clone(&orig_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void __attribute__((export_name("TS_SignInvoiceRequestFn_free"))) TS_SignInvoiceRequestFn_free(uint64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKSignInvoiceRequestFn this_ptr_conv = *(LDKSignInvoiceRequestFn*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + SignInvoiceRequestFn_free(this_ptr_conv); +} + uint64_t __attribute__((export_name("TS_UnsignedInvoiceRequest_tagged_hash"))) TS_UnsignedInvoiceRequest_tagged_hash(uint64_t this_arg) { LDKUnsignedInvoiceRequest this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -60346,6 +65694,33 @@ void __attribute__((export_name("TS_VerifiedInvoiceRequest_free"))) TS_Verified VerifiedInvoiceRequest_free(this_obj_conv); } +uint64_t __attribute__((export_name("TS_VerifiedInvoiceRequest_get_offer_id"))) TS_VerifiedInvoiceRequest_get_offer_id(uint64_t this_ptr) { + LDKVerifiedInvoiceRequest this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKOfferId ret_var = VerifiedInvoiceRequest_get_offer_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void __attribute__((export_name("TS_VerifiedInvoiceRequest_set_offer_id"))) TS_VerifiedInvoiceRequest_set_offer_id(uint64_t this_ptr, uint64_t val) { + LDKVerifiedInvoiceRequest this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKOfferId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = OfferId_clone(&val_conv); + VerifiedInvoiceRequest_set_offer_id(&this_ptr_conv, val_conv); +} + uint64_t __attribute__((export_name("TS_VerifiedInvoiceRequest_get_keys"))) TS_VerifiedInvoiceRequest_get_keys(uint64_t this_ptr) { LDKVerifiedInvoiceRequest this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -60439,10 +65814,9 @@ uint64_t __attribute__((export_name("TS_UnsignedInvoiceRequest_amount"))) TS_Un this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = UnsignedInvoiceRequest_amount(&this_arg_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = UnsignedInvoiceRequest_amount(&this_arg_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -60525,10 +65899,9 @@ uint64_t __attribute__((export_name("TS_UnsignedInvoiceRequest_supported_quanti this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = UnsignedInvoiceRequest_supported_quantity(&this_arg_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = UnsignedInvoiceRequest_supported_quantity(&this_arg_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -60665,10 +66038,9 @@ uint64_t __attribute__((export_name("TS_InvoiceRequest_amount"))) TS_InvoiceReq this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = InvoiceRequest_amount(&this_arg_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = InvoiceRequest_amount(&this_arg_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -60751,10 +66123,9 @@ uint64_t __attribute__((export_name("TS_InvoiceRequest_supported_quantity"))) T this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = InvoiceRequest_supported_quantity(&this_arg_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = InvoiceRequest_supported_quantity(&this_arg_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -60853,15 +66224,34 @@ uint64_t __attribute__((export_name("TS_InvoiceRequest_payer_note"))) TS_Invoic return ret_ref; } -int8_tArray __attribute__((export_name("TS_InvoiceRequest_signature"))) TS_InvoiceRequest_signature(uint64_t this_arg) { +uint64_t __attribute__((export_name("TS_InvoiceRequest_respond_with_no_std"))) TS_InvoiceRequest_respond_with_no_std(uint64_t this_arg, uint64_tArray payment_paths, int8_tArray payment_hash, int64_t created_at) { LDKInvoiceRequest this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(64, __LINE__); - memcpy(ret_arr->elems, InvoiceRequest_signature(&this_arg_conv).compact_form, 64); - return ret_arr; + LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr; + payment_paths_constr.datalen = payment_paths->arr_len; + if (payment_paths_constr.datalen > 0) + payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements"); + else + payment_paths_constr.data = NULL; + uint64_t* payment_paths_vals = payment_paths->elems; + for (size_t l = 0; l < payment_paths_constr.datalen; l++) { + uint64_t payment_paths_conv_37 = payment_paths_vals[l]; + void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37); + CHECK_ACCESS(payment_paths_conv_37_ptr); + LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr); + payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37)); + payment_paths_constr.data[l] = payment_paths_conv_37_conv; + } + FREE(payment_paths); + LDKThirtyTwoBytes payment_hash_ref; + CHECK(payment_hash->arr_len == 32); + memcpy(payment_hash_ref.data, payment_hash->elems, 32); FREE(payment_hash); + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequest_respond_with_no_std(&this_arg_conv, payment_paths_constr, payment_hash_ref, created_at); + return tag_ptr(ret_conv, true); } uint64_t __attribute__((export_name("TS_InvoiceRequest_verify"))) TS_InvoiceRequest_verify(uint64_t this_arg, uint64_t key) { @@ -60880,6 +66270,17 @@ uint64_t __attribute__((export_name("TS_InvoiceRequest_verify"))) TS_InvoiceReq return tag_ptr(ret_conv, true); } +int8_tArray __attribute__((export_name("TS_InvoiceRequest_signature"))) TS_InvoiceRequest_signature(uint64_t this_arg) { + LDKInvoiceRequest this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(64, __LINE__); + memcpy(ret_arr->elems, InvoiceRequest_signature(&this_arg_conv).compact_form, 64); + return ret_arr; +} + ptrArray __attribute__((export_name("TS_VerifiedInvoiceRequest_chains"))) TS_VerifiedInvoiceRequest_chains(uint64_t this_arg) { LDKVerifiedInvoiceRequest this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -60918,10 +66319,9 @@ uint64_t __attribute__((export_name("TS_VerifiedInvoiceRequest_amount"))) TS_Ve this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = VerifiedInvoiceRequest_amount(&this_arg_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = VerifiedInvoiceRequest_amount(&this_arg_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -61004,10 +66404,9 @@ uint64_t __attribute__((export_name("TS_VerifiedInvoiceRequest_supported_quanti this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = VerifiedInvoiceRequest_supported_quantity(&this_arg_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = VerifiedInvoiceRequest_supported_quantity(&this_arg_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -61106,6 +66505,66 @@ uint64_t __attribute__((export_name("TS_VerifiedInvoiceRequest_payer_note"))) T return ret_ref; } +uint64_t __attribute__((export_name("TS_VerifiedInvoiceRequest_respond_with_no_std"))) TS_VerifiedInvoiceRequest_respond_with_no_std(uint64_t this_arg, uint64_tArray payment_paths, int8_tArray payment_hash, int64_t created_at) { + LDKVerifiedInvoiceRequest this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr; + payment_paths_constr.datalen = payment_paths->arr_len; + if (payment_paths_constr.datalen > 0) + payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements"); + else + payment_paths_constr.data = NULL; + uint64_t* payment_paths_vals = payment_paths->elems; + for (size_t l = 0; l < payment_paths_constr.datalen; l++) { + uint64_t payment_paths_conv_37 = payment_paths_vals[l]; + void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37); + CHECK_ACCESS(payment_paths_conv_37_ptr); + LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr); + payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37)); + payment_paths_constr.data[l] = payment_paths_conv_37_conv; + } + FREE(payment_paths); + LDKThirtyTwoBytes payment_hash_ref; + CHECK(payment_hash->arr_len == 32); + memcpy(payment_hash_ref.data, payment_hash->elems, 32); FREE(payment_hash); + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = VerifiedInvoiceRequest_respond_with_no_std(&this_arg_conv, payment_paths_constr, payment_hash_ref, created_at); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_VerifiedInvoiceRequest_respond_using_derived_keys_no_std"))) TS_VerifiedInvoiceRequest_respond_using_derived_keys_no_std(uint64_t this_arg, uint64_tArray payment_paths, int8_tArray payment_hash, int64_t created_at) { + LDKVerifiedInvoiceRequest this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr; + payment_paths_constr.datalen = payment_paths->arr_len; + if (payment_paths_constr.datalen > 0) + payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements"); + else + payment_paths_constr.data = NULL; + uint64_t* payment_paths_vals = payment_paths->elems; + for (size_t l = 0; l < payment_paths_constr.datalen; l++) { + uint64_t payment_paths_conv_37 = payment_paths_vals[l]; + void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37); + CHECK_ACCESS(payment_paths_conv_37_ptr); + LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr); + payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37)); + payment_paths_constr.data[l] = payment_paths_conv_37_conv; + } + FREE(payment_paths); + LDKThirtyTwoBytes payment_hash_ref; + CHECK(payment_hash->arr_len == 32); + memcpy(payment_hash_ref.data, payment_hash->elems, 32); FREE(payment_hash); + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = VerifiedInvoiceRequest_respond_using_derived_keys_no_std(&this_arg_conv, payment_paths_constr, payment_hash_ref, created_at); + return tag_ptr(ret_conv, true); +} + int8_tArray __attribute__((export_name("TS_UnsignedInvoiceRequest_write"))) TS_UnsignedInvoiceRequest_write(uint64_t obj) { LDKUnsignedInvoiceRequest obj_conv; obj_conv.inner = untag_ptr(obj); @@ -61132,6 +66591,177 @@ int8_tArray __attribute__((export_name("TS_InvoiceRequest_write"))) TS_InvoiceR return ret_arr; } +void __attribute__((export_name("TS_InvoiceRequestFields_free"))) TS_InvoiceRequestFields_free(uint64_t this_obj) { + LDKInvoiceRequestFields this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + InvoiceRequestFields_free(this_obj_conv); +} + +int8_tArray __attribute__((export_name("TS_InvoiceRequestFields_get_payer_id"))) TS_InvoiceRequestFields_get_payer_id(uint64_t this_ptr) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(33, __LINE__); + memcpy(ret_arr->elems, InvoiceRequestFields_get_payer_id(&this_ptr_conv).compressed_form, 33); + return ret_arr; +} + +void __attribute__((export_name("TS_InvoiceRequestFields_set_payer_id"))) TS_InvoiceRequestFields_set_payer_id(uint64_t this_ptr, int8_tArray val) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKPublicKey val_ref; + CHECK(val->arr_len == 33); + memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); + InvoiceRequestFields_set_payer_id(&this_ptr_conv, val_ref); +} + +uint64_t __attribute__((export_name("TS_InvoiceRequestFields_get_quantity"))) TS_InvoiceRequestFields_get_quantity(uint64_t this_ptr) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z"); + *ret_copy = InvoiceRequestFields_get_quantity(&this_ptr_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void __attribute__((export_name("TS_InvoiceRequestFields_set_quantity"))) TS_InvoiceRequestFields_set_quantity(uint64_t this_ptr, uint64_t val) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKCOption_u64Z val_conv = *(LDKCOption_u64Z*)(val_ptr); + val_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(val)); + InvoiceRequestFields_set_quantity(&this_ptr_conv, val_conv); +} + +uint64_t __attribute__((export_name("TS_InvoiceRequestFields_get_payer_note_truncated"))) TS_InvoiceRequestFields_get_payer_note_truncated(uint64_t this_ptr) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKUntrustedString ret_var = InvoiceRequestFields_get_payer_note_truncated(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void __attribute__((export_name("TS_InvoiceRequestFields_set_payer_note_truncated"))) TS_InvoiceRequestFields_set_payer_note_truncated(uint64_t this_ptr, uint64_t val) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKUntrustedString val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = UntrustedString_clone(&val_conv); + InvoiceRequestFields_set_payer_note_truncated(&this_ptr_conv, val_conv); +} + +uint64_t __attribute__((export_name("TS_InvoiceRequestFields_new"))) TS_InvoiceRequestFields_new(int8_tArray payer_id_arg, uint64_t quantity_arg, uint64_t payer_note_truncated_arg) { + LDKPublicKey payer_id_arg_ref; + CHECK(payer_id_arg->arr_len == 33); + memcpy(payer_id_arg_ref.compressed_form, payer_id_arg->elems, 33); FREE(payer_id_arg); + void* quantity_arg_ptr = untag_ptr(quantity_arg); + CHECK_ACCESS(quantity_arg_ptr); + LDKCOption_u64Z quantity_arg_conv = *(LDKCOption_u64Z*)(quantity_arg_ptr); + quantity_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(quantity_arg)); + LDKUntrustedString payer_note_truncated_arg_conv; + payer_note_truncated_arg_conv.inner = untag_ptr(payer_note_truncated_arg); + payer_note_truncated_arg_conv.is_owned = ptr_is_owned(payer_note_truncated_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(payer_note_truncated_arg_conv); + payer_note_truncated_arg_conv = UntrustedString_clone(&payer_note_truncated_arg_conv); + LDKInvoiceRequestFields ret_var = InvoiceRequestFields_new(payer_id_arg_ref, quantity_arg_conv, payer_note_truncated_arg_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t InvoiceRequestFields_clone_ptr(LDKInvoiceRequestFields *NONNULL_PTR arg) { + LDKInvoiceRequestFields ret_var = InvoiceRequestFields_clone(arg); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t __attribute__((export_name("TS_InvoiceRequestFields_clone_ptr"))) TS_InvoiceRequestFields_clone_ptr(uint64_t arg) { + LDKInvoiceRequestFields arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = InvoiceRequestFields_clone_ptr(&arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_InvoiceRequestFields_clone"))) TS_InvoiceRequestFields_clone(uint64_t orig) { + LDKInvoiceRequestFields orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKInvoiceRequestFields ret_var = InvoiceRequestFields_clone(&orig_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +jboolean __attribute__((export_name("TS_InvoiceRequestFields_eq"))) TS_InvoiceRequestFields_eq(uint64_t a, uint64_t b) { + LDKInvoiceRequestFields a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKInvoiceRequestFields b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = InvoiceRequestFields_eq(&a_conv, &b_conv); + return ret_conv; +} + +int8_tArray __attribute__((export_name("TS_InvoiceRequestFields_write"))) TS_InvoiceRequestFields_write(uint64_t obj) { + LDKInvoiceRequestFields obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = InvoiceRequestFields_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +uint64_t __attribute__((export_name("TS_InvoiceRequestFields_read"))) TS_InvoiceRequestFields_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ"); + *ret_conv = InvoiceRequestFields_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + void __attribute__((export_name("TS_TaggedHash_free"))) TS_TaggedHash_free(uint64_t this_obj) { LDKTaggedHash this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -61204,6 +66834,50 @@ int8_tArray __attribute__((export_name("TS_TaggedHash_merkle_root"))) TS_Tagged return ret_arr; } +void __attribute__((export_name("TS_SignError_free"))) TS_SignError_free(uint64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKSignError this_ptr_conv = *(LDKSignError*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + SignError_free(this_ptr_conv); +} + +static inline uint64_t SignError_clone_ptr(LDKSignError *NONNULL_PTR arg) { + LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError"); + *ret_copy = SignError_clone(arg); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t __attribute__((export_name("TS_SignError_clone_ptr"))) TS_SignError_clone_ptr(uint64_t arg) { + LDKSignError* arg_conv = (LDKSignError*)untag_ptr(arg); + int64_t ret_conv = SignError_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_SignError_clone"))) TS_SignError_clone(uint64_t orig) { + LDKSignError* orig_conv = (LDKSignError*)untag_ptr(orig); + LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError"); + *ret_copy = SignError_clone(orig_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_SignError_signing"))) TS_SignError_signing() { + LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError"); + *ret_copy = SignError_signing(); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_SignError_verification"))) TS_SignError_verification(uint32_t a) { + LDKSecp256k1Error a_conv = LDKSecp256k1Error_from_js(a); + LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError"); + *ret_copy = SignError_verification(a_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + void __attribute__((export_name("TS_Bolt12ParseError_free"))) TS_Bolt12ParseError_free(uint64_t this_obj) { LDKBolt12ParseError this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -61363,6 +67037,11 @@ uint32_t __attribute__((export_name("TS_Bolt12SemanticError_missing_paths"))) T return ret_conv; } +uint32_t __attribute__((export_name("TS_Bolt12SemanticError_unexpected_paths"))) TS_Bolt12SemanticError_unexpected_paths() { + uint32_t ret_conv = LDKBolt12SemanticError_to_js(Bolt12SemanticError_unexpected_paths()); + return ret_conv; +} + uint32_t __attribute__((export_name("TS_Bolt12SemanticError_invalid_pay_info"))) TS_Bolt12SemanticError_invalid_pay_info() { uint32_t ret_conv = LDKBolt12SemanticError_to_js(Bolt12SemanticError_invalid_pay_info()); return ret_conv; @@ -61383,6 +67062,164 @@ uint32_t __attribute__((export_name("TS_Bolt12SemanticError_missing_signature") return ret_conv; } +void __attribute__((export_name("TS_RefundMaybeWithDerivedMetadataBuilder_free"))) TS_RefundMaybeWithDerivedMetadataBuilder_free(uint64_t this_obj) { + LDKRefundMaybeWithDerivedMetadataBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + RefundMaybeWithDerivedMetadataBuilder_free(this_obj_conv); +} + +static inline uint64_t RefundMaybeWithDerivedMetadataBuilder_clone_ptr(LDKRefundMaybeWithDerivedMetadataBuilder *NONNULL_PTR arg) { + LDKRefundMaybeWithDerivedMetadataBuilder ret_var = RefundMaybeWithDerivedMetadataBuilder_clone(arg); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t __attribute__((export_name("TS_RefundMaybeWithDerivedMetadataBuilder_clone_ptr"))) TS_RefundMaybeWithDerivedMetadataBuilder_clone_ptr(uint64_t arg) { + LDKRefundMaybeWithDerivedMetadataBuilder arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = RefundMaybeWithDerivedMetadataBuilder_clone_ptr(&arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_RefundMaybeWithDerivedMetadataBuilder_clone"))) TS_RefundMaybeWithDerivedMetadataBuilder_clone(uint64_t orig) { + LDKRefundMaybeWithDerivedMetadataBuilder orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKRefundMaybeWithDerivedMetadataBuilder ret_var = RefundMaybeWithDerivedMetadataBuilder_clone(&orig_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_RefundMaybeWithDerivedMetadataBuilder_new"))) TS_RefundMaybeWithDerivedMetadataBuilder_new(int8_tArray metadata, int8_tArray payer_id, int64_t amount_msats) { + LDKCVec_u8Z metadata_ref; + metadata_ref.datalen = metadata->arr_len; + metadata_ref.data = MALLOC(metadata_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(metadata_ref.data, metadata->elems, metadata_ref.datalen); FREE(metadata); + LDKPublicKey payer_id_ref; + CHECK(payer_id->arr_len == 33); + memcpy(payer_id_ref.compressed_form, payer_id->elems, 33); FREE(payer_id); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = RefundMaybeWithDerivedMetadataBuilder_new(metadata_ref, payer_id_ref, amount_msats); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id"))) TS_RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(int8_tArray node_id, uint64_t expanded_key, uint64_t entropy_source, int64_t amount_msats, int8_tArray payment_id) { + LDKPublicKey node_id_ref; + CHECK(node_id->arr_len == 33); + memcpy(node_id_ref.compressed_form, node_id->elems, 33); FREE(node_id); + LDKExpandedKey expanded_key_conv; + expanded_key_conv.inner = untag_ptr(expanded_key); + expanded_key_conv.is_owned = ptr_is_owned(expanded_key); + CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv); + expanded_key_conv.is_owned = false; + void* entropy_source_ptr = untag_ptr(entropy_source); + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } + LDKThirtyTwoBytes payment_id_ref; + CHECK(payment_id->arr_len == 32); + memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(node_id_ref, &expanded_key_conv, entropy_source_conv, amount_msats, payment_id_ref); + return tag_ptr(ret_conv, true); +} + +void __attribute__((export_name("TS_RefundMaybeWithDerivedMetadataBuilder_description"))) TS_RefundMaybeWithDerivedMetadataBuilder_description(uint64_t this_arg, jstring description) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKStr description_conv = str_ref_to_owned_c(description); + RefundMaybeWithDerivedMetadataBuilder_description(this_arg_conv, description_conv); +} + +void __attribute__((export_name("TS_RefundMaybeWithDerivedMetadataBuilder_absolute_expiry"))) TS_RefundMaybeWithDerivedMetadataBuilder_absolute_expiry(uint64_t this_arg, int64_t absolute_expiry) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + RefundMaybeWithDerivedMetadataBuilder_absolute_expiry(this_arg_conv, absolute_expiry); +} + +void __attribute__((export_name("TS_RefundMaybeWithDerivedMetadataBuilder_issuer"))) TS_RefundMaybeWithDerivedMetadataBuilder_issuer(uint64_t this_arg, jstring issuer) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKStr issuer_conv = str_ref_to_owned_c(issuer); + RefundMaybeWithDerivedMetadataBuilder_issuer(this_arg_conv, issuer_conv); +} + +void __attribute__((export_name("TS_RefundMaybeWithDerivedMetadataBuilder_path"))) TS_RefundMaybeWithDerivedMetadataBuilder_path(uint64_t this_arg, uint64_t path) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKBlindedPath path_conv; + path_conv.inner = untag_ptr(path); + path_conv.is_owned = ptr_is_owned(path); + CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv); + path_conv = BlindedPath_clone(&path_conv); + RefundMaybeWithDerivedMetadataBuilder_path(this_arg_conv, path_conv); +} + +void __attribute__((export_name("TS_RefundMaybeWithDerivedMetadataBuilder_chain"))) TS_RefundMaybeWithDerivedMetadataBuilder_chain(uint64_t this_arg, uint32_t network) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKNetwork network_conv = LDKNetwork_from_js(network); + RefundMaybeWithDerivedMetadataBuilder_chain(this_arg_conv, network_conv); +} + +void __attribute__((export_name("TS_RefundMaybeWithDerivedMetadataBuilder_quantity"))) TS_RefundMaybeWithDerivedMetadataBuilder_quantity(uint64_t this_arg, int64_t quantity) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + RefundMaybeWithDerivedMetadataBuilder_quantity(this_arg_conv, quantity); +} + +void __attribute__((export_name("TS_RefundMaybeWithDerivedMetadataBuilder_payer_note"))) TS_RefundMaybeWithDerivedMetadataBuilder_payer_note(uint64_t this_arg, jstring payer_note) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKStr payer_note_conv = str_ref_to_owned_c(payer_note); + RefundMaybeWithDerivedMetadataBuilder_payer_note(this_arg_conv, payer_note_conv); +} + +uint64_t __attribute__((export_name("TS_RefundMaybeWithDerivedMetadataBuilder_build"))) TS_RefundMaybeWithDerivedMetadataBuilder_build(uint64_t this_arg) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ"); + *ret_conv = RefundMaybeWithDerivedMetadataBuilder_build(this_arg_conv); + return tag_ptr(ret_conv, true); +} + void __attribute__((export_name("TS_Refund_free"))) TS_Refund_free(uint64_t this_obj) { LDKRefund this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -61573,6 +67410,16 @@ uint64_t __attribute__((export_name("TS_Refund_payer_note"))) TS_Refund_payer_n return ret_ref; } +int64_t __attribute__((export_name("TS_Refund_hash"))) TS_Refund_hash(uint64_t o) { + LDKRefund o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = Refund_hash(&o_conv); + return ret_conv; +} + int8_tArray __attribute__((export_name("TS_Refund_write"))) TS_Refund_write(uint64_t obj) { LDKRefund obj_conv; obj_conv.inner = untag_ptr(obj); @@ -61804,6 +67651,16 @@ uint64_t __attribute__((export_name("TS_NodeId_from_pubkey"))) TS_NodeId_from_p return ret_ref; } +uint64_t __attribute__((export_name("TS_NodeId_from_slice"))) TS_NodeId_from_slice(int8_tArray bytes) { + LDKu8slice bytes_ref; + bytes_ref.datalen = bytes->arr_len; + bytes_ref.data = bytes->elems; + LDKCResult_NodeIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeIdDecodeErrorZ), "LDKCResult_NodeIdDecodeErrorZ"); + *ret_conv = NodeId_from_slice(bytes_ref); + FREE(bytes); + return tag_ptr(ret_conv, true); +} + int8_tArray __attribute__((export_name("TS_NodeId_as_slice"))) TS_NodeId_as_slice(uint64_t this_arg) { LDKNodeId this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -62677,6 +68534,32 @@ uint64_t __attribute__((export_name("TS_DirectedChannelInfo_effective_capacity" return ret_ref; } +uint64_t __attribute__((export_name("TS_DirectedChannelInfo_source"))) TS_DirectedChannelInfo_source(uint64_t this_arg) { + LDKDirectedChannelInfo this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKNodeId ret_var = DirectedChannelInfo_source(&this_arg_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_DirectedChannelInfo_target"))) TS_DirectedChannelInfo_target(uint64_t this_arg) { + LDKDirectedChannelInfo this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKNodeId ret_var = DirectedChannelInfo_target(&this_arg_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + void __attribute__((export_name("TS_EffectiveCapacity_free"))) TS_EffectiveCapacity_free(uint64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -63397,6 +69280,16 @@ jboolean __attribute__((export_name("TS_NodeInfo_eq"))) TS_NodeInfo_eq(uint64_t return ret_conv; } +jboolean __attribute__((export_name("TS_NodeInfo_is_tor_only"))) TS_NodeInfo_is_tor_only(uint64_t this_arg) { + LDKNodeInfo this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = NodeInfo_is_tor_only(&this_arg_conv); + return ret_conv; +} + int8_tArray __attribute__((export_name("TS_NodeInfo_write"))) TS_NodeInfo_write(uint64_t obj) { LDKNodeInfo obj_conv; obj_conv.inner = untag_ptr(obj); @@ -67544,7 +73437,34 @@ void __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_set_channel_ DelayedPaymentOutputDescriptor_set_channel_value_satoshis(&this_ptr_conv, val); } -uint64_t __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_new"))) TS_DelayedPaymentOutputDescriptor_new(uint64_t outpoint_arg, int8_tArray per_commitment_point_arg, int16_t to_self_delay_arg, uint64_t output_arg, uint64_t revocation_pubkey_arg, int8_tArray channel_keys_id_arg, int64_t channel_value_satoshis_arg) { +uint64_t __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_get_channel_transaction_parameters"))) TS_DelayedPaymentOutputDescriptor_get_channel_transaction_parameters(uint64_t this_ptr) { + LDKDelayedPaymentOutputDescriptor this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelTransactionParameters ret_var = DelayedPaymentOutputDescriptor_get_channel_transaction_parameters(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_set_channel_transaction_parameters"))) TS_DelayedPaymentOutputDescriptor_set_channel_transaction_parameters(uint64_t this_ptr, uint64_t val) { + LDKDelayedPaymentOutputDescriptor this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelTransactionParameters val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelTransactionParameters_clone(&val_conv); + DelayedPaymentOutputDescriptor_set_channel_transaction_parameters(&this_ptr_conv, val_conv); +} + +uint64_t __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_new"))) TS_DelayedPaymentOutputDescriptor_new(uint64_t outpoint_arg, int8_tArray per_commitment_point_arg, int16_t to_self_delay_arg, uint64_t output_arg, uint64_t revocation_pubkey_arg, int8_tArray channel_keys_id_arg, int64_t channel_value_satoshis_arg, uint64_t channel_transaction_parameters_arg) { LDKOutPoint outpoint_arg_conv; outpoint_arg_conv.inner = untag_ptr(outpoint_arg); outpoint_arg_conv.is_owned = ptr_is_owned(outpoint_arg); @@ -67565,7 +73485,12 @@ uint64_t __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_new"))) LDKThirtyTwoBytes channel_keys_id_arg_ref; CHECK(channel_keys_id_arg->arr_len == 32); memcpy(channel_keys_id_arg_ref.data, channel_keys_id_arg->elems, 32); FREE(channel_keys_id_arg); - LDKDelayedPaymentOutputDescriptor ret_var = DelayedPaymentOutputDescriptor_new(outpoint_arg_conv, per_commitment_point_arg_ref, to_self_delay_arg, output_arg_conv, revocation_pubkey_arg_conv, channel_keys_id_arg_ref, channel_value_satoshis_arg); + LDKChannelTransactionParameters channel_transaction_parameters_arg_conv; + channel_transaction_parameters_arg_conv.inner = untag_ptr(channel_transaction_parameters_arg); + channel_transaction_parameters_arg_conv.is_owned = ptr_is_owned(channel_transaction_parameters_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_transaction_parameters_arg_conv); + channel_transaction_parameters_arg_conv = ChannelTransactionParameters_clone(&channel_transaction_parameters_arg_conv); + LDKDelayedPaymentOutputDescriptor ret_var = DelayedPaymentOutputDescriptor_new(outpoint_arg_conv, per_commitment_point_arg_ref, to_self_delay_arg, output_arg_conv, revocation_pubkey_arg_conv, channel_keys_id_arg_ref, channel_value_satoshis_arg, channel_transaction_parameters_arg_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -68249,6 +74174,29 @@ void __attribute__((export_name("TS_HTLCDescriptor_set_channel_derivation_param HTLCDescriptor_set_channel_derivation_parameters(&this_ptr_conv, val_conv); } +int8_tArray __attribute__((export_name("TS_HTLCDescriptor_get_commitment_txid"))) TS_HTLCDescriptor_get_commitment_txid(uint64_t this_ptr) { + LDKHTLCDescriptor this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(32, __LINE__); + memcpy(ret_arr->elems, *HTLCDescriptor_get_commitment_txid(&this_ptr_conv), 32); + return ret_arr; +} + +void __attribute__((export_name("TS_HTLCDescriptor_set_commitment_txid"))) TS_HTLCDescriptor_set_commitment_txid(uint64_t this_ptr, int8_tArray val) { + LDKHTLCDescriptor this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKThirtyTwoBytes val_ref; + CHECK(val->arr_len == 32); + memcpy(val_ref.data, val->elems, 32); FREE(val); + HTLCDescriptor_set_commitment_txid(&this_ptr_conv, val_ref); +} + int64_t __attribute__((export_name("TS_HTLCDescriptor_get_per_commitment_number"))) TS_HTLCDescriptor_get_per_commitment_number(uint64_t this_ptr) { LDKHTLCDescriptor this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -68385,6 +74333,37 @@ void __attribute__((export_name("TS_HTLCDescriptor_set_counterparty_sig"))) TS_ HTLCDescriptor_set_counterparty_sig(&this_ptr_conv, val_ref); } +uint64_t __attribute__((export_name("TS_HTLCDescriptor_new"))) TS_HTLCDescriptor_new(uint64_t channel_derivation_parameters_arg, int8_tArray commitment_txid_arg, int64_t per_commitment_number_arg, int8_tArray per_commitment_point_arg, int32_t feerate_per_kw_arg, uint64_t htlc_arg, uint64_t preimage_arg, int8_tArray counterparty_sig_arg) { + LDKChannelDerivationParameters channel_derivation_parameters_arg_conv; + channel_derivation_parameters_arg_conv.inner = untag_ptr(channel_derivation_parameters_arg); + channel_derivation_parameters_arg_conv.is_owned = ptr_is_owned(channel_derivation_parameters_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_derivation_parameters_arg_conv); + channel_derivation_parameters_arg_conv = ChannelDerivationParameters_clone(&channel_derivation_parameters_arg_conv); + LDKThirtyTwoBytes commitment_txid_arg_ref; + CHECK(commitment_txid_arg->arr_len == 32); + memcpy(commitment_txid_arg_ref.data, commitment_txid_arg->elems, 32); FREE(commitment_txid_arg); + LDKPublicKey per_commitment_point_arg_ref; + CHECK(per_commitment_point_arg->arr_len == 33); + memcpy(per_commitment_point_arg_ref.compressed_form, per_commitment_point_arg->elems, 33); FREE(per_commitment_point_arg); + LDKHTLCOutputInCommitment htlc_arg_conv; + htlc_arg_conv.inner = untag_ptr(htlc_arg); + htlc_arg_conv.is_owned = ptr_is_owned(htlc_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(htlc_arg_conv); + htlc_arg_conv = HTLCOutputInCommitment_clone(&htlc_arg_conv); + void* preimage_arg_ptr = untag_ptr(preimage_arg); + CHECK_ACCESS(preimage_arg_ptr); + LDKCOption_ThirtyTwoBytesZ preimage_arg_conv = *(LDKCOption_ThirtyTwoBytesZ*)(preimage_arg_ptr); + preimage_arg_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(preimage_arg)); + LDKECDSASignature counterparty_sig_arg_ref; + CHECK(counterparty_sig_arg->arr_len == 64); + memcpy(counterparty_sig_arg_ref.compact_form, counterparty_sig_arg->elems, 64); FREE(counterparty_sig_arg); + LDKHTLCDescriptor ret_var = HTLCDescriptor_new(channel_derivation_parameters_arg_conv, commitment_txid_arg_ref, per_commitment_number_arg, per_commitment_point_arg_ref, feerate_per_kw_arg, htlc_arg_conv, preimage_arg_conv, counterparty_sig_arg_ref); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + static inline uint64_t HTLCDescriptor_clone_ptr(LDKHTLCDescriptor *NONNULL_PTR arg) { LDKHTLCDescriptor ret_var = HTLCDescriptor_clone(arg); uint64_t ret_ref = 0; @@ -68589,6 +74568,15 @@ void __attribute__((export_name("TS_NodeSigner_free"))) TS_NodeSigner_free(uint NodeSigner_free(this_ptr_conv); } +void __attribute__((export_name("TS_OutputSpender_free"))) TS_OutputSpender_free(uint64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKOutputSpender this_ptr_conv = *(LDKOutputSpender*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + OutputSpender_free(this_ptr_conv); +} + void __attribute__((export_name("TS_SignerProvider_free"))) TS_SignerProvider_free(uint64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -68598,6 +74586,15 @@ void __attribute__((export_name("TS_SignerProvider_free"))) TS_SignerProvider_f SignerProvider_free(this_ptr_conv); } +void __attribute__((export_name("TS_ChangeDestinationSource_free"))) TS_ChangeDestinationSource_free(uint64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKChangeDestinationSource this_ptr_conv = *(LDKChangeDestinationSource*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + ChangeDestinationSource_free(this_ptr_conv); +} + void __attribute__((export_name("TS_InMemorySigner_free"))) TS_InMemorySigner_free(uint64_t this_obj) { LDKInMemorySigner this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -69089,76 +75086,36 @@ uint64_t __attribute__((export_name("TS_KeysManager_sign_spendable_outputs_psbt return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_KeysManager_spend_spendable_outputs"))) TS_KeysManager_spend_spendable_outputs(uint64_t this_arg, uint64_tArray descriptors, uint64_tArray outputs, int8_tArray change_destination_script, int32_t feerate_sat_per_1000_weight, uint64_t locktime) { +uint64_t __attribute__((export_name("TS_KeysManager_as_EntropySource"))) TS_KeysManager_as_EntropySource(uint64_t this_arg) { LDKKeysManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKCVec_SpendableOutputDescriptorZ descriptors_constr; - descriptors_constr.datalen = descriptors->arr_len; - if (descriptors_constr.datalen > 0) - descriptors_constr.data = MALLOC(descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements"); - else - descriptors_constr.data = NULL; - uint64_t* descriptors_vals = descriptors->elems; - for (size_t b = 0; b < descriptors_constr.datalen; b++) { - uint64_t descriptors_conv_27 = descriptors_vals[b]; - void* descriptors_conv_27_ptr = untag_ptr(descriptors_conv_27); - CHECK_ACCESS(descriptors_conv_27_ptr); - LDKSpendableOutputDescriptor descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(descriptors_conv_27_ptr); - descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptors_conv_27)); - descriptors_constr.data[b] = descriptors_conv_27_conv; - } - FREE(descriptors); - LDKCVec_TxOutZ outputs_constr; - outputs_constr.datalen = outputs->arr_len; - if (outputs_constr.datalen > 0) - outputs_constr.data = MALLOC(outputs_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements"); - else - outputs_constr.data = NULL; - uint64_t* outputs_vals = outputs->elems; - for (size_t h = 0; h < outputs_constr.datalen; h++) { - uint64_t outputs_conv_7 = outputs_vals[h]; - void* outputs_conv_7_ptr = untag_ptr(outputs_conv_7); - CHECK_ACCESS(outputs_conv_7_ptr); - LDKTxOut outputs_conv_7_conv = *(LDKTxOut*)(outputs_conv_7_ptr); - outputs_conv_7_conv = TxOut_clone((LDKTxOut*)untag_ptr(outputs_conv_7)); - outputs_constr.data[h] = outputs_conv_7_conv; - } - FREE(outputs); - LDKCVec_u8Z change_destination_script_ref; - change_destination_script_ref.datalen = change_destination_script->arr_len; - change_destination_script_ref.data = MALLOC(change_destination_script_ref.datalen, "LDKCVec_u8Z Bytes"); - memcpy(change_destination_script_ref.data, change_destination_script->elems, change_destination_script_ref.datalen); FREE(change_destination_script); - void* locktime_ptr = untag_ptr(locktime); - CHECK_ACCESS(locktime_ptr); - LDKCOption_u32Z locktime_conv = *(LDKCOption_u32Z*)(locktime_ptr); - locktime_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(locktime)); - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = KeysManager_spend_spendable_outputs(&this_arg_conv, descriptors_constr, outputs_constr, change_destination_script_ref, feerate_sat_per_1000_weight, locktime_conv); - return tag_ptr(ret_conv, true); + LDKEntropySource* ret_ret = MALLOC(sizeof(LDKEntropySource), "LDKEntropySource"); + *ret_ret = KeysManager_as_EntropySource(&this_arg_conv); + return tag_ptr(ret_ret, true); } -uint64_t __attribute__((export_name("TS_KeysManager_as_EntropySource"))) TS_KeysManager_as_EntropySource(uint64_t this_arg) { +uint64_t __attribute__((export_name("TS_KeysManager_as_NodeSigner"))) TS_KeysManager_as_NodeSigner(uint64_t this_arg) { LDKKeysManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKEntropySource* ret_ret = MALLOC(sizeof(LDKEntropySource), "LDKEntropySource"); - *ret_ret = KeysManager_as_EntropySource(&this_arg_conv); + LDKNodeSigner* ret_ret = MALLOC(sizeof(LDKNodeSigner), "LDKNodeSigner"); + *ret_ret = KeysManager_as_NodeSigner(&this_arg_conv); return tag_ptr(ret_ret, true); } -uint64_t __attribute__((export_name("TS_KeysManager_as_NodeSigner"))) TS_KeysManager_as_NodeSigner(uint64_t this_arg) { +uint64_t __attribute__((export_name("TS_KeysManager_as_OutputSpender"))) TS_KeysManager_as_OutputSpender(uint64_t this_arg) { LDKKeysManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKNodeSigner* ret_ret = MALLOC(sizeof(LDKNodeSigner), "LDKNodeSigner"); - *ret_ret = KeysManager_as_NodeSigner(&this_arg_conv); + LDKOutputSpender* ret_ret = MALLOC(sizeof(LDKOutputSpender), "LDKOutputSpender"); + *ret_ret = KeysManager_as_OutputSpender(&this_arg_conv); return tag_ptr(ret_ret, true); } @@ -69203,6 +75160,17 @@ uint64_t __attribute__((export_name("TS_PhantomKeysManager_as_NodeSigner"))) TS return tag_ptr(ret_ret, true); } +uint64_t __attribute__((export_name("TS_PhantomKeysManager_as_OutputSpender"))) TS_PhantomKeysManager_as_OutputSpender(uint64_t this_arg) { + LDKPhantomKeysManager this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKOutputSpender* ret_ret = MALLOC(sizeof(LDKOutputSpender), "LDKOutputSpender"); + *ret_ret = PhantomKeysManager_as_OutputSpender(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + uint64_t __attribute__((export_name("TS_PhantomKeysManager_as_SignerProvider"))) TS_PhantomKeysManager_as_SignerProvider(uint64_t this_arg) { LDKPhantomKeysManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -69230,57 +75198,6 @@ uint64_t __attribute__((export_name("TS_PhantomKeysManager_new"))) TS_PhantomKe return ret_ref; } -uint64_t __attribute__((export_name("TS_PhantomKeysManager_spend_spendable_outputs"))) TS_PhantomKeysManager_spend_spendable_outputs(uint64_t this_arg, uint64_tArray descriptors, uint64_tArray outputs, int8_tArray change_destination_script, int32_t feerate_sat_per_1000_weight, uint64_t locktime) { - LDKPhantomKeysManager this_arg_conv; - this_arg_conv.inner = untag_ptr(this_arg); - this_arg_conv.is_owned = ptr_is_owned(this_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv.is_owned = false; - LDKCVec_SpendableOutputDescriptorZ descriptors_constr; - descriptors_constr.datalen = descriptors->arr_len; - if (descriptors_constr.datalen > 0) - descriptors_constr.data = MALLOC(descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements"); - else - descriptors_constr.data = NULL; - uint64_t* descriptors_vals = descriptors->elems; - for (size_t b = 0; b < descriptors_constr.datalen; b++) { - uint64_t descriptors_conv_27 = descriptors_vals[b]; - void* descriptors_conv_27_ptr = untag_ptr(descriptors_conv_27); - CHECK_ACCESS(descriptors_conv_27_ptr); - LDKSpendableOutputDescriptor descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(descriptors_conv_27_ptr); - descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptors_conv_27)); - descriptors_constr.data[b] = descriptors_conv_27_conv; - } - FREE(descriptors); - LDKCVec_TxOutZ outputs_constr; - outputs_constr.datalen = outputs->arr_len; - if (outputs_constr.datalen > 0) - outputs_constr.data = MALLOC(outputs_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements"); - else - outputs_constr.data = NULL; - uint64_t* outputs_vals = outputs->elems; - for (size_t h = 0; h < outputs_constr.datalen; h++) { - uint64_t outputs_conv_7 = outputs_vals[h]; - void* outputs_conv_7_ptr = untag_ptr(outputs_conv_7); - CHECK_ACCESS(outputs_conv_7_ptr); - LDKTxOut outputs_conv_7_conv = *(LDKTxOut*)(outputs_conv_7_ptr); - outputs_conv_7_conv = TxOut_clone((LDKTxOut*)untag_ptr(outputs_conv_7)); - outputs_constr.data[h] = outputs_conv_7_conv; - } - FREE(outputs); - LDKCVec_u8Z change_destination_script_ref; - change_destination_script_ref.datalen = change_destination_script->arr_len; - change_destination_script_ref.data = MALLOC(change_destination_script_ref.datalen, "LDKCVec_u8Z Bytes"); - memcpy(change_destination_script_ref.data, change_destination_script->elems, change_destination_script_ref.datalen); FREE(change_destination_script); - void* locktime_ptr = untag_ptr(locktime); - CHECK_ACCESS(locktime_ptr); - LDKCOption_u32Z locktime_conv = *(LDKCOption_u32Z*)(locktime_ptr); - locktime_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(locktime)); - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = PhantomKeysManager_spend_spendable_outputs(&this_arg_conv, descriptors_constr, outputs_constr, change_destination_script_ref, feerate_sat_per_1000_weight, locktime_conv); - return tag_ptr(ret_conv, true); -} - uint64_t __attribute__((export_name("TS_PhantomKeysManager_derive_channel_keys"))) TS_PhantomKeysManager_derive_channel_keys(uint64_t this_arg, int64_t channel_value_satoshis, int8_tArray params) { LDKPhantomKeysManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -69320,6 +75237,36 @@ int8_tArray __attribute__((export_name("TS_PhantomKeysManager_get_phantom_node_ return ret_arr; } +void __attribute__((export_name("TS_RandomBytes_free"))) TS_RandomBytes_free(uint64_t this_obj) { + LDKRandomBytes this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + RandomBytes_free(this_obj_conv); +} + +uint64_t __attribute__((export_name("TS_RandomBytes_new"))) TS_RandomBytes_new(int8_tArray seed) { + LDKThirtyTwoBytes seed_ref; + CHECK(seed->arr_len == 32); + memcpy(seed_ref.data, seed->elems, 32); FREE(seed); + LDKRandomBytes ret_var = RandomBytes_new(seed_ref); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_RandomBytes_as_EntropySource"))) TS_RandomBytes_as_EntropySource(uint64_t this_arg) { + LDKRandomBytes this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKEntropySource* ret_ret = MALLOC(sizeof(LDKEntropySource), "LDKEntropySource"); + *ret_ret = RandomBytes_as_EntropySource(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + void __attribute__((export_name("TS_EcdsaChannelSigner_free"))) TS_EcdsaChannelSigner_free(uint64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -69640,6 +75587,29 @@ uint64_t __attribute__((export_name("TS_Destination_blinded_path"))) TS_Destina return ret_ref; } +int64_t __attribute__((export_name("TS_Destination_hash"))) TS_Destination_hash(uint64_t o) { + LDKDestination* o_conv = (LDKDestination*)untag_ptr(o); + int64_t ret_conv = Destination_hash(o_conv); + return ret_conv; +} + +jboolean __attribute__((export_name("TS_Destination_eq"))) TS_Destination_eq(uint64_t a, uint64_t b) { + LDKDestination* a_conv = (LDKDestination*)untag_ptr(a); + LDKDestination* b_conv = (LDKDestination*)untag_ptr(b); + jboolean ret_conv = Destination_eq(a_conv, b_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_Destination_resolve"))) TS_Destination_resolve(uint64_t this_arg, uint64_t network_graph) { + LDKDestination* this_arg_conv = (LDKDestination*)untag_ptr(this_arg); + LDKReadOnlyNetworkGraph network_graph_conv; + network_graph_conv.inner = untag_ptr(network_graph); + network_graph_conv.is_owned = ptr_is_owned(network_graph); + CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv); + network_graph_conv.is_owned = false; + Destination_resolve(this_arg_conv, &network_graph_conv); +} + void __attribute__((export_name("TS_SendSuccess_free"))) TS_SendSuccess_free(uint64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -69686,6 +75656,12 @@ uint64_t __attribute__((export_name("TS_SendSuccess_buffered_awaiting_connectio return ret_ref; } +int64_t __attribute__((export_name("TS_SendSuccess_hash"))) TS_SendSuccess_hash(uint64_t o) { + LDKSendSuccess* o_conv = (LDKSendSuccess*)untag_ptr(o); + int64_t ret_conv = SendSuccess_hash(o_conv); + return ret_conv; +} + jboolean __attribute__((export_name("TS_SendSuccess_eq"))) TS_SendSuccess_eq(uint64_t a, uint64_t b) { LDKSendSuccess* a_conv = (LDKSendSuccess*)untag_ptr(a); LDKSendSuccess* b_conv = (LDKSendSuccess*)untag_ptr(b); @@ -69782,6 +75758,13 @@ uint64_t __attribute__((export_name("TS_SendError_get_node_id_failed"))) TS_Sen return ret_ref; } +uint64_t __attribute__((export_name("TS_SendError_unresolved_introduction_node"))) TS_SendError_unresolved_introduction_node() { + LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError"); + *ret_copy = SendError_unresolved_introduction_node(); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + uint64_t __attribute__((export_name("TS_SendError_blinded_path_advance_failed"))) TS_SendError_blinded_path_advance_failed() { LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError"); *ret_copy = SendError_blinded_path_advance_failed(); @@ -69789,6 +75772,12 @@ uint64_t __attribute__((export_name("TS_SendError_blinded_path_advance_failed") return ret_ref; } +int64_t __attribute__((export_name("TS_SendError_hash"))) TS_SendError_hash(uint64_t o) { + LDKSendError* o_conv = (LDKSendError*)untag_ptr(o); + int64_t ret_conv = SendError_hash(o_conv); + return ret_conv; +} + jboolean __attribute__((export_name("TS_SendError_eq"))) TS_SendError_eq(uint64_t a, uint64_t b) { LDKSendError* a_conv = (LDKSendError*)untag_ptr(a); LDKSendError* b_conv = (LDKSendError*)untag_ptr(b); @@ -69834,17 +75823,18 @@ uint64_t __attribute__((export_name("TS_PeeledOnion_clone"))) TS_PeeledOnion_cl return ret_ref; } -uint64_t __attribute__((export_name("TS_PeeledOnion_forward"))) TS_PeeledOnion_forward(int8_tArray a, uint64_t b) { - LDKPublicKey a_ref; - CHECK(a->arr_len == 33); - memcpy(a_ref.compressed_form, a->elems, 33); FREE(a); +uint64_t __attribute__((export_name("TS_PeeledOnion_forward"))) TS_PeeledOnion_forward(uint64_t a, uint64_t b) { + void* a_ptr = untag_ptr(a); + CHECK_ACCESS(a_ptr); + LDKNextMessageHop a_conv = *(LDKNextMessageHop*)(a_ptr); + a_conv = NextMessageHop_clone((LDKNextMessageHop*)untag_ptr(a)); LDKOnionMessage b_conv; b_conv.inner = untag_ptr(b); b_conv.is_owned = ptr_is_owned(b); CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); b_conv = OnionMessage_clone(&b_conv); LDKPeeledOnion *ret_copy = MALLOC(sizeof(LDKPeeledOnion), "LDKPeeledOnion"); - *ret_copy = PeeledOnion_forward(a_ref, b_conv); + *ret_copy = PeeledOnion_forward(a_conv, b_conv); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -69868,13 +75858,53 @@ uint64_t __attribute__((export_name("TS_PeeledOnion_receive"))) TS_PeeledOnion_ return ret_ref; } -uint64_t __attribute__((export_name("TS_create_onion_message"))) TS_create_onion_message(uint64_t entropy_source, uint64_t node_signer, uint64_t path, uint64_t contents, uint64_t reply_path) { +uint64_t __attribute__((export_name("TS_create_onion_message_resolving_destination"))) TS_create_onion_message_resolving_destination(uint64_t entropy_source, uint64_t node_signer, uint64_t node_id_lookup, uint64_t network_graph, uint64_t path, uint64_t contents, uint64_t reply_path) { + void* entropy_source_ptr = untag_ptr(entropy_source); + if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } + LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + void* node_signer_ptr = untag_ptr(node_signer); + if (ptr_is_owned(node_signer)) { CHECK_ACCESS(node_signer_ptr); } + LDKNodeSigner* node_signer_conv = (LDKNodeSigner*)node_signer_ptr; + void* node_id_lookup_ptr = untag_ptr(node_id_lookup); + if (ptr_is_owned(node_id_lookup)) { CHECK_ACCESS(node_id_lookup_ptr); } + LDKNodeIdLookUp* node_id_lookup_conv = (LDKNodeIdLookUp*)node_id_lookup_ptr; + LDKReadOnlyNetworkGraph network_graph_conv; + network_graph_conv.inner = untag_ptr(network_graph); + network_graph_conv.is_owned = ptr_is_owned(network_graph); + CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv); + network_graph_conv.is_owned = false; + LDKOnionMessagePath path_conv; + path_conv.inner = untag_ptr(path); + path_conv.is_owned = ptr_is_owned(path); + CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv); + path_conv = OnionMessagePath_clone(&path_conv); + void* contents_ptr = untag_ptr(contents); + CHECK_ACCESS(contents_ptr); + LDKOnionMessageContents contents_conv = *(LDKOnionMessageContents*)(contents_ptr); + if (contents_conv.free == LDKOnionMessageContents_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKOnionMessageContents_JCalls_cloned(&contents_conv); + } + LDKBlindedPath reply_path_conv; + reply_path_conv.inner = untag_ptr(reply_path); + reply_path_conv.is_owned = ptr_is_owned(reply_path); + CHECK_INNER_FIELD_ACCESS_OR_NULL(reply_path_conv); + reply_path_conv = BlindedPath_clone(&reply_path_conv); + LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ"); + *ret_conv = create_onion_message_resolving_destination(entropy_source_conv, node_signer_conv, node_id_lookup_conv, &network_graph_conv, path_conv, contents_conv, reply_path_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_create_onion_message"))) TS_create_onion_message(uint64_t entropy_source, uint64_t node_signer, uint64_t node_id_lookup, uint64_t path, uint64_t contents, uint64_t reply_path) { void* entropy_source_ptr = untag_ptr(entropy_source); if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; void* node_signer_ptr = untag_ptr(node_signer); if (ptr_is_owned(node_signer)) { CHECK_ACCESS(node_signer_ptr); } LDKNodeSigner* node_signer_conv = (LDKNodeSigner*)node_signer_ptr; + void* node_id_lookup_ptr = untag_ptr(node_id_lookup); + if (ptr_is_owned(node_id_lookup)) { CHECK_ACCESS(node_id_lookup_ptr); } + LDKNodeIdLookUp* node_id_lookup_conv = (LDKNodeIdLookUp*)node_id_lookup_ptr; LDKOnionMessagePath path_conv; path_conv.inner = untag_ptr(path); path_conv.is_owned = ptr_is_owned(path); @@ -69893,7 +75923,7 @@ uint64_t __attribute__((export_name("TS_create_onion_message"))) TS_create_onio CHECK_INNER_FIELD_ACCESS_OR_NULL(reply_path_conv); reply_path_conv = BlindedPath_clone(&reply_path_conv); LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ"); - *ret_conv = create_onion_message(entropy_source_conv, node_signer_conv, path_conv, contents_conv, reply_path_conv); + *ret_conv = create_onion_message(entropy_source_conv, node_signer_conv, node_id_lookup_conv, path_conv, contents_conv, reply_path_conv); return tag_ptr(ret_conv, true); } @@ -69929,7 +75959,7 @@ uint64_t __attribute__((export_name("TS_peel_onion_message"))) TS_peel_onion_me return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_OnionMessenger_new"))) TS_OnionMessenger_new(uint64_t entropy_source, uint64_t node_signer, uint64_t logger, uint64_t message_router, uint64_t offers_handler, uint64_t custom_handler) { +uint64_t __attribute__((export_name("TS_OnionMessenger_new"))) TS_OnionMessenger_new(uint64_t entropy_source, uint64_t node_signer, uint64_t logger, uint64_t node_id_lookup, uint64_t message_router, uint64_t offers_handler, uint64_t custom_handler) { void* entropy_source_ptr = untag_ptr(entropy_source); CHECK_ACCESS(entropy_source_ptr); LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); @@ -69951,6 +75981,13 @@ uint64_t __attribute__((export_name("TS_OnionMessenger_new"))) TS_OnionMessenge // If this_arg is a JCalls struct, then we need to increment the refcnt in it. LDKLogger_JCalls_cloned(&logger_conv); } + void* node_id_lookup_ptr = untag_ptr(node_id_lookup); + CHECK_ACCESS(node_id_lookup_ptr); + LDKNodeIdLookUp node_id_lookup_conv = *(LDKNodeIdLookUp*)(node_id_lookup_ptr); + if (node_id_lookup_conv.free == LDKNodeIdLookUp_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKNodeIdLookUp_JCalls_cloned(&node_id_lookup_conv); + } void* message_router_ptr = untag_ptr(message_router); CHECK_ACCESS(message_router_ptr); LDKMessageRouter message_router_conv = *(LDKMessageRouter*)(message_router_ptr); @@ -69972,7 +76009,7 @@ uint64_t __attribute__((export_name("TS_OnionMessenger_new"))) TS_OnionMessenge // If this_arg is a JCalls struct, then we need to increment the refcnt in it. LDKCustomOnionMessageHandler_JCalls_cloned(&custom_handler_conv); } - LDKOnionMessenger ret_var = OnionMessenger_new(entropy_source_conv, node_signer_conv, logger_conv, message_router_conv, offers_handler_conv, custom_handler_conv); + LDKOnionMessenger ret_var = OnionMessenger_new(entropy_source_conv, node_signer_conv, logger_conv, node_id_lookup_conv, message_router_conv, offers_handler_conv, custom_handler_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -70411,6 +76448,65 @@ void __attribute__((export_name("TS_OnionMessageContents_free"))) TS_OnionMessa OnionMessageContents_free(this_ptr_conv); } +void __attribute__((export_name("TS_NextMessageHop_free"))) TS_NextMessageHop_free(uint64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKNextMessageHop this_ptr_conv = *(LDKNextMessageHop*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + NextMessageHop_free(this_ptr_conv); +} + +static inline uint64_t NextMessageHop_clone_ptr(LDKNextMessageHop *NONNULL_PTR arg) { + LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop"); + *ret_copy = NextMessageHop_clone(arg); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t __attribute__((export_name("TS_NextMessageHop_clone_ptr"))) TS_NextMessageHop_clone_ptr(uint64_t arg) { + LDKNextMessageHop* arg_conv = (LDKNextMessageHop*)untag_ptr(arg); + int64_t ret_conv = NextMessageHop_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_NextMessageHop_clone"))) TS_NextMessageHop_clone(uint64_t orig) { + LDKNextMessageHop* orig_conv = (LDKNextMessageHop*)untag_ptr(orig); + LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop"); + *ret_copy = NextMessageHop_clone(orig_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_NextMessageHop_node_id"))) TS_NextMessageHop_node_id(int8_tArray a) { + LDKPublicKey a_ref; + CHECK(a->arr_len == 33); + memcpy(a_ref.compressed_form, a->elems, 33); FREE(a); + LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop"); + *ret_copy = NextMessageHop_node_id(a_ref); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_NextMessageHop_short_channel_id"))) TS_NextMessageHop_short_channel_id(int64_t a) { + LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop"); + *ret_copy = NextMessageHop_short_channel_id(a); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t __attribute__((export_name("TS_NextMessageHop_hash"))) TS_NextMessageHop_hash(uint64_t o) { + LDKNextMessageHop* o_conv = (LDKNextMessageHop*)untag_ptr(o); + int64_t ret_conv = NextMessageHop_hash(o_conv); + return ret_conv; +} + +jboolean __attribute__((export_name("TS_NextMessageHop_eq"))) TS_NextMessageHop_eq(uint64_t a, uint64_t b) { + LDKNextMessageHop* a_conv = (LDKNextMessageHop*)untag_ptr(a); + LDKNextMessageHop* b_conv = (LDKNextMessageHop*)untag_ptr(b); + jboolean ret_conv = NextMessageHop_eq(a_conv, b_conv); + return ret_conv; +} + void __attribute__((export_name("TS_BlindedPath_free"))) TS_BlindedPath_free(uint64_t this_obj) { LDKBlindedPath this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -70419,27 +76515,29 @@ void __attribute__((export_name("TS_BlindedPath_free"))) TS_BlindedPath_free(ui BlindedPath_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_BlindedPath_get_introduction_node_id"))) TS_BlindedPath_get_introduction_node_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_BlindedPath_get_introduction_node"))) TS_BlindedPath_get_introduction_node(uint64_t this_ptr) { LDKBlindedPath this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, BlindedPath_get_introduction_node_id(&this_ptr_conv).compressed_form, 33); - return ret_arr; + LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode"); + *ret_copy = BlindedPath_get_introduction_node(&this_ptr_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; } -void __attribute__((export_name("TS_BlindedPath_set_introduction_node_id"))) TS_BlindedPath_set_introduction_node_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_BlindedPath_set_introduction_node"))) TS_BlindedPath_set_introduction_node(uint64_t this_ptr, uint64_t val) { LDKBlindedPath this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - BlindedPath_set_introduction_node_id(&this_ptr_conv, val_ref); + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKIntroductionNode val_conv = *(LDKIntroductionNode*)(val_ptr); + val_conv = IntroductionNode_clone((LDKIntroductionNode*)untag_ptr(val)); + BlindedPath_set_introduction_node(&this_ptr_conv, val_conv); } int8_tArray __attribute__((export_name("TS_BlindedPath_get_blinding_point"))) TS_BlindedPath_get_blinding_point(uint64_t this_ptr) { @@ -70513,10 +76611,11 @@ void __attribute__((export_name("TS_BlindedPath_set_blinded_hops"))) TS_Blinded BlindedPath_set_blinded_hops(&this_ptr_conv, val_constr); } -uint64_t __attribute__((export_name("TS_BlindedPath_new"))) TS_BlindedPath_new(int8_tArray introduction_node_id_arg, int8_tArray blinding_point_arg, uint64_tArray blinded_hops_arg) { - LDKPublicKey introduction_node_id_arg_ref; - CHECK(introduction_node_id_arg->arr_len == 33); - memcpy(introduction_node_id_arg_ref.compressed_form, introduction_node_id_arg->elems, 33); FREE(introduction_node_id_arg); +uint64_t __attribute__((export_name("TS_BlindedPath_new"))) TS_BlindedPath_new(uint64_t introduction_node_arg, int8_tArray blinding_point_arg, uint64_tArray blinded_hops_arg) { + void* introduction_node_arg_ptr = untag_ptr(introduction_node_arg); + CHECK_ACCESS(introduction_node_arg_ptr); + LDKIntroductionNode introduction_node_arg_conv = *(LDKIntroductionNode*)(introduction_node_arg_ptr); + introduction_node_arg_conv = IntroductionNode_clone((LDKIntroductionNode*)untag_ptr(introduction_node_arg)); LDKPublicKey blinding_point_arg_ref; CHECK(blinding_point_arg->arr_len == 33); memcpy(blinding_point_arg_ref.compressed_form, blinding_point_arg->elems, 33); FREE(blinding_point_arg); @@ -70537,7 +76636,7 @@ uint64_t __attribute__((export_name("TS_BlindedPath_new"))) TS_BlindedPath_new( blinded_hops_arg_constr.data[m] = blinded_hops_arg_conv_12_conv; } FREE(blinded_hops_arg); - LDKBlindedPath ret_var = BlindedPath_new(introduction_node_id_arg_ref, blinding_point_arg_ref, blinded_hops_arg_constr); + LDKBlindedPath ret_var = BlindedPath_new(introduction_node_arg_conv, blinding_point_arg_ref, blinded_hops_arg_constr); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -70599,6 +76698,131 @@ jboolean __attribute__((export_name("TS_BlindedPath_eq"))) TS_BlindedPath_eq(ui return ret_conv; } +void __attribute__((export_name("TS_IntroductionNode_free"))) TS_IntroductionNode_free(uint64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKIntroductionNode this_ptr_conv = *(LDKIntroductionNode*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + IntroductionNode_free(this_ptr_conv); +} + +static inline uint64_t IntroductionNode_clone_ptr(LDKIntroductionNode *NONNULL_PTR arg) { + LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode"); + *ret_copy = IntroductionNode_clone(arg); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t __attribute__((export_name("TS_IntroductionNode_clone_ptr"))) TS_IntroductionNode_clone_ptr(uint64_t arg) { + LDKIntroductionNode* arg_conv = (LDKIntroductionNode*)untag_ptr(arg); + int64_t ret_conv = IntroductionNode_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_IntroductionNode_clone"))) TS_IntroductionNode_clone(uint64_t orig) { + LDKIntroductionNode* orig_conv = (LDKIntroductionNode*)untag_ptr(orig); + LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode"); + *ret_copy = IntroductionNode_clone(orig_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_IntroductionNode_node_id"))) TS_IntroductionNode_node_id(int8_tArray a) { + LDKPublicKey a_ref; + CHECK(a->arr_len == 33); + memcpy(a_ref.compressed_form, a->elems, 33); FREE(a); + LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode"); + *ret_copy = IntroductionNode_node_id(a_ref); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_IntroductionNode_directed_short_channel_id"))) TS_IntroductionNode_directed_short_channel_id(uint32_t a, int64_t b) { + LDKDirection a_conv = LDKDirection_from_js(a); + LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode"); + *ret_copy = IntroductionNode_directed_short_channel_id(a_conv, b); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t __attribute__((export_name("TS_IntroductionNode_hash"))) TS_IntroductionNode_hash(uint64_t o) { + LDKIntroductionNode* o_conv = (LDKIntroductionNode*)untag_ptr(o); + int64_t ret_conv = IntroductionNode_hash(o_conv); + return ret_conv; +} + +jboolean __attribute__((export_name("TS_IntroductionNode_eq"))) TS_IntroductionNode_eq(uint64_t a, uint64_t b) { + LDKIntroductionNode* a_conv = (LDKIntroductionNode*)untag_ptr(a); + LDKIntroductionNode* b_conv = (LDKIntroductionNode*)untag_ptr(b); + jboolean ret_conv = IntroductionNode_eq(a_conv, b_conv); + return ret_conv; +} + +uint32_t __attribute__((export_name("TS_Direction_clone"))) TS_Direction_clone(uint64_t orig) { + LDKDirection* orig_conv = (LDKDirection*)untag_ptr(orig); + uint32_t ret_conv = LDKDirection_to_js(Direction_clone(orig_conv)); + return ret_conv; +} + +uint32_t __attribute__((export_name("TS_Direction_node_one"))) TS_Direction_node_one() { + uint32_t ret_conv = LDKDirection_to_js(Direction_node_one()); + return ret_conv; +} + +uint32_t __attribute__((export_name("TS_Direction_node_two"))) TS_Direction_node_two() { + uint32_t ret_conv = LDKDirection_to_js(Direction_node_two()); + return ret_conv; +} + +int64_t __attribute__((export_name("TS_Direction_hash"))) TS_Direction_hash(uint64_t o) { + LDKDirection* o_conv = (LDKDirection*)untag_ptr(o); + int64_t ret_conv = Direction_hash(o_conv); + return ret_conv; +} + +jboolean __attribute__((export_name("TS_Direction_eq"))) TS_Direction_eq(uint64_t a, uint64_t b) { + LDKDirection* a_conv = (LDKDirection*)untag_ptr(a); + LDKDirection* b_conv = (LDKDirection*)untag_ptr(b); + jboolean ret_conv = Direction_eq(a_conv, b_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_NodeIdLookUp_free"))) TS_NodeIdLookUp_free(uint64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKNodeIdLookUp this_ptr_conv = *(LDKNodeIdLookUp*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + NodeIdLookUp_free(this_ptr_conv); +} + +void __attribute__((export_name("TS_EmptyNodeIdLookUp_free"))) TS_EmptyNodeIdLookUp_free(uint64_t this_obj) { + LDKEmptyNodeIdLookUp this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + EmptyNodeIdLookUp_free(this_obj_conv); +} + +uint64_t __attribute__((export_name("TS_EmptyNodeIdLookUp_new"))) TS_EmptyNodeIdLookUp_new() { + LDKEmptyNodeIdLookUp ret_var = EmptyNodeIdLookUp_new(); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_EmptyNodeIdLookUp_as_NodeIdLookUp"))) TS_EmptyNodeIdLookUp_as_NodeIdLookUp(uint64_t this_arg) { + LDKEmptyNodeIdLookUp this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKNodeIdLookUp* ret_ret = MALLOC(sizeof(LDKNodeIdLookUp), "LDKNodeIdLookUp"); + *ret_ret = EmptyNodeIdLookUp_as_NodeIdLookUp(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + void __attribute__((export_name("TS_BlindedHop_free"))) TS_BlindedHop_free(uint64_t this_obj) { LDKBlindedHop this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -70731,8 +76955,12 @@ uint64_t __attribute__((export_name("TS_BlindedPath_one_hop_for_message"))) TS_ CHECK(recipient_node_id->arr_len == 33); memcpy(recipient_node_id_ref.compressed_form, recipient_node_id->elems, 33); FREE(recipient_node_id); void* entropy_source_ptr = untag_ptr(entropy_source); - if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } - LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } LDKCResult_BlindedPathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedPathNoneZ), "LDKCResult_BlindedPathNoneZ"); *ret_conv = BlindedPath_one_hop_for_message(recipient_node_id_ref, entropy_source_conv); return tag_ptr(ret_conv, true); @@ -70755,14 +76983,18 @@ uint64_t __attribute__((export_name("TS_BlindedPath_new_for_message"))) TS_Blin } FREE(node_pks); void* entropy_source_ptr = untag_ptr(entropy_source); - if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } - LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } LDKCResult_BlindedPathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedPathNoneZ), "LDKCResult_BlindedPathNoneZ"); *ret_conv = BlindedPath_new_for_message(node_pks_constr, entropy_source_conv); return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_BlindedPath_one_hop_for_payment"))) TS_BlindedPath_one_hop_for_payment(int8_tArray payee_node_id, uint64_t payee_tlvs, uint64_t entropy_source) { +uint64_t __attribute__((export_name("TS_BlindedPath_one_hop_for_payment"))) TS_BlindedPath_one_hop_for_payment(int8_tArray payee_node_id, uint64_t payee_tlvs, int16_t min_final_cltv_expiry_delta, uint64_t entropy_source) { LDKPublicKey payee_node_id_ref; CHECK(payee_node_id->arr_len == 33); memcpy(payee_node_id_ref.compressed_form, payee_node_id->elems, 33); FREE(payee_node_id); @@ -70772,14 +77004,18 @@ uint64_t __attribute__((export_name("TS_BlindedPath_one_hop_for_payment"))) TS_ CHECK_INNER_FIELD_ACCESS_OR_NULL(payee_tlvs_conv); payee_tlvs_conv = ReceiveTlvs_clone(&payee_tlvs_conv); void* entropy_source_ptr = untag_ptr(entropy_source); - if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } - LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ), "LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ"); - *ret_conv = BlindedPath_one_hop_for_payment(payee_node_id_ref, payee_tlvs_conv, entropy_source_conv); + *ret_conv = BlindedPath_one_hop_for_payment(payee_node_id_ref, payee_tlvs_conv, min_final_cltv_expiry_delta, entropy_source_conv); return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_BlindedPath_new_for_payment"))) TS_BlindedPath_new_for_payment(uint64_tArray intermediate_nodes, int8_tArray payee_node_id, uint64_t payee_tlvs, int64_t htlc_maximum_msat, uint64_t entropy_source) { +uint64_t __attribute__((export_name("TS_BlindedPath_new_for_payment"))) TS_BlindedPath_new_for_payment(uint64_tArray intermediate_nodes, int8_tArray payee_node_id, uint64_t payee_tlvs, int64_t htlc_maximum_msat, int16_t min_final_cltv_expiry_delta, uint64_t entropy_source) { LDKCVec_ForwardNodeZ intermediate_nodes_constr; intermediate_nodes_constr.datalen = intermediate_nodes->arr_len; if (intermediate_nodes_constr.datalen > 0) @@ -70806,13 +77042,35 @@ uint64_t __attribute__((export_name("TS_BlindedPath_new_for_payment"))) TS_Blin CHECK_INNER_FIELD_ACCESS_OR_NULL(payee_tlvs_conv); payee_tlvs_conv = ReceiveTlvs_clone(&payee_tlvs_conv); void* entropy_source_ptr = untag_ptr(entropy_source); - if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } - LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ), "LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ"); - *ret_conv = BlindedPath_new_for_payment(intermediate_nodes_constr, payee_node_id_ref, payee_tlvs_conv, htlc_maximum_msat, entropy_source_conv); + *ret_conv = BlindedPath_new_for_payment(intermediate_nodes_constr, payee_node_id_ref, payee_tlvs_conv, htlc_maximum_msat, min_final_cltv_expiry_delta, entropy_source_conv); return tag_ptr(ret_conv, true); } +uint64_t __attribute__((export_name("TS_BlindedPath_public_introduction_node_id"))) TS_BlindedPath_public_introduction_node_id(uint64_t this_arg, uint64_t network_graph) { + LDKBlindedPath this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKReadOnlyNetworkGraph network_graph_conv; + network_graph_conv.inner = untag_ptr(network_graph); + network_graph_conv.is_owned = ptr_is_owned(network_graph); + CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv); + network_graph_conv.is_owned = false; + LDKNodeId ret_var = BlindedPath_public_introduction_node_id(&this_arg_conv, &network_graph_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + int8_tArray __attribute__((export_name("TS_BlindedPath_write"))) TS_BlindedPath_write(uint64_t obj) { LDKBlindedPath obj_conv; obj_conv.inner = untag_ptr(obj); @@ -71201,7 +77459,32 @@ void __attribute__((export_name("TS_ReceiveTlvs_set_payment_constraints"))) TS_ ReceiveTlvs_set_payment_constraints(&this_ptr_conv, val_conv); } -uint64_t __attribute__((export_name("TS_ReceiveTlvs_new"))) TS_ReceiveTlvs_new(int8_tArray payment_secret_arg, uint64_t payment_constraints_arg) { +uint64_t __attribute__((export_name("TS_ReceiveTlvs_get_payment_context"))) TS_ReceiveTlvs_get_payment_context(uint64_t this_ptr) { + LDKReceiveTlvs this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = ReceiveTlvs_get_payment_context(&this_ptr_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void __attribute__((export_name("TS_ReceiveTlvs_set_payment_context"))) TS_ReceiveTlvs_set_payment_context(uint64_t this_ptr, uint64_t val) { + LDKReceiveTlvs this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKPaymentContext val_conv = *(LDKPaymentContext*)(val_ptr); + val_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(val)); + ReceiveTlvs_set_payment_context(&this_ptr_conv, val_conv); +} + +uint64_t __attribute__((export_name("TS_ReceiveTlvs_new"))) TS_ReceiveTlvs_new(int8_tArray payment_secret_arg, uint64_t payment_constraints_arg, uint64_t payment_context_arg) { LDKThirtyTwoBytes payment_secret_arg_ref; CHECK(payment_secret_arg->arr_len == 32); memcpy(payment_secret_arg_ref.data, payment_secret_arg->elems, 32); FREE(payment_secret_arg); @@ -71210,7 +77493,11 @@ uint64_t __attribute__((export_name("TS_ReceiveTlvs_new"))) TS_ReceiveTlvs_new( payment_constraints_arg_conv.is_owned = ptr_is_owned(payment_constraints_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_constraints_arg_conv); payment_constraints_arg_conv = PaymentConstraints_clone(&payment_constraints_arg_conv); - LDKReceiveTlvs ret_var = ReceiveTlvs_new(payment_secret_arg_ref, payment_constraints_arg_conv); + void* payment_context_arg_ptr = untag_ptr(payment_context_arg); + CHECK_ACCESS(payment_context_arg_ptr); + LDKPaymentContext payment_context_arg_conv = *(LDKPaymentContext*)(payment_context_arg_ptr); + payment_context_arg_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(payment_context_arg)); + LDKReceiveTlvs ret_var = ReceiveTlvs_new(payment_secret_arg_ref, payment_constraints_arg_conv, payment_context_arg_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -71434,6 +77721,317 @@ uint64_t __attribute__((export_name("TS_PaymentConstraints_clone"))) TS_Payment return ret_ref; } +void __attribute__((export_name("TS_PaymentContext_free"))) TS_PaymentContext_free(uint64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKPaymentContext this_ptr_conv = *(LDKPaymentContext*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + PaymentContext_free(this_ptr_conv); +} + +static inline uint64_t PaymentContext_clone_ptr(LDKPaymentContext *NONNULL_PTR arg) { + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = PaymentContext_clone(arg); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t __attribute__((export_name("TS_PaymentContext_clone_ptr"))) TS_PaymentContext_clone_ptr(uint64_t arg) { + LDKPaymentContext* arg_conv = (LDKPaymentContext*)untag_ptr(arg); + int64_t ret_conv = PaymentContext_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_PaymentContext_clone"))) TS_PaymentContext_clone(uint64_t orig) { + LDKPaymentContext* orig_conv = (LDKPaymentContext*)untag_ptr(orig); + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = PaymentContext_clone(orig_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_PaymentContext_unknown"))) TS_PaymentContext_unknown(uint64_t a) { + LDKUnknownPaymentContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = UnknownPaymentContext_clone(&a_conv); + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = PaymentContext_unknown(a_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_PaymentContext_bolt12_offer"))) TS_PaymentContext_bolt12_offer(uint64_t a) { + LDKBolt12OfferContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = Bolt12OfferContext_clone(&a_conv); + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = PaymentContext_bolt12_offer(a_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_PaymentContext_bolt12_refund"))) TS_PaymentContext_bolt12_refund(uint64_t a) { + LDKBolt12RefundContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = Bolt12RefundContext_clone(&a_conv); + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = PaymentContext_bolt12_refund(a_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +jboolean __attribute__((export_name("TS_PaymentContext_eq"))) TS_PaymentContext_eq(uint64_t a, uint64_t b) { + LDKPaymentContext* a_conv = (LDKPaymentContext*)untag_ptr(a); + LDKPaymentContext* b_conv = (LDKPaymentContext*)untag_ptr(b); + jboolean ret_conv = PaymentContext_eq(a_conv, b_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_UnknownPaymentContext_free"))) TS_UnknownPaymentContext_free(uint64_t this_obj) { + LDKUnknownPaymentContext this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + UnknownPaymentContext_free(this_obj_conv); +} + +static inline uint64_t UnknownPaymentContext_clone_ptr(LDKUnknownPaymentContext *NONNULL_PTR arg) { + LDKUnknownPaymentContext ret_var = UnknownPaymentContext_clone(arg); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t __attribute__((export_name("TS_UnknownPaymentContext_clone_ptr"))) TS_UnknownPaymentContext_clone_ptr(uint64_t arg) { + LDKUnknownPaymentContext arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = UnknownPaymentContext_clone_ptr(&arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_UnknownPaymentContext_clone"))) TS_UnknownPaymentContext_clone(uint64_t orig) { + LDKUnknownPaymentContext orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKUnknownPaymentContext ret_var = UnknownPaymentContext_clone(&orig_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +jboolean __attribute__((export_name("TS_UnknownPaymentContext_eq"))) TS_UnknownPaymentContext_eq(uint64_t a, uint64_t b) { + LDKUnknownPaymentContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKUnknownPaymentContext b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = UnknownPaymentContext_eq(&a_conv, &b_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_Bolt12OfferContext_free"))) TS_Bolt12OfferContext_free(uint64_t this_obj) { + LDKBolt12OfferContext this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + Bolt12OfferContext_free(this_obj_conv); +} + +uint64_t __attribute__((export_name("TS_Bolt12OfferContext_get_offer_id"))) TS_Bolt12OfferContext_get_offer_id(uint64_t this_ptr) { + LDKBolt12OfferContext this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKOfferId ret_var = Bolt12OfferContext_get_offer_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void __attribute__((export_name("TS_Bolt12OfferContext_set_offer_id"))) TS_Bolt12OfferContext_set_offer_id(uint64_t this_ptr, uint64_t val) { + LDKBolt12OfferContext this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKOfferId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = OfferId_clone(&val_conv); + Bolt12OfferContext_set_offer_id(&this_ptr_conv, val_conv); +} + +uint64_t __attribute__((export_name("TS_Bolt12OfferContext_get_invoice_request"))) TS_Bolt12OfferContext_get_invoice_request(uint64_t this_ptr) { + LDKBolt12OfferContext this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKInvoiceRequestFields ret_var = Bolt12OfferContext_get_invoice_request(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void __attribute__((export_name("TS_Bolt12OfferContext_set_invoice_request"))) TS_Bolt12OfferContext_set_invoice_request(uint64_t this_ptr, uint64_t val) { + LDKBolt12OfferContext this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKInvoiceRequestFields val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = InvoiceRequestFields_clone(&val_conv); + Bolt12OfferContext_set_invoice_request(&this_ptr_conv, val_conv); +} + +uint64_t __attribute__((export_name("TS_Bolt12OfferContext_new"))) TS_Bolt12OfferContext_new(uint64_t offer_id_arg, uint64_t invoice_request_arg) { + LDKOfferId offer_id_arg_conv; + offer_id_arg_conv.inner = untag_ptr(offer_id_arg); + offer_id_arg_conv.is_owned = ptr_is_owned(offer_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(offer_id_arg_conv); + offer_id_arg_conv = OfferId_clone(&offer_id_arg_conv); + LDKInvoiceRequestFields invoice_request_arg_conv; + invoice_request_arg_conv.inner = untag_ptr(invoice_request_arg); + invoice_request_arg_conv.is_owned = ptr_is_owned(invoice_request_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_request_arg_conv); + invoice_request_arg_conv = InvoiceRequestFields_clone(&invoice_request_arg_conv); + LDKBolt12OfferContext ret_var = Bolt12OfferContext_new(offer_id_arg_conv, invoice_request_arg_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t Bolt12OfferContext_clone_ptr(LDKBolt12OfferContext *NONNULL_PTR arg) { + LDKBolt12OfferContext ret_var = Bolt12OfferContext_clone(arg); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t __attribute__((export_name("TS_Bolt12OfferContext_clone_ptr"))) TS_Bolt12OfferContext_clone_ptr(uint64_t arg) { + LDKBolt12OfferContext arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = Bolt12OfferContext_clone_ptr(&arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_Bolt12OfferContext_clone"))) TS_Bolt12OfferContext_clone(uint64_t orig) { + LDKBolt12OfferContext orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKBolt12OfferContext ret_var = Bolt12OfferContext_clone(&orig_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +jboolean __attribute__((export_name("TS_Bolt12OfferContext_eq"))) TS_Bolt12OfferContext_eq(uint64_t a, uint64_t b) { + LDKBolt12OfferContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKBolt12OfferContext b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = Bolt12OfferContext_eq(&a_conv, &b_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_Bolt12RefundContext_free"))) TS_Bolt12RefundContext_free(uint64_t this_obj) { + LDKBolt12RefundContext this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + Bolt12RefundContext_free(this_obj_conv); +} + +uint64_t __attribute__((export_name("TS_Bolt12RefundContext_new"))) TS_Bolt12RefundContext_new() { + LDKBolt12RefundContext ret_var = Bolt12RefundContext_new(); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t Bolt12RefundContext_clone_ptr(LDKBolt12RefundContext *NONNULL_PTR arg) { + LDKBolt12RefundContext ret_var = Bolt12RefundContext_clone(arg); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t __attribute__((export_name("TS_Bolt12RefundContext_clone_ptr"))) TS_Bolt12RefundContext_clone_ptr(uint64_t arg) { + LDKBolt12RefundContext arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = Bolt12RefundContext_clone_ptr(&arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_Bolt12RefundContext_clone"))) TS_Bolt12RefundContext_clone(uint64_t orig) { + LDKBolt12RefundContext orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKBolt12RefundContext ret_var = Bolt12RefundContext_clone(&orig_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +jboolean __attribute__((export_name("TS_Bolt12RefundContext_eq"))) TS_Bolt12RefundContext_eq(uint64_t a, uint64_t b) { + LDKBolt12RefundContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKBolt12RefundContext b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = Bolt12RefundContext_eq(&a_conv, &b_conv); + return ret_conv; +} + int8_tArray __attribute__((export_name("TS_ForwardTlvs_write"))) TS_ForwardTlvs_write(uint64_t obj) { LDKForwardTlvs obj_conv; obj_conv.inner = untag_ptr(obj); @@ -71506,6 +78104,94 @@ uint64_t __attribute__((export_name("TS_PaymentConstraints_read"))) TS_PaymentC return tag_ptr(ret_conv, true); } +int8_tArray __attribute__((export_name("TS_PaymentContext_write"))) TS_PaymentContext_write(uint64_t obj) { + LDKPaymentContext* obj_conv = (LDKPaymentContext*)untag_ptr(obj); + LDKCVec_u8Z ret_var = PaymentContext_write(obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +uint64_t __attribute__((export_name("TS_PaymentContext_read"))) TS_PaymentContext_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ"); + *ret_conv = PaymentContext_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + +int8_tArray __attribute__((export_name("TS_UnknownPaymentContext_write"))) TS_UnknownPaymentContext_write(uint64_t obj) { + LDKUnknownPaymentContext obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = UnknownPaymentContext_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +uint64_t __attribute__((export_name("TS_UnknownPaymentContext_read"))) TS_UnknownPaymentContext_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ"); + *ret_conv = UnknownPaymentContext_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + +int8_tArray __attribute__((export_name("TS_Bolt12OfferContext_write"))) TS_Bolt12OfferContext_write(uint64_t obj) { + LDKBolt12OfferContext obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = Bolt12OfferContext_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +uint64_t __attribute__((export_name("TS_Bolt12OfferContext_read"))) TS_Bolt12OfferContext_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ"); + *ret_conv = Bolt12OfferContext_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + +int8_tArray __attribute__((export_name("TS_Bolt12RefundContext_write"))) TS_Bolt12RefundContext_write(uint64_t obj) { + LDKBolt12RefundContext obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = Bolt12RefundContext_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +uint64_t __attribute__((export_name("TS_Bolt12RefundContext_read"))) TS_Bolt12RefundContext_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ"); + *ret_conv = Bolt12RefundContext_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + void __attribute__((export_name("TS_PaymentPurpose_free"))) TS_PaymentPurpose_free(uint64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -71535,7 +78221,21 @@ uint64_t __attribute__((export_name("TS_PaymentPurpose_clone"))) TS_PaymentPurp return ret_ref; } -uint64_t __attribute__((export_name("TS_PaymentPurpose_invoice_payment"))) TS_PaymentPurpose_invoice_payment(uint64_t payment_preimage, int8_tArray payment_secret) { +uint64_t __attribute__((export_name("TS_PaymentPurpose_bolt11_invoice_payment"))) TS_PaymentPurpose_bolt11_invoice_payment(uint64_t payment_preimage, int8_tArray payment_secret) { + void* payment_preimage_ptr = untag_ptr(payment_preimage); + CHECK_ACCESS(payment_preimage_ptr); + LDKCOption_ThirtyTwoBytesZ payment_preimage_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_preimage_ptr); + payment_preimage_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(payment_preimage)); + LDKThirtyTwoBytes payment_secret_ref; + CHECK(payment_secret->arr_len == 32); + memcpy(payment_secret_ref.data, payment_secret->elems, 32); FREE(payment_secret); + LDKPaymentPurpose *ret_copy = MALLOC(sizeof(LDKPaymentPurpose), "LDKPaymentPurpose"); + *ret_copy = PaymentPurpose_bolt11_invoice_payment(payment_preimage_conv, payment_secret_ref); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_PaymentPurpose_bolt12_offer_payment"))) TS_PaymentPurpose_bolt12_offer_payment(uint64_t payment_preimage, int8_tArray payment_secret, uint64_t payment_context) { void* payment_preimage_ptr = untag_ptr(payment_preimage); CHECK_ACCESS(payment_preimage_ptr); LDKCOption_ThirtyTwoBytesZ payment_preimage_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_preimage_ptr); @@ -71543,8 +78243,32 @@ uint64_t __attribute__((export_name("TS_PaymentPurpose_invoice_payment"))) TS_P LDKThirtyTwoBytes payment_secret_ref; CHECK(payment_secret->arr_len == 32); memcpy(payment_secret_ref.data, payment_secret->elems, 32); FREE(payment_secret); + LDKBolt12OfferContext payment_context_conv; + payment_context_conv.inner = untag_ptr(payment_context); + payment_context_conv.is_owned = ptr_is_owned(payment_context); + CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_conv); + payment_context_conv = Bolt12OfferContext_clone(&payment_context_conv); LDKPaymentPurpose *ret_copy = MALLOC(sizeof(LDKPaymentPurpose), "LDKPaymentPurpose"); - *ret_copy = PaymentPurpose_invoice_payment(payment_preimage_conv, payment_secret_ref); + *ret_copy = PaymentPurpose_bolt12_offer_payment(payment_preimage_conv, payment_secret_ref, payment_context_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_PaymentPurpose_bolt12_refund_payment"))) TS_PaymentPurpose_bolt12_refund_payment(uint64_t payment_preimage, int8_tArray payment_secret, uint64_t payment_context) { + void* payment_preimage_ptr = untag_ptr(payment_preimage); + CHECK_ACCESS(payment_preimage_ptr); + LDKCOption_ThirtyTwoBytesZ payment_preimage_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_preimage_ptr); + payment_preimage_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(payment_preimage)); + LDKThirtyTwoBytes payment_secret_ref; + CHECK(payment_secret->arr_len == 32); + memcpy(payment_secret_ref.data, payment_secret->elems, 32); FREE(payment_secret); + LDKBolt12RefundContext payment_context_conv; + payment_context_conv.inner = untag_ptr(payment_context); + payment_context_conv.is_owned = ptr_is_owned(payment_context); + CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_conv); + payment_context_conv = Bolt12RefundContext_clone(&payment_context_conv); + LDKPaymentPurpose *ret_copy = MALLOC(sizeof(LDKPaymentPurpose), "LDKPaymentPurpose"); + *ret_copy = PaymentPurpose_bolt12_refund_payment(payment_preimage_conv, payment_secret_ref, payment_context_conv); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -71601,27 +78325,31 @@ void __attribute__((export_name("TS_ClaimedHTLC_free"))) TS_ClaimedHTLC_free(ui ClaimedHTLC_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_ClaimedHTLC_get_channel_id"))) TS_ClaimedHTLC_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_ClaimedHTLC_get_channel_id"))) TS_ClaimedHTLC_get_channel_id(uint64_t this_ptr) { LDKClaimedHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *ClaimedHTLC_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = ClaimedHTLC_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_ClaimedHTLC_set_channel_id"))) TS_ClaimedHTLC_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_ClaimedHTLC_set_channel_id"))) TS_ClaimedHTLC_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKClaimedHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - ClaimedHTLC_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ClaimedHTLC_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray __attribute__((export_name("TS_ClaimedHTLC_get_user_channel_id"))) TS_ClaimedHTLC_get_user_channel_id(uint64_t this_ptr) { @@ -71704,14 +78432,16 @@ void __attribute__((export_name("TS_ClaimedHTLC_set_counterparty_skimmed_fee_ms ClaimedHTLC_set_counterparty_skimmed_fee_msat(&this_ptr_conv, val); } -uint64_t __attribute__((export_name("TS_ClaimedHTLC_new"))) TS_ClaimedHTLC_new(int8_tArray channel_id_arg, int8_tArray user_channel_id_arg, int32_t cltv_expiry_arg, int64_t value_msat_arg, int64_t counterparty_skimmed_fee_msat_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_ClaimedHTLC_new"))) TS_ClaimedHTLC_new(uint64_t channel_id_arg, int8_tArray user_channel_id_arg, int32_t cltv_expiry_arg, int64_t value_msat_arg, int64_t counterparty_skimmed_fee_msat_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKU128 user_channel_id_arg_ref; CHECK(user_channel_id_arg->arr_len == 16); memcpy(user_channel_id_arg_ref.le_bytes, user_channel_id_arg->elems, 16); FREE(user_channel_id_arg); - LDKClaimedHTLC ret_var = ClaimedHTLC_new(channel_id_arg_ref, user_channel_id_arg_ref, cltv_expiry_arg, value_msat_arg, counterparty_skimmed_fee_msat_arg); + LDKClaimedHTLC ret_var = ClaimedHTLC_new(channel_id_arg_conv, user_channel_id_arg_ref, cltv_expiry_arg, value_msat_arg, counterparty_skimmed_fee_msat_arg); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -71911,9 +78641,23 @@ uint64_t __attribute__((export_name("TS_ClosureReason_holder_force_closed"))) T return ret_ref; } -uint64_t __attribute__((export_name("TS_ClosureReason_cooperative_closure"))) TS_ClosureReason_cooperative_closure() { +uint64_t __attribute__((export_name("TS_ClosureReason_legacy_cooperative_closure"))) TS_ClosureReason_legacy_cooperative_closure() { + LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason"); + *ret_copy = ClosureReason_legacy_cooperative_closure(); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_ClosureReason_counterparty_initiated_cooperative_closure"))) TS_ClosureReason_counterparty_initiated_cooperative_closure() { LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason"); - *ret_copy = ClosureReason_cooperative_closure(); + *ret_copy = ClosureReason_counterparty_initiated_cooperative_closure(); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_ClosureReason_locally_initiated_cooperative_closure"))) TS_ClosureReason_locally_initiated_cooperative_closure() { + LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason"); + *ret_copy = ClosureReason_locally_initiated_cooperative_closure(); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -71968,6 +78712,13 @@ uint64_t __attribute__((export_name("TS_ClosureReason_funding_batch_closure"))) return ret_ref; } +uint64_t __attribute__((export_name("TS_ClosureReason_htlcs_timed_out"))) TS_ClosureReason_htlcs_timed_out() { + LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason"); + *ret_copy = ClosureReason_htlcs_timed_out(); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + jboolean __attribute__((export_name("TS_ClosureReason_eq"))) TS_ClosureReason_eq(uint64_t a, uint64_t b) { LDKClosureReason* a_conv = (LDKClosureReason*)untag_ptr(a); LDKClosureReason* b_conv = (LDKClosureReason*)untag_ptr(b); @@ -72023,15 +78774,17 @@ uint64_t __attribute__((export_name("TS_HTLCDestination_clone"))) TS_HTLCDestin return ret_ref; } -uint64_t __attribute__((export_name("TS_HTLCDestination_next_hop_channel"))) TS_HTLCDestination_next_hop_channel(int8_tArray node_id, int8_tArray channel_id) { +uint64_t __attribute__((export_name("TS_HTLCDestination_next_hop_channel"))) TS_HTLCDestination_next_hop_channel(int8_tArray node_id, uint64_t channel_id) { LDKPublicKey node_id_ref; CHECK(node_id->arr_len == 33); memcpy(node_id_ref.compressed_form, node_id->elems, 33); FREE(node_id); - LDKThirtyTwoBytes channel_id_ref; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_ref.data, channel_id->elems, 32); FREE(channel_id); + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKHTLCDestination *ret_copy = MALLOC(sizeof(LDKHTLCDestination), "LDKHTLCDestination"); - *ret_copy = HTLCDestination_next_hop_channel(node_id_ref, channel_id_ref); + *ret_copy = HTLCDestination_next_hop_channel(node_id_ref, channel_id_conv); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -72050,6 +78803,13 @@ uint64_t __attribute__((export_name("TS_HTLCDestination_invalid_forward"))) TS_ return ret_ref; } +uint64_t __attribute__((export_name("TS_HTLCDestination_invalid_onion"))) TS_HTLCDestination_invalid_onion() { + LDKHTLCDestination *ret_copy = MALLOC(sizeof(LDKHTLCDestination), "LDKHTLCDestination"); + *ret_copy = HTLCDestination_invalid_onion(); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + uint64_t __attribute__((export_name("TS_HTLCDestination_failed_payment"))) TS_HTLCDestination_failed_payment(int8_tArray payment_hash) { LDKThirtyTwoBytes payment_hash_ref; CHECK(payment_hash->arr_len == 32); @@ -72177,10 +78937,12 @@ uint64_t __attribute__((export_name("TS_Event_clone"))) TS_Event_clone(uint64_t return ret_ref; } -uint64_t __attribute__((export_name("TS_Event_funding_generation_ready"))) TS_Event_funding_generation_ready(int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int64_t channel_value_satoshis, int8_tArray output_script, int8_tArray user_channel_id) { - LDKThirtyTwoBytes temporary_channel_id_ref; - CHECK(temporary_channel_id->arr_len == 32); - memcpy(temporary_channel_id_ref.data, temporary_channel_id->elems, 32); FREE(temporary_channel_id); +uint64_t __attribute__((export_name("TS_Event_funding_generation_ready"))) TS_Event_funding_generation_ready(uint64_t temporary_channel_id, int8_tArray counterparty_node_id, int64_t channel_value_satoshis, int8_tArray output_script, int8_tArray user_channel_id) { + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv = ChannelId_clone(&temporary_channel_id_conv); LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); @@ -72192,7 +78954,7 @@ uint64_t __attribute__((export_name("TS_Event_funding_generation_ready"))) TS_E CHECK(user_channel_id->arr_len == 16); memcpy(user_channel_id_ref.le_bytes, user_channel_id->elems, 16); FREE(user_channel_id); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_funding_generation_ready(temporary_channel_id_ref, counterparty_node_id_ref, channel_value_satoshis, output_script_ref, user_channel_id_ref); + *ret_copy = Event_funding_generation_ready(temporary_channel_id_conv, counterparty_node_id_ref, channel_value_satoshis, output_script_ref, user_channel_id_ref); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -72213,10 +78975,11 @@ uint64_t __attribute__((export_name("TS_Event_payment_claimable"))) TS_Event_pa CHECK_ACCESS(purpose_ptr); LDKPaymentPurpose purpose_conv = *(LDKPaymentPurpose*)(purpose_ptr); purpose_conv = PaymentPurpose_clone((LDKPaymentPurpose*)untag_ptr(purpose)); - void* via_channel_id_ptr = untag_ptr(via_channel_id); - CHECK_ACCESS(via_channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ via_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(via_channel_id_ptr); - via_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(via_channel_id)); + LDKChannelId via_channel_id_conv; + via_channel_id_conv.inner = untag_ptr(via_channel_id); + via_channel_id_conv.is_owned = ptr_is_owned(via_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(via_channel_id_conv); + via_channel_id_conv = ChannelId_clone(&via_channel_id_conv); void* via_user_channel_id_ptr = untag_ptr(via_user_channel_id); CHECK_ACCESS(via_user_channel_id_ptr); LDKCOption_U128Z via_user_channel_id_conv = *(LDKCOption_U128Z*)(via_user_channel_id_ptr); @@ -72465,50 +79228,68 @@ uint64_t __attribute__((export_name("TS_Event_spendable_outputs"))) TS_Event_sp outputs_constr.data[b] = outputs_conv_27_conv; } FREE(outputs); - void* channel_id_ptr = untag_ptr(channel_id); - CHECK_ACCESS(channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(channel_id_ptr); - channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(channel_id)); + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); *ret_copy = Event_spendable_outputs(outputs_constr, channel_id_conv); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -uint64_t __attribute__((export_name("TS_Event_payment_forwarded"))) TS_Event_payment_forwarded(uint64_t prev_channel_id, uint64_t next_channel_id, uint64_t fee_earned_msat, jboolean claim_from_onchain_tx, uint64_t outbound_amount_forwarded_msat) { - void* prev_channel_id_ptr = untag_ptr(prev_channel_id); - CHECK_ACCESS(prev_channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ prev_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(prev_channel_id_ptr); - prev_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(prev_channel_id)); - void* next_channel_id_ptr = untag_ptr(next_channel_id); - CHECK_ACCESS(next_channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ next_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(next_channel_id_ptr); - next_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(next_channel_id)); - void* fee_earned_msat_ptr = untag_ptr(fee_earned_msat); - CHECK_ACCESS(fee_earned_msat_ptr); - LDKCOption_u64Z fee_earned_msat_conv = *(LDKCOption_u64Z*)(fee_earned_msat_ptr); - fee_earned_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(fee_earned_msat)); +uint64_t __attribute__((export_name("TS_Event_payment_forwarded"))) TS_Event_payment_forwarded(uint64_t prev_channel_id, uint64_t next_channel_id, uint64_t prev_user_channel_id, uint64_t next_user_channel_id, uint64_t total_fee_earned_msat, uint64_t skimmed_fee_msat, jboolean claim_from_onchain_tx, uint64_t outbound_amount_forwarded_msat) { + LDKChannelId prev_channel_id_conv; + prev_channel_id_conv.inner = untag_ptr(prev_channel_id); + prev_channel_id_conv.is_owned = ptr_is_owned(prev_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_conv); + prev_channel_id_conv = ChannelId_clone(&prev_channel_id_conv); + LDKChannelId next_channel_id_conv; + next_channel_id_conv.inner = untag_ptr(next_channel_id); + next_channel_id_conv.is_owned = ptr_is_owned(next_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(next_channel_id_conv); + next_channel_id_conv = ChannelId_clone(&next_channel_id_conv); + void* prev_user_channel_id_ptr = untag_ptr(prev_user_channel_id); + CHECK_ACCESS(prev_user_channel_id_ptr); + LDKCOption_U128Z prev_user_channel_id_conv = *(LDKCOption_U128Z*)(prev_user_channel_id_ptr); + prev_user_channel_id_conv = COption_U128Z_clone((LDKCOption_U128Z*)untag_ptr(prev_user_channel_id)); + void* next_user_channel_id_ptr = untag_ptr(next_user_channel_id); + CHECK_ACCESS(next_user_channel_id_ptr); + LDKCOption_U128Z next_user_channel_id_conv = *(LDKCOption_U128Z*)(next_user_channel_id_ptr); + next_user_channel_id_conv = COption_U128Z_clone((LDKCOption_U128Z*)untag_ptr(next_user_channel_id)); + void* total_fee_earned_msat_ptr = untag_ptr(total_fee_earned_msat); + CHECK_ACCESS(total_fee_earned_msat_ptr); + LDKCOption_u64Z total_fee_earned_msat_conv = *(LDKCOption_u64Z*)(total_fee_earned_msat_ptr); + total_fee_earned_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(total_fee_earned_msat)); + void* skimmed_fee_msat_ptr = untag_ptr(skimmed_fee_msat); + CHECK_ACCESS(skimmed_fee_msat_ptr); + LDKCOption_u64Z skimmed_fee_msat_conv = *(LDKCOption_u64Z*)(skimmed_fee_msat_ptr); + skimmed_fee_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(skimmed_fee_msat)); void* outbound_amount_forwarded_msat_ptr = untag_ptr(outbound_amount_forwarded_msat); CHECK_ACCESS(outbound_amount_forwarded_msat_ptr); LDKCOption_u64Z outbound_amount_forwarded_msat_conv = *(LDKCOption_u64Z*)(outbound_amount_forwarded_msat_ptr); outbound_amount_forwarded_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(outbound_amount_forwarded_msat)); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_payment_forwarded(prev_channel_id_conv, next_channel_id_conv, fee_earned_msat_conv, claim_from_onchain_tx, outbound_amount_forwarded_msat_conv); + *ret_copy = Event_payment_forwarded(prev_channel_id_conv, next_channel_id_conv, prev_user_channel_id_conv, next_user_channel_id_conv, total_fee_earned_msat_conv, skimmed_fee_msat_conv, claim_from_onchain_tx, outbound_amount_forwarded_msat_conv); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -uint64_t __attribute__((export_name("TS_Event_channel_pending"))) TS_Event_channel_pending(int8_tArray channel_id, int8_tArray user_channel_id, uint64_t former_temporary_channel_id, int8_tArray counterparty_node_id, uint64_t funding_txo) { - LDKThirtyTwoBytes channel_id_ref; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_ref.data, channel_id->elems, 32); FREE(channel_id); +uint64_t __attribute__((export_name("TS_Event_channel_pending"))) TS_Event_channel_pending(uint64_t channel_id, int8_tArray user_channel_id, uint64_t former_temporary_channel_id, int8_tArray counterparty_node_id, uint64_t funding_txo, uint64_t channel_type) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKU128 user_channel_id_ref; CHECK(user_channel_id->arr_len == 16); memcpy(user_channel_id_ref.le_bytes, user_channel_id->elems, 16); FREE(user_channel_id); - void* former_temporary_channel_id_ptr = untag_ptr(former_temporary_channel_id); - CHECK_ACCESS(former_temporary_channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ former_temporary_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(former_temporary_channel_id_ptr); - former_temporary_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(former_temporary_channel_id)); + LDKChannelId former_temporary_channel_id_conv; + former_temporary_channel_id_conv.inner = untag_ptr(former_temporary_channel_id); + former_temporary_channel_id_conv.is_owned = ptr_is_owned(former_temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(former_temporary_channel_id_conv); + former_temporary_channel_id_conv = ChannelId_clone(&former_temporary_channel_id_conv); LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); @@ -72517,16 +79298,23 @@ uint64_t __attribute__((export_name("TS_Event_channel_pending"))) TS_Event_chan funding_txo_conv.is_owned = ptr_is_owned(funding_txo); CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_conv); funding_txo_conv = OutPoint_clone(&funding_txo_conv); + LDKChannelTypeFeatures channel_type_conv; + channel_type_conv.inner = untag_ptr(channel_type); + channel_type_conv.is_owned = ptr_is_owned(channel_type); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_conv); + channel_type_conv = ChannelTypeFeatures_clone(&channel_type_conv); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_channel_pending(channel_id_ref, user_channel_id_ref, former_temporary_channel_id_conv, counterparty_node_id_ref, funding_txo_conv); + *ret_copy = Event_channel_pending(channel_id_conv, user_channel_id_ref, former_temporary_channel_id_conv, counterparty_node_id_ref, funding_txo_conv, channel_type_conv); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -uint64_t __attribute__((export_name("TS_Event_channel_ready"))) TS_Event_channel_ready(int8_tArray channel_id, int8_tArray user_channel_id, int8_tArray counterparty_node_id, uint64_t channel_type) { - LDKThirtyTwoBytes channel_id_ref; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_ref.data, channel_id->elems, 32); FREE(channel_id); +uint64_t __attribute__((export_name("TS_Event_channel_ready"))) TS_Event_channel_ready(uint64_t channel_id, int8_tArray user_channel_id, int8_tArray counterparty_node_id, uint64_t channel_type) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKU128 user_channel_id_ref; CHECK(user_channel_id->arr_len == 16); memcpy(user_channel_id_ref.le_bytes, user_channel_id->elems, 16); FREE(user_channel_id); @@ -72539,15 +79327,17 @@ uint64_t __attribute__((export_name("TS_Event_channel_ready"))) TS_Event_channe CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_conv); channel_type_conv = ChannelTypeFeatures_clone(&channel_type_conv); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_channel_ready(channel_id_ref, user_channel_id_ref, counterparty_node_id_ref, channel_type_conv); + *ret_copy = Event_channel_ready(channel_id_conv, user_channel_id_ref, counterparty_node_id_ref, channel_type_conv); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -uint64_t __attribute__((export_name("TS_Event_channel_closed"))) TS_Event_channel_closed(int8_tArray channel_id, int8_tArray user_channel_id, uint64_t reason, int8_tArray counterparty_node_id, uint64_t channel_capacity_sats, uint64_t channel_funding_txo) { - LDKThirtyTwoBytes channel_id_ref; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_ref.data, channel_id->elems, 32); FREE(channel_id); +uint64_t __attribute__((export_name("TS_Event_channel_closed"))) TS_Event_channel_closed(uint64_t channel_id, int8_tArray user_channel_id, uint64_t reason, int8_tArray counterparty_node_id, uint64_t channel_capacity_sats, uint64_t channel_funding_txo) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKU128 user_channel_id_ref; CHECK(user_channel_id->arr_len == 16); memcpy(user_channel_id_ref.le_bytes, user_channel_id->elems, 16); FREE(user_channel_id); @@ -72568,30 +79358,34 @@ uint64_t __attribute__((export_name("TS_Event_channel_closed"))) TS_Event_chann CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_txo_conv); channel_funding_txo_conv = OutPoint_clone(&channel_funding_txo_conv); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_channel_closed(channel_id_ref, user_channel_id_ref, reason_conv, counterparty_node_id_ref, channel_capacity_sats_conv, channel_funding_txo_conv); + *ret_copy = Event_channel_closed(channel_id_conv, user_channel_id_ref, reason_conv, counterparty_node_id_ref, channel_capacity_sats_conv, channel_funding_txo_conv); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -uint64_t __attribute__((export_name("TS_Event_discard_funding"))) TS_Event_discard_funding(int8_tArray channel_id, int8_tArray transaction) { - LDKThirtyTwoBytes channel_id_ref; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_ref.data, channel_id->elems, 32); FREE(channel_id); +uint64_t __attribute__((export_name("TS_Event_discard_funding"))) TS_Event_discard_funding(uint64_t channel_id, int8_tArray transaction) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKTransaction transaction_ref; transaction_ref.datalen = transaction->arr_len; transaction_ref.data = MALLOC(transaction_ref.datalen, "LDKTransaction Bytes"); memcpy(transaction_ref.data, transaction->elems, transaction_ref.datalen); FREE(transaction); transaction_ref.data_is_owned = true; LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_discard_funding(channel_id_ref, transaction_ref); + *ret_copy = Event_discard_funding(channel_id_conv, transaction_ref); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -uint64_t __attribute__((export_name("TS_Event_open_channel_request"))) TS_Event_open_channel_request(int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_satoshis, int64_t push_msat, uint64_t channel_type) { - LDKThirtyTwoBytes temporary_channel_id_ref; - CHECK(temporary_channel_id->arr_len == 32); - memcpy(temporary_channel_id_ref.data, temporary_channel_id->elems, 32); FREE(temporary_channel_id); +uint64_t __attribute__((export_name("TS_Event_open_channel_request"))) TS_Event_open_channel_request(uint64_t temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_satoshis, int64_t push_msat, uint64_t channel_type) { + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv = ChannelId_clone(&temporary_channel_id_conv); LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); @@ -72601,21 +79395,23 @@ uint64_t __attribute__((export_name("TS_Event_open_channel_request"))) TS_Event CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_conv); channel_type_conv = ChannelTypeFeatures_clone(&channel_type_conv); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_open_channel_request(temporary_channel_id_ref, counterparty_node_id_ref, funding_satoshis, push_msat, channel_type_conv); + *ret_copy = Event_open_channel_request(temporary_channel_id_conv, counterparty_node_id_ref, funding_satoshis, push_msat, channel_type_conv); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -uint64_t __attribute__((export_name("TS_Event_htlchandling_failed"))) TS_Event_htlchandling_failed(int8_tArray prev_channel_id, uint64_t failed_next_destination) { - LDKThirtyTwoBytes prev_channel_id_ref; - CHECK(prev_channel_id->arr_len == 32); - memcpy(prev_channel_id_ref.data, prev_channel_id->elems, 32); FREE(prev_channel_id); +uint64_t __attribute__((export_name("TS_Event_htlchandling_failed"))) TS_Event_htlchandling_failed(uint64_t prev_channel_id, uint64_t failed_next_destination) { + LDKChannelId prev_channel_id_conv; + prev_channel_id_conv.inner = untag_ptr(prev_channel_id); + prev_channel_id_conv.is_owned = ptr_is_owned(prev_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_conv); + prev_channel_id_conv = ChannelId_clone(&prev_channel_id_conv); void* failed_next_destination_ptr = untag_ptr(failed_next_destination); CHECK_ACCESS(failed_next_destination_ptr); LDKHTLCDestination failed_next_destination_conv = *(LDKHTLCDestination*)(failed_next_destination_ptr); failed_next_destination_conv = HTLCDestination_clone((LDKHTLCDestination*)untag_ptr(failed_next_destination)); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_htlchandling_failed(prev_channel_id_ref, failed_next_destination_conv); + *ret_copy = Event_htlchandling_failed(prev_channel_id_conv, failed_next_destination_conv); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -73472,7 +80268,15 @@ uint64_t __attribute__((export_name("TS_BumpTransactionEvent_clone"))) TS_BumpT return ret_ref; } -uint64_t __attribute__((export_name("TS_BumpTransactionEvent_channel_close"))) TS_BumpTransactionEvent_channel_close(int8_tArray claim_id, int32_t package_target_feerate_sat_per_1000_weight, int8_tArray commitment_tx, int64_t commitment_tx_fee_satoshis, uint64_t anchor_descriptor, uint64_tArray pending_htlcs) { +uint64_t __attribute__((export_name("TS_BumpTransactionEvent_channel_close"))) TS_BumpTransactionEvent_channel_close(uint64_t channel_id, int8_tArray counterparty_node_id, int8_tArray claim_id, int32_t package_target_feerate_sat_per_1000_weight, int8_tArray commitment_tx, int64_t commitment_tx_fee_satoshis, uint64_t anchor_descriptor, uint64_tArray pending_htlcs) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); + LDKPublicKey counterparty_node_id_ref; + CHECK(counterparty_node_id->arr_len == 33); + memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); LDKThirtyTwoBytes claim_id_ref; CHECK(claim_id->arr_len == 32); memcpy(claim_id_ref.data, claim_id->elems, 32); FREE(claim_id); @@ -73504,12 +80308,20 @@ uint64_t __attribute__((export_name("TS_BumpTransactionEvent_channel_close"))) } FREE(pending_htlcs); LDKBumpTransactionEvent *ret_copy = MALLOC(sizeof(LDKBumpTransactionEvent), "LDKBumpTransactionEvent"); - *ret_copy = BumpTransactionEvent_channel_close(claim_id_ref, package_target_feerate_sat_per_1000_weight, commitment_tx_ref, commitment_tx_fee_satoshis, anchor_descriptor_conv, pending_htlcs_constr); + *ret_copy = BumpTransactionEvent_channel_close(channel_id_conv, counterparty_node_id_ref, claim_id_ref, package_target_feerate_sat_per_1000_weight, commitment_tx_ref, commitment_tx_fee_satoshis, anchor_descriptor_conv, pending_htlcs_constr); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -uint64_t __attribute__((export_name("TS_BumpTransactionEvent_htlcresolution"))) TS_BumpTransactionEvent_htlcresolution(int8_tArray claim_id, int32_t target_feerate_sat_per_1000_weight, uint64_tArray htlc_descriptors, int32_t tx_lock_time) { +uint64_t __attribute__((export_name("TS_BumpTransactionEvent_htlcresolution"))) TS_BumpTransactionEvent_htlcresolution(uint64_t channel_id, int8_tArray counterparty_node_id, int8_tArray claim_id, int32_t target_feerate_sat_per_1000_weight, uint64_tArray htlc_descriptors, int32_t tx_lock_time) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); + LDKPublicKey counterparty_node_id_ref; + CHECK(counterparty_node_id->arr_len == 33); + memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); LDKThirtyTwoBytes claim_id_ref; CHECK(claim_id->arr_len == 32); memcpy(claim_id_ref.data, claim_id->elems, 32); FREE(claim_id); @@ -73531,7 +80343,7 @@ uint64_t __attribute__((export_name("TS_BumpTransactionEvent_htlcresolution"))) } FREE(htlc_descriptors); LDKBumpTransactionEvent *ret_copy = MALLOC(sizeof(LDKBumpTransactionEvent), "LDKBumpTransactionEvent"); - *ret_copy = BumpTransactionEvent_htlcresolution(claim_id_ref, target_feerate_sat_per_1000_weight, htlc_descriptors_constr, tx_lock_time); + *ret_copy = BumpTransactionEvent_htlcresolution(channel_id_conv, counterparty_node_id_ref, claim_id_ref, target_feerate_sat_per_1000_weight, htlc_descriptors_constr, tx_lock_time); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -75929,6 +82741,17 @@ int8_tArray __attribute__((export_name("TS_Bolt11Invoice_recover_payee_pub_key" return ret_arr; } +int8_tArray __attribute__((export_name("TS_Bolt11Invoice_get_payee_pub_key"))) TS_Bolt11Invoice_get_payee_pub_key(uint64_t this_arg) { + LDKBolt11Invoice this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(33, __LINE__); + memcpy(ret_arr->elems, Bolt11Invoice_get_payee_pub_key(&this_arg_conv).compressed_form, 33); + return ret_arr; +} + uint64_t __attribute__((export_name("TS_Bolt11Invoice_expires_at"))) TS_Bolt11Invoice_expires_at(uint64_t this_arg) { LDKBolt11Invoice this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); diff --git a/ts/bindings.c.body b/ts/bindings.c.body index 214de4e5..56ff3c6f 100644 --- a/ts/bindings.c.body +++ b/ts/bindings.c.body @@ -219,10 +219,11 @@ static inline LDKBolt12SemanticError LDKBolt12SemanticError_from_js(int32_t ord) case 20: return LDKBolt12SemanticError_MissingPayerId; case 21: return LDKBolt12SemanticError_DuplicatePaymentId; case 22: return LDKBolt12SemanticError_MissingPaths; - case 23: return LDKBolt12SemanticError_InvalidPayInfo; - case 24: return LDKBolt12SemanticError_MissingCreationTime; - case 25: return LDKBolt12SemanticError_MissingPaymentHash; - case 26: return LDKBolt12SemanticError_MissingSignature; + case 23: return LDKBolt12SemanticError_UnexpectedPaths; + case 24: return LDKBolt12SemanticError_InvalidPayInfo; + case 25: return LDKBolt12SemanticError_MissingCreationTime; + case 26: return LDKBolt12SemanticError_MissingPaymentHash; + case 27: return LDKBolt12SemanticError_MissingSignature; } abort(); } @@ -251,10 +252,11 @@ static inline int32_t LDKBolt12SemanticError_to_js(LDKBolt12SemanticError val) { case LDKBolt12SemanticError_MissingPayerId: return 20; case LDKBolt12SemanticError_DuplicatePaymentId: return 21; case LDKBolt12SemanticError_MissingPaths: return 22; - case LDKBolt12SemanticError_InvalidPayInfo: return 23; - case LDKBolt12SemanticError_MissingCreationTime: return 24; - case LDKBolt12SemanticError_MissingPaymentHash: return 25; - case LDKBolt12SemanticError_MissingSignature: return 26; + case LDKBolt12SemanticError_UnexpectedPaths: return 23; + case LDKBolt12SemanticError_InvalidPayInfo: return 24; + case LDKBolt12SemanticError_MissingCreationTime: return 25; + case LDKBolt12SemanticError_MissingPaymentHash: return 26; + case LDKBolt12SemanticError_MissingSignature: return 27; default: abort(); } } @@ -316,6 +318,7 @@ static inline LDKConfirmationTarget LDKConfirmationTarget_from_js(int32_t ord) { case 3: return LDKConfirmationTarget_AnchorChannelFee; case 4: return LDKConfirmationTarget_NonAnchorChannelFee; case 5: return LDKConfirmationTarget_ChannelCloseMinimum; + case 6: return LDKConfirmationTarget_OutputSpendingFee; } abort(); } @@ -327,6 +330,7 @@ static inline int32_t LDKConfirmationTarget_to_js(LDKConfirmationTarget val) { case LDKConfirmationTarget_AnchorChannelFee: return 3; case LDKConfirmationTarget_NonAnchorChannelFee: return 4; case LDKConfirmationTarget_ChannelCloseMinimum: return 5; + case LDKConfirmationTarget_OutputSpendingFee: return 6; default: abort(); } } @@ -372,6 +376,20 @@ static inline int32_t LDKCurrency_to_js(LDKCurrency val) { default: abort(); } } +static inline LDKDirection LDKDirection_from_js(int32_t ord) { + switch (ord) { + case 0: return LDKDirection_NodeOne; + case 1: return LDKDirection_NodeTwo; + } + abort(); +} +static inline int32_t LDKDirection_to_js(LDKDirection val) { + switch (val) { + case LDKDirection_NodeOne: return 0; + case LDKDirection_NodeTwo: return 1; + default: abort(); + } +} static inline LDKHTLCClaim LDKHTLCClaim_from_js(int32_t ord) { switch (ord) { case 0: return LDKHTLCClaim_OfferedTimeout; @@ -562,6 +580,22 @@ static inline int32_t LDKSecp256k1Error_to_js(LDKSecp256k1Error val) { default: abort(); } } +static inline LDKShortChannelIdError LDKShortChannelIdError_from_js(int32_t ord) { + switch (ord) { + case 0: return LDKShortChannelIdError_BlockOverflow; + case 1: return LDKShortChannelIdError_TxIndexOverflow; + case 2: return LDKShortChannelIdError_VoutIndexOverflow; + } + abort(); +} +static inline int32_t LDKShortChannelIdError_to_js(LDKShortChannelIdError val) { + switch (val) { + case LDKShortChannelIdError_BlockOverflow: return 0; + case LDKShortChannelIdError_TxIndexOverflow: return 1; + case LDKShortChannelIdError_VoutIndexOverflow: return 2; + default: abort(); + } +} static inline LDKSiPrefix LDKSiPrefix_from_js(int32_t ord) { switch (ord) { case 0: return LDKSiPrefix_Milli; @@ -663,6 +697,54 @@ int8_t __attribute__((export_name("TS_LDKBech32Error_InvalidData_get_invalid_dat int8_t invalid_data_conv = obj->invalid_data; return invalid_data_conv; } +static inline struct LDKRefundMaybeWithDerivedMetadataBuilder CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKRefundMaybeWithDerivedMetadataBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok"))) TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(uint64_t owner) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKRefundMaybeWithDerivedMetadataBuilder ret_var = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +uint32_t __attribute__((export_name("TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err"))) TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(uint64_t owner) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + uint32_t ret_conv = LDKBolt12SemanticError_to_js(CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKRefund CResult_RefundBolt12SemanticErrorZ_get_ok(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKRefund ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_RefundBolt12SemanticErrorZ_get_ok"))) TS_CResult_RefundBolt12SemanticErrorZ_get_ok(uint64_t owner) { + LDKCResult_RefundBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(owner); + LDKRefund ret_var = CResult_RefundBolt12SemanticErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_RefundBolt12SemanticErrorZ_get_err(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +uint32_t __attribute__((export_name("TS_CResult_RefundBolt12SemanticErrorZ_get_err"))) TS_CResult_RefundBolt12SemanticErrorZ_get_err(uint64_t owner) { + LDKCResult_RefundBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(owner); + uint32_t ret_conv = LDKBolt12SemanticError_to_js(CResult_RefundBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + uint32_t __attribute__((export_name("TS_LDKCOption_u64Z_ty_from_ptr"))) TS_LDKCOption_u64Z_ty_from_ptr(uint64_t ptr) { LDKCOption_u64Z *obj = (LDKCOption_u64Z*)untag_ptr(ptr); switch(obj->tag) { @@ -735,6 +817,7 @@ uint32_t __attribute__((export_name("TS_LDKDecodeError_ty_from_ptr"))) TS_LDKDec case LDKDecodeError_BadLengthDescriptor: return 4; case LDKDecodeError_Io: return 5; case LDKDecodeError_UnsupportedCompression: return 6; + case LDKDecodeError_DangerousValue: return 7; default: abort(); } } @@ -966,6 +1049,74 @@ void __attribute__((export_name("TS_CResult_RecipientOnionFieldsNoneZ_get_err") CResult_RecipientOnionFieldsNoneZ_get_err(owner_conv); } +static inline struct LDKUnsignedBolt12Invoice CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKUnsignedBolt12Invoice ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok"))) TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(uint64_t owner) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner); + LDKUnsignedBolt12Invoice ret_var = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +uint32_t __attribute__((export_name("TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err"))) TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(uint64_t owner) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner); + uint32_t ret_conv = LDKBolt12SemanticError_to_js(CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKBolt12Invoice CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKBolt12Invoice ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok"))) TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(uint64_t owner) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner); + LDKBolt12Invoice ret_var = CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +uint32_t __attribute__((export_name("TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err"))) TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(uint64_t owner) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner); + uint32_t ret_conv = LDKBolt12SemanticError_to_js(CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKSchnorrSignature CResult_SchnorrSignatureNoneZ_get_ok(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return *owner->contents.result; +} +int8_tArray __attribute__((export_name("TS_CResult_SchnorrSignatureNoneZ_get_ok"))) TS_CResult_SchnorrSignatureNoneZ_get_ok(uint64_t owner) { + LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner); + int8_tArray ret_arr = init_int8_tArray(64, __LINE__); + memcpy(ret_arr->elems, CResult_SchnorrSignatureNoneZ_get_ok(owner_conv).compact_form, 64); + return ret_arr; +} + +static inline void CResult_SchnorrSignatureNoneZ_get_err(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return *owner->contents.err; +} +void __attribute__((export_name("TS_CResult_SchnorrSignatureNoneZ_get_err"))) TS_CResult_SchnorrSignatureNoneZ_get_err(uint64_t owner) { + LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner); + CResult_SchnorrSignatureNoneZ_get_err(owner_conv); +} + static inline LDKCVec_ThirtyTwoBytesZ CVec_ThirtyTwoBytesZ_clone(const LDKCVec_ThirtyTwoBytesZ *orig) { LDKCVec_ThirtyTwoBytesZ ret = { .data = MALLOC(sizeof(LDKThirtyTwoBytes) * orig->datalen, "LDKCVec_ThirtyTwoBytesZ clone bytes"), .datalen = orig->datalen }; for (size_t i = 0; i < ret.datalen; i++) { @@ -996,6 +1147,76 @@ ptrArray __attribute__((export_name("TS_LDKCOption_CVec_ThirtyTwoBytesZZ_Some_ge return some_arr; } +uint32_t __attribute__((export_name("TS_LDKAmount_ty_from_ptr"))) TS_LDKAmount_ty_from_ptr(uint64_t ptr) { + LDKAmount *obj = (LDKAmount*)untag_ptr(ptr); + switch(obj->tag) { + case LDKAmount_Bitcoin: return 0; + case LDKAmount_Currency: return 1; + default: abort(); + } +} +int64_t __attribute__((export_name("TS_LDKAmount_Bitcoin_get_amount_msats"))) TS_LDKAmount_Bitcoin_get_amount_msats(uint64_t ptr) { + LDKAmount *obj = (LDKAmount*)untag_ptr(ptr); + assert(obj->tag == LDKAmount_Bitcoin); + int64_t amount_msats_conv = obj->bitcoin.amount_msats; + return amount_msats_conv; +} +int8_tArray __attribute__((export_name("TS_LDKAmount_Currency_get_iso4217_code"))) TS_LDKAmount_Currency_get_iso4217_code(uint64_t ptr) { + LDKAmount *obj = (LDKAmount*)untag_ptr(ptr); + assert(obj->tag == LDKAmount_Currency); + int8_tArray iso4217_code_arr = init_int8_tArray(3, __LINE__); + memcpy(iso4217_code_arr->elems, obj->currency.iso4217_code.data, 3); + return iso4217_code_arr; +} +int64_t __attribute__((export_name("TS_LDKAmount_Currency_get_amount"))) TS_LDKAmount_Currency_get_amount(uint64_t ptr) { + LDKAmount *obj = (LDKAmount*)untag_ptr(ptr); + assert(obj->tag == LDKAmount_Currency); + int64_t amount_conv = obj->currency.amount; + return amount_conv; +} +uint32_t __attribute__((export_name("TS_LDKCOption_AmountZ_ty_from_ptr"))) TS_LDKCOption_AmountZ_ty_from_ptr(uint64_t ptr) { + LDKCOption_AmountZ *obj = (LDKCOption_AmountZ*)untag_ptr(ptr); + switch(obj->tag) { + case LDKCOption_AmountZ_Some: return 0; + case LDKCOption_AmountZ_None: return 1; + default: abort(); + } +} +uint64_t __attribute__((export_name("TS_LDKCOption_AmountZ_Some_get_some"))) TS_LDKCOption_AmountZ_Some_get_some(uint64_t ptr) { + LDKCOption_AmountZ *obj = (LDKCOption_AmountZ*)untag_ptr(ptr); + assert(obj->tag == LDKCOption_AmountZ_Some); + uint64_t some_ref = tag_ptr(&obj->some, false); + return some_ref; +} +uint32_t __attribute__((export_name("TS_LDKQuantity_ty_from_ptr"))) TS_LDKQuantity_ty_from_ptr(uint64_t ptr) { + LDKQuantity *obj = (LDKQuantity*)untag_ptr(ptr); + switch(obj->tag) { + case LDKQuantity_Bounded: return 0; + case LDKQuantity_Unbounded: return 1; + case LDKQuantity_One: return 2; + default: abort(); + } +} +int64_t __attribute__((export_name("TS_LDKQuantity_Bounded_get_bounded"))) TS_LDKQuantity_Bounded_get_bounded(uint64_t ptr) { + LDKQuantity *obj = (LDKQuantity*)untag_ptr(ptr); + assert(obj->tag == LDKQuantity_Bounded); + int64_t bounded_conv = obj->bounded; + return bounded_conv; +} +uint32_t __attribute__((export_name("TS_LDKCOption_QuantityZ_ty_from_ptr"))) TS_LDKCOption_QuantityZ_ty_from_ptr(uint64_t ptr) { + LDKCOption_QuantityZ *obj = (LDKCOption_QuantityZ*)untag_ptr(ptr); + switch(obj->tag) { + case LDKCOption_QuantityZ_Some: return 0; + case LDKCOption_QuantityZ_None: return 1; + default: abort(); + } +} +uint64_t __attribute__((export_name("TS_LDKCOption_QuantityZ_Some_get_some"))) TS_LDKCOption_QuantityZ_Some_get_some(uint64_t ptr) { + LDKCOption_QuantityZ *obj = (LDKCOption_QuantityZ*)untag_ptr(ptr); + assert(obj->tag == LDKCOption_QuantityZ_Some); + uint64_t some_ref = tag_ptr(&obj->some, false); + return some_ref; +} static inline struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesNoneZ_get_ok(LDKCResult_ThirtyTwoBytesNoneZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return ThirtyTwoBytes_clone(&*owner->contents.result); @@ -1360,44 +1581,45 @@ void __attribute__((export_name("TS_CResult_RecoverableSignatureNoneZ_get_err") CResult_RecoverableSignatureNoneZ_get_err(owner_conv); } -static inline struct LDKSchnorrSignature CResult_SchnorrSignatureNoneZ_get_ok(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){ +static inline struct LDKECDSASignature CResult_ECDSASignatureNoneZ_get_ok(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return *owner->contents.result; } -int8_tArray __attribute__((export_name("TS_CResult_SchnorrSignatureNoneZ_get_ok"))) TS_CResult_SchnorrSignatureNoneZ_get_ok(uint64_t owner) { - LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner); +int8_tArray __attribute__((export_name("TS_CResult_ECDSASignatureNoneZ_get_ok"))) TS_CResult_ECDSASignatureNoneZ_get_ok(uint64_t owner) { + LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner); int8_tArray ret_arr = init_int8_tArray(64, __LINE__); - memcpy(ret_arr->elems, CResult_SchnorrSignatureNoneZ_get_ok(owner_conv).compact_form, 64); + memcpy(ret_arr->elems, CResult_ECDSASignatureNoneZ_get_ok(owner_conv).compact_form, 64); return ret_arr; } -static inline void CResult_SchnorrSignatureNoneZ_get_err(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){ +static inline void CResult_ECDSASignatureNoneZ_get_err(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){ CHECK(!owner->result_ok); return *owner->contents.err; } -void __attribute__((export_name("TS_CResult_SchnorrSignatureNoneZ_get_err"))) TS_CResult_SchnorrSignatureNoneZ_get_err(uint64_t owner) { - LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner); - CResult_SchnorrSignatureNoneZ_get_err(owner_conv); +void __attribute__((export_name("TS_CResult_ECDSASignatureNoneZ_get_err"))) TS_CResult_ECDSASignatureNoneZ_get_err(uint64_t owner) { + LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner); + CResult_ECDSASignatureNoneZ_get_err(owner_conv); } -static inline struct LDKECDSASignature CResult_ECDSASignatureNoneZ_get_ok(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){ +static inline struct LDKTransaction CResult_TransactionNoneZ_get_ok(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return *owner->contents.result; } -int8_tArray __attribute__((export_name("TS_CResult_ECDSASignatureNoneZ_get_ok"))) TS_CResult_ECDSASignatureNoneZ_get_ok(uint64_t owner) { - LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner); - int8_tArray ret_arr = init_int8_tArray(64, __LINE__); - memcpy(ret_arr->elems, CResult_ECDSASignatureNoneZ_get_ok(owner_conv).compact_form, 64); +int8_tArray __attribute__((export_name("TS_CResult_TransactionNoneZ_get_ok"))) TS_CResult_TransactionNoneZ_get_ok(uint64_t owner) { + LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner); + LDKTransaction ret_var = CResult_TransactionNoneZ_get_ok(owner_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); return ret_arr; } -static inline void CResult_ECDSASignatureNoneZ_get_err(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){ +static inline void CResult_TransactionNoneZ_get_err(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){ CHECK(!owner->result_ok); return *owner->contents.err; } -void __attribute__((export_name("TS_CResult_ECDSASignatureNoneZ_get_err"))) TS_CResult_ECDSASignatureNoneZ_get_err(uint64_t owner) { - LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner); - CResult_ECDSASignatureNoneZ_get_err(owner_conv); +void __attribute__((export_name("TS_CResult_TransactionNoneZ_get_err"))) TS_CResult_TransactionNoneZ_get_err(uint64_t owner) { + LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner); + CResult_TransactionNoneZ_get_err(owner_conv); } static inline struct LDKECDSASignature C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_a(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ *NONNULL_PTR owner){ @@ -2270,27 +2492,6 @@ uint64_t __attribute__((export_name("TS_CResult_InMemorySignerDecodeErrorZ_get_ return ret_ref; } -static inline struct LDKTransaction CResult_TransactionNoneZ_get_ok(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){ -CHECK(owner->result_ok); - return *owner->contents.result; -} -int8_tArray __attribute__((export_name("TS_CResult_TransactionNoneZ_get_ok"))) TS_CResult_TransactionNoneZ_get_ok(uint64_t owner) { - LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner); - LDKTransaction ret_var = CResult_TransactionNoneZ_get_ok(owner_conv); - int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); - memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); - return ret_arr; -} - -static inline void CResult_TransactionNoneZ_get_err(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return *owner->contents.err; -} -void __attribute__((export_name("TS_CResult_TransactionNoneZ_get_err"))) TS_CResult_TransactionNoneZ_get_err(uint64_t owner) { - LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner); - CResult_TransactionNoneZ_get_err(owner_conv); -} - static inline LDKCVec_ChannelDetailsZ CVec_ChannelDetailsZ_clone(const LDKCVec_ChannelDetailsZ *orig) { LDKCVec_ChannelDetailsZ ret = { .data = MALLOC(sizeof(LDKChannelDetails) * orig->datalen, "LDKCVec_ChannelDetailsZ clone bytes"), .datalen = orig->datalen }; for (size_t i = 0; i < ret.datalen; i++) { @@ -2893,6 +3094,32 @@ uint64_t __attribute__((export_name("TS_CResult_ProbabilisticScorerDecodeErrorZ return ret_ref; } +static inline struct LDKBestBlock CResult_BestBlockDecodeErrorZ_get_ok(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR owner){ + LDKBestBlock ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_BestBlockDecodeErrorZ_get_ok"))) TS_CResult_BestBlockDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_BestBlockDecodeErrorZ* owner_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(owner); + LDKBestBlock ret_var = CResult_BestBlockDecodeErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_BestBlockDecodeErrorZ_get_err(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +uint64_t __attribute__((export_name("TS_CResult_BestBlockDecodeErrorZ_get_err"))) TS_CResult_BestBlockDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_BestBlockDecodeErrorZ* owner_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_BestBlockDecodeErrorZ_get_err(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + static inline uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR owner){ return owner->a; } @@ -2976,12 +3203,48 @@ void __attribute__((export_name("TS_CResult_ChannelMonitorUpdateStatusNoneZ_get CResult_ChannelMonitorUpdateStatusNoneZ_get_err(owner_conv); } +uint32_t __attribute__((export_name("TS_LDKClosureReason_ty_from_ptr"))) TS_LDKClosureReason_ty_from_ptr(uint64_t ptr) { + LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr); + switch(obj->tag) { + case LDKClosureReason_CounterpartyForceClosed: return 0; + case LDKClosureReason_HolderForceClosed: return 1; + case LDKClosureReason_LegacyCooperativeClosure: return 2; + case LDKClosureReason_CounterpartyInitiatedCooperativeClosure: return 3; + case LDKClosureReason_LocallyInitiatedCooperativeClosure: return 4; + case LDKClosureReason_CommitmentTxConfirmed: return 5; + case LDKClosureReason_FundingTimedOut: return 6; + case LDKClosureReason_ProcessingError: return 7; + case LDKClosureReason_DisconnectedPeer: return 8; + case LDKClosureReason_OutdatedChannelManager: return 9; + case LDKClosureReason_CounterpartyCoopClosedUnfundedChannel: return 10; + case LDKClosureReason_FundingBatchClosure: return 11; + case LDKClosureReason_HTLCsTimedOut: return 12; + default: abort(); + } +} +uint64_t __attribute__((export_name("TS_LDKClosureReason_CounterpartyForceClosed_get_peer_msg"))) TS_LDKClosureReason_CounterpartyForceClosed_get_peer_msg(uint64_t ptr) { + LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr); + assert(obj->tag == LDKClosureReason_CounterpartyForceClosed); + LDKUntrustedString peer_msg_var = obj->counterparty_force_closed.peer_msg; + uint64_t peer_msg_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(peer_msg_var); + peer_msg_ref = tag_ptr(peer_msg_var.inner, false); + return peer_msg_ref; +} +jstring __attribute__((export_name("TS_LDKClosureReason_ProcessingError_get_err"))) TS_LDKClosureReason_ProcessingError_get_err(uint64_t ptr) { + LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr); + assert(obj->tag == LDKClosureReason_ProcessingError); + LDKStr err_str = obj->processing_error.err; + jstring err_conv = str_ref_to_ts(err_str.chars, err_str.len); + return err_conv; +} uint32_t __attribute__((export_name("TS_LDKMonitorEvent_ty_from_ptr"))) TS_LDKMonitorEvent_ty_from_ptr(uint64_t ptr) { LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr); switch(obj->tag) { case LDKMonitorEvent_HTLCEvent: return 0; - case LDKMonitorEvent_HolderForceClosed: return 1; - case LDKMonitorEvent_Completed: return 2; + case LDKMonitorEvent_HolderForceClosedWithInfo: return 1; + case LDKMonitorEvent_HolderForceClosed: return 2; + case LDKMonitorEvent_Completed: return 3; default: abort(); } } @@ -2994,6 +3257,30 @@ uint64_t __attribute__((export_name("TS_LDKMonitorEvent_HTLCEvent_get_htlc_event htlc_event_ref = tag_ptr(htlc_event_var.inner, false); return htlc_event_ref; } +uint64_t __attribute__((export_name("TS_LDKMonitorEvent_HolderForceClosedWithInfo_get_reason"))) TS_LDKMonitorEvent_HolderForceClosedWithInfo_get_reason(uint64_t ptr) { + LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr); + assert(obj->tag == LDKMonitorEvent_HolderForceClosedWithInfo); + uint64_t reason_ref = tag_ptr(&obj->holder_force_closed_with_info.reason, false); + return reason_ref; +} +uint64_t __attribute__((export_name("TS_LDKMonitorEvent_HolderForceClosedWithInfo_get_outpoint"))) TS_LDKMonitorEvent_HolderForceClosedWithInfo_get_outpoint(uint64_t ptr) { + LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr); + assert(obj->tag == LDKMonitorEvent_HolderForceClosedWithInfo); + LDKOutPoint outpoint_var = obj->holder_force_closed_with_info.outpoint; + uint64_t outpoint_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_var); + outpoint_ref = tag_ptr(outpoint_var.inner, false); + return outpoint_ref; +} +uint64_t __attribute__((export_name("TS_LDKMonitorEvent_HolderForceClosedWithInfo_get_channel_id"))) TS_LDKMonitorEvent_HolderForceClosedWithInfo_get_channel_id(uint64_t ptr) { + LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr); + assert(obj->tag == LDKMonitorEvent_HolderForceClosedWithInfo); + LDKChannelId channel_id_var = obj->holder_force_closed_with_info.channel_id; + uint64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; +} uint64_t __attribute__((export_name("TS_LDKMonitorEvent_HolderForceClosed_get_holder_force_closed"))) TS_LDKMonitorEvent_HolderForceClosed_get_holder_force_closed(uint64_t ptr) { LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr); assert(obj->tag == LDKMonitorEvent_HolderForceClosed); @@ -3012,6 +3299,15 @@ uint64_t __attribute__((export_name("TS_LDKMonitorEvent_Completed_get_funding_tx funding_txo_ref = tag_ptr(funding_txo_var.inner, false); return funding_txo_ref; } +uint64_t __attribute__((export_name("TS_LDKMonitorEvent_Completed_get_channel_id"))) TS_LDKMonitorEvent_Completed_get_channel_id(uint64_t ptr) { + LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr); + assert(obj->tag == LDKMonitorEvent_Completed); + LDKChannelId channel_id_var = obj->completed.channel_id; + uint64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; +} int64_t __attribute__((export_name("TS_LDKMonitorEvent_Completed_get_monitor_update_id"))) TS_LDKMonitorEvent_Completed_get_monitor_update_id(uint64_t ptr) { LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr); assert(obj->tag == LDKMonitorEvent_Completed); @@ -3025,26 +3321,40 @@ static inline LDKCVec_MonitorEventZ CVec_MonitorEventZ_clone(const LDKCVec_Monit } return ret; } -static inline struct LDKOutPoint C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ +static inline struct LDKOutPoint C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ LDKOutPoint ret = owner->a; ret.is_owned = false; return ret; } -uint64_t __attribute__((export_name("TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a"))) TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(uint64_t owner) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); - LDKOutPoint ret_var = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(owner_conv); +uint64_t __attribute__((export_name("TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a"))) TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(uint64_t owner) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); + LDKOutPoint ret_var = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(owner_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -static inline struct LDKCVec_MonitorEventZ C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ - return CVec_MonitorEventZ_clone(&owner->b); +static inline struct LDKChannelId C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ + LDKChannelId ret = owner->b; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b"))) TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(uint64_t owner) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); + LDKChannelId ret_var = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -uint64_tArray __attribute__((export_name("TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b"))) TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(uint64_t owner) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); - LDKCVec_MonitorEventZ ret_var = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(owner_conv); + +static inline struct LDKCVec_MonitorEventZ C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ + return CVec_MonitorEventZ_clone(&owner->c); +} +uint64_tArray __attribute__((export_name("TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c"))) TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(uint64_t owner) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); + LDKCVec_MonitorEventZ ret_var = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(owner_conv); uint64_tArray ret_arr = NULL; ret_arr = init_uint64_tArray(ret_var.datalen, __LINE__); uint64_t *ret_arr_ptr = (uint64_t*)(((uint8_t*)ret_arr) + 8); @@ -3059,20 +3369,20 @@ uint64_tArray __attribute__((export_name("TS_C3Tuple_OutPointCVec_MonitorEventZ return ret_arr; } -static inline struct LDKPublicKey C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ - return owner->c; +static inline struct LDKPublicKey C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ + return owner->d; } -int8_tArray __attribute__((export_name("TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c"))) TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(uint64_t owner) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); +int8_tArray __attribute__((export_name("TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d"))) TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(uint64_t owner) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(owner_conv).compressed_form, 33); + memcpy(ret_arr->elems, C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(owner_conv).compressed_form, 33); return ret_arr; } -static inline LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_clone(const LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ *orig) { - LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ) * orig->datalen, "LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ clone bytes"), .datalen = orig->datalen }; +static inline LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_clone(const LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ *orig) { + LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ) * orig->datalen, "LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ clone bytes"), .datalen = orig->datalen }; for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(&orig->data[i]); + ret.data[i] = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(&orig->data[i]); } return ret; } @@ -3258,6 +3568,123 @@ uint64_t __attribute__((export_name("TS_CResult_ChannelTypeFeaturesDecodeErrorZ return ret_ref; } +static inline struct LDKOfferId CResult_OfferIdDecodeErrorZ_get_ok(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR owner){ + LDKOfferId ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_OfferIdDecodeErrorZ_get_ok"))) TS_CResult_OfferIdDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_OfferIdDecodeErrorZ* owner_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(owner); + LDKOfferId ret_var = CResult_OfferIdDecodeErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_OfferIdDecodeErrorZ_get_err(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +uint64_t __attribute__((export_name("TS_CResult_OfferIdDecodeErrorZ_get_err"))) TS_CResult_OfferIdDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_OfferIdDecodeErrorZ* owner_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_OfferIdDecodeErrorZ_get_err(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline void CResult_NoneBolt12SemanticErrorZ_get_ok(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return *owner->contents.result; +} +void __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_get_ok"))) TS_CResult_NoneBolt12SemanticErrorZ_get_ok(uint64_t owner) { + LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner); + CResult_NoneBolt12SemanticErrorZ_get_ok(owner_conv); +} + +static inline enum LDKBolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +uint32_t __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_get_err"))) TS_CResult_NoneBolt12SemanticErrorZ_get_err(uint64_t owner) { + LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner); + uint32_t ret_conv = LDKBolt12SemanticError_to_js(CResult_NoneBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKOffer CResult_OfferBolt12SemanticErrorZ_get_ok(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKOffer ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_OfferBolt12SemanticErrorZ_get_ok"))) TS_CResult_OfferBolt12SemanticErrorZ_get_ok(uint64_t owner) { + LDKCResult_OfferBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(owner); + LDKOffer ret_var = CResult_OfferBolt12SemanticErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_OfferBolt12SemanticErrorZ_get_err(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +uint32_t __attribute__((export_name("TS_CResult_OfferBolt12SemanticErrorZ_get_err"))) TS_CResult_OfferBolt12SemanticErrorZ_get_err(uint64_t owner) { + LDKCResult_OfferBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(owner); + uint32_t ret_conv = LDKBolt12SemanticError_to_js(CResult_OfferBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKInvoiceRequestWithDerivedPayerIdBuilder CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKInvoiceRequestWithDerivedPayerIdBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok"))) TS_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(uint64_t owner) { + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKInvoiceRequestWithDerivedPayerIdBuilder ret_var = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +uint32_t __attribute__((export_name("TS_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err"))) TS_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(uint64_t owner) { + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + uint32_t ret_conv = LDKBolt12SemanticError_to_js(CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKInvoiceRequestWithExplicitPayerIdBuilder CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKInvoiceRequestWithExplicitPayerIdBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok"))) TS_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(uint64_t owner) { + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKInvoiceRequestWithExplicitPayerIdBuilder ret_var = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +uint32_t __attribute__((export_name("TS_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err"))) TS_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(uint64_t owner) { + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + uint32_t ret_conv = LDKBolt12SemanticError_to_js(CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + static inline struct LDKOffer CResult_OfferBolt12ParseErrorZ_get_ok(LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR owner){ LDKOffer ret = *owner->contents.result; ret.is_owned = false; @@ -3286,27 +3713,6 @@ uint64_t __attribute__((export_name("TS_CResult_OfferBolt12ParseErrorZ_get_err" return ret_ref; } -static inline struct LDKPublicKey CResult_PublicKeySecp256k1ErrorZ_get_ok(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){ -CHECK(owner->result_ok); - return *owner->contents.result; -} -int8_tArray __attribute__((export_name("TS_CResult_PublicKeySecp256k1ErrorZ_get_ok"))) TS_CResult_PublicKeySecp256k1ErrorZ_get_ok(uint64_t owner) { - LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner); - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, CResult_PublicKeySecp256k1ErrorZ_get_ok(owner_conv).compressed_form, 33); - return ret_arr; -} - -static inline enum LDKSecp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return *owner->contents.err; -} -uint32_t __attribute__((export_name("TS_CResult_PublicKeySecp256k1ErrorZ_get_err"))) TS_CResult_PublicKeySecp256k1ErrorZ_get_err(uint64_t owner) { - LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner); - uint32_t ret_conv = LDKSecp256k1Error_to_js(CResult_PublicKeySecp256k1ErrorZ_get_err(owner_conv)); - return ret_conv; -} - static inline struct LDKNodeId CResult_NodeIdDecodeErrorZ_get_ok(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR owner){ LDKNodeId ret = *owner->contents.result; ret.is_owned = false; @@ -3333,6 +3739,27 @@ uint64_t __attribute__((export_name("TS_CResult_NodeIdDecodeErrorZ_get_err"))) return ret_ref; } +static inline struct LDKPublicKey CResult_PublicKeySecp256k1ErrorZ_get_ok(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return *owner->contents.result; +} +int8_tArray __attribute__((export_name("TS_CResult_PublicKeySecp256k1ErrorZ_get_ok"))) TS_CResult_PublicKeySecp256k1ErrorZ_get_ok(uint64_t owner) { + LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner); + int8_tArray ret_arr = init_int8_tArray(33, __LINE__); + memcpy(ret_arr->elems, CResult_PublicKeySecp256k1ErrorZ_get_ok(owner_conv).compressed_form, 33); + return ret_arr; +} + +static inline enum LDKSecp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return *owner->contents.err; +} +uint32_t __attribute__((export_name("TS_CResult_PublicKeySecp256k1ErrorZ_get_err"))) TS_CResult_PublicKeySecp256k1ErrorZ_get_err(uint64_t owner) { + LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner); + uint32_t ret_conv = LDKSecp256k1Error_to_js(CResult_PublicKeySecp256k1ErrorZ_get_err(owner_conv)); + return ret_conv; +} + uint32_t __attribute__((export_name("TS_LDKNetworkUpdate_ty_from_ptr"))) TS_LDKNetworkUpdate_ty_from_ptr(uint64_t ptr) { LDKNetworkUpdate *obj = (LDKNetworkUpdate*)untag_ptr(ptr); switch(obj->tag) { @@ -4617,6 +5044,26 @@ uint64_tArray __attribute__((export_name("TS_LDKCOption_CVec_SocketAddressZZ_Som return some_arr; } +static inline uint64_t CResult_u64ShortChannelIdErrorZ_get_ok(LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return *owner->contents.result; +} +int64_t __attribute__((export_name("TS_CResult_u64ShortChannelIdErrorZ_get_ok"))) TS_CResult_u64ShortChannelIdErrorZ_get_ok(uint64_t owner) { + LDKCResult_u64ShortChannelIdErrorZ* owner_conv = (LDKCResult_u64ShortChannelIdErrorZ*)untag_ptr(owner); + int64_t ret_conv = CResult_u64ShortChannelIdErrorZ_get_ok(owner_conv); + return ret_conv; +} + +static inline enum LDKShortChannelIdError CResult_u64ShortChannelIdErrorZ_get_err(LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return ShortChannelIdError_clone(&*owner->contents.err); +} +uint32_t __attribute__((export_name("TS_CResult_u64ShortChannelIdErrorZ_get_err"))) TS_CResult_u64ShortChannelIdErrorZ_get_err(uint64_t owner) { + LDKCResult_u64ShortChannelIdErrorZ* owner_conv = (LDKCResult_u64ShortChannelIdErrorZ*)untag_ptr(owner); + uint32_t ret_conv = LDKShortChannelIdError_to_js(CResult_u64ShortChannelIdErrorZ_get_err(owner_conv)); + return ret_conv; +} + static inline struct LDKPendingHTLCInfo CResult_PendingHTLCInfoInboundHTLCErrZ_get_ok(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR owner){ LDKPendingHTLCInfo ret = *owner->contents.result; ret.is_owned = false; @@ -4741,6 +5188,56 @@ void __attribute__((export_name("TS_CResult_CVec_UtxoZNoneZ_get_err"))) TS_CRes CResult_CVec_UtxoZNoneZ_get_err(owner_conv); } +uint32_t __attribute__((export_name("TS_LDKPaymentContext_ty_from_ptr"))) TS_LDKPaymentContext_ty_from_ptr(uint64_t ptr) { + LDKPaymentContext *obj = (LDKPaymentContext*)untag_ptr(ptr); + switch(obj->tag) { + case LDKPaymentContext_Unknown: return 0; + case LDKPaymentContext_Bolt12Offer: return 1; + case LDKPaymentContext_Bolt12Refund: return 2; + default: abort(); + } +} +uint64_t __attribute__((export_name("TS_LDKPaymentContext_Unknown_get_unknown"))) TS_LDKPaymentContext_Unknown_get_unknown(uint64_t ptr) { + LDKPaymentContext *obj = (LDKPaymentContext*)untag_ptr(ptr); + assert(obj->tag == LDKPaymentContext_Unknown); + LDKUnknownPaymentContext unknown_var = obj->unknown; + uint64_t unknown_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(unknown_var); + unknown_ref = tag_ptr(unknown_var.inner, false); + return unknown_ref; +} +uint64_t __attribute__((export_name("TS_LDKPaymentContext_Bolt12Offer_get_bolt12_offer"))) TS_LDKPaymentContext_Bolt12Offer_get_bolt12_offer(uint64_t ptr) { + LDKPaymentContext *obj = (LDKPaymentContext*)untag_ptr(ptr); + assert(obj->tag == LDKPaymentContext_Bolt12Offer); + LDKBolt12OfferContext bolt12_offer_var = obj->bolt12_offer; + uint64_t bolt12_offer_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(bolt12_offer_var); + bolt12_offer_ref = tag_ptr(bolt12_offer_var.inner, false); + return bolt12_offer_ref; +} +uint64_t __attribute__((export_name("TS_LDKPaymentContext_Bolt12Refund_get_bolt12_refund"))) TS_LDKPaymentContext_Bolt12Refund_get_bolt12_refund(uint64_t ptr) { + LDKPaymentContext *obj = (LDKPaymentContext*)untag_ptr(ptr); + assert(obj->tag == LDKPaymentContext_Bolt12Refund); + LDKBolt12RefundContext bolt12_refund_var = obj->bolt12_refund; + uint64_t bolt12_refund_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(bolt12_refund_var); + bolt12_refund_ref = tag_ptr(bolt12_refund_var.inner, false); + return bolt12_refund_ref; +} +uint32_t __attribute__((export_name("TS_LDKCOption_PaymentContextZ_ty_from_ptr"))) TS_LDKCOption_PaymentContextZ_ty_from_ptr(uint64_t ptr) { + LDKCOption_PaymentContextZ *obj = (LDKCOption_PaymentContextZ*)untag_ptr(ptr); + switch(obj->tag) { + case LDKCOption_PaymentContextZ_Some: return 0; + case LDKCOption_PaymentContextZ_None: return 1; + default: abort(); + } +} +uint64_t __attribute__((export_name("TS_LDKCOption_PaymentContextZ_Some_get_some"))) TS_LDKCOption_PaymentContextZ_Some_get_some(uint64_t ptr) { + LDKCOption_PaymentContextZ *obj = (LDKCOption_PaymentContextZ*)untag_ptr(ptr); + assert(obj->tag == LDKCOption_PaymentContextZ_Some); + uint64_t some_ref = tag_ptr(&obj->some, false); + return some_ref; +} static inline uint64_t C2Tuple_u64u16Z_get_a(LDKC2Tuple_u64u16Z *NONNULL_PTR owner){ return owner->a; } @@ -4789,25 +5286,28 @@ uint32_t __attribute__((export_name("TS_LDKCOption_ChannelShutdownStateZ_Some_ge uint32_t some_conv = LDKChannelShutdownState_to_js(obj->some); return some_conv; } -static inline struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesAPIErrorZ_get_ok(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){ -CHECK(owner->result_ok); - return ThirtyTwoBytes_clone(&*owner->contents.result); +static inline struct LDKChannelId CResult_ChannelIdAPIErrorZ_get_ok(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR owner){ + LDKChannelId ret = *owner->contents.result; + ret.is_owned = false; + return ret; } -int8_tArray __attribute__((export_name("TS_CResult_ThirtyTwoBytesAPIErrorZ_get_ok"))) TS_CResult_ThirtyTwoBytesAPIErrorZ_get_ok(uint64_t owner) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner); - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, CResult_ThirtyTwoBytesAPIErrorZ_get_ok(owner_conv).data, 32); - return ret_arr; +uint64_t __attribute__((export_name("TS_CResult_ChannelIdAPIErrorZ_get_ok"))) TS_CResult_ChannelIdAPIErrorZ_get_ok(uint64_t owner) { + LDKCResult_ChannelIdAPIErrorZ* owner_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(owner); + LDKChannelId ret_var = CResult_ChannelIdAPIErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -static inline struct LDKAPIError CResult_ThirtyTwoBytesAPIErrorZ_get_err(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){ +static inline struct LDKAPIError CResult_ChannelIdAPIErrorZ_get_err(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR owner){ CHECK(!owner->result_ok); return APIError_clone(&*owner->contents.err); } -uint64_t __attribute__((export_name("TS_CResult_ThirtyTwoBytesAPIErrorZ_get_err"))) TS_CResult_ThirtyTwoBytesAPIErrorZ_get_err(uint64_t owner) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner); +uint64_t __attribute__((export_name("TS_CResult_ChannelIdAPIErrorZ_get_err"))) TS_CResult_ChannelIdAPIErrorZ_get_err(uint64_t owner) { + LDKCResult_ChannelIdAPIErrorZ* owner_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(owner); LDKAPIError *ret_copy = MALLOC(sizeof(LDKAPIError), "LDKAPIError"); - *ret_copy = CResult_ThirtyTwoBytesAPIErrorZ_get_err(owner_conv); + *ret_copy = CResult_ChannelIdAPIErrorZ_get_err(owner_conv); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -5142,33 +5642,68 @@ uint64_t __attribute__((export_name("TS_CResult_CVec_C2Tuple_ThirtyTwoBytesThir return ret_ref; } -static inline struct LDKThirtyTwoBytes C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR owner){ - return ThirtyTwoBytes_clone(&owner->a); +static inline struct LDKChannelId C2Tuple_ChannelIdPublicKeyZ_get_a(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR owner){ + LDKChannelId ret = owner->a; + ret.is_owned = false; + return ret; } -int8_tArray __attribute__((export_name("TS_C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a"))) TS_C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(uint64_t owner) { - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* owner_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(owner); - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(owner_conv).data, 32); - return ret_arr; +uint64_t __attribute__((export_name("TS_C2Tuple_ChannelIdPublicKeyZ_get_a"))) TS_C2Tuple_ChannelIdPublicKeyZ_get_a(uint64_t owner) { + LDKC2Tuple_ChannelIdPublicKeyZ* owner_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(owner); + LDKChannelId ret_var = C2Tuple_ChannelIdPublicKeyZ_get_a(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -static inline struct LDKPublicKey C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR owner){ +static inline struct LDKPublicKey C2Tuple_ChannelIdPublicKeyZ_get_b(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR owner){ return owner->b; } -int8_tArray __attribute__((export_name("TS_C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b"))) TS_C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(uint64_t owner) { - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* owner_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(owner); +int8_tArray __attribute__((export_name("TS_C2Tuple_ChannelIdPublicKeyZ_get_b"))) TS_C2Tuple_ChannelIdPublicKeyZ_get_b(uint64_t owner) { + LDKC2Tuple_ChannelIdPublicKeyZ* owner_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(owner); int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(owner_conv).compressed_form, 33); + memcpy(ret_arr->elems, C2Tuple_ChannelIdPublicKeyZ_get_b(owner_conv).compressed_form, 33); return ret_arr; } -static inline LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_clone(const LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ *orig) { - LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ) * orig->datalen, "LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ clone bytes"), .datalen = orig->datalen }; +static inline LDKCVec_C2Tuple_ChannelIdPublicKeyZZ CVec_C2Tuple_ChannelIdPublicKeyZZ_clone(const LDKCVec_C2Tuple_ChannelIdPublicKeyZZ *orig) { + LDKCVec_C2Tuple_ChannelIdPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ) * orig->datalen, "LDKCVec_C2Tuple_ChannelIdPublicKeyZZ clone bytes"), .datalen = orig->datalen }; for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(&orig->data[i]); + ret.data[i] = C2Tuple_ChannelIdPublicKeyZ_clone(&orig->data[i]); } return ret; } +static inline LDKCVec_ChannelIdZ CVec_ChannelIdZ_clone(const LDKCVec_ChannelIdZ *orig) { + LDKCVec_ChannelIdZ ret = { .data = MALLOC(sizeof(LDKChannelId) * orig->datalen, "LDKCVec_ChannelIdZ clone bytes"), .datalen = orig->datalen }; + for (size_t i = 0; i < ret.datalen; i++) { + ret.data[i] = ChannelId_clone(&orig->data[i]); + } + return ret; +} +static inline struct LDKOfferWithDerivedMetadataBuilder CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKOfferWithDerivedMetadataBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok"))) TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(uint64_t owner) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKOfferWithDerivedMetadataBuilder ret_var = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +uint32_t __attribute__((export_name("TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err"))) TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(uint64_t owner) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + uint32_t ret_conv = LDKBolt12SemanticError_to_js(CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + uint32_t __attribute__((export_name("TS_LDKCOption_StrZ_ty_from_ptr"))) TS_LDKCOption_StrZ_ty_from_ptr(uint64_t ptr) { LDKCOption_StrZ *obj = (LDKCOption_StrZ*)untag_ptr(ptr); switch(obj->tag) { @@ -5184,25 +5719,6 @@ jstring __attribute__((export_name("TS_LDKCOption_StrZ_Some_get_some"))) TS_LDKC jstring some_conv = str_ref_to_ts(some_str.chars, some_str.len); return some_conv; } -static inline void CResult_NoneBolt12SemanticErrorZ_get_ok(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){ -CHECK(owner->result_ok); - return *owner->contents.result; -} -void __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_get_ok"))) TS_CResult_NoneBolt12SemanticErrorZ_get_ok(uint64_t owner) { - LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner); - CResult_NoneBolt12SemanticErrorZ_get_ok(owner_conv); -} - -static inline enum LDKBolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return Bolt12SemanticError_clone(&*owner->contents.err); -} -uint32_t __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_get_err"))) TS_CResult_NoneBolt12SemanticErrorZ_get_err(uint64_t owner) { - LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner); - uint32_t ret_conv = LDKBolt12SemanticError_to_js(CResult_NoneBolt12SemanticErrorZ_get_err(owner_conv)); - return ret_conv; -} - static inline struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_ok(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return C2Tuple_ThirtyTwoBytesThirtyTwoBytesZ_clone(&*owner->contents.result); @@ -5223,6 +5739,29 @@ void __attribute__((export_name("TS_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoByte CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_err(owner_conv); } +static inline struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesAPIErrorZ_get_ok(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return ThirtyTwoBytes_clone(&*owner->contents.result); +} +int8_tArray __attribute__((export_name("TS_CResult_ThirtyTwoBytesAPIErrorZ_get_ok"))) TS_CResult_ThirtyTwoBytesAPIErrorZ_get_ok(uint64_t owner) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner); + int8_tArray ret_arr = init_int8_tArray(32, __LINE__); + memcpy(ret_arr->elems, CResult_ThirtyTwoBytesAPIErrorZ_get_ok(owner_conv).data, 32); + return ret_arr; +} + +static inline struct LDKAPIError CResult_ThirtyTwoBytesAPIErrorZ_get_err(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return APIError_clone(&*owner->contents.err); +} +uint64_t __attribute__((export_name("TS_CResult_ThirtyTwoBytesAPIErrorZ_get_err"))) TS_CResult_ThirtyTwoBytesAPIErrorZ_get_err(uint64_t owner) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner); + LDKAPIError *ret_copy = MALLOC(sizeof(LDKAPIError), "LDKAPIError"); + *ret_copy = CResult_ThirtyTwoBytesAPIErrorZ_get_err(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + uint32_t __attribute__((export_name("TS_LDKOffersMessage_ty_from_ptr"))) TS_LDKOffersMessage_ty_from_ptr(uint64_t ptr) { LDKOffersMessage *obj = (LDKOffersMessage*)untag_ptr(ptr); switch(obj->tag) { @@ -5518,6 +6057,12 @@ uint64_t __attribute__((export_name("TS_LDKPendingHTLCRouting_Receive_get_paymen uint64_t payment_metadata_ref = tag_ptr(&obj->receive.payment_metadata, false); return payment_metadata_ref; } +uint64_t __attribute__((export_name("TS_LDKPendingHTLCRouting_Receive_get_payment_context"))) TS_LDKPendingHTLCRouting_Receive_get_payment_context(uint64_t ptr) { + LDKPendingHTLCRouting *obj = (LDKPendingHTLCRouting*)untag_ptr(ptr); + assert(obj->tag == LDKPendingHTLCRouting_Receive); + uint64_t payment_context_ref = tag_ptr(&obj->receive.payment_context, false); + return payment_context_ref; +} int32_t __attribute__((export_name("TS_LDKPendingHTLCRouting_Receive_get_incoming_cltv_expiry"))) TS_LDKPendingHTLCRouting_Receive_get_incoming_cltv_expiry(uint64_t ptr) { LDKPendingHTLCRouting *obj = (LDKPendingHTLCRouting*)untag_ptr(ptr); assert(obj->tag == LDKPendingHTLCRouting_Receive); @@ -5597,6 +6142,12 @@ uint64_tArray __attribute__((export_name("TS_LDKPendingHTLCRouting_ReceiveKeysen return custom_tlvs_arr; } +jboolean __attribute__((export_name("TS_LDKPendingHTLCRouting_ReceiveKeysend_get_requires_blinded_error"))) TS_LDKPendingHTLCRouting_ReceiveKeysend_get_requires_blinded_error(uint64_t ptr) { + LDKPendingHTLCRouting *obj = (LDKPendingHTLCRouting*)untag_ptr(ptr); + assert(obj->tag == LDKPendingHTLCRouting_ReceiveKeysend); + jboolean requires_blinded_error_conv = obj->receive_keysend.requires_blinded_error; + return requires_blinded_error_conv; +} static inline struct LDKPendingHTLCRouting CResult_PendingHTLCRoutingDecodeErrorZ_get_ok(LDKCResult_PendingHTLCRoutingDecodeErrorZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return PendingHTLCRouting_clone(&*owner->contents.result); @@ -5740,23 +6291,23 @@ LDKChannelMonitorUpdateStatus update_channel_LDKWatch_jcall(const void* this_arg LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_js(ret); return ret_conv; } -LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ release_pending_monitor_events_LDKWatch_jcall(const void* this_arg) { +LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ release_pending_monitor_events_LDKWatch_jcall(const void* this_arg) { LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg; uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 20, 0, 0, 0, 0, 0, 0); - LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret_constr; + LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ ret_constr; ret_constr.datalen = ret->arr_len; if (ret_constr.datalen > 0) - ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ Elements"); + ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ Elements"); else ret_constr.data = NULL; uint64_t* ret_vals = ret->elems; - for (size_t x = 0; x < ret_constr.datalen; x++) { - uint64_t ret_conv_49 = ret_vals[x]; - void* ret_conv_49_ptr = untag_ptr(ret_conv_49); - CHECK_ACCESS(ret_conv_49_ptr); - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ ret_conv_49_conv = *(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)(ret_conv_49_ptr); - FREE(untag_ptr(ret_conv_49)); - ret_constr.data[x] = ret_conv_49_conv; + for (size_t f = 0; f < ret_constr.datalen; f++) { + uint64_t ret_conv_57 = ret_vals[f]; + void* ret_conv_57_ptr = untag_ptr(ret_conv_57); + CHECK_ACCESS(ret_conv_57_ptr); + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ ret_conv_57_conv = *(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)(ret_conv_57_ptr); + FREE(untag_ptr(ret_conv_57)); + ret_constr.data[f] = ret_conv_57_conv; } FREE(ret); return ret_constr; @@ -5825,14 +6376,14 @@ uint64_tArray __attribute__((export_name("TS_Watch_release_pending_monitor_even void* this_arg_ptr = untag_ptr(this_arg); if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } LDKWatch* this_arg_conv = (LDKWatch*)this_arg_ptr; - LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret_var = (this_arg_conv->release_pending_monitor_events)(this_arg_conv->this_arg); + LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ ret_var = (this_arg_conv->release_pending_monitor_events)(this_arg_conv->this_arg); uint64_tArray ret_arr = NULL; ret_arr = init_uint64_tArray(ret_var.datalen, __LINE__); uint64_t *ret_arr_ptr = (uint64_t*)(((uint8_t*)ret_arr) + 8); - for (size_t x = 0; x < ret_var.datalen; x++) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv_49_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ"); - *ret_conv_49_conv = ret_var.data[x]; - ret_arr_ptr[x] = tag_ptr(ret_conv_49_conv, true); + for (size_t f = 0; f < ret_var.datalen; f++) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv_57_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ"); + *ret_conv_57_conv = ret_var.data[f]; + ret_arr_ptr[f] = tag_ptr(ret_conv_57_conv, true); } FREE(ret_var.data); @@ -6065,7 +6616,7 @@ LDKCResult_SchnorrSignatureNoneZ sign_bolt12_invoice_request_LDKNodeSigner_jcall LDKNodeSigner_JCalls *j_calls = (LDKNodeSigner_JCalls*) this_arg; LDKUnsignedInvoiceRequest invoice_request_var = *invoice_request; uint64_t invoice_request_ref = 0; - // WARNING: we may need a move here but no clone is available for LDKUnsignedInvoiceRequest + invoice_request_var = UnsignedInvoiceRequest_clone(&invoice_request_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_request_var); invoice_request_ref = tag_ptr(invoice_request_var.inner, invoice_request_var.is_owned); uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 27, invoice_request_ref, 0, 0, 0, 0, 0); @@ -6079,7 +6630,7 @@ LDKCResult_SchnorrSignatureNoneZ sign_bolt12_invoice_LDKNodeSigner_jcall(const v LDKNodeSigner_JCalls *j_calls = (LDKNodeSigner_JCalls*) this_arg; LDKUnsignedBolt12Invoice invoice_var = *invoice; uint64_t invoice_ref = 0; - // WARNING: we may need a move here but no clone is available for LDKUnsignedBolt12Invoice + invoice_var = UnsignedBolt12Invoice_clone(&invoice_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_var); invoice_ref = tag_ptr(invoice_var.inner, invoice_var.is_owned); uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 28, invoice_ref, 0, 0, 0, 0, 0); @@ -7764,34 +8315,6 @@ uint64_t __attribute__((export_name("TS_LDKCOption_SocketAddressZ_Some_get_some" uint64_t some_ref = tag_ptr(&obj->some, false); return some_ref; } -static inline struct LDKPublicKey C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR owner){ - return owner->a; -} -int8_tArray __attribute__((export_name("TS_C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a"))) TS_C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(uint64_t owner) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* owner_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(owner); - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(owner_conv).compressed_form, 33); - return ret_arr; -} - -static inline struct LDKCOption_SocketAddressZ C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR owner){ - return COption_SocketAddressZ_clone(&owner->b); -} -uint64_t __attribute__((export_name("TS_C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b"))) TS_C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(uint64_t owner) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* owner_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(owner); - LDKCOption_SocketAddressZ *ret_copy = MALLOC(sizeof(LDKCOption_SocketAddressZ), "LDKCOption_SocketAddressZ"); - *ret_copy = C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(owner_conv); - uint64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -static inline LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_clone(const LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ *orig) { - LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ) * orig->datalen, "LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ clone bytes"), .datalen = orig->datalen }; - for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(&orig->data[i]); - } - return ret; -} static inline struct LDKCVec_u8Z CResult_CVec_u8ZPeerHandleErrorZ_get_ok(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return CVec_u8Z_clone(&*owner->contents.result); @@ -8040,6 +8563,54 @@ uint32_t __attribute__((export_name("TS_CResult_C2Tuple_ThirtyTwoBytesChannelMo return ret_conv; } +static inline struct LDKUnsignedInvoiceRequest CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKUnsignedInvoiceRequest ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok"))) TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(uint64_t owner) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner); + LDKUnsignedInvoiceRequest ret_var = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +uint32_t __attribute__((export_name("TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err"))) TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(uint64_t owner) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner); + uint32_t ret_conv = LDKBolt12SemanticError_to_js(CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKInvoiceRequest CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKInvoiceRequest ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok"))) TS_CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(uint64_t owner) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner); + LDKInvoiceRequest ret_var = CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +uint32_t __attribute__((export_name("TS_CResult_InvoiceRequestBolt12SemanticErrorZ_get_err"))) TS_CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(uint64_t owner) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner); + uint32_t ret_conv = LDKBolt12SemanticError_to_js(CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + uint32_t __attribute__((export_name("TS_LDKCOption_SecretKeyZ_ty_from_ptr"))) TS_LDKCOption_SecretKeyZ_ty_from_ptr(uint64_t ptr) { LDKCOption_SecretKeyZ *obj = (LDKCOption_SecretKeyZ*)untag_ptr(ptr); switch(obj->tag) { @@ -8055,6 +8626,30 @@ int8_tArray __attribute__((export_name("TS_LDKCOption_SecretKeyZ_Some_get_some") memcpy(some_arr->elems, obj->some.bytes, 32); return some_arr; } +static inline struct LDKInvoiceWithExplicitSigningPubkeyBuilder CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKInvoiceWithExplicitSigningPubkeyBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok"))) TS_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(uint64_t owner) { + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKInvoiceWithExplicitSigningPubkeyBuilder ret_var = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +uint32_t __attribute__((export_name("TS_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err"))) TS_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(uint64_t owner) { + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + uint32_t ret_conv = LDKBolt12SemanticError_to_js(CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + static inline struct LDKVerifiedInvoiceRequest CResult_VerifiedInvoiceRequestNoneZ_get_ok(LDKCResult_VerifiedInvoiceRequestNoneZ *NONNULL_PTR owner){ LDKVerifiedInvoiceRequest ret = *owner->contents.result; ret.is_owned = false; @@ -8078,6 +8673,56 @@ void __attribute__((export_name("TS_CResult_VerifiedInvoiceRequestNoneZ_get_err CResult_VerifiedInvoiceRequestNoneZ_get_err(owner_conv); } +static inline struct LDKInvoiceWithDerivedSigningPubkeyBuilder CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKInvoiceWithDerivedSigningPubkeyBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok"))) TS_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(uint64_t owner) { + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKInvoiceWithDerivedSigningPubkeyBuilder ret_var = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +uint32_t __attribute__((export_name("TS_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err"))) TS_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(uint64_t owner) { + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + uint32_t ret_conv = LDKBolt12SemanticError_to_js(CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKInvoiceRequestFields CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR owner){ + LDKInvoiceRequestFields ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok"))) TS_CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* owner_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(owner); + LDKInvoiceRequestFields ret_var = CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +uint64_t __attribute__((export_name("TS_CResult_InvoiceRequestFieldsDecodeErrorZ_get_err"))) TS_CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* owner_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + static inline LDKCVec_WitnessZ CVec_WitnessZ_clone(const LDKCVec_WitnessZ *orig) { LDKCVec_WitnessZ ret = { .data = MALLOC(sizeof(LDKWitness) * orig->datalen, "LDKCVec_WitnessZ clone bytes"), .datalen = orig->datalen }; for (size_t i = 0; i < ret.datalen; i++) { @@ -8085,6 +8730,21 @@ static inline LDKCVec_WitnessZ CVec_WitnessZ_clone(const LDKCVec_WitnessZ *orig) } return ret; } +uint32_t __attribute__((export_name("TS_LDKCOption_ECDSASignatureZ_ty_from_ptr"))) TS_LDKCOption_ECDSASignatureZ_ty_from_ptr(uint64_t ptr) { + LDKCOption_ECDSASignatureZ *obj = (LDKCOption_ECDSASignatureZ*)untag_ptr(ptr); + switch(obj->tag) { + case LDKCOption_ECDSASignatureZ_Some: return 0; + case LDKCOption_ECDSASignatureZ_None: return 1; + default: abort(); + } +} +int8_tArray __attribute__((export_name("TS_LDKCOption_ECDSASignatureZ_Some_get_some"))) TS_LDKCOption_ECDSASignatureZ_Some_get_some(uint64_t ptr) { + LDKCOption_ECDSASignatureZ *obj = (LDKCOption_ECDSASignatureZ*)untag_ptr(ptr); + assert(obj->tag == LDKCOption_ECDSASignatureZ_Some); + int8_tArray some_arr = init_int8_tArray(64, __LINE__); + memcpy(some_arr->elems, obj->some.compact_form, 64); + return some_arr; +} uint32_t __attribute__((export_name("TS_LDKCOption_i64Z_ty_from_ptr"))) TS_LDKCOption_i64Z_ty_from_ptr(uint64_t ptr) { LDKCOption_i64Z *obj = (LDKCOption_i64Z*)untag_ptr(ptr); switch(obj->tag) { @@ -9963,24 +10623,70 @@ uint64_t __attribute__((export_name("TS_CResult_ShutdownScriptInvalidShutdownSc uint32_t __attribute__((export_name("TS_LDKPaymentPurpose_ty_from_ptr"))) TS_LDKPaymentPurpose_ty_from_ptr(uint64_t ptr) { LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); switch(obj->tag) { - case LDKPaymentPurpose_InvoicePayment: return 0; - case LDKPaymentPurpose_SpontaneousPayment: return 1; + case LDKPaymentPurpose_Bolt11InvoicePayment: return 0; + case LDKPaymentPurpose_Bolt12OfferPayment: return 1; + case LDKPaymentPurpose_Bolt12RefundPayment: return 2; + case LDKPaymentPurpose_SpontaneousPayment: return 3; default: abort(); } } -uint64_t __attribute__((export_name("TS_LDKPaymentPurpose_InvoicePayment_get_payment_preimage"))) TS_LDKPaymentPurpose_InvoicePayment_get_payment_preimage(uint64_t ptr) { +uint64_t __attribute__((export_name("TS_LDKPaymentPurpose_Bolt11InvoicePayment_get_payment_preimage"))) TS_LDKPaymentPurpose_Bolt11InvoicePayment_get_payment_preimage(uint64_t ptr) { LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); - assert(obj->tag == LDKPaymentPurpose_InvoicePayment); - uint64_t payment_preimage_ref = tag_ptr(&obj->invoice_payment.payment_preimage, false); + assert(obj->tag == LDKPaymentPurpose_Bolt11InvoicePayment); + uint64_t payment_preimage_ref = tag_ptr(&obj->bolt11_invoice_payment.payment_preimage, false); return payment_preimage_ref; } -int8_tArray __attribute__((export_name("TS_LDKPaymentPurpose_InvoicePayment_get_payment_secret"))) TS_LDKPaymentPurpose_InvoicePayment_get_payment_secret(uint64_t ptr) { +int8_tArray __attribute__((export_name("TS_LDKPaymentPurpose_Bolt11InvoicePayment_get_payment_secret"))) TS_LDKPaymentPurpose_Bolt11InvoicePayment_get_payment_secret(uint64_t ptr) { LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); - assert(obj->tag == LDKPaymentPurpose_InvoicePayment); + assert(obj->tag == LDKPaymentPurpose_Bolt11InvoicePayment); int8_tArray payment_secret_arr = init_int8_tArray(32, __LINE__); - memcpy(payment_secret_arr->elems, obj->invoice_payment.payment_secret.data, 32); + memcpy(payment_secret_arr->elems, obj->bolt11_invoice_payment.payment_secret.data, 32); return payment_secret_arr; } +uint64_t __attribute__((export_name("TS_LDKPaymentPurpose_Bolt12OfferPayment_get_payment_preimage"))) TS_LDKPaymentPurpose_Bolt12OfferPayment_get_payment_preimage(uint64_t ptr) { + LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); + assert(obj->tag == LDKPaymentPurpose_Bolt12OfferPayment); + uint64_t payment_preimage_ref = tag_ptr(&obj->bolt12_offer_payment.payment_preimage, false); + return payment_preimage_ref; +} +int8_tArray __attribute__((export_name("TS_LDKPaymentPurpose_Bolt12OfferPayment_get_payment_secret"))) TS_LDKPaymentPurpose_Bolt12OfferPayment_get_payment_secret(uint64_t ptr) { + LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); + assert(obj->tag == LDKPaymentPurpose_Bolt12OfferPayment); + int8_tArray payment_secret_arr = init_int8_tArray(32, __LINE__); + memcpy(payment_secret_arr->elems, obj->bolt12_offer_payment.payment_secret.data, 32); + return payment_secret_arr; +} +uint64_t __attribute__((export_name("TS_LDKPaymentPurpose_Bolt12OfferPayment_get_payment_context"))) TS_LDKPaymentPurpose_Bolt12OfferPayment_get_payment_context(uint64_t ptr) { + LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); + assert(obj->tag == LDKPaymentPurpose_Bolt12OfferPayment); + LDKBolt12OfferContext payment_context_var = obj->bolt12_offer_payment.payment_context; + uint64_t payment_context_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_var); + payment_context_ref = tag_ptr(payment_context_var.inner, false); + return payment_context_ref; +} +uint64_t __attribute__((export_name("TS_LDKPaymentPurpose_Bolt12RefundPayment_get_payment_preimage"))) TS_LDKPaymentPurpose_Bolt12RefundPayment_get_payment_preimage(uint64_t ptr) { + LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); + assert(obj->tag == LDKPaymentPurpose_Bolt12RefundPayment); + uint64_t payment_preimage_ref = tag_ptr(&obj->bolt12_refund_payment.payment_preimage, false); + return payment_preimage_ref; +} +int8_tArray __attribute__((export_name("TS_LDKPaymentPurpose_Bolt12RefundPayment_get_payment_secret"))) TS_LDKPaymentPurpose_Bolt12RefundPayment_get_payment_secret(uint64_t ptr) { + LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); + assert(obj->tag == LDKPaymentPurpose_Bolt12RefundPayment); + int8_tArray payment_secret_arr = init_int8_tArray(32, __LINE__); + memcpy(payment_secret_arr->elems, obj->bolt12_refund_payment.payment_secret.data, 32); + return payment_secret_arr; +} +uint64_t __attribute__((export_name("TS_LDKPaymentPurpose_Bolt12RefundPayment_get_payment_context"))) TS_LDKPaymentPurpose_Bolt12RefundPayment_get_payment_context(uint64_t ptr) { + LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); + assert(obj->tag == LDKPaymentPurpose_Bolt12RefundPayment); + LDKBolt12RefundContext payment_context_var = obj->bolt12_refund_payment.payment_context; + uint64_t payment_context_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_var); + payment_context_ref = tag_ptr(payment_context_var.inner, false); + return payment_context_ref; +} int8_tArray __attribute__((export_name("TS_LDKPaymentPurpose_SpontaneousPayment_get_spontaneous_payment"))) TS_LDKPaymentPurpose_SpontaneousPayment_get_spontaneous_payment(uint64_t ptr) { LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); assert(obj->tag == LDKPaymentPurpose_SpontaneousPayment); @@ -10096,38 +10802,6 @@ uint64_t __attribute__((export_name("TS_CResult_COption_PathFailureZDecodeError return ret_ref; } -uint32_t __attribute__((export_name("TS_LDKClosureReason_ty_from_ptr"))) TS_LDKClosureReason_ty_from_ptr(uint64_t ptr) { - LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr); - switch(obj->tag) { - case LDKClosureReason_CounterpartyForceClosed: return 0; - case LDKClosureReason_HolderForceClosed: return 1; - case LDKClosureReason_CooperativeClosure: return 2; - case LDKClosureReason_CommitmentTxConfirmed: return 3; - case LDKClosureReason_FundingTimedOut: return 4; - case LDKClosureReason_ProcessingError: return 5; - case LDKClosureReason_DisconnectedPeer: return 6; - case LDKClosureReason_OutdatedChannelManager: return 7; - case LDKClosureReason_CounterpartyCoopClosedUnfundedChannel: return 8; - case LDKClosureReason_FundingBatchClosure: return 9; - default: abort(); - } -} -uint64_t __attribute__((export_name("TS_LDKClosureReason_CounterpartyForceClosed_get_peer_msg"))) TS_LDKClosureReason_CounterpartyForceClosed_get_peer_msg(uint64_t ptr) { - LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr); - assert(obj->tag == LDKClosureReason_CounterpartyForceClosed); - LDKUntrustedString peer_msg_var = obj->counterparty_force_closed.peer_msg; - uint64_t peer_msg_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(peer_msg_var); - peer_msg_ref = tag_ptr(peer_msg_var.inner, false); - return peer_msg_ref; -} -jstring __attribute__((export_name("TS_LDKClosureReason_ProcessingError_get_err"))) TS_LDKClosureReason_ProcessingError_get_err(uint64_t ptr) { - LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr); - assert(obj->tag == LDKClosureReason_ProcessingError); - LDKStr err_str = obj->processing_error.err; - jstring err_conv = str_ref_to_ts(err_str.chars, err_str.len); - return err_conv; -} uint32_t __attribute__((export_name("TS_LDKCOption_ClosureReasonZ_ty_from_ptr"))) TS_LDKCOption_ClosureReasonZ_ty_from_ptr(uint64_t ptr) { LDKCOption_ClosureReasonZ *obj = (LDKCOption_ClosureReasonZ*)untag_ptr(ptr); switch(obj->tag) { @@ -10172,7 +10846,8 @@ uint32_t __attribute__((export_name("TS_LDKHTLCDestination_ty_from_ptr"))) TS_LD case LDKHTLCDestination_NextHopChannel: return 0; case LDKHTLCDestination_UnknownNextHop: return 1; case LDKHTLCDestination_InvalidForward: return 2; - case LDKHTLCDestination_FailedPayment: return 3; + case LDKHTLCDestination_InvalidOnion: return 3; + case LDKHTLCDestination_FailedPayment: return 4; default: abort(); } } @@ -10183,12 +10858,14 @@ int8_tArray __attribute__((export_name("TS_LDKHTLCDestination_NextHopChannel_get memcpy(node_id_arr->elems, obj->next_hop_channel.node_id.compressed_form, 33); return node_id_arr; } -int8_tArray __attribute__((export_name("TS_LDKHTLCDestination_NextHopChannel_get_channel_id"))) TS_LDKHTLCDestination_NextHopChannel_get_channel_id(uint64_t ptr) { +uint64_t __attribute__((export_name("TS_LDKHTLCDestination_NextHopChannel_get_channel_id"))) TS_LDKHTLCDestination_NextHopChannel_get_channel_id(uint64_t ptr) { LDKHTLCDestination *obj = (LDKHTLCDestination*)untag_ptr(ptr); assert(obj->tag == LDKHTLCDestination_NextHopChannel); - int8_tArray channel_id_arr = init_int8_tArray(32, __LINE__); - memcpy(channel_id_arr->elems, obj->next_hop_channel.channel_id.data, 32); - return channel_id_arr; + LDKChannelId channel_id_var = obj->next_hop_channel.channel_id; + uint64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; } int64_t __attribute__((export_name("TS_LDKHTLCDestination_UnknownNextHop_get_requested_forward_scid"))) TS_LDKHTLCDestination_UnknownNextHop_get_requested_forward_scid(uint64_t ptr) { LDKHTLCDestination *obj = (LDKHTLCDestination*)untag_ptr(ptr); @@ -10313,6 +10990,22 @@ uint32_t __attribute__((export_name("TS_LDKBumpTransactionEvent_ty_from_ptr"))) default: abort(); } } +uint64_t __attribute__((export_name("TS_LDKBumpTransactionEvent_ChannelClose_get_channel_id"))) TS_LDKBumpTransactionEvent_ChannelClose_get_channel_id(uint64_t ptr) { + LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr); + assert(obj->tag == LDKBumpTransactionEvent_ChannelClose); + LDKChannelId channel_id_var = obj->channel_close.channel_id; + uint64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; +} +int8_tArray __attribute__((export_name("TS_LDKBumpTransactionEvent_ChannelClose_get_counterparty_node_id"))) TS_LDKBumpTransactionEvent_ChannelClose_get_counterparty_node_id(uint64_t ptr) { + LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr); + assert(obj->tag == LDKBumpTransactionEvent_ChannelClose); + int8_tArray counterparty_node_id_arr = init_int8_tArray(33, __LINE__); + memcpy(counterparty_node_id_arr->elems, obj->channel_close.counterparty_node_id.compressed_form, 33); + return counterparty_node_id_arr; +} int8_tArray __attribute__((export_name("TS_LDKBumpTransactionEvent_ChannelClose_get_claim_id"))) TS_LDKBumpTransactionEvent_ChannelClose_get_claim_id(uint64_t ptr) { LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr); assert(obj->tag == LDKBumpTransactionEvent_ChannelClose); @@ -10366,6 +11059,22 @@ uint64_tArray __attribute__((export_name("TS_LDKBumpTransactionEvent_ChannelClos return pending_htlcs_arr; } +uint64_t __attribute__((export_name("TS_LDKBumpTransactionEvent_HTLCResolution_get_channel_id"))) TS_LDKBumpTransactionEvent_HTLCResolution_get_channel_id(uint64_t ptr) { + LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr); + assert(obj->tag == LDKBumpTransactionEvent_HTLCResolution); + LDKChannelId channel_id_var = obj->htlc_resolution.channel_id; + uint64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; +} +int8_tArray __attribute__((export_name("TS_LDKBumpTransactionEvent_HTLCResolution_get_counterparty_node_id"))) TS_LDKBumpTransactionEvent_HTLCResolution_get_counterparty_node_id(uint64_t ptr) { + LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr); + assert(obj->tag == LDKBumpTransactionEvent_HTLCResolution); + int8_tArray counterparty_node_id_arr = init_int8_tArray(33, __LINE__); + memcpy(counterparty_node_id_arr->elems, obj->htlc_resolution.counterparty_node_id.compressed_form, 33); + return counterparty_node_id_arr; +} int8_tArray __attribute__((export_name("TS_LDKBumpTransactionEvent_HTLCResolution_get_claim_id"))) TS_LDKBumpTransactionEvent_HTLCResolution_get_claim_id(uint64_t ptr) { LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr); assert(obj->tag == LDKBumpTransactionEvent_HTLCResolution); @@ -10430,12 +11139,14 @@ uint32_t __attribute__((export_name("TS_LDKEvent_ty_from_ptr"))) TS_LDKEvent_ty_ default: abort(); } } -int8_tArray __attribute__((export_name("TS_LDKEvent_FundingGenerationReady_get_temporary_channel_id"))) TS_LDKEvent_FundingGenerationReady_get_temporary_channel_id(uint64_t ptr) { +uint64_t __attribute__((export_name("TS_LDKEvent_FundingGenerationReady_get_temporary_channel_id"))) TS_LDKEvent_FundingGenerationReady_get_temporary_channel_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); assert(obj->tag == LDKEvent_FundingGenerationReady); - int8_tArray temporary_channel_id_arr = init_int8_tArray(32, __LINE__); - memcpy(temporary_channel_id_arr->elems, obj->funding_generation_ready.temporary_channel_id.data, 32); - return temporary_channel_id_arr; + LDKChannelId temporary_channel_id_var = obj->funding_generation_ready.temporary_channel_id; + uint64_t temporary_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_var); + temporary_channel_id_ref = tag_ptr(temporary_channel_id_var.inner, false); + return temporary_channel_id_ref; } int8_tArray __attribute__((export_name("TS_LDKEvent_FundingGenerationReady_get_counterparty_node_id"))) TS_LDKEvent_FundingGenerationReady_get_counterparty_node_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); @@ -10509,7 +11220,10 @@ uint64_t __attribute__((export_name("TS_LDKEvent_PaymentClaimable_get_purpose")) uint64_t __attribute__((export_name("TS_LDKEvent_PaymentClaimable_get_via_channel_id"))) TS_LDKEvent_PaymentClaimable_get_via_channel_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); assert(obj->tag == LDKEvent_PaymentClaimable); - uint64_t via_channel_id_ref = tag_ptr(&obj->payment_claimable.via_channel_id, false); + LDKChannelId via_channel_id_var = obj->payment_claimable.via_channel_id; + uint64_t via_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(via_channel_id_var); + via_channel_id_ref = tag_ptr(via_channel_id_var.inner, false); return via_channel_id_ref; } uint64_t __attribute__((export_name("TS_LDKEvent_PaymentClaimable_get_via_user_channel_id"))) TS_LDKEvent_PaymentClaimable_get_via_user_channel_id(uint64_t ptr) { @@ -10816,26 +11530,53 @@ uint64_tArray __attribute__((export_name("TS_LDKEvent_SpendableOutputs_get_outpu uint64_t __attribute__((export_name("TS_LDKEvent_SpendableOutputs_get_channel_id"))) TS_LDKEvent_SpendableOutputs_get_channel_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); assert(obj->tag == LDKEvent_SpendableOutputs); - uint64_t channel_id_ref = tag_ptr(&obj->spendable_outputs.channel_id, false); + LDKChannelId channel_id_var = obj->spendable_outputs.channel_id; + uint64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); return channel_id_ref; } uint64_t __attribute__((export_name("TS_LDKEvent_PaymentForwarded_get_prev_channel_id"))) TS_LDKEvent_PaymentForwarded_get_prev_channel_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); assert(obj->tag == LDKEvent_PaymentForwarded); - uint64_t prev_channel_id_ref = tag_ptr(&obj->payment_forwarded.prev_channel_id, false); + LDKChannelId prev_channel_id_var = obj->payment_forwarded.prev_channel_id; + uint64_t prev_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_var); + prev_channel_id_ref = tag_ptr(prev_channel_id_var.inner, false); return prev_channel_id_ref; } uint64_t __attribute__((export_name("TS_LDKEvent_PaymentForwarded_get_next_channel_id"))) TS_LDKEvent_PaymentForwarded_get_next_channel_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); assert(obj->tag == LDKEvent_PaymentForwarded); - uint64_t next_channel_id_ref = tag_ptr(&obj->payment_forwarded.next_channel_id, false); + LDKChannelId next_channel_id_var = obj->payment_forwarded.next_channel_id; + uint64_t next_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(next_channel_id_var); + next_channel_id_ref = tag_ptr(next_channel_id_var.inner, false); return next_channel_id_ref; } -uint64_t __attribute__((export_name("TS_LDKEvent_PaymentForwarded_get_fee_earned_msat"))) TS_LDKEvent_PaymentForwarded_get_fee_earned_msat(uint64_t ptr) { +uint64_t __attribute__((export_name("TS_LDKEvent_PaymentForwarded_get_prev_user_channel_id"))) TS_LDKEvent_PaymentForwarded_get_prev_user_channel_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); assert(obj->tag == LDKEvent_PaymentForwarded); - uint64_t fee_earned_msat_ref = tag_ptr(&obj->payment_forwarded.fee_earned_msat, false); - return fee_earned_msat_ref; + uint64_t prev_user_channel_id_ref = tag_ptr(&obj->payment_forwarded.prev_user_channel_id, false); + return prev_user_channel_id_ref; +} +uint64_t __attribute__((export_name("TS_LDKEvent_PaymentForwarded_get_next_user_channel_id"))) TS_LDKEvent_PaymentForwarded_get_next_user_channel_id(uint64_t ptr) { + LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); + assert(obj->tag == LDKEvent_PaymentForwarded); + uint64_t next_user_channel_id_ref = tag_ptr(&obj->payment_forwarded.next_user_channel_id, false); + return next_user_channel_id_ref; +} +uint64_t __attribute__((export_name("TS_LDKEvent_PaymentForwarded_get_total_fee_earned_msat"))) TS_LDKEvent_PaymentForwarded_get_total_fee_earned_msat(uint64_t ptr) { + LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); + assert(obj->tag == LDKEvent_PaymentForwarded); + uint64_t total_fee_earned_msat_ref = tag_ptr(&obj->payment_forwarded.total_fee_earned_msat, false); + return total_fee_earned_msat_ref; +} +uint64_t __attribute__((export_name("TS_LDKEvent_PaymentForwarded_get_skimmed_fee_msat"))) TS_LDKEvent_PaymentForwarded_get_skimmed_fee_msat(uint64_t ptr) { + LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); + assert(obj->tag == LDKEvent_PaymentForwarded); + uint64_t skimmed_fee_msat_ref = tag_ptr(&obj->payment_forwarded.skimmed_fee_msat, false); + return skimmed_fee_msat_ref; } jboolean __attribute__((export_name("TS_LDKEvent_PaymentForwarded_get_claim_from_onchain_tx"))) TS_LDKEvent_PaymentForwarded_get_claim_from_onchain_tx(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); @@ -10849,12 +11590,14 @@ uint64_t __attribute__((export_name("TS_LDKEvent_PaymentForwarded_get_outbound_a uint64_t outbound_amount_forwarded_msat_ref = tag_ptr(&obj->payment_forwarded.outbound_amount_forwarded_msat, false); return outbound_amount_forwarded_msat_ref; } -int8_tArray __attribute__((export_name("TS_LDKEvent_ChannelPending_get_channel_id"))) TS_LDKEvent_ChannelPending_get_channel_id(uint64_t ptr) { +uint64_t __attribute__((export_name("TS_LDKEvent_ChannelPending_get_channel_id"))) TS_LDKEvent_ChannelPending_get_channel_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); assert(obj->tag == LDKEvent_ChannelPending); - int8_tArray channel_id_arr = init_int8_tArray(32, __LINE__); - memcpy(channel_id_arr->elems, obj->channel_pending.channel_id.data, 32); - return channel_id_arr; + LDKChannelId channel_id_var = obj->channel_pending.channel_id; + uint64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; } int8_tArray __attribute__((export_name("TS_LDKEvent_ChannelPending_get_user_channel_id"))) TS_LDKEvent_ChannelPending_get_user_channel_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); @@ -10866,7 +11609,10 @@ int8_tArray __attribute__((export_name("TS_LDKEvent_ChannelPending_get_user_chan uint64_t __attribute__((export_name("TS_LDKEvent_ChannelPending_get_former_temporary_channel_id"))) TS_LDKEvent_ChannelPending_get_former_temporary_channel_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); assert(obj->tag == LDKEvent_ChannelPending); - uint64_t former_temporary_channel_id_ref = tag_ptr(&obj->channel_pending.former_temporary_channel_id, false); + LDKChannelId former_temporary_channel_id_var = obj->channel_pending.former_temporary_channel_id; + uint64_t former_temporary_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(former_temporary_channel_id_var); + former_temporary_channel_id_ref = tag_ptr(former_temporary_channel_id_var.inner, false); return former_temporary_channel_id_ref; } int8_tArray __attribute__((export_name("TS_LDKEvent_ChannelPending_get_counterparty_node_id"))) TS_LDKEvent_ChannelPending_get_counterparty_node_id(uint64_t ptr) { @@ -10885,12 +11631,23 @@ uint64_t __attribute__((export_name("TS_LDKEvent_ChannelPending_get_funding_txo" funding_txo_ref = tag_ptr(funding_txo_var.inner, false); return funding_txo_ref; } -int8_tArray __attribute__((export_name("TS_LDKEvent_ChannelReady_get_channel_id"))) TS_LDKEvent_ChannelReady_get_channel_id(uint64_t ptr) { +uint64_t __attribute__((export_name("TS_LDKEvent_ChannelPending_get_channel_type"))) TS_LDKEvent_ChannelPending_get_channel_type(uint64_t ptr) { + LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); + assert(obj->tag == LDKEvent_ChannelPending); + LDKChannelTypeFeatures channel_type_var = obj->channel_pending.channel_type; + uint64_t channel_type_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_var); + channel_type_ref = tag_ptr(channel_type_var.inner, false); + return channel_type_ref; +} +uint64_t __attribute__((export_name("TS_LDKEvent_ChannelReady_get_channel_id"))) TS_LDKEvent_ChannelReady_get_channel_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); assert(obj->tag == LDKEvent_ChannelReady); - int8_tArray channel_id_arr = init_int8_tArray(32, __LINE__); - memcpy(channel_id_arr->elems, obj->channel_ready.channel_id.data, 32); - return channel_id_arr; + LDKChannelId channel_id_var = obj->channel_ready.channel_id; + uint64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; } int8_tArray __attribute__((export_name("TS_LDKEvent_ChannelReady_get_user_channel_id"))) TS_LDKEvent_ChannelReady_get_user_channel_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); @@ -10915,12 +11672,14 @@ uint64_t __attribute__((export_name("TS_LDKEvent_ChannelReady_get_channel_type") channel_type_ref = tag_ptr(channel_type_var.inner, false); return channel_type_ref; } -int8_tArray __attribute__((export_name("TS_LDKEvent_ChannelClosed_get_channel_id"))) TS_LDKEvent_ChannelClosed_get_channel_id(uint64_t ptr) { +uint64_t __attribute__((export_name("TS_LDKEvent_ChannelClosed_get_channel_id"))) TS_LDKEvent_ChannelClosed_get_channel_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); assert(obj->tag == LDKEvent_ChannelClosed); - int8_tArray channel_id_arr = init_int8_tArray(32, __LINE__); - memcpy(channel_id_arr->elems, obj->channel_closed.channel_id.data, 32); - return channel_id_arr; + LDKChannelId channel_id_var = obj->channel_closed.channel_id; + uint64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; } int8_tArray __attribute__((export_name("TS_LDKEvent_ChannelClosed_get_user_channel_id"))) TS_LDKEvent_ChannelClosed_get_user_channel_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); @@ -10957,12 +11716,14 @@ uint64_t __attribute__((export_name("TS_LDKEvent_ChannelClosed_get_channel_fundi channel_funding_txo_ref = tag_ptr(channel_funding_txo_var.inner, false); return channel_funding_txo_ref; } -int8_tArray __attribute__((export_name("TS_LDKEvent_DiscardFunding_get_channel_id"))) TS_LDKEvent_DiscardFunding_get_channel_id(uint64_t ptr) { +uint64_t __attribute__((export_name("TS_LDKEvent_DiscardFunding_get_channel_id"))) TS_LDKEvent_DiscardFunding_get_channel_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); assert(obj->tag == LDKEvent_DiscardFunding); - int8_tArray channel_id_arr = init_int8_tArray(32, __LINE__); - memcpy(channel_id_arr->elems, obj->discard_funding.channel_id.data, 32); - return channel_id_arr; + LDKChannelId channel_id_var = obj->discard_funding.channel_id; + uint64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; } int8_tArray __attribute__((export_name("TS_LDKEvent_DiscardFunding_get_transaction"))) TS_LDKEvent_DiscardFunding_get_transaction(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); @@ -10972,12 +11733,14 @@ int8_tArray __attribute__((export_name("TS_LDKEvent_DiscardFunding_get_transacti memcpy(transaction_arr->elems, transaction_var.data, transaction_var.datalen); return transaction_arr; } -int8_tArray __attribute__((export_name("TS_LDKEvent_OpenChannelRequest_get_temporary_channel_id"))) TS_LDKEvent_OpenChannelRequest_get_temporary_channel_id(uint64_t ptr) { +uint64_t __attribute__((export_name("TS_LDKEvent_OpenChannelRequest_get_temporary_channel_id"))) TS_LDKEvent_OpenChannelRequest_get_temporary_channel_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); assert(obj->tag == LDKEvent_OpenChannelRequest); - int8_tArray temporary_channel_id_arr = init_int8_tArray(32, __LINE__); - memcpy(temporary_channel_id_arr->elems, obj->open_channel_request.temporary_channel_id.data, 32); - return temporary_channel_id_arr; + LDKChannelId temporary_channel_id_var = obj->open_channel_request.temporary_channel_id; + uint64_t temporary_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_var); + temporary_channel_id_ref = tag_ptr(temporary_channel_id_var.inner, false); + return temporary_channel_id_ref; } int8_tArray __attribute__((export_name("TS_LDKEvent_OpenChannelRequest_get_counterparty_node_id"))) TS_LDKEvent_OpenChannelRequest_get_counterparty_node_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); @@ -11007,12 +11770,14 @@ uint64_t __attribute__((export_name("TS_LDKEvent_OpenChannelRequest_get_channel_ channel_type_ref = tag_ptr(channel_type_var.inner, false); return channel_type_ref; } -int8_tArray __attribute__((export_name("TS_LDKEvent_HTLCHandlingFailed_get_prev_channel_id"))) TS_LDKEvent_HTLCHandlingFailed_get_prev_channel_id(uint64_t ptr) { +uint64_t __attribute__((export_name("TS_LDKEvent_HTLCHandlingFailed_get_prev_channel_id"))) TS_LDKEvent_HTLCHandlingFailed_get_prev_channel_id(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); assert(obj->tag == LDKEvent_HTLCHandlingFailed); - int8_tArray prev_channel_id_arr = init_int8_tArray(32, __LINE__); - memcpy(prev_channel_id_arr->elems, obj->htlc_handling_failed.prev_channel_id.data, 32); - return prev_channel_id_arr; + LDKChannelId prev_channel_id_var = obj->htlc_handling_failed.prev_channel_id; + uint64_t prev_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_var); + prev_channel_id_ref = tag_ptr(prev_channel_id_var.inner, false); + return prev_channel_id_ref; } uint64_t __attribute__((export_name("TS_LDKEvent_HTLCHandlingFailed_get_failed_next_destination"))) TS_LDKEvent_HTLCHandlingFailed_get_failed_next_destination(uint64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); @@ -11550,6 +12315,32 @@ uint64_t __attribute__((export_name("TS_CResult_UntrustedStringDecodeErrorZ_get return ret_ref; } +static inline struct LDKChannelId CResult_ChannelIdDecodeErrorZ_get_ok(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR owner){ + LDKChannelId ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_ChannelIdDecodeErrorZ_get_ok"))) TS_CResult_ChannelIdDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_ChannelIdDecodeErrorZ* owner_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(owner); + LDKChannelId ret_var = CResult_ChannelIdDecodeErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_ChannelIdDecodeErrorZ_get_err(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +uint64_t __attribute__((export_name("TS_CResult_ChannelIdDecodeErrorZ_get_err"))) TS_CResult_ChannelIdDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_ChannelIdDecodeErrorZ* owner_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_ChannelIdDecodeErrorZ_get_err(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + static inline struct LDKThirtyTwoBytes C2Tuple__u832u16Z_get_a(LDKC2Tuple__u832u16Z *NONNULL_PTR owner){ return ThirtyTwoBytes_clone(&owner->a); } @@ -11621,6 +12412,129 @@ uint64_t __attribute__((export_name("TS_CResult_PaymentConstraintsDecodeErrorZ_ return ret_ref; } +static inline struct LDKPaymentContext CResult_PaymentContextDecodeErrorZ_get_ok(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return PaymentContext_clone(&*owner->contents.result); +} +uint64_t __attribute__((export_name("TS_CResult_PaymentContextDecodeErrorZ_get_ok"))) TS_CResult_PaymentContextDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_PaymentContextDecodeErrorZ* owner_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(owner); + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = CResult_PaymentContextDecodeErrorZ_get_ok(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_PaymentContextDecodeErrorZ_get_err(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +uint64_t __attribute__((export_name("TS_CResult_PaymentContextDecodeErrorZ_get_err"))) TS_CResult_PaymentContextDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_PaymentContextDecodeErrorZ* owner_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_PaymentContextDecodeErrorZ_get_err(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKUnknownPaymentContext CResult_UnknownPaymentContextDecodeErrorZ_get_ok(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR owner){ + LDKUnknownPaymentContext ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_UnknownPaymentContextDecodeErrorZ_get_ok"))) TS_CResult_UnknownPaymentContextDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* owner_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(owner); + LDKUnknownPaymentContext ret_var = CResult_UnknownPaymentContextDecodeErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_UnknownPaymentContextDecodeErrorZ_get_err(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +uint64_t __attribute__((export_name("TS_CResult_UnknownPaymentContextDecodeErrorZ_get_err"))) TS_CResult_UnknownPaymentContextDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* owner_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_UnknownPaymentContextDecodeErrorZ_get_err(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKBolt12OfferContext CResult_Bolt12OfferContextDecodeErrorZ_get_ok(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR owner){ + LDKBolt12OfferContext ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_Bolt12OfferContextDecodeErrorZ_get_ok"))) TS_CResult_Bolt12OfferContextDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(owner); + LDKBolt12OfferContext ret_var = CResult_Bolt12OfferContextDecodeErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_Bolt12OfferContextDecodeErrorZ_get_err(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +uint64_t __attribute__((export_name("TS_CResult_Bolt12OfferContextDecodeErrorZ_get_err"))) TS_CResult_Bolt12OfferContextDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_Bolt12OfferContextDecodeErrorZ_get_err(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKBolt12RefundContext CResult_Bolt12RefundContextDecodeErrorZ_get_ok(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR owner){ + LDKBolt12RefundContext ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_Bolt12RefundContextDecodeErrorZ_get_ok"))) TS_CResult_Bolt12RefundContextDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(owner); + LDKBolt12RefundContext ret_var = CResult_Bolt12RefundContextDecodeErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_Bolt12RefundContextDecodeErrorZ_get_err(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +uint64_t __attribute__((export_name("TS_CResult_Bolt12RefundContextDecodeErrorZ_get_err"))) TS_CResult_Bolt12RefundContextDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_Bolt12RefundContextDecodeErrorZ_get_err(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKStr CResult_StrSecp256k1ErrorZ_get_ok(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return *owner->contents.result; +} +jstring __attribute__((export_name("TS_CResult_StrSecp256k1ErrorZ_get_ok"))) TS_CResult_StrSecp256k1ErrorZ_get_ok(uint64_t owner) { + LDKCResult_StrSecp256k1ErrorZ* owner_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(owner); + LDKStr ret_str = CResult_StrSecp256k1ErrorZ_get_ok(owner_conv); + jstring ret_conv = str_ref_to_ts(ret_str.chars, ret_str.len); + return ret_conv; +} + +static inline enum LDKSecp256k1Error CResult_StrSecp256k1ErrorZ_get_err(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return *owner->contents.err; +} +uint32_t __attribute__((export_name("TS_CResult_StrSecp256k1ErrorZ_get_err"))) TS_CResult_StrSecp256k1ErrorZ_get_err(uint64_t owner) { + LDKCResult_StrSecp256k1ErrorZ* owner_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(owner); + uint32_t ret_conv = LDKSecp256k1Error_to_js(CResult_StrSecp256k1ErrorZ_get_err(owner_conv)); + return ret_conv; +} + static inline struct LDKThirtyTwoBytes C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){ return ThirtyTwoBytes_clone(&owner->a); } @@ -11679,27 +12593,6 @@ void __attribute__((export_name("TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnio CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(owner_conv); } -static inline struct LDKStr CResult_StrSecp256k1ErrorZ_get_ok(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner){ -CHECK(owner->result_ok); - return *owner->contents.result; -} -jstring __attribute__((export_name("TS_CResult_StrSecp256k1ErrorZ_get_ok"))) TS_CResult_StrSecp256k1ErrorZ_get_ok(uint64_t owner) { - LDKCResult_StrSecp256k1ErrorZ* owner_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(owner); - LDKStr ret_str = CResult_StrSecp256k1ErrorZ_get_ok(owner_conv); - jstring ret_conv = str_ref_to_ts(ret_str.chars, ret_str.len); - return ret_conv; -} - -static inline enum LDKSecp256k1Error CResult_StrSecp256k1ErrorZ_get_err(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return *owner->contents.err; -} -uint32_t __attribute__((export_name("TS_CResult_StrSecp256k1ErrorZ_get_err"))) TS_CResult_StrSecp256k1ErrorZ_get_err(uint64_t owner) { - LDKCResult_StrSecp256k1ErrorZ* owner_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(owner); - uint32_t ret_conv = LDKSecp256k1Error_to_js(CResult_StrSecp256k1ErrorZ_get_err(owner_conv)); - return ret_conv; -} - static inline struct LDKPublicKey C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_a(LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ *NONNULL_PTR owner){ return owner->a; } @@ -11746,7 +12639,8 @@ uint32_t __attribute__((export_name("TS_LDKSendError_ty_from_ptr"))) TS_LDKSendE case LDKSendError_InvalidMessage: return 5; case LDKSendError_BufferFull: return 6; case LDKSendError_GetNodeIdFailed: return 7; - case LDKSendError_BlindedPathAdvanceFailed: return 8; + case LDKSendError_UnresolvedIntroductionNode: return 8; + case LDKSendError_BlindedPathAdvanceFailed: return 9; default: abort(); } } @@ -11786,6 +12680,27 @@ uint64_t __attribute__((export_name("TS_CResult_C3Tuple_PublicKeyOnionMessageCO return ret_ref; } +uint32_t __attribute__((export_name("TS_LDKNextMessageHop_ty_from_ptr"))) TS_LDKNextMessageHop_ty_from_ptr(uint64_t ptr) { + LDKNextMessageHop *obj = (LDKNextMessageHop*)untag_ptr(ptr); + switch(obj->tag) { + case LDKNextMessageHop_NodeId: return 0; + case LDKNextMessageHop_ShortChannelId: return 1; + default: abort(); + } +} +int8_tArray __attribute__((export_name("TS_LDKNextMessageHop_NodeId_get_node_id"))) TS_LDKNextMessageHop_NodeId_get_node_id(uint64_t ptr) { + LDKNextMessageHop *obj = (LDKNextMessageHop*)untag_ptr(ptr); + assert(obj->tag == LDKNextMessageHop_NodeId); + int8_tArray node_id_arr = init_int8_tArray(33, __LINE__); + memcpy(node_id_arr->elems, obj->node_id.compressed_form, 33); + return node_id_arr; +} +int64_t __attribute__((export_name("TS_LDKNextMessageHop_ShortChannelId_get_short_channel_id"))) TS_LDKNextMessageHop_ShortChannelId_get_short_channel_id(uint64_t ptr) { + LDKNextMessageHop *obj = (LDKNextMessageHop*)untag_ptr(ptr); + assert(obj->tag == LDKNextMessageHop_ShortChannelId); + int64_t short_channel_id_conv = obj->short_channel_id; + return short_channel_id_conv; +} uint32_t __attribute__((export_name("TS_LDKParsedOnionMessageContents_ty_from_ptr"))) TS_LDKParsedOnionMessageContents_ty_from_ptr(uint64_t ptr) { LDKParsedOnionMessageContents *obj = (LDKParsedOnionMessageContents*)untag_ptr(ptr); switch(obj->tag) { @@ -11815,12 +12730,11 @@ uint32_t __attribute__((export_name("TS_LDKPeeledOnion_ty_from_ptr"))) TS_LDKPee default: abort(); } } -int8_tArray __attribute__((export_name("TS_LDKPeeledOnion_Forward_get__0"))) TS_LDKPeeledOnion_Forward_get__0(uint64_t ptr) { +uint64_t __attribute__((export_name("TS_LDKPeeledOnion_Forward_get__0"))) TS_LDKPeeledOnion_Forward_get__0(uint64_t ptr) { LDKPeeledOnion *obj = (LDKPeeledOnion*)untag_ptr(ptr); assert(obj->tag == LDKPeeledOnion_Forward); - int8_tArray _0_arr = init_int8_tArray(33, __LINE__); - memcpy(_0_arr->elems, obj->forward._0.compressed_form, 33); - return _0_arr; + uint64_t _0_ref = tag_ptr(&obj->forward._0, false); + return _0_ref; } uint64_t __attribute__((export_name("TS_LDKPeeledOnion_Forward_get__1"))) TS_LDKPeeledOnion_Forward_get__1(uint64_t ptr) { LDKPeeledOnion *obj = (LDKPeeledOnion*)untag_ptr(ptr); @@ -12041,158 +12955,122 @@ uint64_t __attribute__((export_name("TS_CResult_InvoiceErrorDecodeErrorZ_get_er return ret_ref; } -static inline struct LDKDelayedPaymentBasepoint CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){ - LDKDelayedPaymentBasepoint ret = *owner->contents.result; +static inline struct LDKTrackedSpendableOutput CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR owner){ + LDKTrackedSpendableOutput ret = *owner->contents.result; ret.is_owned = false; return ret; } -uint64_t __attribute__((export_name("TS_CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok"))) TS_CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(uint64_t owner) { - LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner); - LDKDelayedPaymentBasepoint ret_var = CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(owner_conv); +uint64_t __attribute__((export_name("TS_CResult_TrackedSpendableOutputDecodeErrorZ_get_ok"))) TS_CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* owner_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(owner); + LDKTrackedSpendableOutput ret_var = CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(owner_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -static inline struct LDKDecodeError CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){ +static inline struct LDKDecodeError CResult_TrackedSpendableOutputDecodeErrorZ_get_err(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR owner){ CHECK(!owner->result_ok); return DecodeError_clone(&*owner->contents.err); } -uint64_t __attribute__((export_name("TS_CResult_DelayedPaymentBasepointDecodeErrorZ_get_err"))) TS_CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(uint64_t owner) { - LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner); +uint64_t __attribute__((export_name("TS_CResult_TrackedSpendableOutputDecodeErrorZ_get_err"))) TS_CResult_TrackedSpendableOutputDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* owner_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(owner); LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(owner_conv); + *ret_copy = CResult_TrackedSpendableOutputDecodeErrorZ_get_err(owner_conv); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -static inline struct LDKDelayedPaymentKey CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){ - LDKDelayedPaymentKey ret = *owner->contents.result; - ret.is_owned = false; - return ret; -} -uint64_t __attribute__((export_name("TS_CResult_DelayedPaymentKeyDecodeErrorZ_get_ok"))) TS_CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(uint64_t owner) { - LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner); - LDKDelayedPaymentKey ret_var = CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(owner_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -static inline struct LDKDecodeError CResult_DelayedPaymentKeyDecodeErrorZ_get_err(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return DecodeError_clone(&*owner->contents.err); -} -uint64_t __attribute__((export_name("TS_CResult_DelayedPaymentKeyDecodeErrorZ_get_err"))) TS_CResult_DelayedPaymentKeyDecodeErrorZ_get_err(uint64_t owner) { - LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner); - LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_DelayedPaymentKeyDecodeErrorZ_get_err(owner_conv); - uint64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -static inline struct LDKHtlcBasepoint CResult_HtlcBasepointDecodeErrorZ_get_ok(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){ - LDKHtlcBasepoint ret = *owner->contents.result; - ret.is_owned = false; - return ret; -} -uint64_t __attribute__((export_name("TS_CResult_HtlcBasepointDecodeErrorZ_get_ok"))) TS_CResult_HtlcBasepointDecodeErrorZ_get_ok(uint64_t owner) { - LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner); - LDKHtlcBasepoint ret_var = CResult_HtlcBasepointDecodeErrorZ_get_ok(owner_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -static inline struct LDKDecodeError CResult_HtlcBasepointDecodeErrorZ_get_err(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return DecodeError_clone(&*owner->contents.err); -} -uint64_t __attribute__((export_name("TS_CResult_HtlcBasepointDecodeErrorZ_get_err"))) TS_CResult_HtlcBasepointDecodeErrorZ_get_err(uint64_t owner) { - LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner); - LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_HtlcBasepointDecodeErrorZ_get_err(owner_conv); - uint64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -static inline struct LDKHtlcKey CResult_HtlcKeyDecodeErrorZ_get_ok(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){ - LDKHtlcKey ret = *owner->contents.result; - ret.is_owned = false; - return ret; -} -uint64_t __attribute__((export_name("TS_CResult_HtlcKeyDecodeErrorZ_get_ok"))) TS_CResult_HtlcKeyDecodeErrorZ_get_ok(uint64_t owner) { - LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner); - LDKHtlcKey ret_var = CResult_HtlcKeyDecodeErrorZ_get_ok(owner_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -static inline struct LDKDecodeError CResult_HtlcKeyDecodeErrorZ_get_err(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return DecodeError_clone(&*owner->contents.err); -} -uint64_t __attribute__((export_name("TS_CResult_HtlcKeyDecodeErrorZ_get_err"))) TS_CResult_HtlcKeyDecodeErrorZ_get_err(uint64_t owner) { - LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner); - LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_HtlcKeyDecodeErrorZ_get_err(owner_conv); - uint64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; +uint32_t __attribute__((export_name("TS_LDKOutputSpendStatus_ty_from_ptr"))) TS_LDKOutputSpendStatus_ty_from_ptr(uint64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + switch(obj->tag) { + case LDKOutputSpendStatus_PendingInitialBroadcast: return 0; + case LDKOutputSpendStatus_PendingFirstConfirmation: return 1; + case LDKOutputSpendStatus_PendingThresholdConfirmations: return 2; + default: abort(); + } } - -static inline struct LDKRevocationBasepoint CResult_RevocationBasepointDecodeErrorZ_get_ok(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){ - LDKRevocationBasepoint ret = *owner->contents.result; - ret.is_owned = false; - return ret; +uint64_t __attribute__((export_name("TS_LDKOutputSpendStatus_PendingInitialBroadcast_get_delayed_until_height"))) TS_LDKOutputSpendStatus_PendingInitialBroadcast_get_delayed_until_height(uint64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + assert(obj->tag == LDKOutputSpendStatus_PendingInitialBroadcast); + uint64_t delayed_until_height_ref = tag_ptr(&obj->pending_initial_broadcast.delayed_until_height, false); + return delayed_until_height_ref; +} +int8_tArray __attribute__((export_name("TS_LDKOutputSpendStatus_PendingFirstConfirmation_get_first_broadcast_hash"))) TS_LDKOutputSpendStatus_PendingFirstConfirmation_get_first_broadcast_hash(uint64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + assert(obj->tag == LDKOutputSpendStatus_PendingFirstConfirmation); + int8_tArray first_broadcast_hash_arr = init_int8_tArray(32, __LINE__); + memcpy(first_broadcast_hash_arr->elems, obj->pending_first_confirmation.first_broadcast_hash.data, 32); + return first_broadcast_hash_arr; +} +int32_t __attribute__((export_name("TS_LDKOutputSpendStatus_PendingFirstConfirmation_get_latest_broadcast_height"))) TS_LDKOutputSpendStatus_PendingFirstConfirmation_get_latest_broadcast_height(uint64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + assert(obj->tag == LDKOutputSpendStatus_PendingFirstConfirmation); + int32_t latest_broadcast_height_conv = obj->pending_first_confirmation.latest_broadcast_height; + return latest_broadcast_height_conv; +} +int8_tArray __attribute__((export_name("TS_LDKOutputSpendStatus_PendingFirstConfirmation_get_latest_spending_tx"))) TS_LDKOutputSpendStatus_PendingFirstConfirmation_get_latest_spending_tx(uint64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + assert(obj->tag == LDKOutputSpendStatus_PendingFirstConfirmation); + LDKTransaction latest_spending_tx_var = obj->pending_first_confirmation.latest_spending_tx; + int8_tArray latest_spending_tx_arr = init_int8_tArray(latest_spending_tx_var.datalen, __LINE__); + memcpy(latest_spending_tx_arr->elems, latest_spending_tx_var.data, latest_spending_tx_var.datalen); + return latest_spending_tx_arr; +} +int8_tArray __attribute__((export_name("TS_LDKOutputSpendStatus_PendingThresholdConfirmations_get_first_broadcast_hash"))) TS_LDKOutputSpendStatus_PendingThresholdConfirmations_get_first_broadcast_hash(uint64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + assert(obj->tag == LDKOutputSpendStatus_PendingThresholdConfirmations); + int8_tArray first_broadcast_hash_arr = init_int8_tArray(32, __LINE__); + memcpy(first_broadcast_hash_arr->elems, obj->pending_threshold_confirmations.first_broadcast_hash.data, 32); + return first_broadcast_hash_arr; +} +int32_t __attribute__((export_name("TS_LDKOutputSpendStatus_PendingThresholdConfirmations_get_latest_broadcast_height"))) TS_LDKOutputSpendStatus_PendingThresholdConfirmations_get_latest_broadcast_height(uint64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + assert(obj->tag == LDKOutputSpendStatus_PendingThresholdConfirmations); + int32_t latest_broadcast_height_conv = obj->pending_threshold_confirmations.latest_broadcast_height; + return latest_broadcast_height_conv; +} +int8_tArray __attribute__((export_name("TS_LDKOutputSpendStatus_PendingThresholdConfirmations_get_latest_spending_tx"))) TS_LDKOutputSpendStatus_PendingThresholdConfirmations_get_latest_spending_tx(uint64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + assert(obj->tag == LDKOutputSpendStatus_PendingThresholdConfirmations); + LDKTransaction latest_spending_tx_var = obj->pending_threshold_confirmations.latest_spending_tx; + int8_tArray latest_spending_tx_arr = init_int8_tArray(latest_spending_tx_var.datalen, __LINE__); + memcpy(latest_spending_tx_arr->elems, latest_spending_tx_var.data, latest_spending_tx_var.datalen); + return latest_spending_tx_arr; +} +int32_t __attribute__((export_name("TS_LDKOutputSpendStatus_PendingThresholdConfirmations_get_confirmation_height"))) TS_LDKOutputSpendStatus_PendingThresholdConfirmations_get_confirmation_height(uint64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + assert(obj->tag == LDKOutputSpendStatus_PendingThresholdConfirmations); + int32_t confirmation_height_conv = obj->pending_threshold_confirmations.confirmation_height; + return confirmation_height_conv; } -uint64_t __attribute__((export_name("TS_CResult_RevocationBasepointDecodeErrorZ_get_ok"))) TS_CResult_RevocationBasepointDecodeErrorZ_get_ok(uint64_t owner) { - LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner); - LDKRevocationBasepoint ret_var = CResult_RevocationBasepointDecodeErrorZ_get_ok(owner_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; +int8_tArray __attribute__((export_name("TS_LDKOutputSpendStatus_PendingThresholdConfirmations_get_confirmation_hash"))) TS_LDKOutputSpendStatus_PendingThresholdConfirmations_get_confirmation_hash(uint64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + assert(obj->tag == LDKOutputSpendStatus_PendingThresholdConfirmations); + int8_tArray confirmation_hash_arr = init_int8_tArray(32, __LINE__); + memcpy(confirmation_hash_arr->elems, obj->pending_threshold_confirmations.confirmation_hash.data, 32); + return confirmation_hash_arr; } - -static inline struct LDKDecodeError CResult_RevocationBasepointDecodeErrorZ_get_err(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return DecodeError_clone(&*owner->contents.err); +static inline struct LDKOutputSpendStatus CResult_OutputSpendStatusDecodeErrorZ_get_ok(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return OutputSpendStatus_clone(&*owner->contents.result); } -uint64_t __attribute__((export_name("TS_CResult_RevocationBasepointDecodeErrorZ_get_err"))) TS_CResult_RevocationBasepointDecodeErrorZ_get_err(uint64_t owner) { - LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner); - LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_RevocationBasepointDecodeErrorZ_get_err(owner_conv); +uint64_t __attribute__((export_name("TS_CResult_OutputSpendStatusDecodeErrorZ_get_ok"))) TS_CResult_OutputSpendStatusDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_OutputSpendStatusDecodeErrorZ* owner_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(owner); + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = CResult_OutputSpendStatusDecodeErrorZ_get_ok(owner_conv); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -static inline struct LDKRevocationKey CResult_RevocationKeyDecodeErrorZ_get_ok(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){ - LDKRevocationKey ret = *owner->contents.result; - ret.is_owned = false; - return ret; -} -uint64_t __attribute__((export_name("TS_CResult_RevocationKeyDecodeErrorZ_get_ok"))) TS_CResult_RevocationKeyDecodeErrorZ_get_ok(uint64_t owner) { - LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner); - LDKRevocationKey ret_var = CResult_RevocationKeyDecodeErrorZ_get_ok(owner_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -static inline struct LDKDecodeError CResult_RevocationKeyDecodeErrorZ_get_err(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){ +static inline struct LDKDecodeError CResult_OutputSpendStatusDecodeErrorZ_get_err(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR owner){ CHECK(!owner->result_ok); return DecodeError_clone(&*owner->contents.err); } -uint64_t __attribute__((export_name("TS_CResult_RevocationKeyDecodeErrorZ_get_err"))) TS_CResult_RevocationKeyDecodeErrorZ_get_err(uint64_t owner) { - LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner); +uint64_t __attribute__((export_name("TS_CResult_OutputSpendStatusDecodeErrorZ_get_err"))) TS_CResult_OutputSpendStatusDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_OutputSpendStatusDecodeErrorZ* owner_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(owner); LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_RevocationKeyDecodeErrorZ_get_err(owner_conv); + *ret_copy = CResult_OutputSpendStatusDecodeErrorZ_get_err(owner_conv); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -12293,85 +13171,62 @@ uint64_t __attribute__((export_name("TS_LDKCOption_FilterZ_Some_get_some"))) TS_ } return tag_ptr(some_ret, true); } -static inline struct LDKLockedChannelMonitor CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){ - LDKLockedChannelMonitor ret = *owner->contents.result; - ret.is_owned = false; - return ret; -} -uint64_t __attribute__((export_name("TS_CResult_LockedChannelMonitorNoneZ_get_ok"))) TS_CResult_LockedChannelMonitorNoneZ_get_ok(uint64_t owner) { - LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner); - LDKLockedChannelMonitor ret_var = CResult_LockedChannelMonitorNoneZ_get_ok(owner_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -static inline void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return *owner->contents.err; -} -void __attribute__((export_name("TS_CResult_LockedChannelMonitorNoneZ_get_err"))) TS_CResult_LockedChannelMonitorNoneZ_get_err(uint64_t owner) { - LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner); - CResult_LockedChannelMonitorNoneZ_get_err(owner_conv); -} - -static inline LDKCVec_OutPointZ CVec_OutPointZ_clone(const LDKCVec_OutPointZ *orig) { - LDKCVec_OutPointZ ret = { .data = MALLOC(sizeof(LDKOutPoint) * orig->datalen, "LDKCVec_OutPointZ clone bytes"), .datalen = orig->datalen }; +static inline LDKCVec_TrackedSpendableOutputZ CVec_TrackedSpendableOutputZ_clone(const LDKCVec_TrackedSpendableOutputZ *orig) { + LDKCVec_TrackedSpendableOutputZ ret = { .data = MALLOC(sizeof(LDKTrackedSpendableOutput) * orig->datalen, "LDKCVec_TrackedSpendableOutputZ clone bytes"), .datalen = orig->datalen }; for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = OutPoint_clone(&orig->data[i]); + ret.data[i] = TrackedSpendableOutput_clone(&orig->data[i]); } return ret; } -static inline LDKCVec_MonitorUpdateIdZ CVec_MonitorUpdateIdZ_clone(const LDKCVec_MonitorUpdateIdZ *orig) { - LDKCVec_MonitorUpdateIdZ ret = { .data = MALLOC(sizeof(LDKMonitorUpdateId) * orig->datalen, "LDKCVec_MonitorUpdateIdZ clone bytes"), .datalen = orig->datalen }; - for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = MonitorUpdateId_clone(&orig->data[i]); +typedef struct LDKChangeDestinationSource_JCalls { + atomic_size_t refcnt; + uint32_t instance_ptr; +} LDKChangeDestinationSource_JCalls; +static void LDKChangeDestinationSource_JCalls_free(void* this_arg) { + LDKChangeDestinationSource_JCalls *j_calls = (LDKChangeDestinationSource_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + FREE(j_calls); } - return ret; } -static inline struct LDKOutPoint C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){ - LDKOutPoint ret = owner->a; - ret.is_owned = false; - return ret; +LDKCResult_CVec_u8ZNoneZ get_change_destination_script_LDKChangeDestinationSource_jcall(const void* this_arg) { + LDKChangeDestinationSource_JCalls *j_calls = (LDKChangeDestinationSource_JCalls*) this_arg; + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 49, 0, 0, 0, 0, 0, 0); + void* ret_ptr = untag_ptr(ret); + CHECK_ACCESS(ret_ptr); + LDKCResult_CVec_u8ZNoneZ ret_conv = *(LDKCResult_CVec_u8ZNoneZ*)(ret_ptr); + FREE(untag_ptr(ret)); + return ret_conv; } -uint64_t __attribute__((export_name("TS_C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a"))) TS_C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(uint64_t owner) { - LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner); - LDKOutPoint ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(owner_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; +static void LDKChangeDestinationSource_JCalls_cloned(LDKChangeDestinationSource* new_obj) { + LDKChangeDestinationSource_JCalls *j_calls = (LDKChangeDestinationSource_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); } +static inline LDKChangeDestinationSource LDKChangeDestinationSource_init (JSValue o) { + LDKChangeDestinationSource_JCalls *calls = MALLOC(sizeof(LDKChangeDestinationSource_JCalls), "LDKChangeDestinationSource_JCalls"); + atomic_init(&calls->refcnt, 1); + calls->instance_ptr = o; -static inline struct LDKCVec_MonitorUpdateIdZ C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){ - return CVec_MonitorUpdateIdZ_clone(&owner->b); + LDKChangeDestinationSource ret = { + .this_arg = (void*) calls, + .get_change_destination_script = get_change_destination_script_LDKChangeDestinationSource_jcall, + .free = LDKChangeDestinationSource_JCalls_free, + }; + return ret; } -uint64_tArray __attribute__((export_name("TS_C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b"))) TS_C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(uint64_t owner) { - LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner); - LDKCVec_MonitorUpdateIdZ ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(owner_conv); - uint64_tArray ret_arr = NULL; - ret_arr = init_uint64_tArray(ret_var.datalen, __LINE__); - uint64_t *ret_arr_ptr = (uint64_t*)(((uint8_t*)ret_arr) + 8); - for (size_t r = 0; r < ret_var.datalen; r++) { - LDKMonitorUpdateId ret_conv_17_var = ret_var.data[r]; - uint64_t ret_conv_17_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_17_var); - ret_conv_17_ref = tag_ptr(ret_conv_17_var.inner, ret_conv_17_var.is_owned); - ret_arr_ptr[r] = ret_conv_17_ref; - } - - FREE(ret_var.data); - return ret_arr; +uint64_t __attribute__((export_name("TS_LDKChangeDestinationSource_new"))) TS_LDKChangeDestinationSource_new(JSValue o) { + LDKChangeDestinationSource *res_ptr = MALLOC(sizeof(LDKChangeDestinationSource), "LDKChangeDestinationSource"); + *res_ptr = LDKChangeDestinationSource_init(o); + return tag_ptr(res_ptr, true); } - -static inline LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ CVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ_clone(const LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ *orig) { - LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ) * orig->datalen, "LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ clone bytes"), .datalen = orig->datalen }; - for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_clone(&orig->data[i]); - } - return ret; +uint64_t __attribute__((export_name("TS_ChangeDestinationSource_get_change_destination_script"))) TS_ChangeDestinationSource_get_change_destination_script(uint64_t this_arg) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKChangeDestinationSource* this_arg_conv = (LDKChangeDestinationSource*)this_arg_ptr; + LDKCResult_CVec_u8ZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_u8ZNoneZ), "LDKCResult_CVec_u8ZNoneZ"); + *ret_conv = (this_arg_conv->get_change_destination_script)(this_arg_conv->this_arg); + return tag_ptr(ret_conv, true); } + typedef struct LDKKVStore_JCalls { atomic_size_t refcnt; uint32_t instance_ptr; @@ -12393,7 +13248,7 @@ LDKCResult_CVec_u8ZIOErrorZ read_LDKKVStore_jcall(const void* this_arg, LDKStr p LDKStr key_str = key; jstring key_conv = str_ref_to_ts(key_str.chars, key_str.len); Str_free(key_str); - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 49, primary_namespace_conv, secondary_namespace_conv, key_conv, 0, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 50, primary_namespace_conv, secondary_namespace_conv, key_conv, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_CVec_u8ZIOErrorZ ret_conv = *(LDKCResult_CVec_u8ZIOErrorZ*)(ret_ptr); @@ -12414,7 +13269,7 @@ LDKCResult_NoneIOErrorZ write_LDKKVStore_jcall(const void* this_arg, LDKStr prim LDKu8slice buf_var = buf; int8_tArray buf_arr = init_int8_tArray(buf_var.datalen, __LINE__); memcpy(buf_arr->elems, buf_var.data, buf_var.datalen); - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 50, primary_namespace_conv, secondary_namespace_conv, key_conv, (uint32_t)buf_arr, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 51, primary_namespace_conv, secondary_namespace_conv, key_conv, (uint32_t)buf_arr, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr); @@ -12433,7 +13288,7 @@ LDKCResult_NoneIOErrorZ remove_LDKKVStore_jcall(const void* this_arg, LDKStr pri jstring key_conv = str_ref_to_ts(key_str.chars, key_str.len); Str_free(key_str); jboolean lazy_conv = lazy; - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 51, primary_namespace_conv, secondary_namespace_conv, key_conv, lazy_conv, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 52, primary_namespace_conv, secondary_namespace_conv, key_conv, lazy_conv, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr); @@ -12448,7 +13303,7 @@ LDKCResult_CVec_StrZIOErrorZ list_LDKKVStore_jcall(const void* this_arg, LDKStr LDKStr secondary_namespace_str = secondary_namespace; jstring secondary_namespace_conv = str_ref_to_ts(secondary_namespace_str.chars, secondary_namespace_str.len); Str_free(secondary_namespace_str); - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 52, primary_namespace_conv, secondary_namespace_conv, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 53, primary_namespace_conv, secondary_namespace_conv, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_CVec_StrZIOErrorZ ret_conv = *(LDKCResult_CVec_StrZIOErrorZ*)(ret_ptr); @@ -12530,6 +13385,465 @@ uint64_t __attribute__((export_name("TS_KVStore_list"))) TS_KVStore_list(uint64 return tag_ptr(ret_conv, true); } +typedef struct LDKOutputSpender_JCalls { + atomic_size_t refcnt; + uint32_t instance_ptr; +} LDKOutputSpender_JCalls; +static void LDKOutputSpender_JCalls_free(void* this_arg) { + LDKOutputSpender_JCalls *j_calls = (LDKOutputSpender_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + FREE(j_calls); + } +} +LDKCResult_TransactionNoneZ spend_spendable_outputs_LDKOutputSpender_jcall(const void* this_arg, LDKCVec_SpendableOutputDescriptorZ descriptors, LDKCVec_TxOutZ outputs, LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight, LDKCOption_u32Z locktime) { + LDKOutputSpender_JCalls *j_calls = (LDKOutputSpender_JCalls*) this_arg; + LDKCVec_SpendableOutputDescriptorZ descriptors_var = descriptors; + uint64_tArray descriptors_arr = NULL; + descriptors_arr = init_uint64_tArray(descriptors_var.datalen, __LINE__); + uint64_t *descriptors_arr_ptr = (uint64_t*)(((uint8_t*)descriptors_arr) + 8); + for (size_t b = 0; b < descriptors_var.datalen; b++) { + LDKSpendableOutputDescriptor *descriptors_conv_27_copy = MALLOC(sizeof(LDKSpendableOutputDescriptor), "LDKSpendableOutputDescriptor"); + *descriptors_conv_27_copy = descriptors_var.data[b]; + uint64_t descriptors_conv_27_ref = tag_ptr(descriptors_conv_27_copy, true); + descriptors_arr_ptr[b] = descriptors_conv_27_ref; + } + + FREE(descriptors_var.data); + LDKCVec_TxOutZ outputs_var = outputs; + uint64_tArray outputs_arr = NULL; + outputs_arr = init_uint64_tArray(outputs_var.datalen, __LINE__); + uint64_t *outputs_arr_ptr = (uint64_t*)(((uint8_t*)outputs_arr) + 8); + for (size_t h = 0; h < outputs_var.datalen; h++) { + LDKTxOut* outputs_conv_7_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut"); + *outputs_conv_7_ref = outputs_var.data[h]; + outputs_arr_ptr[h] = tag_ptr(outputs_conv_7_ref, true); + } + + FREE(outputs_var.data); + LDKCVec_u8Z change_destination_script_var = change_destination_script; + int8_tArray change_destination_script_arr = init_int8_tArray(change_destination_script_var.datalen, __LINE__); + memcpy(change_destination_script_arr->elems, change_destination_script_var.data, change_destination_script_var.datalen); + CVec_u8Z_free(change_destination_script_var); + int32_t feerate_sat_per_1000_weight_conv = feerate_sat_per_1000_weight; + LDKCOption_u32Z *locktime_copy = MALLOC(sizeof(LDKCOption_u32Z), "LDKCOption_u32Z"); + *locktime_copy = locktime; + uint64_t locktime_ref = tag_ptr(locktime_copy, true); + uint64_t ret = js_invoke_function_uuuubu(j_calls->instance_ptr, 54, (uint32_t)descriptors_arr, (uint32_t)outputs_arr, (uint32_t)change_destination_script_arr, feerate_sat_per_1000_weight_conv, locktime_ref, 0); + void* ret_ptr = untag_ptr(ret); + CHECK_ACCESS(ret_ptr); + LDKCResult_TransactionNoneZ ret_conv = *(LDKCResult_TransactionNoneZ*)(ret_ptr); + FREE(untag_ptr(ret)); + return ret_conv; +} +static void LDKOutputSpender_JCalls_cloned(LDKOutputSpender* new_obj) { + LDKOutputSpender_JCalls *j_calls = (LDKOutputSpender_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +} +static inline LDKOutputSpender LDKOutputSpender_init (JSValue o) { + LDKOutputSpender_JCalls *calls = MALLOC(sizeof(LDKOutputSpender_JCalls), "LDKOutputSpender_JCalls"); + atomic_init(&calls->refcnt, 1); + calls->instance_ptr = o; + + LDKOutputSpender ret = { + .this_arg = (void*) calls, + .spend_spendable_outputs = spend_spendable_outputs_LDKOutputSpender_jcall, + .free = LDKOutputSpender_JCalls_free, + }; + return ret; +} +uint64_t __attribute__((export_name("TS_LDKOutputSpender_new"))) TS_LDKOutputSpender_new(JSValue o) { + LDKOutputSpender *res_ptr = MALLOC(sizeof(LDKOutputSpender), "LDKOutputSpender"); + *res_ptr = LDKOutputSpender_init(o); + return tag_ptr(res_ptr, true); +} +uint64_t __attribute__((export_name("TS_OutputSpender_spend_spendable_outputs"))) TS_OutputSpender_spend_spendable_outputs(uint64_t this_arg, uint64_tArray descriptors, uint64_tArray outputs, int8_tArray change_destination_script, int32_t feerate_sat_per_1000_weight, uint64_t locktime) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKOutputSpender* this_arg_conv = (LDKOutputSpender*)this_arg_ptr; + LDKCVec_SpendableOutputDescriptorZ descriptors_constr; + descriptors_constr.datalen = descriptors->arr_len; + if (descriptors_constr.datalen > 0) + descriptors_constr.data = MALLOC(descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements"); + else + descriptors_constr.data = NULL; + uint64_t* descriptors_vals = descriptors->elems; + for (size_t b = 0; b < descriptors_constr.datalen; b++) { + uint64_t descriptors_conv_27 = descriptors_vals[b]; + void* descriptors_conv_27_ptr = untag_ptr(descriptors_conv_27); + CHECK_ACCESS(descriptors_conv_27_ptr); + LDKSpendableOutputDescriptor descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(descriptors_conv_27_ptr); + descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptors_conv_27)); + descriptors_constr.data[b] = descriptors_conv_27_conv; + } + FREE(descriptors); + LDKCVec_TxOutZ outputs_constr; + outputs_constr.datalen = outputs->arr_len; + if (outputs_constr.datalen > 0) + outputs_constr.data = MALLOC(outputs_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements"); + else + outputs_constr.data = NULL; + uint64_t* outputs_vals = outputs->elems; + for (size_t h = 0; h < outputs_constr.datalen; h++) { + uint64_t outputs_conv_7 = outputs_vals[h]; + void* outputs_conv_7_ptr = untag_ptr(outputs_conv_7); + CHECK_ACCESS(outputs_conv_7_ptr); + LDKTxOut outputs_conv_7_conv = *(LDKTxOut*)(outputs_conv_7_ptr); + outputs_conv_7_conv = TxOut_clone((LDKTxOut*)untag_ptr(outputs_conv_7)); + outputs_constr.data[h] = outputs_conv_7_conv; + } + FREE(outputs); + LDKCVec_u8Z change_destination_script_ref; + change_destination_script_ref.datalen = change_destination_script->arr_len; + change_destination_script_ref.data = MALLOC(change_destination_script_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(change_destination_script_ref.data, change_destination_script->elems, change_destination_script_ref.datalen); FREE(change_destination_script); + void* locktime_ptr = untag_ptr(locktime); + CHECK_ACCESS(locktime_ptr); + LDKCOption_u32Z locktime_conv = *(LDKCOption_u32Z*)(locktime_ptr); + locktime_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(locktime)); + LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); + *ret_conv = (this_arg_conv->spend_spendable_outputs)(this_arg_conv->this_arg, descriptors_constr, outputs_constr, change_destination_script_ref, feerate_sat_per_1000_weight, locktime_conv); + return tag_ptr(ret_conv, true); +} + +static inline struct LDKOutputSweeper CResult_OutputSweeperDecodeErrorZ_get_ok(LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR owner){ + LDKOutputSweeper ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_OutputSweeperDecodeErrorZ_get_ok"))) TS_CResult_OutputSweeperDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_OutputSweeperDecodeErrorZ* owner_conv = (LDKCResult_OutputSweeperDecodeErrorZ*)untag_ptr(owner); + LDKOutputSweeper ret_var = CResult_OutputSweeperDecodeErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_OutputSweeperDecodeErrorZ_get_err(LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +uint64_t __attribute__((export_name("TS_CResult_OutputSweeperDecodeErrorZ_get_err"))) TS_CResult_OutputSweeperDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_OutputSweeperDecodeErrorZ* owner_conv = (LDKCResult_OutputSweeperDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_OutputSweeperDecodeErrorZ_get_err(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKBestBlock C2Tuple_BestBlockOutputSweeperZ_get_a(LDKC2Tuple_BestBlockOutputSweeperZ *NONNULL_PTR owner){ + LDKBestBlock ret = owner->a; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_C2Tuple_BestBlockOutputSweeperZ_get_a"))) TS_C2Tuple_BestBlockOutputSweeperZ_get_a(uint64_t owner) { + LDKC2Tuple_BestBlockOutputSweeperZ* owner_conv = (LDKC2Tuple_BestBlockOutputSweeperZ*)untag_ptr(owner); + LDKBestBlock ret_var = C2Tuple_BestBlockOutputSweeperZ_get_a(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKOutputSweeper C2Tuple_BestBlockOutputSweeperZ_get_b(LDKC2Tuple_BestBlockOutputSweeperZ *NONNULL_PTR owner){ + LDKOutputSweeper ret = owner->b; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_C2Tuple_BestBlockOutputSweeperZ_get_b"))) TS_C2Tuple_BestBlockOutputSweeperZ_get_b(uint64_t owner) { + LDKC2Tuple_BestBlockOutputSweeperZ* owner_conv = (LDKC2Tuple_BestBlockOutputSweeperZ*)untag_ptr(owner); + LDKOutputSweeper ret_var = C2Tuple_BestBlockOutputSweeperZ_get_b(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKC2Tuple_BestBlockOutputSweeperZ *CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return &*owner->contents.result; +} +uint64_t __attribute__((export_name("TS_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok"))) TS_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* owner_conv = (LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)untag_ptr(owner); + uint64_t ret_ret = tag_ptr(CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(owner_conv), false); + return ret_ret; +} + +static inline struct LDKDecodeError CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +uint64_t __attribute__((export_name("TS_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err"))) TS_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* owner_conv = (LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKDelayedPaymentBasepoint CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){ + LDKDelayedPaymentBasepoint ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok"))) TS_CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner); + LDKDelayedPaymentBasepoint ret_var = CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +uint64_t __attribute__((export_name("TS_CResult_DelayedPaymentBasepointDecodeErrorZ_get_err"))) TS_CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKDelayedPaymentKey CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){ + LDKDelayedPaymentKey ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_DelayedPaymentKeyDecodeErrorZ_get_ok"))) TS_CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner); + LDKDelayedPaymentKey ret_var = CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_DelayedPaymentKeyDecodeErrorZ_get_err(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +uint64_t __attribute__((export_name("TS_CResult_DelayedPaymentKeyDecodeErrorZ_get_err"))) TS_CResult_DelayedPaymentKeyDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_DelayedPaymentKeyDecodeErrorZ_get_err(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKHtlcBasepoint CResult_HtlcBasepointDecodeErrorZ_get_ok(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){ + LDKHtlcBasepoint ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_HtlcBasepointDecodeErrorZ_get_ok"))) TS_CResult_HtlcBasepointDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner); + LDKHtlcBasepoint ret_var = CResult_HtlcBasepointDecodeErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_HtlcBasepointDecodeErrorZ_get_err(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +uint64_t __attribute__((export_name("TS_CResult_HtlcBasepointDecodeErrorZ_get_err"))) TS_CResult_HtlcBasepointDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_HtlcBasepointDecodeErrorZ_get_err(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKHtlcKey CResult_HtlcKeyDecodeErrorZ_get_ok(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){ + LDKHtlcKey ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_HtlcKeyDecodeErrorZ_get_ok"))) TS_CResult_HtlcKeyDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner); + LDKHtlcKey ret_var = CResult_HtlcKeyDecodeErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_HtlcKeyDecodeErrorZ_get_err(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +uint64_t __attribute__((export_name("TS_CResult_HtlcKeyDecodeErrorZ_get_err"))) TS_CResult_HtlcKeyDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_HtlcKeyDecodeErrorZ_get_err(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKRevocationBasepoint CResult_RevocationBasepointDecodeErrorZ_get_ok(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){ + LDKRevocationBasepoint ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_RevocationBasepointDecodeErrorZ_get_ok"))) TS_CResult_RevocationBasepointDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner); + LDKRevocationBasepoint ret_var = CResult_RevocationBasepointDecodeErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_RevocationBasepointDecodeErrorZ_get_err(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +uint64_t __attribute__((export_name("TS_CResult_RevocationBasepointDecodeErrorZ_get_err"))) TS_CResult_RevocationBasepointDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_RevocationBasepointDecodeErrorZ_get_err(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKRevocationKey CResult_RevocationKeyDecodeErrorZ_get_ok(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){ + LDKRevocationKey ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_RevocationKeyDecodeErrorZ_get_ok"))) TS_CResult_RevocationKeyDecodeErrorZ_get_ok(uint64_t owner) { + LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner); + LDKRevocationKey ret_var = CResult_RevocationKeyDecodeErrorZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_RevocationKeyDecodeErrorZ_get_err(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +uint64_t __attribute__((export_name("TS_CResult_RevocationKeyDecodeErrorZ_get_err"))) TS_CResult_RevocationKeyDecodeErrorZ_get_err(uint64_t owner) { + LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_RevocationKeyDecodeErrorZ_get_err(owner_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKLockedChannelMonitor CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){ + LDKLockedChannelMonitor ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_CResult_LockedChannelMonitorNoneZ_get_ok"))) TS_CResult_LockedChannelMonitorNoneZ_get_ok(uint64_t owner) { + LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner); + LDKLockedChannelMonitor ret_var = CResult_LockedChannelMonitorNoneZ_get_ok(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return *owner->contents.err; +} +void __attribute__((export_name("TS_CResult_LockedChannelMonitorNoneZ_get_err"))) TS_CResult_LockedChannelMonitorNoneZ_get_err(uint64_t owner) { + LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner); + CResult_LockedChannelMonitorNoneZ_get_err(owner_conv); +} + +static inline struct LDKOutPoint C2Tuple_OutPointChannelIdZ_get_a(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR owner){ + LDKOutPoint ret = owner->a; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_C2Tuple_OutPointChannelIdZ_get_a"))) TS_C2Tuple_OutPointChannelIdZ_get_a(uint64_t owner) { + LDKC2Tuple_OutPointChannelIdZ* owner_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(owner); + LDKOutPoint ret_var = C2Tuple_OutPointChannelIdZ_get_a(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKChannelId C2Tuple_OutPointChannelIdZ_get_b(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR owner){ + LDKChannelId ret = owner->b; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_C2Tuple_OutPointChannelIdZ_get_b"))) TS_C2Tuple_OutPointChannelIdZ_get_b(uint64_t owner) { + LDKC2Tuple_OutPointChannelIdZ* owner_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(owner); + LDKChannelId ret_var = C2Tuple_OutPointChannelIdZ_get_b(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline LDKCVec_C2Tuple_OutPointChannelIdZZ CVec_C2Tuple_OutPointChannelIdZZ_clone(const LDKCVec_C2Tuple_OutPointChannelIdZZ *orig) { + LDKCVec_C2Tuple_OutPointChannelIdZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ) * orig->datalen, "LDKCVec_C2Tuple_OutPointChannelIdZZ clone bytes"), .datalen = orig->datalen }; + for (size_t i = 0; i < ret.datalen; i++) { + ret.data[i] = C2Tuple_OutPointChannelIdZ_clone(&orig->data[i]); + } + return ret; +} +static inline LDKCVec_MonitorUpdateIdZ CVec_MonitorUpdateIdZ_clone(const LDKCVec_MonitorUpdateIdZ *orig) { + LDKCVec_MonitorUpdateIdZ ret = { .data = MALLOC(sizeof(LDKMonitorUpdateId) * orig->datalen, "LDKCVec_MonitorUpdateIdZ clone bytes"), .datalen = orig->datalen }; + for (size_t i = 0; i < ret.datalen; i++) { + ret.data[i] = MonitorUpdateId_clone(&orig->data[i]); + } + return ret; +} +static inline struct LDKOutPoint C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){ + LDKOutPoint ret = owner->a; + ret.is_owned = false; + return ret; +} +uint64_t __attribute__((export_name("TS_C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a"))) TS_C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(uint64_t owner) { + LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner); + LDKOutPoint ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(owner_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKCVec_MonitorUpdateIdZ C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){ + return CVec_MonitorUpdateIdZ_clone(&owner->b); +} +uint64_tArray __attribute__((export_name("TS_C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b"))) TS_C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(uint64_t owner) { + LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner); + LDKCVec_MonitorUpdateIdZ ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(owner_conv); + uint64_tArray ret_arr = NULL; + ret_arr = init_uint64_tArray(ret_var.datalen, __LINE__); + uint64_t *ret_arr_ptr = (uint64_t*)(((uint8_t*)ret_arr) + 8); + for (size_t r = 0; r < ret_var.datalen; r++) { + LDKMonitorUpdateId ret_conv_17_var = ret_var.data[r]; + uint64_t ret_conv_17_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_17_var); + ret_conv_17_ref = tag_ptr(ret_conv_17_var.inner, ret_conv_17_var.is_owned); + ret_arr_ptr[r] = ret_conv_17_ref; + } + + FREE(ret_var.data); + return ret_arr; +} + +static inline LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ CVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ_clone(const LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ *orig) { + LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ) * orig->datalen, "LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ clone bytes"), .datalen = orig->datalen }; + for (size_t i = 0; i < ret.datalen; i++) { + ret.data[i] = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_clone(&orig->data[i]); + } + return ret; +} uint32_t __attribute__((export_name("TS_LDKCandidateRouteHop_ty_from_ptr"))) TS_LDKCandidateRouteHop_ty_from_ptr(uint64_t ptr) { LDKCandidateRouteHop *obj = (LDKCandidateRouteHop*)untag_ptr(ptr); switch(obj->tag) { @@ -12610,7 +13924,7 @@ uint64_t channel_penalty_msat_LDKScoreLookUp_jcall(const void* this_arg, const L score_params_var = ProbabilisticScoringFeeParameters_clone(&score_params_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(score_params_var); score_params_ref = tag_ptr(score_params_var.inner, score_params_var.is_owned); - return js_invoke_function_bbbuuu(j_calls->instance_ptr, 53, ref_candidate, usage_ref, score_params_ref, 0, 0, 0); + return js_invoke_function_bbbuuu(j_calls->instance_ptr, 55, ref_candidate, usage_ref, score_params_ref, 0, 0, 0); } static void LDKScoreLookUp_JCalls_cloned(LDKScoreLookUp* new_obj) { LDKScoreLookUp_JCalls *j_calls = (LDKScoreLookUp_JCalls*) new_obj->this_arg; @@ -12671,7 +13985,7 @@ void payment_path_failed_LDKScoreUpdate_jcall(void* this_arg, const LDKPath * pa path_ref = tag_ptr(path_var.inner, path_var.is_owned); int64_t short_channel_id_conv = short_channel_id; int64_t duration_since_epoch_conv = duration_since_epoch; - js_invoke_function_bbbuuu(j_calls->instance_ptr, 54, path_ref, short_channel_id_conv, duration_since_epoch_conv, 0, 0, 0); + js_invoke_function_bbbuuu(j_calls->instance_ptr, 56, path_ref, short_channel_id_conv, duration_since_epoch_conv, 0, 0, 0); } void payment_path_successful_LDKScoreUpdate_jcall(void* this_arg, const LDKPath * path, uint64_t duration_since_epoch) { LDKScoreUpdate_JCalls *j_calls = (LDKScoreUpdate_JCalls*) this_arg; @@ -12681,7 +13995,7 @@ void payment_path_successful_LDKScoreUpdate_jcall(void* this_arg, const LDKPath CHECK_INNER_FIELD_ACCESS_OR_NULL(path_var); path_ref = tag_ptr(path_var.inner, path_var.is_owned); int64_t duration_since_epoch_conv = duration_since_epoch; - js_invoke_function_bbuuuu(j_calls->instance_ptr, 55, path_ref, duration_since_epoch_conv, 0, 0, 0, 0); + js_invoke_function_bbuuuu(j_calls->instance_ptr, 57, path_ref, duration_since_epoch_conv, 0, 0, 0, 0); } void probe_failed_LDKScoreUpdate_jcall(void* this_arg, const LDKPath * path, uint64_t short_channel_id, uint64_t duration_since_epoch) { LDKScoreUpdate_JCalls *j_calls = (LDKScoreUpdate_JCalls*) this_arg; @@ -12692,7 +14006,7 @@ void probe_failed_LDKScoreUpdate_jcall(void* this_arg, const LDKPath * path, uin path_ref = tag_ptr(path_var.inner, path_var.is_owned); int64_t short_channel_id_conv = short_channel_id; int64_t duration_since_epoch_conv = duration_since_epoch; - js_invoke_function_bbbuuu(j_calls->instance_ptr, 56, path_ref, short_channel_id_conv, duration_since_epoch_conv, 0, 0, 0); + js_invoke_function_bbbuuu(j_calls->instance_ptr, 58, path_ref, short_channel_id_conv, duration_since_epoch_conv, 0, 0, 0); } void probe_successful_LDKScoreUpdate_jcall(void* this_arg, const LDKPath * path, uint64_t duration_since_epoch) { LDKScoreUpdate_JCalls *j_calls = (LDKScoreUpdate_JCalls*) this_arg; @@ -12702,12 +14016,12 @@ void probe_successful_LDKScoreUpdate_jcall(void* this_arg, const LDKPath * path, CHECK_INNER_FIELD_ACCESS_OR_NULL(path_var); path_ref = tag_ptr(path_var.inner, path_var.is_owned); int64_t duration_since_epoch_conv = duration_since_epoch; - js_invoke_function_bbuuuu(j_calls->instance_ptr, 57, path_ref, duration_since_epoch_conv, 0, 0, 0, 0); + js_invoke_function_bbuuuu(j_calls->instance_ptr, 59, path_ref, duration_since_epoch_conv, 0, 0, 0, 0); } void time_passed_LDKScoreUpdate_jcall(void* this_arg, uint64_t duration_since_epoch) { LDKScoreUpdate_JCalls *j_calls = (LDKScoreUpdate_JCalls*) this_arg; int64_t duration_since_epoch_conv = duration_since_epoch; - js_invoke_function_buuuuu(j_calls->instance_ptr, 58, duration_since_epoch_conv, 0, 0, 0, 0, 0); + js_invoke_function_buuuuu(j_calls->instance_ptr, 60, duration_since_epoch_conv, 0, 0, 0, 0, 0); } static void LDKScoreUpdate_JCalls_cloned(LDKScoreUpdate* new_obj) { LDKScoreUpdate_JCalls *j_calls = (LDKScoreUpdate_JCalls*) new_obj->this_arg; @@ -12801,7 +14115,7 @@ static void LDKLockableScore_JCalls_free(void* this_arg) { } LDKScoreLookUp read_lock_LDKLockableScore_jcall(const void* this_arg) { LDKLockableScore_JCalls *j_calls = (LDKLockableScore_JCalls*) this_arg; - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 59, 0, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 61, 0, 0, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKScoreLookUp ret_conv = *(LDKScoreLookUp*)(ret_ptr); @@ -12814,7 +14128,7 @@ LDKScoreLookUp read_lock_LDKLockableScore_jcall(const void* this_arg) { } LDKScoreUpdate write_lock_LDKLockableScore_jcall(const void* this_arg) { LDKLockableScore_JCalls *j_calls = (LDKLockableScore_JCalls*) this_arg; - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 60, 0, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 62, 0, 0, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKScoreUpdate ret_conv = *(LDKScoreUpdate*)(ret_ptr); @@ -12878,7 +14192,7 @@ static void LDKWriteableScore_JCalls_free(void* this_arg) { } LDKCVec_u8Z write_LDKWriteableScore_jcall(const void* this_arg) { LDKWriteableScore_JCalls *j_calls = (LDKWriteableScore_JCalls*) this_arg; - int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 61, 0, 0, 0, 0, 0, 0); + int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 63, 0, 0, 0, 0, 0, 0); LDKCVec_u8Z ret_ref; ret_ref.datalen = ret->arr_len; ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes"); @@ -12937,7 +14251,7 @@ LDKCResult_NoneIOErrorZ persist_manager_LDKPersister_jcall(const void* this_arg, // WARNING: we may need a move here but no clone is available for LDKChannelManager CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_manager_var); channel_manager_ref = tag_ptr(channel_manager_var.inner, channel_manager_var.is_owned); - uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 62, channel_manager_ref, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 64, channel_manager_ref, 0, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr); @@ -12951,7 +14265,7 @@ LDKCResult_NoneIOErrorZ persist_graph_LDKPersister_jcall(const void* this_arg, c // WARNING: we may need a move here but no clone is available for LDKNetworkGraph CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_var); network_graph_ref = tag_ptr(network_graph_var.inner, network_graph_var.is_owned); - uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 63, network_graph_ref, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 65, network_graph_ref, 0, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr); @@ -12962,7 +14276,7 @@ LDKCResult_NoneIOErrorZ persist_scorer_LDKPersister_jcall(const void* this_arg, LDKPersister_JCalls *j_calls = (LDKPersister_JCalls*) this_arg; // WARNING: This object doesn't live past this scope, needs clone! uint64_t ret_scorer = tag_ptr(scorer, false); - uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 64, ret_scorer, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 66, ret_scorer, 0, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr); @@ -13042,12 +14356,12 @@ static void LDKPersist_JCalls_free(void* this_arg) { FREE(j_calls); } } -LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) { +LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_funding_outpoint, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) { LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg; - LDKOutPoint channel_id_var = channel_id; - uint64_t channel_id_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); - channel_id_ref = tag_ptr(channel_id_var.inner, channel_id_var.is_owned); + LDKOutPoint channel_funding_outpoint_var = channel_funding_outpoint; + uint64_t channel_funding_outpoint_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_var); + channel_funding_outpoint_ref = tag_ptr(channel_funding_outpoint_var.inner, channel_funding_outpoint_var.is_owned); LDKChannelMonitor data_var = *data; uint64_t data_ref = 0; data_var = ChannelMonitor_clone(&data_var); @@ -13057,16 +14371,16 @@ LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* t uint64_t update_id_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_var); update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned); - uint64_t ret = js_invoke_function_bbbuuu(j_calls->instance_ptr, 65, channel_id_ref, data_ref, update_id_ref, 0, 0, 0); + uint64_t ret = js_invoke_function_bbbuuu(j_calls->instance_ptr, 67, channel_funding_outpoint_ref, data_ref, update_id_ref, 0, 0, 0); LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_js(ret); return ret_conv; } -LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, LDKChannelMonitorUpdate update, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) { +LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_funding_outpoint, LDKChannelMonitorUpdate update, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) { LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg; - LDKOutPoint channel_id_var = channel_id; - uint64_t channel_id_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); - channel_id_ref = tag_ptr(channel_id_var.inner, channel_id_var.is_owned); + LDKOutPoint channel_funding_outpoint_var = channel_funding_outpoint; + uint64_t channel_funding_outpoint_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_var); + channel_funding_outpoint_ref = tag_ptr(channel_funding_outpoint_var.inner, channel_funding_outpoint_var.is_owned); LDKChannelMonitorUpdate update_var = update; uint64_t update_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(update_var); @@ -13080,10 +14394,18 @@ LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const vo uint64_t update_id_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_var); update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned); - uint64_t ret = js_invoke_function_bbbbuu(j_calls->instance_ptr, 66, channel_id_ref, update_ref, data_ref, update_id_ref, 0, 0); + uint64_t ret = js_invoke_function_bbbbuu(j_calls->instance_ptr, 68, channel_funding_outpoint_ref, update_ref, data_ref, update_id_ref, 0, 0); LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_js(ret); return ret_conv; } +void archive_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_funding_outpoint) { + LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg; + LDKOutPoint channel_funding_outpoint_var = channel_funding_outpoint; + uint64_t channel_funding_outpoint_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_var); + channel_funding_outpoint_ref = tag_ptr(channel_funding_outpoint_var.inner, channel_funding_outpoint_var.is_owned); + js_invoke_function_buuuuu(j_calls->instance_ptr, 69, channel_funding_outpoint_ref, 0, 0, 0, 0, 0); +} static void LDKPersist_JCalls_cloned(LDKPersist* new_obj) { LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) new_obj->this_arg; atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); @@ -13097,6 +14419,7 @@ static inline LDKPersist LDKPersist_init (JSValue o) { .this_arg = (void*) calls, .persist_new_channel = persist_new_channel_LDKPersist_jcall, .update_persisted_channel = update_persisted_channel_LDKPersist_jcall, + .archive_persisted_channel = archive_persisted_channel_LDKPersist_jcall, .free = LDKPersist_JCalls_free, }; return ret; @@ -13106,15 +14429,15 @@ uint64_t __attribute__((export_name("TS_LDKPersist_new"))) TS_LDKPersist_new(JS *res_ptr = LDKPersist_init(o); return tag_ptr(res_ptr, true); } -uint32_t __attribute__((export_name("TS_Persist_persist_new_channel"))) TS_Persist_persist_new_channel(uint64_t this_arg, uint64_t channel_id, uint64_t data, uint64_t update_id) { +uint32_t __attribute__((export_name("TS_Persist_persist_new_channel"))) TS_Persist_persist_new_channel(uint64_t this_arg, uint64_t channel_funding_outpoint, uint64_t data, uint64_t update_id) { void* this_arg_ptr = untag_ptr(this_arg); if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr; - LDKOutPoint channel_id_conv; - channel_id_conv.inner = untag_ptr(channel_id); - channel_id_conv.is_owned = ptr_is_owned(channel_id); - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); - channel_id_conv = OutPoint_clone(&channel_id_conv); + LDKOutPoint channel_funding_outpoint_conv; + channel_funding_outpoint_conv.inner = untag_ptr(channel_funding_outpoint); + channel_funding_outpoint_conv.is_owned = ptr_is_owned(channel_funding_outpoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_conv); + channel_funding_outpoint_conv = OutPoint_clone(&channel_funding_outpoint_conv); LDKChannelMonitor data_conv; data_conv.inner = untag_ptr(data); data_conv.is_owned = ptr_is_owned(data); @@ -13125,19 +14448,19 @@ uint32_t __attribute__((export_name("TS_Persist_persist_new_channel"))) TS_Pers update_id_conv.is_owned = ptr_is_owned(update_id); CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv); update_id_conv = MonitorUpdateId_clone(&update_id_conv); - uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js((this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, channel_id_conv, &data_conv, update_id_conv)); + uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js((this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, channel_funding_outpoint_conv, &data_conv, update_id_conv)); return ret_conv; } -uint32_t __attribute__((export_name("TS_Persist_update_persisted_channel"))) TS_Persist_update_persisted_channel(uint64_t this_arg, uint64_t channel_id, uint64_t update, uint64_t data, uint64_t update_id) { +uint32_t __attribute__((export_name("TS_Persist_update_persisted_channel"))) TS_Persist_update_persisted_channel(uint64_t this_arg, uint64_t channel_funding_outpoint, uint64_t update, uint64_t data, uint64_t update_id) { void* this_arg_ptr = untag_ptr(this_arg); if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr; - LDKOutPoint channel_id_conv; - channel_id_conv.inner = untag_ptr(channel_id); - channel_id_conv.is_owned = ptr_is_owned(channel_id); - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); - channel_id_conv = OutPoint_clone(&channel_id_conv); + LDKOutPoint channel_funding_outpoint_conv; + channel_funding_outpoint_conv.inner = untag_ptr(channel_funding_outpoint); + channel_funding_outpoint_conv.is_owned = ptr_is_owned(channel_funding_outpoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_conv); + channel_funding_outpoint_conv = OutPoint_clone(&channel_funding_outpoint_conv); LDKChannelMonitorUpdate update_conv; update_conv.inner = untag_ptr(update); update_conv.is_owned = ptr_is_owned(update); @@ -13153,50 +14476,20 @@ uint32_t __attribute__((export_name("TS_Persist_update_persisted_channel"))) TS update_id_conv.is_owned = ptr_is_owned(update_id); CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv); update_id_conv = MonitorUpdateId_clone(&update_id_conv); - uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js((this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, channel_id_conv, update_conv, &data_conv, update_id_conv)); + uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js((this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, channel_funding_outpoint_conv, update_conv, &data_conv, update_id_conv)); return ret_conv; } -typedef struct LDKFutureCallback_JCalls { - atomic_size_t refcnt; - uint32_t instance_ptr; -} LDKFutureCallback_JCalls; -static void LDKFutureCallback_JCalls_free(void* this_arg) { - LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg; - if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { - FREE(j_calls); - } -} -void call_LDKFutureCallback_jcall(const void* this_arg) { - LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg; - js_invoke_function_uuuuuu(j_calls->instance_ptr, 67, 0, 0, 0, 0, 0, 0); -} -static void LDKFutureCallback_JCalls_cloned(LDKFutureCallback* new_obj) { - LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) new_obj->this_arg; - atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); -} -static inline LDKFutureCallback LDKFutureCallback_init (JSValue o) { - LDKFutureCallback_JCalls *calls = MALLOC(sizeof(LDKFutureCallback_JCalls), "LDKFutureCallback_JCalls"); - atomic_init(&calls->refcnt, 1); - calls->instance_ptr = o; - - LDKFutureCallback ret = { - .this_arg = (void*) calls, - .call = call_LDKFutureCallback_jcall, - .free = LDKFutureCallback_JCalls_free, - }; - return ret; -} -uint64_t __attribute__((export_name("TS_LDKFutureCallback_new"))) TS_LDKFutureCallback_new(JSValue o) { - LDKFutureCallback *res_ptr = MALLOC(sizeof(LDKFutureCallback), "LDKFutureCallback"); - *res_ptr = LDKFutureCallback_init(o); - return tag_ptr(res_ptr, true); -} -void __attribute__((export_name("TS_FutureCallback_call"))) TS_FutureCallback_call(uint64_t this_arg) { +void __attribute__((export_name("TS_Persist_archive_persisted_channel"))) TS_Persist_archive_persisted_channel(uint64_t this_arg, uint64_t channel_funding_outpoint) { void* this_arg_ptr = untag_ptr(this_arg); if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } - LDKFutureCallback* this_arg_conv = (LDKFutureCallback*)this_arg_ptr; - (this_arg_conv->call)(this_arg_conv->this_arg); + LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr; + LDKOutPoint channel_funding_outpoint_conv; + channel_funding_outpoint_conv.inner = untag_ptr(channel_funding_outpoint); + channel_funding_outpoint_conv.is_owned = ptr_is_owned(channel_funding_outpoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_conv); + channel_funding_outpoint_conv = OutPoint_clone(&channel_funding_outpoint_conv); + (this_arg_conv->archive_persisted_channel)(this_arg_conv->this_arg, channel_funding_outpoint_conv); } typedef struct LDKListen_JCalls { @@ -13225,7 +14518,7 @@ void filtered_block_connected_LDKListen_jcall(const void* this_arg, const uint8_ FREE(txdata_var.data); int32_t height_conv = height; - js_invoke_function_uuuuuu(j_calls->instance_ptr, 68, (uint32_t)header_arr, (uint32_t)txdata_arr, height_conv, 0, 0, 0); + js_invoke_function_uuuuuu(j_calls->instance_ptr, 70, (uint32_t)header_arr, (uint32_t)txdata_arr, height_conv, 0, 0, 0); } void block_connected_LDKListen_jcall(const void* this_arg, LDKu8slice block, uint32_t height) { LDKListen_JCalls *j_calls = (LDKListen_JCalls*) this_arg; @@ -13233,14 +14526,14 @@ void block_connected_LDKListen_jcall(const void* this_arg, LDKu8slice block, uin int8_tArray block_arr = init_int8_tArray(block_var.datalen, __LINE__); memcpy(block_arr->elems, block_var.data, block_var.datalen); int32_t height_conv = height; - js_invoke_function_uuuuuu(j_calls->instance_ptr, 69, (uint32_t)block_arr, height_conv, 0, 0, 0, 0); + js_invoke_function_uuuuuu(j_calls->instance_ptr, 71, (uint32_t)block_arr, height_conv, 0, 0, 0, 0); } void block_disconnected_LDKListen_jcall(const void* this_arg, const uint8_t (* header)[80], uint32_t height) { LDKListen_JCalls *j_calls = (LDKListen_JCalls*) this_arg; int8_tArray header_arr = init_int8_tArray(80, __LINE__); memcpy(header_arr->elems, *header, 80); int32_t height_conv = height; - js_invoke_function_uuuuuu(j_calls->instance_ptr, 70, (uint32_t)header_arr, height_conv, 0, 0, 0, 0); + js_invoke_function_uuuuuu(j_calls->instance_ptr, 72, (uint32_t)header_arr, height_conv, 0, 0, 0, 0); } static void LDKListen_JCalls_cloned(LDKListen* new_obj) { LDKListen_JCalls *j_calls = (LDKListen_JCalls*) new_obj->this_arg; @@ -13340,24 +14633,24 @@ void transactions_confirmed_LDKConfirm_jcall(const void* this_arg, const uint8_t FREE(txdata_var.data); int32_t height_conv = height; - js_invoke_function_uuuuuu(j_calls->instance_ptr, 71, (uint32_t)header_arr, (uint32_t)txdata_arr, height_conv, 0, 0, 0); + js_invoke_function_uuuuuu(j_calls->instance_ptr, 73, (uint32_t)header_arr, (uint32_t)txdata_arr, height_conv, 0, 0, 0); } void transaction_unconfirmed_LDKConfirm_jcall(const void* this_arg, const uint8_t (* txid)[32]) { LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg; int8_tArray txid_arr = init_int8_tArray(32, __LINE__); memcpy(txid_arr->elems, *txid, 32); - js_invoke_function_uuuuuu(j_calls->instance_ptr, 72, (uint32_t)txid_arr, 0, 0, 0, 0, 0); + js_invoke_function_uuuuuu(j_calls->instance_ptr, 74, (uint32_t)txid_arr, 0, 0, 0, 0, 0); } void best_block_updated_LDKConfirm_jcall(const void* this_arg, const uint8_t (* header)[80], uint32_t height) { LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg; int8_tArray header_arr = init_int8_tArray(80, __LINE__); memcpy(header_arr->elems, *header, 80); int32_t height_conv = height; - js_invoke_function_uuuuuu(j_calls->instance_ptr, 73, (uint32_t)header_arr, height_conv, 0, 0, 0, 0); + js_invoke_function_uuuuuu(j_calls->instance_ptr, 75, (uint32_t)header_arr, height_conv, 0, 0, 0, 0); } LDKCVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ get_relevant_txids_LDKConfirm_jcall(const void* this_arg) { LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg; - uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 74, 0, 0, 0, 0, 0, 0); + uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 76, 0, 0, 0, 0, 0, 0); LDKCVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ ret_constr; ret_constr.datalen = ret->arr_len; if (ret_constr.datalen > 0) @@ -13467,6 +14760,68 @@ uint64_tArray __attribute__((export_name("TS_Confirm_get_relevant_txids"))) TS_ return ret_arr; } +uint32_t __attribute__((export_name("TS_LDKSpendingDelay_ty_from_ptr"))) TS_LDKSpendingDelay_ty_from_ptr(uint64_t ptr) { + LDKSpendingDelay *obj = (LDKSpendingDelay*)untag_ptr(ptr); + switch(obj->tag) { + case LDKSpendingDelay_Relative: return 0; + case LDKSpendingDelay_Absolute: return 1; + default: abort(); + } +} +int32_t __attribute__((export_name("TS_LDKSpendingDelay_Relative_get_num_blocks"))) TS_LDKSpendingDelay_Relative_get_num_blocks(uint64_t ptr) { + LDKSpendingDelay *obj = (LDKSpendingDelay*)untag_ptr(ptr); + assert(obj->tag == LDKSpendingDelay_Relative); + int32_t num_blocks_conv = obj->relative.num_blocks; + return num_blocks_conv; +} +int32_t __attribute__((export_name("TS_LDKSpendingDelay_Absolute_get_height"))) TS_LDKSpendingDelay_Absolute_get_height(uint64_t ptr) { + LDKSpendingDelay *obj = (LDKSpendingDelay*)untag_ptr(ptr); + assert(obj->tag == LDKSpendingDelay_Absolute); + int32_t height_conv = obj->absolute.height; + return height_conv; +} +typedef struct LDKFutureCallback_JCalls { + atomic_size_t refcnt; + uint32_t instance_ptr; +} LDKFutureCallback_JCalls; +static void LDKFutureCallback_JCalls_free(void* this_arg) { + LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + FREE(j_calls); + } +} +void call_LDKFutureCallback_jcall(const void* this_arg) { + LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg; + js_invoke_function_uuuuuu(j_calls->instance_ptr, 77, 0, 0, 0, 0, 0, 0); +} +static void LDKFutureCallback_JCalls_cloned(LDKFutureCallback* new_obj) { + LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +} +static inline LDKFutureCallback LDKFutureCallback_init (JSValue o) { + LDKFutureCallback_JCalls *calls = MALLOC(sizeof(LDKFutureCallback_JCalls), "LDKFutureCallback_JCalls"); + atomic_init(&calls->refcnt, 1); + calls->instance_ptr = o; + + LDKFutureCallback ret = { + .this_arg = (void*) calls, + .call = call_LDKFutureCallback_jcall, + .free = LDKFutureCallback_JCalls_free, + }; + return ret; +} +uint64_t __attribute__((export_name("TS_LDKFutureCallback_new"))) TS_LDKFutureCallback_new(JSValue o) { + LDKFutureCallback *res_ptr = MALLOC(sizeof(LDKFutureCallback), "LDKFutureCallback"); + *res_ptr = LDKFutureCallback_init(o); + return tag_ptr(res_ptr, true); +} +void __attribute__((export_name("TS_FutureCallback_call"))) TS_FutureCallback_call(uint64_t this_arg) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKFutureCallback* this_arg_conv = (LDKFutureCallback*)this_arg_ptr; + (this_arg_conv->call)(this_arg_conv->this_arg); +} + typedef struct LDKEventHandler_JCalls { atomic_size_t refcnt; uint32_t instance_ptr; @@ -13482,7 +14837,7 @@ void handle_event_LDKEventHandler_jcall(const void* this_arg, LDKEvent event) { LDKEvent *event_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); *event_copy = event; uint64_t event_ref = tag_ptr(event_copy, true); - js_invoke_function_buuuuu(j_calls->instance_ptr, 75, event_ref, 0, 0, 0, 0, 0); + js_invoke_function_buuuuu(j_calls->instance_ptr, 78, event_ref, 0, 0, 0, 0, 0); } static void LDKEventHandler_JCalls_cloned(LDKEventHandler* new_obj) { LDKEventHandler_JCalls *j_calls = (LDKEventHandler_JCalls*) new_obj->this_arg; @@ -13530,7 +14885,7 @@ void process_pending_events_LDKEventsProvider_jcall(const void* this_arg, LDKEve LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg; LDKEventHandler* handler_ret = MALLOC(sizeof(LDKEventHandler), "LDKEventHandler"); *handler_ret = handler; - js_invoke_function_buuuuu(j_calls->instance_ptr, 76, tag_ptr(handler_ret, true), 0, 0, 0, 0, 0); + js_invoke_function_buuuuu(j_calls->instance_ptr, 79, tag_ptr(handler_ret, true), 0, 0, 0, 0, 0); } static void LDKEventsProvider_JCalls_cloned(LDKEventsProvider* new_obj) { LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) new_obj->this_arg; @@ -13595,7 +14950,7 @@ static void LDKMessageSendEventsProvider_JCalls_free(void* this_arg) { } LDKCVec_MessageSendEventZ get_and_clear_pending_msg_events_LDKMessageSendEventsProvider_jcall(const void* this_arg) { LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg; - uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 77, 0, 0, 0, 0, 0, 0); + uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 80, 0, 0, 0, 0, 0, 0); LDKCVec_MessageSendEventZ ret_constr; ret_constr.datalen = ret->arr_len; if (ret_constr.datalen > 0) @@ -13674,7 +15029,7 @@ void handle_open_channel_LDKChannelMessageHandler_jcall(const void* this_arg, LD msg_var = OpenChannel_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_ubuuuu(j_calls->instance_ptr, 78, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); + js_invoke_function_ubuuuu(j_calls->instance_ptr, 81, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); } void handle_open_channel_v2_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKOpenChannelV2 * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -13685,7 +15040,7 @@ void handle_open_channel_v2_LDKChannelMessageHandler_jcall(const void* this_arg, msg_var = OpenChannelV2_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_ubuuuu(j_calls->instance_ptr, 79, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); + js_invoke_function_ubuuuu(j_calls->instance_ptr, 82, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); } void handle_accept_channel_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKAcceptChannel * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -13696,7 +15051,7 @@ void handle_accept_channel_LDKChannelMessageHandler_jcall(const void* this_arg, msg_var = AcceptChannel_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_ubuuuu(j_calls->instance_ptr, 80, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); + js_invoke_function_ubuuuu(j_calls->instance_ptr, 83, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); } void handle_accept_channel_v2_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKAcceptChannelV2 * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -13707,7 +15062,7 @@ void handle_accept_channel_v2_LDKChannelMessageHandler_jcall(const void* this_ar msg_var = AcceptChannelV2_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_ubuuuu(j_calls->instance_ptr, 81, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); + js_invoke_function_ubuuuu(j_calls->instance_ptr, 84, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); } void handle_funding_created_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingCreated * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -13718,7 +15073,7 @@ void handle_funding_created_LDKChannelMessageHandler_jcall(const void* this_arg, msg_var = FundingCreated_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_ubuuuu(j_calls->instance_ptr, 82, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); + js_invoke_function_ubuuuu(j_calls->instance_ptr, 85, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); } void handle_funding_signed_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingSigned * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -13729,7 +15084,7 @@ void handle_funding_signed_LDKChannelMessageHandler_jcall(const void* this_arg, msg_var = FundingSigned_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_ubuuuu(j_calls->instance_ptr, 83, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); + js_invoke_function_ubuuuu(j_calls->instance_ptr, 86, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); } void handle_channel_ready_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelReady * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -13740,7 +15095,7 @@ void handle_channel_ready_LDKChannelMessageHandler_jcall(const void* this_arg, L msg_var = ChannelReady_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_ubuuuu(j_calls->instance_ptr, 84, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); + js_invoke_function_ubuuuu(j_calls->instance_ptr, 87, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); } void handle_shutdown_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKShutdown * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -13751,7 +15106,7 @@ void handle_shutdown_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPub msg_var = Shutdown_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_ubuuuu(j_calls->instance_ptr, 85, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); + js_invoke_function_ubuuuu(j_calls->instance_ptr, 88, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); } void handle_closing_signed_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKClosingSigned * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -13762,7 +15117,7 @@ void handle_closing_signed_LDKChannelMessageHandler_jcall(const void* this_arg, msg_var = ClosingSigned_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_ubuuuu(j_calls->instance_ptr, 86, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); + js_invoke_function_ubuuuu(j_calls->instance_ptr, 89, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); } void handle_stfu_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKStfu * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -13773,39 +15128,6 @@ void handle_stfu_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicK msg_var = Stfu_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_ubuuuu(j_calls->instance_ptr, 87, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); -} -void handle_splice_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKSplice * msg) { - LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; - int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__); - memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33); - LDKSplice msg_var = *msg; - uint64_t msg_ref = 0; - msg_var = Splice_clone(&msg_var); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); - msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_ubuuuu(j_calls->instance_ptr, 88, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); -} -void handle_splice_ack_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKSpliceAck * msg) { - LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; - int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__); - memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33); - LDKSpliceAck msg_var = *msg; - uint64_t msg_ref = 0; - msg_var = SpliceAck_clone(&msg_var); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); - msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_ubuuuu(j_calls->instance_ptr, 89, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); -} -void handle_splice_locked_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKSpliceLocked * msg) { - LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; - int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__); - memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33); - LDKSpliceLocked msg_var = *msg; - uint64_t msg_ref = 0; - msg_var = SpliceLocked_clone(&msg_var); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); - msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); js_invoke_function_ubuuuu(j_calls->instance_ptr, 90, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); } void handle_tx_add_input_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKTxAddInput * msg) { @@ -14102,9 +15424,6 @@ static inline LDKChannelMessageHandler LDKChannelMessageHandler_init (JSValue o, .handle_shutdown = handle_shutdown_LDKChannelMessageHandler_jcall, .handle_closing_signed = handle_closing_signed_LDKChannelMessageHandler_jcall, .handle_stfu = handle_stfu_LDKChannelMessageHandler_jcall, - .handle_splice = handle_splice_LDKChannelMessageHandler_jcall, - .handle_splice_ack = handle_splice_ack_LDKChannelMessageHandler_jcall, - .handle_splice_locked = handle_splice_locked_LDKChannelMessageHandler_jcall, .handle_tx_add_input = handle_tx_add_input_LDKChannelMessageHandler_jcall, .handle_tx_add_output = handle_tx_add_output_LDKChannelMessageHandler_jcall, .handle_tx_remove_input = handle_tx_remove_input_LDKChannelMessageHandler_jcall, @@ -14291,51 +15610,6 @@ void __attribute__((export_name("TS_ChannelMessageHandler_handle_stfu"))) TS_Ch (this_arg_conv->handle_stfu)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv); } -void __attribute__((export_name("TS_ChannelMessageHandler_handle_splice"))) TS_ChannelMessageHandler_handle_splice(uint64_t this_arg, int8_tArray their_node_id, uint64_t msg) { - void* this_arg_ptr = untag_ptr(this_arg); - if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } - LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr; - LDKPublicKey their_node_id_ref; - CHECK(their_node_id->arr_len == 33); - memcpy(their_node_id_ref.compressed_form, their_node_id->elems, 33); FREE(their_node_id); - LDKSplice msg_conv; - msg_conv.inner = untag_ptr(msg); - msg_conv.is_owned = ptr_is_owned(msg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv); - msg_conv.is_owned = false; - (this_arg_conv->handle_splice)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv); -} - -void __attribute__((export_name("TS_ChannelMessageHandler_handle_splice_ack"))) TS_ChannelMessageHandler_handle_splice_ack(uint64_t this_arg, int8_tArray their_node_id, uint64_t msg) { - void* this_arg_ptr = untag_ptr(this_arg); - if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } - LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr; - LDKPublicKey their_node_id_ref; - CHECK(their_node_id->arr_len == 33); - memcpy(their_node_id_ref.compressed_form, their_node_id->elems, 33); FREE(their_node_id); - LDKSpliceAck msg_conv; - msg_conv.inner = untag_ptr(msg); - msg_conv.is_owned = ptr_is_owned(msg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv); - msg_conv.is_owned = false; - (this_arg_conv->handle_splice_ack)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv); -} - -void __attribute__((export_name("TS_ChannelMessageHandler_handle_splice_locked"))) TS_ChannelMessageHandler_handle_splice_locked(uint64_t this_arg, int8_tArray their_node_id, uint64_t msg) { - void* this_arg_ptr = untag_ptr(this_arg); - if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } - LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr; - LDKPublicKey their_node_id_ref; - CHECK(their_node_id->arr_len == 33); - memcpy(their_node_id_ref.compressed_form, their_node_id->elems, 33); FREE(their_node_id); - LDKSpliceLocked msg_conv; - msg_conv.inner = untag_ptr(msg); - msg_conv.is_owned = ptr_is_owned(msg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv); - msg_conv.is_owned = false; - (this_arg_conv->handle_splice_locked)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv); -} - void __attribute__((export_name("TS_ChannelMessageHandler_handle_tx_add_input"))) TS_ChannelMessageHandler_handle_tx_add_input(uint64_t this_arg, int8_tArray their_node_id, uint64_t msg) { void* this_arg_ptr = untag_ptr(this_arg); if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } @@ -14795,6 +16069,55 @@ uint64_tArray __attribute__((export_name("TS_OffersMessageHandler_release_pendi return ret_arr; } +typedef struct LDKNodeIdLookUp_JCalls { + atomic_size_t refcnt; + uint32_t instance_ptr; +} LDKNodeIdLookUp_JCalls; +static void LDKNodeIdLookUp_JCalls_free(void* this_arg) { + LDKNodeIdLookUp_JCalls *j_calls = (LDKNodeIdLookUp_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + FREE(j_calls); + } +} +LDKPublicKey next_node_id_LDKNodeIdLookUp_jcall(const void* this_arg, uint64_t short_channel_id) { + LDKNodeIdLookUp_JCalls *j_calls = (LDKNodeIdLookUp_JCalls*) this_arg; + int64_t short_channel_id_conv = short_channel_id; + int8_tArray ret = (int8_tArray)js_invoke_function_buuuuu(j_calls->instance_ptr, 118, short_channel_id_conv, 0, 0, 0, 0, 0); + LDKPublicKey ret_ref; + CHECK(ret->arr_len == 33); + memcpy(ret_ref.compressed_form, ret->elems, 33); FREE(ret); + return ret_ref; +} +static void LDKNodeIdLookUp_JCalls_cloned(LDKNodeIdLookUp* new_obj) { + LDKNodeIdLookUp_JCalls *j_calls = (LDKNodeIdLookUp_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +} +static inline LDKNodeIdLookUp LDKNodeIdLookUp_init (JSValue o) { + LDKNodeIdLookUp_JCalls *calls = MALLOC(sizeof(LDKNodeIdLookUp_JCalls), "LDKNodeIdLookUp_JCalls"); + atomic_init(&calls->refcnt, 1); + calls->instance_ptr = o; + + LDKNodeIdLookUp ret = { + .this_arg = (void*) calls, + .next_node_id = next_node_id_LDKNodeIdLookUp_jcall, + .free = LDKNodeIdLookUp_JCalls_free, + }; + return ret; +} +uint64_t __attribute__((export_name("TS_LDKNodeIdLookUp_new"))) TS_LDKNodeIdLookUp_new(JSValue o) { + LDKNodeIdLookUp *res_ptr = MALLOC(sizeof(LDKNodeIdLookUp), "LDKNodeIdLookUp"); + *res_ptr = LDKNodeIdLookUp_init(o); + return tag_ptr(res_ptr, true); +} +int8_tArray __attribute__((export_name("TS_NodeIdLookUp_next_node_id"))) TS_NodeIdLookUp_next_node_id(uint64_t this_arg, int64_t short_channel_id) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKNodeIdLookUp* this_arg_conv = (LDKNodeIdLookUp*)this_arg_ptr; + int8_tArray ret_arr = init_int8_tArray(33, __LINE__); + memcpy(ret_arr->elems, (this_arg_conv->next_node_id)(this_arg_conv->this_arg, short_channel_id).compressed_form, 33); + return ret_arr; +} + typedef struct LDKRoutingMessageHandler_JCalls { atomic_size_t refcnt; uint32_t instance_ptr; @@ -14813,7 +16136,7 @@ LDKCResult_boolLightningErrorZ handle_node_announcement_LDKRoutingMessageHandler msg_var = NodeAnnouncement_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 118, msg_ref, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 119, msg_ref, 0, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr); @@ -14827,7 +16150,7 @@ LDKCResult_boolLightningErrorZ handle_channel_announcement_LDKRoutingMessageHand msg_var = ChannelAnnouncement_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 119, msg_ref, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 120, msg_ref, 0, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr); @@ -14841,7 +16164,7 @@ LDKCResult_boolLightningErrorZ handle_channel_update_LDKRoutingMessageHandler_jc msg_var = ChannelUpdate_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 120, msg_ref, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 121, msg_ref, 0, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr); @@ -14851,7 +16174,7 @@ LDKCResult_boolLightningErrorZ handle_channel_update_LDKRoutingMessageHandler_jc LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ get_next_channel_announcement_LDKRoutingMessageHandler_jcall(const void* this_arg, uint64_t starting_point) { LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg; int64_t starting_point_conv = starting_point; - uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 121, starting_point_conv, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 122, starting_point_conv, 0, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret_conv = *(LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ*)(ret_ptr); @@ -14864,7 +16187,7 @@ LDKNodeAnnouncement get_next_node_announcement_LDKRoutingMessageHandler_jcall(co uint64_t starting_point_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(starting_point_var); starting_point_ref = tag_ptr(starting_point_var.inner, starting_point_var.is_owned); - uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 122, starting_point_ref, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 123, starting_point_ref, 0, 0, 0, 0, 0); LDKNodeAnnouncement ret_conv; ret_conv.inner = untag_ptr(ret); ret_conv.is_owned = ptr_is_owned(ret); @@ -14881,7 +16204,7 @@ LDKCResult_NoneNoneZ peer_connected_LDKRoutingMessageHandler_jcall(const void* t CHECK_INNER_FIELD_ACCESS_OR_NULL(init_var); init_ref = tag_ptr(init_var.inner, init_var.is_owned); jboolean inbound_conv = inbound; - uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 123, (uint32_t)their_node_id_arr, init_ref, inbound_conv, 0, 0, 0); + uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 124, (uint32_t)their_node_id_arr, init_ref, inbound_conv, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr); @@ -14896,7 +16219,7 @@ LDKCResult_NoneLightningErrorZ handle_reply_channel_range_LDKRoutingMessageHandl uint64_t msg_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 124, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 125, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr); @@ -14911,7 +16234,7 @@ LDKCResult_NoneLightningErrorZ handle_reply_short_channel_ids_end_LDKRoutingMess uint64_t msg_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 125, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 126, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr); @@ -14926,7 +16249,7 @@ LDKCResult_NoneLightningErrorZ handle_query_channel_range_LDKRoutingMessageHandl uint64_t msg_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 126, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 127, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr); @@ -14941,7 +16264,7 @@ LDKCResult_NoneLightningErrorZ handle_query_short_channel_ids_LDKRoutingMessageH uint64_t msg_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 127, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 128, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr); @@ -14950,11 +16273,11 @@ LDKCResult_NoneLightningErrorZ handle_query_short_channel_ids_LDKRoutingMessageH } bool processing_queue_high_LDKRoutingMessageHandler_jcall(const void* this_arg) { LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg; - return js_invoke_function_uuuuuu(j_calls->instance_ptr, 128, 0, 0, 0, 0, 0, 0); + return js_invoke_function_uuuuuu(j_calls->instance_ptr, 129, 0, 0, 0, 0, 0, 0); } LDKNodeFeatures provided_node_features_LDKRoutingMessageHandler_jcall(const void* this_arg) { LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg; - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 129, 0, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 130, 0, 0, 0, 0, 0, 0); LDKNodeFeatures ret_conv; ret_conv.inner = untag_ptr(ret); ret_conv.is_owned = ptr_is_owned(ret); @@ -14965,7 +16288,7 @@ LDKInitFeatures provided_init_features_LDKRoutingMessageHandler_jcall(const void LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg; int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__); memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33); - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 130, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 131, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0); LDKInitFeatures ret_conv; ret_conv.inner = untag_ptr(ret); ret_conv.is_owned = ptr_is_owned(ret); @@ -15206,7 +16529,7 @@ static void LDKOnionMessageHandler_JCalls_free(void* this_arg) { } LDKCVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ get_and_clear_connections_needed_LDKOnionMessageHandler_jcall(const void* this_arg) { LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg; - uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 131, 0, 0, 0, 0, 0, 0); + uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 132, 0, 0, 0, 0, 0, 0); LDKCVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ ret_constr; ret_constr.datalen = ret->arr_len; if (ret_constr.datalen > 0) @@ -15234,13 +16557,13 @@ void handle_onion_message_LDKOnionMessageHandler_jcall(const void* this_arg, LDK msg_var = OnionMessage_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_ubuuuu(j_calls->instance_ptr, 132, (uint32_t)peer_node_id_arr, msg_ref, 0, 0, 0, 0); + js_invoke_function_ubuuuu(j_calls->instance_ptr, 133, (uint32_t)peer_node_id_arr, msg_ref, 0, 0, 0, 0); } LDKOnionMessage next_onion_message_for_peer_LDKOnionMessageHandler_jcall(const void* this_arg, LDKPublicKey peer_node_id) { LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg; int8_tArray peer_node_id_arr = init_int8_tArray(33, __LINE__); memcpy(peer_node_id_arr->elems, peer_node_id.compressed_form, 33); - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 133, (uint32_t)peer_node_id_arr, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 134, (uint32_t)peer_node_id_arr, 0, 0, 0, 0, 0); LDKOnionMessage ret_conv; ret_conv.inner = untag_ptr(ret); ret_conv.is_owned = ptr_is_owned(ret); @@ -15257,7 +16580,7 @@ LDKCResult_NoneNoneZ peer_connected_LDKOnionMessageHandler_jcall(const void* thi CHECK_INNER_FIELD_ACCESS_OR_NULL(init_var); init_ref = tag_ptr(init_var.inner, init_var.is_owned); jboolean inbound_conv = inbound; - uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 134, (uint32_t)their_node_id_arr, init_ref, inbound_conv, 0, 0, 0); + uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 135, (uint32_t)their_node_id_arr, init_ref, inbound_conv, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr); @@ -15268,15 +16591,15 @@ void peer_disconnected_LDKOnionMessageHandler_jcall(const void* this_arg, LDKPub LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg; int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__); memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33); - js_invoke_function_uuuuuu(j_calls->instance_ptr, 135, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0); + js_invoke_function_uuuuuu(j_calls->instance_ptr, 136, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0); } void timer_tick_occurred_LDKOnionMessageHandler_jcall(const void* this_arg) { LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg; - js_invoke_function_uuuuuu(j_calls->instance_ptr, 136, 0, 0, 0, 0, 0, 0); + js_invoke_function_uuuuuu(j_calls->instance_ptr, 137, 0, 0, 0, 0, 0, 0); } LDKNodeFeatures provided_node_features_LDKOnionMessageHandler_jcall(const void* this_arg) { LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg; - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 137, 0, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 138, 0, 0, 0, 0, 0, 0); LDKNodeFeatures ret_conv; ret_conv.inner = untag_ptr(ret); ret_conv.is_owned = ptr_is_owned(ret); @@ -15287,7 +16610,7 @@ LDKInitFeatures provided_init_features_LDKOnionMessageHandler_jcall(const void* LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg; int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__); memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33); - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 138, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 139, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0); LDKInitFeatures ret_conv; ret_conv.inner = untag_ptr(ret); ret_conv.is_owned = ptr_is_owned(ret); @@ -15444,7 +16767,7 @@ LDKCResult_COption_TypeZDecodeErrorZ read_LDKCustomMessageReader_jcall(const voi LDKu8slice buffer_var = buffer; int8_tArray buffer_arr = init_int8_tArray(buffer_var.datalen, __LINE__); memcpy(buffer_arr->elems, buffer_var.data, buffer_var.datalen); - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 139, message_type_conv, (uint32_t)buffer_arr, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 140, message_type_conv, (uint32_t)buffer_arr, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_COption_TypeZDecodeErrorZ ret_conv = *(LDKCResult_COption_TypeZDecodeErrorZ*)(ret_ptr); @@ -15502,7 +16825,7 @@ LDKCResult_NoneLightningErrorZ handle_custom_message_LDKCustomMessageHandler_jca *msg_ret = msg; int8_tArray sender_node_id_arr = init_int8_tArray(33, __LINE__); memcpy(sender_node_id_arr->elems, sender_node_id.compressed_form, 33); - uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 140, tag_ptr(msg_ret, true), (uint32_t)sender_node_id_arr, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 141, tag_ptr(msg_ret, true), (uint32_t)sender_node_id_arr, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr); @@ -15511,7 +16834,7 @@ LDKCResult_NoneLightningErrorZ handle_custom_message_LDKCustomMessageHandler_jca } LDKCVec_C2Tuple_PublicKeyTypeZZ get_and_clear_pending_msg_LDKCustomMessageHandler_jcall(const void* this_arg) { LDKCustomMessageHandler_JCalls *j_calls = (LDKCustomMessageHandler_JCalls*) this_arg; - uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 141, 0, 0, 0, 0, 0, 0); + uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 142, 0, 0, 0, 0, 0, 0); LDKCVec_C2Tuple_PublicKeyTypeZZ ret_constr; ret_constr.datalen = ret->arr_len; if (ret_constr.datalen > 0) @@ -15532,7 +16855,7 @@ LDKCVec_C2Tuple_PublicKeyTypeZZ get_and_clear_pending_msg_LDKCustomMessageHandle } LDKNodeFeatures provided_node_features_LDKCustomMessageHandler_jcall(const void* this_arg) { LDKCustomMessageHandler_JCalls *j_calls = (LDKCustomMessageHandler_JCalls*) this_arg; - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 142, 0, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 143, 0, 0, 0, 0, 0, 0); LDKNodeFeatures ret_conv; ret_conv.inner = untag_ptr(ret); ret_conv.is_owned = ptr_is_owned(ret); @@ -15543,7 +16866,7 @@ LDKInitFeatures provided_init_features_LDKCustomMessageHandler_jcall(const void* LDKCustomMessageHandler_JCalls *j_calls = (LDKCustomMessageHandler_JCalls*) this_arg; int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__); memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33); - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 143, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 144, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0); LDKInitFeatures ret_conv; ret_conv.inner = untag_ptr(ret); ret_conv.is_owned = ptr_is_owned(ret); @@ -15653,7 +16976,7 @@ LDKCOption_OnionMessageContentsZ handle_custom_message_LDKCustomOnionMessageHand LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) this_arg; LDKOnionMessageContents* msg_ret = MALLOC(sizeof(LDKOnionMessageContents), "LDKOnionMessageContents"); *msg_ret = msg; - uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 144, tag_ptr(msg_ret, true), 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 145, tag_ptr(msg_ret, true), 0, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCOption_OnionMessageContentsZ ret_conv = *(LDKCOption_OnionMessageContentsZ*)(ret_ptr); @@ -15666,7 +16989,7 @@ LDKCResult_COption_OnionMessageContentsZDecodeErrorZ read_custom_message_LDKCust LDKu8slice buffer_var = buffer; int8_tArray buffer_arr = init_int8_tArray(buffer_var.datalen, __LINE__); memcpy(buffer_arr->elems, buffer_var.data, buffer_var.datalen); - uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 145, message_type_conv, (uint32_t)buffer_arr, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 146, message_type_conv, (uint32_t)buffer_arr, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_COption_OnionMessageContentsZDecodeErrorZ ret_conv = *(LDKCResult_COption_OnionMessageContentsZDecodeErrorZ*)(ret_ptr); @@ -15675,7 +16998,7 @@ LDKCResult_COption_OnionMessageContentsZDecodeErrorZ read_custom_message_LDKCust } LDKCVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ release_pending_custom_messages_LDKCustomOnionMessageHandler_jcall(const void* this_arg) { LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) this_arg; - uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 146, 0, 0, 0, 0, 0, 0); + uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 147, 0, 0, 0, 0, 0, 0); LDKCVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ ret_constr; ret_constr.datalen = ret->arr_len; if (ret_constr.datalen > 0) @@ -15781,21 +17104,21 @@ uintptr_t send_data_LDKSocketDescriptor_jcall(void* this_arg, LDKu8slice data, b int8_tArray data_arr = init_int8_tArray(data_var.datalen, __LINE__); memcpy(data_arr->elems, data_var.data, data_var.datalen); jboolean resume_read_conv = resume_read; - return js_invoke_function_uuuuuu(j_calls->instance_ptr, 147, (uint32_t)data_arr, resume_read_conv, 0, 0, 0, 0); + return js_invoke_function_uuuuuu(j_calls->instance_ptr, 148, (uint32_t)data_arr, resume_read_conv, 0, 0, 0, 0); } void disconnect_socket_LDKSocketDescriptor_jcall(void* this_arg) { LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg; - js_invoke_function_uuuuuu(j_calls->instance_ptr, 148, 0, 0, 0, 0, 0, 0); + js_invoke_function_uuuuuu(j_calls->instance_ptr, 149, 0, 0, 0, 0, 0, 0); } bool eq_LDKSocketDescriptor_jcall(const void* this_arg, const LDKSocketDescriptor * other_arg) { LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg; LDKSocketDescriptor *other_arg_clone = MALLOC(sizeof(LDKSocketDescriptor), "LDKSocketDescriptor"); *other_arg_clone = SocketDescriptor_clone(other_arg); - return js_invoke_function_buuuuu(j_calls->instance_ptr, 149, tag_ptr(other_arg_clone, true), 0, 0, 0, 0, 0); + return js_invoke_function_buuuuu(j_calls->instance_ptr, 150, tag_ptr(other_arg_clone, true), 0, 0, 0, 0, 0); } uint64_t hash_LDKSocketDescriptor_jcall(const void* this_arg) { LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg; - return js_invoke_function_uuuuuu(j_calls->instance_ptr, 150, 0, 0, 0, 0, 0, 0); + return js_invoke_function_uuuuuu(j_calls->instance_ptr, 151, 0, 0, 0, 0, 0, 0); } static void LDKSocketDescriptor_JCalls_cloned(LDKSocketDescriptor* new_obj) { LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) new_obj->this_arg; @@ -15849,6 +17172,138 @@ int64_t __attribute__((export_name("TS_SocketDescriptor_hash"))) TS_SocketDescr return ret_conv; } +typedef struct LDKSignBolt12InvoiceFn_JCalls { + atomic_size_t refcnt; + uint32_t instance_ptr; +} LDKSignBolt12InvoiceFn_JCalls; +static void LDKSignBolt12InvoiceFn_JCalls_free(void* this_arg) { + LDKSignBolt12InvoiceFn_JCalls *j_calls = (LDKSignBolt12InvoiceFn_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + FREE(j_calls); + } +} +LDKCResult_SchnorrSignatureNoneZ sign_invoice_LDKSignBolt12InvoiceFn_jcall(const void* this_arg, const LDKUnsignedBolt12Invoice * message) { + LDKSignBolt12InvoiceFn_JCalls *j_calls = (LDKSignBolt12InvoiceFn_JCalls*) this_arg; + LDKUnsignedBolt12Invoice message_var = *message; + uint64_t message_ref = 0; + message_var = UnsignedBolt12Invoice_clone(&message_var); + CHECK_INNER_FIELD_ACCESS_OR_NULL(message_var); + message_ref = tag_ptr(message_var.inner, message_var.is_owned); + uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 152, message_ref, 0, 0, 0, 0, 0); + void* ret_ptr = untag_ptr(ret); + CHECK_ACCESS(ret_ptr); + LDKCResult_SchnorrSignatureNoneZ ret_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(ret_ptr); + FREE(untag_ptr(ret)); + return ret_conv; +} +static void LDKSignBolt12InvoiceFn_JCalls_cloned(LDKSignBolt12InvoiceFn* new_obj) { + LDKSignBolt12InvoiceFn_JCalls *j_calls = (LDKSignBolt12InvoiceFn_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +} +static inline LDKSignBolt12InvoiceFn LDKSignBolt12InvoiceFn_init (JSValue o) { + LDKSignBolt12InvoiceFn_JCalls *calls = MALLOC(sizeof(LDKSignBolt12InvoiceFn_JCalls), "LDKSignBolt12InvoiceFn_JCalls"); + atomic_init(&calls->refcnt, 1); + calls->instance_ptr = o; + + LDKSignBolt12InvoiceFn ret = { + .this_arg = (void*) calls, + .sign_invoice = sign_invoice_LDKSignBolt12InvoiceFn_jcall, + .free = LDKSignBolt12InvoiceFn_JCalls_free, + }; + return ret; +} +uint64_t __attribute__((export_name("TS_LDKSignBolt12InvoiceFn_new"))) TS_LDKSignBolt12InvoiceFn_new(JSValue o) { + LDKSignBolt12InvoiceFn *res_ptr = MALLOC(sizeof(LDKSignBolt12InvoiceFn), "LDKSignBolt12InvoiceFn"); + *res_ptr = LDKSignBolt12InvoiceFn_init(o); + return tag_ptr(res_ptr, true); +} +uint64_t __attribute__((export_name("TS_SignBolt12InvoiceFn_sign_invoice"))) TS_SignBolt12InvoiceFn_sign_invoice(uint64_t this_arg, uint64_t message) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKSignBolt12InvoiceFn* this_arg_conv = (LDKSignBolt12InvoiceFn*)this_arg_ptr; + LDKUnsignedBolt12Invoice message_conv; + message_conv.inner = untag_ptr(message); + message_conv.is_owned = ptr_is_owned(message); + CHECK_INNER_FIELD_ACCESS_OR_NULL(message_conv); + message_conv.is_owned = false; + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = (this_arg_conv->sign_invoice)(this_arg_conv->this_arg, &message_conv); + return tag_ptr(ret_conv, true); +} + +typedef struct LDKSignInvoiceRequestFn_JCalls { + atomic_size_t refcnt; + uint32_t instance_ptr; +} LDKSignInvoiceRequestFn_JCalls; +static void LDKSignInvoiceRequestFn_JCalls_free(void* this_arg) { + LDKSignInvoiceRequestFn_JCalls *j_calls = (LDKSignInvoiceRequestFn_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + FREE(j_calls); + } +} +LDKCResult_SchnorrSignatureNoneZ sign_invoice_request_LDKSignInvoiceRequestFn_jcall(const void* this_arg, const LDKUnsignedInvoiceRequest * message) { + LDKSignInvoiceRequestFn_JCalls *j_calls = (LDKSignInvoiceRequestFn_JCalls*) this_arg; + LDKUnsignedInvoiceRequest message_var = *message; + uint64_t message_ref = 0; + message_var = UnsignedInvoiceRequest_clone(&message_var); + CHECK_INNER_FIELD_ACCESS_OR_NULL(message_var); + message_ref = tag_ptr(message_var.inner, message_var.is_owned); + uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 153, message_ref, 0, 0, 0, 0, 0); + void* ret_ptr = untag_ptr(ret); + CHECK_ACCESS(ret_ptr); + LDKCResult_SchnorrSignatureNoneZ ret_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(ret_ptr); + FREE(untag_ptr(ret)); + return ret_conv; +} +static void LDKSignInvoiceRequestFn_JCalls_cloned(LDKSignInvoiceRequestFn* new_obj) { + LDKSignInvoiceRequestFn_JCalls *j_calls = (LDKSignInvoiceRequestFn_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +} +static inline LDKSignInvoiceRequestFn LDKSignInvoiceRequestFn_init (JSValue o) { + LDKSignInvoiceRequestFn_JCalls *calls = MALLOC(sizeof(LDKSignInvoiceRequestFn_JCalls), "LDKSignInvoiceRequestFn_JCalls"); + atomic_init(&calls->refcnt, 1); + calls->instance_ptr = o; + + LDKSignInvoiceRequestFn ret = { + .this_arg = (void*) calls, + .sign_invoice_request = sign_invoice_request_LDKSignInvoiceRequestFn_jcall, + .free = LDKSignInvoiceRequestFn_JCalls_free, + }; + return ret; +} +uint64_t __attribute__((export_name("TS_LDKSignInvoiceRequestFn_new"))) TS_LDKSignInvoiceRequestFn_new(JSValue o) { + LDKSignInvoiceRequestFn *res_ptr = MALLOC(sizeof(LDKSignInvoiceRequestFn), "LDKSignInvoiceRequestFn"); + *res_ptr = LDKSignInvoiceRequestFn_init(o); + return tag_ptr(res_ptr, true); +} +uint64_t __attribute__((export_name("TS_SignInvoiceRequestFn_sign_invoice_request"))) TS_SignInvoiceRequestFn_sign_invoice_request(uint64_t this_arg, uint64_t message) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKSignInvoiceRequestFn* this_arg_conv = (LDKSignInvoiceRequestFn*)this_arg_ptr; + LDKUnsignedInvoiceRequest message_conv; + message_conv.inner = untag_ptr(message); + message_conv.is_owned = ptr_is_owned(message); + CHECK_INNER_FIELD_ACCESS_OR_NULL(message_conv); + message_conv.is_owned = false; + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = (this_arg_conv->sign_invoice_request)(this_arg_conv->this_arg, &message_conv); + return tag_ptr(ret_conv, true); +} + +uint32_t __attribute__((export_name("TS_LDKSignError_ty_from_ptr"))) TS_LDKSignError_ty_from_ptr(uint64_t ptr) { + LDKSignError *obj = (LDKSignError*)untag_ptr(ptr); + switch(obj->tag) { + case LDKSignError_Signing: return 0; + case LDKSignError_Verification: return 1; + default: abort(); + } +} +uint32_t __attribute__((export_name("TS_LDKSignError_Verification_get_verification"))) TS_LDKSignError_Verification_get_verification(uint64_t ptr) { + LDKSignError *obj = (LDKSignError*)untag_ptr(ptr); + assert(obj->tag == LDKSignError_Verification); + uint32_t verification_conv = LDKSecp256k1Error_to_js(obj->verification); + return verification_conv; +} uint32_t __attribute__((export_name("TS_LDKEffectiveCapacity_ty_from_ptr"))) TS_LDKEffectiveCapacity_ty_from_ptr(uint64_t ptr) { LDKEffectiveCapacity *obj = (LDKEffectiveCapacity*)untag_ptr(ptr); switch(obj->tag) { @@ -15977,7 +17432,7 @@ static void LDKScore_JCalls_free(void* this_arg) { } LDKCVec_u8Z write_LDKScore_jcall(const void* this_arg) { LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg; - int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 151, 0, 0, 0, 0, 0, 0); + int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 154, 0, 0, 0, 0, 0, 0); LDKCVec_u8Z ret_ref; ret_ref.datalen = ret->arr_len; ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes"); @@ -16022,6 +17477,33 @@ int8_tArray __attribute__((export_name("TS_Score_write"))) TS_Score_write(uint6 return ret_arr; } +uint32_t __attribute__((export_name("TS_LDKIntroductionNode_ty_from_ptr"))) TS_LDKIntroductionNode_ty_from_ptr(uint64_t ptr) { + LDKIntroductionNode *obj = (LDKIntroductionNode*)untag_ptr(ptr); + switch(obj->tag) { + case LDKIntroductionNode_NodeId: return 0; + case LDKIntroductionNode_DirectedShortChannelId: return 1; + default: abort(); + } +} +int8_tArray __attribute__((export_name("TS_LDKIntroductionNode_NodeId_get_node_id"))) TS_LDKIntroductionNode_NodeId_get_node_id(uint64_t ptr) { + LDKIntroductionNode *obj = (LDKIntroductionNode*)untag_ptr(ptr); + assert(obj->tag == LDKIntroductionNode_NodeId); + int8_tArray node_id_arr = init_int8_tArray(33, __LINE__); + memcpy(node_id_arr->elems, obj->node_id.compressed_form, 33); + return node_id_arr; +} +uint32_t __attribute__((export_name("TS_LDKIntroductionNode_DirectedShortChannelId_get__0"))) TS_LDKIntroductionNode_DirectedShortChannelId_get__0(uint64_t ptr) { + LDKIntroductionNode *obj = (LDKIntroductionNode*)untag_ptr(ptr); + assert(obj->tag == LDKIntroductionNode_DirectedShortChannelId); + uint32_t _0_conv = LDKDirection_to_js(obj->directed_short_channel_id._0); + return _0_conv; +} +int64_t __attribute__((export_name("TS_LDKIntroductionNode_DirectedShortChannelId_get__1"))) TS_LDKIntroductionNode_DirectedShortChannelId_get__1(uint64_t ptr) { + LDKIntroductionNode *obj = (LDKIntroductionNode*)untag_ptr(ptr); + assert(obj->tag == LDKIntroductionNode_DirectedShortChannelId); + int64_t _1_conv = obj->directed_short_channel_id._1; + return _1_conv; +} typedef struct LDKCoinSelectionSource_JCalls { atomic_size_t refcnt; uint32_t instance_ptr; @@ -16061,7 +17543,7 @@ LDKCResult_CoinSelectionNoneZ select_confirmed_utxos_LDKCoinSelectionSource_jcal FREE(must_pay_to_var.data); int32_t target_feerate_sat_per_1000_weight_conv = target_feerate_sat_per_1000_weight; - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 152, (uint32_t)claim_id_arr, (uint32_t)must_spend_arr, (uint32_t)must_pay_to_arr, target_feerate_sat_per_1000_weight_conv, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 155, (uint32_t)claim_id_arr, (uint32_t)must_spend_arr, (uint32_t)must_pay_to_arr, target_feerate_sat_per_1000_weight_conv, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_CoinSelectionNoneZ ret_conv = *(LDKCResult_CoinSelectionNoneZ*)(ret_ptr); @@ -16074,7 +17556,7 @@ LDKCResult_TransactionNoneZ sign_psbt_LDKCoinSelectionSource_jcall(const void* t int8_tArray psbt_arr = init_int8_tArray(psbt_var.datalen, __LINE__); memcpy(psbt_arr->elems, psbt_var.data, psbt_var.datalen); CVec_u8Z_free(psbt_var); - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 153, (uint32_t)psbt_arr, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 156, (uint32_t)psbt_arr, 0, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_TransactionNoneZ ret_conv = *(LDKCResult_TransactionNoneZ*)(ret_ptr); @@ -16173,7 +17655,7 @@ static void LDKWalletSource_JCalls_free(void* this_arg) { } LDKCResult_CVec_UtxoZNoneZ list_confirmed_utxos_LDKWalletSource_jcall(const void* this_arg) { LDKWalletSource_JCalls *j_calls = (LDKWalletSource_JCalls*) this_arg; - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 154, 0, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 157, 0, 0, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_CVec_UtxoZNoneZ ret_conv = *(LDKCResult_CVec_UtxoZNoneZ*)(ret_ptr); @@ -16182,7 +17664,7 @@ LDKCResult_CVec_UtxoZNoneZ list_confirmed_utxos_LDKWalletSource_jcall(const void } LDKCResult_CVec_u8ZNoneZ get_change_script_LDKWalletSource_jcall(const void* this_arg) { LDKWalletSource_JCalls *j_calls = (LDKWalletSource_JCalls*) this_arg; - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 155, 0, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 158, 0, 0, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_CVec_u8ZNoneZ ret_conv = *(LDKCResult_CVec_u8ZNoneZ*)(ret_ptr); @@ -16195,7 +17677,7 @@ LDKCResult_TransactionNoneZ sign_psbt_LDKWalletSource_jcall(const void* this_arg int8_tArray psbt_arr = init_int8_tArray(psbt_var.datalen, __LINE__); memcpy(psbt_arr->elems, psbt_var.data, psbt_var.datalen); CVec_u8Z_free(psbt_var); - uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 156, (uint32_t)psbt_arr, 0, 0, 0, 0, 0); + uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 159, (uint32_t)psbt_arr, 0, 0, 0, 0, 0); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_TransactionNoneZ ret_conv = *(LDKCResult_TransactionNoneZ*)(ret_ptr); @@ -16413,6 +17895,24 @@ uint64_t __attribute__((export_name("TS_BigEndianScalar_new"))) TS_BigEndianSca return tag_ptr(ret_ref, true); } +static inline uint64_t BigEndianScalar_clone_ptr(LDKBigEndianScalar *NONNULL_PTR arg) { + LDKBigEndianScalar* ret_ref = MALLOC(sizeof(LDKBigEndianScalar), "LDKBigEndianScalar"); + *ret_ref = BigEndianScalar_clone(arg); + return tag_ptr(ret_ref, true); +} +int64_t __attribute__((export_name("TS_BigEndianScalar_clone_ptr"))) TS_BigEndianScalar_clone_ptr(uint64_t arg) { + LDKBigEndianScalar* arg_conv = (LDKBigEndianScalar*)untag_ptr(arg); + int64_t ret_conv = BigEndianScalar_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_BigEndianScalar_clone"))) TS_BigEndianScalar_clone(uint64_t orig) { + LDKBigEndianScalar* orig_conv = (LDKBigEndianScalar*)untag_ptr(orig); + LDKBigEndianScalar* ret_ref = MALLOC(sizeof(LDKBigEndianScalar), "LDKBigEndianScalar"); + *ret_ref = BigEndianScalar_clone(orig_conv); + return tag_ptr(ret_ref, true); +} + static inline uint64_t Bech32Error_clone_ptr(LDKBech32Error *NONNULL_PTR arg) { LDKBech32Error *ret_copy = MALLOC(sizeof(LDKBech32Error), "LDKBech32Error"); *ret_copy = Bech32Error_clone(arg); @@ -16579,6 +18079,116 @@ void __attribute__((export_name("TS_Str_free"))) TS_Str_free(jstring _res) { Str_free(dummy); } +void __attribute__((export_name("TS_CVec_u8Z_free"))) TS_CVec_u8Z_free(int8_tArray _res) { + LDKCVec_u8Z _res_ref; + _res_ref.datalen = _res->arr_len; + _res_ref.data = MALLOC(_res_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(_res_ref.data, _res->elems, _res_ref.datalen); FREE(_res); + CVec_u8Z_free(_res_ref); +} + +uint64_t __attribute__((export_name("TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok"))) TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(uint64_t o) { + LDKRefundMaybeWithDerivedMetadataBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&o_conv); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err"))) TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(uint32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_js(e); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok"))) TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(uint64_t o) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free"))) TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr"))) TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* arg_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone"))) TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(uint64_t orig) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* orig_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_RefundBolt12SemanticErrorZ_ok"))) TS_CResult_RefundBolt12SemanticErrorZ_ok(uint64_t o) { + LDKRefund o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = Refund_clone(&o_conv); + LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_RefundBolt12SemanticErrorZ_err"))) TS_CResult_RefundBolt12SemanticErrorZ_err(uint32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_js(e); + LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_RefundBolt12SemanticErrorZ_is_ok"))) TS_CResult_RefundBolt12SemanticErrorZ_is_ok(uint64_t o) { + LDKCResult_RefundBolt12SemanticErrorZ* o_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_RefundBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_RefundBolt12SemanticErrorZ_free"))) TS_CResult_RefundBolt12SemanticErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_RefundBolt12SemanticErrorZ _res_conv = *(LDKCResult_RefundBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_RefundBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_RefundBolt12SemanticErrorZ_clone_ptr(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_RefundBolt12SemanticErrorZ_clone_ptr"))) TS_CResult_RefundBolt12SemanticErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_RefundBolt12SemanticErrorZ* arg_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_RefundBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_RefundBolt12SemanticErrorZ_clone"))) TS_CResult_RefundBolt12SemanticErrorZ_clone(uint64_t orig) { + LDKCResult_RefundBolt12SemanticErrorZ* orig_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + uint64_t __attribute__((export_name("TS_COption_u64Z_some"))) TS_COption_u64Z_some(int64_t o) { LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z"); *ret_copy = COption_u64Z_some(o); @@ -16885,14 +18495,6 @@ uint64_t __attribute__((export_name("TS_COption_ThirtyTwoBytesZ_clone"))) TS_CO return ret_ref; } -void __attribute__((export_name("TS_CVec_u8Z_free"))) TS_CVec_u8Z_free(int8_tArray _res) { - LDKCVec_u8Z _res_ref; - _res_ref.datalen = _res->arr_len; - _res_ref.data = MALLOC(_res_ref.datalen, "LDKCVec_u8Z Bytes"); - memcpy(_res_ref.data, _res->elems, _res_ref.datalen); FREE(_res); - CVec_u8Z_free(_res_ref); -} - uint64_t __attribute__((export_name("TS_COption_CVec_u8ZZ_some"))) TS_COption_CVec_u8ZZ_some(int8_tArray o) { LDKCVec_u8Z o_ref; o_ref.datalen = o->arr_len; @@ -17101,6 +18703,156 @@ uint64_t __attribute__((export_name("TS_CResult_RecipientOnionFieldsNoneZ_clone return tag_ptr(ret_conv, true); } +uint64_t __attribute__((export_name("TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok"))) TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok(uint64_t o) { + LDKUnsignedBolt12Invoice o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = UnsignedBolt12Invoice_clone(&o_conv); + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err"))) TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err(uint32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_js(e); + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok"))) TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(uint64_t o) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* o_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free"))) TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ _res_conv = *(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr"))) TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* arg_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone"))) TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(uint64_t orig) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* orig_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok"))) TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok(uint64_t o) { + LDKBolt12Invoice o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = Bolt12Invoice_clone(&o_conv); + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_err"))) TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_err(uint32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_js(e); + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok"))) TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(uint64_t o) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* o_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_free"))) TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ _res_conv = *(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_Bolt12InvoiceBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr"))) TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* arg_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone"))) TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(uint64_t orig) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* orig_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_SchnorrSignatureNoneZ_ok"))) TS_CResult_SchnorrSignatureNoneZ_ok(int8_tArray o) { + LDKSchnorrSignature o_ref; + CHECK(o->arr_len == 64); + memcpy(o_ref.compact_form, o->elems, 64); FREE(o); + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = CResult_SchnorrSignatureNoneZ_ok(o_ref); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_SchnorrSignatureNoneZ_err"))) TS_CResult_SchnorrSignatureNoneZ_err() { + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = CResult_SchnorrSignatureNoneZ_err(); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_SchnorrSignatureNoneZ_is_ok"))) TS_CResult_SchnorrSignatureNoneZ_is_ok(uint64_t o) { + LDKCResult_SchnorrSignatureNoneZ* o_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(o); + jboolean ret_conv = CResult_SchnorrSignatureNoneZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_SchnorrSignatureNoneZ_free"))) TS_CResult_SchnorrSignatureNoneZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_SchnorrSignatureNoneZ _res_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_SchnorrSignatureNoneZ_free(_res_conv); +} + +static inline uint64_t CResult_SchnorrSignatureNoneZ_clone_ptr(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR arg) { + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = CResult_SchnorrSignatureNoneZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_SchnorrSignatureNoneZ_clone_ptr"))) TS_CResult_SchnorrSignatureNoneZ_clone_ptr(uint64_t arg) { + LDKCResult_SchnorrSignatureNoneZ* arg_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(arg); + int64_t ret_conv = CResult_SchnorrSignatureNoneZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_SchnorrSignatureNoneZ_clone"))) TS_CResult_SchnorrSignatureNoneZ_clone(uint64_t orig) { + LDKCResult_SchnorrSignatureNoneZ* orig_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(orig); + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = CResult_SchnorrSignatureNoneZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + void __attribute__((export_name("TS_CVec_ThirtyTwoBytesZ_free"))) TS_CVec_ThirtyTwoBytesZ_free(ptrArray _res) { LDKCVec_ThirtyTwoBytesZ _res_constr; _res_constr.datalen = _res->arr_len; @@ -17178,6 +18930,100 @@ uint64_t __attribute__((export_name("TS_COption_CVec_ThirtyTwoBytesZZ_clone"))) return ret_ref; } +uint64_t __attribute__((export_name("TS_COption_AmountZ_some"))) TS_COption_AmountZ_some(uint64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKAmount o_conv = *(LDKAmount*)(o_ptr); + o_conv = Amount_clone((LDKAmount*)untag_ptr(o)); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = COption_AmountZ_some(o_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_COption_AmountZ_none"))) TS_COption_AmountZ_none() { + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = COption_AmountZ_none(); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void __attribute__((export_name("TS_COption_AmountZ_free"))) TS_COption_AmountZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCOption_AmountZ _res_conv = *(LDKCOption_AmountZ*)(_res_ptr); + FREE(untag_ptr(_res)); + COption_AmountZ_free(_res_conv); +} + +static inline uint64_t COption_AmountZ_clone_ptr(LDKCOption_AmountZ *NONNULL_PTR arg) { + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = COption_AmountZ_clone(arg); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t __attribute__((export_name("TS_COption_AmountZ_clone_ptr"))) TS_COption_AmountZ_clone_ptr(uint64_t arg) { + LDKCOption_AmountZ* arg_conv = (LDKCOption_AmountZ*)untag_ptr(arg); + int64_t ret_conv = COption_AmountZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_COption_AmountZ_clone"))) TS_COption_AmountZ_clone(uint64_t orig) { + LDKCOption_AmountZ* orig_conv = (LDKCOption_AmountZ*)untag_ptr(orig); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = COption_AmountZ_clone(orig_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_COption_QuantityZ_some"))) TS_COption_QuantityZ_some(uint64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKQuantity o_conv = *(LDKQuantity*)(o_ptr); + o_conv = Quantity_clone((LDKQuantity*)untag_ptr(o)); + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = COption_QuantityZ_some(o_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_COption_QuantityZ_none"))) TS_COption_QuantityZ_none() { + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = COption_QuantityZ_none(); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void __attribute__((export_name("TS_COption_QuantityZ_free"))) TS_COption_QuantityZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCOption_QuantityZ _res_conv = *(LDKCOption_QuantityZ*)(_res_ptr); + FREE(untag_ptr(_res)); + COption_QuantityZ_free(_res_conv); +} + +static inline uint64_t COption_QuantityZ_clone_ptr(LDKCOption_QuantityZ *NONNULL_PTR arg) { + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = COption_QuantityZ_clone(arg); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t __attribute__((export_name("TS_COption_QuantityZ_clone_ptr"))) TS_COption_QuantityZ_clone_ptr(uint64_t arg) { + LDKCOption_QuantityZ* arg_conv = (LDKCOption_QuantityZ*)untag_ptr(arg); + int64_t ret_conv = COption_QuantityZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_COption_QuantityZ_clone"))) TS_COption_QuantityZ_clone(uint64_t orig) { + LDKCOption_QuantityZ* orig_conv = (LDKCOption_QuantityZ*)untag_ptr(orig); + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = COption_QuantityZ_clone(orig_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + uint64_t __attribute__((export_name("TS_CResult_ThirtyTwoBytesNoneZ_ok"))) TS_CResult_ThirtyTwoBytesNoneZ_ok(int8_tArray o) { LDKThirtyTwoBytes o_ref; CHECK(o->arr_len == 32); @@ -17815,7 +19661,7 @@ uint64_t __attribute__((export_name("TS_COption_BigEndianScalarZ_some"))) TS_CO void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); LDKBigEndianScalar o_conv = *(LDKBigEndianScalar*)(o_ptr); - // WARNING: we may need a move here but no clone is available for LDKBigEndianScalar + o_conv = BigEndianScalar_clone((LDKBigEndianScalar*)untag_ptr(o)); LDKCOption_BigEndianScalarZ *ret_copy = MALLOC(sizeof(LDKCOption_BigEndianScalarZ), "LDKCOption_BigEndianScalarZ"); *ret_copy = COption_BigEndianScalarZ_some(o_conv); uint64_t ret_ref = tag_ptr(ret_copy, true); @@ -17923,54 +19769,6 @@ uint64_t __attribute__((export_name("TS_CResult_RecoverableSignatureNoneZ_clone return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_CResult_SchnorrSignatureNoneZ_ok"))) TS_CResult_SchnorrSignatureNoneZ_ok(int8_tArray o) { - LDKSchnorrSignature o_ref; - CHECK(o->arr_len == 64); - memcpy(o_ref.compact_form, o->elems, 64); FREE(o); - LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); - *ret_conv = CResult_SchnorrSignatureNoneZ_ok(o_ref); - return tag_ptr(ret_conv, true); -} - -uint64_t __attribute__((export_name("TS_CResult_SchnorrSignatureNoneZ_err"))) TS_CResult_SchnorrSignatureNoneZ_err() { - LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); - *ret_conv = CResult_SchnorrSignatureNoneZ_err(); - return tag_ptr(ret_conv, true); -} - -jboolean __attribute__((export_name("TS_CResult_SchnorrSignatureNoneZ_is_ok"))) TS_CResult_SchnorrSignatureNoneZ_is_ok(uint64_t o) { - LDKCResult_SchnorrSignatureNoneZ* o_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(o); - jboolean ret_conv = CResult_SchnorrSignatureNoneZ_is_ok(o_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_CResult_SchnorrSignatureNoneZ_free"))) TS_CResult_SchnorrSignatureNoneZ_free(uint64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKCResult_SchnorrSignatureNoneZ _res_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(_res_ptr); - FREE(untag_ptr(_res)); - CResult_SchnorrSignatureNoneZ_free(_res_conv); -} - -static inline uint64_t CResult_SchnorrSignatureNoneZ_clone_ptr(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR arg) { - LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); - *ret_conv = CResult_SchnorrSignatureNoneZ_clone(arg); - return tag_ptr(ret_conv, true); -} -int64_t __attribute__((export_name("TS_CResult_SchnorrSignatureNoneZ_clone_ptr"))) TS_CResult_SchnorrSignatureNoneZ_clone_ptr(uint64_t arg) { - LDKCResult_SchnorrSignatureNoneZ* arg_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(arg); - int64_t ret_conv = CResult_SchnorrSignatureNoneZ_clone_ptr(arg_conv); - return ret_conv; -} - -uint64_t __attribute__((export_name("TS_CResult_SchnorrSignatureNoneZ_clone"))) TS_CResult_SchnorrSignatureNoneZ_clone(uint64_t orig) { - LDKCResult_SchnorrSignatureNoneZ* orig_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(orig); - LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); - *ret_conv = CResult_SchnorrSignatureNoneZ_clone(orig_conv); - return tag_ptr(ret_conv, true); -} - uint64_t __attribute__((export_name("TS_CResult_ECDSASignatureNoneZ_ok"))) TS_CResult_ECDSASignatureNoneZ_ok(int8_tArray o) { LDKECDSASignature o_ref; CHECK(o->arr_len == 64); @@ -18019,6 +19817,56 @@ uint64_t __attribute__((export_name("TS_CResult_ECDSASignatureNoneZ_clone"))) T return tag_ptr(ret_conv, true); } +uint64_t __attribute__((export_name("TS_CResult_TransactionNoneZ_ok"))) TS_CResult_TransactionNoneZ_ok(int8_tArray o) { + LDKTransaction o_ref; + o_ref.datalen = o->arr_len; + o_ref.data = MALLOC(o_ref.datalen, "LDKTransaction Bytes"); + memcpy(o_ref.data, o->elems, o_ref.datalen); FREE(o); + o_ref.data_is_owned = true; + LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); + *ret_conv = CResult_TransactionNoneZ_ok(o_ref); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_TransactionNoneZ_err"))) TS_CResult_TransactionNoneZ_err() { + LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); + *ret_conv = CResult_TransactionNoneZ_err(); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_TransactionNoneZ_is_ok"))) TS_CResult_TransactionNoneZ_is_ok(uint64_t o) { + LDKCResult_TransactionNoneZ* o_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(o); + jboolean ret_conv = CResult_TransactionNoneZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_TransactionNoneZ_free"))) TS_CResult_TransactionNoneZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_TransactionNoneZ _res_conv = *(LDKCResult_TransactionNoneZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_TransactionNoneZ_free(_res_conv); +} + +static inline uint64_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg) { + LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); + *ret_conv = CResult_TransactionNoneZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_TransactionNoneZ_clone_ptr"))) TS_CResult_TransactionNoneZ_clone_ptr(uint64_t arg) { + LDKCResult_TransactionNoneZ* arg_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(arg); + int64_t ret_conv = CResult_TransactionNoneZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_TransactionNoneZ_clone"))) TS_CResult_TransactionNoneZ_clone(uint64_t orig) { + LDKCResult_TransactionNoneZ* orig_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(orig); + LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); + *ret_conv = CResult_TransactionNoneZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + uint64_t __attribute__((export_name("TS_CResult_WriteableEcdsaChannelSignerDecodeErrorZ_ok"))) TS_CResult_WriteableEcdsaChannelSignerDecodeErrorZ_ok(uint64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -18483,56 +20331,6 @@ uint64_t __attribute__((export_name("TS_CResult_InMemorySignerDecodeErrorZ_clon return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_CResult_TransactionNoneZ_ok"))) TS_CResult_TransactionNoneZ_ok(int8_tArray o) { - LDKTransaction o_ref; - o_ref.datalen = o->arr_len; - o_ref.data = MALLOC(o_ref.datalen, "LDKTransaction Bytes"); - memcpy(o_ref.data, o->elems, o_ref.datalen); FREE(o); - o_ref.data_is_owned = true; - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = CResult_TransactionNoneZ_ok(o_ref); - return tag_ptr(ret_conv, true); -} - -uint64_t __attribute__((export_name("TS_CResult_TransactionNoneZ_err"))) TS_CResult_TransactionNoneZ_err() { - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = CResult_TransactionNoneZ_err(); - return tag_ptr(ret_conv, true); -} - -jboolean __attribute__((export_name("TS_CResult_TransactionNoneZ_is_ok"))) TS_CResult_TransactionNoneZ_is_ok(uint64_t o) { - LDKCResult_TransactionNoneZ* o_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(o); - jboolean ret_conv = CResult_TransactionNoneZ_is_ok(o_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_CResult_TransactionNoneZ_free"))) TS_CResult_TransactionNoneZ_free(uint64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKCResult_TransactionNoneZ _res_conv = *(LDKCResult_TransactionNoneZ*)(_res_ptr); - FREE(untag_ptr(_res)); - CResult_TransactionNoneZ_free(_res_conv); -} - -static inline uint64_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg) { - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = CResult_TransactionNoneZ_clone(arg); - return tag_ptr(ret_conv, true); -} -int64_t __attribute__((export_name("TS_CResult_TransactionNoneZ_clone_ptr"))) TS_CResult_TransactionNoneZ_clone_ptr(uint64_t arg) { - LDKCResult_TransactionNoneZ* arg_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(arg); - int64_t ret_conv = CResult_TransactionNoneZ_clone_ptr(arg_conv); - return ret_conv; -} - -uint64_t __attribute__((export_name("TS_CResult_TransactionNoneZ_clone"))) TS_CResult_TransactionNoneZ_clone(uint64_t orig) { - LDKCResult_TransactionNoneZ* orig_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(orig); - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = CResult_TransactionNoneZ_clone(orig_conv); - return tag_ptr(ret_conv, true); -} - void __attribute__((export_name("TS_CVec_ChannelDetailsZ_free"))) TS_CVec_ChannelDetailsZ_free(uint64_tArray _res) { LDKCVec_ChannelDetailsZ _res_constr; _res_constr.datalen = _res->arr_len; @@ -19714,6 +21512,60 @@ void __attribute__((export_name("TS_CResult_ProbabilisticScorerDecodeErrorZ_fre CResult_ProbabilisticScorerDecodeErrorZ_free(_res_conv); } +uint64_t __attribute__((export_name("TS_CResult_BestBlockDecodeErrorZ_ok"))) TS_CResult_BestBlockDecodeErrorZ_ok(uint64_t o) { + LDKBestBlock o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = BestBlock_clone(&o_conv); + LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ"); + *ret_conv = CResult_BestBlockDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_BestBlockDecodeErrorZ_err"))) TS_CResult_BestBlockDecodeErrorZ_err(uint64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ"); + *ret_conv = CResult_BestBlockDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_BestBlockDecodeErrorZ_is_ok"))) TS_CResult_BestBlockDecodeErrorZ_is_ok(uint64_t o) { + LDKCResult_BestBlockDecodeErrorZ* o_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_BestBlockDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_BestBlockDecodeErrorZ_free"))) TS_CResult_BestBlockDecodeErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_BestBlockDecodeErrorZ _res_conv = *(LDKCResult_BestBlockDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_BestBlockDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_BestBlockDecodeErrorZ_clone_ptr(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ"); + *ret_conv = CResult_BestBlockDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_BestBlockDecodeErrorZ_clone_ptr"))) TS_CResult_BestBlockDecodeErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_BestBlockDecodeErrorZ* arg_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_BestBlockDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_BestBlockDecodeErrorZ_clone"))) TS_CResult_BestBlockDecodeErrorZ_clone(uint64_t orig) { + LDKCResult_BestBlockDecodeErrorZ* orig_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(orig); + LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ"); + *ret_conv = CResult_BestBlockDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + static inline uint64_t C2Tuple_usizeTransactionZ_clone_ptr(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR arg) { LDKC2Tuple_usizeTransactionZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ"); *ret_conv = C2Tuple_usizeTransactionZ_clone(arg); @@ -19898,81 +21750,86 @@ void __attribute__((export_name("TS_CVec_MonitorEventZ_free"))) TS_CVec_Monitor CVec_MonitorEventZ_free(_res_constr); } -static inline uint64_t C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR arg) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ"); - *ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(arg); +static inline uint64_t C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR arg) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ"); + *ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(arg); return tag_ptr(ret_conv, true); } -int64_t __attribute__((export_name("TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr"))) TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(uint64_t arg) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* arg_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(arg); - int64_t ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(arg_conv); +int64_t __attribute__((export_name("TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr"))) TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(uint64_t arg) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* arg_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(arg); + int64_t ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(arg_conv); return ret_conv; } -uint64_t __attribute__((export_name("TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone"))) TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(uint64_t orig) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* orig_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(orig); - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ"); - *ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(orig_conv); +uint64_t __attribute__((export_name("TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone"))) TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(uint64_t orig) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* orig_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(orig); + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ"); + *ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(orig_conv); return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new"))) TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(uint64_t a, uint64_tArray b, int8_tArray c) { +uint64_t __attribute__((export_name("TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new"))) TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new(uint64_t a, uint64_t b, uint64_tArray c, int8_tArray d) { LDKOutPoint a_conv; a_conv.inner = untag_ptr(a); a_conv.is_owned = ptr_is_owned(a); CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); a_conv = OutPoint_clone(&a_conv); - LDKCVec_MonitorEventZ b_constr; - b_constr.datalen = b->arr_len; - if (b_constr.datalen > 0) - b_constr.data = MALLOC(b_constr.datalen * sizeof(LDKMonitorEvent), "LDKCVec_MonitorEventZ Elements"); + LDKChannelId b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv = ChannelId_clone(&b_conv); + LDKCVec_MonitorEventZ c_constr; + c_constr.datalen = c->arr_len; + if (c_constr.datalen > 0) + c_constr.data = MALLOC(c_constr.datalen * sizeof(LDKMonitorEvent), "LDKCVec_MonitorEventZ Elements"); else - b_constr.data = NULL; - uint64_t* b_vals = b->elems; - for (size_t o = 0; o < b_constr.datalen; o++) { - uint64_t b_conv_14 = b_vals[o]; - void* b_conv_14_ptr = untag_ptr(b_conv_14); - CHECK_ACCESS(b_conv_14_ptr); - LDKMonitorEvent b_conv_14_conv = *(LDKMonitorEvent*)(b_conv_14_ptr); - b_conv_14_conv = MonitorEvent_clone((LDKMonitorEvent*)untag_ptr(b_conv_14)); - b_constr.data[o] = b_conv_14_conv; - } - FREE(b); - LDKPublicKey c_ref; - CHECK(c->arr_len == 33); - memcpy(c_ref.compressed_form, c->elems, 33); FREE(c); - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ"); - *ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(a_conv, b_constr, c_ref); - return tag_ptr(ret_conv, true); -} - -void __attribute__((export_name("TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free"))) TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(uint64_t _res) { + c_constr.data = NULL; + uint64_t* c_vals = c->elems; + for (size_t o = 0; o < c_constr.datalen; o++) { + uint64_t c_conv_14 = c_vals[o]; + void* c_conv_14_ptr = untag_ptr(c_conv_14); + CHECK_ACCESS(c_conv_14_ptr); + LDKMonitorEvent c_conv_14_conv = *(LDKMonitorEvent*)(c_conv_14_ptr); + c_conv_14_conv = MonitorEvent_clone((LDKMonitorEvent*)untag_ptr(c_conv_14)); + c_constr.data[o] = c_conv_14_conv; + } + FREE(c); + LDKPublicKey d_ref; + CHECK(d->arr_len == 33); + memcpy(d_ref.compressed_form, d->elems, 33); FREE(d); + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ"); + *ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new(a_conv, b_conv, c_constr, d_ref); + return tag_ptr(ret_conv, true); +} + +void __attribute__((export_name("TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free"))) TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free(uint64_t _res) { if (!ptr_is_owned(_res)) return; void* _res_ptr = untag_ptr(_res); CHECK_ACCESS(_res_ptr); - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ _res_conv = *(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)(_res_ptr); + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ _res_conv = *(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)(_res_ptr); FREE(untag_ptr(_res)); - C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(_res_conv); + C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free(_res_conv); } -void __attribute__((export_name("TS_CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free"))) TS_CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free(uint64_tArray _res) { - LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ _res_constr; +void __attribute__((export_name("TS_CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free"))) TS_CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free(uint64_tArray _res) { + LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ _res_constr; _res_constr.datalen = _res->arr_len; if (_res_constr.datalen > 0) - _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ Elements"); + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ Elements"); else _res_constr.data = NULL; uint64_t* _res_vals = _res->elems; - for (size_t x = 0; x < _res_constr.datalen; x++) { - uint64_t _res_conv_49 = _res_vals[x]; - void* _res_conv_49_ptr = untag_ptr(_res_conv_49); - CHECK_ACCESS(_res_conv_49_ptr); - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ _res_conv_49_conv = *(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)(_res_conv_49_ptr); - FREE(untag_ptr(_res_conv_49)); - _res_constr.data[x] = _res_conv_49_conv; + for (size_t f = 0; f < _res_constr.datalen; f++) { + uint64_t _res_conv_57 = _res_vals[f]; + void* _res_conv_57_ptr = untag_ptr(_res_conv_57); + CHECK_ACCESS(_res_conv_57_ptr); + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ _res_conv_57_conv = *(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)(_res_conv_57_ptr); + FREE(untag_ptr(_res_conv_57)); + _res_constr.data[f] = _res_conv_57_conv; } FREE(_res); - CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free(_res_constr); + CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free(_res_constr); } uint64_t __attribute__((export_name("TS_CResult_InitFeaturesDecodeErrorZ_ok"))) TS_CResult_InitFeaturesDecodeErrorZ_ok(uint64_t o) { @@ -20353,6 +22210,225 @@ uint64_t __attribute__((export_name("TS_CResult_ChannelTypeFeaturesDecodeErrorZ return tag_ptr(ret_conv, true); } +uint64_t __attribute__((export_name("TS_CResult_OfferIdDecodeErrorZ_ok"))) TS_CResult_OfferIdDecodeErrorZ_ok(uint64_t o) { + LDKOfferId o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = OfferId_clone(&o_conv); + LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ"); + *ret_conv = CResult_OfferIdDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_OfferIdDecodeErrorZ_err"))) TS_CResult_OfferIdDecodeErrorZ_err(uint64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ"); + *ret_conv = CResult_OfferIdDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_OfferIdDecodeErrorZ_is_ok"))) TS_CResult_OfferIdDecodeErrorZ_is_ok(uint64_t o) { + LDKCResult_OfferIdDecodeErrorZ* o_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_OfferIdDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_OfferIdDecodeErrorZ_free"))) TS_CResult_OfferIdDecodeErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_OfferIdDecodeErrorZ _res_conv = *(LDKCResult_OfferIdDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_OfferIdDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_OfferIdDecodeErrorZ_clone_ptr(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ"); + *ret_conv = CResult_OfferIdDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_OfferIdDecodeErrorZ_clone_ptr"))) TS_CResult_OfferIdDecodeErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_OfferIdDecodeErrorZ* arg_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_OfferIdDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_OfferIdDecodeErrorZ_clone"))) TS_CResult_OfferIdDecodeErrorZ_clone(uint64_t orig) { + LDKCResult_OfferIdDecodeErrorZ* orig_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(orig); + LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ"); + *ret_conv = CResult_OfferIdDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_ok"))) TS_CResult_NoneBolt12SemanticErrorZ_ok() { + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = CResult_NoneBolt12SemanticErrorZ_ok(); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_err"))) TS_CResult_NoneBolt12SemanticErrorZ_err(uint32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_js(e); + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = CResult_NoneBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_is_ok"))) TS_CResult_NoneBolt12SemanticErrorZ_is_ok(uint64_t o) { + LDKCResult_NoneBolt12SemanticErrorZ* o_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_NoneBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_free"))) TS_CResult_NoneBolt12SemanticErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_NoneBolt12SemanticErrorZ _res_conv = *(LDKCResult_NoneBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_NoneBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_NoneBolt12SemanticErrorZ_clone_ptr(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_clone_ptr"))) TS_CResult_NoneBolt12SemanticErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_NoneBolt12SemanticErrorZ* arg_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_NoneBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_clone"))) TS_CResult_NoneBolt12SemanticErrorZ_clone(uint64_t orig) { + LDKCResult_NoneBolt12SemanticErrorZ* orig_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_OfferBolt12SemanticErrorZ_ok"))) TS_CResult_OfferBolt12SemanticErrorZ_ok(uint64_t o) { + LDKOffer o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = Offer_clone(&o_conv); + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_OfferBolt12SemanticErrorZ_err"))) TS_CResult_OfferBolt12SemanticErrorZ_err(uint32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_js(e); + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_OfferBolt12SemanticErrorZ_is_ok"))) TS_CResult_OfferBolt12SemanticErrorZ_is_ok(uint64_t o) { + LDKCResult_OfferBolt12SemanticErrorZ* o_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_OfferBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_OfferBolt12SemanticErrorZ_free"))) TS_CResult_OfferBolt12SemanticErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_OfferBolt12SemanticErrorZ _res_conv = *(LDKCResult_OfferBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_OfferBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_OfferBolt12SemanticErrorZ_clone_ptr(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_OfferBolt12SemanticErrorZ_clone_ptr"))) TS_CResult_OfferBolt12SemanticErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_OfferBolt12SemanticErrorZ* arg_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_OfferBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_OfferBolt12SemanticErrorZ_clone"))) TS_CResult_OfferBolt12SemanticErrorZ_clone(uint64_t orig) { + LDKCResult_OfferBolt12SemanticErrorZ* orig_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok"))) TS_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(uint64_t o) { + LDKInvoiceRequestWithDerivedPayerIdBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err"))) TS_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(uint32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_js(e); + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok"))) TS_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(uint64_t o) { + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free"))) TS_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(_res_conv); +} + +uint64_t __attribute__((export_name("TS_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok"))) TS_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok(uint64_t o) { + LDKInvoiceRequestWithExplicitPayerIdBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err"))) TS_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(uint32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_js(e); + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok"))) TS_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(uint64_t o) { + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free"))) TS_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(_res_conv); +} + uint64_t __attribute__((export_name("TS_CResult_OfferBolt12ParseErrorZ_ok"))) TS_CResult_OfferBolt12ParseErrorZ_ok(uint64_t o) { LDKOffer o_conv; o_conv.inner = untag_ptr(o); @@ -20408,55 +22484,6 @@ uint64_t __attribute__((export_name("TS_CResult_OfferBolt12ParseErrorZ_clone")) return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_CResult_PublicKeySecp256k1ErrorZ_ok"))) TS_CResult_PublicKeySecp256k1ErrorZ_ok(int8_tArray o) { - LDKPublicKey o_ref; - CHECK(o->arr_len == 33); - memcpy(o_ref.compressed_form, o->elems, 33); FREE(o); - LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); - *ret_conv = CResult_PublicKeySecp256k1ErrorZ_ok(o_ref); - return tag_ptr(ret_conv, true); -} - -uint64_t __attribute__((export_name("TS_CResult_PublicKeySecp256k1ErrorZ_err"))) TS_CResult_PublicKeySecp256k1ErrorZ_err(uint32_t e) { - LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_js(e); - LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); - *ret_conv = CResult_PublicKeySecp256k1ErrorZ_err(e_conv); - return tag_ptr(ret_conv, true); -} - -jboolean __attribute__((export_name("TS_CResult_PublicKeySecp256k1ErrorZ_is_ok"))) TS_CResult_PublicKeySecp256k1ErrorZ_is_ok(uint64_t o) { - LDKCResult_PublicKeySecp256k1ErrorZ* o_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(o); - jboolean ret_conv = CResult_PublicKeySecp256k1ErrorZ_is_ok(o_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_CResult_PublicKeySecp256k1ErrorZ_free"))) TS_CResult_PublicKeySecp256k1ErrorZ_free(uint64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKCResult_PublicKeySecp256k1ErrorZ _res_conv = *(LDKCResult_PublicKeySecp256k1ErrorZ*)(_res_ptr); - FREE(untag_ptr(_res)); - CResult_PublicKeySecp256k1ErrorZ_free(_res_conv); -} - -static inline uint64_t CResult_PublicKeySecp256k1ErrorZ_clone_ptr(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR arg) { - LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); - *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(arg); - return tag_ptr(ret_conv, true); -} -int64_t __attribute__((export_name("TS_CResult_PublicKeySecp256k1ErrorZ_clone_ptr"))) TS_CResult_PublicKeySecp256k1ErrorZ_clone_ptr(uint64_t arg) { - LDKCResult_PublicKeySecp256k1ErrorZ* arg_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(arg); - int64_t ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone_ptr(arg_conv); - return ret_conv; -} - -uint64_t __attribute__((export_name("TS_CResult_PublicKeySecp256k1ErrorZ_clone"))) TS_CResult_PublicKeySecp256k1ErrorZ_clone(uint64_t orig) { - LDKCResult_PublicKeySecp256k1ErrorZ* orig_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(orig); - LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); - *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(orig_conv); - return tag_ptr(ret_conv, true); -} - uint64_t __attribute__((export_name("TS_CResult_NodeIdDecodeErrorZ_ok"))) TS_CResult_NodeIdDecodeErrorZ_ok(uint64_t o) { LDKNodeId o_conv; o_conv.inner = untag_ptr(o); @@ -20511,6 +22538,55 @@ uint64_t __attribute__((export_name("TS_CResult_NodeIdDecodeErrorZ_clone"))) TS return tag_ptr(ret_conv, true); } +uint64_t __attribute__((export_name("TS_CResult_PublicKeySecp256k1ErrorZ_ok"))) TS_CResult_PublicKeySecp256k1ErrorZ_ok(int8_tArray o) { + LDKPublicKey o_ref; + CHECK(o->arr_len == 33); + memcpy(o_ref.compressed_form, o->elems, 33); FREE(o); + LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); + *ret_conv = CResult_PublicKeySecp256k1ErrorZ_ok(o_ref); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_PublicKeySecp256k1ErrorZ_err"))) TS_CResult_PublicKeySecp256k1ErrorZ_err(uint32_t e) { + LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_js(e); + LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); + *ret_conv = CResult_PublicKeySecp256k1ErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_PublicKeySecp256k1ErrorZ_is_ok"))) TS_CResult_PublicKeySecp256k1ErrorZ_is_ok(uint64_t o) { + LDKCResult_PublicKeySecp256k1ErrorZ* o_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_PublicKeySecp256k1ErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_PublicKeySecp256k1ErrorZ_free"))) TS_CResult_PublicKeySecp256k1ErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_PublicKeySecp256k1ErrorZ _res_conv = *(LDKCResult_PublicKeySecp256k1ErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_PublicKeySecp256k1ErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_PublicKeySecp256k1ErrorZ_clone_ptr(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR arg) { + LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); + *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_PublicKeySecp256k1ErrorZ_clone_ptr"))) TS_CResult_PublicKeySecp256k1ErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_PublicKeySecp256k1ErrorZ* arg_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_PublicKeySecp256k1ErrorZ_clone"))) TS_CResult_PublicKeySecp256k1ErrorZ_clone(uint64_t orig) { + LDKCResult_PublicKeySecp256k1ErrorZ* orig_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(orig); + LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); + *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + uint64_t __attribute__((export_name("TS_COption_NetworkUpdateZ_some"))) TS_COption_NetworkUpdateZ_some(uint64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -21296,6 +23372,34 @@ uint64_t __attribute__((export_name("TS_COption_CVec_SocketAddressZZ_clone"))) return ret_ref; } +uint64_t __attribute__((export_name("TS_CResult_u64ShortChannelIdErrorZ_ok"))) TS_CResult_u64ShortChannelIdErrorZ_ok(int64_t o) { + LDKCResult_u64ShortChannelIdErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u64ShortChannelIdErrorZ), "LDKCResult_u64ShortChannelIdErrorZ"); + *ret_conv = CResult_u64ShortChannelIdErrorZ_ok(o); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_u64ShortChannelIdErrorZ_err"))) TS_CResult_u64ShortChannelIdErrorZ_err(uint32_t e) { + LDKShortChannelIdError e_conv = LDKShortChannelIdError_from_js(e); + LDKCResult_u64ShortChannelIdErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u64ShortChannelIdErrorZ), "LDKCResult_u64ShortChannelIdErrorZ"); + *ret_conv = CResult_u64ShortChannelIdErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_u64ShortChannelIdErrorZ_is_ok"))) TS_CResult_u64ShortChannelIdErrorZ_is_ok(uint64_t o) { + LDKCResult_u64ShortChannelIdErrorZ* o_conv = (LDKCResult_u64ShortChannelIdErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_u64ShortChannelIdErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_u64ShortChannelIdErrorZ_free"))) TS_CResult_u64ShortChannelIdErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_u64ShortChannelIdErrorZ _res_conv = *(LDKCResult_u64ShortChannelIdErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_u64ShortChannelIdErrorZ_free(_res_conv); +} + uint64_t __attribute__((export_name("TS_CResult_PendingHTLCInfoInboundHTLCErrZ_ok"))) TS_CResult_PendingHTLCInfoInboundHTLCErrZ_ok(uint64_t o) { LDKPendingHTLCInfo o_conv; o_conv.inner = untag_ptr(o); @@ -21312,8 +23416,7 @@ uint64_t __attribute__((export_name("TS_CResult_PendingHTLCInfoInboundHTLCErrZ_ e_conv.inner = untag_ptr(e); e_conv.is_owned = ptr_is_owned(e); CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv); - // WARNING: we need a move here but no clone is available for LDKInboundHTLCErr - + e_conv = InboundHTLCErr_clone(&e_conv); LDKCResult_PendingHTLCInfoInboundHTLCErrZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoInboundHTLCErrZ), "LDKCResult_PendingHTLCInfoInboundHTLCErrZ"); *ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_err(e_conv); return tag_ptr(ret_conv, true); @@ -21334,6 +23437,24 @@ void __attribute__((export_name("TS_CResult_PendingHTLCInfoInboundHTLCErrZ_free CResult_PendingHTLCInfoInboundHTLCErrZ_free(_res_conv); } +static inline uint64_t CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR arg) { + LDKCResult_PendingHTLCInfoInboundHTLCErrZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoInboundHTLCErrZ), "LDKCResult_PendingHTLCInfoInboundHTLCErrZ"); + *ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr"))) TS_CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(uint64_t arg) { + LDKCResult_PendingHTLCInfoInboundHTLCErrZ* arg_conv = (LDKCResult_PendingHTLCInfoInboundHTLCErrZ*)untag_ptr(arg); + int64_t ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_PendingHTLCInfoInboundHTLCErrZ_clone"))) TS_CResult_PendingHTLCInfoInboundHTLCErrZ_clone(uint64_t orig) { + LDKCResult_PendingHTLCInfoInboundHTLCErrZ* orig_conv = (LDKCResult_PendingHTLCInfoInboundHTLCErrZ*)untag_ptr(orig); + LDKCResult_PendingHTLCInfoInboundHTLCErrZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoInboundHTLCErrZ), "LDKCResult_PendingHTLCInfoInboundHTLCErrZ"); + *ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + void __attribute__((export_name("TS_CVec_HTLCOutputInCommitmentZ_free"))) TS_CVec_HTLCOutputInCommitmentZ_free(uint64_tArray _res) { LDKCVec_HTLCOutputInCommitmentZ _res_constr; _res_constr.datalen = _res->arr_len; @@ -21573,6 +23694,53 @@ uint64_t __attribute__((export_name("TS_CResult_CVec_UtxoZNoneZ_clone"))) TS_CR return tag_ptr(ret_conv, true); } +uint64_t __attribute__((export_name("TS_COption_PaymentContextZ_some"))) TS_COption_PaymentContextZ_some(uint64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKPaymentContext o_conv = *(LDKPaymentContext*)(o_ptr); + o_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(o)); + LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ"); + *ret_copy = COption_PaymentContextZ_some(o_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_COption_PaymentContextZ_none"))) TS_COption_PaymentContextZ_none() { + LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ"); + *ret_copy = COption_PaymentContextZ_none(); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void __attribute__((export_name("TS_COption_PaymentContextZ_free"))) TS_COption_PaymentContextZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCOption_PaymentContextZ _res_conv = *(LDKCOption_PaymentContextZ*)(_res_ptr); + FREE(untag_ptr(_res)); + COption_PaymentContextZ_free(_res_conv); +} + +static inline uint64_t COption_PaymentContextZ_clone_ptr(LDKCOption_PaymentContextZ *NONNULL_PTR arg) { + LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ"); + *ret_copy = COption_PaymentContextZ_clone(arg); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t __attribute__((export_name("TS_COption_PaymentContextZ_clone_ptr"))) TS_COption_PaymentContextZ_clone_ptr(uint64_t arg) { + LDKCOption_PaymentContextZ* arg_conv = (LDKCOption_PaymentContextZ*)untag_ptr(arg); + int64_t ret_conv = COption_PaymentContextZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_COption_PaymentContextZ_clone"))) TS_COption_PaymentContextZ_clone(uint64_t orig) { + LDKCOption_PaymentContextZ* orig_conv = (LDKCOption_PaymentContextZ*)untag_ptr(orig); + LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ"); + *ret_copy = COption_PaymentContextZ_clone(orig_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + static inline uint64_t C2Tuple_u64u16Z_clone_ptr(LDKC2Tuple_u64u16Z *NONNULL_PTR arg) { LDKC2Tuple_u64u16Z* ret_conv = MALLOC(sizeof(LDKC2Tuple_u64u16Z), "LDKC2Tuple_u64u16Z"); *ret_conv = C2Tuple_u64u16Z_clone(arg); @@ -21697,55 +23865,57 @@ uint64_t __attribute__((export_name("TS_COption_ChannelShutdownStateZ_clone"))) return ret_ref; } -uint64_t __attribute__((export_name("TS_CResult_ThirtyTwoBytesAPIErrorZ_ok"))) TS_CResult_ThirtyTwoBytesAPIErrorZ_ok(int8_tArray o) { - LDKThirtyTwoBytes o_ref; - CHECK(o->arr_len == 32); - memcpy(o_ref.data, o->elems, 32); FREE(o); - LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); - *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_ok(o_ref); +uint64_t __attribute__((export_name("TS_CResult_ChannelIdAPIErrorZ_ok"))) TS_CResult_ChannelIdAPIErrorZ_ok(uint64_t o) { + LDKChannelId o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = ChannelId_clone(&o_conv); + LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ"); + *ret_conv = CResult_ChannelIdAPIErrorZ_ok(o_conv); return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_CResult_ThirtyTwoBytesAPIErrorZ_err"))) TS_CResult_ThirtyTwoBytesAPIErrorZ_err(uint64_t e) { +uint64_t __attribute__((export_name("TS_CResult_ChannelIdAPIErrorZ_err"))) TS_CResult_ChannelIdAPIErrorZ_err(uint64_t e) { void* e_ptr = untag_ptr(e); CHECK_ACCESS(e_ptr); LDKAPIError e_conv = *(LDKAPIError*)(e_ptr); e_conv = APIError_clone((LDKAPIError*)untag_ptr(e)); - LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); - *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_err(e_conv); + LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ"); + *ret_conv = CResult_ChannelIdAPIErrorZ_err(e_conv); return tag_ptr(ret_conv, true); } -jboolean __attribute__((export_name("TS_CResult_ThirtyTwoBytesAPIErrorZ_is_ok"))) TS_CResult_ThirtyTwoBytesAPIErrorZ_is_ok(uint64_t o) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* o_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(o); - jboolean ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_is_ok(o_conv); +jboolean __attribute__((export_name("TS_CResult_ChannelIdAPIErrorZ_is_ok"))) TS_CResult_ChannelIdAPIErrorZ_is_ok(uint64_t o) { + LDKCResult_ChannelIdAPIErrorZ* o_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_ChannelIdAPIErrorZ_is_ok(o_conv); return ret_conv; } -void __attribute__((export_name("TS_CResult_ThirtyTwoBytesAPIErrorZ_free"))) TS_CResult_ThirtyTwoBytesAPIErrorZ_free(uint64_t _res) { +void __attribute__((export_name("TS_CResult_ChannelIdAPIErrorZ_free"))) TS_CResult_ChannelIdAPIErrorZ_free(uint64_t _res) { if (!ptr_is_owned(_res)) return; void* _res_ptr = untag_ptr(_res); CHECK_ACCESS(_res_ptr); - LDKCResult_ThirtyTwoBytesAPIErrorZ _res_conv = *(LDKCResult_ThirtyTwoBytesAPIErrorZ*)(_res_ptr); + LDKCResult_ChannelIdAPIErrorZ _res_conv = *(LDKCResult_ChannelIdAPIErrorZ*)(_res_ptr); FREE(untag_ptr(_res)); - CResult_ThirtyTwoBytesAPIErrorZ_free(_res_conv); + CResult_ChannelIdAPIErrorZ_free(_res_conv); } -static inline uint64_t CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR arg) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); - *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(arg); +static inline uint64_t CResult_ChannelIdAPIErrorZ_clone_ptr(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR arg) { + LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ"); + *ret_conv = CResult_ChannelIdAPIErrorZ_clone(arg); return tag_ptr(ret_conv, true); } -int64_t __attribute__((export_name("TS_CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr"))) TS_CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(uint64_t arg) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* arg_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(arg); - int64_t ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(arg_conv); +int64_t __attribute__((export_name("TS_CResult_ChannelIdAPIErrorZ_clone_ptr"))) TS_CResult_ChannelIdAPIErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_ChannelIdAPIErrorZ* arg_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_ChannelIdAPIErrorZ_clone_ptr(arg_conv); return ret_conv; } -uint64_t __attribute__((export_name("TS_CResult_ThirtyTwoBytesAPIErrorZ_clone"))) TS_CResult_ThirtyTwoBytesAPIErrorZ_clone(uint64_t orig) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* orig_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(orig); - LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); - *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(orig_conv); +uint64_t __attribute__((export_name("TS_CResult_ChannelIdAPIErrorZ_clone"))) TS_CResult_ChannelIdAPIErrorZ_clone(uint64_t orig) { + LDKCResult_ChannelIdAPIErrorZ* orig_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(orig); + LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ"); + *ret_conv = CResult_ChannelIdAPIErrorZ_clone(orig_conv); return tag_ptr(ret_conv, true); } @@ -22142,63 +24312,136 @@ uint64_t __attribute__((export_name("TS_CResult_CVec_C2Tuple_ThirtyTwoBytesThir return tag_ptr(ret_conv, true); } -static inline uint64_t C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR arg) { - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKC2Tuple_ThirtyTwoBytesPublicKeyZ"); - *ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(arg); +static inline uint64_t C2Tuple_ChannelIdPublicKeyZ_clone_ptr(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR arg) { + LDKC2Tuple_ChannelIdPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKC2Tuple_ChannelIdPublicKeyZ"); + *ret_conv = C2Tuple_ChannelIdPublicKeyZ_clone(arg); return tag_ptr(ret_conv, true); } -int64_t __attribute__((export_name("TS_C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr"))) TS_C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(uint64_t arg) { - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* arg_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(arg); - int64_t ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(arg_conv); +int64_t __attribute__((export_name("TS_C2Tuple_ChannelIdPublicKeyZ_clone_ptr"))) TS_C2Tuple_ChannelIdPublicKeyZ_clone_ptr(uint64_t arg) { + LDKC2Tuple_ChannelIdPublicKeyZ* arg_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(arg); + int64_t ret_conv = C2Tuple_ChannelIdPublicKeyZ_clone_ptr(arg_conv); return ret_conv; } -uint64_t __attribute__((export_name("TS_C2Tuple_ThirtyTwoBytesPublicKeyZ_clone"))) TS_C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(uint64_t orig) { - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* orig_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(orig); - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKC2Tuple_ThirtyTwoBytesPublicKeyZ"); - *ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(orig_conv); +uint64_t __attribute__((export_name("TS_C2Tuple_ChannelIdPublicKeyZ_clone"))) TS_C2Tuple_ChannelIdPublicKeyZ_clone(uint64_t orig) { + LDKC2Tuple_ChannelIdPublicKeyZ* orig_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(orig); + LDKC2Tuple_ChannelIdPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKC2Tuple_ChannelIdPublicKeyZ"); + *ret_conv = C2Tuple_ChannelIdPublicKeyZ_clone(orig_conv); return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_C2Tuple_ThirtyTwoBytesPublicKeyZ_new"))) TS_C2Tuple_ThirtyTwoBytesPublicKeyZ_new(int8_tArray a, int8_tArray b) { - LDKThirtyTwoBytes a_ref; - CHECK(a->arr_len == 32); - memcpy(a_ref.data, a->elems, 32); FREE(a); +uint64_t __attribute__((export_name("TS_C2Tuple_ChannelIdPublicKeyZ_new"))) TS_C2Tuple_ChannelIdPublicKeyZ_new(uint64_t a, int8_tArray b) { + LDKChannelId a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = ChannelId_clone(&a_conv); LDKPublicKey b_ref; CHECK(b->arr_len == 33); memcpy(b_ref.compressed_form, b->elems, 33); FREE(b); - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKC2Tuple_ThirtyTwoBytesPublicKeyZ"); - *ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_new(a_ref, b_ref); + LDKC2Tuple_ChannelIdPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKC2Tuple_ChannelIdPublicKeyZ"); + *ret_conv = C2Tuple_ChannelIdPublicKeyZ_new(a_conv, b_ref); return tag_ptr(ret_conv, true); } -void __attribute__((export_name("TS_C2Tuple_ThirtyTwoBytesPublicKeyZ_free"))) TS_C2Tuple_ThirtyTwoBytesPublicKeyZ_free(uint64_t _res) { +void __attribute__((export_name("TS_C2Tuple_ChannelIdPublicKeyZ_free"))) TS_C2Tuple_ChannelIdPublicKeyZ_free(uint64_t _res) { if (!ptr_is_owned(_res)) return; void* _res_ptr = untag_ptr(_res); CHECK_ACCESS(_res_ptr); - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ _res_conv = *(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)(_res_ptr); + LDKC2Tuple_ChannelIdPublicKeyZ _res_conv = *(LDKC2Tuple_ChannelIdPublicKeyZ*)(_res_ptr); FREE(untag_ptr(_res)); - C2Tuple_ThirtyTwoBytesPublicKeyZ_free(_res_conv); + C2Tuple_ChannelIdPublicKeyZ_free(_res_conv); } -void __attribute__((export_name("TS_CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_free"))) TS_CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_free(uint64_tArray _res) { - LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ _res_constr; +void __attribute__((export_name("TS_CVec_C2Tuple_ChannelIdPublicKeyZZ_free"))) TS_CVec_C2Tuple_ChannelIdPublicKeyZZ_free(uint64_tArray _res) { + LDKCVec_C2Tuple_ChannelIdPublicKeyZZ _res_constr; _res_constr.datalen = _res->arr_len; if (_res_constr.datalen > 0) - _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ Elements"); + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKCVec_C2Tuple_ChannelIdPublicKeyZZ Elements"); else _res_constr.data = NULL; uint64_t* _res_vals = _res->elems; - for (size_t j = 0; j < _res_constr.datalen; j++) { - uint64_t _res_conv_35 = _res_vals[j]; - void* _res_conv_35_ptr = untag_ptr(_res_conv_35); - CHECK_ACCESS(_res_conv_35_ptr); - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ _res_conv_35_conv = *(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)(_res_conv_35_ptr); - FREE(untag_ptr(_res_conv_35)); - _res_constr.data[j] = _res_conv_35_conv; + for (size_t e = 0; e < _res_constr.datalen; e++) { + uint64_t _res_conv_30 = _res_vals[e]; + void* _res_conv_30_ptr = untag_ptr(_res_conv_30); + CHECK_ACCESS(_res_conv_30_ptr); + LDKC2Tuple_ChannelIdPublicKeyZ _res_conv_30_conv = *(LDKC2Tuple_ChannelIdPublicKeyZ*)(_res_conv_30_ptr); + FREE(untag_ptr(_res_conv_30)); + _res_constr.data[e] = _res_conv_30_conv; } FREE(_res); - CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_free(_res_constr); + CVec_C2Tuple_ChannelIdPublicKeyZZ_free(_res_constr); +} + +void __attribute__((export_name("TS_CVec_ChannelIdZ_free"))) TS_CVec_ChannelIdZ_free(uint64_tArray _res) { + LDKCVec_ChannelIdZ _res_constr; + _res_constr.datalen = _res->arr_len; + if (_res_constr.datalen > 0) + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKChannelId), "LDKCVec_ChannelIdZ Elements"); + else + _res_constr.data = NULL; + uint64_t* _res_vals = _res->elems; + for (size_t l = 0; l < _res_constr.datalen; l++) { + uint64_t _res_conv_11 = _res_vals[l]; + LDKChannelId _res_conv_11_conv; + _res_conv_11_conv.inner = untag_ptr(_res_conv_11); + _res_conv_11_conv.is_owned = ptr_is_owned(_res_conv_11); + CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_11_conv); + _res_constr.data[l] = _res_conv_11_conv; + } + FREE(_res); + CVec_ChannelIdZ_free(_res_constr); +} + +uint64_t __attribute__((export_name("TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok"))) TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(uint64_t o) { + LDKOfferWithDerivedMetadataBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = OfferWithDerivedMetadataBuilder_clone(&o_conv); + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err"))) TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(uint32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_js(e); + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok"))) TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(uint64_t o) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free"))) TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr"))) TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* arg_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone"))) TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(uint64_t orig) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* orig_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); } uint64_t __attribute__((export_name("TS_COption_StrZ_some"))) TS_COption_StrZ_some(jstring o) { @@ -22245,52 +24488,6 @@ uint64_t __attribute__((export_name("TS_COption_StrZ_clone"))) TS_COption_StrZ_ return ret_ref; } -uint64_t __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_ok"))) TS_CResult_NoneBolt12SemanticErrorZ_ok() { - LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); - *ret_conv = CResult_NoneBolt12SemanticErrorZ_ok(); - return tag_ptr(ret_conv, true); -} - -uint64_t __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_err"))) TS_CResult_NoneBolt12SemanticErrorZ_err(uint32_t e) { - LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_js(e); - LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); - *ret_conv = CResult_NoneBolt12SemanticErrorZ_err(e_conv); - return tag_ptr(ret_conv, true); -} - -jboolean __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_is_ok"))) TS_CResult_NoneBolt12SemanticErrorZ_is_ok(uint64_t o) { - LDKCResult_NoneBolt12SemanticErrorZ* o_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(o); - jboolean ret_conv = CResult_NoneBolt12SemanticErrorZ_is_ok(o_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_free"))) TS_CResult_NoneBolt12SemanticErrorZ_free(uint64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKCResult_NoneBolt12SemanticErrorZ _res_conv = *(LDKCResult_NoneBolt12SemanticErrorZ*)(_res_ptr); - FREE(untag_ptr(_res)); - CResult_NoneBolt12SemanticErrorZ_free(_res_conv); -} - -static inline uint64_t CResult_NoneBolt12SemanticErrorZ_clone_ptr(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR arg) { - LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); - *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(arg); - return tag_ptr(ret_conv, true); -} -int64_t __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_clone_ptr"))) TS_CResult_NoneBolt12SemanticErrorZ_clone_ptr(uint64_t arg) { - LDKCResult_NoneBolt12SemanticErrorZ* arg_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(arg); - int64_t ret_conv = CResult_NoneBolt12SemanticErrorZ_clone_ptr(arg_conv); - return ret_conv; -} - -uint64_t __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_clone"))) TS_CResult_NoneBolt12SemanticErrorZ_clone(uint64_t orig) { - LDKCResult_NoneBolt12SemanticErrorZ* orig_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(orig); - LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); - *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(orig_conv); - return tag_ptr(ret_conv, true); -} - uint64_t __attribute__((export_name("TS_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok"))) TS_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok(uint64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -22340,6 +24537,58 @@ uint64_t __attribute__((export_name("TS_CResult_C2Tuple_ThirtyTwoBytesThirtyTwo return tag_ptr(ret_conv, true); } +uint64_t __attribute__((export_name("TS_CResult_ThirtyTwoBytesAPIErrorZ_ok"))) TS_CResult_ThirtyTwoBytesAPIErrorZ_ok(int8_tArray o) { + LDKThirtyTwoBytes o_ref; + CHECK(o->arr_len == 32); + memcpy(o_ref.data, o->elems, 32); FREE(o); + LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); + *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_ok(o_ref); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_ThirtyTwoBytesAPIErrorZ_err"))) TS_CResult_ThirtyTwoBytesAPIErrorZ_err(uint64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKAPIError e_conv = *(LDKAPIError*)(e_ptr); + e_conv = APIError_clone((LDKAPIError*)untag_ptr(e)); + LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); + *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_ThirtyTwoBytesAPIErrorZ_is_ok"))) TS_CResult_ThirtyTwoBytesAPIErrorZ_is_ok(uint64_t o) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* o_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_ThirtyTwoBytesAPIErrorZ_free"))) TS_CResult_ThirtyTwoBytesAPIErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_ThirtyTwoBytesAPIErrorZ _res_conv = *(LDKCResult_ThirtyTwoBytesAPIErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_ThirtyTwoBytesAPIErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR arg) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); + *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr"))) TS_CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* arg_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_ThirtyTwoBytesAPIErrorZ_clone"))) TS_CResult_ThirtyTwoBytesAPIErrorZ_clone(uint64_t orig) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* orig_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(orig); + LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); + *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + uint64_t __attribute__((export_name("TS_COption_OffersMessageZ_some"))) TS_COption_OffersMessageZ_some(uint64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -23662,27 +25911,6 @@ void __attribute__((export_name("TS_CVec_CommitmentTransactionZ_free"))) TS_CVe CVec_CommitmentTransactionZ_free(_res_constr); } -void __attribute__((export_name("TS_CVec_TransactionZ_free"))) TS_CVec_TransactionZ_free(ptrArray _res) { - LDKCVec_TransactionZ _res_constr; - _res_constr.datalen = _res->arr_len; - if (_res_constr.datalen > 0) - _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKTransaction), "LDKCVec_TransactionZ Elements"); - else - _res_constr.data = NULL; - int8_tArray* _res_vals = (void*) _res->elems; - for (size_t m = 0; m < _res_constr.datalen; m++) { - int8_tArray _res_conv_12 = _res_vals[m]; - LDKTransaction _res_conv_12_ref; - _res_conv_12_ref.datalen = _res_conv_12->arr_len; - _res_conv_12_ref.data = MALLOC(_res_conv_12_ref.datalen, "LDKTransaction Bytes"); - memcpy(_res_conv_12_ref.data, _res_conv_12->elems, _res_conv_12_ref.datalen); FREE(_res_conv_12); - _res_conv_12_ref.data_is_owned = true; - _res_constr.data[m] = _res_conv_12_ref; - } - FREE(_res); - CVec_TransactionZ_free(_res_constr); -} - static inline uint64_t C2Tuple_u32TxOutZ_clone_ptr(LDKC2Tuple_u32TxOutZ *NONNULL_PTR arg) { LDKC2Tuple_u32TxOutZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ"); *ret_conv = C2Tuple_u32TxOutZ_clone(arg); @@ -24383,64 +26611,24 @@ uint64_t __attribute__((export_name("TS_COption_SocketAddressZ_clone"))) TS_COp return ret_ref; } -static inline uint64_t C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR arg) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ"); - *ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(arg); - return tag_ptr(ret_conv, true); -} -int64_t __attribute__((export_name("TS_C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr"))) TS_C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(uint64_t arg) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* arg_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(arg); - int64_t ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(arg_conv); - return ret_conv; -} - -uint64_t __attribute__((export_name("TS_C2Tuple_PublicKeyCOption_SocketAddressZZ_clone"))) TS_C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(uint64_t orig) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* orig_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(orig); - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ"); - *ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(orig_conv); - return tag_ptr(ret_conv, true); -} - -uint64_t __attribute__((export_name("TS_C2Tuple_PublicKeyCOption_SocketAddressZZ_new"))) TS_C2Tuple_PublicKeyCOption_SocketAddressZZ_new(int8_tArray a, uint64_t b) { - LDKPublicKey a_ref; - CHECK(a->arr_len == 33); - memcpy(a_ref.compressed_form, a->elems, 33); FREE(a); - void* b_ptr = untag_ptr(b); - CHECK_ACCESS(b_ptr); - LDKCOption_SocketAddressZ b_conv = *(LDKCOption_SocketAddressZ*)(b_ptr); - b_conv = COption_SocketAddressZ_clone((LDKCOption_SocketAddressZ*)untag_ptr(b)); - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ"); - *ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_new(a_ref, b_conv); - return tag_ptr(ret_conv, true); -} - -void __attribute__((export_name("TS_C2Tuple_PublicKeyCOption_SocketAddressZZ_free"))) TS_C2Tuple_PublicKeyCOption_SocketAddressZZ_free(uint64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ _res_conv = *(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)(_res_ptr); - FREE(untag_ptr(_res)); - C2Tuple_PublicKeyCOption_SocketAddressZZ_free(_res_conv); -} - -void __attribute__((export_name("TS_CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_free"))) TS_CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_free(uint64_tArray _res) { - LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ _res_constr; +void __attribute__((export_name("TS_CVec_PeerDetailsZ_free"))) TS_CVec_PeerDetailsZ_free(uint64_tArray _res) { + LDKCVec_PeerDetailsZ _res_constr; _res_constr.datalen = _res->arr_len; if (_res_constr.datalen > 0) - _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ Elements"); + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKPeerDetails), "LDKCVec_PeerDetailsZ Elements"); else _res_constr.data = NULL; uint64_t* _res_vals = _res->elems; - for (size_t r = 0; r < _res_constr.datalen; r++) { - uint64_t _res_conv_43 = _res_vals[r]; - void* _res_conv_43_ptr = untag_ptr(_res_conv_43); - CHECK_ACCESS(_res_conv_43_ptr); - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ _res_conv_43_conv = *(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)(_res_conv_43_ptr); - FREE(untag_ptr(_res_conv_43)); - _res_constr.data[r] = _res_conv_43_conv; + for (size_t n = 0; n < _res_constr.datalen; n++) { + uint64_t _res_conv_13 = _res_vals[n]; + LDKPeerDetails _res_conv_13_conv; + _res_conv_13_conv.inner = untag_ptr(_res_conv_13); + _res_conv_13_conv.is_owned = ptr_is_owned(_res_conv_13); + CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_13_conv); + _res_constr.data[n] = _res_conv_13_conv; } FREE(_res); - CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_free(_res_constr); + CVec_PeerDetailsZ_free(_res_constr); } uint64_t __attribute__((export_name("TS_CResult_CVec_u8ZPeerHandleErrorZ_ok"))) TS_CResult_CVec_u8ZPeerHandleErrorZ_ok(int8_tArray o) { @@ -24932,6 +27120,108 @@ uint64_t __attribute__((export_name("TS_CResult_C2Tuple_ThirtyTwoBytesChannelMo return tag_ptr(ret_conv, true); } +uint64_t __attribute__((export_name("TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok"))) TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(uint64_t o) { + LDKUnsignedInvoiceRequest o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = UnsignedInvoiceRequest_clone(&o_conv); + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err"))) TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(uint32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_js(e); + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok"))) TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(uint64_t o) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* o_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free"))) TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ _res_conv = *(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr"))) TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* arg_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone"))) TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(uint64_t orig) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* orig_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_InvoiceRequestBolt12SemanticErrorZ_ok"))) TS_CResult_InvoiceRequestBolt12SemanticErrorZ_ok(uint64_t o) { + LDKInvoiceRequest o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = InvoiceRequest_clone(&o_conv); + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_InvoiceRequestBolt12SemanticErrorZ_err"))) TS_CResult_InvoiceRequestBolt12SemanticErrorZ_err(uint32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_js(e); + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok"))) TS_CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(uint64_t o) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_InvoiceRequestBolt12SemanticErrorZ_free"))) TS_CResult_InvoiceRequestBolt12SemanticErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceRequestBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceRequestBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr"))) TS_CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* arg_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_InvoiceRequestBolt12SemanticErrorZ_clone"))) TS_CResult_InvoiceRequestBolt12SemanticErrorZ_clone(uint64_t orig) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* orig_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + uint64_t __attribute__((export_name("TS_COption_SecretKeyZ_some"))) TS_COption_SecretKeyZ_some(int8_tArray o) { LDKSecretKey o_ref; CHECK(o->arr_len == 32); @@ -24978,6 +27268,40 @@ uint64_t __attribute__((export_name("TS_COption_SecretKeyZ_clone"))) TS_COption return ret_ref; } +uint64_t __attribute__((export_name("TS_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok"))) TS_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok(uint64_t o) { + LDKInvoiceWithExplicitSigningPubkeyBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err"))) TS_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err(uint32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_js(e); + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok"))) TS_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(uint64_t o) { + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free"))) TS_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free(_res_conv); +} + uint64_t __attribute__((export_name("TS_CResult_VerifiedInvoiceRequestNoneZ_ok"))) TS_CResult_VerifiedInvoiceRequestNoneZ_ok(uint64_t o) { LDKVerifiedInvoiceRequest o_conv; o_conv.inner = untag_ptr(o); @@ -25028,6 +27352,94 @@ uint64_t __attribute__((export_name("TS_CResult_VerifiedInvoiceRequestNoneZ_clo return tag_ptr(ret_conv, true); } +uint64_t __attribute__((export_name("TS_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok"))) TS_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok(uint64_t o) { + LDKInvoiceWithDerivedSigningPubkeyBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err"))) TS_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err(uint32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_js(e); + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok"))) TS_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(uint64_t o) { + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free"))) TS_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(_res_conv); +} + +uint64_t __attribute__((export_name("TS_CResult_InvoiceRequestFieldsDecodeErrorZ_ok"))) TS_CResult_InvoiceRequestFieldsDecodeErrorZ_ok(uint64_t o) { + LDKInvoiceRequestFields o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = InvoiceRequestFields_clone(&o_conv); + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ"); + *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_InvoiceRequestFieldsDecodeErrorZ_err"))) TS_CResult_InvoiceRequestFieldsDecodeErrorZ_err(uint64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ"); + *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok"))) TS_CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(uint64_t o) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* o_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_InvoiceRequestFieldsDecodeErrorZ_free"))) TS_CResult_InvoiceRequestFieldsDecodeErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceRequestFieldsDecodeErrorZ _res_conv = *(LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceRequestFieldsDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ"); + *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr"))) TS_CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* arg_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_InvoiceRequestFieldsDecodeErrorZ_clone"))) TS_CResult_InvoiceRequestFieldsDecodeErrorZ_clone(uint64_t orig) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* orig_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(orig); + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ"); + *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + uint32_t __attribute__((export_name("TS_COption_NoneZ_some"))) TS_COption_NoneZ_some() { uint32_t ret_conv = LDKCOption_NoneZ_to_js(COption_NoneZ_some()); return ret_conv; @@ -25064,6 +27476,52 @@ void __attribute__((export_name("TS_CVec_WitnessZ_free"))) TS_CVec_WitnessZ_fre CVec_WitnessZ_free(_res_constr); } +uint64_t __attribute__((export_name("TS_COption_ECDSASignatureZ_some"))) TS_COption_ECDSASignatureZ_some(int8_tArray o) { + LDKECDSASignature o_ref; + CHECK(o->arr_len == 64); + memcpy(o_ref.compact_form, o->elems, 64); FREE(o); + LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ"); + *ret_copy = COption_ECDSASignatureZ_some(o_ref); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_COption_ECDSASignatureZ_none"))) TS_COption_ECDSASignatureZ_none() { + LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ"); + *ret_copy = COption_ECDSASignatureZ_none(); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void __attribute__((export_name("TS_COption_ECDSASignatureZ_free"))) TS_COption_ECDSASignatureZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCOption_ECDSASignatureZ _res_conv = *(LDKCOption_ECDSASignatureZ*)(_res_ptr); + FREE(untag_ptr(_res)); + COption_ECDSASignatureZ_free(_res_conv); +} + +static inline uint64_t COption_ECDSASignatureZ_clone_ptr(LDKCOption_ECDSASignatureZ *NONNULL_PTR arg) { + LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ"); + *ret_copy = COption_ECDSASignatureZ_clone(arg); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t __attribute__((export_name("TS_COption_ECDSASignatureZ_clone_ptr"))) TS_COption_ECDSASignatureZ_clone_ptr(uint64_t arg) { + LDKCOption_ECDSASignatureZ* arg_conv = (LDKCOption_ECDSASignatureZ*)untag_ptr(arg); + int64_t ret_conv = COption_ECDSASignatureZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_COption_ECDSASignatureZ_clone"))) TS_COption_ECDSASignatureZ_clone(uint64_t orig) { + LDKCOption_ECDSASignatureZ* orig_conv = (LDKCOption_ECDSASignatureZ*)untag_ptr(orig); + LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ"); + *ret_copy = COption_ECDSASignatureZ_clone(orig_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + uint64_t __attribute__((export_name("TS_COption_i64Z_some"))) TS_COption_i64Z_some(int64_t o) { LDKCOption_i64Z *ret_copy = MALLOC(sizeof(LDKCOption_i64Z), "LDKCOption_i64Z"); *ret_copy = COption_i64Z_some(o); @@ -28959,6 +31417,27 @@ uint64_t __attribute__((export_name("TS_CResult_ShutdownScriptInvalidShutdownSc return tag_ptr(ret_conv, true); } +void __attribute__((export_name("TS_CVec_TransactionZ_free"))) TS_CVec_TransactionZ_free(ptrArray _res) { + LDKCVec_TransactionZ _res_constr; + _res_constr.datalen = _res->arr_len; + if (_res_constr.datalen > 0) + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKTransaction), "LDKCVec_TransactionZ Elements"); + else + _res_constr.data = NULL; + int8_tArray* _res_vals = (void*) _res->elems; + for (size_t m = 0; m < _res_constr.datalen; m++) { + int8_tArray _res_conv_12 = _res_vals[m]; + LDKTransaction _res_conv_12_ref; + _res_conv_12_ref.datalen = _res_conv_12->arr_len; + _res_conv_12_ref.data = MALLOC(_res_conv_12_ref.datalen, "LDKTransaction Bytes"); + memcpy(_res_conv_12_ref.data, _res_conv_12->elems, _res_conv_12_ref.datalen); FREE(_res_conv_12); + _res_conv_12_ref.data_is_owned = true; + _res_constr.data[m] = _res_conv_12_ref; + } + FREE(_res); + CVec_TransactionZ_free(_res_constr); +} + uint64_t __attribute__((export_name("TS_CResult_PaymentPurposeDecodeErrorZ_ok"))) TS_CResult_PaymentPurposeDecodeErrorZ_ok(uint64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -30471,6 +32950,60 @@ uint64_t __attribute__((export_name("TS_CResult_UntrustedStringDecodeErrorZ_clo return tag_ptr(ret_conv, true); } +uint64_t __attribute__((export_name("TS_CResult_ChannelIdDecodeErrorZ_ok"))) TS_CResult_ChannelIdDecodeErrorZ_ok(uint64_t o) { + LDKChannelId o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = ChannelId_clone(&o_conv); + LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ"); + *ret_conv = CResult_ChannelIdDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_ChannelIdDecodeErrorZ_err"))) TS_CResult_ChannelIdDecodeErrorZ_err(uint64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ"); + *ret_conv = CResult_ChannelIdDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_ChannelIdDecodeErrorZ_is_ok"))) TS_CResult_ChannelIdDecodeErrorZ_is_ok(uint64_t o) { + LDKCResult_ChannelIdDecodeErrorZ* o_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_ChannelIdDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_ChannelIdDecodeErrorZ_free"))) TS_CResult_ChannelIdDecodeErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_ChannelIdDecodeErrorZ _res_conv = *(LDKCResult_ChannelIdDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_ChannelIdDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_ChannelIdDecodeErrorZ_clone_ptr(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ"); + *ret_conv = CResult_ChannelIdDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_ChannelIdDecodeErrorZ_clone_ptr"))) TS_CResult_ChannelIdDecodeErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_ChannelIdDecodeErrorZ* arg_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_ChannelIdDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_ChannelIdDecodeErrorZ_clone"))) TS_CResult_ChannelIdDecodeErrorZ_clone(uint64_t orig) { + LDKCResult_ChannelIdDecodeErrorZ* orig_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(orig); + LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ"); + *ret_conv = CResult_ChannelIdDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + static inline uint64_t C2Tuple__u832u16Z_clone_ptr(LDKC2Tuple__u832u16Z *NONNULL_PTR arg) { LDKC2Tuple__u832u16Z* ret_conv = MALLOC(sizeof(LDKC2Tuple__u832u16Z), "LDKC2Tuple__u832u16Z"); *ret_conv = C2Tuple__u832u16Z_clone(arg); @@ -30615,98 +33148,218 @@ uint64_t __attribute__((export_name("TS_CResult_PaymentConstraintsDecodeErrorZ_ return tag_ptr(ret_conv, true); } -static inline uint64_t C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR arg) { - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ"); - *ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(arg); +uint64_t __attribute__((export_name("TS_CResult_PaymentContextDecodeErrorZ_ok"))) TS_CResult_PaymentContextDecodeErrorZ_ok(uint64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKPaymentContext o_conv = *(LDKPaymentContext*)(o_ptr); + o_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(o)); + LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ"); + *ret_conv = CResult_PaymentContextDecodeErrorZ_ok(o_conv); return tag_ptr(ret_conv, true); } -int64_t __attribute__((export_name("TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr"))) TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(uint64_t arg) { - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* arg_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(arg); - int64_t ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(arg_conv); + +uint64_t __attribute__((export_name("TS_CResult_PaymentContextDecodeErrorZ_err"))) TS_CResult_PaymentContextDecodeErrorZ_err(uint64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ"); + *ret_conv = CResult_PaymentContextDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_PaymentContextDecodeErrorZ_is_ok"))) TS_CResult_PaymentContextDecodeErrorZ_is_ok(uint64_t o) { + LDKCResult_PaymentContextDecodeErrorZ* o_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_PaymentContextDecodeErrorZ_is_ok(o_conv); return ret_conv; } -uint64_t __attribute__((export_name("TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone"))) TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(uint64_t orig) { - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* orig_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(orig); - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ"); - *ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(orig_conv); +void __attribute__((export_name("TS_CResult_PaymentContextDecodeErrorZ_free"))) TS_CResult_PaymentContextDecodeErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_PaymentContextDecodeErrorZ _res_conv = *(LDKCResult_PaymentContextDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_PaymentContextDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_PaymentContextDecodeErrorZ_clone_ptr(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ"); + *ret_conv = CResult_PaymentContextDecodeErrorZ_clone(arg); return tag_ptr(ret_conv, true); } +int64_t __attribute__((export_name("TS_CResult_PaymentContextDecodeErrorZ_clone_ptr"))) TS_CResult_PaymentContextDecodeErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_PaymentContextDecodeErrorZ* arg_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_PaymentContextDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} -uint64_t __attribute__((export_name("TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new"))) TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new(int8_tArray a, uint64_t b, uint64_t c) { - LDKThirtyTwoBytes a_ref; - CHECK(a->arr_len == 32); - memcpy(a_ref.data, a->elems, 32); FREE(a); - LDKRecipientOnionFields b_conv; - b_conv.inner = untag_ptr(b); - b_conv.is_owned = ptr_is_owned(b); - CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); - b_conv = RecipientOnionFields_clone(&b_conv); - LDKRouteParameters c_conv; - c_conv.inner = untag_ptr(c); - c_conv.is_owned = ptr_is_owned(c); - CHECK_INNER_FIELD_ACCESS_OR_NULL(c_conv); - c_conv = RouteParameters_clone(&c_conv); - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ"); - *ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new(a_ref, b_conv, c_conv); +uint64_t __attribute__((export_name("TS_CResult_PaymentContextDecodeErrorZ_clone"))) TS_CResult_PaymentContextDecodeErrorZ_clone(uint64_t orig) { + LDKCResult_PaymentContextDecodeErrorZ* orig_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(orig); + LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ"); + *ret_conv = CResult_PaymentContextDecodeErrorZ_clone(orig_conv); return tag_ptr(ret_conv, true); } -void __attribute__((export_name("TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free"))) TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free(uint64_t _res) { +uint64_t __attribute__((export_name("TS_CResult_UnknownPaymentContextDecodeErrorZ_ok"))) TS_CResult_UnknownPaymentContextDecodeErrorZ_ok(uint64_t o) { + LDKUnknownPaymentContext o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = UnknownPaymentContext_clone(&o_conv); + LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ"); + *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_UnknownPaymentContextDecodeErrorZ_err"))) TS_CResult_UnknownPaymentContextDecodeErrorZ_err(uint64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ"); + *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_UnknownPaymentContextDecodeErrorZ_is_ok"))) TS_CResult_UnknownPaymentContextDecodeErrorZ_is_ok(uint64_t o) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* o_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_UnknownPaymentContextDecodeErrorZ_free"))) TS_CResult_UnknownPaymentContextDecodeErrorZ_free(uint64_t _res) { if (!ptr_is_owned(_res)) return; void* _res_ptr = untag_ptr(_res); CHECK_ACCESS(_res_ptr); - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ _res_conv = *(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)(_res_ptr); + LDKCResult_UnknownPaymentContextDecodeErrorZ _res_conv = *(LDKCResult_UnknownPaymentContextDecodeErrorZ*)(_res_ptr); FREE(untag_ptr(_res)); - C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free(_res_conv); + CResult_UnknownPaymentContextDecodeErrorZ_free(_res_conv); } -uint64_t __attribute__((export_name("TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok"))) TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok(uint64_t o) { - void* o_ptr = untag_ptr(o); - CHECK_ACCESS(o_ptr); - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ o_conv = *(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)(o_ptr); - o_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone((LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(o)); - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ"); - *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok(o_conv); +static inline uint64_t CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ"); + *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_clone(arg); return tag_ptr(ret_conv, true); } +int64_t __attribute__((export_name("TS_CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr"))) TS_CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* arg_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} -uint64_t __attribute__((export_name("TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err"))) TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err() { - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ"); - *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err(); +uint64_t __attribute__((export_name("TS_CResult_UnknownPaymentContextDecodeErrorZ_clone"))) TS_CResult_UnknownPaymentContextDecodeErrorZ_clone(uint64_t orig) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* orig_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(orig); + LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ"); + *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_clone(orig_conv); return tag_ptr(ret_conv, true); } -jboolean __attribute__((export_name("TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok"))) TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok(uint64_t o) { - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* o_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(o); - jboolean ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok(o_conv); +uint64_t __attribute__((export_name("TS_CResult_Bolt12OfferContextDecodeErrorZ_ok"))) TS_CResult_Bolt12OfferContextDecodeErrorZ_ok(uint64_t o) { + LDKBolt12OfferContext o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = Bolt12OfferContext_clone(&o_conv); + LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_Bolt12OfferContextDecodeErrorZ_err"))) TS_CResult_Bolt12OfferContextDecodeErrorZ_err(uint64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_Bolt12OfferContextDecodeErrorZ_is_ok"))) TS_CResult_Bolt12OfferContextDecodeErrorZ_is_ok(uint64_t o) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* o_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_is_ok(o_conv); return ret_conv; } -void __attribute__((export_name("TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free"))) TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free(uint64_t _res) { +void __attribute__((export_name("TS_CResult_Bolt12OfferContextDecodeErrorZ_free"))) TS_CResult_Bolt12OfferContextDecodeErrorZ_free(uint64_t _res) { if (!ptr_is_owned(_res)) return; void* _res_ptr = untag_ptr(_res); CHECK_ACCESS(_res_ptr); - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ _res_conv = *(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)(_res_ptr); + LDKCResult_Bolt12OfferContextDecodeErrorZ _res_conv = *(LDKCResult_Bolt12OfferContextDecodeErrorZ*)(_res_ptr); FREE(untag_ptr(_res)); - CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free(_res_conv); + CResult_Bolt12OfferContextDecodeErrorZ_free(_res_conv); } -static inline uint64_t CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR arg) { - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ"); - *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(arg); +static inline uint64_t CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_clone(arg); return tag_ptr(ret_conv, true); } -int64_t __attribute__((export_name("TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr"))) TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(uint64_t arg) { - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* arg_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(arg); - int64_t ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(arg_conv); +int64_t __attribute__((export_name("TS_CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr"))) TS_CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* arg_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(arg_conv); return ret_conv; } -uint64_t __attribute__((export_name("TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone"))) TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(uint64_t orig) { - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* orig_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(orig); - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ"); - *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(orig_conv); +uint64_t __attribute__((export_name("TS_CResult_Bolt12OfferContextDecodeErrorZ_clone"))) TS_CResult_Bolt12OfferContextDecodeErrorZ_clone(uint64_t orig) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* orig_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(orig); + LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_Bolt12RefundContextDecodeErrorZ_ok"))) TS_CResult_Bolt12RefundContextDecodeErrorZ_ok(uint64_t o) { + LDKBolt12RefundContext o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = Bolt12RefundContext_clone(&o_conv); + LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_Bolt12RefundContextDecodeErrorZ_err"))) TS_CResult_Bolt12RefundContextDecodeErrorZ_err(uint64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_Bolt12RefundContextDecodeErrorZ_is_ok"))) TS_CResult_Bolt12RefundContextDecodeErrorZ_is_ok(uint64_t o) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* o_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_Bolt12RefundContextDecodeErrorZ_free"))) TS_CResult_Bolt12RefundContextDecodeErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_Bolt12RefundContextDecodeErrorZ _res_conv = *(LDKCResult_Bolt12RefundContextDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_Bolt12RefundContextDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr"))) TS_CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* arg_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_Bolt12RefundContextDecodeErrorZ_clone"))) TS_CResult_Bolt12RefundContextDecodeErrorZ_clone(uint64_t orig) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* orig_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(orig); + LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_clone(orig_conv); return tag_ptr(ret_conv, true); } @@ -30757,6 +33410,101 @@ uint64_t __attribute__((export_name("TS_CResult_StrSecp256k1ErrorZ_clone"))) TS return tag_ptr(ret_conv, true); } +static inline uint64_t C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR arg) { + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ"); + *ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr"))) TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(uint64_t arg) { + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* arg_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(arg); + int64_t ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone"))) TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(uint64_t orig) { + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* orig_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(orig); + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ"); + *ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new"))) TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new(int8_tArray a, uint64_t b, uint64_t c) { + LDKThirtyTwoBytes a_ref; + CHECK(a->arr_len == 32); + memcpy(a_ref.data, a->elems, 32); FREE(a); + LDKRecipientOnionFields b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv = RecipientOnionFields_clone(&b_conv); + LDKRouteParameters c_conv; + c_conv.inner = untag_ptr(c); + c_conv.is_owned = ptr_is_owned(c); + CHECK_INNER_FIELD_ACCESS_OR_NULL(c_conv); + c_conv = RouteParameters_clone(&c_conv); + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ"); + *ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new(a_ref, b_conv, c_conv); + return tag_ptr(ret_conv, true); +} + +void __attribute__((export_name("TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free"))) TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ _res_conv = *(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)(_res_ptr); + FREE(untag_ptr(_res)); + C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free(_res_conv); +} + +uint64_t __attribute__((export_name("TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok"))) TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok(uint64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ o_conv = *(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)(o_ptr); + o_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone((LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(o)); + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ"); + *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err"))) TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err() { + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ"); + *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err(); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok"))) TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok(uint64_t o) { + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* o_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(o); + jboolean ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free"))) TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ _res_conv = *(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free(_res_conv); +} + +static inline uint64_t CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR arg) { + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ"); + *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr"))) TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(uint64_t arg) { + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* arg_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(arg); + int64_t ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone"))) TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(uint64_t orig) { + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* orig_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(orig); + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ"); + *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + uint64_t __attribute__((export_name("TS_CResult_TxOutUtxoLookupErrorZ_ok"))) TS_CResult_TxOutUtxoLookupErrorZ_ok(uint64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -30887,6 +33635,24 @@ void __attribute__((export_name("TS_CResult_C3Tuple_PublicKeyOnionMessageCOptio CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_free(_res_conv); } +static inline uint64_t CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ *NONNULL_PTR arg) { + LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ"); + *ret_conv = CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr"))) TS_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* arg_conv = (LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone"))) TS_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(uint64_t orig) { + LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* orig_conv = (LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ*)untag_ptr(orig); + LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ"); + *ret_conv = CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + uint64_t __attribute__((export_name("TS_CResult_PeeledOnionNoneZ_ok"))) TS_CResult_PeeledOnionNoneZ_ok(uint64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -30918,6 +33684,24 @@ void __attribute__((export_name("TS_CResult_PeeledOnionNoneZ_free"))) TS_CResul CResult_PeeledOnionNoneZ_free(_res_conv); } +static inline uint64_t CResult_PeeledOnionNoneZ_clone_ptr(LDKCResult_PeeledOnionNoneZ *NONNULL_PTR arg) { + LDKCResult_PeeledOnionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PeeledOnionNoneZ), "LDKCResult_PeeledOnionNoneZ"); + *ret_conv = CResult_PeeledOnionNoneZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_PeeledOnionNoneZ_clone_ptr"))) TS_CResult_PeeledOnionNoneZ_clone_ptr(uint64_t arg) { + LDKCResult_PeeledOnionNoneZ* arg_conv = (LDKCResult_PeeledOnionNoneZ*)untag_ptr(arg); + int64_t ret_conv = CResult_PeeledOnionNoneZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_PeeledOnionNoneZ_clone"))) TS_CResult_PeeledOnionNoneZ_clone(uint64_t orig) { + LDKCResult_PeeledOnionNoneZ* orig_conv = (LDKCResult_PeeledOnionNoneZ*)untag_ptr(orig); + LDKCResult_PeeledOnionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PeeledOnionNoneZ), "LDKCResult_PeeledOnionNoneZ"); + *ret_conv = CResult_PeeledOnionNoneZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + uint64_t __attribute__((export_name("TS_CResult_SendSuccessSendErrorZ_ok"))) TS_CResult_SendSuccessSendErrorZ_ok(uint64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -30953,6 +33737,24 @@ void __attribute__((export_name("TS_CResult_SendSuccessSendErrorZ_free"))) TS_C CResult_SendSuccessSendErrorZ_free(_res_conv); } +static inline uint64_t CResult_SendSuccessSendErrorZ_clone_ptr(LDKCResult_SendSuccessSendErrorZ *NONNULL_PTR arg) { + LDKCResult_SendSuccessSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SendSuccessSendErrorZ), "LDKCResult_SendSuccessSendErrorZ"); + *ret_conv = CResult_SendSuccessSendErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_SendSuccessSendErrorZ_clone_ptr"))) TS_CResult_SendSuccessSendErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_SendSuccessSendErrorZ* arg_conv = (LDKCResult_SendSuccessSendErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_SendSuccessSendErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_SendSuccessSendErrorZ_clone"))) TS_CResult_SendSuccessSendErrorZ_clone(uint64_t orig) { + LDKCResult_SendSuccessSendErrorZ* orig_conv = (LDKCResult_SendSuccessSendErrorZ*)untag_ptr(orig); + LDKCResult_SendSuccessSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SendSuccessSendErrorZ), "LDKCResult_SendSuccessSendErrorZ"); + *ret_conv = CResult_SendSuccessSendErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + uint64_t __attribute__((export_name("TS_CResult_BlindedPathNoneZ_ok"))) TS_CResult_BlindedPathNoneZ_ok(uint64_t o) { LDKBlindedPath o_conv; o_conv.inner = untag_ptr(o); @@ -31234,6 +34036,261 @@ uint64_t __attribute__((export_name("TS_CResult_InvoiceErrorDecodeErrorZ_clone" return tag_ptr(ret_conv, true); } +uint64_t __attribute__((export_name("TS_CResult_TrackedSpendableOutputDecodeErrorZ_ok"))) TS_CResult_TrackedSpendableOutputDecodeErrorZ_ok(uint64_t o) { + LDKTrackedSpendableOutput o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = TrackedSpendableOutput_clone(&o_conv); + LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ"); + *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_TrackedSpendableOutputDecodeErrorZ_err"))) TS_CResult_TrackedSpendableOutputDecodeErrorZ_err(uint64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ"); + *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_TrackedSpendableOutputDecodeErrorZ_is_ok"))) TS_CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(uint64_t o) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* o_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_TrackedSpendableOutputDecodeErrorZ_free"))) TS_CResult_TrackedSpendableOutputDecodeErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_TrackedSpendableOutputDecodeErrorZ _res_conv = *(LDKCResult_TrackedSpendableOutputDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_TrackedSpendableOutputDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ"); + *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr"))) TS_CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* arg_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_TrackedSpendableOutputDecodeErrorZ_clone"))) TS_CResult_TrackedSpendableOutputDecodeErrorZ_clone(uint64_t orig) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* orig_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(orig); + LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ"); + *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_OutputSpendStatusDecodeErrorZ_ok"))) TS_CResult_OutputSpendStatusDecodeErrorZ_ok(uint64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKOutputSpendStatus o_conv = *(LDKOutputSpendStatus*)(o_ptr); + o_conv = OutputSpendStatus_clone((LDKOutputSpendStatus*)untag_ptr(o)); + LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ"); + *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_OutputSpendStatusDecodeErrorZ_err"))) TS_CResult_OutputSpendStatusDecodeErrorZ_err(uint64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ"); + *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_OutputSpendStatusDecodeErrorZ_is_ok"))) TS_CResult_OutputSpendStatusDecodeErrorZ_is_ok(uint64_t o) { + LDKCResult_OutputSpendStatusDecodeErrorZ* o_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_OutputSpendStatusDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_OutputSpendStatusDecodeErrorZ_free"))) TS_CResult_OutputSpendStatusDecodeErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_OutputSpendStatusDecodeErrorZ _res_conv = *(LDKCResult_OutputSpendStatusDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_OutputSpendStatusDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ"); + *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_CResult_OutputSpendStatusDecodeErrorZ_clone_ptr"))) TS_CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(uint64_t arg) { + LDKCResult_OutputSpendStatusDecodeErrorZ* arg_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CResult_OutputSpendStatusDecodeErrorZ_clone"))) TS_CResult_OutputSpendStatusDecodeErrorZ_clone(uint64_t orig) { + LDKCResult_OutputSpendStatusDecodeErrorZ* orig_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(orig); + LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ"); + *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_COption_FilterZ_some"))) TS_COption_FilterZ_some(uint64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKFilter o_conv = *(LDKFilter*)(o_ptr); + if (o_conv.free == LDKFilter_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFilter_JCalls_cloned(&o_conv); + } + LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ"); + *ret_copy = COption_FilterZ_some(o_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_COption_FilterZ_none"))) TS_COption_FilterZ_none() { + LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ"); + *ret_copy = COption_FilterZ_none(); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void __attribute__((export_name("TS_COption_FilterZ_free"))) TS_COption_FilterZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCOption_FilterZ _res_conv = *(LDKCOption_FilterZ*)(_res_ptr); + FREE(untag_ptr(_res)); + COption_FilterZ_free(_res_conv); +} + +void __attribute__((export_name("TS_CVec_TrackedSpendableOutputZ_free"))) TS_CVec_TrackedSpendableOutputZ_free(uint64_tArray _res) { + LDKCVec_TrackedSpendableOutputZ _res_constr; + _res_constr.datalen = _res->arr_len; + if (_res_constr.datalen > 0) + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKTrackedSpendableOutput), "LDKCVec_TrackedSpendableOutputZ Elements"); + else + _res_constr.data = NULL; + uint64_t* _res_vals = _res->elems; + for (size_t y = 0; y < _res_constr.datalen; y++) { + uint64_t _res_conv_24 = _res_vals[y]; + LDKTrackedSpendableOutput _res_conv_24_conv; + _res_conv_24_conv.inner = untag_ptr(_res_conv_24); + _res_conv_24_conv.is_owned = ptr_is_owned(_res_conv_24); + CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_24_conv); + _res_constr.data[y] = _res_conv_24_conv; + } + FREE(_res); + CVec_TrackedSpendableOutputZ_free(_res_constr); +} + +uint64_t __attribute__((export_name("TS_CResult_OutputSweeperDecodeErrorZ_ok"))) TS_CResult_OutputSweeperDecodeErrorZ_ok(uint64_t o) { + LDKOutputSweeper o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + // WARNING: we need a move here but no clone is available for LDKOutputSweeper + + LDKCResult_OutputSweeperDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSweeperDecodeErrorZ), "LDKCResult_OutputSweeperDecodeErrorZ"); + *ret_conv = CResult_OutputSweeperDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_OutputSweeperDecodeErrorZ_err"))) TS_CResult_OutputSweeperDecodeErrorZ_err(uint64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_OutputSweeperDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSweeperDecodeErrorZ), "LDKCResult_OutputSweeperDecodeErrorZ"); + *ret_conv = CResult_OutputSweeperDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_OutputSweeperDecodeErrorZ_is_ok"))) TS_CResult_OutputSweeperDecodeErrorZ_is_ok(uint64_t o) { + LDKCResult_OutputSweeperDecodeErrorZ* o_conv = (LDKCResult_OutputSweeperDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_OutputSweeperDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_OutputSweeperDecodeErrorZ_free"))) TS_CResult_OutputSweeperDecodeErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_OutputSweeperDecodeErrorZ _res_conv = *(LDKCResult_OutputSweeperDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_OutputSweeperDecodeErrorZ_free(_res_conv); +} + +uint64_t __attribute__((export_name("TS_C2Tuple_BestBlockOutputSweeperZ_new"))) TS_C2Tuple_BestBlockOutputSweeperZ_new(uint64_t a, uint64_t b) { + LDKBestBlock a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = BestBlock_clone(&a_conv); + LDKOutputSweeper b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + // WARNING: we need a move here but no clone is available for LDKOutputSweeper + + LDKC2Tuple_BestBlockOutputSweeperZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BestBlockOutputSweeperZ), "LDKC2Tuple_BestBlockOutputSweeperZ"); + *ret_conv = C2Tuple_BestBlockOutputSweeperZ_new(a_conv, b_conv); + return tag_ptr(ret_conv, true); +} + +void __attribute__((export_name("TS_C2Tuple_BestBlockOutputSweeperZ_free"))) TS_C2Tuple_BestBlockOutputSweeperZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKC2Tuple_BestBlockOutputSweeperZ _res_conv = *(LDKC2Tuple_BestBlockOutputSweeperZ*)(_res_ptr); + FREE(untag_ptr(_res)); + C2Tuple_BestBlockOutputSweeperZ_free(_res_conv); +} + +uint64_t __attribute__((export_name("TS_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok"))) TS_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok(uint64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKC2Tuple_BestBlockOutputSweeperZ o_conv = *(LDKC2Tuple_BestBlockOutputSweeperZ*)(o_ptr); + // WARNING: we may need a move here but no clone is available for LDKC2Tuple_BestBlockOutputSweeperZ + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ), "LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ"); + *ret_conv = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err"))) TS_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err(uint64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ), "LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ"); + *ret_conv = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean __attribute__((export_name("TS_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok"))) TS_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(uint64_t o) { + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* o_conv = (LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free"))) TS_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ _res_conv = *(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free(_res_conv); +} + uint64_t __attribute__((export_name("TS_CResult_DelayedPaymentBasepointDecodeErrorZ_ok"))) TS_CResult_DelayedPaymentBasepointDecodeErrorZ_ok(uint64_t o) { LDKDelayedPaymentBasepoint o_conv; o_conv.inner = untag_ptr(o); @@ -31558,36 +34615,6 @@ uint64_t __attribute__((export_name("TS_CResult_RevocationKeyDecodeErrorZ_clone return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_COption_FilterZ_some"))) TS_COption_FilterZ_some(uint64_t o) { - void* o_ptr = untag_ptr(o); - CHECK_ACCESS(o_ptr); - LDKFilter o_conv = *(LDKFilter*)(o_ptr); - if (o_conv.free == LDKFilter_JCalls_free) { - // If this_arg is a JCalls struct, then we need to increment the refcnt in it. - LDKFilter_JCalls_cloned(&o_conv); - } - LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ"); - *ret_copy = COption_FilterZ_some(o_conv); - uint64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -uint64_t __attribute__((export_name("TS_COption_FilterZ_none"))) TS_COption_FilterZ_none() { - LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ"); - *ret_copy = COption_FilterZ_none(); - uint64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -void __attribute__((export_name("TS_COption_FilterZ_free"))) TS_COption_FilterZ_free(uint64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKCOption_FilterZ _res_conv = *(LDKCOption_FilterZ*)(_res_ptr); - FREE(untag_ptr(_res)); - COption_FilterZ_free(_res_conv); -} - uint64_t __attribute__((export_name("TS_CResult_LockedChannelMonitorNoneZ_ok"))) TS_CResult_LockedChannelMonitorNoneZ_ok(uint64_t o) { LDKLockedChannelMonitor o_conv; o_conv.inner = untag_ptr(o); @@ -31621,24 +34648,67 @@ void __attribute__((export_name("TS_CResult_LockedChannelMonitorNoneZ_free"))) CResult_LockedChannelMonitorNoneZ_free(_res_conv); } -void __attribute__((export_name("TS_CVec_OutPointZ_free"))) TS_CVec_OutPointZ_free(uint64_tArray _res) { - LDKCVec_OutPointZ _res_constr; +static inline uint64_t C2Tuple_OutPointChannelIdZ_clone_ptr(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR arg) { + LDKC2Tuple_OutPointChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ"); + *ret_conv = C2Tuple_OutPointChannelIdZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t __attribute__((export_name("TS_C2Tuple_OutPointChannelIdZ_clone_ptr"))) TS_C2Tuple_OutPointChannelIdZ_clone_ptr(uint64_t arg) { + LDKC2Tuple_OutPointChannelIdZ* arg_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(arg); + int64_t ret_conv = C2Tuple_OutPointChannelIdZ_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_C2Tuple_OutPointChannelIdZ_clone"))) TS_C2Tuple_OutPointChannelIdZ_clone(uint64_t orig) { + LDKC2Tuple_OutPointChannelIdZ* orig_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(orig); + LDKC2Tuple_OutPointChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ"); + *ret_conv = C2Tuple_OutPointChannelIdZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_C2Tuple_OutPointChannelIdZ_new"))) TS_C2Tuple_OutPointChannelIdZ_new(uint64_t a, uint64_t b) { + LDKOutPoint a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = OutPoint_clone(&a_conv); + LDKChannelId b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv = ChannelId_clone(&b_conv); + LDKC2Tuple_OutPointChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ"); + *ret_conv = C2Tuple_OutPointChannelIdZ_new(a_conv, b_conv); + return tag_ptr(ret_conv, true); +} + +void __attribute__((export_name("TS_C2Tuple_OutPointChannelIdZ_free"))) TS_C2Tuple_OutPointChannelIdZ_free(uint64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKC2Tuple_OutPointChannelIdZ _res_conv = *(LDKC2Tuple_OutPointChannelIdZ*)(_res_ptr); + FREE(untag_ptr(_res)); + C2Tuple_OutPointChannelIdZ_free(_res_conv); +} + +void __attribute__((export_name("TS_CVec_C2Tuple_OutPointChannelIdZZ_free"))) TS_CVec_C2Tuple_OutPointChannelIdZZ_free(uint64_tArray _res) { + LDKCVec_C2Tuple_OutPointChannelIdZZ _res_constr; _res_constr.datalen = _res->arr_len; if (_res_constr.datalen > 0) - _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKOutPoint), "LDKCVec_OutPointZ Elements"); + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKCVec_C2Tuple_OutPointChannelIdZZ Elements"); else _res_constr.data = NULL; uint64_t* _res_vals = _res->elems; - for (size_t k = 0; k < _res_constr.datalen; k++) { - uint64_t _res_conv_10 = _res_vals[k]; - LDKOutPoint _res_conv_10_conv; - _res_conv_10_conv.inner = untag_ptr(_res_conv_10); - _res_conv_10_conv.is_owned = ptr_is_owned(_res_conv_10); - CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_10_conv); - _res_constr.data[k] = _res_conv_10_conv; + for (size_t d = 0; d < _res_constr.datalen; d++) { + uint64_t _res_conv_29 = _res_vals[d]; + void* _res_conv_29_ptr = untag_ptr(_res_conv_29); + CHECK_ACCESS(_res_conv_29_ptr); + LDKC2Tuple_OutPointChannelIdZ _res_conv_29_conv = *(LDKC2Tuple_OutPointChannelIdZ*)(_res_conv_29_ptr); + FREE(untag_ptr(_res_conv_29)); + _res_constr.data[d] = _res_conv_29_conv; } FREE(_res); - CVec_OutPointZ_free(_res_constr); + CVec_C2Tuple_OutPointChannelIdZZ_free(_res_constr); } void __attribute__((export_name("TS_CVec_MonitorUpdateIdZ_free"))) TS_CVec_MonitorUpdateIdZ_free(uint64_tArray _res) { @@ -32138,6 +35208,19 @@ int8_tArray __attribute__((export_name("TS_TransactionU16LenLimited_into_transa return ret_arr; } +int8_tArray __attribute__((export_name("TS_TransactionU16LenLimited_as_transaction"))) TS_TransactionU16LenLimited_as_transaction(uint64_t this_arg) { + LDKTransactionU16LenLimited this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKTransaction ret_var = TransactionU16LenLimited_as_transaction(&this_arg_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + Transaction_free(ret_var); + return ret_arr; +} + int8_tArray __attribute__((export_name("TS_TransactionU16LenLimited_write"))) TS_TransactionU16LenLimited_write(uint64_t obj) { LDKTransactionU16LenLimited obj_conv; obj_conv.inner = untag_ptr(obj); @@ -32370,6 +35453,55 @@ uint64_t __attribute__((export_name("TS_MonitorUpdatingPersister_as_Persist"))) return tag_ptr(ret_ret, true); } +uint32_t __attribute__((export_name("TS_ShortChannelIdError_clone"))) TS_ShortChannelIdError_clone(uint64_t orig) { + LDKShortChannelIdError* orig_conv = (LDKShortChannelIdError*)untag_ptr(orig); + uint32_t ret_conv = LDKShortChannelIdError_to_js(ShortChannelIdError_clone(orig_conv)); + return ret_conv; +} + +uint32_t __attribute__((export_name("TS_ShortChannelIdError_block_overflow"))) TS_ShortChannelIdError_block_overflow() { + uint32_t ret_conv = LDKShortChannelIdError_to_js(ShortChannelIdError_block_overflow()); + return ret_conv; +} + +uint32_t __attribute__((export_name("TS_ShortChannelIdError_tx_index_overflow"))) TS_ShortChannelIdError_tx_index_overflow() { + uint32_t ret_conv = LDKShortChannelIdError_to_js(ShortChannelIdError_tx_index_overflow()); + return ret_conv; +} + +uint32_t __attribute__((export_name("TS_ShortChannelIdError_vout_index_overflow"))) TS_ShortChannelIdError_vout_index_overflow() { + uint32_t ret_conv = LDKShortChannelIdError_to_js(ShortChannelIdError_vout_index_overflow()); + return ret_conv; +} + +jboolean __attribute__((export_name("TS_ShortChannelIdError_eq"))) TS_ShortChannelIdError_eq(uint64_t a, uint64_t b) { + LDKShortChannelIdError* a_conv = (LDKShortChannelIdError*)untag_ptr(a); + LDKShortChannelIdError* b_conv = (LDKShortChannelIdError*)untag_ptr(b); + jboolean ret_conv = ShortChannelIdError_eq(a_conv, b_conv); + return ret_conv; +} + +int32_t __attribute__((export_name("TS_block_from_scid"))) TS_block_from_scid(int64_t short_channel_id) { + int32_t ret_conv = block_from_scid(short_channel_id); + return ret_conv; +} + +int32_t __attribute__((export_name("TS_tx_index_from_scid"))) TS_tx_index_from_scid(int64_t short_channel_id) { + int32_t ret_conv = tx_index_from_scid(short_channel_id); + return ret_conv; +} + +int16_t __attribute__((export_name("TS_vout_from_scid"))) TS_vout_from_scid(int64_t short_channel_id) { + int16_t ret_conv = vout_from_scid(short_channel_id); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_scid_from_parts"))) TS_scid_from_parts(int64_t block, int64_t tx_index, int64_t vout_index) { + LDKCResult_u64ShortChannelIdErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u64ShortChannelIdErrorZ), "LDKCResult_u64ShortChannelIdErrorZ"); + *ret_conv = scid_from_parts(block, tx_index, vout_index); + return tag_ptr(ret_conv, true); +} + void __attribute__((export_name("TS_UntrustedString_free"))) TS_UntrustedString_free(uint64_t this_obj) { LDKUntrustedString this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -32526,53 +35658,647 @@ uint64_t __attribute__((export_name("TS_PrintableString_new"))) TS_PrintableStr return ret_ref; } -void __attribute__((export_name("TS_FutureCallback_free"))) TS_FutureCallback_free(uint64_t this_ptr) { - if (!ptr_is_owned(this_ptr)) return; - void* this_ptr_ptr = untag_ptr(this_ptr); - CHECK_ACCESS(this_ptr_ptr); - LDKFutureCallback this_ptr_conv = *(LDKFutureCallback*)(this_ptr_ptr); - FREE(untag_ptr(this_ptr)); - FutureCallback_free(this_ptr_conv); -} - -void __attribute__((export_name("TS_Future_free"))) TS_Future_free(uint64_t this_obj) { - LDKFuture this_obj_conv; +void __attribute__((export_name("TS_TrackedSpendableOutput_free"))) TS_TrackedSpendableOutput_free(uint64_t this_obj) { + LDKTrackedSpendableOutput this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); this_obj_conv.is_owned = ptr_is_owned(this_obj); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - Future_free(this_obj_conv); + TrackedSpendableOutput_free(this_obj_conv); } -static inline uint64_t Future_clone_ptr(LDKFuture *NONNULL_PTR arg) { - LDKFuture ret_var = Future_clone(arg); +uint64_t __attribute__((export_name("TS_TrackedSpendableOutput_get_descriptor"))) TS_TrackedSpendableOutput_get_descriptor(uint64_t this_ptr) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKSpendableOutputDescriptor *ret_copy = MALLOC(sizeof(LDKSpendableOutputDescriptor), "LDKSpendableOutputDescriptor"); + *ret_copy = TrackedSpendableOutput_get_descriptor(&this_ptr_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void __attribute__((export_name("TS_TrackedSpendableOutput_set_descriptor"))) TS_TrackedSpendableOutput_set_descriptor(uint64_t this_ptr, uint64_t val) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKSpendableOutputDescriptor val_conv = *(LDKSpendableOutputDescriptor*)(val_ptr); + val_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(val)); + TrackedSpendableOutput_set_descriptor(&this_ptr_conv, val_conv); +} + +uint64_t __attribute__((export_name("TS_TrackedSpendableOutput_get_channel_id"))) TS_TrackedSpendableOutput_get_channel_id(uint64_t this_ptr) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelId ret_var = TrackedSpendableOutput_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void __attribute__((export_name("TS_TrackedSpendableOutput_set_channel_id"))) TS_TrackedSpendableOutput_set_channel_id(uint64_t this_ptr, uint64_t val) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TrackedSpendableOutput_set_channel_id(&this_ptr_conv, val_conv); +} + +uint64_t __attribute__((export_name("TS_TrackedSpendableOutput_get_status"))) TS_TrackedSpendableOutput_get_status(uint64_t this_ptr) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = TrackedSpendableOutput_get_status(&this_ptr_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void __attribute__((export_name("TS_TrackedSpendableOutput_set_status"))) TS_TrackedSpendableOutput_set_status(uint64_t this_ptr, uint64_t val) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKOutputSpendStatus val_conv = *(LDKOutputSpendStatus*)(val_ptr); + val_conv = OutputSpendStatus_clone((LDKOutputSpendStatus*)untag_ptr(val)); + TrackedSpendableOutput_set_status(&this_ptr_conv, val_conv); +} + +uint64_t __attribute__((export_name("TS_TrackedSpendableOutput_new"))) TS_TrackedSpendableOutput_new(uint64_t descriptor_arg, uint64_t channel_id_arg, uint64_t status_arg) { + void* descriptor_arg_ptr = untag_ptr(descriptor_arg); + CHECK_ACCESS(descriptor_arg_ptr); + LDKSpendableOutputDescriptor descriptor_arg_conv = *(LDKSpendableOutputDescriptor*)(descriptor_arg_ptr); + descriptor_arg_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptor_arg)); + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + void* status_arg_ptr = untag_ptr(status_arg); + CHECK_ACCESS(status_arg_ptr); + LDKOutputSpendStatus status_arg_conv = *(LDKOutputSpendStatus*)(status_arg_ptr); + status_arg_conv = OutputSpendStatus_clone((LDKOutputSpendStatus*)untag_ptr(status_arg)); + LDKTrackedSpendableOutput ret_var = TrackedSpendableOutput_new(descriptor_arg_conv, channel_id_arg_conv, status_arg_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t TrackedSpendableOutput_clone_ptr(LDKTrackedSpendableOutput *NONNULL_PTR arg) { + LDKTrackedSpendableOutput ret_var = TrackedSpendableOutput_clone(arg); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -int64_t __attribute__((export_name("TS_Future_clone_ptr"))) TS_Future_clone_ptr(uint64_t arg) { - LDKFuture arg_conv; +int64_t __attribute__((export_name("TS_TrackedSpendableOutput_clone_ptr"))) TS_TrackedSpendableOutput_clone_ptr(uint64_t arg) { + LDKTrackedSpendableOutput arg_conv; arg_conv.inner = untag_ptr(arg); arg_conv.is_owned = ptr_is_owned(arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); arg_conv.is_owned = false; - int64_t ret_conv = Future_clone_ptr(&arg_conv); + int64_t ret_conv = TrackedSpendableOutput_clone_ptr(&arg_conv); return ret_conv; } -uint64_t __attribute__((export_name("TS_Future_clone"))) TS_Future_clone(uint64_t orig) { - LDKFuture orig_conv; +uint64_t __attribute__((export_name("TS_TrackedSpendableOutput_clone"))) TS_TrackedSpendableOutput_clone(uint64_t orig) { + LDKTrackedSpendableOutput orig_conv; orig_conv.inner = untag_ptr(orig); orig_conv.is_owned = ptr_is_owned(orig); CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); orig_conv.is_owned = false; - LDKFuture ret_var = Future_clone(&orig_conv); + LDKTrackedSpendableOutput ret_var = TrackedSpendableOutput_clone(&orig_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } +jboolean __attribute__((export_name("TS_TrackedSpendableOutput_eq"))) TS_TrackedSpendableOutput_eq(uint64_t a, uint64_t b) { + LDKTrackedSpendableOutput a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKTrackedSpendableOutput b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = TrackedSpendableOutput_eq(&a_conv, &b_conv); + return ret_conv; +} + +jboolean __attribute__((export_name("TS_TrackedSpendableOutput_is_spent_in"))) TS_TrackedSpendableOutput_is_spent_in(uint64_t this_arg, int8_tArray tx) { + LDKTrackedSpendableOutput this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKTransaction tx_ref; + tx_ref.datalen = tx->arr_len; + tx_ref.data = MALLOC(tx_ref.datalen, "LDKTransaction Bytes"); + memcpy(tx_ref.data, tx->elems, tx_ref.datalen); FREE(tx); + tx_ref.data_is_owned = true; + jboolean ret_conv = TrackedSpendableOutput_is_spent_in(&this_arg_conv, tx_ref); + return ret_conv; +} + +int8_tArray __attribute__((export_name("TS_TrackedSpendableOutput_write"))) TS_TrackedSpendableOutput_write(uint64_t obj) { + LDKTrackedSpendableOutput obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = TrackedSpendableOutput_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +uint64_t __attribute__((export_name("TS_TrackedSpendableOutput_read"))) TS_TrackedSpendableOutput_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ"); + *ret_conv = TrackedSpendableOutput_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + +void __attribute__((export_name("TS_OutputSpendStatus_free"))) TS_OutputSpendStatus_free(uint64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKOutputSpendStatus this_ptr_conv = *(LDKOutputSpendStatus*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + OutputSpendStatus_free(this_ptr_conv); +} + +static inline uint64_t OutputSpendStatus_clone_ptr(LDKOutputSpendStatus *NONNULL_PTR arg) { + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = OutputSpendStatus_clone(arg); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t __attribute__((export_name("TS_OutputSpendStatus_clone_ptr"))) TS_OutputSpendStatus_clone_ptr(uint64_t arg) { + LDKOutputSpendStatus* arg_conv = (LDKOutputSpendStatus*)untag_ptr(arg); + int64_t ret_conv = OutputSpendStatus_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_OutputSpendStatus_clone"))) TS_OutputSpendStatus_clone(uint64_t orig) { + LDKOutputSpendStatus* orig_conv = (LDKOutputSpendStatus*)untag_ptr(orig); + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = OutputSpendStatus_clone(orig_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_OutputSpendStatus_pending_initial_broadcast"))) TS_OutputSpendStatus_pending_initial_broadcast(uint64_t delayed_until_height) { + void* delayed_until_height_ptr = untag_ptr(delayed_until_height); + CHECK_ACCESS(delayed_until_height_ptr); + LDKCOption_u32Z delayed_until_height_conv = *(LDKCOption_u32Z*)(delayed_until_height_ptr); + delayed_until_height_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(delayed_until_height)); + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = OutputSpendStatus_pending_initial_broadcast(delayed_until_height_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_OutputSpendStatus_pending_first_confirmation"))) TS_OutputSpendStatus_pending_first_confirmation(int8_tArray first_broadcast_hash, int32_t latest_broadcast_height, int8_tArray latest_spending_tx) { + LDKThirtyTwoBytes first_broadcast_hash_ref; + CHECK(first_broadcast_hash->arr_len == 32); + memcpy(first_broadcast_hash_ref.data, first_broadcast_hash->elems, 32); FREE(first_broadcast_hash); + LDKTransaction latest_spending_tx_ref; + latest_spending_tx_ref.datalen = latest_spending_tx->arr_len; + latest_spending_tx_ref.data = MALLOC(latest_spending_tx_ref.datalen, "LDKTransaction Bytes"); + memcpy(latest_spending_tx_ref.data, latest_spending_tx->elems, latest_spending_tx_ref.datalen); FREE(latest_spending_tx); + latest_spending_tx_ref.data_is_owned = true; + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = OutputSpendStatus_pending_first_confirmation(first_broadcast_hash_ref, latest_broadcast_height, latest_spending_tx_ref); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_OutputSpendStatus_pending_threshold_confirmations"))) TS_OutputSpendStatus_pending_threshold_confirmations(int8_tArray first_broadcast_hash, int32_t latest_broadcast_height, int8_tArray latest_spending_tx, int32_t confirmation_height, int8_tArray confirmation_hash) { + LDKThirtyTwoBytes first_broadcast_hash_ref; + CHECK(first_broadcast_hash->arr_len == 32); + memcpy(first_broadcast_hash_ref.data, first_broadcast_hash->elems, 32); FREE(first_broadcast_hash); + LDKTransaction latest_spending_tx_ref; + latest_spending_tx_ref.datalen = latest_spending_tx->arr_len; + latest_spending_tx_ref.data = MALLOC(latest_spending_tx_ref.datalen, "LDKTransaction Bytes"); + memcpy(latest_spending_tx_ref.data, latest_spending_tx->elems, latest_spending_tx_ref.datalen); FREE(latest_spending_tx); + latest_spending_tx_ref.data_is_owned = true; + LDKThirtyTwoBytes confirmation_hash_ref; + CHECK(confirmation_hash->arr_len == 32); + memcpy(confirmation_hash_ref.data, confirmation_hash->elems, 32); FREE(confirmation_hash); + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = OutputSpendStatus_pending_threshold_confirmations(first_broadcast_hash_ref, latest_broadcast_height, latest_spending_tx_ref, confirmation_height, confirmation_hash_ref); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +jboolean __attribute__((export_name("TS_OutputSpendStatus_eq"))) TS_OutputSpendStatus_eq(uint64_t a, uint64_t b) { + LDKOutputSpendStatus* a_conv = (LDKOutputSpendStatus*)untag_ptr(a); + LDKOutputSpendStatus* b_conv = (LDKOutputSpendStatus*)untag_ptr(b); + jboolean ret_conv = OutputSpendStatus_eq(a_conv, b_conv); + return ret_conv; +} + +int8_tArray __attribute__((export_name("TS_OutputSpendStatus_write"))) TS_OutputSpendStatus_write(uint64_t obj) { + LDKOutputSpendStatus* obj_conv = (LDKOutputSpendStatus*)untag_ptr(obj); + LDKCVec_u8Z ret_var = OutputSpendStatus_write(obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +uint64_t __attribute__((export_name("TS_OutputSpendStatus_read"))) TS_OutputSpendStatus_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ"); + *ret_conv = OutputSpendStatus_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + +void __attribute__((export_name("TS_OutputSweeper_free"))) TS_OutputSweeper_free(uint64_t this_obj) { + LDKOutputSweeper this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + OutputSweeper_free(this_obj_conv); +} + +uint64_t __attribute__((export_name("TS_OutputSweeper_new"))) TS_OutputSweeper_new(uint64_t best_block, uint64_t broadcaster, uint64_t fee_estimator, uint64_t chain_data_source, uint64_t output_spender, uint64_t change_destination_source, uint64_t kv_store, uint64_t logger) { + LDKBestBlock best_block_conv; + best_block_conv.inner = untag_ptr(best_block); + best_block_conv.is_owned = ptr_is_owned(best_block); + CHECK_INNER_FIELD_ACCESS_OR_NULL(best_block_conv); + best_block_conv = BestBlock_clone(&best_block_conv); + void* broadcaster_ptr = untag_ptr(broadcaster); + CHECK_ACCESS(broadcaster_ptr); + LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(broadcaster_ptr); + if (broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKBroadcasterInterface_JCalls_cloned(&broadcaster_conv); + } + void* fee_estimator_ptr = untag_ptr(fee_estimator); + CHECK_ACCESS(fee_estimator_ptr); + LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(fee_estimator_ptr); + if (fee_estimator_conv.free == LDKFeeEstimator_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFeeEstimator_JCalls_cloned(&fee_estimator_conv); + } + void* chain_data_source_ptr = untag_ptr(chain_data_source); + CHECK_ACCESS(chain_data_source_ptr); + LDKCOption_FilterZ chain_data_source_conv = *(LDKCOption_FilterZ*)(chain_data_source_ptr); + // WARNING: we may need a move here but no clone is available for LDKCOption_FilterZ + if (chain_data_source_conv.tag == LDKCOption_FilterZ_Some) { + // Manually implement clone for Java trait instances + if (chain_data_source_conv.some.free == LDKFilter_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFilter_JCalls_cloned(&chain_data_source_conv.some); + } + } + void* output_spender_ptr = untag_ptr(output_spender); + CHECK_ACCESS(output_spender_ptr); + LDKOutputSpender output_spender_conv = *(LDKOutputSpender*)(output_spender_ptr); + if (output_spender_conv.free == LDKOutputSpender_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKOutputSpender_JCalls_cloned(&output_spender_conv); + } + void* change_destination_source_ptr = untag_ptr(change_destination_source); + CHECK_ACCESS(change_destination_source_ptr); + LDKChangeDestinationSource change_destination_source_conv = *(LDKChangeDestinationSource*)(change_destination_source_ptr); + if (change_destination_source_conv.free == LDKChangeDestinationSource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKChangeDestinationSource_JCalls_cloned(&change_destination_source_conv); + } + void* kv_store_ptr = untag_ptr(kv_store); + CHECK_ACCESS(kv_store_ptr); + LDKKVStore kv_store_conv = *(LDKKVStore*)(kv_store_ptr); + if (kv_store_conv.free == LDKKVStore_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKKVStore_JCalls_cloned(&kv_store_conv); + } + void* logger_ptr = untag_ptr(logger); + CHECK_ACCESS(logger_ptr); + LDKLogger logger_conv = *(LDKLogger*)(logger_ptr); + if (logger_conv.free == LDKLogger_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKLogger_JCalls_cloned(&logger_conv); + } + LDKOutputSweeper ret_var = OutputSweeper_new(best_block_conv, broadcaster_conv, fee_estimator_conv, chain_data_source_conv, output_spender_conv, change_destination_source_conv, kv_store_conv, logger_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_OutputSweeper_track_spendable_outputs"))) TS_OutputSweeper_track_spendable_outputs(uint64_t this_arg, uint64_tArray output_descriptors, uint64_t channel_id, jboolean exclude_static_outputs, uint64_t delay_until_height) { + LDKOutputSweeper this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_SpendableOutputDescriptorZ output_descriptors_constr; + output_descriptors_constr.datalen = output_descriptors->arr_len; + if (output_descriptors_constr.datalen > 0) + output_descriptors_constr.data = MALLOC(output_descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements"); + else + output_descriptors_constr.data = NULL; + uint64_t* output_descriptors_vals = output_descriptors->elems; + for (size_t b = 0; b < output_descriptors_constr.datalen; b++) { + uint64_t output_descriptors_conv_27 = output_descriptors_vals[b]; + void* output_descriptors_conv_27_ptr = untag_ptr(output_descriptors_conv_27); + CHECK_ACCESS(output_descriptors_conv_27_ptr); + LDKSpendableOutputDescriptor output_descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(output_descriptors_conv_27_ptr); + output_descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(output_descriptors_conv_27)); + output_descriptors_constr.data[b] = output_descriptors_conv_27_conv; + } + FREE(output_descriptors); + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); + void* delay_until_height_ptr = untag_ptr(delay_until_height); + CHECK_ACCESS(delay_until_height_ptr); + LDKCOption_u32Z delay_until_height_conv = *(LDKCOption_u32Z*)(delay_until_height_ptr); + delay_until_height_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(delay_until_height)); + LDKCResult_NoneNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneNoneZ), "LDKCResult_NoneNoneZ"); + *ret_conv = OutputSweeper_track_spendable_outputs(&this_arg_conv, output_descriptors_constr, channel_id_conv, exclude_static_outputs, delay_until_height_conv); + return tag_ptr(ret_conv, true); +} + +uint64_tArray __attribute__((export_name("TS_OutputSweeper_tracked_spendable_outputs"))) TS_OutputSweeper_tracked_spendable_outputs(uint64_t this_arg) { + LDKOutputSweeper this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_TrackedSpendableOutputZ ret_var = OutputSweeper_tracked_spendable_outputs(&this_arg_conv); + uint64_tArray ret_arr = NULL; + ret_arr = init_uint64_tArray(ret_var.datalen, __LINE__); + uint64_t *ret_arr_ptr = (uint64_t*)(((uint8_t*)ret_arr) + 8); + for (size_t y = 0; y < ret_var.datalen; y++) { + LDKTrackedSpendableOutput ret_conv_24_var = ret_var.data[y]; + uint64_t ret_conv_24_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_24_var); + ret_conv_24_ref = tag_ptr(ret_conv_24_var.inner, ret_conv_24_var.is_owned); + ret_arr_ptr[y] = ret_conv_24_ref; + } + + FREE(ret_var.data); + return ret_arr; +} + +uint64_t __attribute__((export_name("TS_OutputSweeper_current_best_block"))) TS_OutputSweeper_current_best_block(uint64_t this_arg) { + LDKOutputSweeper this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKBestBlock ret_var = OutputSweeper_current_best_block(&this_arg_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_OutputSweeper_as_Listen"))) TS_OutputSweeper_as_Listen(uint64_t this_arg) { + LDKOutputSweeper this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKListen* ret_ret = MALLOC(sizeof(LDKListen), "LDKListen"); + *ret_ret = OutputSweeper_as_Listen(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + +uint64_t __attribute__((export_name("TS_OutputSweeper_as_Confirm"))) TS_OutputSweeper_as_Confirm(uint64_t this_arg) { + LDKOutputSweeper this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKConfirm* ret_ret = MALLOC(sizeof(LDKConfirm), "LDKConfirm"); + *ret_ret = OutputSweeper_as_Confirm(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + +void __attribute__((export_name("TS_SpendingDelay_free"))) TS_SpendingDelay_free(uint64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKSpendingDelay this_ptr_conv = *(LDKSpendingDelay*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + SpendingDelay_free(this_ptr_conv); +} + +static inline uint64_t SpendingDelay_clone_ptr(LDKSpendingDelay *NONNULL_PTR arg) { + LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay"); + *ret_copy = SpendingDelay_clone(arg); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t __attribute__((export_name("TS_SpendingDelay_clone_ptr"))) TS_SpendingDelay_clone_ptr(uint64_t arg) { + LDKSpendingDelay* arg_conv = (LDKSpendingDelay*)untag_ptr(arg); + int64_t ret_conv = SpendingDelay_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_SpendingDelay_clone"))) TS_SpendingDelay_clone(uint64_t orig) { + LDKSpendingDelay* orig_conv = (LDKSpendingDelay*)untag_ptr(orig); + LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay"); + *ret_copy = SpendingDelay_clone(orig_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_SpendingDelay_relative"))) TS_SpendingDelay_relative(int32_t num_blocks) { + LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay"); + *ret_copy = SpendingDelay_relative(num_blocks); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_SpendingDelay_absolute"))) TS_SpendingDelay_absolute(int32_t height) { + LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay"); + *ret_copy = SpendingDelay_absolute(height); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_OutputSweeper_read"))) TS_OutputSweeper_read(int8_tArray ser, uint64_t arg_a, uint64_t arg_b, uint64_t arg_c, uint64_t arg_d, uint64_t arg_e, uint64_t arg_f, uint64_t arg_g) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + void* arg_a_ptr = untag_ptr(arg_a); + CHECK_ACCESS(arg_a_ptr); + LDKBroadcasterInterface arg_a_conv = *(LDKBroadcasterInterface*)(arg_a_ptr); + if (arg_a_conv.free == LDKBroadcasterInterface_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKBroadcasterInterface_JCalls_cloned(&arg_a_conv); + } + void* arg_b_ptr = untag_ptr(arg_b); + CHECK_ACCESS(arg_b_ptr); + LDKFeeEstimator arg_b_conv = *(LDKFeeEstimator*)(arg_b_ptr); + if (arg_b_conv.free == LDKFeeEstimator_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFeeEstimator_JCalls_cloned(&arg_b_conv); + } + void* arg_c_ptr = untag_ptr(arg_c); + CHECK_ACCESS(arg_c_ptr); + LDKCOption_FilterZ arg_c_conv = *(LDKCOption_FilterZ*)(arg_c_ptr); + // WARNING: we may need a move here but no clone is available for LDKCOption_FilterZ + if (arg_c_conv.tag == LDKCOption_FilterZ_Some) { + // Manually implement clone for Java trait instances + if (arg_c_conv.some.free == LDKFilter_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFilter_JCalls_cloned(&arg_c_conv.some); + } + } + void* arg_d_ptr = untag_ptr(arg_d); + CHECK_ACCESS(arg_d_ptr); + LDKOutputSpender arg_d_conv = *(LDKOutputSpender*)(arg_d_ptr); + if (arg_d_conv.free == LDKOutputSpender_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKOutputSpender_JCalls_cloned(&arg_d_conv); + } + void* arg_e_ptr = untag_ptr(arg_e); + CHECK_ACCESS(arg_e_ptr); + LDKChangeDestinationSource arg_e_conv = *(LDKChangeDestinationSource*)(arg_e_ptr); + if (arg_e_conv.free == LDKChangeDestinationSource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKChangeDestinationSource_JCalls_cloned(&arg_e_conv); + } + void* arg_f_ptr = untag_ptr(arg_f); + CHECK_ACCESS(arg_f_ptr); + LDKKVStore arg_f_conv = *(LDKKVStore*)(arg_f_ptr); + if (arg_f_conv.free == LDKKVStore_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKKVStore_JCalls_cloned(&arg_f_conv); + } + void* arg_g_ptr = untag_ptr(arg_g); + CHECK_ACCESS(arg_g_ptr); + LDKLogger arg_g_conv = *(LDKLogger*)(arg_g_ptr); + if (arg_g_conv.free == LDKLogger_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKLogger_JCalls_cloned(&arg_g_conv); + } + LDKCResult_OutputSweeperDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSweeperDecodeErrorZ), "LDKCResult_OutputSweeperDecodeErrorZ"); + *ret_conv = OutputSweeper_read(ser_ref, arg_a_conv, arg_b_conv, arg_c_conv, arg_d_conv, arg_e_conv, arg_f_conv, arg_g_conv); + FREE(ser); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_C2Tuple_BestBlockOutputSweeperZ_read"))) TS_C2Tuple_BestBlockOutputSweeperZ_read(int8_tArray ser, uint64_t arg_a, uint64_t arg_b, uint64_t arg_c, uint64_t arg_d, uint64_t arg_e, uint64_t arg_f, uint64_t arg_g) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + void* arg_a_ptr = untag_ptr(arg_a); + CHECK_ACCESS(arg_a_ptr); + LDKBroadcasterInterface arg_a_conv = *(LDKBroadcasterInterface*)(arg_a_ptr); + if (arg_a_conv.free == LDKBroadcasterInterface_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKBroadcasterInterface_JCalls_cloned(&arg_a_conv); + } + void* arg_b_ptr = untag_ptr(arg_b); + CHECK_ACCESS(arg_b_ptr); + LDKFeeEstimator arg_b_conv = *(LDKFeeEstimator*)(arg_b_ptr); + if (arg_b_conv.free == LDKFeeEstimator_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFeeEstimator_JCalls_cloned(&arg_b_conv); + } + void* arg_c_ptr = untag_ptr(arg_c); + CHECK_ACCESS(arg_c_ptr); + LDKCOption_FilterZ arg_c_conv = *(LDKCOption_FilterZ*)(arg_c_ptr); + // WARNING: we may need a move here but no clone is available for LDKCOption_FilterZ + if (arg_c_conv.tag == LDKCOption_FilterZ_Some) { + // Manually implement clone for Java trait instances + if (arg_c_conv.some.free == LDKFilter_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFilter_JCalls_cloned(&arg_c_conv.some); + } + } + void* arg_d_ptr = untag_ptr(arg_d); + CHECK_ACCESS(arg_d_ptr); + LDKOutputSpender arg_d_conv = *(LDKOutputSpender*)(arg_d_ptr); + if (arg_d_conv.free == LDKOutputSpender_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKOutputSpender_JCalls_cloned(&arg_d_conv); + } + void* arg_e_ptr = untag_ptr(arg_e); + CHECK_ACCESS(arg_e_ptr); + LDKChangeDestinationSource arg_e_conv = *(LDKChangeDestinationSource*)(arg_e_ptr); + if (arg_e_conv.free == LDKChangeDestinationSource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKChangeDestinationSource_JCalls_cloned(&arg_e_conv); + } + void* arg_f_ptr = untag_ptr(arg_f); + CHECK_ACCESS(arg_f_ptr); + LDKKVStore arg_f_conv = *(LDKKVStore*)(arg_f_ptr); + if (arg_f_conv.free == LDKKVStore_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKKVStore_JCalls_cloned(&arg_f_conv); + } + void* arg_g_ptr = untag_ptr(arg_g); + CHECK_ACCESS(arg_g_ptr); + LDKLogger arg_g_conv = *(LDKLogger*)(arg_g_ptr); + if (arg_g_conv.free == LDKLogger_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKLogger_JCalls_cloned(&arg_g_conv); + } + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ), "LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ"); + *ret_conv = C2Tuple_BestBlockOutputSweeperZ_read(ser_ref, arg_a_conv, arg_b_conv, arg_c_conv, arg_d_conv, arg_e_conv, arg_f_conv, arg_g_conv); + FREE(ser); + return tag_ptr(ret_conv, true); +} + +void __attribute__((export_name("TS_FutureCallback_free"))) TS_FutureCallback_free(uint64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKFutureCallback this_ptr_conv = *(LDKFutureCallback*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + FutureCallback_free(this_ptr_conv); +} + +void __attribute__((export_name("TS_Future_free"))) TS_Future_free(uint64_t this_obj) { + LDKFuture this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + Future_free(this_obj_conv); +} + void __attribute__((export_name("TS_Future_register_callback_fn"))) TS_Future_register_callback_fn(uint64_t this_arg, uint64_t callback) { LDKFuture this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -32700,9 +36426,10 @@ uint64_t __attribute__((export_name("TS_Record_get_channel_id"))) TS_Record_get this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKCOption_ThirtyTwoBytesZ *ret_copy = MALLOC(sizeof(LDKCOption_ThirtyTwoBytesZ), "LDKCOption_ThirtyTwoBytesZ"); - *ret_copy = Record_get_channel_id(&this_ptr_conv); - uint64_t ret_ref = tag_ptr(ret_copy, true); + LDKChannelId ret_var = Record_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } @@ -32712,10 +36439,11 @@ void __attribute__((export_name("TS_Record_set_channel_id"))) TS_Record_set_cha this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - void* val_ptr = untag_ptr(val); - CHECK_ACCESS(val_ptr); - LDKCOption_ThirtyTwoBytesZ val_conv = *(LDKCOption_ThirtyTwoBytesZ*)(val_ptr); - val_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(val)); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); Record_set_channel_id(&this_ptr_conv, val_conv); } @@ -32809,10 +36537,11 @@ uint64_t __attribute__((export_name("TS_Record_new"))) TS_Record_new(uint32_t l LDKPublicKey peer_id_arg_ref; CHECK(peer_id_arg->arr_len == 33); memcpy(peer_id_arg_ref.compressed_form, peer_id_arg->elems, 33); FREE(peer_id_arg); - void* channel_id_arg_ptr = untag_ptr(channel_id_arg); - CHECK_ACCESS(channel_id_arg_ptr); - LDKCOption_ThirtyTwoBytesZ channel_id_arg_conv = *(LDKCOption_ThirtyTwoBytesZ*)(channel_id_arg_ptr); - channel_id_arg_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(channel_id_arg)); + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKStr args_arg_conv = str_ref_to_owned_c(args_arg); LDKStr module_path_arg_conv = str_ref_to_owned_c(module_path_arg); LDKStr file_arg_conv = str_ref_to_owned_c(file_arg); @@ -34071,6 +37800,59 @@ void __attribute__((export_name("TS_BestBlock_free"))) TS_BestBlock_free(uint64 BestBlock_free(this_obj_conv); } +int8_tArray __attribute__((export_name("TS_BestBlock_get_block_hash"))) TS_BestBlock_get_block_hash(uint64_t this_ptr) { + LDKBestBlock this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(32, __LINE__); + memcpy(ret_arr->elems, *BestBlock_get_block_hash(&this_ptr_conv), 32); + return ret_arr; +} + +void __attribute__((export_name("TS_BestBlock_set_block_hash"))) TS_BestBlock_set_block_hash(uint64_t this_ptr, int8_tArray val) { + LDKBestBlock this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKThirtyTwoBytes val_ref; + CHECK(val->arr_len == 32); + memcpy(val_ref.data, val->elems, 32); FREE(val); + BestBlock_set_block_hash(&this_ptr_conv, val_ref); +} + +int32_t __attribute__((export_name("TS_BestBlock_get_height"))) TS_BestBlock_get_height(uint64_t this_ptr) { + LDKBestBlock this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int32_t ret_conv = BestBlock_get_height(&this_ptr_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_BestBlock_set_height"))) TS_BestBlock_set_height(uint64_t this_ptr, int32_t val) { + LDKBestBlock this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + BestBlock_set_height(&this_ptr_conv, val); +} + +uint64_t __attribute__((export_name("TS_BestBlock_new"))) TS_BestBlock_new(int8_tArray block_hash_arg, int32_t height_arg) { + LDKThirtyTwoBytes block_hash_arg_ref; + CHECK(block_hash_arg->arr_len == 32); + memcpy(block_hash_arg_ref.data, block_hash_arg->elems, 32); FREE(block_hash_arg); + LDKBestBlock ret_var = BestBlock_new(block_hash_arg_ref, height_arg); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + static inline uint64_t BestBlock_clone_ptr(LDKBestBlock *NONNULL_PTR arg) { LDKBestBlock ret_var = BestBlock_clone(arg); uint64_t ret_ref = 0; @@ -34101,6 +37883,16 @@ uint64_t __attribute__((export_name("TS_BestBlock_clone"))) TS_BestBlock_clone( return ret_ref; } +int64_t __attribute__((export_name("TS_BestBlock_hash"))) TS_BestBlock_hash(uint64_t o) { + LDKBestBlock o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = BestBlock_hash(&o_conv); + return ret_conv; +} + jboolean __attribute__((export_name("TS_BestBlock_eq"))) TS_BestBlock_eq(uint64_t a, uint64_t b) { LDKBestBlock a_conv; a_conv.inner = untag_ptr(a); @@ -34125,36 +37917,27 @@ uint64_t __attribute__((export_name("TS_BestBlock_from_network"))) TS_BestBlock return ret_ref; } -uint64_t __attribute__((export_name("TS_BestBlock_new"))) TS_BestBlock_new(int8_tArray block_hash, int32_t height) { - LDKThirtyTwoBytes block_hash_ref; - CHECK(block_hash->arr_len == 32); - memcpy(block_hash_ref.data, block_hash->elems, 32); FREE(block_hash); - LDKBestBlock ret_var = BestBlock_new(block_hash_ref, height); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -int8_tArray __attribute__((export_name("TS_BestBlock_block_hash"))) TS_BestBlock_block_hash(uint64_t this_arg) { - LDKBestBlock this_arg_conv; - this_arg_conv.inner = untag_ptr(this_arg); - this_arg_conv.is_owned = ptr_is_owned(this_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, BestBlock_block_hash(&this_arg_conv).data, 32); +int8_tArray __attribute__((export_name("TS_BestBlock_write"))) TS_BestBlock_write(uint64_t obj) { + LDKBestBlock obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = BestBlock_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); return ret_arr; } -int32_t __attribute__((export_name("TS_BestBlock_height"))) TS_BestBlock_height(uint64_t this_arg) { - LDKBestBlock this_arg_conv; - this_arg_conv.inner = untag_ptr(this_arg); - this_arg_conv.is_owned = ptr_is_owned(this_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv.is_owned = false; - int32_t ret_conv = BestBlock_height(&this_arg_conv); - return ret_conv; +uint64_t __attribute__((export_name("TS_BestBlock_read"))) TS_BestBlock_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ"); + *ret_conv = BestBlock_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); } void __attribute__((export_name("TS_Listen_free"))) TS_Listen_free(uint64_t this_ptr) { @@ -34428,6 +38211,11 @@ uint32_t __attribute__((export_name("TS_ConfirmationTarget_channel_close_minimu return ret_conv; } +uint32_t __attribute__((export_name("TS_ConfirmationTarget_output_spending_fee"))) TS_ConfirmationTarget_output_spending_fee() { + uint32_t ret_conv = LDKConfirmationTarget_to_js(ConfirmationTarget_output_spending_fee()); + return ret_conv; +} + int64_t __attribute__((export_name("TS_ConfirmationTarget_hash"))) TS_ConfirmationTarget_hash(uint64_t o) { LDKConfirmationTarget* o_conv = (LDKConfirmationTarget*)untag_ptr(o); int64_t ret_conv = ConfirmationTarget_hash(o_conv); @@ -34645,16 +38433,14 @@ uint64_tArray __attribute__((export_name("TS_ChainMonitor_list_monitors"))) TS_ this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKCVec_OutPointZ ret_var = ChainMonitor_list_monitors(&this_arg_conv); + LDKCVec_C2Tuple_OutPointChannelIdZZ ret_var = ChainMonitor_list_monitors(&this_arg_conv); uint64_tArray ret_arr = NULL; ret_arr = init_uint64_tArray(ret_var.datalen, __LINE__); uint64_t *ret_arr_ptr = (uint64_t*)(((uint8_t*)ret_arr) + 8); - for (size_t k = 0; k < ret_var.datalen; k++) { - LDKOutPoint ret_conv_10_var = ret_var.data[k]; - uint64_t ret_conv_10_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_10_var); - ret_conv_10_ref = tag_ptr(ret_conv_10_var.inner, ret_conv_10_var.is_owned); - ret_arr_ptr[k] = ret_conv_10_ref; + for (size_t d = 0; d < ret_var.datalen; d++) { + LDKC2Tuple_OutPointChannelIdZ* ret_conv_29_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ"); + *ret_conv_29_conv = ret_var.data[d]; + ret_arr_ptr[d] = tag_ptr(ret_conv_29_conv, true); } FREE(ret_var.data); @@ -34724,6 +38510,29 @@ void __attribute__((export_name("TS_ChainMonitor_rebroadcast_pending_claims"))) ChainMonitor_rebroadcast_pending_claims(&this_arg_conv); } +void __attribute__((export_name("TS_ChainMonitor_signer_unblocked"))) TS_ChainMonitor_signer_unblocked(uint64_t this_arg, uint64_t monitor_opt) { + LDKChainMonitor this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKOutPoint monitor_opt_conv; + monitor_opt_conv.inner = untag_ptr(monitor_opt); + monitor_opt_conv.is_owned = ptr_is_owned(monitor_opt); + CHECK_INNER_FIELD_ACCESS_OR_NULL(monitor_opt_conv); + monitor_opt_conv = OutPoint_clone(&monitor_opt_conv); + ChainMonitor_signer_unblocked(&this_arg_conv, monitor_opt_conv); +} + +void __attribute__((export_name("TS_ChainMonitor_archive_fully_resolved_channel_monitors"))) TS_ChainMonitor_archive_fully_resolved_channel_monitors(uint64_t this_arg) { + LDKChainMonitor this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + ChainMonitor_archive_fully_resolved_channel_monitors(&this_arg_conv); +} + uint64_t __attribute__((export_name("TS_ChainMonitor_as_Listen"))) TS_ChainMonitor_as_Listen(uint64_t this_arg) { LDKChainMonitor this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -34795,6 +38604,33 @@ void __attribute__((export_name("TS_ChannelMonitorUpdate_set_update_id"))) TS_C ChannelMonitorUpdate_set_update_id(&this_ptr_conv, val); } +uint64_t __attribute__((export_name("TS_ChannelMonitorUpdate_get_channel_id"))) TS_ChannelMonitorUpdate_get_channel_id(uint64_t this_ptr) { + LDKChannelMonitorUpdate this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelId ret_var = ChannelMonitorUpdate_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void __attribute__((export_name("TS_ChannelMonitorUpdate_set_channel_id"))) TS_ChannelMonitorUpdate_set_channel_id(uint64_t this_ptr, uint64_t val) { + LDKChannelMonitorUpdate this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ChannelMonitorUpdate_set_channel_id(&this_ptr_conv, val_conv); +} + static inline uint64_t ChannelMonitorUpdate_clone_ptr(LDKChannelMonitorUpdate *NONNULL_PTR arg) { LDKChannelMonitorUpdate ret_var = ChannelMonitorUpdate_clone(arg); uint64_t ret_ref = 0; @@ -34904,6 +38740,27 @@ uint64_t __attribute__((export_name("TS_MonitorEvent_htlcevent"))) TS_MonitorEv return ret_ref; } +uint64_t __attribute__((export_name("TS_MonitorEvent_holder_force_closed_with_info"))) TS_MonitorEvent_holder_force_closed_with_info(uint64_t reason, uint64_t outpoint, uint64_t channel_id) { + void* reason_ptr = untag_ptr(reason); + CHECK_ACCESS(reason_ptr); + LDKClosureReason reason_conv = *(LDKClosureReason*)(reason_ptr); + reason_conv = ClosureReason_clone((LDKClosureReason*)untag_ptr(reason)); + LDKOutPoint outpoint_conv; + outpoint_conv.inner = untag_ptr(outpoint); + outpoint_conv.is_owned = ptr_is_owned(outpoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_conv); + outpoint_conv = OutPoint_clone(&outpoint_conv); + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); + LDKMonitorEvent *ret_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent"); + *ret_copy = MonitorEvent_holder_force_closed_with_info(reason_conv, outpoint_conv, channel_id_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + uint64_t __attribute__((export_name("TS_MonitorEvent_holder_force_closed"))) TS_MonitorEvent_holder_force_closed(uint64_t a) { LDKOutPoint a_conv; a_conv.inner = untag_ptr(a); @@ -34916,14 +38773,19 @@ uint64_t __attribute__((export_name("TS_MonitorEvent_holder_force_closed"))) TS return ret_ref; } -uint64_t __attribute__((export_name("TS_MonitorEvent_completed"))) TS_MonitorEvent_completed(uint64_t funding_txo, int64_t monitor_update_id) { +uint64_t __attribute__((export_name("TS_MonitorEvent_completed"))) TS_MonitorEvent_completed(uint64_t funding_txo, uint64_t channel_id, int64_t monitor_update_id) { LDKOutPoint funding_txo_conv; funding_txo_conv.inner = untag_ptr(funding_txo); funding_txo_conv.is_owned = ptr_is_owned(funding_txo); CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_conv); funding_txo_conv = OutPoint_clone(&funding_txo_conv); + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKMonitorEvent *ret_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent"); - *ret_copy = MonitorEvent_completed(funding_txo_conv, monitor_update_id); + *ret_copy = MonitorEvent_completed(funding_txo_conv, channel_id_conv, monitor_update_id); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -35223,6 +39085,19 @@ uint64_t __attribute__((export_name("TS_ChannelMonitor_get_funding_txo"))) TS_C return tag_ptr(ret_conv, true); } +uint64_t __attribute__((export_name("TS_ChannelMonitor_channel_id"))) TS_ChannelMonitor_channel_id(uint64_t this_arg) { + LDKChannelMonitor this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKChannelId ret_var = ChannelMonitor_channel_id(&this_arg_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + uint64_tArray __attribute__((export_name("TS_ChannelMonitor_get_outputs_to_watch"))) TS_ChannelMonitor_get_outputs_to_watch(uint64_t this_arg) { LDKChannelMonitor this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -35358,29 +39233,22 @@ int8_tArray __attribute__((export_name("TS_ChannelMonitor_get_counterparty_node return ret_arr; } -ptrArray __attribute__((export_name("TS_ChannelMonitor_get_latest_holder_commitment_txn"))) TS_ChannelMonitor_get_latest_holder_commitment_txn(uint64_t this_arg, uint64_t logger) { +void __attribute__((export_name("TS_ChannelMonitor_broadcast_latest_holder_commitment_txn"))) TS_ChannelMonitor_broadcast_latest_holder_commitment_txn(uint64_t this_arg, uint64_t broadcaster, uint64_t fee_estimator, uint64_t logger) { LDKChannelMonitor this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; + void* broadcaster_ptr = untag_ptr(broadcaster); + if (ptr_is_owned(broadcaster)) { CHECK_ACCESS(broadcaster_ptr); } + LDKBroadcasterInterface* broadcaster_conv = (LDKBroadcasterInterface*)broadcaster_ptr; + void* fee_estimator_ptr = untag_ptr(fee_estimator); + if (ptr_is_owned(fee_estimator)) { CHECK_ACCESS(fee_estimator_ptr); } + LDKFeeEstimator* fee_estimator_conv = (LDKFeeEstimator*)fee_estimator_ptr; void* logger_ptr = untag_ptr(logger); if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); } LDKLogger* logger_conv = (LDKLogger*)logger_ptr; - LDKCVec_TransactionZ ret_var = ChannelMonitor_get_latest_holder_commitment_txn(&this_arg_conv, logger_conv); - ptrArray ret_arr = NULL; - ret_arr = init_ptrArray(ret_var.datalen, __LINE__); - int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 8); - for (size_t m = 0; m < ret_var.datalen; m++) { - LDKTransaction ret_conv_12_var = ret_var.data[m]; - int8_tArray ret_conv_12_arr = init_int8_tArray(ret_conv_12_var.datalen, __LINE__); - memcpy(ret_conv_12_arr->elems, ret_conv_12_var.data, ret_conv_12_var.datalen); - Transaction_free(ret_conv_12_var); - ret_arr_ptr[m] = ret_conv_12_arr; - } - - FREE(ret_var.data); - return ret_arr; + ChannelMonitor_broadcast_latest_holder_commitment_txn(&this_arg_conv, broadcaster_conv, fee_estimator_conv, logger_conv); } uint64_tArray __attribute__((export_name("TS_ChannelMonitor_block_connected"))) TS_ChannelMonitor_block_connected(uint64_t this_arg, int8_tArray header, uint64_tArray txdata, int32_t height, uint64_t broadcaster, uint64_t fee_estimator, uint64_t logger) { @@ -35657,6 +39525,32 @@ void __attribute__((export_name("TS_ChannelMonitor_rebroadcast_pending_claims") ChannelMonitor_rebroadcast_pending_claims(&this_arg_conv, broadcaster_conv, fee_estimator_conv, logger_conv); } +void __attribute__((export_name("TS_ChannelMonitor_signer_unblocked"))) TS_ChannelMonitor_signer_unblocked(uint64_t this_arg, uint64_t broadcaster, uint64_t fee_estimator, uint64_t logger) { + LDKChannelMonitor this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + void* broadcaster_ptr = untag_ptr(broadcaster); + CHECK_ACCESS(broadcaster_ptr); + LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(broadcaster_ptr); + if (broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKBroadcasterInterface_JCalls_cloned(&broadcaster_conv); + } + void* fee_estimator_ptr = untag_ptr(fee_estimator); + CHECK_ACCESS(fee_estimator_ptr); + LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(fee_estimator_ptr); + if (fee_estimator_conv.free == LDKFeeEstimator_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFeeEstimator_JCalls_cloned(&fee_estimator_conv); + } + void* logger_ptr = untag_ptr(logger); + if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); } + LDKLogger* logger_conv = (LDKLogger*)logger_ptr; + ChannelMonitor_signer_unblocked(&this_arg_conv, broadcaster_conv, fee_estimator_conv, logger_conv); +} + uint64_tArray __attribute__((export_name("TS_ChannelMonitor_get_spendable_outputs"))) TS_ChannelMonitor_get_spendable_outputs(uint64_t this_arg, int8_tArray tx, int32_t confirmation_height) { LDKChannelMonitor this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -35683,6 +39577,19 @@ uint64_tArray __attribute__((export_name("TS_ChannelMonitor_get_spendable_outpu return ret_arr; } +jboolean __attribute__((export_name("TS_ChannelMonitor_is_fully_resolved"))) TS_ChannelMonitor_is_fully_resolved(uint64_t this_arg, uint64_t logger) { + LDKChannelMonitor this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + void* logger_ptr = untag_ptr(logger); + if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); } + LDKLogger* logger_conv = (LDKLogger*)logger_ptr; + jboolean ret_conv = ChannelMonitor_is_fully_resolved(&this_arg_conv, logger_conv); + return ret_conv; +} + uint64_tArray __attribute__((export_name("TS_ChannelMonitor_get_claimable_balances"))) TS_ChannelMonitor_get_claimable_balances(uint64_t this_arg) { LDKChannelMonitor this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -35836,17 +39743,6 @@ int64_t __attribute__((export_name("TS_OutPoint_hash"))) TS_OutPoint_hash(uint6 return ret_conv; } -int8_tArray __attribute__((export_name("TS_OutPoint_to_channel_id"))) TS_OutPoint_to_channel_id(uint64_t this_arg) { - LDKOutPoint this_arg_conv; - this_arg_conv.inner = untag_ptr(this_arg); - this_arg_conv.is_owned = ptr_is_owned(this_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, OutPoint_to_channel_id(&this_arg_conv).data, 32); - return ret_arr; -} - int8_tArray __attribute__((export_name("TS_OutPoint_write"))) TS_OutPoint_write(uint64_t obj) { LDKOutPoint obj_conv; obj_conv.inner = untag_ptr(obj); @@ -35958,6 +39854,61 @@ uint64_t __attribute__((export_name("TS_InboundHTLCErr_new"))) TS_InboundHTLCEr return ret_ref; } +static inline uint64_t InboundHTLCErr_clone_ptr(LDKInboundHTLCErr *NONNULL_PTR arg) { + LDKInboundHTLCErr ret_var = InboundHTLCErr_clone(arg); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t __attribute__((export_name("TS_InboundHTLCErr_clone_ptr"))) TS_InboundHTLCErr_clone_ptr(uint64_t arg) { + LDKInboundHTLCErr arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = InboundHTLCErr_clone_ptr(&arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_InboundHTLCErr_clone"))) TS_InboundHTLCErr_clone(uint64_t orig) { + LDKInboundHTLCErr orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKInboundHTLCErr ret_var = InboundHTLCErr_clone(&orig_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t __attribute__((export_name("TS_InboundHTLCErr_hash"))) TS_InboundHTLCErr_hash(uint64_t o) { + LDKInboundHTLCErr o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = InboundHTLCErr_hash(&o_conv); + return ret_conv; +} + +jboolean __attribute__((export_name("TS_InboundHTLCErr_eq"))) TS_InboundHTLCErr_eq(uint64_t a, uint64_t b) { + LDKInboundHTLCErr a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKInboundHTLCErr b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = InboundHTLCErr_eq(&a_conv, &b_conv); + return ret_conv; +} + uint64_t __attribute__((export_name("TS_peel_payment_onion"))) TS_peel_payment_onion(uint64_t msg, uint64_t node_signer, uint64_t logger, int32_t cur_height, jboolean accept_mpp_keysend, jboolean allow_skimmed_fees) { LDKUpdateAddHTLC msg_conv; msg_conv.inner = untag_ptr(msg); @@ -36021,7 +39972,7 @@ uint64_t __attribute__((export_name("TS_PendingHTLCRouting_forward"))) TS_Pendi return ret_ref; } -uint64_t __attribute__((export_name("TS_PendingHTLCRouting_receive"))) TS_PendingHTLCRouting_receive(uint64_t payment_data, uint64_t payment_metadata, int32_t incoming_cltv_expiry, int8_tArray phantom_shared_secret, uint64_tArray custom_tlvs, jboolean requires_blinded_error) { +uint64_t __attribute__((export_name("TS_PendingHTLCRouting_receive"))) TS_PendingHTLCRouting_receive(uint64_t payment_data, uint64_t payment_metadata, uint64_t payment_context, int32_t incoming_cltv_expiry, int8_tArray phantom_shared_secret, uint64_tArray custom_tlvs, jboolean requires_blinded_error) { LDKFinalOnionHopData payment_data_conv; payment_data_conv.inner = untag_ptr(payment_data); payment_data_conv.is_owned = ptr_is_owned(payment_data); @@ -36031,6 +39982,10 @@ uint64_t __attribute__((export_name("TS_PendingHTLCRouting_receive"))) TS_Pendi CHECK_ACCESS(payment_metadata_ptr); LDKCOption_CVec_u8ZZ payment_metadata_conv = *(LDKCOption_CVec_u8ZZ*)(payment_metadata_ptr); payment_metadata_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(payment_metadata)); + void* payment_context_ptr = untag_ptr(payment_context); + CHECK_ACCESS(payment_context_ptr); + LDKCOption_PaymentContextZ payment_context_conv = *(LDKCOption_PaymentContextZ*)(payment_context_ptr); + payment_context_conv = COption_PaymentContextZ_clone((LDKCOption_PaymentContextZ*)untag_ptr(payment_context)); LDKThirtyTwoBytes phantom_shared_secret_ref; CHECK(phantom_shared_secret->arr_len == 32); memcpy(phantom_shared_secret_ref.data, phantom_shared_secret->elems, 32); FREE(phantom_shared_secret); @@ -36051,12 +40006,12 @@ uint64_t __attribute__((export_name("TS_PendingHTLCRouting_receive"))) TS_Pendi } FREE(custom_tlvs); LDKPendingHTLCRouting *ret_copy = MALLOC(sizeof(LDKPendingHTLCRouting), "LDKPendingHTLCRouting"); - *ret_copy = PendingHTLCRouting_receive(payment_data_conv, payment_metadata_conv, incoming_cltv_expiry, phantom_shared_secret_ref, custom_tlvs_constr, requires_blinded_error); + *ret_copy = PendingHTLCRouting_receive(payment_data_conv, payment_metadata_conv, payment_context_conv, incoming_cltv_expiry, phantom_shared_secret_ref, custom_tlvs_constr, requires_blinded_error); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -uint64_t __attribute__((export_name("TS_PendingHTLCRouting_receive_keysend"))) TS_PendingHTLCRouting_receive_keysend(uint64_t payment_data, int8_tArray payment_preimage, uint64_t payment_metadata, int32_t incoming_cltv_expiry, uint64_tArray custom_tlvs) { +uint64_t __attribute__((export_name("TS_PendingHTLCRouting_receive_keysend"))) TS_PendingHTLCRouting_receive_keysend(uint64_t payment_data, int8_tArray payment_preimage, uint64_t payment_metadata, int32_t incoming_cltv_expiry, uint64_tArray custom_tlvs, jboolean requires_blinded_error) { LDKFinalOnionHopData payment_data_conv; payment_data_conv.inner = untag_ptr(payment_data); payment_data_conv.is_owned = ptr_is_owned(payment_data); @@ -36086,7 +40041,7 @@ uint64_t __attribute__((export_name("TS_PendingHTLCRouting_receive_keysend"))) } FREE(custom_tlvs); LDKPendingHTLCRouting *ret_copy = MALLOC(sizeof(LDKPendingHTLCRouting), "LDKPendingHTLCRouting"); - *ret_copy = PendingHTLCRouting_receive_keysend(payment_data_conv, payment_preimage_ref, payment_metadata_conv, incoming_cltv_expiry, custom_tlvs_constr); + *ret_copy = PendingHTLCRouting_receive_keysend(payment_data_conv, payment_preimage_ref, payment_metadata_conv, incoming_cltv_expiry, custom_tlvs_constr, requires_blinded_error); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -36953,27 +40908,31 @@ void __attribute__((export_name("TS_ChannelDetails_free"))) TS_ChannelDetails_f ChannelDetails_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_ChannelDetails_get_channel_id"))) TS_ChannelDetails_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_ChannelDetails_get_channel_id"))) TS_ChannelDetails_get_channel_id(uint64_t this_ptr) { LDKChannelDetails this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *ChannelDetails_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = ChannelDetails_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_ChannelDetails_set_channel_id"))) TS_ChannelDetails_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_ChannelDetails_set_channel_id"))) TS_ChannelDetails_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKChannelDetails this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - ChannelDetails_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ChannelDetails_set_channel_id(&this_ptr_conv, val_conv); } uint64_t __attribute__((export_name("TS_ChannelDetails_get_counterparty"))) TS_ChannelDetails_get_counterparty(uint64_t this_ptr) { @@ -37572,83 +41531,6 @@ void __attribute__((export_name("TS_ChannelDetails_set_config"))) TS_ChannelDet ChannelDetails_set_config(&this_ptr_conv, val_conv); } -uint64_t __attribute__((export_name("TS_ChannelDetails_new"))) TS_ChannelDetails_new(int8_tArray channel_id_arg, uint64_t counterparty_arg, uint64_t funding_txo_arg, uint64_t channel_type_arg, uint64_t short_channel_id_arg, uint64_t outbound_scid_alias_arg, uint64_t inbound_scid_alias_arg, int64_t channel_value_satoshis_arg, uint64_t unspendable_punishment_reserve_arg, int8_tArray user_channel_id_arg, uint64_t feerate_sat_per_1000_weight_arg, int64_t balance_msat_arg, int64_t outbound_capacity_msat_arg, int64_t next_outbound_htlc_limit_msat_arg, int64_t next_outbound_htlc_minimum_msat_arg, int64_t inbound_capacity_msat_arg, uint64_t confirmations_required_arg, uint64_t confirmations_arg, uint64_t force_close_spend_delay_arg, jboolean is_outbound_arg, jboolean is_channel_ready_arg, uint64_t channel_shutdown_state_arg, jboolean is_usable_arg, jboolean is_public_arg, uint64_t inbound_htlc_minimum_msat_arg, uint64_t inbound_htlc_maximum_msat_arg, uint64_t config_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); - LDKChannelCounterparty counterparty_arg_conv; - counterparty_arg_conv.inner = untag_ptr(counterparty_arg); - counterparty_arg_conv.is_owned = ptr_is_owned(counterparty_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(counterparty_arg_conv); - counterparty_arg_conv = ChannelCounterparty_clone(&counterparty_arg_conv); - LDKOutPoint funding_txo_arg_conv; - funding_txo_arg_conv.inner = untag_ptr(funding_txo_arg); - funding_txo_arg_conv.is_owned = ptr_is_owned(funding_txo_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_arg_conv); - funding_txo_arg_conv = OutPoint_clone(&funding_txo_arg_conv); - LDKChannelTypeFeatures channel_type_arg_conv; - channel_type_arg_conv.inner = untag_ptr(channel_type_arg); - channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv); - channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv); - void* short_channel_id_arg_ptr = untag_ptr(short_channel_id_arg); - CHECK_ACCESS(short_channel_id_arg_ptr); - LDKCOption_u64Z short_channel_id_arg_conv = *(LDKCOption_u64Z*)(short_channel_id_arg_ptr); - short_channel_id_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(short_channel_id_arg)); - void* outbound_scid_alias_arg_ptr = untag_ptr(outbound_scid_alias_arg); - CHECK_ACCESS(outbound_scid_alias_arg_ptr); - LDKCOption_u64Z outbound_scid_alias_arg_conv = *(LDKCOption_u64Z*)(outbound_scid_alias_arg_ptr); - outbound_scid_alias_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(outbound_scid_alias_arg)); - void* inbound_scid_alias_arg_ptr = untag_ptr(inbound_scid_alias_arg); - CHECK_ACCESS(inbound_scid_alias_arg_ptr); - LDKCOption_u64Z inbound_scid_alias_arg_conv = *(LDKCOption_u64Z*)(inbound_scid_alias_arg_ptr); - inbound_scid_alias_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(inbound_scid_alias_arg)); - void* unspendable_punishment_reserve_arg_ptr = untag_ptr(unspendable_punishment_reserve_arg); - CHECK_ACCESS(unspendable_punishment_reserve_arg_ptr); - LDKCOption_u64Z unspendable_punishment_reserve_arg_conv = *(LDKCOption_u64Z*)(unspendable_punishment_reserve_arg_ptr); - LDKU128 user_channel_id_arg_ref; - CHECK(user_channel_id_arg->arr_len == 16); - memcpy(user_channel_id_arg_ref.le_bytes, user_channel_id_arg->elems, 16); FREE(user_channel_id_arg); - void* feerate_sat_per_1000_weight_arg_ptr = untag_ptr(feerate_sat_per_1000_weight_arg); - CHECK_ACCESS(feerate_sat_per_1000_weight_arg_ptr); - LDKCOption_u32Z feerate_sat_per_1000_weight_arg_conv = *(LDKCOption_u32Z*)(feerate_sat_per_1000_weight_arg_ptr); - feerate_sat_per_1000_weight_arg_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(feerate_sat_per_1000_weight_arg)); - void* confirmations_required_arg_ptr = untag_ptr(confirmations_required_arg); - CHECK_ACCESS(confirmations_required_arg_ptr); - LDKCOption_u32Z confirmations_required_arg_conv = *(LDKCOption_u32Z*)(confirmations_required_arg_ptr); - confirmations_required_arg_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(confirmations_required_arg)); - void* confirmations_arg_ptr = untag_ptr(confirmations_arg); - CHECK_ACCESS(confirmations_arg_ptr); - LDKCOption_u32Z confirmations_arg_conv = *(LDKCOption_u32Z*)(confirmations_arg_ptr); - confirmations_arg_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(confirmations_arg)); - void* force_close_spend_delay_arg_ptr = untag_ptr(force_close_spend_delay_arg); - CHECK_ACCESS(force_close_spend_delay_arg_ptr); - LDKCOption_u16Z force_close_spend_delay_arg_conv = *(LDKCOption_u16Z*)(force_close_spend_delay_arg_ptr); - force_close_spend_delay_arg_conv = COption_u16Z_clone((LDKCOption_u16Z*)untag_ptr(force_close_spend_delay_arg)); - void* channel_shutdown_state_arg_ptr = untag_ptr(channel_shutdown_state_arg); - CHECK_ACCESS(channel_shutdown_state_arg_ptr); - LDKCOption_ChannelShutdownStateZ channel_shutdown_state_arg_conv = *(LDKCOption_ChannelShutdownStateZ*)(channel_shutdown_state_arg_ptr); - channel_shutdown_state_arg_conv = COption_ChannelShutdownStateZ_clone((LDKCOption_ChannelShutdownStateZ*)untag_ptr(channel_shutdown_state_arg)); - void* inbound_htlc_minimum_msat_arg_ptr = untag_ptr(inbound_htlc_minimum_msat_arg); - CHECK_ACCESS(inbound_htlc_minimum_msat_arg_ptr); - LDKCOption_u64Z inbound_htlc_minimum_msat_arg_conv = *(LDKCOption_u64Z*)(inbound_htlc_minimum_msat_arg_ptr); - inbound_htlc_minimum_msat_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(inbound_htlc_minimum_msat_arg)); - void* inbound_htlc_maximum_msat_arg_ptr = untag_ptr(inbound_htlc_maximum_msat_arg); - CHECK_ACCESS(inbound_htlc_maximum_msat_arg_ptr); - LDKCOption_u64Z inbound_htlc_maximum_msat_arg_conv = *(LDKCOption_u64Z*)(inbound_htlc_maximum_msat_arg_ptr); - inbound_htlc_maximum_msat_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(inbound_htlc_maximum_msat_arg)); - LDKChannelConfig config_arg_conv; - config_arg_conv.inner = untag_ptr(config_arg); - config_arg_conv.is_owned = ptr_is_owned(config_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(config_arg_conv); - config_arg_conv = ChannelConfig_clone(&config_arg_conv); - LDKChannelDetails ret_var = ChannelDetails_new(channel_id_arg_ref, counterparty_arg_conv, funding_txo_arg_conv, channel_type_arg_conv, short_channel_id_arg_conv, outbound_scid_alias_arg_conv, inbound_scid_alias_arg_conv, channel_value_satoshis_arg, unspendable_punishment_reserve_arg_conv, user_channel_id_arg_ref, feerate_sat_per_1000_weight_arg_conv, balance_msat_arg, outbound_capacity_msat_arg, next_outbound_htlc_limit_msat_arg, next_outbound_htlc_minimum_msat_arg, inbound_capacity_msat_arg, confirmations_required_arg_conv, confirmations_arg_conv, force_close_spend_delay_arg_conv, is_outbound_arg, is_channel_ready_arg, channel_shutdown_state_arg_conv, is_usable_arg, is_public_arg, inbound_htlc_minimum_msat_arg_conv, inbound_htlc_maximum_msat_arg_conv, config_arg_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - static inline uint64_t ChannelDetails_clone_ptr(LDKChannelDetails *NONNULL_PTR arg) { LDKChannelDetails ret_var = ChannelDetails_clone(arg); uint64_t ret_ref = 0; @@ -38075,16 +41957,17 @@ uint64_t __attribute__((export_name("TS_ChannelManager_create_channel"))) TS_Ch LDKU128 user_channel_id_ref; CHECK(user_channel_id->arr_len == 16); memcpy(user_channel_id_ref.le_bytes, user_channel_id->elems, 16); FREE(user_channel_id); - void* temporary_channel_id_ptr = untag_ptr(temporary_channel_id); - CHECK_ACCESS(temporary_channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ temporary_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(temporary_channel_id_ptr); - temporary_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(temporary_channel_id)); + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv = ChannelId_clone(&temporary_channel_id_conv); LDKUserConfig override_config_conv; override_config_conv.inner = untag_ptr(override_config); override_config_conv.is_owned = ptr_is_owned(override_config); CHECK_INNER_FIELD_ACCESS_OR_NULL(override_config_conv); override_config_conv = UserConfig_clone(&override_config_conv); - LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); + LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ"); *ret_conv = ChannelManager_create_channel(&this_arg_conv, their_network_key_ref, channel_value_satoshis, push_msat, user_channel_id_ref, temporary_channel_id_conv, override_config_conv); return tag_ptr(ret_conv, true); } @@ -38179,34 +42062,36 @@ uint64_tArray __attribute__((export_name("TS_ChannelManager_list_recent_payment return ret_arr; } -uint64_t __attribute__((export_name("TS_ChannelManager_close_channel"))) TS_ChannelManager_close_channel(uint64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id) { +uint64_t __attribute__((export_name("TS_ChannelManager_close_channel"))) TS_ChannelManager_close_channel(uint64_t this_arg, uint64_t channel_id, int8_tArray counterparty_node_id) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t channel_id_arr[32]; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_arr, channel_id->elems, 32); FREE(channel_id); - uint8_t (*channel_id_ref)[32] = &channel_id_arr; + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_close_channel(&this_arg_conv, channel_id_ref, counterparty_node_id_ref); + *ret_conv = ChannelManager_close_channel(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref); return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_ChannelManager_close_channel_with_feerate_and_script"))) TS_ChannelManager_close_channel_with_feerate_and_script(uint64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id, uint64_t target_feerate_sats_per_1000_weight, uint64_t shutdown_script) { +uint64_t __attribute__((export_name("TS_ChannelManager_close_channel_with_feerate_and_script"))) TS_ChannelManager_close_channel_with_feerate_and_script(uint64_t this_arg, uint64_t channel_id, int8_tArray counterparty_node_id, uint64_t target_feerate_sats_per_1000_weight, uint64_t shutdown_script) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t channel_id_arr[32]; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_arr, channel_id->elems, 32); FREE(channel_id); - uint8_t (*channel_id_ref)[32] = &channel_id_arr; + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); @@ -38220,43 +42105,45 @@ uint64_t __attribute__((export_name("TS_ChannelManager_close_channel_with_feera CHECK_INNER_FIELD_ACCESS_OR_NULL(shutdown_script_conv); shutdown_script_conv = ShutdownScript_clone(&shutdown_script_conv); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_close_channel_with_feerate_and_script(&this_arg_conv, channel_id_ref, counterparty_node_id_ref, target_feerate_sats_per_1000_weight_conv, shutdown_script_conv); + *ret_conv = ChannelManager_close_channel_with_feerate_and_script(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref, target_feerate_sats_per_1000_weight_conv, shutdown_script_conv); return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_ChannelManager_force_close_broadcasting_latest_txn"))) TS_ChannelManager_force_close_broadcasting_latest_txn(uint64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id) { +uint64_t __attribute__((export_name("TS_ChannelManager_force_close_broadcasting_latest_txn"))) TS_ChannelManager_force_close_broadcasting_latest_txn(uint64_t this_arg, uint64_t channel_id, int8_tArray counterparty_node_id) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t channel_id_arr[32]; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_arr, channel_id->elems, 32); FREE(channel_id); - uint8_t (*channel_id_ref)[32] = &channel_id_arr; + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_force_close_broadcasting_latest_txn(&this_arg_conv, channel_id_ref, counterparty_node_id_ref); + *ret_conv = ChannelManager_force_close_broadcasting_latest_txn(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref); return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_ChannelManager_force_close_without_broadcasting_txn"))) TS_ChannelManager_force_close_without_broadcasting_txn(uint64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id) { +uint64_t __attribute__((export_name("TS_ChannelManager_force_close_without_broadcasting_txn"))) TS_ChannelManager_force_close_without_broadcasting_txn(uint64_t this_arg, uint64_t channel_id, int8_tArray counterparty_node_id) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t channel_id_arr[32]; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_arr, channel_id->elems, 32); FREE(channel_id); - uint8_t (*channel_id_ref)[32] = &channel_id_arr; + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_force_close_without_broadcasting_txn(&this_arg_conv, channel_id_ref, counterparty_node_id_ref); + *ret_conv = ChannelManager_force_close_without_broadcasting_txn(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref); return tag_ptr(ret_conv, true); } @@ -38462,16 +42349,17 @@ uint64_t __attribute__((export_name("TS_ChannelManager_send_preflight_probes")) return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_ChannelManager_funding_transaction_generated"))) TS_ChannelManager_funding_transaction_generated(uint64_t this_arg, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray funding_transaction) { +uint64_t __attribute__((export_name("TS_ChannelManager_funding_transaction_generated"))) TS_ChannelManager_funding_transaction_generated(uint64_t this_arg, uint64_t temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray funding_transaction) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t temporary_channel_id_arr[32]; - CHECK(temporary_channel_id->arr_len == 32); - memcpy(temporary_channel_id_arr, temporary_channel_id->elems, 32); FREE(temporary_channel_id); - uint8_t (*temporary_channel_id_ref)[32] = &temporary_channel_id_arr; + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); @@ -38481,7 +42369,7 @@ uint64_t __attribute__((export_name("TS_ChannelManager_funding_transaction_gene memcpy(funding_transaction_ref.data, funding_transaction->elems, funding_transaction_ref.datalen); FREE(funding_transaction); funding_transaction_ref.data_is_owned = true; LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_funding_transaction_generated(&this_arg_conv, temporary_channel_id_ref, counterparty_node_id_ref, funding_transaction_ref); + *ret_conv = ChannelManager_funding_transaction_generated(&this_arg_conv, &temporary_channel_id_conv, counterparty_node_id_ref, funding_transaction_ref); return tag_ptr(ret_conv, true); } @@ -38491,20 +42379,20 @@ uint64_t __attribute__((export_name("TS_ChannelManager_batch_funding_transactio this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ temporary_channels_constr; + LDKCVec_C2Tuple_ChannelIdPublicKeyZZ temporary_channels_constr; temporary_channels_constr.datalen = temporary_channels->arr_len; if (temporary_channels_constr.datalen > 0) - temporary_channels_constr.data = MALLOC(temporary_channels_constr.datalen * sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ Elements"); + temporary_channels_constr.data = MALLOC(temporary_channels_constr.datalen * sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKCVec_C2Tuple_ChannelIdPublicKeyZZ Elements"); else temporary_channels_constr.data = NULL; uint64_t* temporary_channels_vals = temporary_channels->elems; - for (size_t j = 0; j < temporary_channels_constr.datalen; j++) { - uint64_t temporary_channels_conv_35 = temporary_channels_vals[j]; - void* temporary_channels_conv_35_ptr = untag_ptr(temporary_channels_conv_35); - CHECK_ACCESS(temporary_channels_conv_35_ptr); - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ temporary_channels_conv_35_conv = *(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)(temporary_channels_conv_35_ptr); - temporary_channels_conv_35_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone((LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(temporary_channels_conv_35)); - temporary_channels_constr.data[j] = temporary_channels_conv_35_conv; + for (size_t e = 0; e < temporary_channels_constr.datalen; e++) { + uint64_t temporary_channels_conv_30 = temporary_channels_vals[e]; + void* temporary_channels_conv_30_ptr = untag_ptr(temporary_channels_conv_30); + CHECK_ACCESS(temporary_channels_conv_30_ptr); + LDKC2Tuple_ChannelIdPublicKeyZ temporary_channels_conv_30_conv = *(LDKC2Tuple_ChannelIdPublicKeyZ*)(temporary_channels_conv_30_ptr); + temporary_channels_conv_30_conv = C2Tuple_ChannelIdPublicKeyZ_clone((LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(temporary_channels_conv_30)); + temporary_channels_constr.data[e] = temporary_channels_conv_30_conv; } FREE(temporary_channels); LDKTransaction funding_transaction_ref; @@ -38517,7 +42405,7 @@ uint64_t __attribute__((export_name("TS_ChannelManager_batch_funding_transactio return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_ChannelManager_update_partial_channel_config"))) TS_ChannelManager_update_partial_channel_config(uint64_t this_arg, int8_tArray counterparty_node_id, ptrArray channel_ids, uint64_t config_update) { +uint64_t __attribute__((export_name("TS_ChannelManager_update_partial_channel_config"))) TS_ChannelManager_update_partial_channel_config(uint64_t this_arg, int8_tArray counterparty_node_id, uint64_tArray channel_ids, uint64_t config_update) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); @@ -38526,19 +42414,21 @@ uint64_t __attribute__((export_name("TS_ChannelManager_update_partial_channel_c LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); - LDKCVec_ThirtyTwoBytesZ channel_ids_constr; + LDKCVec_ChannelIdZ channel_ids_constr; channel_ids_constr.datalen = channel_ids->arr_len; if (channel_ids_constr.datalen > 0) - channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKThirtyTwoBytes), "LDKCVec_ThirtyTwoBytesZ Elements"); + channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKChannelId), "LDKCVec_ChannelIdZ Elements"); else channel_ids_constr.data = NULL; - int8_tArray* channel_ids_vals = (void*) channel_ids->elems; - for (size_t m = 0; m < channel_ids_constr.datalen; m++) { - int8_tArray channel_ids_conv_12 = channel_ids_vals[m]; - LDKThirtyTwoBytes channel_ids_conv_12_ref; - CHECK(channel_ids_conv_12->arr_len == 32); - memcpy(channel_ids_conv_12_ref.data, channel_ids_conv_12->elems, 32); FREE(channel_ids_conv_12); - channel_ids_constr.data[m] = channel_ids_conv_12_ref; + uint64_t* channel_ids_vals = channel_ids->elems; + for (size_t l = 0; l < channel_ids_constr.datalen; l++) { + uint64_t channel_ids_conv_11 = channel_ids_vals[l]; + LDKChannelId channel_ids_conv_11_conv; + channel_ids_conv_11_conv.inner = untag_ptr(channel_ids_conv_11); + channel_ids_conv_11_conv.is_owned = ptr_is_owned(channel_ids_conv_11); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_ids_conv_11_conv); + channel_ids_conv_11_conv = ChannelId_clone(&channel_ids_conv_11_conv); + channel_ids_constr.data[l] = channel_ids_conv_11_conv; } FREE(channel_ids); LDKChannelConfigUpdate config_update_conv; @@ -38551,7 +42441,7 @@ uint64_t __attribute__((export_name("TS_ChannelManager_update_partial_channel_c return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_ChannelManager_update_channel_config"))) TS_ChannelManager_update_channel_config(uint64_t this_arg, int8_tArray counterparty_node_id, ptrArray channel_ids, uint64_t config) { +uint64_t __attribute__((export_name("TS_ChannelManager_update_channel_config"))) TS_ChannelManager_update_channel_config(uint64_t this_arg, int8_tArray counterparty_node_id, uint64_tArray channel_ids, uint64_t config) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); @@ -38560,19 +42450,21 @@ uint64_t __attribute__((export_name("TS_ChannelManager_update_channel_config")) LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); - LDKCVec_ThirtyTwoBytesZ channel_ids_constr; + LDKCVec_ChannelIdZ channel_ids_constr; channel_ids_constr.datalen = channel_ids->arr_len; if (channel_ids_constr.datalen > 0) - channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKThirtyTwoBytes), "LDKCVec_ThirtyTwoBytesZ Elements"); + channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKChannelId), "LDKCVec_ChannelIdZ Elements"); else channel_ids_constr.data = NULL; - int8_tArray* channel_ids_vals = (void*) channel_ids->elems; - for (size_t m = 0; m < channel_ids_constr.datalen; m++) { - int8_tArray channel_ids_conv_12 = channel_ids_vals[m]; - LDKThirtyTwoBytes channel_ids_conv_12_ref; - CHECK(channel_ids_conv_12->arr_len == 32); - memcpy(channel_ids_conv_12_ref.data, channel_ids_conv_12->elems, 32); FREE(channel_ids_conv_12); - channel_ids_constr.data[m] = channel_ids_conv_12_ref; + uint64_t* channel_ids_vals = channel_ids->elems; + for (size_t l = 0; l < channel_ids_constr.datalen; l++) { + uint64_t channel_ids_conv_11 = channel_ids_vals[l]; + LDKChannelId channel_ids_conv_11_conv; + channel_ids_conv_11_conv.inner = untag_ptr(channel_ids_conv_11); + channel_ids_conv_11_conv.is_owned = ptr_is_owned(channel_ids_conv_11); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_ids_conv_11_conv); + channel_ids_conv_11_conv = ChannelId_clone(&channel_ids_conv_11_conv); + channel_ids_constr.data[l] = channel_ids_conv_11_conv; } FREE(channel_ids); LDKChannelConfig config_conv; @@ -38585,7 +42477,7 @@ uint64_t __attribute__((export_name("TS_ChannelManager_update_channel_config")) return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_ChannelManager_forward_intercepted_htlc"))) TS_ChannelManager_forward_intercepted_htlc(uint64_t this_arg, int8_tArray intercept_id, int8_tArray next_hop_channel_id, int8_tArray next_node_id, int64_t amt_to_forward_msat) { +uint64_t __attribute__((export_name("TS_ChannelManager_forward_intercepted_htlc"))) TS_ChannelManager_forward_intercepted_htlc(uint64_t this_arg, int8_tArray intercept_id, uint64_t next_hop_channel_id, int8_tArray next_node_id, int64_t amt_to_forward_msat) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); @@ -38594,15 +42486,16 @@ uint64_t __attribute__((export_name("TS_ChannelManager_forward_intercepted_htlc LDKThirtyTwoBytes intercept_id_ref; CHECK(intercept_id->arr_len == 32); memcpy(intercept_id_ref.data, intercept_id->elems, 32); FREE(intercept_id); - uint8_t next_hop_channel_id_arr[32]; - CHECK(next_hop_channel_id->arr_len == 32); - memcpy(next_hop_channel_id_arr, next_hop_channel_id->elems, 32); FREE(next_hop_channel_id); - uint8_t (*next_hop_channel_id_ref)[32] = &next_hop_channel_id_arr; + LDKChannelId next_hop_channel_id_conv; + next_hop_channel_id_conv.inner = untag_ptr(next_hop_channel_id); + next_hop_channel_id_conv.is_owned = ptr_is_owned(next_hop_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(next_hop_channel_id_conv); + next_hop_channel_id_conv.is_owned = false; LDKPublicKey next_node_id_ref; CHECK(next_node_id->arr_len == 33); memcpy(next_node_id_ref.compressed_form, next_node_id->elems, 33); FREE(next_node_id); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_forward_intercepted_htlc(&this_arg_conv, intercept_id_ref, next_hop_channel_id_ref, next_node_id_ref, amt_to_forward_msat); + *ret_conv = ChannelManager_forward_intercepted_htlc(&this_arg_conv, intercept_id_ref, &next_hop_channel_id_conv, next_node_id_ref, amt_to_forward_msat); return tag_ptr(ret_conv, true); } @@ -38703,16 +42596,17 @@ int8_tArray __attribute__((export_name("TS_ChannelManager_get_our_node_id"))) T return ret_arr; } -uint64_t __attribute__((export_name("TS_ChannelManager_accept_inbound_channel"))) TS_ChannelManager_accept_inbound_channel(uint64_t this_arg, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) { +uint64_t __attribute__((export_name("TS_ChannelManager_accept_inbound_channel"))) TS_ChannelManager_accept_inbound_channel(uint64_t this_arg, uint64_t temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t temporary_channel_id_arr[32]; - CHECK(temporary_channel_id->arr_len == 32); - memcpy(temporary_channel_id_arr, temporary_channel_id->elems, 32); FREE(temporary_channel_id); - uint8_t (*temporary_channel_id_ref)[32] = &temporary_channel_id_arr; + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); @@ -38720,20 +42614,21 @@ uint64_t __attribute__((export_name("TS_ChannelManager_accept_inbound_channel") CHECK(user_channel_id->arr_len == 16); memcpy(user_channel_id_ref.le_bytes, user_channel_id->elems, 16); FREE(user_channel_id); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_accept_inbound_channel(&this_arg_conv, temporary_channel_id_ref, counterparty_node_id_ref, user_channel_id_ref); + *ret_conv = ChannelManager_accept_inbound_channel(&this_arg_conv, &temporary_channel_id_conv, counterparty_node_id_ref, user_channel_id_ref); return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_ChannelManager_accept_inbound_channel_from_trusted_peer_0conf"))) TS_ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(uint64_t this_arg, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) { +uint64_t __attribute__((export_name("TS_ChannelManager_accept_inbound_channel_from_trusted_peer_0conf"))) TS_ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(uint64_t this_arg, uint64_t temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t temporary_channel_id_arr[32]; - CHECK(temporary_channel_id->arr_len == 32); - memcpy(temporary_channel_id_arr, temporary_channel_id->elems, 32); FREE(temporary_channel_id); - uint8_t (*temporary_channel_id_ref)[32] = &temporary_channel_id_arr; + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); @@ -38741,7 +42636,40 @@ uint64_t __attribute__((export_name("TS_ChannelManager_accept_inbound_channel_f CHECK(user_channel_id->arr_len == 16); memcpy(user_channel_id_ref.le_bytes, user_channel_id->elems, 16); FREE(user_channel_id); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(&this_arg_conv, temporary_channel_id_ref, counterparty_node_id_ref, user_channel_id_ref); + *ret_conv = ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(&this_arg_conv, &temporary_channel_id_conv, counterparty_node_id_ref, user_channel_id_ref); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_ChannelManager_create_offer_builder"))) TS_ChannelManager_create_offer_builder(uint64_t this_arg) { + LDKChannelManager this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = ChannelManager_create_offer_builder(&this_arg_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_ChannelManager_create_refund_builder"))) TS_ChannelManager_create_refund_builder(uint64_t this_arg, int64_t amount_msats, int64_t absolute_expiry, int8_tArray payment_id, uint64_t retry_strategy, uint64_t max_total_routing_fee_msat) { + LDKChannelManager this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKThirtyTwoBytes payment_id_ref; + CHECK(payment_id->arr_len == 32); + memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id); + void* retry_strategy_ptr = untag_ptr(retry_strategy); + CHECK_ACCESS(retry_strategy_ptr); + LDKRetry retry_strategy_conv = *(LDKRetry*)(retry_strategy_ptr); + retry_strategy_conv = Retry_clone((LDKRetry*)untag_ptr(retry_strategy)); + void* max_total_routing_fee_msat_ptr = untag_ptr(max_total_routing_fee_msat); + CHECK_ACCESS(max_total_routing_fee_msat_ptr); + LDKCOption_u64Z max_total_routing_fee_msat_conv = *(LDKCOption_u64Z*)(max_total_routing_fee_msat_ptr); + max_total_routing_fee_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(max_total_routing_fee_msat)); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = ChannelManager_create_refund_builder(&this_arg_conv, amount_msats, absolute_expiry, payment_id_ref, retry_strategy_conv, max_total_routing_fee_msat_conv); return tag_ptr(ret_conv, true); } @@ -38795,7 +42723,7 @@ uint64_t __attribute__((export_name("TS_ChannelManager_request_refund_payment") refund_conv.is_owned = ptr_is_owned(refund); CHECK_INNER_FIELD_ACCESS_OR_NULL(refund_conv); refund_conv.is_owned = false; - LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); *ret_conv = ChannelManager_request_refund_payment(&this_arg_conv, &refund_conv); return tag_ptr(ret_conv, true); } @@ -39058,6 +42986,17 @@ uint64_t __attribute__((export_name("TS_ChannelManager_as_OffersMessageHandler" return tag_ptr(ret_ret, true); } +uint64_t __attribute__((export_name("TS_ChannelManager_as_NodeIdLookUp"))) TS_ChannelManager_as_NodeIdLookUp(uint64_t this_arg) { + LDKChannelManager this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKNodeIdLookUp* ret_ret = MALLOC(sizeof(LDKNodeIdLookUp), "LDKNodeIdLookUp"); + *ret_ret = ChannelManager_as_NodeIdLookUp(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + uint64_t __attribute__((export_name("TS_provided_init_features"))) TS_provided_init_features(uint64_t config) { LDKUserConfig config_conv; config_conv.inner = untag_ptr(config); @@ -39740,6 +43679,20 @@ int8_tArray __attribute__((export_name("TS_DelayedPaymentBasepoint_to_public_ke return ret_arr; } +int8_tArray __attribute__((export_name("TS_DelayedPaymentBasepoint_derive_add_tweak"))) TS_DelayedPaymentBasepoint_derive_add_tweak(uint64_t this_arg, int8_tArray per_commitment_point) { + LDKDelayedPaymentBasepoint this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKPublicKey per_commitment_point_ref; + CHECK(per_commitment_point->arr_len == 33); + memcpy(per_commitment_point_ref.compressed_form, per_commitment_point->elems, 33); FREE(per_commitment_point); + int8_tArray ret_arr = init_int8_tArray(32, __LINE__); + memcpy(ret_arr->elems, DelayedPaymentBasepoint_derive_add_tweak(&this_arg_conv, per_commitment_point_ref).data, 32); + return ret_arr; +} + int8_tArray __attribute__((export_name("TS_DelayedPaymentBasepoint_write"))) TS_DelayedPaymentBasepoint_write(uint64_t obj) { LDKDelayedPaymentBasepoint obj_conv; obj_conv.inner = untag_ptr(obj); @@ -40020,6 +43973,20 @@ int8_tArray __attribute__((export_name("TS_HtlcBasepoint_to_public_key"))) TS_H return ret_arr; } +int8_tArray __attribute__((export_name("TS_HtlcBasepoint_derive_add_tweak"))) TS_HtlcBasepoint_derive_add_tweak(uint64_t this_arg, int8_tArray per_commitment_point) { + LDKHtlcBasepoint this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKPublicKey per_commitment_point_ref; + CHECK(per_commitment_point->arr_len == 33); + memcpy(per_commitment_point_ref.compressed_form, per_commitment_point->elems, 33); FREE(per_commitment_point); + int8_tArray ret_arr = init_int8_tArray(32, __LINE__); + memcpy(ret_arr->elems, HtlcBasepoint_derive_add_tweak(&this_arg_conv, per_commitment_point_ref).data, 32); + return ret_arr; +} + int8_tArray __attribute__((export_name("TS_HtlcBasepoint_write"))) TS_HtlcBasepoint_write(uint64_t obj) { LDKHtlcBasepoint obj_conv; obj_conv.inner = untag_ptr(obj); @@ -40192,6 +44159,19 @@ uint64_t __attribute__((export_name("TS_HtlcKey_read"))) TS_HtlcKey_read(int8_t return tag_ptr(ret_conv, true); } +int8_tArray __attribute__((export_name("TS_add_public_key_tweak"))) TS_add_public_key_tweak(int8_tArray base_point, int8_tArray tweak) { + LDKPublicKey base_point_ref; + CHECK(base_point->arr_len == 33); + memcpy(base_point_ref.compressed_form, base_point->elems, 33); FREE(base_point); + uint8_t tweak_arr[32]; + CHECK(tweak->arr_len == 32); + memcpy(tweak_arr, tweak->elems, 32); FREE(tweak); + uint8_t (*tweak_ref)[32] = &tweak_arr; + int8_tArray ret_arr = init_int8_tArray(33, __LINE__); + memcpy(ret_arr->elems, add_public_key_tweak(base_point_ref, tweak_ref).compressed_form, 33); + return ret_arr; +} + void __attribute__((export_name("TS_RevocationBasepoint_free"))) TS_RevocationBasepoint_free(uint64_t this_obj) { LDKRevocationBasepoint this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -40613,6 +44593,13 @@ uint64_t __attribute__((export_name("TS_DecodeError_unsupported_compression"))) return ret_ref; } +uint64_t __attribute__((export_name("TS_DecodeError_dangerous_value"))) TS_DecodeError_dangerous_value() { + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = DecodeError_dangerous_value(); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + int64_t __attribute__((export_name("TS_DecodeError_hash"))) TS_DecodeError_hash(uint64_t o) { LDKDecodeError* o_conv = (LDKDecodeError*)untag_ptr(o); int64_t ret_conv = DecodeError_hash(o_conv); @@ -40794,27 +44781,31 @@ void __attribute__((export_name("TS_ErrorMessage_free"))) TS_ErrorMessage_free( ErrorMessage_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_ErrorMessage_get_channel_id"))) TS_ErrorMessage_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_ErrorMessage_get_channel_id"))) TS_ErrorMessage_get_channel_id(uint64_t this_ptr) { LDKErrorMessage this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *ErrorMessage_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = ErrorMessage_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_ErrorMessage_set_channel_id"))) TS_ErrorMessage_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_ErrorMessage_set_channel_id"))) TS_ErrorMessage_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKErrorMessage this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - ErrorMessage_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ErrorMessage_set_channel_id(&this_ptr_conv, val_conv); } jstring __attribute__((export_name("TS_ErrorMessage_get_data"))) TS_ErrorMessage_get_data(uint64_t this_ptr) { @@ -40839,12 +44830,14 @@ void __attribute__((export_name("TS_ErrorMessage_set_data"))) TS_ErrorMessage_s ErrorMessage_set_data(&this_ptr_conv, val_conv); } -uint64_t __attribute__((export_name("TS_ErrorMessage_new"))) TS_ErrorMessage_new(int8_tArray channel_id_arg, jstring data_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_ErrorMessage_new"))) TS_ErrorMessage_new(uint64_t channel_id_arg, jstring data_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKStr data_arg_conv = str_ref_to_owned_c(data_arg); - LDKErrorMessage ret_var = ErrorMessage_new(channel_id_arg_ref, data_arg_conv); + LDKErrorMessage ret_var = ErrorMessage_new(channel_id_arg_conv, data_arg_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -40914,27 +44907,31 @@ void __attribute__((export_name("TS_WarningMessage_free"))) TS_WarningMessage_f WarningMessage_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_WarningMessage_get_channel_id"))) TS_WarningMessage_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_WarningMessage_get_channel_id"))) TS_WarningMessage_get_channel_id(uint64_t this_ptr) { LDKWarningMessage this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *WarningMessage_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = WarningMessage_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_WarningMessage_set_channel_id"))) TS_WarningMessage_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_WarningMessage_set_channel_id"))) TS_WarningMessage_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKWarningMessage this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - WarningMessage_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + WarningMessage_set_channel_id(&this_ptr_conv, val_conv); } jstring __attribute__((export_name("TS_WarningMessage_get_data"))) TS_WarningMessage_get_data(uint64_t this_ptr) { @@ -40959,12 +44956,14 @@ void __attribute__((export_name("TS_WarningMessage_set_data"))) TS_WarningMessa WarningMessage_set_data(&this_ptr_conv, val_conv); } -uint64_t __attribute__((export_name("TS_WarningMessage_new"))) TS_WarningMessage_new(int8_tArray channel_id_arg, jstring data_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_WarningMessage_new"))) TS_WarningMessage_new(uint64_t channel_id_arg, jstring data_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKStr data_arg_conv = str_ref_to_owned_c(data_arg); - LDKWarningMessage ret_var = WarningMessage_new(channel_id_arg_ref, data_arg_conv); + LDKWarningMessage ret_var = WarningMessage_new(channel_id_arg_conv, data_arg_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -41225,50 +45224,27 @@ jboolean __attribute__((export_name("TS_Pong_eq"))) TS_Pong_eq(uint64_t a, uint return ret_conv; } -void __attribute__((export_name("TS_OpenChannel_free"))) TS_OpenChannel_free(uint64_t this_obj) { - LDKOpenChannel this_obj_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_free"))) TS_CommonOpenChannelFields_free(uint64_t this_obj) { + LDKCommonOpenChannelFields this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); this_obj_conv.is_owned = ptr_is_owned(this_obj); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - OpenChannel_free(this_obj_conv); -} - -int8_tArray __attribute__((export_name("TS_OpenChannel_get_chain_hash"))) TS_OpenChannel_get_chain_hash(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *OpenChannel_get_chain_hash(&this_ptr_conv), 32); - return ret_arr; -} - -void __attribute__((export_name("TS_OpenChannel_set_chain_hash"))) TS_OpenChannel_set_chain_hash(uint64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - OpenChannel_set_chain_hash(&this_ptr_conv, val_ref); + CommonOpenChannelFields_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_OpenChannel_get_temporary_channel_id"))) TS_OpenChannel_get_temporary_channel_id(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +int8_tArray __attribute__((export_name("TS_CommonOpenChannelFields_get_chain_hash"))) TS_CommonOpenChannelFields_get_chain_hash(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *OpenChannel_get_temporary_channel_id(&this_ptr_conv), 32); + memcpy(ret_arr->elems, *CommonOpenChannelFields_get_chain_hash(&this_ptr_conv), 32); return ret_arr; } -void __attribute__((export_name("TS_OpenChannel_set_temporary_channel_id"))) TS_OpenChannel_set_temporary_channel_id(uint64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_chain_hash"))) TS_CommonOpenChannelFields_set_chain_hash(uint64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -41276,193 +45252,182 @@ void __attribute__((export_name("TS_OpenChannel_set_temporary_channel_id"))) TS LDKThirtyTwoBytes val_ref; CHECK(val->arr_len == 32); memcpy(val_ref.data, val->elems, 32); FREE(val); - OpenChannel_set_temporary_channel_id(&this_ptr_conv, val_ref); -} - -int64_t __attribute__((export_name("TS_OpenChannel_get_funding_satoshis"))) TS_OpenChannel_get_funding_satoshis(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_funding_satoshis(&this_ptr_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_OpenChannel_set_funding_satoshis"))) TS_OpenChannel_set_funding_satoshis(uint64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannel_set_funding_satoshis(&this_ptr_conv, val); + CommonOpenChannelFields_set_chain_hash(&this_ptr_conv, val_ref); } -int64_t __attribute__((export_name("TS_OpenChannel_get_push_msat"))) TS_OpenChannel_get_push_msat(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +uint64_t __attribute__((export_name("TS_CommonOpenChannelFields_get_temporary_channel_id"))) TS_CommonOpenChannelFields_get_temporary_channel_id(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_push_msat(&this_ptr_conv); - return ret_conv; + LDKChannelId ret_var = CommonOpenChannelFields_get_temporary_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_OpenChannel_set_push_msat"))) TS_OpenChannel_set_push_msat(uint64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_temporary_channel_id"))) TS_CommonOpenChannelFields_set_temporary_channel_id(uint64_t this_ptr, uint64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_push_msat(&this_ptr_conv, val); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + CommonOpenChannelFields_set_temporary_channel_id(&this_ptr_conv, val_conv); } -int64_t __attribute__((export_name("TS_OpenChannel_get_dust_limit_satoshis"))) TS_OpenChannel_get_dust_limit_satoshis(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +int64_t __attribute__((export_name("TS_CommonOpenChannelFields_get_funding_satoshis"))) TS_CommonOpenChannelFields_get_funding_satoshis(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_dust_limit_satoshis(&this_ptr_conv); + int64_t ret_conv = CommonOpenChannelFields_get_funding_satoshis(&this_ptr_conv); return ret_conv; } -void __attribute__((export_name("TS_OpenChannel_set_dust_limit_satoshis"))) TS_OpenChannel_set_dust_limit_satoshis(uint64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_funding_satoshis"))) TS_CommonOpenChannelFields_set_funding_satoshis(uint64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_dust_limit_satoshis(&this_ptr_conv, val); + CommonOpenChannelFields_set_funding_satoshis(&this_ptr_conv, val); } -int64_t __attribute__((export_name("TS_OpenChannel_get_max_htlc_value_in_flight_msat"))) TS_OpenChannel_get_max_htlc_value_in_flight_msat(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +int64_t __attribute__((export_name("TS_CommonOpenChannelFields_get_dust_limit_satoshis"))) TS_CommonOpenChannelFields_get_dust_limit_satoshis(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_max_htlc_value_in_flight_msat(&this_ptr_conv); + int64_t ret_conv = CommonOpenChannelFields_get_dust_limit_satoshis(&this_ptr_conv); return ret_conv; } -void __attribute__((export_name("TS_OpenChannel_set_max_htlc_value_in_flight_msat"))) TS_OpenChannel_set_max_htlc_value_in_flight_msat(uint64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_dust_limit_satoshis"))) TS_CommonOpenChannelFields_set_dust_limit_satoshis(uint64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); + CommonOpenChannelFields_set_dust_limit_satoshis(&this_ptr_conv, val); } -int64_t __attribute__((export_name("TS_OpenChannel_get_channel_reserve_satoshis"))) TS_OpenChannel_get_channel_reserve_satoshis(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +int64_t __attribute__((export_name("TS_CommonOpenChannelFields_get_max_htlc_value_in_flight_msat"))) TS_CommonOpenChannelFields_get_max_htlc_value_in_flight_msat(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_channel_reserve_satoshis(&this_ptr_conv); + int64_t ret_conv = CommonOpenChannelFields_get_max_htlc_value_in_flight_msat(&this_ptr_conv); return ret_conv; } -void __attribute__((export_name("TS_OpenChannel_set_channel_reserve_satoshis"))) TS_OpenChannel_set_channel_reserve_satoshis(uint64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_max_htlc_value_in_flight_msat"))) TS_CommonOpenChannelFields_set_max_htlc_value_in_flight_msat(uint64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_channel_reserve_satoshis(&this_ptr_conv, val); + CommonOpenChannelFields_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); } -int64_t __attribute__((export_name("TS_OpenChannel_get_htlc_minimum_msat"))) TS_OpenChannel_get_htlc_minimum_msat(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +int64_t __attribute__((export_name("TS_CommonOpenChannelFields_get_htlc_minimum_msat"))) TS_CommonOpenChannelFields_get_htlc_minimum_msat(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_htlc_minimum_msat(&this_ptr_conv); + int64_t ret_conv = CommonOpenChannelFields_get_htlc_minimum_msat(&this_ptr_conv); return ret_conv; } -void __attribute__((export_name("TS_OpenChannel_set_htlc_minimum_msat"))) TS_OpenChannel_set_htlc_minimum_msat(uint64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_htlc_minimum_msat"))) TS_CommonOpenChannelFields_set_htlc_minimum_msat(uint64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_htlc_minimum_msat(&this_ptr_conv, val); + CommonOpenChannelFields_set_htlc_minimum_msat(&this_ptr_conv, val); } -int32_t __attribute__((export_name("TS_OpenChannel_get_feerate_per_kw"))) TS_OpenChannel_get_feerate_per_kw(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +int32_t __attribute__((export_name("TS_CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight"))) TS_CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int32_t ret_conv = OpenChannel_get_feerate_per_kw(&this_ptr_conv); + int32_t ret_conv = CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight(&this_ptr_conv); return ret_conv; } -void __attribute__((export_name("TS_OpenChannel_set_feerate_per_kw"))) TS_OpenChannel_set_feerate_per_kw(uint64_t this_ptr, int32_t val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight"))) TS_CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight(uint64_t this_ptr, int32_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_feerate_per_kw(&this_ptr_conv, val); + CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight(&this_ptr_conv, val); } -int16_t __attribute__((export_name("TS_OpenChannel_get_to_self_delay"))) TS_OpenChannel_get_to_self_delay(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +int16_t __attribute__((export_name("TS_CommonOpenChannelFields_get_to_self_delay"))) TS_CommonOpenChannelFields_get_to_self_delay(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int16_t ret_conv = OpenChannel_get_to_self_delay(&this_ptr_conv); + int16_t ret_conv = CommonOpenChannelFields_get_to_self_delay(&this_ptr_conv); return ret_conv; } -void __attribute__((export_name("TS_OpenChannel_set_to_self_delay"))) TS_OpenChannel_set_to_self_delay(uint64_t this_ptr, int16_t val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_to_self_delay"))) TS_CommonOpenChannelFields_set_to_self_delay(uint64_t this_ptr, int16_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_to_self_delay(&this_ptr_conv, val); + CommonOpenChannelFields_set_to_self_delay(&this_ptr_conv, val); } -int16_t __attribute__((export_name("TS_OpenChannel_get_max_accepted_htlcs"))) TS_OpenChannel_get_max_accepted_htlcs(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +int16_t __attribute__((export_name("TS_CommonOpenChannelFields_get_max_accepted_htlcs"))) TS_CommonOpenChannelFields_get_max_accepted_htlcs(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int16_t ret_conv = OpenChannel_get_max_accepted_htlcs(&this_ptr_conv); + int16_t ret_conv = CommonOpenChannelFields_get_max_accepted_htlcs(&this_ptr_conv); return ret_conv; } -void __attribute__((export_name("TS_OpenChannel_set_max_accepted_htlcs"))) TS_OpenChannel_set_max_accepted_htlcs(uint64_t this_ptr, int16_t val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_max_accepted_htlcs"))) TS_CommonOpenChannelFields_set_max_accepted_htlcs(uint64_t this_ptr, int16_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_max_accepted_htlcs(&this_ptr_conv, val); + CommonOpenChannelFields_set_max_accepted_htlcs(&this_ptr_conv, val); } -int8_tArray __attribute__((export_name("TS_OpenChannel_get_funding_pubkey"))) TS_OpenChannel_get_funding_pubkey(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +int8_tArray __attribute__((export_name("TS_CommonOpenChannelFields_get_funding_pubkey"))) TS_CommonOpenChannelFields_get_funding_pubkey(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannel_get_funding_pubkey(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonOpenChannelFields_get_funding_pubkey(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void __attribute__((export_name("TS_OpenChannel_set_funding_pubkey"))) TS_OpenChannel_set_funding_pubkey(uint64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_funding_pubkey"))) TS_CommonOpenChannelFields_set_funding_pubkey(uint64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -41470,22 +45435,22 @@ void __attribute__((export_name("TS_OpenChannel_set_funding_pubkey"))) TS_OpenC LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannel_set_funding_pubkey(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_funding_pubkey(&this_ptr_conv, val_ref); } -int8_tArray __attribute__((export_name("TS_OpenChannel_get_revocation_basepoint"))) TS_OpenChannel_get_revocation_basepoint(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +int8_tArray __attribute__((export_name("TS_CommonOpenChannelFields_get_revocation_basepoint"))) TS_CommonOpenChannelFields_get_revocation_basepoint(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannel_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonOpenChannelFields_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void __attribute__((export_name("TS_OpenChannel_set_revocation_basepoint"))) TS_OpenChannel_set_revocation_basepoint(uint64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_revocation_basepoint"))) TS_CommonOpenChannelFields_set_revocation_basepoint(uint64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -41493,22 +45458,22 @@ void __attribute__((export_name("TS_OpenChannel_set_revocation_basepoint"))) TS LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannel_set_revocation_basepoint(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_revocation_basepoint(&this_ptr_conv, val_ref); } -int8_tArray __attribute__((export_name("TS_OpenChannel_get_payment_point"))) TS_OpenChannel_get_payment_point(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +int8_tArray __attribute__((export_name("TS_CommonOpenChannelFields_get_payment_basepoint"))) TS_CommonOpenChannelFields_get_payment_basepoint(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannel_get_payment_point(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonOpenChannelFields_get_payment_basepoint(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void __attribute__((export_name("TS_OpenChannel_set_payment_point"))) TS_OpenChannel_set_payment_point(uint64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_payment_basepoint"))) TS_CommonOpenChannelFields_set_payment_basepoint(uint64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -41516,22 +45481,22 @@ void __attribute__((export_name("TS_OpenChannel_set_payment_point"))) TS_OpenCh LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannel_set_payment_point(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_payment_basepoint(&this_ptr_conv, val_ref); } -int8_tArray __attribute__((export_name("TS_OpenChannel_get_delayed_payment_basepoint"))) TS_OpenChannel_get_delayed_payment_basepoint(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +int8_tArray __attribute__((export_name("TS_CommonOpenChannelFields_get_delayed_payment_basepoint"))) TS_CommonOpenChannelFields_get_delayed_payment_basepoint(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannel_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonOpenChannelFields_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void __attribute__((export_name("TS_OpenChannel_set_delayed_payment_basepoint"))) TS_OpenChannel_set_delayed_payment_basepoint(uint64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_delayed_payment_basepoint"))) TS_CommonOpenChannelFields_set_delayed_payment_basepoint(uint64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -41539,22 +45504,22 @@ void __attribute__((export_name("TS_OpenChannel_set_delayed_payment_basepoint") LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannel_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); } -int8_tArray __attribute__((export_name("TS_OpenChannel_get_htlc_basepoint"))) TS_OpenChannel_get_htlc_basepoint(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +int8_tArray __attribute__((export_name("TS_CommonOpenChannelFields_get_htlc_basepoint"))) TS_CommonOpenChannelFields_get_htlc_basepoint(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannel_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonOpenChannelFields_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void __attribute__((export_name("TS_OpenChannel_set_htlc_basepoint"))) TS_OpenChannel_set_htlc_basepoint(uint64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_htlc_basepoint"))) TS_CommonOpenChannelFields_set_htlc_basepoint(uint64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -41562,22 +45527,22 @@ void __attribute__((export_name("TS_OpenChannel_set_htlc_basepoint"))) TS_OpenC LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannel_set_htlc_basepoint(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_htlc_basepoint(&this_ptr_conv, val_ref); } -int8_tArray __attribute__((export_name("TS_OpenChannel_get_first_per_commitment_point"))) TS_OpenChannel_get_first_per_commitment_point(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +int8_tArray __attribute__((export_name("TS_CommonOpenChannelFields_get_first_per_commitment_point"))) TS_CommonOpenChannelFields_get_first_per_commitment_point(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannel_get_first_per_commitment_point(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonOpenChannelFields_get_first_per_commitment_point(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void __attribute__((export_name("TS_OpenChannel_set_first_per_commitment_point"))) TS_OpenChannel_set_first_per_commitment_point(uint64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_first_per_commitment_point"))) TS_CommonOpenChannelFields_set_first_per_commitment_point(uint64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -41585,42 +45550,42 @@ void __attribute__((export_name("TS_OpenChannel_set_first_per_commitment_point" LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannel_set_first_per_commitment_point(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_first_per_commitment_point(&this_ptr_conv, val_ref); } -int8_t __attribute__((export_name("TS_OpenChannel_get_channel_flags"))) TS_OpenChannel_get_channel_flags(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +int8_t __attribute__((export_name("TS_CommonOpenChannelFields_get_channel_flags"))) TS_CommonOpenChannelFields_get_channel_flags(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_t ret_conv = OpenChannel_get_channel_flags(&this_ptr_conv); + int8_t ret_conv = CommonOpenChannelFields_get_channel_flags(&this_ptr_conv); return ret_conv; } -void __attribute__((export_name("TS_OpenChannel_set_channel_flags"))) TS_OpenChannel_set_channel_flags(uint64_t this_ptr, int8_t val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_channel_flags"))) TS_CommonOpenChannelFields_set_channel_flags(uint64_t this_ptr, int8_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannel_set_channel_flags(&this_ptr_conv, val); + CommonOpenChannelFields_set_channel_flags(&this_ptr_conv, val); } -uint64_t __attribute__((export_name("TS_OpenChannel_get_shutdown_scriptpubkey"))) TS_OpenChannel_get_shutdown_scriptpubkey(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +uint64_t __attribute__((export_name("TS_CommonOpenChannelFields_get_shutdown_scriptpubkey"))) TS_CommonOpenChannelFields_get_shutdown_scriptpubkey(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ"); - *ret_copy = OpenChannel_get_shutdown_scriptpubkey(&this_ptr_conv); + *ret_copy = CommonOpenChannelFields_get_shutdown_scriptpubkey(&this_ptr_conv); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -void __attribute__((export_name("TS_OpenChannel_set_shutdown_scriptpubkey"))) TS_OpenChannel_set_shutdown_scriptpubkey(uint64_t this_ptr, uint64_t val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_shutdown_scriptpubkey"))) TS_CommonOpenChannelFields_set_shutdown_scriptpubkey(uint64_t this_ptr, uint64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -41629,24 +45594,24 @@ void __attribute__((export_name("TS_OpenChannel_set_shutdown_scriptpubkey"))) T CHECK_ACCESS(val_ptr); LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr); val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val)); - OpenChannel_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); + CommonOpenChannelFields_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); } -uint64_t __attribute__((export_name("TS_OpenChannel_get_channel_type"))) TS_OpenChannel_get_channel_type(uint64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +uint64_t __attribute__((export_name("TS_CommonOpenChannelFields_get_channel_type"))) TS_CommonOpenChannelFields_get_channel_type(uint64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures ret_var = OpenChannel_get_channel_type(&this_ptr_conv); + LDKChannelTypeFeatures ret_var = CommonOpenChannelFields_get_channel_type(&this_ptr_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -void __attribute__((export_name("TS_OpenChannel_set_channel_type"))) TS_OpenChannel_set_channel_type(uint64_t this_ptr, uint64_t val) { - LDKOpenChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonOpenChannelFields_set_channel_type"))) TS_CommonOpenChannelFields_set_channel_type(uint64_t this_ptr, uint64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -41656,25 +45621,27 @@ void __attribute__((export_name("TS_OpenChannel_set_channel_type"))) TS_OpenCha val_conv.is_owned = ptr_is_owned(val); CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); val_conv = ChannelTypeFeatures_clone(&val_conv); - OpenChannel_set_channel_type(&this_ptr_conv, val_conv); + CommonOpenChannelFields_set_channel_type(&this_ptr_conv, val_conv); } -uint64_t __attribute__((export_name("TS_OpenChannel_new"))) TS_OpenChannel_new(int8_tArray chain_hash_arg, int8_tArray temporary_channel_id_arg, int64_t funding_satoshis_arg, int64_t push_msat_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t channel_reserve_satoshis_arg, int64_t htlc_minimum_msat_arg, int32_t feerate_per_kw_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_point_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_t channel_flags_arg, uint64_t shutdown_scriptpubkey_arg, uint64_t channel_type_arg) { +uint64_t __attribute__((export_name("TS_CommonOpenChannelFields_new"))) TS_CommonOpenChannelFields_new(int8_tArray chain_hash_arg, uint64_t temporary_channel_id_arg, int64_t funding_satoshis_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int32_t commitment_feerate_sat_per_1000_weight_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_t channel_flags_arg, uint64_t shutdown_scriptpubkey_arg, uint64_t channel_type_arg) { LDKThirtyTwoBytes chain_hash_arg_ref; CHECK(chain_hash_arg->arr_len == 32); memcpy(chain_hash_arg_ref.data, chain_hash_arg->elems, 32); FREE(chain_hash_arg); - LDKThirtyTwoBytes temporary_channel_id_arg_ref; - CHECK(temporary_channel_id_arg->arr_len == 32); - memcpy(temporary_channel_id_arg_ref.data, temporary_channel_id_arg->elems, 32); FREE(temporary_channel_id_arg); + LDKChannelId temporary_channel_id_arg_conv; + temporary_channel_id_arg_conv.inner = untag_ptr(temporary_channel_id_arg); + temporary_channel_id_arg_conv.is_owned = ptr_is_owned(temporary_channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_arg_conv); + temporary_channel_id_arg_conv = ChannelId_clone(&temporary_channel_id_arg_conv); LDKPublicKey funding_pubkey_arg_ref; CHECK(funding_pubkey_arg->arr_len == 33); memcpy(funding_pubkey_arg_ref.compressed_form, funding_pubkey_arg->elems, 33); FREE(funding_pubkey_arg); LDKPublicKey revocation_basepoint_arg_ref; CHECK(revocation_basepoint_arg->arr_len == 33); memcpy(revocation_basepoint_arg_ref.compressed_form, revocation_basepoint_arg->elems, 33); FREE(revocation_basepoint_arg); - LDKPublicKey payment_point_arg_ref; - CHECK(payment_point_arg->arr_len == 33); - memcpy(payment_point_arg_ref.compressed_form, payment_point_arg->elems, 33); FREE(payment_point_arg); + LDKPublicKey payment_basepoint_arg_ref; + CHECK(payment_basepoint_arg->arr_len == 33); + memcpy(payment_basepoint_arg_ref.compressed_form, payment_basepoint_arg->elems, 33); FREE(payment_basepoint_arg); LDKPublicKey delayed_payment_basepoint_arg_ref; CHECK(delayed_payment_basepoint_arg->arr_len == 33); memcpy(delayed_payment_basepoint_arg_ref.compressed_form, delayed_payment_basepoint_arg->elems, 33); FREE(delayed_payment_basepoint_arg); @@ -41693,7 +45660,148 @@ uint64_t __attribute__((export_name("TS_OpenChannel_new"))) TS_OpenChannel_new( channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv); channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv); - LDKOpenChannel ret_var = OpenChannel_new(chain_hash_arg_ref, temporary_channel_id_arg_ref, funding_satoshis_arg, push_msat_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, feerate_per_kw_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_point_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, channel_flags_arg, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv); + LDKCommonOpenChannelFields ret_var = CommonOpenChannelFields_new(chain_hash_arg_ref, temporary_channel_id_arg_conv, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, commitment_feerate_sat_per_1000_weight_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, channel_flags_arg, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t CommonOpenChannelFields_clone_ptr(LDKCommonOpenChannelFields *NONNULL_PTR arg) { + LDKCommonOpenChannelFields ret_var = CommonOpenChannelFields_clone(arg); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t __attribute__((export_name("TS_CommonOpenChannelFields_clone_ptr"))) TS_CommonOpenChannelFields_clone_ptr(uint64_t arg) { + LDKCommonOpenChannelFields arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = CommonOpenChannelFields_clone_ptr(&arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CommonOpenChannelFields_clone"))) TS_CommonOpenChannelFields_clone(uint64_t orig) { + LDKCommonOpenChannelFields orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKCommonOpenChannelFields ret_var = CommonOpenChannelFields_clone(&orig_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t __attribute__((export_name("TS_CommonOpenChannelFields_hash"))) TS_CommonOpenChannelFields_hash(uint64_t o) { + LDKCommonOpenChannelFields o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = CommonOpenChannelFields_hash(&o_conv); + return ret_conv; +} + +jboolean __attribute__((export_name("TS_CommonOpenChannelFields_eq"))) TS_CommonOpenChannelFields_eq(uint64_t a, uint64_t b) { + LDKCommonOpenChannelFields a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKCommonOpenChannelFields b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = CommonOpenChannelFields_eq(&a_conv, &b_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_OpenChannel_free"))) TS_OpenChannel_free(uint64_t this_obj) { + LDKOpenChannel this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + OpenChannel_free(this_obj_conv); +} + +uint64_t __attribute__((export_name("TS_OpenChannel_get_common_fields"))) TS_OpenChannel_get_common_fields(uint64_t this_ptr) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCommonOpenChannelFields ret_var = OpenChannel_get_common_fields(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void __attribute__((export_name("TS_OpenChannel_set_common_fields"))) TS_OpenChannel_set_common_fields(uint64_t this_ptr, uint64_t val) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCommonOpenChannelFields val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = CommonOpenChannelFields_clone(&val_conv); + OpenChannel_set_common_fields(&this_ptr_conv, val_conv); +} + +int64_t __attribute__((export_name("TS_OpenChannel_get_push_msat"))) TS_OpenChannel_get_push_msat(uint64_t this_ptr) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int64_t ret_conv = OpenChannel_get_push_msat(&this_ptr_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_OpenChannel_set_push_msat"))) TS_OpenChannel_set_push_msat(uint64_t this_ptr, int64_t val) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + OpenChannel_set_push_msat(&this_ptr_conv, val); +} + +int64_t __attribute__((export_name("TS_OpenChannel_get_channel_reserve_satoshis"))) TS_OpenChannel_get_channel_reserve_satoshis(uint64_t this_ptr) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int64_t ret_conv = OpenChannel_get_channel_reserve_satoshis(&this_ptr_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_OpenChannel_set_channel_reserve_satoshis"))) TS_OpenChannel_set_channel_reserve_satoshis(uint64_t this_ptr, int64_t val) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + OpenChannel_set_channel_reserve_satoshis(&this_ptr_conv, val); +} + +uint64_t __attribute__((export_name("TS_OpenChannel_new"))) TS_OpenChannel_new(uint64_t common_fields_arg, int64_t push_msat_arg, int64_t channel_reserve_satoshis_arg) { + LDKCommonOpenChannelFields common_fields_arg_conv; + common_fields_arg_conv.inner = untag_ptr(common_fields_arg); + common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv); + common_fields_arg_conv = CommonOpenChannelFields_clone(&common_fields_arg_conv); + LDKOpenChannel ret_var = OpenChannel_new(common_fields_arg_conv, push_msat_arg, channel_reserve_satoshis_arg); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -41763,50 +45871,31 @@ void __attribute__((export_name("TS_OpenChannelV2_free"))) TS_OpenChannelV2_fre OpenChannelV2_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_chain_hash"))) TS_OpenChannelV2_get_chain_hash(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_OpenChannelV2_get_common_fields"))) TS_OpenChannelV2_get_common_fields(uint64_t this_ptr) { LDKOpenChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *OpenChannelV2_get_chain_hash(&this_ptr_conv), 32); - return ret_arr; -} - -void __attribute__((export_name("TS_OpenChannelV2_set_chain_hash"))) TS_OpenChannelV2_set_chain_hash(uint64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - OpenChannelV2_set_chain_hash(&this_ptr_conv, val_ref); -} - -int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_temporary_channel_id"))) TS_OpenChannelV2_get_temporary_channel_id(uint64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *OpenChannelV2_get_temporary_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKCommonOpenChannelFields ret_var = OpenChannelV2_get_common_fields(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_OpenChannelV2_set_temporary_channel_id"))) TS_OpenChannelV2_set_temporary_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_OpenChannelV2_set_common_fields"))) TS_OpenChannelV2_set_common_fields(uint64_t this_ptr, uint64_t val) { LDKOpenChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - OpenChannelV2_set_temporary_channel_id(&this_ptr_conv, val_ref); + LDKCommonOpenChannelFields val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = CommonOpenChannelFields_clone(&val_conv); + OpenChannelV2_set_common_fields(&this_ptr_conv, val_conv); } int32_t __attribute__((export_name("TS_OpenChannelV2_get_funding_feerate_sat_per_1000_weight"))) TS_OpenChannelV2_get_funding_feerate_sat_per_1000_weight(uint64_t this_ptr) { @@ -41828,139 +45917,6 @@ void __attribute__((export_name("TS_OpenChannelV2_set_funding_feerate_sat_per_1 OpenChannelV2_set_funding_feerate_sat_per_1000_weight(&this_ptr_conv, val); } -int32_t __attribute__((export_name("TS_OpenChannelV2_get_commitment_feerate_sat_per_1000_weight"))) TS_OpenChannelV2_get_commitment_feerate_sat_per_1000_weight(uint64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int32_t ret_conv = OpenChannelV2_get_commitment_feerate_sat_per_1000_weight(&this_ptr_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_OpenChannelV2_set_commitment_feerate_sat_per_1000_weight"))) TS_OpenChannelV2_set_commitment_feerate_sat_per_1000_weight(uint64_t this_ptr, int32_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_commitment_feerate_sat_per_1000_weight(&this_ptr_conv, val); -} - -int64_t __attribute__((export_name("TS_OpenChannelV2_get_funding_satoshis"))) TS_OpenChannelV2_get_funding_satoshis(uint64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannelV2_get_funding_satoshis(&this_ptr_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_OpenChannelV2_set_funding_satoshis"))) TS_OpenChannelV2_set_funding_satoshis(uint64_t this_ptr, int64_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_funding_satoshis(&this_ptr_conv, val); -} - -int64_t __attribute__((export_name("TS_OpenChannelV2_get_dust_limit_satoshis"))) TS_OpenChannelV2_get_dust_limit_satoshis(uint64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannelV2_get_dust_limit_satoshis(&this_ptr_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_OpenChannelV2_set_dust_limit_satoshis"))) TS_OpenChannelV2_set_dust_limit_satoshis(uint64_t this_ptr, int64_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_dust_limit_satoshis(&this_ptr_conv, val); -} - -int64_t __attribute__((export_name("TS_OpenChannelV2_get_max_htlc_value_in_flight_msat"))) TS_OpenChannelV2_get_max_htlc_value_in_flight_msat(uint64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannelV2_get_max_htlc_value_in_flight_msat(&this_ptr_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_OpenChannelV2_set_max_htlc_value_in_flight_msat"))) TS_OpenChannelV2_set_max_htlc_value_in_flight_msat(uint64_t this_ptr, int64_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); -} - -int64_t __attribute__((export_name("TS_OpenChannelV2_get_htlc_minimum_msat"))) TS_OpenChannelV2_get_htlc_minimum_msat(uint64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannelV2_get_htlc_minimum_msat(&this_ptr_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_OpenChannelV2_set_htlc_minimum_msat"))) TS_OpenChannelV2_set_htlc_minimum_msat(uint64_t this_ptr, int64_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_htlc_minimum_msat(&this_ptr_conv, val); -} - -int16_t __attribute__((export_name("TS_OpenChannelV2_get_to_self_delay"))) TS_OpenChannelV2_get_to_self_delay(uint64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int16_t ret_conv = OpenChannelV2_get_to_self_delay(&this_ptr_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_OpenChannelV2_set_to_self_delay"))) TS_OpenChannelV2_set_to_self_delay(uint64_t this_ptr, int16_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_to_self_delay(&this_ptr_conv, val); -} - -int16_t __attribute__((export_name("TS_OpenChannelV2_get_max_accepted_htlcs"))) TS_OpenChannelV2_get_max_accepted_htlcs(uint64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int16_t ret_conv = OpenChannelV2_get_max_accepted_htlcs(&this_ptr_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_OpenChannelV2_set_max_accepted_htlcs"))) TS_OpenChannelV2_set_max_accepted_htlcs(uint64_t this_ptr, int16_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_max_accepted_htlcs(&this_ptr_conv, val); -} - int32_t __attribute__((export_name("TS_OpenChannelV2_get_locktime"))) TS_OpenChannelV2_get_locktime(uint64_t this_ptr) { LDKOpenChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -41980,144 +45936,6 @@ void __attribute__((export_name("TS_OpenChannelV2_set_locktime"))) TS_OpenChann OpenChannelV2_set_locktime(&this_ptr_conv, val); } -int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_funding_pubkey"))) TS_OpenChannelV2_get_funding_pubkey(uint64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannelV2_get_funding_pubkey(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void __attribute__((export_name("TS_OpenChannelV2_set_funding_pubkey"))) TS_OpenChannelV2_set_funding_pubkey(uint64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannelV2_set_funding_pubkey(&this_ptr_conv, val_ref); -} - -int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_revocation_basepoint"))) TS_OpenChannelV2_get_revocation_basepoint(uint64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannelV2_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void __attribute__((export_name("TS_OpenChannelV2_set_revocation_basepoint"))) TS_OpenChannelV2_set_revocation_basepoint(uint64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannelV2_set_revocation_basepoint(&this_ptr_conv, val_ref); -} - -int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_payment_basepoint"))) TS_OpenChannelV2_get_payment_basepoint(uint64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannelV2_get_payment_basepoint(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void __attribute__((export_name("TS_OpenChannelV2_set_payment_basepoint"))) TS_OpenChannelV2_set_payment_basepoint(uint64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannelV2_set_payment_basepoint(&this_ptr_conv, val_ref); -} - -int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_delayed_payment_basepoint"))) TS_OpenChannelV2_get_delayed_payment_basepoint(uint64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannelV2_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void __attribute__((export_name("TS_OpenChannelV2_set_delayed_payment_basepoint"))) TS_OpenChannelV2_set_delayed_payment_basepoint(uint64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannelV2_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); -} - -int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_htlc_basepoint"))) TS_OpenChannelV2_get_htlc_basepoint(uint64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannelV2_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void __attribute__((export_name("TS_OpenChannelV2_set_htlc_basepoint"))) TS_OpenChannelV2_set_htlc_basepoint(uint64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannelV2_set_htlc_basepoint(&this_ptr_conv, val_ref); -} - -int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_first_per_commitment_point"))) TS_OpenChannelV2_get_first_per_commitment_point(uint64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannelV2_get_first_per_commitment_point(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void __attribute__((export_name("TS_OpenChannelV2_set_first_per_commitment_point"))) TS_OpenChannelV2_set_first_per_commitment_point(uint64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannelV2_set_first_per_commitment_point(&this_ptr_conv, val_ref); -} - int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_second_per_commitment_point"))) TS_OpenChannelV2_get_second_per_commitment_point(uint64_t this_ptr) { LDKOpenChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -42141,77 +45959,6 @@ void __attribute__((export_name("TS_OpenChannelV2_set_second_per_commitment_poi OpenChannelV2_set_second_per_commitment_point(&this_ptr_conv, val_ref); } -int8_t __attribute__((export_name("TS_OpenChannelV2_get_channel_flags"))) TS_OpenChannelV2_get_channel_flags(uint64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_t ret_conv = OpenChannelV2_get_channel_flags(&this_ptr_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_OpenChannelV2_set_channel_flags"))) TS_OpenChannelV2_set_channel_flags(uint64_t this_ptr, int8_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_channel_flags(&this_ptr_conv, val); -} - -uint64_t __attribute__((export_name("TS_OpenChannelV2_get_shutdown_scriptpubkey"))) TS_OpenChannelV2_get_shutdown_scriptpubkey(uint64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ"); - *ret_copy = OpenChannelV2_get_shutdown_scriptpubkey(&this_ptr_conv); - uint64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -void __attribute__((export_name("TS_OpenChannelV2_set_shutdown_scriptpubkey"))) TS_OpenChannelV2_set_shutdown_scriptpubkey(uint64_t this_ptr, uint64_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - void* val_ptr = untag_ptr(val); - CHECK_ACCESS(val_ptr); - LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr); - val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val)); - OpenChannelV2_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); -} - -uint64_t __attribute__((export_name("TS_OpenChannelV2_get_channel_type"))) TS_OpenChannelV2_get_channel_type(uint64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures ret_var = OpenChannelV2_get_channel_type(&this_ptr_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -void __attribute__((export_name("TS_OpenChannelV2_set_channel_type"))) TS_OpenChannelV2_set_channel_type(uint64_t this_ptr, uint64_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures val_conv; - val_conv.inner = untag_ptr(val); - val_conv.is_owned = ptr_is_owned(val); - CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); - val_conv = ChannelTypeFeatures_clone(&val_conv); - OpenChannelV2_set_channel_type(&this_ptr_conv, val_conv); -} - uint32_t __attribute__((export_name("TS_OpenChannelV2_get_require_confirmed_inputs"))) TS_OpenChannelV2_get_require_confirmed_inputs(uint64_t this_ptr) { LDKOpenChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -42232,45 +45979,17 @@ void __attribute__((export_name("TS_OpenChannelV2_set_require_confirmed_inputs" OpenChannelV2_set_require_confirmed_inputs(&this_ptr_conv, val_conv); } -uint64_t __attribute__((export_name("TS_OpenChannelV2_new"))) TS_OpenChannelV2_new(int8_tArray chain_hash_arg, int8_tArray temporary_channel_id_arg, int32_t funding_feerate_sat_per_1000_weight_arg, int32_t commitment_feerate_sat_per_1000_weight_arg, int64_t funding_satoshis_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int32_t locktime_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_tArray second_per_commitment_point_arg, int8_t channel_flags_arg, uint64_t shutdown_scriptpubkey_arg, uint64_t channel_type_arg, uint32_t require_confirmed_inputs_arg) { - LDKThirtyTwoBytes chain_hash_arg_ref; - CHECK(chain_hash_arg->arr_len == 32); - memcpy(chain_hash_arg_ref.data, chain_hash_arg->elems, 32); FREE(chain_hash_arg); - LDKThirtyTwoBytes temporary_channel_id_arg_ref; - CHECK(temporary_channel_id_arg->arr_len == 32); - memcpy(temporary_channel_id_arg_ref.data, temporary_channel_id_arg->elems, 32); FREE(temporary_channel_id_arg); - LDKPublicKey funding_pubkey_arg_ref; - CHECK(funding_pubkey_arg->arr_len == 33); - memcpy(funding_pubkey_arg_ref.compressed_form, funding_pubkey_arg->elems, 33); FREE(funding_pubkey_arg); - LDKPublicKey revocation_basepoint_arg_ref; - CHECK(revocation_basepoint_arg->arr_len == 33); - memcpy(revocation_basepoint_arg_ref.compressed_form, revocation_basepoint_arg->elems, 33); FREE(revocation_basepoint_arg); - LDKPublicKey payment_basepoint_arg_ref; - CHECK(payment_basepoint_arg->arr_len == 33); - memcpy(payment_basepoint_arg_ref.compressed_form, payment_basepoint_arg->elems, 33); FREE(payment_basepoint_arg); - LDKPublicKey delayed_payment_basepoint_arg_ref; - CHECK(delayed_payment_basepoint_arg->arr_len == 33); - memcpy(delayed_payment_basepoint_arg_ref.compressed_form, delayed_payment_basepoint_arg->elems, 33); FREE(delayed_payment_basepoint_arg); - LDKPublicKey htlc_basepoint_arg_ref; - CHECK(htlc_basepoint_arg->arr_len == 33); - memcpy(htlc_basepoint_arg_ref.compressed_form, htlc_basepoint_arg->elems, 33); FREE(htlc_basepoint_arg); - LDKPublicKey first_per_commitment_point_arg_ref; - CHECK(first_per_commitment_point_arg->arr_len == 33); - memcpy(first_per_commitment_point_arg_ref.compressed_form, first_per_commitment_point_arg->elems, 33); FREE(first_per_commitment_point_arg); +uint64_t __attribute__((export_name("TS_OpenChannelV2_new"))) TS_OpenChannelV2_new(uint64_t common_fields_arg, int32_t funding_feerate_sat_per_1000_weight_arg, int32_t locktime_arg, int8_tArray second_per_commitment_point_arg, uint32_t require_confirmed_inputs_arg) { + LDKCommonOpenChannelFields common_fields_arg_conv; + common_fields_arg_conv.inner = untag_ptr(common_fields_arg); + common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv); + common_fields_arg_conv = CommonOpenChannelFields_clone(&common_fields_arg_conv); LDKPublicKey second_per_commitment_point_arg_ref; CHECK(second_per_commitment_point_arg->arr_len == 33); memcpy(second_per_commitment_point_arg_ref.compressed_form, second_per_commitment_point_arg->elems, 33); FREE(second_per_commitment_point_arg); - void* shutdown_scriptpubkey_arg_ptr = untag_ptr(shutdown_scriptpubkey_arg); - CHECK_ACCESS(shutdown_scriptpubkey_arg_ptr); - LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg_conv = *(LDKCOption_CVec_u8ZZ*)(shutdown_scriptpubkey_arg_ptr); - shutdown_scriptpubkey_arg_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(shutdown_scriptpubkey_arg)); - LDKChannelTypeFeatures channel_type_arg_conv; - channel_type_arg_conv.inner = untag_ptr(channel_type_arg); - channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv); - channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv); LDKCOption_NoneZ require_confirmed_inputs_arg_conv = LDKCOption_NoneZ_from_js(require_confirmed_inputs_arg); - LDKOpenChannelV2 ret_var = OpenChannelV2_new(chain_hash_arg_ref, temporary_channel_id_arg_ref, funding_feerate_sat_per_1000_weight_arg, commitment_feerate_sat_per_1000_weight_arg, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, to_self_delay_arg, max_accepted_htlcs_arg, locktime_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, second_per_commitment_point_arg_ref, channel_flags_arg, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv, require_confirmed_inputs_arg_conv); + LDKOpenChannelV2 ret_var = OpenChannelV2_new(common_fields_arg_conv, funding_feerate_sat_per_1000_weight_arg, locktime_arg, second_per_commitment_point_arg_ref, require_confirmed_inputs_arg_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -42332,183 +46051,168 @@ jboolean __attribute__((export_name("TS_OpenChannelV2_eq"))) TS_OpenChannelV2_e return ret_conv; } -void __attribute__((export_name("TS_AcceptChannel_free"))) TS_AcceptChannel_free(uint64_t this_obj) { - LDKAcceptChannel this_obj_conv; +void __attribute__((export_name("TS_CommonAcceptChannelFields_free"))) TS_CommonAcceptChannelFields_free(uint64_t this_obj) { + LDKCommonAcceptChannelFields this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); this_obj_conv.is_owned = ptr_is_owned(this_obj); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - AcceptChannel_free(this_obj_conv); + CommonAcceptChannelFields_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_AcceptChannel_get_temporary_channel_id"))) TS_AcceptChannel_get_temporary_channel_id(uint64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +uint64_t __attribute__((export_name("TS_CommonAcceptChannelFields_get_temporary_channel_id"))) TS_CommonAcceptChannelFields_get_temporary_channel_id(uint64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *AcceptChannel_get_temporary_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = CommonAcceptChannelFields_get_temporary_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_AcceptChannel_set_temporary_channel_id"))) TS_AcceptChannel_set_temporary_channel_id(uint64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonAcceptChannelFields_set_temporary_channel_id"))) TS_CommonAcceptChannelFields_set_temporary_channel_id(uint64_t this_ptr, uint64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - AcceptChannel_set_temporary_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + CommonAcceptChannelFields_set_temporary_channel_id(&this_ptr_conv, val_conv); } -int64_t __attribute__((export_name("TS_AcceptChannel_get_dust_limit_satoshis"))) TS_AcceptChannel_get_dust_limit_satoshis(uint64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int64_t __attribute__((export_name("TS_CommonAcceptChannelFields_get_dust_limit_satoshis"))) TS_CommonAcceptChannelFields_get_dust_limit_satoshis(uint64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannel_get_dust_limit_satoshis(&this_ptr_conv); + int64_t ret_conv = CommonAcceptChannelFields_get_dust_limit_satoshis(&this_ptr_conv); return ret_conv; } -void __attribute__((export_name("TS_AcceptChannel_set_dust_limit_satoshis"))) TS_AcceptChannel_set_dust_limit_satoshis(uint64_t this_ptr, int64_t val) { - LDKAcceptChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonAcceptChannelFields_set_dust_limit_satoshis"))) TS_CommonAcceptChannelFields_set_dust_limit_satoshis(uint64_t this_ptr, int64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_dust_limit_satoshis(&this_ptr_conv, val); + CommonAcceptChannelFields_set_dust_limit_satoshis(&this_ptr_conv, val); } -int64_t __attribute__((export_name("TS_AcceptChannel_get_max_htlc_value_in_flight_msat"))) TS_AcceptChannel_get_max_htlc_value_in_flight_msat(uint64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int64_t __attribute__((export_name("TS_CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat"))) TS_CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat(uint64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannel_get_max_htlc_value_in_flight_msat(&this_ptr_conv); + int64_t ret_conv = CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat(&this_ptr_conv); return ret_conv; } -void __attribute__((export_name("TS_AcceptChannel_set_max_htlc_value_in_flight_msat"))) TS_AcceptChannel_set_max_htlc_value_in_flight_msat(uint64_t this_ptr, int64_t val) { - LDKAcceptChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat"))) TS_CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat(uint64_t this_ptr, int64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); + CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); } -int64_t __attribute__((export_name("TS_AcceptChannel_get_channel_reserve_satoshis"))) TS_AcceptChannel_get_channel_reserve_satoshis(uint64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int64_t __attribute__((export_name("TS_CommonAcceptChannelFields_get_htlc_minimum_msat"))) TS_CommonAcceptChannelFields_get_htlc_minimum_msat(uint64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannel_get_channel_reserve_satoshis(&this_ptr_conv); + int64_t ret_conv = CommonAcceptChannelFields_get_htlc_minimum_msat(&this_ptr_conv); return ret_conv; } -void __attribute__((export_name("TS_AcceptChannel_set_channel_reserve_satoshis"))) TS_AcceptChannel_set_channel_reserve_satoshis(uint64_t this_ptr, int64_t val) { - LDKAcceptChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonAcceptChannelFields_set_htlc_minimum_msat"))) TS_CommonAcceptChannelFields_set_htlc_minimum_msat(uint64_t this_ptr, int64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_channel_reserve_satoshis(&this_ptr_conv, val); + CommonAcceptChannelFields_set_htlc_minimum_msat(&this_ptr_conv, val); } -int64_t __attribute__((export_name("TS_AcceptChannel_get_htlc_minimum_msat"))) TS_AcceptChannel_get_htlc_minimum_msat(uint64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int32_t __attribute__((export_name("TS_CommonAcceptChannelFields_get_minimum_depth"))) TS_CommonAcceptChannelFields_get_minimum_depth(uint64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannel_get_htlc_minimum_msat(&this_ptr_conv); + int32_t ret_conv = CommonAcceptChannelFields_get_minimum_depth(&this_ptr_conv); return ret_conv; } -void __attribute__((export_name("TS_AcceptChannel_set_htlc_minimum_msat"))) TS_AcceptChannel_set_htlc_minimum_msat(uint64_t this_ptr, int64_t val) { - LDKAcceptChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonAcceptChannelFields_set_minimum_depth"))) TS_CommonAcceptChannelFields_set_minimum_depth(uint64_t this_ptr, int32_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_htlc_minimum_msat(&this_ptr_conv, val); + CommonAcceptChannelFields_set_minimum_depth(&this_ptr_conv, val); } -int32_t __attribute__((export_name("TS_AcceptChannel_get_minimum_depth"))) TS_AcceptChannel_get_minimum_depth(uint64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int16_t __attribute__((export_name("TS_CommonAcceptChannelFields_get_to_self_delay"))) TS_CommonAcceptChannelFields_get_to_self_delay(uint64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int32_t ret_conv = AcceptChannel_get_minimum_depth(&this_ptr_conv); + int16_t ret_conv = CommonAcceptChannelFields_get_to_self_delay(&this_ptr_conv); return ret_conv; } -void __attribute__((export_name("TS_AcceptChannel_set_minimum_depth"))) TS_AcceptChannel_set_minimum_depth(uint64_t this_ptr, int32_t val) { - LDKAcceptChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonAcceptChannelFields_set_to_self_delay"))) TS_CommonAcceptChannelFields_set_to_self_delay(uint64_t this_ptr, int16_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_minimum_depth(&this_ptr_conv, val); + CommonAcceptChannelFields_set_to_self_delay(&this_ptr_conv, val); } -int16_t __attribute__((export_name("TS_AcceptChannel_get_to_self_delay"))) TS_AcceptChannel_get_to_self_delay(uint64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int16_t __attribute__((export_name("TS_CommonAcceptChannelFields_get_max_accepted_htlcs"))) TS_CommonAcceptChannelFields_get_max_accepted_htlcs(uint64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int16_t ret_conv = AcceptChannel_get_to_self_delay(&this_ptr_conv); + int16_t ret_conv = CommonAcceptChannelFields_get_max_accepted_htlcs(&this_ptr_conv); return ret_conv; } -void __attribute__((export_name("TS_AcceptChannel_set_to_self_delay"))) TS_AcceptChannel_set_to_self_delay(uint64_t this_ptr, int16_t val) { - LDKAcceptChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonAcceptChannelFields_set_max_accepted_htlcs"))) TS_CommonAcceptChannelFields_set_max_accepted_htlcs(uint64_t this_ptr, int16_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_to_self_delay(&this_ptr_conv, val); + CommonAcceptChannelFields_set_max_accepted_htlcs(&this_ptr_conv, val); } -int16_t __attribute__((export_name("TS_AcceptChannel_get_max_accepted_htlcs"))) TS_AcceptChannel_get_max_accepted_htlcs(uint64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int16_t ret_conv = AcceptChannel_get_max_accepted_htlcs(&this_ptr_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_AcceptChannel_set_max_accepted_htlcs"))) TS_AcceptChannel_set_max_accepted_htlcs(uint64_t this_ptr, int16_t val) { - LDKAcceptChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannel_set_max_accepted_htlcs(&this_ptr_conv, val); -} - -int8_tArray __attribute__((export_name("TS_AcceptChannel_get_funding_pubkey"))) TS_AcceptChannel_get_funding_pubkey(uint64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int8_tArray __attribute__((export_name("TS_CommonAcceptChannelFields_get_funding_pubkey"))) TS_CommonAcceptChannelFields_get_funding_pubkey(uint64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannel_get_funding_pubkey(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonAcceptChannelFields_get_funding_pubkey(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void __attribute__((export_name("TS_AcceptChannel_set_funding_pubkey"))) TS_AcceptChannel_set_funding_pubkey(uint64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonAcceptChannelFields_set_funding_pubkey"))) TS_CommonAcceptChannelFields_set_funding_pubkey(uint64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42516,22 +46220,22 @@ void __attribute__((export_name("TS_AcceptChannel_set_funding_pubkey"))) TS_Acc LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannel_set_funding_pubkey(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_funding_pubkey(&this_ptr_conv, val_ref); } -int8_tArray __attribute__((export_name("TS_AcceptChannel_get_revocation_basepoint"))) TS_AcceptChannel_get_revocation_basepoint(uint64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int8_tArray __attribute__((export_name("TS_CommonAcceptChannelFields_get_revocation_basepoint"))) TS_CommonAcceptChannelFields_get_revocation_basepoint(uint64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannel_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonAcceptChannelFields_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void __attribute__((export_name("TS_AcceptChannel_set_revocation_basepoint"))) TS_AcceptChannel_set_revocation_basepoint(uint64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonAcceptChannelFields_set_revocation_basepoint"))) TS_CommonAcceptChannelFields_set_revocation_basepoint(uint64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42539,22 +46243,22 @@ void __attribute__((export_name("TS_AcceptChannel_set_revocation_basepoint"))) LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannel_set_revocation_basepoint(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_revocation_basepoint(&this_ptr_conv, val_ref); } -int8_tArray __attribute__((export_name("TS_AcceptChannel_get_payment_point"))) TS_AcceptChannel_get_payment_point(uint64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int8_tArray __attribute__((export_name("TS_CommonAcceptChannelFields_get_payment_basepoint"))) TS_CommonAcceptChannelFields_get_payment_basepoint(uint64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannel_get_payment_point(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonAcceptChannelFields_get_payment_basepoint(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void __attribute__((export_name("TS_AcceptChannel_set_payment_point"))) TS_AcceptChannel_set_payment_point(uint64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonAcceptChannelFields_set_payment_basepoint"))) TS_CommonAcceptChannelFields_set_payment_basepoint(uint64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42562,22 +46266,22 @@ void __attribute__((export_name("TS_AcceptChannel_set_payment_point"))) TS_Acce LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannel_set_payment_point(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_payment_basepoint(&this_ptr_conv, val_ref); } -int8_tArray __attribute__((export_name("TS_AcceptChannel_get_delayed_payment_basepoint"))) TS_AcceptChannel_get_delayed_payment_basepoint(uint64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int8_tArray __attribute__((export_name("TS_CommonAcceptChannelFields_get_delayed_payment_basepoint"))) TS_CommonAcceptChannelFields_get_delayed_payment_basepoint(uint64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannel_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonAcceptChannelFields_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void __attribute__((export_name("TS_AcceptChannel_set_delayed_payment_basepoint"))) TS_AcceptChannel_set_delayed_payment_basepoint(uint64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonAcceptChannelFields_set_delayed_payment_basepoint"))) TS_CommonAcceptChannelFields_set_delayed_payment_basepoint(uint64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42585,22 +46289,22 @@ void __attribute__((export_name("TS_AcceptChannel_set_delayed_payment_basepoint LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannel_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); } -int8_tArray __attribute__((export_name("TS_AcceptChannel_get_htlc_basepoint"))) TS_AcceptChannel_get_htlc_basepoint(uint64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int8_tArray __attribute__((export_name("TS_CommonAcceptChannelFields_get_htlc_basepoint"))) TS_CommonAcceptChannelFields_get_htlc_basepoint(uint64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannel_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonAcceptChannelFields_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void __attribute__((export_name("TS_AcceptChannel_set_htlc_basepoint"))) TS_AcceptChannel_set_htlc_basepoint(uint64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonAcceptChannelFields_set_htlc_basepoint"))) TS_CommonAcceptChannelFields_set_htlc_basepoint(uint64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42608,22 +46312,22 @@ void __attribute__((export_name("TS_AcceptChannel_set_htlc_basepoint"))) TS_Acc LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannel_set_htlc_basepoint(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_htlc_basepoint(&this_ptr_conv, val_ref); } -int8_tArray __attribute__((export_name("TS_AcceptChannel_get_first_per_commitment_point"))) TS_AcceptChannel_get_first_per_commitment_point(uint64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int8_tArray __attribute__((export_name("TS_CommonAcceptChannelFields_get_first_per_commitment_point"))) TS_CommonAcceptChannelFields_get_first_per_commitment_point(uint64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannel_get_first_per_commitment_point(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonAcceptChannelFields_get_first_per_commitment_point(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void __attribute__((export_name("TS_AcceptChannel_set_first_per_commitment_point"))) TS_AcceptChannel_set_first_per_commitment_point(uint64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonAcceptChannelFields_set_first_per_commitment_point"))) TS_CommonAcceptChannelFields_set_first_per_commitment_point(uint64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42631,23 +46335,23 @@ void __attribute__((export_name("TS_AcceptChannel_set_first_per_commitment_poin LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannel_set_first_per_commitment_point(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_first_per_commitment_point(&this_ptr_conv, val_ref); } -uint64_t __attribute__((export_name("TS_AcceptChannel_get_shutdown_scriptpubkey"))) TS_AcceptChannel_get_shutdown_scriptpubkey(uint64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +uint64_t __attribute__((export_name("TS_CommonAcceptChannelFields_get_shutdown_scriptpubkey"))) TS_CommonAcceptChannelFields_get_shutdown_scriptpubkey(uint64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ"); - *ret_copy = AcceptChannel_get_shutdown_scriptpubkey(&this_ptr_conv); + *ret_copy = CommonAcceptChannelFields_get_shutdown_scriptpubkey(&this_ptr_conv); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -void __attribute__((export_name("TS_AcceptChannel_set_shutdown_scriptpubkey"))) TS_AcceptChannel_set_shutdown_scriptpubkey(uint64_t this_ptr, uint64_t val) { - LDKAcceptChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonAcceptChannelFields_set_shutdown_scriptpubkey"))) TS_CommonAcceptChannelFields_set_shutdown_scriptpubkey(uint64_t this_ptr, uint64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42656,24 +46360,24 @@ void __attribute__((export_name("TS_AcceptChannel_set_shutdown_scriptpubkey"))) CHECK_ACCESS(val_ptr); LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr); val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val)); - AcceptChannel_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); + CommonAcceptChannelFields_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); } -uint64_t __attribute__((export_name("TS_AcceptChannel_get_channel_type"))) TS_AcceptChannel_get_channel_type(uint64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +uint64_t __attribute__((export_name("TS_CommonAcceptChannelFields_get_channel_type"))) TS_CommonAcceptChannelFields_get_channel_type(uint64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures ret_var = AcceptChannel_get_channel_type(&this_ptr_conv); + LDKChannelTypeFeatures ret_var = CommonAcceptChannelFields_get_channel_type(&this_ptr_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -void __attribute__((export_name("TS_AcceptChannel_set_channel_type"))) TS_AcceptChannel_set_channel_type(uint64_t this_ptr, uint64_t val) { - LDKAcceptChannel this_ptr_conv; +void __attribute__((export_name("TS_CommonAcceptChannelFields_set_channel_type"))) TS_CommonAcceptChannelFields_set_channel_type(uint64_t this_ptr, uint64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42683,22 +46387,24 @@ void __attribute__((export_name("TS_AcceptChannel_set_channel_type"))) TS_Accep val_conv.is_owned = ptr_is_owned(val); CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); val_conv = ChannelTypeFeatures_clone(&val_conv); - AcceptChannel_set_channel_type(&this_ptr_conv, val_conv); + CommonAcceptChannelFields_set_channel_type(&this_ptr_conv, val_conv); } -uint64_t __attribute__((export_name("TS_AcceptChannel_new"))) TS_AcceptChannel_new(int8_tArray temporary_channel_id_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t channel_reserve_satoshis_arg, int64_t htlc_minimum_msat_arg, int32_t minimum_depth_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_point_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, uint64_t shutdown_scriptpubkey_arg, uint64_t channel_type_arg) { - LDKThirtyTwoBytes temporary_channel_id_arg_ref; - CHECK(temporary_channel_id_arg->arr_len == 32); - memcpy(temporary_channel_id_arg_ref.data, temporary_channel_id_arg->elems, 32); FREE(temporary_channel_id_arg); +uint64_t __attribute__((export_name("TS_CommonAcceptChannelFields_new"))) TS_CommonAcceptChannelFields_new(uint64_t temporary_channel_id_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int32_t minimum_depth_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, uint64_t shutdown_scriptpubkey_arg, uint64_t channel_type_arg) { + LDKChannelId temporary_channel_id_arg_conv; + temporary_channel_id_arg_conv.inner = untag_ptr(temporary_channel_id_arg); + temporary_channel_id_arg_conv.is_owned = ptr_is_owned(temporary_channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_arg_conv); + temporary_channel_id_arg_conv = ChannelId_clone(&temporary_channel_id_arg_conv); LDKPublicKey funding_pubkey_arg_ref; CHECK(funding_pubkey_arg->arr_len == 33); memcpy(funding_pubkey_arg_ref.compressed_form, funding_pubkey_arg->elems, 33); FREE(funding_pubkey_arg); LDKPublicKey revocation_basepoint_arg_ref; CHECK(revocation_basepoint_arg->arr_len == 33); memcpy(revocation_basepoint_arg_ref.compressed_form, revocation_basepoint_arg->elems, 33); FREE(revocation_basepoint_arg); - LDKPublicKey payment_point_arg_ref; - CHECK(payment_point_arg->arr_len == 33); - memcpy(payment_point_arg_ref.compressed_form, payment_point_arg->elems, 33); FREE(payment_point_arg); + LDKPublicKey payment_basepoint_arg_ref; + CHECK(payment_basepoint_arg->arr_len == 33); + memcpy(payment_basepoint_arg_ref.compressed_form, payment_basepoint_arg->elems, 33); FREE(payment_basepoint_arg); LDKPublicKey delayed_payment_basepoint_arg_ref; CHECK(delayed_payment_basepoint_arg->arr_len == 33); memcpy(delayed_payment_basepoint_arg_ref.compressed_form, delayed_payment_basepoint_arg->elems, 33); FREE(delayed_payment_basepoint_arg); @@ -42717,7 +46423,129 @@ uint64_t __attribute__((export_name("TS_AcceptChannel_new"))) TS_AcceptChannel_ channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv); channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv); - LDKAcceptChannel ret_var = AcceptChannel_new(temporary_channel_id_arg_ref, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_point_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv); + LDKCommonAcceptChannelFields ret_var = CommonAcceptChannelFields_new(temporary_channel_id_arg_conv, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t CommonAcceptChannelFields_clone_ptr(LDKCommonAcceptChannelFields *NONNULL_PTR arg) { + LDKCommonAcceptChannelFields ret_var = CommonAcceptChannelFields_clone(arg); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t __attribute__((export_name("TS_CommonAcceptChannelFields_clone_ptr"))) TS_CommonAcceptChannelFields_clone_ptr(uint64_t arg) { + LDKCommonAcceptChannelFields arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = CommonAcceptChannelFields_clone_ptr(&arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_CommonAcceptChannelFields_clone"))) TS_CommonAcceptChannelFields_clone(uint64_t orig) { + LDKCommonAcceptChannelFields orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKCommonAcceptChannelFields ret_var = CommonAcceptChannelFields_clone(&orig_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t __attribute__((export_name("TS_CommonAcceptChannelFields_hash"))) TS_CommonAcceptChannelFields_hash(uint64_t o) { + LDKCommonAcceptChannelFields o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = CommonAcceptChannelFields_hash(&o_conv); + return ret_conv; +} + +jboolean __attribute__((export_name("TS_CommonAcceptChannelFields_eq"))) TS_CommonAcceptChannelFields_eq(uint64_t a, uint64_t b) { + LDKCommonAcceptChannelFields a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKCommonAcceptChannelFields b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = CommonAcceptChannelFields_eq(&a_conv, &b_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_AcceptChannel_free"))) TS_AcceptChannel_free(uint64_t this_obj) { + LDKAcceptChannel this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + AcceptChannel_free(this_obj_conv); +} + +uint64_t __attribute__((export_name("TS_AcceptChannel_get_common_fields"))) TS_AcceptChannel_get_common_fields(uint64_t this_ptr) { + LDKAcceptChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCommonAcceptChannelFields ret_var = AcceptChannel_get_common_fields(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void __attribute__((export_name("TS_AcceptChannel_set_common_fields"))) TS_AcceptChannel_set_common_fields(uint64_t this_ptr, uint64_t val) { + LDKAcceptChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCommonAcceptChannelFields val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = CommonAcceptChannelFields_clone(&val_conv); + AcceptChannel_set_common_fields(&this_ptr_conv, val_conv); +} + +int64_t __attribute__((export_name("TS_AcceptChannel_get_channel_reserve_satoshis"))) TS_AcceptChannel_get_channel_reserve_satoshis(uint64_t this_ptr) { + LDKAcceptChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int64_t ret_conv = AcceptChannel_get_channel_reserve_satoshis(&this_ptr_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_AcceptChannel_set_channel_reserve_satoshis"))) TS_AcceptChannel_set_channel_reserve_satoshis(uint64_t this_ptr, int64_t val) { + LDKAcceptChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + AcceptChannel_set_channel_reserve_satoshis(&this_ptr_conv, val); +} + +uint64_t __attribute__((export_name("TS_AcceptChannel_new"))) TS_AcceptChannel_new(uint64_t common_fields_arg, int64_t channel_reserve_satoshis_arg) { + LDKCommonAcceptChannelFields common_fields_arg_conv; + common_fields_arg_conv.inner = untag_ptr(common_fields_arg); + common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv); + common_fields_arg_conv = CommonAcceptChannelFields_clone(&common_fields_arg_conv); + LDKAcceptChannel ret_var = AcceptChannel_new(common_fields_arg_conv, channel_reserve_satoshis_arg); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -42787,27 +46615,31 @@ void __attribute__((export_name("TS_AcceptChannelV2_free"))) TS_AcceptChannelV2 AcceptChannelV2_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_AcceptChannelV2_get_temporary_channel_id"))) TS_AcceptChannelV2_get_temporary_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_AcceptChannelV2_get_common_fields"))) TS_AcceptChannelV2_get_common_fields(uint64_t this_ptr) { LDKAcceptChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *AcceptChannelV2_get_temporary_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKCommonAcceptChannelFields ret_var = AcceptChannelV2_get_common_fields(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_AcceptChannelV2_set_temporary_channel_id"))) TS_AcceptChannelV2_set_temporary_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_AcceptChannelV2_set_common_fields"))) TS_AcceptChannelV2_set_common_fields(uint64_t this_ptr, uint64_t val) { LDKAcceptChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - AcceptChannelV2_set_temporary_channel_id(&this_ptr_conv, val_ref); + LDKCommonAcceptChannelFields val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = CommonAcceptChannelFields_clone(&val_conv); + AcceptChannelV2_set_common_fields(&this_ptr_conv, val_conv); } int64_t __attribute__((export_name("TS_AcceptChannelV2_get_funding_satoshis"))) TS_AcceptChannelV2_get_funding_satoshis(uint64_t this_ptr) { @@ -42829,258 +46661,6 @@ void __attribute__((export_name("TS_AcceptChannelV2_set_funding_satoshis"))) TS AcceptChannelV2_set_funding_satoshis(&this_ptr_conv, val); } -int64_t __attribute__((export_name("TS_AcceptChannelV2_get_dust_limit_satoshis"))) TS_AcceptChannelV2_get_dust_limit_satoshis(uint64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannelV2_get_dust_limit_satoshis(&this_ptr_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_AcceptChannelV2_set_dust_limit_satoshis"))) TS_AcceptChannelV2_set_dust_limit_satoshis(uint64_t this_ptr, int64_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_dust_limit_satoshis(&this_ptr_conv, val); -} - -int64_t __attribute__((export_name("TS_AcceptChannelV2_get_max_htlc_value_in_flight_msat"))) TS_AcceptChannelV2_get_max_htlc_value_in_flight_msat(uint64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannelV2_get_max_htlc_value_in_flight_msat(&this_ptr_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_AcceptChannelV2_set_max_htlc_value_in_flight_msat"))) TS_AcceptChannelV2_set_max_htlc_value_in_flight_msat(uint64_t this_ptr, int64_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); -} - -int64_t __attribute__((export_name("TS_AcceptChannelV2_get_htlc_minimum_msat"))) TS_AcceptChannelV2_get_htlc_minimum_msat(uint64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannelV2_get_htlc_minimum_msat(&this_ptr_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_AcceptChannelV2_set_htlc_minimum_msat"))) TS_AcceptChannelV2_set_htlc_minimum_msat(uint64_t this_ptr, int64_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_htlc_minimum_msat(&this_ptr_conv, val); -} - -int32_t __attribute__((export_name("TS_AcceptChannelV2_get_minimum_depth"))) TS_AcceptChannelV2_get_minimum_depth(uint64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int32_t ret_conv = AcceptChannelV2_get_minimum_depth(&this_ptr_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_AcceptChannelV2_set_minimum_depth"))) TS_AcceptChannelV2_set_minimum_depth(uint64_t this_ptr, int32_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_minimum_depth(&this_ptr_conv, val); -} - -int16_t __attribute__((export_name("TS_AcceptChannelV2_get_to_self_delay"))) TS_AcceptChannelV2_get_to_self_delay(uint64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int16_t ret_conv = AcceptChannelV2_get_to_self_delay(&this_ptr_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_AcceptChannelV2_set_to_self_delay"))) TS_AcceptChannelV2_set_to_self_delay(uint64_t this_ptr, int16_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_to_self_delay(&this_ptr_conv, val); -} - -int16_t __attribute__((export_name("TS_AcceptChannelV2_get_max_accepted_htlcs"))) TS_AcceptChannelV2_get_max_accepted_htlcs(uint64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int16_t ret_conv = AcceptChannelV2_get_max_accepted_htlcs(&this_ptr_conv); - return ret_conv; -} - -void __attribute__((export_name("TS_AcceptChannelV2_set_max_accepted_htlcs"))) TS_AcceptChannelV2_set_max_accepted_htlcs(uint64_t this_ptr, int16_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_max_accepted_htlcs(&this_ptr_conv, val); -} - -int8_tArray __attribute__((export_name("TS_AcceptChannelV2_get_funding_pubkey"))) TS_AcceptChannelV2_get_funding_pubkey(uint64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannelV2_get_funding_pubkey(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void __attribute__((export_name("TS_AcceptChannelV2_set_funding_pubkey"))) TS_AcceptChannelV2_set_funding_pubkey(uint64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannelV2_set_funding_pubkey(&this_ptr_conv, val_ref); -} - -int8_tArray __attribute__((export_name("TS_AcceptChannelV2_get_revocation_basepoint"))) TS_AcceptChannelV2_get_revocation_basepoint(uint64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannelV2_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void __attribute__((export_name("TS_AcceptChannelV2_set_revocation_basepoint"))) TS_AcceptChannelV2_set_revocation_basepoint(uint64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannelV2_set_revocation_basepoint(&this_ptr_conv, val_ref); -} - -int8_tArray __attribute__((export_name("TS_AcceptChannelV2_get_payment_basepoint"))) TS_AcceptChannelV2_get_payment_basepoint(uint64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannelV2_get_payment_basepoint(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void __attribute__((export_name("TS_AcceptChannelV2_set_payment_basepoint"))) TS_AcceptChannelV2_set_payment_basepoint(uint64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannelV2_set_payment_basepoint(&this_ptr_conv, val_ref); -} - -int8_tArray __attribute__((export_name("TS_AcceptChannelV2_get_delayed_payment_basepoint"))) TS_AcceptChannelV2_get_delayed_payment_basepoint(uint64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannelV2_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void __attribute__((export_name("TS_AcceptChannelV2_set_delayed_payment_basepoint"))) TS_AcceptChannelV2_set_delayed_payment_basepoint(uint64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannelV2_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); -} - -int8_tArray __attribute__((export_name("TS_AcceptChannelV2_get_htlc_basepoint"))) TS_AcceptChannelV2_get_htlc_basepoint(uint64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannelV2_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void __attribute__((export_name("TS_AcceptChannelV2_set_htlc_basepoint"))) TS_AcceptChannelV2_set_htlc_basepoint(uint64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannelV2_set_htlc_basepoint(&this_ptr_conv, val_ref); -} - -int8_tArray __attribute__((export_name("TS_AcceptChannelV2_get_first_per_commitment_point"))) TS_AcceptChannelV2_get_first_per_commitment_point(uint64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannelV2_get_first_per_commitment_point(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void __attribute__((export_name("TS_AcceptChannelV2_set_first_per_commitment_point"))) TS_AcceptChannelV2_set_first_per_commitment_point(uint64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannelV2_set_first_per_commitment_point(&this_ptr_conv, val_ref); -} - int8_tArray __attribute__((export_name("TS_AcceptChannelV2_get_second_per_commitment_point"))) TS_AcceptChannelV2_get_second_per_commitment_point(uint64_t this_ptr) { LDKAcceptChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -43104,58 +46684,6 @@ void __attribute__((export_name("TS_AcceptChannelV2_set_second_per_commitment_p AcceptChannelV2_set_second_per_commitment_point(&this_ptr_conv, val_ref); } -uint64_t __attribute__((export_name("TS_AcceptChannelV2_get_shutdown_scriptpubkey"))) TS_AcceptChannelV2_get_shutdown_scriptpubkey(uint64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ"); - *ret_copy = AcceptChannelV2_get_shutdown_scriptpubkey(&this_ptr_conv); - uint64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -void __attribute__((export_name("TS_AcceptChannelV2_set_shutdown_scriptpubkey"))) TS_AcceptChannelV2_set_shutdown_scriptpubkey(uint64_t this_ptr, uint64_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - void* val_ptr = untag_ptr(val); - CHECK_ACCESS(val_ptr); - LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr); - val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val)); - AcceptChannelV2_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); -} - -uint64_t __attribute__((export_name("TS_AcceptChannelV2_get_channel_type"))) TS_AcceptChannelV2_get_channel_type(uint64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures ret_var = AcceptChannelV2_get_channel_type(&this_ptr_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -void __attribute__((export_name("TS_AcceptChannelV2_set_channel_type"))) TS_AcceptChannelV2_set_channel_type(uint64_t this_ptr, uint64_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures val_conv; - val_conv.inner = untag_ptr(val); - val_conv.is_owned = ptr_is_owned(val); - CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); - val_conv = ChannelTypeFeatures_clone(&val_conv); - AcceptChannelV2_set_channel_type(&this_ptr_conv, val_conv); -} - uint32_t __attribute__((export_name("TS_AcceptChannelV2_get_require_confirmed_inputs"))) TS_AcceptChannelV2_get_require_confirmed_inputs(uint64_t this_ptr) { LDKAcceptChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -43176,42 +46704,17 @@ void __attribute__((export_name("TS_AcceptChannelV2_set_require_confirmed_input AcceptChannelV2_set_require_confirmed_inputs(&this_ptr_conv, val_conv); } -uint64_t __attribute__((export_name("TS_AcceptChannelV2_new"))) TS_AcceptChannelV2_new(int8_tArray temporary_channel_id_arg, int64_t funding_satoshis_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int32_t minimum_depth_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_tArray second_per_commitment_point_arg, uint64_t shutdown_scriptpubkey_arg, uint64_t channel_type_arg, uint32_t require_confirmed_inputs_arg) { - LDKThirtyTwoBytes temporary_channel_id_arg_ref; - CHECK(temporary_channel_id_arg->arr_len == 32); - memcpy(temporary_channel_id_arg_ref.data, temporary_channel_id_arg->elems, 32); FREE(temporary_channel_id_arg); - LDKPublicKey funding_pubkey_arg_ref; - CHECK(funding_pubkey_arg->arr_len == 33); - memcpy(funding_pubkey_arg_ref.compressed_form, funding_pubkey_arg->elems, 33); FREE(funding_pubkey_arg); - LDKPublicKey revocation_basepoint_arg_ref; - CHECK(revocation_basepoint_arg->arr_len == 33); - memcpy(revocation_basepoint_arg_ref.compressed_form, revocation_basepoint_arg->elems, 33); FREE(revocation_basepoint_arg); - LDKPublicKey payment_basepoint_arg_ref; - CHECK(payment_basepoint_arg->arr_len == 33); - memcpy(payment_basepoint_arg_ref.compressed_form, payment_basepoint_arg->elems, 33); FREE(payment_basepoint_arg); - LDKPublicKey delayed_payment_basepoint_arg_ref; - CHECK(delayed_payment_basepoint_arg->arr_len == 33); - memcpy(delayed_payment_basepoint_arg_ref.compressed_form, delayed_payment_basepoint_arg->elems, 33); FREE(delayed_payment_basepoint_arg); - LDKPublicKey htlc_basepoint_arg_ref; - CHECK(htlc_basepoint_arg->arr_len == 33); - memcpy(htlc_basepoint_arg_ref.compressed_form, htlc_basepoint_arg->elems, 33); FREE(htlc_basepoint_arg); - LDKPublicKey first_per_commitment_point_arg_ref; - CHECK(first_per_commitment_point_arg->arr_len == 33); - memcpy(first_per_commitment_point_arg_ref.compressed_form, first_per_commitment_point_arg->elems, 33); FREE(first_per_commitment_point_arg); +uint64_t __attribute__((export_name("TS_AcceptChannelV2_new"))) TS_AcceptChannelV2_new(uint64_t common_fields_arg, int64_t funding_satoshis_arg, int8_tArray second_per_commitment_point_arg, uint32_t require_confirmed_inputs_arg) { + LDKCommonAcceptChannelFields common_fields_arg_conv; + common_fields_arg_conv.inner = untag_ptr(common_fields_arg); + common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv); + common_fields_arg_conv = CommonAcceptChannelFields_clone(&common_fields_arg_conv); LDKPublicKey second_per_commitment_point_arg_ref; CHECK(second_per_commitment_point_arg->arr_len == 33); memcpy(second_per_commitment_point_arg_ref.compressed_form, second_per_commitment_point_arg->elems, 33); FREE(second_per_commitment_point_arg); - void* shutdown_scriptpubkey_arg_ptr = untag_ptr(shutdown_scriptpubkey_arg); - CHECK_ACCESS(shutdown_scriptpubkey_arg_ptr); - LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg_conv = *(LDKCOption_CVec_u8ZZ*)(shutdown_scriptpubkey_arg_ptr); - shutdown_scriptpubkey_arg_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(shutdown_scriptpubkey_arg)); - LDKChannelTypeFeatures channel_type_arg_conv; - channel_type_arg_conv.inner = untag_ptr(channel_type_arg); - channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv); - channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv); LDKCOption_NoneZ require_confirmed_inputs_arg_conv = LDKCOption_NoneZ_from_js(require_confirmed_inputs_arg); - LDKAcceptChannelV2 ret_var = AcceptChannelV2_new(temporary_channel_id_arg_ref, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, second_per_commitment_point_arg_ref, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv, require_confirmed_inputs_arg_conv); + LDKAcceptChannelV2 ret_var = AcceptChannelV2_new(common_fields_arg_conv, funding_satoshis_arg, second_per_commitment_point_arg_ref, require_confirmed_inputs_arg_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -43281,27 +46784,31 @@ void __attribute__((export_name("TS_FundingCreated_free"))) TS_FundingCreated_f FundingCreated_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_FundingCreated_get_temporary_channel_id"))) TS_FundingCreated_get_temporary_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_FundingCreated_get_temporary_channel_id"))) TS_FundingCreated_get_temporary_channel_id(uint64_t this_ptr) { LDKFundingCreated this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *FundingCreated_get_temporary_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = FundingCreated_get_temporary_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_FundingCreated_set_temporary_channel_id"))) TS_FundingCreated_set_temporary_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_FundingCreated_set_temporary_channel_id"))) TS_FundingCreated_set_temporary_channel_id(uint64_t this_ptr, uint64_t val) { LDKFundingCreated this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - FundingCreated_set_temporary_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + FundingCreated_set_temporary_channel_id(&this_ptr_conv, val_conv); } int8_tArray __attribute__((export_name("TS_FundingCreated_get_funding_txid"))) TS_FundingCreated_get_funding_txid(uint64_t this_ptr) { @@ -43369,17 +46876,19 @@ void __attribute__((export_name("TS_FundingCreated_set_signature"))) TS_Funding FundingCreated_set_signature(&this_ptr_conv, val_ref); } -uint64_t __attribute__((export_name("TS_FundingCreated_new"))) TS_FundingCreated_new(int8_tArray temporary_channel_id_arg, int8_tArray funding_txid_arg, int16_t funding_output_index_arg, int8_tArray signature_arg) { - LDKThirtyTwoBytes temporary_channel_id_arg_ref; - CHECK(temporary_channel_id_arg->arr_len == 32); - memcpy(temporary_channel_id_arg_ref.data, temporary_channel_id_arg->elems, 32); FREE(temporary_channel_id_arg); +uint64_t __attribute__((export_name("TS_FundingCreated_new"))) TS_FundingCreated_new(uint64_t temporary_channel_id_arg, int8_tArray funding_txid_arg, int16_t funding_output_index_arg, int8_tArray signature_arg) { + LDKChannelId temporary_channel_id_arg_conv; + temporary_channel_id_arg_conv.inner = untag_ptr(temporary_channel_id_arg); + temporary_channel_id_arg_conv.is_owned = ptr_is_owned(temporary_channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_arg_conv); + temporary_channel_id_arg_conv = ChannelId_clone(&temporary_channel_id_arg_conv); LDKThirtyTwoBytes funding_txid_arg_ref; CHECK(funding_txid_arg->arr_len == 32); memcpy(funding_txid_arg_ref.data, funding_txid_arg->elems, 32); FREE(funding_txid_arg); LDKECDSASignature signature_arg_ref; CHECK(signature_arg->arr_len == 64); memcpy(signature_arg_ref.compact_form, signature_arg->elems, 64); FREE(signature_arg); - LDKFundingCreated ret_var = FundingCreated_new(temporary_channel_id_arg_ref, funding_txid_arg_ref, funding_output_index_arg, signature_arg_ref); + LDKFundingCreated ret_var = FundingCreated_new(temporary_channel_id_arg_conv, funding_txid_arg_ref, funding_output_index_arg, signature_arg_ref); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -43449,27 +46958,31 @@ void __attribute__((export_name("TS_FundingSigned_free"))) TS_FundingSigned_fre FundingSigned_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_FundingSigned_get_channel_id"))) TS_FundingSigned_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_FundingSigned_get_channel_id"))) TS_FundingSigned_get_channel_id(uint64_t this_ptr) { LDKFundingSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *FundingSigned_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = FundingSigned_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_FundingSigned_set_channel_id"))) TS_FundingSigned_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_FundingSigned_set_channel_id"))) TS_FundingSigned_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKFundingSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - FundingSigned_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + FundingSigned_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray __attribute__((export_name("TS_FundingSigned_get_signature"))) TS_FundingSigned_get_signature(uint64_t this_ptr) { @@ -43495,14 +47008,16 @@ void __attribute__((export_name("TS_FundingSigned_set_signature"))) TS_FundingS FundingSigned_set_signature(&this_ptr_conv, val_ref); } -uint64_t __attribute__((export_name("TS_FundingSigned_new"))) TS_FundingSigned_new(int8_tArray channel_id_arg, int8_tArray signature_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_FundingSigned_new"))) TS_FundingSigned_new(uint64_t channel_id_arg, int8_tArray signature_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKECDSASignature signature_arg_ref; CHECK(signature_arg->arr_len == 64); memcpy(signature_arg_ref.compact_form, signature_arg->elems, 64); FREE(signature_arg); - LDKFundingSigned ret_var = FundingSigned_new(channel_id_arg_ref, signature_arg_ref); + LDKFundingSigned ret_var = FundingSigned_new(channel_id_arg_conv, signature_arg_ref); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -43572,27 +47087,31 @@ void __attribute__((export_name("TS_ChannelReady_free"))) TS_ChannelReady_free( ChannelReady_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_ChannelReady_get_channel_id"))) TS_ChannelReady_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_ChannelReady_get_channel_id"))) TS_ChannelReady_get_channel_id(uint64_t this_ptr) { LDKChannelReady this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *ChannelReady_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = ChannelReady_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_ChannelReady_set_channel_id"))) TS_ChannelReady_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_ChannelReady_set_channel_id"))) TS_ChannelReady_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKChannelReady this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - ChannelReady_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ChannelReady_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray __attribute__((export_name("TS_ChannelReady_get_next_per_commitment_point"))) TS_ChannelReady_get_next_per_commitment_point(uint64_t this_ptr) { @@ -43643,10 +47162,12 @@ void __attribute__((export_name("TS_ChannelReady_set_short_channel_id_alias"))) ChannelReady_set_short_channel_id_alias(&this_ptr_conv, val_conv); } -uint64_t __attribute__((export_name("TS_ChannelReady_new"))) TS_ChannelReady_new(int8_tArray channel_id_arg, int8_tArray next_per_commitment_point_arg, uint64_t short_channel_id_alias_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_ChannelReady_new"))) TS_ChannelReady_new(uint64_t channel_id_arg, int8_tArray next_per_commitment_point_arg, uint64_t short_channel_id_alias_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKPublicKey next_per_commitment_point_arg_ref; CHECK(next_per_commitment_point_arg->arr_len == 33); memcpy(next_per_commitment_point_arg_ref.compressed_form, next_per_commitment_point_arg->elems, 33); FREE(next_per_commitment_point_arg); @@ -43654,7 +47175,7 @@ uint64_t __attribute__((export_name("TS_ChannelReady_new"))) TS_ChannelReady_ne CHECK_ACCESS(short_channel_id_alias_arg_ptr); LDKCOption_u64Z short_channel_id_alias_arg_conv = *(LDKCOption_u64Z*)(short_channel_id_alias_arg_ptr); short_channel_id_alias_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(short_channel_id_alias_arg)); - LDKChannelReady ret_var = ChannelReady_new(channel_id_arg_ref, next_per_commitment_point_arg_ref, short_channel_id_alias_arg_conv); + LDKChannelReady ret_var = ChannelReady_new(channel_id_arg_conv, next_per_commitment_point_arg_ref, short_channel_id_alias_arg_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -43724,27 +47245,31 @@ void __attribute__((export_name("TS_Stfu_free"))) TS_Stfu_free(uint64_t this_ob Stfu_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_Stfu_get_channel_id"))) TS_Stfu_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_Stfu_get_channel_id"))) TS_Stfu_get_channel_id(uint64_t this_ptr) { LDKStfu this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *Stfu_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = Stfu_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_Stfu_set_channel_id"))) TS_Stfu_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_Stfu_set_channel_id"))) TS_Stfu_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKStfu this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - Stfu_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + Stfu_set_channel_id(&this_ptr_conv, val_conv); } int8_t __attribute__((export_name("TS_Stfu_get_initiator"))) TS_Stfu_get_initiator(uint64_t this_ptr) { @@ -43766,11 +47291,13 @@ void __attribute__((export_name("TS_Stfu_set_initiator"))) TS_Stfu_set_initiato Stfu_set_initiator(&this_ptr_conv, val); } -uint64_t __attribute__((export_name("TS_Stfu_new"))) TS_Stfu_new(int8_tArray channel_id_arg, int8_t initiator_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); - LDKStfu ret_var = Stfu_new(channel_id_arg_ref, initiator_arg); +uint64_t __attribute__((export_name("TS_Stfu_new"))) TS_Stfu_new(uint64_t channel_id_arg, int8_t initiator_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKStfu ret_var = Stfu_new(channel_id_arg_conv, initiator_arg); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -43830,27 +47357,31 @@ void __attribute__((export_name("TS_Splice_free"))) TS_Splice_free(uint64_t thi Splice_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_Splice_get_channel_id"))) TS_Splice_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_Splice_get_channel_id"))) TS_Splice_get_channel_id(uint64_t this_ptr) { LDKSplice this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *Splice_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = Splice_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_Splice_set_channel_id"))) TS_Splice_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_Splice_set_channel_id"))) TS_Splice_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKSplice this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - Splice_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + Splice_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray __attribute__((export_name("TS_Splice_get_chain_hash"))) TS_Splice_get_chain_hash(uint64_t this_ptr) { @@ -43956,17 +47487,19 @@ void __attribute__((export_name("TS_Splice_set_funding_pubkey"))) TS_Splice_set Splice_set_funding_pubkey(&this_ptr_conv, val_ref); } -uint64_t __attribute__((export_name("TS_Splice_new"))) TS_Splice_new(int8_tArray channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int32_t funding_feerate_perkw_arg, int32_t locktime_arg, int8_tArray funding_pubkey_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_Splice_new"))) TS_Splice_new(uint64_t channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int32_t funding_feerate_perkw_arg, int32_t locktime_arg, int8_tArray funding_pubkey_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes chain_hash_arg_ref; CHECK(chain_hash_arg->arr_len == 32); memcpy(chain_hash_arg_ref.data, chain_hash_arg->elems, 32); FREE(chain_hash_arg); LDKPublicKey funding_pubkey_arg_ref; CHECK(funding_pubkey_arg->arr_len == 33); memcpy(funding_pubkey_arg_ref.compressed_form, funding_pubkey_arg->elems, 33); FREE(funding_pubkey_arg); - LDKSplice ret_var = Splice_new(channel_id_arg_ref, chain_hash_arg_ref, relative_satoshis_arg, funding_feerate_perkw_arg, locktime_arg, funding_pubkey_arg_ref); + LDKSplice ret_var = Splice_new(channel_id_arg_conv, chain_hash_arg_ref, relative_satoshis_arg, funding_feerate_perkw_arg, locktime_arg, funding_pubkey_arg_ref); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -44026,27 +47559,31 @@ void __attribute__((export_name("TS_SpliceAck_free"))) TS_SpliceAck_free(uint64 SpliceAck_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_SpliceAck_get_channel_id"))) TS_SpliceAck_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_SpliceAck_get_channel_id"))) TS_SpliceAck_get_channel_id(uint64_t this_ptr) { LDKSpliceAck this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *SpliceAck_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = SpliceAck_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_SpliceAck_set_channel_id"))) TS_SpliceAck_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_SpliceAck_set_channel_id"))) TS_SpliceAck_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKSpliceAck this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - SpliceAck_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + SpliceAck_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray __attribute__((export_name("TS_SpliceAck_get_chain_hash"))) TS_SpliceAck_get_chain_hash(uint64_t this_ptr) { @@ -44114,17 +47651,19 @@ void __attribute__((export_name("TS_SpliceAck_set_funding_pubkey"))) TS_SpliceA SpliceAck_set_funding_pubkey(&this_ptr_conv, val_ref); } -uint64_t __attribute__((export_name("TS_SpliceAck_new"))) TS_SpliceAck_new(int8_tArray channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int8_tArray funding_pubkey_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_SpliceAck_new"))) TS_SpliceAck_new(uint64_t channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int8_tArray funding_pubkey_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes chain_hash_arg_ref; CHECK(chain_hash_arg->arr_len == 32); memcpy(chain_hash_arg_ref.data, chain_hash_arg->elems, 32); FREE(chain_hash_arg); LDKPublicKey funding_pubkey_arg_ref; CHECK(funding_pubkey_arg->arr_len == 33); memcpy(funding_pubkey_arg_ref.compressed_form, funding_pubkey_arg->elems, 33); FREE(funding_pubkey_arg); - LDKSpliceAck ret_var = SpliceAck_new(channel_id_arg_ref, chain_hash_arg_ref, relative_satoshis_arg, funding_pubkey_arg_ref); + LDKSpliceAck ret_var = SpliceAck_new(channel_id_arg_conv, chain_hash_arg_ref, relative_satoshis_arg, funding_pubkey_arg_ref); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -44184,34 +47723,40 @@ void __attribute__((export_name("TS_SpliceLocked_free"))) TS_SpliceLocked_free( SpliceLocked_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_SpliceLocked_get_channel_id"))) TS_SpliceLocked_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_SpliceLocked_get_channel_id"))) TS_SpliceLocked_get_channel_id(uint64_t this_ptr) { LDKSpliceLocked this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *SpliceLocked_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = SpliceLocked_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_SpliceLocked_set_channel_id"))) TS_SpliceLocked_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_SpliceLocked_set_channel_id"))) TS_SpliceLocked_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKSpliceLocked this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - SpliceLocked_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + SpliceLocked_set_channel_id(&this_ptr_conv, val_conv); } -uint64_t __attribute__((export_name("TS_SpliceLocked_new"))) TS_SpliceLocked_new(int8_tArray channel_id_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); - LDKSpliceLocked ret_var = SpliceLocked_new(channel_id_arg_ref); +uint64_t __attribute__((export_name("TS_SpliceLocked_new"))) TS_SpliceLocked_new(uint64_t channel_id_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKSpliceLocked ret_var = SpliceLocked_new(channel_id_arg_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -44271,27 +47816,31 @@ void __attribute__((export_name("TS_TxAddInput_free"))) TS_TxAddInput_free(uint TxAddInput_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_TxAddInput_get_channel_id"))) TS_TxAddInput_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_TxAddInput_get_channel_id"))) TS_TxAddInput_get_channel_id(uint64_t this_ptr) { LDKTxAddInput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxAddInput_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxAddInput_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_TxAddInput_set_channel_id"))) TS_TxAddInput_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_TxAddInput_set_channel_id"))) TS_TxAddInput_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKTxAddInput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxAddInput_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxAddInput_set_channel_id(&this_ptr_conv, val_conv); } int64_t __attribute__((export_name("TS_TxAddInput_get_serial_id"))) TS_TxAddInput_get_serial_id(uint64_t this_ptr) { @@ -44378,16 +47927,18 @@ void __attribute__((export_name("TS_TxAddInput_set_sequence"))) TS_TxAddInput_s TxAddInput_set_sequence(&this_ptr_conv, val); } -uint64_t __attribute__((export_name("TS_TxAddInput_new"))) TS_TxAddInput_new(int8_tArray channel_id_arg, int64_t serial_id_arg, uint64_t prevtx_arg, int32_t prevtx_out_arg, int32_t sequence_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_TxAddInput_new"))) TS_TxAddInput_new(uint64_t channel_id_arg, int64_t serial_id_arg, uint64_t prevtx_arg, int32_t prevtx_out_arg, int32_t sequence_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKTransactionU16LenLimited prevtx_arg_conv; prevtx_arg_conv.inner = untag_ptr(prevtx_arg); prevtx_arg_conv.is_owned = ptr_is_owned(prevtx_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(prevtx_arg_conv); prevtx_arg_conv = TransactionU16LenLimited_clone(&prevtx_arg_conv); - LDKTxAddInput ret_var = TxAddInput_new(channel_id_arg_ref, serial_id_arg, prevtx_arg_conv, prevtx_out_arg, sequence_arg); + LDKTxAddInput ret_var = TxAddInput_new(channel_id_arg_conv, serial_id_arg, prevtx_arg_conv, prevtx_out_arg, sequence_arg); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -44457,27 +48008,31 @@ void __attribute__((export_name("TS_TxAddOutput_free"))) TS_TxAddOutput_free(ui TxAddOutput_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_TxAddOutput_get_channel_id"))) TS_TxAddOutput_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_TxAddOutput_get_channel_id"))) TS_TxAddOutput_get_channel_id(uint64_t this_ptr) { LDKTxAddOutput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxAddOutput_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxAddOutput_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_TxAddOutput_set_channel_id"))) TS_TxAddOutput_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_TxAddOutput_set_channel_id"))) TS_TxAddOutput_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKTxAddOutput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxAddOutput_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxAddOutput_set_channel_id(&this_ptr_conv, val_conv); } int64_t __attribute__((export_name("TS_TxAddOutput_get_serial_id"))) TS_TxAddOutput_get_serial_id(uint64_t this_ptr) { @@ -44544,15 +48099,17 @@ void __attribute__((export_name("TS_TxAddOutput_set_script"))) TS_TxAddOutput_s TxAddOutput_set_script(&this_ptr_conv, val_ref); } -uint64_t __attribute__((export_name("TS_TxAddOutput_new"))) TS_TxAddOutput_new(int8_tArray channel_id_arg, int64_t serial_id_arg, int64_t sats_arg, int8_tArray script_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_TxAddOutput_new"))) TS_TxAddOutput_new(uint64_t channel_id_arg, int64_t serial_id_arg, int64_t sats_arg, int8_tArray script_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKCVec_u8Z script_arg_ref; script_arg_ref.datalen = script_arg->arr_len; script_arg_ref.data = MALLOC(script_arg_ref.datalen, "LDKCVec_u8Z Bytes"); memcpy(script_arg_ref.data, script_arg->elems, script_arg_ref.datalen); FREE(script_arg); - LDKTxAddOutput ret_var = TxAddOutput_new(channel_id_arg_ref, serial_id_arg, sats_arg, script_arg_ref); + LDKTxAddOutput ret_var = TxAddOutput_new(channel_id_arg_conv, serial_id_arg, sats_arg, script_arg_ref); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -44622,27 +48179,31 @@ void __attribute__((export_name("TS_TxRemoveInput_free"))) TS_TxRemoveInput_fre TxRemoveInput_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_TxRemoveInput_get_channel_id"))) TS_TxRemoveInput_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_TxRemoveInput_get_channel_id"))) TS_TxRemoveInput_get_channel_id(uint64_t this_ptr) { LDKTxRemoveInput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxRemoveInput_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxRemoveInput_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_TxRemoveInput_set_channel_id"))) TS_TxRemoveInput_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_TxRemoveInput_set_channel_id"))) TS_TxRemoveInput_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKTxRemoveInput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxRemoveInput_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxRemoveInput_set_channel_id(&this_ptr_conv, val_conv); } int64_t __attribute__((export_name("TS_TxRemoveInput_get_serial_id"))) TS_TxRemoveInput_get_serial_id(uint64_t this_ptr) { @@ -44664,11 +48225,13 @@ void __attribute__((export_name("TS_TxRemoveInput_set_serial_id"))) TS_TxRemove TxRemoveInput_set_serial_id(&this_ptr_conv, val); } -uint64_t __attribute__((export_name("TS_TxRemoveInput_new"))) TS_TxRemoveInput_new(int8_tArray channel_id_arg, int64_t serial_id_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); - LDKTxRemoveInput ret_var = TxRemoveInput_new(channel_id_arg_ref, serial_id_arg); +uint64_t __attribute__((export_name("TS_TxRemoveInput_new"))) TS_TxRemoveInput_new(uint64_t channel_id_arg, int64_t serial_id_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKTxRemoveInput ret_var = TxRemoveInput_new(channel_id_arg_conv, serial_id_arg); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -44738,27 +48301,31 @@ void __attribute__((export_name("TS_TxRemoveOutput_free"))) TS_TxRemoveOutput_f TxRemoveOutput_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_TxRemoveOutput_get_channel_id"))) TS_TxRemoveOutput_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_TxRemoveOutput_get_channel_id"))) TS_TxRemoveOutput_get_channel_id(uint64_t this_ptr) { LDKTxRemoveOutput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxRemoveOutput_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxRemoveOutput_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_TxRemoveOutput_set_channel_id"))) TS_TxRemoveOutput_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_TxRemoveOutput_set_channel_id"))) TS_TxRemoveOutput_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKTxRemoveOutput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxRemoveOutput_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxRemoveOutput_set_channel_id(&this_ptr_conv, val_conv); } int64_t __attribute__((export_name("TS_TxRemoveOutput_get_serial_id"))) TS_TxRemoveOutput_get_serial_id(uint64_t this_ptr) { @@ -44780,11 +48347,13 @@ void __attribute__((export_name("TS_TxRemoveOutput_set_serial_id"))) TS_TxRemov TxRemoveOutput_set_serial_id(&this_ptr_conv, val); } -uint64_t __attribute__((export_name("TS_TxRemoveOutput_new"))) TS_TxRemoveOutput_new(int8_tArray channel_id_arg, int64_t serial_id_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); - LDKTxRemoveOutput ret_var = TxRemoveOutput_new(channel_id_arg_ref, serial_id_arg); +uint64_t __attribute__((export_name("TS_TxRemoveOutput_new"))) TS_TxRemoveOutput_new(uint64_t channel_id_arg, int64_t serial_id_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKTxRemoveOutput ret_var = TxRemoveOutput_new(channel_id_arg_conv, serial_id_arg); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -44854,34 +48423,40 @@ void __attribute__((export_name("TS_TxComplete_free"))) TS_TxComplete_free(uint TxComplete_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_TxComplete_get_channel_id"))) TS_TxComplete_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_TxComplete_get_channel_id"))) TS_TxComplete_get_channel_id(uint64_t this_ptr) { LDKTxComplete this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxComplete_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxComplete_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_TxComplete_set_channel_id"))) TS_TxComplete_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_TxComplete_set_channel_id"))) TS_TxComplete_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKTxComplete this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxComplete_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxComplete_set_channel_id(&this_ptr_conv, val_conv); } -uint64_t __attribute__((export_name("TS_TxComplete_new"))) TS_TxComplete_new(int8_tArray channel_id_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); - LDKTxComplete ret_var = TxComplete_new(channel_id_arg_ref); +uint64_t __attribute__((export_name("TS_TxComplete_new"))) TS_TxComplete_new(uint64_t channel_id_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKTxComplete ret_var = TxComplete_new(channel_id_arg_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -44951,27 +48526,31 @@ void __attribute__((export_name("TS_TxSignatures_free"))) TS_TxSignatures_free( TxSignatures_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_TxSignatures_get_channel_id"))) TS_TxSignatures_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_TxSignatures_get_channel_id"))) TS_TxSignatures_get_channel_id(uint64_t this_ptr) { LDKTxSignatures this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxSignatures_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxSignatures_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_TxSignatures_set_channel_id"))) TS_TxSignatures_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_TxSignatures_set_channel_id"))) TS_TxSignatures_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKTxSignatures this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxSignatures_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxSignatures_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray __attribute__((export_name("TS_TxSignatures_get_tx_hash"))) TS_TxSignatures_get_tx_hash(uint64_t this_ptr) { @@ -45045,10 +48624,37 @@ void __attribute__((export_name("TS_TxSignatures_set_witnesses"))) TS_TxSignatu TxSignatures_set_witnesses(&this_ptr_conv, val_constr); } -uint64_t __attribute__((export_name("TS_TxSignatures_new"))) TS_TxSignatures_new(int8_tArray channel_id_arg, int8_tArray tx_hash_arg, ptrArray witnesses_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_TxSignatures_get_funding_outpoint_sig"))) TS_TxSignatures_get_funding_outpoint_sig(uint64_t this_ptr) { + LDKTxSignatures this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ"); + *ret_copy = TxSignatures_get_funding_outpoint_sig(&this_ptr_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void __attribute__((export_name("TS_TxSignatures_set_funding_outpoint_sig"))) TS_TxSignatures_set_funding_outpoint_sig(uint64_t this_ptr, uint64_t val) { + LDKTxSignatures this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKCOption_ECDSASignatureZ val_conv = *(LDKCOption_ECDSASignatureZ*)(val_ptr); + val_conv = COption_ECDSASignatureZ_clone((LDKCOption_ECDSASignatureZ*)untag_ptr(val)); + TxSignatures_set_funding_outpoint_sig(&this_ptr_conv, val_conv); +} + +uint64_t __attribute__((export_name("TS_TxSignatures_new"))) TS_TxSignatures_new(uint64_t channel_id_arg, int8_tArray tx_hash_arg, ptrArray witnesses_arg, uint64_t funding_outpoint_sig_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes tx_hash_arg_ref; CHECK(tx_hash_arg->arr_len == 32); memcpy(tx_hash_arg_ref.data, tx_hash_arg->elems, 32); FREE(tx_hash_arg); @@ -45069,7 +48675,11 @@ uint64_t __attribute__((export_name("TS_TxSignatures_new"))) TS_TxSignatures_ne witnesses_arg_constr.data[m] = witnesses_arg_conv_12_ref; } FREE(witnesses_arg); - LDKTxSignatures ret_var = TxSignatures_new(channel_id_arg_ref, tx_hash_arg_ref, witnesses_arg_constr); + void* funding_outpoint_sig_arg_ptr = untag_ptr(funding_outpoint_sig_arg); + CHECK_ACCESS(funding_outpoint_sig_arg_ptr); + LDKCOption_ECDSASignatureZ funding_outpoint_sig_arg_conv = *(LDKCOption_ECDSASignatureZ*)(funding_outpoint_sig_arg_ptr); + funding_outpoint_sig_arg_conv = COption_ECDSASignatureZ_clone((LDKCOption_ECDSASignatureZ*)untag_ptr(funding_outpoint_sig_arg)); + LDKTxSignatures ret_var = TxSignatures_new(channel_id_arg_conv, tx_hash_arg_ref, witnesses_arg_constr, funding_outpoint_sig_arg_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -45139,27 +48749,31 @@ void __attribute__((export_name("TS_TxInitRbf_free"))) TS_TxInitRbf_free(uint64 TxInitRbf_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_TxInitRbf_get_channel_id"))) TS_TxInitRbf_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_TxInitRbf_get_channel_id"))) TS_TxInitRbf_get_channel_id(uint64_t this_ptr) { LDKTxInitRbf this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxInitRbf_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxInitRbf_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_TxInitRbf_set_channel_id"))) TS_TxInitRbf_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_TxInitRbf_set_channel_id"))) TS_TxInitRbf_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKTxInitRbf this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxInitRbf_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxInitRbf_set_channel_id(&this_ptr_conv, val_conv); } int32_t __attribute__((export_name("TS_TxInitRbf_get_locktime"))) TS_TxInitRbf_get_locktime(uint64_t this_ptr) { @@ -45225,15 +48839,17 @@ void __attribute__((export_name("TS_TxInitRbf_set_funding_output_contribution") TxInitRbf_set_funding_output_contribution(&this_ptr_conv, val_conv); } -uint64_t __attribute__((export_name("TS_TxInitRbf_new"))) TS_TxInitRbf_new(int8_tArray channel_id_arg, int32_t locktime_arg, int32_t feerate_sat_per_1000_weight_arg, uint64_t funding_output_contribution_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_TxInitRbf_new"))) TS_TxInitRbf_new(uint64_t channel_id_arg, int32_t locktime_arg, int32_t feerate_sat_per_1000_weight_arg, uint64_t funding_output_contribution_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); void* funding_output_contribution_arg_ptr = untag_ptr(funding_output_contribution_arg); CHECK_ACCESS(funding_output_contribution_arg_ptr); LDKCOption_i64Z funding_output_contribution_arg_conv = *(LDKCOption_i64Z*)(funding_output_contribution_arg_ptr); funding_output_contribution_arg_conv = COption_i64Z_clone((LDKCOption_i64Z*)untag_ptr(funding_output_contribution_arg)); - LDKTxInitRbf ret_var = TxInitRbf_new(channel_id_arg_ref, locktime_arg, feerate_sat_per_1000_weight_arg, funding_output_contribution_arg_conv); + LDKTxInitRbf ret_var = TxInitRbf_new(channel_id_arg_conv, locktime_arg, feerate_sat_per_1000_weight_arg, funding_output_contribution_arg_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -45303,27 +48919,31 @@ void __attribute__((export_name("TS_TxAckRbf_free"))) TS_TxAckRbf_free(uint64_t TxAckRbf_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_TxAckRbf_get_channel_id"))) TS_TxAckRbf_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_TxAckRbf_get_channel_id"))) TS_TxAckRbf_get_channel_id(uint64_t this_ptr) { LDKTxAckRbf this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxAckRbf_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxAckRbf_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_TxAckRbf_set_channel_id"))) TS_TxAckRbf_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_TxAckRbf_set_channel_id"))) TS_TxAckRbf_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKTxAckRbf this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxAckRbf_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxAckRbf_set_channel_id(&this_ptr_conv, val_conv); } uint64_t __attribute__((export_name("TS_TxAckRbf_get_funding_output_contribution"))) TS_TxAckRbf_get_funding_output_contribution(uint64_t this_ptr) { @@ -45351,15 +48971,17 @@ void __attribute__((export_name("TS_TxAckRbf_set_funding_output_contribution")) TxAckRbf_set_funding_output_contribution(&this_ptr_conv, val_conv); } -uint64_t __attribute__((export_name("TS_TxAckRbf_new"))) TS_TxAckRbf_new(int8_tArray channel_id_arg, uint64_t funding_output_contribution_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_TxAckRbf_new"))) TS_TxAckRbf_new(uint64_t channel_id_arg, uint64_t funding_output_contribution_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); void* funding_output_contribution_arg_ptr = untag_ptr(funding_output_contribution_arg); CHECK_ACCESS(funding_output_contribution_arg_ptr); LDKCOption_i64Z funding_output_contribution_arg_conv = *(LDKCOption_i64Z*)(funding_output_contribution_arg_ptr); funding_output_contribution_arg_conv = COption_i64Z_clone((LDKCOption_i64Z*)untag_ptr(funding_output_contribution_arg)); - LDKTxAckRbf ret_var = TxAckRbf_new(channel_id_arg_ref, funding_output_contribution_arg_conv); + LDKTxAckRbf ret_var = TxAckRbf_new(channel_id_arg_conv, funding_output_contribution_arg_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -45429,27 +49051,31 @@ void __attribute__((export_name("TS_TxAbort_free"))) TS_TxAbort_free(uint64_t t TxAbort_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_TxAbort_get_channel_id"))) TS_TxAbort_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_TxAbort_get_channel_id"))) TS_TxAbort_get_channel_id(uint64_t this_ptr) { LDKTxAbort this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxAbort_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxAbort_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_TxAbort_set_channel_id"))) TS_TxAbort_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_TxAbort_set_channel_id"))) TS_TxAbort_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKTxAbort this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxAbort_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxAbort_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray __attribute__((export_name("TS_TxAbort_get_data"))) TS_TxAbort_get_data(uint64_t this_ptr) { @@ -45478,15 +49104,17 @@ void __attribute__((export_name("TS_TxAbort_set_data"))) TS_TxAbort_set_data(ui TxAbort_set_data(&this_ptr_conv, val_ref); } -uint64_t __attribute__((export_name("TS_TxAbort_new"))) TS_TxAbort_new(int8_tArray channel_id_arg, int8_tArray data_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_TxAbort_new"))) TS_TxAbort_new(uint64_t channel_id_arg, int8_tArray data_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKCVec_u8Z data_arg_ref; data_arg_ref.datalen = data_arg->arr_len; data_arg_ref.data = MALLOC(data_arg_ref.datalen, "LDKCVec_u8Z Bytes"); memcpy(data_arg_ref.data, data_arg->elems, data_arg_ref.datalen); FREE(data_arg); - LDKTxAbort ret_var = TxAbort_new(channel_id_arg_ref, data_arg_ref); + LDKTxAbort ret_var = TxAbort_new(channel_id_arg_conv, data_arg_ref); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -45556,27 +49184,31 @@ void __attribute__((export_name("TS_Shutdown_free"))) TS_Shutdown_free(uint64_t Shutdown_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_Shutdown_get_channel_id"))) TS_Shutdown_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_Shutdown_get_channel_id"))) TS_Shutdown_get_channel_id(uint64_t this_ptr) { LDKShutdown this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *Shutdown_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = Shutdown_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_Shutdown_set_channel_id"))) TS_Shutdown_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_Shutdown_set_channel_id"))) TS_Shutdown_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKShutdown this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - Shutdown_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + Shutdown_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray __attribute__((export_name("TS_Shutdown_get_scriptpubkey"))) TS_Shutdown_get_scriptpubkey(uint64_t this_ptr) { @@ -45605,15 +49237,17 @@ void __attribute__((export_name("TS_Shutdown_set_scriptpubkey"))) TS_Shutdown_s Shutdown_set_scriptpubkey(&this_ptr_conv, val_ref); } -uint64_t __attribute__((export_name("TS_Shutdown_new"))) TS_Shutdown_new(int8_tArray channel_id_arg, int8_tArray scriptpubkey_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_Shutdown_new"))) TS_Shutdown_new(uint64_t channel_id_arg, int8_tArray scriptpubkey_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKCVec_u8Z scriptpubkey_arg_ref; scriptpubkey_arg_ref.datalen = scriptpubkey_arg->arr_len; scriptpubkey_arg_ref.data = MALLOC(scriptpubkey_arg_ref.datalen, "LDKCVec_u8Z Bytes"); memcpy(scriptpubkey_arg_ref.data, scriptpubkey_arg->elems, scriptpubkey_arg_ref.datalen); FREE(scriptpubkey_arg); - LDKShutdown ret_var = Shutdown_new(channel_id_arg_ref, scriptpubkey_arg_ref); + LDKShutdown ret_var = Shutdown_new(channel_id_arg_conv, scriptpubkey_arg_ref); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -45792,27 +49426,31 @@ void __attribute__((export_name("TS_ClosingSigned_free"))) TS_ClosingSigned_fre ClosingSigned_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_ClosingSigned_get_channel_id"))) TS_ClosingSigned_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_ClosingSigned_get_channel_id"))) TS_ClosingSigned_get_channel_id(uint64_t this_ptr) { LDKClosingSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *ClosingSigned_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = ClosingSigned_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_ClosingSigned_set_channel_id"))) TS_ClosingSigned_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_ClosingSigned_set_channel_id"))) TS_ClosingSigned_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKClosingSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - ClosingSigned_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ClosingSigned_set_channel_id(&this_ptr_conv, val_conv); } int64_t __attribute__((export_name("TS_ClosingSigned_get_fee_satoshis"))) TS_ClosingSigned_get_fee_satoshis(uint64_t this_ptr) { @@ -45884,10 +49522,12 @@ void __attribute__((export_name("TS_ClosingSigned_set_fee_range"))) TS_ClosingS ClosingSigned_set_fee_range(&this_ptr_conv, val_conv); } -uint64_t __attribute__((export_name("TS_ClosingSigned_new"))) TS_ClosingSigned_new(int8_tArray channel_id_arg, int64_t fee_satoshis_arg, int8_tArray signature_arg, uint64_t fee_range_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_ClosingSigned_new"))) TS_ClosingSigned_new(uint64_t channel_id_arg, int64_t fee_satoshis_arg, int8_tArray signature_arg, uint64_t fee_range_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKECDSASignature signature_arg_ref; CHECK(signature_arg->arr_len == 64); memcpy(signature_arg_ref.compact_form, signature_arg->elems, 64); FREE(signature_arg); @@ -45896,7 +49536,7 @@ uint64_t __attribute__((export_name("TS_ClosingSigned_new"))) TS_ClosingSigned_ fee_range_arg_conv.is_owned = ptr_is_owned(fee_range_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(fee_range_arg_conv); fee_range_arg_conv = ClosingSignedFeeRange_clone(&fee_range_arg_conv); - LDKClosingSigned ret_var = ClosingSigned_new(channel_id_arg_ref, fee_satoshis_arg, signature_arg_ref, fee_range_arg_conv); + LDKClosingSigned ret_var = ClosingSigned_new(channel_id_arg_conv, fee_satoshis_arg, signature_arg_ref, fee_range_arg_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -45966,27 +49606,31 @@ void __attribute__((export_name("TS_UpdateAddHTLC_free"))) TS_UpdateAddHTLC_fre UpdateAddHTLC_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_UpdateAddHTLC_get_channel_id"))) TS_UpdateAddHTLC_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_UpdateAddHTLC_get_channel_id"))) TS_UpdateAddHTLC_get_channel_id(uint64_t this_ptr) { LDKUpdateAddHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *UpdateAddHTLC_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = UpdateAddHTLC_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_UpdateAddHTLC_set_channel_id"))) TS_UpdateAddHTLC_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_UpdateAddHTLC_set_channel_id"))) TS_UpdateAddHTLC_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKUpdateAddHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - UpdateAddHTLC_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + UpdateAddHTLC_set_channel_id(&this_ptr_conv, val_conv); } int64_t __attribute__((export_name("TS_UpdateAddHTLC_get_htlc_id"))) TS_UpdateAddHTLC_get_htlc_id(uint64_t this_ptr) { @@ -46144,10 +49788,12 @@ void __attribute__((export_name("TS_UpdateAddHTLC_set_blinding_point"))) TS_Upd UpdateAddHTLC_set_blinding_point(&this_ptr_conv, val_ref); } -uint64_t __attribute__((export_name("TS_UpdateAddHTLC_new"))) TS_UpdateAddHTLC_new(int8_tArray channel_id_arg, int64_t htlc_id_arg, int64_t amount_msat_arg, int8_tArray payment_hash_arg, int32_t cltv_expiry_arg, uint64_t skimmed_fee_msat_arg, uint64_t onion_routing_packet_arg, int8_tArray blinding_point_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_UpdateAddHTLC_new"))) TS_UpdateAddHTLC_new(uint64_t channel_id_arg, int64_t htlc_id_arg, int64_t amount_msat_arg, int8_tArray payment_hash_arg, int32_t cltv_expiry_arg, uint64_t skimmed_fee_msat_arg, uint64_t onion_routing_packet_arg, int8_tArray blinding_point_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes payment_hash_arg_ref; CHECK(payment_hash_arg->arr_len == 32); memcpy(payment_hash_arg_ref.data, payment_hash_arg->elems, 32); FREE(payment_hash_arg); @@ -46163,7 +49809,7 @@ uint64_t __attribute__((export_name("TS_UpdateAddHTLC_new"))) TS_UpdateAddHTLC_ LDKPublicKey blinding_point_arg_ref; CHECK(blinding_point_arg->arr_len == 33); memcpy(blinding_point_arg_ref.compressed_form, blinding_point_arg->elems, 33); FREE(blinding_point_arg); - LDKUpdateAddHTLC ret_var = UpdateAddHTLC_new(channel_id_arg_ref, htlc_id_arg, amount_msat_arg, payment_hash_arg_ref, cltv_expiry_arg, skimmed_fee_msat_arg_conv, onion_routing_packet_arg_conv, blinding_point_arg_ref); + LDKUpdateAddHTLC ret_var = UpdateAddHTLC_new(channel_id_arg_conv, htlc_id_arg, amount_msat_arg, payment_hash_arg_ref, cltv_expiry_arg, skimmed_fee_msat_arg_conv, onion_routing_packet_arg_conv, blinding_point_arg_ref); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -46362,27 +50008,31 @@ void __attribute__((export_name("TS_UpdateFulfillHTLC_free"))) TS_UpdateFulfill UpdateFulfillHTLC_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_UpdateFulfillHTLC_get_channel_id"))) TS_UpdateFulfillHTLC_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_UpdateFulfillHTLC_get_channel_id"))) TS_UpdateFulfillHTLC_get_channel_id(uint64_t this_ptr) { LDKUpdateFulfillHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *UpdateFulfillHTLC_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = UpdateFulfillHTLC_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_UpdateFulfillHTLC_set_channel_id"))) TS_UpdateFulfillHTLC_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_UpdateFulfillHTLC_set_channel_id"))) TS_UpdateFulfillHTLC_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKUpdateFulfillHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - UpdateFulfillHTLC_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + UpdateFulfillHTLC_set_channel_id(&this_ptr_conv, val_conv); } int64_t __attribute__((export_name("TS_UpdateFulfillHTLC_get_htlc_id"))) TS_UpdateFulfillHTLC_get_htlc_id(uint64_t this_ptr) { @@ -46427,14 +50077,16 @@ void __attribute__((export_name("TS_UpdateFulfillHTLC_set_payment_preimage"))) UpdateFulfillHTLC_set_payment_preimage(&this_ptr_conv, val_ref); } -uint64_t __attribute__((export_name("TS_UpdateFulfillHTLC_new"))) TS_UpdateFulfillHTLC_new(int8_tArray channel_id_arg, int64_t htlc_id_arg, int8_tArray payment_preimage_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_UpdateFulfillHTLC_new"))) TS_UpdateFulfillHTLC_new(uint64_t channel_id_arg, int64_t htlc_id_arg, int8_tArray payment_preimage_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes payment_preimage_arg_ref; CHECK(payment_preimage_arg->arr_len == 32); memcpy(payment_preimage_arg_ref.data, payment_preimage_arg->elems, 32); FREE(payment_preimage_arg); - LDKUpdateFulfillHTLC ret_var = UpdateFulfillHTLC_new(channel_id_arg_ref, htlc_id_arg, payment_preimage_arg_ref); + LDKUpdateFulfillHTLC ret_var = UpdateFulfillHTLC_new(channel_id_arg_conv, htlc_id_arg, payment_preimage_arg_ref); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -46504,27 +50156,31 @@ void __attribute__((export_name("TS_UpdateFailHTLC_free"))) TS_UpdateFailHTLC_f UpdateFailHTLC_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_UpdateFailHTLC_get_channel_id"))) TS_UpdateFailHTLC_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_UpdateFailHTLC_get_channel_id"))) TS_UpdateFailHTLC_get_channel_id(uint64_t this_ptr) { LDKUpdateFailHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *UpdateFailHTLC_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = UpdateFailHTLC_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_UpdateFailHTLC_set_channel_id"))) TS_UpdateFailHTLC_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_UpdateFailHTLC_set_channel_id"))) TS_UpdateFailHTLC_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKUpdateFailHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - UpdateFailHTLC_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + UpdateFailHTLC_set_channel_id(&this_ptr_conv, val_conv); } int64_t __attribute__((export_name("TS_UpdateFailHTLC_get_htlc_id"))) TS_UpdateFailHTLC_get_htlc_id(uint64_t this_ptr) { @@ -46609,27 +50265,31 @@ void __attribute__((export_name("TS_UpdateFailMalformedHTLC_free"))) TS_UpdateF UpdateFailMalformedHTLC_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_UpdateFailMalformedHTLC_get_channel_id"))) TS_UpdateFailMalformedHTLC_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_UpdateFailMalformedHTLC_get_channel_id"))) TS_UpdateFailMalformedHTLC_get_channel_id(uint64_t this_ptr) { LDKUpdateFailMalformedHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *UpdateFailMalformedHTLC_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = UpdateFailMalformedHTLC_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_UpdateFailMalformedHTLC_set_channel_id"))) TS_UpdateFailMalformedHTLC_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_UpdateFailMalformedHTLC_set_channel_id"))) TS_UpdateFailMalformedHTLC_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKUpdateFailMalformedHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - UpdateFailMalformedHTLC_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + UpdateFailMalformedHTLC_set_channel_id(&this_ptr_conv, val_conv); } int64_t __attribute__((export_name("TS_UpdateFailMalformedHTLC_get_htlc_id"))) TS_UpdateFailMalformedHTLC_get_htlc_id(uint64_t this_ptr) { @@ -46733,27 +50393,31 @@ void __attribute__((export_name("TS_CommitmentSigned_free"))) TS_CommitmentSign CommitmentSigned_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_CommitmentSigned_get_channel_id"))) TS_CommitmentSigned_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_CommitmentSigned_get_channel_id"))) TS_CommitmentSigned_get_channel_id(uint64_t this_ptr) { LDKCommitmentSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *CommitmentSigned_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = CommitmentSigned_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_CommitmentSigned_set_channel_id"))) TS_CommitmentSigned_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_CommitmentSigned_set_channel_id"))) TS_CommitmentSigned_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKCommitmentSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - CommitmentSigned_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + CommitmentSigned_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray __attribute__((export_name("TS_CommitmentSigned_get_signature"))) TS_CommitmentSigned_get_signature(uint64_t this_ptr) { @@ -46823,10 +50487,12 @@ void __attribute__((export_name("TS_CommitmentSigned_set_htlc_signatures"))) TS CommitmentSigned_set_htlc_signatures(&this_ptr_conv, val_constr); } -uint64_t __attribute__((export_name("TS_CommitmentSigned_new"))) TS_CommitmentSigned_new(int8_tArray channel_id_arg, int8_tArray signature_arg, ptrArray htlc_signatures_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_CommitmentSigned_new"))) TS_CommitmentSigned_new(uint64_t channel_id_arg, int8_tArray signature_arg, ptrArray htlc_signatures_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKECDSASignature signature_arg_ref; CHECK(signature_arg->arr_len == 64); memcpy(signature_arg_ref.compact_form, signature_arg->elems, 64); FREE(signature_arg); @@ -46845,7 +50511,7 @@ uint64_t __attribute__((export_name("TS_CommitmentSigned_new"))) TS_CommitmentS htlc_signatures_arg_constr.data[m] = htlc_signatures_arg_conv_12_ref; } FREE(htlc_signatures_arg); - LDKCommitmentSigned ret_var = CommitmentSigned_new(channel_id_arg_ref, signature_arg_ref, htlc_signatures_arg_constr); + LDKCommitmentSigned ret_var = CommitmentSigned_new(channel_id_arg_conv, signature_arg_ref, htlc_signatures_arg_constr); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -46915,27 +50581,31 @@ void __attribute__((export_name("TS_RevokeAndACK_free"))) TS_RevokeAndACK_free( RevokeAndACK_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_RevokeAndACK_get_channel_id"))) TS_RevokeAndACK_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_RevokeAndACK_get_channel_id"))) TS_RevokeAndACK_get_channel_id(uint64_t this_ptr) { LDKRevokeAndACK this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *RevokeAndACK_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = RevokeAndACK_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_RevokeAndACK_set_channel_id"))) TS_RevokeAndACK_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_RevokeAndACK_set_channel_id"))) TS_RevokeAndACK_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKRevokeAndACK this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - RevokeAndACK_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + RevokeAndACK_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray __attribute__((export_name("TS_RevokeAndACK_get_per_commitment_secret"))) TS_RevokeAndACK_get_per_commitment_secret(uint64_t this_ptr) { @@ -46984,17 +50654,19 @@ void __attribute__((export_name("TS_RevokeAndACK_set_next_per_commitment_point" RevokeAndACK_set_next_per_commitment_point(&this_ptr_conv, val_ref); } -uint64_t __attribute__((export_name("TS_RevokeAndACK_new"))) TS_RevokeAndACK_new(int8_tArray channel_id_arg, int8_tArray per_commitment_secret_arg, int8_tArray next_per_commitment_point_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_RevokeAndACK_new"))) TS_RevokeAndACK_new(uint64_t channel_id_arg, int8_tArray per_commitment_secret_arg, int8_tArray next_per_commitment_point_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes per_commitment_secret_arg_ref; CHECK(per_commitment_secret_arg->arr_len == 32); memcpy(per_commitment_secret_arg_ref.data, per_commitment_secret_arg->elems, 32); FREE(per_commitment_secret_arg); LDKPublicKey next_per_commitment_point_arg_ref; CHECK(next_per_commitment_point_arg->arr_len == 33); memcpy(next_per_commitment_point_arg_ref.compressed_form, next_per_commitment_point_arg->elems, 33); FREE(next_per_commitment_point_arg); - LDKRevokeAndACK ret_var = RevokeAndACK_new(channel_id_arg_ref, per_commitment_secret_arg_ref, next_per_commitment_point_arg_ref); + LDKRevokeAndACK ret_var = RevokeAndACK_new(channel_id_arg_conv, per_commitment_secret_arg_ref, next_per_commitment_point_arg_ref); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -47064,27 +50736,31 @@ void __attribute__((export_name("TS_UpdateFee_free"))) TS_UpdateFee_free(uint64 UpdateFee_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_UpdateFee_get_channel_id"))) TS_UpdateFee_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_UpdateFee_get_channel_id"))) TS_UpdateFee_get_channel_id(uint64_t this_ptr) { LDKUpdateFee this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *UpdateFee_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = UpdateFee_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_UpdateFee_set_channel_id"))) TS_UpdateFee_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_UpdateFee_set_channel_id"))) TS_UpdateFee_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKUpdateFee this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - UpdateFee_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + UpdateFee_set_channel_id(&this_ptr_conv, val_conv); } int32_t __attribute__((export_name("TS_UpdateFee_get_feerate_per_kw"))) TS_UpdateFee_get_feerate_per_kw(uint64_t this_ptr) { @@ -47106,11 +50782,13 @@ void __attribute__((export_name("TS_UpdateFee_set_feerate_per_kw"))) TS_UpdateF UpdateFee_set_feerate_per_kw(&this_ptr_conv, val); } -uint64_t __attribute__((export_name("TS_UpdateFee_new"))) TS_UpdateFee_new(int8_tArray channel_id_arg, int32_t feerate_per_kw_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); - LDKUpdateFee ret_var = UpdateFee_new(channel_id_arg_ref, feerate_per_kw_arg); +uint64_t __attribute__((export_name("TS_UpdateFee_new"))) TS_UpdateFee_new(uint64_t channel_id_arg, int32_t feerate_per_kw_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKUpdateFee ret_var = UpdateFee_new(channel_id_arg_conv, feerate_per_kw_arg); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -47180,27 +50858,31 @@ void __attribute__((export_name("TS_ChannelReestablish_free"))) TS_ChannelReest ChannelReestablish_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_ChannelReestablish_get_channel_id"))) TS_ChannelReestablish_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_ChannelReestablish_get_channel_id"))) TS_ChannelReestablish_get_channel_id(uint64_t this_ptr) { LDKChannelReestablish this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *ChannelReestablish_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = ChannelReestablish_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_ChannelReestablish_set_channel_id"))) TS_ChannelReestablish_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_ChannelReestablish_set_channel_id"))) TS_ChannelReestablish_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKChannelReestablish this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - ChannelReestablish_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ChannelReestablish_set_channel_id(&this_ptr_conv, val_conv); } int64_t __attribute__((export_name("TS_ChannelReestablish_get_next_local_commitment_number"))) TS_ChannelReestablish_get_next_local_commitment_number(uint64_t this_ptr) { @@ -47312,10 +50994,12 @@ void __attribute__((export_name("TS_ChannelReestablish_set_next_funding_txid")) ChannelReestablish_set_next_funding_txid(&this_ptr_conv, val_conv); } -uint64_t __attribute__((export_name("TS_ChannelReestablish_new"))) TS_ChannelReestablish_new(int8_tArray channel_id_arg, int64_t next_local_commitment_number_arg, int64_t next_remote_commitment_number_arg, int8_tArray your_last_per_commitment_secret_arg, int8_tArray my_current_per_commitment_point_arg, uint64_t next_funding_txid_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_ChannelReestablish_new"))) TS_ChannelReestablish_new(uint64_t channel_id_arg, int64_t next_local_commitment_number_arg, int64_t next_remote_commitment_number_arg, int8_tArray your_last_per_commitment_secret_arg, int8_tArray my_current_per_commitment_point_arg, uint64_t next_funding_txid_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes your_last_per_commitment_secret_arg_ref; CHECK(your_last_per_commitment_secret_arg->arr_len == 32); memcpy(your_last_per_commitment_secret_arg_ref.data, your_last_per_commitment_secret_arg->elems, 32); FREE(your_last_per_commitment_secret_arg); @@ -47326,7 +51010,7 @@ uint64_t __attribute__((export_name("TS_ChannelReestablish_new"))) TS_ChannelRe CHECK_ACCESS(next_funding_txid_arg_ptr); LDKCOption_ThirtyTwoBytesZ next_funding_txid_arg_conv = *(LDKCOption_ThirtyTwoBytesZ*)(next_funding_txid_arg_ptr); next_funding_txid_arg_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(next_funding_txid_arg)); - LDKChannelReestablish ret_var = ChannelReestablish_new(channel_id_arg_ref, next_local_commitment_number_arg, next_remote_commitment_number_arg, your_last_per_commitment_secret_arg_ref, my_current_per_commitment_point_arg_ref, next_funding_txid_arg_conv); + LDKChannelReestablish ret_var = ChannelReestablish_new(channel_id_arg_conv, next_local_commitment_number_arg, next_remote_commitment_number_arg, your_last_per_commitment_secret_arg_ref, my_current_per_commitment_point_arg_ref, next_funding_txid_arg_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -47396,27 +51080,31 @@ void __attribute__((export_name("TS_AnnouncementSignatures_free"))) TS_Announce AnnouncementSignatures_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_AnnouncementSignatures_get_channel_id"))) TS_AnnouncementSignatures_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_AnnouncementSignatures_get_channel_id"))) TS_AnnouncementSignatures_get_channel_id(uint64_t this_ptr) { LDKAnnouncementSignatures this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *AnnouncementSignatures_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = AnnouncementSignatures_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_AnnouncementSignatures_set_channel_id"))) TS_AnnouncementSignatures_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_AnnouncementSignatures_set_channel_id"))) TS_AnnouncementSignatures_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKAnnouncementSignatures this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - AnnouncementSignatures_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + AnnouncementSignatures_set_channel_id(&this_ptr_conv, val_conv); } int64_t __attribute__((export_name("TS_AnnouncementSignatures_get_short_channel_id"))) TS_AnnouncementSignatures_get_short_channel_id(uint64_t this_ptr) { @@ -47484,17 +51172,19 @@ void __attribute__((export_name("TS_AnnouncementSignatures_set_bitcoin_signatur AnnouncementSignatures_set_bitcoin_signature(&this_ptr_conv, val_ref); } -uint64_t __attribute__((export_name("TS_AnnouncementSignatures_new"))) TS_AnnouncementSignatures_new(int8_tArray channel_id_arg, int64_t short_channel_id_arg, int8_tArray node_signature_arg, int8_tArray bitcoin_signature_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_AnnouncementSignatures_new"))) TS_AnnouncementSignatures_new(uint64_t channel_id_arg, int64_t short_channel_id_arg, int8_tArray node_signature_arg, int8_tArray bitcoin_signature_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKECDSASignature node_signature_arg_ref; CHECK(node_signature_arg->arr_len == 64); memcpy(node_signature_arg_ref.compact_form, node_signature_arg->elems, 64); FREE(node_signature_arg); LDKECDSASignature bitcoin_signature_arg_ref; CHECK(bitcoin_signature_arg->arr_len == 64); memcpy(bitcoin_signature_arg_ref.compact_form, bitcoin_signature_arg->elems, 64); FREE(bitcoin_signature_arg); - LDKAnnouncementSignatures ret_var = AnnouncementSignatures_new(channel_id_arg_ref, short_channel_id_arg, node_signature_arg_ref, bitcoin_signature_arg_ref); + LDKAnnouncementSignatures ret_var = AnnouncementSignatures_new(channel_id_arg_conv, short_channel_id_arg, node_signature_arg_ref, bitcoin_signature_arg_ref); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -47974,6 +51664,107 @@ void __attribute__((export_name("TS_UnsignedNodeAnnouncement_set_addresses"))) UnsignedNodeAnnouncement_set_addresses(&this_ptr_conv, val_constr); } +int8_tArray __attribute__((export_name("TS_UnsignedNodeAnnouncement_get_excess_address_data"))) TS_UnsignedNodeAnnouncement_get_excess_address_data(uint64_t this_ptr) { + LDKUnsignedNodeAnnouncement this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z ret_var = UnsignedNodeAnnouncement_get_excess_address_data(&this_ptr_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +void __attribute__((export_name("TS_UnsignedNodeAnnouncement_set_excess_address_data"))) TS_UnsignedNodeAnnouncement_set_excess_address_data(uint64_t this_ptr, int8_tArray val) { + LDKUnsignedNodeAnnouncement this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z val_ref; + val_ref.datalen = val->arr_len; + val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(val_ref.data, val->elems, val_ref.datalen); FREE(val); + UnsignedNodeAnnouncement_set_excess_address_data(&this_ptr_conv, val_ref); +} + +int8_tArray __attribute__((export_name("TS_UnsignedNodeAnnouncement_get_excess_data"))) TS_UnsignedNodeAnnouncement_get_excess_data(uint64_t this_ptr) { + LDKUnsignedNodeAnnouncement this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z ret_var = UnsignedNodeAnnouncement_get_excess_data(&this_ptr_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +void __attribute__((export_name("TS_UnsignedNodeAnnouncement_set_excess_data"))) TS_UnsignedNodeAnnouncement_set_excess_data(uint64_t this_ptr, int8_tArray val) { + LDKUnsignedNodeAnnouncement this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z val_ref; + val_ref.datalen = val->arr_len; + val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(val_ref.data, val->elems, val_ref.datalen); FREE(val); + UnsignedNodeAnnouncement_set_excess_data(&this_ptr_conv, val_ref); +} + +uint64_t __attribute__((export_name("TS_UnsignedNodeAnnouncement_new"))) TS_UnsignedNodeAnnouncement_new(uint64_t features_arg, int32_t timestamp_arg, uint64_t node_id_arg, int8_tArray rgb_arg, uint64_t alias_arg, uint64_tArray addresses_arg, int8_tArray excess_address_data_arg, int8_tArray excess_data_arg) { + LDKNodeFeatures features_arg_conv; + features_arg_conv.inner = untag_ptr(features_arg); + features_arg_conv.is_owned = ptr_is_owned(features_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(features_arg_conv); + features_arg_conv = NodeFeatures_clone(&features_arg_conv); + LDKNodeId node_id_arg_conv; + node_id_arg_conv.inner = untag_ptr(node_id_arg); + node_id_arg_conv.is_owned = ptr_is_owned(node_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(node_id_arg_conv); + node_id_arg_conv = NodeId_clone(&node_id_arg_conv); + LDKThreeBytes rgb_arg_ref; + CHECK(rgb_arg->arr_len == 3); + memcpy(rgb_arg_ref.data, rgb_arg->elems, 3); FREE(rgb_arg); + LDKNodeAlias alias_arg_conv; + alias_arg_conv.inner = untag_ptr(alias_arg); + alias_arg_conv.is_owned = ptr_is_owned(alias_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(alias_arg_conv); + alias_arg_conv = NodeAlias_clone(&alias_arg_conv); + LDKCVec_SocketAddressZ addresses_arg_constr; + addresses_arg_constr.datalen = addresses_arg->arr_len; + if (addresses_arg_constr.datalen > 0) + addresses_arg_constr.data = MALLOC(addresses_arg_constr.datalen * sizeof(LDKSocketAddress), "LDKCVec_SocketAddressZ Elements"); + else + addresses_arg_constr.data = NULL; + uint64_t* addresses_arg_vals = addresses_arg->elems; + for (size_t p = 0; p < addresses_arg_constr.datalen; p++) { + uint64_t addresses_arg_conv_15 = addresses_arg_vals[p]; + void* addresses_arg_conv_15_ptr = untag_ptr(addresses_arg_conv_15); + CHECK_ACCESS(addresses_arg_conv_15_ptr); + LDKSocketAddress addresses_arg_conv_15_conv = *(LDKSocketAddress*)(addresses_arg_conv_15_ptr); + addresses_arg_constr.data[p] = addresses_arg_conv_15_conv; + } + FREE(addresses_arg); + LDKCVec_u8Z excess_address_data_arg_ref; + excess_address_data_arg_ref.datalen = excess_address_data_arg->arr_len; + excess_address_data_arg_ref.data = MALLOC(excess_address_data_arg_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(excess_address_data_arg_ref.data, excess_address_data_arg->elems, excess_address_data_arg_ref.datalen); FREE(excess_address_data_arg); + LDKCVec_u8Z excess_data_arg_ref; + excess_data_arg_ref.datalen = excess_data_arg->arr_len; + excess_data_arg_ref.data = MALLOC(excess_data_arg_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(excess_data_arg_ref.data, excess_data_arg->elems, excess_data_arg_ref.datalen); FREE(excess_data_arg); + LDKUnsignedNodeAnnouncement ret_var = UnsignedNodeAnnouncement_new(features_arg_conv, timestamp_arg, node_id_arg_conv, rgb_arg_ref, alias_arg_conv, addresses_arg_constr, excess_address_data_arg_ref, excess_data_arg_ref); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + static inline uint64_t UnsignedNodeAnnouncement_clone_ptr(LDKUnsignedNodeAnnouncement *NONNULL_PTR arg) { LDKUnsignedNodeAnnouncement ret_var = UnsignedNodeAnnouncement_clone(arg); uint64_t ret_ref = 0; @@ -50666,6 +54457,191 @@ jboolean __attribute__((export_name("TS_OnionPacket_eq"))) TS_OnionPacket_eq(ui return ret_conv; } +void __attribute__((export_name("TS_TrampolineOnionPacket_free"))) TS_TrampolineOnionPacket_free(uint64_t this_obj) { + LDKTrampolineOnionPacket this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + TrampolineOnionPacket_free(this_obj_conv); +} + +int8_t __attribute__((export_name("TS_TrampolineOnionPacket_get_version"))) TS_TrampolineOnionPacket_get_version(uint64_t this_ptr) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_t ret_conv = TrampolineOnionPacket_get_version(&this_ptr_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_TrampolineOnionPacket_set_version"))) TS_TrampolineOnionPacket_set_version(uint64_t this_ptr, int8_t val) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + TrampolineOnionPacket_set_version(&this_ptr_conv, val); +} + +int8_tArray __attribute__((export_name("TS_TrampolineOnionPacket_get_public_key"))) TS_TrampolineOnionPacket_get_public_key(uint64_t this_ptr) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(33, __LINE__); + memcpy(ret_arr->elems, TrampolineOnionPacket_get_public_key(&this_ptr_conv).compressed_form, 33); + return ret_arr; +} + +void __attribute__((export_name("TS_TrampolineOnionPacket_set_public_key"))) TS_TrampolineOnionPacket_set_public_key(uint64_t this_ptr, int8_tArray val) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKPublicKey val_ref; + CHECK(val->arr_len == 33); + memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); + TrampolineOnionPacket_set_public_key(&this_ptr_conv, val_ref); +} + +int8_tArray __attribute__((export_name("TS_TrampolineOnionPacket_get_hop_data"))) TS_TrampolineOnionPacket_get_hop_data(uint64_t this_ptr) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z ret_var = TrampolineOnionPacket_get_hop_data(&this_ptr_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +void __attribute__((export_name("TS_TrampolineOnionPacket_set_hop_data"))) TS_TrampolineOnionPacket_set_hop_data(uint64_t this_ptr, int8_tArray val) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z val_ref; + val_ref.datalen = val->arr_len; + val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(val_ref.data, val->elems, val_ref.datalen); FREE(val); + TrampolineOnionPacket_set_hop_data(&this_ptr_conv, val_ref); +} + +int8_tArray __attribute__((export_name("TS_TrampolineOnionPacket_get_hmac"))) TS_TrampolineOnionPacket_get_hmac(uint64_t this_ptr) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(32, __LINE__); + memcpy(ret_arr->elems, *TrampolineOnionPacket_get_hmac(&this_ptr_conv), 32); + return ret_arr; +} + +void __attribute__((export_name("TS_TrampolineOnionPacket_set_hmac"))) TS_TrampolineOnionPacket_set_hmac(uint64_t this_ptr, int8_tArray val) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKThirtyTwoBytes val_ref; + CHECK(val->arr_len == 32); + memcpy(val_ref.data, val->elems, 32); FREE(val); + TrampolineOnionPacket_set_hmac(&this_ptr_conv, val_ref); +} + +uint64_t __attribute__((export_name("TS_TrampolineOnionPacket_new"))) TS_TrampolineOnionPacket_new(int8_t version_arg, int8_tArray public_key_arg, int8_tArray hop_data_arg, int8_tArray hmac_arg) { + LDKPublicKey public_key_arg_ref; + CHECK(public_key_arg->arr_len == 33); + memcpy(public_key_arg_ref.compressed_form, public_key_arg->elems, 33); FREE(public_key_arg); + LDKCVec_u8Z hop_data_arg_ref; + hop_data_arg_ref.datalen = hop_data_arg->arr_len; + hop_data_arg_ref.data = MALLOC(hop_data_arg_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(hop_data_arg_ref.data, hop_data_arg->elems, hop_data_arg_ref.datalen); FREE(hop_data_arg); + LDKThirtyTwoBytes hmac_arg_ref; + CHECK(hmac_arg->arr_len == 32); + memcpy(hmac_arg_ref.data, hmac_arg->elems, 32); FREE(hmac_arg); + LDKTrampolineOnionPacket ret_var = TrampolineOnionPacket_new(version_arg, public_key_arg_ref, hop_data_arg_ref, hmac_arg_ref); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t TrampolineOnionPacket_clone_ptr(LDKTrampolineOnionPacket *NONNULL_PTR arg) { + LDKTrampolineOnionPacket ret_var = TrampolineOnionPacket_clone(arg); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t __attribute__((export_name("TS_TrampolineOnionPacket_clone_ptr"))) TS_TrampolineOnionPacket_clone_ptr(uint64_t arg) { + LDKTrampolineOnionPacket arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = TrampolineOnionPacket_clone_ptr(&arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_TrampolineOnionPacket_clone"))) TS_TrampolineOnionPacket_clone(uint64_t orig) { + LDKTrampolineOnionPacket orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKTrampolineOnionPacket ret_var = TrampolineOnionPacket_clone(&orig_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t __attribute__((export_name("TS_TrampolineOnionPacket_hash"))) TS_TrampolineOnionPacket_hash(uint64_t o) { + LDKTrampolineOnionPacket o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = TrampolineOnionPacket_hash(&o_conv); + return ret_conv; +} + +jboolean __attribute__((export_name("TS_TrampolineOnionPacket_eq"))) TS_TrampolineOnionPacket_eq(uint64_t a, uint64_t b) { + LDKTrampolineOnionPacket a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKTrampolineOnionPacket b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = TrampolineOnionPacket_eq(&a_conv, &b_conv); + return ret_conv; +} + +int8_tArray __attribute__((export_name("TS_TrampolineOnionPacket_write"))) TS_TrampolineOnionPacket_write(uint64_t obj) { + LDKTrampolineOnionPacket obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = TrampolineOnionPacket_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + int8_tArray __attribute__((export_name("TS_AcceptChannel_write"))) TS_AcceptChannel_write(uint64_t obj) { LDKAcceptChannel obj_conv; obj_conv.inner = untag_ptr(obj); @@ -52183,6 +56159,127 @@ void __attribute__((export_name("TS_SocketDescriptor_free"))) TS_SocketDescript SocketDescriptor_free(this_ptr_conv); } +void __attribute__((export_name("TS_PeerDetails_free"))) TS_PeerDetails_free(uint64_t this_obj) { + LDKPeerDetails this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + PeerDetails_free(this_obj_conv); +} + +int8_tArray __attribute__((export_name("TS_PeerDetails_get_counterparty_node_id"))) TS_PeerDetails_get_counterparty_node_id(uint64_t this_ptr) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(33, __LINE__); + memcpy(ret_arr->elems, PeerDetails_get_counterparty_node_id(&this_ptr_conv).compressed_form, 33); + return ret_arr; +} + +void __attribute__((export_name("TS_PeerDetails_set_counterparty_node_id"))) TS_PeerDetails_set_counterparty_node_id(uint64_t this_ptr, int8_tArray val) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKPublicKey val_ref; + CHECK(val->arr_len == 33); + memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); + PeerDetails_set_counterparty_node_id(&this_ptr_conv, val_ref); +} + +uint64_t __attribute__((export_name("TS_PeerDetails_get_socket_address"))) TS_PeerDetails_get_socket_address(uint64_t this_ptr) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCOption_SocketAddressZ *ret_copy = MALLOC(sizeof(LDKCOption_SocketAddressZ), "LDKCOption_SocketAddressZ"); + *ret_copy = PeerDetails_get_socket_address(&this_ptr_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void __attribute__((export_name("TS_PeerDetails_set_socket_address"))) TS_PeerDetails_set_socket_address(uint64_t this_ptr, uint64_t val) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKCOption_SocketAddressZ val_conv = *(LDKCOption_SocketAddressZ*)(val_ptr); + val_conv = COption_SocketAddressZ_clone((LDKCOption_SocketAddressZ*)untag_ptr(val)); + PeerDetails_set_socket_address(&this_ptr_conv, val_conv); +} + +uint64_t __attribute__((export_name("TS_PeerDetails_get_init_features"))) TS_PeerDetails_get_init_features(uint64_t this_ptr) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKInitFeatures ret_var = PeerDetails_get_init_features(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void __attribute__((export_name("TS_PeerDetails_set_init_features"))) TS_PeerDetails_set_init_features(uint64_t this_ptr, uint64_t val) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKInitFeatures val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = InitFeatures_clone(&val_conv); + PeerDetails_set_init_features(&this_ptr_conv, val_conv); +} + +jboolean __attribute__((export_name("TS_PeerDetails_get_is_inbound_connection"))) TS_PeerDetails_get_is_inbound_connection(uint64_t this_ptr) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + jboolean ret_conv = PeerDetails_get_is_inbound_connection(&this_ptr_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_PeerDetails_set_is_inbound_connection"))) TS_PeerDetails_set_is_inbound_connection(uint64_t this_ptr, jboolean val) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + PeerDetails_set_is_inbound_connection(&this_ptr_conv, val); +} + +uint64_t __attribute__((export_name("TS_PeerDetails_new"))) TS_PeerDetails_new(int8_tArray counterparty_node_id_arg, uint64_t socket_address_arg, uint64_t init_features_arg, jboolean is_inbound_connection_arg) { + LDKPublicKey counterparty_node_id_arg_ref; + CHECK(counterparty_node_id_arg->arr_len == 33); + memcpy(counterparty_node_id_arg_ref.compressed_form, counterparty_node_id_arg->elems, 33); FREE(counterparty_node_id_arg); + void* socket_address_arg_ptr = untag_ptr(socket_address_arg); + CHECK_ACCESS(socket_address_arg_ptr); + LDKCOption_SocketAddressZ socket_address_arg_conv = *(LDKCOption_SocketAddressZ*)(socket_address_arg_ptr); + LDKInitFeatures init_features_arg_conv; + init_features_arg_conv.inner = untag_ptr(init_features_arg); + init_features_arg_conv.is_owned = ptr_is_owned(init_features_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(init_features_arg_conv); + init_features_arg_conv = InitFeatures_clone(&init_features_arg_conv); + LDKPeerDetails ret_var = PeerDetails_new(counterparty_node_id_arg_ref, socket_address_arg_conv, init_features_arg_conv, is_inbound_connection_arg); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + void __attribute__((export_name("TS_PeerHandleError_free"))) TS_PeerHandleError_free(uint64_t this_obj) { LDKPeerHandleError this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -52269,26 +56366,44 @@ uint64_t __attribute__((export_name("TS_PeerManager_new"))) TS_PeerManager_new( return ret_ref; } -uint64_tArray __attribute__((export_name("TS_PeerManager_get_peer_node_ids"))) TS_PeerManager_get_peer_node_ids(uint64_t this_arg) { +uint64_tArray __attribute__((export_name("TS_PeerManager_list_peers"))) TS_PeerManager_list_peers(uint64_t this_arg) { LDKPeerManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ ret_var = PeerManager_get_peer_node_ids(&this_arg_conv); + LDKCVec_PeerDetailsZ ret_var = PeerManager_list_peers(&this_arg_conv); uint64_tArray ret_arr = NULL; ret_arr = init_uint64_tArray(ret_var.datalen, __LINE__); uint64_t *ret_arr_ptr = (uint64_t*)(((uint8_t*)ret_arr) + 8); - for (size_t r = 0; r < ret_var.datalen; r++) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv_43_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ"); - *ret_conv_43_conv = ret_var.data[r]; - ret_arr_ptr[r] = tag_ptr(ret_conv_43_conv, true); + for (size_t n = 0; n < ret_var.datalen; n++) { + LDKPeerDetails ret_conv_13_var = ret_var.data[n]; + uint64_t ret_conv_13_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_13_var); + ret_conv_13_ref = tag_ptr(ret_conv_13_var.inner, ret_conv_13_var.is_owned); + ret_arr_ptr[n] = ret_conv_13_ref; } FREE(ret_var.data); return ret_arr; } +uint64_t __attribute__((export_name("TS_PeerManager_peer_by_node_id"))) TS_PeerManager_peer_by_node_id(uint64_t this_arg, int8_tArray their_node_id) { + LDKPeerManager this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKPublicKey their_node_id_ref; + CHECK(their_node_id->arr_len == 33); + memcpy(their_node_id_ref.compressed_form, their_node_id->elems, 33); FREE(their_node_id); + LDKPeerDetails ret_var = PeerManager_peer_by_node_id(&this_arg_conv, their_node_id_ref); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + uint64_t __attribute__((export_name("TS_PeerManager_new_outbound_connection"))) TS_PeerManager_new_outbound_connection(uint64_t this_arg, int8_tArray their_node_id, uint64_t descriptor, uint64_t remote_network_address) { LDKPeerManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -58121,6 +62236,120 @@ jboolean __attribute__((export_name("TS_NodeFeatures_requires_keysend"))) TS_No return ret_conv; } +void __attribute__((export_name("TS_InitFeatures_set_trampoline_routing_optional"))) TS_InitFeatures_set_trampoline_routing_optional(uint64_t this_arg) { + LDKInitFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + InitFeatures_set_trampoline_routing_optional(&this_arg_conv); +} + +void __attribute__((export_name("TS_InitFeatures_set_trampoline_routing_required"))) TS_InitFeatures_set_trampoline_routing_required(uint64_t this_arg) { + LDKInitFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + InitFeatures_set_trampoline_routing_required(&this_arg_conv); +} + +jboolean __attribute__((export_name("TS_InitFeatures_supports_trampoline_routing"))) TS_InitFeatures_supports_trampoline_routing(uint64_t this_arg) { + LDKInitFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = InitFeatures_supports_trampoline_routing(&this_arg_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_NodeFeatures_set_trampoline_routing_optional"))) TS_NodeFeatures_set_trampoline_routing_optional(uint64_t this_arg) { + LDKNodeFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + NodeFeatures_set_trampoline_routing_optional(&this_arg_conv); +} + +void __attribute__((export_name("TS_NodeFeatures_set_trampoline_routing_required"))) TS_NodeFeatures_set_trampoline_routing_required(uint64_t this_arg) { + LDKNodeFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + NodeFeatures_set_trampoline_routing_required(&this_arg_conv); +} + +jboolean __attribute__((export_name("TS_NodeFeatures_supports_trampoline_routing"))) TS_NodeFeatures_supports_trampoline_routing(uint64_t this_arg) { + LDKNodeFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = NodeFeatures_supports_trampoline_routing(&this_arg_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_Bolt11InvoiceFeatures_set_trampoline_routing_optional"))) TS_Bolt11InvoiceFeatures_set_trampoline_routing_optional(uint64_t this_arg) { + LDKBolt11InvoiceFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + Bolt11InvoiceFeatures_set_trampoline_routing_optional(&this_arg_conv); +} + +void __attribute__((export_name("TS_Bolt11InvoiceFeatures_set_trampoline_routing_required"))) TS_Bolt11InvoiceFeatures_set_trampoline_routing_required(uint64_t this_arg) { + LDKBolt11InvoiceFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + Bolt11InvoiceFeatures_set_trampoline_routing_required(&this_arg_conv); +} + +jboolean __attribute__((export_name("TS_Bolt11InvoiceFeatures_supports_trampoline_routing"))) TS_Bolt11InvoiceFeatures_supports_trampoline_routing(uint64_t this_arg) { + LDKBolt11InvoiceFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = Bolt11InvoiceFeatures_supports_trampoline_routing(&this_arg_conv); + return ret_conv; +} + +jboolean __attribute__((export_name("TS_InitFeatures_requires_trampoline_routing"))) TS_InitFeatures_requires_trampoline_routing(uint64_t this_arg) { + LDKInitFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = InitFeatures_requires_trampoline_routing(&this_arg_conv); + return ret_conv; +} + +jboolean __attribute__((export_name("TS_NodeFeatures_requires_trampoline_routing"))) TS_NodeFeatures_requires_trampoline_routing(uint64_t this_arg) { + LDKNodeFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = NodeFeatures_requires_trampoline_routing(&this_arg_conv); + return ret_conv; +} + +jboolean __attribute__((export_name("TS_Bolt11InvoiceFeatures_requires_trampoline_routing"))) TS_Bolt11InvoiceFeatures_requires_trampoline_routing(uint64_t this_arg) { + LDKBolt11InvoiceFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = Bolt11InvoiceFeatures_requires_trampoline_routing(&this_arg_conv); + return ret_conv; +} + void __attribute__((export_name("TS_ShutdownScript_free"))) TS_ShutdownScript_free(uint64_t this_obj) { LDKShutdownScript this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -58346,6 +62575,222 @@ jboolean __attribute__((export_name("TS_ShutdownScript_is_compatible"))) TS_Shu return ret_conv; } +void __attribute__((export_name("TS_ChannelId_free"))) TS_ChannelId_free(uint64_t this_obj) { + LDKChannelId this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + ChannelId_free(this_obj_conv); +} + +int8_tArray __attribute__((export_name("TS_ChannelId_get_a"))) TS_ChannelId_get_a(uint64_t this_ptr) { + LDKChannelId this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(32, __LINE__); + memcpy(ret_arr->elems, *ChannelId_get_a(&this_ptr_conv), 32); + return ret_arr; +} + +void __attribute__((export_name("TS_ChannelId_set_a"))) TS_ChannelId_set_a(uint64_t this_ptr, int8_tArray val) { + LDKChannelId this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKThirtyTwoBytes val_ref; + CHECK(val->arr_len == 32); + memcpy(val_ref.data, val->elems, 32); FREE(val); + ChannelId_set_a(&this_ptr_conv, val_ref); +} + +uint64_t __attribute__((export_name("TS_ChannelId_new"))) TS_ChannelId_new(int8_tArray a_arg) { + LDKThirtyTwoBytes a_arg_ref; + CHECK(a_arg->arr_len == 32); + memcpy(a_arg_ref.data, a_arg->elems, 32); FREE(a_arg); + LDKChannelId ret_var = ChannelId_new(a_arg_ref); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t ChannelId_clone_ptr(LDKChannelId *NONNULL_PTR arg) { + LDKChannelId ret_var = ChannelId_clone(arg); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t __attribute__((export_name("TS_ChannelId_clone_ptr"))) TS_ChannelId_clone_ptr(uint64_t arg) { + LDKChannelId arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = ChannelId_clone_ptr(&arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_ChannelId_clone"))) TS_ChannelId_clone(uint64_t orig) { + LDKChannelId orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKChannelId ret_var = ChannelId_clone(&orig_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +jboolean __attribute__((export_name("TS_ChannelId_eq"))) TS_ChannelId_eq(uint64_t a, uint64_t b) { + LDKChannelId a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKChannelId b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = ChannelId_eq(&a_conv, &b_conv); + return ret_conv; +} + +int64_t __attribute__((export_name("TS_ChannelId_hash"))) TS_ChannelId_hash(uint64_t o) { + LDKChannelId o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = ChannelId_hash(&o_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_ChannelId_v1_from_funding_txid"))) TS_ChannelId_v1_from_funding_txid(int8_tArray txid, int16_t output_index) { + uint8_t txid_arr[32]; + CHECK(txid->arr_len == 32); + memcpy(txid_arr, txid->elems, 32); FREE(txid); + uint8_t (*txid_ref)[32] = &txid_arr; + LDKChannelId ret_var = ChannelId_v1_from_funding_txid(txid_ref, output_index); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_ChannelId_v1_from_funding_outpoint"))) TS_ChannelId_v1_from_funding_outpoint(uint64_t outpoint) { + LDKOutPoint outpoint_conv; + outpoint_conv.inner = untag_ptr(outpoint); + outpoint_conv.is_owned = ptr_is_owned(outpoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_conv); + outpoint_conv = OutPoint_clone(&outpoint_conv); + LDKChannelId ret_var = ChannelId_v1_from_funding_outpoint(outpoint_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_ChannelId_temporary_from_entropy_source"))) TS_ChannelId_temporary_from_entropy_source(uint64_t entropy_source) { + void* entropy_source_ptr = untag_ptr(entropy_source); + if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } + LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + LDKChannelId ret_var = ChannelId_temporary_from_entropy_source(entropy_source_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_ChannelId_from_bytes"))) TS_ChannelId_from_bytes(int8_tArray data) { + LDKThirtyTwoBytes data_ref; + CHECK(data->arr_len == 32); + memcpy(data_ref.data, data->elems, 32); FREE(data); + LDKChannelId ret_var = ChannelId_from_bytes(data_ref); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_ChannelId_new_zero"))) TS_ChannelId_new_zero() { + LDKChannelId ret_var = ChannelId_new_zero(); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +jboolean __attribute__((export_name("TS_ChannelId_is_zero"))) TS_ChannelId_is_zero(uint64_t this_arg) { + LDKChannelId this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = ChannelId_is_zero(&this_arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_ChannelId_v2_from_revocation_basepoints"))) TS_ChannelId_v2_from_revocation_basepoints(uint64_t ours, uint64_t theirs) { + LDKRevocationBasepoint ours_conv; + ours_conv.inner = untag_ptr(ours); + ours_conv.is_owned = ptr_is_owned(ours); + CHECK_INNER_FIELD_ACCESS_OR_NULL(ours_conv); + ours_conv.is_owned = false; + LDKRevocationBasepoint theirs_conv; + theirs_conv.inner = untag_ptr(theirs); + theirs_conv.is_owned = ptr_is_owned(theirs); + CHECK_INNER_FIELD_ACCESS_OR_NULL(theirs_conv); + theirs_conv.is_owned = false; + LDKChannelId ret_var = ChannelId_v2_from_revocation_basepoints(&ours_conv, &theirs_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_ChannelId_temporary_v2_from_revocation_basepoint"))) TS_ChannelId_temporary_v2_from_revocation_basepoint(uint64_t our_revocation_basepoint) { + LDKRevocationBasepoint our_revocation_basepoint_conv; + our_revocation_basepoint_conv.inner = untag_ptr(our_revocation_basepoint); + our_revocation_basepoint_conv.is_owned = ptr_is_owned(our_revocation_basepoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(our_revocation_basepoint_conv); + our_revocation_basepoint_conv.is_owned = false; + LDKChannelId ret_var = ChannelId_temporary_v2_from_revocation_basepoint(&our_revocation_basepoint_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int8_tArray __attribute__((export_name("TS_ChannelId_write"))) TS_ChannelId_write(uint64_t obj) { + LDKChannelId obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = ChannelId_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +uint64_t __attribute__((export_name("TS_ChannelId_read"))) TS_ChannelId_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ"); + *ret_conv = ChannelId_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + void __attribute__((export_name("TS_Retry_free"))) TS_Retry_free(uint64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -58858,6 +63303,413 @@ void __attribute__((export_name("TS_Type_free"))) TS_Type_free(uint64_t this_pt Type_free(this_ptr_conv); } +void __attribute__((export_name("TS_OfferId_free"))) TS_OfferId_free(uint64_t this_obj) { + LDKOfferId this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + OfferId_free(this_obj_conv); +} + +int8_tArray __attribute__((export_name("TS_OfferId_get_a"))) TS_OfferId_get_a(uint64_t this_ptr) { + LDKOfferId this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(32, __LINE__); + memcpy(ret_arr->elems, *OfferId_get_a(&this_ptr_conv), 32); + return ret_arr; +} + +void __attribute__((export_name("TS_OfferId_set_a"))) TS_OfferId_set_a(uint64_t this_ptr, int8_tArray val) { + LDKOfferId this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKThirtyTwoBytes val_ref; + CHECK(val->arr_len == 32); + memcpy(val_ref.data, val->elems, 32); FREE(val); + OfferId_set_a(&this_ptr_conv, val_ref); +} + +uint64_t __attribute__((export_name("TS_OfferId_new"))) TS_OfferId_new(int8_tArray a_arg) { + LDKThirtyTwoBytes a_arg_ref; + CHECK(a_arg->arr_len == 32); + memcpy(a_arg_ref.data, a_arg->elems, 32); FREE(a_arg); + LDKOfferId ret_var = OfferId_new(a_arg_ref); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t OfferId_clone_ptr(LDKOfferId *NONNULL_PTR arg) { + LDKOfferId ret_var = OfferId_clone(arg); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t __attribute__((export_name("TS_OfferId_clone_ptr"))) TS_OfferId_clone_ptr(uint64_t arg) { + LDKOfferId arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = OfferId_clone_ptr(&arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_OfferId_clone"))) TS_OfferId_clone(uint64_t orig) { + LDKOfferId orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKOfferId ret_var = OfferId_clone(&orig_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +jboolean __attribute__((export_name("TS_OfferId_eq"))) TS_OfferId_eq(uint64_t a, uint64_t b) { + LDKOfferId a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKOfferId b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = OfferId_eq(&a_conv, &b_conv); + return ret_conv; +} + +int8_tArray __attribute__((export_name("TS_OfferId_write"))) TS_OfferId_write(uint64_t obj) { + LDKOfferId obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = OfferId_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +uint64_t __attribute__((export_name("TS_OfferId_read"))) TS_OfferId_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ"); + *ret_conv = OfferId_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + +void __attribute__((export_name("TS_OfferWithExplicitMetadataBuilder_free"))) TS_OfferWithExplicitMetadataBuilder_free(uint64_t this_obj) { + LDKOfferWithExplicitMetadataBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + OfferWithExplicitMetadataBuilder_free(this_obj_conv); +} + +static inline uint64_t OfferWithExplicitMetadataBuilder_clone_ptr(LDKOfferWithExplicitMetadataBuilder *NONNULL_PTR arg) { + LDKOfferWithExplicitMetadataBuilder ret_var = OfferWithExplicitMetadataBuilder_clone(arg); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t __attribute__((export_name("TS_OfferWithExplicitMetadataBuilder_clone_ptr"))) TS_OfferWithExplicitMetadataBuilder_clone_ptr(uint64_t arg) { + LDKOfferWithExplicitMetadataBuilder arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = OfferWithExplicitMetadataBuilder_clone_ptr(&arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_OfferWithExplicitMetadataBuilder_clone"))) TS_OfferWithExplicitMetadataBuilder_clone(uint64_t orig) { + LDKOfferWithExplicitMetadataBuilder orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKOfferWithExplicitMetadataBuilder ret_var = OfferWithExplicitMetadataBuilder_clone(&orig_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void __attribute__((export_name("TS_OfferWithDerivedMetadataBuilder_free"))) TS_OfferWithDerivedMetadataBuilder_free(uint64_t this_obj) { + LDKOfferWithDerivedMetadataBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + OfferWithDerivedMetadataBuilder_free(this_obj_conv); +} + +static inline uint64_t OfferWithDerivedMetadataBuilder_clone_ptr(LDKOfferWithDerivedMetadataBuilder *NONNULL_PTR arg) { + LDKOfferWithDerivedMetadataBuilder ret_var = OfferWithDerivedMetadataBuilder_clone(arg); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t __attribute__((export_name("TS_OfferWithDerivedMetadataBuilder_clone_ptr"))) TS_OfferWithDerivedMetadataBuilder_clone_ptr(uint64_t arg) { + LDKOfferWithDerivedMetadataBuilder arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = OfferWithDerivedMetadataBuilder_clone_ptr(&arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_OfferWithDerivedMetadataBuilder_clone"))) TS_OfferWithDerivedMetadataBuilder_clone(uint64_t orig) { + LDKOfferWithDerivedMetadataBuilder orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKOfferWithDerivedMetadataBuilder ret_var = OfferWithDerivedMetadataBuilder_clone(&orig_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_OfferWithExplicitMetadataBuilder_new"))) TS_OfferWithExplicitMetadataBuilder_new(int8_tArray signing_pubkey) { + LDKPublicKey signing_pubkey_ref; + CHECK(signing_pubkey->arr_len == 33); + memcpy(signing_pubkey_ref.compressed_form, signing_pubkey->elems, 33); FREE(signing_pubkey); + LDKOfferWithExplicitMetadataBuilder ret_var = OfferWithExplicitMetadataBuilder_new(signing_pubkey_ref); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_OfferWithExplicitMetadataBuilder_metadata"))) TS_OfferWithExplicitMetadataBuilder_metadata(uint64_t this_arg, int8_tArray metadata) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKCVec_u8Z metadata_ref; + metadata_ref.datalen = metadata->arr_len; + metadata_ref.data = MALLOC(metadata_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(metadata_ref.data, metadata->elems, metadata_ref.datalen); FREE(metadata); + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = OfferWithExplicitMetadataBuilder_metadata(this_arg_conv, metadata_ref); + return tag_ptr(ret_conv, true); +} + +void __attribute__((export_name("TS_OfferWithExplicitMetadataBuilder_chain"))) TS_OfferWithExplicitMetadataBuilder_chain(uint64_t this_arg, uint32_t network) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKNetwork network_conv = LDKNetwork_from_js(network); + OfferWithExplicitMetadataBuilder_chain(this_arg_conv, network_conv); +} + +void __attribute__((export_name("TS_OfferWithExplicitMetadataBuilder_amount_msats"))) TS_OfferWithExplicitMetadataBuilder_amount_msats(uint64_t this_arg, int64_t amount_msats) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + OfferWithExplicitMetadataBuilder_amount_msats(this_arg_conv, amount_msats); +} + +void __attribute__((export_name("TS_OfferWithExplicitMetadataBuilder_absolute_expiry"))) TS_OfferWithExplicitMetadataBuilder_absolute_expiry(uint64_t this_arg, int64_t absolute_expiry) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + OfferWithExplicitMetadataBuilder_absolute_expiry(this_arg_conv, absolute_expiry); +} + +void __attribute__((export_name("TS_OfferWithExplicitMetadataBuilder_description"))) TS_OfferWithExplicitMetadataBuilder_description(uint64_t this_arg, jstring description) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKStr description_conv = str_ref_to_owned_c(description); + OfferWithExplicitMetadataBuilder_description(this_arg_conv, description_conv); +} + +void __attribute__((export_name("TS_OfferWithExplicitMetadataBuilder_issuer"))) TS_OfferWithExplicitMetadataBuilder_issuer(uint64_t this_arg, jstring issuer) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKStr issuer_conv = str_ref_to_owned_c(issuer); + OfferWithExplicitMetadataBuilder_issuer(this_arg_conv, issuer_conv); +} + +void __attribute__((export_name("TS_OfferWithExplicitMetadataBuilder_path"))) TS_OfferWithExplicitMetadataBuilder_path(uint64_t this_arg, uint64_t path) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKBlindedPath path_conv; + path_conv.inner = untag_ptr(path); + path_conv.is_owned = ptr_is_owned(path); + CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv); + path_conv = BlindedPath_clone(&path_conv); + OfferWithExplicitMetadataBuilder_path(this_arg_conv, path_conv); +} + +void __attribute__((export_name("TS_OfferWithExplicitMetadataBuilder_supported_quantity"))) TS_OfferWithExplicitMetadataBuilder_supported_quantity(uint64_t this_arg, uint64_t quantity) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + void* quantity_ptr = untag_ptr(quantity); + CHECK_ACCESS(quantity_ptr); + LDKQuantity quantity_conv = *(LDKQuantity*)(quantity_ptr); + quantity_conv = Quantity_clone((LDKQuantity*)untag_ptr(quantity)); + OfferWithExplicitMetadataBuilder_supported_quantity(this_arg_conv, quantity_conv); +} + +uint64_t __attribute__((export_name("TS_OfferWithExplicitMetadataBuilder_build"))) TS_OfferWithExplicitMetadataBuilder_build(uint64_t this_arg) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = OfferWithExplicitMetadataBuilder_build(this_arg_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_OfferWithDerivedMetadataBuilder_deriving_signing_pubkey"))) TS_OfferWithDerivedMetadataBuilder_deriving_signing_pubkey(int8_tArray node_id, uint64_t expanded_key, uint64_t entropy_source) { + LDKPublicKey node_id_ref; + CHECK(node_id->arr_len == 33); + memcpy(node_id_ref.compressed_form, node_id->elems, 33); FREE(node_id); + LDKExpandedKey expanded_key_conv; + expanded_key_conv.inner = untag_ptr(expanded_key); + expanded_key_conv.is_owned = ptr_is_owned(expanded_key); + CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv); + expanded_key_conv.is_owned = false; + void* entropy_source_ptr = untag_ptr(entropy_source); + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } + LDKOfferWithDerivedMetadataBuilder ret_var = OfferWithDerivedMetadataBuilder_deriving_signing_pubkey(node_id_ref, &expanded_key_conv, entropy_source_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void __attribute__((export_name("TS_OfferWithDerivedMetadataBuilder_chain"))) TS_OfferWithDerivedMetadataBuilder_chain(uint64_t this_arg, uint32_t network) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKNetwork network_conv = LDKNetwork_from_js(network); + OfferWithDerivedMetadataBuilder_chain(this_arg_conv, network_conv); +} + +void __attribute__((export_name("TS_OfferWithDerivedMetadataBuilder_amount_msats"))) TS_OfferWithDerivedMetadataBuilder_amount_msats(uint64_t this_arg, int64_t amount_msats) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + OfferWithDerivedMetadataBuilder_amount_msats(this_arg_conv, amount_msats); +} + +void __attribute__((export_name("TS_OfferWithDerivedMetadataBuilder_absolute_expiry"))) TS_OfferWithDerivedMetadataBuilder_absolute_expiry(uint64_t this_arg, int64_t absolute_expiry) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + OfferWithDerivedMetadataBuilder_absolute_expiry(this_arg_conv, absolute_expiry); +} + +void __attribute__((export_name("TS_OfferWithDerivedMetadataBuilder_description"))) TS_OfferWithDerivedMetadataBuilder_description(uint64_t this_arg, jstring description) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKStr description_conv = str_ref_to_owned_c(description); + OfferWithDerivedMetadataBuilder_description(this_arg_conv, description_conv); +} + +void __attribute__((export_name("TS_OfferWithDerivedMetadataBuilder_issuer"))) TS_OfferWithDerivedMetadataBuilder_issuer(uint64_t this_arg, jstring issuer) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKStr issuer_conv = str_ref_to_owned_c(issuer); + OfferWithDerivedMetadataBuilder_issuer(this_arg_conv, issuer_conv); +} + +void __attribute__((export_name("TS_OfferWithDerivedMetadataBuilder_path"))) TS_OfferWithDerivedMetadataBuilder_path(uint64_t this_arg, uint64_t path) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKBlindedPath path_conv; + path_conv.inner = untag_ptr(path); + path_conv.is_owned = ptr_is_owned(path); + CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv); + path_conv = BlindedPath_clone(&path_conv); + OfferWithDerivedMetadataBuilder_path(this_arg_conv, path_conv); +} + +void __attribute__((export_name("TS_OfferWithDerivedMetadataBuilder_supported_quantity"))) TS_OfferWithDerivedMetadataBuilder_supported_quantity(uint64_t this_arg, uint64_t quantity) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + void* quantity_ptr = untag_ptr(quantity); + CHECK_ACCESS(quantity_ptr); + LDKQuantity quantity_conv = *(LDKQuantity*)(quantity_ptr); + quantity_conv = Quantity_clone((LDKQuantity*)untag_ptr(quantity)); + OfferWithDerivedMetadataBuilder_supported_quantity(this_arg_conv, quantity_conv); +} + +uint64_t __attribute__((export_name("TS_OfferWithDerivedMetadataBuilder_build"))) TS_OfferWithDerivedMetadataBuilder_build(uint64_t this_arg) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = OfferWithDerivedMetadataBuilder_build(this_arg_conv); + return tag_ptr(ret_conv, true); +} + void __attribute__((export_name("TS_Offer_free"))) TS_Offer_free(uint64_t this_obj) { LDKOffer this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -58934,10 +63786,9 @@ uint64_t __attribute__((export_name("TS_Offer_amount"))) TS_Offer_amount(uint64 this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = Offer_amount(&this_arg_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = Offer_amount(&this_arg_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -59020,10 +63871,9 @@ uint64_t __attribute__((export_name("TS_Offer_supported_quantity"))) TS_Offer_s this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = Offer_supported_quantity(&this_arg_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Offer_supported_quantity(&this_arg_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -59038,6 +63888,19 @@ int8_tArray __attribute__((export_name("TS_Offer_signing_pubkey"))) TS_Offer_si return ret_arr; } +uint64_t __attribute__((export_name("TS_Offer_id"))) TS_Offer_id(uint64_t this_arg) { + LDKOffer this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKOfferId ret_var = Offer_id(&this_arg_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + jboolean __attribute__((export_name("TS_Offer_supports_chain"))) TS_Offer_supports_chain(uint64_t this_arg, int8_tArray chain) { LDKOffer this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -59081,6 +63944,89 @@ jboolean __attribute__((export_name("TS_Offer_expects_quantity"))) TS_Offer_exp return ret_conv; } +uint64_t __attribute__((export_name("TS_Offer_request_invoice_deriving_payer_id"))) TS_Offer_request_invoice_deriving_payer_id(uint64_t this_arg, uint64_t expanded_key, uint64_t entropy_source, int8_tArray payment_id) { + LDKOffer this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKExpandedKey expanded_key_conv; + expanded_key_conv.inner = untag_ptr(expanded_key); + expanded_key_conv.is_owned = ptr_is_owned(expanded_key); + CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv); + expanded_key_conv.is_owned = false; + void* entropy_source_ptr = untag_ptr(entropy_source); + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } + LDKThirtyTwoBytes payment_id_ref; + CHECK(payment_id->arr_len == 32); + memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id); + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = Offer_request_invoice_deriving_payer_id(&this_arg_conv, &expanded_key_conv, entropy_source_conv, payment_id_ref); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_Offer_request_invoice_deriving_metadata"))) TS_Offer_request_invoice_deriving_metadata(uint64_t this_arg, int8_tArray payer_id, uint64_t expanded_key, uint64_t entropy_source, int8_tArray payment_id) { + LDKOffer this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKPublicKey payer_id_ref; + CHECK(payer_id->arr_len == 33); + memcpy(payer_id_ref.compressed_form, payer_id->elems, 33); FREE(payer_id); + LDKExpandedKey expanded_key_conv; + expanded_key_conv.inner = untag_ptr(expanded_key); + expanded_key_conv.is_owned = ptr_is_owned(expanded_key); + CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv); + expanded_key_conv.is_owned = false; + void* entropy_source_ptr = untag_ptr(entropy_source); + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } + LDKThirtyTwoBytes payment_id_ref; + CHECK(payment_id->arr_len == 32); + memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id); + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = Offer_request_invoice_deriving_metadata(&this_arg_conv, payer_id_ref, &expanded_key_conv, entropy_source_conv, payment_id_ref); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_Offer_request_invoice"))) TS_Offer_request_invoice(uint64_t this_arg, int8_tArray metadata, int8_tArray payer_id) { + LDKOffer this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_u8Z metadata_ref; + metadata_ref.datalen = metadata->arr_len; + metadata_ref.data = MALLOC(metadata_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(metadata_ref.data, metadata->elems, metadata_ref.datalen); FREE(metadata); + LDKPublicKey payer_id_ref; + CHECK(payer_id->arr_len == 33); + memcpy(payer_id_ref.compressed_form, payer_id->elems, 33); FREE(payer_id); + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = Offer_request_invoice(&this_arg_conv, metadata_ref, payer_id_ref); + return tag_ptr(ret_conv, true); +} + +int64_t __attribute__((export_name("TS_Offer_hash"))) TS_Offer_hash(uint64_t o) { + LDKOffer o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = Offer_hash(&o_conv); + return ret_conv; +} + int8_tArray __attribute__((export_name("TS_Offer_write"))) TS_Offer_write(uint64_t obj) { LDKOffer obj_conv; obj_conv.inner = untag_ptr(obj); @@ -59094,95 +64040,316 @@ int8_tArray __attribute__((export_name("TS_Offer_write"))) TS_Offer_write(uint6 return ret_arr; } -void __attribute__((export_name("TS_Amount_free"))) TS_Amount_free(uint64_t this_obj) { - LDKAmount this_obj_conv; - this_obj_conv.inner = untag_ptr(this_obj); - this_obj_conv.is_owned = ptr_is_owned(this_obj); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - Amount_free(this_obj_conv); +void __attribute__((export_name("TS_Amount_free"))) TS_Amount_free(uint64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKAmount this_ptr_conv = *(LDKAmount*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + Amount_free(this_ptr_conv); } static inline uint64_t Amount_clone_ptr(LDKAmount *NONNULL_PTR arg) { - LDKAmount ret_var = Amount_clone(arg); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount"); + *ret_copy = Amount_clone(arg); + uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } int64_t __attribute__((export_name("TS_Amount_clone_ptr"))) TS_Amount_clone_ptr(uint64_t arg) { - LDKAmount arg_conv; - arg_conv.inner = untag_ptr(arg); - arg_conv.is_owned = ptr_is_owned(arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); - arg_conv.is_owned = false; - int64_t ret_conv = Amount_clone_ptr(&arg_conv); + LDKAmount* arg_conv = (LDKAmount*)untag_ptr(arg); + int64_t ret_conv = Amount_clone_ptr(arg_conv); return ret_conv; } uint64_t __attribute__((export_name("TS_Amount_clone"))) TS_Amount_clone(uint64_t orig) { - LDKAmount orig_conv; - orig_conv.inner = untag_ptr(orig); - orig_conv.is_owned = ptr_is_owned(orig); - CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); - orig_conv.is_owned = false; - LDKAmount ret_var = Amount_clone(&orig_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKAmount* orig_conv = (LDKAmount*)untag_ptr(orig); + LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount"); + *ret_copy = Amount_clone(orig_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_Amount_bitcoin"))) TS_Amount_bitcoin(int64_t amount_msats) { + LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount"); + *ret_copy = Amount_bitcoin(amount_msats); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_Amount_currency"))) TS_Amount_currency(int8_tArray iso4217_code, int64_t amount) { + LDKThreeBytes iso4217_code_ref; + CHECK(iso4217_code->arr_len == 3); + memcpy(iso4217_code_ref.data, iso4217_code->elems, 3); FREE(iso4217_code); + LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount"); + *ret_copy = Amount_currency(iso4217_code_ref, amount); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void __attribute__((export_name("TS_Quantity_free"))) TS_Quantity_free(uint64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKQuantity this_ptr_conv = *(LDKQuantity*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + Quantity_free(this_ptr_conv); +} + +static inline uint64_t Quantity_clone_ptr(LDKQuantity *NONNULL_PTR arg) { + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Quantity_clone(arg); + uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } +int64_t __attribute__((export_name("TS_Quantity_clone_ptr"))) TS_Quantity_clone_ptr(uint64_t arg) { + LDKQuantity* arg_conv = (LDKQuantity*)untag_ptr(arg); + int64_t ret_conv = Quantity_clone_ptr(arg_conv); + return ret_conv; +} -void __attribute__((export_name("TS_Quantity_free"))) TS_Quantity_free(uint64_t this_obj) { - LDKQuantity this_obj_conv; +uint64_t __attribute__((export_name("TS_Quantity_clone"))) TS_Quantity_clone(uint64_t orig) { + LDKQuantity* orig_conv = (LDKQuantity*)untag_ptr(orig); + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Quantity_clone(orig_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_Quantity_bounded"))) TS_Quantity_bounded(int64_t a) { + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Quantity_bounded(a); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_Quantity_unbounded"))) TS_Quantity_unbounded() { + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Quantity_unbounded(); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_Quantity_one"))) TS_Quantity_one() { + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Quantity_one(); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_Offer_from_str"))) TS_Offer_from_str(jstring s) { + LDKStr s_conv = str_ref_to_owned_c(s); + LDKCResult_OfferBolt12ParseErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12ParseErrorZ), "LDKCResult_OfferBolt12ParseErrorZ"); + *ret_conv = Offer_from_str(s_conv); + return tag_ptr(ret_conv, true); +} + +void __attribute__((export_name("TS_InvoiceWithExplicitSigningPubkeyBuilder_free"))) TS_InvoiceWithExplicitSigningPubkeyBuilder_free(uint64_t this_obj) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); this_obj_conv.is_owned = ptr_is_owned(this_obj); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - Quantity_free(this_obj_conv); + InvoiceWithExplicitSigningPubkeyBuilder_free(this_obj_conv); } -static inline uint64_t Quantity_clone_ptr(LDKQuantity *NONNULL_PTR arg) { - LDKQuantity ret_var = Quantity_clone(arg); +void __attribute__((export_name("TS_InvoiceWithDerivedSigningPubkeyBuilder_free"))) TS_InvoiceWithDerivedSigningPubkeyBuilder_free(uint64_t this_obj) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + InvoiceWithDerivedSigningPubkeyBuilder_free(this_obj_conv); +} + +uint64_t __attribute__((export_name("TS_InvoiceWithExplicitSigningPubkeyBuilder_build"))) TS_InvoiceWithExplicitSigningPubkeyBuilder_build(uint64_t this_arg) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = InvoiceWithExplicitSigningPubkeyBuilder_build(this_arg_conv); + return tag_ptr(ret_conv, true); +} + +void __attribute__((export_name("TS_InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry"))) TS_InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry(uint64_t this_arg, int32_t relative_expiry_secs) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry(this_arg_conv, relative_expiry_secs); +} + +void __attribute__((export_name("TS_InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh"))) TS_InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh(uint64_t this_arg, int8_tArray script_hash) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + uint8_t script_hash_arr[32]; + CHECK(script_hash->arr_len == 32); + memcpy(script_hash_arr, script_hash->elems, 32); FREE(script_hash); + uint8_t (*script_hash_ref)[32] = &script_hash_arr; + InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh(this_arg_conv, script_hash_ref); +} + +void __attribute__((export_name("TS_InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh"))) TS_InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh(uint64_t this_arg, int8_tArray pubkey_hash) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + uint8_t pubkey_hash_arr[20]; + CHECK(pubkey_hash->arr_len == 20); + memcpy(pubkey_hash_arr, pubkey_hash->elems, 20); FREE(pubkey_hash); + uint8_t (*pubkey_hash_ref)[20] = &pubkey_hash_arr; + InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh(this_arg_conv, pubkey_hash_ref); +} + +void __attribute__((export_name("TS_InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked"))) TS_InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(uint64_t this_arg, int8_tArray utput_key) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + LDKTweakedPublicKey utput_key_ref; + CHECK(utput_key->arr_len == 32); + memcpy(utput_key_ref.x_coordinate, utput_key->elems, 32); FREE(utput_key); + InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(this_arg_conv, utput_key_ref); +} + +void __attribute__((export_name("TS_InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp"))) TS_InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp(uint64_t this_arg) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp(this_arg_conv); +} + +uint64_t __attribute__((export_name("TS_InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign"))) TS_InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign(uint64_t this_arg) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign(this_arg_conv); + return tag_ptr(ret_conv, true); +} + +void __attribute__((export_name("TS_InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry"))) TS_InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry(uint64_t this_arg, int32_t relative_expiry_secs) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry(this_arg_conv, relative_expiry_secs); +} + +void __attribute__((export_name("TS_InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh"))) TS_InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh(uint64_t this_arg, int8_tArray script_hash) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + uint8_t script_hash_arr[32]; + CHECK(script_hash->arr_len == 32); + memcpy(script_hash_arr, script_hash->elems, 32); FREE(script_hash); + uint8_t (*script_hash_ref)[32] = &script_hash_arr; + InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh(this_arg_conv, script_hash_ref); +} + +void __attribute__((export_name("TS_InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh"))) TS_InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh(uint64_t this_arg, int8_tArray pubkey_hash) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + uint8_t pubkey_hash_arr[20]; + CHECK(pubkey_hash->arr_len == 20); + memcpy(pubkey_hash_arr, pubkey_hash->elems, 20); FREE(pubkey_hash); + uint8_t (*pubkey_hash_ref)[20] = &pubkey_hash_arr; + InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh(this_arg_conv, pubkey_hash_ref); +} + +void __attribute__((export_name("TS_InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked"))) TS_InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(uint64_t this_arg, int8_tArray utput_key) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + LDKTweakedPublicKey utput_key_ref; + CHECK(utput_key->arr_len == 32); + memcpy(utput_key_ref.x_coordinate, utput_key->elems, 32); FREE(utput_key); + InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(this_arg_conv, utput_key_ref); +} + +void __attribute__((export_name("TS_InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp"))) TS_InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp(uint64_t this_arg) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp(this_arg_conv); +} + +void __attribute__((export_name("TS_UnsignedBolt12Invoice_free"))) TS_UnsignedBolt12Invoice_free(uint64_t this_obj) { + LDKUnsignedBolt12Invoice this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + UnsignedBolt12Invoice_free(this_obj_conv); +} + +static inline uint64_t UnsignedBolt12Invoice_clone_ptr(LDKUnsignedBolt12Invoice *NONNULL_PTR arg) { + LDKUnsignedBolt12Invoice ret_var = UnsignedBolt12Invoice_clone(arg); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -int64_t __attribute__((export_name("TS_Quantity_clone_ptr"))) TS_Quantity_clone_ptr(uint64_t arg) { - LDKQuantity arg_conv; +int64_t __attribute__((export_name("TS_UnsignedBolt12Invoice_clone_ptr"))) TS_UnsignedBolt12Invoice_clone_ptr(uint64_t arg) { + LDKUnsignedBolt12Invoice arg_conv; arg_conv.inner = untag_ptr(arg); arg_conv.is_owned = ptr_is_owned(arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); arg_conv.is_owned = false; - int64_t ret_conv = Quantity_clone_ptr(&arg_conv); + int64_t ret_conv = UnsignedBolt12Invoice_clone_ptr(&arg_conv); return ret_conv; } -uint64_t __attribute__((export_name("TS_Quantity_clone"))) TS_Quantity_clone(uint64_t orig) { - LDKQuantity orig_conv; +uint64_t __attribute__((export_name("TS_UnsignedBolt12Invoice_clone"))) TS_UnsignedBolt12Invoice_clone(uint64_t orig) { + LDKUnsignedBolt12Invoice orig_conv; orig_conv.inner = untag_ptr(orig); orig_conv.is_owned = ptr_is_owned(orig); CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); orig_conv.is_owned = false; - LDKQuantity ret_var = Quantity_clone(&orig_conv); + LDKUnsignedBolt12Invoice ret_var = UnsignedBolt12Invoice_clone(&orig_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -uint64_t __attribute__((export_name("TS_Offer_from_str"))) TS_Offer_from_str(jstring s) { - LDKStr s_conv = str_ref_to_owned_c(s); - LDKCResult_OfferBolt12ParseErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12ParseErrorZ), "LDKCResult_OfferBolt12ParseErrorZ"); - *ret_conv = Offer_from_str(s_conv); - return tag_ptr(ret_conv, true); -} - -void __attribute__((export_name("TS_UnsignedBolt12Invoice_free"))) TS_UnsignedBolt12Invoice_free(uint64_t this_obj) { - LDKUnsignedBolt12Invoice this_obj_conv; - this_obj_conv.inner = untag_ptr(this_obj); - this_obj_conv.is_owned = ptr_is_owned(this_obj); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - UnsignedBolt12Invoice_free(this_obj_conv); +void __attribute__((export_name("TS_SignBolt12InvoiceFn_free"))) TS_SignBolt12InvoiceFn_free(uint64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKSignBolt12InvoiceFn this_ptr_conv = *(LDKSignBolt12InvoiceFn*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + SignBolt12InvoiceFn_free(this_ptr_conv); } uint64_t __attribute__((export_name("TS_UnsignedBolt12Invoice_tagged_hash"))) TS_UnsignedBolt12Invoice_tagged_hash(uint64_t this_arg) { @@ -59277,10 +64444,9 @@ uint64_t __attribute__((export_name("TS_UnsignedBolt12Invoice_amount"))) TS_Uns this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = UnsignedBolt12Invoice_amount(&this_arg_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = UnsignedBolt12Invoice_amount(&this_arg_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -59363,10 +64529,9 @@ uint64_t __attribute__((export_name("TS_UnsignedBolt12Invoice_supported_quantit this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = UnsignedBolt12Invoice_supported_quantity(&this_arg_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = UnsignedBolt12Invoice_supported_quantity(&this_arg_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -59537,10 +64702,9 @@ uint64_t __attribute__((export_name("TS_Bolt12Invoice_amount"))) TS_Bolt12Invoi this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = Bolt12Invoice_amount(&this_arg_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = Bolt12Invoice_amount(&this_arg_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -59623,10 +64787,9 @@ uint64_t __attribute__((export_name("TS_Bolt12Invoice_supported_quantity"))) TS this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = Bolt12Invoice_supported_quantity(&this_arg_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = Bolt12Invoice_supported_quantity(&this_arg_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -59794,6 +64957,16 @@ uint64_t __attribute__((export_name("TS_Bolt12Invoice_verify"))) TS_Bolt12Invoi return tag_ptr(ret_conv, true); } +int64_t __attribute__((export_name("TS_Bolt12Invoice_hash"))) TS_Bolt12Invoice_hash(uint64_t o) { + LDKBolt12Invoice o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = Bolt12Invoice_hash(&o_conv); + return ret_conv; +} + int8_tArray __attribute__((export_name("TS_UnsignedBolt12Invoice_write"))) TS_UnsignedBolt12Invoice_write(uint64_t obj) { LDKUnsignedBolt12Invoice obj_conv; obj_conv.inner = untag_ptr(obj); @@ -60277,6 +65450,142 @@ uint64_t __attribute__((export_name("TS_InvoiceError_read"))) TS_InvoiceError_r return tag_ptr(ret_conv, true); } +void __attribute__((export_name("TS_InvoiceRequestWithExplicitPayerIdBuilder_free"))) TS_InvoiceRequestWithExplicitPayerIdBuilder_free(uint64_t this_obj) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + InvoiceRequestWithExplicitPayerIdBuilder_free(this_obj_conv); +} + +void __attribute__((export_name("TS_InvoiceRequestWithDerivedPayerIdBuilder_free"))) TS_InvoiceRequestWithDerivedPayerIdBuilder_free(uint64_t this_obj) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + InvoiceRequestWithDerivedPayerIdBuilder_free(this_obj_conv); +} + +uint64_t __attribute__((export_name("TS_InvoiceRequestWithExplicitPayerIdBuilder_build"))) TS_InvoiceRequestWithExplicitPayerIdBuilder_build(uint64_t this_arg) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_build(this_arg_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_InvoiceRequestWithExplicitPayerIdBuilder_chain"))) TS_InvoiceRequestWithExplicitPayerIdBuilder_chain(uint64_t this_arg, uint32_t network) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKNetwork network_conv = LDKNetwork_from_js(network); + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_chain(this_arg_conv, network_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_InvoiceRequestWithExplicitPayerIdBuilder_amount_msats"))) TS_InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(uint64_t this_arg, int64_t amount_msats) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(this_arg_conv, amount_msats); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_InvoiceRequestWithExplicitPayerIdBuilder_quantity"))) TS_InvoiceRequestWithExplicitPayerIdBuilder_quantity(uint64_t this_arg, int64_t quantity) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_quantity(this_arg_conv, quantity); + return tag_ptr(ret_conv, true); +} + +void __attribute__((export_name("TS_InvoiceRequestWithExplicitPayerIdBuilder_payer_note"))) TS_InvoiceRequestWithExplicitPayerIdBuilder_payer_note(uint64_t this_arg, jstring payer_note) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKStr payer_note_conv = str_ref_to_owned_c(payer_note); + InvoiceRequestWithExplicitPayerIdBuilder_payer_note(this_arg_conv, payer_note_conv); +} + +uint64_t __attribute__((export_name("TS_InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign"))) TS_InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(uint64_t this_arg) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(this_arg_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_InvoiceRequestWithDerivedPayerIdBuilder_chain"))) TS_InvoiceRequestWithDerivedPayerIdBuilder_chain(uint64_t this_arg, uint32_t network) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKNetwork network_conv = LDKNetwork_from_js(network); + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_chain(this_arg_conv, network_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_InvoiceRequestWithDerivedPayerIdBuilder_amount_msats"))) TS_InvoiceRequestWithDerivedPayerIdBuilder_amount_msats(uint64_t this_arg, int64_t amount_msats) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_amount_msats(this_arg_conv, amount_msats); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_InvoiceRequestWithDerivedPayerIdBuilder_quantity"))) TS_InvoiceRequestWithDerivedPayerIdBuilder_quantity(uint64_t this_arg, int64_t quantity) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_quantity(this_arg_conv, quantity); + return tag_ptr(ret_conv, true); +} + +void __attribute__((export_name("TS_InvoiceRequestWithDerivedPayerIdBuilder_payer_note"))) TS_InvoiceRequestWithDerivedPayerIdBuilder_payer_note(uint64_t this_arg, jstring payer_note) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKStr payer_note_conv = str_ref_to_owned_c(payer_note); + InvoiceRequestWithDerivedPayerIdBuilder_payer_note(this_arg_conv, payer_note_conv); +} + void __attribute__((export_name("TS_UnsignedInvoiceRequest_free"))) TS_UnsignedInvoiceRequest_free(uint64_t this_obj) { LDKUnsignedInvoiceRequest this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -60285,6 +65594,45 @@ void __attribute__((export_name("TS_UnsignedInvoiceRequest_free"))) TS_Unsigned UnsignedInvoiceRequest_free(this_obj_conv); } +static inline uint64_t UnsignedInvoiceRequest_clone_ptr(LDKUnsignedInvoiceRequest *NONNULL_PTR arg) { + LDKUnsignedInvoiceRequest ret_var = UnsignedInvoiceRequest_clone(arg); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t __attribute__((export_name("TS_UnsignedInvoiceRequest_clone_ptr"))) TS_UnsignedInvoiceRequest_clone_ptr(uint64_t arg) { + LDKUnsignedInvoiceRequest arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = UnsignedInvoiceRequest_clone_ptr(&arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_UnsignedInvoiceRequest_clone"))) TS_UnsignedInvoiceRequest_clone(uint64_t orig) { + LDKUnsignedInvoiceRequest orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKUnsignedInvoiceRequest ret_var = UnsignedInvoiceRequest_clone(&orig_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void __attribute__((export_name("TS_SignInvoiceRequestFn_free"))) TS_SignInvoiceRequestFn_free(uint64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKSignInvoiceRequestFn this_ptr_conv = *(LDKSignInvoiceRequestFn*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + SignInvoiceRequestFn_free(this_ptr_conv); +} + uint64_t __attribute__((export_name("TS_UnsignedInvoiceRequest_tagged_hash"))) TS_UnsignedInvoiceRequest_tagged_hash(uint64_t this_arg) { LDKUnsignedInvoiceRequest this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -60344,6 +65692,33 @@ void __attribute__((export_name("TS_VerifiedInvoiceRequest_free"))) TS_Verified VerifiedInvoiceRequest_free(this_obj_conv); } +uint64_t __attribute__((export_name("TS_VerifiedInvoiceRequest_get_offer_id"))) TS_VerifiedInvoiceRequest_get_offer_id(uint64_t this_ptr) { + LDKVerifiedInvoiceRequest this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKOfferId ret_var = VerifiedInvoiceRequest_get_offer_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void __attribute__((export_name("TS_VerifiedInvoiceRequest_set_offer_id"))) TS_VerifiedInvoiceRequest_set_offer_id(uint64_t this_ptr, uint64_t val) { + LDKVerifiedInvoiceRequest this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKOfferId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = OfferId_clone(&val_conv); + VerifiedInvoiceRequest_set_offer_id(&this_ptr_conv, val_conv); +} + uint64_t __attribute__((export_name("TS_VerifiedInvoiceRequest_get_keys"))) TS_VerifiedInvoiceRequest_get_keys(uint64_t this_ptr) { LDKVerifiedInvoiceRequest this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -60437,10 +65812,9 @@ uint64_t __attribute__((export_name("TS_UnsignedInvoiceRequest_amount"))) TS_Un this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = UnsignedInvoiceRequest_amount(&this_arg_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = UnsignedInvoiceRequest_amount(&this_arg_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -60523,10 +65897,9 @@ uint64_t __attribute__((export_name("TS_UnsignedInvoiceRequest_supported_quanti this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = UnsignedInvoiceRequest_supported_quantity(&this_arg_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = UnsignedInvoiceRequest_supported_quantity(&this_arg_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -60663,10 +66036,9 @@ uint64_t __attribute__((export_name("TS_InvoiceRequest_amount"))) TS_InvoiceReq this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = InvoiceRequest_amount(&this_arg_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = InvoiceRequest_amount(&this_arg_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -60749,10 +66121,9 @@ uint64_t __attribute__((export_name("TS_InvoiceRequest_supported_quantity"))) T this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = InvoiceRequest_supported_quantity(&this_arg_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = InvoiceRequest_supported_quantity(&this_arg_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -60851,15 +66222,34 @@ uint64_t __attribute__((export_name("TS_InvoiceRequest_payer_note"))) TS_Invoic return ret_ref; } -int8_tArray __attribute__((export_name("TS_InvoiceRequest_signature"))) TS_InvoiceRequest_signature(uint64_t this_arg) { +uint64_t __attribute__((export_name("TS_InvoiceRequest_respond_with_no_std"))) TS_InvoiceRequest_respond_with_no_std(uint64_t this_arg, uint64_tArray payment_paths, int8_tArray payment_hash, int64_t created_at) { LDKInvoiceRequest this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(64, __LINE__); - memcpy(ret_arr->elems, InvoiceRequest_signature(&this_arg_conv).compact_form, 64); - return ret_arr; + LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr; + payment_paths_constr.datalen = payment_paths->arr_len; + if (payment_paths_constr.datalen > 0) + payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements"); + else + payment_paths_constr.data = NULL; + uint64_t* payment_paths_vals = payment_paths->elems; + for (size_t l = 0; l < payment_paths_constr.datalen; l++) { + uint64_t payment_paths_conv_37 = payment_paths_vals[l]; + void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37); + CHECK_ACCESS(payment_paths_conv_37_ptr); + LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr); + payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37)); + payment_paths_constr.data[l] = payment_paths_conv_37_conv; + } + FREE(payment_paths); + LDKThirtyTwoBytes payment_hash_ref; + CHECK(payment_hash->arr_len == 32); + memcpy(payment_hash_ref.data, payment_hash->elems, 32); FREE(payment_hash); + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequest_respond_with_no_std(&this_arg_conv, payment_paths_constr, payment_hash_ref, created_at); + return tag_ptr(ret_conv, true); } uint64_t __attribute__((export_name("TS_InvoiceRequest_verify"))) TS_InvoiceRequest_verify(uint64_t this_arg, uint64_t key) { @@ -60878,6 +66268,17 @@ uint64_t __attribute__((export_name("TS_InvoiceRequest_verify"))) TS_InvoiceReq return tag_ptr(ret_conv, true); } +int8_tArray __attribute__((export_name("TS_InvoiceRequest_signature"))) TS_InvoiceRequest_signature(uint64_t this_arg) { + LDKInvoiceRequest this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(64, __LINE__); + memcpy(ret_arr->elems, InvoiceRequest_signature(&this_arg_conv).compact_form, 64); + return ret_arr; +} + ptrArray __attribute__((export_name("TS_VerifiedInvoiceRequest_chains"))) TS_VerifiedInvoiceRequest_chains(uint64_t this_arg) { LDKVerifiedInvoiceRequest this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -60916,10 +66317,9 @@ uint64_t __attribute__((export_name("TS_VerifiedInvoiceRequest_amount"))) TS_Ve this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = VerifiedInvoiceRequest_amount(&this_arg_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = VerifiedInvoiceRequest_amount(&this_arg_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -61002,10 +66402,9 @@ uint64_t __attribute__((export_name("TS_VerifiedInvoiceRequest_supported_quanti this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = VerifiedInvoiceRequest_supported_quantity(&this_arg_conv); - uint64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = VerifiedInvoiceRequest_supported_quantity(&this_arg_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -61104,6 +66503,66 @@ uint64_t __attribute__((export_name("TS_VerifiedInvoiceRequest_payer_note"))) T return ret_ref; } +uint64_t __attribute__((export_name("TS_VerifiedInvoiceRequest_respond_with_no_std"))) TS_VerifiedInvoiceRequest_respond_with_no_std(uint64_t this_arg, uint64_tArray payment_paths, int8_tArray payment_hash, int64_t created_at) { + LDKVerifiedInvoiceRequest this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr; + payment_paths_constr.datalen = payment_paths->arr_len; + if (payment_paths_constr.datalen > 0) + payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements"); + else + payment_paths_constr.data = NULL; + uint64_t* payment_paths_vals = payment_paths->elems; + for (size_t l = 0; l < payment_paths_constr.datalen; l++) { + uint64_t payment_paths_conv_37 = payment_paths_vals[l]; + void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37); + CHECK_ACCESS(payment_paths_conv_37_ptr); + LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr); + payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37)); + payment_paths_constr.data[l] = payment_paths_conv_37_conv; + } + FREE(payment_paths); + LDKThirtyTwoBytes payment_hash_ref; + CHECK(payment_hash->arr_len == 32); + memcpy(payment_hash_ref.data, payment_hash->elems, 32); FREE(payment_hash); + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = VerifiedInvoiceRequest_respond_with_no_std(&this_arg_conv, payment_paths_constr, payment_hash_ref, created_at); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_VerifiedInvoiceRequest_respond_using_derived_keys_no_std"))) TS_VerifiedInvoiceRequest_respond_using_derived_keys_no_std(uint64_t this_arg, uint64_tArray payment_paths, int8_tArray payment_hash, int64_t created_at) { + LDKVerifiedInvoiceRequest this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr; + payment_paths_constr.datalen = payment_paths->arr_len; + if (payment_paths_constr.datalen > 0) + payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements"); + else + payment_paths_constr.data = NULL; + uint64_t* payment_paths_vals = payment_paths->elems; + for (size_t l = 0; l < payment_paths_constr.datalen; l++) { + uint64_t payment_paths_conv_37 = payment_paths_vals[l]; + void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37); + CHECK_ACCESS(payment_paths_conv_37_ptr); + LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr); + payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37)); + payment_paths_constr.data[l] = payment_paths_conv_37_conv; + } + FREE(payment_paths); + LDKThirtyTwoBytes payment_hash_ref; + CHECK(payment_hash->arr_len == 32); + memcpy(payment_hash_ref.data, payment_hash->elems, 32); FREE(payment_hash); + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = VerifiedInvoiceRequest_respond_using_derived_keys_no_std(&this_arg_conv, payment_paths_constr, payment_hash_ref, created_at); + return tag_ptr(ret_conv, true); +} + int8_tArray __attribute__((export_name("TS_UnsignedInvoiceRequest_write"))) TS_UnsignedInvoiceRequest_write(uint64_t obj) { LDKUnsignedInvoiceRequest obj_conv; obj_conv.inner = untag_ptr(obj); @@ -61130,6 +66589,177 @@ int8_tArray __attribute__((export_name("TS_InvoiceRequest_write"))) TS_InvoiceR return ret_arr; } +void __attribute__((export_name("TS_InvoiceRequestFields_free"))) TS_InvoiceRequestFields_free(uint64_t this_obj) { + LDKInvoiceRequestFields this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + InvoiceRequestFields_free(this_obj_conv); +} + +int8_tArray __attribute__((export_name("TS_InvoiceRequestFields_get_payer_id"))) TS_InvoiceRequestFields_get_payer_id(uint64_t this_ptr) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(33, __LINE__); + memcpy(ret_arr->elems, InvoiceRequestFields_get_payer_id(&this_ptr_conv).compressed_form, 33); + return ret_arr; +} + +void __attribute__((export_name("TS_InvoiceRequestFields_set_payer_id"))) TS_InvoiceRequestFields_set_payer_id(uint64_t this_ptr, int8_tArray val) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKPublicKey val_ref; + CHECK(val->arr_len == 33); + memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); + InvoiceRequestFields_set_payer_id(&this_ptr_conv, val_ref); +} + +uint64_t __attribute__((export_name("TS_InvoiceRequestFields_get_quantity"))) TS_InvoiceRequestFields_get_quantity(uint64_t this_ptr) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z"); + *ret_copy = InvoiceRequestFields_get_quantity(&this_ptr_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void __attribute__((export_name("TS_InvoiceRequestFields_set_quantity"))) TS_InvoiceRequestFields_set_quantity(uint64_t this_ptr, uint64_t val) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKCOption_u64Z val_conv = *(LDKCOption_u64Z*)(val_ptr); + val_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(val)); + InvoiceRequestFields_set_quantity(&this_ptr_conv, val_conv); +} + +uint64_t __attribute__((export_name("TS_InvoiceRequestFields_get_payer_note_truncated"))) TS_InvoiceRequestFields_get_payer_note_truncated(uint64_t this_ptr) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKUntrustedString ret_var = InvoiceRequestFields_get_payer_note_truncated(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void __attribute__((export_name("TS_InvoiceRequestFields_set_payer_note_truncated"))) TS_InvoiceRequestFields_set_payer_note_truncated(uint64_t this_ptr, uint64_t val) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKUntrustedString val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = UntrustedString_clone(&val_conv); + InvoiceRequestFields_set_payer_note_truncated(&this_ptr_conv, val_conv); +} + +uint64_t __attribute__((export_name("TS_InvoiceRequestFields_new"))) TS_InvoiceRequestFields_new(int8_tArray payer_id_arg, uint64_t quantity_arg, uint64_t payer_note_truncated_arg) { + LDKPublicKey payer_id_arg_ref; + CHECK(payer_id_arg->arr_len == 33); + memcpy(payer_id_arg_ref.compressed_form, payer_id_arg->elems, 33); FREE(payer_id_arg); + void* quantity_arg_ptr = untag_ptr(quantity_arg); + CHECK_ACCESS(quantity_arg_ptr); + LDKCOption_u64Z quantity_arg_conv = *(LDKCOption_u64Z*)(quantity_arg_ptr); + quantity_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(quantity_arg)); + LDKUntrustedString payer_note_truncated_arg_conv; + payer_note_truncated_arg_conv.inner = untag_ptr(payer_note_truncated_arg); + payer_note_truncated_arg_conv.is_owned = ptr_is_owned(payer_note_truncated_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(payer_note_truncated_arg_conv); + payer_note_truncated_arg_conv = UntrustedString_clone(&payer_note_truncated_arg_conv); + LDKInvoiceRequestFields ret_var = InvoiceRequestFields_new(payer_id_arg_ref, quantity_arg_conv, payer_note_truncated_arg_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t InvoiceRequestFields_clone_ptr(LDKInvoiceRequestFields *NONNULL_PTR arg) { + LDKInvoiceRequestFields ret_var = InvoiceRequestFields_clone(arg); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t __attribute__((export_name("TS_InvoiceRequestFields_clone_ptr"))) TS_InvoiceRequestFields_clone_ptr(uint64_t arg) { + LDKInvoiceRequestFields arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = InvoiceRequestFields_clone_ptr(&arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_InvoiceRequestFields_clone"))) TS_InvoiceRequestFields_clone(uint64_t orig) { + LDKInvoiceRequestFields orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKInvoiceRequestFields ret_var = InvoiceRequestFields_clone(&orig_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +jboolean __attribute__((export_name("TS_InvoiceRequestFields_eq"))) TS_InvoiceRequestFields_eq(uint64_t a, uint64_t b) { + LDKInvoiceRequestFields a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKInvoiceRequestFields b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = InvoiceRequestFields_eq(&a_conv, &b_conv); + return ret_conv; +} + +int8_tArray __attribute__((export_name("TS_InvoiceRequestFields_write"))) TS_InvoiceRequestFields_write(uint64_t obj) { + LDKInvoiceRequestFields obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = InvoiceRequestFields_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +uint64_t __attribute__((export_name("TS_InvoiceRequestFields_read"))) TS_InvoiceRequestFields_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ"); + *ret_conv = InvoiceRequestFields_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + void __attribute__((export_name("TS_TaggedHash_free"))) TS_TaggedHash_free(uint64_t this_obj) { LDKTaggedHash this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -61202,6 +66832,50 @@ int8_tArray __attribute__((export_name("TS_TaggedHash_merkle_root"))) TS_Tagged return ret_arr; } +void __attribute__((export_name("TS_SignError_free"))) TS_SignError_free(uint64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKSignError this_ptr_conv = *(LDKSignError*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + SignError_free(this_ptr_conv); +} + +static inline uint64_t SignError_clone_ptr(LDKSignError *NONNULL_PTR arg) { + LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError"); + *ret_copy = SignError_clone(arg); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t __attribute__((export_name("TS_SignError_clone_ptr"))) TS_SignError_clone_ptr(uint64_t arg) { + LDKSignError* arg_conv = (LDKSignError*)untag_ptr(arg); + int64_t ret_conv = SignError_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_SignError_clone"))) TS_SignError_clone(uint64_t orig) { + LDKSignError* orig_conv = (LDKSignError*)untag_ptr(orig); + LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError"); + *ret_copy = SignError_clone(orig_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_SignError_signing"))) TS_SignError_signing() { + LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError"); + *ret_copy = SignError_signing(); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_SignError_verification"))) TS_SignError_verification(uint32_t a) { + LDKSecp256k1Error a_conv = LDKSecp256k1Error_from_js(a); + LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError"); + *ret_copy = SignError_verification(a_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + void __attribute__((export_name("TS_Bolt12ParseError_free"))) TS_Bolt12ParseError_free(uint64_t this_obj) { LDKBolt12ParseError this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -61361,6 +67035,11 @@ uint32_t __attribute__((export_name("TS_Bolt12SemanticError_missing_paths"))) T return ret_conv; } +uint32_t __attribute__((export_name("TS_Bolt12SemanticError_unexpected_paths"))) TS_Bolt12SemanticError_unexpected_paths() { + uint32_t ret_conv = LDKBolt12SemanticError_to_js(Bolt12SemanticError_unexpected_paths()); + return ret_conv; +} + uint32_t __attribute__((export_name("TS_Bolt12SemanticError_invalid_pay_info"))) TS_Bolt12SemanticError_invalid_pay_info() { uint32_t ret_conv = LDKBolt12SemanticError_to_js(Bolt12SemanticError_invalid_pay_info()); return ret_conv; @@ -61381,6 +67060,164 @@ uint32_t __attribute__((export_name("TS_Bolt12SemanticError_missing_signature") return ret_conv; } +void __attribute__((export_name("TS_RefundMaybeWithDerivedMetadataBuilder_free"))) TS_RefundMaybeWithDerivedMetadataBuilder_free(uint64_t this_obj) { + LDKRefundMaybeWithDerivedMetadataBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + RefundMaybeWithDerivedMetadataBuilder_free(this_obj_conv); +} + +static inline uint64_t RefundMaybeWithDerivedMetadataBuilder_clone_ptr(LDKRefundMaybeWithDerivedMetadataBuilder *NONNULL_PTR arg) { + LDKRefundMaybeWithDerivedMetadataBuilder ret_var = RefundMaybeWithDerivedMetadataBuilder_clone(arg); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t __attribute__((export_name("TS_RefundMaybeWithDerivedMetadataBuilder_clone_ptr"))) TS_RefundMaybeWithDerivedMetadataBuilder_clone_ptr(uint64_t arg) { + LDKRefundMaybeWithDerivedMetadataBuilder arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = RefundMaybeWithDerivedMetadataBuilder_clone_ptr(&arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_RefundMaybeWithDerivedMetadataBuilder_clone"))) TS_RefundMaybeWithDerivedMetadataBuilder_clone(uint64_t orig) { + LDKRefundMaybeWithDerivedMetadataBuilder orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKRefundMaybeWithDerivedMetadataBuilder ret_var = RefundMaybeWithDerivedMetadataBuilder_clone(&orig_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_RefundMaybeWithDerivedMetadataBuilder_new"))) TS_RefundMaybeWithDerivedMetadataBuilder_new(int8_tArray metadata, int8_tArray payer_id, int64_t amount_msats) { + LDKCVec_u8Z metadata_ref; + metadata_ref.datalen = metadata->arr_len; + metadata_ref.data = MALLOC(metadata_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(metadata_ref.data, metadata->elems, metadata_ref.datalen); FREE(metadata); + LDKPublicKey payer_id_ref; + CHECK(payer_id->arr_len == 33); + memcpy(payer_id_ref.compressed_form, payer_id->elems, 33); FREE(payer_id); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = RefundMaybeWithDerivedMetadataBuilder_new(metadata_ref, payer_id_ref, amount_msats); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id"))) TS_RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(int8_tArray node_id, uint64_t expanded_key, uint64_t entropy_source, int64_t amount_msats, int8_tArray payment_id) { + LDKPublicKey node_id_ref; + CHECK(node_id->arr_len == 33); + memcpy(node_id_ref.compressed_form, node_id->elems, 33); FREE(node_id); + LDKExpandedKey expanded_key_conv; + expanded_key_conv.inner = untag_ptr(expanded_key); + expanded_key_conv.is_owned = ptr_is_owned(expanded_key); + CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv); + expanded_key_conv.is_owned = false; + void* entropy_source_ptr = untag_ptr(entropy_source); + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } + LDKThirtyTwoBytes payment_id_ref; + CHECK(payment_id->arr_len == 32); + memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(node_id_ref, &expanded_key_conv, entropy_source_conv, amount_msats, payment_id_ref); + return tag_ptr(ret_conv, true); +} + +void __attribute__((export_name("TS_RefundMaybeWithDerivedMetadataBuilder_description"))) TS_RefundMaybeWithDerivedMetadataBuilder_description(uint64_t this_arg, jstring description) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKStr description_conv = str_ref_to_owned_c(description); + RefundMaybeWithDerivedMetadataBuilder_description(this_arg_conv, description_conv); +} + +void __attribute__((export_name("TS_RefundMaybeWithDerivedMetadataBuilder_absolute_expiry"))) TS_RefundMaybeWithDerivedMetadataBuilder_absolute_expiry(uint64_t this_arg, int64_t absolute_expiry) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + RefundMaybeWithDerivedMetadataBuilder_absolute_expiry(this_arg_conv, absolute_expiry); +} + +void __attribute__((export_name("TS_RefundMaybeWithDerivedMetadataBuilder_issuer"))) TS_RefundMaybeWithDerivedMetadataBuilder_issuer(uint64_t this_arg, jstring issuer) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKStr issuer_conv = str_ref_to_owned_c(issuer); + RefundMaybeWithDerivedMetadataBuilder_issuer(this_arg_conv, issuer_conv); +} + +void __attribute__((export_name("TS_RefundMaybeWithDerivedMetadataBuilder_path"))) TS_RefundMaybeWithDerivedMetadataBuilder_path(uint64_t this_arg, uint64_t path) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKBlindedPath path_conv; + path_conv.inner = untag_ptr(path); + path_conv.is_owned = ptr_is_owned(path); + CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv); + path_conv = BlindedPath_clone(&path_conv); + RefundMaybeWithDerivedMetadataBuilder_path(this_arg_conv, path_conv); +} + +void __attribute__((export_name("TS_RefundMaybeWithDerivedMetadataBuilder_chain"))) TS_RefundMaybeWithDerivedMetadataBuilder_chain(uint64_t this_arg, uint32_t network) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKNetwork network_conv = LDKNetwork_from_js(network); + RefundMaybeWithDerivedMetadataBuilder_chain(this_arg_conv, network_conv); +} + +void __attribute__((export_name("TS_RefundMaybeWithDerivedMetadataBuilder_quantity"))) TS_RefundMaybeWithDerivedMetadataBuilder_quantity(uint64_t this_arg, int64_t quantity) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + RefundMaybeWithDerivedMetadataBuilder_quantity(this_arg_conv, quantity); +} + +void __attribute__((export_name("TS_RefundMaybeWithDerivedMetadataBuilder_payer_note"))) TS_RefundMaybeWithDerivedMetadataBuilder_payer_note(uint64_t this_arg, jstring payer_note) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKStr payer_note_conv = str_ref_to_owned_c(payer_note); + RefundMaybeWithDerivedMetadataBuilder_payer_note(this_arg_conv, payer_note_conv); +} + +uint64_t __attribute__((export_name("TS_RefundMaybeWithDerivedMetadataBuilder_build"))) TS_RefundMaybeWithDerivedMetadataBuilder_build(uint64_t this_arg) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ"); + *ret_conv = RefundMaybeWithDerivedMetadataBuilder_build(this_arg_conv); + return tag_ptr(ret_conv, true); +} + void __attribute__((export_name("TS_Refund_free"))) TS_Refund_free(uint64_t this_obj) { LDKRefund this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -61571,6 +67408,16 @@ uint64_t __attribute__((export_name("TS_Refund_payer_note"))) TS_Refund_payer_n return ret_ref; } +int64_t __attribute__((export_name("TS_Refund_hash"))) TS_Refund_hash(uint64_t o) { + LDKRefund o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = Refund_hash(&o_conv); + return ret_conv; +} + int8_tArray __attribute__((export_name("TS_Refund_write"))) TS_Refund_write(uint64_t obj) { LDKRefund obj_conv; obj_conv.inner = untag_ptr(obj); @@ -61802,6 +67649,16 @@ uint64_t __attribute__((export_name("TS_NodeId_from_pubkey"))) TS_NodeId_from_p return ret_ref; } +uint64_t __attribute__((export_name("TS_NodeId_from_slice"))) TS_NodeId_from_slice(int8_tArray bytes) { + LDKu8slice bytes_ref; + bytes_ref.datalen = bytes->arr_len; + bytes_ref.data = bytes->elems; + LDKCResult_NodeIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeIdDecodeErrorZ), "LDKCResult_NodeIdDecodeErrorZ"); + *ret_conv = NodeId_from_slice(bytes_ref); + FREE(bytes); + return tag_ptr(ret_conv, true); +} + int8_tArray __attribute__((export_name("TS_NodeId_as_slice"))) TS_NodeId_as_slice(uint64_t this_arg) { LDKNodeId this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -62675,6 +68532,32 @@ uint64_t __attribute__((export_name("TS_DirectedChannelInfo_effective_capacity" return ret_ref; } +uint64_t __attribute__((export_name("TS_DirectedChannelInfo_source"))) TS_DirectedChannelInfo_source(uint64_t this_arg) { + LDKDirectedChannelInfo this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKNodeId ret_var = DirectedChannelInfo_source(&this_arg_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_DirectedChannelInfo_target"))) TS_DirectedChannelInfo_target(uint64_t this_arg) { + LDKDirectedChannelInfo this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKNodeId ret_var = DirectedChannelInfo_target(&this_arg_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + void __attribute__((export_name("TS_EffectiveCapacity_free"))) TS_EffectiveCapacity_free(uint64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -63395,6 +69278,16 @@ jboolean __attribute__((export_name("TS_NodeInfo_eq"))) TS_NodeInfo_eq(uint64_t return ret_conv; } +jboolean __attribute__((export_name("TS_NodeInfo_is_tor_only"))) TS_NodeInfo_is_tor_only(uint64_t this_arg) { + LDKNodeInfo this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = NodeInfo_is_tor_only(&this_arg_conv); + return ret_conv; +} + int8_tArray __attribute__((export_name("TS_NodeInfo_write"))) TS_NodeInfo_write(uint64_t obj) { LDKNodeInfo obj_conv; obj_conv.inner = untag_ptr(obj); @@ -67542,7 +73435,34 @@ void __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_set_channel_ DelayedPaymentOutputDescriptor_set_channel_value_satoshis(&this_ptr_conv, val); } -uint64_t __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_new"))) TS_DelayedPaymentOutputDescriptor_new(uint64_t outpoint_arg, int8_tArray per_commitment_point_arg, int16_t to_self_delay_arg, uint64_t output_arg, uint64_t revocation_pubkey_arg, int8_tArray channel_keys_id_arg, int64_t channel_value_satoshis_arg) { +uint64_t __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_get_channel_transaction_parameters"))) TS_DelayedPaymentOutputDescriptor_get_channel_transaction_parameters(uint64_t this_ptr) { + LDKDelayedPaymentOutputDescriptor this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelTransactionParameters ret_var = DelayedPaymentOutputDescriptor_get_channel_transaction_parameters(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_set_channel_transaction_parameters"))) TS_DelayedPaymentOutputDescriptor_set_channel_transaction_parameters(uint64_t this_ptr, uint64_t val) { + LDKDelayedPaymentOutputDescriptor this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelTransactionParameters val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelTransactionParameters_clone(&val_conv); + DelayedPaymentOutputDescriptor_set_channel_transaction_parameters(&this_ptr_conv, val_conv); +} + +uint64_t __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_new"))) TS_DelayedPaymentOutputDescriptor_new(uint64_t outpoint_arg, int8_tArray per_commitment_point_arg, int16_t to_self_delay_arg, uint64_t output_arg, uint64_t revocation_pubkey_arg, int8_tArray channel_keys_id_arg, int64_t channel_value_satoshis_arg, uint64_t channel_transaction_parameters_arg) { LDKOutPoint outpoint_arg_conv; outpoint_arg_conv.inner = untag_ptr(outpoint_arg); outpoint_arg_conv.is_owned = ptr_is_owned(outpoint_arg); @@ -67563,7 +73483,12 @@ uint64_t __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_new"))) LDKThirtyTwoBytes channel_keys_id_arg_ref; CHECK(channel_keys_id_arg->arr_len == 32); memcpy(channel_keys_id_arg_ref.data, channel_keys_id_arg->elems, 32); FREE(channel_keys_id_arg); - LDKDelayedPaymentOutputDescriptor ret_var = DelayedPaymentOutputDescriptor_new(outpoint_arg_conv, per_commitment_point_arg_ref, to_self_delay_arg, output_arg_conv, revocation_pubkey_arg_conv, channel_keys_id_arg_ref, channel_value_satoshis_arg); + LDKChannelTransactionParameters channel_transaction_parameters_arg_conv; + channel_transaction_parameters_arg_conv.inner = untag_ptr(channel_transaction_parameters_arg); + channel_transaction_parameters_arg_conv.is_owned = ptr_is_owned(channel_transaction_parameters_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_transaction_parameters_arg_conv); + channel_transaction_parameters_arg_conv = ChannelTransactionParameters_clone(&channel_transaction_parameters_arg_conv); + LDKDelayedPaymentOutputDescriptor ret_var = DelayedPaymentOutputDescriptor_new(outpoint_arg_conv, per_commitment_point_arg_ref, to_self_delay_arg, output_arg_conv, revocation_pubkey_arg_conv, channel_keys_id_arg_ref, channel_value_satoshis_arg, channel_transaction_parameters_arg_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -68247,6 +74172,29 @@ void __attribute__((export_name("TS_HTLCDescriptor_set_channel_derivation_param HTLCDescriptor_set_channel_derivation_parameters(&this_ptr_conv, val_conv); } +int8_tArray __attribute__((export_name("TS_HTLCDescriptor_get_commitment_txid"))) TS_HTLCDescriptor_get_commitment_txid(uint64_t this_ptr) { + LDKHTLCDescriptor this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(32, __LINE__); + memcpy(ret_arr->elems, *HTLCDescriptor_get_commitment_txid(&this_ptr_conv), 32); + return ret_arr; +} + +void __attribute__((export_name("TS_HTLCDescriptor_set_commitment_txid"))) TS_HTLCDescriptor_set_commitment_txid(uint64_t this_ptr, int8_tArray val) { + LDKHTLCDescriptor this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKThirtyTwoBytes val_ref; + CHECK(val->arr_len == 32); + memcpy(val_ref.data, val->elems, 32); FREE(val); + HTLCDescriptor_set_commitment_txid(&this_ptr_conv, val_ref); +} + int64_t __attribute__((export_name("TS_HTLCDescriptor_get_per_commitment_number"))) TS_HTLCDescriptor_get_per_commitment_number(uint64_t this_ptr) { LDKHTLCDescriptor this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -68383,6 +74331,37 @@ void __attribute__((export_name("TS_HTLCDescriptor_set_counterparty_sig"))) TS_ HTLCDescriptor_set_counterparty_sig(&this_ptr_conv, val_ref); } +uint64_t __attribute__((export_name("TS_HTLCDescriptor_new"))) TS_HTLCDescriptor_new(uint64_t channel_derivation_parameters_arg, int8_tArray commitment_txid_arg, int64_t per_commitment_number_arg, int8_tArray per_commitment_point_arg, int32_t feerate_per_kw_arg, uint64_t htlc_arg, uint64_t preimage_arg, int8_tArray counterparty_sig_arg) { + LDKChannelDerivationParameters channel_derivation_parameters_arg_conv; + channel_derivation_parameters_arg_conv.inner = untag_ptr(channel_derivation_parameters_arg); + channel_derivation_parameters_arg_conv.is_owned = ptr_is_owned(channel_derivation_parameters_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_derivation_parameters_arg_conv); + channel_derivation_parameters_arg_conv = ChannelDerivationParameters_clone(&channel_derivation_parameters_arg_conv); + LDKThirtyTwoBytes commitment_txid_arg_ref; + CHECK(commitment_txid_arg->arr_len == 32); + memcpy(commitment_txid_arg_ref.data, commitment_txid_arg->elems, 32); FREE(commitment_txid_arg); + LDKPublicKey per_commitment_point_arg_ref; + CHECK(per_commitment_point_arg->arr_len == 33); + memcpy(per_commitment_point_arg_ref.compressed_form, per_commitment_point_arg->elems, 33); FREE(per_commitment_point_arg); + LDKHTLCOutputInCommitment htlc_arg_conv; + htlc_arg_conv.inner = untag_ptr(htlc_arg); + htlc_arg_conv.is_owned = ptr_is_owned(htlc_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(htlc_arg_conv); + htlc_arg_conv = HTLCOutputInCommitment_clone(&htlc_arg_conv); + void* preimage_arg_ptr = untag_ptr(preimage_arg); + CHECK_ACCESS(preimage_arg_ptr); + LDKCOption_ThirtyTwoBytesZ preimage_arg_conv = *(LDKCOption_ThirtyTwoBytesZ*)(preimage_arg_ptr); + preimage_arg_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(preimage_arg)); + LDKECDSASignature counterparty_sig_arg_ref; + CHECK(counterparty_sig_arg->arr_len == 64); + memcpy(counterparty_sig_arg_ref.compact_form, counterparty_sig_arg->elems, 64); FREE(counterparty_sig_arg); + LDKHTLCDescriptor ret_var = HTLCDescriptor_new(channel_derivation_parameters_arg_conv, commitment_txid_arg_ref, per_commitment_number_arg, per_commitment_point_arg_ref, feerate_per_kw_arg, htlc_arg_conv, preimage_arg_conv, counterparty_sig_arg_ref); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + static inline uint64_t HTLCDescriptor_clone_ptr(LDKHTLCDescriptor *NONNULL_PTR arg) { LDKHTLCDescriptor ret_var = HTLCDescriptor_clone(arg); uint64_t ret_ref = 0; @@ -68587,6 +74566,15 @@ void __attribute__((export_name("TS_NodeSigner_free"))) TS_NodeSigner_free(uint NodeSigner_free(this_ptr_conv); } +void __attribute__((export_name("TS_OutputSpender_free"))) TS_OutputSpender_free(uint64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKOutputSpender this_ptr_conv = *(LDKOutputSpender*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + OutputSpender_free(this_ptr_conv); +} + void __attribute__((export_name("TS_SignerProvider_free"))) TS_SignerProvider_free(uint64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -68596,6 +74584,15 @@ void __attribute__((export_name("TS_SignerProvider_free"))) TS_SignerProvider_f SignerProvider_free(this_ptr_conv); } +void __attribute__((export_name("TS_ChangeDestinationSource_free"))) TS_ChangeDestinationSource_free(uint64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKChangeDestinationSource this_ptr_conv = *(LDKChangeDestinationSource*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + ChangeDestinationSource_free(this_ptr_conv); +} + void __attribute__((export_name("TS_InMemorySigner_free"))) TS_InMemorySigner_free(uint64_t this_obj) { LDKInMemorySigner this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -69087,76 +75084,36 @@ uint64_t __attribute__((export_name("TS_KeysManager_sign_spendable_outputs_psbt return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_KeysManager_spend_spendable_outputs"))) TS_KeysManager_spend_spendable_outputs(uint64_t this_arg, uint64_tArray descriptors, uint64_tArray outputs, int8_tArray change_destination_script, int32_t feerate_sat_per_1000_weight, uint64_t locktime) { +uint64_t __attribute__((export_name("TS_KeysManager_as_EntropySource"))) TS_KeysManager_as_EntropySource(uint64_t this_arg) { LDKKeysManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKCVec_SpendableOutputDescriptorZ descriptors_constr; - descriptors_constr.datalen = descriptors->arr_len; - if (descriptors_constr.datalen > 0) - descriptors_constr.data = MALLOC(descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements"); - else - descriptors_constr.data = NULL; - uint64_t* descriptors_vals = descriptors->elems; - for (size_t b = 0; b < descriptors_constr.datalen; b++) { - uint64_t descriptors_conv_27 = descriptors_vals[b]; - void* descriptors_conv_27_ptr = untag_ptr(descriptors_conv_27); - CHECK_ACCESS(descriptors_conv_27_ptr); - LDKSpendableOutputDescriptor descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(descriptors_conv_27_ptr); - descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptors_conv_27)); - descriptors_constr.data[b] = descriptors_conv_27_conv; - } - FREE(descriptors); - LDKCVec_TxOutZ outputs_constr; - outputs_constr.datalen = outputs->arr_len; - if (outputs_constr.datalen > 0) - outputs_constr.data = MALLOC(outputs_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements"); - else - outputs_constr.data = NULL; - uint64_t* outputs_vals = outputs->elems; - for (size_t h = 0; h < outputs_constr.datalen; h++) { - uint64_t outputs_conv_7 = outputs_vals[h]; - void* outputs_conv_7_ptr = untag_ptr(outputs_conv_7); - CHECK_ACCESS(outputs_conv_7_ptr); - LDKTxOut outputs_conv_7_conv = *(LDKTxOut*)(outputs_conv_7_ptr); - outputs_conv_7_conv = TxOut_clone((LDKTxOut*)untag_ptr(outputs_conv_7)); - outputs_constr.data[h] = outputs_conv_7_conv; - } - FREE(outputs); - LDKCVec_u8Z change_destination_script_ref; - change_destination_script_ref.datalen = change_destination_script->arr_len; - change_destination_script_ref.data = MALLOC(change_destination_script_ref.datalen, "LDKCVec_u8Z Bytes"); - memcpy(change_destination_script_ref.data, change_destination_script->elems, change_destination_script_ref.datalen); FREE(change_destination_script); - void* locktime_ptr = untag_ptr(locktime); - CHECK_ACCESS(locktime_ptr); - LDKCOption_u32Z locktime_conv = *(LDKCOption_u32Z*)(locktime_ptr); - locktime_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(locktime)); - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = KeysManager_spend_spendable_outputs(&this_arg_conv, descriptors_constr, outputs_constr, change_destination_script_ref, feerate_sat_per_1000_weight, locktime_conv); - return tag_ptr(ret_conv, true); + LDKEntropySource* ret_ret = MALLOC(sizeof(LDKEntropySource), "LDKEntropySource"); + *ret_ret = KeysManager_as_EntropySource(&this_arg_conv); + return tag_ptr(ret_ret, true); } -uint64_t __attribute__((export_name("TS_KeysManager_as_EntropySource"))) TS_KeysManager_as_EntropySource(uint64_t this_arg) { +uint64_t __attribute__((export_name("TS_KeysManager_as_NodeSigner"))) TS_KeysManager_as_NodeSigner(uint64_t this_arg) { LDKKeysManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKEntropySource* ret_ret = MALLOC(sizeof(LDKEntropySource), "LDKEntropySource"); - *ret_ret = KeysManager_as_EntropySource(&this_arg_conv); + LDKNodeSigner* ret_ret = MALLOC(sizeof(LDKNodeSigner), "LDKNodeSigner"); + *ret_ret = KeysManager_as_NodeSigner(&this_arg_conv); return tag_ptr(ret_ret, true); } -uint64_t __attribute__((export_name("TS_KeysManager_as_NodeSigner"))) TS_KeysManager_as_NodeSigner(uint64_t this_arg) { +uint64_t __attribute__((export_name("TS_KeysManager_as_OutputSpender"))) TS_KeysManager_as_OutputSpender(uint64_t this_arg) { LDKKeysManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKNodeSigner* ret_ret = MALLOC(sizeof(LDKNodeSigner), "LDKNodeSigner"); - *ret_ret = KeysManager_as_NodeSigner(&this_arg_conv); + LDKOutputSpender* ret_ret = MALLOC(sizeof(LDKOutputSpender), "LDKOutputSpender"); + *ret_ret = KeysManager_as_OutputSpender(&this_arg_conv); return tag_ptr(ret_ret, true); } @@ -69201,6 +75158,17 @@ uint64_t __attribute__((export_name("TS_PhantomKeysManager_as_NodeSigner"))) TS return tag_ptr(ret_ret, true); } +uint64_t __attribute__((export_name("TS_PhantomKeysManager_as_OutputSpender"))) TS_PhantomKeysManager_as_OutputSpender(uint64_t this_arg) { + LDKPhantomKeysManager this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKOutputSpender* ret_ret = MALLOC(sizeof(LDKOutputSpender), "LDKOutputSpender"); + *ret_ret = PhantomKeysManager_as_OutputSpender(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + uint64_t __attribute__((export_name("TS_PhantomKeysManager_as_SignerProvider"))) TS_PhantomKeysManager_as_SignerProvider(uint64_t this_arg) { LDKPhantomKeysManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -69228,57 +75196,6 @@ uint64_t __attribute__((export_name("TS_PhantomKeysManager_new"))) TS_PhantomKe return ret_ref; } -uint64_t __attribute__((export_name("TS_PhantomKeysManager_spend_spendable_outputs"))) TS_PhantomKeysManager_spend_spendable_outputs(uint64_t this_arg, uint64_tArray descriptors, uint64_tArray outputs, int8_tArray change_destination_script, int32_t feerate_sat_per_1000_weight, uint64_t locktime) { - LDKPhantomKeysManager this_arg_conv; - this_arg_conv.inner = untag_ptr(this_arg); - this_arg_conv.is_owned = ptr_is_owned(this_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv.is_owned = false; - LDKCVec_SpendableOutputDescriptorZ descriptors_constr; - descriptors_constr.datalen = descriptors->arr_len; - if (descriptors_constr.datalen > 0) - descriptors_constr.data = MALLOC(descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements"); - else - descriptors_constr.data = NULL; - uint64_t* descriptors_vals = descriptors->elems; - for (size_t b = 0; b < descriptors_constr.datalen; b++) { - uint64_t descriptors_conv_27 = descriptors_vals[b]; - void* descriptors_conv_27_ptr = untag_ptr(descriptors_conv_27); - CHECK_ACCESS(descriptors_conv_27_ptr); - LDKSpendableOutputDescriptor descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(descriptors_conv_27_ptr); - descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptors_conv_27)); - descriptors_constr.data[b] = descriptors_conv_27_conv; - } - FREE(descriptors); - LDKCVec_TxOutZ outputs_constr; - outputs_constr.datalen = outputs->arr_len; - if (outputs_constr.datalen > 0) - outputs_constr.data = MALLOC(outputs_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements"); - else - outputs_constr.data = NULL; - uint64_t* outputs_vals = outputs->elems; - for (size_t h = 0; h < outputs_constr.datalen; h++) { - uint64_t outputs_conv_7 = outputs_vals[h]; - void* outputs_conv_7_ptr = untag_ptr(outputs_conv_7); - CHECK_ACCESS(outputs_conv_7_ptr); - LDKTxOut outputs_conv_7_conv = *(LDKTxOut*)(outputs_conv_7_ptr); - outputs_conv_7_conv = TxOut_clone((LDKTxOut*)untag_ptr(outputs_conv_7)); - outputs_constr.data[h] = outputs_conv_7_conv; - } - FREE(outputs); - LDKCVec_u8Z change_destination_script_ref; - change_destination_script_ref.datalen = change_destination_script->arr_len; - change_destination_script_ref.data = MALLOC(change_destination_script_ref.datalen, "LDKCVec_u8Z Bytes"); - memcpy(change_destination_script_ref.data, change_destination_script->elems, change_destination_script_ref.datalen); FREE(change_destination_script); - void* locktime_ptr = untag_ptr(locktime); - CHECK_ACCESS(locktime_ptr); - LDKCOption_u32Z locktime_conv = *(LDKCOption_u32Z*)(locktime_ptr); - locktime_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(locktime)); - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = PhantomKeysManager_spend_spendable_outputs(&this_arg_conv, descriptors_constr, outputs_constr, change_destination_script_ref, feerate_sat_per_1000_weight, locktime_conv); - return tag_ptr(ret_conv, true); -} - uint64_t __attribute__((export_name("TS_PhantomKeysManager_derive_channel_keys"))) TS_PhantomKeysManager_derive_channel_keys(uint64_t this_arg, int64_t channel_value_satoshis, int8_tArray params) { LDKPhantomKeysManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -69318,6 +75235,36 @@ int8_tArray __attribute__((export_name("TS_PhantomKeysManager_get_phantom_node_ return ret_arr; } +void __attribute__((export_name("TS_RandomBytes_free"))) TS_RandomBytes_free(uint64_t this_obj) { + LDKRandomBytes this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + RandomBytes_free(this_obj_conv); +} + +uint64_t __attribute__((export_name("TS_RandomBytes_new"))) TS_RandomBytes_new(int8_tArray seed) { + LDKThirtyTwoBytes seed_ref; + CHECK(seed->arr_len == 32); + memcpy(seed_ref.data, seed->elems, 32); FREE(seed); + LDKRandomBytes ret_var = RandomBytes_new(seed_ref); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_RandomBytes_as_EntropySource"))) TS_RandomBytes_as_EntropySource(uint64_t this_arg) { + LDKRandomBytes this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKEntropySource* ret_ret = MALLOC(sizeof(LDKEntropySource), "LDKEntropySource"); + *ret_ret = RandomBytes_as_EntropySource(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + void __attribute__((export_name("TS_EcdsaChannelSigner_free"))) TS_EcdsaChannelSigner_free(uint64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -69638,6 +75585,29 @@ uint64_t __attribute__((export_name("TS_Destination_blinded_path"))) TS_Destina return ret_ref; } +int64_t __attribute__((export_name("TS_Destination_hash"))) TS_Destination_hash(uint64_t o) { + LDKDestination* o_conv = (LDKDestination*)untag_ptr(o); + int64_t ret_conv = Destination_hash(o_conv); + return ret_conv; +} + +jboolean __attribute__((export_name("TS_Destination_eq"))) TS_Destination_eq(uint64_t a, uint64_t b) { + LDKDestination* a_conv = (LDKDestination*)untag_ptr(a); + LDKDestination* b_conv = (LDKDestination*)untag_ptr(b); + jboolean ret_conv = Destination_eq(a_conv, b_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_Destination_resolve"))) TS_Destination_resolve(uint64_t this_arg, uint64_t network_graph) { + LDKDestination* this_arg_conv = (LDKDestination*)untag_ptr(this_arg); + LDKReadOnlyNetworkGraph network_graph_conv; + network_graph_conv.inner = untag_ptr(network_graph); + network_graph_conv.is_owned = ptr_is_owned(network_graph); + CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv); + network_graph_conv.is_owned = false; + Destination_resolve(this_arg_conv, &network_graph_conv); +} + void __attribute__((export_name("TS_SendSuccess_free"))) TS_SendSuccess_free(uint64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -69684,6 +75654,12 @@ uint64_t __attribute__((export_name("TS_SendSuccess_buffered_awaiting_connectio return ret_ref; } +int64_t __attribute__((export_name("TS_SendSuccess_hash"))) TS_SendSuccess_hash(uint64_t o) { + LDKSendSuccess* o_conv = (LDKSendSuccess*)untag_ptr(o); + int64_t ret_conv = SendSuccess_hash(o_conv); + return ret_conv; +} + jboolean __attribute__((export_name("TS_SendSuccess_eq"))) TS_SendSuccess_eq(uint64_t a, uint64_t b) { LDKSendSuccess* a_conv = (LDKSendSuccess*)untag_ptr(a); LDKSendSuccess* b_conv = (LDKSendSuccess*)untag_ptr(b); @@ -69780,6 +75756,13 @@ uint64_t __attribute__((export_name("TS_SendError_get_node_id_failed"))) TS_Sen return ret_ref; } +uint64_t __attribute__((export_name("TS_SendError_unresolved_introduction_node"))) TS_SendError_unresolved_introduction_node() { + LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError"); + *ret_copy = SendError_unresolved_introduction_node(); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + uint64_t __attribute__((export_name("TS_SendError_blinded_path_advance_failed"))) TS_SendError_blinded_path_advance_failed() { LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError"); *ret_copy = SendError_blinded_path_advance_failed(); @@ -69787,6 +75770,12 @@ uint64_t __attribute__((export_name("TS_SendError_blinded_path_advance_failed") return ret_ref; } +int64_t __attribute__((export_name("TS_SendError_hash"))) TS_SendError_hash(uint64_t o) { + LDKSendError* o_conv = (LDKSendError*)untag_ptr(o); + int64_t ret_conv = SendError_hash(o_conv); + return ret_conv; +} + jboolean __attribute__((export_name("TS_SendError_eq"))) TS_SendError_eq(uint64_t a, uint64_t b) { LDKSendError* a_conv = (LDKSendError*)untag_ptr(a); LDKSendError* b_conv = (LDKSendError*)untag_ptr(b); @@ -69832,17 +75821,18 @@ uint64_t __attribute__((export_name("TS_PeeledOnion_clone"))) TS_PeeledOnion_cl return ret_ref; } -uint64_t __attribute__((export_name("TS_PeeledOnion_forward"))) TS_PeeledOnion_forward(int8_tArray a, uint64_t b) { - LDKPublicKey a_ref; - CHECK(a->arr_len == 33); - memcpy(a_ref.compressed_form, a->elems, 33); FREE(a); +uint64_t __attribute__((export_name("TS_PeeledOnion_forward"))) TS_PeeledOnion_forward(uint64_t a, uint64_t b) { + void* a_ptr = untag_ptr(a); + CHECK_ACCESS(a_ptr); + LDKNextMessageHop a_conv = *(LDKNextMessageHop*)(a_ptr); + a_conv = NextMessageHop_clone((LDKNextMessageHop*)untag_ptr(a)); LDKOnionMessage b_conv; b_conv.inner = untag_ptr(b); b_conv.is_owned = ptr_is_owned(b); CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); b_conv = OnionMessage_clone(&b_conv); LDKPeeledOnion *ret_copy = MALLOC(sizeof(LDKPeeledOnion), "LDKPeeledOnion"); - *ret_copy = PeeledOnion_forward(a_ref, b_conv); + *ret_copy = PeeledOnion_forward(a_conv, b_conv); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -69866,13 +75856,53 @@ uint64_t __attribute__((export_name("TS_PeeledOnion_receive"))) TS_PeeledOnion_ return ret_ref; } -uint64_t __attribute__((export_name("TS_create_onion_message"))) TS_create_onion_message(uint64_t entropy_source, uint64_t node_signer, uint64_t path, uint64_t contents, uint64_t reply_path) { +uint64_t __attribute__((export_name("TS_create_onion_message_resolving_destination"))) TS_create_onion_message_resolving_destination(uint64_t entropy_source, uint64_t node_signer, uint64_t node_id_lookup, uint64_t network_graph, uint64_t path, uint64_t contents, uint64_t reply_path) { + void* entropy_source_ptr = untag_ptr(entropy_source); + if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } + LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + void* node_signer_ptr = untag_ptr(node_signer); + if (ptr_is_owned(node_signer)) { CHECK_ACCESS(node_signer_ptr); } + LDKNodeSigner* node_signer_conv = (LDKNodeSigner*)node_signer_ptr; + void* node_id_lookup_ptr = untag_ptr(node_id_lookup); + if (ptr_is_owned(node_id_lookup)) { CHECK_ACCESS(node_id_lookup_ptr); } + LDKNodeIdLookUp* node_id_lookup_conv = (LDKNodeIdLookUp*)node_id_lookup_ptr; + LDKReadOnlyNetworkGraph network_graph_conv; + network_graph_conv.inner = untag_ptr(network_graph); + network_graph_conv.is_owned = ptr_is_owned(network_graph); + CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv); + network_graph_conv.is_owned = false; + LDKOnionMessagePath path_conv; + path_conv.inner = untag_ptr(path); + path_conv.is_owned = ptr_is_owned(path); + CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv); + path_conv = OnionMessagePath_clone(&path_conv); + void* contents_ptr = untag_ptr(contents); + CHECK_ACCESS(contents_ptr); + LDKOnionMessageContents contents_conv = *(LDKOnionMessageContents*)(contents_ptr); + if (contents_conv.free == LDKOnionMessageContents_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKOnionMessageContents_JCalls_cloned(&contents_conv); + } + LDKBlindedPath reply_path_conv; + reply_path_conv.inner = untag_ptr(reply_path); + reply_path_conv.is_owned = ptr_is_owned(reply_path); + CHECK_INNER_FIELD_ACCESS_OR_NULL(reply_path_conv); + reply_path_conv = BlindedPath_clone(&reply_path_conv); + LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ"); + *ret_conv = create_onion_message_resolving_destination(entropy_source_conv, node_signer_conv, node_id_lookup_conv, &network_graph_conv, path_conv, contents_conv, reply_path_conv); + return tag_ptr(ret_conv, true); +} + +uint64_t __attribute__((export_name("TS_create_onion_message"))) TS_create_onion_message(uint64_t entropy_source, uint64_t node_signer, uint64_t node_id_lookup, uint64_t path, uint64_t contents, uint64_t reply_path) { void* entropy_source_ptr = untag_ptr(entropy_source); if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; void* node_signer_ptr = untag_ptr(node_signer); if (ptr_is_owned(node_signer)) { CHECK_ACCESS(node_signer_ptr); } LDKNodeSigner* node_signer_conv = (LDKNodeSigner*)node_signer_ptr; + void* node_id_lookup_ptr = untag_ptr(node_id_lookup); + if (ptr_is_owned(node_id_lookup)) { CHECK_ACCESS(node_id_lookup_ptr); } + LDKNodeIdLookUp* node_id_lookup_conv = (LDKNodeIdLookUp*)node_id_lookup_ptr; LDKOnionMessagePath path_conv; path_conv.inner = untag_ptr(path); path_conv.is_owned = ptr_is_owned(path); @@ -69891,7 +75921,7 @@ uint64_t __attribute__((export_name("TS_create_onion_message"))) TS_create_onio CHECK_INNER_FIELD_ACCESS_OR_NULL(reply_path_conv); reply_path_conv = BlindedPath_clone(&reply_path_conv); LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ"); - *ret_conv = create_onion_message(entropy_source_conv, node_signer_conv, path_conv, contents_conv, reply_path_conv); + *ret_conv = create_onion_message(entropy_source_conv, node_signer_conv, node_id_lookup_conv, path_conv, contents_conv, reply_path_conv); return tag_ptr(ret_conv, true); } @@ -69927,7 +75957,7 @@ uint64_t __attribute__((export_name("TS_peel_onion_message"))) TS_peel_onion_me return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_OnionMessenger_new"))) TS_OnionMessenger_new(uint64_t entropy_source, uint64_t node_signer, uint64_t logger, uint64_t message_router, uint64_t offers_handler, uint64_t custom_handler) { +uint64_t __attribute__((export_name("TS_OnionMessenger_new"))) TS_OnionMessenger_new(uint64_t entropy_source, uint64_t node_signer, uint64_t logger, uint64_t node_id_lookup, uint64_t message_router, uint64_t offers_handler, uint64_t custom_handler) { void* entropy_source_ptr = untag_ptr(entropy_source); CHECK_ACCESS(entropy_source_ptr); LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); @@ -69949,6 +75979,13 @@ uint64_t __attribute__((export_name("TS_OnionMessenger_new"))) TS_OnionMessenge // If this_arg is a JCalls struct, then we need to increment the refcnt in it. LDKLogger_JCalls_cloned(&logger_conv); } + void* node_id_lookup_ptr = untag_ptr(node_id_lookup); + CHECK_ACCESS(node_id_lookup_ptr); + LDKNodeIdLookUp node_id_lookup_conv = *(LDKNodeIdLookUp*)(node_id_lookup_ptr); + if (node_id_lookup_conv.free == LDKNodeIdLookUp_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKNodeIdLookUp_JCalls_cloned(&node_id_lookup_conv); + } void* message_router_ptr = untag_ptr(message_router); CHECK_ACCESS(message_router_ptr); LDKMessageRouter message_router_conv = *(LDKMessageRouter*)(message_router_ptr); @@ -69970,7 +76007,7 @@ uint64_t __attribute__((export_name("TS_OnionMessenger_new"))) TS_OnionMessenge // If this_arg is a JCalls struct, then we need to increment the refcnt in it. LDKCustomOnionMessageHandler_JCalls_cloned(&custom_handler_conv); } - LDKOnionMessenger ret_var = OnionMessenger_new(entropy_source_conv, node_signer_conv, logger_conv, message_router_conv, offers_handler_conv, custom_handler_conv); + LDKOnionMessenger ret_var = OnionMessenger_new(entropy_source_conv, node_signer_conv, logger_conv, node_id_lookup_conv, message_router_conv, offers_handler_conv, custom_handler_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -70409,6 +76446,65 @@ void __attribute__((export_name("TS_OnionMessageContents_free"))) TS_OnionMessa OnionMessageContents_free(this_ptr_conv); } +void __attribute__((export_name("TS_NextMessageHop_free"))) TS_NextMessageHop_free(uint64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKNextMessageHop this_ptr_conv = *(LDKNextMessageHop*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + NextMessageHop_free(this_ptr_conv); +} + +static inline uint64_t NextMessageHop_clone_ptr(LDKNextMessageHop *NONNULL_PTR arg) { + LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop"); + *ret_copy = NextMessageHop_clone(arg); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t __attribute__((export_name("TS_NextMessageHop_clone_ptr"))) TS_NextMessageHop_clone_ptr(uint64_t arg) { + LDKNextMessageHop* arg_conv = (LDKNextMessageHop*)untag_ptr(arg); + int64_t ret_conv = NextMessageHop_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_NextMessageHop_clone"))) TS_NextMessageHop_clone(uint64_t orig) { + LDKNextMessageHop* orig_conv = (LDKNextMessageHop*)untag_ptr(orig); + LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop"); + *ret_copy = NextMessageHop_clone(orig_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_NextMessageHop_node_id"))) TS_NextMessageHop_node_id(int8_tArray a) { + LDKPublicKey a_ref; + CHECK(a->arr_len == 33); + memcpy(a_ref.compressed_form, a->elems, 33); FREE(a); + LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop"); + *ret_copy = NextMessageHop_node_id(a_ref); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_NextMessageHop_short_channel_id"))) TS_NextMessageHop_short_channel_id(int64_t a) { + LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop"); + *ret_copy = NextMessageHop_short_channel_id(a); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t __attribute__((export_name("TS_NextMessageHop_hash"))) TS_NextMessageHop_hash(uint64_t o) { + LDKNextMessageHop* o_conv = (LDKNextMessageHop*)untag_ptr(o); + int64_t ret_conv = NextMessageHop_hash(o_conv); + return ret_conv; +} + +jboolean __attribute__((export_name("TS_NextMessageHop_eq"))) TS_NextMessageHop_eq(uint64_t a, uint64_t b) { + LDKNextMessageHop* a_conv = (LDKNextMessageHop*)untag_ptr(a); + LDKNextMessageHop* b_conv = (LDKNextMessageHop*)untag_ptr(b); + jboolean ret_conv = NextMessageHop_eq(a_conv, b_conv); + return ret_conv; +} + void __attribute__((export_name("TS_BlindedPath_free"))) TS_BlindedPath_free(uint64_t this_obj) { LDKBlindedPath this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -70417,27 +76513,29 @@ void __attribute__((export_name("TS_BlindedPath_free"))) TS_BlindedPath_free(ui BlindedPath_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_BlindedPath_get_introduction_node_id"))) TS_BlindedPath_get_introduction_node_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_BlindedPath_get_introduction_node"))) TS_BlindedPath_get_introduction_node(uint64_t this_ptr) { LDKBlindedPath this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, BlindedPath_get_introduction_node_id(&this_ptr_conv).compressed_form, 33); - return ret_arr; + LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode"); + *ret_copy = BlindedPath_get_introduction_node(&this_ptr_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; } -void __attribute__((export_name("TS_BlindedPath_set_introduction_node_id"))) TS_BlindedPath_set_introduction_node_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_BlindedPath_set_introduction_node"))) TS_BlindedPath_set_introduction_node(uint64_t this_ptr, uint64_t val) { LDKBlindedPath this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - BlindedPath_set_introduction_node_id(&this_ptr_conv, val_ref); + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKIntroductionNode val_conv = *(LDKIntroductionNode*)(val_ptr); + val_conv = IntroductionNode_clone((LDKIntroductionNode*)untag_ptr(val)); + BlindedPath_set_introduction_node(&this_ptr_conv, val_conv); } int8_tArray __attribute__((export_name("TS_BlindedPath_get_blinding_point"))) TS_BlindedPath_get_blinding_point(uint64_t this_ptr) { @@ -70511,10 +76609,11 @@ void __attribute__((export_name("TS_BlindedPath_set_blinded_hops"))) TS_Blinded BlindedPath_set_blinded_hops(&this_ptr_conv, val_constr); } -uint64_t __attribute__((export_name("TS_BlindedPath_new"))) TS_BlindedPath_new(int8_tArray introduction_node_id_arg, int8_tArray blinding_point_arg, uint64_tArray blinded_hops_arg) { - LDKPublicKey introduction_node_id_arg_ref; - CHECK(introduction_node_id_arg->arr_len == 33); - memcpy(introduction_node_id_arg_ref.compressed_form, introduction_node_id_arg->elems, 33); FREE(introduction_node_id_arg); +uint64_t __attribute__((export_name("TS_BlindedPath_new"))) TS_BlindedPath_new(uint64_t introduction_node_arg, int8_tArray blinding_point_arg, uint64_tArray blinded_hops_arg) { + void* introduction_node_arg_ptr = untag_ptr(introduction_node_arg); + CHECK_ACCESS(introduction_node_arg_ptr); + LDKIntroductionNode introduction_node_arg_conv = *(LDKIntroductionNode*)(introduction_node_arg_ptr); + introduction_node_arg_conv = IntroductionNode_clone((LDKIntroductionNode*)untag_ptr(introduction_node_arg)); LDKPublicKey blinding_point_arg_ref; CHECK(blinding_point_arg->arr_len == 33); memcpy(blinding_point_arg_ref.compressed_form, blinding_point_arg->elems, 33); FREE(blinding_point_arg); @@ -70535,7 +76634,7 @@ uint64_t __attribute__((export_name("TS_BlindedPath_new"))) TS_BlindedPath_new( blinded_hops_arg_constr.data[m] = blinded_hops_arg_conv_12_conv; } FREE(blinded_hops_arg); - LDKBlindedPath ret_var = BlindedPath_new(introduction_node_id_arg_ref, blinding_point_arg_ref, blinded_hops_arg_constr); + LDKBlindedPath ret_var = BlindedPath_new(introduction_node_arg_conv, blinding_point_arg_ref, blinded_hops_arg_constr); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -70597,6 +76696,131 @@ jboolean __attribute__((export_name("TS_BlindedPath_eq"))) TS_BlindedPath_eq(ui return ret_conv; } +void __attribute__((export_name("TS_IntroductionNode_free"))) TS_IntroductionNode_free(uint64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKIntroductionNode this_ptr_conv = *(LDKIntroductionNode*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + IntroductionNode_free(this_ptr_conv); +} + +static inline uint64_t IntroductionNode_clone_ptr(LDKIntroductionNode *NONNULL_PTR arg) { + LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode"); + *ret_copy = IntroductionNode_clone(arg); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t __attribute__((export_name("TS_IntroductionNode_clone_ptr"))) TS_IntroductionNode_clone_ptr(uint64_t arg) { + LDKIntroductionNode* arg_conv = (LDKIntroductionNode*)untag_ptr(arg); + int64_t ret_conv = IntroductionNode_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_IntroductionNode_clone"))) TS_IntroductionNode_clone(uint64_t orig) { + LDKIntroductionNode* orig_conv = (LDKIntroductionNode*)untag_ptr(orig); + LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode"); + *ret_copy = IntroductionNode_clone(orig_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_IntroductionNode_node_id"))) TS_IntroductionNode_node_id(int8_tArray a) { + LDKPublicKey a_ref; + CHECK(a->arr_len == 33); + memcpy(a_ref.compressed_form, a->elems, 33); FREE(a); + LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode"); + *ret_copy = IntroductionNode_node_id(a_ref); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_IntroductionNode_directed_short_channel_id"))) TS_IntroductionNode_directed_short_channel_id(uint32_t a, int64_t b) { + LDKDirection a_conv = LDKDirection_from_js(a); + LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode"); + *ret_copy = IntroductionNode_directed_short_channel_id(a_conv, b); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t __attribute__((export_name("TS_IntroductionNode_hash"))) TS_IntroductionNode_hash(uint64_t o) { + LDKIntroductionNode* o_conv = (LDKIntroductionNode*)untag_ptr(o); + int64_t ret_conv = IntroductionNode_hash(o_conv); + return ret_conv; +} + +jboolean __attribute__((export_name("TS_IntroductionNode_eq"))) TS_IntroductionNode_eq(uint64_t a, uint64_t b) { + LDKIntroductionNode* a_conv = (LDKIntroductionNode*)untag_ptr(a); + LDKIntroductionNode* b_conv = (LDKIntroductionNode*)untag_ptr(b); + jboolean ret_conv = IntroductionNode_eq(a_conv, b_conv); + return ret_conv; +} + +uint32_t __attribute__((export_name("TS_Direction_clone"))) TS_Direction_clone(uint64_t orig) { + LDKDirection* orig_conv = (LDKDirection*)untag_ptr(orig); + uint32_t ret_conv = LDKDirection_to_js(Direction_clone(orig_conv)); + return ret_conv; +} + +uint32_t __attribute__((export_name("TS_Direction_node_one"))) TS_Direction_node_one() { + uint32_t ret_conv = LDKDirection_to_js(Direction_node_one()); + return ret_conv; +} + +uint32_t __attribute__((export_name("TS_Direction_node_two"))) TS_Direction_node_two() { + uint32_t ret_conv = LDKDirection_to_js(Direction_node_two()); + return ret_conv; +} + +int64_t __attribute__((export_name("TS_Direction_hash"))) TS_Direction_hash(uint64_t o) { + LDKDirection* o_conv = (LDKDirection*)untag_ptr(o); + int64_t ret_conv = Direction_hash(o_conv); + return ret_conv; +} + +jboolean __attribute__((export_name("TS_Direction_eq"))) TS_Direction_eq(uint64_t a, uint64_t b) { + LDKDirection* a_conv = (LDKDirection*)untag_ptr(a); + LDKDirection* b_conv = (LDKDirection*)untag_ptr(b); + jboolean ret_conv = Direction_eq(a_conv, b_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_NodeIdLookUp_free"))) TS_NodeIdLookUp_free(uint64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKNodeIdLookUp this_ptr_conv = *(LDKNodeIdLookUp*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + NodeIdLookUp_free(this_ptr_conv); +} + +void __attribute__((export_name("TS_EmptyNodeIdLookUp_free"))) TS_EmptyNodeIdLookUp_free(uint64_t this_obj) { + LDKEmptyNodeIdLookUp this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + EmptyNodeIdLookUp_free(this_obj_conv); +} + +uint64_t __attribute__((export_name("TS_EmptyNodeIdLookUp_new"))) TS_EmptyNodeIdLookUp_new() { + LDKEmptyNodeIdLookUp ret_var = EmptyNodeIdLookUp_new(); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_EmptyNodeIdLookUp_as_NodeIdLookUp"))) TS_EmptyNodeIdLookUp_as_NodeIdLookUp(uint64_t this_arg) { + LDKEmptyNodeIdLookUp this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKNodeIdLookUp* ret_ret = MALLOC(sizeof(LDKNodeIdLookUp), "LDKNodeIdLookUp"); + *ret_ret = EmptyNodeIdLookUp_as_NodeIdLookUp(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + void __attribute__((export_name("TS_BlindedHop_free"))) TS_BlindedHop_free(uint64_t this_obj) { LDKBlindedHop this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -70729,8 +76953,12 @@ uint64_t __attribute__((export_name("TS_BlindedPath_one_hop_for_message"))) TS_ CHECK(recipient_node_id->arr_len == 33); memcpy(recipient_node_id_ref.compressed_form, recipient_node_id->elems, 33); FREE(recipient_node_id); void* entropy_source_ptr = untag_ptr(entropy_source); - if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } - LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } LDKCResult_BlindedPathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedPathNoneZ), "LDKCResult_BlindedPathNoneZ"); *ret_conv = BlindedPath_one_hop_for_message(recipient_node_id_ref, entropy_source_conv); return tag_ptr(ret_conv, true); @@ -70753,14 +76981,18 @@ uint64_t __attribute__((export_name("TS_BlindedPath_new_for_message"))) TS_Blin } FREE(node_pks); void* entropy_source_ptr = untag_ptr(entropy_source); - if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } - LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } LDKCResult_BlindedPathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedPathNoneZ), "LDKCResult_BlindedPathNoneZ"); *ret_conv = BlindedPath_new_for_message(node_pks_constr, entropy_source_conv); return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_BlindedPath_one_hop_for_payment"))) TS_BlindedPath_one_hop_for_payment(int8_tArray payee_node_id, uint64_t payee_tlvs, uint64_t entropy_source) { +uint64_t __attribute__((export_name("TS_BlindedPath_one_hop_for_payment"))) TS_BlindedPath_one_hop_for_payment(int8_tArray payee_node_id, uint64_t payee_tlvs, int16_t min_final_cltv_expiry_delta, uint64_t entropy_source) { LDKPublicKey payee_node_id_ref; CHECK(payee_node_id->arr_len == 33); memcpy(payee_node_id_ref.compressed_form, payee_node_id->elems, 33); FREE(payee_node_id); @@ -70770,14 +77002,18 @@ uint64_t __attribute__((export_name("TS_BlindedPath_one_hop_for_payment"))) TS_ CHECK_INNER_FIELD_ACCESS_OR_NULL(payee_tlvs_conv); payee_tlvs_conv = ReceiveTlvs_clone(&payee_tlvs_conv); void* entropy_source_ptr = untag_ptr(entropy_source); - if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } - LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ), "LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ"); - *ret_conv = BlindedPath_one_hop_for_payment(payee_node_id_ref, payee_tlvs_conv, entropy_source_conv); + *ret_conv = BlindedPath_one_hop_for_payment(payee_node_id_ref, payee_tlvs_conv, min_final_cltv_expiry_delta, entropy_source_conv); return tag_ptr(ret_conv, true); } -uint64_t __attribute__((export_name("TS_BlindedPath_new_for_payment"))) TS_BlindedPath_new_for_payment(uint64_tArray intermediate_nodes, int8_tArray payee_node_id, uint64_t payee_tlvs, int64_t htlc_maximum_msat, uint64_t entropy_source) { +uint64_t __attribute__((export_name("TS_BlindedPath_new_for_payment"))) TS_BlindedPath_new_for_payment(uint64_tArray intermediate_nodes, int8_tArray payee_node_id, uint64_t payee_tlvs, int64_t htlc_maximum_msat, int16_t min_final_cltv_expiry_delta, uint64_t entropy_source) { LDKCVec_ForwardNodeZ intermediate_nodes_constr; intermediate_nodes_constr.datalen = intermediate_nodes->arr_len; if (intermediate_nodes_constr.datalen > 0) @@ -70804,13 +77040,35 @@ uint64_t __attribute__((export_name("TS_BlindedPath_new_for_payment"))) TS_Blin CHECK_INNER_FIELD_ACCESS_OR_NULL(payee_tlvs_conv); payee_tlvs_conv = ReceiveTlvs_clone(&payee_tlvs_conv); void* entropy_source_ptr = untag_ptr(entropy_source); - if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } - LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ), "LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ"); - *ret_conv = BlindedPath_new_for_payment(intermediate_nodes_constr, payee_node_id_ref, payee_tlvs_conv, htlc_maximum_msat, entropy_source_conv); + *ret_conv = BlindedPath_new_for_payment(intermediate_nodes_constr, payee_node_id_ref, payee_tlvs_conv, htlc_maximum_msat, min_final_cltv_expiry_delta, entropy_source_conv); return tag_ptr(ret_conv, true); } +uint64_t __attribute__((export_name("TS_BlindedPath_public_introduction_node_id"))) TS_BlindedPath_public_introduction_node_id(uint64_t this_arg, uint64_t network_graph) { + LDKBlindedPath this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKReadOnlyNetworkGraph network_graph_conv; + network_graph_conv.inner = untag_ptr(network_graph); + network_graph_conv.is_owned = ptr_is_owned(network_graph); + CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv); + network_graph_conv.is_owned = false; + LDKNodeId ret_var = BlindedPath_public_introduction_node_id(&this_arg_conv, &network_graph_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + int8_tArray __attribute__((export_name("TS_BlindedPath_write"))) TS_BlindedPath_write(uint64_t obj) { LDKBlindedPath obj_conv; obj_conv.inner = untag_ptr(obj); @@ -71199,7 +77457,32 @@ void __attribute__((export_name("TS_ReceiveTlvs_set_payment_constraints"))) TS_ ReceiveTlvs_set_payment_constraints(&this_ptr_conv, val_conv); } -uint64_t __attribute__((export_name("TS_ReceiveTlvs_new"))) TS_ReceiveTlvs_new(int8_tArray payment_secret_arg, uint64_t payment_constraints_arg) { +uint64_t __attribute__((export_name("TS_ReceiveTlvs_get_payment_context"))) TS_ReceiveTlvs_get_payment_context(uint64_t this_ptr) { + LDKReceiveTlvs this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = ReceiveTlvs_get_payment_context(&this_ptr_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void __attribute__((export_name("TS_ReceiveTlvs_set_payment_context"))) TS_ReceiveTlvs_set_payment_context(uint64_t this_ptr, uint64_t val) { + LDKReceiveTlvs this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKPaymentContext val_conv = *(LDKPaymentContext*)(val_ptr); + val_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(val)); + ReceiveTlvs_set_payment_context(&this_ptr_conv, val_conv); +} + +uint64_t __attribute__((export_name("TS_ReceiveTlvs_new"))) TS_ReceiveTlvs_new(int8_tArray payment_secret_arg, uint64_t payment_constraints_arg, uint64_t payment_context_arg) { LDKThirtyTwoBytes payment_secret_arg_ref; CHECK(payment_secret_arg->arr_len == 32); memcpy(payment_secret_arg_ref.data, payment_secret_arg->elems, 32); FREE(payment_secret_arg); @@ -71208,7 +77491,11 @@ uint64_t __attribute__((export_name("TS_ReceiveTlvs_new"))) TS_ReceiveTlvs_new( payment_constraints_arg_conv.is_owned = ptr_is_owned(payment_constraints_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_constraints_arg_conv); payment_constraints_arg_conv = PaymentConstraints_clone(&payment_constraints_arg_conv); - LDKReceiveTlvs ret_var = ReceiveTlvs_new(payment_secret_arg_ref, payment_constraints_arg_conv); + void* payment_context_arg_ptr = untag_ptr(payment_context_arg); + CHECK_ACCESS(payment_context_arg_ptr); + LDKPaymentContext payment_context_arg_conv = *(LDKPaymentContext*)(payment_context_arg_ptr); + payment_context_arg_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(payment_context_arg)); + LDKReceiveTlvs ret_var = ReceiveTlvs_new(payment_secret_arg_ref, payment_constraints_arg_conv, payment_context_arg_conv); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -71432,6 +77719,317 @@ uint64_t __attribute__((export_name("TS_PaymentConstraints_clone"))) TS_Payment return ret_ref; } +void __attribute__((export_name("TS_PaymentContext_free"))) TS_PaymentContext_free(uint64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKPaymentContext this_ptr_conv = *(LDKPaymentContext*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + PaymentContext_free(this_ptr_conv); +} + +static inline uint64_t PaymentContext_clone_ptr(LDKPaymentContext *NONNULL_PTR arg) { + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = PaymentContext_clone(arg); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t __attribute__((export_name("TS_PaymentContext_clone_ptr"))) TS_PaymentContext_clone_ptr(uint64_t arg) { + LDKPaymentContext* arg_conv = (LDKPaymentContext*)untag_ptr(arg); + int64_t ret_conv = PaymentContext_clone_ptr(arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_PaymentContext_clone"))) TS_PaymentContext_clone(uint64_t orig) { + LDKPaymentContext* orig_conv = (LDKPaymentContext*)untag_ptr(orig); + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = PaymentContext_clone(orig_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_PaymentContext_unknown"))) TS_PaymentContext_unknown(uint64_t a) { + LDKUnknownPaymentContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = UnknownPaymentContext_clone(&a_conv); + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = PaymentContext_unknown(a_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_PaymentContext_bolt12_offer"))) TS_PaymentContext_bolt12_offer(uint64_t a) { + LDKBolt12OfferContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = Bolt12OfferContext_clone(&a_conv); + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = PaymentContext_bolt12_offer(a_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_PaymentContext_bolt12_refund"))) TS_PaymentContext_bolt12_refund(uint64_t a) { + LDKBolt12RefundContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = Bolt12RefundContext_clone(&a_conv); + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = PaymentContext_bolt12_refund(a_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +jboolean __attribute__((export_name("TS_PaymentContext_eq"))) TS_PaymentContext_eq(uint64_t a, uint64_t b) { + LDKPaymentContext* a_conv = (LDKPaymentContext*)untag_ptr(a); + LDKPaymentContext* b_conv = (LDKPaymentContext*)untag_ptr(b); + jboolean ret_conv = PaymentContext_eq(a_conv, b_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_UnknownPaymentContext_free"))) TS_UnknownPaymentContext_free(uint64_t this_obj) { + LDKUnknownPaymentContext this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + UnknownPaymentContext_free(this_obj_conv); +} + +static inline uint64_t UnknownPaymentContext_clone_ptr(LDKUnknownPaymentContext *NONNULL_PTR arg) { + LDKUnknownPaymentContext ret_var = UnknownPaymentContext_clone(arg); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t __attribute__((export_name("TS_UnknownPaymentContext_clone_ptr"))) TS_UnknownPaymentContext_clone_ptr(uint64_t arg) { + LDKUnknownPaymentContext arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = UnknownPaymentContext_clone_ptr(&arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_UnknownPaymentContext_clone"))) TS_UnknownPaymentContext_clone(uint64_t orig) { + LDKUnknownPaymentContext orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKUnknownPaymentContext ret_var = UnknownPaymentContext_clone(&orig_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +jboolean __attribute__((export_name("TS_UnknownPaymentContext_eq"))) TS_UnknownPaymentContext_eq(uint64_t a, uint64_t b) { + LDKUnknownPaymentContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKUnknownPaymentContext b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = UnknownPaymentContext_eq(&a_conv, &b_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_Bolt12OfferContext_free"))) TS_Bolt12OfferContext_free(uint64_t this_obj) { + LDKBolt12OfferContext this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + Bolt12OfferContext_free(this_obj_conv); +} + +uint64_t __attribute__((export_name("TS_Bolt12OfferContext_get_offer_id"))) TS_Bolt12OfferContext_get_offer_id(uint64_t this_ptr) { + LDKBolt12OfferContext this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKOfferId ret_var = Bolt12OfferContext_get_offer_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void __attribute__((export_name("TS_Bolt12OfferContext_set_offer_id"))) TS_Bolt12OfferContext_set_offer_id(uint64_t this_ptr, uint64_t val) { + LDKBolt12OfferContext this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKOfferId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = OfferId_clone(&val_conv); + Bolt12OfferContext_set_offer_id(&this_ptr_conv, val_conv); +} + +uint64_t __attribute__((export_name("TS_Bolt12OfferContext_get_invoice_request"))) TS_Bolt12OfferContext_get_invoice_request(uint64_t this_ptr) { + LDKBolt12OfferContext this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKInvoiceRequestFields ret_var = Bolt12OfferContext_get_invoice_request(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void __attribute__((export_name("TS_Bolt12OfferContext_set_invoice_request"))) TS_Bolt12OfferContext_set_invoice_request(uint64_t this_ptr, uint64_t val) { + LDKBolt12OfferContext this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKInvoiceRequestFields val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = InvoiceRequestFields_clone(&val_conv); + Bolt12OfferContext_set_invoice_request(&this_ptr_conv, val_conv); +} + +uint64_t __attribute__((export_name("TS_Bolt12OfferContext_new"))) TS_Bolt12OfferContext_new(uint64_t offer_id_arg, uint64_t invoice_request_arg) { + LDKOfferId offer_id_arg_conv; + offer_id_arg_conv.inner = untag_ptr(offer_id_arg); + offer_id_arg_conv.is_owned = ptr_is_owned(offer_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(offer_id_arg_conv); + offer_id_arg_conv = OfferId_clone(&offer_id_arg_conv); + LDKInvoiceRequestFields invoice_request_arg_conv; + invoice_request_arg_conv.inner = untag_ptr(invoice_request_arg); + invoice_request_arg_conv.is_owned = ptr_is_owned(invoice_request_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_request_arg_conv); + invoice_request_arg_conv = InvoiceRequestFields_clone(&invoice_request_arg_conv); + LDKBolt12OfferContext ret_var = Bolt12OfferContext_new(offer_id_arg_conv, invoice_request_arg_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t Bolt12OfferContext_clone_ptr(LDKBolt12OfferContext *NONNULL_PTR arg) { + LDKBolt12OfferContext ret_var = Bolt12OfferContext_clone(arg); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t __attribute__((export_name("TS_Bolt12OfferContext_clone_ptr"))) TS_Bolt12OfferContext_clone_ptr(uint64_t arg) { + LDKBolt12OfferContext arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = Bolt12OfferContext_clone_ptr(&arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_Bolt12OfferContext_clone"))) TS_Bolt12OfferContext_clone(uint64_t orig) { + LDKBolt12OfferContext orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKBolt12OfferContext ret_var = Bolt12OfferContext_clone(&orig_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +jboolean __attribute__((export_name("TS_Bolt12OfferContext_eq"))) TS_Bolt12OfferContext_eq(uint64_t a, uint64_t b) { + LDKBolt12OfferContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKBolt12OfferContext b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = Bolt12OfferContext_eq(&a_conv, &b_conv); + return ret_conv; +} + +void __attribute__((export_name("TS_Bolt12RefundContext_free"))) TS_Bolt12RefundContext_free(uint64_t this_obj) { + LDKBolt12RefundContext this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + Bolt12RefundContext_free(this_obj_conv); +} + +uint64_t __attribute__((export_name("TS_Bolt12RefundContext_new"))) TS_Bolt12RefundContext_new() { + LDKBolt12RefundContext ret_var = Bolt12RefundContext_new(); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t Bolt12RefundContext_clone_ptr(LDKBolt12RefundContext *NONNULL_PTR arg) { + LDKBolt12RefundContext ret_var = Bolt12RefundContext_clone(arg); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t __attribute__((export_name("TS_Bolt12RefundContext_clone_ptr"))) TS_Bolt12RefundContext_clone_ptr(uint64_t arg) { + LDKBolt12RefundContext arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = Bolt12RefundContext_clone_ptr(&arg_conv); + return ret_conv; +} + +uint64_t __attribute__((export_name("TS_Bolt12RefundContext_clone"))) TS_Bolt12RefundContext_clone(uint64_t orig) { + LDKBolt12RefundContext orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKBolt12RefundContext ret_var = Bolt12RefundContext_clone(&orig_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +jboolean __attribute__((export_name("TS_Bolt12RefundContext_eq"))) TS_Bolt12RefundContext_eq(uint64_t a, uint64_t b) { + LDKBolt12RefundContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKBolt12RefundContext b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = Bolt12RefundContext_eq(&a_conv, &b_conv); + return ret_conv; +} + int8_tArray __attribute__((export_name("TS_ForwardTlvs_write"))) TS_ForwardTlvs_write(uint64_t obj) { LDKForwardTlvs obj_conv; obj_conv.inner = untag_ptr(obj); @@ -71504,6 +78102,94 @@ uint64_t __attribute__((export_name("TS_PaymentConstraints_read"))) TS_PaymentC return tag_ptr(ret_conv, true); } +int8_tArray __attribute__((export_name("TS_PaymentContext_write"))) TS_PaymentContext_write(uint64_t obj) { + LDKPaymentContext* obj_conv = (LDKPaymentContext*)untag_ptr(obj); + LDKCVec_u8Z ret_var = PaymentContext_write(obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +uint64_t __attribute__((export_name("TS_PaymentContext_read"))) TS_PaymentContext_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ"); + *ret_conv = PaymentContext_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + +int8_tArray __attribute__((export_name("TS_UnknownPaymentContext_write"))) TS_UnknownPaymentContext_write(uint64_t obj) { + LDKUnknownPaymentContext obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = UnknownPaymentContext_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +uint64_t __attribute__((export_name("TS_UnknownPaymentContext_read"))) TS_UnknownPaymentContext_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ"); + *ret_conv = UnknownPaymentContext_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + +int8_tArray __attribute__((export_name("TS_Bolt12OfferContext_write"))) TS_Bolt12OfferContext_write(uint64_t obj) { + LDKBolt12OfferContext obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = Bolt12OfferContext_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +uint64_t __attribute__((export_name("TS_Bolt12OfferContext_read"))) TS_Bolt12OfferContext_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ"); + *ret_conv = Bolt12OfferContext_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + +int8_tArray __attribute__((export_name("TS_Bolt12RefundContext_write"))) TS_Bolt12RefundContext_write(uint64_t obj) { + LDKBolt12RefundContext obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = Bolt12RefundContext_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +uint64_t __attribute__((export_name("TS_Bolt12RefundContext_read"))) TS_Bolt12RefundContext_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ"); + *ret_conv = Bolt12RefundContext_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + void __attribute__((export_name("TS_PaymentPurpose_free"))) TS_PaymentPurpose_free(uint64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -71533,7 +78219,21 @@ uint64_t __attribute__((export_name("TS_PaymentPurpose_clone"))) TS_PaymentPurp return ret_ref; } -uint64_t __attribute__((export_name("TS_PaymentPurpose_invoice_payment"))) TS_PaymentPurpose_invoice_payment(uint64_t payment_preimage, int8_tArray payment_secret) { +uint64_t __attribute__((export_name("TS_PaymentPurpose_bolt11_invoice_payment"))) TS_PaymentPurpose_bolt11_invoice_payment(uint64_t payment_preimage, int8_tArray payment_secret) { + void* payment_preimage_ptr = untag_ptr(payment_preimage); + CHECK_ACCESS(payment_preimage_ptr); + LDKCOption_ThirtyTwoBytesZ payment_preimage_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_preimage_ptr); + payment_preimage_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(payment_preimage)); + LDKThirtyTwoBytes payment_secret_ref; + CHECK(payment_secret->arr_len == 32); + memcpy(payment_secret_ref.data, payment_secret->elems, 32); FREE(payment_secret); + LDKPaymentPurpose *ret_copy = MALLOC(sizeof(LDKPaymentPurpose), "LDKPaymentPurpose"); + *ret_copy = PaymentPurpose_bolt11_invoice_payment(payment_preimage_conv, payment_secret_ref); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_PaymentPurpose_bolt12_offer_payment"))) TS_PaymentPurpose_bolt12_offer_payment(uint64_t payment_preimage, int8_tArray payment_secret, uint64_t payment_context) { void* payment_preimage_ptr = untag_ptr(payment_preimage); CHECK_ACCESS(payment_preimage_ptr); LDKCOption_ThirtyTwoBytesZ payment_preimage_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_preimage_ptr); @@ -71541,8 +78241,32 @@ uint64_t __attribute__((export_name("TS_PaymentPurpose_invoice_payment"))) TS_P LDKThirtyTwoBytes payment_secret_ref; CHECK(payment_secret->arr_len == 32); memcpy(payment_secret_ref.data, payment_secret->elems, 32); FREE(payment_secret); + LDKBolt12OfferContext payment_context_conv; + payment_context_conv.inner = untag_ptr(payment_context); + payment_context_conv.is_owned = ptr_is_owned(payment_context); + CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_conv); + payment_context_conv = Bolt12OfferContext_clone(&payment_context_conv); LDKPaymentPurpose *ret_copy = MALLOC(sizeof(LDKPaymentPurpose), "LDKPaymentPurpose"); - *ret_copy = PaymentPurpose_invoice_payment(payment_preimage_conv, payment_secret_ref); + *ret_copy = PaymentPurpose_bolt12_offer_payment(payment_preimage_conv, payment_secret_ref, payment_context_conv); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_PaymentPurpose_bolt12_refund_payment"))) TS_PaymentPurpose_bolt12_refund_payment(uint64_t payment_preimage, int8_tArray payment_secret, uint64_t payment_context) { + void* payment_preimage_ptr = untag_ptr(payment_preimage); + CHECK_ACCESS(payment_preimage_ptr); + LDKCOption_ThirtyTwoBytesZ payment_preimage_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_preimage_ptr); + payment_preimage_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(payment_preimage)); + LDKThirtyTwoBytes payment_secret_ref; + CHECK(payment_secret->arr_len == 32); + memcpy(payment_secret_ref.data, payment_secret->elems, 32); FREE(payment_secret); + LDKBolt12RefundContext payment_context_conv; + payment_context_conv.inner = untag_ptr(payment_context); + payment_context_conv.is_owned = ptr_is_owned(payment_context); + CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_conv); + payment_context_conv = Bolt12RefundContext_clone(&payment_context_conv); + LDKPaymentPurpose *ret_copy = MALLOC(sizeof(LDKPaymentPurpose), "LDKPaymentPurpose"); + *ret_copy = PaymentPurpose_bolt12_refund_payment(payment_preimage_conv, payment_secret_ref, payment_context_conv); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -71599,27 +78323,31 @@ void __attribute__((export_name("TS_ClaimedHTLC_free"))) TS_ClaimedHTLC_free(ui ClaimedHTLC_free(this_obj_conv); } -int8_tArray __attribute__((export_name("TS_ClaimedHTLC_get_channel_id"))) TS_ClaimedHTLC_get_channel_id(uint64_t this_ptr) { +uint64_t __attribute__((export_name("TS_ClaimedHTLC_get_channel_id"))) TS_ClaimedHTLC_get_channel_id(uint64_t this_ptr) { LDKClaimedHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *ClaimedHTLC_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = ClaimedHTLC_get_channel_id(&this_ptr_conv); + uint64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void __attribute__((export_name("TS_ClaimedHTLC_set_channel_id"))) TS_ClaimedHTLC_set_channel_id(uint64_t this_ptr, int8_tArray val) { +void __attribute__((export_name("TS_ClaimedHTLC_set_channel_id"))) TS_ClaimedHTLC_set_channel_id(uint64_t this_ptr, uint64_t val) { LDKClaimedHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - ClaimedHTLC_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ClaimedHTLC_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray __attribute__((export_name("TS_ClaimedHTLC_get_user_channel_id"))) TS_ClaimedHTLC_get_user_channel_id(uint64_t this_ptr) { @@ -71702,14 +78430,16 @@ void __attribute__((export_name("TS_ClaimedHTLC_set_counterparty_skimmed_fee_ms ClaimedHTLC_set_counterparty_skimmed_fee_msat(&this_ptr_conv, val); } -uint64_t __attribute__((export_name("TS_ClaimedHTLC_new"))) TS_ClaimedHTLC_new(int8_tArray channel_id_arg, int8_tArray user_channel_id_arg, int32_t cltv_expiry_arg, int64_t value_msat_arg, int64_t counterparty_skimmed_fee_msat_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +uint64_t __attribute__((export_name("TS_ClaimedHTLC_new"))) TS_ClaimedHTLC_new(uint64_t channel_id_arg, int8_tArray user_channel_id_arg, int32_t cltv_expiry_arg, int64_t value_msat_arg, int64_t counterparty_skimmed_fee_msat_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKU128 user_channel_id_arg_ref; CHECK(user_channel_id_arg->arr_len == 16); memcpy(user_channel_id_arg_ref.le_bytes, user_channel_id_arg->elems, 16); FREE(user_channel_id_arg); - LDKClaimedHTLC ret_var = ClaimedHTLC_new(channel_id_arg_ref, user_channel_id_arg_ref, cltv_expiry_arg, value_msat_arg, counterparty_skimmed_fee_msat_arg); + LDKClaimedHTLC ret_var = ClaimedHTLC_new(channel_id_arg_conv, user_channel_id_arg_ref, cltv_expiry_arg, value_msat_arg, counterparty_skimmed_fee_msat_arg); uint64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -71909,9 +78639,23 @@ uint64_t __attribute__((export_name("TS_ClosureReason_holder_force_closed"))) T return ret_ref; } -uint64_t __attribute__((export_name("TS_ClosureReason_cooperative_closure"))) TS_ClosureReason_cooperative_closure() { +uint64_t __attribute__((export_name("TS_ClosureReason_legacy_cooperative_closure"))) TS_ClosureReason_legacy_cooperative_closure() { + LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason"); + *ret_copy = ClosureReason_legacy_cooperative_closure(); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_ClosureReason_counterparty_initiated_cooperative_closure"))) TS_ClosureReason_counterparty_initiated_cooperative_closure() { LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason"); - *ret_copy = ClosureReason_cooperative_closure(); + *ret_copy = ClosureReason_counterparty_initiated_cooperative_closure(); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +uint64_t __attribute__((export_name("TS_ClosureReason_locally_initiated_cooperative_closure"))) TS_ClosureReason_locally_initiated_cooperative_closure() { + LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason"); + *ret_copy = ClosureReason_locally_initiated_cooperative_closure(); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -71966,6 +78710,13 @@ uint64_t __attribute__((export_name("TS_ClosureReason_funding_batch_closure"))) return ret_ref; } +uint64_t __attribute__((export_name("TS_ClosureReason_htlcs_timed_out"))) TS_ClosureReason_htlcs_timed_out() { + LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason"); + *ret_copy = ClosureReason_htlcs_timed_out(); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + jboolean __attribute__((export_name("TS_ClosureReason_eq"))) TS_ClosureReason_eq(uint64_t a, uint64_t b) { LDKClosureReason* a_conv = (LDKClosureReason*)untag_ptr(a); LDKClosureReason* b_conv = (LDKClosureReason*)untag_ptr(b); @@ -72021,15 +78772,17 @@ uint64_t __attribute__((export_name("TS_HTLCDestination_clone"))) TS_HTLCDestin return ret_ref; } -uint64_t __attribute__((export_name("TS_HTLCDestination_next_hop_channel"))) TS_HTLCDestination_next_hop_channel(int8_tArray node_id, int8_tArray channel_id) { +uint64_t __attribute__((export_name("TS_HTLCDestination_next_hop_channel"))) TS_HTLCDestination_next_hop_channel(int8_tArray node_id, uint64_t channel_id) { LDKPublicKey node_id_ref; CHECK(node_id->arr_len == 33); memcpy(node_id_ref.compressed_form, node_id->elems, 33); FREE(node_id); - LDKThirtyTwoBytes channel_id_ref; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_ref.data, channel_id->elems, 32); FREE(channel_id); + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKHTLCDestination *ret_copy = MALLOC(sizeof(LDKHTLCDestination), "LDKHTLCDestination"); - *ret_copy = HTLCDestination_next_hop_channel(node_id_ref, channel_id_ref); + *ret_copy = HTLCDestination_next_hop_channel(node_id_ref, channel_id_conv); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -72048,6 +78801,13 @@ uint64_t __attribute__((export_name("TS_HTLCDestination_invalid_forward"))) TS_ return ret_ref; } +uint64_t __attribute__((export_name("TS_HTLCDestination_invalid_onion"))) TS_HTLCDestination_invalid_onion() { + LDKHTLCDestination *ret_copy = MALLOC(sizeof(LDKHTLCDestination), "LDKHTLCDestination"); + *ret_copy = HTLCDestination_invalid_onion(); + uint64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + uint64_t __attribute__((export_name("TS_HTLCDestination_failed_payment"))) TS_HTLCDestination_failed_payment(int8_tArray payment_hash) { LDKThirtyTwoBytes payment_hash_ref; CHECK(payment_hash->arr_len == 32); @@ -72175,10 +78935,12 @@ uint64_t __attribute__((export_name("TS_Event_clone"))) TS_Event_clone(uint64_t return ret_ref; } -uint64_t __attribute__((export_name("TS_Event_funding_generation_ready"))) TS_Event_funding_generation_ready(int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int64_t channel_value_satoshis, int8_tArray output_script, int8_tArray user_channel_id) { - LDKThirtyTwoBytes temporary_channel_id_ref; - CHECK(temporary_channel_id->arr_len == 32); - memcpy(temporary_channel_id_ref.data, temporary_channel_id->elems, 32); FREE(temporary_channel_id); +uint64_t __attribute__((export_name("TS_Event_funding_generation_ready"))) TS_Event_funding_generation_ready(uint64_t temporary_channel_id, int8_tArray counterparty_node_id, int64_t channel_value_satoshis, int8_tArray output_script, int8_tArray user_channel_id) { + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv = ChannelId_clone(&temporary_channel_id_conv); LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); @@ -72190,7 +78952,7 @@ uint64_t __attribute__((export_name("TS_Event_funding_generation_ready"))) TS_E CHECK(user_channel_id->arr_len == 16); memcpy(user_channel_id_ref.le_bytes, user_channel_id->elems, 16); FREE(user_channel_id); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_funding_generation_ready(temporary_channel_id_ref, counterparty_node_id_ref, channel_value_satoshis, output_script_ref, user_channel_id_ref); + *ret_copy = Event_funding_generation_ready(temporary_channel_id_conv, counterparty_node_id_ref, channel_value_satoshis, output_script_ref, user_channel_id_ref); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -72211,10 +78973,11 @@ uint64_t __attribute__((export_name("TS_Event_payment_claimable"))) TS_Event_pa CHECK_ACCESS(purpose_ptr); LDKPaymentPurpose purpose_conv = *(LDKPaymentPurpose*)(purpose_ptr); purpose_conv = PaymentPurpose_clone((LDKPaymentPurpose*)untag_ptr(purpose)); - void* via_channel_id_ptr = untag_ptr(via_channel_id); - CHECK_ACCESS(via_channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ via_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(via_channel_id_ptr); - via_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(via_channel_id)); + LDKChannelId via_channel_id_conv; + via_channel_id_conv.inner = untag_ptr(via_channel_id); + via_channel_id_conv.is_owned = ptr_is_owned(via_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(via_channel_id_conv); + via_channel_id_conv = ChannelId_clone(&via_channel_id_conv); void* via_user_channel_id_ptr = untag_ptr(via_user_channel_id); CHECK_ACCESS(via_user_channel_id_ptr); LDKCOption_U128Z via_user_channel_id_conv = *(LDKCOption_U128Z*)(via_user_channel_id_ptr); @@ -72463,50 +79226,68 @@ uint64_t __attribute__((export_name("TS_Event_spendable_outputs"))) TS_Event_sp outputs_constr.data[b] = outputs_conv_27_conv; } FREE(outputs); - void* channel_id_ptr = untag_ptr(channel_id); - CHECK_ACCESS(channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(channel_id_ptr); - channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(channel_id)); + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); *ret_copy = Event_spendable_outputs(outputs_constr, channel_id_conv); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -uint64_t __attribute__((export_name("TS_Event_payment_forwarded"))) TS_Event_payment_forwarded(uint64_t prev_channel_id, uint64_t next_channel_id, uint64_t fee_earned_msat, jboolean claim_from_onchain_tx, uint64_t outbound_amount_forwarded_msat) { - void* prev_channel_id_ptr = untag_ptr(prev_channel_id); - CHECK_ACCESS(prev_channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ prev_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(prev_channel_id_ptr); - prev_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(prev_channel_id)); - void* next_channel_id_ptr = untag_ptr(next_channel_id); - CHECK_ACCESS(next_channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ next_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(next_channel_id_ptr); - next_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(next_channel_id)); - void* fee_earned_msat_ptr = untag_ptr(fee_earned_msat); - CHECK_ACCESS(fee_earned_msat_ptr); - LDKCOption_u64Z fee_earned_msat_conv = *(LDKCOption_u64Z*)(fee_earned_msat_ptr); - fee_earned_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(fee_earned_msat)); +uint64_t __attribute__((export_name("TS_Event_payment_forwarded"))) TS_Event_payment_forwarded(uint64_t prev_channel_id, uint64_t next_channel_id, uint64_t prev_user_channel_id, uint64_t next_user_channel_id, uint64_t total_fee_earned_msat, uint64_t skimmed_fee_msat, jboolean claim_from_onchain_tx, uint64_t outbound_amount_forwarded_msat) { + LDKChannelId prev_channel_id_conv; + prev_channel_id_conv.inner = untag_ptr(prev_channel_id); + prev_channel_id_conv.is_owned = ptr_is_owned(prev_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_conv); + prev_channel_id_conv = ChannelId_clone(&prev_channel_id_conv); + LDKChannelId next_channel_id_conv; + next_channel_id_conv.inner = untag_ptr(next_channel_id); + next_channel_id_conv.is_owned = ptr_is_owned(next_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(next_channel_id_conv); + next_channel_id_conv = ChannelId_clone(&next_channel_id_conv); + void* prev_user_channel_id_ptr = untag_ptr(prev_user_channel_id); + CHECK_ACCESS(prev_user_channel_id_ptr); + LDKCOption_U128Z prev_user_channel_id_conv = *(LDKCOption_U128Z*)(prev_user_channel_id_ptr); + prev_user_channel_id_conv = COption_U128Z_clone((LDKCOption_U128Z*)untag_ptr(prev_user_channel_id)); + void* next_user_channel_id_ptr = untag_ptr(next_user_channel_id); + CHECK_ACCESS(next_user_channel_id_ptr); + LDKCOption_U128Z next_user_channel_id_conv = *(LDKCOption_U128Z*)(next_user_channel_id_ptr); + next_user_channel_id_conv = COption_U128Z_clone((LDKCOption_U128Z*)untag_ptr(next_user_channel_id)); + void* total_fee_earned_msat_ptr = untag_ptr(total_fee_earned_msat); + CHECK_ACCESS(total_fee_earned_msat_ptr); + LDKCOption_u64Z total_fee_earned_msat_conv = *(LDKCOption_u64Z*)(total_fee_earned_msat_ptr); + total_fee_earned_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(total_fee_earned_msat)); + void* skimmed_fee_msat_ptr = untag_ptr(skimmed_fee_msat); + CHECK_ACCESS(skimmed_fee_msat_ptr); + LDKCOption_u64Z skimmed_fee_msat_conv = *(LDKCOption_u64Z*)(skimmed_fee_msat_ptr); + skimmed_fee_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(skimmed_fee_msat)); void* outbound_amount_forwarded_msat_ptr = untag_ptr(outbound_amount_forwarded_msat); CHECK_ACCESS(outbound_amount_forwarded_msat_ptr); LDKCOption_u64Z outbound_amount_forwarded_msat_conv = *(LDKCOption_u64Z*)(outbound_amount_forwarded_msat_ptr); outbound_amount_forwarded_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(outbound_amount_forwarded_msat)); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_payment_forwarded(prev_channel_id_conv, next_channel_id_conv, fee_earned_msat_conv, claim_from_onchain_tx, outbound_amount_forwarded_msat_conv); + *ret_copy = Event_payment_forwarded(prev_channel_id_conv, next_channel_id_conv, prev_user_channel_id_conv, next_user_channel_id_conv, total_fee_earned_msat_conv, skimmed_fee_msat_conv, claim_from_onchain_tx, outbound_amount_forwarded_msat_conv); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -uint64_t __attribute__((export_name("TS_Event_channel_pending"))) TS_Event_channel_pending(int8_tArray channel_id, int8_tArray user_channel_id, uint64_t former_temporary_channel_id, int8_tArray counterparty_node_id, uint64_t funding_txo) { - LDKThirtyTwoBytes channel_id_ref; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_ref.data, channel_id->elems, 32); FREE(channel_id); +uint64_t __attribute__((export_name("TS_Event_channel_pending"))) TS_Event_channel_pending(uint64_t channel_id, int8_tArray user_channel_id, uint64_t former_temporary_channel_id, int8_tArray counterparty_node_id, uint64_t funding_txo, uint64_t channel_type) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKU128 user_channel_id_ref; CHECK(user_channel_id->arr_len == 16); memcpy(user_channel_id_ref.le_bytes, user_channel_id->elems, 16); FREE(user_channel_id); - void* former_temporary_channel_id_ptr = untag_ptr(former_temporary_channel_id); - CHECK_ACCESS(former_temporary_channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ former_temporary_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(former_temporary_channel_id_ptr); - former_temporary_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(former_temporary_channel_id)); + LDKChannelId former_temporary_channel_id_conv; + former_temporary_channel_id_conv.inner = untag_ptr(former_temporary_channel_id); + former_temporary_channel_id_conv.is_owned = ptr_is_owned(former_temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(former_temporary_channel_id_conv); + former_temporary_channel_id_conv = ChannelId_clone(&former_temporary_channel_id_conv); LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); @@ -72515,16 +79296,23 @@ uint64_t __attribute__((export_name("TS_Event_channel_pending"))) TS_Event_chan funding_txo_conv.is_owned = ptr_is_owned(funding_txo); CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_conv); funding_txo_conv = OutPoint_clone(&funding_txo_conv); + LDKChannelTypeFeatures channel_type_conv; + channel_type_conv.inner = untag_ptr(channel_type); + channel_type_conv.is_owned = ptr_is_owned(channel_type); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_conv); + channel_type_conv = ChannelTypeFeatures_clone(&channel_type_conv); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_channel_pending(channel_id_ref, user_channel_id_ref, former_temporary_channel_id_conv, counterparty_node_id_ref, funding_txo_conv); + *ret_copy = Event_channel_pending(channel_id_conv, user_channel_id_ref, former_temporary_channel_id_conv, counterparty_node_id_ref, funding_txo_conv, channel_type_conv); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -uint64_t __attribute__((export_name("TS_Event_channel_ready"))) TS_Event_channel_ready(int8_tArray channel_id, int8_tArray user_channel_id, int8_tArray counterparty_node_id, uint64_t channel_type) { - LDKThirtyTwoBytes channel_id_ref; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_ref.data, channel_id->elems, 32); FREE(channel_id); +uint64_t __attribute__((export_name("TS_Event_channel_ready"))) TS_Event_channel_ready(uint64_t channel_id, int8_tArray user_channel_id, int8_tArray counterparty_node_id, uint64_t channel_type) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKU128 user_channel_id_ref; CHECK(user_channel_id->arr_len == 16); memcpy(user_channel_id_ref.le_bytes, user_channel_id->elems, 16); FREE(user_channel_id); @@ -72537,15 +79325,17 @@ uint64_t __attribute__((export_name("TS_Event_channel_ready"))) TS_Event_channe CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_conv); channel_type_conv = ChannelTypeFeatures_clone(&channel_type_conv); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_channel_ready(channel_id_ref, user_channel_id_ref, counterparty_node_id_ref, channel_type_conv); + *ret_copy = Event_channel_ready(channel_id_conv, user_channel_id_ref, counterparty_node_id_ref, channel_type_conv); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -uint64_t __attribute__((export_name("TS_Event_channel_closed"))) TS_Event_channel_closed(int8_tArray channel_id, int8_tArray user_channel_id, uint64_t reason, int8_tArray counterparty_node_id, uint64_t channel_capacity_sats, uint64_t channel_funding_txo) { - LDKThirtyTwoBytes channel_id_ref; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_ref.data, channel_id->elems, 32); FREE(channel_id); +uint64_t __attribute__((export_name("TS_Event_channel_closed"))) TS_Event_channel_closed(uint64_t channel_id, int8_tArray user_channel_id, uint64_t reason, int8_tArray counterparty_node_id, uint64_t channel_capacity_sats, uint64_t channel_funding_txo) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKU128 user_channel_id_ref; CHECK(user_channel_id->arr_len == 16); memcpy(user_channel_id_ref.le_bytes, user_channel_id->elems, 16); FREE(user_channel_id); @@ -72566,30 +79356,34 @@ uint64_t __attribute__((export_name("TS_Event_channel_closed"))) TS_Event_chann CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_txo_conv); channel_funding_txo_conv = OutPoint_clone(&channel_funding_txo_conv); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_channel_closed(channel_id_ref, user_channel_id_ref, reason_conv, counterparty_node_id_ref, channel_capacity_sats_conv, channel_funding_txo_conv); + *ret_copy = Event_channel_closed(channel_id_conv, user_channel_id_ref, reason_conv, counterparty_node_id_ref, channel_capacity_sats_conv, channel_funding_txo_conv); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -uint64_t __attribute__((export_name("TS_Event_discard_funding"))) TS_Event_discard_funding(int8_tArray channel_id, int8_tArray transaction) { - LDKThirtyTwoBytes channel_id_ref; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_ref.data, channel_id->elems, 32); FREE(channel_id); +uint64_t __attribute__((export_name("TS_Event_discard_funding"))) TS_Event_discard_funding(uint64_t channel_id, int8_tArray transaction) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKTransaction transaction_ref; transaction_ref.datalen = transaction->arr_len; transaction_ref.data = MALLOC(transaction_ref.datalen, "LDKTransaction Bytes"); memcpy(transaction_ref.data, transaction->elems, transaction_ref.datalen); FREE(transaction); transaction_ref.data_is_owned = true; LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_discard_funding(channel_id_ref, transaction_ref); + *ret_copy = Event_discard_funding(channel_id_conv, transaction_ref); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -uint64_t __attribute__((export_name("TS_Event_open_channel_request"))) TS_Event_open_channel_request(int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_satoshis, int64_t push_msat, uint64_t channel_type) { - LDKThirtyTwoBytes temporary_channel_id_ref; - CHECK(temporary_channel_id->arr_len == 32); - memcpy(temporary_channel_id_ref.data, temporary_channel_id->elems, 32); FREE(temporary_channel_id); +uint64_t __attribute__((export_name("TS_Event_open_channel_request"))) TS_Event_open_channel_request(uint64_t temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_satoshis, int64_t push_msat, uint64_t channel_type) { + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv = ChannelId_clone(&temporary_channel_id_conv); LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); @@ -72599,21 +79393,23 @@ uint64_t __attribute__((export_name("TS_Event_open_channel_request"))) TS_Event CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_conv); channel_type_conv = ChannelTypeFeatures_clone(&channel_type_conv); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_open_channel_request(temporary_channel_id_ref, counterparty_node_id_ref, funding_satoshis, push_msat, channel_type_conv); + *ret_copy = Event_open_channel_request(temporary_channel_id_conv, counterparty_node_id_ref, funding_satoshis, push_msat, channel_type_conv); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -uint64_t __attribute__((export_name("TS_Event_htlchandling_failed"))) TS_Event_htlchandling_failed(int8_tArray prev_channel_id, uint64_t failed_next_destination) { - LDKThirtyTwoBytes prev_channel_id_ref; - CHECK(prev_channel_id->arr_len == 32); - memcpy(prev_channel_id_ref.data, prev_channel_id->elems, 32); FREE(prev_channel_id); +uint64_t __attribute__((export_name("TS_Event_htlchandling_failed"))) TS_Event_htlchandling_failed(uint64_t prev_channel_id, uint64_t failed_next_destination) { + LDKChannelId prev_channel_id_conv; + prev_channel_id_conv.inner = untag_ptr(prev_channel_id); + prev_channel_id_conv.is_owned = ptr_is_owned(prev_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_conv); + prev_channel_id_conv = ChannelId_clone(&prev_channel_id_conv); void* failed_next_destination_ptr = untag_ptr(failed_next_destination); CHECK_ACCESS(failed_next_destination_ptr); LDKHTLCDestination failed_next_destination_conv = *(LDKHTLCDestination*)(failed_next_destination_ptr); failed_next_destination_conv = HTLCDestination_clone((LDKHTLCDestination*)untag_ptr(failed_next_destination)); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_htlchandling_failed(prev_channel_id_ref, failed_next_destination_conv); + *ret_copy = Event_htlchandling_failed(prev_channel_id_conv, failed_next_destination_conv); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -73470,7 +80266,15 @@ uint64_t __attribute__((export_name("TS_BumpTransactionEvent_clone"))) TS_BumpT return ret_ref; } -uint64_t __attribute__((export_name("TS_BumpTransactionEvent_channel_close"))) TS_BumpTransactionEvent_channel_close(int8_tArray claim_id, int32_t package_target_feerate_sat_per_1000_weight, int8_tArray commitment_tx, int64_t commitment_tx_fee_satoshis, uint64_t anchor_descriptor, uint64_tArray pending_htlcs) { +uint64_t __attribute__((export_name("TS_BumpTransactionEvent_channel_close"))) TS_BumpTransactionEvent_channel_close(uint64_t channel_id, int8_tArray counterparty_node_id, int8_tArray claim_id, int32_t package_target_feerate_sat_per_1000_weight, int8_tArray commitment_tx, int64_t commitment_tx_fee_satoshis, uint64_t anchor_descriptor, uint64_tArray pending_htlcs) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); + LDKPublicKey counterparty_node_id_ref; + CHECK(counterparty_node_id->arr_len == 33); + memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); LDKThirtyTwoBytes claim_id_ref; CHECK(claim_id->arr_len == 32); memcpy(claim_id_ref.data, claim_id->elems, 32); FREE(claim_id); @@ -73502,12 +80306,20 @@ uint64_t __attribute__((export_name("TS_BumpTransactionEvent_channel_close"))) } FREE(pending_htlcs); LDKBumpTransactionEvent *ret_copy = MALLOC(sizeof(LDKBumpTransactionEvent), "LDKBumpTransactionEvent"); - *ret_copy = BumpTransactionEvent_channel_close(claim_id_ref, package_target_feerate_sat_per_1000_weight, commitment_tx_ref, commitment_tx_fee_satoshis, anchor_descriptor_conv, pending_htlcs_constr); + *ret_copy = BumpTransactionEvent_channel_close(channel_id_conv, counterparty_node_id_ref, claim_id_ref, package_target_feerate_sat_per_1000_weight, commitment_tx_ref, commitment_tx_fee_satoshis, anchor_descriptor_conv, pending_htlcs_constr); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -uint64_t __attribute__((export_name("TS_BumpTransactionEvent_htlcresolution"))) TS_BumpTransactionEvent_htlcresolution(int8_tArray claim_id, int32_t target_feerate_sat_per_1000_weight, uint64_tArray htlc_descriptors, int32_t tx_lock_time) { +uint64_t __attribute__((export_name("TS_BumpTransactionEvent_htlcresolution"))) TS_BumpTransactionEvent_htlcresolution(uint64_t channel_id, int8_tArray counterparty_node_id, int8_tArray claim_id, int32_t target_feerate_sat_per_1000_weight, uint64_tArray htlc_descriptors, int32_t tx_lock_time) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); + LDKPublicKey counterparty_node_id_ref; + CHECK(counterparty_node_id->arr_len == 33); + memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); LDKThirtyTwoBytes claim_id_ref; CHECK(claim_id->arr_len == 32); memcpy(claim_id_ref.data, claim_id->elems, 32); FREE(claim_id); @@ -73529,7 +80341,7 @@ uint64_t __attribute__((export_name("TS_BumpTransactionEvent_htlcresolution"))) } FREE(htlc_descriptors); LDKBumpTransactionEvent *ret_copy = MALLOC(sizeof(LDKBumpTransactionEvent), "LDKBumpTransactionEvent"); - *ret_copy = BumpTransactionEvent_htlcresolution(claim_id_ref, target_feerate_sat_per_1000_weight, htlc_descriptors_constr, tx_lock_time); + *ret_copy = BumpTransactionEvent_htlcresolution(channel_id_conv, counterparty_node_id_ref, claim_id_ref, target_feerate_sat_per_1000_weight, htlc_descriptors_constr, tx_lock_time); uint64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -75927,6 +82739,17 @@ int8_tArray __attribute__((export_name("TS_Bolt11Invoice_recover_payee_pub_key" return ret_arr; } +int8_tArray __attribute__((export_name("TS_Bolt11Invoice_get_payee_pub_key"))) TS_Bolt11Invoice_get_payee_pub_key(uint64_t this_arg) { + LDKBolt11Invoice this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(33, __LINE__); + memcpy(ret_arr->elems, Bolt11Invoice_get_payee_pub_key(&this_arg_conv).compressed_form, 33); + return ret_arr; +} + uint64_t __attribute__((export_name("TS_Bolt11Invoice_expires_at"))) TS_Bolt11Invoice_expires_at(uint64_t this_arg) { LDKBolt11Invoice this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); diff --git a/ts/bindings.mts b/ts/bindings.mts index d2b45b60..df63a8b5 100644 --- a/ts/bindings.mts +++ b/ts/bindings.mts @@ -90,7 +90,7 @@ async function finishInitializeWasm(wasmInstance: WebAssembly.Instance) { } const fn_list = ["uuuuuu", "buuuuu", "bbuuuu", "bbbuuu", "bbbbuu", "bbbbbu", - "bbbbbb", "ubuubu", "ubuuuu", "ubbuuu", "uubuuu", "uubbuu", "uububu", "ububuu"]; + "bbbbbb", "ubuubu", "ubuuuu", "ubbuuu", "uubuuu", "uubbuu", "uububu", "ububuu", "uuuubu"]; /* @internal */ export async function initializeWasmFromUint8Array(wasmBinary: Uint8Array) { @@ -462,6 +462,10 @@ export enum Bolt12SemanticError { * Blinded paths were expected but were missing. */ LDKBolt12SemanticError_MissingPaths, + /** + * Blinded paths were provided but were not expected. + */ + LDKBolt12SemanticError_UnexpectedPaths, /** * The blinded payinfo given does not match the number of blinded path hops. */ @@ -698,6 +702,19 @@ export enum ConfirmationTarget { [`ChannelManager::close_channel_with_feerate_and_script`]: crate::ln::channelmanager::ChannelManager::close_channel_with_feerate_and_script */ LDKConfirmationTarget_ChannelCloseMinimum, + /** + * The feerate [`OutputSweeper`] will use on transactions spending + [`SpendableOutputDescriptor`]s after a channel closure. + + Generally spending these outputs is safe as long as they eventually confirm, so a value + (slightly above) the mempool minimum should suffice. However, as this value will influence + how long funds will be unavailable after channel closure, [`FeeEstimator`] implementors + might want to choose a higher feerate to regain control over funds faster. + + [`OutputSweeper`]: crate::util::sweep::OutputSweeper + [`SpendableOutputDescriptor`]: crate::sign::SpendableOutputDescriptor + */ + LDKConfirmationTarget_OutputSpendingFee, } @@ -764,6 +781,25 @@ export enum Currency { } +/** + * The side of a channel that is the [`IntroductionNode`] in a [`BlindedPath`]. [BOLT 7] defines + * which nodes is which in the [`ChannelAnnouncement`] message. + * + * [BOLT 7]: https://github.com/lightning/bolts/blob/master/07-routing-gossip.md#the-channel_announcement-message + * [`ChannelAnnouncement`]: crate::ln::msgs::ChannelAnnouncement + */ +export enum Direction { + /** + * The lesser node id when compared lexicographically in ascending order. + */ + LDKDirection_NodeOne, + /** + * The greater node id when compared lexicographically in ascending order. + */ + LDKDirection_NodeTwo, + +} + /** * Describes the type of HTLC claim as determined by analyzing the witness. */ @@ -902,6 +938,10 @@ export enum PaymentFailureReason { LDKPaymentFailureReason_PaymentExpired, /** * We failed to find a route while retrying the payment. + + Note that this generally indicates that we've exhausted the available set of possible + routes - we tried the payment over a few routes but were not able to find any further + candidate routes beyond those. */ LDKPaymentFailureReason_RouteNotFound, /** @@ -1016,6 +1056,25 @@ export enum Secp256k1Error { } +/** + * A `short_channel_id` construction error + */ +export enum ShortChannelIdError { + /** + * Block height too high + */ + LDKShortChannelIdError_BlockOverflow, + /** + * Tx index too high + */ + LDKShortChannelIdError_TxIndexOverflow, + /** + * Vout index too high + */ + LDKShortChannelIdError_VoutIndexOverflow, + +} + /** * SI prefixes for the human readable part */ @@ -1121,6 +1180,42 @@ export function LDKBech32Error_InvalidData_get_invalid_data(ptr: bigint): number } const nativeResponseValue = wasm.TS_LDKBech32Error_InvalidData_get_invalid_data(ptr); return nativeResponseValue; +} + // struct LDKRefundMaybeWithDerivedMetadataBuilder CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(owner); + return nativeResponseValue; +} + // enum LDKBolt12SemanticError CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(owner: bigint): Bolt12SemanticError { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(owner); + return nativeResponseValue; +} + // struct LDKRefund CResult_RefundBolt12SemanticErrorZ_get_ok(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_RefundBolt12SemanticErrorZ_get_ok(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_RefundBolt12SemanticErrorZ_get_ok(owner); + return nativeResponseValue; +} + // enum LDKBolt12SemanticError CResult_RefundBolt12SemanticErrorZ_get_err(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_RefundBolt12SemanticErrorZ_get_err(owner: bigint): Bolt12SemanticError { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_RefundBolt12SemanticErrorZ_get_err(owner); + return nativeResponseValue; } /* @internal */ export class LDKCOption_u64Z { @@ -1389,6 +1484,60 @@ export function CResult_RecipientOnionFieldsNoneZ_get_err(owner: bigint): void { } const nativeResponseValue = wasm.TS_CResult_RecipientOnionFieldsNoneZ_get_err(owner); // debug statements here +} + // struct LDKUnsignedBolt12Invoice CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(owner); + return nativeResponseValue; +} + // enum LDKBolt12SemanticError CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(owner: bigint): Bolt12SemanticError { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(owner); + return nativeResponseValue; +} + // struct LDKBolt12Invoice CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(owner); + return nativeResponseValue; +} + // enum LDKBolt12SemanticError CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(owner: bigint): Bolt12SemanticError { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(owner); + return nativeResponseValue; +} + // struct LDKSchnorrSignature CResult_SchnorrSignatureNoneZ_get_ok(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_SchnorrSignatureNoneZ_get_ok(owner: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_SchnorrSignatureNoneZ_get_ok(owner); + return nativeResponseValue; +} + // void CResult_SchnorrSignatureNoneZ_get_err(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_SchnorrSignatureNoneZ_get_err(owner: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_SchnorrSignatureNoneZ_get_err(owner); + // debug statements here } /* @internal */ export class LDKCOption_CVec_ThirtyTwoBytesZZ { @@ -1409,6 +1558,102 @@ export function LDKCOption_CVec_ThirtyTwoBytesZZ_Some_get_some(ptr: bigint): num } const nativeResponseValue = wasm.TS_LDKCOption_CVec_ThirtyTwoBytesZZ_Some_get_some(ptr); return nativeResponseValue; +} +/* @internal */ +export class LDKAmount { + protected constructor() {} +} +/* @internal */ +export function LDKAmount_ty_from_ptr(ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKAmount_ty_from_ptr(ptr); + return nativeResponseValue; +} +/* @internal */ +export function LDKAmount_Bitcoin_get_amount_msats(ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKAmount_Bitcoin_get_amount_msats(ptr); + return nativeResponseValue; +} +/* @internal */ +export function LDKAmount_Currency_get_iso4217_code(ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKAmount_Currency_get_iso4217_code(ptr); + return nativeResponseValue; +} +/* @internal */ +export function LDKAmount_Currency_get_amount(ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKAmount_Currency_get_amount(ptr); + return nativeResponseValue; +} +/* @internal */ +export class LDKCOption_AmountZ { + protected constructor() {} +} +/* @internal */ +export function LDKCOption_AmountZ_ty_from_ptr(ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKCOption_AmountZ_ty_from_ptr(ptr); + return nativeResponseValue; +} +/* @internal */ +export function LDKCOption_AmountZ_Some_get_some(ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKCOption_AmountZ_Some_get_some(ptr); + return nativeResponseValue; +} +/* @internal */ +export class LDKQuantity { + protected constructor() {} +} +/* @internal */ +export function LDKQuantity_ty_from_ptr(ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKQuantity_ty_from_ptr(ptr); + return nativeResponseValue; +} +/* @internal */ +export function LDKQuantity_Bounded_get_bounded(ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKQuantity_Bounded_get_bounded(ptr); + return nativeResponseValue; +} +/* @internal */ +export class LDKCOption_QuantityZ { + protected constructor() {} +} +/* @internal */ +export function LDKCOption_QuantityZ_ty_from_ptr(ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKCOption_QuantityZ_ty_from_ptr(ptr); + return nativeResponseValue; +} +/* @internal */ +export function LDKCOption_QuantityZ_Some_get_some(ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKCOption_QuantityZ_Some_get_some(ptr); + return nativeResponseValue; } // struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesNoneZ_get_ok(LDKCResult_ThirtyTwoBytesNoneZ *NONNULL_PTR owner); /* @internal */ @@ -1718,40 +1963,40 @@ export function CResult_RecoverableSignatureNoneZ_get_err(owner: bigint): void { const nativeResponseValue = wasm.TS_CResult_RecoverableSignatureNoneZ_get_err(owner); // debug statements here } - // struct LDKSchnorrSignature CResult_SchnorrSignatureNoneZ_get_ok(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner); + // struct LDKECDSASignature CResult_ECDSASignatureNoneZ_get_ok(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner); /* @internal */ -export function CResult_SchnorrSignatureNoneZ_get_ok(owner: bigint): number { +export function CResult_ECDSASignatureNoneZ_get_ok(owner: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_SchnorrSignatureNoneZ_get_ok(owner); + const nativeResponseValue = wasm.TS_CResult_ECDSASignatureNoneZ_get_ok(owner); return nativeResponseValue; } - // void CResult_SchnorrSignatureNoneZ_get_err(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner); + // void CResult_ECDSASignatureNoneZ_get_err(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner); /* @internal */ -export function CResult_SchnorrSignatureNoneZ_get_err(owner: bigint): void { +export function CResult_ECDSASignatureNoneZ_get_err(owner: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_SchnorrSignatureNoneZ_get_err(owner); + const nativeResponseValue = wasm.TS_CResult_ECDSASignatureNoneZ_get_err(owner); // debug statements here } - // struct LDKECDSASignature CResult_ECDSASignatureNoneZ_get_ok(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner); + // struct LDKTransaction CResult_TransactionNoneZ_get_ok(LDKCResult_TransactionNoneZ *NONNULL_PTR owner); /* @internal */ -export function CResult_ECDSASignatureNoneZ_get_ok(owner: bigint): number { +export function CResult_TransactionNoneZ_get_ok(owner: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_ECDSASignatureNoneZ_get_ok(owner); + const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_get_ok(owner); return nativeResponseValue; } - // void CResult_ECDSASignatureNoneZ_get_err(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner); + // void CResult_TransactionNoneZ_get_err(LDKCResult_TransactionNoneZ *NONNULL_PTR owner); /* @internal */ -export function CResult_ECDSASignatureNoneZ_get_err(owner: bigint): void { +export function CResult_TransactionNoneZ_get_err(owner: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_ECDSASignatureNoneZ_get_err(owner); + const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_get_err(owner); // debug statements here } // struct LDKECDSASignature C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_a(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ *NONNULL_PTR owner); @@ -2136,24 +2381,6 @@ export function CResult_InMemorySignerDecodeErrorZ_get_err(owner: bigint): bigin } const nativeResponseValue = wasm.TS_CResult_InMemorySignerDecodeErrorZ_get_err(owner); return nativeResponseValue; -} - // struct LDKTransaction CResult_TransactionNoneZ_get_ok(LDKCResult_TransactionNoneZ *NONNULL_PTR owner); -/* @internal */ -export function CResult_TransactionNoneZ_get_ok(owner: bigint): number { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_get_ok(owner); - return nativeResponseValue; -} - // void CResult_TransactionNoneZ_get_err(LDKCResult_TransactionNoneZ *NONNULL_PTR owner); -/* @internal */ -export function CResult_TransactionNoneZ_get_err(owner: bigint): void { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_get_err(owner); - // debug statements here } // struct LDKRoute CResult_RouteLightningErrorZ_get_ok(LDKCResult_RouteLightningErrorZ *NONNULL_PTR owner); /* @internal */ @@ -2555,6 +2782,24 @@ export function CResult_ProbabilisticScorerDecodeErrorZ_get_err(owner: bigint): } const nativeResponseValue = wasm.TS_CResult_ProbabilisticScorerDecodeErrorZ_get_err(owner); return nativeResponseValue; +} + // struct LDKBestBlock CResult_BestBlockDecodeErrorZ_get_ok(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_BestBlockDecodeErrorZ_get_ok(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_BestBlockDecodeErrorZ_get_ok(owner); + return nativeResponseValue; +} + // struct LDKDecodeError CResult_BestBlockDecodeErrorZ_get_err(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_BestBlockDecodeErrorZ_get_err(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_BestBlockDecodeErrorZ_get_err(owner); + return nativeResponseValue; } // uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR owner); /* @internal */ @@ -2620,6 +2865,34 @@ export function CResult_ChannelMonitorUpdateStatusNoneZ_get_err(owner: bigint): // debug statements here } /* @internal */ +export class LDKClosureReason { + protected constructor() {} +} +/* @internal */ +export function LDKClosureReason_ty_from_ptr(ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKClosureReason_ty_from_ptr(ptr); + return nativeResponseValue; +} +/* @internal */ +export function LDKClosureReason_CounterpartyForceClosed_get_peer_msg(ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKClosureReason_CounterpartyForceClosed_get_peer_msg(ptr); + return nativeResponseValue; +} +/* @internal */ +export function LDKClosureReason_ProcessingError_get_err(ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKClosureReason_ProcessingError_get_err(ptr); + return nativeResponseValue; +} +/* @internal */ export class LDKMonitorEvent { protected constructor() {} } @@ -2640,6 +2913,30 @@ export function LDKMonitorEvent_HTLCEvent_get_htlc_event(ptr: bigint): bigint { return nativeResponseValue; } /* @internal */ +export function LDKMonitorEvent_HolderForceClosedWithInfo_get_reason(ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKMonitorEvent_HolderForceClosedWithInfo_get_reason(ptr); + return nativeResponseValue; +} +/* @internal */ +export function LDKMonitorEvent_HolderForceClosedWithInfo_get_outpoint(ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKMonitorEvent_HolderForceClosedWithInfo_get_outpoint(ptr); + return nativeResponseValue; +} +/* @internal */ +export function LDKMonitorEvent_HolderForceClosedWithInfo_get_channel_id(ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKMonitorEvent_HolderForceClosedWithInfo_get_channel_id(ptr); + return nativeResponseValue; +} +/* @internal */ export function LDKMonitorEvent_HolderForceClosed_get_holder_force_closed(ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); @@ -2656,6 +2953,14 @@ export function LDKMonitorEvent_Completed_get_funding_txo(ptr: bigint): bigint { return nativeResponseValue; } /* @internal */ +export function LDKMonitorEvent_Completed_get_channel_id(ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKMonitorEvent_Completed_get_channel_id(ptr); + return nativeResponseValue; +} +/* @internal */ export function LDKMonitorEvent_Completed_get_monitor_update_id(ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); @@ -2663,31 +2968,40 @@ export function LDKMonitorEvent_Completed_get_monitor_update_id(ptr: bigint): bi const nativeResponseValue = wasm.TS_LDKMonitorEvent_Completed_get_monitor_update_id(ptr); return nativeResponseValue; } - // struct LDKOutPoint C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner); + // struct LDKOutPoint C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner); /* @internal */ -export function C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(owner: bigint): bigint { +export function C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(owner: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(owner); + const nativeResponseValue = wasm.TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(owner); return nativeResponseValue; } - // struct LDKCVec_MonitorEventZ C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner); + // struct LDKChannelId C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner); /* @internal */ -export function C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(owner: bigint): number { +export function C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(owner: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(owner); + const nativeResponseValue = wasm.TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(owner); return nativeResponseValue; } - // struct LDKPublicKey C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner); + // struct LDKCVec_MonitorEventZ C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner); /* @internal */ -export function C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(owner: bigint): number { +export function C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(owner: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(owner); + const nativeResponseValue = wasm.TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(owner); + return nativeResponseValue; +} + // struct LDKPublicKey C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner); +/* @internal */ +export function C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(owner: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(owner); return nativeResponseValue; } // struct LDKInitFeatures CResult_InitFeaturesDecodeErrorZ_get_ok(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner); @@ -2816,40 +3130,112 @@ export function CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(owner: bigint): const nativeResponseValue = wasm.TS_CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(owner); return nativeResponseValue; } - // struct LDKOffer CResult_OfferBolt12ParseErrorZ_get_ok(LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR owner); + // struct LDKOfferId CResult_OfferIdDecodeErrorZ_get_ok(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR owner); /* @internal */ -export function CResult_OfferBolt12ParseErrorZ_get_ok(owner: bigint): bigint { +export function CResult_OfferIdDecodeErrorZ_get_ok(owner: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_OfferBolt12ParseErrorZ_get_ok(owner); + const nativeResponseValue = wasm.TS_CResult_OfferIdDecodeErrorZ_get_ok(owner); return nativeResponseValue; } - // struct LDKBolt12ParseError CResult_OfferBolt12ParseErrorZ_get_err(LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR owner); + // struct LDKDecodeError CResult_OfferIdDecodeErrorZ_get_err(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR owner); /* @internal */ -export function CResult_OfferBolt12ParseErrorZ_get_err(owner: bigint): bigint { +export function CResult_OfferIdDecodeErrorZ_get_err(owner: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_OfferBolt12ParseErrorZ_get_err(owner); + const nativeResponseValue = wasm.TS_CResult_OfferIdDecodeErrorZ_get_err(owner); return nativeResponseValue; } - // struct LDKPublicKey CResult_PublicKeySecp256k1ErrorZ_get_ok(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner); + // void CResult_NoneBolt12SemanticErrorZ_get_ok(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner); /* @internal */ -export function CResult_PublicKeySecp256k1ErrorZ_get_ok(owner: bigint): number { +export function CResult_NoneBolt12SemanticErrorZ_get_ok(owner: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_PublicKeySecp256k1ErrorZ_get_ok(owner); + const nativeResponseValue = wasm.TS_CResult_NoneBolt12SemanticErrorZ_get_ok(owner); + // debug statements here +} + // enum LDKBolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_NoneBolt12SemanticErrorZ_get_err(owner: bigint): Bolt12SemanticError { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_NoneBolt12SemanticErrorZ_get_err(owner); return nativeResponseValue; } - // enum LDKSecp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner); + // struct LDKOffer CResult_OfferBolt12SemanticErrorZ_get_ok(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR owner); /* @internal */ -export function CResult_PublicKeySecp256k1ErrorZ_get_err(owner: bigint): Secp256k1Error { +export function CResult_OfferBolt12SemanticErrorZ_get_ok(owner: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_PublicKeySecp256k1ErrorZ_get_err(owner); + const nativeResponseValue = wasm.TS_CResult_OfferBolt12SemanticErrorZ_get_ok(owner); + return nativeResponseValue; +} + // enum LDKBolt12SemanticError CResult_OfferBolt12SemanticErrorZ_get_err(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_OfferBolt12SemanticErrorZ_get_err(owner: bigint): Bolt12SemanticError { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_OfferBolt12SemanticErrorZ_get_err(owner); + return nativeResponseValue; +} + // struct LDKInvoiceRequestWithDerivedPayerIdBuilder CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(owner); + return nativeResponseValue; +} + // enum LDKBolt12SemanticError CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(owner: bigint): Bolt12SemanticError { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(owner); + return nativeResponseValue; +} + // struct LDKInvoiceRequestWithExplicitPayerIdBuilder CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(owner); + return nativeResponseValue; +} + // enum LDKBolt12SemanticError CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(owner: bigint): Bolt12SemanticError { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(owner); + return nativeResponseValue; +} + // struct LDKOffer CResult_OfferBolt12ParseErrorZ_get_ok(LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_OfferBolt12ParseErrorZ_get_ok(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_OfferBolt12ParseErrorZ_get_ok(owner); + return nativeResponseValue; +} + // struct LDKBolt12ParseError CResult_OfferBolt12ParseErrorZ_get_err(LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_OfferBolt12ParseErrorZ_get_err(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_OfferBolt12ParseErrorZ_get_err(owner); return nativeResponseValue; } // struct LDKNodeId CResult_NodeIdDecodeErrorZ_get_ok(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR owner); @@ -2869,6 +3255,24 @@ export function CResult_NodeIdDecodeErrorZ_get_err(owner: bigint): bigint { } const nativeResponseValue = wasm.TS_CResult_NodeIdDecodeErrorZ_get_err(owner); return nativeResponseValue; +} + // struct LDKPublicKey CResult_PublicKeySecp256k1ErrorZ_get_ok(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_PublicKeySecp256k1ErrorZ_get_ok(owner: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_PublicKeySecp256k1ErrorZ_get_ok(owner); + return nativeResponseValue; +} + // enum LDKSecp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_PublicKeySecp256k1ErrorZ_get_err(owner: bigint): Secp256k1Error { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_PublicKeySecp256k1ErrorZ_get_err(owner); + return nativeResponseValue; } /* @internal */ export class LDKNetworkUpdate { @@ -4020,6 +4424,24 @@ export function LDKCOption_CVec_SocketAddressZZ_Some_get_some(ptr: bigint): numb } const nativeResponseValue = wasm.TS_LDKCOption_CVec_SocketAddressZZ_Some_get_some(ptr); return nativeResponseValue; +} + // uint64_t CResult_u64ShortChannelIdErrorZ_get_ok(LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_u64ShortChannelIdErrorZ_get_ok(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_u64ShortChannelIdErrorZ_get_ok(owner); + return nativeResponseValue; +} + // enum LDKShortChannelIdError CResult_u64ShortChannelIdErrorZ_get_err(LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_u64ShortChannelIdErrorZ_get_err(owner: bigint): ShortChannelIdError { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_u64ShortChannelIdErrorZ_get_err(owner); + return nativeResponseValue; } // struct LDKPendingHTLCInfo CResult_PendingHTLCInfoInboundHTLCErrZ_get_ok(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR owner); /* @internal */ @@ -4094,6 +4516,62 @@ export function CResult_CVec_UtxoZNoneZ_get_err(owner: bigint): void { } const nativeResponseValue = wasm.TS_CResult_CVec_UtxoZNoneZ_get_err(owner); // debug statements here +} +/* @internal */ +export class LDKPaymentContext { + protected constructor() {} +} +/* @internal */ +export function LDKPaymentContext_ty_from_ptr(ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKPaymentContext_ty_from_ptr(ptr); + return nativeResponseValue; +} +/* @internal */ +export function LDKPaymentContext_Unknown_get_unknown(ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKPaymentContext_Unknown_get_unknown(ptr); + return nativeResponseValue; +} +/* @internal */ +export function LDKPaymentContext_Bolt12Offer_get_bolt12_offer(ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKPaymentContext_Bolt12Offer_get_bolt12_offer(ptr); + return nativeResponseValue; +} +/* @internal */ +export function LDKPaymentContext_Bolt12Refund_get_bolt12_refund(ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKPaymentContext_Bolt12Refund_get_bolt12_refund(ptr); + return nativeResponseValue; +} +/* @internal */ +export class LDKCOption_PaymentContextZ { + protected constructor() {} +} +/* @internal */ +export function LDKCOption_PaymentContextZ_ty_from_ptr(ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKCOption_PaymentContextZ_ty_from_ptr(ptr); + return nativeResponseValue; +} +/* @internal */ +export function LDKCOption_PaymentContextZ_Some_get_some(ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKCOption_PaymentContextZ_Some_get_some(ptr); + return nativeResponseValue; } // uint64_t C2Tuple_u64u16Z_get_a(LDKC2Tuple_u64u16Z *NONNULL_PTR owner); /* @internal */ @@ -4153,22 +4631,22 @@ export function LDKCOption_ChannelShutdownStateZ_Some_get_some(ptr: bigint): Cha const nativeResponseValue = wasm.TS_LDKCOption_ChannelShutdownStateZ_Some_get_some(ptr); return nativeResponseValue; } - // struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesAPIErrorZ_get_ok(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner); + // struct LDKChannelId CResult_ChannelIdAPIErrorZ_get_ok(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR owner); /* @internal */ -export function CResult_ThirtyTwoBytesAPIErrorZ_get_ok(owner: bigint): number { +export function CResult_ChannelIdAPIErrorZ_get_ok(owner: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_ThirtyTwoBytesAPIErrorZ_get_ok(owner); + const nativeResponseValue = wasm.TS_CResult_ChannelIdAPIErrorZ_get_ok(owner); return nativeResponseValue; } - // struct LDKAPIError CResult_ThirtyTwoBytesAPIErrorZ_get_err(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner); + // struct LDKAPIError CResult_ChannelIdAPIErrorZ_get_err(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR owner); /* @internal */ -export function CResult_ThirtyTwoBytesAPIErrorZ_get_err(owner: bigint): bigint { +export function CResult_ChannelIdAPIErrorZ_get_err(owner: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_ThirtyTwoBytesAPIErrorZ_get_err(owner); + const nativeResponseValue = wasm.TS_CResult_ChannelIdAPIErrorZ_get_err(owner); return nativeResponseValue; } /* @internal */ @@ -4453,60 +4931,60 @@ export function CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFail const nativeResponseValue = wasm.TS_CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_get_err(owner); return nativeResponseValue; } - // struct LDKThirtyTwoBytes C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR owner); + // struct LDKChannelId C2Tuple_ChannelIdPublicKeyZ_get_a(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR owner); /* @internal */ -export function C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(owner: bigint): number { +export function C2Tuple_ChannelIdPublicKeyZ_get_a(owner: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(owner); + const nativeResponseValue = wasm.TS_C2Tuple_ChannelIdPublicKeyZ_get_a(owner); return nativeResponseValue; } - // struct LDKPublicKey C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR owner); + // struct LDKPublicKey C2Tuple_ChannelIdPublicKeyZ_get_b(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR owner); /* @internal */ -export function C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(owner: bigint): number { +export function C2Tuple_ChannelIdPublicKeyZ_get_b(owner: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(owner); + const nativeResponseValue = wasm.TS_C2Tuple_ChannelIdPublicKeyZ_get_b(owner); return nativeResponseValue; } + // struct LDKOfferWithDerivedMetadataBuilder CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); /* @internal */ -export class LDKCOption_StrZ { - protected constructor() {} -} -/* @internal */ -export function LDKCOption_StrZ_ty_from_ptr(ptr: bigint): number { +export function CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(owner: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_LDKCOption_StrZ_ty_from_ptr(ptr); + const nativeResponseValue = wasm.TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(owner); return nativeResponseValue; } + // enum LDKBolt12SemanticError CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); /* @internal */ -export function LDKCOption_StrZ_Some_get_some(ptr: bigint): number { +export function CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(owner: bigint): Bolt12SemanticError { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_LDKCOption_StrZ_Some_get_some(ptr); + const nativeResponseValue = wasm.TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(owner); return nativeResponseValue; } - // void CResult_NoneBolt12SemanticErrorZ_get_ok(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner); /* @internal */ -export function CResult_NoneBolt12SemanticErrorZ_get_ok(owner: bigint): void { +export class LDKCOption_StrZ { + protected constructor() {} +} +/* @internal */ +export function LDKCOption_StrZ_ty_from_ptr(ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_NoneBolt12SemanticErrorZ_get_ok(owner); - // debug statements here + const nativeResponseValue = wasm.TS_LDKCOption_StrZ_ty_from_ptr(ptr); + return nativeResponseValue; } - // enum LDKBolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner); /* @internal */ -export function CResult_NoneBolt12SemanticErrorZ_get_err(owner: bigint): Bolt12SemanticError { +export function LDKCOption_StrZ_Some_get_some(ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_NoneBolt12SemanticErrorZ_get_err(owner); + const nativeResponseValue = wasm.TS_LDKCOption_StrZ_Some_get_some(ptr); return nativeResponseValue; } // struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_ok(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ *NONNULL_PTR owner); @@ -4526,6 +5004,24 @@ export function CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_err(owner } const nativeResponseValue = wasm.TS_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_err(owner); // debug statements here +} + // struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesAPIErrorZ_get_ok(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_ThirtyTwoBytesAPIErrorZ_get_ok(owner: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_ThirtyTwoBytesAPIErrorZ_get_ok(owner); + return nativeResponseValue; +} + // struct LDKAPIError CResult_ThirtyTwoBytesAPIErrorZ_get_err(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_ThirtyTwoBytesAPIErrorZ_get_err(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_ThirtyTwoBytesAPIErrorZ_get_err(owner); + return nativeResponseValue; } /* @internal */ export class LDKOffersMessage { @@ -4781,6 +5277,14 @@ export function LDKPendingHTLCRouting_Receive_get_payment_metadata(ptr: bigint): return nativeResponseValue; } /* @internal */ +export function LDKPendingHTLCRouting_Receive_get_payment_context(ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKPendingHTLCRouting_Receive_get_payment_context(ptr); + return nativeResponseValue; +} +/* @internal */ export function LDKPendingHTLCRouting_Receive_get_incoming_cltv_expiry(ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); @@ -4851,6 +5355,14 @@ export function LDKPendingHTLCRouting_ReceiveKeysend_get_custom_tlvs(ptr: bigint } const nativeResponseValue = wasm.TS_LDKPendingHTLCRouting_ReceiveKeysend_get_custom_tlvs(ptr); return nativeResponseValue; +} +/* @internal */ +export function LDKPendingHTLCRouting_ReceiveKeysend_get_requires_blinded_error(ptr: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKPendingHTLCRouting_ReceiveKeysend_get_requires_blinded_error(ptr); + return nativeResponseValue; } // struct LDKPendingHTLCRouting CResult_PendingHTLCRoutingDecodeErrorZ_get_ok(LDKCResult_PendingHTLCRoutingDecodeErrorZ *NONNULL_PTR owner); /* @internal */ @@ -4961,7 +5473,7 @@ export function Watch_update_channel(this_arg: bigint, funding_txo: bigint, upda const nativeResponseValue = wasm.TS_Watch_update_channel(this_arg, funding_txo, update); return nativeResponseValue; } - // LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg + // LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg /* @internal */ export function Watch_release_pending_monitor_events(this_arg: bigint): number { if(!isWasmInitialized) { @@ -6050,24 +6562,6 @@ export function LDKCOption_SocketAddressZ_Some_get_some(ptr: bigint): bigint { } const nativeResponseValue = wasm.TS_LDKCOption_SocketAddressZ_Some_get_some(ptr); return nativeResponseValue; -} - // struct LDKPublicKey C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR owner); -/* @internal */ -export function C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(owner: bigint): number { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(owner); - return nativeResponseValue; -} - // struct LDKCOption_SocketAddressZ C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR owner); -/* @internal */ -export function C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(owner: bigint): bigint { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(owner); - return nativeResponseValue; } // struct LDKCVec_u8Z CResult_CVec_u8ZPeerHandleErrorZ_get_ok(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR owner); /* @internal */ @@ -6258,6 +6752,42 @@ export function CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_get_err(ow } const nativeResponseValue = wasm.TS_CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_get_err(owner); return nativeResponseValue; +} + // struct LDKUnsignedInvoiceRequest CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(owner); + return nativeResponseValue; +} + // enum LDKBolt12SemanticError CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(owner: bigint): Bolt12SemanticError { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(owner); + return nativeResponseValue; +} + // struct LDKInvoiceRequest CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(owner); + return nativeResponseValue; +} + // enum LDKBolt12SemanticError CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(owner: bigint): Bolt12SemanticError { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(owner); + return nativeResponseValue; } /* @internal */ export class LDKCOption_SecretKeyZ { @@ -6278,6 +6808,24 @@ export function LDKCOption_SecretKeyZ_Some_get_some(ptr: bigint): number { } const nativeResponseValue = wasm.TS_LDKCOption_SecretKeyZ_Some_get_some(ptr); return nativeResponseValue; +} + // struct LDKInvoiceWithExplicitSigningPubkeyBuilder CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(owner); + return nativeResponseValue; +} + // enum LDKBolt12SemanticError CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(owner: bigint): Bolt12SemanticError { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(owner); + return nativeResponseValue; } // struct LDKVerifiedInvoiceRequest CResult_VerifiedInvoiceRequestNoneZ_get_ok(LDKCResult_VerifiedInvoiceRequestNoneZ *NONNULL_PTR owner); /* @internal */ @@ -6296,6 +6844,62 @@ export function CResult_VerifiedInvoiceRequestNoneZ_get_err(owner: bigint): void } const nativeResponseValue = wasm.TS_CResult_VerifiedInvoiceRequestNoneZ_get_err(owner); // debug statements here +} + // struct LDKInvoiceWithDerivedSigningPubkeyBuilder CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(owner); + return nativeResponseValue; +} + // enum LDKBolt12SemanticError CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(owner: bigint): Bolt12SemanticError { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(owner); + return nativeResponseValue; +} + // struct LDKInvoiceRequestFields CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(owner); + return nativeResponseValue; +} + // struct LDKDecodeError CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(owner); + return nativeResponseValue; +} +/* @internal */ +export class LDKCOption_ECDSASignatureZ { + protected constructor() {} +} +/* @internal */ +export function LDKCOption_ECDSASignatureZ_ty_from_ptr(ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKCOption_ECDSASignatureZ_ty_from_ptr(ptr); + return nativeResponseValue; +} +/* @internal */ +export function LDKCOption_ECDSASignatureZ_Some_get_some(ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKCOption_ECDSASignatureZ_Some_get_some(ptr); + return nativeResponseValue; } /* @internal */ export class LDKCOption_i64Z { @@ -7632,19 +8236,67 @@ export function LDKPaymentPurpose_ty_from_ptr(ptr: bigint): number { return nativeResponseValue; } /* @internal */ -export function LDKPaymentPurpose_InvoicePayment_get_payment_preimage(ptr: bigint): bigint { +export function LDKPaymentPurpose_Bolt11InvoicePayment_get_payment_preimage(ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_LDKPaymentPurpose_InvoicePayment_get_payment_preimage(ptr); + const nativeResponseValue = wasm.TS_LDKPaymentPurpose_Bolt11InvoicePayment_get_payment_preimage(ptr); return nativeResponseValue; } /* @internal */ -export function LDKPaymentPurpose_InvoicePayment_get_payment_secret(ptr: bigint): number { +export function LDKPaymentPurpose_Bolt11InvoicePayment_get_payment_secret(ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_LDKPaymentPurpose_InvoicePayment_get_payment_secret(ptr); + const nativeResponseValue = wasm.TS_LDKPaymentPurpose_Bolt11InvoicePayment_get_payment_secret(ptr); + return nativeResponseValue; +} +/* @internal */ +export function LDKPaymentPurpose_Bolt12OfferPayment_get_payment_preimage(ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKPaymentPurpose_Bolt12OfferPayment_get_payment_preimage(ptr); + return nativeResponseValue; +} +/* @internal */ +export function LDKPaymentPurpose_Bolt12OfferPayment_get_payment_secret(ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKPaymentPurpose_Bolt12OfferPayment_get_payment_secret(ptr); + return nativeResponseValue; +} +/* @internal */ +export function LDKPaymentPurpose_Bolt12OfferPayment_get_payment_context(ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKPaymentPurpose_Bolt12OfferPayment_get_payment_context(ptr); + return nativeResponseValue; +} +/* @internal */ +export function LDKPaymentPurpose_Bolt12RefundPayment_get_payment_preimage(ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKPaymentPurpose_Bolt12RefundPayment_get_payment_preimage(ptr); + return nativeResponseValue; +} +/* @internal */ +export function LDKPaymentPurpose_Bolt12RefundPayment_get_payment_secret(ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKPaymentPurpose_Bolt12RefundPayment_get_payment_secret(ptr); + return nativeResponseValue; +} +/* @internal */ +export function LDKPaymentPurpose_Bolt12RefundPayment_get_payment_context(ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKPaymentPurpose_Bolt12RefundPayment_get_payment_context(ptr); return nativeResponseValue; } /* @internal */ @@ -7758,34 +8410,6 @@ export function CResult_COption_PathFailureZDecodeErrorZ_get_err(owner: bigint): return nativeResponseValue; } /* @internal */ -export class LDKClosureReason { - protected constructor() {} -} -/* @internal */ -export function LDKClosureReason_ty_from_ptr(ptr: bigint): number { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_LDKClosureReason_ty_from_ptr(ptr); - return nativeResponseValue; -} -/* @internal */ -export function LDKClosureReason_CounterpartyForceClosed_get_peer_msg(ptr: bigint): bigint { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_LDKClosureReason_CounterpartyForceClosed_get_peer_msg(ptr); - return nativeResponseValue; -} -/* @internal */ -export function LDKClosureReason_ProcessingError_get_err(ptr: bigint): number { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_LDKClosureReason_ProcessingError_get_err(ptr); - return nativeResponseValue; -} -/* @internal */ export class LDKCOption_ClosureReasonZ { protected constructor() {} } @@ -7844,7 +8468,7 @@ export function LDKHTLCDestination_NextHopChannel_get_node_id(ptr: bigint): numb return nativeResponseValue; } /* @internal */ -export function LDKHTLCDestination_NextHopChannel_get_channel_id(ptr: bigint): number { +export function LDKHTLCDestination_NextHopChannel_get_channel_id(ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -7984,6 +8608,22 @@ export function LDKBumpTransactionEvent_ty_from_ptr(ptr: bigint): number { return nativeResponseValue; } /* @internal */ +export function LDKBumpTransactionEvent_ChannelClose_get_channel_id(ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKBumpTransactionEvent_ChannelClose_get_channel_id(ptr); + return nativeResponseValue; +} +/* @internal */ +export function LDKBumpTransactionEvent_ChannelClose_get_counterparty_node_id(ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKBumpTransactionEvent_ChannelClose_get_counterparty_node_id(ptr); + return nativeResponseValue; +} +/* @internal */ export function LDKBumpTransactionEvent_ChannelClose_get_claim_id(ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); @@ -8032,6 +8672,22 @@ export function LDKBumpTransactionEvent_ChannelClose_get_pending_htlcs(ptr: bigi return nativeResponseValue; } /* @internal */ +export function LDKBumpTransactionEvent_HTLCResolution_get_channel_id(ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKBumpTransactionEvent_HTLCResolution_get_channel_id(ptr); + return nativeResponseValue; +} +/* @internal */ +export function LDKBumpTransactionEvent_HTLCResolution_get_counterparty_node_id(ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKBumpTransactionEvent_HTLCResolution_get_counterparty_node_id(ptr); + return nativeResponseValue; +} +/* @internal */ export function LDKBumpTransactionEvent_HTLCResolution_get_claim_id(ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); @@ -8076,7 +8732,7 @@ export function LDKEvent_ty_from_ptr(ptr: bigint): number { return nativeResponseValue; } /* @internal */ -export function LDKEvent_FundingGenerationReady_get_temporary_channel_id(ptr: bigint): number { +export function LDKEvent_FundingGenerationReady_get_temporary_channel_id(ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -8524,11 +9180,35 @@ export function LDKEvent_PaymentForwarded_get_next_channel_id(ptr: bigint): bigi return nativeResponseValue; } /* @internal */ -export function LDKEvent_PaymentForwarded_get_fee_earned_msat(ptr: bigint): bigint { +export function LDKEvent_PaymentForwarded_get_prev_user_channel_id(ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_LDKEvent_PaymentForwarded_get_fee_earned_msat(ptr); + const nativeResponseValue = wasm.TS_LDKEvent_PaymentForwarded_get_prev_user_channel_id(ptr); + return nativeResponseValue; +} +/* @internal */ +export function LDKEvent_PaymentForwarded_get_next_user_channel_id(ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKEvent_PaymentForwarded_get_next_user_channel_id(ptr); + return nativeResponseValue; +} +/* @internal */ +export function LDKEvent_PaymentForwarded_get_total_fee_earned_msat(ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKEvent_PaymentForwarded_get_total_fee_earned_msat(ptr); + return nativeResponseValue; +} +/* @internal */ +export function LDKEvent_PaymentForwarded_get_skimmed_fee_msat(ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKEvent_PaymentForwarded_get_skimmed_fee_msat(ptr); return nativeResponseValue; } /* @internal */ @@ -8548,7 +9228,7 @@ export function LDKEvent_PaymentForwarded_get_outbound_amount_forwarded_msat(ptr return nativeResponseValue; } /* @internal */ -export function LDKEvent_ChannelPending_get_channel_id(ptr: bigint): number { +export function LDKEvent_ChannelPending_get_channel_id(ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -8588,7 +9268,15 @@ export function LDKEvent_ChannelPending_get_funding_txo(ptr: bigint): bigint { return nativeResponseValue; } /* @internal */ -export function LDKEvent_ChannelReady_get_channel_id(ptr: bigint): number { +export function LDKEvent_ChannelPending_get_channel_type(ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKEvent_ChannelPending_get_channel_type(ptr); + return nativeResponseValue; +} +/* @internal */ +export function LDKEvent_ChannelReady_get_channel_id(ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -8620,7 +9308,7 @@ export function LDKEvent_ChannelReady_get_channel_type(ptr: bigint): bigint { return nativeResponseValue; } /* @internal */ -export function LDKEvent_ChannelClosed_get_channel_id(ptr: bigint): number { +export function LDKEvent_ChannelClosed_get_channel_id(ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -8668,7 +9356,7 @@ export function LDKEvent_ChannelClosed_get_channel_funding_txo(ptr: bigint): big return nativeResponseValue; } /* @internal */ -export function LDKEvent_DiscardFunding_get_channel_id(ptr: bigint): number { +export function LDKEvent_DiscardFunding_get_channel_id(ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -8684,7 +9372,7 @@ export function LDKEvent_DiscardFunding_get_transaction(ptr: bigint): number { return nativeResponseValue; } /* @internal */ -export function LDKEvent_OpenChannelRequest_get_temporary_channel_id(ptr: bigint): number { +export function LDKEvent_OpenChannelRequest_get_temporary_channel_id(ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -8724,7 +9412,7 @@ export function LDKEvent_OpenChannelRequest_get_channel_type(ptr: bigint): bigin return nativeResponseValue; } /* @internal */ -export function LDKEvent_HTLCHandlingFailed_get_prev_channel_id(ptr: bigint): number { +export function LDKEvent_HTLCHandlingFailed_get_prev_channel_id(ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -9161,6 +9849,24 @@ export function CResult_UntrustedStringDecodeErrorZ_get_err(owner: bigint): bigi } const nativeResponseValue = wasm.TS_CResult_UntrustedStringDecodeErrorZ_get_err(owner); return nativeResponseValue; +} + // struct LDKChannelId CResult_ChannelIdDecodeErrorZ_get_ok(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_ChannelIdDecodeErrorZ_get_ok(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_ChannelIdDecodeErrorZ_get_ok(owner); + return nativeResponseValue; +} + // struct LDKDecodeError CResult_ChannelIdDecodeErrorZ_get_err(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_ChannelIdDecodeErrorZ_get_err(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_ChannelIdDecodeErrorZ_get_err(owner); + return nativeResponseValue; } // struct LDKThirtyTwoBytes C2Tuple__u832u16Z_get_a(LDKC2Tuple__u832u16Z *NONNULL_PTR owner); /* @internal */ @@ -9216,50 +9922,77 @@ export function CResult_PaymentConstraintsDecodeErrorZ_get_err(owner: bigint): b const nativeResponseValue = wasm.TS_CResult_PaymentConstraintsDecodeErrorZ_get_err(owner); return nativeResponseValue; } - // struct LDKThirtyTwoBytes C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner); + // struct LDKPaymentContext CResult_PaymentContextDecodeErrorZ_get_ok(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR owner); /* @internal */ -export function C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(owner: bigint): number { +export function CResult_PaymentContextDecodeErrorZ_get_ok(owner: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(owner); + const nativeResponseValue = wasm.TS_CResult_PaymentContextDecodeErrorZ_get_ok(owner); return nativeResponseValue; } - // struct LDKRecipientOnionFields C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner); + // struct LDKDecodeError CResult_PaymentContextDecodeErrorZ_get_err(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR owner); /* @internal */ -export function C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(owner: bigint): bigint { +export function CResult_PaymentContextDecodeErrorZ_get_err(owner: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(owner); + const nativeResponseValue = wasm.TS_CResult_PaymentContextDecodeErrorZ_get_err(owner); return nativeResponseValue; } - // struct LDKRouteParameters C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner); + // struct LDKUnknownPaymentContext CResult_UnknownPaymentContextDecodeErrorZ_get_ok(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR owner); /* @internal */ -export function C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c(owner: bigint): bigint { +export function CResult_UnknownPaymentContextDecodeErrorZ_get_ok(owner: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c(owner); + const nativeResponseValue = wasm.TS_CResult_UnknownPaymentContextDecodeErrorZ_get_ok(owner); return nativeResponseValue; } - // struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR owner); + // struct LDKDecodeError CResult_UnknownPaymentContextDecodeErrorZ_get_err(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR owner); /* @internal */ -export function CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(owner: bigint): bigint { +export function CResult_UnknownPaymentContextDecodeErrorZ_get_err(owner: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(owner); + const nativeResponseValue = wasm.TS_CResult_UnknownPaymentContextDecodeErrorZ_get_err(owner); return nativeResponseValue; } - // void CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR owner); + // struct LDKBolt12OfferContext CResult_Bolt12OfferContextDecodeErrorZ_get_ok(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR owner); /* @internal */ -export function CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(owner: bigint): void { +export function CResult_Bolt12OfferContextDecodeErrorZ_get_ok(owner: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(owner); - // debug statements here + const nativeResponseValue = wasm.TS_CResult_Bolt12OfferContextDecodeErrorZ_get_ok(owner); + return nativeResponseValue; +} + // struct LDKDecodeError CResult_Bolt12OfferContextDecodeErrorZ_get_err(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_Bolt12OfferContextDecodeErrorZ_get_err(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_Bolt12OfferContextDecodeErrorZ_get_err(owner); + return nativeResponseValue; +} + // struct LDKBolt12RefundContext CResult_Bolt12RefundContextDecodeErrorZ_get_ok(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_Bolt12RefundContextDecodeErrorZ_get_ok(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_Bolt12RefundContextDecodeErrorZ_get_ok(owner); + return nativeResponseValue; +} + // struct LDKDecodeError CResult_Bolt12RefundContextDecodeErrorZ_get_err(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_Bolt12RefundContextDecodeErrorZ_get_err(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_Bolt12RefundContextDecodeErrorZ_get_err(owner); + return nativeResponseValue; } // struct LDKStr CResult_StrSecp256k1ErrorZ_get_ok(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner); /* @internal */ @@ -9278,6 +10011,51 @@ export function CResult_StrSecp256k1ErrorZ_get_err(owner: bigint): Secp256k1Erro } const nativeResponseValue = wasm.TS_CResult_StrSecp256k1ErrorZ_get_err(owner); return nativeResponseValue; +} + // struct LDKThirtyTwoBytes C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner); +/* @internal */ +export function C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(owner: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(owner); + return nativeResponseValue; +} + // struct LDKRecipientOnionFields C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner); +/* @internal */ +export function C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(owner); + return nativeResponseValue; +} + // struct LDKRouteParameters C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner); +/* @internal */ +export function C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c(owner); + return nativeResponseValue; +} + // struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(owner); + return nativeResponseValue; +} + // void CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(owner: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(owner); + // debug statements here } // struct LDKPublicKey C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_a(LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ *NONNULL_PTR owner); /* @internal */ @@ -9353,6 +10131,34 @@ export function CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZ return nativeResponseValue; } /* @internal */ +export class LDKNextMessageHop { + protected constructor() {} +} +/* @internal */ +export function LDKNextMessageHop_ty_from_ptr(ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKNextMessageHop_ty_from_ptr(ptr); + return nativeResponseValue; +} +/* @internal */ +export function LDKNextMessageHop_NodeId_get_node_id(ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKNextMessageHop_NodeId_get_node_id(ptr); + return nativeResponseValue; +} +/* @internal */ +export function LDKNextMessageHop_ShortChannelId_get_short_channel_id(ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKNextMessageHop_ShortChannelId_get_short_channel_id(ptr); + return nativeResponseValue; +} +/* @internal */ export class LDKParsedOnionMessageContents { protected constructor() {} } @@ -9393,7 +10199,7 @@ export function LDKPeeledOnion_ty_from_ptr(ptr: bigint): number { return nativeResponseValue; } /* @internal */ -export function LDKPeeledOnion_Forward_get__0(ptr: bigint): number { +export function LDKPeeledOnion_Forward_get__0(ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -9578,112 +10384,124 @@ export function CResult_InvoiceErrorDecodeErrorZ_get_err(owner: bigint): bigint const nativeResponseValue = wasm.TS_CResult_InvoiceErrorDecodeErrorZ_get_err(owner); return nativeResponseValue; } - // struct LDKDelayedPaymentBasepoint CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner); + // struct LDKTrackedSpendableOutput CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR owner); /* @internal */ -export function CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(owner: bigint): bigint { +export function CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(owner: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(owner); + const nativeResponseValue = wasm.TS_CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(owner); return nativeResponseValue; } - // struct LDKDecodeError CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner); + // struct LDKDecodeError CResult_TrackedSpendableOutputDecodeErrorZ_get_err(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR owner); /* @internal */ -export function CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(owner: bigint): bigint { +export function CResult_TrackedSpendableOutputDecodeErrorZ_get_err(owner: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(owner); + const nativeResponseValue = wasm.TS_CResult_TrackedSpendableOutputDecodeErrorZ_get_err(owner); return nativeResponseValue; } - // struct LDKDelayedPaymentKey CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner); /* @internal */ -export function CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(owner: bigint): bigint { +export class LDKOutputSpendStatus { + protected constructor() {} +} +/* @internal */ +export function LDKOutputSpendStatus_ty_from_ptr(ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(owner); + const nativeResponseValue = wasm.TS_LDKOutputSpendStatus_ty_from_ptr(ptr); return nativeResponseValue; } - // struct LDKDecodeError CResult_DelayedPaymentKeyDecodeErrorZ_get_err(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner); /* @internal */ -export function CResult_DelayedPaymentKeyDecodeErrorZ_get_err(owner: bigint): bigint { +export function LDKOutputSpendStatus_PendingInitialBroadcast_get_delayed_until_height(ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_DelayedPaymentKeyDecodeErrorZ_get_err(owner); + const nativeResponseValue = wasm.TS_LDKOutputSpendStatus_PendingInitialBroadcast_get_delayed_until_height(ptr); return nativeResponseValue; } - // struct LDKHtlcBasepoint CResult_HtlcBasepointDecodeErrorZ_get_ok(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner); /* @internal */ -export function CResult_HtlcBasepointDecodeErrorZ_get_ok(owner: bigint): bigint { +export function LDKOutputSpendStatus_PendingFirstConfirmation_get_first_broadcast_hash(ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_HtlcBasepointDecodeErrorZ_get_ok(owner); + const nativeResponseValue = wasm.TS_LDKOutputSpendStatus_PendingFirstConfirmation_get_first_broadcast_hash(ptr); return nativeResponseValue; } - // struct LDKDecodeError CResult_HtlcBasepointDecodeErrorZ_get_err(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner); /* @internal */ -export function CResult_HtlcBasepointDecodeErrorZ_get_err(owner: bigint): bigint { +export function LDKOutputSpendStatus_PendingFirstConfirmation_get_latest_broadcast_height(ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_HtlcBasepointDecodeErrorZ_get_err(owner); + const nativeResponseValue = wasm.TS_LDKOutputSpendStatus_PendingFirstConfirmation_get_latest_broadcast_height(ptr); return nativeResponseValue; } - // struct LDKHtlcKey CResult_HtlcKeyDecodeErrorZ_get_ok(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner); /* @internal */ -export function CResult_HtlcKeyDecodeErrorZ_get_ok(owner: bigint): bigint { +export function LDKOutputSpendStatus_PendingFirstConfirmation_get_latest_spending_tx(ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_HtlcKeyDecodeErrorZ_get_ok(owner); + const nativeResponseValue = wasm.TS_LDKOutputSpendStatus_PendingFirstConfirmation_get_latest_spending_tx(ptr); return nativeResponseValue; } - // struct LDKDecodeError CResult_HtlcKeyDecodeErrorZ_get_err(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner); /* @internal */ -export function CResult_HtlcKeyDecodeErrorZ_get_err(owner: bigint): bigint { +export function LDKOutputSpendStatus_PendingThresholdConfirmations_get_first_broadcast_hash(ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_HtlcKeyDecodeErrorZ_get_err(owner); + const nativeResponseValue = wasm.TS_LDKOutputSpendStatus_PendingThresholdConfirmations_get_first_broadcast_hash(ptr); return nativeResponseValue; } - // struct LDKRevocationBasepoint CResult_RevocationBasepointDecodeErrorZ_get_ok(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner); /* @internal */ -export function CResult_RevocationBasepointDecodeErrorZ_get_ok(owner: bigint): bigint { +export function LDKOutputSpendStatus_PendingThresholdConfirmations_get_latest_broadcast_height(ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_RevocationBasepointDecodeErrorZ_get_ok(owner); + const nativeResponseValue = wasm.TS_LDKOutputSpendStatus_PendingThresholdConfirmations_get_latest_broadcast_height(ptr); return nativeResponseValue; } - // struct LDKDecodeError CResult_RevocationBasepointDecodeErrorZ_get_err(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner); /* @internal */ -export function CResult_RevocationBasepointDecodeErrorZ_get_err(owner: bigint): bigint { +export function LDKOutputSpendStatus_PendingThresholdConfirmations_get_latest_spending_tx(ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_RevocationBasepointDecodeErrorZ_get_err(owner); + const nativeResponseValue = wasm.TS_LDKOutputSpendStatus_PendingThresholdConfirmations_get_latest_spending_tx(ptr); return nativeResponseValue; } - // struct LDKRevocationKey CResult_RevocationKeyDecodeErrorZ_get_ok(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner); /* @internal */ -export function CResult_RevocationKeyDecodeErrorZ_get_ok(owner: bigint): bigint { +export function LDKOutputSpendStatus_PendingThresholdConfirmations_get_confirmation_height(ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_RevocationKeyDecodeErrorZ_get_ok(owner); + const nativeResponseValue = wasm.TS_LDKOutputSpendStatus_PendingThresholdConfirmations_get_confirmation_height(ptr); return nativeResponseValue; } - // struct LDKDecodeError CResult_RevocationKeyDecodeErrorZ_get_err(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner); /* @internal */ -export function CResult_RevocationKeyDecodeErrorZ_get_err(owner: bigint): bigint { +export function LDKOutputSpendStatus_PendingThresholdConfirmations_get_confirmation_hash(ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_RevocationKeyDecodeErrorZ_get_err(owner); + const nativeResponseValue = wasm.TS_LDKOutputSpendStatus_PendingThresholdConfirmations_get_confirmation_hash(ptr); + return nativeResponseValue; +} + // struct LDKOutputSpendStatus CResult_OutputSpendStatusDecodeErrorZ_get_ok(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_OutputSpendStatusDecodeErrorZ_get_ok(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_OutputSpendStatusDecodeErrorZ_get_ok(owner); + return nativeResponseValue; +} + // struct LDKDecodeError CResult_OutputSpendStatusDecodeErrorZ_get_err(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_OutputSpendStatusDecodeErrorZ_get_err(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_OutputSpendStatusDecodeErrorZ_get_err(owner); return nativeResponseValue; } /* @internal */ @@ -9742,40 +10560,30 @@ export function LDKCOption_FilterZ_Some_get_some(ptr: bigint): bigint { const nativeResponseValue = wasm.TS_LDKCOption_FilterZ_Some_get_some(ptr); return nativeResponseValue; } - // struct LDKLockedChannelMonitor CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner); /* @internal */ -export function CResult_LockedChannelMonitorNoneZ_get_ok(owner: bigint): bigint { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_get_ok(owner); - return nativeResponseValue; +export interface LDKChangeDestinationSource { + get_change_destination_script (): bigint; } - // void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner); + /* @internal */ -export function CResult_LockedChannelMonitorNoneZ_get_err(owner: bigint): void { +export function LDKChangeDestinationSource_new(impl: LDKChangeDestinationSource): [bigint, number] { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_get_err(owner); - // debug statements here -} - // struct LDKOutPoint C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner); -/* @internal */ -export function C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(owner: bigint): bigint { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); + var new_obj_idx = js_objs.length; + for (var i = 0; i < js_objs.length; i++) { + if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; } } - const nativeResponseValue = wasm.TS_C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(owner); - return nativeResponseValue; + js_objs[i] = new WeakRef(impl); + return [wasm.TS_LDKChangeDestinationSource_new(i), i]; } - // struct LDKCVec_MonitorUpdateIdZ C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner); + // LDKCResult_CVec_u8ZNoneZ ChangeDestinationSource_get_change_destination_script LDKChangeDestinationSource *NONNULL_PTR this_arg /* @internal */ -export function C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(owner: bigint): number { +export function ChangeDestinationSource_get_change_destination_script(this_arg: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(owner); + const nativeResponseValue = wasm.TS_ChangeDestinationSource_get_change_destination_script(this_arg); return nativeResponseValue; } /* @internal */ @@ -9835,6 +10643,248 @@ export function KVStore_list(this_arg: bigint, primary_namespace: number, second return nativeResponseValue; } /* @internal */ +export interface LDKOutputSpender { + spend_spendable_outputs (descriptors: number, outputs: number, change_destination_script: number, feerate_sat_per_1000_weight: number, locktime: bigint): bigint; +} + +/* @internal */ +export function LDKOutputSpender_new(impl: LDKOutputSpender): [bigint, number] { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + var new_obj_idx = js_objs.length; + for (var i = 0; i < js_objs.length; i++) { + if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; } + } + js_objs[i] = new WeakRef(impl); + return [wasm.TS_LDKOutputSpender_new(i), i]; +} + // LDKCResult_TransactionNoneZ OutputSpender_spend_spendable_outputs LDKOutputSpender *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ descriptors, struct LDKCVec_TxOutZ outputs, struct LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight, struct LDKCOption_u32Z locktime +/* @internal */ +export function OutputSpender_spend_spendable_outputs(this_arg: bigint, descriptors: number, outputs: number, change_destination_script: number, feerate_sat_per_1000_weight: number, locktime: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OutputSpender_spend_spendable_outputs(this_arg, descriptors, outputs, change_destination_script, feerate_sat_per_1000_weight, locktime); + return nativeResponseValue; +} + // struct LDKOutputSweeper CResult_OutputSweeperDecodeErrorZ_get_ok(LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_OutputSweeperDecodeErrorZ_get_ok(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_OutputSweeperDecodeErrorZ_get_ok(owner); + return nativeResponseValue; +} + // struct LDKDecodeError CResult_OutputSweeperDecodeErrorZ_get_err(LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_OutputSweeperDecodeErrorZ_get_err(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_OutputSweeperDecodeErrorZ_get_err(owner); + return nativeResponseValue; +} + // struct LDKBestBlock C2Tuple_BestBlockOutputSweeperZ_get_a(LDKC2Tuple_BestBlockOutputSweeperZ *NONNULL_PTR owner); +/* @internal */ +export function C2Tuple_BestBlockOutputSweeperZ_get_a(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_C2Tuple_BestBlockOutputSweeperZ_get_a(owner); + return nativeResponseValue; +} + // struct LDKOutputSweeper C2Tuple_BestBlockOutputSweeperZ_get_b(LDKC2Tuple_BestBlockOutputSweeperZ *NONNULL_PTR owner); +/* @internal */ +export function C2Tuple_BestBlockOutputSweeperZ_get_b(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_C2Tuple_BestBlockOutputSweeperZ_get_b(owner); + return nativeResponseValue; +} + // struct LDKC2Tuple_BestBlockOutputSweeperZ *CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(owner); + return nativeResponseValue; +} + // struct LDKDecodeError CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(owner); + return nativeResponseValue; +} + // struct LDKDelayedPaymentBasepoint CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(owner); + return nativeResponseValue; +} + // struct LDKDecodeError CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(owner); + return nativeResponseValue; +} + // struct LDKDelayedPaymentKey CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(owner); + return nativeResponseValue; +} + // struct LDKDecodeError CResult_DelayedPaymentKeyDecodeErrorZ_get_err(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_DelayedPaymentKeyDecodeErrorZ_get_err(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_DelayedPaymentKeyDecodeErrorZ_get_err(owner); + return nativeResponseValue; +} + // struct LDKHtlcBasepoint CResult_HtlcBasepointDecodeErrorZ_get_ok(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_HtlcBasepointDecodeErrorZ_get_ok(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_HtlcBasepointDecodeErrorZ_get_ok(owner); + return nativeResponseValue; +} + // struct LDKDecodeError CResult_HtlcBasepointDecodeErrorZ_get_err(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_HtlcBasepointDecodeErrorZ_get_err(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_HtlcBasepointDecodeErrorZ_get_err(owner); + return nativeResponseValue; +} + // struct LDKHtlcKey CResult_HtlcKeyDecodeErrorZ_get_ok(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_HtlcKeyDecodeErrorZ_get_ok(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_HtlcKeyDecodeErrorZ_get_ok(owner); + return nativeResponseValue; +} + // struct LDKDecodeError CResult_HtlcKeyDecodeErrorZ_get_err(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_HtlcKeyDecodeErrorZ_get_err(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_HtlcKeyDecodeErrorZ_get_err(owner); + return nativeResponseValue; +} + // struct LDKRevocationBasepoint CResult_RevocationBasepointDecodeErrorZ_get_ok(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_RevocationBasepointDecodeErrorZ_get_ok(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_RevocationBasepointDecodeErrorZ_get_ok(owner); + return nativeResponseValue; +} + // struct LDKDecodeError CResult_RevocationBasepointDecodeErrorZ_get_err(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_RevocationBasepointDecodeErrorZ_get_err(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_RevocationBasepointDecodeErrorZ_get_err(owner); + return nativeResponseValue; +} + // struct LDKRevocationKey CResult_RevocationKeyDecodeErrorZ_get_ok(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_RevocationKeyDecodeErrorZ_get_ok(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_RevocationKeyDecodeErrorZ_get_ok(owner); + return nativeResponseValue; +} + // struct LDKDecodeError CResult_RevocationKeyDecodeErrorZ_get_err(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_RevocationKeyDecodeErrorZ_get_err(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_RevocationKeyDecodeErrorZ_get_err(owner); + return nativeResponseValue; +} + // struct LDKLockedChannelMonitor CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_LockedChannelMonitorNoneZ_get_ok(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_get_ok(owner); + return nativeResponseValue; +} + // void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner); +/* @internal */ +export function CResult_LockedChannelMonitorNoneZ_get_err(owner: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_get_err(owner); + // debug statements here +} + // struct LDKOutPoint C2Tuple_OutPointChannelIdZ_get_a(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR owner); +/* @internal */ +export function C2Tuple_OutPointChannelIdZ_get_a(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_C2Tuple_OutPointChannelIdZ_get_a(owner); + return nativeResponseValue; +} + // struct LDKChannelId C2Tuple_OutPointChannelIdZ_get_b(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR owner); +/* @internal */ +export function C2Tuple_OutPointChannelIdZ_get_b(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_C2Tuple_OutPointChannelIdZ_get_b(owner); + return nativeResponseValue; +} + // struct LDKOutPoint C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner); +/* @internal */ +export function C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(owner: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(owner); + return nativeResponseValue; +} + // struct LDKCVec_MonitorUpdateIdZ C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner); +/* @internal */ +export function C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(owner: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(owner); + return nativeResponseValue; +} +/* @internal */ export class LDKCandidateRouteHop { protected constructor() {} } @@ -10088,8 +11138,9 @@ export function Persister_persist_scorer(this_arg: bigint, scorer: bigint): bigi } /* @internal */ export interface LDKPersist { - persist_new_channel (channel_id: bigint, data: bigint, update_id: bigint): ChannelMonitorUpdateStatus; - update_persisted_channel (channel_id: bigint, update: bigint, data: bigint, update_id: bigint): ChannelMonitorUpdateStatus; + persist_new_channel (channel_funding_outpoint: bigint, data: bigint, update_id: bigint): ChannelMonitorUpdateStatus; + update_persisted_channel (channel_funding_outpoint: bigint, update: bigint, data: bigint, update_id: bigint): ChannelMonitorUpdateStatus; + archive_persisted_channel (channel_funding_outpoint: bigint): void; } /* @internal */ @@ -10104,48 +11155,31 @@ export function LDKPersist_new(impl: LDKPersist): [bigint, number] { js_objs[i] = new WeakRef(impl); return [wasm.TS_LDKPersist_new(i), i]; } - // LDKChannelMonitorUpdateStatus Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_id, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id + // LDKChannelMonitorUpdateStatus Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_funding_outpoint, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id /* @internal */ -export function Persist_persist_new_channel(this_arg: bigint, channel_id: bigint, data: bigint, update_id: bigint): ChannelMonitorUpdateStatus { +export function Persist_persist_new_channel(this_arg: bigint, channel_funding_outpoint: bigint, data: bigint, update_id: bigint): ChannelMonitorUpdateStatus { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_Persist_persist_new_channel(this_arg, channel_id, data, update_id); + const nativeResponseValue = wasm.TS_Persist_persist_new_channel(this_arg, channel_funding_outpoint, data, update_id); return nativeResponseValue; } - // LDKChannelMonitorUpdateStatus Persist_update_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_id, struct LDKChannelMonitorUpdate update, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id + // LDKChannelMonitorUpdateStatus Persist_update_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_funding_outpoint, struct LDKChannelMonitorUpdate update, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id /* @internal */ -export function Persist_update_persisted_channel(this_arg: bigint, channel_id: bigint, update: bigint, data: bigint, update_id: bigint): ChannelMonitorUpdateStatus { +export function Persist_update_persisted_channel(this_arg: bigint, channel_funding_outpoint: bigint, update: bigint, data: bigint, update_id: bigint): ChannelMonitorUpdateStatus { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_Persist_update_persisted_channel(this_arg, channel_id, update, data, update_id); + const nativeResponseValue = wasm.TS_Persist_update_persisted_channel(this_arg, channel_funding_outpoint, update, data, update_id); return nativeResponseValue; } + // void Persist_archive_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_funding_outpoint /* @internal */ -export interface LDKFutureCallback { - call (): void; -} - -/* @internal */ -export function LDKFutureCallback_new(impl: LDKFutureCallback): [bigint, number] { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - var new_obj_idx = js_objs.length; - for (var i = 0; i < js_objs.length; i++) { - if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; } - } - js_objs[i] = new WeakRef(impl); - return [wasm.TS_LDKFutureCallback_new(i), i]; -} - // void FutureCallback_call LDKFutureCallback *NONNULL_PTR this_arg -/* @internal */ -export function FutureCallback_call(this_arg: bigint): void { +export function Persist_archive_persisted_channel(this_arg: bigint, channel_funding_outpoint: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_FutureCallback_call(this_arg); + const nativeResponseValue = wasm.TS_Persist_archive_persisted_channel(this_arg, channel_funding_outpoint); // debug statements here } /* @internal */ @@ -10251,6 +11285,60 @@ export function Confirm_get_relevant_txids(this_arg: bigint): number { return nativeResponseValue; } /* @internal */ +export class LDKSpendingDelay { + protected constructor() {} +} +/* @internal */ +export function LDKSpendingDelay_ty_from_ptr(ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKSpendingDelay_ty_from_ptr(ptr); + return nativeResponseValue; +} +/* @internal */ +export function LDKSpendingDelay_Relative_get_num_blocks(ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKSpendingDelay_Relative_get_num_blocks(ptr); + return nativeResponseValue; +} +/* @internal */ +export function LDKSpendingDelay_Absolute_get_height(ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKSpendingDelay_Absolute_get_height(ptr); + return nativeResponseValue; +} +/* @internal */ +export interface LDKFutureCallback { + call (): void; +} + +/* @internal */ +export function LDKFutureCallback_new(impl: LDKFutureCallback): [bigint, number] { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + var new_obj_idx = js_objs.length; + for (var i = 0; i < js_objs.length; i++) { + if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; } + } + js_objs[i] = new WeakRef(impl); + return [wasm.TS_LDKFutureCallback_new(i), i]; +} + // void FutureCallback_call LDKFutureCallback *NONNULL_PTR this_arg +/* @internal */ +export function FutureCallback_call(this_arg: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_FutureCallback_call(this_arg); + // debug statements here +} +/* @internal */ export interface LDKEventHandler { handle_event (event: bigint): void; } @@ -10360,9 +11448,6 @@ export interface LDKChannelMessageHandler { handle_shutdown (their_node_id: number, msg: bigint): void; handle_closing_signed (their_node_id: number, msg: bigint): void; handle_stfu (their_node_id: number, msg: bigint): void; - handle_splice (their_node_id: number, msg: bigint): void; - handle_splice_ack (their_node_id: number, msg: bigint): void; - handle_splice_locked (their_node_id: number, msg: bigint): void; handle_tx_add_input (their_node_id: number, msg: bigint): void; handle_tx_add_output (their_node_id: number, msg: bigint): void; handle_tx_remove_input (their_node_id: number, msg: bigint): void; @@ -10491,33 +11576,6 @@ export function ChannelMessageHandler_handle_stfu(this_arg: bigint, their_node_i } const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_stfu(this_arg, their_node_id, msg); // debug statements here -} - // void ChannelMessageHandler_handle_splice LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKSplice *NONNULL_PTR msg -/* @internal */ -export function ChannelMessageHandler_handle_splice(this_arg: bigint, their_node_id: number, msg: bigint): void { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_splice(this_arg, their_node_id, msg); - // debug statements here -} - // void ChannelMessageHandler_handle_splice_ack LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKSpliceAck *NONNULL_PTR msg -/* @internal */ -export function ChannelMessageHandler_handle_splice_ack(this_arg: bigint, their_node_id: number, msg: bigint): void { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_splice_ack(this_arg, their_node_id, msg); - // debug statements here -} - // void ChannelMessageHandler_handle_splice_locked LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKSpliceLocked *NONNULL_PTR msg -/* @internal */ -export function ChannelMessageHandler_handle_splice_locked(this_arg: bigint, their_node_id: number, msg: bigint): void { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_splice_locked(this_arg, their_node_id, msg); - // debug statements here } // void ChannelMessageHandler_handle_tx_add_input LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKTxAddInput *NONNULL_PTR msg /* @internal */ @@ -10781,6 +11839,32 @@ export function OffersMessageHandler_release_pending_messages(this_arg: bigint): return nativeResponseValue; } /* @internal */ +export interface LDKNodeIdLookUp { + next_node_id (short_channel_id: bigint): number; +} + +/* @internal */ +export function LDKNodeIdLookUp_new(impl: LDKNodeIdLookUp): [bigint, number] { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + var new_obj_idx = js_objs.length; + for (var i = 0; i < js_objs.length; i++) { + if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; } + } + js_objs[i] = new WeakRef(impl); + return [wasm.TS_LDKNodeIdLookUp_new(i), i]; +} + // LDKPublicKey NodeIdLookUp_next_node_id LDKNodeIdLookUp *NONNULL_PTR this_arg, uint64_t short_channel_id +/* @internal */ +export function NodeIdLookUp_next_node_id(this_arg: bigint, short_channel_id: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_NodeIdLookUp_next_node_id(this_arg, short_channel_id); + return nativeResponseValue; +} +/* @internal */ export interface LDKRoutingMessageHandler { handle_node_announcement (msg: bigint): bigint; handle_channel_announcement (msg: bigint): bigint; @@ -11198,6 +12282,78 @@ export function SocketDescriptor_hash(this_arg: bigint): bigint { return nativeResponseValue; } /* @internal */ +export interface LDKSignBolt12InvoiceFn { + sign_invoice (message: bigint): bigint; +} + +/* @internal */ +export function LDKSignBolt12InvoiceFn_new(impl: LDKSignBolt12InvoiceFn): [bigint, number] { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + var new_obj_idx = js_objs.length; + for (var i = 0; i < js_objs.length; i++) { + if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; } + } + js_objs[i] = new WeakRef(impl); + return [wasm.TS_LDKSignBolt12InvoiceFn_new(i), i]; +} + // LDKCResult_SchnorrSignatureNoneZ SignBolt12InvoiceFn_sign_invoice LDKSignBolt12InvoiceFn *NONNULL_PTR this_arg, const struct LDKUnsignedBolt12Invoice *NONNULL_PTR message +/* @internal */ +export function SignBolt12InvoiceFn_sign_invoice(this_arg: bigint, message: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_SignBolt12InvoiceFn_sign_invoice(this_arg, message); + return nativeResponseValue; +} +/* @internal */ +export interface LDKSignInvoiceRequestFn { + sign_invoice_request (message: bigint): bigint; +} + +/* @internal */ +export function LDKSignInvoiceRequestFn_new(impl: LDKSignInvoiceRequestFn): [bigint, number] { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + var new_obj_idx = js_objs.length; + for (var i = 0; i < js_objs.length; i++) { + if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; } + } + js_objs[i] = new WeakRef(impl); + return [wasm.TS_LDKSignInvoiceRequestFn_new(i), i]; +} + // LDKCResult_SchnorrSignatureNoneZ SignInvoiceRequestFn_sign_invoice_request LDKSignInvoiceRequestFn *NONNULL_PTR this_arg, const struct LDKUnsignedInvoiceRequest *NONNULL_PTR message +/* @internal */ +export function SignInvoiceRequestFn_sign_invoice_request(this_arg: bigint, message: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_SignInvoiceRequestFn_sign_invoice_request(this_arg, message); + return nativeResponseValue; +} +/* @internal */ +export class LDKSignError { + protected constructor() {} +} +/* @internal */ +export function LDKSignError_ty_from_ptr(ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKSignError_ty_from_ptr(ptr); + return nativeResponseValue; +} +/* @internal */ +export function LDKSignError_Verification_get_verification(ptr: bigint): Secp256k1Error { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKSignError_Verification_get_verification(ptr); + return nativeResponseValue; +} +/* @internal */ export class LDKEffectiveCapacity { protected constructor() {} } @@ -11336,6 +12492,42 @@ export function Score_write(this_arg: bigint): number { return nativeResponseValue; } /* @internal */ +export class LDKIntroductionNode { + protected constructor() {} +} +/* @internal */ +export function LDKIntroductionNode_ty_from_ptr(ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKIntroductionNode_ty_from_ptr(ptr); + return nativeResponseValue; +} +/* @internal */ +export function LDKIntroductionNode_NodeId_get_node_id(ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKIntroductionNode_NodeId_get_node_id(ptr); + return nativeResponseValue; +} +/* @internal */ +export function LDKIntroductionNode_DirectedShortChannelId_get__0(ptr: bigint): Direction { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKIntroductionNode_DirectedShortChannelId_get__0(ptr); + return nativeResponseValue; +} +/* @internal */ +export function LDKIntroductionNode_DirectedShortChannelId_get__1(ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_LDKIntroductionNode_DirectedShortChannelId_get__1(ptr); + return nativeResponseValue; +} +/* @internal */ export interface LDKCoinSelectionSource { select_confirmed_utxos (claim_id: number, must_spend: number, must_pay_to: number, target_feerate_sat_per_1000_weight: number): bigint; sign_psbt (psbt: number): bigint; @@ -11587,6 +12779,24 @@ export function BigEndianScalar_new(big_endian_bytes: number): bigint { } const nativeResponseValue = wasm.TS_BigEndianScalar_new(big_endian_bytes); return nativeResponseValue; +} + // uint64_t BigEndianScalar_clone_ptr(LDKBigEndianScalar *NONNULL_PTR arg); +/* @internal */ +export function BigEndianScalar_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_BigEndianScalar_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKBigEndianScalar BigEndianScalar_clone(const struct LDKBigEndianScalar *NONNULL_PTR orig); +/* @internal */ +export function BigEndianScalar_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_BigEndianScalar_clone(orig); + return nativeResponseValue; } // uint64_t Bech32Error_clone_ptr(LDKBech32Error *NONNULL_PTR arg); /* @internal */ @@ -11758,6 +12968,123 @@ export function Str_free(_res: number): void { } const nativeResponseValue = wasm.TS_Str_free(_res); // debug statements here +} + // void CVec_u8Z_free(struct LDKCVec_u8Z _res); +/* @internal */ +export function CVec_u8Z_free(_res: number): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CVec_u8Z_free(_res); + // debug statements here +} + // struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(struct LDKRefundMaybeWithDerivedMetadataBuilder o); +/* @internal */ +export function CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(o); + return nativeResponseValue; +} + // struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); +/* @internal */ +export function CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(e: Bolt12SemanticError): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(e); + return nativeResponseValue; +} + // bool CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR o); +/* @internal */ +export function CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(o: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(o); + return nativeResponseValue; +} + // void CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ _res); +/* @internal */ +export function CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(_res: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(_res); + // debug statements here +} + // uint64_t CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR arg); +/* @internal */ +export function CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(const struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR orig); +/* @internal */ +export function CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(orig); + return nativeResponseValue; +} + // struct LDKCResult_RefundBolt12SemanticErrorZ CResult_RefundBolt12SemanticErrorZ_ok(struct LDKRefund o); +/* @internal */ +export function CResult_RefundBolt12SemanticErrorZ_ok(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_RefundBolt12SemanticErrorZ_ok(o); + return nativeResponseValue; +} + // struct LDKCResult_RefundBolt12SemanticErrorZ CResult_RefundBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); +/* @internal */ +export function CResult_RefundBolt12SemanticErrorZ_err(e: Bolt12SemanticError): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_RefundBolt12SemanticErrorZ_err(e); + return nativeResponseValue; +} + // bool CResult_RefundBolt12SemanticErrorZ_is_ok(const struct LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR o); +/* @internal */ +export function CResult_RefundBolt12SemanticErrorZ_is_ok(o: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_RefundBolt12SemanticErrorZ_is_ok(o); + return nativeResponseValue; +} + // void CResult_RefundBolt12SemanticErrorZ_free(struct LDKCResult_RefundBolt12SemanticErrorZ _res); +/* @internal */ +export function CResult_RefundBolt12SemanticErrorZ_free(_res: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_RefundBolt12SemanticErrorZ_free(_res); + // debug statements here +} + // uint64_t CResult_RefundBolt12SemanticErrorZ_clone_ptr(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR arg); +/* @internal */ +export function CResult_RefundBolt12SemanticErrorZ_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_RefundBolt12SemanticErrorZ_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKCResult_RefundBolt12SemanticErrorZ CResult_RefundBolt12SemanticErrorZ_clone(const struct LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR orig); +/* @internal */ +export function CResult_RefundBolt12SemanticErrorZ_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_RefundBolt12SemanticErrorZ_clone(orig); + return nativeResponseValue; } // struct LDKCOption_u64Z COption_u64Z_some(uint64_t o); /* @internal */ @@ -12037,15 +13364,6 @@ export function COption_ThirtyTwoBytesZ_clone(orig: bigint): bigint { } const nativeResponseValue = wasm.TS_COption_ThirtyTwoBytesZ_clone(orig); return nativeResponseValue; -} - // void CVec_u8Z_free(struct LDKCVec_u8Z _res); -/* @internal */ -export function CVec_u8Z_free(_res: number): void { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_CVec_u8Z_free(_res); - // debug statements here } // struct LDKCOption_CVec_u8ZZ COption_CVec_u8ZZ_some(struct LDKCVec_u8Z o); /* @internal */ @@ -12244,6 +13562,168 @@ export function CResult_RecipientOnionFieldsNoneZ_clone(orig: bigint): bigint { } const nativeResponseValue = wasm.TS_CResult_RecipientOnionFieldsNoneZ_clone(orig); return nativeResponseValue; +} + // struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok(struct LDKUnsignedBolt12Invoice o); +/* @internal */ +export function CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok(o); + return nativeResponseValue; +} + // struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); +/* @internal */ +export function CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err(e: Bolt12SemanticError): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err(e); + return nativeResponseValue; +} + // bool CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(const struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR o); +/* @internal */ +export function CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(o: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(o); + return nativeResponseValue; +} + // void CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free(struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ _res); +/* @internal */ +export function CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free(_res: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free(_res); + // debug statements here +} + // uint64_t CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR arg); +/* @internal */ +export function CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(const struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR orig); +/* @internal */ +export function CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(orig); + return nativeResponseValue; +} + // struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok(struct LDKBolt12Invoice o); +/* @internal */ +export function CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok(o); + return nativeResponseValue; +} + // struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ CResult_Bolt12InvoiceBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); +/* @internal */ +export function CResult_Bolt12InvoiceBolt12SemanticErrorZ_err(e: Bolt12SemanticError): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_err(e); + return nativeResponseValue; +} + // bool CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(const struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR o); +/* @internal */ +export function CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(o: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(o); + return nativeResponseValue; +} + // void CResult_Bolt12InvoiceBolt12SemanticErrorZ_free(struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ _res); +/* @internal */ +export function CResult_Bolt12InvoiceBolt12SemanticErrorZ_free(_res: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_free(_res); + // debug statements here +} + // uint64_t CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR arg); +/* @internal */ +export function CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(const struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR orig); +/* @internal */ +export function CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(orig); + return nativeResponseValue; +} + // struct LDKCResult_SchnorrSignatureNoneZ CResult_SchnorrSignatureNoneZ_ok(struct LDKSchnorrSignature o); +/* @internal */ +export function CResult_SchnorrSignatureNoneZ_ok(o: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_SchnorrSignatureNoneZ_ok(o); + return nativeResponseValue; +} + // struct LDKCResult_SchnorrSignatureNoneZ CResult_SchnorrSignatureNoneZ_err(void); +/* @internal */ +export function CResult_SchnorrSignatureNoneZ_err(): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_SchnorrSignatureNoneZ_err(); + return nativeResponseValue; +} + // bool CResult_SchnorrSignatureNoneZ_is_ok(const struct LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR o); +/* @internal */ +export function CResult_SchnorrSignatureNoneZ_is_ok(o: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_SchnorrSignatureNoneZ_is_ok(o); + return nativeResponseValue; +} + // void CResult_SchnorrSignatureNoneZ_free(struct LDKCResult_SchnorrSignatureNoneZ _res); +/* @internal */ +export function CResult_SchnorrSignatureNoneZ_free(_res: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_SchnorrSignatureNoneZ_free(_res); + // debug statements here +} + // uint64_t CResult_SchnorrSignatureNoneZ_clone_ptr(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR arg); +/* @internal */ +export function CResult_SchnorrSignatureNoneZ_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_SchnorrSignatureNoneZ_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKCResult_SchnorrSignatureNoneZ CResult_SchnorrSignatureNoneZ_clone(const struct LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR orig); +/* @internal */ +export function CResult_SchnorrSignatureNoneZ_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_SchnorrSignatureNoneZ_clone(orig); + return nativeResponseValue; } // void CVec_ThirtyTwoBytesZ_free(struct LDKCVec_ThirtyTwoBytesZ _res); /* @internal */ @@ -12298,6 +13778,96 @@ export function COption_CVec_ThirtyTwoBytesZZ_clone(orig: bigint): bigint { } const nativeResponseValue = wasm.TS_COption_CVec_ThirtyTwoBytesZZ_clone(orig); return nativeResponseValue; +} + // struct LDKCOption_AmountZ COption_AmountZ_some(struct LDKAmount o); +/* @internal */ +export function COption_AmountZ_some(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_COption_AmountZ_some(o); + return nativeResponseValue; +} + // struct LDKCOption_AmountZ COption_AmountZ_none(void); +/* @internal */ +export function COption_AmountZ_none(): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_COption_AmountZ_none(); + return nativeResponseValue; +} + // void COption_AmountZ_free(struct LDKCOption_AmountZ _res); +/* @internal */ +export function COption_AmountZ_free(_res: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_COption_AmountZ_free(_res); + // debug statements here +} + // uint64_t COption_AmountZ_clone_ptr(LDKCOption_AmountZ *NONNULL_PTR arg); +/* @internal */ +export function COption_AmountZ_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_COption_AmountZ_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKCOption_AmountZ COption_AmountZ_clone(const struct LDKCOption_AmountZ *NONNULL_PTR orig); +/* @internal */ +export function COption_AmountZ_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_COption_AmountZ_clone(orig); + return nativeResponseValue; +} + // struct LDKCOption_QuantityZ COption_QuantityZ_some(struct LDKQuantity o); +/* @internal */ +export function COption_QuantityZ_some(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_COption_QuantityZ_some(o); + return nativeResponseValue; +} + // struct LDKCOption_QuantityZ COption_QuantityZ_none(void); +/* @internal */ +export function COption_QuantityZ_none(): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_COption_QuantityZ_none(); + return nativeResponseValue; +} + // void COption_QuantityZ_free(struct LDKCOption_QuantityZ _res); +/* @internal */ +export function COption_QuantityZ_free(_res: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_COption_QuantityZ_free(_res); + // debug statements here +} + // uint64_t COption_QuantityZ_clone_ptr(LDKCOption_QuantityZ *NONNULL_PTR arg); +/* @internal */ +export function COption_QuantityZ_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_COption_QuantityZ_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKCOption_QuantityZ COption_QuantityZ_clone(const struct LDKCOption_QuantityZ *NONNULL_PTR orig); +/* @internal */ +export function COption_QuantityZ_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_COption_QuantityZ_clone(orig); + return nativeResponseValue; } // struct LDKCResult_ThirtyTwoBytesNoneZ CResult_ThirtyTwoBytesNoneZ_ok(struct LDKThirtyTwoBytes o); /* @internal */ @@ -13046,112 +14616,112 @@ export function CResult_RecoverableSignatureNoneZ_clone(orig: bigint): bigint { const nativeResponseValue = wasm.TS_CResult_RecoverableSignatureNoneZ_clone(orig); return nativeResponseValue; } - // struct LDKCResult_SchnorrSignatureNoneZ CResult_SchnorrSignatureNoneZ_ok(struct LDKSchnorrSignature o); + // struct LDKCResult_ECDSASignatureNoneZ CResult_ECDSASignatureNoneZ_ok(struct LDKECDSASignature o); /* @internal */ -export function CResult_SchnorrSignatureNoneZ_ok(o: number): bigint { +export function CResult_ECDSASignatureNoneZ_ok(o: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_SchnorrSignatureNoneZ_ok(o); + const nativeResponseValue = wasm.TS_CResult_ECDSASignatureNoneZ_ok(o); return nativeResponseValue; } - // struct LDKCResult_SchnorrSignatureNoneZ CResult_SchnorrSignatureNoneZ_err(void); + // struct LDKCResult_ECDSASignatureNoneZ CResult_ECDSASignatureNoneZ_err(void); /* @internal */ -export function CResult_SchnorrSignatureNoneZ_err(): bigint { +export function CResult_ECDSASignatureNoneZ_err(): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_SchnorrSignatureNoneZ_err(); + const nativeResponseValue = wasm.TS_CResult_ECDSASignatureNoneZ_err(); return nativeResponseValue; } - // bool CResult_SchnorrSignatureNoneZ_is_ok(const struct LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR o); + // bool CResult_ECDSASignatureNoneZ_is_ok(const struct LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR o); /* @internal */ -export function CResult_SchnorrSignatureNoneZ_is_ok(o: bigint): boolean { +export function CResult_ECDSASignatureNoneZ_is_ok(o: bigint): boolean { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_SchnorrSignatureNoneZ_is_ok(o); + const nativeResponseValue = wasm.TS_CResult_ECDSASignatureNoneZ_is_ok(o); return nativeResponseValue; } - // void CResult_SchnorrSignatureNoneZ_free(struct LDKCResult_SchnorrSignatureNoneZ _res); + // void CResult_ECDSASignatureNoneZ_free(struct LDKCResult_ECDSASignatureNoneZ _res); /* @internal */ -export function CResult_SchnorrSignatureNoneZ_free(_res: bigint): void { +export function CResult_ECDSASignatureNoneZ_free(_res: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_SchnorrSignatureNoneZ_free(_res); + const nativeResponseValue = wasm.TS_CResult_ECDSASignatureNoneZ_free(_res); // debug statements here } - // uint64_t CResult_SchnorrSignatureNoneZ_clone_ptr(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR arg); + // uint64_t CResult_ECDSASignatureNoneZ_clone_ptr(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR arg); /* @internal */ -export function CResult_SchnorrSignatureNoneZ_clone_ptr(arg: bigint): bigint { +export function CResult_ECDSASignatureNoneZ_clone_ptr(arg: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_SchnorrSignatureNoneZ_clone_ptr(arg); + const nativeResponseValue = wasm.TS_CResult_ECDSASignatureNoneZ_clone_ptr(arg); return nativeResponseValue; } - // struct LDKCResult_SchnorrSignatureNoneZ CResult_SchnorrSignatureNoneZ_clone(const struct LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR orig); + // struct LDKCResult_ECDSASignatureNoneZ CResult_ECDSASignatureNoneZ_clone(const struct LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR orig); /* @internal */ -export function CResult_SchnorrSignatureNoneZ_clone(orig: bigint): bigint { +export function CResult_ECDSASignatureNoneZ_clone(orig: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_SchnorrSignatureNoneZ_clone(orig); + const nativeResponseValue = wasm.TS_CResult_ECDSASignatureNoneZ_clone(orig); return nativeResponseValue; } - // struct LDKCResult_ECDSASignatureNoneZ CResult_ECDSASignatureNoneZ_ok(struct LDKECDSASignature o); + // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o); /* @internal */ -export function CResult_ECDSASignatureNoneZ_ok(o: number): bigint { +export function CResult_TransactionNoneZ_ok(o: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_ECDSASignatureNoneZ_ok(o); + const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_ok(o); return nativeResponseValue; } - // struct LDKCResult_ECDSASignatureNoneZ CResult_ECDSASignatureNoneZ_err(void); + // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void); /* @internal */ -export function CResult_ECDSASignatureNoneZ_err(): bigint { +export function CResult_TransactionNoneZ_err(): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_ECDSASignatureNoneZ_err(); + const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_err(); return nativeResponseValue; } - // bool CResult_ECDSASignatureNoneZ_is_ok(const struct LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR o); + // bool CResult_TransactionNoneZ_is_ok(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR o); /* @internal */ -export function CResult_ECDSASignatureNoneZ_is_ok(o: bigint): boolean { +export function CResult_TransactionNoneZ_is_ok(o: bigint): boolean { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_ECDSASignatureNoneZ_is_ok(o); + const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_is_ok(o); return nativeResponseValue; } - // void CResult_ECDSASignatureNoneZ_free(struct LDKCResult_ECDSASignatureNoneZ _res); + // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res); /* @internal */ -export function CResult_ECDSASignatureNoneZ_free(_res: bigint): void { +export function CResult_TransactionNoneZ_free(_res: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_ECDSASignatureNoneZ_free(_res); + const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_free(_res); // debug statements here } - // uint64_t CResult_ECDSASignatureNoneZ_clone_ptr(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR arg); + // uint64_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg); /* @internal */ -export function CResult_ECDSASignatureNoneZ_clone_ptr(arg: bigint): bigint { +export function CResult_TransactionNoneZ_clone_ptr(arg: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_ECDSASignatureNoneZ_clone_ptr(arg); + const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_clone_ptr(arg); return nativeResponseValue; } - // struct LDKCResult_ECDSASignatureNoneZ CResult_ECDSASignatureNoneZ_clone(const struct LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR orig); + // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_clone(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR orig); /* @internal */ -export function CResult_ECDSASignatureNoneZ_clone(orig: bigint): bigint { +export function CResult_TransactionNoneZ_clone(orig: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_ECDSASignatureNoneZ_clone(orig); + const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_clone(orig); return nativeResponseValue; } // struct LDKCResult_WriteableEcdsaChannelSignerDecodeErrorZ CResult_WriteableEcdsaChannelSignerDecodeErrorZ_ok(struct LDKWriteableEcdsaChannelSigner o); @@ -13612,60 +15182,6 @@ export function CResult_InMemorySignerDecodeErrorZ_clone(orig: bigint): bigint { } const nativeResponseValue = wasm.TS_CResult_InMemorySignerDecodeErrorZ_clone(orig); return nativeResponseValue; -} - // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o); -/* @internal */ -export function CResult_TransactionNoneZ_ok(o: number): bigint { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_ok(o); - return nativeResponseValue; -} - // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void); -/* @internal */ -export function CResult_TransactionNoneZ_err(): bigint { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_err(); - return nativeResponseValue; -} - // bool CResult_TransactionNoneZ_is_ok(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR o); -/* @internal */ -export function CResult_TransactionNoneZ_is_ok(o: bigint): boolean { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_is_ok(o); - return nativeResponseValue; -} - // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res); -/* @internal */ -export function CResult_TransactionNoneZ_free(_res: bigint): void { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_free(_res); - // debug statements here -} - // uint64_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg); -/* @internal */ -export function CResult_TransactionNoneZ_clone_ptr(arg: bigint): bigint { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_clone_ptr(arg); - return nativeResponseValue; -} - // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_clone(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR orig); -/* @internal */ -export function CResult_TransactionNoneZ_clone(orig: bigint): bigint { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_clone(orig); - return nativeResponseValue; } // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res); /* @internal */ @@ -14719,6 +16235,60 @@ export function CResult_ProbabilisticScorerDecodeErrorZ_free(_res: bigint): void } const nativeResponseValue = wasm.TS_CResult_ProbabilisticScorerDecodeErrorZ_free(_res); // debug statements here +} + // struct LDKCResult_BestBlockDecodeErrorZ CResult_BestBlockDecodeErrorZ_ok(struct LDKBestBlock o); +/* @internal */ +export function CResult_BestBlockDecodeErrorZ_ok(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_BestBlockDecodeErrorZ_ok(o); + return nativeResponseValue; +} + // struct LDKCResult_BestBlockDecodeErrorZ CResult_BestBlockDecodeErrorZ_err(struct LDKDecodeError e); +/* @internal */ +export function CResult_BestBlockDecodeErrorZ_err(e: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_BestBlockDecodeErrorZ_err(e); + return nativeResponseValue; +} + // bool CResult_BestBlockDecodeErrorZ_is_ok(const struct LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR o); +/* @internal */ +export function CResult_BestBlockDecodeErrorZ_is_ok(o: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_BestBlockDecodeErrorZ_is_ok(o); + return nativeResponseValue; +} + // void CResult_BestBlockDecodeErrorZ_free(struct LDKCResult_BestBlockDecodeErrorZ _res); +/* @internal */ +export function CResult_BestBlockDecodeErrorZ_free(_res: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_BestBlockDecodeErrorZ_free(_res); + // debug statements here +} + // uint64_t CResult_BestBlockDecodeErrorZ_clone_ptr(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR arg); +/* @internal */ +export function CResult_BestBlockDecodeErrorZ_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_BestBlockDecodeErrorZ_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKCResult_BestBlockDecodeErrorZ CResult_BestBlockDecodeErrorZ_clone(const struct LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR orig); +/* @internal */ +export function CResult_BestBlockDecodeErrorZ_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_BestBlockDecodeErrorZ_clone(orig); + return nativeResponseValue; } // uint64_t C2Tuple_usizeTransactionZ_clone_ptr(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR arg); /* @internal */ @@ -14873,49 +16443,49 @@ export function CVec_MonitorEventZ_free(_res: number): void { const nativeResponseValue = wasm.TS_CVec_MonitorEventZ_free(_res); // debug statements here } - // uint64_t C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR arg); + // uint64_t C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR arg); /* @internal */ -export function C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(arg: bigint): bigint { +export function C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(arg: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(arg); + const nativeResponseValue = wasm.TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(arg); return nativeResponseValue; } - // struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(const struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR orig); + // struct LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(const struct LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR orig); /* @internal */ -export function C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(orig: bigint): bigint { +export function C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(orig: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(orig); + const nativeResponseValue = wasm.TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(orig); return nativeResponseValue; } - // struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(struct LDKOutPoint a, struct LDKCVec_MonitorEventZ b, struct LDKPublicKey c); + // struct LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new(struct LDKOutPoint a, struct LDKChannelId b, struct LDKCVec_MonitorEventZ c, struct LDKPublicKey d); /* @internal */ -export function C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(a: bigint, b: number, c: number): bigint { +export function C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new(a: bigint, b: bigint, c: number, d: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(a, b, c); + const nativeResponseValue = wasm.TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new(a, b, c, d); return nativeResponseValue; } - // void C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ _res); + // void C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free(struct LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ _res); /* @internal */ -export function C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(_res: bigint): void { +export function C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free(_res: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(_res); + const nativeResponseValue = wasm.TS_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free(_res); // debug statements here } - // void CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free(struct LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ _res); + // void CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free(struct LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ _res); /* @internal */ -export function CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free(_res: number): void { +export function CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free(_res: number): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free(_res); + const nativeResponseValue = wasm.TS_CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free(_res); // debug statements here } // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o); @@ -15296,112 +16866,292 @@ export function CResult_ChannelTypeFeaturesDecodeErrorZ_clone(orig: bigint): big const nativeResponseValue = wasm.TS_CResult_ChannelTypeFeaturesDecodeErrorZ_clone(orig); return nativeResponseValue; } - // struct LDKCResult_OfferBolt12ParseErrorZ CResult_OfferBolt12ParseErrorZ_ok(struct LDKOffer o); + // struct LDKCResult_OfferIdDecodeErrorZ CResult_OfferIdDecodeErrorZ_ok(struct LDKOfferId o); /* @internal */ -export function CResult_OfferBolt12ParseErrorZ_ok(o: bigint): bigint { +export function CResult_OfferIdDecodeErrorZ_ok(o: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_OfferBolt12ParseErrorZ_ok(o); + const nativeResponseValue = wasm.TS_CResult_OfferIdDecodeErrorZ_ok(o); return nativeResponseValue; } - // struct LDKCResult_OfferBolt12ParseErrorZ CResult_OfferBolt12ParseErrorZ_err(struct LDKBolt12ParseError e); + // struct LDKCResult_OfferIdDecodeErrorZ CResult_OfferIdDecodeErrorZ_err(struct LDKDecodeError e); /* @internal */ -export function CResult_OfferBolt12ParseErrorZ_err(e: bigint): bigint { +export function CResult_OfferIdDecodeErrorZ_err(e: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_OfferBolt12ParseErrorZ_err(e); + const nativeResponseValue = wasm.TS_CResult_OfferIdDecodeErrorZ_err(e); return nativeResponseValue; } - // bool CResult_OfferBolt12ParseErrorZ_is_ok(const struct LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR o); + // bool CResult_OfferIdDecodeErrorZ_is_ok(const struct LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR o); /* @internal */ -export function CResult_OfferBolt12ParseErrorZ_is_ok(o: bigint): boolean { +export function CResult_OfferIdDecodeErrorZ_is_ok(o: bigint): boolean { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_OfferBolt12ParseErrorZ_is_ok(o); + const nativeResponseValue = wasm.TS_CResult_OfferIdDecodeErrorZ_is_ok(o); return nativeResponseValue; } - // void CResult_OfferBolt12ParseErrorZ_free(struct LDKCResult_OfferBolt12ParseErrorZ _res); + // void CResult_OfferIdDecodeErrorZ_free(struct LDKCResult_OfferIdDecodeErrorZ _res); /* @internal */ -export function CResult_OfferBolt12ParseErrorZ_free(_res: bigint): void { +export function CResult_OfferIdDecodeErrorZ_free(_res: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_OfferBolt12ParseErrorZ_free(_res); + const nativeResponseValue = wasm.TS_CResult_OfferIdDecodeErrorZ_free(_res); // debug statements here } - // uint64_t CResult_OfferBolt12ParseErrorZ_clone_ptr(LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR arg); + // uint64_t CResult_OfferIdDecodeErrorZ_clone_ptr(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR arg); /* @internal */ -export function CResult_OfferBolt12ParseErrorZ_clone_ptr(arg: bigint): bigint { +export function CResult_OfferIdDecodeErrorZ_clone_ptr(arg: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_OfferBolt12ParseErrorZ_clone_ptr(arg); + const nativeResponseValue = wasm.TS_CResult_OfferIdDecodeErrorZ_clone_ptr(arg); return nativeResponseValue; } - // struct LDKCResult_OfferBolt12ParseErrorZ CResult_OfferBolt12ParseErrorZ_clone(const struct LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR orig); + // struct LDKCResult_OfferIdDecodeErrorZ CResult_OfferIdDecodeErrorZ_clone(const struct LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR orig); /* @internal */ -export function CResult_OfferBolt12ParseErrorZ_clone(orig: bigint): bigint { +export function CResult_OfferIdDecodeErrorZ_clone(orig: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_OfferBolt12ParseErrorZ_clone(orig); + const nativeResponseValue = wasm.TS_CResult_OfferIdDecodeErrorZ_clone(orig); return nativeResponseValue; } - // struct LDKCResult_PublicKeySecp256k1ErrorZ CResult_PublicKeySecp256k1ErrorZ_ok(struct LDKPublicKey o); + // struct LDKCResult_NoneBolt12SemanticErrorZ CResult_NoneBolt12SemanticErrorZ_ok(void); /* @internal */ -export function CResult_PublicKeySecp256k1ErrorZ_ok(o: number): bigint { +export function CResult_NoneBolt12SemanticErrorZ_ok(): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_PublicKeySecp256k1ErrorZ_ok(o); + const nativeResponseValue = wasm.TS_CResult_NoneBolt12SemanticErrorZ_ok(); return nativeResponseValue; } - // struct LDKCResult_PublicKeySecp256k1ErrorZ CResult_PublicKeySecp256k1ErrorZ_err(enum LDKSecp256k1Error e); + // struct LDKCResult_NoneBolt12SemanticErrorZ CResult_NoneBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); /* @internal */ -export function CResult_PublicKeySecp256k1ErrorZ_err(e: Secp256k1Error): bigint { +export function CResult_NoneBolt12SemanticErrorZ_err(e: Bolt12SemanticError): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_PublicKeySecp256k1ErrorZ_err(e); + const nativeResponseValue = wasm.TS_CResult_NoneBolt12SemanticErrorZ_err(e); return nativeResponseValue; } - // bool CResult_PublicKeySecp256k1ErrorZ_is_ok(const struct LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR o); + // bool CResult_NoneBolt12SemanticErrorZ_is_ok(const struct LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR o); /* @internal */ -export function CResult_PublicKeySecp256k1ErrorZ_is_ok(o: bigint): boolean { +export function CResult_NoneBolt12SemanticErrorZ_is_ok(o: bigint): boolean { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_PublicKeySecp256k1ErrorZ_is_ok(o); + const nativeResponseValue = wasm.TS_CResult_NoneBolt12SemanticErrorZ_is_ok(o); return nativeResponseValue; } - // void CResult_PublicKeySecp256k1ErrorZ_free(struct LDKCResult_PublicKeySecp256k1ErrorZ _res); + // void CResult_NoneBolt12SemanticErrorZ_free(struct LDKCResult_NoneBolt12SemanticErrorZ _res); /* @internal */ -export function CResult_PublicKeySecp256k1ErrorZ_free(_res: bigint): void { +export function CResult_NoneBolt12SemanticErrorZ_free(_res: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_PublicKeySecp256k1ErrorZ_free(_res); + const nativeResponseValue = wasm.TS_CResult_NoneBolt12SemanticErrorZ_free(_res); // debug statements here } - // uint64_t CResult_PublicKeySecp256k1ErrorZ_clone_ptr(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR arg); + // uint64_t CResult_NoneBolt12SemanticErrorZ_clone_ptr(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR arg); /* @internal */ -export function CResult_PublicKeySecp256k1ErrorZ_clone_ptr(arg: bigint): bigint { +export function CResult_NoneBolt12SemanticErrorZ_clone_ptr(arg: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_PublicKeySecp256k1ErrorZ_clone_ptr(arg); + const nativeResponseValue = wasm.TS_CResult_NoneBolt12SemanticErrorZ_clone_ptr(arg); return nativeResponseValue; } - // struct LDKCResult_PublicKeySecp256k1ErrorZ CResult_PublicKeySecp256k1ErrorZ_clone(const struct LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR orig); + // struct LDKCResult_NoneBolt12SemanticErrorZ CResult_NoneBolt12SemanticErrorZ_clone(const struct LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR orig); /* @internal */ -export function CResult_PublicKeySecp256k1ErrorZ_clone(orig: bigint): bigint { +export function CResult_NoneBolt12SemanticErrorZ_clone(orig: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_PublicKeySecp256k1ErrorZ_clone(orig); + const nativeResponseValue = wasm.TS_CResult_NoneBolt12SemanticErrorZ_clone(orig); + return nativeResponseValue; +} + // struct LDKCResult_OfferBolt12SemanticErrorZ CResult_OfferBolt12SemanticErrorZ_ok(struct LDKOffer o); +/* @internal */ +export function CResult_OfferBolt12SemanticErrorZ_ok(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_OfferBolt12SemanticErrorZ_ok(o); + return nativeResponseValue; +} + // struct LDKCResult_OfferBolt12SemanticErrorZ CResult_OfferBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); +/* @internal */ +export function CResult_OfferBolt12SemanticErrorZ_err(e: Bolt12SemanticError): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_OfferBolt12SemanticErrorZ_err(e); + return nativeResponseValue; +} + // bool CResult_OfferBolt12SemanticErrorZ_is_ok(const struct LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR o); +/* @internal */ +export function CResult_OfferBolt12SemanticErrorZ_is_ok(o: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_OfferBolt12SemanticErrorZ_is_ok(o); + return nativeResponseValue; +} + // void CResult_OfferBolt12SemanticErrorZ_free(struct LDKCResult_OfferBolt12SemanticErrorZ _res); +/* @internal */ +export function CResult_OfferBolt12SemanticErrorZ_free(_res: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_OfferBolt12SemanticErrorZ_free(_res); + // debug statements here +} + // uint64_t CResult_OfferBolt12SemanticErrorZ_clone_ptr(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR arg); +/* @internal */ +export function CResult_OfferBolt12SemanticErrorZ_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_OfferBolt12SemanticErrorZ_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKCResult_OfferBolt12SemanticErrorZ CResult_OfferBolt12SemanticErrorZ_clone(const struct LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR orig); +/* @internal */ +export function CResult_OfferBolt12SemanticErrorZ_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_OfferBolt12SemanticErrorZ_clone(orig); + return nativeResponseValue; +} + // struct LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(struct LDKInvoiceRequestWithDerivedPayerIdBuilder o); +/* @internal */ +export function CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(o); + return nativeResponseValue; +} + // struct LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); +/* @internal */ +export function CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(e: Bolt12SemanticError): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(e); + return nativeResponseValue; +} + // bool CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR o); +/* @internal */ +export function CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(o: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(o); + return nativeResponseValue; +} + // void CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(struct LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ _res); +/* @internal */ +export function CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(_res: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(_res); + // debug statements here +} + // struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok(struct LDKInvoiceRequestWithExplicitPayerIdBuilder o); +/* @internal */ +export function CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok(o); + return nativeResponseValue; +} + // struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); +/* @internal */ +export function CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(e: Bolt12SemanticError): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(e); + return nativeResponseValue; +} + // bool CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR o); +/* @internal */ +export function CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(o: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(o); + return nativeResponseValue; +} + // void CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ _res); +/* @internal */ +export function CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(_res: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(_res); + // debug statements here +} + // struct LDKCResult_OfferBolt12ParseErrorZ CResult_OfferBolt12ParseErrorZ_ok(struct LDKOffer o); +/* @internal */ +export function CResult_OfferBolt12ParseErrorZ_ok(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_OfferBolt12ParseErrorZ_ok(o); + return nativeResponseValue; +} + // struct LDKCResult_OfferBolt12ParseErrorZ CResult_OfferBolt12ParseErrorZ_err(struct LDKBolt12ParseError e); +/* @internal */ +export function CResult_OfferBolt12ParseErrorZ_err(e: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_OfferBolt12ParseErrorZ_err(e); + return nativeResponseValue; +} + // bool CResult_OfferBolt12ParseErrorZ_is_ok(const struct LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR o); +/* @internal */ +export function CResult_OfferBolt12ParseErrorZ_is_ok(o: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_OfferBolt12ParseErrorZ_is_ok(o); + return nativeResponseValue; +} + // void CResult_OfferBolt12ParseErrorZ_free(struct LDKCResult_OfferBolt12ParseErrorZ _res); +/* @internal */ +export function CResult_OfferBolt12ParseErrorZ_free(_res: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_OfferBolt12ParseErrorZ_free(_res); + // debug statements here +} + // uint64_t CResult_OfferBolt12ParseErrorZ_clone_ptr(LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR arg); +/* @internal */ +export function CResult_OfferBolt12ParseErrorZ_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_OfferBolt12ParseErrorZ_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKCResult_OfferBolt12ParseErrorZ CResult_OfferBolt12ParseErrorZ_clone(const struct LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR orig); +/* @internal */ +export function CResult_OfferBolt12ParseErrorZ_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_OfferBolt12ParseErrorZ_clone(orig); return nativeResponseValue; } // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_ok(struct LDKNodeId o); @@ -15457,6 +17207,60 @@ export function CResult_NodeIdDecodeErrorZ_clone(orig: bigint): bigint { } const nativeResponseValue = wasm.TS_CResult_NodeIdDecodeErrorZ_clone(orig); return nativeResponseValue; +} + // struct LDKCResult_PublicKeySecp256k1ErrorZ CResult_PublicKeySecp256k1ErrorZ_ok(struct LDKPublicKey o); +/* @internal */ +export function CResult_PublicKeySecp256k1ErrorZ_ok(o: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_PublicKeySecp256k1ErrorZ_ok(o); + return nativeResponseValue; +} + // struct LDKCResult_PublicKeySecp256k1ErrorZ CResult_PublicKeySecp256k1ErrorZ_err(enum LDKSecp256k1Error e); +/* @internal */ +export function CResult_PublicKeySecp256k1ErrorZ_err(e: Secp256k1Error): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_PublicKeySecp256k1ErrorZ_err(e); + return nativeResponseValue; +} + // bool CResult_PublicKeySecp256k1ErrorZ_is_ok(const struct LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR o); +/* @internal */ +export function CResult_PublicKeySecp256k1ErrorZ_is_ok(o: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_PublicKeySecp256k1ErrorZ_is_ok(o); + return nativeResponseValue; +} + // void CResult_PublicKeySecp256k1ErrorZ_free(struct LDKCResult_PublicKeySecp256k1ErrorZ _res); +/* @internal */ +export function CResult_PublicKeySecp256k1ErrorZ_free(_res: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_PublicKeySecp256k1ErrorZ_free(_res); + // debug statements here +} + // uint64_t CResult_PublicKeySecp256k1ErrorZ_clone_ptr(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR arg); +/* @internal */ +export function CResult_PublicKeySecp256k1ErrorZ_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_PublicKeySecp256k1ErrorZ_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKCResult_PublicKeySecp256k1ErrorZ CResult_PublicKeySecp256k1ErrorZ_clone(const struct LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR orig); +/* @internal */ +export function CResult_PublicKeySecp256k1ErrorZ_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_PublicKeySecp256k1ErrorZ_clone(orig); + return nativeResponseValue; } // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_some(struct LDKNetworkUpdate o); /* @internal */ @@ -16195,6 +17999,42 @@ export function COption_CVec_SocketAddressZZ_clone(orig: bigint): bigint { } const nativeResponseValue = wasm.TS_COption_CVec_SocketAddressZZ_clone(orig); return nativeResponseValue; +} + // struct LDKCResult_u64ShortChannelIdErrorZ CResult_u64ShortChannelIdErrorZ_ok(uint64_t o); +/* @internal */ +export function CResult_u64ShortChannelIdErrorZ_ok(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_u64ShortChannelIdErrorZ_ok(o); + return nativeResponseValue; +} + // struct LDKCResult_u64ShortChannelIdErrorZ CResult_u64ShortChannelIdErrorZ_err(enum LDKShortChannelIdError e); +/* @internal */ +export function CResult_u64ShortChannelIdErrorZ_err(e: ShortChannelIdError): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_u64ShortChannelIdErrorZ_err(e); + return nativeResponseValue; +} + // bool CResult_u64ShortChannelIdErrorZ_is_ok(const struct LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR o); +/* @internal */ +export function CResult_u64ShortChannelIdErrorZ_is_ok(o: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_u64ShortChannelIdErrorZ_is_ok(o); + return nativeResponseValue; +} + // void CResult_u64ShortChannelIdErrorZ_free(struct LDKCResult_u64ShortChannelIdErrorZ _res); +/* @internal */ +export function CResult_u64ShortChannelIdErrorZ_free(_res: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_u64ShortChannelIdErrorZ_free(_res); + // debug statements here } // struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ CResult_PendingHTLCInfoInboundHTLCErrZ_ok(struct LDKPendingHTLCInfo o); /* @internal */ @@ -16231,6 +18071,24 @@ export function CResult_PendingHTLCInfoInboundHTLCErrZ_free(_res: bigint): void } const nativeResponseValue = wasm.TS_CResult_PendingHTLCInfoInboundHTLCErrZ_free(_res); // debug statements here +} + // uint64_t CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR arg); +/* @internal */ +export function CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ CResult_PendingHTLCInfoInboundHTLCErrZ_clone(const struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR orig); +/* @internal */ +export function CResult_PendingHTLCInfoInboundHTLCErrZ_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_PendingHTLCInfoInboundHTLCErrZ_clone(orig); + return nativeResponseValue; } // void CVec_HTLCOutputInCommitmentZ_free(struct LDKCVec_HTLCOutputInCommitmentZ _res); /* @internal */ @@ -16420,6 +18278,51 @@ export function CResult_CVec_UtxoZNoneZ_clone(orig: bigint): bigint { } const nativeResponseValue = wasm.TS_CResult_CVec_UtxoZNoneZ_clone(orig); return nativeResponseValue; +} + // struct LDKCOption_PaymentContextZ COption_PaymentContextZ_some(struct LDKPaymentContext o); +/* @internal */ +export function COption_PaymentContextZ_some(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_COption_PaymentContextZ_some(o); + return nativeResponseValue; +} + // struct LDKCOption_PaymentContextZ COption_PaymentContextZ_none(void); +/* @internal */ +export function COption_PaymentContextZ_none(): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_COption_PaymentContextZ_none(); + return nativeResponseValue; +} + // void COption_PaymentContextZ_free(struct LDKCOption_PaymentContextZ _res); +/* @internal */ +export function COption_PaymentContextZ_free(_res: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_COption_PaymentContextZ_free(_res); + // debug statements here +} + // uint64_t COption_PaymentContextZ_clone_ptr(LDKCOption_PaymentContextZ *NONNULL_PTR arg); +/* @internal */ +export function COption_PaymentContextZ_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_COption_PaymentContextZ_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKCOption_PaymentContextZ COption_PaymentContextZ_clone(const struct LDKCOption_PaymentContextZ *NONNULL_PTR orig); +/* @internal */ +export function COption_PaymentContextZ_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_COption_PaymentContextZ_clone(orig); + return nativeResponseValue; } // uint64_t C2Tuple_u64u16Z_clone_ptr(LDKC2Tuple_u64u16Z *NONNULL_PTR arg); /* @internal */ @@ -16547,58 +18450,58 @@ export function COption_ChannelShutdownStateZ_clone(orig: bigint): bigint { const nativeResponseValue = wasm.TS_COption_ChannelShutdownStateZ_clone(orig); return nativeResponseValue; } - // struct LDKCResult_ThirtyTwoBytesAPIErrorZ CResult_ThirtyTwoBytesAPIErrorZ_ok(struct LDKThirtyTwoBytes o); + // struct LDKCResult_ChannelIdAPIErrorZ CResult_ChannelIdAPIErrorZ_ok(struct LDKChannelId o); /* @internal */ -export function CResult_ThirtyTwoBytesAPIErrorZ_ok(o: number): bigint { +export function CResult_ChannelIdAPIErrorZ_ok(o: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_ThirtyTwoBytesAPIErrorZ_ok(o); + const nativeResponseValue = wasm.TS_CResult_ChannelIdAPIErrorZ_ok(o); return nativeResponseValue; } - // struct LDKCResult_ThirtyTwoBytesAPIErrorZ CResult_ThirtyTwoBytesAPIErrorZ_err(struct LDKAPIError e); + // struct LDKCResult_ChannelIdAPIErrorZ CResult_ChannelIdAPIErrorZ_err(struct LDKAPIError e); /* @internal */ -export function CResult_ThirtyTwoBytesAPIErrorZ_err(e: bigint): bigint { +export function CResult_ChannelIdAPIErrorZ_err(e: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_ThirtyTwoBytesAPIErrorZ_err(e); + const nativeResponseValue = wasm.TS_CResult_ChannelIdAPIErrorZ_err(e); return nativeResponseValue; } - // bool CResult_ThirtyTwoBytesAPIErrorZ_is_ok(const struct LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR o); + // bool CResult_ChannelIdAPIErrorZ_is_ok(const struct LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR o); /* @internal */ -export function CResult_ThirtyTwoBytesAPIErrorZ_is_ok(o: bigint): boolean { +export function CResult_ChannelIdAPIErrorZ_is_ok(o: bigint): boolean { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_ThirtyTwoBytesAPIErrorZ_is_ok(o); + const nativeResponseValue = wasm.TS_CResult_ChannelIdAPIErrorZ_is_ok(o); return nativeResponseValue; } - // void CResult_ThirtyTwoBytesAPIErrorZ_free(struct LDKCResult_ThirtyTwoBytesAPIErrorZ _res); + // void CResult_ChannelIdAPIErrorZ_free(struct LDKCResult_ChannelIdAPIErrorZ _res); /* @internal */ -export function CResult_ThirtyTwoBytesAPIErrorZ_free(_res: bigint): void { +export function CResult_ChannelIdAPIErrorZ_free(_res: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_ThirtyTwoBytesAPIErrorZ_free(_res); + const nativeResponseValue = wasm.TS_CResult_ChannelIdAPIErrorZ_free(_res); // debug statements here } - // uint64_t CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR arg); + // uint64_t CResult_ChannelIdAPIErrorZ_clone_ptr(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR arg); /* @internal */ -export function CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(arg: bigint): bigint { +export function CResult_ChannelIdAPIErrorZ_clone_ptr(arg: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(arg); + const nativeResponseValue = wasm.TS_CResult_ChannelIdAPIErrorZ_clone_ptr(arg); return nativeResponseValue; } - // struct LDKCResult_ThirtyTwoBytesAPIErrorZ CResult_ThirtyTwoBytesAPIErrorZ_clone(const struct LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR orig); + // struct LDKCResult_ChannelIdAPIErrorZ CResult_ChannelIdAPIErrorZ_clone(const struct LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR orig); /* @internal */ -export function CResult_ThirtyTwoBytesAPIErrorZ_clone(orig: bigint): bigint { +export function CResult_ChannelIdAPIErrorZ_clone(orig: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_ThirtyTwoBytesAPIErrorZ_clone(orig); + const nativeResponseValue = wasm.TS_CResult_ChannelIdAPIErrorZ_clone(orig); return nativeResponseValue; } // void CVec_RecentPaymentDetailsZ_free(struct LDKCVec_RecentPaymentDetailsZ _res); @@ -16979,148 +18882,157 @@ export function CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFail const nativeResponseValue = wasm.TS_CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_clone(orig); return nativeResponseValue; } - // uint64_t C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR arg); + // uint64_t C2Tuple_ChannelIdPublicKeyZ_clone_ptr(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR arg); /* @internal */ -export function C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(arg: bigint): bigint { +export function C2Tuple_ChannelIdPublicKeyZ_clone_ptr(arg: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(arg); + const nativeResponseValue = wasm.TS_C2Tuple_ChannelIdPublicKeyZ_clone_ptr(arg); return nativeResponseValue; } - // struct LDKC2Tuple_ThirtyTwoBytesPublicKeyZ C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(const struct LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR orig); + // struct LDKC2Tuple_ChannelIdPublicKeyZ C2Tuple_ChannelIdPublicKeyZ_clone(const struct LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR orig); /* @internal */ -export function C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(orig: bigint): bigint { +export function C2Tuple_ChannelIdPublicKeyZ_clone(orig: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(orig); + const nativeResponseValue = wasm.TS_C2Tuple_ChannelIdPublicKeyZ_clone(orig); return nativeResponseValue; } - // struct LDKC2Tuple_ThirtyTwoBytesPublicKeyZ C2Tuple_ThirtyTwoBytesPublicKeyZ_new(struct LDKThirtyTwoBytes a, struct LDKPublicKey b); + // struct LDKC2Tuple_ChannelIdPublicKeyZ C2Tuple_ChannelIdPublicKeyZ_new(struct LDKChannelId a, struct LDKPublicKey b); /* @internal */ -export function C2Tuple_ThirtyTwoBytesPublicKeyZ_new(a: number, b: number): bigint { +export function C2Tuple_ChannelIdPublicKeyZ_new(a: bigint, b: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_C2Tuple_ThirtyTwoBytesPublicKeyZ_new(a, b); + const nativeResponseValue = wasm.TS_C2Tuple_ChannelIdPublicKeyZ_new(a, b); return nativeResponseValue; } - // void C2Tuple_ThirtyTwoBytesPublicKeyZ_free(struct LDKC2Tuple_ThirtyTwoBytesPublicKeyZ _res); + // void C2Tuple_ChannelIdPublicKeyZ_free(struct LDKC2Tuple_ChannelIdPublicKeyZ _res); /* @internal */ -export function C2Tuple_ThirtyTwoBytesPublicKeyZ_free(_res: bigint): void { +export function C2Tuple_ChannelIdPublicKeyZ_free(_res: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_C2Tuple_ThirtyTwoBytesPublicKeyZ_free(_res); + const nativeResponseValue = wasm.TS_C2Tuple_ChannelIdPublicKeyZ_free(_res); // debug statements here } - // void CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_free(struct LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ _res); + // void CVec_C2Tuple_ChannelIdPublicKeyZZ_free(struct LDKCVec_C2Tuple_ChannelIdPublicKeyZZ _res); /* @internal */ -export function CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_free(_res: number): void { +export function CVec_C2Tuple_ChannelIdPublicKeyZZ_free(_res: number): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_free(_res); + const nativeResponseValue = wasm.TS_CVec_C2Tuple_ChannelIdPublicKeyZZ_free(_res); // debug statements here } - // struct LDKCOption_StrZ COption_StrZ_some(struct LDKStr o); + // void CVec_ChannelIdZ_free(struct LDKCVec_ChannelIdZ _res); /* @internal */ -export function COption_StrZ_some(o: number): bigint { +export function CVec_ChannelIdZ_free(_res: number): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_COption_StrZ_some(o); - return nativeResponseValue; + const nativeResponseValue = wasm.TS_CVec_ChannelIdZ_free(_res); + // debug statements here } - // struct LDKCOption_StrZ COption_StrZ_none(void); + // struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(struct LDKOfferWithDerivedMetadataBuilder o); /* @internal */ -export function COption_StrZ_none(): bigint { +export function CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(o: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_COption_StrZ_none(); + const nativeResponseValue = wasm.TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(o); return nativeResponseValue; } - // void COption_StrZ_free(struct LDKCOption_StrZ _res); + // struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); /* @internal */ -export function COption_StrZ_free(_res: bigint): void { +export function CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(e: Bolt12SemanticError): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_COption_StrZ_free(_res); - // debug statements here + const nativeResponseValue = wasm.TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(e); + return nativeResponseValue; } - // uint64_t COption_StrZ_clone_ptr(LDKCOption_StrZ *NONNULL_PTR arg); + // bool CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR o); /* @internal */ -export function COption_StrZ_clone_ptr(arg: bigint): bigint { +export function CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(o: bigint): boolean { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_COption_StrZ_clone_ptr(arg); + const nativeResponseValue = wasm.TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(o); return nativeResponseValue; } - // struct LDKCOption_StrZ COption_StrZ_clone(const struct LDKCOption_StrZ *NONNULL_PTR orig); + // void CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ _res); /* @internal */ -export function COption_StrZ_clone(orig: bigint): bigint { +export function CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(_res: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_COption_StrZ_clone(orig); + const nativeResponseValue = wasm.TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(_res); + // debug statements here +} + // uint64_t CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR arg); +/* @internal */ +export function CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(arg); return nativeResponseValue; } - // struct LDKCResult_NoneBolt12SemanticErrorZ CResult_NoneBolt12SemanticErrorZ_ok(void); + // struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(const struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR orig); /* @internal */ -export function CResult_NoneBolt12SemanticErrorZ_ok(): bigint { +export function CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(orig: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_NoneBolt12SemanticErrorZ_ok(); + const nativeResponseValue = wasm.TS_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(orig); return nativeResponseValue; } - // struct LDKCResult_NoneBolt12SemanticErrorZ CResult_NoneBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); + // struct LDKCOption_StrZ COption_StrZ_some(struct LDKStr o); /* @internal */ -export function CResult_NoneBolt12SemanticErrorZ_err(e: Bolt12SemanticError): bigint { +export function COption_StrZ_some(o: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_NoneBolt12SemanticErrorZ_err(e); + const nativeResponseValue = wasm.TS_COption_StrZ_some(o); return nativeResponseValue; } - // bool CResult_NoneBolt12SemanticErrorZ_is_ok(const struct LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR o); + // struct LDKCOption_StrZ COption_StrZ_none(void); /* @internal */ -export function CResult_NoneBolt12SemanticErrorZ_is_ok(o: bigint): boolean { +export function COption_StrZ_none(): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_NoneBolt12SemanticErrorZ_is_ok(o); + const nativeResponseValue = wasm.TS_COption_StrZ_none(); return nativeResponseValue; } - // void CResult_NoneBolt12SemanticErrorZ_free(struct LDKCResult_NoneBolt12SemanticErrorZ _res); + // void COption_StrZ_free(struct LDKCOption_StrZ _res); /* @internal */ -export function CResult_NoneBolt12SemanticErrorZ_free(_res: bigint): void { +export function COption_StrZ_free(_res: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_NoneBolt12SemanticErrorZ_free(_res); + const nativeResponseValue = wasm.TS_COption_StrZ_free(_res); // debug statements here } - // uint64_t CResult_NoneBolt12SemanticErrorZ_clone_ptr(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR arg); + // uint64_t COption_StrZ_clone_ptr(LDKCOption_StrZ *NONNULL_PTR arg); /* @internal */ -export function CResult_NoneBolt12SemanticErrorZ_clone_ptr(arg: bigint): bigint { +export function COption_StrZ_clone_ptr(arg: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_NoneBolt12SemanticErrorZ_clone_ptr(arg); + const nativeResponseValue = wasm.TS_COption_StrZ_clone_ptr(arg); return nativeResponseValue; } - // struct LDKCResult_NoneBolt12SemanticErrorZ CResult_NoneBolt12SemanticErrorZ_clone(const struct LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR orig); + // struct LDKCOption_StrZ COption_StrZ_clone(const struct LDKCOption_StrZ *NONNULL_PTR orig); /* @internal */ -export function CResult_NoneBolt12SemanticErrorZ_clone(orig: bigint): bigint { +export function COption_StrZ_clone(orig: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_NoneBolt12SemanticErrorZ_clone(orig); + const nativeResponseValue = wasm.TS_COption_StrZ_clone(orig); return nativeResponseValue; } // struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok(struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ o); @@ -17176,6 +19088,60 @@ export function CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_clone(orig: b } const nativeResponseValue = wasm.TS_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_clone(orig); return nativeResponseValue; +} + // struct LDKCResult_ThirtyTwoBytesAPIErrorZ CResult_ThirtyTwoBytesAPIErrorZ_ok(struct LDKThirtyTwoBytes o); +/* @internal */ +export function CResult_ThirtyTwoBytesAPIErrorZ_ok(o: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_ThirtyTwoBytesAPIErrorZ_ok(o); + return nativeResponseValue; +} + // struct LDKCResult_ThirtyTwoBytesAPIErrorZ CResult_ThirtyTwoBytesAPIErrorZ_err(struct LDKAPIError e); +/* @internal */ +export function CResult_ThirtyTwoBytesAPIErrorZ_err(e: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_ThirtyTwoBytesAPIErrorZ_err(e); + return nativeResponseValue; +} + // bool CResult_ThirtyTwoBytesAPIErrorZ_is_ok(const struct LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR o); +/* @internal */ +export function CResult_ThirtyTwoBytesAPIErrorZ_is_ok(o: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_ThirtyTwoBytesAPIErrorZ_is_ok(o); + return nativeResponseValue; +} + // void CResult_ThirtyTwoBytesAPIErrorZ_free(struct LDKCResult_ThirtyTwoBytesAPIErrorZ _res); +/* @internal */ +export function CResult_ThirtyTwoBytesAPIErrorZ_free(_res: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_ThirtyTwoBytesAPIErrorZ_free(_res); + // debug statements here +} + // uint64_t CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR arg); +/* @internal */ +export function CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKCResult_ThirtyTwoBytesAPIErrorZ CResult_ThirtyTwoBytesAPIErrorZ_clone(const struct LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR orig); +/* @internal */ +export function CResult_ThirtyTwoBytesAPIErrorZ_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_ThirtyTwoBytesAPIErrorZ_clone(orig); + return nativeResponseValue; } // struct LDKCOption_OffersMessageZ COption_OffersMessageZ_some(struct LDKOffersMessage o); /* @internal */ @@ -18409,15 +20375,6 @@ export function CVec_CommitmentTransactionZ_free(_res: number): void { } const nativeResponseValue = wasm.TS_CVec_CommitmentTransactionZ_free(_res); // debug statements here -} - // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res); -/* @internal */ -export function CVec_TransactionZ_free(_res: number): void { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_CVec_TransactionZ_free(_res); - // debug statements here } // uint64_t C2Tuple_u32TxOutZ_clone_ptr(LDKC2Tuple_u32TxOutZ *NONNULL_PTR arg); /* @internal */ @@ -18986,49 +20943,13 @@ export function COption_SocketAddressZ_clone(orig: bigint): bigint { const nativeResponseValue = wasm.TS_COption_SocketAddressZ_clone(orig); return nativeResponseValue; } - // uint64_t C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR arg); + // void CVec_PeerDetailsZ_free(struct LDKCVec_PeerDetailsZ _res); /* @internal */ -export function C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(arg: bigint): bigint { +export function CVec_PeerDetailsZ_free(_res: number): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(arg); - return nativeResponseValue; -} - // struct LDKC2Tuple_PublicKeyCOption_SocketAddressZZ C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(const struct LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR orig); -/* @internal */ -export function C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(orig: bigint): bigint { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(orig); - return nativeResponseValue; -} - // struct LDKC2Tuple_PublicKeyCOption_SocketAddressZZ C2Tuple_PublicKeyCOption_SocketAddressZZ_new(struct LDKPublicKey a, struct LDKCOption_SocketAddressZ b); -/* @internal */ -export function C2Tuple_PublicKeyCOption_SocketAddressZZ_new(a: number, b: bigint): bigint { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_C2Tuple_PublicKeyCOption_SocketAddressZZ_new(a, b); - return nativeResponseValue; -} - // void C2Tuple_PublicKeyCOption_SocketAddressZZ_free(struct LDKC2Tuple_PublicKeyCOption_SocketAddressZZ _res); -/* @internal */ -export function C2Tuple_PublicKeyCOption_SocketAddressZZ_free(_res: bigint): void { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_C2Tuple_PublicKeyCOption_SocketAddressZZ_free(_res); - // debug statements here -} - // void CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_free(struct LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ _res); -/* @internal */ -export function CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_free(_res: number): void { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_free(_res); + const nativeResponseValue = wasm.TS_CVec_PeerDetailsZ_free(_res); // debug statements here } // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o); @@ -19516,6 +21437,114 @@ export function CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_clone(orig } const nativeResponseValue = wasm.TS_CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_clone(orig); return nativeResponseValue; +} + // struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(struct LDKUnsignedInvoiceRequest o); +/* @internal */ +export function CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(o); + return nativeResponseValue; +} + // struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); +/* @internal */ +export function CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(e: Bolt12SemanticError): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(e); + return nativeResponseValue; +} + // bool CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(const struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR o); +/* @internal */ +export function CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(o: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(o); + return nativeResponseValue; +} + // void CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ _res); +/* @internal */ +export function CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(_res: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(_res); + // debug statements here +} + // uint64_t CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR arg); +/* @internal */ +export function CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(const struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR orig); +/* @internal */ +export function CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(orig); + return nativeResponseValue; +} + // struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ CResult_InvoiceRequestBolt12SemanticErrorZ_ok(struct LDKInvoiceRequest o); +/* @internal */ +export function CResult_InvoiceRequestBolt12SemanticErrorZ_ok(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceRequestBolt12SemanticErrorZ_ok(o); + return nativeResponseValue; +} + // struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ CResult_InvoiceRequestBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); +/* @internal */ +export function CResult_InvoiceRequestBolt12SemanticErrorZ_err(e: Bolt12SemanticError): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceRequestBolt12SemanticErrorZ_err(e); + return nativeResponseValue; +} + // bool CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(const struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR o); +/* @internal */ +export function CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(o: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(o); + return nativeResponseValue; +} + // void CResult_InvoiceRequestBolt12SemanticErrorZ_free(struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ _res); +/* @internal */ +export function CResult_InvoiceRequestBolt12SemanticErrorZ_free(_res: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceRequestBolt12SemanticErrorZ_free(_res); + // debug statements here +} + // uint64_t CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR arg); +/* @internal */ +export function CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ CResult_InvoiceRequestBolt12SemanticErrorZ_clone(const struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR orig); +/* @internal */ +export function CResult_InvoiceRequestBolt12SemanticErrorZ_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceRequestBolt12SemanticErrorZ_clone(orig); + return nativeResponseValue; } // struct LDKCOption_SecretKeyZ COption_SecretKeyZ_some(struct LDKSecretKey o); /* @internal */ @@ -19561,6 +21590,42 @@ export function COption_SecretKeyZ_clone(orig: bigint): bigint { } const nativeResponseValue = wasm.TS_COption_SecretKeyZ_clone(orig); return nativeResponseValue; +} + // struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok(struct LDKInvoiceWithExplicitSigningPubkeyBuilder o); +/* @internal */ +export function CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o); + return nativeResponseValue; +} + // struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); +/* @internal */ +export function CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err(e: Bolt12SemanticError): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err(e); + return nativeResponseValue; +} + // bool CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR o); +/* @internal */ +export function CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(o: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(o); + return nativeResponseValue; +} + // void CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free(struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ _res); +/* @internal */ +export function CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free(_res: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free(_res); + // debug statements here } // struct LDKCResult_VerifiedInvoiceRequestNoneZ CResult_VerifiedInvoiceRequestNoneZ_ok(struct LDKVerifiedInvoiceRequest o); /* @internal */ @@ -19615,6 +21680,96 @@ export function CResult_VerifiedInvoiceRequestNoneZ_clone(orig: bigint): bigint } const nativeResponseValue = wasm.TS_CResult_VerifiedInvoiceRequestNoneZ_clone(orig); return nativeResponseValue; +} + // struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok(struct LDKInvoiceWithDerivedSigningPubkeyBuilder o); +/* @internal */ +export function CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o); + return nativeResponseValue; +} + // struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); +/* @internal */ +export function CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err(e: Bolt12SemanticError): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err(e); + return nativeResponseValue; +} + // bool CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR o); +/* @internal */ +export function CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(o: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(o); + return nativeResponseValue; +} + // void CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ _res); +/* @internal */ +export function CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(_res: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(_res); + // debug statements here +} + // struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ CResult_InvoiceRequestFieldsDecodeErrorZ_ok(struct LDKInvoiceRequestFields o); +/* @internal */ +export function CResult_InvoiceRequestFieldsDecodeErrorZ_ok(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceRequestFieldsDecodeErrorZ_ok(o); + return nativeResponseValue; +} + // struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ CResult_InvoiceRequestFieldsDecodeErrorZ_err(struct LDKDecodeError e); +/* @internal */ +export function CResult_InvoiceRequestFieldsDecodeErrorZ_err(e: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceRequestFieldsDecodeErrorZ_err(e); + return nativeResponseValue; +} + // bool CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(const struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR o); +/* @internal */ +export function CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(o: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(o); + return nativeResponseValue; +} + // void CResult_InvoiceRequestFieldsDecodeErrorZ_free(struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ _res); +/* @internal */ +export function CResult_InvoiceRequestFieldsDecodeErrorZ_free(_res: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceRequestFieldsDecodeErrorZ_free(_res); + // debug statements here +} + // uint64_t CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR arg); +/* @internal */ +export function CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ CResult_InvoiceRequestFieldsDecodeErrorZ_clone(const struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR orig); +/* @internal */ +export function CResult_InvoiceRequestFieldsDecodeErrorZ_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_InvoiceRequestFieldsDecodeErrorZ_clone(orig); + return nativeResponseValue; } // enum LDKCOption_NoneZ COption_NoneZ_some(void); /* @internal */ @@ -19651,6 +21806,51 @@ export function CVec_WitnessZ_free(_res: number): void { } const nativeResponseValue = wasm.TS_CVec_WitnessZ_free(_res); // debug statements here +} + // struct LDKCOption_ECDSASignatureZ COption_ECDSASignatureZ_some(struct LDKECDSASignature o); +/* @internal */ +export function COption_ECDSASignatureZ_some(o: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_COption_ECDSASignatureZ_some(o); + return nativeResponseValue; +} + // struct LDKCOption_ECDSASignatureZ COption_ECDSASignatureZ_none(void); +/* @internal */ +export function COption_ECDSASignatureZ_none(): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_COption_ECDSASignatureZ_none(); + return nativeResponseValue; +} + // void COption_ECDSASignatureZ_free(struct LDKCOption_ECDSASignatureZ _res); +/* @internal */ +export function COption_ECDSASignatureZ_free(_res: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_COption_ECDSASignatureZ_free(_res); + // debug statements here +} + // uint64_t COption_ECDSASignatureZ_clone_ptr(LDKCOption_ECDSASignatureZ *NONNULL_PTR arg); +/* @internal */ +export function COption_ECDSASignatureZ_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_COption_ECDSASignatureZ_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKCOption_ECDSASignatureZ COption_ECDSASignatureZ_clone(const struct LDKCOption_ECDSASignatureZ *NONNULL_PTR orig); +/* @internal */ +export function COption_ECDSASignatureZ_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_COption_ECDSASignatureZ_clone(orig); + return nativeResponseValue; } // struct LDKCOption_i64Z COption_i64Z_some(int64_t o); /* @internal */ @@ -23503,6 +25703,15 @@ export function CResult_ShutdownScriptInvalidShutdownScriptZ_clone(orig: bigint) } const nativeResponseValue = wasm.TS_CResult_ShutdownScriptInvalidShutdownScriptZ_clone(orig); return nativeResponseValue; +} + // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res); +/* @internal */ +export function CVec_TransactionZ_free(_res: number): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CVec_TransactionZ_free(_res); + // debug statements here } // struct LDKCResult_PaymentPurposeDecodeErrorZ CResult_PaymentPurposeDecodeErrorZ_ok(struct LDKPaymentPurpose o); /* @internal */ @@ -25015,6 +27224,60 @@ export function CResult_UntrustedStringDecodeErrorZ_clone(orig: bigint): bigint } const nativeResponseValue = wasm.TS_CResult_UntrustedStringDecodeErrorZ_clone(orig); return nativeResponseValue; +} + // struct LDKCResult_ChannelIdDecodeErrorZ CResult_ChannelIdDecodeErrorZ_ok(struct LDKChannelId o); +/* @internal */ +export function CResult_ChannelIdDecodeErrorZ_ok(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_ChannelIdDecodeErrorZ_ok(o); + return nativeResponseValue; +} + // struct LDKCResult_ChannelIdDecodeErrorZ CResult_ChannelIdDecodeErrorZ_err(struct LDKDecodeError e); +/* @internal */ +export function CResult_ChannelIdDecodeErrorZ_err(e: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_ChannelIdDecodeErrorZ_err(e); + return nativeResponseValue; +} + // bool CResult_ChannelIdDecodeErrorZ_is_ok(const struct LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR o); +/* @internal */ +export function CResult_ChannelIdDecodeErrorZ_is_ok(o: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_ChannelIdDecodeErrorZ_is_ok(o); + return nativeResponseValue; +} + // void CResult_ChannelIdDecodeErrorZ_free(struct LDKCResult_ChannelIdDecodeErrorZ _res); +/* @internal */ +export function CResult_ChannelIdDecodeErrorZ_free(_res: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_ChannelIdDecodeErrorZ_free(_res); + // debug statements here +} + // uint64_t CResult_ChannelIdDecodeErrorZ_clone_ptr(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR arg); +/* @internal */ +export function CResult_ChannelIdDecodeErrorZ_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_ChannelIdDecodeErrorZ_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKCResult_ChannelIdDecodeErrorZ CResult_ChannelIdDecodeErrorZ_clone(const struct LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR orig); +/* @internal */ +export function CResult_ChannelIdDecodeErrorZ_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_ChannelIdDecodeErrorZ_clone(orig); + return nativeResponseValue; } // uint64_t C2Tuple__u832u16Z_clone_ptr(LDKC2Tuple__u832u16Z *NONNULL_PTR arg); /* @internal */ @@ -25160,94 +27423,220 @@ export function CResult_PaymentConstraintsDecodeErrorZ_clone(orig: bigint): bigi const nativeResponseValue = wasm.TS_CResult_PaymentConstraintsDecodeErrorZ_clone(orig); return nativeResponseValue; } - // uint64_t C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR arg); + // struct LDKCResult_PaymentContextDecodeErrorZ CResult_PaymentContextDecodeErrorZ_ok(struct LDKPaymentContext o); /* @internal */ -export function C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(arg: bigint): bigint { +export function CResult_PaymentContextDecodeErrorZ_ok(o: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(arg); + const nativeResponseValue = wasm.TS_CResult_PaymentContextDecodeErrorZ_ok(o); return nativeResponseValue; } - // struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(const struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR orig); + // struct LDKCResult_PaymentContextDecodeErrorZ CResult_PaymentContextDecodeErrorZ_err(struct LDKDecodeError e); /* @internal */ -export function C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(orig: bigint): bigint { +export function CResult_PaymentContextDecodeErrorZ_err(e: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(orig); + const nativeResponseValue = wasm.TS_CResult_PaymentContextDecodeErrorZ_err(e); return nativeResponseValue; } - // struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new(struct LDKThirtyTwoBytes a, struct LDKRecipientOnionFields b, struct LDKRouteParameters c); + // bool CResult_PaymentContextDecodeErrorZ_is_ok(const struct LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR o); /* @internal */ -export function C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new(a: number, b: bigint, c: bigint): bigint { +export function CResult_PaymentContextDecodeErrorZ_is_ok(o: bigint): boolean { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new(a, b, c); + const nativeResponseValue = wasm.TS_CResult_PaymentContextDecodeErrorZ_is_ok(o); return nativeResponseValue; } - // void C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free(struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ _res); + // void CResult_PaymentContextDecodeErrorZ_free(struct LDKCResult_PaymentContextDecodeErrorZ _res); /* @internal */ -export function C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free(_res: bigint): void { +export function CResult_PaymentContextDecodeErrorZ_free(_res: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free(_res); + const nativeResponseValue = wasm.TS_CResult_PaymentContextDecodeErrorZ_free(_res); // debug statements here } - // struct LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok(struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ o); + // uint64_t CResult_PaymentContextDecodeErrorZ_clone_ptr(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR arg); /* @internal */ -export function CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok(o: bigint): bigint { +export function CResult_PaymentContextDecodeErrorZ_clone_ptr(arg: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok(o); + const nativeResponseValue = wasm.TS_CResult_PaymentContextDecodeErrorZ_clone_ptr(arg); return nativeResponseValue; } - // struct LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err(void); + // struct LDKCResult_PaymentContextDecodeErrorZ CResult_PaymentContextDecodeErrorZ_clone(const struct LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR orig); /* @internal */ -export function CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err(): bigint { +export function CResult_PaymentContextDecodeErrorZ_clone(orig: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err(); + const nativeResponseValue = wasm.TS_CResult_PaymentContextDecodeErrorZ_clone(orig); return nativeResponseValue; } - // bool CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok(const struct LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR o); + // struct LDKCResult_UnknownPaymentContextDecodeErrorZ CResult_UnknownPaymentContextDecodeErrorZ_ok(struct LDKUnknownPaymentContext o); /* @internal */ -export function CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok(o: bigint): boolean { +export function CResult_UnknownPaymentContextDecodeErrorZ_ok(o: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok(o); + const nativeResponseValue = wasm.TS_CResult_UnknownPaymentContextDecodeErrorZ_ok(o); return nativeResponseValue; } - // void CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free(struct LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ _res); + // struct LDKCResult_UnknownPaymentContextDecodeErrorZ CResult_UnknownPaymentContextDecodeErrorZ_err(struct LDKDecodeError e); /* @internal */ -export function CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free(_res: bigint): void { +export function CResult_UnknownPaymentContextDecodeErrorZ_err(e: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free(_res); + const nativeResponseValue = wasm.TS_CResult_UnknownPaymentContextDecodeErrorZ_err(e); + return nativeResponseValue; +} + // bool CResult_UnknownPaymentContextDecodeErrorZ_is_ok(const struct LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR o); +/* @internal */ +export function CResult_UnknownPaymentContextDecodeErrorZ_is_ok(o: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_UnknownPaymentContextDecodeErrorZ_is_ok(o); + return nativeResponseValue; +} + // void CResult_UnknownPaymentContextDecodeErrorZ_free(struct LDKCResult_UnknownPaymentContextDecodeErrorZ _res); +/* @internal */ +export function CResult_UnknownPaymentContextDecodeErrorZ_free(_res: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_UnknownPaymentContextDecodeErrorZ_free(_res); // debug statements here } - // uint64_t CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR arg); + // uint64_t CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR arg); /* @internal */ -export function CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(arg: bigint): bigint { +export function CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(arg: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(arg); + const nativeResponseValue = wasm.TS_CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(arg); return nativeResponseValue; } - // struct LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(const struct LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR orig); + // struct LDKCResult_UnknownPaymentContextDecodeErrorZ CResult_UnknownPaymentContextDecodeErrorZ_clone(const struct LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR orig); /* @internal */ -export function CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(orig: bigint): bigint { +export function CResult_UnknownPaymentContextDecodeErrorZ_clone(orig: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(orig); + const nativeResponseValue = wasm.TS_CResult_UnknownPaymentContextDecodeErrorZ_clone(orig); + return nativeResponseValue; +} + // struct LDKCResult_Bolt12OfferContextDecodeErrorZ CResult_Bolt12OfferContextDecodeErrorZ_ok(struct LDKBolt12OfferContext o); +/* @internal */ +export function CResult_Bolt12OfferContextDecodeErrorZ_ok(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_Bolt12OfferContextDecodeErrorZ_ok(o); + return nativeResponseValue; +} + // struct LDKCResult_Bolt12OfferContextDecodeErrorZ CResult_Bolt12OfferContextDecodeErrorZ_err(struct LDKDecodeError e); +/* @internal */ +export function CResult_Bolt12OfferContextDecodeErrorZ_err(e: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_Bolt12OfferContextDecodeErrorZ_err(e); + return nativeResponseValue; +} + // bool CResult_Bolt12OfferContextDecodeErrorZ_is_ok(const struct LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR o); +/* @internal */ +export function CResult_Bolt12OfferContextDecodeErrorZ_is_ok(o: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_Bolt12OfferContextDecodeErrorZ_is_ok(o); + return nativeResponseValue; +} + // void CResult_Bolt12OfferContextDecodeErrorZ_free(struct LDKCResult_Bolt12OfferContextDecodeErrorZ _res); +/* @internal */ +export function CResult_Bolt12OfferContextDecodeErrorZ_free(_res: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_Bolt12OfferContextDecodeErrorZ_free(_res); + // debug statements here +} + // uint64_t CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR arg); +/* @internal */ +export function CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKCResult_Bolt12OfferContextDecodeErrorZ CResult_Bolt12OfferContextDecodeErrorZ_clone(const struct LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR orig); +/* @internal */ +export function CResult_Bolt12OfferContextDecodeErrorZ_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_Bolt12OfferContextDecodeErrorZ_clone(orig); + return nativeResponseValue; +} + // struct LDKCResult_Bolt12RefundContextDecodeErrorZ CResult_Bolt12RefundContextDecodeErrorZ_ok(struct LDKBolt12RefundContext o); +/* @internal */ +export function CResult_Bolt12RefundContextDecodeErrorZ_ok(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_Bolt12RefundContextDecodeErrorZ_ok(o); + return nativeResponseValue; +} + // struct LDKCResult_Bolt12RefundContextDecodeErrorZ CResult_Bolt12RefundContextDecodeErrorZ_err(struct LDKDecodeError e); +/* @internal */ +export function CResult_Bolt12RefundContextDecodeErrorZ_err(e: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_Bolt12RefundContextDecodeErrorZ_err(e); + return nativeResponseValue; +} + // bool CResult_Bolt12RefundContextDecodeErrorZ_is_ok(const struct LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR o); +/* @internal */ +export function CResult_Bolt12RefundContextDecodeErrorZ_is_ok(o: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_Bolt12RefundContextDecodeErrorZ_is_ok(o); + return nativeResponseValue; +} + // void CResult_Bolt12RefundContextDecodeErrorZ_free(struct LDKCResult_Bolt12RefundContextDecodeErrorZ _res); +/* @internal */ +export function CResult_Bolt12RefundContextDecodeErrorZ_free(_res: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_Bolt12RefundContextDecodeErrorZ_free(_res); + // debug statements here +} + // uint64_t CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR arg); +/* @internal */ +export function CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKCResult_Bolt12RefundContextDecodeErrorZ CResult_Bolt12RefundContextDecodeErrorZ_clone(const struct LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR orig); +/* @internal */ +export function CResult_Bolt12RefundContextDecodeErrorZ_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_Bolt12RefundContextDecodeErrorZ_clone(orig); return nativeResponseValue; } // struct LDKCResult_StrSecp256k1ErrorZ CResult_StrSecp256k1ErrorZ_ok(struct LDKStr o); @@ -25303,6 +27692,96 @@ export function CResult_StrSecp256k1ErrorZ_clone(orig: bigint): bigint { } const nativeResponseValue = wasm.TS_CResult_StrSecp256k1ErrorZ_clone(orig); return nativeResponseValue; +} + // uint64_t C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR arg); +/* @internal */ +export function C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(const struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR orig); +/* @internal */ +export function C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(orig); + return nativeResponseValue; +} + // struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new(struct LDKThirtyTwoBytes a, struct LDKRecipientOnionFields b, struct LDKRouteParameters c); +/* @internal */ +export function C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new(a: number, b: bigint, c: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new(a, b, c); + return nativeResponseValue; +} + // void C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free(struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ _res); +/* @internal */ +export function C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free(_res: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free(_res); + // debug statements here +} + // struct LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok(struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ o); +/* @internal */ +export function CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok(o); + return nativeResponseValue; +} + // struct LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err(void); +/* @internal */ +export function CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err(): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err(); + return nativeResponseValue; +} + // bool CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok(const struct LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR o); +/* @internal */ +export function CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok(o: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok(o); + return nativeResponseValue; +} + // void CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free(struct LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ _res); +/* @internal */ +export function CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free(_res: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free(_res); + // debug statements here +} + // uint64_t CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR arg); +/* @internal */ +export function CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(const struct LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR orig); +/* @internal */ +export function CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(orig); + return nativeResponseValue; } // struct LDKCResult_TxOutUtxoLookupErrorZ CResult_TxOutUtxoLookupErrorZ_ok(struct LDKTxOut o); /* @internal */ @@ -25429,6 +27908,24 @@ export function CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZ } const nativeResponseValue = wasm.TS_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_free(_res); // debug statements here +} + // uint64_t CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ *NONNULL_PTR arg); +/* @internal */ +export function CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(const struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ *NONNULL_PTR orig); +/* @internal */ +export function CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(orig); + return nativeResponseValue; } // struct LDKCResult_PeeledOnionNoneZ CResult_PeeledOnionNoneZ_ok(struct LDKPeeledOnion o); /* @internal */ @@ -25465,6 +27962,24 @@ export function CResult_PeeledOnionNoneZ_free(_res: bigint): void { } const nativeResponseValue = wasm.TS_CResult_PeeledOnionNoneZ_free(_res); // debug statements here +} + // uint64_t CResult_PeeledOnionNoneZ_clone_ptr(LDKCResult_PeeledOnionNoneZ *NONNULL_PTR arg); +/* @internal */ +export function CResult_PeeledOnionNoneZ_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_PeeledOnionNoneZ_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKCResult_PeeledOnionNoneZ CResult_PeeledOnionNoneZ_clone(const struct LDKCResult_PeeledOnionNoneZ *NONNULL_PTR orig); +/* @internal */ +export function CResult_PeeledOnionNoneZ_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_PeeledOnionNoneZ_clone(orig); + return nativeResponseValue; } // struct LDKCResult_SendSuccessSendErrorZ CResult_SendSuccessSendErrorZ_ok(struct LDKSendSuccess o); /* @internal */ @@ -25501,6 +28016,24 @@ export function CResult_SendSuccessSendErrorZ_free(_res: bigint): void { } const nativeResponseValue = wasm.TS_CResult_SendSuccessSendErrorZ_free(_res); // debug statements here +} + // uint64_t CResult_SendSuccessSendErrorZ_clone_ptr(LDKCResult_SendSuccessSendErrorZ *NONNULL_PTR arg); +/* @internal */ +export function CResult_SendSuccessSendErrorZ_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_SendSuccessSendErrorZ_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKCResult_SendSuccessSendErrorZ CResult_SendSuccessSendErrorZ_clone(const struct LDKCResult_SendSuccessSendErrorZ *NONNULL_PTR orig); +/* @internal */ +export function CResult_SendSuccessSendErrorZ_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_SendSuccessSendErrorZ_clone(orig); + return nativeResponseValue; } // struct LDKCResult_BlindedPathNoneZ CResult_BlindedPathNoneZ_ok(struct LDKBlindedPath o); /* @internal */ @@ -25780,6 +28313,240 @@ export function CResult_InvoiceErrorDecodeErrorZ_clone(orig: bigint): bigint { } const nativeResponseValue = wasm.TS_CResult_InvoiceErrorDecodeErrorZ_clone(orig); return nativeResponseValue; +} + // struct LDKCResult_TrackedSpendableOutputDecodeErrorZ CResult_TrackedSpendableOutputDecodeErrorZ_ok(struct LDKTrackedSpendableOutput o); +/* @internal */ +export function CResult_TrackedSpendableOutputDecodeErrorZ_ok(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_TrackedSpendableOutputDecodeErrorZ_ok(o); + return nativeResponseValue; +} + // struct LDKCResult_TrackedSpendableOutputDecodeErrorZ CResult_TrackedSpendableOutputDecodeErrorZ_err(struct LDKDecodeError e); +/* @internal */ +export function CResult_TrackedSpendableOutputDecodeErrorZ_err(e: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_TrackedSpendableOutputDecodeErrorZ_err(e); + return nativeResponseValue; +} + // bool CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(const struct LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR o); +/* @internal */ +export function CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(o: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(o); + return nativeResponseValue; +} + // void CResult_TrackedSpendableOutputDecodeErrorZ_free(struct LDKCResult_TrackedSpendableOutputDecodeErrorZ _res); +/* @internal */ +export function CResult_TrackedSpendableOutputDecodeErrorZ_free(_res: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_TrackedSpendableOutputDecodeErrorZ_free(_res); + // debug statements here +} + // uint64_t CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR arg); +/* @internal */ +export function CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKCResult_TrackedSpendableOutputDecodeErrorZ CResult_TrackedSpendableOutputDecodeErrorZ_clone(const struct LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR orig); +/* @internal */ +export function CResult_TrackedSpendableOutputDecodeErrorZ_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_TrackedSpendableOutputDecodeErrorZ_clone(orig); + return nativeResponseValue; +} + // struct LDKCResult_OutputSpendStatusDecodeErrorZ CResult_OutputSpendStatusDecodeErrorZ_ok(struct LDKOutputSpendStatus o); +/* @internal */ +export function CResult_OutputSpendStatusDecodeErrorZ_ok(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_OutputSpendStatusDecodeErrorZ_ok(o); + return nativeResponseValue; +} + // struct LDKCResult_OutputSpendStatusDecodeErrorZ CResult_OutputSpendStatusDecodeErrorZ_err(struct LDKDecodeError e); +/* @internal */ +export function CResult_OutputSpendStatusDecodeErrorZ_err(e: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_OutputSpendStatusDecodeErrorZ_err(e); + return nativeResponseValue; +} + // bool CResult_OutputSpendStatusDecodeErrorZ_is_ok(const struct LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR o); +/* @internal */ +export function CResult_OutputSpendStatusDecodeErrorZ_is_ok(o: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_OutputSpendStatusDecodeErrorZ_is_ok(o); + return nativeResponseValue; +} + // void CResult_OutputSpendStatusDecodeErrorZ_free(struct LDKCResult_OutputSpendStatusDecodeErrorZ _res); +/* @internal */ +export function CResult_OutputSpendStatusDecodeErrorZ_free(_res: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_OutputSpendStatusDecodeErrorZ_free(_res); + // debug statements here +} + // uint64_t CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR arg); +/* @internal */ +export function CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKCResult_OutputSpendStatusDecodeErrorZ CResult_OutputSpendStatusDecodeErrorZ_clone(const struct LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR orig); +/* @internal */ +export function CResult_OutputSpendStatusDecodeErrorZ_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_OutputSpendStatusDecodeErrorZ_clone(orig); + return nativeResponseValue; +} + // struct LDKCOption_FilterZ COption_FilterZ_some(struct LDKFilter o); +/* @internal */ +export function COption_FilterZ_some(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_COption_FilterZ_some(o); + return nativeResponseValue; +} + // struct LDKCOption_FilterZ COption_FilterZ_none(void); +/* @internal */ +export function COption_FilterZ_none(): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_COption_FilterZ_none(); + return nativeResponseValue; +} + // void COption_FilterZ_free(struct LDKCOption_FilterZ _res); +/* @internal */ +export function COption_FilterZ_free(_res: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_COption_FilterZ_free(_res); + // debug statements here +} + // void CVec_TrackedSpendableOutputZ_free(struct LDKCVec_TrackedSpendableOutputZ _res); +/* @internal */ +export function CVec_TrackedSpendableOutputZ_free(_res: number): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CVec_TrackedSpendableOutputZ_free(_res); + // debug statements here +} + // struct LDKCResult_OutputSweeperDecodeErrorZ CResult_OutputSweeperDecodeErrorZ_ok(struct LDKOutputSweeper o); +/* @internal */ +export function CResult_OutputSweeperDecodeErrorZ_ok(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_OutputSweeperDecodeErrorZ_ok(o); + return nativeResponseValue; +} + // struct LDKCResult_OutputSweeperDecodeErrorZ CResult_OutputSweeperDecodeErrorZ_err(struct LDKDecodeError e); +/* @internal */ +export function CResult_OutputSweeperDecodeErrorZ_err(e: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_OutputSweeperDecodeErrorZ_err(e); + return nativeResponseValue; +} + // bool CResult_OutputSweeperDecodeErrorZ_is_ok(const struct LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR o); +/* @internal */ +export function CResult_OutputSweeperDecodeErrorZ_is_ok(o: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_OutputSweeperDecodeErrorZ_is_ok(o); + return nativeResponseValue; +} + // void CResult_OutputSweeperDecodeErrorZ_free(struct LDKCResult_OutputSweeperDecodeErrorZ _res); +/* @internal */ +export function CResult_OutputSweeperDecodeErrorZ_free(_res: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_OutputSweeperDecodeErrorZ_free(_res); + // debug statements here +} + // struct LDKC2Tuple_BestBlockOutputSweeperZ C2Tuple_BestBlockOutputSweeperZ_new(struct LDKBestBlock a, struct LDKOutputSweeper b); +/* @internal */ +export function C2Tuple_BestBlockOutputSweeperZ_new(a: bigint, b: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_C2Tuple_BestBlockOutputSweeperZ_new(a, b); + return nativeResponseValue; +} + // void C2Tuple_BestBlockOutputSweeperZ_free(struct LDKC2Tuple_BestBlockOutputSweeperZ _res); +/* @internal */ +export function C2Tuple_BestBlockOutputSweeperZ_free(_res: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_C2Tuple_BestBlockOutputSweeperZ_free(_res); + // debug statements here +} + // struct LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok(struct LDKC2Tuple_BestBlockOutputSweeperZ o); +/* @internal */ +export function CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok(o); + return nativeResponseValue; +} + // struct LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err(struct LDKDecodeError e); +/* @internal */ +export function CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err(e: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err(e); + return nativeResponseValue; +} + // bool CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(const struct LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR o); +/* @internal */ +export function CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(o: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(o); + return nativeResponseValue; +} + // void CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ _res); +/* @internal */ +export function CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free(_res: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free(_res); + // debug statements here } // struct LDKCResult_DelayedPaymentBasepointDecodeErrorZ CResult_DelayedPaymentBasepointDecodeErrorZ_ok(struct LDKDelayedPaymentBasepoint o); /* @internal */ @@ -26105,76 +28872,85 @@ export function CResult_RevocationKeyDecodeErrorZ_clone(orig: bigint): bigint { const nativeResponseValue = wasm.TS_CResult_RevocationKeyDecodeErrorZ_clone(orig); return nativeResponseValue; } - // struct LDKCOption_FilterZ COption_FilterZ_some(struct LDKFilter o); + // struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_ok(struct LDKLockedChannelMonitor o); /* @internal */ -export function COption_FilterZ_some(o: bigint): bigint { +export function CResult_LockedChannelMonitorNoneZ_ok(o: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_COption_FilterZ_some(o); + const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_ok(o); return nativeResponseValue; } - // struct LDKCOption_FilterZ COption_FilterZ_none(void); + // struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_err(void); /* @internal */ -export function COption_FilterZ_none(): bigint { +export function CResult_LockedChannelMonitorNoneZ_err(): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_COption_FilterZ_none(); + const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_err(); return nativeResponseValue; } - // void COption_FilterZ_free(struct LDKCOption_FilterZ _res); + // bool CResult_LockedChannelMonitorNoneZ_is_ok(const struct LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR o); /* @internal */ -export function COption_FilterZ_free(_res: bigint): void { +export function CResult_LockedChannelMonitorNoneZ_is_ok(o: bigint): boolean { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_COption_FilterZ_free(_res); + const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_is_ok(o); + return nativeResponseValue; +} + // void CResult_LockedChannelMonitorNoneZ_free(struct LDKCResult_LockedChannelMonitorNoneZ _res); +/* @internal */ +export function CResult_LockedChannelMonitorNoneZ_free(_res: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_free(_res); // debug statements here } - // struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_ok(struct LDKLockedChannelMonitor o); + // uint64_t C2Tuple_OutPointChannelIdZ_clone_ptr(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR arg); /* @internal */ -export function CResult_LockedChannelMonitorNoneZ_ok(o: bigint): bigint { +export function C2Tuple_OutPointChannelIdZ_clone_ptr(arg: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_ok(o); + const nativeResponseValue = wasm.TS_C2Tuple_OutPointChannelIdZ_clone_ptr(arg); return nativeResponseValue; } - // struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_err(void); + // struct LDKC2Tuple_OutPointChannelIdZ C2Tuple_OutPointChannelIdZ_clone(const struct LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR orig); /* @internal */ -export function CResult_LockedChannelMonitorNoneZ_err(): bigint { +export function C2Tuple_OutPointChannelIdZ_clone(orig: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_err(); + const nativeResponseValue = wasm.TS_C2Tuple_OutPointChannelIdZ_clone(orig); return nativeResponseValue; } - // bool CResult_LockedChannelMonitorNoneZ_is_ok(const struct LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR o); + // struct LDKC2Tuple_OutPointChannelIdZ C2Tuple_OutPointChannelIdZ_new(struct LDKOutPoint a, struct LDKChannelId b); /* @internal */ -export function CResult_LockedChannelMonitorNoneZ_is_ok(o: bigint): boolean { +export function C2Tuple_OutPointChannelIdZ_new(a: bigint, b: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_is_ok(o); + const nativeResponseValue = wasm.TS_C2Tuple_OutPointChannelIdZ_new(a, b); return nativeResponseValue; } - // void CResult_LockedChannelMonitorNoneZ_free(struct LDKCResult_LockedChannelMonitorNoneZ _res); + // void C2Tuple_OutPointChannelIdZ_free(struct LDKC2Tuple_OutPointChannelIdZ _res); /* @internal */ -export function CResult_LockedChannelMonitorNoneZ_free(_res: bigint): void { +export function C2Tuple_OutPointChannelIdZ_free(_res: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_free(_res); + const nativeResponseValue = wasm.TS_C2Tuple_OutPointChannelIdZ_free(_res); // debug statements here } - // void CVec_OutPointZ_free(struct LDKCVec_OutPointZ _res); + // void CVec_C2Tuple_OutPointChannelIdZZ_free(struct LDKCVec_C2Tuple_OutPointChannelIdZZ _res); /* @internal */ -export function CVec_OutPointZ_free(_res: number): void { +export function CVec_C2Tuple_OutPointChannelIdZZ_free(_res: number): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_CVec_OutPointZ_free(_res); + const nativeResponseValue = wasm.TS_CVec_C2Tuple_OutPointChannelIdZZ_free(_res); // debug statements here } // void CVec_MonitorUpdateIdZ_free(struct LDKCVec_MonitorUpdateIdZ _res); @@ -26563,6 +29339,15 @@ export function TransactionU16LenLimited_into_transaction(this_arg: bigint): num } const nativeResponseValue = wasm.TS_TransactionU16LenLimited_into_transaction(this_arg); return nativeResponseValue; +} + // MUST_USE_RES struct LDKTransaction TransactionU16LenLimited_as_transaction(const struct LDKTransactionU16LenLimited *NONNULL_PTR this_arg); +/* @internal */ +export function TransactionU16LenLimited_as_transaction(this_arg: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_TransactionU16LenLimited_as_transaction(this_arg); + return nativeResponseValue; } // struct LDKCVec_u8Z TransactionU16LenLimited_write(const struct LDKTransactionU16LenLimited *NONNULL_PTR obj); /* @internal */ @@ -26698,6 +29483,87 @@ export function MonitorUpdatingPersister_as_Persist(this_arg: bigint): bigint { } const nativeResponseValue = wasm.TS_MonitorUpdatingPersister_as_Persist(this_arg); return nativeResponseValue; +} + // enum LDKShortChannelIdError ShortChannelIdError_clone(const enum LDKShortChannelIdError *NONNULL_PTR orig); +/* @internal */ +export function ShortChannelIdError_clone(orig: bigint): ShortChannelIdError { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ShortChannelIdError_clone(orig); + return nativeResponseValue; +} + // enum LDKShortChannelIdError ShortChannelIdError_block_overflow(void); +/* @internal */ +export function ShortChannelIdError_block_overflow(): ShortChannelIdError { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ShortChannelIdError_block_overflow(); + return nativeResponseValue; +} + // enum LDKShortChannelIdError ShortChannelIdError_tx_index_overflow(void); +/* @internal */ +export function ShortChannelIdError_tx_index_overflow(): ShortChannelIdError { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ShortChannelIdError_tx_index_overflow(); + return nativeResponseValue; +} + // enum LDKShortChannelIdError ShortChannelIdError_vout_index_overflow(void); +/* @internal */ +export function ShortChannelIdError_vout_index_overflow(): ShortChannelIdError { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ShortChannelIdError_vout_index_overflow(); + return nativeResponseValue; +} + // bool ShortChannelIdError_eq(const enum LDKShortChannelIdError *NONNULL_PTR a, const enum LDKShortChannelIdError *NONNULL_PTR b); +/* @internal */ +export function ShortChannelIdError_eq(a: bigint, b: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ShortChannelIdError_eq(a, b); + return nativeResponseValue; +} + // uint32_t block_from_scid(uint64_t short_channel_id); +/* @internal */ +export function block_from_scid(short_channel_id: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_block_from_scid(short_channel_id); + return nativeResponseValue; +} + // uint32_t tx_index_from_scid(uint64_t short_channel_id); +/* @internal */ +export function tx_index_from_scid(short_channel_id: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_tx_index_from_scid(short_channel_id); + return nativeResponseValue; +} + // uint16_t vout_from_scid(uint64_t short_channel_id); +/* @internal */ +export function vout_from_scid(short_channel_id: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_vout_from_scid(short_channel_id); + return nativeResponseValue; +} + // struct LDKCResult_u64ShortChannelIdErrorZ scid_from_parts(uint64_t block, uint64_t tx_index, uint64_t vout_index); +/* @internal */ +export function scid_from_parts(block: bigint, tx_index: bigint, vout_index: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_scid_from_parts(block, tx_index, vout_index); + return nativeResponseValue; } // void UntrustedString_free(struct LDKUntrustedString this_obj); /* @internal */ @@ -26825,41 +29691,356 @@ export function PrintableString_new(a_arg: number): bigint { const nativeResponseValue = wasm.TS_PrintableString_new(a_arg); return nativeResponseValue; } - // void FutureCallback_free(struct LDKFutureCallback this_ptr); + // void TrackedSpendableOutput_free(struct LDKTrackedSpendableOutput this_obj); /* @internal */ -export function FutureCallback_free(this_ptr: bigint): void { +export function TrackedSpendableOutput_free(this_obj: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_FutureCallback_free(this_ptr); + const nativeResponseValue = wasm.TS_TrackedSpendableOutput_free(this_obj); // debug statements here } - // void Future_free(struct LDKFuture this_obj); + // struct LDKSpendableOutputDescriptor TrackedSpendableOutput_get_descriptor(const struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr); /* @internal */ -export function Future_free(this_obj: bigint): void { +export function TrackedSpendableOutput_get_descriptor(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_Future_free(this_obj); + const nativeResponseValue = wasm.TS_TrackedSpendableOutput_get_descriptor(this_ptr); + return nativeResponseValue; +} + // void TrackedSpendableOutput_set_descriptor(struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr, struct LDKSpendableOutputDescriptor val); +/* @internal */ +export function TrackedSpendableOutput_set_descriptor(this_ptr: bigint, val: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_TrackedSpendableOutput_set_descriptor(this_ptr, val); + // debug statements here +} + // struct LDKChannelId TrackedSpendableOutput_get_channel_id(const struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr); +/* @internal */ +export function TrackedSpendableOutput_get_channel_id(this_ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_TrackedSpendableOutput_get_channel_id(this_ptr); + return nativeResponseValue; +} + // void TrackedSpendableOutput_set_channel_id(struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr, struct LDKChannelId val); +/* @internal */ +export function TrackedSpendableOutput_set_channel_id(this_ptr: bigint, val: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_TrackedSpendableOutput_set_channel_id(this_ptr, val); + // debug statements here +} + // struct LDKOutputSpendStatus TrackedSpendableOutput_get_status(const struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr); +/* @internal */ +export function TrackedSpendableOutput_get_status(this_ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_TrackedSpendableOutput_get_status(this_ptr); + return nativeResponseValue; +} + // void TrackedSpendableOutput_set_status(struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr, struct LDKOutputSpendStatus val); +/* @internal */ +export function TrackedSpendableOutput_set_status(this_ptr: bigint, val: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_TrackedSpendableOutput_set_status(this_ptr, val); + // debug statements here +} + // MUST_USE_RES struct LDKTrackedSpendableOutput TrackedSpendableOutput_new(struct LDKSpendableOutputDescriptor descriptor_arg, struct LDKChannelId channel_id_arg, struct LDKOutputSpendStatus status_arg); +/* @internal */ +export function TrackedSpendableOutput_new(descriptor_arg: bigint, channel_id_arg: bigint, status_arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_TrackedSpendableOutput_new(descriptor_arg, channel_id_arg, status_arg); + return nativeResponseValue; +} + // uint64_t TrackedSpendableOutput_clone_ptr(LDKTrackedSpendableOutput *NONNULL_PTR arg); +/* @internal */ +export function TrackedSpendableOutput_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_TrackedSpendableOutput_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKTrackedSpendableOutput TrackedSpendableOutput_clone(const struct LDKTrackedSpendableOutput *NONNULL_PTR orig); +/* @internal */ +export function TrackedSpendableOutput_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_TrackedSpendableOutput_clone(orig); + return nativeResponseValue; +} + // bool TrackedSpendableOutput_eq(const struct LDKTrackedSpendableOutput *NONNULL_PTR a, const struct LDKTrackedSpendableOutput *NONNULL_PTR b); +/* @internal */ +export function TrackedSpendableOutput_eq(a: bigint, b: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_TrackedSpendableOutput_eq(a, b); + return nativeResponseValue; +} + // MUST_USE_RES bool TrackedSpendableOutput_is_spent_in(const struct LDKTrackedSpendableOutput *NONNULL_PTR this_arg, struct LDKTransaction tx); +/* @internal */ +export function TrackedSpendableOutput_is_spent_in(this_arg: bigint, tx: number): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_TrackedSpendableOutput_is_spent_in(this_arg, tx); + return nativeResponseValue; +} + // struct LDKCVec_u8Z TrackedSpendableOutput_write(const struct LDKTrackedSpendableOutput *NONNULL_PTR obj); +/* @internal */ +export function TrackedSpendableOutput_write(obj: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_TrackedSpendableOutput_write(obj); + return nativeResponseValue; +} + // struct LDKCResult_TrackedSpendableOutputDecodeErrorZ TrackedSpendableOutput_read(struct LDKu8slice ser); +/* @internal */ +export function TrackedSpendableOutput_read(ser: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_TrackedSpendableOutput_read(ser); + return nativeResponseValue; +} + // void OutputSpendStatus_free(struct LDKOutputSpendStatus this_ptr); +/* @internal */ +export function OutputSpendStatus_free(this_ptr: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OutputSpendStatus_free(this_ptr); + // debug statements here +} + // uint64_t OutputSpendStatus_clone_ptr(LDKOutputSpendStatus *NONNULL_PTR arg); +/* @internal */ +export function OutputSpendStatus_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OutputSpendStatus_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKOutputSpendStatus OutputSpendStatus_clone(const struct LDKOutputSpendStatus *NONNULL_PTR orig); +/* @internal */ +export function OutputSpendStatus_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OutputSpendStatus_clone(orig); + return nativeResponseValue; +} + // struct LDKOutputSpendStatus OutputSpendStatus_pending_initial_broadcast(struct LDKCOption_u32Z delayed_until_height); +/* @internal */ +export function OutputSpendStatus_pending_initial_broadcast(delayed_until_height: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OutputSpendStatus_pending_initial_broadcast(delayed_until_height); + return nativeResponseValue; +} + // struct LDKOutputSpendStatus OutputSpendStatus_pending_first_confirmation(struct LDKThirtyTwoBytes first_broadcast_hash, uint32_t latest_broadcast_height, struct LDKTransaction latest_spending_tx); +/* @internal */ +export function OutputSpendStatus_pending_first_confirmation(first_broadcast_hash: number, latest_broadcast_height: number, latest_spending_tx: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OutputSpendStatus_pending_first_confirmation(first_broadcast_hash, latest_broadcast_height, latest_spending_tx); + return nativeResponseValue; +} + // struct LDKOutputSpendStatus OutputSpendStatus_pending_threshold_confirmations(struct LDKThirtyTwoBytes first_broadcast_hash, uint32_t latest_broadcast_height, struct LDKTransaction latest_spending_tx, uint32_t confirmation_height, struct LDKThirtyTwoBytes confirmation_hash); +/* @internal */ +export function OutputSpendStatus_pending_threshold_confirmations(first_broadcast_hash: number, latest_broadcast_height: number, latest_spending_tx: number, confirmation_height: number, confirmation_hash: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OutputSpendStatus_pending_threshold_confirmations(first_broadcast_hash, latest_broadcast_height, latest_spending_tx, confirmation_height, confirmation_hash); + return nativeResponseValue; +} + // bool OutputSpendStatus_eq(const struct LDKOutputSpendStatus *NONNULL_PTR a, const struct LDKOutputSpendStatus *NONNULL_PTR b); +/* @internal */ +export function OutputSpendStatus_eq(a: bigint, b: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OutputSpendStatus_eq(a, b); + return nativeResponseValue; +} + // struct LDKCVec_u8Z OutputSpendStatus_write(const struct LDKOutputSpendStatus *NONNULL_PTR obj); +/* @internal */ +export function OutputSpendStatus_write(obj: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OutputSpendStatus_write(obj); + return nativeResponseValue; +} + // struct LDKCResult_OutputSpendStatusDecodeErrorZ OutputSpendStatus_read(struct LDKu8slice ser); +/* @internal */ +export function OutputSpendStatus_read(ser: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OutputSpendStatus_read(ser); + return nativeResponseValue; +} + // void OutputSweeper_free(struct LDKOutputSweeper this_obj); +/* @internal */ +export function OutputSweeper_free(this_obj: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OutputSweeper_free(this_obj); + // debug statements here +} + // MUST_USE_RES struct LDKOutputSweeper OutputSweeper_new(struct LDKBestBlock best_block, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKCOption_FilterZ chain_data_source, struct LDKOutputSpender output_spender, struct LDKChangeDestinationSource change_destination_source, struct LDKKVStore kv_store, struct LDKLogger logger); +/* @internal */ +export function OutputSweeper_new(best_block: bigint, broadcaster: bigint, fee_estimator: bigint, chain_data_source: bigint, output_spender: bigint, change_destination_source: bigint, kv_store: bigint, logger: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OutputSweeper_new(best_block, broadcaster, fee_estimator, chain_data_source, output_spender, change_destination_source, kv_store, logger); + return nativeResponseValue; +} + // MUST_USE_RES struct LDKCResult_NoneNoneZ OutputSweeper_track_spendable_outputs(const struct LDKOutputSweeper *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ output_descriptors, struct LDKChannelId channel_id, bool exclude_static_outputs, struct LDKCOption_u32Z delay_until_height); +/* @internal */ +export function OutputSweeper_track_spendable_outputs(this_arg: bigint, output_descriptors: number, channel_id: bigint, exclude_static_outputs: boolean, delay_until_height: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OutputSweeper_track_spendable_outputs(this_arg, output_descriptors, channel_id, exclude_static_outputs, delay_until_height); + return nativeResponseValue; +} + // MUST_USE_RES struct LDKCVec_TrackedSpendableOutputZ OutputSweeper_tracked_spendable_outputs(const struct LDKOutputSweeper *NONNULL_PTR this_arg); +/* @internal */ +export function OutputSweeper_tracked_spendable_outputs(this_arg: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OutputSweeper_tracked_spendable_outputs(this_arg); + return nativeResponseValue; +} + // MUST_USE_RES struct LDKBestBlock OutputSweeper_current_best_block(const struct LDKOutputSweeper *NONNULL_PTR this_arg); +/* @internal */ +export function OutputSweeper_current_best_block(this_arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OutputSweeper_current_best_block(this_arg); + return nativeResponseValue; +} + // struct LDKListen OutputSweeper_as_Listen(const struct LDKOutputSweeper *NONNULL_PTR this_arg); +/* @internal */ +export function OutputSweeper_as_Listen(this_arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OutputSweeper_as_Listen(this_arg); + return nativeResponseValue; +} + // struct LDKConfirm OutputSweeper_as_Confirm(const struct LDKOutputSweeper *NONNULL_PTR this_arg); +/* @internal */ +export function OutputSweeper_as_Confirm(this_arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OutputSweeper_as_Confirm(this_arg); + return nativeResponseValue; +} + // void SpendingDelay_free(struct LDKSpendingDelay this_ptr); +/* @internal */ +export function SpendingDelay_free(this_ptr: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_SpendingDelay_free(this_ptr); // debug statements here } - // uint64_t Future_clone_ptr(LDKFuture *NONNULL_PTR arg); + // uint64_t SpendingDelay_clone_ptr(LDKSpendingDelay *NONNULL_PTR arg); +/* @internal */ +export function SpendingDelay_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_SpendingDelay_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKSpendingDelay SpendingDelay_clone(const struct LDKSpendingDelay *NONNULL_PTR orig); +/* @internal */ +export function SpendingDelay_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_SpendingDelay_clone(orig); + return nativeResponseValue; +} + // struct LDKSpendingDelay SpendingDelay_relative(uint32_t num_blocks); +/* @internal */ +export function SpendingDelay_relative(num_blocks: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_SpendingDelay_relative(num_blocks); + return nativeResponseValue; +} + // struct LDKSpendingDelay SpendingDelay_absolute(uint32_t height); +/* @internal */ +export function SpendingDelay_absolute(height: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_SpendingDelay_absolute(height); + return nativeResponseValue; +} + // struct LDKCResult_OutputSweeperDecodeErrorZ OutputSweeper_read(struct LDKu8slice ser, struct LDKBroadcasterInterface arg_a, struct LDKFeeEstimator arg_b, struct LDKCOption_FilterZ arg_c, struct LDKOutputSpender arg_d, struct LDKChangeDestinationSource arg_e, struct LDKKVStore arg_f, struct LDKLogger arg_g); /* @internal */ -export function Future_clone_ptr(arg: bigint): bigint { +export function OutputSweeper_read(ser: number, arg_a: bigint, arg_b: bigint, arg_c: bigint, arg_d: bigint, arg_e: bigint, arg_f: bigint, arg_g: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_Future_clone_ptr(arg); + const nativeResponseValue = wasm.TS_OutputSweeper_read(ser, arg_a, arg_b, arg_c, arg_d, arg_e, arg_f, arg_g); return nativeResponseValue; } - // struct LDKFuture Future_clone(const struct LDKFuture *NONNULL_PTR orig); + // struct LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ C2Tuple_BestBlockOutputSweeperZ_read(struct LDKu8slice ser, struct LDKBroadcasterInterface arg_a, struct LDKFeeEstimator arg_b, struct LDKCOption_FilterZ arg_c, struct LDKOutputSpender arg_d, struct LDKChangeDestinationSource arg_e, struct LDKKVStore arg_f, struct LDKLogger arg_g); /* @internal */ -export function Future_clone(orig: bigint): bigint { +export function C2Tuple_BestBlockOutputSweeperZ_read(ser: number, arg_a: bigint, arg_b: bigint, arg_c: bigint, arg_d: bigint, arg_e: bigint, arg_f: bigint, arg_g: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_Future_clone(orig); + const nativeResponseValue = wasm.TS_C2Tuple_BestBlockOutputSweeperZ_read(ser, arg_a, arg_b, arg_c, arg_d, arg_e, arg_f, arg_g); return nativeResponseValue; +} + // void FutureCallback_free(struct LDKFutureCallback this_ptr); +/* @internal */ +export function FutureCallback_free(this_ptr: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_FutureCallback_free(this_ptr); + // debug statements here +} + // void Future_free(struct LDKFuture this_obj); +/* @internal */ +export function Future_free(this_obj: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Future_free(this_obj); + // debug statements here } // void Future_register_callback_fn(const struct LDKFuture *NONNULL_PTR this_arg, struct LDKFutureCallback callback); /* @internal */ @@ -27005,7 +30186,7 @@ export function Record_set_peer_id(this_ptr: bigint, val: number): void { const nativeResponseValue = wasm.TS_Record_set_peer_id(this_ptr, val); // debug statements here } - // struct LDKCOption_ThirtyTwoBytesZ Record_get_channel_id(const struct LDKRecord *NONNULL_PTR this_ptr); + // struct LDKChannelId Record_get_channel_id(const struct LDKRecord *NONNULL_PTR this_ptr); /* @internal */ export function Record_get_channel_id(this_ptr: bigint): bigint { if(!isWasmInitialized) { @@ -27014,7 +30195,7 @@ export function Record_get_channel_id(this_ptr: bigint): bigint { const nativeResponseValue = wasm.TS_Record_get_channel_id(this_ptr); return nativeResponseValue; } - // void Record_set_channel_id(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKCOption_ThirtyTwoBytesZ val); + // void Record_set_channel_id(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKChannelId val); /* @internal */ export function Record_set_channel_id(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { @@ -27095,7 +30276,7 @@ export function Record_set_line(this_ptr: bigint, val: number): void { const nativeResponseValue = wasm.TS_Record_set_line(this_ptr, val); // debug statements here } - // MUST_USE_RES struct LDKRecord Record_new(enum LDKLevel level_arg, struct LDKPublicKey peer_id_arg, struct LDKCOption_ThirtyTwoBytesZ channel_id_arg, struct LDKStr args_arg, struct LDKStr module_path_arg, struct LDKStr file_arg, uint32_t line_arg); + // MUST_USE_RES struct LDKRecord Record_new(enum LDKLevel level_arg, struct LDKPublicKey peer_id_arg, struct LDKChannelId channel_id_arg, struct LDKStr args_arg, struct LDKStr module_path_arg, struct LDKStr file_arg, uint32_t line_arg); /* @internal */ export function Record_new(level_arg: Level, peer_id_arg: number, channel_id_arg: bigint, args_arg: number, module_path_arg: number, file_arg: number, line_arg: number): bigint { if(!isWasmInitialized) { @@ -28156,6 +31337,51 @@ export function BestBlock_free(this_obj: bigint): void { } const nativeResponseValue = wasm.TS_BestBlock_free(this_obj); // debug statements here +} + // const uint8_t (*BestBlock_get_block_hash(const struct LDKBestBlock *NONNULL_PTR this_ptr))[32]; +/* @internal */ +export function BestBlock_get_block_hash(this_ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_BestBlock_get_block_hash(this_ptr); + return nativeResponseValue; +} + // void BestBlock_set_block_hash(struct LDKBestBlock *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); +/* @internal */ +export function BestBlock_set_block_hash(this_ptr: bigint, val: number): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_BestBlock_set_block_hash(this_ptr, val); + // debug statements here +} + // uint32_t BestBlock_get_height(const struct LDKBestBlock *NONNULL_PTR this_ptr); +/* @internal */ +export function BestBlock_get_height(this_ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_BestBlock_get_height(this_ptr); + return nativeResponseValue; +} + // void BestBlock_set_height(struct LDKBestBlock *NONNULL_PTR this_ptr, uint32_t val); +/* @internal */ +export function BestBlock_set_height(this_ptr: bigint, val: number): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_BestBlock_set_height(this_ptr, val); + // debug statements here +} + // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash_arg, uint32_t height_arg); +/* @internal */ +export function BestBlock_new(block_hash_arg: number, height_arg: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_BestBlock_new(block_hash_arg, height_arg); + return nativeResponseValue; } // uint64_t BestBlock_clone_ptr(LDKBestBlock *NONNULL_PTR arg); /* @internal */ @@ -28175,49 +31401,49 @@ export function BestBlock_clone(orig: bigint): bigint { const nativeResponseValue = wasm.TS_BestBlock_clone(orig); return nativeResponseValue; } - // bool BestBlock_eq(const struct LDKBestBlock *NONNULL_PTR a, const struct LDKBestBlock *NONNULL_PTR b); + // uint64_t BestBlock_hash(const struct LDKBestBlock *NONNULL_PTR o); /* @internal */ -export function BestBlock_eq(a: bigint, b: bigint): boolean { +export function BestBlock_hash(o: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_BestBlock_eq(a, b); + const nativeResponseValue = wasm.TS_BestBlock_hash(o); return nativeResponseValue; } - // MUST_USE_RES struct LDKBestBlock BestBlock_from_network(enum LDKNetwork network); + // bool BestBlock_eq(const struct LDKBestBlock *NONNULL_PTR a, const struct LDKBestBlock *NONNULL_PTR b); /* @internal */ -export function BestBlock_from_network(network: Network): bigint { +export function BestBlock_eq(a: bigint, b: bigint): boolean { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_BestBlock_from_network(network); + const nativeResponseValue = wasm.TS_BestBlock_eq(a, b); return nativeResponseValue; } - // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash, uint32_t height); + // MUST_USE_RES struct LDKBestBlock BestBlock_from_network(enum LDKNetwork network); /* @internal */ -export function BestBlock_new(block_hash: number, height: number): bigint { +export function BestBlock_from_network(network: Network): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_BestBlock_new(block_hash, height); + const nativeResponseValue = wasm.TS_BestBlock_from_network(network); return nativeResponseValue; } - // MUST_USE_RES struct LDKThirtyTwoBytes BestBlock_block_hash(const struct LDKBestBlock *NONNULL_PTR this_arg); + // struct LDKCVec_u8Z BestBlock_write(const struct LDKBestBlock *NONNULL_PTR obj); /* @internal */ -export function BestBlock_block_hash(this_arg: bigint): number { +export function BestBlock_write(obj: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_BestBlock_block_hash(this_arg); + const nativeResponseValue = wasm.TS_BestBlock_write(obj); return nativeResponseValue; } - // MUST_USE_RES uint32_t BestBlock_height(const struct LDKBestBlock *NONNULL_PTR this_arg); + // struct LDKCResult_BestBlockDecodeErrorZ BestBlock_read(struct LDKu8slice ser); /* @internal */ -export function BestBlock_height(this_arg: bigint): number { +export function BestBlock_read(ser: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_BestBlock_height(this_arg); + const nativeResponseValue = wasm.TS_BestBlock_read(ser); return nativeResponseValue; } // void Listen_free(struct LDKListen this_ptr); @@ -28480,6 +31706,15 @@ export function ConfirmationTarget_channel_close_minimum(): ConfirmationTarget { } const nativeResponseValue = wasm.TS_ConfirmationTarget_channel_close_minimum(); return nativeResponseValue; +} + // enum LDKConfirmationTarget ConfirmationTarget_output_spending_fee(void); +/* @internal */ +export function ConfirmationTarget_output_spending_fee(): ConfirmationTarget { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ConfirmationTarget_output_spending_fee(); + return nativeResponseValue; } // uint64_t ConfirmationTarget_hash(const enum LDKConfirmationTarget *NONNULL_PTR o); /* @internal */ @@ -28607,7 +31842,7 @@ export function ChainMonitor_get_monitor(this_arg: bigint, funding_txo: bigint): const nativeResponseValue = wasm.TS_ChainMonitor_get_monitor(this_arg, funding_txo); return nativeResponseValue; } - // MUST_USE_RES struct LDKCVec_OutPointZ ChainMonitor_list_monitors(const struct LDKChainMonitor *NONNULL_PTR this_arg); + // MUST_USE_RES struct LDKCVec_C2Tuple_OutPointChannelIdZZ ChainMonitor_list_monitors(const struct LDKChainMonitor *NONNULL_PTR this_arg); /* @internal */ export function ChainMonitor_list_monitors(this_arg: bigint): number { if(!isWasmInitialized) { @@ -28651,6 +31886,24 @@ export function ChainMonitor_rebroadcast_pending_claims(this_arg: bigint): void } const nativeResponseValue = wasm.TS_ChainMonitor_rebroadcast_pending_claims(this_arg); // debug statements here +} + // void ChainMonitor_signer_unblocked(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKOutPoint monitor_opt); +/* @internal */ +export function ChainMonitor_signer_unblocked(this_arg: bigint, monitor_opt: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ChainMonitor_signer_unblocked(this_arg, monitor_opt); + // debug statements here +} + // void ChainMonitor_archive_fully_resolved_channel_monitors(const struct LDKChainMonitor *NONNULL_PTR this_arg); +/* @internal */ +export function ChainMonitor_archive_fully_resolved_channel_monitors(this_arg: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ChainMonitor_archive_fully_resolved_channel_monitors(this_arg); + // debug statements here } // struct LDKListen ChainMonitor_as_Listen(const struct LDKChainMonitor *NONNULL_PTR this_arg); /* @internal */ @@ -28714,6 +31967,24 @@ export function ChannelMonitorUpdate_set_update_id(this_ptr: bigint, val: bigint } const nativeResponseValue = wasm.TS_ChannelMonitorUpdate_set_update_id(this_ptr, val); // debug statements here +} + // struct LDKChannelId ChannelMonitorUpdate_get_channel_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr); +/* @internal */ +export function ChannelMonitorUpdate_get_channel_id(this_ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ChannelMonitorUpdate_get_channel_id(this_ptr); + return nativeResponseValue; +} + // void ChannelMonitorUpdate_set_channel_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, struct LDKChannelId val); +/* @internal */ +export function ChannelMonitorUpdate_set_channel_id(this_ptr: bigint, val: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ChannelMonitorUpdate_set_channel_id(this_ptr, val); + // debug statements here } // uint64_t ChannelMonitorUpdate_clone_ptr(LDKChannelMonitorUpdate *NONNULL_PTR arg); /* @internal */ @@ -28795,6 +32066,15 @@ export function MonitorEvent_htlcevent(a: bigint): bigint { } const nativeResponseValue = wasm.TS_MonitorEvent_htlcevent(a); return nativeResponseValue; +} + // struct LDKMonitorEvent MonitorEvent_holder_force_closed_with_info(struct LDKClosureReason reason, struct LDKOutPoint outpoint, struct LDKChannelId channel_id); +/* @internal */ +export function MonitorEvent_holder_force_closed_with_info(reason: bigint, outpoint: bigint, channel_id: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_MonitorEvent_holder_force_closed_with_info(reason, outpoint, channel_id); + return nativeResponseValue; } // struct LDKMonitorEvent MonitorEvent_holder_force_closed(struct LDKOutPoint a); /* @internal */ @@ -28805,13 +32085,13 @@ export function MonitorEvent_holder_force_closed(a: bigint): bigint { const nativeResponseValue = wasm.TS_MonitorEvent_holder_force_closed(a); return nativeResponseValue; } - // struct LDKMonitorEvent MonitorEvent_completed(struct LDKOutPoint funding_txo, uint64_t monitor_update_id); + // struct LDKMonitorEvent MonitorEvent_completed(struct LDKOutPoint funding_txo, struct LDKChannelId channel_id, uint64_t monitor_update_id); /* @internal */ -export function MonitorEvent_completed(funding_txo: bigint, monitor_update_id: bigint): bigint { +export function MonitorEvent_completed(funding_txo: bigint, channel_id: bigint, monitor_update_id: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_MonitorEvent_completed(funding_txo, monitor_update_id); + const nativeResponseValue = wasm.TS_MonitorEvent_completed(funding_txo, channel_id, monitor_update_id); return nativeResponseValue; } // bool MonitorEvent_eq(const struct LDKMonitorEvent *NONNULL_PTR a, const struct LDKMonitorEvent *NONNULL_PTR b); @@ -29056,6 +32336,15 @@ export function ChannelMonitor_get_funding_txo(this_arg: bigint): bigint { } const nativeResponseValue = wasm.TS_ChannelMonitor_get_funding_txo(this_arg); return nativeResponseValue; +} + // MUST_USE_RES struct LDKChannelId ChannelMonitor_channel_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg); +/* @internal */ +export function ChannelMonitor_channel_id(this_arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ChannelMonitor_channel_id(this_arg); + return nativeResponseValue; } // MUST_USE_RES struct LDKCVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZZ ChannelMonitor_get_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg); /* @internal */ @@ -29129,14 +32418,14 @@ export function ChannelMonitor_get_counterparty_node_id(this_arg: bigint): numbe const nativeResponseValue = wasm.TS_ChannelMonitor_get_counterparty_node_id(this_arg); return nativeResponseValue; } - // MUST_USE_RES struct LDKCVec_TransactionZ ChannelMonitor_get_latest_holder_commitment_txn(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKLogger *NONNULL_PTR logger); + // void ChannelMonitor_broadcast_latest_holder_commitment_txn(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKBroadcasterInterface *NONNULL_PTR broadcaster, const struct LDKFeeEstimator *NONNULL_PTR fee_estimator, const struct LDKLogger *NONNULL_PTR logger); /* @internal */ -export function ChannelMonitor_get_latest_holder_commitment_txn(this_arg: bigint, logger: bigint): number { +export function ChannelMonitor_broadcast_latest_holder_commitment_txn(this_arg: bigint, broadcaster: bigint, fee_estimator: bigint, logger: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_ChannelMonitor_get_latest_holder_commitment_txn(this_arg, logger); - return nativeResponseValue; + const nativeResponseValue = wasm.TS_ChannelMonitor_broadcast_latest_holder_commitment_txn(this_arg, broadcaster, fee_estimator, logger); + // debug statements here } // MUST_USE_RES struct LDKCVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZZ ChannelMonitor_block_connected(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, const struct LDKLogger *NONNULL_PTR logger); /* @internal */ @@ -29209,6 +32498,15 @@ export function ChannelMonitor_rebroadcast_pending_claims(this_arg: bigint, broa } const nativeResponseValue = wasm.TS_ChannelMonitor_rebroadcast_pending_claims(this_arg, broadcaster, fee_estimator, logger); // debug statements here +} + // void ChannelMonitor_signer_unblocked(const struct LDKChannelMonitor *NONNULL_PTR this_arg, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, const struct LDKLogger *NONNULL_PTR logger); +/* @internal */ +export function ChannelMonitor_signer_unblocked(this_arg: bigint, broadcaster: bigint, fee_estimator: bigint, logger: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ChannelMonitor_signer_unblocked(this_arg, broadcaster, fee_estimator, logger); + // debug statements here } // MUST_USE_RES struct LDKCVec_SpendableOutputDescriptorZ ChannelMonitor_get_spendable_outputs(const struct LDKChannelMonitor *NONNULL_PTR this_arg, struct LDKTransaction tx, uint32_t confirmation_height); /* @internal */ @@ -29218,6 +32516,15 @@ export function ChannelMonitor_get_spendable_outputs(this_arg: bigint, tx: numbe } const nativeResponseValue = wasm.TS_ChannelMonitor_get_spendable_outputs(this_arg, tx, confirmation_height); return nativeResponseValue; +} + // MUST_USE_RES bool ChannelMonitor_is_fully_resolved(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKLogger *NONNULL_PTR logger); +/* @internal */ +export function ChannelMonitor_is_fully_resolved(this_arg: bigint, logger: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ChannelMonitor_is_fully_resolved(this_arg, logger); + return nativeResponseValue; } // MUST_USE_RES struct LDKCVec_BalanceZ ChannelMonitor_get_claimable_balances(const struct LDKChannelMonitor *NONNULL_PTR this_arg); /* @internal */ @@ -29326,15 +32633,6 @@ export function OutPoint_hash(o: bigint): bigint { } const nativeResponseValue = wasm.TS_OutPoint_hash(o); return nativeResponseValue; -} - // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg); -/* @internal */ -export function OutPoint_to_channel_id(this_arg: bigint): number { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_OutPoint_to_channel_id(this_arg); - return nativeResponseValue; } // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj); /* @internal */ @@ -29425,6 +32723,42 @@ export function InboundHTLCErr_new(err_code_arg: number, err_data_arg: number, m } const nativeResponseValue = wasm.TS_InboundHTLCErr_new(err_code_arg, err_data_arg, msg_arg); return nativeResponseValue; +} + // uint64_t InboundHTLCErr_clone_ptr(LDKInboundHTLCErr *NONNULL_PTR arg); +/* @internal */ +export function InboundHTLCErr_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InboundHTLCErr_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKInboundHTLCErr InboundHTLCErr_clone(const struct LDKInboundHTLCErr *NONNULL_PTR orig); +/* @internal */ +export function InboundHTLCErr_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InboundHTLCErr_clone(orig); + return nativeResponseValue; +} + // uint64_t InboundHTLCErr_hash(const struct LDKInboundHTLCErr *NONNULL_PTR o); +/* @internal */ +export function InboundHTLCErr_hash(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InboundHTLCErr_hash(o); + return nativeResponseValue; +} + // bool InboundHTLCErr_eq(const struct LDKInboundHTLCErr *NONNULL_PTR a, const struct LDKInboundHTLCErr *NONNULL_PTR b); +/* @internal */ +export function InboundHTLCErr_eq(a: bigint, b: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InboundHTLCErr_eq(a, b); + return nativeResponseValue; } // struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ peel_payment_onion(const struct LDKUpdateAddHTLC *NONNULL_PTR msg, const struct LDKNodeSigner *NONNULL_PTR node_signer, const struct LDKLogger *NONNULL_PTR logger, uint32_t cur_height, bool accept_mpp_keysend, bool allow_skimmed_fees); /* @internal */ @@ -29471,22 +32805,22 @@ export function PendingHTLCRouting_forward(onion_packet: bigint, short_channel_i const nativeResponseValue = wasm.TS_PendingHTLCRouting_forward(onion_packet, short_channel_id, blinded); return nativeResponseValue; } - // struct LDKPendingHTLCRouting PendingHTLCRouting_receive(struct LDKFinalOnionHopData payment_data, struct LDKCOption_CVec_u8ZZ payment_metadata, uint32_t incoming_cltv_expiry, struct LDKThirtyTwoBytes phantom_shared_secret, struct LDKCVec_C2Tuple_u64CVec_u8ZZZ custom_tlvs, bool requires_blinded_error); + // struct LDKPendingHTLCRouting PendingHTLCRouting_receive(struct LDKFinalOnionHopData payment_data, struct LDKCOption_CVec_u8ZZ payment_metadata, struct LDKCOption_PaymentContextZ payment_context, uint32_t incoming_cltv_expiry, struct LDKThirtyTwoBytes phantom_shared_secret, struct LDKCVec_C2Tuple_u64CVec_u8ZZZ custom_tlvs, bool requires_blinded_error); /* @internal */ -export function PendingHTLCRouting_receive(payment_data: bigint, payment_metadata: bigint, incoming_cltv_expiry: number, phantom_shared_secret: number, custom_tlvs: number, requires_blinded_error: boolean): bigint { +export function PendingHTLCRouting_receive(payment_data: bigint, payment_metadata: bigint, payment_context: bigint, incoming_cltv_expiry: number, phantom_shared_secret: number, custom_tlvs: number, requires_blinded_error: boolean): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_PendingHTLCRouting_receive(payment_data, payment_metadata, incoming_cltv_expiry, phantom_shared_secret, custom_tlvs, requires_blinded_error); + const nativeResponseValue = wasm.TS_PendingHTLCRouting_receive(payment_data, payment_metadata, payment_context, incoming_cltv_expiry, phantom_shared_secret, custom_tlvs, requires_blinded_error); return nativeResponseValue; } - // struct LDKPendingHTLCRouting PendingHTLCRouting_receive_keysend(struct LDKFinalOnionHopData payment_data, struct LDKThirtyTwoBytes payment_preimage, struct LDKCOption_CVec_u8ZZ payment_metadata, uint32_t incoming_cltv_expiry, struct LDKCVec_C2Tuple_u64CVec_u8ZZZ custom_tlvs); + // struct LDKPendingHTLCRouting PendingHTLCRouting_receive_keysend(struct LDKFinalOnionHopData payment_data, struct LDKThirtyTwoBytes payment_preimage, struct LDKCOption_CVec_u8ZZ payment_metadata, uint32_t incoming_cltv_expiry, struct LDKCVec_C2Tuple_u64CVec_u8ZZZ custom_tlvs, bool requires_blinded_error); /* @internal */ -export function PendingHTLCRouting_receive_keysend(payment_data: bigint, payment_preimage: number, payment_metadata: bigint, incoming_cltv_expiry: number, custom_tlvs: number): bigint { +export function PendingHTLCRouting_receive_keysend(payment_data: bigint, payment_preimage: number, payment_metadata: bigint, incoming_cltv_expiry: number, custom_tlvs: number, requires_blinded_error: boolean): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_PendingHTLCRouting_receive_keysend(payment_data, payment_preimage, payment_metadata, incoming_cltv_expiry, custom_tlvs); + const nativeResponseValue = wasm.TS_PendingHTLCRouting_receive_keysend(payment_data, payment_preimage, payment_metadata, incoming_cltv_expiry, custom_tlvs, requires_blinded_error); return nativeResponseValue; } // void BlindedForward_free(struct LDKBlindedForward this_obj); @@ -30173,18 +33507,18 @@ export function ChannelDetails_free(this_obj: bigint): void { const nativeResponseValue = wasm.TS_ChannelDetails_free(this_obj); // debug statements here } - // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr); /* @internal */ -export function ChannelDetails_get_channel_id(this_ptr: bigint): number { +export function ChannelDetails_get_channel_id(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_ChannelDetails_get_channel_id(this_ptr); return nativeResponseValue; } - // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKChannelId val); /* @internal */ -export function ChannelDetails_set_channel_id(this_ptr: bigint, val: number): void { +export function ChannelDetails_set_channel_id(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -30658,15 +33992,6 @@ export function ChannelDetails_set_config(this_ptr: bigint, val: bigint): void { } const nativeResponseValue = wasm.TS_ChannelDetails_set_config(this_ptr, val); // debug statements here -} - // MUST_USE_RES struct LDKChannelDetails ChannelDetails_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKChannelCounterparty counterparty_arg, struct LDKOutPoint funding_txo_arg, struct LDKChannelTypeFeatures channel_type_arg, struct LDKCOption_u64Z short_channel_id_arg, struct LDKCOption_u64Z outbound_scid_alias_arg, struct LDKCOption_u64Z inbound_scid_alias_arg, uint64_t channel_value_satoshis_arg, struct LDKCOption_u64Z unspendable_punishment_reserve_arg, struct LDKU128 user_channel_id_arg, struct LDKCOption_u32Z feerate_sat_per_1000_weight_arg, uint64_t balance_msat_arg, uint64_t outbound_capacity_msat_arg, uint64_t next_outbound_htlc_limit_msat_arg, uint64_t next_outbound_htlc_minimum_msat_arg, uint64_t inbound_capacity_msat_arg, struct LDKCOption_u32Z confirmations_required_arg, struct LDKCOption_u32Z confirmations_arg, struct LDKCOption_u16Z force_close_spend_delay_arg, bool is_outbound_arg, bool is_channel_ready_arg, struct LDKCOption_ChannelShutdownStateZ channel_shutdown_state_arg, bool is_usable_arg, bool is_public_arg, struct LDKCOption_u64Z inbound_htlc_minimum_msat_arg, struct LDKCOption_u64Z inbound_htlc_maximum_msat_arg, struct LDKChannelConfig config_arg); -/* @internal */ -export function ChannelDetails_new(channel_id_arg: number, counterparty_arg: bigint, funding_txo_arg: bigint, channel_type_arg: bigint, short_channel_id_arg: bigint, outbound_scid_alias_arg: bigint, inbound_scid_alias_arg: bigint, channel_value_satoshis_arg: bigint, unspendable_punishment_reserve_arg: bigint, user_channel_id_arg: number, feerate_sat_per_1000_weight_arg: bigint, balance_msat_arg: bigint, outbound_capacity_msat_arg: bigint, next_outbound_htlc_limit_msat_arg: bigint, next_outbound_htlc_minimum_msat_arg: bigint, inbound_capacity_msat_arg: bigint, confirmations_required_arg: bigint, confirmations_arg: bigint, force_close_spend_delay_arg: bigint, is_outbound_arg: boolean, is_channel_ready_arg: boolean, channel_shutdown_state_arg: bigint, is_usable_arg: boolean, is_public_arg: boolean, inbound_htlc_minimum_msat_arg: bigint, inbound_htlc_maximum_msat_arg: bigint, config_arg: bigint): bigint { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_ChannelDetails_new(channel_id_arg, counterparty_arg, funding_txo_arg, channel_type_arg, short_channel_id_arg, outbound_scid_alias_arg, inbound_scid_alias_arg, channel_value_satoshis_arg, unspendable_punishment_reserve_arg, user_channel_id_arg, feerate_sat_per_1000_weight_arg, balance_msat_arg, outbound_capacity_msat_arg, next_outbound_htlc_limit_msat_arg, next_outbound_htlc_minimum_msat_arg, inbound_capacity_msat_arg, confirmations_required_arg, confirmations_arg, force_close_spend_delay_arg, is_outbound_arg, is_channel_ready_arg, channel_shutdown_state_arg, is_usable_arg, is_public_arg, inbound_htlc_minimum_msat_arg, inbound_htlc_maximum_msat_arg, config_arg); - return nativeResponseValue; } // uint64_t ChannelDetails_clone_ptr(LDKChannelDetails *NONNULL_PTR arg); /* @internal */ @@ -30938,7 +34263,7 @@ export function ChannelManager_get_current_default_configuration(this_arg: bigin const nativeResponseValue = wasm.TS_ChannelManager_get_current_default_configuration(this_arg); return nativeResponseValue; } - // MUST_USE_RES struct LDKCResult_ThirtyTwoBytesAPIErrorZ ChannelManager_create_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey their_network_key, uint64_t channel_value_satoshis, uint64_t push_msat, struct LDKU128 user_channel_id, struct LDKCOption_ThirtyTwoBytesZ temporary_channel_id, struct LDKUserConfig override_config); + // MUST_USE_RES struct LDKCResult_ChannelIdAPIErrorZ ChannelManager_create_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey their_network_key, uint64_t channel_value_satoshis, uint64_t push_msat, struct LDKU128 user_channel_id, struct LDKChannelId temporary_channel_id, struct LDKUserConfig override_config); /* @internal */ export function ChannelManager_create_channel(this_arg: bigint, their_network_key: number, channel_value_satoshis: bigint, push_msat: bigint, user_channel_id: number, temporary_channel_id: bigint, override_config: bigint): bigint { if(!isWasmInitialized) { @@ -30983,36 +34308,36 @@ export function ChannelManager_list_recent_payments(this_arg: bigint): number { const nativeResponseValue = wasm.TS_ChannelManager_list_recent_payments(this_arg); return nativeResponseValue; } - // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32], struct LDKPublicKey counterparty_node_id); + // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR channel_id, struct LDKPublicKey counterparty_node_id); /* @internal */ -export function ChannelManager_close_channel(this_arg: bigint, channel_id: number, counterparty_node_id: number): bigint { +export function ChannelManager_close_channel(this_arg: bigint, channel_id: bigint, counterparty_node_id: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_ChannelManager_close_channel(this_arg, channel_id, counterparty_node_id); return nativeResponseValue; } - // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel_with_feerate_and_script(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32], struct LDKPublicKey counterparty_node_id, struct LDKCOption_u32Z target_feerate_sats_per_1000_weight, struct LDKShutdownScript shutdown_script); + // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel_with_feerate_and_script(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR channel_id, struct LDKPublicKey counterparty_node_id, struct LDKCOption_u32Z target_feerate_sats_per_1000_weight, struct LDKShutdownScript shutdown_script); /* @internal */ -export function ChannelManager_close_channel_with_feerate_and_script(this_arg: bigint, channel_id: number, counterparty_node_id: number, target_feerate_sats_per_1000_weight: bigint, shutdown_script: bigint): bigint { +export function ChannelManager_close_channel_with_feerate_and_script(this_arg: bigint, channel_id: bigint, counterparty_node_id: number, target_feerate_sats_per_1000_weight: bigint, shutdown_script: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_ChannelManager_close_channel_with_feerate_and_script(this_arg, channel_id, counterparty_node_id, target_feerate_sats_per_1000_weight, shutdown_script); return nativeResponseValue; } - // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_broadcasting_latest_txn(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32], struct LDKPublicKey counterparty_node_id); + // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_broadcasting_latest_txn(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR channel_id, struct LDKPublicKey counterparty_node_id); /* @internal */ -export function ChannelManager_force_close_broadcasting_latest_txn(this_arg: bigint, channel_id: number, counterparty_node_id: number): bigint { +export function ChannelManager_force_close_broadcasting_latest_txn(this_arg: bigint, channel_id: bigint, counterparty_node_id: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_ChannelManager_force_close_broadcasting_latest_txn(this_arg, channel_id, counterparty_node_id); return nativeResponseValue; } - // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_without_broadcasting_txn(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32], struct LDKPublicKey counterparty_node_id); + // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_without_broadcasting_txn(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR channel_id, struct LDKPublicKey counterparty_node_id); /* @internal */ -export function ChannelManager_force_close_without_broadcasting_txn(this_arg: bigint, channel_id: number, counterparty_node_id: number): bigint { +export function ChannelManager_force_close_without_broadcasting_txn(this_arg: bigint, channel_id: bigint, counterparty_node_id: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -31109,16 +34434,16 @@ export function ChannelManager_send_preflight_probes(this_arg: bigint, route_par const nativeResponseValue = wasm.TS_ChannelManager_send_preflight_probes(this_arg, route_params, liquidity_limit_multiplier); return nativeResponseValue; } - // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*temporary_channel_id)[32], struct LDKPublicKey counterparty_node_id, struct LDKTransaction funding_transaction); + // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR temporary_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKTransaction funding_transaction); /* @internal */ -export function ChannelManager_funding_transaction_generated(this_arg: bigint, temporary_channel_id: number, counterparty_node_id: number, funding_transaction: number): bigint { +export function ChannelManager_funding_transaction_generated(this_arg: bigint, temporary_channel_id: bigint, counterparty_node_id: number, funding_transaction: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_ChannelManager_funding_transaction_generated(this_arg, temporary_channel_id, counterparty_node_id, funding_transaction); return nativeResponseValue; } - // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_batch_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ temporary_channels, struct LDKTransaction funding_transaction); + // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_batch_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_ChannelIdPublicKeyZZ temporary_channels, struct LDKTransaction funding_transaction); /* @internal */ export function ChannelManager_batch_funding_transaction_generated(this_arg: bigint, temporary_channels: number, funding_transaction: number): bigint { if(!isWasmInitialized) { @@ -31127,7 +34452,7 @@ export function ChannelManager_batch_funding_transaction_generated(this_arg: big const nativeResponseValue = wasm.TS_ChannelManager_batch_funding_transaction_generated(this_arg, temporary_channels, funding_transaction); return nativeResponseValue; } - // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_update_partial_channel_config(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey counterparty_node_id, struct LDKCVec_ThirtyTwoBytesZ channel_ids, const struct LDKChannelConfigUpdate *NONNULL_PTR config_update); + // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_update_partial_channel_config(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey counterparty_node_id, struct LDKCVec_ChannelIdZ channel_ids, const struct LDKChannelConfigUpdate *NONNULL_PTR config_update); /* @internal */ export function ChannelManager_update_partial_channel_config(this_arg: bigint, counterparty_node_id: number, channel_ids: number, config_update: bigint): bigint { if(!isWasmInitialized) { @@ -31136,7 +34461,7 @@ export function ChannelManager_update_partial_channel_config(this_arg: bigint, c const nativeResponseValue = wasm.TS_ChannelManager_update_partial_channel_config(this_arg, counterparty_node_id, channel_ids, config_update); return nativeResponseValue; } - // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_update_channel_config(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey counterparty_node_id, struct LDKCVec_ThirtyTwoBytesZ channel_ids, const struct LDKChannelConfig *NONNULL_PTR config); + // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_update_channel_config(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey counterparty_node_id, struct LDKCVec_ChannelIdZ channel_ids, const struct LDKChannelConfig *NONNULL_PTR config); /* @internal */ export function ChannelManager_update_channel_config(this_arg: bigint, counterparty_node_id: number, channel_ids: number, config: bigint): bigint { if(!isWasmInitialized) { @@ -31145,9 +34470,9 @@ export function ChannelManager_update_channel_config(this_arg: bigint, counterpa const nativeResponseValue = wasm.TS_ChannelManager_update_channel_config(this_arg, counterparty_node_id, channel_ids, config); return nativeResponseValue; } - // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_forward_intercepted_htlc(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes intercept_id, const uint8_t (*next_hop_channel_id)[32], struct LDKPublicKey next_node_id, uint64_t amt_to_forward_msat); + // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_forward_intercepted_htlc(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes intercept_id, const struct LDKChannelId *NONNULL_PTR next_hop_channel_id, struct LDKPublicKey next_node_id, uint64_t amt_to_forward_msat); /* @internal */ -export function ChannelManager_forward_intercepted_htlc(this_arg: bigint, intercept_id: number, next_hop_channel_id: number, next_node_id: number, amt_to_forward_msat: bigint): bigint { +export function ChannelManager_forward_intercepted_htlc(this_arg: bigint, intercept_id: number, next_hop_channel_id: bigint, next_node_id: number, amt_to_forward_msat: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -31226,23 +34551,41 @@ export function ChannelManager_get_our_node_id(this_arg: bigint): number { const nativeResponseValue = wasm.TS_ChannelManager_get_our_node_id(this_arg); return nativeResponseValue; } - // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_accept_inbound_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*temporary_channel_id)[32], struct LDKPublicKey counterparty_node_id, struct LDKU128 user_channel_id); + // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_accept_inbound_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR temporary_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKU128 user_channel_id); /* @internal */ -export function ChannelManager_accept_inbound_channel(this_arg: bigint, temporary_channel_id: number, counterparty_node_id: number, user_channel_id: number): bigint { +export function ChannelManager_accept_inbound_channel(this_arg: bigint, temporary_channel_id: bigint, counterparty_node_id: number, user_channel_id: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_ChannelManager_accept_inbound_channel(this_arg, temporary_channel_id, counterparty_node_id, user_channel_id); return nativeResponseValue; } - // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*temporary_channel_id)[32], struct LDKPublicKey counterparty_node_id, struct LDKU128 user_channel_id); + // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR temporary_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKU128 user_channel_id); /* @internal */ -export function ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(this_arg: bigint, temporary_channel_id: number, counterparty_node_id: number, user_channel_id: number): bigint { +export function ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(this_arg: bigint, temporary_channel_id: bigint, counterparty_node_id: number, user_channel_id: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(this_arg, temporary_channel_id, counterparty_node_id, user_channel_id); return nativeResponseValue; +} + // MUST_USE_RES struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ ChannelManager_create_offer_builder(const struct LDKChannelManager *NONNULL_PTR this_arg); +/* @internal */ +export function ChannelManager_create_offer_builder(this_arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ChannelManager_create_offer_builder(this_arg); + return nativeResponseValue; +} + // MUST_USE_RES struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ ChannelManager_create_refund_builder(const struct LDKChannelManager *NONNULL_PTR this_arg, uint64_t amount_msats, uint64_t absolute_expiry, struct LDKThirtyTwoBytes payment_id, struct LDKRetry retry_strategy, struct LDKCOption_u64Z max_total_routing_fee_msat); +/* @internal */ +export function ChannelManager_create_refund_builder(this_arg: bigint, amount_msats: bigint, absolute_expiry: bigint, payment_id: number, retry_strategy: bigint, max_total_routing_fee_msat: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ChannelManager_create_refund_builder(this_arg, amount_msats, absolute_expiry, payment_id, retry_strategy, max_total_routing_fee_msat); + return nativeResponseValue; } // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ ChannelManager_pay_for_offer(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKOffer *NONNULL_PTR offer, struct LDKCOption_u64Z quantity, struct LDKCOption_u64Z amount_msats, struct LDKCOption_StrZ payer_note, struct LDKThirtyTwoBytes payment_id, struct LDKRetry retry_strategy, struct LDKCOption_u64Z max_total_routing_fee_msat); /* @internal */ @@ -31253,7 +34596,7 @@ export function ChannelManager_pay_for_offer(this_arg: bigint, offer: bigint, qu const nativeResponseValue = wasm.TS_ChannelManager_pay_for_offer(this_arg, offer, quantity, amount_msats, payer_note, payment_id, retry_strategy, max_total_routing_fee_msat); return nativeResponseValue; } - // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ ChannelManager_request_refund_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRefund *NONNULL_PTR refund); + // MUST_USE_RES struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ ChannelManager_request_refund_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRefund *NONNULL_PTR refund); /* @internal */ export function ChannelManager_request_refund_payment(this_arg: bigint, refund: bigint): bigint { if(!isWasmInitialized) { @@ -31441,6 +34784,15 @@ export function ChannelManager_as_OffersMessageHandler(this_arg: bigint): bigint } const nativeResponseValue = wasm.TS_ChannelManager_as_OffersMessageHandler(this_arg); return nativeResponseValue; +} + // struct LDKNodeIdLookUp ChannelManager_as_NodeIdLookUp(const struct LDKChannelManager *NONNULL_PTR this_arg); +/* @internal */ +export function ChannelManager_as_NodeIdLookUp(this_arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ChannelManager_as_NodeIdLookUp(this_arg); + return nativeResponseValue; } // struct LDKInitFeatures provided_init_features(const struct LDKUserConfig *NONNULL_PTR config); /* @internal */ @@ -31891,6 +35243,15 @@ export function DelayedPaymentBasepoint_to_public_key(this_arg: bigint): number } const nativeResponseValue = wasm.TS_DelayedPaymentBasepoint_to_public_key(this_arg); return nativeResponseValue; +} + // MUST_USE_RES struct LDKThirtyTwoBytes DelayedPaymentBasepoint_derive_add_tweak(const struct LDKDelayedPaymentBasepoint *NONNULL_PTR this_arg, struct LDKPublicKey per_commitment_point); +/* @internal */ +export function DelayedPaymentBasepoint_derive_add_tweak(this_arg: bigint, per_commitment_point: number): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_DelayedPaymentBasepoint_derive_add_tweak(this_arg, per_commitment_point); + return nativeResponseValue; } // struct LDKCVec_u8Z DelayedPaymentBasepoint_write(const struct LDKDelayedPaymentBasepoint *NONNULL_PTR obj); /* @internal */ @@ -32098,6 +35459,15 @@ export function HtlcBasepoint_to_public_key(this_arg: bigint): number { } const nativeResponseValue = wasm.TS_HtlcBasepoint_to_public_key(this_arg); return nativeResponseValue; +} + // MUST_USE_RES struct LDKThirtyTwoBytes HtlcBasepoint_derive_add_tweak(const struct LDKHtlcBasepoint *NONNULL_PTR this_arg, struct LDKPublicKey per_commitment_point); +/* @internal */ +export function HtlcBasepoint_derive_add_tweak(this_arg: bigint, per_commitment_point: number): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_HtlcBasepoint_derive_add_tweak(this_arg, per_commitment_point); + return nativeResponseValue; } // struct LDKCVec_u8Z HtlcBasepoint_write(const struct LDKHtlcBasepoint *NONNULL_PTR obj); /* @internal */ @@ -32224,6 +35594,15 @@ export function HtlcKey_read(ser: number): bigint { } const nativeResponseValue = wasm.TS_HtlcKey_read(ser); return nativeResponseValue; +} + // struct LDKPublicKey add_public_key_tweak(struct LDKPublicKey base_point, const uint8_t (*tweak)[32]); +/* @internal */ +export function add_public_key_tweak(base_point: number, tweak: number): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_add_public_key_tweak(base_point, tweak); + return nativeResponseValue; } // void RevocationBasepoint_free(struct LDKRevocationBasepoint this_obj); /* @internal */ @@ -32557,6 +35936,15 @@ export function DecodeError_unsupported_compression(): bigint { } const nativeResponseValue = wasm.TS_DecodeError_unsupported_compression(); return nativeResponseValue; +} + // struct LDKDecodeError DecodeError_dangerous_value(void); +/* @internal */ +export function DecodeError_dangerous_value(): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_DecodeError_dangerous_value(); + return nativeResponseValue; } // uint64_t DecodeError_hash(const struct LDKDecodeError *NONNULL_PTR o); /* @internal */ @@ -32693,18 +36081,18 @@ export function ErrorMessage_free(this_obj: bigint): void { const nativeResponseValue = wasm.TS_ErrorMessage_free(this_obj); // debug statements here } - // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr); /* @internal */ -export function ErrorMessage_get_channel_id(this_ptr: bigint): number { +export function ErrorMessage_get_channel_id(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_ErrorMessage_get_channel_id(this_ptr); return nativeResponseValue; } - // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKChannelId val); /* @internal */ -export function ErrorMessage_set_channel_id(this_ptr: bigint, val: number): void { +export function ErrorMessage_set_channel_id(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -32729,9 +36117,9 @@ export function ErrorMessage_set_data(this_ptr: bigint, val: number): void { const nativeResponseValue = wasm.TS_ErrorMessage_set_data(this_ptr, val); // debug statements here } - // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKStr data_arg); + // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKChannelId channel_id_arg, struct LDKStr data_arg); /* @internal */ -export function ErrorMessage_new(channel_id_arg: number, data_arg: number): bigint { +export function ErrorMessage_new(channel_id_arg: bigint, data_arg: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -32783,18 +36171,18 @@ export function WarningMessage_free(this_obj: bigint): void { const nativeResponseValue = wasm.TS_WarningMessage_free(this_obj); // debug statements here } - // const uint8_t (*WarningMessage_get_channel_id(const struct LDKWarningMessage *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId WarningMessage_get_channel_id(const struct LDKWarningMessage *NONNULL_PTR this_ptr); /* @internal */ -export function WarningMessage_get_channel_id(this_ptr: bigint): number { +export function WarningMessage_get_channel_id(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_WarningMessage_get_channel_id(this_ptr); return nativeResponseValue; } - // void WarningMessage_set_channel_id(struct LDKWarningMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void WarningMessage_set_channel_id(struct LDKWarningMessage *NONNULL_PTR this_ptr, struct LDKChannelId val); /* @internal */ -export function WarningMessage_set_channel_id(this_ptr: bigint, val: number): void { +export function WarningMessage_set_channel_id(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -32819,9 +36207,9 @@ export function WarningMessage_set_data(this_ptr: bigint, val: number): void { const nativeResponseValue = wasm.TS_WarningMessage_set_data(this_ptr, val); // debug statements here } - // MUST_USE_RES struct LDKWarningMessage WarningMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKStr data_arg); + // MUST_USE_RES struct LDKWarningMessage WarningMessage_new(struct LDKChannelId channel_id_arg, struct LDKStr data_arg); /* @internal */ -export function WarningMessage_new(channel_id_arg: number, data_arg: number): bigint { +export function WarningMessage_new(channel_id_arg: bigint, data_arg: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -33026,805 +36414,571 @@ export function Pong_eq(a: bigint, b: bigint): boolean { const nativeResponseValue = wasm.TS_Pong_eq(a, b); return nativeResponseValue; } - // void OpenChannel_free(struct LDKOpenChannel this_obj); -/* @internal */ -export function OpenChannel_free(this_obj: bigint): void { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_OpenChannel_free(this_obj); - // debug statements here -} - // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32]; -/* @internal */ -export function OpenChannel_get_chain_hash(this_ptr: bigint): number { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_OpenChannel_get_chain_hash(this_ptr); - return nativeResponseValue; -} - // void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); -/* @internal */ -export function OpenChannel_set_chain_hash(this_ptr: bigint, val: number): void { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_OpenChannel_set_chain_hash(this_ptr, val); - // debug statements here -} - // const uint8_t (*OpenChannel_get_temporary_channel_id(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32]; -/* @internal */ -export function OpenChannel_get_temporary_channel_id(this_ptr: bigint): number { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_OpenChannel_get_temporary_channel_id(this_ptr); - return nativeResponseValue; -} - // void OpenChannel_set_temporary_channel_id(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); -/* @internal */ -export function OpenChannel_set_temporary_channel_id(this_ptr: bigint, val: number): void { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_OpenChannel_set_temporary_channel_id(this_ptr, val); - // debug statements here -} - // uint64_t OpenChannel_get_funding_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr); -/* @internal */ -export function OpenChannel_get_funding_satoshis(this_ptr: bigint): bigint { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_OpenChannel_get_funding_satoshis(this_ptr); - return nativeResponseValue; -} - // void OpenChannel_set_funding_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val); -/* @internal */ -export function OpenChannel_set_funding_satoshis(this_ptr: bigint, val: bigint): void { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_OpenChannel_set_funding_satoshis(this_ptr, val); - // debug statements here -} - // uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr); -/* @internal */ -export function OpenChannel_get_push_msat(this_ptr: bigint): bigint { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_OpenChannel_get_push_msat(this_ptr); - return nativeResponseValue; -} - // void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val); -/* @internal */ -export function OpenChannel_set_push_msat(this_ptr: bigint, val: bigint): void { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_OpenChannel_set_push_msat(this_ptr, val); - // debug statements here -} - // uint64_t OpenChannel_get_dust_limit_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr); -/* @internal */ -export function OpenChannel_get_dust_limit_satoshis(this_ptr: bigint): bigint { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_OpenChannel_get_dust_limit_satoshis(this_ptr); - return nativeResponseValue; -} - // void OpenChannel_set_dust_limit_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val); -/* @internal */ -export function OpenChannel_set_dust_limit_satoshis(this_ptr: bigint, val: bigint): void { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_OpenChannel_set_dust_limit_satoshis(this_ptr, val); - // debug statements here -} - // uint64_t OpenChannel_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr); -/* @internal */ -export function OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr: bigint): bigint { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr); - return nativeResponseValue; -} - // void OpenChannel_set_max_htlc_value_in_flight_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val); -/* @internal */ -export function OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr: bigint, val: bigint): void { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr, val); - // debug statements here -} - // uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr); -/* @internal */ -export function OpenChannel_get_channel_reserve_satoshis(this_ptr: bigint): bigint { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_OpenChannel_get_channel_reserve_satoshis(this_ptr); - return nativeResponseValue; -} - // void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val); -/* @internal */ -export function OpenChannel_set_channel_reserve_satoshis(this_ptr: bigint, val: bigint): void { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_OpenChannel_set_channel_reserve_satoshis(this_ptr, val); - // debug statements here -} - // uint64_t OpenChannel_get_htlc_minimum_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr); -/* @internal */ -export function OpenChannel_get_htlc_minimum_msat(this_ptr: bigint): bigint { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_OpenChannel_get_htlc_minimum_msat(this_ptr); - return nativeResponseValue; -} - // void OpenChannel_set_htlc_minimum_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val); -/* @internal */ -export function OpenChannel_set_htlc_minimum_msat(this_ptr: bigint, val: bigint): void { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_OpenChannel_set_htlc_minimum_msat(this_ptr, val); - // debug statements here -} - // uint32_t OpenChannel_get_feerate_per_kw(const struct LDKOpenChannel *NONNULL_PTR this_ptr); -/* @internal */ -export function OpenChannel_get_feerate_per_kw(this_ptr: bigint): number { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_OpenChannel_get_feerate_per_kw(this_ptr); - return nativeResponseValue; -} - // void OpenChannel_set_feerate_per_kw(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint32_t val); -/* @internal */ -export function OpenChannel_set_feerate_per_kw(this_ptr: bigint, val: number): void { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_OpenChannel_set_feerate_per_kw(this_ptr, val); - // debug statements here -} - // uint16_t OpenChannel_get_to_self_delay(const struct LDKOpenChannel *NONNULL_PTR this_ptr); -/* @internal */ -export function OpenChannel_get_to_self_delay(this_ptr: bigint): number { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_OpenChannel_get_to_self_delay(this_ptr); - return nativeResponseValue; -} - // void OpenChannel_set_to_self_delay(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val); -/* @internal */ -export function OpenChannel_set_to_self_delay(this_ptr: bigint, val: number): void { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_OpenChannel_set_to_self_delay(this_ptr, val); - // debug statements here -} - // uint16_t OpenChannel_get_max_accepted_htlcs(const struct LDKOpenChannel *NONNULL_PTR this_ptr); -/* @internal */ -export function OpenChannel_get_max_accepted_htlcs(this_ptr: bigint): number { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_OpenChannel_get_max_accepted_htlcs(this_ptr); - return nativeResponseValue; -} - // void OpenChannel_set_max_accepted_htlcs(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val); -/* @internal */ -export function OpenChannel_set_max_accepted_htlcs(this_ptr: bigint, val: number): void { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_OpenChannel_set_max_accepted_htlcs(this_ptr, val); - // debug statements here -} - // struct LDKPublicKey OpenChannel_get_funding_pubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr); -/* @internal */ -export function OpenChannel_get_funding_pubkey(this_ptr: bigint): number { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_OpenChannel_get_funding_pubkey(this_ptr); - return nativeResponseValue; -} - // void OpenChannel_set_funding_pubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); -/* @internal */ -export function OpenChannel_set_funding_pubkey(this_ptr: bigint, val: number): void { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_OpenChannel_set_funding_pubkey(this_ptr, val); - // debug statements here -} - // struct LDKPublicKey OpenChannel_get_revocation_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr); -/* @internal */ -export function OpenChannel_get_revocation_basepoint(this_ptr: bigint): number { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_OpenChannel_get_revocation_basepoint(this_ptr); - return nativeResponseValue; -} - // void OpenChannel_set_revocation_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); -/* @internal */ -export function OpenChannel_set_revocation_basepoint(this_ptr: bigint, val: number): void { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_OpenChannel_set_revocation_basepoint(this_ptr, val); - // debug statements here -} - // struct LDKPublicKey OpenChannel_get_payment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr); -/* @internal */ -export function OpenChannel_get_payment_point(this_ptr: bigint): number { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_OpenChannel_get_payment_point(this_ptr); - return nativeResponseValue; -} - // void OpenChannel_set_payment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); + // void CommonOpenChannelFields_free(struct LDKCommonOpenChannelFields this_obj); /* @internal */ -export function OpenChannel_set_payment_point(this_ptr: bigint, val: number): void { +export function CommonOpenChannelFields_free(this_obj: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannel_set_payment_point(this_ptr, val); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_free(this_obj); // debug statements here } - // struct LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr); + // const uint8_t (*CommonOpenChannelFields_get_chain_hash(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr))[32]; /* @internal */ -export function OpenChannel_get_delayed_payment_basepoint(this_ptr: bigint): number { +export function CommonOpenChannelFields_get_chain_hash(this_ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannel_get_delayed_payment_basepoint(this_ptr); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_get_chain_hash(this_ptr); return nativeResponseValue; } - // void OpenChannel_set_delayed_payment_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); + // void CommonOpenChannelFields_set_chain_hash(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); /* @internal */ -export function OpenChannel_set_delayed_payment_basepoint(this_ptr: bigint, val: number): void { +export function CommonOpenChannelFields_set_chain_hash(this_ptr: bigint, val: number): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannel_set_delayed_payment_basepoint(this_ptr, val); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_set_chain_hash(this_ptr, val); // debug statements here } - // struct LDKPublicKey OpenChannel_get_htlc_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr); + // struct LDKChannelId CommonOpenChannelFields_get_temporary_channel_id(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); /* @internal */ -export function OpenChannel_get_htlc_basepoint(this_ptr: bigint): number { +export function CommonOpenChannelFields_get_temporary_channel_id(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannel_get_htlc_basepoint(this_ptr); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_get_temporary_channel_id(this_ptr); return nativeResponseValue; } - // void OpenChannel_set_htlc_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); + // void CommonOpenChannelFields_set_temporary_channel_id(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKChannelId val); /* @internal */ -export function OpenChannel_set_htlc_basepoint(this_ptr: bigint, val: number): void { +export function CommonOpenChannelFields_set_temporary_channel_id(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannel_set_htlc_basepoint(this_ptr, val); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_set_temporary_channel_id(this_ptr, val); // debug statements here } - // struct LDKPublicKey OpenChannel_get_first_per_commitment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr); + // uint64_t CommonOpenChannelFields_get_funding_satoshis(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); /* @internal */ -export function OpenChannel_get_first_per_commitment_point(this_ptr: bigint): number { +export function CommonOpenChannelFields_get_funding_satoshis(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannel_get_first_per_commitment_point(this_ptr); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_get_funding_satoshis(this_ptr); return nativeResponseValue; } - // void OpenChannel_set_first_per_commitment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); + // void CommonOpenChannelFields_set_funding_satoshis(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint64_t val); /* @internal */ -export function OpenChannel_set_first_per_commitment_point(this_ptr: bigint, val: number): void { +export function CommonOpenChannelFields_set_funding_satoshis(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannel_set_first_per_commitment_point(this_ptr, val); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_set_funding_satoshis(this_ptr, val); // debug statements here } - // uint8_t OpenChannel_get_channel_flags(const struct LDKOpenChannel *NONNULL_PTR this_ptr); + // uint64_t CommonOpenChannelFields_get_dust_limit_satoshis(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); /* @internal */ -export function OpenChannel_get_channel_flags(this_ptr: bigint): number { +export function CommonOpenChannelFields_get_dust_limit_satoshis(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannel_get_channel_flags(this_ptr); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_get_dust_limit_satoshis(this_ptr); return nativeResponseValue; } - // void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val); + // void CommonOpenChannelFields_set_dust_limit_satoshis(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint64_t val); /* @internal */ -export function OpenChannel_set_channel_flags(this_ptr: bigint, val: number): void { +export function CommonOpenChannelFields_set_dust_limit_satoshis(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannel_set_channel_flags(this_ptr, val); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_set_dust_limit_satoshis(this_ptr, val); // debug statements here } - // struct LDKCOption_CVec_u8ZZ OpenChannel_get_shutdown_scriptpubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr); + // uint64_t CommonOpenChannelFields_get_max_htlc_value_in_flight_msat(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); /* @internal */ -export function OpenChannel_get_shutdown_scriptpubkey(this_ptr: bigint): bigint { +export function CommonOpenChannelFields_get_max_htlc_value_in_flight_msat(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannel_get_shutdown_scriptpubkey(this_ptr); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_get_max_htlc_value_in_flight_msat(this_ptr); return nativeResponseValue; } - // void OpenChannel_set_shutdown_scriptpubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val); + // void CommonOpenChannelFields_set_max_htlc_value_in_flight_msat(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint64_t val); /* @internal */ -export function OpenChannel_set_shutdown_scriptpubkey(this_ptr: bigint, val: bigint): void { +export function CommonOpenChannelFields_set_max_htlc_value_in_flight_msat(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannel_set_shutdown_scriptpubkey(this_ptr, val); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_set_max_htlc_value_in_flight_msat(this_ptr, val); // debug statements here } - // struct LDKChannelTypeFeatures OpenChannel_get_channel_type(const struct LDKOpenChannel *NONNULL_PTR this_ptr); + // uint64_t CommonOpenChannelFields_get_htlc_minimum_msat(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); /* @internal */ -export function OpenChannel_get_channel_type(this_ptr: bigint): bigint { +export function CommonOpenChannelFields_get_htlc_minimum_msat(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannel_get_channel_type(this_ptr); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_get_htlc_minimum_msat(this_ptr); return nativeResponseValue; } - // void OpenChannel_set_channel_type(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val); + // void CommonOpenChannelFields_set_htlc_minimum_msat(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint64_t val); /* @internal */ -export function OpenChannel_set_channel_type(this_ptr: bigint, val: bigint): void { +export function CommonOpenChannelFields_set_htlc_minimum_msat(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannel_set_channel_type(this_ptr, val); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_set_htlc_minimum_msat(this_ptr, val); // debug statements here } - // MUST_USE_RES struct LDKOpenChannel OpenChannel_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKThirtyTwoBytes temporary_channel_id_arg, uint64_t funding_satoshis_arg, uint64_t push_msat_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t channel_reserve_satoshis_arg, uint64_t htlc_minimum_msat_arg, uint32_t feerate_per_kw_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_point_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, uint8_t channel_flags_arg, struct LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg); + // uint32_t CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); /* @internal */ -export function OpenChannel_new(chain_hash_arg: number, temporary_channel_id_arg: number, funding_satoshis_arg: bigint, push_msat_arg: bigint, dust_limit_satoshis_arg: bigint, max_htlc_value_in_flight_msat_arg: bigint, channel_reserve_satoshis_arg: bigint, htlc_minimum_msat_arg: bigint, feerate_per_kw_arg: number, to_self_delay_arg: number, max_accepted_htlcs_arg: number, funding_pubkey_arg: number, revocation_basepoint_arg: number, payment_point_arg: number, delayed_payment_basepoint_arg: number, htlc_basepoint_arg: number, first_per_commitment_point_arg: number, channel_flags_arg: number, shutdown_scriptpubkey_arg: bigint, channel_type_arg: bigint): bigint { +export function CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight(this_ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannel_new(chain_hash_arg, temporary_channel_id_arg, funding_satoshis_arg, push_msat_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, feerate_per_kw_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg, revocation_basepoint_arg, payment_point_arg, delayed_payment_basepoint_arg, htlc_basepoint_arg, first_per_commitment_point_arg, channel_flags_arg, shutdown_scriptpubkey_arg, channel_type_arg); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight(this_ptr); return nativeResponseValue; } - // uint64_t OpenChannel_clone_ptr(LDKOpenChannel *NONNULL_PTR arg); + // void CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint32_t val); /* @internal */ -export function OpenChannel_clone_ptr(arg: bigint): bigint { +export function CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight(this_ptr: bigint, val: number): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannel_clone_ptr(arg); - return nativeResponseValue; + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight(this_ptr, val); + // debug statements here } - // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig); + // uint16_t CommonOpenChannelFields_get_to_self_delay(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); /* @internal */ -export function OpenChannel_clone(orig: bigint): bigint { +export function CommonOpenChannelFields_get_to_self_delay(this_ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannel_clone(orig); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_get_to_self_delay(this_ptr); return nativeResponseValue; } - // uint64_t OpenChannel_hash(const struct LDKOpenChannel *NONNULL_PTR o); + // void CommonOpenChannelFields_set_to_self_delay(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint16_t val); /* @internal */ -export function OpenChannel_hash(o: bigint): bigint { +export function CommonOpenChannelFields_set_to_self_delay(this_ptr: bigint, val: number): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannel_hash(o); - return nativeResponseValue; + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_set_to_self_delay(this_ptr, val); + // debug statements here } - // bool OpenChannel_eq(const struct LDKOpenChannel *NONNULL_PTR a, const struct LDKOpenChannel *NONNULL_PTR b); + // uint16_t CommonOpenChannelFields_get_max_accepted_htlcs(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); /* @internal */ -export function OpenChannel_eq(a: bigint, b: bigint): boolean { +export function CommonOpenChannelFields_get_max_accepted_htlcs(this_ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannel_eq(a, b); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_get_max_accepted_htlcs(this_ptr); return nativeResponseValue; } - // void OpenChannelV2_free(struct LDKOpenChannelV2 this_obj); + // void CommonOpenChannelFields_set_max_accepted_htlcs(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint16_t val); /* @internal */ -export function OpenChannelV2_free(this_obj: bigint): void { +export function CommonOpenChannelFields_set_max_accepted_htlcs(this_ptr: bigint, val: number): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_free(this_obj); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_set_max_accepted_htlcs(this_ptr, val); // debug statements here } - // const uint8_t (*OpenChannelV2_get_chain_hash(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr))[32]; + // struct LDKPublicKey CommonOpenChannelFields_get_funding_pubkey(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); /* @internal */ -export function OpenChannelV2_get_chain_hash(this_ptr: bigint): number { +export function CommonOpenChannelFields_get_funding_pubkey(this_ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_get_chain_hash(this_ptr); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_get_funding_pubkey(this_ptr); return nativeResponseValue; } - // void OpenChannelV2_set_chain_hash(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void CommonOpenChannelFields_set_funding_pubkey(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); /* @internal */ -export function OpenChannelV2_set_chain_hash(this_ptr: bigint, val: number): void { +export function CommonOpenChannelFields_set_funding_pubkey(this_ptr: bigint, val: number): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_set_chain_hash(this_ptr, val); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_set_funding_pubkey(this_ptr, val); // debug statements here } - // const uint8_t (*OpenChannelV2_get_temporary_channel_id(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr))[32]; + // struct LDKPublicKey CommonOpenChannelFields_get_revocation_basepoint(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); /* @internal */ -export function OpenChannelV2_get_temporary_channel_id(this_ptr: bigint): number { +export function CommonOpenChannelFields_get_revocation_basepoint(this_ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_get_temporary_channel_id(this_ptr); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_get_revocation_basepoint(this_ptr); return nativeResponseValue; } - // void OpenChannelV2_set_temporary_channel_id(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void CommonOpenChannelFields_set_revocation_basepoint(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); /* @internal */ -export function OpenChannelV2_set_temporary_channel_id(this_ptr: bigint, val: number): void { +export function CommonOpenChannelFields_set_revocation_basepoint(this_ptr: bigint, val: number): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_set_temporary_channel_id(this_ptr, val); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_set_revocation_basepoint(this_ptr, val); // debug statements here } - // uint32_t OpenChannelV2_get_funding_feerate_sat_per_1000_weight(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); + // struct LDKPublicKey CommonOpenChannelFields_get_payment_basepoint(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); /* @internal */ -export function OpenChannelV2_get_funding_feerate_sat_per_1000_weight(this_ptr: bigint): number { +export function CommonOpenChannelFields_get_payment_basepoint(this_ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_get_funding_feerate_sat_per_1000_weight(this_ptr); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_get_payment_basepoint(this_ptr); return nativeResponseValue; } - // void OpenChannelV2_set_funding_feerate_sat_per_1000_weight(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint32_t val); + // void CommonOpenChannelFields_set_payment_basepoint(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); /* @internal */ -export function OpenChannelV2_set_funding_feerate_sat_per_1000_weight(this_ptr: bigint, val: number): void { +export function CommonOpenChannelFields_set_payment_basepoint(this_ptr: bigint, val: number): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_set_funding_feerate_sat_per_1000_weight(this_ptr, val); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_set_payment_basepoint(this_ptr, val); // debug statements here } - // uint32_t OpenChannelV2_get_commitment_feerate_sat_per_1000_weight(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); + // struct LDKPublicKey CommonOpenChannelFields_get_delayed_payment_basepoint(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); /* @internal */ -export function OpenChannelV2_get_commitment_feerate_sat_per_1000_weight(this_ptr: bigint): number { +export function CommonOpenChannelFields_get_delayed_payment_basepoint(this_ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_get_commitment_feerate_sat_per_1000_weight(this_ptr); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_get_delayed_payment_basepoint(this_ptr); return nativeResponseValue; } - // void OpenChannelV2_set_commitment_feerate_sat_per_1000_weight(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint32_t val); + // void CommonOpenChannelFields_set_delayed_payment_basepoint(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); /* @internal */ -export function OpenChannelV2_set_commitment_feerate_sat_per_1000_weight(this_ptr: bigint, val: number): void { +export function CommonOpenChannelFields_set_delayed_payment_basepoint(this_ptr: bigint, val: number): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_set_commitment_feerate_sat_per_1000_weight(this_ptr, val); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_set_delayed_payment_basepoint(this_ptr, val); // debug statements here } - // uint64_t OpenChannelV2_get_funding_satoshis(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); + // struct LDKPublicKey CommonOpenChannelFields_get_htlc_basepoint(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); /* @internal */ -export function OpenChannelV2_get_funding_satoshis(this_ptr: bigint): bigint { +export function CommonOpenChannelFields_get_htlc_basepoint(this_ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_get_funding_satoshis(this_ptr); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_get_htlc_basepoint(this_ptr); return nativeResponseValue; } - // void OpenChannelV2_set_funding_satoshis(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint64_t val); + // void CommonOpenChannelFields_set_htlc_basepoint(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); /* @internal */ -export function OpenChannelV2_set_funding_satoshis(this_ptr: bigint, val: bigint): void { +export function CommonOpenChannelFields_set_htlc_basepoint(this_ptr: bigint, val: number): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_set_funding_satoshis(this_ptr, val); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_set_htlc_basepoint(this_ptr, val); // debug statements here } - // uint64_t OpenChannelV2_get_dust_limit_satoshis(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); + // struct LDKPublicKey CommonOpenChannelFields_get_first_per_commitment_point(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); /* @internal */ -export function OpenChannelV2_get_dust_limit_satoshis(this_ptr: bigint): bigint { +export function CommonOpenChannelFields_get_first_per_commitment_point(this_ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_get_dust_limit_satoshis(this_ptr); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_get_first_per_commitment_point(this_ptr); return nativeResponseValue; } - // void OpenChannelV2_set_dust_limit_satoshis(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint64_t val); + // void CommonOpenChannelFields_set_first_per_commitment_point(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); /* @internal */ -export function OpenChannelV2_set_dust_limit_satoshis(this_ptr: bigint, val: bigint): void { +export function CommonOpenChannelFields_set_first_per_commitment_point(this_ptr: bigint, val: number): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_set_dust_limit_satoshis(this_ptr, val); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_set_first_per_commitment_point(this_ptr, val); // debug statements here } - // uint64_t OpenChannelV2_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); + // uint8_t CommonOpenChannelFields_get_channel_flags(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); /* @internal */ -export function OpenChannelV2_get_max_htlc_value_in_flight_msat(this_ptr: bigint): bigint { +export function CommonOpenChannelFields_get_channel_flags(this_ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_get_max_htlc_value_in_flight_msat(this_ptr); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_get_channel_flags(this_ptr); return nativeResponseValue; } - // void OpenChannelV2_set_max_htlc_value_in_flight_msat(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint64_t val); + // void CommonOpenChannelFields_set_channel_flags(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint8_t val); /* @internal */ -export function OpenChannelV2_set_max_htlc_value_in_flight_msat(this_ptr: bigint, val: bigint): void { +export function CommonOpenChannelFields_set_channel_flags(this_ptr: bigint, val: number): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_set_max_htlc_value_in_flight_msat(this_ptr, val); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_set_channel_flags(this_ptr, val); // debug statements here } - // uint64_t OpenChannelV2_get_htlc_minimum_msat(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); + // struct LDKCOption_CVec_u8ZZ CommonOpenChannelFields_get_shutdown_scriptpubkey(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); /* @internal */ -export function OpenChannelV2_get_htlc_minimum_msat(this_ptr: bigint): bigint { +export function CommonOpenChannelFields_get_shutdown_scriptpubkey(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_get_htlc_minimum_msat(this_ptr); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_get_shutdown_scriptpubkey(this_ptr); return nativeResponseValue; } - // void OpenChannelV2_set_htlc_minimum_msat(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint64_t val); + // void CommonOpenChannelFields_set_shutdown_scriptpubkey(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val); /* @internal */ -export function OpenChannelV2_set_htlc_minimum_msat(this_ptr: bigint, val: bigint): void { +export function CommonOpenChannelFields_set_shutdown_scriptpubkey(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_set_htlc_minimum_msat(this_ptr, val); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_set_shutdown_scriptpubkey(this_ptr, val); // debug statements here } - // uint16_t OpenChannelV2_get_to_self_delay(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); + // struct LDKChannelTypeFeatures CommonOpenChannelFields_get_channel_type(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); /* @internal */ -export function OpenChannelV2_get_to_self_delay(this_ptr: bigint): number { +export function CommonOpenChannelFields_get_channel_type(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_get_to_self_delay(this_ptr); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_get_channel_type(this_ptr); return nativeResponseValue; } - // void OpenChannelV2_set_to_self_delay(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint16_t val); + // void CommonOpenChannelFields_set_channel_type(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val); /* @internal */ -export function OpenChannelV2_set_to_self_delay(this_ptr: bigint, val: number): void { +export function CommonOpenChannelFields_set_channel_type(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_set_to_self_delay(this_ptr, val); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_set_channel_type(this_ptr, val); // debug statements here } - // uint16_t OpenChannelV2_get_max_accepted_htlcs(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); + // MUST_USE_RES struct LDKCommonOpenChannelFields CommonOpenChannelFields_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKChannelId temporary_channel_id_arg, uint64_t funding_satoshis_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t htlc_minimum_msat_arg, uint32_t commitment_feerate_sat_per_1000_weight_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_basepoint_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, uint8_t channel_flags_arg, struct LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg); /* @internal */ -export function OpenChannelV2_get_max_accepted_htlcs(this_ptr: bigint): number { +export function CommonOpenChannelFields_new(chain_hash_arg: number, temporary_channel_id_arg: bigint, funding_satoshis_arg: bigint, dust_limit_satoshis_arg: bigint, max_htlc_value_in_flight_msat_arg: bigint, htlc_minimum_msat_arg: bigint, commitment_feerate_sat_per_1000_weight_arg: number, to_self_delay_arg: number, max_accepted_htlcs_arg: number, funding_pubkey_arg: number, revocation_basepoint_arg: number, payment_basepoint_arg: number, delayed_payment_basepoint_arg: number, htlc_basepoint_arg: number, first_per_commitment_point_arg: number, channel_flags_arg: number, shutdown_scriptpubkey_arg: bigint, channel_type_arg: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_get_max_accepted_htlcs(this_ptr); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_new(chain_hash_arg, temporary_channel_id_arg, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, commitment_feerate_sat_per_1000_weight_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg, revocation_basepoint_arg, payment_basepoint_arg, delayed_payment_basepoint_arg, htlc_basepoint_arg, first_per_commitment_point_arg, channel_flags_arg, shutdown_scriptpubkey_arg, channel_type_arg); return nativeResponseValue; } - // void OpenChannelV2_set_max_accepted_htlcs(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint16_t val); + // uint64_t CommonOpenChannelFields_clone_ptr(LDKCommonOpenChannelFields *NONNULL_PTR arg); /* @internal */ -export function OpenChannelV2_set_max_accepted_htlcs(this_ptr: bigint, val: number): void { +export function CommonOpenChannelFields_clone_ptr(arg: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_set_max_accepted_htlcs(this_ptr, val); - // debug statements here + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_clone_ptr(arg); + return nativeResponseValue; } - // uint32_t OpenChannelV2_get_locktime(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); + // struct LDKCommonOpenChannelFields CommonOpenChannelFields_clone(const struct LDKCommonOpenChannelFields *NONNULL_PTR orig); /* @internal */ -export function OpenChannelV2_get_locktime(this_ptr: bigint): number { +export function CommonOpenChannelFields_clone(orig: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_get_locktime(this_ptr); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_clone(orig); return nativeResponseValue; } - // void OpenChannelV2_set_locktime(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint32_t val); + // uint64_t CommonOpenChannelFields_hash(const struct LDKCommonOpenChannelFields *NONNULL_PTR o); /* @internal */ -export function OpenChannelV2_set_locktime(this_ptr: bigint, val: number): void { +export function CommonOpenChannelFields_hash(o: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_set_locktime(this_ptr, val); - // debug statements here + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_hash(o); + return nativeResponseValue; } - // struct LDKPublicKey OpenChannelV2_get_funding_pubkey(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); + // bool CommonOpenChannelFields_eq(const struct LDKCommonOpenChannelFields *NONNULL_PTR a, const struct LDKCommonOpenChannelFields *NONNULL_PTR b); /* @internal */ -export function OpenChannelV2_get_funding_pubkey(this_ptr: bigint): number { +export function CommonOpenChannelFields_eq(a: bigint, b: bigint): boolean { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_get_funding_pubkey(this_ptr); + const nativeResponseValue = wasm.TS_CommonOpenChannelFields_eq(a, b); return nativeResponseValue; } - // void OpenChannelV2_set_funding_pubkey(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); + // void OpenChannel_free(struct LDKOpenChannel this_obj); /* @internal */ -export function OpenChannelV2_set_funding_pubkey(this_ptr: bigint, val: number): void { +export function OpenChannel_free(this_obj: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_set_funding_pubkey(this_ptr, val); + const nativeResponseValue = wasm.TS_OpenChannel_free(this_obj); // debug statements here } - // struct LDKPublicKey OpenChannelV2_get_revocation_basepoint(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); + // struct LDKCommonOpenChannelFields OpenChannel_get_common_fields(const struct LDKOpenChannel *NONNULL_PTR this_ptr); /* @internal */ -export function OpenChannelV2_get_revocation_basepoint(this_ptr: bigint): number { +export function OpenChannel_get_common_fields(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_get_revocation_basepoint(this_ptr); + const nativeResponseValue = wasm.TS_OpenChannel_get_common_fields(this_ptr); return nativeResponseValue; } - // void OpenChannelV2_set_revocation_basepoint(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); + // void OpenChannel_set_common_fields(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKCommonOpenChannelFields val); /* @internal */ -export function OpenChannelV2_set_revocation_basepoint(this_ptr: bigint, val: number): void { +export function OpenChannel_set_common_fields(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_set_revocation_basepoint(this_ptr, val); + const nativeResponseValue = wasm.TS_OpenChannel_set_common_fields(this_ptr, val); // debug statements here } - // struct LDKPublicKey OpenChannelV2_get_payment_basepoint(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); + // uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr); /* @internal */ -export function OpenChannelV2_get_payment_basepoint(this_ptr: bigint): number { +export function OpenChannel_get_push_msat(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_get_payment_basepoint(this_ptr); + const nativeResponseValue = wasm.TS_OpenChannel_get_push_msat(this_ptr); return nativeResponseValue; } - // void OpenChannelV2_set_payment_basepoint(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); + // void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val); /* @internal */ -export function OpenChannelV2_set_payment_basepoint(this_ptr: bigint, val: number): void { +export function OpenChannel_set_push_msat(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_set_payment_basepoint(this_ptr, val); + const nativeResponseValue = wasm.TS_OpenChannel_set_push_msat(this_ptr, val); // debug statements here } - // struct LDKPublicKey OpenChannelV2_get_delayed_payment_basepoint(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); + // uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr); /* @internal */ -export function OpenChannelV2_get_delayed_payment_basepoint(this_ptr: bigint): number { +export function OpenChannel_get_channel_reserve_satoshis(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_get_delayed_payment_basepoint(this_ptr); + const nativeResponseValue = wasm.TS_OpenChannel_get_channel_reserve_satoshis(this_ptr); return nativeResponseValue; } - // void OpenChannelV2_set_delayed_payment_basepoint(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); + // void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val); /* @internal */ -export function OpenChannelV2_set_delayed_payment_basepoint(this_ptr: bigint, val: number): void { +export function OpenChannel_set_channel_reserve_satoshis(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_set_delayed_payment_basepoint(this_ptr, val); + const nativeResponseValue = wasm.TS_OpenChannel_set_channel_reserve_satoshis(this_ptr, val); // debug statements here } - // struct LDKPublicKey OpenChannelV2_get_htlc_basepoint(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); + // MUST_USE_RES struct LDKOpenChannel OpenChannel_new(struct LDKCommonOpenChannelFields common_fields_arg, uint64_t push_msat_arg, uint64_t channel_reserve_satoshis_arg); /* @internal */ -export function OpenChannelV2_get_htlc_basepoint(this_ptr: bigint): number { +export function OpenChannel_new(common_fields_arg: bigint, push_msat_arg: bigint, channel_reserve_satoshis_arg: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_get_htlc_basepoint(this_ptr); + const nativeResponseValue = wasm.TS_OpenChannel_new(common_fields_arg, push_msat_arg, channel_reserve_satoshis_arg); return nativeResponseValue; } - // void OpenChannelV2_set_htlc_basepoint(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); + // uint64_t OpenChannel_clone_ptr(LDKOpenChannel *NONNULL_PTR arg); /* @internal */ -export function OpenChannelV2_set_htlc_basepoint(this_ptr: bigint, val: number): void { +export function OpenChannel_clone_ptr(arg: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_set_htlc_basepoint(this_ptr, val); - // debug statements here + const nativeResponseValue = wasm.TS_OpenChannel_clone_ptr(arg); + return nativeResponseValue; } - // struct LDKPublicKey OpenChannelV2_get_first_per_commitment_point(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); + // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig); /* @internal */ -export function OpenChannelV2_get_first_per_commitment_point(this_ptr: bigint): number { +export function OpenChannel_clone(orig: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_get_first_per_commitment_point(this_ptr); + const nativeResponseValue = wasm.TS_OpenChannel_clone(orig); return nativeResponseValue; } - // void OpenChannelV2_set_first_per_commitment_point(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); + // uint64_t OpenChannel_hash(const struct LDKOpenChannel *NONNULL_PTR o); /* @internal */ -export function OpenChannelV2_set_first_per_commitment_point(this_ptr: bigint, val: number): void { +export function OpenChannel_hash(o: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_set_first_per_commitment_point(this_ptr, val); + const nativeResponseValue = wasm.TS_OpenChannel_hash(o); + return nativeResponseValue; +} + // bool OpenChannel_eq(const struct LDKOpenChannel *NONNULL_PTR a, const struct LDKOpenChannel *NONNULL_PTR b); +/* @internal */ +export function OpenChannel_eq(a: bigint, b: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OpenChannel_eq(a, b); + return nativeResponseValue; +} + // void OpenChannelV2_free(struct LDKOpenChannelV2 this_obj); +/* @internal */ +export function OpenChannelV2_free(this_obj: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OpenChannelV2_free(this_obj); // debug statements here } - // struct LDKPublicKey OpenChannelV2_get_second_per_commitment_point(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); + // struct LDKCommonOpenChannelFields OpenChannelV2_get_common_fields(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); /* @internal */ -export function OpenChannelV2_get_second_per_commitment_point(this_ptr: bigint): number { +export function OpenChannelV2_get_common_fields(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_get_second_per_commitment_point(this_ptr); + const nativeResponseValue = wasm.TS_OpenChannelV2_get_common_fields(this_ptr); return nativeResponseValue; } - // void OpenChannelV2_set_second_per_commitment_point(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); + // void OpenChannelV2_set_common_fields(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKCommonOpenChannelFields val); /* @internal */ -export function OpenChannelV2_set_second_per_commitment_point(this_ptr: bigint, val: number): void { +export function OpenChannelV2_set_common_fields(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_set_second_per_commitment_point(this_ptr, val); + const nativeResponseValue = wasm.TS_OpenChannelV2_set_common_fields(this_ptr, val); // debug statements here } - // uint8_t OpenChannelV2_get_channel_flags(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); + // uint32_t OpenChannelV2_get_funding_feerate_sat_per_1000_weight(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); /* @internal */ -export function OpenChannelV2_get_channel_flags(this_ptr: bigint): number { +export function OpenChannelV2_get_funding_feerate_sat_per_1000_weight(this_ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_get_channel_flags(this_ptr); + const nativeResponseValue = wasm.TS_OpenChannelV2_get_funding_feerate_sat_per_1000_weight(this_ptr); return nativeResponseValue; } - // void OpenChannelV2_set_channel_flags(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint8_t val); + // void OpenChannelV2_set_funding_feerate_sat_per_1000_weight(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint32_t val); /* @internal */ -export function OpenChannelV2_set_channel_flags(this_ptr: bigint, val: number): void { +export function OpenChannelV2_set_funding_feerate_sat_per_1000_weight(this_ptr: bigint, val: number): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_set_channel_flags(this_ptr, val); + const nativeResponseValue = wasm.TS_OpenChannelV2_set_funding_feerate_sat_per_1000_weight(this_ptr, val); // debug statements here } - // struct LDKCOption_CVec_u8ZZ OpenChannelV2_get_shutdown_scriptpubkey(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); + // uint32_t OpenChannelV2_get_locktime(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); /* @internal */ -export function OpenChannelV2_get_shutdown_scriptpubkey(this_ptr: bigint): bigint { +export function OpenChannelV2_get_locktime(this_ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_get_shutdown_scriptpubkey(this_ptr); + const nativeResponseValue = wasm.TS_OpenChannelV2_get_locktime(this_ptr); return nativeResponseValue; } - // void OpenChannelV2_set_shutdown_scriptpubkey(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val); + // void OpenChannelV2_set_locktime(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint32_t val); /* @internal */ -export function OpenChannelV2_set_shutdown_scriptpubkey(this_ptr: bigint, val: bigint): void { +export function OpenChannelV2_set_locktime(this_ptr: bigint, val: number): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_set_shutdown_scriptpubkey(this_ptr, val); + const nativeResponseValue = wasm.TS_OpenChannelV2_set_locktime(this_ptr, val); // debug statements here } - // struct LDKChannelTypeFeatures OpenChannelV2_get_channel_type(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); + // struct LDKPublicKey OpenChannelV2_get_second_per_commitment_point(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); /* @internal */ -export function OpenChannelV2_get_channel_type(this_ptr: bigint): bigint { +export function OpenChannelV2_get_second_per_commitment_point(this_ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_get_channel_type(this_ptr); + const nativeResponseValue = wasm.TS_OpenChannelV2_get_second_per_commitment_point(this_ptr); return nativeResponseValue; } - // void OpenChannelV2_set_channel_type(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val); + // void OpenChannelV2_set_second_per_commitment_point(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); /* @internal */ -export function OpenChannelV2_set_channel_type(this_ptr: bigint, val: bigint): void { +export function OpenChannelV2_set_second_per_commitment_point(this_ptr: bigint, val: number): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_set_channel_type(this_ptr, val); + const nativeResponseValue = wasm.TS_OpenChannelV2_set_second_per_commitment_point(this_ptr, val); // debug statements here } // enum LDKCOption_NoneZ OpenChannelV2_get_require_confirmed_inputs(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); @@ -33845,13 +36999,13 @@ export function OpenChannelV2_set_require_confirmed_inputs(this_ptr: bigint, val const nativeResponseValue = wasm.TS_OpenChannelV2_set_require_confirmed_inputs(this_ptr, val); // debug statements here } - // MUST_USE_RES struct LDKOpenChannelV2 OpenChannelV2_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKThirtyTwoBytes temporary_channel_id_arg, uint32_t funding_feerate_sat_per_1000_weight_arg, uint32_t commitment_feerate_sat_per_1000_weight_arg, uint64_t funding_satoshis_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t htlc_minimum_msat_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, uint32_t locktime_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_basepoint_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, struct LDKPublicKey second_per_commitment_point_arg, uint8_t channel_flags_arg, struct LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg, enum LDKCOption_NoneZ require_confirmed_inputs_arg); + // MUST_USE_RES struct LDKOpenChannelV2 OpenChannelV2_new(struct LDKCommonOpenChannelFields common_fields_arg, uint32_t funding_feerate_sat_per_1000_weight_arg, uint32_t locktime_arg, struct LDKPublicKey second_per_commitment_point_arg, enum LDKCOption_NoneZ require_confirmed_inputs_arg); /* @internal */ -export function OpenChannelV2_new(chain_hash_arg: number, temporary_channel_id_arg: number, funding_feerate_sat_per_1000_weight_arg: number, commitment_feerate_sat_per_1000_weight_arg: number, funding_satoshis_arg: bigint, dust_limit_satoshis_arg: bigint, max_htlc_value_in_flight_msat_arg: bigint, htlc_minimum_msat_arg: bigint, to_self_delay_arg: number, max_accepted_htlcs_arg: number, locktime_arg: number, funding_pubkey_arg: number, revocation_basepoint_arg: number, payment_basepoint_arg: number, delayed_payment_basepoint_arg: number, htlc_basepoint_arg: number, first_per_commitment_point_arg: number, second_per_commitment_point_arg: number, channel_flags_arg: number, shutdown_scriptpubkey_arg: bigint, channel_type_arg: bigint, require_confirmed_inputs_arg: COption_NoneZ): bigint { +export function OpenChannelV2_new(common_fields_arg: bigint, funding_feerate_sat_per_1000_weight_arg: number, locktime_arg: number, second_per_commitment_point_arg: number, require_confirmed_inputs_arg: COption_NoneZ): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OpenChannelV2_new(chain_hash_arg, temporary_channel_id_arg, funding_feerate_sat_per_1000_weight_arg, commitment_feerate_sat_per_1000_weight_arg, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, to_self_delay_arg, max_accepted_htlcs_arg, locktime_arg, funding_pubkey_arg, revocation_basepoint_arg, payment_basepoint_arg, delayed_payment_basepoint_arg, htlc_basepoint_arg, first_per_commitment_point_arg, second_per_commitment_point_arg, channel_flags_arg, shutdown_scriptpubkey_arg, channel_type_arg, require_confirmed_inputs_arg); + const nativeResponseValue = wasm.TS_OpenChannelV2_new(common_fields_arg, funding_feerate_sat_per_1000_weight_arg, locktime_arg, second_per_commitment_point_arg, require_confirmed_inputs_arg); return nativeResponseValue; } // uint64_t OpenChannelV2_clone_ptr(LDKOpenChannelV2 *NONNULL_PTR arg); @@ -33890,661 +37044,481 @@ export function OpenChannelV2_eq(a: bigint, b: bigint): boolean { const nativeResponseValue = wasm.TS_OpenChannelV2_eq(a, b); return nativeResponseValue; } - // void AcceptChannel_free(struct LDKAcceptChannel this_obj); + // void CommonAcceptChannelFields_free(struct LDKCommonAcceptChannelFields this_obj); /* @internal */ -export function AcceptChannel_free(this_obj: bigint): void { +export function CommonAcceptChannelFields_free(this_obj: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannel_free(this_obj); + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_free(this_obj); // debug statements here } - // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId CommonAcceptChannelFields_get_temporary_channel_id(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); /* @internal */ -export function AcceptChannel_get_temporary_channel_id(this_ptr: bigint): number { +export function CommonAcceptChannelFields_get_temporary_channel_id(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannel_get_temporary_channel_id(this_ptr); + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_get_temporary_channel_id(this_ptr); return nativeResponseValue; } - // void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void CommonAcceptChannelFields_set_temporary_channel_id(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKChannelId val); /* @internal */ -export function AcceptChannel_set_temporary_channel_id(this_ptr: bigint, val: number): void { +export function CommonAcceptChannelFields_set_temporary_channel_id(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannel_set_temporary_channel_id(this_ptr, val); + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_set_temporary_channel_id(this_ptr, val); // debug statements here } - // uint64_t AcceptChannel_get_dust_limit_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); + // uint64_t CommonAcceptChannelFields_get_dust_limit_satoshis(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); /* @internal */ -export function AcceptChannel_get_dust_limit_satoshis(this_ptr: bigint): bigint { +export function CommonAcceptChannelFields_get_dust_limit_satoshis(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannel_get_dust_limit_satoshis(this_ptr); + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_get_dust_limit_satoshis(this_ptr); return nativeResponseValue; } - // void AcceptChannel_set_dust_limit_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val); + // void CommonAcceptChannelFields_set_dust_limit_satoshis(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint64_t val); /* @internal */ -export function AcceptChannel_set_dust_limit_satoshis(this_ptr: bigint, val: bigint): void { +export function CommonAcceptChannelFields_set_dust_limit_satoshis(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannel_set_dust_limit_satoshis(this_ptr, val); + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_set_dust_limit_satoshis(this_ptr, val); // debug statements here } - // uint64_t AcceptChannel_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); + // uint64_t CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); /* @internal */ -export function AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr: bigint): bigint { +export function CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr); + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat(this_ptr); return nativeResponseValue; } - // void AcceptChannel_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val); + // void CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint64_t val); /* @internal */ -export function AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr: bigint, val: bigint): void { +export function CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr, val); + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat(this_ptr, val); // debug statements here } - // uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); + // uint64_t CommonAcceptChannelFields_get_htlc_minimum_msat(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); /* @internal */ -export function AcceptChannel_get_channel_reserve_satoshis(this_ptr: bigint): bigint { +export function CommonAcceptChannelFields_get_htlc_minimum_msat(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannel_get_channel_reserve_satoshis(this_ptr); + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_get_htlc_minimum_msat(this_ptr); return nativeResponseValue; } - // void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val); + // void CommonAcceptChannelFields_set_htlc_minimum_msat(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint64_t val); /* @internal */ -export function AcceptChannel_set_channel_reserve_satoshis(this_ptr: bigint, val: bigint): void { +export function CommonAcceptChannelFields_set_htlc_minimum_msat(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannel_set_channel_reserve_satoshis(this_ptr, val); + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_set_htlc_minimum_msat(this_ptr, val); // debug statements here } - // uint64_t AcceptChannel_get_htlc_minimum_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); + // uint32_t CommonAcceptChannelFields_get_minimum_depth(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); /* @internal */ -export function AcceptChannel_get_htlc_minimum_msat(this_ptr: bigint): bigint { +export function CommonAcceptChannelFields_get_minimum_depth(this_ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannel_get_htlc_minimum_msat(this_ptr); + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_get_minimum_depth(this_ptr); return nativeResponseValue; } - // void AcceptChannel_set_htlc_minimum_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val); + // void CommonAcceptChannelFields_set_minimum_depth(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint32_t val); /* @internal */ -export function AcceptChannel_set_htlc_minimum_msat(this_ptr: bigint, val: bigint): void { +export function CommonAcceptChannelFields_set_minimum_depth(this_ptr: bigint, val: number): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannel_set_htlc_minimum_msat(this_ptr, val); + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_set_minimum_depth(this_ptr, val); // debug statements here } - // uint32_t AcceptChannel_get_minimum_depth(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); + // uint16_t CommonAcceptChannelFields_get_to_self_delay(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); /* @internal */ -export function AcceptChannel_get_minimum_depth(this_ptr: bigint): number { +export function CommonAcceptChannelFields_get_to_self_delay(this_ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannel_get_minimum_depth(this_ptr); + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_get_to_self_delay(this_ptr); return nativeResponseValue; } - // void AcceptChannel_set_minimum_depth(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint32_t val); + // void CommonAcceptChannelFields_set_to_self_delay(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint16_t val); /* @internal */ -export function AcceptChannel_set_minimum_depth(this_ptr: bigint, val: number): void { +export function CommonAcceptChannelFields_set_to_self_delay(this_ptr: bigint, val: number): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannel_set_minimum_depth(this_ptr, val); + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_set_to_self_delay(this_ptr, val); // debug statements here } - // uint16_t AcceptChannel_get_to_self_delay(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); + // uint16_t CommonAcceptChannelFields_get_max_accepted_htlcs(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); /* @internal */ -export function AcceptChannel_get_to_self_delay(this_ptr: bigint): number { +export function CommonAcceptChannelFields_get_max_accepted_htlcs(this_ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannel_get_to_self_delay(this_ptr); + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_get_max_accepted_htlcs(this_ptr); return nativeResponseValue; } - // void AcceptChannel_set_to_self_delay(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val); + // void CommonAcceptChannelFields_set_max_accepted_htlcs(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint16_t val); /* @internal */ -export function AcceptChannel_set_to_self_delay(this_ptr: bigint, val: number): void { +export function CommonAcceptChannelFields_set_max_accepted_htlcs(this_ptr: bigint, val: number): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannel_set_to_self_delay(this_ptr, val); + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_set_max_accepted_htlcs(this_ptr, val); // debug statements here } - // uint16_t AcceptChannel_get_max_accepted_htlcs(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); + // struct LDKPublicKey CommonAcceptChannelFields_get_funding_pubkey(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); /* @internal */ -export function AcceptChannel_get_max_accepted_htlcs(this_ptr: bigint): number { +export function CommonAcceptChannelFields_get_funding_pubkey(this_ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannel_get_max_accepted_htlcs(this_ptr); + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_get_funding_pubkey(this_ptr); return nativeResponseValue; } - // void AcceptChannel_set_max_accepted_htlcs(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val); + // void CommonAcceptChannelFields_set_funding_pubkey(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); /* @internal */ -export function AcceptChannel_set_max_accepted_htlcs(this_ptr: bigint, val: number): void { +export function CommonAcceptChannelFields_set_funding_pubkey(this_ptr: bigint, val: number): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannel_set_max_accepted_htlcs(this_ptr, val); + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_set_funding_pubkey(this_ptr, val); // debug statements here } - // struct LDKPublicKey AcceptChannel_get_funding_pubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); + // struct LDKPublicKey CommonAcceptChannelFields_get_revocation_basepoint(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); /* @internal */ -export function AcceptChannel_get_funding_pubkey(this_ptr: bigint): number { +export function CommonAcceptChannelFields_get_revocation_basepoint(this_ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannel_get_funding_pubkey(this_ptr); + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_get_revocation_basepoint(this_ptr); return nativeResponseValue; } - // void AcceptChannel_set_funding_pubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); + // void CommonAcceptChannelFields_set_revocation_basepoint(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); /* @internal */ -export function AcceptChannel_set_funding_pubkey(this_ptr: bigint, val: number): void { +export function CommonAcceptChannelFields_set_revocation_basepoint(this_ptr: bigint, val: number): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannel_set_funding_pubkey(this_ptr, val); + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_set_revocation_basepoint(this_ptr, val); // debug statements here } - // struct LDKPublicKey AcceptChannel_get_revocation_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); + // struct LDKPublicKey CommonAcceptChannelFields_get_payment_basepoint(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); /* @internal */ -export function AcceptChannel_get_revocation_basepoint(this_ptr: bigint): number { +export function CommonAcceptChannelFields_get_payment_basepoint(this_ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannel_get_revocation_basepoint(this_ptr); + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_get_payment_basepoint(this_ptr); return nativeResponseValue; } - // void AcceptChannel_set_revocation_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); + // void CommonAcceptChannelFields_set_payment_basepoint(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); /* @internal */ -export function AcceptChannel_set_revocation_basepoint(this_ptr: bigint, val: number): void { +export function CommonAcceptChannelFields_set_payment_basepoint(this_ptr: bigint, val: number): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannel_set_revocation_basepoint(this_ptr, val); - // debug statements here -} - // struct LDKPublicKey AcceptChannel_get_payment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); -/* @internal */ -export function AcceptChannel_get_payment_point(this_ptr: bigint): number { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_AcceptChannel_get_payment_point(this_ptr); - return nativeResponseValue; -} - // void AcceptChannel_set_payment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); -/* @internal */ -export function AcceptChannel_set_payment_point(this_ptr: bigint, val: number): void { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_AcceptChannel_set_payment_point(this_ptr, val); - // debug statements here -} - // struct LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); -/* @internal */ -export function AcceptChannel_get_delayed_payment_basepoint(this_ptr: bigint): number { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_AcceptChannel_get_delayed_payment_basepoint(this_ptr); - return nativeResponseValue; -} - // void AcceptChannel_set_delayed_payment_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); -/* @internal */ -export function AcceptChannel_set_delayed_payment_basepoint(this_ptr: bigint, val: number): void { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_AcceptChannel_set_delayed_payment_basepoint(this_ptr, val); - // debug statements here -} - // struct LDKPublicKey AcceptChannel_get_htlc_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); -/* @internal */ -export function AcceptChannel_get_htlc_basepoint(this_ptr: bigint): number { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_AcceptChannel_get_htlc_basepoint(this_ptr); - return nativeResponseValue; -} - // void AcceptChannel_set_htlc_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); -/* @internal */ -export function AcceptChannel_set_htlc_basepoint(this_ptr: bigint, val: number): void { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_AcceptChannel_set_htlc_basepoint(this_ptr, val); - // debug statements here -} - // struct LDKPublicKey AcceptChannel_get_first_per_commitment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); -/* @internal */ -export function AcceptChannel_get_first_per_commitment_point(this_ptr: bigint): number { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_AcceptChannel_get_first_per_commitment_point(this_ptr); - return nativeResponseValue; -} - // void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); -/* @internal */ -export function AcceptChannel_set_first_per_commitment_point(this_ptr: bigint, val: number): void { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_AcceptChannel_set_first_per_commitment_point(this_ptr, val); - // debug statements here -} - // struct LDKCOption_CVec_u8ZZ AcceptChannel_get_shutdown_scriptpubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); -/* @internal */ -export function AcceptChannel_get_shutdown_scriptpubkey(this_ptr: bigint): bigint { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_AcceptChannel_get_shutdown_scriptpubkey(this_ptr); - return nativeResponseValue; -} - // void AcceptChannel_set_shutdown_scriptpubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val); -/* @internal */ -export function AcceptChannel_set_shutdown_scriptpubkey(this_ptr: bigint, val: bigint): void { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_AcceptChannel_set_shutdown_scriptpubkey(this_ptr, val); - // debug statements here -} - // struct LDKChannelTypeFeatures AcceptChannel_get_channel_type(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); -/* @internal */ -export function AcceptChannel_get_channel_type(this_ptr: bigint): bigint { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_AcceptChannel_get_channel_type(this_ptr); - return nativeResponseValue; -} - // void AcceptChannel_set_channel_type(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val); -/* @internal */ -export function AcceptChannel_set_channel_type(this_ptr: bigint, val: bigint): void { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_AcceptChannel_set_channel_type(this_ptr, val); - // debug statements here -} - // MUST_USE_RES struct LDKAcceptChannel AcceptChannel_new(struct LDKThirtyTwoBytes temporary_channel_id_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t channel_reserve_satoshis_arg, uint64_t htlc_minimum_msat_arg, uint32_t minimum_depth_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_point_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, struct LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg); -/* @internal */ -export function AcceptChannel_new(temporary_channel_id_arg: number, dust_limit_satoshis_arg: bigint, max_htlc_value_in_flight_msat_arg: bigint, channel_reserve_satoshis_arg: bigint, htlc_minimum_msat_arg: bigint, minimum_depth_arg: number, to_self_delay_arg: number, max_accepted_htlcs_arg: number, funding_pubkey_arg: number, revocation_basepoint_arg: number, payment_point_arg: number, delayed_payment_basepoint_arg: number, htlc_basepoint_arg: number, first_per_commitment_point_arg: number, shutdown_scriptpubkey_arg: bigint, channel_type_arg: bigint): bigint { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_AcceptChannel_new(temporary_channel_id_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg, revocation_basepoint_arg, payment_point_arg, delayed_payment_basepoint_arg, htlc_basepoint_arg, first_per_commitment_point_arg, shutdown_scriptpubkey_arg, channel_type_arg); - return nativeResponseValue; -} - // uint64_t AcceptChannel_clone_ptr(LDKAcceptChannel *NONNULL_PTR arg); -/* @internal */ -export function AcceptChannel_clone_ptr(arg: bigint): bigint { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_AcceptChannel_clone_ptr(arg); - return nativeResponseValue; -} - // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig); -/* @internal */ -export function AcceptChannel_clone(orig: bigint): bigint { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_AcceptChannel_clone(orig); - return nativeResponseValue; -} - // uint64_t AcceptChannel_hash(const struct LDKAcceptChannel *NONNULL_PTR o); -/* @internal */ -export function AcceptChannel_hash(o: bigint): bigint { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_AcceptChannel_hash(o); - return nativeResponseValue; -} - // bool AcceptChannel_eq(const struct LDKAcceptChannel *NONNULL_PTR a, const struct LDKAcceptChannel *NONNULL_PTR b); -/* @internal */ -export function AcceptChannel_eq(a: bigint, b: bigint): boolean { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_AcceptChannel_eq(a, b); - return nativeResponseValue; -} - // void AcceptChannelV2_free(struct LDKAcceptChannelV2 this_obj); -/* @internal */ -export function AcceptChannelV2_free(this_obj: bigint): void { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_AcceptChannelV2_free(this_obj); - // debug statements here -} - // const uint8_t (*AcceptChannelV2_get_temporary_channel_id(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr))[32]; -/* @internal */ -export function AcceptChannelV2_get_temporary_channel_id(this_ptr: bigint): number { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_AcceptChannelV2_get_temporary_channel_id(this_ptr); - return nativeResponseValue; -} - // void AcceptChannelV2_set_temporary_channel_id(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); -/* @internal */ -export function AcceptChannelV2_set_temporary_channel_id(this_ptr: bigint, val: number): void { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_AcceptChannelV2_set_temporary_channel_id(this_ptr, val); - // debug statements here -} - // uint64_t AcceptChannelV2_get_funding_satoshis(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); -/* @internal */ -export function AcceptChannelV2_get_funding_satoshis(this_ptr: bigint): bigint { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_AcceptChannelV2_get_funding_satoshis(this_ptr); - return nativeResponseValue; -} - // void AcceptChannelV2_set_funding_satoshis(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint64_t val); -/* @internal */ -export function AcceptChannelV2_set_funding_satoshis(this_ptr: bigint, val: bigint): void { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_AcceptChannelV2_set_funding_satoshis(this_ptr, val); + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_set_payment_basepoint(this_ptr, val); // debug statements here } - // uint64_t AcceptChannelV2_get_dust_limit_satoshis(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); + // struct LDKPublicKey CommonAcceptChannelFields_get_delayed_payment_basepoint(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); /* @internal */ -export function AcceptChannelV2_get_dust_limit_satoshis(this_ptr: bigint): bigint { +export function CommonAcceptChannelFields_get_delayed_payment_basepoint(this_ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannelV2_get_dust_limit_satoshis(this_ptr); + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_get_delayed_payment_basepoint(this_ptr); return nativeResponseValue; } - // void AcceptChannelV2_set_dust_limit_satoshis(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint64_t val); + // void CommonAcceptChannelFields_set_delayed_payment_basepoint(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); /* @internal */ -export function AcceptChannelV2_set_dust_limit_satoshis(this_ptr: bigint, val: bigint): void { +export function CommonAcceptChannelFields_set_delayed_payment_basepoint(this_ptr: bigint, val: number): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannelV2_set_dust_limit_satoshis(this_ptr, val); + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_set_delayed_payment_basepoint(this_ptr, val); // debug statements here } - // uint64_t AcceptChannelV2_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); + // struct LDKPublicKey CommonAcceptChannelFields_get_htlc_basepoint(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); /* @internal */ -export function AcceptChannelV2_get_max_htlc_value_in_flight_msat(this_ptr: bigint): bigint { +export function CommonAcceptChannelFields_get_htlc_basepoint(this_ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannelV2_get_max_htlc_value_in_flight_msat(this_ptr); + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_get_htlc_basepoint(this_ptr); return nativeResponseValue; } - // void AcceptChannelV2_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint64_t val); + // void CommonAcceptChannelFields_set_htlc_basepoint(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); /* @internal */ -export function AcceptChannelV2_set_max_htlc_value_in_flight_msat(this_ptr: bigint, val: bigint): void { +export function CommonAcceptChannelFields_set_htlc_basepoint(this_ptr: bigint, val: number): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannelV2_set_max_htlc_value_in_flight_msat(this_ptr, val); + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_set_htlc_basepoint(this_ptr, val); // debug statements here } - // uint64_t AcceptChannelV2_get_htlc_minimum_msat(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); + // struct LDKPublicKey CommonAcceptChannelFields_get_first_per_commitment_point(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); /* @internal */ -export function AcceptChannelV2_get_htlc_minimum_msat(this_ptr: bigint): bigint { +export function CommonAcceptChannelFields_get_first_per_commitment_point(this_ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannelV2_get_htlc_minimum_msat(this_ptr); + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_get_first_per_commitment_point(this_ptr); return nativeResponseValue; } - // void AcceptChannelV2_set_htlc_minimum_msat(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint64_t val); + // void CommonAcceptChannelFields_set_first_per_commitment_point(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); /* @internal */ -export function AcceptChannelV2_set_htlc_minimum_msat(this_ptr: bigint, val: bigint): void { +export function CommonAcceptChannelFields_set_first_per_commitment_point(this_ptr: bigint, val: number): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannelV2_set_htlc_minimum_msat(this_ptr, val); + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_set_first_per_commitment_point(this_ptr, val); // debug statements here } - // uint32_t AcceptChannelV2_get_minimum_depth(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); + // struct LDKCOption_CVec_u8ZZ CommonAcceptChannelFields_get_shutdown_scriptpubkey(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); /* @internal */ -export function AcceptChannelV2_get_minimum_depth(this_ptr: bigint): number { +export function CommonAcceptChannelFields_get_shutdown_scriptpubkey(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannelV2_get_minimum_depth(this_ptr); + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_get_shutdown_scriptpubkey(this_ptr); return nativeResponseValue; } - // void AcceptChannelV2_set_minimum_depth(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint32_t val); + // void CommonAcceptChannelFields_set_shutdown_scriptpubkey(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val); /* @internal */ -export function AcceptChannelV2_set_minimum_depth(this_ptr: bigint, val: number): void { +export function CommonAcceptChannelFields_set_shutdown_scriptpubkey(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannelV2_set_minimum_depth(this_ptr, val); + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_set_shutdown_scriptpubkey(this_ptr, val); // debug statements here } - // uint16_t AcceptChannelV2_get_to_self_delay(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); + // struct LDKChannelTypeFeatures CommonAcceptChannelFields_get_channel_type(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); /* @internal */ -export function AcceptChannelV2_get_to_self_delay(this_ptr: bigint): number { +export function CommonAcceptChannelFields_get_channel_type(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannelV2_get_to_self_delay(this_ptr); + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_get_channel_type(this_ptr); return nativeResponseValue; } - // void AcceptChannelV2_set_to_self_delay(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint16_t val); + // void CommonAcceptChannelFields_set_channel_type(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val); /* @internal */ -export function AcceptChannelV2_set_to_self_delay(this_ptr: bigint, val: number): void { +export function CommonAcceptChannelFields_set_channel_type(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannelV2_set_to_self_delay(this_ptr, val); + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_set_channel_type(this_ptr, val); // debug statements here } - // uint16_t AcceptChannelV2_get_max_accepted_htlcs(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); + // MUST_USE_RES struct LDKCommonAcceptChannelFields CommonAcceptChannelFields_new(struct LDKChannelId temporary_channel_id_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t htlc_minimum_msat_arg, uint32_t minimum_depth_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_basepoint_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, struct LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg); /* @internal */ -export function AcceptChannelV2_get_max_accepted_htlcs(this_ptr: bigint): number { +export function CommonAcceptChannelFields_new(temporary_channel_id_arg: bigint, dust_limit_satoshis_arg: bigint, max_htlc_value_in_flight_msat_arg: bigint, htlc_minimum_msat_arg: bigint, minimum_depth_arg: number, to_self_delay_arg: number, max_accepted_htlcs_arg: number, funding_pubkey_arg: number, revocation_basepoint_arg: number, payment_basepoint_arg: number, delayed_payment_basepoint_arg: number, htlc_basepoint_arg: number, first_per_commitment_point_arg: number, shutdown_scriptpubkey_arg: bigint, channel_type_arg: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannelV2_get_max_accepted_htlcs(this_ptr); + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_new(temporary_channel_id_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg, revocation_basepoint_arg, payment_basepoint_arg, delayed_payment_basepoint_arg, htlc_basepoint_arg, first_per_commitment_point_arg, shutdown_scriptpubkey_arg, channel_type_arg); return nativeResponseValue; } - // void AcceptChannelV2_set_max_accepted_htlcs(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint16_t val); + // uint64_t CommonAcceptChannelFields_clone_ptr(LDKCommonAcceptChannelFields *NONNULL_PTR arg); /* @internal */ -export function AcceptChannelV2_set_max_accepted_htlcs(this_ptr: bigint, val: number): void { +export function CommonAcceptChannelFields_clone_ptr(arg: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannelV2_set_max_accepted_htlcs(this_ptr, val); - // debug statements here + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_clone_ptr(arg); + return nativeResponseValue; } - // struct LDKPublicKey AcceptChannelV2_get_funding_pubkey(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); + // struct LDKCommonAcceptChannelFields CommonAcceptChannelFields_clone(const struct LDKCommonAcceptChannelFields *NONNULL_PTR orig); /* @internal */ -export function AcceptChannelV2_get_funding_pubkey(this_ptr: bigint): number { +export function CommonAcceptChannelFields_clone(orig: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannelV2_get_funding_pubkey(this_ptr); + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_clone(orig); return nativeResponseValue; } - // void AcceptChannelV2_set_funding_pubkey(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); + // uint64_t CommonAcceptChannelFields_hash(const struct LDKCommonAcceptChannelFields *NONNULL_PTR o); /* @internal */ -export function AcceptChannelV2_set_funding_pubkey(this_ptr: bigint, val: number): void { +export function CommonAcceptChannelFields_hash(o: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannelV2_set_funding_pubkey(this_ptr, val); - // debug statements here + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_hash(o); + return nativeResponseValue; } - // struct LDKPublicKey AcceptChannelV2_get_revocation_basepoint(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); + // bool CommonAcceptChannelFields_eq(const struct LDKCommonAcceptChannelFields *NONNULL_PTR a, const struct LDKCommonAcceptChannelFields *NONNULL_PTR b); /* @internal */ -export function AcceptChannelV2_get_revocation_basepoint(this_ptr: bigint): number { +export function CommonAcceptChannelFields_eq(a: bigint, b: bigint): boolean { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannelV2_get_revocation_basepoint(this_ptr); + const nativeResponseValue = wasm.TS_CommonAcceptChannelFields_eq(a, b); return nativeResponseValue; } - // void AcceptChannelV2_set_revocation_basepoint(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); + // void AcceptChannel_free(struct LDKAcceptChannel this_obj); /* @internal */ -export function AcceptChannelV2_set_revocation_basepoint(this_ptr: bigint, val: number): void { +export function AcceptChannel_free(this_obj: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannelV2_set_revocation_basepoint(this_ptr, val); + const nativeResponseValue = wasm.TS_AcceptChannel_free(this_obj); // debug statements here } - // struct LDKPublicKey AcceptChannelV2_get_payment_basepoint(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); + // struct LDKCommonAcceptChannelFields AcceptChannel_get_common_fields(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); /* @internal */ -export function AcceptChannelV2_get_payment_basepoint(this_ptr: bigint): number { +export function AcceptChannel_get_common_fields(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannelV2_get_payment_basepoint(this_ptr); + const nativeResponseValue = wasm.TS_AcceptChannel_get_common_fields(this_ptr); return nativeResponseValue; } - // void AcceptChannelV2_set_payment_basepoint(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); + // void AcceptChannel_set_common_fields(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKCommonAcceptChannelFields val); /* @internal */ -export function AcceptChannelV2_set_payment_basepoint(this_ptr: bigint, val: number): void { +export function AcceptChannel_set_common_fields(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannelV2_set_payment_basepoint(this_ptr, val); + const nativeResponseValue = wasm.TS_AcceptChannel_set_common_fields(this_ptr, val); // debug statements here } - // struct LDKPublicKey AcceptChannelV2_get_delayed_payment_basepoint(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); + // uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); /* @internal */ -export function AcceptChannelV2_get_delayed_payment_basepoint(this_ptr: bigint): number { +export function AcceptChannel_get_channel_reserve_satoshis(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannelV2_get_delayed_payment_basepoint(this_ptr); + const nativeResponseValue = wasm.TS_AcceptChannel_get_channel_reserve_satoshis(this_ptr); return nativeResponseValue; } - // void AcceptChannelV2_set_delayed_payment_basepoint(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); + // void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val); /* @internal */ -export function AcceptChannelV2_set_delayed_payment_basepoint(this_ptr: bigint, val: number): void { +export function AcceptChannel_set_channel_reserve_satoshis(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannelV2_set_delayed_payment_basepoint(this_ptr, val); + const nativeResponseValue = wasm.TS_AcceptChannel_set_channel_reserve_satoshis(this_ptr, val); // debug statements here } - // struct LDKPublicKey AcceptChannelV2_get_htlc_basepoint(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); + // MUST_USE_RES struct LDKAcceptChannel AcceptChannel_new(struct LDKCommonAcceptChannelFields common_fields_arg, uint64_t channel_reserve_satoshis_arg); /* @internal */ -export function AcceptChannelV2_get_htlc_basepoint(this_ptr: bigint): number { +export function AcceptChannel_new(common_fields_arg: bigint, channel_reserve_satoshis_arg: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannelV2_get_htlc_basepoint(this_ptr); + const nativeResponseValue = wasm.TS_AcceptChannel_new(common_fields_arg, channel_reserve_satoshis_arg); return nativeResponseValue; } - // void AcceptChannelV2_set_htlc_basepoint(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); + // uint64_t AcceptChannel_clone_ptr(LDKAcceptChannel *NONNULL_PTR arg); /* @internal */ -export function AcceptChannelV2_set_htlc_basepoint(this_ptr: bigint, val: number): void { +export function AcceptChannel_clone_ptr(arg: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannelV2_set_htlc_basepoint(this_ptr, val); - // debug statements here + const nativeResponseValue = wasm.TS_AcceptChannel_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig); +/* @internal */ +export function AcceptChannel_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_AcceptChannel_clone(orig); + return nativeResponseValue; } - // struct LDKPublicKey AcceptChannelV2_get_first_per_commitment_point(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); + // uint64_t AcceptChannel_hash(const struct LDKAcceptChannel *NONNULL_PTR o); /* @internal */ -export function AcceptChannelV2_get_first_per_commitment_point(this_ptr: bigint): number { +export function AcceptChannel_hash(o: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannelV2_get_first_per_commitment_point(this_ptr); + const nativeResponseValue = wasm.TS_AcceptChannel_hash(o); return nativeResponseValue; } - // void AcceptChannelV2_set_first_per_commitment_point(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); + // bool AcceptChannel_eq(const struct LDKAcceptChannel *NONNULL_PTR a, const struct LDKAcceptChannel *NONNULL_PTR b); /* @internal */ -export function AcceptChannelV2_set_first_per_commitment_point(this_ptr: bigint, val: number): void { +export function AcceptChannel_eq(a: bigint, b: bigint): boolean { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannelV2_set_first_per_commitment_point(this_ptr, val); + const nativeResponseValue = wasm.TS_AcceptChannel_eq(a, b); + return nativeResponseValue; +} + // void AcceptChannelV2_free(struct LDKAcceptChannelV2 this_obj); +/* @internal */ +export function AcceptChannelV2_free(this_obj: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_AcceptChannelV2_free(this_obj); // debug statements here } - // struct LDKPublicKey AcceptChannelV2_get_second_per_commitment_point(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); + // struct LDKCommonAcceptChannelFields AcceptChannelV2_get_common_fields(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); /* @internal */ -export function AcceptChannelV2_get_second_per_commitment_point(this_ptr: bigint): number { +export function AcceptChannelV2_get_common_fields(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannelV2_get_second_per_commitment_point(this_ptr); + const nativeResponseValue = wasm.TS_AcceptChannelV2_get_common_fields(this_ptr); return nativeResponseValue; } - // void AcceptChannelV2_set_second_per_commitment_point(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); + // void AcceptChannelV2_set_common_fields(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKCommonAcceptChannelFields val); /* @internal */ -export function AcceptChannelV2_set_second_per_commitment_point(this_ptr: bigint, val: number): void { +export function AcceptChannelV2_set_common_fields(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannelV2_set_second_per_commitment_point(this_ptr, val); + const nativeResponseValue = wasm.TS_AcceptChannelV2_set_common_fields(this_ptr, val); // debug statements here } - // struct LDKCOption_CVec_u8ZZ AcceptChannelV2_get_shutdown_scriptpubkey(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); + // uint64_t AcceptChannelV2_get_funding_satoshis(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); /* @internal */ -export function AcceptChannelV2_get_shutdown_scriptpubkey(this_ptr: bigint): bigint { +export function AcceptChannelV2_get_funding_satoshis(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannelV2_get_shutdown_scriptpubkey(this_ptr); + const nativeResponseValue = wasm.TS_AcceptChannelV2_get_funding_satoshis(this_ptr); return nativeResponseValue; } - // void AcceptChannelV2_set_shutdown_scriptpubkey(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val); + // void AcceptChannelV2_set_funding_satoshis(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint64_t val); /* @internal */ -export function AcceptChannelV2_set_shutdown_scriptpubkey(this_ptr: bigint, val: bigint): void { +export function AcceptChannelV2_set_funding_satoshis(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannelV2_set_shutdown_scriptpubkey(this_ptr, val); + const nativeResponseValue = wasm.TS_AcceptChannelV2_set_funding_satoshis(this_ptr, val); // debug statements here } - // struct LDKChannelTypeFeatures AcceptChannelV2_get_channel_type(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); + // struct LDKPublicKey AcceptChannelV2_get_second_per_commitment_point(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); /* @internal */ -export function AcceptChannelV2_get_channel_type(this_ptr: bigint): bigint { +export function AcceptChannelV2_get_second_per_commitment_point(this_ptr: bigint): number { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannelV2_get_channel_type(this_ptr); + const nativeResponseValue = wasm.TS_AcceptChannelV2_get_second_per_commitment_point(this_ptr); return nativeResponseValue; } - // void AcceptChannelV2_set_channel_type(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val); + // void AcceptChannelV2_set_second_per_commitment_point(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); /* @internal */ -export function AcceptChannelV2_set_channel_type(this_ptr: bigint, val: bigint): void { +export function AcceptChannelV2_set_second_per_commitment_point(this_ptr: bigint, val: number): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannelV2_set_channel_type(this_ptr, val); + const nativeResponseValue = wasm.TS_AcceptChannelV2_set_second_per_commitment_point(this_ptr, val); // debug statements here } // enum LDKCOption_NoneZ AcceptChannelV2_get_require_confirmed_inputs(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); @@ -34565,13 +37539,13 @@ export function AcceptChannelV2_set_require_confirmed_inputs(this_ptr: bigint, v const nativeResponseValue = wasm.TS_AcceptChannelV2_set_require_confirmed_inputs(this_ptr, val); // debug statements here } - // MUST_USE_RES struct LDKAcceptChannelV2 AcceptChannelV2_new(struct LDKThirtyTwoBytes temporary_channel_id_arg, uint64_t funding_satoshis_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t htlc_minimum_msat_arg, uint32_t minimum_depth_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_basepoint_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, struct LDKPublicKey second_per_commitment_point_arg, struct LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg, enum LDKCOption_NoneZ require_confirmed_inputs_arg); + // MUST_USE_RES struct LDKAcceptChannelV2 AcceptChannelV2_new(struct LDKCommonAcceptChannelFields common_fields_arg, uint64_t funding_satoshis_arg, struct LDKPublicKey second_per_commitment_point_arg, enum LDKCOption_NoneZ require_confirmed_inputs_arg); /* @internal */ -export function AcceptChannelV2_new(temporary_channel_id_arg: number, funding_satoshis_arg: bigint, dust_limit_satoshis_arg: bigint, max_htlc_value_in_flight_msat_arg: bigint, htlc_minimum_msat_arg: bigint, minimum_depth_arg: number, to_self_delay_arg: number, max_accepted_htlcs_arg: number, funding_pubkey_arg: number, revocation_basepoint_arg: number, payment_basepoint_arg: number, delayed_payment_basepoint_arg: number, htlc_basepoint_arg: number, first_per_commitment_point_arg: number, second_per_commitment_point_arg: number, shutdown_scriptpubkey_arg: bigint, channel_type_arg: bigint, require_confirmed_inputs_arg: COption_NoneZ): bigint { +export function AcceptChannelV2_new(common_fields_arg: bigint, funding_satoshis_arg: bigint, second_per_commitment_point_arg: number, require_confirmed_inputs_arg: COption_NoneZ): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_AcceptChannelV2_new(temporary_channel_id_arg, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg, revocation_basepoint_arg, payment_basepoint_arg, delayed_payment_basepoint_arg, htlc_basepoint_arg, first_per_commitment_point_arg, second_per_commitment_point_arg, shutdown_scriptpubkey_arg, channel_type_arg, require_confirmed_inputs_arg); + const nativeResponseValue = wasm.TS_AcceptChannelV2_new(common_fields_arg, funding_satoshis_arg, second_per_commitment_point_arg, require_confirmed_inputs_arg); return nativeResponseValue; } // uint64_t AcceptChannelV2_clone_ptr(LDKAcceptChannelV2 *NONNULL_PTR arg); @@ -34619,18 +37593,18 @@ export function FundingCreated_free(this_obj: bigint): void { const nativeResponseValue = wasm.TS_FundingCreated_free(this_obj); // debug statements here } - // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr); /* @internal */ -export function FundingCreated_get_temporary_channel_id(this_ptr: bigint): number { +export function FundingCreated_get_temporary_channel_id(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_FundingCreated_get_temporary_channel_id(this_ptr); return nativeResponseValue; } - // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKChannelId val); /* @internal */ -export function FundingCreated_set_temporary_channel_id(this_ptr: bigint, val: number): void { +export function FundingCreated_set_temporary_channel_id(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -34691,9 +37665,9 @@ export function FundingCreated_set_signature(this_ptr: bigint, val: number): voi const nativeResponseValue = wasm.TS_FundingCreated_set_signature(this_ptr, val); // debug statements here } - // MUST_USE_RES struct LDKFundingCreated FundingCreated_new(struct LDKThirtyTwoBytes temporary_channel_id_arg, struct LDKThirtyTwoBytes funding_txid_arg, uint16_t funding_output_index_arg, struct LDKECDSASignature signature_arg); + // MUST_USE_RES struct LDKFundingCreated FundingCreated_new(struct LDKChannelId temporary_channel_id_arg, struct LDKThirtyTwoBytes funding_txid_arg, uint16_t funding_output_index_arg, struct LDKECDSASignature signature_arg); /* @internal */ -export function FundingCreated_new(temporary_channel_id_arg: number, funding_txid_arg: number, funding_output_index_arg: number, signature_arg: number): bigint { +export function FundingCreated_new(temporary_channel_id_arg: bigint, funding_txid_arg: number, funding_output_index_arg: number, signature_arg: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -34745,18 +37719,18 @@ export function FundingSigned_free(this_obj: bigint): void { const nativeResponseValue = wasm.TS_FundingSigned_free(this_obj); // debug statements here } - // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr); /* @internal */ -export function FundingSigned_get_channel_id(this_ptr: bigint): number { +export function FundingSigned_get_channel_id(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_FundingSigned_get_channel_id(this_ptr); return nativeResponseValue; } - // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKChannelId val); /* @internal */ -export function FundingSigned_set_channel_id(this_ptr: bigint, val: number): void { +export function FundingSigned_set_channel_id(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -34781,9 +37755,9 @@ export function FundingSigned_set_signature(this_ptr: bigint, val: number): void const nativeResponseValue = wasm.TS_FundingSigned_set_signature(this_ptr, val); // debug statements here } - // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKECDSASignature signature_arg); + // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKChannelId channel_id_arg, struct LDKECDSASignature signature_arg); /* @internal */ -export function FundingSigned_new(channel_id_arg: number, signature_arg: number): bigint { +export function FundingSigned_new(channel_id_arg: bigint, signature_arg: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -34835,18 +37809,18 @@ export function ChannelReady_free(this_obj: bigint): void { const nativeResponseValue = wasm.TS_ChannelReady_free(this_obj); // debug statements here } - // const uint8_t (*ChannelReady_get_channel_id(const struct LDKChannelReady *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId ChannelReady_get_channel_id(const struct LDKChannelReady *NONNULL_PTR this_ptr); /* @internal */ -export function ChannelReady_get_channel_id(this_ptr: bigint): number { +export function ChannelReady_get_channel_id(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_ChannelReady_get_channel_id(this_ptr); return nativeResponseValue; } - // void ChannelReady_set_channel_id(struct LDKChannelReady *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void ChannelReady_set_channel_id(struct LDKChannelReady *NONNULL_PTR this_ptr, struct LDKChannelId val); /* @internal */ -export function ChannelReady_set_channel_id(this_ptr: bigint, val: number): void { +export function ChannelReady_set_channel_id(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -34889,9 +37863,9 @@ export function ChannelReady_set_short_channel_id_alias(this_ptr: bigint, val: b const nativeResponseValue = wasm.TS_ChannelReady_set_short_channel_id_alias(this_ptr, val); // debug statements here } - // MUST_USE_RES struct LDKChannelReady ChannelReady_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg, struct LDKCOption_u64Z short_channel_id_alias_arg); + // MUST_USE_RES struct LDKChannelReady ChannelReady_new(struct LDKChannelId channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg, struct LDKCOption_u64Z short_channel_id_alias_arg); /* @internal */ -export function ChannelReady_new(channel_id_arg: number, next_per_commitment_point_arg: number, short_channel_id_alias_arg: bigint): bigint { +export function ChannelReady_new(channel_id_arg: bigint, next_per_commitment_point_arg: number, short_channel_id_alias_arg: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -34943,18 +37917,18 @@ export function Stfu_free(this_obj: bigint): void { const nativeResponseValue = wasm.TS_Stfu_free(this_obj); // debug statements here } - // const uint8_t (*Stfu_get_channel_id(const struct LDKStfu *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId Stfu_get_channel_id(const struct LDKStfu *NONNULL_PTR this_ptr); /* @internal */ -export function Stfu_get_channel_id(this_ptr: bigint): number { +export function Stfu_get_channel_id(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_Stfu_get_channel_id(this_ptr); return nativeResponseValue; } - // void Stfu_set_channel_id(struct LDKStfu *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void Stfu_set_channel_id(struct LDKStfu *NONNULL_PTR this_ptr, struct LDKChannelId val); /* @internal */ -export function Stfu_set_channel_id(this_ptr: bigint, val: number): void { +export function Stfu_set_channel_id(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -34979,9 +37953,9 @@ export function Stfu_set_initiator(this_ptr: bigint, val: number): void { const nativeResponseValue = wasm.TS_Stfu_set_initiator(this_ptr, val); // debug statements here } - // MUST_USE_RES struct LDKStfu Stfu_new(struct LDKThirtyTwoBytes channel_id_arg, uint8_t initiator_arg); + // MUST_USE_RES struct LDKStfu Stfu_new(struct LDKChannelId channel_id_arg, uint8_t initiator_arg); /* @internal */ -export function Stfu_new(channel_id_arg: number, initiator_arg: number): bigint { +export function Stfu_new(channel_id_arg: bigint, initiator_arg: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -35024,18 +37998,18 @@ export function Splice_free(this_obj: bigint): void { const nativeResponseValue = wasm.TS_Splice_free(this_obj); // debug statements here } - // const uint8_t (*Splice_get_channel_id(const struct LDKSplice *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId Splice_get_channel_id(const struct LDKSplice *NONNULL_PTR this_ptr); /* @internal */ -export function Splice_get_channel_id(this_ptr: bigint): number { +export function Splice_get_channel_id(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_Splice_get_channel_id(this_ptr); return nativeResponseValue; } - // void Splice_set_channel_id(struct LDKSplice *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void Splice_set_channel_id(struct LDKSplice *NONNULL_PTR this_ptr, struct LDKChannelId val); /* @internal */ -export function Splice_set_channel_id(this_ptr: bigint, val: number): void { +export function Splice_set_channel_id(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -35132,9 +38106,9 @@ export function Splice_set_funding_pubkey(this_ptr: bigint, val: number): void { const nativeResponseValue = wasm.TS_Splice_set_funding_pubkey(this_ptr, val); // debug statements here } - // MUST_USE_RES struct LDKSplice Splice_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKThirtyTwoBytes chain_hash_arg, int64_t relative_satoshis_arg, uint32_t funding_feerate_perkw_arg, uint32_t locktime_arg, struct LDKPublicKey funding_pubkey_arg); + // MUST_USE_RES struct LDKSplice Splice_new(struct LDKChannelId channel_id_arg, struct LDKThirtyTwoBytes chain_hash_arg, int64_t relative_satoshis_arg, uint32_t funding_feerate_perkw_arg, uint32_t locktime_arg, struct LDKPublicKey funding_pubkey_arg); /* @internal */ -export function Splice_new(channel_id_arg: number, chain_hash_arg: number, relative_satoshis_arg: bigint, funding_feerate_perkw_arg: number, locktime_arg: number, funding_pubkey_arg: number): bigint { +export function Splice_new(channel_id_arg: bigint, chain_hash_arg: number, relative_satoshis_arg: bigint, funding_feerate_perkw_arg: number, locktime_arg: number, funding_pubkey_arg: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -35177,18 +38151,18 @@ export function SpliceAck_free(this_obj: bigint): void { const nativeResponseValue = wasm.TS_SpliceAck_free(this_obj); // debug statements here } - // const uint8_t (*SpliceAck_get_channel_id(const struct LDKSpliceAck *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId SpliceAck_get_channel_id(const struct LDKSpliceAck *NONNULL_PTR this_ptr); /* @internal */ -export function SpliceAck_get_channel_id(this_ptr: bigint): number { +export function SpliceAck_get_channel_id(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_SpliceAck_get_channel_id(this_ptr); return nativeResponseValue; } - // void SpliceAck_set_channel_id(struct LDKSpliceAck *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void SpliceAck_set_channel_id(struct LDKSpliceAck *NONNULL_PTR this_ptr, struct LDKChannelId val); /* @internal */ -export function SpliceAck_set_channel_id(this_ptr: bigint, val: number): void { +export function SpliceAck_set_channel_id(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -35249,9 +38223,9 @@ export function SpliceAck_set_funding_pubkey(this_ptr: bigint, val: number): voi const nativeResponseValue = wasm.TS_SpliceAck_set_funding_pubkey(this_ptr, val); // debug statements here } - // MUST_USE_RES struct LDKSpliceAck SpliceAck_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKThirtyTwoBytes chain_hash_arg, int64_t relative_satoshis_arg, struct LDKPublicKey funding_pubkey_arg); + // MUST_USE_RES struct LDKSpliceAck SpliceAck_new(struct LDKChannelId channel_id_arg, struct LDKThirtyTwoBytes chain_hash_arg, int64_t relative_satoshis_arg, struct LDKPublicKey funding_pubkey_arg); /* @internal */ -export function SpliceAck_new(channel_id_arg: number, chain_hash_arg: number, relative_satoshis_arg: bigint, funding_pubkey_arg: number): bigint { +export function SpliceAck_new(channel_id_arg: bigint, chain_hash_arg: number, relative_satoshis_arg: bigint, funding_pubkey_arg: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -35294,27 +38268,27 @@ export function SpliceLocked_free(this_obj: bigint): void { const nativeResponseValue = wasm.TS_SpliceLocked_free(this_obj); // debug statements here } - // const uint8_t (*SpliceLocked_get_channel_id(const struct LDKSpliceLocked *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId SpliceLocked_get_channel_id(const struct LDKSpliceLocked *NONNULL_PTR this_ptr); /* @internal */ -export function SpliceLocked_get_channel_id(this_ptr: bigint): number { +export function SpliceLocked_get_channel_id(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_SpliceLocked_get_channel_id(this_ptr); return nativeResponseValue; } - // void SpliceLocked_set_channel_id(struct LDKSpliceLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void SpliceLocked_set_channel_id(struct LDKSpliceLocked *NONNULL_PTR this_ptr, struct LDKChannelId val); /* @internal */ -export function SpliceLocked_set_channel_id(this_ptr: bigint, val: number): void { +export function SpliceLocked_set_channel_id(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_SpliceLocked_set_channel_id(this_ptr, val); // debug statements here } - // MUST_USE_RES struct LDKSpliceLocked SpliceLocked_new(struct LDKThirtyTwoBytes channel_id_arg); + // MUST_USE_RES struct LDKSpliceLocked SpliceLocked_new(struct LDKChannelId channel_id_arg); /* @internal */ -export function SpliceLocked_new(channel_id_arg: number): bigint { +export function SpliceLocked_new(channel_id_arg: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -35357,18 +38331,18 @@ export function TxAddInput_free(this_obj: bigint): void { const nativeResponseValue = wasm.TS_TxAddInput_free(this_obj); // debug statements here } - // const uint8_t (*TxAddInput_get_channel_id(const struct LDKTxAddInput *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId TxAddInput_get_channel_id(const struct LDKTxAddInput *NONNULL_PTR this_ptr); /* @internal */ -export function TxAddInput_get_channel_id(this_ptr: bigint): number { +export function TxAddInput_get_channel_id(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_TxAddInput_get_channel_id(this_ptr); return nativeResponseValue; } - // void TxAddInput_set_channel_id(struct LDKTxAddInput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void TxAddInput_set_channel_id(struct LDKTxAddInput *NONNULL_PTR this_ptr, struct LDKChannelId val); /* @internal */ -export function TxAddInput_set_channel_id(this_ptr: bigint, val: number): void { +export function TxAddInput_set_channel_id(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -35447,9 +38421,9 @@ export function TxAddInput_set_sequence(this_ptr: bigint, val: number): void { const nativeResponseValue = wasm.TS_TxAddInput_set_sequence(this_ptr, val); // debug statements here } - // MUST_USE_RES struct LDKTxAddInput TxAddInput_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t serial_id_arg, struct LDKTransactionU16LenLimited prevtx_arg, uint32_t prevtx_out_arg, uint32_t sequence_arg); + // MUST_USE_RES struct LDKTxAddInput TxAddInput_new(struct LDKChannelId channel_id_arg, uint64_t serial_id_arg, struct LDKTransactionU16LenLimited prevtx_arg, uint32_t prevtx_out_arg, uint32_t sequence_arg); /* @internal */ -export function TxAddInput_new(channel_id_arg: number, serial_id_arg: bigint, prevtx_arg: bigint, prevtx_out_arg: number, sequence_arg: number): bigint { +export function TxAddInput_new(channel_id_arg: bigint, serial_id_arg: bigint, prevtx_arg: bigint, prevtx_out_arg: number, sequence_arg: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -35501,18 +38475,18 @@ export function TxAddOutput_free(this_obj: bigint): void { const nativeResponseValue = wasm.TS_TxAddOutput_free(this_obj); // debug statements here } - // const uint8_t (*TxAddOutput_get_channel_id(const struct LDKTxAddOutput *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId TxAddOutput_get_channel_id(const struct LDKTxAddOutput *NONNULL_PTR this_ptr); /* @internal */ -export function TxAddOutput_get_channel_id(this_ptr: bigint): number { +export function TxAddOutput_get_channel_id(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_TxAddOutput_get_channel_id(this_ptr); return nativeResponseValue; } - // void TxAddOutput_set_channel_id(struct LDKTxAddOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void TxAddOutput_set_channel_id(struct LDKTxAddOutput *NONNULL_PTR this_ptr, struct LDKChannelId val); /* @internal */ -export function TxAddOutput_set_channel_id(this_ptr: bigint, val: number): void { +export function TxAddOutput_set_channel_id(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -35573,9 +38547,9 @@ export function TxAddOutput_set_script(this_ptr: bigint, val: number): void { const nativeResponseValue = wasm.TS_TxAddOutput_set_script(this_ptr, val); // debug statements here } - // MUST_USE_RES struct LDKTxAddOutput TxAddOutput_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t serial_id_arg, uint64_t sats_arg, struct LDKCVec_u8Z script_arg); + // MUST_USE_RES struct LDKTxAddOutput TxAddOutput_new(struct LDKChannelId channel_id_arg, uint64_t serial_id_arg, uint64_t sats_arg, struct LDKCVec_u8Z script_arg); /* @internal */ -export function TxAddOutput_new(channel_id_arg: number, serial_id_arg: bigint, sats_arg: bigint, script_arg: number): bigint { +export function TxAddOutput_new(channel_id_arg: bigint, serial_id_arg: bigint, sats_arg: bigint, script_arg: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -35627,18 +38601,18 @@ export function TxRemoveInput_free(this_obj: bigint): void { const nativeResponseValue = wasm.TS_TxRemoveInput_free(this_obj); // debug statements here } - // const uint8_t (*TxRemoveInput_get_channel_id(const struct LDKTxRemoveInput *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId TxRemoveInput_get_channel_id(const struct LDKTxRemoveInput *NONNULL_PTR this_ptr); /* @internal */ -export function TxRemoveInput_get_channel_id(this_ptr: bigint): number { +export function TxRemoveInput_get_channel_id(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_TxRemoveInput_get_channel_id(this_ptr); return nativeResponseValue; } - // void TxRemoveInput_set_channel_id(struct LDKTxRemoveInput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void TxRemoveInput_set_channel_id(struct LDKTxRemoveInput *NONNULL_PTR this_ptr, struct LDKChannelId val); /* @internal */ -export function TxRemoveInput_set_channel_id(this_ptr: bigint, val: number): void { +export function TxRemoveInput_set_channel_id(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -35663,9 +38637,9 @@ export function TxRemoveInput_set_serial_id(this_ptr: bigint, val: bigint): void const nativeResponseValue = wasm.TS_TxRemoveInput_set_serial_id(this_ptr, val); // debug statements here } - // MUST_USE_RES struct LDKTxRemoveInput TxRemoveInput_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t serial_id_arg); + // MUST_USE_RES struct LDKTxRemoveInput TxRemoveInput_new(struct LDKChannelId channel_id_arg, uint64_t serial_id_arg); /* @internal */ -export function TxRemoveInput_new(channel_id_arg: number, serial_id_arg: bigint): bigint { +export function TxRemoveInput_new(channel_id_arg: bigint, serial_id_arg: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -35717,18 +38691,18 @@ export function TxRemoveOutput_free(this_obj: bigint): void { const nativeResponseValue = wasm.TS_TxRemoveOutput_free(this_obj); // debug statements here } - // const uint8_t (*TxRemoveOutput_get_channel_id(const struct LDKTxRemoveOutput *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId TxRemoveOutput_get_channel_id(const struct LDKTxRemoveOutput *NONNULL_PTR this_ptr); /* @internal */ -export function TxRemoveOutput_get_channel_id(this_ptr: bigint): number { +export function TxRemoveOutput_get_channel_id(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_TxRemoveOutput_get_channel_id(this_ptr); return nativeResponseValue; } - // void TxRemoveOutput_set_channel_id(struct LDKTxRemoveOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void TxRemoveOutput_set_channel_id(struct LDKTxRemoveOutput *NONNULL_PTR this_ptr, struct LDKChannelId val); /* @internal */ -export function TxRemoveOutput_set_channel_id(this_ptr: bigint, val: number): void { +export function TxRemoveOutput_set_channel_id(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -35753,9 +38727,9 @@ export function TxRemoveOutput_set_serial_id(this_ptr: bigint, val: bigint): voi const nativeResponseValue = wasm.TS_TxRemoveOutput_set_serial_id(this_ptr, val); // debug statements here } - // MUST_USE_RES struct LDKTxRemoveOutput TxRemoveOutput_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t serial_id_arg); + // MUST_USE_RES struct LDKTxRemoveOutput TxRemoveOutput_new(struct LDKChannelId channel_id_arg, uint64_t serial_id_arg); /* @internal */ -export function TxRemoveOutput_new(channel_id_arg: number, serial_id_arg: bigint): bigint { +export function TxRemoveOutput_new(channel_id_arg: bigint, serial_id_arg: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -35807,27 +38781,27 @@ export function TxComplete_free(this_obj: bigint): void { const nativeResponseValue = wasm.TS_TxComplete_free(this_obj); // debug statements here } - // const uint8_t (*TxComplete_get_channel_id(const struct LDKTxComplete *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId TxComplete_get_channel_id(const struct LDKTxComplete *NONNULL_PTR this_ptr); /* @internal */ -export function TxComplete_get_channel_id(this_ptr: bigint): number { +export function TxComplete_get_channel_id(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_TxComplete_get_channel_id(this_ptr); return nativeResponseValue; } - // void TxComplete_set_channel_id(struct LDKTxComplete *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void TxComplete_set_channel_id(struct LDKTxComplete *NONNULL_PTR this_ptr, struct LDKChannelId val); /* @internal */ -export function TxComplete_set_channel_id(this_ptr: bigint, val: number): void { +export function TxComplete_set_channel_id(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_TxComplete_set_channel_id(this_ptr, val); // debug statements here } - // MUST_USE_RES struct LDKTxComplete TxComplete_new(struct LDKThirtyTwoBytes channel_id_arg); + // MUST_USE_RES struct LDKTxComplete TxComplete_new(struct LDKChannelId channel_id_arg); /* @internal */ -export function TxComplete_new(channel_id_arg: number): bigint { +export function TxComplete_new(channel_id_arg: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -35879,18 +38853,18 @@ export function TxSignatures_free(this_obj: bigint): void { const nativeResponseValue = wasm.TS_TxSignatures_free(this_obj); // debug statements here } - // const uint8_t (*TxSignatures_get_channel_id(const struct LDKTxSignatures *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId TxSignatures_get_channel_id(const struct LDKTxSignatures *NONNULL_PTR this_ptr); /* @internal */ -export function TxSignatures_get_channel_id(this_ptr: bigint): number { +export function TxSignatures_get_channel_id(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_TxSignatures_get_channel_id(this_ptr); return nativeResponseValue; } - // void TxSignatures_set_channel_id(struct LDKTxSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void TxSignatures_set_channel_id(struct LDKTxSignatures *NONNULL_PTR this_ptr, struct LDKChannelId val); /* @internal */ -export function TxSignatures_set_channel_id(this_ptr: bigint, val: number): void { +export function TxSignatures_set_channel_id(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -35933,13 +38907,31 @@ export function TxSignatures_set_witnesses(this_ptr: bigint, val: number): void const nativeResponseValue = wasm.TS_TxSignatures_set_witnesses(this_ptr, val); // debug statements here } - // MUST_USE_RES struct LDKTxSignatures TxSignatures_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKThirtyTwoBytes tx_hash_arg, struct LDKCVec_WitnessZ witnesses_arg); + // struct LDKCOption_ECDSASignatureZ TxSignatures_get_funding_outpoint_sig(const struct LDKTxSignatures *NONNULL_PTR this_ptr); /* @internal */ -export function TxSignatures_new(channel_id_arg: number, tx_hash_arg: number, witnesses_arg: number): bigint { +export function TxSignatures_get_funding_outpoint_sig(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_TxSignatures_new(channel_id_arg, tx_hash_arg, witnesses_arg); + const nativeResponseValue = wasm.TS_TxSignatures_get_funding_outpoint_sig(this_ptr); + return nativeResponseValue; +} + // void TxSignatures_set_funding_outpoint_sig(struct LDKTxSignatures *NONNULL_PTR this_ptr, struct LDKCOption_ECDSASignatureZ val); +/* @internal */ +export function TxSignatures_set_funding_outpoint_sig(this_ptr: bigint, val: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_TxSignatures_set_funding_outpoint_sig(this_ptr, val); + // debug statements here +} + // MUST_USE_RES struct LDKTxSignatures TxSignatures_new(struct LDKChannelId channel_id_arg, struct LDKThirtyTwoBytes tx_hash_arg, struct LDKCVec_WitnessZ witnesses_arg, struct LDKCOption_ECDSASignatureZ funding_outpoint_sig_arg); +/* @internal */ +export function TxSignatures_new(channel_id_arg: bigint, tx_hash_arg: number, witnesses_arg: number, funding_outpoint_sig_arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_TxSignatures_new(channel_id_arg, tx_hash_arg, witnesses_arg, funding_outpoint_sig_arg); return nativeResponseValue; } // uint64_t TxSignatures_clone_ptr(LDKTxSignatures *NONNULL_PTR arg); @@ -35987,18 +38979,18 @@ export function TxInitRbf_free(this_obj: bigint): void { const nativeResponseValue = wasm.TS_TxInitRbf_free(this_obj); // debug statements here } - // const uint8_t (*TxInitRbf_get_channel_id(const struct LDKTxInitRbf *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId TxInitRbf_get_channel_id(const struct LDKTxInitRbf *NONNULL_PTR this_ptr); /* @internal */ -export function TxInitRbf_get_channel_id(this_ptr: bigint): number { +export function TxInitRbf_get_channel_id(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_TxInitRbf_get_channel_id(this_ptr); return nativeResponseValue; } - // void TxInitRbf_set_channel_id(struct LDKTxInitRbf *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void TxInitRbf_set_channel_id(struct LDKTxInitRbf *NONNULL_PTR this_ptr, struct LDKChannelId val); /* @internal */ -export function TxInitRbf_set_channel_id(this_ptr: bigint, val: number): void { +export function TxInitRbf_set_channel_id(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -36059,9 +39051,9 @@ export function TxInitRbf_set_funding_output_contribution(this_ptr: bigint, val: const nativeResponseValue = wasm.TS_TxInitRbf_set_funding_output_contribution(this_ptr, val); // debug statements here } - // MUST_USE_RES struct LDKTxInitRbf TxInitRbf_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t locktime_arg, uint32_t feerate_sat_per_1000_weight_arg, struct LDKCOption_i64Z funding_output_contribution_arg); + // MUST_USE_RES struct LDKTxInitRbf TxInitRbf_new(struct LDKChannelId channel_id_arg, uint32_t locktime_arg, uint32_t feerate_sat_per_1000_weight_arg, struct LDKCOption_i64Z funding_output_contribution_arg); /* @internal */ -export function TxInitRbf_new(channel_id_arg: number, locktime_arg: number, feerate_sat_per_1000_weight_arg: number, funding_output_contribution_arg: bigint): bigint { +export function TxInitRbf_new(channel_id_arg: bigint, locktime_arg: number, feerate_sat_per_1000_weight_arg: number, funding_output_contribution_arg: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -36113,18 +39105,18 @@ export function TxAckRbf_free(this_obj: bigint): void { const nativeResponseValue = wasm.TS_TxAckRbf_free(this_obj); // debug statements here } - // const uint8_t (*TxAckRbf_get_channel_id(const struct LDKTxAckRbf *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId TxAckRbf_get_channel_id(const struct LDKTxAckRbf *NONNULL_PTR this_ptr); /* @internal */ -export function TxAckRbf_get_channel_id(this_ptr: bigint): number { +export function TxAckRbf_get_channel_id(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_TxAckRbf_get_channel_id(this_ptr); return nativeResponseValue; } - // void TxAckRbf_set_channel_id(struct LDKTxAckRbf *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void TxAckRbf_set_channel_id(struct LDKTxAckRbf *NONNULL_PTR this_ptr, struct LDKChannelId val); /* @internal */ -export function TxAckRbf_set_channel_id(this_ptr: bigint, val: number): void { +export function TxAckRbf_set_channel_id(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -36149,9 +39141,9 @@ export function TxAckRbf_set_funding_output_contribution(this_ptr: bigint, val: const nativeResponseValue = wasm.TS_TxAckRbf_set_funding_output_contribution(this_ptr, val); // debug statements here } - // MUST_USE_RES struct LDKTxAckRbf TxAckRbf_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCOption_i64Z funding_output_contribution_arg); + // MUST_USE_RES struct LDKTxAckRbf TxAckRbf_new(struct LDKChannelId channel_id_arg, struct LDKCOption_i64Z funding_output_contribution_arg); /* @internal */ -export function TxAckRbf_new(channel_id_arg: number, funding_output_contribution_arg: bigint): bigint { +export function TxAckRbf_new(channel_id_arg: bigint, funding_output_contribution_arg: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -36203,18 +39195,18 @@ export function TxAbort_free(this_obj: bigint): void { const nativeResponseValue = wasm.TS_TxAbort_free(this_obj); // debug statements here } - // const uint8_t (*TxAbort_get_channel_id(const struct LDKTxAbort *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId TxAbort_get_channel_id(const struct LDKTxAbort *NONNULL_PTR this_ptr); /* @internal */ -export function TxAbort_get_channel_id(this_ptr: bigint): number { +export function TxAbort_get_channel_id(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_TxAbort_get_channel_id(this_ptr); return nativeResponseValue; } - // void TxAbort_set_channel_id(struct LDKTxAbort *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void TxAbort_set_channel_id(struct LDKTxAbort *NONNULL_PTR this_ptr, struct LDKChannelId val); /* @internal */ -export function TxAbort_set_channel_id(this_ptr: bigint, val: number): void { +export function TxAbort_set_channel_id(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -36239,9 +39231,9 @@ export function TxAbort_set_data(this_ptr: bigint, val: number): void { const nativeResponseValue = wasm.TS_TxAbort_set_data(this_ptr, val); // debug statements here } - // MUST_USE_RES struct LDKTxAbort TxAbort_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z data_arg); + // MUST_USE_RES struct LDKTxAbort TxAbort_new(struct LDKChannelId channel_id_arg, struct LDKCVec_u8Z data_arg); /* @internal */ -export function TxAbort_new(channel_id_arg: number, data_arg: number): bigint { +export function TxAbort_new(channel_id_arg: bigint, data_arg: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -36293,18 +39285,18 @@ export function Shutdown_free(this_obj: bigint): void { const nativeResponseValue = wasm.TS_Shutdown_free(this_obj); // debug statements here } - // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr); /* @internal */ -export function Shutdown_get_channel_id(this_ptr: bigint): number { +export function Shutdown_get_channel_id(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_Shutdown_get_channel_id(this_ptr); return nativeResponseValue; } - // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKChannelId val); /* @internal */ -export function Shutdown_set_channel_id(this_ptr: bigint, val: number): void { +export function Shutdown_set_channel_id(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -36329,9 +39321,9 @@ export function Shutdown_set_scriptpubkey(this_ptr: bigint, val: number): void { const nativeResponseValue = wasm.TS_Shutdown_set_scriptpubkey(this_ptr, val); // debug statements here } - // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg); + // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKChannelId channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg); /* @internal */ -export function Shutdown_new(channel_id_arg: number, scriptpubkey_arg: number): bigint { +export function Shutdown_new(channel_id_arg: bigint, scriptpubkey_arg: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -36473,18 +39465,18 @@ export function ClosingSigned_free(this_obj: bigint): void { const nativeResponseValue = wasm.TS_ClosingSigned_free(this_obj); // debug statements here } - // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr); /* @internal */ -export function ClosingSigned_get_channel_id(this_ptr: bigint): number { +export function ClosingSigned_get_channel_id(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_ClosingSigned_get_channel_id(this_ptr); return nativeResponseValue; } - // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKChannelId val); /* @internal */ -export function ClosingSigned_set_channel_id(this_ptr: bigint, val: number): void { +export function ClosingSigned_set_channel_id(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -36545,9 +39537,9 @@ export function ClosingSigned_set_fee_range(this_ptr: bigint, val: bigint): void const nativeResponseValue = wasm.TS_ClosingSigned_set_fee_range(this_ptr, val); // debug statements here } - // MUST_USE_RES struct LDKClosingSigned ClosingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t fee_satoshis_arg, struct LDKECDSASignature signature_arg, struct LDKClosingSignedFeeRange fee_range_arg); + // MUST_USE_RES struct LDKClosingSigned ClosingSigned_new(struct LDKChannelId channel_id_arg, uint64_t fee_satoshis_arg, struct LDKECDSASignature signature_arg, struct LDKClosingSignedFeeRange fee_range_arg); /* @internal */ -export function ClosingSigned_new(channel_id_arg: number, fee_satoshis_arg: bigint, signature_arg: number, fee_range_arg: bigint): bigint { +export function ClosingSigned_new(channel_id_arg: bigint, fee_satoshis_arg: bigint, signature_arg: number, fee_range_arg: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -36599,18 +39591,18 @@ export function UpdateAddHTLC_free(this_obj: bigint): void { const nativeResponseValue = wasm.TS_UpdateAddHTLC_free(this_obj); // debug statements here } - // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr); /* @internal */ -export function UpdateAddHTLC_get_channel_id(this_ptr: bigint): number { +export function UpdateAddHTLC_get_channel_id(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_UpdateAddHTLC_get_channel_id(this_ptr); return nativeResponseValue; } - // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKChannelId val); /* @internal */ -export function UpdateAddHTLC_set_channel_id(this_ptr: bigint, val: number): void { +export function UpdateAddHTLC_set_channel_id(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -36743,9 +39735,9 @@ export function UpdateAddHTLC_set_blinding_point(this_ptr: bigint, val: number): const nativeResponseValue = wasm.TS_UpdateAddHTLC_set_blinding_point(this_ptr, val); // debug statements here } - // MUST_USE_RES struct LDKUpdateAddHTLC UpdateAddHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, uint64_t amount_msat_arg, struct LDKThirtyTwoBytes payment_hash_arg, uint32_t cltv_expiry_arg, struct LDKCOption_u64Z skimmed_fee_msat_arg, struct LDKOnionPacket onion_routing_packet_arg, struct LDKPublicKey blinding_point_arg); + // MUST_USE_RES struct LDKUpdateAddHTLC UpdateAddHTLC_new(struct LDKChannelId channel_id_arg, uint64_t htlc_id_arg, uint64_t amount_msat_arg, struct LDKThirtyTwoBytes payment_hash_arg, uint32_t cltv_expiry_arg, struct LDKCOption_u64Z skimmed_fee_msat_arg, struct LDKOnionPacket onion_routing_packet_arg, struct LDKPublicKey blinding_point_arg); /* @internal */ -export function UpdateAddHTLC_new(channel_id_arg: number, htlc_id_arg: bigint, amount_msat_arg: bigint, payment_hash_arg: number, cltv_expiry_arg: number, skimmed_fee_msat_arg: bigint, onion_routing_packet_arg: bigint, blinding_point_arg: number): bigint { +export function UpdateAddHTLC_new(channel_id_arg: bigint, htlc_id_arg: bigint, amount_msat_arg: bigint, payment_hash_arg: number, cltv_expiry_arg: number, skimmed_fee_msat_arg: bigint, onion_routing_packet_arg: bigint, blinding_point_arg: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -36887,18 +39879,18 @@ export function UpdateFulfillHTLC_free(this_obj: bigint): void { const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_free(this_obj); // debug statements here } - // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr); /* @internal */ -export function UpdateFulfillHTLC_get_channel_id(this_ptr: bigint): number { +export function UpdateFulfillHTLC_get_channel_id(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_get_channel_id(this_ptr); return nativeResponseValue; } - // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKChannelId val); /* @internal */ -export function UpdateFulfillHTLC_set_channel_id(this_ptr: bigint, val: number): void { +export function UpdateFulfillHTLC_set_channel_id(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -36941,9 +39933,9 @@ export function UpdateFulfillHTLC_set_payment_preimage(this_ptr: bigint, val: nu const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_set_payment_preimage(this_ptr, val); // debug statements here } - // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg); + // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKChannelId channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg); /* @internal */ -export function UpdateFulfillHTLC_new(channel_id_arg: number, htlc_id_arg: bigint, payment_preimage_arg: number): bigint { +export function UpdateFulfillHTLC_new(channel_id_arg: bigint, htlc_id_arg: bigint, payment_preimage_arg: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -36995,18 +39987,18 @@ export function UpdateFailHTLC_free(this_obj: bigint): void { const nativeResponseValue = wasm.TS_UpdateFailHTLC_free(this_obj); // debug statements here } - // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr); /* @internal */ -export function UpdateFailHTLC_get_channel_id(this_ptr: bigint): number { +export function UpdateFailHTLC_get_channel_id(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_UpdateFailHTLC_get_channel_id(this_ptr); return nativeResponseValue; } - // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKChannelId val); /* @internal */ -export function UpdateFailHTLC_set_channel_id(this_ptr: bigint, val: number): void { +export function UpdateFailHTLC_set_channel_id(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -37076,18 +40068,18 @@ export function UpdateFailMalformedHTLC_free(this_obj: bigint): void { const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_free(this_obj); // debug statements here } - // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr); /* @internal */ -export function UpdateFailMalformedHTLC_get_channel_id(this_ptr: bigint): number { +export function UpdateFailMalformedHTLC_get_channel_id(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_get_channel_id(this_ptr); return nativeResponseValue; } - // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKChannelId val); /* @internal */ -export function UpdateFailMalformedHTLC_set_channel_id(this_ptr: bigint, val: number): void { +export function UpdateFailMalformedHTLC_set_channel_id(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -37175,18 +40167,18 @@ export function CommitmentSigned_free(this_obj: bigint): void { const nativeResponseValue = wasm.TS_CommitmentSigned_free(this_obj); // debug statements here } - // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr); /* @internal */ -export function CommitmentSigned_get_channel_id(this_ptr: bigint): number { +export function CommitmentSigned_get_channel_id(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_CommitmentSigned_get_channel_id(this_ptr); return nativeResponseValue; } - // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKChannelId val); /* @internal */ -export function CommitmentSigned_set_channel_id(this_ptr: bigint, val: number): void { +export function CommitmentSigned_set_channel_id(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -37229,9 +40221,9 @@ export function CommitmentSigned_set_htlc_signatures(this_ptr: bigint, val: numb const nativeResponseValue = wasm.TS_CommitmentSigned_set_htlc_signatures(this_ptr, val); // debug statements here } - // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKECDSASignature signature_arg, struct LDKCVec_ECDSASignatureZ htlc_signatures_arg); + // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKChannelId channel_id_arg, struct LDKECDSASignature signature_arg, struct LDKCVec_ECDSASignatureZ htlc_signatures_arg); /* @internal */ -export function CommitmentSigned_new(channel_id_arg: number, signature_arg: number, htlc_signatures_arg: number): bigint { +export function CommitmentSigned_new(channel_id_arg: bigint, signature_arg: number, htlc_signatures_arg: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -37283,18 +40275,18 @@ export function RevokeAndACK_free(this_obj: bigint): void { const nativeResponseValue = wasm.TS_RevokeAndACK_free(this_obj); // debug statements here } - // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr); /* @internal */ -export function RevokeAndACK_get_channel_id(this_ptr: bigint): number { +export function RevokeAndACK_get_channel_id(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_RevokeAndACK_get_channel_id(this_ptr); return nativeResponseValue; } - // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKChannelId val); /* @internal */ -export function RevokeAndACK_set_channel_id(this_ptr: bigint, val: number): void { +export function RevokeAndACK_set_channel_id(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -37337,9 +40329,9 @@ export function RevokeAndACK_set_next_per_commitment_point(this_ptr: bigint, val const nativeResponseValue = wasm.TS_RevokeAndACK_set_next_per_commitment_point(this_ptr, val); // debug statements here } - // MUST_USE_RES struct LDKRevokeAndACK RevokeAndACK_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKThirtyTwoBytes per_commitment_secret_arg, struct LDKPublicKey next_per_commitment_point_arg); + // MUST_USE_RES struct LDKRevokeAndACK RevokeAndACK_new(struct LDKChannelId channel_id_arg, struct LDKThirtyTwoBytes per_commitment_secret_arg, struct LDKPublicKey next_per_commitment_point_arg); /* @internal */ -export function RevokeAndACK_new(channel_id_arg: number, per_commitment_secret_arg: number, next_per_commitment_point_arg: number): bigint { +export function RevokeAndACK_new(channel_id_arg: bigint, per_commitment_secret_arg: number, next_per_commitment_point_arg: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -37391,18 +40383,18 @@ export function UpdateFee_free(this_obj: bigint): void { const nativeResponseValue = wasm.TS_UpdateFee_free(this_obj); // debug statements here } - // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr); /* @internal */ -export function UpdateFee_get_channel_id(this_ptr: bigint): number { +export function UpdateFee_get_channel_id(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_UpdateFee_get_channel_id(this_ptr); return nativeResponseValue; } - // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKChannelId val); /* @internal */ -export function UpdateFee_set_channel_id(this_ptr: bigint, val: number): void { +export function UpdateFee_set_channel_id(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -37427,9 +40419,9 @@ export function UpdateFee_set_feerate_per_kw(this_ptr: bigint, val: number): voi const nativeResponseValue = wasm.TS_UpdateFee_set_feerate_per_kw(this_ptr, val); // debug statements here } - // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg); + // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKChannelId channel_id_arg, uint32_t feerate_per_kw_arg); /* @internal */ -export function UpdateFee_new(channel_id_arg: number, feerate_per_kw_arg: number): bigint { +export function UpdateFee_new(channel_id_arg: bigint, feerate_per_kw_arg: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -37481,18 +40473,18 @@ export function ChannelReestablish_free(this_obj: bigint): void { const nativeResponseValue = wasm.TS_ChannelReestablish_free(this_obj); // debug statements here } - // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr); /* @internal */ -export function ChannelReestablish_get_channel_id(this_ptr: bigint): number { +export function ChannelReestablish_get_channel_id(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_ChannelReestablish_get_channel_id(this_ptr); return nativeResponseValue; } - // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKChannelId val); /* @internal */ -export function ChannelReestablish_set_channel_id(this_ptr: bigint, val: number): void { +export function ChannelReestablish_set_channel_id(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -37589,9 +40581,9 @@ export function ChannelReestablish_set_next_funding_txid(this_ptr: bigint, val: const nativeResponseValue = wasm.TS_ChannelReestablish_set_next_funding_txid(this_ptr, val); // debug statements here } - // MUST_USE_RES struct LDKChannelReestablish ChannelReestablish_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t next_local_commitment_number_arg, uint64_t next_remote_commitment_number_arg, struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg, struct LDKCOption_ThirtyTwoBytesZ next_funding_txid_arg); + // MUST_USE_RES struct LDKChannelReestablish ChannelReestablish_new(struct LDKChannelId channel_id_arg, uint64_t next_local_commitment_number_arg, uint64_t next_remote_commitment_number_arg, struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg, struct LDKCOption_ThirtyTwoBytesZ next_funding_txid_arg); /* @internal */ -export function ChannelReestablish_new(channel_id_arg: number, next_local_commitment_number_arg: bigint, next_remote_commitment_number_arg: bigint, your_last_per_commitment_secret_arg: number, my_current_per_commitment_point_arg: number, next_funding_txid_arg: bigint): bigint { +export function ChannelReestablish_new(channel_id_arg: bigint, next_local_commitment_number_arg: bigint, next_remote_commitment_number_arg: bigint, your_last_per_commitment_secret_arg: number, my_current_per_commitment_point_arg: number, next_funding_txid_arg: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -37643,18 +40635,18 @@ export function AnnouncementSignatures_free(this_obj: bigint): void { const nativeResponseValue = wasm.TS_AnnouncementSignatures_free(this_obj); // debug statements here } - // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr); /* @internal */ -export function AnnouncementSignatures_get_channel_id(this_ptr: bigint): number { +export function AnnouncementSignatures_get_channel_id(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_AnnouncementSignatures_get_channel_id(this_ptr); return nativeResponseValue; } - // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKChannelId val); /* @internal */ -export function AnnouncementSignatures_set_channel_id(this_ptr: bigint, val: number): void { +export function AnnouncementSignatures_set_channel_id(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -37715,9 +40707,9 @@ export function AnnouncementSignatures_set_bitcoin_signature(this_ptr: bigint, v const nativeResponseValue = wasm.TS_AnnouncementSignatures_set_bitcoin_signature(this_ptr, val); // debug statements here } - // MUST_USE_RES struct LDKAnnouncementSignatures AnnouncementSignatures_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t short_channel_id_arg, struct LDKECDSASignature node_signature_arg, struct LDKECDSASignature bitcoin_signature_arg); + // MUST_USE_RES struct LDKAnnouncementSignatures AnnouncementSignatures_new(struct LDKChannelId channel_id_arg, uint64_t short_channel_id_arg, struct LDKECDSASignature node_signature_arg, struct LDKECDSASignature bitcoin_signature_arg); /* @internal */ -export function AnnouncementSignatures_new(channel_id_arg: number, short_channel_id_arg: bigint, node_signature_arg: number, bitcoin_signature_arg: number): bigint { +export function AnnouncementSignatures_new(channel_id_arg: bigint, short_channel_id_arg: bigint, node_signature_arg: number, bitcoin_signature_arg: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -38128,6 +41120,51 @@ export function UnsignedNodeAnnouncement_set_addresses(this_ptr: bigint, val: nu } const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_set_addresses(this_ptr, val); // debug statements here +} + // struct LDKCVec_u8Z UnsignedNodeAnnouncement_get_excess_address_data(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr); +/* @internal */ +export function UnsignedNodeAnnouncement_get_excess_address_data(this_ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_get_excess_address_data(this_ptr); + return nativeResponseValue; +} + // void UnsignedNodeAnnouncement_set_excess_address_data(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val); +/* @internal */ +export function UnsignedNodeAnnouncement_set_excess_address_data(this_ptr: bigint, val: number): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_set_excess_address_data(this_ptr, val); + // debug statements here +} + // struct LDKCVec_u8Z UnsignedNodeAnnouncement_get_excess_data(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr); +/* @internal */ +export function UnsignedNodeAnnouncement_get_excess_data(this_ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_get_excess_data(this_ptr); + return nativeResponseValue; +} + // void UnsignedNodeAnnouncement_set_excess_data(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val); +/* @internal */ +export function UnsignedNodeAnnouncement_set_excess_data(this_ptr: bigint, val: number): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_set_excess_data(this_ptr, val); + // debug statements here +} + // MUST_USE_RES struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_new(struct LDKNodeFeatures features_arg, uint32_t timestamp_arg, struct LDKNodeId node_id_arg, struct LDKThreeBytes rgb_arg, struct LDKNodeAlias alias_arg, struct LDKCVec_SocketAddressZ addresses_arg, struct LDKCVec_u8Z excess_address_data_arg, struct LDKCVec_u8Z excess_data_arg); +/* @internal */ +export function UnsignedNodeAnnouncement_new(features_arg: bigint, timestamp_arg: number, node_id_arg: bigint, rgb_arg: number, alias_arg: bigint, addresses_arg: number, excess_address_data_arg: number, excess_data_arg: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_new(features_arg, timestamp_arg, node_id_arg, rgb_arg, alias_arg, addresses_arg, excess_address_data_arg, excess_data_arg); + return nativeResponseValue; } // uint64_t UnsignedNodeAnnouncement_clone_ptr(LDKUnsignedNodeAnnouncement *NONNULL_PTR arg); /* @internal */ @@ -39991,6 +43028,141 @@ export function OnionPacket_eq(a: bigint, b: bigint): boolean { } const nativeResponseValue = wasm.TS_OnionPacket_eq(a, b); return nativeResponseValue; +} + // void TrampolineOnionPacket_free(struct LDKTrampolineOnionPacket this_obj); +/* @internal */ +export function TrampolineOnionPacket_free(this_obj: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_TrampolineOnionPacket_free(this_obj); + // debug statements here +} + // uint8_t TrampolineOnionPacket_get_version(const struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr); +/* @internal */ +export function TrampolineOnionPacket_get_version(this_ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_TrampolineOnionPacket_get_version(this_ptr); + return nativeResponseValue; +} + // void TrampolineOnionPacket_set_version(struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr, uint8_t val); +/* @internal */ +export function TrampolineOnionPacket_set_version(this_ptr: bigint, val: number): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_TrampolineOnionPacket_set_version(this_ptr, val); + // debug statements here +} + // struct LDKPublicKey TrampolineOnionPacket_get_public_key(const struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr); +/* @internal */ +export function TrampolineOnionPacket_get_public_key(this_ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_TrampolineOnionPacket_get_public_key(this_ptr); + return nativeResponseValue; +} + // void TrampolineOnionPacket_set_public_key(struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr, struct LDKPublicKey val); +/* @internal */ +export function TrampolineOnionPacket_set_public_key(this_ptr: bigint, val: number): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_TrampolineOnionPacket_set_public_key(this_ptr, val); + // debug statements here +} + // struct LDKCVec_u8Z TrampolineOnionPacket_get_hop_data(const struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr); +/* @internal */ +export function TrampolineOnionPacket_get_hop_data(this_ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_TrampolineOnionPacket_get_hop_data(this_ptr); + return nativeResponseValue; +} + // void TrampolineOnionPacket_set_hop_data(struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val); +/* @internal */ +export function TrampolineOnionPacket_set_hop_data(this_ptr: bigint, val: number): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_TrampolineOnionPacket_set_hop_data(this_ptr, val); + // debug statements here +} + // const uint8_t (*TrampolineOnionPacket_get_hmac(const struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr))[32]; +/* @internal */ +export function TrampolineOnionPacket_get_hmac(this_ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_TrampolineOnionPacket_get_hmac(this_ptr); + return nativeResponseValue; +} + // void TrampolineOnionPacket_set_hmac(struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); +/* @internal */ +export function TrampolineOnionPacket_set_hmac(this_ptr: bigint, val: number): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_TrampolineOnionPacket_set_hmac(this_ptr, val); + // debug statements here +} + // MUST_USE_RES struct LDKTrampolineOnionPacket TrampolineOnionPacket_new(uint8_t version_arg, struct LDKPublicKey public_key_arg, struct LDKCVec_u8Z hop_data_arg, struct LDKThirtyTwoBytes hmac_arg); +/* @internal */ +export function TrampolineOnionPacket_new(version_arg: number, public_key_arg: number, hop_data_arg: number, hmac_arg: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_TrampolineOnionPacket_new(version_arg, public_key_arg, hop_data_arg, hmac_arg); + return nativeResponseValue; +} + // uint64_t TrampolineOnionPacket_clone_ptr(LDKTrampolineOnionPacket *NONNULL_PTR arg); +/* @internal */ +export function TrampolineOnionPacket_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_TrampolineOnionPacket_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKTrampolineOnionPacket TrampolineOnionPacket_clone(const struct LDKTrampolineOnionPacket *NONNULL_PTR orig); +/* @internal */ +export function TrampolineOnionPacket_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_TrampolineOnionPacket_clone(orig); + return nativeResponseValue; +} + // uint64_t TrampolineOnionPacket_hash(const struct LDKTrampolineOnionPacket *NONNULL_PTR o); +/* @internal */ +export function TrampolineOnionPacket_hash(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_TrampolineOnionPacket_hash(o); + return nativeResponseValue; +} + // bool TrampolineOnionPacket_eq(const struct LDKTrampolineOnionPacket *NONNULL_PTR a, const struct LDKTrampolineOnionPacket *NONNULL_PTR b); +/* @internal */ +export function TrampolineOnionPacket_eq(a: bigint, b: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_TrampolineOnionPacket_eq(a, b); + return nativeResponseValue; +} + // struct LDKCVec_u8Z TrampolineOnionPacket_write(const struct LDKTrampolineOnionPacket *NONNULL_PTR obj); +/* @internal */ +export function TrampolineOnionPacket_write(obj: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_TrampolineOnionPacket_write(obj); + return nativeResponseValue; } // struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj); /* @internal */ @@ -41170,6 +44342,96 @@ export function SocketDescriptor_free(this_ptr: bigint): void { } const nativeResponseValue = wasm.TS_SocketDescriptor_free(this_ptr); // debug statements here +} + // void PeerDetails_free(struct LDKPeerDetails this_obj); +/* @internal */ +export function PeerDetails_free(this_obj: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_PeerDetails_free(this_obj); + // debug statements here +} + // struct LDKPublicKey PeerDetails_get_counterparty_node_id(const struct LDKPeerDetails *NONNULL_PTR this_ptr); +/* @internal */ +export function PeerDetails_get_counterparty_node_id(this_ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_PeerDetails_get_counterparty_node_id(this_ptr); + return nativeResponseValue; +} + // void PeerDetails_set_counterparty_node_id(struct LDKPeerDetails *NONNULL_PTR this_ptr, struct LDKPublicKey val); +/* @internal */ +export function PeerDetails_set_counterparty_node_id(this_ptr: bigint, val: number): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_PeerDetails_set_counterparty_node_id(this_ptr, val); + // debug statements here +} + // struct LDKCOption_SocketAddressZ PeerDetails_get_socket_address(const struct LDKPeerDetails *NONNULL_PTR this_ptr); +/* @internal */ +export function PeerDetails_get_socket_address(this_ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_PeerDetails_get_socket_address(this_ptr); + return nativeResponseValue; +} + // void PeerDetails_set_socket_address(struct LDKPeerDetails *NONNULL_PTR this_ptr, struct LDKCOption_SocketAddressZ val); +/* @internal */ +export function PeerDetails_set_socket_address(this_ptr: bigint, val: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_PeerDetails_set_socket_address(this_ptr, val); + // debug statements here +} + // struct LDKInitFeatures PeerDetails_get_init_features(const struct LDKPeerDetails *NONNULL_PTR this_ptr); +/* @internal */ +export function PeerDetails_get_init_features(this_ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_PeerDetails_get_init_features(this_ptr); + return nativeResponseValue; +} + // void PeerDetails_set_init_features(struct LDKPeerDetails *NONNULL_PTR this_ptr, struct LDKInitFeatures val); +/* @internal */ +export function PeerDetails_set_init_features(this_ptr: bigint, val: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_PeerDetails_set_init_features(this_ptr, val); + // debug statements here +} + // bool PeerDetails_get_is_inbound_connection(const struct LDKPeerDetails *NONNULL_PTR this_ptr); +/* @internal */ +export function PeerDetails_get_is_inbound_connection(this_ptr: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_PeerDetails_get_is_inbound_connection(this_ptr); + return nativeResponseValue; +} + // void PeerDetails_set_is_inbound_connection(struct LDKPeerDetails *NONNULL_PTR this_ptr, bool val); +/* @internal */ +export function PeerDetails_set_is_inbound_connection(this_ptr: bigint, val: boolean): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_PeerDetails_set_is_inbound_connection(this_ptr, val); + // debug statements here +} + // MUST_USE_RES struct LDKPeerDetails PeerDetails_new(struct LDKPublicKey counterparty_node_id_arg, struct LDKCOption_SocketAddressZ socket_address_arg, struct LDKInitFeatures init_features_arg, bool is_inbound_connection_arg); +/* @internal */ +export function PeerDetails_new(counterparty_node_id_arg: number, socket_address_arg: bigint, init_features_arg: bigint, is_inbound_connection_arg: boolean): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_PeerDetails_new(counterparty_node_id_arg, socket_address_arg, init_features_arg, is_inbound_connection_arg); + return nativeResponseValue; } // void PeerHandleError_free(struct LDKPeerHandleError this_obj); /* @internal */ @@ -41225,13 +44487,22 @@ export function PeerManager_new(message_handler: bigint, current_time: number, e const nativeResponseValue = wasm.TS_PeerManager_new(message_handler, current_time, ephemeral_random_data, logger, node_signer); return nativeResponseValue; } - // MUST_USE_RES struct LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg); + // MUST_USE_RES struct LDKCVec_PeerDetailsZ PeerManager_list_peers(const struct LDKPeerManager *NONNULL_PTR this_arg); +/* @internal */ +export function PeerManager_list_peers(this_arg: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_PeerManager_list_peers(this_arg); + return nativeResponseValue; +} + // MUST_USE_RES struct LDKPeerDetails PeerManager_peer_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id); /* @internal */ -export function PeerManager_get_peer_node_ids(this_arg: bigint): number { +export function PeerManager_peer_by_node_id(this_arg: bigint, their_node_id: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_PeerManager_get_peer_node_ids(this_arg); + const nativeResponseValue = wasm.TS_PeerManager_peer_by_node_id(this_arg, their_node_id); return nativeResponseValue; } // MUST_USE_RES struct LDKCResult_CVec_u8ZPeerHandleErrorZ PeerManager_new_outbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKSocketDescriptor descriptor, struct LDKCOption_SocketAddressZ remote_network_address); @@ -45796,6 +49067,114 @@ export function NodeFeatures_requires_keysend(this_arg: bigint): boolean { } const nativeResponseValue = wasm.TS_NodeFeatures_requires_keysend(this_arg); return nativeResponseValue; +} + // void InitFeatures_set_trampoline_routing_optional(struct LDKInitFeatures *NONNULL_PTR this_arg); +/* @internal */ +export function InitFeatures_set_trampoline_routing_optional(this_arg: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InitFeatures_set_trampoline_routing_optional(this_arg); + // debug statements here +} + // void InitFeatures_set_trampoline_routing_required(struct LDKInitFeatures *NONNULL_PTR this_arg); +/* @internal */ +export function InitFeatures_set_trampoline_routing_required(this_arg: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InitFeatures_set_trampoline_routing_required(this_arg); + // debug statements here +} + // MUST_USE_RES bool InitFeatures_supports_trampoline_routing(const struct LDKInitFeatures *NONNULL_PTR this_arg); +/* @internal */ +export function InitFeatures_supports_trampoline_routing(this_arg: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InitFeatures_supports_trampoline_routing(this_arg); + return nativeResponseValue; +} + // void NodeFeatures_set_trampoline_routing_optional(struct LDKNodeFeatures *NONNULL_PTR this_arg); +/* @internal */ +export function NodeFeatures_set_trampoline_routing_optional(this_arg: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_NodeFeatures_set_trampoline_routing_optional(this_arg); + // debug statements here +} + // void NodeFeatures_set_trampoline_routing_required(struct LDKNodeFeatures *NONNULL_PTR this_arg); +/* @internal */ +export function NodeFeatures_set_trampoline_routing_required(this_arg: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_NodeFeatures_set_trampoline_routing_required(this_arg); + // debug statements here +} + // MUST_USE_RES bool NodeFeatures_supports_trampoline_routing(const struct LDKNodeFeatures *NONNULL_PTR this_arg); +/* @internal */ +export function NodeFeatures_supports_trampoline_routing(this_arg: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_NodeFeatures_supports_trampoline_routing(this_arg); + return nativeResponseValue; +} + // void Bolt11InvoiceFeatures_set_trampoline_routing_optional(struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg); +/* @internal */ +export function Bolt11InvoiceFeatures_set_trampoline_routing_optional(this_arg: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Bolt11InvoiceFeatures_set_trampoline_routing_optional(this_arg); + // debug statements here +} + // void Bolt11InvoiceFeatures_set_trampoline_routing_required(struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg); +/* @internal */ +export function Bolt11InvoiceFeatures_set_trampoline_routing_required(this_arg: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Bolt11InvoiceFeatures_set_trampoline_routing_required(this_arg); + // debug statements here +} + // MUST_USE_RES bool Bolt11InvoiceFeatures_supports_trampoline_routing(const struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg); +/* @internal */ +export function Bolt11InvoiceFeatures_supports_trampoline_routing(this_arg: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Bolt11InvoiceFeatures_supports_trampoline_routing(this_arg); + return nativeResponseValue; +} + // MUST_USE_RES bool InitFeatures_requires_trampoline_routing(const struct LDKInitFeatures *NONNULL_PTR this_arg); +/* @internal */ +export function InitFeatures_requires_trampoline_routing(this_arg: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InitFeatures_requires_trampoline_routing(this_arg); + return nativeResponseValue; +} + // MUST_USE_RES bool NodeFeatures_requires_trampoline_routing(const struct LDKNodeFeatures *NONNULL_PTR this_arg); +/* @internal */ +export function NodeFeatures_requires_trampoline_routing(this_arg: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_NodeFeatures_requires_trampoline_routing(this_arg); + return nativeResponseValue; +} + // MUST_USE_RES bool Bolt11InvoiceFeatures_requires_trampoline_routing(const struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg); +/* @internal */ +export function Bolt11InvoiceFeatures_requires_trampoline_routing(this_arg: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Bolt11InvoiceFeatures_requires_trampoline_routing(this_arg); + return nativeResponseValue; } // void ShutdownScript_free(struct LDKShutdownScript this_obj); /* @internal */ @@ -45958,6 +49337,168 @@ export function ShutdownScript_is_compatible(this_arg: bigint, features: bigint) } const nativeResponseValue = wasm.TS_ShutdownScript_is_compatible(this_arg, features); return nativeResponseValue; +} + // void ChannelId_free(struct LDKChannelId this_obj); +/* @internal */ +export function ChannelId_free(this_obj: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ChannelId_free(this_obj); + // debug statements here +} + // const uint8_t (*ChannelId_get_a(const struct LDKChannelId *NONNULL_PTR this_ptr))[32]; +/* @internal */ +export function ChannelId_get_a(this_ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ChannelId_get_a(this_ptr); + return nativeResponseValue; +} + // void ChannelId_set_a(struct LDKChannelId *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); +/* @internal */ +export function ChannelId_set_a(this_ptr: bigint, val: number): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ChannelId_set_a(this_ptr, val); + // debug statements here +} + // MUST_USE_RES struct LDKChannelId ChannelId_new(struct LDKThirtyTwoBytes a_arg); +/* @internal */ +export function ChannelId_new(a_arg: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ChannelId_new(a_arg); + return nativeResponseValue; +} + // uint64_t ChannelId_clone_ptr(LDKChannelId *NONNULL_PTR arg); +/* @internal */ +export function ChannelId_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ChannelId_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKChannelId ChannelId_clone(const struct LDKChannelId *NONNULL_PTR orig); +/* @internal */ +export function ChannelId_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ChannelId_clone(orig); + return nativeResponseValue; +} + // bool ChannelId_eq(const struct LDKChannelId *NONNULL_PTR a, const struct LDKChannelId *NONNULL_PTR b); +/* @internal */ +export function ChannelId_eq(a: bigint, b: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ChannelId_eq(a, b); + return nativeResponseValue; +} + // uint64_t ChannelId_hash(const struct LDKChannelId *NONNULL_PTR o); +/* @internal */ +export function ChannelId_hash(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ChannelId_hash(o); + return nativeResponseValue; +} + // MUST_USE_RES struct LDKChannelId ChannelId_v1_from_funding_txid(const uint8_t (*txid)[32], uint16_t output_index); +/* @internal */ +export function ChannelId_v1_from_funding_txid(txid: number, output_index: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ChannelId_v1_from_funding_txid(txid, output_index); + return nativeResponseValue; +} + // MUST_USE_RES struct LDKChannelId ChannelId_v1_from_funding_outpoint(struct LDKOutPoint outpoint); +/* @internal */ +export function ChannelId_v1_from_funding_outpoint(outpoint: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ChannelId_v1_from_funding_outpoint(outpoint); + return nativeResponseValue; +} + // MUST_USE_RES struct LDKChannelId ChannelId_temporary_from_entropy_source(const struct LDKEntropySource *NONNULL_PTR entropy_source); +/* @internal */ +export function ChannelId_temporary_from_entropy_source(entropy_source: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ChannelId_temporary_from_entropy_source(entropy_source); + return nativeResponseValue; +} + // MUST_USE_RES struct LDKChannelId ChannelId_from_bytes(struct LDKThirtyTwoBytes data); +/* @internal */ +export function ChannelId_from_bytes(data: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ChannelId_from_bytes(data); + return nativeResponseValue; +} + // MUST_USE_RES struct LDKChannelId ChannelId_new_zero(void); +/* @internal */ +export function ChannelId_new_zero(): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ChannelId_new_zero(); + return nativeResponseValue; +} + // MUST_USE_RES bool ChannelId_is_zero(const struct LDKChannelId *NONNULL_PTR this_arg); +/* @internal */ +export function ChannelId_is_zero(this_arg: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ChannelId_is_zero(this_arg); + return nativeResponseValue; +} + // MUST_USE_RES struct LDKChannelId ChannelId_v2_from_revocation_basepoints(const struct LDKRevocationBasepoint *NONNULL_PTR ours, const struct LDKRevocationBasepoint *NONNULL_PTR theirs); +/* @internal */ +export function ChannelId_v2_from_revocation_basepoints(ours: bigint, theirs: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ChannelId_v2_from_revocation_basepoints(ours, theirs); + return nativeResponseValue; +} + // MUST_USE_RES struct LDKChannelId ChannelId_temporary_v2_from_revocation_basepoint(const struct LDKRevocationBasepoint *NONNULL_PTR our_revocation_basepoint); +/* @internal */ +export function ChannelId_temporary_v2_from_revocation_basepoint(our_revocation_basepoint: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ChannelId_temporary_v2_from_revocation_basepoint(our_revocation_basepoint); + return nativeResponseValue; +} + // struct LDKCVec_u8Z ChannelId_write(const struct LDKChannelId *NONNULL_PTR obj); +/* @internal */ +export function ChannelId_write(obj: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ChannelId_write(obj); + return nativeResponseValue; +} + // struct LDKCResult_ChannelIdDecodeErrorZ ChannelId_read(struct LDKu8slice ser); +/* @internal */ +export function ChannelId_read(ser: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ChannelId_read(ser); + return nativeResponseValue; } // void Retry_free(struct LDKRetry this_ptr); /* @internal */ @@ -46372,6 +49913,312 @@ export function Type_free(this_ptr: bigint): void { } const nativeResponseValue = wasm.TS_Type_free(this_ptr); // debug statements here +} + // void OfferId_free(struct LDKOfferId this_obj); +/* @internal */ +export function OfferId_free(this_obj: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OfferId_free(this_obj); + // debug statements here +} + // const uint8_t (*OfferId_get_a(const struct LDKOfferId *NONNULL_PTR this_ptr))[32]; +/* @internal */ +export function OfferId_get_a(this_ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OfferId_get_a(this_ptr); + return nativeResponseValue; +} + // void OfferId_set_a(struct LDKOfferId *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); +/* @internal */ +export function OfferId_set_a(this_ptr: bigint, val: number): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OfferId_set_a(this_ptr, val); + // debug statements here +} + // MUST_USE_RES struct LDKOfferId OfferId_new(struct LDKThirtyTwoBytes a_arg); +/* @internal */ +export function OfferId_new(a_arg: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OfferId_new(a_arg); + return nativeResponseValue; +} + // uint64_t OfferId_clone_ptr(LDKOfferId *NONNULL_PTR arg); +/* @internal */ +export function OfferId_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OfferId_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKOfferId OfferId_clone(const struct LDKOfferId *NONNULL_PTR orig); +/* @internal */ +export function OfferId_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OfferId_clone(orig); + return nativeResponseValue; +} + // bool OfferId_eq(const struct LDKOfferId *NONNULL_PTR a, const struct LDKOfferId *NONNULL_PTR b); +/* @internal */ +export function OfferId_eq(a: bigint, b: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OfferId_eq(a, b); + return nativeResponseValue; +} + // struct LDKCVec_u8Z OfferId_write(const struct LDKOfferId *NONNULL_PTR obj); +/* @internal */ +export function OfferId_write(obj: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OfferId_write(obj); + return nativeResponseValue; +} + // struct LDKCResult_OfferIdDecodeErrorZ OfferId_read(struct LDKu8slice ser); +/* @internal */ +export function OfferId_read(ser: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OfferId_read(ser); + return nativeResponseValue; +} + // void OfferWithExplicitMetadataBuilder_free(struct LDKOfferWithExplicitMetadataBuilder this_obj); +/* @internal */ +export function OfferWithExplicitMetadataBuilder_free(this_obj: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OfferWithExplicitMetadataBuilder_free(this_obj); + // debug statements here +} + // uint64_t OfferWithExplicitMetadataBuilder_clone_ptr(LDKOfferWithExplicitMetadataBuilder *NONNULL_PTR arg); +/* @internal */ +export function OfferWithExplicitMetadataBuilder_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OfferWithExplicitMetadataBuilder_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKOfferWithExplicitMetadataBuilder OfferWithExplicitMetadataBuilder_clone(const struct LDKOfferWithExplicitMetadataBuilder *NONNULL_PTR orig); +/* @internal */ +export function OfferWithExplicitMetadataBuilder_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OfferWithExplicitMetadataBuilder_clone(orig); + return nativeResponseValue; +} + // void OfferWithDerivedMetadataBuilder_free(struct LDKOfferWithDerivedMetadataBuilder this_obj); +/* @internal */ +export function OfferWithDerivedMetadataBuilder_free(this_obj: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OfferWithDerivedMetadataBuilder_free(this_obj); + // debug statements here +} + // uint64_t OfferWithDerivedMetadataBuilder_clone_ptr(LDKOfferWithDerivedMetadataBuilder *NONNULL_PTR arg); +/* @internal */ +export function OfferWithDerivedMetadataBuilder_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OfferWithDerivedMetadataBuilder_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKOfferWithDerivedMetadataBuilder OfferWithDerivedMetadataBuilder_clone(const struct LDKOfferWithDerivedMetadataBuilder *NONNULL_PTR orig); +/* @internal */ +export function OfferWithDerivedMetadataBuilder_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OfferWithDerivedMetadataBuilder_clone(orig); + return nativeResponseValue; +} + // MUST_USE_RES struct LDKOfferWithExplicitMetadataBuilder OfferWithExplicitMetadataBuilder_new(struct LDKPublicKey signing_pubkey); +/* @internal */ +export function OfferWithExplicitMetadataBuilder_new(signing_pubkey: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OfferWithExplicitMetadataBuilder_new(signing_pubkey); + return nativeResponseValue; +} + // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ OfferWithExplicitMetadataBuilder_metadata(struct LDKOfferWithExplicitMetadataBuilder this_arg, struct LDKCVec_u8Z metadata); +/* @internal */ +export function OfferWithExplicitMetadataBuilder_metadata(this_arg: bigint, metadata: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OfferWithExplicitMetadataBuilder_metadata(this_arg, metadata); + return nativeResponseValue; +} + // MUST_USE_RES void OfferWithExplicitMetadataBuilder_chain(struct LDKOfferWithExplicitMetadataBuilder this_arg, enum LDKNetwork network); +/* @internal */ +export function OfferWithExplicitMetadataBuilder_chain(this_arg: bigint, network: Network): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OfferWithExplicitMetadataBuilder_chain(this_arg, network); + // debug statements here +} + // MUST_USE_RES void OfferWithExplicitMetadataBuilder_amount_msats(struct LDKOfferWithExplicitMetadataBuilder this_arg, uint64_t amount_msats); +/* @internal */ +export function OfferWithExplicitMetadataBuilder_amount_msats(this_arg: bigint, amount_msats: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OfferWithExplicitMetadataBuilder_amount_msats(this_arg, amount_msats); + // debug statements here +} + // MUST_USE_RES void OfferWithExplicitMetadataBuilder_absolute_expiry(struct LDKOfferWithExplicitMetadataBuilder this_arg, uint64_t absolute_expiry); +/* @internal */ +export function OfferWithExplicitMetadataBuilder_absolute_expiry(this_arg: bigint, absolute_expiry: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OfferWithExplicitMetadataBuilder_absolute_expiry(this_arg, absolute_expiry); + // debug statements here +} + // MUST_USE_RES void OfferWithExplicitMetadataBuilder_description(struct LDKOfferWithExplicitMetadataBuilder this_arg, struct LDKStr description); +/* @internal */ +export function OfferWithExplicitMetadataBuilder_description(this_arg: bigint, description: number): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OfferWithExplicitMetadataBuilder_description(this_arg, description); + // debug statements here +} + // MUST_USE_RES void OfferWithExplicitMetadataBuilder_issuer(struct LDKOfferWithExplicitMetadataBuilder this_arg, struct LDKStr issuer); +/* @internal */ +export function OfferWithExplicitMetadataBuilder_issuer(this_arg: bigint, issuer: number): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OfferWithExplicitMetadataBuilder_issuer(this_arg, issuer); + // debug statements here +} + // MUST_USE_RES void OfferWithExplicitMetadataBuilder_path(struct LDKOfferWithExplicitMetadataBuilder this_arg, struct LDKBlindedPath path); +/* @internal */ +export function OfferWithExplicitMetadataBuilder_path(this_arg: bigint, path: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OfferWithExplicitMetadataBuilder_path(this_arg, path); + // debug statements here +} + // MUST_USE_RES void OfferWithExplicitMetadataBuilder_supported_quantity(struct LDKOfferWithExplicitMetadataBuilder this_arg, struct LDKQuantity quantity); +/* @internal */ +export function OfferWithExplicitMetadataBuilder_supported_quantity(this_arg: bigint, quantity: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OfferWithExplicitMetadataBuilder_supported_quantity(this_arg, quantity); + // debug statements here +} + // MUST_USE_RES struct LDKCResult_OfferBolt12SemanticErrorZ OfferWithExplicitMetadataBuilder_build(struct LDKOfferWithExplicitMetadataBuilder this_arg); +/* @internal */ +export function OfferWithExplicitMetadataBuilder_build(this_arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OfferWithExplicitMetadataBuilder_build(this_arg); + return nativeResponseValue; +} + // MUST_USE_RES struct LDKOfferWithDerivedMetadataBuilder OfferWithDerivedMetadataBuilder_deriving_signing_pubkey(struct LDKPublicKey node_id, const struct LDKExpandedKey *NONNULL_PTR expanded_key, struct LDKEntropySource entropy_source); +/* @internal */ +export function OfferWithDerivedMetadataBuilder_deriving_signing_pubkey(node_id: number, expanded_key: bigint, entropy_source: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OfferWithDerivedMetadataBuilder_deriving_signing_pubkey(node_id, expanded_key, entropy_source); + return nativeResponseValue; +} + // MUST_USE_RES void OfferWithDerivedMetadataBuilder_chain(struct LDKOfferWithDerivedMetadataBuilder this_arg, enum LDKNetwork network); +/* @internal */ +export function OfferWithDerivedMetadataBuilder_chain(this_arg: bigint, network: Network): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OfferWithDerivedMetadataBuilder_chain(this_arg, network); + // debug statements here +} + // MUST_USE_RES void OfferWithDerivedMetadataBuilder_amount_msats(struct LDKOfferWithDerivedMetadataBuilder this_arg, uint64_t amount_msats); +/* @internal */ +export function OfferWithDerivedMetadataBuilder_amount_msats(this_arg: bigint, amount_msats: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OfferWithDerivedMetadataBuilder_amount_msats(this_arg, amount_msats); + // debug statements here +} + // MUST_USE_RES void OfferWithDerivedMetadataBuilder_absolute_expiry(struct LDKOfferWithDerivedMetadataBuilder this_arg, uint64_t absolute_expiry); +/* @internal */ +export function OfferWithDerivedMetadataBuilder_absolute_expiry(this_arg: bigint, absolute_expiry: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OfferWithDerivedMetadataBuilder_absolute_expiry(this_arg, absolute_expiry); + // debug statements here +} + // MUST_USE_RES void OfferWithDerivedMetadataBuilder_description(struct LDKOfferWithDerivedMetadataBuilder this_arg, struct LDKStr description); +/* @internal */ +export function OfferWithDerivedMetadataBuilder_description(this_arg: bigint, description: number): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OfferWithDerivedMetadataBuilder_description(this_arg, description); + // debug statements here +} + // MUST_USE_RES void OfferWithDerivedMetadataBuilder_issuer(struct LDKOfferWithDerivedMetadataBuilder this_arg, struct LDKStr issuer); +/* @internal */ +export function OfferWithDerivedMetadataBuilder_issuer(this_arg: bigint, issuer: number): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OfferWithDerivedMetadataBuilder_issuer(this_arg, issuer); + // debug statements here +} + // MUST_USE_RES void OfferWithDerivedMetadataBuilder_path(struct LDKOfferWithDerivedMetadataBuilder this_arg, struct LDKBlindedPath path); +/* @internal */ +export function OfferWithDerivedMetadataBuilder_path(this_arg: bigint, path: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OfferWithDerivedMetadataBuilder_path(this_arg, path); + // debug statements here +} + // MUST_USE_RES void OfferWithDerivedMetadataBuilder_supported_quantity(struct LDKOfferWithDerivedMetadataBuilder this_arg, struct LDKQuantity quantity); +/* @internal */ +export function OfferWithDerivedMetadataBuilder_supported_quantity(this_arg: bigint, quantity: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OfferWithDerivedMetadataBuilder_supported_quantity(this_arg, quantity); + // debug statements here +} + // MUST_USE_RES struct LDKCResult_OfferBolt12SemanticErrorZ OfferWithDerivedMetadataBuilder_build(struct LDKOfferWithDerivedMetadataBuilder this_arg); +/* @internal */ +export function OfferWithDerivedMetadataBuilder_build(this_arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OfferWithDerivedMetadataBuilder_build(this_arg); + return nativeResponseValue; } // void Offer_free(struct LDKOffer this_obj); /* @internal */ @@ -46418,7 +50265,7 @@ export function Offer_metadata(this_arg: bigint): bigint { const nativeResponseValue = wasm.TS_Offer_metadata(this_arg); return nativeResponseValue; } - // MUST_USE_RES struct LDKAmount Offer_amount(const struct LDKOffer *NONNULL_PTR this_arg); + // MUST_USE_RES struct LDKCOption_AmountZ Offer_amount(const struct LDKOffer *NONNULL_PTR this_arg); /* @internal */ export function Offer_amount(this_arg: bigint): bigint { if(!isWasmInitialized) { @@ -46489,6 +50336,15 @@ export function Offer_signing_pubkey(this_arg: bigint): number { } const nativeResponseValue = wasm.TS_Offer_signing_pubkey(this_arg); return nativeResponseValue; +} + // MUST_USE_RES struct LDKOfferId Offer_id(const struct LDKOffer *NONNULL_PTR this_arg); +/* @internal */ +export function Offer_id(this_arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Offer_id(this_arg); + return nativeResponseValue; } // MUST_USE_RES bool Offer_supports_chain(const struct LDKOffer *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes chain); /* @internal */ @@ -46525,6 +50381,42 @@ export function Offer_expects_quantity(this_arg: bigint): boolean { } const nativeResponseValue = wasm.TS_Offer_expects_quantity(this_arg); return nativeResponseValue; +} + // MUST_USE_RES struct LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ Offer_request_invoice_deriving_payer_id(const struct LDKOffer *NONNULL_PTR this_arg, const struct LDKExpandedKey *NONNULL_PTR expanded_key, struct LDKEntropySource entropy_source, struct LDKThirtyTwoBytes payment_id); +/* @internal */ +export function Offer_request_invoice_deriving_payer_id(this_arg: bigint, expanded_key: bigint, entropy_source: bigint, payment_id: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Offer_request_invoice_deriving_payer_id(this_arg, expanded_key, entropy_source, payment_id); + return nativeResponseValue; +} + // MUST_USE_RES struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ Offer_request_invoice_deriving_metadata(const struct LDKOffer *NONNULL_PTR this_arg, struct LDKPublicKey payer_id, const struct LDKExpandedKey *NONNULL_PTR expanded_key, struct LDKEntropySource entropy_source, struct LDKThirtyTwoBytes payment_id); +/* @internal */ +export function Offer_request_invoice_deriving_metadata(this_arg: bigint, payer_id: number, expanded_key: bigint, entropy_source: bigint, payment_id: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Offer_request_invoice_deriving_metadata(this_arg, payer_id, expanded_key, entropy_source, payment_id); + return nativeResponseValue; +} + // MUST_USE_RES struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ Offer_request_invoice(const struct LDKOffer *NONNULL_PTR this_arg, struct LDKCVec_u8Z metadata, struct LDKPublicKey payer_id); +/* @internal */ +export function Offer_request_invoice(this_arg: bigint, metadata: number, payer_id: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Offer_request_invoice(this_arg, metadata, payer_id); + return nativeResponseValue; +} + // uint64_t Offer_hash(const struct LDKOffer *NONNULL_PTR o); +/* @internal */ +export function Offer_hash(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Offer_hash(o); + return nativeResponseValue; } // struct LDKCVec_u8Z Offer_write(const struct LDKOffer *NONNULL_PTR obj); /* @internal */ @@ -46535,13 +50427,13 @@ export function Offer_write(obj: bigint): number { const nativeResponseValue = wasm.TS_Offer_write(obj); return nativeResponseValue; } - // void Amount_free(struct LDKAmount this_obj); + // void Amount_free(struct LDKAmount this_ptr); /* @internal */ -export function Amount_free(this_obj: bigint): void { +export function Amount_free(this_ptr: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_Amount_free(this_obj); + const nativeResponseValue = wasm.TS_Amount_free(this_ptr); // debug statements here } // uint64_t Amount_clone_ptr(LDKAmount *NONNULL_PTR arg); @@ -46562,13 +50454,31 @@ export function Amount_clone(orig: bigint): bigint { const nativeResponseValue = wasm.TS_Amount_clone(orig); return nativeResponseValue; } - // void Quantity_free(struct LDKQuantity this_obj); + // struct LDKAmount Amount_bitcoin(uint64_t amount_msats); /* @internal */ -export function Quantity_free(this_obj: bigint): void { +export function Amount_bitcoin(amount_msats: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_Quantity_free(this_obj); + const nativeResponseValue = wasm.TS_Amount_bitcoin(amount_msats); + return nativeResponseValue; +} + // struct LDKAmount Amount_currency(struct LDKThreeBytes iso4217_code, uint64_t amount); +/* @internal */ +export function Amount_currency(iso4217_code: number, amount: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Amount_currency(iso4217_code, amount); + return nativeResponseValue; +} + // void Quantity_free(struct LDKQuantity this_ptr); +/* @internal */ +export function Quantity_free(this_ptr: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Quantity_free(this_ptr); // debug statements here } // uint64_t Quantity_clone_ptr(LDKQuantity *NONNULL_PTR arg); @@ -46588,6 +50498,33 @@ export function Quantity_clone(orig: bigint): bigint { } const nativeResponseValue = wasm.TS_Quantity_clone(orig); return nativeResponseValue; +} + // struct LDKQuantity Quantity_bounded(uint64_t a); +/* @internal */ +export function Quantity_bounded(a: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Quantity_bounded(a); + return nativeResponseValue; +} + // struct LDKQuantity Quantity_unbounded(void); +/* @internal */ +export function Quantity_unbounded(): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Quantity_unbounded(); + return nativeResponseValue; +} + // struct LDKQuantity Quantity_one(void); +/* @internal */ +export function Quantity_one(): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Quantity_one(); + return nativeResponseValue; } // struct LDKCResult_OfferBolt12ParseErrorZ Offer_from_str(struct LDKStr s); /* @internal */ @@ -46597,6 +50534,132 @@ export function Offer_from_str(s: number): bigint { } const nativeResponseValue = wasm.TS_Offer_from_str(s); return nativeResponseValue; +} + // void InvoiceWithExplicitSigningPubkeyBuilder_free(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_obj); +/* @internal */ +export function InvoiceWithExplicitSigningPubkeyBuilder_free(this_obj: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceWithExplicitSigningPubkeyBuilder_free(this_obj); + // debug statements here +} + // void InvoiceWithDerivedSigningPubkeyBuilder_free(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_obj); +/* @internal */ +export function InvoiceWithDerivedSigningPubkeyBuilder_free(this_obj: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceWithDerivedSigningPubkeyBuilder_free(this_obj); + // debug statements here +} + // MUST_USE_RES struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ InvoiceWithExplicitSigningPubkeyBuilder_build(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg); +/* @internal */ +export function InvoiceWithExplicitSigningPubkeyBuilder_build(this_arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceWithExplicitSigningPubkeyBuilder_build(this_arg); + return nativeResponseValue; +} + // MUST_USE_RES void InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg, uint32_t relative_expiry_secs); +/* @internal */ +export function InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry(this_arg: bigint, relative_expiry_secs: number): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry(this_arg, relative_expiry_secs); + // debug statements here +} + // MUST_USE_RES void InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg, const uint8_t (*script_hash)[32]); +/* @internal */ +export function InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh(this_arg: bigint, script_hash: number): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh(this_arg, script_hash); + // debug statements here +} + // MUST_USE_RES void InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg, const uint8_t (*pubkey_hash)[20]); +/* @internal */ +export function InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh(this_arg: bigint, pubkey_hash: number): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh(this_arg, pubkey_hash); + // debug statements here +} + // MUST_USE_RES void InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg, struct LDKTweakedPublicKey output_key); +/* @internal */ +export function InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(this_arg: bigint, utput_key: number): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(this_arg, utput_key); + // debug statements here +} + // MUST_USE_RES void InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg); +/* @internal */ +export function InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp(this_arg: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp(this_arg); + // debug statements here +} + // MUST_USE_RES struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg); +/* @internal */ +export function InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign(this_arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign(this_arg); + return nativeResponseValue; +} + // MUST_USE_RES void InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg, uint32_t relative_expiry_secs); +/* @internal */ +export function InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry(this_arg: bigint, relative_expiry_secs: number): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry(this_arg, relative_expiry_secs); + // debug statements here +} + // MUST_USE_RES void InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg, const uint8_t (*script_hash)[32]); +/* @internal */ +export function InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh(this_arg: bigint, script_hash: number): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh(this_arg, script_hash); + // debug statements here +} + // MUST_USE_RES void InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg, const uint8_t (*pubkey_hash)[20]); +/* @internal */ +export function InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh(this_arg: bigint, pubkey_hash: number): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh(this_arg, pubkey_hash); + // debug statements here +} + // MUST_USE_RES void InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg, struct LDKTweakedPublicKey output_key); +/* @internal */ +export function InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(this_arg: bigint, utput_key: number): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(this_arg, utput_key); + // debug statements here +} + // MUST_USE_RES void InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg); +/* @internal */ +export function InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp(this_arg: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp(this_arg); + // debug statements here } // void UnsignedBolt12Invoice_free(struct LDKUnsignedBolt12Invoice this_obj); /* @internal */ @@ -46606,6 +50669,33 @@ export function UnsignedBolt12Invoice_free(this_obj: bigint): void { } const nativeResponseValue = wasm.TS_UnsignedBolt12Invoice_free(this_obj); // debug statements here +} + // uint64_t UnsignedBolt12Invoice_clone_ptr(LDKUnsignedBolt12Invoice *NONNULL_PTR arg); +/* @internal */ +export function UnsignedBolt12Invoice_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_UnsignedBolt12Invoice_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKUnsignedBolt12Invoice UnsignedBolt12Invoice_clone(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR orig); +/* @internal */ +export function UnsignedBolt12Invoice_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_UnsignedBolt12Invoice_clone(orig); + return nativeResponseValue; +} + // void SignBolt12InvoiceFn_free(struct LDKSignBolt12InvoiceFn this_ptr); +/* @internal */ +export function SignBolt12InvoiceFn_free(this_ptr: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_SignBolt12InvoiceFn_free(this_ptr); + // debug statements here } // MUST_USE_RES struct LDKTaggedHash UnsignedBolt12Invoice_tagged_hash(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg); /* @internal */ @@ -46670,7 +50760,7 @@ export function UnsignedBolt12Invoice_metadata(this_arg: bigint): bigint { const nativeResponseValue = wasm.TS_UnsignedBolt12Invoice_metadata(this_arg); return nativeResponseValue; } - // MUST_USE_RES struct LDKAmount UnsignedBolt12Invoice_amount(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg); + // MUST_USE_RES struct LDKCOption_AmountZ UnsignedBolt12Invoice_amount(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg); /* @internal */ export function UnsignedBolt12Invoice_amount(this_arg: bigint): bigint { if(!isWasmInitialized) { @@ -46724,7 +50814,7 @@ export function UnsignedBolt12Invoice_message_paths(this_arg: bigint): number { const nativeResponseValue = wasm.TS_UnsignedBolt12Invoice_message_paths(this_arg); return nativeResponseValue; } - // MUST_USE_RES struct LDKQuantity UnsignedBolt12Invoice_supported_quantity(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg); + // MUST_USE_RES struct LDKCOption_QuantityZ UnsignedBolt12Invoice_supported_quantity(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg); /* @internal */ export function UnsignedBolt12Invoice_supported_quantity(this_arg: bigint): bigint { if(!isWasmInitialized) { @@ -46859,7 +50949,7 @@ export function Bolt12Invoice_metadata(this_arg: bigint): bigint { const nativeResponseValue = wasm.TS_Bolt12Invoice_metadata(this_arg); return nativeResponseValue; } - // MUST_USE_RES struct LDKAmount Bolt12Invoice_amount(const struct LDKBolt12Invoice *NONNULL_PTR this_arg); + // MUST_USE_RES struct LDKCOption_AmountZ Bolt12Invoice_amount(const struct LDKBolt12Invoice *NONNULL_PTR this_arg); /* @internal */ export function Bolt12Invoice_amount(this_arg: bigint): bigint { if(!isWasmInitialized) { @@ -46913,7 +51003,7 @@ export function Bolt12Invoice_message_paths(this_arg: bigint): number { const nativeResponseValue = wasm.TS_Bolt12Invoice_message_paths(this_arg); return nativeResponseValue; } - // MUST_USE_RES struct LDKQuantity Bolt12Invoice_supported_quantity(const struct LDKBolt12Invoice *NONNULL_PTR this_arg); + // MUST_USE_RES struct LDKCOption_QuantityZ Bolt12Invoice_supported_quantity(const struct LDKBolt12Invoice *NONNULL_PTR this_arg); /* @internal */ export function Bolt12Invoice_supported_quantity(this_arg: bigint): bigint { if(!isWasmInitialized) { @@ -47047,6 +51137,15 @@ export function Bolt12Invoice_verify(this_arg: bigint, key: bigint): bigint { } const nativeResponseValue = wasm.TS_Bolt12Invoice_verify(this_arg, key); return nativeResponseValue; +} + // uint64_t Bolt12Invoice_hash(const struct LDKBolt12Invoice *NONNULL_PTR o); +/* @internal */ +export function Bolt12Invoice_hash(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Bolt12Invoice_hash(o); + return nativeResponseValue; } // struct LDKCVec_u8Z UnsignedBolt12Invoice_write(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR obj); /* @internal */ @@ -47416,6 +51515,114 @@ export function InvoiceError_read(ser: number): bigint { } const nativeResponseValue = wasm.TS_InvoiceError_read(ser); return nativeResponseValue; +} + // void InvoiceRequestWithExplicitPayerIdBuilder_free(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_obj); +/* @internal */ +export function InvoiceRequestWithExplicitPayerIdBuilder_free(this_obj: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceRequestWithExplicitPayerIdBuilder_free(this_obj); + // debug statements here +} + // void InvoiceRequestWithDerivedPayerIdBuilder_free(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_obj); +/* @internal */ +export function InvoiceRequestWithDerivedPayerIdBuilder_free(this_obj: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceRequestWithDerivedPayerIdBuilder_free(this_obj); + // debug statements here +} + // MUST_USE_RES struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ InvoiceRequestWithExplicitPayerIdBuilder_build(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg); +/* @internal */ +export function InvoiceRequestWithExplicitPayerIdBuilder_build(this_arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceRequestWithExplicitPayerIdBuilder_build(this_arg); + return nativeResponseValue; +} + // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithExplicitPayerIdBuilder_chain(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg, enum LDKNetwork network); +/* @internal */ +export function InvoiceRequestWithExplicitPayerIdBuilder_chain(this_arg: bigint, network: Network): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceRequestWithExplicitPayerIdBuilder_chain(this_arg, network); + return nativeResponseValue; +} + // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg, uint64_t amount_msats); +/* @internal */ +export function InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(this_arg: bigint, amount_msats: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(this_arg, amount_msats); + return nativeResponseValue; +} + // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithExplicitPayerIdBuilder_quantity(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg, uint64_t quantity); +/* @internal */ +export function InvoiceRequestWithExplicitPayerIdBuilder_quantity(this_arg: bigint, quantity: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceRequestWithExplicitPayerIdBuilder_quantity(this_arg, quantity); + return nativeResponseValue; +} + // MUST_USE_RES void InvoiceRequestWithExplicitPayerIdBuilder_payer_note(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg, struct LDKStr payer_note); +/* @internal */ +export function InvoiceRequestWithExplicitPayerIdBuilder_payer_note(this_arg: bigint, payer_note: number): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceRequestWithExplicitPayerIdBuilder_payer_note(this_arg, payer_note); + // debug statements here +} + // MUST_USE_RES struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg); +/* @internal */ +export function InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(this_arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(this_arg); + return nativeResponseValue; +} + // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithDerivedPayerIdBuilder_chain(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg, enum LDKNetwork network); +/* @internal */ +export function InvoiceRequestWithDerivedPayerIdBuilder_chain(this_arg: bigint, network: Network): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceRequestWithDerivedPayerIdBuilder_chain(this_arg, network); + return nativeResponseValue; +} + // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithDerivedPayerIdBuilder_amount_msats(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg, uint64_t amount_msats); +/* @internal */ +export function InvoiceRequestWithDerivedPayerIdBuilder_amount_msats(this_arg: bigint, amount_msats: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceRequestWithDerivedPayerIdBuilder_amount_msats(this_arg, amount_msats); + return nativeResponseValue; +} + // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithDerivedPayerIdBuilder_quantity(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg, uint64_t quantity); +/* @internal */ +export function InvoiceRequestWithDerivedPayerIdBuilder_quantity(this_arg: bigint, quantity: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceRequestWithDerivedPayerIdBuilder_quantity(this_arg, quantity); + return nativeResponseValue; +} + // MUST_USE_RES void InvoiceRequestWithDerivedPayerIdBuilder_payer_note(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg, struct LDKStr payer_note); +/* @internal */ +export function InvoiceRequestWithDerivedPayerIdBuilder_payer_note(this_arg: bigint, payer_note: number): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceRequestWithDerivedPayerIdBuilder_payer_note(this_arg, payer_note); + // debug statements here } // void UnsignedInvoiceRequest_free(struct LDKUnsignedInvoiceRequest this_obj); /* @internal */ @@ -47425,6 +51632,33 @@ export function UnsignedInvoiceRequest_free(this_obj: bigint): void { } const nativeResponseValue = wasm.TS_UnsignedInvoiceRequest_free(this_obj); // debug statements here +} + // uint64_t UnsignedInvoiceRequest_clone_ptr(LDKUnsignedInvoiceRequest *NONNULL_PTR arg); +/* @internal */ +export function UnsignedInvoiceRequest_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_UnsignedInvoiceRequest_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKUnsignedInvoiceRequest UnsignedInvoiceRequest_clone(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR orig); +/* @internal */ +export function UnsignedInvoiceRequest_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_UnsignedInvoiceRequest_clone(orig); + return nativeResponseValue; +} + // void SignInvoiceRequestFn_free(struct LDKSignInvoiceRequestFn this_ptr); +/* @internal */ +export function SignInvoiceRequestFn_free(this_ptr: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_SignInvoiceRequestFn_free(this_ptr); + // debug statements here } // MUST_USE_RES struct LDKTaggedHash UnsignedInvoiceRequest_tagged_hash(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg); /* @internal */ @@ -47470,6 +51704,24 @@ export function VerifiedInvoiceRequest_free(this_obj: bigint): void { } const nativeResponseValue = wasm.TS_VerifiedInvoiceRequest_free(this_obj); // debug statements here +} + // struct LDKOfferId VerifiedInvoiceRequest_get_offer_id(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_ptr); +/* @internal */ +export function VerifiedInvoiceRequest_get_offer_id(this_ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_VerifiedInvoiceRequest_get_offer_id(this_ptr); + return nativeResponseValue; +} + // void VerifiedInvoiceRequest_set_offer_id(struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_ptr, struct LDKOfferId val); +/* @internal */ +export function VerifiedInvoiceRequest_set_offer_id(this_ptr: bigint, val: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_VerifiedInvoiceRequest_set_offer_id(this_ptr, val); + // debug statements here } // struct LDKCOption_SecretKeyZ VerifiedInvoiceRequest_get_keys(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_ptr); /* @internal */ @@ -47525,7 +51777,7 @@ export function UnsignedInvoiceRequest_metadata(this_arg: bigint): bigint { const nativeResponseValue = wasm.TS_UnsignedInvoiceRequest_metadata(this_arg); return nativeResponseValue; } - // MUST_USE_RES struct LDKAmount UnsignedInvoiceRequest_amount(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg); + // MUST_USE_RES struct LDKCOption_AmountZ UnsignedInvoiceRequest_amount(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg); /* @internal */ export function UnsignedInvoiceRequest_amount(this_arg: bigint): bigint { if(!isWasmInitialized) { @@ -47678,7 +51930,7 @@ export function InvoiceRequest_metadata(this_arg: bigint): bigint { const nativeResponseValue = wasm.TS_InvoiceRequest_metadata(this_arg); return nativeResponseValue; } - // MUST_USE_RES struct LDKAmount InvoiceRequest_amount(const struct LDKInvoiceRequest *NONNULL_PTR this_arg); + // MUST_USE_RES struct LDKCOption_AmountZ InvoiceRequest_amount(const struct LDKInvoiceRequest *NONNULL_PTR this_arg); /* @internal */ export function InvoiceRequest_amount(this_arg: bigint): bigint { if(!isWasmInitialized) { @@ -47813,13 +52065,13 @@ export function InvoiceRequest_payer_note(this_arg: bigint): bigint { const nativeResponseValue = wasm.TS_InvoiceRequest_payer_note(this_arg); return nativeResponseValue; } - // MUST_USE_RES struct LDKSchnorrSignature InvoiceRequest_signature(const struct LDKInvoiceRequest *NONNULL_PTR this_arg); + // MUST_USE_RES struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ InvoiceRequest_respond_with_no_std(const struct LDKInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths, struct LDKThirtyTwoBytes payment_hash, uint64_t created_at); /* @internal */ -export function InvoiceRequest_signature(this_arg: bigint): number { +export function InvoiceRequest_respond_with_no_std(this_arg: bigint, payment_paths: number, payment_hash: number, created_at: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_InvoiceRequest_signature(this_arg); + const nativeResponseValue = wasm.TS_InvoiceRequest_respond_with_no_std(this_arg, payment_paths, payment_hash, created_at); return nativeResponseValue; } // MUST_USE_RES struct LDKCResult_VerifiedInvoiceRequestNoneZ InvoiceRequest_verify(struct LDKInvoiceRequest this_arg, const struct LDKExpandedKey *NONNULL_PTR key); @@ -47830,6 +52082,15 @@ export function InvoiceRequest_verify(this_arg: bigint, key: bigint): bigint { } const nativeResponseValue = wasm.TS_InvoiceRequest_verify(this_arg, key); return nativeResponseValue; +} + // MUST_USE_RES struct LDKSchnorrSignature InvoiceRequest_signature(const struct LDKInvoiceRequest *NONNULL_PTR this_arg); +/* @internal */ +export function InvoiceRequest_signature(this_arg: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceRequest_signature(this_arg); + return nativeResponseValue; } // MUST_USE_RES struct LDKCVec_ThirtyTwoBytesZ VerifiedInvoiceRequest_chains(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg); /* @internal */ @@ -47849,7 +52110,7 @@ export function VerifiedInvoiceRequest_metadata(this_arg: bigint): bigint { const nativeResponseValue = wasm.TS_VerifiedInvoiceRequest_metadata(this_arg); return nativeResponseValue; } - // MUST_USE_RES struct LDKAmount VerifiedInvoiceRequest_amount(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg); + // MUST_USE_RES struct LDKCOption_AmountZ VerifiedInvoiceRequest_amount(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg); /* @internal */ export function VerifiedInvoiceRequest_amount(this_arg: bigint): bigint { if(!isWasmInitialized) { @@ -47983,6 +52244,24 @@ export function VerifiedInvoiceRequest_payer_note(this_arg: bigint): bigint { } const nativeResponseValue = wasm.TS_VerifiedInvoiceRequest_payer_note(this_arg); return nativeResponseValue; +} + // MUST_USE_RES struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ VerifiedInvoiceRequest_respond_with_no_std(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths, struct LDKThirtyTwoBytes payment_hash, uint64_t created_at); +/* @internal */ +export function VerifiedInvoiceRequest_respond_with_no_std(this_arg: bigint, payment_paths: number, payment_hash: number, created_at: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_VerifiedInvoiceRequest_respond_with_no_std(this_arg, payment_paths, payment_hash, created_at); + return nativeResponseValue; +} + // MUST_USE_RES struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ VerifiedInvoiceRequest_respond_using_derived_keys_no_std(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths, struct LDKThirtyTwoBytes payment_hash, uint64_t created_at); +/* @internal */ +export function VerifiedInvoiceRequest_respond_using_derived_keys_no_std(this_arg: bigint, payment_paths: number, payment_hash: number, created_at: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_VerifiedInvoiceRequest_respond_using_derived_keys_no_std(this_arg, payment_paths, payment_hash, created_at); + return nativeResponseValue; } // struct LDKCVec_u8Z UnsignedInvoiceRequest_write(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR obj); /* @internal */ @@ -48001,6 +52280,123 @@ export function InvoiceRequest_write(obj: bigint): number { } const nativeResponseValue = wasm.TS_InvoiceRequest_write(obj); return nativeResponseValue; +} + // void InvoiceRequestFields_free(struct LDKInvoiceRequestFields this_obj); +/* @internal */ +export function InvoiceRequestFields_free(this_obj: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceRequestFields_free(this_obj); + // debug statements here +} + // struct LDKPublicKey InvoiceRequestFields_get_payer_id(const struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr); +/* @internal */ +export function InvoiceRequestFields_get_payer_id(this_ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceRequestFields_get_payer_id(this_ptr); + return nativeResponseValue; +} + // void InvoiceRequestFields_set_payer_id(struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); +/* @internal */ +export function InvoiceRequestFields_set_payer_id(this_ptr: bigint, val: number): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceRequestFields_set_payer_id(this_ptr, val); + // debug statements here +} + // struct LDKCOption_u64Z InvoiceRequestFields_get_quantity(const struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr); +/* @internal */ +export function InvoiceRequestFields_get_quantity(this_ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceRequestFields_get_quantity(this_ptr); + return nativeResponseValue; +} + // void InvoiceRequestFields_set_quantity(struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val); +/* @internal */ +export function InvoiceRequestFields_set_quantity(this_ptr: bigint, val: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceRequestFields_set_quantity(this_ptr, val); + // debug statements here +} + // struct LDKUntrustedString InvoiceRequestFields_get_payer_note_truncated(const struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr); +/* @internal */ +export function InvoiceRequestFields_get_payer_note_truncated(this_ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceRequestFields_get_payer_note_truncated(this_ptr); + return nativeResponseValue; +} + // void InvoiceRequestFields_set_payer_note_truncated(struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr, struct LDKUntrustedString val); +/* @internal */ +export function InvoiceRequestFields_set_payer_note_truncated(this_ptr: bigint, val: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceRequestFields_set_payer_note_truncated(this_ptr, val); + // debug statements here +} + // MUST_USE_RES struct LDKInvoiceRequestFields InvoiceRequestFields_new(struct LDKPublicKey payer_id_arg, struct LDKCOption_u64Z quantity_arg, struct LDKUntrustedString payer_note_truncated_arg); +/* @internal */ +export function InvoiceRequestFields_new(payer_id_arg: number, quantity_arg: bigint, payer_note_truncated_arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceRequestFields_new(payer_id_arg, quantity_arg, payer_note_truncated_arg); + return nativeResponseValue; +} + // uint64_t InvoiceRequestFields_clone_ptr(LDKInvoiceRequestFields *NONNULL_PTR arg); +/* @internal */ +export function InvoiceRequestFields_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceRequestFields_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKInvoiceRequestFields InvoiceRequestFields_clone(const struct LDKInvoiceRequestFields *NONNULL_PTR orig); +/* @internal */ +export function InvoiceRequestFields_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceRequestFields_clone(orig); + return nativeResponseValue; +} + // bool InvoiceRequestFields_eq(const struct LDKInvoiceRequestFields *NONNULL_PTR a, const struct LDKInvoiceRequestFields *NONNULL_PTR b); +/* @internal */ +export function InvoiceRequestFields_eq(a: bigint, b: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceRequestFields_eq(a, b); + return nativeResponseValue; +} + // struct LDKCVec_u8Z InvoiceRequestFields_write(const struct LDKInvoiceRequestFields *NONNULL_PTR obj); +/* @internal */ +export function InvoiceRequestFields_write(obj: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceRequestFields_write(obj); + return nativeResponseValue; +} + // struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ InvoiceRequestFields_read(struct LDKu8slice ser); +/* @internal */ +export function InvoiceRequestFields_read(ser: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_InvoiceRequestFields_read(ser); + return nativeResponseValue; } // void TaggedHash_free(struct LDKTaggedHash this_obj); /* @internal */ @@ -48055,6 +52451,51 @@ export function TaggedHash_merkle_root(this_arg: bigint): number { } const nativeResponseValue = wasm.TS_TaggedHash_merkle_root(this_arg); return nativeResponseValue; +} + // void SignError_free(struct LDKSignError this_ptr); +/* @internal */ +export function SignError_free(this_ptr: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_SignError_free(this_ptr); + // debug statements here +} + // uint64_t SignError_clone_ptr(LDKSignError *NONNULL_PTR arg); +/* @internal */ +export function SignError_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_SignError_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKSignError SignError_clone(const struct LDKSignError *NONNULL_PTR orig); +/* @internal */ +export function SignError_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_SignError_clone(orig); + return nativeResponseValue; +} + // struct LDKSignError SignError_signing(void); +/* @internal */ +export function SignError_signing(): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_SignError_signing(); + return nativeResponseValue; +} + // struct LDKSignError SignError_verification(enum LDKSecp256k1Error a); +/* @internal */ +export function SignError_verification(a: Secp256k1Error): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_SignError_verification(a); + return nativeResponseValue; } // void Bolt12ParseError_free(struct LDKBolt12ParseError this_obj); /* @internal */ @@ -48298,6 +52739,15 @@ export function Bolt12SemanticError_missing_paths(): Bolt12SemanticError { } const nativeResponseValue = wasm.TS_Bolt12SemanticError_missing_paths(); return nativeResponseValue; +} + // enum LDKBolt12SemanticError Bolt12SemanticError_unexpected_paths(void); +/* @internal */ +export function Bolt12SemanticError_unexpected_paths(): Bolt12SemanticError { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Bolt12SemanticError_unexpected_paths(); + return nativeResponseValue; } // enum LDKBolt12SemanticError Bolt12SemanticError_invalid_pay_info(void); /* @internal */ @@ -48334,6 +52784,123 @@ export function Bolt12SemanticError_missing_signature(): Bolt12SemanticError { } const nativeResponseValue = wasm.TS_Bolt12SemanticError_missing_signature(); return nativeResponseValue; +} + // void RefundMaybeWithDerivedMetadataBuilder_free(struct LDKRefundMaybeWithDerivedMetadataBuilder this_obj); +/* @internal */ +export function RefundMaybeWithDerivedMetadataBuilder_free(this_obj: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_RefundMaybeWithDerivedMetadataBuilder_free(this_obj); + // debug statements here +} + // uint64_t RefundMaybeWithDerivedMetadataBuilder_clone_ptr(LDKRefundMaybeWithDerivedMetadataBuilder *NONNULL_PTR arg); +/* @internal */ +export function RefundMaybeWithDerivedMetadataBuilder_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_RefundMaybeWithDerivedMetadataBuilder_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKRefundMaybeWithDerivedMetadataBuilder RefundMaybeWithDerivedMetadataBuilder_clone(const struct LDKRefundMaybeWithDerivedMetadataBuilder *NONNULL_PTR orig); +/* @internal */ +export function RefundMaybeWithDerivedMetadataBuilder_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_RefundMaybeWithDerivedMetadataBuilder_clone(orig); + return nativeResponseValue; +} + // MUST_USE_RES struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ RefundMaybeWithDerivedMetadataBuilder_new(struct LDKCVec_u8Z metadata, struct LDKPublicKey payer_id, uint64_t amount_msats); +/* @internal */ +export function RefundMaybeWithDerivedMetadataBuilder_new(metadata: number, payer_id: number, amount_msats: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_RefundMaybeWithDerivedMetadataBuilder_new(metadata, payer_id, amount_msats); + return nativeResponseValue; +} + // MUST_USE_RES struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(struct LDKPublicKey node_id, const struct LDKExpandedKey *NONNULL_PTR expanded_key, struct LDKEntropySource entropy_source, uint64_t amount_msats, struct LDKThirtyTwoBytes payment_id); +/* @internal */ +export function RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(node_id: number, expanded_key: bigint, entropy_source: bigint, amount_msats: bigint, payment_id: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(node_id, expanded_key, entropy_source, amount_msats, payment_id); + return nativeResponseValue; +} + // MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_description(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, struct LDKStr description); +/* @internal */ +export function RefundMaybeWithDerivedMetadataBuilder_description(this_arg: bigint, description: number): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_RefundMaybeWithDerivedMetadataBuilder_description(this_arg, description); + // debug statements here +} + // MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_absolute_expiry(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, uint64_t absolute_expiry); +/* @internal */ +export function RefundMaybeWithDerivedMetadataBuilder_absolute_expiry(this_arg: bigint, absolute_expiry: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_RefundMaybeWithDerivedMetadataBuilder_absolute_expiry(this_arg, absolute_expiry); + // debug statements here +} + // MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_issuer(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, struct LDKStr issuer); +/* @internal */ +export function RefundMaybeWithDerivedMetadataBuilder_issuer(this_arg: bigint, issuer: number): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_RefundMaybeWithDerivedMetadataBuilder_issuer(this_arg, issuer); + // debug statements here +} + // MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_path(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, struct LDKBlindedPath path); +/* @internal */ +export function RefundMaybeWithDerivedMetadataBuilder_path(this_arg: bigint, path: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_RefundMaybeWithDerivedMetadataBuilder_path(this_arg, path); + // debug statements here +} + // MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_chain(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, enum LDKNetwork network); +/* @internal */ +export function RefundMaybeWithDerivedMetadataBuilder_chain(this_arg: bigint, network: Network): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_RefundMaybeWithDerivedMetadataBuilder_chain(this_arg, network); + // debug statements here +} + // MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_quantity(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, uint64_t quantity); +/* @internal */ +export function RefundMaybeWithDerivedMetadataBuilder_quantity(this_arg: bigint, quantity: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_RefundMaybeWithDerivedMetadataBuilder_quantity(this_arg, quantity); + // debug statements here +} + // MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_payer_note(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, struct LDKStr payer_note); +/* @internal */ +export function RefundMaybeWithDerivedMetadataBuilder_payer_note(this_arg: bigint, payer_note: number): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_RefundMaybeWithDerivedMetadataBuilder_payer_note(this_arg, payer_note); + // debug statements here +} + // MUST_USE_RES struct LDKCResult_RefundBolt12SemanticErrorZ RefundMaybeWithDerivedMetadataBuilder_build(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg); +/* @internal */ +export function RefundMaybeWithDerivedMetadataBuilder_build(this_arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_RefundMaybeWithDerivedMetadataBuilder_build(this_arg); + return nativeResponseValue; } // void Refund_free(struct LDKRefund this_obj); /* @internal */ @@ -48469,6 +53036,15 @@ export function Refund_payer_note(this_arg: bigint): bigint { } const nativeResponseValue = wasm.TS_Refund_payer_note(this_arg); return nativeResponseValue; +} + // uint64_t Refund_hash(const struct LDKRefund *NONNULL_PTR o); +/* @internal */ +export function Refund_hash(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Refund_hash(o); + return nativeResponseValue; } // struct LDKCVec_u8Z Refund_write(const struct LDKRefund *NONNULL_PTR obj); /* @internal */ @@ -48658,6 +53234,15 @@ export function NodeId_from_pubkey(pubkey: number): bigint { } const nativeResponseValue = wasm.TS_NodeId_from_pubkey(pubkey); return nativeResponseValue; +} + // MUST_USE_RES struct LDKCResult_NodeIdDecodeErrorZ NodeId_from_slice(struct LDKu8slice bytes); +/* @internal */ +export function NodeId_from_slice(bytes: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_NodeId_from_slice(bytes); + return nativeResponseValue; } // MUST_USE_RES struct LDKu8slice NodeId_as_slice(const struct LDKNodeId *NONNULL_PTR this_arg); /* @internal */ @@ -49315,6 +53900,24 @@ export function DirectedChannelInfo_effective_capacity(this_arg: bigint): bigint } const nativeResponseValue = wasm.TS_DirectedChannelInfo_effective_capacity(this_arg); return nativeResponseValue; +} + // MUST_USE_RES struct LDKNodeId DirectedChannelInfo_source(const struct LDKDirectedChannelInfo *NONNULL_PTR this_arg); +/* @internal */ +export function DirectedChannelInfo_source(this_arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_DirectedChannelInfo_source(this_arg); + return nativeResponseValue; +} + // MUST_USE_RES struct LDKNodeId DirectedChannelInfo_target(const struct LDKDirectedChannelInfo *NONNULL_PTR this_arg); +/* @internal */ +export function DirectedChannelInfo_target(this_arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_DirectedChannelInfo_target(this_arg); + return nativeResponseValue; } // void EffectiveCapacity_free(struct LDKEffectiveCapacity this_ptr); /* @internal */ @@ -49846,6 +54449,15 @@ export function NodeInfo_eq(a: bigint, b: bigint): boolean { } const nativeResponseValue = wasm.TS_NodeInfo_eq(a, b); return nativeResponseValue; +} + // MUST_USE_RES bool NodeInfo_is_tor_only(const struct LDKNodeInfo *NONNULL_PTR this_arg); +/* @internal */ +export function NodeInfo_is_tor_only(this_arg: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_NodeInfo_is_tor_only(this_arg); + return nativeResponseValue; } // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj); /* @internal */ @@ -52673,13 +57285,31 @@ export function DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_p const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val); // debug statements here } - // MUST_USE_RES struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_new(struct LDKOutPoint outpoint_arg, struct LDKPublicKey per_commitment_point_arg, uint16_t to_self_delay_arg, struct LDKTxOut output_arg, struct LDKRevocationKey revocation_pubkey_arg, struct LDKThirtyTwoBytes channel_keys_id_arg, uint64_t channel_value_satoshis_arg); + // struct LDKChannelTransactionParameters DelayedPaymentOutputDescriptor_get_channel_transaction_parameters(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr); /* @internal */ -export function DelayedPaymentOutputDescriptor_new(outpoint_arg: bigint, per_commitment_point_arg: number, to_self_delay_arg: number, output_arg: bigint, revocation_pubkey_arg: bigint, channel_keys_id_arg: number, channel_value_satoshis_arg: bigint): bigint { +export function DelayedPaymentOutputDescriptor_get_channel_transaction_parameters(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_new(outpoint_arg, per_commitment_point_arg, to_self_delay_arg, output_arg, revocation_pubkey_arg, channel_keys_id_arg, channel_value_satoshis_arg); + const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_get_channel_transaction_parameters(this_ptr); + return nativeResponseValue; +} + // void DelayedPaymentOutputDescriptor_set_channel_transaction_parameters(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKChannelTransactionParameters val); +/* @internal */ +export function DelayedPaymentOutputDescriptor_set_channel_transaction_parameters(this_ptr: bigint, val: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_set_channel_transaction_parameters(this_ptr, val); + // debug statements here +} + // MUST_USE_RES struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_new(struct LDKOutPoint outpoint_arg, struct LDKPublicKey per_commitment_point_arg, uint16_t to_self_delay_arg, struct LDKTxOut output_arg, struct LDKRevocationKey revocation_pubkey_arg, struct LDKThirtyTwoBytes channel_keys_id_arg, uint64_t channel_value_satoshis_arg, struct LDKChannelTransactionParameters channel_transaction_parameters_arg); +/* @internal */ +export function DelayedPaymentOutputDescriptor_new(outpoint_arg: bigint, per_commitment_point_arg: number, to_self_delay_arg: number, output_arg: bigint, revocation_pubkey_arg: bigint, channel_keys_id_arg: number, channel_value_satoshis_arg: bigint, channel_transaction_parameters_arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_new(outpoint_arg, per_commitment_point_arg, to_self_delay_arg, output_arg, revocation_pubkey_arg, channel_keys_id_arg, channel_value_satoshis_arg, channel_transaction_parameters_arg); return nativeResponseValue; } // uint64_t DelayedPaymentOutputDescriptor_clone_ptr(LDKDelayedPaymentOutputDescriptor *NONNULL_PTR arg); @@ -53158,6 +57788,24 @@ export function HTLCDescriptor_set_channel_derivation_parameters(this_ptr: bigin } const nativeResponseValue = wasm.TS_HTLCDescriptor_set_channel_derivation_parameters(this_ptr, val); // debug statements here +} + // const uint8_t (*HTLCDescriptor_get_commitment_txid(const struct LDKHTLCDescriptor *NONNULL_PTR this_ptr))[32]; +/* @internal */ +export function HTLCDescriptor_get_commitment_txid(this_ptr: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_HTLCDescriptor_get_commitment_txid(this_ptr); + return nativeResponseValue; +} + // void HTLCDescriptor_set_commitment_txid(struct LDKHTLCDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); +/* @internal */ +export function HTLCDescriptor_set_commitment_txid(this_ptr: bigint, val: number): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_HTLCDescriptor_set_commitment_txid(this_ptr, val); + // debug statements here } // uint64_t HTLCDescriptor_get_per_commitment_number(const struct LDKHTLCDescriptor *NONNULL_PTR this_ptr); /* @internal */ @@ -53266,6 +57914,15 @@ export function HTLCDescriptor_set_counterparty_sig(this_ptr: bigint, val: numbe } const nativeResponseValue = wasm.TS_HTLCDescriptor_set_counterparty_sig(this_ptr, val); // debug statements here +} + // MUST_USE_RES struct LDKHTLCDescriptor HTLCDescriptor_new(struct LDKChannelDerivationParameters channel_derivation_parameters_arg, struct LDKThirtyTwoBytes commitment_txid_arg, uint64_t per_commitment_number_arg, struct LDKPublicKey per_commitment_point_arg, uint32_t feerate_per_kw_arg, struct LDKHTLCOutputInCommitment htlc_arg, struct LDKCOption_ThirtyTwoBytesZ preimage_arg, struct LDKECDSASignature counterparty_sig_arg); +/* @internal */ +export function HTLCDescriptor_new(channel_derivation_parameters_arg: bigint, commitment_txid_arg: number, per_commitment_number_arg: bigint, per_commitment_point_arg: number, feerate_per_kw_arg: number, htlc_arg: bigint, preimage_arg: bigint, counterparty_sig_arg: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_HTLCDescriptor_new(channel_derivation_parameters_arg, commitment_txid_arg, per_commitment_number_arg, per_commitment_point_arg, feerate_per_kw_arg, htlc_arg, preimage_arg, counterparty_sig_arg); + return nativeResponseValue; } // uint64_t HTLCDescriptor_clone_ptr(LDKHTLCDescriptor *NONNULL_PTR arg); /* @internal */ @@ -53428,6 +58085,15 @@ export function NodeSigner_free(this_ptr: bigint): void { } const nativeResponseValue = wasm.TS_NodeSigner_free(this_ptr); // debug statements here +} + // void OutputSpender_free(struct LDKOutputSpender this_ptr); +/* @internal */ +export function OutputSpender_free(this_ptr: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_OutputSpender_free(this_ptr); + // debug statements here } // void SignerProvider_free(struct LDKSignerProvider this_ptr); /* @internal */ @@ -53437,6 +58103,15 @@ export function SignerProvider_free(this_ptr: bigint): void { } const nativeResponseValue = wasm.TS_SignerProvider_free(this_ptr); // debug statements here +} + // void ChangeDestinationSource_free(struct LDKChangeDestinationSource this_ptr); +/* @internal */ +export function ChangeDestinationSource_free(this_ptr: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ChangeDestinationSource_free(this_ptr); + // debug statements here } // void InMemorySigner_free(struct LDKInMemorySigner this_obj); /* @internal */ @@ -53761,15 +58436,6 @@ export function KeysManager_sign_spendable_outputs_psbt(this_arg: bigint, descri } const nativeResponseValue = wasm.TS_KeysManager_sign_spendable_outputs_psbt(this_arg, descriptors, psbt); return nativeResponseValue; -} - // MUST_USE_RES struct LDKCResult_TransactionNoneZ KeysManager_spend_spendable_outputs(const struct LDKKeysManager *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ descriptors, struct LDKCVec_TxOutZ outputs, struct LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight, struct LDKCOption_u32Z locktime); -/* @internal */ -export function KeysManager_spend_spendable_outputs(this_arg: bigint, descriptors: number, outputs: number, change_destination_script: number, feerate_sat_per_1000_weight: number, locktime: bigint): bigint { - if(!isWasmInitialized) { - throw new Error("initializeWasm() must be awaited first!"); - } - const nativeResponseValue = wasm.TS_KeysManager_spend_spendable_outputs(this_arg, descriptors, outputs, change_destination_script, feerate_sat_per_1000_weight, locktime); - return nativeResponseValue; } // struct LDKEntropySource KeysManager_as_EntropySource(const struct LDKKeysManager *NONNULL_PTR this_arg); /* @internal */ @@ -53788,6 +58454,15 @@ export function KeysManager_as_NodeSigner(this_arg: bigint): bigint { } const nativeResponseValue = wasm.TS_KeysManager_as_NodeSigner(this_arg); return nativeResponseValue; +} + // struct LDKOutputSpender KeysManager_as_OutputSpender(const struct LDKKeysManager *NONNULL_PTR this_arg); +/* @internal */ +export function KeysManager_as_OutputSpender(this_arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_KeysManager_as_OutputSpender(this_arg); + return nativeResponseValue; } // struct LDKSignerProvider KeysManager_as_SignerProvider(const struct LDKKeysManager *NONNULL_PTR this_arg); /* @internal */ @@ -53825,31 +58500,31 @@ export function PhantomKeysManager_as_NodeSigner(this_arg: bigint): bigint { const nativeResponseValue = wasm.TS_PhantomKeysManager_as_NodeSigner(this_arg); return nativeResponseValue; } - // struct LDKSignerProvider PhantomKeysManager_as_SignerProvider(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg); + // struct LDKOutputSpender PhantomKeysManager_as_OutputSpender(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg); /* @internal */ -export function PhantomKeysManager_as_SignerProvider(this_arg: bigint): bigint { +export function PhantomKeysManager_as_OutputSpender(this_arg: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_PhantomKeysManager_as_SignerProvider(this_arg); + const nativeResponseValue = wasm.TS_PhantomKeysManager_as_OutputSpender(this_arg); return nativeResponseValue; } - // MUST_USE_RES struct LDKPhantomKeysManager PhantomKeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos, const uint8_t (*cross_node_seed)[32]); + // struct LDKSignerProvider PhantomKeysManager_as_SignerProvider(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg); /* @internal */ -export function PhantomKeysManager_new(seed: number, starting_time_secs: bigint, starting_time_nanos: number, cross_node_seed: number): bigint { +export function PhantomKeysManager_as_SignerProvider(this_arg: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_PhantomKeysManager_new(seed, starting_time_secs, starting_time_nanos, cross_node_seed); + const nativeResponseValue = wasm.TS_PhantomKeysManager_as_SignerProvider(this_arg); return nativeResponseValue; } - // MUST_USE_RES struct LDKCResult_TransactionNoneZ PhantomKeysManager_spend_spendable_outputs(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ descriptors, struct LDKCVec_TxOutZ outputs, struct LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight, struct LDKCOption_u32Z locktime); + // MUST_USE_RES struct LDKPhantomKeysManager PhantomKeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos, const uint8_t (*cross_node_seed)[32]); /* @internal */ -export function PhantomKeysManager_spend_spendable_outputs(this_arg: bigint, descriptors: number, outputs: number, change_destination_script: number, feerate_sat_per_1000_weight: number, locktime: bigint): bigint { +export function PhantomKeysManager_new(seed: number, starting_time_secs: bigint, starting_time_nanos: number, cross_node_seed: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_PhantomKeysManager_spend_spendable_outputs(this_arg, descriptors, outputs, change_destination_script, feerate_sat_per_1000_weight, locktime); + const nativeResponseValue = wasm.TS_PhantomKeysManager_new(seed, starting_time_secs, starting_time_nanos, cross_node_seed); return nativeResponseValue; } // MUST_USE_RES struct LDKInMemorySigner PhantomKeysManager_derive_channel_keys(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg, uint64_t channel_value_satoshis, const uint8_t (*params)[32]); @@ -53878,6 +58553,33 @@ export function PhantomKeysManager_get_phantom_node_secret_key(this_arg: bigint) } const nativeResponseValue = wasm.TS_PhantomKeysManager_get_phantom_node_secret_key(this_arg); return nativeResponseValue; +} + // void RandomBytes_free(struct LDKRandomBytes this_obj); +/* @internal */ +export function RandomBytes_free(this_obj: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_RandomBytes_free(this_obj); + // debug statements here +} + // MUST_USE_RES struct LDKRandomBytes RandomBytes_new(struct LDKThirtyTwoBytes seed); +/* @internal */ +export function RandomBytes_new(seed: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_RandomBytes_new(seed); + return nativeResponseValue; +} + // struct LDKEntropySource RandomBytes_as_EntropySource(const struct LDKRandomBytes *NONNULL_PTR this_arg); +/* @internal */ +export function RandomBytes_as_EntropySource(this_arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_RandomBytes_as_EntropySource(this_arg); + return nativeResponseValue; } // void EcdsaChannelSigner_free(struct LDKEcdsaChannelSigner this_ptr); /* @internal */ @@ -54103,6 +58805,33 @@ export function Destination_blinded_path(a: bigint): bigint { } const nativeResponseValue = wasm.TS_Destination_blinded_path(a); return nativeResponseValue; +} + // uint64_t Destination_hash(const struct LDKDestination *NONNULL_PTR o); +/* @internal */ +export function Destination_hash(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Destination_hash(o); + return nativeResponseValue; +} + // bool Destination_eq(const struct LDKDestination *NONNULL_PTR a, const struct LDKDestination *NONNULL_PTR b); +/* @internal */ +export function Destination_eq(a: bigint, b: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Destination_eq(a, b); + return nativeResponseValue; +} + // void Destination_resolve(struct LDKDestination *NONNULL_PTR this_arg, const struct LDKReadOnlyNetworkGraph *NONNULL_PTR network_graph); +/* @internal */ +export function Destination_resolve(this_arg: bigint, network_graph: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Destination_resolve(this_arg, network_graph); + // debug statements here } // void SendSuccess_free(struct LDKSendSuccess this_ptr); /* @internal */ @@ -54148,6 +58877,15 @@ export function SendSuccess_buffered_awaiting_connection(a: number): bigint { } const nativeResponseValue = wasm.TS_SendSuccess_buffered_awaiting_connection(a); return nativeResponseValue; +} + // uint64_t SendSuccess_hash(const struct LDKSendSuccess *NONNULL_PTR o); +/* @internal */ +export function SendSuccess_hash(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_SendSuccess_hash(o); + return nativeResponseValue; } // bool SendSuccess_eq(const struct LDKSendSuccess *NONNULL_PTR a, const struct LDKSendSuccess *NONNULL_PTR b); /* @internal */ @@ -54256,6 +58994,15 @@ export function SendError_get_node_id_failed(): bigint { } const nativeResponseValue = wasm.TS_SendError_get_node_id_failed(); return nativeResponseValue; +} + // struct LDKSendError SendError_unresolved_introduction_node(void); +/* @internal */ +export function SendError_unresolved_introduction_node(): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_SendError_unresolved_introduction_node(); + return nativeResponseValue; } // struct LDKSendError SendError_blinded_path_advance_failed(void); /* @internal */ @@ -54265,6 +59012,15 @@ export function SendError_blinded_path_advance_failed(): bigint { } const nativeResponseValue = wasm.TS_SendError_blinded_path_advance_failed(); return nativeResponseValue; +} + // uint64_t SendError_hash(const struct LDKSendError *NONNULL_PTR o); +/* @internal */ +export function SendError_hash(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_SendError_hash(o); + return nativeResponseValue; } // bool SendError_eq(const struct LDKSendError *NONNULL_PTR a, const struct LDKSendError *NONNULL_PTR b); /* @internal */ @@ -54311,9 +59067,9 @@ export function PeeledOnion_clone(orig: bigint): bigint { const nativeResponseValue = wasm.TS_PeeledOnion_clone(orig); return nativeResponseValue; } - // struct LDKPeeledOnion PeeledOnion_forward(struct LDKPublicKey a, struct LDKOnionMessage b); + // struct LDKPeeledOnion PeeledOnion_forward(struct LDKNextMessageHop a, struct LDKOnionMessage b); /* @internal */ -export function PeeledOnion_forward(a: number, b: bigint): bigint { +export function PeeledOnion_forward(a: bigint, b: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -54329,13 +59085,22 @@ export function PeeledOnion_receive(a: bigint, b: number, c: bigint): bigint { const nativeResponseValue = wasm.TS_PeeledOnion_receive(a, b, c); return nativeResponseValue; } - // struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ create_onion_message(const struct LDKEntropySource *NONNULL_PTR entropy_source, const struct LDKNodeSigner *NONNULL_PTR node_signer, struct LDKOnionMessagePath path, struct LDKOnionMessageContents contents, struct LDKBlindedPath reply_path); + // struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ create_onion_message_resolving_destination(const struct LDKEntropySource *NONNULL_PTR entropy_source, const struct LDKNodeSigner *NONNULL_PTR node_signer, const struct LDKNodeIdLookUp *NONNULL_PTR node_id_lookup, const struct LDKReadOnlyNetworkGraph *NONNULL_PTR network_graph, struct LDKOnionMessagePath path, struct LDKOnionMessageContents contents, struct LDKBlindedPath reply_path); +/* @internal */ +export function create_onion_message_resolving_destination(entropy_source: bigint, node_signer: bigint, node_id_lookup: bigint, network_graph: bigint, path: bigint, contents: bigint, reply_path: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_create_onion_message_resolving_destination(entropy_source, node_signer, node_id_lookup, network_graph, path, contents, reply_path); + return nativeResponseValue; +} + // struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ create_onion_message(const struct LDKEntropySource *NONNULL_PTR entropy_source, const struct LDKNodeSigner *NONNULL_PTR node_signer, const struct LDKNodeIdLookUp *NONNULL_PTR node_id_lookup, struct LDKOnionMessagePath path, struct LDKOnionMessageContents contents, struct LDKBlindedPath reply_path); /* @internal */ -export function create_onion_message(entropy_source: bigint, node_signer: bigint, path: bigint, contents: bigint, reply_path: bigint): bigint { +export function create_onion_message(entropy_source: bigint, node_signer: bigint, node_id_lookup: bigint, path: bigint, contents: bigint, reply_path: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_create_onion_message(entropy_source, node_signer, path, contents, reply_path); + const nativeResponseValue = wasm.TS_create_onion_message(entropy_source, node_signer, node_id_lookup, path, contents, reply_path); return nativeResponseValue; } // struct LDKCResult_PeeledOnionNoneZ peel_onion_message(const struct LDKOnionMessage *NONNULL_PTR msg, struct LDKNodeSigner node_signer, struct LDKLogger logger, struct LDKCustomOnionMessageHandler custom_handler); @@ -54347,13 +59112,13 @@ export function peel_onion_message(msg: bigint, node_signer: bigint, logger: big const nativeResponseValue = wasm.TS_peel_onion_message(msg, node_signer, logger, custom_handler); return nativeResponseValue; } - // MUST_USE_RES struct LDKOnionMessenger OnionMessenger_new(struct LDKEntropySource entropy_source, struct LDKNodeSigner node_signer, struct LDKLogger logger, struct LDKMessageRouter message_router, struct LDKOffersMessageHandler offers_handler, struct LDKCustomOnionMessageHandler custom_handler); + // MUST_USE_RES struct LDKOnionMessenger OnionMessenger_new(struct LDKEntropySource entropy_source, struct LDKNodeSigner node_signer, struct LDKLogger logger, struct LDKNodeIdLookUp node_id_lookup, struct LDKMessageRouter message_router, struct LDKOffersMessageHandler offers_handler, struct LDKCustomOnionMessageHandler custom_handler); /* @internal */ -export function OnionMessenger_new(entropy_source: bigint, node_signer: bigint, logger: bigint, message_router: bigint, offers_handler: bigint, custom_handler: bigint): bigint { +export function OnionMessenger_new(entropy_source: bigint, node_signer: bigint, logger: bigint, node_id_lookup: bigint, message_router: bigint, offers_handler: bigint, custom_handler: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_OnionMessenger_new(entropy_source, node_signer, logger, message_router, offers_handler, custom_handler); + const nativeResponseValue = wasm.TS_OnionMessenger_new(entropy_source, node_signer, logger, node_id_lookup, message_router, offers_handler, custom_handler); return nativeResponseValue; } // MUST_USE_RES struct LDKCResult_SendSuccessSendErrorZ OnionMessenger_send_onion_message(const struct LDKOnionMessenger *NONNULL_PTR this_arg, struct LDKOnionMessageContents contents, struct LDKDestination destination, struct LDKBlindedPath reply_path); @@ -54697,6 +59462,69 @@ export function OnionMessageContents_free(this_ptr: bigint): void { } const nativeResponseValue = wasm.TS_OnionMessageContents_free(this_ptr); // debug statements here +} + // void NextMessageHop_free(struct LDKNextMessageHop this_ptr); +/* @internal */ +export function NextMessageHop_free(this_ptr: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_NextMessageHop_free(this_ptr); + // debug statements here +} + // uint64_t NextMessageHop_clone_ptr(LDKNextMessageHop *NONNULL_PTR arg); +/* @internal */ +export function NextMessageHop_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_NextMessageHop_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKNextMessageHop NextMessageHop_clone(const struct LDKNextMessageHop *NONNULL_PTR orig); +/* @internal */ +export function NextMessageHop_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_NextMessageHop_clone(orig); + return nativeResponseValue; +} + // struct LDKNextMessageHop NextMessageHop_node_id(struct LDKPublicKey a); +/* @internal */ +export function NextMessageHop_node_id(a: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_NextMessageHop_node_id(a); + return nativeResponseValue; +} + // struct LDKNextMessageHop NextMessageHop_short_channel_id(uint64_t a); +/* @internal */ +export function NextMessageHop_short_channel_id(a: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_NextMessageHop_short_channel_id(a); + return nativeResponseValue; +} + // uint64_t NextMessageHop_hash(const struct LDKNextMessageHop *NONNULL_PTR o); +/* @internal */ +export function NextMessageHop_hash(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_NextMessageHop_hash(o); + return nativeResponseValue; +} + // bool NextMessageHop_eq(const struct LDKNextMessageHop *NONNULL_PTR a, const struct LDKNextMessageHop *NONNULL_PTR b); +/* @internal */ +export function NextMessageHop_eq(a: bigint, b: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_NextMessageHop_eq(a, b); + return nativeResponseValue; } // void BlindedPath_free(struct LDKBlindedPath this_obj); /* @internal */ @@ -54707,22 +59535,22 @@ export function BlindedPath_free(this_obj: bigint): void { const nativeResponseValue = wasm.TS_BlindedPath_free(this_obj); // debug statements here } - // struct LDKPublicKey BlindedPath_get_introduction_node_id(const struct LDKBlindedPath *NONNULL_PTR this_ptr); + // struct LDKIntroductionNode BlindedPath_get_introduction_node(const struct LDKBlindedPath *NONNULL_PTR this_ptr); /* @internal */ -export function BlindedPath_get_introduction_node_id(this_ptr: bigint): number { +export function BlindedPath_get_introduction_node(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_BlindedPath_get_introduction_node_id(this_ptr); + const nativeResponseValue = wasm.TS_BlindedPath_get_introduction_node(this_ptr); return nativeResponseValue; } - // void BlindedPath_set_introduction_node_id(struct LDKBlindedPath *NONNULL_PTR this_ptr, struct LDKPublicKey val); + // void BlindedPath_set_introduction_node(struct LDKBlindedPath *NONNULL_PTR this_ptr, struct LDKIntroductionNode val); /* @internal */ -export function BlindedPath_set_introduction_node_id(this_ptr: bigint, val: number): void { +export function BlindedPath_set_introduction_node(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_BlindedPath_set_introduction_node_id(this_ptr, val); + const nativeResponseValue = wasm.TS_BlindedPath_set_introduction_node(this_ptr, val); // debug statements here } // struct LDKPublicKey BlindedPath_get_blinding_point(const struct LDKBlindedPath *NONNULL_PTR this_ptr); @@ -54761,13 +59589,13 @@ export function BlindedPath_set_blinded_hops(this_ptr: bigint, val: number): voi const nativeResponseValue = wasm.TS_BlindedPath_set_blinded_hops(this_ptr, val); // debug statements here } - // MUST_USE_RES struct LDKBlindedPath BlindedPath_new(struct LDKPublicKey introduction_node_id_arg, struct LDKPublicKey blinding_point_arg, struct LDKCVec_BlindedHopZ blinded_hops_arg); + // MUST_USE_RES struct LDKBlindedPath BlindedPath_new(struct LDKIntroductionNode introduction_node_arg, struct LDKPublicKey blinding_point_arg, struct LDKCVec_BlindedHopZ blinded_hops_arg); /* @internal */ -export function BlindedPath_new(introduction_node_id_arg: number, blinding_point_arg: number, blinded_hops_arg: number): bigint { +export function BlindedPath_new(introduction_node_arg: bigint, blinding_point_arg: number, blinded_hops_arg: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_BlindedPath_new(introduction_node_id_arg, blinding_point_arg, blinded_hops_arg); + const nativeResponseValue = wasm.TS_BlindedPath_new(introduction_node_arg, blinding_point_arg, blinded_hops_arg); return nativeResponseValue; } // uint64_t BlindedPath_clone_ptr(LDKBlindedPath *NONNULL_PTR arg); @@ -54805,6 +59633,150 @@ export function BlindedPath_eq(a: bigint, b: bigint): boolean { } const nativeResponseValue = wasm.TS_BlindedPath_eq(a, b); return nativeResponseValue; +} + // void IntroductionNode_free(struct LDKIntroductionNode this_ptr); +/* @internal */ +export function IntroductionNode_free(this_ptr: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_IntroductionNode_free(this_ptr); + // debug statements here +} + // uint64_t IntroductionNode_clone_ptr(LDKIntroductionNode *NONNULL_PTR arg); +/* @internal */ +export function IntroductionNode_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_IntroductionNode_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKIntroductionNode IntroductionNode_clone(const struct LDKIntroductionNode *NONNULL_PTR orig); +/* @internal */ +export function IntroductionNode_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_IntroductionNode_clone(orig); + return nativeResponseValue; +} + // struct LDKIntroductionNode IntroductionNode_node_id(struct LDKPublicKey a); +/* @internal */ +export function IntroductionNode_node_id(a: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_IntroductionNode_node_id(a); + return nativeResponseValue; +} + // struct LDKIntroductionNode IntroductionNode_directed_short_channel_id(enum LDKDirection a, uint64_t b); +/* @internal */ +export function IntroductionNode_directed_short_channel_id(a: Direction, b: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_IntroductionNode_directed_short_channel_id(a, b); + return nativeResponseValue; +} + // uint64_t IntroductionNode_hash(const struct LDKIntroductionNode *NONNULL_PTR o); +/* @internal */ +export function IntroductionNode_hash(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_IntroductionNode_hash(o); + return nativeResponseValue; +} + // bool IntroductionNode_eq(const struct LDKIntroductionNode *NONNULL_PTR a, const struct LDKIntroductionNode *NONNULL_PTR b); +/* @internal */ +export function IntroductionNode_eq(a: bigint, b: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_IntroductionNode_eq(a, b); + return nativeResponseValue; +} + // enum LDKDirection Direction_clone(const enum LDKDirection *NONNULL_PTR orig); +/* @internal */ +export function Direction_clone(orig: bigint): Direction { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Direction_clone(orig); + return nativeResponseValue; +} + // enum LDKDirection Direction_node_one(void); +/* @internal */ +export function Direction_node_one(): Direction { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Direction_node_one(); + return nativeResponseValue; +} + // enum LDKDirection Direction_node_two(void); +/* @internal */ +export function Direction_node_two(): Direction { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Direction_node_two(); + return nativeResponseValue; +} + // uint64_t Direction_hash(const enum LDKDirection *NONNULL_PTR o); +/* @internal */ +export function Direction_hash(o: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Direction_hash(o); + return nativeResponseValue; +} + // bool Direction_eq(const enum LDKDirection *NONNULL_PTR a, const enum LDKDirection *NONNULL_PTR b); +/* @internal */ +export function Direction_eq(a: bigint, b: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Direction_eq(a, b); + return nativeResponseValue; +} + // void NodeIdLookUp_free(struct LDKNodeIdLookUp this_ptr); +/* @internal */ +export function NodeIdLookUp_free(this_ptr: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_NodeIdLookUp_free(this_ptr); + // debug statements here +} + // void EmptyNodeIdLookUp_free(struct LDKEmptyNodeIdLookUp this_obj); +/* @internal */ +export function EmptyNodeIdLookUp_free(this_obj: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_EmptyNodeIdLookUp_free(this_obj); + // debug statements here +} + // MUST_USE_RES struct LDKEmptyNodeIdLookUp EmptyNodeIdLookUp_new(void); +/* @internal */ +export function EmptyNodeIdLookUp_new(): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_EmptyNodeIdLookUp_new(); + return nativeResponseValue; +} + // struct LDKNodeIdLookUp EmptyNodeIdLookUp_as_NodeIdLookUp(const struct LDKEmptyNodeIdLookUp *NONNULL_PTR this_arg); +/* @internal */ +export function EmptyNodeIdLookUp_as_NodeIdLookUp(this_arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_EmptyNodeIdLookUp_as_NodeIdLookUp(this_arg); + return nativeResponseValue; } // void BlindedHop_free(struct LDKBlindedHop this_obj); /* @internal */ @@ -54896,7 +59868,7 @@ export function BlindedHop_eq(a: bigint, b: bigint): boolean { const nativeResponseValue = wasm.TS_BlindedHop_eq(a, b); return nativeResponseValue; } - // MUST_USE_RES struct LDKCResult_BlindedPathNoneZ BlindedPath_one_hop_for_message(struct LDKPublicKey recipient_node_id, const struct LDKEntropySource *NONNULL_PTR entropy_source); + // MUST_USE_RES struct LDKCResult_BlindedPathNoneZ BlindedPath_one_hop_for_message(struct LDKPublicKey recipient_node_id, struct LDKEntropySource entropy_source); /* @internal */ export function BlindedPath_one_hop_for_message(recipient_node_id: number, entropy_source: bigint): bigint { if(!isWasmInitialized) { @@ -54905,7 +59877,7 @@ export function BlindedPath_one_hop_for_message(recipient_node_id: number, entro const nativeResponseValue = wasm.TS_BlindedPath_one_hop_for_message(recipient_node_id, entropy_source); return nativeResponseValue; } - // MUST_USE_RES struct LDKCResult_BlindedPathNoneZ BlindedPath_new_for_message(struct LDKCVec_PublicKeyZ node_pks, const struct LDKEntropySource *NONNULL_PTR entropy_source); + // MUST_USE_RES struct LDKCResult_BlindedPathNoneZ BlindedPath_new_for_message(struct LDKCVec_PublicKeyZ node_pks, struct LDKEntropySource entropy_source); /* @internal */ export function BlindedPath_new_for_message(node_pks: number, entropy_source: bigint): bigint { if(!isWasmInitialized) { @@ -54914,22 +59886,31 @@ export function BlindedPath_new_for_message(node_pks: number, entropy_source: bi const nativeResponseValue = wasm.TS_BlindedPath_new_for_message(node_pks, entropy_source); return nativeResponseValue; } - // MUST_USE_RES struct LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_one_hop_for_payment(struct LDKPublicKey payee_node_id, struct LDKReceiveTlvs payee_tlvs, const struct LDKEntropySource *NONNULL_PTR entropy_source); + // MUST_USE_RES struct LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_one_hop_for_payment(struct LDKPublicKey payee_node_id, struct LDKReceiveTlvs payee_tlvs, uint16_t min_final_cltv_expiry_delta, struct LDKEntropySource entropy_source); /* @internal */ -export function BlindedPath_one_hop_for_payment(payee_node_id: number, payee_tlvs: bigint, entropy_source: bigint): bigint { +export function BlindedPath_one_hop_for_payment(payee_node_id: number, payee_tlvs: bigint, min_final_cltv_expiry_delta: number, entropy_source: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_BlindedPath_one_hop_for_payment(payee_node_id, payee_tlvs, entropy_source); + const nativeResponseValue = wasm.TS_BlindedPath_one_hop_for_payment(payee_node_id, payee_tlvs, min_final_cltv_expiry_delta, entropy_source); return nativeResponseValue; } - // MUST_USE_RES struct LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_new_for_payment(struct LDKCVec_ForwardNodeZ intermediate_nodes, struct LDKPublicKey payee_node_id, struct LDKReceiveTlvs payee_tlvs, uint64_t htlc_maximum_msat, const struct LDKEntropySource *NONNULL_PTR entropy_source); + // MUST_USE_RES struct LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_new_for_payment(struct LDKCVec_ForwardNodeZ intermediate_nodes, struct LDKPublicKey payee_node_id, struct LDKReceiveTlvs payee_tlvs, uint64_t htlc_maximum_msat, uint16_t min_final_cltv_expiry_delta, struct LDKEntropySource entropy_source); /* @internal */ -export function BlindedPath_new_for_payment(intermediate_nodes: number, payee_node_id: number, payee_tlvs: bigint, htlc_maximum_msat: bigint, entropy_source: bigint): bigint { +export function BlindedPath_new_for_payment(intermediate_nodes: number, payee_node_id: number, payee_tlvs: bigint, htlc_maximum_msat: bigint, min_final_cltv_expiry_delta: number, entropy_source: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_BlindedPath_new_for_payment(intermediate_nodes, payee_node_id, payee_tlvs, htlc_maximum_msat, entropy_source); + const nativeResponseValue = wasm.TS_BlindedPath_new_for_payment(intermediate_nodes, payee_node_id, payee_tlvs, htlc_maximum_msat, min_final_cltv_expiry_delta, entropy_source); + return nativeResponseValue; +} + // MUST_USE_RES struct LDKNodeId BlindedPath_public_introduction_node_id(const struct LDKBlindedPath *NONNULL_PTR this_arg, const struct LDKReadOnlyNetworkGraph *NONNULL_PTR network_graph); +/* @internal */ +export function BlindedPath_public_introduction_node_id(this_arg: bigint, network_graph: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_BlindedPath_public_introduction_node_id(this_arg, network_graph); return nativeResponseValue; } // struct LDKCVec_u8Z BlindedPath_write(const struct LDKBlindedPath *NONNULL_PTR obj); @@ -55211,13 +60192,31 @@ export function ReceiveTlvs_set_payment_constraints(this_ptr: bigint, val: bigin const nativeResponseValue = wasm.TS_ReceiveTlvs_set_payment_constraints(this_ptr, val); // debug statements here } - // MUST_USE_RES struct LDKReceiveTlvs ReceiveTlvs_new(struct LDKThirtyTwoBytes payment_secret_arg, struct LDKPaymentConstraints payment_constraints_arg); + // struct LDKPaymentContext ReceiveTlvs_get_payment_context(const struct LDKReceiveTlvs *NONNULL_PTR this_ptr); /* @internal */ -export function ReceiveTlvs_new(payment_secret_arg: number, payment_constraints_arg: bigint): bigint { +export function ReceiveTlvs_get_payment_context(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_ReceiveTlvs_new(payment_secret_arg, payment_constraints_arg); + const nativeResponseValue = wasm.TS_ReceiveTlvs_get_payment_context(this_ptr); + return nativeResponseValue; +} + // void ReceiveTlvs_set_payment_context(struct LDKReceiveTlvs *NONNULL_PTR this_ptr, struct LDKPaymentContext val); +/* @internal */ +export function ReceiveTlvs_set_payment_context(this_ptr: bigint, val: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ReceiveTlvs_set_payment_context(this_ptr, val); + // debug statements here +} + // MUST_USE_RES struct LDKReceiveTlvs ReceiveTlvs_new(struct LDKThirtyTwoBytes payment_secret_arg, struct LDKPaymentConstraints payment_constraints_arg, struct LDKPaymentContext payment_context_arg); +/* @internal */ +export function ReceiveTlvs_new(payment_secret_arg: number, payment_constraints_arg: bigint, payment_context_arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ReceiveTlvs_new(payment_secret_arg, payment_constraints_arg, payment_context_arg); return nativeResponseValue; } // uint64_t ReceiveTlvs_clone_ptr(LDKReceiveTlvs *NONNULL_PTR arg); @@ -55399,6 +60398,231 @@ export function PaymentConstraints_clone(orig: bigint): bigint { } const nativeResponseValue = wasm.TS_PaymentConstraints_clone(orig); return nativeResponseValue; +} + // void PaymentContext_free(struct LDKPaymentContext this_ptr); +/* @internal */ +export function PaymentContext_free(this_ptr: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_PaymentContext_free(this_ptr); + // debug statements here +} + // uint64_t PaymentContext_clone_ptr(LDKPaymentContext *NONNULL_PTR arg); +/* @internal */ +export function PaymentContext_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_PaymentContext_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKPaymentContext PaymentContext_clone(const struct LDKPaymentContext *NONNULL_PTR orig); +/* @internal */ +export function PaymentContext_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_PaymentContext_clone(orig); + return nativeResponseValue; +} + // struct LDKPaymentContext PaymentContext_unknown(struct LDKUnknownPaymentContext a); +/* @internal */ +export function PaymentContext_unknown(a: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_PaymentContext_unknown(a); + return nativeResponseValue; +} + // struct LDKPaymentContext PaymentContext_bolt12_offer(struct LDKBolt12OfferContext a); +/* @internal */ +export function PaymentContext_bolt12_offer(a: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_PaymentContext_bolt12_offer(a); + return nativeResponseValue; +} + // struct LDKPaymentContext PaymentContext_bolt12_refund(struct LDKBolt12RefundContext a); +/* @internal */ +export function PaymentContext_bolt12_refund(a: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_PaymentContext_bolt12_refund(a); + return nativeResponseValue; +} + // bool PaymentContext_eq(const struct LDKPaymentContext *NONNULL_PTR a, const struct LDKPaymentContext *NONNULL_PTR b); +/* @internal */ +export function PaymentContext_eq(a: bigint, b: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_PaymentContext_eq(a, b); + return nativeResponseValue; +} + // void UnknownPaymentContext_free(struct LDKUnknownPaymentContext this_obj); +/* @internal */ +export function UnknownPaymentContext_free(this_obj: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_UnknownPaymentContext_free(this_obj); + // debug statements here +} + // uint64_t UnknownPaymentContext_clone_ptr(LDKUnknownPaymentContext *NONNULL_PTR arg); +/* @internal */ +export function UnknownPaymentContext_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_UnknownPaymentContext_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKUnknownPaymentContext UnknownPaymentContext_clone(const struct LDKUnknownPaymentContext *NONNULL_PTR orig); +/* @internal */ +export function UnknownPaymentContext_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_UnknownPaymentContext_clone(orig); + return nativeResponseValue; +} + // bool UnknownPaymentContext_eq(const struct LDKUnknownPaymentContext *NONNULL_PTR a, const struct LDKUnknownPaymentContext *NONNULL_PTR b); +/* @internal */ +export function UnknownPaymentContext_eq(a: bigint, b: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_UnknownPaymentContext_eq(a, b); + return nativeResponseValue; +} + // void Bolt12OfferContext_free(struct LDKBolt12OfferContext this_obj); +/* @internal */ +export function Bolt12OfferContext_free(this_obj: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Bolt12OfferContext_free(this_obj); + // debug statements here +} + // struct LDKOfferId Bolt12OfferContext_get_offer_id(const struct LDKBolt12OfferContext *NONNULL_PTR this_ptr); +/* @internal */ +export function Bolt12OfferContext_get_offer_id(this_ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Bolt12OfferContext_get_offer_id(this_ptr); + return nativeResponseValue; +} + // void Bolt12OfferContext_set_offer_id(struct LDKBolt12OfferContext *NONNULL_PTR this_ptr, struct LDKOfferId val); +/* @internal */ +export function Bolt12OfferContext_set_offer_id(this_ptr: bigint, val: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Bolt12OfferContext_set_offer_id(this_ptr, val); + // debug statements here +} + // struct LDKInvoiceRequestFields Bolt12OfferContext_get_invoice_request(const struct LDKBolt12OfferContext *NONNULL_PTR this_ptr); +/* @internal */ +export function Bolt12OfferContext_get_invoice_request(this_ptr: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Bolt12OfferContext_get_invoice_request(this_ptr); + return nativeResponseValue; +} + // void Bolt12OfferContext_set_invoice_request(struct LDKBolt12OfferContext *NONNULL_PTR this_ptr, struct LDKInvoiceRequestFields val); +/* @internal */ +export function Bolt12OfferContext_set_invoice_request(this_ptr: bigint, val: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Bolt12OfferContext_set_invoice_request(this_ptr, val); + // debug statements here +} + // MUST_USE_RES struct LDKBolt12OfferContext Bolt12OfferContext_new(struct LDKOfferId offer_id_arg, struct LDKInvoiceRequestFields invoice_request_arg); +/* @internal */ +export function Bolt12OfferContext_new(offer_id_arg: bigint, invoice_request_arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Bolt12OfferContext_new(offer_id_arg, invoice_request_arg); + return nativeResponseValue; +} + // uint64_t Bolt12OfferContext_clone_ptr(LDKBolt12OfferContext *NONNULL_PTR arg); +/* @internal */ +export function Bolt12OfferContext_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Bolt12OfferContext_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKBolt12OfferContext Bolt12OfferContext_clone(const struct LDKBolt12OfferContext *NONNULL_PTR orig); +/* @internal */ +export function Bolt12OfferContext_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Bolt12OfferContext_clone(orig); + return nativeResponseValue; +} + // bool Bolt12OfferContext_eq(const struct LDKBolt12OfferContext *NONNULL_PTR a, const struct LDKBolt12OfferContext *NONNULL_PTR b); +/* @internal */ +export function Bolt12OfferContext_eq(a: bigint, b: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Bolt12OfferContext_eq(a, b); + return nativeResponseValue; +} + // void Bolt12RefundContext_free(struct LDKBolt12RefundContext this_obj); +/* @internal */ +export function Bolt12RefundContext_free(this_obj: bigint): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Bolt12RefundContext_free(this_obj); + // debug statements here +} + // MUST_USE_RES struct LDKBolt12RefundContext Bolt12RefundContext_new(void); +/* @internal */ +export function Bolt12RefundContext_new(): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Bolt12RefundContext_new(); + return nativeResponseValue; +} + // uint64_t Bolt12RefundContext_clone_ptr(LDKBolt12RefundContext *NONNULL_PTR arg); +/* @internal */ +export function Bolt12RefundContext_clone_ptr(arg: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Bolt12RefundContext_clone_ptr(arg); + return nativeResponseValue; +} + // struct LDKBolt12RefundContext Bolt12RefundContext_clone(const struct LDKBolt12RefundContext *NONNULL_PTR orig); +/* @internal */ +export function Bolt12RefundContext_clone(orig: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Bolt12RefundContext_clone(orig); + return nativeResponseValue; +} + // bool Bolt12RefundContext_eq(const struct LDKBolt12RefundContext *NONNULL_PTR a, const struct LDKBolt12RefundContext *NONNULL_PTR b); +/* @internal */ +export function Bolt12RefundContext_eq(a: bigint, b: bigint): boolean { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Bolt12RefundContext_eq(a, b); + return nativeResponseValue; } // struct LDKCVec_u8Z ForwardTlvs_write(const struct LDKForwardTlvs *NONNULL_PTR obj); /* @internal */ @@ -55453,6 +60677,78 @@ export function PaymentConstraints_read(ser: number): bigint { } const nativeResponseValue = wasm.TS_PaymentConstraints_read(ser); return nativeResponseValue; +} + // struct LDKCVec_u8Z PaymentContext_write(const struct LDKPaymentContext *NONNULL_PTR obj); +/* @internal */ +export function PaymentContext_write(obj: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_PaymentContext_write(obj); + return nativeResponseValue; +} + // struct LDKCResult_PaymentContextDecodeErrorZ PaymentContext_read(struct LDKu8slice ser); +/* @internal */ +export function PaymentContext_read(ser: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_PaymentContext_read(ser); + return nativeResponseValue; +} + // struct LDKCVec_u8Z UnknownPaymentContext_write(const struct LDKUnknownPaymentContext *NONNULL_PTR obj); +/* @internal */ +export function UnknownPaymentContext_write(obj: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_UnknownPaymentContext_write(obj); + return nativeResponseValue; +} + // struct LDKCResult_UnknownPaymentContextDecodeErrorZ UnknownPaymentContext_read(struct LDKu8slice ser); +/* @internal */ +export function UnknownPaymentContext_read(ser: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_UnknownPaymentContext_read(ser); + return nativeResponseValue; +} + // struct LDKCVec_u8Z Bolt12OfferContext_write(const struct LDKBolt12OfferContext *NONNULL_PTR obj); +/* @internal */ +export function Bolt12OfferContext_write(obj: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Bolt12OfferContext_write(obj); + return nativeResponseValue; +} + // struct LDKCResult_Bolt12OfferContextDecodeErrorZ Bolt12OfferContext_read(struct LDKu8slice ser); +/* @internal */ +export function Bolt12OfferContext_read(ser: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Bolt12OfferContext_read(ser); + return nativeResponseValue; +} + // struct LDKCVec_u8Z Bolt12RefundContext_write(const struct LDKBolt12RefundContext *NONNULL_PTR obj); +/* @internal */ +export function Bolt12RefundContext_write(obj: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Bolt12RefundContext_write(obj); + return nativeResponseValue; +} + // struct LDKCResult_Bolt12RefundContextDecodeErrorZ Bolt12RefundContext_read(struct LDKu8slice ser); +/* @internal */ +export function Bolt12RefundContext_read(ser: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Bolt12RefundContext_read(ser); + return nativeResponseValue; } // void PaymentPurpose_free(struct LDKPaymentPurpose this_ptr); /* @internal */ @@ -55481,13 +60777,31 @@ export function PaymentPurpose_clone(orig: bigint): bigint { const nativeResponseValue = wasm.TS_PaymentPurpose_clone(orig); return nativeResponseValue; } - // struct LDKPaymentPurpose PaymentPurpose_invoice_payment(struct LDKCOption_ThirtyTwoBytesZ payment_preimage, struct LDKThirtyTwoBytes payment_secret); + // struct LDKPaymentPurpose PaymentPurpose_bolt11_invoice_payment(struct LDKCOption_ThirtyTwoBytesZ payment_preimage, struct LDKThirtyTwoBytes payment_secret); +/* @internal */ +export function PaymentPurpose_bolt11_invoice_payment(payment_preimage: bigint, payment_secret: number): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_PaymentPurpose_bolt11_invoice_payment(payment_preimage, payment_secret); + return nativeResponseValue; +} + // struct LDKPaymentPurpose PaymentPurpose_bolt12_offer_payment(struct LDKCOption_ThirtyTwoBytesZ payment_preimage, struct LDKThirtyTwoBytes payment_secret, struct LDKBolt12OfferContext payment_context); +/* @internal */ +export function PaymentPurpose_bolt12_offer_payment(payment_preimage: bigint, payment_secret: number, payment_context: bigint): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_PaymentPurpose_bolt12_offer_payment(payment_preimage, payment_secret, payment_context); + return nativeResponseValue; +} + // struct LDKPaymentPurpose PaymentPurpose_bolt12_refund_payment(struct LDKCOption_ThirtyTwoBytesZ payment_preimage, struct LDKThirtyTwoBytes payment_secret, struct LDKBolt12RefundContext payment_context); /* @internal */ -export function PaymentPurpose_invoice_payment(payment_preimage: bigint, payment_secret: number): bigint { +export function PaymentPurpose_bolt12_refund_payment(payment_preimage: bigint, payment_secret: number, payment_context: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_PaymentPurpose_invoice_payment(payment_preimage, payment_secret); + const nativeResponseValue = wasm.TS_PaymentPurpose_bolt12_refund_payment(payment_preimage, payment_secret, payment_context); return nativeResponseValue; } // struct LDKPaymentPurpose PaymentPurpose_spontaneous_payment(struct LDKThirtyTwoBytes a); @@ -55544,18 +60858,18 @@ export function ClaimedHTLC_free(this_obj: bigint): void { const nativeResponseValue = wasm.TS_ClaimedHTLC_free(this_obj); // debug statements here } - // const uint8_t (*ClaimedHTLC_get_channel_id(const struct LDKClaimedHTLC *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId ClaimedHTLC_get_channel_id(const struct LDKClaimedHTLC *NONNULL_PTR this_ptr); /* @internal */ -export function ClaimedHTLC_get_channel_id(this_ptr: bigint): number { +export function ClaimedHTLC_get_channel_id(this_ptr: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_ClaimedHTLC_get_channel_id(this_ptr); return nativeResponseValue; } - // void ClaimedHTLC_set_channel_id(struct LDKClaimedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void ClaimedHTLC_set_channel_id(struct LDKClaimedHTLC *NONNULL_PTR this_ptr, struct LDKChannelId val); /* @internal */ -export function ClaimedHTLC_set_channel_id(this_ptr: bigint, val: number): void { +export function ClaimedHTLC_set_channel_id(this_ptr: bigint, val: bigint): void { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -55634,9 +60948,9 @@ export function ClaimedHTLC_set_counterparty_skimmed_fee_msat(this_ptr: bigint, const nativeResponseValue = wasm.TS_ClaimedHTLC_set_counterparty_skimmed_fee_msat(this_ptr, val); // debug statements here } - // MUST_USE_RES struct LDKClaimedHTLC ClaimedHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKU128 user_channel_id_arg, uint32_t cltv_expiry_arg, uint64_t value_msat_arg, uint64_t counterparty_skimmed_fee_msat_arg); + // MUST_USE_RES struct LDKClaimedHTLC ClaimedHTLC_new(struct LDKChannelId channel_id_arg, struct LDKU128 user_channel_id_arg, uint32_t cltv_expiry_arg, uint64_t value_msat_arg, uint64_t counterparty_skimmed_fee_msat_arg); /* @internal */ -export function ClaimedHTLC_new(channel_id_arg: number, user_channel_id_arg: number, cltv_expiry_arg: number, value_msat_arg: bigint, counterparty_skimmed_fee_msat_arg: bigint): bigint { +export function ClaimedHTLC_new(channel_id_arg: bigint, user_channel_id_arg: number, cltv_expiry_arg: number, value_msat_arg: bigint, counterparty_skimmed_fee_msat_arg: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -55805,13 +61119,31 @@ export function ClosureReason_holder_force_closed(): bigint { const nativeResponseValue = wasm.TS_ClosureReason_holder_force_closed(); return nativeResponseValue; } - // struct LDKClosureReason ClosureReason_cooperative_closure(void); + // struct LDKClosureReason ClosureReason_legacy_cooperative_closure(void); +/* @internal */ +export function ClosureReason_legacy_cooperative_closure(): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ClosureReason_legacy_cooperative_closure(); + return nativeResponseValue; +} + // struct LDKClosureReason ClosureReason_counterparty_initiated_cooperative_closure(void); /* @internal */ -export function ClosureReason_cooperative_closure(): bigint { +export function ClosureReason_counterparty_initiated_cooperative_closure(): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_ClosureReason_cooperative_closure(); + const nativeResponseValue = wasm.TS_ClosureReason_counterparty_initiated_cooperative_closure(); + return nativeResponseValue; +} + // struct LDKClosureReason ClosureReason_locally_initiated_cooperative_closure(void); +/* @internal */ +export function ClosureReason_locally_initiated_cooperative_closure(): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ClosureReason_locally_initiated_cooperative_closure(); return nativeResponseValue; } // struct LDKClosureReason ClosureReason_commitment_tx_confirmed(void); @@ -55876,6 +61208,15 @@ export function ClosureReason_funding_batch_closure(): bigint { } const nativeResponseValue = wasm.TS_ClosureReason_funding_batch_closure(); return nativeResponseValue; +} + // struct LDKClosureReason ClosureReason_htlcs_timed_out(void); +/* @internal */ +export function ClosureReason_htlcs_timed_out(): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_ClosureReason_htlcs_timed_out(); + return nativeResponseValue; } // bool ClosureReason_eq(const struct LDKClosureReason *NONNULL_PTR a, const struct LDKClosureReason *NONNULL_PTR b); /* @internal */ @@ -55931,9 +61272,9 @@ export function HTLCDestination_clone(orig: bigint): bigint { const nativeResponseValue = wasm.TS_HTLCDestination_clone(orig); return nativeResponseValue; } - // struct LDKHTLCDestination HTLCDestination_next_hop_channel(struct LDKPublicKey node_id, struct LDKThirtyTwoBytes channel_id); + // struct LDKHTLCDestination HTLCDestination_next_hop_channel(struct LDKPublicKey node_id, struct LDKChannelId channel_id); /* @internal */ -export function HTLCDestination_next_hop_channel(node_id: number, channel_id: number): bigint { +export function HTLCDestination_next_hop_channel(node_id: number, channel_id: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -55957,6 +61298,15 @@ export function HTLCDestination_invalid_forward(requested_forward_scid: bigint): } const nativeResponseValue = wasm.TS_HTLCDestination_invalid_forward(requested_forward_scid); return nativeResponseValue; +} + // struct LDKHTLCDestination HTLCDestination_invalid_onion(void); +/* @internal */ +export function HTLCDestination_invalid_onion(): bigint { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_HTLCDestination_invalid_onion(); + return nativeResponseValue; } // struct LDKHTLCDestination HTLCDestination_failed_payment(struct LDKThirtyTwoBytes payment_hash); /* @internal */ @@ -56111,16 +61461,16 @@ export function Event_clone(orig: bigint): bigint { const nativeResponseValue = wasm.TS_Event_clone(orig); return nativeResponseValue; } - // struct LDKEvent Event_funding_generation_ready(struct LDKThirtyTwoBytes temporary_channel_id, struct LDKPublicKey counterparty_node_id, uint64_t channel_value_satoshis, struct LDKCVec_u8Z output_script, struct LDKU128 user_channel_id); + // struct LDKEvent Event_funding_generation_ready(struct LDKChannelId temporary_channel_id, struct LDKPublicKey counterparty_node_id, uint64_t channel_value_satoshis, struct LDKCVec_u8Z output_script, struct LDKU128 user_channel_id); /* @internal */ -export function Event_funding_generation_ready(temporary_channel_id: number, counterparty_node_id: number, channel_value_satoshis: bigint, output_script: number, user_channel_id: number): bigint { +export function Event_funding_generation_ready(temporary_channel_id: bigint, counterparty_node_id: number, channel_value_satoshis: bigint, output_script: number, user_channel_id: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_Event_funding_generation_ready(temporary_channel_id, counterparty_node_id, channel_value_satoshis, output_script, user_channel_id); return nativeResponseValue; } - // struct LDKEvent Event_payment_claimable(struct LDKPublicKey receiver_node_id, struct LDKThirtyTwoBytes payment_hash, struct LDKRecipientOnionFields onion_fields, uint64_t amount_msat, uint64_t counterparty_skimmed_fee_msat, struct LDKPaymentPurpose purpose, struct LDKCOption_ThirtyTwoBytesZ via_channel_id, struct LDKCOption_U128Z via_user_channel_id, struct LDKCOption_u32Z claim_deadline); + // struct LDKEvent Event_payment_claimable(struct LDKPublicKey receiver_node_id, struct LDKThirtyTwoBytes payment_hash, struct LDKRecipientOnionFields onion_fields, uint64_t amount_msat, uint64_t counterparty_skimmed_fee_msat, struct LDKPaymentPurpose purpose, struct LDKChannelId via_channel_id, struct LDKCOption_U128Z via_user_channel_id, struct LDKCOption_u32Z claim_deadline); /* @internal */ export function Event_payment_claimable(receiver_node_id: number, payment_hash: number, onion_fields: bigint, amount_msat: bigint, counterparty_skimmed_fee_msat: bigint, purpose: bigint, via_channel_id: bigint, via_user_channel_id: bigint, claim_deadline: bigint): bigint { if(!isWasmInitialized) { @@ -56228,7 +61578,7 @@ export function Event_htlcintercepted(intercept_id: number, requested_next_hop_s const nativeResponseValue = wasm.TS_Event_htlcintercepted(intercept_id, requested_next_hop_scid, payment_hash, inbound_amount_msat, expected_outbound_amount_msat); return nativeResponseValue; } - // struct LDKEvent Event_spendable_outputs(struct LDKCVec_SpendableOutputDescriptorZ outputs, struct LDKCOption_ThirtyTwoBytesZ channel_id); + // struct LDKEvent Event_spendable_outputs(struct LDKCVec_SpendableOutputDescriptorZ outputs, struct LDKChannelId channel_id); /* @internal */ export function Event_spendable_outputs(outputs: number, channel_id: bigint): bigint { if(!isWasmInitialized) { @@ -56237,63 +61587,63 @@ export function Event_spendable_outputs(outputs: number, channel_id: bigint): bi const nativeResponseValue = wasm.TS_Event_spendable_outputs(outputs, channel_id); return nativeResponseValue; } - // struct LDKEvent Event_payment_forwarded(struct LDKCOption_ThirtyTwoBytesZ prev_channel_id, struct LDKCOption_ThirtyTwoBytesZ next_channel_id, struct LDKCOption_u64Z fee_earned_msat, bool claim_from_onchain_tx, struct LDKCOption_u64Z outbound_amount_forwarded_msat); + // struct LDKEvent Event_payment_forwarded(struct LDKChannelId prev_channel_id, struct LDKChannelId next_channel_id, struct LDKCOption_U128Z prev_user_channel_id, struct LDKCOption_U128Z next_user_channel_id, struct LDKCOption_u64Z total_fee_earned_msat, struct LDKCOption_u64Z skimmed_fee_msat, bool claim_from_onchain_tx, struct LDKCOption_u64Z outbound_amount_forwarded_msat); /* @internal */ -export function Event_payment_forwarded(prev_channel_id: bigint, next_channel_id: bigint, fee_earned_msat: bigint, claim_from_onchain_tx: boolean, outbound_amount_forwarded_msat: bigint): bigint { +export function Event_payment_forwarded(prev_channel_id: bigint, next_channel_id: bigint, prev_user_channel_id: bigint, next_user_channel_id: bigint, total_fee_earned_msat: bigint, skimmed_fee_msat: bigint, claim_from_onchain_tx: boolean, outbound_amount_forwarded_msat: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_Event_payment_forwarded(prev_channel_id, next_channel_id, fee_earned_msat, claim_from_onchain_tx, outbound_amount_forwarded_msat); + const nativeResponseValue = wasm.TS_Event_payment_forwarded(prev_channel_id, next_channel_id, prev_user_channel_id, next_user_channel_id, total_fee_earned_msat, skimmed_fee_msat, claim_from_onchain_tx, outbound_amount_forwarded_msat); return nativeResponseValue; } - // struct LDKEvent Event_channel_pending(struct LDKThirtyTwoBytes channel_id, struct LDKU128 user_channel_id, struct LDKCOption_ThirtyTwoBytesZ former_temporary_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKOutPoint funding_txo); + // struct LDKEvent Event_channel_pending(struct LDKChannelId channel_id, struct LDKU128 user_channel_id, struct LDKChannelId former_temporary_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKOutPoint funding_txo, struct LDKChannelTypeFeatures channel_type); /* @internal */ -export function Event_channel_pending(channel_id: number, user_channel_id: number, former_temporary_channel_id: bigint, counterparty_node_id: number, funding_txo: bigint): bigint { +export function Event_channel_pending(channel_id: bigint, user_channel_id: number, former_temporary_channel_id: bigint, counterparty_node_id: number, funding_txo: bigint, channel_type: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_Event_channel_pending(channel_id, user_channel_id, former_temporary_channel_id, counterparty_node_id, funding_txo); + const nativeResponseValue = wasm.TS_Event_channel_pending(channel_id, user_channel_id, former_temporary_channel_id, counterparty_node_id, funding_txo, channel_type); return nativeResponseValue; } - // struct LDKEvent Event_channel_ready(struct LDKThirtyTwoBytes channel_id, struct LDKU128 user_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKChannelTypeFeatures channel_type); + // struct LDKEvent Event_channel_ready(struct LDKChannelId channel_id, struct LDKU128 user_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKChannelTypeFeatures channel_type); /* @internal */ -export function Event_channel_ready(channel_id: number, user_channel_id: number, counterparty_node_id: number, channel_type: bigint): bigint { +export function Event_channel_ready(channel_id: bigint, user_channel_id: number, counterparty_node_id: number, channel_type: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_Event_channel_ready(channel_id, user_channel_id, counterparty_node_id, channel_type); return nativeResponseValue; } - // struct LDKEvent Event_channel_closed(struct LDKThirtyTwoBytes channel_id, struct LDKU128 user_channel_id, struct LDKClosureReason reason, struct LDKPublicKey counterparty_node_id, struct LDKCOption_u64Z channel_capacity_sats, struct LDKOutPoint channel_funding_txo); + // struct LDKEvent Event_channel_closed(struct LDKChannelId channel_id, struct LDKU128 user_channel_id, struct LDKClosureReason reason, struct LDKPublicKey counterparty_node_id, struct LDKCOption_u64Z channel_capacity_sats, struct LDKOutPoint channel_funding_txo); /* @internal */ -export function Event_channel_closed(channel_id: number, user_channel_id: number, reason: bigint, counterparty_node_id: number, channel_capacity_sats: bigint, channel_funding_txo: bigint): bigint { +export function Event_channel_closed(channel_id: bigint, user_channel_id: number, reason: bigint, counterparty_node_id: number, channel_capacity_sats: bigint, channel_funding_txo: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_Event_channel_closed(channel_id, user_channel_id, reason, counterparty_node_id, channel_capacity_sats, channel_funding_txo); return nativeResponseValue; } - // struct LDKEvent Event_discard_funding(struct LDKThirtyTwoBytes channel_id, struct LDKTransaction transaction); + // struct LDKEvent Event_discard_funding(struct LDKChannelId channel_id, struct LDKTransaction transaction); /* @internal */ -export function Event_discard_funding(channel_id: number, transaction: number): bigint { +export function Event_discard_funding(channel_id: bigint, transaction: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_Event_discard_funding(channel_id, transaction); return nativeResponseValue; } - // struct LDKEvent Event_open_channel_request(struct LDKThirtyTwoBytes temporary_channel_id, struct LDKPublicKey counterparty_node_id, uint64_t funding_satoshis, uint64_t push_msat, struct LDKChannelTypeFeatures channel_type); + // struct LDKEvent Event_open_channel_request(struct LDKChannelId temporary_channel_id, struct LDKPublicKey counterparty_node_id, uint64_t funding_satoshis, uint64_t push_msat, struct LDKChannelTypeFeatures channel_type); /* @internal */ -export function Event_open_channel_request(temporary_channel_id: number, counterparty_node_id: number, funding_satoshis: bigint, push_msat: bigint, channel_type: bigint): bigint { +export function Event_open_channel_request(temporary_channel_id: bigint, counterparty_node_id: number, funding_satoshis: bigint, push_msat: bigint, channel_type: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } const nativeResponseValue = wasm.TS_Event_open_channel_request(temporary_channel_id, counterparty_node_id, funding_satoshis, push_msat, channel_type); return nativeResponseValue; } - // struct LDKEvent Event_htlchandling_failed(struct LDKThirtyTwoBytes prev_channel_id, struct LDKHTLCDestination failed_next_destination); + // struct LDKEvent Event_htlchandling_failed(struct LDKChannelId prev_channel_id, struct LDKHTLCDestination failed_next_destination); /* @internal */ -export function Event_htlchandling_failed(prev_channel_id: number, failed_next_destination: bigint): bigint { +export function Event_htlchandling_failed(prev_channel_id: bigint, failed_next_destination: bigint): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } @@ -56867,22 +62217,22 @@ export function BumpTransactionEvent_clone(orig: bigint): bigint { const nativeResponseValue = wasm.TS_BumpTransactionEvent_clone(orig); return nativeResponseValue; } - // struct LDKBumpTransactionEvent BumpTransactionEvent_channel_close(struct LDKThirtyTwoBytes claim_id, uint32_t package_target_feerate_sat_per_1000_weight, struct LDKTransaction commitment_tx, uint64_t commitment_tx_fee_satoshis, struct LDKAnchorDescriptor anchor_descriptor, struct LDKCVec_HTLCOutputInCommitmentZ pending_htlcs); + // struct LDKBumpTransactionEvent BumpTransactionEvent_channel_close(struct LDKChannelId channel_id, struct LDKPublicKey counterparty_node_id, struct LDKThirtyTwoBytes claim_id, uint32_t package_target_feerate_sat_per_1000_weight, struct LDKTransaction commitment_tx, uint64_t commitment_tx_fee_satoshis, struct LDKAnchorDescriptor anchor_descriptor, struct LDKCVec_HTLCOutputInCommitmentZ pending_htlcs); /* @internal */ -export function BumpTransactionEvent_channel_close(claim_id: number, package_target_feerate_sat_per_1000_weight: number, commitment_tx: number, commitment_tx_fee_satoshis: bigint, anchor_descriptor: bigint, pending_htlcs: number): bigint { +export function BumpTransactionEvent_channel_close(channel_id: bigint, counterparty_node_id: number, claim_id: number, package_target_feerate_sat_per_1000_weight: number, commitment_tx: number, commitment_tx_fee_satoshis: bigint, anchor_descriptor: bigint, pending_htlcs: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_BumpTransactionEvent_channel_close(claim_id, package_target_feerate_sat_per_1000_weight, commitment_tx, commitment_tx_fee_satoshis, anchor_descriptor, pending_htlcs); + const nativeResponseValue = wasm.TS_BumpTransactionEvent_channel_close(channel_id, counterparty_node_id, claim_id, package_target_feerate_sat_per_1000_weight, commitment_tx, commitment_tx_fee_satoshis, anchor_descriptor, pending_htlcs); return nativeResponseValue; } - // struct LDKBumpTransactionEvent BumpTransactionEvent_htlcresolution(struct LDKThirtyTwoBytes claim_id, uint32_t target_feerate_sat_per_1000_weight, struct LDKCVec_HTLCDescriptorZ htlc_descriptors, uint32_t tx_lock_time); + // struct LDKBumpTransactionEvent BumpTransactionEvent_htlcresolution(struct LDKChannelId channel_id, struct LDKPublicKey counterparty_node_id, struct LDKThirtyTwoBytes claim_id, uint32_t target_feerate_sat_per_1000_weight, struct LDKCVec_HTLCDescriptorZ htlc_descriptors, uint32_t tx_lock_time); /* @internal */ -export function BumpTransactionEvent_htlcresolution(claim_id: number, target_feerate_sat_per_1000_weight: number, htlc_descriptors: number, tx_lock_time: number): bigint { +export function BumpTransactionEvent_htlcresolution(channel_id: bigint, counterparty_node_id: number, claim_id: number, target_feerate_sat_per_1000_weight: number, htlc_descriptors: number, tx_lock_time: number): bigint { if(!isWasmInitialized) { throw new Error("initializeWasm() must be awaited first!"); } - const nativeResponseValue = wasm.TS_BumpTransactionEvent_htlcresolution(claim_id, target_feerate_sat_per_1000_weight, htlc_descriptors, tx_lock_time); + const nativeResponseValue = wasm.TS_BumpTransactionEvent_htlcresolution(channel_id, counterparty_node_id, claim_id, target_feerate_sat_per_1000_weight, htlc_descriptors, tx_lock_time); return nativeResponseValue; } // bool BumpTransactionEvent_eq(const struct LDKBumpTransactionEvent *NONNULL_PTR a, const struct LDKBumpTransactionEvent *NONNULL_PTR b); @@ -58792,6 +64142,15 @@ export function Bolt11Invoice_recover_payee_pub_key(this_arg: bigint): number { } const nativeResponseValue = wasm.TS_Bolt11Invoice_recover_payee_pub_key(this_arg); return nativeResponseValue; +} + // MUST_USE_RES struct LDKPublicKey Bolt11Invoice_get_payee_pub_key(const struct LDKBolt11Invoice *NONNULL_PTR this_arg); +/* @internal */ +export function Bolt11Invoice_get_payee_pub_key(this_arg: bigint): number { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.TS_Bolt11Invoice_get_payee_pub_key(this_arg); + return nativeResponseValue; } // MUST_USE_RES struct LDKCOption_u64Z Bolt11Invoice_expires_at(const struct LDKBolt11Invoice *NONNULL_PTR this_arg); /* @internal */ @@ -59433,48 +64792,48 @@ js_invoke = function(obj_ptr: number, fn_id: number, arg1: bigint|number, arg2: case 46: fn = Object.getOwnPropertyDescriptor(obj, "debug_str"); break; case 47: fn = Object.getOwnPropertyDescriptor(obj, "register_tx"); break; case 48: fn = Object.getOwnPropertyDescriptor(obj, "register_output"); break; - case 49: fn = Object.getOwnPropertyDescriptor(obj, "read"); break; - case 50: fn = Object.getOwnPropertyDescriptor(obj, "write"); break; - case 51: fn = Object.getOwnPropertyDescriptor(obj, "remove"); break; - case 52: fn = Object.getOwnPropertyDescriptor(obj, "list"); break; - case 53: fn = Object.getOwnPropertyDescriptor(obj, "channel_penalty_msat"); break; - case 54: fn = Object.getOwnPropertyDescriptor(obj, "payment_path_failed"); break; - case 55: fn = Object.getOwnPropertyDescriptor(obj, "payment_path_successful"); break; - case 56: fn = Object.getOwnPropertyDescriptor(obj, "probe_failed"); break; - case 57: fn = Object.getOwnPropertyDescriptor(obj, "probe_successful"); break; - case 58: fn = Object.getOwnPropertyDescriptor(obj, "time_passed"); break; - case 59: fn = Object.getOwnPropertyDescriptor(obj, "read_lock"); break; - case 60: fn = Object.getOwnPropertyDescriptor(obj, "write_lock"); break; - case 61: fn = Object.getOwnPropertyDescriptor(obj, "write"); break; - case 62: fn = Object.getOwnPropertyDescriptor(obj, "persist_manager"); break; - case 63: fn = Object.getOwnPropertyDescriptor(obj, "persist_graph"); break; - case 64: fn = Object.getOwnPropertyDescriptor(obj, "persist_scorer"); break; - case 65: fn = Object.getOwnPropertyDescriptor(obj, "persist_new_channel"); break; - case 66: fn = Object.getOwnPropertyDescriptor(obj, "update_persisted_channel"); break; - case 67: fn = Object.getOwnPropertyDescriptor(obj, "call"); break; - case 68: fn = Object.getOwnPropertyDescriptor(obj, "filtered_block_connected"); break; - case 69: fn = Object.getOwnPropertyDescriptor(obj, "block_connected"); break; - case 70: fn = Object.getOwnPropertyDescriptor(obj, "block_disconnected"); break; - case 71: fn = Object.getOwnPropertyDescriptor(obj, "transactions_confirmed"); break; - case 72: fn = Object.getOwnPropertyDescriptor(obj, "transaction_unconfirmed"); break; - case 73: fn = Object.getOwnPropertyDescriptor(obj, "best_block_updated"); break; - case 74: fn = Object.getOwnPropertyDescriptor(obj, "get_relevant_txids"); break; - case 75: fn = Object.getOwnPropertyDescriptor(obj, "handle_event"); break; - case 76: fn = Object.getOwnPropertyDescriptor(obj, "process_pending_events"); break; - case 77: fn = Object.getOwnPropertyDescriptor(obj, "get_and_clear_pending_msg_events"); break; - case 78: fn = Object.getOwnPropertyDescriptor(obj, "handle_open_channel"); break; - case 79: fn = Object.getOwnPropertyDescriptor(obj, "handle_open_channel_v2"); break; - case 80: fn = Object.getOwnPropertyDescriptor(obj, "handle_accept_channel"); break; - case 81: fn = Object.getOwnPropertyDescriptor(obj, "handle_accept_channel_v2"); break; - case 82: fn = Object.getOwnPropertyDescriptor(obj, "handle_funding_created"); break; - case 83: fn = Object.getOwnPropertyDescriptor(obj, "handle_funding_signed"); break; - case 84: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_ready"); break; - case 85: fn = Object.getOwnPropertyDescriptor(obj, "handle_shutdown"); break; - case 86: fn = Object.getOwnPropertyDescriptor(obj, "handle_closing_signed"); break; - case 87: fn = Object.getOwnPropertyDescriptor(obj, "handle_stfu"); break; - case 88: fn = Object.getOwnPropertyDescriptor(obj, "handle_splice"); break; - case 89: fn = Object.getOwnPropertyDescriptor(obj, "handle_splice_ack"); break; - case 90: fn = Object.getOwnPropertyDescriptor(obj, "handle_splice_locked"); break; + case 49: fn = Object.getOwnPropertyDescriptor(obj, "get_change_destination_script"); break; + case 50: fn = Object.getOwnPropertyDescriptor(obj, "read"); break; + case 51: fn = Object.getOwnPropertyDescriptor(obj, "write"); break; + case 52: fn = Object.getOwnPropertyDescriptor(obj, "remove"); break; + case 53: fn = Object.getOwnPropertyDescriptor(obj, "list"); break; + case 54: fn = Object.getOwnPropertyDescriptor(obj, "spend_spendable_outputs"); break; + case 55: fn = Object.getOwnPropertyDescriptor(obj, "channel_penalty_msat"); break; + case 56: fn = Object.getOwnPropertyDescriptor(obj, "payment_path_failed"); break; + case 57: fn = Object.getOwnPropertyDescriptor(obj, "payment_path_successful"); break; + case 58: fn = Object.getOwnPropertyDescriptor(obj, "probe_failed"); break; + case 59: fn = Object.getOwnPropertyDescriptor(obj, "probe_successful"); break; + case 60: fn = Object.getOwnPropertyDescriptor(obj, "time_passed"); break; + case 61: fn = Object.getOwnPropertyDescriptor(obj, "read_lock"); break; + case 62: fn = Object.getOwnPropertyDescriptor(obj, "write_lock"); break; + case 63: fn = Object.getOwnPropertyDescriptor(obj, "write"); break; + case 64: fn = Object.getOwnPropertyDescriptor(obj, "persist_manager"); break; + case 65: fn = Object.getOwnPropertyDescriptor(obj, "persist_graph"); break; + case 66: fn = Object.getOwnPropertyDescriptor(obj, "persist_scorer"); break; + case 67: fn = Object.getOwnPropertyDescriptor(obj, "persist_new_channel"); break; + case 68: fn = Object.getOwnPropertyDescriptor(obj, "update_persisted_channel"); break; + case 69: fn = Object.getOwnPropertyDescriptor(obj, "archive_persisted_channel"); break; + case 70: fn = Object.getOwnPropertyDescriptor(obj, "filtered_block_connected"); break; + case 71: fn = Object.getOwnPropertyDescriptor(obj, "block_connected"); break; + case 72: fn = Object.getOwnPropertyDescriptor(obj, "block_disconnected"); break; + case 73: fn = Object.getOwnPropertyDescriptor(obj, "transactions_confirmed"); break; + case 74: fn = Object.getOwnPropertyDescriptor(obj, "transaction_unconfirmed"); break; + case 75: fn = Object.getOwnPropertyDescriptor(obj, "best_block_updated"); break; + case 76: fn = Object.getOwnPropertyDescriptor(obj, "get_relevant_txids"); break; + case 77: fn = Object.getOwnPropertyDescriptor(obj, "call"); break; + case 78: fn = Object.getOwnPropertyDescriptor(obj, "handle_event"); break; + case 79: fn = Object.getOwnPropertyDescriptor(obj, "process_pending_events"); break; + case 80: fn = Object.getOwnPropertyDescriptor(obj, "get_and_clear_pending_msg_events"); break; + case 81: fn = Object.getOwnPropertyDescriptor(obj, "handle_open_channel"); break; + case 82: fn = Object.getOwnPropertyDescriptor(obj, "handle_open_channel_v2"); break; + case 83: fn = Object.getOwnPropertyDescriptor(obj, "handle_accept_channel"); break; + case 84: fn = Object.getOwnPropertyDescriptor(obj, "handle_accept_channel_v2"); break; + case 85: fn = Object.getOwnPropertyDescriptor(obj, "handle_funding_created"); break; + case 86: fn = Object.getOwnPropertyDescriptor(obj, "handle_funding_signed"); break; + case 87: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_ready"); break; + case 88: fn = Object.getOwnPropertyDescriptor(obj, "handle_shutdown"); break; + case 89: fn = Object.getOwnPropertyDescriptor(obj, "handle_closing_signed"); break; + case 90: fn = Object.getOwnPropertyDescriptor(obj, "handle_stfu"); break; case 91: fn = Object.getOwnPropertyDescriptor(obj, "handle_tx_add_input"); break; case 92: fn = Object.getOwnPropertyDescriptor(obj, "handle_tx_add_output"); break; case 93: fn = Object.getOwnPropertyDescriptor(obj, "handle_tx_remove_input"); break; @@ -59502,45 +64861,48 @@ js_invoke = function(obj_ptr: number, fn_id: number, arg1: bigint|number, arg2: case 115: fn = Object.getOwnPropertyDescriptor(obj, "get_chain_hashes"); break; case 116: fn = Object.getOwnPropertyDescriptor(obj, "handle_message"); break; case 117: fn = Object.getOwnPropertyDescriptor(obj, "release_pending_messages"); break; - case 118: fn = Object.getOwnPropertyDescriptor(obj, "handle_node_announcement"); break; - case 119: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_announcement"); break; - case 120: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_update"); break; - case 121: fn = Object.getOwnPropertyDescriptor(obj, "get_next_channel_announcement"); break; - case 122: fn = Object.getOwnPropertyDescriptor(obj, "get_next_node_announcement"); break; - case 123: fn = Object.getOwnPropertyDescriptor(obj, "peer_connected"); break; - case 124: fn = Object.getOwnPropertyDescriptor(obj, "handle_reply_channel_range"); break; - case 125: fn = Object.getOwnPropertyDescriptor(obj, "handle_reply_short_channel_ids_end"); break; - case 126: fn = Object.getOwnPropertyDescriptor(obj, "handle_query_channel_range"); break; - case 127: fn = Object.getOwnPropertyDescriptor(obj, "handle_query_short_channel_ids"); break; - case 128: fn = Object.getOwnPropertyDescriptor(obj, "processing_queue_high"); break; - case 129: fn = Object.getOwnPropertyDescriptor(obj, "provided_node_features"); break; - case 130: fn = Object.getOwnPropertyDescriptor(obj, "provided_init_features"); break; - case 131: fn = Object.getOwnPropertyDescriptor(obj, "get_and_clear_connections_needed"); break; - case 132: fn = Object.getOwnPropertyDescriptor(obj, "handle_onion_message"); break; - case 133: fn = Object.getOwnPropertyDescriptor(obj, "next_onion_message_for_peer"); break; - case 134: fn = Object.getOwnPropertyDescriptor(obj, "peer_connected"); break; - case 135: fn = Object.getOwnPropertyDescriptor(obj, "peer_disconnected"); break; - case 136: fn = Object.getOwnPropertyDescriptor(obj, "timer_tick_occurred"); break; - case 137: fn = Object.getOwnPropertyDescriptor(obj, "provided_node_features"); break; - case 138: fn = Object.getOwnPropertyDescriptor(obj, "provided_init_features"); break; - case 139: fn = Object.getOwnPropertyDescriptor(obj, "read"); break; - case 140: fn = Object.getOwnPropertyDescriptor(obj, "handle_custom_message"); break; - case 141: fn = Object.getOwnPropertyDescriptor(obj, "get_and_clear_pending_msg"); break; - case 142: fn = Object.getOwnPropertyDescriptor(obj, "provided_node_features"); break; - case 143: fn = Object.getOwnPropertyDescriptor(obj, "provided_init_features"); break; - case 144: fn = Object.getOwnPropertyDescriptor(obj, "handle_custom_message"); break; - case 145: fn = Object.getOwnPropertyDescriptor(obj, "read_custom_message"); break; - case 146: fn = Object.getOwnPropertyDescriptor(obj, "release_pending_custom_messages"); break; - case 147: fn = Object.getOwnPropertyDescriptor(obj, "send_data"); break; - case 148: fn = Object.getOwnPropertyDescriptor(obj, "disconnect_socket"); break; - case 149: fn = Object.getOwnPropertyDescriptor(obj, "eq"); break; - case 150: fn = Object.getOwnPropertyDescriptor(obj, "hash"); break; - case 151: fn = Object.getOwnPropertyDescriptor(obj, "write"); break; - case 152: fn = Object.getOwnPropertyDescriptor(obj, "select_confirmed_utxos"); break; - case 153: fn = Object.getOwnPropertyDescriptor(obj, "sign_psbt"); break; - case 154: fn = Object.getOwnPropertyDescriptor(obj, "list_confirmed_utxos"); break; - case 155: fn = Object.getOwnPropertyDescriptor(obj, "get_change_script"); break; + case 118: fn = Object.getOwnPropertyDescriptor(obj, "next_node_id"); break; + case 119: fn = Object.getOwnPropertyDescriptor(obj, "handle_node_announcement"); break; + case 120: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_announcement"); break; + case 121: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_update"); break; + case 122: fn = Object.getOwnPropertyDescriptor(obj, "get_next_channel_announcement"); break; + case 123: fn = Object.getOwnPropertyDescriptor(obj, "get_next_node_announcement"); break; + case 124: fn = Object.getOwnPropertyDescriptor(obj, "peer_connected"); break; + case 125: fn = Object.getOwnPropertyDescriptor(obj, "handle_reply_channel_range"); break; + case 126: fn = Object.getOwnPropertyDescriptor(obj, "handle_reply_short_channel_ids_end"); break; + case 127: fn = Object.getOwnPropertyDescriptor(obj, "handle_query_channel_range"); break; + case 128: fn = Object.getOwnPropertyDescriptor(obj, "handle_query_short_channel_ids"); break; + case 129: fn = Object.getOwnPropertyDescriptor(obj, "processing_queue_high"); break; + case 130: fn = Object.getOwnPropertyDescriptor(obj, "provided_node_features"); break; + case 131: fn = Object.getOwnPropertyDescriptor(obj, "provided_init_features"); break; + case 132: fn = Object.getOwnPropertyDescriptor(obj, "get_and_clear_connections_needed"); break; + case 133: fn = Object.getOwnPropertyDescriptor(obj, "handle_onion_message"); break; + case 134: fn = Object.getOwnPropertyDescriptor(obj, "next_onion_message_for_peer"); break; + case 135: fn = Object.getOwnPropertyDescriptor(obj, "peer_connected"); break; + case 136: fn = Object.getOwnPropertyDescriptor(obj, "peer_disconnected"); break; + case 137: fn = Object.getOwnPropertyDescriptor(obj, "timer_tick_occurred"); break; + case 138: fn = Object.getOwnPropertyDescriptor(obj, "provided_node_features"); break; + case 139: fn = Object.getOwnPropertyDescriptor(obj, "provided_init_features"); break; + case 140: fn = Object.getOwnPropertyDescriptor(obj, "read"); break; + case 141: fn = Object.getOwnPropertyDescriptor(obj, "handle_custom_message"); break; + case 142: fn = Object.getOwnPropertyDescriptor(obj, "get_and_clear_pending_msg"); break; + case 143: fn = Object.getOwnPropertyDescriptor(obj, "provided_node_features"); break; + case 144: fn = Object.getOwnPropertyDescriptor(obj, "provided_init_features"); break; + case 145: fn = Object.getOwnPropertyDescriptor(obj, "handle_custom_message"); break; + case 146: fn = Object.getOwnPropertyDescriptor(obj, "read_custom_message"); break; + case 147: fn = Object.getOwnPropertyDescriptor(obj, "release_pending_custom_messages"); break; + case 148: fn = Object.getOwnPropertyDescriptor(obj, "send_data"); break; + case 149: fn = Object.getOwnPropertyDescriptor(obj, "disconnect_socket"); break; + case 150: fn = Object.getOwnPropertyDescriptor(obj, "eq"); break; + case 151: fn = Object.getOwnPropertyDescriptor(obj, "hash"); break; + case 152: fn = Object.getOwnPropertyDescriptor(obj, "sign_invoice"); break; + case 153: fn = Object.getOwnPropertyDescriptor(obj, "sign_invoice_request"); break; + case 154: fn = Object.getOwnPropertyDescriptor(obj, "write"); break; + case 155: fn = Object.getOwnPropertyDescriptor(obj, "select_confirmed_utxos"); break; case 156: fn = Object.getOwnPropertyDescriptor(obj, "sign_psbt"); break; + case 157: fn = Object.getOwnPropertyDescriptor(obj, "list_confirmed_utxos"); break; + case 158: fn = Object.getOwnPropertyDescriptor(obj, "get_change_script"); break; + case 159: fn = Object.getOwnPropertyDescriptor(obj, "sign_psbt"); break; default: console.error("Got unknown function call with id " + fn_id + " from C!"); throw new Error("Got unknown function call with id " + fn_id + " from C!"); diff --git a/ts/enums/Direction.mts b/ts/enums/Direction.mts new file mode 100644 index 00000000..36ad93f9 --- /dev/null +++ b/ts/enums/Direction.mts @@ -0,0 +1 @@ +export { Direction } from "../bindings.mjs"; \ No newline at end of file diff --git a/ts/enums/ShortChannelIdError.mts b/ts/enums/ShortChannelIdError.mts new file mode 100644 index 00000000..9746df87 --- /dev/null +++ b/ts/enums/ShortChannelIdError.mts @@ -0,0 +1 @@ +export { ShortChannelIdError } from "../bindings.mjs"; \ No newline at end of file diff --git a/ts/index.mts b/ts/index.mts index 948fd859..f067e731 100644 --- a/ts/index.mts +++ b/ts/index.mts @@ -22,6 +22,7 @@ export * from './enums/ChannelShutdownState.mjs'; export * from './enums/ConfirmationTarget.mjs'; export * from './enums/CreationError.mjs'; export * from './enums/Currency.mjs'; +export * from './enums/Direction.mjs'; export * from './enums/HTLCClaim.mjs'; export * from './enums/IOError.mjs'; export * from './enums/Level.mjs'; @@ -30,13 +31,17 @@ export * from './enums/PaymentFailureReason.mjs'; export * from './enums/Recipient.mjs'; export * from './enums/RetryableSendFailure.mjs'; export * from './enums/Secp256k1Error.mjs'; +export * from './enums/ShortChannelIdError.mjs'; export * from './enums/SiPrefix.mjs'; export * from './enums/SocketAddressParseError.mjs'; export * from './enums/UtxoLookupError.mjs'; export * from './structs/Bech32Error.mjs'; +export * from './structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +export * from './structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +export * from './structs/Refund.mjs'; +export * from './structs/Result_RefundBolt12SemanticErrorZ.mjs'; export * from './structs/Option_u64Z.mjs'; export * from './structs/BlindedPath.mjs'; -export * from './structs/Refund.mjs'; export * from './structs/Bolt12ParseError.mjs'; export * from './structs/Result_RefundBolt12ParseErrorZ.mjs'; export * from './structs/Retry.mjs'; @@ -51,7 +56,16 @@ export * from './structs/RecipientOnionFields.mjs'; export * from './structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; export * from './structs/TwoTuple_u64CVec_u8ZZ.mjs'; export * from './structs/Result_RecipientOnionFieldsNoneZ.mjs'; +export * from './structs/UnsignedBolt12Invoice.mjs'; +export * from './structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +export * from './structs/Bolt12Invoice.mjs'; +export * from './structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +export * from './structs/Result_SchnorrSignatureNoneZ.mjs'; export * from './structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +export * from './structs/Amount.mjs'; +export * from './structs/Option_AmountZ.mjs'; +export * from './structs/Quantity.mjs'; +export * from './structs/Option_QuantityZ.mjs'; export * from './structs/Result_ThirtyTwoBytesNoneZ.mjs'; export * from './structs/BlindedPayInfo.mjs'; export * from './structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -73,8 +87,8 @@ export * from './structs/Result_NoneNoneZ.mjs'; export * from './structs/Result_PublicKeyNoneZ.mjs'; export * from './structs/Option_BigEndianScalarZ.mjs'; export * from './structs/Result_RecoverableSignatureNoneZ.mjs'; -export * from './structs/Result_SchnorrSignatureNoneZ.mjs'; export * from './structs/Result_ECDSASignatureNoneZ.mjs'; +export * from './structs/Result_TransactionNoneZ.mjs'; export * from './structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; export * from './structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; export * from './structs/CommitmentTransaction.mjs'; @@ -95,7 +109,6 @@ export * from './structs/Option_boolZ.mjs'; export * from './structs/Result_WitnessNoneZ.mjs'; export * from './structs/InMemorySigner.mjs'; export * from './structs/Result_InMemorySignerDecodeErrorZ.mjs'; -export * from './structs/Result_TransactionNoneZ.mjs'; export * from './structs/ChannelDetails.mjs'; export * from './structs/Route.mjs'; export * from './structs/LightningError.mjs'; @@ -136,12 +149,17 @@ export * from './structs/Logger.mjs'; export * from './structs/NetworkGraph.mjs'; export * from './structs/ProbabilisticScorer.mjs'; export * from './structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +export * from './structs/BestBlock.mjs'; +export * from './structs/Result_BestBlockDecodeErrorZ.mjs'; export * from './structs/TwoTuple_usizeTransactionZ.mjs'; export * from './structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; export * from './structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; export * from './structs/HTLCUpdate.mjs'; +export * from './structs/UntrustedString.mjs'; +export * from './structs/ClosureReason.mjs'; +export * from './structs/ChannelId.mjs'; export * from './structs/MonitorEvent.mjs'; -export * from './structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +export * from './structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; export * from './structs/InitFeatures.mjs'; export * from './structs/Result_InitFeaturesDecodeErrorZ.mjs'; export * from './structs/ChannelFeatures.mjs'; @@ -156,10 +174,18 @@ export * from './structs/BlindedHopFeatures.mjs'; export * from './structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; export * from './structs/ChannelTypeFeatures.mjs'; export * from './structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +export * from './structs/OfferId.mjs'; +export * from './structs/Result_OfferIdDecodeErrorZ.mjs'; +export * from './structs/Result_NoneBolt12SemanticErrorZ.mjs'; export * from './structs/Offer.mjs'; +export * from './structs/Result_OfferBolt12SemanticErrorZ.mjs'; +export * from './structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +export * from './structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +export * from './structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +export * from './structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; export * from './structs/Result_OfferBolt12ParseErrorZ.mjs'; -export * from './structs/Result_PublicKeySecp256k1ErrorZ.mjs'; export * from './structs/Result_NodeIdDecodeErrorZ.mjs'; +export * from './structs/Result_PublicKeySecp256k1ErrorZ.mjs'; export * from './structs/ChannelUpdate.mjs'; export * from './structs/NetworkUpdate.mjs'; export * from './structs/Option_NetworkUpdateZ.mjs'; @@ -225,6 +251,7 @@ export * from './structs/NodeInfo.mjs'; export * from './structs/Result_NodeInfoDecodeErrorZ.mjs'; export * from './structs/Result_NetworkGraphDecodeErrorZ.mjs'; export * from './structs/Option_CVec_SocketAddressZZ.mjs'; +export * from './structs/Result_u64ShortChannelIdErrorZ.mjs'; export * from './structs/PendingHTLCInfo.mjs'; export * from './structs/InboundHTLCErr.mjs'; export * from './structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -234,10 +261,15 @@ export * from './structs/Input.mjs'; export * from './structs/CoinSelection.mjs'; export * from './structs/Result_CoinSelectionNoneZ.mjs'; export * from './structs/Result_CVec_UtxoZNoneZ.mjs'; +export * from './structs/UnknownPaymentContext.mjs'; +export * from './structs/Bolt12OfferContext.mjs'; +export * from './structs/Bolt12RefundContext.mjs'; +export * from './structs/PaymentContext.mjs'; +export * from './structs/Option_PaymentContextZ.mjs'; export * from './structs/TwoTuple_u64u16Z.mjs'; export * from './structs/Option_C2Tuple_u64u16ZZ.mjs'; export * from './structs/Option_ChannelShutdownStateZ.mjs'; -export * from './structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +export * from './structs/Result_ChannelIdAPIErrorZ.mjs'; export * from './structs/RecentPaymentDetails.mjs'; export * from './structs/PaymentSendFailure.mjs'; export * from './structs/Result_NonePaymentSendFailureZ.mjs'; @@ -248,12 +280,13 @@ export * from './structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; export * from './structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; export * from './structs/ProbeSendFailure.mjs'; export * from './structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -export * from './structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +export * from './structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +export * from './structs/OfferWithDerivedMetadataBuilder.mjs'; +export * from './structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; export * from './structs/Option_StrZ.mjs'; -export * from './structs/Result_NoneBolt12SemanticErrorZ.mjs'; export * from './structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +export * from './structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; export * from './structs/InvoiceRequest.mjs'; -export * from './structs/Bolt12Invoice.mjs'; export * from './structs/InvoiceError.mjs'; export * from './structs/OffersMessage.mjs'; export * from './structs/Option_OffersMessageZ.mjs'; @@ -281,7 +314,6 @@ export * from './structs/Watch.mjs'; export * from './structs/BroadcasterInterface.mjs'; export * from './structs/EntropySource.mjs'; export * from './structs/UnsignedInvoiceRequest.mjs'; -export * from './structs/UnsignedBolt12Invoice.mjs'; export * from './structs/UnsignedChannelUpdate.mjs'; export * from './structs/UnsignedNodeAnnouncement.mjs'; export * from './structs/UnsignedGossipMessage.mjs'; @@ -323,7 +355,7 @@ export * from './structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ. export * from './structs/Option_TypeZ.mjs'; export * from './structs/Result_COption_TypeZDecodeErrorZ.mjs'; export * from './structs/Option_SocketAddressZ.mjs'; -export * from './structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +export * from './structs/PeerDetails.mjs'; export * from './structs/PeerHandleError.mjs'; export * from './structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; export * from './structs/Result_NonePeerHandleErrorZ.mjs'; @@ -335,9 +367,18 @@ export * from './structs/Result_NoneIOErrorZ.mjs'; export * from './structs/Result_CVec_StrZIOErrorZ.mjs'; export * from './structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; export * from './structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +export * from './structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +export * from './structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; export * from './structs/Option_SecretKeyZ.mjs'; +export * from './structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +export * from './structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; export * from './structs/VerifiedInvoiceRequest.mjs'; export * from './structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +export * from './structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +export * from './structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +export * from './structs/InvoiceRequestFields.mjs'; +export * from './structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +export * from './structs/Option_ECDSASignatureZ.mjs'; export * from './structs/Option_i64Z.mjs'; export * from './structs/Result_SocketAddressDecodeErrorZ.mjs'; export * from './structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -438,8 +479,6 @@ export * from './structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; export * from './structs/PathFailure.mjs'; export * from './structs/Option_PathFailureZ.mjs'; export * from './structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -export * from './structs/UntrustedString.mjs'; -export * from './structs/ClosureReason.mjs'; export * from './structs/Option_ClosureReasonZ.mjs'; export * from './structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; export * from './structs/HTLCDestination.mjs'; @@ -480,17 +519,23 @@ export * from './structs/TransactionU16LenLimited.mjs'; export * from './structs/Result_TransactionU16LenLimitedNoneZ.mjs'; export * from './structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; export * from './structs/Result_UntrustedStringDecodeErrorZ.mjs'; +export * from './structs/Result_ChannelIdDecodeErrorZ.mjs'; export * from './structs/TwoTuple__u832u16Z.mjs'; export * from './structs/PaymentRelay.mjs'; export * from './structs/Result_PaymentRelayDecodeErrorZ.mjs'; export * from './structs/PaymentConstraints.mjs'; export * from './structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +export * from './structs/Result_PaymentContextDecodeErrorZ.mjs'; +export * from './structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +export * from './structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +export * from './structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +export * from './structs/Result_StrSecp256k1ErrorZ.mjs'; export * from './structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; export * from './structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -export * from './structs/Result_StrSecp256k1ErrorZ.mjs'; export * from './structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; export * from './structs/SendError.mjs'; export * from './structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +export * from './structs/NextMessageHop.mjs'; export * from './structs/ParsedOnionMessageContents.mjs'; export * from './structs/PeeledOnion.mjs'; export * from './structs/Result_PeeledOnionNoneZ.mjs'; @@ -502,6 +547,20 @@ export * from './structs/ForwardNode.mjs'; export * from './structs/Result_BlindedPathDecodeErrorZ.mjs'; export * from './structs/Result_BlindedHopDecodeErrorZ.mjs'; export * from './structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +export * from './structs/TrackedSpendableOutput.mjs'; +export * from './structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +export * from './structs/OutputSpendStatus.mjs'; +export * from './structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +export * from './structs/WatchedOutput.mjs'; +export * from './structs/Filter.mjs'; +export * from './structs/Option_FilterZ.mjs'; +export * from './structs/ChangeDestinationSource.mjs'; +export * from './structs/KVStore.mjs'; +export * from './structs/OutputSpender.mjs'; +export * from './structs/OutputSweeper.mjs'; +export * from './structs/Result_OutputSweeperDecodeErrorZ.mjs'; +export * from './structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +export * from './structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; export * from './structs/DelayedPaymentBasepoint.mjs'; export * from './structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; export * from './structs/DelayedPaymentKey.mjs'; @@ -514,14 +573,11 @@ export * from './structs/RevocationBasepoint.mjs'; export * from './structs/Result_RevocationBasepointDecodeErrorZ.mjs'; export * from './structs/RevocationKey.mjs'; export * from './structs/Result_RevocationKeyDecodeErrorZ.mjs'; -export * from './structs/WatchedOutput.mjs'; -export * from './structs/Filter.mjs'; -export * from './structs/Option_FilterZ.mjs'; export * from './structs/LockedChannelMonitor.mjs'; export * from './structs/Result_LockedChannelMonitorNoneZ.mjs'; +export * from './structs/TwoTuple_OutPointChannelIdZ.mjs'; export * from './structs/MonitorUpdateId.mjs'; export * from './structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -export * from './structs/KVStore.mjs'; export * from './structs/FirstHopCandidate.mjs'; export * from './structs/PublicHopCandidate.mjs'; export * from './structs/PrivateHopCandidate.mjs'; @@ -538,15 +594,15 @@ export * from './structs/Persister.mjs'; export * from './structs/MonitorUpdatingPersister.mjs'; export * from './structs/Persist.mjs'; export * from './structs/PrintableString.mjs'; +export * from './structs/Listen.mjs'; +export * from './structs/Confirm.mjs'; +export * from './structs/SpendingDelay.mjs'; export * from './structs/FutureCallback.mjs'; export * from './structs/Future.mjs'; export * from './structs/ChannelHandshakeConfig.mjs'; export * from './structs/ChannelHandshakeLimits.mjs'; export * from './structs/ChannelConfigUpdate.mjs'; export * from './structs/UserConfig.mjs'; -export * from './structs/BestBlock.mjs'; -export * from './structs/Listen.mjs'; -export * from './structs/Confirm.mjs'; export * from './structs/ChainMonitor.mjs'; export * from './structs/EventHandler.mjs'; export * from './structs/EventsProvider.mjs'; @@ -555,11 +611,15 @@ export * from './structs/ChainParameters.mjs'; export * from './structs/MessageSendEventsProvider.mjs'; export * from './structs/ChannelMessageHandler.mjs'; export * from './structs/OffersMessageHandler.mjs'; +export * from './structs/NodeIdLookUp.mjs'; export * from './structs/ChannelManagerReadArgs.mjs'; export * from './structs/ExpandedKey.mjs'; +export * from './structs/CommonOpenChannelFields.mjs'; +export * from './structs/CommonAcceptChannelFields.mjs'; export * from './structs/Packet.mjs'; export * from './structs/RoutingMessageHandler.mjs'; export * from './structs/OnionMessageHandler.mjs'; +export * from './structs/TrampolineOnionPacket.mjs'; export * from './structs/CustomMessageReader.mjs'; export * from './structs/CustomMessageHandler.mjs'; export * from './structs/IgnoringMessageHandler.mjs'; @@ -571,10 +631,12 @@ export * from './structs/PeerManager.mjs'; export * from './structs/DirectedChannelTransactionParameters.mjs'; export * from './structs/OfferFeatures.mjs'; export * from './structs/InvoiceRequestFeatures.mjs'; -export * from './structs/Amount.mjs'; -export * from './structs/Quantity.mjs'; +export * from './structs/OfferWithExplicitMetadataBuilder.mjs'; +export * from './structs/SignBolt12InvoiceFn.mjs'; export * from './structs/TaggedHash.mjs'; export * from './structs/ErroneousField.mjs'; +export * from './structs/SignInvoiceRequestFn.mjs'; +export * from './structs/SignError.mjs'; export * from './structs/P2PGossipSync.mjs'; export * from './structs/ReadOnlyNetworkGraph.mjs'; export * from './structs/DirectedChannelInfo.mjs'; @@ -589,8 +651,11 @@ export * from './structs/MultiThreadedScoreLockWrite.mjs'; export * from './structs/ProbabilisticScoringDecayParameters.mjs'; export * from './structs/KeysManager.mjs'; export * from './structs/PhantomKeysManager.mjs'; +export * from './structs/RandomBytes.mjs'; export * from './structs/OnionMessenger.mjs'; export * from './structs/DefaultMessageRouter.mjs'; +export * from './structs/IntroductionNode.mjs'; +export * from './structs/EmptyNodeIdLookUp.mjs'; export * from './structs/ForwardTlvs.mjs'; export * from './structs/CoinSelectionSource.mjs'; export * from './structs/WalletSource.mjs'; diff --git a/ts/structs/APIError.mts b/ts/structs/APIError.mts index 1693e72b..73696504 100644 --- a/ts/structs/APIError.mts +++ b/ts/structs/APIError.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -39,7 +44,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -685,7 +750,7 @@ export class APIError extends CommonBase { * Utility method to constructs a new IncompatibleShutdownScript-variant APIError */ public static constructor_incompatible_shutdown_script(script: ShutdownScript): APIError { - const ret: bigint = bindings.APIError_incompatible_shutdown_script(script == null ? 0n : CommonBase.get_ptr_of(script)); + const ret: bigint = bindings.APIError_incompatible_shutdown_script(CommonBase.get_ptr_of(script)); const ret_hu_conv: APIError = APIError.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, script); @@ -697,7 +762,7 @@ export class APIError extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public eq(b: APIError): boolean { - const ret: boolean = bindings.APIError_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.APIError_eq(this.ptr, CommonBase.get_ptr_of(b)); return ret; } diff --git a/ts/structs/AcceptChannel.mts b/ts/structs/AcceptChannel.mts index 1ccb62cf..49c7d38e 100644 --- a/ts/structs/AcceptChannel.mts +++ b/ts/structs/AcceptChannel.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -610,49 +675,21 @@ export class AcceptChannel extends CommonBase { } /** - * A temporary channel ID, until the funding outpoint is announced - */ - public get_temporary_channel_id(): Uint8Array { - const ret: number = bindings.AcceptChannel_get_temporary_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; - } - - /** - * A temporary channel ID, until the funding outpoint is announced + * Common fields of `accept_channel(2)`-like messages */ - public set_temporary_channel_id(val: Uint8Array): void { - bindings.AcceptChannel_set_temporary_channel_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); - } - - /** - * The threshold below which outputs on transactions broadcast by sender will be omitted - */ - public get_dust_limit_satoshis(): bigint { - const ret: bigint = bindings.AcceptChannel_get_dust_limit_satoshis(this.ptr); - return ret; - } - - /** - * The threshold below which outputs on transactions broadcast by sender will be omitted - */ - public set_dust_limit_satoshis(val: bigint): void { - bindings.AcceptChannel_set_dust_limit_satoshis(this.ptr, val); - } - - /** - * The maximum inbound HTLC value in flight towards sender, in milli-satoshi - */ - public get_max_htlc_value_in_flight_msat(): bigint { - const ret: bigint = bindings.AcceptChannel_get_max_htlc_value_in_flight_msat(this.ptr); - return ret; + public get_common_fields(): CommonAcceptChannelFields { + const ret: bigint = bindings.AcceptChannel_get_common_fields(this.ptr); + const ret_hu_conv: CommonAcceptChannelFields = new CommonAcceptChannelFields(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** - * The maximum inbound HTLC value in flight towards sender, in milli-satoshi + * Common fields of `accept_channel(2)`-like messages */ - public set_max_htlc_value_in_flight_msat(val: bigint): void { - bindings.AcceptChannel_set_max_htlc_value_in_flight_msat(this.ptr, val); + public set_common_fields(val: CommonAcceptChannelFields): void { + bindings.AcceptChannel_set_common_fields(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** @@ -670,221 +707,14 @@ export class AcceptChannel extends CommonBase { bindings.AcceptChannel_set_channel_reserve_satoshis(this.ptr, val); } - /** - * The minimum HTLC size incoming to sender, in milli-satoshi - */ - public get_htlc_minimum_msat(): bigint { - const ret: bigint = bindings.AcceptChannel_get_htlc_minimum_msat(this.ptr); - return ret; - } - - /** - * The minimum HTLC size incoming to sender, in milli-satoshi - */ - public set_htlc_minimum_msat(val: bigint): void { - bindings.AcceptChannel_set_htlc_minimum_msat(this.ptr, val); - } - - /** - * Minimum depth of the funding transaction before the channel is considered open - */ - public get_minimum_depth(): number { - const ret: number = bindings.AcceptChannel_get_minimum_depth(this.ptr); - return ret; - } - - /** - * Minimum depth of the funding transaction before the channel is considered open - */ - public set_minimum_depth(val: number): void { - bindings.AcceptChannel_set_minimum_depth(this.ptr, val); - } - - /** - * The number of blocks which the counterparty will have to wait to claim on-chain funds if they broadcast a commitment transaction - */ - public get_to_self_delay(): number { - const ret: number = bindings.AcceptChannel_get_to_self_delay(this.ptr); - return ret; - } - - /** - * The number of blocks which the counterparty will have to wait to claim on-chain funds if they broadcast a commitment transaction - */ - public set_to_self_delay(val: number): void { - bindings.AcceptChannel_set_to_self_delay(this.ptr, val); - } - - /** - * The maximum number of inbound HTLCs towards sender - */ - public get_max_accepted_htlcs(): number { - const ret: number = bindings.AcceptChannel_get_max_accepted_htlcs(this.ptr); - return ret; - } - - /** - * The maximum number of inbound HTLCs towards sender - */ - public set_max_accepted_htlcs(val: number): void { - bindings.AcceptChannel_set_max_accepted_htlcs(this.ptr, val); - } - - /** - * The sender's key controlling the funding transaction - */ - public get_funding_pubkey(): Uint8Array { - const ret: number = bindings.AcceptChannel_get_funding_pubkey(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; - } - - /** - * The sender's key controlling the funding transaction - */ - public set_funding_pubkey(val: Uint8Array): void { - bindings.AcceptChannel_set_funding_pubkey(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); - } - - /** - * Used to derive a revocation key for transactions broadcast by counterparty - */ - public get_revocation_basepoint(): Uint8Array { - const ret: number = bindings.AcceptChannel_get_revocation_basepoint(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; - } - - /** - * Used to derive a revocation key for transactions broadcast by counterparty - */ - public set_revocation_basepoint(val: Uint8Array): void { - bindings.AcceptChannel_set_revocation_basepoint(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); - } - - /** - * A payment key to sender for transactions broadcast by counterparty - */ - public get_payment_point(): Uint8Array { - const ret: number = bindings.AcceptChannel_get_payment_point(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; - } - - /** - * A payment key to sender for transactions broadcast by counterparty - */ - public set_payment_point(val: Uint8Array): void { - bindings.AcceptChannel_set_payment_point(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); - } - - /** - * Used to derive a payment key to sender for transactions broadcast by sender - */ - public get_delayed_payment_basepoint(): Uint8Array { - const ret: number = bindings.AcceptChannel_get_delayed_payment_basepoint(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; - } - - /** - * Used to derive a payment key to sender for transactions broadcast by sender - */ - public set_delayed_payment_basepoint(val: Uint8Array): void { - bindings.AcceptChannel_set_delayed_payment_basepoint(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); - } - - /** - * Used to derive an HTLC payment key to sender for transactions broadcast by counterparty - */ - public get_htlc_basepoint(): Uint8Array { - const ret: number = bindings.AcceptChannel_get_htlc_basepoint(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; - } - - /** - * Used to derive an HTLC payment key to sender for transactions broadcast by counterparty - */ - public set_htlc_basepoint(val: Uint8Array): void { - bindings.AcceptChannel_set_htlc_basepoint(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); - } - - /** - * The first to-be-broadcast-by-sender transaction's per commitment point - */ - public get_first_per_commitment_point(): Uint8Array { - const ret: number = bindings.AcceptChannel_get_first_per_commitment_point(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; - } - - /** - * The first to-be-broadcast-by-sender transaction's per commitment point - */ - public set_first_per_commitment_point(val: Uint8Array): void { - bindings.AcceptChannel_set_first_per_commitment_point(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); - } - - /** - * A request to pre-set the to-sender output's scriptPubkey for when we collaboratively close - */ - public get_shutdown_scriptpubkey(): Option_CVec_u8ZZ { - const ret: bigint = bindings.AcceptChannel_get_shutdown_scriptpubkey(this.ptr); - const ret_hu_conv: Option_CVec_u8ZZ = Option_CVec_u8ZZ.constr_from_ptr(ret); - CommonBase.add_ref_from(ret_hu_conv, this); - return ret_hu_conv; - } - - /** - * A request to pre-set the to-sender output's scriptPubkey for when we collaboratively close - */ - public set_shutdown_scriptpubkey(val: Option_CVec_u8ZZ): void { - bindings.AcceptChannel_set_shutdown_scriptpubkey(this.ptr, CommonBase.get_ptr_of(val)); - CommonBase.add_ref_from(this, val); - } - - /** - * The channel type that this channel will represent. - * - * If this is `None`, we derive the channel type from the intersection of - * our feature bits with our counterparty's feature bits from the [`Init`] message. - * This is required to match the equivalent field in [`OpenChannel::channel_type`]. - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None - */ - public get_channel_type(): ChannelTypeFeatures { - const ret: bigint = bindings.AcceptChannel_get_channel_type(this.ptr); - const ret_hu_conv: ChannelTypeFeatures = new ChannelTypeFeatures(null, ret); - CommonBase.add_ref_from(ret_hu_conv, this); - return ret_hu_conv; - } - - /** - * The channel type that this channel will represent. - * - * If this is `None`, we derive the channel type from the intersection of - * our feature bits with our counterparty's feature bits from the [`Init`] message. - * This is required to match the equivalent field in [`OpenChannel::channel_type`]. - * - * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None - */ - public set_channel_type(val: ChannelTypeFeatures|null): void { - bindings.AcceptChannel_set_channel_type(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); - CommonBase.add_ref_from(this, val); - } - /** * Constructs a new AcceptChannel given each field - * - * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public static constructor_new(temporary_channel_id_arg: Uint8Array, dust_limit_satoshis_arg: bigint, max_htlc_value_in_flight_msat_arg: bigint, channel_reserve_satoshis_arg: bigint, htlc_minimum_msat_arg: bigint, minimum_depth_arg: number, to_self_delay_arg: number, max_accepted_htlcs_arg: number, funding_pubkey_arg: Uint8Array, revocation_basepoint_arg: Uint8Array, payment_point_arg: Uint8Array, delayed_payment_basepoint_arg: Uint8Array, htlc_basepoint_arg: Uint8Array, first_per_commitment_point_arg: Uint8Array, shutdown_scriptpubkey_arg: Option_CVec_u8ZZ, channel_type_arg: ChannelTypeFeatures|null): AcceptChannel { - const ret: bigint = bindings.AcceptChannel_new(bindings.encodeUint8Array(bindings.check_arr_len(temporary_channel_id_arg, 32)), dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, bindings.encodeUint8Array(bindings.check_arr_len(funding_pubkey_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(revocation_basepoint_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(payment_point_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(delayed_payment_basepoint_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(htlc_basepoint_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(first_per_commitment_point_arg, 33)), CommonBase.get_ptr_of(shutdown_scriptpubkey_arg), channel_type_arg == null ? 0n : CommonBase.get_ptr_of(channel_type_arg)); + public static constructor_new(common_fields_arg: CommonAcceptChannelFields, channel_reserve_satoshis_arg: bigint): AcceptChannel { + const ret: bigint = bindings.AcceptChannel_new(CommonBase.get_ptr_of(common_fields_arg), channel_reserve_satoshis_arg); const ret_hu_conv: AcceptChannel = new AcceptChannel(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); - CommonBase.add_ref_from(ret_hu_conv, shutdown_scriptpubkey_arg); - CommonBase.add_ref_from(ret_hu_conv, channel_type_arg); + CommonBase.add_ref_from(ret_hu_conv, common_fields_arg); return ret_hu_conv; } @@ -917,7 +747,7 @@ export class AcceptChannel extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: AcceptChannel): boolean { - const ret: boolean = bindings.AcceptChannel_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.AcceptChannel_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/AcceptChannelV2.mts b/ts/structs/AcceptChannelV2.mts index 5d959da9..ef2e33d7 100644 --- a/ts/structs/AcceptChannelV2.mts +++ b/ts/structs/AcceptChannelV2.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -608,19 +673,21 @@ export class AcceptChannelV2 extends CommonBase { } /** - * The same `temporary_channel_id` received from the initiator's `open_channel2` message. + * Common fields of `accept_channel(2)`-like messages */ - public get_temporary_channel_id(): Uint8Array { - const ret: number = bindings.AcceptChannelV2_get_temporary_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public get_common_fields(): CommonAcceptChannelFields { + const ret: bigint = bindings.AcceptChannelV2_get_common_fields(this.ptr); + const ret_hu_conv: CommonAcceptChannelFields = new CommonAcceptChannelFields(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** - * The same `temporary_channel_id` received from the initiator's `open_channel2` message. + * Common fields of `accept_channel(2)`-like messages */ - public set_temporary_channel_id(val: Uint8Array): void { - bindings.AcceptChannelV2_set_temporary_channel_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + public set_common_fields(val: CommonAcceptChannelFields): void { + bindings.AcceptChannelV2_set_common_fields(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** @@ -638,198 +705,6 @@ export class AcceptChannelV2 extends CommonBase { bindings.AcceptChannelV2_set_funding_satoshis(this.ptr, val); } - /** - * The threshold below which outputs on transactions broadcast by the channel acceptor will be - * omitted - */ - public get_dust_limit_satoshis(): bigint { - const ret: bigint = bindings.AcceptChannelV2_get_dust_limit_satoshis(this.ptr); - return ret; - } - - /** - * The threshold below which outputs on transactions broadcast by the channel acceptor will be - * omitted - */ - public set_dust_limit_satoshis(val: bigint): void { - bindings.AcceptChannelV2_set_dust_limit_satoshis(this.ptr, val); - } - - /** - * The maximum inbound HTLC value in flight towards channel acceptor, in milli-satoshi - */ - public get_max_htlc_value_in_flight_msat(): bigint { - const ret: bigint = bindings.AcceptChannelV2_get_max_htlc_value_in_flight_msat(this.ptr); - return ret; - } - - /** - * The maximum inbound HTLC value in flight towards channel acceptor, in milli-satoshi - */ - public set_max_htlc_value_in_flight_msat(val: bigint): void { - bindings.AcceptChannelV2_set_max_htlc_value_in_flight_msat(this.ptr, val); - } - - /** - * The minimum HTLC size incoming to channel acceptor, in milli-satoshi - */ - public get_htlc_minimum_msat(): bigint { - const ret: bigint = bindings.AcceptChannelV2_get_htlc_minimum_msat(this.ptr); - return ret; - } - - /** - * The minimum HTLC size incoming to channel acceptor, in milli-satoshi - */ - public set_htlc_minimum_msat(val: bigint): void { - bindings.AcceptChannelV2_set_htlc_minimum_msat(this.ptr, val); - } - - /** - * Minimum depth of the funding transaction before the channel is considered open - */ - public get_minimum_depth(): number { - const ret: number = bindings.AcceptChannelV2_get_minimum_depth(this.ptr); - return ret; - } - - /** - * Minimum depth of the funding transaction before the channel is considered open - */ - public set_minimum_depth(val: number): void { - bindings.AcceptChannelV2_set_minimum_depth(this.ptr, val); - } - - /** - * The number of blocks which the counterparty will have to wait to claim on-chain funds if they - * broadcast a commitment transaction - */ - public get_to_self_delay(): number { - const ret: number = bindings.AcceptChannelV2_get_to_self_delay(this.ptr); - return ret; - } - - /** - * The number of blocks which the counterparty will have to wait to claim on-chain funds if they - * broadcast a commitment transaction - */ - public set_to_self_delay(val: number): void { - bindings.AcceptChannelV2_set_to_self_delay(this.ptr, val); - } - - /** - * The maximum number of inbound HTLCs towards channel acceptor - */ - public get_max_accepted_htlcs(): number { - const ret: number = bindings.AcceptChannelV2_get_max_accepted_htlcs(this.ptr); - return ret; - } - - /** - * The maximum number of inbound HTLCs towards channel acceptor - */ - public set_max_accepted_htlcs(val: number): void { - bindings.AcceptChannelV2_set_max_accepted_htlcs(this.ptr, val); - } - - /** - * The channel acceptor's key controlling the funding transaction - */ - public get_funding_pubkey(): Uint8Array { - const ret: number = bindings.AcceptChannelV2_get_funding_pubkey(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; - } - - /** - * The channel acceptor's key controlling the funding transaction - */ - public set_funding_pubkey(val: Uint8Array): void { - bindings.AcceptChannelV2_set_funding_pubkey(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); - } - - /** - * Used to derive a revocation key for transactions broadcast by counterparty - */ - public get_revocation_basepoint(): Uint8Array { - const ret: number = bindings.AcceptChannelV2_get_revocation_basepoint(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; - } - - /** - * Used to derive a revocation key for transactions broadcast by counterparty - */ - public set_revocation_basepoint(val: Uint8Array): void { - bindings.AcceptChannelV2_set_revocation_basepoint(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); - } - - /** - * A payment key to channel acceptor for transactions broadcast by counterparty - */ - public get_payment_basepoint(): Uint8Array { - const ret: number = bindings.AcceptChannelV2_get_payment_basepoint(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; - } - - /** - * A payment key to channel acceptor for transactions broadcast by counterparty - */ - public set_payment_basepoint(val: Uint8Array): void { - bindings.AcceptChannelV2_set_payment_basepoint(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); - } - - /** - * Used to derive a payment key to channel acceptor for transactions broadcast by channel - * acceptor - */ - public get_delayed_payment_basepoint(): Uint8Array { - const ret: number = bindings.AcceptChannelV2_get_delayed_payment_basepoint(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; - } - - /** - * Used to derive a payment key to channel acceptor for transactions broadcast by channel - * acceptor - */ - public set_delayed_payment_basepoint(val: Uint8Array): void { - bindings.AcceptChannelV2_set_delayed_payment_basepoint(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); - } - - /** - * Used to derive an HTLC payment key to channel acceptor for transactions broadcast by counterparty - */ - public get_htlc_basepoint(): Uint8Array { - const ret: number = bindings.AcceptChannelV2_get_htlc_basepoint(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; - } - - /** - * Used to derive an HTLC payment key to channel acceptor for transactions broadcast by counterparty - */ - public set_htlc_basepoint(val: Uint8Array): void { - bindings.AcceptChannelV2_set_htlc_basepoint(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); - } - - /** - * The first to-be-broadcast-by-channel-acceptor transaction's per commitment point - */ - public get_first_per_commitment_point(): Uint8Array { - const ret: number = bindings.AcceptChannelV2_get_first_per_commitment_point(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; - } - - /** - * The first to-be-broadcast-by-channel-acceptor transaction's per commitment point - */ - public set_first_per_commitment_point(val: Uint8Array): void { - bindings.AcceptChannelV2_set_first_per_commitment_point(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); - } - /** * The second to-be-broadcast-by-channel-acceptor transaction's per commitment point */ @@ -846,56 +721,6 @@ export class AcceptChannelV2 extends CommonBase { bindings.AcceptChannelV2_set_second_per_commitment_point(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); } - /** - * Optionally, a request to pre-set the to-channel-acceptor output's scriptPubkey for when we - * collaboratively close - */ - public get_shutdown_scriptpubkey(): Option_CVec_u8ZZ { - const ret: bigint = bindings.AcceptChannelV2_get_shutdown_scriptpubkey(this.ptr); - const ret_hu_conv: Option_CVec_u8ZZ = Option_CVec_u8ZZ.constr_from_ptr(ret); - CommonBase.add_ref_from(ret_hu_conv, this); - return ret_hu_conv; - } - - /** - * Optionally, a request to pre-set the to-channel-acceptor output's scriptPubkey for when we - * collaboratively close - */ - public set_shutdown_scriptpubkey(val: Option_CVec_u8ZZ): void { - bindings.AcceptChannelV2_set_shutdown_scriptpubkey(this.ptr, CommonBase.get_ptr_of(val)); - CommonBase.add_ref_from(this, val); - } - - /** - * The channel type that this channel will represent. If none is set, we derive the channel - * type from the intersection of our feature bits with our counterparty's feature bits from - * the Init message. - * - * This is required to match the equivalent field in [`OpenChannelV2::channel_type`]. - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None - */ - public get_channel_type(): ChannelTypeFeatures { - const ret: bigint = bindings.AcceptChannelV2_get_channel_type(this.ptr); - const ret_hu_conv: ChannelTypeFeatures = new ChannelTypeFeatures(null, ret); - CommonBase.add_ref_from(ret_hu_conv, this); - return ret_hu_conv; - } - - /** - * The channel type that this channel will represent. If none is set, we derive the channel - * type from the intersection of our feature bits with our counterparty's feature bits from - * the Init message. - * - * This is required to match the equivalent field in [`OpenChannelV2::channel_type`]. - * - * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None - */ - public set_channel_type(val: ChannelTypeFeatures|null): void { - bindings.AcceptChannelV2_set_channel_type(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); - CommonBase.add_ref_from(this, val); - } - /** * Optionally, a requirement that only confirmed inputs can be added */ @@ -913,15 +738,12 @@ export class AcceptChannelV2 extends CommonBase { /** * Constructs a new AcceptChannelV2 given each field - * - * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public static constructor_new(temporary_channel_id_arg: Uint8Array, funding_satoshis_arg: bigint, dust_limit_satoshis_arg: bigint, max_htlc_value_in_flight_msat_arg: bigint, htlc_minimum_msat_arg: bigint, minimum_depth_arg: number, to_self_delay_arg: number, max_accepted_htlcs_arg: number, funding_pubkey_arg: Uint8Array, revocation_basepoint_arg: Uint8Array, payment_basepoint_arg: Uint8Array, delayed_payment_basepoint_arg: Uint8Array, htlc_basepoint_arg: Uint8Array, first_per_commitment_point_arg: Uint8Array, second_per_commitment_point_arg: Uint8Array, shutdown_scriptpubkey_arg: Option_CVec_u8ZZ, channel_type_arg: ChannelTypeFeatures|null, require_confirmed_inputs_arg: COption_NoneZ): AcceptChannelV2 { - const ret: bigint = bindings.AcceptChannelV2_new(bindings.encodeUint8Array(bindings.check_arr_len(temporary_channel_id_arg, 32)), funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, bindings.encodeUint8Array(bindings.check_arr_len(funding_pubkey_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(revocation_basepoint_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(payment_basepoint_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(delayed_payment_basepoint_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(htlc_basepoint_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(first_per_commitment_point_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(second_per_commitment_point_arg, 33)), CommonBase.get_ptr_of(shutdown_scriptpubkey_arg), channel_type_arg == null ? 0n : CommonBase.get_ptr_of(channel_type_arg), require_confirmed_inputs_arg); + public static constructor_new(common_fields_arg: CommonAcceptChannelFields, funding_satoshis_arg: bigint, second_per_commitment_point_arg: Uint8Array, require_confirmed_inputs_arg: COption_NoneZ): AcceptChannelV2 { + const ret: bigint = bindings.AcceptChannelV2_new(CommonBase.get_ptr_of(common_fields_arg), funding_satoshis_arg, bindings.encodeUint8Array(bindings.check_arr_len(second_per_commitment_point_arg, 33)), require_confirmed_inputs_arg); const ret_hu_conv: AcceptChannelV2 = new AcceptChannelV2(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); - CommonBase.add_ref_from(ret_hu_conv, shutdown_scriptpubkey_arg); - CommonBase.add_ref_from(ret_hu_conv, channel_type_arg); + CommonBase.add_ref_from(ret_hu_conv, common_fields_arg); return ret_hu_conv; } @@ -954,7 +776,7 @@ export class AcceptChannelV2 extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: AcceptChannelV2): boolean { - const ret: boolean = bindings.AcceptChannelV2_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.AcceptChannelV2_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/Amount.mts b/ts/structs/Amount.mts index b9583280..ac6c6f1d 100644 --- a/ts/structs/Amount.mts +++ b/ts/structs/Amount.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,15 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -560,9 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -595,15 +660,21 @@ import { Fallback } from '../structs/Fallback.mjs'; import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; import * as bindings from '../bindings.mjs' - /** * The minimum amount required for an item in an [`Offer`], denominated in either bitcoin or * another currency. */ export class Amount extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.Amount_free); } /* @internal */ - public constructor(_dummy: null, ptr: bigint) { - super(ptr, bindings.Amount_free); + public static constr_from_ptr(ptr: bigint): Amount { + const raw_ty: number = bindings.LDKAmount_ty_from_ptr(ptr); + switch (raw_ty) { + case 0: return new Amount_Bitcoin(ptr); + case 1: return new Amount_Currency(ptr); + default: + throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface + } } public clone_ptr(): bigint { @@ -616,9 +687,60 @@ export class Amount extends CommonBase { */ public clone(): Amount { const ret: bigint = bindings.Amount_clone(this.ptr); - const ret_hu_conv: Amount = new Amount(null, ret); + const ret_hu_conv: Amount = Amount.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, this); return ret_hu_conv; } + /** + * Utility method to constructs a new Bitcoin-variant Amount + */ + public static constructor_bitcoin(amount_msats: bigint): Amount { + const ret: bigint = bindings.Amount_bitcoin(amount_msats); + const ret_hu_conv: Amount = Amount.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + return ret_hu_conv; + } + + /** + * Utility method to constructs a new Currency-variant Amount + */ + public static constructor_currency(iso4217_code: Uint8Array, amount: bigint): Amount { + const ret: bigint = bindings.Amount_currency(bindings.encodeUint8Array(bindings.check_arr_len(iso4217_code, 3)), amount); + const ret_hu_conv: Amount = Amount.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + return ret_hu_conv; + } + +} +/** A Amount of type Bitcoin */ +export class Amount_Bitcoin extends Amount { + /** + * The amount in millisatoshi. + */ + public amount_msats: bigint; + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + this.amount_msats = bindings.LDKAmount_Bitcoin_get_amount_msats(ptr); + } +} +/** A Amount of type Currency */ +export class Amount_Currency extends Amount { + /** + * The currency that the amount is denominated in. + */ + public iso4217_code: Uint8Array; + /** + * The amount in the currency unit adjusted by the ISO 4712 exponent (e.g., USD cents). + */ + public amount: bigint; + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + const iso4217_code: number = bindings.LDKAmount_Currency_get_iso4217_code(ptr); + const iso4217_code_conv: Uint8Array = bindings.decodeUint8Array(iso4217_code); + this.iso4217_code = iso4217_code_conv; + this.amount = bindings.LDKAmount_Currency_get_amount(ptr); + } } diff --git a/ts/structs/AnchorDescriptor.mts b/ts/structs/AnchorDescriptor.mts index 34f9b746..c1431242 100644 --- a/ts/structs/AnchorDescriptor.mts +++ b/ts/structs/AnchorDescriptor.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -619,7 +684,7 @@ export class AnchorDescriptor extends CommonBase { * The parameters required to derive the signer for the anchor input. */ public set_channel_derivation_parameters(val: ChannelDerivationParameters): void { - bindings.AnchorDescriptor_set_channel_derivation_parameters(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.AnchorDescriptor_set_channel_derivation_parameters(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -639,7 +704,7 @@ export class AnchorDescriptor extends CommonBase { * output. */ public set_outpoint(val: OutPoint): void { - bindings.AnchorDescriptor_set_outpoint(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.AnchorDescriptor_set_outpoint(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -647,7 +712,7 @@ export class AnchorDescriptor extends CommonBase { * Constructs a new AnchorDescriptor given each field */ public static constructor_new(channel_derivation_parameters_arg: ChannelDerivationParameters, outpoint_arg: OutPoint): AnchorDescriptor { - const ret: bigint = bindings.AnchorDescriptor_new(channel_derivation_parameters_arg == null ? 0n : CommonBase.get_ptr_of(channel_derivation_parameters_arg), outpoint_arg == null ? 0n : CommonBase.get_ptr_of(outpoint_arg)); + const ret: bigint = bindings.AnchorDescriptor_new(CommonBase.get_ptr_of(channel_derivation_parameters_arg), CommonBase.get_ptr_of(outpoint_arg)); const ret_hu_conv: AnchorDescriptor = new AnchorDescriptor(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, channel_derivation_parameters_arg); @@ -676,7 +741,7 @@ export class AnchorDescriptor extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: AnchorDescriptor): boolean { - const ret: boolean = bindings.AnchorDescriptor_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.AnchorDescriptor_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/AnnouncementSignatures.mts b/ts/structs/AnnouncementSignatures.mts index 3e8f29c9..279e5e82 100644 --- a/ts/structs/AnnouncementSignatures.mts +++ b/ts/structs/AnnouncementSignatures.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -610,17 +675,19 @@ export class AnnouncementSignatures extends CommonBase { /** * The channel ID */ - public get_channel_id(): Uint8Array { - const ret: number = bindings.AnnouncementSignatures_get_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public get_channel_id(): ChannelId { + const ret: bigint = bindings.AnnouncementSignatures_get_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** * The channel ID */ - public set_channel_id(val: Uint8Array): void { - bindings.AnnouncementSignatures_set_channel_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + public set_channel_id(val: ChannelId): void { + bindings.AnnouncementSignatures_set_channel_id(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** @@ -673,10 +740,11 @@ export class AnnouncementSignatures extends CommonBase { /** * Constructs a new AnnouncementSignatures given each field */ - public static constructor_new(channel_id_arg: Uint8Array, short_channel_id_arg: bigint, node_signature_arg: Uint8Array, bitcoin_signature_arg: Uint8Array): AnnouncementSignatures { - const ret: bigint = bindings.AnnouncementSignatures_new(bindings.encodeUint8Array(bindings.check_arr_len(channel_id_arg, 32)), short_channel_id_arg, bindings.encodeUint8Array(bindings.check_arr_len(node_signature_arg, 64)), bindings.encodeUint8Array(bindings.check_arr_len(bitcoin_signature_arg, 64))); + public static constructor_new(channel_id_arg: ChannelId, short_channel_id_arg: bigint, node_signature_arg: Uint8Array, bitcoin_signature_arg: Uint8Array): AnnouncementSignatures { + const ret: bigint = bindings.AnnouncementSignatures_new(CommonBase.get_ptr_of(channel_id_arg), short_channel_id_arg, bindings.encodeUint8Array(bindings.check_arr_len(node_signature_arg, 64)), bindings.encodeUint8Array(bindings.check_arr_len(bitcoin_signature_arg, 64))); const ret_hu_conv: AnnouncementSignatures = new AnnouncementSignatures(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, channel_id_arg); return ret_hu_conv; } @@ -709,7 +777,7 @@ export class AnnouncementSignatures extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: AnnouncementSignatures): boolean { - const ret: boolean = bindings.AnnouncementSignatures_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.AnnouncementSignatures_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/Balance.mts b/ts/structs/Balance.mts index ebd39161..e4a2d253 100644 --- a/ts/structs/Balance.mts +++ b/ts/structs/Balance.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -698,7 +763,7 @@ export class Balance extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public eq(b: Balance): boolean { - const ret: boolean = bindings.Balance_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.Balance_eq(this.ptr, CommonBase.get_ptr_of(b)); return ret; } diff --git a/ts/structs/Bech32Error.mts b/ts/structs/Bech32Error.mts index 6e914b8e..e9c90d40 100644 --- a/ts/structs/Bech32Error.mts +++ b/ts/structs/Bech32Error.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,12 +20,16 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -39,7 +44,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/BestBlock.mts b/ts/structs/BestBlock.mts index b1c71fd2..4a39cb4c 100644 --- a/ts/structs/BestBlock.mts +++ b/ts/structs/BestBlock.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,16 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,14 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -605,6 +670,47 @@ export class BestBlock extends CommonBase { super(ptr, bindings.BestBlock_free); } + /** + * The block's hash + */ + public get_block_hash(): Uint8Array { + const ret: number = bindings.BestBlock_get_block_hash(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + + /** + * The block's hash + */ + public set_block_hash(val: Uint8Array): void { + bindings.BestBlock_set_block_hash(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + } + + /** + * The height at which the block was confirmed. + */ + public get_height(): number { + const ret: number = bindings.BestBlock_get_height(this.ptr); + return ret; + } + + /** + * The height at which the block was confirmed. + */ + public set_height(val: number): void { + bindings.BestBlock_set_height(this.ptr, val); + } + + /** + * Constructs a new BestBlock given each field + */ + public static constructor_new(block_hash_arg: Uint8Array, height_arg: number): BestBlock { + const ret: bigint = bindings.BestBlock_new(bindings.encodeUint8Array(bindings.check_arr_len(block_hash_arg, 32)), height_arg); + const ret_hu_conv: BestBlock = new BestBlock(null, ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + return ret_hu_conv; + } + public clone_ptr(): bigint { const ret: bigint = bindings.BestBlock_clone_ptr(this.ptr); return ret; @@ -620,13 +726,21 @@ export class BestBlock extends CommonBase { return ret_hu_conv; } + /** + * Generates a non-cryptographic 64-bit hash of the BestBlock. + */ + public hash(): bigint { + const ret: bigint = bindings.BestBlock_hash(this.ptr); + return ret; + } + /** * Checks if two BestBlocks contain equal inner contents. * This ignores pointers and is_owned flags and looks at the values in fields. * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: BestBlock): boolean { - const ret: boolean = bindings.BestBlock_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.BestBlock_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } @@ -643,30 +757,21 @@ export class BestBlock extends CommonBase { } /** - * Returns a `BestBlock` as identified by the given block hash and height. + * Serialize the BestBlock object into a byte array which can be read by BestBlock_read */ - public static constructor_new(block_hash: Uint8Array, height: number): BestBlock { - const ret: bigint = bindings.BestBlock_new(bindings.encodeUint8Array(bindings.check_arr_len(block_hash, 32)), height); - const ret_hu_conv: BestBlock = new BestBlock(null, ret); - CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); - return ret_hu_conv; - } - - /** - * Returns the best block hash. - */ - public block_hash(): Uint8Array { - const ret: number = bindings.BestBlock_block_hash(this.ptr); + public write(): Uint8Array { + const ret: number = bindings.BestBlock_write(this.ptr); const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); return ret_conv; } /** - * Returns the best block height. + * Read a BestBlock from a byte array, created by BestBlock_write */ - public height(): number { - const ret: number = bindings.BestBlock_height(this.ptr); - return ret; + public static constructor_read(ser: Uint8Array): Result_BestBlockDecodeErrorZ { + const ret: bigint = bindings.BestBlock_read(bindings.encodeUint8Array(ser)); + const ret_hu_conv: Result_BestBlockDecodeErrorZ = Result_BestBlockDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; } } diff --git a/ts/structs/BigEndianScalar.mts b/ts/structs/BigEndianScalar.mts index 007d0606..0fa10b15 100644 --- a/ts/structs/BigEndianScalar.mts +++ b/ts/structs/BigEndianScalar.mts @@ -10,6 +10,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -18,13 +19,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -39,7 +44,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/BigSize.mts b/ts/structs/BigSize.mts index 839aedcd..93dd4d0b 100644 --- a/ts/structs/BigSize.mts +++ b/ts/structs/BigSize.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -659,7 +724,7 @@ export class BigSize extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: BigSize): boolean { - const ret: boolean = bindings.BigSize_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.BigSize_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/BlindedForward.mts b/ts/structs/BlindedForward.mts index 8b43403e..33a56ef2 100644 --- a/ts/structs/BlindedForward.mts +++ b/ts/structs/BlindedForward.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -681,7 +746,7 @@ export class BlindedForward extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: BlindedForward): boolean { - const ret: boolean = bindings.BlindedForward_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.BlindedForward_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/BlindedHop.mts b/ts/structs/BlindedHop.mts index 49939e57..db6bfef3 100644 --- a/ts/structs/BlindedHop.mts +++ b/ts/structs/BlindedHop.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -680,7 +745,7 @@ export class BlindedHop extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: BlindedHop): boolean { - const ret: boolean = bindings.BlindedHop_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.BlindedHop_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/BlindedHopFeatures.mts b/ts/structs/BlindedHopFeatures.mts index 7b0ecfdb..ab4cc07b 100644 --- a/ts/structs/BlindedHopFeatures.mts +++ b/ts/structs/BlindedHopFeatures.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -611,7 +676,7 @@ export class BlindedHopFeatures extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: BlindedHopFeatures): boolean { - const ret: boolean = bindings.BlindedHopFeatures_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.BlindedHopFeatures_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } @@ -653,7 +718,7 @@ export class BlindedHopFeatures extends CommonBase { * Returns true if this `Features` object contains required features unknown by `other`. */ public requires_unknown_bits_from(other: BlindedHopFeatures): boolean { - const ret: boolean = bindings.BlindedHopFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0n : CommonBase.get_ptr_of(other)); + const ret: boolean = bindings.BlindedHopFeatures_requires_unknown_bits_from(this.ptr, CommonBase.get_ptr_of(other)); CommonBase.add_ref_from(this, other); return ret; } diff --git a/ts/structs/BlindedPath.mts b/ts/structs/BlindedPath.mts index 776076de..6c7355f4 100644 --- a/ts/structs/BlindedPath.mts +++ b/ts/structs/BlindedPath.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,12 +20,16 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; -import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -39,7 +44,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -608,26 +673,28 @@ export class BlindedPath extends CommonBase { /** * To send to a blinded path, the sender first finds a route to the unblinded - * `introduction_node_id`, which can unblind its [`encrypted_payload`] to find out the onion + * `introduction_node`, which can unblind its [`encrypted_payload`] to find out the onion * message or payment's next hop and forward it along. * * [`encrypted_payload`]: BlindedHop::encrypted_payload */ - public get_introduction_node_id(): Uint8Array { - const ret: number = bindings.BlindedPath_get_introduction_node_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public get_introduction_node(): IntroductionNode { + const ret: bigint = bindings.BlindedPath_get_introduction_node(this.ptr); + const ret_hu_conv: IntroductionNode = IntroductionNode.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** * To send to a blinded path, the sender first finds a route to the unblinded - * `introduction_node_id`, which can unblind its [`encrypted_payload`] to find out the onion + * `introduction_node`, which can unblind its [`encrypted_payload`] to find out the onion * message or payment's next hop and forward it along. * * [`encrypted_payload`]: BlindedHop::encrypted_payload */ - public set_introduction_node_id(val: Uint8Array): void { - bindings.BlindedPath_set_introduction_node_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); + public set_introduction_node(val: IntroductionNode): void { + bindings.BlindedPath_set_introduction_node(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** @@ -673,17 +740,18 @@ export class BlindedPath extends CommonBase { * The hops composing the blinded path. */ public set_blinded_hops(val: BlindedHop[]): void { - bindings.BlindedPath_set_blinded_hops(this.ptr, bindings.encodeUint64Array(val.map(val_conv_12 => val_conv_12 == null ? 0n : CommonBase.get_ptr_of(val_conv_12)))); + bindings.BlindedPath_set_blinded_hops(this.ptr, bindings.encodeUint64Array(val.map(val_conv_12 => CommonBase.get_ptr_of(val_conv_12)))); val.forEach((val_conv_12: BlindedHop) => { CommonBase.add_ref_from(this, val_conv_12); }); } /** * Constructs a new BlindedPath given each field */ - public static constructor_new(introduction_node_id_arg: Uint8Array, blinding_point_arg: Uint8Array, blinded_hops_arg: BlindedHop[]): BlindedPath { - const ret: bigint = bindings.BlindedPath_new(bindings.encodeUint8Array(bindings.check_arr_len(introduction_node_id_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(blinding_point_arg, 33)), bindings.encodeUint64Array(blinded_hops_arg.map(blinded_hops_arg_conv_12 => blinded_hops_arg_conv_12 == null ? 0n : CommonBase.get_ptr_of(blinded_hops_arg_conv_12)))); + public static constructor_new(introduction_node_arg: IntroductionNode, blinding_point_arg: Uint8Array, blinded_hops_arg: BlindedHop[]): BlindedPath { + const ret: bigint = bindings.BlindedPath_new(CommonBase.get_ptr_of(introduction_node_arg), bindings.encodeUint8Array(bindings.check_arr_len(blinding_point_arg, 33)), bindings.encodeUint64Array(blinded_hops_arg.map(blinded_hops_arg_conv_12 => CommonBase.get_ptr_of(blinded_hops_arg_conv_12)))); const ret_hu_conv: BlindedPath = new BlindedPath(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, introduction_node_arg); blinded_hops_arg.forEach((blinded_hops_arg_conv_12: BlindedHop) => { CommonBase.add_ref_from(ret_hu_conv, blinded_hops_arg_conv_12); }); return ret_hu_conv; } @@ -717,7 +785,7 @@ export class BlindedPath extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: BlindedPath): boolean { - const ret: boolean = bindings.BlindedPath_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.BlindedPath_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } @@ -745,6 +813,20 @@ export class BlindedPath extends CommonBase { return ret_hu_conv; } + /** + * Returns the introduction [`NodeId`] of the blinded path, if it is publicly reachable (i.e., + * it is found in the network graph). + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public public_introduction_node_id(network_graph: ReadOnlyNetworkGraph): NodeId { + const ret: bigint = bindings.BlindedPath_public_introduction_node_id(this.ptr, CommonBase.get_ptr_of(network_graph)); + const ret_hu_conv: NodeId = new NodeId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + CommonBase.add_ref_from(this, network_graph); + return ret_hu_conv; + } + /** * Serialize the BlindedPath object into a byte array which can be read by BlindedPath_read */ diff --git a/ts/structs/BlindedPathCandidate.mts b/ts/structs/BlindedPathCandidate.mts index 113179ee..f10f7388 100644 --- a/ts/structs/BlindedPathCandidate.mts +++ b/ts/structs/BlindedPathCandidate.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/BlindedPayInfo.mts b/ts/structs/BlindedPayInfo.mts index 4a44675c..59480fbf 100644 --- a/ts/structs/BlindedPayInfo.mts +++ b/ts/structs/BlindedPayInfo.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -708,7 +773,7 @@ export class BlindedPayInfo extends CommonBase { * onion payload. */ public set_features(val: BlindedHopFeatures): void { - bindings.BlindedPayInfo_set_features(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.BlindedPayInfo_set_features(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -716,7 +781,7 @@ export class BlindedPayInfo extends CommonBase { * Constructs a new BlindedPayInfo given each field */ public static constructor_new(fee_base_msat_arg: number, fee_proportional_millionths_arg: number, cltv_expiry_delta_arg: number, htlc_minimum_msat_arg: bigint, htlc_maximum_msat_arg: bigint, features_arg: BlindedHopFeatures): BlindedPayInfo { - const ret: bigint = bindings.BlindedPayInfo_new(fee_base_msat_arg, fee_proportional_millionths_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg, features_arg == null ? 0n : CommonBase.get_ptr_of(features_arg)); + const ret: bigint = bindings.BlindedPayInfo_new(fee_base_msat_arg, fee_proportional_millionths_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg, CommonBase.get_ptr_of(features_arg)); const ret_hu_conv: BlindedPayInfo = new BlindedPayInfo(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, features_arg); @@ -752,7 +817,7 @@ export class BlindedPayInfo extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: BlindedPayInfo): boolean { - const ret: boolean = bindings.BlindedPayInfo_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.BlindedPayInfo_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/BlindedTail.mts b/ts/structs/BlindedTail.mts index ee526bc9..bd20308e 100644 --- a/ts/structs/BlindedTail.mts +++ b/ts/structs/BlindedTail.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -633,7 +698,7 @@ export class BlindedTail extends CommonBase { * [`BlindedPath`]: crate::blinded_path::BlindedPath */ public set_hops(val: BlindedHop[]): void { - bindings.BlindedTail_set_hops(this.ptr, bindings.encodeUint64Array(val.map(val_conv_12 => val_conv_12 == null ? 0n : CommonBase.get_ptr_of(val_conv_12)))); + bindings.BlindedTail_set_hops(this.ptr, bindings.encodeUint64Array(val.map(val_conv_12 => CommonBase.get_ptr_of(val_conv_12)))); val.forEach((val_conv_12: BlindedHop) => { CommonBase.add_ref_from(this, val_conv_12); }); } @@ -693,7 +758,7 @@ export class BlindedTail extends CommonBase { * Constructs a new BlindedTail given each field */ public static constructor_new(hops_arg: BlindedHop[], blinding_point_arg: Uint8Array, excess_final_cltv_expiry_delta_arg: number, final_value_msat_arg: bigint): BlindedTail { - const ret: bigint = bindings.BlindedTail_new(bindings.encodeUint64Array(hops_arg.map(hops_arg_conv_12 => hops_arg_conv_12 == null ? 0n : CommonBase.get_ptr_of(hops_arg_conv_12))), bindings.encodeUint8Array(bindings.check_arr_len(blinding_point_arg, 33)), excess_final_cltv_expiry_delta_arg, final_value_msat_arg); + const ret: bigint = bindings.BlindedTail_new(bindings.encodeUint64Array(hops_arg.map(hops_arg_conv_12 => CommonBase.get_ptr_of(hops_arg_conv_12))), bindings.encodeUint8Array(bindings.check_arr_len(blinding_point_arg, 33)), excess_final_cltv_expiry_delta_arg, final_value_msat_arg); const ret_hu_conv: BlindedTail = new BlindedTail(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); hops_arg.forEach((hops_arg_conv_12: BlindedHop) => { CommonBase.add_ref_from(ret_hu_conv, hops_arg_conv_12); }); @@ -729,7 +794,7 @@ export class BlindedTail extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: BlindedTail): boolean { - const ret: boolean = bindings.BlindedTail_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.BlindedTail_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/Bolt11Invoice.mts b/ts/structs/Bolt11Invoice.mts index 91e2c22c..d12647e5 100644 --- a/ts/structs/Bolt11Invoice.mts +++ b/ts/structs/Bolt11Invoice.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -618,7 +683,7 @@ export class Bolt11Invoice extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: Bolt11Invoice): boolean { - const ret: boolean = bindings.Bolt11Invoice_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.Bolt11Invoice_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } @@ -697,7 +762,7 @@ export class Bolt11Invoice extends CommonBase { * ``` */ public static constructor_from_signed(signed_invoice: SignedRawBolt11Invoice): Result_Bolt11InvoiceBolt11SemanticErrorZ { - const ret: bigint = bindings.Bolt11Invoice_from_signed(signed_invoice == null ? 0n : CommonBase.get_ptr_of(signed_invoice)); + const ret: bigint = bindings.Bolt11Invoice_from_signed(CommonBase.get_ptr_of(signed_invoice)); const ret_hu_conv: Result_Bolt11InvoiceBolt11SemanticErrorZ = Result_Bolt11InvoiceBolt11SemanticErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, signed_invoice); return ret_hu_conv; @@ -771,6 +836,16 @@ export class Bolt11Invoice extends CommonBase { return ret_conv; } + /** + * Recover the payee's public key if one was included in the invoice, otherwise return the + * recovered public key from the signature + */ + public get_payee_pub_key(): Uint8Array { + const ret: number = bindings.Bolt11Invoice_get_payee_pub_key(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + /** * Returns the Duration since the Unix epoch at which the invoice expires. * Returning None if overflow occurred. diff --git a/ts/structs/Bolt11InvoiceFeatures.mts b/ts/structs/Bolt11InvoiceFeatures.mts index 74abec55..5ab47ade 100644 --- a/ts/structs/Bolt11InvoiceFeatures.mts +++ b/ts/structs/Bolt11InvoiceFeatures.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -611,7 +676,7 @@ export class Bolt11InvoiceFeatures extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: Bolt11InvoiceFeatures): boolean { - const ret: boolean = bindings.Bolt11InvoiceFeatures_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.Bolt11InvoiceFeatures_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } @@ -653,7 +718,7 @@ export class Bolt11InvoiceFeatures extends CommonBase { * Returns true if this `Features` object contains required features unknown by `other`. */ public requires_unknown_bits_from(other: Bolt11InvoiceFeatures): boolean { - const ret: boolean = bindings.Bolt11InvoiceFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0n : CommonBase.get_ptr_of(other)); + const ret: boolean = bindings.Bolt11InvoiceFeatures_requires_unknown_bits_from(this.ptr, CommonBase.get_ptr_of(other)); CommonBase.add_ref_from(this, other); return ret; } @@ -865,4 +930,34 @@ export class Bolt11InvoiceFeatures extends CommonBase { return ret; } + /** + * Set this feature as optional. + */ + public set_trampoline_routing_optional(): void { + bindings.Bolt11InvoiceFeatures_set_trampoline_routing_optional(this.ptr); + } + + /** + * Set this feature as required. + */ + public set_trampoline_routing_required(): void { + bindings.Bolt11InvoiceFeatures_set_trampoline_routing_required(this.ptr); + } + + /** + * Checks if this feature is supported. + */ + public supports_trampoline_routing(): boolean { + const ret: boolean = bindings.Bolt11InvoiceFeatures_supports_trampoline_routing(this.ptr); + return ret; + } + + /** + * Checks if this feature is required. + */ + public requires_trampoline_routing(): boolean { + const ret: boolean = bindings.Bolt11InvoiceFeatures_requires_trampoline_routing(this.ptr); + return ret; + } + } diff --git a/ts/structs/Bolt11InvoiceSignature.mts b/ts/structs/Bolt11InvoiceSignature.mts index d0cbb02a..b5b7b735 100644 --- a/ts/structs/Bolt11InvoiceSignature.mts +++ b/ts/structs/Bolt11InvoiceSignature.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -634,7 +699,7 @@ export class Bolt11InvoiceSignature extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: Bolt11InvoiceSignature): boolean { - const ret: boolean = bindings.Bolt11InvoiceSignature_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.Bolt11InvoiceSignature_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/Bolt11ParseError.mts b/ts/structs/Bolt11ParseError.mts index be696f60..5d0edd01 100644 --- a/ts/structs/Bolt11ParseError.mts +++ b/ts/structs/Bolt11ParseError.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -829,7 +894,7 @@ export class Bolt11ParseError extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public eq(b: Bolt11ParseError): boolean { - const ret: boolean = bindings.Bolt11ParseError_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.Bolt11ParseError_eq(this.ptr, CommonBase.get_ptr_of(b)); return ret; } diff --git a/ts/structs/Bolt12Invoice.mts b/ts/structs/Bolt12Invoice.mts index 791d0461..9c88c379 100644 --- a/ts/structs/Bolt12Invoice.mts +++ b/ts/structs/Bolt12Invoice.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,15 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,10 +268,12 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -680,12 +745,10 @@ export class Bolt12Invoice extends CommonBase { * * [`Offer`]: crate::offers::offer::Offer * [`Offer::amount`]: crate::offers::offer::Offer::amount - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public amount(): Amount { + public amount(): Option_AmountZ { const ret: bigint = bindings.Bolt12Invoice_amount(this.ptr); - const ret_hu_conv: Amount = new Amount(null, ret); + const ret_hu_conv: Option_AmountZ = Option_AmountZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, this); return ret_hu_conv; } @@ -714,6 +777,8 @@ export class Bolt12Invoice extends CommonBase { * From [`Offer::description`] or [`Refund::description`]. * * [`Offer::description`]: crate::offers::offer::Offer::description + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ public description(): PrintableString { const ret: bigint = bindings.Bolt12Invoice_description(this.ptr); @@ -780,12 +845,10 @@ export class Bolt12Invoice extends CommonBase { * [`Refund`]. * * [`Offer::supported_quantity`]: crate::offers::offer::Offer::supported_quantity - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public supported_quantity(): Quantity { + public supported_quantity(): Option_QuantityZ { const ret: bigint = bindings.Bolt12Invoice_supported_quantity(this.ptr); - const ret_hu_conv: Quantity = new Quantity(null, ret); + const ret_hu_conv: Option_QuantityZ = Option_QuantityZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, this); return ret_hu_conv; } @@ -927,12 +990,20 @@ export class Bolt12Invoice extends CommonBase { * the associated [`PaymentId`] to use when sending the payment. */ public verify(key: ExpandedKey): Result_ThirtyTwoBytesNoneZ { - const ret: bigint = bindings.Bolt12Invoice_verify(this.ptr, key == null ? 0n : CommonBase.get_ptr_of(key)); + const ret: bigint = bindings.Bolt12Invoice_verify(this.ptr, CommonBase.get_ptr_of(key)); const ret_hu_conv: Result_ThirtyTwoBytesNoneZ = Result_ThirtyTwoBytesNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, key); return ret_hu_conv; } + /** + * Generates a non-cryptographic 64-bit hash of the Bolt12Invoice. + */ + public hash(): bigint { + const ret: bigint = bindings.Bolt12Invoice_hash(this.ptr); + return ret; + } + /** * Serialize the Bolt12Invoice object into a byte array which can be read by Bolt12Invoice_read */ diff --git a/ts/structs/Bolt12InvoiceFeatures.mts b/ts/structs/Bolt12InvoiceFeatures.mts index 46442574..1ac23c00 100644 --- a/ts/structs/Bolt12InvoiceFeatures.mts +++ b/ts/structs/Bolt12InvoiceFeatures.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -611,7 +676,7 @@ export class Bolt12InvoiceFeatures extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: Bolt12InvoiceFeatures): boolean { - const ret: boolean = bindings.Bolt12InvoiceFeatures_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.Bolt12InvoiceFeatures_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } @@ -653,7 +718,7 @@ export class Bolt12InvoiceFeatures extends CommonBase { * Returns true if this `Features` object contains required features unknown by `other`. */ public requires_unknown_bits_from(other: Bolt12InvoiceFeatures): boolean { - const ret: boolean = bindings.Bolt12InvoiceFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0n : CommonBase.get_ptr_of(other)); + const ret: boolean = bindings.Bolt12InvoiceFeatures_requires_unknown_bits_from(this.ptr, CommonBase.get_ptr_of(other)); CommonBase.add_ref_from(this, other); return ret; } diff --git a/ts/structs/Bolt12OfferContext.mts b/ts/structs/Bolt12OfferContext.mts new file mode 100644 index 00000000..c168a335 --- /dev/null +++ b/ts/structs/Bolt12OfferContext.mts @@ -0,0 +1,777 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + +/** + * The context of a payment made for an invoice requested from a BOLT 12 [`Offer`]. + * + * [`Offer`]: crate::offers::offer::Offer + */ +export class Bolt12OfferContext extends CommonBase { + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.Bolt12OfferContext_free); + } + + /** + * The identifier of the [`Offer`]. + * + * [`Offer`]: crate::offers::offer::Offer + */ + public get_offer_id(): OfferId { + const ret: bigint = bindings.Bolt12OfferContext_get_offer_id(this.ptr); + const ret_hu_conv: OfferId = new OfferId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * The identifier of the [`Offer`]. + * + * [`Offer`]: crate::offers::offer::Offer + */ + public set_offer_id(val: OfferId): void { + bindings.Bolt12OfferContext_set_offer_id(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); + } + + /** + * Fields from an [`InvoiceRequest`] sent for a [`Bolt12Invoice`]. + * + * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest + * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice + */ + public get_invoice_request(): InvoiceRequestFields { + const ret: bigint = bindings.Bolt12OfferContext_get_invoice_request(this.ptr); + const ret_hu_conv: InvoiceRequestFields = new InvoiceRequestFields(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * Fields from an [`InvoiceRequest`] sent for a [`Bolt12Invoice`]. + * + * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest + * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice + */ + public set_invoice_request(val: InvoiceRequestFields): void { + bindings.Bolt12OfferContext_set_invoice_request(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); + } + + /** + * Constructs a new Bolt12OfferContext given each field + */ + public static constructor_new(offer_id_arg: OfferId, invoice_request_arg: InvoiceRequestFields): Bolt12OfferContext { + const ret: bigint = bindings.Bolt12OfferContext_new(CommonBase.get_ptr_of(offer_id_arg), CommonBase.get_ptr_of(invoice_request_arg)); + const ret_hu_conv: Bolt12OfferContext = new Bolt12OfferContext(null, ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, offer_id_arg); + CommonBase.add_ref_from(ret_hu_conv, invoice_request_arg); + return ret_hu_conv; + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.Bolt12OfferContext_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a copy of the Bolt12OfferContext + */ + public clone(): Bolt12OfferContext { + const ret: bigint = bindings.Bolt12OfferContext_clone(this.ptr); + const ret_hu_conv: Bolt12OfferContext = new Bolt12OfferContext(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * Checks if two Bolt12OfferContexts contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ + public eq(b: Bolt12OfferContext): boolean { + const ret: boolean = bindings.Bolt12OfferContext_eq(this.ptr, CommonBase.get_ptr_of(b)); + CommonBase.add_ref_from(this, b); + return ret; + } + + /** + * Serialize the Bolt12OfferContext object into a byte array which can be read by Bolt12OfferContext_read + */ + public write(): Uint8Array { + const ret: number = bindings.Bolt12OfferContext_write(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Read a Bolt12OfferContext from a byte array, created by Bolt12OfferContext_write + */ + public static constructor_read(ser: Uint8Array): Result_Bolt12OfferContextDecodeErrorZ { + const ret: bigint = bindings.Bolt12OfferContext_read(bindings.encodeUint8Array(ser)); + const ret_hu_conv: Result_Bolt12OfferContextDecodeErrorZ = Result_Bolt12OfferContextDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/ts/structs/Bolt12ParseError.mts b/ts/structs/Bolt12ParseError.mts index 121e92ce..44b31089 100644 --- a/ts/structs/Bolt12ParseError.mts +++ b/ts/structs/Bolt12ParseError.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; import { DecodeError } from '../structs/DecodeError.mjs'; @@ -39,7 +44,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Bolt12RefundContext.mts b/ts/structs/Bolt12RefundContext.mts new file mode 100644 index 00000000..1d7c90b0 --- /dev/null +++ b/ts/structs/Bolt12RefundContext.mts @@ -0,0 +1,729 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + +/** + * The context of a payment made for an invoice sent for a BOLT 12 [`Refund`]. + * + * [`Refund`]: crate::offers::refund::Refund + */ +export class Bolt12RefundContext extends CommonBase { + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.Bolt12RefundContext_free); + } + + /** + * Constructs a new Bolt12RefundContext given each field + */ + public static constructor_new(): Bolt12RefundContext { + const ret: bigint = bindings.Bolt12RefundContext_new(); + const ret_hu_conv: Bolt12RefundContext = new Bolt12RefundContext(null, ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + return ret_hu_conv; + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.Bolt12RefundContext_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a copy of the Bolt12RefundContext + */ + public clone(): Bolt12RefundContext { + const ret: bigint = bindings.Bolt12RefundContext_clone(this.ptr); + const ret_hu_conv: Bolt12RefundContext = new Bolt12RefundContext(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * Checks if two Bolt12RefundContexts contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ + public eq(b: Bolt12RefundContext): boolean { + const ret: boolean = bindings.Bolt12RefundContext_eq(this.ptr, CommonBase.get_ptr_of(b)); + CommonBase.add_ref_from(this, b); + return ret; + } + + /** + * Serialize the Bolt12RefundContext object into a byte array which can be read by Bolt12RefundContext_read + */ + public write(): Uint8Array { + const ret: number = bindings.Bolt12RefundContext_write(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Read a Bolt12RefundContext from a byte array, created by Bolt12RefundContext_write + */ + public static constructor_read(ser: Uint8Array): Result_Bolt12RefundContextDecodeErrorZ { + const ret: bigint = bindings.Bolt12RefundContext_read(bindings.encodeUint8Array(ser)); + const ret_hu_conv: Result_Bolt12RefundContextDecodeErrorZ = Result_Bolt12RefundContextDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/ts/structs/BroadcasterInterface.mts b/ts/structs/BroadcasterInterface.mts index c342da2a..1f79b92d 100644 --- a/ts/structs/BroadcasterInterface.mts +++ b/ts/structs/BroadcasterInterface.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/BuiltCommitmentTransaction.mts b/ts/structs/BuiltCommitmentTransaction.mts index 0bbbd11b..f8b46698 100644 --- a/ts/structs/BuiltCommitmentTransaction.mts +++ b/ts/structs/BuiltCommitmentTransaction.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/BumpTransactionEvent.mts b/ts/structs/BumpTransactionEvent.mts index 214a5c73..c7fca9b6 100644 --- a/ts/structs/BumpTransactionEvent.mts +++ b/ts/structs/BumpTransactionEvent.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -629,10 +694,11 @@ export class BumpTransactionEvent extends CommonBase { /** * Utility method to constructs a new ChannelClose-variant BumpTransactionEvent */ - public static constructor_channel_close(claim_id: Uint8Array, package_target_feerate_sat_per_1000_weight: number, commitment_tx: Uint8Array, commitment_tx_fee_satoshis: bigint, anchor_descriptor: AnchorDescriptor, pending_htlcs: HTLCOutputInCommitment[]): BumpTransactionEvent { - const ret: bigint = bindings.BumpTransactionEvent_channel_close(bindings.encodeUint8Array(bindings.check_arr_len(claim_id, 32)), package_target_feerate_sat_per_1000_weight, bindings.encodeUint8Array(commitment_tx), commitment_tx_fee_satoshis, anchor_descriptor == null ? 0n : CommonBase.get_ptr_of(anchor_descriptor), bindings.encodeUint64Array(pending_htlcs.map(pending_htlcs_conv_24 => pending_htlcs_conv_24 == null ? 0n : CommonBase.get_ptr_of(pending_htlcs_conv_24)))); + public static constructor_channel_close(channel_id: ChannelId, counterparty_node_id: Uint8Array, claim_id: Uint8Array, package_target_feerate_sat_per_1000_weight: number, commitment_tx: Uint8Array, commitment_tx_fee_satoshis: bigint, anchor_descriptor: AnchorDescriptor, pending_htlcs: HTLCOutputInCommitment[]): BumpTransactionEvent { + const ret: bigint = bindings.BumpTransactionEvent_channel_close(CommonBase.get_ptr_of(channel_id), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id, 33)), bindings.encodeUint8Array(bindings.check_arr_len(claim_id, 32)), package_target_feerate_sat_per_1000_weight, bindings.encodeUint8Array(commitment_tx), commitment_tx_fee_satoshis, CommonBase.get_ptr_of(anchor_descriptor), bindings.encodeUint64Array(pending_htlcs.map(pending_htlcs_conv_24 => CommonBase.get_ptr_of(pending_htlcs_conv_24)))); const ret_hu_conv: BumpTransactionEvent = BumpTransactionEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, channel_id); CommonBase.add_ref_from(ret_hu_conv, anchor_descriptor); pending_htlcs.forEach((pending_htlcs_conv_24: HTLCOutputInCommitment) => { CommonBase.add_ref_from(ret_hu_conv, pending_htlcs_conv_24); }); return ret_hu_conv; @@ -641,10 +707,11 @@ export class BumpTransactionEvent extends CommonBase { /** * Utility method to constructs a new HTLCResolution-variant BumpTransactionEvent */ - public static constructor_htlcresolution(claim_id: Uint8Array, target_feerate_sat_per_1000_weight: number, htlc_descriptors: HTLCDescriptor[], tx_lock_time: number): BumpTransactionEvent { - const ret: bigint = bindings.BumpTransactionEvent_htlcresolution(bindings.encodeUint8Array(bindings.check_arr_len(claim_id, 32)), target_feerate_sat_per_1000_weight, bindings.encodeUint64Array(htlc_descriptors.map(htlc_descriptors_conv_16 => htlc_descriptors_conv_16 == null ? 0n : CommonBase.get_ptr_of(htlc_descriptors_conv_16))), tx_lock_time); + public static constructor_htlcresolution(channel_id: ChannelId, counterparty_node_id: Uint8Array, claim_id: Uint8Array, target_feerate_sat_per_1000_weight: number, htlc_descriptors: HTLCDescriptor[], tx_lock_time: number): BumpTransactionEvent { + const ret: bigint = bindings.BumpTransactionEvent_htlcresolution(CommonBase.get_ptr_of(channel_id), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id, 33)), bindings.encodeUint8Array(bindings.check_arr_len(claim_id, 32)), target_feerate_sat_per_1000_weight, bindings.encodeUint64Array(htlc_descriptors.map(htlc_descriptors_conv_16 => CommonBase.get_ptr_of(htlc_descriptors_conv_16))), tx_lock_time); const ret_hu_conv: BumpTransactionEvent = BumpTransactionEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, channel_id); htlc_descriptors.forEach((htlc_descriptors_conv_16: HTLCDescriptor) => { CommonBase.add_ref_from(ret_hu_conv, htlc_descriptors_conv_16); }); return ret_hu_conv; } @@ -654,13 +721,21 @@ export class BumpTransactionEvent extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public eq(b: BumpTransactionEvent): boolean { - const ret: boolean = bindings.BumpTransactionEvent_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.BumpTransactionEvent_eq(this.ptr, CommonBase.get_ptr_of(b)); return ret; } } /** A BumpTransactionEvent of type ChannelClose */ export class BumpTransactionEvent_ChannelClose extends BumpTransactionEvent { + /** + * The `channel_id` of the channel which has been closed. + */ + public channel_id: ChannelId; + /** + * Counterparty in the closed channel. + */ + public counterparty_node_id: Uint8Array; /** * The unique identifier for the claim of the anchor output in the commitment transaction. * @@ -698,6 +773,13 @@ export class BumpTransactionEvent_ChannelClose extends BumpTransactionEvent { /* @internal */ public constructor(ptr: bigint) { super(null, ptr); + const channel_id: bigint = bindings.LDKBumpTransactionEvent_ChannelClose_get_channel_id(ptr); + const channel_id_hu_conv: ChannelId = new ChannelId(null, channel_id); + CommonBase.add_ref_from(channel_id_hu_conv, this); + this.channel_id = channel_id_hu_conv; + const counterparty_node_id: number = bindings.LDKBumpTransactionEvent_ChannelClose_get_counterparty_node_id(ptr); + const counterparty_node_id_conv: Uint8Array = bindings.decodeUint8Array(counterparty_node_id); + this.counterparty_node_id = counterparty_node_id_conv; const claim_id: number = bindings.LDKBumpTransactionEvent_ChannelClose_get_claim_id(ptr); const claim_id_conv: Uint8Array = bindings.decodeUint8Array(claim_id); this.claim_id = claim_id_conv; @@ -725,6 +807,14 @@ export class BumpTransactionEvent_ChannelClose extends BumpTransactionEvent { } /** A BumpTransactionEvent of type HTLCResolution */ export class BumpTransactionEvent_HTLCResolution extends BumpTransactionEvent { + /** + * The `channel_id` of the channel which has been closed. + */ + public channel_id: ChannelId; + /** + * Counterparty in the closed channel. + */ + public counterparty_node_id: Uint8Array; /** * The unique identifier for the claim of the HTLCs in the confirmed commitment * transaction. @@ -750,6 +840,13 @@ export class BumpTransactionEvent_HTLCResolution extends BumpTransactionEvent { /* @internal */ public constructor(ptr: bigint) { super(null, ptr); + const channel_id: bigint = bindings.LDKBumpTransactionEvent_HTLCResolution_get_channel_id(ptr); + const channel_id_hu_conv: ChannelId = new ChannelId(null, channel_id); + CommonBase.add_ref_from(channel_id_hu_conv, this); + this.channel_id = channel_id_hu_conv; + const counterparty_node_id: number = bindings.LDKBumpTransactionEvent_HTLCResolution_get_counterparty_node_id(ptr); + const counterparty_node_id_conv: Uint8Array = bindings.decodeUint8Array(counterparty_node_id); + this.counterparty_node_id = counterparty_node_id_conv; const claim_id: number = bindings.LDKBumpTransactionEvent_HTLCResolution_get_claim_id(ptr); const claim_id_conv: Uint8Array = bindings.decodeUint8Array(claim_id); this.claim_id = claim_id_conv; diff --git a/ts/structs/BumpTransactionEventHandler.mts b/ts/structs/BumpTransactionEventHandler.mts index 54fea4d2..c4c58dab 100644 --- a/ts/structs/BumpTransactionEventHandler.mts +++ b/ts/structs/BumpTransactionEventHandler.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -560,10 +620,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -578,8 +640,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -629,7 +694,7 @@ export class BumpTransactionEventHandler extends CommonBase { * Handles all variants of [`BumpTransactionEvent`]. */ public handle_event(event: BumpTransactionEvent): void { - bindings.BumpTransactionEventHandler_handle_event(this.ptr, event == null ? 0n : CommonBase.get_ptr_of(event)); + bindings.BumpTransactionEventHandler_handle_event(this.ptr, CommonBase.get_ptr_of(event)); } } diff --git a/ts/structs/CandidateRouteHop.mts b/ts/structs/CandidateRouteHop.mts index d26b9192..0101e1b8 100644 --- a/ts/structs/CandidateRouteHop.mts +++ b/ts/structs/CandidateRouteHop.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -636,7 +701,7 @@ export class CandidateRouteHop extends CommonBase { * Utility method to constructs a new FirstHop-variant CandidateRouteHop */ public static constructor_first_hop(a: FirstHopCandidate): CandidateRouteHop { - const ret: bigint = bindings.CandidateRouteHop_first_hop(a == null ? 0n : CommonBase.get_ptr_of(a)); + const ret: bigint = bindings.CandidateRouteHop_first_hop(CommonBase.get_ptr_of(a)); const ret_hu_conv: CandidateRouteHop = CandidateRouteHop.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, a); @@ -647,7 +712,7 @@ export class CandidateRouteHop extends CommonBase { * Utility method to constructs a new PublicHop-variant CandidateRouteHop */ public static constructor_public_hop(a: PublicHopCandidate): CandidateRouteHop { - const ret: bigint = bindings.CandidateRouteHop_public_hop(a == null ? 0n : CommonBase.get_ptr_of(a)); + const ret: bigint = bindings.CandidateRouteHop_public_hop(CommonBase.get_ptr_of(a)); const ret_hu_conv: CandidateRouteHop = CandidateRouteHop.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, a); @@ -658,7 +723,7 @@ export class CandidateRouteHop extends CommonBase { * Utility method to constructs a new PrivateHop-variant CandidateRouteHop */ public static constructor_private_hop(a: PrivateHopCandidate): CandidateRouteHop { - const ret: bigint = bindings.CandidateRouteHop_private_hop(a == null ? 0n : CommonBase.get_ptr_of(a)); + const ret: bigint = bindings.CandidateRouteHop_private_hop(CommonBase.get_ptr_of(a)); const ret_hu_conv: CandidateRouteHop = CandidateRouteHop.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, a); @@ -669,7 +734,7 @@ export class CandidateRouteHop extends CommonBase { * Utility method to constructs a new Blinded-variant CandidateRouteHop */ public static constructor_blinded(a: BlindedPathCandidate): CandidateRouteHop { - const ret: bigint = bindings.CandidateRouteHop_blinded(a == null ? 0n : CommonBase.get_ptr_of(a)); + const ret: bigint = bindings.CandidateRouteHop_blinded(CommonBase.get_ptr_of(a)); const ret_hu_conv: CandidateRouteHop = CandidateRouteHop.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, a); @@ -680,7 +745,7 @@ export class CandidateRouteHop extends CommonBase { * Utility method to constructs a new OneHopBlinded-variant CandidateRouteHop */ public static constructor_one_hop_blinded(a: OneHopBlindedPathCandidate): CandidateRouteHop { - const ret: bigint = bindings.CandidateRouteHop_one_hop_blinded(a == null ? 0n : CommonBase.get_ptr_of(a)); + const ret: bigint = bindings.CandidateRouteHop_one_hop_blinded(CommonBase.get_ptr_of(a)); const ret_hu_conv: CandidateRouteHop = CandidateRouteHop.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, a); diff --git a/ts/structs/ChainMonitor.mts b/ts/structs/ChainMonitor.mts index 5d5be4bc..acabdd83 100644 --- a/ts/structs/ChainMonitor.mts +++ b/ts/structs/ChainMonitor.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; import { FailureCode } from '../structs/FailureCode.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -653,7 +718,7 @@ export class ChainMonitor extends CommonBase { * inclusion in the return value. */ public get_claimable_balances(ignored_channels: ChannelDetails[]): Balance[] { - const ret: number = bindings.ChainMonitor_get_claimable_balances(this.ptr, bindings.encodeUint64Array(ignored_channels.map(ignored_channels_conv_16 => ignored_channels_conv_16 == null ? 0n : CommonBase.get_ptr_of(ignored_channels_conv_16)))); + const ret: number = bindings.ChainMonitor_get_claimable_balances(this.ptr, bindings.encodeUint64Array(ignored_channels.map(ignored_channels_conv_16 => CommonBase.get_ptr_of(ignored_channels_conv_16)))); const ret_conv_9_len: number = bindings.getArrayLength(ret); const ret_conv_9_arr: Balance[] = new Array(ret_conv_9_len).fill(null); for (var j = 0; j < ret_conv_9_len; j++) { @@ -675,30 +740,30 @@ export class ChainMonitor extends CommonBase { * indefinitely. */ public get_monitor(funding_txo: OutPoint): Result_LockedChannelMonitorNoneZ { - const ret: bigint = bindings.ChainMonitor_get_monitor(this.ptr, funding_txo == null ? 0n : CommonBase.get_ptr_of(funding_txo)); + const ret: bigint = bindings.ChainMonitor_get_monitor(this.ptr, CommonBase.get_ptr_of(funding_txo)); const ret_hu_conv: Result_LockedChannelMonitorNoneZ = Result_LockedChannelMonitorNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, funding_txo); return ret_hu_conv; } /** - * Lists the funding outpoint of each [`ChannelMonitor`] being monitored. + * Lists the funding outpoint and channel ID of each [`ChannelMonitor`] being monitored. * * Note that [`ChannelMonitor`]s are not removed when a channel is closed as they are always * monitoring for on-chain state resolutions. */ - public list_monitors(): OutPoint[] { + public list_monitors(): TwoTuple_OutPointChannelIdZ[] { const ret: number = bindings.ChainMonitor_list_monitors(this.ptr); - const ret_conv_10_len: number = bindings.getArrayLength(ret); - const ret_conv_10_arr: OutPoint[] = new Array(ret_conv_10_len).fill(null); - for (var k = 0; k < ret_conv_10_len; k++) { - const ret_conv_10: bigint = bindings.getU64ArrayElem(ret, k); - const ret_conv_10_hu_conv: OutPoint = new OutPoint(null, ret_conv_10); - CommonBase.add_ref_from(ret_conv_10_hu_conv, this); - ret_conv_10_arr[k] = ret_conv_10_hu_conv; + const ret_conv_29_len: number = bindings.getArrayLength(ret); + const ret_conv_29_arr: TwoTuple_OutPointChannelIdZ[] = new Array(ret_conv_29_len).fill(null); + for (var d = 0; d < ret_conv_29_len; d++) { + const ret_conv_29: bigint = bindings.getU64ArrayElem(ret, d); + const ret_conv_29_hu_conv: TwoTuple_OutPointChannelIdZ = new TwoTuple_OutPointChannelIdZ(null, ret_conv_29); + CommonBase.add_ref_from(ret_conv_29_hu_conv, this); + ret_conv_29_arr[d] = ret_conv_29_hu_conv; } bindings.freeWasmMemory(ret) - return ret_conv_10_arr; + return ret_conv_29_arr; } /** @@ -734,7 +799,7 @@ export class ChainMonitor extends CommonBase { * registered [`ChannelMonitor`]s. */ public channel_monitor_updated(funding_txo: OutPoint, completed_update_id: MonitorUpdateId): Result_NoneAPIErrorZ { - const ret: bigint = bindings.ChainMonitor_channel_monitor_updated(this.ptr, funding_txo == null ? 0n : CommonBase.get_ptr_of(funding_txo), completed_update_id == null ? 0n : CommonBase.get_ptr_of(completed_update_id)); + const ret: bigint = bindings.ChainMonitor_channel_monitor_updated(this.ptr, CommonBase.get_ptr_of(funding_txo), CommonBase.get_ptr_of(completed_update_id)); const ret_hu_conv: Result_NoneAPIErrorZ = Result_NoneAPIErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, funding_txo); CommonBase.add_ref_from(this, completed_update_id); @@ -769,6 +834,34 @@ export class ChainMonitor extends CommonBase { bindings.ChainMonitor_rebroadcast_pending_claims(this.ptr); } + /** + * Triggers rebroadcasts of pending claims from force-closed channels after a transaction + * signature generation failure. + * + * `monitor_opt` can be used as a filter to only trigger them for a specific channel monitor. + * + * Note that monitor_opt (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public signer_unblocked(monitor_opt: OutPoint|null): void { + bindings.ChainMonitor_signer_unblocked(this.ptr, monitor_opt == null ? 0n : CommonBase.get_ptr_of(monitor_opt)); + CommonBase.add_ref_from(this, monitor_opt); + } + + /** + * Archives fully resolved channel monitors by calling [`Persist::archive_persisted_channel`]. + * + * This is useful for pruning fully resolved monitors from the monitor set and primary + * storage so they are not kept in memory and reloaded on restart. + * + * Should be called occasionally (once every handful of blocks or on startup). + * + * Depending on the implementation of [`Persist::archive_persisted_channel`] the monitor + * data could be moved to an archive location or removed entirely. + */ + public archive_fully_resolved_channel_monitors(): void { + bindings.ChainMonitor_archive_fully_resolved_channel_monitors(this.ptr); + } + /** * Constructs a new Listen which calls the relevant methods on this_arg. * This copies the `inner` pointer in this_arg and thus the returned Listen must be freed before this_arg is diff --git a/ts/structs/ChainParameters.mts b/ts/structs/ChainParameters.mts index d60c1f5d..fc9ded2b 100644 --- a/ts/structs/ChainParameters.mts +++ b/ts/structs/ChainParameters.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { FailureCode } from '../structs/FailureCode.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -642,7 +707,7 @@ export class ChainParameters extends CommonBase { * Used to track on-chain channel funding outputs and send payments with reliable timelocks. */ public set_best_block(val: BestBlock): void { - bindings.ChainParameters_set_best_block(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.ChainParameters_set_best_block(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -650,7 +715,7 @@ export class ChainParameters extends CommonBase { * Constructs a new ChainParameters given each field */ public static constructor_new(network_arg: Network, best_block_arg: BestBlock): ChainParameters { - const ret: bigint = bindings.ChainParameters_new(network_arg, best_block_arg == null ? 0n : CommonBase.get_ptr_of(best_block_arg)); + const ret: bigint = bindings.ChainParameters_new(network_arg, CommonBase.get_ptr_of(best_block_arg)); const ret_hu_conv: ChainParameters = new ChainParameters(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, best_block_arg); diff --git a/ts/structs/ChangeDestinationSource.mts b/ts/structs/ChangeDestinationSource.mts new file mode 100644 index 00000000..8fa317ba --- /dev/null +++ b/ts/structs/ChangeDestinationSource.mts @@ -0,0 +1,729 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + + +/** An implementation of ChangeDestinationSource */ +export interface ChangeDestinationSourceInterface { + /**Returns a script pubkey which can be used as a change destination for + * [`OutputSpender::spend_spendable_outputs`]. + * + * This method should return a different value each time it is called, to avoid linking + * on-chain funds controlled to the same user. + */ + get_change_destination_script(): Result_CVec_u8ZNoneZ; +} + +class LDKChangeDestinationSourceHolder { + held: ChangeDestinationSource|null = null; +} + +/** + * A helper trait that describes an on-chain wallet capable of returning a (change) destination + * script. + */ +export class ChangeDestinationSource extends CommonBase { + /* @internal */ + public bindings_instance: bindings.LDKChangeDestinationSource|null; + + /* @internal */ + public instance_idx?: number; + + /* @internal */ + constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.ChangeDestinationSource_free); + this.bindings_instance = null; + } + + /** Creates a new instance of ChangeDestinationSource from a given implementation */ + public static new_impl(arg: ChangeDestinationSourceInterface): ChangeDestinationSource { + const impl_holder: LDKChangeDestinationSourceHolder = new LDKChangeDestinationSourceHolder(); + let structImplementation = { + get_change_destination_script (): bigint { + const ret: Result_CVec_u8ZNoneZ = arg.get_change_destination_script(); + const result: bigint = ret.clone_ptr(); + return result; + }, + } as bindings.LDKChangeDestinationSource; + const ptr_idx: [bigint, number] = bindings.LDKChangeDestinationSource_new(structImplementation); + + impl_holder.held = new ChangeDestinationSource(null, ptr_idx[0]); + impl_holder.held.instance_idx = ptr_idx[1]; + impl_holder.held.bindings_instance = structImplementation; + return impl_holder.held!; + } + + /** + * Returns a script pubkey which can be used as a change destination for + * [`OutputSpender::spend_spendable_outputs`]. + * + * This method should return a different value each time it is called, to avoid linking + * on-chain funds controlled to the same user. + */ + public get_change_destination_script(): Result_CVec_u8ZNoneZ { + const ret: bigint = bindings.ChangeDestinationSource_get_change_destination_script(this.ptr); + const ret_hu_conv: Result_CVec_u8ZNoneZ = Result_CVec_u8ZNoneZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/ts/structs/ChannelAnnouncement.mts b/ts/structs/ChannelAnnouncement.mts index d4cb8771..78c867b2 100644 --- a/ts/structs/ChannelAnnouncement.mts +++ b/ts/structs/ChannelAnnouncement.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -685,7 +750,7 @@ export class ChannelAnnouncement extends CommonBase { * The actual announcement */ public set_contents(val: UnsignedChannelAnnouncement): void { - bindings.ChannelAnnouncement_set_contents(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.ChannelAnnouncement_set_contents(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -693,7 +758,7 @@ export class ChannelAnnouncement extends CommonBase { * Constructs a new ChannelAnnouncement given each field */ public static constructor_new(node_signature_1_arg: Uint8Array, node_signature_2_arg: Uint8Array, bitcoin_signature_1_arg: Uint8Array, bitcoin_signature_2_arg: Uint8Array, contents_arg: UnsignedChannelAnnouncement): ChannelAnnouncement { - const ret: bigint = bindings.ChannelAnnouncement_new(bindings.encodeUint8Array(bindings.check_arr_len(node_signature_1_arg, 64)), bindings.encodeUint8Array(bindings.check_arr_len(node_signature_2_arg, 64)), bindings.encodeUint8Array(bindings.check_arr_len(bitcoin_signature_1_arg, 64)), bindings.encodeUint8Array(bindings.check_arr_len(bitcoin_signature_2_arg, 64)), contents_arg == null ? 0n : CommonBase.get_ptr_of(contents_arg)); + const ret: bigint = bindings.ChannelAnnouncement_new(bindings.encodeUint8Array(bindings.check_arr_len(node_signature_1_arg, 64)), bindings.encodeUint8Array(bindings.check_arr_len(node_signature_2_arg, 64)), bindings.encodeUint8Array(bindings.check_arr_len(bitcoin_signature_1_arg, 64)), bindings.encodeUint8Array(bindings.check_arr_len(bitcoin_signature_2_arg, 64)), CommonBase.get_ptr_of(contents_arg)); const ret_hu_conv: ChannelAnnouncement = new ChannelAnnouncement(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, contents_arg); @@ -729,7 +794,7 @@ export class ChannelAnnouncement extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: ChannelAnnouncement): boolean { - const ret: boolean = bindings.ChannelAnnouncement_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.ChannelAnnouncement_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/ChannelConfig.mts b/ts/structs/ChannelConfig.mts index 0d87ab5f..ed5b682d 100644 --- a/ts/structs/ChannelConfig.mts +++ b/ts/structs/ChannelConfig.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -720,13 +785,16 @@ export class ChannelConfig extends CommonBase { } /** - * Limit our total exposure to in-flight HTLCs which are burned to fees as they are too - * small to claim on-chain. + * Limit our total exposure to potential loss to on-chain fees on close, including in-flight + * HTLCs which are burned to fees as they are too small to claim on-chain and fees on + * commitment transaction(s) broadcasted by our counterparty in excess of our own fee estimate. + * + * # HTLC-based Dust Exposure * * When an HTLC present in one of our channels is below a \"dust\" threshold, the HTLC will * not be claimable on-chain, instead being turned into additional miner fees if either * party force-closes the channel. Because the threshold is per-HTLC, our total exposure - * to such payments may be sustantial if there are many dust HTLCs present when the + * to such payments may be substantial if there are many dust HTLCs present when the * channel is force-closed. * * The dust threshold for each HTLC is based on the `dust_limit_satoshis` for each party in a @@ -740,7 +808,37 @@ export class ChannelConfig extends CommonBase { * The selected limit is applied for sent, forwarded, and received HTLCs and limits the total * exposure across all three types per-channel. * - * Default value: [`MaxDustHTLCExposure::FeeRateMultiplier`] with a multiplier of 5000. + * # Transaction Fee Dust Exposure + * + * Further, counterparties broadcasting a commitment transaction in a force-close may result + * in other balance being burned to fees, and thus all fees on commitment and HTLC + * transactions in excess of our local fee estimates are included in the dust calculation. + * + * Because of this, another way to look at this limit is to divide it by 43,000 (or 218,750 + * for non-anchor channels) and see it as the maximum feerate disagreement (in sats/vB) per + * non-dust HTLC we're allowed to have with our peers before risking a force-closure for + * inbound channels. + * + * Thus, for the default value of 10_000 * a current feerate estimate of 10 sat/vB (or 2,500 + * sat/KW), we risk force-closure if we disagree with our peer by: + * `10_000 * 2_500 / 43_000 / (483*2)` = 0.6 sat/vB for anchor channels with 483 HTLCs in + * both directions (the maximum), + * `10_000 * 2_500 / 43_000 / (50*2)` = 5.8 sat/vB for anchor channels with 50 HTLCs in both + * directions (the LDK default max from [`ChannelHandshakeConfig::our_max_accepted_htlcs`]) + * `10_000 * 2_500 / 218_750 / (483*2)` = 0.1 sat/vB for non-anchor channels with 483 HTLCs + * in both directions (the maximum), + * `10_000 * 2_500 / 218_750 / (50*2)` = 1.1 sat/vB for non-anchor channels with 50 HTLCs + * in both (the LDK default maximum from [`ChannelHandshakeConfig::our_max_accepted_htlcs`]) + * + * Note that when using [`MaxDustHTLCExposure::FeeRateMultiplier`] this maximum disagreement + * will scale linearly with increases (or decreases) in the our feerate estimates. Further, + * for anchor channels we expect our counterparty to use a relatively low feerate estimate + * while we use [`ConfirmationTarget::OnChainSweep`] (which should be relatively high) and + * feerate disagreement force-closures should only occur when theirs is higher than ours. + * + * Default value: [`MaxDustHTLCExposure::FeeRateMultiplier`] with a multiplier of 10_000. + * + * [`ConfirmationTarget::OnChainSweep`]: crate::chain::chaininterface::ConfirmationTarget::OnChainSweep */ public get_max_dust_htlc_exposure(): MaxDustHTLCExposure { const ret: bigint = bindings.ChannelConfig_get_max_dust_htlc_exposure(this.ptr); @@ -750,13 +848,16 @@ export class ChannelConfig extends CommonBase { } /** - * Limit our total exposure to in-flight HTLCs which are burned to fees as they are too - * small to claim on-chain. + * Limit our total exposure to potential loss to on-chain fees on close, including in-flight + * HTLCs which are burned to fees as they are too small to claim on-chain and fees on + * commitment transaction(s) broadcasted by our counterparty in excess of our own fee estimate. + * + * # HTLC-based Dust Exposure * * When an HTLC present in one of our channels is below a \"dust\" threshold, the HTLC will * not be claimable on-chain, instead being turned into additional miner fees if either * party force-closes the channel. Because the threshold is per-HTLC, our total exposure - * to such payments may be sustantial if there are many dust HTLCs present when the + * to such payments may be substantial if there are many dust HTLCs present when the * channel is force-closed. * * The dust threshold for each HTLC is based on the `dust_limit_satoshis` for each party in a @@ -770,7 +871,37 @@ export class ChannelConfig extends CommonBase { * The selected limit is applied for sent, forwarded, and received HTLCs and limits the total * exposure across all three types per-channel. * - * Default value: [`MaxDustHTLCExposure::FeeRateMultiplier`] with a multiplier of 5000. + * # Transaction Fee Dust Exposure + * + * Further, counterparties broadcasting a commitment transaction in a force-close may result + * in other balance being burned to fees, and thus all fees on commitment and HTLC + * transactions in excess of our local fee estimates are included in the dust calculation. + * + * Because of this, another way to look at this limit is to divide it by 43,000 (or 218,750 + * for non-anchor channels) and see it as the maximum feerate disagreement (in sats/vB) per + * non-dust HTLC we're allowed to have with our peers before risking a force-closure for + * inbound channels. + * + * Thus, for the default value of 10_000 * a current feerate estimate of 10 sat/vB (or 2,500 + * sat/KW), we risk force-closure if we disagree with our peer by: + * `10_000 * 2_500 / 43_000 / (483*2)` = 0.6 sat/vB for anchor channels with 483 HTLCs in + * both directions (the maximum), + * `10_000 * 2_500 / 43_000 / (50*2)` = 5.8 sat/vB for anchor channels with 50 HTLCs in both + * directions (the LDK default max from [`ChannelHandshakeConfig::our_max_accepted_htlcs`]) + * `10_000 * 2_500 / 218_750 / (483*2)` = 0.1 sat/vB for non-anchor channels with 483 HTLCs + * in both directions (the maximum), + * `10_000 * 2_500 / 218_750 / (50*2)` = 1.1 sat/vB for non-anchor channels with 50 HTLCs + * in both (the LDK default maximum from [`ChannelHandshakeConfig::our_max_accepted_htlcs`]) + * + * Note that when using [`MaxDustHTLCExposure::FeeRateMultiplier`] this maximum disagreement + * will scale linearly with increases (or decreases) in the our feerate estimates. Further, + * for anchor channels we expect our counterparty to use a relatively low feerate estimate + * while we use [`ConfirmationTarget::OnChainSweep`] (which should be relatively high) and + * feerate disagreement force-closures should only occur when theirs is higher than ours. + * + * Default value: [`MaxDustHTLCExposure::FeeRateMultiplier`] with a multiplier of 10_000. + * + * [`ConfirmationTarget::OnChainSweep`]: crate::chain::chaininterface::ConfirmationTarget::OnChainSweep */ public set_max_dust_htlc_exposure(val: MaxDustHTLCExposure): void { bindings.ChannelConfig_set_max_dust_htlc_exposure(this.ptr, CommonBase.get_ptr_of(val)); @@ -941,7 +1072,7 @@ export class ChannelConfig extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: ChannelConfig): boolean { - const ret: boolean = bindings.ChannelConfig_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.ChannelConfig_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } @@ -950,7 +1081,7 @@ export class ChannelConfig extends CommonBase { * Applies the given [`ChannelConfigUpdate`] as a partial update to the [`ChannelConfig`]. */ public apply(update: ChannelConfigUpdate): void { - bindings.ChannelConfig_apply(this.ptr, update == null ? 0n : CommonBase.get_ptr_of(update)); + bindings.ChannelConfig_apply(this.ptr, CommonBase.get_ptr_of(update)); CommonBase.add_ref_from(this, update); } diff --git a/ts/structs/ChannelConfigUpdate.mts b/ts/structs/ChannelConfigUpdate.mts index 6b68ddb5..627052a9 100644 --- a/ts/structs/ChannelConfigUpdate.mts +++ b/ts/structs/ChannelConfigUpdate.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,14 +583,14 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/ChannelCounterparty.mts b/ts/structs/ChannelCounterparty.mts index 172f6cde..18a9e2ed 100644 --- a/ts/structs/ChannelCounterparty.mts +++ b/ts/structs/ChannelCounterparty.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -640,7 +705,7 @@ export class ChannelCounterparty extends CommonBase { * many routing-relevant features are present in the init context. */ public set_features(val: InitFeatures): void { - bindings.ChannelCounterparty_set_features(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.ChannelCounterparty_set_features(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -741,7 +806,7 @@ export class ChannelCounterparty extends CommonBase { * Note that forwarding_info_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ public static constructor_new(node_id_arg: Uint8Array, features_arg: InitFeatures, unspendable_punishment_reserve_arg: bigint, forwarding_info_arg: CounterpartyForwardingInfo|null, outbound_htlc_minimum_msat_arg: Option_u64Z, outbound_htlc_maximum_msat_arg: Option_u64Z): ChannelCounterparty { - const ret: bigint = bindings.ChannelCounterparty_new(bindings.encodeUint8Array(bindings.check_arr_len(node_id_arg, 33)), features_arg == null ? 0n : CommonBase.get_ptr_of(features_arg), unspendable_punishment_reserve_arg, forwarding_info_arg == null ? 0n : CommonBase.get_ptr_of(forwarding_info_arg), CommonBase.get_ptr_of(outbound_htlc_minimum_msat_arg), CommonBase.get_ptr_of(outbound_htlc_maximum_msat_arg)); + const ret: bigint = bindings.ChannelCounterparty_new(bindings.encodeUint8Array(bindings.check_arr_len(node_id_arg, 33)), CommonBase.get_ptr_of(features_arg), unspendable_punishment_reserve_arg, forwarding_info_arg == null ? 0n : CommonBase.get_ptr_of(forwarding_info_arg), CommonBase.get_ptr_of(outbound_htlc_minimum_msat_arg), CommonBase.get_ptr_of(outbound_htlc_maximum_msat_arg)); const ret_hu_conv: ChannelCounterparty = new ChannelCounterparty(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, features_arg); diff --git a/ts/structs/ChannelDerivationParameters.mts b/ts/structs/ChannelDerivationParameters.mts index 9752e574..54a25cf8 100644 --- a/ts/structs/ChannelDerivationParameters.mts +++ b/ts/structs/ChannelDerivationParameters.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -652,7 +717,7 @@ export class ChannelDerivationParameters extends CommonBase { * [`ChannelSigner::provide_channel_parameters`]. */ public set_transaction_parameters(val: ChannelTransactionParameters): void { - bindings.ChannelDerivationParameters_set_transaction_parameters(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.ChannelDerivationParameters_set_transaction_parameters(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -660,7 +725,7 @@ export class ChannelDerivationParameters extends CommonBase { * Constructs a new ChannelDerivationParameters given each field */ public static constructor_new(value_satoshis_arg: bigint, keys_id_arg: Uint8Array, transaction_parameters_arg: ChannelTransactionParameters): ChannelDerivationParameters { - const ret: bigint = bindings.ChannelDerivationParameters_new(value_satoshis_arg, bindings.encodeUint8Array(bindings.check_arr_len(keys_id_arg, 32)), transaction_parameters_arg == null ? 0n : CommonBase.get_ptr_of(transaction_parameters_arg)); + const ret: bigint = bindings.ChannelDerivationParameters_new(value_satoshis_arg, bindings.encodeUint8Array(bindings.check_arr_len(keys_id_arg, 32)), CommonBase.get_ptr_of(transaction_parameters_arg)); const ret_hu_conv: ChannelDerivationParameters = new ChannelDerivationParameters(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, transaction_parameters_arg); @@ -688,7 +753,7 @@ export class ChannelDerivationParameters extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: ChannelDerivationParameters): boolean { - const ret: boolean = bindings.ChannelDerivationParameters_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.ChannelDerivationParameters_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/ChannelDetails.mts b/ts/structs/ChannelDetails.mts index b5f4ebe9..7f121b57 100644 --- a/ts/structs/ChannelDetails.mts +++ b/ts/structs/ChannelDetails.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -611,10 +676,11 @@ export class ChannelDetails extends CommonBase { * Note that this means this value is *not* persistent - it can change once during the * lifetime of the channel. */ - public get_channel_id(): Uint8Array { - const ret: number = bindings.ChannelDetails_get_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public get_channel_id(): ChannelId { + const ret: bigint = bindings.ChannelDetails_get_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** @@ -623,8 +689,9 @@ export class ChannelDetails extends CommonBase { * Note that this means this value is *not* persistent - it can change once during the * lifetime of the channel. */ - public set_channel_id(val: Uint8Array): void { - bindings.ChannelDetails_set_channel_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + public set_channel_id(val: ChannelId): void { + bindings.ChannelDetails_set_channel_id(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** @@ -641,7 +708,7 @@ export class ChannelDetails extends CommonBase { * Parameters which apply to our counterparty. See individual fields for more information. */ public set_counterparty(val: ChannelCounterparty): void { - bindings.ChannelDetails_set_counterparty(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.ChannelDetails_set_counterparty(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -649,9 +716,6 @@ export class ChannelDetails extends CommonBase { * The Channel's funding transaction output, if we've negotiated the funding transaction with * our counterparty already. * - * Note that, if this has been set, `channel_id` will be equivalent to - * `funding_txo.unwrap().to_channel_id()`. - * * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ public get_funding_txo(): OutPoint { @@ -665,9 +729,6 @@ export class ChannelDetails extends CommonBase { * The Channel's funding transaction output, if we've negotiated the funding transaction with * our counterparty already. * - * Note that, if this has been set, `channel_id` will be equivalent to - * `funding_txo.unwrap().to_channel_id()`. - * * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None */ public set_funding_txo(val: OutPoint|null): void { @@ -1317,35 +1378,6 @@ export class ChannelDetails extends CommonBase { CommonBase.add_ref_from(this, val); } - /** - * Constructs a new ChannelDetails given each field - * - * Note that funding_txo_arg (or a relevant inner pointer) may be NULL or all-0s to represent None - * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None - * Note that config_arg (or a relevant inner pointer) may be NULL or all-0s to represent None - */ - public static constructor_new(channel_id_arg: Uint8Array, counterparty_arg: ChannelCounterparty, funding_txo_arg: OutPoint|null, channel_type_arg: ChannelTypeFeatures|null, short_channel_id_arg: Option_u64Z, outbound_scid_alias_arg: Option_u64Z, inbound_scid_alias_arg: Option_u64Z, channel_value_satoshis_arg: bigint, unspendable_punishment_reserve_arg: Option_u64Z, user_channel_id_arg: bigint, feerate_sat_per_1000_weight_arg: Option_u32Z, balance_msat_arg: bigint, outbound_capacity_msat_arg: bigint, next_outbound_htlc_limit_msat_arg: bigint, next_outbound_htlc_minimum_msat_arg: bigint, inbound_capacity_msat_arg: bigint, confirmations_required_arg: Option_u32Z, confirmations_arg: Option_u32Z, force_close_spend_delay_arg: Option_u16Z, is_outbound_arg: boolean, is_channel_ready_arg: boolean, channel_shutdown_state_arg: Option_ChannelShutdownStateZ, is_usable_arg: boolean, is_public_arg: boolean, inbound_htlc_minimum_msat_arg: Option_u64Z, inbound_htlc_maximum_msat_arg: Option_u64Z, config_arg: ChannelConfig|null): ChannelDetails { - const ret: bigint = bindings.ChannelDetails_new(bindings.encodeUint8Array(bindings.check_arr_len(channel_id_arg, 32)), counterparty_arg == null ? 0n : CommonBase.get_ptr_of(counterparty_arg), funding_txo_arg == null ? 0n : CommonBase.get_ptr_of(funding_txo_arg), channel_type_arg == null ? 0n : CommonBase.get_ptr_of(channel_type_arg), CommonBase.get_ptr_of(short_channel_id_arg), CommonBase.get_ptr_of(outbound_scid_alias_arg), CommonBase.get_ptr_of(inbound_scid_alias_arg), channel_value_satoshis_arg, CommonBase.get_ptr_of(unspendable_punishment_reserve_arg), bindings.encodeUint128(user_channel_id_arg), CommonBase.get_ptr_of(feerate_sat_per_1000_weight_arg), balance_msat_arg, outbound_capacity_msat_arg, next_outbound_htlc_limit_msat_arg, next_outbound_htlc_minimum_msat_arg, inbound_capacity_msat_arg, CommonBase.get_ptr_of(confirmations_required_arg), CommonBase.get_ptr_of(confirmations_arg), CommonBase.get_ptr_of(force_close_spend_delay_arg), is_outbound_arg, is_channel_ready_arg, CommonBase.get_ptr_of(channel_shutdown_state_arg), is_usable_arg, is_public_arg, CommonBase.get_ptr_of(inbound_htlc_minimum_msat_arg), CommonBase.get_ptr_of(inbound_htlc_maximum_msat_arg), config_arg == null ? 0n : CommonBase.get_ptr_of(config_arg)); - const ret_hu_conv: ChannelDetails = new ChannelDetails(null, ret); - CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); - CommonBase.add_ref_from(ret_hu_conv, counterparty_arg); - CommonBase.add_ref_from(ret_hu_conv, funding_txo_arg); - CommonBase.add_ref_from(ret_hu_conv, channel_type_arg); - CommonBase.add_ref_from(ret_hu_conv, short_channel_id_arg); - CommonBase.add_ref_from(ret_hu_conv, outbound_scid_alias_arg); - CommonBase.add_ref_from(ret_hu_conv, inbound_scid_alias_arg); - CommonBase.add_ref_from(ret_hu_conv, unspendable_punishment_reserve_arg); - CommonBase.add_ref_from(ret_hu_conv, feerate_sat_per_1000_weight_arg); - CommonBase.add_ref_from(ret_hu_conv, confirmations_required_arg); - CommonBase.add_ref_from(ret_hu_conv, confirmations_arg); - CommonBase.add_ref_from(ret_hu_conv, force_close_spend_delay_arg); - CommonBase.add_ref_from(ret_hu_conv, channel_shutdown_state_arg); - CommonBase.add_ref_from(ret_hu_conv, inbound_htlc_minimum_msat_arg); - CommonBase.add_ref_from(ret_hu_conv, inbound_htlc_maximum_msat_arg); - CommonBase.add_ref_from(ret_hu_conv, config_arg); - return ret_hu_conv; - } - public clone_ptr(): bigint { const ret: bigint = bindings.ChannelDetails_clone_ptr(this.ptr); return ret; diff --git a/ts/structs/ChannelFeatures.mts b/ts/structs/ChannelFeatures.mts index 77363531..1e63923f 100644 --- a/ts/structs/ChannelFeatures.mts +++ b/ts/structs/ChannelFeatures.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -611,7 +676,7 @@ export class ChannelFeatures extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: ChannelFeatures): boolean { - const ret: boolean = bindings.ChannelFeatures_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.ChannelFeatures_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } @@ -653,7 +718,7 @@ export class ChannelFeatures extends CommonBase { * Returns true if this `Features` object contains required features unknown by `other`. */ public requires_unknown_bits_from(other: ChannelFeatures): boolean { - const ret: boolean = bindings.ChannelFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0n : CommonBase.get_ptr_of(other)); + const ret: boolean = bindings.ChannelFeatures_requires_unknown_bits_from(this.ptr, CommonBase.get_ptr_of(other)); CommonBase.add_ref_from(this, other); return ret; } diff --git a/ts/structs/ChannelHandshakeConfig.mts b/ts/structs/ChannelHandshakeConfig.mts index 44cebc33..0a2e0930 100644 --- a/ts/structs/ChannelHandshakeConfig.mts +++ b/ts/structs/ChannelHandshakeConfig.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,14 +583,14 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/ChannelHandshakeLimits.mts b/ts/structs/ChannelHandshakeLimits.mts index 24e61f9c..5138d4c4 100644 --- a/ts/structs/ChannelHandshakeLimits.mts +++ b/ts/structs/ChannelHandshakeLimits.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,14 +583,14 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/ChannelId.mts b/ts/structs/ChannelId.mts new file mode 100644 index 00000000..bfab73b3 --- /dev/null +++ b/ts/structs/ChannelId.mts @@ -0,0 +1,839 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + +/** + * A unique 32-byte identifier for a channel. + * Depending on how the ID is generated, several varieties are distinguished + * (but all are stored as 32 bytes): + * _v1_ and _temporary_. + * A _v1_ channel ID is generated based on funding tx outpoint (txid & index). + * A _temporary_ ID is generated randomly. + * (Later revocation-point-based _v2_ is a possibility.) + * The variety (context) is not stored, it is relevant only at creation. + */ +export class ChannelId extends CommonBase { + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.ChannelId_free); + } + + public get_a(): Uint8Array { + const ret: number = bindings.ChannelId_get_a(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + + public set_a(val: Uint8Array): void { + bindings.ChannelId_set_a(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + } + + /** + * Constructs a new ChannelId given each field + */ + public static constructor_new(a_arg: Uint8Array): ChannelId { + const ret: bigint = bindings.ChannelId_new(bindings.encodeUint8Array(bindings.check_arr_len(a_arg, 32))); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + return ret_hu_conv; + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.ChannelId_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a copy of the ChannelId + */ + public clone(): ChannelId { + const ret: bigint = bindings.ChannelId_clone(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * Checks if two ChannelIds contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ + public eq(b: ChannelId): boolean { + const ret: boolean = bindings.ChannelId_eq(this.ptr, CommonBase.get_ptr_of(b)); + CommonBase.add_ref_from(this, b); + return ret; + } + + /** + * Generates a non-cryptographic 64-bit hash of the ChannelId. + */ + public hash(): bigint { + const ret: bigint = bindings.ChannelId_hash(this.ptr); + return ret; + } + + /** + * Create _v1_ channel ID based on a funding TX ID and output index + */ + public static constructor_v1_from_funding_txid(txid: Uint8Array, output_index: number): ChannelId { + const ret: bigint = bindings.ChannelId_v1_from_funding_txid(bindings.encodeUint8Array(bindings.check_arr_len(txid, 32)), output_index); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + return ret_hu_conv; + } + + /** + * Create _v1_ channel ID from a funding tx outpoint + */ + public static constructor_v1_from_funding_outpoint(outpoint: OutPoint): ChannelId { + const ret: bigint = bindings.ChannelId_v1_from_funding_outpoint(CommonBase.get_ptr_of(outpoint)); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, outpoint); + return ret_hu_conv; + } + + /** + * Create a _temporary_ channel ID randomly, based on an entropy source. + */ + public static constructor_temporary_from_entropy_source(entropy_source: EntropySource): ChannelId { + const ret: bigint = bindings.ChannelId_temporary_from_entropy_source(CommonBase.get_ptr_of(entropy_source)); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, entropy_source); + return ret_hu_conv; + } + + /** + * Generic constructor; create a new channel ID from the provided data. + * Use a more specific `*_from_*` constructor when possible. + */ + public static constructor_from_bytes(data: Uint8Array): ChannelId { + const ret: bigint = bindings.ChannelId_from_bytes(bindings.encodeUint8Array(bindings.check_arr_len(data, 32))); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + return ret_hu_conv; + } + + /** + * Create a channel ID consisting of all-zeros data (e.g. when uninitialized or a placeholder). + */ + public static constructor_new_zero(): ChannelId { + const ret: bigint = bindings.ChannelId_new_zero(); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + return ret_hu_conv; + } + + /** + * Check whether ID is consisting of all zeros (uninitialized) + */ + public is_zero(): boolean { + const ret: boolean = bindings.ChannelId_is_zero(this.ptr); + return ret; + } + + /** + * Create _v2_ channel ID by concatenating the holder revocation basepoint with the counterparty + * revocation basepoint and hashing the result. The basepoints will be concatenated in increasing + * sorted order. + */ + public static constructor_v2_from_revocation_basepoints(ours: RevocationBasepoint, theirs: RevocationBasepoint): ChannelId { + const ret: bigint = bindings.ChannelId_v2_from_revocation_basepoints(CommonBase.get_ptr_of(ours), CommonBase.get_ptr_of(theirs)); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, ours); + CommonBase.add_ref_from(ret_hu_conv, theirs); + return ret_hu_conv; + } + + /** + * Create temporary _v2_ channel ID by concatenating a zeroed out basepoint with the holder + * revocation basepoint and hashing the result. + */ + public static constructor_temporary_v2_from_revocation_basepoint(our_revocation_basepoint: RevocationBasepoint): ChannelId { + const ret: bigint = bindings.ChannelId_temporary_v2_from_revocation_basepoint(CommonBase.get_ptr_of(our_revocation_basepoint)); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, our_revocation_basepoint); + return ret_hu_conv; + } + + /** + * Serialize the ChannelId object into a byte array which can be read by ChannelId_read + */ + public write(): Uint8Array { + const ret: number = bindings.ChannelId_write(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Read a ChannelId from a byte array, created by ChannelId_write + */ + public static constructor_read(ser: Uint8Array): Result_ChannelIdDecodeErrorZ { + const ret: bigint = bindings.ChannelId_read(bindings.encodeUint8Array(ser)); + const ret_hu_conv: Result_ChannelIdDecodeErrorZ = Result_ChannelIdDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/ts/structs/ChannelInfo.mts b/ts/structs/ChannelInfo.mts index 4263cc5a..c2068a13 100644 --- a/ts/structs/ChannelInfo.mts +++ b/ts/structs/ChannelInfo.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -620,7 +685,7 @@ export class ChannelInfo extends CommonBase { * Protocol features of a channel communicated during its announcement */ public set_features(val: ChannelFeatures): void { - bindings.ChannelInfo_set_features(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.ChannelInfo_set_features(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -638,7 +703,7 @@ export class ChannelInfo extends CommonBase { * Source node of the first direction of a channel */ public set_node_one(val: NodeId): void { - bindings.ChannelInfo_set_node_one(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.ChannelInfo_set_node_one(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -678,7 +743,7 @@ export class ChannelInfo extends CommonBase { * Source node of the second direction of a channel */ public set_node_two(val: NodeId): void { - bindings.ChannelInfo_set_node_two(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.ChannelInfo_set_node_two(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -771,7 +836,7 @@ export class ChannelInfo extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: ChannelInfo): boolean { - const ret: boolean = bindings.ChannelInfo_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.ChannelInfo_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/ChannelManager.mts b/ts/structs/ChannelManager.mts index 90ec989e..8496b2fb 100644 --- a/ts/structs/ChannelManager.mts +++ b/ts/structs/ChannelManager.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -597,11 +662,629 @@ import * as bindings from '../bindings.mjs' /** - * Manager which keeps track of a number of channels and sends messages to the appropriate - * channel, also tracking HTLC preimages and forwarding onion packets appropriately. + * A lightning node's channel state machine and payment management logic, which facilitates + * sending, forwarding, and receiving payments through lightning channels. + * + * [`ChannelManager`] is parameterized by a number of components to achieve this. + * - [`chain::Watch`] (typically [`ChainMonitor`]) for on-chain monitoring and enforcement of each + * channel + * - [`BroadcasterInterface`] for broadcasting transactions related to opening, funding, and + * closing channels + * - [`EntropySource`] for providing random data needed for cryptographic operations + * - [`NodeSigner`] for cryptographic operations scoped to the node + * - [`SignerProvider`] for providing signers whose operations are scoped to individual channels + * - [`FeeEstimator`] to determine transaction fee rates needed to have a transaction mined in a + * timely manner + * - [`Router`] for finding payment paths when initiating and retrying payments + * - [`Logger`] for logging operational information of varying degrees + * + * Additionally, it implements the following traits: + * - [`ChannelMessageHandler`] to handle off-chain channel activity from peers + * - [`MessageSendEventsProvider`] to similarly send such messages to peers + * - [`OffersMessageHandler`] for BOLT 12 message handling and sending + * - [`EventsProvider`] to generate user-actionable [`Event`]s + * - [`chain::Listen`] and [`chain::Confirm`] for notification of on-chain activity + * + * Thus, [`ChannelManager`] is typically used to parameterize a [`MessageHandler`] and an + * [`OnionMessenger`]. The latter is required to support BOLT 12 functionality. + * + * # `ChannelManager` vs `ChannelMonitor` + * + * It's important to distinguish between the *off-chain* management and *on-chain* enforcement of + * lightning channels. [`ChannelManager`] exchanges messages with peers to manage the off-chain + * state of each channel. During this process, it generates a [`ChannelMonitor`] for each channel + * and a [`ChannelMonitorUpdate`] for each relevant change, notifying its parameterized + * [`chain::Watch`] of them. + * + * An implementation of [`chain::Watch`], such as [`ChainMonitor`], is responsible for aggregating + * these [`ChannelMonitor`]s and applying any [`ChannelMonitorUpdate`]s to them. It then monitors + * for any pertinent on-chain activity, enforcing claims as needed. + * + * This division of off-chain management and on-chain enforcement allows for interesting node + * setups. For instance, on-chain enforcement could be moved to a separate host or have added + * redundancy, possibly as a watchtower. See [`chain::Watch`] for the relevant interface. + * + * # Initialization + * + * Use [`ChannelManager::new`] with the most recent [`BlockHash`] when creating a fresh instance. + * Otherwise, if restarting, construct [`ChannelManagerReadArgs`] with the necessary parameters and + * references to any deserialized [`ChannelMonitor`]s that were previously persisted. Use this to + * deserialize the [`ChannelManager`] and feed it any new chain data since it was last online, as + * detailed in the [`ChannelManagerReadArgs`] documentation. + * + * ``` + * use bitcoin::BlockHash; + * use bitcoin::network::constants::Network; + * use lightning::chain::BestBlock; + * # use lightning::chain::channelmonitor::ChannelMonitor; + * use lightning::ln::channelmanager::{ChainParameters, ChannelManager, ChannelManagerReadArgs}; + * # use lightning::routing::gossip::NetworkGraph; + * use lightning::util::config::UserConfig; + * use lightning::util::ser::ReadableArgs; + * + * # fn read_channel_monitors() -> Vec> { vec![] } + * # fn example< + * # 'a, + * # L: lightning::util::logger::Logger, + * # ES: lightning::sign::EntropySource, + * # S: for <'b> lightning::routing::scoring::LockableScore<'b, ScoreLookUp = SL>, + * # SL: lightning::routing::scoring::ScoreLookUp, + * # SP: Sized, + * # R: lightning::io::Read, + * # >( + * # fee_estimator: &dyn lightning::chain::chaininterface::FeeEstimator, + * # chain_monitor: &dyn lightning::chain::Watch, + * # tx_broadcaster: &dyn lightning::chain::chaininterface::BroadcasterInterface, + * # router: &lightning::routing::router::DefaultRouter<&NetworkGraph<&'a L>, &'a L, &ES, &S, SP, SL>, + * # logger: &L, + * # entropy_source: &ES, + * # node_signer: &dyn lightning::sign::NodeSigner, + * # signer_provider: &lightning::sign::DynSignerProvider, + * # best_block: lightning::chain::BestBlock, + * # current_timestamp: u32, + * # mut reader: R, + * # ) -> Result<(), lightning::ln::msgs::DecodeError> { + * Fresh start with no channels + * let params = ChainParameters { + * network: Network::Bitcoin, + * best_block, + * }; + * let default_config = UserConfig::default(); + * let channel_manager = ChannelManager::new( + * fee_estimator, chain_monitor, tx_broadcaster, router, logger, entropy_source, node_signer, + * signer_provider, default_config, params, current_timestamp + * ); + * + * Restart from deserialized data + * let mut channel_monitors = read_channel_monitors(); + * let args = ChannelManagerReadArgs::new( + * entropy_source, node_signer, signer_provider, fee_estimator, chain_monitor, tx_broadcaster, + * router, logger, default_config, channel_monitors.iter_mut().collect() + * ); + * let (block_hash, channel_manager) = + * <(BlockHash, ChannelManager<_, _, _, _, _, _, _, _>)>::read(&mut reader, args)?; + * + * Update the ChannelManager and ChannelMonitors with the latest chain data + * ... + * + * Move the monitors to the ChannelManager's chain::Watch parameter + * for monitor in channel_monitors { + * chain_monitor.watch_channel(monitor.get_funding_txo().0, monitor); + * } + * # Ok(()) + * # } + * ``` + * + * # Operation + * + * The following is required for [`ChannelManager`] to function properly: + * - Handle messages from peers using its [`ChannelMessageHandler`] implementation (typically + * called by [`PeerManager::read_event`] when processing network I/O) + * - Send messages to peers obtained via its [`MessageSendEventsProvider`] implementation + * (typically initiated when [`PeerManager::process_events`] is called) + * - Feed on-chain activity using either its [`chain::Listen`] or [`chain::Confirm`] implementation + * as documented by those traits + * - Perform any periodic channel and payment checks by calling [`timer_tick_occurred`] roughly + * every minute + * - Persist to disk whenever [`get_and_clear_needs_persistence`] returns `true` using a + * [`Persister`] such as a [`KVStore`] implementation + * - Handle [`Event`]s obtained via its [`EventsProvider`] implementation + * + * The [`Future`] returned by [`get_event_or_persistence_needed_future`] is useful in determining + * when the last two requirements need to be checked. + * + * The [`lightning-block-sync`] and [`lightning-transaction-sync`] crates provide utilities that + * simplify feeding in on-chain activity using the [`chain::Listen`] and [`chain::Confirm`] traits, + * respectively. The remaining requirements can be met using the [`lightning-background-processor`] + * crate. For languages other than Rust, the availability of similar utilities may vary. + * + * # Channels + * + * [`ChannelManager`]'s primary function involves managing a channel state. Without channels, + * payments can't be sent. Use [`list_channels`] or [`list_usable_channels`] for a snapshot of the + * currently open channels. + * + * ``` + * # use lightning::ln::channelmanager::AChannelManager; + * # + * # fn example(channel_manager: T) { + * # let channel_manager = channel_manager.get_cm(); + * let channels = channel_manager.list_usable_channels(); + * for details in channels { + * println!(\"{:?}\", details); + * } + * # } + * ``` + * + * Each channel is identified using a [`ChannelId`], which will change throughout the channel's + * life cycle. Additionally, channels are assigned a `user_channel_id`, which is given in + * [`Event`]s associated with the channel and serves as a fixed identifier but is otherwise unused + * by [`ChannelManager`]. + * + * ## Opening Channels + * + * To an open a channel with a peer, call [`create_channel`]. This will initiate the process of + * opening an outbound channel, which requires self-funding when handling + * [`Event::FundingGenerationReady`]. + * + * ``` + * # use bitcoin::{ScriptBuf, Transaction}; + * # use bitcoin::secp256k1::PublicKey; + * # use lightning::ln::channelmanager::AChannelManager; + * # use lightning::events::{Event, EventsProvider}; + * # + * # trait Wallet { + * # fn create_funding_transaction( + * # &self, _amount_sats: u64, _output_script: ScriptBuf + * # ) -> Transaction; + * # } + * # + * # fn example(channel_manager: T, wallet: W, peer_id: PublicKey) { + * # let channel_manager = channel_manager.get_cm(); + * let value_sats = 1_000_000; + * let push_msats = 10_000_000; + * match channel_manager.create_channel(peer_id, value_sats, push_msats, 42, None, None) { + * Ok(channel_id) => println!(\"Opening channel {}\", channel_id), + * Err(e) => println!(\"Error opening channel: {:?}\", e), + * } + * + * On the event processing thread once the peer has responded + * channel_manager.process_pending_events(&|event| match event { + * Event::FundingGenerationReady { + * temporary_channel_id, counterparty_node_id, channel_value_satoshis, output_script, + * user_channel_id, .. + * } => { + * assert_eq!(user_channel_id, 42); + * let funding_transaction = wallet.create_funding_transaction( + * channel_value_satoshis, output_script + * ); + * match channel_manager.funding_transaction_generated( + * &temporary_channel_id, &counterparty_node_id, funding_transaction + * ) { + * Ok(()) => println!(\"Funding channel {}\", temporary_channel_id), + * Err(e) => println!(\"Error funding channel {}: {:?}\", temporary_channel_id, e), + * } + * }, + * Event::ChannelPending { channel_id, user_channel_id, former_temporary_channel_id, .. } => { + * assert_eq!(user_channel_id, 42); + * println!( + * \"Channel {} now {} pending (funding transaction has been broadcasted)\", channel_id, + * former_temporary_channel_id.unwrap() + * ); + * }, + * Event::ChannelReady { channel_id, user_channel_id, .. } => { + * assert_eq!(user_channel_id, 42); + * println!(\"Channel {} ready\", channel_id); + * }, + * ... + * # _ => {}, + * }); + * # } + * ``` + * + * ## Accepting Channels + * + * Inbound channels are initiated by peers and are automatically accepted unless [`ChannelManager`] + * has [`UserConfig::manually_accept_inbound_channels`] set. In that case, the channel may be + * either accepted or rejected when handling [`Event::OpenChannelRequest`]. + * + * ``` + * # use bitcoin::secp256k1::PublicKey; + * # use lightning::ln::channelmanager::AChannelManager; + * # use lightning::events::{Event, EventsProvider}; + * # + * # fn is_trusted(counterparty_node_id: PublicKey) -> bool { + * # // ... + * # unimplemented!() + * # } + * # + * # fn example(channel_manager: T) { + * # let channel_manager = channel_manager.get_cm(); + * channel_manager.process_pending_events(&|event| match event { + * Event::OpenChannelRequest { temporary_channel_id, counterparty_node_id, .. } => { + * if !is_trusted(counterparty_node_id) { + * match channel_manager.force_close_without_broadcasting_txn( + * &temporary_channel_id, &counterparty_node_id + * ) { + * Ok(()) => println!(\"Rejecting channel {}\", temporary_channel_id), + * Err(e) => println!(\"Error rejecting channel {}: {:?}\", temporary_channel_id, e), + * } + * return; + * } + * + * let user_channel_id = 43; + * match channel_manager.accept_inbound_channel( + * &temporary_channel_id, &counterparty_node_id, user_channel_id + * ) { + * Ok(()) => println!(\"Accepting channel {}\", temporary_channel_id), + * Err(e) => println!(\"Error accepting channel {}: {:?}\", temporary_channel_id, e), + * } + * }, + * ... + * # _ => {}, + * }); + * # } + * ``` + * + * ## Closing Channels + * + * There are two ways to close a channel: either cooperatively using [`close_channel`] or + * unilaterally using [`force_close_broadcasting_latest_txn`]. The former is ideal as it makes for + * lower fees and immediate access to funds. However, the latter may be necessary if the + * counterparty isn't behaving properly or has gone offline. [`Event::ChannelClosed`] is generated + * once the channel has been closed successfully. + * + * ``` + * # use bitcoin::secp256k1::PublicKey; + * # use lightning::ln::types::ChannelId; + * # use lightning::ln::channelmanager::AChannelManager; + * # use lightning::events::{Event, EventsProvider}; + * # + * # fn example( + * # channel_manager: T, channel_id: ChannelId, counterparty_node_id: PublicKey + * # ) { + * # let channel_manager = channel_manager.get_cm(); + * match channel_manager.close_channel(&channel_id, &counterparty_node_id) { + * Ok(()) => println!(\"Closing channel {}\", channel_id), + * Err(e) => println!(\"Error closing channel {}: {:?}\", channel_id, e), + * } + * + * On the event processing thread + * channel_manager.process_pending_events(&|event| match event { + * Event::ChannelClosed { channel_id, user_channel_id, .. } => { + * assert_eq!(user_channel_id, 42); + * println!(\"Channel {} closed\", channel_id); + * }, + * ... + * # _ => {}, + * }); + * # } + * ``` + * + * # Payments + * + * [`ChannelManager`] is responsible for sending, forwarding, and receiving payments through its + * channels. A payment is typically initiated from a [BOLT 11] invoice or a [BOLT 12] offer, though + * spontaneous (i.e., keysend) payments are also possible. Incoming payments don't require + * maintaining any additional state as [`ChannelManager`] can reconstruct the [`PaymentPreimage`] + * from the [`PaymentSecret`]. Sending payments, however, require tracking in order to retry failed + * HTLCs. + * + * After a payment is initiated, it will appear in [`list_recent_payments`] until a short time + * after either an [`Event::PaymentSent`] or [`Event::PaymentFailed`] is handled. Failed HTLCs + * for a payment will be retried according to the payment's [`Retry`] strategy or until + * [`abandon_payment`] is called. + * + * ## BOLT 11 Invoices + * + * The [`lightning-invoice`] crate is useful for creating BOLT 11 invoices. Specifically, use the + * functions in its `utils` module for constructing invoices that are compatible with + * [`ChannelManager`]. These functions serve as a convenience for building invoices with the + * [`PaymentHash`] and [`PaymentSecret`] returned from [`create_inbound_payment`]. To provide your + * own [`PaymentHash`], use [`create_inbound_payment_for_hash`] or the corresponding functions in + * the [`lightning-invoice`] `utils` module. + * + * [`ChannelManager`] generates an [`Event::PaymentClaimable`] once the full payment has been + * received. Call [`claim_funds`] to release the [`PaymentPreimage`], which in turn will result in + * an [`Event::PaymentClaimed`]. + * + * ``` + * # use lightning::events::{Event, EventsProvider, PaymentPurpose}; + * # use lightning::ln::channelmanager::AChannelManager; + * # + * # fn example(channel_manager: T) { + * # let channel_manager = channel_manager.get_cm(); + * Or use utils::create_invoice_from_channelmanager + * let known_payment_hash = match channel_manager.create_inbound_payment( + * Some(10_000_000), 3600, None + * ) { + * Ok((payment_hash, _payment_secret)) => { + * println!(\"Creating inbound payment {}\", payment_hash); + * payment_hash + * }, + * Err(()) => panic!(\"Error creating inbound payment\"), + * }; + * + * On the event processing thread + * channel_manager.process_pending_events(&|event| match event { + * Event::PaymentClaimable { payment_hash, purpose, .. } => match purpose { + * PaymentPurpose::Bolt11InvoicePayment { payment_preimage: Some(payment_preimage), .. } => { + * assert_eq!(payment_hash, known_payment_hash); + * println!(\"Claiming payment {}\", payment_hash); + * channel_manager.claim_funds(payment_preimage); + * }, + * PaymentPurpose::Bolt11InvoicePayment { payment_preimage: None, .. } => { + * println!(\"Unknown payment hash: {}\", payment_hash); + * }, + * PaymentPurpose::SpontaneousPayment(payment_preimage) => { + * assert_ne!(payment_hash, known_payment_hash); + * println!(\"Claiming spontaneous payment {}\", payment_hash); + * channel_manager.claim_funds(payment_preimage); + * }, + * ... + * # _ => {}, + * }, + * Event::PaymentClaimed { payment_hash, amount_msat, .. } => { + * assert_eq!(payment_hash, known_payment_hash); + * println!(\"Claimed {} msats\", amount_msat); + * }, + * ... + * # _ => {}, + * }); + * # } + * ``` + * + * For paying an invoice, [`lightning-invoice`] provides a `payment` module with convenience + * functions for use with [`send_payment`]. + * + * ``` + * # use lightning::events::{Event, EventsProvider}; + * # use lightning::ln::types::PaymentHash; + * # use lightning::ln::channelmanager::{AChannelManager, PaymentId, RecentPaymentDetails, RecipientOnionFields, Retry}; + * # use lightning::routing::router::RouteParameters; + * # + * # fn example( + * # channel_manager: T, payment_hash: PaymentHash, recipient_onion: RecipientOnionFields, + * # route_params: RouteParameters, retry: Retry + * # ) { + * # let channel_manager = channel_manager.get_cm(); + * let (payment_hash, recipient_onion, route_params) = + * payment::payment_parameters_from_invoice(&invoice); + * let payment_id = PaymentId([42; 32]); + * match channel_manager.send_payment( + * payment_hash, recipient_onion, payment_id, route_params, retry + * ) { + * Ok(()) => println!(\"Sending payment with hash {}\", payment_hash), + * Err(e) => println!(\"Failed sending payment with hash {}: {:?}\", payment_hash, e), + * } + * + * let expected_payment_id = payment_id; + * let expected_payment_hash = payment_hash; + * assert!( + * channel_manager.list_recent_payments().iter().find(|details| matches!( + * details, + * RecentPaymentDetails::Pending { + * payment_id: expected_payment_id, + * payment_hash: expected_payment_hash, + * .. + * } + * )).is_some() + * ); + * + * On the event processing thread + * channel_manager.process_pending_events(&|event| match event { + * Event::PaymentSent { payment_hash, .. } => println!(\"Paid {}\", payment_hash), + * Event::PaymentFailed { payment_hash, .. } => println!(\"Failed paying {}\", payment_hash), + * ... + * # _ => {}, + * }); + * # } + * ``` * - * Implements [`ChannelMessageHandler`], handling the multi-channel parts and passing things through - * to individual Channels. + * ## BOLT 12 Offers + * + * The [`offers`] module is useful for creating BOLT 12 offers. An [`Offer`] is a precursor to a + * [`Bolt12Invoice`], which must first be requested by the payer. The interchange of these messages + * as defined in the specification is handled by [`ChannelManager`] and its implementation of + * [`OffersMessageHandler`]. However, this only works with an [`Offer`] created using a builder + * returned by [`create_offer_builder`]. With this approach, BOLT 12 offers and invoices are + * stateless just as BOLT 11 invoices are. + * + * ``` + * # use lightning::events::{Event, EventsProvider, PaymentPurpose}; + * # use lightning::ln::channelmanager::AChannelManager; + * # use lightning::offers::parse::Bolt12SemanticError; + * # + * # fn example(channel_manager: T) -> Result<(), Bolt12SemanticError> { + * # let channel_manager = channel_manager.get_cm(); + * let offer = channel_manager + * .create_offer_builder()? + * # ; + * # // Needed for compiling for c_bindings + * # let builder: lightning::offers::offer::OfferBuilder<_, _> = offer.into(); + * # let offer = builder + * .description(\"coffee\".to_string()) + * .amount_msats(10_000_000) + * .build()?; + * let bech32_offer = offer.to_string(); + * + * On the event processing thread + * channel_manager.process_pending_events(&|event| match event { + * Event::PaymentClaimable { payment_hash, purpose, .. } => match purpose { + * PaymentPurpose::Bolt12OfferPayment { payment_preimage: Some(payment_preimage), .. } => { + * println!(\"Claiming payment {}\", payment_hash); + * channel_manager.claim_funds(payment_preimage); + * }, + * PaymentPurpose::Bolt12OfferPayment { payment_preimage: None, .. } => { + * println!(\"Unknown payment hash: {}\", payment_hash); + * }, + * ... + * # _ => {}, + * }, + * Event::PaymentClaimed { payment_hash, amount_msat, .. } => { + * println!(\"Claimed {} msats\", amount_msat); + * }, + * ... + * # _ => {}, + * }); + * # Ok(()) + * # } + * ``` + * + * Use [`pay_for_offer`] to initiated payment, which sends an [`InvoiceRequest`] for an [`Offer`] + * and pays the [`Bolt12Invoice`] response. In addition to success and failure events, + * [`ChannelManager`] may also generate an [`Event::InvoiceRequestFailed`]. + * + * ``` + * # use lightning::events::{Event, EventsProvider}; + * # use lightning::ln::channelmanager::{AChannelManager, PaymentId, RecentPaymentDetails, Retry}; + * # use lightning::offers::offer::Offer; + * # + * # fn example( + * # channel_manager: T, offer: &Offer, quantity: Option, amount_msats: Option, + * # payer_note: Option, retry: Retry, max_total_routing_fee_msat: Option + * # ) { + * # let channel_manager = channel_manager.get_cm(); + * let payment_id = PaymentId([42; 32]); + * match channel_manager.pay_for_offer( + * offer, quantity, amount_msats, payer_note, payment_id, retry, max_total_routing_fee_msat + * ) { + * Ok(()) => println!(\"Requesting invoice for offer\"), + * Err(e) => println!(\"Unable to request invoice for offer: {:?}\", e), + * } + * + * First the payment will be waiting on an invoice + * let expected_payment_id = payment_id; + * assert!( + * channel_manager.list_recent_payments().iter().find(|details| matches!( + * details, + * RecentPaymentDetails::AwaitingInvoice { payment_id: expected_payment_id } + * )).is_some() + * ); + * + * Once the invoice is received, a payment will be sent + * assert!( + * channel_manager.list_recent_payments().iter().find(|details| matches!( + * details, + * RecentPaymentDetails::Pending { payment_id: expected_payment_id, .. } + * )).is_some() + * ); + * + * On the event processing thread + * channel_manager.process_pending_events(&|event| match event { + * Event::PaymentSent { payment_id: Some(payment_id), .. } => println!(\"Paid {}\", payment_id), + * Event::PaymentFailed { payment_id, .. } => println!(\"Failed paying {}\", payment_id), + * Event::InvoiceRequestFailed { payment_id, .. } => println!(\"Failed paying {}\", payment_id), + * ... + * # _ => {}, + * }); + * # } + * ``` + * + * ## BOLT 12 Refunds + * + * A [`Refund`] is a request for an invoice to be paid. Like *paying* for an [`Offer`], *creating* + * a [`Refund`] involves maintaining state since it represents a future outbound payment. + * Therefore, use [`create_refund_builder`] when creating one, otherwise [`ChannelManager`] will + * refuse to pay any corresponding [`Bolt12Invoice`] that it receives. + * + * ``` + * # use core::time::Duration; + * # use lightning::events::{Event, EventsProvider}; + * # use lightning::ln::channelmanager::{AChannelManager, PaymentId, RecentPaymentDetails, Retry}; + * # use lightning::offers::parse::Bolt12SemanticError; + * # + * # fn example( + * # channel_manager: T, amount_msats: u64, absolute_expiry: Duration, retry: Retry, + * # max_total_routing_fee_msat: Option + * # ) -> Result<(), Bolt12SemanticError> { + * # let channel_manager = channel_manager.get_cm(); + * let payment_id = PaymentId([42; 32]); + * let refund = channel_manager + * .create_refund_builder( + * amount_msats, absolute_expiry, payment_id, retry, max_total_routing_fee_msat + * )? + * # ; + * # // Needed for compiling for c_bindings + * # let builder: lightning::offers::refund::RefundBuilder<_> = refund.into(); + * # let refund = builder + * .description(\"coffee\".to_string()) + * .payer_note(\"refund for order 1234\".to_string()) + * .build()?; + * let bech32_refund = refund.to_string(); + * + * First the payment will be waiting on an invoice + * let expected_payment_id = payment_id; + * assert!( + * channel_manager.list_recent_payments().iter().find(|details| matches!( + * details, + * RecentPaymentDetails::AwaitingInvoice { payment_id: expected_payment_id } + * )).is_some() + * ); + * + * Once the invoice is received, a payment will be sent + * assert!( + * channel_manager.list_recent_payments().iter().find(|details| matches!( + * details, + * RecentPaymentDetails::Pending { payment_id: expected_payment_id, .. } + * )).is_some() + * ); + * + * On the event processing thread + * channel_manager.process_pending_events(&|event| match event { + * Event::PaymentSent { payment_id: Some(payment_id), .. } => println!(\"Paid {}\", payment_id), + * Event::PaymentFailed { payment_id, .. } => println!(\"Failed paying {}\", payment_id), + * ... + * # _ => {}, + * }); + * # Ok(()) + * # } + * ``` + * + * Use [`request_refund_payment`] to send a [`Bolt12Invoice`] for receiving the refund. Similar to + * creating* an [`Offer`], this is stateless as it represents an inbound payment. + * + * ``` + * # use lightning::events::{Event, EventsProvider, PaymentPurpose}; + * # use lightning::ln::channelmanager::AChannelManager; + * # use lightning::offers::refund::Refund; + * # + * # fn example(channel_manager: T, refund: &Refund) { + * # let channel_manager = channel_manager.get_cm(); + * let known_payment_hash = match channel_manager.request_refund_payment(refund) { + * Ok(invoice) => { + * let payment_hash = invoice.payment_hash(); + * println!(\"Requesting refund payment {}\", payment_hash); + * payment_hash + * }, + * Err(e) => panic!(\"Unable to request payment for refund: {:?}\", e), + * }; + * + * On the event processing thread + * channel_manager.process_pending_events(&|event| match event { + * Event::PaymentClaimable { payment_hash, purpose, .. } => match purpose { + * \tPaymentPurpose::Bolt12RefundPayment { payment_preimage: Some(payment_preimage), .. } => { + * assert_eq!(payment_hash, known_payment_hash); + * println!(\"Claiming payment {}\", payment_hash); + * channel_manager.claim_funds(payment_preimage); + * }, + * \tPaymentPurpose::Bolt12RefundPayment { payment_preimage: None, .. } => { + * println!(\"Unknown payment hash: {}\", payment_hash); + * \t}, + * ... + * # _ => {}, + * }, + * Event::PaymentClaimed { payment_hash, amount_msat, .. } => { + * assert_eq!(payment_hash, known_payment_hash); + * println!(\"Claimed {} msats\", amount_msat); + * }, + * ... + * # _ => {}, + * }); + * # } + * ``` + * + * # Persistence * * Implements [`Writeable`] to write out all channel state to disk. Implies [`peer_disconnected`] for * all peers during write/read (though does not modify this instance, only the instance being @@ -622,12 +1305,16 @@ import * as bindings from '../bindings.mjs' * tells you the last block hash which was connected. You should get the best block tip before using the manager. * See [`chain::Listen`] and [`chain::Confirm`] for more details. * + * # `ChannelUpdate` Messages + * * Note that `ChannelManager` is responsible for tracking liveness of its channels and generating * [`ChannelUpdate`] messages informing peers that the channel is temporarily disabled. To avoid * spam due to quick disconnection/reconnection, updates are not sent until the channel has been * offline for a full minute. In order to track this, you must call * [`timer_tick_occurred`] roughly once per minute, though it doesn't have to be perfect. * + * # DoS Mitigation + * * To avoid trivial DoS issues, `ChannelManager` limits the number of inbound connections and * inbound channels without confirmed funding transactions. This may result in nodes which we do * not have a channel with being unable to connect to us or open new channels with us if we have @@ -637,19 +1324,53 @@ import * as bindings from '../bindings.mjs' * exempted from the count of unfunded channels. Similarly, outbound channels and connections are * never limited. Please ensure you limit the count of such channels yourself. * + * # Type Aliases + * * Rather than using a plain `ChannelManager`, it is preferable to use either a [`SimpleArcChannelManager`] * a [`SimpleRefChannelManager`], for conciseness. See their documentation for more details, but * essentially you should default to using a [`SimpleRefChannelManager`], and use a * [`SimpleArcChannelManager`] when you require a `ChannelManager` with a static lifetime, such as when * you're using lightning-net-tokio. * + * [`ChainMonitor`]: crate::chain::chainmonitor::ChainMonitor + * [`MessageHandler`]: crate::ln::peer_handler::MessageHandler + * [`OnionMessenger`]: crate::onion_message::messenger::OnionMessenger + * [`PeerManager::read_event`]: crate::ln::peer_handler::PeerManager::read_event + * [`PeerManager::process_events`]: crate::ln::peer_handler::PeerManager::process_events + * [`timer_tick_occurred`]: Self::timer_tick_occurred + * [`get_and_clear_needs_persistence`]: Self::get_and_clear_needs_persistence + * [`Persister`]: crate::util::persist::Persister + * [`KVStore`]: crate::util::persist::KVStore + * [`get_event_or_persistence_needed_future`]: Self::get_event_or_persistence_needed_future + * [`lightning-block-sync`]: https://docs.rs/lightning_block_sync/latest/lightning_block_sync + * [`lightning-transaction-sync`]: https://docs.rs/lightning_transaction_sync/latest/lightning_transaction_sync + * [`lightning-background-processor`]: https://docs.rs/lightning_background_processor/lightning_background_processor + * [`list_channels`]: Self::list_channels + * [`list_usable_channels`]: Self::list_usable_channels + * [`create_channel`]: Self::create_channel + * [`close_channel`]: Self::force_close_broadcasting_latest_txn + * [`force_close_broadcasting_latest_txn`]: Self::force_close_broadcasting_latest_txn + * [BOLT 11]: https://github.com/lightning/bolts/blob/master/11-payment-encoding.md + * [BOLT 12]: https://github.com/rustyrussell/lightning-rfc/blob/guilt/offers/12-offer-encoding.md + * [`list_recent_payments`]: Self::list_recent_payments + * [`abandon_payment`]: Self::abandon_payment + * [`lightning-invoice`]: https://docs.rs/lightning_invoice/latest/lightning_invoice + * [`create_inbound_payment`]: Self::create_inbound_payment + * [`create_inbound_payment_for_hash`]: Self::create_inbound_payment_for_hash + * [`claim_funds`]: Self::claim_funds + * [`send_payment`]: Self::send_payment + * [`offers`]: crate::offers + * [`create_offer_builder`]: Self::create_offer_builder + * [`pay_for_offer`]: Self::pay_for_offer + * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest + * [`create_refund_builder`]: Self::create_refund_builder + * [`request_refund_payment`]: Self::request_refund_payment * [`peer_disconnected`]: msgs::ChannelMessageHandler::peer_disconnected * [`funding_created`]: msgs::FundingCreated * [`funding_transaction_generated`]: Self::funding_transaction_generated * [`BlockHash`]: bitcoin::hash_types::BlockHash * [`update_channel`]: chain::Watch::update_channel * [`ChannelUpdate`]: msgs::ChannelUpdate - * [`timer_tick_occurred`]: Self::timer_tick_occurred * [`read`]: ReadableArgs::read */ export class ChannelManager extends CommonBase { @@ -678,7 +1399,7 @@ export class ChannelManager extends CommonBase { * [`params.best_block.block_hash`]: chain::BestBlock::block_hash */ public static constructor_new(fee_est: FeeEstimator, chain_monitor: Watch, tx_broadcaster: BroadcasterInterface, router: Router, logger: Logger, entropy_source: EntropySource, node_signer: NodeSigner, signer_provider: SignerProvider, config: UserConfig, params: ChainParameters, current_timestamp: number): ChannelManager { - const ret: bigint = bindings.ChannelManager_new(CommonBase.get_ptr_of(fee_est), CommonBase.get_ptr_of(chain_monitor), CommonBase.get_ptr_of(tx_broadcaster), CommonBase.get_ptr_of(router), CommonBase.get_ptr_of(logger), CommonBase.get_ptr_of(entropy_source), CommonBase.get_ptr_of(node_signer), CommonBase.get_ptr_of(signer_provider), config == null ? 0n : CommonBase.get_ptr_of(config), params == null ? 0n : CommonBase.get_ptr_of(params), current_timestamp); + const ret: bigint = bindings.ChannelManager_new(CommonBase.get_ptr_of(fee_est), CommonBase.get_ptr_of(chain_monitor), CommonBase.get_ptr_of(tx_broadcaster), CommonBase.get_ptr_of(router), CommonBase.get_ptr_of(logger), CommonBase.get_ptr_of(entropy_source), CommonBase.get_ptr_of(node_signer), CommonBase.get_ptr_of(signer_provider), CommonBase.get_ptr_of(config), CommonBase.get_ptr_of(params), current_timestamp); const ret_hu_conv: ChannelManager = new ChannelManager(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, fee_est); @@ -738,11 +1459,12 @@ export class ChannelManager extends CommonBase { * [`Event::FundingGenerationReady::temporary_channel_id`]: events::Event::FundingGenerationReady::temporary_channel_id * [`Event::ChannelClosed::channel_id`]: events::Event::ChannelClosed::channel_id * + * Note that temporary_channel_id (or a relevant inner pointer) may be NULL or all-0s to represent None * Note that override_config (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public create_channel(their_network_key: Uint8Array, channel_value_satoshis: bigint, push_msat: bigint, user_channel_id: bigint, temporary_channel_id: Option_ThirtyTwoBytesZ, override_config: UserConfig|null): Result_ThirtyTwoBytesAPIErrorZ { - const ret: bigint = bindings.ChannelManager_create_channel(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_network_key, 33)), channel_value_satoshis, push_msat, bindings.encodeUint128(user_channel_id), CommonBase.get_ptr_of(temporary_channel_id), override_config == null ? 0n : CommonBase.get_ptr_of(override_config)); - const ret_hu_conv: Result_ThirtyTwoBytesAPIErrorZ = Result_ThirtyTwoBytesAPIErrorZ.constr_from_ptr(ret); + public create_channel(their_network_key: Uint8Array, channel_value_satoshis: bigint, push_msat: bigint, user_channel_id: bigint, temporary_channel_id: ChannelId|null, override_config: UserConfig|null): Result_ChannelIdAPIErrorZ { + const ret: bigint = bindings.ChannelManager_create_channel(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_network_key, 33)), channel_value_satoshis, push_msat, bindings.encodeUint128(user_channel_id), temporary_channel_id == null ? 0n : CommonBase.get_ptr_of(temporary_channel_id), override_config == null ? 0n : CommonBase.get_ptr_of(override_config)); + const ret_hu_conv: Result_ChannelIdAPIErrorZ = Result_ChannelIdAPIErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, temporary_channel_id); CommonBase.add_ref_from(this, override_config); return ret_hu_conv; @@ -854,9 +1576,10 @@ export class ChannelManager extends CommonBase { * [`NonAnchorChannelFee`]: crate::chain::chaininterface::ConfirmationTarget::NonAnchorChannelFee * [`SendShutdown`]: crate::events::MessageSendEvent::SendShutdown */ - public close_channel(channel_id: Uint8Array, counterparty_node_id: Uint8Array): Result_NoneAPIErrorZ { - const ret: bigint = bindings.ChannelManager_close_channel(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(channel_id, 32)), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id, 33))); + public close_channel(channel_id: ChannelId, counterparty_node_id: Uint8Array): Result_NoneAPIErrorZ { + const ret: bigint = bindings.ChannelManager_close_channel(this.ptr, CommonBase.get_ptr_of(channel_id), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id, 33))); const ret_hu_conv: Result_NoneAPIErrorZ = Result_NoneAPIErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(this, channel_id); return ret_hu_conv; } @@ -893,9 +1616,10 @@ export class ChannelManager extends CommonBase { * * Note that shutdown_script (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public close_channel_with_feerate_and_script(channel_id: Uint8Array, counterparty_node_id: Uint8Array, target_feerate_sats_per_1000_weight: Option_u32Z, shutdown_script: ShutdownScript|null): Result_NoneAPIErrorZ { - const ret: bigint = bindings.ChannelManager_close_channel_with_feerate_and_script(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(channel_id, 32)), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id, 33)), CommonBase.get_ptr_of(target_feerate_sats_per_1000_weight), shutdown_script == null ? 0n : CommonBase.get_ptr_of(shutdown_script)); + public close_channel_with_feerate_and_script(channel_id: ChannelId, counterparty_node_id: Uint8Array, target_feerate_sats_per_1000_weight: Option_u32Z, shutdown_script: ShutdownScript|null): Result_NoneAPIErrorZ { + const ret: bigint = bindings.ChannelManager_close_channel_with_feerate_and_script(this.ptr, CommonBase.get_ptr_of(channel_id), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id, 33)), CommonBase.get_ptr_of(target_feerate_sats_per_1000_weight), shutdown_script == null ? 0n : CommonBase.get_ptr_of(shutdown_script)); const ret_hu_conv: Result_NoneAPIErrorZ = Result_NoneAPIErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(this, channel_id); CommonBase.add_ref_from(this, target_feerate_sats_per_1000_weight); CommonBase.add_ref_from(this, shutdown_script); return ret_hu_conv; @@ -907,9 +1631,10 @@ export class ChannelManager extends CommonBase { * the manager, or if the `counterparty_node_id` isn't the counterparty of the corresponding * channel. */ - public force_close_broadcasting_latest_txn(channel_id: Uint8Array, counterparty_node_id: Uint8Array): Result_NoneAPIErrorZ { - const ret: bigint = bindings.ChannelManager_force_close_broadcasting_latest_txn(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(channel_id, 32)), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id, 33))); + public force_close_broadcasting_latest_txn(channel_id: ChannelId, counterparty_node_id: Uint8Array): Result_NoneAPIErrorZ { + const ret: bigint = bindings.ChannelManager_force_close_broadcasting_latest_txn(this.ptr, CommonBase.get_ptr_of(channel_id), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id, 33))); const ret_hu_conv: Result_NoneAPIErrorZ = Result_NoneAPIErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(this, channel_id); return ret_hu_conv; } @@ -918,12 +1643,13 @@ export class ChannelManager extends CommonBase { * the latest local transaction(s). Fails if `channel_id` is unknown to the manager, or if the * `counterparty_node_id` isn't the counterparty of the corresponding channel. * - * You can always get the latest local transaction(s) to broadcast from - * [`ChannelMonitor::get_latest_holder_commitment_txn`]. + * You can always broadcast the latest local transaction(s) via + * [`ChannelMonitor::broadcast_latest_holder_commitment_txn`]. */ - public force_close_without_broadcasting_txn(channel_id: Uint8Array, counterparty_node_id: Uint8Array): Result_NoneAPIErrorZ { - const ret: bigint = bindings.ChannelManager_force_close_without_broadcasting_txn(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(channel_id, 32)), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id, 33))); + public force_close_without_broadcasting_txn(channel_id: ChannelId, counterparty_node_id: Uint8Array): Result_NoneAPIErrorZ { + const ret: bigint = bindings.ChannelManager_force_close_without_broadcasting_txn(this.ptr, CommonBase.get_ptr_of(channel_id), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id, 33))); const ret_hu_conv: Result_NoneAPIErrorZ = Result_NoneAPIErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(this, channel_id); return ret_hu_conv; } @@ -997,7 +1723,7 @@ export class ChannelManager extends CommonBase { * [`ChannelMonitorUpdateStatus::InProgress`]: crate::chain::ChannelMonitorUpdateStatus::InProgress */ public send_payment_with_route(route: Route, payment_hash: Uint8Array, recipient_onion: RecipientOnionFields, payment_id: Uint8Array): Result_NonePaymentSendFailureZ { - const ret: bigint = bindings.ChannelManager_send_payment_with_route(this.ptr, route == null ? 0n : CommonBase.get_ptr_of(route), bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), recipient_onion == null ? 0n : CommonBase.get_ptr_of(recipient_onion), bindings.encodeUint8Array(bindings.check_arr_len(payment_id, 32))); + const ret: bigint = bindings.ChannelManager_send_payment_with_route(this.ptr, CommonBase.get_ptr_of(route), bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), CommonBase.get_ptr_of(recipient_onion), bindings.encodeUint8Array(bindings.check_arr_len(payment_id, 32))); const ret_hu_conv: Result_NonePaymentSendFailureZ = Result_NonePaymentSendFailureZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, route); CommonBase.add_ref_from(this, recipient_onion); @@ -1009,7 +1735,7 @@ export class ChannelManager extends CommonBase { * `route_params` and retry failed payment paths based on `retry_strategy`. */ public send_payment(payment_hash: Uint8Array, recipient_onion: RecipientOnionFields, payment_id: Uint8Array, route_params: RouteParameters, retry_strategy: Retry): Result_NoneRetryableSendFailureZ { - const ret: bigint = bindings.ChannelManager_send_payment(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), recipient_onion == null ? 0n : CommonBase.get_ptr_of(recipient_onion), bindings.encodeUint8Array(bindings.check_arr_len(payment_id, 32)), route_params == null ? 0n : CommonBase.get_ptr_of(route_params), CommonBase.get_ptr_of(retry_strategy)); + const ret: bigint = bindings.ChannelManager_send_payment(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), CommonBase.get_ptr_of(recipient_onion), bindings.encodeUint8Array(bindings.check_arr_len(payment_id, 32)), CommonBase.get_ptr_of(route_params), CommonBase.get_ptr_of(retry_strategy)); const ret_hu_conv: Result_NoneRetryableSendFailureZ = Result_NoneRetryableSendFailureZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, recipient_onion); CommonBase.add_ref_from(this, route_params); @@ -1066,7 +1792,7 @@ export class ChannelManager extends CommonBase { * [`send_payment`]: Self::send_payment */ public send_spontaneous_payment(route: Route, payment_preimage: Option_ThirtyTwoBytesZ, recipient_onion: RecipientOnionFields, payment_id: Uint8Array): Result_ThirtyTwoBytesPaymentSendFailureZ { - const ret: bigint = bindings.ChannelManager_send_spontaneous_payment(this.ptr, route == null ? 0n : CommonBase.get_ptr_of(route), CommonBase.get_ptr_of(payment_preimage), recipient_onion == null ? 0n : CommonBase.get_ptr_of(recipient_onion), bindings.encodeUint8Array(bindings.check_arr_len(payment_id, 32))); + const ret: bigint = bindings.ChannelManager_send_spontaneous_payment(this.ptr, CommonBase.get_ptr_of(route), CommonBase.get_ptr_of(payment_preimage), CommonBase.get_ptr_of(recipient_onion), bindings.encodeUint8Array(bindings.check_arr_len(payment_id, 32))); const ret_hu_conv: Result_ThirtyTwoBytesPaymentSendFailureZ = Result_ThirtyTwoBytesPaymentSendFailureZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, route); CommonBase.add_ref_from(this, payment_preimage); @@ -1084,7 +1810,7 @@ export class ChannelManager extends CommonBase { * [`PaymentParameters::for_keysend`]: crate::routing::router::PaymentParameters::for_keysend */ public send_spontaneous_payment_with_retry(payment_preimage: Option_ThirtyTwoBytesZ, recipient_onion: RecipientOnionFields, payment_id: Uint8Array, route_params: RouteParameters, retry_strategy: Retry): Result_ThirtyTwoBytesRetryableSendFailureZ { - const ret: bigint = bindings.ChannelManager_send_spontaneous_payment_with_retry(this.ptr, CommonBase.get_ptr_of(payment_preimage), recipient_onion == null ? 0n : CommonBase.get_ptr_of(recipient_onion), bindings.encodeUint8Array(bindings.check_arr_len(payment_id, 32)), route_params == null ? 0n : CommonBase.get_ptr_of(route_params), CommonBase.get_ptr_of(retry_strategy)); + const ret: bigint = bindings.ChannelManager_send_spontaneous_payment_with_retry(this.ptr, CommonBase.get_ptr_of(payment_preimage), CommonBase.get_ptr_of(recipient_onion), bindings.encodeUint8Array(bindings.check_arr_len(payment_id, 32)), CommonBase.get_ptr_of(route_params), CommonBase.get_ptr_of(retry_strategy)); const ret_hu_conv: Result_ThirtyTwoBytesRetryableSendFailureZ = Result_ThirtyTwoBytesRetryableSendFailureZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, payment_preimage); CommonBase.add_ref_from(this, recipient_onion); @@ -1099,7 +1825,7 @@ export class ChannelManager extends CommonBase { * us to easily discern them from real payments. */ public send_probe(path: Path): Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ { - const ret: bigint = bindings.ChannelManager_send_probe(this.ptr, path == null ? 0n : CommonBase.get_ptr_of(path)); + const ret: bigint = bindings.ChannelManager_send_probe(this.ptr, CommonBase.get_ptr_of(path)); const ret_hu_conv: Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ = Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, path); return ret_hu_conv; @@ -1135,7 +1861,7 @@ export class ChannelManager extends CommonBase { * probes. If `None` is given as `liquidity_limit_multiplier`, it defaults to `3`. */ public send_preflight_probes(route_params: RouteParameters, liquidity_limit_multiplier: Option_u64Z): Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ { - const ret: bigint = bindings.ChannelManager_send_preflight_probes(this.ptr, route_params == null ? 0n : CommonBase.get_ptr_of(route_params), CommonBase.get_ptr_of(liquidity_limit_multiplier)); + const ret: bigint = bindings.ChannelManager_send_preflight_probes(this.ptr, CommonBase.get_ptr_of(route_params), CommonBase.get_ptr_of(liquidity_limit_multiplier)); const ret_hu_conv: Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ = Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, route_params); CommonBase.add_ref_from(this, liquidity_limit_multiplier); @@ -1174,9 +1900,10 @@ export class ChannelManager extends CommonBase { * [`Event::FundingGenerationReady`]: crate::events::Event::FundingGenerationReady * [`Event::ChannelClosed`]: crate::events::Event::ChannelClosed */ - public funding_transaction_generated(temporary_channel_id: Uint8Array, counterparty_node_id: Uint8Array, funding_transaction: Uint8Array): Result_NoneAPIErrorZ { - const ret: bigint = bindings.ChannelManager_funding_transaction_generated(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(temporary_channel_id, 32)), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id, 33)), bindings.encodeUint8Array(funding_transaction)); + public funding_transaction_generated(temporary_channel_id: ChannelId, counterparty_node_id: Uint8Array, funding_transaction: Uint8Array): Result_NoneAPIErrorZ { + const ret: bigint = bindings.ChannelManager_funding_transaction_generated(this.ptr, CommonBase.get_ptr_of(temporary_channel_id), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id, 33)), bindings.encodeUint8Array(funding_transaction)); const ret_hu_conv: Result_NoneAPIErrorZ = Result_NoneAPIErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(this, temporary_channel_id); return ret_hu_conv; } @@ -1192,8 +1919,8 @@ export class ChannelManager extends CommonBase { * * If there is an error, all channels in the batch are to be considered closed. */ - public batch_funding_transaction_generated(temporary_channels: TwoTuple_ThirtyTwoBytesPublicKeyZ[], funding_transaction: Uint8Array): Result_NoneAPIErrorZ { - const ret: bigint = bindings.ChannelManager_batch_funding_transaction_generated(this.ptr, bindings.encodeUint64Array(temporary_channels.map(temporary_channels_conv_35 => temporary_channels_conv_35 != null ? CommonBase.get_ptr_of(temporary_channels_conv_35) : 0n)), bindings.encodeUint8Array(funding_transaction)); + public batch_funding_transaction_generated(temporary_channels: TwoTuple_ChannelIdPublicKeyZ[], funding_transaction: Uint8Array): Result_NoneAPIErrorZ { + const ret: bigint = bindings.ChannelManager_batch_funding_transaction_generated(this.ptr, bindings.encodeUint64Array(temporary_channels.map(temporary_channels_conv_30 => CommonBase.get_ptr_of(temporary_channels_conv_30))), bindings.encodeUint8Array(funding_transaction)); const ret_hu_conv: Result_NoneAPIErrorZ = Result_NoneAPIErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -1222,9 +1949,10 @@ export class ChannelManager extends CommonBase { * [`ChannelUnavailable`]: APIError::ChannelUnavailable * [`APIMisuseError`]: APIError::APIMisuseError */ - public update_partial_channel_config(counterparty_node_id: Uint8Array, channel_ids: Uint8Array[], config_update: ChannelConfigUpdate): Result_NoneAPIErrorZ { - const ret: bigint = bindings.ChannelManager_update_partial_channel_config(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id, 33)), bindings.encodeUint32Array(channel_ids.map(channel_ids_conv_12 => bindings.encodeUint8Array(bindings.check_arr_len(channel_ids_conv_12, 32)))), config_update == null ? 0n : CommonBase.get_ptr_of(config_update)); + public update_partial_channel_config(counterparty_node_id: Uint8Array, channel_ids: ChannelId[], config_update: ChannelConfigUpdate): Result_NoneAPIErrorZ { + const ret: bigint = bindings.ChannelManager_update_partial_channel_config(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id, 33)), bindings.encodeUint64Array(channel_ids.map(channel_ids_conv_11 => CommonBase.get_ptr_of(channel_ids_conv_11))), CommonBase.get_ptr_of(config_update)); const ret_hu_conv: Result_NoneAPIErrorZ = Result_NoneAPIErrorZ.constr_from_ptr(ret); + channel_ids.forEach((channel_ids_conv_11: ChannelId) => { CommonBase.add_ref_from(this, channel_ids_conv_11); }); CommonBase.add_ref_from(this, config_update); return ret_hu_conv; } @@ -1253,9 +1981,10 @@ export class ChannelManager extends CommonBase { * [`ChannelUnavailable`]: APIError::ChannelUnavailable * [`APIMisuseError`]: APIError::APIMisuseError */ - public update_channel_config(counterparty_node_id: Uint8Array, channel_ids: Uint8Array[], config: ChannelConfig): Result_NoneAPIErrorZ { - const ret: bigint = bindings.ChannelManager_update_channel_config(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id, 33)), bindings.encodeUint32Array(channel_ids.map(channel_ids_conv_12 => bindings.encodeUint8Array(bindings.check_arr_len(channel_ids_conv_12, 32)))), config == null ? 0n : CommonBase.get_ptr_of(config)); + public update_channel_config(counterparty_node_id: Uint8Array, channel_ids: ChannelId[], config: ChannelConfig): Result_NoneAPIErrorZ { + const ret: bigint = bindings.ChannelManager_update_channel_config(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id, 33)), bindings.encodeUint64Array(channel_ids.map(channel_ids_conv_11 => CommonBase.get_ptr_of(channel_ids_conv_11))), CommonBase.get_ptr_of(config)); const ret_hu_conv: Result_NoneAPIErrorZ = Result_NoneAPIErrorZ.constr_from_ptr(ret); + channel_ids.forEach((channel_ids_conv_11: ChannelId) => { CommonBase.add_ref_from(this, channel_ids_conv_11); }); CommonBase.add_ref_from(this, config); return ret_hu_conv; } @@ -1285,9 +2014,10 @@ export class ChannelManager extends CommonBase { * [`HTLCIntercepted`]: events::Event::HTLCIntercepted * [`HTLCIntercepted::expected_outbound_amount_msat`]: events::Event::HTLCIntercepted::expected_outbound_amount_msat */ - public forward_intercepted_htlc(intercept_id: Uint8Array, next_hop_channel_id: Uint8Array, next_node_id: Uint8Array, amt_to_forward_msat: bigint): Result_NoneAPIErrorZ { - const ret: bigint = bindings.ChannelManager_forward_intercepted_htlc(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(intercept_id, 32)), bindings.encodeUint8Array(bindings.check_arr_len(next_hop_channel_id, 32)), bindings.encodeUint8Array(bindings.check_arr_len(next_node_id, 33)), amt_to_forward_msat); + public forward_intercepted_htlc(intercept_id: Uint8Array, next_hop_channel_id: ChannelId, next_node_id: Uint8Array, amt_to_forward_msat: bigint): Result_NoneAPIErrorZ { + const ret: bigint = bindings.ChannelManager_forward_intercepted_htlc(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(intercept_id, 32)), CommonBase.get_ptr_of(next_hop_channel_id), bindings.encodeUint8Array(bindings.check_arr_len(next_node_id, 33)), amt_to_forward_msat); const ret_hu_conv: Result_NoneAPIErrorZ = Result_NoneAPIErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(this, next_hop_channel_id); return ret_hu_conv; } @@ -1445,9 +2175,10 @@ export class ChannelManager extends CommonBase { * [`Event::OpenChannelRequest`]: events::Event::OpenChannelRequest * [`Event::ChannelClosed::user_channel_id`]: events::Event::ChannelClosed::user_channel_id */ - public accept_inbound_channel(temporary_channel_id: Uint8Array, counterparty_node_id: Uint8Array, user_channel_id: bigint): Result_NoneAPIErrorZ { - const ret: bigint = bindings.ChannelManager_accept_inbound_channel(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(temporary_channel_id, 32)), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id, 33)), bindings.encodeUint128(user_channel_id)); + public accept_inbound_channel(temporary_channel_id: ChannelId, counterparty_node_id: Uint8Array, user_channel_id: bigint): Result_NoneAPIErrorZ { + const ret: bigint = bindings.ChannelManager_accept_inbound_channel(this.ptr, CommonBase.get_ptr_of(temporary_channel_id), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id, 33)), bindings.encodeUint128(user_channel_id)); const ret_hu_conv: Result_NoneAPIErrorZ = Result_NoneAPIErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(this, temporary_channel_id); return ret_hu_conv; } @@ -1471,9 +2202,99 @@ export class ChannelManager extends CommonBase { * [`Event::OpenChannelRequest`]: events::Event::OpenChannelRequest * [`Event::ChannelClosed::user_channel_id`]: events::Event::ChannelClosed::user_channel_id */ - public accept_inbound_channel_from_trusted_peer_0conf(temporary_channel_id: Uint8Array, counterparty_node_id: Uint8Array, user_channel_id: bigint): Result_NoneAPIErrorZ { - const ret: bigint = bindings.ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(temporary_channel_id, 32)), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id, 33)), bindings.encodeUint128(user_channel_id)); + public accept_inbound_channel_from_trusted_peer_0conf(temporary_channel_id: ChannelId, counterparty_node_id: Uint8Array, user_channel_id: bigint): Result_NoneAPIErrorZ { + const ret: bigint = bindings.ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(this.ptr, CommonBase.get_ptr_of(temporary_channel_id), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id, 33)), bindings.encodeUint128(user_channel_id)); const ret_hu_conv: Result_NoneAPIErrorZ = Result_NoneAPIErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(this, temporary_channel_id); + return ret_hu_conv; + } + + /** + * Creates an [`OfferBuilder`] such that the [`Offer`] it builds is recognized by the + * [`ChannelManager`] when handling [`InvoiceRequest`] messages for the offer. The offer will + * not have an expiration unless otherwise set on the builder. + * + * # Privacy + * + * Uses [`MessageRouter::create_blinded_paths`] to construct a [`BlindedPath`] for the offer. + * However, if one is not found, uses a one-hop [`BlindedPath`] with + * [`ChannelManager::get_our_node_id`] as the introduction node instead. In the latter case, + * the node must be announced, otherwise, there is no way to find a path to the introduction in + * order to send the [`InvoiceRequest`]. + * + * Also, uses a derived signing pubkey in the offer for recipient privacy. + * + * # Limitations + * + * Requires a direct connection to the introduction node in the responding [`InvoiceRequest`]'s + * reply path. + * + * # Errors + * + * Errors if the parameterized [`Router`] is unable to create a blinded path for the offer. + * + * [`Offer`]: crate::offers::offer::Offer + * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest + */ + public create_offer_builder(): Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ { + const ret: bigint = bindings.ChannelManager_create_offer_builder(this.ptr); + const ret_hu_conv: Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ = Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Creates a [`RefundBuilder`] such that the [`Refund`] it builds is recognized by the + * [`ChannelManager`] when handling [`Bolt12Invoice`] messages for the refund. + * + * # Payment + * + * The provided `payment_id` is used to ensure that only one invoice is paid for the refund. + * See [Avoiding Duplicate Payments] for other requirements once the payment has been sent. + * + * The builder will have the provided expiration set. Any changes to the expiration on the + * returned builder will not be honored by [`ChannelManager`]. For `no-std`, the highest seen + * block time minus two hours is used for the current time when determining if the refund has + * expired. + * + * To revoke the refund, use [`ChannelManager::abandon_payment`] prior to receiving the + * invoice. If abandoned, or an invoice isn't received before expiration, the payment will fail + * with an [`Event::InvoiceRequestFailed`]. + * + * If `max_total_routing_fee_msat` is not specified, The default from + * [`RouteParameters::from_payment_params_and_value`] is applied. + * + * # Privacy + * + * Uses [`MessageRouter::create_blinded_paths`] to construct a [`BlindedPath`] for the refund. + * However, if one is not found, uses a one-hop [`BlindedPath`] with + * [`ChannelManager::get_our_node_id`] as the introduction node instead. In the latter case, + * the node must be announced, otherwise, there is no way to find a path to the introduction in + * order to send the [`Bolt12Invoice`]. + * + * Also, uses a derived payer id in the refund for payer privacy. + * + * # Limitations + * + * Requires a direct connection to an introduction node in the responding + * [`Bolt12Invoice::payment_paths`]. + * + * # Errors + * + * Errors if: + * - a duplicate `payment_id` is provided given the caveats in the aforementioned link, + * - `amount_msats` is invalid, or + * - the parameterized [`Router`] is unable to create a blinded path for the refund. + * + * [`Refund`]: crate::offers::refund::Refund + * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice + * [`Bolt12Invoice::payment_paths`]: crate::offers::invoice::Bolt12Invoice::payment_paths + * [Avoiding Duplicate Payments]: #avoiding-duplicate-payments + */ + public create_refund_builder(amount_msats: bigint, absolute_expiry: bigint, payment_id: Uint8Array, retry_strategy: Retry, max_total_routing_fee_msat: Option_u64Z): Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ { + const ret: bigint = bindings.ChannelManager_create_refund_builder(this.ptr, amount_msats, absolute_expiry, bindings.encodeUint8Array(bindings.check_arr_len(payment_id, 32)), CommonBase.get_ptr_of(retry_strategy), CommonBase.get_ptr_of(max_total_routing_fee_msat)); + const ret_hu_conv: Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ = Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(this, retry_strategy); + CommonBase.add_ref_from(this, max_total_routing_fee_msat); return ret_hu_conv; } @@ -1521,6 +2342,7 @@ export class ChannelManager extends CommonBase { * Errors if: * - a duplicate `payment_id` is provided given the caveats in the aforementioned link, * - the provided parameters are invalid for the offer, + * - the offer is for an unsupported chain, or * - the parameterized [`Router`] is unable to create a blinded reply path for the invoice * request. * @@ -1533,7 +2355,7 @@ export class ChannelManager extends CommonBase { * [Avoiding Duplicate Payments]: #avoiding-duplicate-payments */ public pay_for_offer(offer: Offer, quantity: Option_u64Z, amount_msats: Option_u64Z, payer_note: Option_StrZ, payment_id: Uint8Array, retry_strategy: Retry, max_total_routing_fee_msat: Option_u64Z): Result_NoneBolt12SemanticErrorZ { - const ret: bigint = bindings.ChannelManager_pay_for_offer(this.ptr, offer == null ? 0n : CommonBase.get_ptr_of(offer), CommonBase.get_ptr_of(quantity), CommonBase.get_ptr_of(amount_msats), CommonBase.get_ptr_of(payer_note), bindings.encodeUint8Array(bindings.check_arr_len(payment_id, 32)), CommonBase.get_ptr_of(retry_strategy), CommonBase.get_ptr_of(max_total_routing_fee_msat)); + const ret: bigint = bindings.ChannelManager_pay_for_offer(this.ptr, CommonBase.get_ptr_of(offer), CommonBase.get_ptr_of(quantity), CommonBase.get_ptr_of(amount_msats), CommonBase.get_ptr_of(payer_note), bindings.encodeUint8Array(bindings.check_arr_len(payment_id, 32)), CommonBase.get_ptr_of(retry_strategy), CommonBase.get_ptr_of(max_total_routing_fee_msat)); const ret_hu_conv: Result_NoneBolt12SemanticErrorZ = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, offer); CommonBase.add_ref_from(this, quantity); @@ -1550,7 +2372,7 @@ export class ChannelManager extends CommonBase { * * The resulting invoice uses a [`PaymentHash`] recognized by the [`ChannelManager`] and a * [`BlindedPath`] containing the [`PaymentSecret`] needed to reconstruct the corresponding - * [`PaymentPreimage`]. + * [`PaymentPreimage`]. It is returned purely for informational purposes. * * # Limitations * @@ -1561,14 +2383,16 @@ export class ChannelManager extends CommonBase { * * # Errors * - * Errors if the parameterized [`Router`] is unable to create a blinded payment path or reply - * path for the invoice. + * Errors if: + * - the refund is for an unsupported chain, or + * - the parameterized [`Router`] is unable to create a blinded payment path or reply path for + * the invoice. * * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice */ - public request_refund_payment(refund: Refund): Result_NoneBolt12SemanticErrorZ { - const ret: bigint = bindings.ChannelManager_request_refund_payment(this.ptr, refund == null ? 0n : CommonBase.get_ptr_of(refund)); - const ret_hu_conv: Result_NoneBolt12SemanticErrorZ = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret); + public request_refund_payment(refund: Refund): Result_Bolt12InvoiceBolt12SemanticErrorZ { + const ret: bigint = bindings.ChannelManager_request_refund_payment(this.ptr, CommonBase.get_ptr_of(refund)); + const ret_hu_conv: Result_Bolt12InvoiceBolt12SemanticErrorZ = Result_Bolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, refund); return ret_hu_conv; } @@ -1580,10 +2404,9 @@ export class ChannelManager extends CommonBase { * This differs from [`create_inbound_payment_for_hash`] only in that it generates the * [`PaymentHash`] and [`PaymentPreimage`] for you. * - * The [`PaymentPreimage`] will ultimately be returned to you in the [`PaymentClaimable`], which - * will have the [`PaymentClaimable::purpose`] be [`PaymentPurpose::InvoicePayment`] with - * its [`PaymentPurpose::InvoicePayment::payment_preimage`] field filled in. That should then be - * passed directly to [`claim_funds`]. + * The [`PaymentPreimage`] will ultimately be returned to you in the [`PaymentClaimable`] event, which + * will have the [`PaymentClaimable::purpose`] return `Some` for [`PaymentPurpose::preimage`]. That + * should then be passed directly to [`claim_funds`]. * * See [`create_inbound_payment_for_hash`] for detailed documentation on behavior and requirements. * @@ -1603,8 +2426,7 @@ export class ChannelManager extends CommonBase { * [`claim_funds`]: Self::claim_funds * [`PaymentClaimable`]: events::Event::PaymentClaimable * [`PaymentClaimable::purpose`]: events::Event::PaymentClaimable::purpose - * [`PaymentPurpose::InvoicePayment`]: events::PaymentPurpose::InvoicePayment - * [`PaymentPurpose::InvoicePayment::payment_preimage`]: events::PaymentPurpose::InvoicePayment::payment_preimage + * [`PaymentPurpose::preimage`]: events::PaymentPurpose::preimage * [`create_inbound_payment_for_hash`]: Self::create_inbound_payment_for_hash */ public create_inbound_payment(min_value_msat: Option_u64Z, invoice_expiry_delta_secs: number, min_final_cltv_expiry_delta: Option_u16Z): Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ { @@ -1793,6 +2615,9 @@ export class ChannelManager extends CommonBase { /** * Returns true if this [`ChannelManager`] needs to be persisted. + * + * See [`Self::get_event_or_persistence_needed_future`] for retrieving a [`Future`] that + * indicates this should be checked. */ public get_and_clear_needs_persistence(): boolean { const ret: boolean = bindings.ChannelManager_get_and_clear_needs_persistence(this.ptr); @@ -1876,6 +2701,17 @@ export class ChannelManager extends CommonBase { return ret_hu_conv; } + /** + * Constructs a new NodeIdLookUp which calls the relevant methods on this_arg. + * This copies the `inner` pointer in this_arg and thus the returned NodeIdLookUp must be freed before this_arg is + */ + public as_NodeIdLookUp(): NodeIdLookUp { + const ret: bigint = bindings.ChannelManager_as_NodeIdLookUp(this.ptr); + const ret_hu_conv: NodeIdLookUp = new NodeIdLookUp(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + /** * Serialize the ChannelManager object into a byte array which can be read by ChannelManager_read */ diff --git a/ts/structs/ChannelManagerReadArgs.mts b/ts/structs/ChannelManagerReadArgs.mts index 82b74522..c2255e3d 100644 --- a/ts/structs/ChannelManagerReadArgs.mts +++ b/ts/structs/ChannelManagerReadArgs.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,10 +600,14 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -824,7 +889,7 @@ export class ChannelManagerReadArgs extends CommonBase { * runtime settings which were stored when the ChannelManager was serialized. */ public set_default_config(val: UserConfig): void { - bindings.ChannelManagerReadArgs_set_default_config(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.ChannelManagerReadArgs_set_default_config(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -834,7 +899,7 @@ export class ChannelManagerReadArgs extends CommonBase { * populate a HashMap directly from C. */ public static constructor_new(entropy_source: EntropySource, node_signer: NodeSigner, signer_provider: SignerProvider, fee_estimator: FeeEstimator, chain_monitor: Watch, tx_broadcaster: BroadcasterInterface, router: Router, logger: Logger, default_config: UserConfig, channel_monitors: ChannelMonitor[]): ChannelManagerReadArgs { - const ret: bigint = bindings.ChannelManagerReadArgs_new(CommonBase.get_ptr_of(entropy_source), CommonBase.get_ptr_of(node_signer), CommonBase.get_ptr_of(signer_provider), CommonBase.get_ptr_of(fee_estimator), CommonBase.get_ptr_of(chain_monitor), CommonBase.get_ptr_of(tx_broadcaster), CommonBase.get_ptr_of(router), CommonBase.get_ptr_of(logger), default_config == null ? 0n : CommonBase.get_ptr_of(default_config), bindings.encodeUint64Array(channel_monitors.map(channel_monitors_conv_16 => channel_monitors_conv_16 == null ? 0n : CommonBase.get_ptr_of(channel_monitors_conv_16)))); + const ret: bigint = bindings.ChannelManagerReadArgs_new(CommonBase.get_ptr_of(entropy_source), CommonBase.get_ptr_of(node_signer), CommonBase.get_ptr_of(signer_provider), CommonBase.get_ptr_of(fee_estimator), CommonBase.get_ptr_of(chain_monitor), CommonBase.get_ptr_of(tx_broadcaster), CommonBase.get_ptr_of(router), CommonBase.get_ptr_of(logger), CommonBase.get_ptr_of(default_config), bindings.encodeUint64Array(channel_monitors.map(channel_monitors_conv_16 => CommonBase.get_ptr_of(channel_monitors_conv_16)))); const ret_hu_conv: ChannelManagerReadArgs = new ChannelManagerReadArgs(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, entropy_source); diff --git a/ts/structs/ChannelMessageHandler.mts b/ts/structs/ChannelMessageHandler.mts index c374a8ce..f33bd052 100644 --- a/ts/structs/ChannelMessageHandler.mts +++ b/ts/structs/ChannelMessageHandler.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { FailureCode } from '../structs/FailureCode.mjs'; import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -630,15 +695,6 @@ export interface ChannelMessageHandlerInterface { /**Handle an incoming `stfu` message from the given peer. */ handle_stfu(their_node_id: Uint8Array, msg: Stfu): void; - /**Handle an incoming `splice` message from the given peer. - */ - handle_splice(their_node_id: Uint8Array, msg: Splice): void; - /**Handle an incoming `splice_ack` message from the given peer. - */ - handle_splice_ack(their_node_id: Uint8Array, msg: SpliceAck): void; - /**Handle an incoming `splice_locked` message from the given peer. - */ - handle_splice_locked(their_node_id: Uint8Array, msg: SpliceLocked): void; /**Handle an incoming `tx_add_input message` from the given peer. */ handle_tx_add_input(their_node_id: Uint8Array, msg: TxAddInput): void; @@ -806,21 +862,6 @@ export class ChannelMessageHandler extends CommonBase { const msg_hu_conv: Stfu = new Stfu(null, msg); arg.handle_stfu(their_node_id_conv, msg_hu_conv); }, - handle_splice (their_node_id: number, msg: bigint): void { - const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id); - const msg_hu_conv: Splice = new Splice(null, msg); - arg.handle_splice(their_node_id_conv, msg_hu_conv); - }, - handle_splice_ack (their_node_id: number, msg: bigint): void { - const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id); - const msg_hu_conv: SpliceAck = new SpliceAck(null, msg); - arg.handle_splice_ack(their_node_id_conv, msg_hu_conv); - }, - handle_splice_locked (their_node_id: number, msg: bigint): void { - const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id); - const msg_hu_conv: SpliceLocked = new SpliceLocked(null, msg); - arg.handle_splice_locked(their_node_id_conv, msg_hu_conv); - }, handle_tx_add_input (their_node_id: number, msg: bigint): void { const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id); const msg_hu_conv: TxAddInput = new TxAddInput(null, msg); @@ -914,7 +955,7 @@ export class ChannelMessageHandler extends CommonBase { const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id); const msg_hu_conv: Init = new Init(null, msg); const ret: Result_NoneNoneZ = arg.peer_connected(their_node_id_conv, msg_hu_conv, inbound); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, handle_channel_reestablish (their_node_id: number, msg: bigint): void { @@ -934,18 +975,18 @@ export class ChannelMessageHandler extends CommonBase { }, provided_node_features (): bigint { const ret: NodeFeatures = arg.provided_node_features(); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, provided_init_features (their_node_id: number): bigint { const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id); const ret: InitFeatures = arg.provided_init_features(their_node_id_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, get_chain_hashes (): bigint { const ret: Option_CVec_ThirtyTwoBytesZZ = arg.get_chain_hashes(); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); CommonBase.add_ref_from(impl_holder.held, ret); return result; }, @@ -964,7 +1005,7 @@ export class ChannelMessageHandler extends CommonBase { * Handle an incoming `open_channel` message from the given peer. */ public handle_open_channel(their_node_id: Uint8Array, msg: OpenChannel): void { - bindings.ChannelMessageHandler_handle_open_channel(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + bindings.ChannelMessageHandler_handle_open_channel(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(msg)); CommonBase.add_ref_from(this, msg); } @@ -972,7 +1013,7 @@ export class ChannelMessageHandler extends CommonBase { * Handle an incoming `open_channel2` message from the given peer. */ public handle_open_channel_v2(their_node_id: Uint8Array, msg: OpenChannelV2): void { - bindings.ChannelMessageHandler_handle_open_channel_v2(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + bindings.ChannelMessageHandler_handle_open_channel_v2(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(msg)); CommonBase.add_ref_from(this, msg); } @@ -980,7 +1021,7 @@ export class ChannelMessageHandler extends CommonBase { * Handle an incoming `accept_channel` message from the given peer. */ public handle_accept_channel(their_node_id: Uint8Array, msg: AcceptChannel): void { - bindings.ChannelMessageHandler_handle_accept_channel(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + bindings.ChannelMessageHandler_handle_accept_channel(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(msg)); CommonBase.add_ref_from(this, msg); } @@ -988,7 +1029,7 @@ export class ChannelMessageHandler extends CommonBase { * Handle an incoming `accept_channel2` message from the given peer. */ public handle_accept_channel_v2(their_node_id: Uint8Array, msg: AcceptChannelV2): void { - bindings.ChannelMessageHandler_handle_accept_channel_v2(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + bindings.ChannelMessageHandler_handle_accept_channel_v2(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(msg)); CommonBase.add_ref_from(this, msg); } @@ -996,7 +1037,7 @@ export class ChannelMessageHandler extends CommonBase { * Handle an incoming `funding_created` message from the given peer. */ public handle_funding_created(their_node_id: Uint8Array, msg: FundingCreated): void { - bindings.ChannelMessageHandler_handle_funding_created(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + bindings.ChannelMessageHandler_handle_funding_created(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(msg)); CommonBase.add_ref_from(this, msg); } @@ -1004,7 +1045,7 @@ export class ChannelMessageHandler extends CommonBase { * Handle an incoming `funding_signed` message from the given peer. */ public handle_funding_signed(their_node_id: Uint8Array, msg: FundingSigned): void { - bindings.ChannelMessageHandler_handle_funding_signed(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + bindings.ChannelMessageHandler_handle_funding_signed(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(msg)); CommonBase.add_ref_from(this, msg); } @@ -1012,7 +1053,7 @@ export class ChannelMessageHandler extends CommonBase { * Handle an incoming `channel_ready` message from the given peer. */ public handle_channel_ready(their_node_id: Uint8Array, msg: ChannelReady): void { - bindings.ChannelMessageHandler_handle_channel_ready(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + bindings.ChannelMessageHandler_handle_channel_ready(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(msg)); CommonBase.add_ref_from(this, msg); } @@ -1020,7 +1061,7 @@ export class ChannelMessageHandler extends CommonBase { * Handle an incoming `shutdown` message from the given peer. */ public handle_shutdown(their_node_id: Uint8Array, msg: Shutdown): void { - bindings.ChannelMessageHandler_handle_shutdown(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + bindings.ChannelMessageHandler_handle_shutdown(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(msg)); CommonBase.add_ref_from(this, msg); } @@ -1028,7 +1069,7 @@ export class ChannelMessageHandler extends CommonBase { * Handle an incoming `closing_signed` message from the given peer. */ public handle_closing_signed(their_node_id: Uint8Array, msg: ClosingSigned): void { - bindings.ChannelMessageHandler_handle_closing_signed(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + bindings.ChannelMessageHandler_handle_closing_signed(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(msg)); CommonBase.add_ref_from(this, msg); } @@ -1036,31 +1077,7 @@ export class ChannelMessageHandler extends CommonBase { * Handle an incoming `stfu` message from the given peer. */ public handle_stfu(their_node_id: Uint8Array, msg: Stfu): void { - bindings.ChannelMessageHandler_handle_stfu(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); - CommonBase.add_ref_from(this, msg); - } - - /** - * Handle an incoming `splice` message from the given peer. - */ - public handle_splice(their_node_id: Uint8Array, msg: Splice): void { - bindings.ChannelMessageHandler_handle_splice(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); - CommonBase.add_ref_from(this, msg); - } - - /** - * Handle an incoming `splice_ack` message from the given peer. - */ - public handle_splice_ack(their_node_id: Uint8Array, msg: SpliceAck): void { - bindings.ChannelMessageHandler_handle_splice_ack(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); - CommonBase.add_ref_from(this, msg); - } - - /** - * Handle an incoming `splice_locked` message from the given peer. - */ - public handle_splice_locked(their_node_id: Uint8Array, msg: SpliceLocked): void { - bindings.ChannelMessageHandler_handle_splice_locked(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + bindings.ChannelMessageHandler_handle_stfu(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(msg)); CommonBase.add_ref_from(this, msg); } @@ -1068,7 +1085,7 @@ export class ChannelMessageHandler extends CommonBase { * Handle an incoming `tx_add_input message` from the given peer. */ public handle_tx_add_input(their_node_id: Uint8Array, msg: TxAddInput): void { - bindings.ChannelMessageHandler_handle_tx_add_input(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + bindings.ChannelMessageHandler_handle_tx_add_input(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(msg)); CommonBase.add_ref_from(this, msg); } @@ -1076,7 +1093,7 @@ export class ChannelMessageHandler extends CommonBase { * Handle an incoming `tx_add_output` message from the given peer. */ public handle_tx_add_output(their_node_id: Uint8Array, msg: TxAddOutput): void { - bindings.ChannelMessageHandler_handle_tx_add_output(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + bindings.ChannelMessageHandler_handle_tx_add_output(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(msg)); CommonBase.add_ref_from(this, msg); } @@ -1084,7 +1101,7 @@ export class ChannelMessageHandler extends CommonBase { * Handle an incoming `tx_remove_input` message from the given peer. */ public handle_tx_remove_input(their_node_id: Uint8Array, msg: TxRemoveInput): void { - bindings.ChannelMessageHandler_handle_tx_remove_input(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + bindings.ChannelMessageHandler_handle_tx_remove_input(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(msg)); CommonBase.add_ref_from(this, msg); } @@ -1092,7 +1109,7 @@ export class ChannelMessageHandler extends CommonBase { * Handle an incoming `tx_remove_output` message from the given peer. */ public handle_tx_remove_output(their_node_id: Uint8Array, msg: TxRemoveOutput): void { - bindings.ChannelMessageHandler_handle_tx_remove_output(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + bindings.ChannelMessageHandler_handle_tx_remove_output(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(msg)); CommonBase.add_ref_from(this, msg); } @@ -1100,7 +1117,7 @@ export class ChannelMessageHandler extends CommonBase { * Handle an incoming `tx_complete message` from the given peer. */ public handle_tx_complete(their_node_id: Uint8Array, msg: TxComplete): void { - bindings.ChannelMessageHandler_handle_tx_complete(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + bindings.ChannelMessageHandler_handle_tx_complete(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(msg)); CommonBase.add_ref_from(this, msg); } @@ -1108,7 +1125,7 @@ export class ChannelMessageHandler extends CommonBase { * Handle an incoming `tx_signatures` message from the given peer. */ public handle_tx_signatures(their_node_id: Uint8Array, msg: TxSignatures): void { - bindings.ChannelMessageHandler_handle_tx_signatures(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + bindings.ChannelMessageHandler_handle_tx_signatures(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(msg)); CommonBase.add_ref_from(this, msg); } @@ -1116,7 +1133,7 @@ export class ChannelMessageHandler extends CommonBase { * Handle an incoming `tx_init_rbf` message from the given peer. */ public handle_tx_init_rbf(their_node_id: Uint8Array, msg: TxInitRbf): void { - bindings.ChannelMessageHandler_handle_tx_init_rbf(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + bindings.ChannelMessageHandler_handle_tx_init_rbf(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(msg)); CommonBase.add_ref_from(this, msg); } @@ -1124,7 +1141,7 @@ export class ChannelMessageHandler extends CommonBase { * Handle an incoming `tx_ack_rbf` message from the given peer. */ public handle_tx_ack_rbf(their_node_id: Uint8Array, msg: TxAckRbf): void { - bindings.ChannelMessageHandler_handle_tx_ack_rbf(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + bindings.ChannelMessageHandler_handle_tx_ack_rbf(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(msg)); CommonBase.add_ref_from(this, msg); } @@ -1132,7 +1149,7 @@ export class ChannelMessageHandler extends CommonBase { * Handle an incoming `tx_abort message` from the given peer. */ public handle_tx_abort(their_node_id: Uint8Array, msg: TxAbort): void { - bindings.ChannelMessageHandler_handle_tx_abort(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + bindings.ChannelMessageHandler_handle_tx_abort(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(msg)); CommonBase.add_ref_from(this, msg); } @@ -1140,7 +1157,7 @@ export class ChannelMessageHandler extends CommonBase { * Handle an incoming `update_add_htlc` message from the given peer. */ public handle_update_add_htlc(their_node_id: Uint8Array, msg: UpdateAddHTLC): void { - bindings.ChannelMessageHandler_handle_update_add_htlc(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + bindings.ChannelMessageHandler_handle_update_add_htlc(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(msg)); CommonBase.add_ref_from(this, msg); } @@ -1148,7 +1165,7 @@ export class ChannelMessageHandler extends CommonBase { * Handle an incoming `update_fulfill_htlc` message from the given peer. */ public handle_update_fulfill_htlc(their_node_id: Uint8Array, msg: UpdateFulfillHTLC): void { - bindings.ChannelMessageHandler_handle_update_fulfill_htlc(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + bindings.ChannelMessageHandler_handle_update_fulfill_htlc(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(msg)); CommonBase.add_ref_from(this, msg); } @@ -1156,7 +1173,7 @@ export class ChannelMessageHandler extends CommonBase { * Handle an incoming `update_fail_htlc` message from the given peer. */ public handle_update_fail_htlc(their_node_id: Uint8Array, msg: UpdateFailHTLC): void { - bindings.ChannelMessageHandler_handle_update_fail_htlc(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + bindings.ChannelMessageHandler_handle_update_fail_htlc(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(msg)); CommonBase.add_ref_from(this, msg); } @@ -1164,7 +1181,7 @@ export class ChannelMessageHandler extends CommonBase { * Handle an incoming `update_fail_malformed_htlc` message from the given peer. */ public handle_update_fail_malformed_htlc(their_node_id: Uint8Array, msg: UpdateFailMalformedHTLC): void { - bindings.ChannelMessageHandler_handle_update_fail_malformed_htlc(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + bindings.ChannelMessageHandler_handle_update_fail_malformed_htlc(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(msg)); CommonBase.add_ref_from(this, msg); } @@ -1172,7 +1189,7 @@ export class ChannelMessageHandler extends CommonBase { * Handle an incoming `commitment_signed` message from the given peer. */ public handle_commitment_signed(their_node_id: Uint8Array, msg: CommitmentSigned): void { - bindings.ChannelMessageHandler_handle_commitment_signed(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + bindings.ChannelMessageHandler_handle_commitment_signed(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(msg)); CommonBase.add_ref_from(this, msg); } @@ -1180,7 +1197,7 @@ export class ChannelMessageHandler extends CommonBase { * Handle an incoming `revoke_and_ack` message from the given peer. */ public handle_revoke_and_ack(their_node_id: Uint8Array, msg: RevokeAndACK): void { - bindings.ChannelMessageHandler_handle_revoke_and_ack(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + bindings.ChannelMessageHandler_handle_revoke_and_ack(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(msg)); CommonBase.add_ref_from(this, msg); } @@ -1188,7 +1205,7 @@ export class ChannelMessageHandler extends CommonBase { * Handle an incoming `update_fee` message from the given peer. */ public handle_update_fee(their_node_id: Uint8Array, msg: UpdateFee): void { - bindings.ChannelMessageHandler_handle_update_fee(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + bindings.ChannelMessageHandler_handle_update_fee(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(msg)); CommonBase.add_ref_from(this, msg); } @@ -1196,7 +1213,7 @@ export class ChannelMessageHandler extends CommonBase { * Handle an incoming `announcement_signatures` message from the given peer. */ public handle_announcement_signatures(their_node_id: Uint8Array, msg: AnnouncementSignatures): void { - bindings.ChannelMessageHandler_handle_announcement_signatures(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + bindings.ChannelMessageHandler_handle_announcement_signatures(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(msg)); CommonBase.add_ref_from(this, msg); } @@ -1215,7 +1232,7 @@ export class ChannelMessageHandler extends CommonBase { * message handlers may still wish to communicate with this peer. */ public peer_connected(their_node_id: Uint8Array, msg: Init, inbound: boolean): Result_NoneNoneZ { - const ret: bigint = bindings.ChannelMessageHandler_peer_connected(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg), inbound); + const ret: bigint = bindings.ChannelMessageHandler_peer_connected(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(msg), inbound); const ret_hu_conv: Result_NoneNoneZ = Result_NoneNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, msg); return ret_hu_conv; @@ -1225,7 +1242,7 @@ export class ChannelMessageHandler extends CommonBase { * Handle an incoming `channel_reestablish` message from the given peer. */ public handle_channel_reestablish(their_node_id: Uint8Array, msg: ChannelReestablish): void { - bindings.ChannelMessageHandler_handle_channel_reestablish(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + bindings.ChannelMessageHandler_handle_channel_reestablish(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(msg)); CommonBase.add_ref_from(this, msg); } @@ -1233,7 +1250,7 @@ export class ChannelMessageHandler extends CommonBase { * Handle an incoming `channel_update` message from the given peer. */ public handle_channel_update(their_node_id: Uint8Array, msg: ChannelUpdate): void { - bindings.ChannelMessageHandler_handle_channel_update(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + bindings.ChannelMessageHandler_handle_channel_update(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(msg)); CommonBase.add_ref_from(this, msg); } @@ -1241,7 +1258,7 @@ export class ChannelMessageHandler extends CommonBase { * Handle an incoming `error` message from the given peer. */ public handle_error(their_node_id: Uint8Array, msg: ErrorMessage): void { - bindings.ChannelMessageHandler_handle_error(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + bindings.ChannelMessageHandler_handle_error(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(msg)); CommonBase.add_ref_from(this, msg); } diff --git a/ts/structs/ChannelMonitor.mts b/ts/structs/ChannelMonitor.mts index 3e2e4f88..6e17eb97 100644 --- a/ts/structs/ChannelMonitor.mts +++ b/ts/structs/ChannelMonitor.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -646,7 +711,7 @@ export class ChannelMonitor extends CommonBase { * panics if the given update is not the next update by update_id. */ public update_monitor(updates: ChannelMonitorUpdate, broadcaster: BroadcasterInterface, fee_estimator: FeeEstimator, logger: Logger): Result_NoneNoneZ { - const ret: bigint = bindings.ChannelMonitor_update_monitor(this.ptr, updates == null ? 0n : CommonBase.get_ptr_of(updates), CommonBase.get_ptr_of(broadcaster), CommonBase.get_ptr_of(fee_estimator), CommonBase.get_ptr_of(logger)); + const ret: bigint = bindings.ChannelMonitor_update_monitor(this.ptr, CommonBase.get_ptr_of(updates), CommonBase.get_ptr_of(broadcaster), CommonBase.get_ptr_of(fee_estimator), CommonBase.get_ptr_of(logger)); const ret_hu_conv: Result_NoneNoneZ = Result_NoneNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, updates); CommonBase.add_ref_from(this, broadcaster); @@ -674,6 +739,16 @@ export class ChannelMonitor extends CommonBase { return ret_hu_conv; } + /** + * Gets the channel_id of the channel this ChannelMonitor is monitoring for. + */ + public channel_id(): ChannelId { + const ret: bigint = bindings.ChannelMonitor_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + /** * Gets a list of txids, with their output scripts (in the order they appear in the * transaction), which we must learn about spends of via block_connected(). @@ -787,7 +862,7 @@ export class ChannelMonitor extends CommonBase { * [`Persist::update_persisted_channel`]: crate::chain::chainmonitor::Persist::update_persisted_channel */ public counterparty_commitment_txs_from_update(update: ChannelMonitorUpdate): CommitmentTransaction[] { - const ret: number = bindings.ChannelMonitor_counterparty_commitment_txs_from_update(this.ptr, update == null ? 0n : CommonBase.get_ptr_of(update)); + const ret: number = bindings.ChannelMonitor_counterparty_commitment_txs_from_update(this.ptr, CommonBase.get_ptr_of(update)); const ret_conv_23_len: number = bindings.getArrayLength(ret); const ret_conv_23_arr: CommitmentTransaction[] = new Array(ret_conv_23_len).fill(null); for (var x = 0; x < ret_conv_23_len; x++) { @@ -841,33 +916,21 @@ export class ChannelMonitor extends CommonBase { } /** - * Used by [`ChannelManager`] deserialization to broadcast the latest holder state if its copy - * of the channel state was out-of-date. - * - * You may also use this to broadcast the latest local commitment transaction, either because + * You may use this to broadcast the latest local commitment transaction, either because * a monitor update failed or because we've fallen behind (i.e. we've received proof that our * counterparty side knows a revocation secret we gave them that they shouldn't know). * - * Broadcasting these transactions in the second case is UNSAFE, as they allow counterparty + * Broadcasting these transactions in this manner is UNSAFE, as they allow counterparty * side to punish you. Nevertheless you may want to broadcast them if counterparty doesn't * close channel with their commitment transaction after a substantial amount of time. Best * may be to contact the other node operator out-of-band to coordinate other options available * to you. - * - * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager */ - public get_latest_holder_commitment_txn(logger: Logger): Uint8Array[] { - const ret: number = bindings.ChannelMonitor_get_latest_holder_commitment_txn(this.ptr, CommonBase.get_ptr_of(logger)); - const ret_conv_12_len: number = bindings.getArrayLength(ret); - const ret_conv_12_arr: Uint8Array[] = new Array(ret_conv_12_len).fill(null); - for (var m = 0; m < ret_conv_12_len; m++) { - const ret_conv_12: number = bindings.getU32ArrayElem(ret, m); - const ret_conv_12_conv: Uint8Array = bindings.decodeUint8Array(ret_conv_12); - ret_conv_12_arr[m] = ret_conv_12_conv; - } - bindings.freeWasmMemory(ret) + public broadcast_latest_holder_commitment_txn(broadcaster: BroadcasterInterface, fee_estimator: FeeEstimator, logger: Logger): void { + bindings.ChannelMonitor_broadcast_latest_holder_commitment_txn(this.ptr, CommonBase.get_ptr_of(broadcaster), CommonBase.get_ptr_of(fee_estimator), CommonBase.get_ptr_of(logger)); + CommonBase.add_ref_from(this, broadcaster); + CommonBase.add_ref_from(this, fee_estimator); CommonBase.add_ref_from(this, logger); - return ret_conv_12_arr; } /** @@ -884,7 +947,7 @@ export class ChannelMonitor extends CommonBase { * [`get_outputs_to_watch`]: #method.get_outputs_to_watch */ public block_connected(header: Uint8Array, txdata: TwoTuple_usizeTransactionZ[], height: number, broadcaster: BroadcasterInterface, fee_estimator: FeeEstimator, logger: Logger): TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ[] { - const ret: number = bindings.ChannelMonitor_block_connected(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(header, 80)), bindings.encodeUint64Array(txdata.map(txdata_conv_28 => txdata_conv_28 != null ? CommonBase.get_ptr_of(txdata_conv_28) : 0n)), height, CommonBase.get_ptr_of(broadcaster), CommonBase.get_ptr_of(fee_estimator), CommonBase.get_ptr_of(logger)); + const ret: number = bindings.ChannelMonitor_block_connected(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(header, 80)), bindings.encodeUint64Array(txdata.map(txdata_conv_28 => CommonBase.get_ptr_of(txdata_conv_28))), height, CommonBase.get_ptr_of(broadcaster), CommonBase.get_ptr_of(fee_estimator), CommonBase.get_ptr_of(logger)); const ret_conv_49_len: number = bindings.getArrayLength(ret); const ret_conv_49_arr: TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ[] = new Array(ret_conv_49_len).fill(null); for (var x = 0; x < ret_conv_49_len; x++) { @@ -921,7 +984,7 @@ export class ChannelMonitor extends CommonBase { * [`block_connected`]: Self::block_connected */ public transactions_confirmed(header: Uint8Array, txdata: TwoTuple_usizeTransactionZ[], height: number, broadcaster: BroadcasterInterface, fee_estimator: FeeEstimator, logger: Logger): TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ[] { - const ret: number = bindings.ChannelMonitor_transactions_confirmed(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(header, 80)), bindings.encodeUint64Array(txdata.map(txdata_conv_28 => txdata_conv_28 != null ? CommonBase.get_ptr_of(txdata_conv_28) : 0n)), height, CommonBase.get_ptr_of(broadcaster), CommonBase.get_ptr_of(fee_estimator), CommonBase.get_ptr_of(logger)); + const ret: number = bindings.ChannelMonitor_transactions_confirmed(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(header, 80)), bindings.encodeUint64Array(txdata.map(txdata_conv_28 => CommonBase.get_ptr_of(txdata_conv_28))), height, CommonBase.get_ptr_of(broadcaster), CommonBase.get_ptr_of(fee_estimator), CommonBase.get_ptr_of(logger)); const ret_conv_49_len: number = bindings.getArrayLength(ret); const ret_conv_49_arr: TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ[] = new Array(ret_conv_49_len).fill(null); for (var x = 0; x < ret_conv_49_len; x++) { @@ -1020,6 +1083,17 @@ export class ChannelMonitor extends CommonBase { CommonBase.add_ref_from(this, logger); } + /** + * Triggers rebroadcasts of pending claims from a force-closed channel after a transaction + * signature generation failure. + */ + public signer_unblocked(broadcaster: BroadcasterInterface, fee_estimator: FeeEstimator, logger: Logger): void { + bindings.ChannelMonitor_signer_unblocked(this.ptr, CommonBase.get_ptr_of(broadcaster), CommonBase.get_ptr_of(fee_estimator), CommonBase.get_ptr_of(logger)); + CommonBase.add_ref_from(this, broadcaster); + CommonBase.add_ref_from(this, fee_estimator); + CommonBase.add_ref_from(this, logger); + } + /** * Returns the descriptors for relevant outputs (i.e., those that we can spend) within the * transaction if they exist and the transaction has at least [`ANTI_REORG_DELAY`] @@ -1054,6 +1128,19 @@ export class ChannelMonitor extends CommonBase { return ret_conv_27_arr; } + /** + * Checks if the monitor is fully resolved. Resolved monitor is one that has claimed all of + * its outputs and balances (i.e. [`Self::get_claimable_balances`] returns an empty set). + * + * This function returns true only if [`Self::get_claimable_balances`] has been empty for at least + * 4032 blocks as an additional protection against any bugs resulting in spuriously empty balance sets. + */ + public is_fully_resolved(logger: Logger): boolean { + const ret: boolean = bindings.ChannelMonitor_is_fully_resolved(this.ptr, CommonBase.get_ptr_of(logger)); + CommonBase.add_ref_from(this, logger); + return ret; + } + /** * Gets the balances in this channel which are either claimable by us if we were to * force-close the channel now or which are claimable on-chain (possibly awaiting diff --git a/ts/structs/ChannelMonitorUpdate.mts b/ts/structs/ChannelMonitorUpdate.mts index 31aa3b62..901ffe9d 100644 --- a/ts/structs/ChannelMonitorUpdate.mts +++ b/ts/structs/ChannelMonitorUpdate.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -654,6 +719,34 @@ export class ChannelMonitorUpdate extends CommonBase { bindings.ChannelMonitorUpdate_set_update_id(this.ptr, val); } + /** + * The channel ID associated with these updates. + * + * Will be `None` for `ChannelMonitorUpdate`s constructed on LDK versions prior to 0.0.121 and + * always `Some` otherwise. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public get_channel_id(): ChannelId { + const ret: bigint = bindings.ChannelMonitorUpdate_get_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * The channel ID associated with these updates. + * + * Will be `None` for `ChannelMonitorUpdate`s constructed on LDK versions prior to 0.0.121 and + * always `Some` otherwise. + * + * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public set_channel_id(val: ChannelId|null): void { + bindings.ChannelMonitorUpdate_set_channel_id(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); + } + public clone_ptr(): bigint { const ret: bigint = bindings.ChannelMonitorUpdate_clone_ptr(this.ptr); return ret; @@ -675,7 +768,7 @@ export class ChannelMonitorUpdate extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: ChannelMonitorUpdate): boolean { - const ret: boolean = bindings.ChannelMonitorUpdate_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.ChannelMonitorUpdate_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/ChannelPublicKeys.mts b/ts/structs/ChannelPublicKeys.mts index 5103dbcd..075be1bd 100644 --- a/ts/structs/ChannelPublicKeys.mts +++ b/ts/structs/ChannelPublicKeys.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -643,7 +708,7 @@ export class ChannelPublicKeys extends CommonBase { * states. */ public set_revocation_basepoint(val: RevocationBasepoint): void { - bindings.ChannelPublicKeys_set_revocation_basepoint(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.ChannelPublicKeys_set_revocation_basepoint(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -685,7 +750,7 @@ export class ChannelPublicKeys extends CommonBase { * after some delay (or can be claimed via the revocation path). */ public set_delayed_payment_basepoint(val: DelayedPaymentBasepoint): void { - bindings.ChannelPublicKeys_set_delayed_payment_basepoint(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.ChannelPublicKeys_set_delayed_payment_basepoint(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -705,7 +770,7 @@ export class ChannelPublicKeys extends CommonBase { * which is used to encumber HTLC-in-flight outputs. */ public set_htlc_basepoint(val: HtlcBasepoint): void { - bindings.ChannelPublicKeys_set_htlc_basepoint(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.ChannelPublicKeys_set_htlc_basepoint(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -713,7 +778,7 @@ export class ChannelPublicKeys extends CommonBase { * Constructs a new ChannelPublicKeys given each field */ public static constructor_new(funding_pubkey_arg: Uint8Array, revocation_basepoint_arg: RevocationBasepoint, payment_point_arg: Uint8Array, delayed_payment_basepoint_arg: DelayedPaymentBasepoint, htlc_basepoint_arg: HtlcBasepoint): ChannelPublicKeys { - const ret: bigint = bindings.ChannelPublicKeys_new(bindings.encodeUint8Array(bindings.check_arr_len(funding_pubkey_arg, 33)), revocation_basepoint_arg == null ? 0n : CommonBase.get_ptr_of(revocation_basepoint_arg), bindings.encodeUint8Array(bindings.check_arr_len(payment_point_arg, 33)), delayed_payment_basepoint_arg == null ? 0n : CommonBase.get_ptr_of(delayed_payment_basepoint_arg), htlc_basepoint_arg == null ? 0n : CommonBase.get_ptr_of(htlc_basepoint_arg)); + const ret: bigint = bindings.ChannelPublicKeys_new(bindings.encodeUint8Array(bindings.check_arr_len(funding_pubkey_arg, 33)), CommonBase.get_ptr_of(revocation_basepoint_arg), bindings.encodeUint8Array(bindings.check_arr_len(payment_point_arg, 33)), CommonBase.get_ptr_of(delayed_payment_basepoint_arg), CommonBase.get_ptr_of(htlc_basepoint_arg)); const ret_hu_conv: ChannelPublicKeys = new ChannelPublicKeys(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, revocation_basepoint_arg); @@ -751,7 +816,7 @@ export class ChannelPublicKeys extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: ChannelPublicKeys): boolean { - const ret: boolean = bindings.ChannelPublicKeys_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.ChannelPublicKeys_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/ChannelReady.mts b/ts/structs/ChannelReady.mts index 48962190..e6f727af 100644 --- a/ts/structs/ChannelReady.mts +++ b/ts/structs/ChannelReady.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -610,17 +675,19 @@ export class ChannelReady extends CommonBase { /** * The channel ID */ - public get_channel_id(): Uint8Array { - const ret: number = bindings.ChannelReady_get_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public get_channel_id(): ChannelId { + const ret: bigint = bindings.ChannelReady_get_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** * The channel ID */ - public set_channel_id(val: Uint8Array): void { - bindings.ChannelReady_set_channel_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + public set_channel_id(val: ChannelId): void { + bindings.ChannelReady_set_channel_id(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** @@ -666,10 +733,11 @@ export class ChannelReady extends CommonBase { /** * Constructs a new ChannelReady given each field */ - public static constructor_new(channel_id_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array, short_channel_id_alias_arg: Option_u64Z): ChannelReady { - const ret: bigint = bindings.ChannelReady_new(bindings.encodeUint8Array(bindings.check_arr_len(channel_id_arg, 32)), bindings.encodeUint8Array(bindings.check_arr_len(next_per_commitment_point_arg, 33)), CommonBase.get_ptr_of(short_channel_id_alias_arg)); + public static constructor_new(channel_id_arg: ChannelId, next_per_commitment_point_arg: Uint8Array, short_channel_id_alias_arg: Option_u64Z): ChannelReady { + const ret: bigint = bindings.ChannelReady_new(CommonBase.get_ptr_of(channel_id_arg), bindings.encodeUint8Array(bindings.check_arr_len(next_per_commitment_point_arg, 33)), CommonBase.get_ptr_of(short_channel_id_alias_arg)); const ret_hu_conv: ChannelReady = new ChannelReady(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, channel_id_arg); CommonBase.add_ref_from(ret_hu_conv, short_channel_id_alias_arg); return ret_hu_conv; } @@ -703,7 +771,7 @@ export class ChannelReady extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: ChannelReady): boolean { - const ret: boolean = bindings.ChannelReady_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.ChannelReady_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/ChannelReestablish.mts b/ts/structs/ChannelReestablish.mts index 9375b74c..c15b03ce 100644 --- a/ts/structs/ChannelReestablish.mts +++ b/ts/structs/ChannelReestablish.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -610,17 +675,19 @@ export class ChannelReestablish extends CommonBase { /** * The channel ID */ - public get_channel_id(): Uint8Array { - const ret: number = bindings.ChannelReestablish_get_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public get_channel_id(): ChannelId { + const ret: bigint = bindings.ChannelReestablish_get_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** * The channel ID */ - public set_channel_id(val: Uint8Array): void { - bindings.ChannelReestablish_set_channel_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + public set_channel_id(val: ChannelId): void { + bindings.ChannelReestablish_set_channel_id(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** @@ -708,10 +775,11 @@ export class ChannelReestablish extends CommonBase { /** * Constructs a new ChannelReestablish given each field */ - public static constructor_new(channel_id_arg: Uint8Array, next_local_commitment_number_arg: bigint, next_remote_commitment_number_arg: bigint, your_last_per_commitment_secret_arg: Uint8Array, my_current_per_commitment_point_arg: Uint8Array, next_funding_txid_arg: Option_ThirtyTwoBytesZ): ChannelReestablish { - const ret: bigint = bindings.ChannelReestablish_new(bindings.encodeUint8Array(bindings.check_arr_len(channel_id_arg, 32)), next_local_commitment_number_arg, next_remote_commitment_number_arg, bindings.encodeUint8Array(bindings.check_arr_len(your_last_per_commitment_secret_arg, 32)), bindings.encodeUint8Array(bindings.check_arr_len(my_current_per_commitment_point_arg, 33)), CommonBase.get_ptr_of(next_funding_txid_arg)); + public static constructor_new(channel_id_arg: ChannelId, next_local_commitment_number_arg: bigint, next_remote_commitment_number_arg: bigint, your_last_per_commitment_secret_arg: Uint8Array, my_current_per_commitment_point_arg: Uint8Array, next_funding_txid_arg: Option_ThirtyTwoBytesZ): ChannelReestablish { + const ret: bigint = bindings.ChannelReestablish_new(CommonBase.get_ptr_of(channel_id_arg), next_local_commitment_number_arg, next_remote_commitment_number_arg, bindings.encodeUint8Array(bindings.check_arr_len(your_last_per_commitment_secret_arg, 32)), bindings.encodeUint8Array(bindings.check_arr_len(my_current_per_commitment_point_arg, 33)), CommonBase.get_ptr_of(next_funding_txid_arg)); const ret_hu_conv: ChannelReestablish = new ChannelReestablish(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, channel_id_arg); CommonBase.add_ref_from(ret_hu_conv, next_funding_txid_arg); return ret_hu_conv; } @@ -745,7 +813,7 @@ export class ChannelReestablish extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: ChannelReestablish): boolean { - const ret: boolean = bindings.ChannelReestablish_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.ChannelReestablish_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/ChannelSigner.mts b/ts/structs/ChannelSigner.mts index 280cc739..7b1f8f19 100644 --- a/ts/structs/ChannelSigner.mts +++ b/ts/structs/ChannelSigner.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -700,13 +765,13 @@ export class ChannelSigner extends CommonBase { } bindings.freeWasmMemory(outbound_htlc_preimages) const ret: Result_NoneNoneZ = arg.validate_holder_commitment(holder_tx_hu_conv, outbound_htlc_preimages_conv_12_arr); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, validate_counterparty_revocation (idx: bigint, secret: number): bigint { const secret_conv: Uint8Array = bindings.decodeUint8Array(secret); const ret: Result_NoneNoneZ = arg.validate_counterparty_revocation(idx, secret_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, channel_keys_id (): number { @@ -719,7 +784,7 @@ export class ChannelSigner extends CommonBase { arg.provide_channel_parameters(channel_parameters_hu_conv); }, } as bindings.LDKChannelSigner; - const ptr_idx: [bigint, number] = bindings.LDKChannelSigner_new(structImplementation, pubkeys == null ? 0n : pubkeys.clone_ptr()); + const ptr_idx: [bigint, number] = bindings.LDKChannelSigner_new(structImplementation, pubkeys.clone_ptr()); impl_holder.held = new ChannelSigner(null, ptr_idx[0]); impl_holder.held.instance_idx = ptr_idx[1]; @@ -770,7 +835,7 @@ export class ChannelSigner extends CommonBase { * irrelevant or duplicate preimages. */ public validate_holder_commitment(holder_tx: HolderCommitmentTransaction, outbound_htlc_preimages: Uint8Array[]): Result_NoneNoneZ { - const ret: bigint = bindings.ChannelSigner_validate_holder_commitment(this.ptr, holder_tx == null ? 0n : CommonBase.get_ptr_of(holder_tx), bindings.encodeUint32Array(outbound_htlc_preimages.map(outbound_htlc_preimages_conv_12 => bindings.encodeUint8Array(bindings.check_arr_len(outbound_htlc_preimages_conv_12, 32))))); + const ret: bigint = bindings.ChannelSigner_validate_holder_commitment(this.ptr, CommonBase.get_ptr_of(holder_tx), bindings.encodeUint32Array(outbound_htlc_preimages.map(outbound_htlc_preimages_conv_12 => bindings.encodeUint8Array(bindings.check_arr_len(outbound_htlc_preimages_conv_12, 32))))); const ret_hu_conv: Result_NoneNoneZ = Result_NoneNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, holder_tx); return ret_hu_conv; @@ -811,7 +876,7 @@ export class ChannelSigner extends CommonBase { * channel_parameters.is_populated() MUST be true. */ public provide_channel_parameters(channel_parameters: ChannelTransactionParameters): void { - bindings.ChannelSigner_provide_channel_parameters(this.ptr, channel_parameters == null ? 0n : CommonBase.get_ptr_of(channel_parameters)); + bindings.ChannelSigner_provide_channel_parameters(this.ptr, CommonBase.get_ptr_of(channel_parameters)); CommonBase.add_ref_from(this, channel_parameters); } diff --git a/ts/structs/ChannelTransactionParameters.mts b/ts/structs/ChannelTransactionParameters.mts index 6570b9cc..27d46112 100644 --- a/ts/structs/ChannelTransactionParameters.mts +++ b/ts/structs/ChannelTransactionParameters.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -623,7 +688,7 @@ export class ChannelTransactionParameters extends CommonBase { * Holder public keys */ public set_holder_pubkeys(val: ChannelPublicKeys): void { - bindings.ChannelTransactionParameters_set_holder_pubkeys(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.ChannelTransactionParameters_set_holder_pubkeys(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -721,7 +786,7 @@ export class ChannelTransactionParameters extends CommonBase { * wasn't serialized, it will default to static_remote_key at deserialization. */ public set_channel_type_features(val: ChannelTypeFeatures): void { - bindings.ChannelTransactionParameters_set_channel_type_features(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.ChannelTransactionParameters_set_channel_type_features(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -732,7 +797,7 @@ export class ChannelTransactionParameters extends CommonBase { * Note that funding_outpoint_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ public static constructor_new(holder_pubkeys_arg: ChannelPublicKeys, holder_selected_contest_delay_arg: number, is_outbound_from_holder_arg: boolean, counterparty_parameters_arg: CounterpartyChannelTransactionParameters|null, funding_outpoint_arg: OutPoint|null, channel_type_features_arg: ChannelTypeFeatures): ChannelTransactionParameters { - const ret: bigint = bindings.ChannelTransactionParameters_new(holder_pubkeys_arg == null ? 0n : CommonBase.get_ptr_of(holder_pubkeys_arg), holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg == null ? 0n : CommonBase.get_ptr_of(counterparty_parameters_arg), funding_outpoint_arg == null ? 0n : CommonBase.get_ptr_of(funding_outpoint_arg), channel_type_features_arg == null ? 0n : CommonBase.get_ptr_of(channel_type_features_arg)); + const ret: bigint = bindings.ChannelTransactionParameters_new(CommonBase.get_ptr_of(holder_pubkeys_arg), holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg == null ? 0n : CommonBase.get_ptr_of(counterparty_parameters_arg), funding_outpoint_arg == null ? 0n : CommonBase.get_ptr_of(funding_outpoint_arg), CommonBase.get_ptr_of(channel_type_features_arg)); const ret_hu_conv: ChannelTransactionParameters = new ChannelTransactionParameters(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, holder_pubkeys_arg); @@ -771,7 +836,7 @@ export class ChannelTransactionParameters extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: ChannelTransactionParameters): boolean { - const ret: boolean = bindings.ChannelTransactionParameters_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.ChannelTransactionParameters_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/ChannelTypeFeatures.mts b/ts/structs/ChannelTypeFeatures.mts index 4bb970f5..35b643bb 100644 --- a/ts/structs/ChannelTypeFeatures.mts +++ b/ts/structs/ChannelTypeFeatures.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -620,7 +685,7 @@ export class ChannelTypeFeatures extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: ChannelTypeFeatures): boolean { - const ret: boolean = bindings.ChannelTypeFeatures_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.ChannelTypeFeatures_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } @@ -662,7 +727,7 @@ export class ChannelTypeFeatures extends CommonBase { * Returns true if this `Features` object contains required features unknown by `other`. */ public requires_unknown_bits_from(other: ChannelTypeFeatures): boolean { - const ret: boolean = bindings.ChannelTypeFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0n : CommonBase.get_ptr_of(other)); + const ret: boolean = bindings.ChannelTypeFeatures_requires_unknown_bits_from(this.ptr, CommonBase.get_ptr_of(other)); CommonBase.add_ref_from(this, other); return ret; } diff --git a/ts/structs/ChannelUpdate.mts b/ts/structs/ChannelUpdate.mts index 1403d360..33eff974 100644 --- a/ts/structs/ChannelUpdate.mts +++ b/ts/structs/ChannelUpdate.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -637,7 +702,7 @@ export class ChannelUpdate extends CommonBase { * The actual channel update */ public set_contents(val: UnsignedChannelUpdate): void { - bindings.ChannelUpdate_set_contents(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.ChannelUpdate_set_contents(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -645,7 +710,7 @@ export class ChannelUpdate extends CommonBase { * Constructs a new ChannelUpdate given each field */ public static constructor_new(signature_arg: Uint8Array, contents_arg: UnsignedChannelUpdate): ChannelUpdate { - const ret: bigint = bindings.ChannelUpdate_new(bindings.encodeUint8Array(bindings.check_arr_len(signature_arg, 64)), contents_arg == null ? 0n : CommonBase.get_ptr_of(contents_arg)); + const ret: bigint = bindings.ChannelUpdate_new(bindings.encodeUint8Array(bindings.check_arr_len(signature_arg, 64)), CommonBase.get_ptr_of(contents_arg)); const ret_hu_conv: ChannelUpdate = new ChannelUpdate(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, contents_arg); @@ -681,7 +746,7 @@ export class ChannelUpdate extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: ChannelUpdate): boolean { - const ret: boolean = bindings.ChannelUpdate_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.ChannelUpdate_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/ChannelUpdateInfo.mts b/ts/structs/ChannelUpdateInfo.mts index 433c07be..4b59da54 100644 --- a/ts/structs/ChannelUpdateInfo.mts +++ b/ts/structs/ChannelUpdateInfo.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -696,7 +761,7 @@ export class ChannelUpdateInfo extends CommonBase { * Fees charged when the channel is used for routing */ public set_fees(val: RoutingFees): void { - bindings.ChannelUpdateInfo_set_fees(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.ChannelUpdateInfo_set_fees(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -734,7 +799,7 @@ export class ChannelUpdateInfo extends CommonBase { * Note that last_update_message_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ public static constructor_new(last_update_arg: number, enabled_arg: boolean, cltv_expiry_delta_arg: number, htlc_minimum_msat_arg: bigint, htlc_maximum_msat_arg: bigint, fees_arg: RoutingFees, last_update_message_arg: ChannelUpdate|null): ChannelUpdateInfo { - const ret: bigint = bindings.ChannelUpdateInfo_new(last_update_arg, enabled_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg, fees_arg == null ? 0n : CommonBase.get_ptr_of(fees_arg), last_update_message_arg == null ? 0n : CommonBase.get_ptr_of(last_update_message_arg)); + const ret: bigint = bindings.ChannelUpdateInfo_new(last_update_arg, enabled_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg, CommonBase.get_ptr_of(fees_arg), last_update_message_arg == null ? 0n : CommonBase.get_ptr_of(last_update_message_arg)); const ret_hu_conv: ChannelUpdateInfo = new ChannelUpdateInfo(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, fees_arg); @@ -763,7 +828,7 @@ export class ChannelUpdateInfo extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: ChannelUpdateInfo): boolean { - const ret: boolean = bindings.ChannelUpdateInfo_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.ChannelUpdateInfo_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/ChannelUsage.mts b/ts/structs/ChannelUsage.mts index b6268850..0e063897 100644 --- a/ts/structs/ChannelUsage.mts +++ b/ts/structs/ChannelUsage.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/ClaimedHTLC.mts b/ts/structs/ClaimedHTLC.mts index ced04cf4..67f5e5c5 100644 --- a/ts/structs/ClaimedHTLC.mts +++ b/ts/structs/ClaimedHTLC.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -608,17 +673,19 @@ export class ClaimedHTLC extends CommonBase { /** * The `channel_id` of the channel over which the HTLC was received. */ - public get_channel_id(): Uint8Array { - const ret: number = bindings.ClaimedHTLC_get_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public get_channel_id(): ChannelId { + const ret: bigint = bindings.ClaimedHTLC_get_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** * The `channel_id` of the channel over which the HTLC was received. */ - public set_channel_id(val: Uint8Array): void { - bindings.ClaimedHTLC_set_channel_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + public set_channel_id(val: ChannelId): void { + bindings.ClaimedHTLC_set_channel_id(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** @@ -715,10 +782,11 @@ export class ClaimedHTLC extends CommonBase { /** * Constructs a new ClaimedHTLC given each field */ - public static constructor_new(channel_id_arg: Uint8Array, user_channel_id_arg: bigint, cltv_expiry_arg: number, value_msat_arg: bigint, counterparty_skimmed_fee_msat_arg: bigint): ClaimedHTLC { - const ret: bigint = bindings.ClaimedHTLC_new(bindings.encodeUint8Array(bindings.check_arr_len(channel_id_arg, 32)), bindings.encodeUint128(user_channel_id_arg), cltv_expiry_arg, value_msat_arg, counterparty_skimmed_fee_msat_arg); + public static constructor_new(channel_id_arg: ChannelId, user_channel_id_arg: bigint, cltv_expiry_arg: number, value_msat_arg: bigint, counterparty_skimmed_fee_msat_arg: bigint): ClaimedHTLC { + const ret: bigint = bindings.ClaimedHTLC_new(CommonBase.get_ptr_of(channel_id_arg), bindings.encodeUint128(user_channel_id_arg), cltv_expiry_arg, value_msat_arg, counterparty_skimmed_fee_msat_arg); const ret_hu_conv: ClaimedHTLC = new ClaimedHTLC(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, channel_id_arg); return ret_hu_conv; } @@ -743,7 +811,7 @@ export class ClaimedHTLC extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: ClaimedHTLC): boolean { - const ret: boolean = bindings.ClaimedHTLC_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.ClaimedHTLC_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/ClosingSigned.mts b/ts/structs/ClosingSigned.mts index 0456e3d6..da64b398 100644 --- a/ts/structs/ClosingSigned.mts +++ b/ts/structs/ClosingSigned.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -610,17 +675,19 @@ export class ClosingSigned extends CommonBase { /** * The channel ID */ - public get_channel_id(): Uint8Array { - const ret: number = bindings.ClosingSigned_get_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public get_channel_id(): ChannelId { + const ret: bigint = bindings.ClosingSigned_get_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** * The channel ID */ - public set_channel_id(val: Uint8Array): void { - bindings.ClosingSigned_set_channel_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + public set_channel_id(val: ChannelId): void { + bindings.ClosingSigned_set_channel_id(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** @@ -683,10 +750,11 @@ export class ClosingSigned extends CommonBase { * * Note that fee_range_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public static constructor_new(channel_id_arg: Uint8Array, fee_satoshis_arg: bigint, signature_arg: Uint8Array, fee_range_arg: ClosingSignedFeeRange|null): ClosingSigned { - const ret: bigint = bindings.ClosingSigned_new(bindings.encodeUint8Array(bindings.check_arr_len(channel_id_arg, 32)), fee_satoshis_arg, bindings.encodeUint8Array(bindings.check_arr_len(signature_arg, 64)), fee_range_arg == null ? 0n : CommonBase.get_ptr_of(fee_range_arg)); + public static constructor_new(channel_id_arg: ChannelId, fee_satoshis_arg: bigint, signature_arg: Uint8Array, fee_range_arg: ClosingSignedFeeRange|null): ClosingSigned { + const ret: bigint = bindings.ClosingSigned_new(CommonBase.get_ptr_of(channel_id_arg), fee_satoshis_arg, bindings.encodeUint8Array(bindings.check_arr_len(signature_arg, 64)), fee_range_arg == null ? 0n : CommonBase.get_ptr_of(fee_range_arg)); const ret_hu_conv: ClosingSigned = new ClosingSigned(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, channel_id_arg); CommonBase.add_ref_from(ret_hu_conv, fee_range_arg); return ret_hu_conv; } @@ -720,7 +788,7 @@ export class ClosingSigned extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: ClosingSigned): boolean { - const ret: boolean = bindings.ClosingSigned_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.ClosingSigned_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/ClosingSignedFeeRange.mts b/ts/structs/ClosingSignedFeeRange.mts index 55ee4b89..dc5da205 100644 --- a/ts/structs/ClosingSignedFeeRange.mts +++ b/ts/structs/ClosingSignedFeeRange.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -681,7 +746,7 @@ export class ClosingSignedFeeRange extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: ClosingSignedFeeRange): boolean { - const ret: boolean = bindings.ClosingSignedFeeRange_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.ClosingSignedFeeRange_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/ClosingTransaction.mts b/ts/structs/ClosingTransaction.mts index b7c20eeb..57442142 100644 --- a/ts/structs/ClosingTransaction.mts +++ b/ts/structs/ClosingTransaction.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -638,7 +703,7 @@ export class ClosingTransaction extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: ClosingTransaction): boolean { - const ret: boolean = bindings.ClosingTransaction_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.ClosingTransaction_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } @@ -647,7 +712,7 @@ export class ClosingTransaction extends CommonBase { * Construct an object of the class */ public static constructor_new(to_holder_value_sat: bigint, to_counterparty_value_sat: bigint, to_holder_script: Uint8Array, to_counterparty_script: Uint8Array, funding_outpoint: OutPoint): ClosingTransaction { - const ret: bigint = bindings.ClosingTransaction_new(to_holder_value_sat, to_counterparty_value_sat, bindings.encodeUint8Array(to_holder_script), bindings.encodeUint8Array(to_counterparty_script), funding_outpoint == null ? 0n : CommonBase.get_ptr_of(funding_outpoint)); + const ret: bigint = bindings.ClosingTransaction_new(to_holder_value_sat, to_counterparty_value_sat, bindings.encodeUint8Array(to_holder_script), bindings.encodeUint8Array(to_counterparty_script), CommonBase.get_ptr_of(funding_outpoint)); const ret_hu_conv: ClosingTransaction = new ClosingTransaction(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, funding_outpoint); @@ -678,7 +743,7 @@ export class ClosingTransaction extends CommonBase { * or using the built transaction. */ public verify(funding_outpoint: OutPoint): Result_TrustedClosingTransactionNoneZ { - const ret: bigint = bindings.ClosingTransaction_verify(this.ptr, funding_outpoint == null ? 0n : CommonBase.get_ptr_of(funding_outpoint)); + const ret: bigint = bindings.ClosingTransaction_verify(this.ptr, CommonBase.get_ptr_of(funding_outpoint)); const ret_hu_conv: Result_TrustedClosingTransactionNoneZ = Result_TrustedClosingTransactionNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, funding_outpoint); return ret_hu_conv; diff --git a/ts/structs/ClosureReason.mts b/ts/structs/ClosureReason.mts index 193db1b1..1cbdb417 100644 --- a/ts/structs/ClosureReason.mts +++ b/ts/structs/ClosureReason.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,16 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,7 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -606,14 +671,17 @@ export class ClosureReason extends CommonBase { switch (raw_ty) { case 0: return new ClosureReason_CounterpartyForceClosed(ptr); case 1: return new ClosureReason_HolderForceClosed(ptr); - case 2: return new ClosureReason_CooperativeClosure(ptr); - case 3: return new ClosureReason_CommitmentTxConfirmed(ptr); - case 4: return new ClosureReason_FundingTimedOut(ptr); - case 5: return new ClosureReason_ProcessingError(ptr); - case 6: return new ClosureReason_DisconnectedPeer(ptr); - case 7: return new ClosureReason_OutdatedChannelManager(ptr); - case 8: return new ClosureReason_CounterpartyCoopClosedUnfundedChannel(ptr); - case 9: return new ClosureReason_FundingBatchClosure(ptr); + case 2: return new ClosureReason_LegacyCooperativeClosure(ptr); + case 3: return new ClosureReason_CounterpartyInitiatedCooperativeClosure(ptr); + case 4: return new ClosureReason_LocallyInitiatedCooperativeClosure(ptr); + case 5: return new ClosureReason_CommitmentTxConfirmed(ptr); + case 6: return new ClosureReason_FundingTimedOut(ptr); + case 7: return new ClosureReason_ProcessingError(ptr); + case 8: return new ClosureReason_DisconnectedPeer(ptr); + case 9: return new ClosureReason_OutdatedChannelManager(ptr); + case 10: return new ClosureReason_CounterpartyCoopClosedUnfundedChannel(ptr); + case 11: return new ClosureReason_FundingBatchClosure(ptr); + case 12: return new ClosureReason_HTLCsTimedOut(ptr); default: throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface } @@ -638,7 +706,7 @@ export class ClosureReason extends CommonBase { * Utility method to constructs a new CounterpartyForceClosed-variant ClosureReason */ public static constructor_counterparty_force_closed(peer_msg: UntrustedString): ClosureReason { - const ret: bigint = bindings.ClosureReason_counterparty_force_closed(peer_msg == null ? 0n : CommonBase.get_ptr_of(peer_msg)); + const ret: bigint = bindings.ClosureReason_counterparty_force_closed(CommonBase.get_ptr_of(peer_msg)); const ret_hu_conv: ClosureReason = ClosureReason.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, peer_msg); @@ -656,10 +724,30 @@ export class ClosureReason extends CommonBase { } /** - * Utility method to constructs a new CooperativeClosure-variant ClosureReason + * Utility method to constructs a new LegacyCooperativeClosure-variant ClosureReason + */ + public static constructor_legacy_cooperative_closure(): ClosureReason { + const ret: bigint = bindings.ClosureReason_legacy_cooperative_closure(); + const ret_hu_conv: ClosureReason = ClosureReason.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + return ret_hu_conv; + } + + /** + * Utility method to constructs a new CounterpartyInitiatedCooperativeClosure-variant ClosureReason */ - public static constructor_cooperative_closure(): ClosureReason { - const ret: bigint = bindings.ClosureReason_cooperative_closure(); + public static constructor_counterparty_initiated_cooperative_closure(): ClosureReason { + const ret: bigint = bindings.ClosureReason_counterparty_initiated_cooperative_closure(); + const ret_hu_conv: ClosureReason = ClosureReason.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + return ret_hu_conv; + } + + /** + * Utility method to constructs a new LocallyInitiatedCooperativeClosure-variant ClosureReason + */ + public static constructor_locally_initiated_cooperative_closure(): ClosureReason { + const ret: bigint = bindings.ClosureReason_locally_initiated_cooperative_closure(); const ret_hu_conv: ClosureReason = ClosureReason.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); return ret_hu_conv; @@ -735,12 +823,22 @@ export class ClosureReason extends CommonBase { return ret_hu_conv; } + /** + * Utility method to constructs a new HTLCsTimedOut-variant ClosureReason + */ + public static constructor_htlcs_timed_out(): ClosureReason { + const ret: bigint = bindings.ClosureReason_htlcs_timed_out(); + const ret_hu_conv: ClosureReason = ClosureReason.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + return ret_hu_conv; + } + /** * Checks if two ClosureReasons contain equal inner contents. * This ignores pointers and is_owned flags and looks at the values in fields. */ public eq(b: ClosureReason): boolean { - const ret: boolean = bindings.ClosureReason_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.ClosureReason_eq(this.ptr, CommonBase.get_ptr_of(b)); return ret; } @@ -782,8 +880,22 @@ export class ClosureReason_HolderForceClosed extends ClosureReason { super(null, ptr); } } -/** A ClosureReason of type CooperativeClosure */ -export class ClosureReason_CooperativeClosure extends ClosureReason { +/** A ClosureReason of type LegacyCooperativeClosure */ +export class ClosureReason_LegacyCooperativeClosure extends ClosureReason { + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + } +} +/** A ClosureReason of type CounterpartyInitiatedCooperativeClosure */ +export class ClosureReason_CounterpartyInitiatedCooperativeClosure extends ClosureReason { + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + } +} +/** A ClosureReason of type LocallyInitiatedCooperativeClosure */ +export class ClosureReason_LocallyInitiatedCooperativeClosure extends ClosureReason { /* @internal */ public constructor(ptr: bigint) { super(null, ptr); @@ -845,3 +957,10 @@ export class ClosureReason_FundingBatchClosure extends ClosureReason { super(null, ptr); } } +/** A ClosureReason of type HTLCsTimedOut */ +export class ClosureReason_HTLCsTimedOut extends ClosureReason { + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + } +} diff --git a/ts/structs/CoinSelection.mts b/ts/structs/CoinSelection.mts index 6fece757..c8500098 100644 --- a/ts/structs/CoinSelection.mts +++ b/ts/structs/CoinSelection.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; import { Input } from '../structs/Input.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -629,7 +694,7 @@ export class CoinSelection extends CommonBase { * requiring additional fees. */ public set_confirmed_utxos(val: Utxo[]): void { - bindings.CoinSelection_set_confirmed_utxos(this.ptr, bindings.encodeUint64Array(val.map(val_conv_6 => val_conv_6 == null ? 0n : CommonBase.get_ptr_of(val_conv_6)))); + bindings.CoinSelection_set_confirmed_utxos(this.ptr, bindings.encodeUint64Array(val.map(val_conv_6 => CommonBase.get_ptr_of(val_conv_6)))); val.forEach((val_conv_6: Utxo) => { CommonBase.add_ref_from(this, val_conv_6); }); } @@ -661,7 +726,7 @@ export class CoinSelection extends CommonBase { * Constructs a new CoinSelection given each field */ public static constructor_new(confirmed_utxos_arg: Utxo[], change_output_arg: Option_TxOutZ): CoinSelection { - const ret: bigint = bindings.CoinSelection_new(bindings.encodeUint64Array(confirmed_utxos_arg.map(confirmed_utxos_arg_conv_6 => confirmed_utxos_arg_conv_6 == null ? 0n : CommonBase.get_ptr_of(confirmed_utxos_arg_conv_6))), CommonBase.get_ptr_of(change_output_arg)); + const ret: bigint = bindings.CoinSelection_new(bindings.encodeUint64Array(confirmed_utxos_arg.map(confirmed_utxos_arg_conv_6 => CommonBase.get_ptr_of(confirmed_utxos_arg_conv_6))), CommonBase.get_ptr_of(change_output_arg)); const ret_hu_conv: CoinSelection = new CoinSelection(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); confirmed_utxos_arg.forEach((confirmed_utxos_arg_conv_6: Utxo) => { CommonBase.add_ref_from(ret_hu_conv, confirmed_utxos_arg_conv_6); }); diff --git a/ts/structs/CoinSelectionSource.mts b/ts/structs/CoinSelectionSource.mts index 0a8bec2f..fac895f9 100644 --- a/ts/structs/CoinSelectionSource.mts +++ b/ts/structs/CoinSelectionSource.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -560,10 +620,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -578,8 +640,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; import { Wallet } from '../structs/Wallet.mjs'; @@ -684,13 +749,13 @@ export class CoinSelectionSource extends CommonBase { } bindings.freeWasmMemory(must_pay_to) const ret: Result_CoinSelectionNoneZ = arg.select_confirmed_utxos(claim_id_conv, must_spend_conv_7_arr, must_pay_to_conv_7_arr, target_feerate_sat_per_1000_weight); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, sign_psbt (psbt: number): bigint { const psbt_conv: Uint8Array = bindings.decodeUint8Array(psbt); const ret: Result_TransactionNoneZ = arg.sign_psbt(psbt_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, } as bindings.LDKCoinSelectionSource; @@ -731,7 +796,7 @@ export class CoinSelectionSource extends CommonBase { * set of other claims being double spent to a minimum. */ public select_confirmed_utxos(claim_id: Uint8Array, must_spend: Input[], must_pay_to: TxOut[], target_feerate_sat_per_1000_weight: number): Result_CoinSelectionNoneZ { - const ret: bigint = bindings.CoinSelectionSource_select_confirmed_utxos(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(claim_id, 32)), bindings.encodeUint64Array(must_spend.map(must_spend_conv_7 => must_spend_conv_7 == null ? 0n : CommonBase.get_ptr_of(must_spend_conv_7))), bindings.encodeUint64Array(must_pay_to.map(must_pay_to_conv_7 => CommonBase.get_ptr_of(must_pay_to_conv_7))), target_feerate_sat_per_1000_weight); + const ret: bigint = bindings.CoinSelectionSource_select_confirmed_utxos(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(claim_id, 32)), bindings.encodeUint64Array(must_spend.map(must_spend_conv_7 => CommonBase.get_ptr_of(must_spend_conv_7))), bindings.encodeUint64Array(must_pay_to.map(must_pay_to_conv_7 => CommonBase.get_ptr_of(must_pay_to_conv_7))), target_feerate_sat_per_1000_weight); const ret_hu_conv: Result_CoinSelectionNoneZ = Result_CoinSelectionNoneZ.constr_from_ptr(ret); must_spend.forEach((must_spend_conv_7: Input) => { CommonBase.add_ref_from(this, must_spend_conv_7); }); return ret_hu_conv; diff --git a/ts/structs/CommitmentSigned.mts b/ts/structs/CommitmentSigned.mts index ab980527..642a397d 100644 --- a/ts/structs/CommitmentSigned.mts +++ b/ts/structs/CommitmentSigned.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -610,17 +675,19 @@ export class CommitmentSigned extends CommonBase { /** * The channel ID */ - public get_channel_id(): Uint8Array { - const ret: number = bindings.CommitmentSigned_get_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public get_channel_id(): ChannelId { + const ret: bigint = bindings.CommitmentSigned_get_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** * The channel ID */ - public set_channel_id(val: Uint8Array): void { - bindings.CommitmentSigned_set_channel_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + public set_channel_id(val: ChannelId): void { + bindings.CommitmentSigned_set_channel_id(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** @@ -667,10 +734,11 @@ export class CommitmentSigned extends CommonBase { /** * Constructs a new CommitmentSigned given each field */ - public static constructor_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array, htlc_signatures_arg: Uint8Array[]): CommitmentSigned { - const ret: bigint = bindings.CommitmentSigned_new(bindings.encodeUint8Array(bindings.check_arr_len(channel_id_arg, 32)), bindings.encodeUint8Array(bindings.check_arr_len(signature_arg, 64)), bindings.encodeUint32Array(htlc_signatures_arg.map(htlc_signatures_arg_conv_12 => bindings.encodeUint8Array(bindings.check_arr_len(htlc_signatures_arg_conv_12, 64))))); + public static constructor_new(channel_id_arg: ChannelId, signature_arg: Uint8Array, htlc_signatures_arg: Uint8Array[]): CommitmentSigned { + const ret: bigint = bindings.CommitmentSigned_new(CommonBase.get_ptr_of(channel_id_arg), bindings.encodeUint8Array(bindings.check_arr_len(signature_arg, 64)), bindings.encodeUint32Array(htlc_signatures_arg.map(htlc_signatures_arg_conv_12 => bindings.encodeUint8Array(bindings.check_arr_len(htlc_signatures_arg_conv_12, 64))))); const ret_hu_conv: CommitmentSigned = new CommitmentSigned(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, channel_id_arg); return ret_hu_conv; } @@ -703,7 +771,7 @@ export class CommitmentSigned extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: CommitmentSigned): boolean { - const ret: boolean = bindings.CommitmentSigned_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.CommitmentSigned_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/CommitmentTransaction.mts b/ts/structs/CommitmentTransaction.mts index 026af10e..0aa1c0b4 100644 --- a/ts/structs/CommitmentTransaction.mts +++ b/ts/structs/CommitmentTransaction.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -708,7 +773,7 @@ export class CommitmentTransaction extends CommonBase { * or using the built transaction. */ public verify(channel_parameters: DirectedChannelTransactionParameters, broadcaster_keys: ChannelPublicKeys, countersignatory_keys: ChannelPublicKeys): Result_TrustedCommitmentTransactionNoneZ { - const ret: bigint = bindings.CommitmentTransaction_verify(this.ptr, channel_parameters == null ? 0n : CommonBase.get_ptr_of(channel_parameters), broadcaster_keys == null ? 0n : CommonBase.get_ptr_of(broadcaster_keys), countersignatory_keys == null ? 0n : CommonBase.get_ptr_of(countersignatory_keys)); + const ret: bigint = bindings.CommitmentTransaction_verify(this.ptr, CommonBase.get_ptr_of(channel_parameters), CommonBase.get_ptr_of(broadcaster_keys), CommonBase.get_ptr_of(countersignatory_keys)); const ret_hu_conv: Result_TrustedCommitmentTransactionNoneZ = Result_TrustedCommitmentTransactionNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, channel_parameters); CommonBase.add_ref_from(this, broadcaster_keys); diff --git a/ts/structs/CommitmentUpdate.mts b/ts/structs/CommitmentUpdate.mts index 430e76a3..3fd1dd50 100644 --- a/ts/structs/CommitmentUpdate.mts +++ b/ts/structs/CommitmentUpdate.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -627,7 +692,7 @@ export class CommitmentUpdate extends CommonBase { * `update_add_htlc` messages which should be sent */ public set_update_add_htlcs(val: UpdateAddHTLC[]): void { - bindings.CommitmentUpdate_set_update_add_htlcs(this.ptr, bindings.encodeUint64Array(val.map(val_conv_15 => val_conv_15 == null ? 0n : CommonBase.get_ptr_of(val_conv_15)))); + bindings.CommitmentUpdate_set_update_add_htlcs(this.ptr, bindings.encodeUint64Array(val.map(val_conv_15 => CommonBase.get_ptr_of(val_conv_15)))); val.forEach((val_conv_15: UpdateAddHTLC) => { CommonBase.add_ref_from(this, val_conv_15); }); } @@ -652,7 +717,7 @@ export class CommitmentUpdate extends CommonBase { * `update_fulfill_htlc` messages which should be sent */ public set_update_fulfill_htlcs(val: UpdateFulfillHTLC[]): void { - bindings.CommitmentUpdate_set_update_fulfill_htlcs(this.ptr, bindings.encodeUint64Array(val.map(val_conv_19 => val_conv_19 == null ? 0n : CommonBase.get_ptr_of(val_conv_19)))); + bindings.CommitmentUpdate_set_update_fulfill_htlcs(this.ptr, bindings.encodeUint64Array(val.map(val_conv_19 => CommonBase.get_ptr_of(val_conv_19)))); val.forEach((val_conv_19: UpdateFulfillHTLC) => { CommonBase.add_ref_from(this, val_conv_19); }); } @@ -677,7 +742,7 @@ export class CommitmentUpdate extends CommonBase { * `update_fail_htlc` messages which should be sent */ public set_update_fail_htlcs(val: UpdateFailHTLC[]): void { - bindings.CommitmentUpdate_set_update_fail_htlcs(this.ptr, bindings.encodeUint64Array(val.map(val_conv_16 => val_conv_16 == null ? 0n : CommonBase.get_ptr_of(val_conv_16)))); + bindings.CommitmentUpdate_set_update_fail_htlcs(this.ptr, bindings.encodeUint64Array(val.map(val_conv_16 => CommonBase.get_ptr_of(val_conv_16)))); val.forEach((val_conv_16: UpdateFailHTLC) => { CommonBase.add_ref_from(this, val_conv_16); }); } @@ -702,7 +767,7 @@ export class CommitmentUpdate extends CommonBase { * `update_fail_malformed_htlc` messages which should be sent */ public set_update_fail_malformed_htlcs(val: UpdateFailMalformedHTLC[]): void { - bindings.CommitmentUpdate_set_update_fail_malformed_htlcs(this.ptr, bindings.encodeUint64Array(val.map(val_conv_25 => val_conv_25 == null ? 0n : CommonBase.get_ptr_of(val_conv_25)))); + bindings.CommitmentUpdate_set_update_fail_malformed_htlcs(this.ptr, bindings.encodeUint64Array(val.map(val_conv_25 => CommonBase.get_ptr_of(val_conv_25)))); val.forEach((val_conv_25: UpdateFailMalformedHTLC) => { CommonBase.add_ref_from(this, val_conv_25); }); } @@ -742,7 +807,7 @@ export class CommitmentUpdate extends CommonBase { * A `commitment_signed` message which should be sent */ public set_commitment_signed(val: CommitmentSigned): void { - bindings.CommitmentUpdate_set_commitment_signed(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.CommitmentUpdate_set_commitment_signed(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -752,7 +817,7 @@ export class CommitmentUpdate extends CommonBase { * Note that update_fee_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ public static constructor_new(update_add_htlcs_arg: UpdateAddHTLC[], update_fulfill_htlcs_arg: UpdateFulfillHTLC[], update_fail_htlcs_arg: UpdateFailHTLC[], update_fail_malformed_htlcs_arg: UpdateFailMalformedHTLC[], update_fee_arg: UpdateFee|null, commitment_signed_arg: CommitmentSigned): CommitmentUpdate { - const ret: bigint = bindings.CommitmentUpdate_new(bindings.encodeUint64Array(update_add_htlcs_arg.map(update_add_htlcs_arg_conv_15 => update_add_htlcs_arg_conv_15 == null ? 0n : CommonBase.get_ptr_of(update_add_htlcs_arg_conv_15))), bindings.encodeUint64Array(update_fulfill_htlcs_arg.map(update_fulfill_htlcs_arg_conv_19 => update_fulfill_htlcs_arg_conv_19 == null ? 0n : CommonBase.get_ptr_of(update_fulfill_htlcs_arg_conv_19))), bindings.encodeUint64Array(update_fail_htlcs_arg.map(update_fail_htlcs_arg_conv_16 => update_fail_htlcs_arg_conv_16 == null ? 0n : CommonBase.get_ptr_of(update_fail_htlcs_arg_conv_16))), bindings.encodeUint64Array(update_fail_malformed_htlcs_arg.map(update_fail_malformed_htlcs_arg_conv_25 => update_fail_malformed_htlcs_arg_conv_25 == null ? 0n : CommonBase.get_ptr_of(update_fail_malformed_htlcs_arg_conv_25))), update_fee_arg == null ? 0n : CommonBase.get_ptr_of(update_fee_arg), commitment_signed_arg == null ? 0n : CommonBase.get_ptr_of(commitment_signed_arg)); + const ret: bigint = bindings.CommitmentUpdate_new(bindings.encodeUint64Array(update_add_htlcs_arg.map(update_add_htlcs_arg_conv_15 => CommonBase.get_ptr_of(update_add_htlcs_arg_conv_15))), bindings.encodeUint64Array(update_fulfill_htlcs_arg.map(update_fulfill_htlcs_arg_conv_19 => CommonBase.get_ptr_of(update_fulfill_htlcs_arg_conv_19))), bindings.encodeUint64Array(update_fail_htlcs_arg.map(update_fail_htlcs_arg_conv_16 => CommonBase.get_ptr_of(update_fail_htlcs_arg_conv_16))), bindings.encodeUint64Array(update_fail_malformed_htlcs_arg.map(update_fail_malformed_htlcs_arg_conv_25 => CommonBase.get_ptr_of(update_fail_malformed_htlcs_arg_conv_25))), update_fee_arg == null ? 0n : CommonBase.get_ptr_of(update_fee_arg), CommonBase.get_ptr_of(commitment_signed_arg)); const ret_hu_conv: CommitmentUpdate = new CommitmentUpdate(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); update_add_htlcs_arg.forEach((update_add_htlcs_arg_conv_15: UpdateAddHTLC) => { CommonBase.add_ref_from(ret_hu_conv, update_add_htlcs_arg_conv_15); }); @@ -793,7 +858,7 @@ export class CommitmentUpdate extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: CommitmentUpdate): boolean { - const ret: boolean = bindings.CommitmentUpdate_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.CommitmentUpdate_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/CommonAcceptChannelFields.mts b/ts/structs/CommonAcceptChannelFields.mts new file mode 100644 index 00000000..7409ebbb --- /dev/null +++ b/ts/structs/CommonAcceptChannelFields.mts @@ -0,0 +1,986 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + +/** + * Contains fields that are both common to [`accept_channel`] and `accept_channel2` messages. + * + * [`accept_channel`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-accept_channel-message + */ +export class CommonAcceptChannelFields extends CommonBase { + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.CommonAcceptChannelFields_free); + } + + /** + * The same `temporary_channel_id` received from the initiator's `open_channel2` or `open_channel` message. + */ + public get_temporary_channel_id(): ChannelId { + const ret: bigint = bindings.CommonAcceptChannelFields_get_temporary_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * The same `temporary_channel_id` received from the initiator's `open_channel2` or `open_channel` message. + */ + public set_temporary_channel_id(val: ChannelId): void { + bindings.CommonAcceptChannelFields_set_temporary_channel_id(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); + } + + /** + * The threshold below which outputs on transactions broadcast by the channel acceptor will be + * omitted + */ + public get_dust_limit_satoshis(): bigint { + const ret: bigint = bindings.CommonAcceptChannelFields_get_dust_limit_satoshis(this.ptr); + return ret; + } + + /** + * The threshold below which outputs on transactions broadcast by the channel acceptor will be + * omitted + */ + public set_dust_limit_satoshis(val: bigint): void { + bindings.CommonAcceptChannelFields_set_dust_limit_satoshis(this.ptr, val); + } + + /** + * The maximum inbound HTLC value in flight towards sender, in milli-satoshi + */ + public get_max_htlc_value_in_flight_msat(): bigint { + const ret: bigint = bindings.CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat(this.ptr); + return ret; + } + + /** + * The maximum inbound HTLC value in flight towards sender, in milli-satoshi + */ + public set_max_htlc_value_in_flight_msat(val: bigint): void { + bindings.CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat(this.ptr, val); + } + + /** + * The minimum HTLC size incoming to channel acceptor, in milli-satoshi + */ + public get_htlc_minimum_msat(): bigint { + const ret: bigint = bindings.CommonAcceptChannelFields_get_htlc_minimum_msat(this.ptr); + return ret; + } + + /** + * The minimum HTLC size incoming to channel acceptor, in milli-satoshi + */ + public set_htlc_minimum_msat(val: bigint): void { + bindings.CommonAcceptChannelFields_set_htlc_minimum_msat(this.ptr, val); + } + + /** + * Minimum depth of the funding transaction before the channel is considered open + */ + public get_minimum_depth(): number { + const ret: number = bindings.CommonAcceptChannelFields_get_minimum_depth(this.ptr); + return ret; + } + + /** + * Minimum depth of the funding transaction before the channel is considered open + */ + public set_minimum_depth(val: number): void { + bindings.CommonAcceptChannelFields_set_minimum_depth(this.ptr, val); + } + + /** + * The number of blocks which the counterparty will have to wait to claim on-chain funds if they + * broadcast a commitment transaction + */ + public get_to_self_delay(): number { + const ret: number = bindings.CommonAcceptChannelFields_get_to_self_delay(this.ptr); + return ret; + } + + /** + * The number of blocks which the counterparty will have to wait to claim on-chain funds if they + * broadcast a commitment transaction + */ + public set_to_self_delay(val: number): void { + bindings.CommonAcceptChannelFields_set_to_self_delay(this.ptr, val); + } + + /** + * The maximum number of inbound HTLCs towards channel acceptor + */ + public get_max_accepted_htlcs(): number { + const ret: number = bindings.CommonAcceptChannelFields_get_max_accepted_htlcs(this.ptr); + return ret; + } + + /** + * The maximum number of inbound HTLCs towards channel acceptor + */ + public set_max_accepted_htlcs(val: number): void { + bindings.CommonAcceptChannelFields_set_max_accepted_htlcs(this.ptr, val); + } + + /** + * The channel acceptor's key controlling the funding transaction + */ + public get_funding_pubkey(): Uint8Array { + const ret: number = bindings.CommonAcceptChannelFields_get_funding_pubkey(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + + /** + * The channel acceptor's key controlling the funding transaction + */ + public set_funding_pubkey(val: Uint8Array): void { + bindings.CommonAcceptChannelFields_set_funding_pubkey(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); + } + + /** + * Used to derive a revocation key for transactions broadcast by counterparty + */ + public get_revocation_basepoint(): Uint8Array { + const ret: number = bindings.CommonAcceptChannelFields_get_revocation_basepoint(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Used to derive a revocation key for transactions broadcast by counterparty + */ + public set_revocation_basepoint(val: Uint8Array): void { + bindings.CommonAcceptChannelFields_set_revocation_basepoint(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); + } + + /** + * A payment key to channel acceptor for transactions broadcast by counterparty + */ + public get_payment_basepoint(): Uint8Array { + const ret: number = bindings.CommonAcceptChannelFields_get_payment_basepoint(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + + /** + * A payment key to channel acceptor for transactions broadcast by counterparty + */ + public set_payment_basepoint(val: Uint8Array): void { + bindings.CommonAcceptChannelFields_set_payment_basepoint(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); + } + + /** + * Used to derive a payment key to channel acceptor for transactions broadcast by channel + * acceptor + */ + public get_delayed_payment_basepoint(): Uint8Array { + const ret: number = bindings.CommonAcceptChannelFields_get_delayed_payment_basepoint(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Used to derive a payment key to channel acceptor for transactions broadcast by channel + * acceptor + */ + public set_delayed_payment_basepoint(val: Uint8Array): void { + bindings.CommonAcceptChannelFields_set_delayed_payment_basepoint(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); + } + + /** + * Used to derive an HTLC payment key to channel acceptor for transactions broadcast by counterparty + */ + public get_htlc_basepoint(): Uint8Array { + const ret: number = bindings.CommonAcceptChannelFields_get_htlc_basepoint(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Used to derive an HTLC payment key to channel acceptor for transactions broadcast by counterparty + */ + public set_htlc_basepoint(val: Uint8Array): void { + bindings.CommonAcceptChannelFields_set_htlc_basepoint(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); + } + + /** + * The first to-be-broadcast-by-channel-acceptor transaction's per commitment point + */ + public get_first_per_commitment_point(): Uint8Array { + const ret: number = bindings.CommonAcceptChannelFields_get_first_per_commitment_point(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + + /** + * The first to-be-broadcast-by-channel-acceptor transaction's per commitment point + */ + public set_first_per_commitment_point(val: Uint8Array): void { + bindings.CommonAcceptChannelFields_set_first_per_commitment_point(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); + } + + /** + * Optionally, a request to pre-set the to-channel-acceptor output's scriptPubkey for when we + * collaboratively close + */ + public get_shutdown_scriptpubkey(): Option_CVec_u8ZZ { + const ret: bigint = bindings.CommonAcceptChannelFields_get_shutdown_scriptpubkey(this.ptr); + const ret_hu_conv: Option_CVec_u8ZZ = Option_CVec_u8ZZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * Optionally, a request to pre-set the to-channel-acceptor output's scriptPubkey for when we + * collaboratively close + */ + public set_shutdown_scriptpubkey(val: Option_CVec_u8ZZ): void { + bindings.CommonAcceptChannelFields_set_shutdown_scriptpubkey(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); + } + + /** + * The channel type that this channel will represent. If none is set, we derive the channel + * type from the intersection of our feature bits with our counterparty's feature bits from + * the Init message. + * + * This is required to match the equivalent field in [`OpenChannel`] or [`OpenChannelV2`]'s + * [`CommonOpenChannelFields::channel_type`]. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public get_channel_type(): ChannelTypeFeatures { + const ret: bigint = bindings.CommonAcceptChannelFields_get_channel_type(this.ptr); + const ret_hu_conv: ChannelTypeFeatures = new ChannelTypeFeatures(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * The channel type that this channel will represent. If none is set, we derive the channel + * type from the intersection of our feature bits with our counterparty's feature bits from + * the Init message. + * + * This is required to match the equivalent field in [`OpenChannel`] or [`OpenChannelV2`]'s + * [`CommonOpenChannelFields::channel_type`]. + * + * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public set_channel_type(val: ChannelTypeFeatures|null): void { + bindings.CommonAcceptChannelFields_set_channel_type(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); + } + + /** + * Constructs a new CommonAcceptChannelFields given each field + * + * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public static constructor_new(temporary_channel_id_arg: ChannelId, dust_limit_satoshis_arg: bigint, max_htlc_value_in_flight_msat_arg: bigint, htlc_minimum_msat_arg: bigint, minimum_depth_arg: number, to_self_delay_arg: number, max_accepted_htlcs_arg: number, funding_pubkey_arg: Uint8Array, revocation_basepoint_arg: Uint8Array, payment_basepoint_arg: Uint8Array, delayed_payment_basepoint_arg: Uint8Array, htlc_basepoint_arg: Uint8Array, first_per_commitment_point_arg: Uint8Array, shutdown_scriptpubkey_arg: Option_CVec_u8ZZ, channel_type_arg: ChannelTypeFeatures|null): CommonAcceptChannelFields { + const ret: bigint = bindings.CommonAcceptChannelFields_new(CommonBase.get_ptr_of(temporary_channel_id_arg), dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, bindings.encodeUint8Array(bindings.check_arr_len(funding_pubkey_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(revocation_basepoint_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(payment_basepoint_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(delayed_payment_basepoint_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(htlc_basepoint_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(first_per_commitment_point_arg, 33)), CommonBase.get_ptr_of(shutdown_scriptpubkey_arg), channel_type_arg == null ? 0n : CommonBase.get_ptr_of(channel_type_arg)); + const ret_hu_conv: CommonAcceptChannelFields = new CommonAcceptChannelFields(null, ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, temporary_channel_id_arg); + CommonBase.add_ref_from(ret_hu_conv, shutdown_scriptpubkey_arg); + CommonBase.add_ref_from(ret_hu_conv, channel_type_arg); + return ret_hu_conv; + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.CommonAcceptChannelFields_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a copy of the CommonAcceptChannelFields + */ + public clone(): CommonAcceptChannelFields { + const ret: bigint = bindings.CommonAcceptChannelFields_clone(this.ptr); + const ret_hu_conv: CommonAcceptChannelFields = new CommonAcceptChannelFields(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * Generates a non-cryptographic 64-bit hash of the CommonAcceptChannelFields. + */ + public hash(): bigint { + const ret: bigint = bindings.CommonAcceptChannelFields_hash(this.ptr); + return ret; + } + + /** + * Checks if two CommonAcceptChannelFieldss contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ + public eq(b: CommonAcceptChannelFields): boolean { + const ret: boolean = bindings.CommonAcceptChannelFields_eq(this.ptr, CommonBase.get_ptr_of(b)); + CommonBase.add_ref_from(this, b); + return ret; + } + +} diff --git a/ts/structs/CommonBase.mts b/ts/structs/CommonBase.mts index 45697fbe..19d4daa0 100644 --- a/ts/structs/CommonBase.mts +++ b/ts/structs/CommonBase.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -560,10 +620,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -578,8 +640,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/CommonOpenChannelFields.mts b/ts/structs/CommonOpenChannelFields.mts new file mode 100644 index 00000000..9ba5ad7d --- /dev/null +++ b/ts/structs/CommonOpenChannelFields.mts @@ -0,0 +1,1036 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + +/** + * Contains fields that are both common to [`open_channel`] and `open_channel2` messages. + * + * [`open_channel`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-open_channel-message + */ +export class CommonOpenChannelFields extends CommonBase { + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.CommonOpenChannelFields_free); + } + + /** + * The genesis hash of the blockchain where the channel is to be opened + */ + public get_chain_hash(): Uint8Array { + const ret: number = bindings.CommonOpenChannelFields_get_chain_hash(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + + /** + * The genesis hash of the blockchain where the channel is to be opened + */ + public set_chain_hash(val: Uint8Array): void { + bindings.CommonOpenChannelFields_set_chain_hash(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + } + + /** + * A temporary channel ID + * For V2 channels: derived using a zeroed out value for the channel acceptor's revocation basepoint + * For V1 channels: a temporary channel ID, until the funding outpoint is announced + */ + public get_temporary_channel_id(): ChannelId { + const ret: bigint = bindings.CommonOpenChannelFields_get_temporary_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * A temporary channel ID + * For V2 channels: derived using a zeroed out value for the channel acceptor's revocation basepoint + * For V1 channels: a temporary channel ID, until the funding outpoint is announced + */ + public set_temporary_channel_id(val: ChannelId): void { + bindings.CommonOpenChannelFields_set_temporary_channel_id(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); + } + + /** + * For V1 channels: The channel value + * For V2 channels: Part of the channel value contributed by the channel initiator + */ + public get_funding_satoshis(): bigint { + const ret: bigint = bindings.CommonOpenChannelFields_get_funding_satoshis(this.ptr); + return ret; + } + + /** + * For V1 channels: The channel value + * For V2 channels: Part of the channel value contributed by the channel initiator + */ + public set_funding_satoshis(val: bigint): void { + bindings.CommonOpenChannelFields_set_funding_satoshis(this.ptr, val); + } + + /** + * The threshold below which outputs on transactions broadcast by the channel initiator will be + * omitted + */ + public get_dust_limit_satoshis(): bigint { + const ret: bigint = bindings.CommonOpenChannelFields_get_dust_limit_satoshis(this.ptr); + return ret; + } + + /** + * The threshold below which outputs on transactions broadcast by the channel initiator will be + * omitted + */ + public set_dust_limit_satoshis(val: bigint): void { + bindings.CommonOpenChannelFields_set_dust_limit_satoshis(this.ptr, val); + } + + /** + * The maximum inbound HTLC value in flight towards channel initiator, in milli-satoshi + */ + public get_max_htlc_value_in_flight_msat(): bigint { + const ret: bigint = bindings.CommonOpenChannelFields_get_max_htlc_value_in_flight_msat(this.ptr); + return ret; + } + + /** + * The maximum inbound HTLC value in flight towards channel initiator, in milli-satoshi + */ + public set_max_htlc_value_in_flight_msat(val: bigint): void { + bindings.CommonOpenChannelFields_set_max_htlc_value_in_flight_msat(this.ptr, val); + } + + /** + * The minimum HTLC size incoming to channel initiator, in milli-satoshi + */ + public get_htlc_minimum_msat(): bigint { + const ret: bigint = bindings.CommonOpenChannelFields_get_htlc_minimum_msat(this.ptr); + return ret; + } + + /** + * The minimum HTLC size incoming to channel initiator, in milli-satoshi + */ + public set_htlc_minimum_msat(val: bigint): void { + bindings.CommonOpenChannelFields_set_htlc_minimum_msat(this.ptr, val); + } + + /** + * The feerate for the commitment transaction set by the channel initiator until updated by + * [`UpdateFee`] + */ + public get_commitment_feerate_sat_per_1000_weight(): number { + const ret: number = bindings.CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight(this.ptr); + return ret; + } + + /** + * The feerate for the commitment transaction set by the channel initiator until updated by + * [`UpdateFee`] + */ + public set_commitment_feerate_sat_per_1000_weight(val: number): void { + bindings.CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight(this.ptr, val); + } + + /** + * The number of blocks which the counterparty will have to wait to claim on-chain funds if they + * broadcast a commitment transaction + */ + public get_to_self_delay(): number { + const ret: number = bindings.CommonOpenChannelFields_get_to_self_delay(this.ptr); + return ret; + } + + /** + * The number of blocks which the counterparty will have to wait to claim on-chain funds if they + * broadcast a commitment transaction + */ + public set_to_self_delay(val: number): void { + bindings.CommonOpenChannelFields_set_to_self_delay(this.ptr, val); + } + + /** + * The maximum number of inbound HTLCs towards channel initiator + */ + public get_max_accepted_htlcs(): number { + const ret: number = bindings.CommonOpenChannelFields_get_max_accepted_htlcs(this.ptr); + return ret; + } + + /** + * The maximum number of inbound HTLCs towards channel initiator + */ + public set_max_accepted_htlcs(val: number): void { + bindings.CommonOpenChannelFields_set_max_accepted_htlcs(this.ptr, val); + } + + /** + * The channel initiator's key controlling the funding transaction + */ + public get_funding_pubkey(): Uint8Array { + const ret: number = bindings.CommonOpenChannelFields_get_funding_pubkey(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + + /** + * The channel initiator's key controlling the funding transaction + */ + public set_funding_pubkey(val: Uint8Array): void { + bindings.CommonOpenChannelFields_set_funding_pubkey(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); + } + + /** + * Used to derive a revocation key for transactions broadcast by counterparty + */ + public get_revocation_basepoint(): Uint8Array { + const ret: number = bindings.CommonOpenChannelFields_get_revocation_basepoint(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Used to derive a revocation key for transactions broadcast by counterparty + */ + public set_revocation_basepoint(val: Uint8Array): void { + bindings.CommonOpenChannelFields_set_revocation_basepoint(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); + } + + /** + * A payment key to channel initiator for transactions broadcast by counterparty + */ + public get_payment_basepoint(): Uint8Array { + const ret: number = bindings.CommonOpenChannelFields_get_payment_basepoint(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + + /** + * A payment key to channel initiator for transactions broadcast by counterparty + */ + public set_payment_basepoint(val: Uint8Array): void { + bindings.CommonOpenChannelFields_set_payment_basepoint(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); + } + + /** + * Used to derive a payment key to channel initiator for transactions broadcast by channel + * initiator + */ + public get_delayed_payment_basepoint(): Uint8Array { + const ret: number = bindings.CommonOpenChannelFields_get_delayed_payment_basepoint(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Used to derive a payment key to channel initiator for transactions broadcast by channel + * initiator + */ + public set_delayed_payment_basepoint(val: Uint8Array): void { + bindings.CommonOpenChannelFields_set_delayed_payment_basepoint(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); + } + + /** + * Used to derive an HTLC payment key to channel initiator + */ + public get_htlc_basepoint(): Uint8Array { + const ret: number = bindings.CommonOpenChannelFields_get_htlc_basepoint(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Used to derive an HTLC payment key to channel initiator + */ + public set_htlc_basepoint(val: Uint8Array): void { + bindings.CommonOpenChannelFields_set_htlc_basepoint(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); + } + + /** + * The first to-be-broadcast-by-channel-initiator transaction's per commitment point + */ + public get_first_per_commitment_point(): Uint8Array { + const ret: number = bindings.CommonOpenChannelFields_get_first_per_commitment_point(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + + /** + * The first to-be-broadcast-by-channel-initiator transaction's per commitment point + */ + public set_first_per_commitment_point(val: Uint8Array): void { + bindings.CommonOpenChannelFields_set_first_per_commitment_point(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); + } + + /** + * The channel flags to be used + */ + public get_channel_flags(): number { + const ret: number = bindings.CommonOpenChannelFields_get_channel_flags(this.ptr); + return ret; + } + + /** + * The channel flags to be used + */ + public set_channel_flags(val: number): void { + bindings.CommonOpenChannelFields_set_channel_flags(this.ptr, val); + } + + /** + * Optionally, a request to pre-set the to-channel-initiator output's scriptPubkey for when we + * collaboratively close + */ + public get_shutdown_scriptpubkey(): Option_CVec_u8ZZ { + const ret: bigint = bindings.CommonOpenChannelFields_get_shutdown_scriptpubkey(this.ptr); + const ret_hu_conv: Option_CVec_u8ZZ = Option_CVec_u8ZZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * Optionally, a request to pre-set the to-channel-initiator output's scriptPubkey for when we + * collaboratively close + */ + public set_shutdown_scriptpubkey(val: Option_CVec_u8ZZ): void { + bindings.CommonOpenChannelFields_set_shutdown_scriptpubkey(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); + } + + /** + * The channel type that this channel will represent + * + * If this is `None`, we derive the channel type from the intersection of our + * feature bits with our counterparty's feature bits from the [`Init`] message. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public get_channel_type(): ChannelTypeFeatures { + const ret: bigint = bindings.CommonOpenChannelFields_get_channel_type(this.ptr); + const ret_hu_conv: ChannelTypeFeatures = new ChannelTypeFeatures(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * The channel type that this channel will represent + * + * If this is `None`, we derive the channel type from the intersection of our + * feature bits with our counterparty's feature bits from the [`Init`] message. + * + * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public set_channel_type(val: ChannelTypeFeatures|null): void { + bindings.CommonOpenChannelFields_set_channel_type(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); + } + + /** + * Constructs a new CommonOpenChannelFields given each field + * + * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public static constructor_new(chain_hash_arg: Uint8Array, temporary_channel_id_arg: ChannelId, funding_satoshis_arg: bigint, dust_limit_satoshis_arg: bigint, max_htlc_value_in_flight_msat_arg: bigint, htlc_minimum_msat_arg: bigint, commitment_feerate_sat_per_1000_weight_arg: number, to_self_delay_arg: number, max_accepted_htlcs_arg: number, funding_pubkey_arg: Uint8Array, revocation_basepoint_arg: Uint8Array, payment_basepoint_arg: Uint8Array, delayed_payment_basepoint_arg: Uint8Array, htlc_basepoint_arg: Uint8Array, first_per_commitment_point_arg: Uint8Array, channel_flags_arg: number, shutdown_scriptpubkey_arg: Option_CVec_u8ZZ, channel_type_arg: ChannelTypeFeatures|null): CommonOpenChannelFields { + const ret: bigint = bindings.CommonOpenChannelFields_new(bindings.encodeUint8Array(bindings.check_arr_len(chain_hash_arg, 32)), CommonBase.get_ptr_of(temporary_channel_id_arg), funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, commitment_feerate_sat_per_1000_weight_arg, to_self_delay_arg, max_accepted_htlcs_arg, bindings.encodeUint8Array(bindings.check_arr_len(funding_pubkey_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(revocation_basepoint_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(payment_basepoint_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(delayed_payment_basepoint_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(htlc_basepoint_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(first_per_commitment_point_arg, 33)), channel_flags_arg, CommonBase.get_ptr_of(shutdown_scriptpubkey_arg), channel_type_arg == null ? 0n : CommonBase.get_ptr_of(channel_type_arg)); + const ret_hu_conv: CommonOpenChannelFields = new CommonOpenChannelFields(null, ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, temporary_channel_id_arg); + CommonBase.add_ref_from(ret_hu_conv, shutdown_scriptpubkey_arg); + CommonBase.add_ref_from(ret_hu_conv, channel_type_arg); + return ret_hu_conv; + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.CommonOpenChannelFields_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a copy of the CommonOpenChannelFields + */ + public clone(): CommonOpenChannelFields { + const ret: bigint = bindings.CommonOpenChannelFields_clone(this.ptr); + const ret_hu_conv: CommonOpenChannelFields = new CommonOpenChannelFields(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * Generates a non-cryptographic 64-bit hash of the CommonOpenChannelFields. + */ + public hash(): bigint { + const ret: bigint = bindings.CommonOpenChannelFields_hash(this.ptr); + return ret; + } + + /** + * Checks if two CommonOpenChannelFieldss contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ + public eq(b: CommonOpenChannelFields): boolean { + const ret: boolean = bindings.CommonOpenChannelFields_eq(this.ptr, CommonBase.get_ptr_of(b)); + CommonBase.add_ref_from(this, b); + return ret; + } + +} diff --git a/ts/structs/Confirm.mts b/ts/structs/Confirm.mts index bd29c053..2676d42c 100644 --- a/ts/structs/Confirm.mts +++ b/ts/structs/Confirm.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,14 +583,14 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -739,7 +804,7 @@ export class Confirm extends CommonBase { }, get_relevant_txids (): number { const ret: ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ[] = arg.get_relevant_txids(); - const result: number = bindings.encodeUint64Array(ret.map(ret_conv_54 => ret_conv_54 == null ? 0n : ret_conv_54.clone_ptr())); + const result: number = bindings.encodeUint64Array(ret.map(ret_conv_54 => ret_conv_54.clone_ptr())); return result; }, } as bindings.LDKConfirm; @@ -767,7 +832,7 @@ export class Confirm extends CommonBase { * [`best_block_updated`]: Self::best_block_updated */ public transactions_confirmed(header: Uint8Array, txdata: TwoTuple_usizeTransactionZ[], height: number): void { - bindings.Confirm_transactions_confirmed(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(header, 80)), bindings.encodeUint64Array(txdata.map(txdata_conv_28 => txdata_conv_28 != null ? CommonBase.get_ptr_of(txdata_conv_28) : 0n)), height); + bindings.Confirm_transactions_confirmed(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(header, 80)), bindings.encodeUint64Array(txdata.map(txdata_conv_28 => CommonBase.get_ptr_of(txdata_conv_28))), height); } /** diff --git a/ts/structs/CounterpartyChannelTransactionParameters.mts b/ts/structs/CounterpartyChannelTransactionParameters.mts index 886b6555..f48e83e4 100644 --- a/ts/structs/CounterpartyChannelTransactionParameters.mts +++ b/ts/structs/CounterpartyChannelTransactionParameters.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -619,7 +684,7 @@ export class CounterpartyChannelTransactionParameters extends CommonBase { * Counter-party public keys */ public set_pubkeys(val: ChannelPublicKeys): void { - bindings.CounterpartyChannelTransactionParameters_set_pubkeys(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.CounterpartyChannelTransactionParameters_set_pubkeys(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -642,7 +707,7 @@ export class CounterpartyChannelTransactionParameters extends CommonBase { * Constructs a new CounterpartyChannelTransactionParameters given each field */ public static constructor_new(pubkeys_arg: ChannelPublicKeys, selected_contest_delay_arg: number): CounterpartyChannelTransactionParameters { - const ret: bigint = bindings.CounterpartyChannelTransactionParameters_new(pubkeys_arg == null ? 0n : CommonBase.get_ptr_of(pubkeys_arg), selected_contest_delay_arg); + const ret: bigint = bindings.CounterpartyChannelTransactionParameters_new(CommonBase.get_ptr_of(pubkeys_arg), selected_contest_delay_arg); const ret_hu_conv: CounterpartyChannelTransactionParameters = new CounterpartyChannelTransactionParameters(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, pubkeys_arg); @@ -678,7 +743,7 @@ export class CounterpartyChannelTransactionParameters extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: CounterpartyChannelTransactionParameters): boolean { - const ret: boolean = bindings.CounterpartyChannelTransactionParameters_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.CounterpartyChannelTransactionParameters_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/CounterpartyCommitmentSecrets.mts b/ts/structs/CounterpartyCommitmentSecrets.mts index 49e0b82d..28bee495 100644 --- a/ts/structs/CounterpartyCommitmentSecrets.mts +++ b/ts/structs/CounterpartyCommitmentSecrets.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/CounterpartyForwardingInfo.mts b/ts/structs/CounterpartyForwardingInfo.mts index 1a1d37f2..6f0010f5 100644 --- a/ts/structs/CounterpartyForwardingInfo.mts +++ b/ts/structs/CounterpartyForwardingInfo.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/CustomMessageHandler.mts b/ts/structs/CustomMessageHandler.mts index 3b2bf780..01ed586d 100644 --- a/ts/structs/CustomMessageHandler.mts +++ b/ts/structs/CustomMessageHandler.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -662,23 +727,23 @@ export class CustomMessageHandler extends CommonBase { CommonBase.add_ref_from(ret_hu_conv, this); const sender_node_id_conv: Uint8Array = bindings.decodeUint8Array(sender_node_id); const ret: Result_NoneLightningErrorZ = arg.handle_custom_message(ret_hu_conv, sender_node_id_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, get_and_clear_pending_msg (): number { const ret: TwoTuple_PublicKeyTypeZ[] = arg.get_and_clear_pending_msg(); - const result: number = bindings.encodeUint64Array(ret.map(ret_conv_25 => ret_conv_25 == null ? 0n : ret_conv_25.clone_ptr())); + const result: number = bindings.encodeUint64Array(ret.map(ret_conv_25 => ret_conv_25.clone_ptr())); return result; }, provided_node_features (): bigint { const ret: NodeFeatures = arg.provided_node_features(); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, provided_init_features (their_node_id: number): bigint { const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id); const ret: InitFeatures = arg.provided_init_features(their_node_id_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, } as bindings.LDKCustomMessageHandler; diff --git a/ts/structs/CustomMessageReader.mts b/ts/structs/CustomMessageReader.mts index 771b8b32..a0446eeb 100644 --- a/ts/structs/CustomMessageReader.mts +++ b/ts/structs/CustomMessageReader.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -636,7 +701,7 @@ export class CustomMessageReader extends CommonBase { read (message_type: number, buffer: number): bigint { const buffer_conv: Uint8Array = bindings.decodeUint8Array(buffer); const ret: Result_COption_TypeZDecodeErrorZ = arg.read(message_type, buffer_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, } as bindings.LDKCustomMessageReader; diff --git a/ts/structs/CustomOnionMessageHandler.mts b/ts/structs/CustomOnionMessageHandler.mts index b12d6bc3..6325c892 100644 --- a/ts/structs/CustomOnionMessageHandler.mts +++ b/ts/structs/CustomOnionMessageHandler.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -654,19 +719,19 @@ export class CustomOnionMessageHandler extends CommonBase { const ret_hu_conv: OnionMessageContents = new OnionMessageContents(null, msg); CommonBase.add_ref_from(ret_hu_conv, this); const ret: Option_OnionMessageContentsZ = arg.handle_custom_message(ret_hu_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); CommonBase.add_ref_from(impl_holder.held, ret); return result; }, read_custom_message (message_type: bigint, buffer: number): bigint { const buffer_conv: Uint8Array = bindings.decodeUint8Array(buffer); const ret: Result_COption_OnionMessageContentsZDecodeErrorZ = arg.read_custom_message(message_type, buffer_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, release_pending_custom_messages (): number { const ret: ThreeTuple_OnionMessageContentsDestinationBlindedPathZ[] = arg.release_pending_custom_messages(); - const result: number = bindings.encodeUint64Array(ret.map(ret_conv_56 => ret_conv_56 == null ? 0n : ret_conv_56.clone_ptr())); + const result: number = bindings.encodeUint64Array(ret.map(ret_conv_56 => ret_conv_56.clone_ptr())); return result; }, } as bindings.LDKCustomOnionMessageHandler; diff --git a/ts/structs/DecodeError.mts b/ts/structs/DecodeError.mts index 56928a37..6e408fda 100644 --- a/ts/structs/DecodeError.mts +++ b/ts/structs/DecodeError.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -39,7 +44,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -611,6 +676,7 @@ export class DecodeError extends CommonBase { case 4: return new DecodeError_BadLengthDescriptor(ptr); case 5: return new DecodeError_Io(ptr); case 6: return new DecodeError_UnsupportedCompression(ptr); + case 7: return new DecodeError_DangerousValue(ptr); default: throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface } @@ -701,6 +767,16 @@ export class DecodeError extends CommonBase { return ret_hu_conv; } + /** + * Utility method to constructs a new DangerousValue-variant DecodeError + */ + public static constructor_dangerous_value(): DecodeError { + const ret: bigint = bindings.DecodeError_dangerous_value(); + const ret_hu_conv: DecodeError = DecodeError.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + return ret_hu_conv; + } + /** * Generates a non-cryptographic 64-bit hash of the DecodeError. */ @@ -714,7 +790,7 @@ export class DecodeError extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public eq(b: DecodeError): boolean { - const ret: boolean = bindings.DecodeError_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.DecodeError_eq(this.ptr, CommonBase.get_ptr_of(b)); return ret; } @@ -770,3 +846,10 @@ export class DecodeError_UnsupportedCompression extends DecodeError { super(null, ptr); } } +/** A DecodeError of type DangerousValue */ +export class DecodeError_DangerousValue extends DecodeError { + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + } +} diff --git a/ts/structs/DefaultMessageRouter.mts b/ts/structs/DefaultMessageRouter.mts index 40727a3c..b99193b6 100644 --- a/ts/structs/DefaultMessageRouter.mts +++ b/ts/structs/DefaultMessageRouter.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -560,10 +620,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -578,7 +640,10 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -609,7 +674,7 @@ export class DefaultMessageRouter extends CommonBase { * Creates a [`DefaultMessageRouter`] using the given [`NetworkGraph`]. */ public static constructor_new(network_graph: NetworkGraph, entropy_source: EntropySource): DefaultMessageRouter { - const ret: bigint = bindings.DefaultMessageRouter_new(network_graph == null ? 0n : CommonBase.get_ptr_of(network_graph), CommonBase.get_ptr_of(entropy_source)); + const ret: bigint = bindings.DefaultMessageRouter_new(CommonBase.get_ptr_of(network_graph), CommonBase.get_ptr_of(entropy_source)); const ret_hu_conv: DefaultMessageRouter = new DefaultMessageRouter(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, network_graph); diff --git a/ts/structs/DefaultRouter.mts b/ts/structs/DefaultRouter.mts index 78742e17..fb2a0668 100644 --- a/ts/structs/DefaultRouter.mts +++ b/ts/structs/DefaultRouter.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -560,10 +620,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -609,7 +674,7 @@ export class DefaultRouter extends CommonBase { * Creates a new router. */ public static constructor_new(network_graph: NetworkGraph, logger: Logger, entropy_source: EntropySource, scorer: LockableScore, score_params: ProbabilisticScoringFeeParameters): DefaultRouter { - const ret: bigint = bindings.DefaultRouter_new(network_graph == null ? 0n : CommonBase.get_ptr_of(network_graph), CommonBase.get_ptr_of(logger), CommonBase.get_ptr_of(entropy_source), CommonBase.get_ptr_of(scorer), score_params == null ? 0n : CommonBase.get_ptr_of(score_params)); + const ret: bigint = bindings.DefaultRouter_new(CommonBase.get_ptr_of(network_graph), CommonBase.get_ptr_of(logger), CommonBase.get_ptr_of(entropy_source), CommonBase.get_ptr_of(scorer), CommonBase.get_ptr_of(score_params)); const ret_hu_conv: DefaultRouter = new DefaultRouter(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, network_graph); diff --git a/ts/structs/DelayedPaymentBasepoint.mts b/ts/structs/DelayedPaymentBasepoint.mts index 0021fc97..55acb512 100644 --- a/ts/structs/DelayedPaymentBasepoint.mts +++ b/ts/structs/DelayedPaymentBasepoint.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -635,7 +700,7 @@ export class DelayedPaymentBasepoint extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: DelayedPaymentBasepoint): boolean { - const ret: boolean = bindings.DelayedPaymentBasepoint_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.DelayedPaymentBasepoint_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } @@ -672,6 +737,15 @@ export class DelayedPaymentBasepoint extends CommonBase { return ret_conv; } + /** + * Derives the \"tweak\" used in calculate [`DelayedPaymentKey::from_basepoint`].\n\n[`DelayedPaymentKey::from_basepoint`] calculates a private key as:\n`privkey = basepoint_secret + SHA256(per_commitment_point || basepoint)`\n\nThis calculates the hash part in the tweak derivation process, which is used to\nensure that each key is unique and cannot be guessed by an external party. + */ + public derive_add_tweak(per_commitment_point: Uint8Array): Uint8Array { + const ret: number = bindings.DelayedPaymentBasepoint_derive_add_tweak(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(per_commitment_point, 33))); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + /** * Serialize the DelayedPaymentBasepoint object into a byte array which can be read by DelayedPaymentBasepoint_read */ diff --git a/ts/structs/DelayedPaymentKey.mts b/ts/structs/DelayedPaymentKey.mts index cefc43cd..2a12d5bf 100644 --- a/ts/structs/DelayedPaymentKey.mts +++ b/ts/structs/DelayedPaymentKey.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -639,7 +704,7 @@ export class DelayedPaymentKey extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: DelayedPaymentKey): boolean { - const ret: boolean = bindings.DelayedPaymentKey_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.DelayedPaymentKey_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } @@ -663,7 +728,7 @@ export class DelayedPaymentKey extends CommonBase { * Derive a public delayedpubkey using one node\'s `per_commitment_point` and its countersignatory\'s `basepoint` */ public static constructor_from_basepoint(countersignatory_basepoint: DelayedPaymentBasepoint, per_commitment_point: Uint8Array): DelayedPaymentKey { - const ret: bigint = bindings.DelayedPaymentKey_from_basepoint(countersignatory_basepoint == null ? 0n : CommonBase.get_ptr_of(countersignatory_basepoint), bindings.encodeUint8Array(bindings.check_arr_len(per_commitment_point, 33))); + const ret: bigint = bindings.DelayedPaymentKey_from_basepoint(CommonBase.get_ptr_of(countersignatory_basepoint), bindings.encodeUint8Array(bindings.check_arr_len(per_commitment_point, 33))); const ret_hu_conv: DelayedPaymentKey = new DelayedPaymentKey(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, countersignatory_basepoint); diff --git a/ts/structs/DelayedPaymentOutputDescriptor.mts b/ts/structs/DelayedPaymentOutputDescriptor.mts index cdf80db0..58221553 100644 --- a/ts/structs/DelayedPaymentOutputDescriptor.mts +++ b/ts/structs/DelayedPaymentOutputDescriptor.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -621,7 +686,7 @@ export class DelayedPaymentOutputDescriptor extends CommonBase { * The outpoint which is spendable. */ public set_outpoint(val: OutPoint): void { - bindings.DelayedPaymentOutputDescriptor_set_outpoint(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.DelayedPaymentOutputDescriptor_set_outpoint(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -690,7 +755,7 @@ export class DelayedPaymentOutputDescriptor extends CommonBase { * derive the witnessScript for this output. */ public set_revocation_pubkey(val: RevocationKey): void { - bindings.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -727,15 +792,46 @@ export class DelayedPaymentOutputDescriptor extends CommonBase { bindings.DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this.ptr, val); } + /** + * The channel public keys and other parameters needed to generate a spending transaction or + * to provide to a re-derived signer through [`ChannelSigner::provide_channel_parameters`]. + * + * Added as optional, but always `Some` if the descriptor was produced in v0.0.123 or later. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public get_channel_transaction_parameters(): ChannelTransactionParameters { + const ret: bigint = bindings.DelayedPaymentOutputDescriptor_get_channel_transaction_parameters(this.ptr); + const ret_hu_conv: ChannelTransactionParameters = new ChannelTransactionParameters(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * The channel public keys and other parameters needed to generate a spending transaction or + * to provide to a re-derived signer through [`ChannelSigner::provide_channel_parameters`]. + * + * Added as optional, but always `Some` if the descriptor was produced in v0.0.123 or later. + * + * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public set_channel_transaction_parameters(val: ChannelTransactionParameters|null): void { + bindings.DelayedPaymentOutputDescriptor_set_channel_transaction_parameters(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); + } + /** * Constructs a new DelayedPaymentOutputDescriptor given each field + * + * Note that channel_transaction_parameters_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public static constructor_new(outpoint_arg: OutPoint, per_commitment_point_arg: Uint8Array, to_self_delay_arg: number, output_arg: TxOut, revocation_pubkey_arg: RevocationKey, channel_keys_id_arg: Uint8Array, channel_value_satoshis_arg: bigint): DelayedPaymentOutputDescriptor { - const ret: bigint = bindings.DelayedPaymentOutputDescriptor_new(outpoint_arg == null ? 0n : CommonBase.get_ptr_of(outpoint_arg), bindings.encodeUint8Array(bindings.check_arr_len(per_commitment_point_arg, 33)), to_self_delay_arg, CommonBase.get_ptr_of(output_arg), revocation_pubkey_arg == null ? 0n : CommonBase.get_ptr_of(revocation_pubkey_arg), bindings.encodeUint8Array(bindings.check_arr_len(channel_keys_id_arg, 32)), channel_value_satoshis_arg); + public static constructor_new(outpoint_arg: OutPoint, per_commitment_point_arg: Uint8Array, to_self_delay_arg: number, output_arg: TxOut, revocation_pubkey_arg: RevocationKey, channel_keys_id_arg: Uint8Array, channel_value_satoshis_arg: bigint, channel_transaction_parameters_arg: ChannelTransactionParameters|null): DelayedPaymentOutputDescriptor { + const ret: bigint = bindings.DelayedPaymentOutputDescriptor_new(CommonBase.get_ptr_of(outpoint_arg), bindings.encodeUint8Array(bindings.check_arr_len(per_commitment_point_arg, 33)), to_self_delay_arg, CommonBase.get_ptr_of(output_arg), CommonBase.get_ptr_of(revocation_pubkey_arg), bindings.encodeUint8Array(bindings.check_arr_len(channel_keys_id_arg, 32)), channel_value_satoshis_arg, channel_transaction_parameters_arg == null ? 0n : CommonBase.get_ptr_of(channel_transaction_parameters_arg)); const ret_hu_conv: DelayedPaymentOutputDescriptor = new DelayedPaymentOutputDescriptor(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, outpoint_arg); CommonBase.add_ref_from(ret_hu_conv, revocation_pubkey_arg); + CommonBase.add_ref_from(ret_hu_conv, channel_transaction_parameters_arg); return ret_hu_conv; } @@ -768,7 +864,7 @@ export class DelayedPaymentOutputDescriptor extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: DelayedPaymentOutputDescriptor): boolean { - const ret: boolean = bindings.DelayedPaymentOutputDescriptor_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.DelayedPaymentOutputDescriptor_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/Description.mts b/ts/structs/Description.mts index f9bdb376..e2bc6e52 100644 --- a/ts/structs/Description.mts +++ b/ts/structs/Description.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -637,7 +702,7 @@ export class Description extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: Description): boolean { - const ret: boolean = bindings.Description_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.Description_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/Destination.mts b/ts/structs/Destination.mts index ffbc78ab..59be8b69 100644 --- a/ts/structs/Destination.mts +++ b/ts/structs/Destination.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -640,13 +705,40 @@ export class Destination extends CommonBase { * Utility method to constructs a new BlindedPath-variant Destination */ public static constructor_blinded_path(a: BlindedPath): Destination { - const ret: bigint = bindings.Destination_blinded_path(a == null ? 0n : CommonBase.get_ptr_of(a)); + const ret: bigint = bindings.Destination_blinded_path(CommonBase.get_ptr_of(a)); const ret_hu_conv: Destination = Destination.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, a); return ret_hu_conv; } + /** + * Generates a non-cryptographic 64-bit hash of the Destination. + */ + public hash(): bigint { + const ret: bigint = bindings.Destination_hash(this.ptr); + return ret; + } + + /** + * Checks if two Destinations contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + */ + public eq(b: Destination): boolean { + const ret: boolean = bindings.Destination_eq(this.ptr, CommonBase.get_ptr_of(b)); + return ret; + } + + /** + * Attempts to resolve the [`IntroductionNode::DirectedShortChannelId`] of a + * [`Destination::BlindedPath`] to a [`IntroductionNode::NodeId`], if applicable, using the + * provided [`ReadOnlyNetworkGraph`]. + */ + public resolve(network_graph: ReadOnlyNetworkGraph): void { + bindings.Destination_resolve(this.ptr, CommonBase.get_ptr_of(network_graph)); + CommonBase.add_ref_from(this, network_graph); + } + } /** A Destination of type Node */ export class Destination_Node extends Destination { diff --git a/ts/structs/DirectedChannelInfo.mts b/ts/structs/DirectedChannelInfo.mts index e7202502..4509cd58 100644 --- a/ts/structs/DirectedChannelInfo.mts +++ b/ts/structs/DirectedChannelInfo.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -560,10 +620,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -645,4 +710,28 @@ export class DirectedChannelInfo extends CommonBase { return ret_hu_conv; } + /** + * Returns the `node_id` of the source hop. + * + * Refers to the `node_id` forwarding the payment to the next hop. + */ + public source(): NodeId { + const ret: bigint = bindings.DirectedChannelInfo_source(this.ptr); + const ret_hu_conv: NodeId = new NodeId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * Returns the `node_id` of the target hop. + * + * Refers to the `node_id` receiving the payment from the previous hop. + */ + public target(): NodeId { + const ret: bigint = bindings.DirectedChannelInfo_target(this.ptr); + const ret_hu_conv: NodeId = new NodeId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + } diff --git a/ts/structs/DirectedChannelTransactionParameters.mts b/ts/structs/DirectedChannelTransactionParameters.mts index bacca3eb..4c3e226d 100644 --- a/ts/structs/DirectedChannelTransactionParameters.mts +++ b/ts/structs/DirectedChannelTransactionParameters.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDe import { PeerManager } from '../structs/PeerManager.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/EcdsaChannelSigner.mts b/ts/structs/EcdsaChannelSigner.mts index ea86b634..0636cdf3 100644 --- a/ts/structs/EcdsaChannelSigner.mts +++ b/ts/structs/EcdsaChannelSigner.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -625,6 +690,13 @@ export interface EcdsaChannelSignerInterface { * This may be called multiple times for the same transaction. * * An external signer implementation should check that the commitment has not been revoked. + * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ sign_holder_commitment(commitment_tx: HolderCommitmentTransaction): Result_ECDSASignatureNoneZ; /**Create a signature for the given input in a transaction spending an HTLC transaction output @@ -641,6 +713,13 @@ export interface EcdsaChannelSignerInterface { * revoked the state which they eventually broadcast. It's not a _holder_ secret key and does * not allow the spending of any funds by itself (you need our holder `revocation_secret` to do * so). + * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ sign_justice_revoked_output(justice_tx: Uint8Array, input: number, amount: bigint, per_commitment_key: Uint8Array): Result_ECDSASignatureNoneZ; /**Create a signature for the given input in a transaction spending a commitment transaction @@ -661,6 +740,13 @@ export interface EcdsaChannelSignerInterface { * * `htlc` holds HTLC elements (hash, timelock), thus changing the format of the witness script * (which is committed to in the BIP 143 signatures). + * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ sign_justice_revoked_htlc(justice_tx: Uint8Array, input: number, amount: bigint, per_commitment_key: Uint8Array, htlc: HTLCOutputInCommitment): Result_ECDSASignatureNoneZ; /**Computes the signature for a commitment transaction's HTLC output used as an input within @@ -671,8 +757,14 @@ export interface EcdsaChannelSignerInterface { * [`ChannelMonitor`] [replica](https://github.com/lightningdevkit/rust-lightning/blob/main/GLOSSARY.md#monitor-replicas) * broadcasts it before receiving the update for the latest commitment transaction. * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * * [`EcdsaSighashType::All`]: bitcoin::sighash::EcdsaSighashType::All * [`ChannelMonitor`]: crate::chain::channelmonitor::ChannelMonitor + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ sign_holder_htlc_transaction(htlc_tx: Uint8Array, input: number, htlc_descriptor: HTLCDescriptor): Result_ECDSASignatureNoneZ; /**Create a signature for a claiming transaction for a HTLC output on a counterparty's commitment @@ -692,6 +784,13 @@ export interface EcdsaChannelSignerInterface { * detected onchain. It has been generated by our counterparty and is used to derive * channel state keys, which are then included in the witness script and committed to in the * BIP 143 signature. + * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ sign_counterparty_htlc_transaction(htlc_tx: Uint8Array, input: number, amount: bigint, per_commitment_point: Uint8Array, htlc: HTLCOutputInCommitment): Result_ECDSASignatureNoneZ; /**Create a signature for a (proposed) closing transaction. @@ -702,6 +801,13 @@ export interface EcdsaChannelSignerInterface { sign_closing_transaction(closing_tx: ClosingTransaction): Result_ECDSASignatureNoneZ; /**Computes the signature for a commitment transaction's anchor output used as an * input within `anchor_tx`, which spends the commitment transaction, at index `input`. + * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ sign_holder_anchor_input(anchor_tx: Uint8Array, input: number): Result_ECDSASignatureNoneZ; /**Signs a channel announcement message with our funding key proving it comes from one of the @@ -768,20 +874,20 @@ export class EcdsaChannelSigner extends CommonBase { } bindings.freeWasmMemory(outbound_htlc_preimages) const ret: Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ = arg.sign_counterparty_commitment(commitment_tx_hu_conv, inbound_htlc_preimages_conv_12_arr, outbound_htlc_preimages_conv_12_arr); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, sign_holder_commitment (commitment_tx: bigint): bigint { const commitment_tx_hu_conv: HolderCommitmentTransaction = new HolderCommitmentTransaction(null, commitment_tx); const ret: Result_ECDSASignatureNoneZ = arg.sign_holder_commitment(commitment_tx_hu_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, sign_justice_revoked_output (justice_tx: number, input: number, amount: bigint, per_commitment_key: number): bigint { const justice_tx_conv: Uint8Array = bindings.decodeUint8Array(justice_tx); const per_commitment_key_conv: Uint8Array = bindings.decodeUint8Array(per_commitment_key); const ret: Result_ECDSASignatureNoneZ = arg.sign_justice_revoked_output(justice_tx_conv, input, amount, per_commitment_key_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, sign_justice_revoked_htlc (justice_tx: number, input: number, amount: bigint, per_commitment_key: number, htlc: bigint): bigint { @@ -789,14 +895,14 @@ export class EcdsaChannelSigner extends CommonBase { const per_commitment_key_conv: Uint8Array = bindings.decodeUint8Array(per_commitment_key); const htlc_hu_conv: HTLCOutputInCommitment = new HTLCOutputInCommitment(null, htlc); const ret: Result_ECDSASignatureNoneZ = arg.sign_justice_revoked_htlc(justice_tx_conv, input, amount, per_commitment_key_conv, htlc_hu_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, sign_holder_htlc_transaction (htlc_tx: number, input: number, htlc_descriptor: bigint): bigint { const htlc_tx_conv: Uint8Array = bindings.decodeUint8Array(htlc_tx); const htlc_descriptor_hu_conv: HTLCDescriptor = new HTLCDescriptor(null, htlc_descriptor); const ret: Result_ECDSASignatureNoneZ = arg.sign_holder_htlc_transaction(htlc_tx_conv, input, htlc_descriptor_hu_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, sign_counterparty_htlc_transaction (htlc_tx: number, input: number, amount: bigint, per_commitment_point: number, htlc: bigint): bigint { @@ -804,30 +910,30 @@ export class EcdsaChannelSigner extends CommonBase { const per_commitment_point_conv: Uint8Array = bindings.decodeUint8Array(per_commitment_point); const htlc_hu_conv: HTLCOutputInCommitment = new HTLCOutputInCommitment(null, htlc); const ret: Result_ECDSASignatureNoneZ = arg.sign_counterparty_htlc_transaction(htlc_tx_conv, input, amount, per_commitment_point_conv, htlc_hu_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, sign_closing_transaction (closing_tx: bigint): bigint { const closing_tx_hu_conv: ClosingTransaction = new ClosingTransaction(null, closing_tx); const ret: Result_ECDSASignatureNoneZ = arg.sign_closing_transaction(closing_tx_hu_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, sign_holder_anchor_input (anchor_tx: number, input: number): bigint { const anchor_tx_conv: Uint8Array = bindings.decodeUint8Array(anchor_tx); const ret: Result_ECDSASignatureNoneZ = arg.sign_holder_anchor_input(anchor_tx_conv, input); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, sign_channel_announcement_with_funding_key (msg: bigint): bigint { const msg_hu_conv: UnsignedChannelAnnouncement = new UnsignedChannelAnnouncement(null, msg); const ret: Result_ECDSASignatureNoneZ = arg.sign_channel_announcement_with_funding_key(msg_hu_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, } as bindings.LDKEcdsaChannelSigner; const channelSigner = ChannelSigner.new_impl(channelSigner_impl, pubkeys); - const ptr_idx: [bigint, number] = bindings.LDKEcdsaChannelSigner_new(structImplementation, channelSigner.instance_idx!, pubkeys == null ? 0n : pubkeys.clone_ptr()); + const ptr_idx: [bigint, number] = bindings.LDKEcdsaChannelSigner_new(structImplementation, channelSigner.instance_idx!, pubkeys.clone_ptr()); impl_holder.held = new EcdsaChannelSigner(null, ptr_idx[0]); impl_holder.held.instance_idx = ptr_idx[1]; @@ -853,7 +959,7 @@ export class EcdsaChannelSigner extends CommonBase { * irrelevant or duplicate preimages. */ public sign_counterparty_commitment(commitment_tx: CommitmentTransaction, inbound_htlc_preimages: Uint8Array[], outbound_htlc_preimages: Uint8Array[]): Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ { - const ret: bigint = bindings.EcdsaChannelSigner_sign_counterparty_commitment(this.ptr, commitment_tx == null ? 0n : CommonBase.get_ptr_of(commitment_tx), bindings.encodeUint32Array(inbound_htlc_preimages.map(inbound_htlc_preimages_conv_12 => bindings.encodeUint8Array(bindings.check_arr_len(inbound_htlc_preimages_conv_12, 32)))), bindings.encodeUint32Array(outbound_htlc_preimages.map(outbound_htlc_preimages_conv_12 => bindings.encodeUint8Array(bindings.check_arr_len(outbound_htlc_preimages_conv_12, 32))))); + const ret: bigint = bindings.EcdsaChannelSigner_sign_counterparty_commitment(this.ptr, CommonBase.get_ptr_of(commitment_tx), bindings.encodeUint32Array(inbound_htlc_preimages.map(inbound_htlc_preimages_conv_12 => bindings.encodeUint8Array(bindings.check_arr_len(inbound_htlc_preimages_conv_12, 32)))), bindings.encodeUint32Array(outbound_htlc_preimages.map(outbound_htlc_preimages_conv_12 => bindings.encodeUint8Array(bindings.check_arr_len(outbound_htlc_preimages_conv_12, 32))))); const ret_hu_conv: Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ = Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, commitment_tx); return ret_hu_conv; @@ -869,9 +975,16 @@ export class EcdsaChannelSigner extends CommonBase { * This may be called multiple times for the same transaction. * * An external signer implementation should check that the commitment has not been revoked. + * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ public sign_holder_commitment(commitment_tx: HolderCommitmentTransaction): Result_ECDSASignatureNoneZ { - const ret: bigint = bindings.EcdsaChannelSigner_sign_holder_commitment(this.ptr, commitment_tx == null ? 0n : CommonBase.get_ptr_of(commitment_tx)); + const ret: bigint = bindings.EcdsaChannelSigner_sign_holder_commitment(this.ptr, CommonBase.get_ptr_of(commitment_tx)); const ret_hu_conv: Result_ECDSASignatureNoneZ = Result_ECDSASignatureNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, commitment_tx); return ret_hu_conv; @@ -892,6 +1005,13 @@ export class EcdsaChannelSigner extends CommonBase { * revoked the state which they eventually broadcast. It's not a _holder_ secret key and does * not allow the spending of any funds by itself (you need our holder `revocation_secret` to do * so). + * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ public sign_justice_revoked_output(justice_tx: Uint8Array, input: number, amount: bigint, per_commitment_key: Uint8Array): Result_ECDSASignatureNoneZ { const ret: bigint = bindings.EcdsaChannelSigner_sign_justice_revoked_output(this.ptr, bindings.encodeUint8Array(justice_tx), input, amount, bindings.encodeUint8Array(bindings.check_arr_len(per_commitment_key, 32))); @@ -918,9 +1038,16 @@ export class EcdsaChannelSigner extends CommonBase { * * `htlc` holds HTLC elements (hash, timelock), thus changing the format of the witness script * (which is committed to in the BIP 143 signatures). + * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ public sign_justice_revoked_htlc(justice_tx: Uint8Array, input: number, amount: bigint, per_commitment_key: Uint8Array, htlc: HTLCOutputInCommitment): Result_ECDSASignatureNoneZ { - const ret: bigint = bindings.EcdsaChannelSigner_sign_justice_revoked_htlc(this.ptr, bindings.encodeUint8Array(justice_tx), input, amount, bindings.encodeUint8Array(bindings.check_arr_len(per_commitment_key, 32)), htlc == null ? 0n : CommonBase.get_ptr_of(htlc)); + const ret: bigint = bindings.EcdsaChannelSigner_sign_justice_revoked_htlc(this.ptr, bindings.encodeUint8Array(justice_tx), input, amount, bindings.encodeUint8Array(bindings.check_arr_len(per_commitment_key, 32)), CommonBase.get_ptr_of(htlc)); const ret_hu_conv: Result_ECDSASignatureNoneZ = Result_ECDSASignatureNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, htlc); return ret_hu_conv; @@ -935,11 +1062,17 @@ export class EcdsaChannelSigner extends CommonBase { * [`ChannelMonitor`] [replica](https://github.com/lightningdevkit/rust-lightning/blob/main/GLOSSARY.md#monitor-replicas) * broadcasts it before receiving the update for the latest commitment transaction. * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * * [`EcdsaSighashType::All`]: bitcoin::sighash::EcdsaSighashType::All * [`ChannelMonitor`]: crate::chain::channelmonitor::ChannelMonitor + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ public sign_holder_htlc_transaction(htlc_tx: Uint8Array, input: number, htlc_descriptor: HTLCDescriptor): Result_ECDSASignatureNoneZ { - const ret: bigint = bindings.EcdsaChannelSigner_sign_holder_htlc_transaction(this.ptr, bindings.encodeUint8Array(htlc_tx), input, htlc_descriptor == null ? 0n : CommonBase.get_ptr_of(htlc_descriptor)); + const ret: bigint = bindings.EcdsaChannelSigner_sign_holder_htlc_transaction(this.ptr, bindings.encodeUint8Array(htlc_tx), input, CommonBase.get_ptr_of(htlc_descriptor)); const ret_hu_conv: Result_ECDSASignatureNoneZ = Result_ECDSASignatureNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, htlc_descriptor); return ret_hu_conv; @@ -963,9 +1096,16 @@ export class EcdsaChannelSigner extends CommonBase { * detected onchain. It has been generated by our counterparty and is used to derive * channel state keys, which are then included in the witness script and committed to in the * BIP 143 signature. + * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ public sign_counterparty_htlc_transaction(htlc_tx: Uint8Array, input: number, amount: bigint, per_commitment_point: Uint8Array, htlc: HTLCOutputInCommitment): Result_ECDSASignatureNoneZ { - const ret: bigint = bindings.EcdsaChannelSigner_sign_counterparty_htlc_transaction(this.ptr, bindings.encodeUint8Array(htlc_tx), input, amount, bindings.encodeUint8Array(bindings.check_arr_len(per_commitment_point, 33)), htlc == null ? 0n : CommonBase.get_ptr_of(htlc)); + const ret: bigint = bindings.EcdsaChannelSigner_sign_counterparty_htlc_transaction(this.ptr, bindings.encodeUint8Array(htlc_tx), input, amount, bindings.encodeUint8Array(bindings.check_arr_len(per_commitment_point, 33)), CommonBase.get_ptr_of(htlc)); const ret_hu_conv: Result_ECDSASignatureNoneZ = Result_ECDSASignatureNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, htlc); return ret_hu_conv; @@ -978,7 +1118,7 @@ export class EcdsaChannelSigner extends CommonBase { * chosen to forgo their output as dust. */ public sign_closing_transaction(closing_tx: ClosingTransaction): Result_ECDSASignatureNoneZ { - const ret: bigint = bindings.EcdsaChannelSigner_sign_closing_transaction(this.ptr, closing_tx == null ? 0n : CommonBase.get_ptr_of(closing_tx)); + const ret: bigint = bindings.EcdsaChannelSigner_sign_closing_transaction(this.ptr, CommonBase.get_ptr_of(closing_tx)); const ret_hu_conv: Result_ECDSASignatureNoneZ = Result_ECDSASignatureNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, closing_tx); return ret_hu_conv; @@ -987,6 +1127,13 @@ export class EcdsaChannelSigner extends CommonBase { /** * Computes the signature for a commitment transaction's anchor output used as an * input within `anchor_tx`, which spends the commitment transaction, at index `input`. + * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ public sign_holder_anchor_input(anchor_tx: Uint8Array, input: number): Result_ECDSASignatureNoneZ { const ret: bigint = bindings.EcdsaChannelSigner_sign_holder_anchor_input(this.ptr, bindings.encodeUint8Array(anchor_tx), input); @@ -1008,7 +1155,7 @@ export class EcdsaChannelSigner extends CommonBase { * [`NodeSigner::sign_gossip_message`]: crate::sign::NodeSigner::sign_gossip_message */ public sign_channel_announcement_with_funding_key(msg: UnsignedChannelAnnouncement): Result_ECDSASignatureNoneZ { - const ret: bigint = bindings.EcdsaChannelSigner_sign_channel_announcement_with_funding_key(this.ptr, msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.EcdsaChannelSigner_sign_channel_announcement_with_funding_key(this.ptr, CommonBase.get_ptr_of(msg)); const ret_hu_conv: Result_ECDSASignatureNoneZ = Result_ECDSASignatureNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, msg); return ret_hu_conv; diff --git a/ts/structs/EffectiveCapacity.mts b/ts/structs/EffectiveCapacity.mts index 05df4626..9d3d969c 100644 --- a/ts/structs/EffectiveCapacity.mts +++ b/ts/structs/EffectiveCapacity.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -560,10 +620,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mts b/ts/structs/EmptyNodeIdLookUp.mts similarity index 87% rename from ts/structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mts rename to ts/structs/EmptyNodeIdLookUp.mts index 255026f0..eeeb3655 100644 --- a/ts/structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mts +++ b/ts/structs/EmptyNodeIdLookUp.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,11 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +620,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +640,10 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -597,76 +662,33 @@ import * as bindings from '../bindings.mjs' /** - * A Tuple + * A [`NodeIdLookUp`] that always returns `None`. */ -export class ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ extends CommonBase { +export class EmptyNodeIdLookUp extends CommonBase { /* @internal */ public constructor(_dummy: null, ptr: bigint) { - super(ptr, bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free); + super(ptr, bindings.EmptyNodeIdLookUp_free); } /** - * + * Constructs a new EmptyNodeIdLookUp given each field */ - public get_a(): OutPoint { - const ret: bigint = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(this.ptr); - const ret_hu_conv: OutPoint = new OutPoint(null, ret); - CommonBase.add_ref_from(ret_hu_conv, this); + public static constructor_new(): EmptyNodeIdLookUp { + const ret: bigint = bindings.EmptyNodeIdLookUp_new(); + const ret_hu_conv: EmptyNodeIdLookUp = new EmptyNodeIdLookUp(null, ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); return ret_hu_conv; } /** - * + * Constructs a new NodeIdLookUp which calls the relevant methods on this_arg. + * This copies the `inner` pointer in this_arg and thus the returned NodeIdLookUp must be freed before this_arg is */ - public get_b(): MonitorEvent[] { - const ret: number = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(this.ptr); - const ret_conv_14_len: number = bindings.getArrayLength(ret); - const ret_conv_14_arr: MonitorEvent[] = new Array(ret_conv_14_len).fill(null); - for (var o = 0; o < ret_conv_14_len; o++) { - const ret_conv_14: bigint = bindings.getU64ArrayElem(ret, o); - const ret_conv_14_hu_conv: MonitorEvent = MonitorEvent.constr_from_ptr(ret_conv_14); - CommonBase.add_ref_from(ret_conv_14_hu_conv, this); - ret_conv_14_arr[o] = ret_conv_14_hu_conv; - } - bindings.freeWasmMemory(ret) - return ret_conv_14_arr; - } - - /** - * - */ - public get_c(): Uint8Array { - const ret: number = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; - } - - public clone_ptr(): bigint { - const ret: bigint = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(this.ptr); - return ret; - } - - /** - * Creates a new tuple which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. - */ - public clone(): ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ { - const ret: bigint = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(this.ptr); - const ret_hu_conv: ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ = new ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ(null, ret); + public as_NodeIdLookUp(): NodeIdLookUp { + const ret: bigint = bindings.EmptyNodeIdLookUp_as_NodeIdLookUp(this.ptr); + const ret_hu_conv: NodeIdLookUp = new NodeIdLookUp(null, ret); CommonBase.add_ref_from(ret_hu_conv, this); return ret_hu_conv; } - /** - * Creates a new C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ from the contained elements. - */ - public static constructor_new(a: OutPoint, b: MonitorEvent[], c: Uint8Array): ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ { - const ret: bigint = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(a == null ? 0n : CommonBase.get_ptr_of(a), bindings.encodeUint64Array(b.map(b_conv_14 => CommonBase.get_ptr_of(b_conv_14))), bindings.encodeUint8Array(bindings.check_arr_len(c, 33))); - const ret_hu_conv: ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ = new ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ(null, ret); - CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); - CommonBase.add_ref_from(ret_hu_conv, a); - b.forEach((b_conv_14: MonitorEvent) => { CommonBase.add_ref_from(ret_hu_conv, b_conv_14); }); - return ret_hu_conv; - } - } diff --git a/ts/structs/EntropySource.mts b/ts/structs/EntropySource.mts index 2f0b4e85..bc6346dc 100644 --- a/ts/structs/EntropySource.mts +++ b/ts/structs/EntropySource.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/ErroneousField.mts b/ts/structs/ErroneousField.mts index f085cfbf..fa1525d9 100644 --- a/ts/structs/ErroneousField.mts +++ b/ts/structs/ErroneousField.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -560,9 +620,11 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/ErrorAction.mts b/ts/structs/ErrorAction.mts index 3863b453..aac00df2 100644 --- a/ts/structs/ErrorAction.mts +++ b/ts/structs/ErrorAction.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -635,7 +700,7 @@ export class ErrorAction extends CommonBase { * Utility method to constructs a new DisconnectPeer-variant ErrorAction */ public static constructor_disconnect_peer(msg: ErrorMessage): ErrorAction { - const ret: bigint = bindings.ErrorAction_disconnect_peer(msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.ErrorAction_disconnect_peer(CommonBase.get_ptr_of(msg)); const ret_hu_conv: ErrorAction = ErrorAction.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -646,7 +711,7 @@ export class ErrorAction extends CommonBase { * Utility method to constructs a new DisconnectPeerWithWarning-variant ErrorAction */ public static constructor_disconnect_peer_with_warning(msg: WarningMessage): ErrorAction { - const ret: bigint = bindings.ErrorAction_disconnect_peer_with_warning(msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.ErrorAction_disconnect_peer_with_warning(CommonBase.get_ptr_of(msg)); const ret_hu_conv: ErrorAction = ErrorAction.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -687,7 +752,7 @@ export class ErrorAction extends CommonBase { * Utility method to constructs a new SendErrorMessage-variant ErrorAction */ public static constructor_send_error_message(msg: ErrorMessage): ErrorAction { - const ret: bigint = bindings.ErrorAction_send_error_message(msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.ErrorAction_send_error_message(CommonBase.get_ptr_of(msg)); const ret_hu_conv: ErrorAction = ErrorAction.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -698,7 +763,7 @@ export class ErrorAction extends CommonBase { * Utility method to constructs a new SendWarningMessage-variant ErrorAction */ public static constructor_send_warning_message(msg: WarningMessage, log_level: Level): ErrorAction { - const ret: bigint = bindings.ErrorAction_send_warning_message(msg == null ? 0n : CommonBase.get_ptr_of(msg), log_level); + const ret: bigint = bindings.ErrorAction_send_warning_message(CommonBase.get_ptr_of(msg), log_level); const ret_hu_conv: ErrorAction = ErrorAction.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); diff --git a/ts/structs/ErrorMessage.mts b/ts/structs/ErrorMessage.mts index 2838b232..6f7bc0d4 100644 --- a/ts/structs/ErrorMessage.mts +++ b/ts/structs/ErrorMessage.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,10 +678,11 @@ export class ErrorMessage extends CommonBase { * All-0s indicates a general error unrelated to a specific channel, after which all channels * with the sending peer should be closed. */ - public get_channel_id(): Uint8Array { - const ret: number = bindings.ErrorMessage_get_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public get_channel_id(): ChannelId { + const ret: bigint = bindings.ErrorMessage_get_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** @@ -625,8 +691,9 @@ export class ErrorMessage extends CommonBase { * All-0s indicates a general error unrelated to a specific channel, after which all channels * with the sending peer should be closed. */ - public set_channel_id(val: Uint8Array): void { - bindings.ErrorMessage_set_channel_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + public set_channel_id(val: ChannelId): void { + bindings.ErrorMessage_set_channel_id(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** @@ -656,10 +723,11 @@ export class ErrorMessage extends CommonBase { /** * Constructs a new ErrorMessage given each field */ - public static constructor_new(channel_id_arg: Uint8Array, data_arg: string): ErrorMessage { - const ret: bigint = bindings.ErrorMessage_new(bindings.encodeUint8Array(bindings.check_arr_len(channel_id_arg, 32)), bindings.encodeString(data_arg)); + public static constructor_new(channel_id_arg: ChannelId, data_arg: string): ErrorMessage { + const ret: bigint = bindings.ErrorMessage_new(CommonBase.get_ptr_of(channel_id_arg), bindings.encodeString(data_arg)); const ret_hu_conv: ErrorMessage = new ErrorMessage(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, channel_id_arg); return ret_hu_conv; } @@ -692,7 +760,7 @@ export class ErrorMessage extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: ErrorMessage): boolean { - const ret: boolean = bindings.ErrorMessage_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.ErrorMessage_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/ErroringMessageHandler.mts b/ts/structs/ErroringMessageHandler.mts index 41def66e..974542f7 100644 --- a/ts/structs/ErroringMessageHandler.mts +++ b/ts/structs/ErroringMessageHandler.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Event.mts b/ts/structs/Event.mts index 70db1e17..e7fc9847 100644 --- a/ts/structs/Event.mts +++ b/ts/structs/Event.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -653,18 +718,19 @@ export class Event extends CommonBase { /** * Utility method to constructs a new FundingGenerationReady-variant Event */ - public static constructor_funding_generation_ready(temporary_channel_id: Uint8Array, counterparty_node_id: Uint8Array, channel_value_satoshis: bigint, output_script: Uint8Array, user_channel_id: bigint): Event { - const ret: bigint = bindings.Event_funding_generation_ready(bindings.encodeUint8Array(bindings.check_arr_len(temporary_channel_id, 32)), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id, 33)), channel_value_satoshis, bindings.encodeUint8Array(output_script), bindings.encodeUint128(user_channel_id)); + public static constructor_funding_generation_ready(temporary_channel_id: ChannelId, counterparty_node_id: Uint8Array, channel_value_satoshis: bigint, output_script: Uint8Array, user_channel_id: bigint): Event { + const ret: bigint = bindings.Event_funding_generation_ready(CommonBase.get_ptr_of(temporary_channel_id), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id, 33)), channel_value_satoshis, bindings.encodeUint8Array(output_script), bindings.encodeUint128(user_channel_id)); const ret_hu_conv: Event = Event.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, temporary_channel_id); return ret_hu_conv; } /** * Utility method to constructs a new PaymentClaimable-variant Event */ - public static constructor_payment_claimable(receiver_node_id: Uint8Array, payment_hash: Uint8Array, onion_fields: RecipientOnionFields, amount_msat: bigint, counterparty_skimmed_fee_msat: bigint, purpose: PaymentPurpose, via_channel_id: Option_ThirtyTwoBytesZ, via_user_channel_id: Option_U128Z, claim_deadline: Option_u32Z): Event { - const ret: bigint = bindings.Event_payment_claimable(bindings.encodeUint8Array(bindings.check_arr_len(receiver_node_id, 33)), bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), onion_fields == null ? 0n : CommonBase.get_ptr_of(onion_fields), amount_msat, counterparty_skimmed_fee_msat, CommonBase.get_ptr_of(purpose), CommonBase.get_ptr_of(via_channel_id), CommonBase.get_ptr_of(via_user_channel_id), CommonBase.get_ptr_of(claim_deadline)); + public static constructor_payment_claimable(receiver_node_id: Uint8Array, payment_hash: Uint8Array, onion_fields: RecipientOnionFields, amount_msat: bigint, counterparty_skimmed_fee_msat: bigint, purpose: PaymentPurpose, via_channel_id: ChannelId, via_user_channel_id: Option_U128Z, claim_deadline: Option_u32Z): Event { + const ret: bigint = bindings.Event_payment_claimable(bindings.encodeUint8Array(bindings.check_arr_len(receiver_node_id, 33)), bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), CommonBase.get_ptr_of(onion_fields), amount_msat, counterparty_skimmed_fee_msat, CommonBase.get_ptr_of(purpose), CommonBase.get_ptr_of(via_channel_id), CommonBase.get_ptr_of(via_user_channel_id), CommonBase.get_ptr_of(claim_deadline)); const ret_hu_conv: Event = Event.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, onion_fields); @@ -679,7 +745,7 @@ export class Event extends CommonBase { * Utility method to constructs a new PaymentClaimed-variant Event */ public static constructor_payment_claimed(receiver_node_id: Uint8Array, payment_hash: Uint8Array, amount_msat: bigint, purpose: PaymentPurpose, htlcs: ClaimedHTLC[], sender_intended_total_msat: Option_u64Z): Event { - const ret: bigint = bindings.Event_payment_claimed(bindings.encodeUint8Array(bindings.check_arr_len(receiver_node_id, 33)), bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), amount_msat, CommonBase.get_ptr_of(purpose), bindings.encodeUint64Array(htlcs.map(htlcs_conv_13 => htlcs_conv_13 == null ? 0n : CommonBase.get_ptr_of(htlcs_conv_13))), CommonBase.get_ptr_of(sender_intended_total_msat)); + const ret: bigint = bindings.Event_payment_claimed(bindings.encodeUint8Array(bindings.check_arr_len(receiver_node_id, 33)), bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), amount_msat, CommonBase.get_ptr_of(purpose), bindings.encodeUint64Array(htlcs.map(htlcs_conv_13 => CommonBase.get_ptr_of(htlcs_conv_13))), CommonBase.get_ptr_of(sender_intended_total_msat)); const ret_hu_conv: Event = Event.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, purpose); @@ -736,7 +802,7 @@ export class Event extends CommonBase { * Utility method to constructs a new PaymentPathSuccessful-variant Event */ public static constructor_payment_path_successful(payment_id: Uint8Array, payment_hash: Option_ThirtyTwoBytesZ, path: Path): Event { - const ret: bigint = bindings.Event_payment_path_successful(bindings.encodeUint8Array(bindings.check_arr_len(payment_id, 32)), CommonBase.get_ptr_of(payment_hash), path == null ? 0n : CommonBase.get_ptr_of(path)); + const ret: bigint = bindings.Event_payment_path_successful(bindings.encodeUint8Array(bindings.check_arr_len(payment_id, 32)), CommonBase.get_ptr_of(payment_hash), CommonBase.get_ptr_of(path)); const ret_hu_conv: Event = Event.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, payment_hash); @@ -748,7 +814,7 @@ export class Event extends CommonBase { * Utility method to constructs a new PaymentPathFailed-variant Event */ public static constructor_payment_path_failed(payment_id: Option_ThirtyTwoBytesZ, payment_hash: Uint8Array, payment_failed_permanently: boolean, failure: PathFailure, path: Path, short_channel_id: Option_u64Z): Event { - const ret: bigint = bindings.Event_payment_path_failed(CommonBase.get_ptr_of(payment_id), bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), payment_failed_permanently, CommonBase.get_ptr_of(failure), path == null ? 0n : CommonBase.get_ptr_of(path), CommonBase.get_ptr_of(short_channel_id)); + const ret: bigint = bindings.Event_payment_path_failed(CommonBase.get_ptr_of(payment_id), bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), payment_failed_permanently, CommonBase.get_ptr_of(failure), CommonBase.get_ptr_of(path), CommonBase.get_ptr_of(short_channel_id)); const ret_hu_conv: Event = Event.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, payment_id); @@ -762,7 +828,7 @@ export class Event extends CommonBase { * Utility method to constructs a new ProbeSuccessful-variant Event */ public static constructor_probe_successful(payment_id: Uint8Array, payment_hash: Uint8Array, path: Path): Event { - const ret: bigint = bindings.Event_probe_successful(bindings.encodeUint8Array(bindings.check_arr_len(payment_id, 32)), bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), path == null ? 0n : CommonBase.get_ptr_of(path)); + const ret: bigint = bindings.Event_probe_successful(bindings.encodeUint8Array(bindings.check_arr_len(payment_id, 32)), bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), CommonBase.get_ptr_of(path)); const ret_hu_conv: Event = Event.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, path); @@ -773,7 +839,7 @@ export class Event extends CommonBase { * Utility method to constructs a new ProbeFailed-variant Event */ public static constructor_probe_failed(payment_id: Uint8Array, payment_hash: Uint8Array, path: Path, short_channel_id: Option_u64Z): Event { - const ret: bigint = bindings.Event_probe_failed(bindings.encodeUint8Array(bindings.check_arr_len(payment_id, 32)), bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), path == null ? 0n : CommonBase.get_ptr_of(path), CommonBase.get_ptr_of(short_channel_id)); + const ret: bigint = bindings.Event_probe_failed(bindings.encodeUint8Array(bindings.check_arr_len(payment_id, 32)), bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), CommonBase.get_ptr_of(path), CommonBase.get_ptr_of(short_channel_id)); const ret_hu_conv: Event = Event.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, path); @@ -804,7 +870,7 @@ export class Event extends CommonBase { /** * Utility method to constructs a new SpendableOutputs-variant Event */ - public static constructor_spendable_outputs(outputs: SpendableOutputDescriptor[], channel_id: Option_ThirtyTwoBytesZ): Event { + public static constructor_spendable_outputs(outputs: SpendableOutputDescriptor[], channel_id: ChannelId): Event { const ret: bigint = bindings.Event_spendable_outputs(bindings.encodeUint64Array(outputs.map(outputs_conv_27 => CommonBase.get_ptr_of(outputs_conv_27))), CommonBase.get_ptr_of(channel_id)); const ret_hu_conv: Event = Event.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); @@ -816,13 +882,16 @@ export class Event extends CommonBase { /** * Utility method to constructs a new PaymentForwarded-variant Event */ - public static constructor_payment_forwarded(prev_channel_id: Option_ThirtyTwoBytesZ, next_channel_id: Option_ThirtyTwoBytesZ, fee_earned_msat: Option_u64Z, claim_from_onchain_tx: boolean, outbound_amount_forwarded_msat: Option_u64Z): Event { - const ret: bigint = bindings.Event_payment_forwarded(CommonBase.get_ptr_of(prev_channel_id), CommonBase.get_ptr_of(next_channel_id), CommonBase.get_ptr_of(fee_earned_msat), claim_from_onchain_tx, CommonBase.get_ptr_of(outbound_amount_forwarded_msat)); + public static constructor_payment_forwarded(prev_channel_id: ChannelId, next_channel_id: ChannelId, prev_user_channel_id: Option_U128Z, next_user_channel_id: Option_U128Z, total_fee_earned_msat: Option_u64Z, skimmed_fee_msat: Option_u64Z, claim_from_onchain_tx: boolean, outbound_amount_forwarded_msat: Option_u64Z): Event { + const ret: bigint = bindings.Event_payment_forwarded(CommonBase.get_ptr_of(prev_channel_id), CommonBase.get_ptr_of(next_channel_id), CommonBase.get_ptr_of(prev_user_channel_id), CommonBase.get_ptr_of(next_user_channel_id), CommonBase.get_ptr_of(total_fee_earned_msat), CommonBase.get_ptr_of(skimmed_fee_msat), claim_from_onchain_tx, CommonBase.get_ptr_of(outbound_amount_forwarded_msat)); const ret_hu_conv: Event = Event.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, prev_channel_id); CommonBase.add_ref_from(ret_hu_conv, next_channel_id); - CommonBase.add_ref_from(ret_hu_conv, fee_earned_msat); + CommonBase.add_ref_from(ret_hu_conv, prev_user_channel_id); + CommonBase.add_ref_from(ret_hu_conv, next_user_channel_id); + CommonBase.add_ref_from(ret_hu_conv, total_fee_earned_msat); + CommonBase.add_ref_from(ret_hu_conv, skimmed_fee_msat); CommonBase.add_ref_from(ret_hu_conv, outbound_amount_forwarded_msat); return ret_hu_conv; } @@ -830,22 +899,25 @@ export class Event extends CommonBase { /** * Utility method to constructs a new ChannelPending-variant Event */ - public static constructor_channel_pending(channel_id: Uint8Array, user_channel_id: bigint, former_temporary_channel_id: Option_ThirtyTwoBytesZ, counterparty_node_id: Uint8Array, funding_txo: OutPoint): Event { - const ret: bigint = bindings.Event_channel_pending(bindings.encodeUint8Array(bindings.check_arr_len(channel_id, 32)), bindings.encodeUint128(user_channel_id), CommonBase.get_ptr_of(former_temporary_channel_id), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id, 33)), funding_txo == null ? 0n : CommonBase.get_ptr_of(funding_txo)); + public static constructor_channel_pending(channel_id: ChannelId, user_channel_id: bigint, former_temporary_channel_id: ChannelId, counterparty_node_id: Uint8Array, funding_txo: OutPoint, channel_type: ChannelTypeFeatures): Event { + const ret: bigint = bindings.Event_channel_pending(CommonBase.get_ptr_of(channel_id), bindings.encodeUint128(user_channel_id), CommonBase.get_ptr_of(former_temporary_channel_id), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id, 33)), CommonBase.get_ptr_of(funding_txo), CommonBase.get_ptr_of(channel_type)); const ret_hu_conv: Event = Event.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, channel_id); CommonBase.add_ref_from(ret_hu_conv, former_temporary_channel_id); CommonBase.add_ref_from(ret_hu_conv, funding_txo); + CommonBase.add_ref_from(ret_hu_conv, channel_type); return ret_hu_conv; } /** * Utility method to constructs a new ChannelReady-variant Event */ - public static constructor_channel_ready(channel_id: Uint8Array, user_channel_id: bigint, counterparty_node_id: Uint8Array, channel_type: ChannelTypeFeatures): Event { - const ret: bigint = bindings.Event_channel_ready(bindings.encodeUint8Array(bindings.check_arr_len(channel_id, 32)), bindings.encodeUint128(user_channel_id), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id, 33)), channel_type == null ? 0n : CommonBase.get_ptr_of(channel_type)); + public static constructor_channel_ready(channel_id: ChannelId, user_channel_id: bigint, counterparty_node_id: Uint8Array, channel_type: ChannelTypeFeatures): Event { + const ret: bigint = bindings.Event_channel_ready(CommonBase.get_ptr_of(channel_id), bindings.encodeUint128(user_channel_id), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id, 33)), CommonBase.get_ptr_of(channel_type)); const ret_hu_conv: Event = Event.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, channel_id); CommonBase.add_ref_from(ret_hu_conv, channel_type); return ret_hu_conv; } @@ -853,10 +925,11 @@ export class Event extends CommonBase { /** * Utility method to constructs a new ChannelClosed-variant Event */ - public static constructor_channel_closed(channel_id: Uint8Array, user_channel_id: bigint, reason: ClosureReason, counterparty_node_id: Uint8Array, channel_capacity_sats: Option_u64Z, channel_funding_txo: OutPoint): Event { - const ret: bigint = bindings.Event_channel_closed(bindings.encodeUint8Array(bindings.check_arr_len(channel_id, 32)), bindings.encodeUint128(user_channel_id), CommonBase.get_ptr_of(reason), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id, 33)), CommonBase.get_ptr_of(channel_capacity_sats), channel_funding_txo == null ? 0n : CommonBase.get_ptr_of(channel_funding_txo)); + public static constructor_channel_closed(channel_id: ChannelId, user_channel_id: bigint, reason: ClosureReason, counterparty_node_id: Uint8Array, channel_capacity_sats: Option_u64Z, channel_funding_txo: OutPoint): Event { + const ret: bigint = bindings.Event_channel_closed(CommonBase.get_ptr_of(channel_id), bindings.encodeUint128(user_channel_id), CommonBase.get_ptr_of(reason), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id, 33)), CommonBase.get_ptr_of(channel_capacity_sats), CommonBase.get_ptr_of(channel_funding_txo)); const ret_hu_conv: Event = Event.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, channel_id); CommonBase.add_ref_from(ret_hu_conv, reason); CommonBase.add_ref_from(ret_hu_conv, channel_capacity_sats); CommonBase.add_ref_from(ret_hu_conv, channel_funding_txo); @@ -866,20 +939,22 @@ export class Event extends CommonBase { /** * Utility method to constructs a new DiscardFunding-variant Event */ - public static constructor_discard_funding(channel_id: Uint8Array, transaction: Uint8Array): Event { - const ret: bigint = bindings.Event_discard_funding(bindings.encodeUint8Array(bindings.check_arr_len(channel_id, 32)), bindings.encodeUint8Array(transaction)); + public static constructor_discard_funding(channel_id: ChannelId, transaction: Uint8Array): Event { + const ret: bigint = bindings.Event_discard_funding(CommonBase.get_ptr_of(channel_id), bindings.encodeUint8Array(transaction)); const ret_hu_conv: Event = Event.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, channel_id); return ret_hu_conv; } /** * Utility method to constructs a new OpenChannelRequest-variant Event */ - public static constructor_open_channel_request(temporary_channel_id: Uint8Array, counterparty_node_id: Uint8Array, funding_satoshis: bigint, push_msat: bigint, channel_type: ChannelTypeFeatures): Event { - const ret: bigint = bindings.Event_open_channel_request(bindings.encodeUint8Array(bindings.check_arr_len(temporary_channel_id, 32)), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id, 33)), funding_satoshis, push_msat, channel_type == null ? 0n : CommonBase.get_ptr_of(channel_type)); + public static constructor_open_channel_request(temporary_channel_id: ChannelId, counterparty_node_id: Uint8Array, funding_satoshis: bigint, push_msat: bigint, channel_type: ChannelTypeFeatures): Event { + const ret: bigint = bindings.Event_open_channel_request(CommonBase.get_ptr_of(temporary_channel_id), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id, 33)), funding_satoshis, push_msat, CommonBase.get_ptr_of(channel_type)); const ret_hu_conv: Event = Event.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, temporary_channel_id); CommonBase.add_ref_from(ret_hu_conv, channel_type); return ret_hu_conv; } @@ -887,10 +962,11 @@ export class Event extends CommonBase { /** * Utility method to constructs a new HTLCHandlingFailed-variant Event */ - public static constructor_htlchandling_failed(prev_channel_id: Uint8Array, failed_next_destination: HTLCDestination): Event { - const ret: bigint = bindings.Event_htlchandling_failed(bindings.encodeUint8Array(bindings.check_arr_len(prev_channel_id, 32)), CommonBase.get_ptr_of(failed_next_destination)); + public static constructor_htlchandling_failed(prev_channel_id: ChannelId, failed_next_destination: HTLCDestination): Event { + const ret: bigint = bindings.Event_htlchandling_failed(CommonBase.get_ptr_of(prev_channel_id), CommonBase.get_ptr_of(failed_next_destination)); const ret_hu_conv: Event = Event.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, prev_channel_id); CommonBase.add_ref_from(ret_hu_conv, failed_next_destination); return ret_hu_conv; } @@ -911,7 +987,7 @@ export class Event extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public eq(b: Event): boolean { - const ret: boolean = bindings.Event_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.Event_eq(this.ptr, CommonBase.get_ptr_of(b)); return ret; } @@ -933,7 +1009,7 @@ export class Event_FundingGenerationReady extends Event { * * [`ChannelManager::funding_transaction_generated`]: crate::ln::channelmanager::ChannelManager::funding_transaction_generated */ - public temporary_channel_id: Uint8Array; + public temporary_channel_id: ChannelId; /** * The counterparty's node_id, which you'll need to pass back into * [`ChannelManager::funding_transaction_generated`]. @@ -964,9 +1040,10 @@ export class Event_FundingGenerationReady extends Event { /* @internal */ public constructor(ptr: bigint) { super(null, ptr); - const temporary_channel_id: number = bindings.LDKEvent_FundingGenerationReady_get_temporary_channel_id(ptr); - const temporary_channel_id_conv: Uint8Array = bindings.decodeUint8Array(temporary_channel_id); - this.temporary_channel_id = temporary_channel_id_conv; + const temporary_channel_id: bigint = bindings.LDKEvent_FundingGenerationReady_get_temporary_channel_id(ptr); + const temporary_channel_id_hu_conv: ChannelId = new ChannelId(null, temporary_channel_id); + CommonBase.add_ref_from(temporary_channel_id_hu_conv, this); + this.temporary_channel_id = temporary_channel_id_hu_conv; const counterparty_node_id: number = bindings.LDKEvent_FundingGenerationReady_get_counterparty_node_id(ptr); const counterparty_node_id_conv: Uint8Array = bindings.decodeUint8Array(counterparty_node_id); this.counterparty_node_id = counterparty_node_id_conv; @@ -1036,8 +1113,10 @@ export class Event_PaymentClaimable extends Event { public purpose: PaymentPurpose; /** * The `channel_id` indicating over which channel we received the payment. + * + * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public via_channel_id: Option_ThirtyTwoBytesZ; + public via_channel_id: ChannelId; /** * The `user_channel_id` indicating over which channel we received the payment. */ @@ -1072,7 +1151,7 @@ export class Event_PaymentClaimable extends Event { CommonBase.add_ref_from(purpose_hu_conv, this); this.purpose = purpose_hu_conv; const via_channel_id: bigint = bindings.LDKEvent_PaymentClaimable_get_via_channel_id(ptr); - const via_channel_id_hu_conv: Option_ThirtyTwoBytesZ = Option_ThirtyTwoBytesZ.constr_from_ptr(via_channel_id); + const via_channel_id_hu_conv: ChannelId = new ChannelId(null, via_channel_id); CommonBase.add_ref_from(via_channel_id_hu_conv, this); this.via_channel_id = via_channel_id_hu_conv; const via_user_channel_id: bigint = bindings.LDKEvent_PaymentClaimable_get_via_user_channel_id(ptr); @@ -1538,8 +1617,10 @@ export class Event_SpendableOutputs extends Event { * The `channel_id` indicating which channel the spendable outputs belong to. * * This will always be `Some` for events generated by LDK versions 0.0.117 and above. + * + * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public channel_id: Option_ThirtyTwoBytesZ; + public channel_id: ChannelId; /* @internal */ public constructor(ptr: bigint) { super(null, ptr); @@ -1555,7 +1636,7 @@ export class Event_SpendableOutputs extends Event { bindings.freeWasmMemory(outputs) this.outputs = outputs_conv_27_arr; const channel_id: bigint = bindings.LDKEvent_SpendableOutputs_get_channel_id(ptr); - const channel_id_hu_conv: Option_ThirtyTwoBytesZ = Option_ThirtyTwoBytesZ.constr_from_ptr(channel_id); + const channel_id_hu_conv: ChannelId = new ChannelId(null, channel_id); CommonBase.add_ref_from(channel_id_hu_conv, this); this.channel_id = channel_id_hu_conv; } @@ -1563,17 +1644,37 @@ export class Event_SpendableOutputs extends Event { /** A Event of type PaymentForwarded */ export class Event_PaymentForwarded extends Event { /** - * The incoming channel between the previous node and us. This is only `None` for events - * generated or serialized by versions prior to 0.0.107. + * The channel id of the incoming channel between the previous node and us. + * + * This is only `None` for events generated or serialized by versions prior to 0.0.107. + * + * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public prev_channel_id: Option_ThirtyTwoBytesZ; + public prev_channel_id: ChannelId; /** - * The outgoing channel between the next node and us. This is only `None` for events - * generated or serialized by versions prior to 0.0.107. + * The channel id of the outgoing channel between the next node and us. + * + * This is only `None` for events generated or serialized by versions prior to 0.0.107. + * + * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public next_channel_id: Option_ThirtyTwoBytesZ; + public next_channel_id: ChannelId; /** - * The fee, in milli-satoshis, which was earned as a result of the payment. + * The `user_channel_id` of the incoming channel between the previous node and us. + * + * This is only `None` for events generated or serialized by versions prior to 0.0.122. + */ + public prev_user_channel_id: Option_U128Z; + /** + * The `user_channel_id` of the outgoing channel between the next node and us. + * + * This will be `None` if the payment was settled via an on-chain transaction. See the + * caveat described for the `total_fee_earned_msat` field. Moreover it will be `None` for + * events generated or serialized by versions prior to 0.0.122. + */ + public next_user_channel_id: Option_U128Z; + /** + * The total fee, in milli-satoshis, which was earned as a result of the payment. * * Note that if we force-closed the channel over which we forwarded an HTLC while the HTLC * was pending, the amount the next hop claimed will have been rounded down to the nearest @@ -1584,10 +1685,26 @@ export class Event_PaymentForwarded extends Event { * If the channel which sent us the payment has been force-closed, we will claim the funds * via an on-chain transaction. In that case we do not yet know the on-chain transaction * fees which we will spend and will instead set this to `None`. It is possible duplicate - * `PaymentForwarded` events are generated for the same payment iff `fee_earned_msat` is + * `PaymentForwarded` events are generated for the same payment iff `total_fee_earned_msat` is * `None`. */ - public fee_earned_msat: Option_u64Z; + public total_fee_earned_msat: Option_u64Z; + /** + * The share of the total fee, in milli-satoshis, which was withheld in addition to the + * forwarding fee. + * + * This will only be `Some` if we forwarded an intercepted HTLC with less than the + * expected amount. This means our counterparty accepted to receive less than the invoice + * amount, e.g., by claiming the payment featuring a corresponding + * [`PaymentClaimable::counterparty_skimmed_fee_msat`]. + * + * Will also always be `None` for events serialized with LDK prior to version 0.0.122. + * + * The caveat described above the `total_fee_earned_msat` field applies here as well. + * + * [`PaymentClaimable::counterparty_skimmed_fee_msat`]: Self::PaymentClaimable::counterparty_skimmed_fee_msat + */ + public skimmed_fee_msat: Option_u64Z; /** * If this is `true`, the forwarded HTLC was claimed by our counterparty via an on-chain * transaction. @@ -1596,24 +1713,36 @@ export class Event_PaymentForwarded extends Event { /** * The final amount forwarded, in milli-satoshis, after the fee is deducted. * - * The caveat described above the `fee_earned_msat` field applies here as well. + * The caveat described above the `total_fee_earned_msat` field applies here as well. */ public outbound_amount_forwarded_msat: Option_u64Z; /* @internal */ public constructor(ptr: bigint) { super(null, ptr); const prev_channel_id: bigint = bindings.LDKEvent_PaymentForwarded_get_prev_channel_id(ptr); - const prev_channel_id_hu_conv: Option_ThirtyTwoBytesZ = Option_ThirtyTwoBytesZ.constr_from_ptr(prev_channel_id); + const prev_channel_id_hu_conv: ChannelId = new ChannelId(null, prev_channel_id); CommonBase.add_ref_from(prev_channel_id_hu_conv, this); this.prev_channel_id = prev_channel_id_hu_conv; const next_channel_id: bigint = bindings.LDKEvent_PaymentForwarded_get_next_channel_id(ptr); - const next_channel_id_hu_conv: Option_ThirtyTwoBytesZ = Option_ThirtyTwoBytesZ.constr_from_ptr(next_channel_id); + const next_channel_id_hu_conv: ChannelId = new ChannelId(null, next_channel_id); CommonBase.add_ref_from(next_channel_id_hu_conv, this); this.next_channel_id = next_channel_id_hu_conv; - const fee_earned_msat: bigint = bindings.LDKEvent_PaymentForwarded_get_fee_earned_msat(ptr); - const fee_earned_msat_hu_conv: Option_u64Z = Option_u64Z.constr_from_ptr(fee_earned_msat); - CommonBase.add_ref_from(fee_earned_msat_hu_conv, this); - this.fee_earned_msat = fee_earned_msat_hu_conv; + const prev_user_channel_id: bigint = bindings.LDKEvent_PaymentForwarded_get_prev_user_channel_id(ptr); + const prev_user_channel_id_hu_conv: Option_U128Z = Option_U128Z.constr_from_ptr(prev_user_channel_id); + CommonBase.add_ref_from(prev_user_channel_id_hu_conv, this); + this.prev_user_channel_id = prev_user_channel_id_hu_conv; + const next_user_channel_id: bigint = bindings.LDKEvent_PaymentForwarded_get_next_user_channel_id(ptr); + const next_user_channel_id_hu_conv: Option_U128Z = Option_U128Z.constr_from_ptr(next_user_channel_id); + CommonBase.add_ref_from(next_user_channel_id_hu_conv, this); + this.next_user_channel_id = next_user_channel_id_hu_conv; + const total_fee_earned_msat: bigint = bindings.LDKEvent_PaymentForwarded_get_total_fee_earned_msat(ptr); + const total_fee_earned_msat_hu_conv: Option_u64Z = Option_u64Z.constr_from_ptr(total_fee_earned_msat); + CommonBase.add_ref_from(total_fee_earned_msat_hu_conv, this); + this.total_fee_earned_msat = total_fee_earned_msat_hu_conv; + const skimmed_fee_msat: bigint = bindings.LDKEvent_PaymentForwarded_get_skimmed_fee_msat(ptr); + const skimmed_fee_msat_hu_conv: Option_u64Z = Option_u64Z.constr_from_ptr(skimmed_fee_msat); + CommonBase.add_ref_from(skimmed_fee_msat_hu_conv, this); + this.skimmed_fee_msat = skimmed_fee_msat_hu_conv; this.claim_from_onchain_tx = bindings.LDKEvent_PaymentForwarded_get_claim_from_onchain_tx(ptr); const outbound_amount_forwarded_msat: bigint = bindings.LDKEvent_PaymentForwarded_get_outbound_amount_forwarded_msat(ptr); const outbound_amount_forwarded_msat_hu_conv: Option_u64Z = Option_u64Z.constr_from_ptr(outbound_amount_forwarded_msat); @@ -1626,7 +1755,7 @@ export class Event_ChannelPending extends Event { /** * The `channel_id` of the channel that is pending confirmation. */ - public channel_id: Uint8Array; + public channel_id: ChannelId; /** * The `user_channel_id` value passed in to [`ChannelManager::create_channel`] for outbound * channels, or to [`ChannelManager::accept_inbound_channel`] for inbound channels if @@ -1642,8 +1771,10 @@ export class Event_ChannelPending extends Event { * The `temporary_channel_id` this channel used to be known by during channel establishment. * * Will be `None` for channels created prior to LDK version 0.0.115. + * + * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public former_temporary_channel_id: Option_ThirtyTwoBytesZ; + public former_temporary_channel_id: ChannelId; /** * The `node_id` of the channel counterparty. */ @@ -1652,17 +1783,26 @@ export class Event_ChannelPending extends Event { * The outpoint of the channel's funding transaction. */ public funding_txo: OutPoint; + /** + * The features that this channel will operate with. + * + * Will be `None` for channels created prior to LDK version 0.0.122. + * + * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public channel_type: ChannelTypeFeatures; /* @internal */ public constructor(ptr: bigint) { super(null, ptr); - const channel_id: number = bindings.LDKEvent_ChannelPending_get_channel_id(ptr); - const channel_id_conv: Uint8Array = bindings.decodeUint8Array(channel_id); - this.channel_id = channel_id_conv; + const channel_id: bigint = bindings.LDKEvent_ChannelPending_get_channel_id(ptr); + const channel_id_hu_conv: ChannelId = new ChannelId(null, channel_id); + CommonBase.add_ref_from(channel_id_hu_conv, this); + this.channel_id = channel_id_hu_conv; const user_channel_id: number = bindings.LDKEvent_ChannelPending_get_user_channel_id(ptr); const user_channel_id_conv: bigint = bindings.decodeUint128(user_channel_id); this.user_channel_id = user_channel_id_conv; const former_temporary_channel_id: bigint = bindings.LDKEvent_ChannelPending_get_former_temporary_channel_id(ptr); - const former_temporary_channel_id_hu_conv: Option_ThirtyTwoBytesZ = Option_ThirtyTwoBytesZ.constr_from_ptr(former_temporary_channel_id); + const former_temporary_channel_id_hu_conv: ChannelId = new ChannelId(null, former_temporary_channel_id); CommonBase.add_ref_from(former_temporary_channel_id_hu_conv, this); this.former_temporary_channel_id = former_temporary_channel_id_hu_conv; const counterparty_node_id: number = bindings.LDKEvent_ChannelPending_get_counterparty_node_id(ptr); @@ -1672,6 +1812,10 @@ export class Event_ChannelPending extends Event { const funding_txo_hu_conv: OutPoint = new OutPoint(null, funding_txo); CommonBase.add_ref_from(funding_txo_hu_conv, this); this.funding_txo = funding_txo_hu_conv; + const channel_type: bigint = bindings.LDKEvent_ChannelPending_get_channel_type(ptr); + const channel_type_hu_conv: ChannelTypeFeatures = new ChannelTypeFeatures(null, channel_type); + CommonBase.add_ref_from(channel_type_hu_conv, this); + this.channel_type = channel_type_hu_conv; } } /** A Event of type ChannelReady */ @@ -1679,7 +1823,7 @@ export class Event_ChannelReady extends Event { /** * The `channel_id` of the channel that is ready. */ - public channel_id: Uint8Array; + public channel_id: ChannelId; /** * The `user_channel_id` value passed in to [`ChannelManager::create_channel`] for outbound * channels, or to [`ChannelManager::accept_inbound_channel`] for inbound channels if @@ -1702,9 +1846,10 @@ export class Event_ChannelReady extends Event { /* @internal */ public constructor(ptr: bigint) { super(null, ptr); - const channel_id: number = bindings.LDKEvent_ChannelReady_get_channel_id(ptr); - const channel_id_conv: Uint8Array = bindings.decodeUint8Array(channel_id); - this.channel_id = channel_id_conv; + const channel_id: bigint = bindings.LDKEvent_ChannelReady_get_channel_id(ptr); + const channel_id_hu_conv: ChannelId = new ChannelId(null, channel_id); + CommonBase.add_ref_from(channel_id_hu_conv, this); + this.channel_id = channel_id_hu_conv; const user_channel_id: number = bindings.LDKEvent_ChannelReady_get_user_channel_id(ptr); const user_channel_id_conv: bigint = bindings.decodeUint128(user_channel_id); this.user_channel_id = user_channel_id_conv; @@ -1723,7 +1868,7 @@ export class Event_ChannelClosed extends Event { * The `channel_id` of the channel which has been closed. Note that on-chain transactions * resolving the channel are likely still awaiting confirmation. */ - public channel_id: Uint8Array; + public channel_id: ChannelId; /** * The `user_channel_id` value passed in to [`ChannelManager::create_channel`] for outbound * channels, or to [`ChannelManager::accept_inbound_channel`] for inbound channels if @@ -1766,9 +1911,10 @@ export class Event_ChannelClosed extends Event { /* @internal */ public constructor(ptr: bigint) { super(null, ptr); - const channel_id: number = bindings.LDKEvent_ChannelClosed_get_channel_id(ptr); - const channel_id_conv: Uint8Array = bindings.decodeUint8Array(channel_id); - this.channel_id = channel_id_conv; + const channel_id: bigint = bindings.LDKEvent_ChannelClosed_get_channel_id(ptr); + const channel_id_hu_conv: ChannelId = new ChannelId(null, channel_id); + CommonBase.add_ref_from(channel_id_hu_conv, this); + this.channel_id = channel_id_hu_conv; const user_channel_id: number = bindings.LDKEvent_ChannelClosed_get_user_channel_id(ptr); const user_channel_id_conv: bigint = bindings.decodeUint128(user_channel_id); this.user_channel_id = user_channel_id_conv; @@ -1794,7 +1940,7 @@ export class Event_DiscardFunding extends Event { /** * The channel_id of the channel which has been closed. */ - public channel_id: Uint8Array; + public channel_id: ChannelId; /** * The full transaction received from the user */ @@ -1802,9 +1948,10 @@ export class Event_DiscardFunding extends Event { /* @internal */ public constructor(ptr: bigint) { super(null, ptr); - const channel_id: number = bindings.LDKEvent_DiscardFunding_get_channel_id(ptr); - const channel_id_conv: Uint8Array = bindings.decodeUint8Array(channel_id); - this.channel_id = channel_id_conv; + const channel_id: bigint = bindings.LDKEvent_DiscardFunding_get_channel_id(ptr); + const channel_id_hu_conv: ChannelId = new ChannelId(null, channel_id); + CommonBase.add_ref_from(channel_id_hu_conv, this); + this.channel_id = channel_id_hu_conv; const transaction: number = bindings.LDKEvent_DiscardFunding_get_transaction(ptr); const transaction_conv: Uint8Array = bindings.decodeUint8Array(transaction); this.transaction = transaction_conv; @@ -1822,7 +1969,7 @@ export class Event_OpenChannelRequest extends Event { * [`ChannelManager::accept_inbound_channel`]: crate::ln::channelmanager::ChannelManager::accept_inbound_channel * [`ChannelManager::force_close_without_broadcasting_txn`]: crate::ln::channelmanager::ChannelManager::force_close_without_broadcasting_txn */ - public temporary_channel_id: Uint8Array; + public temporary_channel_id: ChannelId; /** * The node_id of the counterparty requesting to open the channel. * @@ -1864,9 +2011,10 @@ export class Event_OpenChannelRequest extends Event { /* @internal */ public constructor(ptr: bigint) { super(null, ptr); - const temporary_channel_id: number = bindings.LDKEvent_OpenChannelRequest_get_temporary_channel_id(ptr); - const temporary_channel_id_conv: Uint8Array = bindings.decodeUint8Array(temporary_channel_id); - this.temporary_channel_id = temporary_channel_id_conv; + const temporary_channel_id: bigint = bindings.LDKEvent_OpenChannelRequest_get_temporary_channel_id(ptr); + const temporary_channel_id_hu_conv: ChannelId = new ChannelId(null, temporary_channel_id); + CommonBase.add_ref_from(temporary_channel_id_hu_conv, this); + this.temporary_channel_id = temporary_channel_id_hu_conv; const counterparty_node_id: number = bindings.LDKEvent_OpenChannelRequest_get_counterparty_node_id(ptr); const counterparty_node_id_conv: Uint8Array = bindings.decodeUint8Array(counterparty_node_id); this.counterparty_node_id = counterparty_node_id_conv; @@ -1883,7 +2031,7 @@ export class Event_HTLCHandlingFailed extends Event { /** * The channel over which the HTLC was received. */ - public prev_channel_id: Uint8Array; + public prev_channel_id: ChannelId; /** * Destination of the HTLC that failed to be processed. */ @@ -1891,9 +2039,10 @@ export class Event_HTLCHandlingFailed extends Event { /* @internal */ public constructor(ptr: bigint) { super(null, ptr); - const prev_channel_id: number = bindings.LDKEvent_HTLCHandlingFailed_get_prev_channel_id(ptr); - const prev_channel_id_conv: Uint8Array = bindings.decodeUint8Array(prev_channel_id); - this.prev_channel_id = prev_channel_id_conv; + const prev_channel_id: bigint = bindings.LDKEvent_HTLCHandlingFailed_get_prev_channel_id(ptr); + const prev_channel_id_hu_conv: ChannelId = new ChannelId(null, prev_channel_id); + CommonBase.add_ref_from(prev_channel_id_hu_conv, this); + this.prev_channel_id = prev_channel_id_hu_conv; const failed_next_destination: bigint = bindings.LDKEvent_HTLCHandlingFailed_get_failed_next_destination(ptr); const failed_next_destination_hu_conv: HTLCDestination = HTLCDestination.constr_from_ptr(failed_next_destination); CommonBase.add_ref_from(failed_next_destination_hu_conv, this); diff --git a/ts/structs/EventHandler.mts b/ts/structs/EventHandler.mts index 63abbd6e..0af18d5f 100644 --- a/ts/structs/EventHandler.mts +++ b/ts/structs/EventHandler.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; import { FailureCode } from '../structs/FailureCode.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/EventsProvider.mts b/ts/structs/EventsProvider.mts index 476c3721..d1e40dc9 100644 --- a/ts/structs/EventsProvider.mts +++ b/ts/structs/EventsProvider.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { FailureCode } from '../structs/FailureCode.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/ExpandedKey.mts b/ts/structs/ExpandedKey.mts index ada1fd5f..501fe6bd 100644 --- a/ts/structs/ExpandedKey.mts +++ b/ts/structs/ExpandedKey.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,10 +600,14 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/ExpiryTime.mts b/ts/structs/ExpiryTime.mts index 19c05997..dc0f8416 100644 --- a/ts/structs/ExpiryTime.mts +++ b/ts/structs/ExpiryTime.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -560,10 +620,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -578,8 +640,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -635,7 +700,7 @@ export class ExpiryTime extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: ExpiryTime): boolean { - const ret: boolean = bindings.ExpiryTime_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.ExpiryTime_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/FailureCode.mts b/ts/structs/FailureCode.mts index ef3dca59..bc9a7cf1 100644 --- a/ts/structs/FailureCode.mts +++ b/ts/structs/FailureCode.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Fallback.mts b/ts/structs/Fallback.mts index 0965086b..788fe891 100644 --- a/ts/structs/Fallback.mts +++ b/ts/structs/Fallback.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -560,10 +620,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -578,8 +640,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -670,7 +735,7 @@ export class Fallback extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public eq(b: Fallback): boolean { - const ret: boolean = bindings.Fallback_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.Fallback_eq(this.ptr, CommonBase.get_ptr_of(b)); return ret; } diff --git a/ts/structs/FeeEstimator.mts b/ts/structs/FeeEstimator.mts index b26433fa..93a7de87 100644 --- a/ts/structs/FeeEstimator.mts +++ b/ts/structs/FeeEstimator.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -627,6 +692,10 @@ class LDKFeeEstimatorHolder { * * Note that all of the functions implemented here *must* be reentrant-safe (obviously - they're * called from inside the library in response to chain events, P2P events, or timer events). + * + * LDK may generate a substantial number of fee-estimation calls in some cases. You should + * pre-calculate and cache the fee estimate results to ensure you don't substantially slow HTLC + * handling. */ export class FeeEstimator extends CommonBase { /* @internal */ diff --git a/ts/structs/Filter.mts b/ts/structs/Filter.mts index 8c18dde5..5eada65c 100644 --- a/ts/structs/Filter.mts +++ b/ts/structs/Filter.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,19 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,13 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -693,7 +758,7 @@ export class Filter extends CommonBase { * registered mid-processing. */ public register_output(output: WatchedOutput): void { - bindings.Filter_register_output(this.ptr, output == null ? 0n : CommonBase.get_ptr_of(output)); + bindings.Filter_register_output(this.ptr, CommonBase.get_ptr_of(output)); CommonBase.add_ref_from(this, output); } diff --git a/ts/structs/FinalOnionHopData.mts b/ts/structs/FinalOnionHopData.mts index 3a346cbe..b9096baf 100644 --- a/ts/structs/FinalOnionHopData.mts +++ b/ts/structs/FinalOnionHopData.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/FirstHopCandidate.mts b/ts/structs/FirstHopCandidate.mts index 03ac4c05..5027a77c 100644 --- a/ts/structs/FirstHopCandidate.mts +++ b/ts/structs/FirstHopCandidate.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/FixedPenaltyScorer.mts b/ts/structs/FixedPenaltyScorer.mts index 2d3296cb..505851f5 100644 --- a/ts/structs/FixedPenaltyScorer.mts +++ b/ts/structs/FixedPenaltyScorer.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/ForwardNode.mts b/ts/structs/ForwardNode.mts index d95c2d8e..a75cd67c 100644 --- a/ts/structs/ForwardNode.mts +++ b/ts/structs/ForwardNode.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Resul import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -621,7 +686,7 @@ export class ForwardNode extends CommonBase { * used for [`BlindedPayInfo`] construction. */ public set_tlvs(val: ForwardTlvs): void { - bindings.ForwardNode_set_tlvs(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.ForwardNode_set_tlvs(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -660,7 +725,7 @@ export class ForwardNode extends CommonBase { * Constructs a new ForwardNode given each field */ public static constructor_new(tlvs_arg: ForwardTlvs, node_id_arg: Uint8Array, htlc_maximum_msat_arg: bigint): ForwardNode { - const ret: bigint = bindings.ForwardNode_new(tlvs_arg == null ? 0n : CommonBase.get_ptr_of(tlvs_arg), bindings.encodeUint8Array(bindings.check_arr_len(node_id_arg, 33)), htlc_maximum_msat_arg); + const ret: bigint = bindings.ForwardNode_new(CommonBase.get_ptr_of(tlvs_arg), bindings.encodeUint8Array(bindings.check_arr_len(node_id_arg, 33)), htlc_maximum_msat_arg); const ret_hu_conv: ForwardNode = new ForwardNode(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, tlvs_arg); diff --git a/ts/structs/ForwardTlvs.mts b/ts/structs/ForwardTlvs.mts index bc26be7b..8eba411e 100644 --- a/ts/structs/ForwardTlvs.mts +++ b/ts/structs/ForwardTlvs.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -560,10 +620,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -578,8 +640,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; import { Wallet } from '../structs/Wallet.mjs'; @@ -634,7 +699,7 @@ export class ForwardTlvs extends CommonBase { * Payment parameters for relaying over [`Self::short_channel_id`]. */ public set_payment_relay(val: PaymentRelay): void { - bindings.ForwardTlvs_set_payment_relay(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.ForwardTlvs_set_payment_relay(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -652,7 +717,7 @@ export class ForwardTlvs extends CommonBase { * Payment constraints for relaying over [`Self::short_channel_id`]. */ public set_payment_constraints(val: PaymentConstraints): void { - bindings.ForwardTlvs_set_payment_constraints(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.ForwardTlvs_set_payment_constraints(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -676,7 +741,7 @@ export class ForwardTlvs extends CommonBase { * [`BlindedHop::encrypted_payload`]: crate::blinded_path::BlindedHop::encrypted_payload */ public set_features(val: BlindedHopFeatures): void { - bindings.ForwardTlvs_set_features(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.ForwardTlvs_set_features(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -684,7 +749,7 @@ export class ForwardTlvs extends CommonBase { * Constructs a new ForwardTlvs given each field */ public static constructor_new(short_channel_id_arg: bigint, payment_relay_arg: PaymentRelay, payment_constraints_arg: PaymentConstraints, features_arg: BlindedHopFeatures): ForwardTlvs { - const ret: bigint = bindings.ForwardTlvs_new(short_channel_id_arg, payment_relay_arg == null ? 0n : CommonBase.get_ptr_of(payment_relay_arg), payment_constraints_arg == null ? 0n : CommonBase.get_ptr_of(payment_constraints_arg), features_arg == null ? 0n : CommonBase.get_ptr_of(features_arg)); + const ret: bigint = bindings.ForwardTlvs_new(short_channel_id_arg, CommonBase.get_ptr_of(payment_relay_arg), CommonBase.get_ptr_of(payment_constraints_arg), CommonBase.get_ptr_of(features_arg)); const ret_hu_conv: ForwardTlvs = new ForwardTlvs(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, payment_relay_arg); diff --git a/ts/structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mts b/ts/structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mts new file mode 100644 index 00000000..1db15ecc --- /dev/null +++ b/ts/structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mts @@ -0,0 +1,748 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + +/** + * A Tuple + */ +export class FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ extends CommonBase { + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free); + } + + /** + * + */ + public get_a(): OutPoint { + const ret: bigint = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(this.ptr); + const ret_hu_conv: OutPoint = new OutPoint(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * + */ + public get_b(): ChannelId { + const ret: bigint = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * + */ + public get_c(): MonitorEvent[] { + const ret: number = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(this.ptr); + const ret_conv_14_len: number = bindings.getArrayLength(ret); + const ret_conv_14_arr: MonitorEvent[] = new Array(ret_conv_14_len).fill(null); + for (var o = 0; o < ret_conv_14_len; o++) { + const ret_conv_14: bigint = bindings.getU64ArrayElem(ret, o); + const ret_conv_14_hu_conv: MonitorEvent = MonitorEvent.constr_from_ptr(ret_conv_14); + CommonBase.add_ref_from(ret_conv_14_hu_conv, this); + ret_conv_14_arr[o] = ret_conv_14_hu_conv; + } + bindings.freeWasmMemory(ret) + return ret_conv_14_arr; + } + + /** + * + */ + public get_d(): Uint8Array { + const ret: number = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a new tuple which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public clone(): FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ { + const ret: bigint = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(this.ptr); + const ret_hu_conv: FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ = new FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * Creates a new C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ from the contained elements. + */ + public static constructor_new(a: OutPoint, b: ChannelId, c: MonitorEvent[], d: Uint8Array): FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ { + const ret: bigint = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new(CommonBase.get_ptr_of(a), CommonBase.get_ptr_of(b), bindings.encodeUint64Array(c.map(c_conv_14 => CommonBase.get_ptr_of(c_conv_14))), bindings.encodeUint8Array(bindings.check_arr_len(d, 33))); + const ret_hu_conv: FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ = new FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ(null, ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, a); + CommonBase.add_ref_from(ret_hu_conv, b); + c.forEach((c_conv_14: MonitorEvent) => { CommonBase.add_ref_from(ret_hu_conv, c_conv_14); }); + return ret_hu_conv; + } + +} diff --git a/ts/structs/FundingCreated.mts b/ts/structs/FundingCreated.mts index 0b749e08..7ac5a25c 100644 --- a/ts/structs/FundingCreated.mts +++ b/ts/structs/FundingCreated.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -612,17 +677,19 @@ export class FundingCreated extends CommonBase { /** * A temporary channel ID, until the funding is established */ - public get_temporary_channel_id(): Uint8Array { - const ret: number = bindings.FundingCreated_get_temporary_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public get_temporary_channel_id(): ChannelId { + const ret: bigint = bindings.FundingCreated_get_temporary_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** * A temporary channel ID, until the funding is established */ - public set_temporary_channel_id(val: Uint8Array): void { - bindings.FundingCreated_set_temporary_channel_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + public set_temporary_channel_id(val: ChannelId): void { + bindings.FundingCreated_set_temporary_channel_id(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** @@ -675,10 +742,11 @@ export class FundingCreated extends CommonBase { /** * Constructs a new FundingCreated given each field */ - public static constructor_new(temporary_channel_id_arg: Uint8Array, funding_txid_arg: Uint8Array, funding_output_index_arg: number, signature_arg: Uint8Array): FundingCreated { - const ret: bigint = bindings.FundingCreated_new(bindings.encodeUint8Array(bindings.check_arr_len(temporary_channel_id_arg, 32)), bindings.encodeUint8Array(bindings.check_arr_len(funding_txid_arg, 32)), funding_output_index_arg, bindings.encodeUint8Array(bindings.check_arr_len(signature_arg, 64))); + public static constructor_new(temporary_channel_id_arg: ChannelId, funding_txid_arg: Uint8Array, funding_output_index_arg: number, signature_arg: Uint8Array): FundingCreated { + const ret: bigint = bindings.FundingCreated_new(CommonBase.get_ptr_of(temporary_channel_id_arg), bindings.encodeUint8Array(bindings.check_arr_len(funding_txid_arg, 32)), funding_output_index_arg, bindings.encodeUint8Array(bindings.check_arr_len(signature_arg, 64))); const ret_hu_conv: FundingCreated = new FundingCreated(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, temporary_channel_id_arg); return ret_hu_conv; } @@ -711,7 +779,7 @@ export class FundingCreated extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: FundingCreated): boolean { - const ret: boolean = bindings.FundingCreated_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.FundingCreated_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/FundingSigned.mts b/ts/structs/FundingSigned.mts index 12489a10..1c34d692 100644 --- a/ts/structs/FundingSigned.mts +++ b/ts/structs/FundingSigned.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -612,17 +677,19 @@ export class FundingSigned extends CommonBase { /** * The channel ID */ - public get_channel_id(): Uint8Array { - const ret: number = bindings.FundingSigned_get_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public get_channel_id(): ChannelId { + const ret: bigint = bindings.FundingSigned_get_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** * The channel ID */ - public set_channel_id(val: Uint8Array): void { - bindings.FundingSigned_set_channel_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + public set_channel_id(val: ChannelId): void { + bindings.FundingSigned_set_channel_id(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** @@ -644,10 +711,11 @@ export class FundingSigned extends CommonBase { /** * Constructs a new FundingSigned given each field */ - public static constructor_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array): FundingSigned { - const ret: bigint = bindings.FundingSigned_new(bindings.encodeUint8Array(bindings.check_arr_len(channel_id_arg, 32)), bindings.encodeUint8Array(bindings.check_arr_len(signature_arg, 64))); + public static constructor_new(channel_id_arg: ChannelId, signature_arg: Uint8Array): FundingSigned { + const ret: bigint = bindings.FundingSigned_new(CommonBase.get_ptr_of(channel_id_arg), bindings.encodeUint8Array(bindings.check_arr_len(signature_arg, 64))); const ret_hu_conv: FundingSigned = new FundingSigned(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, channel_id_arg); return ret_hu_conv; } @@ -680,7 +748,7 @@ export class FundingSigned extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: FundingSigned): boolean { - const ret: boolean = bindings.FundingSigned_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.FundingSigned_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/Future.mts b/ts/structs/Future.mts index 07721a34..ce936028 100644 --- a/ts/structs/Future.mts +++ b/ts/structs/Future.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,14 +583,14 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -598,8 +663,6 @@ import * as bindings from '../bindings.mjs' /** * A simple future which can complete once, and calls some callback(s) when it does so. - * - * Clones can be made and all futures cloned from the same source will complete at the same time. */ export class Future extends CommonBase { /* @internal */ @@ -607,21 +670,6 @@ export class Future extends CommonBase { super(ptr, bindings.Future_free); } - public clone_ptr(): bigint { - const ret: bigint = bindings.Future_clone_ptr(this.ptr); - return ret; - } - - /** - * Creates a copy of the Future - */ - public clone(): Future { - const ret: bigint = bindings.Future_clone(this.ptr); - const ret_hu_conv: Future = new Future(null, ret); - CommonBase.add_ref_from(ret_hu_conv, this); - return ret_hu_conv; - } - /** * Registers a callback to be called upon completion of this future. If the future has already * completed, the callback will be called immediately. diff --git a/ts/structs/FutureCallback.mts b/ts/structs/FutureCallback.mts index de9b3d28..0513cbdd 100644 --- a/ts/structs/FutureCallback.mts +++ b/ts/structs/FutureCallback.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,14 +583,14 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/GossipSync.mts b/ts/structs/GossipSync.mts index 66fd772f..418d6f1b 100644 --- a/ts/structs/GossipSync.mts +++ b/ts/structs/GossipSync.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -560,10 +620,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -578,8 +640,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -616,7 +681,7 @@ export class GossipSync extends CommonBase { * Utility method to constructs a new P2P-variant GossipSync */ public static constructor_p2_p(a: P2PGossipSync): GossipSync { - const ret: bigint = bindings.GossipSync_p2_p(a == null ? 0n : CommonBase.get_ptr_of(a)); + const ret: bigint = bindings.GossipSync_p2_p(CommonBase.get_ptr_of(a)); const ret_hu_conv: GossipSync = GossipSync.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, a); @@ -627,7 +692,7 @@ export class GossipSync extends CommonBase { * Utility method to constructs a new Rapid-variant GossipSync */ public static constructor_rapid(a: RapidGossipSync): GossipSync { - const ret: bigint = bindings.GossipSync_rapid(a == null ? 0n : CommonBase.get_ptr_of(a)); + const ret: bigint = bindings.GossipSync_rapid(CommonBase.get_ptr_of(a)); const ret_hu_conv: GossipSync = GossipSync.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, a); diff --git a/ts/structs/GossipTimestampFilter.mts b/ts/structs/GossipTimestampFilter.mts index fb87de5c..a7db3552 100644 --- a/ts/structs/GossipTimestampFilter.mts +++ b/ts/structs/GossipTimestampFilter.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -694,7 +759,7 @@ export class GossipTimestampFilter extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: GossipTimestampFilter): boolean { - const ret: boolean = bindings.GossipTimestampFilter_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.GossipTimestampFilter_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/GraphSyncError.mts b/ts/structs/GraphSyncError.mts index b009b19c..96eac81c 100644 --- a/ts/structs/GraphSyncError.mts +++ b/ts/structs/GraphSyncError.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -641,7 +706,7 @@ export class GraphSyncError extends CommonBase { * Utility method to constructs a new LightningError-variant GraphSyncError */ public static constructor_lightning_error(a: LightningError): GraphSyncError { - const ret: bigint = bindings.GraphSyncError_lightning_error(a == null ? 0n : CommonBase.get_ptr_of(a)); + const ret: bigint = bindings.GraphSyncError_lightning_error(CommonBase.get_ptr_of(a)); const ret_hu_conv: GraphSyncError = GraphSyncError.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, a); diff --git a/ts/structs/HTLCDescriptor.mts b/ts/structs/HTLCDescriptor.mts index 799d6390..3c81e9f9 100644 --- a/ts/structs/HTLCDescriptor.mts +++ b/ts/structs/HTLCDescriptor.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -619,10 +684,26 @@ export class HTLCDescriptor extends CommonBase { * The parameters required to derive the signer for the HTLC input. */ public set_channel_derivation_parameters(val: ChannelDerivationParameters): void { - bindings.HTLCDescriptor_set_channel_derivation_parameters(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.HTLCDescriptor_set_channel_derivation_parameters(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } + /** + * The txid of the commitment transaction in which the HTLC output lives. + */ + public get_commitment_txid(): Uint8Array { + const ret: number = bindings.HTLCDescriptor_get_commitment_txid(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + + /** + * The txid of the commitment transaction in which the HTLC output lives. + */ + public set_commitment_txid(val: Uint8Array): void { + bindings.HTLCDescriptor_set_commitment_txid(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + } + /** * The number of the commitment transaction in which the HTLC output lives. */ @@ -695,7 +776,7 @@ export class HTLCDescriptor extends CommonBase { * The details of the HTLC as it appears in the commitment transaction. */ public set_htlc(val: HTLCOutputInCommitment): void { - bindings.HTLCDescriptor_set_htlc(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.HTLCDescriptor_set_htlc(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -735,6 +816,19 @@ export class HTLCDescriptor extends CommonBase { bindings.HTLCDescriptor_set_counterparty_sig(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 64))); } + /** + * Constructs a new HTLCDescriptor given each field + */ + public static constructor_new(channel_derivation_parameters_arg: ChannelDerivationParameters, commitment_txid_arg: Uint8Array, per_commitment_number_arg: bigint, per_commitment_point_arg: Uint8Array, feerate_per_kw_arg: number, htlc_arg: HTLCOutputInCommitment, preimage_arg: Option_ThirtyTwoBytesZ, counterparty_sig_arg: Uint8Array): HTLCDescriptor { + const ret: bigint = bindings.HTLCDescriptor_new(CommonBase.get_ptr_of(channel_derivation_parameters_arg), bindings.encodeUint8Array(bindings.check_arr_len(commitment_txid_arg, 32)), per_commitment_number_arg, bindings.encodeUint8Array(bindings.check_arr_len(per_commitment_point_arg, 33)), feerate_per_kw_arg, CommonBase.get_ptr_of(htlc_arg), CommonBase.get_ptr_of(preimage_arg), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_sig_arg, 64))); + const ret_hu_conv: HTLCDescriptor = new HTLCDescriptor(null, ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, channel_derivation_parameters_arg); + CommonBase.add_ref_from(ret_hu_conv, htlc_arg); + CommonBase.add_ref_from(ret_hu_conv, preimage_arg); + return ret_hu_conv; + } + public clone_ptr(): bigint { const ret: bigint = bindings.HTLCDescriptor_clone_ptr(this.ptr); return ret; @@ -756,7 +850,7 @@ export class HTLCDescriptor extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: HTLCDescriptor): boolean { - const ret: boolean = bindings.HTLCDescriptor_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.HTLCDescriptor_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/HTLCDestination.mts b/ts/structs/HTLCDestination.mts index 455c12e7..6d54f755 100644 --- a/ts/structs/HTLCDestination.mts +++ b/ts/structs/HTLCDestination.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -607,7 +672,8 @@ export class HTLCDestination extends CommonBase { case 0: return new HTLCDestination_NextHopChannel(ptr); case 1: return new HTLCDestination_UnknownNextHop(ptr); case 2: return new HTLCDestination_InvalidForward(ptr); - case 3: return new HTLCDestination_FailedPayment(ptr); + case 3: return new HTLCDestination_InvalidOnion(ptr); + case 4: return new HTLCDestination_FailedPayment(ptr); default: throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface } @@ -631,10 +697,11 @@ export class HTLCDestination extends CommonBase { /** * Utility method to constructs a new NextHopChannel-variant HTLCDestination */ - public static constructor_next_hop_channel(node_id: Uint8Array, channel_id: Uint8Array): HTLCDestination { - const ret: bigint = bindings.HTLCDestination_next_hop_channel(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), bindings.encodeUint8Array(bindings.check_arr_len(channel_id, 32))); + public static constructor_next_hop_channel(node_id: Uint8Array, channel_id: ChannelId): HTLCDestination { + const ret: bigint = bindings.HTLCDestination_next_hop_channel(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(channel_id)); const ret_hu_conv: HTLCDestination = HTLCDestination.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, channel_id); return ret_hu_conv; } @@ -658,6 +725,16 @@ export class HTLCDestination extends CommonBase { return ret_hu_conv; } + /** + * Utility method to constructs a new InvalidOnion-variant HTLCDestination + */ + public static constructor_invalid_onion(): HTLCDestination { + const ret: bigint = bindings.HTLCDestination_invalid_onion(); + const ret_hu_conv: HTLCDestination = HTLCDestination.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + return ret_hu_conv; + } + /** * Utility method to constructs a new FailedPayment-variant HTLCDestination */ @@ -673,7 +750,7 @@ export class HTLCDestination extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public eq(b: HTLCDestination): boolean { - const ret: boolean = bindings.HTLCDestination_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.HTLCDestination_eq(this.ptr, CommonBase.get_ptr_of(b)); return ret; } @@ -700,16 +777,17 @@ export class HTLCDestination_NextHopChannel extends HTLCDestination { /** * The outgoing `channel_id` between us and the next node. */ - public channel_id: Uint8Array; + public channel_id: ChannelId; /* @internal */ public constructor(ptr: bigint) { super(null, ptr); const node_id: number = bindings.LDKHTLCDestination_NextHopChannel_get_node_id(ptr); const node_id_conv: Uint8Array = bindings.decodeUint8Array(node_id); this.node_id = node_id_conv; - const channel_id: number = bindings.LDKHTLCDestination_NextHopChannel_get_channel_id(ptr); - const channel_id_conv: Uint8Array = bindings.decodeUint8Array(channel_id); - this.channel_id = channel_id_conv; + const channel_id: bigint = bindings.LDKHTLCDestination_NextHopChannel_get_channel_id(ptr); + const channel_id_hu_conv: ChannelId = new ChannelId(null, channel_id); + CommonBase.add_ref_from(channel_id_hu_conv, this); + this.channel_id = channel_id_hu_conv; } } /** A HTLCDestination of type UnknownNextHop */ @@ -736,6 +814,13 @@ export class HTLCDestination_InvalidForward extends HTLCDestination { this.requested_forward_scid = bindings.LDKHTLCDestination_InvalidForward_get_requested_forward_scid(ptr); } } +/** A HTLCDestination of type InvalidOnion */ +export class HTLCDestination_InvalidOnion extends HTLCDestination { + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + } +} /** A HTLCDestination of type FailedPayment */ export class HTLCDestination_FailedPayment extends HTLCDestination { /** diff --git a/ts/structs/HTLCOutputInCommitment.mts b/ts/structs/HTLCOutputInCommitment.mts index f92a2044..0cffeaaf 100644 --- a/ts/structs/HTLCOutputInCommitment.mts +++ b/ts/structs/HTLCOutputInCommitment.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -728,7 +793,7 @@ export class HTLCOutputInCommitment extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: HTLCOutputInCommitment): boolean { - const ret: boolean = bindings.HTLCOutputInCommitment_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.HTLCOutputInCommitment_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/HTLCUpdate.mts b/ts/structs/HTLCUpdate.mts index 0afc6782..ae81f4da 100644 --- a/ts/structs/HTLCUpdate.mts +++ b/ts/structs/HTLCUpdate.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,11 +138,16 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -628,7 +693,7 @@ export class HTLCUpdate extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: HTLCUpdate): boolean { - const ret: boolean = bindings.HTLCUpdate_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.HTLCUpdate_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/HolderCommitmentTransaction.mts b/ts/structs/HolderCommitmentTransaction.mts index 744dfbfd..5909a470 100644 --- a/ts/structs/HolderCommitmentTransaction.mts +++ b/ts/structs/HolderCommitmentTransaction.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -686,7 +751,7 @@ export class HolderCommitmentTransaction extends CommonBase { * The funding keys are used to figure out which signature should go first when building the transaction for broadcast. */ public static constructor_new(commitment_tx: CommitmentTransaction, counterparty_sig: Uint8Array, counterparty_htlc_sigs: Uint8Array[], holder_funding_key: Uint8Array, counterparty_funding_key: Uint8Array): HolderCommitmentTransaction { - const ret: bigint = bindings.HolderCommitmentTransaction_new(commitment_tx == null ? 0n : CommonBase.get_ptr_of(commitment_tx), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_sig, 64)), bindings.encodeUint32Array(counterparty_htlc_sigs.map(counterparty_htlc_sigs_conv_12 => bindings.encodeUint8Array(bindings.check_arr_len(counterparty_htlc_sigs_conv_12, 64)))), bindings.encodeUint8Array(bindings.check_arr_len(holder_funding_key, 33)), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_funding_key, 33))); + const ret: bigint = bindings.HolderCommitmentTransaction_new(CommonBase.get_ptr_of(commitment_tx), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_sig, 64)), bindings.encodeUint32Array(counterparty_htlc_sigs.map(counterparty_htlc_sigs_conv_12 => bindings.encodeUint8Array(bindings.check_arr_len(counterparty_htlc_sigs_conv_12, 64)))), bindings.encodeUint8Array(bindings.check_arr_len(holder_funding_key, 33)), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_funding_key, 33))); const ret_hu_conv: HolderCommitmentTransaction = new HolderCommitmentTransaction(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, commitment_tx); diff --git a/ts/structs/Hostname.mts b/ts/structs/Hostname.mts index b7cdbc7f..ce70ae07 100644 --- a/ts/structs/Hostname.mts +++ b/ts/structs/Hostname.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -640,7 +705,7 @@ export class Hostname extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: Hostname): boolean { - const ret: boolean = bindings.Hostname_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.Hostname_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/HtlcBasepoint.mts b/ts/structs/HtlcBasepoint.mts index 82c5617e..911614f7 100644 --- a/ts/structs/HtlcBasepoint.mts +++ b/ts/structs/HtlcBasepoint.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -635,7 +700,7 @@ export class HtlcBasepoint extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: HtlcBasepoint): boolean { - const ret: boolean = bindings.HtlcBasepoint_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.HtlcBasepoint_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } @@ -672,6 +737,15 @@ export class HtlcBasepoint extends CommonBase { return ret_conv; } + /** + * Derives the \"tweak\" used in calculate [`HtlcKey::from_basepoint`].\n\n[`HtlcKey::from_basepoint`] calculates a private key as:\n`privkey = basepoint_secret + SHA256(per_commitment_point || basepoint)`\n\nThis calculates the hash part in the tweak derivation process, which is used to\nensure that each key is unique and cannot be guessed by an external party. + */ + public derive_add_tweak(per_commitment_point: Uint8Array): Uint8Array { + const ret: number = bindings.HtlcBasepoint_derive_add_tweak(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(per_commitment_point, 33))); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + /** * Serialize the HtlcBasepoint object into a byte array which can be read by HtlcBasepoint_read */ diff --git a/ts/structs/HtlcKey.mts b/ts/structs/HtlcKey.mts index 2fae25fb..94224105 100644 --- a/ts/structs/HtlcKey.mts +++ b/ts/structs/HtlcKey.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -639,7 +704,7 @@ export class HtlcKey extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: HtlcKey): boolean { - const ret: boolean = bindings.HtlcKey_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.HtlcKey_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } @@ -663,7 +728,7 @@ export class HtlcKey extends CommonBase { * Derive a public htlcpubkey using one node\'s `per_commitment_point` and its countersignatory\'s `basepoint` */ public static constructor_from_basepoint(countersignatory_basepoint: HtlcBasepoint, per_commitment_point: Uint8Array): HtlcKey { - const ret: bigint = bindings.HtlcKey_from_basepoint(countersignatory_basepoint == null ? 0n : CommonBase.get_ptr_of(countersignatory_basepoint), bindings.encodeUint8Array(bindings.check_arr_len(per_commitment_point, 33))); + const ret: bigint = bindings.HtlcKey_from_basepoint(CommonBase.get_ptr_of(countersignatory_basepoint), bindings.encodeUint8Array(bindings.check_arr_len(per_commitment_point, 33))); const ret_hu_conv: HtlcKey = new HtlcKey(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, countersignatory_basepoint); diff --git a/ts/structs/IgnoringMessageHandler.mts b/ts/structs/IgnoringMessageHandler.mts index 7d6afc4e..67ede677 100644 --- a/ts/structs/IgnoringMessageHandler.mts +++ b/ts/structs/IgnoringMessageHandler.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/InFlightHtlcs.mts b/ts/structs/InFlightHtlcs.mts index 76298ef2..b62120c2 100644 --- a/ts/structs/InFlightHtlcs.mts +++ b/ts/structs/InFlightHtlcs.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -635,7 +700,7 @@ export class InFlightHtlcs extends CommonBase { * Takes in a path with payer's node id and adds the path's details to `InFlightHtlcs`. */ public process_path(path: Path, payer_node_id: Uint8Array): void { - bindings.InFlightHtlcs_process_path(this.ptr, path == null ? 0n : CommonBase.get_ptr_of(path), bindings.encodeUint8Array(bindings.check_arr_len(payer_node_id, 33))); + bindings.InFlightHtlcs_process_path(this.ptr, CommonBase.get_ptr_of(path), bindings.encodeUint8Array(bindings.check_arr_len(payer_node_id, 33))); CommonBase.add_ref_from(this, path); } @@ -644,7 +709,7 @@ export class InFlightHtlcs extends CommonBase { * id. */ public add_inflight_htlc(source: NodeId, target: NodeId, channel_scid: bigint, used_msat: bigint): void { - bindings.InFlightHtlcs_add_inflight_htlc(this.ptr, source == null ? 0n : CommonBase.get_ptr_of(source), target == null ? 0n : CommonBase.get_ptr_of(target), channel_scid, used_msat); + bindings.InFlightHtlcs_add_inflight_htlc(this.ptr, CommonBase.get_ptr_of(source), CommonBase.get_ptr_of(target), channel_scid, used_msat); CommonBase.add_ref_from(this, source); CommonBase.add_ref_from(this, target); } @@ -654,7 +719,7 @@ export class InFlightHtlcs extends CommonBase { * id. */ public used_liquidity_msat(source: NodeId, target: NodeId, channel_scid: bigint): Option_u64Z { - const ret: bigint = bindings.InFlightHtlcs_used_liquidity_msat(this.ptr, source == null ? 0n : CommonBase.get_ptr_of(source), target == null ? 0n : CommonBase.get_ptr_of(target), channel_scid); + const ret: bigint = bindings.InFlightHtlcs_used_liquidity_msat(this.ptr, CommonBase.get_ptr_of(source), CommonBase.get_ptr_of(target), channel_scid); const ret_hu_conv: Option_u64Z = Option_u64Z.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, this); CommonBase.add_ref_from(this, source); diff --git a/ts/structs/InMemorySigner.mts b/ts/structs/InMemorySigner.mts index 205462a8..380a779f 100644 --- a/ts/structs/InMemorySigner.mts +++ b/ts/structs/InMemorySigner.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_u16Z } from '../structs/Option_u16Z.mjs'; import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -847,7 +912,7 @@ export class InMemorySigner extends CommonBase { * [`descriptor.outpoint`]: StaticPaymentOutputDescriptor::outpoint */ public sign_counterparty_payment_input(spend_tx: Uint8Array, input_idx: number, descriptor: StaticPaymentOutputDescriptor): Result_WitnessNoneZ { - const ret: bigint = bindings.InMemorySigner_sign_counterparty_payment_input(this.ptr, bindings.encodeUint8Array(spend_tx), input_idx, descriptor == null ? 0n : CommonBase.get_ptr_of(descriptor)); + const ret: bigint = bindings.InMemorySigner_sign_counterparty_payment_input(this.ptr, bindings.encodeUint8Array(spend_tx), input_idx, CommonBase.get_ptr_of(descriptor)); const ret_hu_conv: Result_WitnessNoneZ = Result_WitnessNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, descriptor); return ret_hu_conv; @@ -866,7 +931,7 @@ export class InMemorySigner extends CommonBase { * [`descriptor.to_self_delay`]: DelayedPaymentOutputDescriptor::to_self_delay */ public sign_dynamic_p2wsh_input(spend_tx: Uint8Array, input_idx: number, descriptor: DelayedPaymentOutputDescriptor): Result_WitnessNoneZ { - const ret: bigint = bindings.InMemorySigner_sign_dynamic_p2wsh_input(this.ptr, bindings.encodeUint8Array(spend_tx), input_idx, descriptor == null ? 0n : CommonBase.get_ptr_of(descriptor)); + const ret: bigint = bindings.InMemorySigner_sign_dynamic_p2wsh_input(this.ptr, bindings.encodeUint8Array(spend_tx), input_idx, CommonBase.get_ptr_of(descriptor)); const ret_hu_conv: Result_WitnessNoneZ = Result_WitnessNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, descriptor); return ret_hu_conv; diff --git a/ts/structs/InboundHTLCErr.mts b/ts/structs/InboundHTLCErr.mts index 43d01aca..78d4d1b7 100644 --- a/ts/structs/InboundHTLCErr.mts +++ b/ts/structs/InboundHTLCErr.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; import { Utxo } from '../structs/Utxo.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -664,4 +729,38 @@ export class InboundHTLCErr extends CommonBase { return ret_hu_conv; } + public clone_ptr(): bigint { + const ret: bigint = bindings.InboundHTLCErr_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a copy of the InboundHTLCErr + */ + public clone(): InboundHTLCErr { + const ret: bigint = bindings.InboundHTLCErr_clone(this.ptr); + const ret_hu_conv: InboundHTLCErr = new InboundHTLCErr(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * Generates a non-cryptographic 64-bit hash of the InboundHTLCErr. + */ + public hash(): bigint { + const ret: bigint = bindings.InboundHTLCErr_hash(this.ptr); + return ret; + } + + /** + * Checks if two InboundHTLCErrs contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ + public eq(b: InboundHTLCErr): boolean { + const ret: boolean = bindings.InboundHTLCErr_eq(this.ptr, CommonBase.get_ptr_of(b)); + CommonBase.add_ref_from(this, b); + return ret; + } + } diff --git a/ts/structs/Init.mts b/ts/structs/Init.mts index 44345f4a..8f464262 100644 --- a/ts/structs/Init.mts +++ b/ts/structs/Init.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -621,7 +686,7 @@ export class Init extends CommonBase { * The relevant features which the sender supports. */ public set_features(val: InitFeatures): void { - bindings.Init_set_features(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.Init_set_features(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -681,7 +746,7 @@ export class Init extends CommonBase { * Constructs a new Init given each field */ public static constructor_new(features_arg: InitFeatures, networks_arg: Option_CVec_ThirtyTwoBytesZZ, remote_network_address_arg: Option_SocketAddressZ): Init { - const ret: bigint = bindings.Init_new(features_arg == null ? 0n : CommonBase.get_ptr_of(features_arg), CommonBase.get_ptr_of(networks_arg), CommonBase.get_ptr_of(remote_network_address_arg)); + const ret: bigint = bindings.Init_new(CommonBase.get_ptr_of(features_arg), CommonBase.get_ptr_of(networks_arg), CommonBase.get_ptr_of(remote_network_address_arg)); const ret_hu_conv: Init = new Init(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, features_arg); @@ -719,7 +784,7 @@ export class Init extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: Init): boolean { - const ret: boolean = bindings.Init_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.Init_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/InitFeatures.mts b/ts/structs/InitFeatures.mts index 16be73d2..ae5d4d42 100644 --- a/ts/structs/InitFeatures.mts +++ b/ts/structs/InitFeatures.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -611,7 +676,7 @@ export class InitFeatures extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: InitFeatures): boolean { - const ret: boolean = bindings.InitFeatures_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.InitFeatures_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } @@ -653,7 +718,7 @@ export class InitFeatures extends CommonBase { * Returns true if this `Features` object contains required features unknown by `other`. */ public requires_unknown_bits_from(other: InitFeatures): boolean { - const ret: boolean = bindings.InitFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0n : CommonBase.get_ptr_of(other)); + const ret: boolean = bindings.InitFeatures_requires_unknown_bits_from(this.ptr, CommonBase.get_ptr_of(other)); CommonBase.add_ref_from(this, other); return ret; } @@ -1277,4 +1342,34 @@ export class InitFeatures extends CommonBase { return ret; } + /** + * Set this feature as optional. + */ + public set_trampoline_routing_optional(): void { + bindings.InitFeatures_set_trampoline_routing_optional(this.ptr); + } + + /** + * Set this feature as required. + */ + public set_trampoline_routing_required(): void { + bindings.InitFeatures_set_trampoline_routing_required(this.ptr); + } + + /** + * Checks if this feature is supported. + */ + public supports_trampoline_routing(): boolean { + const ret: boolean = bindings.InitFeatures_supports_trampoline_routing(this.ptr); + return ret; + } + + /** + * Checks if this feature is required. + */ + public requires_trampoline_routing(): boolean { + const ret: boolean = bindings.InitFeatures_requires_trampoline_routing(this.ptr); + return ret; + } + } diff --git a/ts/structs/Input.mts b/ts/structs/Input.mts index b2cd2ce0..eb72546a 100644 --- a/ts/structs/Input.mts +++ b/ts/structs/Input.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -621,7 +686,7 @@ export class Input extends CommonBase { * The unique identifier of the input. */ public set_outpoint(val: OutPoint): void { - bindings.Input_set_outpoint(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.Input_set_outpoint(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -664,7 +729,7 @@ export class Input extends CommonBase { * Constructs a new Input given each field */ public static constructor_new(outpoint_arg: OutPoint, previous_utxo_arg: TxOut, satisfaction_weight_arg: bigint): Input { - const ret: bigint = bindings.Input_new(outpoint_arg == null ? 0n : CommonBase.get_ptr_of(outpoint_arg), CommonBase.get_ptr_of(previous_utxo_arg), satisfaction_weight_arg); + const ret: bigint = bindings.Input_new(CommonBase.get_ptr_of(outpoint_arg), CommonBase.get_ptr_of(previous_utxo_arg), satisfaction_weight_arg); const ret_hu_conv: Input = new Input(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, outpoint_arg); @@ -700,7 +765,7 @@ export class Input extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: Input): boolean { - const ret: boolean = bindings.Input_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.Input_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/IntroductionNode.mts b/ts/structs/IntroductionNode.mts new file mode 100644 index 00000000..da447397 --- /dev/null +++ b/ts/structs/IntroductionNode.mts @@ -0,0 +1,753 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + +/** + * The unblinded node in a [`BlindedPath`]. + */ +export class IntroductionNode extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.IntroductionNode_free); } + /* @internal */ + public static constr_from_ptr(ptr: bigint): IntroductionNode { + const raw_ty: number = bindings.LDKIntroductionNode_ty_from_ptr(ptr); + switch (raw_ty) { + case 0: return new IntroductionNode_NodeId(ptr); + case 1: return new IntroductionNode_DirectedShortChannelId(ptr); + default: + throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface + } + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.IntroductionNode_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a copy of the IntroductionNode + */ + public clone(): IntroductionNode { + const ret: bigint = bindings.IntroductionNode_clone(this.ptr); + const ret_hu_conv: IntroductionNode = IntroductionNode.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * Utility method to constructs a new NodeId-variant IntroductionNode + */ + public static constructor_node_id(a: Uint8Array): IntroductionNode { + const ret: bigint = bindings.IntroductionNode_node_id(bindings.encodeUint8Array(bindings.check_arr_len(a, 33))); + const ret_hu_conv: IntroductionNode = IntroductionNode.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + return ret_hu_conv; + } + + /** + * Utility method to constructs a new DirectedShortChannelId-variant IntroductionNode + */ + public static constructor_directed_short_channel_id(a: Direction, b: bigint): IntroductionNode { + const ret: bigint = bindings.IntroductionNode_directed_short_channel_id(a, b); + const ret_hu_conv: IntroductionNode = IntroductionNode.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + return ret_hu_conv; + } + + /** + * Generates a non-cryptographic 64-bit hash of the IntroductionNode. + */ + public hash(): bigint { + const ret: bigint = bindings.IntroductionNode_hash(this.ptr); + return ret; + } + + /** + * Checks if two IntroductionNodes contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + */ + public eq(b: IntroductionNode): boolean { + const ret: boolean = bindings.IntroductionNode_eq(this.ptr, CommonBase.get_ptr_of(b)); + return ret; + } + +} +/** A IntroductionNode of type NodeId */ +export class IntroductionNode_NodeId extends IntroductionNode { + public node_id: Uint8Array; + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + const node_id: number = bindings.LDKIntroductionNode_NodeId_get_node_id(ptr); + const node_id_conv: Uint8Array = bindings.decodeUint8Array(node_id); + this.node_id = node_id_conv; + } +} +/** A IntroductionNode of type DirectedShortChannelId */ +export class IntroductionNode_DirectedShortChannelId extends IntroductionNode { + public _0: Direction; + public _1: bigint; + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + this._0 = bindings.LDKIntroductionNode_DirectedShortChannelId_get__0(ptr); + this._1 = bindings.LDKIntroductionNode_DirectedShortChannelId_get__1(ptr); + } +} diff --git a/ts/structs/InvalidShutdownScript.mts b/ts/structs/InvalidShutdownScript.mts index 184da60f..dc63a2ec 100644 --- a/ts/structs/InvalidShutdownScript.mts +++ b/ts/structs/InvalidShutdownScript.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/InvoiceError.mts b/ts/structs/InvoiceError.mts index 6427d1d4..907fbfb9 100644 --- a/ts/structs/InvoiceError.mts +++ b/ts/structs/InvoiceError.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; import { Destination } from '../structs/Destination.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -650,7 +715,7 @@ export class InvoiceError extends CommonBase { * An explanation of the error. */ public set_message(val: UntrustedString): void { - bindings.InvoiceError_set_message(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.InvoiceError_set_message(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -660,7 +725,7 @@ export class InvoiceError extends CommonBase { * Note that erroneous_field_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ public static constructor_new(erroneous_field_arg: ErroneousField|null, message_arg: UntrustedString): InvoiceError { - const ret: bigint = bindings.InvoiceError_new(erroneous_field_arg == null ? 0n : CommonBase.get_ptr_of(erroneous_field_arg), message_arg == null ? 0n : CommonBase.get_ptr_of(message_arg)); + const ret: bigint = bindings.InvoiceError_new(erroneous_field_arg == null ? 0n : CommonBase.get_ptr_of(erroneous_field_arg), CommonBase.get_ptr_of(message_arg)); const ret_hu_conv: InvoiceError = new InvoiceError(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, erroneous_field_arg); diff --git a/ts/structs/InvoiceRequest.mts b/ts/structs/InvoiceRequest.mts index 3321a1e5..56dacb00 100644 --- a/ts/structs/InvoiceRequest.mts +++ b/ts/structs/InvoiceRequest.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,11 +269,12 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -657,12 +722,10 @@ export class InvoiceRequest extends CommonBase { /** * The minimum amount required for a successful payment of a single item. - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public amount(): Amount { + public amount(): Option_AmountZ { const ret: bigint = bindings.InvoiceRequest_amount(this.ptr); - const ret_hu_conv: Amount = new Amount(null, ret); + const ret_hu_conv: Option_AmountZ = Option_AmountZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, this); return ret_hu_conv; } @@ -670,6 +733,8 @@ export class InvoiceRequest extends CommonBase { /** * A complete description of the purpose of the payment. Intended to be displayed to the user * but with the caveat that it has not been verified in any way. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ public description(): PrintableString { const ret: bigint = bindings.InvoiceRequest_description(this.ptr); @@ -736,13 +801,15 @@ export class InvoiceRequest extends CommonBase { */ public supported_quantity(): Quantity { const ret: bigint = bindings.InvoiceRequest_supported_quantity(this.ptr); - const ret_hu_conv: Quantity = new Quantity(null, ret); + const ret_hu_conv: Quantity = Quantity.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, this); return ret_hu_conv; } /** * The public key used by the recipient to sign invoices. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ public signing_pubkey(): Uint8Array { const ret: number = bindings.InvoiceRequest_signing_pubkey(this.ptr); @@ -827,14 +894,34 @@ export class InvoiceRequest extends CommonBase { } /** - * Signature of the invoice request using [`payer_id`]. + * Creates an [`InvoiceBuilder`] for the request with the given required fields. * - * [`payer_id`]: Self::payer_id + * Unless [`InvoiceBuilder::relative_expiry`] is set, the invoice will expire two hours after + * `created_at`, which is used to set [`Bolt12Invoice::created_at`]. Useful for `no-std` builds + * where [`std::time::SystemTime`] is not available. + * + * The caller is expected to remember the preimage of `payment_hash` in order to claim a payment + * for the invoice. + * + * The `payment_paths` parameter is useful for maintaining the payment recipient's privacy. It + * must contain one or more elements ordered from most-preferred to least-preferred, if there's + * a preference. Note, however, that any privacy is lost if a public node id was used for + * [`Offer::signing_pubkey`]. + * + * Errors if the request contains unknown required features. + * + * # Note + * + * If the originating [`Offer`] was created using [`OfferBuilder::deriving_signing_pubkey`], + * then use [`InvoiceRequest::verify`] and [`VerifiedInvoiceRequest`] methods instead. + * + * [`Bolt12Invoice::created_at`]: crate::offers::invoice::Bolt12Invoice::created_at + * [`OfferBuilder::deriving_signing_pubkey`]: crate::offers::offer::OfferBuilder::deriving_signing_pubkey */ - public signature(): Uint8Array { - const ret: number = bindings.InvoiceRequest_signature(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public respond_with_no_std(payment_paths: TwoTuple_BlindedPayInfoBlindedPathZ[], payment_hash: Uint8Array, created_at: bigint): Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ { + const ret: bigint = bindings.InvoiceRequest_respond_with_no_std(this.ptr, bindings.encodeUint64Array(payment_paths.map(payment_paths_conv_37 => CommonBase.get_ptr_of(payment_paths_conv_37))), bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), created_at); + const ret_hu_conv: Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ = Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; } /** @@ -845,12 +932,23 @@ export class InvoiceRequest extends CommonBase { * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice */ public verify(key: ExpandedKey): Result_VerifiedInvoiceRequestNoneZ { - const ret: bigint = bindings.InvoiceRequest_verify(this.ptr, key == null ? 0n : CommonBase.get_ptr_of(key)); + const ret: bigint = bindings.InvoiceRequest_verify(this.ptr, CommonBase.get_ptr_of(key)); const ret_hu_conv: Result_VerifiedInvoiceRequestNoneZ = Result_VerifiedInvoiceRequestNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, key); return ret_hu_conv; } + /** + * Signature of the invoice request using [`payer_id`]. + * + * [`payer_id`]: Self::payer_id + */ + public signature(): Uint8Array { + const ret: number = bindings.InvoiceRequest_signature(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + /** * Serialize the InvoiceRequest object into a byte array which can be read by InvoiceRequest_read */ diff --git a/ts/structs/InvoiceRequestFeatures.mts b/ts/structs/InvoiceRequestFeatures.mts index 90722051..67cba25b 100644 --- a/ts/structs/InvoiceRequestFeatures.mts +++ b/ts/structs/InvoiceRequestFeatures.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDe import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -611,7 +676,7 @@ export class InvoiceRequestFeatures extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: InvoiceRequestFeatures): boolean { - const ret: boolean = bindings.InvoiceRequestFeatures_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.InvoiceRequestFeatures_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } @@ -653,7 +718,7 @@ export class InvoiceRequestFeatures extends CommonBase { * Returns true if this `Features` object contains required features unknown by `other`. */ public requires_unknown_bits_from(other: InvoiceRequestFeatures): boolean { - const ret: boolean = bindings.InvoiceRequestFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0n : CommonBase.get_ptr_of(other)); + const ret: boolean = bindings.InvoiceRequestFeatures_requires_unknown_bits_from(this.ptr, CommonBase.get_ptr_of(other)); CommonBase.add_ref_from(this, other); return ret; } diff --git a/ts/structs/InvoiceRequestFields.mts b/ts/structs/InvoiceRequestFields.mts new file mode 100644 index 00000000..01afe881 --- /dev/null +++ b/ts/structs/InvoiceRequestFields.mts @@ -0,0 +1,791 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + +/** + * Fields sent in an [`InvoiceRequest`] message to include in [`PaymentContext::Bolt12Offer`]. + * + * [`PaymentContext::Bolt12Offer`]: crate::blinded_path::payment::PaymentContext::Bolt12Offer + */ +export class InvoiceRequestFields extends CommonBase { + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.InvoiceRequestFields_free); + } + + /** + * A possibly transient pubkey used to sign the invoice request. + */ + public get_payer_id(): Uint8Array { + const ret: number = bindings.InvoiceRequestFields_get_payer_id(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + + /** + * A possibly transient pubkey used to sign the invoice request. + */ + public set_payer_id(val: Uint8Array): void { + bindings.InvoiceRequestFields_set_payer_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); + } + + /** + * The quantity of the offer's item conforming to [`Offer::is_valid_quantity`]. + */ + public get_quantity(): Option_u64Z { + const ret: bigint = bindings.InvoiceRequestFields_get_quantity(this.ptr); + const ret_hu_conv: Option_u64Z = Option_u64Z.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * The quantity of the offer's item conforming to [`Offer::is_valid_quantity`]. + */ + public set_quantity(val: Option_u64Z): void { + bindings.InvoiceRequestFields_set_quantity(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); + } + + /** + * A payer-provided note which will be seen by the recipient and reflected back in the invoice + * response. Truncated to [`PAYER_NOTE_LIMIT`] characters. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public get_payer_note_truncated(): UntrustedString { + const ret: bigint = bindings.InvoiceRequestFields_get_payer_note_truncated(this.ptr); + const ret_hu_conv: UntrustedString = new UntrustedString(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * A payer-provided note which will be seen by the recipient and reflected back in the invoice + * response. Truncated to [`PAYER_NOTE_LIMIT`] characters. + * + * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public set_payer_note_truncated(val: UntrustedString|null): void { + bindings.InvoiceRequestFields_set_payer_note_truncated(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); + } + + /** + * Constructs a new InvoiceRequestFields given each field + * + * Note that payer_note_truncated_arg (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public static constructor_new(payer_id_arg: Uint8Array, quantity_arg: Option_u64Z, payer_note_truncated_arg: UntrustedString|null): InvoiceRequestFields { + const ret: bigint = bindings.InvoiceRequestFields_new(bindings.encodeUint8Array(bindings.check_arr_len(payer_id_arg, 33)), CommonBase.get_ptr_of(quantity_arg), payer_note_truncated_arg == null ? 0n : CommonBase.get_ptr_of(payer_note_truncated_arg)); + const ret_hu_conv: InvoiceRequestFields = new InvoiceRequestFields(null, ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, quantity_arg); + CommonBase.add_ref_from(ret_hu_conv, payer_note_truncated_arg); + return ret_hu_conv; + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.InvoiceRequestFields_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a copy of the InvoiceRequestFields + */ + public clone(): InvoiceRequestFields { + const ret: bigint = bindings.InvoiceRequestFields_clone(this.ptr); + const ret_hu_conv: InvoiceRequestFields = new InvoiceRequestFields(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * Checks if two InvoiceRequestFieldss contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ + public eq(b: InvoiceRequestFields): boolean { + const ret: boolean = bindings.InvoiceRequestFields_eq(this.ptr, CommonBase.get_ptr_of(b)); + CommonBase.add_ref_from(this, b); + return ret; + } + + /** + * Serialize the InvoiceRequestFields object into a byte array which can be read by InvoiceRequestFields_read + */ + public write(): Uint8Array { + const ret: number = bindings.InvoiceRequestFields_write(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Read a InvoiceRequestFields from a byte array, created by InvoiceRequestFields_write + */ + public static constructor_read(ser: Uint8Array): Result_InvoiceRequestFieldsDecodeErrorZ { + const ret: bigint = bindings.InvoiceRequestFields_read(bindings.encodeUint8Array(ser)); + const ret_hu_conv: Result_InvoiceRequestFieldsDecodeErrorZ = Result_InvoiceRequestFieldsDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/ts/structs/InvoiceRequestWithDerivedPayerIdBuilder.mts b/ts/structs/InvoiceRequestWithDerivedPayerIdBuilder.mts new file mode 100644 index 00000000..f2c36ddd --- /dev/null +++ b/ts/structs/InvoiceRequestWithDerivedPayerIdBuilder.mts @@ -0,0 +1,734 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + +/** + * Builds an [`InvoiceRequest`] from an [`Offer`] for the \"offer to be paid\" flow. + * + * See [module-level documentation] for usage. + * + * [module-level documentation]: self + */ +export class InvoiceRequestWithDerivedPayerIdBuilder extends CommonBase { + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.InvoiceRequestWithDerivedPayerIdBuilder_free); + } + + /** + * Builds a signed [`InvoiceRequest`] after checking for valid semantics. + */ + public build_and_sign(): Result_InvoiceRequestBolt12SemanticErrorZ { + const ret: bigint = bindings.InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(this.ptr); + const ret_hu_conv: Result_InvoiceRequestBolt12SemanticErrorZ = Result_InvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Sets the [`InvoiceRequest::chain`] of the given [`Network`] for paying an invoice. If not + * called, [`Network::Bitcoin`] is assumed. Errors if the chain for `network` is not supported + * by the offer. + * + * Successive calls to this method will override the previous setting. + */ + public chain(network: Network): Result_NoneBolt12SemanticErrorZ { + const ret: bigint = bindings.InvoiceRequestWithDerivedPayerIdBuilder_chain(this.ptr, network); + const ret_hu_conv: Result_NoneBolt12SemanticErrorZ = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Sets the [`InvoiceRequest::amount_msats`] for paying an invoice. Errors if `amount_msats` is + * not at least the expected invoice amount (i.e., [`Offer::amount`] times [`quantity`]). + * + * Successive calls to this method will override the previous setting. + * + * [`quantity`]: Self::quantity + */ + public amount_msats(amount_msats: bigint): Result_NoneBolt12SemanticErrorZ { + const ret: bigint = bindings.InvoiceRequestWithDerivedPayerIdBuilder_amount_msats(this.ptr, amount_msats); + const ret_hu_conv: Result_NoneBolt12SemanticErrorZ = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Sets [`InvoiceRequest::quantity`] of items. If not set, `1` is assumed. Errors if `quantity` + * does not conform to [`Offer::is_valid_quantity`]. + * + * Successive calls to this method will override the previous setting. + */ + public quantity(quantity: bigint): Result_NoneBolt12SemanticErrorZ { + const ret: bigint = bindings.InvoiceRequestWithDerivedPayerIdBuilder_quantity(this.ptr, quantity); + const ret_hu_conv: Result_NoneBolt12SemanticErrorZ = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Sets the [`InvoiceRequest::payer_note`]. + * + * Successive calls to this method will override the previous setting. + */ + public payer_note(payer_note: string): void { + bindings.InvoiceRequestWithDerivedPayerIdBuilder_payer_note(this.ptr, bindings.encodeString(payer_note)); + } + +} diff --git a/ts/structs/InvoiceRequestWithExplicitPayerIdBuilder.mts b/ts/structs/InvoiceRequestWithExplicitPayerIdBuilder.mts new file mode 100644 index 00000000..030ea6a6 --- /dev/null +++ b/ts/structs/InvoiceRequestWithExplicitPayerIdBuilder.mts @@ -0,0 +1,735 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + +/** + * Builds an [`InvoiceRequest`] from an [`Offer`] for the \"offer to be paid\" flow. + * + * See [module-level documentation] for usage. + * + * [module-level documentation]: self + */ +export class InvoiceRequestWithExplicitPayerIdBuilder extends CommonBase { + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.InvoiceRequestWithExplicitPayerIdBuilder_free); + } + + /** + * Builds an unsigned [`InvoiceRequest`] after checking for valid semantics. It can be signed + * by [`UnsignedInvoiceRequest::sign`]. + */ + public build(): Result_UnsignedInvoiceRequestBolt12SemanticErrorZ { + const ret: bigint = bindings.InvoiceRequestWithExplicitPayerIdBuilder_build(this.ptr); + const ret_hu_conv: Result_UnsignedInvoiceRequestBolt12SemanticErrorZ = Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Sets the [`InvoiceRequest::chain`] of the given [`Network`] for paying an invoice. If not + * called, [`Network::Bitcoin`] is assumed. Errors if the chain for `network` is not supported + * by the offer. + * + * Successive calls to this method will override the previous setting. + */ + public chain(network: Network): Result_NoneBolt12SemanticErrorZ { + const ret: bigint = bindings.InvoiceRequestWithExplicitPayerIdBuilder_chain(this.ptr, network); + const ret_hu_conv: Result_NoneBolt12SemanticErrorZ = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Sets the [`InvoiceRequest::amount_msats`] for paying an invoice. Errors if `amount_msats` is + * not at least the expected invoice amount (i.e., [`Offer::amount`] times [`quantity`]). + * + * Successive calls to this method will override the previous setting. + * + * [`quantity`]: Self::quantity + */ + public amount_msats(amount_msats: bigint): Result_NoneBolt12SemanticErrorZ { + const ret: bigint = bindings.InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(this.ptr, amount_msats); + const ret_hu_conv: Result_NoneBolt12SemanticErrorZ = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Sets [`InvoiceRequest::quantity`] of items. If not set, `1` is assumed. Errors if `quantity` + * does not conform to [`Offer::is_valid_quantity`]. + * + * Successive calls to this method will override the previous setting. + */ + public quantity(quantity: bigint): Result_NoneBolt12SemanticErrorZ { + const ret: bigint = bindings.InvoiceRequestWithExplicitPayerIdBuilder_quantity(this.ptr, quantity); + const ret_hu_conv: Result_NoneBolt12SemanticErrorZ = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Sets the [`InvoiceRequest::payer_note`]. + * + * Successive calls to this method will override the previous setting. + */ + public payer_note(payer_note: string): void { + bindings.InvoiceRequestWithExplicitPayerIdBuilder_payer_note(this.ptr, bindings.encodeString(payer_note)); + } + +} diff --git a/ts/structs/InvoiceWithDerivedSigningPubkeyBuilder.mts b/ts/structs/InvoiceWithDerivedSigningPubkeyBuilder.mts new file mode 100644 index 00000000..9930562c --- /dev/null +++ b/ts/structs/InvoiceWithDerivedSigningPubkeyBuilder.mts @@ -0,0 +1,739 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + +/** + * Builds a [`Bolt12Invoice`] from either: + * - an [`InvoiceRequest`] for the \"offer to be paid\" flow or + * - a [`Refund`] for the \"offer for money\" flow. + * + * See [module-level documentation] for usage. + * + * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest + * [`Refund`]: crate::offers::refund::Refund + * [module-level documentation]: self + */ +export class InvoiceWithDerivedSigningPubkeyBuilder extends CommonBase { + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.InvoiceWithDerivedSigningPubkeyBuilder_free); + } + + /** + * Builds a signed [`Bolt12Invoice`] after checking for valid semantics. + */ + public build_and_sign(): Result_Bolt12InvoiceBolt12SemanticErrorZ { + const ret: bigint = bindings.InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign(this.ptr); + const ret_hu_conv: Result_Bolt12InvoiceBolt12SemanticErrorZ = Result_Bolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Sets the [`Bolt12Invoice::relative_expiry`] as seconds since [`Bolt12Invoice::created_at`]. + * Any expiry that has already passed is valid and can be checked for using + * [`Bolt12Invoice::is_expired`]. + * + * Successive calls to this method will override the previous setting. + */ + public relative_expiry(relative_expiry_secs: number): void { + bindings.InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry(this.ptr, relative_expiry_secs); + } + + /** + * Adds a P2WSH address to [`Bolt12Invoice::fallbacks`]. + * + * Successive calls to this method will add another address. Caller is responsible for not + * adding duplicate addresses and only calling if capable of receiving to P2WSH addresses. + */ + public fallback_v0_p2wsh(script_hash: Uint8Array): void { + bindings.InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(script_hash, 32))); + } + + /** + * Adds a P2WPKH address to [`Bolt12Invoice::fallbacks`]. + * + * Successive calls to this method will add another address. Caller is responsible for not + * adding duplicate addresses and only calling if capable of receiving to P2WPKH addresses. + */ + public fallback_v0_p2wpkh(pubkey_hash: Uint8Array): void { + bindings.InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(pubkey_hash, 20))); + } + + /** + * Adds a P2TR address to [`Bolt12Invoice::fallbacks`]. + * + * Successive calls to this method will add another address. Caller is responsible for not + * adding duplicate addresses and only calling if capable of receiving to P2TR addresses. + */ + public fallback_v1_p2tr_tweaked(utput_key: Uint8Array): void { + bindings.InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(utput_key, 32))); + } + + /** + * Sets [`Bolt12Invoice::invoice_features`] to indicate MPP may be used. Otherwise, MPP is + * disallowed. + */ + public allow_mpp(): void { + bindings.InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp(this.ptr); + } + +} diff --git a/ts/structs/InvoiceWithExplicitSigningPubkeyBuilder.mts b/ts/structs/InvoiceWithExplicitSigningPubkeyBuilder.mts new file mode 100644 index 00000000..1bfca440 --- /dev/null +++ b/ts/structs/InvoiceWithExplicitSigningPubkeyBuilder.mts @@ -0,0 +1,740 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + +/** + * Builds a [`Bolt12Invoice`] from either: + * - an [`InvoiceRequest`] for the \"offer to be paid\" flow or + * - a [`Refund`] for the \"offer for money\" flow. + * + * See [module-level documentation] for usage. + * + * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest + * [`Refund`]: crate::offers::refund::Refund + * [module-level documentation]: self + */ +export class InvoiceWithExplicitSigningPubkeyBuilder extends CommonBase { + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.InvoiceWithExplicitSigningPubkeyBuilder_free); + } + + /** + * Builds an unsigned [`Bolt12Invoice`] after checking for valid semantics. It can be signed by + * [`UnsignedBolt12Invoice::sign`]. + */ + public build(): Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ { + const ret: bigint = bindings.InvoiceWithExplicitSigningPubkeyBuilder_build(this.ptr); + const ret_hu_conv: Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ = Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Sets the [`Bolt12Invoice::relative_expiry`] as seconds since [`Bolt12Invoice::created_at`]. + * Any expiry that has already passed is valid and can be checked for using + * [`Bolt12Invoice::is_expired`]. + * + * Successive calls to this method will override the previous setting. + */ + public relative_expiry(relative_expiry_secs: number): void { + bindings.InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry(this.ptr, relative_expiry_secs); + } + + /** + * Adds a P2WSH address to [`Bolt12Invoice::fallbacks`]. + * + * Successive calls to this method will add another address. Caller is responsible for not + * adding duplicate addresses and only calling if capable of receiving to P2WSH addresses. + */ + public fallback_v0_p2wsh(script_hash: Uint8Array): void { + bindings.InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(script_hash, 32))); + } + + /** + * Adds a P2WPKH address to [`Bolt12Invoice::fallbacks`]. + * + * Successive calls to this method will add another address. Caller is responsible for not + * adding duplicate addresses and only calling if capable of receiving to P2WPKH addresses. + */ + public fallback_v0_p2wpkh(pubkey_hash: Uint8Array): void { + bindings.InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(pubkey_hash, 20))); + } + + /** + * Adds a P2TR address to [`Bolt12Invoice::fallbacks`]. + * + * Successive calls to this method will add another address. Caller is responsible for not + * adding duplicate addresses and only calling if capable of receiving to P2TR addresses. + */ + public fallback_v1_p2tr_tweaked(utput_key: Uint8Array): void { + bindings.InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(utput_key, 32))); + } + + /** + * Sets [`Bolt12Invoice::invoice_features`] to indicate MPP may be used. Otherwise, MPP is + * disallowed. + */ + public allow_mpp(): void { + bindings.InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp(this.ptr); + } + +} diff --git a/ts/structs/KVStore.mts b/ts/structs/KVStore.mts index 0cdf3063..7dbef95a 100644 --- a/ts/structs/KVStore.mts +++ b/ts/structs/KVStore.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,19 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,11 +561,9 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -690,7 +755,7 @@ export class KVStore extends CommonBase { const secondary_namespace_conv: string = bindings.decodeString(secondary_namespace); const key_conv: string = bindings.decodeString(key); const ret: Result_CVec_u8ZIOErrorZ = arg.read(primary_namespace_conv, secondary_namespace_conv, key_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, write (primary_namespace: number, secondary_namespace: number, key: number, buf: number): bigint { @@ -699,7 +764,7 @@ export class KVStore extends CommonBase { const key_conv: string = bindings.decodeString(key); const buf_conv: Uint8Array = bindings.decodeUint8Array(buf); const ret: Result_NoneIOErrorZ = arg.write(primary_namespace_conv, secondary_namespace_conv, key_conv, buf_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, remove (primary_namespace: number, secondary_namespace: number, key: number, lazy: boolean): bigint { @@ -707,14 +772,14 @@ export class KVStore extends CommonBase { const secondary_namespace_conv: string = bindings.decodeString(secondary_namespace); const key_conv: string = bindings.decodeString(key); const ret: Result_NoneIOErrorZ = arg.remove(primary_namespace_conv, secondary_namespace_conv, key_conv, lazy); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, list (primary_namespace: number, secondary_namespace: number): bigint { const primary_namespace_conv: string = bindings.decodeString(primary_namespace); const secondary_namespace_conv: string = bindings.decodeString(secondary_namespace); const ret: Result_CVec_StrZIOErrorZ = arg.list(primary_namespace_conv, secondary_namespace_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, } as bindings.LDKKVStore; diff --git a/ts/structs/KeysManager.mts b/ts/structs/KeysManager.mts index 67635c00..7650a0f7 100644 --- a/ts/structs/KeysManager.mts +++ b/ts/structs/KeysManager.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -560,10 +620,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRea import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -679,33 +744,6 @@ export class KeysManager extends CommonBase { return ret_hu_conv; } - /** - * Creates a [`Transaction`] which spends the given descriptors to the given outputs, plus an - * output to the given change destination (if sufficient change value remains). The - * transaction will have a feerate, at least, of the given value. - * - * The `locktime` argument is used to set the transaction's locktime. If `None`, the - * transaction will have a locktime of 0. It it recommended to set this to the current block - * height to avoid fee sniping, unless you have some specific reason to use a different - * locktime. - * - * Returns `Err(())` if the output value is greater than the input value minus required fee, - * if a descriptor was duplicated, or if an output descriptor `script_pubkey` - * does not match the one we can spend. - * - * We do not enforce that outputs meet the dust limit or that any output scripts are standard. - * - * May panic if the [`SpendableOutputDescriptor`]s were not generated by channels which used - * this [`KeysManager`] or one of the [`InMemorySigner`] created by this [`KeysManager`]. - */ - public spend_spendable_outputs(descriptors: SpendableOutputDescriptor[], outputs: TxOut[], change_destination_script: Uint8Array, feerate_sat_per_1000_weight: number, locktime: Option_u32Z): Result_TransactionNoneZ { - const ret: bigint = bindings.KeysManager_spend_spendable_outputs(this.ptr, bindings.encodeUint64Array(descriptors.map(descriptors_conv_27 => CommonBase.get_ptr_of(descriptors_conv_27))), bindings.encodeUint64Array(outputs.map(outputs_conv_7 => CommonBase.get_ptr_of(outputs_conv_7))), bindings.encodeUint8Array(change_destination_script), feerate_sat_per_1000_weight, CommonBase.get_ptr_of(locktime)); - const ret_hu_conv: Result_TransactionNoneZ = Result_TransactionNoneZ.constr_from_ptr(ret); - descriptors.forEach((descriptors_conv_27: SpendableOutputDescriptor) => { CommonBase.add_ref_from(this, descriptors_conv_27); }); - CommonBase.add_ref_from(this, locktime); - return ret_hu_conv; - } - /** * Constructs a new EntropySource which calls the relevant methods on this_arg. * This copies the `inner` pointer in this_arg and thus the returned EntropySource must be freed before this_arg is @@ -728,6 +766,17 @@ export class KeysManager extends CommonBase { return ret_hu_conv; } + /** + * Constructs a new OutputSpender which calls the relevant methods on this_arg. + * This copies the `inner` pointer in this_arg and thus the returned OutputSpender must be freed before this_arg is + */ + public as_OutputSpender(): OutputSpender { + const ret: bigint = bindings.KeysManager_as_OutputSpender(this.ptr); + const ret_hu_conv: OutputSpender = new OutputSpender(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + /** * Constructs a new SignerProvider which calls the relevant methods on this_arg. * This copies the `inner` pointer in this_arg and thus the returned SignerProvider must be freed before this_arg is diff --git a/ts/structs/LightningError.mts b/ts/structs/LightningError.mts index 16c0ef94..22b288fa 100644 --- a/ts/structs/LightningError.mts +++ b/ts/structs/LightningError.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Listen.mts b/ts/structs/Listen.mts index 29322026..0a1fb984 100644 --- a/ts/structs/Listen.mts +++ b/ts/structs/Listen.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,14 +583,14 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -681,7 +746,7 @@ export class Listen extends CommonBase { * possibly filtered. */ public filtered_block_connected(header: Uint8Array, txdata: TwoTuple_usizeTransactionZ[], height: number): void { - bindings.Listen_filtered_block_connected(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(header, 80)), bindings.encodeUint64Array(txdata.map(txdata_conv_28 => txdata_conv_28 != null ? CommonBase.get_ptr_of(txdata_conv_28) : 0n)), height); + bindings.Listen_filtered_block_connected(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(header, 80)), bindings.encodeUint64Array(txdata.map(txdata_conv_28 => CommonBase.get_ptr_of(txdata_conv_28))), height); } /** diff --git a/ts/structs/LockableScore.mts b/ts/structs/LockableScore.mts index fea3e074..df8973b3 100644 --- a/ts/structs/LockableScore.mts +++ b/ts/structs/LockableScore.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/LockedChannelMonitor.mts b/ts/structs/LockedChannelMonitor.mts index b7c7e4dd..fb08e535 100644 --- a/ts/structs/LockedChannelMonitor.mts +++ b/ts/structs/LockedChannelMonitor.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,13 +562,10 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Logger.mts b/ts/structs/Logger.mts index 88d39561..6e08349b 100644 --- a/ts/structs/Logger.mts +++ b/ts/structs/Logger.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Record } from '../structs/Record.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/MaxDustHTLCExposure.mts b/ts/structs/MaxDustHTLCExposure.mts index 474ef3c7..6cf0fcb8 100644 --- a/ts/structs/MaxDustHTLCExposure.mts +++ b/ts/structs/MaxDustHTLCExposure.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -596,7 +661,7 @@ import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBas import * as bindings from '../bindings.mjs' /** - * Options for how to set the max dust HTLC exposure allowed on a channel. See + * Options for how to set the max dust exposure allowed on a channel. See * [`ChannelConfig::max_dust_htlc_exposure`] for details. */ export class MaxDustHTLCExposure extends CommonBase { @@ -652,7 +717,7 @@ export class MaxDustHTLCExposure extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public eq(b: MaxDustHTLCExposure): boolean { - const ret: boolean = bindings.MaxDustHTLCExposure_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.MaxDustHTLCExposure_eq(this.ptr, CommonBase.get_ptr_of(b)); return ret; } diff --git a/ts/structs/MessageHandler.mts b/ts/structs/MessageHandler.mts index 5f78a264..2f4b3330 100644 --- a/ts/structs/MessageHandler.mts +++ b/ts/structs/MessageHandler.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/MessageRouter.mts b/ts/structs/MessageRouter.mts index 9df367fe..cd42fa9c 100644 --- a/ts/structs/MessageRouter.mts +++ b/ts/structs/MessageRouter.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -646,7 +711,7 @@ export class MessageRouter extends CommonBase { const destination_hu_conv: Destination = Destination.constr_from_ptr(destination); CommonBase.add_ref_from(destination_hu_conv, this); const ret: Result_OnionMessagePathNoneZ = arg.find_path(sender_conv, peers_conv_12_arr, destination_hu_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, create_blinded_paths (recipient: number, peers: number): bigint { @@ -660,7 +725,7 @@ export class MessageRouter extends CommonBase { } bindings.freeWasmMemory(peers) const ret: Result_CVec_BlindedPathZNoneZ = arg.create_blinded_paths(recipient_conv, peers_conv_12_arr); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, } as bindings.LDKMessageRouter; diff --git a/ts/structs/MessageSendEvent.mts b/ts/structs/MessageSendEvent.mts index 693df4f9..31beb749 100644 --- a/ts/structs/MessageSendEvent.mts +++ b/ts/structs/MessageSendEvent.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -666,7 +731,7 @@ export class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendAcceptChannel-variant MessageSendEvent */ public static constructor_send_accept_channel(node_id: Uint8Array, msg: AcceptChannel): MessageSendEvent { - const ret: bigint = bindings.MessageSendEvent_send_accept_channel(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.MessageSendEvent_send_accept_channel(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(msg)); const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -677,7 +742,7 @@ export class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendAcceptChannelV2-variant MessageSendEvent */ public static constructor_send_accept_channel_v2(node_id: Uint8Array, msg: AcceptChannelV2): MessageSendEvent { - const ret: bigint = bindings.MessageSendEvent_send_accept_channel_v2(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.MessageSendEvent_send_accept_channel_v2(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(msg)); const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -688,7 +753,7 @@ export class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendOpenChannel-variant MessageSendEvent */ public static constructor_send_open_channel(node_id: Uint8Array, msg: OpenChannel): MessageSendEvent { - const ret: bigint = bindings.MessageSendEvent_send_open_channel(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.MessageSendEvent_send_open_channel(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(msg)); const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -699,7 +764,7 @@ export class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendOpenChannelV2-variant MessageSendEvent */ public static constructor_send_open_channel_v2(node_id: Uint8Array, msg: OpenChannelV2): MessageSendEvent { - const ret: bigint = bindings.MessageSendEvent_send_open_channel_v2(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.MessageSendEvent_send_open_channel_v2(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(msg)); const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -710,7 +775,7 @@ export class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendFundingCreated-variant MessageSendEvent */ public static constructor_send_funding_created(node_id: Uint8Array, msg: FundingCreated): MessageSendEvent { - const ret: bigint = bindings.MessageSendEvent_send_funding_created(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.MessageSendEvent_send_funding_created(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(msg)); const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -721,7 +786,7 @@ export class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendFundingSigned-variant MessageSendEvent */ public static constructor_send_funding_signed(node_id: Uint8Array, msg: FundingSigned): MessageSendEvent { - const ret: bigint = bindings.MessageSendEvent_send_funding_signed(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.MessageSendEvent_send_funding_signed(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(msg)); const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -732,7 +797,7 @@ export class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendStfu-variant MessageSendEvent */ public static constructor_send_stfu(node_id: Uint8Array, msg: Stfu): MessageSendEvent { - const ret: bigint = bindings.MessageSendEvent_send_stfu(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.MessageSendEvent_send_stfu(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(msg)); const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -743,7 +808,7 @@ export class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendSplice-variant MessageSendEvent */ public static constructor_send_splice(node_id: Uint8Array, msg: Splice): MessageSendEvent { - const ret: bigint = bindings.MessageSendEvent_send_splice(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.MessageSendEvent_send_splice(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(msg)); const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -754,7 +819,7 @@ export class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendSpliceAck-variant MessageSendEvent */ public static constructor_send_splice_ack(node_id: Uint8Array, msg: SpliceAck): MessageSendEvent { - const ret: bigint = bindings.MessageSendEvent_send_splice_ack(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.MessageSendEvent_send_splice_ack(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(msg)); const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -765,7 +830,7 @@ export class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendSpliceLocked-variant MessageSendEvent */ public static constructor_send_splice_locked(node_id: Uint8Array, msg: SpliceLocked): MessageSendEvent { - const ret: bigint = bindings.MessageSendEvent_send_splice_locked(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.MessageSendEvent_send_splice_locked(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(msg)); const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -776,7 +841,7 @@ export class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendTxAddInput-variant MessageSendEvent */ public static constructor_send_tx_add_input(node_id: Uint8Array, msg: TxAddInput): MessageSendEvent { - const ret: bigint = bindings.MessageSendEvent_send_tx_add_input(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.MessageSendEvent_send_tx_add_input(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(msg)); const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -787,7 +852,7 @@ export class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendTxAddOutput-variant MessageSendEvent */ public static constructor_send_tx_add_output(node_id: Uint8Array, msg: TxAddOutput): MessageSendEvent { - const ret: bigint = bindings.MessageSendEvent_send_tx_add_output(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.MessageSendEvent_send_tx_add_output(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(msg)); const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -798,7 +863,7 @@ export class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendTxRemoveInput-variant MessageSendEvent */ public static constructor_send_tx_remove_input(node_id: Uint8Array, msg: TxRemoveInput): MessageSendEvent { - const ret: bigint = bindings.MessageSendEvent_send_tx_remove_input(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.MessageSendEvent_send_tx_remove_input(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(msg)); const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -809,7 +874,7 @@ export class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendTxRemoveOutput-variant MessageSendEvent */ public static constructor_send_tx_remove_output(node_id: Uint8Array, msg: TxRemoveOutput): MessageSendEvent { - const ret: bigint = bindings.MessageSendEvent_send_tx_remove_output(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.MessageSendEvent_send_tx_remove_output(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(msg)); const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -820,7 +885,7 @@ export class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendTxComplete-variant MessageSendEvent */ public static constructor_send_tx_complete(node_id: Uint8Array, msg: TxComplete): MessageSendEvent { - const ret: bigint = bindings.MessageSendEvent_send_tx_complete(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.MessageSendEvent_send_tx_complete(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(msg)); const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -831,7 +896,7 @@ export class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendTxSignatures-variant MessageSendEvent */ public static constructor_send_tx_signatures(node_id: Uint8Array, msg: TxSignatures): MessageSendEvent { - const ret: bigint = bindings.MessageSendEvent_send_tx_signatures(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.MessageSendEvent_send_tx_signatures(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(msg)); const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -842,7 +907,7 @@ export class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendTxInitRbf-variant MessageSendEvent */ public static constructor_send_tx_init_rbf(node_id: Uint8Array, msg: TxInitRbf): MessageSendEvent { - const ret: bigint = bindings.MessageSendEvent_send_tx_init_rbf(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.MessageSendEvent_send_tx_init_rbf(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(msg)); const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -853,7 +918,7 @@ export class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendTxAckRbf-variant MessageSendEvent */ public static constructor_send_tx_ack_rbf(node_id: Uint8Array, msg: TxAckRbf): MessageSendEvent { - const ret: bigint = bindings.MessageSendEvent_send_tx_ack_rbf(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.MessageSendEvent_send_tx_ack_rbf(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(msg)); const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -864,7 +929,7 @@ export class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendTxAbort-variant MessageSendEvent */ public static constructor_send_tx_abort(node_id: Uint8Array, msg: TxAbort): MessageSendEvent { - const ret: bigint = bindings.MessageSendEvent_send_tx_abort(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.MessageSendEvent_send_tx_abort(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(msg)); const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -875,7 +940,7 @@ export class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendChannelReady-variant MessageSendEvent */ public static constructor_send_channel_ready(node_id: Uint8Array, msg: ChannelReady): MessageSendEvent { - const ret: bigint = bindings.MessageSendEvent_send_channel_ready(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.MessageSendEvent_send_channel_ready(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(msg)); const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -886,7 +951,7 @@ export class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendAnnouncementSignatures-variant MessageSendEvent */ public static constructor_send_announcement_signatures(node_id: Uint8Array, msg: AnnouncementSignatures): MessageSendEvent { - const ret: bigint = bindings.MessageSendEvent_send_announcement_signatures(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.MessageSendEvent_send_announcement_signatures(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(msg)); const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -897,7 +962,7 @@ export class MessageSendEvent extends CommonBase { * Utility method to constructs a new UpdateHTLCs-variant MessageSendEvent */ public static constructor_update_htlcs(node_id: Uint8Array, updates: CommitmentUpdate): MessageSendEvent { - const ret: bigint = bindings.MessageSendEvent_update_htlcs(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), updates == null ? 0n : CommonBase.get_ptr_of(updates)); + const ret: bigint = bindings.MessageSendEvent_update_htlcs(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(updates)); const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, updates); @@ -908,7 +973,7 @@ export class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendRevokeAndACK-variant MessageSendEvent */ public static constructor_send_revoke_and_ack(node_id: Uint8Array, msg: RevokeAndACK): MessageSendEvent { - const ret: bigint = bindings.MessageSendEvent_send_revoke_and_ack(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.MessageSendEvent_send_revoke_and_ack(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(msg)); const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -919,7 +984,7 @@ export class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendClosingSigned-variant MessageSendEvent */ public static constructor_send_closing_signed(node_id: Uint8Array, msg: ClosingSigned): MessageSendEvent { - const ret: bigint = bindings.MessageSendEvent_send_closing_signed(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.MessageSendEvent_send_closing_signed(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(msg)); const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -930,7 +995,7 @@ export class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendShutdown-variant MessageSendEvent */ public static constructor_send_shutdown(node_id: Uint8Array, msg: Shutdown): MessageSendEvent { - const ret: bigint = bindings.MessageSendEvent_send_shutdown(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.MessageSendEvent_send_shutdown(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(msg)); const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -941,7 +1006,7 @@ export class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendChannelReestablish-variant MessageSendEvent */ public static constructor_send_channel_reestablish(node_id: Uint8Array, msg: ChannelReestablish): MessageSendEvent { - const ret: bigint = bindings.MessageSendEvent_send_channel_reestablish(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.MessageSendEvent_send_channel_reestablish(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(msg)); const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -952,7 +1017,7 @@ export class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendChannelAnnouncement-variant MessageSendEvent */ public static constructor_send_channel_announcement(node_id: Uint8Array, msg: ChannelAnnouncement, update_msg: ChannelUpdate): MessageSendEvent { - const ret: bigint = bindings.MessageSendEvent_send_channel_announcement(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg), update_msg == null ? 0n : CommonBase.get_ptr_of(update_msg)); + const ret: bigint = bindings.MessageSendEvent_send_channel_announcement(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(msg), CommonBase.get_ptr_of(update_msg)); const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -964,7 +1029,7 @@ export class MessageSendEvent extends CommonBase { * Utility method to constructs a new BroadcastChannelAnnouncement-variant MessageSendEvent */ public static constructor_broadcast_channel_announcement(msg: ChannelAnnouncement, update_msg: ChannelUpdate): MessageSendEvent { - const ret: bigint = bindings.MessageSendEvent_broadcast_channel_announcement(msg == null ? 0n : CommonBase.get_ptr_of(msg), update_msg == null ? 0n : CommonBase.get_ptr_of(update_msg)); + const ret: bigint = bindings.MessageSendEvent_broadcast_channel_announcement(CommonBase.get_ptr_of(msg), CommonBase.get_ptr_of(update_msg)); const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -976,7 +1041,7 @@ export class MessageSendEvent extends CommonBase { * Utility method to constructs a new BroadcastChannelUpdate-variant MessageSendEvent */ public static constructor_broadcast_channel_update(msg: ChannelUpdate): MessageSendEvent { - const ret: bigint = bindings.MessageSendEvent_broadcast_channel_update(msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.MessageSendEvent_broadcast_channel_update(CommonBase.get_ptr_of(msg)); const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -987,7 +1052,7 @@ export class MessageSendEvent extends CommonBase { * Utility method to constructs a new BroadcastNodeAnnouncement-variant MessageSendEvent */ public static constructor_broadcast_node_announcement(msg: NodeAnnouncement): MessageSendEvent { - const ret: bigint = bindings.MessageSendEvent_broadcast_node_announcement(msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.MessageSendEvent_broadcast_node_announcement(CommonBase.get_ptr_of(msg)); const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -998,7 +1063,7 @@ export class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendChannelUpdate-variant MessageSendEvent */ public static constructor_send_channel_update(node_id: Uint8Array, msg: ChannelUpdate): MessageSendEvent { - const ret: bigint = bindings.MessageSendEvent_send_channel_update(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.MessageSendEvent_send_channel_update(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(msg)); const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -1020,7 +1085,7 @@ export class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendChannelRangeQuery-variant MessageSendEvent */ public static constructor_send_channel_range_query(node_id: Uint8Array, msg: QueryChannelRange): MessageSendEvent { - const ret: bigint = bindings.MessageSendEvent_send_channel_range_query(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.MessageSendEvent_send_channel_range_query(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(msg)); const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -1031,7 +1096,7 @@ export class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendShortIdsQuery-variant MessageSendEvent */ public static constructor_send_short_ids_query(node_id: Uint8Array, msg: QueryShortChannelIds): MessageSendEvent { - const ret: bigint = bindings.MessageSendEvent_send_short_ids_query(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.MessageSendEvent_send_short_ids_query(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(msg)); const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -1042,7 +1107,7 @@ export class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendReplyChannelRange-variant MessageSendEvent */ public static constructor_send_reply_channel_range(node_id: Uint8Array, msg: ReplyChannelRange): MessageSendEvent { - const ret: bigint = bindings.MessageSendEvent_send_reply_channel_range(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.MessageSendEvent_send_reply_channel_range(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(msg)); const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -1053,7 +1118,7 @@ export class MessageSendEvent extends CommonBase { * Utility method to constructs a new SendGossipTimestampFilter-variant MessageSendEvent */ public static constructor_send_gossip_timestamp_filter(node_id: Uint8Array, msg: GossipTimestampFilter): MessageSendEvent { - const ret: bigint = bindings.MessageSendEvent_send_gossip_timestamp_filter(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.MessageSendEvent_send_gossip_timestamp_filter(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(msg)); const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); diff --git a/ts/structs/MessageSendEventsProvider.mts b/ts/structs/MessageSendEventsProvider.mts index 4335d556..cad03a37 100644 --- a/ts/structs/MessageSendEventsProvider.mts +++ b/ts/structs/MessageSendEventsProvider.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { FailureCode } from '../structs/FailureCode.mjs'; import { ChainParameters } from '../structs/ChainParameters.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -632,7 +697,7 @@ export class MessageSendEventsProvider extends CommonBase { let structImplementation = { get_and_clear_pending_msg_events (): number { const ret: MessageSendEvent[] = arg.get_and_clear_pending_msg_events(); - const result: number = bindings.encodeUint64Array(ret.map(ret_conv_18 => ret_conv_18 == null ? 0n : ret_conv_18.clone_ptr())); + const result: number = bindings.encodeUint64Array(ret.map(ret_conv_18 => ret_conv_18.clone_ptr())); ret.forEach((ret_conv_18: MessageSendEvent) => { CommonBase.add_ref_from(impl_holder.held, ret_conv_18); }); return result; }, diff --git a/ts/structs/MinFinalCltvExpiryDelta.mts b/ts/structs/MinFinalCltvExpiryDelta.mts index 55304d1e..0625ab00 100644 --- a/ts/structs/MinFinalCltvExpiryDelta.mts +++ b/ts/structs/MinFinalCltvExpiryDelta.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -560,10 +620,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -578,8 +640,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -653,7 +718,7 @@ export class MinFinalCltvExpiryDelta extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: MinFinalCltvExpiryDelta): boolean { - const ret: boolean = bindings.MinFinalCltvExpiryDelta_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.MinFinalCltvExpiryDelta_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/MonitorEvent.mts b/ts/structs/MonitorEvent.mts index ea3a0a5c..5eb0aa69 100644 --- a/ts/structs/MonitorEvent.mts +++ b/ts/structs/MonitorEvent.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,11 +138,16 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -605,8 +670,9 @@ export class MonitorEvent extends CommonBase { const raw_ty: number = bindings.LDKMonitorEvent_ty_from_ptr(ptr); switch (raw_ty) { case 0: return new MonitorEvent_HTLCEvent(ptr); - case 1: return new MonitorEvent_HolderForceClosed(ptr); - case 2: return new MonitorEvent_Completed(ptr); + case 1: return new MonitorEvent_HolderForceClosedWithInfo(ptr); + case 2: return new MonitorEvent_HolderForceClosed(ptr); + case 3: return new MonitorEvent_Completed(ptr); default: throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface } @@ -631,18 +697,31 @@ export class MonitorEvent extends CommonBase { * Utility method to constructs a new HTLCEvent-variant MonitorEvent */ public static constructor_htlcevent(a: HTLCUpdate): MonitorEvent { - const ret: bigint = bindings.MonitorEvent_htlcevent(a == null ? 0n : CommonBase.get_ptr_of(a)); + const ret: bigint = bindings.MonitorEvent_htlcevent(CommonBase.get_ptr_of(a)); const ret_hu_conv: MonitorEvent = MonitorEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, a); return ret_hu_conv; } + /** + * Utility method to constructs a new HolderForceClosedWithInfo-variant MonitorEvent + */ + public static constructor_holder_force_closed_with_info(reason: ClosureReason, outpoint: OutPoint, channel_id: ChannelId): MonitorEvent { + const ret: bigint = bindings.MonitorEvent_holder_force_closed_with_info(CommonBase.get_ptr_of(reason), CommonBase.get_ptr_of(outpoint), CommonBase.get_ptr_of(channel_id)); + const ret_hu_conv: MonitorEvent = MonitorEvent.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, reason); + CommonBase.add_ref_from(ret_hu_conv, outpoint); + CommonBase.add_ref_from(ret_hu_conv, channel_id); + return ret_hu_conv; + } + /** * Utility method to constructs a new HolderForceClosed-variant MonitorEvent */ public static constructor_holder_force_closed(a: OutPoint): MonitorEvent { - const ret: bigint = bindings.MonitorEvent_holder_force_closed(a == null ? 0n : CommonBase.get_ptr_of(a)); + const ret: bigint = bindings.MonitorEvent_holder_force_closed(CommonBase.get_ptr_of(a)); const ret_hu_conv: MonitorEvent = MonitorEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, a); @@ -652,11 +731,12 @@ export class MonitorEvent extends CommonBase { /** * Utility method to constructs a new Completed-variant MonitorEvent */ - public static constructor_completed(funding_txo: OutPoint, monitor_update_id: bigint): MonitorEvent { - const ret: bigint = bindings.MonitorEvent_completed(funding_txo == null ? 0n : CommonBase.get_ptr_of(funding_txo), monitor_update_id); + public static constructor_completed(funding_txo: OutPoint, channel_id: ChannelId, monitor_update_id: bigint): MonitorEvent { + const ret: bigint = bindings.MonitorEvent_completed(CommonBase.get_ptr_of(funding_txo), CommonBase.get_ptr_of(channel_id), monitor_update_id); const ret_hu_conv: MonitorEvent = MonitorEvent.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, funding_txo); + CommonBase.add_ref_from(ret_hu_conv, channel_id); return ret_hu_conv; } @@ -665,7 +745,7 @@ export class MonitorEvent extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public eq(b: MonitorEvent): boolean { - const ret: boolean = bindings.MonitorEvent_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.MonitorEvent_eq(this.ptr, CommonBase.get_ptr_of(b)); return ret; } @@ -691,6 +771,37 @@ export class MonitorEvent_HTLCEvent extends MonitorEvent { this.htlc_event = htlc_event_hu_conv; } } +/** A MonitorEvent of type HolderForceClosedWithInfo */ +export class MonitorEvent_HolderForceClosedWithInfo extends MonitorEvent { + /** + * The reason the channel was closed. + */ + public reason: ClosureReason; + /** + * The funding outpoint of the channel. + */ + public outpoint: OutPoint; + /** + * The channel ID of the channel. + */ + public channel_id: ChannelId; + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + const reason: bigint = bindings.LDKMonitorEvent_HolderForceClosedWithInfo_get_reason(ptr); + const reason_hu_conv: ClosureReason = ClosureReason.constr_from_ptr(reason); + CommonBase.add_ref_from(reason_hu_conv, this); + this.reason = reason_hu_conv; + const outpoint: bigint = bindings.LDKMonitorEvent_HolderForceClosedWithInfo_get_outpoint(ptr); + const outpoint_hu_conv: OutPoint = new OutPoint(null, outpoint); + CommonBase.add_ref_from(outpoint_hu_conv, this); + this.outpoint = outpoint_hu_conv; + const channel_id: bigint = bindings.LDKMonitorEvent_HolderForceClosedWithInfo_get_channel_id(ptr); + const channel_id_hu_conv: ChannelId = new ChannelId(null, channel_id); + CommonBase.add_ref_from(channel_id_hu_conv, this); + this.channel_id = channel_id_hu_conv; + } +} /** A MonitorEvent of type HolderForceClosed */ export class MonitorEvent_HolderForceClosed extends MonitorEvent { public holder_force_closed: OutPoint; @@ -709,6 +820,10 @@ export class MonitorEvent_Completed extends MonitorEvent { * The funding outpoint of the [`ChannelMonitor`] that was updated */ public funding_txo: OutPoint; + /** + * The channel ID of the channel associated with the [`ChannelMonitor`] + */ + public channel_id: ChannelId; /** * The Update ID from [`ChannelMonitorUpdate::update_id`] which was applied or * [`ChannelMonitor::get_latest_update_id`]. @@ -724,6 +839,10 @@ export class MonitorEvent_Completed extends MonitorEvent { const funding_txo_hu_conv: OutPoint = new OutPoint(null, funding_txo); CommonBase.add_ref_from(funding_txo_hu_conv, this); this.funding_txo = funding_txo_hu_conv; + const channel_id: bigint = bindings.LDKMonitorEvent_Completed_get_channel_id(ptr); + const channel_id_hu_conv: ChannelId = new ChannelId(null, channel_id); + CommonBase.add_ref_from(channel_id_hu_conv, this); + this.channel_id = channel_id_hu_conv; this.monitor_update_id = bindings.LDKMonitorEvent_Completed_get_monitor_update_id(ptr); } } diff --git a/ts/structs/MonitorUpdateId.mts b/ts/structs/MonitorUpdateId.mts index 35b44e1b..99da8863 100644 --- a/ts/structs/MonitorUpdateId.mts +++ b/ts/structs/MonitorUpdateId.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,13 +562,10 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -634,7 +699,7 @@ export class MonitorUpdateId extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: MonitorUpdateId): boolean { - const ret: boolean = bindings.MonitorUpdateId_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.MonitorUpdateId_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/MonitorUpdatingPersister.mts b/ts/structs/MonitorUpdatingPersister.mts index 0688cfd2..3e19d96f 100644 --- a/ts/structs/MonitorUpdatingPersister.mts +++ b/ts/structs/MonitorUpdatingPersister.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableSco import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/MultiThreadedLockableScore.mts b/ts/structs/MultiThreadedLockableScore.mts index e2a8b92a..0de36b80 100644 --- a/ts/structs/MultiThreadedLockableScore.mts +++ b/ts/structs/MultiThreadedLockableScore.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -560,10 +620,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/MultiThreadedScoreLockRead.mts b/ts/structs/MultiThreadedScoreLockRead.mts index 7f60ebdb..4926fcd7 100644 --- a/ts/structs/MultiThreadedScoreLockRead.mts +++ b/ts/structs/MultiThreadedScoreLockRead.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -560,10 +620,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/MultiThreadedScoreLockWrite.mts b/ts/structs/MultiThreadedScoreLockWrite.mts index 038f9481..0369777b 100644 --- a/ts/structs/MultiThreadedScoreLockWrite.mts +++ b/ts/structs/MultiThreadedScoreLockWrite.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -560,10 +620,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRea import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/NetworkGraph.mts b/ts/structs/NetworkGraph.mts index 796d8a06..718188ca 100644 --- a/ts/structs/NetworkGraph.mts +++ b/ts/structs/NetworkGraph.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Record } from '../structs/Record.mjs'; import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class NetworkGraph extends CommonBase { * [`Event`]: crate::events::Event */ public handle_network_update(network_update: NetworkUpdate): void { - bindings.NetworkGraph_handle_network_update(this.ptr, network_update == null ? 0n : CommonBase.get_ptr_of(network_update)); + bindings.NetworkGraph_handle_network_update(this.ptr, CommonBase.get_ptr_of(network_update)); } /** @@ -693,7 +758,7 @@ export class NetworkGraph extends CommonBase { * routing messages from a source using a protocol other than the lightning P2P protocol. */ public update_node_from_announcement(msg: NodeAnnouncement): Result_NoneLightningErrorZ { - const ret: bigint = bindings.NetworkGraph_update_node_from_announcement(this.ptr, msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.NetworkGraph_update_node_from_announcement(this.ptr, CommonBase.get_ptr_of(msg)); const ret_hu_conv: Result_NoneLightningErrorZ = Result_NoneLightningErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, msg); return ret_hu_conv; @@ -706,7 +771,7 @@ export class NetworkGraph extends CommonBase { * peers. */ public update_node_from_unsigned_announcement(msg: UnsignedNodeAnnouncement): Result_NoneLightningErrorZ { - const ret: bigint = bindings.NetworkGraph_update_node_from_unsigned_announcement(this.ptr, msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.NetworkGraph_update_node_from_unsigned_announcement(this.ptr, CommonBase.get_ptr_of(msg)); const ret_hu_conv: Result_NoneLightningErrorZ = Result_NoneLightningErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, msg); return ret_hu_conv; @@ -723,7 +788,7 @@ export class NetworkGraph extends CommonBase { * the corresponding UTXO exists on chain and is correctly-formatted. */ public update_channel_from_announcement(msg: ChannelAnnouncement, utxo_lookup: Option_UtxoLookupZ): Result_NoneLightningErrorZ { - const ret: bigint = bindings.NetworkGraph_update_channel_from_announcement(this.ptr, msg == null ? 0n : CommonBase.get_ptr_of(msg), CommonBase.get_ptr_of(utxo_lookup)); + const ret: bigint = bindings.NetworkGraph_update_channel_from_announcement(this.ptr, CommonBase.get_ptr_of(msg), CommonBase.get_ptr_of(utxo_lookup)); const ret_hu_conv: Result_NoneLightningErrorZ = Result_NoneLightningErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, msg); CommonBase.add_ref_from(this, utxo_lookup); @@ -740,7 +805,7 @@ export class NetworkGraph extends CommonBase { * This will skip verification of if the channel is actually on-chain. */ public update_channel_from_announcement_no_lookup(msg: ChannelAnnouncement): Result_NoneLightningErrorZ { - const ret: bigint = bindings.NetworkGraph_update_channel_from_announcement_no_lookup(this.ptr, msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.NetworkGraph_update_channel_from_announcement_no_lookup(this.ptr, CommonBase.get_ptr_of(msg)); const ret_hu_conv: Result_NoneLightningErrorZ = Result_NoneLightningErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, msg); return ret_hu_conv; @@ -755,7 +820,7 @@ export class NetworkGraph extends CommonBase { * the corresponding UTXO exists on chain and is correctly-formatted. */ public update_channel_from_unsigned_announcement(msg: UnsignedChannelAnnouncement, utxo_lookup: Option_UtxoLookupZ): Result_NoneLightningErrorZ { - const ret: bigint = bindings.NetworkGraph_update_channel_from_unsigned_announcement(this.ptr, msg == null ? 0n : CommonBase.get_ptr_of(msg), CommonBase.get_ptr_of(utxo_lookup)); + const ret: bigint = bindings.NetworkGraph_update_channel_from_unsigned_announcement(this.ptr, CommonBase.get_ptr_of(msg), CommonBase.get_ptr_of(utxo_lookup)); const ret_hu_conv: Result_NoneLightningErrorZ = Result_NoneLightningErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, msg); CommonBase.add_ref_from(this, utxo_lookup); @@ -771,7 +836,7 @@ export class NetworkGraph extends CommonBase { * All other parameters as used in [`msgs::UnsignedChannelAnnouncement`] fields. */ public add_channel_from_partial_announcement(short_channel_id: bigint, timestamp: bigint, features: ChannelFeatures, node_id_1: Uint8Array, node_id_2: Uint8Array): Result_NoneLightningErrorZ { - const ret: bigint = bindings.NetworkGraph_add_channel_from_partial_announcement(this.ptr, short_channel_id, timestamp, features == null ? 0n : CommonBase.get_ptr_of(features), bindings.encodeUint8Array(bindings.check_arr_len(node_id_1, 33)), bindings.encodeUint8Array(bindings.check_arr_len(node_id_2, 33))); + const ret: bigint = bindings.NetworkGraph_add_channel_from_partial_announcement(this.ptr, short_channel_id, timestamp, CommonBase.get_ptr_of(features), bindings.encodeUint8Array(bindings.check_arr_len(node_id_1, 33)), bindings.encodeUint8Array(bindings.check_arr_len(node_id_2, 33))); const ret_hu_conv: Result_NoneLightningErrorZ = Result_NoneLightningErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, features); return ret_hu_conv; @@ -825,7 +890,7 @@ export class NetworkGraph extends CommonBase { * materially in the future will be rejected. */ public update_channel(msg: ChannelUpdate): Result_NoneLightningErrorZ { - const ret: bigint = bindings.NetworkGraph_update_channel(this.ptr, msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.NetworkGraph_update_channel(this.ptr, CommonBase.get_ptr_of(msg)); const ret_hu_conv: Result_NoneLightningErrorZ = Result_NoneLightningErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, msg); return ret_hu_conv; @@ -840,7 +905,7 @@ export class NetworkGraph extends CommonBase { * materially in the future will be rejected. */ public update_channel_unsigned(msg: UnsignedChannelUpdate): Result_NoneLightningErrorZ { - const ret: bigint = bindings.NetworkGraph_update_channel_unsigned(this.ptr, msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.NetworkGraph_update_channel_unsigned(this.ptr, CommonBase.get_ptr_of(msg)); const ret_hu_conv: Result_NoneLightningErrorZ = Result_NoneLightningErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, msg); return ret_hu_conv; @@ -855,7 +920,7 @@ export class NetworkGraph extends CommonBase { * materially in the future will be rejected. */ public verify_channel_update(msg: ChannelUpdate): Result_NoneLightningErrorZ { - const ret: bigint = bindings.NetworkGraph_verify_channel_update(this.ptr, msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.NetworkGraph_verify_channel_update(this.ptr, CommonBase.get_ptr_of(msg)); const ret_hu_conv: Result_NoneLightningErrorZ = Result_NoneLightningErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, msg); return ret_hu_conv; diff --git a/ts/structs/NetworkUpdate.mts b/ts/structs/NetworkUpdate.mts index 7c25f899..e84cb212 100644 --- a/ts/structs/NetworkUpdate.mts +++ b/ts/structs/NetworkUpdate.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -634,7 +699,7 @@ export class NetworkUpdate extends CommonBase { * Utility method to constructs a new ChannelUpdateMessage-variant NetworkUpdate */ public static constructor_channel_update_message(msg: ChannelUpdate): NetworkUpdate { - const ret: bigint = bindings.NetworkUpdate_channel_update_message(msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.NetworkUpdate_channel_update_message(CommonBase.get_ptr_of(msg)); const ret_hu_conv: NetworkUpdate = NetworkUpdate.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, msg); @@ -666,7 +731,7 @@ export class NetworkUpdate extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public eq(b: NetworkUpdate): boolean { - const ret: boolean = bindings.NetworkUpdate_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.NetworkUpdate_eq(this.ptr, CommonBase.get_ptr_of(b)); return ret; } diff --git a/ts/structs/NextMessageHop.mts b/ts/structs/NextMessageHop.mts new file mode 100644 index 00000000..8b96e898 --- /dev/null +++ b/ts/structs/NextMessageHop.mts @@ -0,0 +1,753 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + +/** + * The next hop to forward an onion message along its path. + * + * Note that payment blinded paths always specify their next hop using an explicit node id. + */ +export class NextMessageHop extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.NextMessageHop_free); } + /* @internal */ + public static constr_from_ptr(ptr: bigint): NextMessageHop { + const raw_ty: number = bindings.LDKNextMessageHop_ty_from_ptr(ptr); + switch (raw_ty) { + case 0: return new NextMessageHop_NodeId(ptr); + case 1: return new NextMessageHop_ShortChannelId(ptr); + default: + throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface + } + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.NextMessageHop_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a copy of the NextMessageHop + */ + public clone(): NextMessageHop { + const ret: bigint = bindings.NextMessageHop_clone(this.ptr); + const ret_hu_conv: NextMessageHop = NextMessageHop.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * Utility method to constructs a new NodeId-variant NextMessageHop + */ + public static constructor_node_id(a: Uint8Array): NextMessageHop { + const ret: bigint = bindings.NextMessageHop_node_id(bindings.encodeUint8Array(bindings.check_arr_len(a, 33))); + const ret_hu_conv: NextMessageHop = NextMessageHop.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + return ret_hu_conv; + } + + /** + * Utility method to constructs a new ShortChannelId-variant NextMessageHop + */ + public static constructor_short_channel_id(a: bigint): NextMessageHop { + const ret: bigint = bindings.NextMessageHop_short_channel_id(a); + const ret_hu_conv: NextMessageHop = NextMessageHop.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + return ret_hu_conv; + } + + /** + * Generates a non-cryptographic 64-bit hash of the NextMessageHop. + */ + public hash(): bigint { + const ret: bigint = bindings.NextMessageHop_hash(this.ptr); + return ret; + } + + /** + * Checks if two NextMessageHops contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + */ + public eq(b: NextMessageHop): boolean { + const ret: boolean = bindings.NextMessageHop_eq(this.ptr, CommonBase.get_ptr_of(b)); + return ret; + } + +} +/** A NextMessageHop of type NodeId */ +export class NextMessageHop_NodeId extends NextMessageHop { + public node_id: Uint8Array; + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + const node_id: number = bindings.LDKNextMessageHop_NodeId_get_node_id(ptr); + const node_id_conv: Uint8Array = bindings.decodeUint8Array(node_id); + this.node_id = node_id_conv; + } +} +/** A NextMessageHop of type ShortChannelId */ +export class NextMessageHop_ShortChannelId extends NextMessageHop { + public short_channel_id: bigint; + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + this.short_channel_id = bindings.LDKNextMessageHop_ShortChannelId_get_short_channel_id(ptr); + } +} diff --git a/ts/structs/NodeAlias.mts b/ts/structs/NodeAlias.mts index 961da062..92946330 100644 --- a/ts/structs/NodeAlias.mts +++ b/ts/structs/NodeAlias.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -657,7 +722,7 @@ export class NodeAlias extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: NodeAlias): boolean { - const ret: boolean = bindings.NodeAlias_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.NodeAlias_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/NodeAnnouncement.mts b/ts/structs/NodeAnnouncement.mts index 5203ae76..dd9ec118 100644 --- a/ts/structs/NodeAnnouncement.mts +++ b/ts/structs/NodeAnnouncement.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -637,7 +702,7 @@ export class NodeAnnouncement extends CommonBase { * The actual content of the announcement */ public set_contents(val: UnsignedNodeAnnouncement): void { - bindings.NodeAnnouncement_set_contents(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.NodeAnnouncement_set_contents(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -645,7 +710,7 @@ export class NodeAnnouncement extends CommonBase { * Constructs a new NodeAnnouncement given each field */ public static constructor_new(signature_arg: Uint8Array, contents_arg: UnsignedNodeAnnouncement): NodeAnnouncement { - const ret: bigint = bindings.NodeAnnouncement_new(bindings.encodeUint8Array(bindings.check_arr_len(signature_arg, 64)), contents_arg == null ? 0n : CommonBase.get_ptr_of(contents_arg)); + const ret: bigint = bindings.NodeAnnouncement_new(bindings.encodeUint8Array(bindings.check_arr_len(signature_arg, 64)), CommonBase.get_ptr_of(contents_arg)); const ret_hu_conv: NodeAnnouncement = new NodeAnnouncement(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, contents_arg); @@ -681,7 +746,7 @@ export class NodeAnnouncement extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: NodeAnnouncement): boolean { - const ret: boolean = bindings.NodeAnnouncement_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.NodeAnnouncement_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/NodeAnnouncementInfo.mts b/ts/structs/NodeAnnouncementInfo.mts index 143fd6b3..62355a6f 100644 --- a/ts/structs/NodeAnnouncementInfo.mts +++ b/ts/structs/NodeAnnouncementInfo.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -619,7 +684,7 @@ export class NodeAnnouncementInfo extends CommonBase { * Protocol features the node announced support for */ public set_features(val: NodeFeatures): void { - bindings.NodeAnnouncementInfo_set_features(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.NodeAnnouncementInfo_set_features(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -674,7 +739,7 @@ export class NodeAnnouncementInfo extends CommonBase { * should not be exposed to the user. */ public set_alias(val: NodeAlias): void { - bindings.NodeAnnouncementInfo_set_alias(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.NodeAnnouncementInfo_set_alias(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -712,7 +777,7 @@ export class NodeAnnouncementInfo extends CommonBase { * Note that announcement_message_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ public static constructor_new(features_arg: NodeFeatures, last_update_arg: number, rgb_arg: Uint8Array, alias_arg: NodeAlias, announcement_message_arg: NodeAnnouncement|null): NodeAnnouncementInfo { - const ret: bigint = bindings.NodeAnnouncementInfo_new(features_arg == null ? 0n : CommonBase.get_ptr_of(features_arg), last_update_arg, bindings.encodeUint8Array(bindings.check_arr_len(rgb_arg, 3)), alias_arg == null ? 0n : CommonBase.get_ptr_of(alias_arg), announcement_message_arg == null ? 0n : CommonBase.get_ptr_of(announcement_message_arg)); + const ret: bigint = bindings.NodeAnnouncementInfo_new(CommonBase.get_ptr_of(features_arg), last_update_arg, bindings.encodeUint8Array(bindings.check_arr_len(rgb_arg, 3)), CommonBase.get_ptr_of(alias_arg), announcement_message_arg == null ? 0n : CommonBase.get_ptr_of(announcement_message_arg)); const ret_hu_conv: NodeAnnouncementInfo = new NodeAnnouncementInfo(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, features_arg); @@ -742,7 +807,7 @@ export class NodeAnnouncementInfo extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: NodeAnnouncementInfo): boolean { - const ret: boolean = bindings.NodeAnnouncementInfo_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.NodeAnnouncementInfo_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/NodeFeatures.mts b/ts/structs/NodeFeatures.mts index 773d7580..8e7d936b 100644 --- a/ts/structs/NodeFeatures.mts +++ b/ts/structs/NodeFeatures.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -611,7 +676,7 @@ export class NodeFeatures extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: NodeFeatures): boolean { - const ret: boolean = bindings.NodeFeatures_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.NodeFeatures_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } @@ -653,7 +718,7 @@ export class NodeFeatures extends CommonBase { * Returns true if this `Features` object contains required features unknown by `other`. */ public requires_unknown_bits_from(other: NodeFeatures): boolean { - const ret: boolean = bindings.NodeFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0n : CommonBase.get_ptr_of(other)); + const ret: boolean = bindings.NodeFeatures_requires_unknown_bits_from(this.ptr, CommonBase.get_ptr_of(other)); CommonBase.add_ref_from(this, other); return ret; } @@ -1285,4 +1350,34 @@ export class NodeFeatures extends CommonBase { return ret; } + /** + * Set this feature as optional. + */ + public set_trampoline_routing_optional(): void { + bindings.NodeFeatures_set_trampoline_routing_optional(this.ptr); + } + + /** + * Set this feature as required. + */ + public set_trampoline_routing_required(): void { + bindings.NodeFeatures_set_trampoline_routing_required(this.ptr); + } + + /** + * Checks if this feature is supported. + */ + public supports_trampoline_routing(): boolean { + const ret: boolean = bindings.NodeFeatures_supports_trampoline_routing(this.ptr); + return ret; + } + + /** + * Checks if this feature is required. + */ + public requires_trampoline_routing(): boolean { + const ret: boolean = bindings.NodeFeatures_requires_trampoline_routing(this.ptr); + return ret; + } + } diff --git a/ts/structs/NodeId.mts b/ts/structs/NodeId.mts index 5074ee45..ae6cb581 100644 --- a/ts/structs/NodeId.mts +++ b/ts/structs/NodeId.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -630,6 +695,15 @@ export class NodeId extends CommonBase { return ret_hu_conv; } + /** + * Create a new NodeId from a slice of bytes + */ + public static constructor_from_slice(bytes: Uint8Array): Result_NodeIdDecodeErrorZ { + const ret: bigint = bindings.NodeId_from_slice(bindings.encodeUint8Array(bytes)); + const ret_hu_conv: Result_NodeIdDecodeErrorZ = Result_NodeIdDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + /** * Get the public key slice from this NodeId */ diff --git a/ts/structs/NodeIdLookUp.mts b/ts/structs/NodeIdLookUp.mts new file mode 100644 index 00000000..64aca8e1 --- /dev/null +++ b/ts/structs/NodeIdLookUp.mts @@ -0,0 +1,737 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + + +/** An implementation of NodeIdLookUp */ +export interface NodeIdLookUpInterface { + /**Returns the node id of the forwarding node's channel counterparty with `short_channel_id`. + * + * Here, the forwarding node is referring to the node of the [`OnionMessenger`] parameterized + * by the [`NodeIdLookUp`] and the counterparty to one of that node's peers. + * + * [`OnionMessenger`]: crate::onion_message::messenger::OnionMessenger + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + next_node_id(short_channel_id: bigint): Uint8Array; +} + +class LDKNodeIdLookUpHolder { + held: NodeIdLookUp|null = null; +} + +/** + * An interface for looking up the node id of a channel counterparty for the purpose of forwarding + * an [`OnionMessage`]. + * + * [`OnionMessage`]: crate::ln::msgs::OnionMessage + */ +export class NodeIdLookUp extends CommonBase { + /* @internal */ + public bindings_instance: bindings.LDKNodeIdLookUp|null; + + /* @internal */ + public instance_idx?: number; + + /* @internal */ + constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.NodeIdLookUp_free); + this.bindings_instance = null; + } + + /** Creates a new instance of NodeIdLookUp from a given implementation */ + public static new_impl(arg: NodeIdLookUpInterface): NodeIdLookUp { + const impl_holder: LDKNodeIdLookUpHolder = new LDKNodeIdLookUpHolder(); + let structImplementation = { + next_node_id (short_channel_id: bigint): number { + const ret: Uint8Array = arg.next_node_id(short_channel_id); + const result: number = bindings.encodeUint8Array(bindings.check_arr_len(ret, 33)); + return result; + }, + } as bindings.LDKNodeIdLookUp; + const ptr_idx: [bigint, number] = bindings.LDKNodeIdLookUp_new(structImplementation); + + impl_holder.held = new NodeIdLookUp(null, ptr_idx[0]); + impl_holder.held.instance_idx = ptr_idx[1]; + impl_holder.held.bindings_instance = structImplementation; + return impl_holder.held!; + } + + /** + * Returns the node id of the forwarding node's channel counterparty with `short_channel_id`. + * + * Here, the forwarding node is referring to the node of the [`OnionMessenger`] parameterized + * by the [`NodeIdLookUp`] and the counterparty to one of that node's peers. + * + * [`OnionMessenger`]: crate::onion_message::messenger::OnionMessenger + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public next_node_id(short_channel_id: bigint): Uint8Array { + const ret: number = bindings.NodeIdLookUp_next_node_id(this.ptr, short_channel_id); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + +} diff --git a/ts/structs/NodeInfo.mts b/ts/structs/NodeInfo.mts index 2dae507a..3657c2b9 100644 --- a/ts/structs/NodeInfo.mts +++ b/ts/structs/NodeInfo.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeE import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -683,11 +748,19 @@ export class NodeInfo extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: NodeInfo): boolean { - const ret: boolean = bindings.NodeInfo_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.NodeInfo_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } + /** + * Returns whether the node has only announced Tor addresses. + */ + public is_tor_only(): boolean { + const ret: boolean = bindings.NodeInfo_is_tor_only(this.ptr); + return ret; + } + /** * Serialize the NodeInfo object into a byte array which can be read by NodeInfo_read */ diff --git a/ts/structs/NodeSigner.mts b/ts/structs/NodeSigner.mts index 9303caf7..3d729cbf 100644 --- a/ts/structs/NodeSigner.mts +++ b/ts/structs/NodeSigner.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -709,7 +774,7 @@ export class NodeSigner extends CommonBase { }, get_node_id (recipient: Recipient): bigint { const ret: Result_PublicKeyNoneZ = arg.get_node_id(recipient); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, ecdh (recipient: Recipient, other_key: number, tweak: bigint): bigint { @@ -717,7 +782,7 @@ export class NodeSigner extends CommonBase { const tweak_hu_conv: Option_BigEndianScalarZ = Option_BigEndianScalarZ.constr_from_ptr(tweak); CommonBase.add_ref_from(tweak_hu_conv, this); const ret: Result_ThirtyTwoBytesNoneZ = arg.ecdh(recipient, other_key_conv, tweak_hu_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, sign_invoice (hrp_bytes: number, invoice_data: number, recipient: Recipient): bigint { @@ -731,26 +796,26 @@ export class NodeSigner extends CommonBase { } bindings.freeWasmMemory(invoice_data) const ret: Result_RecoverableSignatureNoneZ = arg.sign_invoice(hrp_bytes_conv, invoice_data_conv_7_arr, recipient); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, sign_bolt12_invoice_request (invoice_request: bigint): bigint { const invoice_request_hu_conv: UnsignedInvoiceRequest = new UnsignedInvoiceRequest(null, invoice_request); const ret: Result_SchnorrSignatureNoneZ = arg.sign_bolt12_invoice_request(invoice_request_hu_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, sign_bolt12_invoice (invoice: bigint): bigint { const invoice_hu_conv: UnsignedBolt12Invoice = new UnsignedBolt12Invoice(null, invoice); const ret: Result_SchnorrSignatureNoneZ = arg.sign_bolt12_invoice(invoice_hu_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, sign_gossip_message (msg: bigint): bigint { const msg_hu_conv: UnsignedGossipMessage = UnsignedGossipMessage.constr_from_ptr(msg); CommonBase.add_ref_from(msg_hu_conv, this); const ret: Result_ECDSASignatureNoneZ = arg.sign_gossip_message(msg_hu_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, } as bindings.LDKNodeSigner; @@ -843,7 +908,7 @@ export class NodeSigner extends CommonBase { * [`TaggedHash`]: crate::offers::merkle::TaggedHash */ public sign_bolt12_invoice_request(invoice_request: UnsignedInvoiceRequest): Result_SchnorrSignatureNoneZ { - const ret: bigint = bindings.NodeSigner_sign_bolt12_invoice_request(this.ptr, invoice_request == null ? 0n : CommonBase.get_ptr_of(invoice_request)); + const ret: bigint = bindings.NodeSigner_sign_bolt12_invoice_request(this.ptr, CommonBase.get_ptr_of(invoice_request)); const ret_hu_conv: Result_SchnorrSignatureNoneZ = Result_SchnorrSignatureNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, invoice_request); return ret_hu_conv; @@ -863,7 +928,7 @@ export class NodeSigner extends CommonBase { * [`TaggedHash`]: crate::offers::merkle::TaggedHash */ public sign_bolt12_invoice(invoice: UnsignedBolt12Invoice): Result_SchnorrSignatureNoneZ { - const ret: bigint = bindings.NodeSigner_sign_bolt12_invoice(this.ptr, invoice == null ? 0n : CommonBase.get_ptr_of(invoice)); + const ret: bigint = bindings.NodeSigner_sign_bolt12_invoice(this.ptr, CommonBase.get_ptr_of(invoice)); const ret_hu_conv: Result_SchnorrSignatureNoneZ = Result_SchnorrSignatureNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, invoice); return ret_hu_conv; diff --git a/ts/structs/Offer.mts b/ts/structs/Offer.mts index 1a95c4c6..f8c9e798 100644 --- a/ts/structs/Offer.mts +++ b/ts/structs/Offer.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,9 +163,17 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -663,12 +728,10 @@ export class Offer extends CommonBase { /** * The minimum amount required for a successful payment of a single item. - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public amount(): Amount { + public amount(): Option_AmountZ { const ret: bigint = bindings.Offer_amount(this.ptr); - const ret_hu_conv: Amount = new Amount(null, ret); + const ret_hu_conv: Option_AmountZ = Option_AmountZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, this); return ret_hu_conv; } @@ -676,6 +739,8 @@ export class Offer extends CommonBase { /** * A complete description of the purpose of the payment. Intended to be displayed to the user * but with the caveat that it has not been verified in any way. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ public description(): PrintableString { const ret: bigint = bindings.Offer_description(this.ptr); @@ -742,13 +807,15 @@ export class Offer extends CommonBase { */ public supported_quantity(): Quantity { const ret: bigint = bindings.Offer_supported_quantity(this.ptr); - const ret_hu_conv: Quantity = new Quantity(null, ret); + const ret_hu_conv: Quantity = Quantity.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, this); return ret_hu_conv; } /** * The public key used by the recipient to sign invoices. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ public signing_pubkey(): Uint8Array { const ret: number = bindings.Offer_signing_pubkey(this.ptr); @@ -756,6 +823,16 @@ export class Offer extends CommonBase { return ret_conv; } + /** + * Returns the id of the offer. + */ + public id(): OfferId { + const ret: bigint = bindings.Offer_id(this.ptr); + const ret_hu_conv: OfferId = new OfferId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + /** * Returns whether the given chain is supported by the offer. */ @@ -790,6 +867,76 @@ export class Offer extends CommonBase { return ret; } + /** + * Similar to [`Offer::request_invoice`] except it: + * - derives the [`InvoiceRequest::payer_id`] such that a different key can be used for each + * request, + * - sets [`InvoiceRequest::payer_metadata`] when [`InvoiceRequestBuilder::build`] is called + * such that it can be used by [`Bolt12Invoice::verify`] to determine if the invoice was + * requested using a base [`ExpandedKey`] from which the payer id was derived, and + * - includes the [`PaymentId`] encrypted in [`InvoiceRequest::payer_metadata`] so that it can + * be used when sending the payment for the requested invoice. + * + * Useful to protect the sender's privacy. + * + * [`InvoiceRequest::payer_id`]: crate::offers::invoice_request::InvoiceRequest::payer_id + * [`InvoiceRequest::payer_metadata`]: crate::offers::invoice_request::InvoiceRequest::payer_metadata + * [`Bolt12Invoice::verify`]: crate::offers::invoice::Bolt12Invoice::verify + * [`ExpandedKey`]: crate::ln::inbound_payment::ExpandedKey + */ + public request_invoice_deriving_payer_id(expanded_key: ExpandedKey, entropy_source: EntropySource, payment_id: Uint8Array): Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ { + const ret: bigint = bindings.Offer_request_invoice_deriving_payer_id(this.ptr, CommonBase.get_ptr_of(expanded_key), CommonBase.get_ptr_of(entropy_source), bindings.encodeUint8Array(bindings.check_arr_len(payment_id, 32))); + const ret_hu_conv: Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ = Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(this, expanded_key); + CommonBase.add_ref_from(this, entropy_source); + return ret_hu_conv; + } + + /** + * Similar to [`Offer::request_invoice_deriving_payer_id`] except uses `payer_id` for the + * [`InvoiceRequest::payer_id`] instead of deriving a different key for each request. + * + * Useful for recurring payments using the same `payer_id` with different invoices. + * + * [`InvoiceRequest::payer_id`]: crate::offers::invoice_request::InvoiceRequest::payer_id + */ + public request_invoice_deriving_metadata(payer_id: Uint8Array, expanded_key: ExpandedKey, entropy_source: EntropySource, payment_id: Uint8Array): Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ { + const ret: bigint = bindings.Offer_request_invoice_deriving_metadata(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(payer_id, 33)), CommonBase.get_ptr_of(expanded_key), CommonBase.get_ptr_of(entropy_source), bindings.encodeUint8Array(bindings.check_arr_len(payment_id, 32))); + const ret_hu_conv: Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ = Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(this, expanded_key); + CommonBase.add_ref_from(this, entropy_source); + return ret_hu_conv; + } + + /** + * Creates an [`InvoiceRequestBuilder`] for the offer with the given `metadata` and `payer_id`, + * which will be reflected in the `Bolt12Invoice` response. + * + * The `metadata` is useful for including information about the derivation of `payer_id` such + * that invoice response handling can be stateless. Also serves as payer-provided entropy while + * hashing in the signature calculation. + * + * This should not leak any information such as by using a simple BIP-32 derivation path. + * Otherwise, payments may be correlated. + * + * Errors if the offer contains unknown required features. + * + * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest + */ + public request_invoice(metadata: Uint8Array, payer_id: Uint8Array): Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ { + const ret: bigint = bindings.Offer_request_invoice(this.ptr, bindings.encodeUint8Array(metadata), bindings.encodeUint8Array(bindings.check_arr_len(payer_id, 33))); + const ret_hu_conv: Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ = Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Generates a non-cryptographic 64-bit hash of the Offer. + */ + public hash(): bigint { + const ret: bigint = bindings.Offer_hash(this.ptr); + return ret; + } + /** * Serialize the Offer object into a byte array which can be read by Offer_read */ diff --git a/ts/structs/OfferFeatures.mts b/ts/structs/OfferFeatures.mts index d2afb9f2..de211319 100644 --- a/ts/structs/OfferFeatures.mts +++ b/ts/structs/OfferFeatures.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDe import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -611,7 +676,7 @@ export class OfferFeatures extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: OfferFeatures): boolean { - const ret: boolean = bindings.OfferFeatures_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.OfferFeatures_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } @@ -653,7 +718,7 @@ export class OfferFeatures extends CommonBase { * Returns true if this `Features` object contains required features unknown by `other`. */ public requires_unknown_bits_from(other: OfferFeatures): boolean { - const ret: boolean = bindings.OfferFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0n : CommonBase.get_ptr_of(other)); + const ret: boolean = bindings.OfferFeatures_requires_unknown_bits_from(this.ptr, CommonBase.get_ptr_of(other)); CommonBase.add_ref_from(this, other); return ret; } diff --git a/ts/structs/OfferId.mts b/ts/structs/OfferId.mts new file mode 100644 index 00000000..680fb91c --- /dev/null +++ b/ts/structs/OfferId.mts @@ -0,0 +1,737 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + +/** + * An identifier for an [`Offer`] built using [`DerivedMetadata`]. + */ +export class OfferId extends CommonBase { + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.OfferId_free); + } + + public get_a(): Uint8Array { + const ret: number = bindings.OfferId_get_a(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + + public set_a(val: Uint8Array): void { + bindings.OfferId_set_a(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + } + + /** + * Constructs a new OfferId given each field + */ + public static constructor_new(a_arg: Uint8Array): OfferId { + const ret: bigint = bindings.OfferId_new(bindings.encodeUint8Array(bindings.check_arr_len(a_arg, 32))); + const ret_hu_conv: OfferId = new OfferId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + return ret_hu_conv; + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.OfferId_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a copy of the OfferId + */ + public clone(): OfferId { + const ret: bigint = bindings.OfferId_clone(this.ptr); + const ret_hu_conv: OfferId = new OfferId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * Checks if two OfferIds contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ + public eq(b: OfferId): boolean { + const ret: boolean = bindings.OfferId_eq(this.ptr, CommonBase.get_ptr_of(b)); + CommonBase.add_ref_from(this, b); + return ret; + } + + /** + * Serialize the OfferId object into a byte array which can be read by OfferId_read + */ + public write(): Uint8Array { + const ret: number = bindings.OfferId_write(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Read a OfferId from a byte array, created by OfferId_write + */ + public static constructor_read(ser: Uint8Array): Result_OfferIdDecodeErrorZ { + const ret: bigint = bindings.OfferId_read(bindings.encodeUint8Array(ser)); + const ret_hu_conv: Result_OfferIdDecodeErrorZ = Result_OfferIdDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/ts/structs/OfferWithDerivedMetadataBuilder.mts b/ts/structs/OfferWithDerivedMetadataBuilder.mts new file mode 100644 index 00000000..52f34130 --- /dev/null +++ b/ts/structs/OfferWithDerivedMetadataBuilder.mts @@ -0,0 +1,795 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + +/** + * Builds an [`Offer`] for the \"offer to be paid\" flow. + * + * See [module-level documentation] for usage. + * + * [module-level documentation]: self + */ +export class OfferWithDerivedMetadataBuilder extends CommonBase { + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.OfferWithDerivedMetadataBuilder_free); + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.OfferWithDerivedMetadataBuilder_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a copy of the OfferWithDerivedMetadataBuilder + */ + public clone(): OfferWithDerivedMetadataBuilder { + const ret: bigint = bindings.OfferWithDerivedMetadataBuilder_clone(this.ptr); + const ret_hu_conv: OfferWithDerivedMetadataBuilder = new OfferWithDerivedMetadataBuilder(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * Similar to [`OfferBuilder::new`] except, if [`OfferBuilder::path`] is called, the signing + * pubkey is derived from the given [`ExpandedKey`] and [`EntropySource`]. This provides + * recipient privacy by using a different signing pubkey for each offer. Otherwise, the + * provided `node_id` is used for the signing pubkey. + * + * Also, sets the metadata when [`OfferBuilder::build`] is called such that it can be used by + * [`InvoiceRequest::verify`] to determine if the request was produced for the offer given an + * [`ExpandedKey`]. + * + * [`InvoiceRequest::verify`]: crate::offers::invoice_request::InvoiceRequest::verify + * [`ExpandedKey`]: crate::ln::inbound_payment::ExpandedKey + */ + public static constructor_deriving_signing_pubkey(node_id: Uint8Array, expanded_key: ExpandedKey, entropy_source: EntropySource): OfferWithDerivedMetadataBuilder { + const ret: bigint = bindings.OfferWithDerivedMetadataBuilder_deriving_signing_pubkey(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(expanded_key), CommonBase.get_ptr_of(entropy_source)); + const ret_hu_conv: OfferWithDerivedMetadataBuilder = new OfferWithDerivedMetadataBuilder(null, ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, expanded_key); + CommonBase.add_ref_from(ret_hu_conv, entropy_source); + return ret_hu_conv; + } + + /** + * Adds the chain hash of the given [`Network`] to [`Offer::chains`]. If not called, + * the chain hash of [`Network::Bitcoin`] is assumed to be the only one supported. + * + * See [`Offer::chains`] on how this relates to the payment currency. + * + * Successive calls to this method will add another chain hash. + */ + public chain(network: Network): void { + bindings.OfferWithDerivedMetadataBuilder_chain(this.ptr, network); + } + + /** + * Sets the [`Offer::amount`] as an [`Amount::Bitcoin`]. + * + * Successive calls to this method will override the previous setting. + */ + public amount_msats(amount_msats: bigint): void { + bindings.OfferWithDerivedMetadataBuilder_amount_msats(this.ptr, amount_msats); + } + + /** + * Sets the [`Offer::absolute_expiry`] as seconds since the Unix epoch. Any expiry that has + * already passed is valid and can be checked for using [`Offer::is_expired`]. + * + * Successive calls to this method will override the previous setting. + */ + public absolute_expiry(absolute_expiry: bigint): void { + bindings.OfferWithDerivedMetadataBuilder_absolute_expiry(this.ptr, absolute_expiry); + } + + /** + * Sets the [`Offer::description`]. + * + * Successive calls to this method will override the previous setting. + */ + public description(description: string): void { + bindings.OfferWithDerivedMetadataBuilder_description(this.ptr, bindings.encodeString(description)); + } + + /** + * Sets the [`Offer::issuer`]. + * + * Successive calls to this method will override the previous setting. + */ + public issuer(issuer: string): void { + bindings.OfferWithDerivedMetadataBuilder_issuer(this.ptr, bindings.encodeString(issuer)); + } + + /** + * Adds a blinded path to [`Offer::paths`]. Must include at least one path if only connected by + * private channels or if [`Offer::signing_pubkey`] is not a public node id. + * + * Successive calls to this method will add another blinded path. Caller is responsible for not + * adding duplicate paths. + */ + public path(path: BlindedPath): void { + bindings.OfferWithDerivedMetadataBuilder_path(this.ptr, CommonBase.get_ptr_of(path)); + CommonBase.add_ref_from(this, path); + } + + /** + * Sets the quantity of items for [`Offer::supported_quantity`]. If not called, defaults to + * [`Quantity::One`]. + * + * Successive calls to this method will override the previous setting. + */ + public supported_quantity(quantity: Quantity): void { + bindings.OfferWithDerivedMetadataBuilder_supported_quantity(this.ptr, CommonBase.get_ptr_of(quantity)); + CommonBase.add_ref_from(this, quantity); + } + + /** + * Builds an [`Offer`] from the builder's settings. + */ + public build(): Result_OfferBolt12SemanticErrorZ { + const ret: bigint = bindings.OfferWithDerivedMetadataBuilder_build(this.ptr); + const ret_hu_conv: Result_OfferBolt12SemanticErrorZ = Result_OfferBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/ts/structs/OfferWithExplicitMetadataBuilder.mts b/ts/structs/OfferWithExplicitMetadataBuilder.mts new file mode 100644 index 00000000..9157ddf9 --- /dev/null +++ b/ts/structs/OfferWithExplicitMetadataBuilder.mts @@ -0,0 +1,805 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + +/** + * Builds an [`Offer`] for the \"offer to be paid\" flow. + * + * See [module-level documentation] for usage. + * + * [module-level documentation]: self + */ +export class OfferWithExplicitMetadataBuilder extends CommonBase { + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.OfferWithExplicitMetadataBuilder_free); + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.OfferWithExplicitMetadataBuilder_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a copy of the OfferWithExplicitMetadataBuilder + */ + public clone(): OfferWithExplicitMetadataBuilder { + const ret: bigint = bindings.OfferWithExplicitMetadataBuilder_clone(this.ptr); + const ret_hu_conv: OfferWithExplicitMetadataBuilder = new OfferWithExplicitMetadataBuilder(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * Creates a new builder for an offer using the [`Offer::signing_pubkey`] for signing invoices. + * The associated secret key must be remembered while the offer is valid. + * + * Use a different pubkey per offer to avoid correlating offers. + * + * # Note + * + * If constructing an [`Offer`] for use with a [`ChannelManager`], use + * [`ChannelManager::create_offer_builder`] instead of [`OfferBuilder::new`]. + * + * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager + * [`ChannelManager::create_offer_builder`]: crate::ln::channelmanager::ChannelManager::create_offer_builder + */ + public static constructor_new(signing_pubkey: Uint8Array): OfferWithExplicitMetadataBuilder { + const ret: bigint = bindings.OfferWithExplicitMetadataBuilder_new(bindings.encodeUint8Array(bindings.check_arr_len(signing_pubkey, 33))); + const ret_hu_conv: OfferWithExplicitMetadataBuilder = new OfferWithExplicitMetadataBuilder(null, ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + return ret_hu_conv; + } + + /** + * Sets the [`Offer::metadata`] to the given bytes. + * + * Successive calls to this method will override the previous setting. + */ + public metadata(metadata: Uint8Array): Result_NoneBolt12SemanticErrorZ { + const ret: bigint = bindings.OfferWithExplicitMetadataBuilder_metadata(this.ptr, bindings.encodeUint8Array(metadata)); + const ret_hu_conv: Result_NoneBolt12SemanticErrorZ = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Adds the chain hash of the given [`Network`] to [`Offer::chains`]. If not called, + * the chain hash of [`Network::Bitcoin`] is assumed to be the only one supported. + * + * See [`Offer::chains`] on how this relates to the payment currency. + * + * Successive calls to this method will add another chain hash. + */ + public chain(network: Network): void { + bindings.OfferWithExplicitMetadataBuilder_chain(this.ptr, network); + } + + /** + * Sets the [`Offer::amount`] as an [`Amount::Bitcoin`]. + * + * Successive calls to this method will override the previous setting. + */ + public amount_msats(amount_msats: bigint): void { + bindings.OfferWithExplicitMetadataBuilder_amount_msats(this.ptr, amount_msats); + } + + /** + * Sets the [`Offer::absolute_expiry`] as seconds since the Unix epoch. Any expiry that has + * already passed is valid and can be checked for using [`Offer::is_expired`]. + * + * Successive calls to this method will override the previous setting. + */ + public absolute_expiry(absolute_expiry: bigint): void { + bindings.OfferWithExplicitMetadataBuilder_absolute_expiry(this.ptr, absolute_expiry); + } + + /** + * Sets the [`Offer::description`]. + * + * Successive calls to this method will override the previous setting. + */ + public description(description: string): void { + bindings.OfferWithExplicitMetadataBuilder_description(this.ptr, bindings.encodeString(description)); + } + + /** + * Sets the [`Offer::issuer`]. + * + * Successive calls to this method will override the previous setting. + */ + public issuer(issuer: string): void { + bindings.OfferWithExplicitMetadataBuilder_issuer(this.ptr, bindings.encodeString(issuer)); + } + + /** + * Adds a blinded path to [`Offer::paths`]. Must include at least one path if only connected by + * private channels or if [`Offer::signing_pubkey`] is not a public node id. + * + * Successive calls to this method will add another blinded path. Caller is responsible for not + * adding duplicate paths. + */ + public path(path: BlindedPath): void { + bindings.OfferWithExplicitMetadataBuilder_path(this.ptr, CommonBase.get_ptr_of(path)); + CommonBase.add_ref_from(this, path); + } + + /** + * Sets the quantity of items for [`Offer::supported_quantity`]. If not called, defaults to + * [`Quantity::One`]. + * + * Successive calls to this method will override the previous setting. + */ + public supported_quantity(quantity: Quantity): void { + bindings.OfferWithExplicitMetadataBuilder_supported_quantity(this.ptr, CommonBase.get_ptr_of(quantity)); + CommonBase.add_ref_from(this, quantity); + } + + /** + * Builds an [`Offer`] from the builder's settings. + */ + public build(): Result_OfferBolt12SemanticErrorZ { + const ret: bigint = bindings.OfferWithExplicitMetadataBuilder_build(this.ptr); + const ret_hu_conv: Result_OfferBolt12SemanticErrorZ = Result_OfferBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/ts/structs/OffersMessage.mts b/ts/structs/OffersMessage.mts index c8d26d4e..4d78abba 100644 --- a/ts/structs/OffersMessage.mts +++ b/ts/structs/OffersMessage.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; import { Destination } from '../structs/Destination.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -633,7 +698,7 @@ export class OffersMessage extends CommonBase { * Utility method to constructs a new InvoiceRequest-variant OffersMessage */ public static constructor_invoice_request(a: InvoiceRequest): OffersMessage { - const ret: bigint = bindings.OffersMessage_invoice_request(a == null ? 0n : CommonBase.get_ptr_of(a)); + const ret: bigint = bindings.OffersMessage_invoice_request(CommonBase.get_ptr_of(a)); const ret_hu_conv: OffersMessage = OffersMessage.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, a); @@ -644,7 +709,7 @@ export class OffersMessage extends CommonBase { * Utility method to constructs a new Invoice-variant OffersMessage */ public static constructor_invoice(a: Bolt12Invoice): OffersMessage { - const ret: bigint = bindings.OffersMessage_invoice(a == null ? 0n : CommonBase.get_ptr_of(a)); + const ret: bigint = bindings.OffersMessage_invoice(CommonBase.get_ptr_of(a)); const ret_hu_conv: OffersMessage = OffersMessage.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, a); @@ -655,7 +720,7 @@ export class OffersMessage extends CommonBase { * Utility method to constructs a new InvoiceError-variant OffersMessage */ public static constructor_invoice_error(a: InvoiceError): OffersMessage { - const ret: bigint = bindings.OffersMessage_invoice_error(a == null ? 0n : CommonBase.get_ptr_of(a)); + const ret: bigint = bindings.OffersMessage_invoice_error(CommonBase.get_ptr_of(a)); const ret_hu_conv: OffersMessage = OffersMessage.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, a); diff --git a/ts/structs/OffersMessageHandler.mts b/ts/structs/OffersMessageHandler.mts index 2c1c7c2f..55f121e7 100644 --- a/ts/structs/OffersMessageHandler.mts +++ b/ts/structs/OffersMessageHandler.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { FailureCode } from '../structs/FailureCode.mjs'; import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -646,13 +711,13 @@ export class OffersMessageHandler extends CommonBase { const message_hu_conv: OffersMessage = OffersMessage.constr_from_ptr(message); CommonBase.add_ref_from(message_hu_conv, this); const ret: Option_OffersMessageZ = arg.handle_message(message_hu_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); CommonBase.add_ref_from(impl_holder.held, ret); return result; }, release_pending_messages (): number { const ret: ThreeTuple_OffersMessageDestinationBlindedPathZ[] = arg.release_pending_messages(); - const result: number = bindings.encodeUint64Array(ret.map(ret_conv_49 => ret_conv_49 == null ? 0n : ret_conv_49.clone_ptr())); + const result: number = bindings.encodeUint64Array(ret.map(ret_conv_49 => ret_conv_49.clone_ptr())); return result; }, } as bindings.LDKOffersMessageHandler; diff --git a/ts/structs/OneHopBlindedPathCandidate.mts b/ts/structs/OneHopBlindedPathCandidate.mts index 671ec985..a6db00a8 100644 --- a/ts/structs/OneHopBlindedPathCandidate.mts +++ b/ts/structs/OneHopBlindedPathCandidate.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/OnionMessage.mts b/ts/structs/OnionMessage.mts index bee82fa0..fefca5bb 100644 --- a/ts/structs/OnionMessage.mts +++ b/ts/structs/OnionMessage.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -635,7 +700,7 @@ export class OnionMessage extends CommonBase { * The full onion packet including hop data, pubkey, and hmac */ public set_onion_routing_packet(val: Packet): void { - bindings.OnionMessage_set_onion_routing_packet(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.OnionMessage_set_onion_routing_packet(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -643,7 +708,7 @@ export class OnionMessage extends CommonBase { * Constructs a new OnionMessage given each field */ public static constructor_new(blinding_point_arg: Uint8Array, onion_routing_packet_arg: Packet): OnionMessage { - const ret: bigint = bindings.OnionMessage_new(bindings.encodeUint8Array(bindings.check_arr_len(blinding_point_arg, 33)), onion_routing_packet_arg == null ? 0n : CommonBase.get_ptr_of(onion_routing_packet_arg)); + const ret: bigint = bindings.OnionMessage_new(bindings.encodeUint8Array(bindings.check_arr_len(blinding_point_arg, 33)), CommonBase.get_ptr_of(onion_routing_packet_arg)); const ret_hu_conv: OnionMessage = new OnionMessage(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, onion_routing_packet_arg); @@ -679,7 +744,7 @@ export class OnionMessage extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: OnionMessage): boolean { - const ret: boolean = bindings.OnionMessage_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.OnionMessage_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/OnionMessageContents.mts b/ts/structs/OnionMessageContents.mts index e35f33be..0a411b44 100644 --- a/ts/structs/OnionMessageContents.mts +++ b/ts/structs/OnionMessageContents.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/OnionMessageHandler.mts b/ts/structs/OnionMessageHandler.mts index 03d6d89a..ced4a1cf 100644 --- a/ts/structs/OnionMessageHandler.mts +++ b/ts/structs/OnionMessageHandler.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,10 +600,14 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -673,7 +738,7 @@ export class OnionMessageHandler extends CommonBase { let structImplementation = { get_and_clear_connections_needed (): number { const ret: TwoTuple_PublicKeyCVec_SocketAddressZZ[] = arg.get_and_clear_connections_needed(); - const result: number = bindings.encodeUint64Array(ret.map(ret_conv_40 => ret_conv_40 == null ? 0n : ret_conv_40.clone_ptr())); + const result: number = bindings.encodeUint64Array(ret.map(ret_conv_40 => ret_conv_40.clone_ptr())); return result; }, handle_onion_message (peer_node_id: number, msg: bigint): void { @@ -691,7 +756,7 @@ export class OnionMessageHandler extends CommonBase { const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id); const init_hu_conv: Init = new Init(null, init); const ret: Result_NoneNoneZ = arg.peer_connected(their_node_id_conv, init_hu_conv, inbound); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, peer_disconnected (their_node_id: number): void { @@ -703,13 +768,13 @@ export class OnionMessageHandler extends CommonBase { }, provided_node_features (): bigint { const ret: NodeFeatures = arg.provided_node_features(); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, provided_init_features (their_node_id: number): bigint { const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id); const ret: InitFeatures = arg.provided_init_features(their_node_id_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, } as bindings.LDKOnionMessageHandler; @@ -748,7 +813,7 @@ export class OnionMessageHandler extends CommonBase { * Handle an incoming `onion_message` message from the given peer. */ public handle_onion_message(peer_node_id: Uint8Array, msg: OnionMessage): void { - bindings.OnionMessageHandler_handle_onion_message(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(peer_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + bindings.OnionMessageHandler_handle_onion_message(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(peer_node_id, 33)), CommonBase.get_ptr_of(msg)); CommonBase.add_ref_from(this, msg); } @@ -773,7 +838,7 @@ export class OnionMessageHandler extends CommonBase { * message handlers may still wish to communicate with this peer. */ public peer_connected(their_node_id: Uint8Array, init: Init, inbound: boolean): Result_NoneNoneZ { - const ret: bigint = bindings.OnionMessageHandler_peer_connected(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), init == null ? 0n : CommonBase.get_ptr_of(init), inbound); + const ret: bigint = bindings.OnionMessageHandler_peer_connected(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(init), inbound); const ret_hu_conv: Result_NoneNoneZ = Result_NoneNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, init); return ret_hu_conv; diff --git a/ts/structs/OnionMessagePath.mts b/ts/structs/OnionMessagePath.mts index 3becf61d..7e15c402 100644 --- a/ts/structs/OnionMessagePath.mts +++ b/ts/structs/OnionMessagePath.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -703,6 +768,8 @@ export class OnionMessagePath extends CommonBase { /** * Returns the first node in the path. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ public first_node(): Uint8Array { const ret: number = bindings.OnionMessagePath_first_node(this.ptr); diff --git a/ts/structs/OnionMessenger.mts b/ts/structs/OnionMessenger.mts index 85d31b51..ad46af1f 100644 --- a/ts/structs/OnionMessenger.mts +++ b/ts/structs/OnionMessenger.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -560,10 +620,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -578,7 +640,10 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -620,7 +685,7 @@ import * as bindings from '../bindings.mjs' * # use bitcoin::hashes::_export::_core::time::Duration; * # use bitcoin::hashes::hex::FromHex; * # use bitcoin::secp256k1::{PublicKey, Secp256k1, SecretKey, self}; - * # use lightning::blinded_path::BlindedPath; + * # use lightning::blinded_path::{BlindedPath, EmptyNodeIdLookUp}; * # use lightning::sign::{EntropySource, KeysManager}; * # use lightning::ln::peer_handler::IgnoringMessageHandler; * # use lightning::onion_message::messenger::{Destination, MessageRouter, OnionMessagePath, OnionMessenger}; @@ -661,14 +726,15 @@ import * as bindings from '../bindings.mjs' * # let hop_node_id1 = PublicKey::from_secret_key(&secp_ctx, &node_secret); * # let (hop_node_id3, hop_node_id4) = (hop_node_id1, hop_node_id1); * # let destination_node_id = hop_node_id1; + * # let node_id_lookup = EmptyNodeIdLookUp {}; * # let message_router = Arc::new(FakeMessageRouter {}); * # let custom_message_handler = IgnoringMessageHandler {}; * # let offers_message_handler = IgnoringMessageHandler {}; * Create the onion messenger. This must use the same `keys_manager` as is passed to your * ChannelManager. * let onion_messenger = OnionMessenger::new( - * &keys_manager, &keys_manager, logger, message_router, &offers_message_handler, - * &custom_message_handler + * &keys_manager, &keys_manager, logger, &node_id_lookup, message_router, + * &offers_message_handler, &custom_message_handler * ); * * # #[derive(Debug, Clone)] @@ -716,13 +782,14 @@ export class OnionMessenger extends CommonBase { * Constructs a new `OnionMessenger` to send, forward, and delegate received onion messages to * their respective handlers. */ - public static constructor_new(entropy_source: EntropySource, node_signer: NodeSigner, logger: Logger, message_router: MessageRouter, offers_handler: OffersMessageHandler, custom_handler: CustomOnionMessageHandler): OnionMessenger { - const ret: bigint = bindings.OnionMessenger_new(CommonBase.get_ptr_of(entropy_source), CommonBase.get_ptr_of(node_signer), CommonBase.get_ptr_of(logger), CommonBase.get_ptr_of(message_router), CommonBase.get_ptr_of(offers_handler), CommonBase.get_ptr_of(custom_handler)); + public static constructor_new(entropy_source: EntropySource, node_signer: NodeSigner, logger: Logger, node_id_lookup: NodeIdLookUp, message_router: MessageRouter, offers_handler: OffersMessageHandler, custom_handler: CustomOnionMessageHandler): OnionMessenger { + const ret: bigint = bindings.OnionMessenger_new(CommonBase.get_ptr_of(entropy_source), CommonBase.get_ptr_of(node_signer), CommonBase.get_ptr_of(logger), CommonBase.get_ptr_of(node_id_lookup), CommonBase.get_ptr_of(message_router), CommonBase.get_ptr_of(offers_handler), CommonBase.get_ptr_of(custom_handler)); const ret_hu_conv: OnionMessenger = new OnionMessenger(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, entropy_source); CommonBase.add_ref_from(ret_hu_conv, node_signer); CommonBase.add_ref_from(ret_hu_conv, logger); + CommonBase.add_ref_from(ret_hu_conv, node_id_lookup); CommonBase.add_ref_from(ret_hu_conv, message_router); CommonBase.add_ref_from(ret_hu_conv, offers_handler); CommonBase.add_ref_from(ret_hu_conv, custom_handler); diff --git a/ts/structs/OnionPacket.mts b/ts/structs/OnionPacket.mts index 4417b8e4..ecedb508 100644 --- a/ts/structs/OnionPacket.mts +++ b/ts/structs/OnionPacket.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -643,7 +708,7 @@ export class OnionPacket extends CommonBase { * like. */ public set_public_key(val: Result_PublicKeySecp256k1ErrorZ): void { - bindings.OnionPacket_set_public_key(this.ptr, val != null ? CommonBase.get_ptr_of(val) : 0n); + bindings.OnionPacket_set_public_key(this.ptr, CommonBase.get_ptr_of(val)); } /** @@ -691,7 +756,7 @@ export class OnionPacket extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: OnionPacket): boolean { - const ret: boolean = bindings.OnionPacket_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.OnionPacket_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/OpenChannel.mts b/ts/structs/OpenChannel.mts index 2c5fd325..a800ffeb 100644 --- a/ts/structs/OpenChannel.mts +++ b/ts/structs/OpenChannel.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -610,50 +675,21 @@ export class OpenChannel extends CommonBase { } /** - * The genesis hash of the blockchain where the channel is to be opened + * Common fields of `open_channel(2)`-like messages */ - public get_chain_hash(): Uint8Array { - const ret: number = bindings.OpenChannel_get_chain_hash(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; - } - - /** - * The genesis hash of the blockchain where the channel is to be opened - */ - public set_chain_hash(val: Uint8Array): void { - bindings.OpenChannel_set_chain_hash(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); - } - - /** - * A temporary channel ID, until the funding outpoint is announced - */ - public get_temporary_channel_id(): Uint8Array { - const ret: number = bindings.OpenChannel_get_temporary_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; - } - - /** - * A temporary channel ID, until the funding outpoint is announced - */ - public set_temporary_channel_id(val: Uint8Array): void { - bindings.OpenChannel_set_temporary_channel_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); - } - - /** - * The channel value - */ - public get_funding_satoshis(): bigint { - const ret: bigint = bindings.OpenChannel_get_funding_satoshis(this.ptr); - return ret; + public get_common_fields(): CommonOpenChannelFields { + const ret: bigint = bindings.OpenChannel_get_common_fields(this.ptr); + const ret_hu_conv: CommonOpenChannelFields = new CommonOpenChannelFields(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** - * The channel value + * Common fields of `open_channel(2)`-like messages */ - public set_funding_satoshis(val: bigint): void { - bindings.OpenChannel_set_funding_satoshis(this.ptr, val); + public set_common_fields(val: CommonOpenChannelFields): void { + bindings.OpenChannel_set_common_fields(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** @@ -671,36 +707,6 @@ export class OpenChannel extends CommonBase { bindings.OpenChannel_set_push_msat(this.ptr, val); } - /** - * The threshold below which outputs on transactions broadcast by sender will be omitted - */ - public get_dust_limit_satoshis(): bigint { - const ret: bigint = bindings.OpenChannel_get_dust_limit_satoshis(this.ptr); - return ret; - } - - /** - * The threshold below which outputs on transactions broadcast by sender will be omitted - */ - public set_dust_limit_satoshis(val: bigint): void { - bindings.OpenChannel_set_dust_limit_satoshis(this.ptr, val); - } - - /** - * The maximum inbound HTLC value in flight towards sender, in milli-satoshi - */ - public get_max_htlc_value_in_flight_msat(): bigint { - const ret: bigint = bindings.OpenChannel_get_max_htlc_value_in_flight_msat(this.ptr); - return ret; - } - - /** - * The maximum inbound HTLC value in flight towards sender, in milli-satoshi - */ - public set_max_htlc_value_in_flight_msat(val: bigint): void { - bindings.OpenChannel_set_max_htlc_value_in_flight_msat(this.ptr, val); - } - /** * The minimum value unencumbered by HTLCs for the counterparty to keep in the channel */ @@ -716,238 +722,14 @@ export class OpenChannel extends CommonBase { bindings.OpenChannel_set_channel_reserve_satoshis(this.ptr, val); } - /** - * The minimum HTLC size incoming to sender, in milli-satoshi - */ - public get_htlc_minimum_msat(): bigint { - const ret: bigint = bindings.OpenChannel_get_htlc_minimum_msat(this.ptr); - return ret; - } - - /** - * The minimum HTLC size incoming to sender, in milli-satoshi - */ - public set_htlc_minimum_msat(val: bigint): void { - bindings.OpenChannel_set_htlc_minimum_msat(this.ptr, val); - } - - /** - * The feerate per 1000-weight of sender generated transactions, until updated by - * [`UpdateFee`] - */ - public get_feerate_per_kw(): number { - const ret: number = bindings.OpenChannel_get_feerate_per_kw(this.ptr); - return ret; - } - - /** - * The feerate per 1000-weight of sender generated transactions, until updated by - * [`UpdateFee`] - */ - public set_feerate_per_kw(val: number): void { - bindings.OpenChannel_set_feerate_per_kw(this.ptr, val); - } - - /** - * The number of blocks which the counterparty will have to wait to claim on-chain funds if - * they broadcast a commitment transaction - */ - public get_to_self_delay(): number { - const ret: number = bindings.OpenChannel_get_to_self_delay(this.ptr); - return ret; - } - - /** - * The number of blocks which the counterparty will have to wait to claim on-chain funds if - * they broadcast a commitment transaction - */ - public set_to_self_delay(val: number): void { - bindings.OpenChannel_set_to_self_delay(this.ptr, val); - } - - /** - * The maximum number of inbound HTLCs towards sender - */ - public get_max_accepted_htlcs(): number { - const ret: number = bindings.OpenChannel_get_max_accepted_htlcs(this.ptr); - return ret; - } - - /** - * The maximum number of inbound HTLCs towards sender - */ - public set_max_accepted_htlcs(val: number): void { - bindings.OpenChannel_set_max_accepted_htlcs(this.ptr, val); - } - - /** - * The sender's key controlling the funding transaction - */ - public get_funding_pubkey(): Uint8Array { - const ret: number = bindings.OpenChannel_get_funding_pubkey(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; - } - - /** - * The sender's key controlling the funding transaction - */ - public set_funding_pubkey(val: Uint8Array): void { - bindings.OpenChannel_set_funding_pubkey(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); - } - - /** - * Used to derive a revocation key for transactions broadcast by counterparty - */ - public get_revocation_basepoint(): Uint8Array { - const ret: number = bindings.OpenChannel_get_revocation_basepoint(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; - } - - /** - * Used to derive a revocation key for transactions broadcast by counterparty - */ - public set_revocation_basepoint(val: Uint8Array): void { - bindings.OpenChannel_set_revocation_basepoint(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); - } - - /** - * A payment key to sender for transactions broadcast by counterparty - */ - public get_payment_point(): Uint8Array { - const ret: number = bindings.OpenChannel_get_payment_point(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; - } - - /** - * A payment key to sender for transactions broadcast by counterparty - */ - public set_payment_point(val: Uint8Array): void { - bindings.OpenChannel_set_payment_point(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); - } - - /** - * Used to derive a payment key to sender for transactions broadcast by sender - */ - public get_delayed_payment_basepoint(): Uint8Array { - const ret: number = bindings.OpenChannel_get_delayed_payment_basepoint(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; - } - - /** - * Used to derive a payment key to sender for transactions broadcast by sender - */ - public set_delayed_payment_basepoint(val: Uint8Array): void { - bindings.OpenChannel_set_delayed_payment_basepoint(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); - } - - /** - * Used to derive an HTLC payment key to sender - */ - public get_htlc_basepoint(): Uint8Array { - const ret: number = bindings.OpenChannel_get_htlc_basepoint(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; - } - - /** - * Used to derive an HTLC payment key to sender - */ - public set_htlc_basepoint(val: Uint8Array): void { - bindings.OpenChannel_set_htlc_basepoint(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); - } - - /** - * The first to-be-broadcast-by-sender transaction's per commitment point - */ - public get_first_per_commitment_point(): Uint8Array { - const ret: number = bindings.OpenChannel_get_first_per_commitment_point(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; - } - - /** - * The first to-be-broadcast-by-sender transaction's per commitment point - */ - public set_first_per_commitment_point(val: Uint8Array): void { - bindings.OpenChannel_set_first_per_commitment_point(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); - } - - /** - * The channel flags to be used - */ - public get_channel_flags(): number { - const ret: number = bindings.OpenChannel_get_channel_flags(this.ptr); - return ret; - } - - /** - * The channel flags to be used - */ - public set_channel_flags(val: number): void { - bindings.OpenChannel_set_channel_flags(this.ptr, val); - } - - /** - * A request to pre-set the to-sender output's `scriptPubkey` for when we collaboratively close - */ - public get_shutdown_scriptpubkey(): Option_CVec_u8ZZ { - const ret: bigint = bindings.OpenChannel_get_shutdown_scriptpubkey(this.ptr); - const ret_hu_conv: Option_CVec_u8ZZ = Option_CVec_u8ZZ.constr_from_ptr(ret); - CommonBase.add_ref_from(ret_hu_conv, this); - return ret_hu_conv; - } - - /** - * A request to pre-set the to-sender output's `scriptPubkey` for when we collaboratively close - */ - public set_shutdown_scriptpubkey(val: Option_CVec_u8ZZ): void { - bindings.OpenChannel_set_shutdown_scriptpubkey(this.ptr, CommonBase.get_ptr_of(val)); - CommonBase.add_ref_from(this, val); - } - - /** - * The channel type that this channel will represent - * - * If this is `None`, we derive the channel type from the intersection of our - * feature bits with our counterparty's feature bits from the [`Init`] message. - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None - */ - public get_channel_type(): ChannelTypeFeatures { - const ret: bigint = bindings.OpenChannel_get_channel_type(this.ptr); - const ret_hu_conv: ChannelTypeFeatures = new ChannelTypeFeatures(null, ret); - CommonBase.add_ref_from(ret_hu_conv, this); - return ret_hu_conv; - } - - /** - * The channel type that this channel will represent - * - * If this is `None`, we derive the channel type from the intersection of our - * feature bits with our counterparty's feature bits from the [`Init`] message. - * - * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None - */ - public set_channel_type(val: ChannelTypeFeatures|null): void { - bindings.OpenChannel_set_channel_type(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); - CommonBase.add_ref_from(this, val); - } - /** * Constructs a new OpenChannel given each field - * - * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public static constructor_new(chain_hash_arg: Uint8Array, temporary_channel_id_arg: Uint8Array, funding_satoshis_arg: bigint, push_msat_arg: bigint, dust_limit_satoshis_arg: bigint, max_htlc_value_in_flight_msat_arg: bigint, channel_reserve_satoshis_arg: bigint, htlc_minimum_msat_arg: bigint, feerate_per_kw_arg: number, to_self_delay_arg: number, max_accepted_htlcs_arg: number, funding_pubkey_arg: Uint8Array, revocation_basepoint_arg: Uint8Array, payment_point_arg: Uint8Array, delayed_payment_basepoint_arg: Uint8Array, htlc_basepoint_arg: Uint8Array, first_per_commitment_point_arg: Uint8Array, channel_flags_arg: number, shutdown_scriptpubkey_arg: Option_CVec_u8ZZ, channel_type_arg: ChannelTypeFeatures|null): OpenChannel { - const ret: bigint = bindings.OpenChannel_new(bindings.encodeUint8Array(bindings.check_arr_len(chain_hash_arg, 32)), bindings.encodeUint8Array(bindings.check_arr_len(temporary_channel_id_arg, 32)), funding_satoshis_arg, push_msat_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, feerate_per_kw_arg, to_self_delay_arg, max_accepted_htlcs_arg, bindings.encodeUint8Array(bindings.check_arr_len(funding_pubkey_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(revocation_basepoint_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(payment_point_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(delayed_payment_basepoint_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(htlc_basepoint_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(first_per_commitment_point_arg, 33)), channel_flags_arg, CommonBase.get_ptr_of(shutdown_scriptpubkey_arg), channel_type_arg == null ? 0n : CommonBase.get_ptr_of(channel_type_arg)); + public static constructor_new(common_fields_arg: CommonOpenChannelFields, push_msat_arg: bigint, channel_reserve_satoshis_arg: bigint): OpenChannel { + const ret: bigint = bindings.OpenChannel_new(CommonBase.get_ptr_of(common_fields_arg), push_msat_arg, channel_reserve_satoshis_arg); const ret_hu_conv: OpenChannel = new OpenChannel(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); - CommonBase.add_ref_from(ret_hu_conv, shutdown_scriptpubkey_arg); - CommonBase.add_ref_from(ret_hu_conv, channel_type_arg); + CommonBase.add_ref_from(ret_hu_conv, common_fields_arg); return ret_hu_conv; } @@ -980,7 +762,7 @@ export class OpenChannel extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: OpenChannel): boolean { - const ret: boolean = bindings.OpenChannel_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.OpenChannel_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/OpenChannelV2.mts b/ts/structs/OpenChannelV2.mts index 8af18022..62f8ae15 100644 --- a/ts/structs/OpenChannelV2.mts +++ b/ts/structs/OpenChannelV2.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -608,35 +673,21 @@ export class OpenChannelV2 extends CommonBase { } /** - * The genesis hash of the blockchain where the channel is to be opened + * Common fields of `open_channel(2)`-like messages */ - public get_chain_hash(): Uint8Array { - const ret: number = bindings.OpenChannelV2_get_chain_hash(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; - } - - /** - * The genesis hash of the blockchain where the channel is to be opened - */ - public set_chain_hash(val: Uint8Array): void { - bindings.OpenChannelV2_set_chain_hash(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); - } - - /** - * A temporary channel ID derived using a zeroed out value for the channel acceptor's revocation basepoint - */ - public get_temporary_channel_id(): Uint8Array { - const ret: number = bindings.OpenChannelV2_get_temporary_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public get_common_fields(): CommonOpenChannelFields { + const ret: bigint = bindings.OpenChannelV2_get_common_fields(this.ptr); + const ret_hu_conv: CommonOpenChannelFields = new CommonOpenChannelFields(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** - * A temporary channel ID derived using a zeroed out value for the channel acceptor's revocation basepoint + * Common fields of `open_channel(2)`-like messages */ - public set_temporary_channel_id(val: Uint8Array): void { - bindings.OpenChannelV2_set_temporary_channel_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + public set_common_fields(val: CommonOpenChannelFields): void { + bindings.OpenChannelV2_set_common_fields(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** @@ -654,115 +705,6 @@ export class OpenChannelV2 extends CommonBase { bindings.OpenChannelV2_set_funding_feerate_sat_per_1000_weight(this.ptr, val); } - /** - * The feerate for the commitment transaction set by the channel initiator - */ - public get_commitment_feerate_sat_per_1000_weight(): number { - const ret: number = bindings.OpenChannelV2_get_commitment_feerate_sat_per_1000_weight(this.ptr); - return ret; - } - - /** - * The feerate for the commitment transaction set by the channel initiator - */ - public set_commitment_feerate_sat_per_1000_weight(val: number): void { - bindings.OpenChannelV2_set_commitment_feerate_sat_per_1000_weight(this.ptr, val); - } - - /** - * Part of the channel value contributed by the channel initiator - */ - public get_funding_satoshis(): bigint { - const ret: bigint = bindings.OpenChannelV2_get_funding_satoshis(this.ptr); - return ret; - } - - /** - * Part of the channel value contributed by the channel initiator - */ - public set_funding_satoshis(val: bigint): void { - bindings.OpenChannelV2_set_funding_satoshis(this.ptr, val); - } - - /** - * The threshold below which outputs on transactions broadcast by the channel initiator will be - * omitted - */ - public get_dust_limit_satoshis(): bigint { - const ret: bigint = bindings.OpenChannelV2_get_dust_limit_satoshis(this.ptr); - return ret; - } - - /** - * The threshold below which outputs on transactions broadcast by the channel initiator will be - * omitted - */ - public set_dust_limit_satoshis(val: bigint): void { - bindings.OpenChannelV2_set_dust_limit_satoshis(this.ptr, val); - } - - /** - * The maximum inbound HTLC value in flight towards channel initiator, in milli-satoshi - */ - public get_max_htlc_value_in_flight_msat(): bigint { - const ret: bigint = bindings.OpenChannelV2_get_max_htlc_value_in_flight_msat(this.ptr); - return ret; - } - - /** - * The maximum inbound HTLC value in flight towards channel initiator, in milli-satoshi - */ - public set_max_htlc_value_in_flight_msat(val: bigint): void { - bindings.OpenChannelV2_set_max_htlc_value_in_flight_msat(this.ptr, val); - } - - /** - * The minimum HTLC size incoming to channel initiator, in milli-satoshi - */ - public get_htlc_minimum_msat(): bigint { - const ret: bigint = bindings.OpenChannelV2_get_htlc_minimum_msat(this.ptr); - return ret; - } - - /** - * The minimum HTLC size incoming to channel initiator, in milli-satoshi - */ - public set_htlc_minimum_msat(val: bigint): void { - bindings.OpenChannelV2_set_htlc_minimum_msat(this.ptr, val); - } - - /** - * The number of blocks which the counterparty will have to wait to claim on-chain funds if they - * broadcast a commitment transaction - */ - public get_to_self_delay(): number { - const ret: number = bindings.OpenChannelV2_get_to_self_delay(this.ptr); - return ret; - } - - /** - * The number of blocks which the counterparty will have to wait to claim on-chain funds if they - * broadcast a commitment transaction - */ - public set_to_self_delay(val: number): void { - bindings.OpenChannelV2_set_to_self_delay(this.ptr, val); - } - - /** - * The maximum number of inbound HTLCs towards channel initiator - */ - public get_max_accepted_htlcs(): number { - const ret: number = bindings.OpenChannelV2_get_max_accepted_htlcs(this.ptr); - return ret; - } - - /** - * The maximum number of inbound HTLCs towards channel initiator - */ - public set_max_accepted_htlcs(val: number): void { - bindings.OpenChannelV2_set_max_accepted_htlcs(this.ptr, val); - } - /** * The locktime for the funding transaction */ @@ -778,104 +720,6 @@ export class OpenChannelV2 extends CommonBase { bindings.OpenChannelV2_set_locktime(this.ptr, val); } - /** - * The channel initiator's key controlling the funding transaction - */ - public get_funding_pubkey(): Uint8Array { - const ret: number = bindings.OpenChannelV2_get_funding_pubkey(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; - } - - /** - * The channel initiator's key controlling the funding transaction - */ - public set_funding_pubkey(val: Uint8Array): void { - bindings.OpenChannelV2_set_funding_pubkey(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); - } - - /** - * Used to derive a revocation key for transactions broadcast by counterparty - */ - public get_revocation_basepoint(): Uint8Array { - const ret: number = bindings.OpenChannelV2_get_revocation_basepoint(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; - } - - /** - * Used to derive a revocation key for transactions broadcast by counterparty - */ - public set_revocation_basepoint(val: Uint8Array): void { - bindings.OpenChannelV2_set_revocation_basepoint(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); - } - - /** - * A payment key to channel initiator for transactions broadcast by counterparty - */ - public get_payment_basepoint(): Uint8Array { - const ret: number = bindings.OpenChannelV2_get_payment_basepoint(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; - } - - /** - * A payment key to channel initiator for transactions broadcast by counterparty - */ - public set_payment_basepoint(val: Uint8Array): void { - bindings.OpenChannelV2_set_payment_basepoint(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); - } - - /** - * Used to derive a payment key to channel initiator for transactions broadcast by channel - * initiator - */ - public get_delayed_payment_basepoint(): Uint8Array { - const ret: number = bindings.OpenChannelV2_get_delayed_payment_basepoint(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; - } - - /** - * Used to derive a payment key to channel initiator for transactions broadcast by channel - * initiator - */ - public set_delayed_payment_basepoint(val: Uint8Array): void { - bindings.OpenChannelV2_set_delayed_payment_basepoint(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); - } - - /** - * Used to derive an HTLC payment key to channel initiator - */ - public get_htlc_basepoint(): Uint8Array { - const ret: number = bindings.OpenChannelV2_get_htlc_basepoint(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; - } - - /** - * Used to derive an HTLC payment key to channel initiator - */ - public set_htlc_basepoint(val: Uint8Array): void { - bindings.OpenChannelV2_set_htlc_basepoint(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); - } - - /** - * The first to-be-broadcast-by-channel-initiator transaction's per commitment point - */ - public get_first_per_commitment_point(): Uint8Array { - const ret: number = bindings.OpenChannelV2_get_first_per_commitment_point(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; - } - - /** - * The first to-be-broadcast-by-channel-initiator transaction's per commitment point - */ - public set_first_per_commitment_point(val: Uint8Array): void { - bindings.OpenChannelV2_set_first_per_commitment_point(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); - } - /** * The second to-be-broadcast-by-channel-initiator transaction's per commitment point */ @@ -892,67 +736,6 @@ export class OpenChannelV2 extends CommonBase { bindings.OpenChannelV2_set_second_per_commitment_point(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); } - /** - * Channel flags - */ - public get_channel_flags(): number { - const ret: number = bindings.OpenChannelV2_get_channel_flags(this.ptr); - return ret; - } - - /** - * Channel flags - */ - public set_channel_flags(val: number): void { - bindings.OpenChannelV2_set_channel_flags(this.ptr, val); - } - - /** - * Optionally, a request to pre-set the to-channel-initiator output's scriptPubkey for when we - * collaboratively close - */ - public get_shutdown_scriptpubkey(): Option_CVec_u8ZZ { - const ret: bigint = bindings.OpenChannelV2_get_shutdown_scriptpubkey(this.ptr); - const ret_hu_conv: Option_CVec_u8ZZ = Option_CVec_u8ZZ.constr_from_ptr(ret); - CommonBase.add_ref_from(ret_hu_conv, this); - return ret_hu_conv; - } - - /** - * Optionally, a request to pre-set the to-channel-initiator output's scriptPubkey for when we - * collaboratively close - */ - public set_shutdown_scriptpubkey(val: Option_CVec_u8ZZ): void { - bindings.OpenChannelV2_set_shutdown_scriptpubkey(this.ptr, CommonBase.get_ptr_of(val)); - CommonBase.add_ref_from(this, val); - } - - /** - * The channel type that this channel will represent. If none is set, we derive the channel - * type from the intersection of our feature bits with our counterparty's feature bits from - * the Init message. - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None - */ - public get_channel_type(): ChannelTypeFeatures { - const ret: bigint = bindings.OpenChannelV2_get_channel_type(this.ptr); - const ret_hu_conv: ChannelTypeFeatures = new ChannelTypeFeatures(null, ret); - CommonBase.add_ref_from(ret_hu_conv, this); - return ret_hu_conv; - } - - /** - * The channel type that this channel will represent. If none is set, we derive the channel - * type from the intersection of our feature bits with our counterparty's feature bits from - * the Init message. - * - * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None - */ - public set_channel_type(val: ChannelTypeFeatures|null): void { - bindings.OpenChannelV2_set_channel_type(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); - CommonBase.add_ref_from(this, val); - } - /** * Optionally, a requirement that only confirmed inputs can be added */ @@ -970,15 +753,12 @@ export class OpenChannelV2 extends CommonBase { /** * Constructs a new OpenChannelV2 given each field - * - * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public static constructor_new(chain_hash_arg: Uint8Array, temporary_channel_id_arg: Uint8Array, funding_feerate_sat_per_1000_weight_arg: number, commitment_feerate_sat_per_1000_weight_arg: number, funding_satoshis_arg: bigint, dust_limit_satoshis_arg: bigint, max_htlc_value_in_flight_msat_arg: bigint, htlc_minimum_msat_arg: bigint, to_self_delay_arg: number, max_accepted_htlcs_arg: number, locktime_arg: number, funding_pubkey_arg: Uint8Array, revocation_basepoint_arg: Uint8Array, payment_basepoint_arg: Uint8Array, delayed_payment_basepoint_arg: Uint8Array, htlc_basepoint_arg: Uint8Array, first_per_commitment_point_arg: Uint8Array, second_per_commitment_point_arg: Uint8Array, channel_flags_arg: number, shutdown_scriptpubkey_arg: Option_CVec_u8ZZ, channel_type_arg: ChannelTypeFeatures|null, require_confirmed_inputs_arg: COption_NoneZ): OpenChannelV2 { - const ret: bigint = bindings.OpenChannelV2_new(bindings.encodeUint8Array(bindings.check_arr_len(chain_hash_arg, 32)), bindings.encodeUint8Array(bindings.check_arr_len(temporary_channel_id_arg, 32)), funding_feerate_sat_per_1000_weight_arg, commitment_feerate_sat_per_1000_weight_arg, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, to_self_delay_arg, max_accepted_htlcs_arg, locktime_arg, bindings.encodeUint8Array(bindings.check_arr_len(funding_pubkey_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(revocation_basepoint_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(payment_basepoint_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(delayed_payment_basepoint_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(htlc_basepoint_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(first_per_commitment_point_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(second_per_commitment_point_arg, 33)), channel_flags_arg, CommonBase.get_ptr_of(shutdown_scriptpubkey_arg), channel_type_arg == null ? 0n : CommonBase.get_ptr_of(channel_type_arg), require_confirmed_inputs_arg); + public static constructor_new(common_fields_arg: CommonOpenChannelFields, funding_feerate_sat_per_1000_weight_arg: number, locktime_arg: number, second_per_commitment_point_arg: Uint8Array, require_confirmed_inputs_arg: COption_NoneZ): OpenChannelV2 { + const ret: bigint = bindings.OpenChannelV2_new(CommonBase.get_ptr_of(common_fields_arg), funding_feerate_sat_per_1000_weight_arg, locktime_arg, bindings.encodeUint8Array(bindings.check_arr_len(second_per_commitment_point_arg, 33)), require_confirmed_inputs_arg); const ret_hu_conv: OpenChannelV2 = new OpenChannelV2(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); - CommonBase.add_ref_from(ret_hu_conv, shutdown_scriptpubkey_arg); - CommonBase.add_ref_from(ret_hu_conv, channel_type_arg); + CommonBase.add_ref_from(ret_hu_conv, common_fields_arg); return ret_hu_conv; } @@ -1011,7 +791,7 @@ export class OpenChannelV2 extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: OpenChannelV2): boolean { - const ret: boolean = bindings.OpenChannelV2_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.OpenChannelV2_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/Option_APIErrorZ.mts b/ts/structs/Option_APIErrorZ.mts index e988ae3f..39720cee 100644 --- a/ts/structs/Option_APIErrorZ.mts +++ b/ts/structs/Option_APIErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Option_AmountZ.mts b/ts/structs/Option_AmountZ.mts new file mode 100644 index 00000000..a8126292 --- /dev/null +++ b/ts/structs/Option_AmountZ.mts @@ -0,0 +1,735 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + +/** + * An enum which can either contain a crate::lightning::offers::offer::Amount or not + */ +export class Option_AmountZ extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_AmountZ_free); } + /* @internal */ + public static constr_from_ptr(ptr: bigint): Option_AmountZ { + const raw_ty: number = bindings.LDKCOption_AmountZ_ty_from_ptr(ptr); + switch (raw_ty) { + case 0: return new Option_AmountZ_Some(ptr); + case 1: return new Option_AmountZ_None(ptr); + default: + throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface + } + } + + /** + * Constructs a new COption_AmountZ containing a crate::lightning::offers::offer::Amount + */ + public static constructor_some(o: Amount): Option_AmountZ { + const ret: bigint = bindings.COption_AmountZ_some(CommonBase.get_ptr_of(o)); + const ret_hu_conv: Option_AmountZ = Option_AmountZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, o); + return ret_hu_conv; + } + + /** + * Constructs a new COption_AmountZ containing nothing + */ + public static constructor_none(): Option_AmountZ { + const ret: bigint = bindings.COption_AmountZ_none(); + const ret_hu_conv: Option_AmountZ = Option_AmountZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + return ret_hu_conv; + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.COption_AmountZ_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a new COption_AmountZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public clone(): Option_AmountZ { + const ret: bigint = bindings.COption_AmountZ_clone(this.ptr); + const ret_hu_conv: Option_AmountZ = Option_AmountZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + +} +/** A Option_AmountZ of type Some */ +export class Option_AmountZ_Some extends Option_AmountZ { + public some: Amount; + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + const some: bigint = bindings.LDKCOption_AmountZ_Some_get_some(ptr); + const some_hu_conv: Amount = Amount.constr_from_ptr(some); + CommonBase.add_ref_from(some_hu_conv, this); + this.some = some_hu_conv; + } +} +/** A Option_AmountZ of type None */ +export class Option_AmountZ_None extends Option_AmountZ { + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + } +} diff --git a/ts/structs/Option_BigEndianScalarZ.mts b/ts/structs/Option_BigEndianScalarZ.mts index d363e3b5..6f83a961 100644 --- a/ts/structs/Option_BigEndianScalarZ.mts +++ b/ts/structs/Option_BigEndianScalarZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescrip import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -614,11 +679,10 @@ export class Option_BigEndianScalarZ extends CommonBase { /** * Constructs a new COption_BigEndianScalarZ containing a crate::c_types::BigEndianScalar */ - public static constructor_some(o_big_endian_bytes: Uint8Array): Option_BigEndianScalarZ { - const ret: bigint = bindings.COption_BigEndianScalarZ_some(bindings.BigEndianScalar_new(bindings.encodeUint8Array(bindings.check_arr_len(o_big_endian_bytes, 32)))); + public static constructor_some(o: BigEndianScalar): Option_BigEndianScalarZ { + const ret: bigint = bindings.COption_BigEndianScalarZ_some(CommonBase.get_ptr_of(o)); const ret_hu_conv: Option_BigEndianScalarZ = Option_BigEndianScalarZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); - ; return ret_hu_conv; } diff --git a/ts/structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mts b/ts/structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mts index 7e90687b..0feaef9a 100644 --- a/ts/structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mts +++ b/ts/structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -615,7 +680,7 @@ export class Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ extends CommonBase { * Constructs a new COption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ containing a crate::c_types::derived::C2Tuple__u1632_u1632Z */ public static constructor_some(o: TwoTuple__u1632_u1632Z): Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ { - const ret: bigint = bindings.COption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ_some(o != null ? CommonBase.get_ptr_of(o) : 0n); + const ret: bigint = bindings.COption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ_some(CommonBase.get_ptr_of(o)); const ret_hu_conv: Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ = Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); return ret_hu_conv; diff --git a/ts/structs/Option_C2Tuple_u64u16ZZ.mts b/ts/structs/Option_C2Tuple_u64u16ZZ.mts index e0a1d5cf..dc7027e4 100644 --- a/ts/structs/Option_C2Tuple_u64u16ZZ.mts +++ b/ts/structs/Option_C2Tuple_u64u16ZZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,9 +250,14 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -615,7 +680,7 @@ export class Option_C2Tuple_u64u16ZZ extends CommonBase { * Constructs a new COption_C2Tuple_u64u16ZZ containing a crate::c_types::derived::C2Tuple_u64u16Z */ public static constructor_some(o: TwoTuple_u64u16Z): Option_C2Tuple_u64u16ZZ { - const ret: bigint = bindings.COption_C2Tuple_u64u16ZZ_some(o != null ? CommonBase.get_ptr_of(o) : 0n); + const ret: bigint = bindings.COption_C2Tuple_u64u16ZZ_some(CommonBase.get_ptr_of(o)); const ret_hu_conv: Option_C2Tuple_u64u16ZZ = Option_C2Tuple_u64u16ZZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); return ret_hu_conv; diff --git a/ts/structs/Option_C2Tuple_u64u64ZZ.mts b/ts/structs/Option_C2Tuple_u64u64ZZ.mts index 6e6f041d..4f86b401 100644 --- a/ts/structs/Option_C2Tuple_u64u64ZZ.mts +++ b/ts/structs/Option_C2Tuple_u64u64ZZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -615,7 +680,7 @@ export class Option_C2Tuple_u64u64ZZ extends CommonBase { * Constructs a new COption_C2Tuple_u64u64ZZ containing a crate::c_types::derived::C2Tuple_u64u64Z */ public static constructor_some(o: TwoTuple_u64u64Z): Option_C2Tuple_u64u64ZZ { - const ret: bigint = bindings.COption_C2Tuple_u64u64ZZ_some(o != null ? CommonBase.get_ptr_of(o) : 0n); + const ret: bigint = bindings.COption_C2Tuple_u64u64ZZ_some(CommonBase.get_ptr_of(o)); const ret_hu_conv: Option_C2Tuple_u64u64ZZ = Option_C2Tuple_u64u64ZZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); return ret_hu_conv; diff --git a/ts/structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mts b/ts/structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mts index b954ebe7..13ce1066 100644 --- a/ts/structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mts +++ b/ts/structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -615,7 +680,7 @@ export class Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ exte * Constructs a new COption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ containing a crate::c_types::derived::C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ */ public static constructor_some(o: ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ): Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ { - const ret: bigint = bindings.COption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_some(o != null ? CommonBase.get_ptr_of(o) : 0n); + const ret: bigint = bindings.COption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_some(CommonBase.get_ptr_of(o)); const ret_hu_conv: Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ = Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); return ret_hu_conv; diff --git a/ts/structs/Option_CVec_SocketAddressZZ.mts b/ts/structs/Option_CVec_SocketAddressZZ.mts index b4c65c42..5b4104f4 100644 --- a/ts/structs/Option_CVec_SocketAddressZZ.mts +++ b/ts/structs/Option_CVec_SocketAddressZZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeE import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Option_CVec_ThirtyTwoBytesZZ.mts b/ts/structs/Option_CVec_ThirtyTwoBytesZZ.mts index c7d17c48..1de62fae 100644 --- a/ts/structs/Option_CVec_ThirtyTwoBytesZZ.mts +++ b/ts/structs/Option_CVec_ThirtyTwoBytesZZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,6 +45,15 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Option_CVec_u8ZZ.mts b/ts/structs/Option_CVec_u8ZZ.mts index 10747abf..c41d1db5 100644 --- a/ts/structs/Option_CVec_u8ZZ.mts +++ b/ts/structs/Option_CVec_u8ZZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -39,7 +44,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Option_ChannelShutdownStateZ.mts b/ts/structs/Option_ChannelShutdownStateZ.mts index c16455e4..0143b7f4 100644 --- a/ts/structs/Option_ChannelShutdownStateZ.mts +++ b/ts/structs/Option_ChannelShutdownStateZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,9 +250,14 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Option_ClosureReasonZ.mts b/ts/structs/Option_ClosureReasonZ.mts index 2221f1cf..55ac637f 100644 --- a/ts/structs/Option_ClosureReasonZ.mts +++ b/ts/structs/Option_ClosureReasonZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Option_ECDSASignatureZ.mts b/ts/structs/Option_ECDSASignatureZ.mts new file mode 100644 index 00000000..17393e21 --- /dev/null +++ b/ts/structs/Option_ECDSASignatureZ.mts @@ -0,0 +1,733 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + +/** + * An enum which can either contain a crate::c_types::ECDSASignature or not + */ +export class Option_ECDSASignatureZ extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_ECDSASignatureZ_free); } + /* @internal */ + public static constr_from_ptr(ptr: bigint): Option_ECDSASignatureZ { + const raw_ty: number = bindings.LDKCOption_ECDSASignatureZ_ty_from_ptr(ptr); + switch (raw_ty) { + case 0: return new Option_ECDSASignatureZ_Some(ptr); + case 1: return new Option_ECDSASignatureZ_None(ptr); + default: + throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface + } + } + + /** + * Constructs a new COption_ECDSASignatureZ containing a crate::c_types::ECDSASignature + */ + public static constructor_some(o: Uint8Array): Option_ECDSASignatureZ { + const ret: bigint = bindings.COption_ECDSASignatureZ_some(bindings.encodeUint8Array(bindings.check_arr_len(o, 64))); + const ret_hu_conv: Option_ECDSASignatureZ = Option_ECDSASignatureZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + return ret_hu_conv; + } + + /** + * Constructs a new COption_ECDSASignatureZ containing nothing + */ + public static constructor_none(): Option_ECDSASignatureZ { + const ret: bigint = bindings.COption_ECDSASignatureZ_none(); + const ret_hu_conv: Option_ECDSASignatureZ = Option_ECDSASignatureZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + return ret_hu_conv; + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.COption_ECDSASignatureZ_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a new COption_ECDSASignatureZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public clone(): Option_ECDSASignatureZ { + const ret: bigint = bindings.COption_ECDSASignatureZ_clone(this.ptr); + const ret_hu_conv: Option_ECDSASignatureZ = Option_ECDSASignatureZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + +} +/** A Option_ECDSASignatureZ of type Some */ +export class Option_ECDSASignatureZ_Some extends Option_ECDSASignatureZ { + public some: Uint8Array; + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + const some: number = bindings.LDKCOption_ECDSASignatureZ_Some_get_some(ptr); + const some_conv: Uint8Array = bindings.decodeUint8Array(some); + this.some = some_conv; + } +} +/** A Option_ECDSASignatureZ of type None */ +export class Option_ECDSASignatureZ_None extends Option_ECDSASignatureZ { + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + } +} diff --git a/ts/structs/Option_EventZ.mts b/ts/structs/Option_EventZ.mts index bf4c01f1..2f69a9da 100644 --- a/ts/structs/Option_EventZ.mts +++ b/ts/structs/Option_EventZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Option_FilterZ.mts b/ts/structs/Option_FilterZ.mts index 2205967b..11d2b6df 100644 --- a/ts/structs/Option_FilterZ.mts +++ b/ts/structs/Option_FilterZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,19 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,13 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Option_HTLCClaimZ.mts b/ts/structs/Option_HTLCClaimZ.mts index c49f5d47..d4d61be0 100644 --- a/ts/structs/Option_HTLCClaimZ.mts +++ b/ts/structs/Option_HTLCClaimZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Option_HTLCDestinationZ.mts b/ts/structs/Option_HTLCDestinationZ.mts index b828d5df..deaa4b11 100644 --- a/ts/structs/Option_HTLCDestinationZ.mts +++ b/ts/structs/Option_HTLCDestinationZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Option_MaxDustHTLCExposureZ.mts b/ts/structs/Option_MaxDustHTLCExposureZ.mts index 14bf2a12..eeeb2fb8 100644 --- a/ts/structs/Option_MaxDustHTLCExposureZ.mts +++ b/ts/structs/Option_MaxDustHTLCExposureZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Option_MonitorEventZ.mts b/ts/structs/Option_MonitorEventZ.mts index a90da600..69531897 100644 --- a/ts/structs/Option_MonitorEventZ.mts +++ b/ts/structs/Option_MonitorEventZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Option_NetworkUpdateZ.mts b/ts/structs/Option_NetworkUpdateZ.mts index 99215211..e0da3a5a 100644 --- a/ts/structs/Option_NetworkUpdateZ.mts +++ b/ts/structs/Option_NetworkUpdateZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Option_OffersMessageZ.mts b/ts/structs/Option_OffersMessageZ.mts index a95293f5..609604c6 100644 --- a/ts/structs/Option_OffersMessageZ.mts +++ b/ts/structs/Option_OffersMessageZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Destination } from '../structs/Destination.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Option_OnionMessageContentsZ.mts b/ts/structs/Option_OnionMessageContentsZ.mts index 08f9a5c9..f0d7a390 100644 --- a/ts/structs/Option_OnionMessageContentsZ.mts +++ b/ts/structs/Option_OnionMessageContentsZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Option_PathFailureZ.mts b/ts/structs/Option_PathFailureZ.mts index fde33e1b..ede26310 100644 --- a/ts/structs/Option_PathFailureZ.mts +++ b/ts/structs/Option_PathFailureZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; import { PathFailure } from '../structs/PathFailure.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Option_PaymentContextZ.mts b/ts/structs/Option_PaymentContextZ.mts new file mode 100644 index 00000000..64c9690c --- /dev/null +++ b/ts/structs/Option_PaymentContextZ.mts @@ -0,0 +1,735 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + +/** + * An enum which can either contain a crate::lightning::blinded_path::payment::PaymentContext or not + */ +export class Option_PaymentContextZ extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_PaymentContextZ_free); } + /* @internal */ + public static constr_from_ptr(ptr: bigint): Option_PaymentContextZ { + const raw_ty: number = bindings.LDKCOption_PaymentContextZ_ty_from_ptr(ptr); + switch (raw_ty) { + case 0: return new Option_PaymentContextZ_Some(ptr); + case 1: return new Option_PaymentContextZ_None(ptr); + default: + throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface + } + } + + /** + * Constructs a new COption_PaymentContextZ containing a crate::lightning::blinded_path::payment::PaymentContext + */ + public static constructor_some(o: PaymentContext): Option_PaymentContextZ { + const ret: bigint = bindings.COption_PaymentContextZ_some(CommonBase.get_ptr_of(o)); + const ret_hu_conv: Option_PaymentContextZ = Option_PaymentContextZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, o); + return ret_hu_conv; + } + + /** + * Constructs a new COption_PaymentContextZ containing nothing + */ + public static constructor_none(): Option_PaymentContextZ { + const ret: bigint = bindings.COption_PaymentContextZ_none(); + const ret_hu_conv: Option_PaymentContextZ = Option_PaymentContextZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + return ret_hu_conv; + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.COption_PaymentContextZ_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a new COption_PaymentContextZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public clone(): Option_PaymentContextZ { + const ret: bigint = bindings.COption_PaymentContextZ_clone(this.ptr); + const ret_hu_conv: Option_PaymentContextZ = Option_PaymentContextZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + +} +/** A Option_PaymentContextZ of type Some */ +export class Option_PaymentContextZ_Some extends Option_PaymentContextZ { + public some: PaymentContext; + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + const some: bigint = bindings.LDKCOption_PaymentContextZ_Some_get_some(ptr); + const some_hu_conv: PaymentContext = PaymentContext.constr_from_ptr(some); + CommonBase.add_ref_from(some_hu_conv, this); + this.some = some_hu_conv; + } +} +/** A Option_PaymentContextZ of type None */ +export class Option_PaymentContextZ_None extends Option_PaymentContextZ { + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + } +} diff --git a/ts/structs/Option_PaymentFailureReasonZ.mts b/ts/structs/Option_PaymentFailureReasonZ.mts index db293228..1b566331 100644 --- a/ts/structs/Option_PaymentFailureReasonZ.mts +++ b/ts/structs/Option_PaymentFailureReasonZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Option_QuantityZ.mts b/ts/structs/Option_QuantityZ.mts new file mode 100644 index 00000000..ca49687a --- /dev/null +++ b/ts/structs/Option_QuantityZ.mts @@ -0,0 +1,735 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + +/** + * An enum which can either contain a crate::lightning::offers::offer::Quantity or not + */ +export class Option_QuantityZ extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_QuantityZ_free); } + /* @internal */ + public static constr_from_ptr(ptr: bigint): Option_QuantityZ { + const raw_ty: number = bindings.LDKCOption_QuantityZ_ty_from_ptr(ptr); + switch (raw_ty) { + case 0: return new Option_QuantityZ_Some(ptr); + case 1: return new Option_QuantityZ_None(ptr); + default: + throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface + } + } + + /** + * Constructs a new COption_QuantityZ containing a crate::lightning::offers::offer::Quantity + */ + public static constructor_some(o: Quantity): Option_QuantityZ { + const ret: bigint = bindings.COption_QuantityZ_some(CommonBase.get_ptr_of(o)); + const ret_hu_conv: Option_QuantityZ = Option_QuantityZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, o); + return ret_hu_conv; + } + + /** + * Constructs a new COption_QuantityZ containing nothing + */ + public static constructor_none(): Option_QuantityZ { + const ret: bigint = bindings.COption_QuantityZ_none(); + const ret_hu_conv: Option_QuantityZ = Option_QuantityZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + return ret_hu_conv; + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.COption_QuantityZ_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a new COption_QuantityZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public clone(): Option_QuantityZ { + const ret: bigint = bindings.COption_QuantityZ_clone(this.ptr); + const ret_hu_conv: Option_QuantityZ = Option_QuantityZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + +} +/** A Option_QuantityZ of type Some */ +export class Option_QuantityZ_Some extends Option_QuantityZ { + public some: Quantity; + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + const some: bigint = bindings.LDKCOption_QuantityZ_Some_get_some(ptr); + const some_hu_conv: Quantity = Quantity.constr_from_ptr(some); + CommonBase.add_ref_from(some_hu_conv, this); + this.some = some_hu_conv; + } +} +/** A Option_QuantityZ of type None */ +export class Option_QuantityZ_None extends Option_QuantityZ { + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + } +} diff --git a/ts/structs/Option_SecretKeyZ.mts b/ts/structs/Option_SecretKeyZ.mts index c0c950da..17f15a2f 100644 --- a/ts/structs/Option_SecretKeyZ.mts +++ b/ts/structs/Option_SecretKeyZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,8 +356,17 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Option_SocketAddressZ.mts b/ts/structs/Option_SocketAddressZ.mts index 65688ace..eedf22af 100644 --- a/ts/structs/Option_SocketAddressZ.mts +++ b/ts/structs/Option_SocketAddressZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Res import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Option_StrZ.mts b/ts/structs/Option_StrZ.mts index b3f03fed..a41ecf3f 100644 --- a/ts/structs/Option_StrZ.mts +++ b/ts/structs/Option_StrZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,11 +269,12 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Option_ThirtyTwoBytesZ.mts b/ts/structs/Option_ThirtyTwoBytesZ.mts index 6056dfd3..093345e9 100644 --- a/ts/structs/Option_ThirtyTwoBytesZ.mts +++ b/ts/structs/Option_ThirtyTwoBytesZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -39,7 +44,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Option_TxOutZ.mts b/ts/structs/Option_TxOutZ.mts index 239a25fd..05fd68b1 100644 --- a/ts/structs/Option_TxOutZ.mts +++ b/ts/structs/Option_TxOutZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Option_TypeZ.mts b/ts/structs/Option_TypeZ.mts index a4e4bd13..dd726d34 100644 --- a/ts/structs/Option_TypeZ.mts +++ b/ts/structs/Option_TypeZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Res import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Option_U128Z.mts b/ts/structs/Option_U128Z.mts index ddb34c5c..a9b03477 100644 --- a/ts/structs/Option_U128Z.mts +++ b/ts/structs/Option_U128Z.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Option_UtxoLookupZ.mts b/ts/structs/Option_UtxoLookupZ.mts index a7fe968a..100af05f 100644 --- a/ts/structs/Option_UtxoLookupZ.mts +++ b/ts/structs/Option_UtxoLookupZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Option_boolZ.mts b/ts/structs/Option_boolZ.mts index 386c3ab7..ad8bb593 100644 --- a/ts/structs/Option_boolZ.mts +++ b/ts/structs/Option_boolZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_u16Z } from '../structs/Option_u16Z.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Option_f64Z.mts b/ts/structs/Option_f64Z.mts index a20235cd..e548e72c 100644 --- a/ts/structs/Option_f64Z.mts +++ b/ts/structs/Option_f64Z.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Option_i64Z.mts b/ts/structs/Option_i64Z.mts index e360926e..deb0ae3d 100644 --- a/ts/structs/Option_i64Z.mts +++ b/ts/structs/Option_i64Z.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Option_u16Z.mts b/ts/structs/Option_u16Z.mts index 46dfad6a..c19623ef 100644 --- a/ts/structs/Option_u16Z.mts +++ b/ts/structs/Option_u16Z.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Option_u32Z.mts b/ts/structs/Option_u32Z.mts index 1d527d91..9f91bbe5 100644 --- a/ts/structs/Option_u32Z.mts +++ b/ts/structs/Option_u32Z.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Option_u64Z.mts b/ts/structs/Option_u64Z.mts index f0487197..6e95e341 100644 --- a/ts/structs/Option_u64Z.mts +++ b/ts/structs/Option_u64Z.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,12 +20,16 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; -import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -39,7 +44,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Option_usizeZ.mts b/ts/structs/Option_usizeZ.mts index ff8edcfb..089c6a1a 100644 --- a/ts/structs/Option_usizeZ.mts +++ b/ts/structs/Option_usizeZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/OutPoint.mts b/ts/structs/OutPoint.mts index 90049f3d..c69216ed 100644 --- a/ts/structs/OutPoint.mts +++ b/ts/structs/OutPoint.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -670,7 +735,7 @@ export class OutPoint extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: OutPoint): boolean { - const ret: boolean = bindings.OutPoint_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.OutPoint_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } @@ -683,15 +748,6 @@ export class OutPoint extends CommonBase { return ret; } - /** - * Convert an `OutPoint` to a lightning channel id. - */ - public to_channel_id(): Uint8Array { - const ret: number = bindings.OutPoint_to_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; - } - /** * Serialize the OutPoint object into a byte array which can be read by OutPoint_read */ diff --git a/ts/structs/OutputSpendStatus.mts b/ts/structs/OutputSpendStatus.mts new file mode 100644 index 00000000..555a7e16 --- /dev/null +++ b/ts/structs/OutputSpendStatus.mts @@ -0,0 +1,832 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + +/** + * The current status of the output spend. + */ +export class OutputSpendStatus extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.OutputSpendStatus_free); } + /* @internal */ + public static constr_from_ptr(ptr: bigint): OutputSpendStatus { + const raw_ty: number = bindings.LDKOutputSpendStatus_ty_from_ptr(ptr); + switch (raw_ty) { + case 0: return new OutputSpendStatus_PendingInitialBroadcast(ptr); + case 1: return new OutputSpendStatus_PendingFirstConfirmation(ptr); + case 2: return new OutputSpendStatus_PendingThresholdConfirmations(ptr); + default: + throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface + } + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.OutputSpendStatus_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a copy of the OutputSpendStatus + */ + public clone(): OutputSpendStatus { + const ret: bigint = bindings.OutputSpendStatus_clone(this.ptr); + const ret_hu_conv: OutputSpendStatus = OutputSpendStatus.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * Utility method to constructs a new PendingInitialBroadcast-variant OutputSpendStatus + */ + public static constructor_pending_initial_broadcast(delayed_until_height: Option_u32Z): OutputSpendStatus { + const ret: bigint = bindings.OutputSpendStatus_pending_initial_broadcast(CommonBase.get_ptr_of(delayed_until_height)); + const ret_hu_conv: OutputSpendStatus = OutputSpendStatus.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, delayed_until_height); + return ret_hu_conv; + } + + /** + * Utility method to constructs a new PendingFirstConfirmation-variant OutputSpendStatus + */ + public static constructor_pending_first_confirmation(first_broadcast_hash: Uint8Array, latest_broadcast_height: number, latest_spending_tx: Uint8Array): OutputSpendStatus { + const ret: bigint = bindings.OutputSpendStatus_pending_first_confirmation(bindings.encodeUint8Array(bindings.check_arr_len(first_broadcast_hash, 32)), latest_broadcast_height, bindings.encodeUint8Array(latest_spending_tx)); + const ret_hu_conv: OutputSpendStatus = OutputSpendStatus.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + return ret_hu_conv; + } + + /** + * Utility method to constructs a new PendingThresholdConfirmations-variant OutputSpendStatus + */ + public static constructor_pending_threshold_confirmations(first_broadcast_hash: Uint8Array, latest_broadcast_height: number, latest_spending_tx: Uint8Array, confirmation_height: number, confirmation_hash: Uint8Array): OutputSpendStatus { + const ret: bigint = bindings.OutputSpendStatus_pending_threshold_confirmations(bindings.encodeUint8Array(bindings.check_arr_len(first_broadcast_hash, 32)), latest_broadcast_height, bindings.encodeUint8Array(latest_spending_tx), confirmation_height, bindings.encodeUint8Array(bindings.check_arr_len(confirmation_hash, 32))); + const ret_hu_conv: OutputSpendStatus = OutputSpendStatus.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + return ret_hu_conv; + } + + /** + * Checks if two OutputSpendStatuss contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + */ + public eq(b: OutputSpendStatus): boolean { + const ret: boolean = bindings.OutputSpendStatus_eq(this.ptr, CommonBase.get_ptr_of(b)); + return ret; + } + + /** + * Serialize the OutputSpendStatus object into a byte array which can be read by OutputSpendStatus_read + */ + public write(): Uint8Array { + const ret: number = bindings.OutputSpendStatus_write(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Read a OutputSpendStatus from a byte array, created by OutputSpendStatus_write + */ + public static constructor_read(ser: Uint8Array): Result_OutputSpendStatusDecodeErrorZ { + const ret: bigint = bindings.OutputSpendStatus_read(bindings.encodeUint8Array(ser)); + const ret_hu_conv: Result_OutputSpendStatusDecodeErrorZ = Result_OutputSpendStatusDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +/** A OutputSpendStatus of type PendingInitialBroadcast */ +export class OutputSpendStatus_PendingInitialBroadcast extends OutputSpendStatus { + /** + * The height at which we will first generate and broadcast a spending transaction. + */ + public delayed_until_height: Option_u32Z; + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + const delayed_until_height: bigint = bindings.LDKOutputSpendStatus_PendingInitialBroadcast_get_delayed_until_height(ptr); + const delayed_until_height_hu_conv: Option_u32Z = Option_u32Z.constr_from_ptr(delayed_until_height); + CommonBase.add_ref_from(delayed_until_height_hu_conv, this); + this.delayed_until_height = delayed_until_height_hu_conv; + } +} +/** A OutputSpendStatus of type PendingFirstConfirmation */ +export class OutputSpendStatus_PendingFirstConfirmation extends OutputSpendStatus { + /** + * The hash of the chain tip when we first broadcast a transaction spending this output. + */ + public first_broadcast_hash: Uint8Array; + /** + * The best height when we last broadcast a transaction spending this output. + */ + public latest_broadcast_height: number; + /** + * The transaction spending this output we last broadcasted. + */ + public latest_spending_tx: Uint8Array; + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + const first_broadcast_hash: number = bindings.LDKOutputSpendStatus_PendingFirstConfirmation_get_first_broadcast_hash(ptr); + const first_broadcast_hash_conv: Uint8Array = bindings.decodeUint8Array(first_broadcast_hash); + this.first_broadcast_hash = first_broadcast_hash_conv; + this.latest_broadcast_height = bindings.LDKOutputSpendStatus_PendingFirstConfirmation_get_latest_broadcast_height(ptr); + const latest_spending_tx: number = bindings.LDKOutputSpendStatus_PendingFirstConfirmation_get_latest_spending_tx(ptr); + const latest_spending_tx_conv: Uint8Array = bindings.decodeUint8Array(latest_spending_tx); + this.latest_spending_tx = latest_spending_tx_conv; + } +} +/** A OutputSpendStatus of type PendingThresholdConfirmations */ +export class OutputSpendStatus_PendingThresholdConfirmations extends OutputSpendStatus { + /** + * The hash of the chain tip when we first broadcast a transaction spending this output. + */ + public first_broadcast_hash: Uint8Array; + /** + * The best height when we last broadcast a transaction spending this output. + */ + public latest_broadcast_height: number; + /** + * The transaction spending this output we saw confirmed on-chain. + */ + public latest_spending_tx: Uint8Array; + /** + * The height at which the spending transaction was confirmed. + */ + public confirmation_height: number; + /** + * The hash of the block in which the spending transaction was confirmed. + */ + public confirmation_hash: Uint8Array; + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + const first_broadcast_hash: number = bindings.LDKOutputSpendStatus_PendingThresholdConfirmations_get_first_broadcast_hash(ptr); + const first_broadcast_hash_conv: Uint8Array = bindings.decodeUint8Array(first_broadcast_hash); + this.first_broadcast_hash = first_broadcast_hash_conv; + this.latest_broadcast_height = bindings.LDKOutputSpendStatus_PendingThresholdConfirmations_get_latest_broadcast_height(ptr); + const latest_spending_tx: number = bindings.LDKOutputSpendStatus_PendingThresholdConfirmations_get_latest_spending_tx(ptr); + const latest_spending_tx_conv: Uint8Array = bindings.decodeUint8Array(latest_spending_tx); + this.latest_spending_tx = latest_spending_tx_conv; + this.confirmation_height = bindings.LDKOutputSpendStatus_PendingThresholdConfirmations_get_confirmation_height(ptr); + const confirmation_hash: number = bindings.LDKOutputSpendStatus_PendingThresholdConfirmations_get_confirmation_hash(ptr); + const confirmation_hash_conv: Uint8Array = bindings.decodeUint8Array(confirmation_hash); + this.confirmation_hash = confirmation_hash_conv; + } +} diff --git a/ts/structs/OutputSpender.mts b/ts/structs/OutputSpender.mts new file mode 100644 index 00000000..bc55307a --- /dev/null +++ b/ts/structs/OutputSpender.mts @@ -0,0 +1,765 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + + +/** An implementation of OutputSpender */ +export interface OutputSpenderInterface { + /**Creates a [`Transaction`] which spends the given descriptors to the given outputs, plus an + * output to the given change destination (if sufficient change value remains). The + * transaction will have a feerate, at least, of the given value. + * + * The `locktime` argument is used to set the transaction's locktime. If `None`, the + * transaction will have a locktime of 0. It it recommended to set this to the current block + * height to avoid fee sniping, unless you have some specific reason to use a different + * locktime. + * + * Returns `Err(())` if the output value is greater than the input value minus required fee, + * if a descriptor was duplicated, or if an output descriptor `script_pubkey` + * does not match the one we can spend. + */ + spend_spendable_outputs(descriptors: SpendableOutputDescriptor[], outputs: TxOut[], change_destination_script: Uint8Array, feerate_sat_per_1000_weight: number, locktime: Option_u32Z): Result_TransactionNoneZ; +} + +class LDKOutputSpenderHolder { + held: OutputSpender|null = null; +} + +/** + * A trait that describes a wallet capable of creating a spending [`Transaction`] from a set of + * [`SpendableOutputDescriptor`]s. + */ +export class OutputSpender extends CommonBase { + /* @internal */ + public bindings_instance: bindings.LDKOutputSpender|null; + + /* @internal */ + public instance_idx?: number; + + /* @internal */ + constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.OutputSpender_free); + this.bindings_instance = null; + } + + /** Creates a new instance of OutputSpender from a given implementation */ + public static new_impl(arg: OutputSpenderInterface): OutputSpender { + const impl_holder: LDKOutputSpenderHolder = new LDKOutputSpenderHolder(); + let structImplementation = { + spend_spendable_outputs (descriptors: number, outputs: number, change_destination_script: number, feerate_sat_per_1000_weight: number, locktime: bigint): bigint { + const descriptors_conv_27_len: number = bindings.getArrayLength(descriptors); + const descriptors_conv_27_arr: SpendableOutputDescriptor[] = new Array(descriptors_conv_27_len).fill(null); + for (var b = 0; b < descriptors_conv_27_len; b++) { + const descriptors_conv_27: bigint = bindings.getU64ArrayElem(descriptors, b); + const descriptors_conv_27_hu_conv: SpendableOutputDescriptor = SpendableOutputDescriptor.constr_from_ptr(descriptors_conv_27); + CommonBase.add_ref_from(descriptors_conv_27_hu_conv, this); + descriptors_conv_27_arr[b] = descriptors_conv_27_hu_conv; + } + bindings.freeWasmMemory(descriptors) + const outputs_conv_7_len: number = bindings.getArrayLength(outputs); + const outputs_conv_7_arr: TxOut[] = new Array(outputs_conv_7_len).fill(null); + for (var h = 0; h < outputs_conv_7_len; h++) { + const outputs_conv_7: bigint = bindings.getU64ArrayElem(outputs, h); + const outputs_conv_7_conv: TxOut = new TxOut(null, outputs_conv_7); + outputs_conv_7_arr[h] = outputs_conv_7_conv; + } + bindings.freeWasmMemory(outputs) + const change_destination_script_conv: Uint8Array = bindings.decodeUint8Array(change_destination_script); + const locktime_hu_conv: Option_u32Z = Option_u32Z.constr_from_ptr(locktime); + CommonBase.add_ref_from(locktime_hu_conv, this); + const ret: Result_TransactionNoneZ = arg.spend_spendable_outputs(descriptors_conv_27_arr, outputs_conv_7_arr, change_destination_script_conv, feerate_sat_per_1000_weight, locktime_hu_conv); + const result: bigint = ret.clone_ptr(); + return result; + }, + } as bindings.LDKOutputSpender; + const ptr_idx: [bigint, number] = bindings.LDKOutputSpender_new(structImplementation); + + impl_holder.held = new OutputSpender(null, ptr_idx[0]); + impl_holder.held.instance_idx = ptr_idx[1]; + impl_holder.held.bindings_instance = structImplementation; + return impl_holder.held!; + } + + /** + * Creates a [`Transaction`] which spends the given descriptors to the given outputs, plus an + * output to the given change destination (if sufficient change value remains). The + * transaction will have a feerate, at least, of the given value. + * + * The `locktime` argument is used to set the transaction's locktime. If `None`, the + * transaction will have a locktime of 0. It it recommended to set this to the current block + * height to avoid fee sniping, unless you have some specific reason to use a different + * locktime. + * + * Returns `Err(())` if the output value is greater than the input value minus required fee, + * if a descriptor was duplicated, or if an output descriptor `script_pubkey` + * does not match the one we can spend. + */ + public spend_spendable_outputs(descriptors: SpendableOutputDescriptor[], outputs: TxOut[], change_destination_script: Uint8Array, feerate_sat_per_1000_weight: number, locktime: Option_u32Z): Result_TransactionNoneZ { + const ret: bigint = bindings.OutputSpender_spend_spendable_outputs(this.ptr, bindings.encodeUint64Array(descriptors.map(descriptors_conv_27 => CommonBase.get_ptr_of(descriptors_conv_27))), bindings.encodeUint64Array(outputs.map(outputs_conv_7 => CommonBase.get_ptr_of(outputs_conv_7))), bindings.encodeUint8Array(change_destination_script), feerate_sat_per_1000_weight, CommonBase.get_ptr_of(locktime)); + const ret_hu_conv: Result_TransactionNoneZ = Result_TransactionNoneZ.constr_from_ptr(ret); + descriptors.forEach((descriptors_conv_27: SpendableOutputDescriptor) => { CommonBase.add_ref_from(this, descriptors_conv_27); }); + CommonBase.add_ref_from(this, locktime); + return ret_hu_conv; + } + +} diff --git a/ts/structs/OutputSweeper.mts b/ts/structs/OutputSweeper.mts new file mode 100644 index 00000000..ed94d497 --- /dev/null +++ b/ts/structs/OutputSweeper.mts @@ -0,0 +1,801 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + +/** + * A utility that keeps track of [`SpendableOutputDescriptor`]s, persists them in a given + * [`KVStore`] and regularly retries sweeping them based on a callback given to the constructor + * methods. + * + * Users should call [`Self::track_spendable_outputs`] for any [`SpendableOutputDescriptor`]s received via [`Event::SpendableOutputs`]. + * + * This needs to be notified of chain state changes either via its [`Listen`] or [`Confirm`] + * implementation and hence has to be connected with the utilized chain data sources. + * + * If chain data is provided via the [`Confirm`] interface or via filtered blocks, users are + * required to give their chain data sources (i.e., [`Filter`] implementation) to the respective + * constructor. + * + * [`Event::SpendableOutputs`]: crate::events::Event::SpendableOutputs + */ +export class OutputSweeper extends CommonBase { + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.OutputSweeper_free); + } + + /** + * Constructs a new [`OutputSweeper`]. + * + * If chain data is provided via the [`Confirm`] interface or via filtered blocks, users also + * need to register their [`Filter`] implementation via the given `chain_data_source`. + */ + public static constructor_new(best_block: BestBlock, broadcaster: BroadcasterInterface, fee_estimator: FeeEstimator, chain_data_source: Option_FilterZ, output_spender: OutputSpender, change_destination_source: ChangeDestinationSource, kv_store: KVStore, logger: Logger): OutputSweeper { + const ret: bigint = bindings.OutputSweeper_new(CommonBase.get_ptr_of(best_block), CommonBase.get_ptr_of(broadcaster), CommonBase.get_ptr_of(fee_estimator), CommonBase.get_ptr_of(chain_data_source), CommonBase.get_ptr_of(output_spender), CommonBase.get_ptr_of(change_destination_source), CommonBase.get_ptr_of(kv_store), CommonBase.get_ptr_of(logger)); + const ret_hu_conv: OutputSweeper = new OutputSweeper(null, ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, best_block); + CommonBase.add_ref_from(ret_hu_conv, broadcaster); + CommonBase.add_ref_from(ret_hu_conv, fee_estimator); + CommonBase.add_ref_from(ret_hu_conv, chain_data_source); + CommonBase.add_ref_from(ret_hu_conv, output_spender); + CommonBase.add_ref_from(ret_hu_conv, change_destination_source); + CommonBase.add_ref_from(ret_hu_conv, kv_store); + CommonBase.add_ref_from(ret_hu_conv, logger); + return ret_hu_conv; + } + + /** + * Tells the sweeper to track the given outputs descriptors. + * + * Usually, this should be called based on the values emitted by the + * [`Event::SpendableOutputs`]. + * + * The given `exclude_static_outputs` flag controls whether the sweeper will filter out + * [`SpendableOutputDescriptor::StaticOutput`]s, which may be handled directly by the on-chain + * wallet implementation. + * + * If `delay_until_height` is set, we will delay the spending until the respective block + * height is reached. This can be used to batch spends, e.g., to reduce on-chain fees. + * + * Returns `Err` on persistence failure, in which case the call may be safely retried. + * + * [`Event::SpendableOutputs`]: crate::events::Event::SpendableOutputs + * + * Note that channel_id (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public track_spendable_outputs(output_descriptors: SpendableOutputDescriptor[], channel_id: ChannelId|null, exclude_static_outputs: boolean, delay_until_height: Option_u32Z): Result_NoneNoneZ { + const ret: bigint = bindings.OutputSweeper_track_spendable_outputs(this.ptr, bindings.encodeUint64Array(output_descriptors.map(output_descriptors_conv_27 => CommonBase.get_ptr_of(output_descriptors_conv_27))), channel_id == null ? 0n : CommonBase.get_ptr_of(channel_id), exclude_static_outputs, CommonBase.get_ptr_of(delay_until_height)); + const ret_hu_conv: Result_NoneNoneZ = Result_NoneNoneZ.constr_from_ptr(ret); + output_descriptors.forEach((output_descriptors_conv_27: SpendableOutputDescriptor) => { CommonBase.add_ref_from(this, output_descriptors_conv_27); }); + CommonBase.add_ref_from(this, channel_id); + CommonBase.add_ref_from(this, delay_until_height); + return ret_hu_conv; + } + + /** + * Returns a list of the currently tracked spendable outputs. + */ + public tracked_spendable_outputs(): TrackedSpendableOutput[] { + const ret: number = bindings.OutputSweeper_tracked_spendable_outputs(this.ptr); + const ret_conv_24_len: number = bindings.getArrayLength(ret); + const ret_conv_24_arr: TrackedSpendableOutput[] = new Array(ret_conv_24_len).fill(null); + for (var y = 0; y < ret_conv_24_len; y++) { + const ret_conv_24: bigint = bindings.getU64ArrayElem(ret, y); + const ret_conv_24_hu_conv: TrackedSpendableOutput = new TrackedSpendableOutput(null, ret_conv_24); + CommonBase.add_ref_from(ret_conv_24_hu_conv, this); + ret_conv_24_arr[y] = ret_conv_24_hu_conv; + } + bindings.freeWasmMemory(ret) + return ret_conv_24_arr; + } + + /** + * Gets the latest best block which was connected either via the [`Listen`] or + * [`Confirm`] interfaces. + */ + public current_best_block(): BestBlock { + const ret: bigint = bindings.OutputSweeper_current_best_block(this.ptr); + const ret_hu_conv: BestBlock = new BestBlock(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * Constructs a new Listen which calls the relevant methods on this_arg. + * This copies the `inner` pointer in this_arg and thus the returned Listen must be freed before this_arg is + */ + public as_Listen(): Listen { + const ret: bigint = bindings.OutputSweeper_as_Listen(this.ptr); + const ret_hu_conv: Listen = new Listen(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * Constructs a new Confirm which calls the relevant methods on this_arg. + * This copies the `inner` pointer in this_arg and thus the returned Confirm must be freed before this_arg is + */ + public as_Confirm(): Confirm { + const ret: bigint = bindings.OutputSweeper_as_Confirm(this.ptr); + const ret_hu_conv: Confirm = new Confirm(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * Read a OutputSweeper from a byte array, created by OutputSweeper_write + */ + public static constructor_read(ser: Uint8Array, arg_a: BroadcasterInterface, arg_b: FeeEstimator, arg_c: Option_FilterZ, arg_d: OutputSpender, arg_e: ChangeDestinationSource, arg_f: KVStore, arg_g: Logger): Result_OutputSweeperDecodeErrorZ { + const ret: bigint = bindings.OutputSweeper_read(bindings.encodeUint8Array(ser), CommonBase.get_ptr_of(arg_a), CommonBase.get_ptr_of(arg_b), CommonBase.get_ptr_of(arg_c), CommonBase.get_ptr_of(arg_d), CommonBase.get_ptr_of(arg_e), CommonBase.get_ptr_of(arg_f), CommonBase.get_ptr_of(arg_g)); + const ret_hu_conv: Result_OutputSweeperDecodeErrorZ = Result_OutputSweeperDecodeErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, arg_a); + CommonBase.add_ref_from(ret_hu_conv, arg_b); + CommonBase.add_ref_from(ret_hu_conv, arg_c); + CommonBase.add_ref_from(ret_hu_conv, arg_d); + CommonBase.add_ref_from(ret_hu_conv, arg_e); + CommonBase.add_ref_from(ret_hu_conv, arg_f); + CommonBase.add_ref_from(ret_hu_conv, arg_g); + return ret_hu_conv; + } + +} diff --git a/ts/structs/P2PGossipSync.mts b/ts/structs/P2PGossipSync.mts index aaf2289d..9477157d 100644 --- a/ts/structs/P2PGossipSync.mts +++ b/ts/structs/P2PGossipSync.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -560,10 +620,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -616,7 +681,7 @@ export class P2PGossipSync extends CommonBase { * correct, and the announcement is signed with channel owners' keys. */ public static constructor_new(network_graph: NetworkGraph, utxo_lookup: Option_UtxoLookupZ, logger: Logger): P2PGossipSync { - const ret: bigint = bindings.P2PGossipSync_new(network_graph == null ? 0n : CommonBase.get_ptr_of(network_graph), CommonBase.get_ptr_of(utxo_lookup), CommonBase.get_ptr_of(logger)); + const ret: bigint = bindings.P2PGossipSync_new(CommonBase.get_ptr_of(network_graph), CommonBase.get_ptr_of(utxo_lookup), CommonBase.get_ptr_of(logger)); const ret_hu_conv: P2PGossipSync = new P2PGossipSync(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, network_graph); diff --git a/ts/structs/Packet.mts b/ts/structs/Packet.mts index 6bf94857..ccd09f7d 100644 --- a/ts/structs/Packet.mts +++ b/ts/structs/Packet.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,10 +600,14 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -709,7 +774,7 @@ export class Packet extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: Packet): boolean { - const ret: boolean = bindings.Packet_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.Packet_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/ParseOrSemanticError.mts b/ts/structs/ParseOrSemanticError.mts index 89f6b356..f860d62e 100644 --- a/ts/structs/ParseOrSemanticError.mts +++ b/ts/structs/ParseOrSemanticError.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -654,7 +719,7 @@ export class ParseOrSemanticError extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public eq(b: ParseOrSemanticError): boolean { - const ret: boolean = bindings.ParseOrSemanticError_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.ParseOrSemanticError_eq(this.ptr, CommonBase.get_ptr_of(b)); return ret; } diff --git a/ts/structs/ParsedOnionMessageContents.mts b/ts/structs/ParsedOnionMessageContents.mts index 306a9431..d7a6473b 100644 --- a/ts/structs/ParsedOnionMessageContents.mts +++ b/ts/structs/ParsedOnionMessageContents.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; import { SendSuccess } from '../structs/SendSuccess.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Path.mts b/ts/structs/Path.mts index 811e825c..c8c82b44 100644 --- a/ts/structs/Path.mts +++ b/ts/structs/Path.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -627,7 +692,7 @@ export class Path extends CommonBase { * The list of unblinded hops in this [`Path`]. Must be at least length one. */ public set_hops(val: RouteHop[]): void { - bindings.Path_set_hops(this.ptr, bindings.encodeUint64Array(val.map(val_conv_10 => val_conv_10 == null ? 0n : CommonBase.get_ptr_of(val_conv_10)))); + bindings.Path_set_hops(this.ptr, bindings.encodeUint64Array(val.map(val_conv_10 => CommonBase.get_ptr_of(val_conv_10)))); val.forEach((val_conv_10: RouteHop) => { CommonBase.add_ref_from(this, val_conv_10); }); } @@ -659,7 +724,7 @@ export class Path extends CommonBase { * Note that blinded_tail_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ public static constructor_new(hops_arg: RouteHop[], blinded_tail_arg: BlindedTail|null): Path { - const ret: bigint = bindings.Path_new(bindings.encodeUint64Array(hops_arg.map(hops_arg_conv_10 => hops_arg_conv_10 == null ? 0n : CommonBase.get_ptr_of(hops_arg_conv_10))), blinded_tail_arg == null ? 0n : CommonBase.get_ptr_of(blinded_tail_arg)); + const ret: bigint = bindings.Path_new(bindings.encodeUint64Array(hops_arg.map(hops_arg_conv_10 => CommonBase.get_ptr_of(hops_arg_conv_10))), blinded_tail_arg == null ? 0n : CommonBase.get_ptr_of(blinded_tail_arg)); const ret_hu_conv: Path = new Path(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); hops_arg.forEach((hops_arg_conv_10: RouteHop) => { CommonBase.add_ref_from(ret_hu_conv, hops_arg_conv_10); }); @@ -696,7 +761,7 @@ export class Path extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: Path): boolean { - const ret: boolean = bindings.Path_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.Path_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/PathFailure.mts b/ts/structs/PathFailure.mts index 8dbf4710..24b23d18 100644 --- a/ts/structs/PathFailure.mts +++ b/ts/structs/PathFailure.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -657,7 +722,7 @@ export class PathFailure extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public eq(b: PathFailure): boolean { - const ret: boolean = bindings.PathFailure_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.PathFailure_eq(this.ptr, CommonBase.get_ptr_of(b)); return ret; } diff --git a/ts/structs/Payee.mts b/ts/structs/Payee.mts index 9603304a..0cdcba35 100644 --- a/ts/structs/Payee.mts +++ b/ts/structs/Payee.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -560,10 +620,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -631,7 +696,7 @@ export class Payee extends CommonBase { * Utility method to constructs a new Blinded-variant Payee */ public static constructor_blinded(route_hints: TwoTuple_BlindedPayInfoBlindedPathZ[], features: Bolt12InvoiceFeatures): Payee { - const ret: bigint = bindings.Payee_blinded(bindings.encodeUint64Array(route_hints.map(route_hints_conv_37 => route_hints_conv_37 != null ? CommonBase.get_ptr_of(route_hints_conv_37) : 0n)), features == null ? 0n : CommonBase.get_ptr_of(features)); + const ret: bigint = bindings.Payee_blinded(bindings.encodeUint64Array(route_hints.map(route_hints_conv_37 => CommonBase.get_ptr_of(route_hints_conv_37))), CommonBase.get_ptr_of(features)); const ret_hu_conv: Payee = Payee.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, features); @@ -642,7 +707,7 @@ export class Payee extends CommonBase { * Utility method to constructs a new Clear-variant Payee */ public static constructor_clear(node_id: Uint8Array, route_hints: RouteHint[], features: Bolt11InvoiceFeatures, final_cltv_expiry_delta: number): Payee { - const ret: bigint = bindings.Payee_clear(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), bindings.encodeUint64Array(route_hints.map(route_hints_conv_11 => route_hints_conv_11 == null ? 0n : CommonBase.get_ptr_of(route_hints_conv_11))), features == null ? 0n : CommonBase.get_ptr_of(features), final_cltv_expiry_delta); + const ret: bigint = bindings.Payee_clear(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), bindings.encodeUint64Array(route_hints.map(route_hints_conv_11 => CommonBase.get_ptr_of(route_hints_conv_11))), CommonBase.get_ptr_of(features), final_cltv_expiry_delta); const ret_hu_conv: Payee = Payee.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); route_hints.forEach((route_hints_conv_11: RouteHint) => { CommonBase.add_ref_from(ret_hu_conv, route_hints_conv_11); }); @@ -663,7 +728,7 @@ export class Payee extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public eq(b: Payee): boolean { - const ret: boolean = bindings.Payee_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.Payee_eq(this.ptr, CommonBase.get_ptr_of(b)); return ret; } diff --git a/ts/structs/PayeePubKey.mts b/ts/structs/PayeePubKey.mts index 92945fc3..d54f6bbb 100644 --- a/ts/structs/PayeePubKey.mts +++ b/ts/structs/PayeePubKey.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -654,7 +719,7 @@ export class PayeePubKey extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: PayeePubKey): boolean { - const ret: boolean = bindings.PayeePubKey_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.PayeePubKey_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/PaymentConstraints.mts b/ts/structs/PaymentConstraints.mts index 3535c454..5d343052 100644 --- a/ts/structs/PaymentConstraints.mts +++ b/ts/structs/PaymentConstraints.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,16 +508,22 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/PaymentContext.mts b/ts/structs/PaymentContext.mts new file mode 100644 index 00000000..e92f9d25 --- /dev/null +++ b/ts/structs/PaymentContext.mts @@ -0,0 +1,795 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + +/** + * The context of an inbound payment, which is included in a [`BlindedPath`] via [`ReceiveTlvs`] + * and surfaced in [`PaymentPurpose`]. + * + * [`BlindedPath`]: crate::blinded_path::BlindedPath + * [`PaymentPurpose`]: crate::events::PaymentPurpose + */ +export class PaymentContext extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.PaymentContext_free); } + /* @internal */ + public static constr_from_ptr(ptr: bigint): PaymentContext { + const raw_ty: number = bindings.LDKPaymentContext_ty_from_ptr(ptr); + switch (raw_ty) { + case 0: return new PaymentContext_Unknown(ptr); + case 1: return new PaymentContext_Bolt12Offer(ptr); + case 2: return new PaymentContext_Bolt12Refund(ptr); + default: + throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface + } + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.PaymentContext_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a copy of the PaymentContext + */ + public clone(): PaymentContext { + const ret: bigint = bindings.PaymentContext_clone(this.ptr); + const ret_hu_conv: PaymentContext = PaymentContext.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * Utility method to constructs a new Unknown-variant PaymentContext + */ + public static constructor_unknown(a: UnknownPaymentContext): PaymentContext { + const ret: bigint = bindings.PaymentContext_unknown(CommonBase.get_ptr_of(a)); + const ret_hu_conv: PaymentContext = PaymentContext.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, a); + return ret_hu_conv; + } + + /** + * Utility method to constructs a new Bolt12Offer-variant PaymentContext + */ + public static constructor_bolt12_offer(a: Bolt12OfferContext): PaymentContext { + const ret: bigint = bindings.PaymentContext_bolt12_offer(CommonBase.get_ptr_of(a)); + const ret_hu_conv: PaymentContext = PaymentContext.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, a); + return ret_hu_conv; + } + + /** + * Utility method to constructs a new Bolt12Refund-variant PaymentContext + */ + public static constructor_bolt12_refund(a: Bolt12RefundContext): PaymentContext { + const ret: bigint = bindings.PaymentContext_bolt12_refund(CommonBase.get_ptr_of(a)); + const ret_hu_conv: PaymentContext = PaymentContext.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, a); + return ret_hu_conv; + } + + /** + * Checks if two PaymentContexts contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + */ + public eq(b: PaymentContext): boolean { + const ret: boolean = bindings.PaymentContext_eq(this.ptr, CommonBase.get_ptr_of(b)); + return ret; + } + + /** + * Serialize the PaymentContext object into a byte array which can be read by PaymentContext_read + */ + public write(): Uint8Array { + const ret: number = bindings.PaymentContext_write(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Read a PaymentContext from a byte array, created by PaymentContext_write + */ + public static constructor_read(ser: Uint8Array): Result_PaymentContextDecodeErrorZ { + const ret: bigint = bindings.PaymentContext_read(bindings.encodeUint8Array(ser)); + const ret_hu_conv: Result_PaymentContextDecodeErrorZ = Result_PaymentContextDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +/** A PaymentContext of type Unknown */ +export class PaymentContext_Unknown extends PaymentContext { + public unknown: UnknownPaymentContext; + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + const unknown: bigint = bindings.LDKPaymentContext_Unknown_get_unknown(ptr); + const unknown_hu_conv: UnknownPaymentContext = new UnknownPaymentContext(null, unknown); + CommonBase.add_ref_from(unknown_hu_conv, this); + this.unknown = unknown_hu_conv; + } +} +/** A PaymentContext of type Bolt12Offer */ +export class PaymentContext_Bolt12Offer extends PaymentContext { + public bolt12_offer: Bolt12OfferContext; + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + const bolt12_offer: bigint = bindings.LDKPaymentContext_Bolt12Offer_get_bolt12_offer(ptr); + const bolt12_offer_hu_conv: Bolt12OfferContext = new Bolt12OfferContext(null, bolt12_offer); + CommonBase.add_ref_from(bolt12_offer_hu_conv, this); + this.bolt12_offer = bolt12_offer_hu_conv; + } +} +/** A PaymentContext of type Bolt12Refund */ +export class PaymentContext_Bolt12Refund extends PaymentContext { + public bolt12_refund: Bolt12RefundContext; + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + const bolt12_refund: bigint = bindings.LDKPaymentContext_Bolt12Refund_get_bolt12_refund(ptr); + const bolt12_refund_hu_conv: Bolt12RefundContext = new Bolt12RefundContext(null, bolt12_refund); + CommonBase.add_ref_from(bolt12_refund_hu_conv, this); + this.bolt12_refund = bolt12_refund_hu_conv; + } +} diff --git a/ts/structs/PaymentParameters.mts b/ts/structs/PaymentParameters.mts index 027b343a..3316531a 100644 --- a/ts/structs/PaymentParameters.mts +++ b/ts/structs/PaymentParameters.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -799,7 +864,7 @@ export class PaymentParameters extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: PaymentParameters): boolean { - const ret: boolean = bindings.PaymentParameters_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.PaymentParameters_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } @@ -861,7 +926,7 @@ export class PaymentParameters extends CommonBase { * [`PaymentParameters::expiry_time`]. */ public static constructor_from_bolt12_invoice(invoice: Bolt12Invoice): PaymentParameters { - const ret: bigint = bindings.PaymentParameters_from_bolt12_invoice(invoice == null ? 0n : CommonBase.get_ptr_of(invoice)); + const ret: bigint = bindings.PaymentParameters_from_bolt12_invoice(CommonBase.get_ptr_of(invoice)); const ret_hu_conv: PaymentParameters = new PaymentParameters(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, invoice); @@ -872,7 +937,7 @@ export class PaymentParameters extends CommonBase { * Creates parameters for paying to a blinded payee from the provided blinded route hints. */ public static constructor_blinded(blinded_route_hints: TwoTuple_BlindedPayInfoBlindedPathZ[]): PaymentParameters { - const ret: bigint = bindings.PaymentParameters_blinded(bindings.encodeUint64Array(blinded_route_hints.map(blinded_route_hints_conv_37 => blinded_route_hints_conv_37 != null ? CommonBase.get_ptr_of(blinded_route_hints_conv_37) : 0n))); + const ret: bigint = bindings.PaymentParameters_blinded(bindings.encodeUint64Array(blinded_route_hints.map(blinded_route_hints_conv_37 => CommonBase.get_ptr_of(blinded_route_hints_conv_37)))); const ret_hu_conv: PaymentParameters = new PaymentParameters(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); return ret_hu_conv; diff --git a/ts/structs/PaymentPurpose.mts b/ts/structs/PaymentPurpose.mts index 36432fc3..86bea455 100644 --- a/ts/structs/PaymentPurpose.mts +++ b/ts/structs/PaymentPurpose.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -605,8 +670,10 @@ export class PaymentPurpose extends CommonBase { public static constr_from_ptr(ptr: bigint): PaymentPurpose { const raw_ty: number = bindings.LDKPaymentPurpose_ty_from_ptr(ptr); switch (raw_ty) { - case 0: return new PaymentPurpose_InvoicePayment(ptr); - case 1: return new PaymentPurpose_SpontaneousPayment(ptr); + case 0: return new PaymentPurpose_Bolt11InvoicePayment(ptr); + case 1: return new PaymentPurpose_Bolt12OfferPayment(ptr); + case 2: return new PaymentPurpose_Bolt12RefundPayment(ptr); + case 3: return new PaymentPurpose_SpontaneousPayment(ptr); default: throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface } @@ -628,13 +695,37 @@ export class PaymentPurpose extends CommonBase { } /** - * Utility method to constructs a new InvoicePayment-variant PaymentPurpose + * Utility method to constructs a new Bolt11InvoicePayment-variant PaymentPurpose + */ + public static constructor_bolt11_invoice_payment(payment_preimage: Option_ThirtyTwoBytesZ, payment_secret: Uint8Array): PaymentPurpose { + const ret: bigint = bindings.PaymentPurpose_bolt11_invoice_payment(CommonBase.get_ptr_of(payment_preimage), bindings.encodeUint8Array(bindings.check_arr_len(payment_secret, 32))); + const ret_hu_conv: PaymentPurpose = PaymentPurpose.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, payment_preimage); + return ret_hu_conv; + } + + /** + * Utility method to constructs a new Bolt12OfferPayment-variant PaymentPurpose + */ + public static constructor_bolt12_offer_payment(payment_preimage: Option_ThirtyTwoBytesZ, payment_secret: Uint8Array, payment_context: Bolt12OfferContext): PaymentPurpose { + const ret: bigint = bindings.PaymentPurpose_bolt12_offer_payment(CommonBase.get_ptr_of(payment_preimage), bindings.encodeUint8Array(bindings.check_arr_len(payment_secret, 32)), CommonBase.get_ptr_of(payment_context)); + const ret_hu_conv: PaymentPurpose = PaymentPurpose.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, payment_preimage); + CommonBase.add_ref_from(ret_hu_conv, payment_context); + return ret_hu_conv; + } + + /** + * Utility method to constructs a new Bolt12RefundPayment-variant PaymentPurpose */ - public static constructor_invoice_payment(payment_preimage: Option_ThirtyTwoBytesZ, payment_secret: Uint8Array): PaymentPurpose { - const ret: bigint = bindings.PaymentPurpose_invoice_payment(CommonBase.get_ptr_of(payment_preimage), bindings.encodeUint8Array(bindings.check_arr_len(payment_secret, 32))); + public static constructor_bolt12_refund_payment(payment_preimage: Option_ThirtyTwoBytesZ, payment_secret: Uint8Array, payment_context: Bolt12RefundContext): PaymentPurpose { + const ret: bigint = bindings.PaymentPurpose_bolt12_refund_payment(CommonBase.get_ptr_of(payment_preimage), bindings.encodeUint8Array(bindings.check_arr_len(payment_secret, 32)), CommonBase.get_ptr_of(payment_context)); const ret_hu_conv: PaymentPurpose = PaymentPurpose.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, payment_preimage); + CommonBase.add_ref_from(ret_hu_conv, payment_context); return ret_hu_conv; } @@ -653,7 +744,7 @@ export class PaymentPurpose extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public eq(b: PaymentPurpose): boolean { - const ret: boolean = bindings.PaymentPurpose_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.PaymentPurpose_eq(this.ptr, CommonBase.get_ptr_of(b)); return ret; } @@ -686,12 +777,13 @@ export class PaymentPurpose extends CommonBase { } } -/** A PaymentPurpose of type InvoicePayment */ -export class PaymentPurpose_InvoicePayment extends PaymentPurpose { +/** A PaymentPurpose of type Bolt11InvoicePayment */ +export class PaymentPurpose_Bolt11InvoicePayment extends PaymentPurpose { /** * The preimage to the payment_hash, if the payment hash (and secret) were fetched via - * [`ChannelManager::create_inbound_payment`]. If provided, this can be handed directly to - * [`ChannelManager::claim_funds`]. + * [`ChannelManager::create_inbound_payment`]. When handling [`Event::PaymentClaimable`], + * this can be passed directly to [`ChannelManager::claim_funds`] to claim the payment. No + * action is needed when seen in [`Event::PaymentClaimed`]. * * [`ChannelManager::create_inbound_payment`]: crate::ln::channelmanager::ChannelManager::create_inbound_payment * [`ChannelManager::claim_funds`]: crate::ln::channelmanager::ChannelManager::claim_funds @@ -713,13 +805,93 @@ export class PaymentPurpose_InvoicePayment extends PaymentPurpose { /* @internal */ public constructor(ptr: bigint) { super(null, ptr); - const payment_preimage: bigint = bindings.LDKPaymentPurpose_InvoicePayment_get_payment_preimage(ptr); + const payment_preimage: bigint = bindings.LDKPaymentPurpose_Bolt11InvoicePayment_get_payment_preimage(ptr); + const payment_preimage_hu_conv: Option_ThirtyTwoBytesZ = Option_ThirtyTwoBytesZ.constr_from_ptr(payment_preimage); + CommonBase.add_ref_from(payment_preimage_hu_conv, this); + this.payment_preimage = payment_preimage_hu_conv; + const payment_secret: number = bindings.LDKPaymentPurpose_Bolt11InvoicePayment_get_payment_secret(ptr); + const payment_secret_conv: Uint8Array = bindings.decodeUint8Array(payment_secret); + this.payment_secret = payment_secret_conv; + } +} +/** A PaymentPurpose of type Bolt12OfferPayment */ +export class PaymentPurpose_Bolt12OfferPayment extends PaymentPurpose { + /** + * The preimage to the payment hash. When handling [`Event::PaymentClaimable`], this can be + * passed directly to [`ChannelManager::claim_funds`], if provided. No action is needed + * when seen in [`Event::PaymentClaimed`]. + * + * [`ChannelManager::claim_funds`]: crate::ln::channelmanager::ChannelManager::claim_funds + */ + public payment_preimage: Option_ThirtyTwoBytesZ; + /** + * The secret used to authenticate the sender to the recipient, preventing a number of + * de-anonymization attacks while routing a payment. + * + * See [`PaymentPurpose::Bolt11InvoicePayment::payment_secret`] for further details. + */ + public payment_secret: Uint8Array; + /** + * The context of the payment such as information about the corresponding [`Offer`] and + * [`InvoiceRequest`]. + * + * [`Offer`]: crate::offers::offer::Offer + * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest + */ + public payment_context: Bolt12OfferContext; + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + const payment_preimage: bigint = bindings.LDKPaymentPurpose_Bolt12OfferPayment_get_payment_preimage(ptr); + const payment_preimage_hu_conv: Option_ThirtyTwoBytesZ = Option_ThirtyTwoBytesZ.constr_from_ptr(payment_preimage); + CommonBase.add_ref_from(payment_preimage_hu_conv, this); + this.payment_preimage = payment_preimage_hu_conv; + const payment_secret: number = bindings.LDKPaymentPurpose_Bolt12OfferPayment_get_payment_secret(ptr); + const payment_secret_conv: Uint8Array = bindings.decodeUint8Array(payment_secret); + this.payment_secret = payment_secret_conv; + const payment_context: bigint = bindings.LDKPaymentPurpose_Bolt12OfferPayment_get_payment_context(ptr); + const payment_context_hu_conv: Bolt12OfferContext = new Bolt12OfferContext(null, payment_context); + CommonBase.add_ref_from(payment_context_hu_conv, this); + this.payment_context = payment_context_hu_conv; + } +} +/** A PaymentPurpose of type Bolt12RefundPayment */ +export class PaymentPurpose_Bolt12RefundPayment extends PaymentPurpose { + /** + * The preimage to the payment hash. When handling [`Event::PaymentClaimable`], this can be + * passed directly to [`ChannelManager::claim_funds`], if provided. No action is needed + * when seen in [`Event::PaymentClaimed`]. + * + * [`ChannelManager::claim_funds`]: crate::ln::channelmanager::ChannelManager::claim_funds + */ + public payment_preimage: Option_ThirtyTwoBytesZ; + /** + * The secret used to authenticate the sender to the recipient, preventing a number of + * de-anonymization attacks while routing a payment. + * + * See [`PaymentPurpose::Bolt11InvoicePayment::payment_secret`] for further details. + */ + public payment_secret: Uint8Array; + /** + * The context of the payment such as information about the corresponding [`Refund`]. + * + * [`Refund`]: crate::offers::refund::Refund + */ + public payment_context: Bolt12RefundContext; + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + const payment_preimage: bigint = bindings.LDKPaymentPurpose_Bolt12RefundPayment_get_payment_preimage(ptr); const payment_preimage_hu_conv: Option_ThirtyTwoBytesZ = Option_ThirtyTwoBytesZ.constr_from_ptr(payment_preimage); CommonBase.add_ref_from(payment_preimage_hu_conv, this); this.payment_preimage = payment_preimage_hu_conv; - const payment_secret: number = bindings.LDKPaymentPurpose_InvoicePayment_get_payment_secret(ptr); + const payment_secret: number = bindings.LDKPaymentPurpose_Bolt12RefundPayment_get_payment_secret(ptr); const payment_secret_conv: Uint8Array = bindings.decodeUint8Array(payment_secret); this.payment_secret = payment_secret_conv; + const payment_context: bigint = bindings.LDKPaymentPurpose_Bolt12RefundPayment_get_payment_context(ptr); + const payment_context_hu_conv: Bolt12RefundContext = new Bolt12RefundContext(null, payment_context); + CommonBase.add_ref_from(payment_context_hu_conv, this); + this.payment_context = payment_context_hu_conv; } } /** A PaymentPurpose of type SpontaneousPayment */ diff --git a/ts/structs/PaymentRelay.mts b/ts/structs/PaymentRelay.mts index e91e215f..afe40ce9 100644 --- a/ts/structs/PaymentRelay.mts +++ b/ts/structs/PaymentRelay.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,16 +508,22 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/PaymentSendFailure.mts b/ts/structs/PaymentSendFailure.mts index 5de86812..c74f9061 100644 --- a/ts/structs/PaymentSendFailure.mts +++ b/ts/structs/PaymentSendFailure.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -648,7 +713,7 @@ export class PaymentSendFailure extends CommonBase { * Utility method to constructs a new PathParameterError-variant PaymentSendFailure */ public static constructor_path_parameter_error(a: Result_NoneAPIErrorZ[]): PaymentSendFailure { - const ret: bigint = bindings.PaymentSendFailure_path_parameter_error(bindings.encodeUint64Array(a.map(a_conv_22 => a_conv_22 != null ? CommonBase.get_ptr_of(a_conv_22) : 0n))); + const ret: bigint = bindings.PaymentSendFailure_path_parameter_error(bindings.encodeUint64Array(a.map(a_conv_22 => CommonBase.get_ptr_of(a_conv_22)))); const ret_hu_conv: PaymentSendFailure = PaymentSendFailure.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); return ret_hu_conv; @@ -679,7 +744,7 @@ export class PaymentSendFailure extends CommonBase { * Utility method to constructs a new PartialFailure-variant PaymentSendFailure */ public static constructor_partial_failure(results: Result_NoneAPIErrorZ[], failed_paths_retry: RouteParameters, payment_id: Uint8Array): PaymentSendFailure { - const ret: bigint = bindings.PaymentSendFailure_partial_failure(bindings.encodeUint64Array(results.map(results_conv_22 => results_conv_22 != null ? CommonBase.get_ptr_of(results_conv_22) : 0n)), failed_paths_retry == null ? 0n : CommonBase.get_ptr_of(failed_paths_retry), bindings.encodeUint8Array(bindings.check_arr_len(payment_id, 32))); + const ret: bigint = bindings.PaymentSendFailure_partial_failure(bindings.encodeUint64Array(results.map(results_conv_22 => CommonBase.get_ptr_of(results_conv_22))), CommonBase.get_ptr_of(failed_paths_retry), bindings.encodeUint8Array(bindings.check_arr_len(payment_id, 32))); const ret_hu_conv: PaymentSendFailure = PaymentSendFailure.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, failed_paths_retry); @@ -691,7 +756,7 @@ export class PaymentSendFailure extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public eq(b: PaymentSendFailure): boolean { - const ret: boolean = bindings.PaymentSendFailure_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.PaymentSendFailure_eq(this.ptr, CommonBase.get_ptr_of(b)); return ret; } diff --git a/ts/structs/PeeledOnion.mts b/ts/structs/PeeledOnion.mts index acee9e2d..ddddec68 100644 --- a/ts/structs/PeeledOnion.mts +++ b/ts/structs/PeeledOnion.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; import { SendSuccess } from '../structs/SendSuccess.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -630,10 +695,11 @@ export class PeeledOnion extends CommonBase { /** * Utility method to constructs a new Forward-variant PeeledOnion */ - public static constructor_forward(a: Uint8Array, b: OnionMessage): PeeledOnion { - const ret: bigint = bindings.PeeledOnion_forward(bindings.encodeUint8Array(bindings.check_arr_len(a, 33)), b == null ? 0n : CommonBase.get_ptr_of(b)); + public static constructor_forward(a: NextMessageHop, b: OnionMessage): PeeledOnion { + const ret: bigint = bindings.PeeledOnion_forward(CommonBase.get_ptr_of(a), CommonBase.get_ptr_of(b)); const ret_hu_conv: PeeledOnion = PeeledOnion.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, a); CommonBase.add_ref_from(ret_hu_conv, b); return ret_hu_conv; } @@ -642,7 +708,7 @@ export class PeeledOnion extends CommonBase { * Utility method to constructs a new Receive-variant PeeledOnion */ public static constructor_receive(a: ParsedOnionMessageContents, b: Uint8Array, c: BlindedPath): PeeledOnion { - const ret: bigint = bindings.PeeledOnion_receive(CommonBase.get_ptr_of(a), bindings.encodeUint8Array(bindings.check_arr_len(b, 32)), c == null ? 0n : CommonBase.get_ptr_of(c)); + const ret: bigint = bindings.PeeledOnion_receive(CommonBase.get_ptr_of(a), bindings.encodeUint8Array(bindings.check_arr_len(b, 32)), CommonBase.get_ptr_of(c)); const ret_hu_conv: PeeledOnion = PeeledOnion.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, a); @@ -653,14 +719,15 @@ export class PeeledOnion extends CommonBase { } /** A PeeledOnion of type Forward */ export class PeeledOnion_Forward extends PeeledOnion { - public _0: Uint8Array; + public _0: NextMessageHop; public _1: OnionMessage; /* @internal */ public constructor(ptr: bigint) { super(null, ptr); - const _0: number = bindings.LDKPeeledOnion_Forward_get__0(ptr); - const _0_conv: Uint8Array = bindings.decodeUint8Array(_0); - this._0 = _0_conv; + const _0: bigint = bindings.LDKPeeledOnion_Forward_get__0(ptr); + const _0_hu_conv: NextMessageHop = NextMessageHop.constr_from_ptr(_0); + CommonBase.add_ref_from(_0_hu_conv, this); + this._0 = _0_hu_conv; const _1: bigint = bindings.LDKPeeledOnion_Forward_get__1(ptr); const _1_hu_conv: OnionMessage = new OnionMessage(null, _1); CommonBase.add_ref_from(_1_hu_conv, this); diff --git a/ts/structs/PeerDetails.mts b/ts/structs/PeerDetails.mts new file mode 100644 index 00000000..c8fc0147 --- /dev/null +++ b/ts/structs/PeerDetails.mts @@ -0,0 +1,770 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + +/** + * Details of a connected peer as returned by [`PeerManager::list_peers`]. + */ +export class PeerDetails extends CommonBase { + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.PeerDetails_free); + } + + /** + * The node id of the peer. + * + * For outbound connections, this [`PublicKey`] will be the same as the `their_node_id` parameter + * passed in to [`PeerManager::new_outbound_connection`]. + */ + public get_counterparty_node_id(): Uint8Array { + const ret: number = bindings.PeerDetails_get_counterparty_node_id(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + + /** + * The node id of the peer. + * + * For outbound connections, this [`PublicKey`] will be the same as the `their_node_id` parameter + * passed in to [`PeerManager::new_outbound_connection`]. + */ + public set_counterparty_node_id(val: Uint8Array): void { + bindings.PeerDetails_set_counterparty_node_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); + } + + /** + * The socket address the peer provided in the initial handshake. + * + * Will only be `Some` if an address had been previously provided to + * [`PeerManager::new_outbound_connection`] or [`PeerManager::new_inbound_connection`]. + * + * Returns a copy of the field. + */ + public get_socket_address(): Option_SocketAddressZ { + const ret: bigint = bindings.PeerDetails_get_socket_address(this.ptr); + const ret_hu_conv: Option_SocketAddressZ = Option_SocketAddressZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * The socket address the peer provided in the initial handshake. + * + * Will only be `Some` if an address had been previously provided to + * [`PeerManager::new_outbound_connection`] or [`PeerManager::new_inbound_connection`]. + */ + public set_socket_address(val: Option_SocketAddressZ): void { + bindings.PeerDetails_set_socket_address(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); + } + + /** + * The features the peer provided in the initial handshake. + */ + public get_init_features(): InitFeatures { + const ret: bigint = bindings.PeerDetails_get_init_features(this.ptr); + const ret_hu_conv: InitFeatures = new InitFeatures(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * The features the peer provided in the initial handshake. + */ + public set_init_features(val: InitFeatures): void { + bindings.PeerDetails_set_init_features(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); + } + + /** + * Indicates the direction of the peer connection. + * + * Will be `true` for inbound connections, and `false` for outbound connections. + */ + public get_is_inbound_connection(): boolean { + const ret: boolean = bindings.PeerDetails_get_is_inbound_connection(this.ptr); + return ret; + } + + /** + * Indicates the direction of the peer connection. + * + * Will be `true` for inbound connections, and `false` for outbound connections. + */ + public set_is_inbound_connection(val: boolean): void { + bindings.PeerDetails_set_is_inbound_connection(this.ptr, val); + } + + /** + * Constructs a new PeerDetails given each field + */ + public static constructor_new(counterparty_node_id_arg: Uint8Array, socket_address_arg: Option_SocketAddressZ, init_features_arg: InitFeatures, is_inbound_connection_arg: boolean): PeerDetails { + const ret: bigint = bindings.PeerDetails_new(bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id_arg, 33)), CommonBase.get_ptr_of(socket_address_arg), CommonBase.get_ptr_of(init_features_arg), is_inbound_connection_arg); + const ret_hu_conv: PeerDetails = new PeerDetails(null, ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, socket_address_arg); + CommonBase.add_ref_from(ret_hu_conv, init_features_arg); + return ret_hu_conv; + } + +} diff --git a/ts/structs/PeerHandleError.mts b/ts/structs/PeerHandleError.mts index d3234490..f26cab4a 100644 --- a/ts/structs/PeerHandleError.mts +++ b/ts/structs/PeerHandleError.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/PeerManager.mts b/ts/structs/PeerManager.mts index 0ffa9924..96f09d6c 100644 --- a/ts/structs/PeerManager.mts +++ b/ts/structs/PeerManager.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDe import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -648,29 +713,35 @@ export class PeerManager extends CommonBase { } /** - * Get a list of tuples mapping from node id to network addresses for peers which have - * completed the initial handshake. - * - * For outbound connections, the [`PublicKey`] will be the same as the `their_node_id` parameter - * passed in to [`Self::new_outbound_connection`], however entries will only appear once the initial - * handshake has completed and we are sure the remote peer has the private key for the given - * [`PublicKey`]. - * - * The returned `Option`s will only be `Some` if an address had been previously given via - * [`Self::new_outbound_connection`] or [`Self::new_inbound_connection`]. + * Returns a list of [`PeerDetails`] for connected peers that have completed the initial + * handshake. */ - public get_peer_node_ids(): TwoTuple_PublicKeyCOption_SocketAddressZZ[] { - const ret: number = bindings.PeerManager_get_peer_node_ids(this.ptr); - const ret_conv_43_len: number = bindings.getArrayLength(ret); - const ret_conv_43_arr: TwoTuple_PublicKeyCOption_SocketAddressZZ[] = new Array(ret_conv_43_len).fill(null); - for (var r = 0; r < ret_conv_43_len; r++) { - const ret_conv_43: bigint = bindings.getU64ArrayElem(ret, r); - const ret_conv_43_hu_conv: TwoTuple_PublicKeyCOption_SocketAddressZZ = new TwoTuple_PublicKeyCOption_SocketAddressZZ(null, ret_conv_43); - CommonBase.add_ref_from(ret_conv_43_hu_conv, this); - ret_conv_43_arr[r] = ret_conv_43_hu_conv; + public list_peers(): PeerDetails[] { + const ret: number = bindings.PeerManager_list_peers(this.ptr); + const ret_conv_13_len: number = bindings.getArrayLength(ret); + const ret_conv_13_arr: PeerDetails[] = new Array(ret_conv_13_len).fill(null); + for (var n = 0; n < ret_conv_13_len; n++) { + const ret_conv_13: bigint = bindings.getU64ArrayElem(ret, n); + const ret_conv_13_hu_conv: PeerDetails = new PeerDetails(null, ret_conv_13); + CommonBase.add_ref_from(ret_conv_13_hu_conv, this); + ret_conv_13_arr[n] = ret_conv_13_hu_conv; } bindings.freeWasmMemory(ret) - return ret_conv_43_arr; + return ret_conv_13_arr; + } + + /** + * Returns the [`PeerDetails`] of a connected peer that has completed the initial handshake. + * + * Will return `None` if the peer is unknown or it hasn't completed the initial handshake. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public peer_by_node_id(their_node_id: Uint8Array): PeerDetails { + const ret: bigint = bindings.PeerManager_peer_by_node_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33))); + const ret_hu_conv: PeerDetails = new PeerDetails(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** diff --git a/ts/structs/PendingHTLCInfo.mts b/ts/structs/PendingHTLCInfo.mts index 7f7e759b..95868d8c 100644 --- a/ts/structs/PendingHTLCInfo.mts +++ b/ts/structs/PendingHTLCInfo.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; import { Utxo } from '../structs/Utxo.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/PendingHTLCRouting.mts b/ts/structs/PendingHTLCRouting.mts index c96a993b..20bab93b 100644 --- a/ts/structs/PendingHTLCRouting.mts +++ b/ts/structs/PendingHTLCRouting.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -631,7 +696,7 @@ export class PendingHTLCRouting extends CommonBase { * Utility method to constructs a new Forward-variant PendingHTLCRouting */ public static constructor_forward(onion_packet: OnionPacket, short_channel_id: bigint, blinded: BlindedForward): PendingHTLCRouting { - const ret: bigint = bindings.PendingHTLCRouting_forward(onion_packet == null ? 0n : CommonBase.get_ptr_of(onion_packet), short_channel_id, blinded == null ? 0n : CommonBase.get_ptr_of(blinded)); + const ret: bigint = bindings.PendingHTLCRouting_forward(CommonBase.get_ptr_of(onion_packet), short_channel_id, CommonBase.get_ptr_of(blinded)); const ret_hu_conv: PendingHTLCRouting = PendingHTLCRouting.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, onion_packet); @@ -642,20 +707,21 @@ export class PendingHTLCRouting extends CommonBase { /** * Utility method to constructs a new Receive-variant PendingHTLCRouting */ - public static constructor_receive(payment_data: FinalOnionHopData, payment_metadata: Option_CVec_u8ZZ, incoming_cltv_expiry: number, phantom_shared_secret: Uint8Array, custom_tlvs: TwoTuple_u64CVec_u8ZZ[], requires_blinded_error: boolean): PendingHTLCRouting { - const ret: bigint = bindings.PendingHTLCRouting_receive(payment_data == null ? 0n : CommonBase.get_ptr_of(payment_data), CommonBase.get_ptr_of(payment_metadata), incoming_cltv_expiry, bindings.encodeUint8Array(bindings.check_arr_len(phantom_shared_secret, 32)), bindings.encodeUint64Array(custom_tlvs.map(custom_tlvs_conv_23 => custom_tlvs_conv_23 != null ? CommonBase.get_ptr_of(custom_tlvs_conv_23) : 0n)), requires_blinded_error); + public static constructor_receive(payment_data: FinalOnionHopData, payment_metadata: Option_CVec_u8ZZ, payment_context: Option_PaymentContextZ, incoming_cltv_expiry: number, phantom_shared_secret: Uint8Array, custom_tlvs: TwoTuple_u64CVec_u8ZZ[], requires_blinded_error: boolean): PendingHTLCRouting { + const ret: bigint = bindings.PendingHTLCRouting_receive(CommonBase.get_ptr_of(payment_data), CommonBase.get_ptr_of(payment_metadata), CommonBase.get_ptr_of(payment_context), incoming_cltv_expiry, bindings.encodeUint8Array(bindings.check_arr_len(phantom_shared_secret, 32)), bindings.encodeUint64Array(custom_tlvs.map(custom_tlvs_conv_23 => CommonBase.get_ptr_of(custom_tlvs_conv_23))), requires_blinded_error); const ret_hu_conv: PendingHTLCRouting = PendingHTLCRouting.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, payment_data); CommonBase.add_ref_from(ret_hu_conv, payment_metadata); + CommonBase.add_ref_from(ret_hu_conv, payment_context); return ret_hu_conv; } /** * Utility method to constructs a new ReceiveKeysend-variant PendingHTLCRouting */ - public static constructor_receive_keysend(payment_data: FinalOnionHopData, payment_preimage: Uint8Array, payment_metadata: Option_CVec_u8ZZ, incoming_cltv_expiry: number, custom_tlvs: TwoTuple_u64CVec_u8ZZ[]): PendingHTLCRouting { - const ret: bigint = bindings.PendingHTLCRouting_receive_keysend(payment_data == null ? 0n : CommonBase.get_ptr_of(payment_data), bindings.encodeUint8Array(bindings.check_arr_len(payment_preimage, 32)), CommonBase.get_ptr_of(payment_metadata), incoming_cltv_expiry, bindings.encodeUint64Array(custom_tlvs.map(custom_tlvs_conv_23 => custom_tlvs_conv_23 != null ? CommonBase.get_ptr_of(custom_tlvs_conv_23) : 0n))); + public static constructor_receive_keysend(payment_data: FinalOnionHopData, payment_preimage: Uint8Array, payment_metadata: Option_CVec_u8ZZ, incoming_cltv_expiry: number, custom_tlvs: TwoTuple_u64CVec_u8ZZ[], requires_blinded_error: boolean): PendingHTLCRouting { + const ret: bigint = bindings.PendingHTLCRouting_receive_keysend(CommonBase.get_ptr_of(payment_data), bindings.encodeUint8Array(bindings.check_arr_len(payment_preimage, 32)), CommonBase.get_ptr_of(payment_metadata), incoming_cltv_expiry, bindings.encodeUint64Array(custom_tlvs.map(custom_tlvs_conv_23 => CommonBase.get_ptr_of(custom_tlvs_conv_23))), requires_blinded_error); const ret_hu_conv: PendingHTLCRouting = PendingHTLCRouting.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, payment_data); @@ -733,6 +799,13 @@ export class PendingHTLCRouting_Receive extends PendingHTLCRouting { * [`RecipientOnionFields::payment_metadata`]. */ public payment_metadata: Option_CVec_u8ZZ; + /** + * The context of the payment included by the recipient in a blinded path, or `None` if a + * blinded path was not used. + * + * Used in part to determine the [`events::PaymentPurpose`]. + */ + public payment_context: Option_PaymentContextZ; /** * CLTV expiry of the received HTLC. * @@ -770,6 +843,10 @@ export class PendingHTLCRouting_Receive extends PendingHTLCRouting { const payment_metadata_hu_conv: Option_CVec_u8ZZ = Option_CVec_u8ZZ.constr_from_ptr(payment_metadata); CommonBase.add_ref_from(payment_metadata_hu_conv, this); this.payment_metadata = payment_metadata_hu_conv; + const payment_context: bigint = bindings.LDKPendingHTLCRouting_Receive_get_payment_context(ptr); + const payment_context_hu_conv: Option_PaymentContextZ = Option_PaymentContextZ.constr_from_ptr(payment_context); + CommonBase.add_ref_from(payment_context_hu_conv, this); + this.payment_context = payment_context_hu_conv; this.incoming_cltv_expiry = bindings.LDKPendingHTLCRouting_Receive_get_incoming_cltv_expiry(ptr); const phantom_shared_secret: number = bindings.LDKPendingHTLCRouting_Receive_get_phantom_shared_secret(ptr); const phantom_shared_secret_conv: Uint8Array = bindings.decodeUint8Array(phantom_shared_secret); @@ -825,6 +902,10 @@ export class PendingHTLCRouting_ReceiveKeysend extends PendingHTLCRouting { * [`RecipientOnionFields::custom_tlvs`]. */ public custom_tlvs: TwoTuple_u64CVec_u8ZZ[]; + /** + * Set if this HTLC is the final hop in a multi-hop blinded path. + */ + public requires_blinded_error: boolean; /* @internal */ public constructor(ptr: bigint) { super(null, ptr); @@ -851,5 +932,6 @@ export class PendingHTLCRouting_ReceiveKeysend extends PendingHTLCRouting { } bindings.freeWasmMemory(custom_tlvs) this.custom_tlvs = custom_tlvs_conv_23_arr; + this.requires_blinded_error = bindings.LDKPendingHTLCRouting_ReceiveKeysend_get_requires_blinded_error(ptr); } } diff --git a/ts/structs/Persist.mts b/ts/structs/Persist.mts index aaab0732..f9e58b24 100644 --- a/ts/structs/Persist.mts +++ b/ts/structs/Persist.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableSco import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -616,7 +681,7 @@ export interface PersistInterface { * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager * [`Writeable::write`]: crate::util::ser::Writeable::write */ - persist_new_channel(channel_id: OutPoint, data: ChannelMonitor, update_id: MonitorUpdateId): ChannelMonitorUpdateStatus; + persist_new_channel(channel_funding_outpoint: OutPoint, data: ChannelMonitor, update_id: MonitorUpdateId): ChannelMonitorUpdateStatus; /**Update one channel's data. The provided [`ChannelMonitor`] has already applied the given * update. * @@ -653,7 +718,13 @@ export interface PersistInterface { * * Note that update (or a relevant inner pointer) may be NULL or all-0s to represent None */ - update_persisted_channel(channel_id: OutPoint, update: ChannelMonitorUpdate, data: ChannelMonitor, update_id: MonitorUpdateId): ChannelMonitorUpdateStatus; + update_persisted_channel(channel_funding_outpoint: OutPoint, update: ChannelMonitorUpdate, data: ChannelMonitor, update_id: MonitorUpdateId): ChannelMonitorUpdateStatus; + /**Prevents the channel monitor from being loaded on startup. + * + * Archiving the data in a backup location (rather than deleting it fully) is useful for + * hedging against data loss in case of unexpected failure. + */ + archive_persisted_channel(channel_funding_outpoint: OutPoint): void; } class LDKPersistHolder { @@ -734,26 +805,31 @@ export class Persist extends CommonBase { public static new_impl(arg: PersistInterface): Persist { const impl_holder: LDKPersistHolder = new LDKPersistHolder(); let structImplementation = { - persist_new_channel (channel_id: bigint, data: bigint, update_id: bigint): ChannelMonitorUpdateStatus { - const channel_id_hu_conv: OutPoint = new OutPoint(null, channel_id); - CommonBase.add_ref_from(channel_id_hu_conv, this); + persist_new_channel (channel_funding_outpoint: bigint, data: bigint, update_id: bigint): ChannelMonitorUpdateStatus { + const channel_funding_outpoint_hu_conv: OutPoint = new OutPoint(null, channel_funding_outpoint); + CommonBase.add_ref_from(channel_funding_outpoint_hu_conv, this); const data_hu_conv: ChannelMonitor = new ChannelMonitor(null, data); const update_id_hu_conv: MonitorUpdateId = new MonitorUpdateId(null, update_id); CommonBase.add_ref_from(update_id_hu_conv, this); - const ret: ChannelMonitorUpdateStatus = arg.persist_new_channel(channel_id_hu_conv, data_hu_conv, update_id_hu_conv); + const ret: ChannelMonitorUpdateStatus = arg.persist_new_channel(channel_funding_outpoint_hu_conv, data_hu_conv, update_id_hu_conv); return ret; }, - update_persisted_channel (channel_id: bigint, update: bigint, data: bigint, update_id: bigint): ChannelMonitorUpdateStatus { - const channel_id_hu_conv: OutPoint = new OutPoint(null, channel_id); - CommonBase.add_ref_from(channel_id_hu_conv, this); + update_persisted_channel (channel_funding_outpoint: bigint, update: bigint, data: bigint, update_id: bigint): ChannelMonitorUpdateStatus { + const channel_funding_outpoint_hu_conv: OutPoint = new OutPoint(null, channel_funding_outpoint); + CommonBase.add_ref_from(channel_funding_outpoint_hu_conv, this); const update_hu_conv: ChannelMonitorUpdate = new ChannelMonitorUpdate(null, update); CommonBase.add_ref_from(update_hu_conv, this); const data_hu_conv: ChannelMonitor = new ChannelMonitor(null, data); const update_id_hu_conv: MonitorUpdateId = new MonitorUpdateId(null, update_id); CommonBase.add_ref_from(update_id_hu_conv, this); - const ret: ChannelMonitorUpdateStatus = arg.update_persisted_channel(channel_id_hu_conv, update_hu_conv, data_hu_conv, update_id_hu_conv); + const ret: ChannelMonitorUpdateStatus = arg.update_persisted_channel(channel_funding_outpoint_hu_conv, update_hu_conv, data_hu_conv, update_id_hu_conv); return ret; }, + archive_persisted_channel (channel_funding_outpoint: bigint): void { + const channel_funding_outpoint_hu_conv: OutPoint = new OutPoint(null, channel_funding_outpoint); + CommonBase.add_ref_from(channel_funding_outpoint_hu_conv, this); + arg.archive_persisted_channel(channel_funding_outpoint_hu_conv); + }, } as bindings.LDKPersist; const ptr_idx: [bigint, number] = bindings.LDKPersist_new(structImplementation); @@ -780,9 +856,9 @@ export class Persist extends CommonBase { * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager * [`Writeable::write`]: crate::util::ser::Writeable::write */ - public persist_new_channel(channel_id: OutPoint, data: ChannelMonitor, update_id: MonitorUpdateId): ChannelMonitorUpdateStatus { - const ret: ChannelMonitorUpdateStatus = bindings.Persist_persist_new_channel(this.ptr, channel_id == null ? 0n : CommonBase.get_ptr_of(channel_id), data == null ? 0n : CommonBase.get_ptr_of(data), update_id == null ? 0n : CommonBase.get_ptr_of(update_id)); - CommonBase.add_ref_from(this, channel_id); + public persist_new_channel(channel_funding_outpoint: OutPoint, data: ChannelMonitor, update_id: MonitorUpdateId): ChannelMonitorUpdateStatus { + const ret: ChannelMonitorUpdateStatus = bindings.Persist_persist_new_channel(this.ptr, CommonBase.get_ptr_of(channel_funding_outpoint), CommonBase.get_ptr_of(data), CommonBase.get_ptr_of(update_id)); + CommonBase.add_ref_from(this, channel_funding_outpoint); CommonBase.add_ref_from(this, data); CommonBase.add_ref_from(this, update_id); return ret; @@ -825,13 +901,24 @@ export class Persist extends CommonBase { * * Note that update (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public update_persisted_channel(channel_id: OutPoint, update: ChannelMonitorUpdate|null, data: ChannelMonitor, update_id: MonitorUpdateId): ChannelMonitorUpdateStatus { - const ret: ChannelMonitorUpdateStatus = bindings.Persist_update_persisted_channel(this.ptr, channel_id == null ? 0n : CommonBase.get_ptr_of(channel_id), update == null ? 0n : CommonBase.get_ptr_of(update), data == null ? 0n : CommonBase.get_ptr_of(data), update_id == null ? 0n : CommonBase.get_ptr_of(update_id)); - CommonBase.add_ref_from(this, channel_id); + public update_persisted_channel(channel_funding_outpoint: OutPoint, update: ChannelMonitorUpdate|null, data: ChannelMonitor, update_id: MonitorUpdateId): ChannelMonitorUpdateStatus { + const ret: ChannelMonitorUpdateStatus = bindings.Persist_update_persisted_channel(this.ptr, CommonBase.get_ptr_of(channel_funding_outpoint), update == null ? 0n : CommonBase.get_ptr_of(update), CommonBase.get_ptr_of(data), CommonBase.get_ptr_of(update_id)); + CommonBase.add_ref_from(this, channel_funding_outpoint); CommonBase.add_ref_from(this, update); CommonBase.add_ref_from(this, data); CommonBase.add_ref_from(this, update_id); return ret; } + /** + * Prevents the channel monitor from being loaded on startup. + * + * Archiving the data in a backup location (rather than deleting it fully) is useful for + * hedging against data loss in case of unexpected failure. + */ + public archive_persisted_channel(channel_funding_outpoint: OutPoint): void { + bindings.Persist_archive_persisted_channel(this.ptr, CommonBase.get_ptr_of(channel_funding_outpoint)); + CommonBase.add_ref_from(this, channel_funding_outpoint); + } + } diff --git a/ts/structs/Persister.mts b/ts/structs/Persister.mts index 5aeee34a..3ee219d5 100644 --- a/ts/structs/Persister.mts +++ b/ts/structs/Persister.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableSco import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -601,6 +666,8 @@ import * as bindings from '../bindings.mjs' /** An implementation of Persister */ export interface PersisterInterface { /**Persist the given ['ChannelManager'] to disk, returning an error if persistence failed. + * + * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager */ persist_manager(channel_manager: ChannelManager): Result_NoneIOErrorZ; /**Persist the given [`NetworkGraph`] to disk, returning an error if persistence failed. @@ -617,6 +684,8 @@ class LDKPersisterHolder { /** * Trait that handles persisting a [`ChannelManager`], [`NetworkGraph`], and [`WriteableScore`] to disk. + * + * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager */ export class Persister extends CommonBase { /* @internal */ @@ -638,20 +707,20 @@ export class Persister extends CommonBase { persist_manager (channel_manager: bigint): bigint { const channel_manager_hu_conv: ChannelManager = new ChannelManager(null, channel_manager); const ret: Result_NoneIOErrorZ = arg.persist_manager(channel_manager_hu_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, persist_graph (network_graph: bigint): bigint { const network_graph_hu_conv: NetworkGraph = new NetworkGraph(null, network_graph); const ret: Result_NoneIOErrorZ = arg.persist_graph(network_graph_hu_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, persist_scorer (scorer: bigint): bigint { const ret_hu_conv: WriteableScore = new WriteableScore(null, scorer); CommonBase.add_ref_from(ret_hu_conv, this); const ret: Result_NoneIOErrorZ = arg.persist_scorer(ret_hu_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, } as bindings.LDKPersister; @@ -665,9 +734,11 @@ export class Persister extends CommonBase { /** * Persist the given ['ChannelManager'] to disk, returning an error if persistence failed. + * + * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager */ public persist_manager(channel_manager: ChannelManager): Result_NoneIOErrorZ { - const ret: bigint = bindings.Persister_persist_manager(this.ptr, channel_manager == null ? 0n : CommonBase.get_ptr_of(channel_manager)); + const ret: bigint = bindings.Persister_persist_manager(this.ptr, CommonBase.get_ptr_of(channel_manager)); const ret_hu_conv: Result_NoneIOErrorZ = Result_NoneIOErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, channel_manager); return ret_hu_conv; @@ -677,7 +748,7 @@ export class Persister extends CommonBase { * Persist the given [`NetworkGraph`] to disk, returning an error if persistence failed. */ public persist_graph(network_graph: NetworkGraph): Result_NoneIOErrorZ { - const ret: bigint = bindings.Persister_persist_graph(this.ptr, network_graph == null ? 0n : CommonBase.get_ptr_of(network_graph)); + const ret: bigint = bindings.Persister_persist_graph(this.ptr, CommonBase.get_ptr_of(network_graph)); const ret_hu_conv: Result_NoneIOErrorZ = Result_NoneIOErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, network_graph); return ret_hu_conv; diff --git a/ts/structs/PhantomKeysManager.mts b/ts/structs/PhantomKeysManager.mts index bd1df6b6..17b61808 100644 --- a/ts/structs/PhantomKeysManager.mts +++ b/ts/structs/PhantomKeysManager.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -560,10 +620,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRea import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -641,6 +706,17 @@ export class PhantomKeysManager extends CommonBase { return ret_hu_conv; } + /** + * Constructs a new OutputSpender which calls the relevant methods on this_arg. + * This copies the `inner` pointer in this_arg and thus the returned OutputSpender must be freed before this_arg is + */ + public as_OutputSpender(): OutputSpender { + const ret: bigint = bindings.PhantomKeysManager_as_OutputSpender(this.ptr); + const ret_hu_conv: OutputSpender = new OutputSpender(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + /** * Constructs a new SignerProvider which calls the relevant methods on this_arg. * This copies the `inner` pointer in this_arg and thus the returned SignerProvider must be freed before this_arg is @@ -672,17 +748,6 @@ export class PhantomKeysManager extends CommonBase { return ret_hu_conv; } - /** - * See [`KeysManager::spend_spendable_outputs`] for documentation on this method. - */ - public spend_spendable_outputs(descriptors: SpendableOutputDescriptor[], outputs: TxOut[], change_destination_script: Uint8Array, feerate_sat_per_1000_weight: number, locktime: Option_u32Z): Result_TransactionNoneZ { - const ret: bigint = bindings.PhantomKeysManager_spend_spendable_outputs(this.ptr, bindings.encodeUint64Array(descriptors.map(descriptors_conv_27 => CommonBase.get_ptr_of(descriptors_conv_27))), bindings.encodeUint64Array(outputs.map(outputs_conv_7 => CommonBase.get_ptr_of(outputs_conv_7))), bindings.encodeUint8Array(change_destination_script), feerate_sat_per_1000_weight, CommonBase.get_ptr_of(locktime)); - const ret_hu_conv: Result_TransactionNoneZ = Result_TransactionNoneZ.constr_from_ptr(ret); - descriptors.forEach((descriptors_conv_27: SpendableOutputDescriptor) => { CommonBase.add_ref_from(this, descriptors_conv_27); }); - CommonBase.add_ref_from(this, locktime); - return ret_hu_conv; - } - /** * See [`KeysManager::derive_channel_keys`] for documentation on this method. */ diff --git a/ts/structs/PhantomRouteHints.mts b/ts/structs/PhantomRouteHints.mts index 1e009233..1366e1f8 100644 --- a/ts/structs/PhantomRouteHints.mts +++ b/ts/structs/PhantomRouteHints.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -628,7 +693,7 @@ export class PhantomRouteHints extends CommonBase { * The list of channels to be included in the invoice route hints. */ public set_channels(val: ChannelDetails[]): void { - bindings.PhantomRouteHints_set_channels(this.ptr, bindings.encodeUint64Array(val.map(val_conv_16 => val_conv_16 == null ? 0n : CommonBase.get_ptr_of(val_conv_16)))); + bindings.PhantomRouteHints_set_channels(this.ptr, bindings.encodeUint64Array(val.map(val_conv_16 => CommonBase.get_ptr_of(val_conv_16)))); val.forEach((val_conv_16: ChannelDetails) => { CommonBase.add_ref_from(this, val_conv_16); }); } @@ -669,7 +734,7 @@ export class PhantomRouteHints extends CommonBase { * Constructs a new PhantomRouteHints given each field */ public static constructor_new(channels_arg: ChannelDetails[], phantom_scid_arg: bigint, real_node_pubkey_arg: Uint8Array): PhantomRouteHints { - const ret: bigint = bindings.PhantomRouteHints_new(bindings.encodeUint64Array(channels_arg.map(channels_arg_conv_16 => channels_arg_conv_16 == null ? 0n : CommonBase.get_ptr_of(channels_arg_conv_16))), phantom_scid_arg, bindings.encodeUint8Array(bindings.check_arr_len(real_node_pubkey_arg, 33))); + const ret: bigint = bindings.PhantomRouteHints_new(bindings.encodeUint64Array(channels_arg.map(channels_arg_conv_16 => CommonBase.get_ptr_of(channels_arg_conv_16))), phantom_scid_arg, bindings.encodeUint8Array(bindings.check_arr_len(real_node_pubkey_arg, 33))); const ret_hu_conv: PhantomRouteHints = new PhantomRouteHints(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); channels_arg.forEach((channels_arg_conv_16: ChannelDetails) => { CommonBase.add_ref_from(ret_hu_conv, channels_arg_conv_16); }); diff --git a/ts/structs/Ping.mts b/ts/structs/Ping.mts index 5e92a878..3f13bc56 100644 --- a/ts/structs/Ping.mts +++ b/ts/structs/Ping.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -680,7 +745,7 @@ export class Ping extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: Ping): boolean { - const ret: boolean = bindings.Ping_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.Ping_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/Pong.mts b/ts/structs/Pong.mts index 14ebeef5..ec6ad3d3 100644 --- a/ts/structs/Pong.mts +++ b/ts/structs/Pong.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -665,7 +730,7 @@ export class Pong extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: Pong): boolean { - const ret: boolean = bindings.Pong_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.Pong_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/PositiveTimestamp.mts b/ts/structs/PositiveTimestamp.mts index 68b4fb06..9753b081 100644 --- a/ts/structs/PositiveTimestamp.mts +++ b/ts/structs/PositiveTimestamp.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -616,7 +681,7 @@ export class PositiveTimestamp extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: PositiveTimestamp): boolean { - const ret: boolean = bindings.PositiveTimestamp_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.PositiveTimestamp_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/PrintableString.mts b/ts/structs/PrintableString.mts index 0361cbc5..9e17fb59 100644 --- a/ts/structs/PrintableString.mts +++ b/ts/structs/PrintableString.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableSco import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/PrivateHopCandidate.mts b/ts/structs/PrivateHopCandidate.mts index 26b0a602..03994e08 100644 --- a/ts/structs/PrivateHopCandidate.mts +++ b/ts/structs/PrivateHopCandidate.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/PrivateRoute.mts b/ts/structs/PrivateRoute.mts index d74f02fb..0ee181ad 100644 --- a/ts/structs/PrivateRoute.mts +++ b/ts/structs/PrivateRoute.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -637,7 +702,7 @@ export class PrivateRoute extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: PrivateRoute): boolean { - const ret: boolean = bindings.PrivateRoute_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.PrivateRoute_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } @@ -646,7 +711,7 @@ export class PrivateRoute extends CommonBase { * Creates a new (partial) route from a list of hops */ public static constructor_new(hops: RouteHint): Result_PrivateRouteCreationErrorZ { - const ret: bigint = bindings.PrivateRoute_new(hops == null ? 0n : CommonBase.get_ptr_of(hops)); + const ret: bigint = bindings.PrivateRoute_new(CommonBase.get_ptr_of(hops)); const ret_hu_conv: Result_PrivateRouteCreationErrorZ = Result_PrivateRouteCreationErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, hops); return ret_hu_conv; diff --git a/ts/structs/ProbabilisticScorer.mts b/ts/structs/ProbabilisticScorer.mts index f070efaa..396168ba 100644 --- a/ts/structs/ProbabilisticScorer.mts +++ b/ts/structs/ProbabilisticScorer.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Record } from '../structs/Record.mjs'; import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -640,7 +705,7 @@ export class ProbabilisticScorer extends CommonBase { * through a network graph. */ public static constructor_new(decay_params: ProbabilisticScoringDecayParameters, network_graph: NetworkGraph, logger: Logger): ProbabilisticScorer { - const ret: bigint = bindings.ProbabilisticScorer_new(decay_params == null ? 0n : CommonBase.get_ptr_of(decay_params), network_graph == null ? 0n : CommonBase.get_ptr_of(network_graph), CommonBase.get_ptr_of(logger)); + const ret: bigint = bindings.ProbabilisticScorer_new(CommonBase.get_ptr_of(decay_params), CommonBase.get_ptr_of(network_graph), CommonBase.get_ptr_of(logger)); const ret_hu_conv: ProbabilisticScorer = new ProbabilisticScorer(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, decay_params); @@ -664,7 +729,7 @@ export class ProbabilisticScorer extends CommonBase { * channel with `scid` towards the given `target` node. */ public estimated_channel_liquidity_range(scid: bigint, target: NodeId): Option_C2Tuple_u64u64ZZ { - const ret: bigint = bindings.ProbabilisticScorer_estimated_channel_liquidity_range(this.ptr, scid, target == null ? 0n : CommonBase.get_ptr_of(target)); + const ret: bigint = bindings.ProbabilisticScorer_estimated_channel_liquidity_range(this.ptr, scid, CommonBase.get_ptr_of(target)); const ret_hu_conv: Option_C2Tuple_u64u64ZZ = Option_C2Tuple_u64u64ZZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, this); CommonBase.add_ref_from(this, target); @@ -700,7 +765,7 @@ export class ProbabilisticScorer extends CommonBase { * the scoring model, see [`Self::historical_estimated_payment_success_probability`]. */ public historical_estimated_channel_liquidity_probabilities(scid: bigint, target: NodeId): Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ { - const ret: bigint = bindings.ProbabilisticScorer_historical_estimated_channel_liquidity_probabilities(this.ptr, scid, target == null ? 0n : CommonBase.get_ptr_of(target)); + const ret: bigint = bindings.ProbabilisticScorer_historical_estimated_channel_liquidity_probabilities(this.ptr, scid, CommonBase.get_ptr_of(target)); const ret_hu_conv: Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ = Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, this); CommonBase.add_ref_from(this, target); @@ -717,7 +782,7 @@ export class ProbabilisticScorer extends CommonBase { * [`Self::estimated_channel_liquidity_range`]). */ public historical_estimated_payment_success_probability(scid: bigint, target: NodeId, amount_msat: bigint, params: ProbabilisticScoringFeeParameters): Option_f64Z { - const ret: bigint = bindings.ProbabilisticScorer_historical_estimated_payment_success_probability(this.ptr, scid, target == null ? 0n : CommonBase.get_ptr_of(target), amount_msat, params == null ? 0n : CommonBase.get_ptr_of(params)); + const ret: bigint = bindings.ProbabilisticScorer_historical_estimated_payment_success_probability(this.ptr, scid, CommonBase.get_ptr_of(target), amount_msat, CommonBase.get_ptr_of(params)); const ret_hu_conv: Option_f64Z = Option_f64Z.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, this); CommonBase.add_ref_from(this, target); @@ -771,7 +836,7 @@ export class ProbabilisticScorer extends CommonBase { * Read a ProbabilisticScorer from a byte array, created by ProbabilisticScorer_write */ public static constructor_read(ser: Uint8Array, arg_a: ProbabilisticScoringDecayParameters, arg_b: NetworkGraph, arg_c: Logger): Result_ProbabilisticScorerDecodeErrorZ { - const ret: bigint = bindings.ProbabilisticScorer_read(bindings.encodeUint8Array(ser), arg_a == null ? 0n : CommonBase.get_ptr_of(arg_a), arg_b == null ? 0n : CommonBase.get_ptr_of(arg_b), CommonBase.get_ptr_of(arg_c)); + const ret: bigint = bindings.ProbabilisticScorer_read(bindings.encodeUint8Array(ser), CommonBase.get_ptr_of(arg_a), CommonBase.get_ptr_of(arg_b), CommonBase.get_ptr_of(arg_c)); const ret_hu_conv: Result_ProbabilisticScorerDecodeErrorZ = Result_ProbabilisticScorerDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, arg_a); CommonBase.add_ref_from(ret_hu_conv, arg_b); diff --git a/ts/structs/ProbabilisticScoringDecayParameters.mts b/ts/structs/ProbabilisticScoringDecayParameters.mts index 351a2e6d..00af4a7f 100644 --- a/ts/structs/ProbabilisticScoringDecayParameters.mts +++ b/ts/structs/ProbabilisticScoringDecayParameters.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -560,10 +620,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRea import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/ProbabilisticScoringFeeParameters.mts b/ts/structs/ProbabilisticScoringFeeParameters.mts index f67f440d..43d8149a 100644 --- a/ts/structs/ProbabilisticScoringFeeParameters.mts +++ b/ts/structs/ProbabilisticScoringFeeParameters.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -1016,7 +1081,7 @@ export class ProbabilisticScoringFeeParameters extends CommonBase { * i.e it will be avoided during path finding. */ public add_banned(node_id: NodeId): void { - bindings.ProbabilisticScoringFeeParameters_add_banned(this.ptr, node_id == null ? 0n : CommonBase.get_ptr_of(node_id)); + bindings.ProbabilisticScoringFeeParameters_add_banned(this.ptr, CommonBase.get_ptr_of(node_id)); CommonBase.add_ref_from(this, node_id); } @@ -1025,7 +1090,7 @@ export class ProbabilisticScoringFeeParameters extends CommonBase { * they will be avoided during path finding. */ public add_banned_from_list(node_ids: NodeId[]): void { - bindings.ProbabilisticScoringFeeParameters_add_banned_from_list(this.ptr, bindings.encodeUint64Array(node_ids.map(node_ids_conv_8 => node_ids_conv_8 == null ? 0n : CommonBase.get_ptr_of(node_ids_conv_8)))); + bindings.ProbabilisticScoringFeeParameters_add_banned_from_list(this.ptr, bindings.encodeUint64Array(node_ids.map(node_ids_conv_8 => CommonBase.get_ptr_of(node_ids_conv_8)))); node_ids.forEach((node_ids_conv_8: NodeId) => { CommonBase.add_ref_from(this, node_ids_conv_8); }); } @@ -1033,7 +1098,7 @@ export class ProbabilisticScoringFeeParameters extends CommonBase { * Removes the node with the given `node_id` from the list of nodes to avoid. */ public remove_banned(node_id: NodeId): void { - bindings.ProbabilisticScoringFeeParameters_remove_banned(this.ptr, node_id == null ? 0n : CommonBase.get_ptr_of(node_id)); + bindings.ProbabilisticScoringFeeParameters_remove_banned(this.ptr, CommonBase.get_ptr_of(node_id)); CommonBase.add_ref_from(this, node_id); } @@ -1041,7 +1106,7 @@ export class ProbabilisticScoringFeeParameters extends CommonBase { * Sets a manual penalty for the given node. */ public set_manual_penalty(node_id: NodeId, penalty: bigint): void { - bindings.ProbabilisticScoringFeeParameters_set_manual_penalty(this.ptr, node_id == null ? 0n : CommonBase.get_ptr_of(node_id), penalty); + bindings.ProbabilisticScoringFeeParameters_set_manual_penalty(this.ptr, CommonBase.get_ptr_of(node_id), penalty); CommonBase.add_ref_from(this, node_id); } @@ -1049,7 +1114,7 @@ export class ProbabilisticScoringFeeParameters extends CommonBase { * Removes the node with the given `node_id` from the list of manual penalties. */ public remove_manual_penalty(node_id: NodeId): void { - bindings.ProbabilisticScoringFeeParameters_remove_manual_penalty(this.ptr, node_id == null ? 0n : CommonBase.get_ptr_of(node_id)); + bindings.ProbabilisticScoringFeeParameters_remove_manual_penalty(this.ptr, CommonBase.get_ptr_of(node_id)); CommonBase.add_ref_from(this, node_id); } diff --git a/ts/structs/ProbeSendFailure.mts b/ts/structs/ProbeSendFailure.mts index f7354d0a..6a166c8c 100644 --- a/ts/structs/ProbeSendFailure.mts +++ b/ts/structs/ProbeSendFailure.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_Th import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -655,7 +720,7 @@ export class ProbeSendFailure extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public eq(b: ProbeSendFailure): boolean { - const ret: boolean = bindings.ProbeSendFailure_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.ProbeSendFailure_eq(this.ptr, CommonBase.get_ptr_of(b)); return ret; } diff --git a/ts/structs/PublicHopCandidate.mts b/ts/structs/PublicHopCandidate.mts index 85bee5ed..55bb1544 100644 --- a/ts/structs/PublicHopCandidate.mts +++ b/ts/structs/PublicHopCandidate.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Quantity.mts b/ts/structs/Quantity.mts index 33a685ae..4dd98f5e 100644 --- a/ts/structs/Quantity.mts +++ b/ts/structs/Quantity.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,15 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -560,9 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -595,14 +660,21 @@ import { Fallback } from '../structs/Fallback.mjs'; import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; import * as bindings from '../bindings.mjs' - /** * Quantity of items supported by an [`Offer`]. */ export class Quantity extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.Quantity_free); } /* @internal */ - public constructor(_dummy: null, ptr: bigint) { - super(ptr, bindings.Quantity_free); + public static constr_from_ptr(ptr: bigint): Quantity { + const raw_ty: number = bindings.LDKQuantity_ty_from_ptr(ptr); + switch (raw_ty) { + case 0: return new Quantity_Bounded(ptr); + case 1: return new Quantity_Unbounded(ptr); + case 2: return new Quantity_One(ptr); + default: + throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface + } } public clone_ptr(): bigint { @@ -615,9 +687,62 @@ export class Quantity extends CommonBase { */ public clone(): Quantity { const ret: bigint = bindings.Quantity_clone(this.ptr); - const ret_hu_conv: Quantity = new Quantity(null, ret); + const ret_hu_conv: Quantity = Quantity.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, this); return ret_hu_conv; } + /** + * Utility method to constructs a new Bounded-variant Quantity + */ + public static constructor_bounded(a: bigint): Quantity { + const ret: bigint = bindings.Quantity_bounded(a); + const ret_hu_conv: Quantity = Quantity.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + return ret_hu_conv; + } + + /** + * Utility method to constructs a new Unbounded-variant Quantity + */ + public static constructor_unbounded(): Quantity { + const ret: bigint = bindings.Quantity_unbounded(); + const ret_hu_conv: Quantity = Quantity.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + return ret_hu_conv; + } + + /** + * Utility method to constructs a new One-variant Quantity + */ + public static constructor_one(): Quantity { + const ret: bigint = bindings.Quantity_one(); + const ret_hu_conv: Quantity = Quantity.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + return ret_hu_conv; + } + +} +/** A Quantity of type Bounded */ +export class Quantity_Bounded extends Quantity { + public bounded: bigint; + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + this.bounded = bindings.LDKQuantity_Bounded_get_bounded(ptr); + } +} +/** A Quantity of type Unbounded */ +export class Quantity_Unbounded extends Quantity { + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + } +} +/** A Quantity of type One */ +export class Quantity_One extends Quantity { + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + } } diff --git a/ts/structs/QueryChannelRange.mts b/ts/structs/QueryChannelRange.mts index dca2d2c3..7434366f 100644 --- a/ts/structs/QueryChannelRange.mts +++ b/ts/structs/QueryChannelRange.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -695,7 +760,7 @@ export class QueryChannelRange extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: QueryChannelRange): boolean { - const ret: boolean = bindings.QueryChannelRange_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.QueryChannelRange_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/QueryShortChannelIds.mts b/ts/structs/QueryShortChannelIds.mts index 00b4b642..f75d8025 100644 --- a/ts/structs/QueryShortChannelIds.mts +++ b/ts/structs/QueryShortChannelIds.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -688,7 +753,7 @@ export class QueryShortChannelIds extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: QueryShortChannelIds): boolean { - const ret: boolean = bindings.QueryShortChannelIds_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.QueryShortChannelIds_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mts b/ts/structs/RandomBytes.mts similarity index 87% rename from ts/structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mts rename to ts/structs/RandomBytes.mts index bd6f4715..c7111fc9 100644 --- a/ts/structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mts +++ b/ts/structs/RandomBytes.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,6 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +620,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -579,6 +642,8 @@ import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -597,58 +662,33 @@ import * as bindings from '../bindings.mjs' /** - * A Tuple + * An implementation of [`EntropySource`] using ChaCha20. */ -export class TwoTuple_PublicKeyCOption_SocketAddressZZ extends CommonBase { +export class RandomBytes extends CommonBase { /* @internal */ public constructor(_dummy: null, ptr: bigint) { - super(ptr, bindings.C2Tuple_PublicKeyCOption_SocketAddressZZ_free); + super(ptr, bindings.RandomBytes_free); } /** - * + * Creates a new instance using the given seed. */ - public get_a(): Uint8Array { - const ret: number = bindings.C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; - } - - /** - * - */ - public get_b(): Option_SocketAddressZ { - const ret: bigint = bindings.C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(this.ptr); - const ret_hu_conv: Option_SocketAddressZ = Option_SocketAddressZ.constr_from_ptr(ret); - CommonBase.add_ref_from(ret_hu_conv, this); + public static constructor_new(seed: Uint8Array): RandomBytes { + const ret: bigint = bindings.RandomBytes_new(bindings.encodeUint8Array(bindings.check_arr_len(seed, 32))); + const ret_hu_conv: RandomBytes = new RandomBytes(null, ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); return ret_hu_conv; } - public clone_ptr(): bigint { - const ret: bigint = bindings.C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(this.ptr); - return ret; - } - /** - * Creates a new tuple which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Constructs a new EntropySource which calls the relevant methods on this_arg. + * This copies the `inner` pointer in this_arg and thus the returned EntropySource must be freed before this_arg is */ - public clone(): TwoTuple_PublicKeyCOption_SocketAddressZZ { - const ret: bigint = bindings.C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(this.ptr); - const ret_hu_conv: TwoTuple_PublicKeyCOption_SocketAddressZZ = new TwoTuple_PublicKeyCOption_SocketAddressZZ(null, ret); + public as_EntropySource(): EntropySource { + const ret: bigint = bindings.RandomBytes_as_EntropySource(this.ptr); + const ret_hu_conv: EntropySource = new EntropySource(null, ret); CommonBase.add_ref_from(ret_hu_conv, this); return ret_hu_conv; } - /** - * Creates a new C2Tuple_PublicKeyCOption_SocketAddressZZ from the contained elements. - */ - public static constructor_new(a: Uint8Array, b: Option_SocketAddressZ): TwoTuple_PublicKeyCOption_SocketAddressZZ { - const ret: bigint = bindings.C2Tuple_PublicKeyCOption_SocketAddressZZ_new(bindings.encodeUint8Array(bindings.check_arr_len(a, 33)), CommonBase.get_ptr_of(b)); - const ret_hu_conv: TwoTuple_PublicKeyCOption_SocketAddressZZ = new TwoTuple_PublicKeyCOption_SocketAddressZZ(null, ret); - CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); - CommonBase.add_ref_from(ret_hu_conv, b); - return ret_hu_conv; - } - } diff --git a/ts/structs/RapidGossipSync.mts b/ts/structs/RapidGossipSync.mts index 9cc2088f..69c639a0 100644 --- a/ts/structs/RapidGossipSync.mts +++ b/ts/structs/RapidGossipSync.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -560,10 +620,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -578,8 +640,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class RapidGossipSync extends CommonBase { * Instantiate a new [`RapidGossipSync`] instance. */ public static constructor_new(network_graph: NetworkGraph, logger: Logger): RapidGossipSync { - const ret: bigint = bindings.RapidGossipSync_new(network_graph == null ? 0n : CommonBase.get_ptr_of(network_graph), CommonBase.get_ptr_of(logger)); + const ret: bigint = bindings.RapidGossipSync_new(CommonBase.get_ptr_of(network_graph), CommonBase.get_ptr_of(logger)); const ret_hu_conv: RapidGossipSync = new RapidGossipSync(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, network_graph); diff --git a/ts/structs/RawBolt11Invoice.mts b/ts/structs/RawBolt11Invoice.mts index b71b9240..06d6ade2 100644 --- a/ts/structs/RawBolt11Invoice.mts +++ b/ts/structs/RawBolt11Invoice.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -623,7 +688,7 @@ export class RawBolt11Invoice extends CommonBase { * data part */ public set_data(val: RawDataPart): void { - bindings.RawBolt11Invoice_set_data(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.RawBolt11Invoice_set_data(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -633,7 +698,7 @@ export class RawBolt11Invoice extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: RawBolt11Invoice): boolean { - const ret: boolean = bindings.RawBolt11Invoice_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.RawBolt11Invoice_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } @@ -768,6 +833,9 @@ export class RawBolt11Invoice extends CommonBase { return ret_conv_14_arr; } + /** + * Returns `None` if no amount is set or on overflow. + */ public amount_pico_btc(): Option_u64Z { const ret: bigint = bindings.RawBolt11Invoice_amount_pico_btc(this.ptr); const ret_hu_conv: Option_u64Z = Option_u64Z.constr_from_ptr(ret); diff --git a/ts/structs/RawDataPart.mts b/ts/structs/RawDataPart.mts index 47db700a..59729520 100644 --- a/ts/structs/RawDataPart.mts +++ b/ts/structs/RawDataPart.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -560,10 +620,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -578,8 +640,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -619,7 +684,7 @@ export class RawDataPart extends CommonBase { * generation time of the invoice */ public set_timestamp(val: PositiveTimestamp): void { - bindings.RawDataPart_set_timestamp(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.RawDataPart_set_timestamp(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -629,7 +694,7 @@ export class RawDataPart extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: RawDataPart): boolean { - const ret: boolean = bindings.RawDataPart_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.RawDataPart_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/ReadOnlyNetworkGraph.mts b/ts/structs/ReadOnlyNetworkGraph.mts index 1e2fa9fe..68c2f6cf 100644 --- a/ts/structs/ReadOnlyNetworkGraph.mts +++ b/ts/structs/ReadOnlyNetworkGraph.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -560,10 +620,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -638,7 +703,7 @@ export class ReadOnlyNetworkGraph extends CommonBase { * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ public node(node_id: NodeId): NodeInfo { - const ret: bigint = bindings.ReadOnlyNetworkGraph_node(this.ptr, node_id == null ? 0n : CommonBase.get_ptr_of(node_id)); + const ret: bigint = bindings.ReadOnlyNetworkGraph_node(this.ptr, CommonBase.get_ptr_of(node_id)); const ret_hu_conv: NodeInfo = new NodeInfo(null, ret); CommonBase.add_ref_from(ret_hu_conv, this); CommonBase.add_ref_from(this, node_id); diff --git a/ts/structs/ReceiveTlvs.mts b/ts/structs/ReceiveTlvs.mts index 818f39b0..3e7a9ec2 100644 --- a/ts/structs/ReceiveTlvs.mts +++ b/ts/structs/ReceiveTlvs.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -636,18 +701,37 @@ export class ReceiveTlvs extends CommonBase { * Constraints for the receiver of this payment. */ public set_payment_constraints(val: PaymentConstraints): void { - bindings.ReceiveTlvs_set_payment_constraints(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.ReceiveTlvs_set_payment_constraints(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); + } + + /** + * Context for the receiver of this payment. + */ + public get_payment_context(): PaymentContext { + const ret: bigint = bindings.ReceiveTlvs_get_payment_context(this.ptr); + const ret_hu_conv: PaymentContext = PaymentContext.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * Context for the receiver of this payment. + */ + public set_payment_context(val: PaymentContext): void { + bindings.ReceiveTlvs_set_payment_context(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } /** * Constructs a new ReceiveTlvs given each field */ - public static constructor_new(payment_secret_arg: Uint8Array, payment_constraints_arg: PaymentConstraints): ReceiveTlvs { - const ret: bigint = bindings.ReceiveTlvs_new(bindings.encodeUint8Array(bindings.check_arr_len(payment_secret_arg, 32)), payment_constraints_arg == null ? 0n : CommonBase.get_ptr_of(payment_constraints_arg)); + public static constructor_new(payment_secret_arg: Uint8Array, payment_constraints_arg: PaymentConstraints, payment_context_arg: PaymentContext): ReceiveTlvs { + const ret: bigint = bindings.ReceiveTlvs_new(bindings.encodeUint8Array(bindings.check_arr_len(payment_secret_arg, 32)), CommonBase.get_ptr_of(payment_constraints_arg), CommonBase.get_ptr_of(payment_context_arg)); const ret_hu_conv: ReceiveTlvs = new ReceiveTlvs(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, payment_constraints_arg); + CommonBase.add_ref_from(ret_hu_conv, payment_context_arg); return ret_hu_conv; } diff --git a/ts/structs/RecentPaymentDetails.mts b/ts/structs/RecentPaymentDetails.mts index a24b5f7c..b0b547da 100644 --- a/ts/structs/RecentPaymentDetails.mts +++ b/ts/structs/RecentPaymentDetails.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/RecipientOnionFields.mts b/ts/structs/RecipientOnionFields.mts index 37527d34..6118a8c8 100644 --- a/ts/structs/RecipientOnionFields.mts +++ b/ts/structs/RecipientOnionFields.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -39,7 +44,16 @@ import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -709,7 +774,7 @@ export class RecipientOnionFields extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: RecipientOnionFields): boolean { - const ret: boolean = bindings.RecipientOnionFields_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.RecipientOnionFields_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } @@ -773,7 +838,7 @@ export class RecipientOnionFields extends CommonBase { * See [`Self::custom_tlvs`] for more info. */ public with_custom_tlvs(custom_tlvs: TwoTuple_u64CVec_u8ZZ[]): Result_RecipientOnionFieldsNoneZ { - const ret: bigint = bindings.RecipientOnionFields_with_custom_tlvs(this.ptr, bindings.encodeUint64Array(custom_tlvs.map(custom_tlvs_conv_23 => custom_tlvs_conv_23 != null ? CommonBase.get_ptr_of(custom_tlvs_conv_23) : 0n))); + const ret: bigint = bindings.RecipientOnionFields_with_custom_tlvs(this.ptr, bindings.encodeUint64Array(custom_tlvs.map(custom_tlvs_conv_23 => CommonBase.get_ptr_of(custom_tlvs_conv_23)))); const ret_hu_conv: Result_RecipientOnionFieldsNoneZ = Result_RecipientOnionFieldsNoneZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/ts/structs/Record.mts b/ts/structs/Record.mts index 3b072203..63ea6733 100644 --- a/ts/structs/Record.mts +++ b/ts/structs/Record.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -652,10 +717,12 @@ export class Record extends CommonBase { /** * The channel id of the channel pertaining to the logged record. May be a temporary id before * the channel has been funded. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public get_channel_id(): Option_ThirtyTwoBytesZ { + public get_channel_id(): ChannelId { const ret: bigint = bindings.Record_get_channel_id(this.ptr); - const ret_hu_conv: Option_ThirtyTwoBytesZ = Option_ThirtyTwoBytesZ.constr_from_ptr(ret); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); CommonBase.add_ref_from(ret_hu_conv, this); return ret_hu_conv; } @@ -663,9 +730,11 @@ export class Record extends CommonBase { /** * The channel id of the channel pertaining to the logged record. May be a temporary id before * the channel has been funded. + * + * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public set_channel_id(val: Option_ThirtyTwoBytesZ): void { - bindings.Record_set_channel_id(this.ptr, CommonBase.get_ptr_of(val)); + public set_channel_id(val: ChannelId|null): void { + bindings.Record_set_channel_id(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -736,9 +805,10 @@ export class Record extends CommonBase { * Constructs a new Record given each field * * Note that peer_id_arg (or a relevant inner pointer) may be NULL or all-0s to represent None + * Note that channel_id_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public static constructor_new(level_arg: Level, peer_id_arg: Uint8Array|null, channel_id_arg: Option_ThirtyTwoBytesZ, args_arg: string, module_path_arg: string, file_arg: string, line_arg: number): Record { - const ret: bigint = bindings.Record_new(level_arg, bindings.encodeUint8Array(bindings.check_arr_len(peer_id_arg, 33)), CommonBase.get_ptr_of(channel_id_arg), bindings.encodeString(args_arg), bindings.encodeString(module_path_arg), bindings.encodeString(file_arg), line_arg); + public static constructor_new(level_arg: Level, peer_id_arg: Uint8Array|null, channel_id_arg: ChannelId|null, args_arg: string, module_path_arg: string, file_arg: string, line_arg: number): Record { + const ret: bigint = bindings.Record_new(level_arg, bindings.encodeUint8Array(bindings.check_arr_len(peer_id_arg, 33)), channel_id_arg == null ? 0n : CommonBase.get_ptr_of(channel_id_arg), bindings.encodeString(args_arg), bindings.encodeString(module_path_arg), bindings.encodeString(file_arg), line_arg); const ret_hu_conv: Record = new Record(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, channel_id_arg); diff --git a/ts/structs/Refund.mts b/ts/structs/Refund.mts index 8c8b17ae..335c6b44 100644 --- a/ts/structs/Refund.mts +++ b/ts/structs/Refund.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,10 +20,14 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; @@ -39,7 +44,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -764,6 +829,14 @@ export class Refund extends CommonBase { return ret_hu_conv; } + /** + * Generates a non-cryptographic 64-bit hash of the Refund. + */ + public hash(): bigint { + const ret: bigint = bindings.Refund_hash(this.ptr); + return ret; + } + /** * Serialize the Refund object into a byte array which can be read by Refund_read */ diff --git a/ts/structs/RefundMaybeWithDerivedMetadataBuilder.mts b/ts/structs/RefundMaybeWithDerivedMetadataBuilder.mts new file mode 100644 index 00000000..9c7b7160 --- /dev/null +++ b/ts/structs/RefundMaybeWithDerivedMetadataBuilder.mts @@ -0,0 +1,819 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + +/** + * Builds a [`Refund`] for the \"offer for money\" flow. + * + * See [module-level documentation] for usage. + * + * [module-level documentation]: self + */ +export class RefundMaybeWithDerivedMetadataBuilder extends CommonBase { + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.RefundMaybeWithDerivedMetadataBuilder_free); + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.RefundMaybeWithDerivedMetadataBuilder_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a copy of the RefundMaybeWithDerivedMetadataBuilder + */ + public clone(): RefundMaybeWithDerivedMetadataBuilder { + const ret: bigint = bindings.RefundMaybeWithDerivedMetadataBuilder_clone(this.ptr); + const ret_hu_conv: RefundMaybeWithDerivedMetadataBuilder = new RefundMaybeWithDerivedMetadataBuilder(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * Creates a new builder for a refund using the [`Refund::payer_id`] for the public node id to + * send to if no [`Refund::paths`] are set. Otherwise, it may be a transient pubkey. + * + * Additionally, sets the required (empty) [`Refund::description`], [`Refund::payer_metadata`], + * and [`Refund::amount_msats`]. + * + * # Note + * + * If constructing a [`Refund`] for use with a [`ChannelManager`], use + * [`ChannelManager::create_refund_builder`] instead of [`RefundBuilder::new`]. + * + * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager + * [`ChannelManager::create_refund_builder`]: crate::ln::channelmanager::ChannelManager::create_refund_builder + */ + public static constructor_new(metadata: Uint8Array, payer_id: Uint8Array, amount_msats: bigint): Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ { + const ret: bigint = bindings.RefundMaybeWithDerivedMetadataBuilder_new(bindings.encodeUint8Array(metadata), bindings.encodeUint8Array(bindings.check_arr_len(payer_id, 33)), amount_msats); + const ret_hu_conv: Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ = Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Similar to [`RefundBuilder::new`] except, if [`RefundBuilder::path`] is called, the payer id + * is derived from the given [`ExpandedKey`] and nonce. This provides sender privacy by using a + * different payer id for each refund, assuming a different nonce is used. Otherwise, the + * provided `node_id` is used for the payer id. + * + * Also, sets the metadata when [`RefundBuilder::build`] is called such that it can be used to + * verify that an [`InvoiceRequest`] was produced for the refund given an [`ExpandedKey`]. + * + * The `payment_id` is encrypted in the metadata and should be unique. This ensures that only + * one invoice will be paid for the refund and that payments can be uniquely identified. + * + * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest + * [`ExpandedKey`]: crate::ln::inbound_payment::ExpandedKey + */ + public static constructor_deriving_payer_id(node_id: Uint8Array, expanded_key: ExpandedKey, entropy_source: EntropySource, amount_msats: bigint, payment_id: Uint8Array): Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ { + const ret: bigint = bindings.RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(expanded_key), CommonBase.get_ptr_of(entropy_source), amount_msats, bindings.encodeUint8Array(bindings.check_arr_len(payment_id, 32))); + const ret_hu_conv: Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ = Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, expanded_key); + CommonBase.add_ref_from(ret_hu_conv, entropy_source); + return ret_hu_conv; + } + + /** + * Sets the [`Refund::description`]. + * + * Successive calls to this method will override the previous setting. + */ + public description(description: string): void { + bindings.RefundMaybeWithDerivedMetadataBuilder_description(this.ptr, bindings.encodeString(description)); + } + + /** + * Sets the [`Refund::absolute_expiry`] as seconds since the Unix epoch. Any expiry that has + * already passed is valid and can be checked for using [`Refund::is_expired`]. + * + * Successive calls to this method will override the previous setting. + */ + public absolute_expiry(absolute_expiry: bigint): void { + bindings.RefundMaybeWithDerivedMetadataBuilder_absolute_expiry(this.ptr, absolute_expiry); + } + + /** + * Sets the [`Refund::issuer`]. + * + * Successive calls to this method will override the previous setting. + */ + public issuer(issuer: string): void { + bindings.RefundMaybeWithDerivedMetadataBuilder_issuer(this.ptr, bindings.encodeString(issuer)); + } + + /** + * Adds a blinded path to [`Refund::paths`]. Must include at least one path if only connected + * by private channels or if [`Refund::payer_id`] is not a public node id. + * + * Successive calls to this method will add another blinded path. Caller is responsible for not + * adding duplicate paths. + */ + public path(path: BlindedPath): void { + bindings.RefundMaybeWithDerivedMetadataBuilder_path(this.ptr, CommonBase.get_ptr_of(path)); + CommonBase.add_ref_from(this, path); + } + + /** + * Sets the [`Refund::chain`] of the given [`Network`] for paying an invoice. If not + * called, [`Network::Bitcoin`] is assumed. + * + * Successive calls to this method will override the previous setting. + */ + public chain(network: Network): void { + bindings.RefundMaybeWithDerivedMetadataBuilder_chain(this.ptr, network); + } + + /** + * Sets [`Refund::quantity`] of items. This is purely for informational purposes. It is useful + * when the refund pertains to a [`Bolt12Invoice`] that paid for more than one item from an + * [`Offer`] as specified by [`InvoiceRequest::quantity`]. + * + * Successive calls to this method will override the previous setting. + * + * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice + * [`InvoiceRequest::quantity`]: crate::offers::invoice_request::InvoiceRequest::quantity + * [`Offer`]: crate::offers::offer::Offer + */ + public quantity(quantity: bigint): void { + bindings.RefundMaybeWithDerivedMetadataBuilder_quantity(this.ptr, quantity); + } + + /** + * Sets the [`Refund::payer_note`]. + * + * Successive calls to this method will override the previous setting. + */ + public payer_note(payer_note: string): void { + bindings.RefundMaybeWithDerivedMetadataBuilder_payer_note(this.ptr, bindings.encodeString(payer_note)); + } + + /** + * Builds a [`Refund`] after checking for valid semantics. + */ + public build(): Result_RefundBolt12SemanticErrorZ { + const ret: bigint = bindings.RefundMaybeWithDerivedMetadataBuilder_build(this.ptr); + const ret_hu_conv: Result_RefundBolt12SemanticErrorZ = Result_RefundBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/ts/structs/ReplyChannelRange.mts b/ts/structs/ReplyChannelRange.mts index f31cb4fc..be05606d 100644 --- a/ts/structs/ReplyChannelRange.mts +++ b/ts/structs/ReplyChannelRange.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -733,7 +798,7 @@ export class ReplyChannelRange extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: ReplyChannelRange): boolean { - const ret: boolean = bindings.ReplyChannelRange_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.ReplyChannelRange_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/ReplyShortChannelIdsEnd.mts b/ts/structs/ReplyShortChannelIdsEnd.mts index d58b5d83..ea1367ba 100644 --- a/ts/structs/ReplyShortChannelIdsEnd.mts +++ b/ts/structs/ReplyShortChannelIdsEnd.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -682,7 +747,7 @@ export class ReplyShortChannelIdsEnd extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: ReplyShortChannelIdsEnd): boolean { - const ret: boolean = bindings.ReplyShortChannelIdsEnd_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.ReplyShortChannelIdsEnd_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/Result_AcceptChannelDecodeErrorZ.mts b/ts/structs/Result_AcceptChannelDecodeErrorZ.mts index 7a893077..31d378b2 100644 --- a/ts/structs/Result_AcceptChannelDecodeErrorZ.mts +++ b/ts/structs/Result_AcceptChannelDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_AcceptChannelDecodeErrorZ extends CommonBase { * Creates a new CResult_AcceptChannelDecodeErrorZ in the success state. */ public static constructor_ok(o: AcceptChannel): Result_AcceptChannelDecodeErrorZ { - const ret: bigint = bindings.CResult_AcceptChannelDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_AcceptChannelDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_AcceptChannelDecodeErrorZ = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_AcceptChannelV2DecodeErrorZ.mts b/ts/structs/Result_AcceptChannelV2DecodeErrorZ.mts index 22ff5350..2a91f71d 100644 --- a/ts/structs/Result_AcceptChannelV2DecodeErrorZ.mts +++ b/ts/structs/Result_AcceptChannelV2DecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_AcceptChannelV2DecodeErrorZ extends CommonBase { * Creates a new CResult_AcceptChannelV2DecodeErrorZ in the success state. */ public static constructor_ok(o: AcceptChannelV2): Result_AcceptChannelV2DecodeErrorZ { - const ret: bigint = bindings.CResult_AcceptChannelV2DecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_AcceptChannelV2DecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_AcceptChannelV2DecodeErrorZ = Result_AcceptChannelV2DecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_AnnouncementSignaturesDecodeErrorZ.mts b/ts/structs/Result_AnnouncementSignaturesDecodeErrorZ.mts index 03fc292f..c1ecf688 100644 --- a/ts/structs/Result_AnnouncementSignaturesDecodeErrorZ.mts +++ b/ts/structs/Result_AnnouncementSignaturesDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_AnnouncementSignaturesDecodeErrorZ extends CommonBase { * Creates a new CResult_AnnouncementSignaturesDecodeErrorZ in the success state. */ public static constructor_ok(o: AnnouncementSignatures): Result_AnnouncementSignaturesDecodeErrorZ { - const ret: bigint = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_AnnouncementSignaturesDecodeErrorZ = Result_AnnouncementSignaturesDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_BestBlockDecodeErrorZ.mts b/ts/structs/Result_BestBlockDecodeErrorZ.mts new file mode 100644 index 00000000..7c9fc4fd --- /dev/null +++ b/ts/structs/Result_BestBlockDecodeErrorZ.mts @@ -0,0 +1,744 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + + +export class Result_BestBlockDecodeErrorZ extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.CResult_BestBlockDecodeErrorZ_free); + } + /* @internal */ + public static constr_from_ptr(ptr: bigint): Result_BestBlockDecodeErrorZ { + if (bindings.CResult_BestBlockDecodeErrorZ_is_ok(ptr)) { + return new Result_BestBlockDecodeErrorZ_OK(null, ptr); + } else { + return new Result_BestBlockDecodeErrorZ_Err(null, ptr); + } + } + /** + * Creates a new CResult_BestBlockDecodeErrorZ in the success state. + */ + public static constructor_ok(o: BestBlock): Result_BestBlockDecodeErrorZ { + const ret: bigint = bindings.CResult_BestBlockDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); + const ret_hu_conv: Result_BestBlockDecodeErrorZ = Result_BestBlockDecodeErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, o); + return ret_hu_conv; + } + + /** + * Creates a new CResult_BestBlockDecodeErrorZ in the error state. + */ + public static constructor_err(e: DecodeError): Result_BestBlockDecodeErrorZ { + const ret: bigint = bindings.CResult_BestBlockDecodeErrorZ_err(CommonBase.get_ptr_of(e)); + const ret_hu_conv: Result_BestBlockDecodeErrorZ = Result_BestBlockDecodeErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, e); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public is_ok(): boolean { + const ret: boolean = bindings.CResult_BestBlockDecodeErrorZ_is_ok(this.ptr); + return ret; + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.CResult_BestBlockDecodeErrorZ_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a new CResult_BestBlockDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public clone(): Result_BestBlockDecodeErrorZ { + const ret: bigint = bindings.CResult_BestBlockDecodeErrorZ_clone(this.ptr); + const ret_hu_conv: Result_BestBlockDecodeErrorZ = Result_BestBlockDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +export class Result_BestBlockDecodeErrorZ_OK extends Result_BestBlockDecodeErrorZ { + public res: BestBlock; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const res: bigint = bindings.CResult_BestBlockDecodeErrorZ_get_ok(ptr); + const res_hu_conv: BestBlock = new BestBlock(null, res); + CommonBase.add_ref_from(res_hu_conv, this); + this.res = res_hu_conv; + } +} +export class Result_BestBlockDecodeErrorZ_Err extends Result_BestBlockDecodeErrorZ { + public err: DecodeError; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const err: bigint = bindings.CResult_BestBlockDecodeErrorZ_get_err(ptr); + const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err); + CommonBase.add_ref_from(err_hu_conv, this); + this.err = err_hu_conv; + } +} \ No newline at end of file diff --git a/ts/structs/Result_BigSizeDecodeErrorZ.mts b/ts/structs/Result_BigSizeDecodeErrorZ.mts index 754fb5e4..1016c26e 100644 --- a/ts/structs/Result_BigSizeDecodeErrorZ.mts +++ b/ts/structs/Result_BigSizeDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_BigSizeDecodeErrorZ extends CommonBase { * Creates a new CResult_BigSizeDecodeErrorZ in the success state. */ public static constructor_ok(o: BigSize): Result_BigSizeDecodeErrorZ { - const ret: bigint = bindings.CResult_BigSizeDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_BigSizeDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_BigSizeDecodeErrorZ = Result_BigSizeDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_BlindedFailureDecodeErrorZ.mts b/ts/structs/Result_BlindedFailureDecodeErrorZ.mts index ac5eeb0a..93393e6d 100644 --- a/ts/structs/Result_BlindedFailureDecodeErrorZ.mts +++ b/ts/structs/Result_BlindedFailureDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_BlindedForwardDecodeErrorZ.mts b/ts/structs/Result_BlindedForwardDecodeErrorZ.mts index 6d088f35..50fff21f 100644 --- a/ts/structs/Result_BlindedForwardDecodeErrorZ.mts +++ b/ts/structs/Result_BlindedForwardDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_BlindedForwardDecodeErrorZ extends CommonBase { * Creates a new CResult_BlindedForwardDecodeErrorZ in the success state. */ public static constructor_ok(o: BlindedForward): Result_BlindedForwardDecodeErrorZ { - const ret: bigint = bindings.CResult_BlindedForwardDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_BlindedForwardDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_BlindedForwardDecodeErrorZ = Result_BlindedForwardDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_BlindedHopDecodeErrorZ.mts b/ts/structs/Result_BlindedHopDecodeErrorZ.mts index c29b157d..4051ef87 100644 --- a/ts/structs/Result_BlindedHopDecodeErrorZ.mts +++ b/ts/structs/Result_BlindedHopDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Resul import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_BlindedHopDecodeErrorZ extends CommonBase { * Creates a new CResult_BlindedHopDecodeErrorZ in the success state. */ public static constructor_ok(o: BlindedHop): Result_BlindedHopDecodeErrorZ { - const ret: bigint = bindings.CResult_BlindedHopDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_BlindedHopDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_BlindedHopDecodeErrorZ = Result_BlindedHopDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_BlindedHopFeaturesDecodeErrorZ.mts b/ts/structs/Result_BlindedHopFeaturesDecodeErrorZ.mts index dabf6497..4e664790 100644 --- a/ts/structs/Result_BlindedHopFeaturesDecodeErrorZ.mts +++ b/ts/structs/Result_BlindedHopFeaturesDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_BlindedHopFeaturesDecodeErrorZ extends CommonBase { * Creates a new CResult_BlindedHopFeaturesDecodeErrorZ in the success state. */ public static constructor_ok(o: BlindedHopFeatures): Result_BlindedHopFeaturesDecodeErrorZ { - const ret: bigint = bindings.CResult_BlindedHopFeaturesDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_BlindedHopFeaturesDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_BlindedHopFeaturesDecodeErrorZ = Result_BlindedHopFeaturesDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_BlindedPathDecodeErrorZ.mts b/ts/structs/Result_BlindedPathDecodeErrorZ.mts index 9c64b035..c150b48b 100644 --- a/ts/structs/Result_BlindedPathDecodeErrorZ.mts +++ b/ts/structs/Result_BlindedPathDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Resul import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_BlindedPathDecodeErrorZ extends CommonBase { * Creates a new CResult_BlindedPathDecodeErrorZ in the success state. */ public static constructor_ok(o: BlindedPath): Result_BlindedPathDecodeErrorZ { - const ret: bigint = bindings.CResult_BlindedPathDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_BlindedPathDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_BlindedPathDecodeErrorZ = Result_BlindedPathDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_BlindedPathNoneZ.mts b/ts/structs/Result_BlindedPathNoneZ.mts index 43231329..ed2429d2 100644 --- a/ts/structs/Result_BlindedPathNoneZ.mts +++ b/ts/structs/Result_BlindedPathNoneZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_BlindedPathNoneZ extends CommonBase { * Creates a new CResult_BlindedPathNoneZ in the success state. */ public static constructor_ok(o: BlindedPath): Result_BlindedPathNoneZ { - const ret: bigint = bindings.CResult_BlindedPathNoneZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_BlindedPathNoneZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_BlindedPathNoneZ = Result_BlindedPathNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_BlindedPayInfoDecodeErrorZ.mts b/ts/structs/Result_BlindedPayInfoDecodeErrorZ.mts index dbcbe2e8..3de6cdcc 100644 --- a/ts/structs/Result_BlindedPayInfoDecodeErrorZ.mts +++ b/ts/structs/Result_BlindedPayInfoDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_BlindedPayInfoDecodeErrorZ extends CommonBase { * Creates a new CResult_BlindedPayInfoDecodeErrorZ in the success state. */ public static constructor_ok(o: BlindedPayInfo): Result_BlindedPayInfoDecodeErrorZ { - const ret: bigint = bindings.CResult_BlindedPayInfoDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_BlindedPayInfoDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_BlindedPayInfoDecodeErrorZ = Result_BlindedPayInfoDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_BlindedTailDecodeErrorZ.mts b/ts/structs/Result_BlindedTailDecodeErrorZ.mts index 8fe6872c..b4a3b04e 100644 --- a/ts/structs/Result_BlindedTailDecodeErrorZ.mts +++ b/ts/structs/Result_BlindedTailDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_BlindedTailDecodeErrorZ extends CommonBase { * Creates a new CResult_BlindedTailDecodeErrorZ in the success state. */ public static constructor_ok(o: BlindedTail): Result_BlindedTailDecodeErrorZ { - const ret: bigint = bindings.CResult_BlindedTailDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_BlindedTailDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_BlindedTailDecodeErrorZ = Result_BlindedTailDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mts b/ts/structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mts index c41c75d2..83e9e5c0 100644 --- a/ts/structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mts +++ b/ts/structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_Bolt11InvoiceBolt11SemanticErrorZ extends CommonBase { * Creates a new CResult_Bolt11InvoiceBolt11SemanticErrorZ in the success state. */ public static constructor_ok(o: Bolt11Invoice): Result_Bolt11InvoiceBolt11SemanticErrorZ { - const ret: bigint = bindings.CResult_Bolt11InvoiceBolt11SemanticErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_Bolt11InvoiceBolt11SemanticErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_Bolt11InvoiceBolt11SemanticErrorZ = Result_Bolt11InvoiceBolt11SemanticErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mts b/ts/structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mts index af3416b9..91fc2761 100644 --- a/ts/structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mts +++ b/ts/structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_Bolt11InvoiceFeaturesDecodeErrorZ extends CommonBase { * Creates a new CResult_Bolt11InvoiceFeaturesDecodeErrorZ in the success state. */ public static constructor_ok(o: Bolt11InvoiceFeatures): Result_Bolt11InvoiceFeaturesDecodeErrorZ { - const ret: bigint = bindings.CResult_Bolt11InvoiceFeaturesDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_Bolt11InvoiceFeaturesDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_Bolt11InvoiceFeaturesDecodeErrorZ = Result_Bolt11InvoiceFeaturesDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mts b/ts/structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mts index 7c30c835..7f893c0e 100644 --- a/ts/structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mts +++ b/ts/structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_Bolt11InvoiceParseOrSemanticErrorZ extends CommonBase { * Creates a new CResult_Bolt11InvoiceParseOrSemanticErrorZ in the success state. */ public static constructor_ok(o: Bolt11Invoice): Result_Bolt11InvoiceParseOrSemanticErrorZ { - const ret: bigint = bindings.CResult_Bolt11InvoiceParseOrSemanticErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_Bolt11InvoiceParseOrSemanticErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_Bolt11InvoiceParseOrSemanticErrorZ = Result_Bolt11InvoiceParseOrSemanticErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mts b/ts/structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mts index c8a2c8f1..6375c448 100644 --- a/ts/structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mts +++ b/ts/structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_Bolt11InvoiceSignOrCreationErrorZ extends CommonBase { * Creates a new CResult_Bolt11InvoiceSignOrCreationErrorZ in the success state. */ public static constructor_ok(o: Bolt11Invoice): Result_Bolt11InvoiceSignOrCreationErrorZ { - const ret: bigint = bindings.CResult_Bolt11InvoiceSignOrCreationErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_Bolt11InvoiceSignOrCreationErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_Bolt11InvoiceSignOrCreationErrorZ = Result_Bolt11InvoiceSignOrCreationErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mts b/ts/structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mts new file mode 100644 index 00000000..06863f6e --- /dev/null +++ b/ts/structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mts @@ -0,0 +1,740 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + + +export class Result_Bolt12InvoiceBolt12SemanticErrorZ extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_free); + } + /* @internal */ + public static constr_from_ptr(ptr: bigint): Result_Bolt12InvoiceBolt12SemanticErrorZ { + if (bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_Bolt12InvoiceBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_Bolt12InvoiceBolt12SemanticErrorZ_Err(null, ptr); + } + } + /** + * Creates a new CResult_Bolt12InvoiceBolt12SemanticErrorZ in the success state. + */ + public static constructor_ok(o: Bolt12Invoice): Result_Bolt12InvoiceBolt12SemanticErrorZ { + const ret: bigint = bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok(CommonBase.get_ptr_of(o)); + const ret_hu_conv: Result_Bolt12InvoiceBolt12SemanticErrorZ = Result_Bolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, o); + return ret_hu_conv; + } + + /** + * Creates a new CResult_Bolt12InvoiceBolt12SemanticErrorZ in the error state. + */ + public static constructor_err(e: Bolt12SemanticError): Result_Bolt12InvoiceBolt12SemanticErrorZ { + const ret: bigint = bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_err(e); + const ret_hu_conv: Result_Bolt12InvoiceBolt12SemanticErrorZ = Result_Bolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public is_ok(): boolean { + const ret: boolean = bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(this.ptr); + return ret; + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a new CResult_Bolt12InvoiceBolt12SemanticErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public clone(): Result_Bolt12InvoiceBolt12SemanticErrorZ { + const ret: bigint = bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(this.ptr); + const ret_hu_conv: Result_Bolt12InvoiceBolt12SemanticErrorZ = Result_Bolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +export class Result_Bolt12InvoiceBolt12SemanticErrorZ_OK extends Result_Bolt12InvoiceBolt12SemanticErrorZ { + public res: Bolt12Invoice; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const res: bigint = bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(ptr); + const res_hu_conv: Bolt12Invoice = new Bolt12Invoice(null, res); + CommonBase.add_ref_from(res_hu_conv, this); + this.res = res_hu_conv; + } +} +export class Result_Bolt12InvoiceBolt12SemanticErrorZ_Err extends Result_Bolt12InvoiceBolt12SemanticErrorZ { + public err: Bolt12SemanticError; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + this.err = bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(ptr); + } +} \ No newline at end of file diff --git a/ts/structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mts b/ts/structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mts index 0ba8336b..dc6e2793 100644 --- a/ts/structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mts +++ b/ts/structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_Bolt12InvoiceFeaturesDecodeErrorZ extends CommonBase { * Creates a new CResult_Bolt12InvoiceFeaturesDecodeErrorZ in the success state. */ public static constructor_ok(o: Bolt12InvoiceFeatures): Result_Bolt12InvoiceFeaturesDecodeErrorZ { - const ret: bigint = bindings.CResult_Bolt12InvoiceFeaturesDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_Bolt12InvoiceFeaturesDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_Bolt12InvoiceFeaturesDecodeErrorZ = Result_Bolt12InvoiceFeaturesDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_Bolt12OfferContextDecodeErrorZ.mts b/ts/structs/Result_Bolt12OfferContextDecodeErrorZ.mts new file mode 100644 index 00000000..162613f9 --- /dev/null +++ b/ts/structs/Result_Bolt12OfferContextDecodeErrorZ.mts @@ -0,0 +1,744 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + + +export class Result_Bolt12OfferContextDecodeErrorZ extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.CResult_Bolt12OfferContextDecodeErrorZ_free); + } + /* @internal */ + public static constr_from_ptr(ptr: bigint): Result_Bolt12OfferContextDecodeErrorZ { + if (bindings.CResult_Bolt12OfferContextDecodeErrorZ_is_ok(ptr)) { + return new Result_Bolt12OfferContextDecodeErrorZ_OK(null, ptr); + } else { + return new Result_Bolt12OfferContextDecodeErrorZ_Err(null, ptr); + } + } + /** + * Creates a new CResult_Bolt12OfferContextDecodeErrorZ in the success state. + */ + public static constructor_ok(o: Bolt12OfferContext): Result_Bolt12OfferContextDecodeErrorZ { + const ret: bigint = bindings.CResult_Bolt12OfferContextDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); + const ret_hu_conv: Result_Bolt12OfferContextDecodeErrorZ = Result_Bolt12OfferContextDecodeErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, o); + return ret_hu_conv; + } + + /** + * Creates a new CResult_Bolt12OfferContextDecodeErrorZ in the error state. + */ + public static constructor_err(e: DecodeError): Result_Bolt12OfferContextDecodeErrorZ { + const ret: bigint = bindings.CResult_Bolt12OfferContextDecodeErrorZ_err(CommonBase.get_ptr_of(e)); + const ret_hu_conv: Result_Bolt12OfferContextDecodeErrorZ = Result_Bolt12OfferContextDecodeErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, e); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public is_ok(): boolean { + const ret: boolean = bindings.CResult_Bolt12OfferContextDecodeErrorZ_is_ok(this.ptr); + return ret; + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a new CResult_Bolt12OfferContextDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public clone(): Result_Bolt12OfferContextDecodeErrorZ { + const ret: bigint = bindings.CResult_Bolt12OfferContextDecodeErrorZ_clone(this.ptr); + const ret_hu_conv: Result_Bolt12OfferContextDecodeErrorZ = Result_Bolt12OfferContextDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +export class Result_Bolt12OfferContextDecodeErrorZ_OK extends Result_Bolt12OfferContextDecodeErrorZ { + public res: Bolt12OfferContext; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const res: bigint = bindings.CResult_Bolt12OfferContextDecodeErrorZ_get_ok(ptr); + const res_hu_conv: Bolt12OfferContext = new Bolt12OfferContext(null, res); + CommonBase.add_ref_from(res_hu_conv, this); + this.res = res_hu_conv; + } +} +export class Result_Bolt12OfferContextDecodeErrorZ_Err extends Result_Bolt12OfferContextDecodeErrorZ { + public err: DecodeError; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const err: bigint = bindings.CResult_Bolt12OfferContextDecodeErrorZ_get_err(ptr); + const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err); + CommonBase.add_ref_from(err_hu_conv, this); + this.err = err_hu_conv; + } +} \ No newline at end of file diff --git a/ts/structs/Result_Bolt12RefundContextDecodeErrorZ.mts b/ts/structs/Result_Bolt12RefundContextDecodeErrorZ.mts new file mode 100644 index 00000000..c7917a70 --- /dev/null +++ b/ts/structs/Result_Bolt12RefundContextDecodeErrorZ.mts @@ -0,0 +1,744 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + + +export class Result_Bolt12RefundContextDecodeErrorZ extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.CResult_Bolt12RefundContextDecodeErrorZ_free); + } + /* @internal */ + public static constr_from_ptr(ptr: bigint): Result_Bolt12RefundContextDecodeErrorZ { + if (bindings.CResult_Bolt12RefundContextDecodeErrorZ_is_ok(ptr)) { + return new Result_Bolt12RefundContextDecodeErrorZ_OK(null, ptr); + } else { + return new Result_Bolt12RefundContextDecodeErrorZ_Err(null, ptr); + } + } + /** + * Creates a new CResult_Bolt12RefundContextDecodeErrorZ in the success state. + */ + public static constructor_ok(o: Bolt12RefundContext): Result_Bolt12RefundContextDecodeErrorZ { + const ret: bigint = bindings.CResult_Bolt12RefundContextDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); + const ret_hu_conv: Result_Bolt12RefundContextDecodeErrorZ = Result_Bolt12RefundContextDecodeErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, o); + return ret_hu_conv; + } + + /** + * Creates a new CResult_Bolt12RefundContextDecodeErrorZ in the error state. + */ + public static constructor_err(e: DecodeError): Result_Bolt12RefundContextDecodeErrorZ { + const ret: bigint = bindings.CResult_Bolt12RefundContextDecodeErrorZ_err(CommonBase.get_ptr_of(e)); + const ret_hu_conv: Result_Bolt12RefundContextDecodeErrorZ = Result_Bolt12RefundContextDecodeErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, e); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public is_ok(): boolean { + const ret: boolean = bindings.CResult_Bolt12RefundContextDecodeErrorZ_is_ok(this.ptr); + return ret; + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a new CResult_Bolt12RefundContextDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public clone(): Result_Bolt12RefundContextDecodeErrorZ { + const ret: bigint = bindings.CResult_Bolt12RefundContextDecodeErrorZ_clone(this.ptr); + const ret_hu_conv: Result_Bolt12RefundContextDecodeErrorZ = Result_Bolt12RefundContextDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +export class Result_Bolt12RefundContextDecodeErrorZ_OK extends Result_Bolt12RefundContextDecodeErrorZ { + public res: Bolt12RefundContext; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const res: bigint = bindings.CResult_Bolt12RefundContextDecodeErrorZ_get_ok(ptr); + const res_hu_conv: Bolt12RefundContext = new Bolt12RefundContext(null, res); + CommonBase.add_ref_from(res_hu_conv, this); + this.res = res_hu_conv; + } +} +export class Result_Bolt12RefundContextDecodeErrorZ_Err extends Result_Bolt12RefundContextDecodeErrorZ { + public err: DecodeError; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const err: bigint = bindings.CResult_Bolt12RefundContextDecodeErrorZ_get_err(ptr); + const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err); + CommonBase.add_ref_from(err_hu_conv, this); + this.err = err_hu_conv; + } +} \ No newline at end of file diff --git a/ts/structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mts b/ts/structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mts index 3bd70b21..6776be09 100644 --- a/ts/structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mts +++ b/ts/structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_BuiltCommitmentTransactionDecodeErrorZ extends CommonBase { * Creates a new CResult_BuiltCommitmentTransactionDecodeErrorZ in the success state. */ public static constructor_ok(o: BuiltCommitmentTransaction): Result_BuiltCommitmentTransactionDecodeErrorZ { - const ret: bigint = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_BuiltCommitmentTransactionDecodeErrorZ = Result_BuiltCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mts b/ts/structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mts new file mode 100644 index 00000000..a5397dbe --- /dev/null +++ b/ts/structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mts @@ -0,0 +1,728 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + + +export class Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free); + } + /* @internal */ + public static constr_from_ptr(ptr: bigint): Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ { + if (bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(ptr)) { + return new Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_OK(null, ptr); + } else { + return new Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_Err(null, ptr); + } + } + /** + * Creates a new CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ in the success state. + */ + public static constructor_ok(o: TwoTuple_BestBlockOutputSweeperZ): Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ { + const ret: bigint = bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); + const ret_hu_conv: Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ = Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Creates a new CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ in the error state. + */ + public static constructor_err(e: DecodeError): Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ { + const ret: bigint = bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err(CommonBase.get_ptr_of(e)); + const ret_hu_conv: Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ = Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, e); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public is_ok(): boolean { + const ret: boolean = bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(this.ptr); + return ret; + } + +} +export class Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_OK extends Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ { + public res: TwoTuple_BestBlockOutputSweeperZ; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const res: bigint = bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(ptr); + const res_hu_conv: TwoTuple_BestBlockOutputSweeperZ = new TwoTuple_BestBlockOutputSweeperZ(null, res); + CommonBase.add_ref_from(res_hu_conv, this); + this.res = res_hu_conv; + } +} +export class Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_Err extends Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ { + public err: DecodeError; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const err: bigint = bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(ptr); + const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err); + CommonBase.add_ref_from(err_hu_conv, this); + this.err = err_hu_conv; + } +} \ No newline at end of file diff --git a/ts/structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mts b/ts/structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mts index f047cf92..eb0d0445 100644 --- a/ts/structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mts +++ b/ts/structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ extends CommonBase { * Creates a new CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ in the success state. */ public static constructor_ok(o: TwoTuple_BlindedPayInfoBlindedPathZ): Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ { - const ret: bigint = bindings.CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ_ok(o != null ? CommonBase.get_ptr_of(o) : 0n); + const ret: bigint = bindings.CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ = Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/ts/structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mts b/ts/structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mts index 533642fc..f85f6e7a 100644 --- a/ts/structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mts +++ b/ts/structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_C2Tuple_CVec_u8Zu64ZNoneZ extends CommonBase { * Creates a new CResult_C2Tuple_CVec_u8Zu64ZNoneZ in the success state. */ public static constructor_ok(o: TwoTuple_CVec_u8Zu64Z): Result_C2Tuple_CVec_u8Zu64ZNoneZ { - const ret: bigint = bindings.CResult_C2Tuple_CVec_u8Zu64ZNoneZ_ok(o != null ? CommonBase.get_ptr_of(o) : 0n); + const ret: bigint = bindings.CResult_C2Tuple_CVec_u8Zu64ZNoneZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_C2Tuple_CVec_u8Zu64ZNoneZ = Result_C2Tuple_CVec_u8Zu64ZNoneZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/ts/structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mts b/ts/structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mts index 723002cf..90c7e539 100644 --- a/ts/structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mts +++ b/ts/structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ extends Com * Creates a new CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ in the success state. */ public static constructor_ok(o: TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ): Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ { - const ret: bigint = bindings.CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_ok(o != null ? CommonBase.get_ptr_of(o) : 0n); + const ret: bigint = bindings.CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ = Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/ts/structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mts b/ts/structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mts index 0bda90f0..da63c88d 100644 --- a/ts/structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mts +++ b/ts/structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ extends Co * Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ in the success state. */ public static constructor_ok(o: TwoTuple_ThirtyTwoBytesChannelManagerZ): Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ { - const ret: bigint = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_ok(o != null ? CommonBase.get_ptr_of(o) : 0n); + const ret: bigint = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ = Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/ts/structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mts b/ts/structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mts index 1c1426e8..0e0bfd01 100644 --- a/ts/structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mts +++ b/ts/structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ extends Co * Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ in the success state. */ public static constructor_ok(o: TwoTuple_ThirtyTwoBytesChannelMonitorZ): Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ { - const ret: bigint = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_ok(o != null ? CommonBase.get_ptr_of(o) : 0n); + const ret: bigint = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ = Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/ts/structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mts b/ts/structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mts index 30bd3cf0..8d287c37 100644 --- a/ts/structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mts +++ b/ts/structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs' import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ extends Common * Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ in the success state. */ public static constructor_ok(o: TwoTuple_ThirtyTwoBytesChannelMonitorZ): Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ { - const ret: bigint = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_ok(o != null ? CommonBase.get_ptr_of(o) : 0n); + const ret: bigint = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ = Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/ts/structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mts b/ts/structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mts index f12f8e65..a69eccd5 100644 --- a/ts/structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mts +++ b/ts/structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,11 +269,12 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ extends CommonBas * Creates a new CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ in the success state. */ public static constructor_ok(o: TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ): Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ { - const ret: bigint = bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok(o != null ? CommonBase.get_ptr_of(o) : 0n); + const ret: bigint = bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ = Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/ts/structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mts b/ts/structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mts index 5c69cc72..b05aa06b 100644 --- a/ts/structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mts +++ b/ts/structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_Th import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ ext * Creates a new CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ in the success state. */ public static constructor_ok(o: TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ): Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ { - const ret: bigint = bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_ok(o != null ? CommonBase.get_ptr_of(o) : 0n); + const ret: bigint = bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ = Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/ts/structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mts b/ts/structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mts index eede9932..883ea62a 100644 --- a/ts/structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mts +++ b/ts/structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,16 +508,22 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSe * Creates a new CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ in the success state. */ public static constructor_ok(o: ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ): Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ { - const ret: bigint = bindings.CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_ok(o != null ? CommonBase.get_ptr_of(o) : 0n); + const ret: bigint = bindings.CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ = Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -636,6 +701,21 @@ export class Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSe return ret; } + public clone_ptr(): bigint { + const ret: bigint = bindings.CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a new CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public clone(): Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ { + const ret: bigint = bindings.CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(this.ptr); + const ret_hu_conv: Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ = Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + } export class Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_OK extends Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ { public res: ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ; diff --git a/ts/structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mts b/ts/structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mts index 71f7cb9f..1bfc70ab 100644 --- a/ts/structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mts +++ b/ts/structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,16 +508,22 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; -import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNo * Creates a new CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ in the success state. */ public static constructor_ok(o: ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ): Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ { - const ret: bigint = bindings.CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok(o != null ? CommonBase.get_ptr_of(o) : 0n); + const ret: bigint = bindings.CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ = Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/ts/structs/Result_COption_APIErrorZDecodeErrorZ.mts b/ts/structs/Result_COption_APIErrorZDecodeErrorZ.mts index ad3feac0..0b6667b4 100644 --- a/ts/structs/Result_COption_APIErrorZDecodeErrorZ.mts +++ b/ts/structs/Result_COption_APIErrorZDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_COption_ClosureReasonZDecodeErrorZ.mts b/ts/structs/Result_COption_ClosureReasonZDecodeErrorZ.mts index 54bdf0bd..b2aced77 100644 --- a/ts/structs/Result_COption_ClosureReasonZDecodeErrorZ.mts +++ b/ts/structs/Result_COption_ClosureReasonZDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_COption_EventZDecodeErrorZ.mts b/ts/structs/Result_COption_EventZDecodeErrorZ.mts index 1836da3d..b1d0aa8e 100644 --- a/ts/structs/Result_COption_EventZDecodeErrorZ.mts +++ b/ts/structs/Result_COption_EventZDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_COption_HTLCDestinationZDecodeErrorZ.mts b/ts/structs/Result_COption_HTLCDestinationZDecodeErrorZ.mts index cdf82272..d1c8d956 100644 --- a/ts/structs/Result_COption_HTLCDestinationZDecodeErrorZ.mts +++ b/ts/structs/Result_COption_HTLCDestinationZDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_COption_MonitorEventZDecodeErrorZ.mts b/ts/structs/Result_COption_MonitorEventZDecodeErrorZ.mts index 7bf22443..999cfa72 100644 --- a/ts/structs/Result_COption_MonitorEventZDecodeErrorZ.mts +++ b/ts/structs/Result_COption_MonitorEventZDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_COption_NetworkUpdateZDecodeErrorZ.mts b/ts/structs/Result_COption_NetworkUpdateZDecodeErrorZ.mts index 27334c77..0ed37a73 100644 --- a/ts/structs/Result_COption_NetworkUpdateZDecodeErrorZ.mts +++ b/ts/structs/Result_COption_NetworkUpdateZDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mts b/ts/structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mts index 9d75a9a7..5058cf29 100644 --- a/ts/structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mts +++ b/ts/structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_COption_PathFailureZDecodeErrorZ.mts b/ts/structs/Result_COption_PathFailureZDecodeErrorZ.mts index 45033368..3767e10e 100644 --- a/ts/structs/Result_COption_PathFailureZDecodeErrorZ.mts +++ b/ts/structs/Result_COption_PathFailureZDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_COption_TypeZDecodeErrorZ.mts b/ts/structs/Result_COption_TypeZDecodeErrorZ.mts index aefccec1..72f38b4a 100644 --- a/ts/structs/Result_COption_TypeZDecodeErrorZ.mts +++ b/ts/structs/Result_COption_TypeZDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Res import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_CVec_BlindedPathZNoneZ.mts b/ts/structs/Result_CVec_BlindedPathZNoneZ.mts index 6ed376d7..c499a593 100644 --- a/ts/structs/Result_CVec_BlindedPathZNoneZ.mts +++ b/ts/structs/Result_CVec_BlindedPathZNoneZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_CVec_BlindedPathZNoneZ extends CommonBase { * Creates a new CResult_CVec_BlindedPathZNoneZ in the success state. */ public static constructor_ok(o: BlindedPath[]): Result_CVec_BlindedPathZNoneZ { - const ret: bigint = bindings.CResult_CVec_BlindedPathZNoneZ_ok(bindings.encodeUint64Array(o.map(o_conv_13 => o_conv_13 == null ? 0n : CommonBase.get_ptr_of(o_conv_13)))); + const ret: bigint = bindings.CResult_CVec_BlindedPathZNoneZ_ok(bindings.encodeUint64Array(o.map(o_conv_13 => CommonBase.get_ptr_of(o_conv_13)))); const ret_hu_conv: Result_CVec_BlindedPathZNoneZ = Result_CVec_BlindedPathZNoneZ.constr_from_ptr(ret); o.forEach((o_conv_13: BlindedPath) => { CommonBase.add_ref_from(ret_hu_conv, o_conv_13); }); return ret_hu_conv; diff --git a/ts/structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mts b/ts/structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mts index 38b686a6..4d1f2a46 100644 --- a/ts/structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mts +++ b/ts/structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ extends Common * Creates a new CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ in the success state. */ public static constructor_ok(o: TwoTuple_BlindedPayInfoBlindedPathZ[]): Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ { - const ret: bigint = bindings.CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_ok(bindings.encodeUint64Array(o.map(o_conv_37 => o_conv_37 != null ? CommonBase.get_ptr_of(o_conv_37) : 0n))); + const ret: bigint = bindings.CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_ok(bindings.encodeUint64Array(o.map(o_conv_37 => CommonBase.get_ptr_of(o_conv_37)))); const ret_hu_conv: Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ = Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/ts/structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mts b/ts/structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mts index 33cef995..f0cb7cfe 100644 --- a/ts/structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mts +++ b/ts/structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs' import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ extends * Creates a new CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ in the success state. */ public static constructor_ok(o: TwoTuple_ThirtyTwoBytesChannelMonitorZ[]): Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ { - const ret: bigint = bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_ok(bindings.encodeUint64Array(o.map(o_conv_40 => o_conv_40 != null ? CommonBase.get_ptr_of(o_conv_40) : 0n))); + const ret: bigint = bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_ok(bindings.encodeUint64Array(o.map(o_conv_40 => CommonBase.get_ptr_of(o_conv_40)))); const ret_hu_conv: Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ = Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/ts/structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mts b/ts/structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mts index 09d02543..131df279 100644 --- a/ts/structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mts +++ b/ts/structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_Th import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ * Creates a new CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ in the success state. */ public static constructor_ok(o: TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ[]): Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ { - const ret: bigint = bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_ok(bindings.encodeUint64Array(o.map(o_conv_40 => o_conv_40 != null ? CommonBase.get_ptr_of(o_conv_40) : 0n))); + const ret: bigint = bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_ok(bindings.encodeUint64Array(o.map(o_conv_40 => CommonBase.get_ptr_of(o_conv_40)))); const ret_hu_conv: Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ = Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/ts/structs/Result_CVec_ECDSASignatureZNoneZ.mts b/ts/structs/Result_CVec_ECDSASignatureZNoneZ.mts index b621983c..0e172339 100644 --- a/ts/structs/Result_CVec_ECDSASignatureZNoneZ.mts +++ b/ts/structs/Result_CVec_ECDSASignatureZNoneZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_CVec_StrZIOErrorZ.mts b/ts/structs/Result_CVec_StrZIOErrorZ.mts index 1c1116c6..f05287c5 100644 --- a/ts/structs/Result_CVec_StrZIOErrorZ.mts +++ b/ts/structs/Result_CVec_StrZIOErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs' import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_CVec_UtxoZNoneZ.mts b/ts/structs/Result_CVec_UtxoZNoneZ.mts index c4c0ac82..681d334b 100644 --- a/ts/structs/Result_CVec_UtxoZNoneZ.mts +++ b/ts/structs/Result_CVec_UtxoZNoneZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_CVec_UtxoZNoneZ extends CommonBase { * Creates a new CResult_CVec_UtxoZNoneZ in the success state. */ public static constructor_ok(o: Utxo[]): Result_CVec_UtxoZNoneZ { - const ret: bigint = bindings.CResult_CVec_UtxoZNoneZ_ok(bindings.encodeUint64Array(o.map(o_conv_6 => o_conv_6 == null ? 0n : CommonBase.get_ptr_of(o_conv_6)))); + const ret: bigint = bindings.CResult_CVec_UtxoZNoneZ_ok(bindings.encodeUint64Array(o.map(o_conv_6 => CommonBase.get_ptr_of(o_conv_6)))); const ret_hu_conv: Result_CVec_UtxoZNoneZ = Result_CVec_UtxoZNoneZ.constr_from_ptr(ret); o.forEach((o_conv_6: Utxo) => { CommonBase.add_ref_from(ret_hu_conv, o_conv_6); }); return ret_hu_conv; diff --git a/ts/structs/Result_CVec_u8ZIOErrorZ.mts b/ts/structs/Result_CVec_u8ZIOErrorZ.mts index 8ec23740..e22309d5 100644 --- a/ts/structs/Result_CVec_u8ZIOErrorZ.mts +++ b/ts/structs/Result_CVec_u8ZIOErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_CVec_u8ZNoneZ.mts b/ts/structs/Result_CVec_u8ZNoneZ.mts index 5b1dea3f..590a6d92 100644 --- a/ts/structs/Result_CVec_u8ZNoneZ.mts +++ b/ts/structs/Result_CVec_u8ZNoneZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_CVec_u8ZPeerHandleErrorZ.mts b/ts/structs/Result_CVec_u8ZPeerHandleErrorZ.mts index cc4ce559..87b7e7b4 100644 --- a/ts/structs/Result_CVec_u8ZPeerHandleErrorZ.mts +++ b/ts/structs/Result_CVec_u8ZPeerHandleErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -622,7 +687,7 @@ export class Result_CVec_u8ZPeerHandleErrorZ extends CommonBase { * Creates a new CResult_CVec_u8ZPeerHandleErrorZ in the error state. */ public static constructor_err(e: PeerHandleError): Result_CVec_u8ZPeerHandleErrorZ { - const ret: bigint = bindings.CResult_CVec_u8ZPeerHandleErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e)); + const ret: bigint = bindings.CResult_CVec_u8ZPeerHandleErrorZ_err(CommonBase.get_ptr_of(e)); const ret_hu_conv: Result_CVec_u8ZPeerHandleErrorZ = Result_CVec_u8ZPeerHandleErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, e); return ret_hu_conv; diff --git a/ts/structs/Result_ChannelAnnouncementDecodeErrorZ.mts b/ts/structs/Result_ChannelAnnouncementDecodeErrorZ.mts index 8fc2feef..66a47d4b 100644 --- a/ts/structs/Result_ChannelAnnouncementDecodeErrorZ.mts +++ b/ts/structs/Result_ChannelAnnouncementDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_ChannelAnnouncementDecodeErrorZ extends CommonBase { * Creates a new CResult_ChannelAnnouncementDecodeErrorZ in the success state. */ public static constructor_ok(o: ChannelAnnouncement): Result_ChannelAnnouncementDecodeErrorZ { - const ret: bigint = bindings.CResult_ChannelAnnouncementDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_ChannelAnnouncementDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_ChannelAnnouncementDecodeErrorZ = Result_ChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_ChannelConfigDecodeErrorZ.mts b/ts/structs/Result_ChannelConfigDecodeErrorZ.mts index bf52a957..2a742bb9 100644 --- a/ts/structs/Result_ChannelConfigDecodeErrorZ.mts +++ b/ts/structs/Result_ChannelConfigDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_ChannelConfigDecodeErrorZ extends CommonBase { * Creates a new CResult_ChannelConfigDecodeErrorZ in the success state. */ public static constructor_ok(o: ChannelConfig): Result_ChannelConfigDecodeErrorZ { - const ret: bigint = bindings.CResult_ChannelConfigDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_ChannelConfigDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_ChannelConfigDecodeErrorZ = Result_ChannelConfigDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_ChannelCounterpartyDecodeErrorZ.mts b/ts/structs/Result_ChannelCounterpartyDecodeErrorZ.mts index ded51680..3c87e5bd 100644 --- a/ts/structs/Result_ChannelCounterpartyDecodeErrorZ.mts +++ b/ts/structs/Result_ChannelCounterpartyDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_ChannelCounterpartyDecodeErrorZ extends CommonBase { * Creates a new CResult_ChannelCounterpartyDecodeErrorZ in the success state. */ public static constructor_ok(o: ChannelCounterparty): Result_ChannelCounterpartyDecodeErrorZ { - const ret: bigint = bindings.CResult_ChannelCounterpartyDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_ChannelCounterpartyDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_ChannelCounterpartyDecodeErrorZ = Result_ChannelCounterpartyDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_ChannelDerivationParametersDecodeErrorZ.mts b/ts/structs/Result_ChannelDerivationParametersDecodeErrorZ.mts index de30c545..3ed7daa6 100644 --- a/ts/structs/Result_ChannelDerivationParametersDecodeErrorZ.mts +++ b/ts/structs/Result_ChannelDerivationParametersDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_ChannelDerivationParametersDecodeErrorZ extends CommonBase { * Creates a new CResult_ChannelDerivationParametersDecodeErrorZ in the success state. */ public static constructor_ok(o: ChannelDerivationParameters): Result_ChannelDerivationParametersDecodeErrorZ { - const ret: bigint = bindings.CResult_ChannelDerivationParametersDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_ChannelDerivationParametersDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_ChannelDerivationParametersDecodeErrorZ = Result_ChannelDerivationParametersDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_ChannelDetailsDecodeErrorZ.mts b/ts/structs/Result_ChannelDetailsDecodeErrorZ.mts index 322fc834..9c299afe 100644 --- a/ts/structs/Result_ChannelDetailsDecodeErrorZ.mts +++ b/ts/structs/Result_ChannelDetailsDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_ChannelDetailsDecodeErrorZ extends CommonBase { * Creates a new CResult_ChannelDetailsDecodeErrorZ in the success state. */ public static constructor_ok(o: ChannelDetails): Result_ChannelDetailsDecodeErrorZ { - const ret: bigint = bindings.CResult_ChannelDetailsDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_ChannelDetailsDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_ChannelDetailsDecodeErrorZ = Result_ChannelDetailsDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_ChannelFeaturesDecodeErrorZ.mts b/ts/structs/Result_ChannelFeaturesDecodeErrorZ.mts index c21b11cf..94925c53 100644 --- a/ts/structs/Result_ChannelFeaturesDecodeErrorZ.mts +++ b/ts/structs/Result_ChannelFeaturesDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_ChannelFeaturesDecodeErrorZ extends CommonBase { * Creates a new CResult_ChannelFeaturesDecodeErrorZ in the success state. */ public static constructor_ok(o: ChannelFeatures): Result_ChannelFeaturesDecodeErrorZ { - const ret: bigint = bindings.CResult_ChannelFeaturesDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_ChannelFeaturesDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_ChannelFeaturesDecodeErrorZ = Result_ChannelFeaturesDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_ChannelIdAPIErrorZ.mts b/ts/structs/Result_ChannelIdAPIErrorZ.mts new file mode 100644 index 00000000..ac272856 --- /dev/null +++ b/ts/structs/Result_ChannelIdAPIErrorZ.mts @@ -0,0 +1,744 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + + +export class Result_ChannelIdAPIErrorZ extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.CResult_ChannelIdAPIErrorZ_free); + } + /* @internal */ + public static constr_from_ptr(ptr: bigint): Result_ChannelIdAPIErrorZ { + if (bindings.CResult_ChannelIdAPIErrorZ_is_ok(ptr)) { + return new Result_ChannelIdAPIErrorZ_OK(null, ptr); + } else { + return new Result_ChannelIdAPIErrorZ_Err(null, ptr); + } + } + /** + * Creates a new CResult_ChannelIdAPIErrorZ in the success state. + */ + public static constructor_ok(o: ChannelId): Result_ChannelIdAPIErrorZ { + const ret: bigint = bindings.CResult_ChannelIdAPIErrorZ_ok(CommonBase.get_ptr_of(o)); + const ret_hu_conv: Result_ChannelIdAPIErrorZ = Result_ChannelIdAPIErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, o); + return ret_hu_conv; + } + + /** + * Creates a new CResult_ChannelIdAPIErrorZ in the error state. + */ + public static constructor_err(e: APIError): Result_ChannelIdAPIErrorZ { + const ret: bigint = bindings.CResult_ChannelIdAPIErrorZ_err(CommonBase.get_ptr_of(e)); + const ret_hu_conv: Result_ChannelIdAPIErrorZ = Result_ChannelIdAPIErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, e); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public is_ok(): boolean { + const ret: boolean = bindings.CResult_ChannelIdAPIErrorZ_is_ok(this.ptr); + return ret; + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.CResult_ChannelIdAPIErrorZ_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a new CResult_ChannelIdAPIErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public clone(): Result_ChannelIdAPIErrorZ { + const ret: bigint = bindings.CResult_ChannelIdAPIErrorZ_clone(this.ptr); + const ret_hu_conv: Result_ChannelIdAPIErrorZ = Result_ChannelIdAPIErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +export class Result_ChannelIdAPIErrorZ_OK extends Result_ChannelIdAPIErrorZ { + public res: ChannelId; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const res: bigint = bindings.CResult_ChannelIdAPIErrorZ_get_ok(ptr); + const res_hu_conv: ChannelId = new ChannelId(null, res); + CommonBase.add_ref_from(res_hu_conv, this); + this.res = res_hu_conv; + } +} +export class Result_ChannelIdAPIErrorZ_Err extends Result_ChannelIdAPIErrorZ { + public err: APIError; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const err: bigint = bindings.CResult_ChannelIdAPIErrorZ_get_err(ptr); + const err_hu_conv: APIError = APIError.constr_from_ptr(err); + CommonBase.add_ref_from(err_hu_conv, this); + this.err = err_hu_conv; + } +} \ No newline at end of file diff --git a/ts/structs/Result_ChannelIdDecodeErrorZ.mts b/ts/structs/Result_ChannelIdDecodeErrorZ.mts new file mode 100644 index 00000000..9338ecbc --- /dev/null +++ b/ts/structs/Result_ChannelIdDecodeErrorZ.mts @@ -0,0 +1,744 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + + +export class Result_ChannelIdDecodeErrorZ extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.CResult_ChannelIdDecodeErrorZ_free); + } + /* @internal */ + public static constr_from_ptr(ptr: bigint): Result_ChannelIdDecodeErrorZ { + if (bindings.CResult_ChannelIdDecodeErrorZ_is_ok(ptr)) { + return new Result_ChannelIdDecodeErrorZ_OK(null, ptr); + } else { + return new Result_ChannelIdDecodeErrorZ_Err(null, ptr); + } + } + /** + * Creates a new CResult_ChannelIdDecodeErrorZ in the success state. + */ + public static constructor_ok(o: ChannelId): Result_ChannelIdDecodeErrorZ { + const ret: bigint = bindings.CResult_ChannelIdDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); + const ret_hu_conv: Result_ChannelIdDecodeErrorZ = Result_ChannelIdDecodeErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, o); + return ret_hu_conv; + } + + /** + * Creates a new CResult_ChannelIdDecodeErrorZ in the error state. + */ + public static constructor_err(e: DecodeError): Result_ChannelIdDecodeErrorZ { + const ret: bigint = bindings.CResult_ChannelIdDecodeErrorZ_err(CommonBase.get_ptr_of(e)); + const ret_hu_conv: Result_ChannelIdDecodeErrorZ = Result_ChannelIdDecodeErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, e); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public is_ok(): boolean { + const ret: boolean = bindings.CResult_ChannelIdDecodeErrorZ_is_ok(this.ptr); + return ret; + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.CResult_ChannelIdDecodeErrorZ_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a new CResult_ChannelIdDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public clone(): Result_ChannelIdDecodeErrorZ { + const ret: bigint = bindings.CResult_ChannelIdDecodeErrorZ_clone(this.ptr); + const ret_hu_conv: Result_ChannelIdDecodeErrorZ = Result_ChannelIdDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +export class Result_ChannelIdDecodeErrorZ_OK extends Result_ChannelIdDecodeErrorZ { + public res: ChannelId; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const res: bigint = bindings.CResult_ChannelIdDecodeErrorZ_get_ok(ptr); + const res_hu_conv: ChannelId = new ChannelId(null, res); + CommonBase.add_ref_from(res_hu_conv, this); + this.res = res_hu_conv; + } +} +export class Result_ChannelIdDecodeErrorZ_Err extends Result_ChannelIdDecodeErrorZ { + public err: DecodeError; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const err: bigint = bindings.CResult_ChannelIdDecodeErrorZ_get_err(ptr); + const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err); + CommonBase.add_ref_from(err_hu_conv, this); + this.err = err_hu_conv; + } +} \ No newline at end of file diff --git a/ts/structs/Result_ChannelInfoDecodeErrorZ.mts b/ts/structs/Result_ChannelInfoDecodeErrorZ.mts index a2c33c85..22e8d6a9 100644 --- a/ts/structs/Result_ChannelInfoDecodeErrorZ.mts +++ b/ts/structs/Result_ChannelInfoDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_ChannelInfoDecodeErrorZ extends CommonBase { * Creates a new CResult_ChannelInfoDecodeErrorZ in the success state. */ public static constructor_ok(o: ChannelInfo): Result_ChannelInfoDecodeErrorZ { - const ret: bigint = bindings.CResult_ChannelInfoDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_ChannelInfoDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_ChannelInfoDecodeErrorZ = Result_ChannelInfoDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_ChannelMonitorUpdateDecodeErrorZ.mts b/ts/structs/Result_ChannelMonitorUpdateDecodeErrorZ.mts index fffa7427..f2e111bf 100644 --- a/ts/structs/Result_ChannelMonitorUpdateDecodeErrorZ.mts +++ b/ts/structs/Result_ChannelMonitorUpdateDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_ChannelMonitorUpdateDecodeErrorZ extends CommonBase { * Creates a new CResult_ChannelMonitorUpdateDecodeErrorZ in the success state. */ public static constructor_ok(o: ChannelMonitorUpdate): Result_ChannelMonitorUpdateDecodeErrorZ { - const ret: bigint = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_ChannelMonitorUpdateDecodeErrorZ = Result_ChannelMonitorUpdateDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_ChannelMonitorUpdateStatusNoneZ.mts b/ts/structs/Result_ChannelMonitorUpdateStatusNoneZ.mts index dbeee95a..0b1d4e23 100644 --- a/ts/structs/Result_ChannelMonitorUpdateStatusNoneZ.mts +++ b/ts/structs/Result_ChannelMonitorUpdateStatusNoneZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,11 +138,16 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_ChannelPublicKeysDecodeErrorZ.mts b/ts/structs/Result_ChannelPublicKeysDecodeErrorZ.mts index 181aad9f..78106502 100644 --- a/ts/structs/Result_ChannelPublicKeysDecodeErrorZ.mts +++ b/ts/structs/Result_ChannelPublicKeysDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_ChannelPublicKeysDecodeErrorZ extends CommonBase { * Creates a new CResult_ChannelPublicKeysDecodeErrorZ in the success state. */ public static constructor_ok(o: ChannelPublicKeys): Result_ChannelPublicKeysDecodeErrorZ { - const ret: bigint = bindings.CResult_ChannelPublicKeysDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_ChannelPublicKeysDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_ChannelPublicKeysDecodeErrorZ = Result_ChannelPublicKeysDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_ChannelReadyDecodeErrorZ.mts b/ts/structs/Result_ChannelReadyDecodeErrorZ.mts index 64868ae2..94d8fdf2 100644 --- a/ts/structs/Result_ChannelReadyDecodeErrorZ.mts +++ b/ts/structs/Result_ChannelReadyDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_ChannelReadyDecodeErrorZ extends CommonBase { * Creates a new CResult_ChannelReadyDecodeErrorZ in the success state. */ public static constructor_ok(o: ChannelReady): Result_ChannelReadyDecodeErrorZ { - const ret: bigint = bindings.CResult_ChannelReadyDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_ChannelReadyDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_ChannelReadyDecodeErrorZ = Result_ChannelReadyDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_ChannelReestablishDecodeErrorZ.mts b/ts/structs/Result_ChannelReestablishDecodeErrorZ.mts index 024c8946..aef31648 100644 --- a/ts/structs/Result_ChannelReestablishDecodeErrorZ.mts +++ b/ts/structs/Result_ChannelReestablishDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_ChannelReestablishDecodeErrorZ extends CommonBase { * Creates a new CResult_ChannelReestablishDecodeErrorZ in the success state. */ public static constructor_ok(o: ChannelReestablish): Result_ChannelReestablishDecodeErrorZ { - const ret: bigint = bindings.CResult_ChannelReestablishDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_ChannelReestablishDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_ChannelReestablishDecodeErrorZ = Result_ChannelReestablishDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_ChannelShutdownStateDecodeErrorZ.mts b/ts/structs/Result_ChannelShutdownStateDecodeErrorZ.mts index 3b2db13b..e214cd87 100644 --- a/ts/structs/Result_ChannelShutdownStateDecodeErrorZ.mts +++ b/ts/structs/Result_ChannelShutdownStateDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_ChannelTransactionParametersDecodeErrorZ.mts b/ts/structs/Result_ChannelTransactionParametersDecodeErrorZ.mts index 6ee86984..940364ff 100644 --- a/ts/structs/Result_ChannelTransactionParametersDecodeErrorZ.mts +++ b/ts/structs/Result_ChannelTransactionParametersDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_ChannelTransactionParametersDecodeErrorZ extends CommonBase * Creates a new CResult_ChannelTransactionParametersDecodeErrorZ in the success state. */ public static constructor_ok(o: ChannelTransactionParameters): Result_ChannelTransactionParametersDecodeErrorZ { - const ret: bigint = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_ChannelTransactionParametersDecodeErrorZ = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_ChannelTypeFeaturesDecodeErrorZ.mts b/ts/structs/Result_ChannelTypeFeaturesDecodeErrorZ.mts index 63c7051d..9b0acf09 100644 --- a/ts/structs/Result_ChannelTypeFeaturesDecodeErrorZ.mts +++ b/ts/structs/Result_ChannelTypeFeaturesDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_ChannelTypeFeaturesDecodeErrorZ extends CommonBase { * Creates a new CResult_ChannelTypeFeaturesDecodeErrorZ in the success state. */ public static constructor_ok(o: ChannelTypeFeatures): Result_ChannelTypeFeaturesDecodeErrorZ { - const ret: bigint = bindings.CResult_ChannelTypeFeaturesDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_ChannelTypeFeaturesDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_ChannelTypeFeaturesDecodeErrorZ = Result_ChannelTypeFeaturesDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_ChannelUpdateDecodeErrorZ.mts b/ts/structs/Result_ChannelUpdateDecodeErrorZ.mts index b7390caf..b1baf9e8 100644 --- a/ts/structs/Result_ChannelUpdateDecodeErrorZ.mts +++ b/ts/structs/Result_ChannelUpdateDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_ChannelUpdateDecodeErrorZ extends CommonBase { * Creates a new CResult_ChannelUpdateDecodeErrorZ in the success state. */ public static constructor_ok(o: ChannelUpdate): Result_ChannelUpdateDecodeErrorZ { - const ret: bigint = bindings.CResult_ChannelUpdateDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_ChannelUpdateDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_ChannelUpdateDecodeErrorZ = Result_ChannelUpdateDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_ChannelUpdateInfoDecodeErrorZ.mts b/ts/structs/Result_ChannelUpdateInfoDecodeErrorZ.mts index 43189ff7..15ea0ead 100644 --- a/ts/structs/Result_ChannelUpdateInfoDecodeErrorZ.mts +++ b/ts/structs/Result_ChannelUpdateInfoDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_ChannelUpdateInfoDecodeErrorZ extends CommonBase { * Creates a new CResult_ChannelUpdateInfoDecodeErrorZ in the success state. */ public static constructor_ok(o: ChannelUpdateInfo): Result_ChannelUpdateInfoDecodeErrorZ { - const ret: bigint = bindings.CResult_ChannelUpdateInfoDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_ChannelUpdateInfoDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_ChannelUpdateInfoDecodeErrorZ = Result_ChannelUpdateInfoDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_ClaimedHTLCDecodeErrorZ.mts b/ts/structs/Result_ClaimedHTLCDecodeErrorZ.mts index 606d6e19..416c6739 100644 --- a/ts/structs/Result_ClaimedHTLCDecodeErrorZ.mts +++ b/ts/structs/Result_ClaimedHTLCDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_ClaimedHTLCDecodeErrorZ extends CommonBase { * Creates a new CResult_ClaimedHTLCDecodeErrorZ in the success state. */ public static constructor_ok(o: ClaimedHTLC): Result_ClaimedHTLCDecodeErrorZ { - const ret: bigint = bindings.CResult_ClaimedHTLCDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_ClaimedHTLCDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_ClaimedHTLCDecodeErrorZ = Result_ClaimedHTLCDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_ClosingSignedDecodeErrorZ.mts b/ts/structs/Result_ClosingSignedDecodeErrorZ.mts index 21cceb2c..e704d360 100644 --- a/ts/structs/Result_ClosingSignedDecodeErrorZ.mts +++ b/ts/structs/Result_ClosingSignedDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_ClosingSignedDecodeErrorZ extends CommonBase { * Creates a new CResult_ClosingSignedDecodeErrorZ in the success state. */ public static constructor_ok(o: ClosingSigned): Result_ClosingSignedDecodeErrorZ { - const ret: bigint = bindings.CResult_ClosingSignedDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_ClosingSignedDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_ClosingSignedDecodeErrorZ = Result_ClosingSignedDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mts b/ts/structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mts index f6d31be9..81790dcb 100644 --- a/ts/structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mts +++ b/ts/structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_ClosingSignedFeeRangeDecodeErrorZ extends CommonBase { * Creates a new CResult_ClosingSignedFeeRangeDecodeErrorZ in the success state. */ public static constructor_ok(o: ClosingSignedFeeRange): Result_ClosingSignedFeeRangeDecodeErrorZ { - const ret: bigint = bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_ClosingSignedFeeRangeDecodeErrorZ = Result_ClosingSignedFeeRangeDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_CoinSelectionNoneZ.mts b/ts/structs/Result_CoinSelectionNoneZ.mts index e92873e3..68e7fdfc 100644 --- a/ts/structs/Result_CoinSelectionNoneZ.mts +++ b/ts/structs/Result_CoinSelectionNoneZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_CoinSelectionNoneZ extends CommonBase { * Creates a new CResult_CoinSelectionNoneZ in the success state. */ public static constructor_ok(o: CoinSelection): Result_CoinSelectionNoneZ { - const ret: bigint = bindings.CResult_CoinSelectionNoneZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_CoinSelectionNoneZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_CoinSelectionNoneZ = Result_CoinSelectionNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_CommitmentSignedDecodeErrorZ.mts b/ts/structs/Result_CommitmentSignedDecodeErrorZ.mts index f4d9f1bc..aebbb8c1 100644 --- a/ts/structs/Result_CommitmentSignedDecodeErrorZ.mts +++ b/ts/structs/Result_CommitmentSignedDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_CommitmentSignedDecodeErrorZ extends CommonBase { * Creates a new CResult_CommitmentSignedDecodeErrorZ in the success state. */ public static constructor_ok(o: CommitmentSigned): Result_CommitmentSignedDecodeErrorZ { - const ret: bigint = bindings.CResult_CommitmentSignedDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_CommitmentSignedDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_CommitmentSignedDecodeErrorZ = Result_CommitmentSignedDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_CommitmentTransactionDecodeErrorZ.mts b/ts/structs/Result_CommitmentTransactionDecodeErrorZ.mts index 3a295465..1006e29e 100644 --- a/ts/structs/Result_CommitmentTransactionDecodeErrorZ.mts +++ b/ts/structs/Result_CommitmentTransactionDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_CommitmentTransactionDecodeErrorZ extends CommonBase { * Creates a new CResult_CommitmentTransactionDecodeErrorZ in the success state. */ public static constructor_ok(o: CommitmentTransaction): Result_CommitmentTransactionDecodeErrorZ { - const ret: bigint = bindings.CResult_CommitmentTransactionDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_CommitmentTransactionDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_CommitmentTransactionDecodeErrorZ = Result_CommitmentTransactionDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mts b/ts/structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mts index 10da5ac8..98295adb 100644 --- a/ts/structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mts +++ b/ts/structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_CounterpartyChannelTransactionParametersDecodeErrorZ extends * Creates a new CResult_CounterpartyChannelTransactionParametersDecodeErrorZ in the success state. */ public static constructor_ok(o: CounterpartyChannelTransactionParameters): Result_CounterpartyChannelTransactionParametersDecodeErrorZ { - const ret: bigint = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_CounterpartyChannelTransactionParametersDecodeErrorZ = Result_CounterpartyChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mts b/ts/structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mts index bd23758d..94406ae2 100644 --- a/ts/structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mts +++ b/ts/structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_CounterpartyCommitmentSecretsDecodeErrorZ extends CommonBase * Creates a new CResult_CounterpartyCommitmentSecretsDecodeErrorZ in the success state. */ public static constructor_ok(o: CounterpartyCommitmentSecrets): Result_CounterpartyCommitmentSecretsDecodeErrorZ { - const ret: bigint = bindings.CResult_CounterpartyCommitmentSecretsDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_CounterpartyCommitmentSecretsDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_CounterpartyCommitmentSecretsDecodeErrorZ = Result_CounterpartyCommitmentSecretsDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mts b/ts/structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mts index af12472b..9406ae6e 100644 --- a/ts/structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mts +++ b/ts/structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_CounterpartyForwardingInfoDecodeErrorZ extends CommonBase { * Creates a new CResult_CounterpartyForwardingInfoDecodeErrorZ in the success state. */ public static constructor_ok(o: CounterpartyForwardingInfo): Result_CounterpartyForwardingInfoDecodeErrorZ { - const ret: bigint = bindings.CResult_CounterpartyForwardingInfoDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_CounterpartyForwardingInfoDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_CounterpartyForwardingInfoDecodeErrorZ = Result_CounterpartyForwardingInfoDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_DelayedPaymentBasepointDecodeErrorZ.mts b/ts/structs/Result_DelayedPaymentBasepointDecodeErrorZ.mts index 4eb8aadd..b9a7e9ff 100644 --- a/ts/structs/Result_DelayedPaymentBasepointDecodeErrorZ.mts +++ b/ts/structs/Result_DelayedPaymentBasepointDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_DelayedPaymentBasepointDecodeErrorZ extends CommonBase { * Creates a new CResult_DelayedPaymentBasepointDecodeErrorZ in the success state. */ public static constructor_ok(o: DelayedPaymentBasepoint): Result_DelayedPaymentBasepointDecodeErrorZ { - const ret: bigint = bindings.CResult_DelayedPaymentBasepointDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_DelayedPaymentBasepointDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_DelayedPaymentBasepointDecodeErrorZ = Result_DelayedPaymentBasepointDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_DelayedPaymentKeyDecodeErrorZ.mts b/ts/structs/Result_DelayedPaymentKeyDecodeErrorZ.mts index 61801201..13fa792b 100644 --- a/ts/structs/Result_DelayedPaymentKeyDecodeErrorZ.mts +++ b/ts/structs/Result_DelayedPaymentKeyDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_DelayedPaymentKeyDecodeErrorZ extends CommonBase { * Creates a new CResult_DelayedPaymentKeyDecodeErrorZ in the success state. */ public static constructor_ok(o: DelayedPaymentKey): Result_DelayedPaymentKeyDecodeErrorZ { - const ret: bigint = bindings.CResult_DelayedPaymentKeyDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_DelayedPaymentKeyDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_DelayedPaymentKeyDecodeErrorZ = Result_DelayedPaymentKeyDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mts b/ts/structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mts index 789fefb3..acb84840 100644 --- a/ts/structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mts +++ b/ts/structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_DelayedPaymentOutputDescriptorDecodeErrorZ extends CommonBas * Creates a new CResult_DelayedPaymentOutputDescriptorDecodeErrorZ in the success state. */ public static constructor_ok(o: DelayedPaymentOutputDescriptor): Result_DelayedPaymentOutputDescriptorDecodeErrorZ { - const ret: bigint = bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_DelayedPaymentOutputDescriptorDecodeErrorZ = Result_DelayedPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_DescriptionCreationErrorZ.mts b/ts/structs/Result_DescriptionCreationErrorZ.mts index ef6cafbe..948d7c8d 100644 --- a/ts/structs/Result_DescriptionCreationErrorZ.mts +++ b/ts/structs/Result_DescriptionCreationErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_DescriptionCreationErrorZ extends CommonBase { * Creates a new CResult_DescriptionCreationErrorZ in the success state. */ public static constructor_ok(o: Description): Result_DescriptionCreationErrorZ { - const ret: bigint = bindings.CResult_DescriptionCreationErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_DescriptionCreationErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_DescriptionCreationErrorZ = Result_DescriptionCreationErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_ECDSASignatureNoneZ.mts b/ts/structs/Result_ECDSASignatureNoneZ.mts index 7cddba85..c2298830 100644 --- a/ts/structs/Result_ECDSASignatureNoneZ.mts +++ b/ts/structs/Result_ECDSASignatureNoneZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,7 +76,7 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_ErrorMessageDecodeErrorZ.mts b/ts/structs/Result_ErrorMessageDecodeErrorZ.mts index 04855417..fcd9e6f3 100644 --- a/ts/structs/Result_ErrorMessageDecodeErrorZ.mts +++ b/ts/structs/Result_ErrorMessageDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_ErrorMessageDecodeErrorZ extends CommonBase { * Creates a new CResult_ErrorMessageDecodeErrorZ in the success state. */ public static constructor_ok(o: ErrorMessage): Result_ErrorMessageDecodeErrorZ { - const ret: bigint = bindings.CResult_ErrorMessageDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_ErrorMessageDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_ErrorMessageDecodeErrorZ = Result_ErrorMessageDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_FinalOnionHopDataDecodeErrorZ.mts b/ts/structs/Result_FinalOnionHopDataDecodeErrorZ.mts index 9d591ccd..b10c7aa9 100644 --- a/ts/structs/Result_FinalOnionHopDataDecodeErrorZ.mts +++ b/ts/structs/Result_FinalOnionHopDataDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_FinalOnionHopDataDecodeErrorZ extends CommonBase { * Creates a new CResult_FinalOnionHopDataDecodeErrorZ in the success state. */ public static constructor_ok(o: FinalOnionHopData): Result_FinalOnionHopDataDecodeErrorZ { - const ret: bigint = bindings.CResult_FinalOnionHopDataDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_FinalOnionHopDataDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_FinalOnionHopDataDecodeErrorZ = Result_FinalOnionHopDataDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_FixedPenaltyScorerDecodeErrorZ.mts b/ts/structs/Result_FixedPenaltyScorerDecodeErrorZ.mts index d8e4d9d9..e646c102 100644 --- a/ts/structs/Result_FixedPenaltyScorerDecodeErrorZ.mts +++ b/ts/structs/Result_FixedPenaltyScorerDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_FixedPenaltyScorerDecodeErrorZ extends CommonBase { * Creates a new CResult_FixedPenaltyScorerDecodeErrorZ in the success state. */ public static constructor_ok(o: FixedPenaltyScorer): Result_FixedPenaltyScorerDecodeErrorZ { - const ret: bigint = bindings.CResult_FixedPenaltyScorerDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_FixedPenaltyScorerDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_FixedPenaltyScorerDecodeErrorZ = Result_FixedPenaltyScorerDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_FundingCreatedDecodeErrorZ.mts b/ts/structs/Result_FundingCreatedDecodeErrorZ.mts index 343b60d0..c36e940b 100644 --- a/ts/structs/Result_FundingCreatedDecodeErrorZ.mts +++ b/ts/structs/Result_FundingCreatedDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_FundingCreatedDecodeErrorZ extends CommonBase { * Creates a new CResult_FundingCreatedDecodeErrorZ in the success state. */ public static constructor_ok(o: FundingCreated): Result_FundingCreatedDecodeErrorZ { - const ret: bigint = bindings.CResult_FundingCreatedDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_FundingCreatedDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_FundingCreatedDecodeErrorZ = Result_FundingCreatedDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_FundingSignedDecodeErrorZ.mts b/ts/structs/Result_FundingSignedDecodeErrorZ.mts index 4fc0303f..ad924ef0 100644 --- a/ts/structs/Result_FundingSignedDecodeErrorZ.mts +++ b/ts/structs/Result_FundingSignedDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_FundingSignedDecodeErrorZ extends CommonBase { * Creates a new CResult_FundingSignedDecodeErrorZ in the success state. */ public static constructor_ok(o: FundingSigned): Result_FundingSignedDecodeErrorZ { - const ret: bigint = bindings.CResult_FundingSignedDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_FundingSignedDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_FundingSignedDecodeErrorZ = Result_FundingSignedDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_GossipTimestampFilterDecodeErrorZ.mts b/ts/structs/Result_GossipTimestampFilterDecodeErrorZ.mts index 7493ae98..6c20a8ff 100644 --- a/ts/structs/Result_GossipTimestampFilterDecodeErrorZ.mts +++ b/ts/structs/Result_GossipTimestampFilterDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_GossipTimestampFilterDecodeErrorZ extends CommonBase { * Creates a new CResult_GossipTimestampFilterDecodeErrorZ in the success state. */ public static constructor_ok(o: GossipTimestampFilter): Result_GossipTimestampFilterDecodeErrorZ { - const ret: bigint = bindings.CResult_GossipTimestampFilterDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_GossipTimestampFilterDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_GossipTimestampFilterDecodeErrorZ = Result_GossipTimestampFilterDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_HTLCDescriptorDecodeErrorZ.mts b/ts/structs/Result_HTLCDescriptorDecodeErrorZ.mts index a038d4b1..35a56f57 100644 --- a/ts/structs/Result_HTLCDescriptorDecodeErrorZ.mts +++ b/ts/structs/Result_HTLCDescriptorDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_HTLCDescriptorDecodeErrorZ extends CommonBase { * Creates a new CResult_HTLCDescriptorDecodeErrorZ in the success state. */ public static constructor_ok(o: HTLCDescriptor): Result_HTLCDescriptorDecodeErrorZ { - const ret: bigint = bindings.CResult_HTLCDescriptorDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_HTLCDescriptorDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_HTLCDescriptorDecodeErrorZ = Result_HTLCDescriptorDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mts b/ts/structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mts index 3896eb80..95593f40 100644 --- a/ts/structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mts +++ b/ts/structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_HTLCOutputInCommitmentDecodeErrorZ extends CommonBase { * Creates a new CResult_HTLCOutputInCommitmentDecodeErrorZ in the success state. */ public static constructor_ok(o: HTLCOutputInCommitment): Result_HTLCOutputInCommitmentDecodeErrorZ { - const ret: bigint = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_HTLCOutputInCommitmentDecodeErrorZ = Result_HTLCOutputInCommitmentDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_HTLCUpdateDecodeErrorZ.mts b/ts/structs/Result_HTLCUpdateDecodeErrorZ.mts index d3253a58..9491a191 100644 --- a/ts/structs/Result_HTLCUpdateDecodeErrorZ.mts +++ b/ts/structs/Result_HTLCUpdateDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_HTLCUpdateDecodeErrorZ extends CommonBase { * Creates a new CResult_HTLCUpdateDecodeErrorZ in the success state. */ public static constructor_ok(o: HTLCUpdate): Result_HTLCUpdateDecodeErrorZ { - const ret: bigint = bindings.CResult_HTLCUpdateDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_HTLCUpdateDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_HTLCUpdateDecodeErrorZ = Result_HTLCUpdateDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_HolderCommitmentTransactionDecodeErrorZ.mts b/ts/structs/Result_HolderCommitmentTransactionDecodeErrorZ.mts index e88d5a3f..159a15af 100644 --- a/ts/structs/Result_HolderCommitmentTransactionDecodeErrorZ.mts +++ b/ts/structs/Result_HolderCommitmentTransactionDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_HolderCommitmentTransactionDecodeErrorZ extends CommonBase { * Creates a new CResult_HolderCommitmentTransactionDecodeErrorZ in the success state. */ public static constructor_ok(o: HolderCommitmentTransaction): Result_HolderCommitmentTransactionDecodeErrorZ { - const ret: bigint = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_HolderCommitmentTransactionDecodeErrorZ = Result_HolderCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_HostnameDecodeErrorZ.mts b/ts/structs/Result_HostnameDecodeErrorZ.mts index ca70b780..653cfaf1 100644 --- a/ts/structs/Result_HostnameDecodeErrorZ.mts +++ b/ts/structs/Result_HostnameDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_HostnameDecodeErrorZ extends CommonBase { * Creates a new CResult_HostnameDecodeErrorZ in the success state. */ public static constructor_ok(o: Hostname): Result_HostnameDecodeErrorZ { - const ret: bigint = bindings.CResult_HostnameDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_HostnameDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_HostnameDecodeErrorZ = Result_HostnameDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_HtlcBasepointDecodeErrorZ.mts b/ts/structs/Result_HtlcBasepointDecodeErrorZ.mts index 121f47b4..acd84c12 100644 --- a/ts/structs/Result_HtlcBasepointDecodeErrorZ.mts +++ b/ts/structs/Result_HtlcBasepointDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_HtlcBasepointDecodeErrorZ extends CommonBase { * Creates a new CResult_HtlcBasepointDecodeErrorZ in the success state. */ public static constructor_ok(o: HtlcBasepoint): Result_HtlcBasepointDecodeErrorZ { - const ret: bigint = bindings.CResult_HtlcBasepointDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_HtlcBasepointDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_HtlcBasepointDecodeErrorZ = Result_HtlcBasepointDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_HtlcKeyDecodeErrorZ.mts b/ts/structs/Result_HtlcKeyDecodeErrorZ.mts index 581293e6..763b2e13 100644 --- a/ts/structs/Result_HtlcKeyDecodeErrorZ.mts +++ b/ts/structs/Result_HtlcKeyDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_HtlcKeyDecodeErrorZ extends CommonBase { * Creates a new CResult_HtlcKeyDecodeErrorZ in the success state. */ public static constructor_ok(o: HtlcKey): Result_HtlcKeyDecodeErrorZ { - const ret: bigint = bindings.CResult_HtlcKeyDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_HtlcKeyDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_HtlcKeyDecodeErrorZ = Result_HtlcKeyDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_InFlightHtlcsDecodeErrorZ.mts b/ts/structs/Result_InFlightHtlcsDecodeErrorZ.mts index ccf3084d..a189bd66 100644 --- a/ts/structs/Result_InFlightHtlcsDecodeErrorZ.mts +++ b/ts/structs/Result_InFlightHtlcsDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_InFlightHtlcsDecodeErrorZ extends CommonBase { * Creates a new CResult_InFlightHtlcsDecodeErrorZ in the success state. */ public static constructor_ok(o: InFlightHtlcs): Result_InFlightHtlcsDecodeErrorZ { - const ret: bigint = bindings.CResult_InFlightHtlcsDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_InFlightHtlcsDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_InFlightHtlcsDecodeErrorZ = Result_InFlightHtlcsDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_InMemorySignerDecodeErrorZ.mts b/ts/structs/Result_InMemorySignerDecodeErrorZ.mts index a00ccd81..7253f3c3 100644 --- a/ts/structs/Result_InMemorySignerDecodeErrorZ.mts +++ b/ts/structs/Result_InMemorySignerDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_u16Z } from '../structs/Option_u16Z.mjs'; import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_InMemorySignerDecodeErrorZ extends CommonBase { * Creates a new CResult_InMemorySignerDecodeErrorZ in the success state. */ public static constructor_ok(o: InMemorySigner): Result_InMemorySignerDecodeErrorZ { - const ret: bigint = bindings.CResult_InMemorySignerDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_InMemorySignerDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_InMemorySignerDecodeErrorZ = Result_InMemorySignerDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_InitDecodeErrorZ.mts b/ts/structs/Result_InitDecodeErrorZ.mts index 0ba347ec..5bf8edf3 100644 --- a/ts/structs/Result_InitDecodeErrorZ.mts +++ b/ts/structs/Result_InitDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_InitDecodeErrorZ extends CommonBase { * Creates a new CResult_InitDecodeErrorZ in the success state. */ public static constructor_ok(o: Init): Result_InitDecodeErrorZ { - const ret: bigint = bindings.CResult_InitDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_InitDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_InitDecodeErrorZ = Result_InitDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_InitFeaturesDecodeErrorZ.mts b/ts/structs/Result_InitFeaturesDecodeErrorZ.mts index 50e29a00..e75d0774 100644 --- a/ts/structs/Result_InitFeaturesDecodeErrorZ.mts +++ b/ts/structs/Result_InitFeaturesDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_InitFeaturesDecodeErrorZ extends CommonBase { * Creates a new CResult_InitFeaturesDecodeErrorZ in the success state. */ public static constructor_ok(o: InitFeatures): Result_InitFeaturesDecodeErrorZ { - const ret: bigint = bindings.CResult_InitFeaturesDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_InitFeaturesDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_InitFeaturesDecodeErrorZ = Result_InitFeaturesDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_InvoiceErrorDecodeErrorZ.mts b/ts/structs/Result_InvoiceErrorDecodeErrorZ.mts index 20efdc89..105758c6 100644 --- a/ts/structs/Result_InvoiceErrorDecodeErrorZ.mts +++ b/ts/structs/Result_InvoiceErrorDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Resul import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_InvoiceErrorDecodeErrorZ extends CommonBase { * Creates a new CResult_InvoiceErrorDecodeErrorZ in the success state. */ public static constructor_ok(o: InvoiceError): Result_InvoiceErrorDecodeErrorZ { - const ret: bigint = bindings.CResult_InvoiceErrorDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_InvoiceErrorDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_InvoiceErrorDecodeErrorZ = Result_InvoiceErrorDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_InvoiceRequestBolt12SemanticErrorZ.mts b/ts/structs/Result_InvoiceRequestBolt12SemanticErrorZ.mts new file mode 100644 index 00000000..a6c88784 --- /dev/null +++ b/ts/structs/Result_InvoiceRequestBolt12SemanticErrorZ.mts @@ -0,0 +1,740 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + + +export class Result_InvoiceRequestBolt12SemanticErrorZ extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_free); + } + /* @internal */ + public static constr_from_ptr(ptr: bigint): Result_InvoiceRequestBolt12SemanticErrorZ { + if (bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_InvoiceRequestBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_InvoiceRequestBolt12SemanticErrorZ_Err(null, ptr); + } + } + /** + * Creates a new CResult_InvoiceRequestBolt12SemanticErrorZ in the success state. + */ + public static constructor_ok(o: InvoiceRequest): Result_InvoiceRequestBolt12SemanticErrorZ { + const ret: bigint = bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_ok(CommonBase.get_ptr_of(o)); + const ret_hu_conv: Result_InvoiceRequestBolt12SemanticErrorZ = Result_InvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, o); + return ret_hu_conv; + } + + /** + * Creates a new CResult_InvoiceRequestBolt12SemanticErrorZ in the error state. + */ + public static constructor_err(e: Bolt12SemanticError): Result_InvoiceRequestBolt12SemanticErrorZ { + const ret: bigint = bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_err(e); + const ret_hu_conv: Result_InvoiceRequestBolt12SemanticErrorZ = Result_InvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public is_ok(): boolean { + const ret: boolean = bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(this.ptr); + return ret; + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a new CResult_InvoiceRequestBolt12SemanticErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public clone(): Result_InvoiceRequestBolt12SemanticErrorZ { + const ret: bigint = bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_clone(this.ptr); + const ret_hu_conv: Result_InvoiceRequestBolt12SemanticErrorZ = Result_InvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +export class Result_InvoiceRequestBolt12SemanticErrorZ_OK extends Result_InvoiceRequestBolt12SemanticErrorZ { + public res: InvoiceRequest; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const res: bigint = bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(ptr); + const res_hu_conv: InvoiceRequest = new InvoiceRequest(null, res); + CommonBase.add_ref_from(res_hu_conv, this); + this.res = res_hu_conv; + } +} +export class Result_InvoiceRequestBolt12SemanticErrorZ_Err extends Result_InvoiceRequestBolt12SemanticErrorZ { + public err: Bolt12SemanticError; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + this.err = bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(ptr); + } +} \ No newline at end of file diff --git a/ts/structs/Result_InvoiceRequestFieldsDecodeErrorZ.mts b/ts/structs/Result_InvoiceRequestFieldsDecodeErrorZ.mts new file mode 100644 index 00000000..0234730e --- /dev/null +++ b/ts/structs/Result_InvoiceRequestFieldsDecodeErrorZ.mts @@ -0,0 +1,744 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + + +export class Result_InvoiceRequestFieldsDecodeErrorZ extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_free); + } + /* @internal */ + public static constr_from_ptr(ptr: bigint): Result_InvoiceRequestFieldsDecodeErrorZ { + if (bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(ptr)) { + return new Result_InvoiceRequestFieldsDecodeErrorZ_OK(null, ptr); + } else { + return new Result_InvoiceRequestFieldsDecodeErrorZ_Err(null, ptr); + } + } + /** + * Creates a new CResult_InvoiceRequestFieldsDecodeErrorZ in the success state. + */ + public static constructor_ok(o: InvoiceRequestFields): Result_InvoiceRequestFieldsDecodeErrorZ { + const ret: bigint = bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); + const ret_hu_conv: Result_InvoiceRequestFieldsDecodeErrorZ = Result_InvoiceRequestFieldsDecodeErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, o); + return ret_hu_conv; + } + + /** + * Creates a new CResult_InvoiceRequestFieldsDecodeErrorZ in the error state. + */ + public static constructor_err(e: DecodeError): Result_InvoiceRequestFieldsDecodeErrorZ { + const ret: bigint = bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_err(CommonBase.get_ptr_of(e)); + const ret_hu_conv: Result_InvoiceRequestFieldsDecodeErrorZ = Result_InvoiceRequestFieldsDecodeErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, e); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public is_ok(): boolean { + const ret: boolean = bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(this.ptr); + return ret; + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a new CResult_InvoiceRequestFieldsDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public clone(): Result_InvoiceRequestFieldsDecodeErrorZ { + const ret: bigint = bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_clone(this.ptr); + const ret_hu_conv: Result_InvoiceRequestFieldsDecodeErrorZ = Result_InvoiceRequestFieldsDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +export class Result_InvoiceRequestFieldsDecodeErrorZ_OK extends Result_InvoiceRequestFieldsDecodeErrorZ { + public res: InvoiceRequestFields; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const res: bigint = bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(ptr); + const res_hu_conv: InvoiceRequestFields = new InvoiceRequestFields(null, res); + CommonBase.add_ref_from(res_hu_conv, this); + this.res = res_hu_conv; + } +} +export class Result_InvoiceRequestFieldsDecodeErrorZ_Err extends Result_InvoiceRequestFieldsDecodeErrorZ { + public err: DecodeError; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const err: bigint = bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(ptr); + const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err); + CommonBase.add_ref_from(err_hu_conv, this); + this.err = err_hu_conv; + } +} \ No newline at end of file diff --git a/ts/structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mts b/ts/structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mts new file mode 100644 index 00000000..b5b1574c --- /dev/null +++ b/ts/structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mts @@ -0,0 +1,733 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + + +export class Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free); + } + /* @internal */ + public static constr_from_ptr(ptr: bigint): Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ { + if (bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_Err(null, ptr); + } + } + /** + * Creates a new CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ in the success state. + */ + public static constructor_ok(o: InvoiceRequestWithDerivedPayerIdBuilder): Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ { + const ret: bigint = bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(CommonBase.get_ptr_of(o)); + const ret_hu_conv: Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ = Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, o); + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid ret_hu_conv being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after ret_hu_conv call, o is reset to null and is now a dummy object. + CommonBase.set_null_skip_free(o);; + return ret_hu_conv; + } + + /** + * Creates a new CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ in the error state. + */ + public static constructor_err(e: Bolt12SemanticError): Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ { + const ret: bigint = bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(e); + const ret_hu_conv: Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ = Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public is_ok(): boolean { + const ret: boolean = bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(this.ptr); + return ret; + } + +} +export class Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_OK extends Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ { + public res: InvoiceRequestWithDerivedPayerIdBuilder; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const res: bigint = bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(ptr); + const res_hu_conv: InvoiceRequestWithDerivedPayerIdBuilder = new InvoiceRequestWithDerivedPayerIdBuilder(null, res); + CommonBase.add_ref_from(res_hu_conv, this); + this.res = res_hu_conv; + } +} +export class Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_Err extends Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ { + public err: Bolt12SemanticError; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + this.err = bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(ptr); + } +} \ No newline at end of file diff --git a/ts/structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mts b/ts/structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mts new file mode 100644 index 00000000..9f8b6059 --- /dev/null +++ b/ts/structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mts @@ -0,0 +1,733 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + + +export class Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free); + } + /* @internal */ + public static constr_from_ptr(ptr: bigint): Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ { + if (bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_Err(null, ptr); + } + } + /** + * Creates a new CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ in the success state. + */ + public static constructor_ok(o: InvoiceRequestWithExplicitPayerIdBuilder): Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ { + const ret: bigint = bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok(CommonBase.get_ptr_of(o)); + const ret_hu_conv: Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ = Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, o); + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid ret_hu_conv being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after ret_hu_conv call, o is reset to null and is now a dummy object. + CommonBase.set_null_skip_free(o);; + return ret_hu_conv; + } + + /** + * Creates a new CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ in the error state. + */ + public static constructor_err(e: Bolt12SemanticError): Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ { + const ret: bigint = bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(e); + const ret_hu_conv: Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ = Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public is_ok(): boolean { + const ret: boolean = bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(this.ptr); + return ret; + } + +} +export class Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_OK extends Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ { + public res: InvoiceRequestWithExplicitPayerIdBuilder; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const res: bigint = bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(ptr); + const res_hu_conv: InvoiceRequestWithExplicitPayerIdBuilder = new InvoiceRequestWithExplicitPayerIdBuilder(null, res); + CommonBase.add_ref_from(res_hu_conv, this); + this.res = res_hu_conv; + } +} +export class Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_Err extends Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ { + public err: Bolt12SemanticError; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + this.err = bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(ptr); + } +} \ No newline at end of file diff --git a/ts/structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mts b/ts/structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mts new file mode 100644 index 00000000..62768cbb --- /dev/null +++ b/ts/structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mts @@ -0,0 +1,733 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + + +export class Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free); + } + /* @internal */ + public static constr_from_ptr(ptr: bigint): Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ { + if (bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_Err(null, ptr); + } + } + /** + * Creates a new CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ in the success state. + */ + public static constructor_ok(o: InvoiceWithDerivedSigningPubkeyBuilder): Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ { + const ret: bigint = bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok(CommonBase.get_ptr_of(o)); + const ret_hu_conv: Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ = Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, o); + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid ret_hu_conv being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after ret_hu_conv call, o is reset to null and is now a dummy object. + CommonBase.set_null_skip_free(o);; + return ret_hu_conv; + } + + /** + * Creates a new CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ in the error state. + */ + public static constructor_err(e: Bolt12SemanticError): Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ { + const ret: bigint = bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err(e); + const ret_hu_conv: Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ = Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public is_ok(): boolean { + const ret: boolean = bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(this.ptr); + return ret; + } + +} +export class Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_OK extends Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ { + public res: InvoiceWithDerivedSigningPubkeyBuilder; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const res: bigint = bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(ptr); + const res_hu_conv: InvoiceWithDerivedSigningPubkeyBuilder = new InvoiceWithDerivedSigningPubkeyBuilder(null, res); + CommonBase.add_ref_from(res_hu_conv, this); + this.res = res_hu_conv; + } +} +export class Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_Err extends Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ { + public err: Bolt12SemanticError; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + this.err = bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(ptr); + } +} \ No newline at end of file diff --git a/ts/structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mts b/ts/structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mts new file mode 100644 index 00000000..30725734 --- /dev/null +++ b/ts/structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mts @@ -0,0 +1,733 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + + +export class Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free); + } + /* @internal */ + public static constr_from_ptr(ptr: bigint): Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ { + if (bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_Err(null, ptr); + } + } + /** + * Creates a new CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ in the success state. + */ + public static constructor_ok(o: InvoiceWithExplicitSigningPubkeyBuilder): Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ { + const ret: bigint = bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok(CommonBase.get_ptr_of(o)); + const ret_hu_conv: Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ = Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, o); + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid ret_hu_conv being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after ret_hu_conv call, o is reset to null and is now a dummy object. + CommonBase.set_null_skip_free(o);; + return ret_hu_conv; + } + + /** + * Creates a new CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ in the error state. + */ + public static constructor_err(e: Bolt12SemanticError): Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ { + const ret: bigint = bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err(e); + const ret_hu_conv: Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ = Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public is_ok(): boolean { + const ret: boolean = bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(this.ptr); + return ret; + } + +} +export class Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_OK extends Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ { + public res: InvoiceWithExplicitSigningPubkeyBuilder; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const res: bigint = bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(ptr); + const res_hu_conv: InvoiceWithExplicitSigningPubkeyBuilder = new InvoiceWithExplicitSigningPubkeyBuilder(null, res); + CommonBase.add_ref_from(res_hu_conv, this); + this.res = res_hu_conv; + } +} +export class Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_Err extends Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ { + public err: Bolt12SemanticError; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + this.err = bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(ptr); + } +} \ No newline at end of file diff --git a/ts/structs/Result_LockedChannelMonitorNoneZ.mts b/ts/structs/Result_LockedChannelMonitorNoneZ.mts index 513c2b22..d4400544 100644 --- a/ts/structs/Result_LockedChannelMonitorNoneZ.mts +++ b/ts/structs/Result_LockedChannelMonitorNoneZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,13 +562,10 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_LockedChannelMonitorNoneZ extends CommonBase { * Creates a new CResult_LockedChannelMonitorNoneZ in the success state. */ public static constructor_ok(o: LockedChannelMonitor): Result_LockedChannelMonitorNoneZ { - const ret: bigint = bindings.CResult_LockedChannelMonitorNoneZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_LockedChannelMonitorNoneZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_LockedChannelMonitorNoneZ = Result_LockedChannelMonitorNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); // Due to rust's strict-ownership memory model, in some cases we need to "move" diff --git a/ts/structs/Result_MaxDustHTLCExposureDecodeErrorZ.mts b/ts/structs/Result_MaxDustHTLCExposureDecodeErrorZ.mts index c108ec09..2685b4d4 100644 --- a/ts/structs/Result_MaxDustHTLCExposureDecodeErrorZ.mts +++ b/ts/structs/Result_MaxDustHTLCExposureDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_NetworkGraphDecodeErrorZ.mts b/ts/structs/Result_NetworkGraphDecodeErrorZ.mts index 6d95f7a7..025f7bd1 100644 --- a/ts/structs/Result_NetworkGraphDecodeErrorZ.mts +++ b/ts/structs/Result_NetworkGraphDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeE import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_NodeAliasDecodeErrorZ.mts b/ts/structs/Result_NodeAliasDecodeErrorZ.mts index c8f82fad..1fc046ca 100644 --- a/ts/structs/Result_NodeAliasDecodeErrorZ.mts +++ b/ts/structs/Result_NodeAliasDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_NodeAliasDecodeErrorZ extends CommonBase { * Creates a new CResult_NodeAliasDecodeErrorZ in the success state. */ public static constructor_ok(o: NodeAlias): Result_NodeAliasDecodeErrorZ { - const ret: bigint = bindings.CResult_NodeAliasDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_NodeAliasDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_NodeAliasDecodeErrorZ = Result_NodeAliasDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_NodeAnnouncementDecodeErrorZ.mts b/ts/structs/Result_NodeAnnouncementDecodeErrorZ.mts index fec7cd15..3e75d4e7 100644 --- a/ts/structs/Result_NodeAnnouncementDecodeErrorZ.mts +++ b/ts/structs/Result_NodeAnnouncementDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_NodeAnnouncementDecodeErrorZ extends CommonBase { * Creates a new CResult_NodeAnnouncementDecodeErrorZ in the success state. */ public static constructor_ok(o: NodeAnnouncement): Result_NodeAnnouncementDecodeErrorZ { - const ret: bigint = bindings.CResult_NodeAnnouncementDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_NodeAnnouncementDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_NodeAnnouncementDecodeErrorZ = Result_NodeAnnouncementDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_NodeAnnouncementInfoDecodeErrorZ.mts b/ts/structs/Result_NodeAnnouncementInfoDecodeErrorZ.mts index 0780d614..e553d367 100644 --- a/ts/structs/Result_NodeAnnouncementInfoDecodeErrorZ.mts +++ b/ts/structs/Result_NodeAnnouncementInfoDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_NodeAnnouncementInfoDecodeErrorZ extends CommonBase { * Creates a new CResult_NodeAnnouncementInfoDecodeErrorZ in the success state. */ public static constructor_ok(o: NodeAnnouncementInfo): Result_NodeAnnouncementInfoDecodeErrorZ { - const ret: bigint = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_NodeAnnouncementInfoDecodeErrorZ = Result_NodeAnnouncementInfoDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_NodeFeaturesDecodeErrorZ.mts b/ts/structs/Result_NodeFeaturesDecodeErrorZ.mts index 1d1e9071..06d20562 100644 --- a/ts/structs/Result_NodeFeaturesDecodeErrorZ.mts +++ b/ts/structs/Result_NodeFeaturesDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_NodeFeaturesDecodeErrorZ extends CommonBase { * Creates a new CResult_NodeFeaturesDecodeErrorZ in the success state. */ public static constructor_ok(o: NodeFeatures): Result_NodeFeaturesDecodeErrorZ { - const ret: bigint = bindings.CResult_NodeFeaturesDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_NodeFeaturesDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_NodeFeaturesDecodeErrorZ = Result_NodeFeaturesDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_NodeIdDecodeErrorZ.mts b/ts/structs/Result_NodeIdDecodeErrorZ.mts index ad0472c9..7c1c0cf1 100644 --- a/ts/structs/Result_NodeIdDecodeErrorZ.mts +++ b/ts/structs/Result_NodeIdDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,7 +163,15 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_NodeIdDecodeErrorZ extends CommonBase { * Creates a new CResult_NodeIdDecodeErrorZ in the success state. */ public static constructor_ok(o: NodeId): Result_NodeIdDecodeErrorZ { - const ret: bigint = bindings.CResult_NodeIdDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_NodeIdDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_NodeIdDecodeErrorZ = Result_NodeIdDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_NodeInfoDecodeErrorZ.mts b/ts/structs/Result_NodeInfoDecodeErrorZ.mts index 28b7ee74..964070a1 100644 --- a/ts/structs/Result_NodeInfoDecodeErrorZ.mts +++ b/ts/structs/Result_NodeInfoDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeE import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_NodeInfoDecodeErrorZ extends CommonBase { * Creates a new CResult_NodeInfoDecodeErrorZ in the success state. */ public static constructor_ok(o: NodeInfo): Result_NodeInfoDecodeErrorZ { - const ret: bigint = bindings.CResult_NodeInfoDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_NodeInfoDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_NodeInfoDecodeErrorZ = Result_NodeInfoDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_NoneAPIErrorZ.mts b/ts/structs/Result_NoneAPIErrorZ.mts index 1670c8ab..9343bb64 100644 --- a/ts/structs/Result_NoneAPIErrorZ.mts +++ b/ts/structs/Result_NoneAPIErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -39,7 +44,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_NoneBolt11SemanticErrorZ.mts b/ts/structs/Result_NoneBolt11SemanticErrorZ.mts index 1a1812ee..953a43ad 100644 --- a/ts/structs/Result_NoneBolt11SemanticErrorZ.mts +++ b/ts/structs/Result_NoneBolt11SemanticErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_NoneBolt12SemanticErrorZ.mts b/ts/structs/Result_NoneBolt12SemanticErrorZ.mts index 04adb771..1df173ca 100644 --- a/ts/structs/Result_NoneBolt12SemanticErrorZ.mts +++ b/ts/structs/Result_NoneBolt12SemanticErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,17 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,11 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_NoneIOErrorZ.mts b/ts/structs/Result_NoneIOErrorZ.mts index 67d07c35..7843d8e3 100644 --- a/ts/structs/Result_NoneIOErrorZ.mts +++ b/ts/structs/Result_NoneIOErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs' import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_NoneLightningErrorZ.mts b/ts/structs/Result_NoneLightningErrorZ.mts index 79d20c05..a9adbdd4 100644 --- a/ts/structs/Result_NoneLightningErrorZ.mts +++ b/ts/structs/Result_NoneLightningErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -622,7 +687,7 @@ export class Result_NoneLightningErrorZ extends CommonBase { * Creates a new CResult_NoneLightningErrorZ in the error state. */ public static constructor_err(e: LightningError): Result_NoneLightningErrorZ { - const ret: bigint = bindings.CResult_NoneLightningErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e)); + const ret: bigint = bindings.CResult_NoneLightningErrorZ_err(CommonBase.get_ptr_of(e)); const ret_hu_conv: Result_NoneLightningErrorZ = Result_NoneLightningErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, e); return ret_hu_conv; diff --git a/ts/structs/Result_NoneNoneZ.mts b/ts/structs/Result_NoneNoneZ.mts index ab3138e4..f57139c2 100644 --- a/ts/structs/Result_NoneNoneZ.mts +++ b/ts/structs/Result_NoneNoneZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescrip import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_NonePaymentSendFailureZ.mts b/ts/structs/Result_NonePaymentSendFailureZ.mts index 9bcfc814..0c5069ea 100644 --- a/ts/structs/Result_NonePaymentSendFailureZ.mts +++ b/ts/structs/Result_NonePaymentSendFailureZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_NonePeerHandleErrorZ.mts b/ts/structs/Result_NonePeerHandleErrorZ.mts index 39507149..d0d44026 100644 --- a/ts/structs/Result_NonePeerHandleErrorZ.mts +++ b/ts/structs/Result_NonePeerHandleErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -622,7 +687,7 @@ export class Result_NonePeerHandleErrorZ extends CommonBase { * Creates a new CResult_NonePeerHandleErrorZ in the error state. */ public static constructor_err(e: PeerHandleError): Result_NonePeerHandleErrorZ { - const ret: bigint = bindings.CResult_NonePeerHandleErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e)); + const ret: bigint = bindings.CResult_NonePeerHandleErrorZ_err(CommonBase.get_ptr_of(e)); const ret_hu_conv: Result_NonePeerHandleErrorZ = Result_NonePeerHandleErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, e); return ret_hu_conv; diff --git a/ts/structs/Result_NoneRetryableSendFailureZ.mts b/ts/structs/Result_NoneRetryableSendFailureZ.mts index 9157a00d..4fbd0190 100644 --- a/ts/structs/Result_NoneRetryableSendFailureZ.mts +++ b/ts/structs/Result_NoneRetryableSendFailureZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_OfferBolt12ParseErrorZ.mts b/ts/structs/Result_OfferBolt12ParseErrorZ.mts index 4c934d35..12135303 100644 --- a/ts/structs/Result_OfferBolt12ParseErrorZ.mts +++ b/ts/structs/Result_OfferBolt12ParseErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,9 +163,17 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_OfferBolt12ParseErrorZ extends CommonBase { * Creates a new CResult_OfferBolt12ParseErrorZ in the success state. */ public static constructor_ok(o: Offer): Result_OfferBolt12ParseErrorZ { - const ret: bigint = bindings.CResult_OfferBolt12ParseErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_OfferBolt12ParseErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_OfferBolt12ParseErrorZ = Result_OfferBolt12ParseErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; @@ -623,7 +688,7 @@ export class Result_OfferBolt12ParseErrorZ extends CommonBase { * Creates a new CResult_OfferBolt12ParseErrorZ in the error state. */ public static constructor_err(e: Bolt12ParseError): Result_OfferBolt12ParseErrorZ { - const ret: bigint = bindings.CResult_OfferBolt12ParseErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e)); + const ret: bigint = bindings.CResult_OfferBolt12ParseErrorZ_err(CommonBase.get_ptr_of(e)); const ret_hu_conv: Result_OfferBolt12ParseErrorZ = Result_OfferBolt12ParseErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, e); return ret_hu_conv; diff --git a/ts/structs/Result_OfferBolt12SemanticErrorZ.mts b/ts/structs/Result_OfferBolt12SemanticErrorZ.mts new file mode 100644 index 00000000..54fe1958 --- /dev/null +++ b/ts/structs/Result_OfferBolt12SemanticErrorZ.mts @@ -0,0 +1,740 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + + +export class Result_OfferBolt12SemanticErrorZ extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.CResult_OfferBolt12SemanticErrorZ_free); + } + /* @internal */ + public static constr_from_ptr(ptr: bigint): Result_OfferBolt12SemanticErrorZ { + if (bindings.CResult_OfferBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_OfferBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_OfferBolt12SemanticErrorZ_Err(null, ptr); + } + } + /** + * Creates a new CResult_OfferBolt12SemanticErrorZ in the success state. + */ + public static constructor_ok(o: Offer): Result_OfferBolt12SemanticErrorZ { + const ret: bigint = bindings.CResult_OfferBolt12SemanticErrorZ_ok(CommonBase.get_ptr_of(o)); + const ret_hu_conv: Result_OfferBolt12SemanticErrorZ = Result_OfferBolt12SemanticErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, o); + return ret_hu_conv; + } + + /** + * Creates a new CResult_OfferBolt12SemanticErrorZ in the error state. + */ + public static constructor_err(e: Bolt12SemanticError): Result_OfferBolt12SemanticErrorZ { + const ret: bigint = bindings.CResult_OfferBolt12SemanticErrorZ_err(e); + const ret_hu_conv: Result_OfferBolt12SemanticErrorZ = Result_OfferBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public is_ok(): boolean { + const ret: boolean = bindings.CResult_OfferBolt12SemanticErrorZ_is_ok(this.ptr); + return ret; + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.CResult_OfferBolt12SemanticErrorZ_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a new CResult_OfferBolt12SemanticErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public clone(): Result_OfferBolt12SemanticErrorZ { + const ret: bigint = bindings.CResult_OfferBolt12SemanticErrorZ_clone(this.ptr); + const ret_hu_conv: Result_OfferBolt12SemanticErrorZ = Result_OfferBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +export class Result_OfferBolt12SemanticErrorZ_OK extends Result_OfferBolt12SemanticErrorZ { + public res: Offer; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const res: bigint = bindings.CResult_OfferBolt12SemanticErrorZ_get_ok(ptr); + const res_hu_conv: Offer = new Offer(null, res); + CommonBase.add_ref_from(res_hu_conv, this); + this.res = res_hu_conv; + } +} +export class Result_OfferBolt12SemanticErrorZ_Err extends Result_OfferBolt12SemanticErrorZ { + public err: Bolt12SemanticError; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + this.err = bindings.CResult_OfferBolt12SemanticErrorZ_get_err(ptr); + } +} \ No newline at end of file diff --git a/ts/structs/Result_OfferIdDecodeErrorZ.mts b/ts/structs/Result_OfferIdDecodeErrorZ.mts new file mode 100644 index 00000000..d972cd8e --- /dev/null +++ b/ts/structs/Result_OfferIdDecodeErrorZ.mts @@ -0,0 +1,744 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + + +export class Result_OfferIdDecodeErrorZ extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.CResult_OfferIdDecodeErrorZ_free); + } + /* @internal */ + public static constr_from_ptr(ptr: bigint): Result_OfferIdDecodeErrorZ { + if (bindings.CResult_OfferIdDecodeErrorZ_is_ok(ptr)) { + return new Result_OfferIdDecodeErrorZ_OK(null, ptr); + } else { + return new Result_OfferIdDecodeErrorZ_Err(null, ptr); + } + } + /** + * Creates a new CResult_OfferIdDecodeErrorZ in the success state. + */ + public static constructor_ok(o: OfferId): Result_OfferIdDecodeErrorZ { + const ret: bigint = bindings.CResult_OfferIdDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); + const ret_hu_conv: Result_OfferIdDecodeErrorZ = Result_OfferIdDecodeErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, o); + return ret_hu_conv; + } + + /** + * Creates a new CResult_OfferIdDecodeErrorZ in the error state. + */ + public static constructor_err(e: DecodeError): Result_OfferIdDecodeErrorZ { + const ret: bigint = bindings.CResult_OfferIdDecodeErrorZ_err(CommonBase.get_ptr_of(e)); + const ret_hu_conv: Result_OfferIdDecodeErrorZ = Result_OfferIdDecodeErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, e); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public is_ok(): boolean { + const ret: boolean = bindings.CResult_OfferIdDecodeErrorZ_is_ok(this.ptr); + return ret; + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.CResult_OfferIdDecodeErrorZ_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a new CResult_OfferIdDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public clone(): Result_OfferIdDecodeErrorZ { + const ret: bigint = bindings.CResult_OfferIdDecodeErrorZ_clone(this.ptr); + const ret_hu_conv: Result_OfferIdDecodeErrorZ = Result_OfferIdDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +export class Result_OfferIdDecodeErrorZ_OK extends Result_OfferIdDecodeErrorZ { + public res: OfferId; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const res: bigint = bindings.CResult_OfferIdDecodeErrorZ_get_ok(ptr); + const res_hu_conv: OfferId = new OfferId(null, res); + CommonBase.add_ref_from(res_hu_conv, this); + this.res = res_hu_conv; + } +} +export class Result_OfferIdDecodeErrorZ_Err extends Result_OfferIdDecodeErrorZ { + public err: DecodeError; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const err: bigint = bindings.CResult_OfferIdDecodeErrorZ_get_err(ptr); + const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err); + CommonBase.add_ref_from(err_hu_conv, this); + this.err = err_hu_conv; + } +} \ No newline at end of file diff --git a/ts/structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mts b/ts/structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mts new file mode 100644 index 00000000..4b70a817 --- /dev/null +++ b/ts/structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mts @@ -0,0 +1,740 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + + +export class Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free); + } + /* @internal */ + public static constr_from_ptr(ptr: bigint): Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ { + if (bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_Err(null, ptr); + } + } + /** + * Creates a new CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ in the success state. + */ + public static constructor_ok(o: OfferWithDerivedMetadataBuilder): Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ { + const ret: bigint = bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(CommonBase.get_ptr_of(o)); + const ret_hu_conv: Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ = Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, o); + return ret_hu_conv; + } + + /** + * Creates a new CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ in the error state. + */ + public static constructor_err(e: Bolt12SemanticError): Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ { + const ret: bigint = bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(e); + const ret_hu_conv: Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ = Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public is_ok(): boolean { + const ret: boolean = bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(this.ptr); + return ret; + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a new CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public clone(): Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ { + const ret: bigint = bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(this.ptr); + const ret_hu_conv: Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ = Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +export class Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_OK extends Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ { + public res: OfferWithDerivedMetadataBuilder; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const res: bigint = bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(ptr); + const res_hu_conv: OfferWithDerivedMetadataBuilder = new OfferWithDerivedMetadataBuilder(null, res); + CommonBase.add_ref_from(res_hu_conv, this); + this.res = res_hu_conv; + } +} +export class Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_Err extends Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ { + public err: Bolt12SemanticError; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + this.err = bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(ptr); + } +} \ No newline at end of file diff --git a/ts/structs/Result_OffersMessageDecodeErrorZ.mts b/ts/structs/Result_OffersMessageDecodeErrorZ.mts index 52591995..92c1e6aa 100644 --- a/ts/structs/Result_OffersMessageDecodeErrorZ.mts +++ b/ts/structs/Result_OffersMessageDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_OnionMessageDecodeErrorZ.mts b/ts/structs/Result_OnionMessageDecodeErrorZ.mts index 509dad4d..fde5124d 100644 --- a/ts/structs/Result_OnionMessageDecodeErrorZ.mts +++ b/ts/structs/Result_OnionMessageDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_OnionMessageDecodeErrorZ extends CommonBase { * Creates a new CResult_OnionMessageDecodeErrorZ in the success state. */ public static constructor_ok(o: OnionMessage): Result_OnionMessageDecodeErrorZ { - const ret: bigint = bindings.CResult_OnionMessageDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_OnionMessageDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_OnionMessageDecodeErrorZ = Result_OnionMessageDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_OnionMessagePathNoneZ.mts b/ts/structs/Result_OnionMessagePathNoneZ.mts index 5def6c24..09b34476 100644 --- a/ts/structs/Result_OnionMessagePathNoneZ.mts +++ b/ts/structs/Result_OnionMessagePathNoneZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_OnionMessagePathNoneZ extends CommonBase { * Creates a new CResult_OnionMessagePathNoneZ in the success state. */ public static constructor_ok(o: OnionMessagePath): Result_OnionMessagePathNoneZ { - const ret: bigint = bindings.CResult_OnionMessagePathNoneZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_OnionMessagePathNoneZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_OnionMessagePathNoneZ = Result_OnionMessagePathNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_OnionPacketDecodeErrorZ.mts b/ts/structs/Result_OnionPacketDecodeErrorZ.mts index f53198c1..544f4368 100644 --- a/ts/structs/Result_OnionPacketDecodeErrorZ.mts +++ b/ts/structs/Result_OnionPacketDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_OnionPacketDecodeErrorZ extends CommonBase { * Creates a new CResult_OnionPacketDecodeErrorZ in the success state. */ public static constructor_ok(o: OnionPacket): Result_OnionPacketDecodeErrorZ { - const ret: bigint = bindings.CResult_OnionPacketDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_OnionPacketDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_OnionPacketDecodeErrorZ = Result_OnionPacketDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_OpenChannelDecodeErrorZ.mts b/ts/structs/Result_OpenChannelDecodeErrorZ.mts index f47d6fe0..d674b5d1 100644 --- a/ts/structs/Result_OpenChannelDecodeErrorZ.mts +++ b/ts/structs/Result_OpenChannelDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_OpenChannelDecodeErrorZ extends CommonBase { * Creates a new CResult_OpenChannelDecodeErrorZ in the success state. */ public static constructor_ok(o: OpenChannel): Result_OpenChannelDecodeErrorZ { - const ret: bigint = bindings.CResult_OpenChannelDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_OpenChannelDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_OpenChannelDecodeErrorZ = Result_OpenChannelDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_OpenChannelV2DecodeErrorZ.mts b/ts/structs/Result_OpenChannelV2DecodeErrorZ.mts index 54fde4f2..14e887ee 100644 --- a/ts/structs/Result_OpenChannelV2DecodeErrorZ.mts +++ b/ts/structs/Result_OpenChannelV2DecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_OpenChannelV2DecodeErrorZ extends CommonBase { * Creates a new CResult_OpenChannelV2DecodeErrorZ in the success state. */ public static constructor_ok(o: OpenChannelV2): Result_OpenChannelV2DecodeErrorZ { - const ret: bigint = bindings.CResult_OpenChannelV2DecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_OpenChannelV2DecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_OpenChannelV2DecodeErrorZ = Result_OpenChannelV2DecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_OutPointDecodeErrorZ.mts b/ts/structs/Result_OutPointDecodeErrorZ.mts index 48c51643..3f101849 100644 --- a/ts/structs/Result_OutPointDecodeErrorZ.mts +++ b/ts/structs/Result_OutPointDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_OutPointDecodeErrorZ extends CommonBase { * Creates a new CResult_OutPointDecodeErrorZ in the success state. */ public static constructor_ok(o: OutPoint): Result_OutPointDecodeErrorZ { - const ret: bigint = bindings.CResult_OutPointDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_OutPointDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_OutPointDecodeErrorZ = Result_OutPointDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_OutputSpendStatusDecodeErrorZ.mts b/ts/structs/Result_OutputSpendStatusDecodeErrorZ.mts new file mode 100644 index 00000000..a3a2a3b0 --- /dev/null +++ b/ts/structs/Result_OutputSpendStatusDecodeErrorZ.mts @@ -0,0 +1,744 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + + +export class Result_OutputSpendStatusDecodeErrorZ extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.CResult_OutputSpendStatusDecodeErrorZ_free); + } + /* @internal */ + public static constr_from_ptr(ptr: bigint): Result_OutputSpendStatusDecodeErrorZ { + if (bindings.CResult_OutputSpendStatusDecodeErrorZ_is_ok(ptr)) { + return new Result_OutputSpendStatusDecodeErrorZ_OK(null, ptr); + } else { + return new Result_OutputSpendStatusDecodeErrorZ_Err(null, ptr); + } + } + /** + * Creates a new CResult_OutputSpendStatusDecodeErrorZ in the success state. + */ + public static constructor_ok(o: OutputSpendStatus): Result_OutputSpendStatusDecodeErrorZ { + const ret: bigint = bindings.CResult_OutputSpendStatusDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); + const ret_hu_conv: Result_OutputSpendStatusDecodeErrorZ = Result_OutputSpendStatusDecodeErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, o); + return ret_hu_conv; + } + + /** + * Creates a new CResult_OutputSpendStatusDecodeErrorZ in the error state. + */ + public static constructor_err(e: DecodeError): Result_OutputSpendStatusDecodeErrorZ { + const ret: bigint = bindings.CResult_OutputSpendStatusDecodeErrorZ_err(CommonBase.get_ptr_of(e)); + const ret_hu_conv: Result_OutputSpendStatusDecodeErrorZ = Result_OutputSpendStatusDecodeErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, e); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public is_ok(): boolean { + const ret: boolean = bindings.CResult_OutputSpendStatusDecodeErrorZ_is_ok(this.ptr); + return ret; + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a new CResult_OutputSpendStatusDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public clone(): Result_OutputSpendStatusDecodeErrorZ { + const ret: bigint = bindings.CResult_OutputSpendStatusDecodeErrorZ_clone(this.ptr); + const ret_hu_conv: Result_OutputSpendStatusDecodeErrorZ = Result_OutputSpendStatusDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +export class Result_OutputSpendStatusDecodeErrorZ_OK extends Result_OutputSpendStatusDecodeErrorZ { + public res: OutputSpendStatus; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const res: bigint = bindings.CResult_OutputSpendStatusDecodeErrorZ_get_ok(ptr); + const res_hu_conv: OutputSpendStatus = OutputSpendStatus.constr_from_ptr(res); + CommonBase.add_ref_from(res_hu_conv, this); + this.res = res_hu_conv; + } +} +export class Result_OutputSpendStatusDecodeErrorZ_Err extends Result_OutputSpendStatusDecodeErrorZ { + public err: DecodeError; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const err: bigint = bindings.CResult_OutputSpendStatusDecodeErrorZ_get_err(ptr); + const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err); + CommonBase.add_ref_from(err_hu_conv, this); + this.err = err_hu_conv; + } +} \ No newline at end of file diff --git a/ts/structs/Result_OutputSweeperDecodeErrorZ.mts b/ts/structs/Result_OutputSweeperDecodeErrorZ.mts new file mode 100644 index 00000000..fbc6ae4d --- /dev/null +++ b/ts/structs/Result_OutputSweeperDecodeErrorZ.mts @@ -0,0 +1,736 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + + +export class Result_OutputSweeperDecodeErrorZ extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.CResult_OutputSweeperDecodeErrorZ_free); + } + /* @internal */ + public static constr_from_ptr(ptr: bigint): Result_OutputSweeperDecodeErrorZ { + if (bindings.CResult_OutputSweeperDecodeErrorZ_is_ok(ptr)) { + return new Result_OutputSweeperDecodeErrorZ_OK(null, ptr); + } else { + return new Result_OutputSweeperDecodeErrorZ_Err(null, ptr); + } + } + /** + * Creates a new CResult_OutputSweeperDecodeErrorZ in the success state. + */ + public static constructor_ok(o_best_block: BestBlock, o_broadcaster: BroadcasterInterface, o_fee_estimator: FeeEstimator, o_chain_data_source: Option_FilterZ, o_output_spender: OutputSpender, o_change_destination_source: ChangeDestinationSource, o_kv_store: KVStore, o_logger: Logger): Result_OutputSweeperDecodeErrorZ { + const ret: bigint = bindings.CResult_OutputSweeperDecodeErrorZ_ok(bindings.OutputSweeper_new(CommonBase.get_ptr_of(o_best_block), CommonBase.get_ptr_of(o_broadcaster), CommonBase.get_ptr_of(o_fee_estimator), CommonBase.get_ptr_of(o_chain_data_source), CommonBase.get_ptr_of(o_output_spender), CommonBase.get_ptr_of(o_change_destination_source), CommonBase.get_ptr_of(o_kv_store), CommonBase.get_ptr_of(o_logger))); + const ret_hu_conv: Result_OutputSweeperDecodeErrorZ = Result_OutputSweeperDecodeErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, o_best_block); + CommonBase.add_ref_from(ret_hu_conv, o_broadcaster); + CommonBase.add_ref_from(ret_hu_conv, o_fee_estimator); + CommonBase.add_ref_from(ret_hu_conv, o_chain_data_source); + CommonBase.add_ref_from(ret_hu_conv, o_output_spender); + CommonBase.add_ref_from(ret_hu_conv, o_change_destination_source); + CommonBase.add_ref_from(ret_hu_conv, o_kv_store); + CommonBase.add_ref_from(ret_hu_conv, o_logger); + return ret_hu_conv; + } + + /** + * Creates a new CResult_OutputSweeperDecodeErrorZ in the error state. + */ + public static constructor_err(e: DecodeError): Result_OutputSweeperDecodeErrorZ { + const ret: bigint = bindings.CResult_OutputSweeperDecodeErrorZ_err(CommonBase.get_ptr_of(e)); + const ret_hu_conv: Result_OutputSweeperDecodeErrorZ = Result_OutputSweeperDecodeErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, e); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public is_ok(): boolean { + const ret: boolean = bindings.CResult_OutputSweeperDecodeErrorZ_is_ok(this.ptr); + return ret; + } + +} +export class Result_OutputSweeperDecodeErrorZ_OK extends Result_OutputSweeperDecodeErrorZ { + public res: OutputSweeper; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const res: bigint = bindings.CResult_OutputSweeperDecodeErrorZ_get_ok(ptr); + const res_hu_conv: OutputSweeper = new OutputSweeper(null, res); + CommonBase.add_ref_from(res_hu_conv, this); + this.res = res_hu_conv; + } +} +export class Result_OutputSweeperDecodeErrorZ_Err extends Result_OutputSweeperDecodeErrorZ { + public err: DecodeError; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const err: bigint = bindings.CResult_OutputSweeperDecodeErrorZ_get_err(ptr); + const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err); + CommonBase.add_ref_from(err_hu_conv, this); + this.err = err_hu_conv; + } +} \ No newline at end of file diff --git a/ts/structs/Result_PayeePubKeySecp256k1ErrorZ.mts b/ts/structs/Result_PayeePubKeySecp256k1ErrorZ.mts index 3ea7e624..6335dce4 100644 --- a/ts/structs/Result_PayeePubKeySecp256k1ErrorZ.mts +++ b/ts/structs/Result_PayeePubKeySecp256k1ErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_PayeePubKeySecp256k1ErrorZ extends CommonBase { * Creates a new CResult_PayeePubKeySecp256k1ErrorZ in the success state. */ public static constructor_ok(o: PayeePubKey): Result_PayeePubKeySecp256k1ErrorZ { - const ret: bigint = bindings.CResult_PayeePubKeySecp256k1ErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_PayeePubKeySecp256k1ErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_PayeePubKeySecp256k1ErrorZ = Result_PayeePubKeySecp256k1ErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_PaymentConstraintsDecodeErrorZ.mts b/ts/structs/Result_PaymentConstraintsDecodeErrorZ.mts index 47e63563..2b39cbf4 100644 --- a/ts/structs/Result_PaymentConstraintsDecodeErrorZ.mts +++ b/ts/structs/Result_PaymentConstraintsDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,16 +508,22 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_PaymentConstraintsDecodeErrorZ extends CommonBase { * Creates a new CResult_PaymentConstraintsDecodeErrorZ in the success state. */ public static constructor_ok(o: PaymentConstraints): Result_PaymentConstraintsDecodeErrorZ { - const ret: bigint = bindings.CResult_PaymentConstraintsDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_PaymentConstraintsDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_PaymentConstraintsDecodeErrorZ = Result_PaymentConstraintsDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_PaymentContextDecodeErrorZ.mts b/ts/structs/Result_PaymentContextDecodeErrorZ.mts new file mode 100644 index 00000000..1b0209eb --- /dev/null +++ b/ts/structs/Result_PaymentContextDecodeErrorZ.mts @@ -0,0 +1,744 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + + +export class Result_PaymentContextDecodeErrorZ extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.CResult_PaymentContextDecodeErrorZ_free); + } + /* @internal */ + public static constr_from_ptr(ptr: bigint): Result_PaymentContextDecodeErrorZ { + if (bindings.CResult_PaymentContextDecodeErrorZ_is_ok(ptr)) { + return new Result_PaymentContextDecodeErrorZ_OK(null, ptr); + } else { + return new Result_PaymentContextDecodeErrorZ_Err(null, ptr); + } + } + /** + * Creates a new CResult_PaymentContextDecodeErrorZ in the success state. + */ + public static constructor_ok(o: PaymentContext): Result_PaymentContextDecodeErrorZ { + const ret: bigint = bindings.CResult_PaymentContextDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); + const ret_hu_conv: Result_PaymentContextDecodeErrorZ = Result_PaymentContextDecodeErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, o); + return ret_hu_conv; + } + + /** + * Creates a new CResult_PaymentContextDecodeErrorZ in the error state. + */ + public static constructor_err(e: DecodeError): Result_PaymentContextDecodeErrorZ { + const ret: bigint = bindings.CResult_PaymentContextDecodeErrorZ_err(CommonBase.get_ptr_of(e)); + const ret_hu_conv: Result_PaymentContextDecodeErrorZ = Result_PaymentContextDecodeErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, e); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public is_ok(): boolean { + const ret: boolean = bindings.CResult_PaymentContextDecodeErrorZ_is_ok(this.ptr); + return ret; + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.CResult_PaymentContextDecodeErrorZ_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a new CResult_PaymentContextDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public clone(): Result_PaymentContextDecodeErrorZ { + const ret: bigint = bindings.CResult_PaymentContextDecodeErrorZ_clone(this.ptr); + const ret_hu_conv: Result_PaymentContextDecodeErrorZ = Result_PaymentContextDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +export class Result_PaymentContextDecodeErrorZ_OK extends Result_PaymentContextDecodeErrorZ { + public res: PaymentContext; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const res: bigint = bindings.CResult_PaymentContextDecodeErrorZ_get_ok(ptr); + const res_hu_conv: PaymentContext = PaymentContext.constr_from_ptr(res); + CommonBase.add_ref_from(res_hu_conv, this); + this.res = res_hu_conv; + } +} +export class Result_PaymentContextDecodeErrorZ_Err extends Result_PaymentContextDecodeErrorZ { + public err: DecodeError; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const err: bigint = bindings.CResult_PaymentContextDecodeErrorZ_get_err(ptr); + const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err); + CommonBase.add_ref_from(err_hu_conv, this); + this.err = err_hu_conv; + } +} \ No newline at end of file diff --git a/ts/structs/Result_PaymentFailureReasonDecodeErrorZ.mts b/ts/structs/Result_PaymentFailureReasonDecodeErrorZ.mts index 6e9c3fe8..4fc319db 100644 --- a/ts/structs/Result_PaymentFailureReasonDecodeErrorZ.mts +++ b/ts/structs/Result_PaymentFailureReasonDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_PaymentParametersDecodeErrorZ.mts b/ts/structs/Result_PaymentParametersDecodeErrorZ.mts index 39b9f83c..d66ca2ea 100644 --- a/ts/structs/Result_PaymentParametersDecodeErrorZ.mts +++ b/ts/structs/Result_PaymentParametersDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_PaymentParametersDecodeErrorZ extends CommonBase { * Creates a new CResult_PaymentParametersDecodeErrorZ in the success state. */ public static constructor_ok(o: PaymentParameters): Result_PaymentParametersDecodeErrorZ { - const ret: bigint = bindings.CResult_PaymentParametersDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_PaymentParametersDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_PaymentParametersDecodeErrorZ = Result_PaymentParametersDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_PaymentPurposeDecodeErrorZ.mts b/ts/structs/Result_PaymentPurposeDecodeErrorZ.mts index f17f6bc8..ab0e30da 100644 --- a/ts/structs/Result_PaymentPurposeDecodeErrorZ.mts +++ b/ts/structs/Result_PaymentPurposeDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_PaymentRelayDecodeErrorZ.mts b/ts/structs/Result_PaymentRelayDecodeErrorZ.mts index 23f92d79..8f80f64e 100644 --- a/ts/structs/Result_PaymentRelayDecodeErrorZ.mts +++ b/ts/structs/Result_PaymentRelayDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,16 +508,22 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_PaymentRelayDecodeErrorZ extends CommonBase { * Creates a new CResult_PaymentRelayDecodeErrorZ in the success state. */ public static constructor_ok(o: PaymentRelay): Result_PaymentRelayDecodeErrorZ { - const ret: bigint = bindings.CResult_PaymentRelayDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_PaymentRelayDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_PaymentRelayDecodeErrorZ = Result_PaymentRelayDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_PeeledOnionNoneZ.mts b/ts/structs/Result_PeeledOnionNoneZ.mts index 04724983..434b6617 100644 --- a/ts/structs/Result_PeeledOnionNoneZ.mts +++ b/ts/structs/Result_PeeledOnionNoneZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { SendSuccess } from '../structs/SendSuccess.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -636,6 +701,21 @@ export class Result_PeeledOnionNoneZ extends CommonBase { return ret; } + public clone_ptr(): bigint { + const ret: bigint = bindings.CResult_PeeledOnionNoneZ_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a new CResult_PeeledOnionNoneZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public clone(): Result_PeeledOnionNoneZ { + const ret: bigint = bindings.CResult_PeeledOnionNoneZ_clone(this.ptr); + const ret_hu_conv: Result_PeeledOnionNoneZ = Result_PeeledOnionNoneZ.constr_from_ptr(ret); + return ret_hu_conv; + } + } export class Result_PeeledOnionNoneZ_OK extends Result_PeeledOnionNoneZ { public res: PeeledOnion; diff --git a/ts/structs/Result_PendingHTLCInfoDecodeErrorZ.mts b/ts/structs/Result_PendingHTLCInfoDecodeErrorZ.mts index 1f507ea1..1a501bc0 100644 --- a/ts/structs/Result_PendingHTLCInfoDecodeErrorZ.mts +++ b/ts/structs/Result_PendingHTLCInfoDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_PendingHTLCInfoDecodeErrorZ extends CommonBase { * Creates a new CResult_PendingHTLCInfoDecodeErrorZ in the success state. */ public static constructor_ok(o: PendingHTLCInfo): Result_PendingHTLCInfoDecodeErrorZ { - const ret: bigint = bindings.CResult_PendingHTLCInfoDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_PendingHTLCInfoDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_PendingHTLCInfoDecodeErrorZ = Result_PendingHTLCInfoDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_PendingHTLCInfoInboundHTLCErrZ.mts b/ts/structs/Result_PendingHTLCInfoInboundHTLCErrZ.mts index 6ef15153..f0684a03 100644 --- a/ts/structs/Result_PendingHTLCInfoInboundHTLCErrZ.mts +++ b/ts/structs/Result_PendingHTLCInfoInboundHTLCErrZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Utxo } from '../structs/Utxo.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_PendingHTLCInfoInboundHTLCErrZ extends CommonBase { * Creates a new CResult_PendingHTLCInfoInboundHTLCErrZ in the success state. */ public static constructor_ok(o: PendingHTLCInfo): Result_PendingHTLCInfoInboundHTLCErrZ { - const ret: bigint = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_PendingHTLCInfoInboundHTLCErrZ = Result_PendingHTLCInfoInboundHTLCErrZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; @@ -622,11 +687,10 @@ export class Result_PendingHTLCInfoInboundHTLCErrZ extends CommonBase { /** * Creates a new CResult_PendingHTLCInfoInboundHTLCErrZ in the error state. */ - public static constructor_err(e_err_code_arg: number, e_err_data_arg: Uint8Array, e_msg_arg: string): Result_PendingHTLCInfoInboundHTLCErrZ { - const ret: bigint = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_err(bindings.InboundHTLCErr_new(e_err_code_arg, bindings.encodeUint8Array(e_err_data_arg), bindings.encodeString(e_msg_arg))); + public static constructor_err(e: InboundHTLCErr): Result_PendingHTLCInfoInboundHTLCErrZ { + const ret: bigint = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_err(CommonBase.get_ptr_of(e)); const ret_hu_conv: Result_PendingHTLCInfoInboundHTLCErrZ = Result_PendingHTLCInfoInboundHTLCErrZ.constr_from_ptr(ret); - ; - ; + CommonBase.add_ref_from(ret_hu_conv, e); return ret_hu_conv; } @@ -638,6 +702,21 @@ export class Result_PendingHTLCInfoInboundHTLCErrZ extends CommonBase { return ret; } + public clone_ptr(): bigint { + const ret: bigint = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a new CResult_PendingHTLCInfoInboundHTLCErrZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public clone(): Result_PendingHTLCInfoInboundHTLCErrZ { + const ret: bigint = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_clone(this.ptr); + const ret_hu_conv: Result_PendingHTLCInfoInboundHTLCErrZ = Result_PendingHTLCInfoInboundHTLCErrZ.constr_from_ptr(ret); + return ret_hu_conv; + } + } export class Result_PendingHTLCInfoInboundHTLCErrZ_OK extends Result_PendingHTLCInfoInboundHTLCErrZ { public res: PendingHTLCInfo; diff --git a/ts/structs/Result_PendingHTLCRoutingDecodeErrorZ.mts b/ts/structs/Result_PendingHTLCRoutingDecodeErrorZ.mts index 6c04ae80..740ce7be 100644 --- a/ts/structs/Result_PendingHTLCRoutingDecodeErrorZ.mts +++ b/ts/structs/Result_PendingHTLCRoutingDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_PhantomRouteHintsDecodeErrorZ.mts b/ts/structs/Result_PhantomRouteHintsDecodeErrorZ.mts index 3387695d..d8b48602 100644 --- a/ts/structs/Result_PhantomRouteHintsDecodeErrorZ.mts +++ b/ts/structs/Result_PhantomRouteHintsDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_PhantomRouteHintsDecodeErrorZ extends CommonBase { * Creates a new CResult_PhantomRouteHintsDecodeErrorZ in the success state. */ public static constructor_ok(o: PhantomRouteHints): Result_PhantomRouteHintsDecodeErrorZ { - const ret: bigint = bindings.CResult_PhantomRouteHintsDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_PhantomRouteHintsDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_PhantomRouteHintsDecodeErrorZ = Result_PhantomRouteHintsDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_PingDecodeErrorZ.mts b/ts/structs/Result_PingDecodeErrorZ.mts index e8cef087..60d3185c 100644 --- a/ts/structs/Result_PingDecodeErrorZ.mts +++ b/ts/structs/Result_PingDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_PingDecodeErrorZ extends CommonBase { * Creates a new CResult_PingDecodeErrorZ in the success state. */ public static constructor_ok(o: Ping): Result_PingDecodeErrorZ { - const ret: bigint = bindings.CResult_PingDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_PingDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_PingDecodeErrorZ = Result_PingDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_PongDecodeErrorZ.mts b/ts/structs/Result_PongDecodeErrorZ.mts index 0dd84a61..b860d32d 100644 --- a/ts/structs/Result_PongDecodeErrorZ.mts +++ b/ts/structs/Result_PongDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_PongDecodeErrorZ extends CommonBase { * Creates a new CResult_PongDecodeErrorZ in the success state. */ public static constructor_ok(o: Pong): Result_PongDecodeErrorZ { - const ret: bigint = bindings.CResult_PongDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_PongDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_PongDecodeErrorZ = Result_PongDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_PositiveTimestampCreationErrorZ.mts b/ts/structs/Result_PositiveTimestampCreationErrorZ.mts index c75bcca5..8cd109c6 100644 --- a/ts/structs/Result_PositiveTimestampCreationErrorZ.mts +++ b/ts/structs/Result_PositiveTimestampCreationErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_PositiveTimestampCreationErrorZ extends CommonBase { * Creates a new CResult_PositiveTimestampCreationErrorZ in the success state. */ public static constructor_ok(o: PositiveTimestamp): Result_PositiveTimestampCreationErrorZ { - const ret: bigint = bindings.CResult_PositiveTimestampCreationErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_PositiveTimestampCreationErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_PositiveTimestampCreationErrorZ = Result_PositiveTimestampCreationErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_PrivateRouteCreationErrorZ.mts b/ts/structs/Result_PrivateRouteCreationErrorZ.mts index 60b7899c..0bf5b3dd 100644 --- a/ts/structs/Result_PrivateRouteCreationErrorZ.mts +++ b/ts/structs/Result_PrivateRouteCreationErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_PrivateRouteCreationErrorZ extends CommonBase { * Creates a new CResult_PrivateRouteCreationErrorZ in the success state. */ public static constructor_ok(o: PrivateRoute): Result_PrivateRouteCreationErrorZ { - const ret: bigint = bindings.CResult_PrivateRouteCreationErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_PrivateRouteCreationErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_PrivateRouteCreationErrorZ = Result_PrivateRouteCreationErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_ProbabilisticScorerDecodeErrorZ.mts b/ts/structs/Result_ProbabilisticScorerDecodeErrorZ.mts index 8cc2aacb..42ada708 100644 --- a/ts/structs/Result_ProbabilisticScorerDecodeErrorZ.mts +++ b/ts/structs/Result_ProbabilisticScorerDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Record } from '../structs/Record.mjs'; import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_ProbabilisticScorerDecodeErrorZ extends CommonBase { * Creates a new CResult_ProbabilisticScorerDecodeErrorZ in the success state. */ public static constructor_ok(o_decay_params: ProbabilisticScoringDecayParameters, o_network_graph: NetworkGraph, o_logger: Logger): Result_ProbabilisticScorerDecodeErrorZ { - const ret: bigint = bindings.CResult_ProbabilisticScorerDecodeErrorZ_ok(bindings.ProbabilisticScorer_new(o_decay_params == null ? 0n : CommonBase.get_ptr_of(o_decay_params), o_network_graph == null ? 0n : CommonBase.get_ptr_of(o_network_graph), CommonBase.get_ptr_of(o_logger))); + const ret: bigint = bindings.CResult_ProbabilisticScorerDecodeErrorZ_ok(bindings.ProbabilisticScorer_new(CommonBase.get_ptr_of(o_decay_params), CommonBase.get_ptr_of(o_network_graph), CommonBase.get_ptr_of(o_logger))); const ret_hu_conv: Result_ProbabilisticScorerDecodeErrorZ = Result_ProbabilisticScorerDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o_decay_params); CommonBase.add_ref_from(ret_hu_conv, o_network_graph); diff --git a/ts/structs/Result_PublicKeyNoneZ.mts b/ts/structs/Result_PublicKeyNoneZ.mts index cba0e007..8300714f 100644 --- a/ts/structs/Result_PublicKeyNoneZ.mts +++ b/ts/structs/Result_PublicKeyNoneZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescrip import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_PublicKeySecp256k1ErrorZ.mts b/ts/structs/Result_PublicKeySecp256k1ErrorZ.mts index 07812d59..6ec63a05 100644 --- a/ts/structs/Result_PublicKeySecp256k1ErrorZ.mts +++ b/ts/structs/Result_PublicKeySecp256k1ErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,7 +163,15 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_QueryChannelRangeDecodeErrorZ.mts b/ts/structs/Result_QueryChannelRangeDecodeErrorZ.mts index d3acc20c..f5a07879 100644 --- a/ts/structs/Result_QueryChannelRangeDecodeErrorZ.mts +++ b/ts/structs/Result_QueryChannelRangeDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_QueryChannelRangeDecodeErrorZ extends CommonBase { * Creates a new CResult_QueryChannelRangeDecodeErrorZ in the success state. */ public static constructor_ok(o: QueryChannelRange): Result_QueryChannelRangeDecodeErrorZ { - const ret: bigint = bindings.CResult_QueryChannelRangeDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_QueryChannelRangeDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_QueryChannelRangeDecodeErrorZ = Result_QueryChannelRangeDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_QueryShortChannelIdsDecodeErrorZ.mts b/ts/structs/Result_QueryShortChannelIdsDecodeErrorZ.mts index 6190f9ad..cdf60dd6 100644 --- a/ts/structs/Result_QueryShortChannelIdsDecodeErrorZ.mts +++ b/ts/structs/Result_QueryShortChannelIdsDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_QueryShortChannelIdsDecodeErrorZ extends CommonBase { * Creates a new CResult_QueryShortChannelIdsDecodeErrorZ in the success state. */ public static constructor_ok(o: QueryShortChannelIds): Result_QueryShortChannelIdsDecodeErrorZ { - const ret: bigint = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_QueryShortChannelIdsDecodeErrorZ = Result_QueryShortChannelIdsDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_RecipientOnionFieldsDecodeErrorZ.mts b/ts/structs/Result_RecipientOnionFieldsDecodeErrorZ.mts index ed92a45f..478721b0 100644 --- a/ts/structs/Result_RecipientOnionFieldsDecodeErrorZ.mts +++ b/ts/structs/Result_RecipientOnionFieldsDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -39,7 +44,16 @@ import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_RecipientOnionFieldsDecodeErrorZ extends CommonBase { * Creates a new CResult_RecipientOnionFieldsDecodeErrorZ in the success state. */ public static constructor_ok(o: RecipientOnionFields): Result_RecipientOnionFieldsDecodeErrorZ { - const ret: bigint = bindings.CResult_RecipientOnionFieldsDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_RecipientOnionFieldsDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_RecipientOnionFieldsDecodeErrorZ = Result_RecipientOnionFieldsDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_RecipientOnionFieldsNoneZ.mts b/ts/structs/Result_RecipientOnionFieldsNoneZ.mts index f459b6ac..13ce8c12 100644 --- a/ts/structs/Result_RecipientOnionFieldsNoneZ.mts +++ b/ts/structs/Result_RecipientOnionFieldsNoneZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -39,7 +44,16 @@ import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_RecipientOnionFieldsNoneZ extends CommonBase { * Creates a new CResult_RecipientOnionFieldsNoneZ in the success state. */ public static constructor_ok(o: RecipientOnionFields): Result_RecipientOnionFieldsNoneZ { - const ret: bigint = bindings.CResult_RecipientOnionFieldsNoneZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_RecipientOnionFieldsNoneZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_RecipientOnionFieldsNoneZ = Result_RecipientOnionFieldsNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_RecoverableSignatureNoneZ.mts b/ts/structs/Result_RecoverableSignatureNoneZ.mts index f9759429..71c3e0d1 100644 --- a/ts/structs/Result_RecoverableSignatureNoneZ.mts +++ b/ts/structs/Result_RecoverableSignatureNoneZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescrip import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_RefundBolt12ParseErrorZ.mts b/ts/structs/Result_RefundBolt12ParseErrorZ.mts index 0d32e718..f4df6614 100644 --- a/ts/structs/Result_RefundBolt12ParseErrorZ.mts +++ b/ts/structs/Result_RefundBolt12ParseErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Retry } from '../structs/Retry.mjs'; import { DecodeError } from '../structs/DecodeError.mjs'; @@ -39,7 +44,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_RefundBolt12ParseErrorZ extends CommonBase { * Creates a new CResult_RefundBolt12ParseErrorZ in the success state. */ public static constructor_ok(o: Refund): Result_RefundBolt12ParseErrorZ { - const ret: bigint = bindings.CResult_RefundBolt12ParseErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_RefundBolt12ParseErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_RefundBolt12ParseErrorZ = Result_RefundBolt12ParseErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; @@ -623,7 +688,7 @@ export class Result_RefundBolt12ParseErrorZ extends CommonBase { * Creates a new CResult_RefundBolt12ParseErrorZ in the error state. */ public static constructor_err(e: Bolt12ParseError): Result_RefundBolt12ParseErrorZ { - const ret: bigint = bindings.CResult_RefundBolt12ParseErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e)); + const ret: bigint = bindings.CResult_RefundBolt12ParseErrorZ_err(CommonBase.get_ptr_of(e)); const ret_hu_conv: Result_RefundBolt12ParseErrorZ = Result_RefundBolt12ParseErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, e); return ret_hu_conv; diff --git a/ts/structs/Result_RefundBolt12SemanticErrorZ.mts b/ts/structs/Result_RefundBolt12SemanticErrorZ.mts new file mode 100644 index 00000000..0b1a4be9 --- /dev/null +++ b/ts/structs/Result_RefundBolt12SemanticErrorZ.mts @@ -0,0 +1,740 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + + +export class Result_RefundBolt12SemanticErrorZ extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.CResult_RefundBolt12SemanticErrorZ_free); + } + /* @internal */ + public static constr_from_ptr(ptr: bigint): Result_RefundBolt12SemanticErrorZ { + if (bindings.CResult_RefundBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_RefundBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_RefundBolt12SemanticErrorZ_Err(null, ptr); + } + } + /** + * Creates a new CResult_RefundBolt12SemanticErrorZ in the success state. + */ + public static constructor_ok(o: Refund): Result_RefundBolt12SemanticErrorZ { + const ret: bigint = bindings.CResult_RefundBolt12SemanticErrorZ_ok(CommonBase.get_ptr_of(o)); + const ret_hu_conv: Result_RefundBolt12SemanticErrorZ = Result_RefundBolt12SemanticErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, o); + return ret_hu_conv; + } + + /** + * Creates a new CResult_RefundBolt12SemanticErrorZ in the error state. + */ + public static constructor_err(e: Bolt12SemanticError): Result_RefundBolt12SemanticErrorZ { + const ret: bigint = bindings.CResult_RefundBolt12SemanticErrorZ_err(e); + const ret_hu_conv: Result_RefundBolt12SemanticErrorZ = Result_RefundBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public is_ok(): boolean { + const ret: boolean = bindings.CResult_RefundBolt12SemanticErrorZ_is_ok(this.ptr); + return ret; + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.CResult_RefundBolt12SemanticErrorZ_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a new CResult_RefundBolt12SemanticErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public clone(): Result_RefundBolt12SemanticErrorZ { + const ret: bigint = bindings.CResult_RefundBolt12SemanticErrorZ_clone(this.ptr); + const ret_hu_conv: Result_RefundBolt12SemanticErrorZ = Result_RefundBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +export class Result_RefundBolt12SemanticErrorZ_OK extends Result_RefundBolt12SemanticErrorZ { + public res: Refund; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const res: bigint = bindings.CResult_RefundBolt12SemanticErrorZ_get_ok(ptr); + const res_hu_conv: Refund = new Refund(null, res); + CommonBase.add_ref_from(res_hu_conv, this); + this.res = res_hu_conv; + } +} +export class Result_RefundBolt12SemanticErrorZ_Err extends Result_RefundBolt12SemanticErrorZ { + public err: Bolt12SemanticError; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + this.err = bindings.CResult_RefundBolt12SemanticErrorZ_get_err(ptr); + } +} \ No newline at end of file diff --git a/ts/structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mts b/ts/structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mts new file mode 100644 index 00000000..cd3ce613 --- /dev/null +++ b/ts/structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mts @@ -0,0 +1,740 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + + +export class Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free); + } + /* @internal */ + public static constr_from_ptr(ptr: bigint): Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ { + if (bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_Err(null, ptr); + } + } + /** + * Creates a new CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ in the success state. + */ + public static constructor_ok(o: RefundMaybeWithDerivedMetadataBuilder): Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ { + const ret: bigint = bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(CommonBase.get_ptr_of(o)); + const ret_hu_conv: Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ = Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, o); + return ret_hu_conv; + } + + /** + * Creates a new CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ in the error state. + */ + public static constructor_err(e: Bolt12SemanticError): Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ { + const ret: bigint = bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(e); + const ret_hu_conv: Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ = Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public is_ok(): boolean { + const ret: boolean = bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(this.ptr); + return ret; + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a new CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public clone(): Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ { + const ret: bigint = bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(this.ptr); + const ret_hu_conv: Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ = Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +export class Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_OK extends Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ { + public res: RefundMaybeWithDerivedMetadataBuilder; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const res: bigint = bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(ptr); + const res_hu_conv: RefundMaybeWithDerivedMetadataBuilder = new RefundMaybeWithDerivedMetadataBuilder(null, res); + CommonBase.add_ref_from(res_hu_conv, this); + this.res = res_hu_conv; + } +} +export class Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_Err extends Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ { + public err: Bolt12SemanticError; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + this.err = bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(ptr); + } +} \ No newline at end of file diff --git a/ts/structs/Result_ReplyChannelRangeDecodeErrorZ.mts b/ts/structs/Result_ReplyChannelRangeDecodeErrorZ.mts index ec94dacf..afcf9122 100644 --- a/ts/structs/Result_ReplyChannelRangeDecodeErrorZ.mts +++ b/ts/structs/Result_ReplyChannelRangeDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_ReplyChannelRangeDecodeErrorZ extends CommonBase { * Creates a new CResult_ReplyChannelRangeDecodeErrorZ in the success state. */ public static constructor_ok(o: ReplyChannelRange): Result_ReplyChannelRangeDecodeErrorZ { - const ret: bigint = bindings.CResult_ReplyChannelRangeDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_ReplyChannelRangeDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_ReplyChannelRangeDecodeErrorZ = Result_ReplyChannelRangeDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mts b/ts/structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mts index 0f213bf6..e81e1a02 100644 --- a/ts/structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mts +++ b/ts/structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_ReplyShortChannelIdsEndDecodeErrorZ extends CommonBase { * Creates a new CResult_ReplyShortChannelIdsEndDecodeErrorZ in the success state. */ public static constructor_ok(o: ReplyShortChannelIdsEnd): Result_ReplyShortChannelIdsEndDecodeErrorZ { - const ret: bigint = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_ReplyShortChannelIdsEndDecodeErrorZ = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_RetryDecodeErrorZ.mts b/ts/structs/Result_RetryDecodeErrorZ.mts index e382b115..7a5ff7c1 100644 --- a/ts/structs/Result_RetryDecodeErrorZ.mts +++ b/ts/structs/Result_RetryDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -39,7 +44,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_RevocationBasepointDecodeErrorZ.mts b/ts/structs/Result_RevocationBasepointDecodeErrorZ.mts index 8a133349..33ba7b04 100644 --- a/ts/structs/Result_RevocationBasepointDecodeErrorZ.mts +++ b/ts/structs/Result_RevocationBasepointDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeError import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_RevocationBasepointDecodeErrorZ extends CommonBase { * Creates a new CResult_RevocationBasepointDecodeErrorZ in the success state. */ public static constructor_ok(o: RevocationBasepoint): Result_RevocationBasepointDecodeErrorZ { - const ret: bigint = bindings.CResult_RevocationBasepointDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_RevocationBasepointDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_RevocationBasepointDecodeErrorZ = Result_RevocationBasepointDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_RevocationKeyDecodeErrorZ.mts b/ts/structs/Result_RevocationKeyDecodeErrorZ.mts index 559a4f8a..29fd4a04 100644 --- a/ts/structs/Result_RevocationKeyDecodeErrorZ.mts +++ b/ts/structs/Result_RevocationKeyDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeError import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_RevocationKeyDecodeErrorZ extends CommonBase { * Creates a new CResult_RevocationKeyDecodeErrorZ in the success state. */ public static constructor_ok(o: RevocationKey): Result_RevocationKeyDecodeErrorZ { - const ret: bigint = bindings.CResult_RevocationKeyDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_RevocationKeyDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_RevocationKeyDecodeErrorZ = Result_RevocationKeyDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_RevokeAndACKDecodeErrorZ.mts b/ts/structs/Result_RevokeAndACKDecodeErrorZ.mts index 0bc79e3e..85ea4750 100644 --- a/ts/structs/Result_RevokeAndACKDecodeErrorZ.mts +++ b/ts/structs/Result_RevokeAndACKDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_RevokeAndACKDecodeErrorZ extends CommonBase { * Creates a new CResult_RevokeAndACKDecodeErrorZ in the success state. */ public static constructor_ok(o: RevokeAndACK): Result_RevokeAndACKDecodeErrorZ { - const ret: bigint = bindings.CResult_RevokeAndACKDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_RevokeAndACKDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_RevokeAndACKDecodeErrorZ = Result_RevokeAndACKDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_RouteDecodeErrorZ.mts b/ts/structs/Result_RouteDecodeErrorZ.mts index f11c55ee..f4b91134 100644 --- a/ts/structs/Result_RouteDecodeErrorZ.mts +++ b/ts/structs/Result_RouteDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_RouteDecodeErrorZ extends CommonBase { * Creates a new CResult_RouteDecodeErrorZ in the success state. */ public static constructor_ok(o: Route): Result_RouteDecodeErrorZ { - const ret: bigint = bindings.CResult_RouteDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_RouteDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_RouteDecodeErrorZ = Result_RouteDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_RouteHintDecodeErrorZ.mts b/ts/structs/Result_RouteHintDecodeErrorZ.mts index 3d4fb153..d90b19a2 100644 --- a/ts/structs/Result_RouteHintDecodeErrorZ.mts +++ b/ts/structs/Result_RouteHintDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_RouteHintDecodeErrorZ extends CommonBase { * Creates a new CResult_RouteHintDecodeErrorZ in the success state. */ public static constructor_ok(o: RouteHint): Result_RouteHintDecodeErrorZ { - const ret: bigint = bindings.CResult_RouteHintDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_RouteHintDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_RouteHintDecodeErrorZ = Result_RouteHintDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_RouteHintHopDecodeErrorZ.mts b/ts/structs/Result_RouteHintHopDecodeErrorZ.mts index d271f507..6f1851f2 100644 --- a/ts/structs/Result_RouteHintHopDecodeErrorZ.mts +++ b/ts/structs/Result_RouteHintHopDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_RouteHintHopDecodeErrorZ extends CommonBase { * Creates a new CResult_RouteHintHopDecodeErrorZ in the success state. */ public static constructor_ok(o: RouteHintHop): Result_RouteHintHopDecodeErrorZ { - const ret: bigint = bindings.CResult_RouteHintHopDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_RouteHintHopDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_RouteHintHopDecodeErrorZ = Result_RouteHintHopDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_RouteHopDecodeErrorZ.mts b/ts/structs/Result_RouteHopDecodeErrorZ.mts index 874dd3f9..3eac8627 100644 --- a/ts/structs/Result_RouteHopDecodeErrorZ.mts +++ b/ts/structs/Result_RouteHopDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_RouteHopDecodeErrorZ extends CommonBase { * Creates a new CResult_RouteHopDecodeErrorZ in the success state. */ public static constructor_ok(o: RouteHop): Result_RouteHopDecodeErrorZ { - const ret: bigint = bindings.CResult_RouteHopDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_RouteHopDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_RouteHopDecodeErrorZ = Result_RouteHopDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_RouteLightningErrorZ.mts b/ts/structs/Result_RouteLightningErrorZ.mts index 7dfd7e55..80fe794d 100644 --- a/ts/structs/Result_RouteLightningErrorZ.mts +++ b/ts/structs/Result_RouteLightningErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_RouteLightningErrorZ extends CommonBase { * Creates a new CResult_RouteLightningErrorZ in the success state. */ public static constructor_ok(o: Route): Result_RouteLightningErrorZ { - const ret: bigint = bindings.CResult_RouteLightningErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_RouteLightningErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_RouteLightningErrorZ = Result_RouteLightningErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; @@ -623,7 +688,7 @@ export class Result_RouteLightningErrorZ extends CommonBase { * Creates a new CResult_RouteLightningErrorZ in the error state. */ public static constructor_err(e: LightningError): Result_RouteLightningErrorZ { - const ret: bigint = bindings.CResult_RouteLightningErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e)); + const ret: bigint = bindings.CResult_RouteLightningErrorZ_err(CommonBase.get_ptr_of(e)); const ret_hu_conv: Result_RouteLightningErrorZ = Result_RouteLightningErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, e); return ret_hu_conv; diff --git a/ts/structs/Result_RouteParametersDecodeErrorZ.mts b/ts/structs/Result_RouteParametersDecodeErrorZ.mts index 4b7568e7..92e52fdf 100644 --- a/ts/structs/Result_RouteParametersDecodeErrorZ.mts +++ b/ts/structs/Result_RouteParametersDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_RouteParametersDecodeErrorZ extends CommonBase { * Creates a new CResult_RouteParametersDecodeErrorZ in the success state. */ public static constructor_ok(o: RouteParameters): Result_RouteParametersDecodeErrorZ { - const ret: bigint = bindings.CResult_RouteParametersDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_RouteParametersDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_RouteParametersDecodeErrorZ = Result_RouteParametersDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_RoutingFeesDecodeErrorZ.mts b/ts/structs/Result_RoutingFeesDecodeErrorZ.mts index ba7c9e78..e9f716c9 100644 --- a/ts/structs/Result_RoutingFeesDecodeErrorZ.mts +++ b/ts/structs/Result_RoutingFeesDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_RoutingFeesDecodeErrorZ extends CommonBase { * Creates a new CResult_RoutingFeesDecodeErrorZ in the success state. */ public static constructor_ok(o: RoutingFees): Result_RoutingFeesDecodeErrorZ { - const ret: bigint = bindings.CResult_RoutingFeesDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_RoutingFeesDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_RoutingFeesDecodeErrorZ = Result_RoutingFeesDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_SchnorrSignatureNoneZ.mts b/ts/structs/Result_SchnorrSignatureNoneZ.mts index 2ad81f3d..0b32136c 100644 --- a/ts/structs/Result_SchnorrSignatureNoneZ.mts +++ b/ts/structs/Result_SchnorrSignatureNoneZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,15 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -63,6 +76,7 @@ import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_SendSuccessSendErrorZ.mts b/ts/structs/Result_SendSuccessSendErrorZ.mts index 1bcb4dee..8c11da9d 100644 --- a/ts/structs/Result_SendSuccessSendErrorZ.mts +++ b/ts/structs/Result_SendSuccessSendErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -637,6 +702,21 @@ export class Result_SendSuccessSendErrorZ extends CommonBase { return ret; } + public clone_ptr(): bigint { + const ret: bigint = bindings.CResult_SendSuccessSendErrorZ_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a new CResult_SendSuccessSendErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public clone(): Result_SendSuccessSendErrorZ { + const ret: bigint = bindings.CResult_SendSuccessSendErrorZ_clone(this.ptr); + const ret_hu_conv: Result_SendSuccessSendErrorZ = Result_SendSuccessSendErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + } export class Result_SendSuccessSendErrorZ_OK extends Result_SendSuccessSendErrorZ { public res: SendSuccess; diff --git a/ts/structs/Result_ShutdownDecodeErrorZ.mts b/ts/structs/Result_ShutdownDecodeErrorZ.mts index d821943f..78a3249b 100644 --- a/ts/structs/Result_ShutdownDecodeErrorZ.mts +++ b/ts/structs/Result_ShutdownDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_ShutdownDecodeErrorZ extends CommonBase { * Creates a new CResult_ShutdownDecodeErrorZ in the success state. */ public static constructor_ok(o: Shutdown): Result_ShutdownDecodeErrorZ { - const ret: bigint = bindings.CResult_ShutdownDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_ShutdownDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_ShutdownDecodeErrorZ = Result_ShutdownDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_ShutdownScriptDecodeErrorZ.mts b/ts/structs/Result_ShutdownScriptDecodeErrorZ.mts index f6ad7be5..c9d62efb 100644 --- a/ts/structs/Result_ShutdownScriptDecodeErrorZ.mts +++ b/ts/structs/Result_ShutdownScriptDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_ShutdownScriptDecodeErrorZ extends CommonBase { * Creates a new CResult_ShutdownScriptDecodeErrorZ in the success state. */ public static constructor_ok(o: ShutdownScript): Result_ShutdownScriptDecodeErrorZ { - const ret: bigint = bindings.CResult_ShutdownScriptDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_ShutdownScriptDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_ShutdownScriptDecodeErrorZ = Result_ShutdownScriptDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_ShutdownScriptInvalidShutdownScriptZ.mts b/ts/structs/Result_ShutdownScriptInvalidShutdownScriptZ.mts index ec529afa..0875d116 100644 --- a/ts/structs/Result_ShutdownScriptInvalidShutdownScriptZ.mts +++ b/ts/structs/Result_ShutdownScriptInvalidShutdownScriptZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_ShutdownScriptInvalidShutdownScriptZ extends CommonBase { * Creates a new CResult_ShutdownScriptInvalidShutdownScriptZ in the success state. */ public static constructor_ok(o: ShutdownScript): Result_ShutdownScriptInvalidShutdownScriptZ { - const ret: bigint = bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_ShutdownScriptInvalidShutdownScriptZ = Result_ShutdownScriptInvalidShutdownScriptZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; @@ -623,7 +688,7 @@ export class Result_ShutdownScriptInvalidShutdownScriptZ extends CommonBase { * Creates a new CResult_ShutdownScriptInvalidShutdownScriptZ in the error state. */ public static constructor_err(e: InvalidShutdownScript): Result_ShutdownScriptInvalidShutdownScriptZ { - const ret: bigint = bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_err(e == null ? 0n : CommonBase.get_ptr_of(e)); + const ret: bigint = bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_err(CommonBase.get_ptr_of(e)); const ret_hu_conv: Result_ShutdownScriptInvalidShutdownScriptZ = Result_ShutdownScriptInvalidShutdownScriptZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, e); return ret_hu_conv; diff --git a/ts/structs/Result_ShutdownScriptNoneZ.mts b/ts/structs/Result_ShutdownScriptNoneZ.mts index fa766085..79c9d83e 100644 --- a/ts/structs/Result_ShutdownScriptNoneZ.mts +++ b/ts/structs/Result_ShutdownScriptNoneZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_ShutdownScriptNoneZ extends CommonBase { * Creates a new CResult_ShutdownScriptNoneZ in the success state. */ public static constructor_ok(o: ShutdownScript): Result_ShutdownScriptNoneZ { - const ret: bigint = bindings.CResult_ShutdownScriptNoneZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_ShutdownScriptNoneZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_ShutdownScriptNoneZ = Result_ShutdownScriptNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_SiPrefixBolt11ParseErrorZ.mts b/ts/structs/Result_SiPrefixBolt11ParseErrorZ.mts index b9a9bee8..1e105e54 100644 --- a/ts/structs/Result_SiPrefixBolt11ParseErrorZ.mts +++ b/ts/structs/Result_SiPrefixBolt11ParseErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mts b/ts/structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mts index e780315e..0451dae9 100644 --- a/ts/structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mts +++ b/ts/structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_SignedRawBolt11InvoiceBolt11ParseErrorZ extends CommonBase { * Creates a new CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ in the success state. */ public static constructor_ok(o: SignedRawBolt11Invoice): Result_SignedRawBolt11InvoiceBolt11ParseErrorZ { - const ret: bigint = bindings.CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_SignedRawBolt11InvoiceBolt11ParseErrorZ = Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_SocketAddressDecodeErrorZ.mts b/ts/structs/Result_SocketAddressDecodeErrorZ.mts index cacff34c..0a0e29eb 100644 --- a/ts/structs/Result_SocketAddressDecodeErrorZ.mts +++ b/ts/structs/Result_SocketAddressDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_SocketAddressSocketAddressParseErrorZ.mts b/ts/structs/Result_SocketAddressSocketAddressParseErrorZ.mts index 771fa67f..73adf87c 100644 --- a/ts/structs/Result_SocketAddressSocketAddressParseErrorZ.mts +++ b/ts/structs/Result_SocketAddressSocketAddressParseErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_SpendableOutputDescriptorDecodeErrorZ.mts b/ts/structs/Result_SpendableOutputDescriptorDecodeErrorZ.mts index dc8f080e..ee9adc35 100644 --- a/ts/structs/Result_SpendableOutputDescriptorDecodeErrorZ.mts +++ b/ts/structs/Result_SpendableOutputDescriptorDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_SpliceAckDecodeErrorZ.mts b/ts/structs/Result_SpliceAckDecodeErrorZ.mts index 8340fb36..d869cfd4 100644 --- a/ts/structs/Result_SpliceAckDecodeErrorZ.mts +++ b/ts/structs/Result_SpliceAckDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_SpliceAckDecodeErrorZ extends CommonBase { * Creates a new CResult_SpliceAckDecodeErrorZ in the success state. */ public static constructor_ok(o: SpliceAck): Result_SpliceAckDecodeErrorZ { - const ret: bigint = bindings.CResult_SpliceAckDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_SpliceAckDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_SpliceAckDecodeErrorZ = Result_SpliceAckDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_SpliceDecodeErrorZ.mts b/ts/structs/Result_SpliceDecodeErrorZ.mts index 9f284e74..1701f0b7 100644 --- a/ts/structs/Result_SpliceDecodeErrorZ.mts +++ b/ts/structs/Result_SpliceDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_SpliceDecodeErrorZ extends CommonBase { * Creates a new CResult_SpliceDecodeErrorZ in the success state. */ public static constructor_ok(o: Splice): Result_SpliceDecodeErrorZ { - const ret: bigint = bindings.CResult_SpliceDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_SpliceDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_SpliceDecodeErrorZ = Result_SpliceDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_SpliceLockedDecodeErrorZ.mts b/ts/structs/Result_SpliceLockedDecodeErrorZ.mts index b117371f..90442ba5 100644 --- a/ts/structs/Result_SpliceLockedDecodeErrorZ.mts +++ b/ts/structs/Result_SpliceLockedDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_SpliceLockedDecodeErrorZ extends CommonBase { * Creates a new CResult_SpliceLockedDecodeErrorZ in the success state. */ public static constructor_ok(o: SpliceLocked): Result_SpliceLockedDecodeErrorZ { - const ret: bigint = bindings.CResult_SpliceLockedDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_SpliceLockedDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_SpliceLockedDecodeErrorZ = Result_SpliceLockedDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mts b/ts/structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mts index 31324574..39a1100c 100644 --- a/ts/structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mts +++ b/ts/structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_StaticPaymentOutputDescriptorDecodeErrorZ extends CommonBase * Creates a new CResult_StaticPaymentOutputDescriptorDecodeErrorZ in the success state. */ public static constructor_ok(o: StaticPaymentOutputDescriptor): Result_StaticPaymentOutputDescriptorDecodeErrorZ { - const ret: bigint = bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_StaticPaymentOutputDescriptorDecodeErrorZ = Result_StaticPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_StfuDecodeErrorZ.mts b/ts/structs/Result_StfuDecodeErrorZ.mts index b67b636e..45764248 100644 --- a/ts/structs/Result_StfuDecodeErrorZ.mts +++ b/ts/structs/Result_StfuDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_StfuDecodeErrorZ extends CommonBase { * Creates a new CResult_StfuDecodeErrorZ in the success state. */ public static constructor_ok(o: Stfu): Result_StfuDecodeErrorZ { - const ret: bigint = bindings.CResult_StfuDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_StfuDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_StfuDecodeErrorZ = Result_StfuDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_StrSecp256k1ErrorZ.mts b/ts/structs/Result_StrSecp256k1ErrorZ.mts index d1d3e970..411940d4 100644 --- a/ts/structs/Result_StrSecp256k1ErrorZ.mts +++ b/ts/structs/Result_StrSecp256k1ErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,16 +508,22 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_ThirtyTwoBytesAPIErrorZ.mts b/ts/structs/Result_ThirtyTwoBytesAPIErrorZ.mts index 107ccb42..03b513bc 100644 --- a/ts/structs/Result_ThirtyTwoBytesAPIErrorZ.mts +++ b/ts/structs/Result_ThirtyTwoBytesAPIErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,9 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +269,12 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_ThirtyTwoBytesNoneZ.mts b/ts/structs/Result_ThirtyTwoBytesNoneZ.mts index b2b1e57b..bcf67634 100644 --- a/ts/structs/Result_ThirtyTwoBytesNoneZ.mts +++ b/ts/structs/Result_ThirtyTwoBytesNoneZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mts b/ts/structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mts index a48fc2f4..ae286154 100644 --- a/ts/structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mts +++ b/ts/structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mts b/ts/structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mts index 6e01d74a..9b2ed54a 100644 --- a/ts/structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mts +++ b/ts/structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_TrackedSpendableOutputDecodeErrorZ.mts b/ts/structs/Result_TrackedSpendableOutputDecodeErrorZ.mts new file mode 100644 index 00000000..569fa7e4 --- /dev/null +++ b/ts/structs/Result_TrackedSpendableOutputDecodeErrorZ.mts @@ -0,0 +1,744 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + + +export class Result_TrackedSpendableOutputDecodeErrorZ extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.CResult_TrackedSpendableOutputDecodeErrorZ_free); + } + /* @internal */ + public static constr_from_ptr(ptr: bigint): Result_TrackedSpendableOutputDecodeErrorZ { + if (bindings.CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(ptr)) { + return new Result_TrackedSpendableOutputDecodeErrorZ_OK(null, ptr); + } else { + return new Result_TrackedSpendableOutputDecodeErrorZ_Err(null, ptr); + } + } + /** + * Creates a new CResult_TrackedSpendableOutputDecodeErrorZ in the success state. + */ + public static constructor_ok(o: TrackedSpendableOutput): Result_TrackedSpendableOutputDecodeErrorZ { + const ret: bigint = bindings.CResult_TrackedSpendableOutputDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); + const ret_hu_conv: Result_TrackedSpendableOutputDecodeErrorZ = Result_TrackedSpendableOutputDecodeErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, o); + return ret_hu_conv; + } + + /** + * Creates a new CResult_TrackedSpendableOutputDecodeErrorZ in the error state. + */ + public static constructor_err(e: DecodeError): Result_TrackedSpendableOutputDecodeErrorZ { + const ret: bigint = bindings.CResult_TrackedSpendableOutputDecodeErrorZ_err(CommonBase.get_ptr_of(e)); + const ret_hu_conv: Result_TrackedSpendableOutputDecodeErrorZ = Result_TrackedSpendableOutputDecodeErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, e); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public is_ok(): boolean { + const ret: boolean = bindings.CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(this.ptr); + return ret; + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a new CResult_TrackedSpendableOutputDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public clone(): Result_TrackedSpendableOutputDecodeErrorZ { + const ret: bigint = bindings.CResult_TrackedSpendableOutputDecodeErrorZ_clone(this.ptr); + const ret_hu_conv: Result_TrackedSpendableOutputDecodeErrorZ = Result_TrackedSpendableOutputDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +export class Result_TrackedSpendableOutputDecodeErrorZ_OK extends Result_TrackedSpendableOutputDecodeErrorZ { + public res: TrackedSpendableOutput; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const res: bigint = bindings.CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(ptr); + const res_hu_conv: TrackedSpendableOutput = new TrackedSpendableOutput(null, res); + CommonBase.add_ref_from(res_hu_conv, this); + this.res = res_hu_conv; + } +} +export class Result_TrackedSpendableOutputDecodeErrorZ_Err extends Result_TrackedSpendableOutputDecodeErrorZ { + public err: DecodeError; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const err: bigint = bindings.CResult_TrackedSpendableOutputDecodeErrorZ_get_err(ptr); + const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err); + CommonBase.add_ref_from(err_hu_conv, this); + this.err = err_hu_conv; + } +} \ No newline at end of file diff --git a/ts/structs/Result_TransactionNoneZ.mts b/ts/structs/Result_TransactionNoneZ.mts index e0849faa..b9fdd9e5 100644 --- a/ts/structs/Result_TransactionNoneZ.mts +++ b/ts/structs/Result_TransactionNoneZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,7 +76,6 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_TransactionU16LenLimitedDecodeErrorZ.mts b/ts/structs/Result_TransactionU16LenLimitedDecodeErrorZ.mts index c657ff1b..5dfd4d10 100644 --- a/ts/structs/Result_TransactionU16LenLimitedDecodeErrorZ.mts +++ b/ts/structs/Result_TransactionU16LenLimitedDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErr import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_TransactionU16LenLimitedDecodeErrorZ extends CommonBase { * Creates a new CResult_TransactionU16LenLimitedDecodeErrorZ in the success state. */ public static constructor_ok(o: TransactionU16LenLimited): Result_TransactionU16LenLimitedDecodeErrorZ { - const ret: bigint = bindings.CResult_TransactionU16LenLimitedDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_TransactionU16LenLimitedDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_TransactionU16LenLimitedDecodeErrorZ = Result_TransactionU16LenLimitedDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_TransactionU16LenLimitedNoneZ.mts b/ts/structs/Result_TransactionU16LenLimitedNoneZ.mts index 225a677e..824ed41b 100644 --- a/ts/structs/Result_TransactionU16LenLimitedNoneZ.mts +++ b/ts/structs/Result_TransactionU16LenLimitedNoneZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErr import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_TransactionU16LenLimitedNoneZ extends CommonBase { * Creates a new CResult_TransactionU16LenLimitedNoneZ in the success state. */ public static constructor_ok(o: TransactionU16LenLimited): Result_TransactionU16LenLimitedNoneZ { - const ret: bigint = bindings.CResult_TransactionU16LenLimitedNoneZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_TransactionU16LenLimitedNoneZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_TransactionU16LenLimitedNoneZ = Result_TransactionU16LenLimitedNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_TrustedClosingTransactionNoneZ.mts b/ts/structs/Result_TrustedClosingTransactionNoneZ.mts index 5c41783e..f70ecc30 100644 --- a/ts/structs/Result_TrustedClosingTransactionNoneZ.mts +++ b/ts/structs/Result_TrustedClosingTransactionNoneZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_TrustedClosingTransactionNoneZ extends CommonBase { * Creates a new CResult_TrustedClosingTransactionNoneZ in the success state. */ public static constructor_ok(o: TrustedClosingTransaction): Result_TrustedClosingTransactionNoneZ { - const ret: bigint = bindings.CResult_TrustedClosingTransactionNoneZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_TrustedClosingTransactionNoneZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_TrustedClosingTransactionNoneZ = Result_TrustedClosingTransactionNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); // Due to rust's strict-ownership memory model, in some cases we need to "move" diff --git a/ts/structs/Result_TrustedCommitmentTransactionNoneZ.mts b/ts/structs/Result_TrustedCommitmentTransactionNoneZ.mts index d558cb61..b7d7e21b 100644 --- a/ts/structs/Result_TrustedCommitmentTransactionNoneZ.mts +++ b/ts/structs/Result_TrustedCommitmentTransactionNoneZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_TrustedCommitmentTransactionNoneZ extends CommonBase { * Creates a new CResult_TrustedCommitmentTransactionNoneZ in the success state. */ public static constructor_ok(o: TrustedCommitmentTransaction): Result_TrustedCommitmentTransactionNoneZ { - const ret: bigint = bindings.CResult_TrustedCommitmentTransactionNoneZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_TrustedCommitmentTransactionNoneZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_TrustedCommitmentTransactionNoneZ = Result_TrustedCommitmentTransactionNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); // Due to rust's strict-ownership memory model, in some cases we need to "move" diff --git a/ts/structs/Result_TxAbortDecodeErrorZ.mts b/ts/structs/Result_TxAbortDecodeErrorZ.mts index c863ba81..91ae4f88 100644 --- a/ts/structs/Result_TxAbortDecodeErrorZ.mts +++ b/ts/structs/Result_TxAbortDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_TxAbortDecodeErrorZ extends CommonBase { * Creates a new CResult_TxAbortDecodeErrorZ in the success state. */ public static constructor_ok(o: TxAbort): Result_TxAbortDecodeErrorZ { - const ret: bigint = bindings.CResult_TxAbortDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_TxAbortDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_TxAbortDecodeErrorZ = Result_TxAbortDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_TxAckRbfDecodeErrorZ.mts b/ts/structs/Result_TxAckRbfDecodeErrorZ.mts index 05b1a995..da8f9406 100644 --- a/ts/structs/Result_TxAckRbfDecodeErrorZ.mts +++ b/ts/structs/Result_TxAckRbfDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_TxAckRbfDecodeErrorZ extends CommonBase { * Creates a new CResult_TxAckRbfDecodeErrorZ in the success state. */ public static constructor_ok(o: TxAckRbf): Result_TxAckRbfDecodeErrorZ { - const ret: bigint = bindings.CResult_TxAckRbfDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_TxAckRbfDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_TxAckRbfDecodeErrorZ = Result_TxAckRbfDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_TxAddInputDecodeErrorZ.mts b/ts/structs/Result_TxAddInputDecodeErrorZ.mts index 4af2a98c..9605d4ae 100644 --- a/ts/structs/Result_TxAddInputDecodeErrorZ.mts +++ b/ts/structs/Result_TxAddInputDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_TxAddInputDecodeErrorZ extends CommonBase { * Creates a new CResult_TxAddInputDecodeErrorZ in the success state. */ public static constructor_ok(o: TxAddInput): Result_TxAddInputDecodeErrorZ { - const ret: bigint = bindings.CResult_TxAddInputDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_TxAddInputDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_TxAddInputDecodeErrorZ = Result_TxAddInputDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_TxAddOutputDecodeErrorZ.mts b/ts/structs/Result_TxAddOutputDecodeErrorZ.mts index 62fa95df..49648207 100644 --- a/ts/structs/Result_TxAddOutputDecodeErrorZ.mts +++ b/ts/structs/Result_TxAddOutputDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_TxAddOutputDecodeErrorZ extends CommonBase { * Creates a new CResult_TxAddOutputDecodeErrorZ in the success state. */ public static constructor_ok(o: TxAddOutput): Result_TxAddOutputDecodeErrorZ { - const ret: bigint = bindings.CResult_TxAddOutputDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_TxAddOutputDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_TxAddOutputDecodeErrorZ = Result_TxAddOutputDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_TxCompleteDecodeErrorZ.mts b/ts/structs/Result_TxCompleteDecodeErrorZ.mts index 6fdce18a..c72d4f64 100644 --- a/ts/structs/Result_TxCompleteDecodeErrorZ.mts +++ b/ts/structs/Result_TxCompleteDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_TxCompleteDecodeErrorZ extends CommonBase { * Creates a new CResult_TxCompleteDecodeErrorZ in the success state. */ public static constructor_ok(o: TxComplete): Result_TxCompleteDecodeErrorZ { - const ret: bigint = bindings.CResult_TxCompleteDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_TxCompleteDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_TxCompleteDecodeErrorZ = Result_TxCompleteDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_TxCreationKeysDecodeErrorZ.mts b/ts/structs/Result_TxCreationKeysDecodeErrorZ.mts index 2b83cf6a..d1dad1dd 100644 --- a/ts/structs/Result_TxCreationKeysDecodeErrorZ.mts +++ b/ts/structs/Result_TxCreationKeysDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_TxCreationKeysDecodeErrorZ extends CommonBase { * Creates a new CResult_TxCreationKeysDecodeErrorZ in the success state. */ public static constructor_ok(o: TxCreationKeys): Result_TxCreationKeysDecodeErrorZ { - const ret: bigint = bindings.CResult_TxCreationKeysDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_TxCreationKeysDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_TxCreationKeysDecodeErrorZ = Result_TxCreationKeysDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_TxInitRbfDecodeErrorZ.mts b/ts/structs/Result_TxInitRbfDecodeErrorZ.mts index 205c85c0..d855bda1 100644 --- a/ts/structs/Result_TxInitRbfDecodeErrorZ.mts +++ b/ts/structs/Result_TxInitRbfDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_TxInitRbfDecodeErrorZ extends CommonBase { * Creates a new CResult_TxInitRbfDecodeErrorZ in the success state. */ public static constructor_ok(o: TxInitRbf): Result_TxInitRbfDecodeErrorZ { - const ret: bigint = bindings.CResult_TxInitRbfDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_TxInitRbfDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_TxInitRbfDecodeErrorZ = Result_TxInitRbfDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_TxOutUtxoLookupErrorZ.mts b/ts/structs/Result_TxOutUtxoLookupErrorZ.mts index 4aaef4f9..3fb55df2 100644 --- a/ts/structs/Result_TxOutUtxoLookupErrorZ.mts +++ b/ts/structs/Result_TxOutUtxoLookupErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_TxRemoveInputDecodeErrorZ.mts b/ts/structs/Result_TxRemoveInputDecodeErrorZ.mts index 45e8f650..bcb841f5 100644 --- a/ts/structs/Result_TxRemoveInputDecodeErrorZ.mts +++ b/ts/structs/Result_TxRemoveInputDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_TxRemoveInputDecodeErrorZ extends CommonBase { * Creates a new CResult_TxRemoveInputDecodeErrorZ in the success state. */ public static constructor_ok(o: TxRemoveInput): Result_TxRemoveInputDecodeErrorZ { - const ret: bigint = bindings.CResult_TxRemoveInputDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_TxRemoveInputDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_TxRemoveInputDecodeErrorZ = Result_TxRemoveInputDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_TxRemoveOutputDecodeErrorZ.mts b/ts/structs/Result_TxRemoveOutputDecodeErrorZ.mts index 1c56255f..f1f37db2 100644 --- a/ts/structs/Result_TxRemoveOutputDecodeErrorZ.mts +++ b/ts/structs/Result_TxRemoveOutputDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_TxRemoveOutputDecodeErrorZ extends CommonBase { * Creates a new CResult_TxRemoveOutputDecodeErrorZ in the success state. */ public static constructor_ok(o: TxRemoveOutput): Result_TxRemoveOutputDecodeErrorZ { - const ret: bigint = bindings.CResult_TxRemoveOutputDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_TxRemoveOutputDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_TxRemoveOutputDecodeErrorZ = Result_TxRemoveOutputDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_TxSignaturesDecodeErrorZ.mts b/ts/structs/Result_TxSignaturesDecodeErrorZ.mts index 73946f77..c4b74605 100644 --- a/ts/structs/Result_TxSignaturesDecodeErrorZ.mts +++ b/ts/structs/Result_TxSignaturesDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_TxSignaturesDecodeErrorZ extends CommonBase { * Creates a new CResult_TxSignaturesDecodeErrorZ in the success state. */ public static constructor_ok(o: TxSignatures): Result_TxSignaturesDecodeErrorZ { - const ret: bigint = bindings.CResult_TxSignaturesDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_TxSignaturesDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_TxSignaturesDecodeErrorZ = Result_TxSignaturesDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_UnknownPaymentContextDecodeErrorZ.mts b/ts/structs/Result_UnknownPaymentContextDecodeErrorZ.mts new file mode 100644 index 00000000..d91bd8c0 --- /dev/null +++ b/ts/structs/Result_UnknownPaymentContextDecodeErrorZ.mts @@ -0,0 +1,744 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + + +export class Result_UnknownPaymentContextDecodeErrorZ extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.CResult_UnknownPaymentContextDecodeErrorZ_free); + } + /* @internal */ + public static constr_from_ptr(ptr: bigint): Result_UnknownPaymentContextDecodeErrorZ { + if (bindings.CResult_UnknownPaymentContextDecodeErrorZ_is_ok(ptr)) { + return new Result_UnknownPaymentContextDecodeErrorZ_OK(null, ptr); + } else { + return new Result_UnknownPaymentContextDecodeErrorZ_Err(null, ptr); + } + } + /** + * Creates a new CResult_UnknownPaymentContextDecodeErrorZ in the success state. + */ + public static constructor_ok(o: UnknownPaymentContext): Result_UnknownPaymentContextDecodeErrorZ { + const ret: bigint = bindings.CResult_UnknownPaymentContextDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); + const ret_hu_conv: Result_UnknownPaymentContextDecodeErrorZ = Result_UnknownPaymentContextDecodeErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, o); + return ret_hu_conv; + } + + /** + * Creates a new CResult_UnknownPaymentContextDecodeErrorZ in the error state. + */ + public static constructor_err(e: DecodeError): Result_UnknownPaymentContextDecodeErrorZ { + const ret: bigint = bindings.CResult_UnknownPaymentContextDecodeErrorZ_err(CommonBase.get_ptr_of(e)); + const ret_hu_conv: Result_UnknownPaymentContextDecodeErrorZ = Result_UnknownPaymentContextDecodeErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, e); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public is_ok(): boolean { + const ret: boolean = bindings.CResult_UnknownPaymentContextDecodeErrorZ_is_ok(this.ptr); + return ret; + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a new CResult_UnknownPaymentContextDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public clone(): Result_UnknownPaymentContextDecodeErrorZ { + const ret: bigint = bindings.CResult_UnknownPaymentContextDecodeErrorZ_clone(this.ptr); + const ret_hu_conv: Result_UnknownPaymentContextDecodeErrorZ = Result_UnknownPaymentContextDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +export class Result_UnknownPaymentContextDecodeErrorZ_OK extends Result_UnknownPaymentContextDecodeErrorZ { + public res: UnknownPaymentContext; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const res: bigint = bindings.CResult_UnknownPaymentContextDecodeErrorZ_get_ok(ptr); + const res_hu_conv: UnknownPaymentContext = new UnknownPaymentContext(null, res); + CommonBase.add_ref_from(res_hu_conv, this); + this.res = res_hu_conv; + } +} +export class Result_UnknownPaymentContextDecodeErrorZ_Err extends Result_UnknownPaymentContextDecodeErrorZ { + public err: DecodeError; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const err: bigint = bindings.CResult_UnknownPaymentContextDecodeErrorZ_get_err(ptr); + const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err); + CommonBase.add_ref_from(err_hu_conv, this); + this.err = err_hu_conv; + } +} \ No newline at end of file diff --git a/ts/structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mts b/ts/structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mts new file mode 100644 index 00000000..158c8648 --- /dev/null +++ b/ts/structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mts @@ -0,0 +1,740 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + + +export class Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free); + } + /* @internal */ + public static constr_from_ptr(ptr: bigint): Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ { + if (bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ_Err(null, ptr); + } + } + /** + * Creates a new CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ in the success state. + */ + public static constructor_ok(o: UnsignedBolt12Invoice): Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ { + const ret: bigint = bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok(CommonBase.get_ptr_of(o)); + const ret_hu_conv: Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ = Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, o); + return ret_hu_conv; + } + + /** + * Creates a new CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ in the error state. + */ + public static constructor_err(e: Bolt12SemanticError): Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ { + const ret: bigint = bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err(e); + const ret_hu_conv: Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ = Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public is_ok(): boolean { + const ret: boolean = bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(this.ptr); + return ret; + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a new CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public clone(): Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ { + const ret: bigint = bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(this.ptr); + const ret_hu_conv: Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ = Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +export class Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ_OK extends Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ { + public res: UnsignedBolt12Invoice; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const res: bigint = bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(ptr); + const res_hu_conv: UnsignedBolt12Invoice = new UnsignedBolt12Invoice(null, res); + CommonBase.add_ref_from(res_hu_conv, this); + this.res = res_hu_conv; + } +} +export class Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ_Err extends Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ { + public err: Bolt12SemanticError; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + this.err = bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(ptr); + } +} \ No newline at end of file diff --git a/ts/structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mts b/ts/structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mts index f1f54b72..e5868636 100644 --- a/ts/structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mts +++ b/ts/structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_UnsignedChannelAnnouncementDecodeErrorZ extends CommonBase { * Creates a new CResult_UnsignedChannelAnnouncementDecodeErrorZ in the success state. */ public static constructor_ok(o: UnsignedChannelAnnouncement): Result_UnsignedChannelAnnouncementDecodeErrorZ { - const ret: bigint = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_UnsignedChannelAnnouncementDecodeErrorZ = Result_UnsignedChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_UnsignedChannelUpdateDecodeErrorZ.mts b/ts/structs/Result_UnsignedChannelUpdateDecodeErrorZ.mts index 14b3c580..9e31403c 100644 --- a/ts/structs/Result_UnsignedChannelUpdateDecodeErrorZ.mts +++ b/ts/structs/Result_UnsignedChannelUpdateDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_UnsignedChannelUpdateDecodeErrorZ extends CommonBase { * Creates a new CResult_UnsignedChannelUpdateDecodeErrorZ in the success state. */ public static constructor_ok(o: UnsignedChannelUpdate): Result_UnsignedChannelUpdateDecodeErrorZ { - const ret: bigint = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_UnsignedChannelUpdateDecodeErrorZ = Result_UnsignedChannelUpdateDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mts b/ts/structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mts new file mode 100644 index 00000000..810bcdae --- /dev/null +++ b/ts/structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mts @@ -0,0 +1,740 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + + +export class Result_UnsignedInvoiceRequestBolt12SemanticErrorZ extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free); + } + /* @internal */ + public static constr_from_ptr(ptr: bigint): Result_UnsignedInvoiceRequestBolt12SemanticErrorZ { + if (bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_UnsignedInvoiceRequestBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_UnsignedInvoiceRequestBolt12SemanticErrorZ_Err(null, ptr); + } + } + /** + * Creates a new CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ in the success state. + */ + public static constructor_ok(o: UnsignedInvoiceRequest): Result_UnsignedInvoiceRequestBolt12SemanticErrorZ { + const ret: bigint = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(CommonBase.get_ptr_of(o)); + const ret_hu_conv: Result_UnsignedInvoiceRequestBolt12SemanticErrorZ = Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, o); + return ret_hu_conv; + } + + /** + * Creates a new CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ in the error state. + */ + public static constructor_err(e: Bolt12SemanticError): Result_UnsignedInvoiceRequestBolt12SemanticErrorZ { + const ret: bigint = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(e); + const ret_hu_conv: Result_UnsignedInvoiceRequestBolt12SemanticErrorZ = Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public is_ok(): boolean { + const ret: boolean = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(this.ptr); + return ret; + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a new CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public clone(): Result_UnsignedInvoiceRequestBolt12SemanticErrorZ { + const ret: bigint = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(this.ptr); + const ret_hu_conv: Result_UnsignedInvoiceRequestBolt12SemanticErrorZ = Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +export class Result_UnsignedInvoiceRequestBolt12SemanticErrorZ_OK extends Result_UnsignedInvoiceRequestBolt12SemanticErrorZ { + public res: UnsignedInvoiceRequest; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + const res: bigint = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(ptr); + const res_hu_conv: UnsignedInvoiceRequest = new UnsignedInvoiceRequest(null, res); + CommonBase.add_ref_from(res_hu_conv, this); + this.res = res_hu_conv; + } +} +export class Result_UnsignedInvoiceRequestBolt12SemanticErrorZ_Err extends Result_UnsignedInvoiceRequestBolt12SemanticErrorZ { + public err: Bolt12SemanticError; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + this.err = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(ptr); + } +} \ No newline at end of file diff --git a/ts/structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mts b/ts/structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mts index 25ecd08a..6de866d4 100644 --- a/ts/structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mts +++ b/ts/structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_UnsignedNodeAnnouncementDecodeErrorZ extends CommonBase { * Creates a new CResult_UnsignedNodeAnnouncementDecodeErrorZ in the success state. */ public static constructor_ok(o: UnsignedNodeAnnouncement): Result_UnsignedNodeAnnouncementDecodeErrorZ { - const ret: bigint = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_UnsignedNodeAnnouncementDecodeErrorZ = Result_UnsignedNodeAnnouncementDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_UntrustedStringDecodeErrorZ.mts b/ts/structs/Result_UntrustedStringDecodeErrorZ.mts index 35ea291c..de8bc0f5 100644 --- a/ts/structs/Result_UntrustedStringDecodeErrorZ.mts +++ b/ts/structs/Result_UntrustedStringDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErr import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_UntrustedStringDecodeErrorZ extends CommonBase { * Creates a new CResult_UntrustedStringDecodeErrorZ in the success state. */ public static constructor_ok(o: UntrustedString): Result_UntrustedStringDecodeErrorZ { - const ret: bigint = bindings.CResult_UntrustedStringDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_UntrustedStringDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_UntrustedStringDecodeErrorZ = Result_UntrustedStringDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_UpdateAddHTLCDecodeErrorZ.mts b/ts/structs/Result_UpdateAddHTLCDecodeErrorZ.mts index 1edfc4f3..8c69bcf3 100644 --- a/ts/structs/Result_UpdateAddHTLCDecodeErrorZ.mts +++ b/ts/structs/Result_UpdateAddHTLCDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_UpdateAddHTLCDecodeErrorZ extends CommonBase { * Creates a new CResult_UpdateAddHTLCDecodeErrorZ in the success state. */ public static constructor_ok(o: UpdateAddHTLC): Result_UpdateAddHTLCDecodeErrorZ { - const ret: bigint = bindings.CResult_UpdateAddHTLCDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_UpdateAddHTLCDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_UpdateAddHTLCDecodeErrorZ = Result_UpdateAddHTLCDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_UpdateFailHTLCDecodeErrorZ.mts b/ts/structs/Result_UpdateFailHTLCDecodeErrorZ.mts index 4f645d88..e6f18dea 100644 --- a/ts/structs/Result_UpdateFailHTLCDecodeErrorZ.mts +++ b/ts/structs/Result_UpdateFailHTLCDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_UpdateFailHTLCDecodeErrorZ extends CommonBase { * Creates a new CResult_UpdateFailHTLCDecodeErrorZ in the success state. */ public static constructor_ok(o: UpdateFailHTLC): Result_UpdateFailHTLCDecodeErrorZ { - const ret: bigint = bindings.CResult_UpdateFailHTLCDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_UpdateFailHTLCDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_UpdateFailHTLCDecodeErrorZ = Result_UpdateFailHTLCDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mts b/ts/structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mts index 342f6ce5..672ba92c 100644 --- a/ts/structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mts +++ b/ts/structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_UpdateFailMalformedHTLCDecodeErrorZ extends CommonBase { * Creates a new CResult_UpdateFailMalformedHTLCDecodeErrorZ in the success state. */ public static constructor_ok(o: UpdateFailMalformedHTLC): Result_UpdateFailMalformedHTLCDecodeErrorZ { - const ret: bigint = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_UpdateFailMalformedHTLCDecodeErrorZ = Result_UpdateFailMalformedHTLCDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_UpdateFeeDecodeErrorZ.mts b/ts/structs/Result_UpdateFeeDecodeErrorZ.mts index 0cccfb06..4251287b 100644 --- a/ts/structs/Result_UpdateFeeDecodeErrorZ.mts +++ b/ts/structs/Result_UpdateFeeDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_UpdateFeeDecodeErrorZ extends CommonBase { * Creates a new CResult_UpdateFeeDecodeErrorZ in the success state. */ public static constructor_ok(o: UpdateFee): Result_UpdateFeeDecodeErrorZ { - const ret: bigint = bindings.CResult_UpdateFeeDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_UpdateFeeDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_UpdateFeeDecodeErrorZ = Result_UpdateFeeDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_UpdateFulfillHTLCDecodeErrorZ.mts b/ts/structs/Result_UpdateFulfillHTLCDecodeErrorZ.mts index b217bb81..34ca07cc 100644 --- a/ts/structs/Result_UpdateFulfillHTLCDecodeErrorZ.mts +++ b/ts/structs/Result_UpdateFulfillHTLCDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_UpdateFulfillHTLCDecodeErrorZ extends CommonBase { * Creates a new CResult_UpdateFulfillHTLCDecodeErrorZ in the success state. */ public static constructor_ok(o: UpdateFulfillHTLC): Result_UpdateFulfillHTLCDecodeErrorZ { - const ret: bigint = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_UpdateFulfillHTLCDecodeErrorZ = Result_UpdateFulfillHTLCDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_VerifiedInvoiceRequestNoneZ.mts b/ts/structs/Result_VerifiedInvoiceRequestNoneZ.mts index bb103756..71992c23 100644 --- a/ts/structs/Result_VerifiedInvoiceRequestNoneZ.mts +++ b/ts/structs/Result_VerifiedInvoiceRequestNoneZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,8 +356,17 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_VerifiedInvoiceRequestNoneZ extends CommonBase { * Creates a new CResult_VerifiedInvoiceRequestNoneZ in the success state. */ public static constructor_ok(o: VerifiedInvoiceRequest): Result_VerifiedInvoiceRequestNoneZ { - const ret: bigint = bindings.CResult_VerifiedInvoiceRequestNoneZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_VerifiedInvoiceRequestNoneZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_VerifiedInvoiceRequestNoneZ = Result_VerifiedInvoiceRequestNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_WarningMessageDecodeErrorZ.mts b/ts/structs/Result_WarningMessageDecodeErrorZ.mts index c53c5406..1b6c9a53 100644 --- a/ts/structs/Result_WarningMessageDecodeErrorZ.mts +++ b/ts/structs/Result_WarningMessageDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -613,7 +678,7 @@ export class Result_WarningMessageDecodeErrorZ extends CommonBase { * Creates a new CResult_WarningMessageDecodeErrorZ in the success state. */ public static constructor_ok(o: WarningMessage): Result_WarningMessageDecodeErrorZ { - const ret: bigint = bindings.CResult_WarningMessageDecodeErrorZ_ok(o == null ? 0n : CommonBase.get_ptr_of(o)); + const ret: bigint = bindings.CResult_WarningMessageDecodeErrorZ_ok(CommonBase.get_ptr_of(o)); const ret_hu_conv: Result_WarningMessageDecodeErrorZ = Result_WarningMessageDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, o); return ret_hu_conv; diff --git a/ts/structs/Result_WitnessNoneZ.mts b/ts/structs/Result_WitnessNoneZ.mts index b85c81ce..3fa15670 100644 --- a/ts/structs/Result_WitnessNoneZ.mts +++ b/ts/structs/Result_WitnessNoneZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_u16Z } from '../structs/Option_u16Z.mjs'; import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mts b/ts/structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mts index c76e1194..828f1a8a 100644 --- a/ts/structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mts +++ b/ts/structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_boolLightningErrorZ.mts b/ts/structs/Result_boolLightningErrorZ.mts index ab135d0f..9962bbe3 100644 --- a/ts/structs/Result_boolLightningErrorZ.mts +++ b/ts/structs/Result_boolLightningErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -622,7 +687,7 @@ export class Result_boolLightningErrorZ extends CommonBase { * Creates a new CResult_boolLightningErrorZ in the error state. */ public static constructor_err(e: LightningError): Result_boolLightningErrorZ { - const ret: bigint = bindings.CResult_boolLightningErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e)); + const ret: bigint = bindings.CResult_boolLightningErrorZ_err(CommonBase.get_ptr_of(e)); const ret_hu_conv: Result_boolLightningErrorZ = Result_boolLightningErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, e); return ret_hu_conv; diff --git a/ts/structs/Result_boolPeerHandleErrorZ.mts b/ts/structs/Result_boolPeerHandleErrorZ.mts index c2005f18..5daba5f6 100644 --- a/ts/structs/Result_boolPeerHandleErrorZ.mts +++ b/ts/structs/Result_boolPeerHandleErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -622,7 +687,7 @@ export class Result_boolPeerHandleErrorZ extends CommonBase { * Creates a new CResult_boolPeerHandleErrorZ in the error state. */ public static constructor_err(e: PeerHandleError): Result_boolPeerHandleErrorZ { - const ret: bigint = bindings.CResult_boolPeerHandleErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e)); + const ret: bigint = bindings.CResult_boolPeerHandleErrorZ_err(CommonBase.get_ptr_of(e)); const ret_hu_conv: Result_boolPeerHandleErrorZ = Result_boolPeerHandleErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, e); return ret_hu_conv; diff --git a/ts/structs/Result_u32GraphSyncErrorZ.mts b/ts/structs/Result_u32GraphSyncErrorZ.mts index d305ce1c..e0a52f0e 100644 --- a/ts/structs/Result_u32GraphSyncErrorZ.mts +++ b/ts/structs/Result_u32GraphSyncErrorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/Result_u64ShortChannelIdErrorZ.mts b/ts/structs/Result_u64ShortChannelIdErrorZ.mts new file mode 100644 index 00000000..c3681058 --- /dev/null +++ b/ts/structs/Result_u64ShortChannelIdErrorZ.mts @@ -0,0 +1,721 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + + +export class Result_u64ShortChannelIdErrorZ extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.CResult_u64ShortChannelIdErrorZ_free); + } + /* @internal */ + public static constr_from_ptr(ptr: bigint): Result_u64ShortChannelIdErrorZ { + if (bindings.CResult_u64ShortChannelIdErrorZ_is_ok(ptr)) { + return new Result_u64ShortChannelIdErrorZ_OK(null, ptr); + } else { + return new Result_u64ShortChannelIdErrorZ_Err(null, ptr); + } + } + /** + * Creates a new CResult_u64ShortChannelIdErrorZ in the success state. + */ + public static constructor_ok(o: bigint): Result_u64ShortChannelIdErrorZ { + const ret: bigint = bindings.CResult_u64ShortChannelIdErrorZ_ok(o); + const ret_hu_conv: Result_u64ShortChannelIdErrorZ = Result_u64ShortChannelIdErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Creates a new CResult_u64ShortChannelIdErrorZ in the error state. + */ + public static constructor_err(e: ShortChannelIdError): Result_u64ShortChannelIdErrorZ { + const ret: bigint = bindings.CResult_u64ShortChannelIdErrorZ_err(e); + const ret_hu_conv: Result_u64ShortChannelIdErrorZ = Result_u64ShortChannelIdErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public is_ok(): boolean { + const ret: boolean = bindings.CResult_u64ShortChannelIdErrorZ_is_ok(this.ptr); + return ret; + } + +} +export class Result_u64ShortChannelIdErrorZ_OK extends Result_u64ShortChannelIdErrorZ { + public res: bigint; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + this.res = bindings.CResult_u64ShortChannelIdErrorZ_get_ok(ptr); + } +} +export class Result_u64ShortChannelIdErrorZ_Err extends Result_u64ShortChannelIdErrorZ { + public err: ShortChannelIdError; + + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(_dummy, ptr); + this.err = bindings.CResult_u64ShortChannelIdErrorZ_get_err(ptr); + } +} \ No newline at end of file diff --git a/ts/structs/Retry.mts b/ts/structs/Retry.mts index 1a3fdf21..dc0d00a8 100644 --- a/ts/structs/Retry.mts +++ b/ts/structs/Retry.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { DecodeError } from '../structs/DecodeError.mjs'; @@ -39,7 +44,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -640,7 +705,7 @@ export class Retry extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public eq(b: Retry): boolean { - const ret: boolean = bindings.Retry_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.Retry_eq(this.ptr, CommonBase.get_ptr_of(b)); return ret; } diff --git a/ts/structs/RevocationBasepoint.mts b/ts/structs/RevocationBasepoint.mts index cefe4213..2460c753 100644 --- a/ts/structs/RevocationBasepoint.mts +++ b/ts/structs/RevocationBasepoint.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeError import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -632,7 +697,7 @@ export class RevocationBasepoint extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: RevocationBasepoint): boolean { - const ret: boolean = bindings.RevocationBasepoint_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.RevocationBasepoint_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/RevocationKey.mts b/ts/structs/RevocationKey.mts index dacdfeb4..ba0fef2f 100644 --- a/ts/structs/RevocationKey.mts +++ b/ts/structs/RevocationKey.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeError import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -638,7 +703,7 @@ export class RevocationKey extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: RevocationKey): boolean { - const ret: boolean = bindings.RevocationKey_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.RevocationKey_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } @@ -678,7 +743,7 @@ export class RevocationKey extends CommonBase { * [`chan_utils::derive_private_revocation_key`]: crate::ln::chan_utils::derive_private_revocation_key */ public static constructor_from_basepoint(countersignatory_basepoint: RevocationBasepoint, per_commitment_point: Uint8Array): RevocationKey { - const ret: bigint = bindings.RevocationKey_from_basepoint(countersignatory_basepoint == null ? 0n : CommonBase.get_ptr_of(countersignatory_basepoint), bindings.encodeUint8Array(bindings.check_arr_len(per_commitment_point, 33))); + const ret: bigint = bindings.RevocationKey_from_basepoint(CommonBase.get_ptr_of(countersignatory_basepoint), bindings.encodeUint8Array(bindings.check_arr_len(per_commitment_point, 33))); const ret_hu_conv: RevocationKey = new RevocationKey(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, countersignatory_basepoint); diff --git a/ts/structs/RevokeAndACK.mts b/ts/structs/RevokeAndACK.mts index 5aa4f4b9..77b19bc8 100644 --- a/ts/structs/RevokeAndACK.mts +++ b/ts/structs/RevokeAndACK.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -610,17 +675,19 @@ export class RevokeAndACK extends CommonBase { /** * The channel ID */ - public get_channel_id(): Uint8Array { - const ret: number = bindings.RevokeAndACK_get_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public get_channel_id(): ChannelId { + const ret: bigint = bindings.RevokeAndACK_get_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** * The channel ID */ - public set_channel_id(val: Uint8Array): void { - bindings.RevokeAndACK_set_channel_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + public set_channel_id(val: ChannelId): void { + bindings.RevokeAndACK_set_channel_id(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** @@ -658,10 +725,11 @@ export class RevokeAndACK extends CommonBase { /** * Constructs a new RevokeAndACK given each field */ - public static constructor_new(channel_id_arg: Uint8Array, per_commitment_secret_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): RevokeAndACK { - const ret: bigint = bindings.RevokeAndACK_new(bindings.encodeUint8Array(bindings.check_arr_len(channel_id_arg, 32)), bindings.encodeUint8Array(bindings.check_arr_len(per_commitment_secret_arg, 32)), bindings.encodeUint8Array(bindings.check_arr_len(next_per_commitment_point_arg, 33))); + public static constructor_new(channel_id_arg: ChannelId, per_commitment_secret_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): RevokeAndACK { + const ret: bigint = bindings.RevokeAndACK_new(CommonBase.get_ptr_of(channel_id_arg), bindings.encodeUint8Array(bindings.check_arr_len(per_commitment_secret_arg, 32)), bindings.encodeUint8Array(bindings.check_arr_len(next_per_commitment_point_arg, 33))); const ret_hu_conv: RevokeAndACK = new RevokeAndACK(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, channel_id_arg); return ret_hu_conv; } @@ -694,7 +762,7 @@ export class RevokeAndACK extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: RevokeAndACK): boolean { - const ret: boolean = bindings.RevokeAndACK_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.RevokeAndACK_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/Route.mts b/ts/structs/Route.mts index fb80452b..320f7f38 100644 --- a/ts/structs/Route.mts +++ b/ts/structs/Route.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { LightningError } from '../structs/LightningError.mjs'; import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -631,7 +696,7 @@ export class Route extends CommonBase { * the same. */ public set_paths(val: Path[]): void { - bindings.Route_set_paths(this.ptr, bindings.encodeUint64Array(val.map(val_conv_6 => val_conv_6 == null ? 0n : CommonBase.get_ptr_of(val_conv_6)))); + bindings.Route_set_paths(this.ptr, bindings.encodeUint64Array(val.map(val_conv_6 => CommonBase.get_ptr_of(val_conv_6)))); val.forEach((val_conv_6: Path) => { CommonBase.add_ref_from(this, val_conv_6); }); } @@ -671,7 +736,7 @@ export class Route extends CommonBase { * Note that route_params_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ public static constructor_new(paths_arg: Path[], route_params_arg: RouteParameters|null): Route { - const ret: bigint = bindings.Route_new(bindings.encodeUint64Array(paths_arg.map(paths_arg_conv_6 => paths_arg_conv_6 == null ? 0n : CommonBase.get_ptr_of(paths_arg_conv_6))), route_params_arg == null ? 0n : CommonBase.get_ptr_of(route_params_arg)); + const ret: bigint = bindings.Route_new(bindings.encodeUint64Array(paths_arg.map(paths_arg_conv_6 => CommonBase.get_ptr_of(paths_arg_conv_6))), route_params_arg == null ? 0n : CommonBase.get_ptr_of(route_params_arg)); const ret_hu_conv: Route = new Route(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); paths_arg.forEach((paths_arg_conv_6: Path) => { CommonBase.add_ref_from(ret_hu_conv, paths_arg_conv_6); }); @@ -708,7 +773,7 @@ export class Route extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: Route): boolean { - const ret: boolean = bindings.Route_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.Route_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/RouteHint.mts b/ts/structs/RouteHint.mts index 23b78efc..ae06e0af 100644 --- a/ts/structs/RouteHint.mts +++ b/ts/structs/RouteHint.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -620,7 +685,7 @@ export class RouteHint extends CommonBase { } public set_a(val: RouteHintHop[]): void { - bindings.RouteHint_set_a(this.ptr, bindings.encodeUint64Array(val.map(val_conv_14 => val_conv_14 == null ? 0n : CommonBase.get_ptr_of(val_conv_14)))); + bindings.RouteHint_set_a(this.ptr, bindings.encodeUint64Array(val.map(val_conv_14 => CommonBase.get_ptr_of(val_conv_14)))); val.forEach((val_conv_14: RouteHintHop) => { CommonBase.add_ref_from(this, val_conv_14); }); } @@ -628,7 +693,7 @@ export class RouteHint extends CommonBase { * Constructs a new RouteHint given each field */ public static constructor_new(a_arg: RouteHintHop[]): RouteHint { - const ret: bigint = bindings.RouteHint_new(bindings.encodeUint64Array(a_arg.map(a_arg_conv_14 => a_arg_conv_14 == null ? 0n : CommonBase.get_ptr_of(a_arg_conv_14)))); + const ret: bigint = bindings.RouteHint_new(bindings.encodeUint64Array(a_arg.map(a_arg_conv_14 => CommonBase.get_ptr_of(a_arg_conv_14)))); const ret_hu_conv: RouteHint = new RouteHint(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); a_arg.forEach((a_arg_conv_14: RouteHintHop) => { CommonBase.add_ref_from(ret_hu_conv, a_arg_conv_14); }); @@ -664,7 +729,7 @@ export class RouteHint extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: RouteHint): boolean { - const ret: boolean = bindings.RouteHint_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.RouteHint_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/RouteHintHop.mts b/ts/structs/RouteHintHop.mts index 7ba11e51..78adde14 100644 --- a/ts/structs/RouteHintHop.mts +++ b/ts/structs/RouteHintHop.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -654,7 +719,7 @@ export class RouteHintHop extends CommonBase { * The fees which must be paid to use this channel */ public set_fees(val: RoutingFees): void { - bindings.RouteHintHop_set_fees(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.RouteHintHop_set_fees(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -713,7 +778,7 @@ export class RouteHintHop extends CommonBase { * Constructs a new RouteHintHop given each field */ public static constructor_new(src_node_id_arg: Uint8Array, short_channel_id_arg: bigint, fees_arg: RoutingFees, cltv_expiry_delta_arg: number, htlc_minimum_msat_arg: Option_u64Z, htlc_maximum_msat_arg: Option_u64Z): RouteHintHop { - const ret: bigint = bindings.RouteHintHop_new(bindings.encodeUint8Array(bindings.check_arr_len(src_node_id_arg, 33)), short_channel_id_arg, fees_arg == null ? 0n : CommonBase.get_ptr_of(fees_arg), cltv_expiry_delta_arg, CommonBase.get_ptr_of(htlc_minimum_msat_arg), CommonBase.get_ptr_of(htlc_maximum_msat_arg)); + const ret: bigint = bindings.RouteHintHop_new(bindings.encodeUint8Array(bindings.check_arr_len(src_node_id_arg, 33)), short_channel_id_arg, CommonBase.get_ptr_of(fees_arg), cltv_expiry_delta_arg, CommonBase.get_ptr_of(htlc_minimum_msat_arg), CommonBase.get_ptr_of(htlc_maximum_msat_arg)); const ret_hu_conv: RouteHintHop = new RouteHintHop(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, fees_arg); @@ -751,7 +816,7 @@ export class RouteHintHop extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: RouteHintHop): boolean { - const ret: boolean = bindings.RouteHintHop_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.RouteHintHop_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/RouteHop.mts b/ts/structs/RouteHop.mts index 2d318a87..6612e487 100644 --- a/ts/structs/RouteHop.mts +++ b/ts/structs/RouteHop.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -638,7 +703,7 @@ export class RouteHop extends CommonBase { * amended to match the features present in the invoice this node generated. */ public set_node_features(val: NodeFeatures): void { - bindings.RouteHop_set_node_features(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.RouteHop_set_node_features(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -673,7 +738,7 @@ export class RouteHop extends CommonBase { * to reach this node. */ public set_channel_features(val: ChannelFeatures): void { - bindings.RouteHop_set_channel_features(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.RouteHop_set_channel_features(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -760,7 +825,7 @@ export class RouteHop extends CommonBase { * Constructs a new RouteHop given each field */ public static constructor_new(pubkey_arg: Uint8Array, node_features_arg: NodeFeatures, short_channel_id_arg: bigint, channel_features_arg: ChannelFeatures, fee_msat_arg: bigint, cltv_expiry_delta_arg: number, maybe_announced_channel_arg: boolean): RouteHop { - const ret: bigint = bindings.RouteHop_new(bindings.encodeUint8Array(bindings.check_arr_len(pubkey_arg, 33)), node_features_arg == null ? 0n : CommonBase.get_ptr_of(node_features_arg), short_channel_id_arg, channel_features_arg == null ? 0n : CommonBase.get_ptr_of(channel_features_arg), fee_msat_arg, cltv_expiry_delta_arg, maybe_announced_channel_arg); + const ret: bigint = bindings.RouteHop_new(bindings.encodeUint8Array(bindings.check_arr_len(pubkey_arg, 33)), CommonBase.get_ptr_of(node_features_arg), short_channel_id_arg, CommonBase.get_ptr_of(channel_features_arg), fee_msat_arg, cltv_expiry_delta_arg, maybe_announced_channel_arg); const ret_hu_conv: RouteHop = new RouteHop(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, node_features_arg); @@ -797,7 +862,7 @@ export class RouteHop extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: RouteHop): boolean { - const ret: boolean = bindings.RouteHop_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.RouteHop_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/RouteParameters.mts b/ts/structs/RouteParameters.mts index e17bc7c0..2ade08ff 100644 --- a/ts/structs/RouteParameters.mts +++ b/ts/structs/RouteParameters.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -621,7 +686,7 @@ export class RouteParameters extends CommonBase { * The parameters of the failed payment path. */ public set_payment_params(val: PaymentParameters): void { - bindings.RouteParameters_set_payment_params(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.RouteParameters_set_payment_params(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -672,7 +737,7 @@ export class RouteParameters extends CommonBase { * Constructs a new RouteParameters given each field */ public static constructor_new(payment_params_arg: PaymentParameters, final_value_msat_arg: bigint, max_total_routing_fee_msat_arg: Option_u64Z): RouteParameters { - const ret: bigint = bindings.RouteParameters_new(payment_params_arg == null ? 0n : CommonBase.get_ptr_of(payment_params_arg), final_value_msat_arg, CommonBase.get_ptr_of(max_total_routing_fee_msat_arg)); + const ret: bigint = bindings.RouteParameters_new(CommonBase.get_ptr_of(payment_params_arg), final_value_msat_arg, CommonBase.get_ptr_of(max_total_routing_fee_msat_arg)); const ret_hu_conv: RouteParameters = new RouteParameters(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, payment_params_arg); @@ -709,7 +774,7 @@ export class RouteParameters extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: RouteParameters): boolean { - const ret: boolean = bindings.RouteParameters_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.RouteParameters_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } @@ -720,7 +785,7 @@ export class RouteParameters extends CommonBase { * [`Self::max_total_routing_fee_msat`] defaults to 1% of the payment amount + 50 sats */ public static constructor_from_payment_params_and_value(payment_params: PaymentParameters, final_value_msat: bigint): RouteParameters { - const ret: bigint = bindings.RouteParameters_from_payment_params_and_value(payment_params == null ? 0n : CommonBase.get_ptr_of(payment_params), final_value_msat); + const ret: bigint = bindings.RouteParameters_from_payment_params_and_value(CommonBase.get_ptr_of(payment_params), final_value_msat); const ret_hu_conv: RouteParameters = new RouteParameters(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, payment_params); diff --git a/ts/structs/Router.mts b/ts/structs/Router.mts index bafe8e25..351a3324 100644 --- a/ts/structs/Router.mts +++ b/ts/structs/Router.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -667,7 +732,7 @@ export class Router extends CommonBase { const inflight_htlcs_hu_conv: InFlightHtlcs = new InFlightHtlcs(null, inflight_htlcs); CommonBase.add_ref_from(inflight_htlcs_hu_conv, this); const ret: Result_RouteLightningErrorZ = arg.find_route(payer_conv, route_params_hu_conv, first_hops_conv_16_arr, inflight_htlcs_hu_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, find_route_with_id (payer: number, route_params: bigint, first_hops: number, inflight_htlcs: bigint, _payment_hash: number, _payment_id: number): bigint { @@ -689,7 +754,7 @@ export class Router extends CommonBase { const _payment_hash_conv: Uint8Array = bindings.decodeUint8Array(_payment_hash); const _payment_id_conv: Uint8Array = bindings.decodeUint8Array(_payment_id); const ret: Result_RouteLightningErrorZ = arg.find_route_with_id(payer_conv, route_params_hu_conv, first_hops_conv_16_arr, inflight_htlcs_hu_conv, _payment_hash_conv, _payment_id_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, create_blinded_payment_paths (recipient: number, first_hops: number, tlvs: bigint, amount_msats: bigint): bigint { @@ -706,7 +771,7 @@ export class Router extends CommonBase { const tlvs_hu_conv: ReceiveTlvs = new ReceiveTlvs(null, tlvs); CommonBase.add_ref_from(tlvs_hu_conv, this); const ret: Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ = arg.create_blinded_payment_paths(recipient_conv, first_hops_conv_16_arr, tlvs_hu_conv, amount_msats); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, } as bindings.LDKRouter; @@ -729,7 +794,7 @@ export class Router extends CommonBase { * Note that first_hops (or a relevant inner pointer) may be NULL or all-0s to represent None */ public find_route(payer: Uint8Array, route_params: RouteParameters, first_hops: ChannelDetails[]|null, inflight_htlcs: InFlightHtlcs): Result_RouteLightningErrorZ { - const ret: bigint = bindings.Router_find_route(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(payer, 33)), route_params == null ? 0n : CommonBase.get_ptr_of(route_params), bindings.encodeUint64Array(first_hops != null ? first_hops.map(first_hops_conv_16 => first_hops_conv_16 == null ? 0n : CommonBase.get_ptr_of(first_hops_conv_16)) : null), inflight_htlcs == null ? 0n : CommonBase.get_ptr_of(inflight_htlcs)); + const ret: bigint = bindings.Router_find_route(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(payer, 33)), CommonBase.get_ptr_of(route_params), bindings.encodeUint64Array(first_hops != null ? first_hops.map(first_hops_conv_16 => CommonBase.get_ptr_of(first_hops_conv_16)) : null), CommonBase.get_ptr_of(inflight_htlcs)); const ret_hu_conv: Result_RouteLightningErrorZ = Result_RouteLightningErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, route_params); if (first_hops != null) { first_hops.forEach((first_hops_conv_16: ChannelDetails) => { CommonBase.add_ref_from(this, first_hops_conv_16); }) }; @@ -749,7 +814,7 @@ export class Router extends CommonBase { * Note that first_hops (or a relevant inner pointer) may be NULL or all-0s to represent None */ public find_route_with_id(payer: Uint8Array, route_params: RouteParameters, first_hops: ChannelDetails[]|null, inflight_htlcs: InFlightHtlcs, _payment_hash: Uint8Array, _payment_id: Uint8Array): Result_RouteLightningErrorZ { - const ret: bigint = bindings.Router_find_route_with_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(payer, 33)), route_params == null ? 0n : CommonBase.get_ptr_of(route_params), bindings.encodeUint64Array(first_hops != null ? first_hops.map(first_hops_conv_16 => first_hops_conv_16 == null ? 0n : CommonBase.get_ptr_of(first_hops_conv_16)) : null), inflight_htlcs == null ? 0n : CommonBase.get_ptr_of(inflight_htlcs), bindings.encodeUint8Array(bindings.check_arr_len(_payment_hash, 32)), bindings.encodeUint8Array(bindings.check_arr_len(_payment_id, 32))); + const ret: bigint = bindings.Router_find_route_with_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(payer, 33)), CommonBase.get_ptr_of(route_params), bindings.encodeUint64Array(first_hops != null ? first_hops.map(first_hops_conv_16 => CommonBase.get_ptr_of(first_hops_conv_16)) : null), CommonBase.get_ptr_of(inflight_htlcs), bindings.encodeUint8Array(bindings.check_arr_len(_payment_hash, 32)), bindings.encodeUint8Array(bindings.check_arr_len(_payment_id, 32))); const ret_hu_conv: Result_RouteLightningErrorZ = Result_RouteLightningErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, route_params); if (first_hops != null) { first_hops.forEach((first_hops_conv_16: ChannelDetails) => { CommonBase.add_ref_from(this, first_hops_conv_16); }) }; @@ -763,7 +828,7 @@ export class Router extends CommonBase { * given in `tlvs`. */ public create_blinded_payment_paths(recipient: Uint8Array, first_hops: ChannelDetails[], tlvs: ReceiveTlvs, amount_msats: bigint): Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ { - const ret: bigint = bindings.Router_create_blinded_payment_paths(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(recipient, 33)), bindings.encodeUint64Array(first_hops.map(first_hops_conv_16 => first_hops_conv_16 == null ? 0n : CommonBase.get_ptr_of(first_hops_conv_16))), tlvs == null ? 0n : CommonBase.get_ptr_of(tlvs), amount_msats); + const ret: bigint = bindings.Router_create_blinded_payment_paths(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(recipient, 33)), bindings.encodeUint64Array(first_hops.map(first_hops_conv_16 => CommonBase.get_ptr_of(first_hops_conv_16))), CommonBase.get_ptr_of(tlvs), amount_msats); const ret_hu_conv: Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ = Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.constr_from_ptr(ret); first_hops.forEach((first_hops_conv_16: ChannelDetails) => { CommonBase.add_ref_from(this, first_hops_conv_16); }); CommonBase.add_ref_from(this, tlvs); diff --git a/ts/structs/RoutingFees.mts b/ts/structs/RoutingFees.mts index 2cc42f6f..45cf73c2 100644 --- a/ts/structs/RoutingFees.mts +++ b/ts/structs/RoutingFees.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -653,7 +718,7 @@ export class RoutingFees extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: RoutingFees): boolean { - const ret: boolean = bindings.RoutingFees_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.RoutingFees_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/RoutingMessageHandler.mts b/ts/structs/RoutingMessageHandler.mts index 49988e97..9c49420f 100644 --- a/ts/structs/RoutingMessageHandler.mts +++ b/ts/structs/RoutingMessageHandler.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,10 +600,14 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -707,24 +772,24 @@ export class RoutingMessageHandler extends CommonBase { handle_node_announcement (msg: bigint): bigint { const msg_hu_conv: NodeAnnouncement = new NodeAnnouncement(null, msg); const ret: Result_boolLightningErrorZ = arg.handle_node_announcement(msg_hu_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, handle_channel_announcement (msg: bigint): bigint { const msg_hu_conv: ChannelAnnouncement = new ChannelAnnouncement(null, msg); const ret: Result_boolLightningErrorZ = arg.handle_channel_announcement(msg_hu_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, handle_channel_update (msg: bigint): bigint { const msg_hu_conv: ChannelUpdate = new ChannelUpdate(null, msg); const ret: Result_boolLightningErrorZ = arg.handle_channel_update(msg_hu_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, get_next_channel_announcement (starting_point: bigint): bigint { const ret: Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ = arg.get_next_channel_announcement(starting_point); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); CommonBase.add_ref_from(impl_holder.held, ret); return result; }, @@ -739,7 +804,7 @@ export class RoutingMessageHandler extends CommonBase { const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id); const init_hu_conv: Init = new Init(null, init); const ret: Result_NoneNoneZ = arg.peer_connected(their_node_id_conv, init_hu_conv, inbound); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, handle_reply_channel_range (their_node_id: number, msg: bigint): bigint { @@ -747,7 +812,7 @@ export class RoutingMessageHandler extends CommonBase { const msg_hu_conv: ReplyChannelRange = new ReplyChannelRange(null, msg); CommonBase.add_ref_from(msg_hu_conv, this); const ret: Result_NoneLightningErrorZ = arg.handle_reply_channel_range(their_node_id_conv, msg_hu_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, handle_reply_short_channel_ids_end (their_node_id: number, msg: bigint): bigint { @@ -755,7 +820,7 @@ export class RoutingMessageHandler extends CommonBase { const msg_hu_conv: ReplyShortChannelIdsEnd = new ReplyShortChannelIdsEnd(null, msg); CommonBase.add_ref_from(msg_hu_conv, this); const ret: Result_NoneLightningErrorZ = arg.handle_reply_short_channel_ids_end(their_node_id_conv, msg_hu_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, handle_query_channel_range (their_node_id: number, msg: bigint): bigint { @@ -763,7 +828,7 @@ export class RoutingMessageHandler extends CommonBase { const msg_hu_conv: QueryChannelRange = new QueryChannelRange(null, msg); CommonBase.add_ref_from(msg_hu_conv, this); const ret: Result_NoneLightningErrorZ = arg.handle_query_channel_range(their_node_id_conv, msg_hu_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, handle_query_short_channel_ids (their_node_id: number, msg: bigint): bigint { @@ -771,7 +836,7 @@ export class RoutingMessageHandler extends CommonBase { const msg_hu_conv: QueryShortChannelIds = new QueryShortChannelIds(null, msg); CommonBase.add_ref_from(msg_hu_conv, this); const ret: Result_NoneLightningErrorZ = arg.handle_query_short_channel_ids(their_node_id_conv, msg_hu_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, processing_queue_high (): boolean { @@ -780,13 +845,13 @@ export class RoutingMessageHandler extends CommonBase { }, provided_node_features (): bigint { const ret: NodeFeatures = arg.provided_node_features(); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, provided_init_features (their_node_id: number): bigint { const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id); const ret: InitFeatures = arg.provided_init_features(their_node_id_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, } as bindings.LDKRoutingMessageHandler; @@ -805,7 +870,7 @@ export class RoutingMessageHandler extends CommonBase { * `false` or returning an `Err` otherwise. */ public handle_node_announcement(msg: NodeAnnouncement): Result_boolLightningErrorZ { - const ret: bigint = bindings.RoutingMessageHandler_handle_node_announcement(this.ptr, msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.RoutingMessageHandler_handle_node_announcement(this.ptr, CommonBase.get_ptr_of(msg)); const ret_hu_conv: Result_boolLightningErrorZ = Result_boolLightningErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, msg); return ret_hu_conv; @@ -816,7 +881,7 @@ export class RoutingMessageHandler extends CommonBase { * or returning an `Err` otherwise. */ public handle_channel_announcement(msg: ChannelAnnouncement): Result_boolLightningErrorZ { - const ret: bigint = bindings.RoutingMessageHandler_handle_channel_announcement(this.ptr, msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.RoutingMessageHandler_handle_channel_announcement(this.ptr, CommonBase.get_ptr_of(msg)); const ret_hu_conv: Result_boolLightningErrorZ = Result_boolLightningErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, msg); return ret_hu_conv; @@ -827,7 +892,7 @@ export class RoutingMessageHandler extends CommonBase { * `false` or returning an `Err` otherwise. */ public handle_channel_update(msg: ChannelUpdate): Result_boolLightningErrorZ { - const ret: bigint = bindings.RoutingMessageHandler_handle_channel_update(this.ptr, msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.RoutingMessageHandler_handle_channel_update(this.ptr, CommonBase.get_ptr_of(msg)); const ret_hu_conv: Result_boolLightningErrorZ = Result_boolLightningErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, msg); return ret_hu_conv; @@ -872,7 +937,7 @@ export class RoutingMessageHandler extends CommonBase { * message handlers may still wish to communicate with this peer. */ public peer_connected(their_node_id: Uint8Array, init: Init, inbound: boolean): Result_NoneNoneZ { - const ret: bigint = bindings.RoutingMessageHandler_peer_connected(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), init == null ? 0n : CommonBase.get_ptr_of(init), inbound); + const ret: bigint = bindings.RoutingMessageHandler_peer_connected(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(init), inbound); const ret_hu_conv: Result_NoneNoneZ = Result_NoneNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, init); return ret_hu_conv; @@ -884,7 +949,7 @@ export class RoutingMessageHandler extends CommonBase { * replies to a single query. */ public handle_reply_channel_range(their_node_id: Uint8Array, msg: ReplyChannelRange): Result_NoneLightningErrorZ { - const ret: bigint = bindings.RoutingMessageHandler_handle_reply_channel_range(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.RoutingMessageHandler_handle_reply_channel_range(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(msg)); const ret_hu_conv: Result_NoneLightningErrorZ = Result_NoneLightningErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, msg); return ret_hu_conv; @@ -897,7 +962,7 @@ export class RoutingMessageHandler extends CommonBase { * gossip messages. */ public handle_reply_short_channel_ids_end(their_node_id: Uint8Array, msg: ReplyShortChannelIdsEnd): Result_NoneLightningErrorZ { - const ret: bigint = bindings.RoutingMessageHandler_handle_reply_short_channel_ids_end(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.RoutingMessageHandler_handle_reply_short_channel_ids_end(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(msg)); const ret_hu_conv: Result_NoneLightningErrorZ = Result_NoneLightningErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, msg); return ret_hu_conv; @@ -908,7 +973,7 @@ export class RoutingMessageHandler extends CommonBase { * for the requested range of blocks. */ public handle_query_channel_range(their_node_id: Uint8Array, msg: QueryChannelRange): Result_NoneLightningErrorZ { - const ret: bigint = bindings.RoutingMessageHandler_handle_query_channel_range(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.RoutingMessageHandler_handle_query_channel_range(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(msg)); const ret_hu_conv: Result_NoneLightningErrorZ = Result_NoneLightningErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, msg); return ret_hu_conv; @@ -919,7 +984,7 @@ export class RoutingMessageHandler extends CommonBase { * list of `short_channel_id`s. */ public handle_query_short_channel_ids(their_node_id: Uint8Array, msg: QueryShortChannelIds): Result_NoneLightningErrorZ { - const ret: bigint = bindings.RoutingMessageHandler_handle_query_short_channel_ids(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.RoutingMessageHandler_handle_query_short_channel_ids(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), CommonBase.get_ptr_of(msg)); const ret_hu_conv: Result_NoneLightningErrorZ = Result_NoneLightningErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, msg); return ret_hu_conv; diff --git a/ts/structs/Score.mts b/ts/structs/Score.mts index b84e0065..87e22217 100644 --- a/ts/structs/Score.mts +++ b/ts/structs/Score.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -560,10 +620,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/ScoreLookUp.mts b/ts/structs/ScoreLookUp.mts index 383d2de6..963b3fd5 100644 --- a/ts/structs/ScoreLookUp.mts +++ b/ts/structs/ScoreLookUp.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -668,7 +733,7 @@ export class ScoreLookUp extends CommonBase { * Thus, implementations should be overflow-safe. */ public channel_penalty_msat(candidate: CandidateRouteHop, usage: ChannelUsage, score_params: ProbabilisticScoringFeeParameters): bigint { - const ret: bigint = bindings.ScoreLookUp_channel_penalty_msat(this.ptr, candidate == null ? 0n : CommonBase.get_ptr_of(candidate), usage == null ? 0n : CommonBase.get_ptr_of(usage), score_params == null ? 0n : CommonBase.get_ptr_of(score_params)); + const ret: bigint = bindings.ScoreLookUp_channel_penalty_msat(this.ptr, CommonBase.get_ptr_of(candidate), CommonBase.get_ptr_of(usage), CommonBase.get_ptr_of(score_params)); CommonBase.add_ref_from(this, usage); CommonBase.add_ref_from(this, score_params); return ret; diff --git a/ts/structs/ScoreUpdate.mts b/ts/structs/ScoreUpdate.mts index da37fd2b..c393e3c4 100644 --- a/ts/structs/ScoreUpdate.mts +++ b/ts/structs/ScoreUpdate.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -676,7 +741,7 @@ export class ScoreUpdate extends CommonBase { * Handles updating channel penalties after failing to route through a channel. */ public payment_path_failed(path: Path, short_channel_id: bigint, duration_since_epoch: bigint): void { - bindings.ScoreUpdate_payment_path_failed(this.ptr, path == null ? 0n : CommonBase.get_ptr_of(path), short_channel_id, duration_since_epoch); + bindings.ScoreUpdate_payment_path_failed(this.ptr, CommonBase.get_ptr_of(path), short_channel_id, duration_since_epoch); CommonBase.add_ref_from(this, path); } @@ -684,7 +749,7 @@ export class ScoreUpdate extends CommonBase { * Handles updating channel penalties after successfully routing along a path. */ public payment_path_successful(path: Path, duration_since_epoch: bigint): void { - bindings.ScoreUpdate_payment_path_successful(this.ptr, path == null ? 0n : CommonBase.get_ptr_of(path), duration_since_epoch); + bindings.ScoreUpdate_payment_path_successful(this.ptr, CommonBase.get_ptr_of(path), duration_since_epoch); CommonBase.add_ref_from(this, path); } @@ -692,7 +757,7 @@ export class ScoreUpdate extends CommonBase { * Handles updating channel penalties after a probe over the given path failed. */ public probe_failed(path: Path, short_channel_id: bigint, duration_since_epoch: bigint): void { - bindings.ScoreUpdate_probe_failed(this.ptr, path == null ? 0n : CommonBase.get_ptr_of(path), short_channel_id, duration_since_epoch); + bindings.ScoreUpdate_probe_failed(this.ptr, CommonBase.get_ptr_of(path), short_channel_id, duration_since_epoch); CommonBase.add_ref_from(this, path); } @@ -700,7 +765,7 @@ export class ScoreUpdate extends CommonBase { * Handles updating channel penalties after a probe over the given path succeeded. */ public probe_successful(path: Path, duration_since_epoch: bigint): void { - bindings.ScoreUpdate_probe_successful(this.ptr, path == null ? 0n : CommonBase.get_ptr_of(path), duration_since_epoch); + bindings.ScoreUpdate_probe_successful(this.ptr, CommonBase.get_ptr_of(path), duration_since_epoch); CommonBase.add_ref_from(this, path); } diff --git a/ts/structs/ScorerAccountingForInFlightHtlcs.mts b/ts/structs/ScorerAccountingForInFlightHtlcs.mts index 5835e301..cdf22757 100644 --- a/ts/structs/ScorerAccountingForInFlightHtlcs.mts +++ b/ts/structs/ScorerAccountingForInFlightHtlcs.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -560,10 +620,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -614,7 +679,7 @@ export class ScorerAccountingForInFlightHtlcs extends CommonBase { * Initialize a new `ScorerAccountingForInFlightHtlcs`. */ public static constructor_new(scorer: ScoreLookUp, inflight_htlcs: InFlightHtlcs): ScorerAccountingForInFlightHtlcs { - const ret: bigint = bindings.ScorerAccountingForInFlightHtlcs_new(CommonBase.get_ptr_of(scorer), inflight_htlcs == null ? 0n : CommonBase.get_ptr_of(inflight_htlcs)); + const ret: bigint = bindings.ScorerAccountingForInFlightHtlcs_new(CommonBase.get_ptr_of(scorer), CommonBase.get_ptr_of(inflight_htlcs)); const ret_hu_conv: ScorerAccountingForInFlightHtlcs = new ScorerAccountingForInFlightHtlcs(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, scorer); diff --git a/ts/structs/SendError.mts b/ts/structs/SendError.mts index 81d6a7f5..7e851271 100644 --- a/ts/structs/SendError.mts +++ b/ts/structs/SendError.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,16 +508,22 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -614,7 +679,8 @@ export class SendError extends CommonBase { case 5: return new SendError_InvalidMessage(ptr); case 6: return new SendError_BufferFull(ptr); case 7: return new SendError_GetNodeIdFailed(ptr); - case 8: return new SendError_BlindedPathAdvanceFailed(ptr); + case 8: return new SendError_UnresolvedIntroductionNode(ptr); + case 9: return new SendError_BlindedPathAdvanceFailed(ptr); default: throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface } @@ -715,6 +781,16 @@ export class SendError extends CommonBase { return ret_hu_conv; } + /** + * Utility method to constructs a new UnresolvedIntroductionNode-variant SendError + */ + public static constructor_unresolved_introduction_node(): SendError { + const ret: bigint = bindings.SendError_unresolved_introduction_node(); + const ret_hu_conv: SendError = SendError.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + return ret_hu_conv; + } + /** * Utility method to constructs a new BlindedPathAdvanceFailed-variant SendError */ @@ -725,12 +801,20 @@ export class SendError extends CommonBase { return ret_hu_conv; } + /** + * Generates a non-cryptographic 64-bit hash of the SendError. + */ + public hash(): bigint { + const ret: bigint = bindings.SendError_hash(this.ptr); + return ret; + } + /** * Checks if two SendErrors contain equal inner contents. * This ignores pointers and is_owned flags and looks at the values in fields. */ public eq(b: SendError): boolean { - const ret: boolean = bindings.SendError_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.SendError_eq(this.ptr, CommonBase.get_ptr_of(b)); return ret; } @@ -797,6 +881,13 @@ export class SendError_GetNodeIdFailed extends SendError { super(null, ptr); } } +/** A SendError of type UnresolvedIntroductionNode */ +export class SendError_UnresolvedIntroductionNode extends SendError { + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + } +} /** A SendError of type BlindedPathAdvanceFailed */ export class SendError_BlindedPathAdvanceFailed extends SendError { /* @internal */ diff --git a/ts/structs/SendSuccess.mts b/ts/structs/SendSuccess.mts index 6aebda41..53ee4051 100644 --- a/ts/structs/SendSuccess.mts +++ b/ts/structs/SendSuccess.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -648,12 +713,20 @@ export class SendSuccess extends CommonBase { return ret_hu_conv; } + /** + * Generates a non-cryptographic 64-bit hash of the SendSuccess. + */ + public hash(): bigint { + const ret: bigint = bindings.SendSuccess_hash(this.ptr); + return ret; + } + /** * Checks if two SendSuccesss contain equal inner contents. * This ignores pointers and is_owned flags and looks at the values in fields. */ public eq(b: SendSuccess): boolean { - const ret: boolean = bindings.SendSuccess_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.SendSuccess_eq(this.ptr, CommonBase.get_ptr_of(b)); return ret; } diff --git a/ts/structs/Sha256.mts b/ts/structs/Sha256.mts index 5f111ea8..7dc368ea 100644 --- a/ts/structs/Sha256.mts +++ b/ts/structs/Sha256.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -560,10 +620,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -578,8 +640,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -634,7 +699,7 @@ export class Sha256 extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: Sha256): boolean { - const ret: boolean = bindings.Sha256_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.Sha256_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/Shutdown.mts b/ts/structs/Shutdown.mts index 9c915f36..cdab7603 100644 --- a/ts/structs/Shutdown.mts +++ b/ts/structs/Shutdown.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -610,17 +675,19 @@ export class Shutdown extends CommonBase { /** * The channel ID */ - public get_channel_id(): Uint8Array { - const ret: number = bindings.Shutdown_get_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public get_channel_id(): ChannelId { + const ret: bigint = bindings.Shutdown_get_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** * The channel ID */ - public set_channel_id(val: Uint8Array): void { - bindings.Shutdown_set_channel_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + public set_channel_id(val: ChannelId): void { + bindings.Shutdown_set_channel_id(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** @@ -646,10 +713,11 @@ export class Shutdown extends CommonBase { /** * Constructs a new Shutdown given each field */ - public static constructor_new(channel_id_arg: Uint8Array, scriptpubkey_arg: Uint8Array): Shutdown { - const ret: bigint = bindings.Shutdown_new(bindings.encodeUint8Array(bindings.check_arr_len(channel_id_arg, 32)), bindings.encodeUint8Array(scriptpubkey_arg)); + public static constructor_new(channel_id_arg: ChannelId, scriptpubkey_arg: Uint8Array): Shutdown { + const ret: bigint = bindings.Shutdown_new(CommonBase.get_ptr_of(channel_id_arg), bindings.encodeUint8Array(scriptpubkey_arg)); const ret_hu_conv: Shutdown = new Shutdown(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, channel_id_arg); return ret_hu_conv; } @@ -682,7 +750,7 @@ export class Shutdown extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: Shutdown): boolean { - const ret: boolean = bindings.Shutdown_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.Shutdown_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/ShutdownScript.mts b/ts/structs/ShutdownScript.mts index 36345202..9f96068d 100644 --- a/ts/structs/ShutdownScript.mts +++ b/ts/structs/ShutdownScript.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -39,7 +44,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -628,7 +693,7 @@ export class ShutdownScript extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: ShutdownScript): boolean { - const ret: boolean = bindings.ShutdownScript_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.ShutdownScript_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } @@ -713,7 +778,7 @@ export class ShutdownScript extends CommonBase { * Specifically, checks for compliance with feature `option_shutdown_anysegwit`. */ public is_compatible(features: InitFeatures): boolean { - const ret: boolean = bindings.ShutdownScript_is_compatible(this.ptr, features == null ? 0n : CommonBase.get_ptr_of(features)); + const ret: boolean = bindings.ShutdownScript_is_compatible(this.ptr, CommonBase.get_ptr_of(features)); CommonBase.add_ref_from(this, features); return ret; } diff --git a/ts/structs/SignBolt12InvoiceFn.mts b/ts/structs/SignBolt12InvoiceFn.mts new file mode 100644 index 00000000..9fb78651 --- /dev/null +++ b/ts/structs/SignBolt12InvoiceFn.mts @@ -0,0 +1,722 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + + +/** An implementation of SignBolt12InvoiceFn */ +export interface SignBolt12InvoiceFnInterface { + /**Signs a [`TaggedHash`] computed over the merkle root of `message`'s TLV stream. + */ + sign_invoice(message: UnsignedBolt12Invoice): Result_SchnorrSignatureNoneZ; +} + +class LDKSignBolt12InvoiceFnHolder { + held: SignBolt12InvoiceFn|null = null; +} + +/** + * A function for signing an [`UnsignedBolt12Invoice`]. + */ +export class SignBolt12InvoiceFn extends CommonBase { + /* @internal */ + public bindings_instance: bindings.LDKSignBolt12InvoiceFn|null; + + /* @internal */ + public instance_idx?: number; + + /* @internal */ + constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.SignBolt12InvoiceFn_free); + this.bindings_instance = null; + } + + /** Creates a new instance of SignBolt12InvoiceFn from a given implementation */ + public static new_impl(arg: SignBolt12InvoiceFnInterface): SignBolt12InvoiceFn { + const impl_holder: LDKSignBolt12InvoiceFnHolder = new LDKSignBolt12InvoiceFnHolder(); + let structImplementation = { + sign_invoice (message: bigint): bigint { + const message_hu_conv: UnsignedBolt12Invoice = new UnsignedBolt12Invoice(null, message); + const ret: Result_SchnorrSignatureNoneZ = arg.sign_invoice(message_hu_conv); + const result: bigint = ret.clone_ptr(); + return result; + }, + } as bindings.LDKSignBolt12InvoiceFn; + const ptr_idx: [bigint, number] = bindings.LDKSignBolt12InvoiceFn_new(structImplementation); + + impl_holder.held = new SignBolt12InvoiceFn(null, ptr_idx[0]); + impl_holder.held.instance_idx = ptr_idx[1]; + impl_holder.held.bindings_instance = structImplementation; + return impl_holder.held!; + } + + /** + * Signs a [`TaggedHash`] computed over the merkle root of `message`'s TLV stream. + */ + public sign_invoice(message: UnsignedBolt12Invoice): Result_SchnorrSignatureNoneZ { + const ret: bigint = bindings.SignBolt12InvoiceFn_sign_invoice(this.ptr, CommonBase.get_ptr_of(message)); + const ret_hu_conv: Result_SchnorrSignatureNoneZ = Result_SchnorrSignatureNoneZ.constr_from_ptr(ret); + CommonBase.add_ref_from(this, message); + return ret_hu_conv; + } + +} diff --git a/ts/structs/SignError.mts b/ts/structs/SignError.mts new file mode 100644 index 00000000..c72f81a9 --- /dev/null +++ b/ts/structs/SignError.mts @@ -0,0 +1,730 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + +/** + * Error when signing messages. + */ +export class SignError extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.SignError_free); } + /* @internal */ + public static constr_from_ptr(ptr: bigint): SignError { + const raw_ty: number = bindings.LDKSignError_ty_from_ptr(ptr); + switch (raw_ty) { + case 0: return new SignError_Signing(ptr); + case 1: return new SignError_Verification(ptr); + default: + throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface + } + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.SignError_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a copy of the SignError + */ + public clone(): SignError { + const ret: bigint = bindings.SignError_clone(this.ptr); + const ret_hu_conv: SignError = SignError.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * Utility method to constructs a new Signing-variant SignError + */ + public static constructor_signing(): SignError { + const ret: bigint = bindings.SignError_signing(); + const ret_hu_conv: SignError = SignError.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + return ret_hu_conv; + } + + /** + * Utility method to constructs a new Verification-variant SignError + */ + public static constructor_verification(a: Secp256k1Error): SignError { + const ret: bigint = bindings.SignError_verification(a); + const ret_hu_conv: SignError = SignError.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + return ret_hu_conv; + } + +} +/** A SignError of type Signing */ +export class SignError_Signing extends SignError { + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + } +} +/** A SignError of type Verification */ +export class SignError_Verification extends SignError { + public verification: Secp256k1Error; + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + this.verification = bindings.LDKSignError_Verification_get_verification(ptr); + } +} diff --git a/ts/structs/SignInvoiceRequestFn.mts b/ts/structs/SignInvoiceRequestFn.mts new file mode 100644 index 00000000..43d13185 --- /dev/null +++ b/ts/structs/SignInvoiceRequestFn.mts @@ -0,0 +1,722 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + + +/** An implementation of SignInvoiceRequestFn */ +export interface SignInvoiceRequestFnInterface { + /**Signs a [`TaggedHash`] computed over the merkle root of `message`'s TLV stream. + */ + sign_invoice_request(message: UnsignedInvoiceRequest): Result_SchnorrSignatureNoneZ; +} + +class LDKSignInvoiceRequestFnHolder { + held: SignInvoiceRequestFn|null = null; +} + +/** + * A function for signing an [`UnsignedInvoiceRequest`]. + */ +export class SignInvoiceRequestFn extends CommonBase { + /* @internal */ + public bindings_instance: bindings.LDKSignInvoiceRequestFn|null; + + /* @internal */ + public instance_idx?: number; + + /* @internal */ + constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.SignInvoiceRequestFn_free); + this.bindings_instance = null; + } + + /** Creates a new instance of SignInvoiceRequestFn from a given implementation */ + public static new_impl(arg: SignInvoiceRequestFnInterface): SignInvoiceRequestFn { + const impl_holder: LDKSignInvoiceRequestFnHolder = new LDKSignInvoiceRequestFnHolder(); + let structImplementation = { + sign_invoice_request (message: bigint): bigint { + const message_hu_conv: UnsignedInvoiceRequest = new UnsignedInvoiceRequest(null, message); + const ret: Result_SchnorrSignatureNoneZ = arg.sign_invoice_request(message_hu_conv); + const result: bigint = ret.clone_ptr(); + return result; + }, + } as bindings.LDKSignInvoiceRequestFn; + const ptr_idx: [bigint, number] = bindings.LDKSignInvoiceRequestFn_new(structImplementation); + + impl_holder.held = new SignInvoiceRequestFn(null, ptr_idx[0]); + impl_holder.held.instance_idx = ptr_idx[1]; + impl_holder.held.bindings_instance = structImplementation; + return impl_holder.held!; + } + + /** + * Signs a [`TaggedHash`] computed over the merkle root of `message`'s TLV stream. + */ + public sign_invoice_request(message: UnsignedInvoiceRequest): Result_SchnorrSignatureNoneZ { + const ret: bigint = bindings.SignInvoiceRequestFn_sign_invoice_request(this.ptr, CommonBase.get_ptr_of(message)); + const ret_hu_conv: Result_SchnorrSignatureNoneZ = Result_SchnorrSignatureNoneZ.constr_from_ptr(ret); + CommonBase.add_ref_from(this, message); + return ret_hu_conv; + } + +} diff --git a/ts/structs/SignOrCreationError.mts b/ts/structs/SignOrCreationError.mts index 9915a688..094fb729 100644 --- a/ts/structs/SignOrCreationError.mts +++ b/ts/structs/SignOrCreationError.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -652,7 +717,7 @@ export class SignOrCreationError extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public eq(b: SignOrCreationError): boolean { - const ret: boolean = bindings.SignOrCreationError_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.SignOrCreationError_eq(this.ptr, CommonBase.get_ptr_of(b)); return ret; } diff --git a/ts/structs/SignedRawBolt11Invoice.mts b/ts/structs/SignedRawBolt11Invoice.mts index f49f6c04..b5070431 100644 --- a/ts/structs/SignedRawBolt11Invoice.mts +++ b/ts/structs/SignedRawBolt11Invoice.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -615,7 +680,7 @@ export class SignedRawBolt11Invoice extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: SignedRawBolt11Invoice): boolean { - const ret: boolean = bindings.SignedRawBolt11Invoice_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.SignedRawBolt11Invoice_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/SignerProvider.mts b/ts/structs/SignerProvider.mts index 069cb21c..f44f997c 100644 --- a/ts/structs/SignerProvider.mts +++ b/ts/structs/SignerProvider.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -692,18 +757,18 @@ export class SignerProvider extends CommonBase { read_chan_signer (reader: number): bigint { const reader_conv: Uint8Array = bindings.decodeUint8Array(reader); const ret: Result_WriteableEcdsaChannelSignerDecodeErrorZ = arg.read_chan_signer(reader_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, get_destination_script (channel_keys_id: number): bigint { const channel_keys_id_conv: Uint8Array = bindings.decodeUint8Array(channel_keys_id); const ret: Result_CVec_u8ZNoneZ = arg.get_destination_script(channel_keys_id_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, get_shutdown_scriptpubkey (): bigint { const ret: Result_ShutdownScriptNoneZ = arg.get_shutdown_scriptpubkey(); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, } as bindings.LDKSignerProvider; diff --git a/ts/structs/SocketAddress.mts b/ts/structs/SocketAddress.mts index 897b1958..a09cd81f 100644 --- a/ts/structs/SocketAddress.mts +++ b/ts/structs/SocketAddress.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -673,7 +738,7 @@ export class SocketAddress extends CommonBase { * Utility method to constructs a new Hostname-variant SocketAddress */ public static constructor_hostname(hostname: Hostname, port: number): SocketAddress { - const ret: bigint = bindings.SocketAddress_hostname(hostname == null ? 0n : CommonBase.get_ptr_of(hostname), port); + const ret: bigint = bindings.SocketAddress_hostname(CommonBase.get_ptr_of(hostname), port); const ret_hu_conv: SocketAddress = SocketAddress.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, hostname); @@ -693,7 +758,7 @@ export class SocketAddress extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public eq(b: SocketAddress): boolean { - const ret: boolean = bindings.SocketAddress_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.SocketAddress_eq(this.ptr, CommonBase.get_ptr_of(b)); return ret; } diff --git a/ts/structs/SocketDescriptor.mts b/ts/structs/SocketDescriptor.mts index 1ff60d3a..c59bd49f 100644 --- a/ts/structs/SocketDescriptor.mts +++ b/ts/structs/SocketDescriptor.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/SpendableOutputDescriptor.mts b/ts/structs/SpendableOutputDescriptor.mts index e2169d53..b34f5aae 100644 --- a/ts/structs/SpendableOutputDescriptor.mts +++ b/ts/structs/SpendableOutputDescriptor.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -639,7 +704,7 @@ export class SpendableOutputDescriptor extends CommonBase { * Utility method to constructs a new StaticOutput-variant SpendableOutputDescriptor */ public static constructor_static_output(outpoint: OutPoint, output: TxOut, channel_keys_id: Uint8Array): SpendableOutputDescriptor { - const ret: bigint = bindings.SpendableOutputDescriptor_static_output(outpoint == null ? 0n : CommonBase.get_ptr_of(outpoint), CommonBase.get_ptr_of(output), bindings.encodeUint8Array(bindings.check_arr_len(channel_keys_id, 32))); + const ret: bigint = bindings.SpendableOutputDescriptor_static_output(CommonBase.get_ptr_of(outpoint), CommonBase.get_ptr_of(output), bindings.encodeUint8Array(bindings.check_arr_len(channel_keys_id, 32))); const ret_hu_conv: SpendableOutputDescriptor = SpendableOutputDescriptor.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, outpoint); @@ -650,7 +715,7 @@ export class SpendableOutputDescriptor extends CommonBase { * Utility method to constructs a new DelayedPaymentOutput-variant SpendableOutputDescriptor */ public static constructor_delayed_payment_output(a: DelayedPaymentOutputDescriptor): SpendableOutputDescriptor { - const ret: bigint = bindings.SpendableOutputDescriptor_delayed_payment_output(a == null ? 0n : CommonBase.get_ptr_of(a)); + const ret: bigint = bindings.SpendableOutputDescriptor_delayed_payment_output(CommonBase.get_ptr_of(a)); const ret_hu_conv: SpendableOutputDescriptor = SpendableOutputDescriptor.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, a); @@ -661,7 +726,7 @@ export class SpendableOutputDescriptor extends CommonBase { * Utility method to constructs a new StaticPaymentOutput-variant SpendableOutputDescriptor */ public static constructor_static_payment_output(a: StaticPaymentOutputDescriptor): SpendableOutputDescriptor { - const ret: bigint = bindings.SpendableOutputDescriptor_static_payment_output(a == null ? 0n : CommonBase.get_ptr_of(a)); + const ret: bigint = bindings.SpendableOutputDescriptor_static_payment_output(CommonBase.get_ptr_of(a)); const ret_hu_conv: SpendableOutputDescriptor = SpendableOutputDescriptor.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, a); @@ -681,7 +746,7 @@ export class SpendableOutputDescriptor extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public eq(b: SpendableOutputDescriptor): boolean { - const ret: boolean = bindings.SpendableOutputDescriptor_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.SpendableOutputDescriptor_eq(this.ptr, CommonBase.get_ptr_of(b)); return ret; } diff --git a/ts/structs/SpendingDelay.mts b/ts/structs/SpendingDelay.mts new file mode 100644 index 00000000..1b48d83d --- /dev/null +++ b/ts/structs/SpendingDelay.mts @@ -0,0 +1,739 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + +/** + * A `enum` signalling to the [`OutputSweeper`] that it should delay spending an output until a + * future block height is reached. + */ +export class SpendingDelay extends CommonBase { + protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.SpendingDelay_free); } + /* @internal */ + public static constr_from_ptr(ptr: bigint): SpendingDelay { + const raw_ty: number = bindings.LDKSpendingDelay_ty_from_ptr(ptr); + switch (raw_ty) { + case 0: return new SpendingDelay_Relative(ptr); + case 1: return new SpendingDelay_Absolute(ptr); + default: + throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface + } + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.SpendingDelay_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a copy of the SpendingDelay + */ + public clone(): SpendingDelay { + const ret: bigint = bindings.SpendingDelay_clone(this.ptr); + const ret_hu_conv: SpendingDelay = SpendingDelay.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * Utility method to constructs a new Relative-variant SpendingDelay + */ + public static constructor_relative(num_blocks: number): SpendingDelay { + const ret: bigint = bindings.SpendingDelay_relative(num_blocks); + const ret_hu_conv: SpendingDelay = SpendingDelay.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + return ret_hu_conv; + } + + /** + * Utility method to constructs a new Absolute-variant SpendingDelay + */ + public static constructor_absolute(height: number): SpendingDelay { + const ret: bigint = bindings.SpendingDelay_absolute(height); + const ret_hu_conv: SpendingDelay = SpendingDelay.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + return ret_hu_conv; + } + +} +/** A SpendingDelay of type Relative */ +export class SpendingDelay_Relative extends SpendingDelay { + /** + * The number of blocks until we'll generate and broadcast the spending transaction. + */ + public num_blocks: number; + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + this.num_blocks = bindings.LDKSpendingDelay_Relative_get_num_blocks(ptr); + } +} +/** A SpendingDelay of type Absolute */ +export class SpendingDelay_Absolute extends SpendingDelay { + /** + * The height at which we'll generate and broadcast the spending transaction. + */ + public height: number; + /* @internal */ + public constructor(ptr: bigint) { + super(null, ptr); + this.height = bindings.LDKSpendingDelay_Absolute_get_height(ptr); + } +} diff --git a/ts/structs/Splice.mts b/ts/structs/Splice.mts index 0b4d0078..2c8f5182 100644 --- a/ts/structs/Splice.mts +++ b/ts/structs/Splice.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -608,17 +673,19 @@ export class Splice extends CommonBase { /** * The channel ID where splicing is intended */ - public get_channel_id(): Uint8Array { - const ret: number = bindings.Splice_get_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public get_channel_id(): ChannelId { + const ret: bigint = bindings.Splice_get_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** * The channel ID where splicing is intended */ - public set_channel_id(val: Uint8Array): void { - bindings.Splice_set_channel_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + public set_channel_id(val: ChannelId): void { + bindings.Splice_set_channel_id(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** @@ -703,10 +770,11 @@ export class Splice extends CommonBase { /** * Constructs a new Splice given each field */ - public static constructor_new(channel_id_arg: Uint8Array, chain_hash_arg: Uint8Array, relative_satoshis_arg: bigint, funding_feerate_perkw_arg: number, locktime_arg: number, funding_pubkey_arg: Uint8Array): Splice { - const ret: bigint = bindings.Splice_new(bindings.encodeUint8Array(bindings.check_arr_len(channel_id_arg, 32)), bindings.encodeUint8Array(bindings.check_arr_len(chain_hash_arg, 32)), relative_satoshis_arg, funding_feerate_perkw_arg, locktime_arg, bindings.encodeUint8Array(bindings.check_arr_len(funding_pubkey_arg, 33))); + public static constructor_new(channel_id_arg: ChannelId, chain_hash_arg: Uint8Array, relative_satoshis_arg: bigint, funding_feerate_perkw_arg: number, locktime_arg: number, funding_pubkey_arg: Uint8Array): Splice { + const ret: bigint = bindings.Splice_new(CommonBase.get_ptr_of(channel_id_arg), bindings.encodeUint8Array(bindings.check_arr_len(chain_hash_arg, 32)), relative_satoshis_arg, funding_feerate_perkw_arg, locktime_arg, bindings.encodeUint8Array(bindings.check_arr_len(funding_pubkey_arg, 33))); const ret_hu_conv: Splice = new Splice(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, channel_id_arg); return ret_hu_conv; } @@ -731,7 +799,7 @@ export class Splice extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: Splice): boolean { - const ret: boolean = bindings.Splice_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.Splice_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/SpliceAck.mts b/ts/structs/SpliceAck.mts index 1d9477d2..cdfc8b08 100644 --- a/ts/structs/SpliceAck.mts +++ b/ts/structs/SpliceAck.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -608,17 +673,19 @@ export class SpliceAck extends CommonBase { /** * The channel ID where splicing is intended */ - public get_channel_id(): Uint8Array { - const ret: number = bindings.SpliceAck_get_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public get_channel_id(): ChannelId { + const ret: bigint = bindings.SpliceAck_get_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** * The channel ID where splicing is intended */ - public set_channel_id(val: Uint8Array): void { - bindings.SpliceAck_set_channel_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + public set_channel_id(val: ChannelId): void { + bindings.SpliceAck_set_channel_id(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** @@ -673,10 +740,11 @@ export class SpliceAck extends CommonBase { /** * Constructs a new SpliceAck given each field */ - public static constructor_new(channel_id_arg: Uint8Array, chain_hash_arg: Uint8Array, relative_satoshis_arg: bigint, funding_pubkey_arg: Uint8Array): SpliceAck { - const ret: bigint = bindings.SpliceAck_new(bindings.encodeUint8Array(bindings.check_arr_len(channel_id_arg, 32)), bindings.encodeUint8Array(bindings.check_arr_len(chain_hash_arg, 32)), relative_satoshis_arg, bindings.encodeUint8Array(bindings.check_arr_len(funding_pubkey_arg, 33))); + public static constructor_new(channel_id_arg: ChannelId, chain_hash_arg: Uint8Array, relative_satoshis_arg: bigint, funding_pubkey_arg: Uint8Array): SpliceAck { + const ret: bigint = bindings.SpliceAck_new(CommonBase.get_ptr_of(channel_id_arg), bindings.encodeUint8Array(bindings.check_arr_len(chain_hash_arg, 32)), relative_satoshis_arg, bindings.encodeUint8Array(bindings.check_arr_len(funding_pubkey_arg, 33))); const ret_hu_conv: SpliceAck = new SpliceAck(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, channel_id_arg); return ret_hu_conv; } @@ -701,7 +769,7 @@ export class SpliceAck extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: SpliceAck): boolean { - const ret: boolean = bindings.SpliceAck_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.SpliceAck_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/SpliceLocked.mts b/ts/structs/SpliceLocked.mts index 0196cb96..9c2642f0 100644 --- a/ts/structs/SpliceLocked.mts +++ b/ts/structs/SpliceLocked.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -608,26 +673,29 @@ export class SpliceLocked extends CommonBase { /** * The channel ID */ - public get_channel_id(): Uint8Array { - const ret: number = bindings.SpliceLocked_get_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public get_channel_id(): ChannelId { + const ret: bigint = bindings.SpliceLocked_get_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** * The channel ID */ - public set_channel_id(val: Uint8Array): void { - bindings.SpliceLocked_set_channel_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + public set_channel_id(val: ChannelId): void { + bindings.SpliceLocked_set_channel_id(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** * Constructs a new SpliceLocked given each field */ - public static constructor_new(channel_id_arg: Uint8Array): SpliceLocked { - const ret: bigint = bindings.SpliceLocked_new(bindings.encodeUint8Array(bindings.check_arr_len(channel_id_arg, 32))); + public static constructor_new(channel_id_arg: ChannelId): SpliceLocked { + const ret: bigint = bindings.SpliceLocked_new(CommonBase.get_ptr_of(channel_id_arg)); const ret_hu_conv: SpliceLocked = new SpliceLocked(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, channel_id_arg); return ret_hu_conv; } @@ -652,7 +720,7 @@ export class SpliceLocked extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: SpliceLocked): boolean { - const ret: boolean = bindings.SpliceLocked_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.SpliceLocked_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/StaticPaymentOutputDescriptor.mts b/ts/structs/StaticPaymentOutputDescriptor.mts index 529d59b2..89af7c13 100644 --- a/ts/structs/StaticPaymentOutputDescriptor.mts +++ b/ts/structs/StaticPaymentOutputDescriptor.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -621,7 +686,7 @@ export class StaticPaymentOutputDescriptor extends CommonBase { * The outpoint which is spendable. */ public set_outpoint(val: OutPoint): void { - bindings.StaticPaymentOutputDescriptor_set_outpoint(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.StaticPaymentOutputDescriptor_set_outpoint(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -708,7 +773,7 @@ export class StaticPaymentOutputDescriptor extends CommonBase { * Note that channel_transaction_parameters_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ public static constructor_new(outpoint_arg: OutPoint, output_arg: TxOut, channel_keys_id_arg: Uint8Array, channel_value_satoshis_arg: bigint, channel_transaction_parameters_arg: ChannelTransactionParameters|null): StaticPaymentOutputDescriptor { - const ret: bigint = bindings.StaticPaymentOutputDescriptor_new(outpoint_arg == null ? 0n : CommonBase.get_ptr_of(outpoint_arg), CommonBase.get_ptr_of(output_arg), bindings.encodeUint8Array(bindings.check_arr_len(channel_keys_id_arg, 32)), channel_value_satoshis_arg, channel_transaction_parameters_arg == null ? 0n : CommonBase.get_ptr_of(channel_transaction_parameters_arg)); + const ret: bigint = bindings.StaticPaymentOutputDescriptor_new(CommonBase.get_ptr_of(outpoint_arg), CommonBase.get_ptr_of(output_arg), bindings.encodeUint8Array(bindings.check_arr_len(channel_keys_id_arg, 32)), channel_value_satoshis_arg, channel_transaction_parameters_arg == null ? 0n : CommonBase.get_ptr_of(channel_transaction_parameters_arg)); const ret_hu_conv: StaticPaymentOutputDescriptor = new StaticPaymentOutputDescriptor(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, outpoint_arg); @@ -745,7 +810,7 @@ export class StaticPaymentOutputDescriptor extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: StaticPaymentOutputDescriptor): boolean { - const ret: boolean = bindings.StaticPaymentOutputDescriptor_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.StaticPaymentOutputDescriptor_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/Stfu.mts b/ts/structs/Stfu.mts index 26599f73..9d5e8c76 100644 --- a/ts/structs/Stfu.mts +++ b/ts/structs/Stfu.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -608,17 +673,19 @@ export class Stfu extends CommonBase { /** * The channel ID where quiescence is intended */ - public get_channel_id(): Uint8Array { - const ret: number = bindings.Stfu_get_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public get_channel_id(): ChannelId { + const ret: bigint = bindings.Stfu_get_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** * The channel ID where quiescence is intended */ - public set_channel_id(val: Uint8Array): void { - bindings.Stfu_set_channel_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + public set_channel_id(val: ChannelId): void { + bindings.Stfu_set_channel_id(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** @@ -639,10 +706,11 @@ export class Stfu extends CommonBase { /** * Constructs a new Stfu given each field */ - public static constructor_new(channel_id_arg: Uint8Array, initiator_arg: number): Stfu { - const ret: bigint = bindings.Stfu_new(bindings.encodeUint8Array(bindings.check_arr_len(channel_id_arg, 32)), initiator_arg); + public static constructor_new(channel_id_arg: ChannelId, initiator_arg: number): Stfu { + const ret: bigint = bindings.Stfu_new(CommonBase.get_ptr_of(channel_id_arg), initiator_arg); const ret_hu_conv: Stfu = new Stfu(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, channel_id_arg); return ret_hu_conv; } @@ -667,7 +735,7 @@ export class Stfu extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: Stfu): boolean { - const ret: boolean = bindings.Stfu_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.Stfu_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/TaggedHash.mts b/ts/structs/TaggedHash.mts index 3b81a60a..adb91d03 100644 --- a/ts/structs/TaggedHash.mts +++ b/ts/structs/TaggedHash.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -560,9 +620,11 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mts b/ts/structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mts index de50703d..dd7df37d 100644 --- a/ts/structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mts +++ b/ts/structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -655,7 +720,7 @@ export class ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ extends C * Creates a new C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ from the contained elements. */ public static constructor_new(a: ChannelAnnouncement, b: ChannelUpdate, c: ChannelUpdate): ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ { - const ret: bigint = bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a == null ? 0n : CommonBase.get_ptr_of(a), b == null ? 0n : CommonBase.get_ptr_of(b), c == null ? 0n : CommonBase.get_ptr_of(c)); + const ret: bigint = bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(CommonBase.get_ptr_of(a), CommonBase.get_ptr_of(b), CommonBase.get_ptr_of(c)); const ret_hu_conv: ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ = new ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, a); diff --git a/ts/structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mts b/ts/structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mts index 945a4843..84e58125 100644 --- a/ts/structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mts +++ b/ts/structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -655,7 +720,7 @@ export class ThreeTuple_OffersMessageDestinationBlindedPathZ extends CommonBase * Creates a new C3Tuple_OffersMessageDestinationBlindedPathZ from the contained elements. */ public static constructor_new(a: OffersMessage, b: Destination, c: BlindedPath): ThreeTuple_OffersMessageDestinationBlindedPathZ { - const ret: bigint = bindings.C3Tuple_OffersMessageDestinationBlindedPathZ_new(CommonBase.get_ptr_of(a), CommonBase.get_ptr_of(b), c == null ? 0n : CommonBase.get_ptr_of(c)); + const ret: bigint = bindings.C3Tuple_OffersMessageDestinationBlindedPathZ_new(CommonBase.get_ptr_of(a), CommonBase.get_ptr_of(b), CommonBase.get_ptr_of(c)); const ret_hu_conv: ThreeTuple_OffersMessageDestinationBlindedPathZ = new ThreeTuple_OffersMessageDestinationBlindedPathZ(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, a); diff --git a/ts/structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mts b/ts/structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mts index cba30dac..43a3e40b 100644 --- a/ts/structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mts +++ b/ts/structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Res import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -655,7 +720,7 @@ export class ThreeTuple_OnionMessageContentsDestinationBlindedPathZ extends Comm * Creates a new C3Tuple_OnionMessageContentsDestinationBlindedPathZ from the contained elements. */ public static constructor_new(a: OnionMessageContents, b: Destination, c: BlindedPath): ThreeTuple_OnionMessageContentsDestinationBlindedPathZ { - const ret: bigint = bindings.C3Tuple_OnionMessageContentsDestinationBlindedPathZ_new(CommonBase.get_ptr_of(a), CommonBase.get_ptr_of(b), c == null ? 0n : CommonBase.get_ptr_of(c)); + const ret: bigint = bindings.C3Tuple_OnionMessageContentsDestinationBlindedPathZ_new(CommonBase.get_ptr_of(a), CommonBase.get_ptr_of(b), CommonBase.get_ptr_of(c)); const ret_hu_conv: ThreeTuple_OnionMessageContentsDestinationBlindedPathZ = new ThreeTuple_OnionMessageContentsDestinationBlindedPathZ(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, a); diff --git a/ts/structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mts b/ts/structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mts index 81c7683d..2194a97c 100644 --- a/ts/structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mts +++ b/ts/structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,16 +508,22 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -654,7 +719,7 @@ export class ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ exten * Creates a new C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ from the contained elements. */ public static constructor_new(a: Uint8Array, b: OnionMessage, c: Option_CVec_SocketAddressZZ): ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ { - const ret: bigint = bindings.C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_new(bindings.encodeUint8Array(bindings.check_arr_len(a, 33)), b == null ? 0n : CommonBase.get_ptr_of(b), CommonBase.get_ptr_of(c)); + const ret: bigint = bindings.C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_new(bindings.encodeUint8Array(bindings.check_arr_len(a, 33)), CommonBase.get_ptr_of(b), CommonBase.get_ptr_of(c)); const ret_hu_conv: ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ = new ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, b); diff --git a/ts/structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mts b/ts/structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mts index 748f80a2..77ecbd21 100644 --- a/ts/structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mts +++ b/ts/structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -654,7 +719,7 @@ export class ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ extends Com * Creates a new C3Tuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ from the contained elements. */ public static constructor_new(a: RawBolt11Invoice, b: Uint8Array, c: Bolt11InvoiceSignature): ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ { - const ret: bigint = bindings.C3Tuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ_new(a == null ? 0n : CommonBase.get_ptr_of(a), bindings.encodeUint8Array(bindings.check_arr_len(b, 32)), c == null ? 0n : CommonBase.get_ptr_of(c)); + const ret: bigint = bindings.C3Tuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ_new(CommonBase.get_ptr_of(a), bindings.encodeUint8Array(bindings.check_arr_len(b, 32)), CommonBase.get_ptr_of(c)); const ret_hu_conv: ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ = new ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, a); diff --git a/ts/structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mts b/ts/structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mts index 3288bdf7..b2db70fe 100644 --- a/ts/structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mts +++ b/ts/structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,16 +508,22 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; -import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -654,7 +719,7 @@ export class ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ exten * Creates a new C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ from the contained elements. */ public static constructor_new(a: Uint8Array, b: RecipientOnionFields, c: RouteParameters): ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ { - const ret: bigint = bindings.C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new(bindings.encodeUint8Array(bindings.check_arr_len(a, 32)), b == null ? 0n : CommonBase.get_ptr_of(b), c == null ? 0n : CommonBase.get_ptr_of(c)); + const ret: bigint = bindings.C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new(bindings.encodeUint8Array(bindings.check_arr_len(a, 32)), CommonBase.get_ptr_of(b), CommonBase.get_ptr_of(c)); const ret_hu_conv: ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ = new ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, b); diff --git a/ts/structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mts b/ts/structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mts index 7fa58ea8..f67f1315 100644 --- a/ts/structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mts +++ b/ts/structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,11 +138,16 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/TrackedSpendableOutput.mts b/ts/structs/TrackedSpendableOutput.mts new file mode 100644 index 00000000..299976e4 --- /dev/null +++ b/ts/structs/TrackedSpendableOutput.mts @@ -0,0 +1,802 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + +/** + * The state of a spendable output currently tracked by an [`OutputSweeper`]. + */ +export class TrackedSpendableOutput extends CommonBase { + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.TrackedSpendableOutput_free); + } + + /** + * The tracked output descriptor. + */ + public get_descriptor(): SpendableOutputDescriptor { + const ret: bigint = bindings.TrackedSpendableOutput_get_descriptor(this.ptr); + const ret_hu_conv: SpendableOutputDescriptor = SpendableOutputDescriptor.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * The tracked output descriptor. + */ + public set_descriptor(val: SpendableOutputDescriptor): void { + bindings.TrackedSpendableOutput_set_descriptor(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); + } + + /** + * The channel this output belongs to. + * + * Will be `None` if no `channel_id` was given to [`OutputSweeper::track_spendable_outputs`] + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public get_channel_id(): ChannelId { + const ret: bigint = bindings.TrackedSpendableOutput_get_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * The channel this output belongs to. + * + * Will be `None` if no `channel_id` was given to [`OutputSweeper::track_spendable_outputs`] + * + * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public set_channel_id(val: ChannelId|null): void { + bindings.TrackedSpendableOutput_set_channel_id(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); + } + + /** + * The current status of the output spend. + */ + public get_status(): OutputSpendStatus { + const ret: bigint = bindings.TrackedSpendableOutput_get_status(this.ptr); + const ret_hu_conv: OutputSpendStatus = OutputSpendStatus.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * The current status of the output spend. + */ + public set_status(val: OutputSpendStatus): void { + bindings.TrackedSpendableOutput_set_status(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); + } + + /** + * Constructs a new TrackedSpendableOutput given each field + * + * Note that channel_id_arg (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public static constructor_new(descriptor_arg: SpendableOutputDescriptor, channel_id_arg: ChannelId|null, status_arg: OutputSpendStatus): TrackedSpendableOutput { + const ret: bigint = bindings.TrackedSpendableOutput_new(CommonBase.get_ptr_of(descriptor_arg), channel_id_arg == null ? 0n : CommonBase.get_ptr_of(channel_id_arg), CommonBase.get_ptr_of(status_arg)); + const ret_hu_conv: TrackedSpendableOutput = new TrackedSpendableOutput(null, ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, descriptor_arg); + CommonBase.add_ref_from(ret_hu_conv, channel_id_arg); + CommonBase.add_ref_from(ret_hu_conv, status_arg); + return ret_hu_conv; + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.TrackedSpendableOutput_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a copy of the TrackedSpendableOutput + */ + public clone(): TrackedSpendableOutput { + const ret: bigint = bindings.TrackedSpendableOutput_clone(this.ptr); + const ret_hu_conv: TrackedSpendableOutput = new TrackedSpendableOutput(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * Checks if two TrackedSpendableOutputs contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ + public eq(b: TrackedSpendableOutput): boolean { + const ret: boolean = bindings.TrackedSpendableOutput_eq(this.ptr, CommonBase.get_ptr_of(b)); + CommonBase.add_ref_from(this, b); + return ret; + } + + /** + * Returns whether the output is spent in the given transaction. + */ + public is_spent_in(tx: Uint8Array): boolean { + const ret: boolean = bindings.TrackedSpendableOutput_is_spent_in(this.ptr, bindings.encodeUint8Array(tx)); + return ret; + } + + /** + * Serialize the TrackedSpendableOutput object into a byte array which can be read by TrackedSpendableOutput_read + */ + public write(): Uint8Array { + const ret: number = bindings.TrackedSpendableOutput_write(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Read a TrackedSpendableOutput from a byte array, created by TrackedSpendableOutput_write + */ + public static constructor_read(ser: Uint8Array): Result_TrackedSpendableOutputDecodeErrorZ { + const ret: bigint = bindings.TrackedSpendableOutput_read(bindings.encodeUint8Array(ser)); + const ret_hu_conv: Result_TrackedSpendableOutputDecodeErrorZ = Result_TrackedSpendableOutputDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/ts/structs/TrampolineOnionPacket.mts b/ts/structs/TrampolineOnionPacket.mts new file mode 100644 index 00000000..d6f6866e --- /dev/null +++ b/ts/structs/TrampolineOnionPacket.mts @@ -0,0 +1,791 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + +/** + * BOLT 4 onion packet including hop data for the next peer. + */ +export class TrampolineOnionPacket extends CommonBase { + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.TrampolineOnionPacket_free); + } + + /** + * Bolt 04 version number + */ + public get_version(): number { + const ret: number = bindings.TrampolineOnionPacket_get_version(this.ptr); + return ret; + } + + /** + * Bolt 04 version number + */ + public set_version(val: number): void { + bindings.TrampolineOnionPacket_set_version(this.ptr, val); + } + + /** + * A random sepc256k1 point, used to build the ECDH shared secret to decrypt hop_data + */ + public get_public_key(): Uint8Array { + const ret: number = bindings.TrampolineOnionPacket_get_public_key(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + + /** + * A random sepc256k1 point, used to build the ECDH shared secret to decrypt hop_data + */ + public set_public_key(val: Uint8Array): void { + bindings.TrampolineOnionPacket_set_public_key(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33))); + } + + /** + * Encrypted payload for the next hop + * + * Returns a copy of the field. + */ + public get_hop_data(): Uint8Array { + const ret: number = bindings.TrampolineOnionPacket_get_hop_data(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Encrypted payload for the next hop + */ + public set_hop_data(val: Uint8Array): void { + bindings.TrampolineOnionPacket_set_hop_data(this.ptr, bindings.encodeUint8Array(val)); + } + + /** + * HMAC to verify the integrity of hop_data + */ + public get_hmac(): Uint8Array { + const ret: number = bindings.TrampolineOnionPacket_get_hmac(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + + /** + * HMAC to verify the integrity of hop_data + */ + public set_hmac(val: Uint8Array): void { + bindings.TrampolineOnionPacket_set_hmac(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + } + + /** + * Constructs a new TrampolineOnionPacket given each field + */ + public static constructor_new(version_arg: number, public_key_arg: Uint8Array, hop_data_arg: Uint8Array, hmac_arg: Uint8Array): TrampolineOnionPacket { + const ret: bigint = bindings.TrampolineOnionPacket_new(version_arg, bindings.encodeUint8Array(bindings.check_arr_len(public_key_arg, 33)), bindings.encodeUint8Array(hop_data_arg), bindings.encodeUint8Array(bindings.check_arr_len(hmac_arg, 32))); + const ret_hu_conv: TrampolineOnionPacket = new TrampolineOnionPacket(null, ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + return ret_hu_conv; + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.TrampolineOnionPacket_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a copy of the TrampolineOnionPacket + */ + public clone(): TrampolineOnionPacket { + const ret: bigint = bindings.TrampolineOnionPacket_clone(this.ptr); + const ret_hu_conv: TrampolineOnionPacket = new TrampolineOnionPacket(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * Generates a non-cryptographic 64-bit hash of the TrampolineOnionPacket. + */ + public hash(): bigint { + const ret: bigint = bindings.TrampolineOnionPacket_hash(this.ptr); + return ret; + } + + /** + * Checks if two TrampolineOnionPackets contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ + public eq(b: TrampolineOnionPacket): boolean { + const ret: boolean = bindings.TrampolineOnionPacket_eq(this.ptr, CommonBase.get_ptr_of(b)); + CommonBase.add_ref_from(this, b); + return ret; + } + + /** + * Serialize the TrampolineOnionPacket object into a byte array which can be read by TrampolineOnionPacket_read + */ + public write(): Uint8Array { + const ret: number = bindings.TrampolineOnionPacket_write(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + +} diff --git a/ts/structs/TransactionU16LenLimited.mts b/ts/structs/TransactionU16LenLimited.mts index a71a2a64..bb52cb6e 100644 --- a/ts/structs/TransactionU16LenLimited.mts +++ b/ts/structs/TransactionU16LenLimited.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErr import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -637,7 +702,7 @@ export class TransactionU16LenLimited extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: TransactionU16LenLimited): boolean { - const ret: boolean = bindings.TransactionU16LenLimited_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.TransactionU16LenLimited_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } @@ -661,6 +726,15 @@ export class TransactionU16LenLimited extends CommonBase { return ret_conv; } + /** + * Returns a reference to the contained `Transaction` + */ + public as_transaction(): Uint8Array { + const ret: number = bindings.TransactionU16LenLimited_as_transaction(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + /** * Serialize the TransactionU16LenLimited object into a byte array which can be read by TransactionU16LenLimited_read */ diff --git a/ts/structs/TrustedClosingTransaction.mts b/ts/structs/TrustedClosingTransaction.mts index 13c7b4a9..f06f2390 100644 --- a/ts/structs/TrustedClosingTransaction.mts +++ b/ts/structs/TrustedClosingTransaction.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/TrustedCommitmentTransaction.mts b/ts/structs/TrustedCommitmentTransaction.mts index 63d23285..6588fadb 100644 --- a/ts/structs/TrustedCommitmentTransaction.mts +++ b/ts/structs/TrustedCommitmentTransaction.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -658,7 +723,7 @@ export class TrustedCommitmentTransaction extends CommonBase { * This function is only valid in the holder commitment context, it always uses EcdsaSighashType::All. */ public get_htlc_sigs(htlc_base_key: Uint8Array, channel_parameters: DirectedChannelTransactionParameters, entropy_source: EntropySource): Result_CVec_ECDSASignatureZNoneZ { - const ret: bigint = bindings.TrustedCommitmentTransaction_get_htlc_sigs(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(htlc_base_key, 32)), channel_parameters == null ? 0n : CommonBase.get_ptr_of(channel_parameters), CommonBase.get_ptr_of(entropy_source)); + const ret: bigint = bindings.TrustedCommitmentTransaction_get_htlc_sigs(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(htlc_base_key, 32)), CommonBase.get_ptr_of(channel_parameters), CommonBase.get_ptr_of(entropy_source)); const ret_hu_conv: Result_CVec_ECDSASignatureZNoneZ = Result_CVec_ECDSASignatureZNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, channel_parameters); CommonBase.add_ref_from(this, entropy_source); diff --git a/ts/structs/TwoTuple_BestBlockOutputSweeperZ.mts b/ts/structs/TwoTuple_BestBlockOutputSweeperZ.mts new file mode 100644 index 00000000..8cfda966 --- /dev/null +++ b/ts/structs/TwoTuple_BestBlockOutputSweeperZ.mts @@ -0,0 +1,712 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + +/** + * A Tuple + */ +export class TwoTuple_BestBlockOutputSweeperZ extends CommonBase { + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.C2Tuple_BestBlockOutputSweeperZ_free); + } + + /** + * + */ + public get_a(): BestBlock { + const ret: bigint = bindings.C2Tuple_BestBlockOutputSweeperZ_get_a(this.ptr); + const ret_hu_conv: BestBlock = new BestBlock(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * + */ + public get_b(): OutputSweeper { + const ret: bigint = bindings.C2Tuple_BestBlockOutputSweeperZ_get_b(this.ptr); + const ret_hu_conv: OutputSweeper = new OutputSweeper(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * Creates a new C2Tuple_BestBlockOutputSweeperZ from the contained elements. + */ + public static constructor_new(a: BestBlock, b_best_block: BestBlock, b_broadcaster: BroadcasterInterface, b_fee_estimator: FeeEstimator, b_chain_data_source: Option_FilterZ, b_output_spender: OutputSpender, b_change_destination_source: ChangeDestinationSource, b_kv_store: KVStore, b_logger: Logger): TwoTuple_BestBlockOutputSweeperZ { + const ret: bigint = bindings.C2Tuple_BestBlockOutputSweeperZ_new(CommonBase.get_ptr_of(a), bindings.OutputSweeper_new(CommonBase.get_ptr_of(b_best_block), CommonBase.get_ptr_of(b_broadcaster), CommonBase.get_ptr_of(b_fee_estimator), CommonBase.get_ptr_of(b_chain_data_source), CommonBase.get_ptr_of(b_output_spender), CommonBase.get_ptr_of(b_change_destination_source), CommonBase.get_ptr_of(b_kv_store), CommonBase.get_ptr_of(b_logger))); + const ret_hu_conv: TwoTuple_BestBlockOutputSweeperZ = new TwoTuple_BestBlockOutputSweeperZ(null, ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, a); + CommonBase.add_ref_from(ret_hu_conv, b_best_block); + CommonBase.add_ref_from(ret_hu_conv, b_broadcaster); + CommonBase.add_ref_from(ret_hu_conv, b_fee_estimator); + CommonBase.add_ref_from(ret_hu_conv, b_chain_data_source); + CommonBase.add_ref_from(ret_hu_conv, b_output_spender); + CommonBase.add_ref_from(ret_hu_conv, b_change_destination_source); + CommonBase.add_ref_from(ret_hu_conv, b_kv_store); + CommonBase.add_ref_from(ret_hu_conv, b_logger); + return ret_hu_conv; + } + +} diff --git a/ts/structs/TwoTuple_BlindedPayInfoBlindedPathZ.mts b/ts/structs/TwoTuple_BlindedPayInfoBlindedPathZ.mts index 665fc150..92d79a32 100644 --- a/ts/structs/TwoTuple_BlindedPayInfoBlindedPathZ.mts +++ b/ts/structs/TwoTuple_BlindedPayInfoBlindedPathZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -645,7 +710,7 @@ export class TwoTuple_BlindedPayInfoBlindedPathZ extends CommonBase { * Creates a new C2Tuple_BlindedPayInfoBlindedPathZ from the contained elements. */ public static constructor_new(a: BlindedPayInfo, b: BlindedPath): TwoTuple_BlindedPayInfoBlindedPathZ { - const ret: bigint = bindings.C2Tuple_BlindedPayInfoBlindedPathZ_new(a == null ? 0n : CommonBase.get_ptr_of(a), b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: bigint = bindings.C2Tuple_BlindedPayInfoBlindedPathZ_new(CommonBase.get_ptr_of(a), CommonBase.get_ptr_of(b)); const ret_hu_conv: TwoTuple_BlindedPayInfoBlindedPathZ = new TwoTuple_BlindedPayInfoBlindedPathZ(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, a); diff --git a/ts/structs/TwoTuple_CVec_u8Zu64Z.mts b/ts/structs/TwoTuple_CVec_u8Zu64Z.mts index e1b14471..15ae5faf 100644 --- a/ts/structs/TwoTuple_CVec_u8Zu64Z.mts +++ b/ts/structs/TwoTuple_CVec_u8Zu64Z.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mts b/ts/structs/TwoTuple_ChannelIdPublicKeyZ.mts similarity index 86% rename from ts/structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mts rename to ts/structs/TwoTuple_ChannelIdPublicKeyZ.mts index 5c0711d7..b6d5ffbd 100644 --- a/ts/structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mts +++ b/ts/structs/TwoTuple_ChannelIdPublicKeyZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,11 +269,12 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -599,32 +664,33 @@ import * as bindings from '../bindings.mjs' /** * A Tuple */ -export class TwoTuple_ThirtyTwoBytesPublicKeyZ extends CommonBase { +export class TwoTuple_ChannelIdPublicKeyZ extends CommonBase { /* @internal */ public constructor(_dummy: null, ptr: bigint) { - super(ptr, bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_free); + super(ptr, bindings.C2Tuple_ChannelIdPublicKeyZ_free); } /** * */ - public get_a(): Uint8Array { - const ret: number = bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public get_a(): ChannelId { + const ret: bigint = bindings.C2Tuple_ChannelIdPublicKeyZ_get_a(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** * */ public get_b(): Uint8Array { - const ret: number = bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(this.ptr); + const ret: number = bindings.C2Tuple_ChannelIdPublicKeyZ_get_b(this.ptr); const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); return ret_conv; } public clone_ptr(): bigint { - const ret: bigint = bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(this.ptr); + const ret: bigint = bindings.C2Tuple_ChannelIdPublicKeyZ_clone_ptr(this.ptr); return ret; } @@ -632,20 +698,21 @@ export class TwoTuple_ThirtyTwoBytesPublicKeyZ extends CommonBase { * Creates a new tuple which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ - public clone(): TwoTuple_ThirtyTwoBytesPublicKeyZ { - const ret: bigint = bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(this.ptr); - const ret_hu_conv: TwoTuple_ThirtyTwoBytesPublicKeyZ = new TwoTuple_ThirtyTwoBytesPublicKeyZ(null, ret); + public clone(): TwoTuple_ChannelIdPublicKeyZ { + const ret: bigint = bindings.C2Tuple_ChannelIdPublicKeyZ_clone(this.ptr); + const ret_hu_conv: TwoTuple_ChannelIdPublicKeyZ = new TwoTuple_ChannelIdPublicKeyZ(null, ret); CommonBase.add_ref_from(ret_hu_conv, this); return ret_hu_conv; } /** - * Creates a new C2Tuple_ThirtyTwoBytesPublicKeyZ from the contained elements. + * Creates a new C2Tuple_ChannelIdPublicKeyZ from the contained elements. */ - public static constructor_new(a: Uint8Array, b: Uint8Array): TwoTuple_ThirtyTwoBytesPublicKeyZ { - const ret: bigint = bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_new(bindings.encodeUint8Array(bindings.check_arr_len(a, 32)), bindings.encodeUint8Array(bindings.check_arr_len(b, 33))); - const ret_hu_conv: TwoTuple_ThirtyTwoBytesPublicKeyZ = new TwoTuple_ThirtyTwoBytesPublicKeyZ(null, ret); + public static constructor_new(a: ChannelId, b: Uint8Array): TwoTuple_ChannelIdPublicKeyZ { + const ret: bigint = bindings.C2Tuple_ChannelIdPublicKeyZ_new(CommonBase.get_ptr_of(a), bindings.encodeUint8Array(bindings.check_arr_len(b, 33))); + const ret_hu_conv: TwoTuple_ChannelIdPublicKeyZ = new TwoTuple_ChannelIdPublicKeyZ(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, a); return ret_hu_conv; } diff --git a/ts/structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mts b/ts/structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mts index fac22e8d..2d92ffde 100644 --- a/ts/structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mts +++ b/ts/structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mts b/ts/structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mts index 388b32dd..c4aee2fc 100644 --- a/ts/structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mts +++ b/ts/structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,13 +562,10 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -652,7 +717,7 @@ export class TwoTuple_OutPointCVec_MonitorUpdateIdZZ extends CommonBase { * Creates a new C2Tuple_OutPointCVec_MonitorUpdateIdZZ from the contained elements. */ public static constructor_new(a: OutPoint, b: MonitorUpdateId[]): TwoTuple_OutPointCVec_MonitorUpdateIdZZ { - const ret: bigint = bindings.C2Tuple_OutPointCVec_MonitorUpdateIdZZ_new(a == null ? 0n : CommonBase.get_ptr_of(a), bindings.encodeUint64Array(b.map(b_conv_17 => b_conv_17 == null ? 0n : CommonBase.get_ptr_of(b_conv_17)))); + const ret: bigint = bindings.C2Tuple_OutPointCVec_MonitorUpdateIdZZ_new(CommonBase.get_ptr_of(a), bindings.encodeUint64Array(b.map(b_conv_17 => CommonBase.get_ptr_of(b_conv_17)))); const ret_hu_conv: TwoTuple_OutPointCVec_MonitorUpdateIdZZ = new TwoTuple_OutPointCVec_MonitorUpdateIdZZ(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, a); diff --git a/ts/structs/TwoTuple_OutPointCVec_u8ZZ.mts b/ts/structs/TwoTuple_OutPointCVec_u8ZZ.mts index 30e19ec2..7d6dd47c 100644 --- a/ts/structs/TwoTuple_OutPointCVec_u8ZZ.mts +++ b/ts/structs/TwoTuple_OutPointCVec_u8ZZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -644,7 +709,7 @@ export class TwoTuple_OutPointCVec_u8ZZ extends CommonBase { * Creates a new C2Tuple_OutPointCVec_u8ZZ from the contained elements. */ public static constructor_new(a: OutPoint, b: Uint8Array): TwoTuple_OutPointCVec_u8ZZ { - const ret: bigint = bindings.C2Tuple_OutPointCVec_u8ZZ_new(a == null ? 0n : CommonBase.get_ptr_of(a), bindings.encodeUint8Array(b)); + const ret: bigint = bindings.C2Tuple_OutPointCVec_u8ZZ_new(CommonBase.get_ptr_of(a), bindings.encodeUint8Array(b)); const ret_hu_conv: TwoTuple_OutPointCVec_u8ZZ = new TwoTuple_OutPointCVec_u8ZZ(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, a); diff --git a/ts/structs/TwoTuple_OutPointChannelIdZ.mts b/ts/structs/TwoTuple_OutPointChannelIdZ.mts new file mode 100644 index 00000000..23a4fdaf --- /dev/null +++ b/ts/structs/TwoTuple_OutPointChannelIdZ.mts @@ -0,0 +1,721 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + +/** + * A Tuple + */ +export class TwoTuple_OutPointChannelIdZ extends CommonBase { + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.C2Tuple_OutPointChannelIdZ_free); + } + + /** + * + */ + public get_a(): OutPoint { + const ret: bigint = bindings.C2Tuple_OutPointChannelIdZ_get_a(this.ptr); + const ret_hu_conv: OutPoint = new OutPoint(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * + */ + public get_b(): ChannelId { + const ret: bigint = bindings.C2Tuple_OutPointChannelIdZ_get_b(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.C2Tuple_OutPointChannelIdZ_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a new tuple which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public clone(): TwoTuple_OutPointChannelIdZ { + const ret: bigint = bindings.C2Tuple_OutPointChannelIdZ_clone(this.ptr); + const ret_hu_conv: TwoTuple_OutPointChannelIdZ = new TwoTuple_OutPointChannelIdZ(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * Creates a new C2Tuple_OutPointChannelIdZ from the contained elements. + */ + public static constructor_new(a: OutPoint, b: ChannelId): TwoTuple_OutPointChannelIdZ { + const ret: bigint = bindings.C2Tuple_OutPointChannelIdZ_new(CommonBase.get_ptr_of(a), CommonBase.get_ptr_of(b)); + const ret_hu_conv: TwoTuple_OutPointChannelIdZ = new TwoTuple_OutPointChannelIdZ(null, ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, a); + CommonBase.add_ref_from(ret_hu_conv, b); + return ret_hu_conv; + } + +} diff --git a/ts/structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mts b/ts/structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mts index 254c1e2f..1b565e9e 100644 --- a/ts/structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mts +++ b/ts/structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/TwoTuple_PublicKeyTypeZ.mts b/ts/structs/TwoTuple_PublicKeyTypeZ.mts index a9e84030..e799538a 100644 --- a/ts/structs/TwoTuple_PublicKeyTypeZ.mts +++ b/ts/structs/TwoTuple_PublicKeyTypeZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mts b/ts/structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mts index 9990716c..b503c9d1 100644 --- a/ts/structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mts +++ b/ts/structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -651,7 +716,7 @@ export class TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ extends CommonBa * Creates a new C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ from the contained elements. */ public static constructor_new(a: Uint8Array, b: TwoTuple_u32CVec_u8ZZ[]): TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ { - const ret: bigint = bindings.C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ_new(bindings.encodeUint8Array(bindings.check_arr_len(a, 32)), bindings.encodeUint64Array(b.map(b_conv_23 => b_conv_23 != null ? CommonBase.get_ptr_of(b_conv_23) : 0n))); + const ret: bigint = bindings.C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ_new(bindings.encodeUint8Array(bindings.check_arr_len(a, 32)), bindings.encodeUint64Array(b.map(b_conv_23 => CommonBase.get_ptr_of(b_conv_23)))); const ret_hu_conv: TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ = new TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); return ret_hu_conv; diff --git a/ts/structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mts b/ts/structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mts index 677a8572..c506510f 100644 --- a/ts/structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mts +++ b/ts/structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -651,7 +716,7 @@ export class TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ extends CommonBase * Creates a new C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ from the contained elements. */ public static constructor_new(a: Uint8Array, b: TwoTuple_u32TxOutZ[]): TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ { - const ret: bigint = bindings.C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ_new(bindings.encodeUint8Array(bindings.check_arr_len(a, 32)), bindings.encodeUint64Array(b.map(b_conv_20 => b_conv_20 != null ? CommonBase.get_ptr_of(b_conv_20) : 0n))); + const ret: bigint = bindings.C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ_new(bindings.encodeUint8Array(bindings.check_arr_len(a, 32)), bindings.encodeUint64Array(b.map(b_conv_20 => CommonBase.get_ptr_of(b_conv_20)))); const ret_hu_conv: TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ = new TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); return ret_hu_conv; diff --git a/ts/structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mts b/ts/structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mts index d4674d7a..226209a9 100644 --- a/ts/structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mts +++ b/ts/structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -628,7 +693,7 @@ export class TwoTuple_ThirtyTwoBytesChannelManagerZ extends CommonBase { * Creates a new C2Tuple_ThirtyTwoBytesChannelManagerZ from the contained elements. */ public static constructor_new(a: Uint8Array, b_fee_est: FeeEstimator, b_chain_monitor: Watch, b_tx_broadcaster: BroadcasterInterface, b_router: Router, b_logger: Logger, b_entropy_source: EntropySource, b_node_signer: NodeSigner, b_signer_provider: SignerProvider, b_config: UserConfig, b_params: ChainParameters, b_current_timestamp: number): TwoTuple_ThirtyTwoBytesChannelManagerZ { - const ret: bigint = bindings.C2Tuple_ThirtyTwoBytesChannelManagerZ_new(bindings.encodeUint8Array(bindings.check_arr_len(a, 32)), bindings.ChannelManager_new(CommonBase.get_ptr_of(b_fee_est), CommonBase.get_ptr_of(b_chain_monitor), CommonBase.get_ptr_of(b_tx_broadcaster), CommonBase.get_ptr_of(b_router), CommonBase.get_ptr_of(b_logger), CommonBase.get_ptr_of(b_entropy_source), CommonBase.get_ptr_of(b_node_signer), CommonBase.get_ptr_of(b_signer_provider), b_config == null ? 0n : CommonBase.get_ptr_of(b_config), b_params == null ? 0n : CommonBase.get_ptr_of(b_params), b_current_timestamp)); + const ret: bigint = bindings.C2Tuple_ThirtyTwoBytesChannelManagerZ_new(bindings.encodeUint8Array(bindings.check_arr_len(a, 32)), bindings.ChannelManager_new(CommonBase.get_ptr_of(b_fee_est), CommonBase.get_ptr_of(b_chain_monitor), CommonBase.get_ptr_of(b_tx_broadcaster), CommonBase.get_ptr_of(b_router), CommonBase.get_ptr_of(b_logger), CommonBase.get_ptr_of(b_entropy_source), CommonBase.get_ptr_of(b_node_signer), CommonBase.get_ptr_of(b_signer_provider), CommonBase.get_ptr_of(b_config), CommonBase.get_ptr_of(b_params), b_current_timestamp)); const ret_hu_conv: TwoTuple_ThirtyTwoBytesChannelManagerZ = new TwoTuple_ThirtyTwoBytesChannelManagerZ(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, b_fee_est); diff --git a/ts/structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mts b/ts/structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mts index 83256b3e..bcee5871 100644 --- a/ts/structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mts +++ b/ts/structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -644,7 +709,7 @@ export class TwoTuple_ThirtyTwoBytesChannelMonitorZ extends CommonBase { * Creates a new C2Tuple_ThirtyTwoBytesChannelMonitorZ from the contained elements. */ public static constructor_new(a: Uint8Array, b: ChannelMonitor): TwoTuple_ThirtyTwoBytesChannelMonitorZ { - const ret: bigint = bindings.C2Tuple_ThirtyTwoBytesChannelMonitorZ_new(bindings.encodeUint8Array(bindings.check_arr_len(a, 32)), b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: bigint = bindings.C2Tuple_ThirtyTwoBytesChannelMonitorZ_new(bindings.encodeUint8Array(bindings.check_arr_len(a, 32)), CommonBase.get_ptr_of(b)); const ret_hu_conv: TwoTuple_ThirtyTwoBytesChannelMonitorZ = new TwoTuple_ThirtyTwoBytesChannelMonitorZ(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, b); diff --git a/ts/structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mts b/ts/structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mts index 4eb57dfe..f9b040b5 100644 --- a/ts/structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mts +++ b/ts/structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_Th import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/TwoTuple_Z.mts b/ts/structs/TwoTuple_Z.mts index ada91499..eff704c4 100644 --- a/ts/structs/TwoTuple_Z.mts +++ b/ts/structs/TwoTuple_Z.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/TwoTuple__u1632_u1632Z.mts b/ts/structs/TwoTuple__u1632_u1632Z.mts index a20d80d3..deb7ffb1 100644 --- a/ts/structs/TwoTuple__u1632_u1632Z.mts +++ b/ts/structs/TwoTuple__u1632_u1632Z.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/TwoTuple__u832u16Z.mts b/ts/structs/TwoTuple__u832u16Z.mts index 96b88ff3..d955e905 100644 --- a/ts/structs/TwoTuple__u832u16Z.mts +++ b/ts/structs/TwoTuple__u832u16Z.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,16 +508,22 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/TwoTuple_u32CVec_u8ZZ.mts b/ts/structs/TwoTuple_u32CVec_u8ZZ.mts index 22bc81c0..30e94f20 100644 --- a/ts/structs/TwoTuple_u32CVec_u8ZZ.mts +++ b/ts/structs/TwoTuple_u32CVec_u8ZZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/TwoTuple_u32TxOutZ.mts b/ts/structs/TwoTuple_u32TxOutZ.mts index d80a6dae..b6fe45cc 100644 --- a/ts/structs/TwoTuple_u32TxOutZ.mts +++ b/ts/structs/TwoTuple_u32TxOutZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/TwoTuple_u64CVec_u8ZZ.mts b/ts/structs/TwoTuple_u64CVec_u8ZZ.mts index 003868a2..90ed51e6 100644 --- a/ts/structs/TwoTuple_u64CVec_u8ZZ.mts +++ b/ts/structs/TwoTuple_u64CVec_u8ZZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -39,7 +44,16 @@ import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/TwoTuple_u64u16Z.mts b/ts/structs/TwoTuple_u64u16Z.mts index cb7cb065..e6c5d1c6 100644 --- a/ts/structs/TwoTuple_u64u16Z.mts +++ b/ts/structs/TwoTuple_u64u16Z.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,9 +250,14 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/TwoTuple_u64u64Z.mts b/ts/structs/TwoTuple_u64u64Z.mts index e353f8cd..8ac32482 100644 --- a/ts/structs/TwoTuple_u64u64Z.mts +++ b/ts/structs/TwoTuple_u64u64Z.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/TwoTuple_usizeTransactionZ.mts b/ts/structs/TwoTuple_usizeTransactionZ.mts index cbe0ffde..08761c61 100644 --- a/ts/structs/TwoTuple_usizeTransactionZ.mts +++ b/ts/structs/TwoTuple_usizeTransactionZ.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,11 +138,16 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/TxAbort.mts b/ts/structs/TxAbort.mts index fec1ea2c..95f049cd 100644 --- a/ts/structs/TxAbort.mts +++ b/ts/structs/TxAbort.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -608,17 +673,19 @@ export class TxAbort extends CommonBase { /** * The channel ID */ - public get_channel_id(): Uint8Array { - const ret: number = bindings.TxAbort_get_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public get_channel_id(): ChannelId { + const ret: bigint = bindings.TxAbort_get_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** * The channel ID */ - public set_channel_id(val: Uint8Array): void { - bindings.TxAbort_set_channel_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + public set_channel_id(val: ChannelId): void { + bindings.TxAbort_set_channel_id(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** @@ -642,10 +709,11 @@ export class TxAbort extends CommonBase { /** * Constructs a new TxAbort given each field */ - public static constructor_new(channel_id_arg: Uint8Array, data_arg: Uint8Array): TxAbort { - const ret: bigint = bindings.TxAbort_new(bindings.encodeUint8Array(bindings.check_arr_len(channel_id_arg, 32)), bindings.encodeUint8Array(data_arg)); + public static constructor_new(channel_id_arg: ChannelId, data_arg: Uint8Array): TxAbort { + const ret: bigint = bindings.TxAbort_new(CommonBase.get_ptr_of(channel_id_arg), bindings.encodeUint8Array(data_arg)); const ret_hu_conv: TxAbort = new TxAbort(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, channel_id_arg); return ret_hu_conv; } @@ -678,7 +746,7 @@ export class TxAbort extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: TxAbort): boolean { - const ret: boolean = bindings.TxAbort_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.TxAbort_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/TxAckRbf.mts b/ts/structs/TxAckRbf.mts index 682e1acd..b0324b95 100644 --- a/ts/structs/TxAckRbf.mts +++ b/ts/structs/TxAckRbf.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -609,17 +674,19 @@ export class TxAckRbf extends CommonBase { /** * The channel ID */ - public get_channel_id(): Uint8Array { - const ret: number = bindings.TxAckRbf_get_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public get_channel_id(): ChannelId { + const ret: bigint = bindings.TxAckRbf_get_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** * The channel ID */ - public set_channel_id(val: Uint8Array): void { - bindings.TxAckRbf_set_channel_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + public set_channel_id(val: ChannelId): void { + bindings.TxAckRbf_set_channel_id(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** @@ -645,10 +712,11 @@ export class TxAckRbf extends CommonBase { /** * Constructs a new TxAckRbf given each field */ - public static constructor_new(channel_id_arg: Uint8Array, funding_output_contribution_arg: Option_i64Z): TxAckRbf { - const ret: bigint = bindings.TxAckRbf_new(bindings.encodeUint8Array(bindings.check_arr_len(channel_id_arg, 32)), CommonBase.get_ptr_of(funding_output_contribution_arg)); + public static constructor_new(channel_id_arg: ChannelId, funding_output_contribution_arg: Option_i64Z): TxAckRbf { + const ret: bigint = bindings.TxAckRbf_new(CommonBase.get_ptr_of(channel_id_arg), CommonBase.get_ptr_of(funding_output_contribution_arg)); const ret_hu_conv: TxAckRbf = new TxAckRbf(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, channel_id_arg); CommonBase.add_ref_from(ret_hu_conv, funding_output_contribution_arg); return ret_hu_conv; } @@ -682,7 +750,7 @@ export class TxAckRbf extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: TxAckRbf): boolean { - const ret: boolean = bindings.TxAckRbf_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.TxAckRbf_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/TxAddInput.mts b/ts/structs/TxAddInput.mts index ba610348..51226d92 100644 --- a/ts/structs/TxAddInput.mts +++ b/ts/structs/TxAddInput.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -608,17 +673,19 @@ export class TxAddInput extends CommonBase { /** * The channel ID */ - public get_channel_id(): Uint8Array { - const ret: number = bindings.TxAddInput_get_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public get_channel_id(): ChannelId { + const ret: bigint = bindings.TxAddInput_get_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** * The channel ID */ - public set_channel_id(val: Uint8Array): void { - bindings.TxAddInput_set_channel_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + public set_channel_id(val: ChannelId): void { + bindings.TxAddInput_set_channel_id(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** @@ -654,7 +721,7 @@ export class TxAddInput extends CommonBase { * malleable. */ public set_prevtx(val: TransactionU16LenLimited): void { - bindings.TxAddInput_set_prevtx(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.TxAddInput_set_prevtx(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -691,10 +758,11 @@ export class TxAddInput extends CommonBase { /** * Constructs a new TxAddInput given each field */ - public static constructor_new(channel_id_arg: Uint8Array, serial_id_arg: bigint, prevtx_arg: TransactionU16LenLimited, prevtx_out_arg: number, sequence_arg: number): TxAddInput { - const ret: bigint = bindings.TxAddInput_new(bindings.encodeUint8Array(bindings.check_arr_len(channel_id_arg, 32)), serial_id_arg, prevtx_arg == null ? 0n : CommonBase.get_ptr_of(prevtx_arg), prevtx_out_arg, sequence_arg); + public static constructor_new(channel_id_arg: ChannelId, serial_id_arg: bigint, prevtx_arg: TransactionU16LenLimited, prevtx_out_arg: number, sequence_arg: number): TxAddInput { + const ret: bigint = bindings.TxAddInput_new(CommonBase.get_ptr_of(channel_id_arg), serial_id_arg, CommonBase.get_ptr_of(prevtx_arg), prevtx_out_arg, sequence_arg); const ret_hu_conv: TxAddInput = new TxAddInput(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, channel_id_arg); CommonBase.add_ref_from(ret_hu_conv, prevtx_arg); return ret_hu_conv; } @@ -728,7 +796,7 @@ export class TxAddInput extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: TxAddInput): boolean { - const ret: boolean = bindings.TxAddInput_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.TxAddInput_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/TxAddOutput.mts b/ts/structs/TxAddOutput.mts index 61664003..9715800f 100644 --- a/ts/structs/TxAddOutput.mts +++ b/ts/structs/TxAddOutput.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -608,17 +673,19 @@ export class TxAddOutput extends CommonBase { /** * The channel ID */ - public get_channel_id(): Uint8Array { - const ret: number = bindings.TxAddOutput_get_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public get_channel_id(): ChannelId { + const ret: bigint = bindings.TxAddOutput_get_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** * The channel ID */ - public set_channel_id(val: Uint8Array): void { - bindings.TxAddOutput_set_channel_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + public set_channel_id(val: ChannelId): void { + bindings.TxAddOutput_set_channel_id(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** @@ -672,10 +739,11 @@ export class TxAddOutput extends CommonBase { /** * Constructs a new TxAddOutput given each field */ - public static constructor_new(channel_id_arg: Uint8Array, serial_id_arg: bigint, sats_arg: bigint, script_arg: Uint8Array): TxAddOutput { - const ret: bigint = bindings.TxAddOutput_new(bindings.encodeUint8Array(bindings.check_arr_len(channel_id_arg, 32)), serial_id_arg, sats_arg, bindings.encodeUint8Array(script_arg)); + public static constructor_new(channel_id_arg: ChannelId, serial_id_arg: bigint, sats_arg: bigint, script_arg: Uint8Array): TxAddOutput { + const ret: bigint = bindings.TxAddOutput_new(CommonBase.get_ptr_of(channel_id_arg), serial_id_arg, sats_arg, bindings.encodeUint8Array(script_arg)); const ret_hu_conv: TxAddOutput = new TxAddOutput(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, channel_id_arg); return ret_hu_conv; } @@ -708,7 +776,7 @@ export class TxAddOutput extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: TxAddOutput): boolean { - const ret: boolean = bindings.TxAddOutput_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.TxAddOutput_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/TxComplete.mts b/ts/structs/TxComplete.mts index 1c2e30a9..e1262652 100644 --- a/ts/structs/TxComplete.mts +++ b/ts/structs/TxComplete.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -609,26 +674,29 @@ export class TxComplete extends CommonBase { /** * The channel ID */ - public get_channel_id(): Uint8Array { - const ret: number = bindings.TxComplete_get_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public get_channel_id(): ChannelId { + const ret: bigint = bindings.TxComplete_get_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** * The channel ID */ - public set_channel_id(val: Uint8Array): void { - bindings.TxComplete_set_channel_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + public set_channel_id(val: ChannelId): void { + bindings.TxComplete_set_channel_id(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** * Constructs a new TxComplete given each field */ - public static constructor_new(channel_id_arg: Uint8Array): TxComplete { - const ret: bigint = bindings.TxComplete_new(bindings.encodeUint8Array(bindings.check_arr_len(channel_id_arg, 32))); + public static constructor_new(channel_id_arg: ChannelId): TxComplete { + const ret: bigint = bindings.TxComplete_new(CommonBase.get_ptr_of(channel_id_arg)); const ret_hu_conv: TxComplete = new TxComplete(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, channel_id_arg); return ret_hu_conv; } @@ -661,7 +729,7 @@ export class TxComplete extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: TxComplete): boolean { - const ret: boolean = bindings.TxComplete_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.TxComplete_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/TxCreationKeys.mts b/ts/structs/TxCreationKeys.mts index 1c17f486..56b69c77 100644 --- a/ts/structs/TxCreationKeys.mts +++ b/ts/structs/TxCreationKeys.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -649,7 +714,7 @@ export class TxCreationKeys extends CommonBase { * an old state. */ public set_revocation_key(val: RevocationKey): void { - bindings.TxCreationKeys_set_revocation_key(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.TxCreationKeys_set_revocation_key(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -667,7 +732,7 @@ export class TxCreationKeys extends CommonBase { * Broadcaster's HTLC Key */ public set_broadcaster_htlc_key(val: HtlcKey): void { - bindings.TxCreationKeys_set_broadcaster_htlc_key(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.TxCreationKeys_set_broadcaster_htlc_key(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -685,7 +750,7 @@ export class TxCreationKeys extends CommonBase { * Countersignatory's HTLC Key */ public set_countersignatory_htlc_key(val: HtlcKey): void { - bindings.TxCreationKeys_set_countersignatory_htlc_key(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.TxCreationKeys_set_countersignatory_htlc_key(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -703,7 +768,7 @@ export class TxCreationKeys extends CommonBase { * Broadcaster's Payment Key (which isn't allowed to be spent from for some delay) */ public set_broadcaster_delayed_payment_key(val: DelayedPaymentKey): void { - bindings.TxCreationKeys_set_broadcaster_delayed_payment_key(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.TxCreationKeys_set_broadcaster_delayed_payment_key(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -711,7 +776,7 @@ export class TxCreationKeys extends CommonBase { * Constructs a new TxCreationKeys given each field */ public static constructor_new(per_commitment_point_arg: Uint8Array, revocation_key_arg: RevocationKey, broadcaster_htlc_key_arg: HtlcKey, countersignatory_htlc_key_arg: HtlcKey, broadcaster_delayed_payment_key_arg: DelayedPaymentKey): TxCreationKeys { - const ret: bigint = bindings.TxCreationKeys_new(bindings.encodeUint8Array(bindings.check_arr_len(per_commitment_point_arg, 33)), revocation_key_arg == null ? 0n : CommonBase.get_ptr_of(revocation_key_arg), broadcaster_htlc_key_arg == null ? 0n : CommonBase.get_ptr_of(broadcaster_htlc_key_arg), countersignatory_htlc_key_arg == null ? 0n : CommonBase.get_ptr_of(countersignatory_htlc_key_arg), broadcaster_delayed_payment_key_arg == null ? 0n : CommonBase.get_ptr_of(broadcaster_delayed_payment_key_arg)); + const ret: bigint = bindings.TxCreationKeys_new(bindings.encodeUint8Array(bindings.check_arr_len(per_commitment_point_arg, 33)), CommonBase.get_ptr_of(revocation_key_arg), CommonBase.get_ptr_of(broadcaster_htlc_key_arg), CommonBase.get_ptr_of(countersignatory_htlc_key_arg), CommonBase.get_ptr_of(broadcaster_delayed_payment_key_arg)); const ret_hu_conv: TxCreationKeys = new TxCreationKeys(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, revocation_key_arg); @@ -727,7 +792,7 @@ export class TxCreationKeys extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: TxCreationKeys): boolean { - const ret: boolean = bindings.TxCreationKeys_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.TxCreationKeys_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } @@ -770,7 +835,7 @@ export class TxCreationKeys extends CommonBase { * Key set is asymmetric and can't be used as part of counter-signatory set of transactions. */ public static constructor_derive_new(per_commitment_point: Uint8Array, broadcaster_delayed_payment_base: DelayedPaymentBasepoint, broadcaster_htlc_base: HtlcBasepoint, countersignatory_revocation_base: RevocationBasepoint, countersignatory_htlc_base: HtlcBasepoint): TxCreationKeys { - const ret: bigint = bindings.TxCreationKeys_derive_new(bindings.encodeUint8Array(bindings.check_arr_len(per_commitment_point, 33)), broadcaster_delayed_payment_base == null ? 0n : CommonBase.get_ptr_of(broadcaster_delayed_payment_base), broadcaster_htlc_base == null ? 0n : CommonBase.get_ptr_of(broadcaster_htlc_base), countersignatory_revocation_base == null ? 0n : CommonBase.get_ptr_of(countersignatory_revocation_base), countersignatory_htlc_base == null ? 0n : CommonBase.get_ptr_of(countersignatory_htlc_base)); + const ret: bigint = bindings.TxCreationKeys_derive_new(bindings.encodeUint8Array(bindings.check_arr_len(per_commitment_point, 33)), CommonBase.get_ptr_of(broadcaster_delayed_payment_base), CommonBase.get_ptr_of(broadcaster_htlc_base), CommonBase.get_ptr_of(countersignatory_revocation_base), CommonBase.get_ptr_of(countersignatory_htlc_base)); const ret_hu_conv: TxCreationKeys = new TxCreationKeys(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, broadcaster_delayed_payment_base); @@ -785,7 +850,7 @@ export class TxCreationKeys extends CommonBase { * Key set is asymmetric and can't be used as part of counter-signatory set of transactions. */ public static constructor_from_channel_static_keys(per_commitment_point: Uint8Array, broadcaster_keys: ChannelPublicKeys, countersignatory_keys: ChannelPublicKeys): TxCreationKeys { - const ret: bigint = bindings.TxCreationKeys_from_channel_static_keys(bindings.encodeUint8Array(bindings.check_arr_len(per_commitment_point, 33)), broadcaster_keys == null ? 0n : CommonBase.get_ptr_of(broadcaster_keys), countersignatory_keys == null ? 0n : CommonBase.get_ptr_of(countersignatory_keys)); + const ret: bigint = bindings.TxCreationKeys_from_channel_static_keys(bindings.encodeUint8Array(bindings.check_arr_len(per_commitment_point, 33)), CommonBase.get_ptr_of(broadcaster_keys), CommonBase.get_ptr_of(countersignatory_keys)); const ret_hu_conv: TxCreationKeys = new TxCreationKeys(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, broadcaster_keys); diff --git a/ts/structs/TxIn.mts b/ts/structs/TxIn.mts index c340cf36..e92aeff4 100644 --- a/ts/structs/TxIn.mts +++ b/ts/structs/TxIn.mts @@ -10,6 +10,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -18,13 +19,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -39,7 +44,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/TxInitRbf.mts b/ts/structs/TxInitRbf.mts index f1461e85..e5ad345b 100644 --- a/ts/structs/TxInitRbf.mts +++ b/ts/structs/TxInitRbf.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -609,17 +674,19 @@ export class TxInitRbf extends CommonBase { /** * The channel ID */ - public get_channel_id(): Uint8Array { - const ret: number = bindings.TxInitRbf_get_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public get_channel_id(): ChannelId { + const ret: bigint = bindings.TxInitRbf_get_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** * The channel ID */ - public set_channel_id(val: Uint8Array): void { - bindings.TxInitRbf_set_channel_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + public set_channel_id(val: ChannelId): void { + bindings.TxInitRbf_set_channel_id(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** @@ -675,10 +742,11 @@ export class TxInitRbf extends CommonBase { /** * Constructs a new TxInitRbf given each field */ - public static constructor_new(channel_id_arg: Uint8Array, locktime_arg: number, feerate_sat_per_1000_weight_arg: number, funding_output_contribution_arg: Option_i64Z): TxInitRbf { - const ret: bigint = bindings.TxInitRbf_new(bindings.encodeUint8Array(bindings.check_arr_len(channel_id_arg, 32)), locktime_arg, feerate_sat_per_1000_weight_arg, CommonBase.get_ptr_of(funding_output_contribution_arg)); + public static constructor_new(channel_id_arg: ChannelId, locktime_arg: number, feerate_sat_per_1000_weight_arg: number, funding_output_contribution_arg: Option_i64Z): TxInitRbf { + const ret: bigint = bindings.TxInitRbf_new(CommonBase.get_ptr_of(channel_id_arg), locktime_arg, feerate_sat_per_1000_weight_arg, CommonBase.get_ptr_of(funding_output_contribution_arg)); const ret_hu_conv: TxInitRbf = new TxInitRbf(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, channel_id_arg); CommonBase.add_ref_from(ret_hu_conv, funding_output_contribution_arg); return ret_hu_conv; } @@ -712,7 +780,7 @@ export class TxInitRbf extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: TxInitRbf): boolean { - const ret: boolean = bindings.TxInitRbf_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.TxInitRbf_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/TxOut.mts b/ts/structs/TxOut.mts index 5693112e..bf901e0f 100644 --- a/ts/structs/TxOut.mts +++ b/ts/structs/TxOut.mts @@ -10,6 +10,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -18,13 +19,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -39,7 +44,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/TxRemoveInput.mts b/ts/structs/TxRemoveInput.mts index 6ed0e1c5..47581b53 100644 --- a/ts/structs/TxRemoveInput.mts +++ b/ts/structs/TxRemoveInput.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -608,17 +673,19 @@ export class TxRemoveInput extends CommonBase { /** * The channel ID */ - public get_channel_id(): Uint8Array { - const ret: number = bindings.TxRemoveInput_get_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public get_channel_id(): ChannelId { + const ret: bigint = bindings.TxRemoveInput_get_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** * The channel ID */ - public set_channel_id(val: Uint8Array): void { - bindings.TxRemoveInput_set_channel_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + public set_channel_id(val: ChannelId): void { + bindings.TxRemoveInput_set_channel_id(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** @@ -639,10 +706,11 @@ export class TxRemoveInput extends CommonBase { /** * Constructs a new TxRemoveInput given each field */ - public static constructor_new(channel_id_arg: Uint8Array, serial_id_arg: bigint): TxRemoveInput { - const ret: bigint = bindings.TxRemoveInput_new(bindings.encodeUint8Array(bindings.check_arr_len(channel_id_arg, 32)), serial_id_arg); + public static constructor_new(channel_id_arg: ChannelId, serial_id_arg: bigint): TxRemoveInput { + const ret: bigint = bindings.TxRemoveInput_new(CommonBase.get_ptr_of(channel_id_arg), serial_id_arg); const ret_hu_conv: TxRemoveInput = new TxRemoveInput(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, channel_id_arg); return ret_hu_conv; } @@ -675,7 +743,7 @@ export class TxRemoveInput extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: TxRemoveInput): boolean { - const ret: boolean = bindings.TxRemoveInput_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.TxRemoveInput_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/TxRemoveOutput.mts b/ts/structs/TxRemoveOutput.mts index 4de2cf65..f7000f72 100644 --- a/ts/structs/TxRemoveOutput.mts +++ b/ts/structs/TxRemoveOutput.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -608,17 +673,19 @@ export class TxRemoveOutput extends CommonBase { /** * The channel ID */ - public get_channel_id(): Uint8Array { - const ret: number = bindings.TxRemoveOutput_get_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public get_channel_id(): ChannelId { + const ret: bigint = bindings.TxRemoveOutput_get_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** * The channel ID */ - public set_channel_id(val: Uint8Array): void { - bindings.TxRemoveOutput_set_channel_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + public set_channel_id(val: ChannelId): void { + bindings.TxRemoveOutput_set_channel_id(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** @@ -639,10 +706,11 @@ export class TxRemoveOutput extends CommonBase { /** * Constructs a new TxRemoveOutput given each field */ - public static constructor_new(channel_id_arg: Uint8Array, serial_id_arg: bigint): TxRemoveOutput { - const ret: bigint = bindings.TxRemoveOutput_new(bindings.encodeUint8Array(bindings.check_arr_len(channel_id_arg, 32)), serial_id_arg); + public static constructor_new(channel_id_arg: ChannelId, serial_id_arg: bigint): TxRemoveOutput { + const ret: bigint = bindings.TxRemoveOutput_new(CommonBase.get_ptr_of(channel_id_arg), serial_id_arg); const ret_hu_conv: TxRemoveOutput = new TxRemoveOutput(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, channel_id_arg); return ret_hu_conv; } @@ -675,7 +743,7 @@ export class TxRemoveOutput extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: TxRemoveOutput): boolean { - const ret: boolean = bindings.TxRemoveOutput_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.TxRemoveOutput_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/TxSignatures.mts b/ts/structs/TxSignatures.mts index e98fc39d..1c2592b6 100644 --- a/ts/structs/TxSignatures.mts +++ b/ts/structs/TxSignatures.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -609,17 +674,19 @@ export class TxSignatures extends CommonBase { /** * The channel ID */ - public get_channel_id(): Uint8Array { - const ret: number = bindings.TxSignatures_get_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public get_channel_id(): ChannelId { + const ret: bigint = bindings.TxSignatures_get_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** * The channel ID */ - public set_channel_id(val: Uint8Array): void { - bindings.TxSignatures_set_channel_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + public set_channel_id(val: ChannelId): void { + bindings.TxSignatures_set_channel_id(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** @@ -663,13 +730,33 @@ export class TxSignatures extends CommonBase { bindings.TxSignatures_set_witnesses(this.ptr, bindings.encodeUint32Array(val.map(val_conv_12 => bindings.encodeUint8Array(val_conv_12)))); } + /** + * Optional signature for the shared input -- the previous funding outpoint -- signed by both peers + */ + public get_funding_outpoint_sig(): Option_ECDSASignatureZ { + const ret: bigint = bindings.TxSignatures_get_funding_outpoint_sig(this.ptr); + const ret_hu_conv: Option_ECDSASignatureZ = Option_ECDSASignatureZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * Optional signature for the shared input -- the previous funding outpoint -- signed by both peers + */ + public set_funding_outpoint_sig(val: Option_ECDSASignatureZ): void { + bindings.TxSignatures_set_funding_outpoint_sig(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); + } + /** * Constructs a new TxSignatures given each field */ - public static constructor_new(channel_id_arg: Uint8Array, tx_hash_arg: Uint8Array, witnesses_arg: Uint8Array[]): TxSignatures { - const ret: bigint = bindings.TxSignatures_new(bindings.encodeUint8Array(bindings.check_arr_len(channel_id_arg, 32)), bindings.encodeUint8Array(bindings.check_arr_len(tx_hash_arg, 32)), bindings.encodeUint32Array(witnesses_arg.map(witnesses_arg_conv_12 => bindings.encodeUint8Array(witnesses_arg_conv_12)))); + public static constructor_new(channel_id_arg: ChannelId, tx_hash_arg: Uint8Array, witnesses_arg: Uint8Array[], funding_outpoint_sig_arg: Option_ECDSASignatureZ): TxSignatures { + const ret: bigint = bindings.TxSignatures_new(CommonBase.get_ptr_of(channel_id_arg), bindings.encodeUint8Array(bindings.check_arr_len(tx_hash_arg, 32)), bindings.encodeUint32Array(witnesses_arg.map(witnesses_arg_conv_12 => bindings.encodeUint8Array(witnesses_arg_conv_12))), CommonBase.get_ptr_of(funding_outpoint_sig_arg)); const ret_hu_conv: TxSignatures = new TxSignatures(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, channel_id_arg); + CommonBase.add_ref_from(ret_hu_conv, funding_outpoint_sig_arg); return ret_hu_conv; } @@ -702,7 +789,7 @@ export class TxSignatures extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: TxSignatures): boolean { - const ret: boolean = bindings.TxSignatures_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.TxSignatures_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/Type.mts b/ts/structs/Type.mts index 30b69abe..9cf10165 100644 --- a/ts/structs/Type.mts +++ b/ts/structs/Type.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/UnknownPaymentContext.mts b/ts/structs/UnknownPaymentContext.mts new file mode 100644 index 00000000..7de2e8b4 --- /dev/null +++ b/ts/structs/UnknownPaymentContext.mts @@ -0,0 +1,717 @@ +import { TxOut } from '../structs/TxOut.mjs'; +import { TxIn } from '../structs/TxIn.mjs'; +import { BigEndianScalar } from '../structs/BigEndianScalar.mjs'; +import { WitnessProgram } from '../structs/WitnessProgram.mjs'; +import { BlindedFailure } from '../enums/BlindedFailure.mjs'; +import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; +import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs'; +import { COption_NoneZ } from '../enums/COption_NoneZ.mjs'; +import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs'; +import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; +import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; +import { CreationError } from '../enums/CreationError.mjs'; +import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; +import { HTLCClaim } from '../enums/HTLCClaim.mjs'; +import { IOError } from '../enums/IOError.mjs'; +import { Level } from '../enums/Level.mjs'; +import { Network } from '../enums/Network.mjs'; +import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; +import { Recipient } from '../enums/Recipient.mjs'; +import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; +import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; +import { SiPrefix } from '../enums/SiPrefix.mjs'; +import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; +import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; +import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; +import { Option_u64Z } from '../structs/Option_u64Z.mjs'; +import { BlindedPath } from '../structs/BlindedPath.mjs'; +import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; +import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; +import { Retry } from '../structs/Retry.mjs'; +import { DecodeError } from '../structs/DecodeError.mjs'; +import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs'; +import { ShutdownScript } from '../structs/ShutdownScript.mjs'; +import { APIError } from '../structs/APIError.mjs'; +import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs'; +import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs'; +import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs'; +import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; +import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; +import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; +import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; +import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; +import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; +import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; +import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; +import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs'; +import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs'; +import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs'; +import { OutPoint } from '../structs/OutPoint.mjs'; +import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs'; +import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs'; +import { Option_u32Z } from '../structs/Option_u32Z.mjs'; +import { TwoTuple_CVec_u8Zu64Z } from '../structs/TwoTuple_CVec_u8Zu64Z.mjs'; +import { Result_C2Tuple_CVec_u8Zu64ZNoneZ } from '../structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.mjs'; +import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; +import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs'; +import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs'; +import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs'; +import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; +import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; +import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; +import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; +import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; +import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; +import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; +import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; +import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs'; +import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs'; +import { ClosingTransaction } from '../structs/ClosingTransaction.mjs'; +import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; +import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs'; +import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs'; +import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs'; +import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs'; +import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs'; +import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs'; +import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs'; +import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs'; +import { Option_u16Z } from '../structs/Option_u16Z.mjs'; +import { Option_boolZ } from '../structs/Option_boolZ.mjs'; +import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; +import { InMemorySigner } from '../structs/InMemorySigner.mjs'; +import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; +import { ChannelDetails } from '../structs/ChannelDetails.mjs'; +import { Route } from '../structs/Route.mjs'; +import { LightningError } from '../structs/LightningError.mjs'; +import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs'; +import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs'; +import { Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ } from '../structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.mjs'; +import { OnionMessagePath } from '../structs/OnionMessagePath.mjs'; +import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs'; +import { Result_CVec_BlindedPathZNoneZ } from '../structs/Result_CVec_BlindedPathZNoneZ.mjs'; +import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs'; +import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs'; +import { RouteHop } from '../structs/RouteHop.mjs'; +import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs'; +import { BlindedHop } from '../structs/BlindedHop.mjs'; +import { BlindedTail } from '../structs/BlindedTail.mjs'; +import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs'; +import { Path } from '../structs/Path.mjs'; +import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs'; +import { RouteParameters } from '../structs/RouteParameters.mjs'; +import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs'; +import { PaymentParameters } from '../structs/PaymentParameters.mjs'; +import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs'; +import { RouteHint } from '../structs/RouteHint.mjs'; +import { RouteHintHop } from '../structs/RouteHintHop.mjs'; +import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs'; +import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs'; +import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; +import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; +import { NodeId } from '../structs/NodeId.mjs'; +import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs'; +import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs'; +import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs'; +import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs'; +import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs'; +import { Option_f64Z } from '../structs/Option_f64Z.mjs'; +import { Record } from '../structs/Record.mjs'; +import { Logger, LoggerInterface } from '../structs/Logger.mjs'; +import { NetworkGraph } from '../structs/NetworkGraph.mjs'; +import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; +import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; +import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; +import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; +import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; +import { MonitorEvent } from '../structs/MonitorEvent.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; +import { InitFeatures } from '../structs/InitFeatures.mjs'; +import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; +import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; +import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs'; +import { NodeFeatures } from '../structs/NodeFeatures.mjs'; +import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs'; +import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; +import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs'; +import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; +import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs'; +import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; +import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; +import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; +import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; +import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; +import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; +import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; +import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; +import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; +import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs'; +import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs'; +import { UtxoFuture } from '../structs/UtxoFuture.mjs'; +import { UtxoResult } from '../structs/UtxoResult.mjs'; +import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs'; +import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs'; +import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs'; +import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs'; +import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs'; +import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs'; +import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs'; +import { AcceptChannel } from '../structs/AcceptChannel.mjs'; +import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs'; +import { OpenChannel } from '../structs/OpenChannel.mjs'; +import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs'; +import { FundingCreated } from '../structs/FundingCreated.mjs'; +import { FundingSigned } from '../structs/FundingSigned.mjs'; +import { Stfu } from '../structs/Stfu.mjs'; +import { Splice } from '../structs/Splice.mjs'; +import { SpliceAck } from '../structs/SpliceAck.mjs'; +import { SpliceLocked } from '../structs/SpliceLocked.mjs'; +import { TxAddInput } from '../structs/TxAddInput.mjs'; +import { TxAddOutput } from '../structs/TxAddOutput.mjs'; +import { TxRemoveInput } from '../structs/TxRemoveInput.mjs'; +import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs'; +import { TxComplete } from '../structs/TxComplete.mjs'; +import { TxSignatures } from '../structs/TxSignatures.mjs'; +import { TxInitRbf } from '../structs/TxInitRbf.mjs'; +import { TxAckRbf } from '../structs/TxAckRbf.mjs'; +import { TxAbort } from '../structs/TxAbort.mjs'; +import { ChannelReady } from '../structs/ChannelReady.mjs'; +import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs'; +import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs'; +import { RevokeAndACK } from '../structs/RevokeAndACK.mjs'; +import { ClosingSigned } from '../structs/ClosingSigned.mjs'; +import { Shutdown } from '../structs/Shutdown.mjs'; +import { ChannelReestablish } from '../structs/ChannelReestablish.mjs'; +import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs'; +import { ErrorMessage } from '../structs/ErrorMessage.mjs'; +import { WarningMessage } from '../structs/WarningMessage.mjs'; +import { ErrorAction } from '../structs/ErrorAction.mjs'; +import { QueryChannelRange } from '../structs/QueryChannelRange.mjs'; +import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs'; +import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs'; +import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs'; +import { MessageSendEvent } from '../structs/MessageSendEvent.mjs'; +import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs'; +import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs'; +import { ChannelInfo } from '../structs/ChannelInfo.mjs'; +import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; +import { RoutingFees } from '../structs/RoutingFees.mjs'; +import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; +import { SocketAddress } from '../structs/SocketAddress.mjs'; +import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; +import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; +import { NodeAlias } from '../structs/NodeAlias.mjs'; +import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs'; +import { NodeInfo } from '../structs/NodeInfo.mjs'; +import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; +import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; +import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; +import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; +import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; +import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; +import { Utxo } from '../structs/Utxo.mjs'; +import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs'; +import { Input } from '../structs/Input.mjs'; +import { CoinSelection } from '../structs/CoinSelection.mjs'; +import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; +import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; +import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; +import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; +import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; +import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; +import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; +import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; +import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs'; +import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs'; +import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; +import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Option_StrZ } from '../structs/Option_StrZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; +import { InvoiceError } from '../structs/InvoiceError.mjs'; +import { OffersMessage } from '../structs/OffersMessage.mjs'; +import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; +import { Destination } from '../structs/Destination.mjs'; +import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs'; +import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs'; +import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs'; +import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs'; +import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs'; +import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs'; +import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs'; +import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs'; +import { BlindedForward } from '../structs/BlindedForward.mjs'; +import { Result_BlindedForwardDecodeErrorZ } from '../structs/Result_BlindedForwardDecodeErrorZ.mjs'; +import { OnionPacket } from '../structs/OnionPacket.mjs'; +import { FinalOnionHopData } from '../structs/FinalOnionHopData.mjs'; +import { PendingHTLCRouting } from '../structs/PendingHTLCRouting.mjs'; +import { Result_PendingHTLCRoutingDecodeErrorZ } from '../structs/Result_PendingHTLCRoutingDecodeErrorZ.mjs'; +import { Result_PendingHTLCInfoDecodeErrorZ } from '../structs/Result_PendingHTLCInfoDecodeErrorZ.mjs'; +import { Result_BlindedFailureDecodeErrorZ } from '../structs/Result_BlindedFailureDecodeErrorZ.mjs'; +import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs'; +import { ChannelMonitor } from '../structs/ChannelMonitor.mjs'; +import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; +import { Watch, WatchInterface } from '../structs/Watch.mjs'; +import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; +import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; +import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; +import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; +import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; +import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; +import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; +import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs'; +import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs'; +import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs'; +import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs'; +import { Router, RouterInterface } from '../structs/Router.mjs'; +import { ChannelManager } from '../structs/ChannelManager.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs'; +import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs'; +import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs'; +import { ChannelConfig } from '../structs/ChannelConfig.mjs'; +import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs'; +import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs'; +import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs'; +import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs'; +import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs'; +import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs'; +import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs'; +import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs'; +import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs'; +import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs'; +import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs'; +import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs'; +import { Balance } from '../structs/Balance.mjs'; +import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs'; +import { Type, TypeInterface } from '../structs/Type.mjs'; +import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs'; +import { TwoTuple_PublicKeyCVec_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCVec_SocketAddressZZ.mjs'; +import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs'; +import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs'; +import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs'; +import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs'; +import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; +import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; +import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; +import { PeerHandleError } from '../structs/PeerHandleError.mjs'; +import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; +import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; +import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs'; +import { GraphSyncError } from '../structs/GraphSyncError.mjs'; +import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs'; +import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs'; +import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; +import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; +import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; +import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; +import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; +import { Option_i64Z } from '../structs/Option_i64Z.mjs'; +import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; +import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; +import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs'; +import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs'; +import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs'; +import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs'; +import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs'; +import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs'; +import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; +import { Result_SpliceDecodeErrorZ } from '../structs/Result_SpliceDecodeErrorZ.mjs'; +import { Result_SpliceAckDecodeErrorZ } from '../structs/Result_SpliceAckDecodeErrorZ.mjs'; +import { Result_SpliceLockedDecodeErrorZ } from '../structs/Result_SpliceLockedDecodeErrorZ.mjs'; +import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs'; +import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs'; +import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs'; +import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs'; +import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs'; +import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs'; +import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs'; +import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs'; +import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs'; +import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs'; +import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs'; +import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs'; +import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs'; +import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs'; +import { CommitmentSigned } from '../structs/CommitmentSigned.mjs'; +import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs'; +import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs'; +import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs'; +import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs'; +import { Init } from '../structs/Init.mjs'; +import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs'; +import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs'; +import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs'; +import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs'; +import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs'; +import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs'; +import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs'; +import { UpdateFee } from '../structs/UpdateFee.mjs'; +import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs'; +import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs'; +import { Result_OnionPacketDecodeErrorZ } from '../structs/Result_OnionPacketDecodeErrorZ.mjs'; +import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs'; +import { OnionMessage } from '../structs/OnionMessage.mjs'; +import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs'; +import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs'; +import { Ping } from '../structs/Ping.mjs'; +import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs'; +import { Pong } from '../structs/Pong.mjs'; +import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs'; +import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; +import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs'; +import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs'; +import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs'; +import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs'; +import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs'; +import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs'; +import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs'; +import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs'; +import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs'; +import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs'; +import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs'; +import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs'; +import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs'; +import { SignOrCreationError } from '../structs/SignOrCreationError.mjs'; +import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs'; +import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs'; +import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs'; +import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs'; +import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs'; +import { TxCreationKeys } from '../structs/TxCreationKeys.mjs'; +import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs'; +import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; +import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs'; +import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs'; +import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs'; +import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs'; +import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs'; +import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs'; +import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs'; +import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs'; +import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs'; +import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs'; +import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs'; +import { Option_usizeZ } from '../structs/Option_usizeZ.mjs'; +import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs'; +import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs'; +import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs'; +import { PaymentPurpose } from '../structs/PaymentPurpose.mjs'; +import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs'; +import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs'; +import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs'; +import { PathFailure } from '../structs/PathFailure.mjs'; +import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; +import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; +import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; +import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; +import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs'; +import { Option_U128Z } from '../structs/Option_U128Z.mjs'; +import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs'; +import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs'; +import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs'; +import { Event } from '../structs/Event.mjs'; +import { Option_EventZ } from '../structs/Option_EventZ.mjs'; +import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs'; +import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; +import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs'; +import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs'; +import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs'; +import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs'; +import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs'; +import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs'; +import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs'; +import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs'; +import { PayeePubKey } from '../structs/PayeePubKey.mjs'; +import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs'; +import { PrivateRoute } from '../structs/PrivateRoute.mjs'; +import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs'; +import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs'; +import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs'; +import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs'; +import { Description } from '../structs/Description.mjs'; +import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs'; +import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs'; +import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs'; +import { BigSize } from '../structs/BigSize.mjs'; +import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs'; +import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs'; +import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs'; +import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; +import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; +import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; +import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; +import { PaymentRelay } from '../structs/PaymentRelay.mjs'; +import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; +import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; +import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; +import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; +import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; +import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; +import { SendError } from '../structs/SendError.mjs'; +import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; +import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; +import { PeeledOnion } from '../structs/PeeledOnion.mjs'; +import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; +import { SendSuccess } from '../structs/SendSuccess.mjs'; +import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs'; +import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs'; +import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs'; +import { ForwardNode } from '../structs/ForwardNode.mjs'; +import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; +import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; +import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; +import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; +import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; +import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; +import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs'; +import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; +import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs'; +import { HtlcKey } from '../structs/HtlcKey.mjs'; +import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs'; +import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; +import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; +import { RevocationKey } from '../structs/RevocationKey.mjs'; +import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; +import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; +import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; +import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; +import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; +import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; +import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; +import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; +import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs'; +import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs'; +import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs'; +import { ChannelUsage } from '../structs/ChannelUsage.mjs'; +import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; +import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs'; +import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs'; +import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs'; +import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs'; +import { Persister, PersisterInterface } from '../structs/Persister.mjs'; +import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; +import { Persist, PersistInterface } from '../structs/Persist.mjs'; +import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; +import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; +import { Future } from '../structs/Future.mjs'; +import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; +import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; +import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; +import { UserConfig } from '../structs/UserConfig.mjs'; +import { ChainMonitor } from '../structs/ChainMonitor.mjs'; +import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; +import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; +import { FailureCode } from '../structs/FailureCode.mjs'; +import { ChainParameters } from '../structs/ChainParameters.mjs'; +import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; +import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; +import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; +import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; +import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; +import { Packet } from '../structs/Packet.mjs'; +import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; +import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; +import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; +import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; +import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; +import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs'; +import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs'; +import { MessageHandler } from '../structs/MessageHandler.mjs'; +import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs'; +import { PeerManager } from '../structs/PeerManager.mjs'; +import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; +import { OfferFeatures } from '../structs/OfferFeatures.mjs'; +import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; +import { TaggedHash } from '../structs/TaggedHash.mjs'; +import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; +import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; +import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; +import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; +import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; +import { DefaultRouter } from '../structs/DefaultRouter.mjs'; +import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs'; +import { Payee } from '../structs/Payee.mjs'; +import { Score, ScoreInterface } from '../structs/Score.mjs'; +import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs'; +import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs'; +import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs'; +import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; +import { KeysManager } from '../structs/KeysManager.mjs'; +import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; +import { OnionMessenger } from '../structs/OnionMessenger.mjs'; +import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; +import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; +import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; +import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; +import { Wallet } from '../structs/Wallet.mjs'; +import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs'; +import { RapidGossipSync } from '../structs/RapidGossipSync.mjs'; +import { GossipSync } from '../structs/GossipSync.mjs'; +import { RawDataPart } from '../structs/RawDataPart.mjs'; +import { Sha256 } from '../structs/Sha256.mjs'; +import { ExpiryTime } from '../structs/ExpiryTime.mjs'; +import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs'; +import { Fallback } from '../structs/Fallback.mjs'; + +import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs'; +import * as bindings from '../bindings.mjs' + + +/** + * An unknown payment context. + */ +export class UnknownPaymentContext extends CommonBase { + /* @internal */ + public constructor(_dummy: null, ptr: bigint) { + super(ptr, bindings.UnknownPaymentContext_free); + } + + public clone_ptr(): bigint { + const ret: bigint = bindings.UnknownPaymentContext_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a copy of the UnknownPaymentContext + */ + public clone(): UnknownPaymentContext { + const ret: bigint = bindings.UnknownPaymentContext_clone(this.ptr); + const ret_hu_conv: UnknownPaymentContext = new UnknownPaymentContext(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * Checks if two UnknownPaymentContexts contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ + public eq(b: UnknownPaymentContext): boolean { + const ret: boolean = bindings.UnknownPaymentContext_eq(this.ptr, CommonBase.get_ptr_of(b)); + CommonBase.add_ref_from(this, b); + return ret; + } + + /** + * Serialize the UnknownPaymentContext object into a byte array which can be read by UnknownPaymentContext_read + */ + public write(): Uint8Array { + const ret: number = bindings.UnknownPaymentContext_write(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Read a UnknownPaymentContext from a byte array, created by UnknownPaymentContext_write + */ + public static constructor_read(ser: Uint8Array): Result_UnknownPaymentContextDecodeErrorZ { + const ret: bigint = bindings.UnknownPaymentContext_read(bindings.encodeUint8Array(ser)); + const ret_hu_conv: Result_UnknownPaymentContextDecodeErrorZ = Result_UnknownPaymentContextDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} diff --git a/ts/structs/UnsignedBolt12Invoice.mts b/ts/structs/UnsignedBolt12Invoice.mts index c7b79af9..abbd4920 100644 --- a/ts/structs/UnsignedBolt12Invoice.mts +++ b/ts/structs/UnsignedBolt12Invoice.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,15 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -610,6 +675,21 @@ export class UnsignedBolt12Invoice extends CommonBase { super(ptr, bindings.UnsignedBolt12Invoice_free); } + public clone_ptr(): bigint { + const ret: bigint = bindings.UnsignedBolt12Invoice_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a copy of the UnsignedBolt12Invoice + */ + public clone(): UnsignedBolt12Invoice { + const ret: bigint = bindings.UnsignedBolt12Invoice_clone(this.ptr); + const ret_hu_conv: UnsignedBolt12Invoice = new UnsignedBolt12Invoice(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + /** * Returns the [`TaggedHash`] of the invoice to sign. */ @@ -673,12 +753,10 @@ export class UnsignedBolt12Invoice extends CommonBase { * * [`Offer`]: crate::offers::offer::Offer * [`Offer::amount`]: crate::offers::offer::Offer::amount - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public amount(): Amount { + public amount(): Option_AmountZ { const ret: bigint = bindings.UnsignedBolt12Invoice_amount(this.ptr); - const ret_hu_conv: Amount = new Amount(null, ret); + const ret_hu_conv: Option_AmountZ = Option_AmountZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, this); return ret_hu_conv; } @@ -707,6 +785,8 @@ export class UnsignedBolt12Invoice extends CommonBase { * From [`Offer::description`] or [`Refund::description`]. * * [`Offer::description`]: crate::offers::offer::Offer::description + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ public description(): PrintableString { const ret: bigint = bindings.UnsignedBolt12Invoice_description(this.ptr); @@ -773,12 +853,10 @@ export class UnsignedBolt12Invoice extends CommonBase { * [`Refund`]. * * [`Offer::supported_quantity`]: crate::offers::offer::Offer::supported_quantity - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public supported_quantity(): Quantity { + public supported_quantity(): Option_QuantityZ { const ret: bigint = bindings.UnsignedBolt12Invoice_supported_quantity(this.ptr); - const ret_hu_conv: Quantity = new Quantity(null, ret); + const ret_hu_conv: Option_QuantityZ = Option_QuantityZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, this); return ret_hu_conv; } diff --git a/ts/structs/UnsignedChannelAnnouncement.mts b/ts/structs/UnsignedChannelAnnouncement.mts index 2e5c8779..ce06bf94 100644 --- a/ts/structs/UnsignedChannelAnnouncement.mts +++ b/ts/structs/UnsignedChannelAnnouncement.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -621,7 +686,7 @@ export class UnsignedChannelAnnouncement extends CommonBase { * The advertised channel features */ public set_features(val: ChannelFeatures): void { - bindings.UnsignedChannelAnnouncement_set_features(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.UnsignedChannelAnnouncement_set_features(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -670,7 +735,7 @@ export class UnsignedChannelAnnouncement extends CommonBase { * One of the two `node_id`s which are endpoints of this channel */ public set_node_id_1(val: NodeId): void { - bindings.UnsignedChannelAnnouncement_set_node_id_1(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.UnsignedChannelAnnouncement_set_node_id_1(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -688,7 +753,7 @@ export class UnsignedChannelAnnouncement extends CommonBase { * The other of the two `node_id`s which are endpoints of this channel */ public set_node_id_2(val: NodeId): void { - bindings.UnsignedChannelAnnouncement_set_node_id_2(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.UnsignedChannelAnnouncement_set_node_id_2(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -706,7 +771,7 @@ export class UnsignedChannelAnnouncement extends CommonBase { * The funding key for the first node */ public set_bitcoin_key_1(val: NodeId): void { - bindings.UnsignedChannelAnnouncement_set_bitcoin_key_1(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.UnsignedChannelAnnouncement_set_bitcoin_key_1(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -724,7 +789,7 @@ export class UnsignedChannelAnnouncement extends CommonBase { * The funding key for the second node */ public set_bitcoin_key_2(val: NodeId): void { - bindings.UnsignedChannelAnnouncement_set_bitcoin_key_2(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.UnsignedChannelAnnouncement_set_bitcoin_key_2(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -756,7 +821,7 @@ export class UnsignedChannelAnnouncement extends CommonBase { * Constructs a new UnsignedChannelAnnouncement given each field */ public static constructor_new(features_arg: ChannelFeatures, chain_hash_arg: Uint8Array, short_channel_id_arg: bigint, node_id_1_arg: NodeId, node_id_2_arg: NodeId, bitcoin_key_1_arg: NodeId, bitcoin_key_2_arg: NodeId, excess_data_arg: Uint8Array): UnsignedChannelAnnouncement { - const ret: bigint = bindings.UnsignedChannelAnnouncement_new(features_arg == null ? 0n : CommonBase.get_ptr_of(features_arg), bindings.encodeUint8Array(bindings.check_arr_len(chain_hash_arg, 32)), short_channel_id_arg, node_id_1_arg == null ? 0n : CommonBase.get_ptr_of(node_id_1_arg), node_id_2_arg == null ? 0n : CommonBase.get_ptr_of(node_id_2_arg), bitcoin_key_1_arg == null ? 0n : CommonBase.get_ptr_of(bitcoin_key_1_arg), bitcoin_key_2_arg == null ? 0n : CommonBase.get_ptr_of(bitcoin_key_2_arg), bindings.encodeUint8Array(excess_data_arg)); + const ret: bigint = bindings.UnsignedChannelAnnouncement_new(CommonBase.get_ptr_of(features_arg), bindings.encodeUint8Array(bindings.check_arr_len(chain_hash_arg, 32)), short_channel_id_arg, CommonBase.get_ptr_of(node_id_1_arg), CommonBase.get_ptr_of(node_id_2_arg), CommonBase.get_ptr_of(bitcoin_key_1_arg), CommonBase.get_ptr_of(bitcoin_key_2_arg), bindings.encodeUint8Array(excess_data_arg)); const ret_hu_conv: UnsignedChannelAnnouncement = new UnsignedChannelAnnouncement(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, features_arg); @@ -796,7 +861,7 @@ export class UnsignedChannelAnnouncement extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: UnsignedChannelAnnouncement): boolean { - const ret: boolean = bindings.UnsignedChannelAnnouncement_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.UnsignedChannelAnnouncement_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/UnsignedChannelUpdate.mts b/ts/structs/UnsignedChannelUpdate.mts index 77cfc820..9e8621f9 100644 --- a/ts/structs/UnsignedChannelUpdate.mts +++ b/ts/structs/UnsignedChannelUpdate.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -824,7 +889,7 @@ export class UnsignedChannelUpdate extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: UnsignedChannelUpdate): boolean { - const ret: boolean = bindings.UnsignedChannelUpdate_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.UnsignedChannelUpdate_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/UnsignedGossipMessage.mts b/ts/structs/UnsignedGossipMessage.mts index c9c86239..70373544 100644 --- a/ts/structs/UnsignedGossipMessage.mts +++ b/ts/structs/UnsignedGossipMessage.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -631,7 +696,7 @@ export class UnsignedGossipMessage extends CommonBase { * Utility method to constructs a new ChannelAnnouncement-variant UnsignedGossipMessage */ public static constructor_channel_announcement(a: UnsignedChannelAnnouncement): UnsignedGossipMessage { - const ret: bigint = bindings.UnsignedGossipMessage_channel_announcement(a == null ? 0n : CommonBase.get_ptr_of(a)); + const ret: bigint = bindings.UnsignedGossipMessage_channel_announcement(CommonBase.get_ptr_of(a)); const ret_hu_conv: UnsignedGossipMessage = UnsignedGossipMessage.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, a); @@ -642,7 +707,7 @@ export class UnsignedGossipMessage extends CommonBase { * Utility method to constructs a new ChannelUpdate-variant UnsignedGossipMessage */ public static constructor_channel_update(a: UnsignedChannelUpdate): UnsignedGossipMessage { - const ret: bigint = bindings.UnsignedGossipMessage_channel_update(a == null ? 0n : CommonBase.get_ptr_of(a)); + const ret: bigint = bindings.UnsignedGossipMessage_channel_update(CommonBase.get_ptr_of(a)); const ret_hu_conv: UnsignedGossipMessage = UnsignedGossipMessage.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, a); @@ -653,7 +718,7 @@ export class UnsignedGossipMessage extends CommonBase { * Utility method to constructs a new NodeAnnouncement-variant UnsignedGossipMessage */ public static constructor_node_announcement(a: UnsignedNodeAnnouncement): UnsignedGossipMessage { - const ret: bigint = bindings.UnsignedGossipMessage_node_announcement(a == null ? 0n : CommonBase.get_ptr_of(a)); + const ret: bigint = bindings.UnsignedGossipMessage_node_announcement(CommonBase.get_ptr_of(a)); const ret_hu_conv: UnsignedGossipMessage = UnsignedGossipMessage.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, a); diff --git a/ts/structs/UnsignedInvoiceRequest.mts b/ts/structs/UnsignedInvoiceRequest.mts index 522463ed..eb300ae4 100644 --- a/ts/structs/UnsignedInvoiceRequest.mts +++ b/ts/structs/UnsignedInvoiceRequest.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -610,6 +675,21 @@ export class UnsignedInvoiceRequest extends CommonBase { super(ptr, bindings.UnsignedInvoiceRequest_free); } + public clone_ptr(): bigint { + const ret: bigint = bindings.UnsignedInvoiceRequest_clone_ptr(this.ptr); + return ret; + } + + /** + * Creates a copy of the UnsignedInvoiceRequest + */ + public clone(): UnsignedInvoiceRequest { + const ret: bigint = bindings.UnsignedInvoiceRequest_clone(this.ptr); + const ret_hu_conv: UnsignedInvoiceRequest = new UnsignedInvoiceRequest(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + /** * Returns the [`TaggedHash`] of the invoice to sign. */ @@ -651,12 +731,10 @@ export class UnsignedInvoiceRequest extends CommonBase { /** * The minimum amount required for a successful payment of a single item. - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public amount(): Amount { + public amount(): Option_AmountZ { const ret: bigint = bindings.UnsignedInvoiceRequest_amount(this.ptr); - const ret_hu_conv: Amount = new Amount(null, ret); + const ret_hu_conv: Option_AmountZ = Option_AmountZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, this); return ret_hu_conv; } @@ -664,6 +742,8 @@ export class UnsignedInvoiceRequest extends CommonBase { /** * A complete description of the purpose of the payment. Intended to be displayed to the user * but with the caveat that it has not been verified in any way. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ public description(): PrintableString { const ret: bigint = bindings.UnsignedInvoiceRequest_description(this.ptr); @@ -730,13 +810,15 @@ export class UnsignedInvoiceRequest extends CommonBase { */ public supported_quantity(): Quantity { const ret: bigint = bindings.UnsignedInvoiceRequest_supported_quantity(this.ptr); - const ret_hu_conv: Quantity = new Quantity(null, ret); + const ret_hu_conv: Quantity = Quantity.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, this); return ret_hu_conv; } /** * The public key used by the recipient to sign invoices. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ public signing_pubkey(): Uint8Array { const ret: number = bindings.UnsignedInvoiceRequest_signing_pubkey(this.ptr); diff --git a/ts/structs/UnsignedNodeAnnouncement.mts b/ts/structs/UnsignedNodeAnnouncement.mts index 126ff73c..81fdd041 100644 --- a/ts/structs/UnsignedNodeAnnouncement.mts +++ b/ts/structs/UnsignedNodeAnnouncement.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -621,7 +686,7 @@ export class UnsignedNodeAnnouncement extends CommonBase { * The advertised features */ public set_features(val: NodeFeatures): void { - bindings.UnsignedNodeAnnouncement_set_features(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.UnsignedNodeAnnouncement_set_features(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -656,7 +721,7 @@ export class UnsignedNodeAnnouncement extends CommonBase { * to this node). */ public set_node_id(val: NodeId): void { - bindings.UnsignedNodeAnnouncement_set_node_id(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.UnsignedNodeAnnouncement_set_node_id(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -694,7 +759,7 @@ export class UnsignedNodeAnnouncement extends CommonBase { * This should be sanitized before use. There is no guarantee of uniqueness. */ public set_alias(val: NodeAlias): void { - bindings.UnsignedNodeAnnouncement_set_alias(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.UnsignedNodeAnnouncement_set_alias(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -725,6 +790,68 @@ export class UnsignedNodeAnnouncement extends CommonBase { val.forEach((val_conv_15: SocketAddress) => { CommonBase.add_ref_from(this, val_conv_15); }); } + /** + * Excess address data which was signed as a part of the message which we do not (yet) understand how + * to decode. + * + * This is stored to ensure forward-compatibility as new address types are added to the lightning gossip protocol. + * + * Returns a copy of the field. + */ + public get_excess_address_data(): Uint8Array { + const ret: number = bindings.UnsignedNodeAnnouncement_get_excess_address_data(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Excess address data which was signed as a part of the message which we do not (yet) understand how + * to decode. + * + * This is stored to ensure forward-compatibility as new address types are added to the lightning gossip protocol. + */ + public set_excess_address_data(val: Uint8Array): void { + bindings.UnsignedNodeAnnouncement_set_excess_address_data(this.ptr, bindings.encodeUint8Array(val)); + } + + /** + * Excess data which was signed as a part of the message which we do not (yet) understand how + * to decode. + * + * This is stored to ensure forward-compatibility as new fields are added to the lightning gossip protocol. + * + * Returns a copy of the field. + */ + public get_excess_data(): Uint8Array { + const ret: number = bindings.UnsignedNodeAnnouncement_get_excess_data(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Excess data which was signed as a part of the message which we do not (yet) understand how + * to decode. + * + * This is stored to ensure forward-compatibility as new fields are added to the lightning gossip protocol. + */ + public set_excess_data(val: Uint8Array): void { + bindings.UnsignedNodeAnnouncement_set_excess_data(this.ptr, bindings.encodeUint8Array(val)); + } + + /** + * Constructs a new UnsignedNodeAnnouncement given each field + */ + public static constructor_new(features_arg: NodeFeatures, timestamp_arg: number, node_id_arg: NodeId, rgb_arg: Uint8Array, alias_arg: NodeAlias, addresses_arg: SocketAddress[], excess_address_data_arg: Uint8Array, excess_data_arg: Uint8Array): UnsignedNodeAnnouncement { + const ret: bigint = bindings.UnsignedNodeAnnouncement_new(CommonBase.get_ptr_of(features_arg), timestamp_arg, CommonBase.get_ptr_of(node_id_arg), bindings.encodeUint8Array(bindings.check_arr_len(rgb_arg, 3)), CommonBase.get_ptr_of(alias_arg), bindings.encodeUint64Array(addresses_arg.map(addresses_arg_conv_15 => CommonBase.get_ptr_of(addresses_arg_conv_15))), bindings.encodeUint8Array(excess_address_data_arg), bindings.encodeUint8Array(excess_data_arg)); + const ret_hu_conv: UnsignedNodeAnnouncement = new UnsignedNodeAnnouncement(null, ret); + CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, features_arg); + CommonBase.add_ref_from(ret_hu_conv, node_id_arg); + CommonBase.add_ref_from(ret_hu_conv, alias_arg); + addresses_arg.forEach((addresses_arg_conv_15: SocketAddress) => { CommonBase.add_ref_from(ret_hu_conv, addresses_arg_conv_15); }); + return ret_hu_conv; + } + public clone_ptr(): bigint { const ret: bigint = bindings.UnsignedNodeAnnouncement_clone_ptr(this.ptr); return ret; @@ -754,7 +881,7 @@ export class UnsignedNodeAnnouncement extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: UnsignedNodeAnnouncement): boolean { - const ret: boolean = bindings.UnsignedNodeAnnouncement_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.UnsignedNodeAnnouncement_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/UntrustedString.mts b/ts/structs/UntrustedString.mts index 5e15b582..a9233d67 100644 --- a/ts/structs/UntrustedString.mts +++ b/ts/structs/UntrustedString.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,16 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,7 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -646,7 +711,7 @@ export class UntrustedString extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: UntrustedString): boolean { - const ret: boolean = bindings.UntrustedString_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.UntrustedString_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/UpdateAddHTLC.mts b/ts/structs/UpdateAddHTLC.mts index 30674703..754a9ea2 100644 --- a/ts/structs/UpdateAddHTLC.mts +++ b/ts/structs/UpdateAddHTLC.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -610,17 +675,19 @@ export class UpdateAddHTLC extends CommonBase { /** * The channel ID */ - public get_channel_id(): Uint8Array { - const ret: number = bindings.UpdateAddHTLC_get_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public get_channel_id(): ChannelId { + const ret: bigint = bindings.UpdateAddHTLC_get_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** * The channel ID */ - public set_channel_id(val: Uint8Array): void { - bindings.UpdateAddHTLC_set_channel_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + public set_channel_id(val: ChannelId): void { + bindings.UpdateAddHTLC_set_channel_id(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** @@ -722,7 +789,7 @@ export class UpdateAddHTLC extends CommonBase { * The onion routing packet with encrypted data for the next hop. */ public set_onion_routing_packet(val: OnionPacket): void { - bindings.UpdateAddHTLC_set_onion_routing_packet(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.UpdateAddHTLC_set_onion_routing_packet(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -753,10 +820,11 @@ export class UpdateAddHTLC extends CommonBase { * * Note that blinding_point_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public static constructor_new(channel_id_arg: Uint8Array, htlc_id_arg: bigint, amount_msat_arg: bigint, payment_hash_arg: Uint8Array, cltv_expiry_arg: number, skimmed_fee_msat_arg: Option_u64Z, onion_routing_packet_arg: OnionPacket, blinding_point_arg: Uint8Array|null): UpdateAddHTLC { - const ret: bigint = bindings.UpdateAddHTLC_new(bindings.encodeUint8Array(bindings.check_arr_len(channel_id_arg, 32)), htlc_id_arg, amount_msat_arg, bindings.encodeUint8Array(bindings.check_arr_len(payment_hash_arg, 32)), cltv_expiry_arg, CommonBase.get_ptr_of(skimmed_fee_msat_arg), onion_routing_packet_arg == null ? 0n : CommonBase.get_ptr_of(onion_routing_packet_arg), bindings.encodeUint8Array(bindings.check_arr_len(blinding_point_arg, 33))); + public static constructor_new(channel_id_arg: ChannelId, htlc_id_arg: bigint, amount_msat_arg: bigint, payment_hash_arg: Uint8Array, cltv_expiry_arg: number, skimmed_fee_msat_arg: Option_u64Z, onion_routing_packet_arg: OnionPacket, blinding_point_arg: Uint8Array|null): UpdateAddHTLC { + const ret: bigint = bindings.UpdateAddHTLC_new(CommonBase.get_ptr_of(channel_id_arg), htlc_id_arg, amount_msat_arg, bindings.encodeUint8Array(bindings.check_arr_len(payment_hash_arg, 32)), cltv_expiry_arg, CommonBase.get_ptr_of(skimmed_fee_msat_arg), CommonBase.get_ptr_of(onion_routing_packet_arg), bindings.encodeUint8Array(bindings.check_arr_len(blinding_point_arg, 33))); const ret_hu_conv: UpdateAddHTLC = new UpdateAddHTLC(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, channel_id_arg); CommonBase.add_ref_from(ret_hu_conv, skimmed_fee_msat_arg); CommonBase.add_ref_from(ret_hu_conv, onion_routing_packet_arg); return ret_hu_conv; @@ -791,7 +859,7 @@ export class UpdateAddHTLC extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: UpdateAddHTLC): boolean { - const ret: boolean = bindings.UpdateAddHTLC_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.UpdateAddHTLC_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/UpdateFailHTLC.mts b/ts/structs/UpdateFailHTLC.mts index b4735c08..0cbea3dc 100644 --- a/ts/structs/UpdateFailHTLC.mts +++ b/ts/structs/UpdateFailHTLC.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -610,17 +675,19 @@ export class UpdateFailHTLC extends CommonBase { /** * The channel ID */ - public get_channel_id(): Uint8Array { - const ret: number = bindings.UpdateFailHTLC_get_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public get_channel_id(): ChannelId { + const ret: bigint = bindings.UpdateFailHTLC_get_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** * The channel ID */ - public set_channel_id(val: Uint8Array): void { - bindings.UpdateFailHTLC_set_channel_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + public set_channel_id(val: ChannelId): void { + bindings.UpdateFailHTLC_set_channel_id(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** @@ -667,7 +734,7 @@ export class UpdateFailHTLC extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: UpdateFailHTLC): boolean { - const ret: boolean = bindings.UpdateFailHTLC_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.UpdateFailHTLC_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/UpdateFailMalformedHTLC.mts b/ts/structs/UpdateFailMalformedHTLC.mts index b3fda711..da293482 100644 --- a/ts/structs/UpdateFailMalformedHTLC.mts +++ b/ts/structs/UpdateFailMalformedHTLC.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -610,17 +675,19 @@ export class UpdateFailMalformedHTLC extends CommonBase { /** * The channel ID */ - public get_channel_id(): Uint8Array { - const ret: number = bindings.UpdateFailMalformedHTLC_get_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public get_channel_id(): ChannelId { + const ret: bigint = bindings.UpdateFailMalformedHTLC_get_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** * The channel ID */ - public set_channel_id(val: Uint8Array): void { - bindings.UpdateFailMalformedHTLC_set_channel_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + public set_channel_id(val: ChannelId): void { + bindings.UpdateFailMalformedHTLC_set_channel_id(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** @@ -682,7 +749,7 @@ export class UpdateFailMalformedHTLC extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: UpdateFailMalformedHTLC): boolean { - const ret: boolean = bindings.UpdateFailMalformedHTLC_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.UpdateFailMalformedHTLC_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/UpdateFee.mts b/ts/structs/UpdateFee.mts index 4500785a..faadeda4 100644 --- a/ts/structs/UpdateFee.mts +++ b/ts/structs/UpdateFee.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -610,17 +675,19 @@ export class UpdateFee extends CommonBase { /** * The channel ID */ - public get_channel_id(): Uint8Array { - const ret: number = bindings.UpdateFee_get_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public get_channel_id(): ChannelId { + const ret: bigint = bindings.UpdateFee_get_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** * The channel ID */ - public set_channel_id(val: Uint8Array): void { - bindings.UpdateFee_set_channel_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + public set_channel_id(val: ChannelId): void { + bindings.UpdateFee_set_channel_id(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** @@ -641,10 +708,11 @@ export class UpdateFee extends CommonBase { /** * Constructs a new UpdateFee given each field */ - public static constructor_new(channel_id_arg: Uint8Array, feerate_per_kw_arg: number): UpdateFee { - const ret: bigint = bindings.UpdateFee_new(bindings.encodeUint8Array(bindings.check_arr_len(channel_id_arg, 32)), feerate_per_kw_arg); + public static constructor_new(channel_id_arg: ChannelId, feerate_per_kw_arg: number): UpdateFee { + const ret: bigint = bindings.UpdateFee_new(CommonBase.get_ptr_of(channel_id_arg), feerate_per_kw_arg); const ret_hu_conv: UpdateFee = new UpdateFee(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, channel_id_arg); return ret_hu_conv; } @@ -677,7 +745,7 @@ export class UpdateFee extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: UpdateFee): boolean { - const ret: boolean = bindings.UpdateFee_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.UpdateFee_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/UpdateFulfillHTLC.mts b/ts/structs/UpdateFulfillHTLC.mts index f948f251..f447aa4c 100644 --- a/ts/structs/UpdateFulfillHTLC.mts +++ b/ts/structs/UpdateFulfillHTLC.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -610,17 +675,19 @@ export class UpdateFulfillHTLC extends CommonBase { /** * The channel ID */ - public get_channel_id(): Uint8Array { - const ret: number = bindings.UpdateFulfillHTLC_get_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public get_channel_id(): ChannelId { + const ret: bigint = bindings.UpdateFulfillHTLC_get_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** * The channel ID */ - public set_channel_id(val: Uint8Array): void { - bindings.UpdateFulfillHTLC_set_channel_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + public set_channel_id(val: ChannelId): void { + bindings.UpdateFulfillHTLC_set_channel_id(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** @@ -657,10 +724,11 @@ export class UpdateFulfillHTLC extends CommonBase { /** * Constructs a new UpdateFulfillHTLC given each field */ - public static constructor_new(channel_id_arg: Uint8Array, htlc_id_arg: bigint, payment_preimage_arg: Uint8Array): UpdateFulfillHTLC { - const ret: bigint = bindings.UpdateFulfillHTLC_new(bindings.encodeUint8Array(bindings.check_arr_len(channel_id_arg, 32)), htlc_id_arg, bindings.encodeUint8Array(bindings.check_arr_len(payment_preimage_arg, 32))); + public static constructor_new(channel_id_arg: ChannelId, htlc_id_arg: bigint, payment_preimage_arg: Uint8Array): UpdateFulfillHTLC { + const ret: bigint = bindings.UpdateFulfillHTLC_new(CommonBase.get_ptr_of(channel_id_arg), htlc_id_arg, bindings.encodeUint8Array(bindings.check_arr_len(payment_preimage_arg, 32))); const ret_hu_conv: UpdateFulfillHTLC = new UpdateFulfillHTLC(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, channel_id_arg); return ret_hu_conv; } @@ -693,7 +761,7 @@ export class UpdateFulfillHTLC extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: UpdateFulfillHTLC): boolean { - const ret: boolean = bindings.UpdateFulfillHTLC_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.UpdateFulfillHTLC_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/UserConfig.mts b/ts/structs/UserConfig.mts index 3e5691ef..82456ae4 100644 --- a/ts/structs/UserConfig.mts +++ b/ts/structs/UserConfig.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,14 +583,14 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -622,7 +687,7 @@ export class UserConfig extends CommonBase { * Channel handshake config that we propose to our counterparty. */ public set_channel_handshake_config(val: ChannelHandshakeConfig): void { - bindings.UserConfig_set_channel_handshake_config(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.UserConfig_set_channel_handshake_config(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -640,7 +705,7 @@ export class UserConfig extends CommonBase { * Limits applied to our counterparty's proposed channel handshake config settings. */ public set_channel_handshake_limits(val: ChannelHandshakeLimits): void { - bindings.UserConfig_set_channel_handshake_limits(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.UserConfig_set_channel_handshake_limits(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -658,7 +723,7 @@ export class UserConfig extends CommonBase { * Channel config which affects behavior during channel lifetime. */ public set_channel_config(val: ChannelConfig): void { - bindings.UserConfig_set_channel_config(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.UserConfig_set_channel_config(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -833,7 +898,7 @@ export class UserConfig extends CommonBase { * Constructs a new UserConfig given each field */ public static constructor_new(channel_handshake_config_arg: ChannelHandshakeConfig, channel_handshake_limits_arg: ChannelHandshakeLimits, channel_config_arg: ChannelConfig, accept_forwards_to_priv_channels_arg: boolean, accept_inbound_channels_arg: boolean, manually_accept_inbound_channels_arg: boolean, accept_intercept_htlcs_arg: boolean, accept_mpp_keysend_arg: boolean): UserConfig { - const ret: bigint = bindings.UserConfig_new(channel_handshake_config_arg == null ? 0n : CommonBase.get_ptr_of(channel_handshake_config_arg), channel_handshake_limits_arg == null ? 0n : CommonBase.get_ptr_of(channel_handshake_limits_arg), channel_config_arg == null ? 0n : CommonBase.get_ptr_of(channel_config_arg), accept_forwards_to_priv_channels_arg, accept_inbound_channels_arg, manually_accept_inbound_channels_arg, accept_intercept_htlcs_arg, accept_mpp_keysend_arg); + const ret: bigint = bindings.UserConfig_new(CommonBase.get_ptr_of(channel_handshake_config_arg), CommonBase.get_ptr_of(channel_handshake_limits_arg), CommonBase.get_ptr_of(channel_config_arg), accept_forwards_to_priv_channels_arg, accept_inbound_channels_arg, manually_accept_inbound_channels_arg, accept_intercept_htlcs_arg, accept_mpp_keysend_arg); const ret_hu_conv: UserConfig = new UserConfig(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, channel_handshake_config_arg); diff --git a/ts/structs/UtilMethods.mts b/ts/structs/UtilMethods.mts index a1f0e263..3190681d 100644 --- a/ts/structs/UtilMethods.mts +++ b/ts/structs/UtilMethods.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -560,10 +620,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -578,8 +640,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -691,6 +756,56 @@ export class UtilMethods extends CommonBase { return ret_hu_conv; } + /** + * Extracts the block height (most significant 3-bytes) from the `short_channel_id` + */ + public static constructor_block_from_scid(short_channel_id: bigint): number { + const ret: number = bindings.block_from_scid(short_channel_id); + return ret; + } + + /** + * Extracts the tx index (bytes [2..4]) from the `short_channel_id` + */ + public static constructor_tx_index_from_scid(short_channel_id: bigint): number { + const ret: number = bindings.tx_index_from_scid(short_channel_id); + return ret; + } + + /** + * Extracts the vout (bytes [0..2]) from the `short_channel_id` + */ + public static constructor_vout_from_scid(short_channel_id: bigint): number { + const ret: number = bindings.vout_from_scid(short_channel_id); + return ret; + } + + /** + * Constructs a `short_channel_id` using the components pieces. Results in an error + * if the block height, tx index, or vout index overflow the maximum sizes. + */ + public static constructor_scid_from_parts(block: bigint, tx_index: bigint, vout_index: bigint): Result_u64ShortChannelIdErrorZ { + const ret: bigint = bindings.scid_from_parts(block, tx_index, vout_index); + const ret_hu_conv: Result_u64ShortChannelIdErrorZ = Result_u64ShortChannelIdErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Read a C2Tuple_BestBlockOutputSweeperZ from a byte array, created by C2Tuple_BestBlockOutputSweeperZ_write + */ + public static constructor_C2Tuple_BestBlockOutputSweeperZ_read(ser: Uint8Array, arg_a: BroadcasterInterface, arg_b: FeeEstimator, arg_c: Option_FilterZ, arg_d: OutputSpender, arg_e: ChangeDestinationSource, arg_f: KVStore, arg_g: Logger): Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ { + const ret: bigint = bindings.C2Tuple_BestBlockOutputSweeperZ_read(bindings.encodeUint8Array(ser), CommonBase.get_ptr_of(arg_a), CommonBase.get_ptr_of(arg_b), CommonBase.get_ptr_of(arg_c), CommonBase.get_ptr_of(arg_d), CommonBase.get_ptr_of(arg_e), CommonBase.get_ptr_of(arg_f), CommonBase.get_ptr_of(arg_g)); + const ret_hu_conv: Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ = Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, arg_a); + CommonBase.add_ref_from(ret_hu_conv, arg_b); + CommonBase.add_ref_from(ret_hu_conv, arg_c); + CommonBase.add_ref_from(ret_hu_conv, arg_d); + CommonBase.add_ref_from(ret_hu_conv, arg_e); + CommonBase.add_ref_from(ret_hu_conv, arg_f); + CommonBase.add_ref_from(ret_hu_conv, arg_g); + return ret_hu_conv; + } + /** * Read a MonitorEvent from a byte array, created by MonitorEvent_write */ @@ -723,7 +838,7 @@ export class UtilMethods extends CommonBase { * [`Event::PaymentClaimable`]: crate::events::Event::PaymentClaimable */ public static constructor_peel_payment_onion(msg: UpdateAddHTLC, node_signer: NodeSigner, logger: Logger, cur_height: number, accept_mpp_keysend: boolean, allow_skimmed_fees: boolean): Result_PendingHTLCInfoInboundHTLCErrZ { - const ret: bigint = bindings.peel_payment_onion(msg == null ? 0n : CommonBase.get_ptr_of(msg), CommonBase.get_ptr_of(node_signer), CommonBase.get_ptr_of(logger), cur_height, accept_mpp_keysend, allow_skimmed_fees); + const ret: bigint = bindings.peel_payment_onion(CommonBase.get_ptr_of(msg), CommonBase.get_ptr_of(node_signer), CommonBase.get_ptr_of(logger), cur_height, accept_mpp_keysend, allow_skimmed_fees); const ret_hu_conv: Result_PendingHTLCInfoInboundHTLCErrZ = Result_PendingHTLCInfoInboundHTLCErrZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, msg); CommonBase.add_ref_from(ret_hu_conv, node_signer); @@ -736,7 +851,7 @@ export class UtilMethods extends CommonBase { * [`ChannelManager`]. */ public static constructor_provided_init_features(config: UserConfig): InitFeatures { - const ret: bigint = bindings.provided_init_features(config == null ? 0n : CommonBase.get_ptr_of(config)); + const ret: bigint = bindings.provided_init_features(CommonBase.get_ptr_of(config)); const ret_hu_conv: InitFeatures = new InitFeatures(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, config); @@ -747,7 +862,7 @@ export class UtilMethods extends CommonBase { * Read a C2Tuple_ThirtyTwoBytesChannelManagerZ from a byte array, created by C2Tuple_ThirtyTwoBytesChannelManagerZ_write */ public static constructor_C2Tuple_ThirtyTwoBytesChannelManagerZ_read(ser: Uint8Array, arg_entropy_source: EntropySource, arg_node_signer: NodeSigner, arg_signer_provider: SignerProvider, arg_fee_estimator: FeeEstimator, arg_chain_monitor: Watch, arg_tx_broadcaster: BroadcasterInterface, arg_router: Router, arg_logger: Logger, arg_default_config: UserConfig, arg_channel_monitors: ChannelMonitor[]): Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ { - const ret: bigint = bindings.C2Tuple_ThirtyTwoBytesChannelManagerZ_read(bindings.encodeUint8Array(ser), bindings.ChannelManagerReadArgs_new(CommonBase.get_ptr_of(arg_entropy_source), CommonBase.get_ptr_of(arg_node_signer), CommonBase.get_ptr_of(arg_signer_provider), CommonBase.get_ptr_of(arg_fee_estimator), CommonBase.get_ptr_of(arg_chain_monitor), CommonBase.get_ptr_of(arg_tx_broadcaster), CommonBase.get_ptr_of(arg_router), CommonBase.get_ptr_of(arg_logger), arg_default_config == null ? 0n : CommonBase.get_ptr_of(arg_default_config), bindings.encodeUint64Array(arg_channel_monitors.map(arg_channel_monitors_conv_16 => arg_channel_monitors_conv_16 == null ? 0n : CommonBase.get_ptr_of(arg_channel_monitors_conv_16))))); + const ret: bigint = bindings.C2Tuple_ThirtyTwoBytesChannelManagerZ_read(bindings.encodeUint8Array(ser), bindings.ChannelManagerReadArgs_new(CommonBase.get_ptr_of(arg_entropy_source), CommonBase.get_ptr_of(arg_node_signer), CommonBase.get_ptr_of(arg_signer_provider), CommonBase.get_ptr_of(arg_fee_estimator), CommonBase.get_ptr_of(arg_chain_monitor), CommonBase.get_ptr_of(arg_tx_broadcaster), CommonBase.get_ptr_of(arg_router), CommonBase.get_ptr_of(arg_logger), CommonBase.get_ptr_of(arg_default_config), bindings.encodeUint64Array(arg_channel_monitors.map(arg_channel_monitors_conv_16 => CommonBase.get_ptr_of(arg_channel_monitors_conv_16))))); const ret_hu_conv: Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ = Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, arg_entropy_source); CommonBase.add_ref_from(ret_hu_conv, arg_node_signer); @@ -762,6 +877,17 @@ export class UtilMethods extends CommonBase { return ret_hu_conv; } + /** + * Adds a tweak to a public key to derive a new public key. + * + * May panic if `tweak` is not the output of a SHA-256 hash. + */ + public static constructor_add_public_key_tweak(base_point: Uint8Array, tweak: Uint8Array): Uint8Array { + const ret: number = bindings.add_public_key_tweak(bindings.encodeUint8Array(bindings.check_arr_len(base_point, 33)), bindings.encodeUint8Array(bindings.check_arr_len(tweak, 32))); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; + } + /** * Equivalent to [`crate::ln::channelmanager::ChannelManager::create_inbound_payment`], but no * `ChannelManager` is required. Useful for generating invoices for [phantom node payments] without @@ -780,7 +906,7 @@ export class UtilMethods extends CommonBase { * [`NodeSigner::get_inbound_payment_key_material`]: crate::sign::NodeSigner::get_inbound_payment_key_material */ public static constructor_create(keys: ExpandedKey, min_value_msat: Option_u64Z, invoice_expiry_delta_secs: number, entropy_source: EntropySource, current_time: bigint, min_final_cltv_expiry_delta: Option_u16Z): Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ { - const ret: bigint = bindings.create(keys == null ? 0n : CommonBase.get_ptr_of(keys), CommonBase.get_ptr_of(min_value_msat), invoice_expiry_delta_secs, CommonBase.get_ptr_of(entropy_source), current_time, CommonBase.get_ptr_of(min_final_cltv_expiry_delta)); + const ret: bigint = bindings.create(CommonBase.get_ptr_of(keys), CommonBase.get_ptr_of(min_value_msat), invoice_expiry_delta_secs, CommonBase.get_ptr_of(entropy_source), current_time, CommonBase.get_ptr_of(min_final_cltv_expiry_delta)); const ret_hu_conv: Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ = Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, keys); CommonBase.add_ref_from(ret_hu_conv, min_value_msat); @@ -802,7 +928,7 @@ export class UtilMethods extends CommonBase { * [phantom node payments]: crate::sign::PhantomKeysManager */ public static constructor_create_from_hash(keys: ExpandedKey, min_value_msat: Option_u64Z, payment_hash: Uint8Array, invoice_expiry_delta_secs: number, current_time: bigint, min_final_cltv_expiry_delta: Option_u16Z): Result_ThirtyTwoBytesNoneZ { - const ret: bigint = bindings.create_from_hash(keys == null ? 0n : CommonBase.get_ptr_of(keys), CommonBase.get_ptr_of(min_value_msat), bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), invoice_expiry_delta_secs, current_time, CommonBase.get_ptr_of(min_final_cltv_expiry_delta)); + const ret: bigint = bindings.create_from_hash(CommonBase.get_ptr_of(keys), CommonBase.get_ptr_of(min_value_msat), bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), invoice_expiry_delta_secs, current_time, CommonBase.get_ptr_of(min_final_cltv_expiry_delta)); const ret_hu_conv: Result_ThirtyTwoBytesNoneZ = Result_ThirtyTwoBytesNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, keys); CommonBase.add_ref_from(ret_hu_conv, min_value_msat); @@ -825,7 +951,7 @@ export class UtilMethods extends CommonBase { * Gets the weight for an HTLC-Success transaction. */ public static constructor_htlc_success_tx_weight(channel_type_features: ChannelTypeFeatures): bigint { - const ret: bigint = bindings.htlc_success_tx_weight(channel_type_features == null ? 0n : CommonBase.get_ptr_of(channel_type_features)); + const ret: bigint = bindings.htlc_success_tx_weight(CommonBase.get_ptr_of(channel_type_features)); return ret; } @@ -833,7 +959,7 @@ export class UtilMethods extends CommonBase { * Gets the weight for an HTLC-Timeout transaction. */ public static constructor_htlc_timeout_tx_weight(channel_type_features: ChannelTypeFeatures): bigint { - const ret: bigint = bindings.htlc_timeout_tx_weight(channel_type_features == null ? 0n : CommonBase.get_ptr_of(channel_type_features)); + const ret: bigint = bindings.htlc_timeout_tx_weight(CommonBase.get_ptr_of(channel_type_features)); return ret; } @@ -860,7 +986,7 @@ export class UtilMethods extends CommonBase { * Build a closing transaction */ public static constructor_build_closing_transaction(to_holder_value_sat: bigint, to_counterparty_value_sat: bigint, to_holder_script: Uint8Array, to_counterparty_script: Uint8Array, funding_outpoint: OutPoint): Uint8Array { - const ret: number = bindings.build_closing_transaction(to_holder_value_sat, to_counterparty_value_sat, bindings.encodeUint8Array(to_holder_script), bindings.encodeUint8Array(to_counterparty_script), funding_outpoint == null ? 0n : CommonBase.get_ptr_of(funding_outpoint)); + const ret: number = bindings.build_closing_transaction(to_holder_value_sat, to_counterparty_value_sat, bindings.encodeUint8Array(to_holder_script), bindings.encodeUint8Array(to_counterparty_script), CommonBase.get_ptr_of(funding_outpoint)); const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); return ret_conv; } @@ -895,7 +1021,7 @@ export class UtilMethods extends CommonBase { * Encumbering a `to_holder` output on a commitment transaction or 2nd-stage HTLC transactions. */ public static constructor_get_revokeable_redeemscript(revocation_key: RevocationKey, contest_delay: number, broadcaster_delayed_payment_key: DelayedPaymentKey): Uint8Array { - const ret: number = bindings.get_revokeable_redeemscript(revocation_key == null ? 0n : CommonBase.get_ptr_of(revocation_key), contest_delay, broadcaster_delayed_payment_key == null ? 0n : CommonBase.get_ptr_of(broadcaster_delayed_payment_key)); + const ret: number = bindings.get_revokeable_redeemscript(CommonBase.get_ptr_of(revocation_key), contest_delay, CommonBase.get_ptr_of(broadcaster_delayed_payment_key)); const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); return ret_conv; } @@ -905,7 +1031,7 @@ export class UtilMethods extends CommonBase { * the channel type. */ public static constructor_get_counterparty_payment_script(channel_type_features: ChannelTypeFeatures, payment_key: Uint8Array): Uint8Array { - const ret: number = bindings.get_counterparty_payment_script(channel_type_features == null ? 0n : CommonBase.get_ptr_of(channel_type_features), bindings.encodeUint8Array(bindings.check_arr_len(payment_key, 33))); + const ret: number = bindings.get_counterparty_payment_script(CommonBase.get_ptr_of(channel_type_features), bindings.encodeUint8Array(bindings.check_arr_len(payment_key, 33))); const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); return ret_conv; } @@ -915,7 +1041,7 @@ export class UtilMethods extends CommonBase { * does not need to have its previous_output_index filled. */ public static constructor_get_htlc_redeemscript(htlc: HTLCOutputInCommitment, channel_type_features: ChannelTypeFeatures, keys: TxCreationKeys): Uint8Array { - const ret: number = bindings.get_htlc_redeemscript(htlc == null ? 0n : CommonBase.get_ptr_of(htlc), channel_type_features == null ? 0n : CommonBase.get_ptr_of(channel_type_features), keys == null ? 0n : CommonBase.get_ptr_of(keys)); + const ret: number = bindings.get_htlc_redeemscript(CommonBase.get_ptr_of(htlc), CommonBase.get_ptr_of(channel_type_features), CommonBase.get_ptr_of(keys)); const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); return ret_conv; } @@ -940,7 +1066,7 @@ export class UtilMethods extends CommonBase { * commitment transaction). */ public static constructor_build_htlc_transaction(commitment_txid: Uint8Array, feerate_per_kw: number, contest_delay: number, htlc: HTLCOutputInCommitment, channel_type_features: ChannelTypeFeatures, broadcaster_delayed_payment_key: DelayedPaymentKey, revocation_key: RevocationKey): Uint8Array { - const ret: number = bindings.build_htlc_transaction(bindings.encodeUint8Array(bindings.check_arr_len(commitment_txid, 32)), feerate_per_kw, contest_delay, htlc == null ? 0n : CommonBase.get_ptr_of(htlc), channel_type_features == null ? 0n : CommonBase.get_ptr_of(channel_type_features), broadcaster_delayed_payment_key == null ? 0n : CommonBase.get_ptr_of(broadcaster_delayed_payment_key), revocation_key == null ? 0n : CommonBase.get_ptr_of(revocation_key)); + const ret: number = bindings.build_htlc_transaction(bindings.encodeUint8Array(bindings.check_arr_len(commitment_txid, 32)), feerate_per_kw, contest_delay, CommonBase.get_ptr_of(htlc), CommonBase.get_ptr_of(channel_type_features), CommonBase.get_ptr_of(broadcaster_delayed_payment_key), CommonBase.get_ptr_of(revocation_key)); const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); return ret_conv; } @@ -949,7 +1075,7 @@ export class UtilMethods extends CommonBase { * Returns the witness required to satisfy and spend a HTLC input. */ public static constructor_build_htlc_input_witness(local_sig: Uint8Array, remote_sig: Uint8Array, preimage: Option_ThirtyTwoBytesZ, redeem_script: Uint8Array, channel_type_features: ChannelTypeFeatures): Uint8Array { - const ret: number = bindings.build_htlc_input_witness(bindings.encodeUint8Array(bindings.check_arr_len(local_sig, 64)), bindings.encodeUint8Array(bindings.check_arr_len(remote_sig, 64)), CommonBase.get_ptr_of(preimage), bindings.encodeUint8Array(redeem_script), channel_type_features == null ? 0n : CommonBase.get_ptr_of(channel_type_features)); + const ret: number = bindings.build_htlc_input_witness(bindings.encodeUint8Array(bindings.check_arr_len(local_sig, 64)), bindings.encodeUint8Array(bindings.check_arr_len(remote_sig, 64)), CommonBase.get_ptr_of(preimage), bindings.encodeUint8Array(redeem_script), CommonBase.get_ptr_of(channel_type_features)); const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); return ret_conv; } @@ -1014,7 +1140,7 @@ export class UtilMethods extends CommonBase { * Returns an error if it is invalid. */ public static constructor_verify_node_announcement(msg: NodeAnnouncement): Result_NoneLightningErrorZ { - const ret: bigint = bindings.verify_node_announcement(msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.verify_node_announcement(CommonBase.get_ptr_of(msg)); const ret_hu_conv: Result_NoneLightningErrorZ = Result_NoneLightningErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, msg); return ret_hu_conv; @@ -1026,7 +1152,7 @@ export class UtilMethods extends CommonBase { * Returns an error if one of the signatures is invalid. */ public static constructor_verify_channel_announcement(msg: ChannelAnnouncement): Result_NoneLightningErrorZ { - const ret: bigint = bindings.verify_channel_announcement(msg == null ? 0n : CommonBase.get_ptr_of(msg)); + const ret: bigint = bindings.verify_channel_announcement(CommonBase.get_ptr_of(msg)); const ret_hu_conv: Result_NoneLightningErrorZ = Result_NoneLightningErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, msg); return ret_hu_conv; @@ -1062,7 +1188,7 @@ export class UtilMethods extends CommonBase { * Note that first_hops (or a relevant inner pointer) may be NULL or all-0s to represent None */ public static constructor_find_route(our_node_pubkey: Uint8Array, route_params: RouteParameters, network_graph: NetworkGraph, first_hops: ChannelDetails[]|null, logger: Logger, scorer: ScoreLookUp, score_params: ProbabilisticScoringFeeParameters, random_seed_bytes: Uint8Array): Result_RouteLightningErrorZ { - const ret: bigint = bindings.find_route(bindings.encodeUint8Array(bindings.check_arr_len(our_node_pubkey, 33)), route_params == null ? 0n : CommonBase.get_ptr_of(route_params), network_graph == null ? 0n : CommonBase.get_ptr_of(network_graph), bindings.encodeUint64Array(first_hops != null ? first_hops.map(first_hops_conv_16 => first_hops_conv_16 == null ? 0n : CommonBase.get_ptr_of(first_hops_conv_16)) : null), CommonBase.get_ptr_of(logger), CommonBase.get_ptr_of(scorer), score_params == null ? 0n : CommonBase.get_ptr_of(score_params), bindings.encodeUint8Array(bindings.check_arr_len(random_seed_bytes, 32))); + const ret: bigint = bindings.find_route(bindings.encodeUint8Array(bindings.check_arr_len(our_node_pubkey, 33)), CommonBase.get_ptr_of(route_params), CommonBase.get_ptr_of(network_graph), bindings.encodeUint64Array(first_hops != null ? first_hops.map(first_hops_conv_16 => CommonBase.get_ptr_of(first_hops_conv_16)) : null), CommonBase.get_ptr_of(logger), CommonBase.get_ptr_of(scorer), CommonBase.get_ptr_of(score_params), bindings.encodeUint8Array(bindings.check_arr_len(random_seed_bytes, 32))); const ret_hu_conv: Result_RouteLightningErrorZ = Result_RouteLightningErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, route_params); CommonBase.add_ref_from(ret_hu_conv, network_graph); @@ -1080,7 +1206,7 @@ export class UtilMethods extends CommonBase { * Re-uses logic from `find_route`, so the restrictions described there also apply here. */ public static constructor_build_route_from_hops(our_node_pubkey: Uint8Array, hops: Uint8Array[], route_params: RouteParameters, network_graph: NetworkGraph, logger: Logger, random_seed_bytes: Uint8Array): Result_RouteLightningErrorZ { - const ret: bigint = bindings.build_route_from_hops(bindings.encodeUint8Array(bindings.check_arr_len(our_node_pubkey, 33)), bindings.encodeUint32Array(hops.map(hops_conv_12 => bindings.encodeUint8Array(bindings.check_arr_len(hops_conv_12, 33)))), route_params == null ? 0n : CommonBase.get_ptr_of(route_params), network_graph == null ? 0n : CommonBase.get_ptr_of(network_graph), CommonBase.get_ptr_of(logger), bindings.encodeUint8Array(bindings.check_arr_len(random_seed_bytes, 32))); + const ret: bigint = bindings.build_route_from_hops(bindings.encodeUint8Array(bindings.check_arr_len(our_node_pubkey, 33)), bindings.encodeUint32Array(hops.map(hops_conv_12 => bindings.encodeUint8Array(bindings.check_arr_len(hops_conv_12, 33)))), CommonBase.get_ptr_of(route_params), CommonBase.get_ptr_of(network_graph), CommonBase.get_ptr_of(logger), bindings.encodeUint8Array(bindings.check_arr_len(random_seed_bytes, 32))); const ret_hu_conv: Result_RouteLightningErrorZ = Result_RouteLightningErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, route_params); CommonBase.add_ref_from(ret_hu_conv, network_graph); @@ -1114,20 +1240,50 @@ export class UtilMethods extends CommonBase { return ret_hu_conv; } + /** + * Creates an [`OnionMessage`] with the given `contents` for sending to the destination of + * `path`, first calling [`Destination::resolve`] on `path.destination` with the given + * [`ReadOnlyNetworkGraph`]. + * + * Returns the node id of the peer to send the message to, the message itself, and any addresses + * needed to connect to the first node. + * + * Note that reply_path (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public static constructor_create_onion_message_resolving_destination(entropy_source: EntropySource, node_signer: NodeSigner, node_id_lookup: NodeIdLookUp, network_graph: ReadOnlyNetworkGraph, path: OnionMessagePath, contents: OnionMessageContents, reply_path: BlindedPath|null): Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ { + const ret: bigint = bindings.create_onion_message_resolving_destination(CommonBase.get_ptr_of(entropy_source), CommonBase.get_ptr_of(node_signer), CommonBase.get_ptr_of(node_id_lookup), CommonBase.get_ptr_of(network_graph), CommonBase.get_ptr_of(path), CommonBase.get_ptr_of(contents), reply_path == null ? 0n : CommonBase.get_ptr_of(reply_path)); + const ret_hu_conv: Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ = Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, entropy_source); + CommonBase.add_ref_from(ret_hu_conv, node_signer); + CommonBase.add_ref_from(ret_hu_conv, node_id_lookup); + CommonBase.add_ref_from(ret_hu_conv, network_graph); + CommonBase.add_ref_from(ret_hu_conv, path); + CommonBase.add_ref_from(ret_hu_conv, contents); + CommonBase.add_ref_from(ret_hu_conv, reply_path); + return ret_hu_conv; + } + /** * Creates an [`OnionMessage`] with the given `contents` for sending to the destination of * `path`. * * Returns the node id of the peer to send the message to, the message itself, and any addresses - * need to connect to the first node. + * needed to connect to the first node. + * + * Returns [`SendError::UnresolvedIntroductionNode`] if: + * - `destination` contains a blinded path with an [`IntroductionNode::DirectedShortChannelId`], + * - unless it can be resolved by [`NodeIdLookUp::next_node_id`]. + * Use [`create_onion_message_resolving_destination`] instead to resolve the introduction node + * first with a [`ReadOnlyNetworkGraph`]. * * Note that reply_path (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public static constructor_create_onion_message(entropy_source: EntropySource, node_signer: NodeSigner, path: OnionMessagePath, contents: OnionMessageContents, reply_path: BlindedPath|null): Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ { - const ret: bigint = bindings.create_onion_message(CommonBase.get_ptr_of(entropy_source), CommonBase.get_ptr_of(node_signer), path == null ? 0n : CommonBase.get_ptr_of(path), CommonBase.get_ptr_of(contents), reply_path == null ? 0n : CommonBase.get_ptr_of(reply_path)); + public static constructor_create_onion_message(entropy_source: EntropySource, node_signer: NodeSigner, node_id_lookup: NodeIdLookUp, path: OnionMessagePath, contents: OnionMessageContents, reply_path: BlindedPath|null): Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ { + const ret: bigint = bindings.create_onion_message(CommonBase.get_ptr_of(entropy_source), CommonBase.get_ptr_of(node_signer), CommonBase.get_ptr_of(node_id_lookup), CommonBase.get_ptr_of(path), CommonBase.get_ptr_of(contents), reply_path == null ? 0n : CommonBase.get_ptr_of(reply_path)); const ret_hu_conv: Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ = Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, entropy_source); CommonBase.add_ref_from(ret_hu_conv, node_signer); + CommonBase.add_ref_from(ret_hu_conv, node_id_lookup); CommonBase.add_ref_from(ret_hu_conv, path); CommonBase.add_ref_from(ret_hu_conv, contents); CommonBase.add_ref_from(ret_hu_conv, reply_path); @@ -1141,7 +1297,7 @@ export class UtilMethods extends CommonBase { * receiver. */ public static constructor_peel_onion_message(msg: OnionMessage, node_signer: NodeSigner, logger: Logger, custom_handler: CustomOnionMessageHandler): Result_PeeledOnionNoneZ { - const ret: bigint = bindings.peel_onion_message(msg == null ? 0n : CommonBase.get_ptr_of(msg), CommonBase.get_ptr_of(node_signer), CommonBase.get_ptr_of(logger), CommonBase.get_ptr_of(custom_handler)); + const ret: bigint = bindings.peel_onion_message(CommonBase.get_ptr_of(msg), CommonBase.get_ptr_of(node_signer), CommonBase.get_ptr_of(logger), CommonBase.get_ptr_of(custom_handler)); const ret_hu_conv: Result_PeeledOnionNoneZ = Result_PeeledOnionNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, msg); CommonBase.add_ref_from(ret_hu_conv, node_signer); @@ -1161,8 +1317,8 @@ export class UtilMethods extends CommonBase { /** * Create a one-hop blinded path for a payment. */ - public static constructor_BlindedPath_one_hop_for_payment(payee_node_id: Uint8Array, payee_tlvs: ReceiveTlvs, entropy_source: EntropySource): Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ { - const ret: bigint = bindings.BlindedPath_one_hop_for_payment(bindings.encodeUint8Array(bindings.check_arr_len(payee_node_id, 33)), payee_tlvs == null ? 0n : CommonBase.get_ptr_of(payee_tlvs), CommonBase.get_ptr_of(entropy_source)); + public static constructor_BlindedPath_one_hop_for_payment(payee_node_id: Uint8Array, payee_tlvs: ReceiveTlvs, min_final_cltv_expiry_delta: number, entropy_source: EntropySource): Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ { + const ret: bigint = bindings.BlindedPath_one_hop_for_payment(bindings.encodeUint8Array(bindings.check_arr_len(payee_node_id, 33)), CommonBase.get_ptr_of(payee_tlvs), min_final_cltv_expiry_delta, CommonBase.get_ptr_of(entropy_source)); const ret_hu_conv: Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ = Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, payee_tlvs); CommonBase.add_ref_from(ret_hu_conv, entropy_source); @@ -1179,8 +1335,8 @@ export class UtilMethods extends CommonBase { * * [`ForwardTlvs`]: crate::blinded_path::payment::ForwardTlvs */ - public static constructor_BlindedPath_new_for_payment(intermediate_nodes: ForwardNode[], payee_node_id: Uint8Array, payee_tlvs: ReceiveTlvs, htlc_maximum_msat: bigint, entropy_source: EntropySource): Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ { - const ret: bigint = bindings.BlindedPath_new_for_payment(bindings.encodeUint64Array(intermediate_nodes.map(intermediate_nodes_conv_13 => intermediate_nodes_conv_13 == null ? 0n : CommonBase.get_ptr_of(intermediate_nodes_conv_13))), bindings.encodeUint8Array(bindings.check_arr_len(payee_node_id, 33)), payee_tlvs == null ? 0n : CommonBase.get_ptr_of(payee_tlvs), htlc_maximum_msat, CommonBase.get_ptr_of(entropy_source)); + public static constructor_BlindedPath_new_for_payment(intermediate_nodes: ForwardNode[], payee_node_id: Uint8Array, payee_tlvs: ReceiveTlvs, htlc_maximum_msat: bigint, min_final_cltv_expiry_delta: number, entropy_source: EntropySource): Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ { + const ret: bigint = bindings.BlindedPath_new_for_payment(bindings.encodeUint64Array(intermediate_nodes.map(intermediate_nodes_conv_13 => CommonBase.get_ptr_of(intermediate_nodes_conv_13))), bindings.encodeUint8Array(bindings.check_arr_len(payee_node_id, 33)), CommonBase.get_ptr_of(payee_tlvs), htlc_maximum_msat, min_final_cltv_expiry_delta, CommonBase.get_ptr_of(entropy_source)); const ret_hu_conv: Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ = Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.constr_from_ptr(ret); intermediate_nodes.forEach((intermediate_nodes_conv_13: ForwardNode) => { CommonBase.add_ref_from(ret_hu_conv, intermediate_nodes_conv_13); }); CommonBase.add_ref_from(ret_hu_conv, payee_tlvs); @@ -1239,7 +1395,7 @@ export class UtilMethods extends CommonBase { * [`ChannelManager::send_preflight_probes`]: lightning::ln::channelmanager::ChannelManager::send_preflight_probes */ public static constructor_payment_parameters_from_zero_amount_invoice(invoice: Bolt11Invoice, amount_msat: bigint): Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ { - const ret: bigint = bindings.payment_parameters_from_zero_amount_invoice(invoice == null ? 0n : CommonBase.get_ptr_of(invoice), amount_msat); + const ret: bigint = bindings.payment_parameters_from_zero_amount_invoice(CommonBase.get_ptr_of(invoice), amount_msat); const ret_hu_conv: Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ = Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, invoice); return ret_hu_conv; @@ -1259,7 +1415,7 @@ export class UtilMethods extends CommonBase { * [`ChannelManager::send_preflight_probes`]: lightning::ln::channelmanager::ChannelManager::send_preflight_probes */ public static constructor_payment_parameters_from_invoice(invoice: Bolt11Invoice): Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ { - const ret: bigint = bindings.payment_parameters_from_invoice(invoice == null ? 0n : CommonBase.get_ptr_of(invoice)); + const ret: bigint = bindings.payment_parameters_from_invoice(CommonBase.get_ptr_of(invoice)); const ret_hu_conv: Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ = Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, invoice); return ret_hu_conv; @@ -1308,7 +1464,7 @@ export class UtilMethods extends CommonBase { * available and the current time is supplied by the caller. */ public static constructor_create_phantom_invoice(amt_msat: Option_u64Z, payment_hash: Option_ThirtyTwoBytesZ, description: string, invoice_expiry_delta_secs: number, phantom_route_hints: PhantomRouteHints[], entropy_source: EntropySource, node_signer: NodeSigner, logger: Logger, network: Currency, min_final_cltv_expiry_delta: Option_u16Z, duration_since_epoch: bigint): Result_Bolt11InvoiceSignOrCreationErrorZ { - const ret: bigint = bindings.create_phantom_invoice(CommonBase.get_ptr_of(amt_msat), CommonBase.get_ptr_of(payment_hash), bindings.encodeString(description), invoice_expiry_delta_secs, bindings.encodeUint64Array(phantom_route_hints.map(phantom_route_hints_conv_19 => phantom_route_hints_conv_19 == null ? 0n : CommonBase.get_ptr_of(phantom_route_hints_conv_19))), CommonBase.get_ptr_of(entropy_source), CommonBase.get_ptr_of(node_signer), CommonBase.get_ptr_of(logger), network, CommonBase.get_ptr_of(min_final_cltv_expiry_delta), duration_since_epoch); + const ret: bigint = bindings.create_phantom_invoice(CommonBase.get_ptr_of(amt_msat), CommonBase.get_ptr_of(payment_hash), bindings.encodeString(description), invoice_expiry_delta_secs, bindings.encodeUint64Array(phantom_route_hints.map(phantom_route_hints_conv_19 => CommonBase.get_ptr_of(phantom_route_hints_conv_19))), CommonBase.get_ptr_of(entropy_source), CommonBase.get_ptr_of(node_signer), CommonBase.get_ptr_of(logger), network, CommonBase.get_ptr_of(min_final_cltv_expiry_delta), duration_since_epoch); const ret_hu_conv: Result_Bolt11InvoiceSignOrCreationErrorZ = Result_Bolt11InvoiceSignOrCreationErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, amt_msat); CommonBase.add_ref_from(ret_hu_conv, payment_hash); @@ -1361,7 +1517,7 @@ export class UtilMethods extends CommonBase { * available and the current time is supplied by the caller. */ public static constructor_create_phantom_invoice_with_description_hash(amt_msat: Option_u64Z, payment_hash: Option_ThirtyTwoBytesZ, invoice_expiry_delta_secs: number, description_hash: Sha256, phantom_route_hints: PhantomRouteHints[], entropy_source: EntropySource, node_signer: NodeSigner, logger: Logger, network: Currency, min_final_cltv_expiry_delta: Option_u16Z, duration_since_epoch: bigint): Result_Bolt11InvoiceSignOrCreationErrorZ { - const ret: bigint = bindings.create_phantom_invoice_with_description_hash(CommonBase.get_ptr_of(amt_msat), CommonBase.get_ptr_of(payment_hash), invoice_expiry_delta_secs, description_hash == null ? 0n : CommonBase.get_ptr_of(description_hash), bindings.encodeUint64Array(phantom_route_hints.map(phantom_route_hints_conv_19 => phantom_route_hints_conv_19 == null ? 0n : CommonBase.get_ptr_of(phantom_route_hints_conv_19))), CommonBase.get_ptr_of(entropy_source), CommonBase.get_ptr_of(node_signer), CommonBase.get_ptr_of(logger), network, CommonBase.get_ptr_of(min_final_cltv_expiry_delta), duration_since_epoch); + const ret: bigint = bindings.create_phantom_invoice_with_description_hash(CommonBase.get_ptr_of(amt_msat), CommonBase.get_ptr_of(payment_hash), invoice_expiry_delta_secs, CommonBase.get_ptr_of(description_hash), bindings.encodeUint64Array(phantom_route_hints.map(phantom_route_hints_conv_19 => CommonBase.get_ptr_of(phantom_route_hints_conv_19))), CommonBase.get_ptr_of(entropy_source), CommonBase.get_ptr_of(node_signer), CommonBase.get_ptr_of(logger), network, CommonBase.get_ptr_of(min_final_cltv_expiry_delta), duration_since_epoch); const ret_hu_conv: Result_Bolt11InvoiceSignOrCreationErrorZ = Result_Bolt11InvoiceSignOrCreationErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, amt_msat); CommonBase.add_ref_from(ret_hu_conv, payment_hash); @@ -1380,7 +1536,7 @@ export class UtilMethods extends CommonBase { * available and the current time is supplied by the caller. */ public static constructor_create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(channelmanager: ChannelManager, node_signer: NodeSigner, logger: Logger, network: Currency, amt_msat: Option_u64Z, description_hash: Sha256, duration_since_epoch: bigint, invoice_expiry_delta_secs: number, min_final_cltv_expiry_delta: Option_u16Z): Result_Bolt11InvoiceSignOrCreationErrorZ { - const ret: bigint = bindings.create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(channelmanager == null ? 0n : CommonBase.get_ptr_of(channelmanager), CommonBase.get_ptr_of(node_signer), CommonBase.get_ptr_of(logger), network, CommonBase.get_ptr_of(amt_msat), description_hash == null ? 0n : CommonBase.get_ptr_of(description_hash), duration_since_epoch, invoice_expiry_delta_secs, CommonBase.get_ptr_of(min_final_cltv_expiry_delta)); + const ret: bigint = bindings.create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(CommonBase.get_ptr_of(channelmanager), CommonBase.get_ptr_of(node_signer), CommonBase.get_ptr_of(logger), network, CommonBase.get_ptr_of(amt_msat), CommonBase.get_ptr_of(description_hash), duration_since_epoch, invoice_expiry_delta_secs, CommonBase.get_ptr_of(min_final_cltv_expiry_delta)); const ret_hu_conv: Result_Bolt11InvoiceSignOrCreationErrorZ = Result_Bolt11InvoiceSignOrCreationErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, channelmanager); CommonBase.add_ref_from(ret_hu_conv, node_signer); @@ -1397,7 +1553,7 @@ export class UtilMethods extends CommonBase { * available and the current time is supplied by the caller. */ public static constructor_create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager: ChannelManager, node_signer: NodeSigner, logger: Logger, network: Currency, amt_msat: Option_u64Z, description: string, duration_since_epoch: bigint, invoice_expiry_delta_secs: number, min_final_cltv_expiry_delta: Option_u16Z): Result_Bolt11InvoiceSignOrCreationErrorZ { - const ret: bigint = bindings.create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager == null ? 0n : CommonBase.get_ptr_of(channelmanager), CommonBase.get_ptr_of(node_signer), CommonBase.get_ptr_of(logger), network, CommonBase.get_ptr_of(amt_msat), bindings.encodeString(description), duration_since_epoch, invoice_expiry_delta_secs, CommonBase.get_ptr_of(min_final_cltv_expiry_delta)); + const ret: bigint = bindings.create_invoice_from_channelmanager_and_duration_since_epoch(CommonBase.get_ptr_of(channelmanager), CommonBase.get_ptr_of(node_signer), CommonBase.get_ptr_of(logger), network, CommonBase.get_ptr_of(amt_msat), bindings.encodeString(description), duration_since_epoch, invoice_expiry_delta_secs, CommonBase.get_ptr_of(min_final_cltv_expiry_delta)); const ret_hu_conv: Result_Bolt11InvoiceSignOrCreationErrorZ = Result_Bolt11InvoiceSignOrCreationErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, channelmanager); CommonBase.add_ref_from(ret_hu_conv, node_signer); @@ -1414,7 +1570,7 @@ export class UtilMethods extends CommonBase { * the payment hash is also involved outside the scope of lightning. */ public static constructor_create_invoice_from_channelmanager_and_duration_since_epoch_with_payment_hash(channelmanager: ChannelManager, node_signer: NodeSigner, logger: Logger, network: Currency, amt_msat: Option_u64Z, description: string, duration_since_epoch: bigint, invoice_expiry_delta_secs: number, payment_hash: Uint8Array, min_final_cltv_expiry_delta: Option_u16Z): Result_Bolt11InvoiceSignOrCreationErrorZ { - const ret: bigint = bindings.create_invoice_from_channelmanager_and_duration_since_epoch_with_payment_hash(channelmanager == null ? 0n : CommonBase.get_ptr_of(channelmanager), CommonBase.get_ptr_of(node_signer), CommonBase.get_ptr_of(logger), network, CommonBase.get_ptr_of(amt_msat), bindings.encodeString(description), duration_since_epoch, invoice_expiry_delta_secs, bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), CommonBase.get_ptr_of(min_final_cltv_expiry_delta)); + const ret: bigint = bindings.create_invoice_from_channelmanager_and_duration_since_epoch_with_payment_hash(CommonBase.get_ptr_of(channelmanager), CommonBase.get_ptr_of(node_signer), CommonBase.get_ptr_of(logger), network, CommonBase.get_ptr_of(amt_msat), bindings.encodeString(description), duration_since_epoch, invoice_expiry_delta_secs, bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), CommonBase.get_ptr_of(min_final_cltv_expiry_delta)); const ret_hu_conv: Result_Bolt11InvoiceSignOrCreationErrorZ = Result_Bolt11InvoiceSignOrCreationErrorZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, channelmanager); CommonBase.add_ref_from(ret_hu_conv, node_signer); diff --git a/ts/structs/Utxo.mts b/ts/structs/Utxo.mts index d776c03c..c6b30b21 100644 --- a/ts/structs/Utxo.mts +++ b/ts/structs/Utxo.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -620,7 +685,7 @@ export class Utxo extends CommonBase { * The unique identifier of the output. */ public set_outpoint(val: OutPoint): void { - bindings.Utxo_set_outpoint(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.Utxo_set_outpoint(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -663,7 +728,7 @@ export class Utxo extends CommonBase { * Constructs a new Utxo given each field */ public static constructor_new(outpoint_arg: OutPoint, output_arg: TxOut, satisfaction_weight_arg: bigint): Utxo { - const ret: bigint = bindings.Utxo_new(outpoint_arg == null ? 0n : CommonBase.get_ptr_of(outpoint_arg), CommonBase.get_ptr_of(output_arg), satisfaction_weight_arg); + const ret: bigint = bindings.Utxo_new(CommonBase.get_ptr_of(outpoint_arg), CommonBase.get_ptr_of(output_arg), satisfaction_weight_arg); const ret_hu_conv: Utxo = new Utxo(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, outpoint_arg); @@ -699,7 +764,7 @@ export class Utxo extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: Utxo): boolean { - const ret: boolean = bindings.Utxo_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.Utxo_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } @@ -708,7 +773,7 @@ export class Utxo extends CommonBase { * Returns a `Utxo` with the `satisfaction_weight` estimate for a legacy P2PKH output. */ public static constructor_new_p2pkh(outpoint: OutPoint, value: bigint, pubkey_hash: Uint8Array): Utxo { - const ret: bigint = bindings.Utxo_new_p2pkh(outpoint == null ? 0n : CommonBase.get_ptr_of(outpoint), value, bindings.encodeUint8Array(bindings.check_arr_len(pubkey_hash, 20))); + const ret: bigint = bindings.Utxo_new_p2pkh(CommonBase.get_ptr_of(outpoint), value, bindings.encodeUint8Array(bindings.check_arr_len(pubkey_hash, 20))); const ret_hu_conv: Utxo = new Utxo(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, outpoint); diff --git a/ts/structs/UtxoFuture.mts b/ts/structs/UtxoFuture.mts index eff8c972..69ef146d 100644 --- a/ts/structs/UtxoFuture.mts +++ b/ts/structs/UtxoFuture.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -646,7 +711,7 @@ export class UtxoFuture extends CommonBase { * [`PeerManager::process_events`]: crate::ln::peer_handler::PeerManager::process_events */ public resolve_without_forwarding(graph: NetworkGraph, result: Result_TxOutUtxoLookupErrorZ): void { - bindings.UtxoFuture_resolve_without_forwarding(this.ptr, graph == null ? 0n : CommonBase.get_ptr_of(graph), result != null ? CommonBase.get_ptr_of(result) : 0n); + bindings.UtxoFuture_resolve_without_forwarding(this.ptr, CommonBase.get_ptr_of(graph), CommonBase.get_ptr_of(result)); CommonBase.add_ref_from(this, graph); } @@ -664,7 +729,7 @@ export class UtxoFuture extends CommonBase { * [`PeerManager::process_events`]: crate::ln::peer_handler::PeerManager::process_events */ public resolve(graph: NetworkGraph, gossip: P2PGossipSync, result: Result_TxOutUtxoLookupErrorZ): void { - bindings.UtxoFuture_resolve(this.ptr, graph == null ? 0n : CommonBase.get_ptr_of(graph), gossip == null ? 0n : CommonBase.get_ptr_of(gossip), result != null ? CommonBase.get_ptr_of(result) : 0n); + bindings.UtxoFuture_resolve(this.ptr, CommonBase.get_ptr_of(graph), CommonBase.get_ptr_of(gossip), CommonBase.get_ptr_of(result)); CommonBase.add_ref_from(this, graph); CommonBase.add_ref_from(this, gossip); } diff --git a/ts/structs/UtxoLookup.mts b/ts/structs/UtxoLookup.mts index a491d32a..f38e6013 100644 --- a/ts/structs/UtxoLookup.mts +++ b/ts/structs/UtxoLookup.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -636,7 +701,7 @@ export class UtxoLookup extends CommonBase { get_utxo (chain_hash: number, short_channel_id: bigint): bigint { const chain_hash_conv: Uint8Array = bindings.decodeUint8Array(chain_hash); const ret: UtxoResult = arg.get_utxo(chain_hash_conv, short_channel_id); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); CommonBase.add_ref_from(impl_holder.held, ret); return result; }, diff --git a/ts/structs/UtxoResult.mts b/ts/structs/UtxoResult.mts index 13e1bf92..d0fd2ea0 100644 --- a/ts/structs/UtxoResult.mts +++ b/ts/structs/UtxoResult.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -632,7 +697,7 @@ export class UtxoResult extends CommonBase { * Utility method to constructs a new Sync-variant UtxoResult */ public static constructor_sync(a: Result_TxOutUtxoLookupErrorZ): UtxoResult { - const ret: bigint = bindings.UtxoResult_sync(a != null ? CommonBase.get_ptr_of(a) : 0n); + const ret: bigint = bindings.UtxoResult_sync(CommonBase.get_ptr_of(a)); const ret_hu_conv: UtxoResult = UtxoResult.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); return ret_hu_conv; @@ -642,7 +707,7 @@ export class UtxoResult extends CommonBase { * Utility method to constructs a new Async-variant UtxoResult */ public static constructor_async(a: UtxoFuture): UtxoResult { - const ret: bigint = bindings.UtxoResult_async(a == null ? 0n : CommonBase.get_ptr_of(a)); + const ret: bigint = bindings.UtxoResult_async(CommonBase.get_ptr_of(a)); const ret_hu_conv: UtxoResult = UtxoResult.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, a); diff --git a/ts/structs/VerifiedInvoiceRequest.mts b/ts/structs/VerifiedInvoiceRequest.mts index 0c5bbfcb..e10f4cf7 100644 --- a/ts/structs/VerifiedInvoiceRequest.mts +++ b/ts/structs/VerifiedInvoiceRequest.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,8 +356,17 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -606,6 +671,24 @@ export class VerifiedInvoiceRequest extends CommonBase { super(ptr, bindings.VerifiedInvoiceRequest_free); } + /** + * The identifier of the [`Offer`] for which the [`InvoiceRequest`] was made. + */ + public get_offer_id(): OfferId { + const ret: bigint = bindings.VerifiedInvoiceRequest_get_offer_id(this.ptr); + const ret_hu_conv: OfferId = new OfferId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; + } + + /** + * The identifier of the [`Offer`] for which the [`InvoiceRequest`] was made. + */ + public set_offer_id(val: OfferId): void { + bindings.VerifiedInvoiceRequest_set_offer_id(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); + } + /** * Keys used for signing a [`Bolt12Invoice`] if they can be derived. * @@ -684,12 +767,10 @@ export class VerifiedInvoiceRequest extends CommonBase { /** * The minimum amount required for a successful payment of a single item. - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public amount(): Amount { + public amount(): Option_AmountZ { const ret: bigint = bindings.VerifiedInvoiceRequest_amount(this.ptr); - const ret_hu_conv: Amount = new Amount(null, ret); + const ret_hu_conv: Option_AmountZ = Option_AmountZ.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, this); return ret_hu_conv; } @@ -697,6 +778,8 @@ export class VerifiedInvoiceRequest extends CommonBase { /** * A complete description of the purpose of the payment. Intended to be displayed to the user * but with the caveat that it has not been verified in any way. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ public description(): PrintableString { const ret: bigint = bindings.VerifiedInvoiceRequest_description(this.ptr); @@ -763,13 +846,15 @@ export class VerifiedInvoiceRequest extends CommonBase { */ public supported_quantity(): Quantity { const ret: bigint = bindings.VerifiedInvoiceRequest_supported_quantity(this.ptr); - const ret_hu_conv: Quantity = new Quantity(null, ret); + const ret_hu_conv: Quantity = Quantity.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, this); return ret_hu_conv; } /** * The public key used by the recipient to sign invoices. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ public signing_pubkey(): Uint8Array { const ret: number = bindings.VerifiedInvoiceRequest_signing_pubkey(this.ptr); @@ -853,4 +938,50 @@ export class VerifiedInvoiceRequest extends CommonBase { return ret_hu_conv; } + /** + * Creates an [`InvoiceBuilder`] for the request with the given required fields. + * + * Unless [`InvoiceBuilder::relative_expiry`] is set, the invoice will expire two hours after + * `created_at`, which is used to set [`Bolt12Invoice::created_at`]. Useful for `no-std` builds + * where [`std::time::SystemTime`] is not available. + * + * The caller is expected to remember the preimage of `payment_hash` in order to claim a payment + * for the invoice. + * + * The `payment_paths` parameter is useful for maintaining the payment recipient's privacy. It + * must contain one or more elements ordered from most-preferred to least-preferred, if there's + * a preference. Note, however, that any privacy is lost if a public node id was used for + * [`Offer::signing_pubkey`]. + * + * Errors if the request contains unknown required features. + * + * # Note + * + * If the originating [`Offer`] was created using [`OfferBuilder::deriving_signing_pubkey`], + * then use [`InvoiceRequest::verify`] and [`VerifiedInvoiceRequest`] methods instead. + * + * [`Bolt12Invoice::created_at`]: crate::offers::invoice::Bolt12Invoice::created_at + * [`OfferBuilder::deriving_signing_pubkey`]: crate::offers::offer::OfferBuilder::deriving_signing_pubkey + */ + public respond_with_no_std(payment_paths: TwoTuple_BlindedPayInfoBlindedPathZ[], payment_hash: Uint8Array, created_at: bigint): Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ { + const ret: bigint = bindings.VerifiedInvoiceRequest_respond_with_no_std(this.ptr, bindings.encodeUint64Array(payment_paths.map(payment_paths_conv_37 => CommonBase.get_ptr_of(payment_paths_conv_37))), bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), created_at); + const ret_hu_conv: Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ = Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Creates an [`InvoiceBuilder`] for the request using the given required fields and that uses + * derived signing keys from the originating [`Offer`] to sign the [`Bolt12Invoice`]. Must use + * the same [`ExpandedKey`] as the one used to create the offer. + * + * See [`InvoiceRequest::respond_with_no_std`] for further details. + * + * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice + */ + public respond_using_derived_keys_no_std(payment_paths: TwoTuple_BlindedPayInfoBlindedPathZ[], payment_hash: Uint8Array, created_at: bigint): Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ { + const ret: bigint = bindings.VerifiedInvoiceRequest_respond_using_derived_keys_no_std(this.ptr, bindings.encodeUint64Array(payment_paths.map(payment_paths_conv_37 => CommonBase.get_ptr_of(payment_paths_conv_37))), bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), created_at); + const ret_hu_conv: Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ = Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + } diff --git a/ts/structs/Wallet.mts b/ts/structs/Wallet.mts index 72e93960..fe610c05 100644 --- a/ts/structs/Wallet.mts +++ b/ts/structs/Wallet.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -560,10 +620,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -578,8 +640,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/WalletSource.mts b/ts/structs/WalletSource.mts index 693ec523..eb28fe58 100644 --- a/ts/structs/WalletSource.mts +++ b/ts/structs/WalletSource.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -527,15 +583,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -544,11 +600,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -560,10 +620,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -578,8 +640,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { Wallet } from '../structs/Wallet.mjs'; @@ -644,18 +709,18 @@ export class WalletSource extends CommonBase { let structImplementation = { list_confirmed_utxos (): bigint { const ret: Result_CVec_UtxoZNoneZ = arg.list_confirmed_utxos(); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, get_change_script (): bigint { const ret: Result_CVec_u8ZNoneZ = arg.get_change_script(); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, sign_psbt (psbt: number): bigint { const psbt_conv: Uint8Array = bindings.decodeUint8Array(psbt); const ret: Result_TransactionNoneZ = arg.sign_psbt(psbt_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, } as bindings.LDKWalletSource; diff --git a/ts/structs/WarningMessage.mts b/ts/structs/WarningMessage.mts index a17d4787..c3648863 100644 --- a/ts/structs/WarningMessage.mts +++ b/ts/structs/WarningMessage.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -612,10 +677,11 @@ export class WarningMessage extends CommonBase { * * All-0s indicates a warning unrelated to a specific channel. */ - public get_channel_id(): Uint8Array { - const ret: number = bindings.WarningMessage_get_channel_id(this.ptr); - const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); - return ret_conv; + public get_channel_id(): ChannelId { + const ret: bigint = bindings.WarningMessage_get_channel_id(this.ptr); + const ret_hu_conv: ChannelId = new ChannelId(null, ret); + CommonBase.add_ref_from(ret_hu_conv, this); + return ret_hu_conv; } /** @@ -623,8 +689,9 @@ export class WarningMessage extends CommonBase { * * All-0s indicates a warning unrelated to a specific channel. */ - public set_channel_id(val: Uint8Array): void { - bindings.WarningMessage_set_channel_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); + public set_channel_id(val: ChannelId): void { + bindings.WarningMessage_set_channel_id(this.ptr, CommonBase.get_ptr_of(val)); + CommonBase.add_ref_from(this, val); } /** @@ -654,10 +721,11 @@ export class WarningMessage extends CommonBase { /** * Constructs a new WarningMessage given each field */ - public static constructor_new(channel_id_arg: Uint8Array, data_arg: string): WarningMessage { - const ret: bigint = bindings.WarningMessage_new(bindings.encodeUint8Array(bindings.check_arr_len(channel_id_arg, 32)), bindings.encodeString(data_arg)); + public static constructor_new(channel_id_arg: ChannelId, data_arg: string): WarningMessage { + const ret: bigint = bindings.WarningMessage_new(CommonBase.get_ptr_of(channel_id_arg), bindings.encodeString(data_arg)); const ret_hu_conv: WarningMessage = new WarningMessage(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, channel_id_arg); return ret_hu_conv; } @@ -690,7 +758,7 @@ export class WarningMessage extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: WarningMessage): boolean { - const ret: boolean = bindings.WarningMessage_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.WarningMessage_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/Watch.mts b/ts/structs/Watch.mts index 33307c18..9ec26b22 100644 --- a/ts/structs/Watch.mts +++ b/ts/structs/Watch.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -644,7 +709,7 @@ export interface WatchInterface { * For details on asynchronous [`ChannelMonitor`] updating and returning * [`MonitorEvent::Completed`] here, see [`ChannelMonitorUpdateStatus::InProgress`]. */ - release_pending_monitor_events(): ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[]; + release_pending_monitor_events(): FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ[]; } class LDKWatchHolder { @@ -686,7 +751,7 @@ export class Watch extends CommonBase { const monitor_hu_conv: ChannelMonitor = new ChannelMonitor(null, monitor); CommonBase.add_ref_from(monitor_hu_conv, this); const ret: Result_ChannelMonitorUpdateStatusNoneZ = arg.watch_channel(funding_txo_hu_conv, monitor_hu_conv); - const result: bigint = ret == null ? 0n : ret.clone_ptr(); + const result: bigint = ret.clone_ptr(); return result; }, update_channel (funding_txo: bigint, update: bigint): ChannelMonitorUpdateStatus { @@ -697,8 +762,8 @@ export class Watch extends CommonBase { return ret; }, release_pending_monitor_events (): number { - const ret: ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[] = arg.release_pending_monitor_events(); - const result: number = bindings.encodeUint64Array(ret.map(ret_conv_49 => ret_conv_49 == null ? 0n : ret_conv_49.clone_ptr())); + const ret: FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ[] = arg.release_pending_monitor_events(); + const result: number = bindings.encodeUint64Array(ret.map(ret_conv_57 => ret_conv_57.clone_ptr())); return result; }, } as bindings.LDKWatch; @@ -728,7 +793,7 @@ export class Watch extends CommonBase { * [`block_disconnected`]: channelmonitor::ChannelMonitor::block_disconnected */ public watch_channel(funding_txo: OutPoint, monitor: ChannelMonitor): Result_ChannelMonitorUpdateStatusNoneZ { - const ret: bigint = bindings.Watch_watch_channel(this.ptr, funding_txo == null ? 0n : CommonBase.get_ptr_of(funding_txo), monitor == null ? 0n : CommonBase.get_ptr_of(monitor)); + const ret: bigint = bindings.Watch_watch_channel(this.ptr, CommonBase.get_ptr_of(funding_txo), CommonBase.get_ptr_of(monitor)); const ret_hu_conv: Result_ChannelMonitorUpdateStatusNoneZ = Result_ChannelMonitorUpdateStatusNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, funding_txo); CommonBase.add_ref_from(this, monitor); @@ -753,7 +818,7 @@ export class Watch extends CommonBase { * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager */ public update_channel(funding_txo: OutPoint, update: ChannelMonitorUpdate): ChannelMonitorUpdateStatus { - const ret: ChannelMonitorUpdateStatus = bindings.Watch_update_channel(this.ptr, funding_txo == null ? 0n : CommonBase.get_ptr_of(funding_txo), update == null ? 0n : CommonBase.get_ptr_of(update)); + const ret: ChannelMonitorUpdateStatus = bindings.Watch_update_channel(this.ptr, CommonBase.get_ptr_of(funding_txo), CommonBase.get_ptr_of(update)); CommonBase.add_ref_from(this, funding_txo); CommonBase.add_ref_from(this, update); return ret; @@ -770,18 +835,18 @@ export class Watch extends CommonBase { * For details on asynchronous [`ChannelMonitor`] updating and returning * [`MonitorEvent::Completed`] here, see [`ChannelMonitorUpdateStatus::InProgress`]. */ - public release_pending_monitor_events(): ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[] { + public release_pending_monitor_events(): FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ[] { const ret: number = bindings.Watch_release_pending_monitor_events(this.ptr); - const ret_conv_49_len: number = bindings.getArrayLength(ret); - const ret_conv_49_arr: ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[] = new Array(ret_conv_49_len).fill(null); - for (var x = 0; x < ret_conv_49_len; x++) { - const ret_conv_49: bigint = bindings.getU64ArrayElem(ret, x); - const ret_conv_49_hu_conv: ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ = new ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ(null, ret_conv_49); - CommonBase.add_ref_from(ret_conv_49_hu_conv, this); - ret_conv_49_arr[x] = ret_conv_49_hu_conv; + const ret_conv_57_len: number = bindings.getArrayLength(ret); + const ret_conv_57_arr: FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ[] = new Array(ret_conv_57_len).fill(null); + for (var f = 0; f < ret_conv_57_len; f++) { + const ret_conv_57: bigint = bindings.getU64ArrayElem(ret, f); + const ret_conv_57_hu_conv: FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ = new FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ(null, ret_conv_57); + CommonBase.add_ref_from(ret_conv_57_hu_conv, this); + ret_conv_57_arr[f] = ret_conv_57_hu_conv; } bindings.freeWasmMemory(ret) - return ret_conv_49_arr; + return ret_conv_57_arr; } } diff --git a/ts/structs/WatchedOutput.mts b/ts/structs/WatchedOutput.mts index 79d95d5e..5e14c4f3 100644 --- a/ts/structs/WatchedOutput.mts +++ b/ts/structs/WatchedOutput.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,19 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,13 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -647,7 +712,7 @@ export class WatchedOutput extends CommonBase { * Outpoint identifying the transaction output. */ public set_outpoint(val: OutPoint): void { - bindings.WatchedOutput_set_outpoint(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val)); + bindings.WatchedOutput_set_outpoint(this.ptr, CommonBase.get_ptr_of(val)); CommonBase.add_ref_from(this, val); } @@ -671,7 +736,7 @@ export class WatchedOutput extends CommonBase { * Constructs a new WatchedOutput given each field */ public static constructor_new(block_hash_arg: Option_ThirtyTwoBytesZ, outpoint_arg: OutPoint, script_pubkey_arg: Uint8Array): WatchedOutput { - const ret: bigint = bindings.WatchedOutput_new(CommonBase.get_ptr_of(block_hash_arg), outpoint_arg == null ? 0n : CommonBase.get_ptr_of(outpoint_arg), bindings.encodeUint8Array(script_pubkey_arg)); + const ret: bigint = bindings.WatchedOutput_new(CommonBase.get_ptr_of(block_hash_arg), CommonBase.get_ptr_of(outpoint_arg), bindings.encodeUint8Array(script_pubkey_arg)); const ret_hu_conv: WatchedOutput = new WatchedOutput(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); CommonBase.add_ref_from(ret_hu_conv, block_hash_arg); @@ -700,7 +765,7 @@ export class WatchedOutput extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: WatchedOutput): boolean { - const ret: boolean = bindings.WatchedOutput_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); + const ret: boolean = bindings.WatchedOutput_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } diff --git a/ts/structs/WitnessProgram.mts b/ts/structs/WitnessProgram.mts index 90dbeae7..2a89608e 100644 --- a/ts/structs/WitnessProgram.mts +++ b/ts/structs/WitnessProgram.mts @@ -10,6 +10,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -18,13 +19,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -39,7 +44,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -61,8 +75,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; diff --git a/ts/structs/WriteableEcdsaChannelSigner.mts b/ts/structs/WriteableEcdsaChannelSigner.mts index ccf8efb0..0a75fcd1 100644 --- a/ts/structs/WriteableEcdsaChannelSigner.mts +++ b/ts/structs/WriteableEcdsaChannelSigner.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -83,7 +97,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -124,12 +137,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -144,10 +162,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -213,6 +239,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -222,10 +249,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -236,12 +268,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -269,7 +302,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -311,7 +343,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -323,9 +355,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -426,8 +467,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -468,17 +507,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -490,6 +535,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -502,14 +561,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; @@ -643,7 +708,7 @@ export class WriteableEcdsaChannelSigner extends CommonBase { } as bindings.LDKWriteableEcdsaChannelSigner; const ecdsaChannelSigner = EcdsaChannelSigner.new_impl(ecdsaChannelSigner_impl, channelSigner_impl, pubkeys); const channelSigner = ChannelSigner.new_impl(channelSigner_impl, pubkeys); - const ptr_idx: [bigint, number] = bindings.LDKWriteableEcdsaChannelSigner_new(structImplementation, ecdsaChannelSigner.instance_idx!, channelSigner.instance_idx!, pubkeys == null ? 0n : pubkeys.clone_ptr()); + const ptr_idx: [bigint, number] = bindings.LDKWriteableEcdsaChannelSigner_new(structImplementation, ecdsaChannelSigner.instance_idx!, channelSigner.instance_idx!, pubkeys.clone_ptr()); impl_holder.held = new WriteableEcdsaChannelSigner(null, ptr_idx[0]); impl_holder.held.instance_idx = ptr_idx[1]; diff --git a/ts/structs/WriteableScore.mts b/ts/structs/WriteableScore.mts index 3ba7cd14..ba7dee14 100644 --- a/ts/structs/WriteableScore.mts +++ b/ts/structs/WriteableScore.mts @@ -11,6 +11,7 @@ import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs'; import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs'; import { CreationError } from '../enums/CreationError.mjs'; import { Currency } from '../enums/Currency.mjs'; +import { Direction } from '../enums/Direction.mjs'; import { HTLCClaim } from '../enums/HTLCClaim.mjs'; import { IOError } from '../enums/IOError.mjs'; import { Level } from '../enums/Level.mjs'; @@ -19,13 +20,17 @@ import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs'; import { Recipient } from '../enums/Recipient.mjs'; import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs'; import { Secp256k1Error } from '../enums/Secp256k1Error.mjs'; +import { ShortChannelIdError } from '../enums/ShortChannelIdError.mjs'; import { SiPrefix } from '../enums/SiPrefix.mjs'; import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs'; import { UtxoLookupError } from '../enums/UtxoLookupError.mjs'; import { Bech32Error } from '../structs/Bech32Error.mjs'; +import { RefundMaybeWithDerivedMetadataBuilder } from '../structs/RefundMaybeWithDerivedMetadataBuilder.mjs'; +import { Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; +import { Refund } from '../structs/Refund.mjs'; +import { Result_RefundBolt12SemanticErrorZ } from '../structs/Result_RefundBolt12SemanticErrorZ.mjs'; import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { BlindedPath } from '../structs/BlindedPath.mjs'; -import { Refund } from '../structs/Refund.mjs'; import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs'; import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs'; import { Retry } from '../structs/Retry.mjs'; @@ -40,7 +45,16 @@ import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs'; import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs'; import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs'; import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs'; +import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; +import { Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; +import { Result_Bolt12InvoiceBolt12SemanticErrorZ } from '../structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.mjs'; +import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs'; +import { Amount } from '../structs/Amount.mjs'; +import { Option_AmountZ } from '../structs/Option_AmountZ.mjs'; +import { Quantity } from '../structs/Quantity.mjs'; +import { Option_QuantityZ } from '../structs/Option_QuantityZ.mjs'; import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs'; import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs'; import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs'; @@ -62,8 +76,8 @@ import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs'; import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs'; import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs'; import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs'; -import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs'; import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs'; +import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs'; import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs'; import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs'; @@ -84,7 +98,6 @@ import { Option_boolZ } from '../structs/Option_boolZ.mjs'; import { Result_WitnessNoneZ } from '../structs/Result_WitnessNoneZ.mjs'; import { InMemorySigner } from '../structs/InMemorySigner.mjs'; import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs'; -import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs'; import { ChannelDetails } from '../structs/ChannelDetails.mjs'; import { Route } from '../structs/Route.mjs'; import { LightningError } from '../structs/LightningError.mjs'; @@ -125,12 +138,17 @@ import { Logger, LoggerInterface } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs'; import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs'; +import { BestBlock } from '../structs/BestBlock.mjs'; +import { Result_BestBlockDecodeErrorZ } from '../structs/Result_BestBlockDecodeErrorZ.mjs'; import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs'; import { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ } from '../structs/ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.mjs'; import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; +import { UntrustedString } from '../structs/UntrustedString.mjs'; +import { ClosureReason } from '../structs/ClosureReason.mjs'; +import { ChannelId } from '../structs/ChannelId.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; +import { FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ } from '../structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.mjs'; import { InitFeatures } from '../structs/InitFeatures.mjs'; import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs'; import { ChannelFeatures } from '../structs/ChannelFeatures.mjs'; @@ -145,10 +163,18 @@ import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs'; import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs'; import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs'; import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs'; +import { OfferId } from '../structs/OfferId.mjs'; +import { Result_OfferIdDecodeErrorZ } from '../structs/Result_OfferIdDecodeErrorZ.mjs'; +import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Offer } from '../structs/Offer.mjs'; +import { Result_OfferBolt12SemanticErrorZ } from '../structs/Result_OfferBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithDerivedPayerIdBuilder } from '../structs/InvoiceRequestWithDerivedPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestWithExplicitPayerIdBuilder } from '../structs/InvoiceRequestWithExplicitPayerIdBuilder.mjs'; +import { Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.mjs'; import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs'; -import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs'; +import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -214,6 +240,7 @@ import { NodeInfo } from '../structs/NodeInfo.mjs'; import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs'; import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs'; import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs'; +import { Result_u64ShortChannelIdErrorZ } from '../structs/Result_u64ShortChannelIdErrorZ.mjs'; import { PendingHTLCInfo } from '../structs/PendingHTLCInfo.mjs'; import { InboundHTLCErr } from '../structs/InboundHTLCErr.mjs'; import { Result_PendingHTLCInfoInboundHTLCErrZ } from '../structs/Result_PendingHTLCInfoInboundHTLCErrZ.mjs'; @@ -223,10 +250,15 @@ import { Input } from '../structs/Input.mjs'; import { CoinSelection } from '../structs/CoinSelection.mjs'; import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs'; import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs'; +import { UnknownPaymentContext } from '../structs/UnknownPaymentContext.mjs'; +import { Bolt12OfferContext } from '../structs/Bolt12OfferContext.mjs'; +import { Bolt12RefundContext } from '../structs/Bolt12RefundContext.mjs'; +import { PaymentContext } from '../structs/PaymentContext.mjs'; +import { Option_PaymentContextZ } from '../structs/Option_PaymentContextZ.mjs'; import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs'; import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs'; import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs'; -import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; +import { Result_ChannelIdAPIErrorZ } from '../structs/Result_ChannelIdAPIErrorZ.mjs'; import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs'; import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs'; import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs'; @@ -237,12 +269,13 @@ import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_Thir import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs'; import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs'; -import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs'; +import { TwoTuple_ChannelIdPublicKeyZ } from '../structs/TwoTuple_ChannelIdPublicKeyZ.mjs'; +import { OfferWithDerivedMetadataBuilder } from '../structs/OfferWithDerivedMetadataBuilder.mjs'; +import { Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ } from '../structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.mjs'; import { Option_StrZ } from '../structs/Option_StrZ.mjs'; -import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs'; +import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs'; import { InvoiceRequest } from '../structs/InvoiceRequest.mjs'; -import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs'; import { InvoiceError } from '../structs/InvoiceError.mjs'; import { OffersMessage } from '../structs/OffersMessage.mjs'; import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs'; @@ -270,7 +303,6 @@ import { Watch, WatchInterface } from '../structs/Watch.mjs'; import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs'; import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs'; import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs'; -import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs'; import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs'; import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs'; import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs'; @@ -312,7 +344,7 @@ import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../struc import { Option_TypeZ } from '../structs/Option_TypeZ.mjs'; import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs'; import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs'; -import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs'; +import { PeerDetails } from '../structs/PeerDetails.mjs'; import { PeerHandleError } from '../structs/PeerHandleError.mjs'; import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs'; import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs'; @@ -324,9 +356,18 @@ import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs'; import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs'; import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs'; import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs'; +import { Result_UnsignedInvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.mjs'; +import { Result_InvoiceRequestBolt12SemanticErrorZ } from '../structs/Result_InvoiceRequestBolt12SemanticErrorZ.mjs'; import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs'; +import { InvoiceWithExplicitSigningPubkeyBuilder } from '../structs/InvoiceWithExplicitSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs'; import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs'; +import { InvoiceWithDerivedSigningPubkeyBuilder } from '../structs/InvoiceWithDerivedSigningPubkeyBuilder.mjs'; +import { Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ } from '../structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.mjs'; +import { InvoiceRequestFields } from '../structs/InvoiceRequestFields.mjs'; +import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs'; +import { Option_ECDSASignatureZ } from '../structs/Option_ECDSASignatureZ.mjs'; import { Option_i64Z } from '../structs/Option_i64Z.mjs'; import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs'; import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs'; @@ -427,8 +468,6 @@ import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDec import { PathFailure } from '../structs/PathFailure.mjs'; import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs'; import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs'; -import { UntrustedString } from '../structs/UntrustedString.mjs'; -import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; import { HTLCDestination } from '../structs/HTLCDestination.mjs'; @@ -469,17 +508,23 @@ import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mj import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs'; import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs'; import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs'; +import { Result_ChannelIdDecodeErrorZ } from '../structs/Result_ChannelIdDecodeErrorZ.mjs'; import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs'; import { PaymentRelay } from '../structs/PaymentRelay.mjs'; import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs'; import { PaymentConstraints } from '../structs/PaymentConstraints.mjs'; import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs'; +import { Result_PaymentContextDecodeErrorZ } from '../structs/Result_PaymentContextDecodeErrorZ.mjs'; +import { Result_UnknownPaymentContextDecodeErrorZ } from '../structs/Result_UnknownPaymentContextDecodeErrorZ.mjs'; +import { Result_Bolt12OfferContextDecodeErrorZ } from '../structs/Result_Bolt12OfferContextDecodeErrorZ.mjs'; +import { Result_Bolt12RefundContextDecodeErrorZ } from '../structs/Result_Bolt12RefundContextDecodeErrorZ.mjs'; +import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs'; import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs'; -import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs'; import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs'; import { SendError } from '../structs/SendError.mjs'; import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs'; +import { NextMessageHop } from '../structs/NextMessageHop.mjs'; import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs'; import { PeeledOnion } from '../structs/PeeledOnion.mjs'; import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs'; @@ -491,6 +536,20 @@ import { ForwardNode } from '../structs/ForwardNode.mjs'; import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs'; import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs'; import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs'; +import { TrackedSpendableOutput } from '../structs/TrackedSpendableOutput.mjs'; +import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs'; +import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs'; +import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; +import { WatchedOutput } from '../structs/WatchedOutput.mjs'; +import { Filter, FilterInterface } from '../structs/Filter.mjs'; +import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; +import { ChangeDestinationSource, ChangeDestinationSourceInterface } from '../structs/ChangeDestinationSource.mjs'; +import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; +import { OutputSpender, OutputSpenderInterface } from '../structs/OutputSpender.mjs'; +import { OutputSweeper } from '../structs/OutputSweeper.mjs'; +import { Result_OutputSweeperDecodeErrorZ } from '../structs/Result_OutputSweeperDecodeErrorZ.mjs'; +import { TwoTuple_BestBlockOutputSweeperZ } from '../structs/TwoTuple_BestBlockOutputSweeperZ.mjs'; +import { Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ } from '../structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs'; import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs'; @@ -503,14 +562,11 @@ import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs'; import { RevocationKey } from '../structs/RevocationKey.mjs'; import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs'; -import { WatchedOutput } from '../structs/WatchedOutput.mjs'; -import { Filter, FilterInterface } from '../structs/Filter.mjs'; -import { Option_FilterZ } from '../structs/Option_FilterZ.mjs'; import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs'; import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs'; +import { TwoTuple_OutPointChannelIdZ } from '../structs/TwoTuple_OutPointChannelIdZ.mjs'; import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs'; import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs'; -import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs'; import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs'; import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs'; import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs'; @@ -526,15 +582,15 @@ import { Persister, PersisterInterface } from '../structs/Persister.mjs'; import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs'; import { Persist, PersistInterface } from '../structs/Persist.mjs'; import { PrintableString } from '../structs/PrintableString.mjs'; +import { Listen, ListenInterface } from '../structs/Listen.mjs'; +import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; +import { SpendingDelay } from '../structs/SpendingDelay.mjs'; import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs'; import { Future } from '../structs/Future.mjs'; import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs'; import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs'; import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs'; import { UserConfig } from '../structs/UserConfig.mjs'; -import { BestBlock } from '../structs/BestBlock.mjs'; -import { Listen, ListenInterface } from '../structs/Listen.mjs'; -import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs'; import { ChainMonitor } from '../structs/ChainMonitor.mjs'; import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs'; import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs'; @@ -543,11 +599,15 @@ import { ChainParameters } from '../structs/ChainParameters.mjs'; import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs'; import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs'; import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs'; +import { NodeIdLookUp, NodeIdLookUpInterface } from '../structs/NodeIdLookUp.mjs'; import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs'; import { ExpandedKey } from '../structs/ExpandedKey.mjs'; +import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs'; +import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs'; import { Packet } from '../structs/Packet.mjs'; import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs'; import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs'; +import { TrampolineOnionPacket } from '../structs/TrampolineOnionPacket.mjs'; import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs'; import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs'; import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs'; @@ -559,10 +619,12 @@ import { PeerManager } from '../structs/PeerManager.mjs'; import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs'; import { OfferFeatures } from '../structs/OfferFeatures.mjs'; import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs'; -import { Amount } from '../structs/Amount.mjs'; -import { Quantity } from '../structs/Quantity.mjs'; +import { OfferWithExplicitMetadataBuilder } from '../structs/OfferWithExplicitMetadataBuilder.mjs'; +import { SignBolt12InvoiceFn, SignBolt12InvoiceFnInterface } from '../structs/SignBolt12InvoiceFn.mjs'; import { TaggedHash } from '../structs/TaggedHash.mjs'; import { ErroneousField } from '../structs/ErroneousField.mjs'; +import { SignInvoiceRequestFn, SignInvoiceRequestFnInterface } from '../structs/SignInvoiceRequestFn.mjs'; +import { SignError } from '../structs/SignError.mjs'; import { P2PGossipSync } from '../structs/P2PGossipSync.mjs'; import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs'; import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs'; @@ -577,8 +639,11 @@ import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWr import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs'; import { KeysManager } from '../structs/KeysManager.mjs'; import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs'; +import { RandomBytes } from '../structs/RandomBytes.mjs'; import { OnionMessenger } from '../structs/OnionMessenger.mjs'; import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs'; +import { IntroductionNode } from '../structs/IntroductionNode.mjs'; +import { EmptyNodeIdLookUp } from '../structs/EmptyNodeIdLookUp.mjs'; import { ForwardTlvs } from '../structs/ForwardTlvs.mjs'; import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs'; import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs'; -- 2.30.2 From 12fdbefaac81d5b4be6bb67addd6dcd7c46a182b Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sun, 12 May 2024 20:52:23 +0000 Subject: [PATCH 11/16] [TS] Update tests to LDK 0.0.123 --- node-net/test/test.mts | 4 ++-- ts/test/tests.mts | 46 ++++++++++++++++++++++-------------------- 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/node-net/test/test.mts b/node-net/test/test.mts index b9dac1b6..3d501456 100644 --- a/node-net/test/test.mts +++ b/node-net/test/test.mts @@ -57,7 +57,7 @@ await new Promise(resolve => { // Wait until the peers are connected and have exchanged the initial handshake var timer: ReturnType; timer = setInterval(function() { - if (a_pm.get_peer_node_ids().length == 1 && b_pm.get_peer_node_ids().length == 1) { + if (a_pm.list_peers().length == 1 && b_pm.list_peers().length == 1) { resolve(); clearInterval(timer); } @@ -69,7 +69,7 @@ await new Promise(resolve => { // Wait until A learns the connection is closed from the socket closure var timer: ReturnType; timer = setInterval(function() { - if (a_pm.get_peer_node_ids().length == 0 && b_pm.get_peer_node_ids().length == 0) { + if (a_pm.list_peers().length == 0 && b_pm.list_peers().length == 0) { resolve(); clearInterval(timer); } diff --git a/ts/test/tests.mts b/ts/test/tests.mts index 158d3636..d0728bb2 100644 --- a/ts/test/tests.mts +++ b/ts/test/tests.mts @@ -39,9 +39,9 @@ tests.push(async () => { if (!(read_outpoint instanceof ldk.Result_OutPointDecodeErrorZ_OK)) return false; if (!read_outpoint.res.eq(outpoint)) return false; if (read_outpoint.res.hash() != outpoint.hash()) return false; - const chan_id = read_outpoint.res.to_channel_id(); - if (chan_id.length != 32) return false; - if (chan_id[31] != 4) return false; + const chan_id = ldk.ChannelId.constructor_v1_from_funding_outpoint(read_outpoint.res); + if (chan_id.get_a().length != 32) return false; + if (chan_id.get_a()[31] != 4) return false; return true; }); @@ -51,9 +51,9 @@ tests.push(async () => { if (!(read_outpoint instanceof ldk.Result_OutPointDecodeErrorZ_OK)) return false; if (!read_outpoint.res.eq(outpoint)) return false; if (read_outpoint.res.hash() != outpoint.hash()) return false; - const chan_id = read_outpoint.res.to_channel_id(); - if (chan_id.length != 32) return false; - if (chan_id[31] != 4) return false; + const chan_id = ldk.ChannelId.constructor_v1_from_funding_outpoint(read_outpoint.res); + if (chan_id.get_a().length != 32) return false; + if (chan_id.get_a()[31] != 4) return false; return true; }); @@ -184,13 +184,13 @@ tests.push(async () => { a.chan_man.as_ChannelMessageHandler().peer_connected(b.chan_man.get_our_node_id(), ldk.Init.constructor_new(features, ldk.Option_CVec_ThirtyTwoBytesZZ.constructor_none(), ldk.Option_SocketAddressZ.constructor_none()), false); b.chan_man.as_ChannelMessageHandler().peer_connected(a.chan_man.get_our_node_id(), ldk.Init.constructor_new(features, ldk.Option_CVec_ThirtyTwoBytesZZ.constructor_none(), ldk.Option_SocketAddressZ.constructor_none()), true); - const chan_create_err = a.chan_man.create_channel(b.chan_man.get_our_node_id(), BigInt(0), BigInt(400), BigInt(0), ldk.Option_ThirtyTwoBytesZ.constructor_none(), null); + const chan_create_err = a.chan_man.create_channel(b.chan_man.get_our_node_id(), BigInt(0), BigInt(400), BigInt(0), null, null); if (chan_create_err.is_ok()) return false; - if (!(chan_create_err instanceof ldk.Result_ThirtyTwoBytesAPIErrorZ_Err)) return false; + if (!(chan_create_err instanceof ldk.Result_ChannelIdAPIErrorZ_Err)) return false; if (!(chan_create_err.err instanceof ldk.APIError_APIMisuseError)) return false; if (chan_create_err.err.err != "Channel value must be at least 1000 satoshis. It was 0") return false; - const chan_create_res = a.chan_man.create_channel(b.chan_man.get_our_node_id(), BigInt(1000000), BigInt(400), BigInt(0), ldk.Option_ThirtyTwoBytesZ.constructor_none(), null); + const chan_create_res = a.chan_man.create_channel(b.chan_man.get_our_node_id(), BigInt(1000000), BigInt(400), BigInt(0), null, null); if (!chan_create_res.is_ok()) return false; if (!exchange_messages(a.chan_man, b.chan_man)) return false; @@ -283,17 +283,17 @@ tests.push(async () => { if (!(init_bytes instanceof ldk.Result_CVec_u8ZPeerHandleErrorZ_OK)) return false; assert(pm_b.read_event(sock_b, init_bytes.res) instanceof ldk.Result_boolPeerHandleErrorZ_OK); - assert(pm_a.get_peer_node_ids().length == 0); - assert(pm_b.get_peer_node_ids().length == 0); + assert(pm_a.list_peers().length == 0); + assert(pm_b.list_peers().length == 0); pm_b.process_events(); pm_a.process_events(); pm_b.process_events(); - assert(pm_a.get_peer_node_ids().length == 1); - assert(pm_b.get_peer_node_ids().length == 1); + assert(pm_a.list_peers().length == 1); + assert(pm_b.list_peers().length == 1); - const chan_create_res = a.chan_man.create_channel(b.node_id, BigInt(1000000), BigInt(400), BigInt(0), ldk.Option_ThirtyTwoBytesZ.constructor_none(), ldk.UserConfig.constructor_default()); + const chan_create_res = a.chan_man.create_channel(b.node_id, BigInt(1000000), BigInt(400), BigInt(0), null, ldk.UserConfig.constructor_default()); if (!chan_create_res.is_ok()) return false; if (!update_done) return false; @@ -325,9 +325,10 @@ tests.push(async () => { debug_str(): string { return "Message Contents"; } } as ldk.OnionMessageContentsInterface))); }, - handle_custom_message(msg: ldk.OnionMessageContents) { + handle_custom_message(msg: ldk.OnionMessageContents): ldk.Option_OnionMessageContentsZ { assert(msg.tlv_type() == 9998n); a_handled_msg = true; + return ldk.Option_OnionMessageContentsZ.constructor_none(); }, release_pending_custom_messages(): ldk.ThreeTuple_OnionMessageContentsDestinationBlindedPathZ[] { return []; @@ -338,7 +339,7 @@ tests.push(async () => { .constructor_new(a.net_graph, a.keys_manager.as_EntropySource()).as_MessageRouter(); const underlying_om_a = ldk.OnionMessenger.constructor_new( a.keys_manager.as_EntropySource(), a.keys_manager.as_NodeSigner(), a.logger, - a_msg_router, ignorer.as_OffersMessageHandler(), om_handler_a); + a.chan_man.as_NodeIdLookUp(), a_msg_router, ignorer.as_OffersMessageHandler(), om_handler_a); const om_a = ldk.OnionMessageHandler.new_impl({ handle_onion_message(peer_node_id: Uint8Array, msg: ldk.OnionMessage) { underlying_om_a.as_OnionMessageHandler().handle_onion_message(peer_node_id, msg); @@ -372,9 +373,10 @@ tests.push(async () => { debug_str(): string { return "Message Contents"; } } as ldk.OnionMessageContentsInterface))); }, - handle_custom_message(msg: ldk.OnionMessageContents) { + handle_custom_message(msg: ldk.OnionMessageContents): ldk.Option_OnionMessageContentsZ { assert(msg.tlv_type() == 9999n); b_handled_msg = true; + return ldk.Option_OnionMessageContentsZ.constructor_none(); }, release_pending_custom_messages(): ldk.ThreeTuple_OnionMessageContentsDestinationBlindedPathZ[] { return []; @@ -383,7 +385,7 @@ tests.push(async () => { const msg_router_b = ldk.DefaultMessageRouter .constructor_new(b.net_graph, b.keys_manager.as_EntropySource()).as_MessageRouter(); const om_b = ldk.OnionMessenger.constructor_new(b.keys_manager.as_EntropySource(), b.keys_manager.as_NodeSigner(), - b.logger, msg_router_b, ignorer.as_OffersMessageHandler(), om_handler_b); + b.logger, b.chan_man.as_NodeIdLookUp(), msg_router_b, ignorer.as_OffersMessageHandler(), om_handler_b); const pm_a = ldk.PeerManager.constructor_new(a.chan_man.as_ChannelMessageHandler(), ignorer.as_RoutingMessageHandler(), om_a, ignorer.as_CustomMessageHandler(), 0xdeadbeef, @@ -432,15 +434,15 @@ tests.push(async () => { if (!(init_bytes instanceof ldk.Result_CVec_u8ZPeerHandleErrorZ_OK)) return false; assert(pm_b.read_event(sock_b, init_bytes.res) instanceof ldk.Result_boolPeerHandleErrorZ_OK); - assert(pm_a.get_peer_node_ids().length == 0); - assert(pm_b.get_peer_node_ids().length == 0); + assert(pm_a.list_peers().length == 0); + assert(pm_b.list_peers().length == 0); pm_b.process_events(); pm_a.process_events(); pm_b.process_events(); - assert(pm_a.get_peer_node_ids().length == 1); - assert(pm_b.get_peer_node_ids().length == 1); + assert(pm_a.list_peers().length == 1); + assert(pm_b.list_peers().length == 1); underlying_om_a.send_onion_message( ldk.OnionMessageContents.new_impl({ -- 2.30.2 From 592c64eb658d92e314a2b983cea16cecf3882474 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 13 May 2024 17:31:12 +0000 Subject: [PATCH 12/16] [C#] Update auto-generated bindings to LDK 0.0.123 --- c_sharp/bindings.c | 14150 ++++++++++++---- c_sharp/bindings.c.body | 14150 ++++++++++++---- .../src/org/ldk/enums/Bolt12SemanticError.cs | 4 + .../src/org/ldk/enums/ConfirmationTarget.cs | 13 + c_sharp/src/org/ldk/enums/Direction.cs | 17 + .../src/org/ldk/enums/PaymentFailureReason.cs | 4 + .../src/org/ldk/enums/ShortChannelIdError.cs | 17 + c_sharp/src/org/ldk/impl/bindings.cs | 2913 +++- c_sharp/src/org/ldk/structs/APIError.cs | 4 +- c_sharp/src/org/ldk/structs/AcceptChannel.cs | 329 +- .../src/org/ldk/structs/AcceptChannelV2.cs | 337 +- c_sharp/src/org/ldk/structs/Amount.cs | 67 +- .../src/org/ldk/structs/AnchorDescriptor.cs | 8 +- .../org/ldk/structs/AnnouncementSignatures.cs | 19 +- .../org/ldk/structs/BackgroundProcessor.cs | 4 +- c_sharp/src/org/ldk/structs/Balance.cs | 2 +- c_sharp/src/org/ldk/structs/BestBlock.cs | 96 +- c_sharp/src/org/ldk/structs/BigSize.cs | 2 +- c_sharp/src/org/ldk/structs/BlindedForward.cs | 2 +- c_sharp/src/org/ldk/structs/BlindedHop.cs | 2 +- .../src/org/ldk/structs/BlindedHopFeatures.cs | 4 +- c_sharp/src/org/ldk/structs/BlindedPath.cs | 46 +- c_sharp/src/org/ldk/structs/BlindedPayInfo.cs | 6 +- c_sharp/src/org/ldk/structs/BlindedTail.cs | 6 +- c_sharp/src/org/ldk/structs/Bolt11Invoice.cs | 16 +- .../org/ldk/structs/Bolt11InvoiceFeatures.cs | 38 +- .../org/ldk/structs/Bolt11InvoiceSignature.cs | 2 +- .../src/org/ldk/structs/Bolt11ParseError.cs | 2 +- c_sharp/src/org/ldk/structs/Bolt12Invoice.cs | 28 +- .../org/ldk/structs/Bolt12InvoiceFeatures.cs | 4 +- .../src/org/ldk/structs/Bolt12OfferContext.cs | 147 + .../org/ldk/structs/Bolt12RefundContext.cs | 89 + .../org/ldk/structs/BumpTransactionEvent.cs | 46 +- .../structs/BumpTransactionEventHandler.cs | 2 +- .../src/org/ldk/structs/CandidateRouteHop.cs | 10 +- c_sharp/src/org/ldk/structs/ChainMonitor.cs | 57 +- .../src/org/ldk/structs/ChainParameters.cs | 4 +- .../ldk/structs/ChangeDestinationSource.cs | 76 + .../org/ldk/structs/ChannelAnnouncement.cs | 6 +- c_sharp/src/org/ldk/structs/ChannelConfig.cs | 86 +- .../org/ldk/structs/ChannelCounterparty.cs | 4 +- .../structs/ChannelDerivationParameters.cs | 6 +- c_sharp/src/org/ldk/structs/ChannelDetails.cs | 77 +- .../src/org/ldk/structs/ChannelFeatures.cs | 4 +- c_sharp/src/org/ldk/structs/ChannelId.cs | 224 + c_sharp/src/org/ldk/structs/ChannelInfo.cs | 8 +- c_sharp/src/org/ldk/structs/ChannelManager.cs | 886 +- .../org/ldk/structs/ChannelManagerReadArgs.cs | 4 +- .../org/ldk/structs/ChannelMessageHandler.cs | 130 +- c_sharp/src/org/ldk/structs/ChannelMonitor.cs | 77 +- .../org/ldk/structs/ChannelMonitorUpdate.cs | 34 +- .../src/org/ldk/structs/ChannelPublicKeys.cs | 10 +- c_sharp/src/org/ldk/structs/ChannelReady.cs | 19 +- .../src/org/ldk/structs/ChannelReestablish.cs | 19 +- c_sharp/src/org/ldk/structs/ChannelSigner.cs | 10 +- .../structs/ChannelTransactionParameters.cs | 8 +- .../org/ldk/structs/ChannelTypeFeatures.cs | 4 +- c_sharp/src/org/ldk/structs/ChannelUpdate.cs | 6 +- .../src/org/ldk/structs/ChannelUpdateInfo.cs | 6 +- c_sharp/src/org/ldk/structs/ClaimedHTLC.cs | 19 +- c_sharp/src/org/ldk/structs/ClosingSigned.cs | 19 +- .../org/ldk/structs/ClosingSignedFeeRange.cs | 2 +- .../src/org/ldk/structs/ClosingTransaction.cs | 6 +- c_sharp/src/org/ldk/structs/ClosureReason.cs | 83 +- c_sharp/src/org/ldk/structs/CoinSelection.cs | 4 +- .../org/ldk/structs/CoinSelectionSource.cs | 6 +- .../src/org/ldk/structs/CommitmentSigned.cs | 19 +- .../org/ldk/structs/CommitmentTransaction.cs | 2 +- .../src/org/ldk/structs/CommitmentUpdate.cs | 14 +- .../ldk/structs/CommonAcceptChannelFields.cs | 415 + .../ldk/structs/CommonOpenChannelFields.cs | 478 + c_sharp/src/org/ldk/structs/Confirm.cs | 4 +- ...ounterpartyChannelTransactionParameters.cs | 6 +- .../org/ldk/structs/CustomMessageHandler.cs | 8 +- .../org/ldk/structs/CustomMessageReader.cs | 2 +- .../ldk/structs/CustomOnionMessageHandler.cs | 6 +- c_sharp/src/org/ldk/structs/DecodeError.cs | 19 +- .../org/ldk/structs/DefaultMessageRouter.cs | 2 +- c_sharp/src/org/ldk/structs/DefaultRouter.cs | 2 +- .../ldk/structs/DelayedPaymentBasepoint.cs | 14 +- .../src/org/ldk/structs/DelayedPaymentKey.cs | 4 +- .../structs/DelayedPaymentOutputDescriptor.cs | 46 +- c_sharp/src/org/ldk/structs/Description.cs | 2 +- c_sharp/src/org/ldk/structs/Destination.cs | 41 +- .../org/ldk/structs/DirectedChannelInfo.cs | 28 + .../src/org/ldk/structs/EcdsaChannelSigner.cs | 116 +- .../src/org/ldk/structs/EmptyNodeIdLookUp.cs | 43 + c_sharp/src/org/ldk/structs/ErrorAction.cs | 8 +- c_sharp/src/org/ldk/structs/ErrorMessage.cs | 19 +- c_sharp/src/org/ldk/structs/Event.cs | 228 +- c_sharp/src/org/ldk/structs/ExpiryTime.cs | 2 +- c_sharp/src/org/ldk/structs/Fallback.cs | 2 +- c_sharp/src/org/ldk/structs/FeeEstimator.cs | 4 + c_sharp/src/org/ldk/structs/Filter.cs | 2 +- c_sharp/src/org/ldk/structs/ForwardNode.cs | 4 +- c_sharp/src/org/ldk/structs/ForwardTlvs.cs | 8 +- ...ntChannelIdCVec_MonitorEventZPublicKeyZ.cs | 110 + c_sharp/src/org/ldk/structs/FundingCreated.cs | 19 +- c_sharp/src/org/ldk/structs/FundingSigned.cs | 19 +- c_sharp/src/org/ldk/structs/Future.cs | 22 - c_sharp/src/org/ldk/structs/GossipSync.cs | 4 +- .../org/ldk/structs/GossipTimestampFilter.cs | 2 +- c_sharp/src/org/ldk/structs/GraphSyncError.cs | 2 +- c_sharp/src/org/ldk/structs/HTLCDescriptor.cs | 48 +- .../src/org/ldk/structs/HTLCDestination.cs | 33 +- .../org/ldk/structs/HTLCOutputInCommitment.cs | 2 +- c_sharp/src/org/ldk/structs/HTLCUpdate.cs | 2 +- .../structs/HolderCommitmentTransaction.cs | 2 +- c_sharp/src/org/ldk/structs/Hostname.cs | 2 +- c_sharp/src/org/ldk/structs/HtlcBasepoint.cs | 14 +- c_sharp/src/org/ldk/structs/HtlcKey.cs | 4 +- c_sharp/src/org/ldk/structs/InFlightHtlcs.cs | 6 +- c_sharp/src/org/ldk/structs/InMemorySigner.cs | 4 +- c_sharp/src/org/ldk/structs/InboundHTLCErr.cs | 47 + c_sharp/src/org/ldk/structs/Init.cs | 6 +- c_sharp/src/org/ldk/structs/InitFeatures.cs | 38 +- c_sharp/src/org/ldk/structs/Input.cs | 6 +- .../src/org/ldk/structs/IntroductionNode.cs | 116 + c_sharp/src/org/ldk/structs/InvoiceError.cs | 4 +- c_sharp/src/org/ldk/structs/InvoiceRequest.cs | 81 +- .../org/ldk/structs/InvoiceRequestFeatures.cs | 4 +- .../org/ldk/structs/InvoiceRequestFields.cs | 166 + ...InvoiceRequestWithDerivedPayerIdBuilder.cs | 138 + ...nvoiceRequestWithExplicitPayerIdBuilder.cs | 139 + .../InvoiceWithDerivedSigningPubkeyBuilder.cs | 150 + ...InvoiceWithExplicitSigningPubkeyBuilder.cs | 151 + c_sharp/src/org/ldk/structs/KVStore.cs | 8 +- c_sharp/src/org/ldk/structs/KeysManager.cs | 47 +- c_sharp/src/org/ldk/structs/Listen.cs | 2 +- .../org/ldk/structs/MaxDustHTLCExposure.cs | 4 +- c_sharp/src/org/ldk/structs/MessageRouter.cs | 4 +- .../src/org/ldk/structs/MessageSendEvent.cs | 70 +- .../ldk/structs/MessageSendEventsProvider.cs | 2 +- .../ldk/structs/MinFinalCltvExpiryDelta.cs | 2 +- c_sharp/src/org/ldk/structs/MonitorEvent.cs | 71 +- .../src/org/ldk/structs/MonitorUpdateId.cs | 2 +- c_sharp/src/org/ldk/structs/NetworkGraph.cs | 20 +- c_sharp/src/org/ldk/structs/NetworkUpdate.cs | 4 +- c_sharp/src/org/ldk/structs/NextMessageHop.cs | 115 + c_sharp/src/org/ldk/structs/NodeAlias.cs | 2 +- .../src/org/ldk/structs/NodeAnnouncement.cs | 6 +- .../org/ldk/structs/NodeAnnouncementInfo.cs | 8 +- c_sharp/src/org/ldk/structs/NodeFeatures.cs | 38 +- c_sharp/src/org/ldk/structs/NodeId.cs | 11 + c_sharp/src/org/ldk/structs/NodeIdLookUp.cs | 85 + c_sharp/src/org/ldk/structs/NodeInfo.cs | 11 +- c_sharp/src/org/ldk/structs/NodeSigner.cs | 16 +- c_sharp/src/org/ldk/structs/Offer.cs | 113 +- c_sharp/src/org/ldk/structs/OfferFeatures.cs | 4 +- c_sharp/src/org/ldk/structs/OfferId.cs | 102 + .../OfferWithDerivedMetadataBuilder.cs | 172 + .../OfferWithExplicitMetadataBuilder.cs | 184 + c_sharp/src/org/ldk/structs/OffersMessage.cs | 6 +- .../org/ldk/structs/OffersMessageHandler.cs | 4 +- c_sharp/src/org/ldk/structs/OnionMessage.cs | 6 +- .../org/ldk/structs/OnionMessageHandler.cs | 12 +- .../src/org/ldk/structs/OnionMessagePath.cs | 2 + c_sharp/src/org/ldk/structs/OnionMessenger.cs | 13 +- c_sharp/src/org/ldk/structs/OnionPacket.cs | 4 +- c_sharp/src/org/ldk/structs/OpenChannel.cs | 390 +- c_sharp/src/org/ldk/structs/OpenChannelV2.cs | 392 +- c_sharp/src/org/ldk/structs/Option_AmountZ.cs | 86 + .../ldk/structs/Option_BigEndianScalarZ.cs | 7 +- ...on_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.cs | 2 +- .../ldk/structs/Option_C2Tuple_u64u16ZZ.cs | 2 +- .../ldk/structs/Option_C2Tuple_u64u64ZZ.cs | 2 +- ...nnouncementChannelUpdateChannelUpdateZZ.cs | 2 +- .../org/ldk/structs/Option_ECDSASignatureZ.cs | 84 + .../org/ldk/structs/Option_PaymentContextZ.cs | 86 + .../src/org/ldk/structs/Option_QuantityZ.cs | 86 + c_sharp/src/org/ldk/structs/OutPoint.cs | 13 +- .../src/org/ldk/structs/OutputSpendStatus.cs | 200 + c_sharp/src/org/ldk/structs/OutputSpender.cs | 117 + c_sharp/src/org/ldk/structs/OutputSweeper.cs | 179 + c_sharp/src/org/ldk/structs/P2PGossipSync.cs | 2 +- c_sharp/src/org/ldk/structs/Packet.cs | 2 +- .../org/ldk/structs/ParseOrSemanticError.cs | 2 +- c_sharp/src/org/ldk/structs/Path.cs | 6 +- c_sharp/src/org/ldk/structs/PathFailure.cs | 2 +- c_sharp/src/org/ldk/structs/Payee.cs | 6 +- c_sharp/src/org/ldk/structs/PayeePubKey.cs | 2 +- c_sharp/src/org/ldk/structs/PaymentContext.cs | 157 + .../src/org/ldk/structs/PaymentParameters.cs | 6 +- c_sharp/src/org/ldk/structs/PaymentPurpose.cs | 137 +- .../src/org/ldk/structs/PaymentSendFailure.cs | 6 +- c_sharp/src/org/ldk/structs/PeeledOnion.cs | 14 +- c_sharp/src/org/ldk/structs/PeerDetails.cs | 136 + c_sharp/src/org/ldk/structs/PeerManager.cs | 49 +- .../src/org/ldk/structs/PendingHTLCRouting.cs | 29 +- c_sharp/src/org/ldk/structs/Persist.cs | 61 +- c_sharp/src/org/ldk/structs/Persister.cs | 16 +- .../src/org/ldk/structs/PhantomKeysManager.cs | 31 +- .../src/org/ldk/structs/PhantomRouteHints.cs | 4 +- c_sharp/src/org/ldk/structs/Ping.cs | 2 +- c_sharp/src/org/ldk/structs/Pong.cs | 2 +- .../src/org/ldk/structs/PositiveTimestamp.cs | 2 +- c_sharp/src/org/ldk/structs/PrivateRoute.cs | 4 +- .../org/ldk/structs/ProbabilisticScorer.cs | 10 +- .../ProbabilisticScoringFeeParameters.cs | 10 +- .../src/org/ldk/structs/ProbeSendFailure.cs | 2 +- c_sharp/src/org/ldk/structs/Quantity.cs | 67 +- .../src/org/ldk/structs/QueryChannelRange.cs | 2 +- .../org/ldk/structs/QueryShortChannelIds.cs | 2 +- c_sharp/src/org/ldk/structs/RandomBytes.cs | 44 + .../src/org/ldk/structs/RapidGossipSync.cs | 2 +- .../src/org/ldk/structs/RawBolt11Invoice.cs | 7 +- c_sharp/src/org/ldk/structs/RawDataPart.cs | 4 +- .../org/ldk/structs/ReadOnlyNetworkGraph.cs | 2 +- c_sharp/src/org/ldk/structs/ReceiveTlvs.cs | 30 +- .../org/ldk/structs/RecipientOnionFields.cs | 4 +- c_sharp/src/org/ldk/structs/Record.cs | 17 +- c_sharp/src/org/ldk/structs/Refund.cs | 12 + .../RefundMaybeWithDerivedMetadataBuilder.cs | 202 + .../src/org/ldk/structs/ReplyChannelRange.cs | 2 +- .../ldk/structs/ReplyShortChannelIdsEnd.cs | 2 +- .../Result_AcceptChannelDecodeErrorZ.cs | 2 +- .../Result_AcceptChannelV2DecodeErrorZ.cs | 2 +- ...sult_AnnouncementSignaturesDecodeErrorZ.cs | 2 +- .../structs/Result_BestBlockDecodeErrorZ.cs | 93 + .../ldk/structs/Result_BigSizeDecodeErrorZ.cs | 2 +- .../Result_BlindedForwardDecodeErrorZ.cs | 2 +- .../structs/Result_BlindedHopDecodeErrorZ.cs | 2 +- .../Result_BlindedHopFeaturesDecodeErrorZ.cs | 2 +- .../structs/Result_BlindedPathDecodeErrorZ.cs | 2 +- .../ldk/structs/Result_BlindedPathNoneZ.cs | 2 +- .../Result_BlindedPayInfoDecodeErrorZ.cs | 2 +- .../structs/Result_BlindedTailDecodeErrorZ.cs | 2 +- ...esult_Bolt11InvoiceBolt11SemanticErrorZ.cs | 2 +- ...esult_Bolt11InvoiceFeaturesDecodeErrorZ.cs | 2 +- ...sult_Bolt11InvoiceParseOrSemanticErrorZ.cs | 2 +- ...esult_Bolt11InvoiceSignOrCreationErrorZ.cs | 2 +- ...esult_Bolt12InvoiceBolt12SemanticErrorZ.cs | 89 + ...esult_Bolt12InvoiceFeaturesDecodeErrorZ.cs | 2 +- .../Result_Bolt12OfferContextDecodeErrorZ.cs | 93 + .../Result_Bolt12RefundContextDecodeErrorZ.cs | 93 + ..._BuiltCommitmentTransactionDecodeErrorZ.cs | 2 +- ...ple_BestBlockOutputSweeperZDecodeErrorZ.cs | 74 + ...C2Tuple_BlindedPayInfoBlindedPathZNoneZ.cs | 2 +- .../Result_C2Tuple_CVec_u8Zu64ZNoneZ.cs | 2 +- ...CDSASignatureCVec_ECDSASignatureZZNoneZ.cs | 2 +- ...irtyTwoBytesChannelManagerZDecodeErrorZ.cs | 2 +- ...irtyTwoBytesChannelMonitorZDecodeErrorZ.cs | 2 +- ...e_ThirtyTwoBytesChannelMonitorZIOErrorZ.cs | 2 +- ...uple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.cs | 2 +- ...BytesThirtyTwoBytesZPaymentSendFailureZ.cs | 2 +- ...COption_CVec_SocketAddressZZZSendErrorZ.cs | 20 +- ...cipientOnionFieldsRouteParametersZNoneZ.cs | 2 +- .../structs/Result_CVec_BlindedPathZNoneZ.cs | 2 +- ...2Tuple_BlindedPayInfoBlindedPathZZNoneZ.cs | 2 +- ..._ThirtyTwoBytesChannelMonitorZZIOErrorZ.cs | 2 +- ...oBytesThirtyTwoBytesZZProbeSendFailureZ.cs | 2 +- .../org/ldk/structs/Result_CVec_UtxoZNoneZ.cs | 2 +- .../Result_CVec_u8ZPeerHandleErrorZ.cs | 2 +- .../Result_ChannelAnnouncementDecodeErrorZ.cs | 2 +- .../Result_ChannelConfigDecodeErrorZ.cs | 2 +- .../Result_ChannelCounterpartyDecodeErrorZ.cs | 2 +- ...ChannelDerivationParametersDecodeErrorZ.cs | 2 +- .../Result_ChannelDetailsDecodeErrorZ.cs | 2 +- .../Result_ChannelFeaturesDecodeErrorZ.cs | 2 +- .../ldk/structs/Result_ChannelIdAPIErrorZ.cs | 93 + .../structs/Result_ChannelIdDecodeErrorZ.cs | 93 + .../structs/Result_ChannelInfoDecodeErrorZ.cs | 2 +- ...Result_ChannelMonitorUpdateDecodeErrorZ.cs | 2 +- .../Result_ChannelPublicKeysDecodeErrorZ.cs | 2 +- .../Result_ChannelReadyDecodeErrorZ.cs | 2 +- .../Result_ChannelReestablishDecodeErrorZ.cs | 2 +- ...hannelTransactionParametersDecodeErrorZ.cs | 2 +- .../Result_ChannelTypeFeaturesDecodeErrorZ.cs | 2 +- .../Result_ChannelUpdateDecodeErrorZ.cs | 2 +- .../Result_ChannelUpdateInfoDecodeErrorZ.cs | 2 +- .../structs/Result_ClaimedHTLCDecodeErrorZ.cs | 2 +- .../Result_ClosingSignedDecodeErrorZ.cs | 2 +- ...esult_ClosingSignedFeeRangeDecodeErrorZ.cs | 2 +- .../ldk/structs/Result_CoinSelectionNoneZ.cs | 2 +- .../Result_CommitmentSignedDecodeErrorZ.cs | 2 +- ...esult_CommitmentTransactionDecodeErrorZ.cs | 2 +- ...hannelTransactionParametersDecodeErrorZ.cs | 2 +- ...unterpartyCommitmentSecretsDecodeErrorZ.cs | 2 +- ..._CounterpartyForwardingInfoDecodeErrorZ.cs | 2 +- ...ult_DelayedPaymentBasepointDecodeErrorZ.cs | 2 +- .../Result_DelayedPaymentKeyDecodeErrorZ.cs | 2 +- ...ayedPaymentOutputDescriptorDecodeErrorZ.cs | 2 +- .../Result_DescriptionCreationErrorZ.cs | 2 +- .../Result_ErrorMessageDecodeErrorZ.cs | 2 +- .../Result_FinalOnionHopDataDecodeErrorZ.cs | 2 +- .../Result_FixedPenaltyScorerDecodeErrorZ.cs | 2 +- .../Result_FundingCreatedDecodeErrorZ.cs | 2 +- .../Result_FundingSignedDecodeErrorZ.cs | 2 +- ...esult_GossipTimestampFilterDecodeErrorZ.cs | 2 +- .../Result_HTLCDescriptorDecodeErrorZ.cs | 2 +- ...sult_HTLCOutputInCommitmentDecodeErrorZ.cs | 2 +- .../structs/Result_HTLCUpdateDecodeErrorZ.cs | 2 +- ...HolderCommitmentTransactionDecodeErrorZ.cs | 2 +- .../structs/Result_HostnameDecodeErrorZ.cs | 2 +- .../Result_HtlcBasepointDecodeErrorZ.cs | 2 +- .../ldk/structs/Result_HtlcKeyDecodeErrorZ.cs | 2 +- .../Result_InFlightHtlcsDecodeErrorZ.cs | 2 +- .../Result_InMemorySignerDecodeErrorZ.cs | 2 +- .../ldk/structs/Result_InitDecodeErrorZ.cs | 2 +- .../Result_InitFeaturesDecodeErrorZ.cs | 2 +- .../Result_InvoiceErrorDecodeErrorZ.cs | 2 +- ...sult_InvoiceRequestBolt12SemanticErrorZ.cs | 89 + ...Result_InvoiceRequestFieldsDecodeErrorZ.cs | 93 + ...rivedPayerIdBuilderBolt12SemanticErrorZ.cs | 79 + ...licitPayerIdBuilderBolt12SemanticErrorZ.cs | 79 + ...igningPubkeyBuilderBolt12SemanticErrorZ.cs | 79 + ...igningPubkeyBuilderBolt12SemanticErrorZ.cs | 79 + .../Result_LockedChannelMonitorNoneZ.cs | 2 +- .../structs/Result_NodeAliasDecodeErrorZ.cs | 2 +- .../Result_NodeAnnouncementDecodeErrorZ.cs | 2 +- ...Result_NodeAnnouncementInfoDecodeErrorZ.cs | 2 +- .../Result_NodeFeaturesDecodeErrorZ.cs | 2 +- .../ldk/structs/Result_NodeIdDecodeErrorZ.cs | 2 +- .../structs/Result_NodeInfoDecodeErrorZ.cs | 2 +- .../ldk/structs/Result_NoneLightningErrorZ.cs | 2 +- .../structs/Result_NonePeerHandleErrorZ.cs | 2 +- .../structs/Result_OfferBolt12ParseErrorZ.cs | 4 +- .../Result_OfferBolt12SemanticErrorZ.cs | 89 + .../ldk/structs/Result_OfferIdDecodeErrorZ.cs | 93 + ...ivedMetadataBuilderBolt12SemanticErrorZ.cs | 89 + .../Result_OnionMessageDecodeErrorZ.cs | 2 +- .../structs/Result_OnionMessagePathNoneZ.cs | 2 +- .../structs/Result_OnionPacketDecodeErrorZ.cs | 2 +- .../structs/Result_OpenChannelDecodeErrorZ.cs | 2 +- .../Result_OpenChannelV2DecodeErrorZ.cs | 2 +- .../structs/Result_OutPointDecodeErrorZ.cs | 2 +- .../Result_OutputSpendStatusDecodeErrorZ.cs | 93 + .../Result_OutputSweeperDecodeErrorZ.cs | 89 + .../Result_PayeePubKeySecp256k1ErrorZ.cs | 2 +- .../Result_PaymentConstraintsDecodeErrorZ.cs | 2 +- .../Result_PaymentContextDecodeErrorZ.cs | 93 + .../Result_PaymentParametersDecodeErrorZ.cs | 2 +- .../Result_PaymentRelayDecodeErrorZ.cs | 2 +- .../ldk/structs/Result_PeeledOnionNoneZ.cs | 18 + .../Result_PendingHTLCInfoDecodeErrorZ.cs | 2 +- .../Result_PendingHTLCInfoInboundHTLCErrZ.cs | 31 +- .../Result_PhantomRouteHintsDecodeErrorZ.cs | 2 +- .../ldk/structs/Result_PingDecodeErrorZ.cs | 2 +- .../ldk/structs/Result_PongDecodeErrorZ.cs | 2 +- .../Result_PositiveTimestampCreationErrorZ.cs | 2 +- .../Result_PrivateRouteCreationErrorZ.cs | 2 +- .../Result_ProbabilisticScorerDecodeErrorZ.cs | 2 +- .../Result_QueryChannelRangeDecodeErrorZ.cs | 2 +- ...Result_QueryShortChannelIdsDecodeErrorZ.cs | 2 +- ...Result_RecipientOnionFieldsDecodeErrorZ.cs | 2 +- .../Result_RecipientOnionFieldsNoneZ.cs | 2 +- .../structs/Result_RefundBolt12ParseErrorZ.cs | 4 +- .../Result_RefundBolt12SemanticErrorZ.cs | 89 + ...ivedMetadataBuilderBolt12SemanticErrorZ.cs | 89 + .../Result_ReplyChannelRangeDecodeErrorZ.cs | 2 +- ...ult_ReplyShortChannelIdsEndDecodeErrorZ.cs | 2 +- .../Result_RevocationBasepointDecodeErrorZ.cs | 2 +- .../Result_RevocationKeyDecodeErrorZ.cs | 2 +- .../Result_RevokeAndACKDecodeErrorZ.cs | 2 +- .../ldk/structs/Result_RouteDecodeErrorZ.cs | 2 +- .../structs/Result_RouteHintDecodeErrorZ.cs | 2 +- .../Result_RouteHintHopDecodeErrorZ.cs | 2 +- .../structs/Result_RouteHopDecodeErrorZ.cs | 2 +- .../structs/Result_RouteLightningErrorZ.cs | 4 +- .../Result_RouteParametersDecodeErrorZ.cs | 2 +- .../structs/Result_RoutingFeesDecodeErrorZ.cs | 2 +- .../structs/Result_SendSuccessSendErrorZ.cs | 18 + .../structs/Result_ShutdownDecodeErrorZ.cs | 2 +- .../Result_ShutdownScriptDecodeErrorZ.cs | 2 +- ...lt_ShutdownScriptInvalidShutdownScriptZ.cs | 4 +- .../ldk/structs/Result_ShutdownScriptNoneZ.cs | 2 +- ...SignedRawBolt11InvoiceBolt11ParseErrorZ.cs | 2 +- .../structs/Result_SpliceAckDecodeErrorZ.cs | 2 +- .../ldk/structs/Result_SpliceDecodeErrorZ.cs | 2 +- .../Result_SpliceLockedDecodeErrorZ.cs | 2 +- ...aticPaymentOutputDescriptorDecodeErrorZ.cs | 2 +- .../ldk/structs/Result_StfuDecodeErrorZ.cs | 2 +- ...sult_TrackedSpendableOutputDecodeErrorZ.cs | 93 + ...lt_TransactionU16LenLimitedDecodeErrorZ.cs | 2 +- .../Result_TransactionU16LenLimitedNoneZ.cs | 2 +- .../Result_TrustedClosingTransactionNoneZ.cs | 2 +- ...esult_TrustedCommitmentTransactionNoneZ.cs | 2 +- .../ldk/structs/Result_TxAbortDecodeErrorZ.cs | 2 +- .../structs/Result_TxAckRbfDecodeErrorZ.cs | 2 +- .../structs/Result_TxAddInputDecodeErrorZ.cs | 2 +- .../structs/Result_TxAddOutputDecodeErrorZ.cs | 2 +- .../structs/Result_TxCompleteDecodeErrorZ.cs | 2 +- .../Result_TxCreationKeysDecodeErrorZ.cs | 2 +- .../structs/Result_TxInitRbfDecodeErrorZ.cs | 2 +- .../Result_TxRemoveInputDecodeErrorZ.cs | 2 +- .../Result_TxRemoveOutputDecodeErrorZ.cs | 2 +- .../Result_TxSignaturesDecodeErrorZ.cs | 2 +- ...esult_UnknownPaymentContextDecodeErrorZ.cs | 93 + ...signedBolt12InvoiceBolt12SemanticErrorZ.cs | 89 + ...UnsignedChannelAnnouncementDecodeErrorZ.cs | 2 +- ...esult_UnsignedChannelUpdateDecodeErrorZ.cs | 2 +- ...ignedInvoiceRequestBolt12SemanticErrorZ.cs | 89 + ...lt_UnsignedNodeAnnouncementDecodeErrorZ.cs | 2 +- .../Result_UntrustedStringDecodeErrorZ.cs | 2 +- .../Result_UpdateAddHTLCDecodeErrorZ.cs | 2 +- .../Result_UpdateFailHTLCDecodeErrorZ.cs | 2 +- ...ult_UpdateFailMalformedHTLCDecodeErrorZ.cs | 2 +- .../structs/Result_UpdateFeeDecodeErrorZ.cs | 2 +- .../Result_UpdateFulfillHTLCDecodeErrorZ.cs | 2 +- .../Result_VerifiedInvoiceRequestNoneZ.cs | 2 +- .../Result_WarningMessageDecodeErrorZ.cs | 2 +- .../ldk/structs/Result_boolLightningErrorZ.cs | 2 +- .../structs/Result_boolPeerHandleErrorZ.cs | 2 +- .../structs/Result_u64ShortChannelIdErrorZ.cs | 67 + c_sharp/src/org/ldk/structs/Retry.cs | 2 +- .../org/ldk/structs/RevocationBasepoint.cs | 2 +- c_sharp/src/org/ldk/structs/RevocationKey.cs | 4 +- c_sharp/src/org/ldk/structs/RevokeAndACK.cs | 19 +- c_sharp/src/org/ldk/structs/Route.cs | 6 +- c_sharp/src/org/ldk/structs/RouteHint.cs | 6 +- c_sharp/src/org/ldk/structs/RouteHintHop.cs | 6 +- c_sharp/src/org/ldk/structs/RouteHop.cs | 8 +- .../src/org/ldk/structs/RouteParameters.cs | 8 +- c_sharp/src/org/ldk/structs/Router.cs | 12 +- c_sharp/src/org/ldk/structs/RoutingFees.cs | 2 +- .../org/ldk/structs/RoutingMessageHandler.cs | 38 +- c_sharp/src/org/ldk/structs/ScoreLookUp.cs | 2 +- c_sharp/src/org/ldk/structs/ScoreUpdate.cs | 8 +- .../ScorerAccountingForInFlightHtlcs.cs | 2 +- c_sharp/src/org/ldk/structs/SendError.cs | 33 +- c_sharp/src/org/ldk/structs/SendSuccess.cs | 14 +- c_sharp/src/org/ldk/structs/Sha256.cs | 2 +- c_sharp/src/org/ldk/structs/Shutdown.cs | 19 +- c_sharp/src/org/ldk/structs/ShutdownScript.cs | 4 +- .../org/ldk/structs/SignBolt12InvoiceFn.cs | 70 + c_sharp/src/org/ldk/structs/SignError.cs | 81 + .../org/ldk/structs/SignInvoiceRequestFn.cs | 70 + .../org/ldk/structs/SignOrCreationError.cs | 2 +- .../org/ldk/structs/SignedRawBolt11Invoice.cs | 2 +- c_sharp/src/org/ldk/structs/SignerProvider.cs | 6 +- c_sharp/src/org/ldk/structs/Sleeper.cs | 16 +- c_sharp/src/org/ldk/structs/SocketAddress.cs | 4 +- .../ldk/structs/SpendableOutputDescriptor.cs | 8 +- c_sharp/src/org/ldk/structs/SpendingDelay.cs | 91 + c_sharp/src/org/ldk/structs/Splice.cs | 19 +- c_sharp/src/org/ldk/structs/SpliceAck.cs | 19 +- c_sharp/src/org/ldk/structs/SpliceLocked.cs | 19 +- .../structs/StaticPaymentOutputDescriptor.cs | 6 +- c_sharp/src/org/ldk/structs/Stfu.cs | 19 +- ...AnnouncementChannelUpdateChannelUpdateZ.cs | 2 +- ...le_OffersMessageDestinationBlindedPathZ.cs | 2 +- ...nMessageContentsDestinationBlindedPathZ.cs | 2 +- ...le_OutPointCVec_MonitorEventZPublicKeyZ.cs | 96 - ...ionMessageCOption_CVec_SocketAddressZZZ.cs | 2 +- ...lt11Invoice_u832Bolt11InvoiceSignatureZ.cs | 2 +- ...tesRecipientOnionFieldsRouteParametersZ.cs | 2 +- .../org/ldk/structs/TrackedSpendableOutput.cs | 179 + .../org/ldk/structs/TrampolineOnionPacket.cs | 172 + .../ldk/structs/TransactionU16LenLimited.cs | 13 +- .../structs/TrustedCommitmentTransaction.cs | 2 +- .../TwoTuple_BestBlockOutputSweeperZ.cs | 72 + .../TwoTuple_BlindedPayInfoBlindedPathZ.cs | 2 +- .../structs/TwoTuple_ChannelIdPublicKeyZ.cs | 75 + ...TwoTuple_OutPointCVec_MonitorUpdateIdZZ.cs | 2 +- .../ldk/structs/TwoTuple_OutPointCVec_u8ZZ.cs | 2 +- .../structs/TwoTuple_OutPointChannelIdZ.cs | 77 + ...oTuple_PublicKeyCOption_SocketAddressZZ.cs | 75 - ...irtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.cs | 2 +- ..._ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.cs | 2 +- .../TwoTuple_ThirtyTwoBytesChannelManagerZ.cs | 2 +- .../TwoTuple_ThirtyTwoBytesChannelMonitorZ.cs | 2 +- .../TwoTuple_ThirtyTwoBytesPublicKeyZ.cs | 73 - c_sharp/src/org/ldk/structs/TxAbort.cs | 19 +- c_sharp/src/org/ldk/structs/TxAckRbf.cs | 19 +- c_sharp/src/org/ldk/structs/TxAddInput.cs | 21 +- c_sharp/src/org/ldk/structs/TxAddOutput.cs | 19 +- c_sharp/src/org/ldk/structs/TxComplete.cs | 19 +- c_sharp/src/org/ldk/structs/TxCreationKeys.cs | 16 +- c_sharp/src/org/ldk/structs/TxInitRbf.cs | 19 +- c_sharp/src/org/ldk/structs/TxRemoveInput.cs | 19 +- c_sharp/src/org/ldk/structs/TxRemoveOutput.cs | 19 +- c_sharp/src/org/ldk/structs/TxSignatures.cs | 43 +- .../org/ldk/structs/UnknownPaymentContext.cs | 76 + .../org/ldk/structs/UnsignedBolt12Invoice.cs | 32 +- .../structs/UnsignedChannelAnnouncement.cs | 14 +- .../org/ldk/structs/UnsignedChannelUpdate.cs | 2 +- .../org/ldk/structs/UnsignedGossipMessage.cs | 6 +- .../org/ldk/structs/UnsignedInvoiceRequest.cs | 30 +- .../ldk/structs/UnsignedNodeAnnouncement.cs | 87 +- .../src/org/ldk/structs/UntrustedString.cs | 2 +- c_sharp/src/org/ldk/structs/UpdateAddHTLC.cs | 21 +- c_sharp/src/org/ldk/structs/UpdateFailHTLC.cs | 14 +- .../ldk/structs/UpdateFailMalformedHTLC.cs | 14 +- c_sharp/src/org/ldk/structs/UpdateFee.cs | 19 +- .../src/org/ldk/structs/UpdateFulfillHTLC.cs | 19 +- c_sharp/src/org/ldk/structs/UserConfig.cs | 8 +- c_sharp/src/org/ldk/structs/UtilMethods.cs | 189 +- c_sharp/src/org/ldk/structs/Utxo.cs | 8 +- c_sharp/src/org/ldk/structs/UtxoFuture.cs | 4 +- c_sharp/src/org/ldk/structs/UtxoLookup.cs | 2 +- c_sharp/src/org/ldk/structs/UtxoResult.cs | 4 +- .../org/ldk/structs/VerifiedInvoiceRequest.cs | 128 +- c_sharp/src/org/ldk/structs/WalletSource.cs | 6 +- c_sharp/src/org/ldk/structs/WarningMessage.cs | 19 +- c_sharp/src/org/ldk/structs/Watch.cs | 30 +- c_sharp/src/org/ldk/structs/WatchedOutput.cs | 6 +- .../structs/WriteableEcdsaChannelSigner.cs | 2 +- 497 files changed, 35171 insertions(+), 11243 deletions(-) create mode 100644 c_sharp/src/org/ldk/enums/Direction.cs create mode 100644 c_sharp/src/org/ldk/enums/ShortChannelIdError.cs create mode 100644 c_sharp/src/org/ldk/structs/Bolt12OfferContext.cs create mode 100644 c_sharp/src/org/ldk/structs/Bolt12RefundContext.cs create mode 100644 c_sharp/src/org/ldk/structs/ChangeDestinationSource.cs create mode 100644 c_sharp/src/org/ldk/structs/ChannelId.cs create mode 100644 c_sharp/src/org/ldk/structs/CommonAcceptChannelFields.cs create mode 100644 c_sharp/src/org/ldk/structs/CommonOpenChannelFields.cs create mode 100644 c_sharp/src/org/ldk/structs/EmptyNodeIdLookUp.cs create mode 100644 c_sharp/src/org/ldk/structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.cs create mode 100644 c_sharp/src/org/ldk/structs/IntroductionNode.cs create mode 100644 c_sharp/src/org/ldk/structs/InvoiceRequestFields.cs create mode 100644 c_sharp/src/org/ldk/structs/InvoiceRequestWithDerivedPayerIdBuilder.cs create mode 100644 c_sharp/src/org/ldk/structs/InvoiceRequestWithExplicitPayerIdBuilder.cs create mode 100644 c_sharp/src/org/ldk/structs/InvoiceWithDerivedSigningPubkeyBuilder.cs create mode 100644 c_sharp/src/org/ldk/structs/InvoiceWithExplicitSigningPubkeyBuilder.cs create mode 100644 c_sharp/src/org/ldk/structs/NextMessageHop.cs create mode 100644 c_sharp/src/org/ldk/structs/NodeIdLookUp.cs create mode 100644 c_sharp/src/org/ldk/structs/OfferId.cs create mode 100644 c_sharp/src/org/ldk/structs/OfferWithDerivedMetadataBuilder.cs create mode 100644 c_sharp/src/org/ldk/structs/OfferWithExplicitMetadataBuilder.cs create mode 100644 c_sharp/src/org/ldk/structs/Option_AmountZ.cs create mode 100644 c_sharp/src/org/ldk/structs/Option_ECDSASignatureZ.cs create mode 100644 c_sharp/src/org/ldk/structs/Option_PaymentContextZ.cs create mode 100644 c_sharp/src/org/ldk/structs/Option_QuantityZ.cs create mode 100644 c_sharp/src/org/ldk/structs/OutputSpendStatus.cs create mode 100644 c_sharp/src/org/ldk/structs/OutputSpender.cs create mode 100644 c_sharp/src/org/ldk/structs/OutputSweeper.cs create mode 100644 c_sharp/src/org/ldk/structs/PaymentContext.cs create mode 100644 c_sharp/src/org/ldk/structs/PeerDetails.cs create mode 100644 c_sharp/src/org/ldk/structs/RandomBytes.cs create mode 100644 c_sharp/src/org/ldk/structs/RefundMaybeWithDerivedMetadataBuilder.cs create mode 100644 c_sharp/src/org/ldk/structs/Result_BestBlockDecodeErrorZ.cs create mode 100644 c_sharp/src/org/ldk/structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.cs create mode 100644 c_sharp/src/org/ldk/structs/Result_Bolt12OfferContextDecodeErrorZ.cs create mode 100644 c_sharp/src/org/ldk/structs/Result_Bolt12RefundContextDecodeErrorZ.cs create mode 100644 c_sharp/src/org/ldk/structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.cs create mode 100644 c_sharp/src/org/ldk/structs/Result_ChannelIdAPIErrorZ.cs create mode 100644 c_sharp/src/org/ldk/structs/Result_ChannelIdDecodeErrorZ.cs create mode 100644 c_sharp/src/org/ldk/structs/Result_InvoiceRequestBolt12SemanticErrorZ.cs create mode 100644 c_sharp/src/org/ldk/structs/Result_InvoiceRequestFieldsDecodeErrorZ.cs create mode 100644 c_sharp/src/org/ldk/structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.cs create mode 100644 c_sharp/src/org/ldk/structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.cs create mode 100644 c_sharp/src/org/ldk/structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.cs create mode 100644 c_sharp/src/org/ldk/structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.cs create mode 100644 c_sharp/src/org/ldk/structs/Result_OfferBolt12SemanticErrorZ.cs create mode 100644 c_sharp/src/org/ldk/structs/Result_OfferIdDecodeErrorZ.cs create mode 100644 c_sharp/src/org/ldk/structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.cs create mode 100644 c_sharp/src/org/ldk/structs/Result_OutputSpendStatusDecodeErrorZ.cs create mode 100644 c_sharp/src/org/ldk/structs/Result_OutputSweeperDecodeErrorZ.cs create mode 100644 c_sharp/src/org/ldk/structs/Result_PaymentContextDecodeErrorZ.cs create mode 100644 c_sharp/src/org/ldk/structs/Result_RefundBolt12SemanticErrorZ.cs create mode 100644 c_sharp/src/org/ldk/structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.cs create mode 100644 c_sharp/src/org/ldk/structs/Result_TrackedSpendableOutputDecodeErrorZ.cs create mode 100644 c_sharp/src/org/ldk/structs/Result_UnknownPaymentContextDecodeErrorZ.cs create mode 100644 c_sharp/src/org/ldk/structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.cs create mode 100644 c_sharp/src/org/ldk/structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.cs create mode 100644 c_sharp/src/org/ldk/structs/Result_u64ShortChannelIdErrorZ.cs create mode 100644 c_sharp/src/org/ldk/structs/SignBolt12InvoiceFn.cs create mode 100644 c_sharp/src/org/ldk/structs/SignError.cs create mode 100644 c_sharp/src/org/ldk/structs/SignInvoiceRequestFn.cs create mode 100644 c_sharp/src/org/ldk/structs/SpendingDelay.cs delete mode 100644 c_sharp/src/org/ldk/structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.cs create mode 100644 c_sharp/src/org/ldk/structs/TrackedSpendableOutput.cs create mode 100644 c_sharp/src/org/ldk/structs/TrampolineOnionPacket.cs create mode 100644 c_sharp/src/org/ldk/structs/TwoTuple_BestBlockOutputSweeperZ.cs create mode 100644 c_sharp/src/org/ldk/structs/TwoTuple_ChannelIdPublicKeyZ.cs create mode 100644 c_sharp/src/org/ldk/structs/TwoTuple_OutPointChannelIdZ.cs delete mode 100644 c_sharp/src/org/ldk/structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.cs delete mode 100644 c_sharp/src/org/ldk/structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.cs create mode 100644 c_sharp/src/org/ldk/structs/UnknownPaymentContext.cs diff --git a/c_sharp/bindings.c b/c_sharp/bindings.c index aa2a9f13..2284cefa 100644 --- a/c_sharp/bindings.c +++ b/c_sharp/bindings.c @@ -225,6 +225,13 @@ int CS_LDK_register_l_lllb_invoker(invoker_l_lllb invoker) { return 0; } +typedef int64_t (*invoker_l_lllil)(int obj_ptr, int fn_id, int64_t a, int64_t b, int64_t c, int32_t d, int64_t e); +static invoker_l_lllil js_invoke_function_l_lllil; +int CS_LDK_register_l_lllil_invoker(invoker_l_lllil invoker) { + js_invoke_function_l_lllil = invoker; + return 0; +} + typedef int32_t (*invoker_ChannelMonitorUpdateStatus_lll)(int obj_ptr, int fn_id, int64_t a, int64_t b, int64_t c); static invoker_ChannelMonitorUpdateStatus_lll js_invoke_function_ChannelMonitorUpdateStatus_lll; int CS_LDK_register_ChannelMonitorUpdateStatus_lll_invoker(invoker_ChannelMonitorUpdateStatus_lll invoker) { @@ -239,13 +246,6 @@ int CS_LDK_register_ChannelMonitorUpdateStatus_llll_invoker(invoker_ChannelMonit return 0; } -typedef void (*invoker_void_)(int obj_ptr, int fn_id); -static invoker_void_ js_invoke_function_void_; -int CS_LDK_register_void__invoker(invoker_void_ invoker) { - js_invoke_function_void_ = invoker; - return 0; -} - typedef void (*invoker_void_lli)(int obj_ptr, int fn_id, int64_t a, int64_t b, int32_t c); static invoker_void_lli js_invoke_function_void_lli; int CS_LDK_register_void_lli_invoker(invoker_void_lli invoker) { @@ -260,6 +260,13 @@ int CS_LDK_register_void_li_invoker(invoker_void_li invoker) { return 0; } +typedef void (*invoker_void_)(int obj_ptr, int fn_id); +static invoker_void_ js_invoke_function_void_; +int CS_LDK_register_void__invoker(invoker_void_ invoker) { + js_invoke_function_void_ = invoker; + return 0; +} + typedef int64_t (*invoker_l_llb)(int obj_ptr, int fn_id, int64_t a, int64_t b, jboolean c); static invoker_l_llb js_invoke_function_l_llb; int CS_LDK_register_l_llb_invoker(invoker_l_llb invoker) { @@ -427,10 +434,11 @@ static inline LDKBolt12SemanticError LDKBolt12SemanticError_from_cs(int32_t ord) case 20: return LDKBolt12SemanticError_MissingPayerId; case 21: return LDKBolt12SemanticError_DuplicatePaymentId; case 22: return LDKBolt12SemanticError_MissingPaths; - case 23: return LDKBolt12SemanticError_InvalidPayInfo; - case 24: return LDKBolt12SemanticError_MissingCreationTime; - case 25: return LDKBolt12SemanticError_MissingPaymentHash; - case 26: return LDKBolt12SemanticError_MissingSignature; + case 23: return LDKBolt12SemanticError_UnexpectedPaths; + case 24: return LDKBolt12SemanticError_InvalidPayInfo; + case 25: return LDKBolt12SemanticError_MissingCreationTime; + case 26: return LDKBolt12SemanticError_MissingPaymentHash; + case 27: return LDKBolt12SemanticError_MissingSignature; default: abort(); } } @@ -459,10 +467,11 @@ static inline int32_t LDKBolt12SemanticError_to_cs(LDKBolt12SemanticError val) { case LDKBolt12SemanticError_MissingPayerId: return 20; case LDKBolt12SemanticError_DuplicatePaymentId: return 21; case LDKBolt12SemanticError_MissingPaths: return 22; - case LDKBolt12SemanticError_InvalidPayInfo: return 23; - case LDKBolt12SemanticError_MissingCreationTime: return 24; - case LDKBolt12SemanticError_MissingPaymentHash: return 25; - case LDKBolt12SemanticError_MissingSignature: return 26; + case LDKBolt12SemanticError_UnexpectedPaths: return 23; + case LDKBolt12SemanticError_InvalidPayInfo: return 24; + case LDKBolt12SemanticError_MissingCreationTime: return 25; + case LDKBolt12SemanticError_MissingPaymentHash: return 26; + case LDKBolt12SemanticError_MissingSignature: return 27; default: abort(); } } @@ -524,6 +533,7 @@ static inline LDKConfirmationTarget LDKConfirmationTarget_from_cs(int32_t ord) { case 3: return LDKConfirmationTarget_AnchorChannelFee; case 4: return LDKConfirmationTarget_NonAnchorChannelFee; case 5: return LDKConfirmationTarget_ChannelCloseMinimum; + case 6: return LDKConfirmationTarget_OutputSpendingFee; default: abort(); } } @@ -535,6 +545,7 @@ static inline int32_t LDKConfirmationTarget_to_cs(LDKConfirmationTarget val) { case LDKConfirmationTarget_AnchorChannelFee: return 3; case LDKConfirmationTarget_NonAnchorChannelFee: return 4; case LDKConfirmationTarget_ChannelCloseMinimum: return 5; + case LDKConfirmationTarget_OutputSpendingFee: return 6; default: abort(); } } @@ -580,6 +591,20 @@ static inline int32_t LDKCurrency_to_cs(LDKCurrency val) { default: abort(); } } +static inline LDKDirection LDKDirection_from_cs(int32_t ord) { + switch (ord) { + case 0: return LDKDirection_NodeOne; + case 1: return LDKDirection_NodeTwo; + default: abort(); + } +} +static inline int32_t LDKDirection_to_cs(LDKDirection val) { + switch (val) { + case LDKDirection_NodeOne: return 0; + case LDKDirection_NodeTwo: return 1; + default: abort(); + } +} static inline LDKHTLCClaim LDKHTLCClaim_from_cs(int32_t ord) { switch (ord) { case 0: return LDKHTLCClaim_OfferedTimeout; @@ -770,6 +795,22 @@ static inline int32_t LDKSecp256k1Error_to_cs(LDKSecp256k1Error val) { default: abort(); } } +static inline LDKShortChannelIdError LDKShortChannelIdError_from_cs(int32_t ord) { + switch (ord) { + case 0: return LDKShortChannelIdError_BlockOverflow; + case 1: return LDKShortChannelIdError_TxIndexOverflow; + case 2: return LDKShortChannelIdError_VoutIndexOverflow; + default: abort(); + } +} +static inline int32_t LDKShortChannelIdError_to_cs(LDKShortChannelIdError val) { + switch (val) { + case LDKShortChannelIdError_BlockOverflow: return 0; + case LDKShortChannelIdError_TxIndexOverflow: return 1; + case LDKShortChannelIdError_VoutIndexOverflow: return 2; + default: abort(); + } +} static inline LDKSiPrefix LDKSiPrefix_from_cs(int32_t ord) { switch (ord) { case 0: return LDKSiPrefix_Milli; @@ -871,6 +912,54 @@ int8_t CS_LDK_LDKBech32Error_InvalidData_get_invalid_data(int64_t ptr) { int8_t invalid_data_conv = obj->invalid_data; return invalid_data_conv; } +static inline struct LDKRefundMaybeWithDerivedMetadataBuilder CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKRefundMaybeWithDerivedMetadataBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(int64_t owner) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKRefundMaybeWithDerivedMetadataBuilder ret_var = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +int32_t CS_LDK_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(int64_t owner) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + int32_t ret_conv = LDKBolt12SemanticError_to_cs(CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKRefund CResult_RefundBolt12SemanticErrorZ_get_ok(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKRefund ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_RefundBolt12SemanticErrorZ_get_ok(int64_t owner) { + LDKCResult_RefundBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(owner); + LDKRefund ret_var = CResult_RefundBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_RefundBolt12SemanticErrorZ_get_err(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +int32_t CS_LDK_CResult_RefundBolt12SemanticErrorZ_get_err(int64_t owner) { + LDKCResult_RefundBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(owner); + int32_t ret_conv = LDKBolt12SemanticError_to_cs(CResult_RefundBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + uint32_t CS_LDK_LDKCOption_u64Z_ty_from_ptr(int64_t ptr) { LDKCOption_u64Z *obj = (LDKCOption_u64Z*)untag_ptr(ptr); switch(obj->tag) { @@ -950,6 +1039,7 @@ uint32_t CS_LDK_LDKDecodeError_ty_from_ptr(int64_t ptr) { case LDKDecodeError_BadLengthDescriptor: return 4; case LDKDecodeError_Io: return 5; case LDKDecodeError_UnsupportedCompression: return 6; + case LDKDecodeError_DangerousValue: return 7; default: abort(); } } @@ -1181,6 +1271,74 @@ void CS_LDK_CResult_RecipientOnionFieldsNoneZ_get_err(int64_t owner) { CResult_RecipientOnionFieldsNoneZ_get_err(owner_conv); } +static inline struct LDKUnsignedBolt12Invoice CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKUnsignedBolt12Invoice ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(int64_t owner) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner); + LDKUnsignedBolt12Invoice ret_var = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +int32_t CS_LDK_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(int64_t owner) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner); + int32_t ret_conv = LDKBolt12SemanticError_to_cs(CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKBolt12Invoice CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKBolt12Invoice ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(int64_t owner) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner); + LDKBolt12Invoice ret_var = CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +int32_t CS_LDK_CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(int64_t owner) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner); + int32_t ret_conv = LDKBolt12SemanticError_to_cs(CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKSchnorrSignature CResult_SchnorrSignatureNoneZ_get_ok(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return *owner->contents.result; +} +int8_tArray CS_LDK_CResult_SchnorrSignatureNoneZ_get_ok(int64_t owner) { + LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner); + int8_tArray ret_arr = init_int8_tArray(64, __LINE__); + memcpy(ret_arr->elems, CResult_SchnorrSignatureNoneZ_get_ok(owner_conv).compact_form, 64); + return ret_arr; +} + +static inline void CResult_SchnorrSignatureNoneZ_get_err(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return *owner->contents.err; +} +void CS_LDK_CResult_SchnorrSignatureNoneZ_get_err(int64_t owner) { + LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner); + CResult_SchnorrSignatureNoneZ_get_err(owner_conv); +} + static inline LDKCVec_ThirtyTwoBytesZ CVec_ThirtyTwoBytesZ_clone(const LDKCVec_ThirtyTwoBytesZ *orig) { LDKCVec_ThirtyTwoBytesZ ret = { .data = MALLOC(sizeof(LDKThirtyTwoBytes) * orig->datalen, "LDKCVec_ThirtyTwoBytesZ clone bytes"), .datalen = orig->datalen }; for (size_t i = 0; i < ret.datalen; i++) { @@ -1211,6 +1369,76 @@ ptrArray CS_LDK_LDKCOption_CVec_ThirtyTwoBytesZZ_Some_get_some(int64_t ptr) { return some_arr; } +uint32_t CS_LDK_LDKAmount_ty_from_ptr(int64_t ptr) { + LDKAmount *obj = (LDKAmount*)untag_ptr(ptr); + switch(obj->tag) { + case LDKAmount_Bitcoin: return 0; + case LDKAmount_Currency: return 1; + default: abort(); + } +} +int64_t CS_LDK_LDKAmount_Bitcoin_get_amount_msats(int64_t ptr) { + LDKAmount *obj = (LDKAmount*)untag_ptr(ptr); + CHECK(obj->tag == LDKAmount_Bitcoin); + int64_t amount_msats_conv = obj->bitcoin.amount_msats; + return amount_msats_conv; +} +int8_tArray CS_LDK_LDKAmount_Currency_get_iso4217_code(int64_t ptr) { + LDKAmount *obj = (LDKAmount*)untag_ptr(ptr); + CHECK(obj->tag == LDKAmount_Currency); + int8_tArray iso4217_code_arr = init_int8_tArray(3, __LINE__); + memcpy(iso4217_code_arr->elems, obj->currency.iso4217_code.data, 3); + return iso4217_code_arr; +} +int64_t CS_LDK_LDKAmount_Currency_get_amount(int64_t ptr) { + LDKAmount *obj = (LDKAmount*)untag_ptr(ptr); + CHECK(obj->tag == LDKAmount_Currency); + int64_t amount_conv = obj->currency.amount; + return amount_conv; +} +uint32_t CS_LDK_LDKCOption_AmountZ_ty_from_ptr(int64_t ptr) { + LDKCOption_AmountZ *obj = (LDKCOption_AmountZ*)untag_ptr(ptr); + switch(obj->tag) { + case LDKCOption_AmountZ_Some: return 0; + case LDKCOption_AmountZ_None: return 1; + default: abort(); + } +} +int64_t CS_LDK_LDKCOption_AmountZ_Some_get_some(int64_t ptr) { + LDKCOption_AmountZ *obj = (LDKCOption_AmountZ*)untag_ptr(ptr); + CHECK(obj->tag == LDKCOption_AmountZ_Some); + int64_t some_ref = tag_ptr(&obj->some, false); + return some_ref; +} +uint32_t CS_LDK_LDKQuantity_ty_from_ptr(int64_t ptr) { + LDKQuantity *obj = (LDKQuantity*)untag_ptr(ptr); + switch(obj->tag) { + case LDKQuantity_Bounded: return 0; + case LDKQuantity_Unbounded: return 1; + case LDKQuantity_One: return 2; + default: abort(); + } +} +int64_t CS_LDK_LDKQuantity_Bounded_get_bounded(int64_t ptr) { + LDKQuantity *obj = (LDKQuantity*)untag_ptr(ptr); + CHECK(obj->tag == LDKQuantity_Bounded); + int64_t bounded_conv = obj->bounded; + return bounded_conv; +} +uint32_t CS_LDK_LDKCOption_QuantityZ_ty_from_ptr(int64_t ptr) { + LDKCOption_QuantityZ *obj = (LDKCOption_QuantityZ*)untag_ptr(ptr); + switch(obj->tag) { + case LDKCOption_QuantityZ_Some: return 0; + case LDKCOption_QuantityZ_None: return 1; + default: abort(); + } +} +int64_t CS_LDK_LDKCOption_QuantityZ_Some_get_some(int64_t ptr) { + LDKCOption_QuantityZ *obj = (LDKCOption_QuantityZ*)untag_ptr(ptr); + CHECK(obj->tag == LDKCOption_QuantityZ_Some); + int64_t some_ref = tag_ptr(&obj->some, false); + return some_ref; +} static inline struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesNoneZ_get_ok(LDKCResult_ThirtyTwoBytesNoneZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return ThirtyTwoBytes_clone(&*owner->contents.result); @@ -1575,44 +1803,45 @@ void CS_LDK_CResult_RecoverableSignatureNoneZ_get_err(int64_t owner) { CResult_RecoverableSignatureNoneZ_get_err(owner_conv); } -static inline struct LDKSchnorrSignature CResult_SchnorrSignatureNoneZ_get_ok(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){ +static inline struct LDKECDSASignature CResult_ECDSASignatureNoneZ_get_ok(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return *owner->contents.result; } -int8_tArray CS_LDK_CResult_SchnorrSignatureNoneZ_get_ok(int64_t owner) { - LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner); +int8_tArray CS_LDK_CResult_ECDSASignatureNoneZ_get_ok(int64_t owner) { + LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner); int8_tArray ret_arr = init_int8_tArray(64, __LINE__); - memcpy(ret_arr->elems, CResult_SchnorrSignatureNoneZ_get_ok(owner_conv).compact_form, 64); + memcpy(ret_arr->elems, CResult_ECDSASignatureNoneZ_get_ok(owner_conv).compact_form, 64); return ret_arr; } -static inline void CResult_SchnorrSignatureNoneZ_get_err(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){ +static inline void CResult_ECDSASignatureNoneZ_get_err(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){ CHECK(!owner->result_ok); return *owner->contents.err; } -void CS_LDK_CResult_SchnorrSignatureNoneZ_get_err(int64_t owner) { - LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner); - CResult_SchnorrSignatureNoneZ_get_err(owner_conv); +void CS_LDK_CResult_ECDSASignatureNoneZ_get_err(int64_t owner) { + LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner); + CResult_ECDSASignatureNoneZ_get_err(owner_conv); } -static inline struct LDKECDSASignature CResult_ECDSASignatureNoneZ_get_ok(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){ +static inline struct LDKTransaction CResult_TransactionNoneZ_get_ok(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return *owner->contents.result; } -int8_tArray CS_LDK_CResult_ECDSASignatureNoneZ_get_ok(int64_t owner) { - LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner); - int8_tArray ret_arr = init_int8_tArray(64, __LINE__); - memcpy(ret_arr->elems, CResult_ECDSASignatureNoneZ_get_ok(owner_conv).compact_form, 64); +int8_tArray CS_LDK_CResult_TransactionNoneZ_get_ok(int64_t owner) { + LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner); + LDKTransaction ret_var = CResult_TransactionNoneZ_get_ok(owner_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); return ret_arr; } -static inline void CResult_ECDSASignatureNoneZ_get_err(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){ +static inline void CResult_TransactionNoneZ_get_err(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){ CHECK(!owner->result_ok); return *owner->contents.err; } -void CS_LDK_CResult_ECDSASignatureNoneZ_get_err(int64_t owner) { - LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner); - CResult_ECDSASignatureNoneZ_get_err(owner_conv); +void CS_LDK_CResult_TransactionNoneZ_get_err(int64_t owner) { + LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner); + CResult_TransactionNoneZ_get_err(owner_conv); } static inline struct LDKECDSASignature C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_a(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ *NONNULL_PTR owner){ @@ -2485,27 +2714,6 @@ int64_t CS_LDK_CResult_InMemorySignerDecodeErrorZ_get_err(int64_t owner) { return ret_ref; } -static inline struct LDKTransaction CResult_TransactionNoneZ_get_ok(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){ -CHECK(owner->result_ok); - return *owner->contents.result; -} -int8_tArray CS_LDK_CResult_TransactionNoneZ_get_ok(int64_t owner) { - LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner); - LDKTransaction ret_var = CResult_TransactionNoneZ_get_ok(owner_conv); - int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); - memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); - return ret_arr; -} - -static inline void CResult_TransactionNoneZ_get_err(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return *owner->contents.err; -} -void CS_LDK_CResult_TransactionNoneZ_get_err(int64_t owner) { - LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner); - CResult_TransactionNoneZ_get_err(owner_conv); -} - uint32_t CS_LDK_LDKCandidateRouteHop_ty_from_ptr(int64_t ptr) { LDKCandidateRouteHop *obj = (LDKCandidateRouteHop*)untag_ptr(ptr); switch(obj->tag) { @@ -3537,6 +3745,32 @@ int64_t CS_LDK_CResult_ProbabilisticScorerDecodeErrorZ_get_err(int64_t owner) { return ret_ref; } +static inline struct LDKBestBlock CResult_BestBlockDecodeErrorZ_get_ok(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR owner){ + LDKBestBlock ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_BestBlockDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_BestBlockDecodeErrorZ* owner_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(owner); + LDKBestBlock ret_var = CResult_BestBlockDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_BestBlockDecodeErrorZ_get_err(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +int64_t CS_LDK_CResult_BestBlockDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_BestBlockDecodeErrorZ* owner_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_BestBlockDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + static inline uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR owner){ return owner->a; } @@ -3620,12 +3854,48 @@ void CS_LDK_CResult_ChannelMonitorUpdateStatusNoneZ_get_err(int64_t owner) { CResult_ChannelMonitorUpdateStatusNoneZ_get_err(owner_conv); } +uint32_t CS_LDK_LDKClosureReason_ty_from_ptr(int64_t ptr) { + LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr); + switch(obj->tag) { + case LDKClosureReason_CounterpartyForceClosed: return 0; + case LDKClosureReason_HolderForceClosed: return 1; + case LDKClosureReason_LegacyCooperativeClosure: return 2; + case LDKClosureReason_CounterpartyInitiatedCooperativeClosure: return 3; + case LDKClosureReason_LocallyInitiatedCooperativeClosure: return 4; + case LDKClosureReason_CommitmentTxConfirmed: return 5; + case LDKClosureReason_FundingTimedOut: return 6; + case LDKClosureReason_ProcessingError: return 7; + case LDKClosureReason_DisconnectedPeer: return 8; + case LDKClosureReason_OutdatedChannelManager: return 9; + case LDKClosureReason_CounterpartyCoopClosedUnfundedChannel: return 10; + case LDKClosureReason_FundingBatchClosure: return 11; + case LDKClosureReason_HTLCsTimedOut: return 12; + default: abort(); + } +} +int64_t CS_LDK_LDKClosureReason_CounterpartyForceClosed_get_peer_msg(int64_t ptr) { + LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr); + CHECK(obj->tag == LDKClosureReason_CounterpartyForceClosed); + LDKUntrustedString peer_msg_var = obj->counterparty_force_closed.peer_msg; + int64_t peer_msg_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(peer_msg_var); + peer_msg_ref = tag_ptr(peer_msg_var.inner, false); + return peer_msg_ref; +} +jstring CS_LDK_LDKClosureReason_ProcessingError_get_err(int64_t ptr) { + LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr); + CHECK(obj->tag == LDKClosureReason_ProcessingError); + LDKStr err_str = obj->processing_error.err; + jstring err_conv = str_ref_to_cs(err_str.chars, err_str.len); + return err_conv; +} uint32_t CS_LDK_LDKMonitorEvent_ty_from_ptr(int64_t ptr) { LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr); switch(obj->tag) { case LDKMonitorEvent_HTLCEvent: return 0; - case LDKMonitorEvent_HolderForceClosed: return 1; - case LDKMonitorEvent_Completed: return 2; + case LDKMonitorEvent_HolderForceClosedWithInfo: return 1; + case LDKMonitorEvent_HolderForceClosed: return 2; + case LDKMonitorEvent_Completed: return 3; default: abort(); } } @@ -3638,6 +3908,30 @@ int64_t CS_LDK_LDKMonitorEvent_HTLCEvent_get_htlc_event(int64_t ptr) { htlc_event_ref = tag_ptr(htlc_event_var.inner, false); return htlc_event_ref; } +int64_t CS_LDK_LDKMonitorEvent_HolderForceClosedWithInfo_get_reason(int64_t ptr) { + LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr); + CHECK(obj->tag == LDKMonitorEvent_HolderForceClosedWithInfo); + int64_t reason_ref = tag_ptr(&obj->holder_force_closed_with_info.reason, false); + return reason_ref; +} +int64_t CS_LDK_LDKMonitorEvent_HolderForceClosedWithInfo_get_outpoint(int64_t ptr) { + LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr); + CHECK(obj->tag == LDKMonitorEvent_HolderForceClosedWithInfo); + LDKOutPoint outpoint_var = obj->holder_force_closed_with_info.outpoint; + int64_t outpoint_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_var); + outpoint_ref = tag_ptr(outpoint_var.inner, false); + return outpoint_ref; +} +int64_t CS_LDK_LDKMonitorEvent_HolderForceClosedWithInfo_get_channel_id(int64_t ptr) { + LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr); + CHECK(obj->tag == LDKMonitorEvent_HolderForceClosedWithInfo); + LDKChannelId channel_id_var = obj->holder_force_closed_with_info.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; +} int64_t CS_LDK_LDKMonitorEvent_HolderForceClosed_get_holder_force_closed(int64_t ptr) { LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr); CHECK(obj->tag == LDKMonitorEvent_HolderForceClosed); @@ -3656,6 +3950,15 @@ int64_t CS_LDK_LDKMonitorEvent_Completed_get_funding_txo(int64_t ptr) { funding_txo_ref = tag_ptr(funding_txo_var.inner, false); return funding_txo_ref; } +int64_t CS_LDK_LDKMonitorEvent_Completed_get_channel_id(int64_t ptr) { + LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr); + CHECK(obj->tag == LDKMonitorEvent_Completed); + LDKChannelId channel_id_var = obj->completed.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; +} int64_t CS_LDK_LDKMonitorEvent_Completed_get_monitor_update_id(int64_t ptr) { LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr); CHECK(obj->tag == LDKMonitorEvent_Completed); @@ -3669,26 +3972,40 @@ static inline LDKCVec_MonitorEventZ CVec_MonitorEventZ_clone(const LDKCVec_Monit } return ret; } -static inline struct LDKOutPoint C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ +static inline struct LDKOutPoint C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ LDKOutPoint ret = owner->a; ret.is_owned = false; return ret; } -int64_t CS_LDK_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(int64_t owner) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); - LDKOutPoint ret_var = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(owner_conv); +int64_t CS_LDK_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(int64_t owner) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); + LDKOutPoint ret_var = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKChannelId C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ + LDKChannelId ret = owner->b; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(int64_t owner) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); + LDKChannelId ret_var = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(owner_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -static inline struct LDKCVec_MonitorEventZ C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ - return CVec_MonitorEventZ_clone(&owner->b); +static inline struct LDKCVec_MonitorEventZ C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ + return CVec_MonitorEventZ_clone(&owner->c); } -int64_tArray CS_LDK_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(int64_t owner) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); - LDKCVec_MonitorEventZ ret_var = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(owner_conv); +int64_tArray CS_LDK_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(int64_t owner) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); + LDKCVec_MonitorEventZ ret_var = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(owner_conv); int64_tArray ret_arr = NULL; ret_arr = init_int64_tArray(ret_var.datalen, __LINE__); int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8); @@ -3703,20 +4020,20 @@ int64_tArray CS_LDK_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(int64_t return ret_arr; } -static inline struct LDKPublicKey C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ - return owner->c; +static inline struct LDKPublicKey C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ + return owner->d; } -int8_tArray CS_LDK_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(int64_t owner) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); +int8_tArray CS_LDK_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(int64_t owner) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(owner_conv).compressed_form, 33); + memcpy(ret_arr->elems, C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(owner_conv).compressed_form, 33); return ret_arr; } -static inline LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_clone(const LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ *orig) { - LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ) * orig->datalen, "LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ clone bytes"), .datalen = orig->datalen }; +static inline LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_clone(const LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ *orig) { + LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ) * orig->datalen, "LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ clone bytes"), .datalen = orig->datalen }; for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(&orig->data[i]); + ret.data[i] = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(&orig->data[i]); } return ret; } @@ -3902,6 +4219,123 @@ int64_t CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(int64_t owner) { return ret_ref; } +static inline struct LDKOfferId CResult_OfferIdDecodeErrorZ_get_ok(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR owner){ + LDKOfferId ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_OfferIdDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_OfferIdDecodeErrorZ* owner_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(owner); + LDKOfferId ret_var = CResult_OfferIdDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_OfferIdDecodeErrorZ_get_err(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +int64_t CS_LDK_CResult_OfferIdDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_OfferIdDecodeErrorZ* owner_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_OfferIdDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline void CResult_NoneBolt12SemanticErrorZ_get_ok(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return *owner->contents.result; +} +void CS_LDK_CResult_NoneBolt12SemanticErrorZ_get_ok(int64_t owner) { + LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner); + CResult_NoneBolt12SemanticErrorZ_get_ok(owner_conv); +} + +static inline enum LDKBolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +int32_t CS_LDK_CResult_NoneBolt12SemanticErrorZ_get_err(int64_t owner) { + LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner); + int32_t ret_conv = LDKBolt12SemanticError_to_cs(CResult_NoneBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKOffer CResult_OfferBolt12SemanticErrorZ_get_ok(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKOffer ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_OfferBolt12SemanticErrorZ_get_ok(int64_t owner) { + LDKCResult_OfferBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(owner); + LDKOffer ret_var = CResult_OfferBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_OfferBolt12SemanticErrorZ_get_err(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +int32_t CS_LDK_CResult_OfferBolt12SemanticErrorZ_get_err(int64_t owner) { + LDKCResult_OfferBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(owner); + int32_t ret_conv = LDKBolt12SemanticError_to_cs(CResult_OfferBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKInvoiceRequestWithDerivedPayerIdBuilder CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKInvoiceRequestWithDerivedPayerIdBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(int64_t owner) { + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKInvoiceRequestWithDerivedPayerIdBuilder ret_var = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +int32_t CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(int64_t owner) { + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + int32_t ret_conv = LDKBolt12SemanticError_to_cs(CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKInvoiceRequestWithExplicitPayerIdBuilder CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKInvoiceRequestWithExplicitPayerIdBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(int64_t owner) { + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKInvoiceRequestWithExplicitPayerIdBuilder ret_var = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +int32_t CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(int64_t owner) { + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + int32_t ret_conv = LDKBolt12SemanticError_to_cs(CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + static inline struct LDKOffer CResult_OfferBolt12ParseErrorZ_get_ok(LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR owner){ LDKOffer ret = *owner->contents.result; ret.is_owned = false; @@ -3930,27 +4364,6 @@ int64_t CS_LDK_CResult_OfferBolt12ParseErrorZ_get_err(int64_t owner) { return ret_ref; } -static inline struct LDKPublicKey CResult_PublicKeySecp256k1ErrorZ_get_ok(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){ -CHECK(owner->result_ok); - return *owner->contents.result; -} -int8_tArray CS_LDK_CResult_PublicKeySecp256k1ErrorZ_get_ok(int64_t owner) { - LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner); - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, CResult_PublicKeySecp256k1ErrorZ_get_ok(owner_conv).compressed_form, 33); - return ret_arr; -} - -static inline enum LDKSecp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return *owner->contents.err; -} -int32_t CS_LDK_CResult_PublicKeySecp256k1ErrorZ_get_err(int64_t owner) { - LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner); - int32_t ret_conv = LDKSecp256k1Error_to_cs(CResult_PublicKeySecp256k1ErrorZ_get_err(owner_conv)); - return ret_conv; -} - static inline struct LDKNodeId CResult_NodeIdDecodeErrorZ_get_ok(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR owner){ LDKNodeId ret = *owner->contents.result; ret.is_owned = false; @@ -3977,6 +4390,27 @@ int64_t CS_LDK_CResult_NodeIdDecodeErrorZ_get_err(int64_t owner) { return ret_ref; } +static inline struct LDKPublicKey CResult_PublicKeySecp256k1ErrorZ_get_ok(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return *owner->contents.result; +} +int8_tArray CS_LDK_CResult_PublicKeySecp256k1ErrorZ_get_ok(int64_t owner) { + LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner); + int8_tArray ret_arr = init_int8_tArray(33, __LINE__); + memcpy(ret_arr->elems, CResult_PublicKeySecp256k1ErrorZ_get_ok(owner_conv).compressed_form, 33); + return ret_arr; +} + +static inline enum LDKSecp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return *owner->contents.err; +} +int32_t CS_LDK_CResult_PublicKeySecp256k1ErrorZ_get_err(int64_t owner) { + LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner); + int32_t ret_conv = LDKSecp256k1Error_to_cs(CResult_PublicKeySecp256k1ErrorZ_get_err(owner_conv)); + return ret_conv; +} + uint32_t CS_LDK_LDKNetworkUpdate_ty_from_ptr(int64_t ptr) { LDKNetworkUpdate *obj = (LDKNetworkUpdate*)untag_ptr(ptr); switch(obj->tag) { @@ -5261,6 +5695,26 @@ int64_tArray CS_LDK_LDKCOption_CVec_SocketAddressZZ_Some_get_some(int64_t ptr) { return some_arr; } +static inline uint64_t CResult_u64ShortChannelIdErrorZ_get_ok(LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return *owner->contents.result; +} +int64_t CS_LDK_CResult_u64ShortChannelIdErrorZ_get_ok(int64_t owner) { + LDKCResult_u64ShortChannelIdErrorZ* owner_conv = (LDKCResult_u64ShortChannelIdErrorZ*)untag_ptr(owner); + int64_t ret_conv = CResult_u64ShortChannelIdErrorZ_get_ok(owner_conv); + return ret_conv; +} + +static inline enum LDKShortChannelIdError CResult_u64ShortChannelIdErrorZ_get_err(LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return ShortChannelIdError_clone(&*owner->contents.err); +} +int32_t CS_LDK_CResult_u64ShortChannelIdErrorZ_get_err(int64_t owner) { + LDKCResult_u64ShortChannelIdErrorZ* owner_conv = (LDKCResult_u64ShortChannelIdErrorZ*)untag_ptr(owner); + int32_t ret_conv = LDKShortChannelIdError_to_cs(CResult_u64ShortChannelIdErrorZ_get_err(owner_conv)); + return ret_conv; +} + static inline struct LDKPendingHTLCInfo CResult_PendingHTLCInfoInboundHTLCErrZ_get_ok(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR owner){ LDKPendingHTLCInfo ret = *owner->contents.result; ret.is_owned = false; @@ -5385,6 +5839,56 @@ void CS_LDK_CResult_CVec_UtxoZNoneZ_get_err(int64_t owner) { CResult_CVec_UtxoZNoneZ_get_err(owner_conv); } +uint32_t CS_LDK_LDKPaymentContext_ty_from_ptr(int64_t ptr) { + LDKPaymentContext *obj = (LDKPaymentContext*)untag_ptr(ptr); + switch(obj->tag) { + case LDKPaymentContext_Unknown: return 0; + case LDKPaymentContext_Bolt12Offer: return 1; + case LDKPaymentContext_Bolt12Refund: return 2; + default: abort(); + } +} +int64_t CS_LDK_LDKPaymentContext_Unknown_get_unknown(int64_t ptr) { + LDKPaymentContext *obj = (LDKPaymentContext*)untag_ptr(ptr); + CHECK(obj->tag == LDKPaymentContext_Unknown); + LDKUnknownPaymentContext unknown_var = obj->unknown; + int64_t unknown_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(unknown_var); + unknown_ref = tag_ptr(unknown_var.inner, false); + return unknown_ref; +} +int64_t CS_LDK_LDKPaymentContext_Bolt12Offer_get_bolt12_offer(int64_t ptr) { + LDKPaymentContext *obj = (LDKPaymentContext*)untag_ptr(ptr); + CHECK(obj->tag == LDKPaymentContext_Bolt12Offer); + LDKBolt12OfferContext bolt12_offer_var = obj->bolt12_offer; + int64_t bolt12_offer_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(bolt12_offer_var); + bolt12_offer_ref = tag_ptr(bolt12_offer_var.inner, false); + return bolt12_offer_ref; +} +int64_t CS_LDK_LDKPaymentContext_Bolt12Refund_get_bolt12_refund(int64_t ptr) { + LDKPaymentContext *obj = (LDKPaymentContext*)untag_ptr(ptr); + CHECK(obj->tag == LDKPaymentContext_Bolt12Refund); + LDKBolt12RefundContext bolt12_refund_var = obj->bolt12_refund; + int64_t bolt12_refund_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(bolt12_refund_var); + bolt12_refund_ref = tag_ptr(bolt12_refund_var.inner, false); + return bolt12_refund_ref; +} +uint32_t CS_LDK_LDKCOption_PaymentContextZ_ty_from_ptr(int64_t ptr) { + LDKCOption_PaymentContextZ *obj = (LDKCOption_PaymentContextZ*)untag_ptr(ptr); + switch(obj->tag) { + case LDKCOption_PaymentContextZ_Some: return 0; + case LDKCOption_PaymentContextZ_None: return 1; + default: abort(); + } +} +int64_t CS_LDK_LDKCOption_PaymentContextZ_Some_get_some(int64_t ptr) { + LDKCOption_PaymentContextZ *obj = (LDKCOption_PaymentContextZ*)untag_ptr(ptr); + CHECK(obj->tag == LDKCOption_PaymentContextZ_Some); + int64_t some_ref = tag_ptr(&obj->some, false); + return some_ref; +} static inline uint64_t C2Tuple_u64u16Z_get_a(LDKC2Tuple_u64u16Z *NONNULL_PTR owner){ return owner->a; } @@ -5433,25 +5937,28 @@ int32_t CS_LDK_LDKCOption_ChannelShutdownStateZ_Some_get_some(int64_t ptr) { int32_t some_conv = LDKChannelShutdownState_to_cs(obj->some); return some_conv; } -static inline struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesAPIErrorZ_get_ok(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){ -CHECK(owner->result_ok); - return ThirtyTwoBytes_clone(&*owner->contents.result); +static inline struct LDKChannelId CResult_ChannelIdAPIErrorZ_get_ok(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR owner){ + LDKChannelId ret = *owner->contents.result; + ret.is_owned = false; + return ret; } -int8_tArray CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_get_ok(int64_t owner) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner); - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, CResult_ThirtyTwoBytesAPIErrorZ_get_ok(owner_conv).data, 32); - return ret_arr; +int64_t CS_LDK_CResult_ChannelIdAPIErrorZ_get_ok(int64_t owner) { + LDKCResult_ChannelIdAPIErrorZ* owner_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(owner); + LDKChannelId ret_var = CResult_ChannelIdAPIErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -static inline struct LDKAPIError CResult_ThirtyTwoBytesAPIErrorZ_get_err(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){ +static inline struct LDKAPIError CResult_ChannelIdAPIErrorZ_get_err(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR owner){ CHECK(!owner->result_ok); return APIError_clone(&*owner->contents.err); } -int64_t CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_get_err(int64_t owner) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner); +int64_t CS_LDK_CResult_ChannelIdAPIErrorZ_get_err(int64_t owner) { + LDKCResult_ChannelIdAPIErrorZ* owner_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(owner); LDKAPIError *ret_copy = MALLOC(sizeof(LDKAPIError), "LDKAPIError"); - *ret_copy = CResult_ThirtyTwoBytesAPIErrorZ_get_err(owner_conv); + *ret_copy = CResult_ChannelIdAPIErrorZ_get_err(owner_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -5786,33 +6293,68 @@ int64_t CS_LDK_CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFail return ret_ref; } -static inline struct LDKThirtyTwoBytes C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR owner){ - return ThirtyTwoBytes_clone(&owner->a); +static inline struct LDKChannelId C2Tuple_ChannelIdPublicKeyZ_get_a(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR owner){ + LDKChannelId ret = owner->a; + ret.is_owned = false; + return ret; } -int8_tArray CS_LDK_C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(int64_t owner) { - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* owner_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(owner); - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(owner_conv).data, 32); - return ret_arr; +int64_t CS_LDK_C2Tuple_ChannelIdPublicKeyZ_get_a(int64_t owner) { + LDKC2Tuple_ChannelIdPublicKeyZ* owner_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(owner); + LDKChannelId ret_var = C2Tuple_ChannelIdPublicKeyZ_get_a(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -static inline struct LDKPublicKey C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR owner){ +static inline struct LDKPublicKey C2Tuple_ChannelIdPublicKeyZ_get_b(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR owner){ return owner->b; } -int8_tArray CS_LDK_C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(int64_t owner) { - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* owner_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(owner); +int8_tArray CS_LDK_C2Tuple_ChannelIdPublicKeyZ_get_b(int64_t owner) { + LDKC2Tuple_ChannelIdPublicKeyZ* owner_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(owner); int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(owner_conv).compressed_form, 33); + memcpy(ret_arr->elems, C2Tuple_ChannelIdPublicKeyZ_get_b(owner_conv).compressed_form, 33); return ret_arr; } -static inline LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_clone(const LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ *orig) { - LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ) * orig->datalen, "LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ clone bytes"), .datalen = orig->datalen }; +static inline LDKCVec_C2Tuple_ChannelIdPublicKeyZZ CVec_C2Tuple_ChannelIdPublicKeyZZ_clone(const LDKCVec_C2Tuple_ChannelIdPublicKeyZZ *orig) { + LDKCVec_C2Tuple_ChannelIdPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ) * orig->datalen, "LDKCVec_C2Tuple_ChannelIdPublicKeyZZ clone bytes"), .datalen = orig->datalen }; for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(&orig->data[i]); + ret.data[i] = C2Tuple_ChannelIdPublicKeyZ_clone(&orig->data[i]); } return ret; } +static inline LDKCVec_ChannelIdZ CVec_ChannelIdZ_clone(const LDKCVec_ChannelIdZ *orig) { + LDKCVec_ChannelIdZ ret = { .data = MALLOC(sizeof(LDKChannelId) * orig->datalen, "LDKCVec_ChannelIdZ clone bytes"), .datalen = orig->datalen }; + for (size_t i = 0; i < ret.datalen; i++) { + ret.data[i] = ChannelId_clone(&orig->data[i]); + } + return ret; +} +static inline struct LDKOfferWithDerivedMetadataBuilder CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKOfferWithDerivedMetadataBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(int64_t owner) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKOfferWithDerivedMetadataBuilder ret_var = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +int32_t CS_LDK_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(int64_t owner) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + int32_t ret_conv = LDKBolt12SemanticError_to_cs(CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + uint32_t CS_LDK_LDKCOption_StrZ_ty_from_ptr(int64_t ptr) { LDKCOption_StrZ *obj = (LDKCOption_StrZ*)untag_ptr(ptr); switch(obj->tag) { @@ -5828,25 +6370,6 @@ jstring CS_LDK_LDKCOption_StrZ_Some_get_some(int64_t ptr) { jstring some_conv = str_ref_to_cs(some_str.chars, some_str.len); return some_conv; } -static inline void CResult_NoneBolt12SemanticErrorZ_get_ok(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){ -CHECK(owner->result_ok); - return *owner->contents.result; -} -void CS_LDK_CResult_NoneBolt12SemanticErrorZ_get_ok(int64_t owner) { - LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner); - CResult_NoneBolt12SemanticErrorZ_get_ok(owner_conv); -} - -static inline enum LDKBolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return Bolt12SemanticError_clone(&*owner->contents.err); -} -int32_t CS_LDK_CResult_NoneBolt12SemanticErrorZ_get_err(int64_t owner) { - LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner); - int32_t ret_conv = LDKBolt12SemanticError_to_cs(CResult_NoneBolt12SemanticErrorZ_get_err(owner_conv)); - return ret_conv; -} - static inline struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_ok(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return C2Tuple_ThirtyTwoBytesThirtyTwoBytesZ_clone(&*owner->contents.result); @@ -5867,6 +6390,29 @@ void CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_err(int64_t CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_err(owner_conv); } +static inline struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesAPIErrorZ_get_ok(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return ThirtyTwoBytes_clone(&*owner->contents.result); +} +int8_tArray CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_get_ok(int64_t owner) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner); + int8_tArray ret_arr = init_int8_tArray(32, __LINE__); + memcpy(ret_arr->elems, CResult_ThirtyTwoBytesAPIErrorZ_get_ok(owner_conv).data, 32); + return ret_arr; +} + +static inline struct LDKAPIError CResult_ThirtyTwoBytesAPIErrorZ_get_err(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return APIError_clone(&*owner->contents.err); +} +int64_t CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_get_err(int64_t owner) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner); + LDKAPIError *ret_copy = MALLOC(sizeof(LDKAPIError), "LDKAPIError"); + *ret_copy = CResult_ThirtyTwoBytesAPIErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + uint32_t CS_LDK_LDKOffersMessage_ty_from_ptr(int64_t ptr) { LDKOffersMessage *obj = (LDKOffersMessage*)untag_ptr(ptr); switch(obj->tag) { @@ -6162,6 +6708,12 @@ int64_t CS_LDK_LDKPendingHTLCRouting_Receive_get_payment_metadata(int64_t ptr) { int64_t payment_metadata_ref = tag_ptr(&obj->receive.payment_metadata, false); return payment_metadata_ref; } +int64_t CS_LDK_LDKPendingHTLCRouting_Receive_get_payment_context(int64_t ptr) { + LDKPendingHTLCRouting *obj = (LDKPendingHTLCRouting*)untag_ptr(ptr); + CHECK(obj->tag == LDKPendingHTLCRouting_Receive); + int64_t payment_context_ref = tag_ptr(&obj->receive.payment_context, false); + return payment_context_ref; +} int32_t CS_LDK_LDKPendingHTLCRouting_Receive_get_incoming_cltv_expiry(int64_t ptr) { LDKPendingHTLCRouting *obj = (LDKPendingHTLCRouting*)untag_ptr(ptr); CHECK(obj->tag == LDKPendingHTLCRouting_Receive); @@ -6241,6 +6793,12 @@ int64_tArray CS_LDK_LDKPendingHTLCRouting_ReceiveKeysend_get_custom_tlvs(int64_t return custom_tlvs_arr; } +jboolean CS_LDK_LDKPendingHTLCRouting_ReceiveKeysend_get_requires_blinded_error(int64_t ptr) { + LDKPendingHTLCRouting *obj = (LDKPendingHTLCRouting*)untag_ptr(ptr); + CHECK(obj->tag == LDKPendingHTLCRouting_ReceiveKeysend); + jboolean requires_blinded_error_conv = obj->receive_keysend.requires_blinded_error; + return requires_blinded_error_conv; +} static inline struct LDKPendingHTLCRouting CResult_PendingHTLCRoutingDecodeErrorZ_get_ok(LDKCResult_PendingHTLCRoutingDecodeErrorZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return PendingHTLCRouting_clone(&*owner->contents.result); @@ -6384,23 +6942,23 @@ LDKChannelMonitorUpdateStatus update_channel_LDKWatch_jcall(const void* this_arg LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_cs(ret); return ret_conv; } -LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ release_pending_monitor_events_LDKWatch_jcall(const void* this_arg) { +LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ release_pending_monitor_events_LDKWatch_jcall(const void* this_arg) { LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg; int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 29); - LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret_constr; + LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ ret_constr; ret_constr.datalen = ret->arr_len; if (ret_constr.datalen > 0) - ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ Elements"); + ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ Elements"); else ret_constr.data = NULL; int64_t* ret_vals = ret->elems; - for (size_t x = 0; x < ret_constr.datalen; x++) { - int64_t ret_conv_49 = ret_vals[x]; - void* ret_conv_49_ptr = untag_ptr(ret_conv_49); - CHECK_ACCESS(ret_conv_49_ptr); - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ ret_conv_49_conv = *(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)(ret_conv_49_ptr); - FREE(untag_ptr(ret_conv_49)); - ret_constr.data[x] = ret_conv_49_conv; + for (size_t f = 0; f < ret_constr.datalen; f++) { + int64_t ret_conv_57 = ret_vals[f]; + void* ret_conv_57_ptr = untag_ptr(ret_conv_57); + CHECK_ACCESS(ret_conv_57_ptr); + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ ret_conv_57_conv = *(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)(ret_conv_57_ptr); + FREE(untag_ptr(ret_conv_57)); + ret_constr.data[f] = ret_conv_57_conv; } FREE(ret); return ret_constr; @@ -6469,14 +7027,14 @@ int64_tArray CS_LDK_Watch_release_pending_monitor_events(int64_t this_arg) { void* this_arg_ptr = untag_ptr(this_arg); if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } LDKWatch* this_arg_conv = (LDKWatch*)this_arg_ptr; - LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret_var = (this_arg_conv->release_pending_monitor_events)(this_arg_conv->this_arg); + LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ ret_var = (this_arg_conv->release_pending_monitor_events)(this_arg_conv->this_arg); int64_tArray ret_arr = NULL; ret_arr = init_int64_tArray(ret_var.datalen, __LINE__); int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8); - for (size_t x = 0; x < ret_var.datalen; x++) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv_49_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ"); - *ret_conv_49_conv = ret_var.data[x]; - ret_arr_ptr[x] = tag_ptr(ret_conv_49_conv, true); + for (size_t f = 0; f < ret_var.datalen; f++) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv_57_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ"); + *ret_conv_57_conv = ret_var.data[f]; + ret_arr_ptr[f] = tag_ptr(ret_conv_57_conv, true); } FREE(ret_var.data); @@ -6709,7 +7267,7 @@ LDKCResult_SchnorrSignatureNoneZ sign_bolt12_invoice_request_LDKNodeSigner_jcall LDKNodeSigner_JCalls *j_calls = (LDKNodeSigner_JCalls*) this_arg; LDKUnsignedInvoiceRequest invoice_request_var = *invoice_request; int64_t invoice_request_ref = 0; - // WARNING: we may need a move here but no clone is available for LDKUnsignedInvoiceRequest + invoice_request_var = UnsignedInvoiceRequest_clone(&invoice_request_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_request_var); invoice_request_ref = tag_ptr(invoice_request_var.inner, invoice_request_var.is_owned); uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 36, invoice_request_ref); @@ -6723,7 +7281,7 @@ LDKCResult_SchnorrSignatureNoneZ sign_bolt12_invoice_LDKNodeSigner_jcall(const v LDKNodeSigner_JCalls *j_calls = (LDKNodeSigner_JCalls*) this_arg; LDKUnsignedBolt12Invoice invoice_var = *invoice; int64_t invoice_ref = 0; - // WARNING: we may need a move here but no clone is available for LDKUnsignedBolt12Invoice + invoice_var = UnsignedBolt12Invoice_clone(&invoice_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_var); invoice_ref = tag_ptr(invoice_var.inner, invoice_var.is_owned); uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 37, invoice_ref); @@ -8408,34 +8966,6 @@ int64_t CS_LDK_LDKCOption_SocketAddressZ_Some_get_some(int64_t ptr) { int64_t some_ref = tag_ptr(&obj->some, false); return some_ref; } -static inline struct LDKPublicKey C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR owner){ - return owner->a; -} -int8_tArray CS_LDK_C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(int64_t owner) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* owner_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(owner); - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(owner_conv).compressed_form, 33); - return ret_arr; -} - -static inline struct LDKCOption_SocketAddressZ C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR owner){ - return COption_SocketAddressZ_clone(&owner->b); -} -int64_t CS_LDK_C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(int64_t owner) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* owner_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(owner); - LDKCOption_SocketAddressZ *ret_copy = MALLOC(sizeof(LDKCOption_SocketAddressZ), "LDKCOption_SocketAddressZ"); - *ret_copy = C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(owner_conv); - int64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -static inline LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_clone(const LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ *orig) { - LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ) * orig->datalen, "LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ clone bytes"), .datalen = orig->datalen }; - for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(&orig->data[i]); - } - return ret; -} static inline struct LDKCVec_u8Z CResult_CVec_u8ZPeerHandleErrorZ_get_ok(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return CVec_u8Z_clone(&*owner->contents.result); @@ -8665,6 +9195,54 @@ int32_t CS_LDK_CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_get_err(in return ret_conv; } +static inline struct LDKUnsignedInvoiceRequest CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKUnsignedInvoiceRequest ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(int64_t owner) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner); + LDKUnsignedInvoiceRequest ret_var = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +int32_t CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(int64_t owner) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner); + int32_t ret_conv = LDKBolt12SemanticError_to_cs(CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKInvoiceRequest CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKInvoiceRequest ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(int64_t owner) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner); + LDKInvoiceRequest ret_var = CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +int32_t CS_LDK_CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(int64_t owner) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner); + int32_t ret_conv = LDKBolt12SemanticError_to_cs(CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + uint32_t CS_LDK_LDKCOption_SecretKeyZ_ty_from_ptr(int64_t ptr) { LDKCOption_SecretKeyZ *obj = (LDKCOption_SecretKeyZ*)untag_ptr(ptr); switch(obj->tag) { @@ -8680,6 +9258,30 @@ int8_tArray CS_LDK_LDKCOption_SecretKeyZ_Some_get_some(int64_t ptr) { memcpy(some_arr->elems, obj->some.bytes, 32); return some_arr; } +static inline struct LDKInvoiceWithExplicitSigningPubkeyBuilder CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKInvoiceWithExplicitSigningPubkeyBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(int64_t owner) { + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKInvoiceWithExplicitSigningPubkeyBuilder ret_var = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +int32_t CS_LDK_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(int64_t owner) { + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + int32_t ret_conv = LDKBolt12SemanticError_to_cs(CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + static inline struct LDKVerifiedInvoiceRequest CResult_VerifiedInvoiceRequestNoneZ_get_ok(LDKCResult_VerifiedInvoiceRequestNoneZ *NONNULL_PTR owner){ LDKVerifiedInvoiceRequest ret = *owner->contents.result; ret.is_owned = false; @@ -8703,6 +9305,56 @@ void CS_LDK_CResult_VerifiedInvoiceRequestNoneZ_get_err(int64_t owner) { CResult_VerifiedInvoiceRequestNoneZ_get_err(owner_conv); } +static inline struct LDKInvoiceWithDerivedSigningPubkeyBuilder CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKInvoiceWithDerivedSigningPubkeyBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(int64_t owner) { + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKInvoiceWithDerivedSigningPubkeyBuilder ret_var = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +int32_t CS_LDK_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(int64_t owner) { + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + int32_t ret_conv = LDKBolt12SemanticError_to_cs(CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKInvoiceRequestFields CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR owner){ + LDKInvoiceRequestFields ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* owner_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(owner); + LDKInvoiceRequestFields ret_var = CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +int64_t CS_LDK_CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* owner_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + static inline LDKCVec_WitnessZ CVec_WitnessZ_clone(const LDKCVec_WitnessZ *orig) { LDKCVec_WitnessZ ret = { .data = MALLOC(sizeof(LDKWitness) * orig->datalen, "LDKCVec_WitnessZ clone bytes"), .datalen = orig->datalen }; for (size_t i = 0; i < ret.datalen; i++) { @@ -8710,6 +9362,21 @@ static inline LDKCVec_WitnessZ CVec_WitnessZ_clone(const LDKCVec_WitnessZ *orig) } return ret; } +uint32_t CS_LDK_LDKCOption_ECDSASignatureZ_ty_from_ptr(int64_t ptr) { + LDKCOption_ECDSASignatureZ *obj = (LDKCOption_ECDSASignatureZ*)untag_ptr(ptr); + switch(obj->tag) { + case LDKCOption_ECDSASignatureZ_Some: return 0; + case LDKCOption_ECDSASignatureZ_None: return 1; + default: abort(); + } +} +int8_tArray CS_LDK_LDKCOption_ECDSASignatureZ_Some_get_some(int64_t ptr) { + LDKCOption_ECDSASignatureZ *obj = (LDKCOption_ECDSASignatureZ*)untag_ptr(ptr); + CHECK(obj->tag == LDKCOption_ECDSASignatureZ_Some); + int8_tArray some_arr = init_int8_tArray(64, __LINE__); + memcpy(some_arr->elems, obj->some.compact_form, 64); + return some_arr; +} uint32_t CS_LDK_LDKCOption_i64Z_ty_from_ptr(int64_t ptr) { LDKCOption_i64Z *obj = (LDKCOption_i64Z*)untag_ptr(ptr); switch(obj->tag) { @@ -10171,13 +10838,6 @@ int64_t CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_get_err(int64_t owner) return ret_ref; } -static inline LDKCVec_FutureZ CVec_FutureZ_clone(const LDKCVec_FutureZ *orig) { - LDKCVec_FutureZ ret = { .data = MALLOC(sizeof(LDKFuture) * orig->datalen, "LDKCVec_FutureZ clone bytes"), .datalen = orig->datalen }; - for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = Future_clone(&orig->data[i]); - } - return ret; -} static inline struct LDKOffersMessage CResult_OffersMessageDecodeErrorZ_get_ok(LDKCResult_OffersMessageDecodeErrorZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return OffersMessage_clone(&*owner->contents.result); @@ -10595,24 +11255,70 @@ int64_t CS_LDK_CResult_ShutdownScriptInvalidShutdownScriptZ_get_err(int64_t own uint32_t CS_LDK_LDKPaymentPurpose_ty_from_ptr(int64_t ptr) { LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); switch(obj->tag) { - case LDKPaymentPurpose_InvoicePayment: return 0; - case LDKPaymentPurpose_SpontaneousPayment: return 1; + case LDKPaymentPurpose_Bolt11InvoicePayment: return 0; + case LDKPaymentPurpose_Bolt12OfferPayment: return 1; + case LDKPaymentPurpose_Bolt12RefundPayment: return 2; + case LDKPaymentPurpose_SpontaneousPayment: return 3; default: abort(); } } -int64_t CS_LDK_LDKPaymentPurpose_InvoicePayment_get_payment_preimage(int64_t ptr) { +int64_t CS_LDK_LDKPaymentPurpose_Bolt11InvoicePayment_get_payment_preimage(int64_t ptr) { + LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); + CHECK(obj->tag == LDKPaymentPurpose_Bolt11InvoicePayment); + int64_t payment_preimage_ref = tag_ptr(&obj->bolt11_invoice_payment.payment_preimage, false); + return payment_preimage_ref; +} +int8_tArray CS_LDK_LDKPaymentPurpose_Bolt11InvoicePayment_get_payment_secret(int64_t ptr) { + LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); + CHECK(obj->tag == LDKPaymentPurpose_Bolt11InvoicePayment); + int8_tArray payment_secret_arr = init_int8_tArray(32, __LINE__); + memcpy(payment_secret_arr->elems, obj->bolt11_invoice_payment.payment_secret.data, 32); + return payment_secret_arr; +} +int64_t CS_LDK_LDKPaymentPurpose_Bolt12OfferPayment_get_payment_preimage(int64_t ptr) { + LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); + CHECK(obj->tag == LDKPaymentPurpose_Bolt12OfferPayment); + int64_t payment_preimage_ref = tag_ptr(&obj->bolt12_offer_payment.payment_preimage, false); + return payment_preimage_ref; +} +int8_tArray CS_LDK_LDKPaymentPurpose_Bolt12OfferPayment_get_payment_secret(int64_t ptr) { + LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); + CHECK(obj->tag == LDKPaymentPurpose_Bolt12OfferPayment); + int8_tArray payment_secret_arr = init_int8_tArray(32, __LINE__); + memcpy(payment_secret_arr->elems, obj->bolt12_offer_payment.payment_secret.data, 32); + return payment_secret_arr; +} +int64_t CS_LDK_LDKPaymentPurpose_Bolt12OfferPayment_get_payment_context(int64_t ptr) { + LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); + CHECK(obj->tag == LDKPaymentPurpose_Bolt12OfferPayment); + LDKBolt12OfferContext payment_context_var = obj->bolt12_offer_payment.payment_context; + int64_t payment_context_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_var); + payment_context_ref = tag_ptr(payment_context_var.inner, false); + return payment_context_ref; +} +int64_t CS_LDK_LDKPaymentPurpose_Bolt12RefundPayment_get_payment_preimage(int64_t ptr) { LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); - CHECK(obj->tag == LDKPaymentPurpose_InvoicePayment); - int64_t payment_preimage_ref = tag_ptr(&obj->invoice_payment.payment_preimage, false); + CHECK(obj->tag == LDKPaymentPurpose_Bolt12RefundPayment); + int64_t payment_preimage_ref = tag_ptr(&obj->bolt12_refund_payment.payment_preimage, false); return payment_preimage_ref; } -int8_tArray CS_LDK_LDKPaymentPurpose_InvoicePayment_get_payment_secret(int64_t ptr) { +int8_tArray CS_LDK_LDKPaymentPurpose_Bolt12RefundPayment_get_payment_secret(int64_t ptr) { LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); - CHECK(obj->tag == LDKPaymentPurpose_InvoicePayment); + CHECK(obj->tag == LDKPaymentPurpose_Bolt12RefundPayment); int8_tArray payment_secret_arr = init_int8_tArray(32, __LINE__); - memcpy(payment_secret_arr->elems, obj->invoice_payment.payment_secret.data, 32); + memcpy(payment_secret_arr->elems, obj->bolt12_refund_payment.payment_secret.data, 32); return payment_secret_arr; } +int64_t CS_LDK_LDKPaymentPurpose_Bolt12RefundPayment_get_payment_context(int64_t ptr) { + LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); + CHECK(obj->tag == LDKPaymentPurpose_Bolt12RefundPayment); + LDKBolt12RefundContext payment_context_var = obj->bolt12_refund_payment.payment_context; + int64_t payment_context_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_var); + payment_context_ref = tag_ptr(payment_context_var.inner, false); + return payment_context_ref; +} int8_tArray CS_LDK_LDKPaymentPurpose_SpontaneousPayment_get_spontaneous_payment(int64_t ptr) { LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); CHECK(obj->tag == LDKPaymentPurpose_SpontaneousPayment); @@ -10728,38 +11434,6 @@ int64_t CS_LDK_CResult_COption_PathFailureZDecodeErrorZ_get_err(int64_t owner) return ret_ref; } -uint32_t CS_LDK_LDKClosureReason_ty_from_ptr(int64_t ptr) { - LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr); - switch(obj->tag) { - case LDKClosureReason_CounterpartyForceClosed: return 0; - case LDKClosureReason_HolderForceClosed: return 1; - case LDKClosureReason_CooperativeClosure: return 2; - case LDKClosureReason_CommitmentTxConfirmed: return 3; - case LDKClosureReason_FundingTimedOut: return 4; - case LDKClosureReason_ProcessingError: return 5; - case LDKClosureReason_DisconnectedPeer: return 6; - case LDKClosureReason_OutdatedChannelManager: return 7; - case LDKClosureReason_CounterpartyCoopClosedUnfundedChannel: return 8; - case LDKClosureReason_FundingBatchClosure: return 9; - default: abort(); - } -} -int64_t CS_LDK_LDKClosureReason_CounterpartyForceClosed_get_peer_msg(int64_t ptr) { - LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr); - CHECK(obj->tag == LDKClosureReason_CounterpartyForceClosed); - LDKUntrustedString peer_msg_var = obj->counterparty_force_closed.peer_msg; - int64_t peer_msg_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(peer_msg_var); - peer_msg_ref = tag_ptr(peer_msg_var.inner, false); - return peer_msg_ref; -} -jstring CS_LDK_LDKClosureReason_ProcessingError_get_err(int64_t ptr) { - LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr); - CHECK(obj->tag == LDKClosureReason_ProcessingError); - LDKStr err_str = obj->processing_error.err; - jstring err_conv = str_ref_to_cs(err_str.chars, err_str.len); - return err_conv; -} uint32_t CS_LDK_LDKCOption_ClosureReasonZ_ty_from_ptr(int64_t ptr) { LDKCOption_ClosureReasonZ *obj = (LDKCOption_ClosureReasonZ*)untag_ptr(ptr); switch(obj->tag) { @@ -10804,7 +11478,8 @@ uint32_t CS_LDK_LDKHTLCDestination_ty_from_ptr(int64_t ptr) { case LDKHTLCDestination_NextHopChannel: return 0; case LDKHTLCDestination_UnknownNextHop: return 1; case LDKHTLCDestination_InvalidForward: return 2; - case LDKHTLCDestination_FailedPayment: return 3; + case LDKHTLCDestination_InvalidOnion: return 3; + case LDKHTLCDestination_FailedPayment: return 4; default: abort(); } } @@ -10815,12 +11490,14 @@ int8_tArray CS_LDK_LDKHTLCDestination_NextHopChannel_get_node_id(int64_t ptr) { memcpy(node_id_arr->elems, obj->next_hop_channel.node_id.compressed_form, 33); return node_id_arr; } -int8_tArray CS_LDK_LDKHTLCDestination_NextHopChannel_get_channel_id(int64_t ptr) { +int64_t CS_LDK_LDKHTLCDestination_NextHopChannel_get_channel_id(int64_t ptr) { LDKHTLCDestination *obj = (LDKHTLCDestination*)untag_ptr(ptr); CHECK(obj->tag == LDKHTLCDestination_NextHopChannel); - int8_tArray channel_id_arr = init_int8_tArray(32, __LINE__); - memcpy(channel_id_arr->elems, obj->next_hop_channel.channel_id.data, 32); - return channel_id_arr; + LDKChannelId channel_id_var = obj->next_hop_channel.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; } int64_t CS_LDK_LDKHTLCDestination_UnknownNextHop_get_requested_forward_scid(int64_t ptr) { LDKHTLCDestination *obj = (LDKHTLCDestination*)untag_ptr(ptr); @@ -10945,6 +11622,22 @@ uint32_t CS_LDK_LDKBumpTransactionEvent_ty_from_ptr(int64_t ptr) { default: abort(); } } +int64_t CS_LDK_LDKBumpTransactionEvent_ChannelClose_get_channel_id(int64_t ptr) { + LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr); + CHECK(obj->tag == LDKBumpTransactionEvent_ChannelClose); + LDKChannelId channel_id_var = obj->channel_close.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; +} +int8_tArray CS_LDK_LDKBumpTransactionEvent_ChannelClose_get_counterparty_node_id(int64_t ptr) { + LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr); + CHECK(obj->tag == LDKBumpTransactionEvent_ChannelClose); + int8_tArray counterparty_node_id_arr = init_int8_tArray(33, __LINE__); + memcpy(counterparty_node_id_arr->elems, obj->channel_close.counterparty_node_id.compressed_form, 33); + return counterparty_node_id_arr; +} int8_tArray CS_LDK_LDKBumpTransactionEvent_ChannelClose_get_claim_id(int64_t ptr) { LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr); CHECK(obj->tag == LDKBumpTransactionEvent_ChannelClose); @@ -10998,6 +11691,22 @@ int64_tArray CS_LDK_LDKBumpTransactionEvent_ChannelClose_get_pending_htlcs(int64 return pending_htlcs_arr; } +int64_t CS_LDK_LDKBumpTransactionEvent_HTLCResolution_get_channel_id(int64_t ptr) { + LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr); + CHECK(obj->tag == LDKBumpTransactionEvent_HTLCResolution); + LDKChannelId channel_id_var = obj->htlc_resolution.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; +} +int8_tArray CS_LDK_LDKBumpTransactionEvent_HTLCResolution_get_counterparty_node_id(int64_t ptr) { + LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr); + CHECK(obj->tag == LDKBumpTransactionEvent_HTLCResolution); + int8_tArray counterparty_node_id_arr = init_int8_tArray(33, __LINE__); + memcpy(counterparty_node_id_arr->elems, obj->htlc_resolution.counterparty_node_id.compressed_form, 33); + return counterparty_node_id_arr; +} int8_tArray CS_LDK_LDKBumpTransactionEvent_HTLCResolution_get_claim_id(int64_t ptr) { LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr); CHECK(obj->tag == LDKBumpTransactionEvent_HTLCResolution); @@ -11062,12 +11771,14 @@ uint32_t CS_LDK_LDKEvent_ty_from_ptr(int64_t ptr) { default: abort(); } } -int8_tArray CS_LDK_LDKEvent_FundingGenerationReady_get_temporary_channel_id(int64_t ptr) { +int64_t CS_LDK_LDKEvent_FundingGenerationReady_get_temporary_channel_id(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); CHECK(obj->tag == LDKEvent_FundingGenerationReady); - int8_tArray temporary_channel_id_arr = init_int8_tArray(32, __LINE__); - memcpy(temporary_channel_id_arr->elems, obj->funding_generation_ready.temporary_channel_id.data, 32); - return temporary_channel_id_arr; + LDKChannelId temporary_channel_id_var = obj->funding_generation_ready.temporary_channel_id; + int64_t temporary_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_var); + temporary_channel_id_ref = tag_ptr(temporary_channel_id_var.inner, false); + return temporary_channel_id_ref; } int8_tArray CS_LDK_LDKEvent_FundingGenerationReady_get_counterparty_node_id(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); @@ -11141,7 +11852,10 @@ int64_t CS_LDK_LDKEvent_PaymentClaimable_get_purpose(int64_t ptr) { int64_t CS_LDK_LDKEvent_PaymentClaimable_get_via_channel_id(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); CHECK(obj->tag == LDKEvent_PaymentClaimable); - int64_t via_channel_id_ref = tag_ptr(&obj->payment_claimable.via_channel_id, false); + LDKChannelId via_channel_id_var = obj->payment_claimable.via_channel_id; + int64_t via_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(via_channel_id_var); + via_channel_id_ref = tag_ptr(via_channel_id_var.inner, false); return via_channel_id_ref; } int64_t CS_LDK_LDKEvent_PaymentClaimable_get_via_user_channel_id(int64_t ptr) { @@ -11448,26 +12162,53 @@ int64_tArray CS_LDK_LDKEvent_SpendableOutputs_get_outputs(int64_t ptr) { int64_t CS_LDK_LDKEvent_SpendableOutputs_get_channel_id(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); CHECK(obj->tag == LDKEvent_SpendableOutputs); - int64_t channel_id_ref = tag_ptr(&obj->spendable_outputs.channel_id, false); + LDKChannelId channel_id_var = obj->spendable_outputs.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); return channel_id_ref; } int64_t CS_LDK_LDKEvent_PaymentForwarded_get_prev_channel_id(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); CHECK(obj->tag == LDKEvent_PaymentForwarded); - int64_t prev_channel_id_ref = tag_ptr(&obj->payment_forwarded.prev_channel_id, false); + LDKChannelId prev_channel_id_var = obj->payment_forwarded.prev_channel_id; + int64_t prev_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_var); + prev_channel_id_ref = tag_ptr(prev_channel_id_var.inner, false); return prev_channel_id_ref; } int64_t CS_LDK_LDKEvent_PaymentForwarded_get_next_channel_id(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); CHECK(obj->tag == LDKEvent_PaymentForwarded); - int64_t next_channel_id_ref = tag_ptr(&obj->payment_forwarded.next_channel_id, false); + LDKChannelId next_channel_id_var = obj->payment_forwarded.next_channel_id; + int64_t next_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(next_channel_id_var); + next_channel_id_ref = tag_ptr(next_channel_id_var.inner, false); return next_channel_id_ref; } -int64_t CS_LDK_LDKEvent_PaymentForwarded_get_fee_earned_msat(int64_t ptr) { +int64_t CS_LDK_LDKEvent_PaymentForwarded_get_prev_user_channel_id(int64_t ptr) { + LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); + CHECK(obj->tag == LDKEvent_PaymentForwarded); + int64_t prev_user_channel_id_ref = tag_ptr(&obj->payment_forwarded.prev_user_channel_id, false); + return prev_user_channel_id_ref; +} +int64_t CS_LDK_LDKEvent_PaymentForwarded_get_next_user_channel_id(int64_t ptr) { + LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); + CHECK(obj->tag == LDKEvent_PaymentForwarded); + int64_t next_user_channel_id_ref = tag_ptr(&obj->payment_forwarded.next_user_channel_id, false); + return next_user_channel_id_ref; +} +int64_t CS_LDK_LDKEvent_PaymentForwarded_get_total_fee_earned_msat(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); CHECK(obj->tag == LDKEvent_PaymentForwarded); - int64_t fee_earned_msat_ref = tag_ptr(&obj->payment_forwarded.fee_earned_msat, false); - return fee_earned_msat_ref; + int64_t total_fee_earned_msat_ref = tag_ptr(&obj->payment_forwarded.total_fee_earned_msat, false); + return total_fee_earned_msat_ref; +} +int64_t CS_LDK_LDKEvent_PaymentForwarded_get_skimmed_fee_msat(int64_t ptr) { + LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); + CHECK(obj->tag == LDKEvent_PaymentForwarded); + int64_t skimmed_fee_msat_ref = tag_ptr(&obj->payment_forwarded.skimmed_fee_msat, false); + return skimmed_fee_msat_ref; } jboolean CS_LDK_LDKEvent_PaymentForwarded_get_claim_from_onchain_tx(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); @@ -11481,12 +12222,14 @@ int64_t CS_LDK_LDKEvent_PaymentForwarded_get_outbound_amount_forwarded_msat(int6 int64_t outbound_amount_forwarded_msat_ref = tag_ptr(&obj->payment_forwarded.outbound_amount_forwarded_msat, false); return outbound_amount_forwarded_msat_ref; } -int8_tArray CS_LDK_LDKEvent_ChannelPending_get_channel_id(int64_t ptr) { +int64_t CS_LDK_LDKEvent_ChannelPending_get_channel_id(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); CHECK(obj->tag == LDKEvent_ChannelPending); - int8_tArray channel_id_arr = init_int8_tArray(32, __LINE__); - memcpy(channel_id_arr->elems, obj->channel_pending.channel_id.data, 32); - return channel_id_arr; + LDKChannelId channel_id_var = obj->channel_pending.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; } int8_tArray CS_LDK_LDKEvent_ChannelPending_get_user_channel_id(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); @@ -11498,7 +12241,10 @@ int8_tArray CS_LDK_LDKEvent_ChannelPending_get_user_channel_id(int64_t ptr) { int64_t CS_LDK_LDKEvent_ChannelPending_get_former_temporary_channel_id(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); CHECK(obj->tag == LDKEvent_ChannelPending); - int64_t former_temporary_channel_id_ref = tag_ptr(&obj->channel_pending.former_temporary_channel_id, false); + LDKChannelId former_temporary_channel_id_var = obj->channel_pending.former_temporary_channel_id; + int64_t former_temporary_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(former_temporary_channel_id_var); + former_temporary_channel_id_ref = tag_ptr(former_temporary_channel_id_var.inner, false); return former_temporary_channel_id_ref; } int8_tArray CS_LDK_LDKEvent_ChannelPending_get_counterparty_node_id(int64_t ptr) { @@ -11517,12 +12263,23 @@ int64_t CS_LDK_LDKEvent_ChannelPending_get_funding_txo(int64_t ptr) { funding_txo_ref = tag_ptr(funding_txo_var.inner, false); return funding_txo_ref; } -int8_tArray CS_LDK_LDKEvent_ChannelReady_get_channel_id(int64_t ptr) { +int64_t CS_LDK_LDKEvent_ChannelPending_get_channel_type(int64_t ptr) { + LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); + CHECK(obj->tag == LDKEvent_ChannelPending); + LDKChannelTypeFeatures channel_type_var = obj->channel_pending.channel_type; + int64_t channel_type_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_var); + channel_type_ref = tag_ptr(channel_type_var.inner, false); + return channel_type_ref; +} +int64_t CS_LDK_LDKEvent_ChannelReady_get_channel_id(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); CHECK(obj->tag == LDKEvent_ChannelReady); - int8_tArray channel_id_arr = init_int8_tArray(32, __LINE__); - memcpy(channel_id_arr->elems, obj->channel_ready.channel_id.data, 32); - return channel_id_arr; + LDKChannelId channel_id_var = obj->channel_ready.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; } int8_tArray CS_LDK_LDKEvent_ChannelReady_get_user_channel_id(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); @@ -11547,12 +12304,14 @@ int64_t CS_LDK_LDKEvent_ChannelReady_get_channel_type(int64_t ptr) { channel_type_ref = tag_ptr(channel_type_var.inner, false); return channel_type_ref; } -int8_tArray CS_LDK_LDKEvent_ChannelClosed_get_channel_id(int64_t ptr) { +int64_t CS_LDK_LDKEvent_ChannelClosed_get_channel_id(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); CHECK(obj->tag == LDKEvent_ChannelClosed); - int8_tArray channel_id_arr = init_int8_tArray(32, __LINE__); - memcpy(channel_id_arr->elems, obj->channel_closed.channel_id.data, 32); - return channel_id_arr; + LDKChannelId channel_id_var = obj->channel_closed.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; } int8_tArray CS_LDK_LDKEvent_ChannelClosed_get_user_channel_id(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); @@ -11589,12 +12348,14 @@ int64_t CS_LDK_LDKEvent_ChannelClosed_get_channel_funding_txo(int64_t ptr) { channel_funding_txo_ref = tag_ptr(channel_funding_txo_var.inner, false); return channel_funding_txo_ref; } -int8_tArray CS_LDK_LDKEvent_DiscardFunding_get_channel_id(int64_t ptr) { +int64_t CS_LDK_LDKEvent_DiscardFunding_get_channel_id(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); CHECK(obj->tag == LDKEvent_DiscardFunding); - int8_tArray channel_id_arr = init_int8_tArray(32, __LINE__); - memcpy(channel_id_arr->elems, obj->discard_funding.channel_id.data, 32); - return channel_id_arr; + LDKChannelId channel_id_var = obj->discard_funding.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; } int8_tArray CS_LDK_LDKEvent_DiscardFunding_get_transaction(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); @@ -11604,12 +12365,14 @@ int8_tArray CS_LDK_LDKEvent_DiscardFunding_get_transaction(int64_t ptr) { memcpy(transaction_arr->elems, transaction_var.data, transaction_var.datalen); return transaction_arr; } -int8_tArray CS_LDK_LDKEvent_OpenChannelRequest_get_temporary_channel_id(int64_t ptr) { +int64_t CS_LDK_LDKEvent_OpenChannelRequest_get_temporary_channel_id(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); CHECK(obj->tag == LDKEvent_OpenChannelRequest); - int8_tArray temporary_channel_id_arr = init_int8_tArray(32, __LINE__); - memcpy(temporary_channel_id_arr->elems, obj->open_channel_request.temporary_channel_id.data, 32); - return temporary_channel_id_arr; + LDKChannelId temporary_channel_id_var = obj->open_channel_request.temporary_channel_id; + int64_t temporary_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_var); + temporary_channel_id_ref = tag_ptr(temporary_channel_id_var.inner, false); + return temporary_channel_id_ref; } int8_tArray CS_LDK_LDKEvent_OpenChannelRequest_get_counterparty_node_id(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); @@ -11639,12 +12402,14 @@ int64_t CS_LDK_LDKEvent_OpenChannelRequest_get_channel_type(int64_t ptr) { channel_type_ref = tag_ptr(channel_type_var.inner, false); return channel_type_ref; } -int8_tArray CS_LDK_LDKEvent_HTLCHandlingFailed_get_prev_channel_id(int64_t ptr) { +int64_t CS_LDK_LDKEvent_HTLCHandlingFailed_get_prev_channel_id(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); CHECK(obj->tag == LDKEvent_HTLCHandlingFailed); - int8_tArray prev_channel_id_arr = init_int8_tArray(32, __LINE__); - memcpy(prev_channel_id_arr->elems, obj->htlc_handling_failed.prev_channel_id.data, 32); - return prev_channel_id_arr; + LDKChannelId prev_channel_id_var = obj->htlc_handling_failed.prev_channel_id; + int64_t prev_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_var); + prev_channel_id_ref = tag_ptr(prev_channel_id_var.inner, false); + return prev_channel_id_ref; } int64_t CS_LDK_LDKEvent_HTLCHandlingFailed_get_failed_next_destination(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); @@ -12182,6 +12947,32 @@ int64_t CS_LDK_CResult_UntrustedStringDecodeErrorZ_get_err(int64_t owner) { return ret_ref; } +static inline struct LDKChannelId CResult_ChannelIdDecodeErrorZ_get_ok(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR owner){ + LDKChannelId ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_ChannelIdDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_ChannelIdDecodeErrorZ* owner_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(owner); + LDKChannelId ret_var = CResult_ChannelIdDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_ChannelIdDecodeErrorZ_get_err(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +int64_t CS_LDK_CResult_ChannelIdDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_ChannelIdDecodeErrorZ* owner_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_ChannelIdDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + static inline struct LDKThirtyTwoBytes C2Tuple__u832u16Z_get_a(LDKC2Tuple__u832u16Z *NONNULL_PTR owner){ return ThirtyTwoBytes_clone(&owner->a); } @@ -12253,6 +13044,129 @@ int64_t CS_LDK_CResult_PaymentConstraintsDecodeErrorZ_get_err(int64_t owner) { return ret_ref; } +static inline struct LDKPaymentContext CResult_PaymentContextDecodeErrorZ_get_ok(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return PaymentContext_clone(&*owner->contents.result); +} +int64_t CS_LDK_CResult_PaymentContextDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_PaymentContextDecodeErrorZ* owner_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(owner); + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = CResult_PaymentContextDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_PaymentContextDecodeErrorZ_get_err(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +int64_t CS_LDK_CResult_PaymentContextDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_PaymentContextDecodeErrorZ* owner_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_PaymentContextDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKUnknownPaymentContext CResult_UnknownPaymentContextDecodeErrorZ_get_ok(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR owner){ + LDKUnknownPaymentContext ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* owner_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(owner); + LDKUnknownPaymentContext ret_var = CResult_UnknownPaymentContextDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_UnknownPaymentContextDecodeErrorZ_get_err(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +int64_t CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* owner_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_UnknownPaymentContextDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKBolt12OfferContext CResult_Bolt12OfferContextDecodeErrorZ_get_ok(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR owner){ + LDKBolt12OfferContext ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_Bolt12OfferContextDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(owner); + LDKBolt12OfferContext ret_var = CResult_Bolt12OfferContextDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_Bolt12OfferContextDecodeErrorZ_get_err(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +int64_t CS_LDK_CResult_Bolt12OfferContextDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_Bolt12OfferContextDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKBolt12RefundContext CResult_Bolt12RefundContextDecodeErrorZ_get_ok(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR owner){ + LDKBolt12RefundContext ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_Bolt12RefundContextDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(owner); + LDKBolt12RefundContext ret_var = CResult_Bolt12RefundContextDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_Bolt12RefundContextDecodeErrorZ_get_err(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +int64_t CS_LDK_CResult_Bolt12RefundContextDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_Bolt12RefundContextDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKStr CResult_StrSecp256k1ErrorZ_get_ok(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return *owner->contents.result; +} +jstring CS_LDK_CResult_StrSecp256k1ErrorZ_get_ok(int64_t owner) { + LDKCResult_StrSecp256k1ErrorZ* owner_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(owner); + LDKStr ret_str = CResult_StrSecp256k1ErrorZ_get_ok(owner_conv); + jstring ret_conv = str_ref_to_cs(ret_str.chars, ret_str.len); + return ret_conv; +} + +static inline enum LDKSecp256k1Error CResult_StrSecp256k1ErrorZ_get_err(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return *owner->contents.err; +} +int32_t CS_LDK_CResult_StrSecp256k1ErrorZ_get_err(int64_t owner) { + LDKCResult_StrSecp256k1ErrorZ* owner_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(owner); + int32_t ret_conv = LDKSecp256k1Error_to_cs(CResult_StrSecp256k1ErrorZ_get_err(owner_conv)); + return ret_conv; +} + static inline struct LDKThirtyTwoBytes C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){ return ThirtyTwoBytes_clone(&owner->a); } @@ -12311,27 +13225,6 @@ void CS_LDK_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZN CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(owner_conv); } -static inline struct LDKStr CResult_StrSecp256k1ErrorZ_get_ok(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner){ -CHECK(owner->result_ok); - return *owner->contents.result; -} -jstring CS_LDK_CResult_StrSecp256k1ErrorZ_get_ok(int64_t owner) { - LDKCResult_StrSecp256k1ErrorZ* owner_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(owner); - LDKStr ret_str = CResult_StrSecp256k1ErrorZ_get_ok(owner_conv); - jstring ret_conv = str_ref_to_cs(ret_str.chars, ret_str.len); - return ret_conv; -} - -static inline enum LDKSecp256k1Error CResult_StrSecp256k1ErrorZ_get_err(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return *owner->contents.err; -} -int32_t CS_LDK_CResult_StrSecp256k1ErrorZ_get_err(int64_t owner) { - LDKCResult_StrSecp256k1ErrorZ* owner_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(owner); - int32_t ret_conv = LDKSecp256k1Error_to_cs(CResult_StrSecp256k1ErrorZ_get_err(owner_conv)); - return ret_conv; -} - static inline struct LDKPublicKey C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_a(LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ *NONNULL_PTR owner){ return owner->a; } @@ -12378,7 +13271,8 @@ uint32_t CS_LDK_LDKSendError_ty_from_ptr(int64_t ptr) { case LDKSendError_InvalidMessage: return 5; case LDKSendError_BufferFull: return 6; case LDKSendError_GetNodeIdFailed: return 7; - case LDKSendError_BlindedPathAdvanceFailed: return 8; + case LDKSendError_UnresolvedIntroductionNode: return 8; + case LDKSendError_BlindedPathAdvanceFailed: return 9; default: abort(); } } @@ -12418,6 +13312,27 @@ int64_t CS_LDK_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZ return ret_ref; } +uint32_t CS_LDK_LDKNextMessageHop_ty_from_ptr(int64_t ptr) { + LDKNextMessageHop *obj = (LDKNextMessageHop*)untag_ptr(ptr); + switch(obj->tag) { + case LDKNextMessageHop_NodeId: return 0; + case LDKNextMessageHop_ShortChannelId: return 1; + default: abort(); + } +} +int8_tArray CS_LDK_LDKNextMessageHop_NodeId_get_node_id(int64_t ptr) { + LDKNextMessageHop *obj = (LDKNextMessageHop*)untag_ptr(ptr); + CHECK(obj->tag == LDKNextMessageHop_NodeId); + int8_tArray node_id_arr = init_int8_tArray(33, __LINE__); + memcpy(node_id_arr->elems, obj->node_id.compressed_form, 33); + return node_id_arr; +} +int64_t CS_LDK_LDKNextMessageHop_ShortChannelId_get_short_channel_id(int64_t ptr) { + LDKNextMessageHop *obj = (LDKNextMessageHop*)untag_ptr(ptr); + CHECK(obj->tag == LDKNextMessageHop_ShortChannelId); + int64_t short_channel_id_conv = obj->short_channel_id; + return short_channel_id_conv; +} uint32_t CS_LDK_LDKParsedOnionMessageContents_ty_from_ptr(int64_t ptr) { LDKParsedOnionMessageContents *obj = (LDKParsedOnionMessageContents*)untag_ptr(ptr); switch(obj->tag) { @@ -12447,12 +13362,11 @@ uint32_t CS_LDK_LDKPeeledOnion_ty_from_ptr(int64_t ptr) { default: abort(); } } -int8_tArray CS_LDK_LDKPeeledOnion_Forward_get__0(int64_t ptr) { +int64_t CS_LDK_LDKPeeledOnion_Forward_get__0(int64_t ptr) { LDKPeeledOnion *obj = (LDKPeeledOnion*)untag_ptr(ptr); CHECK(obj->tag == LDKPeeledOnion_Forward); - int8_tArray _0_arr = init_int8_tArray(33, __LINE__); - memcpy(_0_arr->elems, obj->forward._0.compressed_form, 33); - return _0_arr; + int64_t _0_ref = tag_ptr(&obj->forward._0, false); + return _0_ref; } int64_t CS_LDK_LDKPeeledOnion_Forward_get__1(int64_t ptr) { LDKPeeledOnion *obj = (LDKPeeledOnion*)untag_ptr(ptr); @@ -12673,158 +13587,122 @@ int64_t CS_LDK_CResult_InvoiceErrorDecodeErrorZ_get_err(int64_t owner) { return ret_ref; } -static inline struct LDKDelayedPaymentBasepoint CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){ - LDKDelayedPaymentBasepoint ret = *owner->contents.result; - ret.is_owned = false; - return ret; -} -int64_t CS_LDK_CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(int64_t owner) { - LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner); - LDKDelayedPaymentBasepoint ret_var = CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(owner_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -static inline struct LDKDecodeError CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return DecodeError_clone(&*owner->contents.err); -} -int64_t CS_LDK_CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(int64_t owner) { - LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner); - LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(owner_conv); - int64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -static inline struct LDKDelayedPaymentKey CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){ - LDKDelayedPaymentKey ret = *owner->contents.result; - ret.is_owned = false; - return ret; -} -int64_t CS_LDK_CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(int64_t owner) { - LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner); - LDKDelayedPaymentKey ret_var = CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(owner_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -static inline struct LDKDecodeError CResult_DelayedPaymentKeyDecodeErrorZ_get_err(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return DecodeError_clone(&*owner->contents.err); -} -int64_t CS_LDK_CResult_DelayedPaymentKeyDecodeErrorZ_get_err(int64_t owner) { - LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner); - LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_DelayedPaymentKeyDecodeErrorZ_get_err(owner_conv); - int64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -static inline struct LDKHtlcBasepoint CResult_HtlcBasepointDecodeErrorZ_get_ok(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){ - LDKHtlcBasepoint ret = *owner->contents.result; +static inline struct LDKTrackedSpendableOutput CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR owner){ + LDKTrackedSpendableOutput ret = *owner->contents.result; ret.is_owned = false; return ret; } -int64_t CS_LDK_CResult_HtlcBasepointDecodeErrorZ_get_ok(int64_t owner) { - LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner); - LDKHtlcBasepoint ret_var = CResult_HtlcBasepointDecodeErrorZ_get_ok(owner_conv); +int64_t CS_LDK_CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* owner_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(owner); + LDKTrackedSpendableOutput ret_var = CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(owner_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -static inline struct LDKDecodeError CResult_HtlcBasepointDecodeErrorZ_get_err(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){ +static inline struct LDKDecodeError CResult_TrackedSpendableOutputDecodeErrorZ_get_err(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR owner){ CHECK(!owner->result_ok); return DecodeError_clone(&*owner->contents.err); } -int64_t CS_LDK_CResult_HtlcBasepointDecodeErrorZ_get_err(int64_t owner) { - LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner); +int64_t CS_LDK_CResult_TrackedSpendableOutputDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* owner_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(owner); LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_HtlcBasepointDecodeErrorZ_get_err(owner_conv); + *ret_copy = CResult_TrackedSpendableOutputDecodeErrorZ_get_err(owner_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -static inline struct LDKHtlcKey CResult_HtlcKeyDecodeErrorZ_get_ok(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){ - LDKHtlcKey ret = *owner->contents.result; - ret.is_owned = false; - return ret; -} -int64_t CS_LDK_CResult_HtlcKeyDecodeErrorZ_get_ok(int64_t owner) { - LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner); - LDKHtlcKey ret_var = CResult_HtlcKeyDecodeErrorZ_get_ok(owner_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -static inline struct LDKDecodeError CResult_HtlcKeyDecodeErrorZ_get_err(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return DecodeError_clone(&*owner->contents.err); -} -int64_t CS_LDK_CResult_HtlcKeyDecodeErrorZ_get_err(int64_t owner) { - LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner); - LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_HtlcKeyDecodeErrorZ_get_err(owner_conv); - int64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; +uint32_t CS_LDK_LDKOutputSpendStatus_ty_from_ptr(int64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + switch(obj->tag) { + case LDKOutputSpendStatus_PendingInitialBroadcast: return 0; + case LDKOutputSpendStatus_PendingFirstConfirmation: return 1; + case LDKOutputSpendStatus_PendingThresholdConfirmations: return 2; + default: abort(); + } } - -static inline struct LDKRevocationBasepoint CResult_RevocationBasepointDecodeErrorZ_get_ok(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){ - LDKRevocationBasepoint ret = *owner->contents.result; - ret.is_owned = false; - return ret; +int64_t CS_LDK_LDKOutputSpendStatus_PendingInitialBroadcast_get_delayed_until_height(int64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + CHECK(obj->tag == LDKOutputSpendStatus_PendingInitialBroadcast); + int64_t delayed_until_height_ref = tag_ptr(&obj->pending_initial_broadcast.delayed_until_height, false); + return delayed_until_height_ref; +} +int8_tArray CS_LDK_LDKOutputSpendStatus_PendingFirstConfirmation_get_first_broadcast_hash(int64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + CHECK(obj->tag == LDKOutputSpendStatus_PendingFirstConfirmation); + int8_tArray first_broadcast_hash_arr = init_int8_tArray(32, __LINE__); + memcpy(first_broadcast_hash_arr->elems, obj->pending_first_confirmation.first_broadcast_hash.data, 32); + return first_broadcast_hash_arr; +} +int32_t CS_LDK_LDKOutputSpendStatus_PendingFirstConfirmation_get_latest_broadcast_height(int64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + CHECK(obj->tag == LDKOutputSpendStatus_PendingFirstConfirmation); + int32_t latest_broadcast_height_conv = obj->pending_first_confirmation.latest_broadcast_height; + return latest_broadcast_height_conv; +} +int8_tArray CS_LDK_LDKOutputSpendStatus_PendingFirstConfirmation_get_latest_spending_tx(int64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + CHECK(obj->tag == LDKOutputSpendStatus_PendingFirstConfirmation); + LDKTransaction latest_spending_tx_var = obj->pending_first_confirmation.latest_spending_tx; + int8_tArray latest_spending_tx_arr = init_int8_tArray(latest_spending_tx_var.datalen, __LINE__); + memcpy(latest_spending_tx_arr->elems, latest_spending_tx_var.data, latest_spending_tx_var.datalen); + return latest_spending_tx_arr; +} +int8_tArray CS_LDK_LDKOutputSpendStatus_PendingThresholdConfirmations_get_first_broadcast_hash(int64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + CHECK(obj->tag == LDKOutputSpendStatus_PendingThresholdConfirmations); + int8_tArray first_broadcast_hash_arr = init_int8_tArray(32, __LINE__); + memcpy(first_broadcast_hash_arr->elems, obj->pending_threshold_confirmations.first_broadcast_hash.data, 32); + return first_broadcast_hash_arr; +} +int32_t CS_LDK_LDKOutputSpendStatus_PendingThresholdConfirmations_get_latest_broadcast_height(int64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + CHECK(obj->tag == LDKOutputSpendStatus_PendingThresholdConfirmations); + int32_t latest_broadcast_height_conv = obj->pending_threshold_confirmations.latest_broadcast_height; + return latest_broadcast_height_conv; +} +int8_tArray CS_LDK_LDKOutputSpendStatus_PendingThresholdConfirmations_get_latest_spending_tx(int64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + CHECK(obj->tag == LDKOutputSpendStatus_PendingThresholdConfirmations); + LDKTransaction latest_spending_tx_var = obj->pending_threshold_confirmations.latest_spending_tx; + int8_tArray latest_spending_tx_arr = init_int8_tArray(latest_spending_tx_var.datalen, __LINE__); + memcpy(latest_spending_tx_arr->elems, latest_spending_tx_var.data, latest_spending_tx_var.datalen); + return latest_spending_tx_arr; +} +int32_t CS_LDK_LDKOutputSpendStatus_PendingThresholdConfirmations_get_confirmation_height(int64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + CHECK(obj->tag == LDKOutputSpendStatus_PendingThresholdConfirmations); + int32_t confirmation_height_conv = obj->pending_threshold_confirmations.confirmation_height; + return confirmation_height_conv; } -int64_t CS_LDK_CResult_RevocationBasepointDecodeErrorZ_get_ok(int64_t owner) { - LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner); - LDKRevocationBasepoint ret_var = CResult_RevocationBasepointDecodeErrorZ_get_ok(owner_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; +int8_tArray CS_LDK_LDKOutputSpendStatus_PendingThresholdConfirmations_get_confirmation_hash(int64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + CHECK(obj->tag == LDKOutputSpendStatus_PendingThresholdConfirmations); + int8_tArray confirmation_hash_arr = init_int8_tArray(32, __LINE__); + memcpy(confirmation_hash_arr->elems, obj->pending_threshold_confirmations.confirmation_hash.data, 32); + return confirmation_hash_arr; } - -static inline struct LDKDecodeError CResult_RevocationBasepointDecodeErrorZ_get_err(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return DecodeError_clone(&*owner->contents.err); +static inline struct LDKOutputSpendStatus CResult_OutputSpendStatusDecodeErrorZ_get_ok(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return OutputSpendStatus_clone(&*owner->contents.result); } -int64_t CS_LDK_CResult_RevocationBasepointDecodeErrorZ_get_err(int64_t owner) { - LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner); - LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_RevocationBasepointDecodeErrorZ_get_err(owner_conv); +int64_t CS_LDK_CResult_OutputSpendStatusDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_OutputSpendStatusDecodeErrorZ* owner_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(owner); + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = CResult_OutputSpendStatusDecodeErrorZ_get_ok(owner_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -static inline struct LDKRevocationKey CResult_RevocationKeyDecodeErrorZ_get_ok(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){ - LDKRevocationKey ret = *owner->contents.result; - ret.is_owned = false; - return ret; -} -int64_t CS_LDK_CResult_RevocationKeyDecodeErrorZ_get_ok(int64_t owner) { - LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner); - LDKRevocationKey ret_var = CResult_RevocationKeyDecodeErrorZ_get_ok(owner_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -static inline struct LDKDecodeError CResult_RevocationKeyDecodeErrorZ_get_err(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){ +static inline struct LDKDecodeError CResult_OutputSpendStatusDecodeErrorZ_get_err(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR owner){ CHECK(!owner->result_ok); return DecodeError_clone(&*owner->contents.err); } -int64_t CS_LDK_CResult_RevocationKeyDecodeErrorZ_get_err(int64_t owner) { - LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner); +int64_t CS_LDK_CResult_OutputSpendStatusDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_OutputSpendStatusDecodeErrorZ* owner_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(owner); LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_RevocationKeyDecodeErrorZ_get_err(owner_conv); + *ret_copy = CResult_OutputSpendStatusDecodeErrorZ_get_err(owner_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -12925,85 +13803,62 @@ int64_t CS_LDK_LDKCOption_FilterZ_Some_get_some(int64_t ptr) { } return tag_ptr(some_ret, true); } -static inline struct LDKLockedChannelMonitor CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){ - LDKLockedChannelMonitor ret = *owner->contents.result; - ret.is_owned = false; - return ret; -} -int64_t CS_LDK_CResult_LockedChannelMonitorNoneZ_get_ok(int64_t owner) { - LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner); - LDKLockedChannelMonitor ret_var = CResult_LockedChannelMonitorNoneZ_get_ok(owner_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -static inline void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return *owner->contents.err; -} -void CS_LDK_CResult_LockedChannelMonitorNoneZ_get_err(int64_t owner) { - LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner); - CResult_LockedChannelMonitorNoneZ_get_err(owner_conv); -} - -static inline LDKCVec_OutPointZ CVec_OutPointZ_clone(const LDKCVec_OutPointZ *orig) { - LDKCVec_OutPointZ ret = { .data = MALLOC(sizeof(LDKOutPoint) * orig->datalen, "LDKCVec_OutPointZ clone bytes"), .datalen = orig->datalen }; +static inline LDKCVec_TrackedSpendableOutputZ CVec_TrackedSpendableOutputZ_clone(const LDKCVec_TrackedSpendableOutputZ *orig) { + LDKCVec_TrackedSpendableOutputZ ret = { .data = MALLOC(sizeof(LDKTrackedSpendableOutput) * orig->datalen, "LDKCVec_TrackedSpendableOutputZ clone bytes"), .datalen = orig->datalen }; for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = OutPoint_clone(&orig->data[i]); + ret.data[i] = TrackedSpendableOutput_clone(&orig->data[i]); } return ret; } -static inline LDKCVec_MonitorUpdateIdZ CVec_MonitorUpdateIdZ_clone(const LDKCVec_MonitorUpdateIdZ *orig) { - LDKCVec_MonitorUpdateIdZ ret = { .data = MALLOC(sizeof(LDKMonitorUpdateId) * orig->datalen, "LDKCVec_MonitorUpdateIdZ clone bytes"), .datalen = orig->datalen }; - for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = MonitorUpdateId_clone(&orig->data[i]); +typedef struct LDKChangeDestinationSource_JCalls { + atomic_size_t refcnt; + uint32_t instance_ptr; +} LDKChangeDestinationSource_JCalls; +static void LDKChangeDestinationSource_JCalls_free(void* this_arg) { + LDKChangeDestinationSource_JCalls *j_calls = (LDKChangeDestinationSource_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + FREE(j_calls); } - return ret; } -static inline struct LDKOutPoint C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){ - LDKOutPoint ret = owner->a; - ret.is_owned = false; - return ret; +LDKCResult_CVec_u8ZNoneZ get_change_destination_script_LDKChangeDestinationSource_jcall(const void* this_arg) { + LDKChangeDestinationSource_JCalls *j_calls = (LDKChangeDestinationSource_JCalls*) this_arg; + uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 58); + void* ret_ptr = untag_ptr(ret); + CHECK_ACCESS(ret_ptr); + LDKCResult_CVec_u8ZNoneZ ret_conv = *(LDKCResult_CVec_u8ZNoneZ*)(ret_ptr); + FREE(untag_ptr(ret)); + return ret_conv; } -int64_t CS_LDK_C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(int64_t owner) { - LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner); - LDKOutPoint ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(owner_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; +static void LDKChangeDestinationSource_JCalls_cloned(LDKChangeDestinationSource* new_obj) { + LDKChangeDestinationSource_JCalls *j_calls = (LDKChangeDestinationSource_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); } +static inline LDKChangeDestinationSource LDKChangeDestinationSource_init (int64_t o) { + LDKChangeDestinationSource_JCalls *calls = MALLOC(sizeof(LDKChangeDestinationSource_JCalls), "LDKChangeDestinationSource_JCalls"); + atomic_init(&calls->refcnt, 1); + calls->instance_ptr = o; -static inline struct LDKCVec_MonitorUpdateIdZ C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){ - return CVec_MonitorUpdateIdZ_clone(&owner->b); + LDKChangeDestinationSource ret = { + .this_arg = (void*) calls, + .get_change_destination_script = get_change_destination_script_LDKChangeDestinationSource_jcall, + .free = LDKChangeDestinationSource_JCalls_free, + }; + return ret; } -int64_tArray CS_LDK_C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(int64_t owner) { - LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner); - LDKCVec_MonitorUpdateIdZ ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(owner_conv); - int64_tArray ret_arr = NULL; - ret_arr = init_int64_tArray(ret_var.datalen, __LINE__); - int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8); - for (size_t r = 0; r < ret_var.datalen; r++) { - LDKMonitorUpdateId ret_conv_17_var = ret_var.data[r]; - int64_t ret_conv_17_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_17_var); - ret_conv_17_ref = tag_ptr(ret_conv_17_var.inner, ret_conv_17_var.is_owned); - ret_arr_ptr[r] = ret_conv_17_ref; - } - - FREE(ret_var.data); - return ret_arr; +uint64_t CS_LDK_LDKChangeDestinationSource_new(int32_t o) { + LDKChangeDestinationSource *res_ptr = MALLOC(sizeof(LDKChangeDestinationSource), "LDKChangeDestinationSource"); + *res_ptr = LDKChangeDestinationSource_init(o); + return tag_ptr(res_ptr, true); } - -static inline LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ CVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ_clone(const LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ *orig) { - LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ) * orig->datalen, "LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ clone bytes"), .datalen = orig->datalen }; - for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_clone(&orig->data[i]); - } - return ret; +int64_t CS_LDK_ChangeDestinationSource_get_change_destination_script(int64_t this_arg) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKChangeDestinationSource* this_arg_conv = (LDKChangeDestinationSource*)this_arg_ptr; + LDKCResult_CVec_u8ZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_u8ZNoneZ), "LDKCResult_CVec_u8ZNoneZ"); + *ret_conv = (this_arg_conv->get_change_destination_script)(this_arg_conv->this_arg); + return tag_ptr(ret_conv, true); } + typedef struct LDKKVStore_JCalls { atomic_size_t refcnt; uint32_t instance_ptr; @@ -13025,7 +13880,7 @@ LDKCResult_CVec_u8ZIOErrorZ read_LDKKVStore_jcall(const void* this_arg, LDKStr p LDKStr key_str = key; jstring key_conv = str_ref_to_cs(key_str.chars, key_str.len); Str_free(key_str); - uint64_t ret = js_invoke_function_l_lll(j_calls->instance_ptr, 58, (int64_t)primary_namespace_conv, (int64_t)secondary_namespace_conv, (int64_t)key_conv); + uint64_t ret = js_invoke_function_l_lll(j_calls->instance_ptr, 59, (int64_t)primary_namespace_conv, (int64_t)secondary_namespace_conv, (int64_t)key_conv); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_CVec_u8ZIOErrorZ ret_conv = *(LDKCResult_CVec_u8ZIOErrorZ*)(ret_ptr); @@ -13046,7 +13901,7 @@ LDKCResult_NoneIOErrorZ write_LDKKVStore_jcall(const void* this_arg, LDKStr prim LDKu8slice buf_var = buf; int8_tArray buf_arr = init_int8_tArray(buf_var.datalen, __LINE__); memcpy(buf_arr->elems, buf_var.data, buf_var.datalen); - uint64_t ret = js_invoke_function_l_llll(j_calls->instance_ptr, 59, (int64_t)primary_namespace_conv, (int64_t)secondary_namespace_conv, (int64_t)key_conv, (int64_t)buf_arr); + uint64_t ret = js_invoke_function_l_llll(j_calls->instance_ptr, 60, (int64_t)primary_namespace_conv, (int64_t)secondary_namespace_conv, (int64_t)key_conv, (int64_t)buf_arr); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr); @@ -13065,7 +13920,7 @@ LDKCResult_NoneIOErrorZ remove_LDKKVStore_jcall(const void* this_arg, LDKStr pri jstring key_conv = str_ref_to_cs(key_str.chars, key_str.len); Str_free(key_str); jboolean lazy_conv = lazy; - uint64_t ret = js_invoke_function_l_lllb(j_calls->instance_ptr, 60, (int64_t)primary_namespace_conv, (int64_t)secondary_namespace_conv, (int64_t)key_conv, lazy_conv); + uint64_t ret = js_invoke_function_l_lllb(j_calls->instance_ptr, 61, (int64_t)primary_namespace_conv, (int64_t)secondary_namespace_conv, (int64_t)key_conv, lazy_conv); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr); @@ -13080,7 +13935,7 @@ LDKCResult_CVec_StrZIOErrorZ list_LDKKVStore_jcall(const void* this_arg, LDKStr LDKStr secondary_namespace_str = secondary_namespace; jstring secondary_namespace_conv = str_ref_to_cs(secondary_namespace_str.chars, secondary_namespace_str.len); Str_free(secondary_namespace_str); - uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 61, (int64_t)primary_namespace_conv, (int64_t)secondary_namespace_conv); + uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 62, (int64_t)primary_namespace_conv, (int64_t)secondary_namespace_conv); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_CVec_StrZIOErrorZ ret_conv = *(LDKCResult_CVec_StrZIOErrorZ*)(ret_ptr); @@ -13162,283 +14017,721 @@ int64_t CS_LDK_KVStore_list(int64_t this_arg, jstring primary_namespace, jstrin return tag_ptr(ret_conv, true); } -typedef struct LDKPersister_JCalls { +typedef struct LDKOutputSpender_JCalls { atomic_size_t refcnt; uint32_t instance_ptr; -} LDKPersister_JCalls; -static void LDKPersister_JCalls_free(void* this_arg) { - LDKPersister_JCalls *j_calls = (LDKPersister_JCalls*) this_arg; +} LDKOutputSpender_JCalls; +static void LDKOutputSpender_JCalls_free(void* this_arg) { + LDKOutputSpender_JCalls *j_calls = (LDKOutputSpender_JCalls*) this_arg; if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { FREE(j_calls); } } -LDKCResult_NoneIOErrorZ persist_manager_LDKPersister_jcall(const void* this_arg, const LDKChannelManager * channel_manager) { - LDKPersister_JCalls *j_calls = (LDKPersister_JCalls*) this_arg; - LDKChannelManager channel_manager_var = *channel_manager; - int64_t channel_manager_ref = 0; - // WARNING: we may need a move here but no clone is available for LDKChannelManager - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_manager_var); - channel_manager_ref = tag_ptr(channel_manager_var.inner, channel_manager_var.is_owned); - uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 62, channel_manager_ref); - void* ret_ptr = untag_ptr(ret); - CHECK_ACCESS(ret_ptr); - LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr); - FREE(untag_ptr(ret)); - return ret_conv; -} -LDKCResult_NoneIOErrorZ persist_graph_LDKPersister_jcall(const void* this_arg, const LDKNetworkGraph * network_graph) { - LDKPersister_JCalls *j_calls = (LDKPersister_JCalls*) this_arg; - LDKNetworkGraph network_graph_var = *network_graph; - int64_t network_graph_ref = 0; - // WARNING: we may need a move here but no clone is available for LDKNetworkGraph - CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_var); - network_graph_ref = tag_ptr(network_graph_var.inner, network_graph_var.is_owned); - uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 63, network_graph_ref); - void* ret_ptr = untag_ptr(ret); - CHECK_ACCESS(ret_ptr); - LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr); - FREE(untag_ptr(ret)); - return ret_conv; -} -LDKCResult_NoneIOErrorZ persist_scorer_LDKPersister_jcall(const void* this_arg, const LDKWriteableScore * scorer) { - LDKPersister_JCalls *j_calls = (LDKPersister_JCalls*) this_arg; - // WARNING: This object doesn't live past this scope, needs clone! - int64_t ret_scorer = tag_ptr(scorer, false); - uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 64, ret_scorer); +LDKCResult_TransactionNoneZ spend_spendable_outputs_LDKOutputSpender_jcall(const void* this_arg, LDKCVec_SpendableOutputDescriptorZ descriptors, LDKCVec_TxOutZ outputs, LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight, LDKCOption_u32Z locktime) { + LDKOutputSpender_JCalls *j_calls = (LDKOutputSpender_JCalls*) this_arg; + LDKCVec_SpendableOutputDescriptorZ descriptors_var = descriptors; + int64_tArray descriptors_arr = NULL; + descriptors_arr = init_int64_tArray(descriptors_var.datalen, __LINE__); + int64_t *descriptors_arr_ptr = (int64_t*)(((uint8_t*)descriptors_arr) + 8); + for (size_t b = 0; b < descriptors_var.datalen; b++) { + LDKSpendableOutputDescriptor *descriptors_conv_27_copy = MALLOC(sizeof(LDKSpendableOutputDescriptor), "LDKSpendableOutputDescriptor"); + *descriptors_conv_27_copy = descriptors_var.data[b]; + int64_t descriptors_conv_27_ref = tag_ptr(descriptors_conv_27_copy, true); + descriptors_arr_ptr[b] = descriptors_conv_27_ref; + } + + FREE(descriptors_var.data); + LDKCVec_TxOutZ outputs_var = outputs; + int64_tArray outputs_arr = NULL; + outputs_arr = init_int64_tArray(outputs_var.datalen, __LINE__); + int64_t *outputs_arr_ptr = (int64_t*)(((uint8_t*)outputs_arr) + 8); + for (size_t h = 0; h < outputs_var.datalen; h++) { + LDKTxOut* outputs_conv_7_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut"); + *outputs_conv_7_ref = outputs_var.data[h]; + outputs_arr_ptr[h] = tag_ptr(outputs_conv_7_ref, true); + } + + FREE(outputs_var.data); + LDKCVec_u8Z change_destination_script_var = change_destination_script; + int8_tArray change_destination_script_arr = init_int8_tArray(change_destination_script_var.datalen, __LINE__); + memcpy(change_destination_script_arr->elems, change_destination_script_var.data, change_destination_script_var.datalen); + CVec_u8Z_free(change_destination_script_var); + int32_t feerate_sat_per_1000_weight_conv = feerate_sat_per_1000_weight; + LDKCOption_u32Z *locktime_copy = MALLOC(sizeof(LDKCOption_u32Z), "LDKCOption_u32Z"); + *locktime_copy = locktime; + int64_t locktime_ref = tag_ptr(locktime_copy, true); + uint64_t ret = js_invoke_function_l_lllil(j_calls->instance_ptr, 63, (int64_t)descriptors_arr, (int64_t)outputs_arr, (int64_t)change_destination_script_arr, feerate_sat_per_1000_weight_conv, locktime_ref); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); - LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr); + LDKCResult_TransactionNoneZ ret_conv = *(LDKCResult_TransactionNoneZ*)(ret_ptr); FREE(untag_ptr(ret)); return ret_conv; } -static void LDKPersister_JCalls_cloned(LDKPersister* new_obj) { - LDKPersister_JCalls *j_calls = (LDKPersister_JCalls*) new_obj->this_arg; +static void LDKOutputSpender_JCalls_cloned(LDKOutputSpender* new_obj) { + LDKOutputSpender_JCalls *j_calls = (LDKOutputSpender_JCalls*) new_obj->this_arg; atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); } -static inline LDKPersister LDKPersister_init (int64_t o) { - LDKPersister_JCalls *calls = MALLOC(sizeof(LDKPersister_JCalls), "LDKPersister_JCalls"); +static inline LDKOutputSpender LDKOutputSpender_init (int64_t o) { + LDKOutputSpender_JCalls *calls = MALLOC(sizeof(LDKOutputSpender_JCalls), "LDKOutputSpender_JCalls"); atomic_init(&calls->refcnt, 1); calls->instance_ptr = o; - LDKPersister ret = { + LDKOutputSpender ret = { .this_arg = (void*) calls, - .persist_manager = persist_manager_LDKPersister_jcall, - .persist_graph = persist_graph_LDKPersister_jcall, - .persist_scorer = persist_scorer_LDKPersister_jcall, - .free = LDKPersister_JCalls_free, + .spend_spendable_outputs = spend_spendable_outputs_LDKOutputSpender_jcall, + .free = LDKOutputSpender_JCalls_free, }; return ret; } -uint64_t CS_LDK_LDKPersister_new(int32_t o) { - LDKPersister *res_ptr = MALLOC(sizeof(LDKPersister), "LDKPersister"); - *res_ptr = LDKPersister_init(o); +uint64_t CS_LDK_LDKOutputSpender_new(int32_t o) { + LDKOutputSpender *res_ptr = MALLOC(sizeof(LDKOutputSpender), "LDKOutputSpender"); + *res_ptr = LDKOutputSpender_init(o); return tag_ptr(res_ptr, true); } -int64_t CS_LDK_Persister_persist_manager(int64_t this_arg, int64_t channel_manager) { +int64_t CS_LDK_OutputSpender_spend_spendable_outputs(int64_t this_arg, int64_tArray descriptors, int64_tArray outputs, int8_tArray change_destination_script, int32_t feerate_sat_per_1000_weight, int64_t locktime) { void* this_arg_ptr = untag_ptr(this_arg); if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } - LDKPersister* this_arg_conv = (LDKPersister*)this_arg_ptr; - LDKChannelManager channel_manager_conv; - channel_manager_conv.inner = untag_ptr(channel_manager); - channel_manager_conv.is_owned = ptr_is_owned(channel_manager); - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_manager_conv); - channel_manager_conv.is_owned = false; - LDKCResult_NoneIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneIOErrorZ), "LDKCResult_NoneIOErrorZ"); - *ret_conv = (this_arg_conv->persist_manager)(this_arg_conv->this_arg, &channel_manager_conv); + LDKOutputSpender* this_arg_conv = (LDKOutputSpender*)this_arg_ptr; + LDKCVec_SpendableOutputDescriptorZ descriptors_constr; + descriptors_constr.datalen = descriptors->arr_len; + if (descriptors_constr.datalen > 0) + descriptors_constr.data = MALLOC(descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements"); + else + descriptors_constr.data = NULL; + int64_t* descriptors_vals = descriptors->elems; + for (size_t b = 0; b < descriptors_constr.datalen; b++) { + int64_t descriptors_conv_27 = descriptors_vals[b]; + void* descriptors_conv_27_ptr = untag_ptr(descriptors_conv_27); + CHECK_ACCESS(descriptors_conv_27_ptr); + LDKSpendableOutputDescriptor descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(descriptors_conv_27_ptr); + descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptors_conv_27)); + descriptors_constr.data[b] = descriptors_conv_27_conv; + } + FREE(descriptors); + LDKCVec_TxOutZ outputs_constr; + outputs_constr.datalen = outputs->arr_len; + if (outputs_constr.datalen > 0) + outputs_constr.data = MALLOC(outputs_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements"); + else + outputs_constr.data = NULL; + int64_t* outputs_vals = outputs->elems; + for (size_t h = 0; h < outputs_constr.datalen; h++) { + int64_t outputs_conv_7 = outputs_vals[h]; + void* outputs_conv_7_ptr = untag_ptr(outputs_conv_7); + CHECK_ACCESS(outputs_conv_7_ptr); + LDKTxOut outputs_conv_7_conv = *(LDKTxOut*)(outputs_conv_7_ptr); + outputs_conv_7_conv = TxOut_clone((LDKTxOut*)untag_ptr(outputs_conv_7)); + outputs_constr.data[h] = outputs_conv_7_conv; + } + FREE(outputs); + LDKCVec_u8Z change_destination_script_ref; + change_destination_script_ref.datalen = change_destination_script->arr_len; + change_destination_script_ref.data = MALLOC(change_destination_script_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(change_destination_script_ref.data, change_destination_script->elems, change_destination_script_ref.datalen); FREE(change_destination_script); + void* locktime_ptr = untag_ptr(locktime); + CHECK_ACCESS(locktime_ptr); + LDKCOption_u32Z locktime_conv = *(LDKCOption_u32Z*)(locktime_ptr); + locktime_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(locktime)); + LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); + *ret_conv = (this_arg_conv->spend_spendable_outputs)(this_arg_conv->this_arg, descriptors_constr, outputs_constr, change_destination_script_ref, feerate_sat_per_1000_weight, locktime_conv); return tag_ptr(ret_conv, true); } -int64_t CS_LDK_Persister_persist_graph(int64_t this_arg, int64_t network_graph) { - void* this_arg_ptr = untag_ptr(this_arg); - if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } - LDKPersister* this_arg_conv = (LDKPersister*)this_arg_ptr; - LDKNetworkGraph network_graph_conv; - network_graph_conv.inner = untag_ptr(network_graph); - network_graph_conv.is_owned = ptr_is_owned(network_graph); - CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv); - network_graph_conv.is_owned = false; - LDKCResult_NoneIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneIOErrorZ), "LDKCResult_NoneIOErrorZ"); - *ret_conv = (this_arg_conv->persist_graph)(this_arg_conv->this_arg, &network_graph_conv); - return tag_ptr(ret_conv, true); +static inline struct LDKOutputSweeper CResult_OutputSweeperDecodeErrorZ_get_ok(LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR owner){ + LDKOutputSweeper ret = *owner->contents.result; + ret.is_owned = false; + return ret; } - -int64_t CS_LDK_Persister_persist_scorer(int64_t this_arg, int64_t scorer) { - void* this_arg_ptr = untag_ptr(this_arg); - if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } - LDKPersister* this_arg_conv = (LDKPersister*)this_arg_ptr; - void* scorer_ptr = untag_ptr(scorer); - if (ptr_is_owned(scorer)) { CHECK_ACCESS(scorer_ptr); } - LDKWriteableScore* scorer_conv = (LDKWriteableScore*)scorer_ptr; - LDKCResult_NoneIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneIOErrorZ), "LDKCResult_NoneIOErrorZ"); - *ret_conv = (this_arg_conv->persist_scorer)(this_arg_conv->this_arg, scorer_conv); - return tag_ptr(ret_conv, true); +int64_t CS_LDK_CResult_OutputSweeperDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_OutputSweeperDecodeErrorZ* owner_conv = (LDKCResult_OutputSweeperDecodeErrorZ*)untag_ptr(owner); + LDKOutputSweeper ret_var = CResult_OutputSweeperDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -typedef struct LDKPersist_JCalls { - atomic_size_t refcnt; - uint32_t instance_ptr; -} LDKPersist_JCalls; -static void LDKPersist_JCalls_free(void* this_arg) { - LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg; - if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { - FREE(j_calls); - } +static inline struct LDKDecodeError CResult_OutputSweeperDecodeErrorZ_get_err(LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); } -LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) { - LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg; - LDKOutPoint channel_id_var = channel_id; - int64_t channel_id_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); - channel_id_ref = tag_ptr(channel_id_var.inner, channel_id_var.is_owned); - LDKChannelMonitor data_var = *data; - int64_t data_ref = 0; - data_var = ChannelMonitor_clone(&data_var); - CHECK_INNER_FIELD_ACCESS_OR_NULL(data_var); - data_ref = tag_ptr(data_var.inner, data_var.is_owned); - LDKMonitorUpdateId update_id_var = update_id; - int64_t update_id_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_var); - update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned); - uint64_t ret = js_invoke_function_ChannelMonitorUpdateStatus_lll(j_calls->instance_ptr, 65, channel_id_ref, data_ref, update_id_ref); - LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_cs(ret); - return ret_conv; +int64_t CS_LDK_CResult_OutputSweeperDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_OutputSweeperDecodeErrorZ* owner_conv = (LDKCResult_OutputSweeperDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_OutputSweeperDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; } -LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, LDKChannelMonitorUpdate update, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) { - LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg; - LDKOutPoint channel_id_var = channel_id; - int64_t channel_id_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); - channel_id_ref = tag_ptr(channel_id_var.inner, channel_id_var.is_owned); - LDKChannelMonitorUpdate update_var = update; - int64_t update_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(update_var); - update_ref = tag_ptr(update_var.inner, update_var.is_owned); - LDKChannelMonitor data_var = *data; - int64_t data_ref = 0; - data_var = ChannelMonitor_clone(&data_var); - CHECK_INNER_FIELD_ACCESS_OR_NULL(data_var); - data_ref = tag_ptr(data_var.inner, data_var.is_owned); - LDKMonitorUpdateId update_id_var = update_id; - int64_t update_id_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_var); - update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned); - uint64_t ret = js_invoke_function_ChannelMonitorUpdateStatus_llll(j_calls->instance_ptr, 66, channel_id_ref, update_ref, data_ref, update_id_ref); - LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_cs(ret); - return ret_conv; + +static inline struct LDKBestBlock C2Tuple_BestBlockOutputSweeperZ_get_a(LDKC2Tuple_BestBlockOutputSweeperZ *NONNULL_PTR owner){ + LDKBestBlock ret = owner->a; + ret.is_owned = false; + return ret; } -static void LDKPersist_JCalls_cloned(LDKPersist* new_obj) { - LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) new_obj->this_arg; - atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +int64_t CS_LDK_C2Tuple_BestBlockOutputSweeperZ_get_a(int64_t owner) { + LDKC2Tuple_BestBlockOutputSweeperZ* owner_conv = (LDKC2Tuple_BestBlockOutputSweeperZ*)untag_ptr(owner); + LDKBestBlock ret_var = C2Tuple_BestBlockOutputSweeperZ_get_a(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -static inline LDKPersist LDKPersist_init (int64_t o) { - LDKPersist_JCalls *calls = MALLOC(sizeof(LDKPersist_JCalls), "LDKPersist_JCalls"); - atomic_init(&calls->refcnt, 1); - calls->instance_ptr = o; - LDKPersist ret = { - .this_arg = (void*) calls, - .persist_new_channel = persist_new_channel_LDKPersist_jcall, - .update_persisted_channel = update_persisted_channel_LDKPersist_jcall, - .free = LDKPersist_JCalls_free, - }; +static inline struct LDKOutputSweeper C2Tuple_BestBlockOutputSweeperZ_get_b(LDKC2Tuple_BestBlockOutputSweeperZ *NONNULL_PTR owner){ + LDKOutputSweeper ret = owner->b; + ret.is_owned = false; return ret; } -uint64_t CS_LDK_LDKPersist_new(int32_t o) { - LDKPersist *res_ptr = MALLOC(sizeof(LDKPersist), "LDKPersist"); - *res_ptr = LDKPersist_init(o); - return tag_ptr(res_ptr, true); -} -int32_t CS_LDK_Persist_persist_new_channel(int64_t this_arg, int64_t channel_id, int64_t data, int64_t update_id) { - void* this_arg_ptr = untag_ptr(this_arg); - if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } - LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr; - LDKOutPoint channel_id_conv; - channel_id_conv.inner = untag_ptr(channel_id); - channel_id_conv.is_owned = ptr_is_owned(channel_id); - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); - channel_id_conv = OutPoint_clone(&channel_id_conv); - LDKChannelMonitor data_conv; - data_conv.inner = untag_ptr(data); - data_conv.is_owned = ptr_is_owned(data); - CHECK_INNER_FIELD_ACCESS_OR_NULL(data_conv); - data_conv.is_owned = false; - LDKMonitorUpdateId update_id_conv; - update_id_conv.inner = untag_ptr(update_id); - update_id_conv.is_owned = ptr_is_owned(update_id); - CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv); - update_id_conv = MonitorUpdateId_clone(&update_id_conv); - int32_t ret_conv = LDKChannelMonitorUpdateStatus_to_cs((this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, channel_id_conv, &data_conv, update_id_conv)); - return ret_conv; +int64_t CS_LDK_C2Tuple_BestBlockOutputSweeperZ_get_b(int64_t owner) { + LDKC2Tuple_BestBlockOutputSweeperZ* owner_conv = (LDKC2Tuple_BestBlockOutputSweeperZ*)untag_ptr(owner); + LDKOutputSweeper ret_var = C2Tuple_BestBlockOutputSweeperZ_get_b(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -int32_t CS_LDK_Persist_update_persisted_channel(int64_t this_arg, int64_t channel_id, int64_t update, int64_t data, int64_t update_id) { - void* this_arg_ptr = untag_ptr(this_arg); - if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } - LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr; - LDKOutPoint channel_id_conv; - channel_id_conv.inner = untag_ptr(channel_id); - channel_id_conv.is_owned = ptr_is_owned(channel_id); - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); - channel_id_conv = OutPoint_clone(&channel_id_conv); - LDKChannelMonitorUpdate update_conv; - update_conv.inner = untag_ptr(update); - update_conv.is_owned = ptr_is_owned(update); - CHECK_INNER_FIELD_ACCESS_OR_NULL(update_conv); - update_conv = ChannelMonitorUpdate_clone(&update_conv); - LDKChannelMonitor data_conv; - data_conv.inner = untag_ptr(data); - data_conv.is_owned = ptr_is_owned(data); - CHECK_INNER_FIELD_ACCESS_OR_NULL(data_conv); - data_conv.is_owned = false; - LDKMonitorUpdateId update_id_conv; - update_id_conv.inner = untag_ptr(update_id); - update_id_conv.is_owned = ptr_is_owned(update_id); - CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv); - update_id_conv = MonitorUpdateId_clone(&update_id_conv); - int32_t ret_conv = LDKChannelMonitorUpdateStatus_to_cs((this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, channel_id_conv, update_conv, &data_conv, update_id_conv)); - return ret_conv; +static inline struct LDKC2Tuple_BestBlockOutputSweeperZ *CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return &*owner->contents.result; } - -typedef struct LDKFutureCallback_JCalls { - atomic_size_t refcnt; - uint32_t instance_ptr; -} LDKFutureCallback_JCalls; -static void LDKFutureCallback_JCalls_free(void* this_arg) { - LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg; - if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { - FREE(j_calls); - } +int64_t CS_LDK_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* owner_conv = (LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)untag_ptr(owner); + int64_t ret_ret = tag_ptr(CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(owner_conv), false); + return ret_ret; } -void call_LDKFutureCallback_jcall(const void* this_arg) { - LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg; - js_invoke_function_void_(j_calls->instance_ptr, 67); + +static inline struct LDKDecodeError CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); } -static void LDKFutureCallback_JCalls_cloned(LDKFutureCallback* new_obj) { - LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) new_obj->this_arg; - atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +int64_t CS_LDK_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* owner_conv = (LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; } -static inline LDKFutureCallback LDKFutureCallback_init (int64_t o) { - LDKFutureCallback_JCalls *calls = MALLOC(sizeof(LDKFutureCallback_JCalls), "LDKFutureCallback_JCalls"); + +static inline struct LDKDelayedPaymentBasepoint CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){ + LDKDelayedPaymentBasepoint ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner); + LDKDelayedPaymentBasepoint ret_var = CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +int64_t CS_LDK_CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKDelayedPaymentKey CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){ + LDKDelayedPaymentKey ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner); + LDKDelayedPaymentKey ret_var = CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_DelayedPaymentKeyDecodeErrorZ_get_err(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +int64_t CS_LDK_CResult_DelayedPaymentKeyDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_DelayedPaymentKeyDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKHtlcBasepoint CResult_HtlcBasepointDecodeErrorZ_get_ok(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){ + LDKHtlcBasepoint ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_HtlcBasepointDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner); + LDKHtlcBasepoint ret_var = CResult_HtlcBasepointDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_HtlcBasepointDecodeErrorZ_get_err(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +int64_t CS_LDK_CResult_HtlcBasepointDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_HtlcBasepointDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKHtlcKey CResult_HtlcKeyDecodeErrorZ_get_ok(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){ + LDKHtlcKey ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_HtlcKeyDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner); + LDKHtlcKey ret_var = CResult_HtlcKeyDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_HtlcKeyDecodeErrorZ_get_err(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +int64_t CS_LDK_CResult_HtlcKeyDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_HtlcKeyDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKRevocationBasepoint CResult_RevocationBasepointDecodeErrorZ_get_ok(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){ + LDKRevocationBasepoint ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_RevocationBasepointDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner); + LDKRevocationBasepoint ret_var = CResult_RevocationBasepointDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_RevocationBasepointDecodeErrorZ_get_err(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +int64_t CS_LDK_CResult_RevocationBasepointDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_RevocationBasepointDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKRevocationKey CResult_RevocationKeyDecodeErrorZ_get_ok(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){ + LDKRevocationKey ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_RevocationKeyDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner); + LDKRevocationKey ret_var = CResult_RevocationKeyDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_RevocationKeyDecodeErrorZ_get_err(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +int64_t CS_LDK_CResult_RevocationKeyDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_RevocationKeyDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKLockedChannelMonitor CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){ + LDKLockedChannelMonitor ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_LockedChannelMonitorNoneZ_get_ok(int64_t owner) { + LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner); + LDKLockedChannelMonitor ret_var = CResult_LockedChannelMonitorNoneZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return *owner->contents.err; +} +void CS_LDK_CResult_LockedChannelMonitorNoneZ_get_err(int64_t owner) { + LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner); + CResult_LockedChannelMonitorNoneZ_get_err(owner_conv); +} + +static inline struct LDKOutPoint C2Tuple_OutPointChannelIdZ_get_a(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR owner){ + LDKOutPoint ret = owner->a; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_C2Tuple_OutPointChannelIdZ_get_a(int64_t owner) { + LDKC2Tuple_OutPointChannelIdZ* owner_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(owner); + LDKOutPoint ret_var = C2Tuple_OutPointChannelIdZ_get_a(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKChannelId C2Tuple_OutPointChannelIdZ_get_b(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR owner){ + LDKChannelId ret = owner->b; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_C2Tuple_OutPointChannelIdZ_get_b(int64_t owner) { + LDKC2Tuple_OutPointChannelIdZ* owner_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(owner); + LDKChannelId ret_var = C2Tuple_OutPointChannelIdZ_get_b(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline LDKCVec_C2Tuple_OutPointChannelIdZZ CVec_C2Tuple_OutPointChannelIdZZ_clone(const LDKCVec_C2Tuple_OutPointChannelIdZZ *orig) { + LDKCVec_C2Tuple_OutPointChannelIdZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ) * orig->datalen, "LDKCVec_C2Tuple_OutPointChannelIdZZ clone bytes"), .datalen = orig->datalen }; + for (size_t i = 0; i < ret.datalen; i++) { + ret.data[i] = C2Tuple_OutPointChannelIdZ_clone(&orig->data[i]); + } + return ret; +} +static inline LDKCVec_MonitorUpdateIdZ CVec_MonitorUpdateIdZ_clone(const LDKCVec_MonitorUpdateIdZ *orig) { + LDKCVec_MonitorUpdateIdZ ret = { .data = MALLOC(sizeof(LDKMonitorUpdateId) * orig->datalen, "LDKCVec_MonitorUpdateIdZ clone bytes"), .datalen = orig->datalen }; + for (size_t i = 0; i < ret.datalen; i++) { + ret.data[i] = MonitorUpdateId_clone(&orig->data[i]); + } + return ret; +} +static inline struct LDKOutPoint C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){ + LDKOutPoint ret = owner->a; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(int64_t owner) { + LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner); + LDKOutPoint ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKCVec_MonitorUpdateIdZ C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){ + return CVec_MonitorUpdateIdZ_clone(&owner->b); +} +int64_tArray CS_LDK_C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(int64_t owner) { + LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner); + LDKCVec_MonitorUpdateIdZ ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(owner_conv); + int64_tArray ret_arr = NULL; + ret_arr = init_int64_tArray(ret_var.datalen, __LINE__); + int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8); + for (size_t r = 0; r < ret_var.datalen; r++) { + LDKMonitorUpdateId ret_conv_17_var = ret_var.data[r]; + int64_t ret_conv_17_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_17_var); + ret_conv_17_ref = tag_ptr(ret_conv_17_var.inner, ret_conv_17_var.is_owned); + ret_arr_ptr[r] = ret_conv_17_ref; + } + + FREE(ret_var.data); + return ret_arr; +} + +static inline LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ CVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ_clone(const LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ *orig) { + LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ) * orig->datalen, "LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ clone bytes"), .datalen = orig->datalen }; + for (size_t i = 0; i < ret.datalen; i++) { + ret.data[i] = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_clone(&orig->data[i]); + } + return ret; +} +typedef struct LDKPersister_JCalls { + atomic_size_t refcnt; + uint32_t instance_ptr; +} LDKPersister_JCalls; +static void LDKPersister_JCalls_free(void* this_arg) { + LDKPersister_JCalls *j_calls = (LDKPersister_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + FREE(j_calls); + } +} +LDKCResult_NoneIOErrorZ persist_manager_LDKPersister_jcall(const void* this_arg, const LDKChannelManager * channel_manager) { + LDKPersister_JCalls *j_calls = (LDKPersister_JCalls*) this_arg; + LDKChannelManager channel_manager_var = *channel_manager; + int64_t channel_manager_ref = 0; + // WARNING: we may need a move here but no clone is available for LDKChannelManager + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_manager_var); + channel_manager_ref = tag_ptr(channel_manager_var.inner, channel_manager_var.is_owned); + uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 64, channel_manager_ref); + void* ret_ptr = untag_ptr(ret); + CHECK_ACCESS(ret_ptr); + LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr); + FREE(untag_ptr(ret)); + return ret_conv; +} +LDKCResult_NoneIOErrorZ persist_graph_LDKPersister_jcall(const void* this_arg, const LDKNetworkGraph * network_graph) { + LDKPersister_JCalls *j_calls = (LDKPersister_JCalls*) this_arg; + LDKNetworkGraph network_graph_var = *network_graph; + int64_t network_graph_ref = 0; + // WARNING: we may need a move here but no clone is available for LDKNetworkGraph + CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_var); + network_graph_ref = tag_ptr(network_graph_var.inner, network_graph_var.is_owned); + uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 65, network_graph_ref); + void* ret_ptr = untag_ptr(ret); + CHECK_ACCESS(ret_ptr); + LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr); + FREE(untag_ptr(ret)); + return ret_conv; +} +LDKCResult_NoneIOErrorZ persist_scorer_LDKPersister_jcall(const void* this_arg, const LDKWriteableScore * scorer) { + LDKPersister_JCalls *j_calls = (LDKPersister_JCalls*) this_arg; + // WARNING: This object doesn't live past this scope, needs clone! + int64_t ret_scorer = tag_ptr(scorer, false); + uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 66, ret_scorer); + void* ret_ptr = untag_ptr(ret); + CHECK_ACCESS(ret_ptr); + LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr); + FREE(untag_ptr(ret)); + return ret_conv; +} +static void LDKPersister_JCalls_cloned(LDKPersister* new_obj) { + LDKPersister_JCalls *j_calls = (LDKPersister_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +} +static inline LDKPersister LDKPersister_init (int64_t o) { + LDKPersister_JCalls *calls = MALLOC(sizeof(LDKPersister_JCalls), "LDKPersister_JCalls"); atomic_init(&calls->refcnt, 1); calls->instance_ptr = o; - LDKFutureCallback ret = { + LDKPersister ret = { .this_arg = (void*) calls, - .call = call_LDKFutureCallback_jcall, - .free = LDKFutureCallback_JCalls_free, + .persist_manager = persist_manager_LDKPersister_jcall, + .persist_graph = persist_graph_LDKPersister_jcall, + .persist_scorer = persist_scorer_LDKPersister_jcall, + .free = LDKPersister_JCalls_free, }; return ret; } -uint64_t CS_LDK_LDKFutureCallback_new(int32_t o) { - LDKFutureCallback *res_ptr = MALLOC(sizeof(LDKFutureCallback), "LDKFutureCallback"); - *res_ptr = LDKFutureCallback_init(o); +uint64_t CS_LDK_LDKPersister_new(int32_t o) { + LDKPersister *res_ptr = MALLOC(sizeof(LDKPersister), "LDKPersister"); + *res_ptr = LDKPersister_init(o); return tag_ptr(res_ptr, true); } -void CS_LDK_FutureCallback_call(int64_t this_arg) { +int64_t CS_LDK_Persister_persist_manager(int64_t this_arg, int64_t channel_manager) { void* this_arg_ptr = untag_ptr(this_arg); if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } - LDKFutureCallback* this_arg_conv = (LDKFutureCallback*)this_arg_ptr; - (this_arg_conv->call)(this_arg_conv->this_arg); + LDKPersister* this_arg_conv = (LDKPersister*)this_arg_ptr; + LDKChannelManager channel_manager_conv; + channel_manager_conv.inner = untag_ptr(channel_manager); + channel_manager_conv.is_owned = ptr_is_owned(channel_manager); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_manager_conv); + channel_manager_conv.is_owned = false; + LDKCResult_NoneIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneIOErrorZ), "LDKCResult_NoneIOErrorZ"); + *ret_conv = (this_arg_conv->persist_manager)(this_arg_conv->this_arg, &channel_manager_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_Persister_persist_graph(int64_t this_arg, int64_t network_graph) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKPersister* this_arg_conv = (LDKPersister*)this_arg_ptr; + LDKNetworkGraph network_graph_conv; + network_graph_conv.inner = untag_ptr(network_graph); + network_graph_conv.is_owned = ptr_is_owned(network_graph); + CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv); + network_graph_conv.is_owned = false; + LDKCResult_NoneIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneIOErrorZ), "LDKCResult_NoneIOErrorZ"); + *ret_conv = (this_arg_conv->persist_graph)(this_arg_conv->this_arg, &network_graph_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_Persister_persist_scorer(int64_t this_arg, int64_t scorer) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKPersister* this_arg_conv = (LDKPersister*)this_arg_ptr; + void* scorer_ptr = untag_ptr(scorer); + if (ptr_is_owned(scorer)) { CHECK_ACCESS(scorer_ptr); } + LDKWriteableScore* scorer_conv = (LDKWriteableScore*)scorer_ptr; + LDKCResult_NoneIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneIOErrorZ), "LDKCResult_NoneIOErrorZ"); + *ret_conv = (this_arg_conv->persist_scorer)(this_arg_conv->this_arg, scorer_conv); + return tag_ptr(ret_conv, true); +} + +typedef struct LDKPersist_JCalls { + atomic_size_t refcnt; + uint32_t instance_ptr; +} LDKPersist_JCalls; +static void LDKPersist_JCalls_free(void* this_arg) { + LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + FREE(j_calls); + } +} +LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_funding_outpoint, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) { + LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg; + LDKOutPoint channel_funding_outpoint_var = channel_funding_outpoint; + int64_t channel_funding_outpoint_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_var); + channel_funding_outpoint_ref = tag_ptr(channel_funding_outpoint_var.inner, channel_funding_outpoint_var.is_owned); + LDKChannelMonitor data_var = *data; + int64_t data_ref = 0; + data_var = ChannelMonitor_clone(&data_var); + CHECK_INNER_FIELD_ACCESS_OR_NULL(data_var); + data_ref = tag_ptr(data_var.inner, data_var.is_owned); + LDKMonitorUpdateId update_id_var = update_id; + int64_t update_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_var); + update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned); + uint64_t ret = js_invoke_function_ChannelMonitorUpdateStatus_lll(j_calls->instance_ptr, 67, channel_funding_outpoint_ref, data_ref, update_id_ref); + LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_cs(ret); + return ret_conv; +} +LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_funding_outpoint, LDKChannelMonitorUpdate update, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) { + LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg; + LDKOutPoint channel_funding_outpoint_var = channel_funding_outpoint; + int64_t channel_funding_outpoint_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_var); + channel_funding_outpoint_ref = tag_ptr(channel_funding_outpoint_var.inner, channel_funding_outpoint_var.is_owned); + LDKChannelMonitorUpdate update_var = update; + int64_t update_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(update_var); + update_ref = tag_ptr(update_var.inner, update_var.is_owned); + LDKChannelMonitor data_var = *data; + int64_t data_ref = 0; + data_var = ChannelMonitor_clone(&data_var); + CHECK_INNER_FIELD_ACCESS_OR_NULL(data_var); + data_ref = tag_ptr(data_var.inner, data_var.is_owned); + LDKMonitorUpdateId update_id_var = update_id; + int64_t update_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_var); + update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned); + uint64_t ret = js_invoke_function_ChannelMonitorUpdateStatus_llll(j_calls->instance_ptr, 68, channel_funding_outpoint_ref, update_ref, data_ref, update_id_ref); + LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_cs(ret); + return ret_conv; +} +void archive_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_funding_outpoint) { + LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg; + LDKOutPoint channel_funding_outpoint_var = channel_funding_outpoint; + int64_t channel_funding_outpoint_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_var); + channel_funding_outpoint_ref = tag_ptr(channel_funding_outpoint_var.inner, channel_funding_outpoint_var.is_owned); + js_invoke_function_void_l(j_calls->instance_ptr, 69, channel_funding_outpoint_ref); +} +static void LDKPersist_JCalls_cloned(LDKPersist* new_obj) { + LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +} +static inline LDKPersist LDKPersist_init (int64_t o) { + LDKPersist_JCalls *calls = MALLOC(sizeof(LDKPersist_JCalls), "LDKPersist_JCalls"); + atomic_init(&calls->refcnt, 1); + calls->instance_ptr = o; + + LDKPersist ret = { + .this_arg = (void*) calls, + .persist_new_channel = persist_new_channel_LDKPersist_jcall, + .update_persisted_channel = update_persisted_channel_LDKPersist_jcall, + .archive_persisted_channel = archive_persisted_channel_LDKPersist_jcall, + .free = LDKPersist_JCalls_free, + }; + return ret; +} +uint64_t CS_LDK_LDKPersist_new(int32_t o) { + LDKPersist *res_ptr = MALLOC(sizeof(LDKPersist), "LDKPersist"); + *res_ptr = LDKPersist_init(o); + return tag_ptr(res_ptr, true); +} +int32_t CS_LDK_Persist_persist_new_channel(int64_t this_arg, int64_t channel_funding_outpoint, int64_t data, int64_t update_id) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr; + LDKOutPoint channel_funding_outpoint_conv; + channel_funding_outpoint_conv.inner = untag_ptr(channel_funding_outpoint); + channel_funding_outpoint_conv.is_owned = ptr_is_owned(channel_funding_outpoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_conv); + channel_funding_outpoint_conv = OutPoint_clone(&channel_funding_outpoint_conv); + LDKChannelMonitor data_conv; + data_conv.inner = untag_ptr(data); + data_conv.is_owned = ptr_is_owned(data); + CHECK_INNER_FIELD_ACCESS_OR_NULL(data_conv); + data_conv.is_owned = false; + LDKMonitorUpdateId update_id_conv; + update_id_conv.inner = untag_ptr(update_id); + update_id_conv.is_owned = ptr_is_owned(update_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv); + update_id_conv = MonitorUpdateId_clone(&update_id_conv); + int32_t ret_conv = LDKChannelMonitorUpdateStatus_to_cs((this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, channel_funding_outpoint_conv, &data_conv, update_id_conv)); + return ret_conv; +} + +int32_t CS_LDK_Persist_update_persisted_channel(int64_t this_arg, int64_t channel_funding_outpoint, int64_t update, int64_t data, int64_t update_id) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr; + LDKOutPoint channel_funding_outpoint_conv; + channel_funding_outpoint_conv.inner = untag_ptr(channel_funding_outpoint); + channel_funding_outpoint_conv.is_owned = ptr_is_owned(channel_funding_outpoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_conv); + channel_funding_outpoint_conv = OutPoint_clone(&channel_funding_outpoint_conv); + LDKChannelMonitorUpdate update_conv; + update_conv.inner = untag_ptr(update); + update_conv.is_owned = ptr_is_owned(update); + CHECK_INNER_FIELD_ACCESS_OR_NULL(update_conv); + update_conv = ChannelMonitorUpdate_clone(&update_conv); + LDKChannelMonitor data_conv; + data_conv.inner = untag_ptr(data); + data_conv.is_owned = ptr_is_owned(data); + CHECK_INNER_FIELD_ACCESS_OR_NULL(data_conv); + data_conv.is_owned = false; + LDKMonitorUpdateId update_id_conv; + update_id_conv.inner = untag_ptr(update_id); + update_id_conv.is_owned = ptr_is_owned(update_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv); + update_id_conv = MonitorUpdateId_clone(&update_id_conv); + int32_t ret_conv = LDKChannelMonitorUpdateStatus_to_cs((this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, channel_funding_outpoint_conv, update_conv, &data_conv, update_id_conv)); + return ret_conv; +} + +void CS_LDK_Persist_archive_persisted_channel(int64_t this_arg, int64_t channel_funding_outpoint) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr; + LDKOutPoint channel_funding_outpoint_conv; + channel_funding_outpoint_conv.inner = untag_ptr(channel_funding_outpoint); + channel_funding_outpoint_conv.is_owned = ptr_is_owned(channel_funding_outpoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_conv); + channel_funding_outpoint_conv = OutPoint_clone(&channel_funding_outpoint_conv); + (this_arg_conv->archive_persisted_channel)(this_arg_conv->this_arg, channel_funding_outpoint_conv); } typedef struct LDKListen_JCalls { @@ -13467,7 +14760,7 @@ void filtered_block_connected_LDKListen_jcall(const void* this_arg, const uint8_ FREE(txdata_var.data); int32_t height_conv = height; - js_invoke_function_void_lli(j_calls->instance_ptr, 68, (int64_t)header_arr, (int64_t)txdata_arr, height_conv); + js_invoke_function_void_lli(j_calls->instance_ptr, 70, (int64_t)header_arr, (int64_t)txdata_arr, height_conv); } void block_connected_LDKListen_jcall(const void* this_arg, LDKu8slice block, uint32_t height) { LDKListen_JCalls *j_calls = (LDKListen_JCalls*) this_arg; @@ -13475,14 +14768,14 @@ void block_connected_LDKListen_jcall(const void* this_arg, LDKu8slice block, uin int8_tArray block_arr = init_int8_tArray(block_var.datalen, __LINE__); memcpy(block_arr->elems, block_var.data, block_var.datalen); int32_t height_conv = height; - js_invoke_function_void_li(j_calls->instance_ptr, 69, (int64_t)block_arr, height_conv); + js_invoke_function_void_li(j_calls->instance_ptr, 71, (int64_t)block_arr, height_conv); } void block_disconnected_LDKListen_jcall(const void* this_arg, const uint8_t (* header)[80], uint32_t height) { LDKListen_JCalls *j_calls = (LDKListen_JCalls*) this_arg; int8_tArray header_arr = init_int8_tArray(80, __LINE__); memcpy(header_arr->elems, *header, 80); int32_t height_conv = height; - js_invoke_function_void_li(j_calls->instance_ptr, 70, (int64_t)header_arr, height_conv); + js_invoke_function_void_li(j_calls->instance_ptr, 72, (int64_t)header_arr, height_conv); } static void LDKListen_JCalls_cloned(LDKListen* new_obj) { LDKListen_JCalls *j_calls = (LDKListen_JCalls*) new_obj->this_arg; @@ -13582,24 +14875,24 @@ void transactions_confirmed_LDKConfirm_jcall(const void* this_arg, const uint8_t FREE(txdata_var.data); int32_t height_conv = height; - js_invoke_function_void_lli(j_calls->instance_ptr, 71, (int64_t)header_arr, (int64_t)txdata_arr, height_conv); + js_invoke_function_void_lli(j_calls->instance_ptr, 73, (int64_t)header_arr, (int64_t)txdata_arr, height_conv); } void transaction_unconfirmed_LDKConfirm_jcall(const void* this_arg, const uint8_t (* txid)[32]) { LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg; int8_tArray txid_arr = init_int8_tArray(32, __LINE__); memcpy(txid_arr->elems, *txid, 32); - js_invoke_function_void_l(j_calls->instance_ptr, 72, (int64_t)txid_arr); + js_invoke_function_void_l(j_calls->instance_ptr, 74, (int64_t)txid_arr); } void best_block_updated_LDKConfirm_jcall(const void* this_arg, const uint8_t (* header)[80], uint32_t height) { LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg; int8_tArray header_arr = init_int8_tArray(80, __LINE__); memcpy(header_arr->elems, *header, 80); int32_t height_conv = height; - js_invoke_function_void_li(j_calls->instance_ptr, 73, (int64_t)header_arr, height_conv); + js_invoke_function_void_li(j_calls->instance_ptr, 75, (int64_t)header_arr, height_conv); } LDKCVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ get_relevant_txids_LDKConfirm_jcall(const void* this_arg) { LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg; - int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 74); + int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 76); LDKCVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ ret_constr; ret_constr.datalen = ret->arr_len; if (ret_constr.datalen > 0) @@ -13709,6 +15002,68 @@ int64_tArray CS_LDK_Confirm_get_relevant_txids(int64_t this_arg) { return ret_arr; } +uint32_t CS_LDK_LDKSpendingDelay_ty_from_ptr(int64_t ptr) { + LDKSpendingDelay *obj = (LDKSpendingDelay*)untag_ptr(ptr); + switch(obj->tag) { + case LDKSpendingDelay_Relative: return 0; + case LDKSpendingDelay_Absolute: return 1; + default: abort(); + } +} +int32_t CS_LDK_LDKSpendingDelay_Relative_get_num_blocks(int64_t ptr) { + LDKSpendingDelay *obj = (LDKSpendingDelay*)untag_ptr(ptr); + CHECK(obj->tag == LDKSpendingDelay_Relative); + int32_t num_blocks_conv = obj->relative.num_blocks; + return num_blocks_conv; +} +int32_t CS_LDK_LDKSpendingDelay_Absolute_get_height(int64_t ptr) { + LDKSpendingDelay *obj = (LDKSpendingDelay*)untag_ptr(ptr); + CHECK(obj->tag == LDKSpendingDelay_Absolute); + int32_t height_conv = obj->absolute.height; + return height_conv; +} +typedef struct LDKFutureCallback_JCalls { + atomic_size_t refcnt; + uint32_t instance_ptr; +} LDKFutureCallback_JCalls; +static void LDKFutureCallback_JCalls_free(void* this_arg) { + LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + FREE(j_calls); + } +} +void call_LDKFutureCallback_jcall(const void* this_arg) { + LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg; + js_invoke_function_void_(j_calls->instance_ptr, 77); +} +static void LDKFutureCallback_JCalls_cloned(LDKFutureCallback* new_obj) { + LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +} +static inline LDKFutureCallback LDKFutureCallback_init (int64_t o) { + LDKFutureCallback_JCalls *calls = MALLOC(sizeof(LDKFutureCallback_JCalls), "LDKFutureCallback_JCalls"); + atomic_init(&calls->refcnt, 1); + calls->instance_ptr = o; + + LDKFutureCallback ret = { + .this_arg = (void*) calls, + .call = call_LDKFutureCallback_jcall, + .free = LDKFutureCallback_JCalls_free, + }; + return ret; +} +uint64_t CS_LDK_LDKFutureCallback_new(int32_t o) { + LDKFutureCallback *res_ptr = MALLOC(sizeof(LDKFutureCallback), "LDKFutureCallback"); + *res_ptr = LDKFutureCallback_init(o); + return tag_ptr(res_ptr, true); +} +void CS_LDK_FutureCallback_call(int64_t this_arg) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKFutureCallback* this_arg_conv = (LDKFutureCallback*)this_arg_ptr; + (this_arg_conv->call)(this_arg_conv->this_arg); +} + typedef struct LDKEventHandler_JCalls { atomic_size_t refcnt; uint32_t instance_ptr; @@ -13724,7 +15079,7 @@ void handle_event_LDKEventHandler_jcall(const void* this_arg, LDKEvent event) { LDKEvent *event_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); *event_copy = event; int64_t event_ref = tag_ptr(event_copy, true); - js_invoke_function_void_l(j_calls->instance_ptr, 75, event_ref); + js_invoke_function_void_l(j_calls->instance_ptr, 78, event_ref); } static void LDKEventHandler_JCalls_cloned(LDKEventHandler* new_obj) { LDKEventHandler_JCalls *j_calls = (LDKEventHandler_JCalls*) new_obj->this_arg; @@ -13772,7 +15127,7 @@ void process_pending_events_LDKEventsProvider_jcall(const void* this_arg, LDKEve LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg; LDKEventHandler* handler_ret = MALLOC(sizeof(LDKEventHandler), "LDKEventHandler"); *handler_ret = handler; - js_invoke_function_void_l(j_calls->instance_ptr, 76, tag_ptr(handler_ret, true)); + js_invoke_function_void_l(j_calls->instance_ptr, 79, tag_ptr(handler_ret, true)); } static void LDKEventsProvider_JCalls_cloned(LDKEventsProvider* new_obj) { LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) new_obj->this_arg; @@ -13837,7 +15192,7 @@ static void LDKMessageSendEventsProvider_JCalls_free(void* this_arg) { } LDKCVec_MessageSendEventZ get_and_clear_pending_msg_events_LDKMessageSendEventsProvider_jcall(const void* this_arg) { LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg; - int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 77); + int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 80); LDKCVec_MessageSendEventZ ret_constr; ret_constr.datalen = ret->arr_len; if (ret_constr.datalen > 0) @@ -13916,7 +15271,7 @@ void handle_open_channel_LDKChannelMessageHandler_jcall(const void* this_arg, LD msg_var = OpenChannel_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_void_ll(j_calls->instance_ptr, 78, (int64_t)their_node_id_arr, msg_ref); + js_invoke_function_void_ll(j_calls->instance_ptr, 81, (int64_t)their_node_id_arr, msg_ref); } void handle_open_channel_v2_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKOpenChannelV2 * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -13927,7 +15282,7 @@ void handle_open_channel_v2_LDKChannelMessageHandler_jcall(const void* this_arg, msg_var = OpenChannelV2_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_void_ll(j_calls->instance_ptr, 79, (int64_t)their_node_id_arr, msg_ref); + js_invoke_function_void_ll(j_calls->instance_ptr, 82, (int64_t)their_node_id_arr, msg_ref); } void handle_accept_channel_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKAcceptChannel * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -13938,7 +15293,7 @@ void handle_accept_channel_LDKChannelMessageHandler_jcall(const void* this_arg, msg_var = AcceptChannel_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_void_ll(j_calls->instance_ptr, 80, (int64_t)their_node_id_arr, msg_ref); + js_invoke_function_void_ll(j_calls->instance_ptr, 83, (int64_t)their_node_id_arr, msg_ref); } void handle_accept_channel_v2_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKAcceptChannelV2 * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -13949,7 +15304,7 @@ void handle_accept_channel_v2_LDKChannelMessageHandler_jcall(const void* this_ar msg_var = AcceptChannelV2_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_void_ll(j_calls->instance_ptr, 81, (int64_t)their_node_id_arr, msg_ref); + js_invoke_function_void_ll(j_calls->instance_ptr, 84, (int64_t)their_node_id_arr, msg_ref); } void handle_funding_created_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingCreated * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -13960,7 +15315,7 @@ void handle_funding_created_LDKChannelMessageHandler_jcall(const void* this_arg, msg_var = FundingCreated_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_void_ll(j_calls->instance_ptr, 82, (int64_t)their_node_id_arr, msg_ref); + js_invoke_function_void_ll(j_calls->instance_ptr, 85, (int64_t)their_node_id_arr, msg_ref); } void handle_funding_signed_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingSigned * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -13971,7 +15326,7 @@ void handle_funding_signed_LDKChannelMessageHandler_jcall(const void* this_arg, msg_var = FundingSigned_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_void_ll(j_calls->instance_ptr, 83, (int64_t)their_node_id_arr, msg_ref); + js_invoke_function_void_ll(j_calls->instance_ptr, 86, (int64_t)their_node_id_arr, msg_ref); } void handle_channel_ready_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelReady * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -13982,7 +15337,7 @@ void handle_channel_ready_LDKChannelMessageHandler_jcall(const void* this_arg, L msg_var = ChannelReady_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_void_ll(j_calls->instance_ptr, 84, (int64_t)their_node_id_arr, msg_ref); + js_invoke_function_void_ll(j_calls->instance_ptr, 87, (int64_t)their_node_id_arr, msg_ref); } void handle_shutdown_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKShutdown * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -13993,7 +15348,7 @@ void handle_shutdown_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPub msg_var = Shutdown_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_void_ll(j_calls->instance_ptr, 85, (int64_t)their_node_id_arr, msg_ref); + js_invoke_function_void_ll(j_calls->instance_ptr, 88, (int64_t)their_node_id_arr, msg_ref); } void handle_closing_signed_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKClosingSigned * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -14004,7 +15359,7 @@ void handle_closing_signed_LDKChannelMessageHandler_jcall(const void* this_arg, msg_var = ClosingSigned_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_void_ll(j_calls->instance_ptr, 86, (int64_t)their_node_id_arr, msg_ref); + js_invoke_function_void_ll(j_calls->instance_ptr, 89, (int64_t)their_node_id_arr, msg_ref); } void handle_stfu_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKStfu * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -14015,39 +15370,6 @@ void handle_stfu_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicK msg_var = Stfu_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_void_ll(j_calls->instance_ptr, 87, (int64_t)their_node_id_arr, msg_ref); -} -void handle_splice_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKSplice * msg) { - LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; - int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__); - memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33); - LDKSplice msg_var = *msg; - int64_t msg_ref = 0; - msg_var = Splice_clone(&msg_var); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); - msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_void_ll(j_calls->instance_ptr, 88, (int64_t)their_node_id_arr, msg_ref); -} -void handle_splice_ack_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKSpliceAck * msg) { - LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; - int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__); - memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33); - LDKSpliceAck msg_var = *msg; - int64_t msg_ref = 0; - msg_var = SpliceAck_clone(&msg_var); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); - msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_void_ll(j_calls->instance_ptr, 89, (int64_t)their_node_id_arr, msg_ref); -} -void handle_splice_locked_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKSpliceLocked * msg) { - LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; - int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__); - memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33); - LDKSpliceLocked msg_var = *msg; - int64_t msg_ref = 0; - msg_var = SpliceLocked_clone(&msg_var); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); - msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); js_invoke_function_void_ll(j_calls->instance_ptr, 90, (int64_t)their_node_id_arr, msg_ref); } void handle_tx_add_input_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKTxAddInput * msg) { @@ -14344,9 +15666,6 @@ static inline LDKChannelMessageHandler LDKChannelMessageHandler_init (int64_t o, .handle_shutdown = handle_shutdown_LDKChannelMessageHandler_jcall, .handle_closing_signed = handle_closing_signed_LDKChannelMessageHandler_jcall, .handle_stfu = handle_stfu_LDKChannelMessageHandler_jcall, - .handle_splice = handle_splice_LDKChannelMessageHandler_jcall, - .handle_splice_ack = handle_splice_ack_LDKChannelMessageHandler_jcall, - .handle_splice_locked = handle_splice_locked_LDKChannelMessageHandler_jcall, .handle_tx_add_input = handle_tx_add_input_LDKChannelMessageHandler_jcall, .handle_tx_add_output = handle_tx_add_output_LDKChannelMessageHandler_jcall, .handle_tx_remove_input = handle_tx_remove_input_LDKChannelMessageHandler_jcall, @@ -14533,51 +15852,6 @@ void CS_LDK_ChannelMessageHandler_handle_stfu(int64_t this_arg, int8_tArray the (this_arg_conv->handle_stfu)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv); } -void CS_LDK_ChannelMessageHandler_handle_splice(int64_t this_arg, int8_tArray their_node_id, int64_t msg) { - void* this_arg_ptr = untag_ptr(this_arg); - if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } - LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr; - LDKPublicKey their_node_id_ref; - CHECK(their_node_id->arr_len == 33); - memcpy(their_node_id_ref.compressed_form, their_node_id->elems, 33); FREE(their_node_id); - LDKSplice msg_conv; - msg_conv.inner = untag_ptr(msg); - msg_conv.is_owned = ptr_is_owned(msg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv); - msg_conv.is_owned = false; - (this_arg_conv->handle_splice)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv); -} - -void CS_LDK_ChannelMessageHandler_handle_splice_ack(int64_t this_arg, int8_tArray their_node_id, int64_t msg) { - void* this_arg_ptr = untag_ptr(this_arg); - if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } - LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr; - LDKPublicKey their_node_id_ref; - CHECK(their_node_id->arr_len == 33); - memcpy(their_node_id_ref.compressed_form, their_node_id->elems, 33); FREE(their_node_id); - LDKSpliceAck msg_conv; - msg_conv.inner = untag_ptr(msg); - msg_conv.is_owned = ptr_is_owned(msg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv); - msg_conv.is_owned = false; - (this_arg_conv->handle_splice_ack)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv); -} - -void CS_LDK_ChannelMessageHandler_handle_splice_locked(int64_t this_arg, int8_tArray their_node_id, int64_t msg) { - void* this_arg_ptr = untag_ptr(this_arg); - if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } - LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr; - LDKPublicKey their_node_id_ref; - CHECK(their_node_id->arr_len == 33); - memcpy(their_node_id_ref.compressed_form, their_node_id->elems, 33); FREE(their_node_id); - LDKSpliceLocked msg_conv; - msg_conv.inner = untag_ptr(msg); - msg_conv.is_owned = ptr_is_owned(msg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv); - msg_conv.is_owned = false; - (this_arg_conv->handle_splice_locked)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv); -} - void CS_LDK_ChannelMessageHandler_handle_tx_add_input(int64_t this_arg, int8_tArray their_node_id, int64_t msg) { void* this_arg_ptr = untag_ptr(this_arg); if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } @@ -15037,6 +16311,55 @@ int64_tArray CS_LDK_OffersMessageHandler_release_pending_messages(int64_t this_ return ret_arr; } +typedef struct LDKNodeIdLookUp_JCalls { + atomic_size_t refcnt; + uint32_t instance_ptr; +} LDKNodeIdLookUp_JCalls; +static void LDKNodeIdLookUp_JCalls_free(void* this_arg) { + LDKNodeIdLookUp_JCalls *j_calls = (LDKNodeIdLookUp_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + FREE(j_calls); + } +} +LDKPublicKey next_node_id_LDKNodeIdLookUp_jcall(const void* this_arg, uint64_t short_channel_id) { + LDKNodeIdLookUp_JCalls *j_calls = (LDKNodeIdLookUp_JCalls*) this_arg; + int64_t short_channel_id_conv = short_channel_id; + int8_tArray ret = (int8_tArray)js_invoke_function_l_l(j_calls->instance_ptr, 118, short_channel_id_conv); + LDKPublicKey ret_ref; + CHECK(ret->arr_len == 33); + memcpy(ret_ref.compressed_form, ret->elems, 33); FREE(ret); + return ret_ref; +} +static void LDKNodeIdLookUp_JCalls_cloned(LDKNodeIdLookUp* new_obj) { + LDKNodeIdLookUp_JCalls *j_calls = (LDKNodeIdLookUp_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +} +static inline LDKNodeIdLookUp LDKNodeIdLookUp_init (int64_t o) { + LDKNodeIdLookUp_JCalls *calls = MALLOC(sizeof(LDKNodeIdLookUp_JCalls), "LDKNodeIdLookUp_JCalls"); + atomic_init(&calls->refcnt, 1); + calls->instance_ptr = o; + + LDKNodeIdLookUp ret = { + .this_arg = (void*) calls, + .next_node_id = next_node_id_LDKNodeIdLookUp_jcall, + .free = LDKNodeIdLookUp_JCalls_free, + }; + return ret; +} +uint64_t CS_LDK_LDKNodeIdLookUp_new(int32_t o) { + LDKNodeIdLookUp *res_ptr = MALLOC(sizeof(LDKNodeIdLookUp), "LDKNodeIdLookUp"); + *res_ptr = LDKNodeIdLookUp_init(o); + return tag_ptr(res_ptr, true); +} +int8_tArray CS_LDK_NodeIdLookUp_next_node_id(int64_t this_arg, int64_t short_channel_id) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKNodeIdLookUp* this_arg_conv = (LDKNodeIdLookUp*)this_arg_ptr; + int8_tArray ret_arr = init_int8_tArray(33, __LINE__); + memcpy(ret_arr->elems, (this_arg_conv->next_node_id)(this_arg_conv->this_arg, short_channel_id).compressed_form, 33); + return ret_arr; +} + typedef struct LDKRoutingMessageHandler_JCalls { atomic_size_t refcnt; uint32_t instance_ptr; @@ -15055,7 +16378,7 @@ LDKCResult_boolLightningErrorZ handle_node_announcement_LDKRoutingMessageHandler msg_var = NodeAnnouncement_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 118, msg_ref); + uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 119, msg_ref); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr); @@ -15069,7 +16392,7 @@ LDKCResult_boolLightningErrorZ handle_channel_announcement_LDKRoutingMessageHand msg_var = ChannelAnnouncement_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 119, msg_ref); + uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 120, msg_ref); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr); @@ -15083,7 +16406,7 @@ LDKCResult_boolLightningErrorZ handle_channel_update_LDKRoutingMessageHandler_jc msg_var = ChannelUpdate_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 120, msg_ref); + uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 121, msg_ref); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr); @@ -15093,7 +16416,7 @@ LDKCResult_boolLightningErrorZ handle_channel_update_LDKRoutingMessageHandler_jc LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ get_next_channel_announcement_LDKRoutingMessageHandler_jcall(const void* this_arg, uint64_t starting_point) { LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg; int64_t starting_point_conv = starting_point; - uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 121, starting_point_conv); + uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 122, starting_point_conv); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret_conv = *(LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ*)(ret_ptr); @@ -15106,7 +16429,7 @@ LDKNodeAnnouncement get_next_node_announcement_LDKRoutingMessageHandler_jcall(co int64_t starting_point_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(starting_point_var); starting_point_ref = tag_ptr(starting_point_var.inner, starting_point_var.is_owned); - uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 122, starting_point_ref); + uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 123, starting_point_ref); LDKNodeAnnouncement ret_conv; ret_conv.inner = untag_ptr(ret); ret_conv.is_owned = ptr_is_owned(ret); @@ -15123,7 +16446,7 @@ LDKCResult_NoneNoneZ peer_connected_LDKRoutingMessageHandler_jcall(const void* t CHECK_INNER_FIELD_ACCESS_OR_NULL(init_var); init_ref = tag_ptr(init_var.inner, init_var.is_owned); jboolean inbound_conv = inbound; - uint64_t ret = js_invoke_function_l_llb(j_calls->instance_ptr, 123, (int64_t)their_node_id_arr, init_ref, inbound_conv); + uint64_t ret = js_invoke_function_l_llb(j_calls->instance_ptr, 124, (int64_t)their_node_id_arr, init_ref, inbound_conv); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr); @@ -15138,7 +16461,7 @@ LDKCResult_NoneLightningErrorZ handle_reply_channel_range_LDKRoutingMessageHandl int64_t msg_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 124, (int64_t)their_node_id_arr, msg_ref); + uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 125, (int64_t)their_node_id_arr, msg_ref); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr); @@ -15153,7 +16476,7 @@ LDKCResult_NoneLightningErrorZ handle_reply_short_channel_ids_end_LDKRoutingMess int64_t msg_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 125, (int64_t)their_node_id_arr, msg_ref); + uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 126, (int64_t)their_node_id_arr, msg_ref); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr); @@ -15168,7 +16491,7 @@ LDKCResult_NoneLightningErrorZ handle_query_channel_range_LDKRoutingMessageHandl int64_t msg_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 126, (int64_t)their_node_id_arr, msg_ref); + uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 127, (int64_t)their_node_id_arr, msg_ref); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr); @@ -15183,7 +16506,7 @@ LDKCResult_NoneLightningErrorZ handle_query_short_channel_ids_LDKRoutingMessageH int64_t msg_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 127, (int64_t)their_node_id_arr, msg_ref); + uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 128, (int64_t)their_node_id_arr, msg_ref); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr); @@ -15192,11 +16515,11 @@ LDKCResult_NoneLightningErrorZ handle_query_short_channel_ids_LDKRoutingMessageH } bool processing_queue_high_LDKRoutingMessageHandler_jcall(const void* this_arg) { LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg; - return js_invoke_function_b_(j_calls->instance_ptr, 128); + return js_invoke_function_b_(j_calls->instance_ptr, 129); } LDKNodeFeatures provided_node_features_LDKRoutingMessageHandler_jcall(const void* this_arg) { LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg; - uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 129); + uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 130); LDKNodeFeatures ret_conv; ret_conv.inner = untag_ptr(ret); ret_conv.is_owned = ptr_is_owned(ret); @@ -15207,7 +16530,7 @@ LDKInitFeatures provided_init_features_LDKRoutingMessageHandler_jcall(const void LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg; int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__); memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33); - uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 130, (int64_t)their_node_id_arr); + uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 131, (int64_t)their_node_id_arr); LDKInitFeatures ret_conv; ret_conv.inner = untag_ptr(ret); ret_conv.is_owned = ptr_is_owned(ret); @@ -15448,7 +16771,7 @@ static void LDKOnionMessageHandler_JCalls_free(void* this_arg) { } LDKCVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ get_and_clear_connections_needed_LDKOnionMessageHandler_jcall(const void* this_arg) { LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg; - int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 131); + int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 132); LDKCVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ ret_constr; ret_constr.datalen = ret->arr_len; if (ret_constr.datalen > 0) @@ -15476,13 +16799,13 @@ void handle_onion_message_LDKOnionMessageHandler_jcall(const void* this_arg, LDK msg_var = OnionMessage_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_void_ll(j_calls->instance_ptr, 132, (int64_t)peer_node_id_arr, msg_ref); + js_invoke_function_void_ll(j_calls->instance_ptr, 133, (int64_t)peer_node_id_arr, msg_ref); } LDKOnionMessage next_onion_message_for_peer_LDKOnionMessageHandler_jcall(const void* this_arg, LDKPublicKey peer_node_id) { LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg; int8_tArray peer_node_id_arr = init_int8_tArray(33, __LINE__); memcpy(peer_node_id_arr->elems, peer_node_id.compressed_form, 33); - uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 133, (int64_t)peer_node_id_arr); + uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 134, (int64_t)peer_node_id_arr); LDKOnionMessage ret_conv; ret_conv.inner = untag_ptr(ret); ret_conv.is_owned = ptr_is_owned(ret); @@ -15499,7 +16822,7 @@ LDKCResult_NoneNoneZ peer_connected_LDKOnionMessageHandler_jcall(const void* thi CHECK_INNER_FIELD_ACCESS_OR_NULL(init_var); init_ref = tag_ptr(init_var.inner, init_var.is_owned); jboolean inbound_conv = inbound; - uint64_t ret = js_invoke_function_l_llb(j_calls->instance_ptr, 134, (int64_t)their_node_id_arr, init_ref, inbound_conv); + uint64_t ret = js_invoke_function_l_llb(j_calls->instance_ptr, 135, (int64_t)their_node_id_arr, init_ref, inbound_conv); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr); @@ -15510,15 +16833,15 @@ void peer_disconnected_LDKOnionMessageHandler_jcall(const void* this_arg, LDKPub LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg; int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__); memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33); - js_invoke_function_void_l(j_calls->instance_ptr, 135, (int64_t)their_node_id_arr); + js_invoke_function_void_l(j_calls->instance_ptr, 136, (int64_t)their_node_id_arr); } void timer_tick_occurred_LDKOnionMessageHandler_jcall(const void* this_arg) { LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg; - js_invoke_function_void_(j_calls->instance_ptr, 136); + js_invoke_function_void_(j_calls->instance_ptr, 137); } LDKNodeFeatures provided_node_features_LDKOnionMessageHandler_jcall(const void* this_arg) { LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg; - uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 137); + uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 138); LDKNodeFeatures ret_conv; ret_conv.inner = untag_ptr(ret); ret_conv.is_owned = ptr_is_owned(ret); @@ -15529,7 +16852,7 @@ LDKInitFeatures provided_init_features_LDKOnionMessageHandler_jcall(const void* LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg; int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__); memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33); - uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 138, (int64_t)their_node_id_arr); + uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 139, (int64_t)their_node_id_arr); LDKInitFeatures ret_conv; ret_conv.inner = untag_ptr(ret); ret_conv.is_owned = ptr_is_owned(ret); @@ -15686,7 +17009,7 @@ LDKCResult_COption_TypeZDecodeErrorZ read_LDKCustomMessageReader_jcall(const voi LDKu8slice buffer_var = buffer; int8_tArray buffer_arr = init_int8_tArray(buffer_var.datalen, __LINE__); memcpy(buffer_arr->elems, buffer_var.data, buffer_var.datalen); - uint64_t ret = js_invoke_function_l_sl(j_calls->instance_ptr, 139, message_type_conv, (int64_t)buffer_arr); + uint64_t ret = js_invoke_function_l_sl(j_calls->instance_ptr, 140, message_type_conv, (int64_t)buffer_arr); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_COption_TypeZDecodeErrorZ ret_conv = *(LDKCResult_COption_TypeZDecodeErrorZ*)(ret_ptr); @@ -15744,7 +17067,7 @@ LDKCResult_NoneLightningErrorZ handle_custom_message_LDKCustomMessageHandler_jca *msg_ret = msg; int8_tArray sender_node_id_arr = init_int8_tArray(33, __LINE__); memcpy(sender_node_id_arr->elems, sender_node_id.compressed_form, 33); - uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 140, tag_ptr(msg_ret, true), (int64_t)sender_node_id_arr); + uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 141, tag_ptr(msg_ret, true), (int64_t)sender_node_id_arr); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr); @@ -15753,7 +17076,7 @@ LDKCResult_NoneLightningErrorZ handle_custom_message_LDKCustomMessageHandler_jca } LDKCVec_C2Tuple_PublicKeyTypeZZ get_and_clear_pending_msg_LDKCustomMessageHandler_jcall(const void* this_arg) { LDKCustomMessageHandler_JCalls *j_calls = (LDKCustomMessageHandler_JCalls*) this_arg; - int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 141); + int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 142); LDKCVec_C2Tuple_PublicKeyTypeZZ ret_constr; ret_constr.datalen = ret->arr_len; if (ret_constr.datalen > 0) @@ -15774,7 +17097,7 @@ LDKCVec_C2Tuple_PublicKeyTypeZZ get_and_clear_pending_msg_LDKCustomMessageHandle } LDKNodeFeatures provided_node_features_LDKCustomMessageHandler_jcall(const void* this_arg) { LDKCustomMessageHandler_JCalls *j_calls = (LDKCustomMessageHandler_JCalls*) this_arg; - uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 142); + uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 143); LDKNodeFeatures ret_conv; ret_conv.inner = untag_ptr(ret); ret_conv.is_owned = ptr_is_owned(ret); @@ -15785,7 +17108,7 @@ LDKInitFeatures provided_init_features_LDKCustomMessageHandler_jcall(const void* LDKCustomMessageHandler_JCalls *j_calls = (LDKCustomMessageHandler_JCalls*) this_arg; int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__); memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33); - uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 143, (int64_t)their_node_id_arr); + uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 144, (int64_t)their_node_id_arr); LDKInitFeatures ret_conv; ret_conv.inner = untag_ptr(ret); ret_conv.is_owned = ptr_is_owned(ret); @@ -15895,7 +17218,7 @@ LDKCOption_OnionMessageContentsZ handle_custom_message_LDKCustomOnionMessageHand LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) this_arg; LDKOnionMessageContents* msg_ret = MALLOC(sizeof(LDKOnionMessageContents), "LDKOnionMessageContents"); *msg_ret = msg; - uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 144, tag_ptr(msg_ret, true)); + uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 145, tag_ptr(msg_ret, true)); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCOption_OnionMessageContentsZ ret_conv = *(LDKCOption_OnionMessageContentsZ*)(ret_ptr); @@ -15908,7 +17231,7 @@ LDKCResult_COption_OnionMessageContentsZDecodeErrorZ read_custom_message_LDKCust LDKu8slice buffer_var = buffer; int8_tArray buffer_arr = init_int8_tArray(buffer_var.datalen, __LINE__); memcpy(buffer_arr->elems, buffer_var.data, buffer_var.datalen); - uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 145, message_type_conv, (int64_t)buffer_arr); + uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 146, message_type_conv, (int64_t)buffer_arr); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_COption_OnionMessageContentsZDecodeErrorZ ret_conv = *(LDKCResult_COption_OnionMessageContentsZDecodeErrorZ*)(ret_ptr); @@ -15917,7 +17240,7 @@ LDKCResult_COption_OnionMessageContentsZDecodeErrorZ read_custom_message_LDKCust } LDKCVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ release_pending_custom_messages_LDKCustomOnionMessageHandler_jcall(const void* this_arg) { LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) this_arg; - int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 146); + int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 147); LDKCVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ ret_constr; ret_constr.datalen = ret->arr_len; if (ret_constr.datalen > 0) @@ -16023,21 +17346,21 @@ uintptr_t send_data_LDKSocketDescriptor_jcall(void* this_arg, LDKu8slice data, b int8_tArray data_arr = init_int8_tArray(data_var.datalen, __LINE__); memcpy(data_arr->elems, data_var.data, data_var.datalen); jboolean resume_read_conv = resume_read; - return js_invoke_function_l_lb(j_calls->instance_ptr, 147, (int64_t)data_arr, resume_read_conv); + return js_invoke_function_l_lb(j_calls->instance_ptr, 148, (int64_t)data_arr, resume_read_conv); } void disconnect_socket_LDKSocketDescriptor_jcall(void* this_arg) { LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg; - js_invoke_function_void_(j_calls->instance_ptr, 148); + js_invoke_function_void_(j_calls->instance_ptr, 149); } bool eq_LDKSocketDescriptor_jcall(const void* this_arg, const LDKSocketDescriptor * other_arg) { LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg; LDKSocketDescriptor *other_arg_clone = MALLOC(sizeof(LDKSocketDescriptor), "LDKSocketDescriptor"); *other_arg_clone = SocketDescriptor_clone(other_arg); - return js_invoke_function_b_l(j_calls->instance_ptr, 149, tag_ptr(other_arg_clone, true)); + return js_invoke_function_b_l(j_calls->instance_ptr, 150, tag_ptr(other_arg_clone, true)); } uint64_t hash_LDKSocketDescriptor_jcall(const void* this_arg) { LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg; - return js_invoke_function_l_(j_calls->instance_ptr, 150); + return js_invoke_function_l_(j_calls->instance_ptr, 151); } static void LDKSocketDescriptor_JCalls_cloned(LDKSocketDescriptor* new_obj) { LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) new_obj->this_arg; @@ -16091,6 +17414,138 @@ int64_t CS_LDK_SocketDescriptor_hash(int64_t this_arg) { return ret_conv; } +typedef struct LDKSignBolt12InvoiceFn_JCalls { + atomic_size_t refcnt; + uint32_t instance_ptr; +} LDKSignBolt12InvoiceFn_JCalls; +static void LDKSignBolt12InvoiceFn_JCalls_free(void* this_arg) { + LDKSignBolt12InvoiceFn_JCalls *j_calls = (LDKSignBolt12InvoiceFn_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + FREE(j_calls); + } +} +LDKCResult_SchnorrSignatureNoneZ sign_invoice_LDKSignBolt12InvoiceFn_jcall(const void* this_arg, const LDKUnsignedBolt12Invoice * message) { + LDKSignBolt12InvoiceFn_JCalls *j_calls = (LDKSignBolt12InvoiceFn_JCalls*) this_arg; + LDKUnsignedBolt12Invoice message_var = *message; + int64_t message_ref = 0; + message_var = UnsignedBolt12Invoice_clone(&message_var); + CHECK_INNER_FIELD_ACCESS_OR_NULL(message_var); + message_ref = tag_ptr(message_var.inner, message_var.is_owned); + uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 152, message_ref); + void* ret_ptr = untag_ptr(ret); + CHECK_ACCESS(ret_ptr); + LDKCResult_SchnorrSignatureNoneZ ret_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(ret_ptr); + FREE(untag_ptr(ret)); + return ret_conv; +} +static void LDKSignBolt12InvoiceFn_JCalls_cloned(LDKSignBolt12InvoiceFn* new_obj) { + LDKSignBolt12InvoiceFn_JCalls *j_calls = (LDKSignBolt12InvoiceFn_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +} +static inline LDKSignBolt12InvoiceFn LDKSignBolt12InvoiceFn_init (int64_t o) { + LDKSignBolt12InvoiceFn_JCalls *calls = MALLOC(sizeof(LDKSignBolt12InvoiceFn_JCalls), "LDKSignBolt12InvoiceFn_JCalls"); + atomic_init(&calls->refcnt, 1); + calls->instance_ptr = o; + + LDKSignBolt12InvoiceFn ret = { + .this_arg = (void*) calls, + .sign_invoice = sign_invoice_LDKSignBolt12InvoiceFn_jcall, + .free = LDKSignBolt12InvoiceFn_JCalls_free, + }; + return ret; +} +uint64_t CS_LDK_LDKSignBolt12InvoiceFn_new(int32_t o) { + LDKSignBolt12InvoiceFn *res_ptr = MALLOC(sizeof(LDKSignBolt12InvoiceFn), "LDKSignBolt12InvoiceFn"); + *res_ptr = LDKSignBolt12InvoiceFn_init(o); + return tag_ptr(res_ptr, true); +} +int64_t CS_LDK_SignBolt12InvoiceFn_sign_invoice(int64_t this_arg, int64_t message) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKSignBolt12InvoiceFn* this_arg_conv = (LDKSignBolt12InvoiceFn*)this_arg_ptr; + LDKUnsignedBolt12Invoice message_conv; + message_conv.inner = untag_ptr(message); + message_conv.is_owned = ptr_is_owned(message); + CHECK_INNER_FIELD_ACCESS_OR_NULL(message_conv); + message_conv.is_owned = false; + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = (this_arg_conv->sign_invoice)(this_arg_conv->this_arg, &message_conv); + return tag_ptr(ret_conv, true); +} + +typedef struct LDKSignInvoiceRequestFn_JCalls { + atomic_size_t refcnt; + uint32_t instance_ptr; +} LDKSignInvoiceRequestFn_JCalls; +static void LDKSignInvoiceRequestFn_JCalls_free(void* this_arg) { + LDKSignInvoiceRequestFn_JCalls *j_calls = (LDKSignInvoiceRequestFn_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + FREE(j_calls); + } +} +LDKCResult_SchnorrSignatureNoneZ sign_invoice_request_LDKSignInvoiceRequestFn_jcall(const void* this_arg, const LDKUnsignedInvoiceRequest * message) { + LDKSignInvoiceRequestFn_JCalls *j_calls = (LDKSignInvoiceRequestFn_JCalls*) this_arg; + LDKUnsignedInvoiceRequest message_var = *message; + int64_t message_ref = 0; + message_var = UnsignedInvoiceRequest_clone(&message_var); + CHECK_INNER_FIELD_ACCESS_OR_NULL(message_var); + message_ref = tag_ptr(message_var.inner, message_var.is_owned); + uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 153, message_ref); + void* ret_ptr = untag_ptr(ret); + CHECK_ACCESS(ret_ptr); + LDKCResult_SchnorrSignatureNoneZ ret_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(ret_ptr); + FREE(untag_ptr(ret)); + return ret_conv; +} +static void LDKSignInvoiceRequestFn_JCalls_cloned(LDKSignInvoiceRequestFn* new_obj) { + LDKSignInvoiceRequestFn_JCalls *j_calls = (LDKSignInvoiceRequestFn_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +} +static inline LDKSignInvoiceRequestFn LDKSignInvoiceRequestFn_init (int64_t o) { + LDKSignInvoiceRequestFn_JCalls *calls = MALLOC(sizeof(LDKSignInvoiceRequestFn_JCalls), "LDKSignInvoiceRequestFn_JCalls"); + atomic_init(&calls->refcnt, 1); + calls->instance_ptr = o; + + LDKSignInvoiceRequestFn ret = { + .this_arg = (void*) calls, + .sign_invoice_request = sign_invoice_request_LDKSignInvoiceRequestFn_jcall, + .free = LDKSignInvoiceRequestFn_JCalls_free, + }; + return ret; +} +uint64_t CS_LDK_LDKSignInvoiceRequestFn_new(int32_t o) { + LDKSignInvoiceRequestFn *res_ptr = MALLOC(sizeof(LDKSignInvoiceRequestFn), "LDKSignInvoiceRequestFn"); + *res_ptr = LDKSignInvoiceRequestFn_init(o); + return tag_ptr(res_ptr, true); +} +int64_t CS_LDK_SignInvoiceRequestFn_sign_invoice_request(int64_t this_arg, int64_t message) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKSignInvoiceRequestFn* this_arg_conv = (LDKSignInvoiceRequestFn*)this_arg_ptr; + LDKUnsignedInvoiceRequest message_conv; + message_conv.inner = untag_ptr(message); + message_conv.is_owned = ptr_is_owned(message); + CHECK_INNER_FIELD_ACCESS_OR_NULL(message_conv); + message_conv.is_owned = false; + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = (this_arg_conv->sign_invoice_request)(this_arg_conv->this_arg, &message_conv); + return tag_ptr(ret_conv, true); +} + +uint32_t CS_LDK_LDKSignError_ty_from_ptr(int64_t ptr) { + LDKSignError *obj = (LDKSignError*)untag_ptr(ptr); + switch(obj->tag) { + case LDKSignError_Signing: return 0; + case LDKSignError_Verification: return 1; + default: abort(); + } +} +int32_t CS_LDK_LDKSignError_Verification_get_verification(int64_t ptr) { + LDKSignError *obj = (LDKSignError*)untag_ptr(ptr); + CHECK(obj->tag == LDKSignError_Verification); + int32_t verification_conv = LDKSecp256k1Error_to_cs(obj->verification); + return verification_conv; +} uint32_t CS_LDK_LDKEffectiveCapacity_ty_from_ptr(int64_t ptr) { LDKEffectiveCapacity *obj = (LDKEffectiveCapacity*)untag_ptr(ptr); switch(obj->tag) { @@ -16219,7 +17674,7 @@ static void LDKScore_JCalls_free(void* this_arg) { } LDKCVec_u8Z write_LDKScore_jcall(const void* this_arg) { LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg; - int8_tArray ret = (int8_tArray)js_invoke_function_l_(j_calls->instance_ptr, 151); + int8_tArray ret = (int8_tArray)js_invoke_function_l_(j_calls->instance_ptr, 154); LDKCVec_u8Z ret_ref; ret_ref.datalen = ret->arr_len; ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes"); @@ -16264,6 +17719,33 @@ int8_tArray CS_LDK_Score_write(int64_t this_arg) { return ret_arr; } +uint32_t CS_LDK_LDKIntroductionNode_ty_from_ptr(int64_t ptr) { + LDKIntroductionNode *obj = (LDKIntroductionNode*)untag_ptr(ptr); + switch(obj->tag) { + case LDKIntroductionNode_NodeId: return 0; + case LDKIntroductionNode_DirectedShortChannelId: return 1; + default: abort(); + } +} +int8_tArray CS_LDK_LDKIntroductionNode_NodeId_get_node_id(int64_t ptr) { + LDKIntroductionNode *obj = (LDKIntroductionNode*)untag_ptr(ptr); + CHECK(obj->tag == LDKIntroductionNode_NodeId); + int8_tArray node_id_arr = init_int8_tArray(33, __LINE__); + memcpy(node_id_arr->elems, obj->node_id.compressed_form, 33); + return node_id_arr; +} +int32_t CS_LDK_LDKIntroductionNode_DirectedShortChannelId_get__0(int64_t ptr) { + LDKIntroductionNode *obj = (LDKIntroductionNode*)untag_ptr(ptr); + CHECK(obj->tag == LDKIntroductionNode_DirectedShortChannelId); + int32_t _0_conv = LDKDirection_to_cs(obj->directed_short_channel_id._0); + return _0_conv; +} +int64_t CS_LDK_LDKIntroductionNode_DirectedShortChannelId_get__1(int64_t ptr) { + LDKIntroductionNode *obj = (LDKIntroductionNode*)untag_ptr(ptr); + CHECK(obj->tag == LDKIntroductionNode_DirectedShortChannelId); + int64_t _1_conv = obj->directed_short_channel_id._1; + return _1_conv; +} typedef struct LDKCoinSelectionSource_JCalls { atomic_size_t refcnt; uint32_t instance_ptr; @@ -16303,7 +17785,7 @@ LDKCResult_CoinSelectionNoneZ select_confirmed_utxos_LDKCoinSelectionSource_jcal FREE(must_pay_to_var.data); int32_t target_feerate_sat_per_1000_weight_conv = target_feerate_sat_per_1000_weight; - uint64_t ret = js_invoke_function_l_llli(j_calls->instance_ptr, 152, (int64_t)claim_id_arr, (int64_t)must_spend_arr, (int64_t)must_pay_to_arr, target_feerate_sat_per_1000_weight_conv); + uint64_t ret = js_invoke_function_l_llli(j_calls->instance_ptr, 155, (int64_t)claim_id_arr, (int64_t)must_spend_arr, (int64_t)must_pay_to_arr, target_feerate_sat_per_1000_weight_conv); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_CoinSelectionNoneZ ret_conv = *(LDKCResult_CoinSelectionNoneZ*)(ret_ptr); @@ -16316,7 +17798,7 @@ LDKCResult_TransactionNoneZ sign_psbt_LDKCoinSelectionSource_jcall(const void* t int8_tArray psbt_arr = init_int8_tArray(psbt_var.datalen, __LINE__); memcpy(psbt_arr->elems, psbt_var.data, psbt_var.datalen); CVec_u8Z_free(psbt_var); - uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 153, (int64_t)psbt_arr); + uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 156, (int64_t)psbt_arr); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_TransactionNoneZ ret_conv = *(LDKCResult_TransactionNoneZ*)(ret_ptr); @@ -16415,7 +17897,7 @@ static void LDKWalletSource_JCalls_free(void* this_arg) { } LDKCResult_CVec_UtxoZNoneZ list_confirmed_utxos_LDKWalletSource_jcall(const void* this_arg) { LDKWalletSource_JCalls *j_calls = (LDKWalletSource_JCalls*) this_arg; - uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 154); + uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 157); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_CVec_UtxoZNoneZ ret_conv = *(LDKCResult_CVec_UtxoZNoneZ*)(ret_ptr); @@ -16424,7 +17906,7 @@ LDKCResult_CVec_UtxoZNoneZ list_confirmed_utxos_LDKWalletSource_jcall(const void } LDKCResult_CVec_u8ZNoneZ get_change_script_LDKWalletSource_jcall(const void* this_arg) { LDKWalletSource_JCalls *j_calls = (LDKWalletSource_JCalls*) this_arg; - uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 155); + uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 158); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_CVec_u8ZNoneZ ret_conv = *(LDKCResult_CVec_u8ZNoneZ*)(ret_ptr); @@ -16437,7 +17919,7 @@ LDKCResult_TransactionNoneZ sign_psbt_LDKWalletSource_jcall(const void* this_arg int8_tArray psbt_arr = init_int8_tArray(psbt_var.datalen, __LINE__); memcpy(psbt_arr->elems, psbt_var.data, psbt_var.datalen); CVec_u8Z_free(psbt_var); - uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 156, (int64_t)psbt_arr); + uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 159, (int64_t)psbt_arr); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_TransactionNoneZ ret_conv = *(LDKCResult_TransactionNoneZ*)(ret_ptr); @@ -16655,6 +18137,24 @@ int64_t CS_LDK_BigEndianScalar_new(int8_tArray big_endian_bytes) { return tag_ptr(ret_ref, true); } +static inline uint64_t BigEndianScalar_clone_ptr(LDKBigEndianScalar *NONNULL_PTR arg) { + LDKBigEndianScalar* ret_ref = MALLOC(sizeof(LDKBigEndianScalar), "LDKBigEndianScalar"); + *ret_ref = BigEndianScalar_clone(arg); + return tag_ptr(ret_ref, true); +} +int64_t CS_LDK_BigEndianScalar_clone_ptr(int64_t arg) { + LDKBigEndianScalar* arg_conv = (LDKBigEndianScalar*)untag_ptr(arg); + int64_t ret_conv = BigEndianScalar_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_BigEndianScalar_clone(int64_t orig) { + LDKBigEndianScalar* orig_conv = (LDKBigEndianScalar*)untag_ptr(orig); + LDKBigEndianScalar* ret_ref = MALLOC(sizeof(LDKBigEndianScalar), "LDKBigEndianScalar"); + *ret_ref = BigEndianScalar_clone(orig_conv); + return tag_ptr(ret_ref, true); +} + static inline uint64_t Bech32Error_clone_ptr(LDKBech32Error *NONNULL_PTR arg) { LDKBech32Error *ret_copy = MALLOC(sizeof(LDKBech32Error), "LDKBech32Error"); *ret_copy = Bech32Error_clone(arg); @@ -16821,6 +18321,116 @@ void CS_LDK_Str_free(jstring _res) { Str_free(dummy); } +void CS_LDK_CVec_u8Z_free(int8_tArray _res) { + LDKCVec_u8Z _res_ref; + _res_ref.datalen = _res->arr_len; + _res_ref.data = MALLOC(_res_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(_res_ref.data, _res->elems, _res_ref.datalen); FREE(_res); + CVec_u8Z_free(_res_ref); +} + +int64_t CS_LDK_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(int64_t o) { + LDKRefundMaybeWithDerivedMetadataBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&o_conv); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(int32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_cs(e); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(int64_t o) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(int64_t arg) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* arg_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(int64_t orig) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* orig_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_RefundBolt12SemanticErrorZ_ok(int64_t o) { + LDKRefund o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = Refund_clone(&o_conv); + LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_RefundBolt12SemanticErrorZ_err(int32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_cs(e); + LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_RefundBolt12SemanticErrorZ_is_ok(int64_t o) { + LDKCResult_RefundBolt12SemanticErrorZ* o_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_RefundBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_RefundBolt12SemanticErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_RefundBolt12SemanticErrorZ _res_conv = *(LDKCResult_RefundBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_RefundBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_RefundBolt12SemanticErrorZ_clone_ptr(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_RefundBolt12SemanticErrorZ_clone_ptr(int64_t arg) { + LDKCResult_RefundBolt12SemanticErrorZ* arg_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_RefundBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_RefundBolt12SemanticErrorZ_clone(int64_t orig) { + LDKCResult_RefundBolt12SemanticErrorZ* orig_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + int64_t CS_LDK_COption_u64Z_some(int64_t o) { LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z"); *ret_copy = COption_u64Z_some(o); @@ -17127,14 +18737,6 @@ int64_t CS_LDK_COption_ThirtyTwoBytesZ_clone(int64_t orig) { return ret_ref; } -void CS_LDK_CVec_u8Z_free(int8_tArray _res) { - LDKCVec_u8Z _res_ref; - _res_ref.datalen = _res->arr_len; - _res_ref.data = MALLOC(_res_ref.datalen, "LDKCVec_u8Z Bytes"); - memcpy(_res_ref.data, _res->elems, _res_ref.datalen); FREE(_res); - CVec_u8Z_free(_res_ref); -} - int64_t CS_LDK_COption_CVec_u8ZZ_some(int8_tArray o) { LDKCVec_u8Z o_ref; o_ref.datalen = o->arr_len; @@ -17343,6 +18945,156 @@ int64_t CS_LDK_CResult_RecipientOnionFieldsNoneZ_clone(int64_t orig) { return tag_ptr(ret_conv, true); } +int64_t CS_LDK_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok(int64_t o) { + LDKUnsignedBolt12Invoice o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = UnsignedBolt12Invoice_clone(&o_conv); + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err(int32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_cs(e); + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(int64_t o) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* o_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ _res_conv = *(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(int64_t arg) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* arg_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(int64_t orig) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* orig_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok(int64_t o) { + LDKBolt12Invoice o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = Bolt12Invoice_clone(&o_conv); + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_Bolt12InvoiceBolt12SemanticErrorZ_err(int32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_cs(e); + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(int64_t o) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* o_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_Bolt12InvoiceBolt12SemanticErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ _res_conv = *(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_Bolt12InvoiceBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(int64_t arg) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* arg_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(int64_t orig) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* orig_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_SchnorrSignatureNoneZ_ok(int8_tArray o) { + LDKSchnorrSignature o_ref; + CHECK(o->arr_len == 64); + memcpy(o_ref.compact_form, o->elems, 64); FREE(o); + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = CResult_SchnorrSignatureNoneZ_ok(o_ref); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_SchnorrSignatureNoneZ_err() { + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = CResult_SchnorrSignatureNoneZ_err(); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_SchnorrSignatureNoneZ_is_ok(int64_t o) { + LDKCResult_SchnorrSignatureNoneZ* o_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(o); + jboolean ret_conv = CResult_SchnorrSignatureNoneZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_SchnorrSignatureNoneZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_SchnorrSignatureNoneZ _res_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_SchnorrSignatureNoneZ_free(_res_conv); +} + +static inline uint64_t CResult_SchnorrSignatureNoneZ_clone_ptr(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR arg) { + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = CResult_SchnorrSignatureNoneZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_SchnorrSignatureNoneZ_clone_ptr(int64_t arg) { + LDKCResult_SchnorrSignatureNoneZ* arg_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(arg); + int64_t ret_conv = CResult_SchnorrSignatureNoneZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_SchnorrSignatureNoneZ_clone(int64_t orig) { + LDKCResult_SchnorrSignatureNoneZ* orig_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(orig); + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = CResult_SchnorrSignatureNoneZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + void CS_LDK_CVec_ThirtyTwoBytesZ_free(ptrArray _res) { LDKCVec_ThirtyTwoBytesZ _res_constr; _res_constr.datalen = _res->arr_len; @@ -17420,6 +19172,100 @@ int64_t CS_LDK_COption_CVec_ThirtyTwoBytesZZ_clone(int64_t orig) { return ret_ref; } +int64_t CS_LDK_COption_AmountZ_some(int64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKAmount o_conv = *(LDKAmount*)(o_ptr); + o_conv = Amount_clone((LDKAmount*)untag_ptr(o)); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = COption_AmountZ_some(o_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_COption_AmountZ_none() { + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = COption_AmountZ_none(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void CS_LDK_COption_AmountZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCOption_AmountZ _res_conv = *(LDKCOption_AmountZ*)(_res_ptr); + FREE(untag_ptr(_res)); + COption_AmountZ_free(_res_conv); +} + +static inline uint64_t COption_AmountZ_clone_ptr(LDKCOption_AmountZ *NONNULL_PTR arg) { + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = COption_AmountZ_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t CS_LDK_COption_AmountZ_clone_ptr(int64_t arg) { + LDKCOption_AmountZ* arg_conv = (LDKCOption_AmountZ*)untag_ptr(arg); + int64_t ret_conv = COption_AmountZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_COption_AmountZ_clone(int64_t orig) { + LDKCOption_AmountZ* orig_conv = (LDKCOption_AmountZ*)untag_ptr(orig); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = COption_AmountZ_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_COption_QuantityZ_some(int64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKQuantity o_conv = *(LDKQuantity*)(o_ptr); + o_conv = Quantity_clone((LDKQuantity*)untag_ptr(o)); + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = COption_QuantityZ_some(o_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_COption_QuantityZ_none() { + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = COption_QuantityZ_none(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void CS_LDK_COption_QuantityZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCOption_QuantityZ _res_conv = *(LDKCOption_QuantityZ*)(_res_ptr); + FREE(untag_ptr(_res)); + COption_QuantityZ_free(_res_conv); +} + +static inline uint64_t COption_QuantityZ_clone_ptr(LDKCOption_QuantityZ *NONNULL_PTR arg) { + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = COption_QuantityZ_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t CS_LDK_COption_QuantityZ_clone_ptr(int64_t arg) { + LDKCOption_QuantityZ* arg_conv = (LDKCOption_QuantityZ*)untag_ptr(arg); + int64_t ret_conv = COption_QuantityZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_COption_QuantityZ_clone(int64_t orig) { + LDKCOption_QuantityZ* orig_conv = (LDKCOption_QuantityZ*)untag_ptr(orig); + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = COption_QuantityZ_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + int64_t CS_LDK_CResult_ThirtyTwoBytesNoneZ_ok(int8_tArray o) { LDKThirtyTwoBytes o_ref; CHECK(o->arr_len == 32); @@ -18057,7 +19903,7 @@ int64_t CS_LDK_COption_BigEndianScalarZ_some(int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); LDKBigEndianScalar o_conv = *(LDKBigEndianScalar*)(o_ptr); - // WARNING: we may need a move here but no clone is available for LDKBigEndianScalar + o_conv = BigEndianScalar_clone((LDKBigEndianScalar*)untag_ptr(o)); LDKCOption_BigEndianScalarZ *ret_copy = MALLOC(sizeof(LDKCOption_BigEndianScalarZ), "LDKCOption_BigEndianScalarZ"); *ret_copy = COption_BigEndianScalarZ_some(o_conv); int64_t ret_ref = tag_ptr(ret_copy, true); @@ -18165,54 +20011,6 @@ int64_t CS_LDK_CResult_RecoverableSignatureNoneZ_clone(int64_t orig) { return tag_ptr(ret_conv, true); } -int64_t CS_LDK_CResult_SchnorrSignatureNoneZ_ok(int8_tArray o) { - LDKSchnorrSignature o_ref; - CHECK(o->arr_len == 64); - memcpy(o_ref.compact_form, o->elems, 64); FREE(o); - LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); - *ret_conv = CResult_SchnorrSignatureNoneZ_ok(o_ref); - return tag_ptr(ret_conv, true); -} - -int64_t CS_LDK_CResult_SchnorrSignatureNoneZ_err() { - LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); - *ret_conv = CResult_SchnorrSignatureNoneZ_err(); - return tag_ptr(ret_conv, true); -} - -jboolean CS_LDK_CResult_SchnorrSignatureNoneZ_is_ok(int64_t o) { - LDKCResult_SchnorrSignatureNoneZ* o_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(o); - jboolean ret_conv = CResult_SchnorrSignatureNoneZ_is_ok(o_conv); - return ret_conv; -} - -void CS_LDK_CResult_SchnorrSignatureNoneZ_free(int64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKCResult_SchnorrSignatureNoneZ _res_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(_res_ptr); - FREE(untag_ptr(_res)); - CResult_SchnorrSignatureNoneZ_free(_res_conv); -} - -static inline uint64_t CResult_SchnorrSignatureNoneZ_clone_ptr(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR arg) { - LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); - *ret_conv = CResult_SchnorrSignatureNoneZ_clone(arg); - return tag_ptr(ret_conv, true); -} -int64_t CS_LDK_CResult_SchnorrSignatureNoneZ_clone_ptr(int64_t arg) { - LDKCResult_SchnorrSignatureNoneZ* arg_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(arg); - int64_t ret_conv = CResult_SchnorrSignatureNoneZ_clone_ptr(arg_conv); - return ret_conv; -} - -int64_t CS_LDK_CResult_SchnorrSignatureNoneZ_clone(int64_t orig) { - LDKCResult_SchnorrSignatureNoneZ* orig_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(orig); - LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); - *ret_conv = CResult_SchnorrSignatureNoneZ_clone(orig_conv); - return tag_ptr(ret_conv, true); -} - int64_t CS_LDK_CResult_ECDSASignatureNoneZ_ok(int8_tArray o) { LDKECDSASignature o_ref; CHECK(o->arr_len == 64); @@ -18261,6 +20059,56 @@ int64_t CS_LDK_CResult_ECDSASignatureNoneZ_clone(int64_t orig) { return tag_ptr(ret_conv, true); } +int64_t CS_LDK_CResult_TransactionNoneZ_ok(int8_tArray o) { + LDKTransaction o_ref; + o_ref.datalen = o->arr_len; + o_ref.data = MALLOC(o_ref.datalen, "LDKTransaction Bytes"); + memcpy(o_ref.data, o->elems, o_ref.datalen); FREE(o); + o_ref.data_is_owned = true; + LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); + *ret_conv = CResult_TransactionNoneZ_ok(o_ref); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_TransactionNoneZ_err() { + LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); + *ret_conv = CResult_TransactionNoneZ_err(); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_TransactionNoneZ_is_ok(int64_t o) { + LDKCResult_TransactionNoneZ* o_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(o); + jboolean ret_conv = CResult_TransactionNoneZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_TransactionNoneZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_TransactionNoneZ _res_conv = *(LDKCResult_TransactionNoneZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_TransactionNoneZ_free(_res_conv); +} + +static inline uint64_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg) { + LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); + *ret_conv = CResult_TransactionNoneZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_TransactionNoneZ_clone_ptr(int64_t arg) { + LDKCResult_TransactionNoneZ* arg_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(arg); + int64_t ret_conv = CResult_TransactionNoneZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_TransactionNoneZ_clone(int64_t orig) { + LDKCResult_TransactionNoneZ* orig_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(orig); + LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); + *ret_conv = CResult_TransactionNoneZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + int64_t CS_LDK_CResult_WriteableEcdsaChannelSignerDecodeErrorZ_ok(int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -18725,56 +20573,6 @@ int64_t CS_LDK_CResult_InMemorySignerDecodeErrorZ_clone(int64_t orig) { return tag_ptr(ret_conv, true); } -int64_t CS_LDK_CResult_TransactionNoneZ_ok(int8_tArray o) { - LDKTransaction o_ref; - o_ref.datalen = o->arr_len; - o_ref.data = MALLOC(o_ref.datalen, "LDKTransaction Bytes"); - memcpy(o_ref.data, o->elems, o_ref.datalen); FREE(o); - o_ref.data_is_owned = true; - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = CResult_TransactionNoneZ_ok(o_ref); - return tag_ptr(ret_conv, true); -} - -int64_t CS_LDK_CResult_TransactionNoneZ_err() { - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = CResult_TransactionNoneZ_err(); - return tag_ptr(ret_conv, true); -} - -jboolean CS_LDK_CResult_TransactionNoneZ_is_ok(int64_t o) { - LDKCResult_TransactionNoneZ* o_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(o); - jboolean ret_conv = CResult_TransactionNoneZ_is_ok(o_conv); - return ret_conv; -} - -void CS_LDK_CResult_TransactionNoneZ_free(int64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKCResult_TransactionNoneZ _res_conv = *(LDKCResult_TransactionNoneZ*)(_res_ptr); - FREE(untag_ptr(_res)); - CResult_TransactionNoneZ_free(_res_conv); -} - -static inline uint64_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg) { - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = CResult_TransactionNoneZ_clone(arg); - return tag_ptr(ret_conv, true); -} -int64_t CS_LDK_CResult_TransactionNoneZ_clone_ptr(int64_t arg) { - LDKCResult_TransactionNoneZ* arg_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(arg); - int64_t ret_conv = CResult_TransactionNoneZ_clone_ptr(arg_conv); - return ret_conv; -} - -int64_t CS_LDK_CResult_TransactionNoneZ_clone(int64_t orig) { - LDKCResult_TransactionNoneZ* orig_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(orig); - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = CResult_TransactionNoneZ_clone(orig_conv); - return tag_ptr(ret_conv, true); -} - int64_t CS_LDK_COption_WriteableScoreZ_some(int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -20032,6 +21830,60 @@ void CS_LDK_CResult_ProbabilisticScorerDecodeErrorZ_free(int64_t _res) { CResult_ProbabilisticScorerDecodeErrorZ_free(_res_conv); } +int64_t CS_LDK_CResult_BestBlockDecodeErrorZ_ok(int64_t o) { + LDKBestBlock o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = BestBlock_clone(&o_conv); + LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ"); + *ret_conv = CResult_BestBlockDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_BestBlockDecodeErrorZ_err(int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ"); + *ret_conv = CResult_BestBlockDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_BestBlockDecodeErrorZ_is_ok(int64_t o) { + LDKCResult_BestBlockDecodeErrorZ* o_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_BestBlockDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_BestBlockDecodeErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_BestBlockDecodeErrorZ _res_conv = *(LDKCResult_BestBlockDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_BestBlockDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_BestBlockDecodeErrorZ_clone_ptr(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ"); + *ret_conv = CResult_BestBlockDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_BestBlockDecodeErrorZ_clone_ptr(int64_t arg) { + LDKCResult_BestBlockDecodeErrorZ* arg_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_BestBlockDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_BestBlockDecodeErrorZ_clone(int64_t orig) { + LDKCResult_BestBlockDecodeErrorZ* orig_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(orig); + LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ"); + *ret_conv = CResult_BestBlockDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + static inline uint64_t C2Tuple_usizeTransactionZ_clone_ptr(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR arg) { LDKC2Tuple_usizeTransactionZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ"); *ret_conv = C2Tuple_usizeTransactionZ_clone(arg); @@ -20216,81 +22068,86 @@ void CS_LDK_CVec_MonitorEventZ_free(int64_tArray _res) { CVec_MonitorEventZ_free(_res_constr); } -static inline uint64_t C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR arg) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ"); - *ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(arg); +static inline uint64_t C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR arg) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ"); + *ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(arg); return tag_ptr(ret_conv, true); } -int64_t CS_LDK_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(int64_t arg) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* arg_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(arg); - int64_t ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(arg_conv); +int64_t CS_LDK_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(int64_t arg) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* arg_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(arg); + int64_t ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(arg_conv); return ret_conv; } -int64_t CS_LDK_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(int64_t orig) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* orig_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(orig); - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ"); - *ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(orig_conv); +int64_t CS_LDK_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(int64_t orig) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* orig_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(orig); + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ"); + *ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(orig_conv); return tag_ptr(ret_conv, true); } -int64_t CS_LDK_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(int64_t a, int64_tArray b, int8_tArray c) { +int64_t CS_LDK_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new(int64_t a, int64_t b, int64_tArray c, int8_tArray d) { LDKOutPoint a_conv; a_conv.inner = untag_ptr(a); a_conv.is_owned = ptr_is_owned(a); CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); a_conv = OutPoint_clone(&a_conv); - LDKCVec_MonitorEventZ b_constr; - b_constr.datalen = b->arr_len; - if (b_constr.datalen > 0) - b_constr.data = MALLOC(b_constr.datalen * sizeof(LDKMonitorEvent), "LDKCVec_MonitorEventZ Elements"); + LDKChannelId b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv = ChannelId_clone(&b_conv); + LDKCVec_MonitorEventZ c_constr; + c_constr.datalen = c->arr_len; + if (c_constr.datalen > 0) + c_constr.data = MALLOC(c_constr.datalen * sizeof(LDKMonitorEvent), "LDKCVec_MonitorEventZ Elements"); else - b_constr.data = NULL; - int64_t* b_vals = b->elems; - for (size_t o = 0; o < b_constr.datalen; o++) { - int64_t b_conv_14 = b_vals[o]; - void* b_conv_14_ptr = untag_ptr(b_conv_14); - CHECK_ACCESS(b_conv_14_ptr); - LDKMonitorEvent b_conv_14_conv = *(LDKMonitorEvent*)(b_conv_14_ptr); - b_conv_14_conv = MonitorEvent_clone((LDKMonitorEvent*)untag_ptr(b_conv_14)); - b_constr.data[o] = b_conv_14_conv; - } - FREE(b); - LDKPublicKey c_ref; - CHECK(c->arr_len == 33); - memcpy(c_ref.compressed_form, c->elems, 33); FREE(c); - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ"); - *ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(a_conv, b_constr, c_ref); - return tag_ptr(ret_conv, true); -} - -void CS_LDK_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(int64_t _res) { + c_constr.data = NULL; + int64_t* c_vals = c->elems; + for (size_t o = 0; o < c_constr.datalen; o++) { + int64_t c_conv_14 = c_vals[o]; + void* c_conv_14_ptr = untag_ptr(c_conv_14); + CHECK_ACCESS(c_conv_14_ptr); + LDKMonitorEvent c_conv_14_conv = *(LDKMonitorEvent*)(c_conv_14_ptr); + c_conv_14_conv = MonitorEvent_clone((LDKMonitorEvent*)untag_ptr(c_conv_14)); + c_constr.data[o] = c_conv_14_conv; + } + FREE(c); + LDKPublicKey d_ref; + CHECK(d->arr_len == 33); + memcpy(d_ref.compressed_form, d->elems, 33); FREE(d); + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ"); + *ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new(a_conv, b_conv, c_constr, d_ref); + return tag_ptr(ret_conv, true); +} + +void CS_LDK_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free(int64_t _res) { if (!ptr_is_owned(_res)) return; void* _res_ptr = untag_ptr(_res); CHECK_ACCESS(_res_ptr); - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ _res_conv = *(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)(_res_ptr); + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ _res_conv = *(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)(_res_ptr); FREE(untag_ptr(_res)); - C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(_res_conv); + C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free(_res_conv); } -void CS_LDK_CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free(int64_tArray _res) { - LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ _res_constr; +void CS_LDK_CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free(int64_tArray _res) { + LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ _res_constr; _res_constr.datalen = _res->arr_len; if (_res_constr.datalen > 0) - _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ Elements"); + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ Elements"); else _res_constr.data = NULL; int64_t* _res_vals = _res->elems; - for (size_t x = 0; x < _res_constr.datalen; x++) { - int64_t _res_conv_49 = _res_vals[x]; - void* _res_conv_49_ptr = untag_ptr(_res_conv_49); - CHECK_ACCESS(_res_conv_49_ptr); - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ _res_conv_49_conv = *(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)(_res_conv_49_ptr); - FREE(untag_ptr(_res_conv_49)); - _res_constr.data[x] = _res_conv_49_conv; + for (size_t f = 0; f < _res_constr.datalen; f++) { + int64_t _res_conv_57 = _res_vals[f]; + void* _res_conv_57_ptr = untag_ptr(_res_conv_57); + CHECK_ACCESS(_res_conv_57_ptr); + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ _res_conv_57_conv = *(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)(_res_conv_57_ptr); + FREE(untag_ptr(_res_conv_57)); + _res_constr.data[f] = _res_conv_57_conv; } FREE(_res); - CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free(_res_constr); + CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free(_res_constr); } int64_t CS_LDK_CResult_InitFeaturesDecodeErrorZ_ok(int64_t o) { @@ -20671,6 +22528,225 @@ int64_t CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_clone(int64_t orig) { return tag_ptr(ret_conv, true); } +int64_t CS_LDK_CResult_OfferIdDecodeErrorZ_ok(int64_t o) { + LDKOfferId o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = OfferId_clone(&o_conv); + LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ"); + *ret_conv = CResult_OfferIdDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_OfferIdDecodeErrorZ_err(int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ"); + *ret_conv = CResult_OfferIdDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_OfferIdDecodeErrorZ_is_ok(int64_t o) { + LDKCResult_OfferIdDecodeErrorZ* o_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_OfferIdDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_OfferIdDecodeErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_OfferIdDecodeErrorZ _res_conv = *(LDKCResult_OfferIdDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_OfferIdDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_OfferIdDecodeErrorZ_clone_ptr(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ"); + *ret_conv = CResult_OfferIdDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_OfferIdDecodeErrorZ_clone_ptr(int64_t arg) { + LDKCResult_OfferIdDecodeErrorZ* arg_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_OfferIdDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_OfferIdDecodeErrorZ_clone(int64_t orig) { + LDKCResult_OfferIdDecodeErrorZ* orig_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(orig); + LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ"); + *ret_conv = CResult_OfferIdDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_NoneBolt12SemanticErrorZ_ok() { + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = CResult_NoneBolt12SemanticErrorZ_ok(); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_NoneBolt12SemanticErrorZ_err(int32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_cs(e); + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = CResult_NoneBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_NoneBolt12SemanticErrorZ_is_ok(int64_t o) { + LDKCResult_NoneBolt12SemanticErrorZ* o_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_NoneBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_NoneBolt12SemanticErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_NoneBolt12SemanticErrorZ _res_conv = *(LDKCResult_NoneBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_NoneBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_NoneBolt12SemanticErrorZ_clone_ptr(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_NoneBolt12SemanticErrorZ_clone_ptr(int64_t arg) { + LDKCResult_NoneBolt12SemanticErrorZ* arg_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_NoneBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_NoneBolt12SemanticErrorZ_clone(int64_t orig) { + LDKCResult_NoneBolt12SemanticErrorZ* orig_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_OfferBolt12SemanticErrorZ_ok(int64_t o) { + LDKOffer o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = Offer_clone(&o_conv); + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_OfferBolt12SemanticErrorZ_err(int32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_cs(e); + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_OfferBolt12SemanticErrorZ_is_ok(int64_t o) { + LDKCResult_OfferBolt12SemanticErrorZ* o_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_OfferBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_OfferBolt12SemanticErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_OfferBolt12SemanticErrorZ _res_conv = *(LDKCResult_OfferBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_OfferBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_OfferBolt12SemanticErrorZ_clone_ptr(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_OfferBolt12SemanticErrorZ_clone_ptr(int64_t arg) { + LDKCResult_OfferBolt12SemanticErrorZ* arg_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_OfferBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_OfferBolt12SemanticErrorZ_clone(int64_t orig) { + LDKCResult_OfferBolt12SemanticErrorZ* orig_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(int64_t o) { + LDKInvoiceRequestWithDerivedPayerIdBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(int32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_cs(e); + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(int64_t o) { + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(_res_conv); +} + +int64_t CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok(int64_t o) { + LDKInvoiceRequestWithExplicitPayerIdBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(int32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_cs(e); + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(int64_t o) { + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(_res_conv); +} + int64_t CS_LDK_CResult_OfferBolt12ParseErrorZ_ok(int64_t o) { LDKOffer o_conv; o_conv.inner = untag_ptr(o); @@ -20726,55 +22802,6 @@ int64_t CS_LDK_CResult_OfferBolt12ParseErrorZ_clone(int64_t orig) { return tag_ptr(ret_conv, true); } -int64_t CS_LDK_CResult_PublicKeySecp256k1ErrorZ_ok(int8_tArray o) { - LDKPublicKey o_ref; - CHECK(o->arr_len == 33); - memcpy(o_ref.compressed_form, o->elems, 33); FREE(o); - LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); - *ret_conv = CResult_PublicKeySecp256k1ErrorZ_ok(o_ref); - return tag_ptr(ret_conv, true); -} - -int64_t CS_LDK_CResult_PublicKeySecp256k1ErrorZ_err(int32_t e) { - LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_cs(e); - LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); - *ret_conv = CResult_PublicKeySecp256k1ErrorZ_err(e_conv); - return tag_ptr(ret_conv, true); -} - -jboolean CS_LDK_CResult_PublicKeySecp256k1ErrorZ_is_ok(int64_t o) { - LDKCResult_PublicKeySecp256k1ErrorZ* o_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(o); - jboolean ret_conv = CResult_PublicKeySecp256k1ErrorZ_is_ok(o_conv); - return ret_conv; -} - -void CS_LDK_CResult_PublicKeySecp256k1ErrorZ_free(int64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKCResult_PublicKeySecp256k1ErrorZ _res_conv = *(LDKCResult_PublicKeySecp256k1ErrorZ*)(_res_ptr); - FREE(untag_ptr(_res)); - CResult_PublicKeySecp256k1ErrorZ_free(_res_conv); -} - -static inline uint64_t CResult_PublicKeySecp256k1ErrorZ_clone_ptr(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR arg) { - LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); - *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(arg); - return tag_ptr(ret_conv, true); -} -int64_t CS_LDK_CResult_PublicKeySecp256k1ErrorZ_clone_ptr(int64_t arg) { - LDKCResult_PublicKeySecp256k1ErrorZ* arg_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(arg); - int64_t ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone_ptr(arg_conv); - return ret_conv; -} - -int64_t CS_LDK_CResult_PublicKeySecp256k1ErrorZ_clone(int64_t orig) { - LDKCResult_PublicKeySecp256k1ErrorZ* orig_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(orig); - LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); - *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(orig_conv); - return tag_ptr(ret_conv, true); -} - int64_t CS_LDK_CResult_NodeIdDecodeErrorZ_ok(int64_t o) { LDKNodeId o_conv; o_conv.inner = untag_ptr(o); @@ -20829,6 +22856,55 @@ int64_t CS_LDK_CResult_NodeIdDecodeErrorZ_clone(int64_t orig) { return tag_ptr(ret_conv, true); } +int64_t CS_LDK_CResult_PublicKeySecp256k1ErrorZ_ok(int8_tArray o) { + LDKPublicKey o_ref; + CHECK(o->arr_len == 33); + memcpy(o_ref.compressed_form, o->elems, 33); FREE(o); + LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); + *ret_conv = CResult_PublicKeySecp256k1ErrorZ_ok(o_ref); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_PublicKeySecp256k1ErrorZ_err(int32_t e) { + LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_cs(e); + LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); + *ret_conv = CResult_PublicKeySecp256k1ErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_PublicKeySecp256k1ErrorZ_is_ok(int64_t o) { + LDKCResult_PublicKeySecp256k1ErrorZ* o_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_PublicKeySecp256k1ErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_PublicKeySecp256k1ErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_PublicKeySecp256k1ErrorZ _res_conv = *(LDKCResult_PublicKeySecp256k1ErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_PublicKeySecp256k1ErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_PublicKeySecp256k1ErrorZ_clone_ptr(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR arg) { + LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); + *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_PublicKeySecp256k1ErrorZ_clone_ptr(int64_t arg) { + LDKCResult_PublicKeySecp256k1ErrorZ* arg_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_PublicKeySecp256k1ErrorZ_clone(int64_t orig) { + LDKCResult_PublicKeySecp256k1ErrorZ* orig_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(orig); + LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); + *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + int64_t CS_LDK_COption_NetworkUpdateZ_some(int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -21614,6 +23690,34 @@ int64_t CS_LDK_COption_CVec_SocketAddressZZ_clone(int64_t orig) { return ret_ref; } +int64_t CS_LDK_CResult_u64ShortChannelIdErrorZ_ok(int64_t o) { + LDKCResult_u64ShortChannelIdErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u64ShortChannelIdErrorZ), "LDKCResult_u64ShortChannelIdErrorZ"); + *ret_conv = CResult_u64ShortChannelIdErrorZ_ok(o); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_u64ShortChannelIdErrorZ_err(int32_t e) { + LDKShortChannelIdError e_conv = LDKShortChannelIdError_from_cs(e); + LDKCResult_u64ShortChannelIdErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u64ShortChannelIdErrorZ), "LDKCResult_u64ShortChannelIdErrorZ"); + *ret_conv = CResult_u64ShortChannelIdErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_u64ShortChannelIdErrorZ_is_ok(int64_t o) { + LDKCResult_u64ShortChannelIdErrorZ* o_conv = (LDKCResult_u64ShortChannelIdErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_u64ShortChannelIdErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_u64ShortChannelIdErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_u64ShortChannelIdErrorZ _res_conv = *(LDKCResult_u64ShortChannelIdErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_u64ShortChannelIdErrorZ_free(_res_conv); +} + int64_t CS_LDK_CResult_PendingHTLCInfoInboundHTLCErrZ_ok(int64_t o) { LDKPendingHTLCInfo o_conv; o_conv.inner = untag_ptr(o); @@ -21630,8 +23734,7 @@ int64_t CS_LDK_CResult_PendingHTLCInfoInboundHTLCErrZ_err(int64_t e) { e_conv.inner = untag_ptr(e); e_conv.is_owned = ptr_is_owned(e); CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv); - // WARNING: we need a move here but no clone is available for LDKInboundHTLCErr - + e_conv = InboundHTLCErr_clone(&e_conv); LDKCResult_PendingHTLCInfoInboundHTLCErrZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoInboundHTLCErrZ), "LDKCResult_PendingHTLCInfoInboundHTLCErrZ"); *ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_err(e_conv); return tag_ptr(ret_conv, true); @@ -21652,6 +23755,24 @@ void CS_LDK_CResult_PendingHTLCInfoInboundHTLCErrZ_free(int64_t _res) { CResult_PendingHTLCInfoInboundHTLCErrZ_free(_res_conv); } +static inline uint64_t CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR arg) { + LDKCResult_PendingHTLCInfoInboundHTLCErrZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoInboundHTLCErrZ), "LDKCResult_PendingHTLCInfoInboundHTLCErrZ"); + *ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(int64_t arg) { + LDKCResult_PendingHTLCInfoInboundHTLCErrZ* arg_conv = (LDKCResult_PendingHTLCInfoInboundHTLCErrZ*)untag_ptr(arg); + int64_t ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_PendingHTLCInfoInboundHTLCErrZ_clone(int64_t orig) { + LDKCResult_PendingHTLCInfoInboundHTLCErrZ* orig_conv = (LDKCResult_PendingHTLCInfoInboundHTLCErrZ*)untag_ptr(orig); + LDKCResult_PendingHTLCInfoInboundHTLCErrZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoInboundHTLCErrZ), "LDKCResult_PendingHTLCInfoInboundHTLCErrZ"); + *ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + void CS_LDK_CVec_HTLCOutputInCommitmentZ_free(int64_tArray _res) { LDKCVec_HTLCOutputInCommitmentZ _res_constr; _res_constr.datalen = _res->arr_len; @@ -21891,6 +24012,53 @@ int64_t CS_LDK_CResult_CVec_UtxoZNoneZ_clone(int64_t orig) { return tag_ptr(ret_conv, true); } +int64_t CS_LDK_COption_PaymentContextZ_some(int64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKPaymentContext o_conv = *(LDKPaymentContext*)(o_ptr); + o_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(o)); + LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ"); + *ret_copy = COption_PaymentContextZ_some(o_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_COption_PaymentContextZ_none() { + LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ"); + *ret_copy = COption_PaymentContextZ_none(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void CS_LDK_COption_PaymentContextZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCOption_PaymentContextZ _res_conv = *(LDKCOption_PaymentContextZ*)(_res_ptr); + FREE(untag_ptr(_res)); + COption_PaymentContextZ_free(_res_conv); +} + +static inline uint64_t COption_PaymentContextZ_clone_ptr(LDKCOption_PaymentContextZ *NONNULL_PTR arg) { + LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ"); + *ret_copy = COption_PaymentContextZ_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t CS_LDK_COption_PaymentContextZ_clone_ptr(int64_t arg) { + LDKCOption_PaymentContextZ* arg_conv = (LDKCOption_PaymentContextZ*)untag_ptr(arg); + int64_t ret_conv = COption_PaymentContextZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_COption_PaymentContextZ_clone(int64_t orig) { + LDKCOption_PaymentContextZ* orig_conv = (LDKCOption_PaymentContextZ*)untag_ptr(orig); + LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ"); + *ret_copy = COption_PaymentContextZ_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + static inline uint64_t C2Tuple_u64u16Z_clone_ptr(LDKC2Tuple_u64u16Z *NONNULL_PTR arg) { LDKC2Tuple_u64u16Z* ret_conv = MALLOC(sizeof(LDKC2Tuple_u64u16Z), "LDKC2Tuple_u64u16Z"); *ret_conv = C2Tuple_u64u16Z_clone(arg); @@ -22015,55 +24183,57 @@ int64_t CS_LDK_COption_ChannelShutdownStateZ_clone(int64_t orig) { return ret_ref; } -int64_t CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_ok(int8_tArray o) { - LDKThirtyTwoBytes o_ref; - CHECK(o->arr_len == 32); - memcpy(o_ref.data, o->elems, 32); FREE(o); - LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); - *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_ok(o_ref); +int64_t CS_LDK_CResult_ChannelIdAPIErrorZ_ok(int64_t o) { + LDKChannelId o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = ChannelId_clone(&o_conv); + LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ"); + *ret_conv = CResult_ChannelIdAPIErrorZ_ok(o_conv); return tag_ptr(ret_conv, true); } -int64_t CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_err(int64_t e) { +int64_t CS_LDK_CResult_ChannelIdAPIErrorZ_err(int64_t e) { void* e_ptr = untag_ptr(e); CHECK_ACCESS(e_ptr); LDKAPIError e_conv = *(LDKAPIError*)(e_ptr); e_conv = APIError_clone((LDKAPIError*)untag_ptr(e)); - LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); - *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_err(e_conv); + LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ"); + *ret_conv = CResult_ChannelIdAPIErrorZ_err(e_conv); return tag_ptr(ret_conv, true); } -jboolean CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_is_ok(int64_t o) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* o_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(o); - jboolean ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_is_ok(o_conv); +jboolean CS_LDK_CResult_ChannelIdAPIErrorZ_is_ok(int64_t o) { + LDKCResult_ChannelIdAPIErrorZ* o_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_ChannelIdAPIErrorZ_is_ok(o_conv); return ret_conv; } -void CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_free(int64_t _res) { +void CS_LDK_CResult_ChannelIdAPIErrorZ_free(int64_t _res) { if (!ptr_is_owned(_res)) return; void* _res_ptr = untag_ptr(_res); CHECK_ACCESS(_res_ptr); - LDKCResult_ThirtyTwoBytesAPIErrorZ _res_conv = *(LDKCResult_ThirtyTwoBytesAPIErrorZ*)(_res_ptr); + LDKCResult_ChannelIdAPIErrorZ _res_conv = *(LDKCResult_ChannelIdAPIErrorZ*)(_res_ptr); FREE(untag_ptr(_res)); - CResult_ThirtyTwoBytesAPIErrorZ_free(_res_conv); + CResult_ChannelIdAPIErrorZ_free(_res_conv); } -static inline uint64_t CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR arg) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); - *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(arg); +static inline uint64_t CResult_ChannelIdAPIErrorZ_clone_ptr(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR arg) { + LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ"); + *ret_conv = CResult_ChannelIdAPIErrorZ_clone(arg); return tag_ptr(ret_conv, true); } -int64_t CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(int64_t arg) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* arg_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(arg); - int64_t ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(arg_conv); +int64_t CS_LDK_CResult_ChannelIdAPIErrorZ_clone_ptr(int64_t arg) { + LDKCResult_ChannelIdAPIErrorZ* arg_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_ChannelIdAPIErrorZ_clone_ptr(arg_conv); return ret_conv; } -int64_t CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_clone(int64_t orig) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* orig_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(orig); - LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); - *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(orig_conv); +int64_t CS_LDK_CResult_ChannelIdAPIErrorZ_clone(int64_t orig) { + LDKCResult_ChannelIdAPIErrorZ* orig_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(orig); + LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ"); + *ret_conv = CResult_ChannelIdAPIErrorZ_clone(orig_conv); return tag_ptr(ret_conv, true); } @@ -22460,63 +24630,136 @@ int64_t CS_LDK_CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFail return tag_ptr(ret_conv, true); } -static inline uint64_t C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR arg) { - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKC2Tuple_ThirtyTwoBytesPublicKeyZ"); - *ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(arg); +static inline uint64_t C2Tuple_ChannelIdPublicKeyZ_clone_ptr(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR arg) { + LDKC2Tuple_ChannelIdPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKC2Tuple_ChannelIdPublicKeyZ"); + *ret_conv = C2Tuple_ChannelIdPublicKeyZ_clone(arg); return tag_ptr(ret_conv, true); } -int64_t CS_LDK_C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(int64_t arg) { - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* arg_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(arg); - int64_t ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(arg_conv); +int64_t CS_LDK_C2Tuple_ChannelIdPublicKeyZ_clone_ptr(int64_t arg) { + LDKC2Tuple_ChannelIdPublicKeyZ* arg_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(arg); + int64_t ret_conv = C2Tuple_ChannelIdPublicKeyZ_clone_ptr(arg_conv); return ret_conv; } -int64_t CS_LDK_C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(int64_t orig) { - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* orig_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(orig); - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKC2Tuple_ThirtyTwoBytesPublicKeyZ"); - *ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(orig_conv); +int64_t CS_LDK_C2Tuple_ChannelIdPublicKeyZ_clone(int64_t orig) { + LDKC2Tuple_ChannelIdPublicKeyZ* orig_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(orig); + LDKC2Tuple_ChannelIdPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKC2Tuple_ChannelIdPublicKeyZ"); + *ret_conv = C2Tuple_ChannelIdPublicKeyZ_clone(orig_conv); return tag_ptr(ret_conv, true); } -int64_t CS_LDK_C2Tuple_ThirtyTwoBytesPublicKeyZ_new(int8_tArray a, int8_tArray b) { - LDKThirtyTwoBytes a_ref; - CHECK(a->arr_len == 32); - memcpy(a_ref.data, a->elems, 32); FREE(a); +int64_t CS_LDK_C2Tuple_ChannelIdPublicKeyZ_new(int64_t a, int8_tArray b) { + LDKChannelId a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = ChannelId_clone(&a_conv); LDKPublicKey b_ref; CHECK(b->arr_len == 33); memcpy(b_ref.compressed_form, b->elems, 33); FREE(b); - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKC2Tuple_ThirtyTwoBytesPublicKeyZ"); - *ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_new(a_ref, b_ref); + LDKC2Tuple_ChannelIdPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKC2Tuple_ChannelIdPublicKeyZ"); + *ret_conv = C2Tuple_ChannelIdPublicKeyZ_new(a_conv, b_ref); return tag_ptr(ret_conv, true); } -void CS_LDK_C2Tuple_ThirtyTwoBytesPublicKeyZ_free(int64_t _res) { +void CS_LDK_C2Tuple_ChannelIdPublicKeyZ_free(int64_t _res) { if (!ptr_is_owned(_res)) return; void* _res_ptr = untag_ptr(_res); CHECK_ACCESS(_res_ptr); - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ _res_conv = *(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)(_res_ptr); + LDKC2Tuple_ChannelIdPublicKeyZ _res_conv = *(LDKC2Tuple_ChannelIdPublicKeyZ*)(_res_ptr); FREE(untag_ptr(_res)); - C2Tuple_ThirtyTwoBytesPublicKeyZ_free(_res_conv); + C2Tuple_ChannelIdPublicKeyZ_free(_res_conv); } -void CS_LDK_CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_free(int64_tArray _res) { - LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ _res_constr; +void CS_LDK_CVec_C2Tuple_ChannelIdPublicKeyZZ_free(int64_tArray _res) { + LDKCVec_C2Tuple_ChannelIdPublicKeyZZ _res_constr; _res_constr.datalen = _res->arr_len; if (_res_constr.datalen > 0) - _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ Elements"); + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKCVec_C2Tuple_ChannelIdPublicKeyZZ Elements"); else _res_constr.data = NULL; int64_t* _res_vals = _res->elems; - for (size_t j = 0; j < _res_constr.datalen; j++) { - int64_t _res_conv_35 = _res_vals[j]; - void* _res_conv_35_ptr = untag_ptr(_res_conv_35); - CHECK_ACCESS(_res_conv_35_ptr); - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ _res_conv_35_conv = *(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)(_res_conv_35_ptr); - FREE(untag_ptr(_res_conv_35)); - _res_constr.data[j] = _res_conv_35_conv; + for (size_t e = 0; e < _res_constr.datalen; e++) { + int64_t _res_conv_30 = _res_vals[e]; + void* _res_conv_30_ptr = untag_ptr(_res_conv_30); + CHECK_ACCESS(_res_conv_30_ptr); + LDKC2Tuple_ChannelIdPublicKeyZ _res_conv_30_conv = *(LDKC2Tuple_ChannelIdPublicKeyZ*)(_res_conv_30_ptr); + FREE(untag_ptr(_res_conv_30)); + _res_constr.data[e] = _res_conv_30_conv; } FREE(_res); - CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_free(_res_constr); + CVec_C2Tuple_ChannelIdPublicKeyZZ_free(_res_constr); +} + +void CS_LDK_CVec_ChannelIdZ_free(int64_tArray _res) { + LDKCVec_ChannelIdZ _res_constr; + _res_constr.datalen = _res->arr_len; + if (_res_constr.datalen > 0) + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKChannelId), "LDKCVec_ChannelIdZ Elements"); + else + _res_constr.data = NULL; + int64_t* _res_vals = _res->elems; + for (size_t l = 0; l < _res_constr.datalen; l++) { + int64_t _res_conv_11 = _res_vals[l]; + LDKChannelId _res_conv_11_conv; + _res_conv_11_conv.inner = untag_ptr(_res_conv_11); + _res_conv_11_conv.is_owned = ptr_is_owned(_res_conv_11); + CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_11_conv); + _res_constr.data[l] = _res_conv_11_conv; + } + FREE(_res); + CVec_ChannelIdZ_free(_res_constr); +} + +int64_t CS_LDK_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(int64_t o) { + LDKOfferWithDerivedMetadataBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = OfferWithDerivedMetadataBuilder_clone(&o_conv); + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(int32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_cs(e); + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(int64_t o) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(int64_t arg) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* arg_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(int64_t orig) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* orig_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); } int64_t CS_LDK_COption_StrZ_some(jstring o) { @@ -22563,52 +24806,6 @@ int64_t CS_LDK_COption_StrZ_clone(int64_t orig) { return ret_ref; } -int64_t CS_LDK_CResult_NoneBolt12SemanticErrorZ_ok() { - LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); - *ret_conv = CResult_NoneBolt12SemanticErrorZ_ok(); - return tag_ptr(ret_conv, true); -} - -int64_t CS_LDK_CResult_NoneBolt12SemanticErrorZ_err(int32_t e) { - LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_cs(e); - LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); - *ret_conv = CResult_NoneBolt12SemanticErrorZ_err(e_conv); - return tag_ptr(ret_conv, true); -} - -jboolean CS_LDK_CResult_NoneBolt12SemanticErrorZ_is_ok(int64_t o) { - LDKCResult_NoneBolt12SemanticErrorZ* o_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(o); - jboolean ret_conv = CResult_NoneBolt12SemanticErrorZ_is_ok(o_conv); - return ret_conv; -} - -void CS_LDK_CResult_NoneBolt12SemanticErrorZ_free(int64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKCResult_NoneBolt12SemanticErrorZ _res_conv = *(LDKCResult_NoneBolt12SemanticErrorZ*)(_res_ptr); - FREE(untag_ptr(_res)); - CResult_NoneBolt12SemanticErrorZ_free(_res_conv); -} - -static inline uint64_t CResult_NoneBolt12SemanticErrorZ_clone_ptr(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR arg) { - LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); - *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(arg); - return tag_ptr(ret_conv, true); -} -int64_t CS_LDK_CResult_NoneBolt12SemanticErrorZ_clone_ptr(int64_t arg) { - LDKCResult_NoneBolt12SemanticErrorZ* arg_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(arg); - int64_t ret_conv = CResult_NoneBolt12SemanticErrorZ_clone_ptr(arg_conv); - return ret_conv; -} - -int64_t CS_LDK_CResult_NoneBolt12SemanticErrorZ_clone(int64_t orig) { - LDKCResult_NoneBolt12SemanticErrorZ* orig_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(orig); - LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); - *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(orig_conv); - return tag_ptr(ret_conv, true); -} - int64_t CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok(int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -22658,6 +24855,58 @@ int64_t CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_clone(int64_t return tag_ptr(ret_conv, true); } +int64_t CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_ok(int8_tArray o) { + LDKThirtyTwoBytes o_ref; + CHECK(o->arr_len == 32); + memcpy(o_ref.data, o->elems, 32); FREE(o); + LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); + *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_ok(o_ref); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_err(int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKAPIError e_conv = *(LDKAPIError*)(e_ptr); + e_conv = APIError_clone((LDKAPIError*)untag_ptr(e)); + LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); + *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_is_ok(int64_t o) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* o_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_ThirtyTwoBytesAPIErrorZ _res_conv = *(LDKCResult_ThirtyTwoBytesAPIErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_ThirtyTwoBytesAPIErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR arg) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); + *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(int64_t arg) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* arg_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_clone(int64_t orig) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* orig_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(orig); + LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); + *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + int64_t CS_LDK_COption_OffersMessageZ_some(int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -23980,27 +26229,6 @@ void CS_LDK_CVec_CommitmentTransactionZ_free(int64_tArray _res) { CVec_CommitmentTransactionZ_free(_res_constr); } -void CS_LDK_CVec_TransactionZ_free(ptrArray _res) { - LDKCVec_TransactionZ _res_constr; - _res_constr.datalen = _res->arr_len; - if (_res_constr.datalen > 0) - _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKTransaction), "LDKCVec_TransactionZ Elements"); - else - _res_constr.data = NULL; - int8_tArray* _res_vals = (void*) _res->elems; - for (size_t i = 0; i < _res_constr.datalen; i++) { - int8_tArray _res_conv_8 = _res_vals[i]; - LDKTransaction _res_conv_8_ref; - _res_conv_8_ref.datalen = _res_conv_8->arr_len; - _res_conv_8_ref.data = MALLOC(_res_conv_8_ref.datalen, "LDKTransaction Bytes"); - memcpy(_res_conv_8_ref.data, _res_conv_8->elems, _res_conv_8_ref.datalen); FREE(_res_conv_8); - _res_conv_8_ref.data_is_owned = true; - _res_constr.data[i] = _res_conv_8_ref; - } - FREE(_res); - CVec_TransactionZ_free(_res_constr); -} - static inline uint64_t C2Tuple_u32TxOutZ_clone_ptr(LDKC2Tuple_u32TxOutZ *NONNULL_PTR arg) { LDKC2Tuple_u32TxOutZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ"); *ret_conv = C2Tuple_u32TxOutZ_clone(arg); @@ -24701,64 +26929,24 @@ int64_t CS_LDK_COption_SocketAddressZ_clone(int64_t orig) { return ret_ref; } -static inline uint64_t C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR arg) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ"); - *ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(arg); - return tag_ptr(ret_conv, true); -} -int64_t CS_LDK_C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(int64_t arg) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* arg_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(arg); - int64_t ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(arg_conv); - return ret_conv; -} - -int64_t CS_LDK_C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(int64_t orig) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* orig_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(orig); - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ"); - *ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(orig_conv); - return tag_ptr(ret_conv, true); -} - -int64_t CS_LDK_C2Tuple_PublicKeyCOption_SocketAddressZZ_new(int8_tArray a, int64_t b) { - LDKPublicKey a_ref; - CHECK(a->arr_len == 33); - memcpy(a_ref.compressed_form, a->elems, 33); FREE(a); - void* b_ptr = untag_ptr(b); - CHECK_ACCESS(b_ptr); - LDKCOption_SocketAddressZ b_conv = *(LDKCOption_SocketAddressZ*)(b_ptr); - b_conv = COption_SocketAddressZ_clone((LDKCOption_SocketAddressZ*)untag_ptr(b)); - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ"); - *ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_new(a_ref, b_conv); - return tag_ptr(ret_conv, true); -} - -void CS_LDK_C2Tuple_PublicKeyCOption_SocketAddressZZ_free(int64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ _res_conv = *(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)(_res_ptr); - FREE(untag_ptr(_res)); - C2Tuple_PublicKeyCOption_SocketAddressZZ_free(_res_conv); -} - -void CS_LDK_CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_free(int64_tArray _res) { - LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ _res_constr; +void CS_LDK_CVec_PeerDetailsZ_free(int64_tArray _res) { + LDKCVec_PeerDetailsZ _res_constr; _res_constr.datalen = _res->arr_len; if (_res_constr.datalen > 0) - _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ Elements"); + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKPeerDetails), "LDKCVec_PeerDetailsZ Elements"); else _res_constr.data = NULL; int64_t* _res_vals = _res->elems; - for (size_t r = 0; r < _res_constr.datalen; r++) { - int64_t _res_conv_43 = _res_vals[r]; - void* _res_conv_43_ptr = untag_ptr(_res_conv_43); - CHECK_ACCESS(_res_conv_43_ptr); - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ _res_conv_43_conv = *(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)(_res_conv_43_ptr); - FREE(untag_ptr(_res_conv_43)); - _res_constr.data[r] = _res_conv_43_conv; + for (size_t n = 0; n < _res_constr.datalen; n++) { + int64_t _res_conv_13 = _res_vals[n]; + LDKPeerDetails _res_conv_13_conv; + _res_conv_13_conv.inner = untag_ptr(_res_conv_13); + _res_conv_13_conv.is_owned = ptr_is_owned(_res_conv_13); + CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_13_conv); + _res_constr.data[n] = _res_conv_13_conv; } FREE(_res); - CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_free(_res_constr); + CVec_PeerDetailsZ_free(_res_constr); } int64_t CS_LDK_CResult_CVec_u8ZPeerHandleErrorZ_ok(int8_tArray o) { @@ -25204,6 +27392,108 @@ int64_t CS_LDK_CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_clone(int6 return tag_ptr(ret_conv, true); } +int64_t CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(int64_t o) { + LDKUnsignedInvoiceRequest o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = UnsignedInvoiceRequest_clone(&o_conv); + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(int32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_cs(e); + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(int64_t o) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* o_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ _res_conv = *(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(int64_t arg) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* arg_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(int64_t orig) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* orig_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_InvoiceRequestBolt12SemanticErrorZ_ok(int64_t o) { + LDKInvoiceRequest o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = InvoiceRequest_clone(&o_conv); + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_InvoiceRequestBolt12SemanticErrorZ_err(int32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_cs(e); + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(int64_t o) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_InvoiceRequestBolt12SemanticErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceRequestBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceRequestBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(int64_t arg) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* arg_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_InvoiceRequestBolt12SemanticErrorZ_clone(int64_t orig) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* orig_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + int64_t CS_LDK_COption_SecretKeyZ_some(int8_tArray o) { LDKSecretKey o_ref; CHECK(o->arr_len == 32); @@ -25250,6 +27540,40 @@ int64_t CS_LDK_COption_SecretKeyZ_clone(int64_t orig) { return ret_ref; } +int64_t CS_LDK_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok(int64_t o) { + LDKInvoiceWithExplicitSigningPubkeyBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err(int32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_cs(e); + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(int64_t o) { + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free(_res_conv); +} + int64_t CS_LDK_CResult_VerifiedInvoiceRequestNoneZ_ok(int64_t o) { LDKVerifiedInvoiceRequest o_conv; o_conv.inner = untag_ptr(o); @@ -25300,6 +27624,94 @@ int64_t CS_LDK_CResult_VerifiedInvoiceRequestNoneZ_clone(int64_t orig) { return tag_ptr(ret_conv, true); } +int64_t CS_LDK_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok(int64_t o) { + LDKInvoiceWithDerivedSigningPubkeyBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err(int32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_cs(e); + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(int64_t o) { + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(_res_conv); +} + +int64_t CS_LDK_CResult_InvoiceRequestFieldsDecodeErrorZ_ok(int64_t o) { + LDKInvoiceRequestFields o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = InvoiceRequestFields_clone(&o_conv); + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ"); + *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_InvoiceRequestFieldsDecodeErrorZ_err(int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ"); + *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(int64_t o) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* o_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_InvoiceRequestFieldsDecodeErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceRequestFieldsDecodeErrorZ _res_conv = *(LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceRequestFieldsDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ"); + *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(int64_t arg) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* arg_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_InvoiceRequestFieldsDecodeErrorZ_clone(int64_t orig) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* orig_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(orig); + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ"); + *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + int32_t CS_LDK_COption_NoneZ_some() { int32_t ret_conv = LDKCOption_NoneZ_to_cs(COption_NoneZ_some()); return ret_conv; @@ -25336,6 +27748,52 @@ void CS_LDK_CVec_WitnessZ_free(ptrArray _res) { CVec_WitnessZ_free(_res_constr); } +int64_t CS_LDK_COption_ECDSASignatureZ_some(int8_tArray o) { + LDKECDSASignature o_ref; + CHECK(o->arr_len == 64); + memcpy(o_ref.compact_form, o->elems, 64); FREE(o); + LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ"); + *ret_copy = COption_ECDSASignatureZ_some(o_ref); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_COption_ECDSASignatureZ_none() { + LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ"); + *ret_copy = COption_ECDSASignatureZ_none(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void CS_LDK_COption_ECDSASignatureZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCOption_ECDSASignatureZ _res_conv = *(LDKCOption_ECDSASignatureZ*)(_res_ptr); + FREE(untag_ptr(_res)); + COption_ECDSASignatureZ_free(_res_conv); +} + +static inline uint64_t COption_ECDSASignatureZ_clone_ptr(LDKCOption_ECDSASignatureZ *NONNULL_PTR arg) { + LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ"); + *ret_copy = COption_ECDSASignatureZ_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t CS_LDK_COption_ECDSASignatureZ_clone_ptr(int64_t arg) { + LDKCOption_ECDSASignatureZ* arg_conv = (LDKCOption_ECDSASignatureZ*)untag_ptr(arg); + int64_t ret_conv = COption_ECDSASignatureZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_COption_ECDSASignatureZ_clone(int64_t orig) { + LDKCOption_ECDSASignatureZ* orig_conv = (LDKCOption_ECDSASignatureZ*)untag_ptr(orig); + LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ"); + *ret_copy = COption_ECDSASignatureZ_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + int64_t CS_LDK_COption_i64Z_some(int64_t o) { LDKCOption_i64Z *ret_copy = MALLOC(sizeof(LDKCOption_i64Z), "LDKCOption_i64Z"); *ret_copy = COption_i64Z_some(o); @@ -29251,6 +31709,27 @@ int64_t CS_LDK_CResult_ShutdownScriptInvalidShutdownScriptZ_clone(int64_t orig) return tag_ptr(ret_conv, true); } +void CS_LDK_CVec_TransactionZ_free(ptrArray _res) { + LDKCVec_TransactionZ _res_constr; + _res_constr.datalen = _res->arr_len; + if (_res_constr.datalen > 0) + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKTransaction), "LDKCVec_TransactionZ Elements"); + else + _res_constr.data = NULL; + int8_tArray* _res_vals = (void*) _res->elems; + for (size_t i = 0; i < _res_constr.datalen; i++) { + int8_tArray _res_conv_8 = _res_vals[i]; + LDKTransaction _res_conv_8_ref; + _res_conv_8_ref.datalen = _res_conv_8->arr_len; + _res_conv_8_ref.data = MALLOC(_res_conv_8_ref.datalen, "LDKTransaction Bytes"); + memcpy(_res_conv_8_ref.data, _res_conv_8->elems, _res_conv_8_ref.datalen); FREE(_res_conv_8); + _res_conv_8_ref.data_is_owned = true; + _res_constr.data[i] = _res_conv_8_ref; + } + FREE(_res); + CVec_TransactionZ_free(_res_constr); +} + int64_t CS_LDK_CResult_PaymentPurposeDecodeErrorZ_ok(int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -30763,6 +33242,60 @@ int64_t CS_LDK_CResult_UntrustedStringDecodeErrorZ_clone(int64_t orig) { return tag_ptr(ret_conv, true); } +int64_t CS_LDK_CResult_ChannelIdDecodeErrorZ_ok(int64_t o) { + LDKChannelId o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = ChannelId_clone(&o_conv); + LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ"); + *ret_conv = CResult_ChannelIdDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_ChannelIdDecodeErrorZ_err(int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ"); + *ret_conv = CResult_ChannelIdDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_ChannelIdDecodeErrorZ_is_ok(int64_t o) { + LDKCResult_ChannelIdDecodeErrorZ* o_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_ChannelIdDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_ChannelIdDecodeErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_ChannelIdDecodeErrorZ _res_conv = *(LDKCResult_ChannelIdDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_ChannelIdDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_ChannelIdDecodeErrorZ_clone_ptr(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ"); + *ret_conv = CResult_ChannelIdDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_ChannelIdDecodeErrorZ_clone_ptr(int64_t arg) { + LDKCResult_ChannelIdDecodeErrorZ* arg_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_ChannelIdDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_ChannelIdDecodeErrorZ_clone(int64_t orig) { + LDKCResult_ChannelIdDecodeErrorZ* orig_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(orig); + LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ"); + *ret_conv = CResult_ChannelIdDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + static inline uint64_t C2Tuple__u832u16Z_clone_ptr(LDKC2Tuple__u832u16Z *NONNULL_PTR arg) { LDKC2Tuple__u832u16Z* ret_conv = MALLOC(sizeof(LDKC2Tuple__u832u16Z), "LDKC2Tuple__u832u16Z"); *ret_conv = C2Tuple__u832u16Z_clone(arg); @@ -30907,98 +33440,218 @@ int64_t CS_LDK_CResult_PaymentConstraintsDecodeErrorZ_clone(int64_t orig) { return tag_ptr(ret_conv, true); } -static inline uint64_t C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR arg) { - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ"); - *ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(arg); +int64_t CS_LDK_CResult_PaymentContextDecodeErrorZ_ok(int64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKPaymentContext o_conv = *(LDKPaymentContext*)(o_ptr); + o_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(o)); + LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ"); + *ret_conv = CResult_PaymentContextDecodeErrorZ_ok(o_conv); return tag_ptr(ret_conv, true); } -int64_t CS_LDK_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(int64_t arg) { - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* arg_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(arg); - int64_t ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(arg_conv); + +int64_t CS_LDK_CResult_PaymentContextDecodeErrorZ_err(int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ"); + *ret_conv = CResult_PaymentContextDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_PaymentContextDecodeErrorZ_is_ok(int64_t o) { + LDKCResult_PaymentContextDecodeErrorZ* o_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_PaymentContextDecodeErrorZ_is_ok(o_conv); return ret_conv; } -int64_t CS_LDK_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(int64_t orig) { - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* orig_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(orig); - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ"); - *ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(orig_conv); +void CS_LDK_CResult_PaymentContextDecodeErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_PaymentContextDecodeErrorZ _res_conv = *(LDKCResult_PaymentContextDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_PaymentContextDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_PaymentContextDecodeErrorZ_clone_ptr(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ"); + *ret_conv = CResult_PaymentContextDecodeErrorZ_clone(arg); return tag_ptr(ret_conv, true); } +int64_t CS_LDK_CResult_PaymentContextDecodeErrorZ_clone_ptr(int64_t arg) { + LDKCResult_PaymentContextDecodeErrorZ* arg_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_PaymentContextDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} -int64_t CS_LDK_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new(int8_tArray a, int64_t b, int64_t c) { - LDKThirtyTwoBytes a_ref; - CHECK(a->arr_len == 32); - memcpy(a_ref.data, a->elems, 32); FREE(a); - LDKRecipientOnionFields b_conv; - b_conv.inner = untag_ptr(b); - b_conv.is_owned = ptr_is_owned(b); - CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); - b_conv = RecipientOnionFields_clone(&b_conv); - LDKRouteParameters c_conv; - c_conv.inner = untag_ptr(c); - c_conv.is_owned = ptr_is_owned(c); - CHECK_INNER_FIELD_ACCESS_OR_NULL(c_conv); - c_conv = RouteParameters_clone(&c_conv); - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ"); - *ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new(a_ref, b_conv, c_conv); +int64_t CS_LDK_CResult_PaymentContextDecodeErrorZ_clone(int64_t orig) { + LDKCResult_PaymentContextDecodeErrorZ* orig_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(orig); + LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ"); + *ret_conv = CResult_PaymentContextDecodeErrorZ_clone(orig_conv); return tag_ptr(ret_conv, true); } -void CS_LDK_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free(int64_t _res) { +int64_t CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_ok(int64_t o) { + LDKUnknownPaymentContext o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = UnknownPaymentContext_clone(&o_conv); + LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ"); + *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_err(int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ"); + *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_is_ok(int64_t o) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* o_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_free(int64_t _res) { if (!ptr_is_owned(_res)) return; void* _res_ptr = untag_ptr(_res); CHECK_ACCESS(_res_ptr); - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ _res_conv = *(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)(_res_ptr); + LDKCResult_UnknownPaymentContextDecodeErrorZ _res_conv = *(LDKCResult_UnknownPaymentContextDecodeErrorZ*)(_res_ptr); FREE(untag_ptr(_res)); - C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free(_res_conv); + CResult_UnknownPaymentContextDecodeErrorZ_free(_res_conv); } -int64_t CS_LDK_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok(int64_t o) { - void* o_ptr = untag_ptr(o); - CHECK_ACCESS(o_ptr); - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ o_conv = *(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)(o_ptr); - o_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone((LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(o)); - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ"); - *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok(o_conv); +static inline uint64_t CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ"); + *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_clone(arg); return tag_ptr(ret_conv, true); } +int64_t CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(int64_t arg) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* arg_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} -int64_t CS_LDK_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err() { - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ"); - *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err(); +int64_t CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_clone(int64_t orig) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* orig_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(orig); + LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ"); + *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_clone(orig_conv); return tag_ptr(ret_conv, true); } -jboolean CS_LDK_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok(int64_t o) { - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* o_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(o); - jboolean ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok(o_conv); +int64_t CS_LDK_CResult_Bolt12OfferContextDecodeErrorZ_ok(int64_t o) { + LDKBolt12OfferContext o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = Bolt12OfferContext_clone(&o_conv); + LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_Bolt12OfferContextDecodeErrorZ_err(int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_Bolt12OfferContextDecodeErrorZ_is_ok(int64_t o) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* o_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_is_ok(o_conv); return ret_conv; } -void CS_LDK_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free(int64_t _res) { +void CS_LDK_CResult_Bolt12OfferContextDecodeErrorZ_free(int64_t _res) { if (!ptr_is_owned(_res)) return; void* _res_ptr = untag_ptr(_res); CHECK_ACCESS(_res_ptr); - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ _res_conv = *(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)(_res_ptr); + LDKCResult_Bolt12OfferContextDecodeErrorZ _res_conv = *(LDKCResult_Bolt12OfferContextDecodeErrorZ*)(_res_ptr); FREE(untag_ptr(_res)); - CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free(_res_conv); + CResult_Bolt12OfferContextDecodeErrorZ_free(_res_conv); } -static inline uint64_t CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR arg) { - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ"); - *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(arg); +static inline uint64_t CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_clone(arg); return tag_ptr(ret_conv, true); } -int64_t CS_LDK_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(int64_t arg) { - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* arg_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(arg); - int64_t ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(arg_conv); +int64_t CS_LDK_CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(int64_t arg) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* arg_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(arg_conv); return ret_conv; } -int64_t CS_LDK_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(int64_t orig) { - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* orig_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(orig); - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ"); - *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(orig_conv); +int64_t CS_LDK_CResult_Bolt12OfferContextDecodeErrorZ_clone(int64_t orig) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* orig_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(orig); + LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_Bolt12RefundContextDecodeErrorZ_ok(int64_t o) { + LDKBolt12RefundContext o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = Bolt12RefundContext_clone(&o_conv); + LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_Bolt12RefundContextDecodeErrorZ_err(int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_Bolt12RefundContextDecodeErrorZ_is_ok(int64_t o) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* o_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_Bolt12RefundContextDecodeErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_Bolt12RefundContextDecodeErrorZ _res_conv = *(LDKCResult_Bolt12RefundContextDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_Bolt12RefundContextDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(int64_t arg) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* arg_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_Bolt12RefundContextDecodeErrorZ_clone(int64_t orig) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* orig_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(orig); + LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_clone(orig_conv); return tag_ptr(ret_conv, true); } @@ -31049,6 +33702,101 @@ int64_t CS_LDK_CResult_StrSecp256k1ErrorZ_clone(int64_t orig) { return tag_ptr(ret_conv, true); } +static inline uint64_t C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR arg) { + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ"); + *ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(int64_t arg) { + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* arg_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(arg); + int64_t ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(int64_t orig) { + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* orig_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(orig); + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ"); + *ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new(int8_tArray a, int64_t b, int64_t c) { + LDKThirtyTwoBytes a_ref; + CHECK(a->arr_len == 32); + memcpy(a_ref.data, a->elems, 32); FREE(a); + LDKRecipientOnionFields b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv = RecipientOnionFields_clone(&b_conv); + LDKRouteParameters c_conv; + c_conv.inner = untag_ptr(c); + c_conv.is_owned = ptr_is_owned(c); + CHECK_INNER_FIELD_ACCESS_OR_NULL(c_conv); + c_conv = RouteParameters_clone(&c_conv); + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ"); + *ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new(a_ref, b_conv, c_conv); + return tag_ptr(ret_conv, true); +} + +void CS_LDK_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ _res_conv = *(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)(_res_ptr); + FREE(untag_ptr(_res)); + C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free(_res_conv); +} + +int64_t CS_LDK_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok(int64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ o_conv = *(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)(o_ptr); + o_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone((LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(o)); + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ"); + *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err() { + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ"); + *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err(); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok(int64_t o) { + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* o_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(o); + jboolean ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ _res_conv = *(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free(_res_conv); +} + +static inline uint64_t CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR arg) { + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ"); + *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(int64_t arg) { + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* arg_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(arg); + int64_t ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(int64_t orig) { + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* orig_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(orig); + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ"); + *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + int64_t CS_LDK_CResult_TxOutUtxoLookupErrorZ_ok(int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -31179,6 +33927,24 @@ void CS_LDK_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZS CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_free(_res_conv); } +static inline uint64_t CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ *NONNULL_PTR arg) { + LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ"); + *ret_conv = CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(int64_t arg) { + LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* arg_conv = (LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(int64_t orig) { + LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* orig_conv = (LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ*)untag_ptr(orig); + LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ"); + *ret_conv = CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + int64_t CS_LDK_CResult_PeeledOnionNoneZ_ok(int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -31210,6 +33976,24 @@ void CS_LDK_CResult_PeeledOnionNoneZ_free(int64_t _res) { CResult_PeeledOnionNoneZ_free(_res_conv); } +static inline uint64_t CResult_PeeledOnionNoneZ_clone_ptr(LDKCResult_PeeledOnionNoneZ *NONNULL_PTR arg) { + LDKCResult_PeeledOnionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PeeledOnionNoneZ), "LDKCResult_PeeledOnionNoneZ"); + *ret_conv = CResult_PeeledOnionNoneZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_PeeledOnionNoneZ_clone_ptr(int64_t arg) { + LDKCResult_PeeledOnionNoneZ* arg_conv = (LDKCResult_PeeledOnionNoneZ*)untag_ptr(arg); + int64_t ret_conv = CResult_PeeledOnionNoneZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_PeeledOnionNoneZ_clone(int64_t orig) { + LDKCResult_PeeledOnionNoneZ* orig_conv = (LDKCResult_PeeledOnionNoneZ*)untag_ptr(orig); + LDKCResult_PeeledOnionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PeeledOnionNoneZ), "LDKCResult_PeeledOnionNoneZ"); + *ret_conv = CResult_PeeledOnionNoneZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + int64_t CS_LDK_CResult_SendSuccessSendErrorZ_ok(int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -31245,6 +34029,24 @@ void CS_LDK_CResult_SendSuccessSendErrorZ_free(int64_t _res) { CResult_SendSuccessSendErrorZ_free(_res_conv); } +static inline uint64_t CResult_SendSuccessSendErrorZ_clone_ptr(LDKCResult_SendSuccessSendErrorZ *NONNULL_PTR arg) { + LDKCResult_SendSuccessSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SendSuccessSendErrorZ), "LDKCResult_SendSuccessSendErrorZ"); + *ret_conv = CResult_SendSuccessSendErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_SendSuccessSendErrorZ_clone_ptr(int64_t arg) { + LDKCResult_SendSuccessSendErrorZ* arg_conv = (LDKCResult_SendSuccessSendErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_SendSuccessSendErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_SendSuccessSendErrorZ_clone(int64_t orig) { + LDKCResult_SendSuccessSendErrorZ* orig_conv = (LDKCResult_SendSuccessSendErrorZ*)untag_ptr(orig); + LDKCResult_SendSuccessSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SendSuccessSendErrorZ), "LDKCResult_SendSuccessSendErrorZ"); + *ret_conv = CResult_SendSuccessSendErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + int64_t CS_LDK_CResult_BlindedPathNoneZ_ok(int64_t o) { LDKBlindedPath o_conv; o_conv.inner = untag_ptr(o); @@ -31526,6 +34328,261 @@ int64_t CS_LDK_CResult_InvoiceErrorDecodeErrorZ_clone(int64_t orig) { return tag_ptr(ret_conv, true); } +int64_t CS_LDK_CResult_TrackedSpendableOutputDecodeErrorZ_ok(int64_t o) { + LDKTrackedSpendableOutput o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = TrackedSpendableOutput_clone(&o_conv); + LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ"); + *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_TrackedSpendableOutputDecodeErrorZ_err(int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ"); + *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(int64_t o) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* o_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_TrackedSpendableOutputDecodeErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_TrackedSpendableOutputDecodeErrorZ _res_conv = *(LDKCResult_TrackedSpendableOutputDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_TrackedSpendableOutputDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ"); + *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(int64_t arg) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* arg_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_TrackedSpendableOutputDecodeErrorZ_clone(int64_t orig) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* orig_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(orig); + LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ"); + *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_OutputSpendStatusDecodeErrorZ_ok(int64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKOutputSpendStatus o_conv = *(LDKOutputSpendStatus*)(o_ptr); + o_conv = OutputSpendStatus_clone((LDKOutputSpendStatus*)untag_ptr(o)); + LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ"); + *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_OutputSpendStatusDecodeErrorZ_err(int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ"); + *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_OutputSpendStatusDecodeErrorZ_is_ok(int64_t o) { + LDKCResult_OutputSpendStatusDecodeErrorZ* o_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_OutputSpendStatusDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_OutputSpendStatusDecodeErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_OutputSpendStatusDecodeErrorZ _res_conv = *(LDKCResult_OutputSpendStatusDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_OutputSpendStatusDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ"); + *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(int64_t arg) { + LDKCResult_OutputSpendStatusDecodeErrorZ* arg_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_OutputSpendStatusDecodeErrorZ_clone(int64_t orig) { + LDKCResult_OutputSpendStatusDecodeErrorZ* orig_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(orig); + LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ"); + *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_COption_FilterZ_some(int64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKFilter o_conv = *(LDKFilter*)(o_ptr); + if (o_conv.free == LDKFilter_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFilter_JCalls_cloned(&o_conv); + } + LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ"); + *ret_copy = COption_FilterZ_some(o_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_COption_FilterZ_none() { + LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ"); + *ret_copy = COption_FilterZ_none(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void CS_LDK_COption_FilterZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCOption_FilterZ _res_conv = *(LDKCOption_FilterZ*)(_res_ptr); + FREE(untag_ptr(_res)); + COption_FilterZ_free(_res_conv); +} + +void CS_LDK_CVec_TrackedSpendableOutputZ_free(int64_tArray _res) { + LDKCVec_TrackedSpendableOutputZ _res_constr; + _res_constr.datalen = _res->arr_len; + if (_res_constr.datalen > 0) + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKTrackedSpendableOutput), "LDKCVec_TrackedSpendableOutputZ Elements"); + else + _res_constr.data = NULL; + int64_t* _res_vals = _res->elems; + for (size_t y = 0; y < _res_constr.datalen; y++) { + int64_t _res_conv_24 = _res_vals[y]; + LDKTrackedSpendableOutput _res_conv_24_conv; + _res_conv_24_conv.inner = untag_ptr(_res_conv_24); + _res_conv_24_conv.is_owned = ptr_is_owned(_res_conv_24); + CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_24_conv); + _res_constr.data[y] = _res_conv_24_conv; + } + FREE(_res); + CVec_TrackedSpendableOutputZ_free(_res_constr); +} + +int64_t CS_LDK_CResult_OutputSweeperDecodeErrorZ_ok(int64_t o) { + LDKOutputSweeper o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + // WARNING: we need a move here but no clone is available for LDKOutputSweeper + + LDKCResult_OutputSweeperDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSweeperDecodeErrorZ), "LDKCResult_OutputSweeperDecodeErrorZ"); + *ret_conv = CResult_OutputSweeperDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_OutputSweeperDecodeErrorZ_err(int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_OutputSweeperDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSweeperDecodeErrorZ), "LDKCResult_OutputSweeperDecodeErrorZ"); + *ret_conv = CResult_OutputSweeperDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_OutputSweeperDecodeErrorZ_is_ok(int64_t o) { + LDKCResult_OutputSweeperDecodeErrorZ* o_conv = (LDKCResult_OutputSweeperDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_OutputSweeperDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_OutputSweeperDecodeErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_OutputSweeperDecodeErrorZ _res_conv = *(LDKCResult_OutputSweeperDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_OutputSweeperDecodeErrorZ_free(_res_conv); +} + +int64_t CS_LDK_C2Tuple_BestBlockOutputSweeperZ_new(int64_t a, int64_t b) { + LDKBestBlock a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = BestBlock_clone(&a_conv); + LDKOutputSweeper b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + // WARNING: we need a move here but no clone is available for LDKOutputSweeper + + LDKC2Tuple_BestBlockOutputSweeperZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BestBlockOutputSweeperZ), "LDKC2Tuple_BestBlockOutputSweeperZ"); + *ret_conv = C2Tuple_BestBlockOutputSweeperZ_new(a_conv, b_conv); + return tag_ptr(ret_conv, true); +} + +void CS_LDK_C2Tuple_BestBlockOutputSweeperZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKC2Tuple_BestBlockOutputSweeperZ _res_conv = *(LDKC2Tuple_BestBlockOutputSweeperZ*)(_res_ptr); + FREE(untag_ptr(_res)); + C2Tuple_BestBlockOutputSweeperZ_free(_res_conv); +} + +int64_t CS_LDK_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok(int64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKC2Tuple_BestBlockOutputSweeperZ o_conv = *(LDKC2Tuple_BestBlockOutputSweeperZ*)(o_ptr); + // WARNING: we may need a move here but no clone is available for LDKC2Tuple_BestBlockOutputSweeperZ + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ), "LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ"); + *ret_conv = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err(int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ), "LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ"); + *ret_conv = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(int64_t o) { + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* o_conv = (LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ _res_conv = *(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free(_res_conv); +} + int64_t CS_LDK_CResult_DelayedPaymentBasepointDecodeErrorZ_ok(int64_t o) { LDKDelayedPaymentBasepoint o_conv; o_conv.inner = untag_ptr(o); @@ -31850,36 +34907,6 @@ int64_t CS_LDK_CResult_RevocationKeyDecodeErrorZ_clone(int64_t orig) { return tag_ptr(ret_conv, true); } -int64_t CS_LDK_COption_FilterZ_some(int64_t o) { - void* o_ptr = untag_ptr(o); - CHECK_ACCESS(o_ptr); - LDKFilter o_conv = *(LDKFilter*)(o_ptr); - if (o_conv.free == LDKFilter_JCalls_free) { - // If this_arg is a JCalls struct, then we need to increment the refcnt in it. - LDKFilter_JCalls_cloned(&o_conv); - } - LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ"); - *ret_copy = COption_FilterZ_some(o_conv); - int64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -int64_t CS_LDK_COption_FilterZ_none() { - LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ"); - *ret_copy = COption_FilterZ_none(); - int64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -void CS_LDK_COption_FilterZ_free(int64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKCOption_FilterZ _res_conv = *(LDKCOption_FilterZ*)(_res_ptr); - FREE(untag_ptr(_res)); - COption_FilterZ_free(_res_conv); -} - int64_t CS_LDK_CResult_LockedChannelMonitorNoneZ_ok(int64_t o) { LDKLockedChannelMonitor o_conv; o_conv.inner = untag_ptr(o); @@ -31913,24 +34940,67 @@ void CS_LDK_CResult_LockedChannelMonitorNoneZ_free(int64_t _res) { CResult_LockedChannelMonitorNoneZ_free(_res_conv); } -void CS_LDK_CVec_OutPointZ_free(int64_tArray _res) { - LDKCVec_OutPointZ _res_constr; +static inline uint64_t C2Tuple_OutPointChannelIdZ_clone_ptr(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR arg) { + LDKC2Tuple_OutPointChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ"); + *ret_conv = C2Tuple_OutPointChannelIdZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_C2Tuple_OutPointChannelIdZ_clone_ptr(int64_t arg) { + LDKC2Tuple_OutPointChannelIdZ* arg_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(arg); + int64_t ret_conv = C2Tuple_OutPointChannelIdZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_C2Tuple_OutPointChannelIdZ_clone(int64_t orig) { + LDKC2Tuple_OutPointChannelIdZ* orig_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(orig); + LDKC2Tuple_OutPointChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ"); + *ret_conv = C2Tuple_OutPointChannelIdZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_C2Tuple_OutPointChannelIdZ_new(int64_t a, int64_t b) { + LDKOutPoint a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = OutPoint_clone(&a_conv); + LDKChannelId b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv = ChannelId_clone(&b_conv); + LDKC2Tuple_OutPointChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ"); + *ret_conv = C2Tuple_OutPointChannelIdZ_new(a_conv, b_conv); + return tag_ptr(ret_conv, true); +} + +void CS_LDK_C2Tuple_OutPointChannelIdZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKC2Tuple_OutPointChannelIdZ _res_conv = *(LDKC2Tuple_OutPointChannelIdZ*)(_res_ptr); + FREE(untag_ptr(_res)); + C2Tuple_OutPointChannelIdZ_free(_res_conv); +} + +void CS_LDK_CVec_C2Tuple_OutPointChannelIdZZ_free(int64_tArray _res) { + LDKCVec_C2Tuple_OutPointChannelIdZZ _res_constr; _res_constr.datalen = _res->arr_len; if (_res_constr.datalen > 0) - _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKOutPoint), "LDKCVec_OutPointZ Elements"); + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKCVec_C2Tuple_OutPointChannelIdZZ Elements"); else _res_constr.data = NULL; int64_t* _res_vals = _res->elems; - for (size_t k = 0; k < _res_constr.datalen; k++) { - int64_t _res_conv_10 = _res_vals[k]; - LDKOutPoint _res_conv_10_conv; - _res_conv_10_conv.inner = untag_ptr(_res_conv_10); - _res_conv_10_conv.is_owned = ptr_is_owned(_res_conv_10); - CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_10_conv); - _res_constr.data[k] = _res_conv_10_conv; + for (size_t d = 0; d < _res_constr.datalen; d++) { + int64_t _res_conv_29 = _res_vals[d]; + void* _res_conv_29_ptr = untag_ptr(_res_conv_29); + CHECK_ACCESS(_res_conv_29_ptr); + LDKC2Tuple_OutPointChannelIdZ _res_conv_29_conv = *(LDKC2Tuple_OutPointChannelIdZ*)(_res_conv_29_ptr); + FREE(untag_ptr(_res_conv_29)); + _res_constr.data[d] = _res_conv_29_conv; } FREE(_res); - CVec_OutPointZ_free(_res_constr); + CVec_C2Tuple_OutPointChannelIdZZ_free(_res_constr); } void CS_LDK_CVec_MonitorUpdateIdZ_free(int64_tArray _res) { @@ -32430,6 +35500,19 @@ int8_tArray CS_LDK_TransactionU16LenLimited_into_transaction(int64_t this_arg) return ret_arr; } +int8_tArray CS_LDK_TransactionU16LenLimited_as_transaction(int64_t this_arg) { + LDKTransactionU16LenLimited this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKTransaction ret_var = TransactionU16LenLimited_as_transaction(&this_arg_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + Transaction_free(ret_var); + return ret_arr; +} + int8_tArray CS_LDK_TransactionU16LenLimited_write(int64_t obj) { LDKTransactionU16LenLimited obj_conv; obj_conv.inner = untag_ptr(obj); @@ -32662,6 +35745,55 @@ int64_t CS_LDK_MonitorUpdatingPersister_as_Persist(int64_t this_arg) { return tag_ptr(ret_ret, true); } +int32_t CS_LDK_ShortChannelIdError_clone(int64_t orig) { + LDKShortChannelIdError* orig_conv = (LDKShortChannelIdError*)untag_ptr(orig); + int32_t ret_conv = LDKShortChannelIdError_to_cs(ShortChannelIdError_clone(orig_conv)); + return ret_conv; +} + +int32_t CS_LDK_ShortChannelIdError_block_overflow() { + int32_t ret_conv = LDKShortChannelIdError_to_cs(ShortChannelIdError_block_overflow()); + return ret_conv; +} + +int32_t CS_LDK_ShortChannelIdError_tx_index_overflow() { + int32_t ret_conv = LDKShortChannelIdError_to_cs(ShortChannelIdError_tx_index_overflow()); + return ret_conv; +} + +int32_t CS_LDK_ShortChannelIdError_vout_index_overflow() { + int32_t ret_conv = LDKShortChannelIdError_to_cs(ShortChannelIdError_vout_index_overflow()); + return ret_conv; +} + +jboolean CS_LDK_ShortChannelIdError_eq(int64_t a, int64_t b) { + LDKShortChannelIdError* a_conv = (LDKShortChannelIdError*)untag_ptr(a); + LDKShortChannelIdError* b_conv = (LDKShortChannelIdError*)untag_ptr(b); + jboolean ret_conv = ShortChannelIdError_eq(a_conv, b_conv); + return ret_conv; +} + +int32_t CS_LDK_block_from_scid(int64_t short_channel_id) { + int32_t ret_conv = block_from_scid(short_channel_id); + return ret_conv; +} + +int32_t CS_LDK_tx_index_from_scid(int64_t short_channel_id) { + int32_t ret_conv = tx_index_from_scid(short_channel_id); + return ret_conv; +} + +int16_t CS_LDK_vout_from_scid(int64_t short_channel_id) { + int16_t ret_conv = vout_from_scid(short_channel_id); + return ret_conv; +} + +int64_t CS_LDK_scid_from_parts(int64_t block, int64_t tx_index, int64_t vout_index) { + LDKCResult_u64ShortChannelIdErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u64ShortChannelIdErrorZ), "LDKCResult_u64ShortChannelIdErrorZ"); + *ret_conv = scid_from_parts(block, tx_index, vout_index); + return tag_ptr(ret_conv, true); +} + void CS_LDK_UntrustedString_free(int64_t this_obj) { LDKUntrustedString this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -32818,53 +35950,647 @@ int64_t CS_LDK_PrintableString_new(jstring a_arg) { return ret_ref; } -void CS_LDK_FutureCallback_free(int64_t this_ptr) { - if (!ptr_is_owned(this_ptr)) return; - void* this_ptr_ptr = untag_ptr(this_ptr); - CHECK_ACCESS(this_ptr_ptr); - LDKFutureCallback this_ptr_conv = *(LDKFutureCallback*)(this_ptr_ptr); - FREE(untag_ptr(this_ptr)); - FutureCallback_free(this_ptr_conv); -} - -void CS_LDK_Future_free(int64_t this_obj) { - LDKFuture this_obj_conv; +void CS_LDK_TrackedSpendableOutput_free(int64_t this_obj) { + LDKTrackedSpendableOutput this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); this_obj_conv.is_owned = ptr_is_owned(this_obj); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - Future_free(this_obj_conv); + TrackedSpendableOutput_free(this_obj_conv); } -static inline uint64_t Future_clone_ptr(LDKFuture *NONNULL_PTR arg) { - LDKFuture ret_var = Future_clone(arg); +int64_t CS_LDK_TrackedSpendableOutput_get_descriptor(int64_t this_ptr) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKSpendableOutputDescriptor *ret_copy = MALLOC(sizeof(LDKSpendableOutputDescriptor), "LDKSpendableOutputDescriptor"); + *ret_copy = TrackedSpendableOutput_get_descriptor(&this_ptr_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void CS_LDK_TrackedSpendableOutput_set_descriptor(int64_t this_ptr, int64_t val) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKSpendableOutputDescriptor val_conv = *(LDKSpendableOutputDescriptor*)(val_ptr); + val_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(val)); + TrackedSpendableOutput_set_descriptor(&this_ptr_conv, val_conv); +} + +int64_t CS_LDK_TrackedSpendableOutput_get_channel_id(int64_t this_ptr) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelId ret_var = TrackedSpendableOutput_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void CS_LDK_TrackedSpendableOutput_set_channel_id(int64_t this_ptr, int64_t val) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TrackedSpendableOutput_set_channel_id(&this_ptr_conv, val_conv); +} + +int64_t CS_LDK_TrackedSpendableOutput_get_status(int64_t this_ptr) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = TrackedSpendableOutput_get_status(&this_ptr_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void CS_LDK_TrackedSpendableOutput_set_status(int64_t this_ptr, int64_t val) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKOutputSpendStatus val_conv = *(LDKOutputSpendStatus*)(val_ptr); + val_conv = OutputSpendStatus_clone((LDKOutputSpendStatus*)untag_ptr(val)); + TrackedSpendableOutput_set_status(&this_ptr_conv, val_conv); +} + +int64_t CS_LDK_TrackedSpendableOutput_new(int64_t descriptor_arg, int64_t channel_id_arg, int64_t status_arg) { + void* descriptor_arg_ptr = untag_ptr(descriptor_arg); + CHECK_ACCESS(descriptor_arg_ptr); + LDKSpendableOutputDescriptor descriptor_arg_conv = *(LDKSpendableOutputDescriptor*)(descriptor_arg_ptr); + descriptor_arg_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptor_arg)); + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + void* status_arg_ptr = untag_ptr(status_arg); + CHECK_ACCESS(status_arg_ptr); + LDKOutputSpendStatus status_arg_conv = *(LDKOutputSpendStatus*)(status_arg_ptr); + status_arg_conv = OutputSpendStatus_clone((LDKOutputSpendStatus*)untag_ptr(status_arg)); + LDKTrackedSpendableOutput ret_var = TrackedSpendableOutput_new(descriptor_arg_conv, channel_id_arg_conv, status_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t TrackedSpendableOutput_clone_ptr(LDKTrackedSpendableOutput *NONNULL_PTR arg) { + LDKTrackedSpendableOutput ret_var = TrackedSpendableOutput_clone(arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -int64_t CS_LDK_Future_clone_ptr(int64_t arg) { - LDKFuture arg_conv; +int64_t CS_LDK_TrackedSpendableOutput_clone_ptr(int64_t arg) { + LDKTrackedSpendableOutput arg_conv; arg_conv.inner = untag_ptr(arg); arg_conv.is_owned = ptr_is_owned(arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); arg_conv.is_owned = false; - int64_t ret_conv = Future_clone_ptr(&arg_conv); + int64_t ret_conv = TrackedSpendableOutput_clone_ptr(&arg_conv); return ret_conv; } -int64_t CS_LDK_Future_clone(int64_t orig) { - LDKFuture orig_conv; +int64_t CS_LDK_TrackedSpendableOutput_clone(int64_t orig) { + LDKTrackedSpendableOutput orig_conv; orig_conv.inner = untag_ptr(orig); orig_conv.is_owned = ptr_is_owned(orig); CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); orig_conv.is_owned = false; - LDKFuture ret_var = Future_clone(&orig_conv); + LDKTrackedSpendableOutput ret_var = TrackedSpendableOutput_clone(&orig_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } +jboolean CS_LDK_TrackedSpendableOutput_eq(int64_t a, int64_t b) { + LDKTrackedSpendableOutput a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKTrackedSpendableOutput b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = TrackedSpendableOutput_eq(&a_conv, &b_conv); + return ret_conv; +} + +jboolean CS_LDK_TrackedSpendableOutput_is_spent_in(int64_t this_arg, int8_tArray tx) { + LDKTrackedSpendableOutput this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKTransaction tx_ref; + tx_ref.datalen = tx->arr_len; + tx_ref.data = MALLOC(tx_ref.datalen, "LDKTransaction Bytes"); + memcpy(tx_ref.data, tx->elems, tx_ref.datalen); FREE(tx); + tx_ref.data_is_owned = true; + jboolean ret_conv = TrackedSpendableOutput_is_spent_in(&this_arg_conv, tx_ref); + return ret_conv; +} + +int8_tArray CS_LDK_TrackedSpendableOutput_write(int64_t obj) { + LDKTrackedSpendableOutput obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = TrackedSpendableOutput_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +int64_t CS_LDK_TrackedSpendableOutput_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ"); + *ret_conv = TrackedSpendableOutput_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + +void CS_LDK_OutputSpendStatus_free(int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKOutputSpendStatus this_ptr_conv = *(LDKOutputSpendStatus*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + OutputSpendStatus_free(this_ptr_conv); +} + +static inline uint64_t OutputSpendStatus_clone_ptr(LDKOutputSpendStatus *NONNULL_PTR arg) { + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = OutputSpendStatus_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t CS_LDK_OutputSpendStatus_clone_ptr(int64_t arg) { + LDKOutputSpendStatus* arg_conv = (LDKOutputSpendStatus*)untag_ptr(arg); + int64_t ret_conv = OutputSpendStatus_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_OutputSpendStatus_clone(int64_t orig) { + LDKOutputSpendStatus* orig_conv = (LDKOutputSpendStatus*)untag_ptr(orig); + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = OutputSpendStatus_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_OutputSpendStatus_pending_initial_broadcast(int64_t delayed_until_height) { + void* delayed_until_height_ptr = untag_ptr(delayed_until_height); + CHECK_ACCESS(delayed_until_height_ptr); + LDKCOption_u32Z delayed_until_height_conv = *(LDKCOption_u32Z*)(delayed_until_height_ptr); + delayed_until_height_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(delayed_until_height)); + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = OutputSpendStatus_pending_initial_broadcast(delayed_until_height_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_OutputSpendStatus_pending_first_confirmation(int8_tArray first_broadcast_hash, int32_t latest_broadcast_height, int8_tArray latest_spending_tx) { + LDKThirtyTwoBytes first_broadcast_hash_ref; + CHECK(first_broadcast_hash->arr_len == 32); + memcpy(first_broadcast_hash_ref.data, first_broadcast_hash->elems, 32); FREE(first_broadcast_hash); + LDKTransaction latest_spending_tx_ref; + latest_spending_tx_ref.datalen = latest_spending_tx->arr_len; + latest_spending_tx_ref.data = MALLOC(latest_spending_tx_ref.datalen, "LDKTransaction Bytes"); + memcpy(latest_spending_tx_ref.data, latest_spending_tx->elems, latest_spending_tx_ref.datalen); FREE(latest_spending_tx); + latest_spending_tx_ref.data_is_owned = true; + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = OutputSpendStatus_pending_first_confirmation(first_broadcast_hash_ref, latest_broadcast_height, latest_spending_tx_ref); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_OutputSpendStatus_pending_threshold_confirmations(int8_tArray first_broadcast_hash, int32_t latest_broadcast_height, int8_tArray latest_spending_tx, int32_t confirmation_height, int8_tArray confirmation_hash) { + LDKThirtyTwoBytes first_broadcast_hash_ref; + CHECK(first_broadcast_hash->arr_len == 32); + memcpy(first_broadcast_hash_ref.data, first_broadcast_hash->elems, 32); FREE(first_broadcast_hash); + LDKTransaction latest_spending_tx_ref; + latest_spending_tx_ref.datalen = latest_spending_tx->arr_len; + latest_spending_tx_ref.data = MALLOC(latest_spending_tx_ref.datalen, "LDKTransaction Bytes"); + memcpy(latest_spending_tx_ref.data, latest_spending_tx->elems, latest_spending_tx_ref.datalen); FREE(latest_spending_tx); + latest_spending_tx_ref.data_is_owned = true; + LDKThirtyTwoBytes confirmation_hash_ref; + CHECK(confirmation_hash->arr_len == 32); + memcpy(confirmation_hash_ref.data, confirmation_hash->elems, 32); FREE(confirmation_hash); + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = OutputSpendStatus_pending_threshold_confirmations(first_broadcast_hash_ref, latest_broadcast_height, latest_spending_tx_ref, confirmation_height, confirmation_hash_ref); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +jboolean CS_LDK_OutputSpendStatus_eq(int64_t a, int64_t b) { + LDKOutputSpendStatus* a_conv = (LDKOutputSpendStatus*)untag_ptr(a); + LDKOutputSpendStatus* b_conv = (LDKOutputSpendStatus*)untag_ptr(b); + jboolean ret_conv = OutputSpendStatus_eq(a_conv, b_conv); + return ret_conv; +} + +int8_tArray CS_LDK_OutputSpendStatus_write(int64_t obj) { + LDKOutputSpendStatus* obj_conv = (LDKOutputSpendStatus*)untag_ptr(obj); + LDKCVec_u8Z ret_var = OutputSpendStatus_write(obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +int64_t CS_LDK_OutputSpendStatus_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ"); + *ret_conv = OutputSpendStatus_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + +void CS_LDK_OutputSweeper_free(int64_t this_obj) { + LDKOutputSweeper this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + OutputSweeper_free(this_obj_conv); +} + +int64_t CS_LDK_OutputSweeper_new(int64_t best_block, int64_t broadcaster, int64_t fee_estimator, int64_t chain_data_source, int64_t output_spender, int64_t change_destination_source, int64_t kv_store, int64_t logger) { + LDKBestBlock best_block_conv; + best_block_conv.inner = untag_ptr(best_block); + best_block_conv.is_owned = ptr_is_owned(best_block); + CHECK_INNER_FIELD_ACCESS_OR_NULL(best_block_conv); + best_block_conv = BestBlock_clone(&best_block_conv); + void* broadcaster_ptr = untag_ptr(broadcaster); + CHECK_ACCESS(broadcaster_ptr); + LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(broadcaster_ptr); + if (broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKBroadcasterInterface_JCalls_cloned(&broadcaster_conv); + } + void* fee_estimator_ptr = untag_ptr(fee_estimator); + CHECK_ACCESS(fee_estimator_ptr); + LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(fee_estimator_ptr); + if (fee_estimator_conv.free == LDKFeeEstimator_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFeeEstimator_JCalls_cloned(&fee_estimator_conv); + } + void* chain_data_source_ptr = untag_ptr(chain_data_source); + CHECK_ACCESS(chain_data_source_ptr); + LDKCOption_FilterZ chain_data_source_conv = *(LDKCOption_FilterZ*)(chain_data_source_ptr); + // WARNING: we may need a move here but no clone is available for LDKCOption_FilterZ + if (chain_data_source_conv.tag == LDKCOption_FilterZ_Some) { + // Manually implement clone for Java trait instances + if (chain_data_source_conv.some.free == LDKFilter_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFilter_JCalls_cloned(&chain_data_source_conv.some); + } + } + void* output_spender_ptr = untag_ptr(output_spender); + CHECK_ACCESS(output_spender_ptr); + LDKOutputSpender output_spender_conv = *(LDKOutputSpender*)(output_spender_ptr); + if (output_spender_conv.free == LDKOutputSpender_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKOutputSpender_JCalls_cloned(&output_spender_conv); + } + void* change_destination_source_ptr = untag_ptr(change_destination_source); + CHECK_ACCESS(change_destination_source_ptr); + LDKChangeDestinationSource change_destination_source_conv = *(LDKChangeDestinationSource*)(change_destination_source_ptr); + if (change_destination_source_conv.free == LDKChangeDestinationSource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKChangeDestinationSource_JCalls_cloned(&change_destination_source_conv); + } + void* kv_store_ptr = untag_ptr(kv_store); + CHECK_ACCESS(kv_store_ptr); + LDKKVStore kv_store_conv = *(LDKKVStore*)(kv_store_ptr); + if (kv_store_conv.free == LDKKVStore_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKKVStore_JCalls_cloned(&kv_store_conv); + } + void* logger_ptr = untag_ptr(logger); + CHECK_ACCESS(logger_ptr); + LDKLogger logger_conv = *(LDKLogger*)(logger_ptr); + if (logger_conv.free == LDKLogger_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKLogger_JCalls_cloned(&logger_conv); + } + LDKOutputSweeper ret_var = OutputSweeper_new(best_block_conv, broadcaster_conv, fee_estimator_conv, chain_data_source_conv, output_spender_conv, change_destination_source_conv, kv_store_conv, logger_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_OutputSweeper_track_spendable_outputs(int64_t this_arg, int64_tArray output_descriptors, int64_t channel_id, jboolean exclude_static_outputs, int64_t delay_until_height) { + LDKOutputSweeper this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_SpendableOutputDescriptorZ output_descriptors_constr; + output_descriptors_constr.datalen = output_descriptors->arr_len; + if (output_descriptors_constr.datalen > 0) + output_descriptors_constr.data = MALLOC(output_descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements"); + else + output_descriptors_constr.data = NULL; + int64_t* output_descriptors_vals = output_descriptors->elems; + for (size_t b = 0; b < output_descriptors_constr.datalen; b++) { + int64_t output_descriptors_conv_27 = output_descriptors_vals[b]; + void* output_descriptors_conv_27_ptr = untag_ptr(output_descriptors_conv_27); + CHECK_ACCESS(output_descriptors_conv_27_ptr); + LDKSpendableOutputDescriptor output_descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(output_descriptors_conv_27_ptr); + output_descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(output_descriptors_conv_27)); + output_descriptors_constr.data[b] = output_descriptors_conv_27_conv; + } + FREE(output_descriptors); + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); + void* delay_until_height_ptr = untag_ptr(delay_until_height); + CHECK_ACCESS(delay_until_height_ptr); + LDKCOption_u32Z delay_until_height_conv = *(LDKCOption_u32Z*)(delay_until_height_ptr); + delay_until_height_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(delay_until_height)); + LDKCResult_NoneNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneNoneZ), "LDKCResult_NoneNoneZ"); + *ret_conv = OutputSweeper_track_spendable_outputs(&this_arg_conv, output_descriptors_constr, channel_id_conv, exclude_static_outputs, delay_until_height_conv); + return tag_ptr(ret_conv, true); +} + +int64_tArray CS_LDK_OutputSweeper_tracked_spendable_outputs(int64_t this_arg) { + LDKOutputSweeper this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_TrackedSpendableOutputZ ret_var = OutputSweeper_tracked_spendable_outputs(&this_arg_conv); + int64_tArray ret_arr = NULL; + ret_arr = init_int64_tArray(ret_var.datalen, __LINE__); + int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8); + for (size_t y = 0; y < ret_var.datalen; y++) { + LDKTrackedSpendableOutput ret_conv_24_var = ret_var.data[y]; + int64_t ret_conv_24_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_24_var); + ret_conv_24_ref = tag_ptr(ret_conv_24_var.inner, ret_conv_24_var.is_owned); + ret_arr_ptr[y] = ret_conv_24_ref; + } + + FREE(ret_var.data); + return ret_arr; +} + +int64_t CS_LDK_OutputSweeper_current_best_block(int64_t this_arg) { + LDKOutputSweeper this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKBestBlock ret_var = OutputSweeper_current_best_block(&this_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_OutputSweeper_as_Listen(int64_t this_arg) { + LDKOutputSweeper this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKListen* ret_ret = MALLOC(sizeof(LDKListen), "LDKListen"); + *ret_ret = OutputSweeper_as_Listen(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + +int64_t CS_LDK_OutputSweeper_as_Confirm(int64_t this_arg) { + LDKOutputSweeper this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKConfirm* ret_ret = MALLOC(sizeof(LDKConfirm), "LDKConfirm"); + *ret_ret = OutputSweeper_as_Confirm(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + +void CS_LDK_SpendingDelay_free(int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKSpendingDelay this_ptr_conv = *(LDKSpendingDelay*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + SpendingDelay_free(this_ptr_conv); +} + +static inline uint64_t SpendingDelay_clone_ptr(LDKSpendingDelay *NONNULL_PTR arg) { + LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay"); + *ret_copy = SpendingDelay_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t CS_LDK_SpendingDelay_clone_ptr(int64_t arg) { + LDKSpendingDelay* arg_conv = (LDKSpendingDelay*)untag_ptr(arg); + int64_t ret_conv = SpendingDelay_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_SpendingDelay_clone(int64_t orig) { + LDKSpendingDelay* orig_conv = (LDKSpendingDelay*)untag_ptr(orig); + LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay"); + *ret_copy = SpendingDelay_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_SpendingDelay_relative(int32_t num_blocks) { + LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay"); + *ret_copy = SpendingDelay_relative(num_blocks); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_SpendingDelay_absolute(int32_t height) { + LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay"); + *ret_copy = SpendingDelay_absolute(height); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_OutputSweeper_read(int8_tArray ser, int64_t arg_a, int64_t arg_b, int64_t arg_c, int64_t arg_d, int64_t arg_e, int64_t arg_f, int64_t arg_g) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + void* arg_a_ptr = untag_ptr(arg_a); + CHECK_ACCESS(arg_a_ptr); + LDKBroadcasterInterface arg_a_conv = *(LDKBroadcasterInterface*)(arg_a_ptr); + if (arg_a_conv.free == LDKBroadcasterInterface_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKBroadcasterInterface_JCalls_cloned(&arg_a_conv); + } + void* arg_b_ptr = untag_ptr(arg_b); + CHECK_ACCESS(arg_b_ptr); + LDKFeeEstimator arg_b_conv = *(LDKFeeEstimator*)(arg_b_ptr); + if (arg_b_conv.free == LDKFeeEstimator_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFeeEstimator_JCalls_cloned(&arg_b_conv); + } + void* arg_c_ptr = untag_ptr(arg_c); + CHECK_ACCESS(arg_c_ptr); + LDKCOption_FilterZ arg_c_conv = *(LDKCOption_FilterZ*)(arg_c_ptr); + // WARNING: we may need a move here but no clone is available for LDKCOption_FilterZ + if (arg_c_conv.tag == LDKCOption_FilterZ_Some) { + // Manually implement clone for Java trait instances + if (arg_c_conv.some.free == LDKFilter_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFilter_JCalls_cloned(&arg_c_conv.some); + } + } + void* arg_d_ptr = untag_ptr(arg_d); + CHECK_ACCESS(arg_d_ptr); + LDKOutputSpender arg_d_conv = *(LDKOutputSpender*)(arg_d_ptr); + if (arg_d_conv.free == LDKOutputSpender_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKOutputSpender_JCalls_cloned(&arg_d_conv); + } + void* arg_e_ptr = untag_ptr(arg_e); + CHECK_ACCESS(arg_e_ptr); + LDKChangeDestinationSource arg_e_conv = *(LDKChangeDestinationSource*)(arg_e_ptr); + if (arg_e_conv.free == LDKChangeDestinationSource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKChangeDestinationSource_JCalls_cloned(&arg_e_conv); + } + void* arg_f_ptr = untag_ptr(arg_f); + CHECK_ACCESS(arg_f_ptr); + LDKKVStore arg_f_conv = *(LDKKVStore*)(arg_f_ptr); + if (arg_f_conv.free == LDKKVStore_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKKVStore_JCalls_cloned(&arg_f_conv); + } + void* arg_g_ptr = untag_ptr(arg_g); + CHECK_ACCESS(arg_g_ptr); + LDKLogger arg_g_conv = *(LDKLogger*)(arg_g_ptr); + if (arg_g_conv.free == LDKLogger_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKLogger_JCalls_cloned(&arg_g_conv); + } + LDKCResult_OutputSweeperDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSweeperDecodeErrorZ), "LDKCResult_OutputSweeperDecodeErrorZ"); + *ret_conv = OutputSweeper_read(ser_ref, arg_a_conv, arg_b_conv, arg_c_conv, arg_d_conv, arg_e_conv, arg_f_conv, arg_g_conv); + FREE(ser); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_C2Tuple_BestBlockOutputSweeperZ_read(int8_tArray ser, int64_t arg_a, int64_t arg_b, int64_t arg_c, int64_t arg_d, int64_t arg_e, int64_t arg_f, int64_t arg_g) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + void* arg_a_ptr = untag_ptr(arg_a); + CHECK_ACCESS(arg_a_ptr); + LDKBroadcasterInterface arg_a_conv = *(LDKBroadcasterInterface*)(arg_a_ptr); + if (arg_a_conv.free == LDKBroadcasterInterface_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKBroadcasterInterface_JCalls_cloned(&arg_a_conv); + } + void* arg_b_ptr = untag_ptr(arg_b); + CHECK_ACCESS(arg_b_ptr); + LDKFeeEstimator arg_b_conv = *(LDKFeeEstimator*)(arg_b_ptr); + if (arg_b_conv.free == LDKFeeEstimator_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFeeEstimator_JCalls_cloned(&arg_b_conv); + } + void* arg_c_ptr = untag_ptr(arg_c); + CHECK_ACCESS(arg_c_ptr); + LDKCOption_FilterZ arg_c_conv = *(LDKCOption_FilterZ*)(arg_c_ptr); + // WARNING: we may need a move here but no clone is available for LDKCOption_FilterZ + if (arg_c_conv.tag == LDKCOption_FilterZ_Some) { + // Manually implement clone for Java trait instances + if (arg_c_conv.some.free == LDKFilter_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFilter_JCalls_cloned(&arg_c_conv.some); + } + } + void* arg_d_ptr = untag_ptr(arg_d); + CHECK_ACCESS(arg_d_ptr); + LDKOutputSpender arg_d_conv = *(LDKOutputSpender*)(arg_d_ptr); + if (arg_d_conv.free == LDKOutputSpender_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKOutputSpender_JCalls_cloned(&arg_d_conv); + } + void* arg_e_ptr = untag_ptr(arg_e); + CHECK_ACCESS(arg_e_ptr); + LDKChangeDestinationSource arg_e_conv = *(LDKChangeDestinationSource*)(arg_e_ptr); + if (arg_e_conv.free == LDKChangeDestinationSource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKChangeDestinationSource_JCalls_cloned(&arg_e_conv); + } + void* arg_f_ptr = untag_ptr(arg_f); + CHECK_ACCESS(arg_f_ptr); + LDKKVStore arg_f_conv = *(LDKKVStore*)(arg_f_ptr); + if (arg_f_conv.free == LDKKVStore_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKKVStore_JCalls_cloned(&arg_f_conv); + } + void* arg_g_ptr = untag_ptr(arg_g); + CHECK_ACCESS(arg_g_ptr); + LDKLogger arg_g_conv = *(LDKLogger*)(arg_g_ptr); + if (arg_g_conv.free == LDKLogger_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKLogger_JCalls_cloned(&arg_g_conv); + } + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ), "LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ"); + *ret_conv = C2Tuple_BestBlockOutputSweeperZ_read(ser_ref, arg_a_conv, arg_b_conv, arg_c_conv, arg_d_conv, arg_e_conv, arg_f_conv, arg_g_conv); + FREE(ser); + return tag_ptr(ret_conv, true); +} + +void CS_LDK_FutureCallback_free(int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKFutureCallback this_ptr_conv = *(LDKFutureCallback*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + FutureCallback_free(this_ptr_conv); +} + +void CS_LDK_Future_free(int64_t this_obj) { + LDKFuture this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + Future_free(this_obj_conv); +} + void CS_LDK_Future_register_callback_fn(int64_t this_arg, int64_t callback) { LDKFuture this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -32886,8 +36612,8 @@ void CS_LDK_Future_wait(int64_t this_arg) { this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv = Future_clone(&this_arg_conv); - Future_wait(this_arg_conv); + this_arg_conv.is_owned = false; + Future_wait(&this_arg_conv); } jboolean CS_LDK_Future_wait_timeout(int64_t this_arg, int64_t max_wait) { @@ -32895,8 +36621,8 @@ jboolean CS_LDK_Future_wait_timeout(int64_t this_arg, int64_t max_wait) { this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv = Future_clone(&this_arg_conv); - jboolean ret_conv = Future_wait_timeout(this_arg_conv, max_wait); + this_arg_conv.is_owned = false; + jboolean ret_conv = Future_wait_timeout(&this_arg_conv, max_wait); return ret_conv; } @@ -32913,8 +36639,8 @@ int64_t CS_LDK_Sleeper_from_single_future(int64_t future) { future_conv.inner = untag_ptr(future); future_conv.is_owned = ptr_is_owned(future); CHECK_INNER_FIELD_ACCESS_OR_NULL(future_conv); - future_conv = Future_clone(&future_conv); - LDKSleeper ret_var = Sleeper_from_single_future(future_conv); + future_conv.is_owned = false; + LDKSleeper ret_var = Sleeper_from_single_future(&future_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -32926,13 +36652,13 @@ int64_t CS_LDK_Sleeper_from_two_futures(int64_t fut_a, int64_t fut_b) { fut_a_conv.inner = untag_ptr(fut_a); fut_a_conv.is_owned = ptr_is_owned(fut_a); CHECK_INNER_FIELD_ACCESS_OR_NULL(fut_a_conv); - fut_a_conv = Future_clone(&fut_a_conv); + fut_a_conv.is_owned = false; LDKFuture fut_b_conv; fut_b_conv.inner = untag_ptr(fut_b); fut_b_conv.is_owned = ptr_is_owned(fut_b); CHECK_INNER_FIELD_ACCESS_OR_NULL(fut_b_conv); - fut_b_conv = Future_clone(&fut_b_conv); - LDKSleeper ret_var = Sleeper_from_two_futures(fut_a_conv, fut_b_conv); + fut_b_conv.is_owned = false; + LDKSleeper ret_var = Sleeper_from_two_futures(&fut_a_conv, &fut_b_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -32953,7 +36679,8 @@ int64_t CS_LDK_Sleeper_new(int64_tArray futures) { futures_conv_8_conv.inner = untag_ptr(futures_conv_8); futures_conv_8_conv.is_owned = ptr_is_owned(futures_conv_8); CHECK_INNER_FIELD_ACCESS_OR_NULL(futures_conv_8_conv); - futures_conv_8_conv = Future_clone(&futures_conv_8_conv); + // WARNING: we need a move here but no clone is available for LDKFuture + futures_constr.data[i] = futures_conv_8_conv; } FREE(futures); @@ -33094,9 +36821,10 @@ int64_t CS_LDK_Record_get_channel_id(int64_t this_ptr) { this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKCOption_ThirtyTwoBytesZ *ret_copy = MALLOC(sizeof(LDKCOption_ThirtyTwoBytesZ), "LDKCOption_ThirtyTwoBytesZ"); - *ret_copy = Record_get_channel_id(&this_ptr_conv); - int64_t ret_ref = tag_ptr(ret_copy, true); + LDKChannelId ret_var = Record_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } @@ -33106,10 +36834,11 @@ void CS_LDK_Record_set_channel_id(int64_t this_ptr, int64_t val) { this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - void* val_ptr = untag_ptr(val); - CHECK_ACCESS(val_ptr); - LDKCOption_ThirtyTwoBytesZ val_conv = *(LDKCOption_ThirtyTwoBytesZ*)(val_ptr); - val_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(val)); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); Record_set_channel_id(&this_ptr_conv, val_conv); } @@ -33203,10 +36932,11 @@ int64_t CS_LDK_Record_new(int32_t level_arg, int8_tArray peer_id_arg, int64_t c LDKPublicKey peer_id_arg_ref; CHECK(peer_id_arg->arr_len == 33); memcpy(peer_id_arg_ref.compressed_form, peer_id_arg->elems, 33); FREE(peer_id_arg); - void* channel_id_arg_ptr = untag_ptr(channel_id_arg); - CHECK_ACCESS(channel_id_arg_ptr); - LDKCOption_ThirtyTwoBytesZ channel_id_arg_conv = *(LDKCOption_ThirtyTwoBytesZ*)(channel_id_arg_ptr); - channel_id_arg_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(channel_id_arg)); + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKStr args_arg_conv = str_ref_to_owned_c(args_arg); LDKStr module_path_arg_conv = str_ref_to_owned_c(module_path_arg); LDKStr file_arg_conv = str_ref_to_owned_c(file_arg); @@ -34465,6 +38195,59 @@ void CS_LDK_BestBlock_free(int64_t this_obj) { BestBlock_free(this_obj_conv); } +int8_tArray CS_LDK_BestBlock_get_block_hash(int64_t this_ptr) { + LDKBestBlock this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(32, __LINE__); + memcpy(ret_arr->elems, *BestBlock_get_block_hash(&this_ptr_conv), 32); + return ret_arr; +} + +void CS_LDK_BestBlock_set_block_hash(int64_t this_ptr, int8_tArray val) { + LDKBestBlock this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKThirtyTwoBytes val_ref; + CHECK(val->arr_len == 32); + memcpy(val_ref.data, val->elems, 32); FREE(val); + BestBlock_set_block_hash(&this_ptr_conv, val_ref); +} + +int32_t CS_LDK_BestBlock_get_height(int64_t this_ptr) { + LDKBestBlock this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int32_t ret_conv = BestBlock_get_height(&this_ptr_conv); + return ret_conv; +} + +void CS_LDK_BestBlock_set_height(int64_t this_ptr, int32_t val) { + LDKBestBlock this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + BestBlock_set_height(&this_ptr_conv, val); +} + +int64_t CS_LDK_BestBlock_new(int8_tArray block_hash_arg, int32_t height_arg) { + LDKThirtyTwoBytes block_hash_arg_ref; + CHECK(block_hash_arg->arr_len == 32); + memcpy(block_hash_arg_ref.data, block_hash_arg->elems, 32); FREE(block_hash_arg); + LDKBestBlock ret_var = BestBlock_new(block_hash_arg_ref, height_arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + static inline uint64_t BestBlock_clone_ptr(LDKBestBlock *NONNULL_PTR arg) { LDKBestBlock ret_var = BestBlock_clone(arg); int64_t ret_ref = 0; @@ -34495,6 +38278,16 @@ int64_t CS_LDK_BestBlock_clone(int64_t orig) { return ret_ref; } +int64_t CS_LDK_BestBlock_hash(int64_t o) { + LDKBestBlock o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = BestBlock_hash(&o_conv); + return ret_conv; +} + jboolean CS_LDK_BestBlock_eq(int64_t a, int64_t b) { LDKBestBlock a_conv; a_conv.inner = untag_ptr(a); @@ -34519,36 +38312,27 @@ int64_t CS_LDK_BestBlock_from_network(int32_t network) { return ret_ref; } -int64_t CS_LDK_BestBlock_new(int8_tArray block_hash, int32_t height) { - LDKThirtyTwoBytes block_hash_ref; - CHECK(block_hash->arr_len == 32); - memcpy(block_hash_ref.data, block_hash->elems, 32); FREE(block_hash); - LDKBestBlock ret_var = BestBlock_new(block_hash_ref, height); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -int8_tArray CS_LDK_BestBlock_block_hash(int64_t this_arg) { - LDKBestBlock this_arg_conv; - this_arg_conv.inner = untag_ptr(this_arg); - this_arg_conv.is_owned = ptr_is_owned(this_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, BestBlock_block_hash(&this_arg_conv).data, 32); +int8_tArray CS_LDK_BestBlock_write(int64_t obj) { + LDKBestBlock obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = BestBlock_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); return ret_arr; } -int32_t CS_LDK_BestBlock_height(int64_t this_arg) { - LDKBestBlock this_arg_conv; - this_arg_conv.inner = untag_ptr(this_arg); - this_arg_conv.is_owned = ptr_is_owned(this_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv.is_owned = false; - int32_t ret_conv = BestBlock_height(&this_arg_conv); - return ret_conv; +int64_t CS_LDK_BestBlock_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ"); + *ret_conv = BestBlock_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); } void CS_LDK_Listen_free(int64_t this_ptr) { @@ -34822,6 +38606,11 @@ int32_t CS_LDK_ConfirmationTarget_channel_close_minimum() { return ret_conv; } +int32_t CS_LDK_ConfirmationTarget_output_spending_fee() { + int32_t ret_conv = LDKConfirmationTarget_to_cs(ConfirmationTarget_output_spending_fee()); + return ret_conv; +} + int64_t CS_LDK_ConfirmationTarget_hash(int64_t o) { LDKConfirmationTarget* o_conv = (LDKConfirmationTarget*)untag_ptr(o); int64_t ret_conv = ConfirmationTarget_hash(o_conv); @@ -35039,16 +38828,14 @@ int64_tArray CS_LDK_ChainMonitor_list_monitors(int64_t this_arg) { this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKCVec_OutPointZ ret_var = ChainMonitor_list_monitors(&this_arg_conv); + LDKCVec_C2Tuple_OutPointChannelIdZZ ret_var = ChainMonitor_list_monitors(&this_arg_conv); int64_tArray ret_arr = NULL; ret_arr = init_int64_tArray(ret_var.datalen, __LINE__); int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8); - for (size_t k = 0; k < ret_var.datalen; k++) { - LDKOutPoint ret_conv_10_var = ret_var.data[k]; - int64_t ret_conv_10_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_10_var); - ret_conv_10_ref = tag_ptr(ret_conv_10_var.inner, ret_conv_10_var.is_owned); - ret_arr_ptr[k] = ret_conv_10_ref; + for (size_t d = 0; d < ret_var.datalen; d++) { + LDKC2Tuple_OutPointChannelIdZ* ret_conv_29_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ"); + *ret_conv_29_conv = ret_var.data[d]; + ret_arr_ptr[d] = tag_ptr(ret_conv_29_conv, true); } FREE(ret_var.data); @@ -35118,6 +38905,29 @@ void CS_LDK_ChainMonitor_rebroadcast_pending_claims(int64_t this_arg) { ChainMonitor_rebroadcast_pending_claims(&this_arg_conv); } +void CS_LDK_ChainMonitor_signer_unblocked(int64_t this_arg, int64_t monitor_opt) { + LDKChainMonitor this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKOutPoint monitor_opt_conv; + monitor_opt_conv.inner = untag_ptr(monitor_opt); + monitor_opt_conv.is_owned = ptr_is_owned(monitor_opt); + CHECK_INNER_FIELD_ACCESS_OR_NULL(monitor_opt_conv); + monitor_opt_conv = OutPoint_clone(&monitor_opt_conv); + ChainMonitor_signer_unblocked(&this_arg_conv, monitor_opt_conv); +} + +void CS_LDK_ChainMonitor_archive_fully_resolved_channel_monitors(int64_t this_arg) { + LDKChainMonitor this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + ChainMonitor_archive_fully_resolved_channel_monitors(&this_arg_conv); +} + int64_t CS_LDK_ChainMonitor_as_Listen(int64_t this_arg) { LDKChainMonitor this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -35189,6 +38999,33 @@ void CS_LDK_ChannelMonitorUpdate_set_update_id(int64_t this_ptr, int64_t val) { ChannelMonitorUpdate_set_update_id(&this_ptr_conv, val); } +int64_t CS_LDK_ChannelMonitorUpdate_get_channel_id(int64_t this_ptr) { + LDKChannelMonitorUpdate this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelId ret_var = ChannelMonitorUpdate_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void CS_LDK_ChannelMonitorUpdate_set_channel_id(int64_t this_ptr, int64_t val) { + LDKChannelMonitorUpdate this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ChannelMonitorUpdate_set_channel_id(&this_ptr_conv, val_conv); +} + static inline uint64_t ChannelMonitorUpdate_clone_ptr(LDKChannelMonitorUpdate *NONNULL_PTR arg) { LDKChannelMonitorUpdate ret_var = ChannelMonitorUpdate_clone(arg); int64_t ret_ref = 0; @@ -35298,6 +39135,27 @@ int64_t CS_LDK_MonitorEvent_htlcevent(int64_t a) { return ret_ref; } +int64_t CS_LDK_MonitorEvent_holder_force_closed_with_info(int64_t reason, int64_t outpoint, int64_t channel_id) { + void* reason_ptr = untag_ptr(reason); + CHECK_ACCESS(reason_ptr); + LDKClosureReason reason_conv = *(LDKClosureReason*)(reason_ptr); + reason_conv = ClosureReason_clone((LDKClosureReason*)untag_ptr(reason)); + LDKOutPoint outpoint_conv; + outpoint_conv.inner = untag_ptr(outpoint); + outpoint_conv.is_owned = ptr_is_owned(outpoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_conv); + outpoint_conv = OutPoint_clone(&outpoint_conv); + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); + LDKMonitorEvent *ret_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent"); + *ret_copy = MonitorEvent_holder_force_closed_with_info(reason_conv, outpoint_conv, channel_id_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + int64_t CS_LDK_MonitorEvent_holder_force_closed(int64_t a) { LDKOutPoint a_conv; a_conv.inner = untag_ptr(a); @@ -35310,14 +39168,19 @@ int64_t CS_LDK_MonitorEvent_holder_force_closed(int64_t a) { return ret_ref; } -int64_t CS_LDK_MonitorEvent_completed(int64_t funding_txo, int64_t monitor_update_id) { +int64_t CS_LDK_MonitorEvent_completed(int64_t funding_txo, int64_t channel_id, int64_t monitor_update_id) { LDKOutPoint funding_txo_conv; funding_txo_conv.inner = untag_ptr(funding_txo); funding_txo_conv.is_owned = ptr_is_owned(funding_txo); CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_conv); funding_txo_conv = OutPoint_clone(&funding_txo_conv); + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKMonitorEvent *ret_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent"); - *ret_copy = MonitorEvent_completed(funding_txo_conv, monitor_update_id); + *ret_copy = MonitorEvent_completed(funding_txo_conv, channel_id_conv, monitor_update_id); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -35617,6 +39480,19 @@ int64_t CS_LDK_ChannelMonitor_get_funding_txo(int64_t this_arg) { return tag_ptr(ret_conv, true); } +int64_t CS_LDK_ChannelMonitor_channel_id(int64_t this_arg) { + LDKChannelMonitor this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKChannelId ret_var = ChannelMonitor_channel_id(&this_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + int64_tArray CS_LDK_ChannelMonitor_get_outputs_to_watch(int64_t this_arg) { LDKChannelMonitor this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -35752,119 +39628,112 @@ int8_tArray CS_LDK_ChannelMonitor_get_counterparty_node_id(int64_t this_arg) { return ret_arr; } -ptrArray CS_LDK_ChannelMonitor_get_latest_holder_commitment_txn(int64_t this_arg, int64_t logger) { +void CS_LDK_ChannelMonitor_broadcast_latest_holder_commitment_txn(int64_t this_arg, int64_t broadcaster, int64_t fee_estimator, int64_t logger) { LDKChannelMonitor this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; + void* broadcaster_ptr = untag_ptr(broadcaster); + if (ptr_is_owned(broadcaster)) { CHECK_ACCESS(broadcaster_ptr); } + LDKBroadcasterInterface* broadcaster_conv = (LDKBroadcasterInterface*)broadcaster_ptr; + void* fee_estimator_ptr = untag_ptr(fee_estimator); + if (ptr_is_owned(fee_estimator)) { CHECK_ACCESS(fee_estimator_ptr); } + LDKFeeEstimator* fee_estimator_conv = (LDKFeeEstimator*)fee_estimator_ptr; void* logger_ptr = untag_ptr(logger); if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); } LDKLogger* logger_conv = (LDKLogger*)logger_ptr; - LDKCVec_TransactionZ ret_var = ChannelMonitor_get_latest_holder_commitment_txn(&this_arg_conv, logger_conv); - ptrArray ret_arr = NULL; - ret_arr = init_ptrArray(ret_var.datalen, __LINE__); - int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 8); - for (size_t i = 0; i < ret_var.datalen; i++) { - LDKTransaction ret_conv_8_var = ret_var.data[i]; - int8_tArray ret_conv_8_arr = init_int8_tArray(ret_conv_8_var.datalen, __LINE__); - memcpy(ret_conv_8_arr->elems, ret_conv_8_var.data, ret_conv_8_var.datalen); - Transaction_free(ret_conv_8_var); - ret_arr_ptr[i] = ret_conv_8_arr; + ChannelMonitor_broadcast_latest_holder_commitment_txn(&this_arg_conv, broadcaster_conv, fee_estimator_conv, logger_conv); +} + +int64_tArray CS_LDK_ChannelMonitor_block_connected(int64_t this_arg, int8_tArray header, int64_tArray txdata, int32_t height, int64_t broadcaster, int64_t fee_estimator, int64_t logger) { + LDKChannelMonitor this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + uint8_t header_arr[80]; + CHECK(header->arr_len == 80); + memcpy(header_arr, header->elems, 80); FREE(header); + uint8_t (*header_ref)[80] = &header_arr; + LDKCVec_C2Tuple_usizeTransactionZZ txdata_constr; + txdata_constr.datalen = txdata->arr_len; + if (txdata_constr.datalen > 0) + txdata_constr.data = MALLOC(txdata_constr.datalen * sizeof(LDKC2Tuple_usizeTransactionZ), "LDKCVec_C2Tuple_usizeTransactionZZ Elements"); + else + txdata_constr.data = NULL; + int64_t* txdata_vals = txdata->elems; + for (size_t c = 0; c < txdata_constr.datalen; c++) { + int64_t txdata_conv_28 = txdata_vals[c]; + void* txdata_conv_28_ptr = untag_ptr(txdata_conv_28); + CHECK_ACCESS(txdata_conv_28_ptr); + LDKC2Tuple_usizeTransactionZ txdata_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(txdata_conv_28_ptr); + txdata_conv_28_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)untag_ptr(txdata_conv_28)); + txdata_constr.data[c] = txdata_conv_28_conv; + } + FREE(txdata); + void* broadcaster_ptr = untag_ptr(broadcaster); + CHECK_ACCESS(broadcaster_ptr); + LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(broadcaster_ptr); + if (broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKBroadcasterInterface_JCalls_cloned(&broadcaster_conv); + } + void* fee_estimator_ptr = untag_ptr(fee_estimator); + CHECK_ACCESS(fee_estimator_ptr); + LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(fee_estimator_ptr); + if (fee_estimator_conv.free == LDKFeeEstimator_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFeeEstimator_JCalls_cloned(&fee_estimator_conv); + } + void* logger_ptr = untag_ptr(logger); + if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); } + LDKLogger* logger_conv = (LDKLogger*)logger_ptr; + LDKCVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_block_connected(&this_arg_conv, header_ref, txdata_constr, height, broadcaster_conv, fee_estimator_conv, logger_conv); + int64_tArray ret_arr = NULL; + ret_arr = init_int64_tArray(ret_var.datalen, __LINE__); + int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8); + for (size_t x = 0; x < ret_var.datalen; x++) { + LDKC2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ* ret_conv_49_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ"); + *ret_conv_49_conv = ret_var.data[x]; + ret_arr_ptr[x] = tag_ptr(ret_conv_49_conv, true); } FREE(ret_var.data); return ret_arr; } -int64_tArray CS_LDK_ChannelMonitor_block_connected(int64_t this_arg, int8_tArray header, int64_tArray txdata, int32_t height, int64_t broadcaster, int64_t fee_estimator, int64_t logger) { - LDKChannelMonitor this_arg_conv; - this_arg_conv.inner = untag_ptr(this_arg); - this_arg_conv.is_owned = ptr_is_owned(this_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv.is_owned = false; - uint8_t header_arr[80]; - CHECK(header->arr_len == 80); - memcpy(header_arr, header->elems, 80); FREE(header); - uint8_t (*header_ref)[80] = &header_arr; - LDKCVec_C2Tuple_usizeTransactionZZ txdata_constr; - txdata_constr.datalen = txdata->arr_len; - if (txdata_constr.datalen > 0) - txdata_constr.data = MALLOC(txdata_constr.datalen * sizeof(LDKC2Tuple_usizeTransactionZ), "LDKCVec_C2Tuple_usizeTransactionZZ Elements"); - else - txdata_constr.data = NULL; - int64_t* txdata_vals = txdata->elems; - for (size_t c = 0; c < txdata_constr.datalen; c++) { - int64_t txdata_conv_28 = txdata_vals[c]; - void* txdata_conv_28_ptr = untag_ptr(txdata_conv_28); - CHECK_ACCESS(txdata_conv_28_ptr); - LDKC2Tuple_usizeTransactionZ txdata_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(txdata_conv_28_ptr); - txdata_conv_28_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)untag_ptr(txdata_conv_28)); - txdata_constr.data[c] = txdata_conv_28_conv; - } - FREE(txdata); - void* broadcaster_ptr = untag_ptr(broadcaster); - CHECK_ACCESS(broadcaster_ptr); - LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(broadcaster_ptr); - if (broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) { - // If this_arg is a JCalls struct, then we need to increment the refcnt in it. - LDKBroadcasterInterface_JCalls_cloned(&broadcaster_conv); - } - void* fee_estimator_ptr = untag_ptr(fee_estimator); - CHECK_ACCESS(fee_estimator_ptr); - LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(fee_estimator_ptr); - if (fee_estimator_conv.free == LDKFeeEstimator_JCalls_free) { - // If this_arg is a JCalls struct, then we need to increment the refcnt in it. - LDKFeeEstimator_JCalls_cloned(&fee_estimator_conv); - } - void* logger_ptr = untag_ptr(logger); - if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); } - LDKLogger* logger_conv = (LDKLogger*)logger_ptr; - LDKCVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_block_connected(&this_arg_conv, header_ref, txdata_constr, height, broadcaster_conv, fee_estimator_conv, logger_conv); - int64_tArray ret_arr = NULL; - ret_arr = init_int64_tArray(ret_var.datalen, __LINE__); - int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8); - for (size_t x = 0; x < ret_var.datalen; x++) { - LDKC2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ* ret_conv_49_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ"); - *ret_conv_49_conv = ret_var.data[x]; - ret_arr_ptr[x] = tag_ptr(ret_conv_49_conv, true); - } - - FREE(ret_var.data); - return ret_arr; -} - -void CS_LDK_ChannelMonitor_block_disconnected(int64_t this_arg, int8_tArray header, int32_t height, int64_t broadcaster, int64_t fee_estimator, int64_t logger) { - LDKChannelMonitor this_arg_conv; - this_arg_conv.inner = untag_ptr(this_arg); - this_arg_conv.is_owned = ptr_is_owned(this_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv.is_owned = false; - uint8_t header_arr[80]; - CHECK(header->arr_len == 80); - memcpy(header_arr, header->elems, 80); FREE(header); - uint8_t (*header_ref)[80] = &header_arr; - void* broadcaster_ptr = untag_ptr(broadcaster); - CHECK_ACCESS(broadcaster_ptr); - LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(broadcaster_ptr); - if (broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) { - // If this_arg is a JCalls struct, then we need to increment the refcnt in it. - LDKBroadcasterInterface_JCalls_cloned(&broadcaster_conv); - } - void* fee_estimator_ptr = untag_ptr(fee_estimator); - CHECK_ACCESS(fee_estimator_ptr); - LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(fee_estimator_ptr); - if (fee_estimator_conv.free == LDKFeeEstimator_JCalls_free) { - // If this_arg is a JCalls struct, then we need to increment the refcnt in it. - LDKFeeEstimator_JCalls_cloned(&fee_estimator_conv); - } - void* logger_ptr = untag_ptr(logger); - if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); } - LDKLogger* logger_conv = (LDKLogger*)logger_ptr; - ChannelMonitor_block_disconnected(&this_arg_conv, header_ref, height, broadcaster_conv, fee_estimator_conv, logger_conv); -} - -int64_tArray CS_LDK_ChannelMonitor_transactions_confirmed(int64_t this_arg, int8_tArray header, int64_tArray txdata, int32_t height, int64_t broadcaster, int64_t fee_estimator, int64_t logger) { +void CS_LDK_ChannelMonitor_block_disconnected(int64_t this_arg, int8_tArray header, int32_t height, int64_t broadcaster, int64_t fee_estimator, int64_t logger) { + LDKChannelMonitor this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + uint8_t header_arr[80]; + CHECK(header->arr_len == 80); + memcpy(header_arr, header->elems, 80); FREE(header); + uint8_t (*header_ref)[80] = &header_arr; + void* broadcaster_ptr = untag_ptr(broadcaster); + CHECK_ACCESS(broadcaster_ptr); + LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(broadcaster_ptr); + if (broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKBroadcasterInterface_JCalls_cloned(&broadcaster_conv); + } + void* fee_estimator_ptr = untag_ptr(fee_estimator); + CHECK_ACCESS(fee_estimator_ptr); + LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(fee_estimator_ptr); + if (fee_estimator_conv.free == LDKFeeEstimator_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFeeEstimator_JCalls_cloned(&fee_estimator_conv); + } + void* logger_ptr = untag_ptr(logger); + if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); } + LDKLogger* logger_conv = (LDKLogger*)logger_ptr; + ChannelMonitor_block_disconnected(&this_arg_conv, header_ref, height, broadcaster_conv, fee_estimator_conv, logger_conv); +} + +int64_tArray CS_LDK_ChannelMonitor_transactions_confirmed(int64_t this_arg, int8_tArray header, int64_tArray txdata, int32_t height, int64_t broadcaster, int64_t fee_estimator, int64_t logger) { LDKChannelMonitor this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); @@ -36051,6 +39920,32 @@ void CS_LDK_ChannelMonitor_rebroadcast_pending_claims(int64_t this_arg, int64_t ChannelMonitor_rebroadcast_pending_claims(&this_arg_conv, broadcaster_conv, fee_estimator_conv, logger_conv); } +void CS_LDK_ChannelMonitor_signer_unblocked(int64_t this_arg, int64_t broadcaster, int64_t fee_estimator, int64_t logger) { + LDKChannelMonitor this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + void* broadcaster_ptr = untag_ptr(broadcaster); + CHECK_ACCESS(broadcaster_ptr); + LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(broadcaster_ptr); + if (broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKBroadcasterInterface_JCalls_cloned(&broadcaster_conv); + } + void* fee_estimator_ptr = untag_ptr(fee_estimator); + CHECK_ACCESS(fee_estimator_ptr); + LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(fee_estimator_ptr); + if (fee_estimator_conv.free == LDKFeeEstimator_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFeeEstimator_JCalls_cloned(&fee_estimator_conv); + } + void* logger_ptr = untag_ptr(logger); + if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); } + LDKLogger* logger_conv = (LDKLogger*)logger_ptr; + ChannelMonitor_signer_unblocked(&this_arg_conv, broadcaster_conv, fee_estimator_conv, logger_conv); +} + int64_tArray CS_LDK_ChannelMonitor_get_spendable_outputs(int64_t this_arg, int8_tArray tx, int32_t confirmation_height) { LDKChannelMonitor this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -36077,6 +39972,19 @@ int64_tArray CS_LDK_ChannelMonitor_get_spendable_outputs(int64_t this_arg, int8 return ret_arr; } +jboolean CS_LDK_ChannelMonitor_is_fully_resolved(int64_t this_arg, int64_t logger) { + LDKChannelMonitor this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + void* logger_ptr = untag_ptr(logger); + if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); } + LDKLogger* logger_conv = (LDKLogger*)logger_ptr; + jboolean ret_conv = ChannelMonitor_is_fully_resolved(&this_arg_conv, logger_conv); + return ret_conv; +} + int64_tArray CS_LDK_ChannelMonitor_get_claimable_balances(int64_t this_arg) { LDKChannelMonitor this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -36230,17 +40138,6 @@ int64_t CS_LDK_OutPoint_hash(int64_t o) { return ret_conv; } -int8_tArray CS_LDK_OutPoint_to_channel_id(int64_t this_arg) { - LDKOutPoint this_arg_conv; - this_arg_conv.inner = untag_ptr(this_arg); - this_arg_conv.is_owned = ptr_is_owned(this_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, OutPoint_to_channel_id(&this_arg_conv).data, 32); - return ret_arr; -} - int8_tArray CS_LDK_OutPoint_write(int64_t obj) { LDKOutPoint obj_conv; obj_conv.inner = untag_ptr(obj); @@ -36352,6 +40249,61 @@ int64_t CS_LDK_InboundHTLCErr_new(int16_t err_code_arg, int8_tArray err_data_ar return ret_ref; } +static inline uint64_t InboundHTLCErr_clone_ptr(LDKInboundHTLCErr *NONNULL_PTR arg) { + LDKInboundHTLCErr ret_var = InboundHTLCErr_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t CS_LDK_InboundHTLCErr_clone_ptr(int64_t arg) { + LDKInboundHTLCErr arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = InboundHTLCErr_clone_ptr(&arg_conv); + return ret_conv; +} + +int64_t CS_LDK_InboundHTLCErr_clone(int64_t orig) { + LDKInboundHTLCErr orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKInboundHTLCErr ret_var = InboundHTLCErr_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_InboundHTLCErr_hash(int64_t o) { + LDKInboundHTLCErr o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = InboundHTLCErr_hash(&o_conv); + return ret_conv; +} + +jboolean CS_LDK_InboundHTLCErr_eq(int64_t a, int64_t b) { + LDKInboundHTLCErr a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKInboundHTLCErr b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = InboundHTLCErr_eq(&a_conv, &b_conv); + return ret_conv; +} + int64_t CS_LDK_peel_payment_onion(int64_t msg, int64_t node_signer, int64_t logger, int32_t cur_height, jboolean accept_mpp_keysend, jboolean allow_skimmed_fees) { LDKUpdateAddHTLC msg_conv; msg_conv.inner = untag_ptr(msg); @@ -36415,7 +40367,7 @@ int64_t CS_LDK_PendingHTLCRouting_forward(int64_t onion_packet, int64_t short_c return ret_ref; } -int64_t CS_LDK_PendingHTLCRouting_receive(int64_t payment_data, int64_t payment_metadata, int32_t incoming_cltv_expiry, int8_tArray phantom_shared_secret, int64_tArray custom_tlvs, jboolean requires_blinded_error) { +int64_t CS_LDK_PendingHTLCRouting_receive(int64_t payment_data, int64_t payment_metadata, int64_t payment_context, int32_t incoming_cltv_expiry, int8_tArray phantom_shared_secret, int64_tArray custom_tlvs, jboolean requires_blinded_error) { LDKFinalOnionHopData payment_data_conv; payment_data_conv.inner = untag_ptr(payment_data); payment_data_conv.is_owned = ptr_is_owned(payment_data); @@ -36425,6 +40377,10 @@ int64_t CS_LDK_PendingHTLCRouting_receive(int64_t payment_data, int64_t payment CHECK_ACCESS(payment_metadata_ptr); LDKCOption_CVec_u8ZZ payment_metadata_conv = *(LDKCOption_CVec_u8ZZ*)(payment_metadata_ptr); payment_metadata_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(payment_metadata)); + void* payment_context_ptr = untag_ptr(payment_context); + CHECK_ACCESS(payment_context_ptr); + LDKCOption_PaymentContextZ payment_context_conv = *(LDKCOption_PaymentContextZ*)(payment_context_ptr); + payment_context_conv = COption_PaymentContextZ_clone((LDKCOption_PaymentContextZ*)untag_ptr(payment_context)); LDKThirtyTwoBytes phantom_shared_secret_ref; CHECK(phantom_shared_secret->arr_len == 32); memcpy(phantom_shared_secret_ref.data, phantom_shared_secret->elems, 32); FREE(phantom_shared_secret); @@ -36445,12 +40401,12 @@ int64_t CS_LDK_PendingHTLCRouting_receive(int64_t payment_data, int64_t payment } FREE(custom_tlvs); LDKPendingHTLCRouting *ret_copy = MALLOC(sizeof(LDKPendingHTLCRouting), "LDKPendingHTLCRouting"); - *ret_copy = PendingHTLCRouting_receive(payment_data_conv, payment_metadata_conv, incoming_cltv_expiry, phantom_shared_secret_ref, custom_tlvs_constr, requires_blinded_error); + *ret_copy = PendingHTLCRouting_receive(payment_data_conv, payment_metadata_conv, payment_context_conv, incoming_cltv_expiry, phantom_shared_secret_ref, custom_tlvs_constr, requires_blinded_error); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -int64_t CS_LDK_PendingHTLCRouting_receive_keysend(int64_t payment_data, int8_tArray payment_preimage, int64_t payment_metadata, int32_t incoming_cltv_expiry, int64_tArray custom_tlvs) { +int64_t CS_LDK_PendingHTLCRouting_receive_keysend(int64_t payment_data, int8_tArray payment_preimage, int64_t payment_metadata, int32_t incoming_cltv_expiry, int64_tArray custom_tlvs, jboolean requires_blinded_error) { LDKFinalOnionHopData payment_data_conv; payment_data_conv.inner = untag_ptr(payment_data); payment_data_conv.is_owned = ptr_is_owned(payment_data); @@ -36480,7 +40436,7 @@ int64_t CS_LDK_PendingHTLCRouting_receive_keysend(int64_t payment_data, int8_tA } FREE(custom_tlvs); LDKPendingHTLCRouting *ret_copy = MALLOC(sizeof(LDKPendingHTLCRouting), "LDKPendingHTLCRouting"); - *ret_copy = PendingHTLCRouting_receive_keysend(payment_data_conv, payment_preimage_ref, payment_metadata_conv, incoming_cltv_expiry, custom_tlvs_constr); + *ret_copy = PendingHTLCRouting_receive_keysend(payment_data_conv, payment_preimage_ref, payment_metadata_conv, incoming_cltv_expiry, custom_tlvs_constr, requires_blinded_error); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -37347,27 +41303,31 @@ void CS_LDK_ChannelDetails_free(int64_t this_obj) { ChannelDetails_free(this_obj_conv); } -int8_tArray CS_LDK_ChannelDetails_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_ChannelDetails_get_channel_id(int64_t this_ptr) { LDKChannelDetails this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *ChannelDetails_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = ChannelDetails_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_ChannelDetails_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_ChannelDetails_set_channel_id(int64_t this_ptr, int64_t val) { LDKChannelDetails this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - ChannelDetails_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ChannelDetails_set_channel_id(&this_ptr_conv, val_conv); } int64_t CS_LDK_ChannelDetails_get_counterparty(int64_t this_ptr) { @@ -37966,83 +41926,6 @@ void CS_LDK_ChannelDetails_set_config(int64_t this_ptr, int64_t val) { ChannelDetails_set_config(&this_ptr_conv, val_conv); } -int64_t CS_LDK_ChannelDetails_new(int8_tArray channel_id_arg, int64_t counterparty_arg, int64_t funding_txo_arg, int64_t channel_type_arg, int64_t short_channel_id_arg, int64_t outbound_scid_alias_arg, int64_t inbound_scid_alias_arg, int64_t channel_value_satoshis_arg, int64_t unspendable_punishment_reserve_arg, int8_tArray user_channel_id_arg, int64_t feerate_sat_per_1000_weight_arg, int64_t balance_msat_arg, int64_t outbound_capacity_msat_arg, int64_t next_outbound_htlc_limit_msat_arg, int64_t next_outbound_htlc_minimum_msat_arg, int64_t inbound_capacity_msat_arg, int64_t confirmations_required_arg, int64_t confirmations_arg, int64_t force_close_spend_delay_arg, jboolean is_outbound_arg, jboolean is_channel_ready_arg, int64_t channel_shutdown_state_arg, jboolean is_usable_arg, jboolean is_public_arg, int64_t inbound_htlc_minimum_msat_arg, int64_t inbound_htlc_maximum_msat_arg, int64_t config_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); - LDKChannelCounterparty counterparty_arg_conv; - counterparty_arg_conv.inner = untag_ptr(counterparty_arg); - counterparty_arg_conv.is_owned = ptr_is_owned(counterparty_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(counterparty_arg_conv); - counterparty_arg_conv = ChannelCounterparty_clone(&counterparty_arg_conv); - LDKOutPoint funding_txo_arg_conv; - funding_txo_arg_conv.inner = untag_ptr(funding_txo_arg); - funding_txo_arg_conv.is_owned = ptr_is_owned(funding_txo_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_arg_conv); - funding_txo_arg_conv = OutPoint_clone(&funding_txo_arg_conv); - LDKChannelTypeFeatures channel_type_arg_conv; - channel_type_arg_conv.inner = untag_ptr(channel_type_arg); - channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv); - channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv); - void* short_channel_id_arg_ptr = untag_ptr(short_channel_id_arg); - CHECK_ACCESS(short_channel_id_arg_ptr); - LDKCOption_u64Z short_channel_id_arg_conv = *(LDKCOption_u64Z*)(short_channel_id_arg_ptr); - short_channel_id_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(short_channel_id_arg)); - void* outbound_scid_alias_arg_ptr = untag_ptr(outbound_scid_alias_arg); - CHECK_ACCESS(outbound_scid_alias_arg_ptr); - LDKCOption_u64Z outbound_scid_alias_arg_conv = *(LDKCOption_u64Z*)(outbound_scid_alias_arg_ptr); - outbound_scid_alias_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(outbound_scid_alias_arg)); - void* inbound_scid_alias_arg_ptr = untag_ptr(inbound_scid_alias_arg); - CHECK_ACCESS(inbound_scid_alias_arg_ptr); - LDKCOption_u64Z inbound_scid_alias_arg_conv = *(LDKCOption_u64Z*)(inbound_scid_alias_arg_ptr); - inbound_scid_alias_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(inbound_scid_alias_arg)); - void* unspendable_punishment_reserve_arg_ptr = untag_ptr(unspendable_punishment_reserve_arg); - CHECK_ACCESS(unspendable_punishment_reserve_arg_ptr); - LDKCOption_u64Z unspendable_punishment_reserve_arg_conv = *(LDKCOption_u64Z*)(unspendable_punishment_reserve_arg_ptr); - LDKU128 user_channel_id_arg_ref; - CHECK(user_channel_id_arg->arr_len == 16); - memcpy(user_channel_id_arg_ref.le_bytes, user_channel_id_arg->elems, 16); FREE(user_channel_id_arg); - void* feerate_sat_per_1000_weight_arg_ptr = untag_ptr(feerate_sat_per_1000_weight_arg); - CHECK_ACCESS(feerate_sat_per_1000_weight_arg_ptr); - LDKCOption_u32Z feerate_sat_per_1000_weight_arg_conv = *(LDKCOption_u32Z*)(feerate_sat_per_1000_weight_arg_ptr); - feerate_sat_per_1000_weight_arg_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(feerate_sat_per_1000_weight_arg)); - void* confirmations_required_arg_ptr = untag_ptr(confirmations_required_arg); - CHECK_ACCESS(confirmations_required_arg_ptr); - LDKCOption_u32Z confirmations_required_arg_conv = *(LDKCOption_u32Z*)(confirmations_required_arg_ptr); - confirmations_required_arg_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(confirmations_required_arg)); - void* confirmations_arg_ptr = untag_ptr(confirmations_arg); - CHECK_ACCESS(confirmations_arg_ptr); - LDKCOption_u32Z confirmations_arg_conv = *(LDKCOption_u32Z*)(confirmations_arg_ptr); - confirmations_arg_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(confirmations_arg)); - void* force_close_spend_delay_arg_ptr = untag_ptr(force_close_spend_delay_arg); - CHECK_ACCESS(force_close_spend_delay_arg_ptr); - LDKCOption_u16Z force_close_spend_delay_arg_conv = *(LDKCOption_u16Z*)(force_close_spend_delay_arg_ptr); - force_close_spend_delay_arg_conv = COption_u16Z_clone((LDKCOption_u16Z*)untag_ptr(force_close_spend_delay_arg)); - void* channel_shutdown_state_arg_ptr = untag_ptr(channel_shutdown_state_arg); - CHECK_ACCESS(channel_shutdown_state_arg_ptr); - LDKCOption_ChannelShutdownStateZ channel_shutdown_state_arg_conv = *(LDKCOption_ChannelShutdownStateZ*)(channel_shutdown_state_arg_ptr); - channel_shutdown_state_arg_conv = COption_ChannelShutdownStateZ_clone((LDKCOption_ChannelShutdownStateZ*)untag_ptr(channel_shutdown_state_arg)); - void* inbound_htlc_minimum_msat_arg_ptr = untag_ptr(inbound_htlc_minimum_msat_arg); - CHECK_ACCESS(inbound_htlc_minimum_msat_arg_ptr); - LDKCOption_u64Z inbound_htlc_minimum_msat_arg_conv = *(LDKCOption_u64Z*)(inbound_htlc_minimum_msat_arg_ptr); - inbound_htlc_minimum_msat_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(inbound_htlc_minimum_msat_arg)); - void* inbound_htlc_maximum_msat_arg_ptr = untag_ptr(inbound_htlc_maximum_msat_arg); - CHECK_ACCESS(inbound_htlc_maximum_msat_arg_ptr); - LDKCOption_u64Z inbound_htlc_maximum_msat_arg_conv = *(LDKCOption_u64Z*)(inbound_htlc_maximum_msat_arg_ptr); - inbound_htlc_maximum_msat_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(inbound_htlc_maximum_msat_arg)); - LDKChannelConfig config_arg_conv; - config_arg_conv.inner = untag_ptr(config_arg); - config_arg_conv.is_owned = ptr_is_owned(config_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(config_arg_conv); - config_arg_conv = ChannelConfig_clone(&config_arg_conv); - LDKChannelDetails ret_var = ChannelDetails_new(channel_id_arg_ref, counterparty_arg_conv, funding_txo_arg_conv, channel_type_arg_conv, short_channel_id_arg_conv, outbound_scid_alias_arg_conv, inbound_scid_alias_arg_conv, channel_value_satoshis_arg, unspendable_punishment_reserve_arg_conv, user_channel_id_arg_ref, feerate_sat_per_1000_weight_arg_conv, balance_msat_arg, outbound_capacity_msat_arg, next_outbound_htlc_limit_msat_arg, next_outbound_htlc_minimum_msat_arg, inbound_capacity_msat_arg, confirmations_required_arg_conv, confirmations_arg_conv, force_close_spend_delay_arg_conv, is_outbound_arg, is_channel_ready_arg, channel_shutdown_state_arg_conv, is_usable_arg, is_public_arg, inbound_htlc_minimum_msat_arg_conv, inbound_htlc_maximum_msat_arg_conv, config_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - static inline uint64_t ChannelDetails_clone_ptr(LDKChannelDetails *NONNULL_PTR arg) { LDKChannelDetails ret_var = ChannelDetails_clone(arg); int64_t ret_ref = 0; @@ -38469,16 +42352,17 @@ int64_t CS_LDK_ChannelManager_create_channel(int64_t this_arg, int8_tArray thei LDKU128 user_channel_id_ref; CHECK(user_channel_id->arr_len == 16); memcpy(user_channel_id_ref.le_bytes, user_channel_id->elems, 16); FREE(user_channel_id); - void* temporary_channel_id_ptr = untag_ptr(temporary_channel_id); - CHECK_ACCESS(temporary_channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ temporary_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(temporary_channel_id_ptr); - temporary_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(temporary_channel_id)); + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv = ChannelId_clone(&temporary_channel_id_conv); LDKUserConfig override_config_conv; override_config_conv.inner = untag_ptr(override_config); override_config_conv.is_owned = ptr_is_owned(override_config); CHECK_INNER_FIELD_ACCESS_OR_NULL(override_config_conv); override_config_conv = UserConfig_clone(&override_config_conv); - LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); + LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ"); *ret_conv = ChannelManager_create_channel(&this_arg_conv, their_network_key_ref, channel_value_satoshis, push_msat, user_channel_id_ref, temporary_channel_id_conv, override_config_conv); return tag_ptr(ret_conv, true); } @@ -38573,34 +42457,36 @@ int64_tArray CS_LDK_ChannelManager_list_recent_payments(int64_t this_arg) { return ret_arr; } -int64_t CS_LDK_ChannelManager_close_channel(int64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id) { +int64_t CS_LDK_ChannelManager_close_channel(int64_t this_arg, int64_t channel_id, int8_tArray counterparty_node_id) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t channel_id_arr[32]; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_arr, channel_id->elems, 32); FREE(channel_id); - uint8_t (*channel_id_ref)[32] = &channel_id_arr; + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_close_channel(&this_arg_conv, channel_id_ref, counterparty_node_id_ref); + *ret_conv = ChannelManager_close_channel(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref); return tag_ptr(ret_conv, true); } -int64_t CS_LDK_ChannelManager_close_channel_with_feerate_and_script(int64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id, int64_t target_feerate_sats_per_1000_weight, int64_t shutdown_script) { +int64_t CS_LDK_ChannelManager_close_channel_with_feerate_and_script(int64_t this_arg, int64_t channel_id, int8_tArray counterparty_node_id, int64_t target_feerate_sats_per_1000_weight, int64_t shutdown_script) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t channel_id_arr[32]; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_arr, channel_id->elems, 32); FREE(channel_id); - uint8_t (*channel_id_ref)[32] = &channel_id_arr; + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); @@ -38614,43 +42500,45 @@ int64_t CS_LDK_ChannelManager_close_channel_with_feerate_and_script(int64_t thi CHECK_INNER_FIELD_ACCESS_OR_NULL(shutdown_script_conv); shutdown_script_conv = ShutdownScript_clone(&shutdown_script_conv); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_close_channel_with_feerate_and_script(&this_arg_conv, channel_id_ref, counterparty_node_id_ref, target_feerate_sats_per_1000_weight_conv, shutdown_script_conv); + *ret_conv = ChannelManager_close_channel_with_feerate_and_script(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref, target_feerate_sats_per_1000_weight_conv, shutdown_script_conv); return tag_ptr(ret_conv, true); } -int64_t CS_LDK_ChannelManager_force_close_broadcasting_latest_txn(int64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id) { +int64_t CS_LDK_ChannelManager_force_close_broadcasting_latest_txn(int64_t this_arg, int64_t channel_id, int8_tArray counterparty_node_id) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t channel_id_arr[32]; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_arr, channel_id->elems, 32); FREE(channel_id); - uint8_t (*channel_id_ref)[32] = &channel_id_arr; + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_force_close_broadcasting_latest_txn(&this_arg_conv, channel_id_ref, counterparty_node_id_ref); + *ret_conv = ChannelManager_force_close_broadcasting_latest_txn(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref); return tag_ptr(ret_conv, true); } -int64_t CS_LDK_ChannelManager_force_close_without_broadcasting_txn(int64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id) { +int64_t CS_LDK_ChannelManager_force_close_without_broadcasting_txn(int64_t this_arg, int64_t channel_id, int8_tArray counterparty_node_id) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t channel_id_arr[32]; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_arr, channel_id->elems, 32); FREE(channel_id); - uint8_t (*channel_id_ref)[32] = &channel_id_arr; + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_force_close_without_broadcasting_txn(&this_arg_conv, channel_id_ref, counterparty_node_id_ref); + *ret_conv = ChannelManager_force_close_without_broadcasting_txn(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref); return tag_ptr(ret_conv, true); } @@ -38856,16 +42744,17 @@ int64_t CS_LDK_ChannelManager_send_preflight_probes(int64_t this_arg, int64_t r return tag_ptr(ret_conv, true); } -int64_t CS_LDK_ChannelManager_funding_transaction_generated(int64_t this_arg, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray funding_transaction) { +int64_t CS_LDK_ChannelManager_funding_transaction_generated(int64_t this_arg, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray funding_transaction) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t temporary_channel_id_arr[32]; - CHECK(temporary_channel_id->arr_len == 32); - memcpy(temporary_channel_id_arr, temporary_channel_id->elems, 32); FREE(temporary_channel_id); - uint8_t (*temporary_channel_id_ref)[32] = &temporary_channel_id_arr; + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); @@ -38875,7 +42764,7 @@ int64_t CS_LDK_ChannelManager_funding_transaction_generated(int64_t this_arg, i memcpy(funding_transaction_ref.data, funding_transaction->elems, funding_transaction_ref.datalen); FREE(funding_transaction); funding_transaction_ref.data_is_owned = true; LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_funding_transaction_generated(&this_arg_conv, temporary_channel_id_ref, counterparty_node_id_ref, funding_transaction_ref); + *ret_conv = ChannelManager_funding_transaction_generated(&this_arg_conv, &temporary_channel_id_conv, counterparty_node_id_ref, funding_transaction_ref); return tag_ptr(ret_conv, true); } @@ -38885,20 +42774,20 @@ int64_t CS_LDK_ChannelManager_batch_funding_transaction_generated(int64_t this_ this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ temporary_channels_constr; + LDKCVec_C2Tuple_ChannelIdPublicKeyZZ temporary_channels_constr; temporary_channels_constr.datalen = temporary_channels->arr_len; if (temporary_channels_constr.datalen > 0) - temporary_channels_constr.data = MALLOC(temporary_channels_constr.datalen * sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ Elements"); + temporary_channels_constr.data = MALLOC(temporary_channels_constr.datalen * sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKCVec_C2Tuple_ChannelIdPublicKeyZZ Elements"); else temporary_channels_constr.data = NULL; int64_t* temporary_channels_vals = temporary_channels->elems; - for (size_t j = 0; j < temporary_channels_constr.datalen; j++) { - int64_t temporary_channels_conv_35 = temporary_channels_vals[j]; - void* temporary_channels_conv_35_ptr = untag_ptr(temporary_channels_conv_35); - CHECK_ACCESS(temporary_channels_conv_35_ptr); - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ temporary_channels_conv_35_conv = *(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)(temporary_channels_conv_35_ptr); - temporary_channels_conv_35_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone((LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(temporary_channels_conv_35)); - temporary_channels_constr.data[j] = temporary_channels_conv_35_conv; + for (size_t e = 0; e < temporary_channels_constr.datalen; e++) { + int64_t temporary_channels_conv_30 = temporary_channels_vals[e]; + void* temporary_channels_conv_30_ptr = untag_ptr(temporary_channels_conv_30); + CHECK_ACCESS(temporary_channels_conv_30_ptr); + LDKC2Tuple_ChannelIdPublicKeyZ temporary_channels_conv_30_conv = *(LDKC2Tuple_ChannelIdPublicKeyZ*)(temporary_channels_conv_30_ptr); + temporary_channels_conv_30_conv = C2Tuple_ChannelIdPublicKeyZ_clone((LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(temporary_channels_conv_30)); + temporary_channels_constr.data[e] = temporary_channels_conv_30_conv; } FREE(temporary_channels); LDKTransaction funding_transaction_ref; @@ -38911,7 +42800,7 @@ int64_t CS_LDK_ChannelManager_batch_funding_transaction_generated(int64_t this_ return tag_ptr(ret_conv, true); } -int64_t CS_LDK_ChannelManager_update_partial_channel_config(int64_t this_arg, int8_tArray counterparty_node_id, ptrArray channel_ids, int64_t config_update) { +int64_t CS_LDK_ChannelManager_update_partial_channel_config(int64_t this_arg, int8_tArray counterparty_node_id, int64_tArray channel_ids, int64_t config_update) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); @@ -38920,19 +42809,21 @@ int64_t CS_LDK_ChannelManager_update_partial_channel_config(int64_t this_arg, i LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); - LDKCVec_ThirtyTwoBytesZ channel_ids_constr; + LDKCVec_ChannelIdZ channel_ids_constr; channel_ids_constr.datalen = channel_ids->arr_len; if (channel_ids_constr.datalen > 0) - channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKThirtyTwoBytes), "LDKCVec_ThirtyTwoBytesZ Elements"); + channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKChannelId), "LDKCVec_ChannelIdZ Elements"); else channel_ids_constr.data = NULL; - int8_tArray* channel_ids_vals = (void*) channel_ids->elems; - for (size_t i = 0; i < channel_ids_constr.datalen; i++) { - int8_tArray channel_ids_conv_8 = channel_ids_vals[i]; - LDKThirtyTwoBytes channel_ids_conv_8_ref; - CHECK(channel_ids_conv_8->arr_len == 32); - memcpy(channel_ids_conv_8_ref.data, channel_ids_conv_8->elems, 32); FREE(channel_ids_conv_8); - channel_ids_constr.data[i] = channel_ids_conv_8_ref; + int64_t* channel_ids_vals = channel_ids->elems; + for (size_t l = 0; l < channel_ids_constr.datalen; l++) { + int64_t channel_ids_conv_11 = channel_ids_vals[l]; + LDKChannelId channel_ids_conv_11_conv; + channel_ids_conv_11_conv.inner = untag_ptr(channel_ids_conv_11); + channel_ids_conv_11_conv.is_owned = ptr_is_owned(channel_ids_conv_11); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_ids_conv_11_conv); + channel_ids_conv_11_conv = ChannelId_clone(&channel_ids_conv_11_conv); + channel_ids_constr.data[l] = channel_ids_conv_11_conv; } FREE(channel_ids); LDKChannelConfigUpdate config_update_conv; @@ -38945,7 +42836,7 @@ int64_t CS_LDK_ChannelManager_update_partial_channel_config(int64_t this_arg, i return tag_ptr(ret_conv, true); } -int64_t CS_LDK_ChannelManager_update_channel_config(int64_t this_arg, int8_tArray counterparty_node_id, ptrArray channel_ids, int64_t config) { +int64_t CS_LDK_ChannelManager_update_channel_config(int64_t this_arg, int8_tArray counterparty_node_id, int64_tArray channel_ids, int64_t config) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); @@ -38954,19 +42845,21 @@ int64_t CS_LDK_ChannelManager_update_channel_config(int64_t this_arg, int8_tArr LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); - LDKCVec_ThirtyTwoBytesZ channel_ids_constr; + LDKCVec_ChannelIdZ channel_ids_constr; channel_ids_constr.datalen = channel_ids->arr_len; if (channel_ids_constr.datalen > 0) - channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKThirtyTwoBytes), "LDKCVec_ThirtyTwoBytesZ Elements"); + channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKChannelId), "LDKCVec_ChannelIdZ Elements"); else channel_ids_constr.data = NULL; - int8_tArray* channel_ids_vals = (void*) channel_ids->elems; - for (size_t i = 0; i < channel_ids_constr.datalen; i++) { - int8_tArray channel_ids_conv_8 = channel_ids_vals[i]; - LDKThirtyTwoBytes channel_ids_conv_8_ref; - CHECK(channel_ids_conv_8->arr_len == 32); - memcpy(channel_ids_conv_8_ref.data, channel_ids_conv_8->elems, 32); FREE(channel_ids_conv_8); - channel_ids_constr.data[i] = channel_ids_conv_8_ref; + int64_t* channel_ids_vals = channel_ids->elems; + for (size_t l = 0; l < channel_ids_constr.datalen; l++) { + int64_t channel_ids_conv_11 = channel_ids_vals[l]; + LDKChannelId channel_ids_conv_11_conv; + channel_ids_conv_11_conv.inner = untag_ptr(channel_ids_conv_11); + channel_ids_conv_11_conv.is_owned = ptr_is_owned(channel_ids_conv_11); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_ids_conv_11_conv); + channel_ids_conv_11_conv = ChannelId_clone(&channel_ids_conv_11_conv); + channel_ids_constr.data[l] = channel_ids_conv_11_conv; } FREE(channel_ids); LDKChannelConfig config_conv; @@ -38979,7 +42872,7 @@ int64_t CS_LDK_ChannelManager_update_channel_config(int64_t this_arg, int8_tArr return tag_ptr(ret_conv, true); } -int64_t CS_LDK_ChannelManager_forward_intercepted_htlc(int64_t this_arg, int8_tArray intercept_id, int8_tArray next_hop_channel_id, int8_tArray next_node_id, int64_t amt_to_forward_msat) { +int64_t CS_LDK_ChannelManager_forward_intercepted_htlc(int64_t this_arg, int8_tArray intercept_id, int64_t next_hop_channel_id, int8_tArray next_node_id, int64_t amt_to_forward_msat) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); @@ -38988,15 +42881,16 @@ int64_t CS_LDK_ChannelManager_forward_intercepted_htlc(int64_t this_arg, int8_t LDKThirtyTwoBytes intercept_id_ref; CHECK(intercept_id->arr_len == 32); memcpy(intercept_id_ref.data, intercept_id->elems, 32); FREE(intercept_id); - uint8_t next_hop_channel_id_arr[32]; - CHECK(next_hop_channel_id->arr_len == 32); - memcpy(next_hop_channel_id_arr, next_hop_channel_id->elems, 32); FREE(next_hop_channel_id); - uint8_t (*next_hop_channel_id_ref)[32] = &next_hop_channel_id_arr; + LDKChannelId next_hop_channel_id_conv; + next_hop_channel_id_conv.inner = untag_ptr(next_hop_channel_id); + next_hop_channel_id_conv.is_owned = ptr_is_owned(next_hop_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(next_hop_channel_id_conv); + next_hop_channel_id_conv.is_owned = false; LDKPublicKey next_node_id_ref; CHECK(next_node_id->arr_len == 33); memcpy(next_node_id_ref.compressed_form, next_node_id->elems, 33); FREE(next_node_id); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_forward_intercepted_htlc(&this_arg_conv, intercept_id_ref, next_hop_channel_id_ref, next_node_id_ref, amt_to_forward_msat); + *ret_conv = ChannelManager_forward_intercepted_htlc(&this_arg_conv, intercept_id_ref, &next_hop_channel_id_conv, next_node_id_ref, amt_to_forward_msat); return tag_ptr(ret_conv, true); } @@ -39097,16 +42991,17 @@ int8_tArray CS_LDK_ChannelManager_get_our_node_id(int64_t this_arg) { return ret_arr; } -int64_t CS_LDK_ChannelManager_accept_inbound_channel(int64_t this_arg, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) { +int64_t CS_LDK_ChannelManager_accept_inbound_channel(int64_t this_arg, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t temporary_channel_id_arr[32]; - CHECK(temporary_channel_id->arr_len == 32); - memcpy(temporary_channel_id_arr, temporary_channel_id->elems, 32); FREE(temporary_channel_id); - uint8_t (*temporary_channel_id_ref)[32] = &temporary_channel_id_arr; + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); @@ -39114,20 +43009,21 @@ int64_t CS_LDK_ChannelManager_accept_inbound_channel(int64_t this_arg, int8_tAr CHECK(user_channel_id->arr_len == 16); memcpy(user_channel_id_ref.le_bytes, user_channel_id->elems, 16); FREE(user_channel_id); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_accept_inbound_channel(&this_arg_conv, temporary_channel_id_ref, counterparty_node_id_ref, user_channel_id_ref); + *ret_conv = ChannelManager_accept_inbound_channel(&this_arg_conv, &temporary_channel_id_conv, counterparty_node_id_ref, user_channel_id_ref); return tag_ptr(ret_conv, true); } -int64_t CS_LDK_ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(int64_t this_arg, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) { +int64_t CS_LDK_ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(int64_t this_arg, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t temporary_channel_id_arr[32]; - CHECK(temporary_channel_id->arr_len == 32); - memcpy(temporary_channel_id_arr, temporary_channel_id->elems, 32); FREE(temporary_channel_id); - uint8_t (*temporary_channel_id_ref)[32] = &temporary_channel_id_arr; + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); @@ -39135,7 +43031,40 @@ int64_t CS_LDK_ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(in CHECK(user_channel_id->arr_len == 16); memcpy(user_channel_id_ref.le_bytes, user_channel_id->elems, 16); FREE(user_channel_id); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(&this_arg_conv, temporary_channel_id_ref, counterparty_node_id_ref, user_channel_id_ref); + *ret_conv = ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(&this_arg_conv, &temporary_channel_id_conv, counterparty_node_id_ref, user_channel_id_ref); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_ChannelManager_create_offer_builder(int64_t this_arg) { + LDKChannelManager this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = ChannelManager_create_offer_builder(&this_arg_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_ChannelManager_create_refund_builder(int64_t this_arg, int64_t amount_msats, int64_t absolute_expiry, int8_tArray payment_id, int64_t retry_strategy, int64_t max_total_routing_fee_msat) { + LDKChannelManager this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKThirtyTwoBytes payment_id_ref; + CHECK(payment_id->arr_len == 32); + memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id); + void* retry_strategy_ptr = untag_ptr(retry_strategy); + CHECK_ACCESS(retry_strategy_ptr); + LDKRetry retry_strategy_conv = *(LDKRetry*)(retry_strategy_ptr); + retry_strategy_conv = Retry_clone((LDKRetry*)untag_ptr(retry_strategy)); + void* max_total_routing_fee_msat_ptr = untag_ptr(max_total_routing_fee_msat); + CHECK_ACCESS(max_total_routing_fee_msat_ptr); + LDKCOption_u64Z max_total_routing_fee_msat_conv = *(LDKCOption_u64Z*)(max_total_routing_fee_msat_ptr); + max_total_routing_fee_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(max_total_routing_fee_msat)); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = ChannelManager_create_refund_builder(&this_arg_conv, amount_msats, absolute_expiry, payment_id_ref, retry_strategy_conv, max_total_routing_fee_msat_conv); return tag_ptr(ret_conv, true); } @@ -39189,7 +43118,7 @@ int64_t CS_LDK_ChannelManager_request_refund_payment(int64_t this_arg, int64_t refund_conv.is_owned = ptr_is_owned(refund); CHECK_INNER_FIELD_ACCESS_OR_NULL(refund_conv); refund_conv.is_owned = false; - LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); *ret_conv = ChannelManager_request_refund_payment(&this_arg_conv, &refund_conv); return tag_ptr(ret_conv, true); } @@ -39452,6 +43381,17 @@ int64_t CS_LDK_ChannelManager_as_OffersMessageHandler(int64_t this_arg) { return tag_ptr(ret_ret, true); } +int64_t CS_LDK_ChannelManager_as_NodeIdLookUp(int64_t this_arg) { + LDKChannelManager this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKNodeIdLookUp* ret_ret = MALLOC(sizeof(LDKNodeIdLookUp), "LDKNodeIdLookUp"); + *ret_ret = ChannelManager_as_NodeIdLookUp(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + int64_t CS_LDK_provided_init_features(int64_t config) { LDKUserConfig config_conv; config_conv.inner = untag_ptr(config); @@ -40134,6 +44074,20 @@ int8_tArray CS_LDK_DelayedPaymentBasepoint_to_public_key(int64_t this_arg) { return ret_arr; } +int8_tArray CS_LDK_DelayedPaymentBasepoint_derive_add_tweak(int64_t this_arg, int8_tArray per_commitment_point) { + LDKDelayedPaymentBasepoint this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKPublicKey per_commitment_point_ref; + CHECK(per_commitment_point->arr_len == 33); + memcpy(per_commitment_point_ref.compressed_form, per_commitment_point->elems, 33); FREE(per_commitment_point); + int8_tArray ret_arr = init_int8_tArray(32, __LINE__); + memcpy(ret_arr->elems, DelayedPaymentBasepoint_derive_add_tweak(&this_arg_conv, per_commitment_point_ref).data, 32); + return ret_arr; +} + int8_tArray CS_LDK_DelayedPaymentBasepoint_write(int64_t obj) { LDKDelayedPaymentBasepoint obj_conv; obj_conv.inner = untag_ptr(obj); @@ -40414,6 +44368,20 @@ int8_tArray CS_LDK_HtlcBasepoint_to_public_key(int64_t this_arg) { return ret_arr; } +int8_tArray CS_LDK_HtlcBasepoint_derive_add_tweak(int64_t this_arg, int8_tArray per_commitment_point) { + LDKHtlcBasepoint this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKPublicKey per_commitment_point_ref; + CHECK(per_commitment_point->arr_len == 33); + memcpy(per_commitment_point_ref.compressed_form, per_commitment_point->elems, 33); FREE(per_commitment_point); + int8_tArray ret_arr = init_int8_tArray(32, __LINE__); + memcpy(ret_arr->elems, HtlcBasepoint_derive_add_tweak(&this_arg_conv, per_commitment_point_ref).data, 32); + return ret_arr; +} + int8_tArray CS_LDK_HtlcBasepoint_write(int64_t obj) { LDKHtlcBasepoint obj_conv; obj_conv.inner = untag_ptr(obj); @@ -40586,6 +44554,19 @@ int64_t CS_LDK_HtlcKey_read(int8_tArray ser) { return tag_ptr(ret_conv, true); } +int8_tArray CS_LDK_add_public_key_tweak(int8_tArray base_point, int8_tArray tweak) { + LDKPublicKey base_point_ref; + CHECK(base_point->arr_len == 33); + memcpy(base_point_ref.compressed_form, base_point->elems, 33); FREE(base_point); + uint8_t tweak_arr[32]; + CHECK(tweak->arr_len == 32); + memcpy(tweak_arr, tweak->elems, 32); FREE(tweak); + uint8_t (*tweak_ref)[32] = &tweak_arr; + int8_tArray ret_arr = init_int8_tArray(33, __LINE__); + memcpy(ret_arr->elems, add_public_key_tweak(base_point_ref, tweak_ref).compressed_form, 33); + return ret_arr; +} + void CS_LDK_RevocationBasepoint_free(int64_t this_obj) { LDKRevocationBasepoint this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -41007,6 +44988,13 @@ int64_t CS_LDK_DecodeError_unsupported_compression() { return ret_ref; } +int64_t CS_LDK_DecodeError_dangerous_value() { + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = DecodeError_dangerous_value(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + int64_t CS_LDK_DecodeError_hash(int64_t o) { LDKDecodeError* o_conv = (LDKDecodeError*)untag_ptr(o); int64_t ret_conv = DecodeError_hash(o_conv); @@ -41188,27 +45176,31 @@ void CS_LDK_ErrorMessage_free(int64_t this_obj) { ErrorMessage_free(this_obj_conv); } -int8_tArray CS_LDK_ErrorMessage_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_ErrorMessage_get_channel_id(int64_t this_ptr) { LDKErrorMessage this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *ErrorMessage_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = ErrorMessage_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_ErrorMessage_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_ErrorMessage_set_channel_id(int64_t this_ptr, int64_t val) { LDKErrorMessage this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - ErrorMessage_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ErrorMessage_set_channel_id(&this_ptr_conv, val_conv); } jstring CS_LDK_ErrorMessage_get_data(int64_t this_ptr) { @@ -41233,12 +45225,14 @@ void CS_LDK_ErrorMessage_set_data(int64_t this_ptr, jstring val) { ErrorMessage_set_data(&this_ptr_conv, val_conv); } -int64_t CS_LDK_ErrorMessage_new(int8_tArray channel_id_arg, jstring data_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_ErrorMessage_new(int64_t channel_id_arg, jstring data_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKStr data_arg_conv = str_ref_to_owned_c(data_arg); - LDKErrorMessage ret_var = ErrorMessage_new(channel_id_arg_ref, data_arg_conv); + LDKErrorMessage ret_var = ErrorMessage_new(channel_id_arg_conv, data_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -41308,27 +45302,31 @@ void CS_LDK_WarningMessage_free(int64_t this_obj) { WarningMessage_free(this_obj_conv); } -int8_tArray CS_LDK_WarningMessage_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_WarningMessage_get_channel_id(int64_t this_ptr) { LDKWarningMessage this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *WarningMessage_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = WarningMessage_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_WarningMessage_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_WarningMessage_set_channel_id(int64_t this_ptr, int64_t val) { LDKWarningMessage this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - WarningMessage_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + WarningMessage_set_channel_id(&this_ptr_conv, val_conv); } jstring CS_LDK_WarningMessage_get_data(int64_t this_ptr) { @@ -41353,12 +45351,14 @@ void CS_LDK_WarningMessage_set_data(int64_t this_ptr, jstring val) { WarningMessage_set_data(&this_ptr_conv, val_conv); } -int64_t CS_LDK_WarningMessage_new(int8_tArray channel_id_arg, jstring data_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_WarningMessage_new(int64_t channel_id_arg, jstring data_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKStr data_arg_conv = str_ref_to_owned_c(data_arg); - LDKWarningMessage ret_var = WarningMessage_new(channel_id_arg_ref, data_arg_conv); + LDKWarningMessage ret_var = WarningMessage_new(channel_id_arg_conv, data_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -41619,27 +45619,27 @@ jboolean CS_LDK_Pong_eq(int64_t a, int64_t b) { return ret_conv; } -void CS_LDK_OpenChannel_free(int64_t this_obj) { - LDKOpenChannel this_obj_conv; +void CS_LDK_CommonOpenChannelFields_free(int64_t this_obj) { + LDKCommonOpenChannelFields this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); this_obj_conv.is_owned = ptr_is_owned(this_obj); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - OpenChannel_free(this_obj_conv); + CommonOpenChannelFields_free(this_obj_conv); } -int8_tArray CS_LDK_OpenChannel_get_chain_hash(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +int8_tArray CS_LDK_CommonOpenChannelFields_get_chain_hash(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *OpenChannel_get_chain_hash(&this_ptr_conv), 32); + memcpy(ret_arr->elems, *CommonOpenChannelFields_get_chain_hash(&this_ptr_conv), 32); return ret_arr; } -void CS_LDK_OpenChannel_set_chain_hash(int64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_chain_hash(int64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -41647,769 +45647,182 @@ void CS_LDK_OpenChannel_set_chain_hash(int64_t this_ptr, int8_tArray val) { LDKThirtyTwoBytes val_ref; CHECK(val->arr_len == 32); memcpy(val_ref.data, val->elems, 32); FREE(val); - OpenChannel_set_chain_hash(&this_ptr_conv, val_ref); -} - -int8_tArray CS_LDK_OpenChannel_get_temporary_channel_id(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *OpenChannel_get_temporary_channel_id(&this_ptr_conv), 32); - return ret_arr; -} - -void CS_LDK_OpenChannel_set_temporary_channel_id(int64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - OpenChannel_set_temporary_channel_id(&this_ptr_conv, val_ref); -} - -int64_t CS_LDK_OpenChannel_get_funding_satoshis(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_funding_satoshis(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_OpenChannel_set_funding_satoshis(int64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannel_set_funding_satoshis(&this_ptr_conv, val); -} - -int64_t CS_LDK_OpenChannel_get_push_msat(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_push_msat(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_OpenChannel_set_push_msat(int64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannel_set_push_msat(&this_ptr_conv, val); -} - -int64_t CS_LDK_OpenChannel_get_dust_limit_satoshis(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_dust_limit_satoshis(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_OpenChannel_set_dust_limit_satoshis(int64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannel_set_dust_limit_satoshis(&this_ptr_conv, val); -} - -int64_t CS_LDK_OpenChannel_get_max_htlc_value_in_flight_msat(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_max_htlc_value_in_flight_msat(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_OpenChannel_set_max_htlc_value_in_flight_msat(int64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannel_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); -} - -int64_t CS_LDK_OpenChannel_get_channel_reserve_satoshis(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_channel_reserve_satoshis(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_OpenChannel_set_channel_reserve_satoshis(int64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannel_set_channel_reserve_satoshis(&this_ptr_conv, val); -} - -int64_t CS_LDK_OpenChannel_get_htlc_minimum_msat(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_htlc_minimum_msat(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_OpenChannel_set_htlc_minimum_msat(int64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannel_set_htlc_minimum_msat(&this_ptr_conv, val); -} - -int32_t CS_LDK_OpenChannel_get_feerate_per_kw(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int32_t ret_conv = OpenChannel_get_feerate_per_kw(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_OpenChannel_set_feerate_per_kw(int64_t this_ptr, int32_t val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannel_set_feerate_per_kw(&this_ptr_conv, val); -} - -int16_t CS_LDK_OpenChannel_get_to_self_delay(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int16_t ret_conv = OpenChannel_get_to_self_delay(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_OpenChannel_set_to_self_delay(int64_t this_ptr, int16_t val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannel_set_to_self_delay(&this_ptr_conv, val); -} - -int16_t CS_LDK_OpenChannel_get_max_accepted_htlcs(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int16_t ret_conv = OpenChannel_get_max_accepted_htlcs(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_OpenChannel_set_max_accepted_htlcs(int64_t this_ptr, int16_t val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannel_set_max_accepted_htlcs(&this_ptr_conv, val); -} - -int8_tArray CS_LDK_OpenChannel_get_funding_pubkey(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannel_get_funding_pubkey(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void CS_LDK_OpenChannel_set_funding_pubkey(int64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannel_set_funding_pubkey(&this_ptr_conv, val_ref); -} - -int8_tArray CS_LDK_OpenChannel_get_revocation_basepoint(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannel_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void CS_LDK_OpenChannel_set_revocation_basepoint(int64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannel_set_revocation_basepoint(&this_ptr_conv, val_ref); -} - -int8_tArray CS_LDK_OpenChannel_get_payment_point(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannel_get_payment_point(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void CS_LDK_OpenChannel_set_payment_point(int64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannel_set_payment_point(&this_ptr_conv, val_ref); -} - -int8_tArray CS_LDK_OpenChannel_get_delayed_payment_basepoint(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannel_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void CS_LDK_OpenChannel_set_delayed_payment_basepoint(int64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannel_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); -} - -int8_tArray CS_LDK_OpenChannel_get_htlc_basepoint(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannel_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void CS_LDK_OpenChannel_set_htlc_basepoint(int64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannel_set_htlc_basepoint(&this_ptr_conv, val_ref); -} - -int8_tArray CS_LDK_OpenChannel_get_first_per_commitment_point(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannel_get_first_per_commitment_point(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void CS_LDK_OpenChannel_set_first_per_commitment_point(int64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannel_set_first_per_commitment_point(&this_ptr_conv, val_ref); -} - -int8_t CS_LDK_OpenChannel_get_channel_flags(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_t ret_conv = OpenChannel_get_channel_flags(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_OpenChannel_set_channel_flags(int64_t this_ptr, int8_t val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannel_set_channel_flags(&this_ptr_conv, val); -} - -int64_t CS_LDK_OpenChannel_get_shutdown_scriptpubkey(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ"); - *ret_copy = OpenChannel_get_shutdown_scriptpubkey(&this_ptr_conv); - int64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -void CS_LDK_OpenChannel_set_shutdown_scriptpubkey(int64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - void* val_ptr = untag_ptr(val); - CHECK_ACCESS(val_ptr); - LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr); - val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val)); - OpenChannel_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); + CommonOpenChannelFields_set_chain_hash(&this_ptr_conv, val_ref); } -int64_t CS_LDK_OpenChannel_get_channel_type(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +int64_t CS_LDK_CommonOpenChannelFields_get_temporary_channel_id(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures ret_var = OpenChannel_get_channel_type(&this_ptr_conv); + LDKChannelId ret_var = CommonOpenChannelFields_get_temporary_channel_id(&this_ptr_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -void CS_LDK_OpenChannel_set_channel_type(int64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_temporary_channel_id(int64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures val_conv; + LDKChannelId val_conv; val_conv.inner = untag_ptr(val); val_conv.is_owned = ptr_is_owned(val); CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); - val_conv = ChannelTypeFeatures_clone(&val_conv); - OpenChannel_set_channel_type(&this_ptr_conv, val_conv); -} - -int64_t CS_LDK_OpenChannel_new(int8_tArray chain_hash_arg, int8_tArray temporary_channel_id_arg, int64_t funding_satoshis_arg, int64_t push_msat_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t channel_reserve_satoshis_arg, int64_t htlc_minimum_msat_arg, int32_t feerate_per_kw_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_point_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_t channel_flags_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg) { - LDKThirtyTwoBytes chain_hash_arg_ref; - CHECK(chain_hash_arg->arr_len == 32); - memcpy(chain_hash_arg_ref.data, chain_hash_arg->elems, 32); FREE(chain_hash_arg); - LDKThirtyTwoBytes temporary_channel_id_arg_ref; - CHECK(temporary_channel_id_arg->arr_len == 32); - memcpy(temporary_channel_id_arg_ref.data, temporary_channel_id_arg->elems, 32); FREE(temporary_channel_id_arg); - LDKPublicKey funding_pubkey_arg_ref; - CHECK(funding_pubkey_arg->arr_len == 33); - memcpy(funding_pubkey_arg_ref.compressed_form, funding_pubkey_arg->elems, 33); FREE(funding_pubkey_arg); - LDKPublicKey revocation_basepoint_arg_ref; - CHECK(revocation_basepoint_arg->arr_len == 33); - memcpy(revocation_basepoint_arg_ref.compressed_form, revocation_basepoint_arg->elems, 33); FREE(revocation_basepoint_arg); - LDKPublicKey payment_point_arg_ref; - CHECK(payment_point_arg->arr_len == 33); - memcpy(payment_point_arg_ref.compressed_form, payment_point_arg->elems, 33); FREE(payment_point_arg); - LDKPublicKey delayed_payment_basepoint_arg_ref; - CHECK(delayed_payment_basepoint_arg->arr_len == 33); - memcpy(delayed_payment_basepoint_arg_ref.compressed_form, delayed_payment_basepoint_arg->elems, 33); FREE(delayed_payment_basepoint_arg); - LDKPublicKey htlc_basepoint_arg_ref; - CHECK(htlc_basepoint_arg->arr_len == 33); - memcpy(htlc_basepoint_arg_ref.compressed_form, htlc_basepoint_arg->elems, 33); FREE(htlc_basepoint_arg); - LDKPublicKey first_per_commitment_point_arg_ref; - CHECK(first_per_commitment_point_arg->arr_len == 33); - memcpy(first_per_commitment_point_arg_ref.compressed_form, first_per_commitment_point_arg->elems, 33); FREE(first_per_commitment_point_arg); - void* shutdown_scriptpubkey_arg_ptr = untag_ptr(shutdown_scriptpubkey_arg); - CHECK_ACCESS(shutdown_scriptpubkey_arg_ptr); - LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg_conv = *(LDKCOption_CVec_u8ZZ*)(shutdown_scriptpubkey_arg_ptr); - shutdown_scriptpubkey_arg_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(shutdown_scriptpubkey_arg)); - LDKChannelTypeFeatures channel_type_arg_conv; - channel_type_arg_conv.inner = untag_ptr(channel_type_arg); - channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv); - channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv); - LDKOpenChannel ret_var = OpenChannel_new(chain_hash_arg_ref, temporary_channel_id_arg_ref, funding_satoshis_arg, push_msat_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, feerate_per_kw_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_point_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, channel_flags_arg, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -static inline uint64_t OpenChannel_clone_ptr(LDKOpenChannel *NONNULL_PTR arg) { - LDKOpenChannel ret_var = OpenChannel_clone(arg); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} -int64_t CS_LDK_OpenChannel_clone_ptr(int64_t arg) { - LDKOpenChannel arg_conv; - arg_conv.inner = untag_ptr(arg); - arg_conv.is_owned = ptr_is_owned(arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); - arg_conv.is_owned = false; - int64_t ret_conv = OpenChannel_clone_ptr(&arg_conv); - return ret_conv; -} - -int64_t CS_LDK_OpenChannel_clone(int64_t orig) { - LDKOpenChannel orig_conv; - orig_conv.inner = untag_ptr(orig); - orig_conv.is_owned = ptr_is_owned(orig); - CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); - orig_conv.is_owned = false; - LDKOpenChannel ret_var = OpenChannel_clone(&orig_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -int64_t CS_LDK_OpenChannel_hash(int64_t o) { - LDKOpenChannel o_conv; - o_conv.inner = untag_ptr(o); - o_conv.is_owned = ptr_is_owned(o); - CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); - o_conv.is_owned = false; - int64_t ret_conv = OpenChannel_hash(&o_conv); - return ret_conv; -} - -jboolean CS_LDK_OpenChannel_eq(int64_t a, int64_t b) { - LDKOpenChannel a_conv; - a_conv.inner = untag_ptr(a); - a_conv.is_owned = ptr_is_owned(a); - CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); - a_conv.is_owned = false; - LDKOpenChannel b_conv; - b_conv.inner = untag_ptr(b); - b_conv.is_owned = ptr_is_owned(b); - CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); - b_conv.is_owned = false; - jboolean ret_conv = OpenChannel_eq(&a_conv, &b_conv); - return ret_conv; -} - -void CS_LDK_OpenChannelV2_free(int64_t this_obj) { - LDKOpenChannelV2 this_obj_conv; - this_obj_conv.inner = untag_ptr(this_obj); - this_obj_conv.is_owned = ptr_is_owned(this_obj); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - OpenChannelV2_free(this_obj_conv); -} - -int8_tArray CS_LDK_OpenChannelV2_get_chain_hash(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *OpenChannelV2_get_chain_hash(&this_ptr_conv), 32); - return ret_arr; -} - -void CS_LDK_OpenChannelV2_set_chain_hash(int64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - OpenChannelV2_set_chain_hash(&this_ptr_conv, val_ref); -} - -int8_tArray CS_LDK_OpenChannelV2_get_temporary_channel_id(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *OpenChannelV2_get_temporary_channel_id(&this_ptr_conv), 32); - return ret_arr; -} - -void CS_LDK_OpenChannelV2_set_temporary_channel_id(int64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - OpenChannelV2_set_temporary_channel_id(&this_ptr_conv, val_ref); -} - -int32_t CS_LDK_OpenChannelV2_get_funding_feerate_sat_per_1000_weight(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int32_t ret_conv = OpenChannelV2_get_funding_feerate_sat_per_1000_weight(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_OpenChannelV2_set_funding_feerate_sat_per_1000_weight(int64_t this_ptr, int32_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_funding_feerate_sat_per_1000_weight(&this_ptr_conv, val); -} - -int32_t CS_LDK_OpenChannelV2_get_commitment_feerate_sat_per_1000_weight(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int32_t ret_conv = OpenChannelV2_get_commitment_feerate_sat_per_1000_weight(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_OpenChannelV2_set_commitment_feerate_sat_per_1000_weight(int64_t this_ptr, int32_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_commitment_feerate_sat_per_1000_weight(&this_ptr_conv, val); + val_conv = ChannelId_clone(&val_conv); + CommonOpenChannelFields_set_temporary_channel_id(&this_ptr_conv, val_conv); } -int64_t CS_LDK_OpenChannelV2_get_funding_satoshis(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; +int64_t CS_LDK_CommonOpenChannelFields_get_funding_satoshis(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannelV2_get_funding_satoshis(&this_ptr_conv); + int64_t ret_conv = CommonOpenChannelFields_get_funding_satoshis(&this_ptr_conv); return ret_conv; } -void CS_LDK_OpenChannelV2_set_funding_satoshis(int64_t this_ptr, int64_t val) { - LDKOpenChannelV2 this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_funding_satoshis(int64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannelV2_set_funding_satoshis(&this_ptr_conv, val); + CommonOpenChannelFields_set_funding_satoshis(&this_ptr_conv, val); } -int64_t CS_LDK_OpenChannelV2_get_dust_limit_satoshis(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; +int64_t CS_LDK_CommonOpenChannelFields_get_dust_limit_satoshis(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannelV2_get_dust_limit_satoshis(&this_ptr_conv); + int64_t ret_conv = CommonOpenChannelFields_get_dust_limit_satoshis(&this_ptr_conv); return ret_conv; } -void CS_LDK_OpenChannelV2_set_dust_limit_satoshis(int64_t this_ptr, int64_t val) { - LDKOpenChannelV2 this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_dust_limit_satoshis(int64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannelV2_set_dust_limit_satoshis(&this_ptr_conv, val); + CommonOpenChannelFields_set_dust_limit_satoshis(&this_ptr_conv, val); } -int64_t CS_LDK_OpenChannelV2_get_max_htlc_value_in_flight_msat(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; +int64_t CS_LDK_CommonOpenChannelFields_get_max_htlc_value_in_flight_msat(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannelV2_get_max_htlc_value_in_flight_msat(&this_ptr_conv); + int64_t ret_conv = CommonOpenChannelFields_get_max_htlc_value_in_flight_msat(&this_ptr_conv); return ret_conv; } -void CS_LDK_OpenChannelV2_set_max_htlc_value_in_flight_msat(int64_t this_ptr, int64_t val) { - LDKOpenChannelV2 this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_max_htlc_value_in_flight_msat(int64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannelV2_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); + CommonOpenChannelFields_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); } -int64_t CS_LDK_OpenChannelV2_get_htlc_minimum_msat(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; +int64_t CS_LDK_CommonOpenChannelFields_get_htlc_minimum_msat(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannelV2_get_htlc_minimum_msat(&this_ptr_conv); + int64_t ret_conv = CommonOpenChannelFields_get_htlc_minimum_msat(&this_ptr_conv); return ret_conv; } -void CS_LDK_OpenChannelV2_set_htlc_minimum_msat(int64_t this_ptr, int64_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_htlc_minimum_msat(&this_ptr_conv, val); -} - -int16_t CS_LDK_OpenChannelV2_get_to_self_delay(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int16_t ret_conv = OpenChannelV2_get_to_self_delay(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_OpenChannelV2_set_to_self_delay(int64_t this_ptr, int16_t val) { - LDKOpenChannelV2 this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_htlc_minimum_msat(int64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannelV2_set_to_self_delay(&this_ptr_conv, val); + CommonOpenChannelFields_set_htlc_minimum_msat(&this_ptr_conv, val); } -int16_t CS_LDK_OpenChannelV2_get_max_accepted_htlcs(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; +int32_t CS_LDK_CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int16_t ret_conv = OpenChannelV2_get_max_accepted_htlcs(&this_ptr_conv); + int32_t ret_conv = CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight(&this_ptr_conv); return ret_conv; } -void CS_LDK_OpenChannelV2_set_max_accepted_htlcs(int64_t this_ptr, int16_t val) { - LDKOpenChannelV2 this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight(int64_t this_ptr, int32_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannelV2_set_max_accepted_htlcs(&this_ptr_conv, val); + CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight(&this_ptr_conv, val); } -int32_t CS_LDK_OpenChannelV2_get_locktime(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; +int16_t CS_LDK_CommonOpenChannelFields_get_to_self_delay(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int32_t ret_conv = OpenChannelV2_get_locktime(&this_ptr_conv); + int16_t ret_conv = CommonOpenChannelFields_get_to_self_delay(&this_ptr_conv); return ret_conv; } -void CS_LDK_OpenChannelV2_set_locktime(int64_t this_ptr, int32_t val) { - LDKOpenChannelV2 this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_to_self_delay(int64_t this_ptr, int16_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannelV2_set_locktime(&this_ptr_conv, val); + CommonOpenChannelFields_set_to_self_delay(&this_ptr_conv, val); } -int8_tArray CS_LDK_OpenChannelV2_get_funding_pubkey(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; +int16_t CS_LDK_CommonOpenChannelFields_get_max_accepted_htlcs(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannelV2_get_funding_pubkey(&this_ptr_conv).compressed_form, 33); - return ret_arr; + int16_t ret_conv = CommonOpenChannelFields_get_max_accepted_htlcs(&this_ptr_conv); + return ret_conv; } -void CS_LDK_OpenChannelV2_set_funding_pubkey(int64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_max_accepted_htlcs(int64_t this_ptr, int16_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannelV2_set_funding_pubkey(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_max_accepted_htlcs(&this_ptr_conv, val); } -int8_tArray CS_LDK_OpenChannelV2_get_revocation_basepoint(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; +int8_tArray CS_LDK_CommonOpenChannelFields_get_funding_pubkey(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannelV2_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonOpenChannelFields_get_funding_pubkey(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void CS_LDK_OpenChannelV2_set_revocation_basepoint(int64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_funding_pubkey(int64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42417,22 +45830,22 @@ void CS_LDK_OpenChannelV2_set_revocation_basepoint(int64_t this_ptr, int8_tArra LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannelV2_set_revocation_basepoint(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_funding_pubkey(&this_ptr_conv, val_ref); } -int8_tArray CS_LDK_OpenChannelV2_get_payment_basepoint(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; +int8_tArray CS_LDK_CommonOpenChannelFields_get_revocation_basepoint(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannelV2_get_payment_basepoint(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonOpenChannelFields_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void CS_LDK_OpenChannelV2_set_payment_basepoint(int64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_revocation_basepoint(int64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42440,22 +45853,22 @@ void CS_LDK_OpenChannelV2_set_payment_basepoint(int64_t this_ptr, int8_tArray v LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannelV2_set_payment_basepoint(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_revocation_basepoint(&this_ptr_conv, val_ref); } -int8_tArray CS_LDK_OpenChannelV2_get_delayed_payment_basepoint(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; +int8_tArray CS_LDK_CommonOpenChannelFields_get_payment_basepoint(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannelV2_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonOpenChannelFields_get_payment_basepoint(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void CS_LDK_OpenChannelV2_set_delayed_payment_basepoint(int64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_payment_basepoint(int64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42463,22 +45876,22 @@ void CS_LDK_OpenChannelV2_set_delayed_payment_basepoint(int64_t this_ptr, int8_ LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannelV2_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_payment_basepoint(&this_ptr_conv, val_ref); } -int8_tArray CS_LDK_OpenChannelV2_get_htlc_basepoint(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; +int8_tArray CS_LDK_CommonOpenChannelFields_get_delayed_payment_basepoint(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannelV2_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonOpenChannelFields_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void CS_LDK_OpenChannelV2_set_htlc_basepoint(int64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_delayed_payment_basepoint(int64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42486,22 +45899,22 @@ void CS_LDK_OpenChannelV2_set_htlc_basepoint(int64_t this_ptr, int8_tArray val) LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannelV2_set_htlc_basepoint(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); } -int8_tArray CS_LDK_OpenChannelV2_get_first_per_commitment_point(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; +int8_tArray CS_LDK_CommonOpenChannelFields_get_htlc_basepoint(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannelV2_get_first_per_commitment_point(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonOpenChannelFields_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void CS_LDK_OpenChannelV2_set_first_per_commitment_point(int64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_htlc_basepoint(int64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42509,22 +45922,22 @@ void CS_LDK_OpenChannelV2_set_first_per_commitment_point(int64_t this_ptr, int8 LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannelV2_set_first_per_commitment_point(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_htlc_basepoint(&this_ptr_conv, val_ref); } -int8_tArray CS_LDK_OpenChannelV2_get_second_per_commitment_point(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; +int8_tArray CS_LDK_CommonOpenChannelFields_get_first_per_commitment_point(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannelV2_get_second_per_commitment_point(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonOpenChannelFields_get_first_per_commitment_point(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void CS_LDK_OpenChannelV2_set_second_per_commitment_point(int64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_first_per_commitment_point(int64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42532,42 +45945,42 @@ void CS_LDK_OpenChannelV2_set_second_per_commitment_point(int64_t this_ptr, int LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannelV2_set_second_per_commitment_point(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_first_per_commitment_point(&this_ptr_conv, val_ref); } -int8_t CS_LDK_OpenChannelV2_get_channel_flags(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; +int8_t CS_LDK_CommonOpenChannelFields_get_channel_flags(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_t ret_conv = OpenChannelV2_get_channel_flags(&this_ptr_conv); + int8_t ret_conv = CommonOpenChannelFields_get_channel_flags(&this_ptr_conv); return ret_conv; } -void CS_LDK_OpenChannelV2_set_channel_flags(int64_t this_ptr, int8_t val) { - LDKOpenChannelV2 this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_channel_flags(int64_t this_ptr, int8_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannelV2_set_channel_flags(&this_ptr_conv, val); + CommonOpenChannelFields_set_channel_flags(&this_ptr_conv, val); } -int64_t CS_LDK_OpenChannelV2_get_shutdown_scriptpubkey(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; +int64_t CS_LDK_CommonOpenChannelFields_get_shutdown_scriptpubkey(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ"); - *ret_copy = OpenChannelV2_get_shutdown_scriptpubkey(&this_ptr_conv); + *ret_copy = CommonOpenChannelFields_get_shutdown_scriptpubkey(&this_ptr_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -void CS_LDK_OpenChannelV2_set_shutdown_scriptpubkey(int64_t this_ptr, int64_t val) { - LDKOpenChannelV2 this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_shutdown_scriptpubkey(int64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42576,24 +45989,24 @@ void CS_LDK_OpenChannelV2_set_shutdown_scriptpubkey(int64_t this_ptr, int64_t v CHECK_ACCESS(val_ptr); LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr); val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val)); - OpenChannelV2_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); + CommonOpenChannelFields_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); } -int64_t CS_LDK_OpenChannelV2_get_channel_type(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; +int64_t CS_LDK_CommonOpenChannelFields_get_channel_type(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures ret_var = OpenChannelV2_get_channel_type(&this_ptr_conv); + LDKChannelTypeFeatures ret_var = CommonOpenChannelFields_get_channel_type(&this_ptr_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -void CS_LDK_OpenChannelV2_set_channel_type(int64_t this_ptr, int64_t val) { - LDKOpenChannelV2 this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_channel_type(int64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42603,36 +46016,18 @@ void CS_LDK_OpenChannelV2_set_channel_type(int64_t this_ptr, int64_t val) { val_conv.is_owned = ptr_is_owned(val); CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); val_conv = ChannelTypeFeatures_clone(&val_conv); - OpenChannelV2_set_channel_type(&this_ptr_conv, val_conv); -} - -int32_t CS_LDK_OpenChannelV2_get_require_confirmed_inputs(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int32_t ret_conv = LDKCOption_NoneZ_to_cs(OpenChannelV2_get_require_confirmed_inputs(&this_ptr_conv)); - return ret_conv; + CommonOpenChannelFields_set_channel_type(&this_ptr_conv, val_conv); } -void CS_LDK_OpenChannelV2_set_require_confirmed_inputs(int64_t this_ptr, int32_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKCOption_NoneZ val_conv = LDKCOption_NoneZ_from_cs(val); - OpenChannelV2_set_require_confirmed_inputs(&this_ptr_conv, val_conv); -} - -int64_t CS_LDK_OpenChannelV2_new(int8_tArray chain_hash_arg, int8_tArray temporary_channel_id_arg, int32_t funding_feerate_sat_per_1000_weight_arg, int32_t commitment_feerate_sat_per_1000_weight_arg, int64_t funding_satoshis_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int32_t locktime_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_tArray second_per_commitment_point_arg, int8_t channel_flags_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg, int32_t require_confirmed_inputs_arg) { +int64_t CS_LDK_CommonOpenChannelFields_new(int8_tArray chain_hash_arg, int64_t temporary_channel_id_arg, int64_t funding_satoshis_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int32_t commitment_feerate_sat_per_1000_weight_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_t channel_flags_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg) { LDKThirtyTwoBytes chain_hash_arg_ref; CHECK(chain_hash_arg->arr_len == 32); memcpy(chain_hash_arg_ref.data, chain_hash_arg->elems, 32); FREE(chain_hash_arg); - LDKThirtyTwoBytes temporary_channel_id_arg_ref; - CHECK(temporary_channel_id_arg->arr_len == 32); - memcpy(temporary_channel_id_arg_ref.data, temporary_channel_id_arg->elems, 32); FREE(temporary_channel_id_arg); + LDKChannelId temporary_channel_id_arg_conv; + temporary_channel_id_arg_conv.inner = untag_ptr(temporary_channel_id_arg); + temporary_channel_id_arg_conv.is_owned = ptr_is_owned(temporary_channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_arg_conv); + temporary_channel_id_arg_conv = ChannelId_clone(&temporary_channel_id_arg_conv); LDKPublicKey funding_pubkey_arg_ref; CHECK(funding_pubkey_arg->arr_len == 33); memcpy(funding_pubkey_arg_ref.compressed_form, funding_pubkey_arg->elems, 33); FREE(funding_pubkey_arg); @@ -42651,9 +46046,6 @@ int64_t CS_LDK_OpenChannelV2_new(int8_tArray chain_hash_arg, int8_tArray tempor LDKPublicKey first_per_commitment_point_arg_ref; CHECK(first_per_commitment_point_arg->arr_len == 33); memcpy(first_per_commitment_point_arg_ref.compressed_form, first_per_commitment_point_arg->elems, 33); FREE(first_per_commitment_point_arg); - LDKPublicKey second_per_commitment_point_arg_ref; - CHECK(second_per_commitment_point_arg->arr_len == 33); - memcpy(second_per_commitment_point_arg_ref.compressed_form, second_per_commitment_point_arg->elems, 33); FREE(second_per_commitment_point_arg); void* shutdown_scriptpubkey_arg_ptr = untag_ptr(shutdown_scriptpubkey_arg); CHECK_ACCESS(shutdown_scriptpubkey_arg_ptr); LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg_conv = *(LDKCOption_CVec_u8ZZ*)(shutdown_scriptpubkey_arg_ptr); @@ -42663,8 +46055,336 @@ int64_t CS_LDK_OpenChannelV2_new(int8_tArray chain_hash_arg, int8_tArray tempor channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv); channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv); + LDKCommonOpenChannelFields ret_var = CommonOpenChannelFields_new(chain_hash_arg_ref, temporary_channel_id_arg_conv, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, commitment_feerate_sat_per_1000_weight_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, channel_flags_arg, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t CommonOpenChannelFields_clone_ptr(LDKCommonOpenChannelFields *NONNULL_PTR arg) { + LDKCommonOpenChannelFields ret_var = CommonOpenChannelFields_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t CS_LDK_CommonOpenChannelFields_clone_ptr(int64_t arg) { + LDKCommonOpenChannelFields arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = CommonOpenChannelFields_clone_ptr(&arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CommonOpenChannelFields_clone(int64_t orig) { + LDKCommonOpenChannelFields orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKCommonOpenChannelFields ret_var = CommonOpenChannelFields_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_CommonOpenChannelFields_hash(int64_t o) { + LDKCommonOpenChannelFields o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = CommonOpenChannelFields_hash(&o_conv); + return ret_conv; +} + +jboolean CS_LDK_CommonOpenChannelFields_eq(int64_t a, int64_t b) { + LDKCommonOpenChannelFields a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKCommonOpenChannelFields b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = CommonOpenChannelFields_eq(&a_conv, &b_conv); + return ret_conv; +} + +void CS_LDK_OpenChannel_free(int64_t this_obj) { + LDKOpenChannel this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + OpenChannel_free(this_obj_conv); +} + +int64_t CS_LDK_OpenChannel_get_common_fields(int64_t this_ptr) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCommonOpenChannelFields ret_var = OpenChannel_get_common_fields(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void CS_LDK_OpenChannel_set_common_fields(int64_t this_ptr, int64_t val) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCommonOpenChannelFields val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = CommonOpenChannelFields_clone(&val_conv); + OpenChannel_set_common_fields(&this_ptr_conv, val_conv); +} + +int64_t CS_LDK_OpenChannel_get_push_msat(int64_t this_ptr) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int64_t ret_conv = OpenChannel_get_push_msat(&this_ptr_conv); + return ret_conv; +} + +void CS_LDK_OpenChannel_set_push_msat(int64_t this_ptr, int64_t val) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + OpenChannel_set_push_msat(&this_ptr_conv, val); +} + +int64_t CS_LDK_OpenChannel_get_channel_reserve_satoshis(int64_t this_ptr) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int64_t ret_conv = OpenChannel_get_channel_reserve_satoshis(&this_ptr_conv); + return ret_conv; +} + +void CS_LDK_OpenChannel_set_channel_reserve_satoshis(int64_t this_ptr, int64_t val) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + OpenChannel_set_channel_reserve_satoshis(&this_ptr_conv, val); +} + +int64_t CS_LDK_OpenChannel_new(int64_t common_fields_arg, int64_t push_msat_arg, int64_t channel_reserve_satoshis_arg) { + LDKCommonOpenChannelFields common_fields_arg_conv; + common_fields_arg_conv.inner = untag_ptr(common_fields_arg); + common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv); + common_fields_arg_conv = CommonOpenChannelFields_clone(&common_fields_arg_conv); + LDKOpenChannel ret_var = OpenChannel_new(common_fields_arg_conv, push_msat_arg, channel_reserve_satoshis_arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t OpenChannel_clone_ptr(LDKOpenChannel *NONNULL_PTR arg) { + LDKOpenChannel ret_var = OpenChannel_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t CS_LDK_OpenChannel_clone_ptr(int64_t arg) { + LDKOpenChannel arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = OpenChannel_clone_ptr(&arg_conv); + return ret_conv; +} + +int64_t CS_LDK_OpenChannel_clone(int64_t orig) { + LDKOpenChannel orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKOpenChannel ret_var = OpenChannel_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_OpenChannel_hash(int64_t o) { + LDKOpenChannel o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = OpenChannel_hash(&o_conv); + return ret_conv; +} + +jboolean CS_LDK_OpenChannel_eq(int64_t a, int64_t b) { + LDKOpenChannel a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKOpenChannel b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = OpenChannel_eq(&a_conv, &b_conv); + return ret_conv; +} + +void CS_LDK_OpenChannelV2_free(int64_t this_obj) { + LDKOpenChannelV2 this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + OpenChannelV2_free(this_obj_conv); +} + +int64_t CS_LDK_OpenChannelV2_get_common_fields(int64_t this_ptr) { + LDKOpenChannelV2 this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCommonOpenChannelFields ret_var = OpenChannelV2_get_common_fields(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void CS_LDK_OpenChannelV2_set_common_fields(int64_t this_ptr, int64_t val) { + LDKOpenChannelV2 this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCommonOpenChannelFields val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = CommonOpenChannelFields_clone(&val_conv); + OpenChannelV2_set_common_fields(&this_ptr_conv, val_conv); +} + +int32_t CS_LDK_OpenChannelV2_get_funding_feerate_sat_per_1000_weight(int64_t this_ptr) { + LDKOpenChannelV2 this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int32_t ret_conv = OpenChannelV2_get_funding_feerate_sat_per_1000_weight(&this_ptr_conv); + return ret_conv; +} + +void CS_LDK_OpenChannelV2_set_funding_feerate_sat_per_1000_weight(int64_t this_ptr, int32_t val) { + LDKOpenChannelV2 this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + OpenChannelV2_set_funding_feerate_sat_per_1000_weight(&this_ptr_conv, val); +} + +int32_t CS_LDK_OpenChannelV2_get_locktime(int64_t this_ptr) { + LDKOpenChannelV2 this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int32_t ret_conv = OpenChannelV2_get_locktime(&this_ptr_conv); + return ret_conv; +} + +void CS_LDK_OpenChannelV2_set_locktime(int64_t this_ptr, int32_t val) { + LDKOpenChannelV2 this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + OpenChannelV2_set_locktime(&this_ptr_conv, val); +} + +int8_tArray CS_LDK_OpenChannelV2_get_second_per_commitment_point(int64_t this_ptr) { + LDKOpenChannelV2 this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(33, __LINE__); + memcpy(ret_arr->elems, OpenChannelV2_get_second_per_commitment_point(&this_ptr_conv).compressed_form, 33); + return ret_arr; +} + +void CS_LDK_OpenChannelV2_set_second_per_commitment_point(int64_t this_ptr, int8_tArray val) { + LDKOpenChannelV2 this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKPublicKey val_ref; + CHECK(val->arr_len == 33); + memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); + OpenChannelV2_set_second_per_commitment_point(&this_ptr_conv, val_ref); +} + +int32_t CS_LDK_OpenChannelV2_get_require_confirmed_inputs(int64_t this_ptr) { + LDKOpenChannelV2 this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int32_t ret_conv = LDKCOption_NoneZ_to_cs(OpenChannelV2_get_require_confirmed_inputs(&this_ptr_conv)); + return ret_conv; +} + +void CS_LDK_OpenChannelV2_set_require_confirmed_inputs(int64_t this_ptr, int32_t val) { + LDKOpenChannelV2 this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCOption_NoneZ val_conv = LDKCOption_NoneZ_from_cs(val); + OpenChannelV2_set_require_confirmed_inputs(&this_ptr_conv, val_conv); +} + +int64_t CS_LDK_OpenChannelV2_new(int64_t common_fields_arg, int32_t funding_feerate_sat_per_1000_weight_arg, int32_t locktime_arg, int8_tArray second_per_commitment_point_arg, int32_t require_confirmed_inputs_arg) { + LDKCommonOpenChannelFields common_fields_arg_conv; + common_fields_arg_conv.inner = untag_ptr(common_fields_arg); + common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv); + common_fields_arg_conv = CommonOpenChannelFields_clone(&common_fields_arg_conv); + LDKPublicKey second_per_commitment_point_arg_ref; + CHECK(second_per_commitment_point_arg->arr_len == 33); + memcpy(second_per_commitment_point_arg_ref.compressed_form, second_per_commitment_point_arg->elems, 33); FREE(second_per_commitment_point_arg); LDKCOption_NoneZ require_confirmed_inputs_arg_conv = LDKCOption_NoneZ_from_cs(require_confirmed_inputs_arg); - LDKOpenChannelV2 ret_var = OpenChannelV2_new(chain_hash_arg_ref, temporary_channel_id_arg_ref, funding_feerate_sat_per_1000_weight_arg, commitment_feerate_sat_per_1000_weight_arg, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, to_self_delay_arg, max_accepted_htlcs_arg, locktime_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, second_per_commitment_point_arg_ref, channel_flags_arg, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv, require_confirmed_inputs_arg_conv); + LDKOpenChannelV2 ret_var = OpenChannelV2_new(common_fields_arg_conv, funding_feerate_sat_per_1000_weight_arg, locktime_arg, second_per_commitment_point_arg_ref, require_confirmed_inputs_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -42726,183 +46446,168 @@ jboolean CS_LDK_OpenChannelV2_eq(int64_t a, int64_t b) { return ret_conv; } -void CS_LDK_AcceptChannel_free(int64_t this_obj) { - LDKAcceptChannel this_obj_conv; +void CS_LDK_CommonAcceptChannelFields_free(int64_t this_obj) { + LDKCommonAcceptChannelFields this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); this_obj_conv.is_owned = ptr_is_owned(this_obj); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - AcceptChannel_free(this_obj_conv); -} - -int8_tArray CS_LDK_AcceptChannel_get_temporary_channel_id(int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *AcceptChannel_get_temporary_channel_id(&this_ptr_conv), 32); - return ret_arr; -} - -void CS_LDK_AcceptChannel_set_temporary_channel_id(int64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - AcceptChannel_set_temporary_channel_id(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_free(this_obj_conv); } -int64_t CS_LDK_AcceptChannel_get_dust_limit_satoshis(int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int64_t CS_LDK_CommonAcceptChannelFields_get_temporary_channel_id(int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannel_get_dust_limit_satoshis(&this_ptr_conv); - return ret_conv; + LDKChannelId ret_var = CommonAcceptChannelFields_get_temporary_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_AcceptChannel_set_dust_limit_satoshis(int64_t this_ptr, int64_t val) { - LDKAcceptChannel this_ptr_conv; +void CS_LDK_CommonAcceptChannelFields_set_temporary_channel_id(int64_t this_ptr, int64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_dust_limit_satoshis(&this_ptr_conv, val); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + CommonAcceptChannelFields_set_temporary_channel_id(&this_ptr_conv, val_conv); } -int64_t CS_LDK_AcceptChannel_get_max_htlc_value_in_flight_msat(int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int64_t CS_LDK_CommonAcceptChannelFields_get_dust_limit_satoshis(int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannel_get_max_htlc_value_in_flight_msat(&this_ptr_conv); + int64_t ret_conv = CommonAcceptChannelFields_get_dust_limit_satoshis(&this_ptr_conv); return ret_conv; } -void CS_LDK_AcceptChannel_set_max_htlc_value_in_flight_msat(int64_t this_ptr, int64_t val) { - LDKAcceptChannel this_ptr_conv; +void CS_LDK_CommonAcceptChannelFields_set_dust_limit_satoshis(int64_t this_ptr, int64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); + CommonAcceptChannelFields_set_dust_limit_satoshis(&this_ptr_conv, val); } -int64_t CS_LDK_AcceptChannel_get_channel_reserve_satoshis(int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int64_t CS_LDK_CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat(int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannel_get_channel_reserve_satoshis(&this_ptr_conv); + int64_t ret_conv = CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat(&this_ptr_conv); return ret_conv; } -void CS_LDK_AcceptChannel_set_channel_reserve_satoshis(int64_t this_ptr, int64_t val) { - LDKAcceptChannel this_ptr_conv; +void CS_LDK_CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat(int64_t this_ptr, int64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_channel_reserve_satoshis(&this_ptr_conv, val); + CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); } -int64_t CS_LDK_AcceptChannel_get_htlc_minimum_msat(int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int64_t CS_LDK_CommonAcceptChannelFields_get_htlc_minimum_msat(int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannel_get_htlc_minimum_msat(&this_ptr_conv); + int64_t ret_conv = CommonAcceptChannelFields_get_htlc_minimum_msat(&this_ptr_conv); return ret_conv; } -void CS_LDK_AcceptChannel_set_htlc_minimum_msat(int64_t this_ptr, int64_t val) { - LDKAcceptChannel this_ptr_conv; +void CS_LDK_CommonAcceptChannelFields_set_htlc_minimum_msat(int64_t this_ptr, int64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_htlc_minimum_msat(&this_ptr_conv, val); + CommonAcceptChannelFields_set_htlc_minimum_msat(&this_ptr_conv, val); } -int32_t CS_LDK_AcceptChannel_get_minimum_depth(int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int32_t CS_LDK_CommonAcceptChannelFields_get_minimum_depth(int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int32_t ret_conv = AcceptChannel_get_minimum_depth(&this_ptr_conv); + int32_t ret_conv = CommonAcceptChannelFields_get_minimum_depth(&this_ptr_conv); return ret_conv; } -void CS_LDK_AcceptChannel_set_minimum_depth(int64_t this_ptr, int32_t val) { - LDKAcceptChannel this_ptr_conv; +void CS_LDK_CommonAcceptChannelFields_set_minimum_depth(int64_t this_ptr, int32_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_minimum_depth(&this_ptr_conv, val); + CommonAcceptChannelFields_set_minimum_depth(&this_ptr_conv, val); } -int16_t CS_LDK_AcceptChannel_get_to_self_delay(int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int16_t CS_LDK_CommonAcceptChannelFields_get_to_self_delay(int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int16_t ret_conv = AcceptChannel_get_to_self_delay(&this_ptr_conv); + int16_t ret_conv = CommonAcceptChannelFields_get_to_self_delay(&this_ptr_conv); return ret_conv; } -void CS_LDK_AcceptChannel_set_to_self_delay(int64_t this_ptr, int16_t val) { - LDKAcceptChannel this_ptr_conv; +void CS_LDK_CommonAcceptChannelFields_set_to_self_delay(int64_t this_ptr, int16_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_to_self_delay(&this_ptr_conv, val); + CommonAcceptChannelFields_set_to_self_delay(&this_ptr_conv, val); } -int16_t CS_LDK_AcceptChannel_get_max_accepted_htlcs(int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int16_t CS_LDK_CommonAcceptChannelFields_get_max_accepted_htlcs(int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int16_t ret_conv = AcceptChannel_get_max_accepted_htlcs(&this_ptr_conv); + int16_t ret_conv = CommonAcceptChannelFields_get_max_accepted_htlcs(&this_ptr_conv); return ret_conv; } -void CS_LDK_AcceptChannel_set_max_accepted_htlcs(int64_t this_ptr, int16_t val) { - LDKAcceptChannel this_ptr_conv; +void CS_LDK_CommonAcceptChannelFields_set_max_accepted_htlcs(int64_t this_ptr, int16_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_max_accepted_htlcs(&this_ptr_conv, val); + CommonAcceptChannelFields_set_max_accepted_htlcs(&this_ptr_conv, val); } -int8_tArray CS_LDK_AcceptChannel_get_funding_pubkey(int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int8_tArray CS_LDK_CommonAcceptChannelFields_get_funding_pubkey(int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannel_get_funding_pubkey(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonAcceptChannelFields_get_funding_pubkey(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void CS_LDK_AcceptChannel_set_funding_pubkey(int64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +void CS_LDK_CommonAcceptChannelFields_set_funding_pubkey(int64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42910,22 +46615,22 @@ void CS_LDK_AcceptChannel_set_funding_pubkey(int64_t this_ptr, int8_tArray val) LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannel_set_funding_pubkey(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_funding_pubkey(&this_ptr_conv, val_ref); } -int8_tArray CS_LDK_AcceptChannel_get_revocation_basepoint(int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int8_tArray CS_LDK_CommonAcceptChannelFields_get_revocation_basepoint(int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannel_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonAcceptChannelFields_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void CS_LDK_AcceptChannel_set_revocation_basepoint(int64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +void CS_LDK_CommonAcceptChannelFields_set_revocation_basepoint(int64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42933,22 +46638,22 @@ void CS_LDK_AcceptChannel_set_revocation_basepoint(int64_t this_ptr, int8_tArra LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannel_set_revocation_basepoint(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_revocation_basepoint(&this_ptr_conv, val_ref); } -int8_tArray CS_LDK_AcceptChannel_get_payment_point(int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int8_tArray CS_LDK_CommonAcceptChannelFields_get_payment_basepoint(int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannel_get_payment_point(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonAcceptChannelFields_get_payment_basepoint(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void CS_LDK_AcceptChannel_set_payment_point(int64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +void CS_LDK_CommonAcceptChannelFields_set_payment_basepoint(int64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42956,22 +46661,22 @@ void CS_LDK_AcceptChannel_set_payment_point(int64_t this_ptr, int8_tArray val) LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannel_set_payment_point(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_payment_basepoint(&this_ptr_conv, val_ref); } -int8_tArray CS_LDK_AcceptChannel_get_delayed_payment_basepoint(int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int8_tArray CS_LDK_CommonAcceptChannelFields_get_delayed_payment_basepoint(int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannel_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonAcceptChannelFields_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void CS_LDK_AcceptChannel_set_delayed_payment_basepoint(int64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +void CS_LDK_CommonAcceptChannelFields_set_delayed_payment_basepoint(int64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42979,22 +46684,22 @@ void CS_LDK_AcceptChannel_set_delayed_payment_basepoint(int64_t this_ptr, int8_ LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannel_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); } -int8_tArray CS_LDK_AcceptChannel_get_htlc_basepoint(int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int8_tArray CS_LDK_CommonAcceptChannelFields_get_htlc_basepoint(int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannel_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonAcceptChannelFields_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void CS_LDK_AcceptChannel_set_htlc_basepoint(int64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +void CS_LDK_CommonAcceptChannelFields_set_htlc_basepoint(int64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -43002,22 +46707,22 @@ void CS_LDK_AcceptChannel_set_htlc_basepoint(int64_t this_ptr, int8_tArray val) LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannel_set_htlc_basepoint(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_htlc_basepoint(&this_ptr_conv, val_ref); } -int8_tArray CS_LDK_AcceptChannel_get_first_per_commitment_point(int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int8_tArray CS_LDK_CommonAcceptChannelFields_get_first_per_commitment_point(int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannel_get_first_per_commitment_point(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonAcceptChannelFields_get_first_per_commitment_point(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void CS_LDK_AcceptChannel_set_first_per_commitment_point(int64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +void CS_LDK_CommonAcceptChannelFields_set_first_per_commitment_point(int64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -43025,23 +46730,23 @@ void CS_LDK_AcceptChannel_set_first_per_commitment_point(int64_t this_ptr, int8 LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannel_set_first_per_commitment_point(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_first_per_commitment_point(&this_ptr_conv, val_ref); } -int64_t CS_LDK_AcceptChannel_get_shutdown_scriptpubkey(int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int64_t CS_LDK_CommonAcceptChannelFields_get_shutdown_scriptpubkey(int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ"); - *ret_copy = AcceptChannel_get_shutdown_scriptpubkey(&this_ptr_conv); + *ret_copy = CommonAcceptChannelFields_get_shutdown_scriptpubkey(&this_ptr_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -void CS_LDK_AcceptChannel_set_shutdown_scriptpubkey(int64_t this_ptr, int64_t val) { - LDKAcceptChannel this_ptr_conv; +void CS_LDK_CommonAcceptChannelFields_set_shutdown_scriptpubkey(int64_t this_ptr, int64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -43050,24 +46755,24 @@ void CS_LDK_AcceptChannel_set_shutdown_scriptpubkey(int64_t this_ptr, int64_t v CHECK_ACCESS(val_ptr); LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr); val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val)); - AcceptChannel_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); + CommonAcceptChannelFields_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); } -int64_t CS_LDK_AcceptChannel_get_channel_type(int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int64_t CS_LDK_CommonAcceptChannelFields_get_channel_type(int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures ret_var = AcceptChannel_get_channel_type(&this_ptr_conv); + LDKChannelTypeFeatures ret_var = CommonAcceptChannelFields_get_channel_type(&this_ptr_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -void CS_LDK_AcceptChannel_set_channel_type(int64_t this_ptr, int64_t val) { - LDKAcceptChannel this_ptr_conv; +void CS_LDK_CommonAcceptChannelFields_set_channel_type(int64_t this_ptr, int64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -43077,22 +46782,24 @@ void CS_LDK_AcceptChannel_set_channel_type(int64_t this_ptr, int64_t val) { val_conv.is_owned = ptr_is_owned(val); CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); val_conv = ChannelTypeFeatures_clone(&val_conv); - AcceptChannel_set_channel_type(&this_ptr_conv, val_conv); + CommonAcceptChannelFields_set_channel_type(&this_ptr_conv, val_conv); } -int64_t CS_LDK_AcceptChannel_new(int8_tArray temporary_channel_id_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t channel_reserve_satoshis_arg, int64_t htlc_minimum_msat_arg, int32_t minimum_depth_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_point_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg) { - LDKThirtyTwoBytes temporary_channel_id_arg_ref; - CHECK(temporary_channel_id_arg->arr_len == 32); - memcpy(temporary_channel_id_arg_ref.data, temporary_channel_id_arg->elems, 32); FREE(temporary_channel_id_arg); +int64_t CS_LDK_CommonAcceptChannelFields_new(int64_t temporary_channel_id_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int32_t minimum_depth_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg) { + LDKChannelId temporary_channel_id_arg_conv; + temporary_channel_id_arg_conv.inner = untag_ptr(temporary_channel_id_arg); + temporary_channel_id_arg_conv.is_owned = ptr_is_owned(temporary_channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_arg_conv); + temporary_channel_id_arg_conv = ChannelId_clone(&temporary_channel_id_arg_conv); LDKPublicKey funding_pubkey_arg_ref; CHECK(funding_pubkey_arg->arr_len == 33); memcpy(funding_pubkey_arg_ref.compressed_form, funding_pubkey_arg->elems, 33); FREE(funding_pubkey_arg); LDKPublicKey revocation_basepoint_arg_ref; CHECK(revocation_basepoint_arg->arr_len == 33); memcpy(revocation_basepoint_arg_ref.compressed_form, revocation_basepoint_arg->elems, 33); FREE(revocation_basepoint_arg); - LDKPublicKey payment_point_arg_ref; - CHECK(payment_point_arg->arr_len == 33); - memcpy(payment_point_arg_ref.compressed_form, payment_point_arg->elems, 33); FREE(payment_point_arg); + LDKPublicKey payment_basepoint_arg_ref; + CHECK(payment_basepoint_arg->arr_len == 33); + memcpy(payment_basepoint_arg_ref.compressed_form, payment_basepoint_arg->elems, 33); FREE(payment_basepoint_arg); LDKPublicKey delayed_payment_basepoint_arg_ref; CHECK(delayed_payment_basepoint_arg->arr_len == 33); memcpy(delayed_payment_basepoint_arg_ref.compressed_form, delayed_payment_basepoint_arg->elems, 33); FREE(delayed_payment_basepoint_arg); @@ -43111,7 +46818,129 @@ int64_t CS_LDK_AcceptChannel_new(int8_tArray temporary_channel_id_arg, int64_t channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv); channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv); - LDKAcceptChannel ret_var = AcceptChannel_new(temporary_channel_id_arg_ref, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_point_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv); + LDKCommonAcceptChannelFields ret_var = CommonAcceptChannelFields_new(temporary_channel_id_arg_conv, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t CommonAcceptChannelFields_clone_ptr(LDKCommonAcceptChannelFields *NONNULL_PTR arg) { + LDKCommonAcceptChannelFields ret_var = CommonAcceptChannelFields_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t CS_LDK_CommonAcceptChannelFields_clone_ptr(int64_t arg) { + LDKCommonAcceptChannelFields arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = CommonAcceptChannelFields_clone_ptr(&arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CommonAcceptChannelFields_clone(int64_t orig) { + LDKCommonAcceptChannelFields orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKCommonAcceptChannelFields ret_var = CommonAcceptChannelFields_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_CommonAcceptChannelFields_hash(int64_t o) { + LDKCommonAcceptChannelFields o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = CommonAcceptChannelFields_hash(&o_conv); + return ret_conv; +} + +jboolean CS_LDK_CommonAcceptChannelFields_eq(int64_t a, int64_t b) { + LDKCommonAcceptChannelFields a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKCommonAcceptChannelFields b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = CommonAcceptChannelFields_eq(&a_conv, &b_conv); + return ret_conv; +} + +void CS_LDK_AcceptChannel_free(int64_t this_obj) { + LDKAcceptChannel this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + AcceptChannel_free(this_obj_conv); +} + +int64_t CS_LDK_AcceptChannel_get_common_fields(int64_t this_ptr) { + LDKAcceptChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCommonAcceptChannelFields ret_var = AcceptChannel_get_common_fields(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void CS_LDK_AcceptChannel_set_common_fields(int64_t this_ptr, int64_t val) { + LDKAcceptChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCommonAcceptChannelFields val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = CommonAcceptChannelFields_clone(&val_conv); + AcceptChannel_set_common_fields(&this_ptr_conv, val_conv); +} + +int64_t CS_LDK_AcceptChannel_get_channel_reserve_satoshis(int64_t this_ptr) { + LDKAcceptChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int64_t ret_conv = AcceptChannel_get_channel_reserve_satoshis(&this_ptr_conv); + return ret_conv; +} + +void CS_LDK_AcceptChannel_set_channel_reserve_satoshis(int64_t this_ptr, int64_t val) { + LDKAcceptChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + AcceptChannel_set_channel_reserve_satoshis(&this_ptr_conv, val); +} + +int64_t CS_LDK_AcceptChannel_new(int64_t common_fields_arg, int64_t channel_reserve_satoshis_arg) { + LDKCommonAcceptChannelFields common_fields_arg_conv; + common_fields_arg_conv.inner = untag_ptr(common_fields_arg); + common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv); + common_fields_arg_conv = CommonAcceptChannelFields_clone(&common_fields_arg_conv); + LDKAcceptChannel ret_var = AcceptChannel_new(common_fields_arg_conv, channel_reserve_satoshis_arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -43181,27 +47010,31 @@ void CS_LDK_AcceptChannelV2_free(int64_t this_obj) { AcceptChannelV2_free(this_obj_conv); } -int8_tArray CS_LDK_AcceptChannelV2_get_temporary_channel_id(int64_t this_ptr) { +int64_t CS_LDK_AcceptChannelV2_get_common_fields(int64_t this_ptr) { LDKAcceptChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *AcceptChannelV2_get_temporary_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKCommonAcceptChannelFields ret_var = AcceptChannelV2_get_common_fields(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_AcceptChannelV2_set_temporary_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_AcceptChannelV2_set_common_fields(int64_t this_ptr, int64_t val) { LDKAcceptChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - AcceptChannelV2_set_temporary_channel_id(&this_ptr_conv, val_ref); + LDKCommonAcceptChannelFields val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = CommonAcceptChannelFields_clone(&val_conv); + AcceptChannelV2_set_common_fields(&this_ptr_conv, val_conv); } int64_t CS_LDK_AcceptChannelV2_get_funding_satoshis(int64_t this_ptr) { @@ -43223,258 +47056,6 @@ void CS_LDK_AcceptChannelV2_set_funding_satoshis(int64_t this_ptr, int64_t val) AcceptChannelV2_set_funding_satoshis(&this_ptr_conv, val); } -int64_t CS_LDK_AcceptChannelV2_get_dust_limit_satoshis(int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannelV2_get_dust_limit_satoshis(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_AcceptChannelV2_set_dust_limit_satoshis(int64_t this_ptr, int64_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_dust_limit_satoshis(&this_ptr_conv, val); -} - -int64_t CS_LDK_AcceptChannelV2_get_max_htlc_value_in_flight_msat(int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannelV2_get_max_htlc_value_in_flight_msat(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_AcceptChannelV2_set_max_htlc_value_in_flight_msat(int64_t this_ptr, int64_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); -} - -int64_t CS_LDK_AcceptChannelV2_get_htlc_minimum_msat(int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannelV2_get_htlc_minimum_msat(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_AcceptChannelV2_set_htlc_minimum_msat(int64_t this_ptr, int64_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_htlc_minimum_msat(&this_ptr_conv, val); -} - -int32_t CS_LDK_AcceptChannelV2_get_minimum_depth(int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int32_t ret_conv = AcceptChannelV2_get_minimum_depth(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_AcceptChannelV2_set_minimum_depth(int64_t this_ptr, int32_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_minimum_depth(&this_ptr_conv, val); -} - -int16_t CS_LDK_AcceptChannelV2_get_to_self_delay(int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int16_t ret_conv = AcceptChannelV2_get_to_self_delay(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_AcceptChannelV2_set_to_self_delay(int64_t this_ptr, int16_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_to_self_delay(&this_ptr_conv, val); -} - -int16_t CS_LDK_AcceptChannelV2_get_max_accepted_htlcs(int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int16_t ret_conv = AcceptChannelV2_get_max_accepted_htlcs(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_AcceptChannelV2_set_max_accepted_htlcs(int64_t this_ptr, int16_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_max_accepted_htlcs(&this_ptr_conv, val); -} - -int8_tArray CS_LDK_AcceptChannelV2_get_funding_pubkey(int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannelV2_get_funding_pubkey(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void CS_LDK_AcceptChannelV2_set_funding_pubkey(int64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannelV2_set_funding_pubkey(&this_ptr_conv, val_ref); -} - -int8_tArray CS_LDK_AcceptChannelV2_get_revocation_basepoint(int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannelV2_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void CS_LDK_AcceptChannelV2_set_revocation_basepoint(int64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannelV2_set_revocation_basepoint(&this_ptr_conv, val_ref); -} - -int8_tArray CS_LDK_AcceptChannelV2_get_payment_basepoint(int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannelV2_get_payment_basepoint(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void CS_LDK_AcceptChannelV2_set_payment_basepoint(int64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannelV2_set_payment_basepoint(&this_ptr_conv, val_ref); -} - -int8_tArray CS_LDK_AcceptChannelV2_get_delayed_payment_basepoint(int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannelV2_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void CS_LDK_AcceptChannelV2_set_delayed_payment_basepoint(int64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannelV2_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); -} - -int8_tArray CS_LDK_AcceptChannelV2_get_htlc_basepoint(int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannelV2_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void CS_LDK_AcceptChannelV2_set_htlc_basepoint(int64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannelV2_set_htlc_basepoint(&this_ptr_conv, val_ref); -} - -int8_tArray CS_LDK_AcceptChannelV2_get_first_per_commitment_point(int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannelV2_get_first_per_commitment_point(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void CS_LDK_AcceptChannelV2_set_first_per_commitment_point(int64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannelV2_set_first_per_commitment_point(&this_ptr_conv, val_ref); -} - int8_tArray CS_LDK_AcceptChannelV2_get_second_per_commitment_point(int64_t this_ptr) { LDKAcceptChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -43498,58 +47079,6 @@ void CS_LDK_AcceptChannelV2_set_second_per_commitment_point(int64_t this_ptr, i AcceptChannelV2_set_second_per_commitment_point(&this_ptr_conv, val_ref); } -int64_t CS_LDK_AcceptChannelV2_get_shutdown_scriptpubkey(int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ"); - *ret_copy = AcceptChannelV2_get_shutdown_scriptpubkey(&this_ptr_conv); - int64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -void CS_LDK_AcceptChannelV2_set_shutdown_scriptpubkey(int64_t this_ptr, int64_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - void* val_ptr = untag_ptr(val); - CHECK_ACCESS(val_ptr); - LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr); - val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val)); - AcceptChannelV2_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); -} - -int64_t CS_LDK_AcceptChannelV2_get_channel_type(int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures ret_var = AcceptChannelV2_get_channel_type(&this_ptr_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -void CS_LDK_AcceptChannelV2_set_channel_type(int64_t this_ptr, int64_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures val_conv; - val_conv.inner = untag_ptr(val); - val_conv.is_owned = ptr_is_owned(val); - CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); - val_conv = ChannelTypeFeatures_clone(&val_conv); - AcceptChannelV2_set_channel_type(&this_ptr_conv, val_conv); -} - int32_t CS_LDK_AcceptChannelV2_get_require_confirmed_inputs(int64_t this_ptr) { LDKAcceptChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -43570,42 +47099,17 @@ void CS_LDK_AcceptChannelV2_set_require_confirmed_inputs(int64_t this_ptr, int3 AcceptChannelV2_set_require_confirmed_inputs(&this_ptr_conv, val_conv); } -int64_t CS_LDK_AcceptChannelV2_new(int8_tArray temporary_channel_id_arg, int64_t funding_satoshis_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int32_t minimum_depth_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_tArray second_per_commitment_point_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg, int32_t require_confirmed_inputs_arg) { - LDKThirtyTwoBytes temporary_channel_id_arg_ref; - CHECK(temporary_channel_id_arg->arr_len == 32); - memcpy(temporary_channel_id_arg_ref.data, temporary_channel_id_arg->elems, 32); FREE(temporary_channel_id_arg); - LDKPublicKey funding_pubkey_arg_ref; - CHECK(funding_pubkey_arg->arr_len == 33); - memcpy(funding_pubkey_arg_ref.compressed_form, funding_pubkey_arg->elems, 33); FREE(funding_pubkey_arg); - LDKPublicKey revocation_basepoint_arg_ref; - CHECK(revocation_basepoint_arg->arr_len == 33); - memcpy(revocation_basepoint_arg_ref.compressed_form, revocation_basepoint_arg->elems, 33); FREE(revocation_basepoint_arg); - LDKPublicKey payment_basepoint_arg_ref; - CHECK(payment_basepoint_arg->arr_len == 33); - memcpy(payment_basepoint_arg_ref.compressed_form, payment_basepoint_arg->elems, 33); FREE(payment_basepoint_arg); - LDKPublicKey delayed_payment_basepoint_arg_ref; - CHECK(delayed_payment_basepoint_arg->arr_len == 33); - memcpy(delayed_payment_basepoint_arg_ref.compressed_form, delayed_payment_basepoint_arg->elems, 33); FREE(delayed_payment_basepoint_arg); - LDKPublicKey htlc_basepoint_arg_ref; - CHECK(htlc_basepoint_arg->arr_len == 33); - memcpy(htlc_basepoint_arg_ref.compressed_form, htlc_basepoint_arg->elems, 33); FREE(htlc_basepoint_arg); - LDKPublicKey first_per_commitment_point_arg_ref; - CHECK(first_per_commitment_point_arg->arr_len == 33); - memcpy(first_per_commitment_point_arg_ref.compressed_form, first_per_commitment_point_arg->elems, 33); FREE(first_per_commitment_point_arg); +int64_t CS_LDK_AcceptChannelV2_new(int64_t common_fields_arg, int64_t funding_satoshis_arg, int8_tArray second_per_commitment_point_arg, int32_t require_confirmed_inputs_arg) { + LDKCommonAcceptChannelFields common_fields_arg_conv; + common_fields_arg_conv.inner = untag_ptr(common_fields_arg); + common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv); + common_fields_arg_conv = CommonAcceptChannelFields_clone(&common_fields_arg_conv); LDKPublicKey second_per_commitment_point_arg_ref; CHECK(second_per_commitment_point_arg->arr_len == 33); memcpy(second_per_commitment_point_arg_ref.compressed_form, second_per_commitment_point_arg->elems, 33); FREE(second_per_commitment_point_arg); - void* shutdown_scriptpubkey_arg_ptr = untag_ptr(shutdown_scriptpubkey_arg); - CHECK_ACCESS(shutdown_scriptpubkey_arg_ptr); - LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg_conv = *(LDKCOption_CVec_u8ZZ*)(shutdown_scriptpubkey_arg_ptr); - shutdown_scriptpubkey_arg_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(shutdown_scriptpubkey_arg)); - LDKChannelTypeFeatures channel_type_arg_conv; - channel_type_arg_conv.inner = untag_ptr(channel_type_arg); - channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv); - channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv); LDKCOption_NoneZ require_confirmed_inputs_arg_conv = LDKCOption_NoneZ_from_cs(require_confirmed_inputs_arg); - LDKAcceptChannelV2 ret_var = AcceptChannelV2_new(temporary_channel_id_arg_ref, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, second_per_commitment_point_arg_ref, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv, require_confirmed_inputs_arg_conv); + LDKAcceptChannelV2 ret_var = AcceptChannelV2_new(common_fields_arg_conv, funding_satoshis_arg, second_per_commitment_point_arg_ref, require_confirmed_inputs_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -43675,27 +47179,31 @@ void CS_LDK_FundingCreated_free(int64_t this_obj) { FundingCreated_free(this_obj_conv); } -int8_tArray CS_LDK_FundingCreated_get_temporary_channel_id(int64_t this_ptr) { +int64_t CS_LDK_FundingCreated_get_temporary_channel_id(int64_t this_ptr) { LDKFundingCreated this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *FundingCreated_get_temporary_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = FundingCreated_get_temporary_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_FundingCreated_set_temporary_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_FundingCreated_set_temporary_channel_id(int64_t this_ptr, int64_t val) { LDKFundingCreated this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - FundingCreated_set_temporary_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + FundingCreated_set_temporary_channel_id(&this_ptr_conv, val_conv); } int8_tArray CS_LDK_FundingCreated_get_funding_txid(int64_t this_ptr) { @@ -43763,17 +47271,19 @@ void CS_LDK_FundingCreated_set_signature(int64_t this_ptr, int8_tArray val) { FundingCreated_set_signature(&this_ptr_conv, val_ref); } -int64_t CS_LDK_FundingCreated_new(int8_tArray temporary_channel_id_arg, int8_tArray funding_txid_arg, int16_t funding_output_index_arg, int8_tArray signature_arg) { - LDKThirtyTwoBytes temporary_channel_id_arg_ref; - CHECK(temporary_channel_id_arg->arr_len == 32); - memcpy(temporary_channel_id_arg_ref.data, temporary_channel_id_arg->elems, 32); FREE(temporary_channel_id_arg); +int64_t CS_LDK_FundingCreated_new(int64_t temporary_channel_id_arg, int8_tArray funding_txid_arg, int16_t funding_output_index_arg, int8_tArray signature_arg) { + LDKChannelId temporary_channel_id_arg_conv; + temporary_channel_id_arg_conv.inner = untag_ptr(temporary_channel_id_arg); + temporary_channel_id_arg_conv.is_owned = ptr_is_owned(temporary_channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_arg_conv); + temporary_channel_id_arg_conv = ChannelId_clone(&temporary_channel_id_arg_conv); LDKThirtyTwoBytes funding_txid_arg_ref; CHECK(funding_txid_arg->arr_len == 32); memcpy(funding_txid_arg_ref.data, funding_txid_arg->elems, 32); FREE(funding_txid_arg); LDKECDSASignature signature_arg_ref; CHECK(signature_arg->arr_len == 64); memcpy(signature_arg_ref.compact_form, signature_arg->elems, 64); FREE(signature_arg); - LDKFundingCreated ret_var = FundingCreated_new(temporary_channel_id_arg_ref, funding_txid_arg_ref, funding_output_index_arg, signature_arg_ref); + LDKFundingCreated ret_var = FundingCreated_new(temporary_channel_id_arg_conv, funding_txid_arg_ref, funding_output_index_arg, signature_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -43843,27 +47353,31 @@ void CS_LDK_FundingSigned_free(int64_t this_obj) { FundingSigned_free(this_obj_conv); } -int8_tArray CS_LDK_FundingSigned_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_FundingSigned_get_channel_id(int64_t this_ptr) { LDKFundingSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *FundingSigned_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = FundingSigned_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_FundingSigned_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_FundingSigned_set_channel_id(int64_t this_ptr, int64_t val) { LDKFundingSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - FundingSigned_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + FundingSigned_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray CS_LDK_FundingSigned_get_signature(int64_t this_ptr) { @@ -43889,14 +47403,16 @@ void CS_LDK_FundingSigned_set_signature(int64_t this_ptr, int8_tArray val) { FundingSigned_set_signature(&this_ptr_conv, val_ref); } -int64_t CS_LDK_FundingSigned_new(int8_tArray channel_id_arg, int8_tArray signature_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_FundingSigned_new(int64_t channel_id_arg, int8_tArray signature_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKECDSASignature signature_arg_ref; CHECK(signature_arg->arr_len == 64); memcpy(signature_arg_ref.compact_form, signature_arg->elems, 64); FREE(signature_arg); - LDKFundingSigned ret_var = FundingSigned_new(channel_id_arg_ref, signature_arg_ref); + LDKFundingSigned ret_var = FundingSigned_new(channel_id_arg_conv, signature_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -43966,27 +47482,31 @@ void CS_LDK_ChannelReady_free(int64_t this_obj) { ChannelReady_free(this_obj_conv); } -int8_tArray CS_LDK_ChannelReady_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_ChannelReady_get_channel_id(int64_t this_ptr) { LDKChannelReady this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *ChannelReady_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = ChannelReady_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_ChannelReady_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_ChannelReady_set_channel_id(int64_t this_ptr, int64_t val) { LDKChannelReady this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - ChannelReady_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ChannelReady_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray CS_LDK_ChannelReady_get_next_per_commitment_point(int64_t this_ptr) { @@ -44037,10 +47557,12 @@ void CS_LDK_ChannelReady_set_short_channel_id_alias(int64_t this_ptr, int64_t v ChannelReady_set_short_channel_id_alias(&this_ptr_conv, val_conv); } -int64_t CS_LDK_ChannelReady_new(int8_tArray channel_id_arg, int8_tArray next_per_commitment_point_arg, int64_t short_channel_id_alias_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_ChannelReady_new(int64_t channel_id_arg, int8_tArray next_per_commitment_point_arg, int64_t short_channel_id_alias_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKPublicKey next_per_commitment_point_arg_ref; CHECK(next_per_commitment_point_arg->arr_len == 33); memcpy(next_per_commitment_point_arg_ref.compressed_form, next_per_commitment_point_arg->elems, 33); FREE(next_per_commitment_point_arg); @@ -44048,7 +47570,7 @@ int64_t CS_LDK_ChannelReady_new(int8_tArray channel_id_arg, int8_tArray next_pe CHECK_ACCESS(short_channel_id_alias_arg_ptr); LDKCOption_u64Z short_channel_id_alias_arg_conv = *(LDKCOption_u64Z*)(short_channel_id_alias_arg_ptr); short_channel_id_alias_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(short_channel_id_alias_arg)); - LDKChannelReady ret_var = ChannelReady_new(channel_id_arg_ref, next_per_commitment_point_arg_ref, short_channel_id_alias_arg_conv); + LDKChannelReady ret_var = ChannelReady_new(channel_id_arg_conv, next_per_commitment_point_arg_ref, short_channel_id_alias_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -44118,27 +47640,31 @@ void CS_LDK_Stfu_free(int64_t this_obj) { Stfu_free(this_obj_conv); } -int8_tArray CS_LDK_Stfu_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_Stfu_get_channel_id(int64_t this_ptr) { LDKStfu this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *Stfu_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = Stfu_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_Stfu_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_Stfu_set_channel_id(int64_t this_ptr, int64_t val) { LDKStfu this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - Stfu_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + Stfu_set_channel_id(&this_ptr_conv, val_conv); } int8_t CS_LDK_Stfu_get_initiator(int64_t this_ptr) { @@ -44160,11 +47686,13 @@ void CS_LDK_Stfu_set_initiator(int64_t this_ptr, int8_t val) { Stfu_set_initiator(&this_ptr_conv, val); } -int64_t CS_LDK_Stfu_new(int8_tArray channel_id_arg, int8_t initiator_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); - LDKStfu ret_var = Stfu_new(channel_id_arg_ref, initiator_arg); +int64_t CS_LDK_Stfu_new(int64_t channel_id_arg, int8_t initiator_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKStfu ret_var = Stfu_new(channel_id_arg_conv, initiator_arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -44224,27 +47752,31 @@ void CS_LDK_Splice_free(int64_t this_obj) { Splice_free(this_obj_conv); } -int8_tArray CS_LDK_Splice_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_Splice_get_channel_id(int64_t this_ptr) { LDKSplice this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *Splice_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = Splice_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_Splice_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_Splice_set_channel_id(int64_t this_ptr, int64_t val) { LDKSplice this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - Splice_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + Splice_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray CS_LDK_Splice_get_chain_hash(int64_t this_ptr) { @@ -44350,17 +47882,19 @@ void CS_LDK_Splice_set_funding_pubkey(int64_t this_ptr, int8_tArray val) { Splice_set_funding_pubkey(&this_ptr_conv, val_ref); } -int64_t CS_LDK_Splice_new(int8_tArray channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int32_t funding_feerate_perkw_arg, int32_t locktime_arg, int8_tArray funding_pubkey_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_Splice_new(int64_t channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int32_t funding_feerate_perkw_arg, int32_t locktime_arg, int8_tArray funding_pubkey_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes chain_hash_arg_ref; CHECK(chain_hash_arg->arr_len == 32); memcpy(chain_hash_arg_ref.data, chain_hash_arg->elems, 32); FREE(chain_hash_arg); LDKPublicKey funding_pubkey_arg_ref; CHECK(funding_pubkey_arg->arr_len == 33); memcpy(funding_pubkey_arg_ref.compressed_form, funding_pubkey_arg->elems, 33); FREE(funding_pubkey_arg); - LDKSplice ret_var = Splice_new(channel_id_arg_ref, chain_hash_arg_ref, relative_satoshis_arg, funding_feerate_perkw_arg, locktime_arg, funding_pubkey_arg_ref); + LDKSplice ret_var = Splice_new(channel_id_arg_conv, chain_hash_arg_ref, relative_satoshis_arg, funding_feerate_perkw_arg, locktime_arg, funding_pubkey_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -44420,27 +47954,31 @@ void CS_LDK_SpliceAck_free(int64_t this_obj) { SpliceAck_free(this_obj_conv); } -int8_tArray CS_LDK_SpliceAck_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_SpliceAck_get_channel_id(int64_t this_ptr) { LDKSpliceAck this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *SpliceAck_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = SpliceAck_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_SpliceAck_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_SpliceAck_set_channel_id(int64_t this_ptr, int64_t val) { LDKSpliceAck this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - SpliceAck_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + SpliceAck_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray CS_LDK_SpliceAck_get_chain_hash(int64_t this_ptr) { @@ -44508,17 +48046,19 @@ void CS_LDK_SpliceAck_set_funding_pubkey(int64_t this_ptr, int8_tArray val) { SpliceAck_set_funding_pubkey(&this_ptr_conv, val_ref); } -int64_t CS_LDK_SpliceAck_new(int8_tArray channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int8_tArray funding_pubkey_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_SpliceAck_new(int64_t channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int8_tArray funding_pubkey_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes chain_hash_arg_ref; CHECK(chain_hash_arg->arr_len == 32); memcpy(chain_hash_arg_ref.data, chain_hash_arg->elems, 32); FREE(chain_hash_arg); LDKPublicKey funding_pubkey_arg_ref; CHECK(funding_pubkey_arg->arr_len == 33); memcpy(funding_pubkey_arg_ref.compressed_form, funding_pubkey_arg->elems, 33); FREE(funding_pubkey_arg); - LDKSpliceAck ret_var = SpliceAck_new(channel_id_arg_ref, chain_hash_arg_ref, relative_satoshis_arg, funding_pubkey_arg_ref); + LDKSpliceAck ret_var = SpliceAck_new(channel_id_arg_conv, chain_hash_arg_ref, relative_satoshis_arg, funding_pubkey_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -44578,34 +48118,40 @@ void CS_LDK_SpliceLocked_free(int64_t this_obj) { SpliceLocked_free(this_obj_conv); } -int8_tArray CS_LDK_SpliceLocked_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_SpliceLocked_get_channel_id(int64_t this_ptr) { LDKSpliceLocked this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *SpliceLocked_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = SpliceLocked_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_SpliceLocked_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_SpliceLocked_set_channel_id(int64_t this_ptr, int64_t val) { LDKSpliceLocked this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - SpliceLocked_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + SpliceLocked_set_channel_id(&this_ptr_conv, val_conv); } -int64_t CS_LDK_SpliceLocked_new(int8_tArray channel_id_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); - LDKSpliceLocked ret_var = SpliceLocked_new(channel_id_arg_ref); +int64_t CS_LDK_SpliceLocked_new(int64_t channel_id_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKSpliceLocked ret_var = SpliceLocked_new(channel_id_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -44665,27 +48211,31 @@ void CS_LDK_TxAddInput_free(int64_t this_obj) { TxAddInput_free(this_obj_conv); } -int8_tArray CS_LDK_TxAddInput_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_TxAddInput_get_channel_id(int64_t this_ptr) { LDKTxAddInput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxAddInput_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxAddInput_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_TxAddInput_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_TxAddInput_set_channel_id(int64_t this_ptr, int64_t val) { LDKTxAddInput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxAddInput_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxAddInput_set_channel_id(&this_ptr_conv, val_conv); } int64_t CS_LDK_TxAddInput_get_serial_id(int64_t this_ptr) { @@ -44772,16 +48322,18 @@ void CS_LDK_TxAddInput_set_sequence(int64_t this_ptr, int32_t val) { TxAddInput_set_sequence(&this_ptr_conv, val); } -int64_t CS_LDK_TxAddInput_new(int8_tArray channel_id_arg, int64_t serial_id_arg, int64_t prevtx_arg, int32_t prevtx_out_arg, int32_t sequence_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_TxAddInput_new(int64_t channel_id_arg, int64_t serial_id_arg, int64_t prevtx_arg, int32_t prevtx_out_arg, int32_t sequence_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKTransactionU16LenLimited prevtx_arg_conv; prevtx_arg_conv.inner = untag_ptr(prevtx_arg); prevtx_arg_conv.is_owned = ptr_is_owned(prevtx_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(prevtx_arg_conv); prevtx_arg_conv = TransactionU16LenLimited_clone(&prevtx_arg_conv); - LDKTxAddInput ret_var = TxAddInput_new(channel_id_arg_ref, serial_id_arg, prevtx_arg_conv, prevtx_out_arg, sequence_arg); + LDKTxAddInput ret_var = TxAddInput_new(channel_id_arg_conv, serial_id_arg, prevtx_arg_conv, prevtx_out_arg, sequence_arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -44851,27 +48403,31 @@ void CS_LDK_TxAddOutput_free(int64_t this_obj) { TxAddOutput_free(this_obj_conv); } -int8_tArray CS_LDK_TxAddOutput_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_TxAddOutput_get_channel_id(int64_t this_ptr) { LDKTxAddOutput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxAddOutput_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxAddOutput_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_TxAddOutput_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_TxAddOutput_set_channel_id(int64_t this_ptr, int64_t val) { LDKTxAddOutput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxAddOutput_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxAddOutput_set_channel_id(&this_ptr_conv, val_conv); } int64_t CS_LDK_TxAddOutput_get_serial_id(int64_t this_ptr) { @@ -44938,15 +48494,17 @@ void CS_LDK_TxAddOutput_set_script(int64_t this_ptr, int8_tArray val) { TxAddOutput_set_script(&this_ptr_conv, val_ref); } -int64_t CS_LDK_TxAddOutput_new(int8_tArray channel_id_arg, int64_t serial_id_arg, int64_t sats_arg, int8_tArray script_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_TxAddOutput_new(int64_t channel_id_arg, int64_t serial_id_arg, int64_t sats_arg, int8_tArray script_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKCVec_u8Z script_arg_ref; script_arg_ref.datalen = script_arg->arr_len; script_arg_ref.data = MALLOC(script_arg_ref.datalen, "LDKCVec_u8Z Bytes"); memcpy(script_arg_ref.data, script_arg->elems, script_arg_ref.datalen); FREE(script_arg); - LDKTxAddOutput ret_var = TxAddOutput_new(channel_id_arg_ref, serial_id_arg, sats_arg, script_arg_ref); + LDKTxAddOutput ret_var = TxAddOutput_new(channel_id_arg_conv, serial_id_arg, sats_arg, script_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -45016,27 +48574,31 @@ void CS_LDK_TxRemoveInput_free(int64_t this_obj) { TxRemoveInput_free(this_obj_conv); } -int8_tArray CS_LDK_TxRemoveInput_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_TxRemoveInput_get_channel_id(int64_t this_ptr) { LDKTxRemoveInput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxRemoveInput_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxRemoveInput_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_TxRemoveInput_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_TxRemoveInput_set_channel_id(int64_t this_ptr, int64_t val) { LDKTxRemoveInput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxRemoveInput_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxRemoveInput_set_channel_id(&this_ptr_conv, val_conv); } int64_t CS_LDK_TxRemoveInput_get_serial_id(int64_t this_ptr) { @@ -45058,11 +48620,13 @@ void CS_LDK_TxRemoveInput_set_serial_id(int64_t this_ptr, int64_t val) { TxRemoveInput_set_serial_id(&this_ptr_conv, val); } -int64_t CS_LDK_TxRemoveInput_new(int8_tArray channel_id_arg, int64_t serial_id_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); - LDKTxRemoveInput ret_var = TxRemoveInput_new(channel_id_arg_ref, serial_id_arg); +int64_t CS_LDK_TxRemoveInput_new(int64_t channel_id_arg, int64_t serial_id_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKTxRemoveInput ret_var = TxRemoveInput_new(channel_id_arg_conv, serial_id_arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -45132,27 +48696,31 @@ void CS_LDK_TxRemoveOutput_free(int64_t this_obj) { TxRemoveOutput_free(this_obj_conv); } -int8_tArray CS_LDK_TxRemoveOutput_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_TxRemoveOutput_get_channel_id(int64_t this_ptr) { LDKTxRemoveOutput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxRemoveOutput_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxRemoveOutput_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_TxRemoveOutput_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_TxRemoveOutput_set_channel_id(int64_t this_ptr, int64_t val) { LDKTxRemoveOutput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxRemoveOutput_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxRemoveOutput_set_channel_id(&this_ptr_conv, val_conv); } int64_t CS_LDK_TxRemoveOutput_get_serial_id(int64_t this_ptr) { @@ -45174,11 +48742,13 @@ void CS_LDK_TxRemoveOutput_set_serial_id(int64_t this_ptr, int64_t val) { TxRemoveOutput_set_serial_id(&this_ptr_conv, val); } -int64_t CS_LDK_TxRemoveOutput_new(int8_tArray channel_id_arg, int64_t serial_id_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); - LDKTxRemoveOutput ret_var = TxRemoveOutput_new(channel_id_arg_ref, serial_id_arg); +int64_t CS_LDK_TxRemoveOutput_new(int64_t channel_id_arg, int64_t serial_id_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKTxRemoveOutput ret_var = TxRemoveOutput_new(channel_id_arg_conv, serial_id_arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -45248,34 +48818,40 @@ void CS_LDK_TxComplete_free(int64_t this_obj) { TxComplete_free(this_obj_conv); } -int8_tArray CS_LDK_TxComplete_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_TxComplete_get_channel_id(int64_t this_ptr) { LDKTxComplete this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxComplete_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxComplete_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_TxComplete_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_TxComplete_set_channel_id(int64_t this_ptr, int64_t val) { LDKTxComplete this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxComplete_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxComplete_set_channel_id(&this_ptr_conv, val_conv); } -int64_t CS_LDK_TxComplete_new(int8_tArray channel_id_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); - LDKTxComplete ret_var = TxComplete_new(channel_id_arg_ref); +int64_t CS_LDK_TxComplete_new(int64_t channel_id_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKTxComplete ret_var = TxComplete_new(channel_id_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -45345,27 +48921,31 @@ void CS_LDK_TxSignatures_free(int64_t this_obj) { TxSignatures_free(this_obj_conv); } -int8_tArray CS_LDK_TxSignatures_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_TxSignatures_get_channel_id(int64_t this_ptr) { LDKTxSignatures this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxSignatures_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxSignatures_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_TxSignatures_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_TxSignatures_set_channel_id(int64_t this_ptr, int64_t val) { LDKTxSignatures this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxSignatures_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxSignatures_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray CS_LDK_TxSignatures_get_tx_hash(int64_t this_ptr) { @@ -45439,10 +49019,37 @@ void CS_LDK_TxSignatures_set_witnesses(int64_t this_ptr, ptrArray val) { TxSignatures_set_witnesses(&this_ptr_conv, val_constr); } -int64_t CS_LDK_TxSignatures_new(int8_tArray channel_id_arg, int8_tArray tx_hash_arg, ptrArray witnesses_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_TxSignatures_get_funding_outpoint_sig(int64_t this_ptr) { + LDKTxSignatures this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ"); + *ret_copy = TxSignatures_get_funding_outpoint_sig(&this_ptr_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void CS_LDK_TxSignatures_set_funding_outpoint_sig(int64_t this_ptr, int64_t val) { + LDKTxSignatures this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKCOption_ECDSASignatureZ val_conv = *(LDKCOption_ECDSASignatureZ*)(val_ptr); + val_conv = COption_ECDSASignatureZ_clone((LDKCOption_ECDSASignatureZ*)untag_ptr(val)); + TxSignatures_set_funding_outpoint_sig(&this_ptr_conv, val_conv); +} + +int64_t CS_LDK_TxSignatures_new(int64_t channel_id_arg, int8_tArray tx_hash_arg, ptrArray witnesses_arg, int64_t funding_outpoint_sig_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes tx_hash_arg_ref; CHECK(tx_hash_arg->arr_len == 32); memcpy(tx_hash_arg_ref.data, tx_hash_arg->elems, 32); FREE(tx_hash_arg); @@ -45463,7 +49070,11 @@ int64_t CS_LDK_TxSignatures_new(int8_tArray channel_id_arg, int8_tArray tx_hash witnesses_arg_constr.data[i] = witnesses_arg_conv_8_ref; } FREE(witnesses_arg); - LDKTxSignatures ret_var = TxSignatures_new(channel_id_arg_ref, tx_hash_arg_ref, witnesses_arg_constr); + void* funding_outpoint_sig_arg_ptr = untag_ptr(funding_outpoint_sig_arg); + CHECK_ACCESS(funding_outpoint_sig_arg_ptr); + LDKCOption_ECDSASignatureZ funding_outpoint_sig_arg_conv = *(LDKCOption_ECDSASignatureZ*)(funding_outpoint_sig_arg_ptr); + funding_outpoint_sig_arg_conv = COption_ECDSASignatureZ_clone((LDKCOption_ECDSASignatureZ*)untag_ptr(funding_outpoint_sig_arg)); + LDKTxSignatures ret_var = TxSignatures_new(channel_id_arg_conv, tx_hash_arg_ref, witnesses_arg_constr, funding_outpoint_sig_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -45533,27 +49144,31 @@ void CS_LDK_TxInitRbf_free(int64_t this_obj) { TxInitRbf_free(this_obj_conv); } -int8_tArray CS_LDK_TxInitRbf_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_TxInitRbf_get_channel_id(int64_t this_ptr) { LDKTxInitRbf this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxInitRbf_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxInitRbf_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_TxInitRbf_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_TxInitRbf_set_channel_id(int64_t this_ptr, int64_t val) { LDKTxInitRbf this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxInitRbf_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxInitRbf_set_channel_id(&this_ptr_conv, val_conv); } int32_t CS_LDK_TxInitRbf_get_locktime(int64_t this_ptr) { @@ -45619,15 +49234,17 @@ void CS_LDK_TxInitRbf_set_funding_output_contribution(int64_t this_ptr, int64_t TxInitRbf_set_funding_output_contribution(&this_ptr_conv, val_conv); } -int64_t CS_LDK_TxInitRbf_new(int8_tArray channel_id_arg, int32_t locktime_arg, int32_t feerate_sat_per_1000_weight_arg, int64_t funding_output_contribution_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_TxInitRbf_new(int64_t channel_id_arg, int32_t locktime_arg, int32_t feerate_sat_per_1000_weight_arg, int64_t funding_output_contribution_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); void* funding_output_contribution_arg_ptr = untag_ptr(funding_output_contribution_arg); CHECK_ACCESS(funding_output_contribution_arg_ptr); LDKCOption_i64Z funding_output_contribution_arg_conv = *(LDKCOption_i64Z*)(funding_output_contribution_arg_ptr); funding_output_contribution_arg_conv = COption_i64Z_clone((LDKCOption_i64Z*)untag_ptr(funding_output_contribution_arg)); - LDKTxInitRbf ret_var = TxInitRbf_new(channel_id_arg_ref, locktime_arg, feerate_sat_per_1000_weight_arg, funding_output_contribution_arg_conv); + LDKTxInitRbf ret_var = TxInitRbf_new(channel_id_arg_conv, locktime_arg, feerate_sat_per_1000_weight_arg, funding_output_contribution_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -45697,27 +49314,31 @@ void CS_LDK_TxAckRbf_free(int64_t this_obj) { TxAckRbf_free(this_obj_conv); } -int8_tArray CS_LDK_TxAckRbf_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_TxAckRbf_get_channel_id(int64_t this_ptr) { LDKTxAckRbf this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxAckRbf_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxAckRbf_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_TxAckRbf_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_TxAckRbf_set_channel_id(int64_t this_ptr, int64_t val) { LDKTxAckRbf this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxAckRbf_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxAckRbf_set_channel_id(&this_ptr_conv, val_conv); } int64_t CS_LDK_TxAckRbf_get_funding_output_contribution(int64_t this_ptr) { @@ -45745,15 +49366,17 @@ void CS_LDK_TxAckRbf_set_funding_output_contribution(int64_t this_ptr, int64_t TxAckRbf_set_funding_output_contribution(&this_ptr_conv, val_conv); } -int64_t CS_LDK_TxAckRbf_new(int8_tArray channel_id_arg, int64_t funding_output_contribution_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_TxAckRbf_new(int64_t channel_id_arg, int64_t funding_output_contribution_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); void* funding_output_contribution_arg_ptr = untag_ptr(funding_output_contribution_arg); CHECK_ACCESS(funding_output_contribution_arg_ptr); LDKCOption_i64Z funding_output_contribution_arg_conv = *(LDKCOption_i64Z*)(funding_output_contribution_arg_ptr); funding_output_contribution_arg_conv = COption_i64Z_clone((LDKCOption_i64Z*)untag_ptr(funding_output_contribution_arg)); - LDKTxAckRbf ret_var = TxAckRbf_new(channel_id_arg_ref, funding_output_contribution_arg_conv); + LDKTxAckRbf ret_var = TxAckRbf_new(channel_id_arg_conv, funding_output_contribution_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -45823,27 +49446,31 @@ void CS_LDK_TxAbort_free(int64_t this_obj) { TxAbort_free(this_obj_conv); } -int8_tArray CS_LDK_TxAbort_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_TxAbort_get_channel_id(int64_t this_ptr) { LDKTxAbort this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxAbort_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxAbort_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_TxAbort_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_TxAbort_set_channel_id(int64_t this_ptr, int64_t val) { LDKTxAbort this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxAbort_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxAbort_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray CS_LDK_TxAbort_get_data(int64_t this_ptr) { @@ -45872,15 +49499,17 @@ void CS_LDK_TxAbort_set_data(int64_t this_ptr, int8_tArray val) { TxAbort_set_data(&this_ptr_conv, val_ref); } -int64_t CS_LDK_TxAbort_new(int8_tArray channel_id_arg, int8_tArray data_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_TxAbort_new(int64_t channel_id_arg, int8_tArray data_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKCVec_u8Z data_arg_ref; data_arg_ref.datalen = data_arg->arr_len; data_arg_ref.data = MALLOC(data_arg_ref.datalen, "LDKCVec_u8Z Bytes"); memcpy(data_arg_ref.data, data_arg->elems, data_arg_ref.datalen); FREE(data_arg); - LDKTxAbort ret_var = TxAbort_new(channel_id_arg_ref, data_arg_ref); + LDKTxAbort ret_var = TxAbort_new(channel_id_arg_conv, data_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -45950,27 +49579,31 @@ void CS_LDK_Shutdown_free(int64_t this_obj) { Shutdown_free(this_obj_conv); } -int8_tArray CS_LDK_Shutdown_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_Shutdown_get_channel_id(int64_t this_ptr) { LDKShutdown this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *Shutdown_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = Shutdown_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_Shutdown_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_Shutdown_set_channel_id(int64_t this_ptr, int64_t val) { LDKShutdown this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - Shutdown_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + Shutdown_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray CS_LDK_Shutdown_get_scriptpubkey(int64_t this_ptr) { @@ -45999,15 +49632,17 @@ void CS_LDK_Shutdown_set_scriptpubkey(int64_t this_ptr, int8_tArray val) { Shutdown_set_scriptpubkey(&this_ptr_conv, val_ref); } -int64_t CS_LDK_Shutdown_new(int8_tArray channel_id_arg, int8_tArray scriptpubkey_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_Shutdown_new(int64_t channel_id_arg, int8_tArray scriptpubkey_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKCVec_u8Z scriptpubkey_arg_ref; scriptpubkey_arg_ref.datalen = scriptpubkey_arg->arr_len; scriptpubkey_arg_ref.data = MALLOC(scriptpubkey_arg_ref.datalen, "LDKCVec_u8Z Bytes"); memcpy(scriptpubkey_arg_ref.data, scriptpubkey_arg->elems, scriptpubkey_arg_ref.datalen); FREE(scriptpubkey_arg); - LDKShutdown ret_var = Shutdown_new(channel_id_arg_ref, scriptpubkey_arg_ref); + LDKShutdown ret_var = Shutdown_new(channel_id_arg_conv, scriptpubkey_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -46186,27 +49821,31 @@ void CS_LDK_ClosingSigned_free(int64_t this_obj) { ClosingSigned_free(this_obj_conv); } -int8_tArray CS_LDK_ClosingSigned_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_ClosingSigned_get_channel_id(int64_t this_ptr) { LDKClosingSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *ClosingSigned_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = ClosingSigned_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_ClosingSigned_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_ClosingSigned_set_channel_id(int64_t this_ptr, int64_t val) { LDKClosingSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - ClosingSigned_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ClosingSigned_set_channel_id(&this_ptr_conv, val_conv); } int64_t CS_LDK_ClosingSigned_get_fee_satoshis(int64_t this_ptr) { @@ -46278,10 +49917,12 @@ void CS_LDK_ClosingSigned_set_fee_range(int64_t this_ptr, int64_t val) { ClosingSigned_set_fee_range(&this_ptr_conv, val_conv); } -int64_t CS_LDK_ClosingSigned_new(int8_tArray channel_id_arg, int64_t fee_satoshis_arg, int8_tArray signature_arg, int64_t fee_range_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_ClosingSigned_new(int64_t channel_id_arg, int64_t fee_satoshis_arg, int8_tArray signature_arg, int64_t fee_range_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKECDSASignature signature_arg_ref; CHECK(signature_arg->arr_len == 64); memcpy(signature_arg_ref.compact_form, signature_arg->elems, 64); FREE(signature_arg); @@ -46290,7 +49931,7 @@ int64_t CS_LDK_ClosingSigned_new(int8_tArray channel_id_arg, int64_t fee_satosh fee_range_arg_conv.is_owned = ptr_is_owned(fee_range_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(fee_range_arg_conv); fee_range_arg_conv = ClosingSignedFeeRange_clone(&fee_range_arg_conv); - LDKClosingSigned ret_var = ClosingSigned_new(channel_id_arg_ref, fee_satoshis_arg, signature_arg_ref, fee_range_arg_conv); + LDKClosingSigned ret_var = ClosingSigned_new(channel_id_arg_conv, fee_satoshis_arg, signature_arg_ref, fee_range_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -46360,27 +50001,31 @@ void CS_LDK_UpdateAddHTLC_free(int64_t this_obj) { UpdateAddHTLC_free(this_obj_conv); } -int8_tArray CS_LDK_UpdateAddHTLC_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_UpdateAddHTLC_get_channel_id(int64_t this_ptr) { LDKUpdateAddHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *UpdateAddHTLC_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = UpdateAddHTLC_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_UpdateAddHTLC_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_UpdateAddHTLC_set_channel_id(int64_t this_ptr, int64_t val) { LDKUpdateAddHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - UpdateAddHTLC_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + UpdateAddHTLC_set_channel_id(&this_ptr_conv, val_conv); } int64_t CS_LDK_UpdateAddHTLC_get_htlc_id(int64_t this_ptr) { @@ -46538,10 +50183,12 @@ void CS_LDK_UpdateAddHTLC_set_blinding_point(int64_t this_ptr, int8_tArray val) UpdateAddHTLC_set_blinding_point(&this_ptr_conv, val_ref); } -int64_t CS_LDK_UpdateAddHTLC_new(int8_tArray channel_id_arg, int64_t htlc_id_arg, int64_t amount_msat_arg, int8_tArray payment_hash_arg, int32_t cltv_expiry_arg, int64_t skimmed_fee_msat_arg, int64_t onion_routing_packet_arg, int8_tArray blinding_point_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_UpdateAddHTLC_new(int64_t channel_id_arg, int64_t htlc_id_arg, int64_t amount_msat_arg, int8_tArray payment_hash_arg, int32_t cltv_expiry_arg, int64_t skimmed_fee_msat_arg, int64_t onion_routing_packet_arg, int8_tArray blinding_point_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes payment_hash_arg_ref; CHECK(payment_hash_arg->arr_len == 32); memcpy(payment_hash_arg_ref.data, payment_hash_arg->elems, 32); FREE(payment_hash_arg); @@ -46557,7 +50204,7 @@ int64_t CS_LDK_UpdateAddHTLC_new(int8_tArray channel_id_arg, int64_t htlc_id_ar LDKPublicKey blinding_point_arg_ref; CHECK(blinding_point_arg->arr_len == 33); memcpy(blinding_point_arg_ref.compressed_form, blinding_point_arg->elems, 33); FREE(blinding_point_arg); - LDKUpdateAddHTLC ret_var = UpdateAddHTLC_new(channel_id_arg_ref, htlc_id_arg, amount_msat_arg, payment_hash_arg_ref, cltv_expiry_arg, skimmed_fee_msat_arg_conv, onion_routing_packet_arg_conv, blinding_point_arg_ref); + LDKUpdateAddHTLC ret_var = UpdateAddHTLC_new(channel_id_arg_conv, htlc_id_arg, amount_msat_arg, payment_hash_arg_ref, cltv_expiry_arg, skimmed_fee_msat_arg_conv, onion_routing_packet_arg_conv, blinding_point_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -46756,27 +50403,31 @@ void CS_LDK_UpdateFulfillHTLC_free(int64_t this_obj) { UpdateFulfillHTLC_free(this_obj_conv); } -int8_tArray CS_LDK_UpdateFulfillHTLC_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_UpdateFulfillHTLC_get_channel_id(int64_t this_ptr) { LDKUpdateFulfillHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *UpdateFulfillHTLC_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = UpdateFulfillHTLC_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_UpdateFulfillHTLC_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_UpdateFulfillHTLC_set_channel_id(int64_t this_ptr, int64_t val) { LDKUpdateFulfillHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - UpdateFulfillHTLC_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + UpdateFulfillHTLC_set_channel_id(&this_ptr_conv, val_conv); } int64_t CS_LDK_UpdateFulfillHTLC_get_htlc_id(int64_t this_ptr) { @@ -46821,14 +50472,16 @@ void CS_LDK_UpdateFulfillHTLC_set_payment_preimage(int64_t this_ptr, int8_tArra UpdateFulfillHTLC_set_payment_preimage(&this_ptr_conv, val_ref); } -int64_t CS_LDK_UpdateFulfillHTLC_new(int8_tArray channel_id_arg, int64_t htlc_id_arg, int8_tArray payment_preimage_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_UpdateFulfillHTLC_new(int64_t channel_id_arg, int64_t htlc_id_arg, int8_tArray payment_preimage_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes payment_preimage_arg_ref; CHECK(payment_preimage_arg->arr_len == 32); memcpy(payment_preimage_arg_ref.data, payment_preimage_arg->elems, 32); FREE(payment_preimage_arg); - LDKUpdateFulfillHTLC ret_var = UpdateFulfillHTLC_new(channel_id_arg_ref, htlc_id_arg, payment_preimage_arg_ref); + LDKUpdateFulfillHTLC ret_var = UpdateFulfillHTLC_new(channel_id_arg_conv, htlc_id_arg, payment_preimage_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -46898,27 +50551,31 @@ void CS_LDK_UpdateFailHTLC_free(int64_t this_obj) { UpdateFailHTLC_free(this_obj_conv); } -int8_tArray CS_LDK_UpdateFailHTLC_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_UpdateFailHTLC_get_channel_id(int64_t this_ptr) { LDKUpdateFailHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *UpdateFailHTLC_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = UpdateFailHTLC_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_UpdateFailHTLC_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_UpdateFailHTLC_set_channel_id(int64_t this_ptr, int64_t val) { LDKUpdateFailHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - UpdateFailHTLC_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + UpdateFailHTLC_set_channel_id(&this_ptr_conv, val_conv); } int64_t CS_LDK_UpdateFailHTLC_get_htlc_id(int64_t this_ptr) { @@ -47003,27 +50660,31 @@ void CS_LDK_UpdateFailMalformedHTLC_free(int64_t this_obj) { UpdateFailMalformedHTLC_free(this_obj_conv); } -int8_tArray CS_LDK_UpdateFailMalformedHTLC_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_UpdateFailMalformedHTLC_get_channel_id(int64_t this_ptr) { LDKUpdateFailMalformedHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *UpdateFailMalformedHTLC_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = UpdateFailMalformedHTLC_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_UpdateFailMalformedHTLC_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_UpdateFailMalformedHTLC_set_channel_id(int64_t this_ptr, int64_t val) { LDKUpdateFailMalformedHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - UpdateFailMalformedHTLC_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + UpdateFailMalformedHTLC_set_channel_id(&this_ptr_conv, val_conv); } int64_t CS_LDK_UpdateFailMalformedHTLC_get_htlc_id(int64_t this_ptr) { @@ -47127,27 +50788,31 @@ void CS_LDK_CommitmentSigned_free(int64_t this_obj) { CommitmentSigned_free(this_obj_conv); } -int8_tArray CS_LDK_CommitmentSigned_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_CommitmentSigned_get_channel_id(int64_t this_ptr) { LDKCommitmentSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *CommitmentSigned_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = CommitmentSigned_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_CommitmentSigned_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_CommitmentSigned_set_channel_id(int64_t this_ptr, int64_t val) { LDKCommitmentSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - CommitmentSigned_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + CommitmentSigned_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray CS_LDK_CommitmentSigned_get_signature(int64_t this_ptr) { @@ -47217,10 +50882,12 @@ void CS_LDK_CommitmentSigned_set_htlc_signatures(int64_t this_ptr, ptrArray val CommitmentSigned_set_htlc_signatures(&this_ptr_conv, val_constr); } -int64_t CS_LDK_CommitmentSigned_new(int8_tArray channel_id_arg, int8_tArray signature_arg, ptrArray htlc_signatures_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_CommitmentSigned_new(int64_t channel_id_arg, int8_tArray signature_arg, ptrArray htlc_signatures_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKECDSASignature signature_arg_ref; CHECK(signature_arg->arr_len == 64); memcpy(signature_arg_ref.compact_form, signature_arg->elems, 64); FREE(signature_arg); @@ -47239,7 +50906,7 @@ int64_t CS_LDK_CommitmentSigned_new(int8_tArray channel_id_arg, int8_tArray sig htlc_signatures_arg_constr.data[i] = htlc_signatures_arg_conv_8_ref; } FREE(htlc_signatures_arg); - LDKCommitmentSigned ret_var = CommitmentSigned_new(channel_id_arg_ref, signature_arg_ref, htlc_signatures_arg_constr); + LDKCommitmentSigned ret_var = CommitmentSigned_new(channel_id_arg_conv, signature_arg_ref, htlc_signatures_arg_constr); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -47309,27 +50976,31 @@ void CS_LDK_RevokeAndACK_free(int64_t this_obj) { RevokeAndACK_free(this_obj_conv); } -int8_tArray CS_LDK_RevokeAndACK_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_RevokeAndACK_get_channel_id(int64_t this_ptr) { LDKRevokeAndACK this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *RevokeAndACK_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = RevokeAndACK_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_RevokeAndACK_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_RevokeAndACK_set_channel_id(int64_t this_ptr, int64_t val) { LDKRevokeAndACK this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - RevokeAndACK_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + RevokeAndACK_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray CS_LDK_RevokeAndACK_get_per_commitment_secret(int64_t this_ptr) { @@ -47378,17 +51049,19 @@ void CS_LDK_RevokeAndACK_set_next_per_commitment_point(int64_t this_ptr, int8_t RevokeAndACK_set_next_per_commitment_point(&this_ptr_conv, val_ref); } -int64_t CS_LDK_RevokeAndACK_new(int8_tArray channel_id_arg, int8_tArray per_commitment_secret_arg, int8_tArray next_per_commitment_point_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_RevokeAndACK_new(int64_t channel_id_arg, int8_tArray per_commitment_secret_arg, int8_tArray next_per_commitment_point_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes per_commitment_secret_arg_ref; CHECK(per_commitment_secret_arg->arr_len == 32); memcpy(per_commitment_secret_arg_ref.data, per_commitment_secret_arg->elems, 32); FREE(per_commitment_secret_arg); LDKPublicKey next_per_commitment_point_arg_ref; CHECK(next_per_commitment_point_arg->arr_len == 33); memcpy(next_per_commitment_point_arg_ref.compressed_form, next_per_commitment_point_arg->elems, 33); FREE(next_per_commitment_point_arg); - LDKRevokeAndACK ret_var = RevokeAndACK_new(channel_id_arg_ref, per_commitment_secret_arg_ref, next_per_commitment_point_arg_ref); + LDKRevokeAndACK ret_var = RevokeAndACK_new(channel_id_arg_conv, per_commitment_secret_arg_ref, next_per_commitment_point_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -47458,27 +51131,31 @@ void CS_LDK_UpdateFee_free(int64_t this_obj) { UpdateFee_free(this_obj_conv); } -int8_tArray CS_LDK_UpdateFee_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_UpdateFee_get_channel_id(int64_t this_ptr) { LDKUpdateFee this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *UpdateFee_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = UpdateFee_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_UpdateFee_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_UpdateFee_set_channel_id(int64_t this_ptr, int64_t val) { LDKUpdateFee this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - UpdateFee_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + UpdateFee_set_channel_id(&this_ptr_conv, val_conv); } int32_t CS_LDK_UpdateFee_get_feerate_per_kw(int64_t this_ptr) { @@ -47500,11 +51177,13 @@ void CS_LDK_UpdateFee_set_feerate_per_kw(int64_t this_ptr, int32_t val) { UpdateFee_set_feerate_per_kw(&this_ptr_conv, val); } -int64_t CS_LDK_UpdateFee_new(int8_tArray channel_id_arg, int32_t feerate_per_kw_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); - LDKUpdateFee ret_var = UpdateFee_new(channel_id_arg_ref, feerate_per_kw_arg); +int64_t CS_LDK_UpdateFee_new(int64_t channel_id_arg, int32_t feerate_per_kw_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKUpdateFee ret_var = UpdateFee_new(channel_id_arg_conv, feerate_per_kw_arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -47574,27 +51253,31 @@ void CS_LDK_ChannelReestablish_free(int64_t this_obj) { ChannelReestablish_free(this_obj_conv); } -int8_tArray CS_LDK_ChannelReestablish_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_ChannelReestablish_get_channel_id(int64_t this_ptr) { LDKChannelReestablish this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *ChannelReestablish_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = ChannelReestablish_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_ChannelReestablish_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_ChannelReestablish_set_channel_id(int64_t this_ptr, int64_t val) { LDKChannelReestablish this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - ChannelReestablish_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ChannelReestablish_set_channel_id(&this_ptr_conv, val_conv); } int64_t CS_LDK_ChannelReestablish_get_next_local_commitment_number(int64_t this_ptr) { @@ -47706,10 +51389,12 @@ void CS_LDK_ChannelReestablish_set_next_funding_txid(int64_t this_ptr, int64_t ChannelReestablish_set_next_funding_txid(&this_ptr_conv, val_conv); } -int64_t CS_LDK_ChannelReestablish_new(int8_tArray channel_id_arg, int64_t next_local_commitment_number_arg, int64_t next_remote_commitment_number_arg, int8_tArray your_last_per_commitment_secret_arg, int8_tArray my_current_per_commitment_point_arg, int64_t next_funding_txid_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_ChannelReestablish_new(int64_t channel_id_arg, int64_t next_local_commitment_number_arg, int64_t next_remote_commitment_number_arg, int8_tArray your_last_per_commitment_secret_arg, int8_tArray my_current_per_commitment_point_arg, int64_t next_funding_txid_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes your_last_per_commitment_secret_arg_ref; CHECK(your_last_per_commitment_secret_arg->arr_len == 32); memcpy(your_last_per_commitment_secret_arg_ref.data, your_last_per_commitment_secret_arg->elems, 32); FREE(your_last_per_commitment_secret_arg); @@ -47720,7 +51405,7 @@ int64_t CS_LDK_ChannelReestablish_new(int8_tArray channel_id_arg, int64_t next_ CHECK_ACCESS(next_funding_txid_arg_ptr); LDKCOption_ThirtyTwoBytesZ next_funding_txid_arg_conv = *(LDKCOption_ThirtyTwoBytesZ*)(next_funding_txid_arg_ptr); next_funding_txid_arg_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(next_funding_txid_arg)); - LDKChannelReestablish ret_var = ChannelReestablish_new(channel_id_arg_ref, next_local_commitment_number_arg, next_remote_commitment_number_arg, your_last_per_commitment_secret_arg_ref, my_current_per_commitment_point_arg_ref, next_funding_txid_arg_conv); + LDKChannelReestablish ret_var = ChannelReestablish_new(channel_id_arg_conv, next_local_commitment_number_arg, next_remote_commitment_number_arg, your_last_per_commitment_secret_arg_ref, my_current_per_commitment_point_arg_ref, next_funding_txid_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -47790,27 +51475,31 @@ void CS_LDK_AnnouncementSignatures_free(int64_t this_obj) { AnnouncementSignatures_free(this_obj_conv); } -int8_tArray CS_LDK_AnnouncementSignatures_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_AnnouncementSignatures_get_channel_id(int64_t this_ptr) { LDKAnnouncementSignatures this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *AnnouncementSignatures_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = AnnouncementSignatures_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_AnnouncementSignatures_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_AnnouncementSignatures_set_channel_id(int64_t this_ptr, int64_t val) { LDKAnnouncementSignatures this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - AnnouncementSignatures_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + AnnouncementSignatures_set_channel_id(&this_ptr_conv, val_conv); } int64_t CS_LDK_AnnouncementSignatures_get_short_channel_id(int64_t this_ptr) { @@ -47878,17 +51567,19 @@ void CS_LDK_AnnouncementSignatures_set_bitcoin_signature(int64_t this_ptr, int8 AnnouncementSignatures_set_bitcoin_signature(&this_ptr_conv, val_ref); } -int64_t CS_LDK_AnnouncementSignatures_new(int8_tArray channel_id_arg, int64_t short_channel_id_arg, int8_tArray node_signature_arg, int8_tArray bitcoin_signature_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_AnnouncementSignatures_new(int64_t channel_id_arg, int64_t short_channel_id_arg, int8_tArray node_signature_arg, int8_tArray bitcoin_signature_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKECDSASignature node_signature_arg_ref; CHECK(node_signature_arg->arr_len == 64); memcpy(node_signature_arg_ref.compact_form, node_signature_arg->elems, 64); FREE(node_signature_arg); LDKECDSASignature bitcoin_signature_arg_ref; CHECK(bitcoin_signature_arg->arr_len == 64); memcpy(bitcoin_signature_arg_ref.compact_form, bitcoin_signature_arg->elems, 64); FREE(bitcoin_signature_arg); - LDKAnnouncementSignatures ret_var = AnnouncementSignatures_new(channel_id_arg_ref, short_channel_id_arg, node_signature_arg_ref, bitcoin_signature_arg_ref); + LDKAnnouncementSignatures ret_var = AnnouncementSignatures_new(channel_id_arg_conv, short_channel_id_arg, node_signature_arg_ref, bitcoin_signature_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -48375,6 +52066,107 @@ void CS_LDK_UnsignedNodeAnnouncement_set_addresses(int64_t this_ptr, int64_tArr UnsignedNodeAnnouncement_set_addresses(&this_ptr_conv, val_constr); } +int8_tArray CS_LDK_UnsignedNodeAnnouncement_get_excess_address_data(int64_t this_ptr) { + LDKUnsignedNodeAnnouncement this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z ret_var = UnsignedNodeAnnouncement_get_excess_address_data(&this_ptr_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +void CS_LDK_UnsignedNodeAnnouncement_set_excess_address_data(int64_t this_ptr, int8_tArray val) { + LDKUnsignedNodeAnnouncement this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z val_ref; + val_ref.datalen = val->arr_len; + val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(val_ref.data, val->elems, val_ref.datalen); FREE(val); + UnsignedNodeAnnouncement_set_excess_address_data(&this_ptr_conv, val_ref); +} + +int8_tArray CS_LDK_UnsignedNodeAnnouncement_get_excess_data(int64_t this_ptr) { + LDKUnsignedNodeAnnouncement this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z ret_var = UnsignedNodeAnnouncement_get_excess_data(&this_ptr_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +void CS_LDK_UnsignedNodeAnnouncement_set_excess_data(int64_t this_ptr, int8_tArray val) { + LDKUnsignedNodeAnnouncement this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z val_ref; + val_ref.datalen = val->arr_len; + val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(val_ref.data, val->elems, val_ref.datalen); FREE(val); + UnsignedNodeAnnouncement_set_excess_data(&this_ptr_conv, val_ref); +} + +int64_t CS_LDK_UnsignedNodeAnnouncement_new(int64_t features_arg, int32_t timestamp_arg, int64_t node_id_arg, int8_tArray rgb_arg, int64_t alias_arg, int64_tArray addresses_arg, int8_tArray excess_address_data_arg, int8_tArray excess_data_arg) { + LDKNodeFeatures features_arg_conv; + features_arg_conv.inner = untag_ptr(features_arg); + features_arg_conv.is_owned = ptr_is_owned(features_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(features_arg_conv); + features_arg_conv = NodeFeatures_clone(&features_arg_conv); + LDKNodeId node_id_arg_conv; + node_id_arg_conv.inner = untag_ptr(node_id_arg); + node_id_arg_conv.is_owned = ptr_is_owned(node_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(node_id_arg_conv); + node_id_arg_conv = NodeId_clone(&node_id_arg_conv); + LDKThreeBytes rgb_arg_ref; + CHECK(rgb_arg->arr_len == 3); + memcpy(rgb_arg_ref.data, rgb_arg->elems, 3); FREE(rgb_arg); + LDKNodeAlias alias_arg_conv; + alias_arg_conv.inner = untag_ptr(alias_arg); + alias_arg_conv.is_owned = ptr_is_owned(alias_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(alias_arg_conv); + alias_arg_conv = NodeAlias_clone(&alias_arg_conv); + LDKCVec_SocketAddressZ addresses_arg_constr; + addresses_arg_constr.datalen = addresses_arg->arr_len; + if (addresses_arg_constr.datalen > 0) + addresses_arg_constr.data = MALLOC(addresses_arg_constr.datalen * sizeof(LDKSocketAddress), "LDKCVec_SocketAddressZ Elements"); + else + addresses_arg_constr.data = NULL; + int64_t* addresses_arg_vals = addresses_arg->elems; + for (size_t p = 0; p < addresses_arg_constr.datalen; p++) { + int64_t addresses_arg_conv_15 = addresses_arg_vals[p]; + void* addresses_arg_conv_15_ptr = untag_ptr(addresses_arg_conv_15); + CHECK_ACCESS(addresses_arg_conv_15_ptr); + LDKSocketAddress addresses_arg_conv_15_conv = *(LDKSocketAddress*)(addresses_arg_conv_15_ptr); + addresses_arg_constr.data[p] = addresses_arg_conv_15_conv; + } + FREE(addresses_arg); + LDKCVec_u8Z excess_address_data_arg_ref; + excess_address_data_arg_ref.datalen = excess_address_data_arg->arr_len; + excess_address_data_arg_ref.data = MALLOC(excess_address_data_arg_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(excess_address_data_arg_ref.data, excess_address_data_arg->elems, excess_address_data_arg_ref.datalen); FREE(excess_address_data_arg); + LDKCVec_u8Z excess_data_arg_ref; + excess_data_arg_ref.datalen = excess_data_arg->arr_len; + excess_data_arg_ref.data = MALLOC(excess_data_arg_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(excess_data_arg_ref.data, excess_data_arg->elems, excess_data_arg_ref.datalen); FREE(excess_data_arg); + LDKUnsignedNodeAnnouncement ret_var = UnsignedNodeAnnouncement_new(features_arg_conv, timestamp_arg, node_id_arg_conv, rgb_arg_ref, alias_arg_conv, addresses_arg_constr, excess_address_data_arg_ref, excess_data_arg_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + static inline uint64_t UnsignedNodeAnnouncement_clone_ptr(LDKUnsignedNodeAnnouncement *NONNULL_PTR arg) { LDKUnsignedNodeAnnouncement ret_var = UnsignedNodeAnnouncement_clone(arg); int64_t ret_ref = 0; @@ -51067,6 +54859,191 @@ jboolean CS_LDK_OnionPacket_eq(int64_t a, int64_t b) { return ret_conv; } +void CS_LDK_TrampolineOnionPacket_free(int64_t this_obj) { + LDKTrampolineOnionPacket this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + TrampolineOnionPacket_free(this_obj_conv); +} + +int8_t CS_LDK_TrampolineOnionPacket_get_version(int64_t this_ptr) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_t ret_conv = TrampolineOnionPacket_get_version(&this_ptr_conv); + return ret_conv; +} + +void CS_LDK_TrampolineOnionPacket_set_version(int64_t this_ptr, int8_t val) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + TrampolineOnionPacket_set_version(&this_ptr_conv, val); +} + +int8_tArray CS_LDK_TrampolineOnionPacket_get_public_key(int64_t this_ptr) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(33, __LINE__); + memcpy(ret_arr->elems, TrampolineOnionPacket_get_public_key(&this_ptr_conv).compressed_form, 33); + return ret_arr; +} + +void CS_LDK_TrampolineOnionPacket_set_public_key(int64_t this_ptr, int8_tArray val) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKPublicKey val_ref; + CHECK(val->arr_len == 33); + memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); + TrampolineOnionPacket_set_public_key(&this_ptr_conv, val_ref); +} + +int8_tArray CS_LDK_TrampolineOnionPacket_get_hop_data(int64_t this_ptr) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z ret_var = TrampolineOnionPacket_get_hop_data(&this_ptr_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +void CS_LDK_TrampolineOnionPacket_set_hop_data(int64_t this_ptr, int8_tArray val) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z val_ref; + val_ref.datalen = val->arr_len; + val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(val_ref.data, val->elems, val_ref.datalen); FREE(val); + TrampolineOnionPacket_set_hop_data(&this_ptr_conv, val_ref); +} + +int8_tArray CS_LDK_TrampolineOnionPacket_get_hmac(int64_t this_ptr) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(32, __LINE__); + memcpy(ret_arr->elems, *TrampolineOnionPacket_get_hmac(&this_ptr_conv), 32); + return ret_arr; +} + +void CS_LDK_TrampolineOnionPacket_set_hmac(int64_t this_ptr, int8_tArray val) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKThirtyTwoBytes val_ref; + CHECK(val->arr_len == 32); + memcpy(val_ref.data, val->elems, 32); FREE(val); + TrampolineOnionPacket_set_hmac(&this_ptr_conv, val_ref); +} + +int64_t CS_LDK_TrampolineOnionPacket_new(int8_t version_arg, int8_tArray public_key_arg, int8_tArray hop_data_arg, int8_tArray hmac_arg) { + LDKPublicKey public_key_arg_ref; + CHECK(public_key_arg->arr_len == 33); + memcpy(public_key_arg_ref.compressed_form, public_key_arg->elems, 33); FREE(public_key_arg); + LDKCVec_u8Z hop_data_arg_ref; + hop_data_arg_ref.datalen = hop_data_arg->arr_len; + hop_data_arg_ref.data = MALLOC(hop_data_arg_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(hop_data_arg_ref.data, hop_data_arg->elems, hop_data_arg_ref.datalen); FREE(hop_data_arg); + LDKThirtyTwoBytes hmac_arg_ref; + CHECK(hmac_arg->arr_len == 32); + memcpy(hmac_arg_ref.data, hmac_arg->elems, 32); FREE(hmac_arg); + LDKTrampolineOnionPacket ret_var = TrampolineOnionPacket_new(version_arg, public_key_arg_ref, hop_data_arg_ref, hmac_arg_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t TrampolineOnionPacket_clone_ptr(LDKTrampolineOnionPacket *NONNULL_PTR arg) { + LDKTrampolineOnionPacket ret_var = TrampolineOnionPacket_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t CS_LDK_TrampolineOnionPacket_clone_ptr(int64_t arg) { + LDKTrampolineOnionPacket arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = TrampolineOnionPacket_clone_ptr(&arg_conv); + return ret_conv; +} + +int64_t CS_LDK_TrampolineOnionPacket_clone(int64_t orig) { + LDKTrampolineOnionPacket orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKTrampolineOnionPacket ret_var = TrampolineOnionPacket_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_TrampolineOnionPacket_hash(int64_t o) { + LDKTrampolineOnionPacket o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = TrampolineOnionPacket_hash(&o_conv); + return ret_conv; +} + +jboolean CS_LDK_TrampolineOnionPacket_eq(int64_t a, int64_t b) { + LDKTrampolineOnionPacket a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKTrampolineOnionPacket b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = TrampolineOnionPacket_eq(&a_conv, &b_conv); + return ret_conv; +} + +int8_tArray CS_LDK_TrampolineOnionPacket_write(int64_t obj) { + LDKTrampolineOnionPacket obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = TrampolineOnionPacket_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + int8_tArray CS_LDK_AcceptChannel_write(int64_t obj) { LDKAcceptChannel obj_conv; obj_conv.inner = untag_ptr(obj); @@ -52584,6 +56561,127 @@ void CS_LDK_SocketDescriptor_free(int64_t this_ptr) { SocketDescriptor_free(this_ptr_conv); } +void CS_LDK_PeerDetails_free(int64_t this_obj) { + LDKPeerDetails this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + PeerDetails_free(this_obj_conv); +} + +int8_tArray CS_LDK_PeerDetails_get_counterparty_node_id(int64_t this_ptr) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(33, __LINE__); + memcpy(ret_arr->elems, PeerDetails_get_counterparty_node_id(&this_ptr_conv).compressed_form, 33); + return ret_arr; +} + +void CS_LDK_PeerDetails_set_counterparty_node_id(int64_t this_ptr, int8_tArray val) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKPublicKey val_ref; + CHECK(val->arr_len == 33); + memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); + PeerDetails_set_counterparty_node_id(&this_ptr_conv, val_ref); +} + +int64_t CS_LDK_PeerDetails_get_socket_address(int64_t this_ptr) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCOption_SocketAddressZ *ret_copy = MALLOC(sizeof(LDKCOption_SocketAddressZ), "LDKCOption_SocketAddressZ"); + *ret_copy = PeerDetails_get_socket_address(&this_ptr_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void CS_LDK_PeerDetails_set_socket_address(int64_t this_ptr, int64_t val) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKCOption_SocketAddressZ val_conv = *(LDKCOption_SocketAddressZ*)(val_ptr); + val_conv = COption_SocketAddressZ_clone((LDKCOption_SocketAddressZ*)untag_ptr(val)); + PeerDetails_set_socket_address(&this_ptr_conv, val_conv); +} + +int64_t CS_LDK_PeerDetails_get_init_features(int64_t this_ptr) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKInitFeatures ret_var = PeerDetails_get_init_features(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void CS_LDK_PeerDetails_set_init_features(int64_t this_ptr, int64_t val) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKInitFeatures val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = InitFeatures_clone(&val_conv); + PeerDetails_set_init_features(&this_ptr_conv, val_conv); +} + +jboolean CS_LDK_PeerDetails_get_is_inbound_connection(int64_t this_ptr) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + jboolean ret_conv = PeerDetails_get_is_inbound_connection(&this_ptr_conv); + return ret_conv; +} + +void CS_LDK_PeerDetails_set_is_inbound_connection(int64_t this_ptr, jboolean val) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + PeerDetails_set_is_inbound_connection(&this_ptr_conv, val); +} + +int64_t CS_LDK_PeerDetails_new(int8_tArray counterparty_node_id_arg, int64_t socket_address_arg, int64_t init_features_arg, jboolean is_inbound_connection_arg) { + LDKPublicKey counterparty_node_id_arg_ref; + CHECK(counterparty_node_id_arg->arr_len == 33); + memcpy(counterparty_node_id_arg_ref.compressed_form, counterparty_node_id_arg->elems, 33); FREE(counterparty_node_id_arg); + void* socket_address_arg_ptr = untag_ptr(socket_address_arg); + CHECK_ACCESS(socket_address_arg_ptr); + LDKCOption_SocketAddressZ socket_address_arg_conv = *(LDKCOption_SocketAddressZ*)(socket_address_arg_ptr); + LDKInitFeatures init_features_arg_conv; + init_features_arg_conv.inner = untag_ptr(init_features_arg); + init_features_arg_conv.is_owned = ptr_is_owned(init_features_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(init_features_arg_conv); + init_features_arg_conv = InitFeatures_clone(&init_features_arg_conv); + LDKPeerDetails ret_var = PeerDetails_new(counterparty_node_id_arg_ref, socket_address_arg_conv, init_features_arg_conv, is_inbound_connection_arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + void CS_LDK_PeerHandleError_free(int64_t this_obj) { LDKPeerHandleError this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -52670,26 +56768,44 @@ int64_t CS_LDK_PeerManager_new(int64_t message_handler, int32_t current_time, i return ret_ref; } -int64_tArray CS_LDK_PeerManager_get_peer_node_ids(int64_t this_arg) { +int64_tArray CS_LDK_PeerManager_list_peers(int64_t this_arg) { LDKPeerManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ ret_var = PeerManager_get_peer_node_ids(&this_arg_conv); + LDKCVec_PeerDetailsZ ret_var = PeerManager_list_peers(&this_arg_conv); int64_tArray ret_arr = NULL; ret_arr = init_int64_tArray(ret_var.datalen, __LINE__); int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8); - for (size_t r = 0; r < ret_var.datalen; r++) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv_43_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ"); - *ret_conv_43_conv = ret_var.data[r]; - ret_arr_ptr[r] = tag_ptr(ret_conv_43_conv, true); + for (size_t n = 0; n < ret_var.datalen; n++) { + LDKPeerDetails ret_conv_13_var = ret_var.data[n]; + int64_t ret_conv_13_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_13_var); + ret_conv_13_ref = tag_ptr(ret_conv_13_var.inner, ret_conv_13_var.is_owned); + ret_arr_ptr[n] = ret_conv_13_ref; } FREE(ret_var.data); return ret_arr; } +int64_t CS_LDK_PeerManager_peer_by_node_id(int64_t this_arg, int8_tArray their_node_id) { + LDKPeerManager this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKPublicKey their_node_id_ref; + CHECK(their_node_id->arr_len == 33); + memcpy(their_node_id_ref.compressed_form, their_node_id->elems, 33); FREE(their_node_id); + LDKPeerDetails ret_var = PeerManager_peer_by_node_id(&this_arg_conv, their_node_id_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + int64_t CS_LDK_PeerManager_new_outbound_connection(int64_t this_arg, int8_tArray their_node_id, int64_t descriptor, int64_t remote_network_address) { LDKPeerManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -58522,6 +62638,120 @@ jboolean CS_LDK_NodeFeatures_requires_keysend(int64_t this_arg) { return ret_conv; } +void CS_LDK_InitFeatures_set_trampoline_routing_optional(int64_t this_arg) { + LDKInitFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + InitFeatures_set_trampoline_routing_optional(&this_arg_conv); +} + +void CS_LDK_InitFeatures_set_trampoline_routing_required(int64_t this_arg) { + LDKInitFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + InitFeatures_set_trampoline_routing_required(&this_arg_conv); +} + +jboolean CS_LDK_InitFeatures_supports_trampoline_routing(int64_t this_arg) { + LDKInitFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = InitFeatures_supports_trampoline_routing(&this_arg_conv); + return ret_conv; +} + +void CS_LDK_NodeFeatures_set_trampoline_routing_optional(int64_t this_arg) { + LDKNodeFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + NodeFeatures_set_trampoline_routing_optional(&this_arg_conv); +} + +void CS_LDK_NodeFeatures_set_trampoline_routing_required(int64_t this_arg) { + LDKNodeFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + NodeFeatures_set_trampoline_routing_required(&this_arg_conv); +} + +jboolean CS_LDK_NodeFeatures_supports_trampoline_routing(int64_t this_arg) { + LDKNodeFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = NodeFeatures_supports_trampoline_routing(&this_arg_conv); + return ret_conv; +} + +void CS_LDK_Bolt11InvoiceFeatures_set_trampoline_routing_optional(int64_t this_arg) { + LDKBolt11InvoiceFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + Bolt11InvoiceFeatures_set_trampoline_routing_optional(&this_arg_conv); +} + +void CS_LDK_Bolt11InvoiceFeatures_set_trampoline_routing_required(int64_t this_arg) { + LDKBolt11InvoiceFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + Bolt11InvoiceFeatures_set_trampoline_routing_required(&this_arg_conv); +} + +jboolean CS_LDK_Bolt11InvoiceFeatures_supports_trampoline_routing(int64_t this_arg) { + LDKBolt11InvoiceFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = Bolt11InvoiceFeatures_supports_trampoline_routing(&this_arg_conv); + return ret_conv; +} + +jboolean CS_LDK_InitFeatures_requires_trampoline_routing(int64_t this_arg) { + LDKInitFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = InitFeatures_requires_trampoline_routing(&this_arg_conv); + return ret_conv; +} + +jboolean CS_LDK_NodeFeatures_requires_trampoline_routing(int64_t this_arg) { + LDKNodeFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = NodeFeatures_requires_trampoline_routing(&this_arg_conv); + return ret_conv; +} + +jboolean CS_LDK_Bolt11InvoiceFeatures_requires_trampoline_routing(int64_t this_arg) { + LDKBolt11InvoiceFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = Bolt11InvoiceFeatures_requires_trampoline_routing(&this_arg_conv); + return ret_conv; +} + void CS_LDK_ShutdownScript_free(int64_t this_obj) { LDKShutdownScript this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -58747,6 +62977,222 @@ jboolean CS_LDK_ShutdownScript_is_compatible(int64_t this_arg, int64_t features return ret_conv; } +void CS_LDK_ChannelId_free(int64_t this_obj) { + LDKChannelId this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + ChannelId_free(this_obj_conv); +} + +int8_tArray CS_LDK_ChannelId_get_a(int64_t this_ptr) { + LDKChannelId this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(32, __LINE__); + memcpy(ret_arr->elems, *ChannelId_get_a(&this_ptr_conv), 32); + return ret_arr; +} + +void CS_LDK_ChannelId_set_a(int64_t this_ptr, int8_tArray val) { + LDKChannelId this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKThirtyTwoBytes val_ref; + CHECK(val->arr_len == 32); + memcpy(val_ref.data, val->elems, 32); FREE(val); + ChannelId_set_a(&this_ptr_conv, val_ref); +} + +int64_t CS_LDK_ChannelId_new(int8_tArray a_arg) { + LDKThirtyTwoBytes a_arg_ref; + CHECK(a_arg->arr_len == 32); + memcpy(a_arg_ref.data, a_arg->elems, 32); FREE(a_arg); + LDKChannelId ret_var = ChannelId_new(a_arg_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t ChannelId_clone_ptr(LDKChannelId *NONNULL_PTR arg) { + LDKChannelId ret_var = ChannelId_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t CS_LDK_ChannelId_clone_ptr(int64_t arg) { + LDKChannelId arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = ChannelId_clone_ptr(&arg_conv); + return ret_conv; +} + +int64_t CS_LDK_ChannelId_clone(int64_t orig) { + LDKChannelId orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKChannelId ret_var = ChannelId_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +jboolean CS_LDK_ChannelId_eq(int64_t a, int64_t b) { + LDKChannelId a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKChannelId b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = ChannelId_eq(&a_conv, &b_conv); + return ret_conv; +} + +int64_t CS_LDK_ChannelId_hash(int64_t o) { + LDKChannelId o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = ChannelId_hash(&o_conv); + return ret_conv; +} + +int64_t CS_LDK_ChannelId_v1_from_funding_txid(int8_tArray txid, int16_t output_index) { + uint8_t txid_arr[32]; + CHECK(txid->arr_len == 32); + memcpy(txid_arr, txid->elems, 32); FREE(txid); + uint8_t (*txid_ref)[32] = &txid_arr; + LDKChannelId ret_var = ChannelId_v1_from_funding_txid(txid_ref, output_index); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_ChannelId_v1_from_funding_outpoint(int64_t outpoint) { + LDKOutPoint outpoint_conv; + outpoint_conv.inner = untag_ptr(outpoint); + outpoint_conv.is_owned = ptr_is_owned(outpoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_conv); + outpoint_conv = OutPoint_clone(&outpoint_conv); + LDKChannelId ret_var = ChannelId_v1_from_funding_outpoint(outpoint_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_ChannelId_temporary_from_entropy_source(int64_t entropy_source) { + void* entropy_source_ptr = untag_ptr(entropy_source); + if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } + LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + LDKChannelId ret_var = ChannelId_temporary_from_entropy_source(entropy_source_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_ChannelId_from_bytes(int8_tArray data) { + LDKThirtyTwoBytes data_ref; + CHECK(data->arr_len == 32); + memcpy(data_ref.data, data->elems, 32); FREE(data); + LDKChannelId ret_var = ChannelId_from_bytes(data_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_ChannelId_new_zero() { + LDKChannelId ret_var = ChannelId_new_zero(); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +jboolean CS_LDK_ChannelId_is_zero(int64_t this_arg) { + LDKChannelId this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = ChannelId_is_zero(&this_arg_conv); + return ret_conv; +} + +int64_t CS_LDK_ChannelId_v2_from_revocation_basepoints(int64_t ours, int64_t theirs) { + LDKRevocationBasepoint ours_conv; + ours_conv.inner = untag_ptr(ours); + ours_conv.is_owned = ptr_is_owned(ours); + CHECK_INNER_FIELD_ACCESS_OR_NULL(ours_conv); + ours_conv.is_owned = false; + LDKRevocationBasepoint theirs_conv; + theirs_conv.inner = untag_ptr(theirs); + theirs_conv.is_owned = ptr_is_owned(theirs); + CHECK_INNER_FIELD_ACCESS_OR_NULL(theirs_conv); + theirs_conv.is_owned = false; + LDKChannelId ret_var = ChannelId_v2_from_revocation_basepoints(&ours_conv, &theirs_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_ChannelId_temporary_v2_from_revocation_basepoint(int64_t our_revocation_basepoint) { + LDKRevocationBasepoint our_revocation_basepoint_conv; + our_revocation_basepoint_conv.inner = untag_ptr(our_revocation_basepoint); + our_revocation_basepoint_conv.is_owned = ptr_is_owned(our_revocation_basepoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(our_revocation_basepoint_conv); + our_revocation_basepoint_conv.is_owned = false; + LDKChannelId ret_var = ChannelId_temporary_v2_from_revocation_basepoint(&our_revocation_basepoint_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int8_tArray CS_LDK_ChannelId_write(int64_t obj) { + LDKChannelId obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = ChannelId_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +int64_t CS_LDK_ChannelId_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ"); + *ret_conv = ChannelId_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + void CS_LDK_Retry_free(int64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -59266,6 +63712,413 @@ void CS_LDK_Type_free(int64_t this_ptr) { Type_free(this_ptr_conv); } +void CS_LDK_OfferId_free(int64_t this_obj) { + LDKOfferId this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + OfferId_free(this_obj_conv); +} + +int8_tArray CS_LDK_OfferId_get_a(int64_t this_ptr) { + LDKOfferId this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(32, __LINE__); + memcpy(ret_arr->elems, *OfferId_get_a(&this_ptr_conv), 32); + return ret_arr; +} + +void CS_LDK_OfferId_set_a(int64_t this_ptr, int8_tArray val) { + LDKOfferId this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKThirtyTwoBytes val_ref; + CHECK(val->arr_len == 32); + memcpy(val_ref.data, val->elems, 32); FREE(val); + OfferId_set_a(&this_ptr_conv, val_ref); +} + +int64_t CS_LDK_OfferId_new(int8_tArray a_arg) { + LDKThirtyTwoBytes a_arg_ref; + CHECK(a_arg->arr_len == 32); + memcpy(a_arg_ref.data, a_arg->elems, 32); FREE(a_arg); + LDKOfferId ret_var = OfferId_new(a_arg_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t OfferId_clone_ptr(LDKOfferId *NONNULL_PTR arg) { + LDKOfferId ret_var = OfferId_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t CS_LDK_OfferId_clone_ptr(int64_t arg) { + LDKOfferId arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = OfferId_clone_ptr(&arg_conv); + return ret_conv; +} + +int64_t CS_LDK_OfferId_clone(int64_t orig) { + LDKOfferId orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKOfferId ret_var = OfferId_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +jboolean CS_LDK_OfferId_eq(int64_t a, int64_t b) { + LDKOfferId a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKOfferId b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = OfferId_eq(&a_conv, &b_conv); + return ret_conv; +} + +int8_tArray CS_LDK_OfferId_write(int64_t obj) { + LDKOfferId obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = OfferId_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +int64_t CS_LDK_OfferId_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ"); + *ret_conv = OfferId_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + +void CS_LDK_OfferWithExplicitMetadataBuilder_free(int64_t this_obj) { + LDKOfferWithExplicitMetadataBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + OfferWithExplicitMetadataBuilder_free(this_obj_conv); +} + +static inline uint64_t OfferWithExplicitMetadataBuilder_clone_ptr(LDKOfferWithExplicitMetadataBuilder *NONNULL_PTR arg) { + LDKOfferWithExplicitMetadataBuilder ret_var = OfferWithExplicitMetadataBuilder_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t CS_LDK_OfferWithExplicitMetadataBuilder_clone_ptr(int64_t arg) { + LDKOfferWithExplicitMetadataBuilder arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = OfferWithExplicitMetadataBuilder_clone_ptr(&arg_conv); + return ret_conv; +} + +int64_t CS_LDK_OfferWithExplicitMetadataBuilder_clone(int64_t orig) { + LDKOfferWithExplicitMetadataBuilder orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKOfferWithExplicitMetadataBuilder ret_var = OfferWithExplicitMetadataBuilder_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void CS_LDK_OfferWithDerivedMetadataBuilder_free(int64_t this_obj) { + LDKOfferWithDerivedMetadataBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + OfferWithDerivedMetadataBuilder_free(this_obj_conv); +} + +static inline uint64_t OfferWithDerivedMetadataBuilder_clone_ptr(LDKOfferWithDerivedMetadataBuilder *NONNULL_PTR arg) { + LDKOfferWithDerivedMetadataBuilder ret_var = OfferWithDerivedMetadataBuilder_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t CS_LDK_OfferWithDerivedMetadataBuilder_clone_ptr(int64_t arg) { + LDKOfferWithDerivedMetadataBuilder arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = OfferWithDerivedMetadataBuilder_clone_ptr(&arg_conv); + return ret_conv; +} + +int64_t CS_LDK_OfferWithDerivedMetadataBuilder_clone(int64_t orig) { + LDKOfferWithDerivedMetadataBuilder orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKOfferWithDerivedMetadataBuilder ret_var = OfferWithDerivedMetadataBuilder_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_OfferWithExplicitMetadataBuilder_new(int8_tArray signing_pubkey) { + LDKPublicKey signing_pubkey_ref; + CHECK(signing_pubkey->arr_len == 33); + memcpy(signing_pubkey_ref.compressed_form, signing_pubkey->elems, 33); FREE(signing_pubkey); + LDKOfferWithExplicitMetadataBuilder ret_var = OfferWithExplicitMetadataBuilder_new(signing_pubkey_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_OfferWithExplicitMetadataBuilder_metadata(int64_t this_arg, int8_tArray metadata) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKCVec_u8Z metadata_ref; + metadata_ref.datalen = metadata->arr_len; + metadata_ref.data = MALLOC(metadata_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(metadata_ref.data, metadata->elems, metadata_ref.datalen); FREE(metadata); + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = OfferWithExplicitMetadataBuilder_metadata(this_arg_conv, metadata_ref); + return tag_ptr(ret_conv, true); +} + +void CS_LDK_OfferWithExplicitMetadataBuilder_chain(int64_t this_arg, int32_t network) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKNetwork network_conv = LDKNetwork_from_cs(network); + OfferWithExplicitMetadataBuilder_chain(this_arg_conv, network_conv); +} + +void CS_LDK_OfferWithExplicitMetadataBuilder_amount_msats(int64_t this_arg, int64_t amount_msats) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + OfferWithExplicitMetadataBuilder_amount_msats(this_arg_conv, amount_msats); +} + +void CS_LDK_OfferWithExplicitMetadataBuilder_absolute_expiry(int64_t this_arg, int64_t absolute_expiry) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + OfferWithExplicitMetadataBuilder_absolute_expiry(this_arg_conv, absolute_expiry); +} + +void CS_LDK_OfferWithExplicitMetadataBuilder_description(int64_t this_arg, jstring description) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKStr description_conv = str_ref_to_owned_c(description); + OfferWithExplicitMetadataBuilder_description(this_arg_conv, description_conv); +} + +void CS_LDK_OfferWithExplicitMetadataBuilder_issuer(int64_t this_arg, jstring issuer) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKStr issuer_conv = str_ref_to_owned_c(issuer); + OfferWithExplicitMetadataBuilder_issuer(this_arg_conv, issuer_conv); +} + +void CS_LDK_OfferWithExplicitMetadataBuilder_path(int64_t this_arg, int64_t path) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKBlindedPath path_conv; + path_conv.inner = untag_ptr(path); + path_conv.is_owned = ptr_is_owned(path); + CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv); + path_conv = BlindedPath_clone(&path_conv); + OfferWithExplicitMetadataBuilder_path(this_arg_conv, path_conv); +} + +void CS_LDK_OfferWithExplicitMetadataBuilder_supported_quantity(int64_t this_arg, int64_t quantity) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + void* quantity_ptr = untag_ptr(quantity); + CHECK_ACCESS(quantity_ptr); + LDKQuantity quantity_conv = *(LDKQuantity*)(quantity_ptr); + quantity_conv = Quantity_clone((LDKQuantity*)untag_ptr(quantity)); + OfferWithExplicitMetadataBuilder_supported_quantity(this_arg_conv, quantity_conv); +} + +int64_t CS_LDK_OfferWithExplicitMetadataBuilder_build(int64_t this_arg) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = OfferWithExplicitMetadataBuilder_build(this_arg_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_OfferWithDerivedMetadataBuilder_deriving_signing_pubkey(int8_tArray node_id, int64_t expanded_key, int64_t entropy_source) { + LDKPublicKey node_id_ref; + CHECK(node_id->arr_len == 33); + memcpy(node_id_ref.compressed_form, node_id->elems, 33); FREE(node_id); + LDKExpandedKey expanded_key_conv; + expanded_key_conv.inner = untag_ptr(expanded_key); + expanded_key_conv.is_owned = ptr_is_owned(expanded_key); + CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv); + expanded_key_conv.is_owned = false; + void* entropy_source_ptr = untag_ptr(entropy_source); + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } + LDKOfferWithDerivedMetadataBuilder ret_var = OfferWithDerivedMetadataBuilder_deriving_signing_pubkey(node_id_ref, &expanded_key_conv, entropy_source_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void CS_LDK_OfferWithDerivedMetadataBuilder_chain(int64_t this_arg, int32_t network) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKNetwork network_conv = LDKNetwork_from_cs(network); + OfferWithDerivedMetadataBuilder_chain(this_arg_conv, network_conv); +} + +void CS_LDK_OfferWithDerivedMetadataBuilder_amount_msats(int64_t this_arg, int64_t amount_msats) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + OfferWithDerivedMetadataBuilder_amount_msats(this_arg_conv, amount_msats); +} + +void CS_LDK_OfferWithDerivedMetadataBuilder_absolute_expiry(int64_t this_arg, int64_t absolute_expiry) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + OfferWithDerivedMetadataBuilder_absolute_expiry(this_arg_conv, absolute_expiry); +} + +void CS_LDK_OfferWithDerivedMetadataBuilder_description(int64_t this_arg, jstring description) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKStr description_conv = str_ref_to_owned_c(description); + OfferWithDerivedMetadataBuilder_description(this_arg_conv, description_conv); +} + +void CS_LDK_OfferWithDerivedMetadataBuilder_issuer(int64_t this_arg, jstring issuer) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKStr issuer_conv = str_ref_to_owned_c(issuer); + OfferWithDerivedMetadataBuilder_issuer(this_arg_conv, issuer_conv); +} + +void CS_LDK_OfferWithDerivedMetadataBuilder_path(int64_t this_arg, int64_t path) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKBlindedPath path_conv; + path_conv.inner = untag_ptr(path); + path_conv.is_owned = ptr_is_owned(path); + CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv); + path_conv = BlindedPath_clone(&path_conv); + OfferWithDerivedMetadataBuilder_path(this_arg_conv, path_conv); +} + +void CS_LDK_OfferWithDerivedMetadataBuilder_supported_quantity(int64_t this_arg, int64_t quantity) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + void* quantity_ptr = untag_ptr(quantity); + CHECK_ACCESS(quantity_ptr); + LDKQuantity quantity_conv = *(LDKQuantity*)(quantity_ptr); + quantity_conv = Quantity_clone((LDKQuantity*)untag_ptr(quantity)); + OfferWithDerivedMetadataBuilder_supported_quantity(this_arg_conv, quantity_conv); +} + +int64_t CS_LDK_OfferWithDerivedMetadataBuilder_build(int64_t this_arg) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = OfferWithDerivedMetadataBuilder_build(this_arg_conv); + return tag_ptr(ret_conv, true); +} + void CS_LDK_Offer_free(int64_t this_obj) { LDKOffer this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -59342,10 +64195,9 @@ int64_t CS_LDK_Offer_amount(int64_t this_arg) { this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = Offer_amount(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = Offer_amount(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -59428,10 +64280,9 @@ int64_t CS_LDK_Offer_supported_quantity(int64_t this_arg) { this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = Offer_supported_quantity(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Offer_supported_quantity(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -59446,6 +64297,19 @@ int8_tArray CS_LDK_Offer_signing_pubkey(int64_t this_arg) { return ret_arr; } +int64_t CS_LDK_Offer_id(int64_t this_arg) { + LDKOffer this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKOfferId ret_var = Offer_id(&this_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + jboolean CS_LDK_Offer_supports_chain(int64_t this_arg, int8_tArray chain) { LDKOffer this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -59499,6 +64363,89 @@ jboolean CS_LDK_Offer_expects_quantity(int64_t this_arg) { return ret_conv; } +int64_t CS_LDK_Offer_request_invoice_deriving_payer_id(int64_t this_arg, int64_t expanded_key, int64_t entropy_source, int8_tArray payment_id) { + LDKOffer this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKExpandedKey expanded_key_conv; + expanded_key_conv.inner = untag_ptr(expanded_key); + expanded_key_conv.is_owned = ptr_is_owned(expanded_key); + CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv); + expanded_key_conv.is_owned = false; + void* entropy_source_ptr = untag_ptr(entropy_source); + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } + LDKThirtyTwoBytes payment_id_ref; + CHECK(payment_id->arr_len == 32); + memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id); + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = Offer_request_invoice_deriving_payer_id(&this_arg_conv, &expanded_key_conv, entropy_source_conv, payment_id_ref); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_Offer_request_invoice_deriving_metadata(int64_t this_arg, int8_tArray payer_id, int64_t expanded_key, int64_t entropy_source, int8_tArray payment_id) { + LDKOffer this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKPublicKey payer_id_ref; + CHECK(payer_id->arr_len == 33); + memcpy(payer_id_ref.compressed_form, payer_id->elems, 33); FREE(payer_id); + LDKExpandedKey expanded_key_conv; + expanded_key_conv.inner = untag_ptr(expanded_key); + expanded_key_conv.is_owned = ptr_is_owned(expanded_key); + CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv); + expanded_key_conv.is_owned = false; + void* entropy_source_ptr = untag_ptr(entropy_source); + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } + LDKThirtyTwoBytes payment_id_ref; + CHECK(payment_id->arr_len == 32); + memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id); + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = Offer_request_invoice_deriving_metadata(&this_arg_conv, payer_id_ref, &expanded_key_conv, entropy_source_conv, payment_id_ref); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_Offer_request_invoice(int64_t this_arg, int8_tArray metadata, int8_tArray payer_id) { + LDKOffer this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_u8Z metadata_ref; + metadata_ref.datalen = metadata->arr_len; + metadata_ref.data = MALLOC(metadata_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(metadata_ref.data, metadata->elems, metadata_ref.datalen); FREE(metadata); + LDKPublicKey payer_id_ref; + CHECK(payer_id->arr_len == 33); + memcpy(payer_id_ref.compressed_form, payer_id->elems, 33); FREE(payer_id); + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = Offer_request_invoice(&this_arg_conv, metadata_ref, payer_id_ref); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_Offer_hash(int64_t o) { + LDKOffer o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = Offer_hash(&o_conv); + return ret_conv; +} + int8_tArray CS_LDK_Offer_write(int64_t obj) { LDKOffer obj_conv; obj_conv.inner = untag_ptr(obj); @@ -59512,95 +64459,316 @@ int8_tArray CS_LDK_Offer_write(int64_t obj) { return ret_arr; } -void CS_LDK_Amount_free(int64_t this_obj) { - LDKAmount this_obj_conv; - this_obj_conv.inner = untag_ptr(this_obj); - this_obj_conv.is_owned = ptr_is_owned(this_obj); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - Amount_free(this_obj_conv); +void CS_LDK_Amount_free(int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKAmount this_ptr_conv = *(LDKAmount*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + Amount_free(this_ptr_conv); } static inline uint64_t Amount_clone_ptr(LDKAmount *NONNULL_PTR arg) { - LDKAmount ret_var = Amount_clone(arg); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount"); + *ret_copy = Amount_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } int64_t CS_LDK_Amount_clone_ptr(int64_t arg) { - LDKAmount arg_conv; - arg_conv.inner = untag_ptr(arg); - arg_conv.is_owned = ptr_is_owned(arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); - arg_conv.is_owned = false; - int64_t ret_conv = Amount_clone_ptr(&arg_conv); + LDKAmount* arg_conv = (LDKAmount*)untag_ptr(arg); + int64_t ret_conv = Amount_clone_ptr(arg_conv); return ret_conv; } int64_t CS_LDK_Amount_clone(int64_t orig) { - LDKAmount orig_conv; - orig_conv.inner = untag_ptr(orig); - orig_conv.is_owned = ptr_is_owned(orig); - CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); - orig_conv.is_owned = false; - LDKAmount ret_var = Amount_clone(&orig_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKAmount* orig_conv = (LDKAmount*)untag_ptr(orig); + LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount"); + *ret_copy = Amount_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_Amount_bitcoin(int64_t amount_msats) { + LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount"); + *ret_copy = Amount_bitcoin(amount_msats); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_Amount_currency(int8_tArray iso4217_code, int64_t amount) { + LDKThreeBytes iso4217_code_ref; + CHECK(iso4217_code->arr_len == 3); + memcpy(iso4217_code_ref.data, iso4217_code->elems, 3); FREE(iso4217_code); + LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount"); + *ret_copy = Amount_currency(iso4217_code_ref, amount); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -void CS_LDK_Quantity_free(int64_t this_obj) { - LDKQuantity this_obj_conv; +void CS_LDK_Quantity_free(int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKQuantity this_ptr_conv = *(LDKQuantity*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + Quantity_free(this_ptr_conv); +} + +static inline uint64_t Quantity_clone_ptr(LDKQuantity *NONNULL_PTR arg) { + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Quantity_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t CS_LDK_Quantity_clone_ptr(int64_t arg) { + LDKQuantity* arg_conv = (LDKQuantity*)untag_ptr(arg); + int64_t ret_conv = Quantity_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_Quantity_clone(int64_t orig) { + LDKQuantity* orig_conv = (LDKQuantity*)untag_ptr(orig); + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Quantity_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_Quantity_bounded(int64_t a) { + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Quantity_bounded(a); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_Quantity_unbounded() { + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Quantity_unbounded(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_Quantity_one() { + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Quantity_one(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_Offer_from_str(jstring s) { + LDKStr s_conv = str_ref_to_owned_c(s); + LDKCResult_OfferBolt12ParseErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12ParseErrorZ), "LDKCResult_OfferBolt12ParseErrorZ"); + *ret_conv = Offer_from_str(s_conv); + return tag_ptr(ret_conv, true); +} + +void CS_LDK_InvoiceWithExplicitSigningPubkeyBuilder_free(int64_t this_obj) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); this_obj_conv.is_owned = ptr_is_owned(this_obj); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - Quantity_free(this_obj_conv); + InvoiceWithExplicitSigningPubkeyBuilder_free(this_obj_conv); } -static inline uint64_t Quantity_clone_ptr(LDKQuantity *NONNULL_PTR arg) { - LDKQuantity ret_var = Quantity_clone(arg); +void CS_LDK_InvoiceWithDerivedSigningPubkeyBuilder_free(int64_t this_obj) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + InvoiceWithDerivedSigningPubkeyBuilder_free(this_obj_conv); +} + +int64_t CS_LDK_InvoiceWithExplicitSigningPubkeyBuilder_build(int64_t this_arg) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = InvoiceWithExplicitSigningPubkeyBuilder_build(this_arg_conv); + return tag_ptr(ret_conv, true); +} + +void CS_LDK_InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry(int64_t this_arg, int32_t relative_expiry_secs) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry(this_arg_conv, relative_expiry_secs); +} + +void CS_LDK_InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh(int64_t this_arg, int8_tArray script_hash) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + uint8_t script_hash_arr[32]; + CHECK(script_hash->arr_len == 32); + memcpy(script_hash_arr, script_hash->elems, 32); FREE(script_hash); + uint8_t (*script_hash_ref)[32] = &script_hash_arr; + InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh(this_arg_conv, script_hash_ref); +} + +void CS_LDK_InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh(int64_t this_arg, int8_tArray pubkey_hash) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + uint8_t pubkey_hash_arr[20]; + CHECK(pubkey_hash->arr_len == 20); + memcpy(pubkey_hash_arr, pubkey_hash->elems, 20); FREE(pubkey_hash); + uint8_t (*pubkey_hash_ref)[20] = &pubkey_hash_arr; + InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh(this_arg_conv, pubkey_hash_ref); +} + +void CS_LDK_InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(int64_t this_arg, int8_tArray utput_key) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + LDKTweakedPublicKey utput_key_ref; + CHECK(utput_key->arr_len == 32); + memcpy(utput_key_ref.x_coordinate, utput_key->elems, 32); FREE(utput_key); + InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(this_arg_conv, utput_key_ref); +} + +void CS_LDK_InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp(int64_t this_arg) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp(this_arg_conv); +} + +int64_t CS_LDK_InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign(int64_t this_arg) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign(this_arg_conv); + return tag_ptr(ret_conv, true); +} + +void CS_LDK_InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry(int64_t this_arg, int32_t relative_expiry_secs) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry(this_arg_conv, relative_expiry_secs); +} + +void CS_LDK_InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh(int64_t this_arg, int8_tArray script_hash) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + uint8_t script_hash_arr[32]; + CHECK(script_hash->arr_len == 32); + memcpy(script_hash_arr, script_hash->elems, 32); FREE(script_hash); + uint8_t (*script_hash_ref)[32] = &script_hash_arr; + InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh(this_arg_conv, script_hash_ref); +} + +void CS_LDK_InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh(int64_t this_arg, int8_tArray pubkey_hash) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + uint8_t pubkey_hash_arr[20]; + CHECK(pubkey_hash->arr_len == 20); + memcpy(pubkey_hash_arr, pubkey_hash->elems, 20); FREE(pubkey_hash); + uint8_t (*pubkey_hash_ref)[20] = &pubkey_hash_arr; + InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh(this_arg_conv, pubkey_hash_ref); +} + +void CS_LDK_InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(int64_t this_arg, int8_tArray utput_key) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + LDKTweakedPublicKey utput_key_ref; + CHECK(utput_key->arr_len == 32); + memcpy(utput_key_ref.x_coordinate, utput_key->elems, 32); FREE(utput_key); + InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(this_arg_conv, utput_key_ref); +} + +void CS_LDK_InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp(int64_t this_arg) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp(this_arg_conv); +} + +void CS_LDK_UnsignedBolt12Invoice_free(int64_t this_obj) { + LDKUnsignedBolt12Invoice this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + UnsignedBolt12Invoice_free(this_obj_conv); +} + +static inline uint64_t UnsignedBolt12Invoice_clone_ptr(LDKUnsignedBolt12Invoice *NONNULL_PTR arg) { + LDKUnsignedBolt12Invoice ret_var = UnsignedBolt12Invoice_clone(arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -int64_t CS_LDK_Quantity_clone_ptr(int64_t arg) { - LDKQuantity arg_conv; +int64_t CS_LDK_UnsignedBolt12Invoice_clone_ptr(int64_t arg) { + LDKUnsignedBolt12Invoice arg_conv; arg_conv.inner = untag_ptr(arg); arg_conv.is_owned = ptr_is_owned(arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); arg_conv.is_owned = false; - int64_t ret_conv = Quantity_clone_ptr(&arg_conv); + int64_t ret_conv = UnsignedBolt12Invoice_clone_ptr(&arg_conv); return ret_conv; } -int64_t CS_LDK_Quantity_clone(int64_t orig) { - LDKQuantity orig_conv; +int64_t CS_LDK_UnsignedBolt12Invoice_clone(int64_t orig) { + LDKUnsignedBolt12Invoice orig_conv; orig_conv.inner = untag_ptr(orig); orig_conv.is_owned = ptr_is_owned(orig); CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); orig_conv.is_owned = false; - LDKQuantity ret_var = Quantity_clone(&orig_conv); + LDKUnsignedBolt12Invoice ret_var = UnsignedBolt12Invoice_clone(&orig_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -int64_t CS_LDK_Offer_from_str(jstring s) { - LDKStr s_conv = str_ref_to_owned_c(s); - LDKCResult_OfferBolt12ParseErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12ParseErrorZ), "LDKCResult_OfferBolt12ParseErrorZ"); - *ret_conv = Offer_from_str(s_conv); - return tag_ptr(ret_conv, true); -} - -void CS_LDK_UnsignedBolt12Invoice_free(int64_t this_obj) { - LDKUnsignedBolt12Invoice this_obj_conv; - this_obj_conv.inner = untag_ptr(this_obj); - this_obj_conv.is_owned = ptr_is_owned(this_obj); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - UnsignedBolt12Invoice_free(this_obj_conv); +void CS_LDK_SignBolt12InvoiceFn_free(int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKSignBolt12InvoiceFn this_ptr_conv = *(LDKSignBolt12InvoiceFn*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + SignBolt12InvoiceFn_free(this_ptr_conv); } int64_t CS_LDK_UnsignedBolt12Invoice_tagged_hash(int64_t this_arg) { @@ -59695,10 +64863,9 @@ int64_t CS_LDK_UnsignedBolt12Invoice_amount(int64_t this_arg) { this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = UnsignedBolt12Invoice_amount(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = UnsignedBolt12Invoice_amount(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -59781,10 +64948,9 @@ int64_t CS_LDK_UnsignedBolt12Invoice_supported_quantity(int64_t this_arg) { this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = UnsignedBolt12Invoice_supported_quantity(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = UnsignedBolt12Invoice_supported_quantity(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -59965,10 +65131,9 @@ int64_t CS_LDK_Bolt12Invoice_amount(int64_t this_arg) { this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = Bolt12Invoice_amount(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = Bolt12Invoice_amount(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -60051,10 +65216,9 @@ int64_t CS_LDK_Bolt12Invoice_supported_quantity(int64_t this_arg) { this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = Bolt12Invoice_supported_quantity(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = Bolt12Invoice_supported_quantity(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -60232,6 +65396,16 @@ int64_t CS_LDK_Bolt12Invoice_verify(int64_t this_arg, int64_t key) { return tag_ptr(ret_conv, true); } +int64_t CS_LDK_Bolt12Invoice_hash(int64_t o) { + LDKBolt12Invoice o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = Bolt12Invoice_hash(&o_conv); + return ret_conv; +} + int8_tArray CS_LDK_UnsignedBolt12Invoice_write(int64_t obj) { LDKUnsignedBolt12Invoice obj_conv; obj_conv.inner = untag_ptr(obj); @@ -60715,6 +65889,142 @@ int64_t CS_LDK_InvoiceError_read(int8_tArray ser) { return tag_ptr(ret_conv, true); } +void CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_free(int64_t this_obj) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + InvoiceRequestWithExplicitPayerIdBuilder_free(this_obj_conv); +} + +void CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_free(int64_t this_obj) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + InvoiceRequestWithDerivedPayerIdBuilder_free(this_obj_conv); +} + +int64_t CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_build(int64_t this_arg) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_build(this_arg_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_chain(int64_t this_arg, int32_t network) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKNetwork network_conv = LDKNetwork_from_cs(network); + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_chain(this_arg_conv, network_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(int64_t this_arg, int64_t amount_msats) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(this_arg_conv, amount_msats); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_quantity(int64_t this_arg, int64_t quantity) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_quantity(this_arg_conv, quantity); + return tag_ptr(ret_conv, true); +} + +void CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_payer_note(int64_t this_arg, jstring payer_note) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKStr payer_note_conv = str_ref_to_owned_c(payer_note); + InvoiceRequestWithExplicitPayerIdBuilder_payer_note(this_arg_conv, payer_note_conv); +} + +int64_t CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(int64_t this_arg) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(this_arg_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_chain(int64_t this_arg, int32_t network) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKNetwork network_conv = LDKNetwork_from_cs(network); + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_chain(this_arg_conv, network_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_amount_msats(int64_t this_arg, int64_t amount_msats) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_amount_msats(this_arg_conv, amount_msats); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_quantity(int64_t this_arg, int64_t quantity) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_quantity(this_arg_conv, quantity); + return tag_ptr(ret_conv, true); +} + +void CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_payer_note(int64_t this_arg, jstring payer_note) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKStr payer_note_conv = str_ref_to_owned_c(payer_note); + InvoiceRequestWithDerivedPayerIdBuilder_payer_note(this_arg_conv, payer_note_conv); +} + void CS_LDK_UnsignedInvoiceRequest_free(int64_t this_obj) { LDKUnsignedInvoiceRequest this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -60723,6 +66033,45 @@ void CS_LDK_UnsignedInvoiceRequest_free(int64_t this_obj) { UnsignedInvoiceRequest_free(this_obj_conv); } +static inline uint64_t UnsignedInvoiceRequest_clone_ptr(LDKUnsignedInvoiceRequest *NONNULL_PTR arg) { + LDKUnsignedInvoiceRequest ret_var = UnsignedInvoiceRequest_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t CS_LDK_UnsignedInvoiceRequest_clone_ptr(int64_t arg) { + LDKUnsignedInvoiceRequest arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = UnsignedInvoiceRequest_clone_ptr(&arg_conv); + return ret_conv; +} + +int64_t CS_LDK_UnsignedInvoiceRequest_clone(int64_t orig) { + LDKUnsignedInvoiceRequest orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKUnsignedInvoiceRequest ret_var = UnsignedInvoiceRequest_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void CS_LDK_SignInvoiceRequestFn_free(int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKSignInvoiceRequestFn this_ptr_conv = *(LDKSignInvoiceRequestFn*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + SignInvoiceRequestFn_free(this_ptr_conv); +} + int64_t CS_LDK_UnsignedInvoiceRequest_tagged_hash(int64_t this_arg) { LDKUnsignedInvoiceRequest this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -60782,6 +66131,33 @@ void CS_LDK_VerifiedInvoiceRequest_free(int64_t this_obj) { VerifiedInvoiceRequest_free(this_obj_conv); } +int64_t CS_LDK_VerifiedInvoiceRequest_get_offer_id(int64_t this_ptr) { + LDKVerifiedInvoiceRequest this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKOfferId ret_var = VerifiedInvoiceRequest_get_offer_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void CS_LDK_VerifiedInvoiceRequest_set_offer_id(int64_t this_ptr, int64_t val) { + LDKVerifiedInvoiceRequest this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKOfferId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = OfferId_clone(&val_conv); + VerifiedInvoiceRequest_set_offer_id(&this_ptr_conv, val_conv); +} + int64_t CS_LDK_VerifiedInvoiceRequest_get_keys(int64_t this_ptr) { LDKVerifiedInvoiceRequest this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -60875,10 +66251,9 @@ int64_t CS_LDK_UnsignedInvoiceRequest_amount(int64_t this_arg) { this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = UnsignedInvoiceRequest_amount(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = UnsignedInvoiceRequest_amount(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -60961,10 +66336,9 @@ int64_t CS_LDK_UnsignedInvoiceRequest_supported_quantity(int64_t this_arg) { this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = UnsignedInvoiceRequest_supported_quantity(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = UnsignedInvoiceRequest_supported_quantity(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -61101,10 +66475,9 @@ int64_t CS_LDK_InvoiceRequest_amount(int64_t this_arg) { this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = InvoiceRequest_amount(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = InvoiceRequest_amount(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -61187,10 +66560,9 @@ int64_t CS_LDK_InvoiceRequest_supported_quantity(int64_t this_arg) { this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = InvoiceRequest_supported_quantity(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = InvoiceRequest_supported_quantity(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -61289,15 +66661,64 @@ int64_t CS_LDK_InvoiceRequest_payer_note(int64_t this_arg) { return ret_ref; } -int8_tArray CS_LDK_InvoiceRequest_signature(int64_t this_arg) { +int64_t CS_LDK_InvoiceRequest_respond_with(int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash) { LDKInvoiceRequest this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(64, __LINE__); - memcpy(ret_arr->elems, InvoiceRequest_signature(&this_arg_conv).compact_form, 64); - return ret_arr; + LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr; + payment_paths_constr.datalen = payment_paths->arr_len; + if (payment_paths_constr.datalen > 0) + payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements"); + else + payment_paths_constr.data = NULL; + int64_t* payment_paths_vals = payment_paths->elems; + for (size_t l = 0; l < payment_paths_constr.datalen; l++) { + int64_t payment_paths_conv_37 = payment_paths_vals[l]; + void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37); + CHECK_ACCESS(payment_paths_conv_37_ptr); + LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr); + payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37)); + payment_paths_constr.data[l] = payment_paths_conv_37_conv; + } + FREE(payment_paths); + LDKThirtyTwoBytes payment_hash_ref; + CHECK(payment_hash->arr_len == 32); + memcpy(payment_hash_ref.data, payment_hash->elems, 32); FREE(payment_hash); + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequest_respond_with(&this_arg_conv, payment_paths_constr, payment_hash_ref); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_InvoiceRequest_respond_with_no_std(int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash, int64_t created_at) { + LDKInvoiceRequest this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr; + payment_paths_constr.datalen = payment_paths->arr_len; + if (payment_paths_constr.datalen > 0) + payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements"); + else + payment_paths_constr.data = NULL; + int64_t* payment_paths_vals = payment_paths->elems; + for (size_t l = 0; l < payment_paths_constr.datalen; l++) { + int64_t payment_paths_conv_37 = payment_paths_vals[l]; + void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37); + CHECK_ACCESS(payment_paths_conv_37_ptr); + LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr); + payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37)); + payment_paths_constr.data[l] = payment_paths_conv_37_conv; + } + FREE(payment_paths); + LDKThirtyTwoBytes payment_hash_ref; + CHECK(payment_hash->arr_len == 32); + memcpy(payment_hash_ref.data, payment_hash->elems, 32); FREE(payment_hash); + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequest_respond_with_no_std(&this_arg_conv, payment_paths_constr, payment_hash_ref, created_at); + return tag_ptr(ret_conv, true); } int64_t CS_LDK_InvoiceRequest_verify(int64_t this_arg, int64_t key) { @@ -61316,6 +66737,17 @@ int64_t CS_LDK_InvoiceRequest_verify(int64_t this_arg, int64_t key) { return tag_ptr(ret_conv, true); } +int8_tArray CS_LDK_InvoiceRequest_signature(int64_t this_arg) { + LDKInvoiceRequest this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(64, __LINE__); + memcpy(ret_arr->elems, InvoiceRequest_signature(&this_arg_conv).compact_form, 64); + return ret_arr; +} + ptrArray CS_LDK_VerifiedInvoiceRequest_chains(int64_t this_arg) { LDKVerifiedInvoiceRequest this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -61354,10 +66786,9 @@ int64_t CS_LDK_VerifiedInvoiceRequest_amount(int64_t this_arg) { this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = VerifiedInvoiceRequest_amount(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = VerifiedInvoiceRequest_amount(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -61440,10 +66871,9 @@ int64_t CS_LDK_VerifiedInvoiceRequest_supported_quantity(int64_t this_arg) { this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = VerifiedInvoiceRequest_supported_quantity(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = VerifiedInvoiceRequest_supported_quantity(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -61542,6 +66972,126 @@ int64_t CS_LDK_VerifiedInvoiceRequest_payer_note(int64_t this_arg) { return ret_ref; } +int64_t CS_LDK_VerifiedInvoiceRequest_respond_with(int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash) { + LDKVerifiedInvoiceRequest this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr; + payment_paths_constr.datalen = payment_paths->arr_len; + if (payment_paths_constr.datalen > 0) + payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements"); + else + payment_paths_constr.data = NULL; + int64_t* payment_paths_vals = payment_paths->elems; + for (size_t l = 0; l < payment_paths_constr.datalen; l++) { + int64_t payment_paths_conv_37 = payment_paths_vals[l]; + void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37); + CHECK_ACCESS(payment_paths_conv_37_ptr); + LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr); + payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37)); + payment_paths_constr.data[l] = payment_paths_conv_37_conv; + } + FREE(payment_paths); + LDKThirtyTwoBytes payment_hash_ref; + CHECK(payment_hash->arr_len == 32); + memcpy(payment_hash_ref.data, payment_hash->elems, 32); FREE(payment_hash); + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = VerifiedInvoiceRequest_respond_with(&this_arg_conv, payment_paths_constr, payment_hash_ref); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_VerifiedInvoiceRequest_respond_with_no_std(int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash, int64_t created_at) { + LDKVerifiedInvoiceRequest this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr; + payment_paths_constr.datalen = payment_paths->arr_len; + if (payment_paths_constr.datalen > 0) + payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements"); + else + payment_paths_constr.data = NULL; + int64_t* payment_paths_vals = payment_paths->elems; + for (size_t l = 0; l < payment_paths_constr.datalen; l++) { + int64_t payment_paths_conv_37 = payment_paths_vals[l]; + void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37); + CHECK_ACCESS(payment_paths_conv_37_ptr); + LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr); + payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37)); + payment_paths_constr.data[l] = payment_paths_conv_37_conv; + } + FREE(payment_paths); + LDKThirtyTwoBytes payment_hash_ref; + CHECK(payment_hash->arr_len == 32); + memcpy(payment_hash_ref.data, payment_hash->elems, 32); FREE(payment_hash); + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = VerifiedInvoiceRequest_respond_with_no_std(&this_arg_conv, payment_paths_constr, payment_hash_ref, created_at); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_VerifiedInvoiceRequest_respond_using_derived_keys(int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash) { + LDKVerifiedInvoiceRequest this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr; + payment_paths_constr.datalen = payment_paths->arr_len; + if (payment_paths_constr.datalen > 0) + payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements"); + else + payment_paths_constr.data = NULL; + int64_t* payment_paths_vals = payment_paths->elems; + for (size_t l = 0; l < payment_paths_constr.datalen; l++) { + int64_t payment_paths_conv_37 = payment_paths_vals[l]; + void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37); + CHECK_ACCESS(payment_paths_conv_37_ptr); + LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr); + payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37)); + payment_paths_constr.data[l] = payment_paths_conv_37_conv; + } + FREE(payment_paths); + LDKThirtyTwoBytes payment_hash_ref; + CHECK(payment_hash->arr_len == 32); + memcpy(payment_hash_ref.data, payment_hash->elems, 32); FREE(payment_hash); + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = VerifiedInvoiceRequest_respond_using_derived_keys(&this_arg_conv, payment_paths_constr, payment_hash_ref); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_VerifiedInvoiceRequest_respond_using_derived_keys_no_std(int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash, int64_t created_at) { + LDKVerifiedInvoiceRequest this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr; + payment_paths_constr.datalen = payment_paths->arr_len; + if (payment_paths_constr.datalen > 0) + payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements"); + else + payment_paths_constr.data = NULL; + int64_t* payment_paths_vals = payment_paths->elems; + for (size_t l = 0; l < payment_paths_constr.datalen; l++) { + int64_t payment_paths_conv_37 = payment_paths_vals[l]; + void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37); + CHECK_ACCESS(payment_paths_conv_37_ptr); + LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr); + payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37)); + payment_paths_constr.data[l] = payment_paths_conv_37_conv; + } + FREE(payment_paths); + LDKThirtyTwoBytes payment_hash_ref; + CHECK(payment_hash->arr_len == 32); + memcpy(payment_hash_ref.data, payment_hash->elems, 32); FREE(payment_hash); + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = VerifiedInvoiceRequest_respond_using_derived_keys_no_std(&this_arg_conv, payment_paths_constr, payment_hash_ref, created_at); + return tag_ptr(ret_conv, true); +} + int8_tArray CS_LDK_UnsignedInvoiceRequest_write(int64_t obj) { LDKUnsignedInvoiceRequest obj_conv; obj_conv.inner = untag_ptr(obj); @@ -61568,6 +67118,177 @@ int8_tArray CS_LDK_InvoiceRequest_write(int64_t obj) { return ret_arr; } +void CS_LDK_InvoiceRequestFields_free(int64_t this_obj) { + LDKInvoiceRequestFields this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + InvoiceRequestFields_free(this_obj_conv); +} + +int8_tArray CS_LDK_InvoiceRequestFields_get_payer_id(int64_t this_ptr) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(33, __LINE__); + memcpy(ret_arr->elems, InvoiceRequestFields_get_payer_id(&this_ptr_conv).compressed_form, 33); + return ret_arr; +} + +void CS_LDK_InvoiceRequestFields_set_payer_id(int64_t this_ptr, int8_tArray val) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKPublicKey val_ref; + CHECK(val->arr_len == 33); + memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); + InvoiceRequestFields_set_payer_id(&this_ptr_conv, val_ref); +} + +int64_t CS_LDK_InvoiceRequestFields_get_quantity(int64_t this_ptr) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z"); + *ret_copy = InvoiceRequestFields_get_quantity(&this_ptr_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void CS_LDK_InvoiceRequestFields_set_quantity(int64_t this_ptr, int64_t val) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKCOption_u64Z val_conv = *(LDKCOption_u64Z*)(val_ptr); + val_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(val)); + InvoiceRequestFields_set_quantity(&this_ptr_conv, val_conv); +} + +int64_t CS_LDK_InvoiceRequestFields_get_payer_note_truncated(int64_t this_ptr) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKUntrustedString ret_var = InvoiceRequestFields_get_payer_note_truncated(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void CS_LDK_InvoiceRequestFields_set_payer_note_truncated(int64_t this_ptr, int64_t val) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKUntrustedString val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = UntrustedString_clone(&val_conv); + InvoiceRequestFields_set_payer_note_truncated(&this_ptr_conv, val_conv); +} + +int64_t CS_LDK_InvoiceRequestFields_new(int8_tArray payer_id_arg, int64_t quantity_arg, int64_t payer_note_truncated_arg) { + LDKPublicKey payer_id_arg_ref; + CHECK(payer_id_arg->arr_len == 33); + memcpy(payer_id_arg_ref.compressed_form, payer_id_arg->elems, 33); FREE(payer_id_arg); + void* quantity_arg_ptr = untag_ptr(quantity_arg); + CHECK_ACCESS(quantity_arg_ptr); + LDKCOption_u64Z quantity_arg_conv = *(LDKCOption_u64Z*)(quantity_arg_ptr); + quantity_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(quantity_arg)); + LDKUntrustedString payer_note_truncated_arg_conv; + payer_note_truncated_arg_conv.inner = untag_ptr(payer_note_truncated_arg); + payer_note_truncated_arg_conv.is_owned = ptr_is_owned(payer_note_truncated_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(payer_note_truncated_arg_conv); + payer_note_truncated_arg_conv = UntrustedString_clone(&payer_note_truncated_arg_conv); + LDKInvoiceRequestFields ret_var = InvoiceRequestFields_new(payer_id_arg_ref, quantity_arg_conv, payer_note_truncated_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t InvoiceRequestFields_clone_ptr(LDKInvoiceRequestFields *NONNULL_PTR arg) { + LDKInvoiceRequestFields ret_var = InvoiceRequestFields_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t CS_LDK_InvoiceRequestFields_clone_ptr(int64_t arg) { + LDKInvoiceRequestFields arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = InvoiceRequestFields_clone_ptr(&arg_conv); + return ret_conv; +} + +int64_t CS_LDK_InvoiceRequestFields_clone(int64_t orig) { + LDKInvoiceRequestFields orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKInvoiceRequestFields ret_var = InvoiceRequestFields_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +jboolean CS_LDK_InvoiceRequestFields_eq(int64_t a, int64_t b) { + LDKInvoiceRequestFields a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKInvoiceRequestFields b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = InvoiceRequestFields_eq(&a_conv, &b_conv); + return ret_conv; +} + +int8_tArray CS_LDK_InvoiceRequestFields_write(int64_t obj) { + LDKInvoiceRequestFields obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = InvoiceRequestFields_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +int64_t CS_LDK_InvoiceRequestFields_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ"); + *ret_conv = InvoiceRequestFields_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + void CS_LDK_TaggedHash_free(int64_t this_obj) { LDKTaggedHash this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -61640,6 +67361,50 @@ int8_tArray CS_LDK_TaggedHash_merkle_root(int64_t this_arg) { return ret_arr; } +void CS_LDK_SignError_free(int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKSignError this_ptr_conv = *(LDKSignError*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + SignError_free(this_ptr_conv); +} + +static inline uint64_t SignError_clone_ptr(LDKSignError *NONNULL_PTR arg) { + LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError"); + *ret_copy = SignError_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t CS_LDK_SignError_clone_ptr(int64_t arg) { + LDKSignError* arg_conv = (LDKSignError*)untag_ptr(arg); + int64_t ret_conv = SignError_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_SignError_clone(int64_t orig) { + LDKSignError* orig_conv = (LDKSignError*)untag_ptr(orig); + LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError"); + *ret_copy = SignError_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_SignError_signing() { + LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError"); + *ret_copy = SignError_signing(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_SignError_verification(int32_t a) { + LDKSecp256k1Error a_conv = LDKSecp256k1Error_from_cs(a); + LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError"); + *ret_copy = SignError_verification(a_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + void CS_LDK_Bolt12ParseError_free(int64_t this_obj) { LDKBolt12ParseError this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -61799,6 +67564,11 @@ int32_t CS_LDK_Bolt12SemanticError_missing_paths() { return ret_conv; } +int32_t CS_LDK_Bolt12SemanticError_unexpected_paths() { + int32_t ret_conv = LDKBolt12SemanticError_to_cs(Bolt12SemanticError_unexpected_paths()); + return ret_conv; +} + int32_t CS_LDK_Bolt12SemanticError_invalid_pay_info() { int32_t ret_conv = LDKBolt12SemanticError_to_cs(Bolt12SemanticError_invalid_pay_info()); return ret_conv; @@ -61819,6 +67589,164 @@ int32_t CS_LDK_Bolt12SemanticError_missing_signature() { return ret_conv; } +void CS_LDK_RefundMaybeWithDerivedMetadataBuilder_free(int64_t this_obj) { + LDKRefundMaybeWithDerivedMetadataBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + RefundMaybeWithDerivedMetadataBuilder_free(this_obj_conv); +} + +static inline uint64_t RefundMaybeWithDerivedMetadataBuilder_clone_ptr(LDKRefundMaybeWithDerivedMetadataBuilder *NONNULL_PTR arg) { + LDKRefundMaybeWithDerivedMetadataBuilder ret_var = RefundMaybeWithDerivedMetadataBuilder_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t CS_LDK_RefundMaybeWithDerivedMetadataBuilder_clone_ptr(int64_t arg) { + LDKRefundMaybeWithDerivedMetadataBuilder arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = RefundMaybeWithDerivedMetadataBuilder_clone_ptr(&arg_conv); + return ret_conv; +} + +int64_t CS_LDK_RefundMaybeWithDerivedMetadataBuilder_clone(int64_t orig) { + LDKRefundMaybeWithDerivedMetadataBuilder orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKRefundMaybeWithDerivedMetadataBuilder ret_var = RefundMaybeWithDerivedMetadataBuilder_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_RefundMaybeWithDerivedMetadataBuilder_new(int8_tArray metadata, int8_tArray payer_id, int64_t amount_msats) { + LDKCVec_u8Z metadata_ref; + metadata_ref.datalen = metadata->arr_len; + metadata_ref.data = MALLOC(metadata_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(metadata_ref.data, metadata->elems, metadata_ref.datalen); FREE(metadata); + LDKPublicKey payer_id_ref; + CHECK(payer_id->arr_len == 33); + memcpy(payer_id_ref.compressed_form, payer_id->elems, 33); FREE(payer_id); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = RefundMaybeWithDerivedMetadataBuilder_new(metadata_ref, payer_id_ref, amount_msats); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(int8_tArray node_id, int64_t expanded_key, int64_t entropy_source, int64_t amount_msats, int8_tArray payment_id) { + LDKPublicKey node_id_ref; + CHECK(node_id->arr_len == 33); + memcpy(node_id_ref.compressed_form, node_id->elems, 33); FREE(node_id); + LDKExpandedKey expanded_key_conv; + expanded_key_conv.inner = untag_ptr(expanded_key); + expanded_key_conv.is_owned = ptr_is_owned(expanded_key); + CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv); + expanded_key_conv.is_owned = false; + void* entropy_source_ptr = untag_ptr(entropy_source); + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } + LDKThirtyTwoBytes payment_id_ref; + CHECK(payment_id->arr_len == 32); + memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(node_id_ref, &expanded_key_conv, entropy_source_conv, amount_msats, payment_id_ref); + return tag_ptr(ret_conv, true); +} + +void CS_LDK_RefundMaybeWithDerivedMetadataBuilder_description(int64_t this_arg, jstring description) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKStr description_conv = str_ref_to_owned_c(description); + RefundMaybeWithDerivedMetadataBuilder_description(this_arg_conv, description_conv); +} + +void CS_LDK_RefundMaybeWithDerivedMetadataBuilder_absolute_expiry(int64_t this_arg, int64_t absolute_expiry) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + RefundMaybeWithDerivedMetadataBuilder_absolute_expiry(this_arg_conv, absolute_expiry); +} + +void CS_LDK_RefundMaybeWithDerivedMetadataBuilder_issuer(int64_t this_arg, jstring issuer) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKStr issuer_conv = str_ref_to_owned_c(issuer); + RefundMaybeWithDerivedMetadataBuilder_issuer(this_arg_conv, issuer_conv); +} + +void CS_LDK_RefundMaybeWithDerivedMetadataBuilder_path(int64_t this_arg, int64_t path) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKBlindedPath path_conv; + path_conv.inner = untag_ptr(path); + path_conv.is_owned = ptr_is_owned(path); + CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv); + path_conv = BlindedPath_clone(&path_conv); + RefundMaybeWithDerivedMetadataBuilder_path(this_arg_conv, path_conv); +} + +void CS_LDK_RefundMaybeWithDerivedMetadataBuilder_chain(int64_t this_arg, int32_t network) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKNetwork network_conv = LDKNetwork_from_cs(network); + RefundMaybeWithDerivedMetadataBuilder_chain(this_arg_conv, network_conv); +} + +void CS_LDK_RefundMaybeWithDerivedMetadataBuilder_quantity(int64_t this_arg, int64_t quantity) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + RefundMaybeWithDerivedMetadataBuilder_quantity(this_arg_conv, quantity); +} + +void CS_LDK_RefundMaybeWithDerivedMetadataBuilder_payer_note(int64_t this_arg, jstring payer_note) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKStr payer_note_conv = str_ref_to_owned_c(payer_note); + RefundMaybeWithDerivedMetadataBuilder_payer_note(this_arg_conv, payer_note_conv); +} + +int64_t CS_LDK_RefundMaybeWithDerivedMetadataBuilder_build(int64_t this_arg) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ"); + *ret_conv = RefundMaybeWithDerivedMetadataBuilder_build(this_arg_conv); + return tag_ptr(ret_conv, true); +} + void CS_LDK_Refund_free(int64_t this_obj) { LDKRefund this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -62019,6 +67947,16 @@ int64_t CS_LDK_Refund_payer_note(int64_t this_arg) { return ret_ref; } +int64_t CS_LDK_Refund_hash(int64_t o) { + LDKRefund o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = Refund_hash(&o_conv); + return ret_conv; +} + int8_tArray CS_LDK_Refund_write(int64_t obj) { LDKRefund obj_conv; obj_conv.inner = untag_ptr(obj); @@ -62250,6 +68188,16 @@ int64_t CS_LDK_NodeId_from_pubkey(int8_tArray pubkey) { return ret_ref; } +int64_t CS_LDK_NodeId_from_slice(int8_tArray bytes) { + LDKu8slice bytes_ref; + bytes_ref.datalen = bytes->arr_len; + bytes_ref.data = bytes->elems; + LDKCResult_NodeIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeIdDecodeErrorZ), "LDKCResult_NodeIdDecodeErrorZ"); + *ret_conv = NodeId_from_slice(bytes_ref); + FREE(bytes); + return tag_ptr(ret_conv, true); +} + int8_tArray CS_LDK_NodeId_as_slice(int64_t this_arg) { LDKNodeId this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -63123,6 +69071,32 @@ int64_t CS_LDK_DirectedChannelInfo_effective_capacity(int64_t this_arg) { return ret_ref; } +int64_t CS_LDK_DirectedChannelInfo_source(int64_t this_arg) { + LDKDirectedChannelInfo this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKNodeId ret_var = DirectedChannelInfo_source(&this_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_DirectedChannelInfo_target(int64_t this_arg) { + LDKDirectedChannelInfo this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKNodeId ret_var = DirectedChannelInfo_target(&this_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + void CS_LDK_EffectiveCapacity_free(int64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -63843,6 +69817,16 @@ jboolean CS_LDK_NodeInfo_eq(int64_t a, int64_t b) { return ret_conv; } +jboolean CS_LDK_NodeInfo_is_tor_only(int64_t this_arg) { + LDKNodeInfo this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = NodeInfo_is_tor_only(&this_arg_conv); + return ret_conv; +} + int8_tArray CS_LDK_NodeInfo_write(int64_t obj) { LDKNodeInfo obj_conv; obj_conv.inner = untag_ptr(obj); @@ -67999,7 +73983,34 @@ void CS_LDK_DelayedPaymentOutputDescriptor_set_channel_value_satoshis(int64_t t DelayedPaymentOutputDescriptor_set_channel_value_satoshis(&this_ptr_conv, val); } -int64_t CS_LDK_DelayedPaymentOutputDescriptor_new(int64_t outpoint_arg, int8_tArray per_commitment_point_arg, int16_t to_self_delay_arg, int64_t output_arg, int64_t revocation_pubkey_arg, int8_tArray channel_keys_id_arg, int64_t channel_value_satoshis_arg) { +int64_t CS_LDK_DelayedPaymentOutputDescriptor_get_channel_transaction_parameters(int64_t this_ptr) { + LDKDelayedPaymentOutputDescriptor this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelTransactionParameters ret_var = DelayedPaymentOutputDescriptor_get_channel_transaction_parameters(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void CS_LDK_DelayedPaymentOutputDescriptor_set_channel_transaction_parameters(int64_t this_ptr, int64_t val) { + LDKDelayedPaymentOutputDescriptor this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelTransactionParameters val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelTransactionParameters_clone(&val_conv); + DelayedPaymentOutputDescriptor_set_channel_transaction_parameters(&this_ptr_conv, val_conv); +} + +int64_t CS_LDK_DelayedPaymentOutputDescriptor_new(int64_t outpoint_arg, int8_tArray per_commitment_point_arg, int16_t to_self_delay_arg, int64_t output_arg, int64_t revocation_pubkey_arg, int8_tArray channel_keys_id_arg, int64_t channel_value_satoshis_arg, int64_t channel_transaction_parameters_arg) { LDKOutPoint outpoint_arg_conv; outpoint_arg_conv.inner = untag_ptr(outpoint_arg); outpoint_arg_conv.is_owned = ptr_is_owned(outpoint_arg); @@ -68020,7 +74031,12 @@ int64_t CS_LDK_DelayedPaymentOutputDescriptor_new(int64_t outpoint_arg, int8_tA LDKThirtyTwoBytes channel_keys_id_arg_ref; CHECK(channel_keys_id_arg->arr_len == 32); memcpy(channel_keys_id_arg_ref.data, channel_keys_id_arg->elems, 32); FREE(channel_keys_id_arg); - LDKDelayedPaymentOutputDescriptor ret_var = DelayedPaymentOutputDescriptor_new(outpoint_arg_conv, per_commitment_point_arg_ref, to_self_delay_arg, output_arg_conv, revocation_pubkey_arg_conv, channel_keys_id_arg_ref, channel_value_satoshis_arg); + LDKChannelTransactionParameters channel_transaction_parameters_arg_conv; + channel_transaction_parameters_arg_conv.inner = untag_ptr(channel_transaction_parameters_arg); + channel_transaction_parameters_arg_conv.is_owned = ptr_is_owned(channel_transaction_parameters_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_transaction_parameters_arg_conv); + channel_transaction_parameters_arg_conv = ChannelTransactionParameters_clone(&channel_transaction_parameters_arg_conv); + LDKDelayedPaymentOutputDescriptor ret_var = DelayedPaymentOutputDescriptor_new(outpoint_arg_conv, per_commitment_point_arg_ref, to_self_delay_arg, output_arg_conv, revocation_pubkey_arg_conv, channel_keys_id_arg_ref, channel_value_satoshis_arg, channel_transaction_parameters_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -68704,6 +74720,29 @@ void CS_LDK_HTLCDescriptor_set_channel_derivation_parameters(int64_t this_ptr, HTLCDescriptor_set_channel_derivation_parameters(&this_ptr_conv, val_conv); } +int8_tArray CS_LDK_HTLCDescriptor_get_commitment_txid(int64_t this_ptr) { + LDKHTLCDescriptor this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(32, __LINE__); + memcpy(ret_arr->elems, *HTLCDescriptor_get_commitment_txid(&this_ptr_conv), 32); + return ret_arr; +} + +void CS_LDK_HTLCDescriptor_set_commitment_txid(int64_t this_ptr, int8_tArray val) { + LDKHTLCDescriptor this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKThirtyTwoBytes val_ref; + CHECK(val->arr_len == 32); + memcpy(val_ref.data, val->elems, 32); FREE(val); + HTLCDescriptor_set_commitment_txid(&this_ptr_conv, val_ref); +} + int64_t CS_LDK_HTLCDescriptor_get_per_commitment_number(int64_t this_ptr) { LDKHTLCDescriptor this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -68840,6 +74879,37 @@ void CS_LDK_HTLCDescriptor_set_counterparty_sig(int64_t this_ptr, int8_tArray v HTLCDescriptor_set_counterparty_sig(&this_ptr_conv, val_ref); } +int64_t CS_LDK_HTLCDescriptor_new(int64_t channel_derivation_parameters_arg, int8_tArray commitment_txid_arg, int64_t per_commitment_number_arg, int8_tArray per_commitment_point_arg, int32_t feerate_per_kw_arg, int64_t htlc_arg, int64_t preimage_arg, int8_tArray counterparty_sig_arg) { + LDKChannelDerivationParameters channel_derivation_parameters_arg_conv; + channel_derivation_parameters_arg_conv.inner = untag_ptr(channel_derivation_parameters_arg); + channel_derivation_parameters_arg_conv.is_owned = ptr_is_owned(channel_derivation_parameters_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_derivation_parameters_arg_conv); + channel_derivation_parameters_arg_conv = ChannelDerivationParameters_clone(&channel_derivation_parameters_arg_conv); + LDKThirtyTwoBytes commitment_txid_arg_ref; + CHECK(commitment_txid_arg->arr_len == 32); + memcpy(commitment_txid_arg_ref.data, commitment_txid_arg->elems, 32); FREE(commitment_txid_arg); + LDKPublicKey per_commitment_point_arg_ref; + CHECK(per_commitment_point_arg->arr_len == 33); + memcpy(per_commitment_point_arg_ref.compressed_form, per_commitment_point_arg->elems, 33); FREE(per_commitment_point_arg); + LDKHTLCOutputInCommitment htlc_arg_conv; + htlc_arg_conv.inner = untag_ptr(htlc_arg); + htlc_arg_conv.is_owned = ptr_is_owned(htlc_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(htlc_arg_conv); + htlc_arg_conv = HTLCOutputInCommitment_clone(&htlc_arg_conv); + void* preimage_arg_ptr = untag_ptr(preimage_arg); + CHECK_ACCESS(preimage_arg_ptr); + LDKCOption_ThirtyTwoBytesZ preimage_arg_conv = *(LDKCOption_ThirtyTwoBytesZ*)(preimage_arg_ptr); + preimage_arg_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(preimage_arg)); + LDKECDSASignature counterparty_sig_arg_ref; + CHECK(counterparty_sig_arg->arr_len == 64); + memcpy(counterparty_sig_arg_ref.compact_form, counterparty_sig_arg->elems, 64); FREE(counterparty_sig_arg); + LDKHTLCDescriptor ret_var = HTLCDescriptor_new(channel_derivation_parameters_arg_conv, commitment_txid_arg_ref, per_commitment_number_arg, per_commitment_point_arg_ref, feerate_per_kw_arg, htlc_arg_conv, preimage_arg_conv, counterparty_sig_arg_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + static inline uint64_t HTLCDescriptor_clone_ptr(LDKHTLCDescriptor *NONNULL_PTR arg) { LDKHTLCDescriptor ret_var = HTLCDescriptor_clone(arg); int64_t ret_ref = 0; @@ -69044,6 +75114,15 @@ void CS_LDK_NodeSigner_free(int64_t this_ptr) { NodeSigner_free(this_ptr_conv); } +void CS_LDK_OutputSpender_free(int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKOutputSpender this_ptr_conv = *(LDKOutputSpender*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + OutputSpender_free(this_ptr_conv); +} + void CS_LDK_SignerProvider_free(int64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -69053,6 +75132,15 @@ void CS_LDK_SignerProvider_free(int64_t this_ptr) { SignerProvider_free(this_ptr_conv); } +void CS_LDK_ChangeDestinationSource_free(int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKChangeDestinationSource this_ptr_conv = *(LDKChangeDestinationSource*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + ChangeDestinationSource_free(this_ptr_conv); +} + void CS_LDK_InMemorySigner_free(int64_t this_obj) { LDKInMemorySigner this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -69544,76 +75632,36 @@ int64_t CS_LDK_KeysManager_sign_spendable_outputs_psbt(int64_t this_arg, int64_ return tag_ptr(ret_conv, true); } -int64_t CS_LDK_KeysManager_spend_spendable_outputs(int64_t this_arg, int64_tArray descriptors, int64_tArray outputs, int8_tArray change_destination_script, int32_t feerate_sat_per_1000_weight, int64_t locktime) { +int64_t CS_LDK_KeysManager_as_EntropySource(int64_t this_arg) { LDKKeysManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKCVec_SpendableOutputDescriptorZ descriptors_constr; - descriptors_constr.datalen = descriptors->arr_len; - if (descriptors_constr.datalen > 0) - descriptors_constr.data = MALLOC(descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements"); - else - descriptors_constr.data = NULL; - int64_t* descriptors_vals = descriptors->elems; - for (size_t b = 0; b < descriptors_constr.datalen; b++) { - int64_t descriptors_conv_27 = descriptors_vals[b]; - void* descriptors_conv_27_ptr = untag_ptr(descriptors_conv_27); - CHECK_ACCESS(descriptors_conv_27_ptr); - LDKSpendableOutputDescriptor descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(descriptors_conv_27_ptr); - descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptors_conv_27)); - descriptors_constr.data[b] = descriptors_conv_27_conv; - } - FREE(descriptors); - LDKCVec_TxOutZ outputs_constr; - outputs_constr.datalen = outputs->arr_len; - if (outputs_constr.datalen > 0) - outputs_constr.data = MALLOC(outputs_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements"); - else - outputs_constr.data = NULL; - int64_t* outputs_vals = outputs->elems; - for (size_t h = 0; h < outputs_constr.datalen; h++) { - int64_t outputs_conv_7 = outputs_vals[h]; - void* outputs_conv_7_ptr = untag_ptr(outputs_conv_7); - CHECK_ACCESS(outputs_conv_7_ptr); - LDKTxOut outputs_conv_7_conv = *(LDKTxOut*)(outputs_conv_7_ptr); - outputs_conv_7_conv = TxOut_clone((LDKTxOut*)untag_ptr(outputs_conv_7)); - outputs_constr.data[h] = outputs_conv_7_conv; - } - FREE(outputs); - LDKCVec_u8Z change_destination_script_ref; - change_destination_script_ref.datalen = change_destination_script->arr_len; - change_destination_script_ref.data = MALLOC(change_destination_script_ref.datalen, "LDKCVec_u8Z Bytes"); - memcpy(change_destination_script_ref.data, change_destination_script->elems, change_destination_script_ref.datalen); FREE(change_destination_script); - void* locktime_ptr = untag_ptr(locktime); - CHECK_ACCESS(locktime_ptr); - LDKCOption_u32Z locktime_conv = *(LDKCOption_u32Z*)(locktime_ptr); - locktime_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(locktime)); - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = KeysManager_spend_spendable_outputs(&this_arg_conv, descriptors_constr, outputs_constr, change_destination_script_ref, feerate_sat_per_1000_weight, locktime_conv); - return tag_ptr(ret_conv, true); + LDKEntropySource* ret_ret = MALLOC(sizeof(LDKEntropySource), "LDKEntropySource"); + *ret_ret = KeysManager_as_EntropySource(&this_arg_conv); + return tag_ptr(ret_ret, true); } -int64_t CS_LDK_KeysManager_as_EntropySource(int64_t this_arg) { +int64_t CS_LDK_KeysManager_as_NodeSigner(int64_t this_arg) { LDKKeysManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKEntropySource* ret_ret = MALLOC(sizeof(LDKEntropySource), "LDKEntropySource"); - *ret_ret = KeysManager_as_EntropySource(&this_arg_conv); + LDKNodeSigner* ret_ret = MALLOC(sizeof(LDKNodeSigner), "LDKNodeSigner"); + *ret_ret = KeysManager_as_NodeSigner(&this_arg_conv); return tag_ptr(ret_ret, true); } -int64_t CS_LDK_KeysManager_as_NodeSigner(int64_t this_arg) { +int64_t CS_LDK_KeysManager_as_OutputSpender(int64_t this_arg) { LDKKeysManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKNodeSigner* ret_ret = MALLOC(sizeof(LDKNodeSigner), "LDKNodeSigner"); - *ret_ret = KeysManager_as_NodeSigner(&this_arg_conv); + LDKOutputSpender* ret_ret = MALLOC(sizeof(LDKOutputSpender), "LDKOutputSpender"); + *ret_ret = KeysManager_as_OutputSpender(&this_arg_conv); return tag_ptr(ret_ret, true); } @@ -69658,6 +75706,17 @@ int64_t CS_LDK_PhantomKeysManager_as_NodeSigner(int64_t this_arg) { return tag_ptr(ret_ret, true); } +int64_t CS_LDK_PhantomKeysManager_as_OutputSpender(int64_t this_arg) { + LDKPhantomKeysManager this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKOutputSpender* ret_ret = MALLOC(sizeof(LDKOutputSpender), "LDKOutputSpender"); + *ret_ret = PhantomKeysManager_as_OutputSpender(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + int64_t CS_LDK_PhantomKeysManager_as_SignerProvider(int64_t this_arg) { LDKPhantomKeysManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -69685,57 +75744,6 @@ int64_t CS_LDK_PhantomKeysManager_new(int8_tArray seed, int64_t starting_time_s return ret_ref; } -int64_t CS_LDK_PhantomKeysManager_spend_spendable_outputs(int64_t this_arg, int64_tArray descriptors, int64_tArray outputs, int8_tArray change_destination_script, int32_t feerate_sat_per_1000_weight, int64_t locktime) { - LDKPhantomKeysManager this_arg_conv; - this_arg_conv.inner = untag_ptr(this_arg); - this_arg_conv.is_owned = ptr_is_owned(this_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv.is_owned = false; - LDKCVec_SpendableOutputDescriptorZ descriptors_constr; - descriptors_constr.datalen = descriptors->arr_len; - if (descriptors_constr.datalen > 0) - descriptors_constr.data = MALLOC(descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements"); - else - descriptors_constr.data = NULL; - int64_t* descriptors_vals = descriptors->elems; - for (size_t b = 0; b < descriptors_constr.datalen; b++) { - int64_t descriptors_conv_27 = descriptors_vals[b]; - void* descriptors_conv_27_ptr = untag_ptr(descriptors_conv_27); - CHECK_ACCESS(descriptors_conv_27_ptr); - LDKSpendableOutputDescriptor descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(descriptors_conv_27_ptr); - descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptors_conv_27)); - descriptors_constr.data[b] = descriptors_conv_27_conv; - } - FREE(descriptors); - LDKCVec_TxOutZ outputs_constr; - outputs_constr.datalen = outputs->arr_len; - if (outputs_constr.datalen > 0) - outputs_constr.data = MALLOC(outputs_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements"); - else - outputs_constr.data = NULL; - int64_t* outputs_vals = outputs->elems; - for (size_t h = 0; h < outputs_constr.datalen; h++) { - int64_t outputs_conv_7 = outputs_vals[h]; - void* outputs_conv_7_ptr = untag_ptr(outputs_conv_7); - CHECK_ACCESS(outputs_conv_7_ptr); - LDKTxOut outputs_conv_7_conv = *(LDKTxOut*)(outputs_conv_7_ptr); - outputs_conv_7_conv = TxOut_clone((LDKTxOut*)untag_ptr(outputs_conv_7)); - outputs_constr.data[h] = outputs_conv_7_conv; - } - FREE(outputs); - LDKCVec_u8Z change_destination_script_ref; - change_destination_script_ref.datalen = change_destination_script->arr_len; - change_destination_script_ref.data = MALLOC(change_destination_script_ref.datalen, "LDKCVec_u8Z Bytes"); - memcpy(change_destination_script_ref.data, change_destination_script->elems, change_destination_script_ref.datalen); FREE(change_destination_script); - void* locktime_ptr = untag_ptr(locktime); - CHECK_ACCESS(locktime_ptr); - LDKCOption_u32Z locktime_conv = *(LDKCOption_u32Z*)(locktime_ptr); - locktime_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(locktime)); - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = PhantomKeysManager_spend_spendable_outputs(&this_arg_conv, descriptors_constr, outputs_constr, change_destination_script_ref, feerate_sat_per_1000_weight, locktime_conv); - return tag_ptr(ret_conv, true); -} - int64_t CS_LDK_PhantomKeysManager_derive_channel_keys(int64_t this_arg, int64_t channel_value_satoshis, int8_tArray params) { LDKPhantomKeysManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -69775,6 +75783,36 @@ int8_tArray CS_LDK_PhantomKeysManager_get_phantom_node_secret_key(int64_t this_ return ret_arr; } +void CS_LDK_RandomBytes_free(int64_t this_obj) { + LDKRandomBytes this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + RandomBytes_free(this_obj_conv); +} + +int64_t CS_LDK_RandomBytes_new(int8_tArray seed) { + LDKThirtyTwoBytes seed_ref; + CHECK(seed->arr_len == 32); + memcpy(seed_ref.data, seed->elems, 32); FREE(seed); + LDKRandomBytes ret_var = RandomBytes_new(seed_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_RandomBytes_as_EntropySource(int64_t this_arg) { + LDKRandomBytes this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKEntropySource* ret_ret = MALLOC(sizeof(LDKEntropySource), "LDKEntropySource"); + *ret_ret = RandomBytes_as_EntropySource(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + void CS_LDK_EcdsaChannelSigner_free(int64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -70095,6 +76133,29 @@ int64_t CS_LDK_Destination_blinded_path(int64_t a) { return ret_ref; } +int64_t CS_LDK_Destination_hash(int64_t o) { + LDKDestination* o_conv = (LDKDestination*)untag_ptr(o); + int64_t ret_conv = Destination_hash(o_conv); + return ret_conv; +} + +jboolean CS_LDK_Destination_eq(int64_t a, int64_t b) { + LDKDestination* a_conv = (LDKDestination*)untag_ptr(a); + LDKDestination* b_conv = (LDKDestination*)untag_ptr(b); + jboolean ret_conv = Destination_eq(a_conv, b_conv); + return ret_conv; +} + +void CS_LDK_Destination_resolve(int64_t this_arg, int64_t network_graph) { + LDKDestination* this_arg_conv = (LDKDestination*)untag_ptr(this_arg); + LDKReadOnlyNetworkGraph network_graph_conv; + network_graph_conv.inner = untag_ptr(network_graph); + network_graph_conv.is_owned = ptr_is_owned(network_graph); + CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv); + network_graph_conv.is_owned = false; + Destination_resolve(this_arg_conv, &network_graph_conv); +} + void CS_LDK_SendSuccess_free(int64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -70141,6 +76202,12 @@ int64_t CS_LDK_SendSuccess_buffered_awaiting_connection(int8_tArray a) { return ret_ref; } +int64_t CS_LDK_SendSuccess_hash(int64_t o) { + LDKSendSuccess* o_conv = (LDKSendSuccess*)untag_ptr(o); + int64_t ret_conv = SendSuccess_hash(o_conv); + return ret_conv; +} + jboolean CS_LDK_SendSuccess_eq(int64_t a, int64_t b) { LDKSendSuccess* a_conv = (LDKSendSuccess*)untag_ptr(a); LDKSendSuccess* b_conv = (LDKSendSuccess*)untag_ptr(b); @@ -70237,6 +76304,13 @@ int64_t CS_LDK_SendError_get_node_id_failed() { return ret_ref; } +int64_t CS_LDK_SendError_unresolved_introduction_node() { + LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError"); + *ret_copy = SendError_unresolved_introduction_node(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + int64_t CS_LDK_SendError_blinded_path_advance_failed() { LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError"); *ret_copy = SendError_blinded_path_advance_failed(); @@ -70244,6 +76318,12 @@ int64_t CS_LDK_SendError_blinded_path_advance_failed() { return ret_ref; } +int64_t CS_LDK_SendError_hash(int64_t o) { + LDKSendError* o_conv = (LDKSendError*)untag_ptr(o); + int64_t ret_conv = SendError_hash(o_conv); + return ret_conv; +} + jboolean CS_LDK_SendError_eq(int64_t a, int64_t b) { LDKSendError* a_conv = (LDKSendError*)untag_ptr(a); LDKSendError* b_conv = (LDKSendError*)untag_ptr(b); @@ -70289,17 +76369,18 @@ int64_t CS_LDK_PeeledOnion_clone(int64_t orig) { return ret_ref; } -int64_t CS_LDK_PeeledOnion_forward(int8_tArray a, int64_t b) { - LDKPublicKey a_ref; - CHECK(a->arr_len == 33); - memcpy(a_ref.compressed_form, a->elems, 33); FREE(a); +int64_t CS_LDK_PeeledOnion_forward(int64_t a, int64_t b) { + void* a_ptr = untag_ptr(a); + CHECK_ACCESS(a_ptr); + LDKNextMessageHop a_conv = *(LDKNextMessageHop*)(a_ptr); + a_conv = NextMessageHop_clone((LDKNextMessageHop*)untag_ptr(a)); LDKOnionMessage b_conv; b_conv.inner = untag_ptr(b); b_conv.is_owned = ptr_is_owned(b); CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); b_conv = OnionMessage_clone(&b_conv); LDKPeeledOnion *ret_copy = MALLOC(sizeof(LDKPeeledOnion), "LDKPeeledOnion"); - *ret_copy = PeeledOnion_forward(a_ref, b_conv); + *ret_copy = PeeledOnion_forward(a_conv, b_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -70323,13 +76404,53 @@ int64_t CS_LDK_PeeledOnion_receive(int64_t a, int8_tArray b, int64_t c) { return ret_ref; } -int64_t CS_LDK_create_onion_message(int64_t entropy_source, int64_t node_signer, int64_t path, int64_t contents, int64_t reply_path) { +int64_t CS_LDK_create_onion_message_resolving_destination(int64_t entropy_source, int64_t node_signer, int64_t node_id_lookup, int64_t network_graph, int64_t path, int64_t contents, int64_t reply_path) { + void* entropy_source_ptr = untag_ptr(entropy_source); + if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } + LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + void* node_signer_ptr = untag_ptr(node_signer); + if (ptr_is_owned(node_signer)) { CHECK_ACCESS(node_signer_ptr); } + LDKNodeSigner* node_signer_conv = (LDKNodeSigner*)node_signer_ptr; + void* node_id_lookup_ptr = untag_ptr(node_id_lookup); + if (ptr_is_owned(node_id_lookup)) { CHECK_ACCESS(node_id_lookup_ptr); } + LDKNodeIdLookUp* node_id_lookup_conv = (LDKNodeIdLookUp*)node_id_lookup_ptr; + LDKReadOnlyNetworkGraph network_graph_conv; + network_graph_conv.inner = untag_ptr(network_graph); + network_graph_conv.is_owned = ptr_is_owned(network_graph); + CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv); + network_graph_conv.is_owned = false; + LDKOnionMessagePath path_conv; + path_conv.inner = untag_ptr(path); + path_conv.is_owned = ptr_is_owned(path); + CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv); + path_conv = OnionMessagePath_clone(&path_conv); + void* contents_ptr = untag_ptr(contents); + CHECK_ACCESS(contents_ptr); + LDKOnionMessageContents contents_conv = *(LDKOnionMessageContents*)(contents_ptr); + if (contents_conv.free == LDKOnionMessageContents_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKOnionMessageContents_JCalls_cloned(&contents_conv); + } + LDKBlindedPath reply_path_conv; + reply_path_conv.inner = untag_ptr(reply_path); + reply_path_conv.is_owned = ptr_is_owned(reply_path); + CHECK_INNER_FIELD_ACCESS_OR_NULL(reply_path_conv); + reply_path_conv = BlindedPath_clone(&reply_path_conv); + LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ"); + *ret_conv = create_onion_message_resolving_destination(entropy_source_conv, node_signer_conv, node_id_lookup_conv, &network_graph_conv, path_conv, contents_conv, reply_path_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_create_onion_message(int64_t entropy_source, int64_t node_signer, int64_t node_id_lookup, int64_t path, int64_t contents, int64_t reply_path) { void* entropy_source_ptr = untag_ptr(entropy_source); if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; void* node_signer_ptr = untag_ptr(node_signer); if (ptr_is_owned(node_signer)) { CHECK_ACCESS(node_signer_ptr); } LDKNodeSigner* node_signer_conv = (LDKNodeSigner*)node_signer_ptr; + void* node_id_lookup_ptr = untag_ptr(node_id_lookup); + if (ptr_is_owned(node_id_lookup)) { CHECK_ACCESS(node_id_lookup_ptr); } + LDKNodeIdLookUp* node_id_lookup_conv = (LDKNodeIdLookUp*)node_id_lookup_ptr; LDKOnionMessagePath path_conv; path_conv.inner = untag_ptr(path); path_conv.is_owned = ptr_is_owned(path); @@ -70348,7 +76469,7 @@ int64_t CS_LDK_create_onion_message(int64_t entropy_source, int64_t node_signer CHECK_INNER_FIELD_ACCESS_OR_NULL(reply_path_conv); reply_path_conv = BlindedPath_clone(&reply_path_conv); LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ"); - *ret_conv = create_onion_message(entropy_source_conv, node_signer_conv, path_conv, contents_conv, reply_path_conv); + *ret_conv = create_onion_message(entropy_source_conv, node_signer_conv, node_id_lookup_conv, path_conv, contents_conv, reply_path_conv); return tag_ptr(ret_conv, true); } @@ -70384,7 +76505,7 @@ int64_t CS_LDK_peel_onion_message(int64_t msg, int64_t node_signer, int64_t log return tag_ptr(ret_conv, true); } -int64_t CS_LDK_OnionMessenger_new(int64_t entropy_source, int64_t node_signer, int64_t logger, int64_t message_router, int64_t offers_handler, int64_t custom_handler) { +int64_t CS_LDK_OnionMessenger_new(int64_t entropy_source, int64_t node_signer, int64_t logger, int64_t node_id_lookup, int64_t message_router, int64_t offers_handler, int64_t custom_handler) { void* entropy_source_ptr = untag_ptr(entropy_source); CHECK_ACCESS(entropy_source_ptr); LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); @@ -70406,6 +76527,13 @@ int64_t CS_LDK_OnionMessenger_new(int64_t entropy_source, int64_t node_signer, // If this_arg is a JCalls struct, then we need to increment the refcnt in it. LDKLogger_JCalls_cloned(&logger_conv); } + void* node_id_lookup_ptr = untag_ptr(node_id_lookup); + CHECK_ACCESS(node_id_lookup_ptr); + LDKNodeIdLookUp node_id_lookup_conv = *(LDKNodeIdLookUp*)(node_id_lookup_ptr); + if (node_id_lookup_conv.free == LDKNodeIdLookUp_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKNodeIdLookUp_JCalls_cloned(&node_id_lookup_conv); + } void* message_router_ptr = untag_ptr(message_router); CHECK_ACCESS(message_router_ptr); LDKMessageRouter message_router_conv = *(LDKMessageRouter*)(message_router_ptr); @@ -70427,7 +76555,7 @@ int64_t CS_LDK_OnionMessenger_new(int64_t entropy_source, int64_t node_signer, // If this_arg is a JCalls struct, then we need to increment the refcnt in it. LDKCustomOnionMessageHandler_JCalls_cloned(&custom_handler_conv); } - LDKOnionMessenger ret_var = OnionMessenger_new(entropy_source_conv, node_signer_conv, logger_conv, message_router_conv, offers_handler_conv, custom_handler_conv); + LDKOnionMessenger ret_var = OnionMessenger_new(entropy_source_conv, node_signer_conv, logger_conv, node_id_lookup_conv, message_router_conv, offers_handler_conv, custom_handler_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -70866,6 +76994,65 @@ void CS_LDK_OnionMessageContents_free(int64_t this_ptr) { OnionMessageContents_free(this_ptr_conv); } +void CS_LDK_NextMessageHop_free(int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKNextMessageHop this_ptr_conv = *(LDKNextMessageHop*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + NextMessageHop_free(this_ptr_conv); +} + +static inline uint64_t NextMessageHop_clone_ptr(LDKNextMessageHop *NONNULL_PTR arg) { + LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop"); + *ret_copy = NextMessageHop_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t CS_LDK_NextMessageHop_clone_ptr(int64_t arg) { + LDKNextMessageHop* arg_conv = (LDKNextMessageHop*)untag_ptr(arg); + int64_t ret_conv = NextMessageHop_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_NextMessageHop_clone(int64_t orig) { + LDKNextMessageHop* orig_conv = (LDKNextMessageHop*)untag_ptr(orig); + LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop"); + *ret_copy = NextMessageHop_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_NextMessageHop_node_id(int8_tArray a) { + LDKPublicKey a_ref; + CHECK(a->arr_len == 33); + memcpy(a_ref.compressed_form, a->elems, 33); FREE(a); + LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop"); + *ret_copy = NextMessageHop_node_id(a_ref); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_NextMessageHop_short_channel_id(int64_t a) { + LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop"); + *ret_copy = NextMessageHop_short_channel_id(a); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_NextMessageHop_hash(int64_t o) { + LDKNextMessageHop* o_conv = (LDKNextMessageHop*)untag_ptr(o); + int64_t ret_conv = NextMessageHop_hash(o_conv); + return ret_conv; +} + +jboolean CS_LDK_NextMessageHop_eq(int64_t a, int64_t b) { + LDKNextMessageHop* a_conv = (LDKNextMessageHop*)untag_ptr(a); + LDKNextMessageHop* b_conv = (LDKNextMessageHop*)untag_ptr(b); + jboolean ret_conv = NextMessageHop_eq(a_conv, b_conv); + return ret_conv; +} + void CS_LDK_BlindedPath_free(int64_t this_obj) { LDKBlindedPath this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -70874,27 +77061,29 @@ void CS_LDK_BlindedPath_free(int64_t this_obj) { BlindedPath_free(this_obj_conv); } -int8_tArray CS_LDK_BlindedPath_get_introduction_node_id(int64_t this_ptr) { +int64_t CS_LDK_BlindedPath_get_introduction_node(int64_t this_ptr) { LDKBlindedPath this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, BlindedPath_get_introduction_node_id(&this_ptr_conv).compressed_form, 33); - return ret_arr; + LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode"); + *ret_copy = BlindedPath_get_introduction_node(&this_ptr_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; } -void CS_LDK_BlindedPath_set_introduction_node_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_BlindedPath_set_introduction_node(int64_t this_ptr, int64_t val) { LDKBlindedPath this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - BlindedPath_set_introduction_node_id(&this_ptr_conv, val_ref); + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKIntroductionNode val_conv = *(LDKIntroductionNode*)(val_ptr); + val_conv = IntroductionNode_clone((LDKIntroductionNode*)untag_ptr(val)); + BlindedPath_set_introduction_node(&this_ptr_conv, val_conv); } int8_tArray CS_LDK_BlindedPath_get_blinding_point(int64_t this_ptr) { @@ -70968,10 +77157,11 @@ void CS_LDK_BlindedPath_set_blinded_hops(int64_t this_ptr, int64_tArray val) { BlindedPath_set_blinded_hops(&this_ptr_conv, val_constr); } -int64_t CS_LDK_BlindedPath_new(int8_tArray introduction_node_id_arg, int8_tArray blinding_point_arg, int64_tArray blinded_hops_arg) { - LDKPublicKey introduction_node_id_arg_ref; - CHECK(introduction_node_id_arg->arr_len == 33); - memcpy(introduction_node_id_arg_ref.compressed_form, introduction_node_id_arg->elems, 33); FREE(introduction_node_id_arg); +int64_t CS_LDK_BlindedPath_new(int64_t introduction_node_arg, int8_tArray blinding_point_arg, int64_tArray blinded_hops_arg) { + void* introduction_node_arg_ptr = untag_ptr(introduction_node_arg); + CHECK_ACCESS(introduction_node_arg_ptr); + LDKIntroductionNode introduction_node_arg_conv = *(LDKIntroductionNode*)(introduction_node_arg_ptr); + introduction_node_arg_conv = IntroductionNode_clone((LDKIntroductionNode*)untag_ptr(introduction_node_arg)); LDKPublicKey blinding_point_arg_ref; CHECK(blinding_point_arg->arr_len == 33); memcpy(blinding_point_arg_ref.compressed_form, blinding_point_arg->elems, 33); FREE(blinding_point_arg); @@ -70992,7 +77182,7 @@ int64_t CS_LDK_BlindedPath_new(int8_tArray introduction_node_id_arg, int8_tArra blinded_hops_arg_constr.data[m] = blinded_hops_arg_conv_12_conv; } FREE(blinded_hops_arg); - LDKBlindedPath ret_var = BlindedPath_new(introduction_node_id_arg_ref, blinding_point_arg_ref, blinded_hops_arg_constr); + LDKBlindedPath ret_var = BlindedPath_new(introduction_node_arg_conv, blinding_point_arg_ref, blinded_hops_arg_constr); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -71054,6 +77244,131 @@ jboolean CS_LDK_BlindedPath_eq(int64_t a, int64_t b) { return ret_conv; } +void CS_LDK_IntroductionNode_free(int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKIntroductionNode this_ptr_conv = *(LDKIntroductionNode*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + IntroductionNode_free(this_ptr_conv); +} + +static inline uint64_t IntroductionNode_clone_ptr(LDKIntroductionNode *NONNULL_PTR arg) { + LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode"); + *ret_copy = IntroductionNode_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t CS_LDK_IntroductionNode_clone_ptr(int64_t arg) { + LDKIntroductionNode* arg_conv = (LDKIntroductionNode*)untag_ptr(arg); + int64_t ret_conv = IntroductionNode_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_IntroductionNode_clone(int64_t orig) { + LDKIntroductionNode* orig_conv = (LDKIntroductionNode*)untag_ptr(orig); + LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode"); + *ret_copy = IntroductionNode_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_IntroductionNode_node_id(int8_tArray a) { + LDKPublicKey a_ref; + CHECK(a->arr_len == 33); + memcpy(a_ref.compressed_form, a->elems, 33); FREE(a); + LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode"); + *ret_copy = IntroductionNode_node_id(a_ref); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_IntroductionNode_directed_short_channel_id(int32_t a, int64_t b) { + LDKDirection a_conv = LDKDirection_from_cs(a); + LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode"); + *ret_copy = IntroductionNode_directed_short_channel_id(a_conv, b); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_IntroductionNode_hash(int64_t o) { + LDKIntroductionNode* o_conv = (LDKIntroductionNode*)untag_ptr(o); + int64_t ret_conv = IntroductionNode_hash(o_conv); + return ret_conv; +} + +jboolean CS_LDK_IntroductionNode_eq(int64_t a, int64_t b) { + LDKIntroductionNode* a_conv = (LDKIntroductionNode*)untag_ptr(a); + LDKIntroductionNode* b_conv = (LDKIntroductionNode*)untag_ptr(b); + jboolean ret_conv = IntroductionNode_eq(a_conv, b_conv); + return ret_conv; +} + +int32_t CS_LDK_Direction_clone(int64_t orig) { + LDKDirection* orig_conv = (LDKDirection*)untag_ptr(orig); + int32_t ret_conv = LDKDirection_to_cs(Direction_clone(orig_conv)); + return ret_conv; +} + +int32_t CS_LDK_Direction_node_one() { + int32_t ret_conv = LDKDirection_to_cs(Direction_node_one()); + return ret_conv; +} + +int32_t CS_LDK_Direction_node_two() { + int32_t ret_conv = LDKDirection_to_cs(Direction_node_two()); + return ret_conv; +} + +int64_t CS_LDK_Direction_hash(int64_t o) { + LDKDirection* o_conv = (LDKDirection*)untag_ptr(o); + int64_t ret_conv = Direction_hash(o_conv); + return ret_conv; +} + +jboolean CS_LDK_Direction_eq(int64_t a, int64_t b) { + LDKDirection* a_conv = (LDKDirection*)untag_ptr(a); + LDKDirection* b_conv = (LDKDirection*)untag_ptr(b); + jboolean ret_conv = Direction_eq(a_conv, b_conv); + return ret_conv; +} + +void CS_LDK_NodeIdLookUp_free(int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKNodeIdLookUp this_ptr_conv = *(LDKNodeIdLookUp*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + NodeIdLookUp_free(this_ptr_conv); +} + +void CS_LDK_EmptyNodeIdLookUp_free(int64_t this_obj) { + LDKEmptyNodeIdLookUp this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + EmptyNodeIdLookUp_free(this_obj_conv); +} + +int64_t CS_LDK_EmptyNodeIdLookUp_new() { + LDKEmptyNodeIdLookUp ret_var = EmptyNodeIdLookUp_new(); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_EmptyNodeIdLookUp_as_NodeIdLookUp(int64_t this_arg) { + LDKEmptyNodeIdLookUp this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKNodeIdLookUp* ret_ret = MALLOC(sizeof(LDKNodeIdLookUp), "LDKNodeIdLookUp"); + *ret_ret = EmptyNodeIdLookUp_as_NodeIdLookUp(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + void CS_LDK_BlindedHop_free(int64_t this_obj) { LDKBlindedHop this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -71186,8 +77501,12 @@ int64_t CS_LDK_BlindedPath_one_hop_for_message(int8_tArray recipient_node_id, i CHECK(recipient_node_id->arr_len == 33); memcpy(recipient_node_id_ref.compressed_form, recipient_node_id->elems, 33); FREE(recipient_node_id); void* entropy_source_ptr = untag_ptr(entropy_source); - if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } - LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } LDKCResult_BlindedPathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedPathNoneZ), "LDKCResult_BlindedPathNoneZ"); *ret_conv = BlindedPath_one_hop_for_message(recipient_node_id_ref, entropy_source_conv); return tag_ptr(ret_conv, true); @@ -71210,14 +77529,18 @@ int64_t CS_LDK_BlindedPath_new_for_message(ptrArray node_pks, int64_t entropy_s } FREE(node_pks); void* entropy_source_ptr = untag_ptr(entropy_source); - if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } - LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } LDKCResult_BlindedPathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedPathNoneZ), "LDKCResult_BlindedPathNoneZ"); *ret_conv = BlindedPath_new_for_message(node_pks_constr, entropy_source_conv); return tag_ptr(ret_conv, true); } -int64_t CS_LDK_BlindedPath_one_hop_for_payment(int8_tArray payee_node_id, int64_t payee_tlvs, int64_t entropy_source) { +int64_t CS_LDK_BlindedPath_one_hop_for_payment(int8_tArray payee_node_id, int64_t payee_tlvs, int16_t min_final_cltv_expiry_delta, int64_t entropy_source) { LDKPublicKey payee_node_id_ref; CHECK(payee_node_id->arr_len == 33); memcpy(payee_node_id_ref.compressed_form, payee_node_id->elems, 33); FREE(payee_node_id); @@ -71227,14 +77550,18 @@ int64_t CS_LDK_BlindedPath_one_hop_for_payment(int8_tArray payee_node_id, int64 CHECK_INNER_FIELD_ACCESS_OR_NULL(payee_tlvs_conv); payee_tlvs_conv = ReceiveTlvs_clone(&payee_tlvs_conv); void* entropy_source_ptr = untag_ptr(entropy_source); - if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } - LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ), "LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ"); - *ret_conv = BlindedPath_one_hop_for_payment(payee_node_id_ref, payee_tlvs_conv, entropy_source_conv); + *ret_conv = BlindedPath_one_hop_for_payment(payee_node_id_ref, payee_tlvs_conv, min_final_cltv_expiry_delta, entropy_source_conv); return tag_ptr(ret_conv, true); } -int64_t CS_LDK_BlindedPath_new_for_payment(int64_tArray intermediate_nodes, int8_tArray payee_node_id, int64_t payee_tlvs, int64_t htlc_maximum_msat, int64_t entropy_source) { +int64_t CS_LDK_BlindedPath_new_for_payment(int64_tArray intermediate_nodes, int8_tArray payee_node_id, int64_t payee_tlvs, int64_t htlc_maximum_msat, int16_t min_final_cltv_expiry_delta, int64_t entropy_source) { LDKCVec_ForwardNodeZ intermediate_nodes_constr; intermediate_nodes_constr.datalen = intermediate_nodes->arr_len; if (intermediate_nodes_constr.datalen > 0) @@ -71261,13 +77588,35 @@ int64_t CS_LDK_BlindedPath_new_for_payment(int64_tArray intermediate_nodes, int CHECK_INNER_FIELD_ACCESS_OR_NULL(payee_tlvs_conv); payee_tlvs_conv = ReceiveTlvs_clone(&payee_tlvs_conv); void* entropy_source_ptr = untag_ptr(entropy_source); - if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } - LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ), "LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ"); - *ret_conv = BlindedPath_new_for_payment(intermediate_nodes_constr, payee_node_id_ref, payee_tlvs_conv, htlc_maximum_msat, entropy_source_conv); + *ret_conv = BlindedPath_new_for_payment(intermediate_nodes_constr, payee_node_id_ref, payee_tlvs_conv, htlc_maximum_msat, min_final_cltv_expiry_delta, entropy_source_conv); return tag_ptr(ret_conv, true); } +int64_t CS_LDK_BlindedPath_public_introduction_node_id(int64_t this_arg, int64_t network_graph) { + LDKBlindedPath this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKReadOnlyNetworkGraph network_graph_conv; + network_graph_conv.inner = untag_ptr(network_graph); + network_graph_conv.is_owned = ptr_is_owned(network_graph); + CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv); + network_graph_conv.is_owned = false; + LDKNodeId ret_var = BlindedPath_public_introduction_node_id(&this_arg_conv, &network_graph_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + int8_tArray CS_LDK_BlindedPath_write(int64_t obj) { LDKBlindedPath obj_conv; obj_conv.inner = untag_ptr(obj); @@ -71656,7 +78005,32 @@ void CS_LDK_ReceiveTlvs_set_payment_constraints(int64_t this_ptr, int64_t val) ReceiveTlvs_set_payment_constraints(&this_ptr_conv, val_conv); } -int64_t CS_LDK_ReceiveTlvs_new(int8_tArray payment_secret_arg, int64_t payment_constraints_arg) { +int64_t CS_LDK_ReceiveTlvs_get_payment_context(int64_t this_ptr) { + LDKReceiveTlvs this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = ReceiveTlvs_get_payment_context(&this_ptr_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void CS_LDK_ReceiveTlvs_set_payment_context(int64_t this_ptr, int64_t val) { + LDKReceiveTlvs this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKPaymentContext val_conv = *(LDKPaymentContext*)(val_ptr); + val_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(val)); + ReceiveTlvs_set_payment_context(&this_ptr_conv, val_conv); +} + +int64_t CS_LDK_ReceiveTlvs_new(int8_tArray payment_secret_arg, int64_t payment_constraints_arg, int64_t payment_context_arg) { LDKThirtyTwoBytes payment_secret_arg_ref; CHECK(payment_secret_arg->arr_len == 32); memcpy(payment_secret_arg_ref.data, payment_secret_arg->elems, 32); FREE(payment_secret_arg); @@ -71665,7 +78039,11 @@ int64_t CS_LDK_ReceiveTlvs_new(int8_tArray payment_secret_arg, int64_t payment_ payment_constraints_arg_conv.is_owned = ptr_is_owned(payment_constraints_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_constraints_arg_conv); payment_constraints_arg_conv = PaymentConstraints_clone(&payment_constraints_arg_conv); - LDKReceiveTlvs ret_var = ReceiveTlvs_new(payment_secret_arg_ref, payment_constraints_arg_conv); + void* payment_context_arg_ptr = untag_ptr(payment_context_arg); + CHECK_ACCESS(payment_context_arg_ptr); + LDKPaymentContext payment_context_arg_conv = *(LDKPaymentContext*)(payment_context_arg_ptr); + payment_context_arg_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(payment_context_arg)); + LDKReceiveTlvs ret_var = ReceiveTlvs_new(payment_secret_arg_ref, payment_constraints_arg_conv, payment_context_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -71889,6 +78267,317 @@ int64_t CS_LDK_PaymentConstraints_clone(int64_t orig) { return ret_ref; } +void CS_LDK_PaymentContext_free(int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKPaymentContext this_ptr_conv = *(LDKPaymentContext*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + PaymentContext_free(this_ptr_conv); +} + +static inline uint64_t PaymentContext_clone_ptr(LDKPaymentContext *NONNULL_PTR arg) { + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = PaymentContext_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t CS_LDK_PaymentContext_clone_ptr(int64_t arg) { + LDKPaymentContext* arg_conv = (LDKPaymentContext*)untag_ptr(arg); + int64_t ret_conv = PaymentContext_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_PaymentContext_clone(int64_t orig) { + LDKPaymentContext* orig_conv = (LDKPaymentContext*)untag_ptr(orig); + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = PaymentContext_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_PaymentContext_unknown(int64_t a) { + LDKUnknownPaymentContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = UnknownPaymentContext_clone(&a_conv); + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = PaymentContext_unknown(a_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_PaymentContext_bolt12_offer(int64_t a) { + LDKBolt12OfferContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = Bolt12OfferContext_clone(&a_conv); + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = PaymentContext_bolt12_offer(a_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_PaymentContext_bolt12_refund(int64_t a) { + LDKBolt12RefundContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = Bolt12RefundContext_clone(&a_conv); + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = PaymentContext_bolt12_refund(a_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +jboolean CS_LDK_PaymentContext_eq(int64_t a, int64_t b) { + LDKPaymentContext* a_conv = (LDKPaymentContext*)untag_ptr(a); + LDKPaymentContext* b_conv = (LDKPaymentContext*)untag_ptr(b); + jboolean ret_conv = PaymentContext_eq(a_conv, b_conv); + return ret_conv; +} + +void CS_LDK_UnknownPaymentContext_free(int64_t this_obj) { + LDKUnknownPaymentContext this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + UnknownPaymentContext_free(this_obj_conv); +} + +static inline uint64_t UnknownPaymentContext_clone_ptr(LDKUnknownPaymentContext *NONNULL_PTR arg) { + LDKUnknownPaymentContext ret_var = UnknownPaymentContext_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t CS_LDK_UnknownPaymentContext_clone_ptr(int64_t arg) { + LDKUnknownPaymentContext arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = UnknownPaymentContext_clone_ptr(&arg_conv); + return ret_conv; +} + +int64_t CS_LDK_UnknownPaymentContext_clone(int64_t orig) { + LDKUnknownPaymentContext orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKUnknownPaymentContext ret_var = UnknownPaymentContext_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +jboolean CS_LDK_UnknownPaymentContext_eq(int64_t a, int64_t b) { + LDKUnknownPaymentContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKUnknownPaymentContext b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = UnknownPaymentContext_eq(&a_conv, &b_conv); + return ret_conv; +} + +void CS_LDK_Bolt12OfferContext_free(int64_t this_obj) { + LDKBolt12OfferContext this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + Bolt12OfferContext_free(this_obj_conv); +} + +int64_t CS_LDK_Bolt12OfferContext_get_offer_id(int64_t this_ptr) { + LDKBolt12OfferContext this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKOfferId ret_var = Bolt12OfferContext_get_offer_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void CS_LDK_Bolt12OfferContext_set_offer_id(int64_t this_ptr, int64_t val) { + LDKBolt12OfferContext this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKOfferId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = OfferId_clone(&val_conv); + Bolt12OfferContext_set_offer_id(&this_ptr_conv, val_conv); +} + +int64_t CS_LDK_Bolt12OfferContext_get_invoice_request(int64_t this_ptr) { + LDKBolt12OfferContext this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKInvoiceRequestFields ret_var = Bolt12OfferContext_get_invoice_request(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void CS_LDK_Bolt12OfferContext_set_invoice_request(int64_t this_ptr, int64_t val) { + LDKBolt12OfferContext this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKInvoiceRequestFields val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = InvoiceRequestFields_clone(&val_conv); + Bolt12OfferContext_set_invoice_request(&this_ptr_conv, val_conv); +} + +int64_t CS_LDK_Bolt12OfferContext_new(int64_t offer_id_arg, int64_t invoice_request_arg) { + LDKOfferId offer_id_arg_conv; + offer_id_arg_conv.inner = untag_ptr(offer_id_arg); + offer_id_arg_conv.is_owned = ptr_is_owned(offer_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(offer_id_arg_conv); + offer_id_arg_conv = OfferId_clone(&offer_id_arg_conv); + LDKInvoiceRequestFields invoice_request_arg_conv; + invoice_request_arg_conv.inner = untag_ptr(invoice_request_arg); + invoice_request_arg_conv.is_owned = ptr_is_owned(invoice_request_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_request_arg_conv); + invoice_request_arg_conv = InvoiceRequestFields_clone(&invoice_request_arg_conv); + LDKBolt12OfferContext ret_var = Bolt12OfferContext_new(offer_id_arg_conv, invoice_request_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t Bolt12OfferContext_clone_ptr(LDKBolt12OfferContext *NONNULL_PTR arg) { + LDKBolt12OfferContext ret_var = Bolt12OfferContext_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t CS_LDK_Bolt12OfferContext_clone_ptr(int64_t arg) { + LDKBolt12OfferContext arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = Bolt12OfferContext_clone_ptr(&arg_conv); + return ret_conv; +} + +int64_t CS_LDK_Bolt12OfferContext_clone(int64_t orig) { + LDKBolt12OfferContext orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKBolt12OfferContext ret_var = Bolt12OfferContext_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +jboolean CS_LDK_Bolt12OfferContext_eq(int64_t a, int64_t b) { + LDKBolt12OfferContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKBolt12OfferContext b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = Bolt12OfferContext_eq(&a_conv, &b_conv); + return ret_conv; +} + +void CS_LDK_Bolt12RefundContext_free(int64_t this_obj) { + LDKBolt12RefundContext this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + Bolt12RefundContext_free(this_obj_conv); +} + +int64_t CS_LDK_Bolt12RefundContext_new() { + LDKBolt12RefundContext ret_var = Bolt12RefundContext_new(); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t Bolt12RefundContext_clone_ptr(LDKBolt12RefundContext *NONNULL_PTR arg) { + LDKBolt12RefundContext ret_var = Bolt12RefundContext_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t CS_LDK_Bolt12RefundContext_clone_ptr(int64_t arg) { + LDKBolt12RefundContext arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = Bolt12RefundContext_clone_ptr(&arg_conv); + return ret_conv; +} + +int64_t CS_LDK_Bolt12RefundContext_clone(int64_t orig) { + LDKBolt12RefundContext orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKBolt12RefundContext ret_var = Bolt12RefundContext_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +jboolean CS_LDK_Bolt12RefundContext_eq(int64_t a, int64_t b) { + LDKBolt12RefundContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKBolt12RefundContext b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = Bolt12RefundContext_eq(&a_conv, &b_conv); + return ret_conv; +} + int8_tArray CS_LDK_ForwardTlvs_write(int64_t obj) { LDKForwardTlvs obj_conv; obj_conv.inner = untag_ptr(obj); @@ -71961,6 +78650,94 @@ int64_t CS_LDK_PaymentConstraints_read(int8_tArray ser) { return tag_ptr(ret_conv, true); } +int8_tArray CS_LDK_PaymentContext_write(int64_t obj) { + LDKPaymentContext* obj_conv = (LDKPaymentContext*)untag_ptr(obj); + LDKCVec_u8Z ret_var = PaymentContext_write(obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +int64_t CS_LDK_PaymentContext_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ"); + *ret_conv = PaymentContext_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + +int8_tArray CS_LDK_UnknownPaymentContext_write(int64_t obj) { + LDKUnknownPaymentContext obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = UnknownPaymentContext_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +int64_t CS_LDK_UnknownPaymentContext_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ"); + *ret_conv = UnknownPaymentContext_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + +int8_tArray CS_LDK_Bolt12OfferContext_write(int64_t obj) { + LDKBolt12OfferContext obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = Bolt12OfferContext_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +int64_t CS_LDK_Bolt12OfferContext_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ"); + *ret_conv = Bolt12OfferContext_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + +int8_tArray CS_LDK_Bolt12RefundContext_write(int64_t obj) { + LDKBolt12RefundContext obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = Bolt12RefundContext_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +int64_t CS_LDK_Bolt12RefundContext_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ"); + *ret_conv = Bolt12RefundContext_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + void CS_LDK_PaymentPurpose_free(int64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -71990,7 +78767,21 @@ int64_t CS_LDK_PaymentPurpose_clone(int64_t orig) { return ret_ref; } -int64_t CS_LDK_PaymentPurpose_invoice_payment(int64_t payment_preimage, int8_tArray payment_secret) { +int64_t CS_LDK_PaymentPurpose_bolt11_invoice_payment(int64_t payment_preimage, int8_tArray payment_secret) { + void* payment_preimage_ptr = untag_ptr(payment_preimage); + CHECK_ACCESS(payment_preimage_ptr); + LDKCOption_ThirtyTwoBytesZ payment_preimage_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_preimage_ptr); + payment_preimage_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(payment_preimage)); + LDKThirtyTwoBytes payment_secret_ref; + CHECK(payment_secret->arr_len == 32); + memcpy(payment_secret_ref.data, payment_secret->elems, 32); FREE(payment_secret); + LDKPaymentPurpose *ret_copy = MALLOC(sizeof(LDKPaymentPurpose), "LDKPaymentPurpose"); + *ret_copy = PaymentPurpose_bolt11_invoice_payment(payment_preimage_conv, payment_secret_ref); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_PaymentPurpose_bolt12_offer_payment(int64_t payment_preimage, int8_tArray payment_secret, int64_t payment_context) { void* payment_preimage_ptr = untag_ptr(payment_preimage); CHECK_ACCESS(payment_preimage_ptr); LDKCOption_ThirtyTwoBytesZ payment_preimage_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_preimage_ptr); @@ -71998,8 +78789,32 @@ int64_t CS_LDK_PaymentPurpose_invoice_payment(int64_t payment_preimage, int8_tA LDKThirtyTwoBytes payment_secret_ref; CHECK(payment_secret->arr_len == 32); memcpy(payment_secret_ref.data, payment_secret->elems, 32); FREE(payment_secret); + LDKBolt12OfferContext payment_context_conv; + payment_context_conv.inner = untag_ptr(payment_context); + payment_context_conv.is_owned = ptr_is_owned(payment_context); + CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_conv); + payment_context_conv = Bolt12OfferContext_clone(&payment_context_conv); LDKPaymentPurpose *ret_copy = MALLOC(sizeof(LDKPaymentPurpose), "LDKPaymentPurpose"); - *ret_copy = PaymentPurpose_invoice_payment(payment_preimage_conv, payment_secret_ref); + *ret_copy = PaymentPurpose_bolt12_offer_payment(payment_preimage_conv, payment_secret_ref, payment_context_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_PaymentPurpose_bolt12_refund_payment(int64_t payment_preimage, int8_tArray payment_secret, int64_t payment_context) { + void* payment_preimage_ptr = untag_ptr(payment_preimage); + CHECK_ACCESS(payment_preimage_ptr); + LDKCOption_ThirtyTwoBytesZ payment_preimage_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_preimage_ptr); + payment_preimage_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(payment_preimage)); + LDKThirtyTwoBytes payment_secret_ref; + CHECK(payment_secret->arr_len == 32); + memcpy(payment_secret_ref.data, payment_secret->elems, 32); FREE(payment_secret); + LDKBolt12RefundContext payment_context_conv; + payment_context_conv.inner = untag_ptr(payment_context); + payment_context_conv.is_owned = ptr_is_owned(payment_context); + CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_conv); + payment_context_conv = Bolt12RefundContext_clone(&payment_context_conv); + LDKPaymentPurpose *ret_copy = MALLOC(sizeof(LDKPaymentPurpose), "LDKPaymentPurpose"); + *ret_copy = PaymentPurpose_bolt12_refund_payment(payment_preimage_conv, payment_secret_ref, payment_context_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -72056,27 +78871,31 @@ void CS_LDK_ClaimedHTLC_free(int64_t this_obj) { ClaimedHTLC_free(this_obj_conv); } -int8_tArray CS_LDK_ClaimedHTLC_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_ClaimedHTLC_get_channel_id(int64_t this_ptr) { LDKClaimedHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *ClaimedHTLC_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = ClaimedHTLC_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_ClaimedHTLC_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_ClaimedHTLC_set_channel_id(int64_t this_ptr, int64_t val) { LDKClaimedHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - ClaimedHTLC_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ClaimedHTLC_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray CS_LDK_ClaimedHTLC_get_user_channel_id(int64_t this_ptr) { @@ -72159,14 +78978,16 @@ void CS_LDK_ClaimedHTLC_set_counterparty_skimmed_fee_msat(int64_t this_ptr, int ClaimedHTLC_set_counterparty_skimmed_fee_msat(&this_ptr_conv, val); } -int64_t CS_LDK_ClaimedHTLC_new(int8_tArray channel_id_arg, int8_tArray user_channel_id_arg, int32_t cltv_expiry_arg, int64_t value_msat_arg, int64_t counterparty_skimmed_fee_msat_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_ClaimedHTLC_new(int64_t channel_id_arg, int8_tArray user_channel_id_arg, int32_t cltv_expiry_arg, int64_t value_msat_arg, int64_t counterparty_skimmed_fee_msat_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKU128 user_channel_id_arg_ref; CHECK(user_channel_id_arg->arr_len == 16); memcpy(user_channel_id_arg_ref.le_bytes, user_channel_id_arg->elems, 16); FREE(user_channel_id_arg); - LDKClaimedHTLC ret_var = ClaimedHTLC_new(channel_id_arg_ref, user_channel_id_arg_ref, cltv_expiry_arg, value_msat_arg, counterparty_skimmed_fee_msat_arg); + LDKClaimedHTLC ret_var = ClaimedHTLC_new(channel_id_arg_conv, user_channel_id_arg_ref, cltv_expiry_arg, value_msat_arg, counterparty_skimmed_fee_msat_arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -72366,9 +79187,23 @@ int64_t CS_LDK_ClosureReason_holder_force_closed() { return ret_ref; } -int64_t CS_LDK_ClosureReason_cooperative_closure() { +int64_t CS_LDK_ClosureReason_legacy_cooperative_closure() { + LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason"); + *ret_copy = ClosureReason_legacy_cooperative_closure(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_ClosureReason_counterparty_initiated_cooperative_closure() { LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason"); - *ret_copy = ClosureReason_cooperative_closure(); + *ret_copy = ClosureReason_counterparty_initiated_cooperative_closure(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_ClosureReason_locally_initiated_cooperative_closure() { + LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason"); + *ret_copy = ClosureReason_locally_initiated_cooperative_closure(); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -72423,6 +79258,13 @@ int64_t CS_LDK_ClosureReason_funding_batch_closure() { return ret_ref; } +int64_t CS_LDK_ClosureReason_htlcs_timed_out() { + LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason"); + *ret_copy = ClosureReason_htlcs_timed_out(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + jboolean CS_LDK_ClosureReason_eq(int64_t a, int64_t b) { LDKClosureReason* a_conv = (LDKClosureReason*)untag_ptr(a); LDKClosureReason* b_conv = (LDKClosureReason*)untag_ptr(b); @@ -72478,15 +79320,17 @@ int64_t CS_LDK_HTLCDestination_clone(int64_t orig) { return ret_ref; } -int64_t CS_LDK_HTLCDestination_next_hop_channel(int8_tArray node_id, int8_tArray channel_id) { +int64_t CS_LDK_HTLCDestination_next_hop_channel(int8_tArray node_id, int64_t channel_id) { LDKPublicKey node_id_ref; CHECK(node_id->arr_len == 33); memcpy(node_id_ref.compressed_form, node_id->elems, 33); FREE(node_id); - LDKThirtyTwoBytes channel_id_ref; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_ref.data, channel_id->elems, 32); FREE(channel_id); + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKHTLCDestination *ret_copy = MALLOC(sizeof(LDKHTLCDestination), "LDKHTLCDestination"); - *ret_copy = HTLCDestination_next_hop_channel(node_id_ref, channel_id_ref); + *ret_copy = HTLCDestination_next_hop_channel(node_id_ref, channel_id_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -72505,6 +79349,13 @@ int64_t CS_LDK_HTLCDestination_invalid_forward(int64_t requested_forward_scid) return ret_ref; } +int64_t CS_LDK_HTLCDestination_invalid_onion() { + LDKHTLCDestination *ret_copy = MALLOC(sizeof(LDKHTLCDestination), "LDKHTLCDestination"); + *ret_copy = HTLCDestination_invalid_onion(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + int64_t CS_LDK_HTLCDestination_failed_payment(int8_tArray payment_hash) { LDKThirtyTwoBytes payment_hash_ref; CHECK(payment_hash->arr_len == 32); @@ -72632,10 +79483,12 @@ int64_t CS_LDK_Event_clone(int64_t orig) { return ret_ref; } -int64_t CS_LDK_Event_funding_generation_ready(int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int64_t channel_value_satoshis, int8_tArray output_script, int8_tArray user_channel_id) { - LDKThirtyTwoBytes temporary_channel_id_ref; - CHECK(temporary_channel_id->arr_len == 32); - memcpy(temporary_channel_id_ref.data, temporary_channel_id->elems, 32); FREE(temporary_channel_id); +int64_t CS_LDK_Event_funding_generation_ready(int64_t temporary_channel_id, int8_tArray counterparty_node_id, int64_t channel_value_satoshis, int8_tArray output_script, int8_tArray user_channel_id) { + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv = ChannelId_clone(&temporary_channel_id_conv); LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); @@ -72647,7 +79500,7 @@ int64_t CS_LDK_Event_funding_generation_ready(int8_tArray temporary_channel_id, CHECK(user_channel_id->arr_len == 16); memcpy(user_channel_id_ref.le_bytes, user_channel_id->elems, 16); FREE(user_channel_id); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_funding_generation_ready(temporary_channel_id_ref, counterparty_node_id_ref, channel_value_satoshis, output_script_ref, user_channel_id_ref); + *ret_copy = Event_funding_generation_ready(temporary_channel_id_conv, counterparty_node_id_ref, channel_value_satoshis, output_script_ref, user_channel_id_ref); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -72668,10 +79521,11 @@ int64_t CS_LDK_Event_payment_claimable(int8_tArray receiver_node_id, int8_tArra CHECK_ACCESS(purpose_ptr); LDKPaymentPurpose purpose_conv = *(LDKPaymentPurpose*)(purpose_ptr); purpose_conv = PaymentPurpose_clone((LDKPaymentPurpose*)untag_ptr(purpose)); - void* via_channel_id_ptr = untag_ptr(via_channel_id); - CHECK_ACCESS(via_channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ via_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(via_channel_id_ptr); - via_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(via_channel_id)); + LDKChannelId via_channel_id_conv; + via_channel_id_conv.inner = untag_ptr(via_channel_id); + via_channel_id_conv.is_owned = ptr_is_owned(via_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(via_channel_id_conv); + via_channel_id_conv = ChannelId_clone(&via_channel_id_conv); void* via_user_channel_id_ptr = untag_ptr(via_user_channel_id); CHECK_ACCESS(via_user_channel_id_ptr); LDKCOption_U128Z via_user_channel_id_conv = *(LDKCOption_U128Z*)(via_user_channel_id_ptr); @@ -72920,50 +79774,68 @@ int64_t CS_LDK_Event_spendable_outputs(int64_tArray outputs, int64_t channel_id outputs_constr.data[b] = outputs_conv_27_conv; } FREE(outputs); - void* channel_id_ptr = untag_ptr(channel_id); - CHECK_ACCESS(channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(channel_id_ptr); - channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(channel_id)); + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); *ret_copy = Event_spendable_outputs(outputs_constr, channel_id_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -int64_t CS_LDK_Event_payment_forwarded(int64_t prev_channel_id, int64_t next_channel_id, int64_t fee_earned_msat, jboolean claim_from_onchain_tx, int64_t outbound_amount_forwarded_msat) { - void* prev_channel_id_ptr = untag_ptr(prev_channel_id); - CHECK_ACCESS(prev_channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ prev_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(prev_channel_id_ptr); - prev_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(prev_channel_id)); - void* next_channel_id_ptr = untag_ptr(next_channel_id); - CHECK_ACCESS(next_channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ next_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(next_channel_id_ptr); - next_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(next_channel_id)); - void* fee_earned_msat_ptr = untag_ptr(fee_earned_msat); - CHECK_ACCESS(fee_earned_msat_ptr); - LDKCOption_u64Z fee_earned_msat_conv = *(LDKCOption_u64Z*)(fee_earned_msat_ptr); - fee_earned_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(fee_earned_msat)); +int64_t CS_LDK_Event_payment_forwarded(int64_t prev_channel_id, int64_t next_channel_id, int64_t prev_user_channel_id, int64_t next_user_channel_id, int64_t total_fee_earned_msat, int64_t skimmed_fee_msat, jboolean claim_from_onchain_tx, int64_t outbound_amount_forwarded_msat) { + LDKChannelId prev_channel_id_conv; + prev_channel_id_conv.inner = untag_ptr(prev_channel_id); + prev_channel_id_conv.is_owned = ptr_is_owned(prev_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_conv); + prev_channel_id_conv = ChannelId_clone(&prev_channel_id_conv); + LDKChannelId next_channel_id_conv; + next_channel_id_conv.inner = untag_ptr(next_channel_id); + next_channel_id_conv.is_owned = ptr_is_owned(next_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(next_channel_id_conv); + next_channel_id_conv = ChannelId_clone(&next_channel_id_conv); + void* prev_user_channel_id_ptr = untag_ptr(prev_user_channel_id); + CHECK_ACCESS(prev_user_channel_id_ptr); + LDKCOption_U128Z prev_user_channel_id_conv = *(LDKCOption_U128Z*)(prev_user_channel_id_ptr); + prev_user_channel_id_conv = COption_U128Z_clone((LDKCOption_U128Z*)untag_ptr(prev_user_channel_id)); + void* next_user_channel_id_ptr = untag_ptr(next_user_channel_id); + CHECK_ACCESS(next_user_channel_id_ptr); + LDKCOption_U128Z next_user_channel_id_conv = *(LDKCOption_U128Z*)(next_user_channel_id_ptr); + next_user_channel_id_conv = COption_U128Z_clone((LDKCOption_U128Z*)untag_ptr(next_user_channel_id)); + void* total_fee_earned_msat_ptr = untag_ptr(total_fee_earned_msat); + CHECK_ACCESS(total_fee_earned_msat_ptr); + LDKCOption_u64Z total_fee_earned_msat_conv = *(LDKCOption_u64Z*)(total_fee_earned_msat_ptr); + total_fee_earned_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(total_fee_earned_msat)); + void* skimmed_fee_msat_ptr = untag_ptr(skimmed_fee_msat); + CHECK_ACCESS(skimmed_fee_msat_ptr); + LDKCOption_u64Z skimmed_fee_msat_conv = *(LDKCOption_u64Z*)(skimmed_fee_msat_ptr); + skimmed_fee_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(skimmed_fee_msat)); void* outbound_amount_forwarded_msat_ptr = untag_ptr(outbound_amount_forwarded_msat); CHECK_ACCESS(outbound_amount_forwarded_msat_ptr); LDKCOption_u64Z outbound_amount_forwarded_msat_conv = *(LDKCOption_u64Z*)(outbound_amount_forwarded_msat_ptr); outbound_amount_forwarded_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(outbound_amount_forwarded_msat)); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_payment_forwarded(prev_channel_id_conv, next_channel_id_conv, fee_earned_msat_conv, claim_from_onchain_tx, outbound_amount_forwarded_msat_conv); + *ret_copy = Event_payment_forwarded(prev_channel_id_conv, next_channel_id_conv, prev_user_channel_id_conv, next_user_channel_id_conv, total_fee_earned_msat_conv, skimmed_fee_msat_conv, claim_from_onchain_tx, outbound_amount_forwarded_msat_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -int64_t CS_LDK_Event_channel_pending(int8_tArray channel_id, int8_tArray user_channel_id, int64_t former_temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_txo) { - LDKThirtyTwoBytes channel_id_ref; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_ref.data, channel_id->elems, 32); FREE(channel_id); +int64_t CS_LDK_Event_channel_pending(int64_t channel_id, int8_tArray user_channel_id, int64_t former_temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_txo, int64_t channel_type) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKU128 user_channel_id_ref; CHECK(user_channel_id->arr_len == 16); memcpy(user_channel_id_ref.le_bytes, user_channel_id->elems, 16); FREE(user_channel_id); - void* former_temporary_channel_id_ptr = untag_ptr(former_temporary_channel_id); - CHECK_ACCESS(former_temporary_channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ former_temporary_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(former_temporary_channel_id_ptr); - former_temporary_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(former_temporary_channel_id)); + LDKChannelId former_temporary_channel_id_conv; + former_temporary_channel_id_conv.inner = untag_ptr(former_temporary_channel_id); + former_temporary_channel_id_conv.is_owned = ptr_is_owned(former_temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(former_temporary_channel_id_conv); + former_temporary_channel_id_conv = ChannelId_clone(&former_temporary_channel_id_conv); LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); @@ -72972,16 +79844,23 @@ int64_t CS_LDK_Event_channel_pending(int8_tArray channel_id, int8_tArray user_c funding_txo_conv.is_owned = ptr_is_owned(funding_txo); CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_conv); funding_txo_conv = OutPoint_clone(&funding_txo_conv); + LDKChannelTypeFeatures channel_type_conv; + channel_type_conv.inner = untag_ptr(channel_type); + channel_type_conv.is_owned = ptr_is_owned(channel_type); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_conv); + channel_type_conv = ChannelTypeFeatures_clone(&channel_type_conv); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_channel_pending(channel_id_ref, user_channel_id_ref, former_temporary_channel_id_conv, counterparty_node_id_ref, funding_txo_conv); + *ret_copy = Event_channel_pending(channel_id_conv, user_channel_id_ref, former_temporary_channel_id_conv, counterparty_node_id_ref, funding_txo_conv, channel_type_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -int64_t CS_LDK_Event_channel_ready(int8_tArray channel_id, int8_tArray user_channel_id, int8_tArray counterparty_node_id, int64_t channel_type) { - LDKThirtyTwoBytes channel_id_ref; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_ref.data, channel_id->elems, 32); FREE(channel_id); +int64_t CS_LDK_Event_channel_ready(int64_t channel_id, int8_tArray user_channel_id, int8_tArray counterparty_node_id, int64_t channel_type) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKU128 user_channel_id_ref; CHECK(user_channel_id->arr_len == 16); memcpy(user_channel_id_ref.le_bytes, user_channel_id->elems, 16); FREE(user_channel_id); @@ -72994,15 +79873,17 @@ int64_t CS_LDK_Event_channel_ready(int8_tArray channel_id, int8_tArray user_cha CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_conv); channel_type_conv = ChannelTypeFeatures_clone(&channel_type_conv); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_channel_ready(channel_id_ref, user_channel_id_ref, counterparty_node_id_ref, channel_type_conv); + *ret_copy = Event_channel_ready(channel_id_conv, user_channel_id_ref, counterparty_node_id_ref, channel_type_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -int64_t CS_LDK_Event_channel_closed(int8_tArray channel_id, int8_tArray user_channel_id, int64_t reason, int8_tArray counterparty_node_id, int64_t channel_capacity_sats, int64_t channel_funding_txo) { - LDKThirtyTwoBytes channel_id_ref; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_ref.data, channel_id->elems, 32); FREE(channel_id); +int64_t CS_LDK_Event_channel_closed(int64_t channel_id, int8_tArray user_channel_id, int64_t reason, int8_tArray counterparty_node_id, int64_t channel_capacity_sats, int64_t channel_funding_txo) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKU128 user_channel_id_ref; CHECK(user_channel_id->arr_len == 16); memcpy(user_channel_id_ref.le_bytes, user_channel_id->elems, 16); FREE(user_channel_id); @@ -73023,30 +79904,34 @@ int64_t CS_LDK_Event_channel_closed(int8_tArray channel_id, int8_tArray user_ch CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_txo_conv); channel_funding_txo_conv = OutPoint_clone(&channel_funding_txo_conv); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_channel_closed(channel_id_ref, user_channel_id_ref, reason_conv, counterparty_node_id_ref, channel_capacity_sats_conv, channel_funding_txo_conv); + *ret_copy = Event_channel_closed(channel_id_conv, user_channel_id_ref, reason_conv, counterparty_node_id_ref, channel_capacity_sats_conv, channel_funding_txo_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -int64_t CS_LDK_Event_discard_funding(int8_tArray channel_id, int8_tArray transaction) { - LDKThirtyTwoBytes channel_id_ref; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_ref.data, channel_id->elems, 32); FREE(channel_id); +int64_t CS_LDK_Event_discard_funding(int64_t channel_id, int8_tArray transaction) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKTransaction transaction_ref; transaction_ref.datalen = transaction->arr_len; transaction_ref.data = MALLOC(transaction_ref.datalen, "LDKTransaction Bytes"); memcpy(transaction_ref.data, transaction->elems, transaction_ref.datalen); FREE(transaction); transaction_ref.data_is_owned = true; LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_discard_funding(channel_id_ref, transaction_ref); + *ret_copy = Event_discard_funding(channel_id_conv, transaction_ref); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -int64_t CS_LDK_Event_open_channel_request(int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_satoshis, int64_t push_msat, int64_t channel_type) { - LDKThirtyTwoBytes temporary_channel_id_ref; - CHECK(temporary_channel_id->arr_len == 32); - memcpy(temporary_channel_id_ref.data, temporary_channel_id->elems, 32); FREE(temporary_channel_id); +int64_t CS_LDK_Event_open_channel_request(int64_t temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_satoshis, int64_t push_msat, int64_t channel_type) { + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv = ChannelId_clone(&temporary_channel_id_conv); LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); @@ -73056,21 +79941,23 @@ int64_t CS_LDK_Event_open_channel_request(int8_tArray temporary_channel_id, int CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_conv); channel_type_conv = ChannelTypeFeatures_clone(&channel_type_conv); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_open_channel_request(temporary_channel_id_ref, counterparty_node_id_ref, funding_satoshis, push_msat, channel_type_conv); + *ret_copy = Event_open_channel_request(temporary_channel_id_conv, counterparty_node_id_ref, funding_satoshis, push_msat, channel_type_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -int64_t CS_LDK_Event_htlchandling_failed(int8_tArray prev_channel_id, int64_t failed_next_destination) { - LDKThirtyTwoBytes prev_channel_id_ref; - CHECK(prev_channel_id->arr_len == 32); - memcpy(prev_channel_id_ref.data, prev_channel_id->elems, 32); FREE(prev_channel_id); +int64_t CS_LDK_Event_htlchandling_failed(int64_t prev_channel_id, int64_t failed_next_destination) { + LDKChannelId prev_channel_id_conv; + prev_channel_id_conv.inner = untag_ptr(prev_channel_id); + prev_channel_id_conv.is_owned = ptr_is_owned(prev_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_conv); + prev_channel_id_conv = ChannelId_clone(&prev_channel_id_conv); void* failed_next_destination_ptr = untag_ptr(failed_next_destination); CHECK_ACCESS(failed_next_destination_ptr); LDKHTLCDestination failed_next_destination_conv = *(LDKHTLCDestination*)(failed_next_destination_ptr); failed_next_destination_conv = HTLCDestination_clone((LDKHTLCDestination*)untag_ptr(failed_next_destination)); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_htlchandling_failed(prev_channel_id_ref, failed_next_destination_conv); + *ret_copy = Event_htlchandling_failed(prev_channel_id_conv, failed_next_destination_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -73927,7 +80814,15 @@ int64_t CS_LDK_BumpTransactionEvent_clone(int64_t orig) { return ret_ref; } -int64_t CS_LDK_BumpTransactionEvent_channel_close(int8_tArray claim_id, int32_t package_target_feerate_sat_per_1000_weight, int8_tArray commitment_tx, int64_t commitment_tx_fee_satoshis, int64_t anchor_descriptor, int64_tArray pending_htlcs) { +int64_t CS_LDK_BumpTransactionEvent_channel_close(int64_t channel_id, int8_tArray counterparty_node_id, int8_tArray claim_id, int32_t package_target_feerate_sat_per_1000_weight, int8_tArray commitment_tx, int64_t commitment_tx_fee_satoshis, int64_t anchor_descriptor, int64_tArray pending_htlcs) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); + LDKPublicKey counterparty_node_id_ref; + CHECK(counterparty_node_id->arr_len == 33); + memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); LDKThirtyTwoBytes claim_id_ref; CHECK(claim_id->arr_len == 32); memcpy(claim_id_ref.data, claim_id->elems, 32); FREE(claim_id); @@ -73959,12 +80854,20 @@ int64_t CS_LDK_BumpTransactionEvent_channel_close(int8_tArray claim_id, int32_t } FREE(pending_htlcs); LDKBumpTransactionEvent *ret_copy = MALLOC(sizeof(LDKBumpTransactionEvent), "LDKBumpTransactionEvent"); - *ret_copy = BumpTransactionEvent_channel_close(claim_id_ref, package_target_feerate_sat_per_1000_weight, commitment_tx_ref, commitment_tx_fee_satoshis, anchor_descriptor_conv, pending_htlcs_constr); + *ret_copy = BumpTransactionEvent_channel_close(channel_id_conv, counterparty_node_id_ref, claim_id_ref, package_target_feerate_sat_per_1000_weight, commitment_tx_ref, commitment_tx_fee_satoshis, anchor_descriptor_conv, pending_htlcs_constr); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -int64_t CS_LDK_BumpTransactionEvent_htlcresolution(int8_tArray claim_id, int32_t target_feerate_sat_per_1000_weight, int64_tArray htlc_descriptors, int32_t tx_lock_time) { +int64_t CS_LDK_BumpTransactionEvent_htlcresolution(int64_t channel_id, int8_tArray counterparty_node_id, int8_tArray claim_id, int32_t target_feerate_sat_per_1000_weight, int64_tArray htlc_descriptors, int32_t tx_lock_time) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); + LDKPublicKey counterparty_node_id_ref; + CHECK(counterparty_node_id->arr_len == 33); + memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); LDKThirtyTwoBytes claim_id_ref; CHECK(claim_id->arr_len == 32); memcpy(claim_id_ref.data, claim_id->elems, 32); FREE(claim_id); @@ -73986,7 +80889,7 @@ int64_t CS_LDK_BumpTransactionEvent_htlcresolution(int8_tArray claim_id, int32_ } FREE(htlc_descriptors); LDKBumpTransactionEvent *ret_copy = MALLOC(sizeof(LDKBumpTransactionEvent), "LDKBumpTransactionEvent"); - *ret_copy = BumpTransactionEvent_htlcresolution(claim_id_ref, target_feerate_sat_per_1000_weight, htlc_descriptors_constr, tx_lock_time); + *ret_copy = BumpTransactionEvent_htlcresolution(channel_id_conv, counterparty_node_id_ref, claim_id_ref, target_feerate_sat_per_1000_weight, htlc_descriptors_constr, tx_lock_time); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -76432,6 +83335,17 @@ int8_tArray CS_LDK_Bolt11Invoice_recover_payee_pub_key(int64_t this_arg) { return ret_arr; } +int8_tArray CS_LDK_Bolt11Invoice_get_payee_pub_key(int64_t this_arg) { + LDKBolt11Invoice this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(33, __LINE__); + memcpy(ret_arr->elems, Bolt11Invoice_get_payee_pub_key(&this_arg_conv).compressed_form, 33); + return ret_arr; +} + int64_t CS_LDK_Bolt11Invoice_expires_at(int64_t this_arg) { LDKBolt11Invoice this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); diff --git a/c_sharp/bindings.c.body b/c_sharp/bindings.c.body index 6eea9029..172f27f3 100644 --- a/c_sharp/bindings.c.body +++ b/c_sharp/bindings.c.body @@ -221,6 +221,13 @@ int CS_LDK_register_l_lllb_invoker(invoker_l_lllb invoker) { return 0; } +typedef int64_t (*invoker_l_lllil)(int obj_ptr, int fn_id, int64_t a, int64_t b, int64_t c, int32_t d, int64_t e); +static invoker_l_lllil js_invoke_function_l_lllil; +int CS_LDK_register_l_lllil_invoker(invoker_l_lllil invoker) { + js_invoke_function_l_lllil = invoker; + return 0; +} + typedef int32_t (*invoker_ChannelMonitorUpdateStatus_lll)(int obj_ptr, int fn_id, int64_t a, int64_t b, int64_t c); static invoker_ChannelMonitorUpdateStatus_lll js_invoke_function_ChannelMonitorUpdateStatus_lll; int CS_LDK_register_ChannelMonitorUpdateStatus_lll_invoker(invoker_ChannelMonitorUpdateStatus_lll invoker) { @@ -235,13 +242,6 @@ int CS_LDK_register_ChannelMonitorUpdateStatus_llll_invoker(invoker_ChannelMonit return 0; } -typedef void (*invoker_void_)(int obj_ptr, int fn_id); -static invoker_void_ js_invoke_function_void_; -int CS_LDK_register_void__invoker(invoker_void_ invoker) { - js_invoke_function_void_ = invoker; - return 0; -} - typedef void (*invoker_void_lli)(int obj_ptr, int fn_id, int64_t a, int64_t b, int32_t c); static invoker_void_lli js_invoke_function_void_lli; int CS_LDK_register_void_lli_invoker(invoker_void_lli invoker) { @@ -256,6 +256,13 @@ int CS_LDK_register_void_li_invoker(invoker_void_li invoker) { return 0; } +typedef void (*invoker_void_)(int obj_ptr, int fn_id); +static invoker_void_ js_invoke_function_void_; +int CS_LDK_register_void__invoker(invoker_void_ invoker) { + js_invoke_function_void_ = invoker; + return 0; +} + typedef int64_t (*invoker_l_llb)(int obj_ptr, int fn_id, int64_t a, int64_t b, jboolean c); static invoker_l_llb js_invoke_function_l_llb; int CS_LDK_register_l_llb_invoker(invoker_l_llb invoker) { @@ -423,10 +430,11 @@ static inline LDKBolt12SemanticError LDKBolt12SemanticError_from_cs(int32_t ord) case 20: return LDKBolt12SemanticError_MissingPayerId; case 21: return LDKBolt12SemanticError_DuplicatePaymentId; case 22: return LDKBolt12SemanticError_MissingPaths; - case 23: return LDKBolt12SemanticError_InvalidPayInfo; - case 24: return LDKBolt12SemanticError_MissingCreationTime; - case 25: return LDKBolt12SemanticError_MissingPaymentHash; - case 26: return LDKBolt12SemanticError_MissingSignature; + case 23: return LDKBolt12SemanticError_UnexpectedPaths; + case 24: return LDKBolt12SemanticError_InvalidPayInfo; + case 25: return LDKBolt12SemanticError_MissingCreationTime; + case 26: return LDKBolt12SemanticError_MissingPaymentHash; + case 27: return LDKBolt12SemanticError_MissingSignature; default: abort(); } } @@ -455,10 +463,11 @@ static inline int32_t LDKBolt12SemanticError_to_cs(LDKBolt12SemanticError val) { case LDKBolt12SemanticError_MissingPayerId: return 20; case LDKBolt12SemanticError_DuplicatePaymentId: return 21; case LDKBolt12SemanticError_MissingPaths: return 22; - case LDKBolt12SemanticError_InvalidPayInfo: return 23; - case LDKBolt12SemanticError_MissingCreationTime: return 24; - case LDKBolt12SemanticError_MissingPaymentHash: return 25; - case LDKBolt12SemanticError_MissingSignature: return 26; + case LDKBolt12SemanticError_UnexpectedPaths: return 23; + case LDKBolt12SemanticError_InvalidPayInfo: return 24; + case LDKBolt12SemanticError_MissingCreationTime: return 25; + case LDKBolt12SemanticError_MissingPaymentHash: return 26; + case LDKBolt12SemanticError_MissingSignature: return 27; default: abort(); } } @@ -520,6 +529,7 @@ static inline LDKConfirmationTarget LDKConfirmationTarget_from_cs(int32_t ord) { case 3: return LDKConfirmationTarget_AnchorChannelFee; case 4: return LDKConfirmationTarget_NonAnchorChannelFee; case 5: return LDKConfirmationTarget_ChannelCloseMinimum; + case 6: return LDKConfirmationTarget_OutputSpendingFee; default: abort(); } } @@ -531,6 +541,7 @@ static inline int32_t LDKConfirmationTarget_to_cs(LDKConfirmationTarget val) { case LDKConfirmationTarget_AnchorChannelFee: return 3; case LDKConfirmationTarget_NonAnchorChannelFee: return 4; case LDKConfirmationTarget_ChannelCloseMinimum: return 5; + case LDKConfirmationTarget_OutputSpendingFee: return 6; default: abort(); } } @@ -576,6 +587,20 @@ static inline int32_t LDKCurrency_to_cs(LDKCurrency val) { default: abort(); } } +static inline LDKDirection LDKDirection_from_cs(int32_t ord) { + switch (ord) { + case 0: return LDKDirection_NodeOne; + case 1: return LDKDirection_NodeTwo; + default: abort(); + } +} +static inline int32_t LDKDirection_to_cs(LDKDirection val) { + switch (val) { + case LDKDirection_NodeOne: return 0; + case LDKDirection_NodeTwo: return 1; + default: abort(); + } +} static inline LDKHTLCClaim LDKHTLCClaim_from_cs(int32_t ord) { switch (ord) { case 0: return LDKHTLCClaim_OfferedTimeout; @@ -766,6 +791,22 @@ static inline int32_t LDKSecp256k1Error_to_cs(LDKSecp256k1Error val) { default: abort(); } } +static inline LDKShortChannelIdError LDKShortChannelIdError_from_cs(int32_t ord) { + switch (ord) { + case 0: return LDKShortChannelIdError_BlockOverflow; + case 1: return LDKShortChannelIdError_TxIndexOverflow; + case 2: return LDKShortChannelIdError_VoutIndexOverflow; + default: abort(); + } +} +static inline int32_t LDKShortChannelIdError_to_cs(LDKShortChannelIdError val) { + switch (val) { + case LDKShortChannelIdError_BlockOverflow: return 0; + case LDKShortChannelIdError_TxIndexOverflow: return 1; + case LDKShortChannelIdError_VoutIndexOverflow: return 2; + default: abort(); + } +} static inline LDKSiPrefix LDKSiPrefix_from_cs(int32_t ord) { switch (ord) { case 0: return LDKSiPrefix_Milli; @@ -867,6 +908,54 @@ int8_t CS_LDK_LDKBech32Error_InvalidData_get_invalid_data(int64_t ptr) { int8_t invalid_data_conv = obj->invalid_data; return invalid_data_conv; } +static inline struct LDKRefundMaybeWithDerivedMetadataBuilder CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKRefundMaybeWithDerivedMetadataBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(int64_t owner) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKRefundMaybeWithDerivedMetadataBuilder ret_var = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +int32_t CS_LDK_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(int64_t owner) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + int32_t ret_conv = LDKBolt12SemanticError_to_cs(CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKRefund CResult_RefundBolt12SemanticErrorZ_get_ok(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKRefund ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_RefundBolt12SemanticErrorZ_get_ok(int64_t owner) { + LDKCResult_RefundBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(owner); + LDKRefund ret_var = CResult_RefundBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_RefundBolt12SemanticErrorZ_get_err(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +int32_t CS_LDK_CResult_RefundBolt12SemanticErrorZ_get_err(int64_t owner) { + LDKCResult_RefundBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(owner); + int32_t ret_conv = LDKBolt12SemanticError_to_cs(CResult_RefundBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + uint32_t CS_LDK_LDKCOption_u64Z_ty_from_ptr(int64_t ptr) { LDKCOption_u64Z *obj = (LDKCOption_u64Z*)untag_ptr(ptr); switch(obj->tag) { @@ -946,6 +1035,7 @@ uint32_t CS_LDK_LDKDecodeError_ty_from_ptr(int64_t ptr) { case LDKDecodeError_BadLengthDescriptor: return 4; case LDKDecodeError_Io: return 5; case LDKDecodeError_UnsupportedCompression: return 6; + case LDKDecodeError_DangerousValue: return 7; default: abort(); } } @@ -1177,6 +1267,74 @@ void CS_LDK_CResult_RecipientOnionFieldsNoneZ_get_err(int64_t owner) { CResult_RecipientOnionFieldsNoneZ_get_err(owner_conv); } +static inline struct LDKUnsignedBolt12Invoice CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKUnsignedBolt12Invoice ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(int64_t owner) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner); + LDKUnsignedBolt12Invoice ret_var = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +int32_t CS_LDK_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(int64_t owner) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner); + int32_t ret_conv = LDKBolt12SemanticError_to_cs(CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKBolt12Invoice CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKBolt12Invoice ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(int64_t owner) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner); + LDKBolt12Invoice ret_var = CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +int32_t CS_LDK_CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(int64_t owner) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner); + int32_t ret_conv = LDKBolt12SemanticError_to_cs(CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKSchnorrSignature CResult_SchnorrSignatureNoneZ_get_ok(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return *owner->contents.result; +} +int8_tArray CS_LDK_CResult_SchnorrSignatureNoneZ_get_ok(int64_t owner) { + LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner); + int8_tArray ret_arr = init_int8_tArray(64, __LINE__); + memcpy(ret_arr->elems, CResult_SchnorrSignatureNoneZ_get_ok(owner_conv).compact_form, 64); + return ret_arr; +} + +static inline void CResult_SchnorrSignatureNoneZ_get_err(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return *owner->contents.err; +} +void CS_LDK_CResult_SchnorrSignatureNoneZ_get_err(int64_t owner) { + LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner); + CResult_SchnorrSignatureNoneZ_get_err(owner_conv); +} + static inline LDKCVec_ThirtyTwoBytesZ CVec_ThirtyTwoBytesZ_clone(const LDKCVec_ThirtyTwoBytesZ *orig) { LDKCVec_ThirtyTwoBytesZ ret = { .data = MALLOC(sizeof(LDKThirtyTwoBytes) * orig->datalen, "LDKCVec_ThirtyTwoBytesZ clone bytes"), .datalen = orig->datalen }; for (size_t i = 0; i < ret.datalen; i++) { @@ -1207,6 +1365,76 @@ ptrArray CS_LDK_LDKCOption_CVec_ThirtyTwoBytesZZ_Some_get_some(int64_t ptr) { return some_arr; } +uint32_t CS_LDK_LDKAmount_ty_from_ptr(int64_t ptr) { + LDKAmount *obj = (LDKAmount*)untag_ptr(ptr); + switch(obj->tag) { + case LDKAmount_Bitcoin: return 0; + case LDKAmount_Currency: return 1; + default: abort(); + } +} +int64_t CS_LDK_LDKAmount_Bitcoin_get_amount_msats(int64_t ptr) { + LDKAmount *obj = (LDKAmount*)untag_ptr(ptr); + CHECK(obj->tag == LDKAmount_Bitcoin); + int64_t amount_msats_conv = obj->bitcoin.amount_msats; + return amount_msats_conv; +} +int8_tArray CS_LDK_LDKAmount_Currency_get_iso4217_code(int64_t ptr) { + LDKAmount *obj = (LDKAmount*)untag_ptr(ptr); + CHECK(obj->tag == LDKAmount_Currency); + int8_tArray iso4217_code_arr = init_int8_tArray(3, __LINE__); + memcpy(iso4217_code_arr->elems, obj->currency.iso4217_code.data, 3); + return iso4217_code_arr; +} +int64_t CS_LDK_LDKAmount_Currency_get_amount(int64_t ptr) { + LDKAmount *obj = (LDKAmount*)untag_ptr(ptr); + CHECK(obj->tag == LDKAmount_Currency); + int64_t amount_conv = obj->currency.amount; + return amount_conv; +} +uint32_t CS_LDK_LDKCOption_AmountZ_ty_from_ptr(int64_t ptr) { + LDKCOption_AmountZ *obj = (LDKCOption_AmountZ*)untag_ptr(ptr); + switch(obj->tag) { + case LDKCOption_AmountZ_Some: return 0; + case LDKCOption_AmountZ_None: return 1; + default: abort(); + } +} +int64_t CS_LDK_LDKCOption_AmountZ_Some_get_some(int64_t ptr) { + LDKCOption_AmountZ *obj = (LDKCOption_AmountZ*)untag_ptr(ptr); + CHECK(obj->tag == LDKCOption_AmountZ_Some); + int64_t some_ref = tag_ptr(&obj->some, false); + return some_ref; +} +uint32_t CS_LDK_LDKQuantity_ty_from_ptr(int64_t ptr) { + LDKQuantity *obj = (LDKQuantity*)untag_ptr(ptr); + switch(obj->tag) { + case LDKQuantity_Bounded: return 0; + case LDKQuantity_Unbounded: return 1; + case LDKQuantity_One: return 2; + default: abort(); + } +} +int64_t CS_LDK_LDKQuantity_Bounded_get_bounded(int64_t ptr) { + LDKQuantity *obj = (LDKQuantity*)untag_ptr(ptr); + CHECK(obj->tag == LDKQuantity_Bounded); + int64_t bounded_conv = obj->bounded; + return bounded_conv; +} +uint32_t CS_LDK_LDKCOption_QuantityZ_ty_from_ptr(int64_t ptr) { + LDKCOption_QuantityZ *obj = (LDKCOption_QuantityZ*)untag_ptr(ptr); + switch(obj->tag) { + case LDKCOption_QuantityZ_Some: return 0; + case LDKCOption_QuantityZ_None: return 1; + default: abort(); + } +} +int64_t CS_LDK_LDKCOption_QuantityZ_Some_get_some(int64_t ptr) { + LDKCOption_QuantityZ *obj = (LDKCOption_QuantityZ*)untag_ptr(ptr); + CHECK(obj->tag == LDKCOption_QuantityZ_Some); + int64_t some_ref = tag_ptr(&obj->some, false); + return some_ref; +} static inline struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesNoneZ_get_ok(LDKCResult_ThirtyTwoBytesNoneZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return ThirtyTwoBytes_clone(&*owner->contents.result); @@ -1571,44 +1799,45 @@ void CS_LDK_CResult_RecoverableSignatureNoneZ_get_err(int64_t owner) { CResult_RecoverableSignatureNoneZ_get_err(owner_conv); } -static inline struct LDKSchnorrSignature CResult_SchnorrSignatureNoneZ_get_ok(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){ +static inline struct LDKECDSASignature CResult_ECDSASignatureNoneZ_get_ok(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return *owner->contents.result; } -int8_tArray CS_LDK_CResult_SchnorrSignatureNoneZ_get_ok(int64_t owner) { - LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner); +int8_tArray CS_LDK_CResult_ECDSASignatureNoneZ_get_ok(int64_t owner) { + LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner); int8_tArray ret_arr = init_int8_tArray(64, __LINE__); - memcpy(ret_arr->elems, CResult_SchnorrSignatureNoneZ_get_ok(owner_conv).compact_form, 64); + memcpy(ret_arr->elems, CResult_ECDSASignatureNoneZ_get_ok(owner_conv).compact_form, 64); return ret_arr; } -static inline void CResult_SchnorrSignatureNoneZ_get_err(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){ +static inline void CResult_ECDSASignatureNoneZ_get_err(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){ CHECK(!owner->result_ok); return *owner->contents.err; } -void CS_LDK_CResult_SchnorrSignatureNoneZ_get_err(int64_t owner) { - LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner); - CResult_SchnorrSignatureNoneZ_get_err(owner_conv); +void CS_LDK_CResult_ECDSASignatureNoneZ_get_err(int64_t owner) { + LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner); + CResult_ECDSASignatureNoneZ_get_err(owner_conv); } -static inline struct LDKECDSASignature CResult_ECDSASignatureNoneZ_get_ok(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){ +static inline struct LDKTransaction CResult_TransactionNoneZ_get_ok(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return *owner->contents.result; } -int8_tArray CS_LDK_CResult_ECDSASignatureNoneZ_get_ok(int64_t owner) { - LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner); - int8_tArray ret_arr = init_int8_tArray(64, __LINE__); - memcpy(ret_arr->elems, CResult_ECDSASignatureNoneZ_get_ok(owner_conv).compact_form, 64); +int8_tArray CS_LDK_CResult_TransactionNoneZ_get_ok(int64_t owner) { + LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner); + LDKTransaction ret_var = CResult_TransactionNoneZ_get_ok(owner_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); return ret_arr; } -static inline void CResult_ECDSASignatureNoneZ_get_err(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){ +static inline void CResult_TransactionNoneZ_get_err(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){ CHECK(!owner->result_ok); return *owner->contents.err; } -void CS_LDK_CResult_ECDSASignatureNoneZ_get_err(int64_t owner) { - LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner); - CResult_ECDSASignatureNoneZ_get_err(owner_conv); +void CS_LDK_CResult_TransactionNoneZ_get_err(int64_t owner) { + LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner); + CResult_TransactionNoneZ_get_err(owner_conv); } static inline struct LDKECDSASignature C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_a(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ *NONNULL_PTR owner){ @@ -2481,27 +2710,6 @@ int64_t CS_LDK_CResult_InMemorySignerDecodeErrorZ_get_err(int64_t owner) { return ret_ref; } -static inline struct LDKTransaction CResult_TransactionNoneZ_get_ok(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){ -CHECK(owner->result_ok); - return *owner->contents.result; -} -int8_tArray CS_LDK_CResult_TransactionNoneZ_get_ok(int64_t owner) { - LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner); - LDKTransaction ret_var = CResult_TransactionNoneZ_get_ok(owner_conv); - int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); - memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); - return ret_arr; -} - -static inline void CResult_TransactionNoneZ_get_err(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return *owner->contents.err; -} -void CS_LDK_CResult_TransactionNoneZ_get_err(int64_t owner) { - LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner); - CResult_TransactionNoneZ_get_err(owner_conv); -} - uint32_t CS_LDK_LDKCandidateRouteHop_ty_from_ptr(int64_t ptr) { LDKCandidateRouteHop *obj = (LDKCandidateRouteHop*)untag_ptr(ptr); switch(obj->tag) { @@ -3533,6 +3741,32 @@ int64_t CS_LDK_CResult_ProbabilisticScorerDecodeErrorZ_get_err(int64_t owner) { return ret_ref; } +static inline struct LDKBestBlock CResult_BestBlockDecodeErrorZ_get_ok(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR owner){ + LDKBestBlock ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_BestBlockDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_BestBlockDecodeErrorZ* owner_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(owner); + LDKBestBlock ret_var = CResult_BestBlockDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_BestBlockDecodeErrorZ_get_err(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +int64_t CS_LDK_CResult_BestBlockDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_BestBlockDecodeErrorZ* owner_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_BestBlockDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + static inline uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR owner){ return owner->a; } @@ -3616,12 +3850,48 @@ void CS_LDK_CResult_ChannelMonitorUpdateStatusNoneZ_get_err(int64_t owner) { CResult_ChannelMonitorUpdateStatusNoneZ_get_err(owner_conv); } +uint32_t CS_LDK_LDKClosureReason_ty_from_ptr(int64_t ptr) { + LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr); + switch(obj->tag) { + case LDKClosureReason_CounterpartyForceClosed: return 0; + case LDKClosureReason_HolderForceClosed: return 1; + case LDKClosureReason_LegacyCooperativeClosure: return 2; + case LDKClosureReason_CounterpartyInitiatedCooperativeClosure: return 3; + case LDKClosureReason_LocallyInitiatedCooperativeClosure: return 4; + case LDKClosureReason_CommitmentTxConfirmed: return 5; + case LDKClosureReason_FundingTimedOut: return 6; + case LDKClosureReason_ProcessingError: return 7; + case LDKClosureReason_DisconnectedPeer: return 8; + case LDKClosureReason_OutdatedChannelManager: return 9; + case LDKClosureReason_CounterpartyCoopClosedUnfundedChannel: return 10; + case LDKClosureReason_FundingBatchClosure: return 11; + case LDKClosureReason_HTLCsTimedOut: return 12; + default: abort(); + } +} +int64_t CS_LDK_LDKClosureReason_CounterpartyForceClosed_get_peer_msg(int64_t ptr) { + LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr); + CHECK(obj->tag == LDKClosureReason_CounterpartyForceClosed); + LDKUntrustedString peer_msg_var = obj->counterparty_force_closed.peer_msg; + int64_t peer_msg_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(peer_msg_var); + peer_msg_ref = tag_ptr(peer_msg_var.inner, false); + return peer_msg_ref; +} +jstring CS_LDK_LDKClosureReason_ProcessingError_get_err(int64_t ptr) { + LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr); + CHECK(obj->tag == LDKClosureReason_ProcessingError); + LDKStr err_str = obj->processing_error.err; + jstring err_conv = str_ref_to_cs(err_str.chars, err_str.len); + return err_conv; +} uint32_t CS_LDK_LDKMonitorEvent_ty_from_ptr(int64_t ptr) { LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr); switch(obj->tag) { case LDKMonitorEvent_HTLCEvent: return 0; - case LDKMonitorEvent_HolderForceClosed: return 1; - case LDKMonitorEvent_Completed: return 2; + case LDKMonitorEvent_HolderForceClosedWithInfo: return 1; + case LDKMonitorEvent_HolderForceClosed: return 2; + case LDKMonitorEvent_Completed: return 3; default: abort(); } } @@ -3634,6 +3904,30 @@ int64_t CS_LDK_LDKMonitorEvent_HTLCEvent_get_htlc_event(int64_t ptr) { htlc_event_ref = tag_ptr(htlc_event_var.inner, false); return htlc_event_ref; } +int64_t CS_LDK_LDKMonitorEvent_HolderForceClosedWithInfo_get_reason(int64_t ptr) { + LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr); + CHECK(obj->tag == LDKMonitorEvent_HolderForceClosedWithInfo); + int64_t reason_ref = tag_ptr(&obj->holder_force_closed_with_info.reason, false); + return reason_ref; +} +int64_t CS_LDK_LDKMonitorEvent_HolderForceClosedWithInfo_get_outpoint(int64_t ptr) { + LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr); + CHECK(obj->tag == LDKMonitorEvent_HolderForceClosedWithInfo); + LDKOutPoint outpoint_var = obj->holder_force_closed_with_info.outpoint; + int64_t outpoint_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_var); + outpoint_ref = tag_ptr(outpoint_var.inner, false); + return outpoint_ref; +} +int64_t CS_LDK_LDKMonitorEvent_HolderForceClosedWithInfo_get_channel_id(int64_t ptr) { + LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr); + CHECK(obj->tag == LDKMonitorEvent_HolderForceClosedWithInfo); + LDKChannelId channel_id_var = obj->holder_force_closed_with_info.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; +} int64_t CS_LDK_LDKMonitorEvent_HolderForceClosed_get_holder_force_closed(int64_t ptr) { LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr); CHECK(obj->tag == LDKMonitorEvent_HolderForceClosed); @@ -3652,6 +3946,15 @@ int64_t CS_LDK_LDKMonitorEvent_Completed_get_funding_txo(int64_t ptr) { funding_txo_ref = tag_ptr(funding_txo_var.inner, false); return funding_txo_ref; } +int64_t CS_LDK_LDKMonitorEvent_Completed_get_channel_id(int64_t ptr) { + LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr); + CHECK(obj->tag == LDKMonitorEvent_Completed); + LDKChannelId channel_id_var = obj->completed.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; +} int64_t CS_LDK_LDKMonitorEvent_Completed_get_monitor_update_id(int64_t ptr) { LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr); CHECK(obj->tag == LDKMonitorEvent_Completed); @@ -3665,26 +3968,40 @@ static inline LDKCVec_MonitorEventZ CVec_MonitorEventZ_clone(const LDKCVec_Monit } return ret; } -static inline struct LDKOutPoint C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ +static inline struct LDKOutPoint C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ LDKOutPoint ret = owner->a; ret.is_owned = false; return ret; } -int64_t CS_LDK_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(int64_t owner) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); - LDKOutPoint ret_var = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(owner_conv); +int64_t CS_LDK_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(int64_t owner) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); + LDKOutPoint ret_var = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKChannelId C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ + LDKChannelId ret = owner->b; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(int64_t owner) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); + LDKChannelId ret_var = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(owner_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -static inline struct LDKCVec_MonitorEventZ C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ - return CVec_MonitorEventZ_clone(&owner->b); +static inline struct LDKCVec_MonitorEventZ C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ + return CVec_MonitorEventZ_clone(&owner->c); } -int64_tArray CS_LDK_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(int64_t owner) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); - LDKCVec_MonitorEventZ ret_var = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(owner_conv); +int64_tArray CS_LDK_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(int64_t owner) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); + LDKCVec_MonitorEventZ ret_var = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(owner_conv); int64_tArray ret_arr = NULL; ret_arr = init_int64_tArray(ret_var.datalen, __LINE__); int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8); @@ -3699,20 +4016,20 @@ int64_tArray CS_LDK_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(int64_t return ret_arr; } -static inline struct LDKPublicKey C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ - return owner->c; +static inline struct LDKPublicKey C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){ + return owner->d; } -int8_tArray CS_LDK_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(int64_t owner) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); +int8_tArray CS_LDK_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(int64_t owner) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner); int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(owner_conv).compressed_form, 33); + memcpy(ret_arr->elems, C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(owner_conv).compressed_form, 33); return ret_arr; } -static inline LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_clone(const LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ *orig) { - LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ) * orig->datalen, "LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ clone bytes"), .datalen = orig->datalen }; +static inline LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_clone(const LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ *orig) { + LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ) * orig->datalen, "LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ clone bytes"), .datalen = orig->datalen }; for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(&orig->data[i]); + ret.data[i] = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(&orig->data[i]); } return ret; } @@ -3898,6 +4215,123 @@ int64_t CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(int64_t owner) { return ret_ref; } +static inline struct LDKOfferId CResult_OfferIdDecodeErrorZ_get_ok(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR owner){ + LDKOfferId ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_OfferIdDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_OfferIdDecodeErrorZ* owner_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(owner); + LDKOfferId ret_var = CResult_OfferIdDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_OfferIdDecodeErrorZ_get_err(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +int64_t CS_LDK_CResult_OfferIdDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_OfferIdDecodeErrorZ* owner_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_OfferIdDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline void CResult_NoneBolt12SemanticErrorZ_get_ok(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return *owner->contents.result; +} +void CS_LDK_CResult_NoneBolt12SemanticErrorZ_get_ok(int64_t owner) { + LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner); + CResult_NoneBolt12SemanticErrorZ_get_ok(owner_conv); +} + +static inline enum LDKBolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +int32_t CS_LDK_CResult_NoneBolt12SemanticErrorZ_get_err(int64_t owner) { + LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner); + int32_t ret_conv = LDKBolt12SemanticError_to_cs(CResult_NoneBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKOffer CResult_OfferBolt12SemanticErrorZ_get_ok(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKOffer ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_OfferBolt12SemanticErrorZ_get_ok(int64_t owner) { + LDKCResult_OfferBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(owner); + LDKOffer ret_var = CResult_OfferBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_OfferBolt12SemanticErrorZ_get_err(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +int32_t CS_LDK_CResult_OfferBolt12SemanticErrorZ_get_err(int64_t owner) { + LDKCResult_OfferBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(owner); + int32_t ret_conv = LDKBolt12SemanticError_to_cs(CResult_OfferBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKInvoiceRequestWithDerivedPayerIdBuilder CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKInvoiceRequestWithDerivedPayerIdBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(int64_t owner) { + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKInvoiceRequestWithDerivedPayerIdBuilder ret_var = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +int32_t CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(int64_t owner) { + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + int32_t ret_conv = LDKBolt12SemanticError_to_cs(CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKInvoiceRequestWithExplicitPayerIdBuilder CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKInvoiceRequestWithExplicitPayerIdBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(int64_t owner) { + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKInvoiceRequestWithExplicitPayerIdBuilder ret_var = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +int32_t CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(int64_t owner) { + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + int32_t ret_conv = LDKBolt12SemanticError_to_cs(CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + static inline struct LDKOffer CResult_OfferBolt12ParseErrorZ_get_ok(LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR owner){ LDKOffer ret = *owner->contents.result; ret.is_owned = false; @@ -3926,27 +4360,6 @@ int64_t CS_LDK_CResult_OfferBolt12ParseErrorZ_get_err(int64_t owner) { return ret_ref; } -static inline struct LDKPublicKey CResult_PublicKeySecp256k1ErrorZ_get_ok(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){ -CHECK(owner->result_ok); - return *owner->contents.result; -} -int8_tArray CS_LDK_CResult_PublicKeySecp256k1ErrorZ_get_ok(int64_t owner) { - LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner); - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, CResult_PublicKeySecp256k1ErrorZ_get_ok(owner_conv).compressed_form, 33); - return ret_arr; -} - -static inline enum LDKSecp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return *owner->contents.err; -} -int32_t CS_LDK_CResult_PublicKeySecp256k1ErrorZ_get_err(int64_t owner) { - LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner); - int32_t ret_conv = LDKSecp256k1Error_to_cs(CResult_PublicKeySecp256k1ErrorZ_get_err(owner_conv)); - return ret_conv; -} - static inline struct LDKNodeId CResult_NodeIdDecodeErrorZ_get_ok(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR owner){ LDKNodeId ret = *owner->contents.result; ret.is_owned = false; @@ -3973,6 +4386,27 @@ int64_t CS_LDK_CResult_NodeIdDecodeErrorZ_get_err(int64_t owner) { return ret_ref; } +static inline struct LDKPublicKey CResult_PublicKeySecp256k1ErrorZ_get_ok(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return *owner->contents.result; +} +int8_tArray CS_LDK_CResult_PublicKeySecp256k1ErrorZ_get_ok(int64_t owner) { + LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner); + int8_tArray ret_arr = init_int8_tArray(33, __LINE__); + memcpy(ret_arr->elems, CResult_PublicKeySecp256k1ErrorZ_get_ok(owner_conv).compressed_form, 33); + return ret_arr; +} + +static inline enum LDKSecp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return *owner->contents.err; +} +int32_t CS_LDK_CResult_PublicKeySecp256k1ErrorZ_get_err(int64_t owner) { + LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner); + int32_t ret_conv = LDKSecp256k1Error_to_cs(CResult_PublicKeySecp256k1ErrorZ_get_err(owner_conv)); + return ret_conv; +} + uint32_t CS_LDK_LDKNetworkUpdate_ty_from_ptr(int64_t ptr) { LDKNetworkUpdate *obj = (LDKNetworkUpdate*)untag_ptr(ptr); switch(obj->tag) { @@ -5257,6 +5691,26 @@ int64_tArray CS_LDK_LDKCOption_CVec_SocketAddressZZ_Some_get_some(int64_t ptr) { return some_arr; } +static inline uint64_t CResult_u64ShortChannelIdErrorZ_get_ok(LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return *owner->contents.result; +} +int64_t CS_LDK_CResult_u64ShortChannelIdErrorZ_get_ok(int64_t owner) { + LDKCResult_u64ShortChannelIdErrorZ* owner_conv = (LDKCResult_u64ShortChannelIdErrorZ*)untag_ptr(owner); + int64_t ret_conv = CResult_u64ShortChannelIdErrorZ_get_ok(owner_conv); + return ret_conv; +} + +static inline enum LDKShortChannelIdError CResult_u64ShortChannelIdErrorZ_get_err(LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return ShortChannelIdError_clone(&*owner->contents.err); +} +int32_t CS_LDK_CResult_u64ShortChannelIdErrorZ_get_err(int64_t owner) { + LDKCResult_u64ShortChannelIdErrorZ* owner_conv = (LDKCResult_u64ShortChannelIdErrorZ*)untag_ptr(owner); + int32_t ret_conv = LDKShortChannelIdError_to_cs(CResult_u64ShortChannelIdErrorZ_get_err(owner_conv)); + return ret_conv; +} + static inline struct LDKPendingHTLCInfo CResult_PendingHTLCInfoInboundHTLCErrZ_get_ok(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR owner){ LDKPendingHTLCInfo ret = *owner->contents.result; ret.is_owned = false; @@ -5381,6 +5835,56 @@ void CS_LDK_CResult_CVec_UtxoZNoneZ_get_err(int64_t owner) { CResult_CVec_UtxoZNoneZ_get_err(owner_conv); } +uint32_t CS_LDK_LDKPaymentContext_ty_from_ptr(int64_t ptr) { + LDKPaymentContext *obj = (LDKPaymentContext*)untag_ptr(ptr); + switch(obj->tag) { + case LDKPaymentContext_Unknown: return 0; + case LDKPaymentContext_Bolt12Offer: return 1; + case LDKPaymentContext_Bolt12Refund: return 2; + default: abort(); + } +} +int64_t CS_LDK_LDKPaymentContext_Unknown_get_unknown(int64_t ptr) { + LDKPaymentContext *obj = (LDKPaymentContext*)untag_ptr(ptr); + CHECK(obj->tag == LDKPaymentContext_Unknown); + LDKUnknownPaymentContext unknown_var = obj->unknown; + int64_t unknown_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(unknown_var); + unknown_ref = tag_ptr(unknown_var.inner, false); + return unknown_ref; +} +int64_t CS_LDK_LDKPaymentContext_Bolt12Offer_get_bolt12_offer(int64_t ptr) { + LDKPaymentContext *obj = (LDKPaymentContext*)untag_ptr(ptr); + CHECK(obj->tag == LDKPaymentContext_Bolt12Offer); + LDKBolt12OfferContext bolt12_offer_var = obj->bolt12_offer; + int64_t bolt12_offer_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(bolt12_offer_var); + bolt12_offer_ref = tag_ptr(bolt12_offer_var.inner, false); + return bolt12_offer_ref; +} +int64_t CS_LDK_LDKPaymentContext_Bolt12Refund_get_bolt12_refund(int64_t ptr) { + LDKPaymentContext *obj = (LDKPaymentContext*)untag_ptr(ptr); + CHECK(obj->tag == LDKPaymentContext_Bolt12Refund); + LDKBolt12RefundContext bolt12_refund_var = obj->bolt12_refund; + int64_t bolt12_refund_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(bolt12_refund_var); + bolt12_refund_ref = tag_ptr(bolt12_refund_var.inner, false); + return bolt12_refund_ref; +} +uint32_t CS_LDK_LDKCOption_PaymentContextZ_ty_from_ptr(int64_t ptr) { + LDKCOption_PaymentContextZ *obj = (LDKCOption_PaymentContextZ*)untag_ptr(ptr); + switch(obj->tag) { + case LDKCOption_PaymentContextZ_Some: return 0; + case LDKCOption_PaymentContextZ_None: return 1; + default: abort(); + } +} +int64_t CS_LDK_LDKCOption_PaymentContextZ_Some_get_some(int64_t ptr) { + LDKCOption_PaymentContextZ *obj = (LDKCOption_PaymentContextZ*)untag_ptr(ptr); + CHECK(obj->tag == LDKCOption_PaymentContextZ_Some); + int64_t some_ref = tag_ptr(&obj->some, false); + return some_ref; +} static inline uint64_t C2Tuple_u64u16Z_get_a(LDKC2Tuple_u64u16Z *NONNULL_PTR owner){ return owner->a; } @@ -5429,25 +5933,28 @@ int32_t CS_LDK_LDKCOption_ChannelShutdownStateZ_Some_get_some(int64_t ptr) { int32_t some_conv = LDKChannelShutdownState_to_cs(obj->some); return some_conv; } -static inline struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesAPIErrorZ_get_ok(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){ -CHECK(owner->result_ok); - return ThirtyTwoBytes_clone(&*owner->contents.result); +static inline struct LDKChannelId CResult_ChannelIdAPIErrorZ_get_ok(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR owner){ + LDKChannelId ret = *owner->contents.result; + ret.is_owned = false; + return ret; } -int8_tArray CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_get_ok(int64_t owner) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner); - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, CResult_ThirtyTwoBytesAPIErrorZ_get_ok(owner_conv).data, 32); - return ret_arr; +int64_t CS_LDK_CResult_ChannelIdAPIErrorZ_get_ok(int64_t owner) { + LDKCResult_ChannelIdAPIErrorZ* owner_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(owner); + LDKChannelId ret_var = CResult_ChannelIdAPIErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -static inline struct LDKAPIError CResult_ThirtyTwoBytesAPIErrorZ_get_err(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){ +static inline struct LDKAPIError CResult_ChannelIdAPIErrorZ_get_err(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR owner){ CHECK(!owner->result_ok); return APIError_clone(&*owner->contents.err); } -int64_t CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_get_err(int64_t owner) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner); +int64_t CS_LDK_CResult_ChannelIdAPIErrorZ_get_err(int64_t owner) { + LDKCResult_ChannelIdAPIErrorZ* owner_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(owner); LDKAPIError *ret_copy = MALLOC(sizeof(LDKAPIError), "LDKAPIError"); - *ret_copy = CResult_ThirtyTwoBytesAPIErrorZ_get_err(owner_conv); + *ret_copy = CResult_ChannelIdAPIErrorZ_get_err(owner_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -5782,33 +6289,68 @@ int64_t CS_LDK_CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFail return ret_ref; } -static inline struct LDKThirtyTwoBytes C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR owner){ - return ThirtyTwoBytes_clone(&owner->a); +static inline struct LDKChannelId C2Tuple_ChannelIdPublicKeyZ_get_a(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR owner){ + LDKChannelId ret = owner->a; + ret.is_owned = false; + return ret; } -int8_tArray CS_LDK_C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(int64_t owner) { - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* owner_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(owner); - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(owner_conv).data, 32); - return ret_arr; +int64_t CS_LDK_C2Tuple_ChannelIdPublicKeyZ_get_a(int64_t owner) { + LDKC2Tuple_ChannelIdPublicKeyZ* owner_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(owner); + LDKChannelId ret_var = C2Tuple_ChannelIdPublicKeyZ_get_a(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -static inline struct LDKPublicKey C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR owner){ +static inline struct LDKPublicKey C2Tuple_ChannelIdPublicKeyZ_get_b(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR owner){ return owner->b; } -int8_tArray CS_LDK_C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(int64_t owner) { - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* owner_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(owner); +int8_tArray CS_LDK_C2Tuple_ChannelIdPublicKeyZ_get_b(int64_t owner) { + LDKC2Tuple_ChannelIdPublicKeyZ* owner_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(owner); int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(owner_conv).compressed_form, 33); + memcpy(ret_arr->elems, C2Tuple_ChannelIdPublicKeyZ_get_b(owner_conv).compressed_form, 33); return ret_arr; } -static inline LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_clone(const LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ *orig) { - LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ) * orig->datalen, "LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ clone bytes"), .datalen = orig->datalen }; +static inline LDKCVec_C2Tuple_ChannelIdPublicKeyZZ CVec_C2Tuple_ChannelIdPublicKeyZZ_clone(const LDKCVec_C2Tuple_ChannelIdPublicKeyZZ *orig) { + LDKCVec_C2Tuple_ChannelIdPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ) * orig->datalen, "LDKCVec_C2Tuple_ChannelIdPublicKeyZZ clone bytes"), .datalen = orig->datalen }; for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(&orig->data[i]); + ret.data[i] = C2Tuple_ChannelIdPublicKeyZ_clone(&orig->data[i]); } return ret; } +static inline LDKCVec_ChannelIdZ CVec_ChannelIdZ_clone(const LDKCVec_ChannelIdZ *orig) { + LDKCVec_ChannelIdZ ret = { .data = MALLOC(sizeof(LDKChannelId) * orig->datalen, "LDKCVec_ChannelIdZ clone bytes"), .datalen = orig->datalen }; + for (size_t i = 0; i < ret.datalen; i++) { + ret.data[i] = ChannelId_clone(&orig->data[i]); + } + return ret; +} +static inline struct LDKOfferWithDerivedMetadataBuilder CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKOfferWithDerivedMetadataBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(int64_t owner) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKOfferWithDerivedMetadataBuilder ret_var = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +int32_t CS_LDK_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(int64_t owner) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + int32_t ret_conv = LDKBolt12SemanticError_to_cs(CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + uint32_t CS_LDK_LDKCOption_StrZ_ty_from_ptr(int64_t ptr) { LDKCOption_StrZ *obj = (LDKCOption_StrZ*)untag_ptr(ptr); switch(obj->tag) { @@ -5824,25 +6366,6 @@ jstring CS_LDK_LDKCOption_StrZ_Some_get_some(int64_t ptr) { jstring some_conv = str_ref_to_cs(some_str.chars, some_str.len); return some_conv; } -static inline void CResult_NoneBolt12SemanticErrorZ_get_ok(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){ -CHECK(owner->result_ok); - return *owner->contents.result; -} -void CS_LDK_CResult_NoneBolt12SemanticErrorZ_get_ok(int64_t owner) { - LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner); - CResult_NoneBolt12SemanticErrorZ_get_ok(owner_conv); -} - -static inline enum LDKBolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return Bolt12SemanticError_clone(&*owner->contents.err); -} -int32_t CS_LDK_CResult_NoneBolt12SemanticErrorZ_get_err(int64_t owner) { - LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner); - int32_t ret_conv = LDKBolt12SemanticError_to_cs(CResult_NoneBolt12SemanticErrorZ_get_err(owner_conv)); - return ret_conv; -} - static inline struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_ok(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return C2Tuple_ThirtyTwoBytesThirtyTwoBytesZ_clone(&*owner->contents.result); @@ -5863,6 +6386,29 @@ void CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_err(int64_t CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_err(owner_conv); } +static inline struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesAPIErrorZ_get_ok(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return ThirtyTwoBytes_clone(&*owner->contents.result); +} +int8_tArray CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_get_ok(int64_t owner) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner); + int8_tArray ret_arr = init_int8_tArray(32, __LINE__); + memcpy(ret_arr->elems, CResult_ThirtyTwoBytesAPIErrorZ_get_ok(owner_conv).data, 32); + return ret_arr; +} + +static inline struct LDKAPIError CResult_ThirtyTwoBytesAPIErrorZ_get_err(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return APIError_clone(&*owner->contents.err); +} +int64_t CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_get_err(int64_t owner) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner); + LDKAPIError *ret_copy = MALLOC(sizeof(LDKAPIError), "LDKAPIError"); + *ret_copy = CResult_ThirtyTwoBytesAPIErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + uint32_t CS_LDK_LDKOffersMessage_ty_from_ptr(int64_t ptr) { LDKOffersMessage *obj = (LDKOffersMessage*)untag_ptr(ptr); switch(obj->tag) { @@ -6158,6 +6704,12 @@ int64_t CS_LDK_LDKPendingHTLCRouting_Receive_get_payment_metadata(int64_t ptr) { int64_t payment_metadata_ref = tag_ptr(&obj->receive.payment_metadata, false); return payment_metadata_ref; } +int64_t CS_LDK_LDKPendingHTLCRouting_Receive_get_payment_context(int64_t ptr) { + LDKPendingHTLCRouting *obj = (LDKPendingHTLCRouting*)untag_ptr(ptr); + CHECK(obj->tag == LDKPendingHTLCRouting_Receive); + int64_t payment_context_ref = tag_ptr(&obj->receive.payment_context, false); + return payment_context_ref; +} int32_t CS_LDK_LDKPendingHTLCRouting_Receive_get_incoming_cltv_expiry(int64_t ptr) { LDKPendingHTLCRouting *obj = (LDKPendingHTLCRouting*)untag_ptr(ptr); CHECK(obj->tag == LDKPendingHTLCRouting_Receive); @@ -6237,6 +6789,12 @@ int64_tArray CS_LDK_LDKPendingHTLCRouting_ReceiveKeysend_get_custom_tlvs(int64_t return custom_tlvs_arr; } +jboolean CS_LDK_LDKPendingHTLCRouting_ReceiveKeysend_get_requires_blinded_error(int64_t ptr) { + LDKPendingHTLCRouting *obj = (LDKPendingHTLCRouting*)untag_ptr(ptr); + CHECK(obj->tag == LDKPendingHTLCRouting_ReceiveKeysend); + jboolean requires_blinded_error_conv = obj->receive_keysend.requires_blinded_error; + return requires_blinded_error_conv; +} static inline struct LDKPendingHTLCRouting CResult_PendingHTLCRoutingDecodeErrorZ_get_ok(LDKCResult_PendingHTLCRoutingDecodeErrorZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return PendingHTLCRouting_clone(&*owner->contents.result); @@ -6380,23 +6938,23 @@ LDKChannelMonitorUpdateStatus update_channel_LDKWatch_jcall(const void* this_arg LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_cs(ret); return ret_conv; } -LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ release_pending_monitor_events_LDKWatch_jcall(const void* this_arg) { +LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ release_pending_monitor_events_LDKWatch_jcall(const void* this_arg) { LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg; int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 29); - LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret_constr; + LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ ret_constr; ret_constr.datalen = ret->arr_len; if (ret_constr.datalen > 0) - ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ Elements"); + ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ Elements"); else ret_constr.data = NULL; int64_t* ret_vals = ret->elems; - for (size_t x = 0; x < ret_constr.datalen; x++) { - int64_t ret_conv_49 = ret_vals[x]; - void* ret_conv_49_ptr = untag_ptr(ret_conv_49); - CHECK_ACCESS(ret_conv_49_ptr); - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ ret_conv_49_conv = *(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)(ret_conv_49_ptr); - FREE(untag_ptr(ret_conv_49)); - ret_constr.data[x] = ret_conv_49_conv; + for (size_t f = 0; f < ret_constr.datalen; f++) { + int64_t ret_conv_57 = ret_vals[f]; + void* ret_conv_57_ptr = untag_ptr(ret_conv_57); + CHECK_ACCESS(ret_conv_57_ptr); + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ ret_conv_57_conv = *(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)(ret_conv_57_ptr); + FREE(untag_ptr(ret_conv_57)); + ret_constr.data[f] = ret_conv_57_conv; } FREE(ret); return ret_constr; @@ -6465,14 +7023,14 @@ int64_tArray CS_LDK_Watch_release_pending_monitor_events(int64_t this_arg) { void* this_arg_ptr = untag_ptr(this_arg); if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } LDKWatch* this_arg_conv = (LDKWatch*)this_arg_ptr; - LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret_var = (this_arg_conv->release_pending_monitor_events)(this_arg_conv->this_arg); + LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ ret_var = (this_arg_conv->release_pending_monitor_events)(this_arg_conv->this_arg); int64_tArray ret_arr = NULL; ret_arr = init_int64_tArray(ret_var.datalen, __LINE__); int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8); - for (size_t x = 0; x < ret_var.datalen; x++) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv_49_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ"); - *ret_conv_49_conv = ret_var.data[x]; - ret_arr_ptr[x] = tag_ptr(ret_conv_49_conv, true); + for (size_t f = 0; f < ret_var.datalen; f++) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv_57_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ"); + *ret_conv_57_conv = ret_var.data[f]; + ret_arr_ptr[f] = tag_ptr(ret_conv_57_conv, true); } FREE(ret_var.data); @@ -6705,7 +7263,7 @@ LDKCResult_SchnorrSignatureNoneZ sign_bolt12_invoice_request_LDKNodeSigner_jcall LDKNodeSigner_JCalls *j_calls = (LDKNodeSigner_JCalls*) this_arg; LDKUnsignedInvoiceRequest invoice_request_var = *invoice_request; int64_t invoice_request_ref = 0; - // WARNING: we may need a move here but no clone is available for LDKUnsignedInvoiceRequest + invoice_request_var = UnsignedInvoiceRequest_clone(&invoice_request_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_request_var); invoice_request_ref = tag_ptr(invoice_request_var.inner, invoice_request_var.is_owned); uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 36, invoice_request_ref); @@ -6719,7 +7277,7 @@ LDKCResult_SchnorrSignatureNoneZ sign_bolt12_invoice_LDKNodeSigner_jcall(const v LDKNodeSigner_JCalls *j_calls = (LDKNodeSigner_JCalls*) this_arg; LDKUnsignedBolt12Invoice invoice_var = *invoice; int64_t invoice_ref = 0; - // WARNING: we may need a move here but no clone is available for LDKUnsignedBolt12Invoice + invoice_var = UnsignedBolt12Invoice_clone(&invoice_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_var); invoice_ref = tag_ptr(invoice_var.inner, invoice_var.is_owned); uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 37, invoice_ref); @@ -8404,34 +8962,6 @@ int64_t CS_LDK_LDKCOption_SocketAddressZ_Some_get_some(int64_t ptr) { int64_t some_ref = tag_ptr(&obj->some, false); return some_ref; } -static inline struct LDKPublicKey C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR owner){ - return owner->a; -} -int8_tArray CS_LDK_C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(int64_t owner) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* owner_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(owner); - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(owner_conv).compressed_form, 33); - return ret_arr; -} - -static inline struct LDKCOption_SocketAddressZ C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR owner){ - return COption_SocketAddressZ_clone(&owner->b); -} -int64_t CS_LDK_C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(int64_t owner) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* owner_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(owner); - LDKCOption_SocketAddressZ *ret_copy = MALLOC(sizeof(LDKCOption_SocketAddressZ), "LDKCOption_SocketAddressZ"); - *ret_copy = C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(owner_conv); - int64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -static inline LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_clone(const LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ *orig) { - LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ) * orig->datalen, "LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ clone bytes"), .datalen = orig->datalen }; - for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(&orig->data[i]); - } - return ret; -} static inline struct LDKCVec_u8Z CResult_CVec_u8ZPeerHandleErrorZ_get_ok(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return CVec_u8Z_clone(&*owner->contents.result); @@ -8661,6 +9191,54 @@ int32_t CS_LDK_CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_get_err(in return ret_conv; } +static inline struct LDKUnsignedInvoiceRequest CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKUnsignedInvoiceRequest ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(int64_t owner) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner); + LDKUnsignedInvoiceRequest ret_var = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +int32_t CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(int64_t owner) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner); + int32_t ret_conv = LDKBolt12SemanticError_to_cs(CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKInvoiceRequest CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKInvoiceRequest ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(int64_t owner) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner); + LDKInvoiceRequest ret_var = CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +int32_t CS_LDK_CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(int64_t owner) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner); + int32_t ret_conv = LDKBolt12SemanticError_to_cs(CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + uint32_t CS_LDK_LDKCOption_SecretKeyZ_ty_from_ptr(int64_t ptr) { LDKCOption_SecretKeyZ *obj = (LDKCOption_SecretKeyZ*)untag_ptr(ptr); switch(obj->tag) { @@ -8676,6 +9254,30 @@ int8_tArray CS_LDK_LDKCOption_SecretKeyZ_Some_get_some(int64_t ptr) { memcpy(some_arr->elems, obj->some.bytes, 32); return some_arr; } +static inline struct LDKInvoiceWithExplicitSigningPubkeyBuilder CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKInvoiceWithExplicitSigningPubkeyBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(int64_t owner) { + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKInvoiceWithExplicitSigningPubkeyBuilder ret_var = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +int32_t CS_LDK_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(int64_t owner) { + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + int32_t ret_conv = LDKBolt12SemanticError_to_cs(CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + static inline struct LDKVerifiedInvoiceRequest CResult_VerifiedInvoiceRequestNoneZ_get_ok(LDKCResult_VerifiedInvoiceRequestNoneZ *NONNULL_PTR owner){ LDKVerifiedInvoiceRequest ret = *owner->contents.result; ret.is_owned = false; @@ -8699,6 +9301,56 @@ void CS_LDK_CResult_VerifiedInvoiceRequestNoneZ_get_err(int64_t owner) { CResult_VerifiedInvoiceRequestNoneZ_get_err(owner_conv); } +static inline struct LDKInvoiceWithDerivedSigningPubkeyBuilder CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ + LDKInvoiceWithDerivedSigningPubkeyBuilder ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(int64_t owner) { + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + LDKInvoiceWithDerivedSigningPubkeyBuilder ret_var = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline enum LDKBolt12SemanticError CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return Bolt12SemanticError_clone(&*owner->contents.err); +} +int32_t CS_LDK_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(int64_t owner) { + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner); + int32_t ret_conv = LDKBolt12SemanticError_to_cs(CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(owner_conv)); + return ret_conv; +} + +static inline struct LDKInvoiceRequestFields CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR owner){ + LDKInvoiceRequestFields ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* owner_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(owner); + LDKInvoiceRequestFields ret_var = CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +int64_t CS_LDK_CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* owner_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + static inline LDKCVec_WitnessZ CVec_WitnessZ_clone(const LDKCVec_WitnessZ *orig) { LDKCVec_WitnessZ ret = { .data = MALLOC(sizeof(LDKWitness) * orig->datalen, "LDKCVec_WitnessZ clone bytes"), .datalen = orig->datalen }; for (size_t i = 0; i < ret.datalen; i++) { @@ -8706,6 +9358,21 @@ static inline LDKCVec_WitnessZ CVec_WitnessZ_clone(const LDKCVec_WitnessZ *orig) } return ret; } +uint32_t CS_LDK_LDKCOption_ECDSASignatureZ_ty_from_ptr(int64_t ptr) { + LDKCOption_ECDSASignatureZ *obj = (LDKCOption_ECDSASignatureZ*)untag_ptr(ptr); + switch(obj->tag) { + case LDKCOption_ECDSASignatureZ_Some: return 0; + case LDKCOption_ECDSASignatureZ_None: return 1; + default: abort(); + } +} +int8_tArray CS_LDK_LDKCOption_ECDSASignatureZ_Some_get_some(int64_t ptr) { + LDKCOption_ECDSASignatureZ *obj = (LDKCOption_ECDSASignatureZ*)untag_ptr(ptr); + CHECK(obj->tag == LDKCOption_ECDSASignatureZ_Some); + int8_tArray some_arr = init_int8_tArray(64, __LINE__); + memcpy(some_arr->elems, obj->some.compact_form, 64); + return some_arr; +} uint32_t CS_LDK_LDKCOption_i64Z_ty_from_ptr(int64_t ptr) { LDKCOption_i64Z *obj = (LDKCOption_i64Z*)untag_ptr(ptr); switch(obj->tag) { @@ -10167,13 +10834,6 @@ int64_t CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_get_err(int64_t owner) return ret_ref; } -static inline LDKCVec_FutureZ CVec_FutureZ_clone(const LDKCVec_FutureZ *orig) { - LDKCVec_FutureZ ret = { .data = MALLOC(sizeof(LDKFuture) * orig->datalen, "LDKCVec_FutureZ clone bytes"), .datalen = orig->datalen }; - for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = Future_clone(&orig->data[i]); - } - return ret; -} static inline struct LDKOffersMessage CResult_OffersMessageDecodeErrorZ_get_ok(LDKCResult_OffersMessageDecodeErrorZ *NONNULL_PTR owner){ CHECK(owner->result_ok); return OffersMessage_clone(&*owner->contents.result); @@ -10591,24 +11251,70 @@ int64_t CS_LDK_CResult_ShutdownScriptInvalidShutdownScriptZ_get_err(int64_t own uint32_t CS_LDK_LDKPaymentPurpose_ty_from_ptr(int64_t ptr) { LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); switch(obj->tag) { - case LDKPaymentPurpose_InvoicePayment: return 0; - case LDKPaymentPurpose_SpontaneousPayment: return 1; + case LDKPaymentPurpose_Bolt11InvoicePayment: return 0; + case LDKPaymentPurpose_Bolt12OfferPayment: return 1; + case LDKPaymentPurpose_Bolt12RefundPayment: return 2; + case LDKPaymentPurpose_SpontaneousPayment: return 3; default: abort(); } } -int64_t CS_LDK_LDKPaymentPurpose_InvoicePayment_get_payment_preimage(int64_t ptr) { +int64_t CS_LDK_LDKPaymentPurpose_Bolt11InvoicePayment_get_payment_preimage(int64_t ptr) { + LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); + CHECK(obj->tag == LDKPaymentPurpose_Bolt11InvoicePayment); + int64_t payment_preimage_ref = tag_ptr(&obj->bolt11_invoice_payment.payment_preimage, false); + return payment_preimage_ref; +} +int8_tArray CS_LDK_LDKPaymentPurpose_Bolt11InvoicePayment_get_payment_secret(int64_t ptr) { + LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); + CHECK(obj->tag == LDKPaymentPurpose_Bolt11InvoicePayment); + int8_tArray payment_secret_arr = init_int8_tArray(32, __LINE__); + memcpy(payment_secret_arr->elems, obj->bolt11_invoice_payment.payment_secret.data, 32); + return payment_secret_arr; +} +int64_t CS_LDK_LDKPaymentPurpose_Bolt12OfferPayment_get_payment_preimage(int64_t ptr) { + LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); + CHECK(obj->tag == LDKPaymentPurpose_Bolt12OfferPayment); + int64_t payment_preimage_ref = tag_ptr(&obj->bolt12_offer_payment.payment_preimage, false); + return payment_preimage_ref; +} +int8_tArray CS_LDK_LDKPaymentPurpose_Bolt12OfferPayment_get_payment_secret(int64_t ptr) { + LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); + CHECK(obj->tag == LDKPaymentPurpose_Bolt12OfferPayment); + int8_tArray payment_secret_arr = init_int8_tArray(32, __LINE__); + memcpy(payment_secret_arr->elems, obj->bolt12_offer_payment.payment_secret.data, 32); + return payment_secret_arr; +} +int64_t CS_LDK_LDKPaymentPurpose_Bolt12OfferPayment_get_payment_context(int64_t ptr) { + LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); + CHECK(obj->tag == LDKPaymentPurpose_Bolt12OfferPayment); + LDKBolt12OfferContext payment_context_var = obj->bolt12_offer_payment.payment_context; + int64_t payment_context_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_var); + payment_context_ref = tag_ptr(payment_context_var.inner, false); + return payment_context_ref; +} +int64_t CS_LDK_LDKPaymentPurpose_Bolt12RefundPayment_get_payment_preimage(int64_t ptr) { LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); - CHECK(obj->tag == LDKPaymentPurpose_InvoicePayment); - int64_t payment_preimage_ref = tag_ptr(&obj->invoice_payment.payment_preimage, false); + CHECK(obj->tag == LDKPaymentPurpose_Bolt12RefundPayment); + int64_t payment_preimage_ref = tag_ptr(&obj->bolt12_refund_payment.payment_preimage, false); return payment_preimage_ref; } -int8_tArray CS_LDK_LDKPaymentPurpose_InvoicePayment_get_payment_secret(int64_t ptr) { +int8_tArray CS_LDK_LDKPaymentPurpose_Bolt12RefundPayment_get_payment_secret(int64_t ptr) { LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); - CHECK(obj->tag == LDKPaymentPurpose_InvoicePayment); + CHECK(obj->tag == LDKPaymentPurpose_Bolt12RefundPayment); int8_tArray payment_secret_arr = init_int8_tArray(32, __LINE__); - memcpy(payment_secret_arr->elems, obj->invoice_payment.payment_secret.data, 32); + memcpy(payment_secret_arr->elems, obj->bolt12_refund_payment.payment_secret.data, 32); return payment_secret_arr; } +int64_t CS_LDK_LDKPaymentPurpose_Bolt12RefundPayment_get_payment_context(int64_t ptr) { + LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); + CHECK(obj->tag == LDKPaymentPurpose_Bolt12RefundPayment); + LDKBolt12RefundContext payment_context_var = obj->bolt12_refund_payment.payment_context; + int64_t payment_context_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_var); + payment_context_ref = tag_ptr(payment_context_var.inner, false); + return payment_context_ref; +} int8_tArray CS_LDK_LDKPaymentPurpose_SpontaneousPayment_get_spontaneous_payment(int64_t ptr) { LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr); CHECK(obj->tag == LDKPaymentPurpose_SpontaneousPayment); @@ -10724,38 +11430,6 @@ int64_t CS_LDK_CResult_COption_PathFailureZDecodeErrorZ_get_err(int64_t owner) return ret_ref; } -uint32_t CS_LDK_LDKClosureReason_ty_from_ptr(int64_t ptr) { - LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr); - switch(obj->tag) { - case LDKClosureReason_CounterpartyForceClosed: return 0; - case LDKClosureReason_HolderForceClosed: return 1; - case LDKClosureReason_CooperativeClosure: return 2; - case LDKClosureReason_CommitmentTxConfirmed: return 3; - case LDKClosureReason_FundingTimedOut: return 4; - case LDKClosureReason_ProcessingError: return 5; - case LDKClosureReason_DisconnectedPeer: return 6; - case LDKClosureReason_OutdatedChannelManager: return 7; - case LDKClosureReason_CounterpartyCoopClosedUnfundedChannel: return 8; - case LDKClosureReason_FundingBatchClosure: return 9; - default: abort(); - } -} -int64_t CS_LDK_LDKClosureReason_CounterpartyForceClosed_get_peer_msg(int64_t ptr) { - LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr); - CHECK(obj->tag == LDKClosureReason_CounterpartyForceClosed); - LDKUntrustedString peer_msg_var = obj->counterparty_force_closed.peer_msg; - int64_t peer_msg_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(peer_msg_var); - peer_msg_ref = tag_ptr(peer_msg_var.inner, false); - return peer_msg_ref; -} -jstring CS_LDK_LDKClosureReason_ProcessingError_get_err(int64_t ptr) { - LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr); - CHECK(obj->tag == LDKClosureReason_ProcessingError); - LDKStr err_str = obj->processing_error.err; - jstring err_conv = str_ref_to_cs(err_str.chars, err_str.len); - return err_conv; -} uint32_t CS_LDK_LDKCOption_ClosureReasonZ_ty_from_ptr(int64_t ptr) { LDKCOption_ClosureReasonZ *obj = (LDKCOption_ClosureReasonZ*)untag_ptr(ptr); switch(obj->tag) { @@ -10800,7 +11474,8 @@ uint32_t CS_LDK_LDKHTLCDestination_ty_from_ptr(int64_t ptr) { case LDKHTLCDestination_NextHopChannel: return 0; case LDKHTLCDestination_UnknownNextHop: return 1; case LDKHTLCDestination_InvalidForward: return 2; - case LDKHTLCDestination_FailedPayment: return 3; + case LDKHTLCDestination_InvalidOnion: return 3; + case LDKHTLCDestination_FailedPayment: return 4; default: abort(); } } @@ -10811,12 +11486,14 @@ int8_tArray CS_LDK_LDKHTLCDestination_NextHopChannel_get_node_id(int64_t ptr) { memcpy(node_id_arr->elems, obj->next_hop_channel.node_id.compressed_form, 33); return node_id_arr; } -int8_tArray CS_LDK_LDKHTLCDestination_NextHopChannel_get_channel_id(int64_t ptr) { +int64_t CS_LDK_LDKHTLCDestination_NextHopChannel_get_channel_id(int64_t ptr) { LDKHTLCDestination *obj = (LDKHTLCDestination*)untag_ptr(ptr); CHECK(obj->tag == LDKHTLCDestination_NextHopChannel); - int8_tArray channel_id_arr = init_int8_tArray(32, __LINE__); - memcpy(channel_id_arr->elems, obj->next_hop_channel.channel_id.data, 32); - return channel_id_arr; + LDKChannelId channel_id_var = obj->next_hop_channel.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; } int64_t CS_LDK_LDKHTLCDestination_UnknownNextHop_get_requested_forward_scid(int64_t ptr) { LDKHTLCDestination *obj = (LDKHTLCDestination*)untag_ptr(ptr); @@ -10941,6 +11618,22 @@ uint32_t CS_LDK_LDKBumpTransactionEvent_ty_from_ptr(int64_t ptr) { default: abort(); } } +int64_t CS_LDK_LDKBumpTransactionEvent_ChannelClose_get_channel_id(int64_t ptr) { + LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr); + CHECK(obj->tag == LDKBumpTransactionEvent_ChannelClose); + LDKChannelId channel_id_var = obj->channel_close.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; +} +int8_tArray CS_LDK_LDKBumpTransactionEvent_ChannelClose_get_counterparty_node_id(int64_t ptr) { + LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr); + CHECK(obj->tag == LDKBumpTransactionEvent_ChannelClose); + int8_tArray counterparty_node_id_arr = init_int8_tArray(33, __LINE__); + memcpy(counterparty_node_id_arr->elems, obj->channel_close.counterparty_node_id.compressed_form, 33); + return counterparty_node_id_arr; +} int8_tArray CS_LDK_LDKBumpTransactionEvent_ChannelClose_get_claim_id(int64_t ptr) { LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr); CHECK(obj->tag == LDKBumpTransactionEvent_ChannelClose); @@ -10994,6 +11687,22 @@ int64_tArray CS_LDK_LDKBumpTransactionEvent_ChannelClose_get_pending_htlcs(int64 return pending_htlcs_arr; } +int64_t CS_LDK_LDKBumpTransactionEvent_HTLCResolution_get_channel_id(int64_t ptr) { + LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr); + CHECK(obj->tag == LDKBumpTransactionEvent_HTLCResolution); + LDKChannelId channel_id_var = obj->htlc_resolution.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; +} +int8_tArray CS_LDK_LDKBumpTransactionEvent_HTLCResolution_get_counterparty_node_id(int64_t ptr) { + LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr); + CHECK(obj->tag == LDKBumpTransactionEvent_HTLCResolution); + int8_tArray counterparty_node_id_arr = init_int8_tArray(33, __LINE__); + memcpy(counterparty_node_id_arr->elems, obj->htlc_resolution.counterparty_node_id.compressed_form, 33); + return counterparty_node_id_arr; +} int8_tArray CS_LDK_LDKBumpTransactionEvent_HTLCResolution_get_claim_id(int64_t ptr) { LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr); CHECK(obj->tag == LDKBumpTransactionEvent_HTLCResolution); @@ -11058,12 +11767,14 @@ uint32_t CS_LDK_LDKEvent_ty_from_ptr(int64_t ptr) { default: abort(); } } -int8_tArray CS_LDK_LDKEvent_FundingGenerationReady_get_temporary_channel_id(int64_t ptr) { +int64_t CS_LDK_LDKEvent_FundingGenerationReady_get_temporary_channel_id(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); CHECK(obj->tag == LDKEvent_FundingGenerationReady); - int8_tArray temporary_channel_id_arr = init_int8_tArray(32, __LINE__); - memcpy(temporary_channel_id_arr->elems, obj->funding_generation_ready.temporary_channel_id.data, 32); - return temporary_channel_id_arr; + LDKChannelId temporary_channel_id_var = obj->funding_generation_ready.temporary_channel_id; + int64_t temporary_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_var); + temporary_channel_id_ref = tag_ptr(temporary_channel_id_var.inner, false); + return temporary_channel_id_ref; } int8_tArray CS_LDK_LDKEvent_FundingGenerationReady_get_counterparty_node_id(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); @@ -11137,7 +11848,10 @@ int64_t CS_LDK_LDKEvent_PaymentClaimable_get_purpose(int64_t ptr) { int64_t CS_LDK_LDKEvent_PaymentClaimable_get_via_channel_id(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); CHECK(obj->tag == LDKEvent_PaymentClaimable); - int64_t via_channel_id_ref = tag_ptr(&obj->payment_claimable.via_channel_id, false); + LDKChannelId via_channel_id_var = obj->payment_claimable.via_channel_id; + int64_t via_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(via_channel_id_var); + via_channel_id_ref = tag_ptr(via_channel_id_var.inner, false); return via_channel_id_ref; } int64_t CS_LDK_LDKEvent_PaymentClaimable_get_via_user_channel_id(int64_t ptr) { @@ -11444,26 +12158,53 @@ int64_tArray CS_LDK_LDKEvent_SpendableOutputs_get_outputs(int64_t ptr) { int64_t CS_LDK_LDKEvent_SpendableOutputs_get_channel_id(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); CHECK(obj->tag == LDKEvent_SpendableOutputs); - int64_t channel_id_ref = tag_ptr(&obj->spendable_outputs.channel_id, false); + LDKChannelId channel_id_var = obj->spendable_outputs.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); return channel_id_ref; } int64_t CS_LDK_LDKEvent_PaymentForwarded_get_prev_channel_id(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); CHECK(obj->tag == LDKEvent_PaymentForwarded); - int64_t prev_channel_id_ref = tag_ptr(&obj->payment_forwarded.prev_channel_id, false); + LDKChannelId prev_channel_id_var = obj->payment_forwarded.prev_channel_id; + int64_t prev_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_var); + prev_channel_id_ref = tag_ptr(prev_channel_id_var.inner, false); return prev_channel_id_ref; } int64_t CS_LDK_LDKEvent_PaymentForwarded_get_next_channel_id(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); CHECK(obj->tag == LDKEvent_PaymentForwarded); - int64_t next_channel_id_ref = tag_ptr(&obj->payment_forwarded.next_channel_id, false); + LDKChannelId next_channel_id_var = obj->payment_forwarded.next_channel_id; + int64_t next_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(next_channel_id_var); + next_channel_id_ref = tag_ptr(next_channel_id_var.inner, false); return next_channel_id_ref; } -int64_t CS_LDK_LDKEvent_PaymentForwarded_get_fee_earned_msat(int64_t ptr) { +int64_t CS_LDK_LDKEvent_PaymentForwarded_get_prev_user_channel_id(int64_t ptr) { + LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); + CHECK(obj->tag == LDKEvent_PaymentForwarded); + int64_t prev_user_channel_id_ref = tag_ptr(&obj->payment_forwarded.prev_user_channel_id, false); + return prev_user_channel_id_ref; +} +int64_t CS_LDK_LDKEvent_PaymentForwarded_get_next_user_channel_id(int64_t ptr) { + LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); + CHECK(obj->tag == LDKEvent_PaymentForwarded); + int64_t next_user_channel_id_ref = tag_ptr(&obj->payment_forwarded.next_user_channel_id, false); + return next_user_channel_id_ref; +} +int64_t CS_LDK_LDKEvent_PaymentForwarded_get_total_fee_earned_msat(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); CHECK(obj->tag == LDKEvent_PaymentForwarded); - int64_t fee_earned_msat_ref = tag_ptr(&obj->payment_forwarded.fee_earned_msat, false); - return fee_earned_msat_ref; + int64_t total_fee_earned_msat_ref = tag_ptr(&obj->payment_forwarded.total_fee_earned_msat, false); + return total_fee_earned_msat_ref; +} +int64_t CS_LDK_LDKEvent_PaymentForwarded_get_skimmed_fee_msat(int64_t ptr) { + LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); + CHECK(obj->tag == LDKEvent_PaymentForwarded); + int64_t skimmed_fee_msat_ref = tag_ptr(&obj->payment_forwarded.skimmed_fee_msat, false); + return skimmed_fee_msat_ref; } jboolean CS_LDK_LDKEvent_PaymentForwarded_get_claim_from_onchain_tx(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); @@ -11477,12 +12218,14 @@ int64_t CS_LDK_LDKEvent_PaymentForwarded_get_outbound_amount_forwarded_msat(int6 int64_t outbound_amount_forwarded_msat_ref = tag_ptr(&obj->payment_forwarded.outbound_amount_forwarded_msat, false); return outbound_amount_forwarded_msat_ref; } -int8_tArray CS_LDK_LDKEvent_ChannelPending_get_channel_id(int64_t ptr) { +int64_t CS_LDK_LDKEvent_ChannelPending_get_channel_id(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); CHECK(obj->tag == LDKEvent_ChannelPending); - int8_tArray channel_id_arr = init_int8_tArray(32, __LINE__); - memcpy(channel_id_arr->elems, obj->channel_pending.channel_id.data, 32); - return channel_id_arr; + LDKChannelId channel_id_var = obj->channel_pending.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; } int8_tArray CS_LDK_LDKEvent_ChannelPending_get_user_channel_id(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); @@ -11494,7 +12237,10 @@ int8_tArray CS_LDK_LDKEvent_ChannelPending_get_user_channel_id(int64_t ptr) { int64_t CS_LDK_LDKEvent_ChannelPending_get_former_temporary_channel_id(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); CHECK(obj->tag == LDKEvent_ChannelPending); - int64_t former_temporary_channel_id_ref = tag_ptr(&obj->channel_pending.former_temporary_channel_id, false); + LDKChannelId former_temporary_channel_id_var = obj->channel_pending.former_temporary_channel_id; + int64_t former_temporary_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(former_temporary_channel_id_var); + former_temporary_channel_id_ref = tag_ptr(former_temporary_channel_id_var.inner, false); return former_temporary_channel_id_ref; } int8_tArray CS_LDK_LDKEvent_ChannelPending_get_counterparty_node_id(int64_t ptr) { @@ -11513,12 +12259,23 @@ int64_t CS_LDK_LDKEvent_ChannelPending_get_funding_txo(int64_t ptr) { funding_txo_ref = tag_ptr(funding_txo_var.inner, false); return funding_txo_ref; } -int8_tArray CS_LDK_LDKEvent_ChannelReady_get_channel_id(int64_t ptr) { +int64_t CS_LDK_LDKEvent_ChannelPending_get_channel_type(int64_t ptr) { + LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); + CHECK(obj->tag == LDKEvent_ChannelPending); + LDKChannelTypeFeatures channel_type_var = obj->channel_pending.channel_type; + int64_t channel_type_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_var); + channel_type_ref = tag_ptr(channel_type_var.inner, false); + return channel_type_ref; +} +int64_t CS_LDK_LDKEvent_ChannelReady_get_channel_id(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); CHECK(obj->tag == LDKEvent_ChannelReady); - int8_tArray channel_id_arr = init_int8_tArray(32, __LINE__); - memcpy(channel_id_arr->elems, obj->channel_ready.channel_id.data, 32); - return channel_id_arr; + LDKChannelId channel_id_var = obj->channel_ready.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; } int8_tArray CS_LDK_LDKEvent_ChannelReady_get_user_channel_id(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); @@ -11543,12 +12300,14 @@ int64_t CS_LDK_LDKEvent_ChannelReady_get_channel_type(int64_t ptr) { channel_type_ref = tag_ptr(channel_type_var.inner, false); return channel_type_ref; } -int8_tArray CS_LDK_LDKEvent_ChannelClosed_get_channel_id(int64_t ptr) { +int64_t CS_LDK_LDKEvent_ChannelClosed_get_channel_id(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); CHECK(obj->tag == LDKEvent_ChannelClosed); - int8_tArray channel_id_arr = init_int8_tArray(32, __LINE__); - memcpy(channel_id_arr->elems, obj->channel_closed.channel_id.data, 32); - return channel_id_arr; + LDKChannelId channel_id_var = obj->channel_closed.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; } int8_tArray CS_LDK_LDKEvent_ChannelClosed_get_user_channel_id(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); @@ -11585,12 +12344,14 @@ int64_t CS_LDK_LDKEvent_ChannelClosed_get_channel_funding_txo(int64_t ptr) { channel_funding_txo_ref = tag_ptr(channel_funding_txo_var.inner, false); return channel_funding_txo_ref; } -int8_tArray CS_LDK_LDKEvent_DiscardFunding_get_channel_id(int64_t ptr) { +int64_t CS_LDK_LDKEvent_DiscardFunding_get_channel_id(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); CHECK(obj->tag == LDKEvent_DiscardFunding); - int8_tArray channel_id_arr = init_int8_tArray(32, __LINE__); - memcpy(channel_id_arr->elems, obj->discard_funding.channel_id.data, 32); - return channel_id_arr; + LDKChannelId channel_id_var = obj->discard_funding.channel_id; + int64_t channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); + channel_id_ref = tag_ptr(channel_id_var.inner, false); + return channel_id_ref; } int8_tArray CS_LDK_LDKEvent_DiscardFunding_get_transaction(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); @@ -11600,12 +12361,14 @@ int8_tArray CS_LDK_LDKEvent_DiscardFunding_get_transaction(int64_t ptr) { memcpy(transaction_arr->elems, transaction_var.data, transaction_var.datalen); return transaction_arr; } -int8_tArray CS_LDK_LDKEvent_OpenChannelRequest_get_temporary_channel_id(int64_t ptr) { +int64_t CS_LDK_LDKEvent_OpenChannelRequest_get_temporary_channel_id(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); CHECK(obj->tag == LDKEvent_OpenChannelRequest); - int8_tArray temporary_channel_id_arr = init_int8_tArray(32, __LINE__); - memcpy(temporary_channel_id_arr->elems, obj->open_channel_request.temporary_channel_id.data, 32); - return temporary_channel_id_arr; + LDKChannelId temporary_channel_id_var = obj->open_channel_request.temporary_channel_id; + int64_t temporary_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_var); + temporary_channel_id_ref = tag_ptr(temporary_channel_id_var.inner, false); + return temporary_channel_id_ref; } int8_tArray CS_LDK_LDKEvent_OpenChannelRequest_get_counterparty_node_id(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); @@ -11635,12 +12398,14 @@ int64_t CS_LDK_LDKEvent_OpenChannelRequest_get_channel_type(int64_t ptr) { channel_type_ref = tag_ptr(channel_type_var.inner, false); return channel_type_ref; } -int8_tArray CS_LDK_LDKEvent_HTLCHandlingFailed_get_prev_channel_id(int64_t ptr) { +int64_t CS_LDK_LDKEvent_HTLCHandlingFailed_get_prev_channel_id(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); CHECK(obj->tag == LDKEvent_HTLCHandlingFailed); - int8_tArray prev_channel_id_arr = init_int8_tArray(32, __LINE__); - memcpy(prev_channel_id_arr->elems, obj->htlc_handling_failed.prev_channel_id.data, 32); - return prev_channel_id_arr; + LDKChannelId prev_channel_id_var = obj->htlc_handling_failed.prev_channel_id; + int64_t prev_channel_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_var); + prev_channel_id_ref = tag_ptr(prev_channel_id_var.inner, false); + return prev_channel_id_ref; } int64_t CS_LDK_LDKEvent_HTLCHandlingFailed_get_failed_next_destination(int64_t ptr) { LDKEvent *obj = (LDKEvent*)untag_ptr(ptr); @@ -12178,6 +12943,32 @@ int64_t CS_LDK_CResult_UntrustedStringDecodeErrorZ_get_err(int64_t owner) { return ret_ref; } +static inline struct LDKChannelId CResult_ChannelIdDecodeErrorZ_get_ok(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR owner){ + LDKChannelId ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_ChannelIdDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_ChannelIdDecodeErrorZ* owner_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(owner); + LDKChannelId ret_var = CResult_ChannelIdDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_ChannelIdDecodeErrorZ_get_err(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +int64_t CS_LDK_CResult_ChannelIdDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_ChannelIdDecodeErrorZ* owner_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_ChannelIdDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + static inline struct LDKThirtyTwoBytes C2Tuple__u832u16Z_get_a(LDKC2Tuple__u832u16Z *NONNULL_PTR owner){ return ThirtyTwoBytes_clone(&owner->a); } @@ -12249,6 +13040,129 @@ int64_t CS_LDK_CResult_PaymentConstraintsDecodeErrorZ_get_err(int64_t owner) { return ret_ref; } +static inline struct LDKPaymentContext CResult_PaymentContextDecodeErrorZ_get_ok(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return PaymentContext_clone(&*owner->contents.result); +} +int64_t CS_LDK_CResult_PaymentContextDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_PaymentContextDecodeErrorZ* owner_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(owner); + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = CResult_PaymentContextDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_PaymentContextDecodeErrorZ_get_err(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +int64_t CS_LDK_CResult_PaymentContextDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_PaymentContextDecodeErrorZ* owner_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_PaymentContextDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKUnknownPaymentContext CResult_UnknownPaymentContextDecodeErrorZ_get_ok(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR owner){ + LDKUnknownPaymentContext ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* owner_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(owner); + LDKUnknownPaymentContext ret_var = CResult_UnknownPaymentContextDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_UnknownPaymentContextDecodeErrorZ_get_err(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +int64_t CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* owner_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_UnknownPaymentContextDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKBolt12OfferContext CResult_Bolt12OfferContextDecodeErrorZ_get_ok(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR owner){ + LDKBolt12OfferContext ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_Bolt12OfferContextDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(owner); + LDKBolt12OfferContext ret_var = CResult_Bolt12OfferContextDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_Bolt12OfferContextDecodeErrorZ_get_err(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +int64_t CS_LDK_CResult_Bolt12OfferContextDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_Bolt12OfferContextDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKBolt12RefundContext CResult_Bolt12RefundContextDecodeErrorZ_get_ok(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR owner){ + LDKBolt12RefundContext ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_Bolt12RefundContextDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(owner); + LDKBolt12RefundContext ret_var = CResult_Bolt12RefundContextDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_Bolt12RefundContextDecodeErrorZ_get_err(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +int64_t CS_LDK_CResult_Bolt12RefundContextDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_Bolt12RefundContextDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKStr CResult_StrSecp256k1ErrorZ_get_ok(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return *owner->contents.result; +} +jstring CS_LDK_CResult_StrSecp256k1ErrorZ_get_ok(int64_t owner) { + LDKCResult_StrSecp256k1ErrorZ* owner_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(owner); + LDKStr ret_str = CResult_StrSecp256k1ErrorZ_get_ok(owner_conv); + jstring ret_conv = str_ref_to_cs(ret_str.chars, ret_str.len); + return ret_conv; +} + +static inline enum LDKSecp256k1Error CResult_StrSecp256k1ErrorZ_get_err(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return *owner->contents.err; +} +int32_t CS_LDK_CResult_StrSecp256k1ErrorZ_get_err(int64_t owner) { + LDKCResult_StrSecp256k1ErrorZ* owner_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(owner); + int32_t ret_conv = LDKSecp256k1Error_to_cs(CResult_StrSecp256k1ErrorZ_get_err(owner_conv)); + return ret_conv; +} + static inline struct LDKThirtyTwoBytes C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){ return ThirtyTwoBytes_clone(&owner->a); } @@ -12307,27 +13221,6 @@ void CS_LDK_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZN CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(owner_conv); } -static inline struct LDKStr CResult_StrSecp256k1ErrorZ_get_ok(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner){ -CHECK(owner->result_ok); - return *owner->contents.result; -} -jstring CS_LDK_CResult_StrSecp256k1ErrorZ_get_ok(int64_t owner) { - LDKCResult_StrSecp256k1ErrorZ* owner_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(owner); - LDKStr ret_str = CResult_StrSecp256k1ErrorZ_get_ok(owner_conv); - jstring ret_conv = str_ref_to_cs(ret_str.chars, ret_str.len); - return ret_conv; -} - -static inline enum LDKSecp256k1Error CResult_StrSecp256k1ErrorZ_get_err(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return *owner->contents.err; -} -int32_t CS_LDK_CResult_StrSecp256k1ErrorZ_get_err(int64_t owner) { - LDKCResult_StrSecp256k1ErrorZ* owner_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(owner); - int32_t ret_conv = LDKSecp256k1Error_to_cs(CResult_StrSecp256k1ErrorZ_get_err(owner_conv)); - return ret_conv; -} - static inline struct LDKPublicKey C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_a(LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ *NONNULL_PTR owner){ return owner->a; } @@ -12374,7 +13267,8 @@ uint32_t CS_LDK_LDKSendError_ty_from_ptr(int64_t ptr) { case LDKSendError_InvalidMessage: return 5; case LDKSendError_BufferFull: return 6; case LDKSendError_GetNodeIdFailed: return 7; - case LDKSendError_BlindedPathAdvanceFailed: return 8; + case LDKSendError_UnresolvedIntroductionNode: return 8; + case LDKSendError_BlindedPathAdvanceFailed: return 9; default: abort(); } } @@ -12414,6 +13308,27 @@ int64_t CS_LDK_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZ return ret_ref; } +uint32_t CS_LDK_LDKNextMessageHop_ty_from_ptr(int64_t ptr) { + LDKNextMessageHop *obj = (LDKNextMessageHop*)untag_ptr(ptr); + switch(obj->tag) { + case LDKNextMessageHop_NodeId: return 0; + case LDKNextMessageHop_ShortChannelId: return 1; + default: abort(); + } +} +int8_tArray CS_LDK_LDKNextMessageHop_NodeId_get_node_id(int64_t ptr) { + LDKNextMessageHop *obj = (LDKNextMessageHop*)untag_ptr(ptr); + CHECK(obj->tag == LDKNextMessageHop_NodeId); + int8_tArray node_id_arr = init_int8_tArray(33, __LINE__); + memcpy(node_id_arr->elems, obj->node_id.compressed_form, 33); + return node_id_arr; +} +int64_t CS_LDK_LDKNextMessageHop_ShortChannelId_get_short_channel_id(int64_t ptr) { + LDKNextMessageHop *obj = (LDKNextMessageHop*)untag_ptr(ptr); + CHECK(obj->tag == LDKNextMessageHop_ShortChannelId); + int64_t short_channel_id_conv = obj->short_channel_id; + return short_channel_id_conv; +} uint32_t CS_LDK_LDKParsedOnionMessageContents_ty_from_ptr(int64_t ptr) { LDKParsedOnionMessageContents *obj = (LDKParsedOnionMessageContents*)untag_ptr(ptr); switch(obj->tag) { @@ -12443,12 +13358,11 @@ uint32_t CS_LDK_LDKPeeledOnion_ty_from_ptr(int64_t ptr) { default: abort(); } } -int8_tArray CS_LDK_LDKPeeledOnion_Forward_get__0(int64_t ptr) { +int64_t CS_LDK_LDKPeeledOnion_Forward_get__0(int64_t ptr) { LDKPeeledOnion *obj = (LDKPeeledOnion*)untag_ptr(ptr); CHECK(obj->tag == LDKPeeledOnion_Forward); - int8_tArray _0_arr = init_int8_tArray(33, __LINE__); - memcpy(_0_arr->elems, obj->forward._0.compressed_form, 33); - return _0_arr; + int64_t _0_ref = tag_ptr(&obj->forward._0, false); + return _0_ref; } int64_t CS_LDK_LDKPeeledOnion_Forward_get__1(int64_t ptr) { LDKPeeledOnion *obj = (LDKPeeledOnion*)untag_ptr(ptr); @@ -12669,158 +13583,122 @@ int64_t CS_LDK_CResult_InvoiceErrorDecodeErrorZ_get_err(int64_t owner) { return ret_ref; } -static inline struct LDKDelayedPaymentBasepoint CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){ - LDKDelayedPaymentBasepoint ret = *owner->contents.result; - ret.is_owned = false; - return ret; -} -int64_t CS_LDK_CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(int64_t owner) { - LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner); - LDKDelayedPaymentBasepoint ret_var = CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(owner_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -static inline struct LDKDecodeError CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return DecodeError_clone(&*owner->contents.err); -} -int64_t CS_LDK_CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(int64_t owner) { - LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner); - LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(owner_conv); - int64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -static inline struct LDKDelayedPaymentKey CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){ - LDKDelayedPaymentKey ret = *owner->contents.result; - ret.is_owned = false; - return ret; -} -int64_t CS_LDK_CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(int64_t owner) { - LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner); - LDKDelayedPaymentKey ret_var = CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(owner_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -static inline struct LDKDecodeError CResult_DelayedPaymentKeyDecodeErrorZ_get_err(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return DecodeError_clone(&*owner->contents.err); -} -int64_t CS_LDK_CResult_DelayedPaymentKeyDecodeErrorZ_get_err(int64_t owner) { - LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner); - LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_DelayedPaymentKeyDecodeErrorZ_get_err(owner_conv); - int64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -static inline struct LDKHtlcBasepoint CResult_HtlcBasepointDecodeErrorZ_get_ok(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){ - LDKHtlcBasepoint ret = *owner->contents.result; +static inline struct LDKTrackedSpendableOutput CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR owner){ + LDKTrackedSpendableOutput ret = *owner->contents.result; ret.is_owned = false; return ret; } -int64_t CS_LDK_CResult_HtlcBasepointDecodeErrorZ_get_ok(int64_t owner) { - LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner); - LDKHtlcBasepoint ret_var = CResult_HtlcBasepointDecodeErrorZ_get_ok(owner_conv); +int64_t CS_LDK_CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* owner_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(owner); + LDKTrackedSpendableOutput ret_var = CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(owner_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -static inline struct LDKDecodeError CResult_HtlcBasepointDecodeErrorZ_get_err(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){ +static inline struct LDKDecodeError CResult_TrackedSpendableOutputDecodeErrorZ_get_err(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR owner){ CHECK(!owner->result_ok); return DecodeError_clone(&*owner->contents.err); } -int64_t CS_LDK_CResult_HtlcBasepointDecodeErrorZ_get_err(int64_t owner) { - LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner); +int64_t CS_LDK_CResult_TrackedSpendableOutputDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* owner_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(owner); LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_HtlcBasepointDecodeErrorZ_get_err(owner_conv); + *ret_copy = CResult_TrackedSpendableOutputDecodeErrorZ_get_err(owner_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -static inline struct LDKHtlcKey CResult_HtlcKeyDecodeErrorZ_get_ok(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){ - LDKHtlcKey ret = *owner->contents.result; - ret.is_owned = false; - return ret; -} -int64_t CS_LDK_CResult_HtlcKeyDecodeErrorZ_get_ok(int64_t owner) { - LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner); - LDKHtlcKey ret_var = CResult_HtlcKeyDecodeErrorZ_get_ok(owner_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -static inline struct LDKDecodeError CResult_HtlcKeyDecodeErrorZ_get_err(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return DecodeError_clone(&*owner->contents.err); -} -int64_t CS_LDK_CResult_HtlcKeyDecodeErrorZ_get_err(int64_t owner) { - LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner); - LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_HtlcKeyDecodeErrorZ_get_err(owner_conv); - int64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; +uint32_t CS_LDK_LDKOutputSpendStatus_ty_from_ptr(int64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + switch(obj->tag) { + case LDKOutputSpendStatus_PendingInitialBroadcast: return 0; + case LDKOutputSpendStatus_PendingFirstConfirmation: return 1; + case LDKOutputSpendStatus_PendingThresholdConfirmations: return 2; + default: abort(); + } } - -static inline struct LDKRevocationBasepoint CResult_RevocationBasepointDecodeErrorZ_get_ok(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){ - LDKRevocationBasepoint ret = *owner->contents.result; - ret.is_owned = false; - return ret; +int64_t CS_LDK_LDKOutputSpendStatus_PendingInitialBroadcast_get_delayed_until_height(int64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + CHECK(obj->tag == LDKOutputSpendStatus_PendingInitialBroadcast); + int64_t delayed_until_height_ref = tag_ptr(&obj->pending_initial_broadcast.delayed_until_height, false); + return delayed_until_height_ref; +} +int8_tArray CS_LDK_LDKOutputSpendStatus_PendingFirstConfirmation_get_first_broadcast_hash(int64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + CHECK(obj->tag == LDKOutputSpendStatus_PendingFirstConfirmation); + int8_tArray first_broadcast_hash_arr = init_int8_tArray(32, __LINE__); + memcpy(first_broadcast_hash_arr->elems, obj->pending_first_confirmation.first_broadcast_hash.data, 32); + return first_broadcast_hash_arr; +} +int32_t CS_LDK_LDKOutputSpendStatus_PendingFirstConfirmation_get_latest_broadcast_height(int64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + CHECK(obj->tag == LDKOutputSpendStatus_PendingFirstConfirmation); + int32_t latest_broadcast_height_conv = obj->pending_first_confirmation.latest_broadcast_height; + return latest_broadcast_height_conv; +} +int8_tArray CS_LDK_LDKOutputSpendStatus_PendingFirstConfirmation_get_latest_spending_tx(int64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + CHECK(obj->tag == LDKOutputSpendStatus_PendingFirstConfirmation); + LDKTransaction latest_spending_tx_var = obj->pending_first_confirmation.latest_spending_tx; + int8_tArray latest_spending_tx_arr = init_int8_tArray(latest_spending_tx_var.datalen, __LINE__); + memcpy(latest_spending_tx_arr->elems, latest_spending_tx_var.data, latest_spending_tx_var.datalen); + return latest_spending_tx_arr; +} +int8_tArray CS_LDK_LDKOutputSpendStatus_PendingThresholdConfirmations_get_first_broadcast_hash(int64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + CHECK(obj->tag == LDKOutputSpendStatus_PendingThresholdConfirmations); + int8_tArray first_broadcast_hash_arr = init_int8_tArray(32, __LINE__); + memcpy(first_broadcast_hash_arr->elems, obj->pending_threshold_confirmations.first_broadcast_hash.data, 32); + return first_broadcast_hash_arr; +} +int32_t CS_LDK_LDKOutputSpendStatus_PendingThresholdConfirmations_get_latest_broadcast_height(int64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + CHECK(obj->tag == LDKOutputSpendStatus_PendingThresholdConfirmations); + int32_t latest_broadcast_height_conv = obj->pending_threshold_confirmations.latest_broadcast_height; + return latest_broadcast_height_conv; +} +int8_tArray CS_LDK_LDKOutputSpendStatus_PendingThresholdConfirmations_get_latest_spending_tx(int64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + CHECK(obj->tag == LDKOutputSpendStatus_PendingThresholdConfirmations); + LDKTransaction latest_spending_tx_var = obj->pending_threshold_confirmations.latest_spending_tx; + int8_tArray latest_spending_tx_arr = init_int8_tArray(latest_spending_tx_var.datalen, __LINE__); + memcpy(latest_spending_tx_arr->elems, latest_spending_tx_var.data, latest_spending_tx_var.datalen); + return latest_spending_tx_arr; +} +int32_t CS_LDK_LDKOutputSpendStatus_PendingThresholdConfirmations_get_confirmation_height(int64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + CHECK(obj->tag == LDKOutputSpendStatus_PendingThresholdConfirmations); + int32_t confirmation_height_conv = obj->pending_threshold_confirmations.confirmation_height; + return confirmation_height_conv; } -int64_t CS_LDK_CResult_RevocationBasepointDecodeErrorZ_get_ok(int64_t owner) { - LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner); - LDKRevocationBasepoint ret_var = CResult_RevocationBasepointDecodeErrorZ_get_ok(owner_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; +int8_tArray CS_LDK_LDKOutputSpendStatus_PendingThresholdConfirmations_get_confirmation_hash(int64_t ptr) { + LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr); + CHECK(obj->tag == LDKOutputSpendStatus_PendingThresholdConfirmations); + int8_tArray confirmation_hash_arr = init_int8_tArray(32, __LINE__); + memcpy(confirmation_hash_arr->elems, obj->pending_threshold_confirmations.confirmation_hash.data, 32); + return confirmation_hash_arr; } - -static inline struct LDKDecodeError CResult_RevocationBasepointDecodeErrorZ_get_err(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return DecodeError_clone(&*owner->contents.err); +static inline struct LDKOutputSpendStatus CResult_OutputSpendStatusDecodeErrorZ_get_ok(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return OutputSpendStatus_clone(&*owner->contents.result); } -int64_t CS_LDK_CResult_RevocationBasepointDecodeErrorZ_get_err(int64_t owner) { - LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner); - LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_RevocationBasepointDecodeErrorZ_get_err(owner_conv); +int64_t CS_LDK_CResult_OutputSpendStatusDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_OutputSpendStatusDecodeErrorZ* owner_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(owner); + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = CResult_OutputSpendStatusDecodeErrorZ_get_ok(owner_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -static inline struct LDKRevocationKey CResult_RevocationKeyDecodeErrorZ_get_ok(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){ - LDKRevocationKey ret = *owner->contents.result; - ret.is_owned = false; - return ret; -} -int64_t CS_LDK_CResult_RevocationKeyDecodeErrorZ_get_ok(int64_t owner) { - LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner); - LDKRevocationKey ret_var = CResult_RevocationKeyDecodeErrorZ_get_ok(owner_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -static inline struct LDKDecodeError CResult_RevocationKeyDecodeErrorZ_get_err(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){ +static inline struct LDKDecodeError CResult_OutputSpendStatusDecodeErrorZ_get_err(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR owner){ CHECK(!owner->result_ok); return DecodeError_clone(&*owner->contents.err); } -int64_t CS_LDK_CResult_RevocationKeyDecodeErrorZ_get_err(int64_t owner) { - LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner); +int64_t CS_LDK_CResult_OutputSpendStatusDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_OutputSpendStatusDecodeErrorZ* owner_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(owner); LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); - *ret_copy = CResult_RevocationKeyDecodeErrorZ_get_err(owner_conv); + *ret_copy = CResult_OutputSpendStatusDecodeErrorZ_get_err(owner_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -12921,85 +13799,62 @@ int64_t CS_LDK_LDKCOption_FilterZ_Some_get_some(int64_t ptr) { } return tag_ptr(some_ret, true); } -static inline struct LDKLockedChannelMonitor CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){ - LDKLockedChannelMonitor ret = *owner->contents.result; - ret.is_owned = false; - return ret; -} -int64_t CS_LDK_CResult_LockedChannelMonitorNoneZ_get_ok(int64_t owner) { - LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner); - LDKLockedChannelMonitor ret_var = CResult_LockedChannelMonitorNoneZ_get_ok(owner_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -static inline void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){ -CHECK(!owner->result_ok); - return *owner->contents.err; -} -void CS_LDK_CResult_LockedChannelMonitorNoneZ_get_err(int64_t owner) { - LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner); - CResult_LockedChannelMonitorNoneZ_get_err(owner_conv); -} - -static inline LDKCVec_OutPointZ CVec_OutPointZ_clone(const LDKCVec_OutPointZ *orig) { - LDKCVec_OutPointZ ret = { .data = MALLOC(sizeof(LDKOutPoint) * orig->datalen, "LDKCVec_OutPointZ clone bytes"), .datalen = orig->datalen }; +static inline LDKCVec_TrackedSpendableOutputZ CVec_TrackedSpendableOutputZ_clone(const LDKCVec_TrackedSpendableOutputZ *orig) { + LDKCVec_TrackedSpendableOutputZ ret = { .data = MALLOC(sizeof(LDKTrackedSpendableOutput) * orig->datalen, "LDKCVec_TrackedSpendableOutputZ clone bytes"), .datalen = orig->datalen }; for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = OutPoint_clone(&orig->data[i]); + ret.data[i] = TrackedSpendableOutput_clone(&orig->data[i]); } return ret; } -static inline LDKCVec_MonitorUpdateIdZ CVec_MonitorUpdateIdZ_clone(const LDKCVec_MonitorUpdateIdZ *orig) { - LDKCVec_MonitorUpdateIdZ ret = { .data = MALLOC(sizeof(LDKMonitorUpdateId) * orig->datalen, "LDKCVec_MonitorUpdateIdZ clone bytes"), .datalen = orig->datalen }; - for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = MonitorUpdateId_clone(&orig->data[i]); +typedef struct LDKChangeDestinationSource_JCalls { + atomic_size_t refcnt; + uint32_t instance_ptr; +} LDKChangeDestinationSource_JCalls; +static void LDKChangeDestinationSource_JCalls_free(void* this_arg) { + LDKChangeDestinationSource_JCalls *j_calls = (LDKChangeDestinationSource_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + FREE(j_calls); } - return ret; } -static inline struct LDKOutPoint C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){ - LDKOutPoint ret = owner->a; - ret.is_owned = false; - return ret; +LDKCResult_CVec_u8ZNoneZ get_change_destination_script_LDKChangeDestinationSource_jcall(const void* this_arg) { + LDKChangeDestinationSource_JCalls *j_calls = (LDKChangeDestinationSource_JCalls*) this_arg; + uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 58); + void* ret_ptr = untag_ptr(ret); + CHECK_ACCESS(ret_ptr); + LDKCResult_CVec_u8ZNoneZ ret_conv = *(LDKCResult_CVec_u8ZNoneZ*)(ret_ptr); + FREE(untag_ptr(ret)); + return ret_conv; } -int64_t CS_LDK_C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(int64_t owner) { - LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner); - LDKOutPoint ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(owner_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; +static void LDKChangeDestinationSource_JCalls_cloned(LDKChangeDestinationSource* new_obj) { + LDKChangeDestinationSource_JCalls *j_calls = (LDKChangeDestinationSource_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); } +static inline LDKChangeDestinationSource LDKChangeDestinationSource_init (int64_t o) { + LDKChangeDestinationSource_JCalls *calls = MALLOC(sizeof(LDKChangeDestinationSource_JCalls), "LDKChangeDestinationSource_JCalls"); + atomic_init(&calls->refcnt, 1); + calls->instance_ptr = o; -static inline struct LDKCVec_MonitorUpdateIdZ C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){ - return CVec_MonitorUpdateIdZ_clone(&owner->b); + LDKChangeDestinationSource ret = { + .this_arg = (void*) calls, + .get_change_destination_script = get_change_destination_script_LDKChangeDestinationSource_jcall, + .free = LDKChangeDestinationSource_JCalls_free, + }; + return ret; } -int64_tArray CS_LDK_C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(int64_t owner) { - LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner); - LDKCVec_MonitorUpdateIdZ ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(owner_conv); - int64_tArray ret_arr = NULL; - ret_arr = init_int64_tArray(ret_var.datalen, __LINE__); - int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8); - for (size_t r = 0; r < ret_var.datalen; r++) { - LDKMonitorUpdateId ret_conv_17_var = ret_var.data[r]; - int64_t ret_conv_17_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_17_var); - ret_conv_17_ref = tag_ptr(ret_conv_17_var.inner, ret_conv_17_var.is_owned); - ret_arr_ptr[r] = ret_conv_17_ref; - } - - FREE(ret_var.data); - return ret_arr; +uint64_t CS_LDK_LDKChangeDestinationSource_new(int32_t o) { + LDKChangeDestinationSource *res_ptr = MALLOC(sizeof(LDKChangeDestinationSource), "LDKChangeDestinationSource"); + *res_ptr = LDKChangeDestinationSource_init(o); + return tag_ptr(res_ptr, true); } - -static inline LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ CVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ_clone(const LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ *orig) { - LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ) * orig->datalen, "LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ clone bytes"), .datalen = orig->datalen }; - for (size_t i = 0; i < ret.datalen; i++) { - ret.data[i] = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_clone(&orig->data[i]); - } - return ret; +int64_t CS_LDK_ChangeDestinationSource_get_change_destination_script(int64_t this_arg) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKChangeDestinationSource* this_arg_conv = (LDKChangeDestinationSource*)this_arg_ptr; + LDKCResult_CVec_u8ZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_u8ZNoneZ), "LDKCResult_CVec_u8ZNoneZ"); + *ret_conv = (this_arg_conv->get_change_destination_script)(this_arg_conv->this_arg); + return tag_ptr(ret_conv, true); } + typedef struct LDKKVStore_JCalls { atomic_size_t refcnt; uint32_t instance_ptr; @@ -13021,7 +13876,7 @@ LDKCResult_CVec_u8ZIOErrorZ read_LDKKVStore_jcall(const void* this_arg, LDKStr p LDKStr key_str = key; jstring key_conv = str_ref_to_cs(key_str.chars, key_str.len); Str_free(key_str); - uint64_t ret = js_invoke_function_l_lll(j_calls->instance_ptr, 58, (int64_t)primary_namespace_conv, (int64_t)secondary_namespace_conv, (int64_t)key_conv); + uint64_t ret = js_invoke_function_l_lll(j_calls->instance_ptr, 59, (int64_t)primary_namespace_conv, (int64_t)secondary_namespace_conv, (int64_t)key_conv); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_CVec_u8ZIOErrorZ ret_conv = *(LDKCResult_CVec_u8ZIOErrorZ*)(ret_ptr); @@ -13042,7 +13897,7 @@ LDKCResult_NoneIOErrorZ write_LDKKVStore_jcall(const void* this_arg, LDKStr prim LDKu8slice buf_var = buf; int8_tArray buf_arr = init_int8_tArray(buf_var.datalen, __LINE__); memcpy(buf_arr->elems, buf_var.data, buf_var.datalen); - uint64_t ret = js_invoke_function_l_llll(j_calls->instance_ptr, 59, (int64_t)primary_namespace_conv, (int64_t)secondary_namespace_conv, (int64_t)key_conv, (int64_t)buf_arr); + uint64_t ret = js_invoke_function_l_llll(j_calls->instance_ptr, 60, (int64_t)primary_namespace_conv, (int64_t)secondary_namespace_conv, (int64_t)key_conv, (int64_t)buf_arr); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr); @@ -13061,7 +13916,7 @@ LDKCResult_NoneIOErrorZ remove_LDKKVStore_jcall(const void* this_arg, LDKStr pri jstring key_conv = str_ref_to_cs(key_str.chars, key_str.len); Str_free(key_str); jboolean lazy_conv = lazy; - uint64_t ret = js_invoke_function_l_lllb(j_calls->instance_ptr, 60, (int64_t)primary_namespace_conv, (int64_t)secondary_namespace_conv, (int64_t)key_conv, lazy_conv); + uint64_t ret = js_invoke_function_l_lllb(j_calls->instance_ptr, 61, (int64_t)primary_namespace_conv, (int64_t)secondary_namespace_conv, (int64_t)key_conv, lazy_conv); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr); @@ -13076,7 +13931,7 @@ LDKCResult_CVec_StrZIOErrorZ list_LDKKVStore_jcall(const void* this_arg, LDKStr LDKStr secondary_namespace_str = secondary_namespace; jstring secondary_namespace_conv = str_ref_to_cs(secondary_namespace_str.chars, secondary_namespace_str.len); Str_free(secondary_namespace_str); - uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 61, (int64_t)primary_namespace_conv, (int64_t)secondary_namespace_conv); + uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 62, (int64_t)primary_namespace_conv, (int64_t)secondary_namespace_conv); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_CVec_StrZIOErrorZ ret_conv = *(LDKCResult_CVec_StrZIOErrorZ*)(ret_ptr); @@ -13158,283 +14013,721 @@ int64_t CS_LDK_KVStore_list(int64_t this_arg, jstring primary_namespace, jstrin return tag_ptr(ret_conv, true); } -typedef struct LDKPersister_JCalls { +typedef struct LDKOutputSpender_JCalls { atomic_size_t refcnt; uint32_t instance_ptr; -} LDKPersister_JCalls; -static void LDKPersister_JCalls_free(void* this_arg) { - LDKPersister_JCalls *j_calls = (LDKPersister_JCalls*) this_arg; +} LDKOutputSpender_JCalls; +static void LDKOutputSpender_JCalls_free(void* this_arg) { + LDKOutputSpender_JCalls *j_calls = (LDKOutputSpender_JCalls*) this_arg; if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { FREE(j_calls); } } -LDKCResult_NoneIOErrorZ persist_manager_LDKPersister_jcall(const void* this_arg, const LDKChannelManager * channel_manager) { - LDKPersister_JCalls *j_calls = (LDKPersister_JCalls*) this_arg; - LDKChannelManager channel_manager_var = *channel_manager; - int64_t channel_manager_ref = 0; - // WARNING: we may need a move here but no clone is available for LDKChannelManager - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_manager_var); - channel_manager_ref = tag_ptr(channel_manager_var.inner, channel_manager_var.is_owned); - uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 62, channel_manager_ref); - void* ret_ptr = untag_ptr(ret); - CHECK_ACCESS(ret_ptr); - LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr); - FREE(untag_ptr(ret)); - return ret_conv; -} -LDKCResult_NoneIOErrorZ persist_graph_LDKPersister_jcall(const void* this_arg, const LDKNetworkGraph * network_graph) { - LDKPersister_JCalls *j_calls = (LDKPersister_JCalls*) this_arg; - LDKNetworkGraph network_graph_var = *network_graph; - int64_t network_graph_ref = 0; - // WARNING: we may need a move here but no clone is available for LDKNetworkGraph - CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_var); - network_graph_ref = tag_ptr(network_graph_var.inner, network_graph_var.is_owned); - uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 63, network_graph_ref); - void* ret_ptr = untag_ptr(ret); - CHECK_ACCESS(ret_ptr); - LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr); - FREE(untag_ptr(ret)); - return ret_conv; -} -LDKCResult_NoneIOErrorZ persist_scorer_LDKPersister_jcall(const void* this_arg, const LDKWriteableScore * scorer) { - LDKPersister_JCalls *j_calls = (LDKPersister_JCalls*) this_arg; - // WARNING: This object doesn't live past this scope, needs clone! - int64_t ret_scorer = tag_ptr(scorer, false); - uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 64, ret_scorer); +LDKCResult_TransactionNoneZ spend_spendable_outputs_LDKOutputSpender_jcall(const void* this_arg, LDKCVec_SpendableOutputDescriptorZ descriptors, LDKCVec_TxOutZ outputs, LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight, LDKCOption_u32Z locktime) { + LDKOutputSpender_JCalls *j_calls = (LDKOutputSpender_JCalls*) this_arg; + LDKCVec_SpendableOutputDescriptorZ descriptors_var = descriptors; + int64_tArray descriptors_arr = NULL; + descriptors_arr = init_int64_tArray(descriptors_var.datalen, __LINE__); + int64_t *descriptors_arr_ptr = (int64_t*)(((uint8_t*)descriptors_arr) + 8); + for (size_t b = 0; b < descriptors_var.datalen; b++) { + LDKSpendableOutputDescriptor *descriptors_conv_27_copy = MALLOC(sizeof(LDKSpendableOutputDescriptor), "LDKSpendableOutputDescriptor"); + *descriptors_conv_27_copy = descriptors_var.data[b]; + int64_t descriptors_conv_27_ref = tag_ptr(descriptors_conv_27_copy, true); + descriptors_arr_ptr[b] = descriptors_conv_27_ref; + } + + FREE(descriptors_var.data); + LDKCVec_TxOutZ outputs_var = outputs; + int64_tArray outputs_arr = NULL; + outputs_arr = init_int64_tArray(outputs_var.datalen, __LINE__); + int64_t *outputs_arr_ptr = (int64_t*)(((uint8_t*)outputs_arr) + 8); + for (size_t h = 0; h < outputs_var.datalen; h++) { + LDKTxOut* outputs_conv_7_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut"); + *outputs_conv_7_ref = outputs_var.data[h]; + outputs_arr_ptr[h] = tag_ptr(outputs_conv_7_ref, true); + } + + FREE(outputs_var.data); + LDKCVec_u8Z change_destination_script_var = change_destination_script; + int8_tArray change_destination_script_arr = init_int8_tArray(change_destination_script_var.datalen, __LINE__); + memcpy(change_destination_script_arr->elems, change_destination_script_var.data, change_destination_script_var.datalen); + CVec_u8Z_free(change_destination_script_var); + int32_t feerate_sat_per_1000_weight_conv = feerate_sat_per_1000_weight; + LDKCOption_u32Z *locktime_copy = MALLOC(sizeof(LDKCOption_u32Z), "LDKCOption_u32Z"); + *locktime_copy = locktime; + int64_t locktime_ref = tag_ptr(locktime_copy, true); + uint64_t ret = js_invoke_function_l_lllil(j_calls->instance_ptr, 63, (int64_t)descriptors_arr, (int64_t)outputs_arr, (int64_t)change_destination_script_arr, feerate_sat_per_1000_weight_conv, locktime_ref); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); - LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr); + LDKCResult_TransactionNoneZ ret_conv = *(LDKCResult_TransactionNoneZ*)(ret_ptr); FREE(untag_ptr(ret)); return ret_conv; } -static void LDKPersister_JCalls_cloned(LDKPersister* new_obj) { - LDKPersister_JCalls *j_calls = (LDKPersister_JCalls*) new_obj->this_arg; +static void LDKOutputSpender_JCalls_cloned(LDKOutputSpender* new_obj) { + LDKOutputSpender_JCalls *j_calls = (LDKOutputSpender_JCalls*) new_obj->this_arg; atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); } -static inline LDKPersister LDKPersister_init (int64_t o) { - LDKPersister_JCalls *calls = MALLOC(sizeof(LDKPersister_JCalls), "LDKPersister_JCalls"); +static inline LDKOutputSpender LDKOutputSpender_init (int64_t o) { + LDKOutputSpender_JCalls *calls = MALLOC(sizeof(LDKOutputSpender_JCalls), "LDKOutputSpender_JCalls"); atomic_init(&calls->refcnt, 1); calls->instance_ptr = o; - LDKPersister ret = { + LDKOutputSpender ret = { .this_arg = (void*) calls, - .persist_manager = persist_manager_LDKPersister_jcall, - .persist_graph = persist_graph_LDKPersister_jcall, - .persist_scorer = persist_scorer_LDKPersister_jcall, - .free = LDKPersister_JCalls_free, + .spend_spendable_outputs = spend_spendable_outputs_LDKOutputSpender_jcall, + .free = LDKOutputSpender_JCalls_free, }; return ret; } -uint64_t CS_LDK_LDKPersister_new(int32_t o) { - LDKPersister *res_ptr = MALLOC(sizeof(LDKPersister), "LDKPersister"); - *res_ptr = LDKPersister_init(o); +uint64_t CS_LDK_LDKOutputSpender_new(int32_t o) { + LDKOutputSpender *res_ptr = MALLOC(sizeof(LDKOutputSpender), "LDKOutputSpender"); + *res_ptr = LDKOutputSpender_init(o); return tag_ptr(res_ptr, true); } -int64_t CS_LDK_Persister_persist_manager(int64_t this_arg, int64_t channel_manager) { +int64_t CS_LDK_OutputSpender_spend_spendable_outputs(int64_t this_arg, int64_tArray descriptors, int64_tArray outputs, int8_tArray change_destination_script, int32_t feerate_sat_per_1000_weight, int64_t locktime) { void* this_arg_ptr = untag_ptr(this_arg); if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } - LDKPersister* this_arg_conv = (LDKPersister*)this_arg_ptr; - LDKChannelManager channel_manager_conv; - channel_manager_conv.inner = untag_ptr(channel_manager); - channel_manager_conv.is_owned = ptr_is_owned(channel_manager); - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_manager_conv); - channel_manager_conv.is_owned = false; - LDKCResult_NoneIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneIOErrorZ), "LDKCResult_NoneIOErrorZ"); - *ret_conv = (this_arg_conv->persist_manager)(this_arg_conv->this_arg, &channel_manager_conv); + LDKOutputSpender* this_arg_conv = (LDKOutputSpender*)this_arg_ptr; + LDKCVec_SpendableOutputDescriptorZ descriptors_constr; + descriptors_constr.datalen = descriptors->arr_len; + if (descriptors_constr.datalen > 0) + descriptors_constr.data = MALLOC(descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements"); + else + descriptors_constr.data = NULL; + int64_t* descriptors_vals = descriptors->elems; + for (size_t b = 0; b < descriptors_constr.datalen; b++) { + int64_t descriptors_conv_27 = descriptors_vals[b]; + void* descriptors_conv_27_ptr = untag_ptr(descriptors_conv_27); + CHECK_ACCESS(descriptors_conv_27_ptr); + LDKSpendableOutputDescriptor descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(descriptors_conv_27_ptr); + descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptors_conv_27)); + descriptors_constr.data[b] = descriptors_conv_27_conv; + } + FREE(descriptors); + LDKCVec_TxOutZ outputs_constr; + outputs_constr.datalen = outputs->arr_len; + if (outputs_constr.datalen > 0) + outputs_constr.data = MALLOC(outputs_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements"); + else + outputs_constr.data = NULL; + int64_t* outputs_vals = outputs->elems; + for (size_t h = 0; h < outputs_constr.datalen; h++) { + int64_t outputs_conv_7 = outputs_vals[h]; + void* outputs_conv_7_ptr = untag_ptr(outputs_conv_7); + CHECK_ACCESS(outputs_conv_7_ptr); + LDKTxOut outputs_conv_7_conv = *(LDKTxOut*)(outputs_conv_7_ptr); + outputs_conv_7_conv = TxOut_clone((LDKTxOut*)untag_ptr(outputs_conv_7)); + outputs_constr.data[h] = outputs_conv_7_conv; + } + FREE(outputs); + LDKCVec_u8Z change_destination_script_ref; + change_destination_script_ref.datalen = change_destination_script->arr_len; + change_destination_script_ref.data = MALLOC(change_destination_script_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(change_destination_script_ref.data, change_destination_script->elems, change_destination_script_ref.datalen); FREE(change_destination_script); + void* locktime_ptr = untag_ptr(locktime); + CHECK_ACCESS(locktime_ptr); + LDKCOption_u32Z locktime_conv = *(LDKCOption_u32Z*)(locktime_ptr); + locktime_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(locktime)); + LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); + *ret_conv = (this_arg_conv->spend_spendable_outputs)(this_arg_conv->this_arg, descriptors_constr, outputs_constr, change_destination_script_ref, feerate_sat_per_1000_weight, locktime_conv); return tag_ptr(ret_conv, true); } -int64_t CS_LDK_Persister_persist_graph(int64_t this_arg, int64_t network_graph) { - void* this_arg_ptr = untag_ptr(this_arg); - if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } - LDKPersister* this_arg_conv = (LDKPersister*)this_arg_ptr; - LDKNetworkGraph network_graph_conv; - network_graph_conv.inner = untag_ptr(network_graph); - network_graph_conv.is_owned = ptr_is_owned(network_graph); - CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv); - network_graph_conv.is_owned = false; - LDKCResult_NoneIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneIOErrorZ), "LDKCResult_NoneIOErrorZ"); - *ret_conv = (this_arg_conv->persist_graph)(this_arg_conv->this_arg, &network_graph_conv); - return tag_ptr(ret_conv, true); +static inline struct LDKOutputSweeper CResult_OutputSweeperDecodeErrorZ_get_ok(LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR owner){ + LDKOutputSweeper ret = *owner->contents.result; + ret.is_owned = false; + return ret; } - -int64_t CS_LDK_Persister_persist_scorer(int64_t this_arg, int64_t scorer) { - void* this_arg_ptr = untag_ptr(this_arg); - if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } - LDKPersister* this_arg_conv = (LDKPersister*)this_arg_ptr; - void* scorer_ptr = untag_ptr(scorer); - if (ptr_is_owned(scorer)) { CHECK_ACCESS(scorer_ptr); } - LDKWriteableScore* scorer_conv = (LDKWriteableScore*)scorer_ptr; - LDKCResult_NoneIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneIOErrorZ), "LDKCResult_NoneIOErrorZ"); - *ret_conv = (this_arg_conv->persist_scorer)(this_arg_conv->this_arg, scorer_conv); - return tag_ptr(ret_conv, true); +int64_t CS_LDK_CResult_OutputSweeperDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_OutputSweeperDecodeErrorZ* owner_conv = (LDKCResult_OutputSweeperDecodeErrorZ*)untag_ptr(owner); + LDKOutputSweeper ret_var = CResult_OutputSweeperDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -typedef struct LDKPersist_JCalls { - atomic_size_t refcnt; - uint32_t instance_ptr; -} LDKPersist_JCalls; -static void LDKPersist_JCalls_free(void* this_arg) { - LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg; - if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { - FREE(j_calls); - } +static inline struct LDKDecodeError CResult_OutputSweeperDecodeErrorZ_get_err(LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); } -LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) { - LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg; - LDKOutPoint channel_id_var = channel_id; - int64_t channel_id_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); - channel_id_ref = tag_ptr(channel_id_var.inner, channel_id_var.is_owned); - LDKChannelMonitor data_var = *data; - int64_t data_ref = 0; - data_var = ChannelMonitor_clone(&data_var); - CHECK_INNER_FIELD_ACCESS_OR_NULL(data_var); - data_ref = tag_ptr(data_var.inner, data_var.is_owned); - LDKMonitorUpdateId update_id_var = update_id; - int64_t update_id_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_var); - update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned); - uint64_t ret = js_invoke_function_ChannelMonitorUpdateStatus_lll(j_calls->instance_ptr, 65, channel_id_ref, data_ref, update_id_ref); - LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_cs(ret); - return ret_conv; +int64_t CS_LDK_CResult_OutputSweeperDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_OutputSweeperDecodeErrorZ* owner_conv = (LDKCResult_OutputSweeperDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_OutputSweeperDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; } -LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, LDKChannelMonitorUpdate update, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) { - LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg; - LDKOutPoint channel_id_var = channel_id; - int64_t channel_id_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var); - channel_id_ref = tag_ptr(channel_id_var.inner, channel_id_var.is_owned); - LDKChannelMonitorUpdate update_var = update; - int64_t update_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(update_var); - update_ref = tag_ptr(update_var.inner, update_var.is_owned); - LDKChannelMonitor data_var = *data; - int64_t data_ref = 0; - data_var = ChannelMonitor_clone(&data_var); - CHECK_INNER_FIELD_ACCESS_OR_NULL(data_var); - data_ref = tag_ptr(data_var.inner, data_var.is_owned); - LDKMonitorUpdateId update_id_var = update_id; - int64_t update_id_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_var); - update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned); - uint64_t ret = js_invoke_function_ChannelMonitorUpdateStatus_llll(j_calls->instance_ptr, 66, channel_id_ref, update_ref, data_ref, update_id_ref); - LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_cs(ret); - return ret_conv; + +static inline struct LDKBestBlock C2Tuple_BestBlockOutputSweeperZ_get_a(LDKC2Tuple_BestBlockOutputSweeperZ *NONNULL_PTR owner){ + LDKBestBlock ret = owner->a; + ret.is_owned = false; + return ret; } -static void LDKPersist_JCalls_cloned(LDKPersist* new_obj) { - LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) new_obj->this_arg; - atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +int64_t CS_LDK_C2Tuple_BestBlockOutputSweeperZ_get_a(int64_t owner) { + LDKC2Tuple_BestBlockOutputSweeperZ* owner_conv = (LDKC2Tuple_BestBlockOutputSweeperZ*)untag_ptr(owner); + LDKBestBlock ret_var = C2Tuple_BestBlockOutputSweeperZ_get_a(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -static inline LDKPersist LDKPersist_init (int64_t o) { - LDKPersist_JCalls *calls = MALLOC(sizeof(LDKPersist_JCalls), "LDKPersist_JCalls"); - atomic_init(&calls->refcnt, 1); - calls->instance_ptr = o; - LDKPersist ret = { - .this_arg = (void*) calls, - .persist_new_channel = persist_new_channel_LDKPersist_jcall, - .update_persisted_channel = update_persisted_channel_LDKPersist_jcall, - .free = LDKPersist_JCalls_free, - }; +static inline struct LDKOutputSweeper C2Tuple_BestBlockOutputSweeperZ_get_b(LDKC2Tuple_BestBlockOutputSweeperZ *NONNULL_PTR owner){ + LDKOutputSweeper ret = owner->b; + ret.is_owned = false; return ret; } -uint64_t CS_LDK_LDKPersist_new(int32_t o) { - LDKPersist *res_ptr = MALLOC(sizeof(LDKPersist), "LDKPersist"); - *res_ptr = LDKPersist_init(o); - return tag_ptr(res_ptr, true); -} -int32_t CS_LDK_Persist_persist_new_channel(int64_t this_arg, int64_t channel_id, int64_t data, int64_t update_id) { - void* this_arg_ptr = untag_ptr(this_arg); - if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } - LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr; - LDKOutPoint channel_id_conv; - channel_id_conv.inner = untag_ptr(channel_id); - channel_id_conv.is_owned = ptr_is_owned(channel_id); - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); - channel_id_conv = OutPoint_clone(&channel_id_conv); - LDKChannelMonitor data_conv; - data_conv.inner = untag_ptr(data); - data_conv.is_owned = ptr_is_owned(data); - CHECK_INNER_FIELD_ACCESS_OR_NULL(data_conv); - data_conv.is_owned = false; - LDKMonitorUpdateId update_id_conv; - update_id_conv.inner = untag_ptr(update_id); - update_id_conv.is_owned = ptr_is_owned(update_id); - CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv); - update_id_conv = MonitorUpdateId_clone(&update_id_conv); - int32_t ret_conv = LDKChannelMonitorUpdateStatus_to_cs((this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, channel_id_conv, &data_conv, update_id_conv)); - return ret_conv; +int64_t CS_LDK_C2Tuple_BestBlockOutputSweeperZ_get_b(int64_t owner) { + LDKC2Tuple_BestBlockOutputSweeperZ* owner_conv = (LDKC2Tuple_BestBlockOutputSweeperZ*)untag_ptr(owner); + LDKOutputSweeper ret_var = C2Tuple_BestBlockOutputSweeperZ_get_b(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -int32_t CS_LDK_Persist_update_persisted_channel(int64_t this_arg, int64_t channel_id, int64_t update, int64_t data, int64_t update_id) { - void* this_arg_ptr = untag_ptr(this_arg); - if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } - LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr; - LDKOutPoint channel_id_conv; - channel_id_conv.inner = untag_ptr(channel_id); - channel_id_conv.is_owned = ptr_is_owned(channel_id); - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); - channel_id_conv = OutPoint_clone(&channel_id_conv); - LDKChannelMonitorUpdate update_conv; - update_conv.inner = untag_ptr(update); - update_conv.is_owned = ptr_is_owned(update); - CHECK_INNER_FIELD_ACCESS_OR_NULL(update_conv); - update_conv = ChannelMonitorUpdate_clone(&update_conv); - LDKChannelMonitor data_conv; - data_conv.inner = untag_ptr(data); - data_conv.is_owned = ptr_is_owned(data); - CHECK_INNER_FIELD_ACCESS_OR_NULL(data_conv); - data_conv.is_owned = false; - LDKMonitorUpdateId update_id_conv; - update_id_conv.inner = untag_ptr(update_id); - update_id_conv.is_owned = ptr_is_owned(update_id); - CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv); - update_id_conv = MonitorUpdateId_clone(&update_id_conv); - int32_t ret_conv = LDKChannelMonitorUpdateStatus_to_cs((this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, channel_id_conv, update_conv, &data_conv, update_id_conv)); - return ret_conv; +static inline struct LDKC2Tuple_BestBlockOutputSweeperZ *CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR owner){ +CHECK(owner->result_ok); + return &*owner->contents.result; } - -typedef struct LDKFutureCallback_JCalls { - atomic_size_t refcnt; - uint32_t instance_ptr; -} LDKFutureCallback_JCalls; -static void LDKFutureCallback_JCalls_free(void* this_arg) { - LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg; - if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { - FREE(j_calls); - } +int64_t CS_LDK_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* owner_conv = (LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)untag_ptr(owner); + int64_t ret_ret = tag_ptr(CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(owner_conv), false); + return ret_ret; } -void call_LDKFutureCallback_jcall(const void* this_arg) { - LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg; - js_invoke_function_void_(j_calls->instance_ptr, 67); + +static inline struct LDKDecodeError CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); } -static void LDKFutureCallback_JCalls_cloned(LDKFutureCallback* new_obj) { - LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) new_obj->this_arg; - atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +int64_t CS_LDK_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* owner_conv = (LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; } -static inline LDKFutureCallback LDKFutureCallback_init (int64_t o) { - LDKFutureCallback_JCalls *calls = MALLOC(sizeof(LDKFutureCallback_JCalls), "LDKFutureCallback_JCalls"); + +static inline struct LDKDelayedPaymentBasepoint CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){ + LDKDelayedPaymentBasepoint ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner); + LDKDelayedPaymentBasepoint ret_var = CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +int64_t CS_LDK_CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKDelayedPaymentKey CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){ + LDKDelayedPaymentKey ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner); + LDKDelayedPaymentKey ret_var = CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_DelayedPaymentKeyDecodeErrorZ_get_err(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +int64_t CS_LDK_CResult_DelayedPaymentKeyDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_DelayedPaymentKeyDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKHtlcBasepoint CResult_HtlcBasepointDecodeErrorZ_get_ok(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){ + LDKHtlcBasepoint ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_HtlcBasepointDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner); + LDKHtlcBasepoint ret_var = CResult_HtlcBasepointDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_HtlcBasepointDecodeErrorZ_get_err(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +int64_t CS_LDK_CResult_HtlcBasepointDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_HtlcBasepointDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKHtlcKey CResult_HtlcKeyDecodeErrorZ_get_ok(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){ + LDKHtlcKey ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_HtlcKeyDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner); + LDKHtlcKey ret_var = CResult_HtlcKeyDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_HtlcKeyDecodeErrorZ_get_err(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +int64_t CS_LDK_CResult_HtlcKeyDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_HtlcKeyDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKRevocationBasepoint CResult_RevocationBasepointDecodeErrorZ_get_ok(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){ + LDKRevocationBasepoint ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_RevocationBasepointDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner); + LDKRevocationBasepoint ret_var = CResult_RevocationBasepointDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_RevocationBasepointDecodeErrorZ_get_err(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +int64_t CS_LDK_CResult_RevocationBasepointDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_RevocationBasepointDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKRevocationKey CResult_RevocationKeyDecodeErrorZ_get_ok(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){ + LDKRevocationKey ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_RevocationKeyDecodeErrorZ_get_ok(int64_t owner) { + LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner); + LDKRevocationKey ret_var = CResult_RevocationKeyDecodeErrorZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKDecodeError CResult_RevocationKeyDecodeErrorZ_get_err(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return DecodeError_clone(&*owner->contents.err); +} +int64_t CS_LDK_CResult_RevocationKeyDecodeErrorZ_get_err(int64_t owner) { + LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner); + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = CResult_RevocationKeyDecodeErrorZ_get_err(owner_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +static inline struct LDKLockedChannelMonitor CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){ + LDKLockedChannelMonitor ret = *owner->contents.result; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_CResult_LockedChannelMonitorNoneZ_get_ok(int64_t owner) { + LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner); + LDKLockedChannelMonitor ret_var = CResult_LockedChannelMonitorNoneZ_get_ok(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){ +CHECK(!owner->result_ok); + return *owner->contents.err; +} +void CS_LDK_CResult_LockedChannelMonitorNoneZ_get_err(int64_t owner) { + LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner); + CResult_LockedChannelMonitorNoneZ_get_err(owner_conv); +} + +static inline struct LDKOutPoint C2Tuple_OutPointChannelIdZ_get_a(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR owner){ + LDKOutPoint ret = owner->a; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_C2Tuple_OutPointChannelIdZ_get_a(int64_t owner) { + LDKC2Tuple_OutPointChannelIdZ* owner_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(owner); + LDKOutPoint ret_var = C2Tuple_OutPointChannelIdZ_get_a(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKChannelId C2Tuple_OutPointChannelIdZ_get_b(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR owner){ + LDKChannelId ret = owner->b; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_C2Tuple_OutPointChannelIdZ_get_b(int64_t owner) { + LDKC2Tuple_OutPointChannelIdZ* owner_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(owner); + LDKChannelId ret_var = C2Tuple_OutPointChannelIdZ_get_b(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline LDKCVec_C2Tuple_OutPointChannelIdZZ CVec_C2Tuple_OutPointChannelIdZZ_clone(const LDKCVec_C2Tuple_OutPointChannelIdZZ *orig) { + LDKCVec_C2Tuple_OutPointChannelIdZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ) * orig->datalen, "LDKCVec_C2Tuple_OutPointChannelIdZZ clone bytes"), .datalen = orig->datalen }; + for (size_t i = 0; i < ret.datalen; i++) { + ret.data[i] = C2Tuple_OutPointChannelIdZ_clone(&orig->data[i]); + } + return ret; +} +static inline LDKCVec_MonitorUpdateIdZ CVec_MonitorUpdateIdZ_clone(const LDKCVec_MonitorUpdateIdZ *orig) { + LDKCVec_MonitorUpdateIdZ ret = { .data = MALLOC(sizeof(LDKMonitorUpdateId) * orig->datalen, "LDKCVec_MonitorUpdateIdZ clone bytes"), .datalen = orig->datalen }; + for (size_t i = 0; i < ret.datalen; i++) { + ret.data[i] = MonitorUpdateId_clone(&orig->data[i]); + } + return ret; +} +static inline struct LDKOutPoint C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){ + LDKOutPoint ret = owner->a; + ret.is_owned = false; + return ret; +} +int64_t CS_LDK_C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(int64_t owner) { + LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner); + LDKOutPoint ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(owner_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline struct LDKCVec_MonitorUpdateIdZ C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){ + return CVec_MonitorUpdateIdZ_clone(&owner->b); +} +int64_tArray CS_LDK_C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(int64_t owner) { + LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner); + LDKCVec_MonitorUpdateIdZ ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(owner_conv); + int64_tArray ret_arr = NULL; + ret_arr = init_int64_tArray(ret_var.datalen, __LINE__); + int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8); + for (size_t r = 0; r < ret_var.datalen; r++) { + LDKMonitorUpdateId ret_conv_17_var = ret_var.data[r]; + int64_t ret_conv_17_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_17_var); + ret_conv_17_ref = tag_ptr(ret_conv_17_var.inner, ret_conv_17_var.is_owned); + ret_arr_ptr[r] = ret_conv_17_ref; + } + + FREE(ret_var.data); + return ret_arr; +} + +static inline LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ CVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ_clone(const LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ *orig) { + LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ) * orig->datalen, "LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ clone bytes"), .datalen = orig->datalen }; + for (size_t i = 0; i < ret.datalen; i++) { + ret.data[i] = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_clone(&orig->data[i]); + } + return ret; +} +typedef struct LDKPersister_JCalls { + atomic_size_t refcnt; + uint32_t instance_ptr; +} LDKPersister_JCalls; +static void LDKPersister_JCalls_free(void* this_arg) { + LDKPersister_JCalls *j_calls = (LDKPersister_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + FREE(j_calls); + } +} +LDKCResult_NoneIOErrorZ persist_manager_LDKPersister_jcall(const void* this_arg, const LDKChannelManager * channel_manager) { + LDKPersister_JCalls *j_calls = (LDKPersister_JCalls*) this_arg; + LDKChannelManager channel_manager_var = *channel_manager; + int64_t channel_manager_ref = 0; + // WARNING: we may need a move here but no clone is available for LDKChannelManager + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_manager_var); + channel_manager_ref = tag_ptr(channel_manager_var.inner, channel_manager_var.is_owned); + uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 64, channel_manager_ref); + void* ret_ptr = untag_ptr(ret); + CHECK_ACCESS(ret_ptr); + LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr); + FREE(untag_ptr(ret)); + return ret_conv; +} +LDKCResult_NoneIOErrorZ persist_graph_LDKPersister_jcall(const void* this_arg, const LDKNetworkGraph * network_graph) { + LDKPersister_JCalls *j_calls = (LDKPersister_JCalls*) this_arg; + LDKNetworkGraph network_graph_var = *network_graph; + int64_t network_graph_ref = 0; + // WARNING: we may need a move here but no clone is available for LDKNetworkGraph + CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_var); + network_graph_ref = tag_ptr(network_graph_var.inner, network_graph_var.is_owned); + uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 65, network_graph_ref); + void* ret_ptr = untag_ptr(ret); + CHECK_ACCESS(ret_ptr); + LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr); + FREE(untag_ptr(ret)); + return ret_conv; +} +LDKCResult_NoneIOErrorZ persist_scorer_LDKPersister_jcall(const void* this_arg, const LDKWriteableScore * scorer) { + LDKPersister_JCalls *j_calls = (LDKPersister_JCalls*) this_arg; + // WARNING: This object doesn't live past this scope, needs clone! + int64_t ret_scorer = tag_ptr(scorer, false); + uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 66, ret_scorer); + void* ret_ptr = untag_ptr(ret); + CHECK_ACCESS(ret_ptr); + LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr); + FREE(untag_ptr(ret)); + return ret_conv; +} +static void LDKPersister_JCalls_cloned(LDKPersister* new_obj) { + LDKPersister_JCalls *j_calls = (LDKPersister_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +} +static inline LDKPersister LDKPersister_init (int64_t o) { + LDKPersister_JCalls *calls = MALLOC(sizeof(LDKPersister_JCalls), "LDKPersister_JCalls"); atomic_init(&calls->refcnt, 1); calls->instance_ptr = o; - LDKFutureCallback ret = { + LDKPersister ret = { .this_arg = (void*) calls, - .call = call_LDKFutureCallback_jcall, - .free = LDKFutureCallback_JCalls_free, + .persist_manager = persist_manager_LDKPersister_jcall, + .persist_graph = persist_graph_LDKPersister_jcall, + .persist_scorer = persist_scorer_LDKPersister_jcall, + .free = LDKPersister_JCalls_free, }; return ret; } -uint64_t CS_LDK_LDKFutureCallback_new(int32_t o) { - LDKFutureCallback *res_ptr = MALLOC(sizeof(LDKFutureCallback), "LDKFutureCallback"); - *res_ptr = LDKFutureCallback_init(o); +uint64_t CS_LDK_LDKPersister_new(int32_t o) { + LDKPersister *res_ptr = MALLOC(sizeof(LDKPersister), "LDKPersister"); + *res_ptr = LDKPersister_init(o); return tag_ptr(res_ptr, true); } -void CS_LDK_FutureCallback_call(int64_t this_arg) { +int64_t CS_LDK_Persister_persist_manager(int64_t this_arg, int64_t channel_manager) { void* this_arg_ptr = untag_ptr(this_arg); if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } - LDKFutureCallback* this_arg_conv = (LDKFutureCallback*)this_arg_ptr; - (this_arg_conv->call)(this_arg_conv->this_arg); + LDKPersister* this_arg_conv = (LDKPersister*)this_arg_ptr; + LDKChannelManager channel_manager_conv; + channel_manager_conv.inner = untag_ptr(channel_manager); + channel_manager_conv.is_owned = ptr_is_owned(channel_manager); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_manager_conv); + channel_manager_conv.is_owned = false; + LDKCResult_NoneIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneIOErrorZ), "LDKCResult_NoneIOErrorZ"); + *ret_conv = (this_arg_conv->persist_manager)(this_arg_conv->this_arg, &channel_manager_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_Persister_persist_graph(int64_t this_arg, int64_t network_graph) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKPersister* this_arg_conv = (LDKPersister*)this_arg_ptr; + LDKNetworkGraph network_graph_conv; + network_graph_conv.inner = untag_ptr(network_graph); + network_graph_conv.is_owned = ptr_is_owned(network_graph); + CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv); + network_graph_conv.is_owned = false; + LDKCResult_NoneIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneIOErrorZ), "LDKCResult_NoneIOErrorZ"); + *ret_conv = (this_arg_conv->persist_graph)(this_arg_conv->this_arg, &network_graph_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_Persister_persist_scorer(int64_t this_arg, int64_t scorer) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKPersister* this_arg_conv = (LDKPersister*)this_arg_ptr; + void* scorer_ptr = untag_ptr(scorer); + if (ptr_is_owned(scorer)) { CHECK_ACCESS(scorer_ptr); } + LDKWriteableScore* scorer_conv = (LDKWriteableScore*)scorer_ptr; + LDKCResult_NoneIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneIOErrorZ), "LDKCResult_NoneIOErrorZ"); + *ret_conv = (this_arg_conv->persist_scorer)(this_arg_conv->this_arg, scorer_conv); + return tag_ptr(ret_conv, true); +} + +typedef struct LDKPersist_JCalls { + atomic_size_t refcnt; + uint32_t instance_ptr; +} LDKPersist_JCalls; +static void LDKPersist_JCalls_free(void* this_arg) { + LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + FREE(j_calls); + } +} +LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_funding_outpoint, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) { + LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg; + LDKOutPoint channel_funding_outpoint_var = channel_funding_outpoint; + int64_t channel_funding_outpoint_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_var); + channel_funding_outpoint_ref = tag_ptr(channel_funding_outpoint_var.inner, channel_funding_outpoint_var.is_owned); + LDKChannelMonitor data_var = *data; + int64_t data_ref = 0; + data_var = ChannelMonitor_clone(&data_var); + CHECK_INNER_FIELD_ACCESS_OR_NULL(data_var); + data_ref = tag_ptr(data_var.inner, data_var.is_owned); + LDKMonitorUpdateId update_id_var = update_id; + int64_t update_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_var); + update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned); + uint64_t ret = js_invoke_function_ChannelMonitorUpdateStatus_lll(j_calls->instance_ptr, 67, channel_funding_outpoint_ref, data_ref, update_id_ref); + LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_cs(ret); + return ret_conv; +} +LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_funding_outpoint, LDKChannelMonitorUpdate update, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) { + LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg; + LDKOutPoint channel_funding_outpoint_var = channel_funding_outpoint; + int64_t channel_funding_outpoint_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_var); + channel_funding_outpoint_ref = tag_ptr(channel_funding_outpoint_var.inner, channel_funding_outpoint_var.is_owned); + LDKChannelMonitorUpdate update_var = update; + int64_t update_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(update_var); + update_ref = tag_ptr(update_var.inner, update_var.is_owned); + LDKChannelMonitor data_var = *data; + int64_t data_ref = 0; + data_var = ChannelMonitor_clone(&data_var); + CHECK_INNER_FIELD_ACCESS_OR_NULL(data_var); + data_ref = tag_ptr(data_var.inner, data_var.is_owned); + LDKMonitorUpdateId update_id_var = update_id; + int64_t update_id_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_var); + update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned); + uint64_t ret = js_invoke_function_ChannelMonitorUpdateStatus_llll(j_calls->instance_ptr, 68, channel_funding_outpoint_ref, update_ref, data_ref, update_id_ref); + LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_cs(ret); + return ret_conv; +} +void archive_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_funding_outpoint) { + LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg; + LDKOutPoint channel_funding_outpoint_var = channel_funding_outpoint; + int64_t channel_funding_outpoint_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_var); + channel_funding_outpoint_ref = tag_ptr(channel_funding_outpoint_var.inner, channel_funding_outpoint_var.is_owned); + js_invoke_function_void_l(j_calls->instance_ptr, 69, channel_funding_outpoint_ref); +} +static void LDKPersist_JCalls_cloned(LDKPersist* new_obj) { + LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +} +static inline LDKPersist LDKPersist_init (int64_t o) { + LDKPersist_JCalls *calls = MALLOC(sizeof(LDKPersist_JCalls), "LDKPersist_JCalls"); + atomic_init(&calls->refcnt, 1); + calls->instance_ptr = o; + + LDKPersist ret = { + .this_arg = (void*) calls, + .persist_new_channel = persist_new_channel_LDKPersist_jcall, + .update_persisted_channel = update_persisted_channel_LDKPersist_jcall, + .archive_persisted_channel = archive_persisted_channel_LDKPersist_jcall, + .free = LDKPersist_JCalls_free, + }; + return ret; +} +uint64_t CS_LDK_LDKPersist_new(int32_t o) { + LDKPersist *res_ptr = MALLOC(sizeof(LDKPersist), "LDKPersist"); + *res_ptr = LDKPersist_init(o); + return tag_ptr(res_ptr, true); +} +int32_t CS_LDK_Persist_persist_new_channel(int64_t this_arg, int64_t channel_funding_outpoint, int64_t data, int64_t update_id) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr; + LDKOutPoint channel_funding_outpoint_conv; + channel_funding_outpoint_conv.inner = untag_ptr(channel_funding_outpoint); + channel_funding_outpoint_conv.is_owned = ptr_is_owned(channel_funding_outpoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_conv); + channel_funding_outpoint_conv = OutPoint_clone(&channel_funding_outpoint_conv); + LDKChannelMonitor data_conv; + data_conv.inner = untag_ptr(data); + data_conv.is_owned = ptr_is_owned(data); + CHECK_INNER_FIELD_ACCESS_OR_NULL(data_conv); + data_conv.is_owned = false; + LDKMonitorUpdateId update_id_conv; + update_id_conv.inner = untag_ptr(update_id); + update_id_conv.is_owned = ptr_is_owned(update_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv); + update_id_conv = MonitorUpdateId_clone(&update_id_conv); + int32_t ret_conv = LDKChannelMonitorUpdateStatus_to_cs((this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, channel_funding_outpoint_conv, &data_conv, update_id_conv)); + return ret_conv; +} + +int32_t CS_LDK_Persist_update_persisted_channel(int64_t this_arg, int64_t channel_funding_outpoint, int64_t update, int64_t data, int64_t update_id) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr; + LDKOutPoint channel_funding_outpoint_conv; + channel_funding_outpoint_conv.inner = untag_ptr(channel_funding_outpoint); + channel_funding_outpoint_conv.is_owned = ptr_is_owned(channel_funding_outpoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_conv); + channel_funding_outpoint_conv = OutPoint_clone(&channel_funding_outpoint_conv); + LDKChannelMonitorUpdate update_conv; + update_conv.inner = untag_ptr(update); + update_conv.is_owned = ptr_is_owned(update); + CHECK_INNER_FIELD_ACCESS_OR_NULL(update_conv); + update_conv = ChannelMonitorUpdate_clone(&update_conv); + LDKChannelMonitor data_conv; + data_conv.inner = untag_ptr(data); + data_conv.is_owned = ptr_is_owned(data); + CHECK_INNER_FIELD_ACCESS_OR_NULL(data_conv); + data_conv.is_owned = false; + LDKMonitorUpdateId update_id_conv; + update_id_conv.inner = untag_ptr(update_id); + update_id_conv.is_owned = ptr_is_owned(update_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv); + update_id_conv = MonitorUpdateId_clone(&update_id_conv); + int32_t ret_conv = LDKChannelMonitorUpdateStatus_to_cs((this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, channel_funding_outpoint_conv, update_conv, &data_conv, update_id_conv)); + return ret_conv; +} + +void CS_LDK_Persist_archive_persisted_channel(int64_t this_arg, int64_t channel_funding_outpoint) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr; + LDKOutPoint channel_funding_outpoint_conv; + channel_funding_outpoint_conv.inner = untag_ptr(channel_funding_outpoint); + channel_funding_outpoint_conv.is_owned = ptr_is_owned(channel_funding_outpoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_conv); + channel_funding_outpoint_conv = OutPoint_clone(&channel_funding_outpoint_conv); + (this_arg_conv->archive_persisted_channel)(this_arg_conv->this_arg, channel_funding_outpoint_conv); } typedef struct LDKListen_JCalls { @@ -13463,7 +14756,7 @@ void filtered_block_connected_LDKListen_jcall(const void* this_arg, const uint8_ FREE(txdata_var.data); int32_t height_conv = height; - js_invoke_function_void_lli(j_calls->instance_ptr, 68, (int64_t)header_arr, (int64_t)txdata_arr, height_conv); + js_invoke_function_void_lli(j_calls->instance_ptr, 70, (int64_t)header_arr, (int64_t)txdata_arr, height_conv); } void block_connected_LDKListen_jcall(const void* this_arg, LDKu8slice block, uint32_t height) { LDKListen_JCalls *j_calls = (LDKListen_JCalls*) this_arg; @@ -13471,14 +14764,14 @@ void block_connected_LDKListen_jcall(const void* this_arg, LDKu8slice block, uin int8_tArray block_arr = init_int8_tArray(block_var.datalen, __LINE__); memcpy(block_arr->elems, block_var.data, block_var.datalen); int32_t height_conv = height; - js_invoke_function_void_li(j_calls->instance_ptr, 69, (int64_t)block_arr, height_conv); + js_invoke_function_void_li(j_calls->instance_ptr, 71, (int64_t)block_arr, height_conv); } void block_disconnected_LDKListen_jcall(const void* this_arg, const uint8_t (* header)[80], uint32_t height) { LDKListen_JCalls *j_calls = (LDKListen_JCalls*) this_arg; int8_tArray header_arr = init_int8_tArray(80, __LINE__); memcpy(header_arr->elems, *header, 80); int32_t height_conv = height; - js_invoke_function_void_li(j_calls->instance_ptr, 70, (int64_t)header_arr, height_conv); + js_invoke_function_void_li(j_calls->instance_ptr, 72, (int64_t)header_arr, height_conv); } static void LDKListen_JCalls_cloned(LDKListen* new_obj) { LDKListen_JCalls *j_calls = (LDKListen_JCalls*) new_obj->this_arg; @@ -13578,24 +14871,24 @@ void transactions_confirmed_LDKConfirm_jcall(const void* this_arg, const uint8_t FREE(txdata_var.data); int32_t height_conv = height; - js_invoke_function_void_lli(j_calls->instance_ptr, 71, (int64_t)header_arr, (int64_t)txdata_arr, height_conv); + js_invoke_function_void_lli(j_calls->instance_ptr, 73, (int64_t)header_arr, (int64_t)txdata_arr, height_conv); } void transaction_unconfirmed_LDKConfirm_jcall(const void* this_arg, const uint8_t (* txid)[32]) { LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg; int8_tArray txid_arr = init_int8_tArray(32, __LINE__); memcpy(txid_arr->elems, *txid, 32); - js_invoke_function_void_l(j_calls->instance_ptr, 72, (int64_t)txid_arr); + js_invoke_function_void_l(j_calls->instance_ptr, 74, (int64_t)txid_arr); } void best_block_updated_LDKConfirm_jcall(const void* this_arg, const uint8_t (* header)[80], uint32_t height) { LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg; int8_tArray header_arr = init_int8_tArray(80, __LINE__); memcpy(header_arr->elems, *header, 80); int32_t height_conv = height; - js_invoke_function_void_li(j_calls->instance_ptr, 73, (int64_t)header_arr, height_conv); + js_invoke_function_void_li(j_calls->instance_ptr, 75, (int64_t)header_arr, height_conv); } LDKCVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ get_relevant_txids_LDKConfirm_jcall(const void* this_arg) { LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg; - int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 74); + int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 76); LDKCVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ ret_constr; ret_constr.datalen = ret->arr_len; if (ret_constr.datalen > 0) @@ -13705,6 +14998,68 @@ int64_tArray CS_LDK_Confirm_get_relevant_txids(int64_t this_arg) { return ret_arr; } +uint32_t CS_LDK_LDKSpendingDelay_ty_from_ptr(int64_t ptr) { + LDKSpendingDelay *obj = (LDKSpendingDelay*)untag_ptr(ptr); + switch(obj->tag) { + case LDKSpendingDelay_Relative: return 0; + case LDKSpendingDelay_Absolute: return 1; + default: abort(); + } +} +int32_t CS_LDK_LDKSpendingDelay_Relative_get_num_blocks(int64_t ptr) { + LDKSpendingDelay *obj = (LDKSpendingDelay*)untag_ptr(ptr); + CHECK(obj->tag == LDKSpendingDelay_Relative); + int32_t num_blocks_conv = obj->relative.num_blocks; + return num_blocks_conv; +} +int32_t CS_LDK_LDKSpendingDelay_Absolute_get_height(int64_t ptr) { + LDKSpendingDelay *obj = (LDKSpendingDelay*)untag_ptr(ptr); + CHECK(obj->tag == LDKSpendingDelay_Absolute); + int32_t height_conv = obj->absolute.height; + return height_conv; +} +typedef struct LDKFutureCallback_JCalls { + atomic_size_t refcnt; + uint32_t instance_ptr; +} LDKFutureCallback_JCalls; +static void LDKFutureCallback_JCalls_free(void* this_arg) { + LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + FREE(j_calls); + } +} +void call_LDKFutureCallback_jcall(const void* this_arg) { + LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg; + js_invoke_function_void_(j_calls->instance_ptr, 77); +} +static void LDKFutureCallback_JCalls_cloned(LDKFutureCallback* new_obj) { + LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +} +static inline LDKFutureCallback LDKFutureCallback_init (int64_t o) { + LDKFutureCallback_JCalls *calls = MALLOC(sizeof(LDKFutureCallback_JCalls), "LDKFutureCallback_JCalls"); + atomic_init(&calls->refcnt, 1); + calls->instance_ptr = o; + + LDKFutureCallback ret = { + .this_arg = (void*) calls, + .call = call_LDKFutureCallback_jcall, + .free = LDKFutureCallback_JCalls_free, + }; + return ret; +} +uint64_t CS_LDK_LDKFutureCallback_new(int32_t o) { + LDKFutureCallback *res_ptr = MALLOC(sizeof(LDKFutureCallback), "LDKFutureCallback"); + *res_ptr = LDKFutureCallback_init(o); + return tag_ptr(res_ptr, true); +} +void CS_LDK_FutureCallback_call(int64_t this_arg) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKFutureCallback* this_arg_conv = (LDKFutureCallback*)this_arg_ptr; + (this_arg_conv->call)(this_arg_conv->this_arg); +} + typedef struct LDKEventHandler_JCalls { atomic_size_t refcnt; uint32_t instance_ptr; @@ -13720,7 +15075,7 @@ void handle_event_LDKEventHandler_jcall(const void* this_arg, LDKEvent event) { LDKEvent *event_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); *event_copy = event; int64_t event_ref = tag_ptr(event_copy, true); - js_invoke_function_void_l(j_calls->instance_ptr, 75, event_ref); + js_invoke_function_void_l(j_calls->instance_ptr, 78, event_ref); } static void LDKEventHandler_JCalls_cloned(LDKEventHandler* new_obj) { LDKEventHandler_JCalls *j_calls = (LDKEventHandler_JCalls*) new_obj->this_arg; @@ -13768,7 +15123,7 @@ void process_pending_events_LDKEventsProvider_jcall(const void* this_arg, LDKEve LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg; LDKEventHandler* handler_ret = MALLOC(sizeof(LDKEventHandler), "LDKEventHandler"); *handler_ret = handler; - js_invoke_function_void_l(j_calls->instance_ptr, 76, tag_ptr(handler_ret, true)); + js_invoke_function_void_l(j_calls->instance_ptr, 79, tag_ptr(handler_ret, true)); } static void LDKEventsProvider_JCalls_cloned(LDKEventsProvider* new_obj) { LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) new_obj->this_arg; @@ -13833,7 +15188,7 @@ static void LDKMessageSendEventsProvider_JCalls_free(void* this_arg) { } LDKCVec_MessageSendEventZ get_and_clear_pending_msg_events_LDKMessageSendEventsProvider_jcall(const void* this_arg) { LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg; - int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 77); + int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 80); LDKCVec_MessageSendEventZ ret_constr; ret_constr.datalen = ret->arr_len; if (ret_constr.datalen > 0) @@ -13912,7 +15267,7 @@ void handle_open_channel_LDKChannelMessageHandler_jcall(const void* this_arg, LD msg_var = OpenChannel_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_void_ll(j_calls->instance_ptr, 78, (int64_t)their_node_id_arr, msg_ref); + js_invoke_function_void_ll(j_calls->instance_ptr, 81, (int64_t)their_node_id_arr, msg_ref); } void handle_open_channel_v2_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKOpenChannelV2 * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -13923,7 +15278,7 @@ void handle_open_channel_v2_LDKChannelMessageHandler_jcall(const void* this_arg, msg_var = OpenChannelV2_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_void_ll(j_calls->instance_ptr, 79, (int64_t)their_node_id_arr, msg_ref); + js_invoke_function_void_ll(j_calls->instance_ptr, 82, (int64_t)their_node_id_arr, msg_ref); } void handle_accept_channel_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKAcceptChannel * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -13934,7 +15289,7 @@ void handle_accept_channel_LDKChannelMessageHandler_jcall(const void* this_arg, msg_var = AcceptChannel_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_void_ll(j_calls->instance_ptr, 80, (int64_t)their_node_id_arr, msg_ref); + js_invoke_function_void_ll(j_calls->instance_ptr, 83, (int64_t)their_node_id_arr, msg_ref); } void handle_accept_channel_v2_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKAcceptChannelV2 * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -13945,7 +15300,7 @@ void handle_accept_channel_v2_LDKChannelMessageHandler_jcall(const void* this_ar msg_var = AcceptChannelV2_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_void_ll(j_calls->instance_ptr, 81, (int64_t)their_node_id_arr, msg_ref); + js_invoke_function_void_ll(j_calls->instance_ptr, 84, (int64_t)their_node_id_arr, msg_ref); } void handle_funding_created_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingCreated * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -13956,7 +15311,7 @@ void handle_funding_created_LDKChannelMessageHandler_jcall(const void* this_arg, msg_var = FundingCreated_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_void_ll(j_calls->instance_ptr, 82, (int64_t)their_node_id_arr, msg_ref); + js_invoke_function_void_ll(j_calls->instance_ptr, 85, (int64_t)their_node_id_arr, msg_ref); } void handle_funding_signed_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingSigned * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -13967,7 +15322,7 @@ void handle_funding_signed_LDKChannelMessageHandler_jcall(const void* this_arg, msg_var = FundingSigned_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_void_ll(j_calls->instance_ptr, 83, (int64_t)their_node_id_arr, msg_ref); + js_invoke_function_void_ll(j_calls->instance_ptr, 86, (int64_t)their_node_id_arr, msg_ref); } void handle_channel_ready_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelReady * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -13978,7 +15333,7 @@ void handle_channel_ready_LDKChannelMessageHandler_jcall(const void* this_arg, L msg_var = ChannelReady_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_void_ll(j_calls->instance_ptr, 84, (int64_t)their_node_id_arr, msg_ref); + js_invoke_function_void_ll(j_calls->instance_ptr, 87, (int64_t)their_node_id_arr, msg_ref); } void handle_shutdown_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKShutdown * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -13989,7 +15344,7 @@ void handle_shutdown_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPub msg_var = Shutdown_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_void_ll(j_calls->instance_ptr, 85, (int64_t)their_node_id_arr, msg_ref); + js_invoke_function_void_ll(j_calls->instance_ptr, 88, (int64_t)their_node_id_arr, msg_ref); } void handle_closing_signed_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKClosingSigned * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -14000,7 +15355,7 @@ void handle_closing_signed_LDKChannelMessageHandler_jcall(const void* this_arg, msg_var = ClosingSigned_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_void_ll(j_calls->instance_ptr, 86, (int64_t)their_node_id_arr, msg_ref); + js_invoke_function_void_ll(j_calls->instance_ptr, 89, (int64_t)their_node_id_arr, msg_ref); } void handle_stfu_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKStfu * msg) { LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; @@ -14011,39 +15366,6 @@ void handle_stfu_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicK msg_var = Stfu_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_void_ll(j_calls->instance_ptr, 87, (int64_t)their_node_id_arr, msg_ref); -} -void handle_splice_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKSplice * msg) { - LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; - int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__); - memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33); - LDKSplice msg_var = *msg; - int64_t msg_ref = 0; - msg_var = Splice_clone(&msg_var); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); - msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_void_ll(j_calls->instance_ptr, 88, (int64_t)their_node_id_arr, msg_ref); -} -void handle_splice_ack_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKSpliceAck * msg) { - LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; - int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__); - memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33); - LDKSpliceAck msg_var = *msg; - int64_t msg_ref = 0; - msg_var = SpliceAck_clone(&msg_var); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); - msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_void_ll(j_calls->instance_ptr, 89, (int64_t)their_node_id_arr, msg_ref); -} -void handle_splice_locked_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKSpliceLocked * msg) { - LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg; - int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__); - memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33); - LDKSpliceLocked msg_var = *msg; - int64_t msg_ref = 0; - msg_var = SpliceLocked_clone(&msg_var); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); - msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); js_invoke_function_void_ll(j_calls->instance_ptr, 90, (int64_t)their_node_id_arr, msg_ref); } void handle_tx_add_input_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKTxAddInput * msg) { @@ -14340,9 +15662,6 @@ static inline LDKChannelMessageHandler LDKChannelMessageHandler_init (int64_t o, .handle_shutdown = handle_shutdown_LDKChannelMessageHandler_jcall, .handle_closing_signed = handle_closing_signed_LDKChannelMessageHandler_jcall, .handle_stfu = handle_stfu_LDKChannelMessageHandler_jcall, - .handle_splice = handle_splice_LDKChannelMessageHandler_jcall, - .handle_splice_ack = handle_splice_ack_LDKChannelMessageHandler_jcall, - .handle_splice_locked = handle_splice_locked_LDKChannelMessageHandler_jcall, .handle_tx_add_input = handle_tx_add_input_LDKChannelMessageHandler_jcall, .handle_tx_add_output = handle_tx_add_output_LDKChannelMessageHandler_jcall, .handle_tx_remove_input = handle_tx_remove_input_LDKChannelMessageHandler_jcall, @@ -14529,51 +15848,6 @@ void CS_LDK_ChannelMessageHandler_handle_stfu(int64_t this_arg, int8_tArray the (this_arg_conv->handle_stfu)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv); } -void CS_LDK_ChannelMessageHandler_handle_splice(int64_t this_arg, int8_tArray their_node_id, int64_t msg) { - void* this_arg_ptr = untag_ptr(this_arg); - if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } - LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr; - LDKPublicKey their_node_id_ref; - CHECK(their_node_id->arr_len == 33); - memcpy(their_node_id_ref.compressed_form, their_node_id->elems, 33); FREE(their_node_id); - LDKSplice msg_conv; - msg_conv.inner = untag_ptr(msg); - msg_conv.is_owned = ptr_is_owned(msg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv); - msg_conv.is_owned = false; - (this_arg_conv->handle_splice)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv); -} - -void CS_LDK_ChannelMessageHandler_handle_splice_ack(int64_t this_arg, int8_tArray their_node_id, int64_t msg) { - void* this_arg_ptr = untag_ptr(this_arg); - if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } - LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr; - LDKPublicKey their_node_id_ref; - CHECK(their_node_id->arr_len == 33); - memcpy(their_node_id_ref.compressed_form, their_node_id->elems, 33); FREE(their_node_id); - LDKSpliceAck msg_conv; - msg_conv.inner = untag_ptr(msg); - msg_conv.is_owned = ptr_is_owned(msg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv); - msg_conv.is_owned = false; - (this_arg_conv->handle_splice_ack)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv); -} - -void CS_LDK_ChannelMessageHandler_handle_splice_locked(int64_t this_arg, int8_tArray their_node_id, int64_t msg) { - void* this_arg_ptr = untag_ptr(this_arg); - if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } - LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr; - LDKPublicKey their_node_id_ref; - CHECK(their_node_id->arr_len == 33); - memcpy(their_node_id_ref.compressed_form, their_node_id->elems, 33); FREE(their_node_id); - LDKSpliceLocked msg_conv; - msg_conv.inner = untag_ptr(msg); - msg_conv.is_owned = ptr_is_owned(msg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv); - msg_conv.is_owned = false; - (this_arg_conv->handle_splice_locked)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv); -} - void CS_LDK_ChannelMessageHandler_handle_tx_add_input(int64_t this_arg, int8_tArray their_node_id, int64_t msg) { void* this_arg_ptr = untag_ptr(this_arg); if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } @@ -15033,6 +16307,55 @@ int64_tArray CS_LDK_OffersMessageHandler_release_pending_messages(int64_t this_ return ret_arr; } +typedef struct LDKNodeIdLookUp_JCalls { + atomic_size_t refcnt; + uint32_t instance_ptr; +} LDKNodeIdLookUp_JCalls; +static void LDKNodeIdLookUp_JCalls_free(void* this_arg) { + LDKNodeIdLookUp_JCalls *j_calls = (LDKNodeIdLookUp_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + FREE(j_calls); + } +} +LDKPublicKey next_node_id_LDKNodeIdLookUp_jcall(const void* this_arg, uint64_t short_channel_id) { + LDKNodeIdLookUp_JCalls *j_calls = (LDKNodeIdLookUp_JCalls*) this_arg; + int64_t short_channel_id_conv = short_channel_id; + int8_tArray ret = (int8_tArray)js_invoke_function_l_l(j_calls->instance_ptr, 118, short_channel_id_conv); + LDKPublicKey ret_ref; + CHECK(ret->arr_len == 33); + memcpy(ret_ref.compressed_form, ret->elems, 33); FREE(ret); + return ret_ref; +} +static void LDKNodeIdLookUp_JCalls_cloned(LDKNodeIdLookUp* new_obj) { + LDKNodeIdLookUp_JCalls *j_calls = (LDKNodeIdLookUp_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +} +static inline LDKNodeIdLookUp LDKNodeIdLookUp_init (int64_t o) { + LDKNodeIdLookUp_JCalls *calls = MALLOC(sizeof(LDKNodeIdLookUp_JCalls), "LDKNodeIdLookUp_JCalls"); + atomic_init(&calls->refcnt, 1); + calls->instance_ptr = o; + + LDKNodeIdLookUp ret = { + .this_arg = (void*) calls, + .next_node_id = next_node_id_LDKNodeIdLookUp_jcall, + .free = LDKNodeIdLookUp_JCalls_free, + }; + return ret; +} +uint64_t CS_LDK_LDKNodeIdLookUp_new(int32_t o) { + LDKNodeIdLookUp *res_ptr = MALLOC(sizeof(LDKNodeIdLookUp), "LDKNodeIdLookUp"); + *res_ptr = LDKNodeIdLookUp_init(o); + return tag_ptr(res_ptr, true); +} +int8_tArray CS_LDK_NodeIdLookUp_next_node_id(int64_t this_arg, int64_t short_channel_id) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKNodeIdLookUp* this_arg_conv = (LDKNodeIdLookUp*)this_arg_ptr; + int8_tArray ret_arr = init_int8_tArray(33, __LINE__); + memcpy(ret_arr->elems, (this_arg_conv->next_node_id)(this_arg_conv->this_arg, short_channel_id).compressed_form, 33); + return ret_arr; +} + typedef struct LDKRoutingMessageHandler_JCalls { atomic_size_t refcnt; uint32_t instance_ptr; @@ -15051,7 +16374,7 @@ LDKCResult_boolLightningErrorZ handle_node_announcement_LDKRoutingMessageHandler msg_var = NodeAnnouncement_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 118, msg_ref); + uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 119, msg_ref); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr); @@ -15065,7 +16388,7 @@ LDKCResult_boolLightningErrorZ handle_channel_announcement_LDKRoutingMessageHand msg_var = ChannelAnnouncement_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 119, msg_ref); + uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 120, msg_ref); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr); @@ -15079,7 +16402,7 @@ LDKCResult_boolLightningErrorZ handle_channel_update_LDKRoutingMessageHandler_jc msg_var = ChannelUpdate_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 120, msg_ref); + uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 121, msg_ref); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr); @@ -15089,7 +16412,7 @@ LDKCResult_boolLightningErrorZ handle_channel_update_LDKRoutingMessageHandler_jc LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ get_next_channel_announcement_LDKRoutingMessageHandler_jcall(const void* this_arg, uint64_t starting_point) { LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg; int64_t starting_point_conv = starting_point; - uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 121, starting_point_conv); + uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 122, starting_point_conv); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret_conv = *(LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ*)(ret_ptr); @@ -15102,7 +16425,7 @@ LDKNodeAnnouncement get_next_node_announcement_LDKRoutingMessageHandler_jcall(co int64_t starting_point_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(starting_point_var); starting_point_ref = tag_ptr(starting_point_var.inner, starting_point_var.is_owned); - uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 122, starting_point_ref); + uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 123, starting_point_ref); LDKNodeAnnouncement ret_conv; ret_conv.inner = untag_ptr(ret); ret_conv.is_owned = ptr_is_owned(ret); @@ -15119,7 +16442,7 @@ LDKCResult_NoneNoneZ peer_connected_LDKRoutingMessageHandler_jcall(const void* t CHECK_INNER_FIELD_ACCESS_OR_NULL(init_var); init_ref = tag_ptr(init_var.inner, init_var.is_owned); jboolean inbound_conv = inbound; - uint64_t ret = js_invoke_function_l_llb(j_calls->instance_ptr, 123, (int64_t)their_node_id_arr, init_ref, inbound_conv); + uint64_t ret = js_invoke_function_l_llb(j_calls->instance_ptr, 124, (int64_t)their_node_id_arr, init_ref, inbound_conv); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr); @@ -15134,7 +16457,7 @@ LDKCResult_NoneLightningErrorZ handle_reply_channel_range_LDKRoutingMessageHandl int64_t msg_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 124, (int64_t)their_node_id_arr, msg_ref); + uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 125, (int64_t)their_node_id_arr, msg_ref); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr); @@ -15149,7 +16472,7 @@ LDKCResult_NoneLightningErrorZ handle_reply_short_channel_ids_end_LDKRoutingMess int64_t msg_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 125, (int64_t)their_node_id_arr, msg_ref); + uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 126, (int64_t)their_node_id_arr, msg_ref); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr); @@ -15164,7 +16487,7 @@ LDKCResult_NoneLightningErrorZ handle_query_channel_range_LDKRoutingMessageHandl int64_t msg_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 126, (int64_t)their_node_id_arr, msg_ref); + uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 127, (int64_t)their_node_id_arr, msg_ref); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr); @@ -15179,7 +16502,7 @@ LDKCResult_NoneLightningErrorZ handle_query_short_channel_ids_LDKRoutingMessageH int64_t msg_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 127, (int64_t)their_node_id_arr, msg_ref); + uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 128, (int64_t)their_node_id_arr, msg_ref); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr); @@ -15188,11 +16511,11 @@ LDKCResult_NoneLightningErrorZ handle_query_short_channel_ids_LDKRoutingMessageH } bool processing_queue_high_LDKRoutingMessageHandler_jcall(const void* this_arg) { LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg; - return js_invoke_function_b_(j_calls->instance_ptr, 128); + return js_invoke_function_b_(j_calls->instance_ptr, 129); } LDKNodeFeatures provided_node_features_LDKRoutingMessageHandler_jcall(const void* this_arg) { LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg; - uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 129); + uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 130); LDKNodeFeatures ret_conv; ret_conv.inner = untag_ptr(ret); ret_conv.is_owned = ptr_is_owned(ret); @@ -15203,7 +16526,7 @@ LDKInitFeatures provided_init_features_LDKRoutingMessageHandler_jcall(const void LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg; int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__); memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33); - uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 130, (int64_t)their_node_id_arr); + uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 131, (int64_t)their_node_id_arr); LDKInitFeatures ret_conv; ret_conv.inner = untag_ptr(ret); ret_conv.is_owned = ptr_is_owned(ret); @@ -15444,7 +16767,7 @@ static void LDKOnionMessageHandler_JCalls_free(void* this_arg) { } LDKCVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ get_and_clear_connections_needed_LDKOnionMessageHandler_jcall(const void* this_arg) { LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg; - int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 131); + int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 132); LDKCVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ ret_constr; ret_constr.datalen = ret->arr_len; if (ret_constr.datalen > 0) @@ -15472,13 +16795,13 @@ void handle_onion_message_LDKOnionMessageHandler_jcall(const void* this_arg, LDK msg_var = OnionMessage_clone(&msg_var); CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var); msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned); - js_invoke_function_void_ll(j_calls->instance_ptr, 132, (int64_t)peer_node_id_arr, msg_ref); + js_invoke_function_void_ll(j_calls->instance_ptr, 133, (int64_t)peer_node_id_arr, msg_ref); } LDKOnionMessage next_onion_message_for_peer_LDKOnionMessageHandler_jcall(const void* this_arg, LDKPublicKey peer_node_id) { LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg; int8_tArray peer_node_id_arr = init_int8_tArray(33, __LINE__); memcpy(peer_node_id_arr->elems, peer_node_id.compressed_form, 33); - uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 133, (int64_t)peer_node_id_arr); + uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 134, (int64_t)peer_node_id_arr); LDKOnionMessage ret_conv; ret_conv.inner = untag_ptr(ret); ret_conv.is_owned = ptr_is_owned(ret); @@ -15495,7 +16818,7 @@ LDKCResult_NoneNoneZ peer_connected_LDKOnionMessageHandler_jcall(const void* thi CHECK_INNER_FIELD_ACCESS_OR_NULL(init_var); init_ref = tag_ptr(init_var.inner, init_var.is_owned); jboolean inbound_conv = inbound; - uint64_t ret = js_invoke_function_l_llb(j_calls->instance_ptr, 134, (int64_t)their_node_id_arr, init_ref, inbound_conv); + uint64_t ret = js_invoke_function_l_llb(j_calls->instance_ptr, 135, (int64_t)their_node_id_arr, init_ref, inbound_conv); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr); @@ -15506,15 +16829,15 @@ void peer_disconnected_LDKOnionMessageHandler_jcall(const void* this_arg, LDKPub LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg; int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__); memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33); - js_invoke_function_void_l(j_calls->instance_ptr, 135, (int64_t)their_node_id_arr); + js_invoke_function_void_l(j_calls->instance_ptr, 136, (int64_t)their_node_id_arr); } void timer_tick_occurred_LDKOnionMessageHandler_jcall(const void* this_arg) { LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg; - js_invoke_function_void_(j_calls->instance_ptr, 136); + js_invoke_function_void_(j_calls->instance_ptr, 137); } LDKNodeFeatures provided_node_features_LDKOnionMessageHandler_jcall(const void* this_arg) { LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg; - uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 137); + uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 138); LDKNodeFeatures ret_conv; ret_conv.inner = untag_ptr(ret); ret_conv.is_owned = ptr_is_owned(ret); @@ -15525,7 +16848,7 @@ LDKInitFeatures provided_init_features_LDKOnionMessageHandler_jcall(const void* LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg; int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__); memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33); - uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 138, (int64_t)their_node_id_arr); + uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 139, (int64_t)their_node_id_arr); LDKInitFeatures ret_conv; ret_conv.inner = untag_ptr(ret); ret_conv.is_owned = ptr_is_owned(ret); @@ -15682,7 +17005,7 @@ LDKCResult_COption_TypeZDecodeErrorZ read_LDKCustomMessageReader_jcall(const voi LDKu8slice buffer_var = buffer; int8_tArray buffer_arr = init_int8_tArray(buffer_var.datalen, __LINE__); memcpy(buffer_arr->elems, buffer_var.data, buffer_var.datalen); - uint64_t ret = js_invoke_function_l_sl(j_calls->instance_ptr, 139, message_type_conv, (int64_t)buffer_arr); + uint64_t ret = js_invoke_function_l_sl(j_calls->instance_ptr, 140, message_type_conv, (int64_t)buffer_arr); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_COption_TypeZDecodeErrorZ ret_conv = *(LDKCResult_COption_TypeZDecodeErrorZ*)(ret_ptr); @@ -15740,7 +17063,7 @@ LDKCResult_NoneLightningErrorZ handle_custom_message_LDKCustomMessageHandler_jca *msg_ret = msg; int8_tArray sender_node_id_arr = init_int8_tArray(33, __LINE__); memcpy(sender_node_id_arr->elems, sender_node_id.compressed_form, 33); - uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 140, tag_ptr(msg_ret, true), (int64_t)sender_node_id_arr); + uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 141, tag_ptr(msg_ret, true), (int64_t)sender_node_id_arr); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr); @@ -15749,7 +17072,7 @@ LDKCResult_NoneLightningErrorZ handle_custom_message_LDKCustomMessageHandler_jca } LDKCVec_C2Tuple_PublicKeyTypeZZ get_and_clear_pending_msg_LDKCustomMessageHandler_jcall(const void* this_arg) { LDKCustomMessageHandler_JCalls *j_calls = (LDKCustomMessageHandler_JCalls*) this_arg; - int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 141); + int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 142); LDKCVec_C2Tuple_PublicKeyTypeZZ ret_constr; ret_constr.datalen = ret->arr_len; if (ret_constr.datalen > 0) @@ -15770,7 +17093,7 @@ LDKCVec_C2Tuple_PublicKeyTypeZZ get_and_clear_pending_msg_LDKCustomMessageHandle } LDKNodeFeatures provided_node_features_LDKCustomMessageHandler_jcall(const void* this_arg) { LDKCustomMessageHandler_JCalls *j_calls = (LDKCustomMessageHandler_JCalls*) this_arg; - uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 142); + uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 143); LDKNodeFeatures ret_conv; ret_conv.inner = untag_ptr(ret); ret_conv.is_owned = ptr_is_owned(ret); @@ -15781,7 +17104,7 @@ LDKInitFeatures provided_init_features_LDKCustomMessageHandler_jcall(const void* LDKCustomMessageHandler_JCalls *j_calls = (LDKCustomMessageHandler_JCalls*) this_arg; int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__); memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33); - uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 143, (int64_t)their_node_id_arr); + uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 144, (int64_t)their_node_id_arr); LDKInitFeatures ret_conv; ret_conv.inner = untag_ptr(ret); ret_conv.is_owned = ptr_is_owned(ret); @@ -15891,7 +17214,7 @@ LDKCOption_OnionMessageContentsZ handle_custom_message_LDKCustomOnionMessageHand LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) this_arg; LDKOnionMessageContents* msg_ret = MALLOC(sizeof(LDKOnionMessageContents), "LDKOnionMessageContents"); *msg_ret = msg; - uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 144, tag_ptr(msg_ret, true)); + uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 145, tag_ptr(msg_ret, true)); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCOption_OnionMessageContentsZ ret_conv = *(LDKCOption_OnionMessageContentsZ*)(ret_ptr); @@ -15904,7 +17227,7 @@ LDKCResult_COption_OnionMessageContentsZDecodeErrorZ read_custom_message_LDKCust LDKu8slice buffer_var = buffer; int8_tArray buffer_arr = init_int8_tArray(buffer_var.datalen, __LINE__); memcpy(buffer_arr->elems, buffer_var.data, buffer_var.datalen); - uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 145, message_type_conv, (int64_t)buffer_arr); + uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 146, message_type_conv, (int64_t)buffer_arr); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_COption_OnionMessageContentsZDecodeErrorZ ret_conv = *(LDKCResult_COption_OnionMessageContentsZDecodeErrorZ*)(ret_ptr); @@ -15913,7 +17236,7 @@ LDKCResult_COption_OnionMessageContentsZDecodeErrorZ read_custom_message_LDKCust } LDKCVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ release_pending_custom_messages_LDKCustomOnionMessageHandler_jcall(const void* this_arg) { LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) this_arg; - int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 146); + int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 147); LDKCVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ ret_constr; ret_constr.datalen = ret->arr_len; if (ret_constr.datalen > 0) @@ -16019,21 +17342,21 @@ uintptr_t send_data_LDKSocketDescriptor_jcall(void* this_arg, LDKu8slice data, b int8_tArray data_arr = init_int8_tArray(data_var.datalen, __LINE__); memcpy(data_arr->elems, data_var.data, data_var.datalen); jboolean resume_read_conv = resume_read; - return js_invoke_function_l_lb(j_calls->instance_ptr, 147, (int64_t)data_arr, resume_read_conv); + return js_invoke_function_l_lb(j_calls->instance_ptr, 148, (int64_t)data_arr, resume_read_conv); } void disconnect_socket_LDKSocketDescriptor_jcall(void* this_arg) { LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg; - js_invoke_function_void_(j_calls->instance_ptr, 148); + js_invoke_function_void_(j_calls->instance_ptr, 149); } bool eq_LDKSocketDescriptor_jcall(const void* this_arg, const LDKSocketDescriptor * other_arg) { LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg; LDKSocketDescriptor *other_arg_clone = MALLOC(sizeof(LDKSocketDescriptor), "LDKSocketDescriptor"); *other_arg_clone = SocketDescriptor_clone(other_arg); - return js_invoke_function_b_l(j_calls->instance_ptr, 149, tag_ptr(other_arg_clone, true)); + return js_invoke_function_b_l(j_calls->instance_ptr, 150, tag_ptr(other_arg_clone, true)); } uint64_t hash_LDKSocketDescriptor_jcall(const void* this_arg) { LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg; - return js_invoke_function_l_(j_calls->instance_ptr, 150); + return js_invoke_function_l_(j_calls->instance_ptr, 151); } static void LDKSocketDescriptor_JCalls_cloned(LDKSocketDescriptor* new_obj) { LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) new_obj->this_arg; @@ -16087,6 +17410,138 @@ int64_t CS_LDK_SocketDescriptor_hash(int64_t this_arg) { return ret_conv; } +typedef struct LDKSignBolt12InvoiceFn_JCalls { + atomic_size_t refcnt; + uint32_t instance_ptr; +} LDKSignBolt12InvoiceFn_JCalls; +static void LDKSignBolt12InvoiceFn_JCalls_free(void* this_arg) { + LDKSignBolt12InvoiceFn_JCalls *j_calls = (LDKSignBolt12InvoiceFn_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + FREE(j_calls); + } +} +LDKCResult_SchnorrSignatureNoneZ sign_invoice_LDKSignBolt12InvoiceFn_jcall(const void* this_arg, const LDKUnsignedBolt12Invoice * message) { + LDKSignBolt12InvoiceFn_JCalls *j_calls = (LDKSignBolt12InvoiceFn_JCalls*) this_arg; + LDKUnsignedBolt12Invoice message_var = *message; + int64_t message_ref = 0; + message_var = UnsignedBolt12Invoice_clone(&message_var); + CHECK_INNER_FIELD_ACCESS_OR_NULL(message_var); + message_ref = tag_ptr(message_var.inner, message_var.is_owned); + uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 152, message_ref); + void* ret_ptr = untag_ptr(ret); + CHECK_ACCESS(ret_ptr); + LDKCResult_SchnorrSignatureNoneZ ret_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(ret_ptr); + FREE(untag_ptr(ret)); + return ret_conv; +} +static void LDKSignBolt12InvoiceFn_JCalls_cloned(LDKSignBolt12InvoiceFn* new_obj) { + LDKSignBolt12InvoiceFn_JCalls *j_calls = (LDKSignBolt12InvoiceFn_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +} +static inline LDKSignBolt12InvoiceFn LDKSignBolt12InvoiceFn_init (int64_t o) { + LDKSignBolt12InvoiceFn_JCalls *calls = MALLOC(sizeof(LDKSignBolt12InvoiceFn_JCalls), "LDKSignBolt12InvoiceFn_JCalls"); + atomic_init(&calls->refcnt, 1); + calls->instance_ptr = o; + + LDKSignBolt12InvoiceFn ret = { + .this_arg = (void*) calls, + .sign_invoice = sign_invoice_LDKSignBolt12InvoiceFn_jcall, + .free = LDKSignBolt12InvoiceFn_JCalls_free, + }; + return ret; +} +uint64_t CS_LDK_LDKSignBolt12InvoiceFn_new(int32_t o) { + LDKSignBolt12InvoiceFn *res_ptr = MALLOC(sizeof(LDKSignBolt12InvoiceFn), "LDKSignBolt12InvoiceFn"); + *res_ptr = LDKSignBolt12InvoiceFn_init(o); + return tag_ptr(res_ptr, true); +} +int64_t CS_LDK_SignBolt12InvoiceFn_sign_invoice(int64_t this_arg, int64_t message) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKSignBolt12InvoiceFn* this_arg_conv = (LDKSignBolt12InvoiceFn*)this_arg_ptr; + LDKUnsignedBolt12Invoice message_conv; + message_conv.inner = untag_ptr(message); + message_conv.is_owned = ptr_is_owned(message); + CHECK_INNER_FIELD_ACCESS_OR_NULL(message_conv); + message_conv.is_owned = false; + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = (this_arg_conv->sign_invoice)(this_arg_conv->this_arg, &message_conv); + return tag_ptr(ret_conv, true); +} + +typedef struct LDKSignInvoiceRequestFn_JCalls { + atomic_size_t refcnt; + uint32_t instance_ptr; +} LDKSignInvoiceRequestFn_JCalls; +static void LDKSignInvoiceRequestFn_JCalls_free(void* this_arg) { + LDKSignInvoiceRequestFn_JCalls *j_calls = (LDKSignInvoiceRequestFn_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + FREE(j_calls); + } +} +LDKCResult_SchnorrSignatureNoneZ sign_invoice_request_LDKSignInvoiceRequestFn_jcall(const void* this_arg, const LDKUnsignedInvoiceRequest * message) { + LDKSignInvoiceRequestFn_JCalls *j_calls = (LDKSignInvoiceRequestFn_JCalls*) this_arg; + LDKUnsignedInvoiceRequest message_var = *message; + int64_t message_ref = 0; + message_var = UnsignedInvoiceRequest_clone(&message_var); + CHECK_INNER_FIELD_ACCESS_OR_NULL(message_var); + message_ref = tag_ptr(message_var.inner, message_var.is_owned); + uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 153, message_ref); + void* ret_ptr = untag_ptr(ret); + CHECK_ACCESS(ret_ptr); + LDKCResult_SchnorrSignatureNoneZ ret_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(ret_ptr); + FREE(untag_ptr(ret)); + return ret_conv; +} +static void LDKSignInvoiceRequestFn_JCalls_cloned(LDKSignInvoiceRequestFn* new_obj) { + LDKSignInvoiceRequestFn_JCalls *j_calls = (LDKSignInvoiceRequestFn_JCalls*) new_obj->this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); +} +static inline LDKSignInvoiceRequestFn LDKSignInvoiceRequestFn_init (int64_t o) { + LDKSignInvoiceRequestFn_JCalls *calls = MALLOC(sizeof(LDKSignInvoiceRequestFn_JCalls), "LDKSignInvoiceRequestFn_JCalls"); + atomic_init(&calls->refcnt, 1); + calls->instance_ptr = o; + + LDKSignInvoiceRequestFn ret = { + .this_arg = (void*) calls, + .sign_invoice_request = sign_invoice_request_LDKSignInvoiceRequestFn_jcall, + .free = LDKSignInvoiceRequestFn_JCalls_free, + }; + return ret; +} +uint64_t CS_LDK_LDKSignInvoiceRequestFn_new(int32_t o) { + LDKSignInvoiceRequestFn *res_ptr = MALLOC(sizeof(LDKSignInvoiceRequestFn), "LDKSignInvoiceRequestFn"); + *res_ptr = LDKSignInvoiceRequestFn_init(o); + return tag_ptr(res_ptr, true); +} +int64_t CS_LDK_SignInvoiceRequestFn_sign_invoice_request(int64_t this_arg, int64_t message) { + void* this_arg_ptr = untag_ptr(this_arg); + if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); } + LDKSignInvoiceRequestFn* this_arg_conv = (LDKSignInvoiceRequestFn*)this_arg_ptr; + LDKUnsignedInvoiceRequest message_conv; + message_conv.inner = untag_ptr(message); + message_conv.is_owned = ptr_is_owned(message); + CHECK_INNER_FIELD_ACCESS_OR_NULL(message_conv); + message_conv.is_owned = false; + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = (this_arg_conv->sign_invoice_request)(this_arg_conv->this_arg, &message_conv); + return tag_ptr(ret_conv, true); +} + +uint32_t CS_LDK_LDKSignError_ty_from_ptr(int64_t ptr) { + LDKSignError *obj = (LDKSignError*)untag_ptr(ptr); + switch(obj->tag) { + case LDKSignError_Signing: return 0; + case LDKSignError_Verification: return 1; + default: abort(); + } +} +int32_t CS_LDK_LDKSignError_Verification_get_verification(int64_t ptr) { + LDKSignError *obj = (LDKSignError*)untag_ptr(ptr); + CHECK(obj->tag == LDKSignError_Verification); + int32_t verification_conv = LDKSecp256k1Error_to_cs(obj->verification); + return verification_conv; +} uint32_t CS_LDK_LDKEffectiveCapacity_ty_from_ptr(int64_t ptr) { LDKEffectiveCapacity *obj = (LDKEffectiveCapacity*)untag_ptr(ptr); switch(obj->tag) { @@ -16215,7 +17670,7 @@ static void LDKScore_JCalls_free(void* this_arg) { } LDKCVec_u8Z write_LDKScore_jcall(const void* this_arg) { LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg; - int8_tArray ret = (int8_tArray)js_invoke_function_l_(j_calls->instance_ptr, 151); + int8_tArray ret = (int8_tArray)js_invoke_function_l_(j_calls->instance_ptr, 154); LDKCVec_u8Z ret_ref; ret_ref.datalen = ret->arr_len; ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes"); @@ -16260,6 +17715,33 @@ int8_tArray CS_LDK_Score_write(int64_t this_arg) { return ret_arr; } +uint32_t CS_LDK_LDKIntroductionNode_ty_from_ptr(int64_t ptr) { + LDKIntroductionNode *obj = (LDKIntroductionNode*)untag_ptr(ptr); + switch(obj->tag) { + case LDKIntroductionNode_NodeId: return 0; + case LDKIntroductionNode_DirectedShortChannelId: return 1; + default: abort(); + } +} +int8_tArray CS_LDK_LDKIntroductionNode_NodeId_get_node_id(int64_t ptr) { + LDKIntroductionNode *obj = (LDKIntroductionNode*)untag_ptr(ptr); + CHECK(obj->tag == LDKIntroductionNode_NodeId); + int8_tArray node_id_arr = init_int8_tArray(33, __LINE__); + memcpy(node_id_arr->elems, obj->node_id.compressed_form, 33); + return node_id_arr; +} +int32_t CS_LDK_LDKIntroductionNode_DirectedShortChannelId_get__0(int64_t ptr) { + LDKIntroductionNode *obj = (LDKIntroductionNode*)untag_ptr(ptr); + CHECK(obj->tag == LDKIntroductionNode_DirectedShortChannelId); + int32_t _0_conv = LDKDirection_to_cs(obj->directed_short_channel_id._0); + return _0_conv; +} +int64_t CS_LDK_LDKIntroductionNode_DirectedShortChannelId_get__1(int64_t ptr) { + LDKIntroductionNode *obj = (LDKIntroductionNode*)untag_ptr(ptr); + CHECK(obj->tag == LDKIntroductionNode_DirectedShortChannelId); + int64_t _1_conv = obj->directed_short_channel_id._1; + return _1_conv; +} typedef struct LDKCoinSelectionSource_JCalls { atomic_size_t refcnt; uint32_t instance_ptr; @@ -16299,7 +17781,7 @@ LDKCResult_CoinSelectionNoneZ select_confirmed_utxos_LDKCoinSelectionSource_jcal FREE(must_pay_to_var.data); int32_t target_feerate_sat_per_1000_weight_conv = target_feerate_sat_per_1000_weight; - uint64_t ret = js_invoke_function_l_llli(j_calls->instance_ptr, 152, (int64_t)claim_id_arr, (int64_t)must_spend_arr, (int64_t)must_pay_to_arr, target_feerate_sat_per_1000_weight_conv); + uint64_t ret = js_invoke_function_l_llli(j_calls->instance_ptr, 155, (int64_t)claim_id_arr, (int64_t)must_spend_arr, (int64_t)must_pay_to_arr, target_feerate_sat_per_1000_weight_conv); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_CoinSelectionNoneZ ret_conv = *(LDKCResult_CoinSelectionNoneZ*)(ret_ptr); @@ -16312,7 +17794,7 @@ LDKCResult_TransactionNoneZ sign_psbt_LDKCoinSelectionSource_jcall(const void* t int8_tArray psbt_arr = init_int8_tArray(psbt_var.datalen, __LINE__); memcpy(psbt_arr->elems, psbt_var.data, psbt_var.datalen); CVec_u8Z_free(psbt_var); - uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 153, (int64_t)psbt_arr); + uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 156, (int64_t)psbt_arr); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_TransactionNoneZ ret_conv = *(LDKCResult_TransactionNoneZ*)(ret_ptr); @@ -16411,7 +17893,7 @@ static void LDKWalletSource_JCalls_free(void* this_arg) { } LDKCResult_CVec_UtxoZNoneZ list_confirmed_utxos_LDKWalletSource_jcall(const void* this_arg) { LDKWalletSource_JCalls *j_calls = (LDKWalletSource_JCalls*) this_arg; - uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 154); + uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 157); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_CVec_UtxoZNoneZ ret_conv = *(LDKCResult_CVec_UtxoZNoneZ*)(ret_ptr); @@ -16420,7 +17902,7 @@ LDKCResult_CVec_UtxoZNoneZ list_confirmed_utxos_LDKWalletSource_jcall(const void } LDKCResult_CVec_u8ZNoneZ get_change_script_LDKWalletSource_jcall(const void* this_arg) { LDKWalletSource_JCalls *j_calls = (LDKWalletSource_JCalls*) this_arg; - uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 155); + uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 158); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_CVec_u8ZNoneZ ret_conv = *(LDKCResult_CVec_u8ZNoneZ*)(ret_ptr); @@ -16433,7 +17915,7 @@ LDKCResult_TransactionNoneZ sign_psbt_LDKWalletSource_jcall(const void* this_arg int8_tArray psbt_arr = init_int8_tArray(psbt_var.datalen, __LINE__); memcpy(psbt_arr->elems, psbt_var.data, psbt_var.datalen); CVec_u8Z_free(psbt_var); - uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 156, (int64_t)psbt_arr); + uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 159, (int64_t)psbt_arr); void* ret_ptr = untag_ptr(ret); CHECK_ACCESS(ret_ptr); LDKCResult_TransactionNoneZ ret_conv = *(LDKCResult_TransactionNoneZ*)(ret_ptr); @@ -16651,6 +18133,24 @@ int64_t CS_LDK_BigEndianScalar_new(int8_tArray big_endian_bytes) { return tag_ptr(ret_ref, true); } +static inline uint64_t BigEndianScalar_clone_ptr(LDKBigEndianScalar *NONNULL_PTR arg) { + LDKBigEndianScalar* ret_ref = MALLOC(sizeof(LDKBigEndianScalar), "LDKBigEndianScalar"); + *ret_ref = BigEndianScalar_clone(arg); + return tag_ptr(ret_ref, true); +} +int64_t CS_LDK_BigEndianScalar_clone_ptr(int64_t arg) { + LDKBigEndianScalar* arg_conv = (LDKBigEndianScalar*)untag_ptr(arg); + int64_t ret_conv = BigEndianScalar_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_BigEndianScalar_clone(int64_t orig) { + LDKBigEndianScalar* orig_conv = (LDKBigEndianScalar*)untag_ptr(orig); + LDKBigEndianScalar* ret_ref = MALLOC(sizeof(LDKBigEndianScalar), "LDKBigEndianScalar"); + *ret_ref = BigEndianScalar_clone(orig_conv); + return tag_ptr(ret_ref, true); +} + static inline uint64_t Bech32Error_clone_ptr(LDKBech32Error *NONNULL_PTR arg) { LDKBech32Error *ret_copy = MALLOC(sizeof(LDKBech32Error), "LDKBech32Error"); *ret_copy = Bech32Error_clone(arg); @@ -16817,6 +18317,116 @@ void CS_LDK_Str_free(jstring _res) { Str_free(dummy); } +void CS_LDK_CVec_u8Z_free(int8_tArray _res) { + LDKCVec_u8Z _res_ref; + _res_ref.datalen = _res->arr_len; + _res_ref.data = MALLOC(_res_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(_res_ref.data, _res->elems, _res_ref.datalen); FREE(_res); + CVec_u8Z_free(_res_ref); +} + +int64_t CS_LDK_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(int64_t o) { + LDKRefundMaybeWithDerivedMetadataBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&o_conv); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(int32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_cs(e); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(int64_t o) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(int64_t arg) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* arg_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(int64_t orig) { + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* orig_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_RefundBolt12SemanticErrorZ_ok(int64_t o) { + LDKRefund o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = Refund_clone(&o_conv); + LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_RefundBolt12SemanticErrorZ_err(int32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_cs(e); + LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_RefundBolt12SemanticErrorZ_is_ok(int64_t o) { + LDKCResult_RefundBolt12SemanticErrorZ* o_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_RefundBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_RefundBolt12SemanticErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_RefundBolt12SemanticErrorZ _res_conv = *(LDKCResult_RefundBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_RefundBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_RefundBolt12SemanticErrorZ_clone_ptr(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_RefundBolt12SemanticErrorZ_clone_ptr(int64_t arg) { + LDKCResult_RefundBolt12SemanticErrorZ* arg_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_RefundBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_RefundBolt12SemanticErrorZ_clone(int64_t orig) { + LDKCResult_RefundBolt12SemanticErrorZ* orig_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ"); + *ret_conv = CResult_RefundBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + int64_t CS_LDK_COption_u64Z_some(int64_t o) { LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z"); *ret_copy = COption_u64Z_some(o); @@ -17123,14 +18733,6 @@ int64_t CS_LDK_COption_ThirtyTwoBytesZ_clone(int64_t orig) { return ret_ref; } -void CS_LDK_CVec_u8Z_free(int8_tArray _res) { - LDKCVec_u8Z _res_ref; - _res_ref.datalen = _res->arr_len; - _res_ref.data = MALLOC(_res_ref.datalen, "LDKCVec_u8Z Bytes"); - memcpy(_res_ref.data, _res->elems, _res_ref.datalen); FREE(_res); - CVec_u8Z_free(_res_ref); -} - int64_t CS_LDK_COption_CVec_u8ZZ_some(int8_tArray o) { LDKCVec_u8Z o_ref; o_ref.datalen = o->arr_len; @@ -17339,6 +18941,156 @@ int64_t CS_LDK_CResult_RecipientOnionFieldsNoneZ_clone(int64_t orig) { return tag_ptr(ret_conv, true); } +int64_t CS_LDK_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok(int64_t o) { + LDKUnsignedBolt12Invoice o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = UnsignedBolt12Invoice_clone(&o_conv); + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err(int32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_cs(e); + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(int64_t o) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* o_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ _res_conv = *(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(int64_t arg) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* arg_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(int64_t orig) { + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* orig_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok(int64_t o) { + LDKBolt12Invoice o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = Bolt12Invoice_clone(&o_conv); + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_Bolt12InvoiceBolt12SemanticErrorZ_err(int32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_cs(e); + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(int64_t o) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* o_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_Bolt12InvoiceBolt12SemanticErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ _res_conv = *(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_Bolt12InvoiceBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(int64_t arg) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* arg_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(int64_t orig) { + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* orig_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_SchnorrSignatureNoneZ_ok(int8_tArray o) { + LDKSchnorrSignature o_ref; + CHECK(o->arr_len == 64); + memcpy(o_ref.compact_form, o->elems, 64); FREE(o); + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = CResult_SchnorrSignatureNoneZ_ok(o_ref); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_SchnorrSignatureNoneZ_err() { + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = CResult_SchnorrSignatureNoneZ_err(); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_SchnorrSignatureNoneZ_is_ok(int64_t o) { + LDKCResult_SchnorrSignatureNoneZ* o_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(o); + jboolean ret_conv = CResult_SchnorrSignatureNoneZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_SchnorrSignatureNoneZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_SchnorrSignatureNoneZ _res_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_SchnorrSignatureNoneZ_free(_res_conv); +} + +static inline uint64_t CResult_SchnorrSignatureNoneZ_clone_ptr(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR arg) { + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = CResult_SchnorrSignatureNoneZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_SchnorrSignatureNoneZ_clone_ptr(int64_t arg) { + LDKCResult_SchnorrSignatureNoneZ* arg_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(arg); + int64_t ret_conv = CResult_SchnorrSignatureNoneZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_SchnorrSignatureNoneZ_clone(int64_t orig) { + LDKCResult_SchnorrSignatureNoneZ* orig_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(orig); + LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); + *ret_conv = CResult_SchnorrSignatureNoneZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + void CS_LDK_CVec_ThirtyTwoBytesZ_free(ptrArray _res) { LDKCVec_ThirtyTwoBytesZ _res_constr; _res_constr.datalen = _res->arr_len; @@ -17416,6 +19168,100 @@ int64_t CS_LDK_COption_CVec_ThirtyTwoBytesZZ_clone(int64_t orig) { return ret_ref; } +int64_t CS_LDK_COption_AmountZ_some(int64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKAmount o_conv = *(LDKAmount*)(o_ptr); + o_conv = Amount_clone((LDKAmount*)untag_ptr(o)); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = COption_AmountZ_some(o_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_COption_AmountZ_none() { + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = COption_AmountZ_none(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void CS_LDK_COption_AmountZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCOption_AmountZ _res_conv = *(LDKCOption_AmountZ*)(_res_ptr); + FREE(untag_ptr(_res)); + COption_AmountZ_free(_res_conv); +} + +static inline uint64_t COption_AmountZ_clone_ptr(LDKCOption_AmountZ *NONNULL_PTR arg) { + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = COption_AmountZ_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t CS_LDK_COption_AmountZ_clone_ptr(int64_t arg) { + LDKCOption_AmountZ* arg_conv = (LDKCOption_AmountZ*)untag_ptr(arg); + int64_t ret_conv = COption_AmountZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_COption_AmountZ_clone(int64_t orig) { + LDKCOption_AmountZ* orig_conv = (LDKCOption_AmountZ*)untag_ptr(orig); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = COption_AmountZ_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_COption_QuantityZ_some(int64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKQuantity o_conv = *(LDKQuantity*)(o_ptr); + o_conv = Quantity_clone((LDKQuantity*)untag_ptr(o)); + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = COption_QuantityZ_some(o_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_COption_QuantityZ_none() { + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = COption_QuantityZ_none(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void CS_LDK_COption_QuantityZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCOption_QuantityZ _res_conv = *(LDKCOption_QuantityZ*)(_res_ptr); + FREE(untag_ptr(_res)); + COption_QuantityZ_free(_res_conv); +} + +static inline uint64_t COption_QuantityZ_clone_ptr(LDKCOption_QuantityZ *NONNULL_PTR arg) { + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = COption_QuantityZ_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t CS_LDK_COption_QuantityZ_clone_ptr(int64_t arg) { + LDKCOption_QuantityZ* arg_conv = (LDKCOption_QuantityZ*)untag_ptr(arg); + int64_t ret_conv = COption_QuantityZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_COption_QuantityZ_clone(int64_t orig) { + LDKCOption_QuantityZ* orig_conv = (LDKCOption_QuantityZ*)untag_ptr(orig); + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = COption_QuantityZ_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + int64_t CS_LDK_CResult_ThirtyTwoBytesNoneZ_ok(int8_tArray o) { LDKThirtyTwoBytes o_ref; CHECK(o->arr_len == 32); @@ -18053,7 +19899,7 @@ int64_t CS_LDK_COption_BigEndianScalarZ_some(int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); LDKBigEndianScalar o_conv = *(LDKBigEndianScalar*)(o_ptr); - // WARNING: we may need a move here but no clone is available for LDKBigEndianScalar + o_conv = BigEndianScalar_clone((LDKBigEndianScalar*)untag_ptr(o)); LDKCOption_BigEndianScalarZ *ret_copy = MALLOC(sizeof(LDKCOption_BigEndianScalarZ), "LDKCOption_BigEndianScalarZ"); *ret_copy = COption_BigEndianScalarZ_some(o_conv); int64_t ret_ref = tag_ptr(ret_copy, true); @@ -18161,54 +20007,6 @@ int64_t CS_LDK_CResult_RecoverableSignatureNoneZ_clone(int64_t orig) { return tag_ptr(ret_conv, true); } -int64_t CS_LDK_CResult_SchnorrSignatureNoneZ_ok(int8_tArray o) { - LDKSchnorrSignature o_ref; - CHECK(o->arr_len == 64); - memcpy(o_ref.compact_form, o->elems, 64); FREE(o); - LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); - *ret_conv = CResult_SchnorrSignatureNoneZ_ok(o_ref); - return tag_ptr(ret_conv, true); -} - -int64_t CS_LDK_CResult_SchnorrSignatureNoneZ_err() { - LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); - *ret_conv = CResult_SchnorrSignatureNoneZ_err(); - return tag_ptr(ret_conv, true); -} - -jboolean CS_LDK_CResult_SchnorrSignatureNoneZ_is_ok(int64_t o) { - LDKCResult_SchnorrSignatureNoneZ* o_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(o); - jboolean ret_conv = CResult_SchnorrSignatureNoneZ_is_ok(o_conv); - return ret_conv; -} - -void CS_LDK_CResult_SchnorrSignatureNoneZ_free(int64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKCResult_SchnorrSignatureNoneZ _res_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(_res_ptr); - FREE(untag_ptr(_res)); - CResult_SchnorrSignatureNoneZ_free(_res_conv); -} - -static inline uint64_t CResult_SchnorrSignatureNoneZ_clone_ptr(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR arg) { - LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); - *ret_conv = CResult_SchnorrSignatureNoneZ_clone(arg); - return tag_ptr(ret_conv, true); -} -int64_t CS_LDK_CResult_SchnorrSignatureNoneZ_clone_ptr(int64_t arg) { - LDKCResult_SchnorrSignatureNoneZ* arg_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(arg); - int64_t ret_conv = CResult_SchnorrSignatureNoneZ_clone_ptr(arg_conv); - return ret_conv; -} - -int64_t CS_LDK_CResult_SchnorrSignatureNoneZ_clone(int64_t orig) { - LDKCResult_SchnorrSignatureNoneZ* orig_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(orig); - LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ"); - *ret_conv = CResult_SchnorrSignatureNoneZ_clone(orig_conv); - return tag_ptr(ret_conv, true); -} - int64_t CS_LDK_CResult_ECDSASignatureNoneZ_ok(int8_tArray o) { LDKECDSASignature o_ref; CHECK(o->arr_len == 64); @@ -18257,6 +20055,56 @@ int64_t CS_LDK_CResult_ECDSASignatureNoneZ_clone(int64_t orig) { return tag_ptr(ret_conv, true); } +int64_t CS_LDK_CResult_TransactionNoneZ_ok(int8_tArray o) { + LDKTransaction o_ref; + o_ref.datalen = o->arr_len; + o_ref.data = MALLOC(o_ref.datalen, "LDKTransaction Bytes"); + memcpy(o_ref.data, o->elems, o_ref.datalen); FREE(o); + o_ref.data_is_owned = true; + LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); + *ret_conv = CResult_TransactionNoneZ_ok(o_ref); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_TransactionNoneZ_err() { + LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); + *ret_conv = CResult_TransactionNoneZ_err(); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_TransactionNoneZ_is_ok(int64_t o) { + LDKCResult_TransactionNoneZ* o_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(o); + jboolean ret_conv = CResult_TransactionNoneZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_TransactionNoneZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_TransactionNoneZ _res_conv = *(LDKCResult_TransactionNoneZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_TransactionNoneZ_free(_res_conv); +} + +static inline uint64_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg) { + LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); + *ret_conv = CResult_TransactionNoneZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_TransactionNoneZ_clone_ptr(int64_t arg) { + LDKCResult_TransactionNoneZ* arg_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(arg); + int64_t ret_conv = CResult_TransactionNoneZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_TransactionNoneZ_clone(int64_t orig) { + LDKCResult_TransactionNoneZ* orig_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(orig); + LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); + *ret_conv = CResult_TransactionNoneZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + int64_t CS_LDK_CResult_WriteableEcdsaChannelSignerDecodeErrorZ_ok(int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -18721,56 +20569,6 @@ int64_t CS_LDK_CResult_InMemorySignerDecodeErrorZ_clone(int64_t orig) { return tag_ptr(ret_conv, true); } -int64_t CS_LDK_CResult_TransactionNoneZ_ok(int8_tArray o) { - LDKTransaction o_ref; - o_ref.datalen = o->arr_len; - o_ref.data = MALLOC(o_ref.datalen, "LDKTransaction Bytes"); - memcpy(o_ref.data, o->elems, o_ref.datalen); FREE(o); - o_ref.data_is_owned = true; - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = CResult_TransactionNoneZ_ok(o_ref); - return tag_ptr(ret_conv, true); -} - -int64_t CS_LDK_CResult_TransactionNoneZ_err() { - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = CResult_TransactionNoneZ_err(); - return tag_ptr(ret_conv, true); -} - -jboolean CS_LDK_CResult_TransactionNoneZ_is_ok(int64_t o) { - LDKCResult_TransactionNoneZ* o_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(o); - jboolean ret_conv = CResult_TransactionNoneZ_is_ok(o_conv); - return ret_conv; -} - -void CS_LDK_CResult_TransactionNoneZ_free(int64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKCResult_TransactionNoneZ _res_conv = *(LDKCResult_TransactionNoneZ*)(_res_ptr); - FREE(untag_ptr(_res)); - CResult_TransactionNoneZ_free(_res_conv); -} - -static inline uint64_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg) { - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = CResult_TransactionNoneZ_clone(arg); - return tag_ptr(ret_conv, true); -} -int64_t CS_LDK_CResult_TransactionNoneZ_clone_ptr(int64_t arg) { - LDKCResult_TransactionNoneZ* arg_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(arg); - int64_t ret_conv = CResult_TransactionNoneZ_clone_ptr(arg_conv); - return ret_conv; -} - -int64_t CS_LDK_CResult_TransactionNoneZ_clone(int64_t orig) { - LDKCResult_TransactionNoneZ* orig_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(orig); - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = CResult_TransactionNoneZ_clone(orig_conv); - return tag_ptr(ret_conv, true); -} - int64_t CS_LDK_COption_WriteableScoreZ_some(int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -20028,6 +21826,60 @@ void CS_LDK_CResult_ProbabilisticScorerDecodeErrorZ_free(int64_t _res) { CResult_ProbabilisticScorerDecodeErrorZ_free(_res_conv); } +int64_t CS_LDK_CResult_BestBlockDecodeErrorZ_ok(int64_t o) { + LDKBestBlock o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = BestBlock_clone(&o_conv); + LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ"); + *ret_conv = CResult_BestBlockDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_BestBlockDecodeErrorZ_err(int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ"); + *ret_conv = CResult_BestBlockDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_BestBlockDecodeErrorZ_is_ok(int64_t o) { + LDKCResult_BestBlockDecodeErrorZ* o_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_BestBlockDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_BestBlockDecodeErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_BestBlockDecodeErrorZ _res_conv = *(LDKCResult_BestBlockDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_BestBlockDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_BestBlockDecodeErrorZ_clone_ptr(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ"); + *ret_conv = CResult_BestBlockDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_BestBlockDecodeErrorZ_clone_ptr(int64_t arg) { + LDKCResult_BestBlockDecodeErrorZ* arg_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_BestBlockDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_BestBlockDecodeErrorZ_clone(int64_t orig) { + LDKCResult_BestBlockDecodeErrorZ* orig_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(orig); + LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ"); + *ret_conv = CResult_BestBlockDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + static inline uint64_t C2Tuple_usizeTransactionZ_clone_ptr(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR arg) { LDKC2Tuple_usizeTransactionZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ"); *ret_conv = C2Tuple_usizeTransactionZ_clone(arg); @@ -20212,81 +22064,86 @@ void CS_LDK_CVec_MonitorEventZ_free(int64_tArray _res) { CVec_MonitorEventZ_free(_res_constr); } -static inline uint64_t C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR arg) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ"); - *ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(arg); +static inline uint64_t C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR arg) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ"); + *ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(arg); return tag_ptr(ret_conv, true); } -int64_t CS_LDK_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(int64_t arg) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* arg_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(arg); - int64_t ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(arg_conv); +int64_t CS_LDK_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(int64_t arg) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* arg_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(arg); + int64_t ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(arg_conv); return ret_conv; } -int64_t CS_LDK_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(int64_t orig) { - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* orig_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(orig); - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ"); - *ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(orig_conv); +int64_t CS_LDK_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(int64_t orig) { + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* orig_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(orig); + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ"); + *ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(orig_conv); return tag_ptr(ret_conv, true); } -int64_t CS_LDK_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(int64_t a, int64_tArray b, int8_tArray c) { +int64_t CS_LDK_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new(int64_t a, int64_t b, int64_tArray c, int8_tArray d) { LDKOutPoint a_conv; a_conv.inner = untag_ptr(a); a_conv.is_owned = ptr_is_owned(a); CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); a_conv = OutPoint_clone(&a_conv); - LDKCVec_MonitorEventZ b_constr; - b_constr.datalen = b->arr_len; - if (b_constr.datalen > 0) - b_constr.data = MALLOC(b_constr.datalen * sizeof(LDKMonitorEvent), "LDKCVec_MonitorEventZ Elements"); + LDKChannelId b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv = ChannelId_clone(&b_conv); + LDKCVec_MonitorEventZ c_constr; + c_constr.datalen = c->arr_len; + if (c_constr.datalen > 0) + c_constr.data = MALLOC(c_constr.datalen * sizeof(LDKMonitorEvent), "LDKCVec_MonitorEventZ Elements"); else - b_constr.data = NULL; - int64_t* b_vals = b->elems; - for (size_t o = 0; o < b_constr.datalen; o++) { - int64_t b_conv_14 = b_vals[o]; - void* b_conv_14_ptr = untag_ptr(b_conv_14); - CHECK_ACCESS(b_conv_14_ptr); - LDKMonitorEvent b_conv_14_conv = *(LDKMonitorEvent*)(b_conv_14_ptr); - b_conv_14_conv = MonitorEvent_clone((LDKMonitorEvent*)untag_ptr(b_conv_14)); - b_constr.data[o] = b_conv_14_conv; - } - FREE(b); - LDKPublicKey c_ref; - CHECK(c->arr_len == 33); - memcpy(c_ref.compressed_form, c->elems, 33); FREE(c); - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ"); - *ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(a_conv, b_constr, c_ref); - return tag_ptr(ret_conv, true); -} - -void CS_LDK_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(int64_t _res) { + c_constr.data = NULL; + int64_t* c_vals = c->elems; + for (size_t o = 0; o < c_constr.datalen; o++) { + int64_t c_conv_14 = c_vals[o]; + void* c_conv_14_ptr = untag_ptr(c_conv_14); + CHECK_ACCESS(c_conv_14_ptr); + LDKMonitorEvent c_conv_14_conv = *(LDKMonitorEvent*)(c_conv_14_ptr); + c_conv_14_conv = MonitorEvent_clone((LDKMonitorEvent*)untag_ptr(c_conv_14)); + c_constr.data[o] = c_conv_14_conv; + } + FREE(c); + LDKPublicKey d_ref; + CHECK(d->arr_len == 33); + memcpy(d_ref.compressed_form, d->elems, 33); FREE(d); + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ"); + *ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new(a_conv, b_conv, c_constr, d_ref); + return tag_ptr(ret_conv, true); +} + +void CS_LDK_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free(int64_t _res) { if (!ptr_is_owned(_res)) return; void* _res_ptr = untag_ptr(_res); CHECK_ACCESS(_res_ptr); - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ _res_conv = *(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)(_res_ptr); + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ _res_conv = *(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)(_res_ptr); FREE(untag_ptr(_res)); - C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(_res_conv); + C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free(_res_conv); } -void CS_LDK_CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free(int64_tArray _res) { - LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ _res_constr; +void CS_LDK_CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free(int64_tArray _res) { + LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ _res_constr; _res_constr.datalen = _res->arr_len; if (_res_constr.datalen > 0) - _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ Elements"); + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ Elements"); else _res_constr.data = NULL; int64_t* _res_vals = _res->elems; - for (size_t x = 0; x < _res_constr.datalen; x++) { - int64_t _res_conv_49 = _res_vals[x]; - void* _res_conv_49_ptr = untag_ptr(_res_conv_49); - CHECK_ACCESS(_res_conv_49_ptr); - LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ _res_conv_49_conv = *(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)(_res_conv_49_ptr); - FREE(untag_ptr(_res_conv_49)); - _res_constr.data[x] = _res_conv_49_conv; + for (size_t f = 0; f < _res_constr.datalen; f++) { + int64_t _res_conv_57 = _res_vals[f]; + void* _res_conv_57_ptr = untag_ptr(_res_conv_57); + CHECK_ACCESS(_res_conv_57_ptr); + LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ _res_conv_57_conv = *(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)(_res_conv_57_ptr); + FREE(untag_ptr(_res_conv_57)); + _res_constr.data[f] = _res_conv_57_conv; } FREE(_res); - CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free(_res_constr); + CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free(_res_constr); } int64_t CS_LDK_CResult_InitFeaturesDecodeErrorZ_ok(int64_t o) { @@ -20667,6 +22524,225 @@ int64_t CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_clone(int64_t orig) { return tag_ptr(ret_conv, true); } +int64_t CS_LDK_CResult_OfferIdDecodeErrorZ_ok(int64_t o) { + LDKOfferId o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = OfferId_clone(&o_conv); + LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ"); + *ret_conv = CResult_OfferIdDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_OfferIdDecodeErrorZ_err(int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ"); + *ret_conv = CResult_OfferIdDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_OfferIdDecodeErrorZ_is_ok(int64_t o) { + LDKCResult_OfferIdDecodeErrorZ* o_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_OfferIdDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_OfferIdDecodeErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_OfferIdDecodeErrorZ _res_conv = *(LDKCResult_OfferIdDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_OfferIdDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_OfferIdDecodeErrorZ_clone_ptr(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ"); + *ret_conv = CResult_OfferIdDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_OfferIdDecodeErrorZ_clone_ptr(int64_t arg) { + LDKCResult_OfferIdDecodeErrorZ* arg_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_OfferIdDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_OfferIdDecodeErrorZ_clone(int64_t orig) { + LDKCResult_OfferIdDecodeErrorZ* orig_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(orig); + LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ"); + *ret_conv = CResult_OfferIdDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_NoneBolt12SemanticErrorZ_ok() { + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = CResult_NoneBolt12SemanticErrorZ_ok(); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_NoneBolt12SemanticErrorZ_err(int32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_cs(e); + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = CResult_NoneBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_NoneBolt12SemanticErrorZ_is_ok(int64_t o) { + LDKCResult_NoneBolt12SemanticErrorZ* o_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_NoneBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_NoneBolt12SemanticErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_NoneBolt12SemanticErrorZ _res_conv = *(LDKCResult_NoneBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_NoneBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_NoneBolt12SemanticErrorZ_clone_ptr(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_NoneBolt12SemanticErrorZ_clone_ptr(int64_t arg) { + LDKCResult_NoneBolt12SemanticErrorZ* arg_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_NoneBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_NoneBolt12SemanticErrorZ_clone(int64_t orig) { + LDKCResult_NoneBolt12SemanticErrorZ* orig_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_OfferBolt12SemanticErrorZ_ok(int64_t o) { + LDKOffer o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = Offer_clone(&o_conv); + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_OfferBolt12SemanticErrorZ_err(int32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_cs(e); + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_OfferBolt12SemanticErrorZ_is_ok(int64_t o) { + LDKCResult_OfferBolt12SemanticErrorZ* o_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_OfferBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_OfferBolt12SemanticErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_OfferBolt12SemanticErrorZ _res_conv = *(LDKCResult_OfferBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_OfferBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_OfferBolt12SemanticErrorZ_clone_ptr(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_OfferBolt12SemanticErrorZ_clone_ptr(int64_t arg) { + LDKCResult_OfferBolt12SemanticErrorZ* arg_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_OfferBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_OfferBolt12SemanticErrorZ_clone(int64_t orig) { + LDKCResult_OfferBolt12SemanticErrorZ* orig_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(int64_t o) { + LDKInvoiceRequestWithDerivedPayerIdBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(int32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_cs(e); + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(int64_t o) { + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(_res_conv); +} + +int64_t CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok(int64_t o) { + LDKInvoiceRequestWithExplicitPayerIdBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(int32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_cs(e); + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(int64_t o) { + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(_res_conv); +} + int64_t CS_LDK_CResult_OfferBolt12ParseErrorZ_ok(int64_t o) { LDKOffer o_conv; o_conv.inner = untag_ptr(o); @@ -20722,55 +22798,6 @@ int64_t CS_LDK_CResult_OfferBolt12ParseErrorZ_clone(int64_t orig) { return tag_ptr(ret_conv, true); } -int64_t CS_LDK_CResult_PublicKeySecp256k1ErrorZ_ok(int8_tArray o) { - LDKPublicKey o_ref; - CHECK(o->arr_len == 33); - memcpy(o_ref.compressed_form, o->elems, 33); FREE(o); - LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); - *ret_conv = CResult_PublicKeySecp256k1ErrorZ_ok(o_ref); - return tag_ptr(ret_conv, true); -} - -int64_t CS_LDK_CResult_PublicKeySecp256k1ErrorZ_err(int32_t e) { - LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_cs(e); - LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); - *ret_conv = CResult_PublicKeySecp256k1ErrorZ_err(e_conv); - return tag_ptr(ret_conv, true); -} - -jboolean CS_LDK_CResult_PublicKeySecp256k1ErrorZ_is_ok(int64_t o) { - LDKCResult_PublicKeySecp256k1ErrorZ* o_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(o); - jboolean ret_conv = CResult_PublicKeySecp256k1ErrorZ_is_ok(o_conv); - return ret_conv; -} - -void CS_LDK_CResult_PublicKeySecp256k1ErrorZ_free(int64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKCResult_PublicKeySecp256k1ErrorZ _res_conv = *(LDKCResult_PublicKeySecp256k1ErrorZ*)(_res_ptr); - FREE(untag_ptr(_res)); - CResult_PublicKeySecp256k1ErrorZ_free(_res_conv); -} - -static inline uint64_t CResult_PublicKeySecp256k1ErrorZ_clone_ptr(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR arg) { - LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); - *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(arg); - return tag_ptr(ret_conv, true); -} -int64_t CS_LDK_CResult_PublicKeySecp256k1ErrorZ_clone_ptr(int64_t arg) { - LDKCResult_PublicKeySecp256k1ErrorZ* arg_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(arg); - int64_t ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone_ptr(arg_conv); - return ret_conv; -} - -int64_t CS_LDK_CResult_PublicKeySecp256k1ErrorZ_clone(int64_t orig) { - LDKCResult_PublicKeySecp256k1ErrorZ* orig_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(orig); - LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); - *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(orig_conv); - return tag_ptr(ret_conv, true); -} - int64_t CS_LDK_CResult_NodeIdDecodeErrorZ_ok(int64_t o) { LDKNodeId o_conv; o_conv.inner = untag_ptr(o); @@ -20825,6 +22852,55 @@ int64_t CS_LDK_CResult_NodeIdDecodeErrorZ_clone(int64_t orig) { return tag_ptr(ret_conv, true); } +int64_t CS_LDK_CResult_PublicKeySecp256k1ErrorZ_ok(int8_tArray o) { + LDKPublicKey o_ref; + CHECK(o->arr_len == 33); + memcpy(o_ref.compressed_form, o->elems, 33); FREE(o); + LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); + *ret_conv = CResult_PublicKeySecp256k1ErrorZ_ok(o_ref); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_PublicKeySecp256k1ErrorZ_err(int32_t e) { + LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_cs(e); + LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); + *ret_conv = CResult_PublicKeySecp256k1ErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_PublicKeySecp256k1ErrorZ_is_ok(int64_t o) { + LDKCResult_PublicKeySecp256k1ErrorZ* o_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_PublicKeySecp256k1ErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_PublicKeySecp256k1ErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_PublicKeySecp256k1ErrorZ _res_conv = *(LDKCResult_PublicKeySecp256k1ErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_PublicKeySecp256k1ErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_PublicKeySecp256k1ErrorZ_clone_ptr(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR arg) { + LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); + *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_PublicKeySecp256k1ErrorZ_clone_ptr(int64_t arg) { + LDKCResult_PublicKeySecp256k1ErrorZ* arg_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_PublicKeySecp256k1ErrorZ_clone(int64_t orig) { + LDKCResult_PublicKeySecp256k1ErrorZ* orig_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(orig); + LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ"); + *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + int64_t CS_LDK_COption_NetworkUpdateZ_some(int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -21610,6 +23686,34 @@ int64_t CS_LDK_COption_CVec_SocketAddressZZ_clone(int64_t orig) { return ret_ref; } +int64_t CS_LDK_CResult_u64ShortChannelIdErrorZ_ok(int64_t o) { + LDKCResult_u64ShortChannelIdErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u64ShortChannelIdErrorZ), "LDKCResult_u64ShortChannelIdErrorZ"); + *ret_conv = CResult_u64ShortChannelIdErrorZ_ok(o); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_u64ShortChannelIdErrorZ_err(int32_t e) { + LDKShortChannelIdError e_conv = LDKShortChannelIdError_from_cs(e); + LDKCResult_u64ShortChannelIdErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u64ShortChannelIdErrorZ), "LDKCResult_u64ShortChannelIdErrorZ"); + *ret_conv = CResult_u64ShortChannelIdErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_u64ShortChannelIdErrorZ_is_ok(int64_t o) { + LDKCResult_u64ShortChannelIdErrorZ* o_conv = (LDKCResult_u64ShortChannelIdErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_u64ShortChannelIdErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_u64ShortChannelIdErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_u64ShortChannelIdErrorZ _res_conv = *(LDKCResult_u64ShortChannelIdErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_u64ShortChannelIdErrorZ_free(_res_conv); +} + int64_t CS_LDK_CResult_PendingHTLCInfoInboundHTLCErrZ_ok(int64_t o) { LDKPendingHTLCInfo o_conv; o_conv.inner = untag_ptr(o); @@ -21626,8 +23730,7 @@ int64_t CS_LDK_CResult_PendingHTLCInfoInboundHTLCErrZ_err(int64_t e) { e_conv.inner = untag_ptr(e); e_conv.is_owned = ptr_is_owned(e); CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv); - // WARNING: we need a move here but no clone is available for LDKInboundHTLCErr - + e_conv = InboundHTLCErr_clone(&e_conv); LDKCResult_PendingHTLCInfoInboundHTLCErrZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoInboundHTLCErrZ), "LDKCResult_PendingHTLCInfoInboundHTLCErrZ"); *ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_err(e_conv); return tag_ptr(ret_conv, true); @@ -21648,6 +23751,24 @@ void CS_LDK_CResult_PendingHTLCInfoInboundHTLCErrZ_free(int64_t _res) { CResult_PendingHTLCInfoInboundHTLCErrZ_free(_res_conv); } +static inline uint64_t CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR arg) { + LDKCResult_PendingHTLCInfoInboundHTLCErrZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoInboundHTLCErrZ), "LDKCResult_PendingHTLCInfoInboundHTLCErrZ"); + *ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(int64_t arg) { + LDKCResult_PendingHTLCInfoInboundHTLCErrZ* arg_conv = (LDKCResult_PendingHTLCInfoInboundHTLCErrZ*)untag_ptr(arg); + int64_t ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_PendingHTLCInfoInboundHTLCErrZ_clone(int64_t orig) { + LDKCResult_PendingHTLCInfoInboundHTLCErrZ* orig_conv = (LDKCResult_PendingHTLCInfoInboundHTLCErrZ*)untag_ptr(orig); + LDKCResult_PendingHTLCInfoInboundHTLCErrZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoInboundHTLCErrZ), "LDKCResult_PendingHTLCInfoInboundHTLCErrZ"); + *ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + void CS_LDK_CVec_HTLCOutputInCommitmentZ_free(int64_tArray _res) { LDKCVec_HTLCOutputInCommitmentZ _res_constr; _res_constr.datalen = _res->arr_len; @@ -21887,6 +24008,53 @@ int64_t CS_LDK_CResult_CVec_UtxoZNoneZ_clone(int64_t orig) { return tag_ptr(ret_conv, true); } +int64_t CS_LDK_COption_PaymentContextZ_some(int64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKPaymentContext o_conv = *(LDKPaymentContext*)(o_ptr); + o_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(o)); + LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ"); + *ret_copy = COption_PaymentContextZ_some(o_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_COption_PaymentContextZ_none() { + LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ"); + *ret_copy = COption_PaymentContextZ_none(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void CS_LDK_COption_PaymentContextZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCOption_PaymentContextZ _res_conv = *(LDKCOption_PaymentContextZ*)(_res_ptr); + FREE(untag_ptr(_res)); + COption_PaymentContextZ_free(_res_conv); +} + +static inline uint64_t COption_PaymentContextZ_clone_ptr(LDKCOption_PaymentContextZ *NONNULL_PTR arg) { + LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ"); + *ret_copy = COption_PaymentContextZ_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t CS_LDK_COption_PaymentContextZ_clone_ptr(int64_t arg) { + LDKCOption_PaymentContextZ* arg_conv = (LDKCOption_PaymentContextZ*)untag_ptr(arg); + int64_t ret_conv = COption_PaymentContextZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_COption_PaymentContextZ_clone(int64_t orig) { + LDKCOption_PaymentContextZ* orig_conv = (LDKCOption_PaymentContextZ*)untag_ptr(orig); + LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ"); + *ret_copy = COption_PaymentContextZ_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + static inline uint64_t C2Tuple_u64u16Z_clone_ptr(LDKC2Tuple_u64u16Z *NONNULL_PTR arg) { LDKC2Tuple_u64u16Z* ret_conv = MALLOC(sizeof(LDKC2Tuple_u64u16Z), "LDKC2Tuple_u64u16Z"); *ret_conv = C2Tuple_u64u16Z_clone(arg); @@ -22011,55 +24179,57 @@ int64_t CS_LDK_COption_ChannelShutdownStateZ_clone(int64_t orig) { return ret_ref; } -int64_t CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_ok(int8_tArray o) { - LDKThirtyTwoBytes o_ref; - CHECK(o->arr_len == 32); - memcpy(o_ref.data, o->elems, 32); FREE(o); - LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); - *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_ok(o_ref); +int64_t CS_LDK_CResult_ChannelIdAPIErrorZ_ok(int64_t o) { + LDKChannelId o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = ChannelId_clone(&o_conv); + LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ"); + *ret_conv = CResult_ChannelIdAPIErrorZ_ok(o_conv); return tag_ptr(ret_conv, true); } -int64_t CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_err(int64_t e) { +int64_t CS_LDK_CResult_ChannelIdAPIErrorZ_err(int64_t e) { void* e_ptr = untag_ptr(e); CHECK_ACCESS(e_ptr); LDKAPIError e_conv = *(LDKAPIError*)(e_ptr); e_conv = APIError_clone((LDKAPIError*)untag_ptr(e)); - LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); - *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_err(e_conv); + LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ"); + *ret_conv = CResult_ChannelIdAPIErrorZ_err(e_conv); return tag_ptr(ret_conv, true); } -jboolean CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_is_ok(int64_t o) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* o_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(o); - jboolean ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_is_ok(o_conv); +jboolean CS_LDK_CResult_ChannelIdAPIErrorZ_is_ok(int64_t o) { + LDKCResult_ChannelIdAPIErrorZ* o_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_ChannelIdAPIErrorZ_is_ok(o_conv); return ret_conv; } -void CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_free(int64_t _res) { +void CS_LDK_CResult_ChannelIdAPIErrorZ_free(int64_t _res) { if (!ptr_is_owned(_res)) return; void* _res_ptr = untag_ptr(_res); CHECK_ACCESS(_res_ptr); - LDKCResult_ThirtyTwoBytesAPIErrorZ _res_conv = *(LDKCResult_ThirtyTwoBytesAPIErrorZ*)(_res_ptr); + LDKCResult_ChannelIdAPIErrorZ _res_conv = *(LDKCResult_ChannelIdAPIErrorZ*)(_res_ptr); FREE(untag_ptr(_res)); - CResult_ThirtyTwoBytesAPIErrorZ_free(_res_conv); + CResult_ChannelIdAPIErrorZ_free(_res_conv); } -static inline uint64_t CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR arg) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); - *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(arg); +static inline uint64_t CResult_ChannelIdAPIErrorZ_clone_ptr(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR arg) { + LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ"); + *ret_conv = CResult_ChannelIdAPIErrorZ_clone(arg); return tag_ptr(ret_conv, true); } -int64_t CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(int64_t arg) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* arg_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(arg); - int64_t ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(arg_conv); +int64_t CS_LDK_CResult_ChannelIdAPIErrorZ_clone_ptr(int64_t arg) { + LDKCResult_ChannelIdAPIErrorZ* arg_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_ChannelIdAPIErrorZ_clone_ptr(arg_conv); return ret_conv; } -int64_t CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_clone(int64_t orig) { - LDKCResult_ThirtyTwoBytesAPIErrorZ* orig_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(orig); - LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); - *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(orig_conv); +int64_t CS_LDK_CResult_ChannelIdAPIErrorZ_clone(int64_t orig) { + LDKCResult_ChannelIdAPIErrorZ* orig_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(orig); + LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ"); + *ret_conv = CResult_ChannelIdAPIErrorZ_clone(orig_conv); return tag_ptr(ret_conv, true); } @@ -22456,63 +24626,136 @@ int64_t CS_LDK_CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFail return tag_ptr(ret_conv, true); } -static inline uint64_t C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR arg) { - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKC2Tuple_ThirtyTwoBytesPublicKeyZ"); - *ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(arg); +static inline uint64_t C2Tuple_ChannelIdPublicKeyZ_clone_ptr(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR arg) { + LDKC2Tuple_ChannelIdPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKC2Tuple_ChannelIdPublicKeyZ"); + *ret_conv = C2Tuple_ChannelIdPublicKeyZ_clone(arg); return tag_ptr(ret_conv, true); } -int64_t CS_LDK_C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(int64_t arg) { - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* arg_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(arg); - int64_t ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(arg_conv); +int64_t CS_LDK_C2Tuple_ChannelIdPublicKeyZ_clone_ptr(int64_t arg) { + LDKC2Tuple_ChannelIdPublicKeyZ* arg_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(arg); + int64_t ret_conv = C2Tuple_ChannelIdPublicKeyZ_clone_ptr(arg_conv); return ret_conv; } -int64_t CS_LDK_C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(int64_t orig) { - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* orig_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(orig); - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKC2Tuple_ThirtyTwoBytesPublicKeyZ"); - *ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(orig_conv); +int64_t CS_LDK_C2Tuple_ChannelIdPublicKeyZ_clone(int64_t orig) { + LDKC2Tuple_ChannelIdPublicKeyZ* orig_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(orig); + LDKC2Tuple_ChannelIdPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKC2Tuple_ChannelIdPublicKeyZ"); + *ret_conv = C2Tuple_ChannelIdPublicKeyZ_clone(orig_conv); return tag_ptr(ret_conv, true); } -int64_t CS_LDK_C2Tuple_ThirtyTwoBytesPublicKeyZ_new(int8_tArray a, int8_tArray b) { - LDKThirtyTwoBytes a_ref; - CHECK(a->arr_len == 32); - memcpy(a_ref.data, a->elems, 32); FREE(a); +int64_t CS_LDK_C2Tuple_ChannelIdPublicKeyZ_new(int64_t a, int8_tArray b) { + LDKChannelId a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = ChannelId_clone(&a_conv); LDKPublicKey b_ref; CHECK(b->arr_len == 33); memcpy(b_ref.compressed_form, b->elems, 33); FREE(b); - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKC2Tuple_ThirtyTwoBytesPublicKeyZ"); - *ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_new(a_ref, b_ref); + LDKC2Tuple_ChannelIdPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKC2Tuple_ChannelIdPublicKeyZ"); + *ret_conv = C2Tuple_ChannelIdPublicKeyZ_new(a_conv, b_ref); return tag_ptr(ret_conv, true); } -void CS_LDK_C2Tuple_ThirtyTwoBytesPublicKeyZ_free(int64_t _res) { +void CS_LDK_C2Tuple_ChannelIdPublicKeyZ_free(int64_t _res) { if (!ptr_is_owned(_res)) return; void* _res_ptr = untag_ptr(_res); CHECK_ACCESS(_res_ptr); - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ _res_conv = *(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)(_res_ptr); + LDKC2Tuple_ChannelIdPublicKeyZ _res_conv = *(LDKC2Tuple_ChannelIdPublicKeyZ*)(_res_ptr); FREE(untag_ptr(_res)); - C2Tuple_ThirtyTwoBytesPublicKeyZ_free(_res_conv); + C2Tuple_ChannelIdPublicKeyZ_free(_res_conv); } -void CS_LDK_CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_free(int64_tArray _res) { - LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ _res_constr; +void CS_LDK_CVec_C2Tuple_ChannelIdPublicKeyZZ_free(int64_tArray _res) { + LDKCVec_C2Tuple_ChannelIdPublicKeyZZ _res_constr; _res_constr.datalen = _res->arr_len; if (_res_constr.datalen > 0) - _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ Elements"); + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKCVec_C2Tuple_ChannelIdPublicKeyZZ Elements"); else _res_constr.data = NULL; int64_t* _res_vals = _res->elems; - for (size_t j = 0; j < _res_constr.datalen; j++) { - int64_t _res_conv_35 = _res_vals[j]; - void* _res_conv_35_ptr = untag_ptr(_res_conv_35); - CHECK_ACCESS(_res_conv_35_ptr); - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ _res_conv_35_conv = *(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)(_res_conv_35_ptr); - FREE(untag_ptr(_res_conv_35)); - _res_constr.data[j] = _res_conv_35_conv; + for (size_t e = 0; e < _res_constr.datalen; e++) { + int64_t _res_conv_30 = _res_vals[e]; + void* _res_conv_30_ptr = untag_ptr(_res_conv_30); + CHECK_ACCESS(_res_conv_30_ptr); + LDKC2Tuple_ChannelIdPublicKeyZ _res_conv_30_conv = *(LDKC2Tuple_ChannelIdPublicKeyZ*)(_res_conv_30_ptr); + FREE(untag_ptr(_res_conv_30)); + _res_constr.data[e] = _res_conv_30_conv; } FREE(_res); - CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_free(_res_constr); + CVec_C2Tuple_ChannelIdPublicKeyZZ_free(_res_constr); +} + +void CS_LDK_CVec_ChannelIdZ_free(int64_tArray _res) { + LDKCVec_ChannelIdZ _res_constr; + _res_constr.datalen = _res->arr_len; + if (_res_constr.datalen > 0) + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKChannelId), "LDKCVec_ChannelIdZ Elements"); + else + _res_constr.data = NULL; + int64_t* _res_vals = _res->elems; + for (size_t l = 0; l < _res_constr.datalen; l++) { + int64_t _res_conv_11 = _res_vals[l]; + LDKChannelId _res_conv_11_conv; + _res_conv_11_conv.inner = untag_ptr(_res_conv_11); + _res_conv_11_conv.is_owned = ptr_is_owned(_res_conv_11); + CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_11_conv); + _res_constr.data[l] = _res_conv_11_conv; + } + FREE(_res); + CVec_ChannelIdZ_free(_res_constr); +} + +int64_t CS_LDK_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(int64_t o) { + LDKOfferWithDerivedMetadataBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = OfferWithDerivedMetadataBuilder_clone(&o_conv); + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(int32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_cs(e); + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(int64_t o) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(int64_t arg) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* arg_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(int64_t orig) { + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* orig_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); } int64_t CS_LDK_COption_StrZ_some(jstring o) { @@ -22559,52 +24802,6 @@ int64_t CS_LDK_COption_StrZ_clone(int64_t orig) { return ret_ref; } -int64_t CS_LDK_CResult_NoneBolt12SemanticErrorZ_ok() { - LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); - *ret_conv = CResult_NoneBolt12SemanticErrorZ_ok(); - return tag_ptr(ret_conv, true); -} - -int64_t CS_LDK_CResult_NoneBolt12SemanticErrorZ_err(int32_t e) { - LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_cs(e); - LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); - *ret_conv = CResult_NoneBolt12SemanticErrorZ_err(e_conv); - return tag_ptr(ret_conv, true); -} - -jboolean CS_LDK_CResult_NoneBolt12SemanticErrorZ_is_ok(int64_t o) { - LDKCResult_NoneBolt12SemanticErrorZ* o_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(o); - jboolean ret_conv = CResult_NoneBolt12SemanticErrorZ_is_ok(o_conv); - return ret_conv; -} - -void CS_LDK_CResult_NoneBolt12SemanticErrorZ_free(int64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKCResult_NoneBolt12SemanticErrorZ _res_conv = *(LDKCResult_NoneBolt12SemanticErrorZ*)(_res_ptr); - FREE(untag_ptr(_res)); - CResult_NoneBolt12SemanticErrorZ_free(_res_conv); -} - -static inline uint64_t CResult_NoneBolt12SemanticErrorZ_clone_ptr(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR arg) { - LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); - *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(arg); - return tag_ptr(ret_conv, true); -} -int64_t CS_LDK_CResult_NoneBolt12SemanticErrorZ_clone_ptr(int64_t arg) { - LDKCResult_NoneBolt12SemanticErrorZ* arg_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(arg); - int64_t ret_conv = CResult_NoneBolt12SemanticErrorZ_clone_ptr(arg_conv); - return ret_conv; -} - -int64_t CS_LDK_CResult_NoneBolt12SemanticErrorZ_clone(int64_t orig) { - LDKCResult_NoneBolt12SemanticErrorZ* orig_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(orig); - LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); - *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(orig_conv); - return tag_ptr(ret_conv, true); -} - int64_t CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok(int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -22654,6 +24851,58 @@ int64_t CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_clone(int64_t return tag_ptr(ret_conv, true); } +int64_t CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_ok(int8_tArray o) { + LDKThirtyTwoBytes o_ref; + CHECK(o->arr_len == 32); + memcpy(o_ref.data, o->elems, 32); FREE(o); + LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); + *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_ok(o_ref); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_err(int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKAPIError e_conv = *(LDKAPIError*)(e_ptr); + e_conv = APIError_clone((LDKAPIError*)untag_ptr(e)); + LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); + *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_is_ok(int64_t o) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* o_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_ThirtyTwoBytesAPIErrorZ _res_conv = *(LDKCResult_ThirtyTwoBytesAPIErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_ThirtyTwoBytesAPIErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR arg) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); + *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(int64_t arg) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* arg_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_clone(int64_t orig) { + LDKCResult_ThirtyTwoBytesAPIErrorZ* orig_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(orig); + LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); + *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + int64_t CS_LDK_COption_OffersMessageZ_some(int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -23976,27 +26225,6 @@ void CS_LDK_CVec_CommitmentTransactionZ_free(int64_tArray _res) { CVec_CommitmentTransactionZ_free(_res_constr); } -void CS_LDK_CVec_TransactionZ_free(ptrArray _res) { - LDKCVec_TransactionZ _res_constr; - _res_constr.datalen = _res->arr_len; - if (_res_constr.datalen > 0) - _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKTransaction), "LDKCVec_TransactionZ Elements"); - else - _res_constr.data = NULL; - int8_tArray* _res_vals = (void*) _res->elems; - for (size_t i = 0; i < _res_constr.datalen; i++) { - int8_tArray _res_conv_8 = _res_vals[i]; - LDKTransaction _res_conv_8_ref; - _res_conv_8_ref.datalen = _res_conv_8->arr_len; - _res_conv_8_ref.data = MALLOC(_res_conv_8_ref.datalen, "LDKTransaction Bytes"); - memcpy(_res_conv_8_ref.data, _res_conv_8->elems, _res_conv_8_ref.datalen); FREE(_res_conv_8); - _res_conv_8_ref.data_is_owned = true; - _res_constr.data[i] = _res_conv_8_ref; - } - FREE(_res); - CVec_TransactionZ_free(_res_constr); -} - static inline uint64_t C2Tuple_u32TxOutZ_clone_ptr(LDKC2Tuple_u32TxOutZ *NONNULL_PTR arg) { LDKC2Tuple_u32TxOutZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ"); *ret_conv = C2Tuple_u32TxOutZ_clone(arg); @@ -24697,64 +26925,24 @@ int64_t CS_LDK_COption_SocketAddressZ_clone(int64_t orig) { return ret_ref; } -static inline uint64_t C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR arg) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ"); - *ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(arg); - return tag_ptr(ret_conv, true); -} -int64_t CS_LDK_C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(int64_t arg) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* arg_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(arg); - int64_t ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(arg_conv); - return ret_conv; -} - -int64_t CS_LDK_C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(int64_t orig) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* orig_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(orig); - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ"); - *ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(orig_conv); - return tag_ptr(ret_conv, true); -} - -int64_t CS_LDK_C2Tuple_PublicKeyCOption_SocketAddressZZ_new(int8_tArray a, int64_t b) { - LDKPublicKey a_ref; - CHECK(a->arr_len == 33); - memcpy(a_ref.compressed_form, a->elems, 33); FREE(a); - void* b_ptr = untag_ptr(b); - CHECK_ACCESS(b_ptr); - LDKCOption_SocketAddressZ b_conv = *(LDKCOption_SocketAddressZ*)(b_ptr); - b_conv = COption_SocketAddressZ_clone((LDKCOption_SocketAddressZ*)untag_ptr(b)); - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ"); - *ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_new(a_ref, b_conv); - return tag_ptr(ret_conv, true); -} - -void CS_LDK_C2Tuple_PublicKeyCOption_SocketAddressZZ_free(int64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ _res_conv = *(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)(_res_ptr); - FREE(untag_ptr(_res)); - C2Tuple_PublicKeyCOption_SocketAddressZZ_free(_res_conv); -} - -void CS_LDK_CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_free(int64_tArray _res) { - LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ _res_constr; +void CS_LDK_CVec_PeerDetailsZ_free(int64_tArray _res) { + LDKCVec_PeerDetailsZ _res_constr; _res_constr.datalen = _res->arr_len; if (_res_constr.datalen > 0) - _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ Elements"); + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKPeerDetails), "LDKCVec_PeerDetailsZ Elements"); else _res_constr.data = NULL; int64_t* _res_vals = _res->elems; - for (size_t r = 0; r < _res_constr.datalen; r++) { - int64_t _res_conv_43 = _res_vals[r]; - void* _res_conv_43_ptr = untag_ptr(_res_conv_43); - CHECK_ACCESS(_res_conv_43_ptr); - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ _res_conv_43_conv = *(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)(_res_conv_43_ptr); - FREE(untag_ptr(_res_conv_43)); - _res_constr.data[r] = _res_conv_43_conv; + for (size_t n = 0; n < _res_constr.datalen; n++) { + int64_t _res_conv_13 = _res_vals[n]; + LDKPeerDetails _res_conv_13_conv; + _res_conv_13_conv.inner = untag_ptr(_res_conv_13); + _res_conv_13_conv.is_owned = ptr_is_owned(_res_conv_13); + CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_13_conv); + _res_constr.data[n] = _res_conv_13_conv; } FREE(_res); - CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_free(_res_constr); + CVec_PeerDetailsZ_free(_res_constr); } int64_t CS_LDK_CResult_CVec_u8ZPeerHandleErrorZ_ok(int8_tArray o) { @@ -25200,6 +27388,108 @@ int64_t CS_LDK_CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_clone(int6 return tag_ptr(ret_conv, true); } +int64_t CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(int64_t o) { + LDKUnsignedInvoiceRequest o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = UnsignedInvoiceRequest_clone(&o_conv); + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(int32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_cs(e); + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(int64_t o) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* o_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ _res_conv = *(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(int64_t arg) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* arg_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(int64_t orig) { + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* orig_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_InvoiceRequestBolt12SemanticErrorZ_ok(int64_t o) { + LDKInvoiceRequest o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = InvoiceRequest_clone(&o_conv); + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_InvoiceRequestBolt12SemanticErrorZ_err(int32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_cs(e); + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(int64_t o) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_InvoiceRequestBolt12SemanticErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceRequestBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceRequestBolt12SemanticErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR arg) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(int64_t arg) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* arg_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_InvoiceRequestBolt12SemanticErrorZ_clone(int64_t orig) { + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* orig_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(orig); + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + int64_t CS_LDK_COption_SecretKeyZ_some(int8_tArray o) { LDKSecretKey o_ref; CHECK(o->arr_len == 32); @@ -25246,6 +27536,40 @@ int64_t CS_LDK_COption_SecretKeyZ_clone(int64_t orig) { return ret_ref; } +int64_t CS_LDK_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok(int64_t o) { + LDKInvoiceWithExplicitSigningPubkeyBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err(int32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_cs(e); + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(int64_t o) { + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free(_res_conv); +} + int64_t CS_LDK_CResult_VerifiedInvoiceRequestNoneZ_ok(int64_t o) { LDKVerifiedInvoiceRequest o_conv; o_conv.inner = untag_ptr(o); @@ -25296,6 +27620,94 @@ int64_t CS_LDK_CResult_VerifiedInvoiceRequestNoneZ_clone(int64_t orig) { return tag_ptr(ret_conv, true); } +int64_t CS_LDK_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok(int64_t o) { + LDKInvoiceWithDerivedSigningPubkeyBuilder o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err(int32_t e) { + LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_cs(e); + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(int64_t o) { + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(_res_conv); +} + +int64_t CS_LDK_CResult_InvoiceRequestFieldsDecodeErrorZ_ok(int64_t o) { + LDKInvoiceRequestFields o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = InvoiceRequestFields_clone(&o_conv); + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ"); + *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_InvoiceRequestFieldsDecodeErrorZ_err(int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ"); + *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(int64_t o) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* o_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_InvoiceRequestFieldsDecodeErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_InvoiceRequestFieldsDecodeErrorZ _res_conv = *(LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_InvoiceRequestFieldsDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ"); + *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(int64_t arg) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* arg_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_InvoiceRequestFieldsDecodeErrorZ_clone(int64_t orig) { + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* orig_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(orig); + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ"); + *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + int32_t CS_LDK_COption_NoneZ_some() { int32_t ret_conv = LDKCOption_NoneZ_to_cs(COption_NoneZ_some()); return ret_conv; @@ -25332,6 +27744,52 @@ void CS_LDK_CVec_WitnessZ_free(ptrArray _res) { CVec_WitnessZ_free(_res_constr); } +int64_t CS_LDK_COption_ECDSASignatureZ_some(int8_tArray o) { + LDKECDSASignature o_ref; + CHECK(o->arr_len == 64); + memcpy(o_ref.compact_form, o->elems, 64); FREE(o); + LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ"); + *ret_copy = COption_ECDSASignatureZ_some(o_ref); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_COption_ECDSASignatureZ_none() { + LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ"); + *ret_copy = COption_ECDSASignatureZ_none(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void CS_LDK_COption_ECDSASignatureZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCOption_ECDSASignatureZ _res_conv = *(LDKCOption_ECDSASignatureZ*)(_res_ptr); + FREE(untag_ptr(_res)); + COption_ECDSASignatureZ_free(_res_conv); +} + +static inline uint64_t COption_ECDSASignatureZ_clone_ptr(LDKCOption_ECDSASignatureZ *NONNULL_PTR arg) { + LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ"); + *ret_copy = COption_ECDSASignatureZ_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t CS_LDK_COption_ECDSASignatureZ_clone_ptr(int64_t arg) { + LDKCOption_ECDSASignatureZ* arg_conv = (LDKCOption_ECDSASignatureZ*)untag_ptr(arg); + int64_t ret_conv = COption_ECDSASignatureZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_COption_ECDSASignatureZ_clone(int64_t orig) { + LDKCOption_ECDSASignatureZ* orig_conv = (LDKCOption_ECDSASignatureZ*)untag_ptr(orig); + LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ"); + *ret_copy = COption_ECDSASignatureZ_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + int64_t CS_LDK_COption_i64Z_some(int64_t o) { LDKCOption_i64Z *ret_copy = MALLOC(sizeof(LDKCOption_i64Z), "LDKCOption_i64Z"); *ret_copy = COption_i64Z_some(o); @@ -29247,6 +31705,27 @@ int64_t CS_LDK_CResult_ShutdownScriptInvalidShutdownScriptZ_clone(int64_t orig) return tag_ptr(ret_conv, true); } +void CS_LDK_CVec_TransactionZ_free(ptrArray _res) { + LDKCVec_TransactionZ _res_constr; + _res_constr.datalen = _res->arr_len; + if (_res_constr.datalen > 0) + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKTransaction), "LDKCVec_TransactionZ Elements"); + else + _res_constr.data = NULL; + int8_tArray* _res_vals = (void*) _res->elems; + for (size_t i = 0; i < _res_constr.datalen; i++) { + int8_tArray _res_conv_8 = _res_vals[i]; + LDKTransaction _res_conv_8_ref; + _res_conv_8_ref.datalen = _res_conv_8->arr_len; + _res_conv_8_ref.data = MALLOC(_res_conv_8_ref.datalen, "LDKTransaction Bytes"); + memcpy(_res_conv_8_ref.data, _res_conv_8->elems, _res_conv_8_ref.datalen); FREE(_res_conv_8); + _res_conv_8_ref.data_is_owned = true; + _res_constr.data[i] = _res_conv_8_ref; + } + FREE(_res); + CVec_TransactionZ_free(_res_constr); +} + int64_t CS_LDK_CResult_PaymentPurposeDecodeErrorZ_ok(int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -30759,6 +33238,60 @@ int64_t CS_LDK_CResult_UntrustedStringDecodeErrorZ_clone(int64_t orig) { return tag_ptr(ret_conv, true); } +int64_t CS_LDK_CResult_ChannelIdDecodeErrorZ_ok(int64_t o) { + LDKChannelId o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = ChannelId_clone(&o_conv); + LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ"); + *ret_conv = CResult_ChannelIdDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_ChannelIdDecodeErrorZ_err(int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ"); + *ret_conv = CResult_ChannelIdDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_ChannelIdDecodeErrorZ_is_ok(int64_t o) { + LDKCResult_ChannelIdDecodeErrorZ* o_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_ChannelIdDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_ChannelIdDecodeErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_ChannelIdDecodeErrorZ _res_conv = *(LDKCResult_ChannelIdDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_ChannelIdDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_ChannelIdDecodeErrorZ_clone_ptr(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ"); + *ret_conv = CResult_ChannelIdDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_ChannelIdDecodeErrorZ_clone_ptr(int64_t arg) { + LDKCResult_ChannelIdDecodeErrorZ* arg_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_ChannelIdDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_ChannelIdDecodeErrorZ_clone(int64_t orig) { + LDKCResult_ChannelIdDecodeErrorZ* orig_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(orig); + LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ"); + *ret_conv = CResult_ChannelIdDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + static inline uint64_t C2Tuple__u832u16Z_clone_ptr(LDKC2Tuple__u832u16Z *NONNULL_PTR arg) { LDKC2Tuple__u832u16Z* ret_conv = MALLOC(sizeof(LDKC2Tuple__u832u16Z), "LDKC2Tuple__u832u16Z"); *ret_conv = C2Tuple__u832u16Z_clone(arg); @@ -30903,98 +33436,218 @@ int64_t CS_LDK_CResult_PaymentConstraintsDecodeErrorZ_clone(int64_t orig) { return tag_ptr(ret_conv, true); } -static inline uint64_t C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR arg) { - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ"); - *ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(arg); +int64_t CS_LDK_CResult_PaymentContextDecodeErrorZ_ok(int64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKPaymentContext o_conv = *(LDKPaymentContext*)(o_ptr); + o_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(o)); + LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ"); + *ret_conv = CResult_PaymentContextDecodeErrorZ_ok(o_conv); return tag_ptr(ret_conv, true); } -int64_t CS_LDK_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(int64_t arg) { - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* arg_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(arg); - int64_t ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(arg_conv); + +int64_t CS_LDK_CResult_PaymentContextDecodeErrorZ_err(int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ"); + *ret_conv = CResult_PaymentContextDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_PaymentContextDecodeErrorZ_is_ok(int64_t o) { + LDKCResult_PaymentContextDecodeErrorZ* o_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_PaymentContextDecodeErrorZ_is_ok(o_conv); return ret_conv; } -int64_t CS_LDK_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(int64_t orig) { - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* orig_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(orig); - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ"); - *ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(orig_conv); +void CS_LDK_CResult_PaymentContextDecodeErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_PaymentContextDecodeErrorZ _res_conv = *(LDKCResult_PaymentContextDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_PaymentContextDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_PaymentContextDecodeErrorZ_clone_ptr(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ"); + *ret_conv = CResult_PaymentContextDecodeErrorZ_clone(arg); return tag_ptr(ret_conv, true); } +int64_t CS_LDK_CResult_PaymentContextDecodeErrorZ_clone_ptr(int64_t arg) { + LDKCResult_PaymentContextDecodeErrorZ* arg_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_PaymentContextDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} -int64_t CS_LDK_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new(int8_tArray a, int64_t b, int64_t c) { - LDKThirtyTwoBytes a_ref; - CHECK(a->arr_len == 32); - memcpy(a_ref.data, a->elems, 32); FREE(a); - LDKRecipientOnionFields b_conv; - b_conv.inner = untag_ptr(b); - b_conv.is_owned = ptr_is_owned(b); - CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); - b_conv = RecipientOnionFields_clone(&b_conv); - LDKRouteParameters c_conv; - c_conv.inner = untag_ptr(c); - c_conv.is_owned = ptr_is_owned(c); - CHECK_INNER_FIELD_ACCESS_OR_NULL(c_conv); - c_conv = RouteParameters_clone(&c_conv); - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ"); - *ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new(a_ref, b_conv, c_conv); +int64_t CS_LDK_CResult_PaymentContextDecodeErrorZ_clone(int64_t orig) { + LDKCResult_PaymentContextDecodeErrorZ* orig_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(orig); + LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ"); + *ret_conv = CResult_PaymentContextDecodeErrorZ_clone(orig_conv); return tag_ptr(ret_conv, true); } -void CS_LDK_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free(int64_t _res) { +int64_t CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_ok(int64_t o) { + LDKUnknownPaymentContext o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = UnknownPaymentContext_clone(&o_conv); + LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ"); + *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_err(int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ"); + *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_is_ok(int64_t o) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* o_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_free(int64_t _res) { if (!ptr_is_owned(_res)) return; void* _res_ptr = untag_ptr(_res); CHECK_ACCESS(_res_ptr); - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ _res_conv = *(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)(_res_ptr); + LDKCResult_UnknownPaymentContextDecodeErrorZ _res_conv = *(LDKCResult_UnknownPaymentContextDecodeErrorZ*)(_res_ptr); FREE(untag_ptr(_res)); - C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free(_res_conv); + CResult_UnknownPaymentContextDecodeErrorZ_free(_res_conv); } -int64_t CS_LDK_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok(int64_t o) { - void* o_ptr = untag_ptr(o); - CHECK_ACCESS(o_ptr); - LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ o_conv = *(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)(o_ptr); - o_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone((LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(o)); - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ"); - *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok(o_conv); +static inline uint64_t CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ"); + *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_clone(arg); return tag_ptr(ret_conv, true); } +int64_t CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(int64_t arg) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* arg_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} -int64_t CS_LDK_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err() { - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ"); - *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err(); +int64_t CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_clone(int64_t orig) { + LDKCResult_UnknownPaymentContextDecodeErrorZ* orig_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(orig); + LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ"); + *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_clone(orig_conv); return tag_ptr(ret_conv, true); } -jboolean CS_LDK_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok(int64_t o) { - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* o_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(o); - jboolean ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok(o_conv); +int64_t CS_LDK_CResult_Bolt12OfferContextDecodeErrorZ_ok(int64_t o) { + LDKBolt12OfferContext o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = Bolt12OfferContext_clone(&o_conv); + LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_Bolt12OfferContextDecodeErrorZ_err(int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_Bolt12OfferContextDecodeErrorZ_is_ok(int64_t o) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* o_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_is_ok(o_conv); return ret_conv; } -void CS_LDK_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free(int64_t _res) { +void CS_LDK_CResult_Bolt12OfferContextDecodeErrorZ_free(int64_t _res) { if (!ptr_is_owned(_res)) return; void* _res_ptr = untag_ptr(_res); CHECK_ACCESS(_res_ptr); - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ _res_conv = *(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)(_res_ptr); + LDKCResult_Bolt12OfferContextDecodeErrorZ _res_conv = *(LDKCResult_Bolt12OfferContextDecodeErrorZ*)(_res_ptr); FREE(untag_ptr(_res)); - CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free(_res_conv); + CResult_Bolt12OfferContextDecodeErrorZ_free(_res_conv); } -static inline uint64_t CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR arg) { - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ"); - *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(arg); +static inline uint64_t CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_clone(arg); return tag_ptr(ret_conv, true); } -int64_t CS_LDK_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(int64_t arg) { - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* arg_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(arg); - int64_t ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(arg_conv); +int64_t CS_LDK_CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(int64_t arg) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* arg_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(arg_conv); return ret_conv; } -int64_t CS_LDK_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(int64_t orig) { - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* orig_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(orig); - LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ"); - *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(orig_conv); +int64_t CS_LDK_CResult_Bolt12OfferContextDecodeErrorZ_clone(int64_t orig) { + LDKCResult_Bolt12OfferContextDecodeErrorZ* orig_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(orig); + LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_Bolt12RefundContextDecodeErrorZ_ok(int64_t o) { + LDKBolt12RefundContext o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = Bolt12RefundContext_clone(&o_conv); + LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_Bolt12RefundContextDecodeErrorZ_err(int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_Bolt12RefundContextDecodeErrorZ_is_ok(int64_t o) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* o_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_Bolt12RefundContextDecodeErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_Bolt12RefundContextDecodeErrorZ _res_conv = *(LDKCResult_Bolt12RefundContextDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_Bolt12RefundContextDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(int64_t arg) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* arg_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_Bolt12RefundContextDecodeErrorZ_clone(int64_t orig) { + LDKCResult_Bolt12RefundContextDecodeErrorZ* orig_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(orig); + LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ"); + *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_clone(orig_conv); return tag_ptr(ret_conv, true); } @@ -31045,6 +33698,101 @@ int64_t CS_LDK_CResult_StrSecp256k1ErrorZ_clone(int64_t orig) { return tag_ptr(ret_conv, true); } +static inline uint64_t C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR arg) { + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ"); + *ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(int64_t arg) { + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* arg_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(arg); + int64_t ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(int64_t orig) { + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* orig_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(orig); + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ"); + *ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new(int8_tArray a, int64_t b, int64_t c) { + LDKThirtyTwoBytes a_ref; + CHECK(a->arr_len == 32); + memcpy(a_ref.data, a->elems, 32); FREE(a); + LDKRecipientOnionFields b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv = RecipientOnionFields_clone(&b_conv); + LDKRouteParameters c_conv; + c_conv.inner = untag_ptr(c); + c_conv.is_owned = ptr_is_owned(c); + CHECK_INNER_FIELD_ACCESS_OR_NULL(c_conv); + c_conv = RouteParameters_clone(&c_conv); + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ"); + *ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new(a_ref, b_conv, c_conv); + return tag_ptr(ret_conv, true); +} + +void CS_LDK_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ _res_conv = *(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)(_res_ptr); + FREE(untag_ptr(_res)); + C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free(_res_conv); +} + +int64_t CS_LDK_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok(int64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ o_conv = *(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)(o_ptr); + o_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone((LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(o)); + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ"); + *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err() { + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ"); + *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err(); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok(int64_t o) { + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* o_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(o); + jboolean ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ _res_conv = *(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free(_res_conv); +} + +static inline uint64_t CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR arg) { + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ"); + *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(int64_t arg) { + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* arg_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(arg); + int64_t ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(int64_t orig) { + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* orig_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(orig); + LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ"); + *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + int64_t CS_LDK_CResult_TxOutUtxoLookupErrorZ_ok(int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -31175,6 +33923,24 @@ void CS_LDK_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZS CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_free(_res_conv); } +static inline uint64_t CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ *NONNULL_PTR arg) { + LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ"); + *ret_conv = CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(int64_t arg) { + LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* arg_conv = (LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(int64_t orig) { + LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* orig_conv = (LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ*)untag_ptr(orig); + LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ"); + *ret_conv = CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + int64_t CS_LDK_CResult_PeeledOnionNoneZ_ok(int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -31206,6 +33972,24 @@ void CS_LDK_CResult_PeeledOnionNoneZ_free(int64_t _res) { CResult_PeeledOnionNoneZ_free(_res_conv); } +static inline uint64_t CResult_PeeledOnionNoneZ_clone_ptr(LDKCResult_PeeledOnionNoneZ *NONNULL_PTR arg) { + LDKCResult_PeeledOnionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PeeledOnionNoneZ), "LDKCResult_PeeledOnionNoneZ"); + *ret_conv = CResult_PeeledOnionNoneZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_PeeledOnionNoneZ_clone_ptr(int64_t arg) { + LDKCResult_PeeledOnionNoneZ* arg_conv = (LDKCResult_PeeledOnionNoneZ*)untag_ptr(arg); + int64_t ret_conv = CResult_PeeledOnionNoneZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_PeeledOnionNoneZ_clone(int64_t orig) { + LDKCResult_PeeledOnionNoneZ* orig_conv = (LDKCResult_PeeledOnionNoneZ*)untag_ptr(orig); + LDKCResult_PeeledOnionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PeeledOnionNoneZ), "LDKCResult_PeeledOnionNoneZ"); + *ret_conv = CResult_PeeledOnionNoneZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + int64_t CS_LDK_CResult_SendSuccessSendErrorZ_ok(int64_t o) { void* o_ptr = untag_ptr(o); CHECK_ACCESS(o_ptr); @@ -31241,6 +34025,24 @@ void CS_LDK_CResult_SendSuccessSendErrorZ_free(int64_t _res) { CResult_SendSuccessSendErrorZ_free(_res_conv); } +static inline uint64_t CResult_SendSuccessSendErrorZ_clone_ptr(LDKCResult_SendSuccessSendErrorZ *NONNULL_PTR arg) { + LDKCResult_SendSuccessSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SendSuccessSendErrorZ), "LDKCResult_SendSuccessSendErrorZ"); + *ret_conv = CResult_SendSuccessSendErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_SendSuccessSendErrorZ_clone_ptr(int64_t arg) { + LDKCResult_SendSuccessSendErrorZ* arg_conv = (LDKCResult_SendSuccessSendErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_SendSuccessSendErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_SendSuccessSendErrorZ_clone(int64_t orig) { + LDKCResult_SendSuccessSendErrorZ* orig_conv = (LDKCResult_SendSuccessSendErrorZ*)untag_ptr(orig); + LDKCResult_SendSuccessSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SendSuccessSendErrorZ), "LDKCResult_SendSuccessSendErrorZ"); + *ret_conv = CResult_SendSuccessSendErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + int64_t CS_LDK_CResult_BlindedPathNoneZ_ok(int64_t o) { LDKBlindedPath o_conv; o_conv.inner = untag_ptr(o); @@ -31522,6 +34324,261 @@ int64_t CS_LDK_CResult_InvoiceErrorDecodeErrorZ_clone(int64_t orig) { return tag_ptr(ret_conv, true); } +int64_t CS_LDK_CResult_TrackedSpendableOutputDecodeErrorZ_ok(int64_t o) { + LDKTrackedSpendableOutput o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv = TrackedSpendableOutput_clone(&o_conv); + LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ"); + *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_TrackedSpendableOutputDecodeErrorZ_err(int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ"); + *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(int64_t o) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* o_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_TrackedSpendableOutputDecodeErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_TrackedSpendableOutputDecodeErrorZ _res_conv = *(LDKCResult_TrackedSpendableOutputDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_TrackedSpendableOutputDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ"); + *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(int64_t arg) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* arg_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_TrackedSpendableOutputDecodeErrorZ_clone(int64_t orig) { + LDKCResult_TrackedSpendableOutputDecodeErrorZ* orig_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(orig); + LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ"); + *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_OutputSpendStatusDecodeErrorZ_ok(int64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKOutputSpendStatus o_conv = *(LDKOutputSpendStatus*)(o_ptr); + o_conv = OutputSpendStatus_clone((LDKOutputSpendStatus*)untag_ptr(o)); + LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ"); + *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_OutputSpendStatusDecodeErrorZ_err(int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ"); + *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_OutputSpendStatusDecodeErrorZ_is_ok(int64_t o) { + LDKCResult_OutputSpendStatusDecodeErrorZ* o_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_OutputSpendStatusDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_OutputSpendStatusDecodeErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_OutputSpendStatusDecodeErrorZ _res_conv = *(LDKCResult_OutputSpendStatusDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_OutputSpendStatusDecodeErrorZ_free(_res_conv); +} + +static inline uint64_t CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR arg) { + LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ"); + *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(int64_t arg) { + LDKCResult_OutputSpendStatusDecodeErrorZ* arg_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(arg); + int64_t ret_conv = CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CResult_OutputSpendStatusDecodeErrorZ_clone(int64_t orig) { + LDKCResult_OutputSpendStatusDecodeErrorZ* orig_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(orig); + LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ"); + *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_COption_FilterZ_some(int64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKFilter o_conv = *(LDKFilter*)(o_ptr); + if (o_conv.free == LDKFilter_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFilter_JCalls_cloned(&o_conv); + } + LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ"); + *ret_copy = COption_FilterZ_some(o_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_COption_FilterZ_none() { + LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ"); + *ret_copy = COption_FilterZ_none(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void CS_LDK_COption_FilterZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCOption_FilterZ _res_conv = *(LDKCOption_FilterZ*)(_res_ptr); + FREE(untag_ptr(_res)); + COption_FilterZ_free(_res_conv); +} + +void CS_LDK_CVec_TrackedSpendableOutputZ_free(int64_tArray _res) { + LDKCVec_TrackedSpendableOutputZ _res_constr; + _res_constr.datalen = _res->arr_len; + if (_res_constr.datalen > 0) + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKTrackedSpendableOutput), "LDKCVec_TrackedSpendableOutputZ Elements"); + else + _res_constr.data = NULL; + int64_t* _res_vals = _res->elems; + for (size_t y = 0; y < _res_constr.datalen; y++) { + int64_t _res_conv_24 = _res_vals[y]; + LDKTrackedSpendableOutput _res_conv_24_conv; + _res_conv_24_conv.inner = untag_ptr(_res_conv_24); + _res_conv_24_conv.is_owned = ptr_is_owned(_res_conv_24); + CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_24_conv); + _res_constr.data[y] = _res_conv_24_conv; + } + FREE(_res); + CVec_TrackedSpendableOutputZ_free(_res_constr); +} + +int64_t CS_LDK_CResult_OutputSweeperDecodeErrorZ_ok(int64_t o) { + LDKOutputSweeper o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + // WARNING: we need a move here but no clone is available for LDKOutputSweeper + + LDKCResult_OutputSweeperDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSweeperDecodeErrorZ), "LDKCResult_OutputSweeperDecodeErrorZ"); + *ret_conv = CResult_OutputSweeperDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_OutputSweeperDecodeErrorZ_err(int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_OutputSweeperDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSweeperDecodeErrorZ), "LDKCResult_OutputSweeperDecodeErrorZ"); + *ret_conv = CResult_OutputSweeperDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_OutputSweeperDecodeErrorZ_is_ok(int64_t o) { + LDKCResult_OutputSweeperDecodeErrorZ* o_conv = (LDKCResult_OutputSweeperDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_OutputSweeperDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_OutputSweeperDecodeErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_OutputSweeperDecodeErrorZ _res_conv = *(LDKCResult_OutputSweeperDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_OutputSweeperDecodeErrorZ_free(_res_conv); +} + +int64_t CS_LDK_C2Tuple_BestBlockOutputSweeperZ_new(int64_t a, int64_t b) { + LDKBestBlock a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = BestBlock_clone(&a_conv); + LDKOutputSweeper b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + // WARNING: we need a move here but no clone is available for LDKOutputSweeper + + LDKC2Tuple_BestBlockOutputSweeperZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BestBlockOutputSweeperZ), "LDKC2Tuple_BestBlockOutputSweeperZ"); + *ret_conv = C2Tuple_BestBlockOutputSweeperZ_new(a_conv, b_conv); + return tag_ptr(ret_conv, true); +} + +void CS_LDK_C2Tuple_BestBlockOutputSweeperZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKC2Tuple_BestBlockOutputSweeperZ _res_conv = *(LDKC2Tuple_BestBlockOutputSweeperZ*)(_res_ptr); + FREE(untag_ptr(_res)); + C2Tuple_BestBlockOutputSweeperZ_free(_res_conv); +} + +int64_t CS_LDK_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok(int64_t o) { + void* o_ptr = untag_ptr(o); + CHECK_ACCESS(o_ptr); + LDKC2Tuple_BestBlockOutputSweeperZ o_conv = *(LDKC2Tuple_BestBlockOutputSweeperZ*)(o_ptr); + // WARNING: we may need a move here but no clone is available for LDKC2Tuple_BestBlockOutputSweeperZ + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ), "LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ"); + *ret_conv = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok(o_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err(int64_t e) { + void* e_ptr = untag_ptr(e); + CHECK_ACCESS(e_ptr); + LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr); + e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e)); + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ), "LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ"); + *ret_conv = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err(e_conv); + return tag_ptr(ret_conv, true); +} + +jboolean CS_LDK_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(int64_t o) { + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* o_conv = (LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)untag_ptr(o); + jboolean ret_conv = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(o_conv); + return ret_conv; +} + +void CS_LDK_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ _res_conv = *(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)(_res_ptr); + FREE(untag_ptr(_res)); + CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free(_res_conv); +} + int64_t CS_LDK_CResult_DelayedPaymentBasepointDecodeErrorZ_ok(int64_t o) { LDKDelayedPaymentBasepoint o_conv; o_conv.inner = untag_ptr(o); @@ -31846,36 +34903,6 @@ int64_t CS_LDK_CResult_RevocationKeyDecodeErrorZ_clone(int64_t orig) { return tag_ptr(ret_conv, true); } -int64_t CS_LDK_COption_FilterZ_some(int64_t o) { - void* o_ptr = untag_ptr(o); - CHECK_ACCESS(o_ptr); - LDKFilter o_conv = *(LDKFilter*)(o_ptr); - if (o_conv.free == LDKFilter_JCalls_free) { - // If this_arg is a JCalls struct, then we need to increment the refcnt in it. - LDKFilter_JCalls_cloned(&o_conv); - } - LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ"); - *ret_copy = COption_FilterZ_some(o_conv); - int64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -int64_t CS_LDK_COption_FilterZ_none() { - LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ"); - *ret_copy = COption_FilterZ_none(); - int64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -void CS_LDK_COption_FilterZ_free(int64_t _res) { - if (!ptr_is_owned(_res)) return; - void* _res_ptr = untag_ptr(_res); - CHECK_ACCESS(_res_ptr); - LDKCOption_FilterZ _res_conv = *(LDKCOption_FilterZ*)(_res_ptr); - FREE(untag_ptr(_res)); - COption_FilterZ_free(_res_conv); -} - int64_t CS_LDK_CResult_LockedChannelMonitorNoneZ_ok(int64_t o) { LDKLockedChannelMonitor o_conv; o_conv.inner = untag_ptr(o); @@ -31909,24 +34936,67 @@ void CS_LDK_CResult_LockedChannelMonitorNoneZ_free(int64_t _res) { CResult_LockedChannelMonitorNoneZ_free(_res_conv); } -void CS_LDK_CVec_OutPointZ_free(int64_tArray _res) { - LDKCVec_OutPointZ _res_constr; +static inline uint64_t C2Tuple_OutPointChannelIdZ_clone_ptr(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR arg) { + LDKC2Tuple_OutPointChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ"); + *ret_conv = C2Tuple_OutPointChannelIdZ_clone(arg); + return tag_ptr(ret_conv, true); +} +int64_t CS_LDK_C2Tuple_OutPointChannelIdZ_clone_ptr(int64_t arg) { + LDKC2Tuple_OutPointChannelIdZ* arg_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(arg); + int64_t ret_conv = C2Tuple_OutPointChannelIdZ_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_C2Tuple_OutPointChannelIdZ_clone(int64_t orig) { + LDKC2Tuple_OutPointChannelIdZ* orig_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(orig); + LDKC2Tuple_OutPointChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ"); + *ret_conv = C2Tuple_OutPointChannelIdZ_clone(orig_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_C2Tuple_OutPointChannelIdZ_new(int64_t a, int64_t b) { + LDKOutPoint a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = OutPoint_clone(&a_conv); + LDKChannelId b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv = ChannelId_clone(&b_conv); + LDKC2Tuple_OutPointChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ"); + *ret_conv = C2Tuple_OutPointChannelIdZ_new(a_conv, b_conv); + return tag_ptr(ret_conv, true); +} + +void CS_LDK_C2Tuple_OutPointChannelIdZ_free(int64_t _res) { + if (!ptr_is_owned(_res)) return; + void* _res_ptr = untag_ptr(_res); + CHECK_ACCESS(_res_ptr); + LDKC2Tuple_OutPointChannelIdZ _res_conv = *(LDKC2Tuple_OutPointChannelIdZ*)(_res_ptr); + FREE(untag_ptr(_res)); + C2Tuple_OutPointChannelIdZ_free(_res_conv); +} + +void CS_LDK_CVec_C2Tuple_OutPointChannelIdZZ_free(int64_tArray _res) { + LDKCVec_C2Tuple_OutPointChannelIdZZ _res_constr; _res_constr.datalen = _res->arr_len; if (_res_constr.datalen > 0) - _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKOutPoint), "LDKCVec_OutPointZ Elements"); + _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKCVec_C2Tuple_OutPointChannelIdZZ Elements"); else _res_constr.data = NULL; int64_t* _res_vals = _res->elems; - for (size_t k = 0; k < _res_constr.datalen; k++) { - int64_t _res_conv_10 = _res_vals[k]; - LDKOutPoint _res_conv_10_conv; - _res_conv_10_conv.inner = untag_ptr(_res_conv_10); - _res_conv_10_conv.is_owned = ptr_is_owned(_res_conv_10); - CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_10_conv); - _res_constr.data[k] = _res_conv_10_conv; + for (size_t d = 0; d < _res_constr.datalen; d++) { + int64_t _res_conv_29 = _res_vals[d]; + void* _res_conv_29_ptr = untag_ptr(_res_conv_29); + CHECK_ACCESS(_res_conv_29_ptr); + LDKC2Tuple_OutPointChannelIdZ _res_conv_29_conv = *(LDKC2Tuple_OutPointChannelIdZ*)(_res_conv_29_ptr); + FREE(untag_ptr(_res_conv_29)); + _res_constr.data[d] = _res_conv_29_conv; } FREE(_res); - CVec_OutPointZ_free(_res_constr); + CVec_C2Tuple_OutPointChannelIdZZ_free(_res_constr); } void CS_LDK_CVec_MonitorUpdateIdZ_free(int64_tArray _res) { @@ -32426,6 +35496,19 @@ int8_tArray CS_LDK_TransactionU16LenLimited_into_transaction(int64_t this_arg) return ret_arr; } +int8_tArray CS_LDK_TransactionU16LenLimited_as_transaction(int64_t this_arg) { + LDKTransactionU16LenLimited this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKTransaction ret_var = TransactionU16LenLimited_as_transaction(&this_arg_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + Transaction_free(ret_var); + return ret_arr; +} + int8_tArray CS_LDK_TransactionU16LenLimited_write(int64_t obj) { LDKTransactionU16LenLimited obj_conv; obj_conv.inner = untag_ptr(obj); @@ -32658,6 +35741,55 @@ int64_t CS_LDK_MonitorUpdatingPersister_as_Persist(int64_t this_arg) { return tag_ptr(ret_ret, true); } +int32_t CS_LDK_ShortChannelIdError_clone(int64_t orig) { + LDKShortChannelIdError* orig_conv = (LDKShortChannelIdError*)untag_ptr(orig); + int32_t ret_conv = LDKShortChannelIdError_to_cs(ShortChannelIdError_clone(orig_conv)); + return ret_conv; +} + +int32_t CS_LDK_ShortChannelIdError_block_overflow() { + int32_t ret_conv = LDKShortChannelIdError_to_cs(ShortChannelIdError_block_overflow()); + return ret_conv; +} + +int32_t CS_LDK_ShortChannelIdError_tx_index_overflow() { + int32_t ret_conv = LDKShortChannelIdError_to_cs(ShortChannelIdError_tx_index_overflow()); + return ret_conv; +} + +int32_t CS_LDK_ShortChannelIdError_vout_index_overflow() { + int32_t ret_conv = LDKShortChannelIdError_to_cs(ShortChannelIdError_vout_index_overflow()); + return ret_conv; +} + +jboolean CS_LDK_ShortChannelIdError_eq(int64_t a, int64_t b) { + LDKShortChannelIdError* a_conv = (LDKShortChannelIdError*)untag_ptr(a); + LDKShortChannelIdError* b_conv = (LDKShortChannelIdError*)untag_ptr(b); + jboolean ret_conv = ShortChannelIdError_eq(a_conv, b_conv); + return ret_conv; +} + +int32_t CS_LDK_block_from_scid(int64_t short_channel_id) { + int32_t ret_conv = block_from_scid(short_channel_id); + return ret_conv; +} + +int32_t CS_LDK_tx_index_from_scid(int64_t short_channel_id) { + int32_t ret_conv = tx_index_from_scid(short_channel_id); + return ret_conv; +} + +int16_t CS_LDK_vout_from_scid(int64_t short_channel_id) { + int16_t ret_conv = vout_from_scid(short_channel_id); + return ret_conv; +} + +int64_t CS_LDK_scid_from_parts(int64_t block, int64_t tx_index, int64_t vout_index) { + LDKCResult_u64ShortChannelIdErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u64ShortChannelIdErrorZ), "LDKCResult_u64ShortChannelIdErrorZ"); + *ret_conv = scid_from_parts(block, tx_index, vout_index); + return tag_ptr(ret_conv, true); +} + void CS_LDK_UntrustedString_free(int64_t this_obj) { LDKUntrustedString this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -32814,53 +35946,647 @@ int64_t CS_LDK_PrintableString_new(jstring a_arg) { return ret_ref; } -void CS_LDK_FutureCallback_free(int64_t this_ptr) { - if (!ptr_is_owned(this_ptr)) return; - void* this_ptr_ptr = untag_ptr(this_ptr); - CHECK_ACCESS(this_ptr_ptr); - LDKFutureCallback this_ptr_conv = *(LDKFutureCallback*)(this_ptr_ptr); - FREE(untag_ptr(this_ptr)); - FutureCallback_free(this_ptr_conv); -} - -void CS_LDK_Future_free(int64_t this_obj) { - LDKFuture this_obj_conv; +void CS_LDK_TrackedSpendableOutput_free(int64_t this_obj) { + LDKTrackedSpendableOutput this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); this_obj_conv.is_owned = ptr_is_owned(this_obj); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - Future_free(this_obj_conv); + TrackedSpendableOutput_free(this_obj_conv); } -static inline uint64_t Future_clone_ptr(LDKFuture *NONNULL_PTR arg) { - LDKFuture ret_var = Future_clone(arg); +int64_t CS_LDK_TrackedSpendableOutput_get_descriptor(int64_t this_ptr) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKSpendableOutputDescriptor *ret_copy = MALLOC(sizeof(LDKSpendableOutputDescriptor), "LDKSpendableOutputDescriptor"); + *ret_copy = TrackedSpendableOutput_get_descriptor(&this_ptr_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void CS_LDK_TrackedSpendableOutput_set_descriptor(int64_t this_ptr, int64_t val) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKSpendableOutputDescriptor val_conv = *(LDKSpendableOutputDescriptor*)(val_ptr); + val_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(val)); + TrackedSpendableOutput_set_descriptor(&this_ptr_conv, val_conv); +} + +int64_t CS_LDK_TrackedSpendableOutput_get_channel_id(int64_t this_ptr) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelId ret_var = TrackedSpendableOutput_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void CS_LDK_TrackedSpendableOutput_set_channel_id(int64_t this_ptr, int64_t val) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TrackedSpendableOutput_set_channel_id(&this_ptr_conv, val_conv); +} + +int64_t CS_LDK_TrackedSpendableOutput_get_status(int64_t this_ptr) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = TrackedSpendableOutput_get_status(&this_ptr_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void CS_LDK_TrackedSpendableOutput_set_status(int64_t this_ptr, int64_t val) { + LDKTrackedSpendableOutput this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKOutputSpendStatus val_conv = *(LDKOutputSpendStatus*)(val_ptr); + val_conv = OutputSpendStatus_clone((LDKOutputSpendStatus*)untag_ptr(val)); + TrackedSpendableOutput_set_status(&this_ptr_conv, val_conv); +} + +int64_t CS_LDK_TrackedSpendableOutput_new(int64_t descriptor_arg, int64_t channel_id_arg, int64_t status_arg) { + void* descriptor_arg_ptr = untag_ptr(descriptor_arg); + CHECK_ACCESS(descriptor_arg_ptr); + LDKSpendableOutputDescriptor descriptor_arg_conv = *(LDKSpendableOutputDescriptor*)(descriptor_arg_ptr); + descriptor_arg_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptor_arg)); + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + void* status_arg_ptr = untag_ptr(status_arg); + CHECK_ACCESS(status_arg_ptr); + LDKOutputSpendStatus status_arg_conv = *(LDKOutputSpendStatus*)(status_arg_ptr); + status_arg_conv = OutputSpendStatus_clone((LDKOutputSpendStatus*)untag_ptr(status_arg)); + LDKTrackedSpendableOutput ret_var = TrackedSpendableOutput_new(descriptor_arg_conv, channel_id_arg_conv, status_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t TrackedSpendableOutput_clone_ptr(LDKTrackedSpendableOutput *NONNULL_PTR arg) { + LDKTrackedSpendableOutput ret_var = TrackedSpendableOutput_clone(arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -int64_t CS_LDK_Future_clone_ptr(int64_t arg) { - LDKFuture arg_conv; +int64_t CS_LDK_TrackedSpendableOutput_clone_ptr(int64_t arg) { + LDKTrackedSpendableOutput arg_conv; arg_conv.inner = untag_ptr(arg); arg_conv.is_owned = ptr_is_owned(arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); arg_conv.is_owned = false; - int64_t ret_conv = Future_clone_ptr(&arg_conv); + int64_t ret_conv = TrackedSpendableOutput_clone_ptr(&arg_conv); return ret_conv; } -int64_t CS_LDK_Future_clone(int64_t orig) { - LDKFuture orig_conv; +int64_t CS_LDK_TrackedSpendableOutput_clone(int64_t orig) { + LDKTrackedSpendableOutput orig_conv; orig_conv.inner = untag_ptr(orig); orig_conv.is_owned = ptr_is_owned(orig); CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); orig_conv.is_owned = false; - LDKFuture ret_var = Future_clone(&orig_conv); + LDKTrackedSpendableOutput ret_var = TrackedSpendableOutput_clone(&orig_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } +jboolean CS_LDK_TrackedSpendableOutput_eq(int64_t a, int64_t b) { + LDKTrackedSpendableOutput a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKTrackedSpendableOutput b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = TrackedSpendableOutput_eq(&a_conv, &b_conv); + return ret_conv; +} + +jboolean CS_LDK_TrackedSpendableOutput_is_spent_in(int64_t this_arg, int8_tArray tx) { + LDKTrackedSpendableOutput this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKTransaction tx_ref; + tx_ref.datalen = tx->arr_len; + tx_ref.data = MALLOC(tx_ref.datalen, "LDKTransaction Bytes"); + memcpy(tx_ref.data, tx->elems, tx_ref.datalen); FREE(tx); + tx_ref.data_is_owned = true; + jboolean ret_conv = TrackedSpendableOutput_is_spent_in(&this_arg_conv, tx_ref); + return ret_conv; +} + +int8_tArray CS_LDK_TrackedSpendableOutput_write(int64_t obj) { + LDKTrackedSpendableOutput obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = TrackedSpendableOutput_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +int64_t CS_LDK_TrackedSpendableOutput_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ"); + *ret_conv = TrackedSpendableOutput_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + +void CS_LDK_OutputSpendStatus_free(int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKOutputSpendStatus this_ptr_conv = *(LDKOutputSpendStatus*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + OutputSpendStatus_free(this_ptr_conv); +} + +static inline uint64_t OutputSpendStatus_clone_ptr(LDKOutputSpendStatus *NONNULL_PTR arg) { + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = OutputSpendStatus_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t CS_LDK_OutputSpendStatus_clone_ptr(int64_t arg) { + LDKOutputSpendStatus* arg_conv = (LDKOutputSpendStatus*)untag_ptr(arg); + int64_t ret_conv = OutputSpendStatus_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_OutputSpendStatus_clone(int64_t orig) { + LDKOutputSpendStatus* orig_conv = (LDKOutputSpendStatus*)untag_ptr(orig); + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = OutputSpendStatus_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_OutputSpendStatus_pending_initial_broadcast(int64_t delayed_until_height) { + void* delayed_until_height_ptr = untag_ptr(delayed_until_height); + CHECK_ACCESS(delayed_until_height_ptr); + LDKCOption_u32Z delayed_until_height_conv = *(LDKCOption_u32Z*)(delayed_until_height_ptr); + delayed_until_height_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(delayed_until_height)); + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = OutputSpendStatus_pending_initial_broadcast(delayed_until_height_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_OutputSpendStatus_pending_first_confirmation(int8_tArray first_broadcast_hash, int32_t latest_broadcast_height, int8_tArray latest_spending_tx) { + LDKThirtyTwoBytes first_broadcast_hash_ref; + CHECK(first_broadcast_hash->arr_len == 32); + memcpy(first_broadcast_hash_ref.data, first_broadcast_hash->elems, 32); FREE(first_broadcast_hash); + LDKTransaction latest_spending_tx_ref; + latest_spending_tx_ref.datalen = latest_spending_tx->arr_len; + latest_spending_tx_ref.data = MALLOC(latest_spending_tx_ref.datalen, "LDKTransaction Bytes"); + memcpy(latest_spending_tx_ref.data, latest_spending_tx->elems, latest_spending_tx_ref.datalen); FREE(latest_spending_tx); + latest_spending_tx_ref.data_is_owned = true; + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = OutputSpendStatus_pending_first_confirmation(first_broadcast_hash_ref, latest_broadcast_height, latest_spending_tx_ref); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_OutputSpendStatus_pending_threshold_confirmations(int8_tArray first_broadcast_hash, int32_t latest_broadcast_height, int8_tArray latest_spending_tx, int32_t confirmation_height, int8_tArray confirmation_hash) { + LDKThirtyTwoBytes first_broadcast_hash_ref; + CHECK(first_broadcast_hash->arr_len == 32); + memcpy(first_broadcast_hash_ref.data, first_broadcast_hash->elems, 32); FREE(first_broadcast_hash); + LDKTransaction latest_spending_tx_ref; + latest_spending_tx_ref.datalen = latest_spending_tx->arr_len; + latest_spending_tx_ref.data = MALLOC(latest_spending_tx_ref.datalen, "LDKTransaction Bytes"); + memcpy(latest_spending_tx_ref.data, latest_spending_tx->elems, latest_spending_tx_ref.datalen); FREE(latest_spending_tx); + latest_spending_tx_ref.data_is_owned = true; + LDKThirtyTwoBytes confirmation_hash_ref; + CHECK(confirmation_hash->arr_len == 32); + memcpy(confirmation_hash_ref.data, confirmation_hash->elems, 32); FREE(confirmation_hash); + LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus"); + *ret_copy = OutputSpendStatus_pending_threshold_confirmations(first_broadcast_hash_ref, latest_broadcast_height, latest_spending_tx_ref, confirmation_height, confirmation_hash_ref); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +jboolean CS_LDK_OutputSpendStatus_eq(int64_t a, int64_t b) { + LDKOutputSpendStatus* a_conv = (LDKOutputSpendStatus*)untag_ptr(a); + LDKOutputSpendStatus* b_conv = (LDKOutputSpendStatus*)untag_ptr(b); + jboolean ret_conv = OutputSpendStatus_eq(a_conv, b_conv); + return ret_conv; +} + +int8_tArray CS_LDK_OutputSpendStatus_write(int64_t obj) { + LDKOutputSpendStatus* obj_conv = (LDKOutputSpendStatus*)untag_ptr(obj); + LDKCVec_u8Z ret_var = OutputSpendStatus_write(obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +int64_t CS_LDK_OutputSpendStatus_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ"); + *ret_conv = OutputSpendStatus_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + +void CS_LDK_OutputSweeper_free(int64_t this_obj) { + LDKOutputSweeper this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + OutputSweeper_free(this_obj_conv); +} + +int64_t CS_LDK_OutputSweeper_new(int64_t best_block, int64_t broadcaster, int64_t fee_estimator, int64_t chain_data_source, int64_t output_spender, int64_t change_destination_source, int64_t kv_store, int64_t logger) { + LDKBestBlock best_block_conv; + best_block_conv.inner = untag_ptr(best_block); + best_block_conv.is_owned = ptr_is_owned(best_block); + CHECK_INNER_FIELD_ACCESS_OR_NULL(best_block_conv); + best_block_conv = BestBlock_clone(&best_block_conv); + void* broadcaster_ptr = untag_ptr(broadcaster); + CHECK_ACCESS(broadcaster_ptr); + LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(broadcaster_ptr); + if (broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKBroadcasterInterface_JCalls_cloned(&broadcaster_conv); + } + void* fee_estimator_ptr = untag_ptr(fee_estimator); + CHECK_ACCESS(fee_estimator_ptr); + LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(fee_estimator_ptr); + if (fee_estimator_conv.free == LDKFeeEstimator_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFeeEstimator_JCalls_cloned(&fee_estimator_conv); + } + void* chain_data_source_ptr = untag_ptr(chain_data_source); + CHECK_ACCESS(chain_data_source_ptr); + LDKCOption_FilterZ chain_data_source_conv = *(LDKCOption_FilterZ*)(chain_data_source_ptr); + // WARNING: we may need a move here but no clone is available for LDKCOption_FilterZ + if (chain_data_source_conv.tag == LDKCOption_FilterZ_Some) { + // Manually implement clone for Java trait instances + if (chain_data_source_conv.some.free == LDKFilter_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFilter_JCalls_cloned(&chain_data_source_conv.some); + } + } + void* output_spender_ptr = untag_ptr(output_spender); + CHECK_ACCESS(output_spender_ptr); + LDKOutputSpender output_spender_conv = *(LDKOutputSpender*)(output_spender_ptr); + if (output_spender_conv.free == LDKOutputSpender_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKOutputSpender_JCalls_cloned(&output_spender_conv); + } + void* change_destination_source_ptr = untag_ptr(change_destination_source); + CHECK_ACCESS(change_destination_source_ptr); + LDKChangeDestinationSource change_destination_source_conv = *(LDKChangeDestinationSource*)(change_destination_source_ptr); + if (change_destination_source_conv.free == LDKChangeDestinationSource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKChangeDestinationSource_JCalls_cloned(&change_destination_source_conv); + } + void* kv_store_ptr = untag_ptr(kv_store); + CHECK_ACCESS(kv_store_ptr); + LDKKVStore kv_store_conv = *(LDKKVStore*)(kv_store_ptr); + if (kv_store_conv.free == LDKKVStore_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKKVStore_JCalls_cloned(&kv_store_conv); + } + void* logger_ptr = untag_ptr(logger); + CHECK_ACCESS(logger_ptr); + LDKLogger logger_conv = *(LDKLogger*)(logger_ptr); + if (logger_conv.free == LDKLogger_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKLogger_JCalls_cloned(&logger_conv); + } + LDKOutputSweeper ret_var = OutputSweeper_new(best_block_conv, broadcaster_conv, fee_estimator_conv, chain_data_source_conv, output_spender_conv, change_destination_source_conv, kv_store_conv, logger_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_OutputSweeper_track_spendable_outputs(int64_t this_arg, int64_tArray output_descriptors, int64_t channel_id, jboolean exclude_static_outputs, int64_t delay_until_height) { + LDKOutputSweeper this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_SpendableOutputDescriptorZ output_descriptors_constr; + output_descriptors_constr.datalen = output_descriptors->arr_len; + if (output_descriptors_constr.datalen > 0) + output_descriptors_constr.data = MALLOC(output_descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements"); + else + output_descriptors_constr.data = NULL; + int64_t* output_descriptors_vals = output_descriptors->elems; + for (size_t b = 0; b < output_descriptors_constr.datalen; b++) { + int64_t output_descriptors_conv_27 = output_descriptors_vals[b]; + void* output_descriptors_conv_27_ptr = untag_ptr(output_descriptors_conv_27); + CHECK_ACCESS(output_descriptors_conv_27_ptr); + LDKSpendableOutputDescriptor output_descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(output_descriptors_conv_27_ptr); + output_descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(output_descriptors_conv_27)); + output_descriptors_constr.data[b] = output_descriptors_conv_27_conv; + } + FREE(output_descriptors); + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); + void* delay_until_height_ptr = untag_ptr(delay_until_height); + CHECK_ACCESS(delay_until_height_ptr); + LDKCOption_u32Z delay_until_height_conv = *(LDKCOption_u32Z*)(delay_until_height_ptr); + delay_until_height_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(delay_until_height)); + LDKCResult_NoneNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneNoneZ), "LDKCResult_NoneNoneZ"); + *ret_conv = OutputSweeper_track_spendable_outputs(&this_arg_conv, output_descriptors_constr, channel_id_conv, exclude_static_outputs, delay_until_height_conv); + return tag_ptr(ret_conv, true); +} + +int64_tArray CS_LDK_OutputSweeper_tracked_spendable_outputs(int64_t this_arg) { + LDKOutputSweeper this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_TrackedSpendableOutputZ ret_var = OutputSweeper_tracked_spendable_outputs(&this_arg_conv); + int64_tArray ret_arr = NULL; + ret_arr = init_int64_tArray(ret_var.datalen, __LINE__); + int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8); + for (size_t y = 0; y < ret_var.datalen; y++) { + LDKTrackedSpendableOutput ret_conv_24_var = ret_var.data[y]; + int64_t ret_conv_24_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_24_var); + ret_conv_24_ref = tag_ptr(ret_conv_24_var.inner, ret_conv_24_var.is_owned); + ret_arr_ptr[y] = ret_conv_24_ref; + } + + FREE(ret_var.data); + return ret_arr; +} + +int64_t CS_LDK_OutputSweeper_current_best_block(int64_t this_arg) { + LDKOutputSweeper this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKBestBlock ret_var = OutputSweeper_current_best_block(&this_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_OutputSweeper_as_Listen(int64_t this_arg) { + LDKOutputSweeper this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKListen* ret_ret = MALLOC(sizeof(LDKListen), "LDKListen"); + *ret_ret = OutputSweeper_as_Listen(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + +int64_t CS_LDK_OutputSweeper_as_Confirm(int64_t this_arg) { + LDKOutputSweeper this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKConfirm* ret_ret = MALLOC(sizeof(LDKConfirm), "LDKConfirm"); + *ret_ret = OutputSweeper_as_Confirm(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + +void CS_LDK_SpendingDelay_free(int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKSpendingDelay this_ptr_conv = *(LDKSpendingDelay*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + SpendingDelay_free(this_ptr_conv); +} + +static inline uint64_t SpendingDelay_clone_ptr(LDKSpendingDelay *NONNULL_PTR arg) { + LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay"); + *ret_copy = SpendingDelay_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t CS_LDK_SpendingDelay_clone_ptr(int64_t arg) { + LDKSpendingDelay* arg_conv = (LDKSpendingDelay*)untag_ptr(arg); + int64_t ret_conv = SpendingDelay_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_SpendingDelay_clone(int64_t orig) { + LDKSpendingDelay* orig_conv = (LDKSpendingDelay*)untag_ptr(orig); + LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay"); + *ret_copy = SpendingDelay_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_SpendingDelay_relative(int32_t num_blocks) { + LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay"); + *ret_copy = SpendingDelay_relative(num_blocks); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_SpendingDelay_absolute(int32_t height) { + LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay"); + *ret_copy = SpendingDelay_absolute(height); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_OutputSweeper_read(int8_tArray ser, int64_t arg_a, int64_t arg_b, int64_t arg_c, int64_t arg_d, int64_t arg_e, int64_t arg_f, int64_t arg_g) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + void* arg_a_ptr = untag_ptr(arg_a); + CHECK_ACCESS(arg_a_ptr); + LDKBroadcasterInterface arg_a_conv = *(LDKBroadcasterInterface*)(arg_a_ptr); + if (arg_a_conv.free == LDKBroadcasterInterface_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKBroadcasterInterface_JCalls_cloned(&arg_a_conv); + } + void* arg_b_ptr = untag_ptr(arg_b); + CHECK_ACCESS(arg_b_ptr); + LDKFeeEstimator arg_b_conv = *(LDKFeeEstimator*)(arg_b_ptr); + if (arg_b_conv.free == LDKFeeEstimator_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFeeEstimator_JCalls_cloned(&arg_b_conv); + } + void* arg_c_ptr = untag_ptr(arg_c); + CHECK_ACCESS(arg_c_ptr); + LDKCOption_FilterZ arg_c_conv = *(LDKCOption_FilterZ*)(arg_c_ptr); + // WARNING: we may need a move here but no clone is available for LDKCOption_FilterZ + if (arg_c_conv.tag == LDKCOption_FilterZ_Some) { + // Manually implement clone for Java trait instances + if (arg_c_conv.some.free == LDKFilter_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFilter_JCalls_cloned(&arg_c_conv.some); + } + } + void* arg_d_ptr = untag_ptr(arg_d); + CHECK_ACCESS(arg_d_ptr); + LDKOutputSpender arg_d_conv = *(LDKOutputSpender*)(arg_d_ptr); + if (arg_d_conv.free == LDKOutputSpender_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKOutputSpender_JCalls_cloned(&arg_d_conv); + } + void* arg_e_ptr = untag_ptr(arg_e); + CHECK_ACCESS(arg_e_ptr); + LDKChangeDestinationSource arg_e_conv = *(LDKChangeDestinationSource*)(arg_e_ptr); + if (arg_e_conv.free == LDKChangeDestinationSource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKChangeDestinationSource_JCalls_cloned(&arg_e_conv); + } + void* arg_f_ptr = untag_ptr(arg_f); + CHECK_ACCESS(arg_f_ptr); + LDKKVStore arg_f_conv = *(LDKKVStore*)(arg_f_ptr); + if (arg_f_conv.free == LDKKVStore_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKKVStore_JCalls_cloned(&arg_f_conv); + } + void* arg_g_ptr = untag_ptr(arg_g); + CHECK_ACCESS(arg_g_ptr); + LDKLogger arg_g_conv = *(LDKLogger*)(arg_g_ptr); + if (arg_g_conv.free == LDKLogger_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKLogger_JCalls_cloned(&arg_g_conv); + } + LDKCResult_OutputSweeperDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSweeperDecodeErrorZ), "LDKCResult_OutputSweeperDecodeErrorZ"); + *ret_conv = OutputSweeper_read(ser_ref, arg_a_conv, arg_b_conv, arg_c_conv, arg_d_conv, arg_e_conv, arg_f_conv, arg_g_conv); + FREE(ser); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_C2Tuple_BestBlockOutputSweeperZ_read(int8_tArray ser, int64_t arg_a, int64_t arg_b, int64_t arg_c, int64_t arg_d, int64_t arg_e, int64_t arg_f, int64_t arg_g) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + void* arg_a_ptr = untag_ptr(arg_a); + CHECK_ACCESS(arg_a_ptr); + LDKBroadcasterInterface arg_a_conv = *(LDKBroadcasterInterface*)(arg_a_ptr); + if (arg_a_conv.free == LDKBroadcasterInterface_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKBroadcasterInterface_JCalls_cloned(&arg_a_conv); + } + void* arg_b_ptr = untag_ptr(arg_b); + CHECK_ACCESS(arg_b_ptr); + LDKFeeEstimator arg_b_conv = *(LDKFeeEstimator*)(arg_b_ptr); + if (arg_b_conv.free == LDKFeeEstimator_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFeeEstimator_JCalls_cloned(&arg_b_conv); + } + void* arg_c_ptr = untag_ptr(arg_c); + CHECK_ACCESS(arg_c_ptr); + LDKCOption_FilterZ arg_c_conv = *(LDKCOption_FilterZ*)(arg_c_ptr); + // WARNING: we may need a move here but no clone is available for LDKCOption_FilterZ + if (arg_c_conv.tag == LDKCOption_FilterZ_Some) { + // Manually implement clone for Java trait instances + if (arg_c_conv.some.free == LDKFilter_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFilter_JCalls_cloned(&arg_c_conv.some); + } + } + void* arg_d_ptr = untag_ptr(arg_d); + CHECK_ACCESS(arg_d_ptr); + LDKOutputSpender arg_d_conv = *(LDKOutputSpender*)(arg_d_ptr); + if (arg_d_conv.free == LDKOutputSpender_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKOutputSpender_JCalls_cloned(&arg_d_conv); + } + void* arg_e_ptr = untag_ptr(arg_e); + CHECK_ACCESS(arg_e_ptr); + LDKChangeDestinationSource arg_e_conv = *(LDKChangeDestinationSource*)(arg_e_ptr); + if (arg_e_conv.free == LDKChangeDestinationSource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKChangeDestinationSource_JCalls_cloned(&arg_e_conv); + } + void* arg_f_ptr = untag_ptr(arg_f); + CHECK_ACCESS(arg_f_ptr); + LDKKVStore arg_f_conv = *(LDKKVStore*)(arg_f_ptr); + if (arg_f_conv.free == LDKKVStore_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKKVStore_JCalls_cloned(&arg_f_conv); + } + void* arg_g_ptr = untag_ptr(arg_g); + CHECK_ACCESS(arg_g_ptr); + LDKLogger arg_g_conv = *(LDKLogger*)(arg_g_ptr); + if (arg_g_conv.free == LDKLogger_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKLogger_JCalls_cloned(&arg_g_conv); + } + LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ), "LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ"); + *ret_conv = C2Tuple_BestBlockOutputSweeperZ_read(ser_ref, arg_a_conv, arg_b_conv, arg_c_conv, arg_d_conv, arg_e_conv, arg_f_conv, arg_g_conv); + FREE(ser); + return tag_ptr(ret_conv, true); +} + +void CS_LDK_FutureCallback_free(int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKFutureCallback this_ptr_conv = *(LDKFutureCallback*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + FutureCallback_free(this_ptr_conv); +} + +void CS_LDK_Future_free(int64_t this_obj) { + LDKFuture this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + Future_free(this_obj_conv); +} + void CS_LDK_Future_register_callback_fn(int64_t this_arg, int64_t callback) { LDKFuture this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -32882,8 +36608,8 @@ void CS_LDK_Future_wait(int64_t this_arg) { this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv = Future_clone(&this_arg_conv); - Future_wait(this_arg_conv); + this_arg_conv.is_owned = false; + Future_wait(&this_arg_conv); } jboolean CS_LDK_Future_wait_timeout(int64_t this_arg, int64_t max_wait) { @@ -32891,8 +36617,8 @@ jboolean CS_LDK_Future_wait_timeout(int64_t this_arg, int64_t max_wait) { this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv = Future_clone(&this_arg_conv); - jboolean ret_conv = Future_wait_timeout(this_arg_conv, max_wait); + this_arg_conv.is_owned = false; + jboolean ret_conv = Future_wait_timeout(&this_arg_conv, max_wait); return ret_conv; } @@ -32909,8 +36635,8 @@ int64_t CS_LDK_Sleeper_from_single_future(int64_t future) { future_conv.inner = untag_ptr(future); future_conv.is_owned = ptr_is_owned(future); CHECK_INNER_FIELD_ACCESS_OR_NULL(future_conv); - future_conv = Future_clone(&future_conv); - LDKSleeper ret_var = Sleeper_from_single_future(future_conv); + future_conv.is_owned = false; + LDKSleeper ret_var = Sleeper_from_single_future(&future_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -32922,13 +36648,13 @@ int64_t CS_LDK_Sleeper_from_two_futures(int64_t fut_a, int64_t fut_b) { fut_a_conv.inner = untag_ptr(fut_a); fut_a_conv.is_owned = ptr_is_owned(fut_a); CHECK_INNER_FIELD_ACCESS_OR_NULL(fut_a_conv); - fut_a_conv = Future_clone(&fut_a_conv); + fut_a_conv.is_owned = false; LDKFuture fut_b_conv; fut_b_conv.inner = untag_ptr(fut_b); fut_b_conv.is_owned = ptr_is_owned(fut_b); CHECK_INNER_FIELD_ACCESS_OR_NULL(fut_b_conv); - fut_b_conv = Future_clone(&fut_b_conv); - LDKSleeper ret_var = Sleeper_from_two_futures(fut_a_conv, fut_b_conv); + fut_b_conv.is_owned = false; + LDKSleeper ret_var = Sleeper_from_two_futures(&fut_a_conv, &fut_b_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -32949,7 +36675,8 @@ int64_t CS_LDK_Sleeper_new(int64_tArray futures) { futures_conv_8_conv.inner = untag_ptr(futures_conv_8); futures_conv_8_conv.is_owned = ptr_is_owned(futures_conv_8); CHECK_INNER_FIELD_ACCESS_OR_NULL(futures_conv_8_conv); - futures_conv_8_conv = Future_clone(&futures_conv_8_conv); + // WARNING: we need a move here but no clone is available for LDKFuture + futures_constr.data[i] = futures_conv_8_conv; } FREE(futures); @@ -33090,9 +36817,10 @@ int64_t CS_LDK_Record_get_channel_id(int64_t this_ptr) { this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKCOption_ThirtyTwoBytesZ *ret_copy = MALLOC(sizeof(LDKCOption_ThirtyTwoBytesZ), "LDKCOption_ThirtyTwoBytesZ"); - *ret_copy = Record_get_channel_id(&this_ptr_conv); - int64_t ret_ref = tag_ptr(ret_copy, true); + LDKChannelId ret_var = Record_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } @@ -33102,10 +36830,11 @@ void CS_LDK_Record_set_channel_id(int64_t this_ptr, int64_t val) { this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - void* val_ptr = untag_ptr(val); - CHECK_ACCESS(val_ptr); - LDKCOption_ThirtyTwoBytesZ val_conv = *(LDKCOption_ThirtyTwoBytesZ*)(val_ptr); - val_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(val)); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); Record_set_channel_id(&this_ptr_conv, val_conv); } @@ -33199,10 +36928,11 @@ int64_t CS_LDK_Record_new(int32_t level_arg, int8_tArray peer_id_arg, int64_t c LDKPublicKey peer_id_arg_ref; CHECK(peer_id_arg->arr_len == 33); memcpy(peer_id_arg_ref.compressed_form, peer_id_arg->elems, 33); FREE(peer_id_arg); - void* channel_id_arg_ptr = untag_ptr(channel_id_arg); - CHECK_ACCESS(channel_id_arg_ptr); - LDKCOption_ThirtyTwoBytesZ channel_id_arg_conv = *(LDKCOption_ThirtyTwoBytesZ*)(channel_id_arg_ptr); - channel_id_arg_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(channel_id_arg)); + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKStr args_arg_conv = str_ref_to_owned_c(args_arg); LDKStr module_path_arg_conv = str_ref_to_owned_c(module_path_arg); LDKStr file_arg_conv = str_ref_to_owned_c(file_arg); @@ -34461,6 +38191,59 @@ void CS_LDK_BestBlock_free(int64_t this_obj) { BestBlock_free(this_obj_conv); } +int8_tArray CS_LDK_BestBlock_get_block_hash(int64_t this_ptr) { + LDKBestBlock this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(32, __LINE__); + memcpy(ret_arr->elems, *BestBlock_get_block_hash(&this_ptr_conv), 32); + return ret_arr; +} + +void CS_LDK_BestBlock_set_block_hash(int64_t this_ptr, int8_tArray val) { + LDKBestBlock this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKThirtyTwoBytes val_ref; + CHECK(val->arr_len == 32); + memcpy(val_ref.data, val->elems, 32); FREE(val); + BestBlock_set_block_hash(&this_ptr_conv, val_ref); +} + +int32_t CS_LDK_BestBlock_get_height(int64_t this_ptr) { + LDKBestBlock this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int32_t ret_conv = BestBlock_get_height(&this_ptr_conv); + return ret_conv; +} + +void CS_LDK_BestBlock_set_height(int64_t this_ptr, int32_t val) { + LDKBestBlock this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + BestBlock_set_height(&this_ptr_conv, val); +} + +int64_t CS_LDK_BestBlock_new(int8_tArray block_hash_arg, int32_t height_arg) { + LDKThirtyTwoBytes block_hash_arg_ref; + CHECK(block_hash_arg->arr_len == 32); + memcpy(block_hash_arg_ref.data, block_hash_arg->elems, 32); FREE(block_hash_arg); + LDKBestBlock ret_var = BestBlock_new(block_hash_arg_ref, height_arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + static inline uint64_t BestBlock_clone_ptr(LDKBestBlock *NONNULL_PTR arg) { LDKBestBlock ret_var = BestBlock_clone(arg); int64_t ret_ref = 0; @@ -34491,6 +38274,16 @@ int64_t CS_LDK_BestBlock_clone(int64_t orig) { return ret_ref; } +int64_t CS_LDK_BestBlock_hash(int64_t o) { + LDKBestBlock o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = BestBlock_hash(&o_conv); + return ret_conv; +} + jboolean CS_LDK_BestBlock_eq(int64_t a, int64_t b) { LDKBestBlock a_conv; a_conv.inner = untag_ptr(a); @@ -34515,36 +38308,27 @@ int64_t CS_LDK_BestBlock_from_network(int32_t network) { return ret_ref; } -int64_t CS_LDK_BestBlock_new(int8_tArray block_hash, int32_t height) { - LDKThirtyTwoBytes block_hash_ref; - CHECK(block_hash->arr_len == 32); - memcpy(block_hash_ref.data, block_hash->elems, 32); FREE(block_hash); - LDKBestBlock ret_var = BestBlock_new(block_hash_ref, height); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -int8_tArray CS_LDK_BestBlock_block_hash(int64_t this_arg) { - LDKBestBlock this_arg_conv; - this_arg_conv.inner = untag_ptr(this_arg); - this_arg_conv.is_owned = ptr_is_owned(this_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, BestBlock_block_hash(&this_arg_conv).data, 32); +int8_tArray CS_LDK_BestBlock_write(int64_t obj) { + LDKBestBlock obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = BestBlock_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); return ret_arr; } -int32_t CS_LDK_BestBlock_height(int64_t this_arg) { - LDKBestBlock this_arg_conv; - this_arg_conv.inner = untag_ptr(this_arg); - this_arg_conv.is_owned = ptr_is_owned(this_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv.is_owned = false; - int32_t ret_conv = BestBlock_height(&this_arg_conv); - return ret_conv; +int64_t CS_LDK_BestBlock_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ"); + *ret_conv = BestBlock_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); } void CS_LDK_Listen_free(int64_t this_ptr) { @@ -34818,6 +38602,11 @@ int32_t CS_LDK_ConfirmationTarget_channel_close_minimum() { return ret_conv; } +int32_t CS_LDK_ConfirmationTarget_output_spending_fee() { + int32_t ret_conv = LDKConfirmationTarget_to_cs(ConfirmationTarget_output_spending_fee()); + return ret_conv; +} + int64_t CS_LDK_ConfirmationTarget_hash(int64_t o) { LDKConfirmationTarget* o_conv = (LDKConfirmationTarget*)untag_ptr(o); int64_t ret_conv = ConfirmationTarget_hash(o_conv); @@ -35035,16 +38824,14 @@ int64_tArray CS_LDK_ChainMonitor_list_monitors(int64_t this_arg) { this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKCVec_OutPointZ ret_var = ChainMonitor_list_monitors(&this_arg_conv); + LDKCVec_C2Tuple_OutPointChannelIdZZ ret_var = ChainMonitor_list_monitors(&this_arg_conv); int64_tArray ret_arr = NULL; ret_arr = init_int64_tArray(ret_var.datalen, __LINE__); int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8); - for (size_t k = 0; k < ret_var.datalen; k++) { - LDKOutPoint ret_conv_10_var = ret_var.data[k]; - int64_t ret_conv_10_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_10_var); - ret_conv_10_ref = tag_ptr(ret_conv_10_var.inner, ret_conv_10_var.is_owned); - ret_arr_ptr[k] = ret_conv_10_ref; + for (size_t d = 0; d < ret_var.datalen; d++) { + LDKC2Tuple_OutPointChannelIdZ* ret_conv_29_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ"); + *ret_conv_29_conv = ret_var.data[d]; + ret_arr_ptr[d] = tag_ptr(ret_conv_29_conv, true); } FREE(ret_var.data); @@ -35114,6 +38901,29 @@ void CS_LDK_ChainMonitor_rebroadcast_pending_claims(int64_t this_arg) { ChainMonitor_rebroadcast_pending_claims(&this_arg_conv); } +void CS_LDK_ChainMonitor_signer_unblocked(int64_t this_arg, int64_t monitor_opt) { + LDKChainMonitor this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKOutPoint monitor_opt_conv; + monitor_opt_conv.inner = untag_ptr(monitor_opt); + monitor_opt_conv.is_owned = ptr_is_owned(monitor_opt); + CHECK_INNER_FIELD_ACCESS_OR_NULL(monitor_opt_conv); + monitor_opt_conv = OutPoint_clone(&monitor_opt_conv); + ChainMonitor_signer_unblocked(&this_arg_conv, monitor_opt_conv); +} + +void CS_LDK_ChainMonitor_archive_fully_resolved_channel_monitors(int64_t this_arg) { + LDKChainMonitor this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + ChainMonitor_archive_fully_resolved_channel_monitors(&this_arg_conv); +} + int64_t CS_LDK_ChainMonitor_as_Listen(int64_t this_arg) { LDKChainMonitor this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -35185,6 +38995,33 @@ void CS_LDK_ChannelMonitorUpdate_set_update_id(int64_t this_ptr, int64_t val) { ChannelMonitorUpdate_set_update_id(&this_ptr_conv, val); } +int64_t CS_LDK_ChannelMonitorUpdate_get_channel_id(int64_t this_ptr) { + LDKChannelMonitorUpdate this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelId ret_var = ChannelMonitorUpdate_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void CS_LDK_ChannelMonitorUpdate_set_channel_id(int64_t this_ptr, int64_t val) { + LDKChannelMonitorUpdate this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ChannelMonitorUpdate_set_channel_id(&this_ptr_conv, val_conv); +} + static inline uint64_t ChannelMonitorUpdate_clone_ptr(LDKChannelMonitorUpdate *NONNULL_PTR arg) { LDKChannelMonitorUpdate ret_var = ChannelMonitorUpdate_clone(arg); int64_t ret_ref = 0; @@ -35294,6 +39131,27 @@ int64_t CS_LDK_MonitorEvent_htlcevent(int64_t a) { return ret_ref; } +int64_t CS_LDK_MonitorEvent_holder_force_closed_with_info(int64_t reason, int64_t outpoint, int64_t channel_id) { + void* reason_ptr = untag_ptr(reason); + CHECK_ACCESS(reason_ptr); + LDKClosureReason reason_conv = *(LDKClosureReason*)(reason_ptr); + reason_conv = ClosureReason_clone((LDKClosureReason*)untag_ptr(reason)); + LDKOutPoint outpoint_conv; + outpoint_conv.inner = untag_ptr(outpoint); + outpoint_conv.is_owned = ptr_is_owned(outpoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_conv); + outpoint_conv = OutPoint_clone(&outpoint_conv); + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); + LDKMonitorEvent *ret_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent"); + *ret_copy = MonitorEvent_holder_force_closed_with_info(reason_conv, outpoint_conv, channel_id_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + int64_t CS_LDK_MonitorEvent_holder_force_closed(int64_t a) { LDKOutPoint a_conv; a_conv.inner = untag_ptr(a); @@ -35306,14 +39164,19 @@ int64_t CS_LDK_MonitorEvent_holder_force_closed(int64_t a) { return ret_ref; } -int64_t CS_LDK_MonitorEvent_completed(int64_t funding_txo, int64_t monitor_update_id) { +int64_t CS_LDK_MonitorEvent_completed(int64_t funding_txo, int64_t channel_id, int64_t monitor_update_id) { LDKOutPoint funding_txo_conv; funding_txo_conv.inner = untag_ptr(funding_txo); funding_txo_conv.is_owned = ptr_is_owned(funding_txo); CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_conv); funding_txo_conv = OutPoint_clone(&funding_txo_conv); + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKMonitorEvent *ret_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent"); - *ret_copy = MonitorEvent_completed(funding_txo_conv, monitor_update_id); + *ret_copy = MonitorEvent_completed(funding_txo_conv, channel_id_conv, monitor_update_id); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -35613,6 +39476,19 @@ int64_t CS_LDK_ChannelMonitor_get_funding_txo(int64_t this_arg) { return tag_ptr(ret_conv, true); } +int64_t CS_LDK_ChannelMonitor_channel_id(int64_t this_arg) { + LDKChannelMonitor this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKChannelId ret_var = ChannelMonitor_channel_id(&this_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + int64_tArray CS_LDK_ChannelMonitor_get_outputs_to_watch(int64_t this_arg) { LDKChannelMonitor this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -35748,119 +39624,112 @@ int8_tArray CS_LDK_ChannelMonitor_get_counterparty_node_id(int64_t this_arg) { return ret_arr; } -ptrArray CS_LDK_ChannelMonitor_get_latest_holder_commitment_txn(int64_t this_arg, int64_t logger) { +void CS_LDK_ChannelMonitor_broadcast_latest_holder_commitment_txn(int64_t this_arg, int64_t broadcaster, int64_t fee_estimator, int64_t logger) { LDKChannelMonitor this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; + void* broadcaster_ptr = untag_ptr(broadcaster); + if (ptr_is_owned(broadcaster)) { CHECK_ACCESS(broadcaster_ptr); } + LDKBroadcasterInterface* broadcaster_conv = (LDKBroadcasterInterface*)broadcaster_ptr; + void* fee_estimator_ptr = untag_ptr(fee_estimator); + if (ptr_is_owned(fee_estimator)) { CHECK_ACCESS(fee_estimator_ptr); } + LDKFeeEstimator* fee_estimator_conv = (LDKFeeEstimator*)fee_estimator_ptr; void* logger_ptr = untag_ptr(logger); if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); } LDKLogger* logger_conv = (LDKLogger*)logger_ptr; - LDKCVec_TransactionZ ret_var = ChannelMonitor_get_latest_holder_commitment_txn(&this_arg_conv, logger_conv); - ptrArray ret_arr = NULL; - ret_arr = init_ptrArray(ret_var.datalen, __LINE__); - int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 8); - for (size_t i = 0; i < ret_var.datalen; i++) { - LDKTransaction ret_conv_8_var = ret_var.data[i]; - int8_tArray ret_conv_8_arr = init_int8_tArray(ret_conv_8_var.datalen, __LINE__); - memcpy(ret_conv_8_arr->elems, ret_conv_8_var.data, ret_conv_8_var.datalen); - Transaction_free(ret_conv_8_var); - ret_arr_ptr[i] = ret_conv_8_arr; + ChannelMonitor_broadcast_latest_holder_commitment_txn(&this_arg_conv, broadcaster_conv, fee_estimator_conv, logger_conv); +} + +int64_tArray CS_LDK_ChannelMonitor_block_connected(int64_t this_arg, int8_tArray header, int64_tArray txdata, int32_t height, int64_t broadcaster, int64_t fee_estimator, int64_t logger) { + LDKChannelMonitor this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + uint8_t header_arr[80]; + CHECK(header->arr_len == 80); + memcpy(header_arr, header->elems, 80); FREE(header); + uint8_t (*header_ref)[80] = &header_arr; + LDKCVec_C2Tuple_usizeTransactionZZ txdata_constr; + txdata_constr.datalen = txdata->arr_len; + if (txdata_constr.datalen > 0) + txdata_constr.data = MALLOC(txdata_constr.datalen * sizeof(LDKC2Tuple_usizeTransactionZ), "LDKCVec_C2Tuple_usizeTransactionZZ Elements"); + else + txdata_constr.data = NULL; + int64_t* txdata_vals = txdata->elems; + for (size_t c = 0; c < txdata_constr.datalen; c++) { + int64_t txdata_conv_28 = txdata_vals[c]; + void* txdata_conv_28_ptr = untag_ptr(txdata_conv_28); + CHECK_ACCESS(txdata_conv_28_ptr); + LDKC2Tuple_usizeTransactionZ txdata_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(txdata_conv_28_ptr); + txdata_conv_28_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)untag_ptr(txdata_conv_28)); + txdata_constr.data[c] = txdata_conv_28_conv; + } + FREE(txdata); + void* broadcaster_ptr = untag_ptr(broadcaster); + CHECK_ACCESS(broadcaster_ptr); + LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(broadcaster_ptr); + if (broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKBroadcasterInterface_JCalls_cloned(&broadcaster_conv); + } + void* fee_estimator_ptr = untag_ptr(fee_estimator); + CHECK_ACCESS(fee_estimator_ptr); + LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(fee_estimator_ptr); + if (fee_estimator_conv.free == LDKFeeEstimator_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFeeEstimator_JCalls_cloned(&fee_estimator_conv); + } + void* logger_ptr = untag_ptr(logger); + if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); } + LDKLogger* logger_conv = (LDKLogger*)logger_ptr; + LDKCVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_block_connected(&this_arg_conv, header_ref, txdata_constr, height, broadcaster_conv, fee_estimator_conv, logger_conv); + int64_tArray ret_arr = NULL; + ret_arr = init_int64_tArray(ret_var.datalen, __LINE__); + int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8); + for (size_t x = 0; x < ret_var.datalen; x++) { + LDKC2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ* ret_conv_49_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ"); + *ret_conv_49_conv = ret_var.data[x]; + ret_arr_ptr[x] = tag_ptr(ret_conv_49_conv, true); } FREE(ret_var.data); return ret_arr; } -int64_tArray CS_LDK_ChannelMonitor_block_connected(int64_t this_arg, int8_tArray header, int64_tArray txdata, int32_t height, int64_t broadcaster, int64_t fee_estimator, int64_t logger) { - LDKChannelMonitor this_arg_conv; - this_arg_conv.inner = untag_ptr(this_arg); - this_arg_conv.is_owned = ptr_is_owned(this_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv.is_owned = false; - uint8_t header_arr[80]; - CHECK(header->arr_len == 80); - memcpy(header_arr, header->elems, 80); FREE(header); - uint8_t (*header_ref)[80] = &header_arr; - LDKCVec_C2Tuple_usizeTransactionZZ txdata_constr; - txdata_constr.datalen = txdata->arr_len; - if (txdata_constr.datalen > 0) - txdata_constr.data = MALLOC(txdata_constr.datalen * sizeof(LDKC2Tuple_usizeTransactionZ), "LDKCVec_C2Tuple_usizeTransactionZZ Elements"); - else - txdata_constr.data = NULL; - int64_t* txdata_vals = txdata->elems; - for (size_t c = 0; c < txdata_constr.datalen; c++) { - int64_t txdata_conv_28 = txdata_vals[c]; - void* txdata_conv_28_ptr = untag_ptr(txdata_conv_28); - CHECK_ACCESS(txdata_conv_28_ptr); - LDKC2Tuple_usizeTransactionZ txdata_conv_28_conv = *(LDKC2Tuple_usizeTransactionZ*)(txdata_conv_28_ptr); - txdata_conv_28_conv = C2Tuple_usizeTransactionZ_clone((LDKC2Tuple_usizeTransactionZ*)untag_ptr(txdata_conv_28)); - txdata_constr.data[c] = txdata_conv_28_conv; - } - FREE(txdata); - void* broadcaster_ptr = untag_ptr(broadcaster); - CHECK_ACCESS(broadcaster_ptr); - LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(broadcaster_ptr); - if (broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) { - // If this_arg is a JCalls struct, then we need to increment the refcnt in it. - LDKBroadcasterInterface_JCalls_cloned(&broadcaster_conv); - } - void* fee_estimator_ptr = untag_ptr(fee_estimator); - CHECK_ACCESS(fee_estimator_ptr); - LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(fee_estimator_ptr); - if (fee_estimator_conv.free == LDKFeeEstimator_JCalls_free) { - // If this_arg is a JCalls struct, then we need to increment the refcnt in it. - LDKFeeEstimator_JCalls_cloned(&fee_estimator_conv); - } - void* logger_ptr = untag_ptr(logger); - if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); } - LDKLogger* logger_conv = (LDKLogger*)logger_ptr; - LDKCVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_block_connected(&this_arg_conv, header_ref, txdata_constr, height, broadcaster_conv, fee_estimator_conv, logger_conv); - int64_tArray ret_arr = NULL; - ret_arr = init_int64_tArray(ret_var.datalen, __LINE__); - int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8); - for (size_t x = 0; x < ret_var.datalen; x++) { - LDKC2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ* ret_conv_49_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ"); - *ret_conv_49_conv = ret_var.data[x]; - ret_arr_ptr[x] = tag_ptr(ret_conv_49_conv, true); - } - - FREE(ret_var.data); - return ret_arr; -} - -void CS_LDK_ChannelMonitor_block_disconnected(int64_t this_arg, int8_tArray header, int32_t height, int64_t broadcaster, int64_t fee_estimator, int64_t logger) { - LDKChannelMonitor this_arg_conv; - this_arg_conv.inner = untag_ptr(this_arg); - this_arg_conv.is_owned = ptr_is_owned(this_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv.is_owned = false; - uint8_t header_arr[80]; - CHECK(header->arr_len == 80); - memcpy(header_arr, header->elems, 80); FREE(header); - uint8_t (*header_ref)[80] = &header_arr; - void* broadcaster_ptr = untag_ptr(broadcaster); - CHECK_ACCESS(broadcaster_ptr); - LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(broadcaster_ptr); - if (broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) { - // If this_arg is a JCalls struct, then we need to increment the refcnt in it. - LDKBroadcasterInterface_JCalls_cloned(&broadcaster_conv); - } - void* fee_estimator_ptr = untag_ptr(fee_estimator); - CHECK_ACCESS(fee_estimator_ptr); - LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(fee_estimator_ptr); - if (fee_estimator_conv.free == LDKFeeEstimator_JCalls_free) { - // If this_arg is a JCalls struct, then we need to increment the refcnt in it. - LDKFeeEstimator_JCalls_cloned(&fee_estimator_conv); - } - void* logger_ptr = untag_ptr(logger); - if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); } - LDKLogger* logger_conv = (LDKLogger*)logger_ptr; - ChannelMonitor_block_disconnected(&this_arg_conv, header_ref, height, broadcaster_conv, fee_estimator_conv, logger_conv); -} - -int64_tArray CS_LDK_ChannelMonitor_transactions_confirmed(int64_t this_arg, int8_tArray header, int64_tArray txdata, int32_t height, int64_t broadcaster, int64_t fee_estimator, int64_t logger) { +void CS_LDK_ChannelMonitor_block_disconnected(int64_t this_arg, int8_tArray header, int32_t height, int64_t broadcaster, int64_t fee_estimator, int64_t logger) { + LDKChannelMonitor this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + uint8_t header_arr[80]; + CHECK(header->arr_len == 80); + memcpy(header_arr, header->elems, 80); FREE(header); + uint8_t (*header_ref)[80] = &header_arr; + void* broadcaster_ptr = untag_ptr(broadcaster); + CHECK_ACCESS(broadcaster_ptr); + LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(broadcaster_ptr); + if (broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKBroadcasterInterface_JCalls_cloned(&broadcaster_conv); + } + void* fee_estimator_ptr = untag_ptr(fee_estimator); + CHECK_ACCESS(fee_estimator_ptr); + LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(fee_estimator_ptr); + if (fee_estimator_conv.free == LDKFeeEstimator_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFeeEstimator_JCalls_cloned(&fee_estimator_conv); + } + void* logger_ptr = untag_ptr(logger); + if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); } + LDKLogger* logger_conv = (LDKLogger*)logger_ptr; + ChannelMonitor_block_disconnected(&this_arg_conv, header_ref, height, broadcaster_conv, fee_estimator_conv, logger_conv); +} + +int64_tArray CS_LDK_ChannelMonitor_transactions_confirmed(int64_t this_arg, int8_tArray header, int64_tArray txdata, int32_t height, int64_t broadcaster, int64_t fee_estimator, int64_t logger) { LDKChannelMonitor this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); @@ -36047,6 +39916,32 @@ void CS_LDK_ChannelMonitor_rebroadcast_pending_claims(int64_t this_arg, int64_t ChannelMonitor_rebroadcast_pending_claims(&this_arg_conv, broadcaster_conv, fee_estimator_conv, logger_conv); } +void CS_LDK_ChannelMonitor_signer_unblocked(int64_t this_arg, int64_t broadcaster, int64_t fee_estimator, int64_t logger) { + LDKChannelMonitor this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + void* broadcaster_ptr = untag_ptr(broadcaster); + CHECK_ACCESS(broadcaster_ptr); + LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(broadcaster_ptr); + if (broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKBroadcasterInterface_JCalls_cloned(&broadcaster_conv); + } + void* fee_estimator_ptr = untag_ptr(fee_estimator); + CHECK_ACCESS(fee_estimator_ptr); + LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(fee_estimator_ptr); + if (fee_estimator_conv.free == LDKFeeEstimator_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFeeEstimator_JCalls_cloned(&fee_estimator_conv); + } + void* logger_ptr = untag_ptr(logger); + if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); } + LDKLogger* logger_conv = (LDKLogger*)logger_ptr; + ChannelMonitor_signer_unblocked(&this_arg_conv, broadcaster_conv, fee_estimator_conv, logger_conv); +} + int64_tArray CS_LDK_ChannelMonitor_get_spendable_outputs(int64_t this_arg, int8_tArray tx, int32_t confirmation_height) { LDKChannelMonitor this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -36073,6 +39968,19 @@ int64_tArray CS_LDK_ChannelMonitor_get_spendable_outputs(int64_t this_arg, int8 return ret_arr; } +jboolean CS_LDK_ChannelMonitor_is_fully_resolved(int64_t this_arg, int64_t logger) { + LDKChannelMonitor this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + void* logger_ptr = untag_ptr(logger); + if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); } + LDKLogger* logger_conv = (LDKLogger*)logger_ptr; + jboolean ret_conv = ChannelMonitor_is_fully_resolved(&this_arg_conv, logger_conv); + return ret_conv; +} + int64_tArray CS_LDK_ChannelMonitor_get_claimable_balances(int64_t this_arg) { LDKChannelMonitor this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -36226,17 +40134,6 @@ int64_t CS_LDK_OutPoint_hash(int64_t o) { return ret_conv; } -int8_tArray CS_LDK_OutPoint_to_channel_id(int64_t this_arg) { - LDKOutPoint this_arg_conv; - this_arg_conv.inner = untag_ptr(this_arg); - this_arg_conv.is_owned = ptr_is_owned(this_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, OutPoint_to_channel_id(&this_arg_conv).data, 32); - return ret_arr; -} - int8_tArray CS_LDK_OutPoint_write(int64_t obj) { LDKOutPoint obj_conv; obj_conv.inner = untag_ptr(obj); @@ -36348,6 +40245,61 @@ int64_t CS_LDK_InboundHTLCErr_new(int16_t err_code_arg, int8_tArray err_data_ar return ret_ref; } +static inline uint64_t InboundHTLCErr_clone_ptr(LDKInboundHTLCErr *NONNULL_PTR arg) { + LDKInboundHTLCErr ret_var = InboundHTLCErr_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t CS_LDK_InboundHTLCErr_clone_ptr(int64_t arg) { + LDKInboundHTLCErr arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = InboundHTLCErr_clone_ptr(&arg_conv); + return ret_conv; +} + +int64_t CS_LDK_InboundHTLCErr_clone(int64_t orig) { + LDKInboundHTLCErr orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKInboundHTLCErr ret_var = InboundHTLCErr_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_InboundHTLCErr_hash(int64_t o) { + LDKInboundHTLCErr o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = InboundHTLCErr_hash(&o_conv); + return ret_conv; +} + +jboolean CS_LDK_InboundHTLCErr_eq(int64_t a, int64_t b) { + LDKInboundHTLCErr a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKInboundHTLCErr b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = InboundHTLCErr_eq(&a_conv, &b_conv); + return ret_conv; +} + int64_t CS_LDK_peel_payment_onion(int64_t msg, int64_t node_signer, int64_t logger, int32_t cur_height, jboolean accept_mpp_keysend, jboolean allow_skimmed_fees) { LDKUpdateAddHTLC msg_conv; msg_conv.inner = untag_ptr(msg); @@ -36411,7 +40363,7 @@ int64_t CS_LDK_PendingHTLCRouting_forward(int64_t onion_packet, int64_t short_c return ret_ref; } -int64_t CS_LDK_PendingHTLCRouting_receive(int64_t payment_data, int64_t payment_metadata, int32_t incoming_cltv_expiry, int8_tArray phantom_shared_secret, int64_tArray custom_tlvs, jboolean requires_blinded_error) { +int64_t CS_LDK_PendingHTLCRouting_receive(int64_t payment_data, int64_t payment_metadata, int64_t payment_context, int32_t incoming_cltv_expiry, int8_tArray phantom_shared_secret, int64_tArray custom_tlvs, jboolean requires_blinded_error) { LDKFinalOnionHopData payment_data_conv; payment_data_conv.inner = untag_ptr(payment_data); payment_data_conv.is_owned = ptr_is_owned(payment_data); @@ -36421,6 +40373,10 @@ int64_t CS_LDK_PendingHTLCRouting_receive(int64_t payment_data, int64_t payment CHECK_ACCESS(payment_metadata_ptr); LDKCOption_CVec_u8ZZ payment_metadata_conv = *(LDKCOption_CVec_u8ZZ*)(payment_metadata_ptr); payment_metadata_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(payment_metadata)); + void* payment_context_ptr = untag_ptr(payment_context); + CHECK_ACCESS(payment_context_ptr); + LDKCOption_PaymentContextZ payment_context_conv = *(LDKCOption_PaymentContextZ*)(payment_context_ptr); + payment_context_conv = COption_PaymentContextZ_clone((LDKCOption_PaymentContextZ*)untag_ptr(payment_context)); LDKThirtyTwoBytes phantom_shared_secret_ref; CHECK(phantom_shared_secret->arr_len == 32); memcpy(phantom_shared_secret_ref.data, phantom_shared_secret->elems, 32); FREE(phantom_shared_secret); @@ -36441,12 +40397,12 @@ int64_t CS_LDK_PendingHTLCRouting_receive(int64_t payment_data, int64_t payment } FREE(custom_tlvs); LDKPendingHTLCRouting *ret_copy = MALLOC(sizeof(LDKPendingHTLCRouting), "LDKPendingHTLCRouting"); - *ret_copy = PendingHTLCRouting_receive(payment_data_conv, payment_metadata_conv, incoming_cltv_expiry, phantom_shared_secret_ref, custom_tlvs_constr, requires_blinded_error); + *ret_copy = PendingHTLCRouting_receive(payment_data_conv, payment_metadata_conv, payment_context_conv, incoming_cltv_expiry, phantom_shared_secret_ref, custom_tlvs_constr, requires_blinded_error); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -int64_t CS_LDK_PendingHTLCRouting_receive_keysend(int64_t payment_data, int8_tArray payment_preimage, int64_t payment_metadata, int32_t incoming_cltv_expiry, int64_tArray custom_tlvs) { +int64_t CS_LDK_PendingHTLCRouting_receive_keysend(int64_t payment_data, int8_tArray payment_preimage, int64_t payment_metadata, int32_t incoming_cltv_expiry, int64_tArray custom_tlvs, jboolean requires_blinded_error) { LDKFinalOnionHopData payment_data_conv; payment_data_conv.inner = untag_ptr(payment_data); payment_data_conv.is_owned = ptr_is_owned(payment_data); @@ -36476,7 +40432,7 @@ int64_t CS_LDK_PendingHTLCRouting_receive_keysend(int64_t payment_data, int8_tA } FREE(custom_tlvs); LDKPendingHTLCRouting *ret_copy = MALLOC(sizeof(LDKPendingHTLCRouting), "LDKPendingHTLCRouting"); - *ret_copy = PendingHTLCRouting_receive_keysend(payment_data_conv, payment_preimage_ref, payment_metadata_conv, incoming_cltv_expiry, custom_tlvs_constr); + *ret_copy = PendingHTLCRouting_receive_keysend(payment_data_conv, payment_preimage_ref, payment_metadata_conv, incoming_cltv_expiry, custom_tlvs_constr, requires_blinded_error); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -37343,27 +41299,31 @@ void CS_LDK_ChannelDetails_free(int64_t this_obj) { ChannelDetails_free(this_obj_conv); } -int8_tArray CS_LDK_ChannelDetails_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_ChannelDetails_get_channel_id(int64_t this_ptr) { LDKChannelDetails this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *ChannelDetails_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = ChannelDetails_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_ChannelDetails_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_ChannelDetails_set_channel_id(int64_t this_ptr, int64_t val) { LDKChannelDetails this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - ChannelDetails_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ChannelDetails_set_channel_id(&this_ptr_conv, val_conv); } int64_t CS_LDK_ChannelDetails_get_counterparty(int64_t this_ptr) { @@ -37962,83 +41922,6 @@ void CS_LDK_ChannelDetails_set_config(int64_t this_ptr, int64_t val) { ChannelDetails_set_config(&this_ptr_conv, val_conv); } -int64_t CS_LDK_ChannelDetails_new(int8_tArray channel_id_arg, int64_t counterparty_arg, int64_t funding_txo_arg, int64_t channel_type_arg, int64_t short_channel_id_arg, int64_t outbound_scid_alias_arg, int64_t inbound_scid_alias_arg, int64_t channel_value_satoshis_arg, int64_t unspendable_punishment_reserve_arg, int8_tArray user_channel_id_arg, int64_t feerate_sat_per_1000_weight_arg, int64_t balance_msat_arg, int64_t outbound_capacity_msat_arg, int64_t next_outbound_htlc_limit_msat_arg, int64_t next_outbound_htlc_minimum_msat_arg, int64_t inbound_capacity_msat_arg, int64_t confirmations_required_arg, int64_t confirmations_arg, int64_t force_close_spend_delay_arg, jboolean is_outbound_arg, jboolean is_channel_ready_arg, int64_t channel_shutdown_state_arg, jboolean is_usable_arg, jboolean is_public_arg, int64_t inbound_htlc_minimum_msat_arg, int64_t inbound_htlc_maximum_msat_arg, int64_t config_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); - LDKChannelCounterparty counterparty_arg_conv; - counterparty_arg_conv.inner = untag_ptr(counterparty_arg); - counterparty_arg_conv.is_owned = ptr_is_owned(counterparty_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(counterparty_arg_conv); - counterparty_arg_conv = ChannelCounterparty_clone(&counterparty_arg_conv); - LDKOutPoint funding_txo_arg_conv; - funding_txo_arg_conv.inner = untag_ptr(funding_txo_arg); - funding_txo_arg_conv.is_owned = ptr_is_owned(funding_txo_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_arg_conv); - funding_txo_arg_conv = OutPoint_clone(&funding_txo_arg_conv); - LDKChannelTypeFeatures channel_type_arg_conv; - channel_type_arg_conv.inner = untag_ptr(channel_type_arg); - channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv); - channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv); - void* short_channel_id_arg_ptr = untag_ptr(short_channel_id_arg); - CHECK_ACCESS(short_channel_id_arg_ptr); - LDKCOption_u64Z short_channel_id_arg_conv = *(LDKCOption_u64Z*)(short_channel_id_arg_ptr); - short_channel_id_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(short_channel_id_arg)); - void* outbound_scid_alias_arg_ptr = untag_ptr(outbound_scid_alias_arg); - CHECK_ACCESS(outbound_scid_alias_arg_ptr); - LDKCOption_u64Z outbound_scid_alias_arg_conv = *(LDKCOption_u64Z*)(outbound_scid_alias_arg_ptr); - outbound_scid_alias_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(outbound_scid_alias_arg)); - void* inbound_scid_alias_arg_ptr = untag_ptr(inbound_scid_alias_arg); - CHECK_ACCESS(inbound_scid_alias_arg_ptr); - LDKCOption_u64Z inbound_scid_alias_arg_conv = *(LDKCOption_u64Z*)(inbound_scid_alias_arg_ptr); - inbound_scid_alias_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(inbound_scid_alias_arg)); - void* unspendable_punishment_reserve_arg_ptr = untag_ptr(unspendable_punishment_reserve_arg); - CHECK_ACCESS(unspendable_punishment_reserve_arg_ptr); - LDKCOption_u64Z unspendable_punishment_reserve_arg_conv = *(LDKCOption_u64Z*)(unspendable_punishment_reserve_arg_ptr); - LDKU128 user_channel_id_arg_ref; - CHECK(user_channel_id_arg->arr_len == 16); - memcpy(user_channel_id_arg_ref.le_bytes, user_channel_id_arg->elems, 16); FREE(user_channel_id_arg); - void* feerate_sat_per_1000_weight_arg_ptr = untag_ptr(feerate_sat_per_1000_weight_arg); - CHECK_ACCESS(feerate_sat_per_1000_weight_arg_ptr); - LDKCOption_u32Z feerate_sat_per_1000_weight_arg_conv = *(LDKCOption_u32Z*)(feerate_sat_per_1000_weight_arg_ptr); - feerate_sat_per_1000_weight_arg_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(feerate_sat_per_1000_weight_arg)); - void* confirmations_required_arg_ptr = untag_ptr(confirmations_required_arg); - CHECK_ACCESS(confirmations_required_arg_ptr); - LDKCOption_u32Z confirmations_required_arg_conv = *(LDKCOption_u32Z*)(confirmations_required_arg_ptr); - confirmations_required_arg_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(confirmations_required_arg)); - void* confirmations_arg_ptr = untag_ptr(confirmations_arg); - CHECK_ACCESS(confirmations_arg_ptr); - LDKCOption_u32Z confirmations_arg_conv = *(LDKCOption_u32Z*)(confirmations_arg_ptr); - confirmations_arg_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(confirmations_arg)); - void* force_close_spend_delay_arg_ptr = untag_ptr(force_close_spend_delay_arg); - CHECK_ACCESS(force_close_spend_delay_arg_ptr); - LDKCOption_u16Z force_close_spend_delay_arg_conv = *(LDKCOption_u16Z*)(force_close_spend_delay_arg_ptr); - force_close_spend_delay_arg_conv = COption_u16Z_clone((LDKCOption_u16Z*)untag_ptr(force_close_spend_delay_arg)); - void* channel_shutdown_state_arg_ptr = untag_ptr(channel_shutdown_state_arg); - CHECK_ACCESS(channel_shutdown_state_arg_ptr); - LDKCOption_ChannelShutdownStateZ channel_shutdown_state_arg_conv = *(LDKCOption_ChannelShutdownStateZ*)(channel_shutdown_state_arg_ptr); - channel_shutdown_state_arg_conv = COption_ChannelShutdownStateZ_clone((LDKCOption_ChannelShutdownStateZ*)untag_ptr(channel_shutdown_state_arg)); - void* inbound_htlc_minimum_msat_arg_ptr = untag_ptr(inbound_htlc_minimum_msat_arg); - CHECK_ACCESS(inbound_htlc_minimum_msat_arg_ptr); - LDKCOption_u64Z inbound_htlc_minimum_msat_arg_conv = *(LDKCOption_u64Z*)(inbound_htlc_minimum_msat_arg_ptr); - inbound_htlc_minimum_msat_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(inbound_htlc_minimum_msat_arg)); - void* inbound_htlc_maximum_msat_arg_ptr = untag_ptr(inbound_htlc_maximum_msat_arg); - CHECK_ACCESS(inbound_htlc_maximum_msat_arg_ptr); - LDKCOption_u64Z inbound_htlc_maximum_msat_arg_conv = *(LDKCOption_u64Z*)(inbound_htlc_maximum_msat_arg_ptr); - inbound_htlc_maximum_msat_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(inbound_htlc_maximum_msat_arg)); - LDKChannelConfig config_arg_conv; - config_arg_conv.inner = untag_ptr(config_arg); - config_arg_conv.is_owned = ptr_is_owned(config_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(config_arg_conv); - config_arg_conv = ChannelConfig_clone(&config_arg_conv); - LDKChannelDetails ret_var = ChannelDetails_new(channel_id_arg_ref, counterparty_arg_conv, funding_txo_arg_conv, channel_type_arg_conv, short_channel_id_arg_conv, outbound_scid_alias_arg_conv, inbound_scid_alias_arg_conv, channel_value_satoshis_arg, unspendable_punishment_reserve_arg_conv, user_channel_id_arg_ref, feerate_sat_per_1000_weight_arg_conv, balance_msat_arg, outbound_capacity_msat_arg, next_outbound_htlc_limit_msat_arg, next_outbound_htlc_minimum_msat_arg, inbound_capacity_msat_arg, confirmations_required_arg_conv, confirmations_arg_conv, force_close_spend_delay_arg_conv, is_outbound_arg, is_channel_ready_arg, channel_shutdown_state_arg_conv, is_usable_arg, is_public_arg, inbound_htlc_minimum_msat_arg_conv, inbound_htlc_maximum_msat_arg_conv, config_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - static inline uint64_t ChannelDetails_clone_ptr(LDKChannelDetails *NONNULL_PTR arg) { LDKChannelDetails ret_var = ChannelDetails_clone(arg); int64_t ret_ref = 0; @@ -38465,16 +42348,17 @@ int64_t CS_LDK_ChannelManager_create_channel(int64_t this_arg, int8_tArray thei LDKU128 user_channel_id_ref; CHECK(user_channel_id->arr_len == 16); memcpy(user_channel_id_ref.le_bytes, user_channel_id->elems, 16); FREE(user_channel_id); - void* temporary_channel_id_ptr = untag_ptr(temporary_channel_id); - CHECK_ACCESS(temporary_channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ temporary_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(temporary_channel_id_ptr); - temporary_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(temporary_channel_id)); + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv = ChannelId_clone(&temporary_channel_id_conv); LDKUserConfig override_config_conv; override_config_conv.inner = untag_ptr(override_config); override_config_conv.is_owned = ptr_is_owned(override_config); CHECK_INNER_FIELD_ACCESS_OR_NULL(override_config_conv); override_config_conv = UserConfig_clone(&override_config_conv); - LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ"); + LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ"); *ret_conv = ChannelManager_create_channel(&this_arg_conv, their_network_key_ref, channel_value_satoshis, push_msat, user_channel_id_ref, temporary_channel_id_conv, override_config_conv); return tag_ptr(ret_conv, true); } @@ -38569,34 +42453,36 @@ int64_tArray CS_LDK_ChannelManager_list_recent_payments(int64_t this_arg) { return ret_arr; } -int64_t CS_LDK_ChannelManager_close_channel(int64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id) { +int64_t CS_LDK_ChannelManager_close_channel(int64_t this_arg, int64_t channel_id, int8_tArray counterparty_node_id) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t channel_id_arr[32]; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_arr, channel_id->elems, 32); FREE(channel_id); - uint8_t (*channel_id_ref)[32] = &channel_id_arr; + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_close_channel(&this_arg_conv, channel_id_ref, counterparty_node_id_ref); + *ret_conv = ChannelManager_close_channel(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref); return tag_ptr(ret_conv, true); } -int64_t CS_LDK_ChannelManager_close_channel_with_feerate_and_script(int64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id, int64_t target_feerate_sats_per_1000_weight, int64_t shutdown_script) { +int64_t CS_LDK_ChannelManager_close_channel_with_feerate_and_script(int64_t this_arg, int64_t channel_id, int8_tArray counterparty_node_id, int64_t target_feerate_sats_per_1000_weight, int64_t shutdown_script) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t channel_id_arr[32]; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_arr, channel_id->elems, 32); FREE(channel_id); - uint8_t (*channel_id_ref)[32] = &channel_id_arr; + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); @@ -38610,43 +42496,45 @@ int64_t CS_LDK_ChannelManager_close_channel_with_feerate_and_script(int64_t thi CHECK_INNER_FIELD_ACCESS_OR_NULL(shutdown_script_conv); shutdown_script_conv = ShutdownScript_clone(&shutdown_script_conv); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_close_channel_with_feerate_and_script(&this_arg_conv, channel_id_ref, counterparty_node_id_ref, target_feerate_sats_per_1000_weight_conv, shutdown_script_conv); + *ret_conv = ChannelManager_close_channel_with_feerate_and_script(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref, target_feerate_sats_per_1000_weight_conv, shutdown_script_conv); return tag_ptr(ret_conv, true); } -int64_t CS_LDK_ChannelManager_force_close_broadcasting_latest_txn(int64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id) { +int64_t CS_LDK_ChannelManager_force_close_broadcasting_latest_txn(int64_t this_arg, int64_t channel_id, int8_tArray counterparty_node_id) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t channel_id_arr[32]; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_arr, channel_id->elems, 32); FREE(channel_id); - uint8_t (*channel_id_ref)[32] = &channel_id_arr; + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_force_close_broadcasting_latest_txn(&this_arg_conv, channel_id_ref, counterparty_node_id_ref); + *ret_conv = ChannelManager_force_close_broadcasting_latest_txn(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref); return tag_ptr(ret_conv, true); } -int64_t CS_LDK_ChannelManager_force_close_without_broadcasting_txn(int64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id) { +int64_t CS_LDK_ChannelManager_force_close_without_broadcasting_txn(int64_t this_arg, int64_t channel_id, int8_tArray counterparty_node_id) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t channel_id_arr[32]; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_arr, channel_id->elems, 32); FREE(channel_id); - uint8_t (*channel_id_ref)[32] = &channel_id_arr; + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_force_close_without_broadcasting_txn(&this_arg_conv, channel_id_ref, counterparty_node_id_ref); + *ret_conv = ChannelManager_force_close_without_broadcasting_txn(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref); return tag_ptr(ret_conv, true); } @@ -38852,16 +42740,17 @@ int64_t CS_LDK_ChannelManager_send_preflight_probes(int64_t this_arg, int64_t r return tag_ptr(ret_conv, true); } -int64_t CS_LDK_ChannelManager_funding_transaction_generated(int64_t this_arg, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray funding_transaction) { +int64_t CS_LDK_ChannelManager_funding_transaction_generated(int64_t this_arg, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray funding_transaction) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t temporary_channel_id_arr[32]; - CHECK(temporary_channel_id->arr_len == 32); - memcpy(temporary_channel_id_arr, temporary_channel_id->elems, 32); FREE(temporary_channel_id); - uint8_t (*temporary_channel_id_ref)[32] = &temporary_channel_id_arr; + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); @@ -38871,7 +42760,7 @@ int64_t CS_LDK_ChannelManager_funding_transaction_generated(int64_t this_arg, i memcpy(funding_transaction_ref.data, funding_transaction->elems, funding_transaction_ref.datalen); FREE(funding_transaction); funding_transaction_ref.data_is_owned = true; LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_funding_transaction_generated(&this_arg_conv, temporary_channel_id_ref, counterparty_node_id_ref, funding_transaction_ref); + *ret_conv = ChannelManager_funding_transaction_generated(&this_arg_conv, &temporary_channel_id_conv, counterparty_node_id_ref, funding_transaction_ref); return tag_ptr(ret_conv, true); } @@ -38881,20 +42770,20 @@ int64_t CS_LDK_ChannelManager_batch_funding_transaction_generated(int64_t this_ this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ temporary_channels_constr; + LDKCVec_C2Tuple_ChannelIdPublicKeyZZ temporary_channels_constr; temporary_channels_constr.datalen = temporary_channels->arr_len; if (temporary_channels_constr.datalen > 0) - temporary_channels_constr.data = MALLOC(temporary_channels_constr.datalen * sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ Elements"); + temporary_channels_constr.data = MALLOC(temporary_channels_constr.datalen * sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKCVec_C2Tuple_ChannelIdPublicKeyZZ Elements"); else temporary_channels_constr.data = NULL; int64_t* temporary_channels_vals = temporary_channels->elems; - for (size_t j = 0; j < temporary_channels_constr.datalen; j++) { - int64_t temporary_channels_conv_35 = temporary_channels_vals[j]; - void* temporary_channels_conv_35_ptr = untag_ptr(temporary_channels_conv_35); - CHECK_ACCESS(temporary_channels_conv_35_ptr); - LDKC2Tuple_ThirtyTwoBytesPublicKeyZ temporary_channels_conv_35_conv = *(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)(temporary_channels_conv_35_ptr); - temporary_channels_conv_35_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone((LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(temporary_channels_conv_35)); - temporary_channels_constr.data[j] = temporary_channels_conv_35_conv; + for (size_t e = 0; e < temporary_channels_constr.datalen; e++) { + int64_t temporary_channels_conv_30 = temporary_channels_vals[e]; + void* temporary_channels_conv_30_ptr = untag_ptr(temporary_channels_conv_30); + CHECK_ACCESS(temporary_channels_conv_30_ptr); + LDKC2Tuple_ChannelIdPublicKeyZ temporary_channels_conv_30_conv = *(LDKC2Tuple_ChannelIdPublicKeyZ*)(temporary_channels_conv_30_ptr); + temporary_channels_conv_30_conv = C2Tuple_ChannelIdPublicKeyZ_clone((LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(temporary_channels_conv_30)); + temporary_channels_constr.data[e] = temporary_channels_conv_30_conv; } FREE(temporary_channels); LDKTransaction funding_transaction_ref; @@ -38907,7 +42796,7 @@ int64_t CS_LDK_ChannelManager_batch_funding_transaction_generated(int64_t this_ return tag_ptr(ret_conv, true); } -int64_t CS_LDK_ChannelManager_update_partial_channel_config(int64_t this_arg, int8_tArray counterparty_node_id, ptrArray channel_ids, int64_t config_update) { +int64_t CS_LDK_ChannelManager_update_partial_channel_config(int64_t this_arg, int8_tArray counterparty_node_id, int64_tArray channel_ids, int64_t config_update) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); @@ -38916,19 +42805,21 @@ int64_t CS_LDK_ChannelManager_update_partial_channel_config(int64_t this_arg, i LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); - LDKCVec_ThirtyTwoBytesZ channel_ids_constr; + LDKCVec_ChannelIdZ channel_ids_constr; channel_ids_constr.datalen = channel_ids->arr_len; if (channel_ids_constr.datalen > 0) - channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKThirtyTwoBytes), "LDKCVec_ThirtyTwoBytesZ Elements"); + channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKChannelId), "LDKCVec_ChannelIdZ Elements"); else channel_ids_constr.data = NULL; - int8_tArray* channel_ids_vals = (void*) channel_ids->elems; - for (size_t i = 0; i < channel_ids_constr.datalen; i++) { - int8_tArray channel_ids_conv_8 = channel_ids_vals[i]; - LDKThirtyTwoBytes channel_ids_conv_8_ref; - CHECK(channel_ids_conv_8->arr_len == 32); - memcpy(channel_ids_conv_8_ref.data, channel_ids_conv_8->elems, 32); FREE(channel_ids_conv_8); - channel_ids_constr.data[i] = channel_ids_conv_8_ref; + int64_t* channel_ids_vals = channel_ids->elems; + for (size_t l = 0; l < channel_ids_constr.datalen; l++) { + int64_t channel_ids_conv_11 = channel_ids_vals[l]; + LDKChannelId channel_ids_conv_11_conv; + channel_ids_conv_11_conv.inner = untag_ptr(channel_ids_conv_11); + channel_ids_conv_11_conv.is_owned = ptr_is_owned(channel_ids_conv_11); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_ids_conv_11_conv); + channel_ids_conv_11_conv = ChannelId_clone(&channel_ids_conv_11_conv); + channel_ids_constr.data[l] = channel_ids_conv_11_conv; } FREE(channel_ids); LDKChannelConfigUpdate config_update_conv; @@ -38941,7 +42832,7 @@ int64_t CS_LDK_ChannelManager_update_partial_channel_config(int64_t this_arg, i return tag_ptr(ret_conv, true); } -int64_t CS_LDK_ChannelManager_update_channel_config(int64_t this_arg, int8_tArray counterparty_node_id, ptrArray channel_ids, int64_t config) { +int64_t CS_LDK_ChannelManager_update_channel_config(int64_t this_arg, int8_tArray counterparty_node_id, int64_tArray channel_ids, int64_t config) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); @@ -38950,19 +42841,21 @@ int64_t CS_LDK_ChannelManager_update_channel_config(int64_t this_arg, int8_tArr LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); - LDKCVec_ThirtyTwoBytesZ channel_ids_constr; + LDKCVec_ChannelIdZ channel_ids_constr; channel_ids_constr.datalen = channel_ids->arr_len; if (channel_ids_constr.datalen > 0) - channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKThirtyTwoBytes), "LDKCVec_ThirtyTwoBytesZ Elements"); + channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKChannelId), "LDKCVec_ChannelIdZ Elements"); else channel_ids_constr.data = NULL; - int8_tArray* channel_ids_vals = (void*) channel_ids->elems; - for (size_t i = 0; i < channel_ids_constr.datalen; i++) { - int8_tArray channel_ids_conv_8 = channel_ids_vals[i]; - LDKThirtyTwoBytes channel_ids_conv_8_ref; - CHECK(channel_ids_conv_8->arr_len == 32); - memcpy(channel_ids_conv_8_ref.data, channel_ids_conv_8->elems, 32); FREE(channel_ids_conv_8); - channel_ids_constr.data[i] = channel_ids_conv_8_ref; + int64_t* channel_ids_vals = channel_ids->elems; + for (size_t l = 0; l < channel_ids_constr.datalen; l++) { + int64_t channel_ids_conv_11 = channel_ids_vals[l]; + LDKChannelId channel_ids_conv_11_conv; + channel_ids_conv_11_conv.inner = untag_ptr(channel_ids_conv_11); + channel_ids_conv_11_conv.is_owned = ptr_is_owned(channel_ids_conv_11); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_ids_conv_11_conv); + channel_ids_conv_11_conv = ChannelId_clone(&channel_ids_conv_11_conv); + channel_ids_constr.data[l] = channel_ids_conv_11_conv; } FREE(channel_ids); LDKChannelConfig config_conv; @@ -38975,7 +42868,7 @@ int64_t CS_LDK_ChannelManager_update_channel_config(int64_t this_arg, int8_tArr return tag_ptr(ret_conv, true); } -int64_t CS_LDK_ChannelManager_forward_intercepted_htlc(int64_t this_arg, int8_tArray intercept_id, int8_tArray next_hop_channel_id, int8_tArray next_node_id, int64_t amt_to_forward_msat) { +int64_t CS_LDK_ChannelManager_forward_intercepted_htlc(int64_t this_arg, int8_tArray intercept_id, int64_t next_hop_channel_id, int8_tArray next_node_id, int64_t amt_to_forward_msat) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); @@ -38984,15 +42877,16 @@ int64_t CS_LDK_ChannelManager_forward_intercepted_htlc(int64_t this_arg, int8_t LDKThirtyTwoBytes intercept_id_ref; CHECK(intercept_id->arr_len == 32); memcpy(intercept_id_ref.data, intercept_id->elems, 32); FREE(intercept_id); - uint8_t next_hop_channel_id_arr[32]; - CHECK(next_hop_channel_id->arr_len == 32); - memcpy(next_hop_channel_id_arr, next_hop_channel_id->elems, 32); FREE(next_hop_channel_id); - uint8_t (*next_hop_channel_id_ref)[32] = &next_hop_channel_id_arr; + LDKChannelId next_hop_channel_id_conv; + next_hop_channel_id_conv.inner = untag_ptr(next_hop_channel_id); + next_hop_channel_id_conv.is_owned = ptr_is_owned(next_hop_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(next_hop_channel_id_conv); + next_hop_channel_id_conv.is_owned = false; LDKPublicKey next_node_id_ref; CHECK(next_node_id->arr_len == 33); memcpy(next_node_id_ref.compressed_form, next_node_id->elems, 33); FREE(next_node_id); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_forward_intercepted_htlc(&this_arg_conv, intercept_id_ref, next_hop_channel_id_ref, next_node_id_ref, amt_to_forward_msat); + *ret_conv = ChannelManager_forward_intercepted_htlc(&this_arg_conv, intercept_id_ref, &next_hop_channel_id_conv, next_node_id_ref, amt_to_forward_msat); return tag_ptr(ret_conv, true); } @@ -39093,16 +42987,17 @@ int8_tArray CS_LDK_ChannelManager_get_our_node_id(int64_t this_arg) { return ret_arr; } -int64_t CS_LDK_ChannelManager_accept_inbound_channel(int64_t this_arg, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) { +int64_t CS_LDK_ChannelManager_accept_inbound_channel(int64_t this_arg, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t temporary_channel_id_arr[32]; - CHECK(temporary_channel_id->arr_len == 32); - memcpy(temporary_channel_id_arr, temporary_channel_id->elems, 32); FREE(temporary_channel_id); - uint8_t (*temporary_channel_id_ref)[32] = &temporary_channel_id_arr; + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); @@ -39110,20 +43005,21 @@ int64_t CS_LDK_ChannelManager_accept_inbound_channel(int64_t this_arg, int8_tAr CHECK(user_channel_id->arr_len == 16); memcpy(user_channel_id_ref.le_bytes, user_channel_id->elems, 16); FREE(user_channel_id); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_accept_inbound_channel(&this_arg_conv, temporary_channel_id_ref, counterparty_node_id_ref, user_channel_id_ref); + *ret_conv = ChannelManager_accept_inbound_channel(&this_arg_conv, &temporary_channel_id_conv, counterparty_node_id_ref, user_channel_id_ref); return tag_ptr(ret_conv, true); } -int64_t CS_LDK_ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(int64_t this_arg, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) { +int64_t CS_LDK_ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(int64_t this_arg, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) { LDKChannelManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - uint8_t temporary_channel_id_arr[32]; - CHECK(temporary_channel_id->arr_len == 32); - memcpy(temporary_channel_id_arr, temporary_channel_id->elems, 32); FREE(temporary_channel_id); - uint8_t (*temporary_channel_id_ref)[32] = &temporary_channel_id_arr; + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv.is_owned = false; LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); @@ -39131,7 +43027,40 @@ int64_t CS_LDK_ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(in CHECK(user_channel_id->arr_len == 16); memcpy(user_channel_id_ref.le_bytes, user_channel_id->elems, 16); FREE(user_channel_id); LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ"); - *ret_conv = ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(&this_arg_conv, temporary_channel_id_ref, counterparty_node_id_ref, user_channel_id_ref); + *ret_conv = ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(&this_arg_conv, &temporary_channel_id_conv, counterparty_node_id_ref, user_channel_id_ref); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_ChannelManager_create_offer_builder(int64_t this_arg) { + LDKChannelManager this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = ChannelManager_create_offer_builder(&this_arg_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_ChannelManager_create_refund_builder(int64_t this_arg, int64_t amount_msats, int64_t absolute_expiry, int8_tArray payment_id, int64_t retry_strategy, int64_t max_total_routing_fee_msat) { + LDKChannelManager this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKThirtyTwoBytes payment_id_ref; + CHECK(payment_id->arr_len == 32); + memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id); + void* retry_strategy_ptr = untag_ptr(retry_strategy); + CHECK_ACCESS(retry_strategy_ptr); + LDKRetry retry_strategy_conv = *(LDKRetry*)(retry_strategy_ptr); + retry_strategy_conv = Retry_clone((LDKRetry*)untag_ptr(retry_strategy)); + void* max_total_routing_fee_msat_ptr = untag_ptr(max_total_routing_fee_msat); + CHECK_ACCESS(max_total_routing_fee_msat_ptr); + LDKCOption_u64Z max_total_routing_fee_msat_conv = *(LDKCOption_u64Z*)(max_total_routing_fee_msat_ptr); + max_total_routing_fee_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(max_total_routing_fee_msat)); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = ChannelManager_create_refund_builder(&this_arg_conv, amount_msats, absolute_expiry, payment_id_ref, retry_strategy_conv, max_total_routing_fee_msat_conv); return tag_ptr(ret_conv, true); } @@ -39185,7 +43114,7 @@ int64_t CS_LDK_ChannelManager_request_refund_payment(int64_t this_arg, int64_t refund_conv.is_owned = ptr_is_owned(refund); CHECK_INNER_FIELD_ACCESS_OR_NULL(refund_conv); refund_conv.is_owned = false; - LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); *ret_conv = ChannelManager_request_refund_payment(&this_arg_conv, &refund_conv); return tag_ptr(ret_conv, true); } @@ -39448,6 +43377,17 @@ int64_t CS_LDK_ChannelManager_as_OffersMessageHandler(int64_t this_arg) { return tag_ptr(ret_ret, true); } +int64_t CS_LDK_ChannelManager_as_NodeIdLookUp(int64_t this_arg) { + LDKChannelManager this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKNodeIdLookUp* ret_ret = MALLOC(sizeof(LDKNodeIdLookUp), "LDKNodeIdLookUp"); + *ret_ret = ChannelManager_as_NodeIdLookUp(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + int64_t CS_LDK_provided_init_features(int64_t config) { LDKUserConfig config_conv; config_conv.inner = untag_ptr(config); @@ -40130,6 +44070,20 @@ int8_tArray CS_LDK_DelayedPaymentBasepoint_to_public_key(int64_t this_arg) { return ret_arr; } +int8_tArray CS_LDK_DelayedPaymentBasepoint_derive_add_tweak(int64_t this_arg, int8_tArray per_commitment_point) { + LDKDelayedPaymentBasepoint this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKPublicKey per_commitment_point_ref; + CHECK(per_commitment_point->arr_len == 33); + memcpy(per_commitment_point_ref.compressed_form, per_commitment_point->elems, 33); FREE(per_commitment_point); + int8_tArray ret_arr = init_int8_tArray(32, __LINE__); + memcpy(ret_arr->elems, DelayedPaymentBasepoint_derive_add_tweak(&this_arg_conv, per_commitment_point_ref).data, 32); + return ret_arr; +} + int8_tArray CS_LDK_DelayedPaymentBasepoint_write(int64_t obj) { LDKDelayedPaymentBasepoint obj_conv; obj_conv.inner = untag_ptr(obj); @@ -40410,6 +44364,20 @@ int8_tArray CS_LDK_HtlcBasepoint_to_public_key(int64_t this_arg) { return ret_arr; } +int8_tArray CS_LDK_HtlcBasepoint_derive_add_tweak(int64_t this_arg, int8_tArray per_commitment_point) { + LDKHtlcBasepoint this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKPublicKey per_commitment_point_ref; + CHECK(per_commitment_point->arr_len == 33); + memcpy(per_commitment_point_ref.compressed_form, per_commitment_point->elems, 33); FREE(per_commitment_point); + int8_tArray ret_arr = init_int8_tArray(32, __LINE__); + memcpy(ret_arr->elems, HtlcBasepoint_derive_add_tweak(&this_arg_conv, per_commitment_point_ref).data, 32); + return ret_arr; +} + int8_tArray CS_LDK_HtlcBasepoint_write(int64_t obj) { LDKHtlcBasepoint obj_conv; obj_conv.inner = untag_ptr(obj); @@ -40582,6 +44550,19 @@ int64_t CS_LDK_HtlcKey_read(int8_tArray ser) { return tag_ptr(ret_conv, true); } +int8_tArray CS_LDK_add_public_key_tweak(int8_tArray base_point, int8_tArray tweak) { + LDKPublicKey base_point_ref; + CHECK(base_point->arr_len == 33); + memcpy(base_point_ref.compressed_form, base_point->elems, 33); FREE(base_point); + uint8_t tweak_arr[32]; + CHECK(tweak->arr_len == 32); + memcpy(tweak_arr, tweak->elems, 32); FREE(tweak); + uint8_t (*tweak_ref)[32] = &tweak_arr; + int8_tArray ret_arr = init_int8_tArray(33, __LINE__); + memcpy(ret_arr->elems, add_public_key_tweak(base_point_ref, tweak_ref).compressed_form, 33); + return ret_arr; +} + void CS_LDK_RevocationBasepoint_free(int64_t this_obj) { LDKRevocationBasepoint this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -41003,6 +44984,13 @@ int64_t CS_LDK_DecodeError_unsupported_compression() { return ret_ref; } +int64_t CS_LDK_DecodeError_dangerous_value() { + LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError"); + *ret_copy = DecodeError_dangerous_value(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + int64_t CS_LDK_DecodeError_hash(int64_t o) { LDKDecodeError* o_conv = (LDKDecodeError*)untag_ptr(o); int64_t ret_conv = DecodeError_hash(o_conv); @@ -41184,27 +45172,31 @@ void CS_LDK_ErrorMessage_free(int64_t this_obj) { ErrorMessage_free(this_obj_conv); } -int8_tArray CS_LDK_ErrorMessage_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_ErrorMessage_get_channel_id(int64_t this_ptr) { LDKErrorMessage this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *ErrorMessage_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = ErrorMessage_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_ErrorMessage_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_ErrorMessage_set_channel_id(int64_t this_ptr, int64_t val) { LDKErrorMessage this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - ErrorMessage_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ErrorMessage_set_channel_id(&this_ptr_conv, val_conv); } jstring CS_LDK_ErrorMessage_get_data(int64_t this_ptr) { @@ -41229,12 +45221,14 @@ void CS_LDK_ErrorMessage_set_data(int64_t this_ptr, jstring val) { ErrorMessage_set_data(&this_ptr_conv, val_conv); } -int64_t CS_LDK_ErrorMessage_new(int8_tArray channel_id_arg, jstring data_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_ErrorMessage_new(int64_t channel_id_arg, jstring data_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKStr data_arg_conv = str_ref_to_owned_c(data_arg); - LDKErrorMessage ret_var = ErrorMessage_new(channel_id_arg_ref, data_arg_conv); + LDKErrorMessage ret_var = ErrorMessage_new(channel_id_arg_conv, data_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -41304,27 +45298,31 @@ void CS_LDK_WarningMessage_free(int64_t this_obj) { WarningMessage_free(this_obj_conv); } -int8_tArray CS_LDK_WarningMessage_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_WarningMessage_get_channel_id(int64_t this_ptr) { LDKWarningMessage this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *WarningMessage_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = WarningMessage_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_WarningMessage_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_WarningMessage_set_channel_id(int64_t this_ptr, int64_t val) { LDKWarningMessage this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - WarningMessage_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + WarningMessage_set_channel_id(&this_ptr_conv, val_conv); } jstring CS_LDK_WarningMessage_get_data(int64_t this_ptr) { @@ -41349,12 +45347,14 @@ void CS_LDK_WarningMessage_set_data(int64_t this_ptr, jstring val) { WarningMessage_set_data(&this_ptr_conv, val_conv); } -int64_t CS_LDK_WarningMessage_new(int8_tArray channel_id_arg, jstring data_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_WarningMessage_new(int64_t channel_id_arg, jstring data_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKStr data_arg_conv = str_ref_to_owned_c(data_arg); - LDKWarningMessage ret_var = WarningMessage_new(channel_id_arg_ref, data_arg_conv); + LDKWarningMessage ret_var = WarningMessage_new(channel_id_arg_conv, data_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -41615,27 +45615,27 @@ jboolean CS_LDK_Pong_eq(int64_t a, int64_t b) { return ret_conv; } -void CS_LDK_OpenChannel_free(int64_t this_obj) { - LDKOpenChannel this_obj_conv; +void CS_LDK_CommonOpenChannelFields_free(int64_t this_obj) { + LDKCommonOpenChannelFields this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); this_obj_conv.is_owned = ptr_is_owned(this_obj); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - OpenChannel_free(this_obj_conv); + CommonOpenChannelFields_free(this_obj_conv); } -int8_tArray CS_LDK_OpenChannel_get_chain_hash(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +int8_tArray CS_LDK_CommonOpenChannelFields_get_chain_hash(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *OpenChannel_get_chain_hash(&this_ptr_conv), 32); + memcpy(ret_arr->elems, *CommonOpenChannelFields_get_chain_hash(&this_ptr_conv), 32); return ret_arr; } -void CS_LDK_OpenChannel_set_chain_hash(int64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_chain_hash(int64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -41643,769 +45643,182 @@ void CS_LDK_OpenChannel_set_chain_hash(int64_t this_ptr, int8_tArray val) { LDKThirtyTwoBytes val_ref; CHECK(val->arr_len == 32); memcpy(val_ref.data, val->elems, 32); FREE(val); - OpenChannel_set_chain_hash(&this_ptr_conv, val_ref); -} - -int8_tArray CS_LDK_OpenChannel_get_temporary_channel_id(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *OpenChannel_get_temporary_channel_id(&this_ptr_conv), 32); - return ret_arr; -} - -void CS_LDK_OpenChannel_set_temporary_channel_id(int64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - OpenChannel_set_temporary_channel_id(&this_ptr_conv, val_ref); -} - -int64_t CS_LDK_OpenChannel_get_funding_satoshis(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_funding_satoshis(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_OpenChannel_set_funding_satoshis(int64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannel_set_funding_satoshis(&this_ptr_conv, val); -} - -int64_t CS_LDK_OpenChannel_get_push_msat(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_push_msat(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_OpenChannel_set_push_msat(int64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannel_set_push_msat(&this_ptr_conv, val); -} - -int64_t CS_LDK_OpenChannel_get_dust_limit_satoshis(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_dust_limit_satoshis(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_OpenChannel_set_dust_limit_satoshis(int64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannel_set_dust_limit_satoshis(&this_ptr_conv, val); -} - -int64_t CS_LDK_OpenChannel_get_max_htlc_value_in_flight_msat(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_max_htlc_value_in_flight_msat(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_OpenChannel_set_max_htlc_value_in_flight_msat(int64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannel_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); -} - -int64_t CS_LDK_OpenChannel_get_channel_reserve_satoshis(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_channel_reserve_satoshis(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_OpenChannel_set_channel_reserve_satoshis(int64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannel_set_channel_reserve_satoshis(&this_ptr_conv, val); -} - -int64_t CS_LDK_OpenChannel_get_htlc_minimum_msat(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannel_get_htlc_minimum_msat(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_OpenChannel_set_htlc_minimum_msat(int64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannel_set_htlc_minimum_msat(&this_ptr_conv, val); -} - -int32_t CS_LDK_OpenChannel_get_feerate_per_kw(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int32_t ret_conv = OpenChannel_get_feerate_per_kw(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_OpenChannel_set_feerate_per_kw(int64_t this_ptr, int32_t val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannel_set_feerate_per_kw(&this_ptr_conv, val); -} - -int16_t CS_LDK_OpenChannel_get_to_self_delay(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int16_t ret_conv = OpenChannel_get_to_self_delay(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_OpenChannel_set_to_self_delay(int64_t this_ptr, int16_t val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannel_set_to_self_delay(&this_ptr_conv, val); -} - -int16_t CS_LDK_OpenChannel_get_max_accepted_htlcs(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int16_t ret_conv = OpenChannel_get_max_accepted_htlcs(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_OpenChannel_set_max_accepted_htlcs(int64_t this_ptr, int16_t val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannel_set_max_accepted_htlcs(&this_ptr_conv, val); -} - -int8_tArray CS_LDK_OpenChannel_get_funding_pubkey(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannel_get_funding_pubkey(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void CS_LDK_OpenChannel_set_funding_pubkey(int64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannel_set_funding_pubkey(&this_ptr_conv, val_ref); -} - -int8_tArray CS_LDK_OpenChannel_get_revocation_basepoint(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannel_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void CS_LDK_OpenChannel_set_revocation_basepoint(int64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannel_set_revocation_basepoint(&this_ptr_conv, val_ref); -} - -int8_tArray CS_LDK_OpenChannel_get_payment_point(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannel_get_payment_point(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void CS_LDK_OpenChannel_set_payment_point(int64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannel_set_payment_point(&this_ptr_conv, val_ref); -} - -int8_tArray CS_LDK_OpenChannel_get_delayed_payment_basepoint(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannel_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void CS_LDK_OpenChannel_set_delayed_payment_basepoint(int64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannel_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); -} - -int8_tArray CS_LDK_OpenChannel_get_htlc_basepoint(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannel_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void CS_LDK_OpenChannel_set_htlc_basepoint(int64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannel_set_htlc_basepoint(&this_ptr_conv, val_ref); -} - -int8_tArray CS_LDK_OpenChannel_get_first_per_commitment_point(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannel_get_first_per_commitment_point(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void CS_LDK_OpenChannel_set_first_per_commitment_point(int64_t this_ptr, int8_tArray val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannel_set_first_per_commitment_point(&this_ptr_conv, val_ref); -} - -int8_t CS_LDK_OpenChannel_get_channel_flags(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_t ret_conv = OpenChannel_get_channel_flags(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_OpenChannel_set_channel_flags(int64_t this_ptr, int8_t val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannel_set_channel_flags(&this_ptr_conv, val); -} - -int64_t CS_LDK_OpenChannel_get_shutdown_scriptpubkey(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ"); - *ret_copy = OpenChannel_get_shutdown_scriptpubkey(&this_ptr_conv); - int64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -void CS_LDK_OpenChannel_set_shutdown_scriptpubkey(int64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - void* val_ptr = untag_ptr(val); - CHECK_ACCESS(val_ptr); - LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr); - val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val)); - OpenChannel_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); + CommonOpenChannelFields_set_chain_hash(&this_ptr_conv, val_ref); } -int64_t CS_LDK_OpenChannel_get_channel_type(int64_t this_ptr) { - LDKOpenChannel this_ptr_conv; +int64_t CS_LDK_CommonOpenChannelFields_get_temporary_channel_id(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures ret_var = OpenChannel_get_channel_type(&this_ptr_conv); + LDKChannelId ret_var = CommonOpenChannelFields_get_temporary_channel_id(&this_ptr_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -void CS_LDK_OpenChannel_set_channel_type(int64_t this_ptr, int64_t val) { - LDKOpenChannel this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_temporary_channel_id(int64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures val_conv; + LDKChannelId val_conv; val_conv.inner = untag_ptr(val); val_conv.is_owned = ptr_is_owned(val); CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); - val_conv = ChannelTypeFeatures_clone(&val_conv); - OpenChannel_set_channel_type(&this_ptr_conv, val_conv); -} - -int64_t CS_LDK_OpenChannel_new(int8_tArray chain_hash_arg, int8_tArray temporary_channel_id_arg, int64_t funding_satoshis_arg, int64_t push_msat_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t channel_reserve_satoshis_arg, int64_t htlc_minimum_msat_arg, int32_t feerate_per_kw_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_point_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_t channel_flags_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg) { - LDKThirtyTwoBytes chain_hash_arg_ref; - CHECK(chain_hash_arg->arr_len == 32); - memcpy(chain_hash_arg_ref.data, chain_hash_arg->elems, 32); FREE(chain_hash_arg); - LDKThirtyTwoBytes temporary_channel_id_arg_ref; - CHECK(temporary_channel_id_arg->arr_len == 32); - memcpy(temporary_channel_id_arg_ref.data, temporary_channel_id_arg->elems, 32); FREE(temporary_channel_id_arg); - LDKPublicKey funding_pubkey_arg_ref; - CHECK(funding_pubkey_arg->arr_len == 33); - memcpy(funding_pubkey_arg_ref.compressed_form, funding_pubkey_arg->elems, 33); FREE(funding_pubkey_arg); - LDKPublicKey revocation_basepoint_arg_ref; - CHECK(revocation_basepoint_arg->arr_len == 33); - memcpy(revocation_basepoint_arg_ref.compressed_form, revocation_basepoint_arg->elems, 33); FREE(revocation_basepoint_arg); - LDKPublicKey payment_point_arg_ref; - CHECK(payment_point_arg->arr_len == 33); - memcpy(payment_point_arg_ref.compressed_form, payment_point_arg->elems, 33); FREE(payment_point_arg); - LDKPublicKey delayed_payment_basepoint_arg_ref; - CHECK(delayed_payment_basepoint_arg->arr_len == 33); - memcpy(delayed_payment_basepoint_arg_ref.compressed_form, delayed_payment_basepoint_arg->elems, 33); FREE(delayed_payment_basepoint_arg); - LDKPublicKey htlc_basepoint_arg_ref; - CHECK(htlc_basepoint_arg->arr_len == 33); - memcpy(htlc_basepoint_arg_ref.compressed_form, htlc_basepoint_arg->elems, 33); FREE(htlc_basepoint_arg); - LDKPublicKey first_per_commitment_point_arg_ref; - CHECK(first_per_commitment_point_arg->arr_len == 33); - memcpy(first_per_commitment_point_arg_ref.compressed_form, first_per_commitment_point_arg->elems, 33); FREE(first_per_commitment_point_arg); - void* shutdown_scriptpubkey_arg_ptr = untag_ptr(shutdown_scriptpubkey_arg); - CHECK_ACCESS(shutdown_scriptpubkey_arg_ptr); - LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg_conv = *(LDKCOption_CVec_u8ZZ*)(shutdown_scriptpubkey_arg_ptr); - shutdown_scriptpubkey_arg_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(shutdown_scriptpubkey_arg)); - LDKChannelTypeFeatures channel_type_arg_conv; - channel_type_arg_conv.inner = untag_ptr(channel_type_arg); - channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv); - channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv); - LDKOpenChannel ret_var = OpenChannel_new(chain_hash_arg_ref, temporary_channel_id_arg_ref, funding_satoshis_arg, push_msat_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, feerate_per_kw_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_point_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, channel_flags_arg, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -static inline uint64_t OpenChannel_clone_ptr(LDKOpenChannel *NONNULL_PTR arg) { - LDKOpenChannel ret_var = OpenChannel_clone(arg); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} -int64_t CS_LDK_OpenChannel_clone_ptr(int64_t arg) { - LDKOpenChannel arg_conv; - arg_conv.inner = untag_ptr(arg); - arg_conv.is_owned = ptr_is_owned(arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); - arg_conv.is_owned = false; - int64_t ret_conv = OpenChannel_clone_ptr(&arg_conv); - return ret_conv; -} - -int64_t CS_LDK_OpenChannel_clone(int64_t orig) { - LDKOpenChannel orig_conv; - orig_conv.inner = untag_ptr(orig); - orig_conv.is_owned = ptr_is_owned(orig); - CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); - orig_conv.is_owned = false; - LDKOpenChannel ret_var = OpenChannel_clone(&orig_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -int64_t CS_LDK_OpenChannel_hash(int64_t o) { - LDKOpenChannel o_conv; - o_conv.inner = untag_ptr(o); - o_conv.is_owned = ptr_is_owned(o); - CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); - o_conv.is_owned = false; - int64_t ret_conv = OpenChannel_hash(&o_conv); - return ret_conv; -} - -jboolean CS_LDK_OpenChannel_eq(int64_t a, int64_t b) { - LDKOpenChannel a_conv; - a_conv.inner = untag_ptr(a); - a_conv.is_owned = ptr_is_owned(a); - CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); - a_conv.is_owned = false; - LDKOpenChannel b_conv; - b_conv.inner = untag_ptr(b); - b_conv.is_owned = ptr_is_owned(b); - CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); - b_conv.is_owned = false; - jboolean ret_conv = OpenChannel_eq(&a_conv, &b_conv); - return ret_conv; -} - -void CS_LDK_OpenChannelV2_free(int64_t this_obj) { - LDKOpenChannelV2 this_obj_conv; - this_obj_conv.inner = untag_ptr(this_obj); - this_obj_conv.is_owned = ptr_is_owned(this_obj); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - OpenChannelV2_free(this_obj_conv); -} - -int8_tArray CS_LDK_OpenChannelV2_get_chain_hash(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *OpenChannelV2_get_chain_hash(&this_ptr_conv), 32); - return ret_arr; -} - -void CS_LDK_OpenChannelV2_set_chain_hash(int64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - OpenChannelV2_set_chain_hash(&this_ptr_conv, val_ref); -} - -int8_tArray CS_LDK_OpenChannelV2_get_temporary_channel_id(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *OpenChannelV2_get_temporary_channel_id(&this_ptr_conv), 32); - return ret_arr; -} - -void CS_LDK_OpenChannelV2_set_temporary_channel_id(int64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - OpenChannelV2_set_temporary_channel_id(&this_ptr_conv, val_ref); -} - -int32_t CS_LDK_OpenChannelV2_get_funding_feerate_sat_per_1000_weight(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int32_t ret_conv = OpenChannelV2_get_funding_feerate_sat_per_1000_weight(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_OpenChannelV2_set_funding_feerate_sat_per_1000_weight(int64_t this_ptr, int32_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_funding_feerate_sat_per_1000_weight(&this_ptr_conv, val); -} - -int32_t CS_LDK_OpenChannelV2_get_commitment_feerate_sat_per_1000_weight(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int32_t ret_conv = OpenChannelV2_get_commitment_feerate_sat_per_1000_weight(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_OpenChannelV2_set_commitment_feerate_sat_per_1000_weight(int64_t this_ptr, int32_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_commitment_feerate_sat_per_1000_weight(&this_ptr_conv, val); + val_conv = ChannelId_clone(&val_conv); + CommonOpenChannelFields_set_temporary_channel_id(&this_ptr_conv, val_conv); } -int64_t CS_LDK_OpenChannelV2_get_funding_satoshis(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; +int64_t CS_LDK_CommonOpenChannelFields_get_funding_satoshis(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannelV2_get_funding_satoshis(&this_ptr_conv); + int64_t ret_conv = CommonOpenChannelFields_get_funding_satoshis(&this_ptr_conv); return ret_conv; } -void CS_LDK_OpenChannelV2_set_funding_satoshis(int64_t this_ptr, int64_t val) { - LDKOpenChannelV2 this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_funding_satoshis(int64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannelV2_set_funding_satoshis(&this_ptr_conv, val); + CommonOpenChannelFields_set_funding_satoshis(&this_ptr_conv, val); } -int64_t CS_LDK_OpenChannelV2_get_dust_limit_satoshis(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; +int64_t CS_LDK_CommonOpenChannelFields_get_dust_limit_satoshis(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannelV2_get_dust_limit_satoshis(&this_ptr_conv); + int64_t ret_conv = CommonOpenChannelFields_get_dust_limit_satoshis(&this_ptr_conv); return ret_conv; } -void CS_LDK_OpenChannelV2_set_dust_limit_satoshis(int64_t this_ptr, int64_t val) { - LDKOpenChannelV2 this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_dust_limit_satoshis(int64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannelV2_set_dust_limit_satoshis(&this_ptr_conv, val); + CommonOpenChannelFields_set_dust_limit_satoshis(&this_ptr_conv, val); } -int64_t CS_LDK_OpenChannelV2_get_max_htlc_value_in_flight_msat(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; +int64_t CS_LDK_CommonOpenChannelFields_get_max_htlc_value_in_flight_msat(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannelV2_get_max_htlc_value_in_flight_msat(&this_ptr_conv); + int64_t ret_conv = CommonOpenChannelFields_get_max_htlc_value_in_flight_msat(&this_ptr_conv); return ret_conv; } -void CS_LDK_OpenChannelV2_set_max_htlc_value_in_flight_msat(int64_t this_ptr, int64_t val) { - LDKOpenChannelV2 this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_max_htlc_value_in_flight_msat(int64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannelV2_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); + CommonOpenChannelFields_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); } -int64_t CS_LDK_OpenChannelV2_get_htlc_minimum_msat(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; +int64_t CS_LDK_CommonOpenChannelFields_get_htlc_minimum_msat(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = OpenChannelV2_get_htlc_minimum_msat(&this_ptr_conv); + int64_t ret_conv = CommonOpenChannelFields_get_htlc_minimum_msat(&this_ptr_conv); return ret_conv; } -void CS_LDK_OpenChannelV2_set_htlc_minimum_msat(int64_t this_ptr, int64_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - OpenChannelV2_set_htlc_minimum_msat(&this_ptr_conv, val); -} - -int16_t CS_LDK_OpenChannelV2_get_to_self_delay(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int16_t ret_conv = OpenChannelV2_get_to_self_delay(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_OpenChannelV2_set_to_self_delay(int64_t this_ptr, int16_t val) { - LDKOpenChannelV2 this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_htlc_minimum_msat(int64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannelV2_set_to_self_delay(&this_ptr_conv, val); + CommonOpenChannelFields_set_htlc_minimum_msat(&this_ptr_conv, val); } -int16_t CS_LDK_OpenChannelV2_get_max_accepted_htlcs(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; +int32_t CS_LDK_CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int16_t ret_conv = OpenChannelV2_get_max_accepted_htlcs(&this_ptr_conv); + int32_t ret_conv = CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight(&this_ptr_conv); return ret_conv; } -void CS_LDK_OpenChannelV2_set_max_accepted_htlcs(int64_t this_ptr, int16_t val) { - LDKOpenChannelV2 this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight(int64_t this_ptr, int32_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannelV2_set_max_accepted_htlcs(&this_ptr_conv, val); + CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight(&this_ptr_conv, val); } -int32_t CS_LDK_OpenChannelV2_get_locktime(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; +int16_t CS_LDK_CommonOpenChannelFields_get_to_self_delay(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int32_t ret_conv = OpenChannelV2_get_locktime(&this_ptr_conv); + int16_t ret_conv = CommonOpenChannelFields_get_to_self_delay(&this_ptr_conv); return ret_conv; } -void CS_LDK_OpenChannelV2_set_locktime(int64_t this_ptr, int32_t val) { - LDKOpenChannelV2 this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_to_self_delay(int64_t this_ptr, int16_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannelV2_set_locktime(&this_ptr_conv, val); + CommonOpenChannelFields_set_to_self_delay(&this_ptr_conv, val); } -int8_tArray CS_LDK_OpenChannelV2_get_funding_pubkey(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; +int16_t CS_LDK_CommonOpenChannelFields_get_max_accepted_htlcs(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannelV2_get_funding_pubkey(&this_ptr_conv).compressed_form, 33); - return ret_arr; + int16_t ret_conv = CommonOpenChannelFields_get_max_accepted_htlcs(&this_ptr_conv); + return ret_conv; } -void CS_LDK_OpenChannelV2_set_funding_pubkey(int64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_max_accepted_htlcs(int64_t this_ptr, int16_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannelV2_set_funding_pubkey(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_max_accepted_htlcs(&this_ptr_conv, val); } -int8_tArray CS_LDK_OpenChannelV2_get_revocation_basepoint(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; +int8_tArray CS_LDK_CommonOpenChannelFields_get_funding_pubkey(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannelV2_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonOpenChannelFields_get_funding_pubkey(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void CS_LDK_OpenChannelV2_set_revocation_basepoint(int64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_funding_pubkey(int64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42413,22 +45826,22 @@ void CS_LDK_OpenChannelV2_set_revocation_basepoint(int64_t this_ptr, int8_tArra LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannelV2_set_revocation_basepoint(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_funding_pubkey(&this_ptr_conv, val_ref); } -int8_tArray CS_LDK_OpenChannelV2_get_payment_basepoint(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; +int8_tArray CS_LDK_CommonOpenChannelFields_get_revocation_basepoint(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannelV2_get_payment_basepoint(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonOpenChannelFields_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void CS_LDK_OpenChannelV2_set_payment_basepoint(int64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_revocation_basepoint(int64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42436,22 +45849,22 @@ void CS_LDK_OpenChannelV2_set_payment_basepoint(int64_t this_ptr, int8_tArray v LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannelV2_set_payment_basepoint(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_revocation_basepoint(&this_ptr_conv, val_ref); } -int8_tArray CS_LDK_OpenChannelV2_get_delayed_payment_basepoint(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; +int8_tArray CS_LDK_CommonOpenChannelFields_get_payment_basepoint(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannelV2_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonOpenChannelFields_get_payment_basepoint(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void CS_LDK_OpenChannelV2_set_delayed_payment_basepoint(int64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_payment_basepoint(int64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42459,22 +45872,22 @@ void CS_LDK_OpenChannelV2_set_delayed_payment_basepoint(int64_t this_ptr, int8_ LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannelV2_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_payment_basepoint(&this_ptr_conv, val_ref); } -int8_tArray CS_LDK_OpenChannelV2_get_htlc_basepoint(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; +int8_tArray CS_LDK_CommonOpenChannelFields_get_delayed_payment_basepoint(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannelV2_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonOpenChannelFields_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void CS_LDK_OpenChannelV2_set_htlc_basepoint(int64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_delayed_payment_basepoint(int64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42482,22 +45895,22 @@ void CS_LDK_OpenChannelV2_set_htlc_basepoint(int64_t this_ptr, int8_tArray val) LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannelV2_set_htlc_basepoint(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); } -int8_tArray CS_LDK_OpenChannelV2_get_first_per_commitment_point(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; +int8_tArray CS_LDK_CommonOpenChannelFields_get_htlc_basepoint(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannelV2_get_first_per_commitment_point(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonOpenChannelFields_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void CS_LDK_OpenChannelV2_set_first_per_commitment_point(int64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_htlc_basepoint(int64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42505,22 +45918,22 @@ void CS_LDK_OpenChannelV2_set_first_per_commitment_point(int64_t this_ptr, int8 LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannelV2_set_first_per_commitment_point(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_htlc_basepoint(&this_ptr_conv, val_ref); } -int8_tArray CS_LDK_OpenChannelV2_get_second_per_commitment_point(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; +int8_tArray CS_LDK_CommonOpenChannelFields_get_first_per_commitment_point(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, OpenChannelV2_get_second_per_commitment_point(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonOpenChannelFields_get_first_per_commitment_point(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void CS_LDK_OpenChannelV2_set_second_per_commitment_point(int64_t this_ptr, int8_tArray val) { - LDKOpenChannelV2 this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_first_per_commitment_point(int64_t this_ptr, int8_tArray val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42528,42 +45941,42 @@ void CS_LDK_OpenChannelV2_set_second_per_commitment_point(int64_t this_ptr, int LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - OpenChannelV2_set_second_per_commitment_point(&this_ptr_conv, val_ref); + CommonOpenChannelFields_set_first_per_commitment_point(&this_ptr_conv, val_ref); } -int8_t CS_LDK_OpenChannelV2_get_channel_flags(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; +int8_t CS_LDK_CommonOpenChannelFields_get_channel_flags(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_t ret_conv = OpenChannelV2_get_channel_flags(&this_ptr_conv); + int8_t ret_conv = CommonOpenChannelFields_get_channel_flags(&this_ptr_conv); return ret_conv; } -void CS_LDK_OpenChannelV2_set_channel_flags(int64_t this_ptr, int8_t val) { - LDKOpenChannelV2 this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_channel_flags(int64_t this_ptr, int8_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - OpenChannelV2_set_channel_flags(&this_ptr_conv, val); + CommonOpenChannelFields_set_channel_flags(&this_ptr_conv, val); } -int64_t CS_LDK_OpenChannelV2_get_shutdown_scriptpubkey(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; +int64_t CS_LDK_CommonOpenChannelFields_get_shutdown_scriptpubkey(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ"); - *ret_copy = OpenChannelV2_get_shutdown_scriptpubkey(&this_ptr_conv); + *ret_copy = CommonOpenChannelFields_get_shutdown_scriptpubkey(&this_ptr_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -void CS_LDK_OpenChannelV2_set_shutdown_scriptpubkey(int64_t this_ptr, int64_t val) { - LDKOpenChannelV2 this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_shutdown_scriptpubkey(int64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42572,24 +45985,24 @@ void CS_LDK_OpenChannelV2_set_shutdown_scriptpubkey(int64_t this_ptr, int64_t v CHECK_ACCESS(val_ptr); LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr); val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val)); - OpenChannelV2_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); + CommonOpenChannelFields_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); } -int64_t CS_LDK_OpenChannelV2_get_channel_type(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; +int64_t CS_LDK_CommonOpenChannelFields_get_channel_type(int64_t this_ptr) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures ret_var = OpenChannelV2_get_channel_type(&this_ptr_conv); + LDKChannelTypeFeatures ret_var = CommonOpenChannelFields_get_channel_type(&this_ptr_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -void CS_LDK_OpenChannelV2_set_channel_type(int64_t this_ptr, int64_t val) { - LDKOpenChannelV2 this_ptr_conv; +void CS_LDK_CommonOpenChannelFields_set_channel_type(int64_t this_ptr, int64_t val) { + LDKCommonOpenChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42599,36 +46012,18 @@ void CS_LDK_OpenChannelV2_set_channel_type(int64_t this_ptr, int64_t val) { val_conv.is_owned = ptr_is_owned(val); CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); val_conv = ChannelTypeFeatures_clone(&val_conv); - OpenChannelV2_set_channel_type(&this_ptr_conv, val_conv); -} - -int32_t CS_LDK_OpenChannelV2_get_require_confirmed_inputs(int64_t this_ptr) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int32_t ret_conv = LDKCOption_NoneZ_to_cs(OpenChannelV2_get_require_confirmed_inputs(&this_ptr_conv)); - return ret_conv; + CommonOpenChannelFields_set_channel_type(&this_ptr_conv, val_conv); } -void CS_LDK_OpenChannelV2_set_require_confirmed_inputs(int64_t this_ptr, int32_t val) { - LDKOpenChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKCOption_NoneZ val_conv = LDKCOption_NoneZ_from_cs(val); - OpenChannelV2_set_require_confirmed_inputs(&this_ptr_conv, val_conv); -} - -int64_t CS_LDK_OpenChannelV2_new(int8_tArray chain_hash_arg, int8_tArray temporary_channel_id_arg, int32_t funding_feerate_sat_per_1000_weight_arg, int32_t commitment_feerate_sat_per_1000_weight_arg, int64_t funding_satoshis_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int32_t locktime_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_tArray second_per_commitment_point_arg, int8_t channel_flags_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg, int32_t require_confirmed_inputs_arg) { +int64_t CS_LDK_CommonOpenChannelFields_new(int8_tArray chain_hash_arg, int64_t temporary_channel_id_arg, int64_t funding_satoshis_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int32_t commitment_feerate_sat_per_1000_weight_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_t channel_flags_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg) { LDKThirtyTwoBytes chain_hash_arg_ref; CHECK(chain_hash_arg->arr_len == 32); memcpy(chain_hash_arg_ref.data, chain_hash_arg->elems, 32); FREE(chain_hash_arg); - LDKThirtyTwoBytes temporary_channel_id_arg_ref; - CHECK(temporary_channel_id_arg->arr_len == 32); - memcpy(temporary_channel_id_arg_ref.data, temporary_channel_id_arg->elems, 32); FREE(temporary_channel_id_arg); + LDKChannelId temporary_channel_id_arg_conv; + temporary_channel_id_arg_conv.inner = untag_ptr(temporary_channel_id_arg); + temporary_channel_id_arg_conv.is_owned = ptr_is_owned(temporary_channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_arg_conv); + temporary_channel_id_arg_conv = ChannelId_clone(&temporary_channel_id_arg_conv); LDKPublicKey funding_pubkey_arg_ref; CHECK(funding_pubkey_arg->arr_len == 33); memcpy(funding_pubkey_arg_ref.compressed_form, funding_pubkey_arg->elems, 33); FREE(funding_pubkey_arg); @@ -42647,9 +46042,6 @@ int64_t CS_LDK_OpenChannelV2_new(int8_tArray chain_hash_arg, int8_tArray tempor LDKPublicKey first_per_commitment_point_arg_ref; CHECK(first_per_commitment_point_arg->arr_len == 33); memcpy(first_per_commitment_point_arg_ref.compressed_form, first_per_commitment_point_arg->elems, 33); FREE(first_per_commitment_point_arg); - LDKPublicKey second_per_commitment_point_arg_ref; - CHECK(second_per_commitment_point_arg->arr_len == 33); - memcpy(second_per_commitment_point_arg_ref.compressed_form, second_per_commitment_point_arg->elems, 33); FREE(second_per_commitment_point_arg); void* shutdown_scriptpubkey_arg_ptr = untag_ptr(shutdown_scriptpubkey_arg); CHECK_ACCESS(shutdown_scriptpubkey_arg_ptr); LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg_conv = *(LDKCOption_CVec_u8ZZ*)(shutdown_scriptpubkey_arg_ptr); @@ -42659,8 +46051,336 @@ int64_t CS_LDK_OpenChannelV2_new(int8_tArray chain_hash_arg, int8_tArray tempor channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv); channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv); + LDKCommonOpenChannelFields ret_var = CommonOpenChannelFields_new(chain_hash_arg_ref, temporary_channel_id_arg_conv, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, commitment_feerate_sat_per_1000_weight_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, channel_flags_arg, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t CommonOpenChannelFields_clone_ptr(LDKCommonOpenChannelFields *NONNULL_PTR arg) { + LDKCommonOpenChannelFields ret_var = CommonOpenChannelFields_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t CS_LDK_CommonOpenChannelFields_clone_ptr(int64_t arg) { + LDKCommonOpenChannelFields arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = CommonOpenChannelFields_clone_ptr(&arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CommonOpenChannelFields_clone(int64_t orig) { + LDKCommonOpenChannelFields orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKCommonOpenChannelFields ret_var = CommonOpenChannelFields_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_CommonOpenChannelFields_hash(int64_t o) { + LDKCommonOpenChannelFields o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = CommonOpenChannelFields_hash(&o_conv); + return ret_conv; +} + +jboolean CS_LDK_CommonOpenChannelFields_eq(int64_t a, int64_t b) { + LDKCommonOpenChannelFields a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKCommonOpenChannelFields b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = CommonOpenChannelFields_eq(&a_conv, &b_conv); + return ret_conv; +} + +void CS_LDK_OpenChannel_free(int64_t this_obj) { + LDKOpenChannel this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + OpenChannel_free(this_obj_conv); +} + +int64_t CS_LDK_OpenChannel_get_common_fields(int64_t this_ptr) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCommonOpenChannelFields ret_var = OpenChannel_get_common_fields(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void CS_LDK_OpenChannel_set_common_fields(int64_t this_ptr, int64_t val) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCommonOpenChannelFields val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = CommonOpenChannelFields_clone(&val_conv); + OpenChannel_set_common_fields(&this_ptr_conv, val_conv); +} + +int64_t CS_LDK_OpenChannel_get_push_msat(int64_t this_ptr) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int64_t ret_conv = OpenChannel_get_push_msat(&this_ptr_conv); + return ret_conv; +} + +void CS_LDK_OpenChannel_set_push_msat(int64_t this_ptr, int64_t val) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + OpenChannel_set_push_msat(&this_ptr_conv, val); +} + +int64_t CS_LDK_OpenChannel_get_channel_reserve_satoshis(int64_t this_ptr) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int64_t ret_conv = OpenChannel_get_channel_reserve_satoshis(&this_ptr_conv); + return ret_conv; +} + +void CS_LDK_OpenChannel_set_channel_reserve_satoshis(int64_t this_ptr, int64_t val) { + LDKOpenChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + OpenChannel_set_channel_reserve_satoshis(&this_ptr_conv, val); +} + +int64_t CS_LDK_OpenChannel_new(int64_t common_fields_arg, int64_t push_msat_arg, int64_t channel_reserve_satoshis_arg) { + LDKCommonOpenChannelFields common_fields_arg_conv; + common_fields_arg_conv.inner = untag_ptr(common_fields_arg); + common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv); + common_fields_arg_conv = CommonOpenChannelFields_clone(&common_fields_arg_conv); + LDKOpenChannel ret_var = OpenChannel_new(common_fields_arg_conv, push_msat_arg, channel_reserve_satoshis_arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t OpenChannel_clone_ptr(LDKOpenChannel *NONNULL_PTR arg) { + LDKOpenChannel ret_var = OpenChannel_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t CS_LDK_OpenChannel_clone_ptr(int64_t arg) { + LDKOpenChannel arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = OpenChannel_clone_ptr(&arg_conv); + return ret_conv; +} + +int64_t CS_LDK_OpenChannel_clone(int64_t orig) { + LDKOpenChannel orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKOpenChannel ret_var = OpenChannel_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_OpenChannel_hash(int64_t o) { + LDKOpenChannel o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = OpenChannel_hash(&o_conv); + return ret_conv; +} + +jboolean CS_LDK_OpenChannel_eq(int64_t a, int64_t b) { + LDKOpenChannel a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKOpenChannel b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = OpenChannel_eq(&a_conv, &b_conv); + return ret_conv; +} + +void CS_LDK_OpenChannelV2_free(int64_t this_obj) { + LDKOpenChannelV2 this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + OpenChannelV2_free(this_obj_conv); +} + +int64_t CS_LDK_OpenChannelV2_get_common_fields(int64_t this_ptr) { + LDKOpenChannelV2 this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCommonOpenChannelFields ret_var = OpenChannelV2_get_common_fields(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void CS_LDK_OpenChannelV2_set_common_fields(int64_t this_ptr, int64_t val) { + LDKOpenChannelV2 this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCommonOpenChannelFields val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = CommonOpenChannelFields_clone(&val_conv); + OpenChannelV2_set_common_fields(&this_ptr_conv, val_conv); +} + +int32_t CS_LDK_OpenChannelV2_get_funding_feerate_sat_per_1000_weight(int64_t this_ptr) { + LDKOpenChannelV2 this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int32_t ret_conv = OpenChannelV2_get_funding_feerate_sat_per_1000_weight(&this_ptr_conv); + return ret_conv; +} + +void CS_LDK_OpenChannelV2_set_funding_feerate_sat_per_1000_weight(int64_t this_ptr, int32_t val) { + LDKOpenChannelV2 this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + OpenChannelV2_set_funding_feerate_sat_per_1000_weight(&this_ptr_conv, val); +} + +int32_t CS_LDK_OpenChannelV2_get_locktime(int64_t this_ptr) { + LDKOpenChannelV2 this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int32_t ret_conv = OpenChannelV2_get_locktime(&this_ptr_conv); + return ret_conv; +} + +void CS_LDK_OpenChannelV2_set_locktime(int64_t this_ptr, int32_t val) { + LDKOpenChannelV2 this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + OpenChannelV2_set_locktime(&this_ptr_conv, val); +} + +int8_tArray CS_LDK_OpenChannelV2_get_second_per_commitment_point(int64_t this_ptr) { + LDKOpenChannelV2 this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(33, __LINE__); + memcpy(ret_arr->elems, OpenChannelV2_get_second_per_commitment_point(&this_ptr_conv).compressed_form, 33); + return ret_arr; +} + +void CS_LDK_OpenChannelV2_set_second_per_commitment_point(int64_t this_ptr, int8_tArray val) { + LDKOpenChannelV2 this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKPublicKey val_ref; + CHECK(val->arr_len == 33); + memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); + OpenChannelV2_set_second_per_commitment_point(&this_ptr_conv, val_ref); +} + +int32_t CS_LDK_OpenChannelV2_get_require_confirmed_inputs(int64_t this_ptr) { + LDKOpenChannelV2 this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int32_t ret_conv = LDKCOption_NoneZ_to_cs(OpenChannelV2_get_require_confirmed_inputs(&this_ptr_conv)); + return ret_conv; +} + +void CS_LDK_OpenChannelV2_set_require_confirmed_inputs(int64_t this_ptr, int32_t val) { + LDKOpenChannelV2 this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCOption_NoneZ val_conv = LDKCOption_NoneZ_from_cs(val); + OpenChannelV2_set_require_confirmed_inputs(&this_ptr_conv, val_conv); +} + +int64_t CS_LDK_OpenChannelV2_new(int64_t common_fields_arg, int32_t funding_feerate_sat_per_1000_weight_arg, int32_t locktime_arg, int8_tArray second_per_commitment_point_arg, int32_t require_confirmed_inputs_arg) { + LDKCommonOpenChannelFields common_fields_arg_conv; + common_fields_arg_conv.inner = untag_ptr(common_fields_arg); + common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv); + common_fields_arg_conv = CommonOpenChannelFields_clone(&common_fields_arg_conv); + LDKPublicKey second_per_commitment_point_arg_ref; + CHECK(second_per_commitment_point_arg->arr_len == 33); + memcpy(second_per_commitment_point_arg_ref.compressed_form, second_per_commitment_point_arg->elems, 33); FREE(second_per_commitment_point_arg); LDKCOption_NoneZ require_confirmed_inputs_arg_conv = LDKCOption_NoneZ_from_cs(require_confirmed_inputs_arg); - LDKOpenChannelV2 ret_var = OpenChannelV2_new(chain_hash_arg_ref, temporary_channel_id_arg_ref, funding_feerate_sat_per_1000_weight_arg, commitment_feerate_sat_per_1000_weight_arg, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, to_self_delay_arg, max_accepted_htlcs_arg, locktime_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, second_per_commitment_point_arg_ref, channel_flags_arg, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv, require_confirmed_inputs_arg_conv); + LDKOpenChannelV2 ret_var = OpenChannelV2_new(common_fields_arg_conv, funding_feerate_sat_per_1000_weight_arg, locktime_arg, second_per_commitment_point_arg_ref, require_confirmed_inputs_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -42722,183 +46442,168 @@ jboolean CS_LDK_OpenChannelV2_eq(int64_t a, int64_t b) { return ret_conv; } -void CS_LDK_AcceptChannel_free(int64_t this_obj) { - LDKAcceptChannel this_obj_conv; +void CS_LDK_CommonAcceptChannelFields_free(int64_t this_obj) { + LDKCommonAcceptChannelFields this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); this_obj_conv.is_owned = ptr_is_owned(this_obj); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - AcceptChannel_free(this_obj_conv); -} - -int8_tArray CS_LDK_AcceptChannel_get_temporary_channel_id(int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *AcceptChannel_get_temporary_channel_id(&this_ptr_conv), 32); - return ret_arr; -} - -void CS_LDK_AcceptChannel_set_temporary_channel_id(int64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - AcceptChannel_set_temporary_channel_id(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_free(this_obj_conv); } -int64_t CS_LDK_AcceptChannel_get_dust_limit_satoshis(int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int64_t CS_LDK_CommonAcceptChannelFields_get_temporary_channel_id(int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannel_get_dust_limit_satoshis(&this_ptr_conv); - return ret_conv; + LDKChannelId ret_var = CommonAcceptChannelFields_get_temporary_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_AcceptChannel_set_dust_limit_satoshis(int64_t this_ptr, int64_t val) { - LDKAcceptChannel this_ptr_conv; +void CS_LDK_CommonAcceptChannelFields_set_temporary_channel_id(int64_t this_ptr, int64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_dust_limit_satoshis(&this_ptr_conv, val); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + CommonAcceptChannelFields_set_temporary_channel_id(&this_ptr_conv, val_conv); } -int64_t CS_LDK_AcceptChannel_get_max_htlc_value_in_flight_msat(int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int64_t CS_LDK_CommonAcceptChannelFields_get_dust_limit_satoshis(int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannel_get_max_htlc_value_in_flight_msat(&this_ptr_conv); + int64_t ret_conv = CommonAcceptChannelFields_get_dust_limit_satoshis(&this_ptr_conv); return ret_conv; } -void CS_LDK_AcceptChannel_set_max_htlc_value_in_flight_msat(int64_t this_ptr, int64_t val) { - LDKAcceptChannel this_ptr_conv; +void CS_LDK_CommonAcceptChannelFields_set_dust_limit_satoshis(int64_t this_ptr, int64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); + CommonAcceptChannelFields_set_dust_limit_satoshis(&this_ptr_conv, val); } -int64_t CS_LDK_AcceptChannel_get_channel_reserve_satoshis(int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int64_t CS_LDK_CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat(int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannel_get_channel_reserve_satoshis(&this_ptr_conv); + int64_t ret_conv = CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat(&this_ptr_conv); return ret_conv; } -void CS_LDK_AcceptChannel_set_channel_reserve_satoshis(int64_t this_ptr, int64_t val) { - LDKAcceptChannel this_ptr_conv; +void CS_LDK_CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat(int64_t this_ptr, int64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_channel_reserve_satoshis(&this_ptr_conv, val); + CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); } -int64_t CS_LDK_AcceptChannel_get_htlc_minimum_msat(int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int64_t CS_LDK_CommonAcceptChannelFields_get_htlc_minimum_msat(int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannel_get_htlc_minimum_msat(&this_ptr_conv); + int64_t ret_conv = CommonAcceptChannelFields_get_htlc_minimum_msat(&this_ptr_conv); return ret_conv; } -void CS_LDK_AcceptChannel_set_htlc_minimum_msat(int64_t this_ptr, int64_t val) { - LDKAcceptChannel this_ptr_conv; +void CS_LDK_CommonAcceptChannelFields_set_htlc_minimum_msat(int64_t this_ptr, int64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_htlc_minimum_msat(&this_ptr_conv, val); + CommonAcceptChannelFields_set_htlc_minimum_msat(&this_ptr_conv, val); } -int32_t CS_LDK_AcceptChannel_get_minimum_depth(int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int32_t CS_LDK_CommonAcceptChannelFields_get_minimum_depth(int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int32_t ret_conv = AcceptChannel_get_minimum_depth(&this_ptr_conv); + int32_t ret_conv = CommonAcceptChannelFields_get_minimum_depth(&this_ptr_conv); return ret_conv; } -void CS_LDK_AcceptChannel_set_minimum_depth(int64_t this_ptr, int32_t val) { - LDKAcceptChannel this_ptr_conv; +void CS_LDK_CommonAcceptChannelFields_set_minimum_depth(int64_t this_ptr, int32_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_minimum_depth(&this_ptr_conv, val); + CommonAcceptChannelFields_set_minimum_depth(&this_ptr_conv, val); } -int16_t CS_LDK_AcceptChannel_get_to_self_delay(int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int16_t CS_LDK_CommonAcceptChannelFields_get_to_self_delay(int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int16_t ret_conv = AcceptChannel_get_to_self_delay(&this_ptr_conv); + int16_t ret_conv = CommonAcceptChannelFields_get_to_self_delay(&this_ptr_conv); return ret_conv; } -void CS_LDK_AcceptChannel_set_to_self_delay(int64_t this_ptr, int16_t val) { - LDKAcceptChannel this_ptr_conv; +void CS_LDK_CommonAcceptChannelFields_set_to_self_delay(int64_t this_ptr, int16_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_to_self_delay(&this_ptr_conv, val); + CommonAcceptChannelFields_set_to_self_delay(&this_ptr_conv, val); } -int16_t CS_LDK_AcceptChannel_get_max_accepted_htlcs(int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int16_t CS_LDK_CommonAcceptChannelFields_get_max_accepted_htlcs(int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int16_t ret_conv = AcceptChannel_get_max_accepted_htlcs(&this_ptr_conv); + int16_t ret_conv = CommonAcceptChannelFields_get_max_accepted_htlcs(&this_ptr_conv); return ret_conv; } -void CS_LDK_AcceptChannel_set_max_accepted_htlcs(int64_t this_ptr, int16_t val) { - LDKAcceptChannel this_ptr_conv; +void CS_LDK_CommonAcceptChannelFields_set_max_accepted_htlcs(int64_t this_ptr, int16_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - AcceptChannel_set_max_accepted_htlcs(&this_ptr_conv, val); + CommonAcceptChannelFields_set_max_accepted_htlcs(&this_ptr_conv, val); } -int8_tArray CS_LDK_AcceptChannel_get_funding_pubkey(int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int8_tArray CS_LDK_CommonAcceptChannelFields_get_funding_pubkey(int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannel_get_funding_pubkey(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonAcceptChannelFields_get_funding_pubkey(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void CS_LDK_AcceptChannel_set_funding_pubkey(int64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +void CS_LDK_CommonAcceptChannelFields_set_funding_pubkey(int64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42906,22 +46611,22 @@ void CS_LDK_AcceptChannel_set_funding_pubkey(int64_t this_ptr, int8_tArray val) LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannel_set_funding_pubkey(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_funding_pubkey(&this_ptr_conv, val_ref); } -int8_tArray CS_LDK_AcceptChannel_get_revocation_basepoint(int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int8_tArray CS_LDK_CommonAcceptChannelFields_get_revocation_basepoint(int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannel_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonAcceptChannelFields_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void CS_LDK_AcceptChannel_set_revocation_basepoint(int64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +void CS_LDK_CommonAcceptChannelFields_set_revocation_basepoint(int64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42929,22 +46634,22 @@ void CS_LDK_AcceptChannel_set_revocation_basepoint(int64_t this_ptr, int8_tArra LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannel_set_revocation_basepoint(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_revocation_basepoint(&this_ptr_conv, val_ref); } -int8_tArray CS_LDK_AcceptChannel_get_payment_point(int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int8_tArray CS_LDK_CommonAcceptChannelFields_get_payment_basepoint(int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannel_get_payment_point(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonAcceptChannelFields_get_payment_basepoint(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void CS_LDK_AcceptChannel_set_payment_point(int64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +void CS_LDK_CommonAcceptChannelFields_set_payment_basepoint(int64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42952,22 +46657,22 @@ void CS_LDK_AcceptChannel_set_payment_point(int64_t this_ptr, int8_tArray val) LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannel_set_payment_point(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_payment_basepoint(&this_ptr_conv, val_ref); } -int8_tArray CS_LDK_AcceptChannel_get_delayed_payment_basepoint(int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int8_tArray CS_LDK_CommonAcceptChannelFields_get_delayed_payment_basepoint(int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannel_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonAcceptChannelFields_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void CS_LDK_AcceptChannel_set_delayed_payment_basepoint(int64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +void CS_LDK_CommonAcceptChannelFields_set_delayed_payment_basepoint(int64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42975,22 +46680,22 @@ void CS_LDK_AcceptChannel_set_delayed_payment_basepoint(int64_t this_ptr, int8_ LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannel_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); } -int8_tArray CS_LDK_AcceptChannel_get_htlc_basepoint(int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int8_tArray CS_LDK_CommonAcceptChannelFields_get_htlc_basepoint(int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannel_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonAcceptChannelFields_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void CS_LDK_AcceptChannel_set_htlc_basepoint(int64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +void CS_LDK_CommonAcceptChannelFields_set_htlc_basepoint(int64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -42998,22 +46703,22 @@ void CS_LDK_AcceptChannel_set_htlc_basepoint(int64_t this_ptr, int8_tArray val) LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannel_set_htlc_basepoint(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_htlc_basepoint(&this_ptr_conv, val_ref); } -int8_tArray CS_LDK_AcceptChannel_get_first_per_commitment_point(int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int8_tArray CS_LDK_CommonAcceptChannelFields_get_first_per_commitment_point(int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannel_get_first_per_commitment_point(&this_ptr_conv).compressed_form, 33); + memcpy(ret_arr->elems, CommonAcceptChannelFields_get_first_per_commitment_point(&this_ptr_conv).compressed_form, 33); return ret_arr; } -void CS_LDK_AcceptChannel_set_first_per_commitment_point(int64_t this_ptr, int8_tArray val) { - LDKAcceptChannel this_ptr_conv; +void CS_LDK_CommonAcceptChannelFields_set_first_per_commitment_point(int64_t this_ptr, int8_tArray val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -43021,23 +46726,23 @@ void CS_LDK_AcceptChannel_set_first_per_commitment_point(int64_t this_ptr, int8 LDKPublicKey val_ref; CHECK(val->arr_len == 33); memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannel_set_first_per_commitment_point(&this_ptr_conv, val_ref); + CommonAcceptChannelFields_set_first_per_commitment_point(&this_ptr_conv, val_ref); } -int64_t CS_LDK_AcceptChannel_get_shutdown_scriptpubkey(int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int64_t CS_LDK_CommonAcceptChannelFields_get_shutdown_scriptpubkey(int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ"); - *ret_copy = AcceptChannel_get_shutdown_scriptpubkey(&this_ptr_conv); + *ret_copy = CommonAcceptChannelFields_get_shutdown_scriptpubkey(&this_ptr_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -void CS_LDK_AcceptChannel_set_shutdown_scriptpubkey(int64_t this_ptr, int64_t val) { - LDKAcceptChannel this_ptr_conv; +void CS_LDK_CommonAcceptChannelFields_set_shutdown_scriptpubkey(int64_t this_ptr, int64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -43046,24 +46751,24 @@ void CS_LDK_AcceptChannel_set_shutdown_scriptpubkey(int64_t this_ptr, int64_t v CHECK_ACCESS(val_ptr); LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr); val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val)); - AcceptChannel_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); + CommonAcceptChannelFields_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); } -int64_t CS_LDK_AcceptChannel_get_channel_type(int64_t this_ptr) { - LDKAcceptChannel this_ptr_conv; +int64_t CS_LDK_CommonAcceptChannelFields_get_channel_type(int64_t this_ptr) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures ret_var = AcceptChannel_get_channel_type(&this_ptr_conv); + LDKChannelTypeFeatures ret_var = CommonAcceptChannelFields_get_channel_type(&this_ptr_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -void CS_LDK_AcceptChannel_set_channel_type(int64_t this_ptr, int64_t val) { - LDKAcceptChannel this_ptr_conv; +void CS_LDK_CommonAcceptChannelFields_set_channel_type(int64_t this_ptr, int64_t val) { + LDKCommonAcceptChannelFields this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); @@ -43073,22 +46778,24 @@ void CS_LDK_AcceptChannel_set_channel_type(int64_t this_ptr, int64_t val) { val_conv.is_owned = ptr_is_owned(val); CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); val_conv = ChannelTypeFeatures_clone(&val_conv); - AcceptChannel_set_channel_type(&this_ptr_conv, val_conv); + CommonAcceptChannelFields_set_channel_type(&this_ptr_conv, val_conv); } -int64_t CS_LDK_AcceptChannel_new(int8_tArray temporary_channel_id_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t channel_reserve_satoshis_arg, int64_t htlc_minimum_msat_arg, int32_t minimum_depth_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_point_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg) { - LDKThirtyTwoBytes temporary_channel_id_arg_ref; - CHECK(temporary_channel_id_arg->arr_len == 32); - memcpy(temporary_channel_id_arg_ref.data, temporary_channel_id_arg->elems, 32); FREE(temporary_channel_id_arg); +int64_t CS_LDK_CommonAcceptChannelFields_new(int64_t temporary_channel_id_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int32_t minimum_depth_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg) { + LDKChannelId temporary_channel_id_arg_conv; + temporary_channel_id_arg_conv.inner = untag_ptr(temporary_channel_id_arg); + temporary_channel_id_arg_conv.is_owned = ptr_is_owned(temporary_channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_arg_conv); + temporary_channel_id_arg_conv = ChannelId_clone(&temporary_channel_id_arg_conv); LDKPublicKey funding_pubkey_arg_ref; CHECK(funding_pubkey_arg->arr_len == 33); memcpy(funding_pubkey_arg_ref.compressed_form, funding_pubkey_arg->elems, 33); FREE(funding_pubkey_arg); LDKPublicKey revocation_basepoint_arg_ref; CHECK(revocation_basepoint_arg->arr_len == 33); memcpy(revocation_basepoint_arg_ref.compressed_form, revocation_basepoint_arg->elems, 33); FREE(revocation_basepoint_arg); - LDKPublicKey payment_point_arg_ref; - CHECK(payment_point_arg->arr_len == 33); - memcpy(payment_point_arg_ref.compressed_form, payment_point_arg->elems, 33); FREE(payment_point_arg); + LDKPublicKey payment_basepoint_arg_ref; + CHECK(payment_basepoint_arg->arr_len == 33); + memcpy(payment_basepoint_arg_ref.compressed_form, payment_basepoint_arg->elems, 33); FREE(payment_basepoint_arg); LDKPublicKey delayed_payment_basepoint_arg_ref; CHECK(delayed_payment_basepoint_arg->arr_len == 33); memcpy(delayed_payment_basepoint_arg_ref.compressed_form, delayed_payment_basepoint_arg->elems, 33); FREE(delayed_payment_basepoint_arg); @@ -43107,7 +46814,129 @@ int64_t CS_LDK_AcceptChannel_new(int8_tArray temporary_channel_id_arg, int64_t channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv); channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv); - LDKAcceptChannel ret_var = AcceptChannel_new(temporary_channel_id_arg_ref, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_point_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv); + LDKCommonAcceptChannelFields ret_var = CommonAcceptChannelFields_new(temporary_channel_id_arg_conv, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t CommonAcceptChannelFields_clone_ptr(LDKCommonAcceptChannelFields *NONNULL_PTR arg) { + LDKCommonAcceptChannelFields ret_var = CommonAcceptChannelFields_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t CS_LDK_CommonAcceptChannelFields_clone_ptr(int64_t arg) { + LDKCommonAcceptChannelFields arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = CommonAcceptChannelFields_clone_ptr(&arg_conv); + return ret_conv; +} + +int64_t CS_LDK_CommonAcceptChannelFields_clone(int64_t orig) { + LDKCommonAcceptChannelFields orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKCommonAcceptChannelFields ret_var = CommonAcceptChannelFields_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_CommonAcceptChannelFields_hash(int64_t o) { + LDKCommonAcceptChannelFields o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = CommonAcceptChannelFields_hash(&o_conv); + return ret_conv; +} + +jboolean CS_LDK_CommonAcceptChannelFields_eq(int64_t a, int64_t b) { + LDKCommonAcceptChannelFields a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKCommonAcceptChannelFields b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = CommonAcceptChannelFields_eq(&a_conv, &b_conv); + return ret_conv; +} + +void CS_LDK_AcceptChannel_free(int64_t this_obj) { + LDKAcceptChannel this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + AcceptChannel_free(this_obj_conv); +} + +int64_t CS_LDK_AcceptChannel_get_common_fields(int64_t this_ptr) { + LDKAcceptChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCommonAcceptChannelFields ret_var = AcceptChannel_get_common_fields(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void CS_LDK_AcceptChannel_set_common_fields(int64_t this_ptr, int64_t val) { + LDKAcceptChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCommonAcceptChannelFields val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = CommonAcceptChannelFields_clone(&val_conv); + AcceptChannel_set_common_fields(&this_ptr_conv, val_conv); +} + +int64_t CS_LDK_AcceptChannel_get_channel_reserve_satoshis(int64_t this_ptr) { + LDKAcceptChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int64_t ret_conv = AcceptChannel_get_channel_reserve_satoshis(&this_ptr_conv); + return ret_conv; +} + +void CS_LDK_AcceptChannel_set_channel_reserve_satoshis(int64_t this_ptr, int64_t val) { + LDKAcceptChannel this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + AcceptChannel_set_channel_reserve_satoshis(&this_ptr_conv, val); +} + +int64_t CS_LDK_AcceptChannel_new(int64_t common_fields_arg, int64_t channel_reserve_satoshis_arg) { + LDKCommonAcceptChannelFields common_fields_arg_conv; + common_fields_arg_conv.inner = untag_ptr(common_fields_arg); + common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv); + common_fields_arg_conv = CommonAcceptChannelFields_clone(&common_fields_arg_conv); + LDKAcceptChannel ret_var = AcceptChannel_new(common_fields_arg_conv, channel_reserve_satoshis_arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -43177,27 +47006,31 @@ void CS_LDK_AcceptChannelV2_free(int64_t this_obj) { AcceptChannelV2_free(this_obj_conv); } -int8_tArray CS_LDK_AcceptChannelV2_get_temporary_channel_id(int64_t this_ptr) { +int64_t CS_LDK_AcceptChannelV2_get_common_fields(int64_t this_ptr) { LDKAcceptChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *AcceptChannelV2_get_temporary_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKCommonAcceptChannelFields ret_var = AcceptChannelV2_get_common_fields(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_AcceptChannelV2_set_temporary_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_AcceptChannelV2_set_common_fields(int64_t this_ptr, int64_t val) { LDKAcceptChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - AcceptChannelV2_set_temporary_channel_id(&this_ptr_conv, val_ref); + LDKCommonAcceptChannelFields val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = CommonAcceptChannelFields_clone(&val_conv); + AcceptChannelV2_set_common_fields(&this_ptr_conv, val_conv); } int64_t CS_LDK_AcceptChannelV2_get_funding_satoshis(int64_t this_ptr) { @@ -43219,258 +47052,6 @@ void CS_LDK_AcceptChannelV2_set_funding_satoshis(int64_t this_ptr, int64_t val) AcceptChannelV2_set_funding_satoshis(&this_ptr_conv, val); } -int64_t CS_LDK_AcceptChannelV2_get_dust_limit_satoshis(int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannelV2_get_dust_limit_satoshis(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_AcceptChannelV2_set_dust_limit_satoshis(int64_t this_ptr, int64_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_dust_limit_satoshis(&this_ptr_conv, val); -} - -int64_t CS_LDK_AcceptChannelV2_get_max_htlc_value_in_flight_msat(int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannelV2_get_max_htlc_value_in_flight_msat(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_AcceptChannelV2_set_max_htlc_value_in_flight_msat(int64_t this_ptr, int64_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val); -} - -int64_t CS_LDK_AcceptChannelV2_get_htlc_minimum_msat(int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int64_t ret_conv = AcceptChannelV2_get_htlc_minimum_msat(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_AcceptChannelV2_set_htlc_minimum_msat(int64_t this_ptr, int64_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_htlc_minimum_msat(&this_ptr_conv, val); -} - -int32_t CS_LDK_AcceptChannelV2_get_minimum_depth(int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int32_t ret_conv = AcceptChannelV2_get_minimum_depth(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_AcceptChannelV2_set_minimum_depth(int64_t this_ptr, int32_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_minimum_depth(&this_ptr_conv, val); -} - -int16_t CS_LDK_AcceptChannelV2_get_to_self_delay(int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int16_t ret_conv = AcceptChannelV2_get_to_self_delay(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_AcceptChannelV2_set_to_self_delay(int64_t this_ptr, int16_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_to_self_delay(&this_ptr_conv, val); -} - -int16_t CS_LDK_AcceptChannelV2_get_max_accepted_htlcs(int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int16_t ret_conv = AcceptChannelV2_get_max_accepted_htlcs(&this_ptr_conv); - return ret_conv; -} - -void CS_LDK_AcceptChannelV2_set_max_accepted_htlcs(int64_t this_ptr, int16_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - AcceptChannelV2_set_max_accepted_htlcs(&this_ptr_conv, val); -} - -int8_tArray CS_LDK_AcceptChannelV2_get_funding_pubkey(int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannelV2_get_funding_pubkey(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void CS_LDK_AcceptChannelV2_set_funding_pubkey(int64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannelV2_set_funding_pubkey(&this_ptr_conv, val_ref); -} - -int8_tArray CS_LDK_AcceptChannelV2_get_revocation_basepoint(int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannelV2_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void CS_LDK_AcceptChannelV2_set_revocation_basepoint(int64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannelV2_set_revocation_basepoint(&this_ptr_conv, val_ref); -} - -int8_tArray CS_LDK_AcceptChannelV2_get_payment_basepoint(int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannelV2_get_payment_basepoint(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void CS_LDK_AcceptChannelV2_set_payment_basepoint(int64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannelV2_set_payment_basepoint(&this_ptr_conv, val_ref); -} - -int8_tArray CS_LDK_AcceptChannelV2_get_delayed_payment_basepoint(int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannelV2_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void CS_LDK_AcceptChannelV2_set_delayed_payment_basepoint(int64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannelV2_set_delayed_payment_basepoint(&this_ptr_conv, val_ref); -} - -int8_tArray CS_LDK_AcceptChannelV2_get_htlc_basepoint(int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannelV2_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void CS_LDK_AcceptChannelV2_set_htlc_basepoint(int64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannelV2_set_htlc_basepoint(&this_ptr_conv, val_ref); -} - -int8_tArray CS_LDK_AcceptChannelV2_get_first_per_commitment_point(int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, AcceptChannelV2_get_first_per_commitment_point(&this_ptr_conv).compressed_form, 33); - return ret_arr; -} - -void CS_LDK_AcceptChannelV2_set_first_per_commitment_point(int64_t this_ptr, int8_tArray val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - AcceptChannelV2_set_first_per_commitment_point(&this_ptr_conv, val_ref); -} - int8_tArray CS_LDK_AcceptChannelV2_get_second_per_commitment_point(int64_t this_ptr) { LDKAcceptChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -43494,58 +47075,6 @@ void CS_LDK_AcceptChannelV2_set_second_per_commitment_point(int64_t this_ptr, i AcceptChannelV2_set_second_per_commitment_point(&this_ptr_conv, val_ref); } -int64_t CS_LDK_AcceptChannelV2_get_shutdown_scriptpubkey(int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ"); - *ret_copy = AcceptChannelV2_get_shutdown_scriptpubkey(&this_ptr_conv); - int64_t ret_ref = tag_ptr(ret_copy, true); - return ret_ref; -} - -void CS_LDK_AcceptChannelV2_set_shutdown_scriptpubkey(int64_t this_ptr, int64_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - void* val_ptr = untag_ptr(val); - CHECK_ACCESS(val_ptr); - LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr); - val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val)); - AcceptChannelV2_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv); -} - -int64_t CS_LDK_AcceptChannelV2_get_channel_type(int64_t this_ptr) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures ret_var = AcceptChannelV2_get_channel_type(&this_ptr_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); - return ret_ref; -} - -void CS_LDK_AcceptChannelV2_set_channel_type(int64_t this_ptr, int64_t val) { - LDKAcceptChannelV2 this_ptr_conv; - this_ptr_conv.inner = untag_ptr(this_ptr); - this_ptr_conv.is_owned = ptr_is_owned(this_ptr); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); - this_ptr_conv.is_owned = false; - LDKChannelTypeFeatures val_conv; - val_conv.inner = untag_ptr(val); - val_conv.is_owned = ptr_is_owned(val); - CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); - val_conv = ChannelTypeFeatures_clone(&val_conv); - AcceptChannelV2_set_channel_type(&this_ptr_conv, val_conv); -} - int32_t CS_LDK_AcceptChannelV2_get_require_confirmed_inputs(int64_t this_ptr) { LDKAcceptChannelV2 this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -43566,42 +47095,17 @@ void CS_LDK_AcceptChannelV2_set_require_confirmed_inputs(int64_t this_ptr, int3 AcceptChannelV2_set_require_confirmed_inputs(&this_ptr_conv, val_conv); } -int64_t CS_LDK_AcceptChannelV2_new(int8_tArray temporary_channel_id_arg, int64_t funding_satoshis_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int32_t minimum_depth_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_tArray second_per_commitment_point_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg, int32_t require_confirmed_inputs_arg) { - LDKThirtyTwoBytes temporary_channel_id_arg_ref; - CHECK(temporary_channel_id_arg->arr_len == 32); - memcpy(temporary_channel_id_arg_ref.data, temporary_channel_id_arg->elems, 32); FREE(temporary_channel_id_arg); - LDKPublicKey funding_pubkey_arg_ref; - CHECK(funding_pubkey_arg->arr_len == 33); - memcpy(funding_pubkey_arg_ref.compressed_form, funding_pubkey_arg->elems, 33); FREE(funding_pubkey_arg); - LDKPublicKey revocation_basepoint_arg_ref; - CHECK(revocation_basepoint_arg->arr_len == 33); - memcpy(revocation_basepoint_arg_ref.compressed_form, revocation_basepoint_arg->elems, 33); FREE(revocation_basepoint_arg); - LDKPublicKey payment_basepoint_arg_ref; - CHECK(payment_basepoint_arg->arr_len == 33); - memcpy(payment_basepoint_arg_ref.compressed_form, payment_basepoint_arg->elems, 33); FREE(payment_basepoint_arg); - LDKPublicKey delayed_payment_basepoint_arg_ref; - CHECK(delayed_payment_basepoint_arg->arr_len == 33); - memcpy(delayed_payment_basepoint_arg_ref.compressed_form, delayed_payment_basepoint_arg->elems, 33); FREE(delayed_payment_basepoint_arg); - LDKPublicKey htlc_basepoint_arg_ref; - CHECK(htlc_basepoint_arg->arr_len == 33); - memcpy(htlc_basepoint_arg_ref.compressed_form, htlc_basepoint_arg->elems, 33); FREE(htlc_basepoint_arg); - LDKPublicKey first_per_commitment_point_arg_ref; - CHECK(first_per_commitment_point_arg->arr_len == 33); - memcpy(first_per_commitment_point_arg_ref.compressed_form, first_per_commitment_point_arg->elems, 33); FREE(first_per_commitment_point_arg); +int64_t CS_LDK_AcceptChannelV2_new(int64_t common_fields_arg, int64_t funding_satoshis_arg, int8_tArray second_per_commitment_point_arg, int32_t require_confirmed_inputs_arg) { + LDKCommonAcceptChannelFields common_fields_arg_conv; + common_fields_arg_conv.inner = untag_ptr(common_fields_arg); + common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv); + common_fields_arg_conv = CommonAcceptChannelFields_clone(&common_fields_arg_conv); LDKPublicKey second_per_commitment_point_arg_ref; CHECK(second_per_commitment_point_arg->arr_len == 33); memcpy(second_per_commitment_point_arg_ref.compressed_form, second_per_commitment_point_arg->elems, 33); FREE(second_per_commitment_point_arg); - void* shutdown_scriptpubkey_arg_ptr = untag_ptr(shutdown_scriptpubkey_arg); - CHECK_ACCESS(shutdown_scriptpubkey_arg_ptr); - LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg_conv = *(LDKCOption_CVec_u8ZZ*)(shutdown_scriptpubkey_arg_ptr); - shutdown_scriptpubkey_arg_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(shutdown_scriptpubkey_arg)); - LDKChannelTypeFeatures channel_type_arg_conv; - channel_type_arg_conv.inner = untag_ptr(channel_type_arg); - channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv); - channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv); LDKCOption_NoneZ require_confirmed_inputs_arg_conv = LDKCOption_NoneZ_from_cs(require_confirmed_inputs_arg); - LDKAcceptChannelV2 ret_var = AcceptChannelV2_new(temporary_channel_id_arg_ref, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, second_per_commitment_point_arg_ref, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv, require_confirmed_inputs_arg_conv); + LDKAcceptChannelV2 ret_var = AcceptChannelV2_new(common_fields_arg_conv, funding_satoshis_arg, second_per_commitment_point_arg_ref, require_confirmed_inputs_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -43671,27 +47175,31 @@ void CS_LDK_FundingCreated_free(int64_t this_obj) { FundingCreated_free(this_obj_conv); } -int8_tArray CS_LDK_FundingCreated_get_temporary_channel_id(int64_t this_ptr) { +int64_t CS_LDK_FundingCreated_get_temporary_channel_id(int64_t this_ptr) { LDKFundingCreated this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *FundingCreated_get_temporary_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = FundingCreated_get_temporary_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_FundingCreated_set_temporary_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_FundingCreated_set_temporary_channel_id(int64_t this_ptr, int64_t val) { LDKFundingCreated this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - FundingCreated_set_temporary_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + FundingCreated_set_temporary_channel_id(&this_ptr_conv, val_conv); } int8_tArray CS_LDK_FundingCreated_get_funding_txid(int64_t this_ptr) { @@ -43759,17 +47267,19 @@ void CS_LDK_FundingCreated_set_signature(int64_t this_ptr, int8_tArray val) { FundingCreated_set_signature(&this_ptr_conv, val_ref); } -int64_t CS_LDK_FundingCreated_new(int8_tArray temporary_channel_id_arg, int8_tArray funding_txid_arg, int16_t funding_output_index_arg, int8_tArray signature_arg) { - LDKThirtyTwoBytes temporary_channel_id_arg_ref; - CHECK(temporary_channel_id_arg->arr_len == 32); - memcpy(temporary_channel_id_arg_ref.data, temporary_channel_id_arg->elems, 32); FREE(temporary_channel_id_arg); +int64_t CS_LDK_FundingCreated_new(int64_t temporary_channel_id_arg, int8_tArray funding_txid_arg, int16_t funding_output_index_arg, int8_tArray signature_arg) { + LDKChannelId temporary_channel_id_arg_conv; + temporary_channel_id_arg_conv.inner = untag_ptr(temporary_channel_id_arg); + temporary_channel_id_arg_conv.is_owned = ptr_is_owned(temporary_channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_arg_conv); + temporary_channel_id_arg_conv = ChannelId_clone(&temporary_channel_id_arg_conv); LDKThirtyTwoBytes funding_txid_arg_ref; CHECK(funding_txid_arg->arr_len == 32); memcpy(funding_txid_arg_ref.data, funding_txid_arg->elems, 32); FREE(funding_txid_arg); LDKECDSASignature signature_arg_ref; CHECK(signature_arg->arr_len == 64); memcpy(signature_arg_ref.compact_form, signature_arg->elems, 64); FREE(signature_arg); - LDKFundingCreated ret_var = FundingCreated_new(temporary_channel_id_arg_ref, funding_txid_arg_ref, funding_output_index_arg, signature_arg_ref); + LDKFundingCreated ret_var = FundingCreated_new(temporary_channel_id_arg_conv, funding_txid_arg_ref, funding_output_index_arg, signature_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -43839,27 +47349,31 @@ void CS_LDK_FundingSigned_free(int64_t this_obj) { FundingSigned_free(this_obj_conv); } -int8_tArray CS_LDK_FundingSigned_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_FundingSigned_get_channel_id(int64_t this_ptr) { LDKFundingSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *FundingSigned_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = FundingSigned_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_FundingSigned_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_FundingSigned_set_channel_id(int64_t this_ptr, int64_t val) { LDKFundingSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - FundingSigned_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + FundingSigned_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray CS_LDK_FundingSigned_get_signature(int64_t this_ptr) { @@ -43885,14 +47399,16 @@ void CS_LDK_FundingSigned_set_signature(int64_t this_ptr, int8_tArray val) { FundingSigned_set_signature(&this_ptr_conv, val_ref); } -int64_t CS_LDK_FundingSigned_new(int8_tArray channel_id_arg, int8_tArray signature_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_FundingSigned_new(int64_t channel_id_arg, int8_tArray signature_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKECDSASignature signature_arg_ref; CHECK(signature_arg->arr_len == 64); memcpy(signature_arg_ref.compact_form, signature_arg->elems, 64); FREE(signature_arg); - LDKFundingSigned ret_var = FundingSigned_new(channel_id_arg_ref, signature_arg_ref); + LDKFundingSigned ret_var = FundingSigned_new(channel_id_arg_conv, signature_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -43962,27 +47478,31 @@ void CS_LDK_ChannelReady_free(int64_t this_obj) { ChannelReady_free(this_obj_conv); } -int8_tArray CS_LDK_ChannelReady_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_ChannelReady_get_channel_id(int64_t this_ptr) { LDKChannelReady this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *ChannelReady_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = ChannelReady_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_ChannelReady_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_ChannelReady_set_channel_id(int64_t this_ptr, int64_t val) { LDKChannelReady this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - ChannelReady_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ChannelReady_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray CS_LDK_ChannelReady_get_next_per_commitment_point(int64_t this_ptr) { @@ -44033,10 +47553,12 @@ void CS_LDK_ChannelReady_set_short_channel_id_alias(int64_t this_ptr, int64_t v ChannelReady_set_short_channel_id_alias(&this_ptr_conv, val_conv); } -int64_t CS_LDK_ChannelReady_new(int8_tArray channel_id_arg, int8_tArray next_per_commitment_point_arg, int64_t short_channel_id_alias_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_ChannelReady_new(int64_t channel_id_arg, int8_tArray next_per_commitment_point_arg, int64_t short_channel_id_alias_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKPublicKey next_per_commitment_point_arg_ref; CHECK(next_per_commitment_point_arg->arr_len == 33); memcpy(next_per_commitment_point_arg_ref.compressed_form, next_per_commitment_point_arg->elems, 33); FREE(next_per_commitment_point_arg); @@ -44044,7 +47566,7 @@ int64_t CS_LDK_ChannelReady_new(int8_tArray channel_id_arg, int8_tArray next_pe CHECK_ACCESS(short_channel_id_alias_arg_ptr); LDKCOption_u64Z short_channel_id_alias_arg_conv = *(LDKCOption_u64Z*)(short_channel_id_alias_arg_ptr); short_channel_id_alias_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(short_channel_id_alias_arg)); - LDKChannelReady ret_var = ChannelReady_new(channel_id_arg_ref, next_per_commitment_point_arg_ref, short_channel_id_alias_arg_conv); + LDKChannelReady ret_var = ChannelReady_new(channel_id_arg_conv, next_per_commitment_point_arg_ref, short_channel_id_alias_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -44114,27 +47636,31 @@ void CS_LDK_Stfu_free(int64_t this_obj) { Stfu_free(this_obj_conv); } -int8_tArray CS_LDK_Stfu_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_Stfu_get_channel_id(int64_t this_ptr) { LDKStfu this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *Stfu_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = Stfu_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_Stfu_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_Stfu_set_channel_id(int64_t this_ptr, int64_t val) { LDKStfu this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - Stfu_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + Stfu_set_channel_id(&this_ptr_conv, val_conv); } int8_t CS_LDK_Stfu_get_initiator(int64_t this_ptr) { @@ -44156,11 +47682,13 @@ void CS_LDK_Stfu_set_initiator(int64_t this_ptr, int8_t val) { Stfu_set_initiator(&this_ptr_conv, val); } -int64_t CS_LDK_Stfu_new(int8_tArray channel_id_arg, int8_t initiator_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); - LDKStfu ret_var = Stfu_new(channel_id_arg_ref, initiator_arg); +int64_t CS_LDK_Stfu_new(int64_t channel_id_arg, int8_t initiator_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKStfu ret_var = Stfu_new(channel_id_arg_conv, initiator_arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -44220,27 +47748,31 @@ void CS_LDK_Splice_free(int64_t this_obj) { Splice_free(this_obj_conv); } -int8_tArray CS_LDK_Splice_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_Splice_get_channel_id(int64_t this_ptr) { LDKSplice this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *Splice_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = Splice_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_Splice_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_Splice_set_channel_id(int64_t this_ptr, int64_t val) { LDKSplice this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - Splice_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + Splice_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray CS_LDK_Splice_get_chain_hash(int64_t this_ptr) { @@ -44346,17 +47878,19 @@ void CS_LDK_Splice_set_funding_pubkey(int64_t this_ptr, int8_tArray val) { Splice_set_funding_pubkey(&this_ptr_conv, val_ref); } -int64_t CS_LDK_Splice_new(int8_tArray channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int32_t funding_feerate_perkw_arg, int32_t locktime_arg, int8_tArray funding_pubkey_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_Splice_new(int64_t channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int32_t funding_feerate_perkw_arg, int32_t locktime_arg, int8_tArray funding_pubkey_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes chain_hash_arg_ref; CHECK(chain_hash_arg->arr_len == 32); memcpy(chain_hash_arg_ref.data, chain_hash_arg->elems, 32); FREE(chain_hash_arg); LDKPublicKey funding_pubkey_arg_ref; CHECK(funding_pubkey_arg->arr_len == 33); memcpy(funding_pubkey_arg_ref.compressed_form, funding_pubkey_arg->elems, 33); FREE(funding_pubkey_arg); - LDKSplice ret_var = Splice_new(channel_id_arg_ref, chain_hash_arg_ref, relative_satoshis_arg, funding_feerate_perkw_arg, locktime_arg, funding_pubkey_arg_ref); + LDKSplice ret_var = Splice_new(channel_id_arg_conv, chain_hash_arg_ref, relative_satoshis_arg, funding_feerate_perkw_arg, locktime_arg, funding_pubkey_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -44416,27 +47950,31 @@ void CS_LDK_SpliceAck_free(int64_t this_obj) { SpliceAck_free(this_obj_conv); } -int8_tArray CS_LDK_SpliceAck_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_SpliceAck_get_channel_id(int64_t this_ptr) { LDKSpliceAck this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *SpliceAck_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = SpliceAck_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_SpliceAck_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_SpliceAck_set_channel_id(int64_t this_ptr, int64_t val) { LDKSpliceAck this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - SpliceAck_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + SpliceAck_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray CS_LDK_SpliceAck_get_chain_hash(int64_t this_ptr) { @@ -44504,17 +48042,19 @@ void CS_LDK_SpliceAck_set_funding_pubkey(int64_t this_ptr, int8_tArray val) { SpliceAck_set_funding_pubkey(&this_ptr_conv, val_ref); } -int64_t CS_LDK_SpliceAck_new(int8_tArray channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int8_tArray funding_pubkey_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_SpliceAck_new(int64_t channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int8_tArray funding_pubkey_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes chain_hash_arg_ref; CHECK(chain_hash_arg->arr_len == 32); memcpy(chain_hash_arg_ref.data, chain_hash_arg->elems, 32); FREE(chain_hash_arg); LDKPublicKey funding_pubkey_arg_ref; CHECK(funding_pubkey_arg->arr_len == 33); memcpy(funding_pubkey_arg_ref.compressed_form, funding_pubkey_arg->elems, 33); FREE(funding_pubkey_arg); - LDKSpliceAck ret_var = SpliceAck_new(channel_id_arg_ref, chain_hash_arg_ref, relative_satoshis_arg, funding_pubkey_arg_ref); + LDKSpliceAck ret_var = SpliceAck_new(channel_id_arg_conv, chain_hash_arg_ref, relative_satoshis_arg, funding_pubkey_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -44574,34 +48114,40 @@ void CS_LDK_SpliceLocked_free(int64_t this_obj) { SpliceLocked_free(this_obj_conv); } -int8_tArray CS_LDK_SpliceLocked_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_SpliceLocked_get_channel_id(int64_t this_ptr) { LDKSpliceLocked this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *SpliceLocked_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = SpliceLocked_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_SpliceLocked_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_SpliceLocked_set_channel_id(int64_t this_ptr, int64_t val) { LDKSpliceLocked this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - SpliceLocked_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + SpliceLocked_set_channel_id(&this_ptr_conv, val_conv); } -int64_t CS_LDK_SpliceLocked_new(int8_tArray channel_id_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); - LDKSpliceLocked ret_var = SpliceLocked_new(channel_id_arg_ref); +int64_t CS_LDK_SpliceLocked_new(int64_t channel_id_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKSpliceLocked ret_var = SpliceLocked_new(channel_id_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -44661,27 +48207,31 @@ void CS_LDK_TxAddInput_free(int64_t this_obj) { TxAddInput_free(this_obj_conv); } -int8_tArray CS_LDK_TxAddInput_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_TxAddInput_get_channel_id(int64_t this_ptr) { LDKTxAddInput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxAddInput_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxAddInput_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_TxAddInput_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_TxAddInput_set_channel_id(int64_t this_ptr, int64_t val) { LDKTxAddInput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxAddInput_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxAddInput_set_channel_id(&this_ptr_conv, val_conv); } int64_t CS_LDK_TxAddInput_get_serial_id(int64_t this_ptr) { @@ -44768,16 +48318,18 @@ void CS_LDK_TxAddInput_set_sequence(int64_t this_ptr, int32_t val) { TxAddInput_set_sequence(&this_ptr_conv, val); } -int64_t CS_LDK_TxAddInput_new(int8_tArray channel_id_arg, int64_t serial_id_arg, int64_t prevtx_arg, int32_t prevtx_out_arg, int32_t sequence_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_TxAddInput_new(int64_t channel_id_arg, int64_t serial_id_arg, int64_t prevtx_arg, int32_t prevtx_out_arg, int32_t sequence_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKTransactionU16LenLimited prevtx_arg_conv; prevtx_arg_conv.inner = untag_ptr(prevtx_arg); prevtx_arg_conv.is_owned = ptr_is_owned(prevtx_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(prevtx_arg_conv); prevtx_arg_conv = TransactionU16LenLimited_clone(&prevtx_arg_conv); - LDKTxAddInput ret_var = TxAddInput_new(channel_id_arg_ref, serial_id_arg, prevtx_arg_conv, prevtx_out_arg, sequence_arg); + LDKTxAddInput ret_var = TxAddInput_new(channel_id_arg_conv, serial_id_arg, prevtx_arg_conv, prevtx_out_arg, sequence_arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -44847,27 +48399,31 @@ void CS_LDK_TxAddOutput_free(int64_t this_obj) { TxAddOutput_free(this_obj_conv); } -int8_tArray CS_LDK_TxAddOutput_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_TxAddOutput_get_channel_id(int64_t this_ptr) { LDKTxAddOutput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxAddOutput_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxAddOutput_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_TxAddOutput_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_TxAddOutput_set_channel_id(int64_t this_ptr, int64_t val) { LDKTxAddOutput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxAddOutput_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxAddOutput_set_channel_id(&this_ptr_conv, val_conv); } int64_t CS_LDK_TxAddOutput_get_serial_id(int64_t this_ptr) { @@ -44934,15 +48490,17 @@ void CS_LDK_TxAddOutput_set_script(int64_t this_ptr, int8_tArray val) { TxAddOutput_set_script(&this_ptr_conv, val_ref); } -int64_t CS_LDK_TxAddOutput_new(int8_tArray channel_id_arg, int64_t serial_id_arg, int64_t sats_arg, int8_tArray script_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_TxAddOutput_new(int64_t channel_id_arg, int64_t serial_id_arg, int64_t sats_arg, int8_tArray script_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKCVec_u8Z script_arg_ref; script_arg_ref.datalen = script_arg->arr_len; script_arg_ref.data = MALLOC(script_arg_ref.datalen, "LDKCVec_u8Z Bytes"); memcpy(script_arg_ref.data, script_arg->elems, script_arg_ref.datalen); FREE(script_arg); - LDKTxAddOutput ret_var = TxAddOutput_new(channel_id_arg_ref, serial_id_arg, sats_arg, script_arg_ref); + LDKTxAddOutput ret_var = TxAddOutput_new(channel_id_arg_conv, serial_id_arg, sats_arg, script_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -45012,27 +48570,31 @@ void CS_LDK_TxRemoveInput_free(int64_t this_obj) { TxRemoveInput_free(this_obj_conv); } -int8_tArray CS_LDK_TxRemoveInput_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_TxRemoveInput_get_channel_id(int64_t this_ptr) { LDKTxRemoveInput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxRemoveInput_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxRemoveInput_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_TxRemoveInput_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_TxRemoveInput_set_channel_id(int64_t this_ptr, int64_t val) { LDKTxRemoveInput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxRemoveInput_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxRemoveInput_set_channel_id(&this_ptr_conv, val_conv); } int64_t CS_LDK_TxRemoveInput_get_serial_id(int64_t this_ptr) { @@ -45054,11 +48616,13 @@ void CS_LDK_TxRemoveInput_set_serial_id(int64_t this_ptr, int64_t val) { TxRemoveInput_set_serial_id(&this_ptr_conv, val); } -int64_t CS_LDK_TxRemoveInput_new(int8_tArray channel_id_arg, int64_t serial_id_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); - LDKTxRemoveInput ret_var = TxRemoveInput_new(channel_id_arg_ref, serial_id_arg); +int64_t CS_LDK_TxRemoveInput_new(int64_t channel_id_arg, int64_t serial_id_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKTxRemoveInput ret_var = TxRemoveInput_new(channel_id_arg_conv, serial_id_arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -45128,27 +48692,31 @@ void CS_LDK_TxRemoveOutput_free(int64_t this_obj) { TxRemoveOutput_free(this_obj_conv); } -int8_tArray CS_LDK_TxRemoveOutput_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_TxRemoveOutput_get_channel_id(int64_t this_ptr) { LDKTxRemoveOutput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxRemoveOutput_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxRemoveOutput_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_TxRemoveOutput_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_TxRemoveOutput_set_channel_id(int64_t this_ptr, int64_t val) { LDKTxRemoveOutput this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxRemoveOutput_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxRemoveOutput_set_channel_id(&this_ptr_conv, val_conv); } int64_t CS_LDK_TxRemoveOutput_get_serial_id(int64_t this_ptr) { @@ -45170,11 +48738,13 @@ void CS_LDK_TxRemoveOutput_set_serial_id(int64_t this_ptr, int64_t val) { TxRemoveOutput_set_serial_id(&this_ptr_conv, val); } -int64_t CS_LDK_TxRemoveOutput_new(int8_tArray channel_id_arg, int64_t serial_id_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); - LDKTxRemoveOutput ret_var = TxRemoveOutput_new(channel_id_arg_ref, serial_id_arg); +int64_t CS_LDK_TxRemoveOutput_new(int64_t channel_id_arg, int64_t serial_id_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKTxRemoveOutput ret_var = TxRemoveOutput_new(channel_id_arg_conv, serial_id_arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -45244,34 +48814,40 @@ void CS_LDK_TxComplete_free(int64_t this_obj) { TxComplete_free(this_obj_conv); } -int8_tArray CS_LDK_TxComplete_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_TxComplete_get_channel_id(int64_t this_ptr) { LDKTxComplete this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxComplete_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxComplete_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_TxComplete_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_TxComplete_set_channel_id(int64_t this_ptr, int64_t val) { LDKTxComplete this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxComplete_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxComplete_set_channel_id(&this_ptr_conv, val_conv); } -int64_t CS_LDK_TxComplete_new(int8_tArray channel_id_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); - LDKTxComplete ret_var = TxComplete_new(channel_id_arg_ref); +int64_t CS_LDK_TxComplete_new(int64_t channel_id_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKTxComplete ret_var = TxComplete_new(channel_id_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -45341,27 +48917,31 @@ void CS_LDK_TxSignatures_free(int64_t this_obj) { TxSignatures_free(this_obj_conv); } -int8_tArray CS_LDK_TxSignatures_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_TxSignatures_get_channel_id(int64_t this_ptr) { LDKTxSignatures this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxSignatures_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxSignatures_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_TxSignatures_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_TxSignatures_set_channel_id(int64_t this_ptr, int64_t val) { LDKTxSignatures this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxSignatures_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxSignatures_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray CS_LDK_TxSignatures_get_tx_hash(int64_t this_ptr) { @@ -45435,10 +49015,37 @@ void CS_LDK_TxSignatures_set_witnesses(int64_t this_ptr, ptrArray val) { TxSignatures_set_witnesses(&this_ptr_conv, val_constr); } -int64_t CS_LDK_TxSignatures_new(int8_tArray channel_id_arg, int8_tArray tx_hash_arg, ptrArray witnesses_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_TxSignatures_get_funding_outpoint_sig(int64_t this_ptr) { + LDKTxSignatures this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ"); + *ret_copy = TxSignatures_get_funding_outpoint_sig(&this_ptr_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void CS_LDK_TxSignatures_set_funding_outpoint_sig(int64_t this_ptr, int64_t val) { + LDKTxSignatures this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKCOption_ECDSASignatureZ val_conv = *(LDKCOption_ECDSASignatureZ*)(val_ptr); + val_conv = COption_ECDSASignatureZ_clone((LDKCOption_ECDSASignatureZ*)untag_ptr(val)); + TxSignatures_set_funding_outpoint_sig(&this_ptr_conv, val_conv); +} + +int64_t CS_LDK_TxSignatures_new(int64_t channel_id_arg, int8_tArray tx_hash_arg, ptrArray witnesses_arg, int64_t funding_outpoint_sig_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes tx_hash_arg_ref; CHECK(tx_hash_arg->arr_len == 32); memcpy(tx_hash_arg_ref.data, tx_hash_arg->elems, 32); FREE(tx_hash_arg); @@ -45459,7 +49066,11 @@ int64_t CS_LDK_TxSignatures_new(int8_tArray channel_id_arg, int8_tArray tx_hash witnesses_arg_constr.data[i] = witnesses_arg_conv_8_ref; } FREE(witnesses_arg); - LDKTxSignatures ret_var = TxSignatures_new(channel_id_arg_ref, tx_hash_arg_ref, witnesses_arg_constr); + void* funding_outpoint_sig_arg_ptr = untag_ptr(funding_outpoint_sig_arg); + CHECK_ACCESS(funding_outpoint_sig_arg_ptr); + LDKCOption_ECDSASignatureZ funding_outpoint_sig_arg_conv = *(LDKCOption_ECDSASignatureZ*)(funding_outpoint_sig_arg_ptr); + funding_outpoint_sig_arg_conv = COption_ECDSASignatureZ_clone((LDKCOption_ECDSASignatureZ*)untag_ptr(funding_outpoint_sig_arg)); + LDKTxSignatures ret_var = TxSignatures_new(channel_id_arg_conv, tx_hash_arg_ref, witnesses_arg_constr, funding_outpoint_sig_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -45529,27 +49140,31 @@ void CS_LDK_TxInitRbf_free(int64_t this_obj) { TxInitRbf_free(this_obj_conv); } -int8_tArray CS_LDK_TxInitRbf_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_TxInitRbf_get_channel_id(int64_t this_ptr) { LDKTxInitRbf this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxInitRbf_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxInitRbf_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_TxInitRbf_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_TxInitRbf_set_channel_id(int64_t this_ptr, int64_t val) { LDKTxInitRbf this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxInitRbf_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxInitRbf_set_channel_id(&this_ptr_conv, val_conv); } int32_t CS_LDK_TxInitRbf_get_locktime(int64_t this_ptr) { @@ -45615,15 +49230,17 @@ void CS_LDK_TxInitRbf_set_funding_output_contribution(int64_t this_ptr, int64_t TxInitRbf_set_funding_output_contribution(&this_ptr_conv, val_conv); } -int64_t CS_LDK_TxInitRbf_new(int8_tArray channel_id_arg, int32_t locktime_arg, int32_t feerate_sat_per_1000_weight_arg, int64_t funding_output_contribution_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_TxInitRbf_new(int64_t channel_id_arg, int32_t locktime_arg, int32_t feerate_sat_per_1000_weight_arg, int64_t funding_output_contribution_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); void* funding_output_contribution_arg_ptr = untag_ptr(funding_output_contribution_arg); CHECK_ACCESS(funding_output_contribution_arg_ptr); LDKCOption_i64Z funding_output_contribution_arg_conv = *(LDKCOption_i64Z*)(funding_output_contribution_arg_ptr); funding_output_contribution_arg_conv = COption_i64Z_clone((LDKCOption_i64Z*)untag_ptr(funding_output_contribution_arg)); - LDKTxInitRbf ret_var = TxInitRbf_new(channel_id_arg_ref, locktime_arg, feerate_sat_per_1000_weight_arg, funding_output_contribution_arg_conv); + LDKTxInitRbf ret_var = TxInitRbf_new(channel_id_arg_conv, locktime_arg, feerate_sat_per_1000_weight_arg, funding_output_contribution_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -45693,27 +49310,31 @@ void CS_LDK_TxAckRbf_free(int64_t this_obj) { TxAckRbf_free(this_obj_conv); } -int8_tArray CS_LDK_TxAckRbf_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_TxAckRbf_get_channel_id(int64_t this_ptr) { LDKTxAckRbf this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxAckRbf_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxAckRbf_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_TxAckRbf_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_TxAckRbf_set_channel_id(int64_t this_ptr, int64_t val) { LDKTxAckRbf this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxAckRbf_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxAckRbf_set_channel_id(&this_ptr_conv, val_conv); } int64_t CS_LDK_TxAckRbf_get_funding_output_contribution(int64_t this_ptr) { @@ -45741,15 +49362,17 @@ void CS_LDK_TxAckRbf_set_funding_output_contribution(int64_t this_ptr, int64_t TxAckRbf_set_funding_output_contribution(&this_ptr_conv, val_conv); } -int64_t CS_LDK_TxAckRbf_new(int8_tArray channel_id_arg, int64_t funding_output_contribution_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_TxAckRbf_new(int64_t channel_id_arg, int64_t funding_output_contribution_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); void* funding_output_contribution_arg_ptr = untag_ptr(funding_output_contribution_arg); CHECK_ACCESS(funding_output_contribution_arg_ptr); LDKCOption_i64Z funding_output_contribution_arg_conv = *(LDKCOption_i64Z*)(funding_output_contribution_arg_ptr); funding_output_contribution_arg_conv = COption_i64Z_clone((LDKCOption_i64Z*)untag_ptr(funding_output_contribution_arg)); - LDKTxAckRbf ret_var = TxAckRbf_new(channel_id_arg_ref, funding_output_contribution_arg_conv); + LDKTxAckRbf ret_var = TxAckRbf_new(channel_id_arg_conv, funding_output_contribution_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -45819,27 +49442,31 @@ void CS_LDK_TxAbort_free(int64_t this_obj) { TxAbort_free(this_obj_conv); } -int8_tArray CS_LDK_TxAbort_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_TxAbort_get_channel_id(int64_t this_ptr) { LDKTxAbort this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *TxAbort_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = TxAbort_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_TxAbort_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_TxAbort_set_channel_id(int64_t this_ptr, int64_t val) { LDKTxAbort this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - TxAbort_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + TxAbort_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray CS_LDK_TxAbort_get_data(int64_t this_ptr) { @@ -45868,15 +49495,17 @@ void CS_LDK_TxAbort_set_data(int64_t this_ptr, int8_tArray val) { TxAbort_set_data(&this_ptr_conv, val_ref); } -int64_t CS_LDK_TxAbort_new(int8_tArray channel_id_arg, int8_tArray data_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_TxAbort_new(int64_t channel_id_arg, int8_tArray data_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKCVec_u8Z data_arg_ref; data_arg_ref.datalen = data_arg->arr_len; data_arg_ref.data = MALLOC(data_arg_ref.datalen, "LDKCVec_u8Z Bytes"); memcpy(data_arg_ref.data, data_arg->elems, data_arg_ref.datalen); FREE(data_arg); - LDKTxAbort ret_var = TxAbort_new(channel_id_arg_ref, data_arg_ref); + LDKTxAbort ret_var = TxAbort_new(channel_id_arg_conv, data_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -45946,27 +49575,31 @@ void CS_LDK_Shutdown_free(int64_t this_obj) { Shutdown_free(this_obj_conv); } -int8_tArray CS_LDK_Shutdown_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_Shutdown_get_channel_id(int64_t this_ptr) { LDKShutdown this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *Shutdown_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = Shutdown_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_Shutdown_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_Shutdown_set_channel_id(int64_t this_ptr, int64_t val) { LDKShutdown this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - Shutdown_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + Shutdown_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray CS_LDK_Shutdown_get_scriptpubkey(int64_t this_ptr) { @@ -45995,15 +49628,17 @@ void CS_LDK_Shutdown_set_scriptpubkey(int64_t this_ptr, int8_tArray val) { Shutdown_set_scriptpubkey(&this_ptr_conv, val_ref); } -int64_t CS_LDK_Shutdown_new(int8_tArray channel_id_arg, int8_tArray scriptpubkey_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_Shutdown_new(int64_t channel_id_arg, int8_tArray scriptpubkey_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKCVec_u8Z scriptpubkey_arg_ref; scriptpubkey_arg_ref.datalen = scriptpubkey_arg->arr_len; scriptpubkey_arg_ref.data = MALLOC(scriptpubkey_arg_ref.datalen, "LDKCVec_u8Z Bytes"); memcpy(scriptpubkey_arg_ref.data, scriptpubkey_arg->elems, scriptpubkey_arg_ref.datalen); FREE(scriptpubkey_arg); - LDKShutdown ret_var = Shutdown_new(channel_id_arg_ref, scriptpubkey_arg_ref); + LDKShutdown ret_var = Shutdown_new(channel_id_arg_conv, scriptpubkey_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -46182,27 +49817,31 @@ void CS_LDK_ClosingSigned_free(int64_t this_obj) { ClosingSigned_free(this_obj_conv); } -int8_tArray CS_LDK_ClosingSigned_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_ClosingSigned_get_channel_id(int64_t this_ptr) { LDKClosingSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *ClosingSigned_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = ClosingSigned_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_ClosingSigned_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_ClosingSigned_set_channel_id(int64_t this_ptr, int64_t val) { LDKClosingSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - ClosingSigned_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ClosingSigned_set_channel_id(&this_ptr_conv, val_conv); } int64_t CS_LDK_ClosingSigned_get_fee_satoshis(int64_t this_ptr) { @@ -46274,10 +49913,12 @@ void CS_LDK_ClosingSigned_set_fee_range(int64_t this_ptr, int64_t val) { ClosingSigned_set_fee_range(&this_ptr_conv, val_conv); } -int64_t CS_LDK_ClosingSigned_new(int8_tArray channel_id_arg, int64_t fee_satoshis_arg, int8_tArray signature_arg, int64_t fee_range_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_ClosingSigned_new(int64_t channel_id_arg, int64_t fee_satoshis_arg, int8_tArray signature_arg, int64_t fee_range_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKECDSASignature signature_arg_ref; CHECK(signature_arg->arr_len == 64); memcpy(signature_arg_ref.compact_form, signature_arg->elems, 64); FREE(signature_arg); @@ -46286,7 +49927,7 @@ int64_t CS_LDK_ClosingSigned_new(int8_tArray channel_id_arg, int64_t fee_satosh fee_range_arg_conv.is_owned = ptr_is_owned(fee_range_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(fee_range_arg_conv); fee_range_arg_conv = ClosingSignedFeeRange_clone(&fee_range_arg_conv); - LDKClosingSigned ret_var = ClosingSigned_new(channel_id_arg_ref, fee_satoshis_arg, signature_arg_ref, fee_range_arg_conv); + LDKClosingSigned ret_var = ClosingSigned_new(channel_id_arg_conv, fee_satoshis_arg, signature_arg_ref, fee_range_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -46356,27 +49997,31 @@ void CS_LDK_UpdateAddHTLC_free(int64_t this_obj) { UpdateAddHTLC_free(this_obj_conv); } -int8_tArray CS_LDK_UpdateAddHTLC_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_UpdateAddHTLC_get_channel_id(int64_t this_ptr) { LDKUpdateAddHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *UpdateAddHTLC_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = UpdateAddHTLC_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_UpdateAddHTLC_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_UpdateAddHTLC_set_channel_id(int64_t this_ptr, int64_t val) { LDKUpdateAddHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - UpdateAddHTLC_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + UpdateAddHTLC_set_channel_id(&this_ptr_conv, val_conv); } int64_t CS_LDK_UpdateAddHTLC_get_htlc_id(int64_t this_ptr) { @@ -46534,10 +50179,12 @@ void CS_LDK_UpdateAddHTLC_set_blinding_point(int64_t this_ptr, int8_tArray val) UpdateAddHTLC_set_blinding_point(&this_ptr_conv, val_ref); } -int64_t CS_LDK_UpdateAddHTLC_new(int8_tArray channel_id_arg, int64_t htlc_id_arg, int64_t amount_msat_arg, int8_tArray payment_hash_arg, int32_t cltv_expiry_arg, int64_t skimmed_fee_msat_arg, int64_t onion_routing_packet_arg, int8_tArray blinding_point_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_UpdateAddHTLC_new(int64_t channel_id_arg, int64_t htlc_id_arg, int64_t amount_msat_arg, int8_tArray payment_hash_arg, int32_t cltv_expiry_arg, int64_t skimmed_fee_msat_arg, int64_t onion_routing_packet_arg, int8_tArray blinding_point_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes payment_hash_arg_ref; CHECK(payment_hash_arg->arr_len == 32); memcpy(payment_hash_arg_ref.data, payment_hash_arg->elems, 32); FREE(payment_hash_arg); @@ -46553,7 +50200,7 @@ int64_t CS_LDK_UpdateAddHTLC_new(int8_tArray channel_id_arg, int64_t htlc_id_ar LDKPublicKey blinding_point_arg_ref; CHECK(blinding_point_arg->arr_len == 33); memcpy(blinding_point_arg_ref.compressed_form, blinding_point_arg->elems, 33); FREE(blinding_point_arg); - LDKUpdateAddHTLC ret_var = UpdateAddHTLC_new(channel_id_arg_ref, htlc_id_arg, amount_msat_arg, payment_hash_arg_ref, cltv_expiry_arg, skimmed_fee_msat_arg_conv, onion_routing_packet_arg_conv, blinding_point_arg_ref); + LDKUpdateAddHTLC ret_var = UpdateAddHTLC_new(channel_id_arg_conv, htlc_id_arg, amount_msat_arg, payment_hash_arg_ref, cltv_expiry_arg, skimmed_fee_msat_arg_conv, onion_routing_packet_arg_conv, blinding_point_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -46752,27 +50399,31 @@ void CS_LDK_UpdateFulfillHTLC_free(int64_t this_obj) { UpdateFulfillHTLC_free(this_obj_conv); } -int8_tArray CS_LDK_UpdateFulfillHTLC_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_UpdateFulfillHTLC_get_channel_id(int64_t this_ptr) { LDKUpdateFulfillHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *UpdateFulfillHTLC_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = UpdateFulfillHTLC_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_UpdateFulfillHTLC_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_UpdateFulfillHTLC_set_channel_id(int64_t this_ptr, int64_t val) { LDKUpdateFulfillHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - UpdateFulfillHTLC_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + UpdateFulfillHTLC_set_channel_id(&this_ptr_conv, val_conv); } int64_t CS_LDK_UpdateFulfillHTLC_get_htlc_id(int64_t this_ptr) { @@ -46817,14 +50468,16 @@ void CS_LDK_UpdateFulfillHTLC_set_payment_preimage(int64_t this_ptr, int8_tArra UpdateFulfillHTLC_set_payment_preimage(&this_ptr_conv, val_ref); } -int64_t CS_LDK_UpdateFulfillHTLC_new(int8_tArray channel_id_arg, int64_t htlc_id_arg, int8_tArray payment_preimage_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_UpdateFulfillHTLC_new(int64_t channel_id_arg, int64_t htlc_id_arg, int8_tArray payment_preimage_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes payment_preimage_arg_ref; CHECK(payment_preimage_arg->arr_len == 32); memcpy(payment_preimage_arg_ref.data, payment_preimage_arg->elems, 32); FREE(payment_preimage_arg); - LDKUpdateFulfillHTLC ret_var = UpdateFulfillHTLC_new(channel_id_arg_ref, htlc_id_arg, payment_preimage_arg_ref); + LDKUpdateFulfillHTLC ret_var = UpdateFulfillHTLC_new(channel_id_arg_conv, htlc_id_arg, payment_preimage_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -46894,27 +50547,31 @@ void CS_LDK_UpdateFailHTLC_free(int64_t this_obj) { UpdateFailHTLC_free(this_obj_conv); } -int8_tArray CS_LDK_UpdateFailHTLC_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_UpdateFailHTLC_get_channel_id(int64_t this_ptr) { LDKUpdateFailHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *UpdateFailHTLC_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = UpdateFailHTLC_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_UpdateFailHTLC_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_UpdateFailHTLC_set_channel_id(int64_t this_ptr, int64_t val) { LDKUpdateFailHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - UpdateFailHTLC_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + UpdateFailHTLC_set_channel_id(&this_ptr_conv, val_conv); } int64_t CS_LDK_UpdateFailHTLC_get_htlc_id(int64_t this_ptr) { @@ -46999,27 +50656,31 @@ void CS_LDK_UpdateFailMalformedHTLC_free(int64_t this_obj) { UpdateFailMalformedHTLC_free(this_obj_conv); } -int8_tArray CS_LDK_UpdateFailMalformedHTLC_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_UpdateFailMalformedHTLC_get_channel_id(int64_t this_ptr) { LDKUpdateFailMalformedHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *UpdateFailMalformedHTLC_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = UpdateFailMalformedHTLC_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_UpdateFailMalformedHTLC_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_UpdateFailMalformedHTLC_set_channel_id(int64_t this_ptr, int64_t val) { LDKUpdateFailMalformedHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - UpdateFailMalformedHTLC_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + UpdateFailMalformedHTLC_set_channel_id(&this_ptr_conv, val_conv); } int64_t CS_LDK_UpdateFailMalformedHTLC_get_htlc_id(int64_t this_ptr) { @@ -47123,27 +50784,31 @@ void CS_LDK_CommitmentSigned_free(int64_t this_obj) { CommitmentSigned_free(this_obj_conv); } -int8_tArray CS_LDK_CommitmentSigned_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_CommitmentSigned_get_channel_id(int64_t this_ptr) { LDKCommitmentSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *CommitmentSigned_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = CommitmentSigned_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_CommitmentSigned_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_CommitmentSigned_set_channel_id(int64_t this_ptr, int64_t val) { LDKCommitmentSigned this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - CommitmentSigned_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + CommitmentSigned_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray CS_LDK_CommitmentSigned_get_signature(int64_t this_ptr) { @@ -47213,10 +50878,12 @@ void CS_LDK_CommitmentSigned_set_htlc_signatures(int64_t this_ptr, ptrArray val CommitmentSigned_set_htlc_signatures(&this_ptr_conv, val_constr); } -int64_t CS_LDK_CommitmentSigned_new(int8_tArray channel_id_arg, int8_tArray signature_arg, ptrArray htlc_signatures_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_CommitmentSigned_new(int64_t channel_id_arg, int8_tArray signature_arg, ptrArray htlc_signatures_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKECDSASignature signature_arg_ref; CHECK(signature_arg->arr_len == 64); memcpy(signature_arg_ref.compact_form, signature_arg->elems, 64); FREE(signature_arg); @@ -47235,7 +50902,7 @@ int64_t CS_LDK_CommitmentSigned_new(int8_tArray channel_id_arg, int8_tArray sig htlc_signatures_arg_constr.data[i] = htlc_signatures_arg_conv_8_ref; } FREE(htlc_signatures_arg); - LDKCommitmentSigned ret_var = CommitmentSigned_new(channel_id_arg_ref, signature_arg_ref, htlc_signatures_arg_constr); + LDKCommitmentSigned ret_var = CommitmentSigned_new(channel_id_arg_conv, signature_arg_ref, htlc_signatures_arg_constr); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -47305,27 +50972,31 @@ void CS_LDK_RevokeAndACK_free(int64_t this_obj) { RevokeAndACK_free(this_obj_conv); } -int8_tArray CS_LDK_RevokeAndACK_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_RevokeAndACK_get_channel_id(int64_t this_ptr) { LDKRevokeAndACK this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *RevokeAndACK_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = RevokeAndACK_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_RevokeAndACK_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_RevokeAndACK_set_channel_id(int64_t this_ptr, int64_t val) { LDKRevokeAndACK this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - RevokeAndACK_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + RevokeAndACK_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray CS_LDK_RevokeAndACK_get_per_commitment_secret(int64_t this_ptr) { @@ -47374,17 +51045,19 @@ void CS_LDK_RevokeAndACK_set_next_per_commitment_point(int64_t this_ptr, int8_t RevokeAndACK_set_next_per_commitment_point(&this_ptr_conv, val_ref); } -int64_t CS_LDK_RevokeAndACK_new(int8_tArray channel_id_arg, int8_tArray per_commitment_secret_arg, int8_tArray next_per_commitment_point_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_RevokeAndACK_new(int64_t channel_id_arg, int8_tArray per_commitment_secret_arg, int8_tArray next_per_commitment_point_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes per_commitment_secret_arg_ref; CHECK(per_commitment_secret_arg->arr_len == 32); memcpy(per_commitment_secret_arg_ref.data, per_commitment_secret_arg->elems, 32); FREE(per_commitment_secret_arg); LDKPublicKey next_per_commitment_point_arg_ref; CHECK(next_per_commitment_point_arg->arr_len == 33); memcpy(next_per_commitment_point_arg_ref.compressed_form, next_per_commitment_point_arg->elems, 33); FREE(next_per_commitment_point_arg); - LDKRevokeAndACK ret_var = RevokeAndACK_new(channel_id_arg_ref, per_commitment_secret_arg_ref, next_per_commitment_point_arg_ref); + LDKRevokeAndACK ret_var = RevokeAndACK_new(channel_id_arg_conv, per_commitment_secret_arg_ref, next_per_commitment_point_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -47454,27 +51127,31 @@ void CS_LDK_UpdateFee_free(int64_t this_obj) { UpdateFee_free(this_obj_conv); } -int8_tArray CS_LDK_UpdateFee_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_UpdateFee_get_channel_id(int64_t this_ptr) { LDKUpdateFee this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *UpdateFee_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = UpdateFee_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_UpdateFee_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_UpdateFee_set_channel_id(int64_t this_ptr, int64_t val) { LDKUpdateFee this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - UpdateFee_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + UpdateFee_set_channel_id(&this_ptr_conv, val_conv); } int32_t CS_LDK_UpdateFee_get_feerate_per_kw(int64_t this_ptr) { @@ -47496,11 +51173,13 @@ void CS_LDK_UpdateFee_set_feerate_per_kw(int64_t this_ptr, int32_t val) { UpdateFee_set_feerate_per_kw(&this_ptr_conv, val); } -int64_t CS_LDK_UpdateFee_new(int8_tArray channel_id_arg, int32_t feerate_per_kw_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); - LDKUpdateFee ret_var = UpdateFee_new(channel_id_arg_ref, feerate_per_kw_arg); +int64_t CS_LDK_UpdateFee_new(int64_t channel_id_arg, int32_t feerate_per_kw_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); + LDKUpdateFee ret_var = UpdateFee_new(channel_id_arg_conv, feerate_per_kw_arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -47570,27 +51249,31 @@ void CS_LDK_ChannelReestablish_free(int64_t this_obj) { ChannelReestablish_free(this_obj_conv); } -int8_tArray CS_LDK_ChannelReestablish_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_ChannelReestablish_get_channel_id(int64_t this_ptr) { LDKChannelReestablish this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *ChannelReestablish_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = ChannelReestablish_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_ChannelReestablish_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_ChannelReestablish_set_channel_id(int64_t this_ptr, int64_t val) { LDKChannelReestablish this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - ChannelReestablish_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ChannelReestablish_set_channel_id(&this_ptr_conv, val_conv); } int64_t CS_LDK_ChannelReestablish_get_next_local_commitment_number(int64_t this_ptr) { @@ -47702,10 +51385,12 @@ void CS_LDK_ChannelReestablish_set_next_funding_txid(int64_t this_ptr, int64_t ChannelReestablish_set_next_funding_txid(&this_ptr_conv, val_conv); } -int64_t CS_LDK_ChannelReestablish_new(int8_tArray channel_id_arg, int64_t next_local_commitment_number_arg, int64_t next_remote_commitment_number_arg, int8_tArray your_last_per_commitment_secret_arg, int8_tArray my_current_per_commitment_point_arg, int64_t next_funding_txid_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_ChannelReestablish_new(int64_t channel_id_arg, int64_t next_local_commitment_number_arg, int64_t next_remote_commitment_number_arg, int8_tArray your_last_per_commitment_secret_arg, int8_tArray my_current_per_commitment_point_arg, int64_t next_funding_txid_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKThirtyTwoBytes your_last_per_commitment_secret_arg_ref; CHECK(your_last_per_commitment_secret_arg->arr_len == 32); memcpy(your_last_per_commitment_secret_arg_ref.data, your_last_per_commitment_secret_arg->elems, 32); FREE(your_last_per_commitment_secret_arg); @@ -47716,7 +51401,7 @@ int64_t CS_LDK_ChannelReestablish_new(int8_tArray channel_id_arg, int64_t next_ CHECK_ACCESS(next_funding_txid_arg_ptr); LDKCOption_ThirtyTwoBytesZ next_funding_txid_arg_conv = *(LDKCOption_ThirtyTwoBytesZ*)(next_funding_txid_arg_ptr); next_funding_txid_arg_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(next_funding_txid_arg)); - LDKChannelReestablish ret_var = ChannelReestablish_new(channel_id_arg_ref, next_local_commitment_number_arg, next_remote_commitment_number_arg, your_last_per_commitment_secret_arg_ref, my_current_per_commitment_point_arg_ref, next_funding_txid_arg_conv); + LDKChannelReestablish ret_var = ChannelReestablish_new(channel_id_arg_conv, next_local_commitment_number_arg, next_remote_commitment_number_arg, your_last_per_commitment_secret_arg_ref, my_current_per_commitment_point_arg_ref, next_funding_txid_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -47786,27 +51471,31 @@ void CS_LDK_AnnouncementSignatures_free(int64_t this_obj) { AnnouncementSignatures_free(this_obj_conv); } -int8_tArray CS_LDK_AnnouncementSignatures_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_AnnouncementSignatures_get_channel_id(int64_t this_ptr) { LDKAnnouncementSignatures this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *AnnouncementSignatures_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = AnnouncementSignatures_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_AnnouncementSignatures_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_AnnouncementSignatures_set_channel_id(int64_t this_ptr, int64_t val) { LDKAnnouncementSignatures this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - AnnouncementSignatures_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + AnnouncementSignatures_set_channel_id(&this_ptr_conv, val_conv); } int64_t CS_LDK_AnnouncementSignatures_get_short_channel_id(int64_t this_ptr) { @@ -47874,17 +51563,19 @@ void CS_LDK_AnnouncementSignatures_set_bitcoin_signature(int64_t this_ptr, int8 AnnouncementSignatures_set_bitcoin_signature(&this_ptr_conv, val_ref); } -int64_t CS_LDK_AnnouncementSignatures_new(int8_tArray channel_id_arg, int64_t short_channel_id_arg, int8_tArray node_signature_arg, int8_tArray bitcoin_signature_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_AnnouncementSignatures_new(int64_t channel_id_arg, int64_t short_channel_id_arg, int8_tArray node_signature_arg, int8_tArray bitcoin_signature_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKECDSASignature node_signature_arg_ref; CHECK(node_signature_arg->arr_len == 64); memcpy(node_signature_arg_ref.compact_form, node_signature_arg->elems, 64); FREE(node_signature_arg); LDKECDSASignature bitcoin_signature_arg_ref; CHECK(bitcoin_signature_arg->arr_len == 64); memcpy(bitcoin_signature_arg_ref.compact_form, bitcoin_signature_arg->elems, 64); FREE(bitcoin_signature_arg); - LDKAnnouncementSignatures ret_var = AnnouncementSignatures_new(channel_id_arg_ref, short_channel_id_arg, node_signature_arg_ref, bitcoin_signature_arg_ref); + LDKAnnouncementSignatures ret_var = AnnouncementSignatures_new(channel_id_arg_conv, short_channel_id_arg, node_signature_arg_ref, bitcoin_signature_arg_ref); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -48371,6 +52062,107 @@ void CS_LDK_UnsignedNodeAnnouncement_set_addresses(int64_t this_ptr, int64_tArr UnsignedNodeAnnouncement_set_addresses(&this_ptr_conv, val_constr); } +int8_tArray CS_LDK_UnsignedNodeAnnouncement_get_excess_address_data(int64_t this_ptr) { + LDKUnsignedNodeAnnouncement this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z ret_var = UnsignedNodeAnnouncement_get_excess_address_data(&this_ptr_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +void CS_LDK_UnsignedNodeAnnouncement_set_excess_address_data(int64_t this_ptr, int8_tArray val) { + LDKUnsignedNodeAnnouncement this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z val_ref; + val_ref.datalen = val->arr_len; + val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(val_ref.data, val->elems, val_ref.datalen); FREE(val); + UnsignedNodeAnnouncement_set_excess_address_data(&this_ptr_conv, val_ref); +} + +int8_tArray CS_LDK_UnsignedNodeAnnouncement_get_excess_data(int64_t this_ptr) { + LDKUnsignedNodeAnnouncement this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z ret_var = UnsignedNodeAnnouncement_get_excess_data(&this_ptr_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +void CS_LDK_UnsignedNodeAnnouncement_set_excess_data(int64_t this_ptr, int8_tArray val) { + LDKUnsignedNodeAnnouncement this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z val_ref; + val_ref.datalen = val->arr_len; + val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(val_ref.data, val->elems, val_ref.datalen); FREE(val); + UnsignedNodeAnnouncement_set_excess_data(&this_ptr_conv, val_ref); +} + +int64_t CS_LDK_UnsignedNodeAnnouncement_new(int64_t features_arg, int32_t timestamp_arg, int64_t node_id_arg, int8_tArray rgb_arg, int64_t alias_arg, int64_tArray addresses_arg, int8_tArray excess_address_data_arg, int8_tArray excess_data_arg) { + LDKNodeFeatures features_arg_conv; + features_arg_conv.inner = untag_ptr(features_arg); + features_arg_conv.is_owned = ptr_is_owned(features_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(features_arg_conv); + features_arg_conv = NodeFeatures_clone(&features_arg_conv); + LDKNodeId node_id_arg_conv; + node_id_arg_conv.inner = untag_ptr(node_id_arg); + node_id_arg_conv.is_owned = ptr_is_owned(node_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(node_id_arg_conv); + node_id_arg_conv = NodeId_clone(&node_id_arg_conv); + LDKThreeBytes rgb_arg_ref; + CHECK(rgb_arg->arr_len == 3); + memcpy(rgb_arg_ref.data, rgb_arg->elems, 3); FREE(rgb_arg); + LDKNodeAlias alias_arg_conv; + alias_arg_conv.inner = untag_ptr(alias_arg); + alias_arg_conv.is_owned = ptr_is_owned(alias_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(alias_arg_conv); + alias_arg_conv = NodeAlias_clone(&alias_arg_conv); + LDKCVec_SocketAddressZ addresses_arg_constr; + addresses_arg_constr.datalen = addresses_arg->arr_len; + if (addresses_arg_constr.datalen > 0) + addresses_arg_constr.data = MALLOC(addresses_arg_constr.datalen * sizeof(LDKSocketAddress), "LDKCVec_SocketAddressZ Elements"); + else + addresses_arg_constr.data = NULL; + int64_t* addresses_arg_vals = addresses_arg->elems; + for (size_t p = 0; p < addresses_arg_constr.datalen; p++) { + int64_t addresses_arg_conv_15 = addresses_arg_vals[p]; + void* addresses_arg_conv_15_ptr = untag_ptr(addresses_arg_conv_15); + CHECK_ACCESS(addresses_arg_conv_15_ptr); + LDKSocketAddress addresses_arg_conv_15_conv = *(LDKSocketAddress*)(addresses_arg_conv_15_ptr); + addresses_arg_constr.data[p] = addresses_arg_conv_15_conv; + } + FREE(addresses_arg); + LDKCVec_u8Z excess_address_data_arg_ref; + excess_address_data_arg_ref.datalen = excess_address_data_arg->arr_len; + excess_address_data_arg_ref.data = MALLOC(excess_address_data_arg_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(excess_address_data_arg_ref.data, excess_address_data_arg->elems, excess_address_data_arg_ref.datalen); FREE(excess_address_data_arg); + LDKCVec_u8Z excess_data_arg_ref; + excess_data_arg_ref.datalen = excess_data_arg->arr_len; + excess_data_arg_ref.data = MALLOC(excess_data_arg_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(excess_data_arg_ref.data, excess_data_arg->elems, excess_data_arg_ref.datalen); FREE(excess_data_arg); + LDKUnsignedNodeAnnouncement ret_var = UnsignedNodeAnnouncement_new(features_arg_conv, timestamp_arg, node_id_arg_conv, rgb_arg_ref, alias_arg_conv, addresses_arg_constr, excess_address_data_arg_ref, excess_data_arg_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + static inline uint64_t UnsignedNodeAnnouncement_clone_ptr(LDKUnsignedNodeAnnouncement *NONNULL_PTR arg) { LDKUnsignedNodeAnnouncement ret_var = UnsignedNodeAnnouncement_clone(arg); int64_t ret_ref = 0; @@ -51063,6 +54855,191 @@ jboolean CS_LDK_OnionPacket_eq(int64_t a, int64_t b) { return ret_conv; } +void CS_LDK_TrampolineOnionPacket_free(int64_t this_obj) { + LDKTrampolineOnionPacket this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + TrampolineOnionPacket_free(this_obj_conv); +} + +int8_t CS_LDK_TrampolineOnionPacket_get_version(int64_t this_ptr) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_t ret_conv = TrampolineOnionPacket_get_version(&this_ptr_conv); + return ret_conv; +} + +void CS_LDK_TrampolineOnionPacket_set_version(int64_t this_ptr, int8_t val) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + TrampolineOnionPacket_set_version(&this_ptr_conv, val); +} + +int8_tArray CS_LDK_TrampolineOnionPacket_get_public_key(int64_t this_ptr) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(33, __LINE__); + memcpy(ret_arr->elems, TrampolineOnionPacket_get_public_key(&this_ptr_conv).compressed_form, 33); + return ret_arr; +} + +void CS_LDK_TrampolineOnionPacket_set_public_key(int64_t this_ptr, int8_tArray val) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKPublicKey val_ref; + CHECK(val->arr_len == 33); + memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); + TrampolineOnionPacket_set_public_key(&this_ptr_conv, val_ref); +} + +int8_tArray CS_LDK_TrampolineOnionPacket_get_hop_data(int64_t this_ptr) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z ret_var = TrampolineOnionPacket_get_hop_data(&this_ptr_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +void CS_LDK_TrampolineOnionPacket_set_hop_data(int64_t this_ptr, int8_tArray val) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCVec_u8Z val_ref; + val_ref.datalen = val->arr_len; + val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(val_ref.data, val->elems, val_ref.datalen); FREE(val); + TrampolineOnionPacket_set_hop_data(&this_ptr_conv, val_ref); +} + +int8_tArray CS_LDK_TrampolineOnionPacket_get_hmac(int64_t this_ptr) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(32, __LINE__); + memcpy(ret_arr->elems, *TrampolineOnionPacket_get_hmac(&this_ptr_conv), 32); + return ret_arr; +} + +void CS_LDK_TrampolineOnionPacket_set_hmac(int64_t this_ptr, int8_tArray val) { + LDKTrampolineOnionPacket this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKThirtyTwoBytes val_ref; + CHECK(val->arr_len == 32); + memcpy(val_ref.data, val->elems, 32); FREE(val); + TrampolineOnionPacket_set_hmac(&this_ptr_conv, val_ref); +} + +int64_t CS_LDK_TrampolineOnionPacket_new(int8_t version_arg, int8_tArray public_key_arg, int8_tArray hop_data_arg, int8_tArray hmac_arg) { + LDKPublicKey public_key_arg_ref; + CHECK(public_key_arg->arr_len == 33); + memcpy(public_key_arg_ref.compressed_form, public_key_arg->elems, 33); FREE(public_key_arg); + LDKCVec_u8Z hop_data_arg_ref; + hop_data_arg_ref.datalen = hop_data_arg->arr_len; + hop_data_arg_ref.data = MALLOC(hop_data_arg_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(hop_data_arg_ref.data, hop_data_arg->elems, hop_data_arg_ref.datalen); FREE(hop_data_arg); + LDKThirtyTwoBytes hmac_arg_ref; + CHECK(hmac_arg->arr_len == 32); + memcpy(hmac_arg_ref.data, hmac_arg->elems, 32); FREE(hmac_arg); + LDKTrampolineOnionPacket ret_var = TrampolineOnionPacket_new(version_arg, public_key_arg_ref, hop_data_arg_ref, hmac_arg_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t TrampolineOnionPacket_clone_ptr(LDKTrampolineOnionPacket *NONNULL_PTR arg) { + LDKTrampolineOnionPacket ret_var = TrampolineOnionPacket_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t CS_LDK_TrampolineOnionPacket_clone_ptr(int64_t arg) { + LDKTrampolineOnionPacket arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = TrampolineOnionPacket_clone_ptr(&arg_conv); + return ret_conv; +} + +int64_t CS_LDK_TrampolineOnionPacket_clone(int64_t orig) { + LDKTrampolineOnionPacket orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKTrampolineOnionPacket ret_var = TrampolineOnionPacket_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_TrampolineOnionPacket_hash(int64_t o) { + LDKTrampolineOnionPacket o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = TrampolineOnionPacket_hash(&o_conv); + return ret_conv; +} + +jboolean CS_LDK_TrampolineOnionPacket_eq(int64_t a, int64_t b) { + LDKTrampolineOnionPacket a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKTrampolineOnionPacket b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = TrampolineOnionPacket_eq(&a_conv, &b_conv); + return ret_conv; +} + +int8_tArray CS_LDK_TrampolineOnionPacket_write(int64_t obj) { + LDKTrampolineOnionPacket obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = TrampolineOnionPacket_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + int8_tArray CS_LDK_AcceptChannel_write(int64_t obj) { LDKAcceptChannel obj_conv; obj_conv.inner = untag_ptr(obj); @@ -52580,6 +56557,127 @@ void CS_LDK_SocketDescriptor_free(int64_t this_ptr) { SocketDescriptor_free(this_ptr_conv); } +void CS_LDK_PeerDetails_free(int64_t this_obj) { + LDKPeerDetails this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + PeerDetails_free(this_obj_conv); +} + +int8_tArray CS_LDK_PeerDetails_get_counterparty_node_id(int64_t this_ptr) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(33, __LINE__); + memcpy(ret_arr->elems, PeerDetails_get_counterparty_node_id(&this_ptr_conv).compressed_form, 33); + return ret_arr; +} + +void CS_LDK_PeerDetails_set_counterparty_node_id(int64_t this_ptr, int8_tArray val) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKPublicKey val_ref; + CHECK(val->arr_len == 33); + memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); + PeerDetails_set_counterparty_node_id(&this_ptr_conv, val_ref); +} + +int64_t CS_LDK_PeerDetails_get_socket_address(int64_t this_ptr) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCOption_SocketAddressZ *ret_copy = MALLOC(sizeof(LDKCOption_SocketAddressZ), "LDKCOption_SocketAddressZ"); + *ret_copy = PeerDetails_get_socket_address(&this_ptr_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void CS_LDK_PeerDetails_set_socket_address(int64_t this_ptr, int64_t val) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKCOption_SocketAddressZ val_conv = *(LDKCOption_SocketAddressZ*)(val_ptr); + val_conv = COption_SocketAddressZ_clone((LDKCOption_SocketAddressZ*)untag_ptr(val)); + PeerDetails_set_socket_address(&this_ptr_conv, val_conv); +} + +int64_t CS_LDK_PeerDetails_get_init_features(int64_t this_ptr) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKInitFeatures ret_var = PeerDetails_get_init_features(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void CS_LDK_PeerDetails_set_init_features(int64_t this_ptr, int64_t val) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKInitFeatures val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = InitFeatures_clone(&val_conv); + PeerDetails_set_init_features(&this_ptr_conv, val_conv); +} + +jboolean CS_LDK_PeerDetails_get_is_inbound_connection(int64_t this_ptr) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + jboolean ret_conv = PeerDetails_get_is_inbound_connection(&this_ptr_conv); + return ret_conv; +} + +void CS_LDK_PeerDetails_set_is_inbound_connection(int64_t this_ptr, jboolean val) { + LDKPeerDetails this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + PeerDetails_set_is_inbound_connection(&this_ptr_conv, val); +} + +int64_t CS_LDK_PeerDetails_new(int8_tArray counterparty_node_id_arg, int64_t socket_address_arg, int64_t init_features_arg, jboolean is_inbound_connection_arg) { + LDKPublicKey counterparty_node_id_arg_ref; + CHECK(counterparty_node_id_arg->arr_len == 33); + memcpy(counterparty_node_id_arg_ref.compressed_form, counterparty_node_id_arg->elems, 33); FREE(counterparty_node_id_arg); + void* socket_address_arg_ptr = untag_ptr(socket_address_arg); + CHECK_ACCESS(socket_address_arg_ptr); + LDKCOption_SocketAddressZ socket_address_arg_conv = *(LDKCOption_SocketAddressZ*)(socket_address_arg_ptr); + LDKInitFeatures init_features_arg_conv; + init_features_arg_conv.inner = untag_ptr(init_features_arg); + init_features_arg_conv.is_owned = ptr_is_owned(init_features_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(init_features_arg_conv); + init_features_arg_conv = InitFeatures_clone(&init_features_arg_conv); + LDKPeerDetails ret_var = PeerDetails_new(counterparty_node_id_arg_ref, socket_address_arg_conv, init_features_arg_conv, is_inbound_connection_arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + void CS_LDK_PeerHandleError_free(int64_t this_obj) { LDKPeerHandleError this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -52666,26 +56764,44 @@ int64_t CS_LDK_PeerManager_new(int64_t message_handler, int32_t current_time, i return ret_ref; } -int64_tArray CS_LDK_PeerManager_get_peer_node_ids(int64_t this_arg) { +int64_tArray CS_LDK_PeerManager_list_peers(int64_t this_arg) { LDKPeerManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ ret_var = PeerManager_get_peer_node_ids(&this_arg_conv); + LDKCVec_PeerDetailsZ ret_var = PeerManager_list_peers(&this_arg_conv); int64_tArray ret_arr = NULL; ret_arr = init_int64_tArray(ret_var.datalen, __LINE__); int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8); - for (size_t r = 0; r < ret_var.datalen; r++) { - LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv_43_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ"); - *ret_conv_43_conv = ret_var.data[r]; - ret_arr_ptr[r] = tag_ptr(ret_conv_43_conv, true); + for (size_t n = 0; n < ret_var.datalen; n++) { + LDKPeerDetails ret_conv_13_var = ret_var.data[n]; + int64_t ret_conv_13_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_13_var); + ret_conv_13_ref = tag_ptr(ret_conv_13_var.inner, ret_conv_13_var.is_owned); + ret_arr_ptr[n] = ret_conv_13_ref; } FREE(ret_var.data); return ret_arr; } +int64_t CS_LDK_PeerManager_peer_by_node_id(int64_t this_arg, int8_tArray their_node_id) { + LDKPeerManager this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKPublicKey their_node_id_ref; + CHECK(their_node_id->arr_len == 33); + memcpy(their_node_id_ref.compressed_form, their_node_id->elems, 33); FREE(their_node_id); + LDKPeerDetails ret_var = PeerManager_peer_by_node_id(&this_arg_conv, their_node_id_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + int64_t CS_LDK_PeerManager_new_outbound_connection(int64_t this_arg, int8_tArray their_node_id, int64_t descriptor, int64_t remote_network_address) { LDKPeerManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -58518,6 +62634,120 @@ jboolean CS_LDK_NodeFeatures_requires_keysend(int64_t this_arg) { return ret_conv; } +void CS_LDK_InitFeatures_set_trampoline_routing_optional(int64_t this_arg) { + LDKInitFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + InitFeatures_set_trampoline_routing_optional(&this_arg_conv); +} + +void CS_LDK_InitFeatures_set_trampoline_routing_required(int64_t this_arg) { + LDKInitFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + InitFeatures_set_trampoline_routing_required(&this_arg_conv); +} + +jboolean CS_LDK_InitFeatures_supports_trampoline_routing(int64_t this_arg) { + LDKInitFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = InitFeatures_supports_trampoline_routing(&this_arg_conv); + return ret_conv; +} + +void CS_LDK_NodeFeatures_set_trampoline_routing_optional(int64_t this_arg) { + LDKNodeFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + NodeFeatures_set_trampoline_routing_optional(&this_arg_conv); +} + +void CS_LDK_NodeFeatures_set_trampoline_routing_required(int64_t this_arg) { + LDKNodeFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + NodeFeatures_set_trampoline_routing_required(&this_arg_conv); +} + +jboolean CS_LDK_NodeFeatures_supports_trampoline_routing(int64_t this_arg) { + LDKNodeFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = NodeFeatures_supports_trampoline_routing(&this_arg_conv); + return ret_conv; +} + +void CS_LDK_Bolt11InvoiceFeatures_set_trampoline_routing_optional(int64_t this_arg) { + LDKBolt11InvoiceFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + Bolt11InvoiceFeatures_set_trampoline_routing_optional(&this_arg_conv); +} + +void CS_LDK_Bolt11InvoiceFeatures_set_trampoline_routing_required(int64_t this_arg) { + LDKBolt11InvoiceFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + Bolt11InvoiceFeatures_set_trampoline_routing_required(&this_arg_conv); +} + +jboolean CS_LDK_Bolt11InvoiceFeatures_supports_trampoline_routing(int64_t this_arg) { + LDKBolt11InvoiceFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = Bolt11InvoiceFeatures_supports_trampoline_routing(&this_arg_conv); + return ret_conv; +} + +jboolean CS_LDK_InitFeatures_requires_trampoline_routing(int64_t this_arg) { + LDKInitFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = InitFeatures_requires_trampoline_routing(&this_arg_conv); + return ret_conv; +} + +jboolean CS_LDK_NodeFeatures_requires_trampoline_routing(int64_t this_arg) { + LDKNodeFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = NodeFeatures_requires_trampoline_routing(&this_arg_conv); + return ret_conv; +} + +jboolean CS_LDK_Bolt11InvoiceFeatures_requires_trampoline_routing(int64_t this_arg) { + LDKBolt11InvoiceFeatures this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = Bolt11InvoiceFeatures_requires_trampoline_routing(&this_arg_conv); + return ret_conv; +} + void CS_LDK_ShutdownScript_free(int64_t this_obj) { LDKShutdownScript this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -58743,6 +62973,222 @@ jboolean CS_LDK_ShutdownScript_is_compatible(int64_t this_arg, int64_t features return ret_conv; } +void CS_LDK_ChannelId_free(int64_t this_obj) { + LDKChannelId this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + ChannelId_free(this_obj_conv); +} + +int8_tArray CS_LDK_ChannelId_get_a(int64_t this_ptr) { + LDKChannelId this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(32, __LINE__); + memcpy(ret_arr->elems, *ChannelId_get_a(&this_ptr_conv), 32); + return ret_arr; +} + +void CS_LDK_ChannelId_set_a(int64_t this_ptr, int8_tArray val) { + LDKChannelId this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKThirtyTwoBytes val_ref; + CHECK(val->arr_len == 32); + memcpy(val_ref.data, val->elems, 32); FREE(val); + ChannelId_set_a(&this_ptr_conv, val_ref); +} + +int64_t CS_LDK_ChannelId_new(int8_tArray a_arg) { + LDKThirtyTwoBytes a_arg_ref; + CHECK(a_arg->arr_len == 32); + memcpy(a_arg_ref.data, a_arg->elems, 32); FREE(a_arg); + LDKChannelId ret_var = ChannelId_new(a_arg_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t ChannelId_clone_ptr(LDKChannelId *NONNULL_PTR arg) { + LDKChannelId ret_var = ChannelId_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t CS_LDK_ChannelId_clone_ptr(int64_t arg) { + LDKChannelId arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = ChannelId_clone_ptr(&arg_conv); + return ret_conv; +} + +int64_t CS_LDK_ChannelId_clone(int64_t orig) { + LDKChannelId orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKChannelId ret_var = ChannelId_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +jboolean CS_LDK_ChannelId_eq(int64_t a, int64_t b) { + LDKChannelId a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKChannelId b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = ChannelId_eq(&a_conv, &b_conv); + return ret_conv; +} + +int64_t CS_LDK_ChannelId_hash(int64_t o) { + LDKChannelId o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = ChannelId_hash(&o_conv); + return ret_conv; +} + +int64_t CS_LDK_ChannelId_v1_from_funding_txid(int8_tArray txid, int16_t output_index) { + uint8_t txid_arr[32]; + CHECK(txid->arr_len == 32); + memcpy(txid_arr, txid->elems, 32); FREE(txid); + uint8_t (*txid_ref)[32] = &txid_arr; + LDKChannelId ret_var = ChannelId_v1_from_funding_txid(txid_ref, output_index); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_ChannelId_v1_from_funding_outpoint(int64_t outpoint) { + LDKOutPoint outpoint_conv; + outpoint_conv.inner = untag_ptr(outpoint); + outpoint_conv.is_owned = ptr_is_owned(outpoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_conv); + outpoint_conv = OutPoint_clone(&outpoint_conv); + LDKChannelId ret_var = ChannelId_v1_from_funding_outpoint(outpoint_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_ChannelId_temporary_from_entropy_source(int64_t entropy_source) { + void* entropy_source_ptr = untag_ptr(entropy_source); + if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } + LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + LDKChannelId ret_var = ChannelId_temporary_from_entropy_source(entropy_source_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_ChannelId_from_bytes(int8_tArray data) { + LDKThirtyTwoBytes data_ref; + CHECK(data->arr_len == 32); + memcpy(data_ref.data, data->elems, 32); FREE(data); + LDKChannelId ret_var = ChannelId_from_bytes(data_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_ChannelId_new_zero() { + LDKChannelId ret_var = ChannelId_new_zero(); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +jboolean CS_LDK_ChannelId_is_zero(int64_t this_arg) { + LDKChannelId this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = ChannelId_is_zero(&this_arg_conv); + return ret_conv; +} + +int64_t CS_LDK_ChannelId_v2_from_revocation_basepoints(int64_t ours, int64_t theirs) { + LDKRevocationBasepoint ours_conv; + ours_conv.inner = untag_ptr(ours); + ours_conv.is_owned = ptr_is_owned(ours); + CHECK_INNER_FIELD_ACCESS_OR_NULL(ours_conv); + ours_conv.is_owned = false; + LDKRevocationBasepoint theirs_conv; + theirs_conv.inner = untag_ptr(theirs); + theirs_conv.is_owned = ptr_is_owned(theirs); + CHECK_INNER_FIELD_ACCESS_OR_NULL(theirs_conv); + theirs_conv.is_owned = false; + LDKChannelId ret_var = ChannelId_v2_from_revocation_basepoints(&ours_conv, &theirs_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_ChannelId_temporary_v2_from_revocation_basepoint(int64_t our_revocation_basepoint) { + LDKRevocationBasepoint our_revocation_basepoint_conv; + our_revocation_basepoint_conv.inner = untag_ptr(our_revocation_basepoint); + our_revocation_basepoint_conv.is_owned = ptr_is_owned(our_revocation_basepoint); + CHECK_INNER_FIELD_ACCESS_OR_NULL(our_revocation_basepoint_conv); + our_revocation_basepoint_conv.is_owned = false; + LDKChannelId ret_var = ChannelId_temporary_v2_from_revocation_basepoint(&our_revocation_basepoint_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int8_tArray CS_LDK_ChannelId_write(int64_t obj) { + LDKChannelId obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = ChannelId_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +int64_t CS_LDK_ChannelId_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ"); + *ret_conv = ChannelId_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + void CS_LDK_Retry_free(int64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -59262,6 +63708,413 @@ void CS_LDK_Type_free(int64_t this_ptr) { Type_free(this_ptr_conv); } +void CS_LDK_OfferId_free(int64_t this_obj) { + LDKOfferId this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + OfferId_free(this_obj_conv); +} + +int8_tArray CS_LDK_OfferId_get_a(int64_t this_ptr) { + LDKOfferId this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(32, __LINE__); + memcpy(ret_arr->elems, *OfferId_get_a(&this_ptr_conv), 32); + return ret_arr; +} + +void CS_LDK_OfferId_set_a(int64_t this_ptr, int8_tArray val) { + LDKOfferId this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKThirtyTwoBytes val_ref; + CHECK(val->arr_len == 32); + memcpy(val_ref.data, val->elems, 32); FREE(val); + OfferId_set_a(&this_ptr_conv, val_ref); +} + +int64_t CS_LDK_OfferId_new(int8_tArray a_arg) { + LDKThirtyTwoBytes a_arg_ref; + CHECK(a_arg->arr_len == 32); + memcpy(a_arg_ref.data, a_arg->elems, 32); FREE(a_arg); + LDKOfferId ret_var = OfferId_new(a_arg_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t OfferId_clone_ptr(LDKOfferId *NONNULL_PTR arg) { + LDKOfferId ret_var = OfferId_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t CS_LDK_OfferId_clone_ptr(int64_t arg) { + LDKOfferId arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = OfferId_clone_ptr(&arg_conv); + return ret_conv; +} + +int64_t CS_LDK_OfferId_clone(int64_t orig) { + LDKOfferId orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKOfferId ret_var = OfferId_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +jboolean CS_LDK_OfferId_eq(int64_t a, int64_t b) { + LDKOfferId a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKOfferId b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = OfferId_eq(&a_conv, &b_conv); + return ret_conv; +} + +int8_tArray CS_LDK_OfferId_write(int64_t obj) { + LDKOfferId obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = OfferId_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +int64_t CS_LDK_OfferId_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ"); + *ret_conv = OfferId_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + +void CS_LDK_OfferWithExplicitMetadataBuilder_free(int64_t this_obj) { + LDKOfferWithExplicitMetadataBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + OfferWithExplicitMetadataBuilder_free(this_obj_conv); +} + +static inline uint64_t OfferWithExplicitMetadataBuilder_clone_ptr(LDKOfferWithExplicitMetadataBuilder *NONNULL_PTR arg) { + LDKOfferWithExplicitMetadataBuilder ret_var = OfferWithExplicitMetadataBuilder_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t CS_LDK_OfferWithExplicitMetadataBuilder_clone_ptr(int64_t arg) { + LDKOfferWithExplicitMetadataBuilder arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = OfferWithExplicitMetadataBuilder_clone_ptr(&arg_conv); + return ret_conv; +} + +int64_t CS_LDK_OfferWithExplicitMetadataBuilder_clone(int64_t orig) { + LDKOfferWithExplicitMetadataBuilder orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKOfferWithExplicitMetadataBuilder ret_var = OfferWithExplicitMetadataBuilder_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void CS_LDK_OfferWithDerivedMetadataBuilder_free(int64_t this_obj) { + LDKOfferWithDerivedMetadataBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + OfferWithDerivedMetadataBuilder_free(this_obj_conv); +} + +static inline uint64_t OfferWithDerivedMetadataBuilder_clone_ptr(LDKOfferWithDerivedMetadataBuilder *NONNULL_PTR arg) { + LDKOfferWithDerivedMetadataBuilder ret_var = OfferWithDerivedMetadataBuilder_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t CS_LDK_OfferWithDerivedMetadataBuilder_clone_ptr(int64_t arg) { + LDKOfferWithDerivedMetadataBuilder arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = OfferWithDerivedMetadataBuilder_clone_ptr(&arg_conv); + return ret_conv; +} + +int64_t CS_LDK_OfferWithDerivedMetadataBuilder_clone(int64_t orig) { + LDKOfferWithDerivedMetadataBuilder orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKOfferWithDerivedMetadataBuilder ret_var = OfferWithDerivedMetadataBuilder_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_OfferWithExplicitMetadataBuilder_new(int8_tArray signing_pubkey) { + LDKPublicKey signing_pubkey_ref; + CHECK(signing_pubkey->arr_len == 33); + memcpy(signing_pubkey_ref.compressed_form, signing_pubkey->elems, 33); FREE(signing_pubkey); + LDKOfferWithExplicitMetadataBuilder ret_var = OfferWithExplicitMetadataBuilder_new(signing_pubkey_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_OfferWithExplicitMetadataBuilder_metadata(int64_t this_arg, int8_tArray metadata) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKCVec_u8Z metadata_ref; + metadata_ref.datalen = metadata->arr_len; + metadata_ref.data = MALLOC(metadata_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(metadata_ref.data, metadata->elems, metadata_ref.datalen); FREE(metadata); + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = OfferWithExplicitMetadataBuilder_metadata(this_arg_conv, metadata_ref); + return tag_ptr(ret_conv, true); +} + +void CS_LDK_OfferWithExplicitMetadataBuilder_chain(int64_t this_arg, int32_t network) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKNetwork network_conv = LDKNetwork_from_cs(network); + OfferWithExplicitMetadataBuilder_chain(this_arg_conv, network_conv); +} + +void CS_LDK_OfferWithExplicitMetadataBuilder_amount_msats(int64_t this_arg, int64_t amount_msats) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + OfferWithExplicitMetadataBuilder_amount_msats(this_arg_conv, amount_msats); +} + +void CS_LDK_OfferWithExplicitMetadataBuilder_absolute_expiry(int64_t this_arg, int64_t absolute_expiry) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + OfferWithExplicitMetadataBuilder_absolute_expiry(this_arg_conv, absolute_expiry); +} + +void CS_LDK_OfferWithExplicitMetadataBuilder_description(int64_t this_arg, jstring description) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKStr description_conv = str_ref_to_owned_c(description); + OfferWithExplicitMetadataBuilder_description(this_arg_conv, description_conv); +} + +void CS_LDK_OfferWithExplicitMetadataBuilder_issuer(int64_t this_arg, jstring issuer) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKStr issuer_conv = str_ref_to_owned_c(issuer); + OfferWithExplicitMetadataBuilder_issuer(this_arg_conv, issuer_conv); +} + +void CS_LDK_OfferWithExplicitMetadataBuilder_path(int64_t this_arg, int64_t path) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKBlindedPath path_conv; + path_conv.inner = untag_ptr(path); + path_conv.is_owned = ptr_is_owned(path); + CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv); + path_conv = BlindedPath_clone(&path_conv); + OfferWithExplicitMetadataBuilder_path(this_arg_conv, path_conv); +} + +void CS_LDK_OfferWithExplicitMetadataBuilder_supported_quantity(int64_t this_arg, int64_t quantity) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + void* quantity_ptr = untag_ptr(quantity); + CHECK_ACCESS(quantity_ptr); + LDKQuantity quantity_conv = *(LDKQuantity*)(quantity_ptr); + quantity_conv = Quantity_clone((LDKQuantity*)untag_ptr(quantity)); + OfferWithExplicitMetadataBuilder_supported_quantity(this_arg_conv, quantity_conv); +} + +int64_t CS_LDK_OfferWithExplicitMetadataBuilder_build(int64_t this_arg) { + LDKOfferWithExplicitMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv); + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = OfferWithExplicitMetadataBuilder_build(this_arg_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_OfferWithDerivedMetadataBuilder_deriving_signing_pubkey(int8_tArray node_id, int64_t expanded_key, int64_t entropy_source) { + LDKPublicKey node_id_ref; + CHECK(node_id->arr_len == 33); + memcpy(node_id_ref.compressed_form, node_id->elems, 33); FREE(node_id); + LDKExpandedKey expanded_key_conv; + expanded_key_conv.inner = untag_ptr(expanded_key); + expanded_key_conv.is_owned = ptr_is_owned(expanded_key); + CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv); + expanded_key_conv.is_owned = false; + void* entropy_source_ptr = untag_ptr(entropy_source); + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } + LDKOfferWithDerivedMetadataBuilder ret_var = OfferWithDerivedMetadataBuilder_deriving_signing_pubkey(node_id_ref, &expanded_key_conv, entropy_source_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void CS_LDK_OfferWithDerivedMetadataBuilder_chain(int64_t this_arg, int32_t network) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKNetwork network_conv = LDKNetwork_from_cs(network); + OfferWithDerivedMetadataBuilder_chain(this_arg_conv, network_conv); +} + +void CS_LDK_OfferWithDerivedMetadataBuilder_amount_msats(int64_t this_arg, int64_t amount_msats) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + OfferWithDerivedMetadataBuilder_amount_msats(this_arg_conv, amount_msats); +} + +void CS_LDK_OfferWithDerivedMetadataBuilder_absolute_expiry(int64_t this_arg, int64_t absolute_expiry) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + OfferWithDerivedMetadataBuilder_absolute_expiry(this_arg_conv, absolute_expiry); +} + +void CS_LDK_OfferWithDerivedMetadataBuilder_description(int64_t this_arg, jstring description) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKStr description_conv = str_ref_to_owned_c(description); + OfferWithDerivedMetadataBuilder_description(this_arg_conv, description_conv); +} + +void CS_LDK_OfferWithDerivedMetadataBuilder_issuer(int64_t this_arg, jstring issuer) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKStr issuer_conv = str_ref_to_owned_c(issuer); + OfferWithDerivedMetadataBuilder_issuer(this_arg_conv, issuer_conv); +} + +void CS_LDK_OfferWithDerivedMetadataBuilder_path(int64_t this_arg, int64_t path) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKBlindedPath path_conv; + path_conv.inner = untag_ptr(path); + path_conv.is_owned = ptr_is_owned(path); + CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv); + path_conv = BlindedPath_clone(&path_conv); + OfferWithDerivedMetadataBuilder_path(this_arg_conv, path_conv); +} + +void CS_LDK_OfferWithDerivedMetadataBuilder_supported_quantity(int64_t this_arg, int64_t quantity) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + void* quantity_ptr = untag_ptr(quantity); + CHECK_ACCESS(quantity_ptr); + LDKQuantity quantity_conv = *(LDKQuantity*)(quantity_ptr); + quantity_conv = Quantity_clone((LDKQuantity*)untag_ptr(quantity)); + OfferWithDerivedMetadataBuilder_supported_quantity(this_arg_conv, quantity_conv); +} + +int64_t CS_LDK_OfferWithDerivedMetadataBuilder_build(int64_t this_arg) { + LDKOfferWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ"); + *ret_conv = OfferWithDerivedMetadataBuilder_build(this_arg_conv); + return tag_ptr(ret_conv, true); +} + void CS_LDK_Offer_free(int64_t this_obj) { LDKOffer this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -59338,10 +64191,9 @@ int64_t CS_LDK_Offer_amount(int64_t this_arg) { this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = Offer_amount(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = Offer_amount(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -59424,10 +64276,9 @@ int64_t CS_LDK_Offer_supported_quantity(int64_t this_arg) { this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = Offer_supported_quantity(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Offer_supported_quantity(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -59442,6 +64293,19 @@ int8_tArray CS_LDK_Offer_signing_pubkey(int64_t this_arg) { return ret_arr; } +int64_t CS_LDK_Offer_id(int64_t this_arg) { + LDKOffer this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKOfferId ret_var = Offer_id(&this_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + jboolean CS_LDK_Offer_supports_chain(int64_t this_arg, int8_tArray chain) { LDKOffer this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -59495,6 +64359,89 @@ jboolean CS_LDK_Offer_expects_quantity(int64_t this_arg) { return ret_conv; } +int64_t CS_LDK_Offer_request_invoice_deriving_payer_id(int64_t this_arg, int64_t expanded_key, int64_t entropy_source, int8_tArray payment_id) { + LDKOffer this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKExpandedKey expanded_key_conv; + expanded_key_conv.inner = untag_ptr(expanded_key); + expanded_key_conv.is_owned = ptr_is_owned(expanded_key); + CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv); + expanded_key_conv.is_owned = false; + void* entropy_source_ptr = untag_ptr(entropy_source); + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } + LDKThirtyTwoBytes payment_id_ref; + CHECK(payment_id->arr_len == 32); + memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id); + LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = Offer_request_invoice_deriving_payer_id(&this_arg_conv, &expanded_key_conv, entropy_source_conv, payment_id_ref); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_Offer_request_invoice_deriving_metadata(int64_t this_arg, int8_tArray payer_id, int64_t expanded_key, int64_t entropy_source, int8_tArray payment_id) { + LDKOffer this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKPublicKey payer_id_ref; + CHECK(payer_id->arr_len == 33); + memcpy(payer_id_ref.compressed_form, payer_id->elems, 33); FREE(payer_id); + LDKExpandedKey expanded_key_conv; + expanded_key_conv.inner = untag_ptr(expanded_key); + expanded_key_conv.is_owned = ptr_is_owned(expanded_key); + CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv); + expanded_key_conv.is_owned = false; + void* entropy_source_ptr = untag_ptr(entropy_source); + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } + LDKThirtyTwoBytes payment_id_ref; + CHECK(payment_id->arr_len == 32); + memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id); + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = Offer_request_invoice_deriving_metadata(&this_arg_conv, payer_id_ref, &expanded_key_conv, entropy_source_conv, payment_id_ref); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_Offer_request_invoice(int64_t this_arg, int8_tArray metadata, int8_tArray payer_id) { + LDKOffer this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_u8Z metadata_ref; + metadata_ref.datalen = metadata->arr_len; + metadata_ref.data = MALLOC(metadata_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(metadata_ref.data, metadata->elems, metadata_ref.datalen); FREE(metadata); + LDKPublicKey payer_id_ref; + CHECK(payer_id->arr_len == 33); + memcpy(payer_id_ref.compressed_form, payer_id->elems, 33); FREE(payer_id); + LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ"); + *ret_conv = Offer_request_invoice(&this_arg_conv, metadata_ref, payer_id_ref); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_Offer_hash(int64_t o) { + LDKOffer o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = Offer_hash(&o_conv); + return ret_conv; +} + int8_tArray CS_LDK_Offer_write(int64_t obj) { LDKOffer obj_conv; obj_conv.inner = untag_ptr(obj); @@ -59508,95 +64455,316 @@ int8_tArray CS_LDK_Offer_write(int64_t obj) { return ret_arr; } -void CS_LDK_Amount_free(int64_t this_obj) { - LDKAmount this_obj_conv; - this_obj_conv.inner = untag_ptr(this_obj); - this_obj_conv.is_owned = ptr_is_owned(this_obj); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - Amount_free(this_obj_conv); +void CS_LDK_Amount_free(int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKAmount this_ptr_conv = *(LDKAmount*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + Amount_free(this_ptr_conv); } static inline uint64_t Amount_clone_ptr(LDKAmount *NONNULL_PTR arg) { - LDKAmount ret_var = Amount_clone(arg); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount"); + *ret_copy = Amount_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } int64_t CS_LDK_Amount_clone_ptr(int64_t arg) { - LDKAmount arg_conv; - arg_conv.inner = untag_ptr(arg); - arg_conv.is_owned = ptr_is_owned(arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); - arg_conv.is_owned = false; - int64_t ret_conv = Amount_clone_ptr(&arg_conv); + LDKAmount* arg_conv = (LDKAmount*)untag_ptr(arg); + int64_t ret_conv = Amount_clone_ptr(arg_conv); return ret_conv; } int64_t CS_LDK_Amount_clone(int64_t orig) { - LDKAmount orig_conv; - orig_conv.inner = untag_ptr(orig); - orig_conv.is_owned = ptr_is_owned(orig); - CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); - orig_conv.is_owned = false; - LDKAmount ret_var = Amount_clone(&orig_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKAmount* orig_conv = (LDKAmount*)untag_ptr(orig); + LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount"); + *ret_copy = Amount_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_Amount_bitcoin(int64_t amount_msats) { + LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount"); + *ret_copy = Amount_bitcoin(amount_msats); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_Amount_currency(int8_tArray iso4217_code, int64_t amount) { + LDKThreeBytes iso4217_code_ref; + CHECK(iso4217_code->arr_len == 3); + memcpy(iso4217_code_ref.data, iso4217_code->elems, 3); FREE(iso4217_code); + LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount"); + *ret_copy = Amount_currency(iso4217_code_ref, amount); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -void CS_LDK_Quantity_free(int64_t this_obj) { - LDKQuantity this_obj_conv; +void CS_LDK_Quantity_free(int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKQuantity this_ptr_conv = *(LDKQuantity*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + Quantity_free(this_ptr_conv); +} + +static inline uint64_t Quantity_clone_ptr(LDKQuantity *NONNULL_PTR arg) { + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Quantity_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t CS_LDK_Quantity_clone_ptr(int64_t arg) { + LDKQuantity* arg_conv = (LDKQuantity*)untag_ptr(arg); + int64_t ret_conv = Quantity_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_Quantity_clone(int64_t orig) { + LDKQuantity* orig_conv = (LDKQuantity*)untag_ptr(orig); + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Quantity_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_Quantity_bounded(int64_t a) { + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Quantity_bounded(a); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_Quantity_unbounded() { + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Quantity_unbounded(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_Quantity_one() { + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = Quantity_one(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_Offer_from_str(jstring s) { + LDKStr s_conv = str_ref_to_owned_c(s); + LDKCResult_OfferBolt12ParseErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12ParseErrorZ), "LDKCResult_OfferBolt12ParseErrorZ"); + *ret_conv = Offer_from_str(s_conv); + return tag_ptr(ret_conv, true); +} + +void CS_LDK_InvoiceWithExplicitSigningPubkeyBuilder_free(int64_t this_obj) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); this_obj_conv.is_owned = ptr_is_owned(this_obj); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - Quantity_free(this_obj_conv); + InvoiceWithExplicitSigningPubkeyBuilder_free(this_obj_conv); } -static inline uint64_t Quantity_clone_ptr(LDKQuantity *NONNULL_PTR arg) { - LDKQuantity ret_var = Quantity_clone(arg); +void CS_LDK_InvoiceWithDerivedSigningPubkeyBuilder_free(int64_t this_obj) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + InvoiceWithDerivedSigningPubkeyBuilder_free(this_obj_conv); +} + +int64_t CS_LDK_InvoiceWithExplicitSigningPubkeyBuilder_build(int64_t this_arg) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = InvoiceWithExplicitSigningPubkeyBuilder_build(this_arg_conv); + return tag_ptr(ret_conv, true); +} + +void CS_LDK_InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry(int64_t this_arg, int32_t relative_expiry_secs) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry(this_arg_conv, relative_expiry_secs); +} + +void CS_LDK_InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh(int64_t this_arg, int8_tArray script_hash) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + uint8_t script_hash_arr[32]; + CHECK(script_hash->arr_len == 32); + memcpy(script_hash_arr, script_hash->elems, 32); FREE(script_hash); + uint8_t (*script_hash_ref)[32] = &script_hash_arr; + InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh(this_arg_conv, script_hash_ref); +} + +void CS_LDK_InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh(int64_t this_arg, int8_tArray pubkey_hash) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + uint8_t pubkey_hash_arr[20]; + CHECK(pubkey_hash->arr_len == 20); + memcpy(pubkey_hash_arr, pubkey_hash->elems, 20); FREE(pubkey_hash); + uint8_t (*pubkey_hash_ref)[20] = &pubkey_hash_arr; + InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh(this_arg_conv, pubkey_hash_ref); +} + +void CS_LDK_InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(int64_t this_arg, int8_tArray utput_key) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + LDKTweakedPublicKey utput_key_ref; + CHECK(utput_key->arr_len == 32); + memcpy(utput_key_ref.x_coordinate, utput_key->elems, 32); FREE(utput_key); + InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(this_arg_conv, utput_key_ref); +} + +void CS_LDK_InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp(int64_t this_arg) { + LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder + + InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp(this_arg_conv); +} + +int64_t CS_LDK_InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign(int64_t this_arg) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ"); + *ret_conv = InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign(this_arg_conv); + return tag_ptr(ret_conv, true); +} + +void CS_LDK_InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry(int64_t this_arg, int32_t relative_expiry_secs) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry(this_arg_conv, relative_expiry_secs); +} + +void CS_LDK_InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh(int64_t this_arg, int8_tArray script_hash) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + uint8_t script_hash_arr[32]; + CHECK(script_hash->arr_len == 32); + memcpy(script_hash_arr, script_hash->elems, 32); FREE(script_hash); + uint8_t (*script_hash_ref)[32] = &script_hash_arr; + InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh(this_arg_conv, script_hash_ref); +} + +void CS_LDK_InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh(int64_t this_arg, int8_tArray pubkey_hash) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + uint8_t pubkey_hash_arr[20]; + CHECK(pubkey_hash->arr_len == 20); + memcpy(pubkey_hash_arr, pubkey_hash->elems, 20); FREE(pubkey_hash); + uint8_t (*pubkey_hash_ref)[20] = &pubkey_hash_arr; + InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh(this_arg_conv, pubkey_hash_ref); +} + +void CS_LDK_InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(int64_t this_arg, int8_tArray utput_key) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + LDKTweakedPublicKey utput_key_ref; + CHECK(utput_key->arr_len == 32); + memcpy(utput_key_ref.x_coordinate, utput_key->elems, 32); FREE(utput_key); + InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(this_arg_conv, utput_key_ref); +} + +void CS_LDK_InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp(int64_t this_arg) { + LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder + + InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp(this_arg_conv); +} + +void CS_LDK_UnsignedBolt12Invoice_free(int64_t this_obj) { + LDKUnsignedBolt12Invoice this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + UnsignedBolt12Invoice_free(this_obj_conv); +} + +static inline uint64_t UnsignedBolt12Invoice_clone_ptr(LDKUnsignedBolt12Invoice *NONNULL_PTR arg) { + LDKUnsignedBolt12Invoice ret_var = UnsignedBolt12Invoice_clone(arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -int64_t CS_LDK_Quantity_clone_ptr(int64_t arg) { - LDKQuantity arg_conv; +int64_t CS_LDK_UnsignedBolt12Invoice_clone_ptr(int64_t arg) { + LDKUnsignedBolt12Invoice arg_conv; arg_conv.inner = untag_ptr(arg); arg_conv.is_owned = ptr_is_owned(arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); arg_conv.is_owned = false; - int64_t ret_conv = Quantity_clone_ptr(&arg_conv); + int64_t ret_conv = UnsignedBolt12Invoice_clone_ptr(&arg_conv); return ret_conv; } -int64_t CS_LDK_Quantity_clone(int64_t orig) { - LDKQuantity orig_conv; +int64_t CS_LDK_UnsignedBolt12Invoice_clone(int64_t orig) { + LDKUnsignedBolt12Invoice orig_conv; orig_conv.inner = untag_ptr(orig); orig_conv.is_owned = ptr_is_owned(orig); CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); orig_conv.is_owned = false; - LDKQuantity ret_var = Quantity_clone(&orig_conv); + LDKUnsignedBolt12Invoice ret_var = UnsignedBolt12Invoice_clone(&orig_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); return ret_ref; } -int64_t CS_LDK_Offer_from_str(jstring s) { - LDKStr s_conv = str_ref_to_owned_c(s); - LDKCResult_OfferBolt12ParseErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12ParseErrorZ), "LDKCResult_OfferBolt12ParseErrorZ"); - *ret_conv = Offer_from_str(s_conv); - return tag_ptr(ret_conv, true); -} - -void CS_LDK_UnsignedBolt12Invoice_free(int64_t this_obj) { - LDKUnsignedBolt12Invoice this_obj_conv; - this_obj_conv.inner = untag_ptr(this_obj); - this_obj_conv.is_owned = ptr_is_owned(this_obj); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); - UnsignedBolt12Invoice_free(this_obj_conv); +void CS_LDK_SignBolt12InvoiceFn_free(int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKSignBolt12InvoiceFn this_ptr_conv = *(LDKSignBolt12InvoiceFn*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + SignBolt12InvoiceFn_free(this_ptr_conv); } int64_t CS_LDK_UnsignedBolt12Invoice_tagged_hash(int64_t this_arg) { @@ -59691,10 +64859,9 @@ int64_t CS_LDK_UnsignedBolt12Invoice_amount(int64_t this_arg) { this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = UnsignedBolt12Invoice_amount(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = UnsignedBolt12Invoice_amount(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -59777,10 +64944,9 @@ int64_t CS_LDK_UnsignedBolt12Invoice_supported_quantity(int64_t this_arg) { this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = UnsignedBolt12Invoice_supported_quantity(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = UnsignedBolt12Invoice_supported_quantity(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -59961,10 +65127,9 @@ int64_t CS_LDK_Bolt12Invoice_amount(int64_t this_arg) { this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = Bolt12Invoice_amount(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = Bolt12Invoice_amount(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -60047,10 +65212,9 @@ int64_t CS_LDK_Bolt12Invoice_supported_quantity(int64_t this_arg) { this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = Bolt12Invoice_supported_quantity(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ"); + *ret_copy = Bolt12Invoice_supported_quantity(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -60228,6 +65392,16 @@ int64_t CS_LDK_Bolt12Invoice_verify(int64_t this_arg, int64_t key) { return tag_ptr(ret_conv, true); } +int64_t CS_LDK_Bolt12Invoice_hash(int64_t o) { + LDKBolt12Invoice o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = Bolt12Invoice_hash(&o_conv); + return ret_conv; +} + int8_tArray CS_LDK_UnsignedBolt12Invoice_write(int64_t obj) { LDKUnsignedBolt12Invoice obj_conv; obj_conv.inner = untag_ptr(obj); @@ -60711,6 +65885,142 @@ int64_t CS_LDK_InvoiceError_read(int8_tArray ser) { return tag_ptr(ret_conv, true); } +void CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_free(int64_t this_obj) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + InvoiceRequestWithExplicitPayerIdBuilder_free(this_obj_conv); +} + +void CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_free(int64_t this_obj) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + InvoiceRequestWithDerivedPayerIdBuilder_free(this_obj_conv); +} + +int64_t CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_build(int64_t this_arg) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_build(this_arg_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_chain(int64_t this_arg, int32_t network) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKNetwork network_conv = LDKNetwork_from_cs(network); + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_chain(this_arg_conv, network_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(int64_t this_arg, int64_t amount_msats) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(this_arg_conv, amount_msats); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_quantity(int64_t this_arg, int64_t quantity) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_quantity(this_arg_conv, quantity); + return tag_ptr(ret_conv, true); +} + +void CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_payer_note(int64_t this_arg, jstring payer_note) { + LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder + + LDKStr payer_note_conv = str_ref_to_owned_c(payer_note); + InvoiceRequestWithExplicitPayerIdBuilder_payer_note(this_arg_conv, payer_note_conv); +} + +int64_t CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(int64_t this_arg) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(this_arg_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_chain(int64_t this_arg, int32_t network) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKNetwork network_conv = LDKNetwork_from_cs(network); + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_chain(this_arg_conv, network_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_amount_msats(int64_t this_arg, int64_t amount_msats) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_amount_msats(this_arg_conv, amount_msats); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_quantity(int64_t this_arg, int64_t quantity) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_quantity(this_arg_conv, quantity); + return tag_ptr(ret_conv, true); +} + +void CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_payer_note(int64_t this_arg, jstring payer_note) { + LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder + + LDKStr payer_note_conv = str_ref_to_owned_c(payer_note); + InvoiceRequestWithDerivedPayerIdBuilder_payer_note(this_arg_conv, payer_note_conv); +} + void CS_LDK_UnsignedInvoiceRequest_free(int64_t this_obj) { LDKUnsignedInvoiceRequest this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -60719,6 +66029,45 @@ void CS_LDK_UnsignedInvoiceRequest_free(int64_t this_obj) { UnsignedInvoiceRequest_free(this_obj_conv); } +static inline uint64_t UnsignedInvoiceRequest_clone_ptr(LDKUnsignedInvoiceRequest *NONNULL_PTR arg) { + LDKUnsignedInvoiceRequest ret_var = UnsignedInvoiceRequest_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t CS_LDK_UnsignedInvoiceRequest_clone_ptr(int64_t arg) { + LDKUnsignedInvoiceRequest arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = UnsignedInvoiceRequest_clone_ptr(&arg_conv); + return ret_conv; +} + +int64_t CS_LDK_UnsignedInvoiceRequest_clone(int64_t orig) { + LDKUnsignedInvoiceRequest orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKUnsignedInvoiceRequest ret_var = UnsignedInvoiceRequest_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void CS_LDK_SignInvoiceRequestFn_free(int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKSignInvoiceRequestFn this_ptr_conv = *(LDKSignInvoiceRequestFn*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + SignInvoiceRequestFn_free(this_ptr_conv); +} + int64_t CS_LDK_UnsignedInvoiceRequest_tagged_hash(int64_t this_arg) { LDKUnsignedInvoiceRequest this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -60778,6 +66127,33 @@ void CS_LDK_VerifiedInvoiceRequest_free(int64_t this_obj) { VerifiedInvoiceRequest_free(this_obj_conv); } +int64_t CS_LDK_VerifiedInvoiceRequest_get_offer_id(int64_t this_ptr) { + LDKVerifiedInvoiceRequest this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKOfferId ret_var = VerifiedInvoiceRequest_get_offer_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void CS_LDK_VerifiedInvoiceRequest_set_offer_id(int64_t this_ptr, int64_t val) { + LDKVerifiedInvoiceRequest this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKOfferId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = OfferId_clone(&val_conv); + VerifiedInvoiceRequest_set_offer_id(&this_ptr_conv, val_conv); +} + int64_t CS_LDK_VerifiedInvoiceRequest_get_keys(int64_t this_ptr) { LDKVerifiedInvoiceRequest this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -60871,10 +66247,9 @@ int64_t CS_LDK_UnsignedInvoiceRequest_amount(int64_t this_arg) { this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = UnsignedInvoiceRequest_amount(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = UnsignedInvoiceRequest_amount(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -60957,10 +66332,9 @@ int64_t CS_LDK_UnsignedInvoiceRequest_supported_quantity(int64_t this_arg) { this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = UnsignedInvoiceRequest_supported_quantity(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = UnsignedInvoiceRequest_supported_quantity(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -61097,10 +66471,9 @@ int64_t CS_LDK_InvoiceRequest_amount(int64_t this_arg) { this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = InvoiceRequest_amount(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = InvoiceRequest_amount(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -61183,10 +66556,9 @@ int64_t CS_LDK_InvoiceRequest_supported_quantity(int64_t this_arg) { this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = InvoiceRequest_supported_quantity(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = InvoiceRequest_supported_quantity(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -61285,15 +66657,64 @@ int64_t CS_LDK_InvoiceRequest_payer_note(int64_t this_arg) { return ret_ref; } -int8_tArray CS_LDK_InvoiceRequest_signature(int64_t this_arg) { +int64_t CS_LDK_InvoiceRequest_respond_with(int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash) { LDKInvoiceRequest this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(64, __LINE__); - memcpy(ret_arr->elems, InvoiceRequest_signature(&this_arg_conv).compact_form, 64); - return ret_arr; + LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr; + payment_paths_constr.datalen = payment_paths->arr_len; + if (payment_paths_constr.datalen > 0) + payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements"); + else + payment_paths_constr.data = NULL; + int64_t* payment_paths_vals = payment_paths->elems; + for (size_t l = 0; l < payment_paths_constr.datalen; l++) { + int64_t payment_paths_conv_37 = payment_paths_vals[l]; + void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37); + CHECK_ACCESS(payment_paths_conv_37_ptr); + LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr); + payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37)); + payment_paths_constr.data[l] = payment_paths_conv_37_conv; + } + FREE(payment_paths); + LDKThirtyTwoBytes payment_hash_ref; + CHECK(payment_hash->arr_len == 32); + memcpy(payment_hash_ref.data, payment_hash->elems, 32); FREE(payment_hash); + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequest_respond_with(&this_arg_conv, payment_paths_constr, payment_hash_ref); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_InvoiceRequest_respond_with_no_std(int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash, int64_t created_at) { + LDKInvoiceRequest this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr; + payment_paths_constr.datalen = payment_paths->arr_len; + if (payment_paths_constr.datalen > 0) + payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements"); + else + payment_paths_constr.data = NULL; + int64_t* payment_paths_vals = payment_paths->elems; + for (size_t l = 0; l < payment_paths_constr.datalen; l++) { + int64_t payment_paths_conv_37 = payment_paths_vals[l]; + void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37); + CHECK_ACCESS(payment_paths_conv_37_ptr); + LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr); + payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37)); + payment_paths_constr.data[l] = payment_paths_conv_37_conv; + } + FREE(payment_paths); + LDKThirtyTwoBytes payment_hash_ref; + CHECK(payment_hash->arr_len == 32); + memcpy(payment_hash_ref.data, payment_hash->elems, 32); FREE(payment_hash); + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = InvoiceRequest_respond_with_no_std(&this_arg_conv, payment_paths_constr, payment_hash_ref, created_at); + return tag_ptr(ret_conv, true); } int64_t CS_LDK_InvoiceRequest_verify(int64_t this_arg, int64_t key) { @@ -61312,6 +66733,17 @@ int64_t CS_LDK_InvoiceRequest_verify(int64_t this_arg, int64_t key) { return tag_ptr(ret_conv, true); } +int8_tArray CS_LDK_InvoiceRequest_signature(int64_t this_arg) { + LDKInvoiceRequest this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(64, __LINE__); + memcpy(ret_arr->elems, InvoiceRequest_signature(&this_arg_conv).compact_form, 64); + return ret_arr; +} + ptrArray CS_LDK_VerifiedInvoiceRequest_chains(int64_t this_arg) { LDKVerifiedInvoiceRequest this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -61350,10 +66782,9 @@ int64_t CS_LDK_VerifiedInvoiceRequest_amount(int64_t this_arg) { this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKAmount ret_var = VerifiedInvoiceRequest_amount(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ"); + *ret_copy = VerifiedInvoiceRequest_amount(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -61436,10 +66867,9 @@ int64_t CS_LDK_VerifiedInvoiceRequest_supported_quantity(int64_t this_arg) { this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKQuantity ret_var = VerifiedInvoiceRequest_supported_quantity(&this_arg_conv); - int64_t ret_ref = 0; - CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); - ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity"); + *ret_copy = VerifiedInvoiceRequest_supported_quantity(&this_arg_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -61538,6 +66968,126 @@ int64_t CS_LDK_VerifiedInvoiceRequest_payer_note(int64_t this_arg) { return ret_ref; } +int64_t CS_LDK_VerifiedInvoiceRequest_respond_with(int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash) { + LDKVerifiedInvoiceRequest this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr; + payment_paths_constr.datalen = payment_paths->arr_len; + if (payment_paths_constr.datalen > 0) + payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements"); + else + payment_paths_constr.data = NULL; + int64_t* payment_paths_vals = payment_paths->elems; + for (size_t l = 0; l < payment_paths_constr.datalen; l++) { + int64_t payment_paths_conv_37 = payment_paths_vals[l]; + void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37); + CHECK_ACCESS(payment_paths_conv_37_ptr); + LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr); + payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37)); + payment_paths_constr.data[l] = payment_paths_conv_37_conv; + } + FREE(payment_paths); + LDKThirtyTwoBytes payment_hash_ref; + CHECK(payment_hash->arr_len == 32); + memcpy(payment_hash_ref.data, payment_hash->elems, 32); FREE(payment_hash); + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = VerifiedInvoiceRequest_respond_with(&this_arg_conv, payment_paths_constr, payment_hash_ref); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_VerifiedInvoiceRequest_respond_with_no_std(int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash, int64_t created_at) { + LDKVerifiedInvoiceRequest this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr; + payment_paths_constr.datalen = payment_paths->arr_len; + if (payment_paths_constr.datalen > 0) + payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements"); + else + payment_paths_constr.data = NULL; + int64_t* payment_paths_vals = payment_paths->elems; + for (size_t l = 0; l < payment_paths_constr.datalen; l++) { + int64_t payment_paths_conv_37 = payment_paths_vals[l]; + void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37); + CHECK_ACCESS(payment_paths_conv_37_ptr); + LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr); + payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37)); + payment_paths_constr.data[l] = payment_paths_conv_37_conv; + } + FREE(payment_paths); + LDKThirtyTwoBytes payment_hash_ref; + CHECK(payment_hash->arr_len == 32); + memcpy(payment_hash_ref.data, payment_hash->elems, 32); FREE(payment_hash); + LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = VerifiedInvoiceRequest_respond_with_no_std(&this_arg_conv, payment_paths_constr, payment_hash_ref, created_at); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_VerifiedInvoiceRequest_respond_using_derived_keys(int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash) { + LDKVerifiedInvoiceRequest this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr; + payment_paths_constr.datalen = payment_paths->arr_len; + if (payment_paths_constr.datalen > 0) + payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements"); + else + payment_paths_constr.data = NULL; + int64_t* payment_paths_vals = payment_paths->elems; + for (size_t l = 0; l < payment_paths_constr.datalen; l++) { + int64_t payment_paths_conv_37 = payment_paths_vals[l]; + void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37); + CHECK_ACCESS(payment_paths_conv_37_ptr); + LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr); + payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37)); + payment_paths_constr.data[l] = payment_paths_conv_37_conv; + } + FREE(payment_paths); + LDKThirtyTwoBytes payment_hash_ref; + CHECK(payment_hash->arr_len == 32); + memcpy(payment_hash_ref.data, payment_hash->elems, 32); FREE(payment_hash); + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = VerifiedInvoiceRequest_respond_using_derived_keys(&this_arg_conv, payment_paths_constr, payment_hash_ref); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_VerifiedInvoiceRequest_respond_using_derived_keys_no_std(int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash, int64_t created_at) { + LDKVerifiedInvoiceRequest this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr; + payment_paths_constr.datalen = payment_paths->arr_len; + if (payment_paths_constr.datalen > 0) + payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements"); + else + payment_paths_constr.data = NULL; + int64_t* payment_paths_vals = payment_paths->elems; + for (size_t l = 0; l < payment_paths_constr.datalen; l++) { + int64_t payment_paths_conv_37 = payment_paths_vals[l]; + void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37); + CHECK_ACCESS(payment_paths_conv_37_ptr); + LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr); + payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37)); + payment_paths_constr.data[l] = payment_paths_conv_37_conv; + } + FREE(payment_paths); + LDKThirtyTwoBytes payment_hash_ref; + CHECK(payment_hash->arr_len == 32); + memcpy(payment_hash_ref.data, payment_hash->elems, 32); FREE(payment_hash); + LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ"); + *ret_conv = VerifiedInvoiceRequest_respond_using_derived_keys_no_std(&this_arg_conv, payment_paths_constr, payment_hash_ref, created_at); + return tag_ptr(ret_conv, true); +} + int8_tArray CS_LDK_UnsignedInvoiceRequest_write(int64_t obj) { LDKUnsignedInvoiceRequest obj_conv; obj_conv.inner = untag_ptr(obj); @@ -61564,6 +67114,177 @@ int8_tArray CS_LDK_InvoiceRequest_write(int64_t obj) { return ret_arr; } +void CS_LDK_InvoiceRequestFields_free(int64_t this_obj) { + LDKInvoiceRequestFields this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + InvoiceRequestFields_free(this_obj_conv); +} + +int8_tArray CS_LDK_InvoiceRequestFields_get_payer_id(int64_t this_ptr) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(33, __LINE__); + memcpy(ret_arr->elems, InvoiceRequestFields_get_payer_id(&this_ptr_conv).compressed_form, 33); + return ret_arr; +} + +void CS_LDK_InvoiceRequestFields_set_payer_id(int64_t this_ptr, int8_tArray val) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKPublicKey val_ref; + CHECK(val->arr_len == 33); + memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); + InvoiceRequestFields_set_payer_id(&this_ptr_conv, val_ref); +} + +int64_t CS_LDK_InvoiceRequestFields_get_quantity(int64_t this_ptr) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z"); + *ret_copy = InvoiceRequestFields_get_quantity(&this_ptr_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void CS_LDK_InvoiceRequestFields_set_quantity(int64_t this_ptr, int64_t val) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKCOption_u64Z val_conv = *(LDKCOption_u64Z*)(val_ptr); + val_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(val)); + InvoiceRequestFields_set_quantity(&this_ptr_conv, val_conv); +} + +int64_t CS_LDK_InvoiceRequestFields_get_payer_note_truncated(int64_t this_ptr) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKUntrustedString ret_var = InvoiceRequestFields_get_payer_note_truncated(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void CS_LDK_InvoiceRequestFields_set_payer_note_truncated(int64_t this_ptr, int64_t val) { + LDKInvoiceRequestFields this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKUntrustedString val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = UntrustedString_clone(&val_conv); + InvoiceRequestFields_set_payer_note_truncated(&this_ptr_conv, val_conv); +} + +int64_t CS_LDK_InvoiceRequestFields_new(int8_tArray payer_id_arg, int64_t quantity_arg, int64_t payer_note_truncated_arg) { + LDKPublicKey payer_id_arg_ref; + CHECK(payer_id_arg->arr_len == 33); + memcpy(payer_id_arg_ref.compressed_form, payer_id_arg->elems, 33); FREE(payer_id_arg); + void* quantity_arg_ptr = untag_ptr(quantity_arg); + CHECK_ACCESS(quantity_arg_ptr); + LDKCOption_u64Z quantity_arg_conv = *(LDKCOption_u64Z*)(quantity_arg_ptr); + quantity_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(quantity_arg)); + LDKUntrustedString payer_note_truncated_arg_conv; + payer_note_truncated_arg_conv.inner = untag_ptr(payer_note_truncated_arg); + payer_note_truncated_arg_conv.is_owned = ptr_is_owned(payer_note_truncated_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(payer_note_truncated_arg_conv); + payer_note_truncated_arg_conv = UntrustedString_clone(&payer_note_truncated_arg_conv); + LDKInvoiceRequestFields ret_var = InvoiceRequestFields_new(payer_id_arg_ref, quantity_arg_conv, payer_note_truncated_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t InvoiceRequestFields_clone_ptr(LDKInvoiceRequestFields *NONNULL_PTR arg) { + LDKInvoiceRequestFields ret_var = InvoiceRequestFields_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t CS_LDK_InvoiceRequestFields_clone_ptr(int64_t arg) { + LDKInvoiceRequestFields arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = InvoiceRequestFields_clone_ptr(&arg_conv); + return ret_conv; +} + +int64_t CS_LDK_InvoiceRequestFields_clone(int64_t orig) { + LDKInvoiceRequestFields orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKInvoiceRequestFields ret_var = InvoiceRequestFields_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +jboolean CS_LDK_InvoiceRequestFields_eq(int64_t a, int64_t b) { + LDKInvoiceRequestFields a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKInvoiceRequestFields b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = InvoiceRequestFields_eq(&a_conv, &b_conv); + return ret_conv; +} + +int8_tArray CS_LDK_InvoiceRequestFields_write(int64_t obj) { + LDKInvoiceRequestFields obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = InvoiceRequestFields_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +int64_t CS_LDK_InvoiceRequestFields_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ"); + *ret_conv = InvoiceRequestFields_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + void CS_LDK_TaggedHash_free(int64_t this_obj) { LDKTaggedHash this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -61636,6 +67357,50 @@ int8_tArray CS_LDK_TaggedHash_merkle_root(int64_t this_arg) { return ret_arr; } +void CS_LDK_SignError_free(int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKSignError this_ptr_conv = *(LDKSignError*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + SignError_free(this_ptr_conv); +} + +static inline uint64_t SignError_clone_ptr(LDKSignError *NONNULL_PTR arg) { + LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError"); + *ret_copy = SignError_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t CS_LDK_SignError_clone_ptr(int64_t arg) { + LDKSignError* arg_conv = (LDKSignError*)untag_ptr(arg); + int64_t ret_conv = SignError_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_SignError_clone(int64_t orig) { + LDKSignError* orig_conv = (LDKSignError*)untag_ptr(orig); + LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError"); + *ret_copy = SignError_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_SignError_signing() { + LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError"); + *ret_copy = SignError_signing(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_SignError_verification(int32_t a) { + LDKSecp256k1Error a_conv = LDKSecp256k1Error_from_cs(a); + LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError"); + *ret_copy = SignError_verification(a_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + void CS_LDK_Bolt12ParseError_free(int64_t this_obj) { LDKBolt12ParseError this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -61795,6 +67560,11 @@ int32_t CS_LDK_Bolt12SemanticError_missing_paths() { return ret_conv; } +int32_t CS_LDK_Bolt12SemanticError_unexpected_paths() { + int32_t ret_conv = LDKBolt12SemanticError_to_cs(Bolt12SemanticError_unexpected_paths()); + return ret_conv; +} + int32_t CS_LDK_Bolt12SemanticError_invalid_pay_info() { int32_t ret_conv = LDKBolt12SemanticError_to_cs(Bolt12SemanticError_invalid_pay_info()); return ret_conv; @@ -61815,6 +67585,164 @@ int32_t CS_LDK_Bolt12SemanticError_missing_signature() { return ret_conv; } +void CS_LDK_RefundMaybeWithDerivedMetadataBuilder_free(int64_t this_obj) { + LDKRefundMaybeWithDerivedMetadataBuilder this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + RefundMaybeWithDerivedMetadataBuilder_free(this_obj_conv); +} + +static inline uint64_t RefundMaybeWithDerivedMetadataBuilder_clone_ptr(LDKRefundMaybeWithDerivedMetadataBuilder *NONNULL_PTR arg) { + LDKRefundMaybeWithDerivedMetadataBuilder ret_var = RefundMaybeWithDerivedMetadataBuilder_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t CS_LDK_RefundMaybeWithDerivedMetadataBuilder_clone_ptr(int64_t arg) { + LDKRefundMaybeWithDerivedMetadataBuilder arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = RefundMaybeWithDerivedMetadataBuilder_clone_ptr(&arg_conv); + return ret_conv; +} + +int64_t CS_LDK_RefundMaybeWithDerivedMetadataBuilder_clone(int64_t orig) { + LDKRefundMaybeWithDerivedMetadataBuilder orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKRefundMaybeWithDerivedMetadataBuilder ret_var = RefundMaybeWithDerivedMetadataBuilder_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_RefundMaybeWithDerivedMetadataBuilder_new(int8_tArray metadata, int8_tArray payer_id, int64_t amount_msats) { + LDKCVec_u8Z metadata_ref; + metadata_ref.datalen = metadata->arr_len; + metadata_ref.data = MALLOC(metadata_ref.datalen, "LDKCVec_u8Z Bytes"); + memcpy(metadata_ref.data, metadata->elems, metadata_ref.datalen); FREE(metadata); + LDKPublicKey payer_id_ref; + CHECK(payer_id->arr_len == 33); + memcpy(payer_id_ref.compressed_form, payer_id->elems, 33); FREE(payer_id); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = RefundMaybeWithDerivedMetadataBuilder_new(metadata_ref, payer_id_ref, amount_msats); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(int8_tArray node_id, int64_t expanded_key, int64_t entropy_source, int64_t amount_msats, int8_tArray payment_id) { + LDKPublicKey node_id_ref; + CHECK(node_id->arr_len == 33); + memcpy(node_id_ref.compressed_form, node_id->elems, 33); FREE(node_id); + LDKExpandedKey expanded_key_conv; + expanded_key_conv.inner = untag_ptr(expanded_key); + expanded_key_conv.is_owned = ptr_is_owned(expanded_key); + CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv); + expanded_key_conv.is_owned = false; + void* entropy_source_ptr = untag_ptr(entropy_source); + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } + LDKThirtyTwoBytes payment_id_ref; + CHECK(payment_id->arr_len == 32); + memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id); + LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ"); + *ret_conv = RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(node_id_ref, &expanded_key_conv, entropy_source_conv, amount_msats, payment_id_ref); + return tag_ptr(ret_conv, true); +} + +void CS_LDK_RefundMaybeWithDerivedMetadataBuilder_description(int64_t this_arg, jstring description) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKStr description_conv = str_ref_to_owned_c(description); + RefundMaybeWithDerivedMetadataBuilder_description(this_arg_conv, description_conv); +} + +void CS_LDK_RefundMaybeWithDerivedMetadataBuilder_absolute_expiry(int64_t this_arg, int64_t absolute_expiry) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + RefundMaybeWithDerivedMetadataBuilder_absolute_expiry(this_arg_conv, absolute_expiry); +} + +void CS_LDK_RefundMaybeWithDerivedMetadataBuilder_issuer(int64_t this_arg, jstring issuer) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKStr issuer_conv = str_ref_to_owned_c(issuer); + RefundMaybeWithDerivedMetadataBuilder_issuer(this_arg_conv, issuer_conv); +} + +void CS_LDK_RefundMaybeWithDerivedMetadataBuilder_path(int64_t this_arg, int64_t path) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKBlindedPath path_conv; + path_conv.inner = untag_ptr(path); + path_conv.is_owned = ptr_is_owned(path); + CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv); + path_conv = BlindedPath_clone(&path_conv); + RefundMaybeWithDerivedMetadataBuilder_path(this_arg_conv, path_conv); +} + +void CS_LDK_RefundMaybeWithDerivedMetadataBuilder_chain(int64_t this_arg, int32_t network) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKNetwork network_conv = LDKNetwork_from_cs(network); + RefundMaybeWithDerivedMetadataBuilder_chain(this_arg_conv, network_conv); +} + +void CS_LDK_RefundMaybeWithDerivedMetadataBuilder_quantity(int64_t this_arg, int64_t quantity) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + RefundMaybeWithDerivedMetadataBuilder_quantity(this_arg_conv, quantity); +} + +void CS_LDK_RefundMaybeWithDerivedMetadataBuilder_payer_note(int64_t this_arg, jstring payer_note) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKStr payer_note_conv = str_ref_to_owned_c(payer_note); + RefundMaybeWithDerivedMetadataBuilder_payer_note(this_arg_conv, payer_note_conv); +} + +int64_t CS_LDK_RefundMaybeWithDerivedMetadataBuilder_build(int64_t this_arg) { + LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv); + LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ"); + *ret_conv = RefundMaybeWithDerivedMetadataBuilder_build(this_arg_conv); + return tag_ptr(ret_conv, true); +} + void CS_LDK_Refund_free(int64_t this_obj) { LDKRefund this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -62015,6 +67943,16 @@ int64_t CS_LDK_Refund_payer_note(int64_t this_arg) { return ret_ref; } +int64_t CS_LDK_Refund_hash(int64_t o) { + LDKRefund o_conv; + o_conv.inner = untag_ptr(o); + o_conv.is_owned = ptr_is_owned(o); + CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv); + o_conv.is_owned = false; + int64_t ret_conv = Refund_hash(&o_conv); + return ret_conv; +} + int8_tArray CS_LDK_Refund_write(int64_t obj) { LDKRefund obj_conv; obj_conv.inner = untag_ptr(obj); @@ -62246,6 +68184,16 @@ int64_t CS_LDK_NodeId_from_pubkey(int8_tArray pubkey) { return ret_ref; } +int64_t CS_LDK_NodeId_from_slice(int8_tArray bytes) { + LDKu8slice bytes_ref; + bytes_ref.datalen = bytes->arr_len; + bytes_ref.data = bytes->elems; + LDKCResult_NodeIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeIdDecodeErrorZ), "LDKCResult_NodeIdDecodeErrorZ"); + *ret_conv = NodeId_from_slice(bytes_ref); + FREE(bytes); + return tag_ptr(ret_conv, true); +} + int8_tArray CS_LDK_NodeId_as_slice(int64_t this_arg) { LDKNodeId this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -63119,6 +69067,32 @@ int64_t CS_LDK_DirectedChannelInfo_effective_capacity(int64_t this_arg) { return ret_ref; } +int64_t CS_LDK_DirectedChannelInfo_source(int64_t this_arg) { + LDKDirectedChannelInfo this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKNodeId ret_var = DirectedChannelInfo_source(&this_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_DirectedChannelInfo_target(int64_t this_arg) { + LDKDirectedChannelInfo this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKNodeId ret_var = DirectedChannelInfo_target(&this_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + void CS_LDK_EffectiveCapacity_free(int64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -63839,6 +69813,16 @@ jboolean CS_LDK_NodeInfo_eq(int64_t a, int64_t b) { return ret_conv; } +jboolean CS_LDK_NodeInfo_is_tor_only(int64_t this_arg) { + LDKNodeInfo this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + jboolean ret_conv = NodeInfo_is_tor_only(&this_arg_conv); + return ret_conv; +} + int8_tArray CS_LDK_NodeInfo_write(int64_t obj) { LDKNodeInfo obj_conv; obj_conv.inner = untag_ptr(obj); @@ -67995,7 +73979,34 @@ void CS_LDK_DelayedPaymentOutputDescriptor_set_channel_value_satoshis(int64_t t DelayedPaymentOutputDescriptor_set_channel_value_satoshis(&this_ptr_conv, val); } -int64_t CS_LDK_DelayedPaymentOutputDescriptor_new(int64_t outpoint_arg, int8_tArray per_commitment_point_arg, int16_t to_self_delay_arg, int64_t output_arg, int64_t revocation_pubkey_arg, int8_tArray channel_keys_id_arg, int64_t channel_value_satoshis_arg) { +int64_t CS_LDK_DelayedPaymentOutputDescriptor_get_channel_transaction_parameters(int64_t this_ptr) { + LDKDelayedPaymentOutputDescriptor this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelTransactionParameters ret_var = DelayedPaymentOutputDescriptor_get_channel_transaction_parameters(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void CS_LDK_DelayedPaymentOutputDescriptor_set_channel_transaction_parameters(int64_t this_ptr, int64_t val) { + LDKDelayedPaymentOutputDescriptor this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKChannelTransactionParameters val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelTransactionParameters_clone(&val_conv); + DelayedPaymentOutputDescriptor_set_channel_transaction_parameters(&this_ptr_conv, val_conv); +} + +int64_t CS_LDK_DelayedPaymentOutputDescriptor_new(int64_t outpoint_arg, int8_tArray per_commitment_point_arg, int16_t to_self_delay_arg, int64_t output_arg, int64_t revocation_pubkey_arg, int8_tArray channel_keys_id_arg, int64_t channel_value_satoshis_arg, int64_t channel_transaction_parameters_arg) { LDKOutPoint outpoint_arg_conv; outpoint_arg_conv.inner = untag_ptr(outpoint_arg); outpoint_arg_conv.is_owned = ptr_is_owned(outpoint_arg); @@ -68016,7 +74027,12 @@ int64_t CS_LDK_DelayedPaymentOutputDescriptor_new(int64_t outpoint_arg, int8_tA LDKThirtyTwoBytes channel_keys_id_arg_ref; CHECK(channel_keys_id_arg->arr_len == 32); memcpy(channel_keys_id_arg_ref.data, channel_keys_id_arg->elems, 32); FREE(channel_keys_id_arg); - LDKDelayedPaymentOutputDescriptor ret_var = DelayedPaymentOutputDescriptor_new(outpoint_arg_conv, per_commitment_point_arg_ref, to_self_delay_arg, output_arg_conv, revocation_pubkey_arg_conv, channel_keys_id_arg_ref, channel_value_satoshis_arg); + LDKChannelTransactionParameters channel_transaction_parameters_arg_conv; + channel_transaction_parameters_arg_conv.inner = untag_ptr(channel_transaction_parameters_arg); + channel_transaction_parameters_arg_conv.is_owned = ptr_is_owned(channel_transaction_parameters_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_transaction_parameters_arg_conv); + channel_transaction_parameters_arg_conv = ChannelTransactionParameters_clone(&channel_transaction_parameters_arg_conv); + LDKDelayedPaymentOutputDescriptor ret_var = DelayedPaymentOutputDescriptor_new(outpoint_arg_conv, per_commitment_point_arg_ref, to_self_delay_arg, output_arg_conv, revocation_pubkey_arg_conv, channel_keys_id_arg_ref, channel_value_satoshis_arg, channel_transaction_parameters_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -68700,6 +74716,29 @@ void CS_LDK_HTLCDescriptor_set_channel_derivation_parameters(int64_t this_ptr, HTLCDescriptor_set_channel_derivation_parameters(&this_ptr_conv, val_conv); } +int8_tArray CS_LDK_HTLCDescriptor_get_commitment_txid(int64_t this_ptr) { + LDKHTLCDescriptor this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(32, __LINE__); + memcpy(ret_arr->elems, *HTLCDescriptor_get_commitment_txid(&this_ptr_conv), 32); + return ret_arr; +} + +void CS_LDK_HTLCDescriptor_set_commitment_txid(int64_t this_ptr, int8_tArray val) { + LDKHTLCDescriptor this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKThirtyTwoBytes val_ref; + CHECK(val->arr_len == 32); + memcpy(val_ref.data, val->elems, 32); FREE(val); + HTLCDescriptor_set_commitment_txid(&this_ptr_conv, val_ref); +} + int64_t CS_LDK_HTLCDescriptor_get_per_commitment_number(int64_t this_ptr) { LDKHTLCDescriptor this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); @@ -68836,6 +74875,37 @@ void CS_LDK_HTLCDescriptor_set_counterparty_sig(int64_t this_ptr, int8_tArray v HTLCDescriptor_set_counterparty_sig(&this_ptr_conv, val_ref); } +int64_t CS_LDK_HTLCDescriptor_new(int64_t channel_derivation_parameters_arg, int8_tArray commitment_txid_arg, int64_t per_commitment_number_arg, int8_tArray per_commitment_point_arg, int32_t feerate_per_kw_arg, int64_t htlc_arg, int64_t preimage_arg, int8_tArray counterparty_sig_arg) { + LDKChannelDerivationParameters channel_derivation_parameters_arg_conv; + channel_derivation_parameters_arg_conv.inner = untag_ptr(channel_derivation_parameters_arg); + channel_derivation_parameters_arg_conv.is_owned = ptr_is_owned(channel_derivation_parameters_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_derivation_parameters_arg_conv); + channel_derivation_parameters_arg_conv = ChannelDerivationParameters_clone(&channel_derivation_parameters_arg_conv); + LDKThirtyTwoBytes commitment_txid_arg_ref; + CHECK(commitment_txid_arg->arr_len == 32); + memcpy(commitment_txid_arg_ref.data, commitment_txid_arg->elems, 32); FREE(commitment_txid_arg); + LDKPublicKey per_commitment_point_arg_ref; + CHECK(per_commitment_point_arg->arr_len == 33); + memcpy(per_commitment_point_arg_ref.compressed_form, per_commitment_point_arg->elems, 33); FREE(per_commitment_point_arg); + LDKHTLCOutputInCommitment htlc_arg_conv; + htlc_arg_conv.inner = untag_ptr(htlc_arg); + htlc_arg_conv.is_owned = ptr_is_owned(htlc_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(htlc_arg_conv); + htlc_arg_conv = HTLCOutputInCommitment_clone(&htlc_arg_conv); + void* preimage_arg_ptr = untag_ptr(preimage_arg); + CHECK_ACCESS(preimage_arg_ptr); + LDKCOption_ThirtyTwoBytesZ preimage_arg_conv = *(LDKCOption_ThirtyTwoBytesZ*)(preimage_arg_ptr); + preimage_arg_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(preimage_arg)); + LDKECDSASignature counterparty_sig_arg_ref; + CHECK(counterparty_sig_arg->arr_len == 64); + memcpy(counterparty_sig_arg_ref.compact_form, counterparty_sig_arg->elems, 64); FREE(counterparty_sig_arg); + LDKHTLCDescriptor ret_var = HTLCDescriptor_new(channel_derivation_parameters_arg_conv, commitment_txid_arg_ref, per_commitment_number_arg, per_commitment_point_arg_ref, feerate_per_kw_arg, htlc_arg_conv, preimage_arg_conv, counterparty_sig_arg_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + static inline uint64_t HTLCDescriptor_clone_ptr(LDKHTLCDescriptor *NONNULL_PTR arg) { LDKHTLCDescriptor ret_var = HTLCDescriptor_clone(arg); int64_t ret_ref = 0; @@ -69040,6 +75110,15 @@ void CS_LDK_NodeSigner_free(int64_t this_ptr) { NodeSigner_free(this_ptr_conv); } +void CS_LDK_OutputSpender_free(int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKOutputSpender this_ptr_conv = *(LDKOutputSpender*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + OutputSpender_free(this_ptr_conv); +} + void CS_LDK_SignerProvider_free(int64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -69049,6 +75128,15 @@ void CS_LDK_SignerProvider_free(int64_t this_ptr) { SignerProvider_free(this_ptr_conv); } +void CS_LDK_ChangeDestinationSource_free(int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKChangeDestinationSource this_ptr_conv = *(LDKChangeDestinationSource*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + ChangeDestinationSource_free(this_ptr_conv); +} + void CS_LDK_InMemorySigner_free(int64_t this_obj) { LDKInMemorySigner this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -69540,76 +75628,36 @@ int64_t CS_LDK_KeysManager_sign_spendable_outputs_psbt(int64_t this_arg, int64_ return tag_ptr(ret_conv, true); } -int64_t CS_LDK_KeysManager_spend_spendable_outputs(int64_t this_arg, int64_tArray descriptors, int64_tArray outputs, int8_tArray change_destination_script, int32_t feerate_sat_per_1000_weight, int64_t locktime) { +int64_t CS_LDK_KeysManager_as_EntropySource(int64_t this_arg) { LDKKeysManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKCVec_SpendableOutputDescriptorZ descriptors_constr; - descriptors_constr.datalen = descriptors->arr_len; - if (descriptors_constr.datalen > 0) - descriptors_constr.data = MALLOC(descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements"); - else - descriptors_constr.data = NULL; - int64_t* descriptors_vals = descriptors->elems; - for (size_t b = 0; b < descriptors_constr.datalen; b++) { - int64_t descriptors_conv_27 = descriptors_vals[b]; - void* descriptors_conv_27_ptr = untag_ptr(descriptors_conv_27); - CHECK_ACCESS(descriptors_conv_27_ptr); - LDKSpendableOutputDescriptor descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(descriptors_conv_27_ptr); - descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptors_conv_27)); - descriptors_constr.data[b] = descriptors_conv_27_conv; - } - FREE(descriptors); - LDKCVec_TxOutZ outputs_constr; - outputs_constr.datalen = outputs->arr_len; - if (outputs_constr.datalen > 0) - outputs_constr.data = MALLOC(outputs_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements"); - else - outputs_constr.data = NULL; - int64_t* outputs_vals = outputs->elems; - for (size_t h = 0; h < outputs_constr.datalen; h++) { - int64_t outputs_conv_7 = outputs_vals[h]; - void* outputs_conv_7_ptr = untag_ptr(outputs_conv_7); - CHECK_ACCESS(outputs_conv_7_ptr); - LDKTxOut outputs_conv_7_conv = *(LDKTxOut*)(outputs_conv_7_ptr); - outputs_conv_7_conv = TxOut_clone((LDKTxOut*)untag_ptr(outputs_conv_7)); - outputs_constr.data[h] = outputs_conv_7_conv; - } - FREE(outputs); - LDKCVec_u8Z change_destination_script_ref; - change_destination_script_ref.datalen = change_destination_script->arr_len; - change_destination_script_ref.data = MALLOC(change_destination_script_ref.datalen, "LDKCVec_u8Z Bytes"); - memcpy(change_destination_script_ref.data, change_destination_script->elems, change_destination_script_ref.datalen); FREE(change_destination_script); - void* locktime_ptr = untag_ptr(locktime); - CHECK_ACCESS(locktime_ptr); - LDKCOption_u32Z locktime_conv = *(LDKCOption_u32Z*)(locktime_ptr); - locktime_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(locktime)); - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = KeysManager_spend_spendable_outputs(&this_arg_conv, descriptors_constr, outputs_constr, change_destination_script_ref, feerate_sat_per_1000_weight, locktime_conv); - return tag_ptr(ret_conv, true); + LDKEntropySource* ret_ret = MALLOC(sizeof(LDKEntropySource), "LDKEntropySource"); + *ret_ret = KeysManager_as_EntropySource(&this_arg_conv); + return tag_ptr(ret_ret, true); } -int64_t CS_LDK_KeysManager_as_EntropySource(int64_t this_arg) { +int64_t CS_LDK_KeysManager_as_NodeSigner(int64_t this_arg) { LDKKeysManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKEntropySource* ret_ret = MALLOC(sizeof(LDKEntropySource), "LDKEntropySource"); - *ret_ret = KeysManager_as_EntropySource(&this_arg_conv); + LDKNodeSigner* ret_ret = MALLOC(sizeof(LDKNodeSigner), "LDKNodeSigner"); + *ret_ret = KeysManager_as_NodeSigner(&this_arg_conv); return tag_ptr(ret_ret, true); } -int64_t CS_LDK_KeysManager_as_NodeSigner(int64_t this_arg) { +int64_t CS_LDK_KeysManager_as_OutputSpender(int64_t this_arg) { LDKKeysManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); this_arg_conv.is_owned = ptr_is_owned(this_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); this_arg_conv.is_owned = false; - LDKNodeSigner* ret_ret = MALLOC(sizeof(LDKNodeSigner), "LDKNodeSigner"); - *ret_ret = KeysManager_as_NodeSigner(&this_arg_conv); + LDKOutputSpender* ret_ret = MALLOC(sizeof(LDKOutputSpender), "LDKOutputSpender"); + *ret_ret = KeysManager_as_OutputSpender(&this_arg_conv); return tag_ptr(ret_ret, true); } @@ -69654,6 +75702,17 @@ int64_t CS_LDK_PhantomKeysManager_as_NodeSigner(int64_t this_arg) { return tag_ptr(ret_ret, true); } +int64_t CS_LDK_PhantomKeysManager_as_OutputSpender(int64_t this_arg) { + LDKPhantomKeysManager this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKOutputSpender* ret_ret = MALLOC(sizeof(LDKOutputSpender), "LDKOutputSpender"); + *ret_ret = PhantomKeysManager_as_OutputSpender(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + int64_t CS_LDK_PhantomKeysManager_as_SignerProvider(int64_t this_arg) { LDKPhantomKeysManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -69681,57 +75740,6 @@ int64_t CS_LDK_PhantomKeysManager_new(int8_tArray seed, int64_t starting_time_s return ret_ref; } -int64_t CS_LDK_PhantomKeysManager_spend_spendable_outputs(int64_t this_arg, int64_tArray descriptors, int64_tArray outputs, int8_tArray change_destination_script, int32_t feerate_sat_per_1000_weight, int64_t locktime) { - LDKPhantomKeysManager this_arg_conv; - this_arg_conv.inner = untag_ptr(this_arg); - this_arg_conv.is_owned = ptr_is_owned(this_arg); - CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); - this_arg_conv.is_owned = false; - LDKCVec_SpendableOutputDescriptorZ descriptors_constr; - descriptors_constr.datalen = descriptors->arr_len; - if (descriptors_constr.datalen > 0) - descriptors_constr.data = MALLOC(descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements"); - else - descriptors_constr.data = NULL; - int64_t* descriptors_vals = descriptors->elems; - for (size_t b = 0; b < descriptors_constr.datalen; b++) { - int64_t descriptors_conv_27 = descriptors_vals[b]; - void* descriptors_conv_27_ptr = untag_ptr(descriptors_conv_27); - CHECK_ACCESS(descriptors_conv_27_ptr); - LDKSpendableOutputDescriptor descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(descriptors_conv_27_ptr); - descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptors_conv_27)); - descriptors_constr.data[b] = descriptors_conv_27_conv; - } - FREE(descriptors); - LDKCVec_TxOutZ outputs_constr; - outputs_constr.datalen = outputs->arr_len; - if (outputs_constr.datalen > 0) - outputs_constr.data = MALLOC(outputs_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements"); - else - outputs_constr.data = NULL; - int64_t* outputs_vals = outputs->elems; - for (size_t h = 0; h < outputs_constr.datalen; h++) { - int64_t outputs_conv_7 = outputs_vals[h]; - void* outputs_conv_7_ptr = untag_ptr(outputs_conv_7); - CHECK_ACCESS(outputs_conv_7_ptr); - LDKTxOut outputs_conv_7_conv = *(LDKTxOut*)(outputs_conv_7_ptr); - outputs_conv_7_conv = TxOut_clone((LDKTxOut*)untag_ptr(outputs_conv_7)); - outputs_constr.data[h] = outputs_conv_7_conv; - } - FREE(outputs); - LDKCVec_u8Z change_destination_script_ref; - change_destination_script_ref.datalen = change_destination_script->arr_len; - change_destination_script_ref.data = MALLOC(change_destination_script_ref.datalen, "LDKCVec_u8Z Bytes"); - memcpy(change_destination_script_ref.data, change_destination_script->elems, change_destination_script_ref.datalen); FREE(change_destination_script); - void* locktime_ptr = untag_ptr(locktime); - CHECK_ACCESS(locktime_ptr); - LDKCOption_u32Z locktime_conv = *(LDKCOption_u32Z*)(locktime_ptr); - locktime_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(locktime)); - LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ"); - *ret_conv = PhantomKeysManager_spend_spendable_outputs(&this_arg_conv, descriptors_constr, outputs_constr, change_destination_script_ref, feerate_sat_per_1000_weight, locktime_conv); - return tag_ptr(ret_conv, true); -} - int64_t CS_LDK_PhantomKeysManager_derive_channel_keys(int64_t this_arg, int64_t channel_value_satoshis, int8_tArray params) { LDKPhantomKeysManager this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); @@ -69771,6 +75779,36 @@ int8_tArray CS_LDK_PhantomKeysManager_get_phantom_node_secret_key(int64_t this_ return ret_arr; } +void CS_LDK_RandomBytes_free(int64_t this_obj) { + LDKRandomBytes this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + RandomBytes_free(this_obj_conv); +} + +int64_t CS_LDK_RandomBytes_new(int8_tArray seed) { + LDKThirtyTwoBytes seed_ref; + CHECK(seed->arr_len == 32); + memcpy(seed_ref.data, seed->elems, 32); FREE(seed); + LDKRandomBytes ret_var = RandomBytes_new(seed_ref); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_RandomBytes_as_EntropySource(int64_t this_arg) { + LDKRandomBytes this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKEntropySource* ret_ret = MALLOC(sizeof(LDKEntropySource), "LDKEntropySource"); + *ret_ret = RandomBytes_as_EntropySource(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + void CS_LDK_EcdsaChannelSigner_free(int64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -70091,6 +76129,29 @@ int64_t CS_LDK_Destination_blinded_path(int64_t a) { return ret_ref; } +int64_t CS_LDK_Destination_hash(int64_t o) { + LDKDestination* o_conv = (LDKDestination*)untag_ptr(o); + int64_t ret_conv = Destination_hash(o_conv); + return ret_conv; +} + +jboolean CS_LDK_Destination_eq(int64_t a, int64_t b) { + LDKDestination* a_conv = (LDKDestination*)untag_ptr(a); + LDKDestination* b_conv = (LDKDestination*)untag_ptr(b); + jboolean ret_conv = Destination_eq(a_conv, b_conv); + return ret_conv; +} + +void CS_LDK_Destination_resolve(int64_t this_arg, int64_t network_graph) { + LDKDestination* this_arg_conv = (LDKDestination*)untag_ptr(this_arg); + LDKReadOnlyNetworkGraph network_graph_conv; + network_graph_conv.inner = untag_ptr(network_graph); + network_graph_conv.is_owned = ptr_is_owned(network_graph); + CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv); + network_graph_conv.is_owned = false; + Destination_resolve(this_arg_conv, &network_graph_conv); +} + void CS_LDK_SendSuccess_free(int64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -70137,6 +76198,12 @@ int64_t CS_LDK_SendSuccess_buffered_awaiting_connection(int8_tArray a) { return ret_ref; } +int64_t CS_LDK_SendSuccess_hash(int64_t o) { + LDKSendSuccess* o_conv = (LDKSendSuccess*)untag_ptr(o); + int64_t ret_conv = SendSuccess_hash(o_conv); + return ret_conv; +} + jboolean CS_LDK_SendSuccess_eq(int64_t a, int64_t b) { LDKSendSuccess* a_conv = (LDKSendSuccess*)untag_ptr(a); LDKSendSuccess* b_conv = (LDKSendSuccess*)untag_ptr(b); @@ -70233,6 +76300,13 @@ int64_t CS_LDK_SendError_get_node_id_failed() { return ret_ref; } +int64_t CS_LDK_SendError_unresolved_introduction_node() { + LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError"); + *ret_copy = SendError_unresolved_introduction_node(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + int64_t CS_LDK_SendError_blinded_path_advance_failed() { LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError"); *ret_copy = SendError_blinded_path_advance_failed(); @@ -70240,6 +76314,12 @@ int64_t CS_LDK_SendError_blinded_path_advance_failed() { return ret_ref; } +int64_t CS_LDK_SendError_hash(int64_t o) { + LDKSendError* o_conv = (LDKSendError*)untag_ptr(o); + int64_t ret_conv = SendError_hash(o_conv); + return ret_conv; +} + jboolean CS_LDK_SendError_eq(int64_t a, int64_t b) { LDKSendError* a_conv = (LDKSendError*)untag_ptr(a); LDKSendError* b_conv = (LDKSendError*)untag_ptr(b); @@ -70285,17 +76365,18 @@ int64_t CS_LDK_PeeledOnion_clone(int64_t orig) { return ret_ref; } -int64_t CS_LDK_PeeledOnion_forward(int8_tArray a, int64_t b) { - LDKPublicKey a_ref; - CHECK(a->arr_len == 33); - memcpy(a_ref.compressed_form, a->elems, 33); FREE(a); +int64_t CS_LDK_PeeledOnion_forward(int64_t a, int64_t b) { + void* a_ptr = untag_ptr(a); + CHECK_ACCESS(a_ptr); + LDKNextMessageHop a_conv = *(LDKNextMessageHop*)(a_ptr); + a_conv = NextMessageHop_clone((LDKNextMessageHop*)untag_ptr(a)); LDKOnionMessage b_conv; b_conv.inner = untag_ptr(b); b_conv.is_owned = ptr_is_owned(b); CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); b_conv = OnionMessage_clone(&b_conv); LDKPeeledOnion *ret_copy = MALLOC(sizeof(LDKPeeledOnion), "LDKPeeledOnion"); - *ret_copy = PeeledOnion_forward(a_ref, b_conv); + *ret_copy = PeeledOnion_forward(a_conv, b_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -70319,13 +76400,53 @@ int64_t CS_LDK_PeeledOnion_receive(int64_t a, int8_tArray b, int64_t c) { return ret_ref; } -int64_t CS_LDK_create_onion_message(int64_t entropy_source, int64_t node_signer, int64_t path, int64_t contents, int64_t reply_path) { +int64_t CS_LDK_create_onion_message_resolving_destination(int64_t entropy_source, int64_t node_signer, int64_t node_id_lookup, int64_t network_graph, int64_t path, int64_t contents, int64_t reply_path) { + void* entropy_source_ptr = untag_ptr(entropy_source); + if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } + LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + void* node_signer_ptr = untag_ptr(node_signer); + if (ptr_is_owned(node_signer)) { CHECK_ACCESS(node_signer_ptr); } + LDKNodeSigner* node_signer_conv = (LDKNodeSigner*)node_signer_ptr; + void* node_id_lookup_ptr = untag_ptr(node_id_lookup); + if (ptr_is_owned(node_id_lookup)) { CHECK_ACCESS(node_id_lookup_ptr); } + LDKNodeIdLookUp* node_id_lookup_conv = (LDKNodeIdLookUp*)node_id_lookup_ptr; + LDKReadOnlyNetworkGraph network_graph_conv; + network_graph_conv.inner = untag_ptr(network_graph); + network_graph_conv.is_owned = ptr_is_owned(network_graph); + CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv); + network_graph_conv.is_owned = false; + LDKOnionMessagePath path_conv; + path_conv.inner = untag_ptr(path); + path_conv.is_owned = ptr_is_owned(path); + CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv); + path_conv = OnionMessagePath_clone(&path_conv); + void* contents_ptr = untag_ptr(contents); + CHECK_ACCESS(contents_ptr); + LDKOnionMessageContents contents_conv = *(LDKOnionMessageContents*)(contents_ptr); + if (contents_conv.free == LDKOnionMessageContents_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKOnionMessageContents_JCalls_cloned(&contents_conv); + } + LDKBlindedPath reply_path_conv; + reply_path_conv.inner = untag_ptr(reply_path); + reply_path_conv.is_owned = ptr_is_owned(reply_path); + CHECK_INNER_FIELD_ACCESS_OR_NULL(reply_path_conv); + reply_path_conv = BlindedPath_clone(&reply_path_conv); + LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ"); + *ret_conv = create_onion_message_resolving_destination(entropy_source_conv, node_signer_conv, node_id_lookup_conv, &network_graph_conv, path_conv, contents_conv, reply_path_conv); + return tag_ptr(ret_conv, true); +} + +int64_t CS_LDK_create_onion_message(int64_t entropy_source, int64_t node_signer, int64_t node_id_lookup, int64_t path, int64_t contents, int64_t reply_path) { void* entropy_source_ptr = untag_ptr(entropy_source); if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; void* node_signer_ptr = untag_ptr(node_signer); if (ptr_is_owned(node_signer)) { CHECK_ACCESS(node_signer_ptr); } LDKNodeSigner* node_signer_conv = (LDKNodeSigner*)node_signer_ptr; + void* node_id_lookup_ptr = untag_ptr(node_id_lookup); + if (ptr_is_owned(node_id_lookup)) { CHECK_ACCESS(node_id_lookup_ptr); } + LDKNodeIdLookUp* node_id_lookup_conv = (LDKNodeIdLookUp*)node_id_lookup_ptr; LDKOnionMessagePath path_conv; path_conv.inner = untag_ptr(path); path_conv.is_owned = ptr_is_owned(path); @@ -70344,7 +76465,7 @@ int64_t CS_LDK_create_onion_message(int64_t entropy_source, int64_t node_signer CHECK_INNER_FIELD_ACCESS_OR_NULL(reply_path_conv); reply_path_conv = BlindedPath_clone(&reply_path_conv); LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ"); - *ret_conv = create_onion_message(entropy_source_conv, node_signer_conv, path_conv, contents_conv, reply_path_conv); + *ret_conv = create_onion_message(entropy_source_conv, node_signer_conv, node_id_lookup_conv, path_conv, contents_conv, reply_path_conv); return tag_ptr(ret_conv, true); } @@ -70380,7 +76501,7 @@ int64_t CS_LDK_peel_onion_message(int64_t msg, int64_t node_signer, int64_t log return tag_ptr(ret_conv, true); } -int64_t CS_LDK_OnionMessenger_new(int64_t entropy_source, int64_t node_signer, int64_t logger, int64_t message_router, int64_t offers_handler, int64_t custom_handler) { +int64_t CS_LDK_OnionMessenger_new(int64_t entropy_source, int64_t node_signer, int64_t logger, int64_t node_id_lookup, int64_t message_router, int64_t offers_handler, int64_t custom_handler) { void* entropy_source_ptr = untag_ptr(entropy_source); CHECK_ACCESS(entropy_source_ptr); LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); @@ -70402,6 +76523,13 @@ int64_t CS_LDK_OnionMessenger_new(int64_t entropy_source, int64_t node_signer, // If this_arg is a JCalls struct, then we need to increment the refcnt in it. LDKLogger_JCalls_cloned(&logger_conv); } + void* node_id_lookup_ptr = untag_ptr(node_id_lookup); + CHECK_ACCESS(node_id_lookup_ptr); + LDKNodeIdLookUp node_id_lookup_conv = *(LDKNodeIdLookUp*)(node_id_lookup_ptr); + if (node_id_lookup_conv.free == LDKNodeIdLookUp_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKNodeIdLookUp_JCalls_cloned(&node_id_lookup_conv); + } void* message_router_ptr = untag_ptr(message_router); CHECK_ACCESS(message_router_ptr); LDKMessageRouter message_router_conv = *(LDKMessageRouter*)(message_router_ptr); @@ -70423,7 +76551,7 @@ int64_t CS_LDK_OnionMessenger_new(int64_t entropy_source, int64_t node_signer, // If this_arg is a JCalls struct, then we need to increment the refcnt in it. LDKCustomOnionMessageHandler_JCalls_cloned(&custom_handler_conv); } - LDKOnionMessenger ret_var = OnionMessenger_new(entropy_source_conv, node_signer_conv, logger_conv, message_router_conv, offers_handler_conv, custom_handler_conv); + LDKOnionMessenger ret_var = OnionMessenger_new(entropy_source_conv, node_signer_conv, logger_conv, node_id_lookup_conv, message_router_conv, offers_handler_conv, custom_handler_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -70862,6 +76990,65 @@ void CS_LDK_OnionMessageContents_free(int64_t this_ptr) { OnionMessageContents_free(this_ptr_conv); } +void CS_LDK_NextMessageHop_free(int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKNextMessageHop this_ptr_conv = *(LDKNextMessageHop*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + NextMessageHop_free(this_ptr_conv); +} + +static inline uint64_t NextMessageHop_clone_ptr(LDKNextMessageHop *NONNULL_PTR arg) { + LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop"); + *ret_copy = NextMessageHop_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t CS_LDK_NextMessageHop_clone_ptr(int64_t arg) { + LDKNextMessageHop* arg_conv = (LDKNextMessageHop*)untag_ptr(arg); + int64_t ret_conv = NextMessageHop_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_NextMessageHop_clone(int64_t orig) { + LDKNextMessageHop* orig_conv = (LDKNextMessageHop*)untag_ptr(orig); + LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop"); + *ret_copy = NextMessageHop_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_NextMessageHop_node_id(int8_tArray a) { + LDKPublicKey a_ref; + CHECK(a->arr_len == 33); + memcpy(a_ref.compressed_form, a->elems, 33); FREE(a); + LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop"); + *ret_copy = NextMessageHop_node_id(a_ref); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_NextMessageHop_short_channel_id(int64_t a) { + LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop"); + *ret_copy = NextMessageHop_short_channel_id(a); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_NextMessageHop_hash(int64_t o) { + LDKNextMessageHop* o_conv = (LDKNextMessageHop*)untag_ptr(o); + int64_t ret_conv = NextMessageHop_hash(o_conv); + return ret_conv; +} + +jboolean CS_LDK_NextMessageHop_eq(int64_t a, int64_t b) { + LDKNextMessageHop* a_conv = (LDKNextMessageHop*)untag_ptr(a); + LDKNextMessageHop* b_conv = (LDKNextMessageHop*)untag_ptr(b); + jboolean ret_conv = NextMessageHop_eq(a_conv, b_conv); + return ret_conv; +} + void CS_LDK_BlindedPath_free(int64_t this_obj) { LDKBlindedPath this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -70870,27 +77057,29 @@ void CS_LDK_BlindedPath_free(int64_t this_obj) { BlindedPath_free(this_obj_conv); } -int8_tArray CS_LDK_BlindedPath_get_introduction_node_id(int64_t this_ptr) { +int64_t CS_LDK_BlindedPath_get_introduction_node(int64_t this_ptr) { LDKBlindedPath this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(33, __LINE__); - memcpy(ret_arr->elems, BlindedPath_get_introduction_node_id(&this_ptr_conv).compressed_form, 33); - return ret_arr; + LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode"); + *ret_copy = BlindedPath_get_introduction_node(&this_ptr_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; } -void CS_LDK_BlindedPath_set_introduction_node_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_BlindedPath_set_introduction_node(int64_t this_ptr, int64_t val) { LDKBlindedPath this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKPublicKey val_ref; - CHECK(val->arr_len == 33); - memcpy(val_ref.compressed_form, val->elems, 33); FREE(val); - BlindedPath_set_introduction_node_id(&this_ptr_conv, val_ref); + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKIntroductionNode val_conv = *(LDKIntroductionNode*)(val_ptr); + val_conv = IntroductionNode_clone((LDKIntroductionNode*)untag_ptr(val)); + BlindedPath_set_introduction_node(&this_ptr_conv, val_conv); } int8_tArray CS_LDK_BlindedPath_get_blinding_point(int64_t this_ptr) { @@ -70964,10 +77153,11 @@ void CS_LDK_BlindedPath_set_blinded_hops(int64_t this_ptr, int64_tArray val) { BlindedPath_set_blinded_hops(&this_ptr_conv, val_constr); } -int64_t CS_LDK_BlindedPath_new(int8_tArray introduction_node_id_arg, int8_tArray blinding_point_arg, int64_tArray blinded_hops_arg) { - LDKPublicKey introduction_node_id_arg_ref; - CHECK(introduction_node_id_arg->arr_len == 33); - memcpy(introduction_node_id_arg_ref.compressed_form, introduction_node_id_arg->elems, 33); FREE(introduction_node_id_arg); +int64_t CS_LDK_BlindedPath_new(int64_t introduction_node_arg, int8_tArray blinding_point_arg, int64_tArray blinded_hops_arg) { + void* introduction_node_arg_ptr = untag_ptr(introduction_node_arg); + CHECK_ACCESS(introduction_node_arg_ptr); + LDKIntroductionNode introduction_node_arg_conv = *(LDKIntroductionNode*)(introduction_node_arg_ptr); + introduction_node_arg_conv = IntroductionNode_clone((LDKIntroductionNode*)untag_ptr(introduction_node_arg)); LDKPublicKey blinding_point_arg_ref; CHECK(blinding_point_arg->arr_len == 33); memcpy(blinding_point_arg_ref.compressed_form, blinding_point_arg->elems, 33); FREE(blinding_point_arg); @@ -70988,7 +77178,7 @@ int64_t CS_LDK_BlindedPath_new(int8_tArray introduction_node_id_arg, int8_tArra blinded_hops_arg_constr.data[m] = blinded_hops_arg_conv_12_conv; } FREE(blinded_hops_arg); - LDKBlindedPath ret_var = BlindedPath_new(introduction_node_id_arg_ref, blinding_point_arg_ref, blinded_hops_arg_constr); + LDKBlindedPath ret_var = BlindedPath_new(introduction_node_arg_conv, blinding_point_arg_ref, blinded_hops_arg_constr); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -71050,6 +77240,131 @@ jboolean CS_LDK_BlindedPath_eq(int64_t a, int64_t b) { return ret_conv; } +void CS_LDK_IntroductionNode_free(int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKIntroductionNode this_ptr_conv = *(LDKIntroductionNode*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + IntroductionNode_free(this_ptr_conv); +} + +static inline uint64_t IntroductionNode_clone_ptr(LDKIntroductionNode *NONNULL_PTR arg) { + LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode"); + *ret_copy = IntroductionNode_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t CS_LDK_IntroductionNode_clone_ptr(int64_t arg) { + LDKIntroductionNode* arg_conv = (LDKIntroductionNode*)untag_ptr(arg); + int64_t ret_conv = IntroductionNode_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_IntroductionNode_clone(int64_t orig) { + LDKIntroductionNode* orig_conv = (LDKIntroductionNode*)untag_ptr(orig); + LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode"); + *ret_copy = IntroductionNode_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_IntroductionNode_node_id(int8_tArray a) { + LDKPublicKey a_ref; + CHECK(a->arr_len == 33); + memcpy(a_ref.compressed_form, a->elems, 33); FREE(a); + LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode"); + *ret_copy = IntroductionNode_node_id(a_ref); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_IntroductionNode_directed_short_channel_id(int32_t a, int64_t b) { + LDKDirection a_conv = LDKDirection_from_cs(a); + LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode"); + *ret_copy = IntroductionNode_directed_short_channel_id(a_conv, b); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_IntroductionNode_hash(int64_t o) { + LDKIntroductionNode* o_conv = (LDKIntroductionNode*)untag_ptr(o); + int64_t ret_conv = IntroductionNode_hash(o_conv); + return ret_conv; +} + +jboolean CS_LDK_IntroductionNode_eq(int64_t a, int64_t b) { + LDKIntroductionNode* a_conv = (LDKIntroductionNode*)untag_ptr(a); + LDKIntroductionNode* b_conv = (LDKIntroductionNode*)untag_ptr(b); + jboolean ret_conv = IntroductionNode_eq(a_conv, b_conv); + return ret_conv; +} + +int32_t CS_LDK_Direction_clone(int64_t orig) { + LDKDirection* orig_conv = (LDKDirection*)untag_ptr(orig); + int32_t ret_conv = LDKDirection_to_cs(Direction_clone(orig_conv)); + return ret_conv; +} + +int32_t CS_LDK_Direction_node_one() { + int32_t ret_conv = LDKDirection_to_cs(Direction_node_one()); + return ret_conv; +} + +int32_t CS_LDK_Direction_node_two() { + int32_t ret_conv = LDKDirection_to_cs(Direction_node_two()); + return ret_conv; +} + +int64_t CS_LDK_Direction_hash(int64_t o) { + LDKDirection* o_conv = (LDKDirection*)untag_ptr(o); + int64_t ret_conv = Direction_hash(o_conv); + return ret_conv; +} + +jboolean CS_LDK_Direction_eq(int64_t a, int64_t b) { + LDKDirection* a_conv = (LDKDirection*)untag_ptr(a); + LDKDirection* b_conv = (LDKDirection*)untag_ptr(b); + jboolean ret_conv = Direction_eq(a_conv, b_conv); + return ret_conv; +} + +void CS_LDK_NodeIdLookUp_free(int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKNodeIdLookUp this_ptr_conv = *(LDKNodeIdLookUp*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + NodeIdLookUp_free(this_ptr_conv); +} + +void CS_LDK_EmptyNodeIdLookUp_free(int64_t this_obj) { + LDKEmptyNodeIdLookUp this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + EmptyNodeIdLookUp_free(this_obj_conv); +} + +int64_t CS_LDK_EmptyNodeIdLookUp_new() { + LDKEmptyNodeIdLookUp ret_var = EmptyNodeIdLookUp_new(); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +int64_t CS_LDK_EmptyNodeIdLookUp_as_NodeIdLookUp(int64_t this_arg) { + LDKEmptyNodeIdLookUp this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKNodeIdLookUp* ret_ret = MALLOC(sizeof(LDKNodeIdLookUp), "LDKNodeIdLookUp"); + *ret_ret = EmptyNodeIdLookUp_as_NodeIdLookUp(&this_arg_conv); + return tag_ptr(ret_ret, true); +} + void CS_LDK_BlindedHop_free(int64_t this_obj) { LDKBlindedHop this_obj_conv; this_obj_conv.inner = untag_ptr(this_obj); @@ -71182,8 +77497,12 @@ int64_t CS_LDK_BlindedPath_one_hop_for_message(int8_tArray recipient_node_id, i CHECK(recipient_node_id->arr_len == 33); memcpy(recipient_node_id_ref.compressed_form, recipient_node_id->elems, 33); FREE(recipient_node_id); void* entropy_source_ptr = untag_ptr(entropy_source); - if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } - LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } LDKCResult_BlindedPathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedPathNoneZ), "LDKCResult_BlindedPathNoneZ"); *ret_conv = BlindedPath_one_hop_for_message(recipient_node_id_ref, entropy_source_conv); return tag_ptr(ret_conv, true); @@ -71206,14 +77525,18 @@ int64_t CS_LDK_BlindedPath_new_for_message(ptrArray node_pks, int64_t entropy_s } FREE(node_pks); void* entropy_source_ptr = untag_ptr(entropy_source); - if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } - LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } LDKCResult_BlindedPathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedPathNoneZ), "LDKCResult_BlindedPathNoneZ"); *ret_conv = BlindedPath_new_for_message(node_pks_constr, entropy_source_conv); return tag_ptr(ret_conv, true); } -int64_t CS_LDK_BlindedPath_one_hop_for_payment(int8_tArray payee_node_id, int64_t payee_tlvs, int64_t entropy_source) { +int64_t CS_LDK_BlindedPath_one_hop_for_payment(int8_tArray payee_node_id, int64_t payee_tlvs, int16_t min_final_cltv_expiry_delta, int64_t entropy_source) { LDKPublicKey payee_node_id_ref; CHECK(payee_node_id->arr_len == 33); memcpy(payee_node_id_ref.compressed_form, payee_node_id->elems, 33); FREE(payee_node_id); @@ -71223,14 +77546,18 @@ int64_t CS_LDK_BlindedPath_one_hop_for_payment(int8_tArray payee_node_id, int64 CHECK_INNER_FIELD_ACCESS_OR_NULL(payee_tlvs_conv); payee_tlvs_conv = ReceiveTlvs_clone(&payee_tlvs_conv); void* entropy_source_ptr = untag_ptr(entropy_source); - if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } - LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ), "LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ"); - *ret_conv = BlindedPath_one_hop_for_payment(payee_node_id_ref, payee_tlvs_conv, entropy_source_conv); + *ret_conv = BlindedPath_one_hop_for_payment(payee_node_id_ref, payee_tlvs_conv, min_final_cltv_expiry_delta, entropy_source_conv); return tag_ptr(ret_conv, true); } -int64_t CS_LDK_BlindedPath_new_for_payment(int64_tArray intermediate_nodes, int8_tArray payee_node_id, int64_t payee_tlvs, int64_t htlc_maximum_msat, int64_t entropy_source) { +int64_t CS_LDK_BlindedPath_new_for_payment(int64_tArray intermediate_nodes, int8_tArray payee_node_id, int64_t payee_tlvs, int64_t htlc_maximum_msat, int16_t min_final_cltv_expiry_delta, int64_t entropy_source) { LDKCVec_ForwardNodeZ intermediate_nodes_constr; intermediate_nodes_constr.datalen = intermediate_nodes->arr_len; if (intermediate_nodes_constr.datalen > 0) @@ -71257,13 +77584,35 @@ int64_t CS_LDK_BlindedPath_new_for_payment(int64_tArray intermediate_nodes, int CHECK_INNER_FIELD_ACCESS_OR_NULL(payee_tlvs_conv); payee_tlvs_conv = ReceiveTlvs_clone(&payee_tlvs_conv); void* entropy_source_ptr = untag_ptr(entropy_source); - if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); } - LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr; + CHECK_ACCESS(entropy_source_ptr); + LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr); + if (entropy_source_conv.free == LDKEntropySource_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKEntropySource_JCalls_cloned(&entropy_source_conv); + } LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ), "LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ"); - *ret_conv = BlindedPath_new_for_payment(intermediate_nodes_constr, payee_node_id_ref, payee_tlvs_conv, htlc_maximum_msat, entropy_source_conv); + *ret_conv = BlindedPath_new_for_payment(intermediate_nodes_constr, payee_node_id_ref, payee_tlvs_conv, htlc_maximum_msat, min_final_cltv_expiry_delta, entropy_source_conv); return tag_ptr(ret_conv, true); } +int64_t CS_LDK_BlindedPath_public_introduction_node_id(int64_t this_arg, int64_t network_graph) { + LDKBlindedPath this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + LDKReadOnlyNetworkGraph network_graph_conv; + network_graph_conv.inner = untag_ptr(network_graph); + network_graph_conv.is_owned = ptr_is_owned(network_graph); + CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv); + network_graph_conv.is_owned = false; + LDKNodeId ret_var = BlindedPath_public_introduction_node_id(&this_arg_conv, &network_graph_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + int8_tArray CS_LDK_BlindedPath_write(int64_t obj) { LDKBlindedPath obj_conv; obj_conv.inner = untag_ptr(obj); @@ -71652,7 +78001,32 @@ void CS_LDK_ReceiveTlvs_set_payment_constraints(int64_t this_ptr, int64_t val) ReceiveTlvs_set_payment_constraints(&this_ptr_conv, val_conv); } -int64_t CS_LDK_ReceiveTlvs_new(int8_tArray payment_secret_arg, int64_t payment_constraints_arg) { +int64_t CS_LDK_ReceiveTlvs_get_payment_context(int64_t this_ptr) { + LDKReceiveTlvs this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = ReceiveTlvs_get_payment_context(&this_ptr_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +void CS_LDK_ReceiveTlvs_set_payment_context(int64_t this_ptr, int64_t val) { + LDKReceiveTlvs this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + void* val_ptr = untag_ptr(val); + CHECK_ACCESS(val_ptr); + LDKPaymentContext val_conv = *(LDKPaymentContext*)(val_ptr); + val_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(val)); + ReceiveTlvs_set_payment_context(&this_ptr_conv, val_conv); +} + +int64_t CS_LDK_ReceiveTlvs_new(int8_tArray payment_secret_arg, int64_t payment_constraints_arg, int64_t payment_context_arg) { LDKThirtyTwoBytes payment_secret_arg_ref; CHECK(payment_secret_arg->arr_len == 32); memcpy(payment_secret_arg_ref.data, payment_secret_arg->elems, 32); FREE(payment_secret_arg); @@ -71661,7 +78035,11 @@ int64_t CS_LDK_ReceiveTlvs_new(int8_tArray payment_secret_arg, int64_t payment_ payment_constraints_arg_conv.is_owned = ptr_is_owned(payment_constraints_arg); CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_constraints_arg_conv); payment_constraints_arg_conv = PaymentConstraints_clone(&payment_constraints_arg_conv); - LDKReceiveTlvs ret_var = ReceiveTlvs_new(payment_secret_arg_ref, payment_constraints_arg_conv); + void* payment_context_arg_ptr = untag_ptr(payment_context_arg); + CHECK_ACCESS(payment_context_arg_ptr); + LDKPaymentContext payment_context_arg_conv = *(LDKPaymentContext*)(payment_context_arg_ptr); + payment_context_arg_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(payment_context_arg)); + LDKReceiveTlvs ret_var = ReceiveTlvs_new(payment_secret_arg_ref, payment_constraints_arg_conv, payment_context_arg_conv); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -71885,6 +78263,317 @@ int64_t CS_LDK_PaymentConstraints_clone(int64_t orig) { return ret_ref; } +void CS_LDK_PaymentContext_free(int64_t this_ptr) { + if (!ptr_is_owned(this_ptr)) return; + void* this_ptr_ptr = untag_ptr(this_ptr); + CHECK_ACCESS(this_ptr_ptr); + LDKPaymentContext this_ptr_conv = *(LDKPaymentContext*)(this_ptr_ptr); + FREE(untag_ptr(this_ptr)); + PaymentContext_free(this_ptr_conv); +} + +static inline uint64_t PaymentContext_clone_ptr(LDKPaymentContext *NONNULL_PTR arg) { + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = PaymentContext_clone(arg); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} +int64_t CS_LDK_PaymentContext_clone_ptr(int64_t arg) { + LDKPaymentContext* arg_conv = (LDKPaymentContext*)untag_ptr(arg); + int64_t ret_conv = PaymentContext_clone_ptr(arg_conv); + return ret_conv; +} + +int64_t CS_LDK_PaymentContext_clone(int64_t orig) { + LDKPaymentContext* orig_conv = (LDKPaymentContext*)untag_ptr(orig); + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = PaymentContext_clone(orig_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_PaymentContext_unknown(int64_t a) { + LDKUnknownPaymentContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = UnknownPaymentContext_clone(&a_conv); + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = PaymentContext_unknown(a_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_PaymentContext_bolt12_offer(int64_t a) { + LDKBolt12OfferContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = Bolt12OfferContext_clone(&a_conv); + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = PaymentContext_bolt12_offer(a_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_PaymentContext_bolt12_refund(int64_t a) { + LDKBolt12RefundContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv = Bolt12RefundContext_clone(&a_conv); + LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext"); + *ret_copy = PaymentContext_bolt12_refund(a_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +jboolean CS_LDK_PaymentContext_eq(int64_t a, int64_t b) { + LDKPaymentContext* a_conv = (LDKPaymentContext*)untag_ptr(a); + LDKPaymentContext* b_conv = (LDKPaymentContext*)untag_ptr(b); + jboolean ret_conv = PaymentContext_eq(a_conv, b_conv); + return ret_conv; +} + +void CS_LDK_UnknownPaymentContext_free(int64_t this_obj) { + LDKUnknownPaymentContext this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + UnknownPaymentContext_free(this_obj_conv); +} + +static inline uint64_t UnknownPaymentContext_clone_ptr(LDKUnknownPaymentContext *NONNULL_PTR arg) { + LDKUnknownPaymentContext ret_var = UnknownPaymentContext_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t CS_LDK_UnknownPaymentContext_clone_ptr(int64_t arg) { + LDKUnknownPaymentContext arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = UnknownPaymentContext_clone_ptr(&arg_conv); + return ret_conv; +} + +int64_t CS_LDK_UnknownPaymentContext_clone(int64_t orig) { + LDKUnknownPaymentContext orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKUnknownPaymentContext ret_var = UnknownPaymentContext_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +jboolean CS_LDK_UnknownPaymentContext_eq(int64_t a, int64_t b) { + LDKUnknownPaymentContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKUnknownPaymentContext b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = UnknownPaymentContext_eq(&a_conv, &b_conv); + return ret_conv; +} + +void CS_LDK_Bolt12OfferContext_free(int64_t this_obj) { + LDKBolt12OfferContext this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + Bolt12OfferContext_free(this_obj_conv); +} + +int64_t CS_LDK_Bolt12OfferContext_get_offer_id(int64_t this_ptr) { + LDKBolt12OfferContext this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKOfferId ret_var = Bolt12OfferContext_get_offer_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void CS_LDK_Bolt12OfferContext_set_offer_id(int64_t this_ptr, int64_t val) { + LDKBolt12OfferContext this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKOfferId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = OfferId_clone(&val_conv); + Bolt12OfferContext_set_offer_id(&this_ptr_conv, val_conv); +} + +int64_t CS_LDK_Bolt12OfferContext_get_invoice_request(int64_t this_ptr) { + LDKBolt12OfferContext this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKInvoiceRequestFields ret_var = Bolt12OfferContext_get_invoice_request(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +void CS_LDK_Bolt12OfferContext_set_invoice_request(int64_t this_ptr, int64_t val) { + LDKBolt12OfferContext this_ptr_conv; + this_ptr_conv.inner = untag_ptr(this_ptr); + this_ptr_conv.is_owned = ptr_is_owned(this_ptr); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); + this_ptr_conv.is_owned = false; + LDKInvoiceRequestFields val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = InvoiceRequestFields_clone(&val_conv); + Bolt12OfferContext_set_invoice_request(&this_ptr_conv, val_conv); +} + +int64_t CS_LDK_Bolt12OfferContext_new(int64_t offer_id_arg, int64_t invoice_request_arg) { + LDKOfferId offer_id_arg_conv; + offer_id_arg_conv.inner = untag_ptr(offer_id_arg); + offer_id_arg_conv.is_owned = ptr_is_owned(offer_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(offer_id_arg_conv); + offer_id_arg_conv = OfferId_clone(&offer_id_arg_conv); + LDKInvoiceRequestFields invoice_request_arg_conv; + invoice_request_arg_conv.inner = untag_ptr(invoice_request_arg); + invoice_request_arg_conv.is_owned = ptr_is_owned(invoice_request_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_request_arg_conv); + invoice_request_arg_conv = InvoiceRequestFields_clone(&invoice_request_arg_conv); + LDKBolt12OfferContext ret_var = Bolt12OfferContext_new(offer_id_arg_conv, invoice_request_arg_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t Bolt12OfferContext_clone_ptr(LDKBolt12OfferContext *NONNULL_PTR arg) { + LDKBolt12OfferContext ret_var = Bolt12OfferContext_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t CS_LDK_Bolt12OfferContext_clone_ptr(int64_t arg) { + LDKBolt12OfferContext arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = Bolt12OfferContext_clone_ptr(&arg_conv); + return ret_conv; +} + +int64_t CS_LDK_Bolt12OfferContext_clone(int64_t orig) { + LDKBolt12OfferContext orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKBolt12OfferContext ret_var = Bolt12OfferContext_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +jboolean CS_LDK_Bolt12OfferContext_eq(int64_t a, int64_t b) { + LDKBolt12OfferContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKBolt12OfferContext b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = Bolt12OfferContext_eq(&a_conv, &b_conv); + return ret_conv; +} + +void CS_LDK_Bolt12RefundContext_free(int64_t this_obj) { + LDKBolt12RefundContext this_obj_conv; + this_obj_conv.inner = untag_ptr(this_obj); + this_obj_conv.is_owned = ptr_is_owned(this_obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv); + Bolt12RefundContext_free(this_obj_conv); +} + +int64_t CS_LDK_Bolt12RefundContext_new() { + LDKBolt12RefundContext ret_var = Bolt12RefundContext_new(); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +static inline uint64_t Bolt12RefundContext_clone_ptr(LDKBolt12RefundContext *NONNULL_PTR arg) { + LDKBolt12RefundContext ret_var = Bolt12RefundContext_clone(arg); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} +int64_t CS_LDK_Bolt12RefundContext_clone_ptr(int64_t arg) { + LDKBolt12RefundContext arg_conv; + arg_conv.inner = untag_ptr(arg); + arg_conv.is_owned = ptr_is_owned(arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv); + arg_conv.is_owned = false; + int64_t ret_conv = Bolt12RefundContext_clone_ptr(&arg_conv); + return ret_conv; +} + +int64_t CS_LDK_Bolt12RefundContext_clone(int64_t orig) { + LDKBolt12RefundContext orig_conv; + orig_conv.inner = untag_ptr(orig); + orig_conv.is_owned = ptr_is_owned(orig); + CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv); + orig_conv.is_owned = false; + LDKBolt12RefundContext ret_var = Bolt12RefundContext_clone(&orig_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; +} + +jboolean CS_LDK_Bolt12RefundContext_eq(int64_t a, int64_t b) { + LDKBolt12RefundContext a_conv; + a_conv.inner = untag_ptr(a); + a_conv.is_owned = ptr_is_owned(a); + CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv); + a_conv.is_owned = false; + LDKBolt12RefundContext b_conv; + b_conv.inner = untag_ptr(b); + b_conv.is_owned = ptr_is_owned(b); + CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv); + b_conv.is_owned = false; + jboolean ret_conv = Bolt12RefundContext_eq(&a_conv, &b_conv); + return ret_conv; +} + int8_tArray CS_LDK_ForwardTlvs_write(int64_t obj) { LDKForwardTlvs obj_conv; obj_conv.inner = untag_ptr(obj); @@ -71957,6 +78646,94 @@ int64_t CS_LDK_PaymentConstraints_read(int8_tArray ser) { return tag_ptr(ret_conv, true); } +int8_tArray CS_LDK_PaymentContext_write(int64_t obj) { + LDKPaymentContext* obj_conv = (LDKPaymentContext*)untag_ptr(obj); + LDKCVec_u8Z ret_var = PaymentContext_write(obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +int64_t CS_LDK_PaymentContext_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ"); + *ret_conv = PaymentContext_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + +int8_tArray CS_LDK_UnknownPaymentContext_write(int64_t obj) { + LDKUnknownPaymentContext obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = UnknownPaymentContext_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +int64_t CS_LDK_UnknownPaymentContext_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ"); + *ret_conv = UnknownPaymentContext_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + +int8_tArray CS_LDK_Bolt12OfferContext_write(int64_t obj) { + LDKBolt12OfferContext obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = Bolt12OfferContext_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +int64_t CS_LDK_Bolt12OfferContext_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ"); + *ret_conv = Bolt12OfferContext_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + +int8_tArray CS_LDK_Bolt12RefundContext_write(int64_t obj) { + LDKBolt12RefundContext obj_conv; + obj_conv.inner = untag_ptr(obj); + obj_conv.is_owned = ptr_is_owned(obj); + CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv); + obj_conv.is_owned = false; + LDKCVec_u8Z ret_var = Bolt12RefundContext_write(&obj_conv); + int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__); + memcpy(ret_arr->elems, ret_var.data, ret_var.datalen); + CVec_u8Z_free(ret_var); + return ret_arr; +} + +int64_t CS_LDK_Bolt12RefundContext_read(int8_tArray ser) { + LDKu8slice ser_ref; + ser_ref.datalen = ser->arr_len; + ser_ref.data = ser->elems; + LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ"); + *ret_conv = Bolt12RefundContext_read(ser_ref); + FREE(ser); + return tag_ptr(ret_conv, true); +} + void CS_LDK_PaymentPurpose_free(int64_t this_ptr) { if (!ptr_is_owned(this_ptr)) return; void* this_ptr_ptr = untag_ptr(this_ptr); @@ -71986,7 +78763,21 @@ int64_t CS_LDK_PaymentPurpose_clone(int64_t orig) { return ret_ref; } -int64_t CS_LDK_PaymentPurpose_invoice_payment(int64_t payment_preimage, int8_tArray payment_secret) { +int64_t CS_LDK_PaymentPurpose_bolt11_invoice_payment(int64_t payment_preimage, int8_tArray payment_secret) { + void* payment_preimage_ptr = untag_ptr(payment_preimage); + CHECK_ACCESS(payment_preimage_ptr); + LDKCOption_ThirtyTwoBytesZ payment_preimage_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_preimage_ptr); + payment_preimage_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(payment_preimage)); + LDKThirtyTwoBytes payment_secret_ref; + CHECK(payment_secret->arr_len == 32); + memcpy(payment_secret_ref.data, payment_secret->elems, 32); FREE(payment_secret); + LDKPaymentPurpose *ret_copy = MALLOC(sizeof(LDKPaymentPurpose), "LDKPaymentPurpose"); + *ret_copy = PaymentPurpose_bolt11_invoice_payment(payment_preimage_conv, payment_secret_ref); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_PaymentPurpose_bolt12_offer_payment(int64_t payment_preimage, int8_tArray payment_secret, int64_t payment_context) { void* payment_preimage_ptr = untag_ptr(payment_preimage); CHECK_ACCESS(payment_preimage_ptr); LDKCOption_ThirtyTwoBytesZ payment_preimage_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_preimage_ptr); @@ -71994,8 +78785,32 @@ int64_t CS_LDK_PaymentPurpose_invoice_payment(int64_t payment_preimage, int8_tA LDKThirtyTwoBytes payment_secret_ref; CHECK(payment_secret->arr_len == 32); memcpy(payment_secret_ref.data, payment_secret->elems, 32); FREE(payment_secret); + LDKBolt12OfferContext payment_context_conv; + payment_context_conv.inner = untag_ptr(payment_context); + payment_context_conv.is_owned = ptr_is_owned(payment_context); + CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_conv); + payment_context_conv = Bolt12OfferContext_clone(&payment_context_conv); LDKPaymentPurpose *ret_copy = MALLOC(sizeof(LDKPaymentPurpose), "LDKPaymentPurpose"); - *ret_copy = PaymentPurpose_invoice_payment(payment_preimage_conv, payment_secret_ref); + *ret_copy = PaymentPurpose_bolt12_offer_payment(payment_preimage_conv, payment_secret_ref, payment_context_conv); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_PaymentPurpose_bolt12_refund_payment(int64_t payment_preimage, int8_tArray payment_secret, int64_t payment_context) { + void* payment_preimage_ptr = untag_ptr(payment_preimage); + CHECK_ACCESS(payment_preimage_ptr); + LDKCOption_ThirtyTwoBytesZ payment_preimage_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_preimage_ptr); + payment_preimage_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(payment_preimage)); + LDKThirtyTwoBytes payment_secret_ref; + CHECK(payment_secret->arr_len == 32); + memcpy(payment_secret_ref.data, payment_secret->elems, 32); FREE(payment_secret); + LDKBolt12RefundContext payment_context_conv; + payment_context_conv.inner = untag_ptr(payment_context); + payment_context_conv.is_owned = ptr_is_owned(payment_context); + CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_conv); + payment_context_conv = Bolt12RefundContext_clone(&payment_context_conv); + LDKPaymentPurpose *ret_copy = MALLOC(sizeof(LDKPaymentPurpose), "LDKPaymentPurpose"); + *ret_copy = PaymentPurpose_bolt12_refund_payment(payment_preimage_conv, payment_secret_ref, payment_context_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -72052,27 +78867,31 @@ void CS_LDK_ClaimedHTLC_free(int64_t this_obj) { ClaimedHTLC_free(this_obj_conv); } -int8_tArray CS_LDK_ClaimedHTLC_get_channel_id(int64_t this_ptr) { +int64_t CS_LDK_ClaimedHTLC_get_channel_id(int64_t this_ptr) { LDKClaimedHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - int8_tArray ret_arr = init_int8_tArray(32, __LINE__); - memcpy(ret_arr->elems, *ClaimedHTLC_get_channel_id(&this_ptr_conv), 32); - return ret_arr; + LDKChannelId ret_var = ClaimedHTLC_get_channel_id(&this_ptr_conv); + int64_t ret_ref = 0; + CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); + ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); + return ret_ref; } -void CS_LDK_ClaimedHTLC_set_channel_id(int64_t this_ptr, int8_tArray val) { +void CS_LDK_ClaimedHTLC_set_channel_id(int64_t this_ptr, int64_t val) { LDKClaimedHTLC this_ptr_conv; this_ptr_conv.inner = untag_ptr(this_ptr); this_ptr_conv.is_owned = ptr_is_owned(this_ptr); CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv); this_ptr_conv.is_owned = false; - LDKThirtyTwoBytes val_ref; - CHECK(val->arr_len == 32); - memcpy(val_ref.data, val->elems, 32); FREE(val); - ClaimedHTLC_set_channel_id(&this_ptr_conv, val_ref); + LDKChannelId val_conv; + val_conv.inner = untag_ptr(val); + val_conv.is_owned = ptr_is_owned(val); + CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv); + val_conv = ChannelId_clone(&val_conv); + ClaimedHTLC_set_channel_id(&this_ptr_conv, val_conv); } int8_tArray CS_LDK_ClaimedHTLC_get_user_channel_id(int64_t this_ptr) { @@ -72155,14 +78974,16 @@ void CS_LDK_ClaimedHTLC_set_counterparty_skimmed_fee_msat(int64_t this_ptr, int ClaimedHTLC_set_counterparty_skimmed_fee_msat(&this_ptr_conv, val); } -int64_t CS_LDK_ClaimedHTLC_new(int8_tArray channel_id_arg, int8_tArray user_channel_id_arg, int32_t cltv_expiry_arg, int64_t value_msat_arg, int64_t counterparty_skimmed_fee_msat_arg) { - LDKThirtyTwoBytes channel_id_arg_ref; - CHECK(channel_id_arg->arr_len == 32); - memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg); +int64_t CS_LDK_ClaimedHTLC_new(int64_t channel_id_arg, int8_tArray user_channel_id_arg, int32_t cltv_expiry_arg, int64_t value_msat_arg, int64_t counterparty_skimmed_fee_msat_arg) { + LDKChannelId channel_id_arg_conv; + channel_id_arg_conv.inner = untag_ptr(channel_id_arg); + channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv); + channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv); LDKU128 user_channel_id_arg_ref; CHECK(user_channel_id_arg->arr_len == 16); memcpy(user_channel_id_arg_ref.le_bytes, user_channel_id_arg->elems, 16); FREE(user_channel_id_arg); - LDKClaimedHTLC ret_var = ClaimedHTLC_new(channel_id_arg_ref, user_channel_id_arg_ref, cltv_expiry_arg, value_msat_arg, counterparty_skimmed_fee_msat_arg); + LDKClaimedHTLC ret_var = ClaimedHTLC_new(channel_id_arg_conv, user_channel_id_arg_ref, cltv_expiry_arg, value_msat_arg, counterparty_skimmed_fee_msat_arg); int64_t ret_ref = 0; CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var); ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned); @@ -72362,9 +79183,23 @@ int64_t CS_LDK_ClosureReason_holder_force_closed() { return ret_ref; } -int64_t CS_LDK_ClosureReason_cooperative_closure() { +int64_t CS_LDK_ClosureReason_legacy_cooperative_closure() { + LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason"); + *ret_copy = ClosureReason_legacy_cooperative_closure(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_ClosureReason_counterparty_initiated_cooperative_closure() { LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason"); - *ret_copy = ClosureReason_cooperative_closure(); + *ret_copy = ClosureReason_counterparty_initiated_cooperative_closure(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + +int64_t CS_LDK_ClosureReason_locally_initiated_cooperative_closure() { + LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason"); + *ret_copy = ClosureReason_locally_initiated_cooperative_closure(); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -72419,6 +79254,13 @@ int64_t CS_LDK_ClosureReason_funding_batch_closure() { return ret_ref; } +int64_t CS_LDK_ClosureReason_htlcs_timed_out() { + LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason"); + *ret_copy = ClosureReason_htlcs_timed_out(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + jboolean CS_LDK_ClosureReason_eq(int64_t a, int64_t b) { LDKClosureReason* a_conv = (LDKClosureReason*)untag_ptr(a); LDKClosureReason* b_conv = (LDKClosureReason*)untag_ptr(b); @@ -72474,15 +79316,17 @@ int64_t CS_LDK_HTLCDestination_clone(int64_t orig) { return ret_ref; } -int64_t CS_LDK_HTLCDestination_next_hop_channel(int8_tArray node_id, int8_tArray channel_id) { +int64_t CS_LDK_HTLCDestination_next_hop_channel(int8_tArray node_id, int64_t channel_id) { LDKPublicKey node_id_ref; CHECK(node_id->arr_len == 33); memcpy(node_id_ref.compressed_form, node_id->elems, 33); FREE(node_id); - LDKThirtyTwoBytes channel_id_ref; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_ref.data, channel_id->elems, 32); FREE(channel_id); + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKHTLCDestination *ret_copy = MALLOC(sizeof(LDKHTLCDestination), "LDKHTLCDestination"); - *ret_copy = HTLCDestination_next_hop_channel(node_id_ref, channel_id_ref); + *ret_copy = HTLCDestination_next_hop_channel(node_id_ref, channel_id_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -72501,6 +79345,13 @@ int64_t CS_LDK_HTLCDestination_invalid_forward(int64_t requested_forward_scid) return ret_ref; } +int64_t CS_LDK_HTLCDestination_invalid_onion() { + LDKHTLCDestination *ret_copy = MALLOC(sizeof(LDKHTLCDestination), "LDKHTLCDestination"); + *ret_copy = HTLCDestination_invalid_onion(); + int64_t ret_ref = tag_ptr(ret_copy, true); + return ret_ref; +} + int64_t CS_LDK_HTLCDestination_failed_payment(int8_tArray payment_hash) { LDKThirtyTwoBytes payment_hash_ref; CHECK(payment_hash->arr_len == 32); @@ -72628,10 +79479,12 @@ int64_t CS_LDK_Event_clone(int64_t orig) { return ret_ref; } -int64_t CS_LDK_Event_funding_generation_ready(int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int64_t channel_value_satoshis, int8_tArray output_script, int8_tArray user_channel_id) { - LDKThirtyTwoBytes temporary_channel_id_ref; - CHECK(temporary_channel_id->arr_len == 32); - memcpy(temporary_channel_id_ref.data, temporary_channel_id->elems, 32); FREE(temporary_channel_id); +int64_t CS_LDK_Event_funding_generation_ready(int64_t temporary_channel_id, int8_tArray counterparty_node_id, int64_t channel_value_satoshis, int8_tArray output_script, int8_tArray user_channel_id) { + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv = ChannelId_clone(&temporary_channel_id_conv); LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); @@ -72643,7 +79496,7 @@ int64_t CS_LDK_Event_funding_generation_ready(int8_tArray temporary_channel_id, CHECK(user_channel_id->arr_len == 16); memcpy(user_channel_id_ref.le_bytes, user_channel_id->elems, 16); FREE(user_channel_id); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_funding_generation_ready(temporary_channel_id_ref, counterparty_node_id_ref, channel_value_satoshis, output_script_ref, user_channel_id_ref); + *ret_copy = Event_funding_generation_ready(temporary_channel_id_conv, counterparty_node_id_ref, channel_value_satoshis, output_script_ref, user_channel_id_ref); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -72664,10 +79517,11 @@ int64_t CS_LDK_Event_payment_claimable(int8_tArray receiver_node_id, int8_tArra CHECK_ACCESS(purpose_ptr); LDKPaymentPurpose purpose_conv = *(LDKPaymentPurpose*)(purpose_ptr); purpose_conv = PaymentPurpose_clone((LDKPaymentPurpose*)untag_ptr(purpose)); - void* via_channel_id_ptr = untag_ptr(via_channel_id); - CHECK_ACCESS(via_channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ via_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(via_channel_id_ptr); - via_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(via_channel_id)); + LDKChannelId via_channel_id_conv; + via_channel_id_conv.inner = untag_ptr(via_channel_id); + via_channel_id_conv.is_owned = ptr_is_owned(via_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(via_channel_id_conv); + via_channel_id_conv = ChannelId_clone(&via_channel_id_conv); void* via_user_channel_id_ptr = untag_ptr(via_user_channel_id); CHECK_ACCESS(via_user_channel_id_ptr); LDKCOption_U128Z via_user_channel_id_conv = *(LDKCOption_U128Z*)(via_user_channel_id_ptr); @@ -72916,50 +79770,68 @@ int64_t CS_LDK_Event_spendable_outputs(int64_tArray outputs, int64_t channel_id outputs_constr.data[b] = outputs_conv_27_conv; } FREE(outputs); - void* channel_id_ptr = untag_ptr(channel_id); - CHECK_ACCESS(channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(channel_id_ptr); - channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(channel_id)); + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); *ret_copy = Event_spendable_outputs(outputs_constr, channel_id_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -int64_t CS_LDK_Event_payment_forwarded(int64_t prev_channel_id, int64_t next_channel_id, int64_t fee_earned_msat, jboolean claim_from_onchain_tx, int64_t outbound_amount_forwarded_msat) { - void* prev_channel_id_ptr = untag_ptr(prev_channel_id); - CHECK_ACCESS(prev_channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ prev_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(prev_channel_id_ptr); - prev_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(prev_channel_id)); - void* next_channel_id_ptr = untag_ptr(next_channel_id); - CHECK_ACCESS(next_channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ next_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(next_channel_id_ptr); - next_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(next_channel_id)); - void* fee_earned_msat_ptr = untag_ptr(fee_earned_msat); - CHECK_ACCESS(fee_earned_msat_ptr); - LDKCOption_u64Z fee_earned_msat_conv = *(LDKCOption_u64Z*)(fee_earned_msat_ptr); - fee_earned_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(fee_earned_msat)); +int64_t CS_LDK_Event_payment_forwarded(int64_t prev_channel_id, int64_t next_channel_id, int64_t prev_user_channel_id, int64_t next_user_channel_id, int64_t total_fee_earned_msat, int64_t skimmed_fee_msat, jboolean claim_from_onchain_tx, int64_t outbound_amount_forwarded_msat) { + LDKChannelId prev_channel_id_conv; + prev_channel_id_conv.inner = untag_ptr(prev_channel_id); + prev_channel_id_conv.is_owned = ptr_is_owned(prev_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_conv); + prev_channel_id_conv = ChannelId_clone(&prev_channel_id_conv); + LDKChannelId next_channel_id_conv; + next_channel_id_conv.inner = untag_ptr(next_channel_id); + next_channel_id_conv.is_owned = ptr_is_owned(next_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(next_channel_id_conv); + next_channel_id_conv = ChannelId_clone(&next_channel_id_conv); + void* prev_user_channel_id_ptr = untag_ptr(prev_user_channel_id); + CHECK_ACCESS(prev_user_channel_id_ptr); + LDKCOption_U128Z prev_user_channel_id_conv = *(LDKCOption_U128Z*)(prev_user_channel_id_ptr); + prev_user_channel_id_conv = COption_U128Z_clone((LDKCOption_U128Z*)untag_ptr(prev_user_channel_id)); + void* next_user_channel_id_ptr = untag_ptr(next_user_channel_id); + CHECK_ACCESS(next_user_channel_id_ptr); + LDKCOption_U128Z next_user_channel_id_conv = *(LDKCOption_U128Z*)(next_user_channel_id_ptr); + next_user_channel_id_conv = COption_U128Z_clone((LDKCOption_U128Z*)untag_ptr(next_user_channel_id)); + void* total_fee_earned_msat_ptr = untag_ptr(total_fee_earned_msat); + CHECK_ACCESS(total_fee_earned_msat_ptr); + LDKCOption_u64Z total_fee_earned_msat_conv = *(LDKCOption_u64Z*)(total_fee_earned_msat_ptr); + total_fee_earned_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(total_fee_earned_msat)); + void* skimmed_fee_msat_ptr = untag_ptr(skimmed_fee_msat); + CHECK_ACCESS(skimmed_fee_msat_ptr); + LDKCOption_u64Z skimmed_fee_msat_conv = *(LDKCOption_u64Z*)(skimmed_fee_msat_ptr); + skimmed_fee_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(skimmed_fee_msat)); void* outbound_amount_forwarded_msat_ptr = untag_ptr(outbound_amount_forwarded_msat); CHECK_ACCESS(outbound_amount_forwarded_msat_ptr); LDKCOption_u64Z outbound_amount_forwarded_msat_conv = *(LDKCOption_u64Z*)(outbound_amount_forwarded_msat_ptr); outbound_amount_forwarded_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(outbound_amount_forwarded_msat)); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_payment_forwarded(prev_channel_id_conv, next_channel_id_conv, fee_earned_msat_conv, claim_from_onchain_tx, outbound_amount_forwarded_msat_conv); + *ret_copy = Event_payment_forwarded(prev_channel_id_conv, next_channel_id_conv, prev_user_channel_id_conv, next_user_channel_id_conv, total_fee_earned_msat_conv, skimmed_fee_msat_conv, claim_from_onchain_tx, outbound_amount_forwarded_msat_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -int64_t CS_LDK_Event_channel_pending(int8_tArray channel_id, int8_tArray user_channel_id, int64_t former_temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_txo) { - LDKThirtyTwoBytes channel_id_ref; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_ref.data, channel_id->elems, 32); FREE(channel_id); +int64_t CS_LDK_Event_channel_pending(int64_t channel_id, int8_tArray user_channel_id, int64_t former_temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_txo, int64_t channel_type) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKU128 user_channel_id_ref; CHECK(user_channel_id->arr_len == 16); memcpy(user_channel_id_ref.le_bytes, user_channel_id->elems, 16); FREE(user_channel_id); - void* former_temporary_channel_id_ptr = untag_ptr(former_temporary_channel_id); - CHECK_ACCESS(former_temporary_channel_id_ptr); - LDKCOption_ThirtyTwoBytesZ former_temporary_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(former_temporary_channel_id_ptr); - former_temporary_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(former_temporary_channel_id)); + LDKChannelId former_temporary_channel_id_conv; + former_temporary_channel_id_conv.inner = untag_ptr(former_temporary_channel_id); + former_temporary_channel_id_conv.is_owned = ptr_is_owned(former_temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(former_temporary_channel_id_conv); + former_temporary_channel_id_conv = ChannelId_clone(&former_temporary_channel_id_conv); LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); @@ -72968,16 +79840,23 @@ int64_t CS_LDK_Event_channel_pending(int8_tArray channel_id, int8_tArray user_c funding_txo_conv.is_owned = ptr_is_owned(funding_txo); CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_conv); funding_txo_conv = OutPoint_clone(&funding_txo_conv); + LDKChannelTypeFeatures channel_type_conv; + channel_type_conv.inner = untag_ptr(channel_type); + channel_type_conv.is_owned = ptr_is_owned(channel_type); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_conv); + channel_type_conv = ChannelTypeFeatures_clone(&channel_type_conv); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_channel_pending(channel_id_ref, user_channel_id_ref, former_temporary_channel_id_conv, counterparty_node_id_ref, funding_txo_conv); + *ret_copy = Event_channel_pending(channel_id_conv, user_channel_id_ref, former_temporary_channel_id_conv, counterparty_node_id_ref, funding_txo_conv, channel_type_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -int64_t CS_LDK_Event_channel_ready(int8_tArray channel_id, int8_tArray user_channel_id, int8_tArray counterparty_node_id, int64_t channel_type) { - LDKThirtyTwoBytes channel_id_ref; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_ref.data, channel_id->elems, 32); FREE(channel_id); +int64_t CS_LDK_Event_channel_ready(int64_t channel_id, int8_tArray user_channel_id, int8_tArray counterparty_node_id, int64_t channel_type) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKU128 user_channel_id_ref; CHECK(user_channel_id->arr_len == 16); memcpy(user_channel_id_ref.le_bytes, user_channel_id->elems, 16); FREE(user_channel_id); @@ -72990,15 +79869,17 @@ int64_t CS_LDK_Event_channel_ready(int8_tArray channel_id, int8_tArray user_cha CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_conv); channel_type_conv = ChannelTypeFeatures_clone(&channel_type_conv); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_channel_ready(channel_id_ref, user_channel_id_ref, counterparty_node_id_ref, channel_type_conv); + *ret_copy = Event_channel_ready(channel_id_conv, user_channel_id_ref, counterparty_node_id_ref, channel_type_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -int64_t CS_LDK_Event_channel_closed(int8_tArray channel_id, int8_tArray user_channel_id, int64_t reason, int8_tArray counterparty_node_id, int64_t channel_capacity_sats, int64_t channel_funding_txo) { - LDKThirtyTwoBytes channel_id_ref; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_ref.data, channel_id->elems, 32); FREE(channel_id); +int64_t CS_LDK_Event_channel_closed(int64_t channel_id, int8_tArray user_channel_id, int64_t reason, int8_tArray counterparty_node_id, int64_t channel_capacity_sats, int64_t channel_funding_txo) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKU128 user_channel_id_ref; CHECK(user_channel_id->arr_len == 16); memcpy(user_channel_id_ref.le_bytes, user_channel_id->elems, 16); FREE(user_channel_id); @@ -73019,30 +79900,34 @@ int64_t CS_LDK_Event_channel_closed(int8_tArray channel_id, int8_tArray user_ch CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_txo_conv); channel_funding_txo_conv = OutPoint_clone(&channel_funding_txo_conv); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_channel_closed(channel_id_ref, user_channel_id_ref, reason_conv, counterparty_node_id_ref, channel_capacity_sats_conv, channel_funding_txo_conv); + *ret_copy = Event_channel_closed(channel_id_conv, user_channel_id_ref, reason_conv, counterparty_node_id_ref, channel_capacity_sats_conv, channel_funding_txo_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -int64_t CS_LDK_Event_discard_funding(int8_tArray channel_id, int8_tArray transaction) { - LDKThirtyTwoBytes channel_id_ref; - CHECK(channel_id->arr_len == 32); - memcpy(channel_id_ref.data, channel_id->elems, 32); FREE(channel_id); +int64_t CS_LDK_Event_discard_funding(int64_t channel_id, int8_tArray transaction) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); LDKTransaction transaction_ref; transaction_ref.datalen = transaction->arr_len; transaction_ref.data = MALLOC(transaction_ref.datalen, "LDKTransaction Bytes"); memcpy(transaction_ref.data, transaction->elems, transaction_ref.datalen); FREE(transaction); transaction_ref.data_is_owned = true; LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_discard_funding(channel_id_ref, transaction_ref); + *ret_copy = Event_discard_funding(channel_id_conv, transaction_ref); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -int64_t CS_LDK_Event_open_channel_request(int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_satoshis, int64_t push_msat, int64_t channel_type) { - LDKThirtyTwoBytes temporary_channel_id_ref; - CHECK(temporary_channel_id->arr_len == 32); - memcpy(temporary_channel_id_ref.data, temporary_channel_id->elems, 32); FREE(temporary_channel_id); +int64_t CS_LDK_Event_open_channel_request(int64_t temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_satoshis, int64_t push_msat, int64_t channel_type) { + LDKChannelId temporary_channel_id_conv; + temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id); + temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv); + temporary_channel_id_conv = ChannelId_clone(&temporary_channel_id_conv); LDKPublicKey counterparty_node_id_ref; CHECK(counterparty_node_id->arr_len == 33); memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); @@ -73052,21 +79937,23 @@ int64_t CS_LDK_Event_open_channel_request(int8_tArray temporary_channel_id, int CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_conv); channel_type_conv = ChannelTypeFeatures_clone(&channel_type_conv); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_open_channel_request(temporary_channel_id_ref, counterparty_node_id_ref, funding_satoshis, push_msat, channel_type_conv); + *ret_copy = Event_open_channel_request(temporary_channel_id_conv, counterparty_node_id_ref, funding_satoshis, push_msat, channel_type_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -int64_t CS_LDK_Event_htlchandling_failed(int8_tArray prev_channel_id, int64_t failed_next_destination) { - LDKThirtyTwoBytes prev_channel_id_ref; - CHECK(prev_channel_id->arr_len == 32); - memcpy(prev_channel_id_ref.data, prev_channel_id->elems, 32); FREE(prev_channel_id); +int64_t CS_LDK_Event_htlchandling_failed(int64_t prev_channel_id, int64_t failed_next_destination) { + LDKChannelId prev_channel_id_conv; + prev_channel_id_conv.inner = untag_ptr(prev_channel_id); + prev_channel_id_conv.is_owned = ptr_is_owned(prev_channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_conv); + prev_channel_id_conv = ChannelId_clone(&prev_channel_id_conv); void* failed_next_destination_ptr = untag_ptr(failed_next_destination); CHECK_ACCESS(failed_next_destination_ptr); LDKHTLCDestination failed_next_destination_conv = *(LDKHTLCDestination*)(failed_next_destination_ptr); failed_next_destination_conv = HTLCDestination_clone((LDKHTLCDestination*)untag_ptr(failed_next_destination)); LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent"); - *ret_copy = Event_htlchandling_failed(prev_channel_id_ref, failed_next_destination_conv); + *ret_copy = Event_htlchandling_failed(prev_channel_id_conv, failed_next_destination_conv); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -73923,7 +80810,15 @@ int64_t CS_LDK_BumpTransactionEvent_clone(int64_t orig) { return ret_ref; } -int64_t CS_LDK_BumpTransactionEvent_channel_close(int8_tArray claim_id, int32_t package_target_feerate_sat_per_1000_weight, int8_tArray commitment_tx, int64_t commitment_tx_fee_satoshis, int64_t anchor_descriptor, int64_tArray pending_htlcs) { +int64_t CS_LDK_BumpTransactionEvent_channel_close(int64_t channel_id, int8_tArray counterparty_node_id, int8_tArray claim_id, int32_t package_target_feerate_sat_per_1000_weight, int8_tArray commitment_tx, int64_t commitment_tx_fee_satoshis, int64_t anchor_descriptor, int64_tArray pending_htlcs) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); + LDKPublicKey counterparty_node_id_ref; + CHECK(counterparty_node_id->arr_len == 33); + memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); LDKThirtyTwoBytes claim_id_ref; CHECK(claim_id->arr_len == 32); memcpy(claim_id_ref.data, claim_id->elems, 32); FREE(claim_id); @@ -73955,12 +80850,20 @@ int64_t CS_LDK_BumpTransactionEvent_channel_close(int8_tArray claim_id, int32_t } FREE(pending_htlcs); LDKBumpTransactionEvent *ret_copy = MALLOC(sizeof(LDKBumpTransactionEvent), "LDKBumpTransactionEvent"); - *ret_copy = BumpTransactionEvent_channel_close(claim_id_ref, package_target_feerate_sat_per_1000_weight, commitment_tx_ref, commitment_tx_fee_satoshis, anchor_descriptor_conv, pending_htlcs_constr); + *ret_copy = BumpTransactionEvent_channel_close(channel_id_conv, counterparty_node_id_ref, claim_id_ref, package_target_feerate_sat_per_1000_weight, commitment_tx_ref, commitment_tx_fee_satoshis, anchor_descriptor_conv, pending_htlcs_constr); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } -int64_t CS_LDK_BumpTransactionEvent_htlcresolution(int8_tArray claim_id, int32_t target_feerate_sat_per_1000_weight, int64_tArray htlc_descriptors, int32_t tx_lock_time) { +int64_t CS_LDK_BumpTransactionEvent_htlcresolution(int64_t channel_id, int8_tArray counterparty_node_id, int8_tArray claim_id, int32_t target_feerate_sat_per_1000_weight, int64_tArray htlc_descriptors, int32_t tx_lock_time) { + LDKChannelId channel_id_conv; + channel_id_conv.inner = untag_ptr(channel_id); + channel_id_conv.is_owned = ptr_is_owned(channel_id); + CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv); + channel_id_conv = ChannelId_clone(&channel_id_conv); + LDKPublicKey counterparty_node_id_ref; + CHECK(counterparty_node_id->arr_len == 33); + memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id); LDKThirtyTwoBytes claim_id_ref; CHECK(claim_id->arr_len == 32); memcpy(claim_id_ref.data, claim_id->elems, 32); FREE(claim_id); @@ -73982,7 +80885,7 @@ int64_t CS_LDK_BumpTransactionEvent_htlcresolution(int8_tArray claim_id, int32_ } FREE(htlc_descriptors); LDKBumpTransactionEvent *ret_copy = MALLOC(sizeof(LDKBumpTransactionEvent), "LDKBumpTransactionEvent"); - *ret_copy = BumpTransactionEvent_htlcresolution(claim_id_ref, target_feerate_sat_per_1000_weight, htlc_descriptors_constr, tx_lock_time); + *ret_copy = BumpTransactionEvent_htlcresolution(channel_id_conv, counterparty_node_id_ref, claim_id_ref, target_feerate_sat_per_1000_weight, htlc_descriptors_constr, tx_lock_time); int64_t ret_ref = tag_ptr(ret_copy, true); return ret_ref; } @@ -76428,6 +83331,17 @@ int8_tArray CS_LDK_Bolt11Invoice_recover_payee_pub_key(int64_t this_arg) { return ret_arr; } +int8_tArray CS_LDK_Bolt11Invoice_get_payee_pub_key(int64_t this_arg) { + LDKBolt11Invoice this_arg_conv; + this_arg_conv.inner = untag_ptr(this_arg); + this_arg_conv.is_owned = ptr_is_owned(this_arg); + CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv); + this_arg_conv.is_owned = false; + int8_tArray ret_arr = init_int8_tArray(33, __LINE__); + memcpy(ret_arr->elems, Bolt11Invoice_get_payee_pub_key(&this_arg_conv).compressed_form, 33); + return ret_arr; +} + int64_t CS_LDK_Bolt11Invoice_expires_at(int64_t this_arg) { LDKBolt11Invoice this_arg_conv; this_arg_conv.inner = untag_ptr(this_arg); diff --git a/c_sharp/src/org/ldk/enums/Bolt12SemanticError.cs b/c_sharp/src/org/ldk/enums/Bolt12SemanticError.cs index df1e8103..5d26fe2f 100644 --- a/c_sharp/src/org/ldk/enums/Bolt12SemanticError.cs +++ b/c_sharp/src/org/ldk/enums/Bolt12SemanticError.cs @@ -94,6 +94,10 @@ public enum Bolt12SemanticError { * Blinded paths were expected but were missing. */ LDKBolt12SemanticError_MissingPaths, + /** + * Blinded paths were provided but were not expected. + */ + LDKBolt12SemanticError_UnexpectedPaths, /** * The blinded payinfo given does not match the number of blinded path hops. */ diff --git a/c_sharp/src/org/ldk/enums/ConfirmationTarget.cs b/c_sharp/src/org/ldk/enums/ConfirmationTarget.cs index c5b9fcde..d2a4d73a 100644 --- a/c_sharp/src/org/ldk/enums/ConfirmationTarget.cs +++ b/c_sharp/src/org/ldk/enums/ConfirmationTarget.cs @@ -90,4 +90,17 @@ public enum ConfirmationTarget { * [`ChannelManager::close_channel_with_feerate_and_script`]: crate::ln::channelmanager::ChannelManager::close_channel_with_feerate_and_script */ LDKConfirmationTarget_ChannelCloseMinimum, + /** + * The feerate [`OutputSweeper`] will use on transactions spending + * [`SpendableOutputDescriptor`]s after a channel closure. + * + * Generally spending these outputs is safe as long as they eventually confirm, so a value + * (slightly above) the mempool minimum should suffice. However, as this value will influence + * how long funds will be unavailable after channel closure, [`FeeEstimator`] implementors + * might want to choose a higher feerate to regain control over funds faster. + * + * [`OutputSweeper`]: crate::util::sweep::OutputSweeper + * [`SpendableOutputDescriptor`]: crate::sign::SpendableOutputDescriptor + */ + LDKConfirmationTarget_OutputSpendingFee, }} } } diff --git a/c_sharp/src/org/ldk/enums/Direction.cs b/c_sharp/src/org/ldk/enums/Direction.cs new file mode 100644 index 00000000..2bf28ee5 --- /dev/null +++ b/c_sharp/src/org/ldk/enums/Direction.cs @@ -0,0 +1,17 @@ +namespace org { namespace ldk { namespace enums {/** + * The side of a channel that is the [`IntroductionNode`] in a [`BlindedPath`]. [BOLT 7] defines + * which nodes is which in the [`ChannelAnnouncement`] message. + * + * [BOLT 7]: https://github.com/lightning/bolts/blob/master/07-routing-gossip.md#the-channel_announcement-message + * [`ChannelAnnouncement`]: crate::ln::msgs::ChannelAnnouncement + */ +public enum Direction { + /** + * The lesser node id when compared lexicographically in ascending order. + */ + LDKDirection_NodeOne, + /** + * The greater node id when compared lexicographically in ascending order. + */ + LDKDirection_NodeTwo, +}} } } diff --git a/c_sharp/src/org/ldk/enums/PaymentFailureReason.cs b/c_sharp/src/org/ldk/enums/PaymentFailureReason.cs index d0e5774f..2b1f21d5 100644 --- a/c_sharp/src/org/ldk/enums/PaymentFailureReason.cs +++ b/c_sharp/src/org/ldk/enums/PaymentFailureReason.cs @@ -30,6 +30,10 @@ public enum PaymentFailureReason { LDKPaymentFailureReason_PaymentExpired, /** * We failed to find a route while retrying the payment. + * + * Note that this generally indicates that we've exhausted the available set of possible + * routes - we tried the payment over a few routes but were not able to find any further + * candidate routes beyond those. */ LDKPaymentFailureReason_RouteNotFound, /** diff --git a/c_sharp/src/org/ldk/enums/ShortChannelIdError.cs b/c_sharp/src/org/ldk/enums/ShortChannelIdError.cs new file mode 100644 index 00000000..7413ae4b --- /dev/null +++ b/c_sharp/src/org/ldk/enums/ShortChannelIdError.cs @@ -0,0 +1,17 @@ +namespace org { namespace ldk { namespace enums {/** + * A `short_channel_id` construction error + */ +public enum ShortChannelIdError { + /** + * Block height too high + */ + LDKShortChannelIdError_BlockOverflow, + /** + * Tx index too high + */ + LDKShortChannelIdError_TxIndexOverflow, + /** + * Vout index too high + */ + LDKShortChannelIdError_VoutIndexOverflow, +}} } } diff --git a/c_sharp/src/org/ldk/impl/bindings.cs b/c_sharp/src/org/ldk/impl/bindings.cs index e3c3a6e4..4e16b9cb 100644 --- a/c_sharp/src/org/ldk/impl/bindings.cs +++ b/c_sharp/src/org/ldk/impl/bindings.cs @@ -25,6 +25,14 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBech32Error_ty_from_ptr")] public static extern long LDKBech32Error_ty_from_ptr(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBech32Error_InvalidChar_get_invalid_char")] public static extern int LDKBech32Error_InvalidChar_get_invalid_char(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBech32Error_InvalidData_get_invalid_data")] public static extern byte LDKBech32Error_InvalidData_get_invalid_data(long ptr); + // struct LDKRefundMaybeWithDerivedMetadataBuilder CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok")] public static extern long CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(long _owner); + // enum LDKBolt12SemanticError CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err")] public static extern Bolt12SemanticError CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(long _owner); + // struct LDKRefund CResult_RefundBolt12SemanticErrorZ_get_ok(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RefundBolt12SemanticErrorZ_get_ok")] public static extern long CResult_RefundBolt12SemanticErrorZ_get_ok(long _owner); + // enum LDKBolt12SemanticError CResult_RefundBolt12SemanticErrorZ_get_err(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RefundBolt12SemanticErrorZ_get_err")] public static extern Bolt12SemanticError CResult_RefundBolt12SemanticErrorZ_get_err(long _owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_u64Z_ty_from_ptr")] public static extern long LDKCOption_u64Z_ty_from_ptr(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_u64Z_Some_get_some")] public static extern long LDKCOption_u64Z_Some_get_some(long ptr); // struct LDKRefund CResult_RefundBolt12ParseErrorZ_get_ok(LDKCResult_RefundBolt12ParseErrorZ *NONNULL_PTR owner); @@ -67,8 +75,30 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RecipientOnionFieldsNoneZ_get_ok")] public static extern long CResult_RecipientOnionFieldsNoneZ_get_ok(long _owner); // void CResult_RecipientOnionFieldsNoneZ_get_err(LDKCResult_RecipientOnionFieldsNoneZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RecipientOnionFieldsNoneZ_get_err")] public static extern void CResult_RecipientOnionFieldsNoneZ_get_err(long _owner); + // struct LDKUnsignedBolt12Invoice CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok")] public static extern long CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(long _owner); + // enum LDKBolt12SemanticError CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err")] public static extern Bolt12SemanticError CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(long _owner); + // struct LDKBolt12Invoice CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok")] public static extern long CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(long _owner); + // enum LDKBolt12SemanticError CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err")] public static extern Bolt12SemanticError CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(long _owner); + // struct LDKSchnorrSignature CResult_SchnorrSignatureNoneZ_get_ok(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_SchnorrSignatureNoneZ_get_ok")] public static extern long CResult_SchnorrSignatureNoneZ_get_ok(long _owner); + // void CResult_SchnorrSignatureNoneZ_get_err(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_SchnorrSignatureNoneZ_get_err")] public static extern void CResult_SchnorrSignatureNoneZ_get_err(long _owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_CVec_ThirtyTwoBytesZZ_ty_from_ptr")] public static extern long LDKCOption_CVec_ThirtyTwoBytesZZ_ty_from_ptr(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_CVec_ThirtyTwoBytesZZ_Some_get_some")] public static extern long LDKCOption_CVec_ThirtyTwoBytesZZ_Some_get_some(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKAmount_ty_from_ptr")] public static extern long LDKAmount_ty_from_ptr(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKAmount_Bitcoin_get_amount_msats")] public static extern long LDKAmount_Bitcoin_get_amount_msats(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKAmount_Currency_get_iso4217_code")] public static extern long LDKAmount_Currency_get_iso4217_code(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKAmount_Currency_get_amount")] public static extern long LDKAmount_Currency_get_amount(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_AmountZ_ty_from_ptr")] public static extern long LDKCOption_AmountZ_ty_from_ptr(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_AmountZ_Some_get_some")] public static extern long LDKCOption_AmountZ_Some_get_some(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKQuantity_ty_from_ptr")] public static extern long LDKQuantity_ty_from_ptr(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKQuantity_Bounded_get_bounded")] public static extern long LDKQuantity_Bounded_get_bounded(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_QuantityZ_ty_from_ptr")] public static extern long LDKCOption_QuantityZ_ty_from_ptr(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_QuantityZ_Some_get_some")] public static extern long LDKCOption_QuantityZ_Some_get_some(long ptr); // struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesNoneZ_get_ok(LDKCResult_ThirtyTwoBytesNoneZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ThirtyTwoBytesNoneZ_get_ok")] public static extern long CResult_ThirtyTwoBytesNoneZ_get_ok(long _owner); // void CResult_ThirtyTwoBytesNoneZ_get_err(LDKCResult_ThirtyTwoBytesNoneZ *NONNULL_PTR owner); @@ -127,14 +157,14 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RecoverableSignatureNoneZ_get_ok")] public static extern long CResult_RecoverableSignatureNoneZ_get_ok(long _owner); // void CResult_RecoverableSignatureNoneZ_get_err(LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RecoverableSignatureNoneZ_get_err")] public static extern void CResult_RecoverableSignatureNoneZ_get_err(long _owner); - // struct LDKSchnorrSignature CResult_SchnorrSignatureNoneZ_get_ok(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_SchnorrSignatureNoneZ_get_ok")] public static extern long CResult_SchnorrSignatureNoneZ_get_ok(long _owner); - // void CResult_SchnorrSignatureNoneZ_get_err(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_SchnorrSignatureNoneZ_get_err")] public static extern void CResult_SchnorrSignatureNoneZ_get_err(long _owner); // struct LDKECDSASignature CResult_ECDSASignatureNoneZ_get_ok(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ECDSASignatureNoneZ_get_ok")] public static extern long CResult_ECDSASignatureNoneZ_get_ok(long _owner); // void CResult_ECDSASignatureNoneZ_get_err(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ECDSASignatureNoneZ_get_err")] public static extern void CResult_ECDSASignatureNoneZ_get_err(long _owner); + // struct LDKTransaction CResult_TransactionNoneZ_get_ok(LDKCResult_TransactionNoneZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_TransactionNoneZ_get_ok")] public static extern long CResult_TransactionNoneZ_get_ok(long _owner); + // void CResult_TransactionNoneZ_get_err(LDKCResult_TransactionNoneZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_TransactionNoneZ_get_err")] public static extern void CResult_TransactionNoneZ_get_err(long _owner); // struct LDKECDSASignature C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_a(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_a")] public static extern long C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_a(long _owner); // struct LDKCVec_ECDSASignatureZ C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_b(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ *NONNULL_PTR owner); @@ -274,10 +304,6 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InMemorySignerDecodeErrorZ_get_ok")] public static extern long CResult_InMemorySignerDecodeErrorZ_get_ok(long _owner); // struct LDKDecodeError CResult_InMemorySignerDecodeErrorZ_get_err(LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InMemorySignerDecodeErrorZ_get_err")] public static extern long CResult_InMemorySignerDecodeErrorZ_get_err(long _owner); - // struct LDKTransaction CResult_TransactionNoneZ_get_ok(LDKCResult_TransactionNoneZ *NONNULL_PTR owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_TransactionNoneZ_get_ok")] public static extern long CResult_TransactionNoneZ_get_ok(long _owner); - // void CResult_TransactionNoneZ_get_err(LDKCResult_TransactionNoneZ *NONNULL_PTR owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_TransactionNoneZ_get_err")] public static extern void CResult_TransactionNoneZ_get_err(long _owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCandidateRouteHop_ty_from_ptr")] public static extern long LDKCandidateRouteHop_ty_from_ptr(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCandidateRouteHop_FirstHop_get_first_hop")] public static extern long LDKCandidateRouteHop_FirstHop_get_first_hop(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCandidateRouteHop_PublicHop_get_public_hop")] public static extern long LDKCandidateRouteHop_PublicHop_get_public_hop(long ptr); @@ -491,6 +517,10 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ProbabilisticScorerDecodeErrorZ_get_ok")] public static extern long CResult_ProbabilisticScorerDecodeErrorZ_get_ok(long _owner); // struct LDKDecodeError CResult_ProbabilisticScorerDecodeErrorZ_get_err(LDKCResult_ProbabilisticScorerDecodeErrorZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ProbabilisticScorerDecodeErrorZ_get_err")] public static extern long CResult_ProbabilisticScorerDecodeErrorZ_get_err(long _owner); + // struct LDKBestBlock CResult_BestBlockDecodeErrorZ_get_ok(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_BestBlockDecodeErrorZ_get_ok")] public static extern long CResult_BestBlockDecodeErrorZ_get_ok(long _owner); + // struct LDKDecodeError CResult_BestBlockDecodeErrorZ_get_err(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_BestBlockDecodeErrorZ_get_err")] public static extern long CResult_BestBlockDecodeErrorZ_get_err(long _owner); // uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_usizeTransactionZ_get_a")] public static extern long C2Tuple_usizeTransactionZ_get_a(long _owner); // struct LDKTransaction C2Tuple_usizeTransactionZ_get_b(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR owner); @@ -505,17 +535,26 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelMonitorUpdateStatusNoneZ_get_ok")] public static extern ChannelMonitorUpdateStatus CResult_ChannelMonitorUpdateStatusNoneZ_get_ok(long _owner); // void CResult_ChannelMonitorUpdateStatusNoneZ_get_err(LDKCResult_ChannelMonitorUpdateStatusNoneZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelMonitorUpdateStatusNoneZ_get_err")] public static extern void CResult_ChannelMonitorUpdateStatusNoneZ_get_err(long _owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKClosureReason_ty_from_ptr")] public static extern long LDKClosureReason_ty_from_ptr(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKClosureReason_CounterpartyForceClosed_get_peer_msg")] public static extern long LDKClosureReason_CounterpartyForceClosed_get_peer_msg(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKClosureReason_ProcessingError_get_err")] public static extern long LDKClosureReason_ProcessingError_get_err(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKMonitorEvent_ty_from_ptr")] public static extern long LDKMonitorEvent_ty_from_ptr(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKMonitorEvent_HTLCEvent_get_htlc_event")] public static extern long LDKMonitorEvent_HTLCEvent_get_htlc_event(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKMonitorEvent_HolderForceClosedWithInfo_get_reason")] public static extern long LDKMonitorEvent_HolderForceClosedWithInfo_get_reason(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKMonitorEvent_HolderForceClosedWithInfo_get_outpoint")] public static extern long LDKMonitorEvent_HolderForceClosedWithInfo_get_outpoint(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKMonitorEvent_HolderForceClosedWithInfo_get_channel_id")] public static extern long LDKMonitorEvent_HolderForceClosedWithInfo_get_channel_id(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKMonitorEvent_HolderForceClosed_get_holder_force_closed")] public static extern long LDKMonitorEvent_HolderForceClosed_get_holder_force_closed(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKMonitorEvent_Completed_get_funding_txo")] public static extern long LDKMonitorEvent_Completed_get_funding_txo(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKMonitorEvent_Completed_get_channel_id")] public static extern long LDKMonitorEvent_Completed_get_channel_id(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKMonitorEvent_Completed_get_monitor_update_id")] public static extern long LDKMonitorEvent_Completed_get_monitor_update_id(long ptr); - // struct LDKOutPoint C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a")] public static extern long C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(long _owner); - // struct LDKCVec_MonitorEventZ C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b")] public static extern long C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(long _owner); - // struct LDKPublicKey C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c")] public static extern long C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(long _owner); + // struct LDKOutPoint C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a")] public static extern long C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(long _owner); + // struct LDKChannelId C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b")] public static extern long C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(long _owner); + // struct LDKCVec_MonitorEventZ C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c")] public static extern long C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(long _owner); + // struct LDKPublicKey C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d")] public static extern long C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(long _owner); // struct LDKInitFeatures CResult_InitFeaturesDecodeErrorZ_get_ok(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InitFeaturesDecodeErrorZ_get_ok")] public static extern long CResult_InitFeaturesDecodeErrorZ_get_ok(long _owner); // struct LDKDecodeError CResult_InitFeaturesDecodeErrorZ_get_err(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner); @@ -544,18 +583,38 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_get_ok")] public static extern long CResult_ChannelTypeFeaturesDecodeErrorZ_get_ok(long _owner); // struct LDKDecodeError CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_get_err")] public static extern long CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(long _owner); + // struct LDKOfferId CResult_OfferIdDecodeErrorZ_get_ok(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferIdDecodeErrorZ_get_ok")] public static extern long CResult_OfferIdDecodeErrorZ_get_ok(long _owner); + // struct LDKDecodeError CResult_OfferIdDecodeErrorZ_get_err(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferIdDecodeErrorZ_get_err")] public static extern long CResult_OfferIdDecodeErrorZ_get_err(long _owner); + // void CResult_NoneBolt12SemanticErrorZ_get_ok(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneBolt12SemanticErrorZ_get_ok")] public static extern void CResult_NoneBolt12SemanticErrorZ_get_ok(long _owner); + // enum LDKBolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneBolt12SemanticErrorZ_get_err")] public static extern Bolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(long _owner); + // struct LDKOffer CResult_OfferBolt12SemanticErrorZ_get_ok(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferBolt12SemanticErrorZ_get_ok")] public static extern long CResult_OfferBolt12SemanticErrorZ_get_ok(long _owner); + // enum LDKBolt12SemanticError CResult_OfferBolt12SemanticErrorZ_get_err(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferBolt12SemanticErrorZ_get_err")] public static extern Bolt12SemanticError CResult_OfferBolt12SemanticErrorZ_get_err(long _owner); + // struct LDKInvoiceRequestWithDerivedPayerIdBuilder CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok")] public static extern long CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(long _owner); + // enum LDKBolt12SemanticError CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err")] public static extern Bolt12SemanticError CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(long _owner); + // struct LDKInvoiceRequestWithExplicitPayerIdBuilder CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok")] public static extern long CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(long _owner); + // enum LDKBolt12SemanticError CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err")] public static extern Bolt12SemanticError CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(long _owner); // struct LDKOffer CResult_OfferBolt12ParseErrorZ_get_ok(LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferBolt12ParseErrorZ_get_ok")] public static extern long CResult_OfferBolt12ParseErrorZ_get_ok(long _owner); // struct LDKBolt12ParseError CResult_OfferBolt12ParseErrorZ_get_err(LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferBolt12ParseErrorZ_get_err")] public static extern long CResult_OfferBolt12ParseErrorZ_get_err(long _owner); - // struct LDKPublicKey CResult_PublicKeySecp256k1ErrorZ_get_ok(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PublicKeySecp256k1ErrorZ_get_ok")] public static extern long CResult_PublicKeySecp256k1ErrorZ_get_ok(long _owner); - // enum LDKSecp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PublicKeySecp256k1ErrorZ_get_err")] public static extern Secp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(long _owner); // struct LDKNodeId CResult_NodeIdDecodeErrorZ_get_ok(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NodeIdDecodeErrorZ_get_ok")] public static extern long CResult_NodeIdDecodeErrorZ_get_ok(long _owner); // struct LDKDecodeError CResult_NodeIdDecodeErrorZ_get_err(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NodeIdDecodeErrorZ_get_err")] public static extern long CResult_NodeIdDecodeErrorZ_get_err(long _owner); + // struct LDKPublicKey CResult_PublicKeySecp256k1ErrorZ_get_ok(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PublicKeySecp256k1ErrorZ_get_ok")] public static extern long CResult_PublicKeySecp256k1ErrorZ_get_ok(long _owner); + // enum LDKSecp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PublicKeySecp256k1ErrorZ_get_err")] public static extern Secp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(long _owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKNetworkUpdate_ty_from_ptr")] public static extern long LDKNetworkUpdate_ty_from_ptr(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKNetworkUpdate_ChannelUpdateMessage_get_msg")] public static extern long LDKNetworkUpdate_ChannelUpdateMessage_get_msg(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKNetworkUpdate_ChannelFailure_get_short_channel_id")] public static extern long LDKNetworkUpdate_ChannelFailure_get_short_channel_id(long ptr); @@ -736,6 +795,10 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NetworkGraphDecodeErrorZ_get_err")] public static extern long CResult_NetworkGraphDecodeErrorZ_get_err(long _owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_CVec_SocketAddressZZ_ty_from_ptr")] public static extern long LDKCOption_CVec_SocketAddressZZ_ty_from_ptr(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_CVec_SocketAddressZZ_Some_get_some")] public static extern long LDKCOption_CVec_SocketAddressZZ_Some_get_some(long ptr); + // uint64_t CResult_u64ShortChannelIdErrorZ_get_ok(LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_u64ShortChannelIdErrorZ_get_ok")] public static extern long CResult_u64ShortChannelIdErrorZ_get_ok(long _owner); + // enum LDKShortChannelIdError CResult_u64ShortChannelIdErrorZ_get_err(LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_u64ShortChannelIdErrorZ_get_err")] public static extern ShortChannelIdError CResult_u64ShortChannelIdErrorZ_get_err(long _owner); // struct LDKPendingHTLCInfo CResult_PendingHTLCInfoInboundHTLCErrZ_get_ok(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PendingHTLCInfoInboundHTLCErrZ_get_ok")] public static extern long CResult_PendingHTLCInfoInboundHTLCErrZ_get_ok(long _owner); // struct LDKInboundHTLCErr CResult_PendingHTLCInfoInboundHTLCErrZ_get_err(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR owner); @@ -750,6 +813,12 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_UtxoZNoneZ_get_ok")] public static extern long CResult_CVec_UtxoZNoneZ_get_ok(long _owner); // void CResult_CVec_UtxoZNoneZ_get_err(LDKCResult_CVec_UtxoZNoneZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_UtxoZNoneZ_get_err")] public static extern void CResult_CVec_UtxoZNoneZ_get_err(long _owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPaymentContext_ty_from_ptr")] public static extern long LDKPaymentContext_ty_from_ptr(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPaymentContext_Unknown_get_unknown")] public static extern long LDKPaymentContext_Unknown_get_unknown(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPaymentContext_Bolt12Offer_get_bolt12_offer")] public static extern long LDKPaymentContext_Bolt12Offer_get_bolt12_offer(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPaymentContext_Bolt12Refund_get_bolt12_refund")] public static extern long LDKPaymentContext_Bolt12Refund_get_bolt12_refund(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_PaymentContextZ_ty_from_ptr")] public static extern long LDKCOption_PaymentContextZ_ty_from_ptr(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_PaymentContextZ_Some_get_some")] public static extern long LDKCOption_PaymentContextZ_Some_get_some(long ptr); // uint64_t C2Tuple_u64u16Z_get_a(LDKC2Tuple_u64u16Z *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_u64u16Z_get_a")] public static extern long C2Tuple_u64u16Z_get_a(long _owner); // uint16_t C2Tuple_u64u16Z_get_b(LDKC2Tuple_u64u16Z *NONNULL_PTR owner); @@ -758,10 +827,10 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_C2Tuple_u64u16ZZ_Some_get_some")] public static extern long LDKCOption_C2Tuple_u64u16ZZ_Some_get_some(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_ChannelShutdownStateZ_ty_from_ptr")] public static extern long LDKCOption_ChannelShutdownStateZ_ty_from_ptr(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_ChannelShutdownStateZ_Some_get_some")] public static extern ChannelShutdownState LDKCOption_ChannelShutdownStateZ_Some_get_some(long ptr); - // struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesAPIErrorZ_get_ok(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_get_ok")] public static extern long CResult_ThirtyTwoBytesAPIErrorZ_get_ok(long _owner); - // struct LDKAPIError CResult_ThirtyTwoBytesAPIErrorZ_get_err(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_get_err")] public static extern long CResult_ThirtyTwoBytesAPIErrorZ_get_err(long _owner); + // struct LDKChannelId CResult_ChannelIdAPIErrorZ_get_ok(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelIdAPIErrorZ_get_ok")] public static extern long CResult_ChannelIdAPIErrorZ_get_ok(long _owner); + // struct LDKAPIError CResult_ChannelIdAPIErrorZ_get_err(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelIdAPIErrorZ_get_err")] public static extern long CResult_ChannelIdAPIErrorZ_get_err(long _owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKRecentPaymentDetails_ty_from_ptr")] public static extern long LDKRecentPaymentDetails_ty_from_ptr(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKRecentPaymentDetails_AwaitingInvoice_get_payment_id")] public static extern long LDKRecentPaymentDetails_AwaitingInvoice_get_payment_id(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKRecentPaymentDetails_Pending_get_payment_id")] public static extern long LDKRecentPaymentDetails_Pending_get_payment_id(long ptr); @@ -808,20 +877,24 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_get_ok")] public static extern long CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_get_ok(long _owner); // struct LDKProbeSendFailure CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_get_err(LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_get_err")] public static extern long CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_get_err(long _owner); - // struct LDKThirtyTwoBytes C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a")] public static extern long C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(long _owner); - // struct LDKPublicKey C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b")] public static extern long C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(long _owner); + // struct LDKChannelId C2Tuple_ChannelIdPublicKeyZ_get_a(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_ChannelIdPublicKeyZ_get_a")] public static extern long C2Tuple_ChannelIdPublicKeyZ_get_a(long _owner); + // struct LDKPublicKey C2Tuple_ChannelIdPublicKeyZ_get_b(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_ChannelIdPublicKeyZ_get_b")] public static extern long C2Tuple_ChannelIdPublicKeyZ_get_b(long _owner); + // struct LDKOfferWithDerivedMetadataBuilder CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok")] public static extern long CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(long _owner); + // enum LDKBolt12SemanticError CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err")] public static extern Bolt12SemanticError CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(long _owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_StrZ_ty_from_ptr")] public static extern long LDKCOption_StrZ_ty_from_ptr(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_StrZ_Some_get_some")] public static extern long LDKCOption_StrZ_Some_get_some(long ptr); - // void CResult_NoneBolt12SemanticErrorZ_get_ok(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneBolt12SemanticErrorZ_get_ok")] public static extern void CResult_NoneBolt12SemanticErrorZ_get_ok(long _owner); - // enum LDKBolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneBolt12SemanticErrorZ_get_err")] public static extern Bolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(long _owner); // struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_ok(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_ok")] public static extern long CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_ok(long _owner); // void CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_err(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_err")] public static extern void CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_err(long _owner); + // struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesAPIErrorZ_get_ok(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_get_ok")] public static extern long CResult_ThirtyTwoBytesAPIErrorZ_get_ok(long _owner); + // struct LDKAPIError CResult_ThirtyTwoBytesAPIErrorZ_get_err(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_get_err")] public static extern long CResult_ThirtyTwoBytesAPIErrorZ_get_err(long _owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKOffersMessage_ty_from_ptr")] public static extern long LDKOffersMessage_ty_from_ptr(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKOffersMessage_InvoiceRequest_get_invoice_request")] public static extern long LDKOffersMessage_InvoiceRequest_get_invoice_request(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKOffersMessage_Invoice_get_invoice")] public static extern long LDKOffersMessage_Invoice_get_invoice(long ptr); @@ -863,6 +936,7 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPendingHTLCRouting_Forward_get_blinded")] public static extern long LDKPendingHTLCRouting_Forward_get_blinded(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPendingHTLCRouting_Receive_get_payment_data")] public static extern long LDKPendingHTLCRouting_Receive_get_payment_data(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPendingHTLCRouting_Receive_get_payment_metadata")] public static extern long LDKPendingHTLCRouting_Receive_get_payment_metadata(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPendingHTLCRouting_Receive_get_payment_context")] public static extern long LDKPendingHTLCRouting_Receive_get_payment_context(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPendingHTLCRouting_Receive_get_incoming_cltv_expiry")] public static extern int LDKPendingHTLCRouting_Receive_get_incoming_cltv_expiry(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPendingHTLCRouting_Receive_get_phantom_shared_secret")] public static extern long LDKPendingHTLCRouting_Receive_get_phantom_shared_secret(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPendingHTLCRouting_Receive_get_custom_tlvs")] public static extern long LDKPendingHTLCRouting_Receive_get_custom_tlvs(long ptr); @@ -872,6 +946,7 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPendingHTLCRouting_ReceiveKeysend_get_payment_metadata")] public static extern long LDKPendingHTLCRouting_ReceiveKeysend_get_payment_metadata(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPendingHTLCRouting_ReceiveKeysend_get_incoming_cltv_expiry")] public static extern int LDKPendingHTLCRouting_ReceiveKeysend_get_incoming_cltv_expiry(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPendingHTLCRouting_ReceiveKeysend_get_custom_tlvs")] public static extern long LDKPendingHTLCRouting_ReceiveKeysend_get_custom_tlvs(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPendingHTLCRouting_ReceiveKeysend_get_requires_blinded_error")] public static extern bool LDKPendingHTLCRouting_ReceiveKeysend_get_requires_blinded_error(long ptr); // struct LDKPendingHTLCRouting CResult_PendingHTLCRoutingDecodeErrorZ_get_ok(LDKCResult_PendingHTLCRoutingDecodeErrorZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PendingHTLCRoutingDecodeErrorZ_get_ok")] public static extern long CResult_PendingHTLCRoutingDecodeErrorZ_get_ok(long _owner); // struct LDKDecodeError CResult_PendingHTLCRoutingDecodeErrorZ_get_err(LDKCResult_PendingHTLCRoutingDecodeErrorZ *NONNULL_PTR owner); @@ -914,7 +989,7 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Watch_watch_channel")] public static extern long Watch_watch_channel(long _this_arg, long _funding_txo, long _monitor); // LDKChannelMonitorUpdateStatus Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, const struct LDKChannelMonitorUpdate *NONNULL_PTR update [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Watch_update_channel")] public static extern ChannelMonitorUpdateStatus Watch_update_channel(long _this_arg, long _funding_txo, long _update); - // LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg + // LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Watch_release_pending_monitor_events")] public static extern long Watch_release_pending_monitor_events(long _this_arg); public interface LDKBroadcasterInterface { void broadcast_transactions(long txs); @@ -1281,10 +1356,6 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_COption_TypeZDecodeErrorZ_get_err")] public static extern long CResult_COption_TypeZDecodeErrorZ_get_err(long _owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_SocketAddressZ_ty_from_ptr")] public static extern long LDKCOption_SocketAddressZ_ty_from_ptr(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_SocketAddressZ_Some_get_some")] public static extern long LDKCOption_SocketAddressZ_Some_get_some(long ptr); - // struct LDKPublicKey C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a")] public static extern long C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(long _owner); - // struct LDKCOption_SocketAddressZ C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b")] public static extern long C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(long _owner); // struct LDKCVec_u8Z CResult_CVec_u8ZPeerHandleErrorZ_get_ok(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_u8ZPeerHandleErrorZ_get_ok")] public static extern long CResult_CVec_u8ZPeerHandleErrorZ_get_ok(long _owner); // struct LDKPeerHandleError CResult_CVec_u8ZPeerHandleErrorZ_get_err(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR owner); @@ -1320,12 +1391,34 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_get_ok")] public static extern long CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_get_ok(long _owner); // enum LDKIOError CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_get_err(LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_get_err")] public static extern IOError CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_get_err(long _owner); + // struct LDKUnsignedInvoiceRequest CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok")] public static extern long CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(long _owner); + // enum LDKBolt12SemanticError CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err")] public static extern Bolt12SemanticError CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(long _owner); + // struct LDKInvoiceRequest CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok")] public static extern long CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(long _owner); + // enum LDKBolt12SemanticError CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestBolt12SemanticErrorZ_get_err")] public static extern Bolt12SemanticError CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(long _owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_SecretKeyZ_ty_from_ptr")] public static extern long LDKCOption_SecretKeyZ_ty_from_ptr(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_SecretKeyZ_Some_get_some")] public static extern long LDKCOption_SecretKeyZ_Some_get_some(long ptr); + // struct LDKInvoiceWithExplicitSigningPubkeyBuilder CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok")] public static extern long CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(long _owner); + // enum LDKBolt12SemanticError CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err")] public static extern Bolt12SemanticError CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(long _owner); // struct LDKVerifiedInvoiceRequest CResult_VerifiedInvoiceRequestNoneZ_get_ok(LDKCResult_VerifiedInvoiceRequestNoneZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_VerifiedInvoiceRequestNoneZ_get_ok")] public static extern long CResult_VerifiedInvoiceRequestNoneZ_get_ok(long _owner); // void CResult_VerifiedInvoiceRequestNoneZ_get_err(LDKCResult_VerifiedInvoiceRequestNoneZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_VerifiedInvoiceRequestNoneZ_get_err")] public static extern void CResult_VerifiedInvoiceRequestNoneZ_get_err(long _owner); + // struct LDKInvoiceWithDerivedSigningPubkeyBuilder CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok")] public static extern long CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(long _owner); + // enum LDKBolt12SemanticError CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err")] public static extern Bolt12SemanticError CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(long _owner); + // struct LDKInvoiceRequestFields CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok")] public static extern long CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(long _owner); + // struct LDKDecodeError CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestFieldsDecodeErrorZ_get_err")] public static extern long CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(long _owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_ECDSASignatureZ_ty_from_ptr")] public static extern long LDKCOption_ECDSASignatureZ_ty_from_ptr(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_ECDSASignatureZ_Some_get_some")] public static extern long LDKCOption_ECDSASignatureZ_Some_get_some(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_i64Z_ty_from_ptr")] public static extern long LDKCOption_i64Z_ty_from_ptr(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_i64Z_Some_get_some")] public static extern long LDKCOption_i64Z_Some_get_some(long ptr); // struct LDKSocketAddress CResult_SocketAddressDecodeErrorZ_get_ok(LDKCResult_SocketAddressDecodeErrorZ *NONNULL_PTR owner); @@ -1611,8 +1704,14 @@ internal class bindings { // struct LDKInvalidShutdownScript CResult_ShutdownScriptInvalidShutdownScriptZ_get_err(LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ShutdownScriptInvalidShutdownScriptZ_get_err")] public static extern long CResult_ShutdownScriptInvalidShutdownScriptZ_get_err(long _owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPaymentPurpose_ty_from_ptr")] public static extern long LDKPaymentPurpose_ty_from_ptr(long ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPaymentPurpose_InvoicePayment_get_payment_preimage")] public static extern long LDKPaymentPurpose_InvoicePayment_get_payment_preimage(long ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPaymentPurpose_InvoicePayment_get_payment_secret")] public static extern long LDKPaymentPurpose_InvoicePayment_get_payment_secret(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPaymentPurpose_Bolt11InvoicePayment_get_payment_preimage")] public static extern long LDKPaymentPurpose_Bolt11InvoicePayment_get_payment_preimage(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPaymentPurpose_Bolt11InvoicePayment_get_payment_secret")] public static extern long LDKPaymentPurpose_Bolt11InvoicePayment_get_payment_secret(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPaymentPurpose_Bolt12OfferPayment_get_payment_preimage")] public static extern long LDKPaymentPurpose_Bolt12OfferPayment_get_payment_preimage(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPaymentPurpose_Bolt12OfferPayment_get_payment_secret")] public static extern long LDKPaymentPurpose_Bolt12OfferPayment_get_payment_secret(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPaymentPurpose_Bolt12OfferPayment_get_payment_context")] public static extern long LDKPaymentPurpose_Bolt12OfferPayment_get_payment_context(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPaymentPurpose_Bolt12RefundPayment_get_payment_preimage")] public static extern long LDKPaymentPurpose_Bolt12RefundPayment_get_payment_preimage(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPaymentPurpose_Bolt12RefundPayment_get_payment_secret")] public static extern long LDKPaymentPurpose_Bolt12RefundPayment_get_payment_secret(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPaymentPurpose_Bolt12RefundPayment_get_payment_context")] public static extern long LDKPaymentPurpose_Bolt12RefundPayment_get_payment_context(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPaymentPurpose_SpontaneousPayment_get_spontaneous_payment")] public static extern long LDKPaymentPurpose_SpontaneousPayment_get_spontaneous_payment(long ptr); // struct LDKPaymentPurpose CResult_PaymentPurposeDecodeErrorZ_get_ok(LDKCResult_PaymentPurposeDecodeErrorZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PaymentPurposeDecodeErrorZ_get_ok")] public static extern long CResult_PaymentPurposeDecodeErrorZ_get_ok(long _owner); @@ -1631,9 +1730,6 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_COption_PathFailureZDecodeErrorZ_get_ok")] public static extern long CResult_COption_PathFailureZDecodeErrorZ_get_ok(long _owner); // struct LDKDecodeError CResult_COption_PathFailureZDecodeErrorZ_get_err(LDKCResult_COption_PathFailureZDecodeErrorZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_COption_PathFailureZDecodeErrorZ_get_err")] public static extern long CResult_COption_PathFailureZDecodeErrorZ_get_err(long _owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKClosureReason_ty_from_ptr")] public static extern long LDKClosureReason_ty_from_ptr(long ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKClosureReason_CounterpartyForceClosed_get_peer_msg")] public static extern long LDKClosureReason_CounterpartyForceClosed_get_peer_msg(long ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKClosureReason_ProcessingError_get_err")] public static extern long LDKClosureReason_ProcessingError_get_err(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_ClosureReasonZ_ty_from_ptr")] public static extern long LDKCOption_ClosureReasonZ_ty_from_ptr(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_ClosureReasonZ_Some_get_some")] public static extern long LDKCOption_ClosureReasonZ_Some_get_some(long ptr); // struct LDKCOption_ClosureReasonZ CResult_COption_ClosureReasonZDecodeErrorZ_get_ok(LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR owner); @@ -1661,12 +1757,16 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_PaymentFailureReasonZ_ty_from_ptr")] public static extern long LDKCOption_PaymentFailureReasonZ_ty_from_ptr(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_PaymentFailureReasonZ_Some_get_some")] public static extern PaymentFailureReason LDKCOption_PaymentFailureReasonZ_Some_get_some(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBumpTransactionEvent_ty_from_ptr")] public static extern long LDKBumpTransactionEvent_ty_from_ptr(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBumpTransactionEvent_ChannelClose_get_channel_id")] public static extern long LDKBumpTransactionEvent_ChannelClose_get_channel_id(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBumpTransactionEvent_ChannelClose_get_counterparty_node_id")] public static extern long LDKBumpTransactionEvent_ChannelClose_get_counterparty_node_id(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBumpTransactionEvent_ChannelClose_get_claim_id")] public static extern long LDKBumpTransactionEvent_ChannelClose_get_claim_id(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBumpTransactionEvent_ChannelClose_get_package_target_feerate_sat_per_1000_weight")] public static extern int LDKBumpTransactionEvent_ChannelClose_get_package_target_feerate_sat_per_1000_weight(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBumpTransactionEvent_ChannelClose_get_commitment_tx")] public static extern long LDKBumpTransactionEvent_ChannelClose_get_commitment_tx(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBumpTransactionEvent_ChannelClose_get_commitment_tx_fee_satoshis")] public static extern long LDKBumpTransactionEvent_ChannelClose_get_commitment_tx_fee_satoshis(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBumpTransactionEvent_ChannelClose_get_anchor_descriptor")] public static extern long LDKBumpTransactionEvent_ChannelClose_get_anchor_descriptor(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBumpTransactionEvent_ChannelClose_get_pending_htlcs")] public static extern long LDKBumpTransactionEvent_ChannelClose_get_pending_htlcs(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBumpTransactionEvent_HTLCResolution_get_channel_id")] public static extern long LDKBumpTransactionEvent_HTLCResolution_get_channel_id(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBumpTransactionEvent_HTLCResolution_get_counterparty_node_id")] public static extern long LDKBumpTransactionEvent_HTLCResolution_get_counterparty_node_id(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBumpTransactionEvent_HTLCResolution_get_claim_id")] public static extern long LDKBumpTransactionEvent_HTLCResolution_get_claim_id(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBumpTransactionEvent_HTLCResolution_get_target_feerate_sat_per_1000_weight")] public static extern int LDKBumpTransactionEvent_HTLCResolution_get_target_feerate_sat_per_1000_weight(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBumpTransactionEvent_HTLCResolution_get_htlc_descriptors")] public static extern long LDKBumpTransactionEvent_HTLCResolution_get_htlc_descriptors(long ptr); @@ -1728,7 +1828,10 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_SpendableOutputs_get_channel_id")] public static extern long LDKEvent_SpendableOutputs_get_channel_id(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_PaymentForwarded_get_prev_channel_id")] public static extern long LDKEvent_PaymentForwarded_get_prev_channel_id(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_PaymentForwarded_get_next_channel_id")] public static extern long LDKEvent_PaymentForwarded_get_next_channel_id(long ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_PaymentForwarded_get_fee_earned_msat")] public static extern long LDKEvent_PaymentForwarded_get_fee_earned_msat(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_PaymentForwarded_get_prev_user_channel_id")] public static extern long LDKEvent_PaymentForwarded_get_prev_user_channel_id(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_PaymentForwarded_get_next_user_channel_id")] public static extern long LDKEvent_PaymentForwarded_get_next_user_channel_id(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_PaymentForwarded_get_total_fee_earned_msat")] public static extern long LDKEvent_PaymentForwarded_get_total_fee_earned_msat(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_PaymentForwarded_get_skimmed_fee_msat")] public static extern long LDKEvent_PaymentForwarded_get_skimmed_fee_msat(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_PaymentForwarded_get_claim_from_onchain_tx")] public static extern bool LDKEvent_PaymentForwarded_get_claim_from_onchain_tx(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_PaymentForwarded_get_outbound_amount_forwarded_msat")] public static extern long LDKEvent_PaymentForwarded_get_outbound_amount_forwarded_msat(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_ChannelPending_get_channel_id")] public static extern long LDKEvent_ChannelPending_get_channel_id(long ptr); @@ -1736,6 +1839,7 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_ChannelPending_get_former_temporary_channel_id")] public static extern long LDKEvent_ChannelPending_get_former_temporary_channel_id(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_ChannelPending_get_counterparty_node_id")] public static extern long LDKEvent_ChannelPending_get_counterparty_node_id(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_ChannelPending_get_funding_txo")] public static extern long LDKEvent_ChannelPending_get_funding_txo(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_ChannelPending_get_channel_type")] public static extern long LDKEvent_ChannelPending_get_channel_type(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_ChannelReady_get_channel_id")] public static extern long LDKEvent_ChannelReady_get_channel_id(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_ChannelReady_get_user_channel_id")] public static extern long LDKEvent_ChannelReady_get_user_channel_id(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_ChannelReady_get_counterparty_node_id")] public static extern long LDKEvent_ChannelReady_get_counterparty_node_id(long ptr); @@ -1837,6 +1941,10 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UntrustedStringDecodeErrorZ_get_ok")] public static extern long CResult_UntrustedStringDecodeErrorZ_get_ok(long _owner); // struct LDKDecodeError CResult_UntrustedStringDecodeErrorZ_get_err(LDKCResult_UntrustedStringDecodeErrorZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UntrustedStringDecodeErrorZ_get_err")] public static extern long CResult_UntrustedStringDecodeErrorZ_get_err(long _owner); + // struct LDKChannelId CResult_ChannelIdDecodeErrorZ_get_ok(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelIdDecodeErrorZ_get_ok")] public static extern long CResult_ChannelIdDecodeErrorZ_get_ok(long _owner); + // struct LDKDecodeError CResult_ChannelIdDecodeErrorZ_get_err(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelIdDecodeErrorZ_get_err")] public static extern long CResult_ChannelIdDecodeErrorZ_get_err(long _owner); // struct LDKThirtyTwoBytes C2Tuple__u832u16Z_get_a(LDKC2Tuple__u832u16Z *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple__u832u16Z_get_a")] public static extern long C2Tuple__u832u16Z_get_a(long _owner); // uint16_t C2Tuple__u832u16Z_get_b(LDKC2Tuple__u832u16Z *NONNULL_PTR owner); @@ -1849,6 +1957,26 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PaymentConstraintsDecodeErrorZ_get_ok")] public static extern long CResult_PaymentConstraintsDecodeErrorZ_get_ok(long _owner); // struct LDKDecodeError CResult_PaymentConstraintsDecodeErrorZ_get_err(LDKCResult_PaymentConstraintsDecodeErrorZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PaymentConstraintsDecodeErrorZ_get_err")] public static extern long CResult_PaymentConstraintsDecodeErrorZ_get_err(long _owner); + // struct LDKPaymentContext CResult_PaymentContextDecodeErrorZ_get_ok(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PaymentContextDecodeErrorZ_get_ok")] public static extern long CResult_PaymentContextDecodeErrorZ_get_ok(long _owner); + // struct LDKDecodeError CResult_PaymentContextDecodeErrorZ_get_err(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PaymentContextDecodeErrorZ_get_err")] public static extern long CResult_PaymentContextDecodeErrorZ_get_err(long _owner); + // struct LDKUnknownPaymentContext CResult_UnknownPaymentContextDecodeErrorZ_get_ok(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_get_ok")] public static extern long CResult_UnknownPaymentContextDecodeErrorZ_get_ok(long _owner); + // struct LDKDecodeError CResult_UnknownPaymentContextDecodeErrorZ_get_err(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_get_err")] public static extern long CResult_UnknownPaymentContextDecodeErrorZ_get_err(long _owner); + // struct LDKBolt12OfferContext CResult_Bolt12OfferContextDecodeErrorZ_get_ok(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12OfferContextDecodeErrorZ_get_ok")] public static extern long CResult_Bolt12OfferContextDecodeErrorZ_get_ok(long _owner); + // struct LDKDecodeError CResult_Bolt12OfferContextDecodeErrorZ_get_err(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12OfferContextDecodeErrorZ_get_err")] public static extern long CResult_Bolt12OfferContextDecodeErrorZ_get_err(long _owner); + // struct LDKBolt12RefundContext CResult_Bolt12RefundContextDecodeErrorZ_get_ok(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12RefundContextDecodeErrorZ_get_ok")] public static extern long CResult_Bolt12RefundContextDecodeErrorZ_get_ok(long _owner); + // struct LDKDecodeError CResult_Bolt12RefundContextDecodeErrorZ_get_err(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12RefundContextDecodeErrorZ_get_err")] public static extern long CResult_Bolt12RefundContextDecodeErrorZ_get_err(long _owner); + // struct LDKStr CResult_StrSecp256k1ErrorZ_get_ok(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_StrSecp256k1ErrorZ_get_ok")] public static extern long CResult_StrSecp256k1ErrorZ_get_ok(long _owner); + // enum LDKSecp256k1Error CResult_StrSecp256k1ErrorZ_get_err(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_StrSecp256k1ErrorZ_get_err")] public static extern Secp256k1Error CResult_StrSecp256k1ErrorZ_get_err(long _owner); // struct LDKThirtyTwoBytes C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a")] public static extern long C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(long _owner); // struct LDKRecipientOnionFields C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner); @@ -1859,10 +1987,6 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok")] public static extern long CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(long _owner); // void CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err")] public static extern void CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(long _owner); - // struct LDKStr CResult_StrSecp256k1ErrorZ_get_ok(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_StrSecp256k1ErrorZ_get_ok")] public static extern long CResult_StrSecp256k1ErrorZ_get_ok(long _owner); - // enum LDKSecp256k1Error CResult_StrSecp256k1ErrorZ_get_err(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_StrSecp256k1ErrorZ_get_err")] public static extern Secp256k1Error CResult_StrSecp256k1ErrorZ_get_err(long _owner); // struct LDKPublicKey C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_a(LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_a")] public static extern long C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_a(long _owner); // struct LDKOnionMessage C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_b(LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ *NONNULL_PTR owner); @@ -1876,6 +2000,9 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_get_ok")] public static extern long CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_get_ok(long _owner); // struct LDKSendError CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_get_err(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_get_err")] public static extern long CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_get_err(long _owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKNextMessageHop_ty_from_ptr")] public static extern long LDKNextMessageHop_ty_from_ptr(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKNextMessageHop_NodeId_get_node_id")] public static extern long LDKNextMessageHop_NodeId_get_node_id(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKNextMessageHop_ShortChannelId_get_short_channel_id")] public static extern long LDKNextMessageHop_ShortChannelId_get_short_channel_id(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKParsedOnionMessageContents_ty_from_ptr")] public static extern long LDKParsedOnionMessageContents_ty_from_ptr(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKParsedOnionMessageContents_Offers_get_offers")] public static extern long LDKParsedOnionMessageContents_Offers_get_offers(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKParsedOnionMessageContents_Custom_get_custom")] public static extern long LDKParsedOnionMessageContents_Custom_get_custom(long ptr); @@ -1915,30 +2042,24 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceErrorDecodeErrorZ_get_ok")] public static extern long CResult_InvoiceErrorDecodeErrorZ_get_ok(long _owner); // struct LDKDecodeError CResult_InvoiceErrorDecodeErrorZ_get_err(LDKCResult_InvoiceErrorDecodeErrorZ *NONNULL_PTR owner); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceErrorDecodeErrorZ_get_err")] public static extern long CResult_InvoiceErrorDecodeErrorZ_get_err(long _owner); - // struct LDKDelayedPaymentBasepoint CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok")] public static extern long CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(long _owner); - // struct LDKDecodeError CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_DelayedPaymentBasepointDecodeErrorZ_get_err")] public static extern long CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(long _owner); - // struct LDKDelayedPaymentKey CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_DelayedPaymentKeyDecodeErrorZ_get_ok")] public static extern long CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(long _owner); - // struct LDKDecodeError CResult_DelayedPaymentKeyDecodeErrorZ_get_err(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_DelayedPaymentKeyDecodeErrorZ_get_err")] public static extern long CResult_DelayedPaymentKeyDecodeErrorZ_get_err(long _owner); - // struct LDKHtlcBasepoint CResult_HtlcBasepointDecodeErrorZ_get_ok(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_HtlcBasepointDecodeErrorZ_get_ok")] public static extern long CResult_HtlcBasepointDecodeErrorZ_get_ok(long _owner); - // struct LDKDecodeError CResult_HtlcBasepointDecodeErrorZ_get_err(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_HtlcBasepointDecodeErrorZ_get_err")] public static extern long CResult_HtlcBasepointDecodeErrorZ_get_err(long _owner); - // struct LDKHtlcKey CResult_HtlcKeyDecodeErrorZ_get_ok(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_HtlcKeyDecodeErrorZ_get_ok")] public static extern long CResult_HtlcKeyDecodeErrorZ_get_ok(long _owner); - // struct LDKDecodeError CResult_HtlcKeyDecodeErrorZ_get_err(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_HtlcKeyDecodeErrorZ_get_err")] public static extern long CResult_HtlcKeyDecodeErrorZ_get_err(long _owner); - // struct LDKRevocationBasepoint CResult_RevocationBasepointDecodeErrorZ_get_ok(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RevocationBasepointDecodeErrorZ_get_ok")] public static extern long CResult_RevocationBasepointDecodeErrorZ_get_ok(long _owner); - // struct LDKDecodeError CResult_RevocationBasepointDecodeErrorZ_get_err(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RevocationBasepointDecodeErrorZ_get_err")] public static extern long CResult_RevocationBasepointDecodeErrorZ_get_err(long _owner); - // struct LDKRevocationKey CResult_RevocationKeyDecodeErrorZ_get_ok(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RevocationKeyDecodeErrorZ_get_ok")] public static extern long CResult_RevocationKeyDecodeErrorZ_get_ok(long _owner); - // struct LDKDecodeError CResult_RevocationKeyDecodeErrorZ_get_err(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RevocationKeyDecodeErrorZ_get_err")] public static extern long CResult_RevocationKeyDecodeErrorZ_get_err(long _owner); + // struct LDKTrackedSpendableOutput CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_TrackedSpendableOutputDecodeErrorZ_get_ok")] public static extern long CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(long _owner); + // struct LDKDecodeError CResult_TrackedSpendableOutputDecodeErrorZ_get_err(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_TrackedSpendableOutputDecodeErrorZ_get_err")] public static extern long CResult_TrackedSpendableOutputDecodeErrorZ_get_err(long _owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKOutputSpendStatus_ty_from_ptr")] public static extern long LDKOutputSpendStatus_ty_from_ptr(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKOutputSpendStatus_PendingInitialBroadcast_get_delayed_until_height")] public static extern long LDKOutputSpendStatus_PendingInitialBroadcast_get_delayed_until_height(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKOutputSpendStatus_PendingFirstConfirmation_get_first_broadcast_hash")] public static extern long LDKOutputSpendStatus_PendingFirstConfirmation_get_first_broadcast_hash(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKOutputSpendStatus_PendingFirstConfirmation_get_latest_broadcast_height")] public static extern int LDKOutputSpendStatus_PendingFirstConfirmation_get_latest_broadcast_height(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKOutputSpendStatus_PendingFirstConfirmation_get_latest_spending_tx")] public static extern long LDKOutputSpendStatus_PendingFirstConfirmation_get_latest_spending_tx(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKOutputSpendStatus_PendingThresholdConfirmations_get_first_broadcast_hash")] public static extern long LDKOutputSpendStatus_PendingThresholdConfirmations_get_first_broadcast_hash(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKOutputSpendStatus_PendingThresholdConfirmations_get_latest_broadcast_height")] public static extern int LDKOutputSpendStatus_PendingThresholdConfirmations_get_latest_broadcast_height(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKOutputSpendStatus_PendingThresholdConfirmations_get_latest_spending_tx")] public static extern long LDKOutputSpendStatus_PendingThresholdConfirmations_get_latest_spending_tx(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKOutputSpendStatus_PendingThresholdConfirmations_get_confirmation_height")] public static extern int LDKOutputSpendStatus_PendingThresholdConfirmations_get_confirmation_height(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKOutputSpendStatus_PendingThresholdConfirmations_get_confirmation_hash")] public static extern long LDKOutputSpendStatus_PendingThresholdConfirmations_get_confirmation_hash(long ptr); + // struct LDKOutputSpendStatus CResult_OutputSpendStatusDecodeErrorZ_get_ok(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OutputSpendStatusDecodeErrorZ_get_ok")] public static extern long CResult_OutputSpendStatusDecodeErrorZ_get_ok(long _owner); + // struct LDKDecodeError CResult_OutputSpendStatusDecodeErrorZ_get_err(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OutputSpendStatusDecodeErrorZ_get_err")] public static extern long CResult_OutputSpendStatusDecodeErrorZ_get_err(long _owner); public interface LDKFilter { void register_tx(long txid, long script_pubkey); void register_output(long output); @@ -1966,14 +2087,28 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Filter_register_output")] public static extern void Filter_register_output(long _this_arg, long _output); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_FilterZ_ty_from_ptr")] public static extern long LDKCOption_FilterZ_ty_from_ptr(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_FilterZ_Some_get_some")] public static extern long LDKCOption_FilterZ_Some_get_some(long ptr); - // struct LDKLockedChannelMonitor CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_LockedChannelMonitorNoneZ_get_ok")] public static extern long CResult_LockedChannelMonitorNoneZ_get_ok(long _owner); - // void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_LockedChannelMonitorNoneZ_get_err")] public static extern void CResult_LockedChannelMonitorNoneZ_get_err(long _owner); - // struct LDKOutPoint C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a")] public static extern long C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(long _owner); - // struct LDKCVec_MonitorUpdateIdZ C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b")] public static extern long C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(long _owner); + public interface LDKChangeDestinationSource { + long get_change_destination_script(); + } + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKChangeDestinationSource_new")] public static extern long LDKChangeDestinationSource_new_native(long impl_idx); + public static long[] LDKChangeDestinationSource_new(LDKChangeDestinationSource impl) { + long new_obj_idx = js_objs.Count; + int i = 0; + for (; i < js_objs.Count; i++) { + if (js_objs[i] == null || !js_objs[i].IsAlive) { new_obj_idx = i; break; } + } + if (i == js_objs.Count) { + js_objs.Add(new WeakReference(impl)); + } else { + js_objs[i] = new WeakReference(impl); + } + long[] ret = new long[2]; + ret[0] = LDKChangeDestinationSource_new_native(i); + ret[1] = i; + return ret; + } + // LDKCResult_CVec_u8ZNoneZ ChangeDestinationSource_get_change_destination_script LDKChangeDestinationSource *NONNULL_PTR this_arg + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChangeDestinationSource_get_change_destination_script")] public static extern long ChangeDestinationSource_get_change_destination_script(long _this_arg); public interface LDKKVStore { long read(long primary_namespace, long secondary_namespace, long key); long write(long primary_namespace, long secondary_namespace, long key, long buf); @@ -2005,6 +2140,76 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_KVStore_remove")] public static extern long KVStore_remove(long _this_arg, long _primary_namespace, long _secondary_namespace, long _key, bool _lazy); // LDKCResult_CVec_StrZIOErrorZ KVStore_list LDKKVStore *NONNULL_PTR this_arg, struct LDKStr primary_namespace, struct LDKStr secondary_namespace [DllImport ("ldkcsharp", EntryPoint="CS_LDK_KVStore_list")] public static extern long KVStore_list(long _this_arg, long _primary_namespace, long _secondary_namespace); + public interface LDKOutputSpender { + long spend_spendable_outputs(long descriptors, long outputs, long change_destination_script, int feerate_sat_per_1000_weight, long locktime); + } + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKOutputSpender_new")] public static extern long LDKOutputSpender_new_native(long impl_idx); + public static long[] LDKOutputSpender_new(LDKOutputSpender impl) { + long new_obj_idx = js_objs.Count; + int i = 0; + for (; i < js_objs.Count; i++) { + if (js_objs[i] == null || !js_objs[i].IsAlive) { new_obj_idx = i; break; } + } + if (i == js_objs.Count) { + js_objs.Add(new WeakReference(impl)); + } else { + js_objs[i] = new WeakReference(impl); + } + long[] ret = new long[2]; + ret[0] = LDKOutputSpender_new_native(i); + ret[1] = i; + return ret; + } + // LDKCResult_TransactionNoneZ OutputSpender_spend_spendable_outputs LDKOutputSpender *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ descriptors, struct LDKCVec_TxOutZ outputs, struct LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight, struct LDKCOption_u32Z locktime + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OutputSpender_spend_spendable_outputs")] public static extern long OutputSpender_spend_spendable_outputs(long _this_arg, long _descriptors, long _outputs, long _change_destination_script, int _feerate_sat_per_1000_weight, long _locktime); + // struct LDKOutputSweeper CResult_OutputSweeperDecodeErrorZ_get_ok(LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OutputSweeperDecodeErrorZ_get_ok")] public static extern long CResult_OutputSweeperDecodeErrorZ_get_ok(long _owner); + // struct LDKDecodeError CResult_OutputSweeperDecodeErrorZ_get_err(LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OutputSweeperDecodeErrorZ_get_err")] public static extern long CResult_OutputSweeperDecodeErrorZ_get_err(long _owner); + // struct LDKBestBlock C2Tuple_BestBlockOutputSweeperZ_get_a(LDKC2Tuple_BestBlockOutputSweeperZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_BestBlockOutputSweeperZ_get_a")] public static extern long C2Tuple_BestBlockOutputSweeperZ_get_a(long _owner); + // struct LDKOutputSweeper C2Tuple_BestBlockOutputSweeperZ_get_b(LDKC2Tuple_BestBlockOutputSweeperZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_BestBlockOutputSweeperZ_get_b")] public static extern long C2Tuple_BestBlockOutputSweeperZ_get_b(long _owner); + // struct LDKC2Tuple_BestBlockOutputSweeperZ *CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok")] public static extern long CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(long _owner); + // struct LDKDecodeError CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err")] public static extern long CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(long _owner); + // struct LDKDelayedPaymentBasepoint CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok")] public static extern long CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(long _owner); + // struct LDKDecodeError CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_DelayedPaymentBasepointDecodeErrorZ_get_err")] public static extern long CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(long _owner); + // struct LDKDelayedPaymentKey CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_DelayedPaymentKeyDecodeErrorZ_get_ok")] public static extern long CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(long _owner); + // struct LDKDecodeError CResult_DelayedPaymentKeyDecodeErrorZ_get_err(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_DelayedPaymentKeyDecodeErrorZ_get_err")] public static extern long CResult_DelayedPaymentKeyDecodeErrorZ_get_err(long _owner); + // struct LDKHtlcBasepoint CResult_HtlcBasepointDecodeErrorZ_get_ok(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_HtlcBasepointDecodeErrorZ_get_ok")] public static extern long CResult_HtlcBasepointDecodeErrorZ_get_ok(long _owner); + // struct LDKDecodeError CResult_HtlcBasepointDecodeErrorZ_get_err(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_HtlcBasepointDecodeErrorZ_get_err")] public static extern long CResult_HtlcBasepointDecodeErrorZ_get_err(long _owner); + // struct LDKHtlcKey CResult_HtlcKeyDecodeErrorZ_get_ok(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_HtlcKeyDecodeErrorZ_get_ok")] public static extern long CResult_HtlcKeyDecodeErrorZ_get_ok(long _owner); + // struct LDKDecodeError CResult_HtlcKeyDecodeErrorZ_get_err(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_HtlcKeyDecodeErrorZ_get_err")] public static extern long CResult_HtlcKeyDecodeErrorZ_get_err(long _owner); + // struct LDKRevocationBasepoint CResult_RevocationBasepointDecodeErrorZ_get_ok(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RevocationBasepointDecodeErrorZ_get_ok")] public static extern long CResult_RevocationBasepointDecodeErrorZ_get_ok(long _owner); + // struct LDKDecodeError CResult_RevocationBasepointDecodeErrorZ_get_err(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RevocationBasepointDecodeErrorZ_get_err")] public static extern long CResult_RevocationBasepointDecodeErrorZ_get_err(long _owner); + // struct LDKRevocationKey CResult_RevocationKeyDecodeErrorZ_get_ok(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RevocationKeyDecodeErrorZ_get_ok")] public static extern long CResult_RevocationKeyDecodeErrorZ_get_ok(long _owner); + // struct LDKDecodeError CResult_RevocationKeyDecodeErrorZ_get_err(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RevocationKeyDecodeErrorZ_get_err")] public static extern long CResult_RevocationKeyDecodeErrorZ_get_err(long _owner); + // struct LDKLockedChannelMonitor CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_LockedChannelMonitorNoneZ_get_ok")] public static extern long CResult_LockedChannelMonitorNoneZ_get_ok(long _owner); + // void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_LockedChannelMonitorNoneZ_get_err")] public static extern void CResult_LockedChannelMonitorNoneZ_get_err(long _owner); + // struct LDKOutPoint C2Tuple_OutPointChannelIdZ_get_a(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_OutPointChannelIdZ_get_a")] public static extern long C2Tuple_OutPointChannelIdZ_get_a(long _owner); + // struct LDKChannelId C2Tuple_OutPointChannelIdZ_get_b(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_OutPointChannelIdZ_get_b")] public static extern long C2Tuple_OutPointChannelIdZ_get_b(long _owner); + // struct LDKOutPoint C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a")] public static extern long C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(long _owner); + // struct LDKCVec_MonitorUpdateIdZ C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b")] public static extern long C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(long _owner); public interface LDKPersister { long persist_manager(long channel_manager); long persist_graph(long network_graph); @@ -2034,8 +2239,9 @@ internal class bindings { // LDKCResult_NoneIOErrorZ Persister_persist_scorer LDKPersister *NONNULL_PTR this_arg, const struct LDKWriteableScore *NONNULL_PTR scorer [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Persister_persist_scorer")] public static extern long Persister_persist_scorer(long _this_arg, long _scorer); public interface LDKPersist { - ChannelMonitorUpdateStatus persist_new_channel(long channel_id, long data, long update_id); - ChannelMonitorUpdateStatus update_persisted_channel(long channel_id, long update, long data, long update_id); + ChannelMonitorUpdateStatus persist_new_channel(long channel_funding_outpoint, long data, long update_id); + ChannelMonitorUpdateStatus update_persisted_channel(long channel_funding_outpoint, long update, long data, long update_id); + void archive_persisted_channel(long channel_funding_outpoint); } [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPersist_new")] public static extern long LDKPersist_new_native(long impl_idx); public static long[] LDKPersist_new(LDKPersist impl) { @@ -2054,32 +2260,12 @@ internal class bindings { ret[1] = i; return ret; } - // LDKChannelMonitorUpdateStatus Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_id, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Persist_persist_new_channel")] public static extern ChannelMonitorUpdateStatus Persist_persist_new_channel(long _this_arg, long _channel_id, long _data, long _update_id); - // LDKChannelMonitorUpdateStatus Persist_update_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_id, struct LDKChannelMonitorUpdate update, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Persist_update_persisted_channel")] public static extern ChannelMonitorUpdateStatus Persist_update_persisted_channel(long _this_arg, long _channel_id, long _update, long _data, long _update_id); - public interface LDKFutureCallback { - void call(); - } - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKFutureCallback_new")] public static extern long LDKFutureCallback_new_native(long impl_idx); - public static long[] LDKFutureCallback_new(LDKFutureCallback impl) { - long new_obj_idx = js_objs.Count; - int i = 0; - for (; i < js_objs.Count; i++) { - if (js_objs[i] == null || !js_objs[i].IsAlive) { new_obj_idx = i; break; } - } - if (i == js_objs.Count) { - js_objs.Add(new WeakReference(impl)); - } else { - js_objs[i] = new WeakReference(impl); - } - long[] ret = new long[2]; - ret[0] = LDKFutureCallback_new_native(i); - ret[1] = i; - return ret; - } - // void FutureCallback_call LDKFutureCallback *NONNULL_PTR this_arg - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_FutureCallback_call")] public static extern void FutureCallback_call(long _this_arg); + // LDKChannelMonitorUpdateStatus Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_funding_outpoint, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Persist_persist_new_channel")] public static extern ChannelMonitorUpdateStatus Persist_persist_new_channel(long _this_arg, long _channel_funding_outpoint, long _data, long _update_id); + // LDKChannelMonitorUpdateStatus Persist_update_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_funding_outpoint, struct LDKChannelMonitorUpdate update, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Persist_update_persisted_channel")] public static extern ChannelMonitorUpdateStatus Persist_update_persisted_channel(long _this_arg, long _channel_funding_outpoint, long _update, long _data, long _update_id); + // void Persist_archive_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_funding_outpoint + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Persist_archive_persisted_channel")] public static extern void Persist_archive_persisted_channel(long _this_arg, long _channel_funding_outpoint); public interface LDKListen { void filtered_block_connected(long header, long txdata, int height); void block_connected(long block, int height); @@ -2139,6 +2325,31 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Confirm_best_block_updated")] public static extern void Confirm_best_block_updated(long _this_arg, long _header, int _height); // LDKCVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ Confirm_get_relevant_txids LDKConfirm *NONNULL_PTR this_arg [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Confirm_get_relevant_txids")] public static extern long Confirm_get_relevant_txids(long _this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKSpendingDelay_ty_from_ptr")] public static extern long LDKSpendingDelay_ty_from_ptr(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKSpendingDelay_Relative_get_num_blocks")] public static extern int LDKSpendingDelay_Relative_get_num_blocks(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKSpendingDelay_Absolute_get_height")] public static extern int LDKSpendingDelay_Absolute_get_height(long ptr); + public interface LDKFutureCallback { + void call(); + } + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKFutureCallback_new")] public static extern long LDKFutureCallback_new_native(long impl_idx); + public static long[] LDKFutureCallback_new(LDKFutureCallback impl) { + long new_obj_idx = js_objs.Count; + int i = 0; + for (; i < js_objs.Count; i++) { + if (js_objs[i] == null || !js_objs[i].IsAlive) { new_obj_idx = i; break; } + } + if (i == js_objs.Count) { + js_objs.Add(new WeakReference(impl)); + } else { + js_objs[i] = new WeakReference(impl); + } + long[] ret = new long[2]; + ret[0] = LDKFutureCallback_new_native(i); + ret[1] = i; + return ret; + } + // void FutureCallback_call LDKFutureCallback *NONNULL_PTR this_arg + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_FutureCallback_call")] public static extern void FutureCallback_call(long _this_arg); public interface LDKEventHandler { void handle_event(long _event); } @@ -2218,9 +2429,6 @@ internal class bindings { void handle_shutdown(long their_node_id, long msg); void handle_closing_signed(long their_node_id, long msg); void handle_stfu(long their_node_id, long msg); - void handle_splice(long their_node_id, long msg); - void handle_splice_ack(long their_node_id, long msg); - void handle_splice_locked(long their_node_id, long msg); void handle_tx_add_input(long their_node_id, long msg); void handle_tx_add_output(long their_node_id, long msg); void handle_tx_remove_input(long their_node_id, long msg); @@ -2284,12 +2492,6 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMessageHandler_handle_closing_signed")] public static extern void ChannelMessageHandler_handle_closing_signed(long _this_arg, long _their_node_id, long _msg); // void ChannelMessageHandler_handle_stfu LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKStfu *NONNULL_PTR msg [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMessageHandler_handle_stfu")] public static extern void ChannelMessageHandler_handle_stfu(long _this_arg, long _their_node_id, long _msg); - // void ChannelMessageHandler_handle_splice LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKSplice *NONNULL_PTR msg - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMessageHandler_handle_splice")] public static extern void ChannelMessageHandler_handle_splice(long _this_arg, long _their_node_id, long _msg); - // void ChannelMessageHandler_handle_splice_ack LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKSpliceAck *NONNULL_PTR msg - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMessageHandler_handle_splice_ack")] public static extern void ChannelMessageHandler_handle_splice_ack(long _this_arg, long _their_node_id, long _msg); - // void ChannelMessageHandler_handle_splice_locked LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKSpliceLocked *NONNULL_PTR msg - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMessageHandler_handle_splice_locked")] public static extern void ChannelMessageHandler_handle_splice_locked(long _this_arg, long _their_node_id, long _msg); // void ChannelMessageHandler_handle_tx_add_input LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKTxAddInput *NONNULL_PTR msg [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMessageHandler_handle_tx_add_input")] public static extern void ChannelMessageHandler_handle_tx_add_input(long _this_arg, long _their_node_id, long _msg); // void ChannelMessageHandler_handle_tx_add_output LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKTxAddOutput *NONNULL_PTR msg @@ -2365,6 +2567,28 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OffersMessageHandler_handle_message")] public static extern long OffersMessageHandler_handle_message(long _this_arg, long _message); // LDKCVec_C3Tuple_OffersMessageDestinationBlindedPathZZ OffersMessageHandler_release_pending_messages LDKOffersMessageHandler *NONNULL_PTR this_arg [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OffersMessageHandler_release_pending_messages")] public static extern long OffersMessageHandler_release_pending_messages(long _this_arg); + public interface LDKNodeIdLookUp { + long next_node_id(long short_channel_id); + } + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKNodeIdLookUp_new")] public static extern long LDKNodeIdLookUp_new_native(long impl_idx); + public static long[] LDKNodeIdLookUp_new(LDKNodeIdLookUp impl) { + long new_obj_idx = js_objs.Count; + int i = 0; + for (; i < js_objs.Count; i++) { + if (js_objs[i] == null || !js_objs[i].IsAlive) { new_obj_idx = i; break; } + } + if (i == js_objs.Count) { + js_objs.Add(new WeakReference(impl)); + } else { + js_objs[i] = new WeakReference(impl); + } + long[] ret = new long[2]; + ret[0] = LDKNodeIdLookUp_new_native(i); + ret[1] = i; + return ret; + } + // LDKPublicKey NodeIdLookUp_next_node_id LDKNodeIdLookUp *NONNULL_PTR this_arg, uint64_t short_channel_id + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeIdLookUp_next_node_id")] public static extern long NodeIdLookUp_next_node_id(long _this_arg, long _short_channel_id); public interface LDKRoutingMessageHandler { long handle_node_announcement(long msg); long handle_channel_announcement(long msg); @@ -2576,6 +2800,52 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SocketDescriptor_disconnect_socket")] public static extern void SocketDescriptor_disconnect_socket(long _this_arg); // uint64_t SocketDescriptor_hash LDKSocketDescriptor *NONNULL_PTR this_arg [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SocketDescriptor_hash")] public static extern long SocketDescriptor_hash(long _this_arg); + public interface LDKSignBolt12InvoiceFn { + long sign_invoice(long message); + } + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKSignBolt12InvoiceFn_new")] public static extern long LDKSignBolt12InvoiceFn_new_native(long impl_idx); + public static long[] LDKSignBolt12InvoiceFn_new(LDKSignBolt12InvoiceFn impl) { + long new_obj_idx = js_objs.Count; + int i = 0; + for (; i < js_objs.Count; i++) { + if (js_objs[i] == null || !js_objs[i].IsAlive) { new_obj_idx = i; break; } + } + if (i == js_objs.Count) { + js_objs.Add(new WeakReference(impl)); + } else { + js_objs[i] = new WeakReference(impl); + } + long[] ret = new long[2]; + ret[0] = LDKSignBolt12InvoiceFn_new_native(i); + ret[1] = i; + return ret; + } + // LDKCResult_SchnorrSignatureNoneZ SignBolt12InvoiceFn_sign_invoice LDKSignBolt12InvoiceFn *NONNULL_PTR this_arg, const struct LDKUnsignedBolt12Invoice *NONNULL_PTR message + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SignBolt12InvoiceFn_sign_invoice")] public static extern long SignBolt12InvoiceFn_sign_invoice(long _this_arg, long _message); + public interface LDKSignInvoiceRequestFn { + long sign_invoice_request(long message); + } + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKSignInvoiceRequestFn_new")] public static extern long LDKSignInvoiceRequestFn_new_native(long impl_idx); + public static long[] LDKSignInvoiceRequestFn_new(LDKSignInvoiceRequestFn impl) { + long new_obj_idx = js_objs.Count; + int i = 0; + for (; i < js_objs.Count; i++) { + if (js_objs[i] == null || !js_objs[i].IsAlive) { new_obj_idx = i; break; } + } + if (i == js_objs.Count) { + js_objs.Add(new WeakReference(impl)); + } else { + js_objs[i] = new WeakReference(impl); + } + long[] ret = new long[2]; + ret[0] = LDKSignInvoiceRequestFn_new_native(i); + ret[1] = i; + return ret; + } + // LDKCResult_SchnorrSignatureNoneZ SignInvoiceRequestFn_sign_invoice_request LDKSignInvoiceRequestFn *NONNULL_PTR this_arg, const struct LDKUnsignedInvoiceRequest *NONNULL_PTR message + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SignInvoiceRequestFn_sign_invoice_request")] public static extern long SignInvoiceRequestFn_sign_invoice_request(long _this_arg, long _message); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKSignError_ty_from_ptr")] public static extern long LDKSignError_ty_from_ptr(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKSignError_Verification_get_verification")] public static extern Secp256k1Error LDKSignError_Verification_get_verification(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEffectiveCapacity_ty_from_ptr")] public static extern long LDKEffectiveCapacity_ty_from_ptr(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEffectiveCapacity_ExactLiquidity_get_liquidity_msat")] public static extern long LDKEffectiveCapacity_ExactLiquidity_get_liquidity_msat(long ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEffectiveCapacity_AdvertisedMaxHTLC_get_amount_msat")] public static extern long LDKEffectiveCapacity_AdvertisedMaxHTLC_get_amount_msat(long ptr); @@ -2611,6 +2881,10 @@ internal class bindings { } // LDKCVec_u8Z Score_write LDKScore *NONNULL_PTR this_arg [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Score_write")] public static extern long Score_write(long _this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKIntroductionNode_ty_from_ptr")] public static extern long LDKIntroductionNode_ty_from_ptr(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKIntroductionNode_NodeId_get_node_id")] public static extern long LDKIntroductionNode_NodeId_get_node_id(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKIntroductionNode_DirectedShortChannelId_get__0")] public static extern Direction LDKIntroductionNode_DirectedShortChannelId_get__0(long ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKIntroductionNode_DirectedShortChannelId_get__1")] public static extern long LDKIntroductionNode_DirectedShortChannelId_get__1(long ptr); public interface LDKCoinSelectionSource { long select_confirmed_utxos(long claim_id, long must_spend, long must_pay_to, int target_feerate_sat_per_1000_weight); long sign_psbt(long psbt); @@ -2694,6 +2968,10 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_WitnessProgram_free")] public static extern void WitnessProgram_free(long _o); // struct LDKBigEndianScalar BigEndianScalar_new(struct LDKThirtyTwoBytes big_endian_bytes); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BigEndianScalar_new")] public static extern long BigEndianScalar_new(long _big_endian_bytes); + // uint64_t BigEndianScalar_clone_ptr(LDKBigEndianScalar *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BigEndianScalar_clone_ptr")] public static extern long BigEndianScalar_clone_ptr(long _arg); + // struct LDKBigEndianScalar BigEndianScalar_clone(const struct LDKBigEndianScalar *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BigEndianScalar_clone")] public static extern long BigEndianScalar_clone(long _orig); // uint64_t Bech32Error_clone_ptr(LDKBech32Error *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bech32Error_clone_ptr")] public static extern long Bech32Error_clone_ptr(long _arg); // struct LDKBech32Error Bech32Error_clone(const struct LDKBech32Error *NONNULL_PTR orig); @@ -2732,6 +3010,32 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxOut_clone")] public static extern long TxOut_clone(long _orig); // void Str_free(struct LDKStr _res); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Str_free")] public static extern void Str_free(long __res); + // void CVec_u8Z_free(struct LDKCVec_u8Z _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_u8Z_free")] public static extern void CVec_u8Z_free(long __res); + // struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(struct LDKRefundMaybeWithDerivedMetadataBuilder o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok")] public static extern long CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(long _o); + // struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err")] public static extern long CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(Bolt12SemanticError _e); + // bool CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok")] public static extern bool CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(long _o); + // void CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free")] public static extern void CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(long __res); + // uint64_t CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr")] public static extern long CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(long _arg); + // struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(const struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone")] public static extern long CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(long _orig); + // struct LDKCResult_RefundBolt12SemanticErrorZ CResult_RefundBolt12SemanticErrorZ_ok(struct LDKRefund o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RefundBolt12SemanticErrorZ_ok")] public static extern long CResult_RefundBolt12SemanticErrorZ_ok(long _o); + // struct LDKCResult_RefundBolt12SemanticErrorZ CResult_RefundBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RefundBolt12SemanticErrorZ_err")] public static extern long CResult_RefundBolt12SemanticErrorZ_err(Bolt12SemanticError _e); + // bool CResult_RefundBolt12SemanticErrorZ_is_ok(const struct LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RefundBolt12SemanticErrorZ_is_ok")] public static extern bool CResult_RefundBolt12SemanticErrorZ_is_ok(long _o); + // void CResult_RefundBolt12SemanticErrorZ_free(struct LDKCResult_RefundBolt12SemanticErrorZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RefundBolt12SemanticErrorZ_free")] public static extern void CResult_RefundBolt12SemanticErrorZ_free(long __res); + // uint64_t CResult_RefundBolt12SemanticErrorZ_clone_ptr(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RefundBolt12SemanticErrorZ_clone_ptr")] public static extern long CResult_RefundBolt12SemanticErrorZ_clone_ptr(long _arg); + // struct LDKCResult_RefundBolt12SemanticErrorZ CResult_RefundBolt12SemanticErrorZ_clone(const struct LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RefundBolt12SemanticErrorZ_clone")] public static extern long CResult_RefundBolt12SemanticErrorZ_clone(long _orig); // struct LDKCOption_u64Z COption_u64Z_some(uint64_t o); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_u64Z_some")] public static extern long COption_u64Z_some(long _o); // struct LDKCOption_u64Z COption_u64Z_none(void); @@ -2794,8 +3098,6 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_ThirtyTwoBytesZ_clone_ptr")] public static extern long COption_ThirtyTwoBytesZ_clone_ptr(long _arg); // struct LDKCOption_ThirtyTwoBytesZ COption_ThirtyTwoBytesZ_clone(const struct LDKCOption_ThirtyTwoBytesZ *NONNULL_PTR orig); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_ThirtyTwoBytesZ_clone")] public static extern long COption_ThirtyTwoBytesZ_clone(long _orig); - // void CVec_u8Z_free(struct LDKCVec_u8Z _res); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_u8Z_free")] public static extern void CVec_u8Z_free(long __res); // struct LDKCOption_CVec_u8ZZ COption_CVec_u8ZZ_some(struct LDKCVec_u8Z o); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_CVec_u8ZZ_some")] public static extern long COption_CVec_u8ZZ_some(long _o); // struct LDKCOption_CVec_u8ZZ COption_CVec_u8ZZ_none(void); @@ -2840,6 +3142,42 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RecipientOnionFieldsNoneZ_clone_ptr")] public static extern long CResult_RecipientOnionFieldsNoneZ_clone_ptr(long _arg); // struct LDKCResult_RecipientOnionFieldsNoneZ CResult_RecipientOnionFieldsNoneZ_clone(const struct LDKCResult_RecipientOnionFieldsNoneZ *NONNULL_PTR orig); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RecipientOnionFieldsNoneZ_clone")] public static extern long CResult_RecipientOnionFieldsNoneZ_clone(long _orig); + // struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok(struct LDKUnsignedBolt12Invoice o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok")] public static extern long CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok(long _o); + // struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err")] public static extern long CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err(Bolt12SemanticError _e); + // bool CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(const struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok")] public static extern bool CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(long _o); + // void CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free(struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free")] public static extern void CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free(long __res); + // uint64_t CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr")] public static extern long CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(long _arg); + // struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(const struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone")] public static extern long CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(long _orig); + // struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok(struct LDKBolt12Invoice o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok")] public static extern long CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok(long _o); + // struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ CResult_Bolt12InvoiceBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12InvoiceBolt12SemanticErrorZ_err")] public static extern long CResult_Bolt12InvoiceBolt12SemanticErrorZ_err(Bolt12SemanticError _e); + // bool CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(const struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok")] public static extern bool CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(long _o); + // void CResult_Bolt12InvoiceBolt12SemanticErrorZ_free(struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12InvoiceBolt12SemanticErrorZ_free")] public static extern void CResult_Bolt12InvoiceBolt12SemanticErrorZ_free(long __res); + // uint64_t CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr")] public static extern long CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(long _arg); + // struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(const struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone")] public static extern long CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(long _orig); + // struct LDKCResult_SchnorrSignatureNoneZ CResult_SchnorrSignatureNoneZ_ok(struct LDKSchnorrSignature o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_SchnorrSignatureNoneZ_ok")] public static extern long CResult_SchnorrSignatureNoneZ_ok(long _o); + // struct LDKCResult_SchnorrSignatureNoneZ CResult_SchnorrSignatureNoneZ_err(void); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_SchnorrSignatureNoneZ_err")] public static extern long CResult_SchnorrSignatureNoneZ_err(); + // bool CResult_SchnorrSignatureNoneZ_is_ok(const struct LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_SchnorrSignatureNoneZ_is_ok")] public static extern bool CResult_SchnorrSignatureNoneZ_is_ok(long _o); + // void CResult_SchnorrSignatureNoneZ_free(struct LDKCResult_SchnorrSignatureNoneZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_SchnorrSignatureNoneZ_free")] public static extern void CResult_SchnorrSignatureNoneZ_free(long __res); + // uint64_t CResult_SchnorrSignatureNoneZ_clone_ptr(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_SchnorrSignatureNoneZ_clone_ptr")] public static extern long CResult_SchnorrSignatureNoneZ_clone_ptr(long _arg); + // struct LDKCResult_SchnorrSignatureNoneZ CResult_SchnorrSignatureNoneZ_clone(const struct LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_SchnorrSignatureNoneZ_clone")] public static extern long CResult_SchnorrSignatureNoneZ_clone(long _orig); // void CVec_ThirtyTwoBytesZ_free(struct LDKCVec_ThirtyTwoBytesZ _res); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_ThirtyTwoBytesZ_free")] public static extern void CVec_ThirtyTwoBytesZ_free(long __res); // struct LDKCOption_CVec_ThirtyTwoBytesZZ COption_CVec_ThirtyTwoBytesZZ_some(struct LDKCVec_ThirtyTwoBytesZ o); @@ -2852,6 +3190,26 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_CVec_ThirtyTwoBytesZZ_clone_ptr")] public static extern long COption_CVec_ThirtyTwoBytesZZ_clone_ptr(long _arg); // struct LDKCOption_CVec_ThirtyTwoBytesZZ COption_CVec_ThirtyTwoBytesZZ_clone(const struct LDKCOption_CVec_ThirtyTwoBytesZZ *NONNULL_PTR orig); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_CVec_ThirtyTwoBytesZZ_clone")] public static extern long COption_CVec_ThirtyTwoBytesZZ_clone(long _orig); + // struct LDKCOption_AmountZ COption_AmountZ_some(struct LDKAmount o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_AmountZ_some")] public static extern long COption_AmountZ_some(long _o); + // struct LDKCOption_AmountZ COption_AmountZ_none(void); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_AmountZ_none")] public static extern long COption_AmountZ_none(); + // void COption_AmountZ_free(struct LDKCOption_AmountZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_AmountZ_free")] public static extern void COption_AmountZ_free(long __res); + // uint64_t COption_AmountZ_clone_ptr(LDKCOption_AmountZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_AmountZ_clone_ptr")] public static extern long COption_AmountZ_clone_ptr(long _arg); + // struct LDKCOption_AmountZ COption_AmountZ_clone(const struct LDKCOption_AmountZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_AmountZ_clone")] public static extern long COption_AmountZ_clone(long _orig); + // struct LDKCOption_QuantityZ COption_QuantityZ_some(struct LDKQuantity o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_QuantityZ_some")] public static extern long COption_QuantityZ_some(long _o); + // struct LDKCOption_QuantityZ COption_QuantityZ_none(void); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_QuantityZ_none")] public static extern long COption_QuantityZ_none(); + // void COption_QuantityZ_free(struct LDKCOption_QuantityZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_QuantityZ_free")] public static extern void COption_QuantityZ_free(long __res); + // uint64_t COption_QuantityZ_clone_ptr(LDKCOption_QuantityZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_QuantityZ_clone_ptr")] public static extern long COption_QuantityZ_clone_ptr(long _arg); + // struct LDKCOption_QuantityZ COption_QuantityZ_clone(const struct LDKCOption_QuantityZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_QuantityZ_clone")] public static extern long COption_QuantityZ_clone(long _orig); // struct LDKCResult_ThirtyTwoBytesNoneZ CResult_ThirtyTwoBytesNoneZ_ok(struct LDKThirtyTwoBytes o); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ThirtyTwoBytesNoneZ_ok")] public static extern long CResult_ThirtyTwoBytesNoneZ_ok(long _o); // struct LDKCResult_ThirtyTwoBytesNoneZ CResult_ThirtyTwoBytesNoneZ_err(void); @@ -3018,18 +3376,6 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RecoverableSignatureNoneZ_clone_ptr")] public static extern long CResult_RecoverableSignatureNoneZ_clone_ptr(long _arg); // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_clone(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR orig); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RecoverableSignatureNoneZ_clone")] public static extern long CResult_RecoverableSignatureNoneZ_clone(long _orig); - // struct LDKCResult_SchnorrSignatureNoneZ CResult_SchnorrSignatureNoneZ_ok(struct LDKSchnorrSignature o); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_SchnorrSignatureNoneZ_ok")] public static extern long CResult_SchnorrSignatureNoneZ_ok(long _o); - // struct LDKCResult_SchnorrSignatureNoneZ CResult_SchnorrSignatureNoneZ_err(void); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_SchnorrSignatureNoneZ_err")] public static extern long CResult_SchnorrSignatureNoneZ_err(); - // bool CResult_SchnorrSignatureNoneZ_is_ok(const struct LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR o); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_SchnorrSignatureNoneZ_is_ok")] public static extern bool CResult_SchnorrSignatureNoneZ_is_ok(long _o); - // void CResult_SchnorrSignatureNoneZ_free(struct LDKCResult_SchnorrSignatureNoneZ _res); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_SchnorrSignatureNoneZ_free")] public static extern void CResult_SchnorrSignatureNoneZ_free(long __res); - // uint64_t CResult_SchnorrSignatureNoneZ_clone_ptr(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR arg); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_SchnorrSignatureNoneZ_clone_ptr")] public static extern long CResult_SchnorrSignatureNoneZ_clone_ptr(long _arg); - // struct LDKCResult_SchnorrSignatureNoneZ CResult_SchnorrSignatureNoneZ_clone(const struct LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR orig); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_SchnorrSignatureNoneZ_clone")] public static extern long CResult_SchnorrSignatureNoneZ_clone(long _orig); // struct LDKCResult_ECDSASignatureNoneZ CResult_ECDSASignatureNoneZ_ok(struct LDKECDSASignature o); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ECDSASignatureNoneZ_ok")] public static extern long CResult_ECDSASignatureNoneZ_ok(long _o); // struct LDKCResult_ECDSASignatureNoneZ CResult_ECDSASignatureNoneZ_err(void); @@ -3042,6 +3388,18 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ECDSASignatureNoneZ_clone_ptr")] public static extern long CResult_ECDSASignatureNoneZ_clone_ptr(long _arg); // struct LDKCResult_ECDSASignatureNoneZ CResult_ECDSASignatureNoneZ_clone(const struct LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR orig); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ECDSASignatureNoneZ_clone")] public static extern long CResult_ECDSASignatureNoneZ_clone(long _orig); + // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_TransactionNoneZ_ok")] public static extern long CResult_TransactionNoneZ_ok(long _o); + // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_TransactionNoneZ_err")] public static extern long CResult_TransactionNoneZ_err(); + // bool CResult_TransactionNoneZ_is_ok(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_TransactionNoneZ_is_ok")] public static extern bool CResult_TransactionNoneZ_is_ok(long _o); + // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_TransactionNoneZ_free")] public static extern void CResult_TransactionNoneZ_free(long __res); + // uint64_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_TransactionNoneZ_clone_ptr")] public static extern long CResult_TransactionNoneZ_clone_ptr(long _arg); + // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_clone(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_TransactionNoneZ_clone")] public static extern long CResult_TransactionNoneZ_clone(long _orig); // struct LDKCResult_WriteableEcdsaChannelSignerDecodeErrorZ CResult_WriteableEcdsaChannelSignerDecodeErrorZ_ok(struct LDKWriteableEcdsaChannelSigner o); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_WriteableEcdsaChannelSignerDecodeErrorZ_ok")] public static extern long CResult_WriteableEcdsaChannelSignerDecodeErrorZ_ok(long _o); // struct LDKCResult_WriteableEcdsaChannelSignerDecodeErrorZ CResult_WriteableEcdsaChannelSignerDecodeErrorZ_err(struct LDKDecodeError e); @@ -3144,18 +3502,6 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InMemorySignerDecodeErrorZ_clone_ptr")] public static extern long CResult_InMemorySignerDecodeErrorZ_clone_ptr(long _arg); // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InMemorySignerDecodeErrorZ_clone")] public static extern long CResult_InMemorySignerDecodeErrorZ_clone(long _orig); - // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_TransactionNoneZ_ok")] public static extern long CResult_TransactionNoneZ_ok(long _o); - // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_TransactionNoneZ_err")] public static extern long CResult_TransactionNoneZ_err(); - // bool CResult_TransactionNoneZ_is_ok(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR o); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_TransactionNoneZ_is_ok")] public static extern bool CResult_TransactionNoneZ_is_ok(long _o); - // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_TransactionNoneZ_free")] public static extern void CResult_TransactionNoneZ_free(long __res); - // uint64_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_TransactionNoneZ_clone_ptr")] public static extern long CResult_TransactionNoneZ_clone_ptr(long _arg); - // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_clone(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR orig); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_TransactionNoneZ_clone")] public static extern long CResult_TransactionNoneZ_clone(long _orig); // struct LDKCOption_WriteableScoreZ COption_WriteableScoreZ_some(struct LDKWriteableScore o); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_WriteableScoreZ_some")] public static extern long COption_WriteableScoreZ_some(long _o); // struct LDKCOption_WriteableScoreZ COption_WriteableScoreZ_none(void); @@ -3408,6 +3754,18 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ProbabilisticScorerDecodeErrorZ_is_ok")] public static extern bool CResult_ProbabilisticScorerDecodeErrorZ_is_ok(long _o); // void CResult_ProbabilisticScorerDecodeErrorZ_free(struct LDKCResult_ProbabilisticScorerDecodeErrorZ _res); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ProbabilisticScorerDecodeErrorZ_free")] public static extern void CResult_ProbabilisticScorerDecodeErrorZ_free(long __res); + // struct LDKCResult_BestBlockDecodeErrorZ CResult_BestBlockDecodeErrorZ_ok(struct LDKBestBlock o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_BestBlockDecodeErrorZ_ok")] public static extern long CResult_BestBlockDecodeErrorZ_ok(long _o); + // struct LDKCResult_BestBlockDecodeErrorZ CResult_BestBlockDecodeErrorZ_err(struct LDKDecodeError e); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_BestBlockDecodeErrorZ_err")] public static extern long CResult_BestBlockDecodeErrorZ_err(long _e); + // bool CResult_BestBlockDecodeErrorZ_is_ok(const struct LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_BestBlockDecodeErrorZ_is_ok")] public static extern bool CResult_BestBlockDecodeErrorZ_is_ok(long _o); + // void CResult_BestBlockDecodeErrorZ_free(struct LDKCResult_BestBlockDecodeErrorZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_BestBlockDecodeErrorZ_free")] public static extern void CResult_BestBlockDecodeErrorZ_free(long __res); + // uint64_t CResult_BestBlockDecodeErrorZ_clone_ptr(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_BestBlockDecodeErrorZ_clone_ptr")] public static extern long CResult_BestBlockDecodeErrorZ_clone_ptr(long _arg); + // struct LDKCResult_BestBlockDecodeErrorZ CResult_BestBlockDecodeErrorZ_clone(const struct LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_BestBlockDecodeErrorZ_clone")] public static extern long CResult_BestBlockDecodeErrorZ_clone(long _orig); // uint64_t C2Tuple_usizeTransactionZ_clone_ptr(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_usizeTransactionZ_clone_ptr")] public static extern long C2Tuple_usizeTransactionZ_clone_ptr(long _arg); // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_clone(const struct LDKC2Tuple_usizeTransactionZ *NONNULL_PTR orig); @@ -3442,16 +3800,16 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelMonitorUpdateStatusNoneZ_clone")] public static extern long CResult_ChannelMonitorUpdateStatusNoneZ_clone(long _orig); // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_MonitorEventZ_free")] public static extern void CVec_MonitorEventZ_free(long __res); - // uint64_t C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR arg); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr")] public static extern long C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(long _arg); - // struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(const struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR orig); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone")] public static extern long C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(long _orig); - // struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(struct LDKOutPoint a, struct LDKCVec_MonitorEventZ b, struct LDKPublicKey c); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new")] public static extern long C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(long _a, long _b, long _c); - // void C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ _res); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free")] public static extern void C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(long __res); - // void CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free(struct LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ _res); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free")] public static extern void CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free(long __res); + // uint64_t C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr")] public static extern long C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(long _arg); + // struct LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(const struct LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone")] public static extern long C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(long _orig); + // struct LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new(struct LDKOutPoint a, struct LDKChannelId b, struct LDKCVec_MonitorEventZ c, struct LDKPublicKey d); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new")] public static extern long C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new(long _a, long _b, long _c, long _d); + // void C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free(struct LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free")] public static extern void C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free(long __res); + // void CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free(struct LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free")] public static extern void CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free(long __res); // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InitFeaturesDecodeErrorZ_ok")] public static extern long CResult_InitFeaturesDecodeErrorZ_ok(long _o); // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e); @@ -3536,6 +3894,58 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_clone_ptr")] public static extern long CResult_ChannelTypeFeaturesDecodeErrorZ_clone_ptr(long _arg); // struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ CResult_ChannelTypeFeaturesDecodeErrorZ_clone(const struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR orig); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_clone")] public static extern long CResult_ChannelTypeFeaturesDecodeErrorZ_clone(long _orig); + // struct LDKCResult_OfferIdDecodeErrorZ CResult_OfferIdDecodeErrorZ_ok(struct LDKOfferId o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferIdDecodeErrorZ_ok")] public static extern long CResult_OfferIdDecodeErrorZ_ok(long _o); + // struct LDKCResult_OfferIdDecodeErrorZ CResult_OfferIdDecodeErrorZ_err(struct LDKDecodeError e); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferIdDecodeErrorZ_err")] public static extern long CResult_OfferIdDecodeErrorZ_err(long _e); + // bool CResult_OfferIdDecodeErrorZ_is_ok(const struct LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferIdDecodeErrorZ_is_ok")] public static extern bool CResult_OfferIdDecodeErrorZ_is_ok(long _o); + // void CResult_OfferIdDecodeErrorZ_free(struct LDKCResult_OfferIdDecodeErrorZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferIdDecodeErrorZ_free")] public static extern void CResult_OfferIdDecodeErrorZ_free(long __res); + // uint64_t CResult_OfferIdDecodeErrorZ_clone_ptr(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferIdDecodeErrorZ_clone_ptr")] public static extern long CResult_OfferIdDecodeErrorZ_clone_ptr(long _arg); + // struct LDKCResult_OfferIdDecodeErrorZ CResult_OfferIdDecodeErrorZ_clone(const struct LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferIdDecodeErrorZ_clone")] public static extern long CResult_OfferIdDecodeErrorZ_clone(long _orig); + // struct LDKCResult_NoneBolt12SemanticErrorZ CResult_NoneBolt12SemanticErrorZ_ok(void); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneBolt12SemanticErrorZ_ok")] public static extern long CResult_NoneBolt12SemanticErrorZ_ok(); + // struct LDKCResult_NoneBolt12SemanticErrorZ CResult_NoneBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneBolt12SemanticErrorZ_err")] public static extern long CResult_NoneBolt12SemanticErrorZ_err(Bolt12SemanticError _e); + // bool CResult_NoneBolt12SemanticErrorZ_is_ok(const struct LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneBolt12SemanticErrorZ_is_ok")] public static extern bool CResult_NoneBolt12SemanticErrorZ_is_ok(long _o); + // void CResult_NoneBolt12SemanticErrorZ_free(struct LDKCResult_NoneBolt12SemanticErrorZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneBolt12SemanticErrorZ_free")] public static extern void CResult_NoneBolt12SemanticErrorZ_free(long __res); + // uint64_t CResult_NoneBolt12SemanticErrorZ_clone_ptr(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneBolt12SemanticErrorZ_clone_ptr")] public static extern long CResult_NoneBolt12SemanticErrorZ_clone_ptr(long _arg); + // struct LDKCResult_NoneBolt12SemanticErrorZ CResult_NoneBolt12SemanticErrorZ_clone(const struct LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneBolt12SemanticErrorZ_clone")] public static extern long CResult_NoneBolt12SemanticErrorZ_clone(long _orig); + // struct LDKCResult_OfferBolt12SemanticErrorZ CResult_OfferBolt12SemanticErrorZ_ok(struct LDKOffer o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferBolt12SemanticErrorZ_ok")] public static extern long CResult_OfferBolt12SemanticErrorZ_ok(long _o); + // struct LDKCResult_OfferBolt12SemanticErrorZ CResult_OfferBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferBolt12SemanticErrorZ_err")] public static extern long CResult_OfferBolt12SemanticErrorZ_err(Bolt12SemanticError _e); + // bool CResult_OfferBolt12SemanticErrorZ_is_ok(const struct LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferBolt12SemanticErrorZ_is_ok")] public static extern bool CResult_OfferBolt12SemanticErrorZ_is_ok(long _o); + // void CResult_OfferBolt12SemanticErrorZ_free(struct LDKCResult_OfferBolt12SemanticErrorZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferBolt12SemanticErrorZ_free")] public static extern void CResult_OfferBolt12SemanticErrorZ_free(long __res); + // uint64_t CResult_OfferBolt12SemanticErrorZ_clone_ptr(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferBolt12SemanticErrorZ_clone_ptr")] public static extern long CResult_OfferBolt12SemanticErrorZ_clone_ptr(long _arg); + // struct LDKCResult_OfferBolt12SemanticErrorZ CResult_OfferBolt12SemanticErrorZ_clone(const struct LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferBolt12SemanticErrorZ_clone")] public static extern long CResult_OfferBolt12SemanticErrorZ_clone(long _orig); + // struct LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(struct LDKInvoiceRequestWithDerivedPayerIdBuilder o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok")] public static extern long CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(long _o); + // struct LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err")] public static extern long CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(Bolt12SemanticError _e); + // bool CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok")] public static extern bool CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(long _o); + // void CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(struct LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free")] public static extern void CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(long __res); + // struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok(struct LDKInvoiceRequestWithExplicitPayerIdBuilder o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok")] public static extern long CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok(long _o); + // struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err")] public static extern long CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(Bolt12SemanticError _e); + // bool CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok")] public static extern bool CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(long _o); + // void CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free")] public static extern void CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(long __res); // struct LDKCResult_OfferBolt12ParseErrorZ CResult_OfferBolt12ParseErrorZ_ok(struct LDKOffer o); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferBolt12ParseErrorZ_ok")] public static extern long CResult_OfferBolt12ParseErrorZ_ok(long _o); // struct LDKCResult_OfferBolt12ParseErrorZ CResult_OfferBolt12ParseErrorZ_err(struct LDKBolt12ParseError e); @@ -3548,18 +3958,6 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferBolt12ParseErrorZ_clone_ptr")] public static extern long CResult_OfferBolt12ParseErrorZ_clone_ptr(long _arg); // struct LDKCResult_OfferBolt12ParseErrorZ CResult_OfferBolt12ParseErrorZ_clone(const struct LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR orig); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferBolt12ParseErrorZ_clone")] public static extern long CResult_OfferBolt12ParseErrorZ_clone(long _orig); - // struct LDKCResult_PublicKeySecp256k1ErrorZ CResult_PublicKeySecp256k1ErrorZ_ok(struct LDKPublicKey o); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PublicKeySecp256k1ErrorZ_ok")] public static extern long CResult_PublicKeySecp256k1ErrorZ_ok(long _o); - // struct LDKCResult_PublicKeySecp256k1ErrorZ CResult_PublicKeySecp256k1ErrorZ_err(enum LDKSecp256k1Error e); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PublicKeySecp256k1ErrorZ_err")] public static extern long CResult_PublicKeySecp256k1ErrorZ_err(Secp256k1Error _e); - // bool CResult_PublicKeySecp256k1ErrorZ_is_ok(const struct LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR o); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PublicKeySecp256k1ErrorZ_is_ok")] public static extern bool CResult_PublicKeySecp256k1ErrorZ_is_ok(long _o); - // void CResult_PublicKeySecp256k1ErrorZ_free(struct LDKCResult_PublicKeySecp256k1ErrorZ _res); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PublicKeySecp256k1ErrorZ_free")] public static extern void CResult_PublicKeySecp256k1ErrorZ_free(long __res); - // uint64_t CResult_PublicKeySecp256k1ErrorZ_clone_ptr(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR arg); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PublicKeySecp256k1ErrorZ_clone_ptr")] public static extern long CResult_PublicKeySecp256k1ErrorZ_clone_ptr(long _arg); - // struct LDKCResult_PublicKeySecp256k1ErrorZ CResult_PublicKeySecp256k1ErrorZ_clone(const struct LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR orig); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PublicKeySecp256k1ErrorZ_clone")] public static extern long CResult_PublicKeySecp256k1ErrorZ_clone(long _orig); // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_ok(struct LDKNodeId o); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NodeIdDecodeErrorZ_ok")] public static extern long CResult_NodeIdDecodeErrorZ_ok(long _o); // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_err(struct LDKDecodeError e); @@ -3572,6 +3970,18 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NodeIdDecodeErrorZ_clone_ptr")] public static extern long CResult_NodeIdDecodeErrorZ_clone_ptr(long _arg); // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_clone(const struct LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR orig); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NodeIdDecodeErrorZ_clone")] public static extern long CResult_NodeIdDecodeErrorZ_clone(long _orig); + // struct LDKCResult_PublicKeySecp256k1ErrorZ CResult_PublicKeySecp256k1ErrorZ_ok(struct LDKPublicKey o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PublicKeySecp256k1ErrorZ_ok")] public static extern long CResult_PublicKeySecp256k1ErrorZ_ok(long _o); + // struct LDKCResult_PublicKeySecp256k1ErrorZ CResult_PublicKeySecp256k1ErrorZ_err(enum LDKSecp256k1Error e); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PublicKeySecp256k1ErrorZ_err")] public static extern long CResult_PublicKeySecp256k1ErrorZ_err(Secp256k1Error _e); + // bool CResult_PublicKeySecp256k1ErrorZ_is_ok(const struct LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PublicKeySecp256k1ErrorZ_is_ok")] public static extern bool CResult_PublicKeySecp256k1ErrorZ_is_ok(long _o); + // void CResult_PublicKeySecp256k1ErrorZ_free(struct LDKCResult_PublicKeySecp256k1ErrorZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PublicKeySecp256k1ErrorZ_free")] public static extern void CResult_PublicKeySecp256k1ErrorZ_free(long __res); + // uint64_t CResult_PublicKeySecp256k1ErrorZ_clone_ptr(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PublicKeySecp256k1ErrorZ_clone_ptr")] public static extern long CResult_PublicKeySecp256k1ErrorZ_clone_ptr(long _arg); + // struct LDKCResult_PublicKeySecp256k1ErrorZ CResult_PublicKeySecp256k1ErrorZ_clone(const struct LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PublicKeySecp256k1ErrorZ_clone")] public static extern long CResult_PublicKeySecp256k1ErrorZ_clone(long _orig); // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_some(struct LDKNetworkUpdate o); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_NetworkUpdateZ_some")] public static extern long COption_NetworkUpdateZ_some(long _o); // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_none(void); @@ -3736,6 +4146,14 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_CVec_SocketAddressZZ_clone_ptr")] public static extern long COption_CVec_SocketAddressZZ_clone_ptr(long _arg); // struct LDKCOption_CVec_SocketAddressZZ COption_CVec_SocketAddressZZ_clone(const struct LDKCOption_CVec_SocketAddressZZ *NONNULL_PTR orig); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_CVec_SocketAddressZZ_clone")] public static extern long COption_CVec_SocketAddressZZ_clone(long _orig); + // struct LDKCResult_u64ShortChannelIdErrorZ CResult_u64ShortChannelIdErrorZ_ok(uint64_t o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_u64ShortChannelIdErrorZ_ok")] public static extern long CResult_u64ShortChannelIdErrorZ_ok(long _o); + // struct LDKCResult_u64ShortChannelIdErrorZ CResult_u64ShortChannelIdErrorZ_err(enum LDKShortChannelIdError e); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_u64ShortChannelIdErrorZ_err")] public static extern long CResult_u64ShortChannelIdErrorZ_err(ShortChannelIdError _e); + // bool CResult_u64ShortChannelIdErrorZ_is_ok(const struct LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_u64ShortChannelIdErrorZ_is_ok")] public static extern bool CResult_u64ShortChannelIdErrorZ_is_ok(long _o); + // void CResult_u64ShortChannelIdErrorZ_free(struct LDKCResult_u64ShortChannelIdErrorZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_u64ShortChannelIdErrorZ_free")] public static extern void CResult_u64ShortChannelIdErrorZ_free(long __res); // struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ CResult_PendingHTLCInfoInboundHTLCErrZ_ok(struct LDKPendingHTLCInfo o); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PendingHTLCInfoInboundHTLCErrZ_ok")] public static extern long CResult_PendingHTLCInfoInboundHTLCErrZ_ok(long _o); // struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ CResult_PendingHTLCInfoInboundHTLCErrZ_err(struct LDKInboundHTLCErr e); @@ -3744,6 +4162,10 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PendingHTLCInfoInboundHTLCErrZ_is_ok")] public static extern bool CResult_PendingHTLCInfoInboundHTLCErrZ_is_ok(long _o); // void CResult_PendingHTLCInfoInboundHTLCErrZ_free(struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ _res); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PendingHTLCInfoInboundHTLCErrZ_free")] public static extern void CResult_PendingHTLCInfoInboundHTLCErrZ_free(long __res); + // uint64_t CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr")] public static extern long CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(long _arg); + // struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ CResult_PendingHTLCInfoInboundHTLCErrZ_clone(const struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PendingHTLCInfoInboundHTLCErrZ_clone")] public static extern long CResult_PendingHTLCInfoInboundHTLCErrZ_clone(long _orig); // void CVec_HTLCOutputInCommitmentZ_free(struct LDKCVec_HTLCOutputInCommitmentZ _res); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_HTLCOutputInCommitmentZ_free")] public static extern void CVec_HTLCOutputInCommitmentZ_free(long __res); // void CVec_HTLCDescriptorZ_free(struct LDKCVec_HTLCDescriptorZ _res); @@ -3786,6 +4208,16 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_UtxoZNoneZ_clone_ptr")] public static extern long CResult_CVec_UtxoZNoneZ_clone_ptr(long _arg); // struct LDKCResult_CVec_UtxoZNoneZ CResult_CVec_UtxoZNoneZ_clone(const struct LDKCResult_CVec_UtxoZNoneZ *NONNULL_PTR orig); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_UtxoZNoneZ_clone")] public static extern long CResult_CVec_UtxoZNoneZ_clone(long _orig); + // struct LDKCOption_PaymentContextZ COption_PaymentContextZ_some(struct LDKPaymentContext o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_PaymentContextZ_some")] public static extern long COption_PaymentContextZ_some(long _o); + // struct LDKCOption_PaymentContextZ COption_PaymentContextZ_none(void); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_PaymentContextZ_none")] public static extern long COption_PaymentContextZ_none(); + // void COption_PaymentContextZ_free(struct LDKCOption_PaymentContextZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_PaymentContextZ_free")] public static extern void COption_PaymentContextZ_free(long __res); + // uint64_t COption_PaymentContextZ_clone_ptr(LDKCOption_PaymentContextZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_PaymentContextZ_clone_ptr")] public static extern long COption_PaymentContextZ_clone_ptr(long _arg); + // struct LDKCOption_PaymentContextZ COption_PaymentContextZ_clone(const struct LDKCOption_PaymentContextZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_PaymentContextZ_clone")] public static extern long COption_PaymentContextZ_clone(long _orig); // uint64_t C2Tuple_u64u16Z_clone_ptr(LDKC2Tuple_u64u16Z *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_u64u16Z_clone_ptr")] public static extern long C2Tuple_u64u16Z_clone_ptr(long _arg); // struct LDKC2Tuple_u64u16Z C2Tuple_u64u16Z_clone(const struct LDKC2Tuple_u64u16Z *NONNULL_PTR orig); @@ -3814,18 +4246,18 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_ChannelShutdownStateZ_clone_ptr")] public static extern long COption_ChannelShutdownStateZ_clone_ptr(long _arg); // struct LDKCOption_ChannelShutdownStateZ COption_ChannelShutdownStateZ_clone(const struct LDKCOption_ChannelShutdownStateZ *NONNULL_PTR orig); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_ChannelShutdownStateZ_clone")] public static extern long COption_ChannelShutdownStateZ_clone(long _orig); - // struct LDKCResult_ThirtyTwoBytesAPIErrorZ CResult_ThirtyTwoBytesAPIErrorZ_ok(struct LDKThirtyTwoBytes o); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_ok")] public static extern long CResult_ThirtyTwoBytesAPIErrorZ_ok(long _o); - // struct LDKCResult_ThirtyTwoBytesAPIErrorZ CResult_ThirtyTwoBytesAPIErrorZ_err(struct LDKAPIError e); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_err")] public static extern long CResult_ThirtyTwoBytesAPIErrorZ_err(long _e); - // bool CResult_ThirtyTwoBytesAPIErrorZ_is_ok(const struct LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR o); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_is_ok")] public static extern bool CResult_ThirtyTwoBytesAPIErrorZ_is_ok(long _o); - // void CResult_ThirtyTwoBytesAPIErrorZ_free(struct LDKCResult_ThirtyTwoBytesAPIErrorZ _res); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_free")] public static extern void CResult_ThirtyTwoBytesAPIErrorZ_free(long __res); - // uint64_t CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR arg); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr")] public static extern long CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(long _arg); - // struct LDKCResult_ThirtyTwoBytesAPIErrorZ CResult_ThirtyTwoBytesAPIErrorZ_clone(const struct LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR orig); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_clone")] public static extern long CResult_ThirtyTwoBytesAPIErrorZ_clone(long _orig); + // struct LDKCResult_ChannelIdAPIErrorZ CResult_ChannelIdAPIErrorZ_ok(struct LDKChannelId o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelIdAPIErrorZ_ok")] public static extern long CResult_ChannelIdAPIErrorZ_ok(long _o); + // struct LDKCResult_ChannelIdAPIErrorZ CResult_ChannelIdAPIErrorZ_err(struct LDKAPIError e); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelIdAPIErrorZ_err")] public static extern long CResult_ChannelIdAPIErrorZ_err(long _e); + // bool CResult_ChannelIdAPIErrorZ_is_ok(const struct LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelIdAPIErrorZ_is_ok")] public static extern bool CResult_ChannelIdAPIErrorZ_is_ok(long _o); + // void CResult_ChannelIdAPIErrorZ_free(struct LDKCResult_ChannelIdAPIErrorZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelIdAPIErrorZ_free")] public static extern void CResult_ChannelIdAPIErrorZ_free(long __res); + // uint64_t CResult_ChannelIdAPIErrorZ_clone_ptr(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelIdAPIErrorZ_clone_ptr")] public static extern long CResult_ChannelIdAPIErrorZ_clone_ptr(long _arg); + // struct LDKCResult_ChannelIdAPIErrorZ CResult_ChannelIdAPIErrorZ_clone(const struct LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelIdAPIErrorZ_clone")] public static extern long CResult_ChannelIdAPIErrorZ_clone(long _orig); // void CVec_RecentPaymentDetailsZ_free(struct LDKCVec_RecentPaymentDetailsZ _res); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_RecentPaymentDetailsZ_free")] public static extern void CVec_RecentPaymentDetailsZ_free(long __res); // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void); @@ -3910,16 +4342,30 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_clone_ptr")] public static extern long CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_clone_ptr(long _arg); // struct LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_clone(const struct LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ *NONNULL_PTR orig); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_clone")] public static extern long CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_clone(long _orig); - // uint64_t C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR arg); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr")] public static extern long C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(long _arg); - // struct LDKC2Tuple_ThirtyTwoBytesPublicKeyZ C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(const struct LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR orig); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_ThirtyTwoBytesPublicKeyZ_clone")] public static extern long C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(long _orig); - // struct LDKC2Tuple_ThirtyTwoBytesPublicKeyZ C2Tuple_ThirtyTwoBytesPublicKeyZ_new(struct LDKThirtyTwoBytes a, struct LDKPublicKey b); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_ThirtyTwoBytesPublicKeyZ_new")] public static extern long C2Tuple_ThirtyTwoBytesPublicKeyZ_new(long _a, long _b); - // void C2Tuple_ThirtyTwoBytesPublicKeyZ_free(struct LDKC2Tuple_ThirtyTwoBytesPublicKeyZ _res); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_ThirtyTwoBytesPublicKeyZ_free")] public static extern void C2Tuple_ThirtyTwoBytesPublicKeyZ_free(long __res); - // void CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_free(struct LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ _res); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_free")] public static extern void CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_free(long __res); + // uint64_t C2Tuple_ChannelIdPublicKeyZ_clone_ptr(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_ChannelIdPublicKeyZ_clone_ptr")] public static extern long C2Tuple_ChannelIdPublicKeyZ_clone_ptr(long _arg); + // struct LDKC2Tuple_ChannelIdPublicKeyZ C2Tuple_ChannelIdPublicKeyZ_clone(const struct LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_ChannelIdPublicKeyZ_clone")] public static extern long C2Tuple_ChannelIdPublicKeyZ_clone(long _orig); + // struct LDKC2Tuple_ChannelIdPublicKeyZ C2Tuple_ChannelIdPublicKeyZ_new(struct LDKChannelId a, struct LDKPublicKey b); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_ChannelIdPublicKeyZ_new")] public static extern long C2Tuple_ChannelIdPublicKeyZ_new(long _a, long _b); + // void C2Tuple_ChannelIdPublicKeyZ_free(struct LDKC2Tuple_ChannelIdPublicKeyZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_ChannelIdPublicKeyZ_free")] public static extern void C2Tuple_ChannelIdPublicKeyZ_free(long __res); + // void CVec_C2Tuple_ChannelIdPublicKeyZZ_free(struct LDKCVec_C2Tuple_ChannelIdPublicKeyZZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_C2Tuple_ChannelIdPublicKeyZZ_free")] public static extern void CVec_C2Tuple_ChannelIdPublicKeyZZ_free(long __res); + // void CVec_ChannelIdZ_free(struct LDKCVec_ChannelIdZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_ChannelIdZ_free")] public static extern void CVec_ChannelIdZ_free(long __res); + // struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(struct LDKOfferWithDerivedMetadataBuilder o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok")] public static extern long CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(long _o); + // struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err")] public static extern long CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(Bolt12SemanticError _e); + // bool CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok")] public static extern bool CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(long _o); + // void CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free")] public static extern void CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(long __res); + // uint64_t CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr")] public static extern long CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(long _arg); + // struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(const struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone")] public static extern long CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(long _orig); // struct LDKCOption_StrZ COption_StrZ_some(struct LDKStr o); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_StrZ_some")] public static extern long COption_StrZ_some(long _o); // struct LDKCOption_StrZ COption_StrZ_none(void); @@ -3930,18 +4376,6 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_StrZ_clone_ptr")] public static extern long COption_StrZ_clone_ptr(long _arg); // struct LDKCOption_StrZ COption_StrZ_clone(const struct LDKCOption_StrZ *NONNULL_PTR orig); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_StrZ_clone")] public static extern long COption_StrZ_clone(long _orig); - // struct LDKCResult_NoneBolt12SemanticErrorZ CResult_NoneBolt12SemanticErrorZ_ok(void); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneBolt12SemanticErrorZ_ok")] public static extern long CResult_NoneBolt12SemanticErrorZ_ok(); - // struct LDKCResult_NoneBolt12SemanticErrorZ CResult_NoneBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneBolt12SemanticErrorZ_err")] public static extern long CResult_NoneBolt12SemanticErrorZ_err(Bolt12SemanticError _e); - // bool CResult_NoneBolt12SemanticErrorZ_is_ok(const struct LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR o); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneBolt12SemanticErrorZ_is_ok")] public static extern bool CResult_NoneBolt12SemanticErrorZ_is_ok(long _o); - // void CResult_NoneBolt12SemanticErrorZ_free(struct LDKCResult_NoneBolt12SemanticErrorZ _res); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneBolt12SemanticErrorZ_free")] public static extern void CResult_NoneBolt12SemanticErrorZ_free(long __res); - // uint64_t CResult_NoneBolt12SemanticErrorZ_clone_ptr(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR arg); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneBolt12SemanticErrorZ_clone_ptr")] public static extern long CResult_NoneBolt12SemanticErrorZ_clone_ptr(long _arg); - // struct LDKCResult_NoneBolt12SemanticErrorZ CResult_NoneBolt12SemanticErrorZ_clone(const struct LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR orig); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneBolt12SemanticErrorZ_clone")] public static extern long CResult_NoneBolt12SemanticErrorZ_clone(long _orig); // struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok(struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ o); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok")] public static extern long CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok(long _o); // struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_err(void); @@ -3954,6 +4388,18 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_clone_ptr")] public static extern long CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_clone_ptr(long _arg); // struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_clone(const struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ *NONNULL_PTR orig); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_clone")] public static extern long CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_clone(long _orig); + // struct LDKCResult_ThirtyTwoBytesAPIErrorZ CResult_ThirtyTwoBytesAPIErrorZ_ok(struct LDKThirtyTwoBytes o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_ok")] public static extern long CResult_ThirtyTwoBytesAPIErrorZ_ok(long _o); + // struct LDKCResult_ThirtyTwoBytesAPIErrorZ CResult_ThirtyTwoBytesAPIErrorZ_err(struct LDKAPIError e); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_err")] public static extern long CResult_ThirtyTwoBytesAPIErrorZ_err(long _e); + // bool CResult_ThirtyTwoBytesAPIErrorZ_is_ok(const struct LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_is_ok")] public static extern bool CResult_ThirtyTwoBytesAPIErrorZ_is_ok(long _o); + // void CResult_ThirtyTwoBytesAPIErrorZ_free(struct LDKCResult_ThirtyTwoBytesAPIErrorZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_free")] public static extern void CResult_ThirtyTwoBytesAPIErrorZ_free(long __res); + // uint64_t CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr")] public static extern long CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(long _arg); + // struct LDKCResult_ThirtyTwoBytesAPIErrorZ CResult_ThirtyTwoBytesAPIErrorZ_clone(const struct LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_clone")] public static extern long CResult_ThirtyTwoBytesAPIErrorZ_clone(long _orig); // struct LDKCOption_OffersMessageZ COption_OffersMessageZ_some(struct LDKOffersMessage o); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_OffersMessageZ_some")] public static extern long COption_OffersMessageZ_some(long _o); // struct LDKCOption_OffersMessageZ COption_OffersMessageZ_none(void); @@ -4228,8 +4674,6 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZZ_free")] public static extern void CVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZZ_free(long __res); // void CVec_CommitmentTransactionZ_free(struct LDKCVec_CommitmentTransactionZ _res); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_CommitmentTransactionZ_free")] public static extern void CVec_CommitmentTransactionZ_free(long __res); - // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_TransactionZ_free")] public static extern void CVec_TransactionZ_free(long __res); // uint64_t C2Tuple_u32TxOutZ_clone_ptr(LDKC2Tuple_u32TxOutZ *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_u32TxOutZ_clone_ptr")] public static extern long C2Tuple_u32TxOutZ_clone_ptr(long _arg); // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig); @@ -4356,16 +4800,8 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_SocketAddressZ_clone_ptr")] public static extern long COption_SocketAddressZ_clone_ptr(long _arg); // struct LDKCOption_SocketAddressZ COption_SocketAddressZ_clone(const struct LDKCOption_SocketAddressZ *NONNULL_PTR orig); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_SocketAddressZ_clone")] public static extern long COption_SocketAddressZ_clone(long _orig); - // uint64_t C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR arg); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr")] public static extern long C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(long _arg); - // struct LDKC2Tuple_PublicKeyCOption_SocketAddressZZ C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(const struct LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR orig); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_PublicKeyCOption_SocketAddressZZ_clone")] public static extern long C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(long _orig); - // struct LDKC2Tuple_PublicKeyCOption_SocketAddressZZ C2Tuple_PublicKeyCOption_SocketAddressZZ_new(struct LDKPublicKey a, struct LDKCOption_SocketAddressZ b); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_PublicKeyCOption_SocketAddressZZ_new")] public static extern long C2Tuple_PublicKeyCOption_SocketAddressZZ_new(long _a, long _b); - // void C2Tuple_PublicKeyCOption_SocketAddressZZ_free(struct LDKC2Tuple_PublicKeyCOption_SocketAddressZZ _res); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_PublicKeyCOption_SocketAddressZZ_free")] public static extern void C2Tuple_PublicKeyCOption_SocketAddressZZ_free(long __res); - // void CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_free(struct LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ _res); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_free")] public static extern void CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_free(long __res); + // void CVec_PeerDetailsZ_free(struct LDKCVec_PeerDetailsZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_PeerDetailsZ_free")] public static extern void CVec_PeerDetailsZ_free(long __res); // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_u8ZPeerHandleErrorZ_ok")] public static extern long CResult_CVec_u8ZPeerHandleErrorZ_ok(long _o); // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e); @@ -4462,6 +4898,30 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_clone_ptr")] public static extern long CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_clone_ptr(long _arg); // struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_clone(const struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ *NONNULL_PTR orig); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_clone")] public static extern long CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_clone(long _orig); + // struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(struct LDKUnsignedInvoiceRequest o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok")] public static extern long CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(long _o); + // struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err")] public static extern long CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(Bolt12SemanticError _e); + // bool CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(const struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok")] public static extern bool CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(long _o); + // void CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free")] public static extern void CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(long __res); + // uint64_t CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr")] public static extern long CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(long _arg); + // struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(const struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone")] public static extern long CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(long _orig); + // struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ CResult_InvoiceRequestBolt12SemanticErrorZ_ok(struct LDKInvoiceRequest o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestBolt12SemanticErrorZ_ok")] public static extern long CResult_InvoiceRequestBolt12SemanticErrorZ_ok(long _o); + // struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ CResult_InvoiceRequestBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestBolt12SemanticErrorZ_err")] public static extern long CResult_InvoiceRequestBolt12SemanticErrorZ_err(Bolt12SemanticError _e); + // bool CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(const struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok")] public static extern bool CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(long _o); + // void CResult_InvoiceRequestBolt12SemanticErrorZ_free(struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestBolt12SemanticErrorZ_free")] public static extern void CResult_InvoiceRequestBolt12SemanticErrorZ_free(long __res); + // uint64_t CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr")] public static extern long CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(long _arg); + // struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ CResult_InvoiceRequestBolt12SemanticErrorZ_clone(const struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestBolt12SemanticErrorZ_clone")] public static extern long CResult_InvoiceRequestBolt12SemanticErrorZ_clone(long _orig); // struct LDKCOption_SecretKeyZ COption_SecretKeyZ_some(struct LDKSecretKey o); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_SecretKeyZ_some")] public static extern long COption_SecretKeyZ_some(long _o); // struct LDKCOption_SecretKeyZ COption_SecretKeyZ_none(void); @@ -4472,6 +4932,14 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_SecretKeyZ_clone_ptr")] public static extern long COption_SecretKeyZ_clone_ptr(long _arg); // struct LDKCOption_SecretKeyZ COption_SecretKeyZ_clone(const struct LDKCOption_SecretKeyZ *NONNULL_PTR orig); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_SecretKeyZ_clone")] public static extern long COption_SecretKeyZ_clone(long _orig); + // struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok(struct LDKInvoiceWithExplicitSigningPubkeyBuilder o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok")] public static extern long CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok(long _o); + // struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err")] public static extern long CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err(Bolt12SemanticError _e); + // bool CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok")] public static extern bool CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(long _o); + // void CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free(struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free")] public static extern void CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free(long __res); // struct LDKCResult_VerifiedInvoiceRequestNoneZ CResult_VerifiedInvoiceRequestNoneZ_ok(struct LDKVerifiedInvoiceRequest o); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_VerifiedInvoiceRequestNoneZ_ok")] public static extern long CResult_VerifiedInvoiceRequestNoneZ_ok(long _o); // struct LDKCResult_VerifiedInvoiceRequestNoneZ CResult_VerifiedInvoiceRequestNoneZ_err(void); @@ -4484,6 +4952,26 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_VerifiedInvoiceRequestNoneZ_clone_ptr")] public static extern long CResult_VerifiedInvoiceRequestNoneZ_clone_ptr(long _arg); // struct LDKCResult_VerifiedInvoiceRequestNoneZ CResult_VerifiedInvoiceRequestNoneZ_clone(const struct LDKCResult_VerifiedInvoiceRequestNoneZ *NONNULL_PTR orig); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_VerifiedInvoiceRequestNoneZ_clone")] public static extern long CResult_VerifiedInvoiceRequestNoneZ_clone(long _orig); + // struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok(struct LDKInvoiceWithDerivedSigningPubkeyBuilder o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok")] public static extern long CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok(long _o); + // struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err")] public static extern long CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err(Bolt12SemanticError _e); + // bool CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok")] public static extern bool CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(long _o); + // void CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free")] public static extern void CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(long __res); + // struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ CResult_InvoiceRequestFieldsDecodeErrorZ_ok(struct LDKInvoiceRequestFields o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestFieldsDecodeErrorZ_ok")] public static extern long CResult_InvoiceRequestFieldsDecodeErrorZ_ok(long _o); + // struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ CResult_InvoiceRequestFieldsDecodeErrorZ_err(struct LDKDecodeError e); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestFieldsDecodeErrorZ_err")] public static extern long CResult_InvoiceRequestFieldsDecodeErrorZ_err(long _e); + // bool CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(const struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok")] public static extern bool CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(long _o); + // void CResult_InvoiceRequestFieldsDecodeErrorZ_free(struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestFieldsDecodeErrorZ_free")] public static extern void CResult_InvoiceRequestFieldsDecodeErrorZ_free(long __res); + // uint64_t CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr")] public static extern long CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(long _arg); + // struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ CResult_InvoiceRequestFieldsDecodeErrorZ_clone(const struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestFieldsDecodeErrorZ_clone")] public static extern long CResult_InvoiceRequestFieldsDecodeErrorZ_clone(long _orig); // enum LDKCOption_NoneZ COption_NoneZ_some(void); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_NoneZ_some")] public static extern COption_NoneZ COption_NoneZ_some(); // enum LDKCOption_NoneZ COption_NoneZ_none(void); @@ -4492,6 +4980,16 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_NoneZ_free")] public static extern void COption_NoneZ_free(COption_NoneZ __res); // void CVec_WitnessZ_free(struct LDKCVec_WitnessZ _res); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_WitnessZ_free")] public static extern void CVec_WitnessZ_free(long __res); + // struct LDKCOption_ECDSASignatureZ COption_ECDSASignatureZ_some(struct LDKECDSASignature o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_ECDSASignatureZ_some")] public static extern long COption_ECDSASignatureZ_some(long _o); + // struct LDKCOption_ECDSASignatureZ COption_ECDSASignatureZ_none(void); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_ECDSASignatureZ_none")] public static extern long COption_ECDSASignatureZ_none(); + // void COption_ECDSASignatureZ_free(struct LDKCOption_ECDSASignatureZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_ECDSASignatureZ_free")] public static extern void COption_ECDSASignatureZ_free(long __res); + // uint64_t COption_ECDSASignatureZ_clone_ptr(LDKCOption_ECDSASignatureZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_ECDSASignatureZ_clone_ptr")] public static extern long COption_ECDSASignatureZ_clone_ptr(long _arg); + // struct LDKCOption_ECDSASignatureZ COption_ECDSASignatureZ_clone(const struct LDKCOption_ECDSASignatureZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_ECDSASignatureZ_clone")] public static extern long COption_ECDSASignatureZ_clone(long _orig); // struct LDKCOption_i64Z COption_i64Z_some(int64_t o); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_i64Z_some")] public static extern long COption_i64Z_some(long _o); // struct LDKCOption_i64Z COption_i64Z_none(void); @@ -5350,6 +5848,8 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ShutdownScriptInvalidShutdownScriptZ_clone_ptr")] public static extern long CResult_ShutdownScriptInvalidShutdownScriptZ_clone_ptr(long _arg); // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_clone(const struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR orig); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ShutdownScriptInvalidShutdownScriptZ_clone")] public static extern long CResult_ShutdownScriptInvalidShutdownScriptZ_clone(long _orig); + // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_TransactionZ_free")] public static extern void CVec_TransactionZ_free(long __res); // struct LDKCResult_PaymentPurposeDecodeErrorZ CResult_PaymentPurposeDecodeErrorZ_ok(struct LDKPaymentPurpose o); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PaymentPurposeDecodeErrorZ_ok")] public static extern long CResult_PaymentPurposeDecodeErrorZ_ok(long _o); // struct LDKCResult_PaymentPurposeDecodeErrorZ CResult_PaymentPurposeDecodeErrorZ_err(struct LDKDecodeError e); @@ -5686,6 +6186,18 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UntrustedStringDecodeErrorZ_clone_ptr")] public static extern long CResult_UntrustedStringDecodeErrorZ_clone_ptr(long _arg); // struct LDKCResult_UntrustedStringDecodeErrorZ CResult_UntrustedStringDecodeErrorZ_clone(const struct LDKCResult_UntrustedStringDecodeErrorZ *NONNULL_PTR orig); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UntrustedStringDecodeErrorZ_clone")] public static extern long CResult_UntrustedStringDecodeErrorZ_clone(long _orig); + // struct LDKCResult_ChannelIdDecodeErrorZ CResult_ChannelIdDecodeErrorZ_ok(struct LDKChannelId o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelIdDecodeErrorZ_ok")] public static extern long CResult_ChannelIdDecodeErrorZ_ok(long _o); + // struct LDKCResult_ChannelIdDecodeErrorZ CResult_ChannelIdDecodeErrorZ_err(struct LDKDecodeError e); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelIdDecodeErrorZ_err")] public static extern long CResult_ChannelIdDecodeErrorZ_err(long _e); + // bool CResult_ChannelIdDecodeErrorZ_is_ok(const struct LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelIdDecodeErrorZ_is_ok")] public static extern bool CResult_ChannelIdDecodeErrorZ_is_ok(long _o); + // void CResult_ChannelIdDecodeErrorZ_free(struct LDKCResult_ChannelIdDecodeErrorZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelIdDecodeErrorZ_free")] public static extern void CResult_ChannelIdDecodeErrorZ_free(long __res); + // uint64_t CResult_ChannelIdDecodeErrorZ_clone_ptr(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelIdDecodeErrorZ_clone_ptr")] public static extern long CResult_ChannelIdDecodeErrorZ_clone_ptr(long _arg); + // struct LDKCResult_ChannelIdDecodeErrorZ CResult_ChannelIdDecodeErrorZ_clone(const struct LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelIdDecodeErrorZ_clone")] public static extern long CResult_ChannelIdDecodeErrorZ_clone(long _orig); // uint64_t C2Tuple__u832u16Z_clone_ptr(LDKC2Tuple__u832u16Z *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple__u832u16Z_clone_ptr")] public static extern long C2Tuple__u832u16Z_clone_ptr(long _arg); // struct LDKC2Tuple__u832u16Z C2Tuple__u832u16Z_clone(const struct LDKC2Tuple__u832u16Z *NONNULL_PTR orig); @@ -5718,6 +6230,66 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PaymentConstraintsDecodeErrorZ_clone_ptr")] public static extern long CResult_PaymentConstraintsDecodeErrorZ_clone_ptr(long _arg); // struct LDKCResult_PaymentConstraintsDecodeErrorZ CResult_PaymentConstraintsDecodeErrorZ_clone(const struct LDKCResult_PaymentConstraintsDecodeErrorZ *NONNULL_PTR orig); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PaymentConstraintsDecodeErrorZ_clone")] public static extern long CResult_PaymentConstraintsDecodeErrorZ_clone(long _orig); + // struct LDKCResult_PaymentContextDecodeErrorZ CResult_PaymentContextDecodeErrorZ_ok(struct LDKPaymentContext o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PaymentContextDecodeErrorZ_ok")] public static extern long CResult_PaymentContextDecodeErrorZ_ok(long _o); + // struct LDKCResult_PaymentContextDecodeErrorZ CResult_PaymentContextDecodeErrorZ_err(struct LDKDecodeError e); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PaymentContextDecodeErrorZ_err")] public static extern long CResult_PaymentContextDecodeErrorZ_err(long _e); + // bool CResult_PaymentContextDecodeErrorZ_is_ok(const struct LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PaymentContextDecodeErrorZ_is_ok")] public static extern bool CResult_PaymentContextDecodeErrorZ_is_ok(long _o); + // void CResult_PaymentContextDecodeErrorZ_free(struct LDKCResult_PaymentContextDecodeErrorZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PaymentContextDecodeErrorZ_free")] public static extern void CResult_PaymentContextDecodeErrorZ_free(long __res); + // uint64_t CResult_PaymentContextDecodeErrorZ_clone_ptr(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PaymentContextDecodeErrorZ_clone_ptr")] public static extern long CResult_PaymentContextDecodeErrorZ_clone_ptr(long _arg); + // struct LDKCResult_PaymentContextDecodeErrorZ CResult_PaymentContextDecodeErrorZ_clone(const struct LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PaymentContextDecodeErrorZ_clone")] public static extern long CResult_PaymentContextDecodeErrorZ_clone(long _orig); + // struct LDKCResult_UnknownPaymentContextDecodeErrorZ CResult_UnknownPaymentContextDecodeErrorZ_ok(struct LDKUnknownPaymentContext o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_ok")] public static extern long CResult_UnknownPaymentContextDecodeErrorZ_ok(long _o); + // struct LDKCResult_UnknownPaymentContextDecodeErrorZ CResult_UnknownPaymentContextDecodeErrorZ_err(struct LDKDecodeError e); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_err")] public static extern long CResult_UnknownPaymentContextDecodeErrorZ_err(long _e); + // bool CResult_UnknownPaymentContextDecodeErrorZ_is_ok(const struct LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_is_ok")] public static extern bool CResult_UnknownPaymentContextDecodeErrorZ_is_ok(long _o); + // void CResult_UnknownPaymentContextDecodeErrorZ_free(struct LDKCResult_UnknownPaymentContextDecodeErrorZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_free")] public static extern void CResult_UnknownPaymentContextDecodeErrorZ_free(long __res); + // uint64_t CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr")] public static extern long CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(long _arg); + // struct LDKCResult_UnknownPaymentContextDecodeErrorZ CResult_UnknownPaymentContextDecodeErrorZ_clone(const struct LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_clone")] public static extern long CResult_UnknownPaymentContextDecodeErrorZ_clone(long _orig); + // struct LDKCResult_Bolt12OfferContextDecodeErrorZ CResult_Bolt12OfferContextDecodeErrorZ_ok(struct LDKBolt12OfferContext o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12OfferContextDecodeErrorZ_ok")] public static extern long CResult_Bolt12OfferContextDecodeErrorZ_ok(long _o); + // struct LDKCResult_Bolt12OfferContextDecodeErrorZ CResult_Bolt12OfferContextDecodeErrorZ_err(struct LDKDecodeError e); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12OfferContextDecodeErrorZ_err")] public static extern long CResult_Bolt12OfferContextDecodeErrorZ_err(long _e); + // bool CResult_Bolt12OfferContextDecodeErrorZ_is_ok(const struct LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12OfferContextDecodeErrorZ_is_ok")] public static extern bool CResult_Bolt12OfferContextDecodeErrorZ_is_ok(long _o); + // void CResult_Bolt12OfferContextDecodeErrorZ_free(struct LDKCResult_Bolt12OfferContextDecodeErrorZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12OfferContextDecodeErrorZ_free")] public static extern void CResult_Bolt12OfferContextDecodeErrorZ_free(long __res); + // uint64_t CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr")] public static extern long CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(long _arg); + // struct LDKCResult_Bolt12OfferContextDecodeErrorZ CResult_Bolt12OfferContextDecodeErrorZ_clone(const struct LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12OfferContextDecodeErrorZ_clone")] public static extern long CResult_Bolt12OfferContextDecodeErrorZ_clone(long _orig); + // struct LDKCResult_Bolt12RefundContextDecodeErrorZ CResult_Bolt12RefundContextDecodeErrorZ_ok(struct LDKBolt12RefundContext o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12RefundContextDecodeErrorZ_ok")] public static extern long CResult_Bolt12RefundContextDecodeErrorZ_ok(long _o); + // struct LDKCResult_Bolt12RefundContextDecodeErrorZ CResult_Bolt12RefundContextDecodeErrorZ_err(struct LDKDecodeError e); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12RefundContextDecodeErrorZ_err")] public static extern long CResult_Bolt12RefundContextDecodeErrorZ_err(long _e); + // bool CResult_Bolt12RefundContextDecodeErrorZ_is_ok(const struct LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12RefundContextDecodeErrorZ_is_ok")] public static extern bool CResult_Bolt12RefundContextDecodeErrorZ_is_ok(long _o); + // void CResult_Bolt12RefundContextDecodeErrorZ_free(struct LDKCResult_Bolt12RefundContextDecodeErrorZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12RefundContextDecodeErrorZ_free")] public static extern void CResult_Bolt12RefundContextDecodeErrorZ_free(long __res); + // uint64_t CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr")] public static extern long CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(long _arg); + // struct LDKCResult_Bolt12RefundContextDecodeErrorZ CResult_Bolt12RefundContextDecodeErrorZ_clone(const struct LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12RefundContextDecodeErrorZ_clone")] public static extern long CResult_Bolt12RefundContextDecodeErrorZ_clone(long _orig); + // struct LDKCResult_StrSecp256k1ErrorZ CResult_StrSecp256k1ErrorZ_ok(struct LDKStr o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_StrSecp256k1ErrorZ_ok")] public static extern long CResult_StrSecp256k1ErrorZ_ok(long _o); + // struct LDKCResult_StrSecp256k1ErrorZ CResult_StrSecp256k1ErrorZ_err(enum LDKSecp256k1Error e); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_StrSecp256k1ErrorZ_err")] public static extern long CResult_StrSecp256k1ErrorZ_err(Secp256k1Error _e); + // bool CResult_StrSecp256k1ErrorZ_is_ok(const struct LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_StrSecp256k1ErrorZ_is_ok")] public static extern bool CResult_StrSecp256k1ErrorZ_is_ok(long _o); + // void CResult_StrSecp256k1ErrorZ_free(struct LDKCResult_StrSecp256k1ErrorZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_StrSecp256k1ErrorZ_free")] public static extern void CResult_StrSecp256k1ErrorZ_free(long __res); + // uint64_t CResult_StrSecp256k1ErrorZ_clone_ptr(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_StrSecp256k1ErrorZ_clone_ptr")] public static extern long CResult_StrSecp256k1ErrorZ_clone_ptr(long _arg); + // struct LDKCResult_StrSecp256k1ErrorZ CResult_StrSecp256k1ErrorZ_clone(const struct LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_StrSecp256k1ErrorZ_clone")] public static extern long CResult_StrSecp256k1ErrorZ_clone(long _orig); // uint64_t C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr")] public static extern long C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(long _arg); // struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(const struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR orig); @@ -5738,18 +6310,6 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr")] public static extern long CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(long _arg); // struct LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(const struct LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR orig); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone")] public static extern long CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(long _orig); - // struct LDKCResult_StrSecp256k1ErrorZ CResult_StrSecp256k1ErrorZ_ok(struct LDKStr o); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_StrSecp256k1ErrorZ_ok")] public static extern long CResult_StrSecp256k1ErrorZ_ok(long _o); - // struct LDKCResult_StrSecp256k1ErrorZ CResult_StrSecp256k1ErrorZ_err(enum LDKSecp256k1Error e); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_StrSecp256k1ErrorZ_err")] public static extern long CResult_StrSecp256k1ErrorZ_err(Secp256k1Error _e); - // bool CResult_StrSecp256k1ErrorZ_is_ok(const struct LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR o); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_StrSecp256k1ErrorZ_is_ok")] public static extern bool CResult_StrSecp256k1ErrorZ_is_ok(long _o); - // void CResult_StrSecp256k1ErrorZ_free(struct LDKCResult_StrSecp256k1ErrorZ _res); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_StrSecp256k1ErrorZ_free")] public static extern void CResult_StrSecp256k1ErrorZ_free(long __res); - // uint64_t CResult_StrSecp256k1ErrorZ_clone_ptr(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR arg); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_StrSecp256k1ErrorZ_clone_ptr")] public static extern long CResult_StrSecp256k1ErrorZ_clone_ptr(long _arg); - // struct LDKCResult_StrSecp256k1ErrorZ CResult_StrSecp256k1ErrorZ_clone(const struct LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR orig); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_StrSecp256k1ErrorZ_clone")] public static extern long CResult_StrSecp256k1ErrorZ_clone(long _orig); // struct LDKCResult_TxOutUtxoLookupErrorZ CResult_TxOutUtxoLookupErrorZ_ok(struct LDKTxOut o); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_TxOutUtxoLookupErrorZ_ok")] public static extern long CResult_TxOutUtxoLookupErrorZ_ok(long _o); // struct LDKCResult_TxOutUtxoLookupErrorZ CResult_TxOutUtxoLookupErrorZ_err(enum LDKUtxoLookupError e); @@ -5778,6 +6338,10 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_is_ok")] public static extern bool CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_is_ok(long _o); // void CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_free(struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ _res); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_free")] public static extern void CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_free(long __res); + // uint64_t CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr")] public static extern long CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(long _arg); + // struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(const struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone")] public static extern long CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(long _orig); // struct LDKCResult_PeeledOnionNoneZ CResult_PeeledOnionNoneZ_ok(struct LDKPeeledOnion o); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PeeledOnionNoneZ_ok")] public static extern long CResult_PeeledOnionNoneZ_ok(long _o); // struct LDKCResult_PeeledOnionNoneZ CResult_PeeledOnionNoneZ_err(void); @@ -5786,6 +6350,10 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PeeledOnionNoneZ_is_ok")] public static extern bool CResult_PeeledOnionNoneZ_is_ok(long _o); // void CResult_PeeledOnionNoneZ_free(struct LDKCResult_PeeledOnionNoneZ _res); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PeeledOnionNoneZ_free")] public static extern void CResult_PeeledOnionNoneZ_free(long __res); + // uint64_t CResult_PeeledOnionNoneZ_clone_ptr(LDKCResult_PeeledOnionNoneZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PeeledOnionNoneZ_clone_ptr")] public static extern long CResult_PeeledOnionNoneZ_clone_ptr(long _arg); + // struct LDKCResult_PeeledOnionNoneZ CResult_PeeledOnionNoneZ_clone(const struct LDKCResult_PeeledOnionNoneZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PeeledOnionNoneZ_clone")] public static extern long CResult_PeeledOnionNoneZ_clone(long _orig); // struct LDKCResult_SendSuccessSendErrorZ CResult_SendSuccessSendErrorZ_ok(struct LDKSendSuccess o); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_SendSuccessSendErrorZ_ok")] public static extern long CResult_SendSuccessSendErrorZ_ok(long _o); // struct LDKCResult_SendSuccessSendErrorZ CResult_SendSuccessSendErrorZ_err(struct LDKSendError e); @@ -5794,6 +6362,10 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_SendSuccessSendErrorZ_is_ok")] public static extern bool CResult_SendSuccessSendErrorZ_is_ok(long _o); // void CResult_SendSuccessSendErrorZ_free(struct LDKCResult_SendSuccessSendErrorZ _res); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_SendSuccessSendErrorZ_free")] public static extern void CResult_SendSuccessSendErrorZ_free(long __res); + // uint64_t CResult_SendSuccessSendErrorZ_clone_ptr(LDKCResult_SendSuccessSendErrorZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_SendSuccessSendErrorZ_clone_ptr")] public static extern long CResult_SendSuccessSendErrorZ_clone_ptr(long _arg); + // struct LDKCResult_SendSuccessSendErrorZ CResult_SendSuccessSendErrorZ_clone(const struct LDKCResult_SendSuccessSendErrorZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_SendSuccessSendErrorZ_clone")] public static extern long CResult_SendSuccessSendErrorZ_clone(long _orig); // struct LDKCResult_BlindedPathNoneZ CResult_BlindedPathNoneZ_ok(struct LDKBlindedPath o); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_BlindedPathNoneZ_ok")] public static extern long CResult_BlindedPathNoneZ_ok(long _o); // struct LDKCResult_BlindedPathNoneZ CResult_BlindedPathNoneZ_err(void); @@ -5856,6 +6428,58 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceErrorDecodeErrorZ_clone_ptr")] public static extern long CResult_InvoiceErrorDecodeErrorZ_clone_ptr(long _arg); // struct LDKCResult_InvoiceErrorDecodeErrorZ CResult_InvoiceErrorDecodeErrorZ_clone(const struct LDKCResult_InvoiceErrorDecodeErrorZ *NONNULL_PTR orig); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceErrorDecodeErrorZ_clone")] public static extern long CResult_InvoiceErrorDecodeErrorZ_clone(long _orig); + // struct LDKCResult_TrackedSpendableOutputDecodeErrorZ CResult_TrackedSpendableOutputDecodeErrorZ_ok(struct LDKTrackedSpendableOutput o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_TrackedSpendableOutputDecodeErrorZ_ok")] public static extern long CResult_TrackedSpendableOutputDecodeErrorZ_ok(long _o); + // struct LDKCResult_TrackedSpendableOutputDecodeErrorZ CResult_TrackedSpendableOutputDecodeErrorZ_err(struct LDKDecodeError e); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_TrackedSpendableOutputDecodeErrorZ_err")] public static extern long CResult_TrackedSpendableOutputDecodeErrorZ_err(long _e); + // bool CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(const struct LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_TrackedSpendableOutputDecodeErrorZ_is_ok")] public static extern bool CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(long _o); + // void CResult_TrackedSpendableOutputDecodeErrorZ_free(struct LDKCResult_TrackedSpendableOutputDecodeErrorZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_TrackedSpendableOutputDecodeErrorZ_free")] public static extern void CResult_TrackedSpendableOutputDecodeErrorZ_free(long __res); + // uint64_t CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr")] public static extern long CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(long _arg); + // struct LDKCResult_TrackedSpendableOutputDecodeErrorZ CResult_TrackedSpendableOutputDecodeErrorZ_clone(const struct LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_TrackedSpendableOutputDecodeErrorZ_clone")] public static extern long CResult_TrackedSpendableOutputDecodeErrorZ_clone(long _orig); + // struct LDKCResult_OutputSpendStatusDecodeErrorZ CResult_OutputSpendStatusDecodeErrorZ_ok(struct LDKOutputSpendStatus o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OutputSpendStatusDecodeErrorZ_ok")] public static extern long CResult_OutputSpendStatusDecodeErrorZ_ok(long _o); + // struct LDKCResult_OutputSpendStatusDecodeErrorZ CResult_OutputSpendStatusDecodeErrorZ_err(struct LDKDecodeError e); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OutputSpendStatusDecodeErrorZ_err")] public static extern long CResult_OutputSpendStatusDecodeErrorZ_err(long _e); + // bool CResult_OutputSpendStatusDecodeErrorZ_is_ok(const struct LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OutputSpendStatusDecodeErrorZ_is_ok")] public static extern bool CResult_OutputSpendStatusDecodeErrorZ_is_ok(long _o); + // void CResult_OutputSpendStatusDecodeErrorZ_free(struct LDKCResult_OutputSpendStatusDecodeErrorZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OutputSpendStatusDecodeErrorZ_free")] public static extern void CResult_OutputSpendStatusDecodeErrorZ_free(long __res); + // uint64_t CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OutputSpendStatusDecodeErrorZ_clone_ptr")] public static extern long CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(long _arg); + // struct LDKCResult_OutputSpendStatusDecodeErrorZ CResult_OutputSpendStatusDecodeErrorZ_clone(const struct LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OutputSpendStatusDecodeErrorZ_clone")] public static extern long CResult_OutputSpendStatusDecodeErrorZ_clone(long _orig); + // struct LDKCOption_FilterZ COption_FilterZ_some(struct LDKFilter o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_FilterZ_some")] public static extern long COption_FilterZ_some(long _o); + // struct LDKCOption_FilterZ COption_FilterZ_none(void); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_FilterZ_none")] public static extern long COption_FilterZ_none(); + // void COption_FilterZ_free(struct LDKCOption_FilterZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_FilterZ_free")] public static extern void COption_FilterZ_free(long __res); + // void CVec_TrackedSpendableOutputZ_free(struct LDKCVec_TrackedSpendableOutputZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_TrackedSpendableOutputZ_free")] public static extern void CVec_TrackedSpendableOutputZ_free(long __res); + // struct LDKCResult_OutputSweeperDecodeErrorZ CResult_OutputSweeperDecodeErrorZ_ok(struct LDKOutputSweeper o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OutputSweeperDecodeErrorZ_ok")] public static extern long CResult_OutputSweeperDecodeErrorZ_ok(long _o); + // struct LDKCResult_OutputSweeperDecodeErrorZ CResult_OutputSweeperDecodeErrorZ_err(struct LDKDecodeError e); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OutputSweeperDecodeErrorZ_err")] public static extern long CResult_OutputSweeperDecodeErrorZ_err(long _e); + // bool CResult_OutputSweeperDecodeErrorZ_is_ok(const struct LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OutputSweeperDecodeErrorZ_is_ok")] public static extern bool CResult_OutputSweeperDecodeErrorZ_is_ok(long _o); + // void CResult_OutputSweeperDecodeErrorZ_free(struct LDKCResult_OutputSweeperDecodeErrorZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OutputSweeperDecodeErrorZ_free")] public static extern void CResult_OutputSweeperDecodeErrorZ_free(long __res); + // struct LDKC2Tuple_BestBlockOutputSweeperZ C2Tuple_BestBlockOutputSweeperZ_new(struct LDKBestBlock a, struct LDKOutputSweeper b); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_BestBlockOutputSweeperZ_new")] public static extern long C2Tuple_BestBlockOutputSweeperZ_new(long _a, long _b); + // void C2Tuple_BestBlockOutputSweeperZ_free(struct LDKC2Tuple_BestBlockOutputSweeperZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_BestBlockOutputSweeperZ_free")] public static extern void C2Tuple_BestBlockOutputSweeperZ_free(long __res); + // struct LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok(struct LDKC2Tuple_BestBlockOutputSweeperZ o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok")] public static extern long CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok(long _o); + // struct LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err(struct LDKDecodeError e); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err")] public static extern long CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err(long _e); + // bool CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(const struct LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok")] public static extern bool CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(long _o); + // void CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free")] public static extern void CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free(long __res); // struct LDKCResult_DelayedPaymentBasepointDecodeErrorZ CResult_DelayedPaymentBasepointDecodeErrorZ_ok(struct LDKDelayedPaymentBasepoint o); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_DelayedPaymentBasepointDecodeErrorZ_ok")] public static extern long CResult_DelayedPaymentBasepointDecodeErrorZ_ok(long _o); // struct LDKCResult_DelayedPaymentBasepointDecodeErrorZ CResult_DelayedPaymentBasepointDecodeErrorZ_err(struct LDKDecodeError e); @@ -5928,12 +6552,6 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RevocationKeyDecodeErrorZ_clone_ptr")] public static extern long CResult_RevocationKeyDecodeErrorZ_clone_ptr(long _arg); // struct LDKCResult_RevocationKeyDecodeErrorZ CResult_RevocationKeyDecodeErrorZ_clone(const struct LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR orig); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RevocationKeyDecodeErrorZ_clone")] public static extern long CResult_RevocationKeyDecodeErrorZ_clone(long _orig); - // struct LDKCOption_FilterZ COption_FilterZ_some(struct LDKFilter o); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_FilterZ_some")] public static extern long COption_FilterZ_some(long _o); - // struct LDKCOption_FilterZ COption_FilterZ_none(void); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_FilterZ_none")] public static extern long COption_FilterZ_none(); - // void COption_FilterZ_free(struct LDKCOption_FilterZ _res); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_FilterZ_free")] public static extern void COption_FilterZ_free(long __res); // struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_ok(struct LDKLockedChannelMonitor o); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_LockedChannelMonitorNoneZ_ok")] public static extern long CResult_LockedChannelMonitorNoneZ_ok(long _o); // struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_err(void); @@ -5942,8 +6560,16 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_LockedChannelMonitorNoneZ_is_ok")] public static extern bool CResult_LockedChannelMonitorNoneZ_is_ok(long _o); // void CResult_LockedChannelMonitorNoneZ_free(struct LDKCResult_LockedChannelMonitorNoneZ _res); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_LockedChannelMonitorNoneZ_free")] public static extern void CResult_LockedChannelMonitorNoneZ_free(long __res); - // void CVec_OutPointZ_free(struct LDKCVec_OutPointZ _res); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_OutPointZ_free")] public static extern void CVec_OutPointZ_free(long __res); + // uint64_t C2Tuple_OutPointChannelIdZ_clone_ptr(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_OutPointChannelIdZ_clone_ptr")] public static extern long C2Tuple_OutPointChannelIdZ_clone_ptr(long _arg); + // struct LDKC2Tuple_OutPointChannelIdZ C2Tuple_OutPointChannelIdZ_clone(const struct LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_OutPointChannelIdZ_clone")] public static extern long C2Tuple_OutPointChannelIdZ_clone(long _orig); + // struct LDKC2Tuple_OutPointChannelIdZ C2Tuple_OutPointChannelIdZ_new(struct LDKOutPoint a, struct LDKChannelId b); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_OutPointChannelIdZ_new")] public static extern long C2Tuple_OutPointChannelIdZ_new(long _a, long _b); + // void C2Tuple_OutPointChannelIdZ_free(struct LDKC2Tuple_OutPointChannelIdZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_OutPointChannelIdZ_free")] public static extern void C2Tuple_OutPointChannelIdZ_free(long __res); + // void CVec_C2Tuple_OutPointChannelIdZZ_free(struct LDKCVec_C2Tuple_OutPointChannelIdZZ _res); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_C2Tuple_OutPointChannelIdZZ_free")] public static extern void CVec_C2Tuple_OutPointChannelIdZZ_free(long __res); // void CVec_MonitorUpdateIdZ_free(struct LDKCVec_MonitorUpdateIdZ _res); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_MonitorUpdateIdZ_free")] public static extern void CVec_MonitorUpdateIdZ_free(long __res); // uint64_t C2Tuple_OutPointCVec_MonitorUpdateIdZZ_clone_ptr(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR arg); @@ -6030,6 +6656,8 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TransactionU16LenLimited_new")] public static extern long TransactionU16LenLimited_new(long _transaction); // MUST_USE_RES struct LDKTransaction TransactionU16LenLimited_into_transaction(struct LDKTransactionU16LenLimited this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TransactionU16LenLimited_into_transaction")] public static extern long TransactionU16LenLimited_into_transaction(long _this_arg); + // MUST_USE_RES struct LDKTransaction TransactionU16LenLimited_as_transaction(const struct LDKTransactionU16LenLimited *NONNULL_PTR this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TransactionU16LenLimited_as_transaction")] public static extern long TransactionU16LenLimited_as_transaction(long _this_arg); // struct LDKCVec_u8Z TransactionU16LenLimited_write(const struct LDKTransactionU16LenLimited *NONNULL_PTR obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TransactionU16LenLimited_write")] public static extern long TransactionU16LenLimited_write(long _obj); // struct LDKCResult_TransactionU16LenLimitedDecodeErrorZ TransactionU16LenLimited_read(struct LDKu8slice ser); @@ -6060,6 +6688,24 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_MonitorUpdatingPersister_cleanup_stale_updates")] public static extern long MonitorUpdatingPersister_cleanup_stale_updates(long _this_arg, bool _lazy); // struct LDKPersist MonitorUpdatingPersister_as_Persist(const struct LDKMonitorUpdatingPersister *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_MonitorUpdatingPersister_as_Persist")] public static extern long MonitorUpdatingPersister_as_Persist(long _this_arg); + // enum LDKShortChannelIdError ShortChannelIdError_clone(const enum LDKShortChannelIdError *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ShortChannelIdError_clone")] public static extern ShortChannelIdError ShortChannelIdError_clone(long _orig); + // enum LDKShortChannelIdError ShortChannelIdError_block_overflow(void); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ShortChannelIdError_block_overflow")] public static extern ShortChannelIdError ShortChannelIdError_block_overflow(); + // enum LDKShortChannelIdError ShortChannelIdError_tx_index_overflow(void); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ShortChannelIdError_tx_index_overflow")] public static extern ShortChannelIdError ShortChannelIdError_tx_index_overflow(); + // enum LDKShortChannelIdError ShortChannelIdError_vout_index_overflow(void); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ShortChannelIdError_vout_index_overflow")] public static extern ShortChannelIdError ShortChannelIdError_vout_index_overflow(); + // bool ShortChannelIdError_eq(const enum LDKShortChannelIdError *NONNULL_PTR a, const enum LDKShortChannelIdError *NONNULL_PTR b); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ShortChannelIdError_eq")] public static extern bool ShortChannelIdError_eq(long _a, long _b); + // uint32_t block_from_scid(uint64_t short_channel_id); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_block_from_scid")] public static extern int block_from_scid(long _short_channel_id); + // uint32_t tx_index_from_scid(uint64_t short_channel_id); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_tx_index_from_scid")] public static extern int tx_index_from_scid(long _short_channel_id); + // uint16_t vout_from_scid(uint64_t short_channel_id); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_vout_from_scid")] public static extern short vout_from_scid(long _short_channel_id); + // struct LDKCResult_u64ShortChannelIdErrorZ scid_from_parts(uint64_t block, uint64_t tx_index, uint64_t vout_index); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_scid_from_parts")] public static extern long scid_from_parts(long _block, long _tx_index, long _vout_index); // void UntrustedString_free(struct LDKUntrustedString this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UntrustedString_free")] public static extern void UntrustedString_free(long _this_obj); // struct LDKStr UntrustedString_get_a(const struct LDKUntrustedString *NONNULL_PTR this_ptr); @@ -6088,25 +6734,95 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PrintableString_set_a")] public static extern void PrintableString_set_a(long _this_ptr, long _val); // MUST_USE_RES struct LDKPrintableString PrintableString_new(struct LDKStr a_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PrintableString_new")] public static extern long PrintableString_new(long _a_arg); + // void TrackedSpendableOutput_free(struct LDKTrackedSpendableOutput this_obj); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TrackedSpendableOutput_free")] public static extern void TrackedSpendableOutput_free(long _this_obj); + // struct LDKSpendableOutputDescriptor TrackedSpendableOutput_get_descriptor(const struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TrackedSpendableOutput_get_descriptor")] public static extern long TrackedSpendableOutput_get_descriptor(long _this_ptr); + // void TrackedSpendableOutput_set_descriptor(struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr, struct LDKSpendableOutputDescriptor val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TrackedSpendableOutput_set_descriptor")] public static extern void TrackedSpendableOutput_set_descriptor(long _this_ptr, long _val); + // struct LDKChannelId TrackedSpendableOutput_get_channel_id(const struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TrackedSpendableOutput_get_channel_id")] public static extern long TrackedSpendableOutput_get_channel_id(long _this_ptr); + // void TrackedSpendableOutput_set_channel_id(struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr, struct LDKChannelId val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TrackedSpendableOutput_set_channel_id")] public static extern void TrackedSpendableOutput_set_channel_id(long _this_ptr, long _val); + // struct LDKOutputSpendStatus TrackedSpendableOutput_get_status(const struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TrackedSpendableOutput_get_status")] public static extern long TrackedSpendableOutput_get_status(long _this_ptr); + // void TrackedSpendableOutput_set_status(struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr, struct LDKOutputSpendStatus val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TrackedSpendableOutput_set_status")] public static extern void TrackedSpendableOutput_set_status(long _this_ptr, long _val); + // MUST_USE_RES struct LDKTrackedSpendableOutput TrackedSpendableOutput_new(struct LDKSpendableOutputDescriptor descriptor_arg, struct LDKChannelId channel_id_arg, struct LDKOutputSpendStatus status_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TrackedSpendableOutput_new")] public static extern long TrackedSpendableOutput_new(long _descriptor_arg, long _channel_id_arg, long _status_arg); + // uint64_t TrackedSpendableOutput_clone_ptr(LDKTrackedSpendableOutput *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TrackedSpendableOutput_clone_ptr")] public static extern long TrackedSpendableOutput_clone_ptr(long _arg); + // struct LDKTrackedSpendableOutput TrackedSpendableOutput_clone(const struct LDKTrackedSpendableOutput *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TrackedSpendableOutput_clone")] public static extern long TrackedSpendableOutput_clone(long _orig); + // bool TrackedSpendableOutput_eq(const struct LDKTrackedSpendableOutput *NONNULL_PTR a, const struct LDKTrackedSpendableOutput *NONNULL_PTR b); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TrackedSpendableOutput_eq")] public static extern bool TrackedSpendableOutput_eq(long _a, long _b); + // MUST_USE_RES bool TrackedSpendableOutput_is_spent_in(const struct LDKTrackedSpendableOutput *NONNULL_PTR this_arg, struct LDKTransaction tx); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TrackedSpendableOutput_is_spent_in")] public static extern bool TrackedSpendableOutput_is_spent_in(long _this_arg, long _tx); + // struct LDKCVec_u8Z TrackedSpendableOutput_write(const struct LDKTrackedSpendableOutput *NONNULL_PTR obj); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TrackedSpendableOutput_write")] public static extern long TrackedSpendableOutput_write(long _obj); + // struct LDKCResult_TrackedSpendableOutputDecodeErrorZ TrackedSpendableOutput_read(struct LDKu8slice ser); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TrackedSpendableOutput_read")] public static extern long TrackedSpendableOutput_read(long _ser); + // void OutputSpendStatus_free(struct LDKOutputSpendStatus this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OutputSpendStatus_free")] public static extern void OutputSpendStatus_free(long _this_ptr); + // uint64_t OutputSpendStatus_clone_ptr(LDKOutputSpendStatus *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OutputSpendStatus_clone_ptr")] public static extern long OutputSpendStatus_clone_ptr(long _arg); + // struct LDKOutputSpendStatus OutputSpendStatus_clone(const struct LDKOutputSpendStatus *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OutputSpendStatus_clone")] public static extern long OutputSpendStatus_clone(long _orig); + // struct LDKOutputSpendStatus OutputSpendStatus_pending_initial_broadcast(struct LDKCOption_u32Z delayed_until_height); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OutputSpendStatus_pending_initial_broadcast")] public static extern long OutputSpendStatus_pending_initial_broadcast(long _delayed_until_height); + // struct LDKOutputSpendStatus OutputSpendStatus_pending_first_confirmation(struct LDKThirtyTwoBytes first_broadcast_hash, uint32_t latest_broadcast_height, struct LDKTransaction latest_spending_tx); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OutputSpendStatus_pending_first_confirmation")] public static extern long OutputSpendStatus_pending_first_confirmation(long _first_broadcast_hash, int _latest_broadcast_height, long _latest_spending_tx); + // struct LDKOutputSpendStatus OutputSpendStatus_pending_threshold_confirmations(struct LDKThirtyTwoBytes first_broadcast_hash, uint32_t latest_broadcast_height, struct LDKTransaction latest_spending_tx, uint32_t confirmation_height, struct LDKThirtyTwoBytes confirmation_hash); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OutputSpendStatus_pending_threshold_confirmations")] public static extern long OutputSpendStatus_pending_threshold_confirmations(long _first_broadcast_hash, int _latest_broadcast_height, long _latest_spending_tx, int _confirmation_height, long _confirmation_hash); + // bool OutputSpendStatus_eq(const struct LDKOutputSpendStatus *NONNULL_PTR a, const struct LDKOutputSpendStatus *NONNULL_PTR b); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OutputSpendStatus_eq")] public static extern bool OutputSpendStatus_eq(long _a, long _b); + // struct LDKCVec_u8Z OutputSpendStatus_write(const struct LDKOutputSpendStatus *NONNULL_PTR obj); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OutputSpendStatus_write")] public static extern long OutputSpendStatus_write(long _obj); + // struct LDKCResult_OutputSpendStatusDecodeErrorZ OutputSpendStatus_read(struct LDKu8slice ser); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OutputSpendStatus_read")] public static extern long OutputSpendStatus_read(long _ser); + // void OutputSweeper_free(struct LDKOutputSweeper this_obj); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OutputSweeper_free")] public static extern void OutputSweeper_free(long _this_obj); + // MUST_USE_RES struct LDKOutputSweeper OutputSweeper_new(struct LDKBestBlock best_block, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKCOption_FilterZ chain_data_source, struct LDKOutputSpender output_spender, struct LDKChangeDestinationSource change_destination_source, struct LDKKVStore kv_store, struct LDKLogger logger); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OutputSweeper_new")] public static extern long OutputSweeper_new(long _best_block, long _broadcaster, long _fee_estimator, long _chain_data_source, long _output_spender, long _change_destination_source, long _kv_store, long _logger); + // MUST_USE_RES struct LDKCResult_NoneNoneZ OutputSweeper_track_spendable_outputs(const struct LDKOutputSweeper *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ output_descriptors, struct LDKChannelId channel_id, bool exclude_static_outputs, struct LDKCOption_u32Z delay_until_height); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OutputSweeper_track_spendable_outputs")] public static extern long OutputSweeper_track_spendable_outputs(long _this_arg, long _output_descriptors, long _channel_id, bool _exclude_static_outputs, long _delay_until_height); + // MUST_USE_RES struct LDKCVec_TrackedSpendableOutputZ OutputSweeper_tracked_spendable_outputs(const struct LDKOutputSweeper *NONNULL_PTR this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OutputSweeper_tracked_spendable_outputs")] public static extern long OutputSweeper_tracked_spendable_outputs(long _this_arg); + // MUST_USE_RES struct LDKBestBlock OutputSweeper_current_best_block(const struct LDKOutputSweeper *NONNULL_PTR this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OutputSweeper_current_best_block")] public static extern long OutputSweeper_current_best_block(long _this_arg); + // struct LDKListen OutputSweeper_as_Listen(const struct LDKOutputSweeper *NONNULL_PTR this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OutputSweeper_as_Listen")] public static extern long OutputSweeper_as_Listen(long _this_arg); + // struct LDKConfirm OutputSweeper_as_Confirm(const struct LDKOutputSweeper *NONNULL_PTR this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OutputSweeper_as_Confirm")] public static extern long OutputSweeper_as_Confirm(long _this_arg); + // void SpendingDelay_free(struct LDKSpendingDelay this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SpendingDelay_free")] public static extern void SpendingDelay_free(long _this_ptr); + // uint64_t SpendingDelay_clone_ptr(LDKSpendingDelay *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SpendingDelay_clone_ptr")] public static extern long SpendingDelay_clone_ptr(long _arg); + // struct LDKSpendingDelay SpendingDelay_clone(const struct LDKSpendingDelay *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SpendingDelay_clone")] public static extern long SpendingDelay_clone(long _orig); + // struct LDKSpendingDelay SpendingDelay_relative(uint32_t num_blocks); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SpendingDelay_relative")] public static extern long SpendingDelay_relative(int _num_blocks); + // struct LDKSpendingDelay SpendingDelay_absolute(uint32_t height); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SpendingDelay_absolute")] public static extern long SpendingDelay_absolute(int _height); + // struct LDKCResult_OutputSweeperDecodeErrorZ OutputSweeper_read(struct LDKu8slice ser, struct LDKBroadcasterInterface arg_a, struct LDKFeeEstimator arg_b, struct LDKCOption_FilterZ arg_c, struct LDKOutputSpender arg_d, struct LDKChangeDestinationSource arg_e, struct LDKKVStore arg_f, struct LDKLogger arg_g); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OutputSweeper_read")] public static extern long OutputSweeper_read(long _ser, long _arg_a, long _arg_b, long _arg_c, long _arg_d, long _arg_e, long _arg_f, long _arg_g); + // struct LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ C2Tuple_BestBlockOutputSweeperZ_read(struct LDKu8slice ser, struct LDKBroadcasterInterface arg_a, struct LDKFeeEstimator arg_b, struct LDKCOption_FilterZ arg_c, struct LDKOutputSpender arg_d, struct LDKChangeDestinationSource arg_e, struct LDKKVStore arg_f, struct LDKLogger arg_g); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_BestBlockOutputSweeperZ_read")] public static extern long C2Tuple_BestBlockOutputSweeperZ_read(long _ser, long _arg_a, long _arg_b, long _arg_c, long _arg_d, long _arg_e, long _arg_f, long _arg_g); // void FutureCallback_free(struct LDKFutureCallback this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_FutureCallback_free")] public static extern void FutureCallback_free(long _this_ptr); // void Future_free(struct LDKFuture this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Future_free")] public static extern void Future_free(long _this_obj); - // uint64_t Future_clone_ptr(LDKFuture *NONNULL_PTR arg); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Future_clone_ptr")] public static extern long Future_clone_ptr(long _arg); - // struct LDKFuture Future_clone(const struct LDKFuture *NONNULL_PTR orig); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Future_clone")] public static extern long Future_clone(long _orig); // void Future_register_callback_fn(const struct LDKFuture *NONNULL_PTR this_arg, struct LDKFutureCallback callback); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Future_register_callback_fn")] public static extern void Future_register_callback_fn(long _this_arg, long _callback); - // void Future_wait(struct LDKFuture this_arg); + // void Future_wait(const struct LDKFuture *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Future_wait")] public static extern void Future_wait(long _this_arg); - // MUST_USE_RES bool Future_wait_timeout(struct LDKFuture this_arg, uint64_t max_wait); + // MUST_USE_RES bool Future_wait_timeout(const struct LDKFuture *NONNULL_PTR this_arg, uint64_t max_wait); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Future_wait_timeout")] public static extern bool Future_wait_timeout(long _this_arg, long _max_wait); // void Sleeper_free(struct LDKSleeper this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Sleeper_free")] public static extern void Sleeper_free(long _this_obj); - // MUST_USE_RES struct LDKSleeper Sleeper_from_single_future(struct LDKFuture future); + // MUST_USE_RES struct LDKSleeper Sleeper_from_single_future(const struct LDKFuture *NONNULL_PTR future); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Sleeper_from_single_future")] public static extern long Sleeper_from_single_future(long _future); - // MUST_USE_RES struct LDKSleeper Sleeper_from_two_futures(struct LDKFuture fut_a, struct LDKFuture fut_b); + // MUST_USE_RES struct LDKSleeper Sleeper_from_two_futures(const struct LDKFuture *NONNULL_PTR fut_a, const struct LDKFuture *NONNULL_PTR fut_b); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Sleeper_from_two_futures")] public static extern long Sleeper_from_two_futures(long _fut_a, long _fut_b); // MUST_USE_RES struct LDKSleeper Sleeper_new(struct LDKCVec_FutureZ futures); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Sleeper_new")] public static extern long Sleeper_new(long _futures); @@ -6144,9 +6860,9 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Record_get_peer_id")] public static extern long Record_get_peer_id(long _this_ptr); // void Record_set_peer_id(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKPublicKey val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Record_set_peer_id")] public static extern void Record_set_peer_id(long _this_ptr, long _val); - // struct LDKCOption_ThirtyTwoBytesZ Record_get_channel_id(const struct LDKRecord *NONNULL_PTR this_ptr); + // struct LDKChannelId Record_get_channel_id(const struct LDKRecord *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Record_get_channel_id")] public static extern long Record_get_channel_id(long _this_ptr); - // void Record_set_channel_id(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKCOption_ThirtyTwoBytesZ val); + // void Record_set_channel_id(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKChannelId val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Record_set_channel_id")] public static extern void Record_set_channel_id(long _this_ptr, long _val); // struct LDKStr Record_get_args(const struct LDKRecord *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Record_get_args")] public static extern long Record_get_args(long _this_ptr); @@ -6164,7 +6880,7 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Record_get_line")] public static extern int Record_get_line(long _this_ptr); // void Record_set_line(struct LDKRecord *NONNULL_PTR this_ptr, uint32_t val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Record_set_line")] public static extern void Record_set_line(long _this_ptr, int _val); - // MUST_USE_RES struct LDKRecord Record_new(enum LDKLevel level_arg, struct LDKPublicKey peer_id_arg, struct LDKCOption_ThirtyTwoBytesZ channel_id_arg, struct LDKStr args_arg, struct LDKStr module_path_arg, struct LDKStr file_arg, uint32_t line_arg); + // MUST_USE_RES struct LDKRecord Record_new(enum LDKLevel level_arg, struct LDKPublicKey peer_id_arg, struct LDKChannelId channel_id_arg, struct LDKStr args_arg, struct LDKStr module_path_arg, struct LDKStr file_arg, uint32_t line_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Record_new")] public static extern long Record_new(Level _level_arg, long _peer_id_arg, long _channel_id_arg, long _args_arg, long _module_path_arg, long _file_arg, int _line_arg); // uint64_t Record_clone_ptr(LDKRecord *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Record_clone_ptr")] public static extern long Record_clone_ptr(long _arg); @@ -6400,20 +7116,30 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UserConfig_default")] public static extern long UserConfig_default(); // void BestBlock_free(struct LDKBestBlock this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BestBlock_free")] public static extern void BestBlock_free(long _this_obj); + // const uint8_t (*BestBlock_get_block_hash(const struct LDKBestBlock *NONNULL_PTR this_ptr))[32]; + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BestBlock_get_block_hash")] public static extern long BestBlock_get_block_hash(long _this_ptr); + // void BestBlock_set_block_hash(struct LDKBestBlock *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BestBlock_set_block_hash")] public static extern void BestBlock_set_block_hash(long _this_ptr, long _val); + // uint32_t BestBlock_get_height(const struct LDKBestBlock *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BestBlock_get_height")] public static extern int BestBlock_get_height(long _this_ptr); + // void BestBlock_set_height(struct LDKBestBlock *NONNULL_PTR this_ptr, uint32_t val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BestBlock_set_height")] public static extern void BestBlock_set_height(long _this_ptr, int _val); + // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash_arg, uint32_t height_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BestBlock_new")] public static extern long BestBlock_new(long _block_hash_arg, int _height_arg); // uint64_t BestBlock_clone_ptr(LDKBestBlock *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BestBlock_clone_ptr")] public static extern long BestBlock_clone_ptr(long _arg); // struct LDKBestBlock BestBlock_clone(const struct LDKBestBlock *NONNULL_PTR orig); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BestBlock_clone")] public static extern long BestBlock_clone(long _orig); + // uint64_t BestBlock_hash(const struct LDKBestBlock *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BestBlock_hash")] public static extern long BestBlock_hash(long _o); // bool BestBlock_eq(const struct LDKBestBlock *NONNULL_PTR a, const struct LDKBestBlock *NONNULL_PTR b); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BestBlock_eq")] public static extern bool BestBlock_eq(long _a, long _b); // MUST_USE_RES struct LDKBestBlock BestBlock_from_network(enum LDKNetwork network); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BestBlock_from_network")] public static extern long BestBlock_from_network(Network _network); - // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash, uint32_t height); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BestBlock_new")] public static extern long BestBlock_new(long _block_hash, int _height); - // MUST_USE_RES struct LDKThirtyTwoBytes BestBlock_block_hash(const struct LDKBestBlock *NONNULL_PTR this_arg); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BestBlock_block_hash")] public static extern long BestBlock_block_hash(long _this_arg); - // MUST_USE_RES uint32_t BestBlock_height(const struct LDKBestBlock *NONNULL_PTR this_arg); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BestBlock_height")] public static extern int BestBlock_height(long _this_arg); + // struct LDKCVec_u8Z BestBlock_write(const struct LDKBestBlock *NONNULL_PTR obj); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BestBlock_write")] public static extern long BestBlock_write(long _obj); + // struct LDKCResult_BestBlockDecodeErrorZ BestBlock_read(struct LDKu8slice ser); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BestBlock_read")] public static extern long BestBlock_read(long _ser); // void Listen_free(struct LDKListen this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Listen_free")] public static extern void Listen_free(long _this_ptr); // void Confirm_free(struct LDKConfirm this_ptr); @@ -6472,6 +7198,8 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ConfirmationTarget_non_anchor_channel_fee")] public static extern ConfirmationTarget ConfirmationTarget_non_anchor_channel_fee(); // enum LDKConfirmationTarget ConfirmationTarget_channel_close_minimum(void); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ConfirmationTarget_channel_close_minimum")] public static extern ConfirmationTarget ConfirmationTarget_channel_close_minimum(); + // enum LDKConfirmationTarget ConfirmationTarget_output_spending_fee(void); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ConfirmationTarget_output_spending_fee")] public static extern ConfirmationTarget ConfirmationTarget_output_spending_fee(); // uint64_t ConfirmationTarget_hash(const enum LDKConfirmationTarget *NONNULL_PTR o); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ConfirmationTarget_hash")] public static extern long ConfirmationTarget_hash(long _o); // bool ConfirmationTarget_eq(const enum LDKConfirmationTarget *NONNULL_PTR a, const enum LDKConfirmationTarget *NONNULL_PTR b); @@ -6500,7 +7228,7 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChainMonitor_get_claimable_balances")] public static extern long ChainMonitor_get_claimable_balances(long _this_arg, long _ignored_channels); // MUST_USE_RES struct LDKCResult_LockedChannelMonitorNoneZ ChainMonitor_get_monitor(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChainMonitor_get_monitor")] public static extern long ChainMonitor_get_monitor(long _this_arg, long _funding_txo); - // MUST_USE_RES struct LDKCVec_OutPointZ ChainMonitor_list_monitors(const struct LDKChainMonitor *NONNULL_PTR this_arg); + // MUST_USE_RES struct LDKCVec_C2Tuple_OutPointChannelIdZZ ChainMonitor_list_monitors(const struct LDKChainMonitor *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChainMonitor_list_monitors")] public static extern long ChainMonitor_list_monitors(long _this_arg); // MUST_USE_RES struct LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ ChainMonitor_list_pending_monitor_updates(const struct LDKChainMonitor *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChainMonitor_list_pending_monitor_updates")] public static extern long ChainMonitor_list_pending_monitor_updates(long _this_arg); @@ -6510,6 +7238,10 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChainMonitor_get_update_future")] public static extern long ChainMonitor_get_update_future(long _this_arg); // void ChainMonitor_rebroadcast_pending_claims(const struct LDKChainMonitor *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChainMonitor_rebroadcast_pending_claims")] public static extern void ChainMonitor_rebroadcast_pending_claims(long _this_arg); + // void ChainMonitor_signer_unblocked(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKOutPoint monitor_opt); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChainMonitor_signer_unblocked")] public static extern void ChainMonitor_signer_unblocked(long _this_arg, long _monitor_opt); + // void ChainMonitor_archive_fully_resolved_channel_monitors(const struct LDKChainMonitor *NONNULL_PTR this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChainMonitor_archive_fully_resolved_channel_monitors")] public static extern void ChainMonitor_archive_fully_resolved_channel_monitors(long _this_arg); // struct LDKListen ChainMonitor_as_Listen(const struct LDKChainMonitor *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChainMonitor_as_Listen")] public static extern long ChainMonitor_as_Listen(long _this_arg); // struct LDKConfirm ChainMonitor_as_Confirm(const struct LDKChainMonitor *NONNULL_PTR this_arg); @@ -6524,6 +7256,10 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMonitorUpdate_get_update_id")] public static extern long ChannelMonitorUpdate_get_update_id(long _this_ptr); // void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, uint64_t val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMonitorUpdate_set_update_id")] public static extern void ChannelMonitorUpdate_set_update_id(long _this_ptr, long _val); + // struct LDKChannelId ChannelMonitorUpdate_get_channel_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMonitorUpdate_get_channel_id")] public static extern long ChannelMonitorUpdate_get_channel_id(long _this_ptr); + // void ChannelMonitorUpdate_set_channel_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, struct LDKChannelId val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMonitorUpdate_set_channel_id")] public static extern void ChannelMonitorUpdate_set_channel_id(long _this_ptr, long _val); // uint64_t ChannelMonitorUpdate_clone_ptr(LDKChannelMonitorUpdate *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMonitorUpdate_clone_ptr")] public static extern long ChannelMonitorUpdate_clone_ptr(long _arg); // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig); @@ -6542,10 +7278,12 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_MonitorEvent_clone")] public static extern long MonitorEvent_clone(long _orig); // struct LDKMonitorEvent MonitorEvent_htlcevent(struct LDKHTLCUpdate a); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_MonitorEvent_htlcevent")] public static extern long MonitorEvent_htlcevent(long _a); + // struct LDKMonitorEvent MonitorEvent_holder_force_closed_with_info(struct LDKClosureReason reason, struct LDKOutPoint outpoint, struct LDKChannelId channel_id); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_MonitorEvent_holder_force_closed_with_info")] public static extern long MonitorEvent_holder_force_closed_with_info(long _reason, long _outpoint, long _channel_id); // struct LDKMonitorEvent MonitorEvent_holder_force_closed(struct LDKOutPoint a); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_MonitorEvent_holder_force_closed")] public static extern long MonitorEvent_holder_force_closed(long _a); - // struct LDKMonitorEvent MonitorEvent_completed(struct LDKOutPoint funding_txo, uint64_t monitor_update_id); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_MonitorEvent_completed")] public static extern long MonitorEvent_completed(long _funding_txo, long _monitor_update_id); + // struct LDKMonitorEvent MonitorEvent_completed(struct LDKOutPoint funding_txo, struct LDKChannelId channel_id, uint64_t monitor_update_id); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_MonitorEvent_completed")] public static extern long MonitorEvent_completed(long _funding_txo, long _channel_id, long _monitor_update_id); // bool MonitorEvent_eq(const struct LDKMonitorEvent *NONNULL_PTR a, const struct LDKMonitorEvent *NONNULL_PTR b); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_MonitorEvent_eq")] public static extern bool MonitorEvent_eq(long _a, long _b); // struct LDKCVec_u8Z MonitorEvent_write(const struct LDKMonitorEvent *NONNULL_PTR obj); @@ -6600,6 +7338,8 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMonitor_get_latest_update_id")] public static extern long ChannelMonitor_get_latest_update_id(long _this_arg); // MUST_USE_RES struct LDKC2Tuple_OutPointCVec_u8ZZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMonitor_get_funding_txo")] public static extern long ChannelMonitor_get_funding_txo(long _this_arg); + // MUST_USE_RES struct LDKChannelId ChannelMonitor_channel_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMonitor_channel_id")] public static extern long ChannelMonitor_channel_id(long _this_arg); // MUST_USE_RES struct LDKCVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZZ ChannelMonitor_get_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMonitor_get_outputs_to_watch")] public static extern long ChannelMonitor_get_outputs_to_watch(long _this_arg); // void ChannelMonitor_load_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKFilter *NONNULL_PTR filter, const struct LDKLogger *NONNULL_PTR logger); @@ -6616,8 +7356,8 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMonitor_sign_to_local_justice_tx")] public static extern long ChannelMonitor_sign_to_local_justice_tx(long _this_arg, long _justice_tx, long _input_idx, long _value, long _commitment_number); // MUST_USE_RES struct LDKPublicKey ChannelMonitor_get_counterparty_node_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMonitor_get_counterparty_node_id")] public static extern long ChannelMonitor_get_counterparty_node_id(long _this_arg); - // MUST_USE_RES struct LDKCVec_TransactionZ ChannelMonitor_get_latest_holder_commitment_txn(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKLogger *NONNULL_PTR logger); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMonitor_get_latest_holder_commitment_txn")] public static extern long ChannelMonitor_get_latest_holder_commitment_txn(long _this_arg, long _logger); + // void ChannelMonitor_broadcast_latest_holder_commitment_txn(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKBroadcasterInterface *NONNULL_PTR broadcaster, const struct LDKFeeEstimator *NONNULL_PTR fee_estimator, const struct LDKLogger *NONNULL_PTR logger); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMonitor_broadcast_latest_holder_commitment_txn")] public static extern void ChannelMonitor_broadcast_latest_holder_commitment_txn(long _this_arg, long _broadcaster, long _fee_estimator, long _logger); // MUST_USE_RES struct LDKCVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZZ ChannelMonitor_block_connected(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, const struct LDKLogger *NONNULL_PTR logger); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMonitor_block_connected")] public static extern long ChannelMonitor_block_connected(long _this_arg, long _header, long _txdata, int _height, long _broadcaster, long _fee_estimator, long _logger); // void ChannelMonitor_block_disconnected(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, const struct LDKLogger *NONNULL_PTR logger); @@ -6634,8 +7374,12 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMonitor_current_best_block")] public static extern long ChannelMonitor_current_best_block(long _this_arg); // void ChannelMonitor_rebroadcast_pending_claims(const struct LDKChannelMonitor *NONNULL_PTR this_arg, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, const struct LDKLogger *NONNULL_PTR logger); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMonitor_rebroadcast_pending_claims")] public static extern void ChannelMonitor_rebroadcast_pending_claims(long _this_arg, long _broadcaster, long _fee_estimator, long _logger); + // void ChannelMonitor_signer_unblocked(const struct LDKChannelMonitor *NONNULL_PTR this_arg, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, const struct LDKLogger *NONNULL_PTR logger); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMonitor_signer_unblocked")] public static extern void ChannelMonitor_signer_unblocked(long _this_arg, long _broadcaster, long _fee_estimator, long _logger); // MUST_USE_RES struct LDKCVec_SpendableOutputDescriptorZ ChannelMonitor_get_spendable_outputs(const struct LDKChannelMonitor *NONNULL_PTR this_arg, struct LDKTransaction tx, uint32_t confirmation_height); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMonitor_get_spendable_outputs")] public static extern long ChannelMonitor_get_spendable_outputs(long _this_arg, long _tx, int _confirmation_height); + // MUST_USE_RES bool ChannelMonitor_is_fully_resolved(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKLogger *NONNULL_PTR logger); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMonitor_is_fully_resolved")] public static extern bool ChannelMonitor_is_fully_resolved(long _this_arg, long _logger); // MUST_USE_RES struct LDKCVec_BalanceZ ChannelMonitor_get_claimable_balances(const struct LDKChannelMonitor *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMonitor_get_claimable_balances")] public static extern long ChannelMonitor_get_claimable_balances(long _this_arg); // struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ C2Tuple_ThirtyTwoBytesChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKEntropySource *NONNULL_PTR arg_a, const struct LDKSignerProvider *NONNULL_PTR arg_b); @@ -6660,8 +7404,6 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OutPoint_eq")] public static extern bool OutPoint_eq(long _a, long _b); // uint64_t OutPoint_hash(const struct LDKOutPoint *NONNULL_PTR o); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OutPoint_hash")] public static extern long OutPoint_hash(long _o); - // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OutPoint_to_channel_id")] public static extern long OutPoint_to_channel_id(long _this_arg); // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OutPoint_write")] public static extern long OutPoint_write(long _obj); // struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser); @@ -6682,6 +7424,14 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InboundHTLCErr_set_msg")] public static extern void InboundHTLCErr_set_msg(long _this_ptr, long _val); // MUST_USE_RES struct LDKInboundHTLCErr InboundHTLCErr_new(uint16_t err_code_arg, struct LDKCVec_u8Z err_data_arg, struct LDKStr msg_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InboundHTLCErr_new")] public static extern long InboundHTLCErr_new(short _err_code_arg, long _err_data_arg, long _msg_arg); + // uint64_t InboundHTLCErr_clone_ptr(LDKInboundHTLCErr *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InboundHTLCErr_clone_ptr")] public static extern long InboundHTLCErr_clone_ptr(long _arg); + // struct LDKInboundHTLCErr InboundHTLCErr_clone(const struct LDKInboundHTLCErr *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InboundHTLCErr_clone")] public static extern long InboundHTLCErr_clone(long _orig); + // uint64_t InboundHTLCErr_hash(const struct LDKInboundHTLCErr *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InboundHTLCErr_hash")] public static extern long InboundHTLCErr_hash(long _o); + // bool InboundHTLCErr_eq(const struct LDKInboundHTLCErr *NONNULL_PTR a, const struct LDKInboundHTLCErr *NONNULL_PTR b); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InboundHTLCErr_eq")] public static extern bool InboundHTLCErr_eq(long _a, long _b); // struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ peel_payment_onion(const struct LDKUpdateAddHTLC *NONNULL_PTR msg, const struct LDKNodeSigner *NONNULL_PTR node_signer, const struct LDKLogger *NONNULL_PTR logger, uint32_t cur_height, bool accept_mpp_keysend, bool allow_skimmed_fees); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_peel_payment_onion")] public static extern long peel_payment_onion(long _msg, long _node_signer, long _logger, int _cur_height, bool _accept_mpp_keysend, bool _allow_skimmed_fees); // void PendingHTLCRouting_free(struct LDKPendingHTLCRouting this_ptr); @@ -6692,10 +7442,10 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PendingHTLCRouting_clone")] public static extern long PendingHTLCRouting_clone(long _orig); // struct LDKPendingHTLCRouting PendingHTLCRouting_forward(struct LDKOnionPacket onion_packet, uint64_t short_channel_id, struct LDKBlindedForward blinded); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PendingHTLCRouting_forward")] public static extern long PendingHTLCRouting_forward(long _onion_packet, long _short_channel_id, long _blinded); - // struct LDKPendingHTLCRouting PendingHTLCRouting_receive(struct LDKFinalOnionHopData payment_data, struct LDKCOption_CVec_u8ZZ payment_metadata, uint32_t incoming_cltv_expiry, struct LDKThirtyTwoBytes phantom_shared_secret, struct LDKCVec_C2Tuple_u64CVec_u8ZZZ custom_tlvs, bool requires_blinded_error); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PendingHTLCRouting_receive")] public static extern long PendingHTLCRouting_receive(long _payment_data, long _payment_metadata, int _incoming_cltv_expiry, long _phantom_shared_secret, long _custom_tlvs, bool _requires_blinded_error); - // struct LDKPendingHTLCRouting PendingHTLCRouting_receive_keysend(struct LDKFinalOnionHopData payment_data, struct LDKThirtyTwoBytes payment_preimage, struct LDKCOption_CVec_u8ZZ payment_metadata, uint32_t incoming_cltv_expiry, struct LDKCVec_C2Tuple_u64CVec_u8ZZZ custom_tlvs); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PendingHTLCRouting_receive_keysend")] public static extern long PendingHTLCRouting_receive_keysend(long _payment_data, long _payment_preimage, long _payment_metadata, int _incoming_cltv_expiry, long _custom_tlvs); + // struct LDKPendingHTLCRouting PendingHTLCRouting_receive(struct LDKFinalOnionHopData payment_data, struct LDKCOption_CVec_u8ZZ payment_metadata, struct LDKCOption_PaymentContextZ payment_context, uint32_t incoming_cltv_expiry, struct LDKThirtyTwoBytes phantom_shared_secret, struct LDKCVec_C2Tuple_u64CVec_u8ZZZ custom_tlvs, bool requires_blinded_error); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PendingHTLCRouting_receive")] public static extern long PendingHTLCRouting_receive(long _payment_data, long _payment_metadata, long _payment_context, int _incoming_cltv_expiry, long _phantom_shared_secret, long _custom_tlvs, bool _requires_blinded_error); + // struct LDKPendingHTLCRouting PendingHTLCRouting_receive_keysend(struct LDKFinalOnionHopData payment_data, struct LDKThirtyTwoBytes payment_preimage, struct LDKCOption_CVec_u8ZZ payment_metadata, uint32_t incoming_cltv_expiry, struct LDKCVec_C2Tuple_u64CVec_u8ZZZ custom_tlvs, bool requires_blinded_error); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PendingHTLCRouting_receive_keysend")] public static extern long PendingHTLCRouting_receive_keysend(long _payment_data, long _payment_preimage, long _payment_metadata, int _incoming_cltv_expiry, long _custom_tlvs, bool _requires_blinded_error); // void BlindedForward_free(struct LDKBlindedForward this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BlindedForward_free")] public static extern void BlindedForward_free(long _this_obj); // struct LDKPublicKey BlindedForward_get_inbound_blinding_point(const struct LDKBlindedForward *NONNULL_PTR this_ptr); @@ -6848,9 +7598,9 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelCounterparty_clone")] public static extern long ChannelCounterparty_clone(long _orig); // void ChannelDetails_free(struct LDKChannelDetails this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelDetails_free")] public static extern void ChannelDetails_free(long _this_obj); - // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelDetails_get_channel_id")] public static extern long ChannelDetails_get_channel_id(long _this_ptr); - // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKChannelId val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelDetails_set_channel_id")] public static extern void ChannelDetails_set_channel_id(long _this_ptr, long _val); // struct LDKChannelCounterparty ChannelDetails_get_counterparty(const struct LDKChannelDetails *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelDetails_get_counterparty")] public static extern long ChannelDetails_get_counterparty(long _this_ptr); @@ -6956,8 +7706,6 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelDetails_get_config")] public static extern long ChannelDetails_get_config(long _this_ptr); // void ChannelDetails_set_config(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKChannelConfig val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelDetails_set_config")] public static extern void ChannelDetails_set_config(long _this_ptr, long _val); - // MUST_USE_RES struct LDKChannelDetails ChannelDetails_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKChannelCounterparty counterparty_arg, struct LDKOutPoint funding_txo_arg, struct LDKChannelTypeFeatures channel_type_arg, struct LDKCOption_u64Z short_channel_id_arg, struct LDKCOption_u64Z outbound_scid_alias_arg, struct LDKCOption_u64Z inbound_scid_alias_arg, uint64_t channel_value_satoshis_arg, struct LDKCOption_u64Z unspendable_punishment_reserve_arg, struct LDKU128 user_channel_id_arg, struct LDKCOption_u32Z feerate_sat_per_1000_weight_arg, uint64_t balance_msat_arg, uint64_t outbound_capacity_msat_arg, uint64_t next_outbound_htlc_limit_msat_arg, uint64_t next_outbound_htlc_minimum_msat_arg, uint64_t inbound_capacity_msat_arg, struct LDKCOption_u32Z confirmations_required_arg, struct LDKCOption_u32Z confirmations_arg, struct LDKCOption_u16Z force_close_spend_delay_arg, bool is_outbound_arg, bool is_channel_ready_arg, struct LDKCOption_ChannelShutdownStateZ channel_shutdown_state_arg, bool is_usable_arg, bool is_public_arg, struct LDKCOption_u64Z inbound_htlc_minimum_msat_arg, struct LDKCOption_u64Z inbound_htlc_maximum_msat_arg, struct LDKChannelConfig config_arg); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelDetails_new")] public static extern long ChannelDetails_new(long _channel_id_arg, long _counterparty_arg, long _funding_txo_arg, long _channel_type_arg, long _short_channel_id_arg, long _outbound_scid_alias_arg, long _inbound_scid_alias_arg, long _channel_value_satoshis_arg, long _unspendable_punishment_reserve_arg, long _user_channel_id_arg, long _feerate_sat_per_1000_weight_arg, long _balance_msat_arg, long _outbound_capacity_msat_arg, long _next_outbound_htlc_limit_msat_arg, long _next_outbound_htlc_minimum_msat_arg, long _inbound_capacity_msat_arg, long _confirmations_required_arg, long _confirmations_arg, long _force_close_spend_delay_arg, bool _is_outbound_arg, bool _is_channel_ready_arg, long _channel_shutdown_state_arg, bool _is_usable_arg, bool _is_public_arg, long _inbound_htlc_minimum_msat_arg, long _inbound_htlc_maximum_msat_arg, long _config_arg); // uint64_t ChannelDetails_clone_ptr(LDKChannelDetails *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelDetails_clone_ptr")] public static extern long ChannelDetails_clone_ptr(long _arg); // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig); @@ -7018,7 +7766,7 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_new")] public static extern long ChannelManager_new(long _fee_est, long _chain_monitor, long _tx_broadcaster, long _router, long _logger, long _entropy_source, long _node_signer, long _signer_provider, long _config, long _params, int _current_timestamp); // MUST_USE_RES struct LDKUserConfig ChannelManager_get_current_default_configuration(const struct LDKChannelManager *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_get_current_default_configuration")] public static extern long ChannelManager_get_current_default_configuration(long _this_arg); - // MUST_USE_RES struct LDKCResult_ThirtyTwoBytesAPIErrorZ ChannelManager_create_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey their_network_key, uint64_t channel_value_satoshis, uint64_t push_msat, struct LDKU128 user_channel_id, struct LDKCOption_ThirtyTwoBytesZ temporary_channel_id, struct LDKUserConfig override_config); + // MUST_USE_RES struct LDKCResult_ChannelIdAPIErrorZ ChannelManager_create_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey their_network_key, uint64_t channel_value_satoshis, uint64_t push_msat, struct LDKU128 user_channel_id, struct LDKChannelId temporary_channel_id, struct LDKUserConfig override_config); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_create_channel")] public static extern long ChannelManager_create_channel(long _this_arg, long _their_network_key, long _channel_value_satoshis, long _push_msat, long _user_channel_id, long _temporary_channel_id, long _override_config); // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const struct LDKChannelManager *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_list_channels")] public static extern long ChannelManager_list_channels(long _this_arg); @@ -7028,13 +7776,13 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_list_channels_with_counterparty")] public static extern long ChannelManager_list_channels_with_counterparty(long _this_arg, long _counterparty_node_id); // MUST_USE_RES struct LDKCVec_RecentPaymentDetailsZ ChannelManager_list_recent_payments(const struct LDKChannelManager *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_list_recent_payments")] public static extern long ChannelManager_list_recent_payments(long _this_arg); - // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32], struct LDKPublicKey counterparty_node_id); + // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR channel_id, struct LDKPublicKey counterparty_node_id); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_close_channel")] public static extern long ChannelManager_close_channel(long _this_arg, long _channel_id, long _counterparty_node_id); - // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel_with_feerate_and_script(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32], struct LDKPublicKey counterparty_node_id, struct LDKCOption_u32Z target_feerate_sats_per_1000_weight, struct LDKShutdownScript shutdown_script); + // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel_with_feerate_and_script(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR channel_id, struct LDKPublicKey counterparty_node_id, struct LDKCOption_u32Z target_feerate_sats_per_1000_weight, struct LDKShutdownScript shutdown_script); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_close_channel_with_feerate_and_script")] public static extern long ChannelManager_close_channel_with_feerate_and_script(long _this_arg, long _channel_id, long _counterparty_node_id, long _target_feerate_sats_per_1000_weight, long _shutdown_script); - // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_broadcasting_latest_txn(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32], struct LDKPublicKey counterparty_node_id); + // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_broadcasting_latest_txn(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR channel_id, struct LDKPublicKey counterparty_node_id); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_force_close_broadcasting_latest_txn")] public static extern long ChannelManager_force_close_broadcasting_latest_txn(long _this_arg, long _channel_id, long _counterparty_node_id); - // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_without_broadcasting_txn(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32], struct LDKPublicKey counterparty_node_id); + // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_without_broadcasting_txn(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR channel_id, struct LDKPublicKey counterparty_node_id); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_force_close_without_broadcasting_txn")] public static extern long ChannelManager_force_close_without_broadcasting_txn(long _this_arg, long _channel_id, long _counterparty_node_id); // void ChannelManager_force_close_all_channels_broadcasting_latest_txn(const struct LDKChannelManager *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_force_close_all_channels_broadcasting_latest_txn")] public static extern void ChannelManager_force_close_all_channels_broadcasting_latest_txn(long _this_arg); @@ -7056,15 +7804,15 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_send_spontaneous_preflight_probes")] public static extern long ChannelManager_send_spontaneous_preflight_probes(long _this_arg, long _node_id, long _amount_msat, int _final_cltv_expiry_delta, long _liquidity_limit_multiplier); // MUST_USE_RES struct LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ ChannelManager_send_preflight_probes(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKRouteParameters route_params, struct LDKCOption_u64Z liquidity_limit_multiplier); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_send_preflight_probes")] public static extern long ChannelManager_send_preflight_probes(long _this_arg, long _route_params, long _liquidity_limit_multiplier); - // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*temporary_channel_id)[32], struct LDKPublicKey counterparty_node_id, struct LDKTransaction funding_transaction); + // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR temporary_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKTransaction funding_transaction); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_funding_transaction_generated")] public static extern long ChannelManager_funding_transaction_generated(long _this_arg, long _temporary_channel_id, long _counterparty_node_id, long _funding_transaction); - // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_batch_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ temporary_channels, struct LDKTransaction funding_transaction); + // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_batch_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_ChannelIdPublicKeyZZ temporary_channels, struct LDKTransaction funding_transaction); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_batch_funding_transaction_generated")] public static extern long ChannelManager_batch_funding_transaction_generated(long _this_arg, long _temporary_channels, long _funding_transaction); - // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_update_partial_channel_config(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey counterparty_node_id, struct LDKCVec_ThirtyTwoBytesZ channel_ids, const struct LDKChannelConfigUpdate *NONNULL_PTR config_update); + // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_update_partial_channel_config(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey counterparty_node_id, struct LDKCVec_ChannelIdZ channel_ids, const struct LDKChannelConfigUpdate *NONNULL_PTR config_update); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_update_partial_channel_config")] public static extern long ChannelManager_update_partial_channel_config(long _this_arg, long _counterparty_node_id, long _channel_ids, long _config_update); - // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_update_channel_config(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey counterparty_node_id, struct LDKCVec_ThirtyTwoBytesZ channel_ids, const struct LDKChannelConfig *NONNULL_PTR config); + // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_update_channel_config(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey counterparty_node_id, struct LDKCVec_ChannelIdZ channel_ids, const struct LDKChannelConfig *NONNULL_PTR config); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_update_channel_config")] public static extern long ChannelManager_update_channel_config(long _this_arg, long _counterparty_node_id, long _channel_ids, long _config); - // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_forward_intercepted_htlc(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes intercept_id, const uint8_t (*next_hop_channel_id)[32], struct LDKPublicKey next_node_id, uint64_t amt_to_forward_msat); + // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_forward_intercepted_htlc(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes intercept_id, const struct LDKChannelId *NONNULL_PTR next_hop_channel_id, struct LDKPublicKey next_node_id, uint64_t amt_to_forward_msat); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_forward_intercepted_htlc")] public static extern long ChannelManager_forward_intercepted_htlc(long _this_arg, long _intercept_id, long _next_hop_channel_id, long _next_node_id, long _amt_to_forward_msat); // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_fail_intercepted_htlc(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes intercept_id); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_fail_intercepted_htlc")] public static extern long ChannelManager_fail_intercepted_htlc(long _this_arg, long _intercept_id); @@ -7082,13 +7830,17 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_claim_funds_with_known_custom_tlvs")] public static extern void ChannelManager_claim_funds_with_known_custom_tlvs(long _this_arg, long _payment_preimage); // MUST_USE_RES struct LDKPublicKey ChannelManager_get_our_node_id(const struct LDKChannelManager *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_get_our_node_id")] public static extern long ChannelManager_get_our_node_id(long _this_arg); - // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_accept_inbound_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*temporary_channel_id)[32], struct LDKPublicKey counterparty_node_id, struct LDKU128 user_channel_id); + // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_accept_inbound_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR temporary_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKU128 user_channel_id); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_accept_inbound_channel")] public static extern long ChannelManager_accept_inbound_channel(long _this_arg, long _temporary_channel_id, long _counterparty_node_id, long _user_channel_id); - // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*temporary_channel_id)[32], struct LDKPublicKey counterparty_node_id, struct LDKU128 user_channel_id); + // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR temporary_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKU128 user_channel_id); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_accept_inbound_channel_from_trusted_peer_0conf")] public static extern long ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(long _this_arg, long _temporary_channel_id, long _counterparty_node_id, long _user_channel_id); + // MUST_USE_RES struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ ChannelManager_create_offer_builder(const struct LDKChannelManager *NONNULL_PTR this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_create_offer_builder")] public static extern long ChannelManager_create_offer_builder(long _this_arg); + // MUST_USE_RES struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ ChannelManager_create_refund_builder(const struct LDKChannelManager *NONNULL_PTR this_arg, uint64_t amount_msats, uint64_t absolute_expiry, struct LDKThirtyTwoBytes payment_id, struct LDKRetry retry_strategy, struct LDKCOption_u64Z max_total_routing_fee_msat); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_create_refund_builder")] public static extern long ChannelManager_create_refund_builder(long _this_arg, long _amount_msats, long _absolute_expiry, long _payment_id, long _retry_strategy, long _max_total_routing_fee_msat); // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ ChannelManager_pay_for_offer(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKOffer *NONNULL_PTR offer, struct LDKCOption_u64Z quantity, struct LDKCOption_u64Z amount_msats, struct LDKCOption_StrZ payer_note, struct LDKThirtyTwoBytes payment_id, struct LDKRetry retry_strategy, struct LDKCOption_u64Z max_total_routing_fee_msat); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_pay_for_offer")] public static extern long ChannelManager_pay_for_offer(long _this_arg, long _offer, long _quantity, long _amount_msats, long _payer_note, long _payment_id, long _retry_strategy, long _max_total_routing_fee_msat); - // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ ChannelManager_request_refund_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRefund *NONNULL_PTR refund); + // MUST_USE_RES struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ ChannelManager_request_refund_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRefund *NONNULL_PTR refund); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_request_refund_payment")] public static extern long ChannelManager_request_refund_payment(long _this_arg, long _refund); // MUST_USE_RES struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ ChannelManager_create_inbound_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKCOption_u64Z min_value_msat, uint32_t invoice_expiry_delta_secs, struct LDKCOption_u16Z min_final_cltv_expiry_delta); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_create_inbound_payment")] public static extern long ChannelManager_create_inbound_payment(long _this_arg, long _min_value_msat, int _invoice_expiry_delta_secs, long _min_final_cltv_expiry_delta); @@ -7130,6 +7882,8 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_as_ChannelMessageHandler")] public static extern long ChannelManager_as_ChannelMessageHandler(long _this_arg); // struct LDKOffersMessageHandler ChannelManager_as_OffersMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_as_OffersMessageHandler")] public static extern long ChannelManager_as_OffersMessageHandler(long _this_arg); + // struct LDKNodeIdLookUp ChannelManager_as_NodeIdLookUp(const struct LDKChannelManager *NONNULL_PTR this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_as_NodeIdLookUp")] public static extern long ChannelManager_as_NodeIdLookUp(long _this_arg); // struct LDKInitFeatures provided_init_features(const struct LDKUserConfig *NONNULL_PTR config); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_provided_init_features")] public static extern long provided_init_features(long _config); // struct LDKCVec_u8Z CounterpartyForwardingInfo_write(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR obj); @@ -7230,6 +7984,8 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DelayedPaymentBasepoint_hash")] public static extern long DelayedPaymentBasepoint_hash(long _o); // MUST_USE_RES struct LDKPublicKey DelayedPaymentBasepoint_to_public_key(const struct LDKDelayedPaymentBasepoint *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DelayedPaymentBasepoint_to_public_key")] public static extern long DelayedPaymentBasepoint_to_public_key(long _this_arg); + // MUST_USE_RES struct LDKThirtyTwoBytes DelayedPaymentBasepoint_derive_add_tweak(const struct LDKDelayedPaymentBasepoint *NONNULL_PTR this_arg, struct LDKPublicKey per_commitment_point); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DelayedPaymentBasepoint_derive_add_tweak")] public static extern long DelayedPaymentBasepoint_derive_add_tweak(long _this_arg, long _per_commitment_point); // struct LDKCVec_u8Z DelayedPaymentBasepoint_write(const struct LDKDelayedPaymentBasepoint *NONNULL_PTR obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DelayedPaymentBasepoint_write")] public static extern long DelayedPaymentBasepoint_write(long _obj); // struct LDKCResult_DelayedPaymentBasepointDecodeErrorZ DelayedPaymentBasepoint_read(struct LDKu8slice ser); @@ -7276,6 +8032,8 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HtlcBasepoint_hash")] public static extern long HtlcBasepoint_hash(long _o); // MUST_USE_RES struct LDKPublicKey HtlcBasepoint_to_public_key(const struct LDKHtlcBasepoint *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HtlcBasepoint_to_public_key")] public static extern long HtlcBasepoint_to_public_key(long _this_arg); + // MUST_USE_RES struct LDKThirtyTwoBytes HtlcBasepoint_derive_add_tweak(const struct LDKHtlcBasepoint *NONNULL_PTR this_arg, struct LDKPublicKey per_commitment_point); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HtlcBasepoint_derive_add_tweak")] public static extern long HtlcBasepoint_derive_add_tweak(long _this_arg, long _per_commitment_point); // struct LDKCVec_u8Z HtlcBasepoint_write(const struct LDKHtlcBasepoint *NONNULL_PTR obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HtlcBasepoint_write")] public static extern long HtlcBasepoint_write(long _obj); // struct LDKCResult_HtlcBasepointDecodeErrorZ HtlcBasepoint_read(struct LDKu8slice ser); @@ -7304,6 +8062,8 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HtlcKey_write")] public static extern long HtlcKey_write(long _obj); // struct LDKCResult_HtlcKeyDecodeErrorZ HtlcKey_read(struct LDKu8slice ser); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HtlcKey_read")] public static extern long HtlcKey_read(long _ser); + // struct LDKPublicKey add_public_key_tweak(struct LDKPublicKey base_point, const uint8_t (*tweak)[32]); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_add_public_key_tweak")] public static extern long add_public_key_tweak(long _base_point, long _tweak); // void RevocationBasepoint_free(struct LDKRevocationBasepoint this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RevocationBasepoint_free")] public static extern void RevocationBasepoint_free(long _this_obj); // struct LDKPublicKey RevocationBasepoint_get_a(const struct LDKRevocationBasepoint *NONNULL_PTR this_ptr); @@ -7378,6 +8138,8 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DecodeError_io")] public static extern long DecodeError_io(IOError _a); // struct LDKDecodeError DecodeError_unsupported_compression(void); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DecodeError_unsupported_compression")] public static extern long DecodeError_unsupported_compression(); + // struct LDKDecodeError DecodeError_dangerous_value(void); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DecodeError_dangerous_value")] public static extern long DecodeError_dangerous_value(); // uint64_t DecodeError_hash(const struct LDKDecodeError *NONNULL_PTR o); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DecodeError_hash")] public static extern long DecodeError_hash(long _o); // bool DecodeError_eq(const struct LDKDecodeError *NONNULL_PTR a, const struct LDKDecodeError *NONNULL_PTR b); @@ -7408,15 +8170,15 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Init_eq")] public static extern bool Init_eq(long _a, long _b); // void ErrorMessage_free(struct LDKErrorMessage this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ErrorMessage_free")] public static extern void ErrorMessage_free(long _this_obj); - // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ErrorMessage_get_channel_id")] public static extern long ErrorMessage_get_channel_id(long _this_ptr); - // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKChannelId val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ErrorMessage_set_channel_id")] public static extern void ErrorMessage_set_channel_id(long _this_ptr, long _val); // struct LDKStr ErrorMessage_get_data(const struct LDKErrorMessage *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ErrorMessage_get_data")] public static extern long ErrorMessage_get_data(long _this_ptr); // void ErrorMessage_set_data(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKStr val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ErrorMessage_set_data")] public static extern void ErrorMessage_set_data(long _this_ptr, long _val); - // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKStr data_arg); + // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKChannelId channel_id_arg, struct LDKStr data_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ErrorMessage_new")] public static extern long ErrorMessage_new(long _channel_id_arg, long _data_arg); // uint64_t ErrorMessage_clone_ptr(LDKErrorMessage *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ErrorMessage_clone_ptr")] public static extern long ErrorMessage_clone_ptr(long _arg); @@ -7428,15 +8190,15 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ErrorMessage_eq")] public static extern bool ErrorMessage_eq(long _a, long _b); // void WarningMessage_free(struct LDKWarningMessage this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_WarningMessage_free")] public static extern void WarningMessage_free(long _this_obj); - // const uint8_t (*WarningMessage_get_channel_id(const struct LDKWarningMessage *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId WarningMessage_get_channel_id(const struct LDKWarningMessage *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_WarningMessage_get_channel_id")] public static extern long WarningMessage_get_channel_id(long _this_ptr); - // void WarningMessage_set_channel_id(struct LDKWarningMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void WarningMessage_set_channel_id(struct LDKWarningMessage *NONNULL_PTR this_ptr, struct LDKChannelId val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_WarningMessage_set_channel_id")] public static extern void WarningMessage_set_channel_id(long _this_ptr, long _val); // struct LDKStr WarningMessage_get_data(const struct LDKWarningMessage *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_WarningMessage_get_data")] public static extern long WarningMessage_get_data(long _this_ptr); // void WarningMessage_set_data(struct LDKWarningMessage *NONNULL_PTR this_ptr, struct LDKStr val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_WarningMessage_set_data")] public static extern void WarningMessage_set_data(long _this_ptr, long _val); - // MUST_USE_RES struct LDKWarningMessage WarningMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKStr data_arg); + // MUST_USE_RES struct LDKWarningMessage WarningMessage_new(struct LDKChannelId channel_id_arg, struct LDKStr data_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_WarningMessage_new")] public static extern long WarningMessage_new(long _channel_id_arg, long _data_arg); // uint64_t WarningMessage_clone_ptr(LDKWarningMessage *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_WarningMessage_clone_ptr")] public static extern long WarningMessage_clone_ptr(long _arg); @@ -7482,90 +8244,106 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Pong_hash")] public static extern long Pong_hash(long _o); // bool Pong_eq(const struct LDKPong *NONNULL_PTR a, const struct LDKPong *NONNULL_PTR b); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Pong_eq")] public static extern bool Pong_eq(long _a, long _b); + // void CommonOpenChannelFields_free(struct LDKCommonOpenChannelFields this_obj); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_free")] public static extern void CommonOpenChannelFields_free(long _this_obj); + // const uint8_t (*CommonOpenChannelFields_get_chain_hash(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr))[32]; + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_get_chain_hash")] public static extern long CommonOpenChannelFields_get_chain_hash(long _this_ptr); + // void CommonOpenChannelFields_set_chain_hash(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_set_chain_hash")] public static extern void CommonOpenChannelFields_set_chain_hash(long _this_ptr, long _val); + // struct LDKChannelId CommonOpenChannelFields_get_temporary_channel_id(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_get_temporary_channel_id")] public static extern long CommonOpenChannelFields_get_temporary_channel_id(long _this_ptr); + // void CommonOpenChannelFields_set_temporary_channel_id(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKChannelId val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_set_temporary_channel_id")] public static extern void CommonOpenChannelFields_set_temporary_channel_id(long _this_ptr, long _val); + // uint64_t CommonOpenChannelFields_get_funding_satoshis(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_get_funding_satoshis")] public static extern long CommonOpenChannelFields_get_funding_satoshis(long _this_ptr); + // void CommonOpenChannelFields_set_funding_satoshis(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint64_t val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_set_funding_satoshis")] public static extern void CommonOpenChannelFields_set_funding_satoshis(long _this_ptr, long _val); + // uint64_t CommonOpenChannelFields_get_dust_limit_satoshis(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_get_dust_limit_satoshis")] public static extern long CommonOpenChannelFields_get_dust_limit_satoshis(long _this_ptr); + // void CommonOpenChannelFields_set_dust_limit_satoshis(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint64_t val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_set_dust_limit_satoshis")] public static extern void CommonOpenChannelFields_set_dust_limit_satoshis(long _this_ptr, long _val); + // uint64_t CommonOpenChannelFields_get_max_htlc_value_in_flight_msat(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_get_max_htlc_value_in_flight_msat")] public static extern long CommonOpenChannelFields_get_max_htlc_value_in_flight_msat(long _this_ptr); + // void CommonOpenChannelFields_set_max_htlc_value_in_flight_msat(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint64_t val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_set_max_htlc_value_in_flight_msat")] public static extern void CommonOpenChannelFields_set_max_htlc_value_in_flight_msat(long _this_ptr, long _val); + // uint64_t CommonOpenChannelFields_get_htlc_minimum_msat(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_get_htlc_minimum_msat")] public static extern long CommonOpenChannelFields_get_htlc_minimum_msat(long _this_ptr); + // void CommonOpenChannelFields_set_htlc_minimum_msat(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint64_t val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_set_htlc_minimum_msat")] public static extern void CommonOpenChannelFields_set_htlc_minimum_msat(long _this_ptr, long _val); + // uint32_t CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight")] public static extern int CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight(long _this_ptr); + // void CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint32_t val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight")] public static extern void CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight(long _this_ptr, int _val); + // uint16_t CommonOpenChannelFields_get_to_self_delay(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_get_to_self_delay")] public static extern short CommonOpenChannelFields_get_to_self_delay(long _this_ptr); + // void CommonOpenChannelFields_set_to_self_delay(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint16_t val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_set_to_self_delay")] public static extern void CommonOpenChannelFields_set_to_self_delay(long _this_ptr, short _val); + // uint16_t CommonOpenChannelFields_get_max_accepted_htlcs(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_get_max_accepted_htlcs")] public static extern short CommonOpenChannelFields_get_max_accepted_htlcs(long _this_ptr); + // void CommonOpenChannelFields_set_max_accepted_htlcs(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint16_t val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_set_max_accepted_htlcs")] public static extern void CommonOpenChannelFields_set_max_accepted_htlcs(long _this_ptr, short _val); + // struct LDKPublicKey CommonOpenChannelFields_get_funding_pubkey(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_get_funding_pubkey")] public static extern long CommonOpenChannelFields_get_funding_pubkey(long _this_ptr); + // void CommonOpenChannelFields_set_funding_pubkey(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_set_funding_pubkey")] public static extern void CommonOpenChannelFields_set_funding_pubkey(long _this_ptr, long _val); + // struct LDKPublicKey CommonOpenChannelFields_get_revocation_basepoint(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_get_revocation_basepoint")] public static extern long CommonOpenChannelFields_get_revocation_basepoint(long _this_ptr); + // void CommonOpenChannelFields_set_revocation_basepoint(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_set_revocation_basepoint")] public static extern void CommonOpenChannelFields_set_revocation_basepoint(long _this_ptr, long _val); + // struct LDKPublicKey CommonOpenChannelFields_get_payment_basepoint(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_get_payment_basepoint")] public static extern long CommonOpenChannelFields_get_payment_basepoint(long _this_ptr); + // void CommonOpenChannelFields_set_payment_basepoint(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_set_payment_basepoint")] public static extern void CommonOpenChannelFields_set_payment_basepoint(long _this_ptr, long _val); + // struct LDKPublicKey CommonOpenChannelFields_get_delayed_payment_basepoint(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_get_delayed_payment_basepoint")] public static extern long CommonOpenChannelFields_get_delayed_payment_basepoint(long _this_ptr); + // void CommonOpenChannelFields_set_delayed_payment_basepoint(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_set_delayed_payment_basepoint")] public static extern void CommonOpenChannelFields_set_delayed_payment_basepoint(long _this_ptr, long _val); + // struct LDKPublicKey CommonOpenChannelFields_get_htlc_basepoint(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_get_htlc_basepoint")] public static extern long CommonOpenChannelFields_get_htlc_basepoint(long _this_ptr); + // void CommonOpenChannelFields_set_htlc_basepoint(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_set_htlc_basepoint")] public static extern void CommonOpenChannelFields_set_htlc_basepoint(long _this_ptr, long _val); + // struct LDKPublicKey CommonOpenChannelFields_get_first_per_commitment_point(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_get_first_per_commitment_point")] public static extern long CommonOpenChannelFields_get_first_per_commitment_point(long _this_ptr); + // void CommonOpenChannelFields_set_first_per_commitment_point(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_set_first_per_commitment_point")] public static extern void CommonOpenChannelFields_set_first_per_commitment_point(long _this_ptr, long _val); + // uint8_t CommonOpenChannelFields_get_channel_flags(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_get_channel_flags")] public static extern byte CommonOpenChannelFields_get_channel_flags(long _this_ptr); + // void CommonOpenChannelFields_set_channel_flags(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint8_t val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_set_channel_flags")] public static extern void CommonOpenChannelFields_set_channel_flags(long _this_ptr, byte _val); + // struct LDKCOption_CVec_u8ZZ CommonOpenChannelFields_get_shutdown_scriptpubkey(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_get_shutdown_scriptpubkey")] public static extern long CommonOpenChannelFields_get_shutdown_scriptpubkey(long _this_ptr); + // void CommonOpenChannelFields_set_shutdown_scriptpubkey(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_set_shutdown_scriptpubkey")] public static extern void CommonOpenChannelFields_set_shutdown_scriptpubkey(long _this_ptr, long _val); + // struct LDKChannelTypeFeatures CommonOpenChannelFields_get_channel_type(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_get_channel_type")] public static extern long CommonOpenChannelFields_get_channel_type(long _this_ptr); + // void CommonOpenChannelFields_set_channel_type(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_set_channel_type")] public static extern void CommonOpenChannelFields_set_channel_type(long _this_ptr, long _val); + // MUST_USE_RES struct LDKCommonOpenChannelFields CommonOpenChannelFields_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKChannelId temporary_channel_id_arg, uint64_t funding_satoshis_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t htlc_minimum_msat_arg, uint32_t commitment_feerate_sat_per_1000_weight_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_basepoint_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, uint8_t channel_flags_arg, struct LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_new")] public static extern long CommonOpenChannelFields_new(long _chain_hash_arg, long _temporary_channel_id_arg, long _funding_satoshis_arg, long _dust_limit_satoshis_arg, long _max_htlc_value_in_flight_msat_arg, long _htlc_minimum_msat_arg, int _commitment_feerate_sat_per_1000_weight_arg, short _to_self_delay_arg, short _max_accepted_htlcs_arg, long _funding_pubkey_arg, long _revocation_basepoint_arg, long _payment_basepoint_arg, long _delayed_payment_basepoint_arg, long _htlc_basepoint_arg, long _first_per_commitment_point_arg, byte _channel_flags_arg, long _shutdown_scriptpubkey_arg, long _channel_type_arg); + // uint64_t CommonOpenChannelFields_clone_ptr(LDKCommonOpenChannelFields *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_clone_ptr")] public static extern long CommonOpenChannelFields_clone_ptr(long _arg); + // struct LDKCommonOpenChannelFields CommonOpenChannelFields_clone(const struct LDKCommonOpenChannelFields *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_clone")] public static extern long CommonOpenChannelFields_clone(long _orig); + // uint64_t CommonOpenChannelFields_hash(const struct LDKCommonOpenChannelFields *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_hash")] public static extern long CommonOpenChannelFields_hash(long _o); + // bool CommonOpenChannelFields_eq(const struct LDKCommonOpenChannelFields *NONNULL_PTR a, const struct LDKCommonOpenChannelFields *NONNULL_PTR b); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonOpenChannelFields_eq")] public static extern bool CommonOpenChannelFields_eq(long _a, long _b); // void OpenChannel_free(struct LDKOpenChannel this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_free")] public static extern void OpenChannel_free(long _this_obj); - // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32]; - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_get_chain_hash")] public static extern long OpenChannel_get_chain_hash(long _this_ptr); - // void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_set_chain_hash")] public static extern void OpenChannel_set_chain_hash(long _this_ptr, long _val); - // const uint8_t (*OpenChannel_get_temporary_channel_id(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32]; - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_get_temporary_channel_id")] public static extern long OpenChannel_get_temporary_channel_id(long _this_ptr); - // void OpenChannel_set_temporary_channel_id(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_set_temporary_channel_id")] public static extern void OpenChannel_set_temporary_channel_id(long _this_ptr, long _val); - // uint64_t OpenChannel_get_funding_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_get_funding_satoshis")] public static extern long OpenChannel_get_funding_satoshis(long _this_ptr); - // void OpenChannel_set_funding_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_set_funding_satoshis")] public static extern void OpenChannel_set_funding_satoshis(long _this_ptr, long _val); + // struct LDKCommonOpenChannelFields OpenChannel_get_common_fields(const struct LDKOpenChannel *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_get_common_fields")] public static extern long OpenChannel_get_common_fields(long _this_ptr); + // void OpenChannel_set_common_fields(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKCommonOpenChannelFields val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_set_common_fields")] public static extern void OpenChannel_set_common_fields(long _this_ptr, long _val); // uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_get_push_msat")] public static extern long OpenChannel_get_push_msat(long _this_ptr); // void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_set_push_msat")] public static extern void OpenChannel_set_push_msat(long _this_ptr, long _val); - // uint64_t OpenChannel_get_dust_limit_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_get_dust_limit_satoshis")] public static extern long OpenChannel_get_dust_limit_satoshis(long _this_ptr); - // void OpenChannel_set_dust_limit_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_set_dust_limit_satoshis")] public static extern void OpenChannel_set_dust_limit_satoshis(long _this_ptr, long _val); - // uint64_t OpenChannel_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_get_max_htlc_value_in_flight_msat")] public static extern long OpenChannel_get_max_htlc_value_in_flight_msat(long _this_ptr); - // void OpenChannel_set_max_htlc_value_in_flight_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_set_max_htlc_value_in_flight_msat")] public static extern void OpenChannel_set_max_htlc_value_in_flight_msat(long _this_ptr, long _val); // uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_get_channel_reserve_satoshis")] public static extern long OpenChannel_get_channel_reserve_satoshis(long _this_ptr); // void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_set_channel_reserve_satoshis")] public static extern void OpenChannel_set_channel_reserve_satoshis(long _this_ptr, long _val); - // uint64_t OpenChannel_get_htlc_minimum_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_get_htlc_minimum_msat")] public static extern long OpenChannel_get_htlc_minimum_msat(long _this_ptr); - // void OpenChannel_set_htlc_minimum_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_set_htlc_minimum_msat")] public static extern void OpenChannel_set_htlc_minimum_msat(long _this_ptr, long _val); - // uint32_t OpenChannel_get_feerate_per_kw(const struct LDKOpenChannel *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_get_feerate_per_kw")] public static extern int OpenChannel_get_feerate_per_kw(long _this_ptr); - // void OpenChannel_set_feerate_per_kw(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint32_t val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_set_feerate_per_kw")] public static extern void OpenChannel_set_feerate_per_kw(long _this_ptr, int _val); - // uint16_t OpenChannel_get_to_self_delay(const struct LDKOpenChannel *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_get_to_self_delay")] public static extern short OpenChannel_get_to_self_delay(long _this_ptr); - // void OpenChannel_set_to_self_delay(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_set_to_self_delay")] public static extern void OpenChannel_set_to_self_delay(long _this_ptr, short _val); - // uint16_t OpenChannel_get_max_accepted_htlcs(const struct LDKOpenChannel *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_get_max_accepted_htlcs")] public static extern short OpenChannel_get_max_accepted_htlcs(long _this_ptr); - // void OpenChannel_set_max_accepted_htlcs(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_set_max_accepted_htlcs")] public static extern void OpenChannel_set_max_accepted_htlcs(long _this_ptr, short _val); - // struct LDKPublicKey OpenChannel_get_funding_pubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_get_funding_pubkey")] public static extern long OpenChannel_get_funding_pubkey(long _this_ptr); - // void OpenChannel_set_funding_pubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_set_funding_pubkey")] public static extern void OpenChannel_set_funding_pubkey(long _this_ptr, long _val); - // struct LDKPublicKey OpenChannel_get_revocation_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_get_revocation_basepoint")] public static extern long OpenChannel_get_revocation_basepoint(long _this_ptr); - // void OpenChannel_set_revocation_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_set_revocation_basepoint")] public static extern void OpenChannel_set_revocation_basepoint(long _this_ptr, long _val); - // struct LDKPublicKey OpenChannel_get_payment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_get_payment_point")] public static extern long OpenChannel_get_payment_point(long _this_ptr); - // void OpenChannel_set_payment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_set_payment_point")] public static extern void OpenChannel_set_payment_point(long _this_ptr, long _val); - // struct LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_get_delayed_payment_basepoint")] public static extern long OpenChannel_get_delayed_payment_basepoint(long _this_ptr); - // void OpenChannel_set_delayed_payment_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_set_delayed_payment_basepoint")] public static extern void OpenChannel_set_delayed_payment_basepoint(long _this_ptr, long _val); - // struct LDKPublicKey OpenChannel_get_htlc_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_get_htlc_basepoint")] public static extern long OpenChannel_get_htlc_basepoint(long _this_ptr); - // void OpenChannel_set_htlc_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_set_htlc_basepoint")] public static extern void OpenChannel_set_htlc_basepoint(long _this_ptr, long _val); - // struct LDKPublicKey OpenChannel_get_first_per_commitment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_get_first_per_commitment_point")] public static extern long OpenChannel_get_first_per_commitment_point(long _this_ptr); - // void OpenChannel_set_first_per_commitment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_set_first_per_commitment_point")] public static extern void OpenChannel_set_first_per_commitment_point(long _this_ptr, long _val); - // uint8_t OpenChannel_get_channel_flags(const struct LDKOpenChannel *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_get_channel_flags")] public static extern byte OpenChannel_get_channel_flags(long _this_ptr); - // void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_set_channel_flags")] public static extern void OpenChannel_set_channel_flags(long _this_ptr, byte _val); - // struct LDKCOption_CVec_u8ZZ OpenChannel_get_shutdown_scriptpubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_get_shutdown_scriptpubkey")] public static extern long OpenChannel_get_shutdown_scriptpubkey(long _this_ptr); - // void OpenChannel_set_shutdown_scriptpubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_set_shutdown_scriptpubkey")] public static extern void OpenChannel_set_shutdown_scriptpubkey(long _this_ptr, long _val); - // struct LDKChannelTypeFeatures OpenChannel_get_channel_type(const struct LDKOpenChannel *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_get_channel_type")] public static extern long OpenChannel_get_channel_type(long _this_ptr); - // void OpenChannel_set_channel_type(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_set_channel_type")] public static extern void OpenChannel_set_channel_type(long _this_ptr, long _val); - // MUST_USE_RES struct LDKOpenChannel OpenChannel_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKThirtyTwoBytes temporary_channel_id_arg, uint64_t funding_satoshis_arg, uint64_t push_msat_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t channel_reserve_satoshis_arg, uint64_t htlc_minimum_msat_arg, uint32_t feerate_per_kw_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_point_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, uint8_t channel_flags_arg, struct LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_new")] public static extern long OpenChannel_new(long _chain_hash_arg, long _temporary_channel_id_arg, long _funding_satoshis_arg, long _push_msat_arg, long _dust_limit_satoshis_arg, long _max_htlc_value_in_flight_msat_arg, long _channel_reserve_satoshis_arg, long _htlc_minimum_msat_arg, int _feerate_per_kw_arg, short _to_self_delay_arg, short _max_accepted_htlcs_arg, long _funding_pubkey_arg, long _revocation_basepoint_arg, long _payment_point_arg, long _delayed_payment_basepoint_arg, long _htlc_basepoint_arg, long _first_per_commitment_point_arg, byte _channel_flags_arg, long _shutdown_scriptpubkey_arg, long _channel_type_arg); + // MUST_USE_RES struct LDKOpenChannel OpenChannel_new(struct LDKCommonOpenChannelFields common_fields_arg, uint64_t push_msat_arg, uint64_t channel_reserve_satoshis_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_new")] public static extern long OpenChannel_new(long _common_fields_arg, long _push_msat_arg, long _channel_reserve_satoshis_arg); // uint64_t OpenChannel_clone_ptr(LDKOpenChannel *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_clone_ptr")] public static extern long OpenChannel_clone_ptr(long _arg); // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig); @@ -7576,96 +8354,28 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannel_eq")] public static extern bool OpenChannel_eq(long _a, long _b); // void OpenChannelV2_free(struct LDKOpenChannelV2 this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_free")] public static extern void OpenChannelV2_free(long _this_obj); - // const uint8_t (*OpenChannelV2_get_chain_hash(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr))[32]; - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_get_chain_hash")] public static extern long OpenChannelV2_get_chain_hash(long _this_ptr); - // void OpenChannelV2_set_chain_hash(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_set_chain_hash")] public static extern void OpenChannelV2_set_chain_hash(long _this_ptr, long _val); - // const uint8_t (*OpenChannelV2_get_temporary_channel_id(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr))[32]; - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_get_temporary_channel_id")] public static extern long OpenChannelV2_get_temporary_channel_id(long _this_ptr); - // void OpenChannelV2_set_temporary_channel_id(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_set_temporary_channel_id")] public static extern void OpenChannelV2_set_temporary_channel_id(long _this_ptr, long _val); + // struct LDKCommonOpenChannelFields OpenChannelV2_get_common_fields(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_get_common_fields")] public static extern long OpenChannelV2_get_common_fields(long _this_ptr); + // void OpenChannelV2_set_common_fields(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKCommonOpenChannelFields val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_set_common_fields")] public static extern void OpenChannelV2_set_common_fields(long _this_ptr, long _val); // uint32_t OpenChannelV2_get_funding_feerate_sat_per_1000_weight(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_get_funding_feerate_sat_per_1000_weight")] public static extern int OpenChannelV2_get_funding_feerate_sat_per_1000_weight(long _this_ptr); // void OpenChannelV2_set_funding_feerate_sat_per_1000_weight(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint32_t val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_set_funding_feerate_sat_per_1000_weight")] public static extern void OpenChannelV2_set_funding_feerate_sat_per_1000_weight(long _this_ptr, int _val); - // uint32_t OpenChannelV2_get_commitment_feerate_sat_per_1000_weight(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_get_commitment_feerate_sat_per_1000_weight")] public static extern int OpenChannelV2_get_commitment_feerate_sat_per_1000_weight(long _this_ptr); - // void OpenChannelV2_set_commitment_feerate_sat_per_1000_weight(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint32_t val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_set_commitment_feerate_sat_per_1000_weight")] public static extern void OpenChannelV2_set_commitment_feerate_sat_per_1000_weight(long _this_ptr, int _val); - // uint64_t OpenChannelV2_get_funding_satoshis(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_get_funding_satoshis")] public static extern long OpenChannelV2_get_funding_satoshis(long _this_ptr); - // void OpenChannelV2_set_funding_satoshis(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint64_t val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_set_funding_satoshis")] public static extern void OpenChannelV2_set_funding_satoshis(long _this_ptr, long _val); - // uint64_t OpenChannelV2_get_dust_limit_satoshis(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_get_dust_limit_satoshis")] public static extern long OpenChannelV2_get_dust_limit_satoshis(long _this_ptr); - // void OpenChannelV2_set_dust_limit_satoshis(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint64_t val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_set_dust_limit_satoshis")] public static extern void OpenChannelV2_set_dust_limit_satoshis(long _this_ptr, long _val); - // uint64_t OpenChannelV2_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_get_max_htlc_value_in_flight_msat")] public static extern long OpenChannelV2_get_max_htlc_value_in_flight_msat(long _this_ptr); - // void OpenChannelV2_set_max_htlc_value_in_flight_msat(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint64_t val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_set_max_htlc_value_in_flight_msat")] public static extern void OpenChannelV2_set_max_htlc_value_in_flight_msat(long _this_ptr, long _val); - // uint64_t OpenChannelV2_get_htlc_minimum_msat(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_get_htlc_minimum_msat")] public static extern long OpenChannelV2_get_htlc_minimum_msat(long _this_ptr); - // void OpenChannelV2_set_htlc_minimum_msat(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint64_t val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_set_htlc_minimum_msat")] public static extern void OpenChannelV2_set_htlc_minimum_msat(long _this_ptr, long _val); - // uint16_t OpenChannelV2_get_to_self_delay(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_get_to_self_delay")] public static extern short OpenChannelV2_get_to_self_delay(long _this_ptr); - // void OpenChannelV2_set_to_self_delay(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint16_t val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_set_to_self_delay")] public static extern void OpenChannelV2_set_to_self_delay(long _this_ptr, short _val); - // uint16_t OpenChannelV2_get_max_accepted_htlcs(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_get_max_accepted_htlcs")] public static extern short OpenChannelV2_get_max_accepted_htlcs(long _this_ptr); - // void OpenChannelV2_set_max_accepted_htlcs(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint16_t val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_set_max_accepted_htlcs")] public static extern void OpenChannelV2_set_max_accepted_htlcs(long _this_ptr, short _val); // uint32_t OpenChannelV2_get_locktime(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_get_locktime")] public static extern int OpenChannelV2_get_locktime(long _this_ptr); // void OpenChannelV2_set_locktime(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint32_t val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_set_locktime")] public static extern void OpenChannelV2_set_locktime(long _this_ptr, int _val); - // struct LDKPublicKey OpenChannelV2_get_funding_pubkey(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_get_funding_pubkey")] public static extern long OpenChannelV2_get_funding_pubkey(long _this_ptr); - // void OpenChannelV2_set_funding_pubkey(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_set_funding_pubkey")] public static extern void OpenChannelV2_set_funding_pubkey(long _this_ptr, long _val); - // struct LDKPublicKey OpenChannelV2_get_revocation_basepoint(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_get_revocation_basepoint")] public static extern long OpenChannelV2_get_revocation_basepoint(long _this_ptr); - // void OpenChannelV2_set_revocation_basepoint(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_set_revocation_basepoint")] public static extern void OpenChannelV2_set_revocation_basepoint(long _this_ptr, long _val); - // struct LDKPublicKey OpenChannelV2_get_payment_basepoint(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_get_payment_basepoint")] public static extern long OpenChannelV2_get_payment_basepoint(long _this_ptr); - // void OpenChannelV2_set_payment_basepoint(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_set_payment_basepoint")] public static extern void OpenChannelV2_set_payment_basepoint(long _this_ptr, long _val); - // struct LDKPublicKey OpenChannelV2_get_delayed_payment_basepoint(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_get_delayed_payment_basepoint")] public static extern long OpenChannelV2_get_delayed_payment_basepoint(long _this_ptr); - // void OpenChannelV2_set_delayed_payment_basepoint(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_set_delayed_payment_basepoint")] public static extern void OpenChannelV2_set_delayed_payment_basepoint(long _this_ptr, long _val); - // struct LDKPublicKey OpenChannelV2_get_htlc_basepoint(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_get_htlc_basepoint")] public static extern long OpenChannelV2_get_htlc_basepoint(long _this_ptr); - // void OpenChannelV2_set_htlc_basepoint(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_set_htlc_basepoint")] public static extern void OpenChannelV2_set_htlc_basepoint(long _this_ptr, long _val); - // struct LDKPublicKey OpenChannelV2_get_first_per_commitment_point(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_get_first_per_commitment_point")] public static extern long OpenChannelV2_get_first_per_commitment_point(long _this_ptr); - // void OpenChannelV2_set_first_per_commitment_point(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_set_first_per_commitment_point")] public static extern void OpenChannelV2_set_first_per_commitment_point(long _this_ptr, long _val); // struct LDKPublicKey OpenChannelV2_get_second_per_commitment_point(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_get_second_per_commitment_point")] public static extern long OpenChannelV2_get_second_per_commitment_point(long _this_ptr); // void OpenChannelV2_set_second_per_commitment_point(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_set_second_per_commitment_point")] public static extern void OpenChannelV2_set_second_per_commitment_point(long _this_ptr, long _val); - // uint8_t OpenChannelV2_get_channel_flags(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_get_channel_flags")] public static extern byte OpenChannelV2_get_channel_flags(long _this_ptr); - // void OpenChannelV2_set_channel_flags(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint8_t val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_set_channel_flags")] public static extern void OpenChannelV2_set_channel_flags(long _this_ptr, byte _val); - // struct LDKCOption_CVec_u8ZZ OpenChannelV2_get_shutdown_scriptpubkey(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_get_shutdown_scriptpubkey")] public static extern long OpenChannelV2_get_shutdown_scriptpubkey(long _this_ptr); - // void OpenChannelV2_set_shutdown_scriptpubkey(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_set_shutdown_scriptpubkey")] public static extern void OpenChannelV2_set_shutdown_scriptpubkey(long _this_ptr, long _val); - // struct LDKChannelTypeFeatures OpenChannelV2_get_channel_type(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_get_channel_type")] public static extern long OpenChannelV2_get_channel_type(long _this_ptr); - // void OpenChannelV2_set_channel_type(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_set_channel_type")] public static extern void OpenChannelV2_set_channel_type(long _this_ptr, long _val); // enum LDKCOption_NoneZ OpenChannelV2_get_require_confirmed_inputs(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_get_require_confirmed_inputs")] public static extern COption_NoneZ OpenChannelV2_get_require_confirmed_inputs(long _this_ptr); // void OpenChannelV2_set_require_confirmed_inputs(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, enum LDKCOption_NoneZ val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_set_require_confirmed_inputs")] public static extern void OpenChannelV2_set_require_confirmed_inputs(long _this_ptr, COption_NoneZ _val); - // MUST_USE_RES struct LDKOpenChannelV2 OpenChannelV2_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKThirtyTwoBytes temporary_channel_id_arg, uint32_t funding_feerate_sat_per_1000_weight_arg, uint32_t commitment_feerate_sat_per_1000_weight_arg, uint64_t funding_satoshis_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t htlc_minimum_msat_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, uint32_t locktime_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_basepoint_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, struct LDKPublicKey second_per_commitment_point_arg, uint8_t channel_flags_arg, struct LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg, enum LDKCOption_NoneZ require_confirmed_inputs_arg); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_new")] public static extern long OpenChannelV2_new(long _chain_hash_arg, long _temporary_channel_id_arg, int _funding_feerate_sat_per_1000_weight_arg, int _commitment_feerate_sat_per_1000_weight_arg, long _funding_satoshis_arg, long _dust_limit_satoshis_arg, long _max_htlc_value_in_flight_msat_arg, long _htlc_minimum_msat_arg, short _to_self_delay_arg, short _max_accepted_htlcs_arg, int _locktime_arg, long _funding_pubkey_arg, long _revocation_basepoint_arg, long _payment_basepoint_arg, long _delayed_payment_basepoint_arg, long _htlc_basepoint_arg, long _first_per_commitment_point_arg, long _second_per_commitment_point_arg, byte _channel_flags_arg, long _shutdown_scriptpubkey_arg, long _channel_type_arg, COption_NoneZ _require_confirmed_inputs_arg); + // MUST_USE_RES struct LDKOpenChannelV2 OpenChannelV2_new(struct LDKCommonOpenChannelFields common_fields_arg, uint32_t funding_feerate_sat_per_1000_weight_arg, uint32_t locktime_arg, struct LDKPublicKey second_per_commitment_point_arg, enum LDKCOption_NoneZ require_confirmed_inputs_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_new")] public static extern long OpenChannelV2_new(long _common_fields_arg, int _funding_feerate_sat_per_1000_weight_arg, int _locktime_arg, long _second_per_commitment_point_arg, COption_NoneZ _require_confirmed_inputs_arg); // uint64_t OpenChannelV2_clone_ptr(LDKOpenChannelV2 *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_clone_ptr")] public static extern long OpenChannelV2_clone_ptr(long _arg); // struct LDKOpenChannelV2 OpenChannelV2_clone(const struct LDKOpenChannelV2 *NONNULL_PTR orig); @@ -7674,74 +8384,90 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_hash")] public static extern long OpenChannelV2_hash(long _o); // bool OpenChannelV2_eq(const struct LDKOpenChannelV2 *NONNULL_PTR a, const struct LDKOpenChannelV2 *NONNULL_PTR b); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OpenChannelV2_eq")] public static extern bool OpenChannelV2_eq(long _a, long _b); + // void CommonAcceptChannelFields_free(struct LDKCommonAcceptChannelFields this_obj); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_free")] public static extern void CommonAcceptChannelFields_free(long _this_obj); + // struct LDKChannelId CommonAcceptChannelFields_get_temporary_channel_id(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_get_temporary_channel_id")] public static extern long CommonAcceptChannelFields_get_temporary_channel_id(long _this_ptr); + // void CommonAcceptChannelFields_set_temporary_channel_id(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKChannelId val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_set_temporary_channel_id")] public static extern void CommonAcceptChannelFields_set_temporary_channel_id(long _this_ptr, long _val); + // uint64_t CommonAcceptChannelFields_get_dust_limit_satoshis(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_get_dust_limit_satoshis")] public static extern long CommonAcceptChannelFields_get_dust_limit_satoshis(long _this_ptr); + // void CommonAcceptChannelFields_set_dust_limit_satoshis(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint64_t val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_set_dust_limit_satoshis")] public static extern void CommonAcceptChannelFields_set_dust_limit_satoshis(long _this_ptr, long _val); + // uint64_t CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat")] public static extern long CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat(long _this_ptr); + // void CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint64_t val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat")] public static extern void CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat(long _this_ptr, long _val); + // uint64_t CommonAcceptChannelFields_get_htlc_minimum_msat(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_get_htlc_minimum_msat")] public static extern long CommonAcceptChannelFields_get_htlc_minimum_msat(long _this_ptr); + // void CommonAcceptChannelFields_set_htlc_minimum_msat(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint64_t val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_set_htlc_minimum_msat")] public static extern void CommonAcceptChannelFields_set_htlc_minimum_msat(long _this_ptr, long _val); + // uint32_t CommonAcceptChannelFields_get_minimum_depth(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_get_minimum_depth")] public static extern int CommonAcceptChannelFields_get_minimum_depth(long _this_ptr); + // void CommonAcceptChannelFields_set_minimum_depth(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint32_t val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_set_minimum_depth")] public static extern void CommonAcceptChannelFields_set_minimum_depth(long _this_ptr, int _val); + // uint16_t CommonAcceptChannelFields_get_to_self_delay(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_get_to_self_delay")] public static extern short CommonAcceptChannelFields_get_to_self_delay(long _this_ptr); + // void CommonAcceptChannelFields_set_to_self_delay(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint16_t val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_set_to_self_delay")] public static extern void CommonAcceptChannelFields_set_to_self_delay(long _this_ptr, short _val); + // uint16_t CommonAcceptChannelFields_get_max_accepted_htlcs(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_get_max_accepted_htlcs")] public static extern short CommonAcceptChannelFields_get_max_accepted_htlcs(long _this_ptr); + // void CommonAcceptChannelFields_set_max_accepted_htlcs(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint16_t val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_set_max_accepted_htlcs")] public static extern void CommonAcceptChannelFields_set_max_accepted_htlcs(long _this_ptr, short _val); + // struct LDKPublicKey CommonAcceptChannelFields_get_funding_pubkey(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_get_funding_pubkey")] public static extern long CommonAcceptChannelFields_get_funding_pubkey(long _this_ptr); + // void CommonAcceptChannelFields_set_funding_pubkey(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_set_funding_pubkey")] public static extern void CommonAcceptChannelFields_set_funding_pubkey(long _this_ptr, long _val); + // struct LDKPublicKey CommonAcceptChannelFields_get_revocation_basepoint(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_get_revocation_basepoint")] public static extern long CommonAcceptChannelFields_get_revocation_basepoint(long _this_ptr); + // void CommonAcceptChannelFields_set_revocation_basepoint(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_set_revocation_basepoint")] public static extern void CommonAcceptChannelFields_set_revocation_basepoint(long _this_ptr, long _val); + // struct LDKPublicKey CommonAcceptChannelFields_get_payment_basepoint(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_get_payment_basepoint")] public static extern long CommonAcceptChannelFields_get_payment_basepoint(long _this_ptr); + // void CommonAcceptChannelFields_set_payment_basepoint(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_set_payment_basepoint")] public static extern void CommonAcceptChannelFields_set_payment_basepoint(long _this_ptr, long _val); + // struct LDKPublicKey CommonAcceptChannelFields_get_delayed_payment_basepoint(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_get_delayed_payment_basepoint")] public static extern long CommonAcceptChannelFields_get_delayed_payment_basepoint(long _this_ptr); + // void CommonAcceptChannelFields_set_delayed_payment_basepoint(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_set_delayed_payment_basepoint")] public static extern void CommonAcceptChannelFields_set_delayed_payment_basepoint(long _this_ptr, long _val); + // struct LDKPublicKey CommonAcceptChannelFields_get_htlc_basepoint(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_get_htlc_basepoint")] public static extern long CommonAcceptChannelFields_get_htlc_basepoint(long _this_ptr); + // void CommonAcceptChannelFields_set_htlc_basepoint(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_set_htlc_basepoint")] public static extern void CommonAcceptChannelFields_set_htlc_basepoint(long _this_ptr, long _val); + // struct LDKPublicKey CommonAcceptChannelFields_get_first_per_commitment_point(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_get_first_per_commitment_point")] public static extern long CommonAcceptChannelFields_get_first_per_commitment_point(long _this_ptr); + // void CommonAcceptChannelFields_set_first_per_commitment_point(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_set_first_per_commitment_point")] public static extern void CommonAcceptChannelFields_set_first_per_commitment_point(long _this_ptr, long _val); + // struct LDKCOption_CVec_u8ZZ CommonAcceptChannelFields_get_shutdown_scriptpubkey(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_get_shutdown_scriptpubkey")] public static extern long CommonAcceptChannelFields_get_shutdown_scriptpubkey(long _this_ptr); + // void CommonAcceptChannelFields_set_shutdown_scriptpubkey(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_set_shutdown_scriptpubkey")] public static extern void CommonAcceptChannelFields_set_shutdown_scriptpubkey(long _this_ptr, long _val); + // struct LDKChannelTypeFeatures CommonAcceptChannelFields_get_channel_type(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_get_channel_type")] public static extern long CommonAcceptChannelFields_get_channel_type(long _this_ptr); + // void CommonAcceptChannelFields_set_channel_type(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_set_channel_type")] public static extern void CommonAcceptChannelFields_set_channel_type(long _this_ptr, long _val); + // MUST_USE_RES struct LDKCommonAcceptChannelFields CommonAcceptChannelFields_new(struct LDKChannelId temporary_channel_id_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t htlc_minimum_msat_arg, uint32_t minimum_depth_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_basepoint_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, struct LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_new")] public static extern long CommonAcceptChannelFields_new(long _temporary_channel_id_arg, long _dust_limit_satoshis_arg, long _max_htlc_value_in_flight_msat_arg, long _htlc_minimum_msat_arg, int _minimum_depth_arg, short _to_self_delay_arg, short _max_accepted_htlcs_arg, long _funding_pubkey_arg, long _revocation_basepoint_arg, long _payment_basepoint_arg, long _delayed_payment_basepoint_arg, long _htlc_basepoint_arg, long _first_per_commitment_point_arg, long _shutdown_scriptpubkey_arg, long _channel_type_arg); + // uint64_t CommonAcceptChannelFields_clone_ptr(LDKCommonAcceptChannelFields *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_clone_ptr")] public static extern long CommonAcceptChannelFields_clone_ptr(long _arg); + // struct LDKCommonAcceptChannelFields CommonAcceptChannelFields_clone(const struct LDKCommonAcceptChannelFields *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_clone")] public static extern long CommonAcceptChannelFields_clone(long _orig); + // uint64_t CommonAcceptChannelFields_hash(const struct LDKCommonAcceptChannelFields *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_hash")] public static extern long CommonAcceptChannelFields_hash(long _o); + // bool CommonAcceptChannelFields_eq(const struct LDKCommonAcceptChannelFields *NONNULL_PTR a, const struct LDKCommonAcceptChannelFields *NONNULL_PTR b); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommonAcceptChannelFields_eq")] public static extern bool CommonAcceptChannelFields_eq(long _a, long _b); // void AcceptChannel_free(struct LDKAcceptChannel this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_free")] public static extern void AcceptChannel_free(long _this_obj); - // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32]; - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_get_temporary_channel_id")] public static extern long AcceptChannel_get_temporary_channel_id(long _this_ptr); - // void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_set_temporary_channel_id")] public static extern void AcceptChannel_set_temporary_channel_id(long _this_ptr, long _val); - // uint64_t AcceptChannel_get_dust_limit_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_get_dust_limit_satoshis")] public static extern long AcceptChannel_get_dust_limit_satoshis(long _this_ptr); - // void AcceptChannel_set_dust_limit_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_set_dust_limit_satoshis")] public static extern void AcceptChannel_set_dust_limit_satoshis(long _this_ptr, long _val); - // uint64_t AcceptChannel_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_get_max_htlc_value_in_flight_msat")] public static extern long AcceptChannel_get_max_htlc_value_in_flight_msat(long _this_ptr); - // void AcceptChannel_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_set_max_htlc_value_in_flight_msat")] public static extern void AcceptChannel_set_max_htlc_value_in_flight_msat(long _this_ptr, long _val); + // struct LDKCommonAcceptChannelFields AcceptChannel_get_common_fields(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_get_common_fields")] public static extern long AcceptChannel_get_common_fields(long _this_ptr); + // void AcceptChannel_set_common_fields(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKCommonAcceptChannelFields val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_set_common_fields")] public static extern void AcceptChannel_set_common_fields(long _this_ptr, long _val); // uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_get_channel_reserve_satoshis")] public static extern long AcceptChannel_get_channel_reserve_satoshis(long _this_ptr); // void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_set_channel_reserve_satoshis")] public static extern void AcceptChannel_set_channel_reserve_satoshis(long _this_ptr, long _val); - // uint64_t AcceptChannel_get_htlc_minimum_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_get_htlc_minimum_msat")] public static extern long AcceptChannel_get_htlc_minimum_msat(long _this_ptr); - // void AcceptChannel_set_htlc_minimum_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_set_htlc_minimum_msat")] public static extern void AcceptChannel_set_htlc_minimum_msat(long _this_ptr, long _val); - // uint32_t AcceptChannel_get_minimum_depth(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_get_minimum_depth")] public static extern int AcceptChannel_get_minimum_depth(long _this_ptr); - // void AcceptChannel_set_minimum_depth(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint32_t val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_set_minimum_depth")] public static extern void AcceptChannel_set_minimum_depth(long _this_ptr, int _val); - // uint16_t AcceptChannel_get_to_self_delay(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_get_to_self_delay")] public static extern short AcceptChannel_get_to_self_delay(long _this_ptr); - // void AcceptChannel_set_to_self_delay(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_set_to_self_delay")] public static extern void AcceptChannel_set_to_self_delay(long _this_ptr, short _val); - // uint16_t AcceptChannel_get_max_accepted_htlcs(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_get_max_accepted_htlcs")] public static extern short AcceptChannel_get_max_accepted_htlcs(long _this_ptr); - // void AcceptChannel_set_max_accepted_htlcs(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_set_max_accepted_htlcs")] public static extern void AcceptChannel_set_max_accepted_htlcs(long _this_ptr, short _val); - // struct LDKPublicKey AcceptChannel_get_funding_pubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_get_funding_pubkey")] public static extern long AcceptChannel_get_funding_pubkey(long _this_ptr); - // void AcceptChannel_set_funding_pubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_set_funding_pubkey")] public static extern void AcceptChannel_set_funding_pubkey(long _this_ptr, long _val); - // struct LDKPublicKey AcceptChannel_get_revocation_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_get_revocation_basepoint")] public static extern long AcceptChannel_get_revocation_basepoint(long _this_ptr); - // void AcceptChannel_set_revocation_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_set_revocation_basepoint")] public static extern void AcceptChannel_set_revocation_basepoint(long _this_ptr, long _val); - // struct LDKPublicKey AcceptChannel_get_payment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_get_payment_point")] public static extern long AcceptChannel_get_payment_point(long _this_ptr); - // void AcceptChannel_set_payment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_set_payment_point")] public static extern void AcceptChannel_set_payment_point(long _this_ptr, long _val); - // struct LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_get_delayed_payment_basepoint")] public static extern long AcceptChannel_get_delayed_payment_basepoint(long _this_ptr); - // void AcceptChannel_set_delayed_payment_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_set_delayed_payment_basepoint")] public static extern void AcceptChannel_set_delayed_payment_basepoint(long _this_ptr, long _val); - // struct LDKPublicKey AcceptChannel_get_htlc_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_get_htlc_basepoint")] public static extern long AcceptChannel_get_htlc_basepoint(long _this_ptr); - // void AcceptChannel_set_htlc_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_set_htlc_basepoint")] public static extern void AcceptChannel_set_htlc_basepoint(long _this_ptr, long _val); - // struct LDKPublicKey AcceptChannel_get_first_per_commitment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_get_first_per_commitment_point")] public static extern long AcceptChannel_get_first_per_commitment_point(long _this_ptr); - // void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_set_first_per_commitment_point")] public static extern void AcceptChannel_set_first_per_commitment_point(long _this_ptr, long _val); - // struct LDKCOption_CVec_u8ZZ AcceptChannel_get_shutdown_scriptpubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_get_shutdown_scriptpubkey")] public static extern long AcceptChannel_get_shutdown_scriptpubkey(long _this_ptr); - // void AcceptChannel_set_shutdown_scriptpubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_set_shutdown_scriptpubkey")] public static extern void AcceptChannel_set_shutdown_scriptpubkey(long _this_ptr, long _val); - // struct LDKChannelTypeFeatures AcceptChannel_get_channel_type(const struct LDKAcceptChannel *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_get_channel_type")] public static extern long AcceptChannel_get_channel_type(long _this_ptr); - // void AcceptChannel_set_channel_type(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_set_channel_type")] public static extern void AcceptChannel_set_channel_type(long _this_ptr, long _val); - // MUST_USE_RES struct LDKAcceptChannel AcceptChannel_new(struct LDKThirtyTwoBytes temporary_channel_id_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t channel_reserve_satoshis_arg, uint64_t htlc_minimum_msat_arg, uint32_t minimum_depth_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_point_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, struct LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_new")] public static extern long AcceptChannel_new(long _temporary_channel_id_arg, long _dust_limit_satoshis_arg, long _max_htlc_value_in_flight_msat_arg, long _channel_reserve_satoshis_arg, long _htlc_minimum_msat_arg, int _minimum_depth_arg, short _to_self_delay_arg, short _max_accepted_htlcs_arg, long _funding_pubkey_arg, long _revocation_basepoint_arg, long _payment_point_arg, long _delayed_payment_basepoint_arg, long _htlc_basepoint_arg, long _first_per_commitment_point_arg, long _shutdown_scriptpubkey_arg, long _channel_type_arg); + // MUST_USE_RES struct LDKAcceptChannel AcceptChannel_new(struct LDKCommonAcceptChannelFields common_fields_arg, uint64_t channel_reserve_satoshis_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_new")] public static extern long AcceptChannel_new(long _common_fields_arg, long _channel_reserve_satoshis_arg); // uint64_t AcceptChannel_clone_ptr(LDKAcceptChannel *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_clone_ptr")] public static extern long AcceptChannel_clone_ptr(long _arg); // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig); @@ -7752,80 +8478,24 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_eq")] public static extern bool AcceptChannel_eq(long _a, long _b); // void AcceptChannelV2_free(struct LDKAcceptChannelV2 this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_free")] public static extern void AcceptChannelV2_free(long _this_obj); - // const uint8_t (*AcceptChannelV2_get_temporary_channel_id(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr))[32]; - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_get_temporary_channel_id")] public static extern long AcceptChannelV2_get_temporary_channel_id(long _this_ptr); - // void AcceptChannelV2_set_temporary_channel_id(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_set_temporary_channel_id")] public static extern void AcceptChannelV2_set_temporary_channel_id(long _this_ptr, long _val); + // struct LDKCommonAcceptChannelFields AcceptChannelV2_get_common_fields(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_get_common_fields")] public static extern long AcceptChannelV2_get_common_fields(long _this_ptr); + // void AcceptChannelV2_set_common_fields(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKCommonAcceptChannelFields val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_set_common_fields")] public static extern void AcceptChannelV2_set_common_fields(long _this_ptr, long _val); // uint64_t AcceptChannelV2_get_funding_satoshis(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_get_funding_satoshis")] public static extern long AcceptChannelV2_get_funding_satoshis(long _this_ptr); // void AcceptChannelV2_set_funding_satoshis(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint64_t val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_set_funding_satoshis")] public static extern void AcceptChannelV2_set_funding_satoshis(long _this_ptr, long _val); - // uint64_t AcceptChannelV2_get_dust_limit_satoshis(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_get_dust_limit_satoshis")] public static extern long AcceptChannelV2_get_dust_limit_satoshis(long _this_ptr); - // void AcceptChannelV2_set_dust_limit_satoshis(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint64_t val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_set_dust_limit_satoshis")] public static extern void AcceptChannelV2_set_dust_limit_satoshis(long _this_ptr, long _val); - // uint64_t AcceptChannelV2_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_get_max_htlc_value_in_flight_msat")] public static extern long AcceptChannelV2_get_max_htlc_value_in_flight_msat(long _this_ptr); - // void AcceptChannelV2_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint64_t val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_set_max_htlc_value_in_flight_msat")] public static extern void AcceptChannelV2_set_max_htlc_value_in_flight_msat(long _this_ptr, long _val); - // uint64_t AcceptChannelV2_get_htlc_minimum_msat(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_get_htlc_minimum_msat")] public static extern long AcceptChannelV2_get_htlc_minimum_msat(long _this_ptr); - // void AcceptChannelV2_set_htlc_minimum_msat(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint64_t val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_set_htlc_minimum_msat")] public static extern void AcceptChannelV2_set_htlc_minimum_msat(long _this_ptr, long _val); - // uint32_t AcceptChannelV2_get_minimum_depth(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_get_minimum_depth")] public static extern int AcceptChannelV2_get_minimum_depth(long _this_ptr); - // void AcceptChannelV2_set_minimum_depth(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint32_t val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_set_minimum_depth")] public static extern void AcceptChannelV2_set_minimum_depth(long _this_ptr, int _val); - // uint16_t AcceptChannelV2_get_to_self_delay(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_get_to_self_delay")] public static extern short AcceptChannelV2_get_to_self_delay(long _this_ptr); - // void AcceptChannelV2_set_to_self_delay(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint16_t val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_set_to_self_delay")] public static extern void AcceptChannelV2_set_to_self_delay(long _this_ptr, short _val); - // uint16_t AcceptChannelV2_get_max_accepted_htlcs(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_get_max_accepted_htlcs")] public static extern short AcceptChannelV2_get_max_accepted_htlcs(long _this_ptr); - // void AcceptChannelV2_set_max_accepted_htlcs(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint16_t val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_set_max_accepted_htlcs")] public static extern void AcceptChannelV2_set_max_accepted_htlcs(long _this_ptr, short _val); - // struct LDKPublicKey AcceptChannelV2_get_funding_pubkey(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_get_funding_pubkey")] public static extern long AcceptChannelV2_get_funding_pubkey(long _this_ptr); - // void AcceptChannelV2_set_funding_pubkey(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_set_funding_pubkey")] public static extern void AcceptChannelV2_set_funding_pubkey(long _this_ptr, long _val); - // struct LDKPublicKey AcceptChannelV2_get_revocation_basepoint(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_get_revocation_basepoint")] public static extern long AcceptChannelV2_get_revocation_basepoint(long _this_ptr); - // void AcceptChannelV2_set_revocation_basepoint(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_set_revocation_basepoint")] public static extern void AcceptChannelV2_set_revocation_basepoint(long _this_ptr, long _val); - // struct LDKPublicKey AcceptChannelV2_get_payment_basepoint(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_get_payment_basepoint")] public static extern long AcceptChannelV2_get_payment_basepoint(long _this_ptr); - // void AcceptChannelV2_set_payment_basepoint(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_set_payment_basepoint")] public static extern void AcceptChannelV2_set_payment_basepoint(long _this_ptr, long _val); - // struct LDKPublicKey AcceptChannelV2_get_delayed_payment_basepoint(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_get_delayed_payment_basepoint")] public static extern long AcceptChannelV2_get_delayed_payment_basepoint(long _this_ptr); - // void AcceptChannelV2_set_delayed_payment_basepoint(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_set_delayed_payment_basepoint")] public static extern void AcceptChannelV2_set_delayed_payment_basepoint(long _this_ptr, long _val); - // struct LDKPublicKey AcceptChannelV2_get_htlc_basepoint(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_get_htlc_basepoint")] public static extern long AcceptChannelV2_get_htlc_basepoint(long _this_ptr); - // void AcceptChannelV2_set_htlc_basepoint(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_set_htlc_basepoint")] public static extern void AcceptChannelV2_set_htlc_basepoint(long _this_ptr, long _val); - // struct LDKPublicKey AcceptChannelV2_get_first_per_commitment_point(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_get_first_per_commitment_point")] public static extern long AcceptChannelV2_get_first_per_commitment_point(long _this_ptr); - // void AcceptChannelV2_set_first_per_commitment_point(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_set_first_per_commitment_point")] public static extern void AcceptChannelV2_set_first_per_commitment_point(long _this_ptr, long _val); // struct LDKPublicKey AcceptChannelV2_get_second_per_commitment_point(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_get_second_per_commitment_point")] public static extern long AcceptChannelV2_get_second_per_commitment_point(long _this_ptr); // void AcceptChannelV2_set_second_per_commitment_point(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_set_second_per_commitment_point")] public static extern void AcceptChannelV2_set_second_per_commitment_point(long _this_ptr, long _val); - // struct LDKCOption_CVec_u8ZZ AcceptChannelV2_get_shutdown_scriptpubkey(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_get_shutdown_scriptpubkey")] public static extern long AcceptChannelV2_get_shutdown_scriptpubkey(long _this_ptr); - // void AcceptChannelV2_set_shutdown_scriptpubkey(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_set_shutdown_scriptpubkey")] public static extern void AcceptChannelV2_set_shutdown_scriptpubkey(long _this_ptr, long _val); - // struct LDKChannelTypeFeatures AcceptChannelV2_get_channel_type(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_get_channel_type")] public static extern long AcceptChannelV2_get_channel_type(long _this_ptr); - // void AcceptChannelV2_set_channel_type(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_set_channel_type")] public static extern void AcceptChannelV2_set_channel_type(long _this_ptr, long _val); // enum LDKCOption_NoneZ AcceptChannelV2_get_require_confirmed_inputs(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_get_require_confirmed_inputs")] public static extern COption_NoneZ AcceptChannelV2_get_require_confirmed_inputs(long _this_ptr); // void AcceptChannelV2_set_require_confirmed_inputs(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, enum LDKCOption_NoneZ val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_set_require_confirmed_inputs")] public static extern void AcceptChannelV2_set_require_confirmed_inputs(long _this_ptr, COption_NoneZ _val); - // MUST_USE_RES struct LDKAcceptChannelV2 AcceptChannelV2_new(struct LDKThirtyTwoBytes temporary_channel_id_arg, uint64_t funding_satoshis_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t htlc_minimum_msat_arg, uint32_t minimum_depth_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_basepoint_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, struct LDKPublicKey second_per_commitment_point_arg, struct LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg, enum LDKCOption_NoneZ require_confirmed_inputs_arg); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_new")] public static extern long AcceptChannelV2_new(long _temporary_channel_id_arg, long _funding_satoshis_arg, long _dust_limit_satoshis_arg, long _max_htlc_value_in_flight_msat_arg, long _htlc_minimum_msat_arg, int _minimum_depth_arg, short _to_self_delay_arg, short _max_accepted_htlcs_arg, long _funding_pubkey_arg, long _revocation_basepoint_arg, long _payment_basepoint_arg, long _delayed_payment_basepoint_arg, long _htlc_basepoint_arg, long _first_per_commitment_point_arg, long _second_per_commitment_point_arg, long _shutdown_scriptpubkey_arg, long _channel_type_arg, COption_NoneZ _require_confirmed_inputs_arg); + // MUST_USE_RES struct LDKAcceptChannelV2 AcceptChannelV2_new(struct LDKCommonAcceptChannelFields common_fields_arg, uint64_t funding_satoshis_arg, struct LDKPublicKey second_per_commitment_point_arg, enum LDKCOption_NoneZ require_confirmed_inputs_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_new")] public static extern long AcceptChannelV2_new(long _common_fields_arg, long _funding_satoshis_arg, long _second_per_commitment_point_arg, COption_NoneZ _require_confirmed_inputs_arg); // uint64_t AcceptChannelV2_clone_ptr(LDKAcceptChannelV2 *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_clone_ptr")] public static extern long AcceptChannelV2_clone_ptr(long _arg); // struct LDKAcceptChannelV2 AcceptChannelV2_clone(const struct LDKAcceptChannelV2 *NONNULL_PTR orig); @@ -7836,9 +8506,9 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannelV2_eq")] public static extern bool AcceptChannelV2_eq(long _a, long _b); // void FundingCreated_free(struct LDKFundingCreated this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_FundingCreated_free")] public static extern void FundingCreated_free(long _this_obj); - // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_FundingCreated_get_temporary_channel_id")] public static extern long FundingCreated_get_temporary_channel_id(long _this_ptr); - // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKChannelId val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_FundingCreated_set_temporary_channel_id")] public static extern void FundingCreated_set_temporary_channel_id(long _this_ptr, long _val); // const uint8_t (*FundingCreated_get_funding_txid(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32]; [DllImport ("ldkcsharp", EntryPoint="CS_LDK_FundingCreated_get_funding_txid")] public static extern long FundingCreated_get_funding_txid(long _this_ptr); @@ -7852,7 +8522,7 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_FundingCreated_get_signature")] public static extern long FundingCreated_get_signature(long _this_ptr); // void FundingCreated_set_signature(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKECDSASignature val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_FundingCreated_set_signature")] public static extern void FundingCreated_set_signature(long _this_ptr, long _val); - // MUST_USE_RES struct LDKFundingCreated FundingCreated_new(struct LDKThirtyTwoBytes temporary_channel_id_arg, struct LDKThirtyTwoBytes funding_txid_arg, uint16_t funding_output_index_arg, struct LDKECDSASignature signature_arg); + // MUST_USE_RES struct LDKFundingCreated FundingCreated_new(struct LDKChannelId temporary_channel_id_arg, struct LDKThirtyTwoBytes funding_txid_arg, uint16_t funding_output_index_arg, struct LDKECDSASignature signature_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_FundingCreated_new")] public static extern long FundingCreated_new(long _temporary_channel_id_arg, long _funding_txid_arg, short _funding_output_index_arg, long _signature_arg); // uint64_t FundingCreated_clone_ptr(LDKFundingCreated *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_FundingCreated_clone_ptr")] public static extern long FundingCreated_clone_ptr(long _arg); @@ -7864,15 +8534,15 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_FundingCreated_eq")] public static extern bool FundingCreated_eq(long _a, long _b); // void FundingSigned_free(struct LDKFundingSigned this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_FundingSigned_free")] public static extern void FundingSigned_free(long _this_obj); - // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_FundingSigned_get_channel_id")] public static extern long FundingSigned_get_channel_id(long _this_ptr); - // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKChannelId val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_FundingSigned_set_channel_id")] public static extern void FundingSigned_set_channel_id(long _this_ptr, long _val); // struct LDKECDSASignature FundingSigned_get_signature(const struct LDKFundingSigned *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_FundingSigned_get_signature")] public static extern long FundingSigned_get_signature(long _this_ptr); // void FundingSigned_set_signature(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKECDSASignature val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_FundingSigned_set_signature")] public static extern void FundingSigned_set_signature(long _this_ptr, long _val); - // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKECDSASignature signature_arg); + // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKChannelId channel_id_arg, struct LDKECDSASignature signature_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_FundingSigned_new")] public static extern long FundingSigned_new(long _channel_id_arg, long _signature_arg); // uint64_t FundingSigned_clone_ptr(LDKFundingSigned *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_FundingSigned_clone_ptr")] public static extern long FundingSigned_clone_ptr(long _arg); @@ -7884,9 +8554,9 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_FundingSigned_eq")] public static extern bool FundingSigned_eq(long _a, long _b); // void ChannelReady_free(struct LDKChannelReady this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelReady_free")] public static extern void ChannelReady_free(long _this_obj); - // const uint8_t (*ChannelReady_get_channel_id(const struct LDKChannelReady *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId ChannelReady_get_channel_id(const struct LDKChannelReady *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelReady_get_channel_id")] public static extern long ChannelReady_get_channel_id(long _this_ptr); - // void ChannelReady_set_channel_id(struct LDKChannelReady *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void ChannelReady_set_channel_id(struct LDKChannelReady *NONNULL_PTR this_ptr, struct LDKChannelId val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelReady_set_channel_id")] public static extern void ChannelReady_set_channel_id(long _this_ptr, long _val); // struct LDKPublicKey ChannelReady_get_next_per_commitment_point(const struct LDKChannelReady *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelReady_get_next_per_commitment_point")] public static extern long ChannelReady_get_next_per_commitment_point(long _this_ptr); @@ -7896,7 +8566,7 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelReady_get_short_channel_id_alias")] public static extern long ChannelReady_get_short_channel_id_alias(long _this_ptr); // void ChannelReady_set_short_channel_id_alias(struct LDKChannelReady *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelReady_set_short_channel_id_alias")] public static extern void ChannelReady_set_short_channel_id_alias(long _this_ptr, long _val); - // MUST_USE_RES struct LDKChannelReady ChannelReady_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg, struct LDKCOption_u64Z short_channel_id_alias_arg); + // MUST_USE_RES struct LDKChannelReady ChannelReady_new(struct LDKChannelId channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg, struct LDKCOption_u64Z short_channel_id_alias_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelReady_new")] public static extern long ChannelReady_new(long _channel_id_arg, long _next_per_commitment_point_arg, long _short_channel_id_alias_arg); // uint64_t ChannelReady_clone_ptr(LDKChannelReady *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelReady_clone_ptr")] public static extern long ChannelReady_clone_ptr(long _arg); @@ -7908,15 +8578,15 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelReady_eq")] public static extern bool ChannelReady_eq(long _a, long _b); // void Stfu_free(struct LDKStfu this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Stfu_free")] public static extern void Stfu_free(long _this_obj); - // const uint8_t (*Stfu_get_channel_id(const struct LDKStfu *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId Stfu_get_channel_id(const struct LDKStfu *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Stfu_get_channel_id")] public static extern long Stfu_get_channel_id(long _this_ptr); - // void Stfu_set_channel_id(struct LDKStfu *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void Stfu_set_channel_id(struct LDKStfu *NONNULL_PTR this_ptr, struct LDKChannelId val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Stfu_set_channel_id")] public static extern void Stfu_set_channel_id(long _this_ptr, long _val); // uint8_t Stfu_get_initiator(const struct LDKStfu *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Stfu_get_initiator")] public static extern byte Stfu_get_initiator(long _this_ptr); // void Stfu_set_initiator(struct LDKStfu *NONNULL_PTR this_ptr, uint8_t val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Stfu_set_initiator")] public static extern void Stfu_set_initiator(long _this_ptr, byte _val); - // MUST_USE_RES struct LDKStfu Stfu_new(struct LDKThirtyTwoBytes channel_id_arg, uint8_t initiator_arg); + // MUST_USE_RES struct LDKStfu Stfu_new(struct LDKChannelId channel_id_arg, uint8_t initiator_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Stfu_new")] public static extern long Stfu_new(long _channel_id_arg, byte _initiator_arg); // uint64_t Stfu_clone_ptr(LDKStfu *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Stfu_clone_ptr")] public static extern long Stfu_clone_ptr(long _arg); @@ -7926,9 +8596,9 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Stfu_eq")] public static extern bool Stfu_eq(long _a, long _b); // void Splice_free(struct LDKSplice this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Splice_free")] public static extern void Splice_free(long _this_obj); - // const uint8_t (*Splice_get_channel_id(const struct LDKSplice *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId Splice_get_channel_id(const struct LDKSplice *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Splice_get_channel_id")] public static extern long Splice_get_channel_id(long _this_ptr); - // void Splice_set_channel_id(struct LDKSplice *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void Splice_set_channel_id(struct LDKSplice *NONNULL_PTR this_ptr, struct LDKChannelId val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Splice_set_channel_id")] public static extern void Splice_set_channel_id(long _this_ptr, long _val); // const uint8_t (*Splice_get_chain_hash(const struct LDKSplice *NONNULL_PTR this_ptr))[32]; [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Splice_get_chain_hash")] public static extern long Splice_get_chain_hash(long _this_ptr); @@ -7950,7 +8620,7 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Splice_get_funding_pubkey")] public static extern long Splice_get_funding_pubkey(long _this_ptr); // void Splice_set_funding_pubkey(struct LDKSplice *NONNULL_PTR this_ptr, struct LDKPublicKey val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Splice_set_funding_pubkey")] public static extern void Splice_set_funding_pubkey(long _this_ptr, long _val); - // MUST_USE_RES struct LDKSplice Splice_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKThirtyTwoBytes chain_hash_arg, int64_t relative_satoshis_arg, uint32_t funding_feerate_perkw_arg, uint32_t locktime_arg, struct LDKPublicKey funding_pubkey_arg); + // MUST_USE_RES struct LDKSplice Splice_new(struct LDKChannelId channel_id_arg, struct LDKThirtyTwoBytes chain_hash_arg, int64_t relative_satoshis_arg, uint32_t funding_feerate_perkw_arg, uint32_t locktime_arg, struct LDKPublicKey funding_pubkey_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Splice_new")] public static extern long Splice_new(long _channel_id_arg, long _chain_hash_arg, long _relative_satoshis_arg, int _funding_feerate_perkw_arg, int _locktime_arg, long _funding_pubkey_arg); // uint64_t Splice_clone_ptr(LDKSplice *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Splice_clone_ptr")] public static extern long Splice_clone_ptr(long _arg); @@ -7960,9 +8630,9 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Splice_eq")] public static extern bool Splice_eq(long _a, long _b); // void SpliceAck_free(struct LDKSpliceAck this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SpliceAck_free")] public static extern void SpliceAck_free(long _this_obj); - // const uint8_t (*SpliceAck_get_channel_id(const struct LDKSpliceAck *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId SpliceAck_get_channel_id(const struct LDKSpliceAck *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SpliceAck_get_channel_id")] public static extern long SpliceAck_get_channel_id(long _this_ptr); - // void SpliceAck_set_channel_id(struct LDKSpliceAck *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void SpliceAck_set_channel_id(struct LDKSpliceAck *NONNULL_PTR this_ptr, struct LDKChannelId val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SpliceAck_set_channel_id")] public static extern void SpliceAck_set_channel_id(long _this_ptr, long _val); // const uint8_t (*SpliceAck_get_chain_hash(const struct LDKSpliceAck *NONNULL_PTR this_ptr))[32]; [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SpliceAck_get_chain_hash")] public static extern long SpliceAck_get_chain_hash(long _this_ptr); @@ -7976,7 +8646,7 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SpliceAck_get_funding_pubkey")] public static extern long SpliceAck_get_funding_pubkey(long _this_ptr); // void SpliceAck_set_funding_pubkey(struct LDKSpliceAck *NONNULL_PTR this_ptr, struct LDKPublicKey val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SpliceAck_set_funding_pubkey")] public static extern void SpliceAck_set_funding_pubkey(long _this_ptr, long _val); - // MUST_USE_RES struct LDKSpliceAck SpliceAck_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKThirtyTwoBytes chain_hash_arg, int64_t relative_satoshis_arg, struct LDKPublicKey funding_pubkey_arg); + // MUST_USE_RES struct LDKSpliceAck SpliceAck_new(struct LDKChannelId channel_id_arg, struct LDKThirtyTwoBytes chain_hash_arg, int64_t relative_satoshis_arg, struct LDKPublicKey funding_pubkey_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SpliceAck_new")] public static extern long SpliceAck_new(long _channel_id_arg, long _chain_hash_arg, long _relative_satoshis_arg, long _funding_pubkey_arg); // uint64_t SpliceAck_clone_ptr(LDKSpliceAck *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SpliceAck_clone_ptr")] public static extern long SpliceAck_clone_ptr(long _arg); @@ -7986,11 +8656,11 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SpliceAck_eq")] public static extern bool SpliceAck_eq(long _a, long _b); // void SpliceLocked_free(struct LDKSpliceLocked this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SpliceLocked_free")] public static extern void SpliceLocked_free(long _this_obj); - // const uint8_t (*SpliceLocked_get_channel_id(const struct LDKSpliceLocked *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId SpliceLocked_get_channel_id(const struct LDKSpliceLocked *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SpliceLocked_get_channel_id")] public static extern long SpliceLocked_get_channel_id(long _this_ptr); - // void SpliceLocked_set_channel_id(struct LDKSpliceLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void SpliceLocked_set_channel_id(struct LDKSpliceLocked *NONNULL_PTR this_ptr, struct LDKChannelId val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SpliceLocked_set_channel_id")] public static extern void SpliceLocked_set_channel_id(long _this_ptr, long _val); - // MUST_USE_RES struct LDKSpliceLocked SpliceLocked_new(struct LDKThirtyTwoBytes channel_id_arg); + // MUST_USE_RES struct LDKSpliceLocked SpliceLocked_new(struct LDKChannelId channel_id_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SpliceLocked_new")] public static extern long SpliceLocked_new(long _channel_id_arg); // uint64_t SpliceLocked_clone_ptr(LDKSpliceLocked *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SpliceLocked_clone_ptr")] public static extern long SpliceLocked_clone_ptr(long _arg); @@ -8000,9 +8670,9 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SpliceLocked_eq")] public static extern bool SpliceLocked_eq(long _a, long _b); // void TxAddInput_free(struct LDKTxAddInput this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxAddInput_free")] public static extern void TxAddInput_free(long _this_obj); - // const uint8_t (*TxAddInput_get_channel_id(const struct LDKTxAddInput *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId TxAddInput_get_channel_id(const struct LDKTxAddInput *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxAddInput_get_channel_id")] public static extern long TxAddInput_get_channel_id(long _this_ptr); - // void TxAddInput_set_channel_id(struct LDKTxAddInput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void TxAddInput_set_channel_id(struct LDKTxAddInput *NONNULL_PTR this_ptr, struct LDKChannelId val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxAddInput_set_channel_id")] public static extern void TxAddInput_set_channel_id(long _this_ptr, long _val); // uint64_t TxAddInput_get_serial_id(const struct LDKTxAddInput *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxAddInput_get_serial_id")] public static extern long TxAddInput_get_serial_id(long _this_ptr); @@ -8020,7 +8690,7 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxAddInput_get_sequence")] public static extern int TxAddInput_get_sequence(long _this_ptr); // void TxAddInput_set_sequence(struct LDKTxAddInput *NONNULL_PTR this_ptr, uint32_t val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxAddInput_set_sequence")] public static extern void TxAddInput_set_sequence(long _this_ptr, int _val); - // MUST_USE_RES struct LDKTxAddInput TxAddInput_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t serial_id_arg, struct LDKTransactionU16LenLimited prevtx_arg, uint32_t prevtx_out_arg, uint32_t sequence_arg); + // MUST_USE_RES struct LDKTxAddInput TxAddInput_new(struct LDKChannelId channel_id_arg, uint64_t serial_id_arg, struct LDKTransactionU16LenLimited prevtx_arg, uint32_t prevtx_out_arg, uint32_t sequence_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxAddInput_new")] public static extern long TxAddInput_new(long _channel_id_arg, long _serial_id_arg, long _prevtx_arg, int _prevtx_out_arg, int _sequence_arg); // uint64_t TxAddInput_clone_ptr(LDKTxAddInput *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxAddInput_clone_ptr")] public static extern long TxAddInput_clone_ptr(long _arg); @@ -8032,9 +8702,9 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxAddInput_eq")] public static extern bool TxAddInput_eq(long _a, long _b); // void TxAddOutput_free(struct LDKTxAddOutput this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxAddOutput_free")] public static extern void TxAddOutput_free(long _this_obj); - // const uint8_t (*TxAddOutput_get_channel_id(const struct LDKTxAddOutput *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId TxAddOutput_get_channel_id(const struct LDKTxAddOutput *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxAddOutput_get_channel_id")] public static extern long TxAddOutput_get_channel_id(long _this_ptr); - // void TxAddOutput_set_channel_id(struct LDKTxAddOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void TxAddOutput_set_channel_id(struct LDKTxAddOutput *NONNULL_PTR this_ptr, struct LDKChannelId val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxAddOutput_set_channel_id")] public static extern void TxAddOutput_set_channel_id(long _this_ptr, long _val); // uint64_t TxAddOutput_get_serial_id(const struct LDKTxAddOutput *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxAddOutput_get_serial_id")] public static extern long TxAddOutput_get_serial_id(long _this_ptr); @@ -8048,7 +8718,7 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxAddOutput_get_script")] public static extern long TxAddOutput_get_script(long _this_ptr); // void TxAddOutput_set_script(struct LDKTxAddOutput *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxAddOutput_set_script")] public static extern void TxAddOutput_set_script(long _this_ptr, long _val); - // MUST_USE_RES struct LDKTxAddOutput TxAddOutput_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t serial_id_arg, uint64_t sats_arg, struct LDKCVec_u8Z script_arg); + // MUST_USE_RES struct LDKTxAddOutput TxAddOutput_new(struct LDKChannelId channel_id_arg, uint64_t serial_id_arg, uint64_t sats_arg, struct LDKCVec_u8Z script_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxAddOutput_new")] public static extern long TxAddOutput_new(long _channel_id_arg, long _serial_id_arg, long _sats_arg, long _script_arg); // uint64_t TxAddOutput_clone_ptr(LDKTxAddOutput *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxAddOutput_clone_ptr")] public static extern long TxAddOutput_clone_ptr(long _arg); @@ -8060,15 +8730,15 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxAddOutput_eq")] public static extern bool TxAddOutput_eq(long _a, long _b); // void TxRemoveInput_free(struct LDKTxRemoveInput this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxRemoveInput_free")] public static extern void TxRemoveInput_free(long _this_obj); - // const uint8_t (*TxRemoveInput_get_channel_id(const struct LDKTxRemoveInput *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId TxRemoveInput_get_channel_id(const struct LDKTxRemoveInput *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxRemoveInput_get_channel_id")] public static extern long TxRemoveInput_get_channel_id(long _this_ptr); - // void TxRemoveInput_set_channel_id(struct LDKTxRemoveInput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void TxRemoveInput_set_channel_id(struct LDKTxRemoveInput *NONNULL_PTR this_ptr, struct LDKChannelId val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxRemoveInput_set_channel_id")] public static extern void TxRemoveInput_set_channel_id(long _this_ptr, long _val); // uint64_t TxRemoveInput_get_serial_id(const struct LDKTxRemoveInput *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxRemoveInput_get_serial_id")] public static extern long TxRemoveInput_get_serial_id(long _this_ptr); // void TxRemoveInput_set_serial_id(struct LDKTxRemoveInput *NONNULL_PTR this_ptr, uint64_t val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxRemoveInput_set_serial_id")] public static extern void TxRemoveInput_set_serial_id(long _this_ptr, long _val); - // MUST_USE_RES struct LDKTxRemoveInput TxRemoveInput_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t serial_id_arg); + // MUST_USE_RES struct LDKTxRemoveInput TxRemoveInput_new(struct LDKChannelId channel_id_arg, uint64_t serial_id_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxRemoveInput_new")] public static extern long TxRemoveInput_new(long _channel_id_arg, long _serial_id_arg); // uint64_t TxRemoveInput_clone_ptr(LDKTxRemoveInput *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxRemoveInput_clone_ptr")] public static extern long TxRemoveInput_clone_ptr(long _arg); @@ -8080,15 +8750,15 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxRemoveInput_eq")] public static extern bool TxRemoveInput_eq(long _a, long _b); // void TxRemoveOutput_free(struct LDKTxRemoveOutput this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxRemoveOutput_free")] public static extern void TxRemoveOutput_free(long _this_obj); - // const uint8_t (*TxRemoveOutput_get_channel_id(const struct LDKTxRemoveOutput *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId TxRemoveOutput_get_channel_id(const struct LDKTxRemoveOutput *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxRemoveOutput_get_channel_id")] public static extern long TxRemoveOutput_get_channel_id(long _this_ptr); - // void TxRemoveOutput_set_channel_id(struct LDKTxRemoveOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void TxRemoveOutput_set_channel_id(struct LDKTxRemoveOutput *NONNULL_PTR this_ptr, struct LDKChannelId val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxRemoveOutput_set_channel_id")] public static extern void TxRemoveOutput_set_channel_id(long _this_ptr, long _val); // uint64_t TxRemoveOutput_get_serial_id(const struct LDKTxRemoveOutput *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxRemoveOutput_get_serial_id")] public static extern long TxRemoveOutput_get_serial_id(long _this_ptr); // void TxRemoveOutput_set_serial_id(struct LDKTxRemoveOutput *NONNULL_PTR this_ptr, uint64_t val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxRemoveOutput_set_serial_id")] public static extern void TxRemoveOutput_set_serial_id(long _this_ptr, long _val); - // MUST_USE_RES struct LDKTxRemoveOutput TxRemoveOutput_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t serial_id_arg); + // MUST_USE_RES struct LDKTxRemoveOutput TxRemoveOutput_new(struct LDKChannelId channel_id_arg, uint64_t serial_id_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxRemoveOutput_new")] public static extern long TxRemoveOutput_new(long _channel_id_arg, long _serial_id_arg); // uint64_t TxRemoveOutput_clone_ptr(LDKTxRemoveOutput *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxRemoveOutput_clone_ptr")] public static extern long TxRemoveOutput_clone_ptr(long _arg); @@ -8100,11 +8770,11 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxRemoveOutput_eq")] public static extern bool TxRemoveOutput_eq(long _a, long _b); // void TxComplete_free(struct LDKTxComplete this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxComplete_free")] public static extern void TxComplete_free(long _this_obj); - // const uint8_t (*TxComplete_get_channel_id(const struct LDKTxComplete *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId TxComplete_get_channel_id(const struct LDKTxComplete *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxComplete_get_channel_id")] public static extern long TxComplete_get_channel_id(long _this_ptr); - // void TxComplete_set_channel_id(struct LDKTxComplete *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void TxComplete_set_channel_id(struct LDKTxComplete *NONNULL_PTR this_ptr, struct LDKChannelId val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxComplete_set_channel_id")] public static extern void TxComplete_set_channel_id(long _this_ptr, long _val); - // MUST_USE_RES struct LDKTxComplete TxComplete_new(struct LDKThirtyTwoBytes channel_id_arg); + // MUST_USE_RES struct LDKTxComplete TxComplete_new(struct LDKChannelId channel_id_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxComplete_new")] public static extern long TxComplete_new(long _channel_id_arg); // uint64_t TxComplete_clone_ptr(LDKTxComplete *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxComplete_clone_ptr")] public static extern long TxComplete_clone_ptr(long _arg); @@ -8116,9 +8786,9 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxComplete_eq")] public static extern bool TxComplete_eq(long _a, long _b); // void TxSignatures_free(struct LDKTxSignatures this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxSignatures_free")] public static extern void TxSignatures_free(long _this_obj); - // const uint8_t (*TxSignatures_get_channel_id(const struct LDKTxSignatures *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId TxSignatures_get_channel_id(const struct LDKTxSignatures *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxSignatures_get_channel_id")] public static extern long TxSignatures_get_channel_id(long _this_ptr); - // void TxSignatures_set_channel_id(struct LDKTxSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void TxSignatures_set_channel_id(struct LDKTxSignatures *NONNULL_PTR this_ptr, struct LDKChannelId val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxSignatures_set_channel_id")] public static extern void TxSignatures_set_channel_id(long _this_ptr, long _val); // const uint8_t (*TxSignatures_get_tx_hash(const struct LDKTxSignatures *NONNULL_PTR this_ptr))[32]; [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxSignatures_get_tx_hash")] public static extern long TxSignatures_get_tx_hash(long _this_ptr); @@ -8128,8 +8798,12 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxSignatures_get_witnesses")] public static extern long TxSignatures_get_witnesses(long _this_ptr); // void TxSignatures_set_witnesses(struct LDKTxSignatures *NONNULL_PTR this_ptr, struct LDKCVec_WitnessZ val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxSignatures_set_witnesses")] public static extern void TxSignatures_set_witnesses(long _this_ptr, long _val); - // MUST_USE_RES struct LDKTxSignatures TxSignatures_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKThirtyTwoBytes tx_hash_arg, struct LDKCVec_WitnessZ witnesses_arg); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxSignatures_new")] public static extern long TxSignatures_new(long _channel_id_arg, long _tx_hash_arg, long _witnesses_arg); + // struct LDKCOption_ECDSASignatureZ TxSignatures_get_funding_outpoint_sig(const struct LDKTxSignatures *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxSignatures_get_funding_outpoint_sig")] public static extern long TxSignatures_get_funding_outpoint_sig(long _this_ptr); + // void TxSignatures_set_funding_outpoint_sig(struct LDKTxSignatures *NONNULL_PTR this_ptr, struct LDKCOption_ECDSASignatureZ val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxSignatures_set_funding_outpoint_sig")] public static extern void TxSignatures_set_funding_outpoint_sig(long _this_ptr, long _val); + // MUST_USE_RES struct LDKTxSignatures TxSignatures_new(struct LDKChannelId channel_id_arg, struct LDKThirtyTwoBytes tx_hash_arg, struct LDKCVec_WitnessZ witnesses_arg, struct LDKCOption_ECDSASignatureZ funding_outpoint_sig_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxSignatures_new")] public static extern long TxSignatures_new(long _channel_id_arg, long _tx_hash_arg, long _witnesses_arg, long _funding_outpoint_sig_arg); // uint64_t TxSignatures_clone_ptr(LDKTxSignatures *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxSignatures_clone_ptr")] public static extern long TxSignatures_clone_ptr(long _arg); // struct LDKTxSignatures TxSignatures_clone(const struct LDKTxSignatures *NONNULL_PTR orig); @@ -8140,9 +8814,9 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxSignatures_eq")] public static extern bool TxSignatures_eq(long _a, long _b); // void TxInitRbf_free(struct LDKTxInitRbf this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxInitRbf_free")] public static extern void TxInitRbf_free(long _this_obj); - // const uint8_t (*TxInitRbf_get_channel_id(const struct LDKTxInitRbf *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId TxInitRbf_get_channel_id(const struct LDKTxInitRbf *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxInitRbf_get_channel_id")] public static extern long TxInitRbf_get_channel_id(long _this_ptr); - // void TxInitRbf_set_channel_id(struct LDKTxInitRbf *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void TxInitRbf_set_channel_id(struct LDKTxInitRbf *NONNULL_PTR this_ptr, struct LDKChannelId val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxInitRbf_set_channel_id")] public static extern void TxInitRbf_set_channel_id(long _this_ptr, long _val); // uint32_t TxInitRbf_get_locktime(const struct LDKTxInitRbf *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxInitRbf_get_locktime")] public static extern int TxInitRbf_get_locktime(long _this_ptr); @@ -8156,7 +8830,7 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxInitRbf_get_funding_output_contribution")] public static extern long TxInitRbf_get_funding_output_contribution(long _this_ptr); // void TxInitRbf_set_funding_output_contribution(struct LDKTxInitRbf *NONNULL_PTR this_ptr, struct LDKCOption_i64Z val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxInitRbf_set_funding_output_contribution")] public static extern void TxInitRbf_set_funding_output_contribution(long _this_ptr, long _val); - // MUST_USE_RES struct LDKTxInitRbf TxInitRbf_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t locktime_arg, uint32_t feerate_sat_per_1000_weight_arg, struct LDKCOption_i64Z funding_output_contribution_arg); + // MUST_USE_RES struct LDKTxInitRbf TxInitRbf_new(struct LDKChannelId channel_id_arg, uint32_t locktime_arg, uint32_t feerate_sat_per_1000_weight_arg, struct LDKCOption_i64Z funding_output_contribution_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxInitRbf_new")] public static extern long TxInitRbf_new(long _channel_id_arg, int _locktime_arg, int _feerate_sat_per_1000_weight_arg, long _funding_output_contribution_arg); // uint64_t TxInitRbf_clone_ptr(LDKTxInitRbf *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxInitRbf_clone_ptr")] public static extern long TxInitRbf_clone_ptr(long _arg); @@ -8168,15 +8842,15 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxInitRbf_eq")] public static extern bool TxInitRbf_eq(long _a, long _b); // void TxAckRbf_free(struct LDKTxAckRbf this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxAckRbf_free")] public static extern void TxAckRbf_free(long _this_obj); - // const uint8_t (*TxAckRbf_get_channel_id(const struct LDKTxAckRbf *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId TxAckRbf_get_channel_id(const struct LDKTxAckRbf *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxAckRbf_get_channel_id")] public static extern long TxAckRbf_get_channel_id(long _this_ptr); - // void TxAckRbf_set_channel_id(struct LDKTxAckRbf *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void TxAckRbf_set_channel_id(struct LDKTxAckRbf *NONNULL_PTR this_ptr, struct LDKChannelId val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxAckRbf_set_channel_id")] public static extern void TxAckRbf_set_channel_id(long _this_ptr, long _val); // struct LDKCOption_i64Z TxAckRbf_get_funding_output_contribution(const struct LDKTxAckRbf *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxAckRbf_get_funding_output_contribution")] public static extern long TxAckRbf_get_funding_output_contribution(long _this_ptr); // void TxAckRbf_set_funding_output_contribution(struct LDKTxAckRbf *NONNULL_PTR this_ptr, struct LDKCOption_i64Z val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxAckRbf_set_funding_output_contribution")] public static extern void TxAckRbf_set_funding_output_contribution(long _this_ptr, long _val); - // MUST_USE_RES struct LDKTxAckRbf TxAckRbf_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCOption_i64Z funding_output_contribution_arg); + // MUST_USE_RES struct LDKTxAckRbf TxAckRbf_new(struct LDKChannelId channel_id_arg, struct LDKCOption_i64Z funding_output_contribution_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxAckRbf_new")] public static extern long TxAckRbf_new(long _channel_id_arg, long _funding_output_contribution_arg); // uint64_t TxAckRbf_clone_ptr(LDKTxAckRbf *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxAckRbf_clone_ptr")] public static extern long TxAckRbf_clone_ptr(long _arg); @@ -8188,15 +8862,15 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxAckRbf_eq")] public static extern bool TxAckRbf_eq(long _a, long _b); // void TxAbort_free(struct LDKTxAbort this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxAbort_free")] public static extern void TxAbort_free(long _this_obj); - // const uint8_t (*TxAbort_get_channel_id(const struct LDKTxAbort *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId TxAbort_get_channel_id(const struct LDKTxAbort *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxAbort_get_channel_id")] public static extern long TxAbort_get_channel_id(long _this_ptr); - // void TxAbort_set_channel_id(struct LDKTxAbort *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void TxAbort_set_channel_id(struct LDKTxAbort *NONNULL_PTR this_ptr, struct LDKChannelId val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxAbort_set_channel_id")] public static extern void TxAbort_set_channel_id(long _this_ptr, long _val); // struct LDKCVec_u8Z TxAbort_get_data(const struct LDKTxAbort *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxAbort_get_data")] public static extern long TxAbort_get_data(long _this_ptr); // void TxAbort_set_data(struct LDKTxAbort *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxAbort_set_data")] public static extern void TxAbort_set_data(long _this_ptr, long _val); - // MUST_USE_RES struct LDKTxAbort TxAbort_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z data_arg); + // MUST_USE_RES struct LDKTxAbort TxAbort_new(struct LDKChannelId channel_id_arg, struct LDKCVec_u8Z data_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxAbort_new")] public static extern long TxAbort_new(long _channel_id_arg, long _data_arg); // uint64_t TxAbort_clone_ptr(LDKTxAbort *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxAbort_clone_ptr")] public static extern long TxAbort_clone_ptr(long _arg); @@ -8208,15 +8882,15 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TxAbort_eq")] public static extern bool TxAbort_eq(long _a, long _b); // void Shutdown_free(struct LDKShutdown this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Shutdown_free")] public static extern void Shutdown_free(long _this_obj); - // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Shutdown_get_channel_id")] public static extern long Shutdown_get_channel_id(long _this_ptr); - // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKChannelId val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Shutdown_set_channel_id")] public static extern void Shutdown_set_channel_id(long _this_ptr, long _val); // struct LDKCVec_u8Z Shutdown_get_scriptpubkey(const struct LDKShutdown *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Shutdown_get_scriptpubkey")] public static extern long Shutdown_get_scriptpubkey(long _this_ptr); // void Shutdown_set_scriptpubkey(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Shutdown_set_scriptpubkey")] public static extern void Shutdown_set_scriptpubkey(long _this_ptr, long _val); - // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg); + // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKChannelId channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Shutdown_new")] public static extern long Shutdown_new(long _channel_id_arg, long _scriptpubkey_arg); // uint64_t Shutdown_clone_ptr(LDKShutdown *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Shutdown_clone_ptr")] public static extern long Shutdown_clone_ptr(long _arg); @@ -8248,9 +8922,9 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ClosingSignedFeeRange_eq")] public static extern bool ClosingSignedFeeRange_eq(long _a, long _b); // void ClosingSigned_free(struct LDKClosingSigned this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ClosingSigned_free")] public static extern void ClosingSigned_free(long _this_obj); - // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ClosingSigned_get_channel_id")] public static extern long ClosingSigned_get_channel_id(long _this_ptr); - // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKChannelId val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ClosingSigned_set_channel_id")] public static extern void ClosingSigned_set_channel_id(long _this_ptr, long _val); // uint64_t ClosingSigned_get_fee_satoshis(const struct LDKClosingSigned *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ClosingSigned_get_fee_satoshis")] public static extern long ClosingSigned_get_fee_satoshis(long _this_ptr); @@ -8264,7 +8938,7 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ClosingSigned_get_fee_range")] public static extern long ClosingSigned_get_fee_range(long _this_ptr); // void ClosingSigned_set_fee_range(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKClosingSignedFeeRange val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ClosingSigned_set_fee_range")] public static extern void ClosingSigned_set_fee_range(long _this_ptr, long _val); - // MUST_USE_RES struct LDKClosingSigned ClosingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t fee_satoshis_arg, struct LDKECDSASignature signature_arg, struct LDKClosingSignedFeeRange fee_range_arg); + // MUST_USE_RES struct LDKClosingSigned ClosingSigned_new(struct LDKChannelId channel_id_arg, uint64_t fee_satoshis_arg, struct LDKECDSASignature signature_arg, struct LDKClosingSignedFeeRange fee_range_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ClosingSigned_new")] public static extern long ClosingSigned_new(long _channel_id_arg, long _fee_satoshis_arg, long _signature_arg, long _fee_range_arg); // uint64_t ClosingSigned_clone_ptr(LDKClosingSigned *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ClosingSigned_clone_ptr")] public static extern long ClosingSigned_clone_ptr(long _arg); @@ -8276,9 +8950,9 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ClosingSigned_eq")] public static extern bool ClosingSigned_eq(long _a, long _b); // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateAddHTLC_free")] public static extern void UpdateAddHTLC_free(long _this_obj); - // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateAddHTLC_get_channel_id")] public static extern long UpdateAddHTLC_get_channel_id(long _this_ptr); - // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKChannelId val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateAddHTLC_set_channel_id")] public static extern void UpdateAddHTLC_set_channel_id(long _this_ptr, long _val); // uint64_t UpdateAddHTLC_get_htlc_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateAddHTLC_get_htlc_id")] public static extern long UpdateAddHTLC_get_htlc_id(long _this_ptr); @@ -8308,7 +8982,7 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateAddHTLC_get_blinding_point")] public static extern long UpdateAddHTLC_get_blinding_point(long _this_ptr); // void UpdateAddHTLC_set_blinding_point(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKPublicKey val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateAddHTLC_set_blinding_point")] public static extern void UpdateAddHTLC_set_blinding_point(long _this_ptr, long _val); - // MUST_USE_RES struct LDKUpdateAddHTLC UpdateAddHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, uint64_t amount_msat_arg, struct LDKThirtyTwoBytes payment_hash_arg, uint32_t cltv_expiry_arg, struct LDKCOption_u64Z skimmed_fee_msat_arg, struct LDKOnionPacket onion_routing_packet_arg, struct LDKPublicKey blinding_point_arg); + // MUST_USE_RES struct LDKUpdateAddHTLC UpdateAddHTLC_new(struct LDKChannelId channel_id_arg, uint64_t htlc_id_arg, uint64_t amount_msat_arg, struct LDKThirtyTwoBytes payment_hash_arg, uint32_t cltv_expiry_arg, struct LDKCOption_u64Z skimmed_fee_msat_arg, struct LDKOnionPacket onion_routing_packet_arg, struct LDKPublicKey blinding_point_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateAddHTLC_new")] public static extern long UpdateAddHTLC_new(long _channel_id_arg, long _htlc_id_arg, long _amount_msat_arg, long _payment_hash_arg, int _cltv_expiry_arg, long _skimmed_fee_msat_arg, long _onion_routing_packet_arg, long _blinding_point_arg); // uint64_t UpdateAddHTLC_clone_ptr(LDKUpdateAddHTLC *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateAddHTLC_clone_ptr")] public static extern long UpdateAddHTLC_clone_ptr(long _arg); @@ -8340,9 +9014,9 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OnionMessage_eq")] public static extern bool OnionMessage_eq(long _a, long _b); // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateFulfillHTLC_free")] public static extern void UpdateFulfillHTLC_free(long _this_obj); - // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateFulfillHTLC_get_channel_id")] public static extern long UpdateFulfillHTLC_get_channel_id(long _this_ptr); - // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKChannelId val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateFulfillHTLC_set_channel_id")] public static extern void UpdateFulfillHTLC_set_channel_id(long _this_ptr, long _val); // uint64_t UpdateFulfillHTLC_get_htlc_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateFulfillHTLC_get_htlc_id")] public static extern long UpdateFulfillHTLC_get_htlc_id(long _this_ptr); @@ -8352,7 +9026,7 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateFulfillHTLC_get_payment_preimage")] public static extern long UpdateFulfillHTLC_get_payment_preimage(long _this_ptr); // void UpdateFulfillHTLC_set_payment_preimage(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateFulfillHTLC_set_payment_preimage")] public static extern void UpdateFulfillHTLC_set_payment_preimage(long _this_ptr, long _val); - // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg); + // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKChannelId channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateFulfillHTLC_new")] public static extern long UpdateFulfillHTLC_new(long _channel_id_arg, long _htlc_id_arg, long _payment_preimage_arg); // uint64_t UpdateFulfillHTLC_clone_ptr(LDKUpdateFulfillHTLC *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateFulfillHTLC_clone_ptr")] public static extern long UpdateFulfillHTLC_clone_ptr(long _arg); @@ -8364,9 +9038,9 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateFulfillHTLC_eq")] public static extern bool UpdateFulfillHTLC_eq(long _a, long _b); // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateFailHTLC_free")] public static extern void UpdateFailHTLC_free(long _this_obj); - // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateFailHTLC_get_channel_id")] public static extern long UpdateFailHTLC_get_channel_id(long _this_ptr); - // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKChannelId val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateFailHTLC_set_channel_id")] public static extern void UpdateFailHTLC_set_channel_id(long _this_ptr, long _val); // uint64_t UpdateFailHTLC_get_htlc_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateFailHTLC_get_htlc_id")] public static extern long UpdateFailHTLC_get_htlc_id(long _this_ptr); @@ -8382,9 +9056,9 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateFailHTLC_eq")] public static extern bool UpdateFailHTLC_eq(long _a, long _b); // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateFailMalformedHTLC_free")] public static extern void UpdateFailMalformedHTLC_free(long _this_obj); - // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateFailMalformedHTLC_get_channel_id")] public static extern long UpdateFailMalformedHTLC_get_channel_id(long _this_ptr); - // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKChannelId val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateFailMalformedHTLC_set_channel_id")] public static extern void UpdateFailMalformedHTLC_set_channel_id(long _this_ptr, long _val); // uint64_t UpdateFailMalformedHTLC_get_htlc_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateFailMalformedHTLC_get_htlc_id")] public static extern long UpdateFailMalformedHTLC_get_htlc_id(long _this_ptr); @@ -8404,9 +9078,9 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateFailMalformedHTLC_eq")] public static extern bool UpdateFailMalformedHTLC_eq(long _a, long _b); // void CommitmentSigned_free(struct LDKCommitmentSigned this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommitmentSigned_free")] public static extern void CommitmentSigned_free(long _this_obj); - // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommitmentSigned_get_channel_id")] public static extern long CommitmentSigned_get_channel_id(long _this_ptr); - // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKChannelId val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommitmentSigned_set_channel_id")] public static extern void CommitmentSigned_set_channel_id(long _this_ptr, long _val); // struct LDKECDSASignature CommitmentSigned_get_signature(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommitmentSigned_get_signature")] public static extern long CommitmentSigned_get_signature(long _this_ptr); @@ -8416,7 +9090,7 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommitmentSigned_get_htlc_signatures")] public static extern long CommitmentSigned_get_htlc_signatures(long _this_ptr); // void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_ECDSASignatureZ val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommitmentSigned_set_htlc_signatures")] public static extern void CommitmentSigned_set_htlc_signatures(long _this_ptr, long _val); - // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKECDSASignature signature_arg, struct LDKCVec_ECDSASignatureZ htlc_signatures_arg); + // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKChannelId channel_id_arg, struct LDKECDSASignature signature_arg, struct LDKCVec_ECDSASignatureZ htlc_signatures_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommitmentSigned_new")] public static extern long CommitmentSigned_new(long _channel_id_arg, long _signature_arg, long _htlc_signatures_arg); // uint64_t CommitmentSigned_clone_ptr(LDKCommitmentSigned *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommitmentSigned_clone_ptr")] public static extern long CommitmentSigned_clone_ptr(long _arg); @@ -8428,9 +9102,9 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CommitmentSigned_eq")] public static extern bool CommitmentSigned_eq(long _a, long _b); // void RevokeAndACK_free(struct LDKRevokeAndACK this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RevokeAndACK_free")] public static extern void RevokeAndACK_free(long _this_obj); - // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RevokeAndACK_get_channel_id")] public static extern long RevokeAndACK_get_channel_id(long _this_ptr); - // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKChannelId val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RevokeAndACK_set_channel_id")] public static extern void RevokeAndACK_set_channel_id(long _this_ptr, long _val); // const uint8_t (*RevokeAndACK_get_per_commitment_secret(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32]; [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RevokeAndACK_get_per_commitment_secret")] public static extern long RevokeAndACK_get_per_commitment_secret(long _this_ptr); @@ -8440,7 +9114,7 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RevokeAndACK_get_next_per_commitment_point")] public static extern long RevokeAndACK_get_next_per_commitment_point(long _this_ptr); // void RevokeAndACK_set_next_per_commitment_point(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKPublicKey val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RevokeAndACK_set_next_per_commitment_point")] public static extern void RevokeAndACK_set_next_per_commitment_point(long _this_ptr, long _val); - // MUST_USE_RES struct LDKRevokeAndACK RevokeAndACK_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKThirtyTwoBytes per_commitment_secret_arg, struct LDKPublicKey next_per_commitment_point_arg); + // MUST_USE_RES struct LDKRevokeAndACK RevokeAndACK_new(struct LDKChannelId channel_id_arg, struct LDKThirtyTwoBytes per_commitment_secret_arg, struct LDKPublicKey next_per_commitment_point_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RevokeAndACK_new")] public static extern long RevokeAndACK_new(long _channel_id_arg, long _per_commitment_secret_arg, long _next_per_commitment_point_arg); // uint64_t RevokeAndACK_clone_ptr(LDKRevokeAndACK *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RevokeAndACK_clone_ptr")] public static extern long RevokeAndACK_clone_ptr(long _arg); @@ -8452,15 +9126,15 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RevokeAndACK_eq")] public static extern bool RevokeAndACK_eq(long _a, long _b); // void UpdateFee_free(struct LDKUpdateFee this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateFee_free")] public static extern void UpdateFee_free(long _this_obj); - // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateFee_get_channel_id")] public static extern long UpdateFee_get_channel_id(long _this_ptr); - // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKChannelId val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateFee_set_channel_id")] public static extern void UpdateFee_set_channel_id(long _this_ptr, long _val); // uint32_t UpdateFee_get_feerate_per_kw(const struct LDKUpdateFee *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateFee_get_feerate_per_kw")] public static extern int UpdateFee_get_feerate_per_kw(long _this_ptr); // void UpdateFee_set_feerate_per_kw(struct LDKUpdateFee *NONNULL_PTR this_ptr, uint32_t val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateFee_set_feerate_per_kw")] public static extern void UpdateFee_set_feerate_per_kw(long _this_ptr, int _val); - // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg); + // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKChannelId channel_id_arg, uint32_t feerate_per_kw_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateFee_new")] public static extern long UpdateFee_new(long _channel_id_arg, int _feerate_per_kw_arg); // uint64_t UpdateFee_clone_ptr(LDKUpdateFee *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateFee_clone_ptr")] public static extern long UpdateFee_clone_ptr(long _arg); @@ -8472,9 +9146,9 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateFee_eq")] public static extern bool UpdateFee_eq(long _a, long _b); // void ChannelReestablish_free(struct LDKChannelReestablish this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelReestablish_free")] public static extern void ChannelReestablish_free(long _this_obj); - // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelReestablish_get_channel_id")] public static extern long ChannelReestablish_get_channel_id(long _this_ptr); - // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKChannelId val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelReestablish_set_channel_id")] public static extern void ChannelReestablish_set_channel_id(long _this_ptr, long _val); // uint64_t ChannelReestablish_get_next_local_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelReestablish_get_next_local_commitment_number")] public static extern long ChannelReestablish_get_next_local_commitment_number(long _this_ptr); @@ -8496,7 +9170,7 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelReestablish_get_next_funding_txid")] public static extern long ChannelReestablish_get_next_funding_txid(long _this_ptr); // void ChannelReestablish_set_next_funding_txid(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKCOption_ThirtyTwoBytesZ val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelReestablish_set_next_funding_txid")] public static extern void ChannelReestablish_set_next_funding_txid(long _this_ptr, long _val); - // MUST_USE_RES struct LDKChannelReestablish ChannelReestablish_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t next_local_commitment_number_arg, uint64_t next_remote_commitment_number_arg, struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg, struct LDKCOption_ThirtyTwoBytesZ next_funding_txid_arg); + // MUST_USE_RES struct LDKChannelReestablish ChannelReestablish_new(struct LDKChannelId channel_id_arg, uint64_t next_local_commitment_number_arg, uint64_t next_remote_commitment_number_arg, struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg, struct LDKCOption_ThirtyTwoBytesZ next_funding_txid_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelReestablish_new")] public static extern long ChannelReestablish_new(long _channel_id_arg, long _next_local_commitment_number_arg, long _next_remote_commitment_number_arg, long _your_last_per_commitment_secret_arg, long _my_current_per_commitment_point_arg, long _next_funding_txid_arg); // uint64_t ChannelReestablish_clone_ptr(LDKChannelReestablish *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelReestablish_clone_ptr")] public static extern long ChannelReestablish_clone_ptr(long _arg); @@ -8508,9 +9182,9 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelReestablish_eq")] public static extern bool ChannelReestablish_eq(long _a, long _b); // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AnnouncementSignatures_free")] public static extern void AnnouncementSignatures_free(long _this_obj); - // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AnnouncementSignatures_get_channel_id")] public static extern long AnnouncementSignatures_get_channel_id(long _this_ptr); - // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKChannelId val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AnnouncementSignatures_set_channel_id")] public static extern void AnnouncementSignatures_set_channel_id(long _this_ptr, long _val); // uint64_t AnnouncementSignatures_get_short_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AnnouncementSignatures_get_short_channel_id")] public static extern long AnnouncementSignatures_get_short_channel_id(long _this_ptr); @@ -8524,7 +9198,7 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AnnouncementSignatures_get_bitcoin_signature")] public static extern long AnnouncementSignatures_get_bitcoin_signature(long _this_ptr); // void AnnouncementSignatures_set_bitcoin_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKECDSASignature val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AnnouncementSignatures_set_bitcoin_signature")] public static extern void AnnouncementSignatures_set_bitcoin_signature(long _this_ptr, long _val); - // MUST_USE_RES struct LDKAnnouncementSignatures AnnouncementSignatures_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t short_channel_id_arg, struct LDKECDSASignature node_signature_arg, struct LDKECDSASignature bitcoin_signature_arg); + // MUST_USE_RES struct LDKAnnouncementSignatures AnnouncementSignatures_new(struct LDKChannelId channel_id_arg, uint64_t short_channel_id_arg, struct LDKECDSASignature node_signature_arg, struct LDKECDSASignature bitcoin_signature_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AnnouncementSignatures_new")] public static extern long AnnouncementSignatures_new(long _channel_id_arg, long _short_channel_id_arg, long _node_signature_arg, long _bitcoin_signature_arg); // uint64_t AnnouncementSignatures_clone_ptr(LDKAnnouncementSignatures *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AnnouncementSignatures_clone_ptr")] public static extern long AnnouncementSignatures_clone_ptr(long _arg); @@ -8618,6 +9292,16 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedNodeAnnouncement_get_addresses")] public static extern long UnsignedNodeAnnouncement_get_addresses(long _this_ptr); // void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_SocketAddressZ val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedNodeAnnouncement_set_addresses")] public static extern void UnsignedNodeAnnouncement_set_addresses(long _this_ptr, long _val); + // struct LDKCVec_u8Z UnsignedNodeAnnouncement_get_excess_address_data(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedNodeAnnouncement_get_excess_address_data")] public static extern long UnsignedNodeAnnouncement_get_excess_address_data(long _this_ptr); + // void UnsignedNodeAnnouncement_set_excess_address_data(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedNodeAnnouncement_set_excess_address_data")] public static extern void UnsignedNodeAnnouncement_set_excess_address_data(long _this_ptr, long _val); + // struct LDKCVec_u8Z UnsignedNodeAnnouncement_get_excess_data(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedNodeAnnouncement_get_excess_data")] public static extern long UnsignedNodeAnnouncement_get_excess_data(long _this_ptr); + // void UnsignedNodeAnnouncement_set_excess_data(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedNodeAnnouncement_set_excess_data")] public static extern void UnsignedNodeAnnouncement_set_excess_data(long _this_ptr, long _val); + // MUST_USE_RES struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_new(struct LDKNodeFeatures features_arg, uint32_t timestamp_arg, struct LDKNodeId node_id_arg, struct LDKThreeBytes rgb_arg, struct LDKNodeAlias alias_arg, struct LDKCVec_SocketAddressZ addresses_arg, struct LDKCVec_u8Z excess_address_data_arg, struct LDKCVec_u8Z excess_data_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedNodeAnnouncement_new")] public static extern long UnsignedNodeAnnouncement_new(long _features_arg, int _timestamp_arg, long _node_id_arg, long _rgb_arg, long _alias_arg, long _addresses_arg, long _excess_address_data_arg, long _excess_data_arg); // uint64_t UnsignedNodeAnnouncement_clone_ptr(LDKUnsignedNodeAnnouncement *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedNodeAnnouncement_clone_ptr")] public static extern long UnsignedNodeAnnouncement_clone_ptr(long _arg); // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig); @@ -9032,6 +9716,36 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OnionPacket_hash")] public static extern long OnionPacket_hash(long _o); // bool OnionPacket_eq(const struct LDKOnionPacket *NONNULL_PTR a, const struct LDKOnionPacket *NONNULL_PTR b); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OnionPacket_eq")] public static extern bool OnionPacket_eq(long _a, long _b); + // void TrampolineOnionPacket_free(struct LDKTrampolineOnionPacket this_obj); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TrampolineOnionPacket_free")] public static extern void TrampolineOnionPacket_free(long _this_obj); + // uint8_t TrampolineOnionPacket_get_version(const struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TrampolineOnionPacket_get_version")] public static extern byte TrampolineOnionPacket_get_version(long _this_ptr); + // void TrampolineOnionPacket_set_version(struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr, uint8_t val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TrampolineOnionPacket_set_version")] public static extern void TrampolineOnionPacket_set_version(long _this_ptr, byte _val); + // struct LDKPublicKey TrampolineOnionPacket_get_public_key(const struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TrampolineOnionPacket_get_public_key")] public static extern long TrampolineOnionPacket_get_public_key(long _this_ptr); + // void TrampolineOnionPacket_set_public_key(struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr, struct LDKPublicKey val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TrampolineOnionPacket_set_public_key")] public static extern void TrampolineOnionPacket_set_public_key(long _this_ptr, long _val); + // struct LDKCVec_u8Z TrampolineOnionPacket_get_hop_data(const struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TrampolineOnionPacket_get_hop_data")] public static extern long TrampolineOnionPacket_get_hop_data(long _this_ptr); + // void TrampolineOnionPacket_set_hop_data(struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TrampolineOnionPacket_set_hop_data")] public static extern void TrampolineOnionPacket_set_hop_data(long _this_ptr, long _val); + // const uint8_t (*TrampolineOnionPacket_get_hmac(const struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr))[32]; + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TrampolineOnionPacket_get_hmac")] public static extern long TrampolineOnionPacket_get_hmac(long _this_ptr); + // void TrampolineOnionPacket_set_hmac(struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TrampolineOnionPacket_set_hmac")] public static extern void TrampolineOnionPacket_set_hmac(long _this_ptr, long _val); + // MUST_USE_RES struct LDKTrampolineOnionPacket TrampolineOnionPacket_new(uint8_t version_arg, struct LDKPublicKey public_key_arg, struct LDKCVec_u8Z hop_data_arg, struct LDKThirtyTwoBytes hmac_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TrampolineOnionPacket_new")] public static extern long TrampolineOnionPacket_new(byte _version_arg, long _public_key_arg, long _hop_data_arg, long _hmac_arg); + // uint64_t TrampolineOnionPacket_clone_ptr(LDKTrampolineOnionPacket *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TrampolineOnionPacket_clone_ptr")] public static extern long TrampolineOnionPacket_clone_ptr(long _arg); + // struct LDKTrampolineOnionPacket TrampolineOnionPacket_clone(const struct LDKTrampolineOnionPacket *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TrampolineOnionPacket_clone")] public static extern long TrampolineOnionPacket_clone(long _orig); + // uint64_t TrampolineOnionPacket_hash(const struct LDKTrampolineOnionPacket *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TrampolineOnionPacket_hash")] public static extern long TrampolineOnionPacket_hash(long _o); + // bool TrampolineOnionPacket_eq(const struct LDKTrampolineOnionPacket *NONNULL_PTR a, const struct LDKTrampolineOnionPacket *NONNULL_PTR b); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TrampolineOnionPacket_eq")] public static extern bool TrampolineOnionPacket_eq(long _a, long _b); + // struct LDKCVec_u8Z TrampolineOnionPacket_write(const struct LDKTrampolineOnionPacket *NONNULL_PTR obj); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TrampolineOnionPacket_write")] public static extern long TrampolineOnionPacket_write(long _obj); // struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AcceptChannel_write")] public static extern long AcceptChannel_write(long _obj); // struct LDKCResult_AcceptChannelDecodeErrorZ AcceptChannel_read(struct LDKu8slice ser); @@ -9294,6 +10008,26 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SocketDescriptor_clone")] public static extern long SocketDescriptor_clone(long _orig); // void SocketDescriptor_free(struct LDKSocketDescriptor this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SocketDescriptor_free")] public static extern void SocketDescriptor_free(long _this_ptr); + // void PeerDetails_free(struct LDKPeerDetails this_obj); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PeerDetails_free")] public static extern void PeerDetails_free(long _this_obj); + // struct LDKPublicKey PeerDetails_get_counterparty_node_id(const struct LDKPeerDetails *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PeerDetails_get_counterparty_node_id")] public static extern long PeerDetails_get_counterparty_node_id(long _this_ptr); + // void PeerDetails_set_counterparty_node_id(struct LDKPeerDetails *NONNULL_PTR this_ptr, struct LDKPublicKey val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PeerDetails_set_counterparty_node_id")] public static extern void PeerDetails_set_counterparty_node_id(long _this_ptr, long _val); + // struct LDKCOption_SocketAddressZ PeerDetails_get_socket_address(const struct LDKPeerDetails *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PeerDetails_get_socket_address")] public static extern long PeerDetails_get_socket_address(long _this_ptr); + // void PeerDetails_set_socket_address(struct LDKPeerDetails *NONNULL_PTR this_ptr, struct LDKCOption_SocketAddressZ val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PeerDetails_set_socket_address")] public static extern void PeerDetails_set_socket_address(long _this_ptr, long _val); + // struct LDKInitFeatures PeerDetails_get_init_features(const struct LDKPeerDetails *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PeerDetails_get_init_features")] public static extern long PeerDetails_get_init_features(long _this_ptr); + // void PeerDetails_set_init_features(struct LDKPeerDetails *NONNULL_PTR this_ptr, struct LDKInitFeatures val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PeerDetails_set_init_features")] public static extern void PeerDetails_set_init_features(long _this_ptr, long _val); + // bool PeerDetails_get_is_inbound_connection(const struct LDKPeerDetails *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PeerDetails_get_is_inbound_connection")] public static extern bool PeerDetails_get_is_inbound_connection(long _this_ptr); + // void PeerDetails_set_is_inbound_connection(struct LDKPeerDetails *NONNULL_PTR this_ptr, bool val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PeerDetails_set_is_inbound_connection")] public static extern void PeerDetails_set_is_inbound_connection(long _this_ptr, bool _val); + // MUST_USE_RES struct LDKPeerDetails PeerDetails_new(struct LDKPublicKey counterparty_node_id_arg, struct LDKCOption_SocketAddressZ socket_address_arg, struct LDKInitFeatures init_features_arg, bool is_inbound_connection_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PeerDetails_new")] public static extern long PeerDetails_new(long _counterparty_node_id_arg, long _socket_address_arg, long _init_features_arg, bool _is_inbound_connection_arg); // void PeerHandleError_free(struct LDKPeerHandleError this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PeerHandleError_free")] public static extern void PeerHandleError_free(long _this_obj); // MUST_USE_RES struct LDKPeerHandleError PeerHandleError_new(void); @@ -9306,8 +10040,10 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PeerManager_free")] public static extern void PeerManager_free(long _this_obj); // MUST_USE_RES struct LDKPeerManager PeerManager_new(struct LDKMessageHandler message_handler, uint32_t current_time, const uint8_t (*ephemeral_random_data)[32], struct LDKLogger logger, struct LDKNodeSigner node_signer); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PeerManager_new")] public static extern long PeerManager_new(long _message_handler, int _current_time, long _ephemeral_random_data, long _logger, long _node_signer); - // MUST_USE_RES struct LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PeerManager_get_peer_node_ids")] public static extern long PeerManager_get_peer_node_ids(long _this_arg); + // MUST_USE_RES struct LDKCVec_PeerDetailsZ PeerManager_list_peers(const struct LDKPeerManager *NONNULL_PTR this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PeerManager_list_peers")] public static extern long PeerManager_list_peers(long _this_arg); + // MUST_USE_RES struct LDKPeerDetails PeerManager_peer_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PeerManager_peer_by_node_id")] public static extern long PeerManager_peer_by_node_id(long _this_arg, long _their_node_id); // MUST_USE_RES struct LDKCResult_CVec_u8ZPeerHandleErrorZ PeerManager_new_outbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKSocketDescriptor descriptor, struct LDKCOption_SocketAddressZ remote_network_address); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PeerManager_new_outbound_connection")] public static extern long PeerManager_new_outbound_connection(long _this_arg, long _their_node_id, long _descriptor, long _remote_network_address); // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor descriptor, struct LDKCOption_SocketAddressZ remote_network_address); @@ -10322,6 +11058,30 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeFeatures_supports_keysend")] public static extern bool NodeFeatures_supports_keysend(long _this_arg); // MUST_USE_RES bool NodeFeatures_requires_keysend(const struct LDKNodeFeatures *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeFeatures_requires_keysend")] public static extern bool NodeFeatures_requires_keysend(long _this_arg); + // void InitFeatures_set_trampoline_routing_optional(struct LDKInitFeatures *NONNULL_PTR this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InitFeatures_set_trampoline_routing_optional")] public static extern void InitFeatures_set_trampoline_routing_optional(long _this_arg); + // void InitFeatures_set_trampoline_routing_required(struct LDKInitFeatures *NONNULL_PTR this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InitFeatures_set_trampoline_routing_required")] public static extern void InitFeatures_set_trampoline_routing_required(long _this_arg); + // MUST_USE_RES bool InitFeatures_supports_trampoline_routing(const struct LDKInitFeatures *NONNULL_PTR this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InitFeatures_supports_trampoline_routing")] public static extern bool InitFeatures_supports_trampoline_routing(long _this_arg); + // void NodeFeatures_set_trampoline_routing_optional(struct LDKNodeFeatures *NONNULL_PTR this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeFeatures_set_trampoline_routing_optional")] public static extern void NodeFeatures_set_trampoline_routing_optional(long _this_arg); + // void NodeFeatures_set_trampoline_routing_required(struct LDKNodeFeatures *NONNULL_PTR this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeFeatures_set_trampoline_routing_required")] public static extern void NodeFeatures_set_trampoline_routing_required(long _this_arg); + // MUST_USE_RES bool NodeFeatures_supports_trampoline_routing(const struct LDKNodeFeatures *NONNULL_PTR this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeFeatures_supports_trampoline_routing")] public static extern bool NodeFeatures_supports_trampoline_routing(long _this_arg); + // void Bolt11InvoiceFeatures_set_trampoline_routing_optional(struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11InvoiceFeatures_set_trampoline_routing_optional")] public static extern void Bolt11InvoiceFeatures_set_trampoline_routing_optional(long _this_arg); + // void Bolt11InvoiceFeatures_set_trampoline_routing_required(struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11InvoiceFeatures_set_trampoline_routing_required")] public static extern void Bolt11InvoiceFeatures_set_trampoline_routing_required(long _this_arg); + // MUST_USE_RES bool Bolt11InvoiceFeatures_supports_trampoline_routing(const struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11InvoiceFeatures_supports_trampoline_routing")] public static extern bool Bolt11InvoiceFeatures_supports_trampoline_routing(long _this_arg); + // MUST_USE_RES bool InitFeatures_requires_trampoline_routing(const struct LDKInitFeatures *NONNULL_PTR this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InitFeatures_requires_trampoline_routing")] public static extern bool InitFeatures_requires_trampoline_routing(long _this_arg); + // MUST_USE_RES bool NodeFeatures_requires_trampoline_routing(const struct LDKNodeFeatures *NONNULL_PTR this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeFeatures_requires_trampoline_routing")] public static extern bool NodeFeatures_requires_trampoline_routing(long _this_arg); + // MUST_USE_RES bool Bolt11InvoiceFeatures_requires_trampoline_routing(const struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11InvoiceFeatures_requires_trampoline_routing")] public static extern bool Bolt11InvoiceFeatures_requires_trampoline_routing(long _this_arg); // void ShutdownScript_free(struct LDKShutdownScript this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ShutdownScript_free")] public static extern void ShutdownScript_free(long _this_obj); // uint64_t ShutdownScript_clone_ptr(LDKShutdownScript *NONNULL_PTR arg); @@ -10358,6 +11118,42 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ShutdownScript_as_legacy_pubkey")] public static extern long ShutdownScript_as_legacy_pubkey(long _this_arg); // MUST_USE_RES bool ShutdownScript_is_compatible(const struct LDKShutdownScript *NONNULL_PTR this_arg, const struct LDKInitFeatures *NONNULL_PTR features); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ShutdownScript_is_compatible")] public static extern bool ShutdownScript_is_compatible(long _this_arg, long _features); + // void ChannelId_free(struct LDKChannelId this_obj); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelId_free")] public static extern void ChannelId_free(long _this_obj); + // const uint8_t (*ChannelId_get_a(const struct LDKChannelId *NONNULL_PTR this_ptr))[32]; + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelId_get_a")] public static extern long ChannelId_get_a(long _this_ptr); + // void ChannelId_set_a(struct LDKChannelId *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelId_set_a")] public static extern void ChannelId_set_a(long _this_ptr, long _val); + // MUST_USE_RES struct LDKChannelId ChannelId_new(struct LDKThirtyTwoBytes a_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelId_new")] public static extern long ChannelId_new(long _a_arg); + // uint64_t ChannelId_clone_ptr(LDKChannelId *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelId_clone_ptr")] public static extern long ChannelId_clone_ptr(long _arg); + // struct LDKChannelId ChannelId_clone(const struct LDKChannelId *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelId_clone")] public static extern long ChannelId_clone(long _orig); + // bool ChannelId_eq(const struct LDKChannelId *NONNULL_PTR a, const struct LDKChannelId *NONNULL_PTR b); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelId_eq")] public static extern bool ChannelId_eq(long _a, long _b); + // uint64_t ChannelId_hash(const struct LDKChannelId *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelId_hash")] public static extern long ChannelId_hash(long _o); + // MUST_USE_RES struct LDKChannelId ChannelId_v1_from_funding_txid(const uint8_t (*txid)[32], uint16_t output_index); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelId_v1_from_funding_txid")] public static extern long ChannelId_v1_from_funding_txid(long _txid, short _output_index); + // MUST_USE_RES struct LDKChannelId ChannelId_v1_from_funding_outpoint(struct LDKOutPoint outpoint); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelId_v1_from_funding_outpoint")] public static extern long ChannelId_v1_from_funding_outpoint(long _outpoint); + // MUST_USE_RES struct LDKChannelId ChannelId_temporary_from_entropy_source(const struct LDKEntropySource *NONNULL_PTR entropy_source); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelId_temporary_from_entropy_source")] public static extern long ChannelId_temporary_from_entropy_source(long _entropy_source); + // MUST_USE_RES struct LDKChannelId ChannelId_from_bytes(struct LDKThirtyTwoBytes data); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelId_from_bytes")] public static extern long ChannelId_from_bytes(long _data); + // MUST_USE_RES struct LDKChannelId ChannelId_new_zero(void); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelId_new_zero")] public static extern long ChannelId_new_zero(); + // MUST_USE_RES bool ChannelId_is_zero(const struct LDKChannelId *NONNULL_PTR this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelId_is_zero")] public static extern bool ChannelId_is_zero(long _this_arg); + // MUST_USE_RES struct LDKChannelId ChannelId_v2_from_revocation_basepoints(const struct LDKRevocationBasepoint *NONNULL_PTR ours, const struct LDKRevocationBasepoint *NONNULL_PTR theirs); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelId_v2_from_revocation_basepoints")] public static extern long ChannelId_v2_from_revocation_basepoints(long _ours, long _theirs); + // MUST_USE_RES struct LDKChannelId ChannelId_temporary_v2_from_revocation_basepoint(const struct LDKRevocationBasepoint *NONNULL_PTR our_revocation_basepoint); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelId_temporary_v2_from_revocation_basepoint")] public static extern long ChannelId_temporary_v2_from_revocation_basepoint(long _our_revocation_basepoint); + // struct LDKCVec_u8Z ChannelId_write(const struct LDKChannelId *NONNULL_PTR obj); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelId_write")] public static extern long ChannelId_write(long _obj); + // struct LDKCResult_ChannelIdDecodeErrorZ ChannelId_read(struct LDKu8slice ser); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelId_read")] public static extern long ChannelId_read(long _ser); // void Retry_free(struct LDKRetry this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Retry_free")] public static extern void Retry_free(long _this_ptr); // uint64_t Retry_clone_ptr(LDKRetry *NONNULL_PTR arg); @@ -10452,6 +11248,74 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Type_clone")] public static extern long Type_clone(long _orig); // void Type_free(struct LDKType this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Type_free")] public static extern void Type_free(long _this_ptr); + // void OfferId_free(struct LDKOfferId this_obj); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OfferId_free")] public static extern void OfferId_free(long _this_obj); + // const uint8_t (*OfferId_get_a(const struct LDKOfferId *NONNULL_PTR this_ptr))[32]; + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OfferId_get_a")] public static extern long OfferId_get_a(long _this_ptr); + // void OfferId_set_a(struct LDKOfferId *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OfferId_set_a")] public static extern void OfferId_set_a(long _this_ptr, long _val); + // MUST_USE_RES struct LDKOfferId OfferId_new(struct LDKThirtyTwoBytes a_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OfferId_new")] public static extern long OfferId_new(long _a_arg); + // uint64_t OfferId_clone_ptr(LDKOfferId *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OfferId_clone_ptr")] public static extern long OfferId_clone_ptr(long _arg); + // struct LDKOfferId OfferId_clone(const struct LDKOfferId *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OfferId_clone")] public static extern long OfferId_clone(long _orig); + // bool OfferId_eq(const struct LDKOfferId *NONNULL_PTR a, const struct LDKOfferId *NONNULL_PTR b); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OfferId_eq")] public static extern bool OfferId_eq(long _a, long _b); + // struct LDKCVec_u8Z OfferId_write(const struct LDKOfferId *NONNULL_PTR obj); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OfferId_write")] public static extern long OfferId_write(long _obj); + // struct LDKCResult_OfferIdDecodeErrorZ OfferId_read(struct LDKu8slice ser); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OfferId_read")] public static extern long OfferId_read(long _ser); + // void OfferWithExplicitMetadataBuilder_free(struct LDKOfferWithExplicitMetadataBuilder this_obj); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OfferWithExplicitMetadataBuilder_free")] public static extern void OfferWithExplicitMetadataBuilder_free(long _this_obj); + // uint64_t OfferWithExplicitMetadataBuilder_clone_ptr(LDKOfferWithExplicitMetadataBuilder *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OfferWithExplicitMetadataBuilder_clone_ptr")] public static extern long OfferWithExplicitMetadataBuilder_clone_ptr(long _arg); + // struct LDKOfferWithExplicitMetadataBuilder OfferWithExplicitMetadataBuilder_clone(const struct LDKOfferWithExplicitMetadataBuilder *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OfferWithExplicitMetadataBuilder_clone")] public static extern long OfferWithExplicitMetadataBuilder_clone(long _orig); + // void OfferWithDerivedMetadataBuilder_free(struct LDKOfferWithDerivedMetadataBuilder this_obj); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OfferWithDerivedMetadataBuilder_free")] public static extern void OfferWithDerivedMetadataBuilder_free(long _this_obj); + // uint64_t OfferWithDerivedMetadataBuilder_clone_ptr(LDKOfferWithDerivedMetadataBuilder *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OfferWithDerivedMetadataBuilder_clone_ptr")] public static extern long OfferWithDerivedMetadataBuilder_clone_ptr(long _arg); + // struct LDKOfferWithDerivedMetadataBuilder OfferWithDerivedMetadataBuilder_clone(const struct LDKOfferWithDerivedMetadataBuilder *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OfferWithDerivedMetadataBuilder_clone")] public static extern long OfferWithDerivedMetadataBuilder_clone(long _orig); + // MUST_USE_RES struct LDKOfferWithExplicitMetadataBuilder OfferWithExplicitMetadataBuilder_new(struct LDKPublicKey signing_pubkey); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OfferWithExplicitMetadataBuilder_new")] public static extern long OfferWithExplicitMetadataBuilder_new(long _signing_pubkey); + // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ OfferWithExplicitMetadataBuilder_metadata(struct LDKOfferWithExplicitMetadataBuilder this_arg, struct LDKCVec_u8Z metadata); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OfferWithExplicitMetadataBuilder_metadata")] public static extern long OfferWithExplicitMetadataBuilder_metadata(long _this_arg, long _metadata); + // MUST_USE_RES void OfferWithExplicitMetadataBuilder_chain(struct LDKOfferWithExplicitMetadataBuilder this_arg, enum LDKNetwork network); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OfferWithExplicitMetadataBuilder_chain")] public static extern void OfferWithExplicitMetadataBuilder_chain(long _this_arg, Network _network); + // MUST_USE_RES void OfferWithExplicitMetadataBuilder_amount_msats(struct LDKOfferWithExplicitMetadataBuilder this_arg, uint64_t amount_msats); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OfferWithExplicitMetadataBuilder_amount_msats")] public static extern void OfferWithExplicitMetadataBuilder_amount_msats(long _this_arg, long _amount_msats); + // MUST_USE_RES void OfferWithExplicitMetadataBuilder_absolute_expiry(struct LDKOfferWithExplicitMetadataBuilder this_arg, uint64_t absolute_expiry); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OfferWithExplicitMetadataBuilder_absolute_expiry")] public static extern void OfferWithExplicitMetadataBuilder_absolute_expiry(long _this_arg, long _absolute_expiry); + // MUST_USE_RES void OfferWithExplicitMetadataBuilder_description(struct LDKOfferWithExplicitMetadataBuilder this_arg, struct LDKStr description); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OfferWithExplicitMetadataBuilder_description")] public static extern void OfferWithExplicitMetadataBuilder_description(long _this_arg, long _description); + // MUST_USE_RES void OfferWithExplicitMetadataBuilder_issuer(struct LDKOfferWithExplicitMetadataBuilder this_arg, struct LDKStr issuer); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OfferWithExplicitMetadataBuilder_issuer")] public static extern void OfferWithExplicitMetadataBuilder_issuer(long _this_arg, long _issuer); + // MUST_USE_RES void OfferWithExplicitMetadataBuilder_path(struct LDKOfferWithExplicitMetadataBuilder this_arg, struct LDKBlindedPath path); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OfferWithExplicitMetadataBuilder_path")] public static extern void OfferWithExplicitMetadataBuilder_path(long _this_arg, long _path); + // MUST_USE_RES void OfferWithExplicitMetadataBuilder_supported_quantity(struct LDKOfferWithExplicitMetadataBuilder this_arg, struct LDKQuantity quantity); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OfferWithExplicitMetadataBuilder_supported_quantity")] public static extern void OfferWithExplicitMetadataBuilder_supported_quantity(long _this_arg, long _quantity); + // MUST_USE_RES struct LDKCResult_OfferBolt12SemanticErrorZ OfferWithExplicitMetadataBuilder_build(struct LDKOfferWithExplicitMetadataBuilder this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OfferWithExplicitMetadataBuilder_build")] public static extern long OfferWithExplicitMetadataBuilder_build(long _this_arg); + // MUST_USE_RES struct LDKOfferWithDerivedMetadataBuilder OfferWithDerivedMetadataBuilder_deriving_signing_pubkey(struct LDKPublicKey node_id, const struct LDKExpandedKey *NONNULL_PTR expanded_key, struct LDKEntropySource entropy_source); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OfferWithDerivedMetadataBuilder_deriving_signing_pubkey")] public static extern long OfferWithDerivedMetadataBuilder_deriving_signing_pubkey(long _node_id, long _expanded_key, long _entropy_source); + // MUST_USE_RES void OfferWithDerivedMetadataBuilder_chain(struct LDKOfferWithDerivedMetadataBuilder this_arg, enum LDKNetwork network); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OfferWithDerivedMetadataBuilder_chain")] public static extern void OfferWithDerivedMetadataBuilder_chain(long _this_arg, Network _network); + // MUST_USE_RES void OfferWithDerivedMetadataBuilder_amount_msats(struct LDKOfferWithDerivedMetadataBuilder this_arg, uint64_t amount_msats); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OfferWithDerivedMetadataBuilder_amount_msats")] public static extern void OfferWithDerivedMetadataBuilder_amount_msats(long _this_arg, long _amount_msats); + // MUST_USE_RES void OfferWithDerivedMetadataBuilder_absolute_expiry(struct LDKOfferWithDerivedMetadataBuilder this_arg, uint64_t absolute_expiry); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OfferWithDerivedMetadataBuilder_absolute_expiry")] public static extern void OfferWithDerivedMetadataBuilder_absolute_expiry(long _this_arg, long _absolute_expiry); + // MUST_USE_RES void OfferWithDerivedMetadataBuilder_description(struct LDKOfferWithDerivedMetadataBuilder this_arg, struct LDKStr description); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OfferWithDerivedMetadataBuilder_description")] public static extern void OfferWithDerivedMetadataBuilder_description(long _this_arg, long _description); + // MUST_USE_RES void OfferWithDerivedMetadataBuilder_issuer(struct LDKOfferWithDerivedMetadataBuilder this_arg, struct LDKStr issuer); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OfferWithDerivedMetadataBuilder_issuer")] public static extern void OfferWithDerivedMetadataBuilder_issuer(long _this_arg, long _issuer); + // MUST_USE_RES void OfferWithDerivedMetadataBuilder_path(struct LDKOfferWithDerivedMetadataBuilder this_arg, struct LDKBlindedPath path); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OfferWithDerivedMetadataBuilder_path")] public static extern void OfferWithDerivedMetadataBuilder_path(long _this_arg, long _path); + // MUST_USE_RES void OfferWithDerivedMetadataBuilder_supported_quantity(struct LDKOfferWithDerivedMetadataBuilder this_arg, struct LDKQuantity quantity); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OfferWithDerivedMetadataBuilder_supported_quantity")] public static extern void OfferWithDerivedMetadataBuilder_supported_quantity(long _this_arg, long _quantity); + // MUST_USE_RES struct LDKCResult_OfferBolt12SemanticErrorZ OfferWithDerivedMetadataBuilder_build(struct LDKOfferWithDerivedMetadataBuilder this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OfferWithDerivedMetadataBuilder_build")] public static extern long OfferWithDerivedMetadataBuilder_build(long _this_arg); // void Offer_free(struct LDKOffer this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Offer_free")] public static extern void Offer_free(long _this_obj); // uint64_t Offer_clone_ptr(LDKOffer *NONNULL_PTR arg); @@ -10462,7 +11326,7 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Offer_chains")] public static extern long Offer_chains(long _this_arg); // MUST_USE_RES struct LDKCOption_CVec_u8ZZ Offer_metadata(const struct LDKOffer *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Offer_metadata")] public static extern long Offer_metadata(long _this_arg); - // MUST_USE_RES struct LDKAmount Offer_amount(const struct LDKOffer *NONNULL_PTR this_arg); + // MUST_USE_RES struct LDKCOption_AmountZ Offer_amount(const struct LDKOffer *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Offer_amount")] public static extern long Offer_amount(long _this_arg); // MUST_USE_RES struct LDKPrintableString Offer_description(const struct LDKOffer *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Offer_description")] public static extern long Offer_description(long _this_arg); @@ -10478,6 +11342,8 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Offer_supported_quantity")] public static extern long Offer_supported_quantity(long _this_arg); // MUST_USE_RES struct LDKPublicKey Offer_signing_pubkey(const struct LDKOffer *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Offer_signing_pubkey")] public static extern long Offer_signing_pubkey(long _this_arg); + // MUST_USE_RES struct LDKOfferId Offer_id(const struct LDKOffer *NONNULL_PTR this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Offer_id")] public static extern long Offer_id(long _this_arg); // MUST_USE_RES bool Offer_supports_chain(const struct LDKOffer *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes chain); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Offer_supports_chain")] public static extern bool Offer_supports_chain(long _this_arg, long _chain); // MUST_USE_RES bool Offer_is_expired(const struct LDKOffer *NONNULL_PTR this_arg); @@ -10488,24 +11354,76 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Offer_is_valid_quantity")] public static extern bool Offer_is_valid_quantity(long _this_arg, long _quantity); // MUST_USE_RES bool Offer_expects_quantity(const struct LDKOffer *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Offer_expects_quantity")] public static extern bool Offer_expects_quantity(long _this_arg); + // MUST_USE_RES struct LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ Offer_request_invoice_deriving_payer_id(const struct LDKOffer *NONNULL_PTR this_arg, const struct LDKExpandedKey *NONNULL_PTR expanded_key, struct LDKEntropySource entropy_source, struct LDKThirtyTwoBytes payment_id); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Offer_request_invoice_deriving_payer_id")] public static extern long Offer_request_invoice_deriving_payer_id(long _this_arg, long _expanded_key, long _entropy_source, long _payment_id); + // MUST_USE_RES struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ Offer_request_invoice_deriving_metadata(const struct LDKOffer *NONNULL_PTR this_arg, struct LDKPublicKey payer_id, const struct LDKExpandedKey *NONNULL_PTR expanded_key, struct LDKEntropySource entropy_source, struct LDKThirtyTwoBytes payment_id); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Offer_request_invoice_deriving_metadata")] public static extern long Offer_request_invoice_deriving_metadata(long _this_arg, long _payer_id, long _expanded_key, long _entropy_source, long _payment_id); + // MUST_USE_RES struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ Offer_request_invoice(const struct LDKOffer *NONNULL_PTR this_arg, struct LDKCVec_u8Z metadata, struct LDKPublicKey payer_id); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Offer_request_invoice")] public static extern long Offer_request_invoice(long _this_arg, long _metadata, long _payer_id); + // uint64_t Offer_hash(const struct LDKOffer *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Offer_hash")] public static extern long Offer_hash(long _o); // struct LDKCVec_u8Z Offer_write(const struct LDKOffer *NONNULL_PTR obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Offer_write")] public static extern long Offer_write(long _obj); - // void Amount_free(struct LDKAmount this_obj); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Amount_free")] public static extern void Amount_free(long _this_obj); + // void Amount_free(struct LDKAmount this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Amount_free")] public static extern void Amount_free(long _this_ptr); // uint64_t Amount_clone_ptr(LDKAmount *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Amount_clone_ptr")] public static extern long Amount_clone_ptr(long _arg); // struct LDKAmount Amount_clone(const struct LDKAmount *NONNULL_PTR orig); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Amount_clone")] public static extern long Amount_clone(long _orig); - // void Quantity_free(struct LDKQuantity this_obj); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Quantity_free")] public static extern void Quantity_free(long _this_obj); + // struct LDKAmount Amount_bitcoin(uint64_t amount_msats); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Amount_bitcoin")] public static extern long Amount_bitcoin(long _amount_msats); + // struct LDKAmount Amount_currency(struct LDKThreeBytes iso4217_code, uint64_t amount); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Amount_currency")] public static extern long Amount_currency(long _iso4217_code, long _amount); + // void Quantity_free(struct LDKQuantity this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Quantity_free")] public static extern void Quantity_free(long _this_ptr); // uint64_t Quantity_clone_ptr(LDKQuantity *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Quantity_clone_ptr")] public static extern long Quantity_clone_ptr(long _arg); // struct LDKQuantity Quantity_clone(const struct LDKQuantity *NONNULL_PTR orig); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Quantity_clone")] public static extern long Quantity_clone(long _orig); + // struct LDKQuantity Quantity_bounded(uint64_t a); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Quantity_bounded")] public static extern long Quantity_bounded(long _a); + // struct LDKQuantity Quantity_unbounded(void); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Quantity_unbounded")] public static extern long Quantity_unbounded(); + // struct LDKQuantity Quantity_one(void); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Quantity_one")] public static extern long Quantity_one(); // struct LDKCResult_OfferBolt12ParseErrorZ Offer_from_str(struct LDKStr s); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Offer_from_str")] public static extern long Offer_from_str(long _s); + // void InvoiceWithExplicitSigningPubkeyBuilder_free(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_obj); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceWithExplicitSigningPubkeyBuilder_free")] public static extern void InvoiceWithExplicitSigningPubkeyBuilder_free(long _this_obj); + // void InvoiceWithDerivedSigningPubkeyBuilder_free(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_obj); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceWithDerivedSigningPubkeyBuilder_free")] public static extern void InvoiceWithDerivedSigningPubkeyBuilder_free(long _this_obj); + // MUST_USE_RES struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ InvoiceWithExplicitSigningPubkeyBuilder_build(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceWithExplicitSigningPubkeyBuilder_build")] public static extern long InvoiceWithExplicitSigningPubkeyBuilder_build(long _this_arg); + // MUST_USE_RES void InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg, uint32_t relative_expiry_secs); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry")] public static extern void InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry(long _this_arg, int _relative_expiry_secs); + // MUST_USE_RES void InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg, const uint8_t (*script_hash)[32]); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh")] public static extern void InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh(long _this_arg, long _script_hash); + // MUST_USE_RES void InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg, const uint8_t (*pubkey_hash)[20]); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh")] public static extern void InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh(long _this_arg, long _pubkey_hash); + // MUST_USE_RES void InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg, struct LDKTweakedPublicKey output_key); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked")] public static extern void InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(long _this_arg, long _utput_key); + // MUST_USE_RES void InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp")] public static extern void InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp(long _this_arg); + // MUST_USE_RES struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign")] public static extern long InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign(long _this_arg); + // MUST_USE_RES void InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg, uint32_t relative_expiry_secs); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry")] public static extern void InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry(long _this_arg, int _relative_expiry_secs); + // MUST_USE_RES void InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg, const uint8_t (*script_hash)[32]); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh")] public static extern void InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh(long _this_arg, long _script_hash); + // MUST_USE_RES void InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg, const uint8_t (*pubkey_hash)[20]); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh")] public static extern void InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh(long _this_arg, long _pubkey_hash); + // MUST_USE_RES void InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg, struct LDKTweakedPublicKey output_key); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked")] public static extern void InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(long _this_arg, long _utput_key); + // MUST_USE_RES void InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp")] public static extern void InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp(long _this_arg); // void UnsignedBolt12Invoice_free(struct LDKUnsignedBolt12Invoice this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedBolt12Invoice_free")] public static extern void UnsignedBolt12Invoice_free(long _this_obj); + // uint64_t UnsignedBolt12Invoice_clone_ptr(LDKUnsignedBolt12Invoice *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedBolt12Invoice_clone_ptr")] public static extern long UnsignedBolt12Invoice_clone_ptr(long _arg); + // struct LDKUnsignedBolt12Invoice UnsignedBolt12Invoice_clone(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedBolt12Invoice_clone")] public static extern long UnsignedBolt12Invoice_clone(long _orig); + // void SignBolt12InvoiceFn_free(struct LDKSignBolt12InvoiceFn this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SignBolt12InvoiceFn_free")] public static extern void SignBolt12InvoiceFn_free(long _this_ptr); // MUST_USE_RES struct LDKTaggedHash UnsignedBolt12Invoice_tagged_hash(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedBolt12Invoice_tagged_hash")] public static extern long UnsignedBolt12Invoice_tagged_hash(long _this_arg); // void Bolt12Invoice_free(struct LDKBolt12Invoice this_obj); @@ -10520,7 +11438,7 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedBolt12Invoice_chain")] public static extern long UnsignedBolt12Invoice_chain(long _this_arg); // MUST_USE_RES struct LDKCOption_CVec_u8ZZ UnsignedBolt12Invoice_metadata(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedBolt12Invoice_metadata")] public static extern long UnsignedBolt12Invoice_metadata(long _this_arg); - // MUST_USE_RES struct LDKAmount UnsignedBolt12Invoice_amount(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg); + // MUST_USE_RES struct LDKCOption_AmountZ UnsignedBolt12Invoice_amount(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedBolt12Invoice_amount")] public static extern long UnsignedBolt12Invoice_amount(long _this_arg); // MUST_USE_RES struct LDKOfferFeatures UnsignedBolt12Invoice_offer_features(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedBolt12Invoice_offer_features")] public static extern long UnsignedBolt12Invoice_offer_features(long _this_arg); @@ -10532,7 +11450,7 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedBolt12Invoice_issuer")] public static extern long UnsignedBolt12Invoice_issuer(long _this_arg); // MUST_USE_RES struct LDKCVec_BlindedPathZ UnsignedBolt12Invoice_message_paths(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedBolt12Invoice_message_paths")] public static extern long UnsignedBolt12Invoice_message_paths(long _this_arg); - // MUST_USE_RES struct LDKQuantity UnsignedBolt12Invoice_supported_quantity(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg); + // MUST_USE_RES struct LDKCOption_QuantityZ UnsignedBolt12Invoice_supported_quantity(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedBolt12Invoice_supported_quantity")] public static extern long UnsignedBolt12Invoice_supported_quantity(long _this_arg); // MUST_USE_RES struct LDKu8slice UnsignedBolt12Invoice_payer_metadata(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedBolt12Invoice_payer_metadata")] public static extern long UnsignedBolt12Invoice_payer_metadata(long _this_arg); @@ -10564,7 +11482,7 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12Invoice_chain")] public static extern long Bolt12Invoice_chain(long _this_arg); // MUST_USE_RES struct LDKCOption_CVec_u8ZZ Bolt12Invoice_metadata(const struct LDKBolt12Invoice *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12Invoice_metadata")] public static extern long Bolt12Invoice_metadata(long _this_arg); - // MUST_USE_RES struct LDKAmount Bolt12Invoice_amount(const struct LDKBolt12Invoice *NONNULL_PTR this_arg); + // MUST_USE_RES struct LDKCOption_AmountZ Bolt12Invoice_amount(const struct LDKBolt12Invoice *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12Invoice_amount")] public static extern long Bolt12Invoice_amount(long _this_arg); // MUST_USE_RES struct LDKOfferFeatures Bolt12Invoice_offer_features(const struct LDKBolt12Invoice *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12Invoice_offer_features")] public static extern long Bolt12Invoice_offer_features(long _this_arg); @@ -10576,7 +11494,7 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12Invoice_issuer")] public static extern long Bolt12Invoice_issuer(long _this_arg); // MUST_USE_RES struct LDKCVec_BlindedPathZ Bolt12Invoice_message_paths(const struct LDKBolt12Invoice *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12Invoice_message_paths")] public static extern long Bolt12Invoice_message_paths(long _this_arg); - // MUST_USE_RES struct LDKQuantity Bolt12Invoice_supported_quantity(const struct LDKBolt12Invoice *NONNULL_PTR this_arg); + // MUST_USE_RES struct LDKCOption_QuantityZ Bolt12Invoice_supported_quantity(const struct LDKBolt12Invoice *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12Invoice_supported_quantity")] public static extern long Bolt12Invoice_supported_quantity(long _this_arg); // MUST_USE_RES struct LDKu8slice Bolt12Invoice_payer_metadata(const struct LDKBolt12Invoice *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12Invoice_payer_metadata")] public static extern long Bolt12Invoice_payer_metadata(long _this_arg); @@ -10608,6 +11526,8 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12Invoice_signable_hash")] public static extern long Bolt12Invoice_signable_hash(long _this_arg); // MUST_USE_RES struct LDKCResult_ThirtyTwoBytesNoneZ Bolt12Invoice_verify(const struct LDKBolt12Invoice *NONNULL_PTR this_arg, const struct LDKExpandedKey *NONNULL_PTR key); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12Invoice_verify")] public static extern long Bolt12Invoice_verify(long _this_arg, long _key); + // uint64_t Bolt12Invoice_hash(const struct LDKBolt12Invoice *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12Invoice_hash")] public static extern long Bolt12Invoice_hash(long _o); // struct LDKCVec_u8Z UnsignedBolt12Invoice_write(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedBolt12Invoice_write")] public static extern long UnsignedBolt12Invoice_write(long _obj); // struct LDKCVec_u8Z Bolt12Invoice_write(const struct LDKBolt12Invoice *NONNULL_PTR obj); @@ -10690,8 +11610,38 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceError_write")] public static extern long InvoiceError_write(long _obj); // struct LDKCResult_InvoiceErrorDecodeErrorZ InvoiceError_read(struct LDKu8slice ser); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceError_read")] public static extern long InvoiceError_read(long _ser); + // void InvoiceRequestWithExplicitPayerIdBuilder_free(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_obj); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_free")] public static extern void InvoiceRequestWithExplicitPayerIdBuilder_free(long _this_obj); + // void InvoiceRequestWithDerivedPayerIdBuilder_free(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_obj); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_free")] public static extern void InvoiceRequestWithDerivedPayerIdBuilder_free(long _this_obj); + // MUST_USE_RES struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ InvoiceRequestWithExplicitPayerIdBuilder_build(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_build")] public static extern long InvoiceRequestWithExplicitPayerIdBuilder_build(long _this_arg); + // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithExplicitPayerIdBuilder_chain(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg, enum LDKNetwork network); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_chain")] public static extern long InvoiceRequestWithExplicitPayerIdBuilder_chain(long _this_arg, Network _network); + // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg, uint64_t amount_msats); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_amount_msats")] public static extern long InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(long _this_arg, long _amount_msats); + // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithExplicitPayerIdBuilder_quantity(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg, uint64_t quantity); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_quantity")] public static extern long InvoiceRequestWithExplicitPayerIdBuilder_quantity(long _this_arg, long _quantity); + // MUST_USE_RES void InvoiceRequestWithExplicitPayerIdBuilder_payer_note(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg, struct LDKStr payer_note); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_payer_note")] public static extern void InvoiceRequestWithExplicitPayerIdBuilder_payer_note(long _this_arg, long _payer_note); + // MUST_USE_RES struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign")] public static extern long InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(long _this_arg); + // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithDerivedPayerIdBuilder_chain(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg, enum LDKNetwork network); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_chain")] public static extern long InvoiceRequestWithDerivedPayerIdBuilder_chain(long _this_arg, Network _network); + // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithDerivedPayerIdBuilder_amount_msats(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg, uint64_t amount_msats); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_amount_msats")] public static extern long InvoiceRequestWithDerivedPayerIdBuilder_amount_msats(long _this_arg, long _amount_msats); + // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithDerivedPayerIdBuilder_quantity(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg, uint64_t quantity); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_quantity")] public static extern long InvoiceRequestWithDerivedPayerIdBuilder_quantity(long _this_arg, long _quantity); + // MUST_USE_RES void InvoiceRequestWithDerivedPayerIdBuilder_payer_note(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg, struct LDKStr payer_note); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_payer_note")] public static extern void InvoiceRequestWithDerivedPayerIdBuilder_payer_note(long _this_arg, long _payer_note); // void UnsignedInvoiceRequest_free(struct LDKUnsignedInvoiceRequest this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedInvoiceRequest_free")] public static extern void UnsignedInvoiceRequest_free(long _this_obj); + // uint64_t UnsignedInvoiceRequest_clone_ptr(LDKUnsignedInvoiceRequest *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedInvoiceRequest_clone_ptr")] public static extern long UnsignedInvoiceRequest_clone_ptr(long _arg); + // struct LDKUnsignedInvoiceRequest UnsignedInvoiceRequest_clone(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedInvoiceRequest_clone")] public static extern long UnsignedInvoiceRequest_clone(long _orig); + // void SignInvoiceRequestFn_free(struct LDKSignInvoiceRequestFn this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SignInvoiceRequestFn_free")] public static extern void SignInvoiceRequestFn_free(long _this_ptr); // MUST_USE_RES struct LDKTaggedHash UnsignedInvoiceRequest_tagged_hash(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedInvoiceRequest_tagged_hash")] public static extern long UnsignedInvoiceRequest_tagged_hash(long _this_arg); // void InvoiceRequest_free(struct LDKInvoiceRequest this_obj); @@ -10702,6 +11652,10 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequest_clone")] public static extern long InvoiceRequest_clone(long _orig); // void VerifiedInvoiceRequest_free(struct LDKVerifiedInvoiceRequest this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_VerifiedInvoiceRequest_free")] public static extern void VerifiedInvoiceRequest_free(long _this_obj); + // struct LDKOfferId VerifiedInvoiceRequest_get_offer_id(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_VerifiedInvoiceRequest_get_offer_id")] public static extern long VerifiedInvoiceRequest_get_offer_id(long _this_ptr); + // void VerifiedInvoiceRequest_set_offer_id(struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_ptr, struct LDKOfferId val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_VerifiedInvoiceRequest_set_offer_id")] public static extern void VerifiedInvoiceRequest_set_offer_id(long _this_ptr, long _val); // struct LDKCOption_SecretKeyZ VerifiedInvoiceRequest_get_keys(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_VerifiedInvoiceRequest_get_keys")] public static extern long VerifiedInvoiceRequest_get_keys(long _this_ptr); // void VerifiedInvoiceRequest_set_keys(struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_ptr, struct LDKCOption_SecretKeyZ val); @@ -10714,7 +11668,7 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedInvoiceRequest_chains")] public static extern long UnsignedInvoiceRequest_chains(long _this_arg); // MUST_USE_RES struct LDKCOption_CVec_u8ZZ UnsignedInvoiceRequest_metadata(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedInvoiceRequest_metadata")] public static extern long UnsignedInvoiceRequest_metadata(long _this_arg); - // MUST_USE_RES struct LDKAmount UnsignedInvoiceRequest_amount(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg); + // MUST_USE_RES struct LDKCOption_AmountZ UnsignedInvoiceRequest_amount(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedInvoiceRequest_amount")] public static extern long UnsignedInvoiceRequest_amount(long _this_arg); // MUST_USE_RES struct LDKPrintableString UnsignedInvoiceRequest_description(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedInvoiceRequest_description")] public static extern long UnsignedInvoiceRequest_description(long _this_arg); @@ -10748,7 +11702,7 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequest_chains")] public static extern long InvoiceRequest_chains(long _this_arg); // MUST_USE_RES struct LDKCOption_CVec_u8ZZ InvoiceRequest_metadata(const struct LDKInvoiceRequest *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequest_metadata")] public static extern long InvoiceRequest_metadata(long _this_arg); - // MUST_USE_RES struct LDKAmount InvoiceRequest_amount(const struct LDKInvoiceRequest *NONNULL_PTR this_arg); + // MUST_USE_RES struct LDKCOption_AmountZ InvoiceRequest_amount(const struct LDKInvoiceRequest *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequest_amount")] public static extern long InvoiceRequest_amount(long _this_arg); // MUST_USE_RES struct LDKPrintableString InvoiceRequest_description(const struct LDKInvoiceRequest *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequest_description")] public static extern long InvoiceRequest_description(long _this_arg); @@ -10778,15 +11732,19 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequest_payer_id")] public static extern long InvoiceRequest_payer_id(long _this_arg); // MUST_USE_RES struct LDKPrintableString InvoiceRequest_payer_note(const struct LDKInvoiceRequest *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequest_payer_note")] public static extern long InvoiceRequest_payer_note(long _this_arg); - // MUST_USE_RES struct LDKSchnorrSignature InvoiceRequest_signature(const struct LDKInvoiceRequest *NONNULL_PTR this_arg); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequest_signature")] public static extern long InvoiceRequest_signature(long _this_arg); + // MUST_USE_RES struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ InvoiceRequest_respond_with(const struct LDKInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths, struct LDKThirtyTwoBytes payment_hash); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequest_respond_with")] public static extern long InvoiceRequest_respond_with(long _this_arg, long _payment_paths, long _payment_hash); + // MUST_USE_RES struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ InvoiceRequest_respond_with_no_std(const struct LDKInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths, struct LDKThirtyTwoBytes payment_hash, uint64_t created_at); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequest_respond_with_no_std")] public static extern long InvoiceRequest_respond_with_no_std(long _this_arg, long _payment_paths, long _payment_hash, long _created_at); // MUST_USE_RES struct LDKCResult_VerifiedInvoiceRequestNoneZ InvoiceRequest_verify(struct LDKInvoiceRequest this_arg, const struct LDKExpandedKey *NONNULL_PTR key); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequest_verify")] public static extern long InvoiceRequest_verify(long _this_arg, long _key); + // MUST_USE_RES struct LDKSchnorrSignature InvoiceRequest_signature(const struct LDKInvoiceRequest *NONNULL_PTR this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequest_signature")] public static extern long InvoiceRequest_signature(long _this_arg); // MUST_USE_RES struct LDKCVec_ThirtyTwoBytesZ VerifiedInvoiceRequest_chains(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_VerifiedInvoiceRequest_chains")] public static extern long VerifiedInvoiceRequest_chains(long _this_arg); // MUST_USE_RES struct LDKCOption_CVec_u8ZZ VerifiedInvoiceRequest_metadata(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_VerifiedInvoiceRequest_metadata")] public static extern long VerifiedInvoiceRequest_metadata(long _this_arg); - // MUST_USE_RES struct LDKAmount VerifiedInvoiceRequest_amount(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg); + // MUST_USE_RES struct LDKCOption_AmountZ VerifiedInvoiceRequest_amount(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_VerifiedInvoiceRequest_amount")] public static extern long VerifiedInvoiceRequest_amount(long _this_arg); // MUST_USE_RES struct LDKPrintableString VerifiedInvoiceRequest_description(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_VerifiedInvoiceRequest_description")] public static extern long VerifiedInvoiceRequest_description(long _this_arg); @@ -10816,10 +11774,44 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_VerifiedInvoiceRequest_payer_id")] public static extern long VerifiedInvoiceRequest_payer_id(long _this_arg); // MUST_USE_RES struct LDKPrintableString VerifiedInvoiceRequest_payer_note(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_VerifiedInvoiceRequest_payer_note")] public static extern long VerifiedInvoiceRequest_payer_note(long _this_arg); + // MUST_USE_RES struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ VerifiedInvoiceRequest_respond_with(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths, struct LDKThirtyTwoBytes payment_hash); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_VerifiedInvoiceRequest_respond_with")] public static extern long VerifiedInvoiceRequest_respond_with(long _this_arg, long _payment_paths, long _payment_hash); + // MUST_USE_RES struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ VerifiedInvoiceRequest_respond_with_no_std(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths, struct LDKThirtyTwoBytes payment_hash, uint64_t created_at); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_VerifiedInvoiceRequest_respond_with_no_std")] public static extern long VerifiedInvoiceRequest_respond_with_no_std(long _this_arg, long _payment_paths, long _payment_hash, long _created_at); + // MUST_USE_RES struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ VerifiedInvoiceRequest_respond_using_derived_keys(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths, struct LDKThirtyTwoBytes payment_hash); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_VerifiedInvoiceRequest_respond_using_derived_keys")] public static extern long VerifiedInvoiceRequest_respond_using_derived_keys(long _this_arg, long _payment_paths, long _payment_hash); + // MUST_USE_RES struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ VerifiedInvoiceRequest_respond_using_derived_keys_no_std(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths, struct LDKThirtyTwoBytes payment_hash, uint64_t created_at); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_VerifiedInvoiceRequest_respond_using_derived_keys_no_std")] public static extern long VerifiedInvoiceRequest_respond_using_derived_keys_no_std(long _this_arg, long _payment_paths, long _payment_hash, long _created_at); // struct LDKCVec_u8Z UnsignedInvoiceRequest_write(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedInvoiceRequest_write")] public static extern long UnsignedInvoiceRequest_write(long _obj); // struct LDKCVec_u8Z InvoiceRequest_write(const struct LDKInvoiceRequest *NONNULL_PTR obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequest_write")] public static extern long InvoiceRequest_write(long _obj); + // void InvoiceRequestFields_free(struct LDKInvoiceRequestFields this_obj); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestFields_free")] public static extern void InvoiceRequestFields_free(long _this_obj); + // struct LDKPublicKey InvoiceRequestFields_get_payer_id(const struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestFields_get_payer_id")] public static extern long InvoiceRequestFields_get_payer_id(long _this_ptr); + // void InvoiceRequestFields_set_payer_id(struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr, struct LDKPublicKey val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestFields_set_payer_id")] public static extern void InvoiceRequestFields_set_payer_id(long _this_ptr, long _val); + // struct LDKCOption_u64Z InvoiceRequestFields_get_quantity(const struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestFields_get_quantity")] public static extern long InvoiceRequestFields_get_quantity(long _this_ptr); + // void InvoiceRequestFields_set_quantity(struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestFields_set_quantity")] public static extern void InvoiceRequestFields_set_quantity(long _this_ptr, long _val); + // struct LDKUntrustedString InvoiceRequestFields_get_payer_note_truncated(const struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestFields_get_payer_note_truncated")] public static extern long InvoiceRequestFields_get_payer_note_truncated(long _this_ptr); + // void InvoiceRequestFields_set_payer_note_truncated(struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr, struct LDKUntrustedString val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestFields_set_payer_note_truncated")] public static extern void InvoiceRequestFields_set_payer_note_truncated(long _this_ptr, long _val); + // MUST_USE_RES struct LDKInvoiceRequestFields InvoiceRequestFields_new(struct LDKPublicKey payer_id_arg, struct LDKCOption_u64Z quantity_arg, struct LDKUntrustedString payer_note_truncated_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestFields_new")] public static extern long InvoiceRequestFields_new(long _payer_id_arg, long _quantity_arg, long _payer_note_truncated_arg); + // uint64_t InvoiceRequestFields_clone_ptr(LDKInvoiceRequestFields *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestFields_clone_ptr")] public static extern long InvoiceRequestFields_clone_ptr(long _arg); + // struct LDKInvoiceRequestFields InvoiceRequestFields_clone(const struct LDKInvoiceRequestFields *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestFields_clone")] public static extern long InvoiceRequestFields_clone(long _orig); + // bool InvoiceRequestFields_eq(const struct LDKInvoiceRequestFields *NONNULL_PTR a, const struct LDKInvoiceRequestFields *NONNULL_PTR b); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestFields_eq")] public static extern bool InvoiceRequestFields_eq(long _a, long _b); + // struct LDKCVec_u8Z InvoiceRequestFields_write(const struct LDKInvoiceRequestFields *NONNULL_PTR obj); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestFields_write")] public static extern long InvoiceRequestFields_write(long _obj); + // struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ InvoiceRequestFields_read(struct LDKu8slice ser); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestFields_read")] public static extern long InvoiceRequestFields_read(long _ser); // void TaggedHash_free(struct LDKTaggedHash this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TaggedHash_free")] public static extern void TaggedHash_free(long _this_obj); // uint64_t TaggedHash_clone_ptr(LDKTaggedHash *NONNULL_PTR arg); @@ -10832,6 +11824,16 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TaggedHash_tag")] public static extern long TaggedHash_tag(long _this_arg); // MUST_USE_RES struct LDKThirtyTwoBytes TaggedHash_merkle_root(const struct LDKTaggedHash *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_TaggedHash_merkle_root")] public static extern long TaggedHash_merkle_root(long _this_arg); + // void SignError_free(struct LDKSignError this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SignError_free")] public static extern void SignError_free(long _this_ptr); + // uint64_t SignError_clone_ptr(LDKSignError *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SignError_clone_ptr")] public static extern long SignError_clone_ptr(long _arg); + // struct LDKSignError SignError_clone(const struct LDKSignError *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SignError_clone")] public static extern long SignError_clone(long _orig); + // struct LDKSignError SignError_signing(void); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SignError_signing")] public static extern long SignError_signing(); + // struct LDKSignError SignError_verification(enum LDKSecp256k1Error a); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SignError_verification")] public static extern long SignError_verification(Secp256k1Error _a); // void Bolt12ParseError_free(struct LDKBolt12ParseError this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12ParseError_free")] public static extern void Bolt12ParseError_free(long _this_obj); // uint64_t Bolt12ParseError_clone_ptr(LDKBolt12ParseError *NONNULL_PTR arg); @@ -10886,6 +11888,8 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12SemanticError_duplicate_payment_id")] public static extern Bolt12SemanticError Bolt12SemanticError_duplicate_payment_id(); // enum LDKBolt12SemanticError Bolt12SemanticError_missing_paths(void); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12SemanticError_missing_paths")] public static extern Bolt12SemanticError Bolt12SemanticError_missing_paths(); + // enum LDKBolt12SemanticError Bolt12SemanticError_unexpected_paths(void); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12SemanticError_unexpected_paths")] public static extern Bolt12SemanticError Bolt12SemanticError_unexpected_paths(); // enum LDKBolt12SemanticError Bolt12SemanticError_invalid_pay_info(void); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12SemanticError_invalid_pay_info")] public static extern Bolt12SemanticError Bolt12SemanticError_invalid_pay_info(); // enum LDKBolt12SemanticError Bolt12SemanticError_missing_creation_time(void); @@ -10894,6 +11898,32 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12SemanticError_missing_payment_hash")] public static extern Bolt12SemanticError Bolt12SemanticError_missing_payment_hash(); // enum LDKBolt12SemanticError Bolt12SemanticError_missing_signature(void); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12SemanticError_missing_signature")] public static extern Bolt12SemanticError Bolt12SemanticError_missing_signature(); + // void RefundMaybeWithDerivedMetadataBuilder_free(struct LDKRefundMaybeWithDerivedMetadataBuilder this_obj); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RefundMaybeWithDerivedMetadataBuilder_free")] public static extern void RefundMaybeWithDerivedMetadataBuilder_free(long _this_obj); + // uint64_t RefundMaybeWithDerivedMetadataBuilder_clone_ptr(LDKRefundMaybeWithDerivedMetadataBuilder *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RefundMaybeWithDerivedMetadataBuilder_clone_ptr")] public static extern long RefundMaybeWithDerivedMetadataBuilder_clone_ptr(long _arg); + // struct LDKRefundMaybeWithDerivedMetadataBuilder RefundMaybeWithDerivedMetadataBuilder_clone(const struct LDKRefundMaybeWithDerivedMetadataBuilder *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RefundMaybeWithDerivedMetadataBuilder_clone")] public static extern long RefundMaybeWithDerivedMetadataBuilder_clone(long _orig); + // MUST_USE_RES struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ RefundMaybeWithDerivedMetadataBuilder_new(struct LDKCVec_u8Z metadata, struct LDKPublicKey payer_id, uint64_t amount_msats); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RefundMaybeWithDerivedMetadataBuilder_new")] public static extern long RefundMaybeWithDerivedMetadataBuilder_new(long _metadata, long _payer_id, long _amount_msats); + // MUST_USE_RES struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(struct LDKPublicKey node_id, const struct LDKExpandedKey *NONNULL_PTR expanded_key, struct LDKEntropySource entropy_source, uint64_t amount_msats, struct LDKThirtyTwoBytes payment_id); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id")] public static extern long RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(long _node_id, long _expanded_key, long _entropy_source, long _amount_msats, long _payment_id); + // MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_description(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, struct LDKStr description); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RefundMaybeWithDerivedMetadataBuilder_description")] public static extern void RefundMaybeWithDerivedMetadataBuilder_description(long _this_arg, long _description); + // MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_absolute_expiry(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, uint64_t absolute_expiry); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RefundMaybeWithDerivedMetadataBuilder_absolute_expiry")] public static extern void RefundMaybeWithDerivedMetadataBuilder_absolute_expiry(long _this_arg, long _absolute_expiry); + // MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_issuer(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, struct LDKStr issuer); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RefundMaybeWithDerivedMetadataBuilder_issuer")] public static extern void RefundMaybeWithDerivedMetadataBuilder_issuer(long _this_arg, long _issuer); + // MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_path(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, struct LDKBlindedPath path); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RefundMaybeWithDerivedMetadataBuilder_path")] public static extern void RefundMaybeWithDerivedMetadataBuilder_path(long _this_arg, long _path); + // MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_chain(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, enum LDKNetwork network); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RefundMaybeWithDerivedMetadataBuilder_chain")] public static extern void RefundMaybeWithDerivedMetadataBuilder_chain(long _this_arg, Network _network); + // MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_quantity(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, uint64_t quantity); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RefundMaybeWithDerivedMetadataBuilder_quantity")] public static extern void RefundMaybeWithDerivedMetadataBuilder_quantity(long _this_arg, long _quantity); + // MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_payer_note(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, struct LDKStr payer_note); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RefundMaybeWithDerivedMetadataBuilder_payer_note")] public static extern void RefundMaybeWithDerivedMetadataBuilder_payer_note(long _this_arg, long _payer_note); + // MUST_USE_RES struct LDKCResult_RefundBolt12SemanticErrorZ RefundMaybeWithDerivedMetadataBuilder_build(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RefundMaybeWithDerivedMetadataBuilder_build")] public static extern long RefundMaybeWithDerivedMetadataBuilder_build(long _this_arg); // void Refund_free(struct LDKRefund this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Refund_free")] public static extern void Refund_free(long _this_obj); // uint64_t Refund_clone_ptr(LDKRefund *NONNULL_PTR arg); @@ -10926,6 +11956,8 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Refund_payer_id")] public static extern long Refund_payer_id(long _this_arg); // MUST_USE_RES struct LDKPrintableString Refund_payer_note(const struct LDKRefund *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Refund_payer_note")] public static extern long Refund_payer_note(long _this_arg); + // uint64_t Refund_hash(const struct LDKRefund *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Refund_hash")] public static extern long Refund_hash(long _o); // struct LDKCVec_u8Z Refund_write(const struct LDKRefund *NONNULL_PTR obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Refund_write")] public static extern long Refund_write(long _obj); // struct LDKCResult_RefundBolt12ParseErrorZ Refund_from_str(struct LDKStr s); @@ -10968,6 +12000,8 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeId_clone")] public static extern long NodeId_clone(long _orig); // MUST_USE_RES struct LDKNodeId NodeId_from_pubkey(struct LDKPublicKey pubkey); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeId_from_pubkey")] public static extern long NodeId_from_pubkey(long _pubkey); + // MUST_USE_RES struct LDKCResult_NodeIdDecodeErrorZ NodeId_from_slice(struct LDKu8slice bytes); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeId_from_slice")] public static extern long NodeId_from_slice(long _bytes); // MUST_USE_RES struct LDKu8slice NodeId_as_slice(const struct LDKNodeId *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeId_as_slice")] public static extern long NodeId_as_slice(long _this_arg); // MUST_USE_RES const uint8_t (*NodeId_as_array(const struct LDKNodeId *NONNULL_PTR this_arg))[33]; @@ -11114,6 +12148,10 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DirectedChannelInfo_channel")] public static extern long DirectedChannelInfo_channel(long _this_arg); // MUST_USE_RES struct LDKEffectiveCapacity DirectedChannelInfo_effective_capacity(const struct LDKDirectedChannelInfo *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DirectedChannelInfo_effective_capacity")] public static extern long DirectedChannelInfo_effective_capacity(long _this_arg); + // MUST_USE_RES struct LDKNodeId DirectedChannelInfo_source(const struct LDKDirectedChannelInfo *NONNULL_PTR this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DirectedChannelInfo_source")] public static extern long DirectedChannelInfo_source(long _this_arg); + // MUST_USE_RES struct LDKNodeId DirectedChannelInfo_target(const struct LDKDirectedChannelInfo *NONNULL_PTR this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DirectedChannelInfo_target")] public static extern long DirectedChannelInfo_target(long _this_arg); // void EffectiveCapacity_free(struct LDKEffectiveCapacity this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_EffectiveCapacity_free")] public static extern void EffectiveCapacity_free(long _this_ptr); // uint64_t EffectiveCapacity_clone_ptr(LDKEffectiveCapacity *NONNULL_PTR arg); @@ -11232,6 +12270,8 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeInfo_clone")] public static extern long NodeInfo_clone(long _orig); // bool NodeInfo_eq(const struct LDKNodeInfo *NONNULL_PTR a, const struct LDKNodeInfo *NONNULL_PTR b); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeInfo_eq")] public static extern bool NodeInfo_eq(long _a, long _b); + // MUST_USE_RES bool NodeInfo_is_tor_only(const struct LDKNodeInfo *NONNULL_PTR this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeInfo_is_tor_only")] public static extern bool NodeInfo_is_tor_only(long _this_arg); // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeInfo_write")] public static extern long NodeInfo_write(long _obj); // struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser); @@ -11862,8 +12902,12 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DelayedPaymentOutputDescriptor_get_channel_value_satoshis")] public static extern long DelayedPaymentOutputDescriptor_get_channel_value_satoshis(long _this_ptr); // void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DelayedPaymentOutputDescriptor_set_channel_value_satoshis")] public static extern void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(long _this_ptr, long _val); - // MUST_USE_RES struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_new(struct LDKOutPoint outpoint_arg, struct LDKPublicKey per_commitment_point_arg, uint16_t to_self_delay_arg, struct LDKTxOut output_arg, struct LDKRevocationKey revocation_pubkey_arg, struct LDKThirtyTwoBytes channel_keys_id_arg, uint64_t channel_value_satoshis_arg); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DelayedPaymentOutputDescriptor_new")] public static extern long DelayedPaymentOutputDescriptor_new(long _outpoint_arg, long _per_commitment_point_arg, short _to_self_delay_arg, long _output_arg, long _revocation_pubkey_arg, long _channel_keys_id_arg, long _channel_value_satoshis_arg); + // struct LDKChannelTransactionParameters DelayedPaymentOutputDescriptor_get_channel_transaction_parameters(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DelayedPaymentOutputDescriptor_get_channel_transaction_parameters")] public static extern long DelayedPaymentOutputDescriptor_get_channel_transaction_parameters(long _this_ptr); + // void DelayedPaymentOutputDescriptor_set_channel_transaction_parameters(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKChannelTransactionParameters val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DelayedPaymentOutputDescriptor_set_channel_transaction_parameters")] public static extern void DelayedPaymentOutputDescriptor_set_channel_transaction_parameters(long _this_ptr, long _val); + // MUST_USE_RES struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_new(struct LDKOutPoint outpoint_arg, struct LDKPublicKey per_commitment_point_arg, uint16_t to_self_delay_arg, struct LDKTxOut output_arg, struct LDKRevocationKey revocation_pubkey_arg, struct LDKThirtyTwoBytes channel_keys_id_arg, uint64_t channel_value_satoshis_arg, struct LDKChannelTransactionParameters channel_transaction_parameters_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DelayedPaymentOutputDescriptor_new")] public static extern long DelayedPaymentOutputDescriptor_new(long _outpoint_arg, long _per_commitment_point_arg, short _to_self_delay_arg, long _output_arg, long _revocation_pubkey_arg, long _channel_keys_id_arg, long _channel_value_satoshis_arg, long _channel_transaction_parameters_arg); // uint64_t DelayedPaymentOutputDescriptor_clone_ptr(LDKDelayedPaymentOutputDescriptor *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DelayedPaymentOutputDescriptor_clone_ptr")] public static extern long DelayedPaymentOutputDescriptor_clone_ptr(long _arg); // struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig); @@ -11970,6 +13014,10 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HTLCDescriptor_get_channel_derivation_parameters")] public static extern long HTLCDescriptor_get_channel_derivation_parameters(long _this_ptr); // void HTLCDescriptor_set_channel_derivation_parameters(struct LDKHTLCDescriptor *NONNULL_PTR this_ptr, struct LDKChannelDerivationParameters val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HTLCDescriptor_set_channel_derivation_parameters")] public static extern void HTLCDescriptor_set_channel_derivation_parameters(long _this_ptr, long _val); + // const uint8_t (*HTLCDescriptor_get_commitment_txid(const struct LDKHTLCDescriptor *NONNULL_PTR this_ptr))[32]; + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HTLCDescriptor_get_commitment_txid")] public static extern long HTLCDescriptor_get_commitment_txid(long _this_ptr); + // void HTLCDescriptor_set_commitment_txid(struct LDKHTLCDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HTLCDescriptor_set_commitment_txid")] public static extern void HTLCDescriptor_set_commitment_txid(long _this_ptr, long _val); // uint64_t HTLCDescriptor_get_per_commitment_number(const struct LDKHTLCDescriptor *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HTLCDescriptor_get_per_commitment_number")] public static extern long HTLCDescriptor_get_per_commitment_number(long _this_ptr); // void HTLCDescriptor_set_per_commitment_number(struct LDKHTLCDescriptor *NONNULL_PTR this_ptr, uint64_t val); @@ -11994,6 +13042,8 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HTLCDescriptor_get_counterparty_sig")] public static extern long HTLCDescriptor_get_counterparty_sig(long _this_ptr); // void HTLCDescriptor_set_counterparty_sig(struct LDKHTLCDescriptor *NONNULL_PTR this_ptr, struct LDKECDSASignature val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HTLCDescriptor_set_counterparty_sig")] public static extern void HTLCDescriptor_set_counterparty_sig(long _this_ptr, long _val); + // MUST_USE_RES struct LDKHTLCDescriptor HTLCDescriptor_new(struct LDKChannelDerivationParameters channel_derivation_parameters_arg, struct LDKThirtyTwoBytes commitment_txid_arg, uint64_t per_commitment_number_arg, struct LDKPublicKey per_commitment_point_arg, uint32_t feerate_per_kw_arg, struct LDKHTLCOutputInCommitment htlc_arg, struct LDKCOption_ThirtyTwoBytesZ preimage_arg, struct LDKECDSASignature counterparty_sig_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HTLCDescriptor_new")] public static extern long HTLCDescriptor_new(long _channel_derivation_parameters_arg, long _commitment_txid_arg, long _per_commitment_number_arg, long _per_commitment_point_arg, int _feerate_per_kw_arg, long _htlc_arg, long _preimage_arg, long _counterparty_sig_arg); // uint64_t HTLCDescriptor_clone_ptr(LDKHTLCDescriptor *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HTLCDescriptor_clone_ptr")] public static extern long HTLCDescriptor_clone_ptr(long _arg); // struct LDKHTLCDescriptor HTLCDescriptor_clone(const struct LDKHTLCDescriptor *NONNULL_PTR orig); @@ -12030,8 +13080,12 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_EntropySource_free")] public static extern void EntropySource_free(long _this_ptr); // void NodeSigner_free(struct LDKNodeSigner this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeSigner_free")] public static extern void NodeSigner_free(long _this_ptr); + // void OutputSpender_free(struct LDKOutputSpender this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OutputSpender_free")] public static extern void OutputSpender_free(long _this_ptr); // void SignerProvider_free(struct LDKSignerProvider this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SignerProvider_free")] public static extern void SignerProvider_free(long _this_ptr); + // void ChangeDestinationSource_free(struct LDKChangeDestinationSource this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChangeDestinationSource_free")] public static extern void ChangeDestinationSource_free(long _this_ptr); // void InMemorySigner_free(struct LDKInMemorySigner this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InMemorySigner_free")] public static extern void InMemorySigner_free(long _this_obj); // const uint8_t (*InMemorySigner_get_funding_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32]; @@ -12104,12 +13158,12 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_KeysManager_derive_channel_keys")] public static extern long KeysManager_derive_channel_keys(long _this_arg, long _channel_value_satoshis, long _params); // MUST_USE_RES struct LDKCResult_CVec_u8ZNoneZ KeysManager_sign_spendable_outputs_psbt(const struct LDKKeysManager *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ descriptors, struct LDKCVec_u8Z psbt); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_KeysManager_sign_spendable_outputs_psbt")] public static extern long KeysManager_sign_spendable_outputs_psbt(long _this_arg, long _descriptors, long _psbt); - // MUST_USE_RES struct LDKCResult_TransactionNoneZ KeysManager_spend_spendable_outputs(const struct LDKKeysManager *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ descriptors, struct LDKCVec_TxOutZ outputs, struct LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight, struct LDKCOption_u32Z locktime); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_KeysManager_spend_spendable_outputs")] public static extern long KeysManager_spend_spendable_outputs(long _this_arg, long _descriptors, long _outputs, long _change_destination_script, int _feerate_sat_per_1000_weight, long _locktime); // struct LDKEntropySource KeysManager_as_EntropySource(const struct LDKKeysManager *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_KeysManager_as_EntropySource")] public static extern long KeysManager_as_EntropySource(long _this_arg); // struct LDKNodeSigner KeysManager_as_NodeSigner(const struct LDKKeysManager *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_KeysManager_as_NodeSigner")] public static extern long KeysManager_as_NodeSigner(long _this_arg); + // struct LDKOutputSpender KeysManager_as_OutputSpender(const struct LDKKeysManager *NONNULL_PTR this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_KeysManager_as_OutputSpender")] public static extern long KeysManager_as_OutputSpender(long _this_arg); // struct LDKSignerProvider KeysManager_as_SignerProvider(const struct LDKKeysManager *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_KeysManager_as_SignerProvider")] public static extern long KeysManager_as_SignerProvider(long _this_arg); // void PhantomKeysManager_free(struct LDKPhantomKeysManager this_obj); @@ -12118,18 +13172,24 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PhantomKeysManager_as_EntropySource")] public static extern long PhantomKeysManager_as_EntropySource(long _this_arg); // struct LDKNodeSigner PhantomKeysManager_as_NodeSigner(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PhantomKeysManager_as_NodeSigner")] public static extern long PhantomKeysManager_as_NodeSigner(long _this_arg); + // struct LDKOutputSpender PhantomKeysManager_as_OutputSpender(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PhantomKeysManager_as_OutputSpender")] public static extern long PhantomKeysManager_as_OutputSpender(long _this_arg); // struct LDKSignerProvider PhantomKeysManager_as_SignerProvider(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PhantomKeysManager_as_SignerProvider")] public static extern long PhantomKeysManager_as_SignerProvider(long _this_arg); // MUST_USE_RES struct LDKPhantomKeysManager PhantomKeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos, const uint8_t (*cross_node_seed)[32]); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PhantomKeysManager_new")] public static extern long PhantomKeysManager_new(long _seed, long _starting_time_secs, int _starting_time_nanos, long _cross_node_seed); - // MUST_USE_RES struct LDKCResult_TransactionNoneZ PhantomKeysManager_spend_spendable_outputs(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ descriptors, struct LDKCVec_TxOutZ outputs, struct LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight, struct LDKCOption_u32Z locktime); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PhantomKeysManager_spend_spendable_outputs")] public static extern long PhantomKeysManager_spend_spendable_outputs(long _this_arg, long _descriptors, long _outputs, long _change_destination_script, int _feerate_sat_per_1000_weight, long _locktime); // MUST_USE_RES struct LDKInMemorySigner PhantomKeysManager_derive_channel_keys(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg, uint64_t channel_value_satoshis, const uint8_t (*params)[32]); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PhantomKeysManager_derive_channel_keys")] public static extern long PhantomKeysManager_derive_channel_keys(long _this_arg, long _channel_value_satoshis, long _params); // MUST_USE_RES struct LDKSecretKey PhantomKeysManager_get_node_secret_key(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PhantomKeysManager_get_node_secret_key")] public static extern long PhantomKeysManager_get_node_secret_key(long _this_arg); // MUST_USE_RES struct LDKSecretKey PhantomKeysManager_get_phantom_node_secret_key(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PhantomKeysManager_get_phantom_node_secret_key")] public static extern long PhantomKeysManager_get_phantom_node_secret_key(long _this_arg); + // void RandomBytes_free(struct LDKRandomBytes this_obj); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RandomBytes_free")] public static extern void RandomBytes_free(long _this_obj); + // MUST_USE_RES struct LDKRandomBytes RandomBytes_new(struct LDKThirtyTwoBytes seed); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RandomBytes_new")] public static extern long RandomBytes_new(long _seed); + // struct LDKEntropySource RandomBytes_as_EntropySource(const struct LDKRandomBytes *NONNULL_PTR this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RandomBytes_as_EntropySource")] public static extern long RandomBytes_as_EntropySource(long _this_arg); // void EcdsaChannelSigner_free(struct LDKEcdsaChannelSigner this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_EcdsaChannelSigner_free")] public static extern void EcdsaChannelSigner_free(long _this_ptr); // uint64_t WriteableEcdsaChannelSigner_clone_ptr(LDKWriteableEcdsaChannelSigner *NONNULL_PTR arg); @@ -12180,6 +13240,12 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Destination_node")] public static extern long Destination_node(long _a); // struct LDKDestination Destination_blinded_path(struct LDKBlindedPath a); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Destination_blinded_path")] public static extern long Destination_blinded_path(long _a); + // uint64_t Destination_hash(const struct LDKDestination *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Destination_hash")] public static extern long Destination_hash(long _o); + // bool Destination_eq(const struct LDKDestination *NONNULL_PTR a, const struct LDKDestination *NONNULL_PTR b); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Destination_eq")] public static extern bool Destination_eq(long _a, long _b); + // void Destination_resolve(struct LDKDestination *NONNULL_PTR this_arg, const struct LDKReadOnlyNetworkGraph *NONNULL_PTR network_graph); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Destination_resolve")] public static extern void Destination_resolve(long _this_arg, long _network_graph); // void SendSuccess_free(struct LDKSendSuccess this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SendSuccess_free")] public static extern void SendSuccess_free(long _this_ptr); // uint64_t SendSuccess_clone_ptr(LDKSendSuccess *NONNULL_PTR arg); @@ -12190,6 +13256,8 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SendSuccess_buffered")] public static extern long SendSuccess_buffered(); // struct LDKSendSuccess SendSuccess_buffered_awaiting_connection(struct LDKPublicKey a); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SendSuccess_buffered_awaiting_connection")] public static extern long SendSuccess_buffered_awaiting_connection(long _a); + // uint64_t SendSuccess_hash(const struct LDKSendSuccess *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SendSuccess_hash")] public static extern long SendSuccess_hash(long _o); // bool SendSuccess_eq(const struct LDKSendSuccess *NONNULL_PTR a, const struct LDKSendSuccess *NONNULL_PTR b); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SendSuccess_eq")] public static extern bool SendSuccess_eq(long _a, long _b); // void SendError_free(struct LDKSendError this_ptr); @@ -12214,8 +13282,12 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SendError_buffer_full")] public static extern long SendError_buffer_full(); // struct LDKSendError SendError_get_node_id_failed(void); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SendError_get_node_id_failed")] public static extern long SendError_get_node_id_failed(); + // struct LDKSendError SendError_unresolved_introduction_node(void); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SendError_unresolved_introduction_node")] public static extern long SendError_unresolved_introduction_node(); // struct LDKSendError SendError_blinded_path_advance_failed(void); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SendError_blinded_path_advance_failed")] public static extern long SendError_blinded_path_advance_failed(); + // uint64_t SendError_hash(const struct LDKSendError *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SendError_hash")] public static extern long SendError_hash(long _o); // bool SendError_eq(const struct LDKSendError *NONNULL_PTR a, const struct LDKSendError *NONNULL_PTR b); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_SendError_eq")] public static extern bool SendError_eq(long _a, long _b); // void CustomOnionMessageHandler_free(struct LDKCustomOnionMessageHandler this_ptr); @@ -12226,16 +13298,18 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PeeledOnion_clone_ptr")] public static extern long PeeledOnion_clone_ptr(long _arg); // struct LDKPeeledOnion PeeledOnion_clone(const struct LDKPeeledOnion *NONNULL_PTR orig); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PeeledOnion_clone")] public static extern long PeeledOnion_clone(long _orig); - // struct LDKPeeledOnion PeeledOnion_forward(struct LDKPublicKey a, struct LDKOnionMessage b); + // struct LDKPeeledOnion PeeledOnion_forward(struct LDKNextMessageHop a, struct LDKOnionMessage b); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PeeledOnion_forward")] public static extern long PeeledOnion_forward(long _a, long _b); // struct LDKPeeledOnion PeeledOnion_receive(struct LDKParsedOnionMessageContents a, struct LDKThirtyTwoBytes b, struct LDKBlindedPath c); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PeeledOnion_receive")] public static extern long PeeledOnion_receive(long _a, long _b, long _c); - // struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ create_onion_message(const struct LDKEntropySource *NONNULL_PTR entropy_source, const struct LDKNodeSigner *NONNULL_PTR node_signer, struct LDKOnionMessagePath path, struct LDKOnionMessageContents contents, struct LDKBlindedPath reply_path); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_create_onion_message")] public static extern long create_onion_message(long _entropy_source, long _node_signer, long _path, long _contents, long _reply_path); + // struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ create_onion_message_resolving_destination(const struct LDKEntropySource *NONNULL_PTR entropy_source, const struct LDKNodeSigner *NONNULL_PTR node_signer, const struct LDKNodeIdLookUp *NONNULL_PTR node_id_lookup, const struct LDKReadOnlyNetworkGraph *NONNULL_PTR network_graph, struct LDKOnionMessagePath path, struct LDKOnionMessageContents contents, struct LDKBlindedPath reply_path); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_create_onion_message_resolving_destination")] public static extern long create_onion_message_resolving_destination(long _entropy_source, long _node_signer, long _node_id_lookup, long _network_graph, long _path, long _contents, long _reply_path); + // struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ create_onion_message(const struct LDKEntropySource *NONNULL_PTR entropy_source, const struct LDKNodeSigner *NONNULL_PTR node_signer, const struct LDKNodeIdLookUp *NONNULL_PTR node_id_lookup, struct LDKOnionMessagePath path, struct LDKOnionMessageContents contents, struct LDKBlindedPath reply_path); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_create_onion_message")] public static extern long create_onion_message(long _entropy_source, long _node_signer, long _node_id_lookup, long _path, long _contents, long _reply_path); // struct LDKCResult_PeeledOnionNoneZ peel_onion_message(const struct LDKOnionMessage *NONNULL_PTR msg, struct LDKNodeSigner node_signer, struct LDKLogger logger, struct LDKCustomOnionMessageHandler custom_handler); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_peel_onion_message")] public static extern long peel_onion_message(long _msg, long _node_signer, long _logger, long _custom_handler); - // MUST_USE_RES struct LDKOnionMessenger OnionMessenger_new(struct LDKEntropySource entropy_source, struct LDKNodeSigner node_signer, struct LDKLogger logger, struct LDKMessageRouter message_router, struct LDKOffersMessageHandler offers_handler, struct LDKCustomOnionMessageHandler custom_handler); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OnionMessenger_new")] public static extern long OnionMessenger_new(long _entropy_source, long _node_signer, long _logger, long _message_router, long _offers_handler, long _custom_handler); + // MUST_USE_RES struct LDKOnionMessenger OnionMessenger_new(struct LDKEntropySource entropy_source, struct LDKNodeSigner node_signer, struct LDKLogger logger, struct LDKNodeIdLookUp node_id_lookup, struct LDKMessageRouter message_router, struct LDKOffersMessageHandler offers_handler, struct LDKCustomOnionMessageHandler custom_handler); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OnionMessenger_new")] public static extern long OnionMessenger_new(long _entropy_source, long _node_signer, long _logger, long _node_id_lookup, long _message_router, long _offers_handler, long _custom_handler); // MUST_USE_RES struct LDKCResult_SendSuccessSendErrorZ OnionMessenger_send_onion_message(const struct LDKOnionMessenger *NONNULL_PTR this_arg, struct LDKOnionMessageContents contents, struct LDKDestination destination, struct LDKBlindedPath reply_path); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OnionMessenger_send_onion_message")] public static extern long OnionMessenger_send_onion_message(long _this_arg, long _contents, long _destination, long _reply_path); // struct LDKOnionMessageHandler OnionMessenger_as_OnionMessageHandler(const struct LDKOnionMessenger *NONNULL_PTR this_arg); @@ -12312,12 +13386,26 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OnionMessageContents_clone")] public static extern long OnionMessageContents_clone(long _orig); // void OnionMessageContents_free(struct LDKOnionMessageContents this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OnionMessageContents_free")] public static extern void OnionMessageContents_free(long _this_ptr); + // void NextMessageHop_free(struct LDKNextMessageHop this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NextMessageHop_free")] public static extern void NextMessageHop_free(long _this_ptr); + // uint64_t NextMessageHop_clone_ptr(LDKNextMessageHop *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NextMessageHop_clone_ptr")] public static extern long NextMessageHop_clone_ptr(long _arg); + // struct LDKNextMessageHop NextMessageHop_clone(const struct LDKNextMessageHop *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NextMessageHop_clone")] public static extern long NextMessageHop_clone(long _orig); + // struct LDKNextMessageHop NextMessageHop_node_id(struct LDKPublicKey a); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NextMessageHop_node_id")] public static extern long NextMessageHop_node_id(long _a); + // struct LDKNextMessageHop NextMessageHop_short_channel_id(uint64_t a); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NextMessageHop_short_channel_id")] public static extern long NextMessageHop_short_channel_id(long _a); + // uint64_t NextMessageHop_hash(const struct LDKNextMessageHop *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NextMessageHop_hash")] public static extern long NextMessageHop_hash(long _o); + // bool NextMessageHop_eq(const struct LDKNextMessageHop *NONNULL_PTR a, const struct LDKNextMessageHop *NONNULL_PTR b); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NextMessageHop_eq")] public static extern bool NextMessageHop_eq(long _a, long _b); // void BlindedPath_free(struct LDKBlindedPath this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BlindedPath_free")] public static extern void BlindedPath_free(long _this_obj); - // struct LDKPublicKey BlindedPath_get_introduction_node_id(const struct LDKBlindedPath *NONNULL_PTR this_ptr); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BlindedPath_get_introduction_node_id")] public static extern long BlindedPath_get_introduction_node_id(long _this_ptr); - // void BlindedPath_set_introduction_node_id(struct LDKBlindedPath *NONNULL_PTR this_ptr, struct LDKPublicKey val); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BlindedPath_set_introduction_node_id")] public static extern void BlindedPath_set_introduction_node_id(long _this_ptr, long _val); + // struct LDKIntroductionNode BlindedPath_get_introduction_node(const struct LDKBlindedPath *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BlindedPath_get_introduction_node")] public static extern long BlindedPath_get_introduction_node(long _this_ptr); + // void BlindedPath_set_introduction_node(struct LDKBlindedPath *NONNULL_PTR this_ptr, struct LDKIntroductionNode val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BlindedPath_set_introduction_node")] public static extern void BlindedPath_set_introduction_node(long _this_ptr, long _val); // struct LDKPublicKey BlindedPath_get_blinding_point(const struct LDKBlindedPath *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BlindedPath_get_blinding_point")] public static extern long BlindedPath_get_blinding_point(long _this_ptr); // void BlindedPath_set_blinding_point(struct LDKBlindedPath *NONNULL_PTR this_ptr, struct LDKPublicKey val); @@ -12326,8 +13414,8 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BlindedPath_get_blinded_hops")] public static extern long BlindedPath_get_blinded_hops(long _this_ptr); // void BlindedPath_set_blinded_hops(struct LDKBlindedPath *NONNULL_PTR this_ptr, struct LDKCVec_BlindedHopZ val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BlindedPath_set_blinded_hops")] public static extern void BlindedPath_set_blinded_hops(long _this_ptr, long _val); - // MUST_USE_RES struct LDKBlindedPath BlindedPath_new(struct LDKPublicKey introduction_node_id_arg, struct LDKPublicKey blinding_point_arg, struct LDKCVec_BlindedHopZ blinded_hops_arg); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BlindedPath_new")] public static extern long BlindedPath_new(long _introduction_node_id_arg, long _blinding_point_arg, long _blinded_hops_arg); + // MUST_USE_RES struct LDKBlindedPath BlindedPath_new(struct LDKIntroductionNode introduction_node_arg, struct LDKPublicKey blinding_point_arg, struct LDKCVec_BlindedHopZ blinded_hops_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BlindedPath_new")] public static extern long BlindedPath_new(long _introduction_node_arg, long _blinding_point_arg, long _blinded_hops_arg); // uint64_t BlindedPath_clone_ptr(LDKBlindedPath *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BlindedPath_clone_ptr")] public static extern long BlindedPath_clone_ptr(long _arg); // struct LDKBlindedPath BlindedPath_clone(const struct LDKBlindedPath *NONNULL_PTR orig); @@ -12336,6 +13424,38 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BlindedPath_hash")] public static extern long BlindedPath_hash(long _o); // bool BlindedPath_eq(const struct LDKBlindedPath *NONNULL_PTR a, const struct LDKBlindedPath *NONNULL_PTR b); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BlindedPath_eq")] public static extern bool BlindedPath_eq(long _a, long _b); + // void IntroductionNode_free(struct LDKIntroductionNode this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_IntroductionNode_free")] public static extern void IntroductionNode_free(long _this_ptr); + // uint64_t IntroductionNode_clone_ptr(LDKIntroductionNode *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_IntroductionNode_clone_ptr")] public static extern long IntroductionNode_clone_ptr(long _arg); + // struct LDKIntroductionNode IntroductionNode_clone(const struct LDKIntroductionNode *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_IntroductionNode_clone")] public static extern long IntroductionNode_clone(long _orig); + // struct LDKIntroductionNode IntroductionNode_node_id(struct LDKPublicKey a); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_IntroductionNode_node_id")] public static extern long IntroductionNode_node_id(long _a); + // struct LDKIntroductionNode IntroductionNode_directed_short_channel_id(enum LDKDirection a, uint64_t b); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_IntroductionNode_directed_short_channel_id")] public static extern long IntroductionNode_directed_short_channel_id(Direction _a, long _b); + // uint64_t IntroductionNode_hash(const struct LDKIntroductionNode *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_IntroductionNode_hash")] public static extern long IntroductionNode_hash(long _o); + // bool IntroductionNode_eq(const struct LDKIntroductionNode *NONNULL_PTR a, const struct LDKIntroductionNode *NONNULL_PTR b); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_IntroductionNode_eq")] public static extern bool IntroductionNode_eq(long _a, long _b); + // enum LDKDirection Direction_clone(const enum LDKDirection *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Direction_clone")] public static extern Direction Direction_clone(long _orig); + // enum LDKDirection Direction_node_one(void); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Direction_node_one")] public static extern Direction Direction_node_one(); + // enum LDKDirection Direction_node_two(void); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Direction_node_two")] public static extern Direction Direction_node_two(); + // uint64_t Direction_hash(const enum LDKDirection *NONNULL_PTR o); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Direction_hash")] public static extern long Direction_hash(long _o); + // bool Direction_eq(const enum LDKDirection *NONNULL_PTR a, const enum LDKDirection *NONNULL_PTR b); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Direction_eq")] public static extern bool Direction_eq(long _a, long _b); + // void NodeIdLookUp_free(struct LDKNodeIdLookUp this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeIdLookUp_free")] public static extern void NodeIdLookUp_free(long _this_ptr); + // void EmptyNodeIdLookUp_free(struct LDKEmptyNodeIdLookUp this_obj); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_EmptyNodeIdLookUp_free")] public static extern void EmptyNodeIdLookUp_free(long _this_obj); + // MUST_USE_RES struct LDKEmptyNodeIdLookUp EmptyNodeIdLookUp_new(void); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_EmptyNodeIdLookUp_new")] public static extern long EmptyNodeIdLookUp_new(); + // struct LDKNodeIdLookUp EmptyNodeIdLookUp_as_NodeIdLookUp(const struct LDKEmptyNodeIdLookUp *NONNULL_PTR this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_EmptyNodeIdLookUp_as_NodeIdLookUp")] public static extern long EmptyNodeIdLookUp_as_NodeIdLookUp(long _this_arg); // void BlindedHop_free(struct LDKBlindedHop this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BlindedHop_free")] public static extern void BlindedHop_free(long _this_obj); // struct LDKPublicKey BlindedHop_get_blinded_node_id(const struct LDKBlindedHop *NONNULL_PTR this_ptr); @@ -12356,14 +13476,16 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BlindedHop_hash")] public static extern long BlindedHop_hash(long _o); // bool BlindedHop_eq(const struct LDKBlindedHop *NONNULL_PTR a, const struct LDKBlindedHop *NONNULL_PTR b); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BlindedHop_eq")] public static extern bool BlindedHop_eq(long _a, long _b); - // MUST_USE_RES struct LDKCResult_BlindedPathNoneZ BlindedPath_one_hop_for_message(struct LDKPublicKey recipient_node_id, const struct LDKEntropySource *NONNULL_PTR entropy_source); + // MUST_USE_RES struct LDKCResult_BlindedPathNoneZ BlindedPath_one_hop_for_message(struct LDKPublicKey recipient_node_id, struct LDKEntropySource entropy_source); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BlindedPath_one_hop_for_message")] public static extern long BlindedPath_one_hop_for_message(long _recipient_node_id, long _entropy_source); - // MUST_USE_RES struct LDKCResult_BlindedPathNoneZ BlindedPath_new_for_message(struct LDKCVec_PublicKeyZ node_pks, const struct LDKEntropySource *NONNULL_PTR entropy_source); + // MUST_USE_RES struct LDKCResult_BlindedPathNoneZ BlindedPath_new_for_message(struct LDKCVec_PublicKeyZ node_pks, struct LDKEntropySource entropy_source); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BlindedPath_new_for_message")] public static extern long BlindedPath_new_for_message(long _node_pks, long _entropy_source); - // MUST_USE_RES struct LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_one_hop_for_payment(struct LDKPublicKey payee_node_id, struct LDKReceiveTlvs payee_tlvs, const struct LDKEntropySource *NONNULL_PTR entropy_source); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BlindedPath_one_hop_for_payment")] public static extern long BlindedPath_one_hop_for_payment(long _payee_node_id, long _payee_tlvs, long _entropy_source); - // MUST_USE_RES struct LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_new_for_payment(struct LDKCVec_ForwardNodeZ intermediate_nodes, struct LDKPublicKey payee_node_id, struct LDKReceiveTlvs payee_tlvs, uint64_t htlc_maximum_msat, const struct LDKEntropySource *NONNULL_PTR entropy_source); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BlindedPath_new_for_payment")] public static extern long BlindedPath_new_for_payment(long _intermediate_nodes, long _payee_node_id, long _payee_tlvs, long _htlc_maximum_msat, long _entropy_source); + // MUST_USE_RES struct LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_one_hop_for_payment(struct LDKPublicKey payee_node_id, struct LDKReceiveTlvs payee_tlvs, uint16_t min_final_cltv_expiry_delta, struct LDKEntropySource entropy_source); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BlindedPath_one_hop_for_payment")] public static extern long BlindedPath_one_hop_for_payment(long _payee_node_id, long _payee_tlvs, short _min_final_cltv_expiry_delta, long _entropy_source); + // MUST_USE_RES struct LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_new_for_payment(struct LDKCVec_ForwardNodeZ intermediate_nodes, struct LDKPublicKey payee_node_id, struct LDKReceiveTlvs payee_tlvs, uint64_t htlc_maximum_msat, uint16_t min_final_cltv_expiry_delta, struct LDKEntropySource entropy_source); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BlindedPath_new_for_payment")] public static extern long BlindedPath_new_for_payment(long _intermediate_nodes, long _payee_node_id, long _payee_tlvs, long _htlc_maximum_msat, short _min_final_cltv_expiry_delta, long _entropy_source); + // MUST_USE_RES struct LDKNodeId BlindedPath_public_introduction_node_id(const struct LDKBlindedPath *NONNULL_PTR this_arg, const struct LDKReadOnlyNetworkGraph *NONNULL_PTR network_graph); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BlindedPath_public_introduction_node_id")] public static extern long BlindedPath_public_introduction_node_id(long _this_arg, long _network_graph); // struct LDKCVec_u8Z BlindedPath_write(const struct LDKBlindedPath *NONNULL_PTR obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BlindedPath_write")] public static extern long BlindedPath_write(long _obj); // struct LDKCResult_BlindedPathDecodeErrorZ BlindedPath_read(struct LDKu8slice ser); @@ -12426,8 +13548,12 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ReceiveTlvs_get_payment_constraints")] public static extern long ReceiveTlvs_get_payment_constraints(long _this_ptr); // void ReceiveTlvs_set_payment_constraints(struct LDKReceiveTlvs *NONNULL_PTR this_ptr, struct LDKPaymentConstraints val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ReceiveTlvs_set_payment_constraints")] public static extern void ReceiveTlvs_set_payment_constraints(long _this_ptr, long _val); - // MUST_USE_RES struct LDKReceiveTlvs ReceiveTlvs_new(struct LDKThirtyTwoBytes payment_secret_arg, struct LDKPaymentConstraints payment_constraints_arg); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ReceiveTlvs_new")] public static extern long ReceiveTlvs_new(long _payment_secret_arg, long _payment_constraints_arg); + // struct LDKPaymentContext ReceiveTlvs_get_payment_context(const struct LDKReceiveTlvs *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ReceiveTlvs_get_payment_context")] public static extern long ReceiveTlvs_get_payment_context(long _this_ptr); + // void ReceiveTlvs_set_payment_context(struct LDKReceiveTlvs *NONNULL_PTR this_ptr, struct LDKPaymentContext val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ReceiveTlvs_set_payment_context")] public static extern void ReceiveTlvs_set_payment_context(long _this_ptr, long _val); + // MUST_USE_RES struct LDKReceiveTlvs ReceiveTlvs_new(struct LDKThirtyTwoBytes payment_secret_arg, struct LDKPaymentConstraints payment_constraints_arg, struct LDKPaymentContext payment_context_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ReceiveTlvs_new")] public static extern long ReceiveTlvs_new(long _payment_secret_arg, long _payment_constraints_arg, long _payment_context_arg); // uint64_t ReceiveTlvs_clone_ptr(LDKReceiveTlvs *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ReceiveTlvs_clone_ptr")] public static extern long ReceiveTlvs_clone_ptr(long _arg); // struct LDKReceiveTlvs ReceiveTlvs_clone(const struct LDKReceiveTlvs *NONNULL_PTR orig); @@ -12468,6 +13594,56 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentConstraints_clone_ptr")] public static extern long PaymentConstraints_clone_ptr(long _arg); // struct LDKPaymentConstraints PaymentConstraints_clone(const struct LDKPaymentConstraints *NONNULL_PTR orig); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentConstraints_clone")] public static extern long PaymentConstraints_clone(long _orig); + // void PaymentContext_free(struct LDKPaymentContext this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentContext_free")] public static extern void PaymentContext_free(long _this_ptr); + // uint64_t PaymentContext_clone_ptr(LDKPaymentContext *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentContext_clone_ptr")] public static extern long PaymentContext_clone_ptr(long _arg); + // struct LDKPaymentContext PaymentContext_clone(const struct LDKPaymentContext *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentContext_clone")] public static extern long PaymentContext_clone(long _orig); + // struct LDKPaymentContext PaymentContext_unknown(struct LDKUnknownPaymentContext a); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentContext_unknown")] public static extern long PaymentContext_unknown(long _a); + // struct LDKPaymentContext PaymentContext_bolt12_offer(struct LDKBolt12OfferContext a); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentContext_bolt12_offer")] public static extern long PaymentContext_bolt12_offer(long _a); + // struct LDKPaymentContext PaymentContext_bolt12_refund(struct LDKBolt12RefundContext a); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentContext_bolt12_refund")] public static extern long PaymentContext_bolt12_refund(long _a); + // bool PaymentContext_eq(const struct LDKPaymentContext *NONNULL_PTR a, const struct LDKPaymentContext *NONNULL_PTR b); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentContext_eq")] public static extern bool PaymentContext_eq(long _a, long _b); + // void UnknownPaymentContext_free(struct LDKUnknownPaymentContext this_obj); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnknownPaymentContext_free")] public static extern void UnknownPaymentContext_free(long _this_obj); + // uint64_t UnknownPaymentContext_clone_ptr(LDKUnknownPaymentContext *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnknownPaymentContext_clone_ptr")] public static extern long UnknownPaymentContext_clone_ptr(long _arg); + // struct LDKUnknownPaymentContext UnknownPaymentContext_clone(const struct LDKUnknownPaymentContext *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnknownPaymentContext_clone")] public static extern long UnknownPaymentContext_clone(long _orig); + // bool UnknownPaymentContext_eq(const struct LDKUnknownPaymentContext *NONNULL_PTR a, const struct LDKUnknownPaymentContext *NONNULL_PTR b); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnknownPaymentContext_eq")] public static extern bool UnknownPaymentContext_eq(long _a, long _b); + // void Bolt12OfferContext_free(struct LDKBolt12OfferContext this_obj); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12OfferContext_free")] public static extern void Bolt12OfferContext_free(long _this_obj); + // struct LDKOfferId Bolt12OfferContext_get_offer_id(const struct LDKBolt12OfferContext *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12OfferContext_get_offer_id")] public static extern long Bolt12OfferContext_get_offer_id(long _this_ptr); + // void Bolt12OfferContext_set_offer_id(struct LDKBolt12OfferContext *NONNULL_PTR this_ptr, struct LDKOfferId val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12OfferContext_set_offer_id")] public static extern void Bolt12OfferContext_set_offer_id(long _this_ptr, long _val); + // struct LDKInvoiceRequestFields Bolt12OfferContext_get_invoice_request(const struct LDKBolt12OfferContext *NONNULL_PTR this_ptr); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12OfferContext_get_invoice_request")] public static extern long Bolt12OfferContext_get_invoice_request(long _this_ptr); + // void Bolt12OfferContext_set_invoice_request(struct LDKBolt12OfferContext *NONNULL_PTR this_ptr, struct LDKInvoiceRequestFields val); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12OfferContext_set_invoice_request")] public static extern void Bolt12OfferContext_set_invoice_request(long _this_ptr, long _val); + // MUST_USE_RES struct LDKBolt12OfferContext Bolt12OfferContext_new(struct LDKOfferId offer_id_arg, struct LDKInvoiceRequestFields invoice_request_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12OfferContext_new")] public static extern long Bolt12OfferContext_new(long _offer_id_arg, long _invoice_request_arg); + // uint64_t Bolt12OfferContext_clone_ptr(LDKBolt12OfferContext *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12OfferContext_clone_ptr")] public static extern long Bolt12OfferContext_clone_ptr(long _arg); + // struct LDKBolt12OfferContext Bolt12OfferContext_clone(const struct LDKBolt12OfferContext *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12OfferContext_clone")] public static extern long Bolt12OfferContext_clone(long _orig); + // bool Bolt12OfferContext_eq(const struct LDKBolt12OfferContext *NONNULL_PTR a, const struct LDKBolt12OfferContext *NONNULL_PTR b); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12OfferContext_eq")] public static extern bool Bolt12OfferContext_eq(long _a, long _b); + // void Bolt12RefundContext_free(struct LDKBolt12RefundContext this_obj); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12RefundContext_free")] public static extern void Bolt12RefundContext_free(long _this_obj); + // MUST_USE_RES struct LDKBolt12RefundContext Bolt12RefundContext_new(void); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12RefundContext_new")] public static extern long Bolt12RefundContext_new(); + // uint64_t Bolt12RefundContext_clone_ptr(LDKBolt12RefundContext *NONNULL_PTR arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12RefundContext_clone_ptr")] public static extern long Bolt12RefundContext_clone_ptr(long _arg); + // struct LDKBolt12RefundContext Bolt12RefundContext_clone(const struct LDKBolt12RefundContext *NONNULL_PTR orig); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12RefundContext_clone")] public static extern long Bolt12RefundContext_clone(long _orig); + // bool Bolt12RefundContext_eq(const struct LDKBolt12RefundContext *NONNULL_PTR a, const struct LDKBolt12RefundContext *NONNULL_PTR b); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12RefundContext_eq")] public static extern bool Bolt12RefundContext_eq(long _a, long _b); // struct LDKCVec_u8Z ForwardTlvs_write(const struct LDKForwardTlvs *NONNULL_PTR obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ForwardTlvs_write")] public static extern long ForwardTlvs_write(long _obj); // struct LDKCVec_u8Z ReceiveTlvs_write(const struct LDKReceiveTlvs *NONNULL_PTR obj); @@ -12480,14 +13656,34 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentConstraints_write")] public static extern long PaymentConstraints_write(long _obj); // struct LDKCResult_PaymentConstraintsDecodeErrorZ PaymentConstraints_read(struct LDKu8slice ser); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentConstraints_read")] public static extern long PaymentConstraints_read(long _ser); + // struct LDKCVec_u8Z PaymentContext_write(const struct LDKPaymentContext *NONNULL_PTR obj); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentContext_write")] public static extern long PaymentContext_write(long _obj); + // struct LDKCResult_PaymentContextDecodeErrorZ PaymentContext_read(struct LDKu8slice ser); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentContext_read")] public static extern long PaymentContext_read(long _ser); + // struct LDKCVec_u8Z UnknownPaymentContext_write(const struct LDKUnknownPaymentContext *NONNULL_PTR obj); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnknownPaymentContext_write")] public static extern long UnknownPaymentContext_write(long _obj); + // struct LDKCResult_UnknownPaymentContextDecodeErrorZ UnknownPaymentContext_read(struct LDKu8slice ser); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnknownPaymentContext_read")] public static extern long UnknownPaymentContext_read(long _ser); + // struct LDKCVec_u8Z Bolt12OfferContext_write(const struct LDKBolt12OfferContext *NONNULL_PTR obj); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12OfferContext_write")] public static extern long Bolt12OfferContext_write(long _obj); + // struct LDKCResult_Bolt12OfferContextDecodeErrorZ Bolt12OfferContext_read(struct LDKu8slice ser); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12OfferContext_read")] public static extern long Bolt12OfferContext_read(long _ser); + // struct LDKCVec_u8Z Bolt12RefundContext_write(const struct LDKBolt12RefundContext *NONNULL_PTR obj); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12RefundContext_write")] public static extern long Bolt12RefundContext_write(long _obj); + // struct LDKCResult_Bolt12RefundContextDecodeErrorZ Bolt12RefundContext_read(struct LDKu8slice ser); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12RefundContext_read")] public static extern long Bolt12RefundContext_read(long _ser); // void PaymentPurpose_free(struct LDKPaymentPurpose this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentPurpose_free")] public static extern void PaymentPurpose_free(long _this_ptr); // uint64_t PaymentPurpose_clone_ptr(LDKPaymentPurpose *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentPurpose_clone_ptr")] public static extern long PaymentPurpose_clone_ptr(long _arg); // struct LDKPaymentPurpose PaymentPurpose_clone(const struct LDKPaymentPurpose *NONNULL_PTR orig); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentPurpose_clone")] public static extern long PaymentPurpose_clone(long _orig); - // struct LDKPaymentPurpose PaymentPurpose_invoice_payment(struct LDKCOption_ThirtyTwoBytesZ payment_preimage, struct LDKThirtyTwoBytes payment_secret); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentPurpose_invoice_payment")] public static extern long PaymentPurpose_invoice_payment(long _payment_preimage, long _payment_secret); + // struct LDKPaymentPurpose PaymentPurpose_bolt11_invoice_payment(struct LDKCOption_ThirtyTwoBytesZ payment_preimage, struct LDKThirtyTwoBytes payment_secret); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentPurpose_bolt11_invoice_payment")] public static extern long PaymentPurpose_bolt11_invoice_payment(long _payment_preimage, long _payment_secret); + // struct LDKPaymentPurpose PaymentPurpose_bolt12_offer_payment(struct LDKCOption_ThirtyTwoBytesZ payment_preimage, struct LDKThirtyTwoBytes payment_secret, struct LDKBolt12OfferContext payment_context); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentPurpose_bolt12_offer_payment")] public static extern long PaymentPurpose_bolt12_offer_payment(long _payment_preimage, long _payment_secret, long _payment_context); + // struct LDKPaymentPurpose PaymentPurpose_bolt12_refund_payment(struct LDKCOption_ThirtyTwoBytesZ payment_preimage, struct LDKThirtyTwoBytes payment_secret, struct LDKBolt12RefundContext payment_context); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentPurpose_bolt12_refund_payment")] public static extern long PaymentPurpose_bolt12_refund_payment(long _payment_preimage, long _payment_secret, long _payment_context); // struct LDKPaymentPurpose PaymentPurpose_spontaneous_payment(struct LDKThirtyTwoBytes a); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentPurpose_spontaneous_payment")] public static extern long PaymentPurpose_spontaneous_payment(long _a); // bool PaymentPurpose_eq(const struct LDKPaymentPurpose *NONNULL_PTR a, const struct LDKPaymentPurpose *NONNULL_PTR b); @@ -12500,9 +13696,9 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentPurpose_read")] public static extern long PaymentPurpose_read(long _ser); // void ClaimedHTLC_free(struct LDKClaimedHTLC this_obj); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ClaimedHTLC_free")] public static extern void ClaimedHTLC_free(long _this_obj); - // const uint8_t (*ClaimedHTLC_get_channel_id(const struct LDKClaimedHTLC *NONNULL_PTR this_ptr))[32]; + // struct LDKChannelId ClaimedHTLC_get_channel_id(const struct LDKClaimedHTLC *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ClaimedHTLC_get_channel_id")] public static extern long ClaimedHTLC_get_channel_id(long _this_ptr); - // void ClaimedHTLC_set_channel_id(struct LDKClaimedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); + // void ClaimedHTLC_set_channel_id(struct LDKClaimedHTLC *NONNULL_PTR this_ptr, struct LDKChannelId val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ClaimedHTLC_set_channel_id")] public static extern void ClaimedHTLC_set_channel_id(long _this_ptr, long _val); // struct LDKU128 ClaimedHTLC_get_user_channel_id(const struct LDKClaimedHTLC *NONNULL_PTR this_ptr); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ClaimedHTLC_get_user_channel_id")] public static extern long ClaimedHTLC_get_user_channel_id(long _this_ptr); @@ -12520,7 +13716,7 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ClaimedHTLC_get_counterparty_skimmed_fee_msat")] public static extern long ClaimedHTLC_get_counterparty_skimmed_fee_msat(long _this_ptr); // void ClaimedHTLC_set_counterparty_skimmed_fee_msat(struct LDKClaimedHTLC *NONNULL_PTR this_ptr, uint64_t val); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ClaimedHTLC_set_counterparty_skimmed_fee_msat")] public static extern void ClaimedHTLC_set_counterparty_skimmed_fee_msat(long _this_ptr, long _val); - // MUST_USE_RES struct LDKClaimedHTLC ClaimedHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKU128 user_channel_id_arg, uint32_t cltv_expiry_arg, uint64_t value_msat_arg, uint64_t counterparty_skimmed_fee_msat_arg); + // MUST_USE_RES struct LDKClaimedHTLC ClaimedHTLC_new(struct LDKChannelId channel_id_arg, struct LDKU128 user_channel_id_arg, uint32_t cltv_expiry_arg, uint64_t value_msat_arg, uint64_t counterparty_skimmed_fee_msat_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ClaimedHTLC_new")] public static extern long ClaimedHTLC_new(long _channel_id_arg, long _user_channel_id_arg, int _cltv_expiry_arg, long _value_msat_arg, long _counterparty_skimmed_fee_msat_arg); // uint64_t ClaimedHTLC_clone_ptr(LDKClaimedHTLC *NONNULL_PTR arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ClaimedHTLC_clone_ptr")] public static extern long ClaimedHTLC_clone_ptr(long _arg); @@ -12558,8 +13754,12 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ClosureReason_counterparty_force_closed")] public static extern long ClosureReason_counterparty_force_closed(long _peer_msg); // struct LDKClosureReason ClosureReason_holder_force_closed(void); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ClosureReason_holder_force_closed")] public static extern long ClosureReason_holder_force_closed(); - // struct LDKClosureReason ClosureReason_cooperative_closure(void); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ClosureReason_cooperative_closure")] public static extern long ClosureReason_cooperative_closure(); + // struct LDKClosureReason ClosureReason_legacy_cooperative_closure(void); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ClosureReason_legacy_cooperative_closure")] public static extern long ClosureReason_legacy_cooperative_closure(); + // struct LDKClosureReason ClosureReason_counterparty_initiated_cooperative_closure(void); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ClosureReason_counterparty_initiated_cooperative_closure")] public static extern long ClosureReason_counterparty_initiated_cooperative_closure(); + // struct LDKClosureReason ClosureReason_locally_initiated_cooperative_closure(void); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ClosureReason_locally_initiated_cooperative_closure")] public static extern long ClosureReason_locally_initiated_cooperative_closure(); // struct LDKClosureReason ClosureReason_commitment_tx_confirmed(void); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ClosureReason_commitment_tx_confirmed")] public static extern long ClosureReason_commitment_tx_confirmed(); // struct LDKClosureReason ClosureReason_funding_timed_out(void); @@ -12574,6 +13774,8 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ClosureReason_counterparty_coop_closed_unfunded_channel")] public static extern long ClosureReason_counterparty_coop_closed_unfunded_channel(); // struct LDKClosureReason ClosureReason_funding_batch_closure(void); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ClosureReason_funding_batch_closure")] public static extern long ClosureReason_funding_batch_closure(); + // struct LDKClosureReason ClosureReason_htlcs_timed_out(void); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ClosureReason_htlcs_timed_out")] public static extern long ClosureReason_htlcs_timed_out(); // bool ClosureReason_eq(const struct LDKClosureReason *NONNULL_PTR a, const struct LDKClosureReason *NONNULL_PTR b); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ClosureReason_eq")] public static extern bool ClosureReason_eq(long _a, long _b); // struct LDKCVec_u8Z ClosureReason_write(const struct LDKClosureReason *NONNULL_PTR obj); @@ -12586,12 +13788,14 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HTLCDestination_clone_ptr")] public static extern long HTLCDestination_clone_ptr(long _arg); // struct LDKHTLCDestination HTLCDestination_clone(const struct LDKHTLCDestination *NONNULL_PTR orig); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HTLCDestination_clone")] public static extern long HTLCDestination_clone(long _orig); - // struct LDKHTLCDestination HTLCDestination_next_hop_channel(struct LDKPublicKey node_id, struct LDKThirtyTwoBytes channel_id); + // struct LDKHTLCDestination HTLCDestination_next_hop_channel(struct LDKPublicKey node_id, struct LDKChannelId channel_id); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HTLCDestination_next_hop_channel")] public static extern long HTLCDestination_next_hop_channel(long _node_id, long _channel_id); // struct LDKHTLCDestination HTLCDestination_unknown_next_hop(uint64_t requested_forward_scid); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HTLCDestination_unknown_next_hop")] public static extern long HTLCDestination_unknown_next_hop(long _requested_forward_scid); // struct LDKHTLCDestination HTLCDestination_invalid_forward(uint64_t requested_forward_scid); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HTLCDestination_invalid_forward")] public static extern long HTLCDestination_invalid_forward(long _requested_forward_scid); + // struct LDKHTLCDestination HTLCDestination_invalid_onion(void); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HTLCDestination_invalid_onion")] public static extern long HTLCDestination_invalid_onion(); // struct LDKHTLCDestination HTLCDestination_failed_payment(struct LDKThirtyTwoBytes payment_hash); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HTLCDestination_failed_payment")] public static extern long HTLCDestination_failed_payment(long _payment_hash); // bool HTLCDestination_eq(const struct LDKHTLCDestination *NONNULL_PTR a, const struct LDKHTLCDestination *NONNULL_PTR b); @@ -12626,9 +13830,9 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_clone_ptr")] public static extern long Event_clone_ptr(long _arg); // struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_clone")] public static extern long Event_clone(long _orig); - // struct LDKEvent Event_funding_generation_ready(struct LDKThirtyTwoBytes temporary_channel_id, struct LDKPublicKey counterparty_node_id, uint64_t channel_value_satoshis, struct LDKCVec_u8Z output_script, struct LDKU128 user_channel_id); + // struct LDKEvent Event_funding_generation_ready(struct LDKChannelId temporary_channel_id, struct LDKPublicKey counterparty_node_id, uint64_t channel_value_satoshis, struct LDKCVec_u8Z output_script, struct LDKU128 user_channel_id); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_funding_generation_ready")] public static extern long Event_funding_generation_ready(long _temporary_channel_id, long _counterparty_node_id, long _channel_value_satoshis, long _output_script, long _user_channel_id); - // struct LDKEvent Event_payment_claimable(struct LDKPublicKey receiver_node_id, struct LDKThirtyTwoBytes payment_hash, struct LDKRecipientOnionFields onion_fields, uint64_t amount_msat, uint64_t counterparty_skimmed_fee_msat, struct LDKPaymentPurpose purpose, struct LDKCOption_ThirtyTwoBytesZ via_channel_id, struct LDKCOption_U128Z via_user_channel_id, struct LDKCOption_u32Z claim_deadline); + // struct LDKEvent Event_payment_claimable(struct LDKPublicKey receiver_node_id, struct LDKThirtyTwoBytes payment_hash, struct LDKRecipientOnionFields onion_fields, uint64_t amount_msat, uint64_t counterparty_skimmed_fee_msat, struct LDKPaymentPurpose purpose, struct LDKChannelId via_channel_id, struct LDKCOption_U128Z via_user_channel_id, struct LDKCOption_u32Z claim_deadline); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_payment_claimable")] public static extern long Event_payment_claimable(long _receiver_node_id, long _payment_hash, long _onion_fields, long _amount_msat, long _counterparty_skimmed_fee_msat, long _purpose, long _via_channel_id, long _via_user_channel_id, long _claim_deadline); // struct LDKEvent Event_payment_claimed(struct LDKPublicKey receiver_node_id, struct LDKThirtyTwoBytes payment_hash, uint64_t amount_msat, struct LDKPaymentPurpose purpose, struct LDKCVec_ClaimedHTLCZ htlcs, struct LDKCOption_u64Z sender_intended_total_msat); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_payment_claimed")] public static extern long Event_payment_claimed(long _receiver_node_id, long _payment_hash, long _amount_msat, long _purpose, long _htlcs, long _sender_intended_total_msat); @@ -12652,21 +13856,21 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_pending_htlcs_forwardable")] public static extern long Event_pending_htlcs_forwardable(long _time_forwardable); // struct LDKEvent Event_htlcintercepted(struct LDKThirtyTwoBytes intercept_id, uint64_t requested_next_hop_scid, struct LDKThirtyTwoBytes payment_hash, uint64_t inbound_amount_msat, uint64_t expected_outbound_amount_msat); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_htlcintercepted")] public static extern long Event_htlcintercepted(long _intercept_id, long _requested_next_hop_scid, long _payment_hash, long _inbound_amount_msat, long _expected_outbound_amount_msat); - // struct LDKEvent Event_spendable_outputs(struct LDKCVec_SpendableOutputDescriptorZ outputs, struct LDKCOption_ThirtyTwoBytesZ channel_id); + // struct LDKEvent Event_spendable_outputs(struct LDKCVec_SpendableOutputDescriptorZ outputs, struct LDKChannelId channel_id); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_spendable_outputs")] public static extern long Event_spendable_outputs(long _outputs, long _channel_id); - // struct LDKEvent Event_payment_forwarded(struct LDKCOption_ThirtyTwoBytesZ prev_channel_id, struct LDKCOption_ThirtyTwoBytesZ next_channel_id, struct LDKCOption_u64Z fee_earned_msat, bool claim_from_onchain_tx, struct LDKCOption_u64Z outbound_amount_forwarded_msat); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_payment_forwarded")] public static extern long Event_payment_forwarded(long _prev_channel_id, long _next_channel_id, long _fee_earned_msat, bool _claim_from_onchain_tx, long _outbound_amount_forwarded_msat); - // struct LDKEvent Event_channel_pending(struct LDKThirtyTwoBytes channel_id, struct LDKU128 user_channel_id, struct LDKCOption_ThirtyTwoBytesZ former_temporary_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKOutPoint funding_txo); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_channel_pending")] public static extern long Event_channel_pending(long _channel_id, long _user_channel_id, long _former_temporary_channel_id, long _counterparty_node_id, long _funding_txo); - // struct LDKEvent Event_channel_ready(struct LDKThirtyTwoBytes channel_id, struct LDKU128 user_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKChannelTypeFeatures channel_type); + // struct LDKEvent Event_payment_forwarded(struct LDKChannelId prev_channel_id, struct LDKChannelId next_channel_id, struct LDKCOption_U128Z prev_user_channel_id, struct LDKCOption_U128Z next_user_channel_id, struct LDKCOption_u64Z total_fee_earned_msat, struct LDKCOption_u64Z skimmed_fee_msat, bool claim_from_onchain_tx, struct LDKCOption_u64Z outbound_amount_forwarded_msat); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_payment_forwarded")] public static extern long Event_payment_forwarded(long _prev_channel_id, long _next_channel_id, long _prev_user_channel_id, long _next_user_channel_id, long _total_fee_earned_msat, long _skimmed_fee_msat, bool _claim_from_onchain_tx, long _outbound_amount_forwarded_msat); + // struct LDKEvent Event_channel_pending(struct LDKChannelId channel_id, struct LDKU128 user_channel_id, struct LDKChannelId former_temporary_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKOutPoint funding_txo, struct LDKChannelTypeFeatures channel_type); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_channel_pending")] public static extern long Event_channel_pending(long _channel_id, long _user_channel_id, long _former_temporary_channel_id, long _counterparty_node_id, long _funding_txo, long _channel_type); + // struct LDKEvent Event_channel_ready(struct LDKChannelId channel_id, struct LDKU128 user_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKChannelTypeFeatures channel_type); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_channel_ready")] public static extern long Event_channel_ready(long _channel_id, long _user_channel_id, long _counterparty_node_id, long _channel_type); - // struct LDKEvent Event_channel_closed(struct LDKThirtyTwoBytes channel_id, struct LDKU128 user_channel_id, struct LDKClosureReason reason, struct LDKPublicKey counterparty_node_id, struct LDKCOption_u64Z channel_capacity_sats, struct LDKOutPoint channel_funding_txo); + // struct LDKEvent Event_channel_closed(struct LDKChannelId channel_id, struct LDKU128 user_channel_id, struct LDKClosureReason reason, struct LDKPublicKey counterparty_node_id, struct LDKCOption_u64Z channel_capacity_sats, struct LDKOutPoint channel_funding_txo); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_channel_closed")] public static extern long Event_channel_closed(long _channel_id, long _user_channel_id, long _reason, long _counterparty_node_id, long _channel_capacity_sats, long _channel_funding_txo); - // struct LDKEvent Event_discard_funding(struct LDKThirtyTwoBytes channel_id, struct LDKTransaction transaction); + // struct LDKEvent Event_discard_funding(struct LDKChannelId channel_id, struct LDKTransaction transaction); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_discard_funding")] public static extern long Event_discard_funding(long _channel_id, long _transaction); - // struct LDKEvent Event_open_channel_request(struct LDKThirtyTwoBytes temporary_channel_id, struct LDKPublicKey counterparty_node_id, uint64_t funding_satoshis, uint64_t push_msat, struct LDKChannelTypeFeatures channel_type); + // struct LDKEvent Event_open_channel_request(struct LDKChannelId temporary_channel_id, struct LDKPublicKey counterparty_node_id, uint64_t funding_satoshis, uint64_t push_msat, struct LDKChannelTypeFeatures channel_type); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_open_channel_request")] public static extern long Event_open_channel_request(long _temporary_channel_id, long _counterparty_node_id, long _funding_satoshis, long _push_msat, long _channel_type); - // struct LDKEvent Event_htlchandling_failed(struct LDKThirtyTwoBytes prev_channel_id, struct LDKHTLCDestination failed_next_destination); + // struct LDKEvent Event_htlchandling_failed(struct LDKChannelId prev_channel_id, struct LDKHTLCDestination failed_next_destination); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_htlchandling_failed")] public static extern long Event_htlchandling_failed(long _prev_channel_id, long _failed_next_destination); // struct LDKEvent Event_bump_transaction(struct LDKBumpTransactionEvent a); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_bump_transaction")] public static extern long Event_bump_transaction(long _a); @@ -12794,10 +13998,10 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BumpTransactionEvent_clone_ptr")] public static extern long BumpTransactionEvent_clone_ptr(long _arg); // struct LDKBumpTransactionEvent BumpTransactionEvent_clone(const struct LDKBumpTransactionEvent *NONNULL_PTR orig); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BumpTransactionEvent_clone")] public static extern long BumpTransactionEvent_clone(long _orig); - // struct LDKBumpTransactionEvent BumpTransactionEvent_channel_close(struct LDKThirtyTwoBytes claim_id, uint32_t package_target_feerate_sat_per_1000_weight, struct LDKTransaction commitment_tx, uint64_t commitment_tx_fee_satoshis, struct LDKAnchorDescriptor anchor_descriptor, struct LDKCVec_HTLCOutputInCommitmentZ pending_htlcs); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BumpTransactionEvent_channel_close")] public static extern long BumpTransactionEvent_channel_close(long _claim_id, int _package_target_feerate_sat_per_1000_weight, long _commitment_tx, long _commitment_tx_fee_satoshis, long _anchor_descriptor, long _pending_htlcs); - // struct LDKBumpTransactionEvent BumpTransactionEvent_htlcresolution(struct LDKThirtyTwoBytes claim_id, uint32_t target_feerate_sat_per_1000_weight, struct LDKCVec_HTLCDescriptorZ htlc_descriptors, uint32_t tx_lock_time); - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BumpTransactionEvent_htlcresolution")] public static extern long BumpTransactionEvent_htlcresolution(long _claim_id, int _target_feerate_sat_per_1000_weight, long _htlc_descriptors, int _tx_lock_time); + // struct LDKBumpTransactionEvent BumpTransactionEvent_channel_close(struct LDKChannelId channel_id, struct LDKPublicKey counterparty_node_id, struct LDKThirtyTwoBytes claim_id, uint32_t package_target_feerate_sat_per_1000_weight, struct LDKTransaction commitment_tx, uint64_t commitment_tx_fee_satoshis, struct LDKAnchorDescriptor anchor_descriptor, struct LDKCVec_HTLCOutputInCommitmentZ pending_htlcs); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BumpTransactionEvent_channel_close")] public static extern long BumpTransactionEvent_channel_close(long _channel_id, long _counterparty_node_id, long _claim_id, int _package_target_feerate_sat_per_1000_weight, long _commitment_tx, long _commitment_tx_fee_satoshis, long _anchor_descriptor, long _pending_htlcs); + // struct LDKBumpTransactionEvent BumpTransactionEvent_htlcresolution(struct LDKChannelId channel_id, struct LDKPublicKey counterparty_node_id, struct LDKThirtyTwoBytes claim_id, uint32_t target_feerate_sat_per_1000_weight, struct LDKCVec_HTLCDescriptorZ htlc_descriptors, uint32_t tx_lock_time); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BumpTransactionEvent_htlcresolution")] public static extern long BumpTransactionEvent_htlcresolution(long _channel_id, long _counterparty_node_id, long _claim_id, int _target_feerate_sat_per_1000_weight, long _htlc_descriptors, int _tx_lock_time); // bool BumpTransactionEvent_eq(const struct LDKBumpTransactionEvent *NONNULL_PTR a, const struct LDKBumpTransactionEvent *NONNULL_PTR b); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BumpTransactionEvent_eq")] public static extern bool BumpTransactionEvent_eq(long _a, long _b); // void Input_free(struct LDKInput this_obj); @@ -13226,6 +14430,8 @@ internal class bindings { [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11Invoice_features")] public static extern long Bolt11Invoice_features(long _this_arg); // MUST_USE_RES struct LDKPublicKey Bolt11Invoice_recover_payee_pub_key(const struct LDKBolt11Invoice *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11Invoice_recover_payee_pub_key")] public static extern long Bolt11Invoice_recover_payee_pub_key(long _this_arg); + // MUST_USE_RES struct LDKPublicKey Bolt11Invoice_get_payee_pub_key(const struct LDKBolt11Invoice *NONNULL_PTR this_arg); + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11Invoice_get_payee_pub_key")] public static extern long Bolt11Invoice_get_payee_pub_key(long _this_arg); // MUST_USE_RES struct LDKCOption_u64Z Bolt11Invoice_expires_at(const struct LDKBolt11Invoice *NONNULL_PTR this_arg); [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11Invoice_expires_at")] public static extern long Bolt11Invoice_expires_at(long _this_arg); // MUST_USE_RES uint64_t Bolt11Invoice_expiry_time(const struct LDKBolt11Invoice *NONNULL_PTR this_arg); @@ -13468,21 +14674,21 @@ internal class bindings { Environment.Exit(44); } return ((LDKSignerProvider)obj).get_destination_script(a); - case 62: + case 64: if (!(obj is LDKPersister)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKPersister in l_l"); Console.Error.Flush(); Environment.Exit(44); } return ((LDKPersister)obj).persist_manager(a); - case 63: + case 65: if (!(obj is LDKPersister)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKPersister in l_l"); Console.Error.Flush(); Environment.Exit(44); } return ((LDKPersister)obj).persist_graph(a); - case 64: + case 66: if (!(obj is LDKPersister)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKPersister in l_l"); Console.Error.Flush(); @@ -13504,83 +14710,104 @@ internal class bindings { } return ((LDKOffersMessageHandler)obj).handle_message(a); case 118: + if (!(obj is LDKNodeIdLookUp)) { + Console.Error.WriteLine("Got function call to object that wasn't a LDKNodeIdLookUp in l_l"); + Console.Error.Flush(); + Environment.Exit(44); + } + return ((LDKNodeIdLookUp)obj).next_node_id(a); + case 119: if (!(obj is LDKRoutingMessageHandler)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKRoutingMessageHandler in l_l"); Console.Error.Flush(); Environment.Exit(44); } return ((LDKRoutingMessageHandler)obj).handle_node_announcement(a); - case 119: + case 120: if (!(obj is LDKRoutingMessageHandler)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKRoutingMessageHandler in l_l"); Console.Error.Flush(); Environment.Exit(44); } return ((LDKRoutingMessageHandler)obj).handle_channel_announcement(a); - case 120: + case 121: if (!(obj is LDKRoutingMessageHandler)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKRoutingMessageHandler in l_l"); Console.Error.Flush(); Environment.Exit(44); } return ((LDKRoutingMessageHandler)obj).handle_channel_update(a); - case 121: + case 122: if (!(obj is LDKRoutingMessageHandler)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKRoutingMessageHandler in l_l"); Console.Error.Flush(); Environment.Exit(44); } return ((LDKRoutingMessageHandler)obj).get_next_channel_announcement(a); - case 122: + case 123: if (!(obj is LDKRoutingMessageHandler)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKRoutingMessageHandler in l_l"); Console.Error.Flush(); Environment.Exit(44); } return ((LDKRoutingMessageHandler)obj).get_next_node_announcement(a); - case 130: + case 131: if (!(obj is LDKRoutingMessageHandler)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKRoutingMessageHandler in l_l"); Console.Error.Flush(); Environment.Exit(44); } return ((LDKRoutingMessageHandler)obj).provided_init_features(a); - case 133: + case 134: if (!(obj is LDKOnionMessageHandler)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKOnionMessageHandler in l_l"); Console.Error.Flush(); Environment.Exit(44); } return ((LDKOnionMessageHandler)obj).next_onion_message_for_peer(a); - case 138: + case 139: if (!(obj is LDKOnionMessageHandler)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKOnionMessageHandler in l_l"); Console.Error.Flush(); Environment.Exit(44); } return ((LDKOnionMessageHandler)obj).provided_init_features(a); - case 143: + case 144: if (!(obj is LDKCustomMessageHandler)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKCustomMessageHandler in l_l"); Console.Error.Flush(); Environment.Exit(44); } return ((LDKCustomMessageHandler)obj).provided_init_features(a); - case 144: + case 145: if (!(obj is LDKCustomOnionMessageHandler)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKCustomOnionMessageHandler in l_l"); Console.Error.Flush(); Environment.Exit(44); } return ((LDKCustomOnionMessageHandler)obj).handle_custom_message(a); + case 152: + if (!(obj is LDKSignBolt12InvoiceFn)) { + Console.Error.WriteLine("Got function call to object that wasn't a LDKSignBolt12InvoiceFn in l_l"); + Console.Error.Flush(); + Environment.Exit(44); + } + return ((LDKSignBolt12InvoiceFn)obj).sign_invoice(a); case 153: + if (!(obj is LDKSignInvoiceRequestFn)) { + Console.Error.WriteLine("Got function call to object that wasn't a LDKSignInvoiceRequestFn in l_l"); + Console.Error.Flush(); + Environment.Exit(44); + } + return ((LDKSignInvoiceRequestFn)obj).sign_invoice_request(a); + case 156: if (!(obj is LDKCoinSelectionSource)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKCoinSelectionSource in l_l"); Console.Error.Flush(); Environment.Exit(44); } return ((LDKCoinSelectionSource)obj).sign_psbt(a); - case 156: + case 159: if (!(obj is LDKWalletSource)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKWalletSource in l_l"); Console.Error.Flush(); @@ -13660,49 +14887,49 @@ internal class bindings { Environment.Exit(44); } return ((LDKMessageRouter)obj).create_blinded_paths(a, b); - case 61: + case 62: if (!(obj is LDKKVStore)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKKVStore in l_ll"); Console.Error.Flush(); Environment.Exit(44); } return ((LDKKVStore)obj).list(a, b); - case 124: + case 125: if (!(obj is LDKRoutingMessageHandler)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKRoutingMessageHandler in l_ll"); Console.Error.Flush(); Environment.Exit(44); } return ((LDKRoutingMessageHandler)obj).handle_reply_channel_range(a, b); - case 125: + case 126: if (!(obj is LDKRoutingMessageHandler)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKRoutingMessageHandler in l_ll"); Console.Error.Flush(); Environment.Exit(44); } return ((LDKRoutingMessageHandler)obj).handle_reply_short_channel_ids_end(a, b); - case 126: + case 127: if (!(obj is LDKRoutingMessageHandler)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKRoutingMessageHandler in l_ll"); Console.Error.Flush(); Environment.Exit(44); } return ((LDKRoutingMessageHandler)obj).handle_query_channel_range(a, b); - case 127: + case 128: if (!(obj is LDKRoutingMessageHandler)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKRoutingMessageHandler in l_ll"); Console.Error.Flush(); Environment.Exit(44); } return ((LDKRoutingMessageHandler)obj).handle_query_short_channel_ids(a, b); - case 140: + case 141: if (!(obj is LDKCustomMessageHandler)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKCustomMessageHandler in l_ll"); Console.Error.Flush(); Environment.Exit(44); } return ((LDKCustomMessageHandler)obj).handle_custom_message(a, b); - case 145: + case 146: if (!(obj is LDKCustomOnionMessageHandler)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKCustomOnionMessageHandler in l_ll"); Console.Error.Flush(); @@ -13831,14 +15058,21 @@ internal class bindings { Environment.Exit(44); } return ((LDKOnionMessageContents)obj).debug_str(); - case 74: + case 58: + if (!(obj is LDKChangeDestinationSource)) { + Console.Error.WriteLine("Got function call to object that wasn't a LDKChangeDestinationSource in l_"); + Console.Error.Flush(); + Environment.Exit(44); + } + return ((LDKChangeDestinationSource)obj).get_change_destination_script(); + case 76: if (!(obj is LDKConfirm)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKConfirm in l_"); Console.Error.Flush(); Environment.Exit(44); } return ((LDKConfirm)obj).get_relevant_txids(); - case 77: + case 80: if (!(obj is LDKMessageSendEventsProvider)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKMessageSendEventsProvider in l_"); Console.Error.Flush(); @@ -13866,70 +15100,70 @@ internal class bindings { Environment.Exit(44); } return ((LDKOffersMessageHandler)obj).release_pending_messages(); - case 129: + case 130: if (!(obj is LDKRoutingMessageHandler)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKRoutingMessageHandler in l_"); Console.Error.Flush(); Environment.Exit(44); } return ((LDKRoutingMessageHandler)obj).provided_node_features(); - case 131: + case 132: if (!(obj is LDKOnionMessageHandler)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKOnionMessageHandler in l_"); Console.Error.Flush(); Environment.Exit(44); } return ((LDKOnionMessageHandler)obj).get_and_clear_connections_needed(); - case 137: + case 138: if (!(obj is LDKOnionMessageHandler)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKOnionMessageHandler in l_"); Console.Error.Flush(); Environment.Exit(44); } return ((LDKOnionMessageHandler)obj).provided_node_features(); - case 141: + case 142: if (!(obj is LDKCustomMessageHandler)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKCustomMessageHandler in l_"); Console.Error.Flush(); Environment.Exit(44); } return ((LDKCustomMessageHandler)obj).get_and_clear_pending_msg(); - case 142: + case 143: if (!(obj is LDKCustomMessageHandler)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKCustomMessageHandler in l_"); Console.Error.Flush(); Environment.Exit(44); } return ((LDKCustomMessageHandler)obj).provided_node_features(); - case 146: + case 147: if (!(obj is LDKCustomOnionMessageHandler)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKCustomOnionMessageHandler in l_"); Console.Error.Flush(); Environment.Exit(44); } return ((LDKCustomOnionMessageHandler)obj).release_pending_custom_messages(); - case 150: + case 151: if (!(obj is LDKSocketDescriptor)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKSocketDescriptor in l_"); Console.Error.Flush(); Environment.Exit(44); } return ((LDKSocketDescriptor)obj).hash(); - case 151: + case 154: if (!(obj is LDKScore)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKScore in l_"); Console.Error.Flush(); Environment.Exit(44); } return ((LDKScore)obj).write(); - case 154: + case 157: if (!(obj is LDKWalletSource)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKWalletSource in l_"); Console.Error.Flush(); Environment.Exit(44); } return ((LDKWalletSource)obj).list_confirmed_utxos(); - case 155: + case 158: if (!(obj is LDKWalletSource)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKWalletSource in l_"); Console.Error.Flush(); @@ -14000,7 +15234,15 @@ internal class bindings { } ((LDKFilter)obj).register_output(a); return; - case 72: + case 69: + if (!(obj is LDKPersist)) { + Console.Error.WriteLine("Got function call to object that wasn't a LDKPersist in void_l"); + Console.Error.Flush(); + Environment.Exit(44); + } + ((LDKPersist)obj).archive_persisted_channel(a); + return; + case 74: if (!(obj is LDKConfirm)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKConfirm in void_l"); Console.Error.Flush(); @@ -14008,7 +15250,7 @@ internal class bindings { } ((LDKConfirm)obj).transaction_unconfirmed(a); return; - case 75: + case 78: if (!(obj is LDKEventHandler)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKEventHandler in void_l"); Console.Error.Flush(); @@ -14016,7 +15258,7 @@ internal class bindings { } ((LDKEventHandler)obj).handle_event(a); return; - case 76: + case 79: if (!(obj is LDKEventsProvider)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKEventsProvider in void_l"); Console.Error.Flush(); @@ -14032,7 +15274,7 @@ internal class bindings { } ((LDKChannelMessageHandler)obj).peer_disconnected(a); return; - case 135: + case 136: if (!(obj is LDKOnionMessageHandler)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKOnionMessageHandler in void_l"); Console.Error.Flush(); @@ -14092,7 +15334,7 @@ internal class bindings { Environment.Exit(44); } return ((LDKMessageRouter)obj).find_path(a, b, c); - case 58: + case 59: if (!(obj is LDKKVStore)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKKVStore in l_lll"); Console.Error.Flush(); @@ -14144,7 +15386,7 @@ internal class bindings { Environment.Exit(44); } return ((LDKRouter)obj).create_blinded_payment_paths(a, b, c, d); - case 59: + case 60: if (!(obj is LDKKVStore)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKKVStore in l_llll"); Console.Error.Flush(); @@ -14277,37 +15519,13 @@ internal class bindings { } ((LDKFilter)obj).register_tx(a, b); return; - case 78: - if (!(obj is LDKChannelMessageHandler)) { - Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_ll"); - Console.Error.Flush(); - Environment.Exit(44); - } - ((LDKChannelMessageHandler)obj).handle_open_channel(a, b); - return; - case 79: - if (!(obj is LDKChannelMessageHandler)) { - Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_ll"); - Console.Error.Flush(); - Environment.Exit(44); - } - ((LDKChannelMessageHandler)obj).handle_open_channel_v2(a, b); - return; - case 80: - if (!(obj is LDKChannelMessageHandler)) { - Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_ll"); - Console.Error.Flush(); - Environment.Exit(44); - } - ((LDKChannelMessageHandler)obj).handle_accept_channel(a, b); - return; case 81: if (!(obj is LDKChannelMessageHandler)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_ll"); Console.Error.Flush(); Environment.Exit(44); } - ((LDKChannelMessageHandler)obj).handle_accept_channel_v2(a, b); + ((LDKChannelMessageHandler)obj).handle_open_channel(a, b); return; case 82: if (!(obj is LDKChannelMessageHandler)) { @@ -14315,7 +15533,7 @@ internal class bindings { Console.Error.Flush(); Environment.Exit(44); } - ((LDKChannelMessageHandler)obj).handle_funding_created(a, b); + ((LDKChannelMessageHandler)obj).handle_open_channel_v2(a, b); return; case 83: if (!(obj is LDKChannelMessageHandler)) { @@ -14323,7 +15541,7 @@ internal class bindings { Console.Error.Flush(); Environment.Exit(44); } - ((LDKChannelMessageHandler)obj).handle_funding_signed(a, b); + ((LDKChannelMessageHandler)obj).handle_accept_channel(a, b); return; case 84: if (!(obj is LDKChannelMessageHandler)) { @@ -14331,7 +15549,7 @@ internal class bindings { Console.Error.Flush(); Environment.Exit(44); } - ((LDKChannelMessageHandler)obj).handle_channel_ready(a, b); + ((LDKChannelMessageHandler)obj).handle_accept_channel_v2(a, b); return; case 85: if (!(obj is LDKChannelMessageHandler)) { @@ -14339,7 +15557,7 @@ internal class bindings { Console.Error.Flush(); Environment.Exit(44); } - ((LDKChannelMessageHandler)obj).handle_shutdown(a, b); + ((LDKChannelMessageHandler)obj).handle_funding_created(a, b); return; case 86: if (!(obj is LDKChannelMessageHandler)) { @@ -14347,7 +15565,7 @@ internal class bindings { Console.Error.Flush(); Environment.Exit(44); } - ((LDKChannelMessageHandler)obj).handle_closing_signed(a, b); + ((LDKChannelMessageHandler)obj).handle_funding_signed(a, b); return; case 87: if (!(obj is LDKChannelMessageHandler)) { @@ -14355,7 +15573,7 @@ internal class bindings { Console.Error.Flush(); Environment.Exit(44); } - ((LDKChannelMessageHandler)obj).handle_stfu(a, b); + ((LDKChannelMessageHandler)obj).handle_channel_ready(a, b); return; case 88: if (!(obj is LDKChannelMessageHandler)) { @@ -14363,7 +15581,7 @@ internal class bindings { Console.Error.Flush(); Environment.Exit(44); } - ((LDKChannelMessageHandler)obj).handle_splice(a, b); + ((LDKChannelMessageHandler)obj).handle_shutdown(a, b); return; case 89: if (!(obj is LDKChannelMessageHandler)) { @@ -14371,7 +15589,7 @@ internal class bindings { Console.Error.Flush(); Environment.Exit(44); } - ((LDKChannelMessageHandler)obj).handle_splice_ack(a, b); + ((LDKChannelMessageHandler)obj).handle_closing_signed(a, b); return; case 90: if (!(obj is LDKChannelMessageHandler)) { @@ -14379,7 +15597,7 @@ internal class bindings { Console.Error.Flush(); Environment.Exit(44); } - ((LDKChannelMessageHandler)obj).handle_splice_locked(a, b); + ((LDKChannelMessageHandler)obj).handle_stfu(a, b); return; case 91: if (!(obj is LDKChannelMessageHandler)) { @@ -14541,7 +15759,7 @@ internal class bindings { } ((LDKChannelMessageHandler)obj).handle_error(a, b); return; - case 132: + case 133: if (!(obj is LDKOnionMessageHandler)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKOnionMessageHandler in void_ll"); Console.Error.Flush(); @@ -14821,7 +16039,7 @@ internal class bindings { Environment.Exit(43); } switch (fn_id) { - case 60: + case 61: if (!(obj is LDKKVStore)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKKVStore in l_lllb"); Console.Error.Flush(); @@ -14839,6 +16057,37 @@ internal class bindings { static l_lllb_callback l_lllb_callback_inst = c_callback_l_lllb; [DllImport ("ldkcsharp", EntryPoint="CS_LDK_register_l_lllb_invoker")] public static extern int register_l_lllb_invoker(l_lllb_callback callee); static int _run_l_lllb_registration = register_l_lllb_invoker(l_lllb_callback_inst); + static long c_callback_l_lllil(int obj_ptr, int fn_id, long a, long b, long c, int d, long e) { + if (obj_ptr >= js_objs.Count) { + Console.Error.WriteLine("Got function call on unknown/free'd JS object in l_lllil"); + Console.Error.Flush(); + Environment.Exit(42); + } + object obj = js_objs[obj_ptr].Target; + if (obj == null) { + Console.Error.WriteLine("Got function call on GC'd JS object in l_lllil"); + Console.Error.Flush(); + Environment.Exit(43); + } + switch (fn_id) { + case 63: + if (!(obj is LDKOutputSpender)) { + Console.Error.WriteLine("Got function call to object that wasn't a LDKOutputSpender in l_lllil"); + Console.Error.Flush(); + Environment.Exit(44); + } + return ((LDKOutputSpender)obj).spend_spendable_outputs(a, b, c, d, e); + default: + Console.Error.WriteLine("Got unknown function call with id " + fn_id + " from C in l_lllil"); + Console.Error.Flush(); + Environment.Exit(45); + return 0; + } + } + public delegate long l_lllil_callback(int obj_ptr, int fn_id, long a, long b, long c, int d, long e); + static l_lllil_callback l_lllil_callback_inst = c_callback_l_lllil; + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_register_l_lllil_invoker")] public static extern int register_l_lllil_invoker(l_lllil_callback callee); + static int _run_l_lllil_registration = register_l_lllil_invoker(l_lllil_callback_inst); static ChannelMonitorUpdateStatus c_callback_ChannelMonitorUpdateStatus_lll(int obj_ptr, int fn_id, long a, long b, long c) { if (obj_ptr >= js_objs.Count) { Console.Error.WriteLine("Got function call on unknown/free'd JS object in ChannelMonitorUpdateStatus_lll"); @@ -14852,7 +16101,7 @@ internal class bindings { Environment.Exit(43); } switch (fn_id) { - case 65: + case 67: if (!(obj is LDKPersist)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKPersist in ChannelMonitorUpdateStatus_lll"); Console.Error.Flush(); @@ -14883,7 +16132,7 @@ internal class bindings { Environment.Exit(43); } switch (fn_id) { - case 66: + case 68: if (!(obj is LDKPersist)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKPersist in ChannelMonitorUpdateStatus_llll"); Console.Error.Flush(); @@ -14901,54 +16150,6 @@ internal class bindings { static ChannelMonitorUpdateStatus_llll_callback ChannelMonitorUpdateStatus_llll_callback_inst = c_callback_ChannelMonitorUpdateStatus_llll; [DllImport ("ldkcsharp", EntryPoint="CS_LDK_register_ChannelMonitorUpdateStatus_llll_invoker")] public static extern int register_ChannelMonitorUpdateStatus_llll_invoker(ChannelMonitorUpdateStatus_llll_callback callee); static int _run_ChannelMonitorUpdateStatus_llll_registration = register_ChannelMonitorUpdateStatus_llll_invoker(ChannelMonitorUpdateStatus_llll_callback_inst); - static void c_callback_void_(int obj_ptr, int fn_id) { - if (obj_ptr >= js_objs.Count) { - Console.Error.WriteLine("Got function call on unknown/free'd JS object in void_"); - Console.Error.Flush(); - Environment.Exit(42); - } - object obj = js_objs[obj_ptr].Target; - if (obj == null) { - Console.Error.WriteLine("Got function call on GC'd JS object in void_"); - Console.Error.Flush(); - Environment.Exit(43); - } - switch (fn_id) { - case 67: - if (!(obj is LDKFutureCallback)) { - Console.Error.WriteLine("Got function call to object that wasn't a LDKFutureCallback in void_"); - Console.Error.Flush(); - Environment.Exit(44); - } - ((LDKFutureCallback)obj).call(); - return; - case 136: - if (!(obj is LDKOnionMessageHandler)) { - Console.Error.WriteLine("Got function call to object that wasn't a LDKOnionMessageHandler in void_"); - Console.Error.Flush(); - Environment.Exit(44); - } - ((LDKOnionMessageHandler)obj).timer_tick_occurred(); - return; - case 148: - if (!(obj is LDKSocketDescriptor)) { - Console.Error.WriteLine("Got function call to object that wasn't a LDKSocketDescriptor in void_"); - Console.Error.Flush(); - Environment.Exit(44); - } - ((LDKSocketDescriptor)obj).disconnect_socket(); - return; - default: - Console.Error.WriteLine("Got unknown function call with id " + fn_id + " from C in void_"); - Console.Error.Flush(); - Environment.Exit(45); - return; - } - } - public delegate void void__callback(int obj_ptr, int fn_id); - static void__callback void__callback_inst = c_callback_void_; - [DllImport ("ldkcsharp", EntryPoint="CS_LDK_register_void__invoker")] public static extern int register_void__invoker(void__callback callee); - static int _run_void__registration = register_void__invoker(void__callback_inst); static void c_callback_void_lli(int obj_ptr, int fn_id, long a, long b, int c) { if (obj_ptr >= js_objs.Count) { Console.Error.WriteLine("Got function call on unknown/free'd JS object in void_lli"); @@ -14962,7 +16163,7 @@ internal class bindings { Environment.Exit(43); } switch (fn_id) { - case 68: + case 70: if (!(obj is LDKListen)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKListen in void_lli"); Console.Error.Flush(); @@ -14970,7 +16171,7 @@ internal class bindings { } ((LDKListen)obj).filtered_block_connected(a, b, c); return; - case 71: + case 73: if (!(obj is LDKConfirm)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKConfirm in void_lli"); Console.Error.Flush(); @@ -15002,7 +16203,7 @@ internal class bindings { Environment.Exit(43); } switch (fn_id) { - case 69: + case 71: if (!(obj is LDKListen)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKListen in void_li"); Console.Error.Flush(); @@ -15010,7 +16211,7 @@ internal class bindings { } ((LDKListen)obj).block_connected(a, b); return; - case 70: + case 72: if (!(obj is LDKListen)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKListen in void_li"); Console.Error.Flush(); @@ -15018,7 +16219,7 @@ internal class bindings { } ((LDKListen)obj).block_disconnected(a, b); return; - case 73: + case 75: if (!(obj is LDKConfirm)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKConfirm in void_li"); Console.Error.Flush(); @@ -15037,6 +16238,54 @@ internal class bindings { static void_li_callback void_li_callback_inst = c_callback_void_li; [DllImport ("ldkcsharp", EntryPoint="CS_LDK_register_void_li_invoker")] public static extern int register_void_li_invoker(void_li_callback callee); static int _run_void_li_registration = register_void_li_invoker(void_li_callback_inst); + static void c_callback_void_(int obj_ptr, int fn_id) { + if (obj_ptr >= js_objs.Count) { + Console.Error.WriteLine("Got function call on unknown/free'd JS object in void_"); + Console.Error.Flush(); + Environment.Exit(42); + } + object obj = js_objs[obj_ptr].Target; + if (obj == null) { + Console.Error.WriteLine("Got function call on GC'd JS object in void_"); + Console.Error.Flush(); + Environment.Exit(43); + } + switch (fn_id) { + case 77: + if (!(obj is LDKFutureCallback)) { + Console.Error.WriteLine("Got function call to object that wasn't a LDKFutureCallback in void_"); + Console.Error.Flush(); + Environment.Exit(44); + } + ((LDKFutureCallback)obj).call(); + return; + case 137: + if (!(obj is LDKOnionMessageHandler)) { + Console.Error.WriteLine("Got function call to object that wasn't a LDKOnionMessageHandler in void_"); + Console.Error.Flush(); + Environment.Exit(44); + } + ((LDKOnionMessageHandler)obj).timer_tick_occurred(); + return; + case 149: + if (!(obj is LDKSocketDescriptor)) { + Console.Error.WriteLine("Got function call to object that wasn't a LDKSocketDescriptor in void_"); + Console.Error.Flush(); + Environment.Exit(44); + } + ((LDKSocketDescriptor)obj).disconnect_socket(); + return; + default: + Console.Error.WriteLine("Got unknown function call with id " + fn_id + " from C in void_"); + Console.Error.Flush(); + Environment.Exit(45); + return; + } + } + public delegate void void__callback(int obj_ptr, int fn_id); + static void__callback void__callback_inst = c_callback_void_; + [DllImport ("ldkcsharp", EntryPoint="CS_LDK_register_void__invoker")] public static extern int register_void__invoker(void__callback callee); + static int _run_void__registration = register_void__invoker(void__callback_inst); static long c_callback_l_llb(int obj_ptr, int fn_id, long a, long b, bool c) { if (obj_ptr >= js_objs.Count) { Console.Error.WriteLine("Got function call on unknown/free'd JS object in l_llb"); @@ -15057,14 +16306,14 @@ internal class bindings { Environment.Exit(44); } return ((LDKChannelMessageHandler)obj).peer_connected(a, b, c); - case 123: + case 124: if (!(obj is LDKRoutingMessageHandler)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKRoutingMessageHandler in l_llb"); Console.Error.Flush(); Environment.Exit(44); } return ((LDKRoutingMessageHandler)obj).peer_connected(a, b, c); - case 134: + case 135: if (!(obj is LDKOnionMessageHandler)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKOnionMessageHandler in l_llb"); Console.Error.Flush(); @@ -15095,7 +16344,7 @@ internal class bindings { Environment.Exit(43); } switch (fn_id) { - case 128: + case 129: if (!(obj is LDKRoutingMessageHandler)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKRoutingMessageHandler in b_"); Console.Error.Flush(); @@ -15126,7 +16375,7 @@ internal class bindings { Environment.Exit(43); } switch (fn_id) { - case 139: + case 140: if (!(obj is LDKCustomMessageReader)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKCustomMessageReader in l_sl"); Console.Error.Flush(); @@ -15157,7 +16406,7 @@ internal class bindings { Environment.Exit(43); } switch (fn_id) { - case 147: + case 148: if (!(obj is LDKSocketDescriptor)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKSocketDescriptor in l_lb"); Console.Error.Flush(); @@ -15188,7 +16437,7 @@ internal class bindings { Environment.Exit(43); } switch (fn_id) { - case 149: + case 150: if (!(obj is LDKSocketDescriptor)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKSocketDescriptor in b_l"); Console.Error.Flush(); @@ -15219,7 +16468,7 @@ internal class bindings { Environment.Exit(43); } switch (fn_id) { - case 152: + case 155: if (!(obj is LDKCoinSelectionSource)) { Console.Error.WriteLine("Got function call to object that wasn't a LDKCoinSelectionSource in l_llli"); Console.Error.Flush(); diff --git a/c_sharp/src/org/ldk/structs/APIError.cs b/c_sharp/src/org/ldk/structs/APIError.cs index a9218c88..8284b363 100644 --- a/c_sharp/src/org/ldk/structs/APIError.cs +++ b/c_sharp/src/org/ldk/structs/APIError.cs @@ -182,7 +182,7 @@ public class APIError : CommonBase { * Utility method to constructs a new IncompatibleShutdownScript-variant APIError */ public static APIError incompatible_shutdown_script(org.ldk.structs.ShutdownScript script) { - long ret = bindings.APIError_incompatible_shutdown_script(script == null ? 0 : script.ptr); + long ret = bindings.APIError_incompatible_shutdown_script(script.ptr); GC.KeepAlive(script); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.APIError ret_hu_conv = org.ldk.structs.APIError.constr_from_ptr(ret); @@ -196,7 +196,7 @@ public class APIError : CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public bool eq(org.ldk.structs.APIError b) { - bool ret = bindings.APIError_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.APIError_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); return ret; diff --git a/c_sharp/src/org/ldk/structs/AcceptChannel.cs b/c_sharp/src/org/ldk/structs/AcceptChannel.cs index ffa4cfa0..5a19a661 100644 --- a/c_sharp/src/org/ldk/structs/AcceptChannel.cs +++ b/c_sharp/src/org/ldk/structs/AcceptChannel.cs @@ -20,59 +20,25 @@ public class AcceptChannel : CommonBase { } /** - * A temporary channel ID, until the funding outpoint is announced + * Common fields of `accept_channel(2)`-like messages */ - public byte[] get_temporary_channel_id() { - long ret = bindings.AcceptChannel_get_temporary_channel_id(this.ptr); + public CommonAcceptChannelFields get_common_fields() { + long ret = bindings.AcceptChannel_get_common_fields(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; - } - - /** - * A temporary channel ID, until the funding outpoint is announced - */ - public void set_temporary_channel_id(byte[] val) { - bindings.AcceptChannel_set_temporary_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * The threshold below which outputs on transactions broadcast by sender will be omitted - */ - public long get_dust_limit_satoshis() { - long ret = bindings.AcceptChannel_get_dust_limit_satoshis(this.ptr); - GC.KeepAlive(this); - return ret; - } - - /** - * The threshold below which outputs on transactions broadcast by sender will be omitted - */ - public void set_dust_limit_satoshis(long val) { - bindings.AcceptChannel_set_dust_limit_satoshis(this.ptr, val); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * The maximum inbound HTLC value in flight towards sender, in milli-satoshi - */ - public long get_max_htlc_value_in_flight_msat() { - long ret = bindings.AcceptChannel_get_max_htlc_value_in_flight_msat(this.ptr); - GC.KeepAlive(this); - return ret; + org.ldk.structs.CommonAcceptChannelFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommonAcceptChannelFields(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** - * The maximum inbound HTLC value in flight towards sender, in milli-satoshi + * Common fields of `accept_channel(2)`-like messages */ - public void set_max_htlc_value_in_flight_msat(long val) { - bindings.AcceptChannel_set_max_htlc_value_in_flight_msat(this.ptr, val); + public void set_common_fields(org.ldk.structs.CommonAcceptChannelFields val) { + bindings.AcceptChannel_set_common_fields(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** @@ -93,282 +59,17 @@ public class AcceptChannel : CommonBase { GC.KeepAlive(val); } - /** - * The minimum HTLC size incoming to sender, in milli-satoshi - */ - public long get_htlc_minimum_msat() { - long ret = bindings.AcceptChannel_get_htlc_minimum_msat(this.ptr); - GC.KeepAlive(this); - return ret; - } - - /** - * The minimum HTLC size incoming to sender, in milli-satoshi - */ - public void set_htlc_minimum_msat(long val) { - bindings.AcceptChannel_set_htlc_minimum_msat(this.ptr, val); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * Minimum depth of the funding transaction before the channel is considered open - */ - public int get_minimum_depth() { - int ret = bindings.AcceptChannel_get_minimum_depth(this.ptr); - GC.KeepAlive(this); - return ret; - } - - /** - * Minimum depth of the funding transaction before the channel is considered open - */ - public void set_minimum_depth(int val) { - bindings.AcceptChannel_set_minimum_depth(this.ptr, val); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * The number of blocks which the counterparty will have to wait to claim on-chain funds if they broadcast a commitment transaction - */ - public short get_to_self_delay() { - short ret = bindings.AcceptChannel_get_to_self_delay(this.ptr); - GC.KeepAlive(this); - return ret; - } - - /** - * The number of blocks which the counterparty will have to wait to claim on-chain funds if they broadcast a commitment transaction - */ - public void set_to_self_delay(short val) { - bindings.AcceptChannel_set_to_self_delay(this.ptr, val); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * The maximum number of inbound HTLCs towards sender - */ - public short get_max_accepted_htlcs() { - short ret = bindings.AcceptChannel_get_max_accepted_htlcs(this.ptr); - GC.KeepAlive(this); - return ret; - } - - /** - * The maximum number of inbound HTLCs towards sender - */ - public void set_max_accepted_htlcs(short val) { - bindings.AcceptChannel_set_max_accepted_htlcs(this.ptr, val); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * The sender's key controlling the funding transaction - */ - public byte[] get_funding_pubkey() { - long ret = bindings.AcceptChannel_get_funding_pubkey(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; - } - - /** - * The sender's key controlling the funding transaction - */ - public void set_funding_pubkey(byte[] val) { - bindings.AcceptChannel_set_funding_pubkey(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * Used to derive a revocation key for transactions broadcast by counterparty - */ - public byte[] get_revocation_basepoint() { - long ret = bindings.AcceptChannel_get_revocation_basepoint(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; - } - - /** - * Used to derive a revocation key for transactions broadcast by counterparty - */ - public void set_revocation_basepoint(byte[] val) { - bindings.AcceptChannel_set_revocation_basepoint(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * A payment key to sender for transactions broadcast by counterparty - */ - public byte[] get_payment_point() { - long ret = bindings.AcceptChannel_get_payment_point(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; - } - - /** - * A payment key to sender for transactions broadcast by counterparty - */ - public void set_payment_point(byte[] val) { - bindings.AcceptChannel_set_payment_point(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * Used to derive a payment key to sender for transactions broadcast by sender - */ - public byte[] get_delayed_payment_basepoint() { - long ret = bindings.AcceptChannel_get_delayed_payment_basepoint(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; - } - - /** - * Used to derive a payment key to sender for transactions broadcast by sender - */ - public void set_delayed_payment_basepoint(byte[] val) { - bindings.AcceptChannel_set_delayed_payment_basepoint(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * Used to derive an HTLC payment key to sender for transactions broadcast by counterparty - */ - public byte[] get_htlc_basepoint() { - long ret = bindings.AcceptChannel_get_htlc_basepoint(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; - } - - /** - * Used to derive an HTLC payment key to sender for transactions broadcast by counterparty - */ - public void set_htlc_basepoint(byte[] val) { - bindings.AcceptChannel_set_htlc_basepoint(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * The first to-be-broadcast-by-sender transaction's per commitment point - */ - public byte[] get_first_per_commitment_point() { - long ret = bindings.AcceptChannel_get_first_per_commitment_point(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; - } - - /** - * The first to-be-broadcast-by-sender transaction's per commitment point - */ - public void set_first_per_commitment_point(byte[] val) { - bindings.AcceptChannel_set_first_per_commitment_point(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * A request to pre-set the to-sender output's scriptPubkey for when we collaboratively close - */ - public Option_CVec_u8ZZ get_shutdown_scriptpubkey() { - long ret = bindings.AcceptChannel_get_shutdown_scriptpubkey(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Option_CVec_u8ZZ ret_hu_conv = org.ldk.structs.Option_CVec_u8ZZ.constr_from_ptr(ret); - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; - return ret_hu_conv; - } - - /** - * A request to pre-set the to-sender output's scriptPubkey for when we collaboratively close - */ - public void set_shutdown_scriptpubkey(org.ldk.structs.Option_CVec_u8ZZ val) { - bindings.AcceptChannel_set_shutdown_scriptpubkey(this.ptr, val.ptr); - GC.KeepAlive(this); - GC.KeepAlive(val); - if (this != null) { this.ptrs_to.AddLast(val); }; - } - - /** - * The channel type that this channel will represent. - * - * If this is `None`, we derive the channel type from the intersection of - * our feature bits with our counterparty's feature bits from the [`Init`] message. - * This is required to match the equivalent field in [`OpenChannel::channel_type`]. - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None - */ - public ChannelTypeFeatures get_channel_type() { - long ret = bindings.AcceptChannel_get_channel_type(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.ChannelTypeFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelTypeFeatures(null, ret); } - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; - return ret_hu_conv; - } - - /** - * The channel type that this channel will represent. - * - * If this is `None`, we derive the channel type from the intersection of - * our feature bits with our counterparty's feature bits from the [`Init`] message. - * This is required to match the equivalent field in [`OpenChannel::channel_type`]. - * - * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None - */ - public void set_channel_type(org.ldk.structs.ChannelTypeFeatures val) { - bindings.AcceptChannel_set_channel_type(this.ptr, val == null ? 0 : val.ptr); - GC.KeepAlive(this); - GC.KeepAlive(val); - if (this != null) { this.ptrs_to.AddLast(val); }; - } - /** * Constructs a new AcceptChannel given each field - * - * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public static AcceptChannel of(byte[] temporary_channel_id_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long channel_reserve_satoshis_arg, long htlc_minimum_msat_arg, int minimum_depth_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_point_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, org.ldk.structs.Option_CVec_u8ZZ shutdown_scriptpubkey_arg, org.ldk.structs.ChannelTypeFeatures channel_type_arg) { - long ret = bindings.AcceptChannel_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(temporary_channel_id_arg, 32)), dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(funding_pubkey_arg, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(revocation_basepoint_arg, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_point_arg, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(delayed_payment_basepoint_arg, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(htlc_basepoint_arg, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(first_per_commitment_point_arg, 33)), shutdown_scriptpubkey_arg.ptr, channel_type_arg == null ? 0 : channel_type_arg.ptr); - GC.KeepAlive(temporary_channel_id_arg); - GC.KeepAlive(dust_limit_satoshis_arg); - GC.KeepAlive(max_htlc_value_in_flight_msat_arg); + public static AcceptChannel of(org.ldk.structs.CommonAcceptChannelFields common_fields_arg, long channel_reserve_satoshis_arg) { + long ret = bindings.AcceptChannel_new(common_fields_arg.ptr, channel_reserve_satoshis_arg); + GC.KeepAlive(common_fields_arg); GC.KeepAlive(channel_reserve_satoshis_arg); - GC.KeepAlive(htlc_minimum_msat_arg); - GC.KeepAlive(minimum_depth_arg); - GC.KeepAlive(to_self_delay_arg); - GC.KeepAlive(max_accepted_htlcs_arg); - GC.KeepAlive(funding_pubkey_arg); - GC.KeepAlive(revocation_basepoint_arg); - GC.KeepAlive(payment_point_arg); - GC.KeepAlive(delayed_payment_basepoint_arg); - GC.KeepAlive(htlc_basepoint_arg); - GC.KeepAlive(first_per_commitment_point_arg); - GC.KeepAlive(shutdown_scriptpubkey_arg); - GC.KeepAlive(channel_type_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.AcceptChannel ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.AcceptChannel(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(shutdown_scriptpubkey_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_type_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(common_fields_arg); }; return ret_hu_conv; } @@ -408,7 +109,7 @@ public class AcceptChannel : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.AcceptChannel b) { - bool ret = bindings.AcceptChannel_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.AcceptChannel_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/AcceptChannelV2.cs b/c_sharp/src/org/ldk/structs/AcceptChannelV2.cs index 1090715d..65be5633 100644 --- a/c_sharp/src/org/ldk/structs/AcceptChannelV2.cs +++ b/c_sharp/src/org/ldk/structs/AcceptChannelV2.cs @@ -18,23 +18,25 @@ public class AcceptChannelV2 : CommonBase { } /** - * The same `temporary_channel_id` received from the initiator's `open_channel2` message. + * Common fields of `accept_channel(2)`-like messages */ - public byte[] get_temporary_channel_id() { - long ret = bindings.AcceptChannelV2_get_temporary_channel_id(this.ptr); + public CommonAcceptChannelFields get_common_fields() { + long ret = bindings.AcceptChannelV2_get_common_fields(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + org.ldk.structs.CommonAcceptChannelFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommonAcceptChannelFields(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** - * The same `temporary_channel_id` received from the initiator's `open_channel2` message. + * Common fields of `accept_channel(2)`-like messages */ - public void set_temporary_channel_id(byte[] val) { - bindings.AcceptChannelV2_set_temporary_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + public void set_common_fields(org.ldk.structs.CommonAcceptChannelFields val) { + bindings.AcceptChannelV2_set_common_fields(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** @@ -55,240 +57,6 @@ public class AcceptChannelV2 : CommonBase { GC.KeepAlive(val); } - /** - * The threshold below which outputs on transactions broadcast by the channel acceptor will be - * omitted - */ - public long get_dust_limit_satoshis() { - long ret = bindings.AcceptChannelV2_get_dust_limit_satoshis(this.ptr); - GC.KeepAlive(this); - return ret; - } - - /** - * The threshold below which outputs on transactions broadcast by the channel acceptor will be - * omitted - */ - public void set_dust_limit_satoshis(long val) { - bindings.AcceptChannelV2_set_dust_limit_satoshis(this.ptr, val); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * The maximum inbound HTLC value in flight towards channel acceptor, in milli-satoshi - */ - public long get_max_htlc_value_in_flight_msat() { - long ret = bindings.AcceptChannelV2_get_max_htlc_value_in_flight_msat(this.ptr); - GC.KeepAlive(this); - return ret; - } - - /** - * The maximum inbound HTLC value in flight towards channel acceptor, in milli-satoshi - */ - public void set_max_htlc_value_in_flight_msat(long val) { - bindings.AcceptChannelV2_set_max_htlc_value_in_flight_msat(this.ptr, val); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * The minimum HTLC size incoming to channel acceptor, in milli-satoshi - */ - public long get_htlc_minimum_msat() { - long ret = bindings.AcceptChannelV2_get_htlc_minimum_msat(this.ptr); - GC.KeepAlive(this); - return ret; - } - - /** - * The minimum HTLC size incoming to channel acceptor, in milli-satoshi - */ - public void set_htlc_minimum_msat(long val) { - bindings.AcceptChannelV2_set_htlc_minimum_msat(this.ptr, val); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * Minimum depth of the funding transaction before the channel is considered open - */ - public int get_minimum_depth() { - int ret = bindings.AcceptChannelV2_get_minimum_depth(this.ptr); - GC.KeepAlive(this); - return ret; - } - - /** - * Minimum depth of the funding transaction before the channel is considered open - */ - public void set_minimum_depth(int val) { - bindings.AcceptChannelV2_set_minimum_depth(this.ptr, val); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * The number of blocks which the counterparty will have to wait to claim on-chain funds if they - * broadcast a commitment transaction - */ - public short get_to_self_delay() { - short ret = bindings.AcceptChannelV2_get_to_self_delay(this.ptr); - GC.KeepAlive(this); - return ret; - } - - /** - * The number of blocks which the counterparty will have to wait to claim on-chain funds if they - * broadcast a commitment transaction - */ - public void set_to_self_delay(short val) { - bindings.AcceptChannelV2_set_to_self_delay(this.ptr, val); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * The maximum number of inbound HTLCs towards channel acceptor - */ - public short get_max_accepted_htlcs() { - short ret = bindings.AcceptChannelV2_get_max_accepted_htlcs(this.ptr); - GC.KeepAlive(this); - return ret; - } - - /** - * The maximum number of inbound HTLCs towards channel acceptor - */ - public void set_max_accepted_htlcs(short val) { - bindings.AcceptChannelV2_set_max_accepted_htlcs(this.ptr, val); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * The channel acceptor's key controlling the funding transaction - */ - public byte[] get_funding_pubkey() { - long ret = bindings.AcceptChannelV2_get_funding_pubkey(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; - } - - /** - * The channel acceptor's key controlling the funding transaction - */ - public void set_funding_pubkey(byte[] val) { - bindings.AcceptChannelV2_set_funding_pubkey(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * Used to derive a revocation key for transactions broadcast by counterparty - */ - public byte[] get_revocation_basepoint() { - long ret = bindings.AcceptChannelV2_get_revocation_basepoint(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; - } - - /** - * Used to derive a revocation key for transactions broadcast by counterparty - */ - public void set_revocation_basepoint(byte[] val) { - bindings.AcceptChannelV2_set_revocation_basepoint(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * A payment key to channel acceptor for transactions broadcast by counterparty - */ - public byte[] get_payment_basepoint() { - long ret = bindings.AcceptChannelV2_get_payment_basepoint(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; - } - - /** - * A payment key to channel acceptor for transactions broadcast by counterparty - */ - public void set_payment_basepoint(byte[] val) { - bindings.AcceptChannelV2_set_payment_basepoint(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * Used to derive a payment key to channel acceptor for transactions broadcast by channel - * acceptor - */ - public byte[] get_delayed_payment_basepoint() { - long ret = bindings.AcceptChannelV2_get_delayed_payment_basepoint(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; - } - - /** - * Used to derive a payment key to channel acceptor for transactions broadcast by channel - * acceptor - */ - public void set_delayed_payment_basepoint(byte[] val) { - bindings.AcceptChannelV2_set_delayed_payment_basepoint(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * Used to derive an HTLC payment key to channel acceptor for transactions broadcast by counterparty - */ - public byte[] get_htlc_basepoint() { - long ret = bindings.AcceptChannelV2_get_htlc_basepoint(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; - } - - /** - * Used to derive an HTLC payment key to channel acceptor for transactions broadcast by counterparty - */ - public void set_htlc_basepoint(byte[] val) { - bindings.AcceptChannelV2_set_htlc_basepoint(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * The first to-be-broadcast-by-channel-acceptor transaction's per commitment point - */ - public byte[] get_first_per_commitment_point() { - long ret = bindings.AcceptChannelV2_get_first_per_commitment_point(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; - } - - /** - * The first to-be-broadcast-by-channel-acceptor transaction's per commitment point - */ - public void set_first_per_commitment_point(byte[] val) { - bindings.AcceptChannelV2_set_first_per_commitment_point(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - /** * The second to-be-broadcast-by-channel-acceptor transaction's per commitment point */ @@ -309,64 +77,6 @@ public class AcceptChannelV2 : CommonBase { GC.KeepAlive(val); } - /** - * Optionally, a request to pre-set the to-channel-acceptor output's scriptPubkey for when we - * collaboratively close - */ - public Option_CVec_u8ZZ get_shutdown_scriptpubkey() { - long ret = bindings.AcceptChannelV2_get_shutdown_scriptpubkey(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Option_CVec_u8ZZ ret_hu_conv = org.ldk.structs.Option_CVec_u8ZZ.constr_from_ptr(ret); - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; - return ret_hu_conv; - } - - /** - * Optionally, a request to pre-set the to-channel-acceptor output's scriptPubkey for when we - * collaboratively close - */ - public void set_shutdown_scriptpubkey(org.ldk.structs.Option_CVec_u8ZZ val) { - bindings.AcceptChannelV2_set_shutdown_scriptpubkey(this.ptr, val.ptr); - GC.KeepAlive(this); - GC.KeepAlive(val); - if (this != null) { this.ptrs_to.AddLast(val); }; - } - - /** - * The channel type that this channel will represent. If none is set, we derive the channel - * type from the intersection of our feature bits with our counterparty's feature bits from - * the Init message. - * - * This is required to match the equivalent field in [`OpenChannelV2::channel_type`]. - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None - */ - public ChannelTypeFeatures get_channel_type() { - long ret = bindings.AcceptChannelV2_get_channel_type(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.ChannelTypeFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelTypeFeatures(null, ret); } - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; - return ret_hu_conv; - } - - /** - * The channel type that this channel will represent. If none is set, we derive the channel - * type from the intersection of our feature bits with our counterparty's feature bits from - * the Init message. - * - * This is required to match the equivalent field in [`OpenChannelV2::channel_type`]. - * - * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None - */ - public void set_channel_type(org.ldk.structs.ChannelTypeFeatures val) { - bindings.AcceptChannelV2_set_channel_type(this.ptr, val == null ? 0 : val.ptr); - GC.KeepAlive(this); - GC.KeepAlive(val); - if (this != null) { this.ptrs_to.AddLast(val); }; - } - /** * Optionally, a requirement that only confirmed inputs can be added */ @@ -387,34 +97,17 @@ public class AcceptChannelV2 : CommonBase { /** * Constructs a new AcceptChannelV2 given each field - * - * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public static AcceptChannelV2 of(byte[] temporary_channel_id_arg, long funding_satoshis_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long htlc_minimum_msat_arg, int minimum_depth_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_basepoint_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, byte[] second_per_commitment_point_arg, org.ldk.structs.Option_CVec_u8ZZ shutdown_scriptpubkey_arg, org.ldk.structs.ChannelTypeFeatures channel_type_arg, COption_NoneZ require_confirmed_inputs_arg) { - long ret = bindings.AcceptChannelV2_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(temporary_channel_id_arg, 32)), funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(funding_pubkey_arg, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(revocation_basepoint_arg, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_basepoint_arg, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(delayed_payment_basepoint_arg, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(htlc_basepoint_arg, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(first_per_commitment_point_arg, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(second_per_commitment_point_arg, 33)), shutdown_scriptpubkey_arg.ptr, channel_type_arg == null ? 0 : channel_type_arg.ptr, require_confirmed_inputs_arg); - GC.KeepAlive(temporary_channel_id_arg); + public static AcceptChannelV2 of(org.ldk.structs.CommonAcceptChannelFields common_fields_arg, long funding_satoshis_arg, byte[] second_per_commitment_point_arg, COption_NoneZ require_confirmed_inputs_arg) { + long ret = bindings.AcceptChannelV2_new(common_fields_arg.ptr, funding_satoshis_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(second_per_commitment_point_arg, 33)), require_confirmed_inputs_arg); + GC.KeepAlive(common_fields_arg); GC.KeepAlive(funding_satoshis_arg); - GC.KeepAlive(dust_limit_satoshis_arg); - GC.KeepAlive(max_htlc_value_in_flight_msat_arg); - GC.KeepAlive(htlc_minimum_msat_arg); - GC.KeepAlive(minimum_depth_arg); - GC.KeepAlive(to_self_delay_arg); - GC.KeepAlive(max_accepted_htlcs_arg); - GC.KeepAlive(funding_pubkey_arg); - GC.KeepAlive(revocation_basepoint_arg); - GC.KeepAlive(payment_basepoint_arg); - GC.KeepAlive(delayed_payment_basepoint_arg); - GC.KeepAlive(htlc_basepoint_arg); - GC.KeepAlive(first_per_commitment_point_arg); GC.KeepAlive(second_per_commitment_point_arg); - GC.KeepAlive(shutdown_scriptpubkey_arg); - GC.KeepAlive(channel_type_arg); GC.KeepAlive(require_confirmed_inputs_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.AcceptChannelV2 ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.AcceptChannelV2(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(shutdown_scriptpubkey_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_type_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(common_fields_arg); }; return ret_hu_conv; } @@ -454,7 +147,7 @@ public class AcceptChannelV2 : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.AcceptChannelV2 b) { - bool ret = bindings.AcceptChannelV2_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.AcceptChannelV2_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/Amount.cs b/c_sharp/src/org/ldk/structs/Amount.cs index 3450ea90..49ffeef5 100644 --- a/c_sharp/src/org/ldk/structs/Amount.cs +++ b/c_sharp/src/org/ldk/structs/Amount.cs @@ -5,17 +5,53 @@ using System; namespace org { namespace ldk { namespace structs { - /** * The minimum amount required for an item in an [`Offer`], denominated in either bitcoin or * another currency. */ public class Amount : CommonBase { - internal Amount(object _dummy, long ptr) : base(ptr) { } + protected Amount(object _dummy, long ptr) : base(ptr) { } ~Amount() { if (ptr != 0) { bindings.Amount_free(ptr); } } + internal static Amount constr_from_ptr(long ptr) { + long raw_ty = bindings.LDKAmount_ty_from_ptr(ptr); + switch (raw_ty) { + case 0: return new Amount_Bitcoin(ptr); + case 1: return new Amount_Currency(ptr); + default: + throw new ArgumentException("Impossible enum variant"); + } + } + + /** A Amount of type Bitcoin */ + public class Amount_Bitcoin : Amount { + /** + * The amount in millisatoshi. + */ + public long amount_msats; + internal Amount_Bitcoin(long ptr) : base(null, ptr) { + this.amount_msats = bindings.LDKAmount_Bitcoin_get_amount_msats(ptr); + } + } + /** A Amount of type Currency */ + public class Amount_Currency : Amount { + /** + * The currency that the amount is denominated in. + */ + public byte[] iso4217_code; + /** + * The amount in the currency unit adjusted by the ISO 4712 exponent (e.g., USD cents). + */ + public long amount; + internal Amount_Currency(long ptr) : base(null, ptr) { + long iso4217_code = bindings.LDKAmount_Currency_get_iso4217_code(ptr); + byte[] iso4217_code_conv = InternalUtils.decodeUint8Array(iso4217_code); + this.iso4217_code = iso4217_code_conv; + this.amount = bindings.LDKAmount_Currency_get_amount(ptr); + } + } internal long clone_ptr() { long ret = bindings.Amount_clone_ptr(this.ptr); GC.KeepAlive(this); @@ -29,10 +65,35 @@ public class Amount : CommonBase { long ret = bindings.Amount_clone(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Amount ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Amount(null, ret); } + org.ldk.structs.Amount ret_hu_conv = org.ldk.structs.Amount.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; return ret_hu_conv; } + /** + * Utility method to constructs a new Bitcoin-variant Amount + */ + public static Amount bitcoin(long amount_msats) { + long ret = bindings.Amount_bitcoin(amount_msats); + GC.KeepAlive(amount_msats); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Amount ret_hu_conv = org.ldk.structs.Amount.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new Currency-variant Amount + */ + public static Amount currency(byte[] iso4217_code, long amount) { + long ret = bindings.Amount_currency(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(iso4217_code, 3)), amount); + GC.KeepAlive(iso4217_code); + GC.KeepAlive(amount); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Amount ret_hu_conv = org.ldk.structs.Amount.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + } } } } diff --git a/c_sharp/src/org/ldk/structs/AnchorDescriptor.cs b/c_sharp/src/org/ldk/structs/AnchorDescriptor.cs index 0fd35131..b452326b 100644 --- a/c_sharp/src/org/ldk/structs/AnchorDescriptor.cs +++ b/c_sharp/src/org/ldk/structs/AnchorDescriptor.cs @@ -31,7 +31,7 @@ public class AnchorDescriptor : CommonBase { * The parameters required to derive the signer for the anchor input. */ public void set_channel_derivation_parameters(org.ldk.structs.ChannelDerivationParameters val) { - bindings.AnchorDescriptor_set_channel_derivation_parameters(this.ptr, val == null ? 0 : val.ptr); + bindings.AnchorDescriptor_set_channel_derivation_parameters(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -55,7 +55,7 @@ public class AnchorDescriptor : CommonBase { * output. */ public void set_outpoint(org.ldk.structs.OutPoint val) { - bindings.AnchorDescriptor_set_outpoint(this.ptr, val == null ? 0 : val.ptr); + bindings.AnchorDescriptor_set_outpoint(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -65,7 +65,7 @@ public class AnchorDescriptor : CommonBase { * Constructs a new AnchorDescriptor given each field */ public static AnchorDescriptor of(org.ldk.structs.ChannelDerivationParameters channel_derivation_parameters_arg, org.ldk.structs.OutPoint outpoint_arg) { - long ret = bindings.AnchorDescriptor_new(channel_derivation_parameters_arg == null ? 0 : channel_derivation_parameters_arg.ptr, outpoint_arg == null ? 0 : outpoint_arg.ptr); + long ret = bindings.AnchorDescriptor_new(channel_derivation_parameters_arg.ptr, outpoint_arg.ptr); GC.KeepAlive(channel_derivation_parameters_arg); GC.KeepAlive(outpoint_arg); if (ret >= 0 && ret <= 4096) { return null; } @@ -100,7 +100,7 @@ public class AnchorDescriptor : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.AnchorDescriptor b) { - bool ret = bindings.AnchorDescriptor_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.AnchorDescriptor_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/AnnouncementSignatures.cs b/c_sharp/src/org/ldk/structs/AnnouncementSignatures.cs index cebd823c..064273e4 100644 --- a/c_sharp/src/org/ldk/structs/AnnouncementSignatures.cs +++ b/c_sharp/src/org/ldk/structs/AnnouncementSignatures.cs @@ -20,21 +20,23 @@ public class AnnouncementSignatures : CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { + public ChannelId get_channel_id() { long ret = bindings.AnnouncementSignatures_get_channel_id(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.AnnouncementSignatures_set_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.AnnouncementSignatures_set_channel_id(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** @@ -98,8 +100,8 @@ public class AnnouncementSignatures : CommonBase { /** * Constructs a new AnnouncementSignatures given each field */ - public static AnnouncementSignatures of(byte[] channel_id_arg, long short_channel_id_arg, byte[] node_signature_arg, byte[] bitcoin_signature_arg) { - long ret = bindings.AnnouncementSignatures_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id_arg, 32)), short_channel_id_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_signature_arg, 64)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(bitcoin_signature_arg, 64))); + public static AnnouncementSignatures of(org.ldk.structs.ChannelId channel_id_arg, long short_channel_id_arg, byte[] node_signature_arg, byte[] bitcoin_signature_arg) { + long ret = bindings.AnnouncementSignatures_new(channel_id_arg.ptr, short_channel_id_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_signature_arg, 64)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(bitcoin_signature_arg, 64))); GC.KeepAlive(channel_id_arg); GC.KeepAlive(short_channel_id_arg); GC.KeepAlive(node_signature_arg); @@ -107,6 +109,7 @@ public class AnnouncementSignatures : CommonBase { if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.AnnouncementSignatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.AnnouncementSignatures(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id_arg); }; return ret_hu_conv; } @@ -146,7 +149,7 @@ public class AnnouncementSignatures : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.AnnouncementSignatures b) { - bool ret = bindings.AnnouncementSignatures_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.AnnouncementSignatures_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/BackgroundProcessor.cs b/c_sharp/src/org/ldk/structs/BackgroundProcessor.cs index 188408db..24843df0 100644 --- a/c_sharp/src/org/ldk/structs/BackgroundProcessor.cs +++ b/c_sharp/src/org/ldk/structs/BackgroundProcessor.cs @@ -29,6 +29,8 @@ namespace org { namespace ldk { namespace structs { * However, as long as [`ChannelMonitor`] backups are sound, no funds besides those used for * unilateral chain closure fees are at risk. * + * [`ChannelManager`]: lightning::ln::channelmanager::ChannelManager + * [`ChannelManager::timer_tick_occurred`]: lightning::ln::channelmanager::ChannelManager::timer_tick_occurred * [`ChannelMonitor`]: lightning::chain::channelmonitor::ChannelMonitor * [`Event`]: lightning::events::Event * [`PeerManager::timer_tick_occurred`]: lightning::ln::peer_handler::PeerManager::timer_tick_occurred @@ -88,7 +90,7 @@ public class BackgroundProcessor : CommonBase { * [`NetworkGraph::write`]: lightning::routing::gossip::NetworkGraph#impl-Writeable */ public static BackgroundProcessor start(org.ldk.structs.Persister persister, org.ldk.structs.EventHandler event_handler, org.ldk.structs.ChainMonitor chain_monitor, org.ldk.structs.ChannelManager channel_manager, org.ldk.structs.GossipSync gossip_sync, org.ldk.structs.PeerManager peer_manager, org.ldk.structs.Logger logger, org.ldk.structs.Option_WriteableScoreZ scorer) { - long ret = bindings.BackgroundProcessor_start(persister.ptr, event_handler.ptr, chain_monitor == null ? 0 : chain_monitor.ptr, channel_manager == null ? 0 : channel_manager.ptr, gossip_sync.ptr, peer_manager == null ? 0 : peer_manager.ptr, logger.ptr, scorer.ptr); + long ret = bindings.BackgroundProcessor_start(persister.ptr, event_handler.ptr, chain_monitor.ptr, channel_manager.ptr, gossip_sync.ptr, peer_manager.ptr, logger.ptr, scorer.ptr); GC.KeepAlive(persister); GC.KeepAlive(event_handler); GC.KeepAlive(chain_monitor); diff --git a/c_sharp/src/org/ldk/structs/Balance.cs b/c_sharp/src/org/ldk/structs/Balance.cs index 74d10f64..18313917 100644 --- a/c_sharp/src/org/ldk/structs/Balance.cs +++ b/c_sharp/src/org/ldk/structs/Balance.cs @@ -254,7 +254,7 @@ public class Balance : CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public bool eq(org.ldk.structs.Balance b) { - bool ret = bindings.Balance_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.Balance_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); return ret; diff --git a/c_sharp/src/org/ldk/structs/BestBlock.cs b/c_sharp/src/org/ldk/structs/BestBlock.cs index 3d46e2b0..b8b816ee 100644 --- a/c_sharp/src/org/ldk/structs/BestBlock.cs +++ b/c_sharp/src/org/ldk/structs/BestBlock.cs @@ -15,6 +15,57 @@ public class BestBlock : CommonBase { if (ptr != 0) { bindings.BestBlock_free(ptr); } } + /** + * The block's hash + */ + public byte[] get_block_hash() { + long ret = bindings.BestBlock_get_block_hash(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + + /** + * The block's hash + */ + public void set_block_hash(byte[] val) { + bindings.BestBlock_set_block_hash(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * The height at which the block was confirmed. + */ + public int get_height() { + int ret = bindings.BestBlock_get_height(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * The height at which the block was confirmed. + */ + public void set_height(int val) { + bindings.BestBlock_set_height(this.ptr, val); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * Constructs a new BestBlock given each field + */ + public static BestBlock of(byte[] block_hash_arg, int height_arg) { + long ret = bindings.BestBlock_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(block_hash_arg, 32)), height_arg); + GC.KeepAlive(block_hash_arg); + GC.KeepAlive(height_arg); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.BestBlock ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.BestBlock(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + internal long clone_ptr() { long ret = bindings.BestBlock_clone_ptr(this.ptr); GC.KeepAlive(this); @@ -33,13 +84,25 @@ public class BestBlock : CommonBase { return ret_hu_conv; } + /** + * Generates a non-cryptographic 64-bit hash of the BestBlock. + */ + public long hash() { + long ret = bindings.BestBlock_hash(this.ptr); + GC.KeepAlive(this); + return ret; + } + + public override int GetHashCode() { + return (int)this.hash(); + } /** * Checks if two BestBlocks contain equal inner contents. * This ignores pointers and is_owned flags and looks at the values in fields. * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.BestBlock b) { - bool ret = bindings.BestBlock_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.BestBlock_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; @@ -64,23 +127,10 @@ public class BestBlock : CommonBase { } /** - * Returns a `BestBlock` as identified by the given block hash and height. + * Serialize the BestBlock object into a byte array which can be read by BestBlock_read */ - public static BestBlock of(byte[] block_hash, int height) { - long ret = bindings.BestBlock_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(block_hash, 32)), height); - GC.KeepAlive(block_hash); - GC.KeepAlive(height); - if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.BestBlock ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.BestBlock(null, ret); } - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; - return ret_hu_conv; - } - - /** - * Returns the best block hash. - */ - public byte[] block_hash() { - long ret = bindings.BestBlock_block_hash(this.ptr); + public byte[] write() { + long ret = bindings.BestBlock_write(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } byte[] ret_conv = InternalUtils.decodeUint8Array(ret); @@ -88,12 +138,14 @@ public class BestBlock : CommonBase { } /** - * Returns the best block height. + * Read a BestBlock from a byte array, created by BestBlock_write */ - public int height() { - int ret = bindings.BestBlock_height(this.ptr); - GC.KeepAlive(this); - return ret; + public static Result_BestBlockDecodeErrorZ read(byte[] ser) { + long ret = bindings.BestBlock_read(InternalUtils.encodeUint8Array(ser)); + GC.KeepAlive(ser); + if (ret >= 0 && ret <= 4096) { return null; } + Result_BestBlockDecodeErrorZ ret_hu_conv = Result_BestBlockDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; } } diff --git a/c_sharp/src/org/ldk/structs/BigSize.cs b/c_sharp/src/org/ldk/structs/BigSize.cs index 2a0b0a4e..d1ec9561 100644 --- a/c_sharp/src/org/ldk/structs/BigSize.cs +++ b/c_sharp/src/org/ldk/structs/BigSize.cs @@ -81,7 +81,7 @@ public class BigSize : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.BigSize b) { - bool ret = bindings.BigSize_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.BigSize_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/BlindedForward.cs b/c_sharp/src/org/ldk/structs/BlindedForward.cs index 12a542dd..da99ae4d 100644 --- a/c_sharp/src/org/ldk/structs/BlindedForward.cs +++ b/c_sharp/src/org/ldk/structs/BlindedForward.cs @@ -108,7 +108,7 @@ public class BlindedForward : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.BlindedForward b) { - bool ret = bindings.BlindedForward_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.BlindedForward_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/BlindedHop.cs b/c_sharp/src/org/ldk/structs/BlindedHop.cs index 95bbe09e..5829ee0f 100644 --- a/c_sharp/src/org/ldk/structs/BlindedHop.cs +++ b/c_sharp/src/org/ldk/structs/BlindedHop.cs @@ -108,7 +108,7 @@ public class BlindedHop : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.BlindedHop b) { - bool ret = bindings.BlindedHop_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.BlindedHop_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/BlindedHopFeatures.cs b/c_sharp/src/org/ldk/structs/BlindedHopFeatures.cs index d6de7e38..c1cf013f 100644 --- a/c_sharp/src/org/ldk/structs/BlindedHopFeatures.cs +++ b/c_sharp/src/org/ldk/structs/BlindedHopFeatures.cs @@ -21,7 +21,7 @@ public class BlindedHopFeatures : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.BlindedHopFeatures b) { - bool ret = bindings.BlindedHopFeatures_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.BlindedHopFeatures_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; @@ -77,7 +77,7 @@ public class BlindedHopFeatures : CommonBase { * Returns true if this `Features` object contains required features unknown by `other`. */ public bool requires_unknown_bits_from(org.ldk.structs.BlindedHopFeatures other) { - bool ret = bindings.BlindedHopFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr); + bool ret = bindings.BlindedHopFeatures_requires_unknown_bits_from(this.ptr, other.ptr); GC.KeepAlive(this); GC.KeepAlive(other); if (this != null) { this.ptrs_to.AddLast(other); }; diff --git a/c_sharp/src/org/ldk/structs/BlindedPath.cs b/c_sharp/src/org/ldk/structs/BlindedPath.cs index 4a24c4f3..ee027ffb 100644 --- a/c_sharp/src/org/ldk/structs/BlindedPath.cs +++ b/c_sharp/src/org/ldk/structs/BlindedPath.cs @@ -18,30 +18,32 @@ public class BlindedPath : CommonBase { /** * To send to a blinded path, the sender first finds a route to the unblinded - * `introduction_node_id`, which can unblind its [`encrypted_payload`] to find out the onion + * `introduction_node`, which can unblind its [`encrypted_payload`] to find out the onion * message or payment's next hop and forward it along. * * [`encrypted_payload`]: BlindedHop::encrypted_payload */ - public byte[] get_introduction_node_id() { - long ret = bindings.BlindedPath_get_introduction_node_id(this.ptr); + public IntroductionNode get_introduction_node() { + long ret = bindings.BlindedPath_get_introduction_node(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + org.ldk.structs.IntroductionNode ret_hu_conv = org.ldk.structs.IntroductionNode.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** * To send to a blinded path, the sender first finds a route to the unblinded - * `introduction_node_id`, which can unblind its [`encrypted_payload`] to find out the onion + * `introduction_node`, which can unblind its [`encrypted_payload`] to find out the onion * message or payment's next hop and forward it along. * * [`encrypted_payload`]: BlindedHop::encrypted_payload */ - public void set_introduction_node_id(byte[] val) { - bindings.BlindedPath_set_introduction_node_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); + public void set_introduction_node(org.ldk.structs.IntroductionNode val) { + bindings.BlindedPath_set_introduction_node(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** @@ -93,7 +95,7 @@ public class BlindedPath : CommonBase { * The hops composing the blinded path. */ public void set_blinded_hops(BlindedHop[] val) { - bindings.BlindedPath_set_blinded_hops(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(val, val_conv_12 => val_conv_12 == null ? 0 : val_conv_12.ptr))); + bindings.BlindedPath_set_blinded_hops(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(val, val_conv_12 => val_conv_12.ptr))); GC.KeepAlive(this); GC.KeepAlive(val); foreach (BlindedHop val_conv_12 in val) { if (this != null) { this.ptrs_to.AddLast(val_conv_12); }; }; @@ -102,14 +104,15 @@ public class BlindedPath : CommonBase { /** * Constructs a new BlindedPath given each field */ - public static BlindedPath of(byte[] introduction_node_id_arg, byte[] blinding_point_arg, BlindedHop[] blinded_hops_arg) { - long ret = bindings.BlindedPath_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(introduction_node_id_arg, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(blinding_point_arg, 33)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(blinded_hops_arg, blinded_hops_arg_conv_12 => blinded_hops_arg_conv_12 == null ? 0 : blinded_hops_arg_conv_12.ptr))); - GC.KeepAlive(introduction_node_id_arg); + public static BlindedPath of(org.ldk.structs.IntroductionNode introduction_node_arg, byte[] blinding_point_arg, BlindedHop[] blinded_hops_arg) { + long ret = bindings.BlindedPath_new(introduction_node_arg.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(blinding_point_arg, 33)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(blinded_hops_arg, blinded_hops_arg_conv_12 => blinded_hops_arg_conv_12.ptr))); + GC.KeepAlive(introduction_node_arg); GC.KeepAlive(blinding_point_arg); GC.KeepAlive(blinded_hops_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.BlindedPath ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.BlindedPath(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(introduction_node_arg); }; foreach (BlindedHop blinded_hops_arg_conv_12 in blinded_hops_arg) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(blinded_hops_arg_conv_12); }; }; return ret_hu_conv; } @@ -150,7 +153,7 @@ public class BlindedPath : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.BlindedPath b) { - bool ret = bindings.BlindedPath_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.BlindedPath_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; @@ -190,6 +193,23 @@ public class BlindedPath : CommonBase { return ret_hu_conv; } + /** + * Returns the introduction [`NodeId`] of the blinded path, if it is publicly reachable (i.e., + * it is found in the network graph). + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public NodeId public_introduction_node_id(org.ldk.structs.ReadOnlyNetworkGraph network_graph) { + long ret = bindings.BlindedPath_public_introduction_node_id(this.ptr, network_graph.ptr); + GC.KeepAlive(this); + GC.KeepAlive(network_graph); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.NodeId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.NodeId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + if (this != null) { this.ptrs_to.AddLast(network_graph); }; + return ret_hu_conv; + } + /** * Serialize the BlindedPath object into a byte array which can be read by BlindedPath_read */ diff --git a/c_sharp/src/org/ldk/structs/BlindedPayInfo.cs b/c_sharp/src/org/ldk/structs/BlindedPayInfo.cs index e788659b..c68aaa7a 100644 --- a/c_sharp/src/org/ldk/structs/BlindedPayInfo.cs +++ b/c_sharp/src/org/ldk/structs/BlindedPayInfo.cs @@ -135,7 +135,7 @@ public class BlindedPayInfo : CommonBase { * onion payload. */ public void set_features(org.ldk.structs.BlindedHopFeatures val) { - bindings.BlindedPayInfo_set_features(this.ptr, val == null ? 0 : val.ptr); + bindings.BlindedPayInfo_set_features(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -145,7 +145,7 @@ public class BlindedPayInfo : CommonBase { * Constructs a new BlindedPayInfo given each field */ public static BlindedPayInfo of(int fee_base_msat_arg, int fee_proportional_millionths_arg, short cltv_expiry_delta_arg, long htlc_minimum_msat_arg, long htlc_maximum_msat_arg, org.ldk.structs.BlindedHopFeatures features_arg) { - long ret = bindings.BlindedPayInfo_new(fee_base_msat_arg, fee_proportional_millionths_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg, features_arg == null ? 0 : features_arg.ptr); + long ret = bindings.BlindedPayInfo_new(fee_base_msat_arg, fee_proportional_millionths_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg, features_arg.ptr); GC.KeepAlive(fee_base_msat_arg); GC.KeepAlive(fee_proportional_millionths_arg); GC.KeepAlive(cltv_expiry_delta_arg); @@ -195,7 +195,7 @@ public class BlindedPayInfo : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.BlindedPayInfo b) { - bool ret = bindings.BlindedPayInfo_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.BlindedPayInfo_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/BlindedTail.cs b/c_sharp/src/org/ldk/structs/BlindedTail.cs index a92b3ac7..b27ce406 100644 --- a/c_sharp/src/org/ldk/structs/BlindedTail.cs +++ b/c_sharp/src/org/ldk/structs/BlindedTail.cs @@ -45,7 +45,7 @@ public class BlindedTail : CommonBase { * [`BlindedPath`]: crate::blinded_path::BlindedPath */ public void set_hops(BlindedHop[] val) { - bindings.BlindedTail_set_hops(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(val, val_conv_12 => val_conv_12 == null ? 0 : val_conv_12.ptr))); + bindings.BlindedTail_set_hops(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(val, val_conv_12 => val_conv_12.ptr))); GC.KeepAlive(this); GC.KeepAlive(val); foreach (BlindedHop val_conv_12 in val) { if (this != null) { this.ptrs_to.AddLast(val_conv_12); }; }; @@ -117,7 +117,7 @@ public class BlindedTail : CommonBase { * Constructs a new BlindedTail given each field */ public static BlindedTail of(BlindedHop[] hops_arg, byte[] blinding_point_arg, int excess_final_cltv_expiry_delta_arg, long final_value_msat_arg) { - long ret = bindings.BlindedTail_new(InternalUtils.encodeUint64Array(InternalUtils.mapArray(hops_arg, hops_arg_conv_12 => hops_arg_conv_12 == null ? 0 : hops_arg_conv_12.ptr)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(blinding_point_arg, 33)), excess_final_cltv_expiry_delta_arg, final_value_msat_arg); + long ret = bindings.BlindedTail_new(InternalUtils.encodeUint64Array(InternalUtils.mapArray(hops_arg, hops_arg_conv_12 => hops_arg_conv_12.ptr)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(blinding_point_arg, 33)), excess_final_cltv_expiry_delta_arg, final_value_msat_arg); GC.KeepAlive(hops_arg); GC.KeepAlive(blinding_point_arg); GC.KeepAlive(excess_final_cltv_expiry_delta_arg); @@ -165,7 +165,7 @@ public class BlindedTail : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.BlindedTail b) { - bool ret = bindings.BlindedTail_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.BlindedTail_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/Bolt11Invoice.cs b/c_sharp/src/org/ldk/structs/Bolt11Invoice.cs index 753798b9..a44f6c86 100644 --- a/c_sharp/src/org/ldk/structs/Bolt11Invoice.cs +++ b/c_sharp/src/org/ldk/structs/Bolt11Invoice.cs @@ -28,7 +28,7 @@ public class Bolt11Invoice : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.Bolt11Invoice b) { - bool ret = bindings.Bolt11Invoice_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.Bolt11Invoice_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; @@ -127,7 +127,7 @@ public class Bolt11Invoice : CommonBase { * ``` */ public static Result_Bolt11InvoiceBolt11SemanticErrorZ from_signed(org.ldk.structs.SignedRawBolt11Invoice signed_invoice) { - long ret = bindings.Bolt11Invoice_from_signed(signed_invoice == null ? 0 : signed_invoice.ptr); + long ret = bindings.Bolt11Invoice_from_signed(signed_invoice.ptr); GC.KeepAlive(signed_invoice); if (ret >= 0 && ret <= 4096) { return null; } Result_Bolt11InvoiceBolt11SemanticErrorZ ret_hu_conv = Result_Bolt11InvoiceBolt11SemanticErrorZ.constr_from_ptr(ret); @@ -225,6 +225,18 @@ public class Bolt11Invoice : CommonBase { return ret_conv; } + /** + * Recover the payee's public key if one was included in the invoice, otherwise return the + * recovered public key from the signature + */ + public byte[] get_payee_pub_key() { + long ret = bindings.Bolt11Invoice_get_payee_pub_key(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + /** * Returns the Duration since the Unix epoch at which the invoice expires. * Returning None if overflow occurred. diff --git a/c_sharp/src/org/ldk/structs/Bolt11InvoiceFeatures.cs b/c_sharp/src/org/ldk/structs/Bolt11InvoiceFeatures.cs index 7b649b24..317cc0da 100644 --- a/c_sharp/src/org/ldk/structs/Bolt11InvoiceFeatures.cs +++ b/c_sharp/src/org/ldk/structs/Bolt11InvoiceFeatures.cs @@ -21,7 +21,7 @@ public class Bolt11InvoiceFeatures : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.Bolt11InvoiceFeatures b) { - bool ret = bindings.Bolt11InvoiceFeatures_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.Bolt11InvoiceFeatures_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; @@ -77,7 +77,7 @@ public class Bolt11InvoiceFeatures : CommonBase { * Returns true if this `Features` object contains required features unknown by `other`. */ public bool requires_unknown_bits_from(org.ldk.structs.Bolt11InvoiceFeatures other) { - bool ret = bindings.Bolt11InvoiceFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr); + bool ret = bindings.Bolt11InvoiceFeatures_requires_unknown_bits_from(this.ptr, other.ptr); GC.KeepAlive(this); GC.KeepAlive(other); if (this != null) { this.ptrs_to.AddLast(other); }; @@ -324,5 +324,39 @@ public class Bolt11InvoiceFeatures : CommonBase { return ret; } + /** + * Set this feature as optional. + */ + public void set_trampoline_routing_optional() { + bindings.Bolt11InvoiceFeatures_set_trampoline_routing_optional(this.ptr); + GC.KeepAlive(this); + } + + /** + * Set this feature as required. + */ + public void set_trampoline_routing_required() { + bindings.Bolt11InvoiceFeatures_set_trampoline_routing_required(this.ptr); + GC.KeepAlive(this); + } + + /** + * Checks if this feature is supported. + */ + public bool supports_trampoline_routing() { + bool ret = bindings.Bolt11InvoiceFeatures_supports_trampoline_routing(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Checks if this feature is required. + */ + public bool requires_trampoline_routing() { + bool ret = bindings.Bolt11InvoiceFeatures_requires_trampoline_routing(this.ptr); + GC.KeepAlive(this); + return ret; + } + } } } } diff --git a/c_sharp/src/org/ldk/structs/Bolt11InvoiceSignature.cs b/c_sharp/src/org/ldk/structs/Bolt11InvoiceSignature.cs index aed040ab..e6c65abc 100644 --- a/c_sharp/src/org/ldk/structs/Bolt11InvoiceSignature.cs +++ b/c_sharp/src/org/ldk/structs/Bolt11InvoiceSignature.cs @@ -51,7 +51,7 @@ public class Bolt11InvoiceSignature : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.Bolt11InvoiceSignature b) { - bool ret = bindings.Bolt11InvoiceSignature_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.Bolt11InvoiceSignature_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/Bolt11ParseError.cs b/c_sharp/src/org/ldk/structs/Bolt11ParseError.cs index abf9712f..27cdaea3 100644 --- a/c_sharp/src/org/ldk/structs/Bolt11ParseError.cs +++ b/c_sharp/src/org/ldk/structs/Bolt11ParseError.cs @@ -377,7 +377,7 @@ public class Bolt11ParseError : CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public bool eq(org.ldk.structs.Bolt11ParseError b) { - bool ret = bindings.Bolt11ParseError_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.Bolt11ParseError_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); return ret; diff --git a/c_sharp/src/org/ldk/structs/Bolt12Invoice.cs b/c_sharp/src/org/ldk/structs/Bolt12Invoice.cs index 35f4e651..e498a962 100644 --- a/c_sharp/src/org/ldk/structs/Bolt12Invoice.cs +++ b/c_sharp/src/org/ldk/structs/Bolt12Invoice.cs @@ -99,14 +99,12 @@ public class Bolt12Invoice : CommonBase { * * [`Offer`]: crate::offers::offer::Offer * [`Offer::amount`]: crate::offers::offer::Offer::amount - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public Amount amount() { + public Option_AmountZ amount() { long ret = bindings.Bolt12Invoice_amount(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Amount ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Amount(null, ret); } + org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; return ret_hu_conv; } @@ -137,6 +135,8 @@ public class Bolt12Invoice : CommonBase { * From [`Offer::description`] or [`Refund::description`]. * * [`Offer::description`]: crate::offers::offer::Offer::description + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ public PrintableString description() { long ret = bindings.Bolt12Invoice_description(this.ptr); @@ -211,14 +211,12 @@ public class Bolt12Invoice : CommonBase { * [`Refund`]. * * [`Offer::supported_quantity`]: crate::offers::offer::Offer::supported_quantity - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public Quantity supported_quantity() { + public Option_QuantityZ supported_quantity() { long ret = bindings.Bolt12Invoice_supported_quantity(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Quantity ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Quantity(null, ret); } + org.ldk.structs.Option_QuantityZ ret_hu_conv = org.ldk.structs.Option_QuantityZ.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; return ret_hu_conv; } @@ -392,7 +390,7 @@ public class Bolt12Invoice : CommonBase { * the associated [`PaymentId`] to use when sending the payment. */ public Result_ThirtyTwoBytesNoneZ verify(org.ldk.structs.ExpandedKey key) { - long ret = bindings.Bolt12Invoice_verify(this.ptr, key == null ? 0 : key.ptr); + long ret = bindings.Bolt12Invoice_verify(this.ptr, key.ptr); GC.KeepAlive(this); GC.KeepAlive(key); if (ret >= 0 && ret <= 4096) { return null; } @@ -401,6 +399,18 @@ public class Bolt12Invoice : CommonBase { return ret_hu_conv; } + /** + * Generates a non-cryptographic 64-bit hash of the Bolt12Invoice. + */ + public long hash() { + long ret = bindings.Bolt12Invoice_hash(this.ptr); + GC.KeepAlive(this); + return ret; + } + + public override int GetHashCode() { + return (int)this.hash(); + } /** * Serialize the Bolt12Invoice object into a byte array which can be read by Bolt12Invoice_read */ diff --git a/c_sharp/src/org/ldk/structs/Bolt12InvoiceFeatures.cs b/c_sharp/src/org/ldk/structs/Bolt12InvoiceFeatures.cs index 98b72e12..ac0f264b 100644 --- a/c_sharp/src/org/ldk/structs/Bolt12InvoiceFeatures.cs +++ b/c_sharp/src/org/ldk/structs/Bolt12InvoiceFeatures.cs @@ -21,7 +21,7 @@ public class Bolt12InvoiceFeatures : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.Bolt12InvoiceFeatures b) { - bool ret = bindings.Bolt12InvoiceFeatures_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.Bolt12InvoiceFeatures_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; @@ -77,7 +77,7 @@ public class Bolt12InvoiceFeatures : CommonBase { * Returns true if this `Features` object contains required features unknown by `other`. */ public bool requires_unknown_bits_from(org.ldk.structs.Bolt12InvoiceFeatures other) { - bool ret = bindings.Bolt12InvoiceFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr); + bool ret = bindings.Bolt12InvoiceFeatures_requires_unknown_bits_from(this.ptr, other.ptr); GC.KeepAlive(this); GC.KeepAlive(other); if (this != null) { this.ptrs_to.AddLast(other); }; diff --git a/c_sharp/src/org/ldk/structs/Bolt12OfferContext.cs b/c_sharp/src/org/ldk/structs/Bolt12OfferContext.cs new file mode 100644 index 00000000..c75a4349 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/Bolt12OfferContext.cs @@ -0,0 +1,147 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + + +/** + * The context of a payment made for an invoice requested from a BOLT 12 [`Offer`]. + * + * [`Offer`]: crate::offers::offer::Offer + */ +public class Bolt12OfferContext : CommonBase { + internal Bolt12OfferContext(object _dummy, long ptr) : base(ptr) { } + ~Bolt12OfferContext() { + if (ptr != 0) { bindings.Bolt12OfferContext_free(ptr); } + } + + /** + * The identifier of the [`Offer`]. + * + * [`Offer`]: crate::offers::offer::Offer + */ + public OfferId get_offer_id() { + long ret = bindings.Bolt12OfferContext_get_offer_id(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OfferId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * The identifier of the [`Offer`]. + * + * [`Offer`]: crate::offers::offer::Offer + */ + public void set_offer_id(org.ldk.structs.OfferId val) { + bindings.Bolt12OfferContext_set_offer_id(this.ptr, val.ptr); + GC.KeepAlive(this); + GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; + } + + /** + * Fields from an [`InvoiceRequest`] sent for a [`Bolt12Invoice`]. + * + * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest + * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice + */ + public InvoiceRequestFields get_invoice_request() { + long ret = bindings.Bolt12OfferContext_get_invoice_request(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.InvoiceRequestFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InvoiceRequestFields(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Fields from an [`InvoiceRequest`] sent for a [`Bolt12Invoice`]. + * + * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest + * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice + */ + public void set_invoice_request(org.ldk.structs.InvoiceRequestFields val) { + bindings.Bolt12OfferContext_set_invoice_request(this.ptr, val.ptr); + GC.KeepAlive(this); + GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; + } + + /** + * Constructs a new Bolt12OfferContext given each field + */ + public static Bolt12OfferContext of(org.ldk.structs.OfferId offer_id_arg, org.ldk.structs.InvoiceRequestFields invoice_request_arg) { + long ret = bindings.Bolt12OfferContext_new(offer_id_arg.ptr, invoice_request_arg.ptr); + GC.KeepAlive(offer_id_arg); + GC.KeepAlive(invoice_request_arg); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Bolt12OfferContext ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Bolt12OfferContext(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(offer_id_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(invoice_request_arg); }; + return ret_hu_conv; + } + + internal long clone_ptr() { + long ret = bindings.Bolt12OfferContext_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a copy of the Bolt12OfferContext + */ + public Bolt12OfferContext clone() { + long ret = bindings.Bolt12OfferContext_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Bolt12OfferContext ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Bolt12OfferContext(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Checks if two Bolt12OfferContexts contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ + public bool eq(org.ldk.structs.Bolt12OfferContext b) { + bool ret = bindings.Bolt12OfferContext_eq(this.ptr, b.ptr); + GC.KeepAlive(this); + GC.KeepAlive(b); + if (this != null) { this.ptrs_to.AddLast(b); }; + return ret; + } + + public override bool Equals(object o) { + if (!(o is Bolt12OfferContext)) return false; + return this.eq((Bolt12OfferContext)o); + } + /** + * Serialize the Bolt12OfferContext object into a byte array which can be read by Bolt12OfferContext_read + */ + public byte[] write() { + long ret = bindings.Bolt12OfferContext_write(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Read a Bolt12OfferContext from a byte array, created by Bolt12OfferContext_write + */ + public static Result_Bolt12OfferContextDecodeErrorZ read(byte[] ser) { + long ret = bindings.Bolt12OfferContext_read(InternalUtils.encodeUint8Array(ser)); + GC.KeepAlive(ser); + if (ret >= 0 && ret <= 4096) { return null; } + Result_Bolt12OfferContextDecodeErrorZ ret_hu_conv = Result_Bolt12OfferContextDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/Bolt12RefundContext.cs b/c_sharp/src/org/ldk/structs/Bolt12RefundContext.cs new file mode 100644 index 00000000..f5833378 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/Bolt12RefundContext.cs @@ -0,0 +1,89 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + + +/** + * The context of a payment made for an invoice sent for a BOLT 12 [`Refund`]. + * + * [`Refund`]: crate::offers::refund::Refund + */ +public class Bolt12RefundContext : CommonBase { + internal Bolt12RefundContext(object _dummy, long ptr) : base(ptr) { } + ~Bolt12RefundContext() { + if (ptr != 0) { bindings.Bolt12RefundContext_free(ptr); } + } + + /** + * Constructs a new Bolt12RefundContext given each field + */ + public static Bolt12RefundContext of() { + long ret = bindings.Bolt12RefundContext_new(); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Bolt12RefundContext ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Bolt12RefundContext(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + + internal long clone_ptr() { + long ret = bindings.Bolt12RefundContext_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a copy of the Bolt12RefundContext + */ + public Bolt12RefundContext clone() { + long ret = bindings.Bolt12RefundContext_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Bolt12RefundContext ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Bolt12RefundContext(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Checks if two Bolt12RefundContexts contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ + public bool eq(org.ldk.structs.Bolt12RefundContext b) { + bool ret = bindings.Bolt12RefundContext_eq(this.ptr, b.ptr); + GC.KeepAlive(this); + GC.KeepAlive(b); + if (this != null) { this.ptrs_to.AddLast(b); }; + return ret; + } + + public override bool Equals(object o) { + if (!(o is Bolt12RefundContext)) return false; + return this.eq((Bolt12RefundContext)o); + } + /** + * Serialize the Bolt12RefundContext object into a byte array which can be read by Bolt12RefundContext_read + */ + public byte[] write() { + long ret = bindings.Bolt12RefundContext_write(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Read a Bolt12RefundContext from a byte array, created by Bolt12RefundContext_write + */ + public static Result_Bolt12RefundContextDecodeErrorZ read(byte[] ser) { + long ret = bindings.Bolt12RefundContext_read(InternalUtils.encodeUint8Array(ser)); + GC.KeepAlive(ser); + if (ret >= 0 && ret <= 4096) { return null; } + Result_Bolt12RefundContextDecodeErrorZ ret_hu_conv = Result_Bolt12RefundContextDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/BumpTransactionEvent.cs b/c_sharp/src/org/ldk/structs/BumpTransactionEvent.cs index 95b58176..e5d55621 100644 --- a/c_sharp/src/org/ldk/structs/BumpTransactionEvent.cs +++ b/c_sharp/src/org/ldk/structs/BumpTransactionEvent.cs @@ -26,6 +26,14 @@ public class BumpTransactionEvent : CommonBase { /** A BumpTransactionEvent of type ChannelClose */ public class BumpTransactionEvent_ChannelClose : BumpTransactionEvent { + /** + * The `channel_id` of the channel which has been closed. + */ + public ChannelId channel_id; + /** + * Counterparty in the closed channel. + */ + public byte[] counterparty_node_id; /** * The unique identifier for the claim of the anchor output in the commitment transaction. * @@ -61,6 +69,13 @@ public class BumpTransactionEvent : CommonBase { */ public HTLCOutputInCommitment[] pending_htlcs; internal BumpTransactionEvent_ChannelClose(long ptr) : base(null, ptr) { + long channel_id = bindings.LDKBumpTransactionEvent_ChannelClose_get_channel_id(ptr); + org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); } + if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.AddLast(this); }; + this.channel_id = channel_id_hu_conv; + long counterparty_node_id = bindings.LDKBumpTransactionEvent_ChannelClose_get_counterparty_node_id(ptr); + byte[] counterparty_node_id_conv = InternalUtils.decodeUint8Array(counterparty_node_id); + this.counterparty_node_id = counterparty_node_id_conv; long claim_id = bindings.LDKBumpTransactionEvent_ChannelClose_get_claim_id(ptr); byte[] claim_id_conv = InternalUtils.decodeUint8Array(claim_id); this.claim_id = claim_id_conv; @@ -88,6 +103,14 @@ public class BumpTransactionEvent : CommonBase { } /** A BumpTransactionEvent of type HTLCResolution */ public class BumpTransactionEvent_HTLCResolution : BumpTransactionEvent { + /** + * The `channel_id` of the channel which has been closed. + */ + public ChannelId channel_id; + /** + * Counterparty in the closed channel. + */ + public byte[] counterparty_node_id; /** * The unique identifier for the claim of the HTLCs in the confirmed commitment * transaction. @@ -111,6 +134,13 @@ public class BumpTransactionEvent : CommonBase { */ public int tx_lock_time; internal BumpTransactionEvent_HTLCResolution(long ptr) : base(null, ptr) { + long channel_id = bindings.LDKBumpTransactionEvent_HTLCResolution_get_channel_id(ptr); + org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); } + if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.AddLast(this); }; + this.channel_id = channel_id_hu_conv; + long counterparty_node_id = bindings.LDKBumpTransactionEvent_HTLCResolution_get_counterparty_node_id(ptr); + byte[] counterparty_node_id_conv = InternalUtils.decodeUint8Array(counterparty_node_id); + this.counterparty_node_id = counterparty_node_id_conv; long claim_id = bindings.LDKBumpTransactionEvent_HTLCResolution_get_claim_id(ptr); byte[] claim_id_conv = InternalUtils.decodeUint8Array(claim_id); this.claim_id = claim_id_conv; @@ -150,8 +180,10 @@ public class BumpTransactionEvent : CommonBase { /** * Utility method to constructs a new ChannelClose-variant BumpTransactionEvent */ - public static BumpTransactionEvent channel_close(byte[] claim_id, int package_target_feerate_sat_per_1000_weight, byte[] commitment_tx, long commitment_tx_fee_satoshis, org.ldk.structs.AnchorDescriptor anchor_descriptor, HTLCOutputInCommitment[] pending_htlcs) { - long ret = bindings.BumpTransactionEvent_channel_close(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(claim_id, 32)), package_target_feerate_sat_per_1000_weight, InternalUtils.encodeUint8Array(commitment_tx), commitment_tx_fee_satoshis, anchor_descriptor == null ? 0 : anchor_descriptor.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(pending_htlcs, pending_htlcs_conv_24 => pending_htlcs_conv_24 == null ? 0 : pending_htlcs_conv_24.ptr))); + public static BumpTransactionEvent channel_close(org.ldk.structs.ChannelId channel_id, byte[] counterparty_node_id, byte[] claim_id, int package_target_feerate_sat_per_1000_weight, byte[] commitment_tx, long commitment_tx_fee_satoshis, org.ldk.structs.AnchorDescriptor anchor_descriptor, HTLCOutputInCommitment[] pending_htlcs) { + long ret = bindings.BumpTransactionEvent_channel_close(channel_id.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_node_id, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(claim_id, 32)), package_target_feerate_sat_per_1000_weight, InternalUtils.encodeUint8Array(commitment_tx), commitment_tx_fee_satoshis, anchor_descriptor.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(pending_htlcs, pending_htlcs_conv_24 => pending_htlcs_conv_24.ptr))); + GC.KeepAlive(channel_id); + GC.KeepAlive(counterparty_node_id); GC.KeepAlive(claim_id); GC.KeepAlive(package_target_feerate_sat_per_1000_weight); GC.KeepAlive(commitment_tx); @@ -161,6 +193,7 @@ public class BumpTransactionEvent : CommonBase { if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.BumpTransactionEvent ret_hu_conv = org.ldk.structs.BumpTransactionEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(anchor_descriptor); }; foreach (HTLCOutputInCommitment pending_htlcs_conv_24 in pending_htlcs) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(pending_htlcs_conv_24); }; }; return ret_hu_conv; @@ -169,8 +202,10 @@ public class BumpTransactionEvent : CommonBase { /** * Utility method to constructs a new HTLCResolution-variant BumpTransactionEvent */ - public static BumpTransactionEvent htlcresolution(byte[] claim_id, int target_feerate_sat_per_1000_weight, HTLCDescriptor[] htlc_descriptors, int tx_lock_time) { - long ret = bindings.BumpTransactionEvent_htlcresolution(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(claim_id, 32)), target_feerate_sat_per_1000_weight, InternalUtils.encodeUint64Array(InternalUtils.mapArray(htlc_descriptors, htlc_descriptors_conv_16 => htlc_descriptors_conv_16 == null ? 0 : htlc_descriptors_conv_16.ptr)), tx_lock_time); + public static BumpTransactionEvent htlcresolution(org.ldk.structs.ChannelId channel_id, byte[] counterparty_node_id, byte[] claim_id, int target_feerate_sat_per_1000_weight, HTLCDescriptor[] htlc_descriptors, int tx_lock_time) { + long ret = bindings.BumpTransactionEvent_htlcresolution(channel_id.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_node_id, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(claim_id, 32)), target_feerate_sat_per_1000_weight, InternalUtils.encodeUint64Array(InternalUtils.mapArray(htlc_descriptors, htlc_descriptors_conv_16 => htlc_descriptors_conv_16.ptr)), tx_lock_time); + GC.KeepAlive(channel_id); + GC.KeepAlive(counterparty_node_id); GC.KeepAlive(claim_id); GC.KeepAlive(target_feerate_sat_per_1000_weight); GC.KeepAlive(htlc_descriptors); @@ -178,6 +213,7 @@ public class BumpTransactionEvent : CommonBase { if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.BumpTransactionEvent ret_hu_conv = org.ldk.structs.BumpTransactionEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id); }; foreach (HTLCDescriptor htlc_descriptors_conv_16 in htlc_descriptors) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(htlc_descriptors_conv_16); }; }; return ret_hu_conv; } @@ -187,7 +223,7 @@ public class BumpTransactionEvent : CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public bool eq(org.ldk.structs.BumpTransactionEvent b) { - bool ret = bindings.BumpTransactionEvent_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.BumpTransactionEvent_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); return ret; diff --git a/c_sharp/src/org/ldk/structs/BumpTransactionEventHandler.cs b/c_sharp/src/org/ldk/structs/BumpTransactionEventHandler.cs index 08202f7b..9fbf9ee7 100644 --- a/c_sharp/src/org/ldk/structs/BumpTransactionEventHandler.cs +++ b/c_sharp/src/org/ldk/structs/BumpTransactionEventHandler.cs @@ -44,7 +44,7 @@ public class BumpTransactionEventHandler : CommonBase { * Handles all variants of [`BumpTransactionEvent`]. */ public void handle_event(org.ldk.structs.BumpTransactionEvent _event) { - bindings.BumpTransactionEventHandler_handle_event(this.ptr, _event == null ? 0 : _event.ptr); + bindings.BumpTransactionEventHandler_handle_event(this.ptr, _event.ptr); GC.KeepAlive(this); GC.KeepAlive(_event); } diff --git a/c_sharp/src/org/ldk/structs/CandidateRouteHop.cs b/c_sharp/src/org/ldk/structs/CandidateRouteHop.cs index 39a5020a..766d93b4 100644 --- a/c_sharp/src/org/ldk/structs/CandidateRouteHop.cs +++ b/c_sharp/src/org/ldk/structs/CandidateRouteHop.cs @@ -102,7 +102,7 @@ public class CandidateRouteHop : CommonBase { * Utility method to constructs a new FirstHop-variant CandidateRouteHop */ public static CandidateRouteHop first_hop(org.ldk.structs.FirstHopCandidate a) { - long ret = bindings.CandidateRouteHop_first_hop(a == null ? 0 : a.ptr); + long ret = bindings.CandidateRouteHop_first_hop(a.ptr); GC.KeepAlive(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.CandidateRouteHop ret_hu_conv = org.ldk.structs.CandidateRouteHop.constr_from_ptr(ret); @@ -115,7 +115,7 @@ public class CandidateRouteHop : CommonBase { * Utility method to constructs a new PublicHop-variant CandidateRouteHop */ public static CandidateRouteHop public_hop(org.ldk.structs.PublicHopCandidate a) { - long ret = bindings.CandidateRouteHop_public_hop(a == null ? 0 : a.ptr); + long ret = bindings.CandidateRouteHop_public_hop(a.ptr); GC.KeepAlive(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.CandidateRouteHop ret_hu_conv = org.ldk.structs.CandidateRouteHop.constr_from_ptr(ret); @@ -128,7 +128,7 @@ public class CandidateRouteHop : CommonBase { * Utility method to constructs a new PrivateHop-variant CandidateRouteHop */ public static CandidateRouteHop private_hop(org.ldk.structs.PrivateHopCandidate a) { - long ret = bindings.CandidateRouteHop_private_hop(a == null ? 0 : a.ptr); + long ret = bindings.CandidateRouteHop_private_hop(a.ptr); GC.KeepAlive(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.CandidateRouteHop ret_hu_conv = org.ldk.structs.CandidateRouteHop.constr_from_ptr(ret); @@ -141,7 +141,7 @@ public class CandidateRouteHop : CommonBase { * Utility method to constructs a new Blinded-variant CandidateRouteHop */ public static CandidateRouteHop blinded(org.ldk.structs.BlindedPathCandidate a) { - long ret = bindings.CandidateRouteHop_blinded(a == null ? 0 : a.ptr); + long ret = bindings.CandidateRouteHop_blinded(a.ptr); GC.KeepAlive(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.CandidateRouteHop ret_hu_conv = org.ldk.structs.CandidateRouteHop.constr_from_ptr(ret); @@ -154,7 +154,7 @@ public class CandidateRouteHop : CommonBase { * Utility method to constructs a new OneHopBlinded-variant CandidateRouteHop */ public static CandidateRouteHop one_hop_blinded(org.ldk.structs.OneHopBlindedPathCandidate a) { - long ret = bindings.CandidateRouteHop_one_hop_blinded(a == null ? 0 : a.ptr); + long ret = bindings.CandidateRouteHop_one_hop_blinded(a.ptr); GC.KeepAlive(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.CandidateRouteHop ret_hu_conv = org.ldk.structs.CandidateRouteHop.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/ChainMonitor.cs b/c_sharp/src/org/ldk/structs/ChainMonitor.cs index b3285516..f52ce0f3 100644 --- a/c_sharp/src/org/ldk/structs/ChainMonitor.cs +++ b/c_sharp/src/org/ldk/structs/ChainMonitor.cs @@ -69,7 +69,7 @@ public class ChainMonitor : CommonBase { * inclusion in the return value. */ public Balance[] get_claimable_balances(ChannelDetails[] ignored_channels) { - long ret = bindings.ChainMonitor_get_claimable_balances(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(ignored_channels, ignored_channels_conv_16 => ignored_channels_conv_16 == null ? 0 : ignored_channels_conv_16.ptr))); + long ret = bindings.ChainMonitor_get_claimable_balances(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(ignored_channels, ignored_channels_conv_16 => ignored_channels_conv_16.ptr))); GC.KeepAlive(this); GC.KeepAlive(ignored_channels); if (ret >= 0 && ret <= 4096) { return null; } @@ -94,7 +94,7 @@ public class ChainMonitor : CommonBase { * indefinitely. */ public Result_LockedChannelMonitorNoneZ get_monitor(org.ldk.structs.OutPoint funding_txo) { - long ret = bindings.ChainMonitor_get_monitor(this.ptr, funding_txo == null ? 0 : funding_txo.ptr); + long ret = bindings.ChainMonitor_get_monitor(this.ptr, funding_txo.ptr); GC.KeepAlive(this); GC.KeepAlive(funding_txo); if (ret >= 0 && ret <= 4096) { return null; } @@ -104,25 +104,25 @@ public class ChainMonitor : CommonBase { } /** - * Lists the funding outpoint of each [`ChannelMonitor`] being monitored. + * Lists the funding outpoint and channel ID of each [`ChannelMonitor`] being monitored. * * Note that [`ChannelMonitor`]s are not removed when a channel is closed as they are always * monitoring for on-chain state resolutions. */ - public OutPoint[] list_monitors() { + public TwoTuple_OutPointChannelIdZ[] list_monitors() { long ret = bindings.ChainMonitor_list_monitors(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - int ret_conv_10_len = InternalUtils.getArrayLength(ret); - OutPoint[] ret_conv_10_arr = new OutPoint[ret_conv_10_len]; - for (int k = 0; k < ret_conv_10_len; k++) { - long ret_conv_10 = InternalUtils.getU64ArrayElem(ret, k); - org.ldk.structs.OutPoint ret_conv_10_hu_conv = null; if (ret_conv_10 < 0 || ret_conv_10 > 4096) { ret_conv_10_hu_conv = new org.ldk.structs.OutPoint(null, ret_conv_10); } - if (ret_conv_10_hu_conv != null) { ret_conv_10_hu_conv.ptrs_to.AddLast(this); }; - ret_conv_10_arr[k] = ret_conv_10_hu_conv; + int ret_conv_29_len = InternalUtils.getArrayLength(ret); + TwoTuple_OutPointChannelIdZ[] ret_conv_29_arr = new TwoTuple_OutPointChannelIdZ[ret_conv_29_len]; + for (int d = 0; d < ret_conv_29_len; d++) { + long ret_conv_29 = InternalUtils.getU64ArrayElem(ret, d); + TwoTuple_OutPointChannelIdZ ret_conv_29_hu_conv = new TwoTuple_OutPointChannelIdZ(null, ret_conv_29); + if (ret_conv_29_hu_conv != null) { ret_conv_29_hu_conv.ptrs_to.AddLast(this); }; + ret_conv_29_arr[d] = ret_conv_29_hu_conv; } bindings.free_buffer(ret); - return ret_conv_10_arr; + return ret_conv_29_arr; } /** @@ -160,7 +160,7 @@ public class ChainMonitor : CommonBase { * registered [`ChannelMonitor`]s. */ public Result_NoneAPIErrorZ channel_monitor_updated(org.ldk.structs.OutPoint funding_txo, org.ldk.structs.MonitorUpdateId completed_update_id) { - long ret = bindings.ChainMonitor_channel_monitor_updated(this.ptr, funding_txo == null ? 0 : funding_txo.ptr, completed_update_id == null ? 0 : completed_update_id.ptr); + long ret = bindings.ChainMonitor_channel_monitor_updated(this.ptr, funding_txo.ptr, completed_update_id.ptr); GC.KeepAlive(this); GC.KeepAlive(funding_txo); GC.KeepAlive(completed_update_id); @@ -202,6 +202,37 @@ public class ChainMonitor : CommonBase { GC.KeepAlive(this); } + /** + * Triggers rebroadcasts of pending claims from force-closed channels after a transaction + * signature generation failure. + * + * `monitor_opt` can be used as a filter to only trigger them for a specific channel monitor. + * + * Note that monitor_opt (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public void signer_unblocked(org.ldk.structs.OutPoint monitor_opt) { + bindings.ChainMonitor_signer_unblocked(this.ptr, monitor_opt == null ? 0 : monitor_opt.ptr); + GC.KeepAlive(this); + GC.KeepAlive(monitor_opt); + if (this != null) { this.ptrs_to.AddLast(monitor_opt); }; + } + + /** + * Archives fully resolved channel monitors by calling [`Persist::archive_persisted_channel`]. + * + * This is useful for pruning fully resolved monitors from the monitor set and primary + * storage so they are not kept in memory and reloaded on restart. + * + * Should be called occasionally (once every handful of blocks or on startup). + * + * Depending on the implementation of [`Persist::archive_persisted_channel`] the monitor + * data could be moved to an archive location or removed entirely. + */ + public void archive_fully_resolved_channel_monitors() { + bindings.ChainMonitor_archive_fully_resolved_channel_monitors(this.ptr); + GC.KeepAlive(this); + } + /** * Constructs a new Listen which calls the relevant methods on this_arg. * This copies the `inner` pointer in this_arg and thus the returned Listen must be freed before this_arg is diff --git a/c_sharp/src/org/ldk/structs/ChainParameters.cs b/c_sharp/src/org/ldk/structs/ChainParameters.cs index 2341a1ec..59e2af07 100644 --- a/c_sharp/src/org/ldk/structs/ChainParameters.cs +++ b/c_sharp/src/org/ldk/structs/ChainParameters.cs @@ -57,7 +57,7 @@ public class ChainParameters : CommonBase { * Used to track on-chain channel funding outputs and send payments with reliable timelocks. */ public void set_best_block(org.ldk.structs.BestBlock val) { - bindings.ChainParameters_set_best_block(this.ptr, val == null ? 0 : val.ptr); + bindings.ChainParameters_set_best_block(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -67,7 +67,7 @@ public class ChainParameters : CommonBase { * Constructs a new ChainParameters given each field */ public static ChainParameters of(Network network_arg, org.ldk.structs.BestBlock best_block_arg) { - long ret = bindings.ChainParameters_new(network_arg, best_block_arg == null ? 0 : best_block_arg.ptr); + long ret = bindings.ChainParameters_new(network_arg, best_block_arg.ptr); GC.KeepAlive(network_arg); GC.KeepAlive(best_block_arg); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/c_sharp/src/org/ldk/structs/ChangeDestinationSource.cs b/c_sharp/src/org/ldk/structs/ChangeDestinationSource.cs new file mode 100644 index 00000000..fa7ffba7 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/ChangeDestinationSource.cs @@ -0,0 +1,76 @@ + +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + + + +/** An implementation of ChangeDestinationSource */ +public interface ChangeDestinationSourceInterface { + /**Returns a script pubkey which can be used as a change destination for + * [`OutputSpender::spend_spendable_outputs`]. + * + * This method should return a different value each time it is called, to avoid linking + * on-chain funds controlled to the same user. + */ + Result_CVec_u8ZNoneZ get_change_destination_script(); +} + +/** + * A helper trait that describes an on-chain wallet capable of returning a (change) destination + * script. + */ +public class ChangeDestinationSource : CommonBase { + internal bindings.LDKChangeDestinationSource bindings_instance; + internal long instance_idx; + + internal ChangeDestinationSource(object _dummy, long ptr) : base(ptr) { bindings_instance = null; } + ~ChangeDestinationSource() { + if (ptr != 0) { bindings.ChangeDestinationSource_free(ptr); } + } + + private class LDKChangeDestinationSourceHolder { internal ChangeDestinationSource held; } + private class LDKChangeDestinationSourceImpl : bindings.LDKChangeDestinationSource { + internal LDKChangeDestinationSourceImpl(ChangeDestinationSourceInterface arg, LDKChangeDestinationSourceHolder impl_holder) { this.arg = arg; this.impl_holder = impl_holder; } + private ChangeDestinationSourceInterface arg; + private LDKChangeDestinationSourceHolder impl_holder; + public long get_change_destination_script() { + Result_CVec_u8ZNoneZ ret = arg.get_change_destination_script(); + GC.KeepAlive(arg); + long result = ret.clone_ptr(); + return result; + } + } + + /** Creates a new instance of ChangeDestinationSource from a given implementation */ + public static ChangeDestinationSource new_impl(ChangeDestinationSourceInterface arg) { + LDKChangeDestinationSourceHolder impl_holder = new LDKChangeDestinationSourceHolder(); + LDKChangeDestinationSourceImpl impl = new LDKChangeDestinationSourceImpl(arg, impl_holder); + long[] ptr_idx = bindings.LDKChangeDestinationSource_new(impl); + + impl_holder.held = new ChangeDestinationSource(null, ptr_idx[0]); + impl_holder.held.instance_idx = ptr_idx[1]; + impl_holder.held.bindings_instance = impl; + return impl_holder.held; + } + + /** + * Returns a script pubkey which can be used as a change destination for + * [`OutputSpender::spend_spendable_outputs`]. + * + * This method should return a different value each time it is called, to avoid linking + * on-chain funds controlled to the same user. + */ + public Result_CVec_u8ZNoneZ get_change_destination_script() { + long ret = bindings.ChangeDestinationSource_get_change_destination_script(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_CVec_u8ZNoneZ ret_hu_conv = Result_CVec_u8ZNoneZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/ChannelAnnouncement.cs b/c_sharp/src/org/ldk/structs/ChannelAnnouncement.cs index 33682123..af7d0859 100644 --- a/c_sharp/src/org/ldk/structs/ChannelAnnouncement.cs +++ b/c_sharp/src/org/ldk/structs/ChannelAnnouncement.cs @@ -113,7 +113,7 @@ public class ChannelAnnouncement : CommonBase { * The actual announcement */ public void set_contents(org.ldk.structs.UnsignedChannelAnnouncement val) { - bindings.ChannelAnnouncement_set_contents(this.ptr, val == null ? 0 : val.ptr); + bindings.ChannelAnnouncement_set_contents(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -123,7 +123,7 @@ public class ChannelAnnouncement : CommonBase { * Constructs a new ChannelAnnouncement given each field */ public static ChannelAnnouncement of(byte[] node_signature_1_arg, byte[] node_signature_2_arg, byte[] bitcoin_signature_1_arg, byte[] bitcoin_signature_2_arg, org.ldk.structs.UnsignedChannelAnnouncement contents_arg) { - long ret = bindings.ChannelAnnouncement_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_signature_1_arg, 64)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_signature_2_arg, 64)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(bitcoin_signature_1_arg, 64)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(bitcoin_signature_2_arg, 64)), contents_arg == null ? 0 : contents_arg.ptr); + long ret = bindings.ChannelAnnouncement_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_signature_1_arg, 64)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_signature_2_arg, 64)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(bitcoin_signature_1_arg, 64)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(bitcoin_signature_2_arg, 64)), contents_arg.ptr); GC.KeepAlive(node_signature_1_arg); GC.KeepAlive(node_signature_2_arg); GC.KeepAlive(bitcoin_signature_1_arg); @@ -172,7 +172,7 @@ public class ChannelAnnouncement : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.ChannelAnnouncement b) { - bool ret = bindings.ChannelAnnouncement_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.ChannelAnnouncement_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/ChannelConfig.cs b/c_sharp/src/org/ldk/structs/ChannelConfig.cs index 9f86419e..a541b2e4 100644 --- a/c_sharp/src/org/ldk/structs/ChannelConfig.cs +++ b/c_sharp/src/org/ldk/structs/ChannelConfig.cs @@ -139,13 +139,16 @@ public class ChannelConfig : CommonBase { } /** - * Limit our total exposure to in-flight HTLCs which are burned to fees as they are too - * small to claim on-chain. + * Limit our total exposure to potential loss to on-chain fees on close, including in-flight + * HTLCs which are burned to fees as they are too small to claim on-chain and fees on + * commitment transaction(s) broadcasted by our counterparty in excess of our own fee estimate. + * + * # HTLC-based Dust Exposure * * When an HTLC present in one of our channels is below a \"dust\" threshold, the HTLC will * not be claimable on-chain, instead being turned into additional miner fees if either * party force-closes the channel. Because the threshold is per-HTLC, our total exposure - * to such payments may be sustantial if there are many dust HTLCs present when the + * to such payments may be substantial if there are many dust HTLCs present when the * channel is force-closed. * * The dust threshold for each HTLC is based on the `dust_limit_satoshis` for each party in a @@ -159,7 +162,37 @@ public class ChannelConfig : CommonBase { * The selected limit is applied for sent, forwarded, and received HTLCs and limits the total * exposure across all three types per-channel. * - * Default value: [`MaxDustHTLCExposure::FeeRateMultiplier`] with a multiplier of 5000. + * # Transaction Fee Dust Exposure + * + * Further, counterparties broadcasting a commitment transaction in a force-close may result + * in other balance being burned to fees, and thus all fees on commitment and HTLC + * transactions in excess of our local fee estimates are included in the dust calculation. + * + * Because of this, another way to look at this limit is to divide it by 43,000 (or 218,750 + * for non-anchor channels) and see it as the maximum feerate disagreement (in sats/vB) per + * non-dust HTLC we're allowed to have with our peers before risking a force-closure for + * inbound channels. + * + * Thus, for the default value of 10_000 * a current feerate estimate of 10 sat/vB (or 2,500 + * sat/KW), we risk force-closure if we disagree with our peer by: + * `10_000 * 2_500 / 43_000 / (483*2)` = 0.6 sat/vB for anchor channels with 483 HTLCs in + * both directions (the maximum), + * `10_000 * 2_500 / 43_000 / (50*2)` = 5.8 sat/vB for anchor channels with 50 HTLCs in both + * directions (the LDK default max from [`ChannelHandshakeConfig::our_max_accepted_htlcs`]) + * `10_000 * 2_500 / 218_750 / (483*2)` = 0.1 sat/vB for non-anchor channels with 483 HTLCs + * in both directions (the maximum), + * `10_000 * 2_500 / 218_750 / (50*2)` = 1.1 sat/vB for non-anchor channels with 50 HTLCs + * in both (the LDK default maximum from [`ChannelHandshakeConfig::our_max_accepted_htlcs`]) + * + * Note that when using [`MaxDustHTLCExposure::FeeRateMultiplier`] this maximum disagreement + * will scale linearly with increases (or decreases) in the our feerate estimates. Further, + * for anchor channels we expect our counterparty to use a relatively low feerate estimate + * while we use [`ConfirmationTarget::OnChainSweep`] (which should be relatively high) and + * feerate disagreement force-closures should only occur when theirs is higher than ours. + * + * Default value: [`MaxDustHTLCExposure::FeeRateMultiplier`] with a multiplier of 10_000. + * + * [`ConfirmationTarget::OnChainSweep`]: crate::chain::chaininterface::ConfirmationTarget::OnChainSweep */ public MaxDustHTLCExposure get_max_dust_htlc_exposure() { long ret = bindings.ChannelConfig_get_max_dust_htlc_exposure(this.ptr); @@ -171,13 +204,16 @@ public class ChannelConfig : CommonBase { } /** - * Limit our total exposure to in-flight HTLCs which are burned to fees as they are too - * small to claim on-chain. + * Limit our total exposure to potential loss to on-chain fees on close, including in-flight + * HTLCs which are burned to fees as they are too small to claim on-chain and fees on + * commitment transaction(s) broadcasted by our counterparty in excess of our own fee estimate. + * + * # HTLC-based Dust Exposure * * When an HTLC present in one of our channels is below a \"dust\" threshold, the HTLC will * not be claimable on-chain, instead being turned into additional miner fees if either * party force-closes the channel. Because the threshold is per-HTLC, our total exposure - * to such payments may be sustantial if there are many dust HTLCs present when the + * to such payments may be substantial if there are many dust HTLCs present when the * channel is force-closed. * * The dust threshold for each HTLC is based on the `dust_limit_satoshis` for each party in a @@ -191,7 +227,37 @@ public class ChannelConfig : CommonBase { * The selected limit is applied for sent, forwarded, and received HTLCs and limits the total * exposure across all three types per-channel. * - * Default value: [`MaxDustHTLCExposure::FeeRateMultiplier`] with a multiplier of 5000. + * # Transaction Fee Dust Exposure + * + * Further, counterparties broadcasting a commitment transaction in a force-close may result + * in other balance being burned to fees, and thus all fees on commitment and HTLC + * transactions in excess of our local fee estimates are included in the dust calculation. + * + * Because of this, another way to look at this limit is to divide it by 43,000 (or 218,750 + * for non-anchor channels) and see it as the maximum feerate disagreement (in sats/vB) per + * non-dust HTLC we're allowed to have with our peers before risking a force-closure for + * inbound channels. + * + * Thus, for the default value of 10_000 * a current feerate estimate of 10 sat/vB (or 2,500 + * sat/KW), we risk force-closure if we disagree with our peer by: + * `10_000 * 2_500 / 43_000 / (483*2)` = 0.6 sat/vB for anchor channels with 483 HTLCs in + * both directions (the maximum), + * `10_000 * 2_500 / 43_000 / (50*2)` = 5.8 sat/vB for anchor channels with 50 HTLCs in both + * directions (the LDK default max from [`ChannelHandshakeConfig::our_max_accepted_htlcs`]) + * `10_000 * 2_500 / 218_750 / (483*2)` = 0.1 sat/vB for non-anchor channels with 483 HTLCs + * in both directions (the maximum), + * `10_000 * 2_500 / 218_750 / (50*2)` = 1.1 sat/vB for non-anchor channels with 50 HTLCs + * in both (the LDK default maximum from [`ChannelHandshakeConfig::our_max_accepted_htlcs`]) + * + * Note that when using [`MaxDustHTLCExposure::FeeRateMultiplier`] this maximum disagreement + * will scale linearly with increases (or decreases) in the our feerate estimates. Further, + * for anchor channels we expect our counterparty to use a relatively low feerate estimate + * while we use [`ConfirmationTarget::OnChainSweep`] (which should be relatively high) and + * feerate disagreement force-closures should only occur when theirs is higher than ours. + * + * Default value: [`MaxDustHTLCExposure::FeeRateMultiplier`] with a multiplier of 10_000. + * + * [`ConfirmationTarget::OnChainSweep`]: crate::chain::chaininterface::ConfirmationTarget::OnChainSweep */ public void set_max_dust_htlc_exposure(org.ldk.structs.MaxDustHTLCExposure val) { bindings.ChannelConfig_set_max_dust_htlc_exposure(this.ptr, val.ptr); @@ -380,7 +446,7 @@ public class ChannelConfig : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.ChannelConfig b) { - bool ret = bindings.ChannelConfig_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.ChannelConfig_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; @@ -395,7 +461,7 @@ public class ChannelConfig : CommonBase { * Applies the given [`ChannelConfigUpdate`] as a partial update to the [`ChannelConfig`]. */ public void apply(org.ldk.structs.ChannelConfigUpdate update) { - bindings.ChannelConfig_apply(this.ptr, update == null ? 0 : update.ptr); + bindings.ChannelConfig_apply(this.ptr, update.ptr); GC.KeepAlive(this); GC.KeepAlive(update); if (this != null) { this.ptrs_to.AddLast(update); }; diff --git a/c_sharp/src/org/ldk/structs/ChannelCounterparty.cs b/c_sharp/src/org/ldk/structs/ChannelCounterparty.cs index c994ea6c..7768ddf9 100644 --- a/c_sharp/src/org/ldk/structs/ChannelCounterparty.cs +++ b/c_sharp/src/org/ldk/structs/ChannelCounterparty.cs @@ -56,7 +56,7 @@ public class ChannelCounterparty : CommonBase { * many routing-relevant features are present in the init context. */ public void set_features(org.ldk.structs.InitFeatures val) { - bindings.ChannelCounterparty_set_features(this.ptr, val == null ? 0 : val.ptr); + bindings.ChannelCounterparty_set_features(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -174,7 +174,7 @@ public class ChannelCounterparty : CommonBase { * Note that forwarding_info_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ public static ChannelCounterparty of(byte[] node_id_arg, org.ldk.structs.InitFeatures features_arg, long unspendable_punishment_reserve_arg, org.ldk.structs.CounterpartyForwardingInfo forwarding_info_arg, org.ldk.structs.Option_u64Z outbound_htlc_minimum_msat_arg, org.ldk.structs.Option_u64Z outbound_htlc_maximum_msat_arg) { - long ret = bindings.ChannelCounterparty_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id_arg, 33)), features_arg == null ? 0 : features_arg.ptr, unspendable_punishment_reserve_arg, forwarding_info_arg == null ? 0 : forwarding_info_arg.ptr, outbound_htlc_minimum_msat_arg.ptr, outbound_htlc_maximum_msat_arg.ptr); + long ret = bindings.ChannelCounterparty_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id_arg, 33)), features_arg.ptr, unspendable_punishment_reserve_arg, forwarding_info_arg == null ? 0 : forwarding_info_arg.ptr, outbound_htlc_minimum_msat_arg.ptr, outbound_htlc_maximum_msat_arg.ptr); GC.KeepAlive(node_id_arg); GC.KeepAlive(features_arg); GC.KeepAlive(unspendable_punishment_reserve_arg); diff --git a/c_sharp/src/org/ldk/structs/ChannelDerivationParameters.cs b/c_sharp/src/org/ldk/structs/ChannelDerivationParameters.cs index 0b0d2d1d..79775c84 100644 --- a/c_sharp/src/org/ldk/structs/ChannelDerivationParameters.cs +++ b/c_sharp/src/org/ldk/structs/ChannelDerivationParameters.cs @@ -71,7 +71,7 @@ public class ChannelDerivationParameters : CommonBase { * [`ChannelSigner::provide_channel_parameters`]. */ public void set_transaction_parameters(org.ldk.structs.ChannelTransactionParameters val) { - bindings.ChannelDerivationParameters_set_transaction_parameters(this.ptr, val == null ? 0 : val.ptr); + bindings.ChannelDerivationParameters_set_transaction_parameters(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -81,7 +81,7 @@ public class ChannelDerivationParameters : CommonBase { * Constructs a new ChannelDerivationParameters given each field */ public static ChannelDerivationParameters of(long value_satoshis_arg, byte[] keys_id_arg, org.ldk.structs.ChannelTransactionParameters transaction_parameters_arg) { - long ret = bindings.ChannelDerivationParameters_new(value_satoshis_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(keys_id_arg, 32)), transaction_parameters_arg == null ? 0 : transaction_parameters_arg.ptr); + long ret = bindings.ChannelDerivationParameters_new(value_satoshis_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(keys_id_arg, 32)), transaction_parameters_arg.ptr); GC.KeepAlive(value_satoshis_arg); GC.KeepAlive(keys_id_arg); GC.KeepAlive(transaction_parameters_arg); @@ -116,7 +116,7 @@ public class ChannelDerivationParameters : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.ChannelDerivationParameters b) { - bool ret = bindings.ChannelDerivationParameters_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.ChannelDerivationParameters_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/ChannelDetails.cs b/c_sharp/src/org/ldk/structs/ChannelDetails.cs index dfaa9e4d..2295e2ea 100644 --- a/c_sharp/src/org/ldk/structs/ChannelDetails.cs +++ b/c_sharp/src/org/ldk/structs/ChannelDetails.cs @@ -21,12 +21,13 @@ public class ChannelDetails : CommonBase { * Note that this means this value is *not* persistent - it can change once during the * lifetime of the channel. */ - public byte[] get_channel_id() { + public ChannelId get_channel_id() { long ret = bindings.ChannelDetails_get_channel_id(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** @@ -35,10 +36,11 @@ public class ChannelDetails : CommonBase { * Note that this means this value is *not* persistent - it can change once during the * lifetime of the channel. */ - public void set_channel_id(byte[] val) { - bindings.ChannelDetails_set_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.ChannelDetails_set_channel_id(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** @@ -57,7 +59,7 @@ public class ChannelDetails : CommonBase { * Parameters which apply to our counterparty. See individual fields for more information. */ public void set_counterparty(org.ldk.structs.ChannelCounterparty val) { - bindings.ChannelDetails_set_counterparty(this.ptr, val == null ? 0 : val.ptr); + bindings.ChannelDetails_set_counterparty(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -67,9 +69,6 @@ public class ChannelDetails : CommonBase { * The Channel's funding transaction output, if we've negotiated the funding transaction with * our counterparty already. * - * Note that, if this has been set, `channel_id` will be equivalent to - * `funding_txo.unwrap().to_channel_id()`. - * * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ public OutPoint get_funding_txo() { @@ -85,9 +84,6 @@ public class ChannelDetails : CommonBase { * The Channel's funding transaction output, if we've negotiated the funding transaction with * our counterparty already. * - * Note that, if this has been set, `channel_id` will be equivalent to - * `funding_txo.unwrap().to_channel_id()`. - * * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None */ public void set_funding_txo(org.ldk.structs.OutPoint val) { @@ -825,63 +821,6 @@ public class ChannelDetails : CommonBase { if (this != null) { this.ptrs_to.AddLast(val); }; } - /** - * Constructs a new ChannelDetails given each field - * - * Note that funding_txo_arg (or a relevant inner pointer) may be NULL or all-0s to represent None - * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None - * Note that config_arg (or a relevant inner pointer) may be NULL or all-0s to represent None - */ - public static ChannelDetails of(byte[] channel_id_arg, org.ldk.structs.ChannelCounterparty counterparty_arg, org.ldk.structs.OutPoint funding_txo_arg, org.ldk.structs.ChannelTypeFeatures channel_type_arg, org.ldk.structs.Option_u64Z short_channel_id_arg, org.ldk.structs.Option_u64Z outbound_scid_alias_arg, org.ldk.structs.Option_u64Z inbound_scid_alias_arg, long channel_value_satoshis_arg, org.ldk.structs.Option_u64Z unspendable_punishment_reserve_arg, org.ldk.util.UInt128 user_channel_id_arg, org.ldk.structs.Option_u32Z feerate_sat_per_1000_weight_arg, long balance_msat_arg, long outbound_capacity_msat_arg, long next_outbound_htlc_limit_msat_arg, long next_outbound_htlc_minimum_msat_arg, long inbound_capacity_msat_arg, org.ldk.structs.Option_u32Z confirmations_required_arg, org.ldk.structs.Option_u32Z confirmations_arg, org.ldk.structs.Option_u16Z force_close_spend_delay_arg, bool is_outbound_arg, bool is_channel_ready_arg, org.ldk.structs.Option_ChannelShutdownStateZ channel_shutdown_state_arg, bool is_usable_arg, bool is_public_arg, org.ldk.structs.Option_u64Z inbound_htlc_minimum_msat_arg, org.ldk.structs.Option_u64Z inbound_htlc_maximum_msat_arg, org.ldk.structs.ChannelConfig config_arg) { - long ret = bindings.ChannelDetails_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id_arg, 32)), counterparty_arg == null ? 0 : counterparty_arg.ptr, funding_txo_arg == null ? 0 : funding_txo_arg.ptr, channel_type_arg == null ? 0 : channel_type_arg.ptr, short_channel_id_arg.ptr, outbound_scid_alias_arg.ptr, inbound_scid_alias_arg.ptr, channel_value_satoshis_arg, unspendable_punishment_reserve_arg.ptr, InternalUtils.encodeUint8Array(user_channel_id_arg.getLEBytes()), feerate_sat_per_1000_weight_arg.ptr, balance_msat_arg, outbound_capacity_msat_arg, next_outbound_htlc_limit_msat_arg, next_outbound_htlc_minimum_msat_arg, inbound_capacity_msat_arg, confirmations_required_arg.ptr, confirmations_arg.ptr, force_close_spend_delay_arg.ptr, is_outbound_arg, is_channel_ready_arg, channel_shutdown_state_arg.ptr, is_usable_arg, is_public_arg, inbound_htlc_minimum_msat_arg.ptr, inbound_htlc_maximum_msat_arg.ptr, config_arg == null ? 0 : config_arg.ptr); - GC.KeepAlive(channel_id_arg); - GC.KeepAlive(counterparty_arg); - GC.KeepAlive(funding_txo_arg); - GC.KeepAlive(channel_type_arg); - GC.KeepAlive(short_channel_id_arg); - GC.KeepAlive(outbound_scid_alias_arg); - GC.KeepAlive(inbound_scid_alias_arg); - GC.KeepAlive(channel_value_satoshis_arg); - GC.KeepAlive(unspendable_punishment_reserve_arg); - GC.KeepAlive(user_channel_id_arg); - GC.KeepAlive(feerate_sat_per_1000_weight_arg); - GC.KeepAlive(balance_msat_arg); - GC.KeepAlive(outbound_capacity_msat_arg); - GC.KeepAlive(next_outbound_htlc_limit_msat_arg); - GC.KeepAlive(next_outbound_htlc_minimum_msat_arg); - GC.KeepAlive(inbound_capacity_msat_arg); - GC.KeepAlive(confirmations_required_arg); - GC.KeepAlive(confirmations_arg); - GC.KeepAlive(force_close_spend_delay_arg); - GC.KeepAlive(is_outbound_arg); - GC.KeepAlive(is_channel_ready_arg); - GC.KeepAlive(channel_shutdown_state_arg); - GC.KeepAlive(is_usable_arg); - GC.KeepAlive(is_public_arg); - GC.KeepAlive(inbound_htlc_minimum_msat_arg); - GC.KeepAlive(inbound_htlc_maximum_msat_arg); - GC.KeepAlive(config_arg); - if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.ChannelDetails ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelDetails(null, ret); } - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(counterparty_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(funding_txo_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_type_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(short_channel_id_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(outbound_scid_alias_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(inbound_scid_alias_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(unspendable_punishment_reserve_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(feerate_sat_per_1000_weight_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(confirmations_required_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(confirmations_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(force_close_spend_delay_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_shutdown_state_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(inbound_htlc_minimum_msat_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(inbound_htlc_maximum_msat_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(config_arg); }; - return ret_hu_conv; - } - internal long clone_ptr() { long ret = bindings.ChannelDetails_clone_ptr(this.ptr); GC.KeepAlive(this); diff --git a/c_sharp/src/org/ldk/structs/ChannelFeatures.cs b/c_sharp/src/org/ldk/structs/ChannelFeatures.cs index d6e08e34..29956b15 100644 --- a/c_sharp/src/org/ldk/structs/ChannelFeatures.cs +++ b/c_sharp/src/org/ldk/structs/ChannelFeatures.cs @@ -21,7 +21,7 @@ public class ChannelFeatures : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.ChannelFeatures b) { - bool ret = bindings.ChannelFeatures_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.ChannelFeatures_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; @@ -77,7 +77,7 @@ public class ChannelFeatures : CommonBase { * Returns true if this `Features` object contains required features unknown by `other`. */ public bool requires_unknown_bits_from(org.ldk.structs.ChannelFeatures other) { - bool ret = bindings.ChannelFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr); + bool ret = bindings.ChannelFeatures_requires_unknown_bits_from(this.ptr, other.ptr); GC.KeepAlive(this); GC.KeepAlive(other); if (this != null) { this.ptrs_to.AddLast(other); }; diff --git a/c_sharp/src/org/ldk/structs/ChannelId.cs b/c_sharp/src/org/ldk/structs/ChannelId.cs new file mode 100644 index 00000000..466e7271 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/ChannelId.cs @@ -0,0 +1,224 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + + +/** + * A unique 32-byte identifier for a channel. + * Depending on how the ID is generated, several varieties are distinguished + * (but all are stored as 32 bytes): + * _v1_ and _temporary_. + * A _v1_ channel ID is generated based on funding tx outpoint (txid & index). + * A _temporary_ ID is generated randomly. + * (Later revocation-point-based _v2_ is a possibility.) + * The variety (context) is not stored, it is relevant only at creation. + */ +public class ChannelId : CommonBase { + internal ChannelId(object _dummy, long ptr) : base(ptr) { } + ~ChannelId() { + if (ptr != 0) { bindings.ChannelId_free(ptr); } + } + + public byte[] get_a() { + long ret = bindings.ChannelId_get_a(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + + public void set_a(byte[] val) { + bindings.ChannelId_set_a(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * Constructs a new ChannelId given each field + */ + public static ChannelId of(byte[] a_arg) { + long ret = bindings.ChannelId_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(a_arg, 32))); + GC.KeepAlive(a_arg); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + + internal long clone_ptr() { + long ret = bindings.ChannelId_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a copy of the ChannelId + */ + public ChannelId clone() { + long ret = bindings.ChannelId_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Checks if two ChannelIds contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ + public bool eq(org.ldk.structs.ChannelId b) { + bool ret = bindings.ChannelId_eq(this.ptr, b.ptr); + GC.KeepAlive(this); + GC.KeepAlive(b); + if (this != null) { this.ptrs_to.AddLast(b); }; + return ret; + } + + public override bool Equals(object o) { + if (!(o is ChannelId)) return false; + return this.eq((ChannelId)o); + } + /** + * Generates a non-cryptographic 64-bit hash of the ChannelId. + */ + public long hash() { + long ret = bindings.ChannelId_hash(this.ptr); + GC.KeepAlive(this); + return ret; + } + + public override int GetHashCode() { + return (int)this.hash(); + } + /** + * Create _v1_ channel ID based on a funding TX ID and output index + */ + public static ChannelId v1_from_funding_txid(byte[] txid, short output_index) { + long ret = bindings.ChannelId_v1_from_funding_txid(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(txid, 32)), output_index); + GC.KeepAlive(txid); + GC.KeepAlive(output_index); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Create _v1_ channel ID from a funding tx outpoint + */ + public static ChannelId v1_from_funding_outpoint(org.ldk.structs.OutPoint outpoint) { + long ret = bindings.ChannelId_v1_from_funding_outpoint(outpoint.ptr); + GC.KeepAlive(outpoint); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(outpoint); }; + return ret_hu_conv; + } + + /** + * Create a _temporary_ channel ID randomly, based on an entropy source. + */ + public static ChannelId temporary_from_entropy_source(org.ldk.structs.EntropySource entropy_source) { + long ret = bindings.ChannelId_temporary_from_entropy_source(entropy_source.ptr); + GC.KeepAlive(entropy_source); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(entropy_source); }; + return ret_hu_conv; + } + + /** + * Generic constructor; create a new channel ID from the provided data. + * Use a more specific `*_from_*` constructor when possible. + */ + public static ChannelId from_bytes(byte[] data) { + long ret = bindings.ChannelId_from_bytes(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(data, 32))); + GC.KeepAlive(data); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Create a channel ID consisting of all-zeros data (e.g. when uninitialized or a placeholder). + */ + public static ChannelId new_zero() { + long ret = bindings.ChannelId_new_zero(); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Check whether ID is consisting of all zeros (uninitialized) + */ + public bool is_zero() { + bool ret = bindings.ChannelId_is_zero(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Create _v2_ channel ID by concatenating the holder revocation basepoint with the counterparty + * revocation basepoint and hashing the result. The basepoints will be concatenated in increasing + * sorted order. + */ + public static ChannelId v2_from_revocation_basepoints(org.ldk.structs.RevocationBasepoint ours, org.ldk.structs.RevocationBasepoint theirs) { + long ret = bindings.ChannelId_v2_from_revocation_basepoints(ours.ptr, theirs.ptr); + GC.KeepAlive(ours); + GC.KeepAlive(theirs); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ours); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(theirs); }; + return ret_hu_conv; + } + + /** + * Create temporary _v2_ channel ID by concatenating a zeroed out basepoint with the holder + * revocation basepoint and hashing the result. + */ + public static ChannelId temporary_v2_from_revocation_basepoint(org.ldk.structs.RevocationBasepoint our_revocation_basepoint) { + long ret = bindings.ChannelId_temporary_v2_from_revocation_basepoint(our_revocation_basepoint.ptr); + GC.KeepAlive(our_revocation_basepoint); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(our_revocation_basepoint); }; + return ret_hu_conv; + } + + /** + * Serialize the ChannelId object into a byte array which can be read by ChannelId_read + */ + public byte[] write() { + long ret = bindings.ChannelId_write(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Read a ChannelId from a byte array, created by ChannelId_write + */ + public static Result_ChannelIdDecodeErrorZ read(byte[] ser) { + long ret = bindings.ChannelId_read(InternalUtils.encodeUint8Array(ser)); + GC.KeepAlive(ser); + if (ret >= 0 && ret <= 4096) { return null; } + Result_ChannelIdDecodeErrorZ ret_hu_conv = Result_ChannelIdDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/ChannelInfo.cs b/c_sharp/src/org/ldk/structs/ChannelInfo.cs index 8a0d79a6..cf9775c8 100644 --- a/c_sharp/src/org/ldk/structs/ChannelInfo.cs +++ b/c_sharp/src/org/ldk/structs/ChannelInfo.cs @@ -32,7 +32,7 @@ public class ChannelInfo : CommonBase { * Protocol features of a channel communicated during its announcement */ public void set_features(org.ldk.structs.ChannelFeatures val) { - bindings.ChannelInfo_set_features(this.ptr, val == null ? 0 : val.ptr); + bindings.ChannelInfo_set_features(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -54,7 +54,7 @@ public class ChannelInfo : CommonBase { * Source node of the first direction of a channel */ public void set_node_one(org.ldk.structs.NodeId val) { - bindings.ChannelInfo_set_node_one(this.ptr, val == null ? 0 : val.ptr); + bindings.ChannelInfo_set_node_one(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -102,7 +102,7 @@ public class ChannelInfo : CommonBase { * Source node of the second direction of a channel */ public void set_node_two(org.ldk.structs.NodeId val) { - bindings.ChannelInfo_set_node_two(this.ptr, val == null ? 0 : val.ptr); + bindings.ChannelInfo_set_node_two(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -212,7 +212,7 @@ public class ChannelInfo : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.ChannelInfo b) { - bool ret = bindings.ChannelInfo_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.ChannelInfo_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/ChannelManager.cs b/c_sharp/src/org/ldk/structs/ChannelManager.cs index 567fbd56..0382bd75 100644 --- a/c_sharp/src/org/ldk/structs/ChannelManager.cs +++ b/c_sharp/src/org/ldk/structs/ChannelManager.cs @@ -7,11 +7,629 @@ namespace org { namespace ldk { namespace structs { /** - * Manager which keeps track of a number of channels and sends messages to the appropriate - * channel, also tracking HTLC preimages and forwarding onion packets appropriately. + * A lightning node's channel state machine and payment management logic, which facilitates + * sending, forwarding, and receiving payments through lightning channels. * - * Implements [`ChannelMessageHandler`], handling the multi-channel parts and passing things through - * to individual Channels. + * [`ChannelManager`] is parameterized by a number of components to achieve this. + * - [`chain::Watch`] (typically [`ChainMonitor`]) for on-chain monitoring and enforcement of each + * channel + * - [`BroadcasterInterface`] for broadcasting transactions related to opening, funding, and + * closing channels + * - [`EntropySource`] for providing random data needed for cryptographic operations + * - [`NodeSigner`] for cryptographic operations scoped to the node + * - [`SignerProvider`] for providing signers whose operations are scoped to individual channels + * - [`FeeEstimator`] to determine transaction fee rates needed to have a transaction mined in a + * timely manner + * - [`Router`] for finding payment paths when initiating and retrying payments + * - [`Logger`] for logging operational information of varying degrees + * + * Additionally, it implements the following traits: + * - [`ChannelMessageHandler`] to handle off-chain channel activity from peers + * - [`MessageSendEventsProvider`] to similarly send such messages to peers + * - [`OffersMessageHandler`] for BOLT 12 message handling and sending + * - [`EventsProvider`] to generate user-actionable [`Event`]s + * - [`chain::Listen`] and [`chain::Confirm`] for notification of on-chain activity + * + * Thus, [`ChannelManager`] is typically used to parameterize a [`MessageHandler`] and an + * [`OnionMessenger`]. The latter is required to support BOLT 12 functionality. + * + * # `ChannelManager` vs `ChannelMonitor` + * + * It's important to distinguish between the *off-chain* management and *on-chain* enforcement of + * lightning channels. [`ChannelManager`] exchanges messages with peers to manage the off-chain + * state of each channel. During this process, it generates a [`ChannelMonitor`] for each channel + * and a [`ChannelMonitorUpdate`] for each relevant change, notifying its parameterized + * [`chain::Watch`] of them. + * + * An implementation of [`chain::Watch`], such as [`ChainMonitor`], is responsible for aggregating + * these [`ChannelMonitor`]s and applying any [`ChannelMonitorUpdate`]s to them. It then monitors + * for any pertinent on-chain activity, enforcing claims as needed. + * + * This division of off-chain management and on-chain enforcement allows for interesting node + * setups. For instance, on-chain enforcement could be moved to a separate host or have added + * redundancy, possibly as a watchtower. See [`chain::Watch`] for the relevant interface. + * + * # Initialization + * + * Use [`ChannelManager::new`] with the most recent [`BlockHash`] when creating a fresh instance. + * Otherwise, if restarting, construct [`ChannelManagerReadArgs`] with the necessary parameters and + * references to any deserialized [`ChannelMonitor`]s that were previously persisted. Use this to + * deserialize the [`ChannelManager`] and feed it any new chain data since it was last online, as + * detailed in the [`ChannelManagerReadArgs`] documentation. + * + * ``` + * use bitcoin::BlockHash; + * use bitcoin::network::constants::Network; + * use lightning::chain::BestBlock; + * # use lightning::chain::channelmonitor::ChannelMonitor; + * use lightning::ln::channelmanager::{ChainParameters, ChannelManager, ChannelManagerReadArgs}; + * # use lightning::routing::gossip::NetworkGraph; + * use lightning::util::config::UserConfig; + * use lightning::util::ser::ReadableArgs; + * + * # fn read_channel_monitors() -> Vec> { vec![] } + * # fn example< + * # 'a, + * # L: lightning::util::logger::Logger, + * # ES: lightning::sign::EntropySource, + * # S: for <'b> lightning::routing::scoring::LockableScore<'b, ScoreLookUp = SL>, + * # SL: lightning::routing::scoring::ScoreLookUp, + * # SP: Sized, + * # R: lightning::io::Read, + * # >( + * # fee_estimator: &dyn lightning::chain::chaininterface::FeeEstimator, + * # chain_monitor: &dyn lightning::chain::Watch, + * # tx_broadcaster: &dyn lightning::chain::chaininterface::BroadcasterInterface, + * # router: &lightning::routing::router::DefaultRouter<&NetworkGraph<&'a L>, &'a L, &ES, &S, SP, SL>, + * # logger: &L, + * # entropy_source: &ES, + * # node_signer: &dyn lightning::sign::NodeSigner, + * # signer_provider: &lightning::sign::DynSignerProvider, + * # best_block: lightning::chain::BestBlock, + * # current_timestamp: u32, + * # mut reader: R, + * # ) -> Result<(), lightning::ln::msgs::DecodeError> { + * Fresh start with no channels + * let params = ChainParameters { + * network: Network::Bitcoin, + * best_block, + * }; + * let default_config = UserConfig::default(); + * let channel_manager = ChannelManager::new( + * fee_estimator, chain_monitor, tx_broadcaster, router, logger, entropy_source, node_signer, + * signer_provider, default_config, params, current_timestamp + * ); + * + * Restart from deserialized data + * let mut channel_monitors = read_channel_monitors(); + * let args = ChannelManagerReadArgs::new( + * entropy_source, node_signer, signer_provider, fee_estimator, chain_monitor, tx_broadcaster, + * router, logger, default_config, channel_monitors.iter_mut().collect() + * ); + * let (block_hash, channel_manager) = + * <(BlockHash, ChannelManager<_, _, _, _, _, _, _, _>)>::read(&mut reader, args)?; + * + * Update the ChannelManager and ChannelMonitors with the latest chain data + * ... + * + * Move the monitors to the ChannelManager's chain::Watch parameter + * for monitor in channel_monitors { + * chain_monitor.watch_channel(monitor.get_funding_txo().0, monitor); + * } + * # Ok(()) + * # } + * ``` + * + * # Operation + * + * The following is required for [`ChannelManager`] to function properly: + * - Handle messages from peers using its [`ChannelMessageHandler`] implementation (typically + * called by [`PeerManager::read_event`] when processing network I/O) + * - Send messages to peers obtained via its [`MessageSendEventsProvider`] implementation + * (typically initiated when [`PeerManager::process_events`] is called) + * - Feed on-chain activity using either its [`chain::Listen`] or [`chain::Confirm`] implementation + * as documented by those traits + * - Perform any periodic channel and payment checks by calling [`timer_tick_occurred`] roughly + * every minute + * - Persist to disk whenever [`get_and_clear_needs_persistence`] returns `true` using a + * [`Persister`] such as a [`KVStore`] implementation + * - Handle [`Event`]s obtained via its [`EventsProvider`] implementation + * + * The [`Future`] returned by [`get_event_or_persistence_needed_future`] is useful in determining + * when the last two requirements need to be checked. + * + * The [`lightning-block-sync`] and [`lightning-transaction-sync`] crates provide utilities that + * simplify feeding in on-chain activity using the [`chain::Listen`] and [`chain::Confirm`] traits, + * respectively. The remaining requirements can be met using the [`lightning-background-processor`] + * crate. For languages other than Rust, the availability of similar utilities may vary. + * + * # Channels + * + * [`ChannelManager`]'s primary function involves managing a channel state. Without channels, + * payments can't be sent. Use [`list_channels`] or [`list_usable_channels`] for a snapshot of the + * currently open channels. + * + * ``` + * # use lightning::ln::channelmanager::AChannelManager; + * # + * # fn example(channel_manager: T) { + * # let channel_manager = channel_manager.get_cm(); + * let channels = channel_manager.list_usable_channels(); + * for details in channels { + * println!(\"{:?}\", details); + * } + * # } + * ``` + * + * Each channel is identified using a [`ChannelId`], which will change throughout the channel's + * life cycle. Additionally, channels are assigned a `user_channel_id`, which is given in + * [`Event`]s associated with the channel and serves as a fixed identifier but is otherwise unused + * by [`ChannelManager`]. + * + * ## Opening Channels + * + * To an open a channel with a peer, call [`create_channel`]. This will initiate the process of + * opening an outbound channel, which requires self-funding when handling + * [`Event::FundingGenerationReady`]. + * + * ``` + * # use bitcoin::{ScriptBuf, Transaction}; + * # use bitcoin::secp256k1::PublicKey; + * # use lightning::ln::channelmanager::AChannelManager; + * # use lightning::events::{Event, EventsProvider}; + * # + * # trait Wallet { + * # fn create_funding_transaction( + * # &self, _amount_sats: u64, _output_script: ScriptBuf + * # ) -> Transaction; + * # } + * # + * # fn example(channel_manager: T, wallet: W, peer_id: PublicKey) { + * # let channel_manager = channel_manager.get_cm(); + * let value_sats = 1_000_000; + * let push_msats = 10_000_000; + * match channel_manager.create_channel(peer_id, value_sats, push_msats, 42, None, None) { + * Ok(channel_id) => println!(\"Opening channel {}\", channel_id), + * Err(e) => println!(\"Error opening channel: {:?}\", e), + * } + * + * On the event processing thread once the peer has responded + * channel_manager.process_pending_events(&|event| match event { + * Event::FundingGenerationReady { + * temporary_channel_id, counterparty_node_id, channel_value_satoshis, output_script, + * user_channel_id, .. + * } => { + * assert_eq!(user_channel_id, 42); + * let funding_transaction = wallet.create_funding_transaction( + * channel_value_satoshis, output_script + * ); + * match channel_manager.funding_transaction_generated( + * &temporary_channel_id, &counterparty_node_id, funding_transaction + * ) { + * Ok(()) => println!(\"Funding channel {}\", temporary_channel_id), + * Err(e) => println!(\"Error funding channel {}: {:?}\", temporary_channel_id, e), + * } + * }, + * Event::ChannelPending { channel_id, user_channel_id, former_temporary_channel_id, .. } => { + * assert_eq!(user_channel_id, 42); + * println!( + * \"Channel {} now {} pending (funding transaction has been broadcasted)\", channel_id, + * former_temporary_channel_id.unwrap() + * ); + * }, + * Event::ChannelReady { channel_id, user_channel_id, .. } => { + * assert_eq!(user_channel_id, 42); + * println!(\"Channel {} ready\", channel_id); + * }, + * ... + * # _ => {}, + * }); + * # } + * ``` + * + * ## Accepting Channels + * + * Inbound channels are initiated by peers and are automatically accepted unless [`ChannelManager`] + * has [`UserConfig::manually_accept_inbound_channels`] set. In that case, the channel may be + * either accepted or rejected when handling [`Event::OpenChannelRequest`]. + * + * ``` + * # use bitcoin::secp256k1::PublicKey; + * # use lightning::ln::channelmanager::AChannelManager; + * # use lightning::events::{Event, EventsProvider}; + * # + * # fn is_trusted(counterparty_node_id: PublicKey) -> bool { + * # // ... + * # unimplemented!() + * # } + * # + * # fn example(channel_manager: T) { + * # let channel_manager = channel_manager.get_cm(); + * channel_manager.process_pending_events(&|event| match event { + * Event::OpenChannelRequest { temporary_channel_id, counterparty_node_id, .. } => { + * if !is_trusted(counterparty_node_id) { + * match channel_manager.force_close_without_broadcasting_txn( + * &temporary_channel_id, &counterparty_node_id + * ) { + * Ok(()) => println!(\"Rejecting channel {}\", temporary_channel_id), + * Err(e) => println!(\"Error rejecting channel {}: {:?}\", temporary_channel_id, e), + * } + * return; + * } + * + * let user_channel_id = 43; + * match channel_manager.accept_inbound_channel( + * &temporary_channel_id, &counterparty_node_id, user_channel_id + * ) { + * Ok(()) => println!(\"Accepting channel {}\", temporary_channel_id), + * Err(e) => println!(\"Error accepting channel {}: {:?}\", temporary_channel_id, e), + * } + * }, + * ... + * # _ => {}, + * }); + * # } + * ``` + * + * ## Closing Channels + * + * There are two ways to close a channel: either cooperatively using [`close_channel`] or + * unilaterally using [`force_close_broadcasting_latest_txn`]. The former is ideal as it makes for + * lower fees and immediate access to funds. However, the latter may be necessary if the + * counterparty isn't behaving properly or has gone offline. [`Event::ChannelClosed`] is generated + * once the channel has been closed successfully. + * + * ``` + * # use bitcoin::secp256k1::PublicKey; + * # use lightning::ln::types::ChannelId; + * # use lightning::ln::channelmanager::AChannelManager; + * # use lightning::events::{Event, EventsProvider}; + * # + * # fn example( + * # channel_manager: T, channel_id: ChannelId, counterparty_node_id: PublicKey + * # ) { + * # let channel_manager = channel_manager.get_cm(); + * match channel_manager.close_channel(&channel_id, &counterparty_node_id) { + * Ok(()) => println!(\"Closing channel {}\", channel_id), + * Err(e) => println!(\"Error closing channel {}: {:?}\", channel_id, e), + * } + * + * On the event processing thread + * channel_manager.process_pending_events(&|event| match event { + * Event::ChannelClosed { channel_id, user_channel_id, .. } => { + * assert_eq!(user_channel_id, 42); + * println!(\"Channel {} closed\", channel_id); + * }, + * ... + * # _ => {}, + * }); + * # } + * ``` + * + * # Payments + * + * [`ChannelManager`] is responsible for sending, forwarding, and receiving payments through its + * channels. A payment is typically initiated from a [BOLT 11] invoice or a [BOLT 12] offer, though + * spontaneous (i.e., keysend) payments are also possible. Incoming payments don't require + * maintaining any additional state as [`ChannelManager`] can reconstruct the [`PaymentPreimage`] + * from the [`PaymentSecret`]. Sending payments, however, require tracking in order to retry failed + * HTLCs. + * + * After a payment is initiated, it will appear in [`list_recent_payments`] until a short time + * after either an [`Event::PaymentSent`] or [`Event::PaymentFailed`] is handled. Failed HTLCs + * for a payment will be retried according to the payment's [`Retry`] strategy or until + * [`abandon_payment`] is called. + * + * ## BOLT 11 Invoices + * + * The [`lightning-invoice`] crate is useful for creating BOLT 11 invoices. Specifically, use the + * functions in its `utils` module for constructing invoices that are compatible with + * [`ChannelManager`]. These functions serve as a convenience for building invoices with the + * [`PaymentHash`] and [`PaymentSecret`] returned from [`create_inbound_payment`]. To provide your + * own [`PaymentHash`], use [`create_inbound_payment_for_hash`] or the corresponding functions in + * the [`lightning-invoice`] `utils` module. + * + * [`ChannelManager`] generates an [`Event::PaymentClaimable`] once the full payment has been + * received. Call [`claim_funds`] to release the [`PaymentPreimage`], which in turn will result in + * an [`Event::PaymentClaimed`]. + * + * ``` + * # use lightning::events::{Event, EventsProvider, PaymentPurpose}; + * # use lightning::ln::channelmanager::AChannelManager; + * # + * # fn example(channel_manager: T) { + * # let channel_manager = channel_manager.get_cm(); + * Or use utils::create_invoice_from_channelmanager + * let known_payment_hash = match channel_manager.create_inbound_payment( + * Some(10_000_000), 3600, None + * ) { + * Ok((payment_hash, _payment_secret)) => { + * println!(\"Creating inbound payment {}\", payment_hash); + * payment_hash + * }, + * Err(()) => panic!(\"Error creating inbound payment\"), + * }; + * + * On the event processing thread + * channel_manager.process_pending_events(&|event| match event { + * Event::PaymentClaimable { payment_hash, purpose, .. } => match purpose { + * PaymentPurpose::Bolt11InvoicePayment { payment_preimage: Some(payment_preimage), .. } => { + * assert_eq!(payment_hash, known_payment_hash); + * println!(\"Claiming payment {}\", payment_hash); + * channel_manager.claim_funds(payment_preimage); + * }, + * PaymentPurpose::Bolt11InvoicePayment { payment_preimage: None, .. } => { + * println!(\"Unknown payment hash: {}\", payment_hash); + * }, + * PaymentPurpose::SpontaneousPayment(payment_preimage) => { + * assert_ne!(payment_hash, known_payment_hash); + * println!(\"Claiming spontaneous payment {}\", payment_hash); + * channel_manager.claim_funds(payment_preimage); + * }, + * ... + * # _ => {}, + * }, + * Event::PaymentClaimed { payment_hash, amount_msat, .. } => { + * assert_eq!(payment_hash, known_payment_hash); + * println!(\"Claimed {} msats\", amount_msat); + * }, + * ... + * # _ => {}, + * }); + * # } + * ``` + * + * For paying an invoice, [`lightning-invoice`] provides a `payment` module with convenience + * functions for use with [`send_payment`]. + * + * ``` + * # use lightning::events::{Event, EventsProvider}; + * # use lightning::ln::types::PaymentHash; + * # use lightning::ln::channelmanager::{AChannelManager, PaymentId, RecentPaymentDetails, RecipientOnionFields, Retry}; + * # use lightning::routing::router::RouteParameters; + * # + * # fn example( + * # channel_manager: T, payment_hash: PaymentHash, recipient_onion: RecipientOnionFields, + * # route_params: RouteParameters, retry: Retry + * # ) { + * # let channel_manager = channel_manager.get_cm(); + * let (payment_hash, recipient_onion, route_params) = + * payment::payment_parameters_from_invoice(&invoice); + * let payment_id = PaymentId([42; 32]); + * match channel_manager.send_payment( + * payment_hash, recipient_onion, payment_id, route_params, retry + * ) { + * Ok(()) => println!(\"Sending payment with hash {}\", payment_hash), + * Err(e) => println!(\"Failed sending payment with hash {}: {:?}\", payment_hash, e), + * } + * + * let expected_payment_id = payment_id; + * let expected_payment_hash = payment_hash; + * assert!( + * channel_manager.list_recent_payments().iter().find(|details| matches!( + * details, + * RecentPaymentDetails::Pending { + * payment_id: expected_payment_id, + * payment_hash: expected_payment_hash, + * .. + * } + * )).is_some() + * ); + * + * On the event processing thread + * channel_manager.process_pending_events(&|event| match event { + * Event::PaymentSent { payment_hash, .. } => println!(\"Paid {}\", payment_hash), + * Event::PaymentFailed { payment_hash, .. } => println!(\"Failed paying {}\", payment_hash), + * ... + * # _ => {}, + * }); + * # } + * ``` + * + * ## BOLT 12 Offers + * + * The [`offers`] module is useful for creating BOLT 12 offers. An [`Offer`] is a precursor to a + * [`Bolt12Invoice`], which must first be requested by the payer. The interchange of these messages + * as defined in the specification is handled by [`ChannelManager`] and its implementation of + * [`OffersMessageHandler`]. However, this only works with an [`Offer`] created using a builder + * returned by [`create_offer_builder`]. With this approach, BOLT 12 offers and invoices are + * stateless just as BOLT 11 invoices are. + * + * ``` + * # use lightning::events::{Event, EventsProvider, PaymentPurpose}; + * # use lightning::ln::channelmanager::AChannelManager; + * # use lightning::offers::parse::Bolt12SemanticError; + * # + * # fn example(channel_manager: T) -> Result<(), Bolt12SemanticError> { + * # let channel_manager = channel_manager.get_cm(); + * let offer = channel_manager + * .create_offer_builder()? + * # ; + * # // Needed for compiling for c_bindings + * # let builder: lightning::offers::offer::OfferBuilder<_, _> = offer.into(); + * # let offer = builder + * .description(\"coffee\".to_string()) + * .amount_msats(10_000_000) + * .build()?; + * let bech32_offer = offer.to_string(); + * + * On the event processing thread + * channel_manager.process_pending_events(&|event| match event { + * Event::PaymentClaimable { payment_hash, purpose, .. } => match purpose { + * PaymentPurpose::Bolt12OfferPayment { payment_preimage: Some(payment_preimage), .. } => { + * println!(\"Claiming payment {}\", payment_hash); + * channel_manager.claim_funds(payment_preimage); + * }, + * PaymentPurpose::Bolt12OfferPayment { payment_preimage: None, .. } => { + * println!(\"Unknown payment hash: {}\", payment_hash); + * }, + * ... + * # _ => {}, + * }, + * Event::PaymentClaimed { payment_hash, amount_msat, .. } => { + * println!(\"Claimed {} msats\", amount_msat); + * }, + * ... + * # _ => {}, + * }); + * # Ok(()) + * # } + * ``` + * + * Use [`pay_for_offer`] to initiated payment, which sends an [`InvoiceRequest`] for an [`Offer`] + * and pays the [`Bolt12Invoice`] response. In addition to success and failure events, + * [`ChannelManager`] may also generate an [`Event::InvoiceRequestFailed`]. + * + * ``` + * # use lightning::events::{Event, EventsProvider}; + * # use lightning::ln::channelmanager::{AChannelManager, PaymentId, RecentPaymentDetails, Retry}; + * # use lightning::offers::offer::Offer; + * # + * # fn example( + * # channel_manager: T, offer: &Offer, quantity: Option, amount_msats: Option, + * # payer_note: Option, retry: Retry, max_total_routing_fee_msat: Option + * # ) { + * # let channel_manager = channel_manager.get_cm(); + * let payment_id = PaymentId([42; 32]); + * match channel_manager.pay_for_offer( + * offer, quantity, amount_msats, payer_note, payment_id, retry, max_total_routing_fee_msat + * ) { + * Ok(()) => println!(\"Requesting invoice for offer\"), + * Err(e) => println!(\"Unable to request invoice for offer: {:?}\", e), + * } + * + * First the payment will be waiting on an invoice + * let expected_payment_id = payment_id; + * assert!( + * channel_manager.list_recent_payments().iter().find(|details| matches!( + * details, + * RecentPaymentDetails::AwaitingInvoice { payment_id: expected_payment_id } + * )).is_some() + * ); + * + * Once the invoice is received, a payment will be sent + * assert!( + * channel_manager.list_recent_payments().iter().find(|details| matches!( + * details, + * RecentPaymentDetails::Pending { payment_id: expected_payment_id, .. } + * )).is_some() + * ); + * + * On the event processing thread + * channel_manager.process_pending_events(&|event| match event { + * Event::PaymentSent { payment_id: Some(payment_id), .. } => println!(\"Paid {}\", payment_id), + * Event::PaymentFailed { payment_id, .. } => println!(\"Failed paying {}\", payment_id), + * Event::InvoiceRequestFailed { payment_id, .. } => println!(\"Failed paying {}\", payment_id), + * ... + * # _ => {}, + * }); + * # } + * ``` + * + * ## BOLT 12 Refunds + * + * A [`Refund`] is a request for an invoice to be paid. Like *paying* for an [`Offer`], *creating* + * a [`Refund`] involves maintaining state since it represents a future outbound payment. + * Therefore, use [`create_refund_builder`] when creating one, otherwise [`ChannelManager`] will + * refuse to pay any corresponding [`Bolt12Invoice`] that it receives. + * + * ``` + * # use core::time::Duration; + * # use lightning::events::{Event, EventsProvider}; + * # use lightning::ln::channelmanager::{AChannelManager, PaymentId, RecentPaymentDetails, Retry}; + * # use lightning::offers::parse::Bolt12SemanticError; + * # + * # fn example( + * # channel_manager: T, amount_msats: u64, absolute_expiry: Duration, retry: Retry, + * # max_total_routing_fee_msat: Option + * # ) -> Result<(), Bolt12SemanticError> { + * # let channel_manager = channel_manager.get_cm(); + * let payment_id = PaymentId([42; 32]); + * let refund = channel_manager + * .create_refund_builder( + * amount_msats, absolute_expiry, payment_id, retry, max_total_routing_fee_msat + * )? + * # ; + * # // Needed for compiling for c_bindings + * # let builder: lightning::offers::refund::RefundBuilder<_> = refund.into(); + * # let refund = builder + * .description(\"coffee\".to_string()) + * .payer_note(\"refund for order 1234\".to_string()) + * .build()?; + * let bech32_refund = refund.to_string(); + * + * First the payment will be waiting on an invoice + * let expected_payment_id = payment_id; + * assert!( + * channel_manager.list_recent_payments().iter().find(|details| matches!( + * details, + * RecentPaymentDetails::AwaitingInvoice { payment_id: expected_payment_id } + * )).is_some() + * ); + * + * Once the invoice is received, a payment will be sent + * assert!( + * channel_manager.list_recent_payments().iter().find(|details| matches!( + * details, + * RecentPaymentDetails::Pending { payment_id: expected_payment_id, .. } + * )).is_some() + * ); + * + * On the event processing thread + * channel_manager.process_pending_events(&|event| match event { + * Event::PaymentSent { payment_id: Some(payment_id), .. } => println!(\"Paid {}\", payment_id), + * Event::PaymentFailed { payment_id, .. } => println!(\"Failed paying {}\", payment_id), + * ... + * # _ => {}, + * }); + * # Ok(()) + * # } + * ``` + * + * Use [`request_refund_payment`] to send a [`Bolt12Invoice`] for receiving the refund. Similar to + * creating* an [`Offer`], this is stateless as it represents an inbound payment. + * + * ``` + * # use lightning::events::{Event, EventsProvider, PaymentPurpose}; + * # use lightning::ln::channelmanager::AChannelManager; + * # use lightning::offers::refund::Refund; + * # + * # fn example(channel_manager: T, refund: &Refund) { + * # let channel_manager = channel_manager.get_cm(); + * let known_payment_hash = match channel_manager.request_refund_payment(refund) { + * Ok(invoice) => { + * let payment_hash = invoice.payment_hash(); + * println!(\"Requesting refund payment {}\", payment_hash); + * payment_hash + * }, + * Err(e) => panic!(\"Unable to request payment for refund: {:?}\", e), + * }; + * + * On the event processing thread + * channel_manager.process_pending_events(&|event| match event { + * Event::PaymentClaimable { payment_hash, purpose, .. } => match purpose { + * \tPaymentPurpose::Bolt12RefundPayment { payment_preimage: Some(payment_preimage), .. } => { + * assert_eq!(payment_hash, known_payment_hash); + * println!(\"Claiming payment {}\", payment_hash); + * channel_manager.claim_funds(payment_preimage); + * }, + * \tPaymentPurpose::Bolt12RefundPayment { payment_preimage: None, .. } => { + * println!(\"Unknown payment hash: {}\", payment_hash); + * \t}, + * ... + * # _ => {}, + * }, + * Event::PaymentClaimed { payment_hash, amount_msat, .. } => { + * assert_eq!(payment_hash, known_payment_hash); + * println!(\"Claimed {} msats\", amount_msat); + * }, + * ... + * # _ => {}, + * }); + * # } + * ``` + * + * # Persistence * * Implements [`Writeable`] to write out all channel state to disk. Implies [`peer_disconnected`] for * all peers during write/read (though does not modify this instance, only the instance being @@ -32,12 +650,16 @@ namespace org { namespace ldk { namespace structs { * tells you the last block hash which was connected. You should get the best block tip before using the manager. * See [`chain::Listen`] and [`chain::Confirm`] for more details. * + * # `ChannelUpdate` Messages + * * Note that `ChannelManager` is responsible for tracking liveness of its channels and generating * [`ChannelUpdate`] messages informing peers that the channel is temporarily disabled. To avoid * spam due to quick disconnection/reconnection, updates are not sent until the channel has been * offline for a full minute. In order to track this, you must call * [`timer_tick_occurred`] roughly once per minute, though it doesn't have to be perfect. * + * # DoS Mitigation + * * To avoid trivial DoS issues, `ChannelManager` limits the number of inbound connections and * inbound channels without confirmed funding transactions. This may result in nodes which we do * not have a channel with being unable to connect to us or open new channels with us if we have @@ -47,19 +669,53 @@ namespace org { namespace ldk { namespace structs { * exempted from the count of unfunded channels. Similarly, outbound channels and connections are * never limited. Please ensure you limit the count of such channels yourself. * + * # Type Aliases + * * Rather than using a plain `ChannelManager`, it is preferable to use either a [`SimpleArcChannelManager`] * a [`SimpleRefChannelManager`], for conciseness. See their documentation for more details, but * essentially you should default to using a [`SimpleRefChannelManager`], and use a * [`SimpleArcChannelManager`] when you require a `ChannelManager` with a static lifetime, such as when * you're using lightning-net-tokio. * + * [`ChainMonitor`]: crate::chain::chainmonitor::ChainMonitor + * [`MessageHandler`]: crate::ln::peer_handler::MessageHandler + * [`OnionMessenger`]: crate::onion_message::messenger::OnionMessenger + * [`PeerManager::read_event`]: crate::ln::peer_handler::PeerManager::read_event + * [`PeerManager::process_events`]: crate::ln::peer_handler::PeerManager::process_events + * [`timer_tick_occurred`]: Self::timer_tick_occurred + * [`get_and_clear_needs_persistence`]: Self::get_and_clear_needs_persistence + * [`Persister`]: crate::util::persist::Persister + * [`KVStore`]: crate::util::persist::KVStore + * [`get_event_or_persistence_needed_future`]: Self::get_event_or_persistence_needed_future + * [`lightning-block-sync`]: https://docs.rs/lightning_block_sync/latest/lightning_block_sync + * [`lightning-transaction-sync`]: https://docs.rs/lightning_transaction_sync/latest/lightning_transaction_sync + * [`lightning-background-processor`]: https://docs.rs/lightning_background_processor/lightning_background_processor + * [`list_channels`]: Self::list_channels + * [`list_usable_channels`]: Self::list_usable_channels + * [`create_channel`]: Self::create_channel + * [`close_channel`]: Self::force_close_broadcasting_latest_txn + * [`force_close_broadcasting_latest_txn`]: Self::force_close_broadcasting_latest_txn + * [BOLT 11]: https://github.com/lightning/bolts/blob/master/11-payment-encoding.md + * [BOLT 12]: https://github.com/rustyrussell/lightning-rfc/blob/guilt/offers/12-offer-encoding.md + * [`list_recent_payments`]: Self::list_recent_payments + * [`abandon_payment`]: Self::abandon_payment + * [`lightning-invoice`]: https://docs.rs/lightning_invoice/latest/lightning_invoice + * [`create_inbound_payment`]: Self::create_inbound_payment + * [`create_inbound_payment_for_hash`]: Self::create_inbound_payment_for_hash + * [`claim_funds`]: Self::claim_funds + * [`send_payment`]: Self::send_payment + * [`offers`]: crate::offers + * [`create_offer_builder`]: Self::create_offer_builder + * [`pay_for_offer`]: Self::pay_for_offer + * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest + * [`create_refund_builder`]: Self::create_refund_builder + * [`request_refund_payment`]: Self::request_refund_payment * [`peer_disconnected`]: msgs::ChannelMessageHandler::peer_disconnected * [`funding_created`]: msgs::FundingCreated * [`funding_transaction_generated`]: Self::funding_transaction_generated * [`BlockHash`]: bitcoin::hash_types::BlockHash * [`update_channel`]: chain::Watch::update_channel * [`ChannelUpdate`]: msgs::ChannelUpdate - * [`timer_tick_occurred`]: Self::timer_tick_occurred * [`read`]: ReadableArgs::read */ public class ChannelManager : CommonBase { @@ -88,7 +744,7 @@ public class ChannelManager : CommonBase { * [`params.best_block.block_hash`]: chain::BestBlock::block_hash */ public static ChannelManager of(org.ldk.structs.FeeEstimator fee_est, org.ldk.structs.Watch chain_monitor, org.ldk.structs.BroadcasterInterface tx_broadcaster, org.ldk.structs.Router router, org.ldk.structs.Logger logger, org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.SignerProvider signer_provider, org.ldk.structs.UserConfig config, org.ldk.structs.ChainParameters _params, int current_timestamp) { - long ret = bindings.ChannelManager_new(fee_est.ptr, chain_monitor.ptr, tx_broadcaster.ptr, router.ptr, logger.ptr, entropy_source.ptr, node_signer.ptr, signer_provider.ptr, config == null ? 0 : config.ptr, _params == null ? 0 : _params.ptr, current_timestamp); + long ret = bindings.ChannelManager_new(fee_est.ptr, chain_monitor.ptr, tx_broadcaster.ptr, router.ptr, logger.ptr, entropy_source.ptr, node_signer.ptr, signer_provider.ptr, config.ptr, _params.ptr, current_timestamp); GC.KeepAlive(fee_est); GC.KeepAlive(chain_monitor); GC.KeepAlive(tx_broadcaster); @@ -162,10 +818,11 @@ public class ChannelManager : CommonBase { * [`Event::FundingGenerationReady::temporary_channel_id`]: events::Event::FundingGenerationReady::temporary_channel_id * [`Event::ChannelClosed::channel_id`]: events::Event::ChannelClosed::channel_id * + * Note that temporary_channel_id (or a relevant inner pointer) may be NULL or all-0s to represent None * Note that override_config (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public Result_ThirtyTwoBytesAPIErrorZ create_channel(byte[] their_network_key, long channel_value_satoshis, long push_msat, org.ldk.util.UInt128 user_channel_id, org.ldk.structs.Option_ThirtyTwoBytesZ temporary_channel_id, org.ldk.structs.UserConfig override_config) { - long ret = bindings.ChannelManager_create_channel(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_network_key, 33)), channel_value_satoshis, push_msat, InternalUtils.encodeUint8Array(user_channel_id.getLEBytes()), temporary_channel_id.ptr, override_config == null ? 0 : override_config.ptr); + public Result_ChannelIdAPIErrorZ create_channel(byte[] their_network_key, long channel_value_satoshis, long push_msat, org.ldk.util.UInt128 user_channel_id, org.ldk.structs.ChannelId temporary_channel_id, org.ldk.structs.UserConfig override_config) { + long ret = bindings.ChannelManager_create_channel(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_network_key, 33)), channel_value_satoshis, push_msat, InternalUtils.encodeUint8Array(user_channel_id.getLEBytes()), temporary_channel_id == null ? 0 : temporary_channel_id.ptr, override_config == null ? 0 : override_config.ptr); GC.KeepAlive(this); GC.KeepAlive(their_network_key); GC.KeepAlive(channel_value_satoshis); @@ -174,7 +831,7 @@ public class ChannelManager : CommonBase { GC.KeepAlive(temporary_channel_id); GC.KeepAlive(override_config); if (ret >= 0 && ret <= 4096) { return null; } - Result_ThirtyTwoBytesAPIErrorZ ret_hu_conv = Result_ThirtyTwoBytesAPIErrorZ.constr_from_ptr(ret); + Result_ChannelIdAPIErrorZ ret_hu_conv = Result_ChannelIdAPIErrorZ.constr_from_ptr(ret); if (this != null) { this.ptrs_to.AddLast(temporary_channel_id); }; if (this != null) { this.ptrs_to.AddLast(override_config); }; return ret_hu_conv; @@ -295,13 +952,14 @@ public class ChannelManager : CommonBase { * [`NonAnchorChannelFee`]: crate::chain::chaininterface::ConfirmationTarget::NonAnchorChannelFee * [`SendShutdown`]: crate::events::MessageSendEvent::SendShutdown */ - public Result_NoneAPIErrorZ close_channel(byte[] channel_id, byte[] counterparty_node_id) { - long ret = bindings.ChannelManager_close_channel(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id, 32)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_node_id, 33))); + public Result_NoneAPIErrorZ close_channel(org.ldk.structs.ChannelId channel_id, byte[] counterparty_node_id) { + long ret = bindings.ChannelManager_close_channel(this.ptr, channel_id.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_node_id, 33))); GC.KeepAlive(this); GC.KeepAlive(channel_id); GC.KeepAlive(counterparty_node_id); if (ret >= 0 && ret <= 4096) { return null; } Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.AddLast(channel_id); }; return ret_hu_conv; } @@ -338,8 +996,8 @@ public class ChannelManager : CommonBase { * * Note that shutdown_script (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public Result_NoneAPIErrorZ close_channel_with_feerate_and_script(byte[] channel_id, byte[] counterparty_node_id, org.ldk.structs.Option_u32Z target_feerate_sats_per_1000_weight, org.ldk.structs.ShutdownScript shutdown_script) { - long ret = bindings.ChannelManager_close_channel_with_feerate_and_script(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id, 32)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_node_id, 33)), target_feerate_sats_per_1000_weight.ptr, shutdown_script == null ? 0 : shutdown_script.ptr); + public Result_NoneAPIErrorZ close_channel_with_feerate_and_script(org.ldk.structs.ChannelId channel_id, byte[] counterparty_node_id, org.ldk.structs.Option_u32Z target_feerate_sats_per_1000_weight, org.ldk.structs.ShutdownScript shutdown_script) { + long ret = bindings.ChannelManager_close_channel_with_feerate_and_script(this.ptr, channel_id.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_node_id, 33)), target_feerate_sats_per_1000_weight.ptr, shutdown_script == null ? 0 : shutdown_script.ptr); GC.KeepAlive(this); GC.KeepAlive(channel_id); GC.KeepAlive(counterparty_node_id); @@ -347,6 +1005,7 @@ public class ChannelManager : CommonBase { GC.KeepAlive(shutdown_script); if (ret >= 0 && ret <= 4096) { return null; } Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.AddLast(channel_id); }; if (this != null) { this.ptrs_to.AddLast(target_feerate_sats_per_1000_weight); }; if (this != null) { this.ptrs_to.AddLast(shutdown_script); }; return ret_hu_conv; @@ -358,13 +1017,14 @@ public class ChannelManager : CommonBase { * the manager, or if the `counterparty_node_id` isn't the counterparty of the corresponding * channel. */ - public Result_NoneAPIErrorZ force_close_broadcasting_latest_txn(byte[] channel_id, byte[] counterparty_node_id) { - long ret = bindings.ChannelManager_force_close_broadcasting_latest_txn(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id, 32)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_node_id, 33))); + public Result_NoneAPIErrorZ force_close_broadcasting_latest_txn(org.ldk.structs.ChannelId channel_id, byte[] counterparty_node_id) { + long ret = bindings.ChannelManager_force_close_broadcasting_latest_txn(this.ptr, channel_id.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_node_id, 33))); GC.KeepAlive(this); GC.KeepAlive(channel_id); GC.KeepAlive(counterparty_node_id); if (ret >= 0 && ret <= 4096) { return null; } Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.AddLast(channel_id); }; return ret_hu_conv; } @@ -373,16 +1033,17 @@ public class ChannelManager : CommonBase { * the latest local transaction(s). Fails if `channel_id` is unknown to the manager, or if the * `counterparty_node_id` isn't the counterparty of the corresponding channel. * - * You can always get the latest local transaction(s) to broadcast from - * [`ChannelMonitor::get_latest_holder_commitment_txn`]. + * You can always broadcast the latest local transaction(s) via + * [`ChannelMonitor::broadcast_latest_holder_commitment_txn`]. */ - public Result_NoneAPIErrorZ force_close_without_broadcasting_txn(byte[] channel_id, byte[] counterparty_node_id) { - long ret = bindings.ChannelManager_force_close_without_broadcasting_txn(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id, 32)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_node_id, 33))); + public Result_NoneAPIErrorZ force_close_without_broadcasting_txn(org.ldk.structs.ChannelId channel_id, byte[] counterparty_node_id) { + long ret = bindings.ChannelManager_force_close_without_broadcasting_txn(this.ptr, channel_id.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_node_id, 33))); GC.KeepAlive(this); GC.KeepAlive(channel_id); GC.KeepAlive(counterparty_node_id); if (ret >= 0 && ret <= 4096) { return null; } Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.AddLast(channel_id); }; return ret_hu_conv; } @@ -458,7 +1119,7 @@ public class ChannelManager : CommonBase { * [`ChannelMonitorUpdateStatus::InProgress`]: crate::chain::ChannelMonitorUpdateStatus::InProgress */ public Result_NonePaymentSendFailureZ send_payment_with_route(org.ldk.structs.Route route, byte[] payment_hash, org.ldk.structs.RecipientOnionFields recipient_onion, byte[] payment_id) { - long ret = bindings.ChannelManager_send_payment_with_route(this.ptr, route == null ? 0 : route.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_hash, 32)), recipient_onion == null ? 0 : recipient_onion.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32))); + long ret = bindings.ChannelManager_send_payment_with_route(this.ptr, route.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_hash, 32)), recipient_onion.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32))); GC.KeepAlive(this); GC.KeepAlive(route); GC.KeepAlive(payment_hash); @@ -476,7 +1137,7 @@ public class ChannelManager : CommonBase { * `route_params` and retry failed payment paths based on `retry_strategy`. */ public Result_NoneRetryableSendFailureZ send_payment(byte[] payment_hash, org.ldk.structs.RecipientOnionFields recipient_onion, byte[] payment_id, org.ldk.structs.RouteParameters route_params, org.ldk.structs.Retry retry_strategy) { - long ret = bindings.ChannelManager_send_payment(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_hash, 32)), recipient_onion == null ? 0 : recipient_onion.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32)), route_params == null ? 0 : route_params.ptr, retry_strategy.ptr); + long ret = bindings.ChannelManager_send_payment(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_hash, 32)), recipient_onion.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32)), route_params.ptr, retry_strategy.ptr); GC.KeepAlive(this); GC.KeepAlive(payment_hash); GC.KeepAlive(recipient_onion); @@ -542,7 +1203,7 @@ public class ChannelManager : CommonBase { * [`send_payment`]: Self::send_payment */ public Result_ThirtyTwoBytesPaymentSendFailureZ send_spontaneous_payment(org.ldk.structs.Route route, org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage, org.ldk.structs.RecipientOnionFields recipient_onion, byte[] payment_id) { - long ret = bindings.ChannelManager_send_spontaneous_payment(this.ptr, route == null ? 0 : route.ptr, payment_preimage.ptr, recipient_onion == null ? 0 : recipient_onion.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32))); + long ret = bindings.ChannelManager_send_spontaneous_payment(this.ptr, route.ptr, payment_preimage.ptr, recipient_onion.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32))); GC.KeepAlive(this); GC.KeepAlive(route); GC.KeepAlive(payment_preimage); @@ -566,7 +1227,7 @@ public class ChannelManager : CommonBase { * [`PaymentParameters::for_keysend`]: crate::routing::router::PaymentParameters::for_keysend */ public Result_ThirtyTwoBytesRetryableSendFailureZ send_spontaneous_payment_with_retry(org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage, org.ldk.structs.RecipientOnionFields recipient_onion, byte[] payment_id, org.ldk.structs.RouteParameters route_params, org.ldk.structs.Retry retry_strategy) { - long ret = bindings.ChannelManager_send_spontaneous_payment_with_retry(this.ptr, payment_preimage.ptr, recipient_onion == null ? 0 : recipient_onion.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32)), route_params == null ? 0 : route_params.ptr, retry_strategy.ptr); + long ret = bindings.ChannelManager_send_spontaneous_payment_with_retry(this.ptr, payment_preimage.ptr, recipient_onion.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32)), route_params.ptr, retry_strategy.ptr); GC.KeepAlive(this); GC.KeepAlive(payment_preimage); GC.KeepAlive(recipient_onion); @@ -588,7 +1249,7 @@ public class ChannelManager : CommonBase { * us to easily discern them from real payments. */ public Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ send_probe(org.ldk.structs.Path path) { - long ret = bindings.ChannelManager_send_probe(this.ptr, path == null ? 0 : path.ptr); + long ret = bindings.ChannelManager_send_probe(this.ptr, path.ptr); GC.KeepAlive(this); GC.KeepAlive(path); if (ret >= 0 && ret <= 4096) { return null; } @@ -633,7 +1294,7 @@ public class ChannelManager : CommonBase { * probes. If `None` is given as `liquidity_limit_multiplier`, it defaults to `3`. */ public Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ send_preflight_probes(org.ldk.structs.RouteParameters route_params, org.ldk.structs.Option_u64Z liquidity_limit_multiplier) { - long ret = bindings.ChannelManager_send_preflight_probes(this.ptr, route_params == null ? 0 : route_params.ptr, liquidity_limit_multiplier.ptr); + long ret = bindings.ChannelManager_send_preflight_probes(this.ptr, route_params.ptr, liquidity_limit_multiplier.ptr); GC.KeepAlive(this); GC.KeepAlive(route_params); GC.KeepAlive(liquidity_limit_multiplier); @@ -676,14 +1337,15 @@ public class ChannelManager : CommonBase { * [`Event::FundingGenerationReady`]: crate::events::Event::FundingGenerationReady * [`Event::ChannelClosed`]: crate::events::Event::ChannelClosed */ - public Result_NoneAPIErrorZ funding_transaction_generated(byte[] temporary_channel_id, byte[] counterparty_node_id, byte[] funding_transaction) { - long ret = bindings.ChannelManager_funding_transaction_generated(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(temporary_channel_id, 32)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_node_id, 33)), InternalUtils.encodeUint8Array(funding_transaction)); + public Result_NoneAPIErrorZ funding_transaction_generated(org.ldk.structs.ChannelId temporary_channel_id, byte[] counterparty_node_id, byte[] funding_transaction) { + long ret = bindings.ChannelManager_funding_transaction_generated(this.ptr, temporary_channel_id.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_node_id, 33)), InternalUtils.encodeUint8Array(funding_transaction)); GC.KeepAlive(this); GC.KeepAlive(temporary_channel_id); GC.KeepAlive(counterparty_node_id); GC.KeepAlive(funding_transaction); if (ret >= 0 && ret <= 4096) { return null; } Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.AddLast(temporary_channel_id); }; return ret_hu_conv; } @@ -699,8 +1361,8 @@ public class ChannelManager : CommonBase { * * If there is an error, all channels in the batch are to be considered closed. */ - public Result_NoneAPIErrorZ batch_funding_transaction_generated(TwoTuple_ThirtyTwoBytesPublicKeyZ[] temporary_channels, byte[] funding_transaction) { - long ret = bindings.ChannelManager_batch_funding_transaction_generated(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(temporary_channels, temporary_channels_conv_35 => temporary_channels_conv_35 != null ? temporary_channels_conv_35.ptr : 0)), InternalUtils.encodeUint8Array(funding_transaction)); + public Result_NoneAPIErrorZ batch_funding_transaction_generated(TwoTuple_ChannelIdPublicKeyZ[] temporary_channels, byte[] funding_transaction) { + long ret = bindings.ChannelManager_batch_funding_transaction_generated(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(temporary_channels, temporary_channels_conv_30 => temporary_channels_conv_30.ptr)), InternalUtils.encodeUint8Array(funding_transaction)); GC.KeepAlive(this); GC.KeepAlive(temporary_channels); GC.KeepAlive(funding_transaction); @@ -733,14 +1395,15 @@ public class ChannelManager : CommonBase { * [`ChannelUnavailable`]: APIError::ChannelUnavailable * [`APIMisuseError`]: APIError::APIMisuseError */ - public Result_NoneAPIErrorZ update_partial_channel_config(byte[] counterparty_node_id, byte[][] channel_ids, org.ldk.structs.ChannelConfigUpdate config_update) { - long ret = bindings.ChannelManager_update_partial_channel_config(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_node_id, 33)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(channel_ids, channel_ids_conv_8 => InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_ids_conv_8, 32)))), config_update == null ? 0 : config_update.ptr); + public Result_NoneAPIErrorZ update_partial_channel_config(byte[] counterparty_node_id, ChannelId[] channel_ids, org.ldk.structs.ChannelConfigUpdate config_update) { + long ret = bindings.ChannelManager_update_partial_channel_config(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_node_id, 33)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(channel_ids, channel_ids_conv_11 => channel_ids_conv_11.ptr)), config_update.ptr); GC.KeepAlive(this); GC.KeepAlive(counterparty_node_id); GC.KeepAlive(channel_ids); GC.KeepAlive(config_update); if (ret >= 0 && ret <= 4096) { return null; } Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret); + foreach (ChannelId channel_ids_conv_11 in channel_ids) { if (this != null) { this.ptrs_to.AddLast(channel_ids_conv_11); }; }; if (this != null) { this.ptrs_to.AddLast(config_update); }; return ret_hu_conv; } @@ -769,14 +1432,15 @@ public class ChannelManager : CommonBase { * [`ChannelUnavailable`]: APIError::ChannelUnavailable * [`APIMisuseError`]: APIError::APIMisuseError */ - public Result_NoneAPIErrorZ update_channel_config(byte[] counterparty_node_id, byte[][] channel_ids, org.ldk.structs.ChannelConfig config) { - long ret = bindings.ChannelManager_update_channel_config(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_node_id, 33)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(channel_ids, channel_ids_conv_8 => InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_ids_conv_8, 32)))), config == null ? 0 : config.ptr); + public Result_NoneAPIErrorZ update_channel_config(byte[] counterparty_node_id, ChannelId[] channel_ids, org.ldk.structs.ChannelConfig config) { + long ret = bindings.ChannelManager_update_channel_config(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_node_id, 33)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(channel_ids, channel_ids_conv_11 => channel_ids_conv_11.ptr)), config.ptr); GC.KeepAlive(this); GC.KeepAlive(counterparty_node_id); GC.KeepAlive(channel_ids); GC.KeepAlive(config); if (ret >= 0 && ret <= 4096) { return null; } Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret); + foreach (ChannelId channel_ids_conv_11 in channel_ids) { if (this != null) { this.ptrs_to.AddLast(channel_ids_conv_11); }; }; if (this != null) { this.ptrs_to.AddLast(config); }; return ret_hu_conv; } @@ -806,8 +1470,8 @@ public class ChannelManager : CommonBase { * [`HTLCIntercepted`]: events::Event::HTLCIntercepted * [`HTLCIntercepted::expected_outbound_amount_msat`]: events::Event::HTLCIntercepted::expected_outbound_amount_msat */ - public Result_NoneAPIErrorZ forward_intercepted_htlc(byte[] intercept_id, byte[] next_hop_channel_id, byte[] next_node_id, long amt_to_forward_msat) { - long ret = bindings.ChannelManager_forward_intercepted_htlc(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(intercept_id, 32)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(next_hop_channel_id, 32)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(next_node_id, 33)), amt_to_forward_msat); + public Result_NoneAPIErrorZ forward_intercepted_htlc(byte[] intercept_id, org.ldk.structs.ChannelId next_hop_channel_id, byte[] next_node_id, long amt_to_forward_msat) { + long ret = bindings.ChannelManager_forward_intercepted_htlc(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(intercept_id, 32)), next_hop_channel_id.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(next_node_id, 33)), amt_to_forward_msat); GC.KeepAlive(this); GC.KeepAlive(intercept_id); GC.KeepAlive(next_hop_channel_id); @@ -815,6 +1479,7 @@ public class ChannelManager : CommonBase { GC.KeepAlive(amt_to_forward_msat); if (ret >= 0 && ret <= 4096) { return null; } Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.AddLast(next_hop_channel_id); }; return ret_hu_conv; } @@ -988,14 +1653,15 @@ public class ChannelManager : CommonBase { * [`Event::OpenChannelRequest`]: events::Event::OpenChannelRequest * [`Event::ChannelClosed::user_channel_id`]: events::Event::ChannelClosed::user_channel_id */ - public Result_NoneAPIErrorZ accept_inbound_channel(byte[] temporary_channel_id, byte[] counterparty_node_id, org.ldk.util.UInt128 user_channel_id) { - long ret = bindings.ChannelManager_accept_inbound_channel(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(temporary_channel_id, 32)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_node_id, 33)), InternalUtils.encodeUint8Array(user_channel_id.getLEBytes())); + public Result_NoneAPIErrorZ accept_inbound_channel(org.ldk.structs.ChannelId temporary_channel_id, byte[] counterparty_node_id, org.ldk.util.UInt128 user_channel_id) { + long ret = bindings.ChannelManager_accept_inbound_channel(this.ptr, temporary_channel_id.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_node_id, 33)), InternalUtils.encodeUint8Array(user_channel_id.getLEBytes())); GC.KeepAlive(this); GC.KeepAlive(temporary_channel_id); GC.KeepAlive(counterparty_node_id); GC.KeepAlive(user_channel_id); if (ret >= 0 && ret <= 4096) { return null; } Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.AddLast(temporary_channel_id); }; return ret_hu_conv; } @@ -1019,14 +1685,113 @@ public class ChannelManager : CommonBase { * [`Event::OpenChannelRequest`]: events::Event::OpenChannelRequest * [`Event::ChannelClosed::user_channel_id`]: events::Event::ChannelClosed::user_channel_id */ - public Result_NoneAPIErrorZ accept_inbound_channel_from_trusted_peer_0conf(byte[] temporary_channel_id, byte[] counterparty_node_id, org.ldk.util.UInt128 user_channel_id) { - long ret = bindings.ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(temporary_channel_id, 32)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_node_id, 33)), InternalUtils.encodeUint8Array(user_channel_id.getLEBytes())); + public Result_NoneAPIErrorZ accept_inbound_channel_from_trusted_peer_0conf(org.ldk.structs.ChannelId temporary_channel_id, byte[] counterparty_node_id, org.ldk.util.UInt128 user_channel_id) { + long ret = bindings.ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(this.ptr, temporary_channel_id.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_node_id, 33)), InternalUtils.encodeUint8Array(user_channel_id.getLEBytes())); GC.KeepAlive(this); GC.KeepAlive(temporary_channel_id); GC.KeepAlive(counterparty_node_id); GC.KeepAlive(user_channel_id); if (ret >= 0 && ret <= 4096) { return null; } Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.AddLast(temporary_channel_id); }; + return ret_hu_conv; + } + + /** + * Creates an [`OfferBuilder`] such that the [`Offer`] it builds is recognized by the + * [`ChannelManager`] when handling [`InvoiceRequest`] messages for the offer. The offer will + * not have an expiration unless otherwise set on the builder. + * + * # Privacy + * + * Uses [`MessageRouter::create_blinded_paths`] to construct a [`BlindedPath`] for the offer. + * However, if one is not found, uses a one-hop [`BlindedPath`] with + * [`ChannelManager::get_our_node_id`] as the introduction node instead. In the latter case, + * the node must be announced, otherwise, there is no way to find a path to the introduction in + * order to send the [`InvoiceRequest`]. + * + * Also, uses a derived signing pubkey in the offer for recipient privacy. + * + * # Limitations + * + * Requires a direct connection to the introduction node in the responding [`InvoiceRequest`]'s + * reply path. + * + * # Errors + * + * Errors if the parameterized [`Router`] is unable to create a blinded path for the offer. + * + * [`Offer`]: crate::offers::offer::Offer + * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest + */ + public Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ create_offer_builder() { + long ret = bindings.ChannelManager_create_offer_builder(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Creates a [`RefundBuilder`] such that the [`Refund`] it builds is recognized by the + * [`ChannelManager`] when handling [`Bolt12Invoice`] messages for the refund. + * + * # Payment + * + * The provided `payment_id` is used to ensure that only one invoice is paid for the refund. + * See [Avoiding Duplicate Payments] for other requirements once the payment has been sent. + * + * The builder will have the provided expiration set. Any changes to the expiration on the + * returned builder will not be honored by [`ChannelManager`]. For `no-std`, the highest seen + * block time minus two hours is used for the current time when determining if the refund has + * expired. + * + * To revoke the refund, use [`ChannelManager::abandon_payment`] prior to receiving the + * invoice. If abandoned, or an invoice isn't received before expiration, the payment will fail + * with an [`Event::InvoiceRequestFailed`]. + * + * If `max_total_routing_fee_msat` is not specified, The default from + * [`RouteParameters::from_payment_params_and_value`] is applied. + * + * # Privacy + * + * Uses [`MessageRouter::create_blinded_paths`] to construct a [`BlindedPath`] for the refund. + * However, if one is not found, uses a one-hop [`BlindedPath`] with + * [`ChannelManager::get_our_node_id`] as the introduction node instead. In the latter case, + * the node must be announced, otherwise, there is no way to find a path to the introduction in + * order to send the [`Bolt12Invoice`]. + * + * Also, uses a derived payer id in the refund for payer privacy. + * + * # Limitations + * + * Requires a direct connection to an introduction node in the responding + * [`Bolt12Invoice::payment_paths`]. + * + * # Errors + * + * Errors if: + * - a duplicate `payment_id` is provided given the caveats in the aforementioned link, + * - `amount_msats` is invalid, or + * - the parameterized [`Router`] is unable to create a blinded path for the refund. + * + * [`Refund`]: crate::offers::refund::Refund + * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice + * [`Bolt12Invoice::payment_paths`]: crate::offers::invoice::Bolt12Invoice::payment_paths + * [Avoiding Duplicate Payments]: #avoiding-duplicate-payments + */ + public Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ create_refund_builder(long amount_msats, long absolute_expiry, byte[] payment_id, org.ldk.structs.Retry retry_strategy, org.ldk.structs.Option_u64Z max_total_routing_fee_msat) { + long ret = bindings.ChannelManager_create_refund_builder(this.ptr, amount_msats, absolute_expiry, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32)), retry_strategy.ptr, max_total_routing_fee_msat.ptr); + GC.KeepAlive(this); + GC.KeepAlive(amount_msats); + GC.KeepAlive(absolute_expiry); + GC.KeepAlive(payment_id); + GC.KeepAlive(retry_strategy); + GC.KeepAlive(max_total_routing_fee_msat); + if (ret >= 0 && ret <= 4096) { return null; } + Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.AddLast(retry_strategy); }; + if (this != null) { this.ptrs_to.AddLast(max_total_routing_fee_msat); }; return ret_hu_conv; } @@ -1074,6 +1839,7 @@ public class ChannelManager : CommonBase { * Errors if: * - a duplicate `payment_id` is provided given the caveats in the aforementioned link, * - the provided parameters are invalid for the offer, + * - the offer is for an unsupported chain, or * - the parameterized [`Router`] is unable to create a blinded reply path for the invoice * request. * @@ -1086,7 +1852,7 @@ public class ChannelManager : CommonBase { * [Avoiding Duplicate Payments]: #avoiding-duplicate-payments */ public Result_NoneBolt12SemanticErrorZ pay_for_offer(org.ldk.structs.Offer offer, org.ldk.structs.Option_u64Z quantity, org.ldk.structs.Option_u64Z amount_msats, org.ldk.structs.Option_StrZ payer_note, byte[] payment_id, org.ldk.structs.Retry retry_strategy, org.ldk.structs.Option_u64Z max_total_routing_fee_msat) { - long ret = bindings.ChannelManager_pay_for_offer(this.ptr, offer == null ? 0 : offer.ptr, quantity.ptr, amount_msats.ptr, payer_note.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32)), retry_strategy.ptr, max_total_routing_fee_msat.ptr); + long ret = bindings.ChannelManager_pay_for_offer(this.ptr, offer.ptr, quantity.ptr, amount_msats.ptr, payer_note.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32)), retry_strategy.ptr, max_total_routing_fee_msat.ptr); GC.KeepAlive(this); GC.KeepAlive(offer); GC.KeepAlive(quantity); @@ -1112,7 +1878,7 @@ public class ChannelManager : CommonBase { * * The resulting invoice uses a [`PaymentHash`] recognized by the [`ChannelManager`] and a * [`BlindedPath`] containing the [`PaymentSecret`] needed to reconstruct the corresponding - * [`PaymentPreimage`]. + * [`PaymentPreimage`]. It is returned purely for informational purposes. * * # Limitations * @@ -1123,17 +1889,19 @@ public class ChannelManager : CommonBase { * * # Errors * - * Errors if the parameterized [`Router`] is unable to create a blinded payment path or reply - * path for the invoice. + * Errors if: + * - the refund is for an unsupported chain, or + * - the parameterized [`Router`] is unable to create a blinded payment path or reply path for + * the invoice. * * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice */ - public Result_NoneBolt12SemanticErrorZ request_refund_payment(org.ldk.structs.Refund refund) { - long ret = bindings.ChannelManager_request_refund_payment(this.ptr, refund == null ? 0 : refund.ptr); + public Result_Bolt12InvoiceBolt12SemanticErrorZ request_refund_payment(org.ldk.structs.Refund refund) { + long ret = bindings.ChannelManager_request_refund_payment(this.ptr, refund.ptr); GC.KeepAlive(this); GC.KeepAlive(refund); if (ret >= 0 && ret <= 4096) { return null; } - Result_NoneBolt12SemanticErrorZ ret_hu_conv = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret); + Result_Bolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_Bolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret); if (this != null) { this.ptrs_to.AddLast(refund); }; return ret_hu_conv; } @@ -1145,10 +1913,9 @@ public class ChannelManager : CommonBase { * This differs from [`create_inbound_payment_for_hash`] only in that it generates the * [`PaymentHash`] and [`PaymentPreimage`] for you. * - * The [`PaymentPreimage`] will ultimately be returned to you in the [`PaymentClaimable`], which - * will have the [`PaymentClaimable::purpose`] be [`PaymentPurpose::InvoicePayment`] with - * its [`PaymentPurpose::InvoicePayment::payment_preimage`] field filled in. That should then be - * passed directly to [`claim_funds`]. + * The [`PaymentPreimage`] will ultimately be returned to you in the [`PaymentClaimable`] event, which + * will have the [`PaymentClaimable::purpose`] return `Some` for [`PaymentPurpose::preimage`]. That + * should then be passed directly to [`claim_funds`]. * * See [`create_inbound_payment_for_hash`] for detailed documentation on behavior and requirements. * @@ -1168,8 +1935,7 @@ public class ChannelManager : CommonBase { * [`claim_funds`]: Self::claim_funds * [`PaymentClaimable`]: events::Event::PaymentClaimable * [`PaymentClaimable::purpose`]: events::Event::PaymentClaimable::purpose - * [`PaymentPurpose::InvoicePayment`]: events::PaymentPurpose::InvoicePayment - * [`PaymentPurpose::InvoicePayment::payment_preimage`]: events::PaymentPurpose::InvoicePayment::payment_preimage + * [`PaymentPurpose::preimage`]: events::PaymentPurpose::preimage * [`create_inbound_payment_for_hash`]: Self::create_inbound_payment_for_hash */ public Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ create_inbound_payment(org.ldk.structs.Option_u64Z min_value_msat, int invoice_expiry_delta_secs, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) { @@ -1389,6 +2155,9 @@ public class ChannelManager : CommonBase { /** * Returns true if this [`ChannelManager`] needs to be persisted. + * + * See [`Self::get_event_or_persistence_needed_future`] for retrieving a [`Future`] that + * indicates this should be checked. */ public bool get_and_clear_needs_persistence() { bool ret = bindings.ChannelManager_get_and_clear_needs_persistence(this.ptr); @@ -1487,6 +2256,19 @@ public class ChannelManager : CommonBase { return ret_hu_conv; } + /** + * Constructs a new NodeIdLookUp which calls the relevant methods on this_arg. + * This copies the `inner` pointer in this_arg and thus the returned NodeIdLookUp must be freed before this_arg is + */ + public NodeIdLookUp as_NodeIdLookUp() { + long ret = bindings.ChannelManager_as_NodeIdLookUp(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + NodeIdLookUp ret_hu_conv = new NodeIdLookUp(null, ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + /** * Serialize the ChannelManager object into a byte array which can be read by ChannelManager_read */ diff --git a/c_sharp/src/org/ldk/structs/ChannelManagerReadArgs.cs b/c_sharp/src/org/ldk/structs/ChannelManagerReadArgs.cs index 624de695..9687cd3c 100644 --- a/c_sharp/src/org/ldk/structs/ChannelManagerReadArgs.cs +++ b/c_sharp/src/org/ldk/structs/ChannelManagerReadArgs.cs @@ -268,7 +268,7 @@ public class ChannelManagerReadArgs : CommonBase { * runtime settings which were stored when the ChannelManager was serialized. */ public void set_default_config(org.ldk.structs.UserConfig val) { - bindings.ChannelManagerReadArgs_set_default_config(this.ptr, val == null ? 0 : val.ptr); + bindings.ChannelManagerReadArgs_set_default_config(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -280,7 +280,7 @@ public class ChannelManagerReadArgs : CommonBase { * populate a HashMap directly from C. */ public static ChannelManagerReadArgs of(org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.SignerProvider signer_provider, org.ldk.structs.FeeEstimator fee_estimator, org.ldk.structs.Watch chain_monitor, org.ldk.structs.BroadcasterInterface tx_broadcaster, org.ldk.structs.Router router, org.ldk.structs.Logger logger, org.ldk.structs.UserConfig default_config, ChannelMonitor[] channel_monitors) { - long ret = bindings.ChannelManagerReadArgs_new(entropy_source.ptr, node_signer.ptr, signer_provider.ptr, fee_estimator.ptr, chain_monitor.ptr, tx_broadcaster.ptr, router.ptr, logger.ptr, default_config == null ? 0 : default_config.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(channel_monitors, channel_monitors_conv_16 => channel_monitors_conv_16 == null ? 0 : channel_monitors_conv_16.ptr))); + long ret = bindings.ChannelManagerReadArgs_new(entropy_source.ptr, node_signer.ptr, signer_provider.ptr, fee_estimator.ptr, chain_monitor.ptr, tx_broadcaster.ptr, router.ptr, logger.ptr, default_config.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(channel_monitors, channel_monitors_conv_16 => channel_monitors_conv_16.ptr))); GC.KeepAlive(entropy_source); GC.KeepAlive(node_signer); GC.KeepAlive(signer_provider); diff --git a/c_sharp/src/org/ldk/structs/ChannelMessageHandler.cs b/c_sharp/src/org/ldk/structs/ChannelMessageHandler.cs index dcd8c559..44ba3874 100644 --- a/c_sharp/src/org/ldk/structs/ChannelMessageHandler.cs +++ b/c_sharp/src/org/ldk/structs/ChannelMessageHandler.cs @@ -40,15 +40,6 @@ public interface ChannelMessageHandlerInterface { /**Handle an incoming `stfu` message from the given peer. */ void handle_stfu(byte[] their_node_id, Stfu msg); - /**Handle an incoming `splice` message from the given peer. - */ - void handle_splice(byte[] their_node_id, Splice msg); - /**Handle an incoming `splice_ack` message from the given peer. - */ - void handle_splice_ack(byte[] their_node_id, SpliceAck msg); - /**Handle an incoming `splice_locked` message from the given peer. - */ - void handle_splice_locked(byte[] their_node_id, SpliceLocked msg); /**Handle an incoming `tx_add_input message` from the given peer. */ void handle_tx_add_input(byte[] their_node_id, TxAddInput msg); @@ -219,24 +210,6 @@ public class ChannelMessageHandler : CommonBase { arg.handle_stfu(_their_node_id_conv, _msg_hu_conv); GC.KeepAlive(arg); } - public void handle_splice(long _their_node_id, long _msg) { - byte[] _their_node_id_conv = InternalUtils.decodeUint8Array(_their_node_id); - org.ldk.structs.Splice _msg_hu_conv = null; if (_msg < 0 || _msg > 4096) { _msg_hu_conv = new org.ldk.structs.Splice(null, _msg); } - arg.handle_splice(_their_node_id_conv, _msg_hu_conv); - GC.KeepAlive(arg); - } - public void handle_splice_ack(long _their_node_id, long _msg) { - byte[] _their_node_id_conv = InternalUtils.decodeUint8Array(_their_node_id); - org.ldk.structs.SpliceAck _msg_hu_conv = null; if (_msg < 0 || _msg > 4096) { _msg_hu_conv = new org.ldk.structs.SpliceAck(null, _msg); } - arg.handle_splice_ack(_their_node_id_conv, _msg_hu_conv); - GC.KeepAlive(arg); - } - public void handle_splice_locked(long _their_node_id, long _msg) { - byte[] _their_node_id_conv = InternalUtils.decodeUint8Array(_their_node_id); - org.ldk.structs.SpliceLocked _msg_hu_conv = null; if (_msg < 0 || _msg > 4096) { _msg_hu_conv = new org.ldk.structs.SpliceLocked(null, _msg); } - arg.handle_splice_locked(_their_node_id_conv, _msg_hu_conv); - GC.KeepAlive(arg); - } public void handle_tx_add_input(long _their_node_id, long _msg) { byte[] _their_node_id_conv = InternalUtils.decodeUint8Array(_their_node_id); org.ldk.structs.TxAddInput _msg_hu_conv = null; if (_msg < 0 || _msg > 4096) { _msg_hu_conv = new org.ldk.structs.TxAddInput(null, _msg); } @@ -349,7 +322,7 @@ public class ChannelMessageHandler : CommonBase { org.ldk.structs.Init _msg_hu_conv = null; if (_msg < 0 || _msg > 4096) { _msg_hu_conv = new org.ldk.structs.Init(null, _msg); } Result_NoneNoneZ ret = arg.peer_connected(_their_node_id_conv, _msg_hu_conv, _inbound); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public void handle_channel_reestablish(long _their_node_id, long _msg) { @@ -373,20 +346,20 @@ public class ChannelMessageHandler : CommonBase { public long provided_node_features() { NodeFeatures ret = arg.provided_node_features(); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long provided_init_features(long _their_node_id) { byte[] _their_node_id_conv = InternalUtils.decodeUint8Array(_their_node_id); InitFeatures ret = arg.provided_init_features(_their_node_id_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long get_chain_hashes() { Option_CVec_ThirtyTwoBytesZZ ret = arg.get_chain_hashes(); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); if (impl_holder.held != null) { impl_holder.held.ptrs_to.AddLast(ret); }; return result; } @@ -410,7 +383,7 @@ public class ChannelMessageHandler : CommonBase { * Handle an incoming `open_channel` message from the given peer. */ public void handle_open_channel(byte[] their_node_id, org.ldk.structs.OpenChannel msg) { - bindings.ChannelMessageHandler_handle_open_channel(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_open_channel(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(msg); @@ -421,7 +394,7 @@ public class ChannelMessageHandler : CommonBase { * Handle an incoming `open_channel2` message from the given peer. */ public void handle_open_channel_v2(byte[] their_node_id, org.ldk.structs.OpenChannelV2 msg) { - bindings.ChannelMessageHandler_handle_open_channel_v2(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_open_channel_v2(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(msg); @@ -432,7 +405,7 @@ public class ChannelMessageHandler : CommonBase { * Handle an incoming `accept_channel` message from the given peer. */ public void handle_accept_channel(byte[] their_node_id, org.ldk.structs.AcceptChannel msg) { - bindings.ChannelMessageHandler_handle_accept_channel(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_accept_channel(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(msg); @@ -443,7 +416,7 @@ public class ChannelMessageHandler : CommonBase { * Handle an incoming `accept_channel2` message from the given peer. */ public void handle_accept_channel_v2(byte[] their_node_id, org.ldk.structs.AcceptChannelV2 msg) { - bindings.ChannelMessageHandler_handle_accept_channel_v2(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_accept_channel_v2(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(msg); @@ -454,7 +427,7 @@ public class ChannelMessageHandler : CommonBase { * Handle an incoming `funding_created` message from the given peer. */ public void handle_funding_created(byte[] their_node_id, org.ldk.structs.FundingCreated msg) { - bindings.ChannelMessageHandler_handle_funding_created(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_funding_created(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(msg); @@ -465,7 +438,7 @@ public class ChannelMessageHandler : CommonBase { * Handle an incoming `funding_signed` message from the given peer. */ public void handle_funding_signed(byte[] their_node_id, org.ldk.structs.FundingSigned msg) { - bindings.ChannelMessageHandler_handle_funding_signed(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_funding_signed(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(msg); @@ -476,7 +449,7 @@ public class ChannelMessageHandler : CommonBase { * Handle an incoming `channel_ready` message from the given peer. */ public void handle_channel_ready(byte[] their_node_id, org.ldk.structs.ChannelReady msg) { - bindings.ChannelMessageHandler_handle_channel_ready(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_channel_ready(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(msg); @@ -487,7 +460,7 @@ public class ChannelMessageHandler : CommonBase { * Handle an incoming `shutdown` message from the given peer. */ public void handle_shutdown(byte[] their_node_id, org.ldk.structs.Shutdown msg) { - bindings.ChannelMessageHandler_handle_shutdown(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_shutdown(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(msg); @@ -498,7 +471,7 @@ public class ChannelMessageHandler : CommonBase { * Handle an incoming `closing_signed` message from the given peer. */ public void handle_closing_signed(byte[] their_node_id, org.ldk.structs.ClosingSigned msg) { - bindings.ChannelMessageHandler_handle_closing_signed(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_closing_signed(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(msg); @@ -509,40 +482,7 @@ public class ChannelMessageHandler : CommonBase { * Handle an incoming `stfu` message from the given peer. */ public void handle_stfu(byte[] their_node_id, org.ldk.structs.Stfu msg) { - bindings.ChannelMessageHandler_handle_stfu(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); - GC.KeepAlive(this); - GC.KeepAlive(their_node_id); - GC.KeepAlive(msg); - if (this != null) { this.ptrs_to.AddLast(msg); }; - } - - /** - * Handle an incoming `splice` message from the given peer. - */ - public void handle_splice(byte[] their_node_id, org.ldk.structs.Splice msg) { - bindings.ChannelMessageHandler_handle_splice(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); - GC.KeepAlive(this); - GC.KeepAlive(their_node_id); - GC.KeepAlive(msg); - if (this != null) { this.ptrs_to.AddLast(msg); }; - } - - /** - * Handle an incoming `splice_ack` message from the given peer. - */ - public void handle_splice_ack(byte[] their_node_id, org.ldk.structs.SpliceAck msg) { - bindings.ChannelMessageHandler_handle_splice_ack(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); - GC.KeepAlive(this); - GC.KeepAlive(their_node_id); - GC.KeepAlive(msg); - if (this != null) { this.ptrs_to.AddLast(msg); }; - } - - /** - * Handle an incoming `splice_locked` message from the given peer. - */ - public void handle_splice_locked(byte[] their_node_id, org.ldk.structs.SpliceLocked msg) { - bindings.ChannelMessageHandler_handle_splice_locked(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_stfu(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(msg); @@ -553,7 +493,7 @@ public class ChannelMessageHandler : CommonBase { * Handle an incoming `tx_add_input message` from the given peer. */ public void handle_tx_add_input(byte[] their_node_id, org.ldk.structs.TxAddInput msg) { - bindings.ChannelMessageHandler_handle_tx_add_input(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_tx_add_input(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(msg); @@ -564,7 +504,7 @@ public class ChannelMessageHandler : CommonBase { * Handle an incoming `tx_add_output` message from the given peer. */ public void handle_tx_add_output(byte[] their_node_id, org.ldk.structs.TxAddOutput msg) { - bindings.ChannelMessageHandler_handle_tx_add_output(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_tx_add_output(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(msg); @@ -575,7 +515,7 @@ public class ChannelMessageHandler : CommonBase { * Handle an incoming `tx_remove_input` message from the given peer. */ public void handle_tx_remove_input(byte[] their_node_id, org.ldk.structs.TxRemoveInput msg) { - bindings.ChannelMessageHandler_handle_tx_remove_input(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_tx_remove_input(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(msg); @@ -586,7 +526,7 @@ public class ChannelMessageHandler : CommonBase { * Handle an incoming `tx_remove_output` message from the given peer. */ public void handle_tx_remove_output(byte[] their_node_id, org.ldk.structs.TxRemoveOutput msg) { - bindings.ChannelMessageHandler_handle_tx_remove_output(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_tx_remove_output(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(msg); @@ -597,7 +537,7 @@ public class ChannelMessageHandler : CommonBase { * Handle an incoming `tx_complete message` from the given peer. */ public void handle_tx_complete(byte[] their_node_id, org.ldk.structs.TxComplete msg) { - bindings.ChannelMessageHandler_handle_tx_complete(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_tx_complete(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(msg); @@ -608,7 +548,7 @@ public class ChannelMessageHandler : CommonBase { * Handle an incoming `tx_signatures` message from the given peer. */ public void handle_tx_signatures(byte[] their_node_id, org.ldk.structs.TxSignatures msg) { - bindings.ChannelMessageHandler_handle_tx_signatures(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_tx_signatures(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(msg); @@ -619,7 +559,7 @@ public class ChannelMessageHandler : CommonBase { * Handle an incoming `tx_init_rbf` message from the given peer. */ public void handle_tx_init_rbf(byte[] their_node_id, org.ldk.structs.TxInitRbf msg) { - bindings.ChannelMessageHandler_handle_tx_init_rbf(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_tx_init_rbf(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(msg); @@ -630,7 +570,7 @@ public class ChannelMessageHandler : CommonBase { * Handle an incoming `tx_ack_rbf` message from the given peer. */ public void handle_tx_ack_rbf(byte[] their_node_id, org.ldk.structs.TxAckRbf msg) { - bindings.ChannelMessageHandler_handle_tx_ack_rbf(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_tx_ack_rbf(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(msg); @@ -641,7 +581,7 @@ public class ChannelMessageHandler : CommonBase { * Handle an incoming `tx_abort message` from the given peer. */ public void handle_tx_abort(byte[] their_node_id, org.ldk.structs.TxAbort msg) { - bindings.ChannelMessageHandler_handle_tx_abort(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_tx_abort(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(msg); @@ -652,7 +592,7 @@ public class ChannelMessageHandler : CommonBase { * Handle an incoming `update_add_htlc` message from the given peer. */ public void handle_update_add_htlc(byte[] their_node_id, org.ldk.structs.UpdateAddHTLC msg) { - bindings.ChannelMessageHandler_handle_update_add_htlc(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_update_add_htlc(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(msg); @@ -663,7 +603,7 @@ public class ChannelMessageHandler : CommonBase { * Handle an incoming `update_fulfill_htlc` message from the given peer. */ public void handle_update_fulfill_htlc(byte[] their_node_id, org.ldk.structs.UpdateFulfillHTLC msg) { - bindings.ChannelMessageHandler_handle_update_fulfill_htlc(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_update_fulfill_htlc(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(msg); @@ -674,7 +614,7 @@ public class ChannelMessageHandler : CommonBase { * Handle an incoming `update_fail_htlc` message from the given peer. */ public void handle_update_fail_htlc(byte[] their_node_id, org.ldk.structs.UpdateFailHTLC msg) { - bindings.ChannelMessageHandler_handle_update_fail_htlc(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_update_fail_htlc(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(msg); @@ -685,7 +625,7 @@ public class ChannelMessageHandler : CommonBase { * Handle an incoming `update_fail_malformed_htlc` message from the given peer. */ public void handle_update_fail_malformed_htlc(byte[] their_node_id, org.ldk.structs.UpdateFailMalformedHTLC msg) { - bindings.ChannelMessageHandler_handle_update_fail_malformed_htlc(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_update_fail_malformed_htlc(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(msg); @@ -696,7 +636,7 @@ public class ChannelMessageHandler : CommonBase { * Handle an incoming `commitment_signed` message from the given peer. */ public void handle_commitment_signed(byte[] their_node_id, org.ldk.structs.CommitmentSigned msg) { - bindings.ChannelMessageHandler_handle_commitment_signed(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_commitment_signed(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(msg); @@ -707,7 +647,7 @@ public class ChannelMessageHandler : CommonBase { * Handle an incoming `revoke_and_ack` message from the given peer. */ public void handle_revoke_and_ack(byte[] their_node_id, org.ldk.structs.RevokeAndACK msg) { - bindings.ChannelMessageHandler_handle_revoke_and_ack(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_revoke_and_ack(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(msg); @@ -718,7 +658,7 @@ public class ChannelMessageHandler : CommonBase { * Handle an incoming `update_fee` message from the given peer. */ public void handle_update_fee(byte[] their_node_id, org.ldk.structs.UpdateFee msg) { - bindings.ChannelMessageHandler_handle_update_fee(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_update_fee(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(msg); @@ -729,7 +669,7 @@ public class ChannelMessageHandler : CommonBase { * Handle an incoming `announcement_signatures` message from the given peer. */ public void handle_announcement_signatures(byte[] their_node_id, org.ldk.structs.AnnouncementSignatures msg) { - bindings.ChannelMessageHandler_handle_announcement_signatures(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_announcement_signatures(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(msg); @@ -753,7 +693,7 @@ public class ChannelMessageHandler : CommonBase { * message handlers may still wish to communicate with this peer. */ public Result_NoneNoneZ peer_connected(byte[] their_node_id, org.ldk.structs.Init msg, bool inbound) { - long ret = bindings.ChannelMessageHandler_peer_connected(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr, inbound); + long ret = bindings.ChannelMessageHandler_peer_connected(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr, inbound); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(msg); @@ -768,7 +708,7 @@ public class ChannelMessageHandler : CommonBase { * Handle an incoming `channel_reestablish` message from the given peer. */ public void handle_channel_reestablish(byte[] their_node_id, org.ldk.structs.ChannelReestablish msg) { - bindings.ChannelMessageHandler_handle_channel_reestablish(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_channel_reestablish(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(msg); @@ -779,7 +719,7 @@ public class ChannelMessageHandler : CommonBase { * Handle an incoming `channel_update` message from the given peer. */ public void handle_channel_update(byte[] their_node_id, org.ldk.structs.ChannelUpdate msg) { - bindings.ChannelMessageHandler_handle_channel_update(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_channel_update(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(msg); @@ -790,7 +730,7 @@ public class ChannelMessageHandler : CommonBase { * Handle an incoming `error` message from the given peer. */ public void handle_error(byte[] their_node_id, org.ldk.structs.ErrorMessage msg) { - bindings.ChannelMessageHandler_handle_error(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); + bindings.ChannelMessageHandler_handle_error(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(msg); diff --git a/c_sharp/src/org/ldk/structs/ChannelMonitor.cs b/c_sharp/src/org/ldk/structs/ChannelMonitor.cs index f16d4fd3..3476e527 100644 --- a/c_sharp/src/org/ldk/structs/ChannelMonitor.cs +++ b/c_sharp/src/org/ldk/structs/ChannelMonitor.cs @@ -61,7 +61,7 @@ public class ChannelMonitor : CommonBase { * panics if the given update is not the next update by update_id. */ public Result_NoneNoneZ update_monitor(org.ldk.structs.ChannelMonitorUpdate updates, org.ldk.structs.BroadcasterInterface broadcaster, org.ldk.structs.FeeEstimator fee_estimator, org.ldk.structs.Logger logger) { - long ret = bindings.ChannelMonitor_update_monitor(this.ptr, updates == null ? 0 : updates.ptr, broadcaster.ptr, fee_estimator.ptr, logger.ptr); + long ret = bindings.ChannelMonitor_update_monitor(this.ptr, updates.ptr, broadcaster.ptr, fee_estimator.ptr, logger.ptr); GC.KeepAlive(this); GC.KeepAlive(updates); GC.KeepAlive(broadcaster); @@ -98,6 +98,18 @@ public class ChannelMonitor : CommonBase { return ret_hu_conv; } + /** + * Gets the channel_id of the channel this ChannelMonitor is monitoring for. + */ + public ChannelId channel_id() { + long ret = bindings.ChannelMonitor_channel_id(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + /** * Gets a list of txids, with their output scripts (in the order they appear in the * transaction), which we must learn about spends of via block_connected(). @@ -222,7 +234,7 @@ public class ChannelMonitor : CommonBase { * [`Persist::update_persisted_channel`]: crate::chain::chainmonitor::Persist::update_persisted_channel */ public CommitmentTransaction[] counterparty_commitment_txs_from_update(org.ldk.structs.ChannelMonitorUpdate update) { - long ret = bindings.ChannelMonitor_counterparty_commitment_txs_from_update(this.ptr, update == null ? 0 : update.ptr); + long ret = bindings.ChannelMonitor_counterparty_commitment_txs_from_update(this.ptr, update.ptr); GC.KeepAlive(this); GC.KeepAlive(update); if (ret >= 0 && ret <= 4096) { return null; } @@ -287,36 +299,25 @@ public class ChannelMonitor : CommonBase { } /** - * Used by [`ChannelManager`] deserialization to broadcast the latest holder state if its copy - * of the channel state was out-of-date. - * - * You may also use this to broadcast the latest local commitment transaction, either because + * You may use this to broadcast the latest local commitment transaction, either because * a monitor update failed or because we've fallen behind (i.e. we've received proof that our * counterparty side knows a revocation secret we gave them that they shouldn't know). * - * Broadcasting these transactions in the second case is UNSAFE, as they allow counterparty + * Broadcasting these transactions in this manner is UNSAFE, as they allow counterparty * side to punish you. Nevertheless you may want to broadcast them if counterparty doesn't * close channel with their commitment transaction after a substantial amount of time. Best * may be to contact the other node operator out-of-band to coordinate other options available * to you. - * - * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager */ - public byte[][] get_latest_holder_commitment_txn(org.ldk.structs.Logger logger) { - long ret = bindings.ChannelMonitor_get_latest_holder_commitment_txn(this.ptr, logger.ptr); + public void broadcast_latest_holder_commitment_txn(org.ldk.structs.BroadcasterInterface broadcaster, org.ldk.structs.FeeEstimator fee_estimator, org.ldk.structs.Logger logger) { + bindings.ChannelMonitor_broadcast_latest_holder_commitment_txn(this.ptr, broadcaster.ptr, fee_estimator.ptr, logger.ptr); GC.KeepAlive(this); + GC.KeepAlive(broadcaster); + GC.KeepAlive(fee_estimator); GC.KeepAlive(logger); - if (ret >= 0 && ret <= 4096) { return null; } - int ret_conv_8_len = InternalUtils.getArrayLength(ret); - byte[][] ret_conv_8_arr = new byte[ret_conv_8_len][]; - for (int i = 0; i < ret_conv_8_len; i++) { - long ret_conv_8 = InternalUtils.getU64ArrayElem(ret, i); - byte[] ret_conv_8_conv = InternalUtils.decodeUint8Array(ret_conv_8); - ret_conv_8_arr[i] = ret_conv_8_conv; - } - bindings.free_buffer(ret); + if (this != null) { this.ptrs_to.AddLast(broadcaster); }; + if (this != null) { this.ptrs_to.AddLast(fee_estimator); }; if (this != null) { this.ptrs_to.AddLast(logger); }; - return ret_conv_8_arr; } /** @@ -333,7 +334,7 @@ public class ChannelMonitor : CommonBase { * [`get_outputs_to_watch`]: #method.get_outputs_to_watch */ public TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ[] block_connected(byte[] header, TwoTuple_usizeTransactionZ[] txdata, int height, org.ldk.structs.BroadcasterInterface broadcaster, org.ldk.structs.FeeEstimator fee_estimator, org.ldk.structs.Logger logger) { - long ret = bindings.ChannelMonitor_block_connected(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(header, 80)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(txdata, txdata_conv_28 => txdata_conv_28 != null ? txdata_conv_28.ptr : 0)), height, broadcaster.ptr, fee_estimator.ptr, logger.ptr); + long ret = bindings.ChannelMonitor_block_connected(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(header, 80)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(txdata, txdata_conv_28 => txdata_conv_28.ptr)), height, broadcaster.ptr, fee_estimator.ptr, logger.ptr); GC.KeepAlive(this); GC.KeepAlive(header); GC.KeepAlive(txdata); @@ -384,7 +385,7 @@ public class ChannelMonitor : CommonBase { * [`block_connected`]: Self::block_connected */ public TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ[] transactions_confirmed(byte[] header, TwoTuple_usizeTransactionZ[] txdata, int height, org.ldk.structs.BroadcasterInterface broadcaster, org.ldk.structs.FeeEstimator fee_estimator, org.ldk.structs.Logger logger) { - long ret = bindings.ChannelMonitor_transactions_confirmed(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(header, 80)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(txdata, txdata_conv_28 => txdata_conv_28 != null ? txdata_conv_28.ptr : 0)), height, broadcaster.ptr, fee_estimator.ptr, logger.ptr); + long ret = bindings.ChannelMonitor_transactions_confirmed(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(header, 80)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(txdata, txdata_conv_28 => txdata_conv_28.ptr)), height, broadcaster.ptr, fee_estimator.ptr, logger.ptr); GC.KeepAlive(this); GC.KeepAlive(header); GC.KeepAlive(txdata); @@ -511,6 +512,21 @@ public class ChannelMonitor : CommonBase { if (this != null) { this.ptrs_to.AddLast(logger); }; } + /** + * Triggers rebroadcasts of pending claims from a force-closed channel after a transaction + * signature generation failure. + */ + public void signer_unblocked(org.ldk.structs.BroadcasterInterface broadcaster, org.ldk.structs.FeeEstimator fee_estimator, org.ldk.structs.Logger logger) { + bindings.ChannelMonitor_signer_unblocked(this.ptr, broadcaster.ptr, fee_estimator.ptr, logger.ptr); + GC.KeepAlive(this); + GC.KeepAlive(broadcaster); + GC.KeepAlive(fee_estimator); + GC.KeepAlive(logger); + if (this != null) { this.ptrs_to.AddLast(broadcaster); }; + if (this != null) { this.ptrs_to.AddLast(fee_estimator); }; + if (this != null) { this.ptrs_to.AddLast(logger); }; + } + /** * Returns the descriptors for relevant outputs (i.e., those that we can spend) within the * transaction if they exist and the transaction has at least [`ANTI_REORG_DELAY`] @@ -549,6 +565,21 @@ public class ChannelMonitor : CommonBase { return ret_conv_27_arr; } + /** + * Checks if the monitor is fully resolved. Resolved monitor is one that has claimed all of + * its outputs and balances (i.e. [`Self::get_claimable_balances`] returns an empty set). + * + * This function returns true only if [`Self::get_claimable_balances`] has been empty for at least + * 4032 blocks as an additional protection against any bugs resulting in spuriously empty balance sets. + */ + public bool is_fully_resolved(org.ldk.structs.Logger logger) { + bool ret = bindings.ChannelMonitor_is_fully_resolved(this.ptr, logger.ptr); + GC.KeepAlive(this); + GC.KeepAlive(logger); + if (this != null) { this.ptrs_to.AddLast(logger); }; + return ret; + } + /** * Gets the balances in this channel which are either claimable by us if we were to * force-close the channel now or which are claimable on-chain (possibly awaiting diff --git a/c_sharp/src/org/ldk/structs/ChannelMonitorUpdate.cs b/c_sharp/src/org/ldk/structs/ChannelMonitorUpdate.cs index cc3bd5d1..265a3a72 100644 --- a/c_sharp/src/org/ldk/structs/ChannelMonitorUpdate.cs +++ b/c_sharp/src/org/ldk/structs/ChannelMonitorUpdate.cs @@ -67,6 +67,38 @@ public class ChannelMonitorUpdate : CommonBase { GC.KeepAlive(val); } + /** + * The channel ID associated with these updates. + * + * Will be `None` for `ChannelMonitorUpdate`s constructed on LDK versions prior to 0.0.121 and + * always `Some` otherwise. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public ChannelId get_channel_id() { + long ret = bindings.ChannelMonitorUpdate_get_channel_id(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * The channel ID associated with these updates. + * + * Will be `None` for `ChannelMonitorUpdate`s constructed on LDK versions prior to 0.0.121 and + * always `Some` otherwise. + * + * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.ChannelMonitorUpdate_set_channel_id(this.ptr, val == null ? 0 : val.ptr); + GC.KeepAlive(this); + GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; + } + internal long clone_ptr() { long ret = bindings.ChannelMonitorUpdate_clone_ptr(this.ptr); GC.KeepAlive(this); @@ -91,7 +123,7 @@ public class ChannelMonitorUpdate : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.ChannelMonitorUpdate b) { - bool ret = bindings.ChannelMonitorUpdate_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.ChannelMonitorUpdate_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/ChannelPublicKeys.cs b/c_sharp/src/org/ldk/structs/ChannelPublicKeys.cs index 43b596e4..c5ca229e 100644 --- a/c_sharp/src/org/ldk/structs/ChannelPublicKeys.cs +++ b/c_sharp/src/org/ldk/structs/ChannelPublicKeys.cs @@ -59,7 +59,7 @@ public class ChannelPublicKeys : CommonBase { * states. */ public void set_revocation_basepoint(org.ldk.structs.RevocationBasepoint val) { - bindings.ChannelPublicKeys_set_revocation_basepoint(this.ptr, val == null ? 0 : val.ptr); + bindings.ChannelPublicKeys_set_revocation_basepoint(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -109,7 +109,7 @@ public class ChannelPublicKeys : CommonBase { * after some delay (or can be claimed via the revocation path). */ public void set_delayed_payment_basepoint(org.ldk.structs.DelayedPaymentBasepoint val) { - bindings.ChannelPublicKeys_set_delayed_payment_basepoint(this.ptr, val == null ? 0 : val.ptr); + bindings.ChannelPublicKeys_set_delayed_payment_basepoint(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -133,7 +133,7 @@ public class ChannelPublicKeys : CommonBase { * which is used to encumber HTLC-in-flight outputs. */ public void set_htlc_basepoint(org.ldk.structs.HtlcBasepoint val) { - bindings.ChannelPublicKeys_set_htlc_basepoint(this.ptr, val == null ? 0 : val.ptr); + bindings.ChannelPublicKeys_set_htlc_basepoint(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -143,7 +143,7 @@ public class ChannelPublicKeys : CommonBase { * Constructs a new ChannelPublicKeys given each field */ public static ChannelPublicKeys of(byte[] funding_pubkey_arg, org.ldk.structs.RevocationBasepoint revocation_basepoint_arg, byte[] payment_point_arg, org.ldk.structs.DelayedPaymentBasepoint delayed_payment_basepoint_arg, org.ldk.structs.HtlcBasepoint htlc_basepoint_arg) { - long ret = bindings.ChannelPublicKeys_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(funding_pubkey_arg, 33)), revocation_basepoint_arg == null ? 0 : revocation_basepoint_arg.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_point_arg, 33)), delayed_payment_basepoint_arg == null ? 0 : delayed_payment_basepoint_arg.ptr, htlc_basepoint_arg == null ? 0 : htlc_basepoint_arg.ptr); + long ret = bindings.ChannelPublicKeys_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(funding_pubkey_arg, 33)), revocation_basepoint_arg.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_point_arg, 33)), delayed_payment_basepoint_arg.ptr, htlc_basepoint_arg.ptr); GC.KeepAlive(funding_pubkey_arg); GC.KeepAlive(revocation_basepoint_arg); GC.KeepAlive(payment_point_arg); @@ -194,7 +194,7 @@ public class ChannelPublicKeys : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.ChannelPublicKeys b) { - bool ret = bindings.ChannelPublicKeys_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.ChannelPublicKeys_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/ChannelReady.cs b/c_sharp/src/org/ldk/structs/ChannelReady.cs index 358001a7..58f84613 100644 --- a/c_sharp/src/org/ldk/structs/ChannelReady.cs +++ b/c_sharp/src/org/ldk/structs/ChannelReady.cs @@ -20,21 +20,23 @@ public class ChannelReady : CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { + public ChannelId get_channel_id() { long ret = bindings.ChannelReady_get_channel_id(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.ChannelReady_set_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.ChannelReady_set_channel_id(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** @@ -88,14 +90,15 @@ public class ChannelReady : CommonBase { /** * Constructs a new ChannelReady given each field */ - public static ChannelReady of(byte[] channel_id_arg, byte[] next_per_commitment_point_arg, org.ldk.structs.Option_u64Z short_channel_id_alias_arg) { - long ret = bindings.ChannelReady_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id_arg, 32)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(next_per_commitment_point_arg, 33)), short_channel_id_alias_arg.ptr); + public static ChannelReady of(org.ldk.structs.ChannelId channel_id_arg, byte[] next_per_commitment_point_arg, org.ldk.structs.Option_u64Z short_channel_id_alias_arg) { + long ret = bindings.ChannelReady_new(channel_id_arg.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(next_per_commitment_point_arg, 33)), short_channel_id_alias_arg.ptr); GC.KeepAlive(channel_id_arg); GC.KeepAlive(next_per_commitment_point_arg); GC.KeepAlive(short_channel_id_alias_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.ChannelReady ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelReady(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id_arg); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(short_channel_id_alias_arg); }; return ret_hu_conv; } @@ -136,7 +139,7 @@ public class ChannelReady : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.ChannelReady b) { - bool ret = bindings.ChannelReady_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.ChannelReady_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/ChannelReestablish.cs b/c_sharp/src/org/ldk/structs/ChannelReestablish.cs index 5d3bd223..eafbfed2 100644 --- a/c_sharp/src/org/ldk/structs/ChannelReestablish.cs +++ b/c_sharp/src/org/ldk/structs/ChannelReestablish.cs @@ -20,21 +20,23 @@ public class ChannelReestablish : CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { + public ChannelId get_channel_id() { long ret = bindings.ChannelReestablish_get_channel_id(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.ChannelReestablish_set_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.ChannelReestablish_set_channel_id(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** @@ -140,8 +142,8 @@ public class ChannelReestablish : CommonBase { /** * Constructs a new ChannelReestablish given each field */ - public static ChannelReestablish of(byte[] channel_id_arg, long next_local_commitment_number_arg, long next_remote_commitment_number_arg, byte[] your_last_per_commitment_secret_arg, byte[] my_current_per_commitment_point_arg, org.ldk.structs.Option_ThirtyTwoBytesZ next_funding_txid_arg) { - long ret = bindings.ChannelReestablish_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id_arg, 32)), next_local_commitment_number_arg, next_remote_commitment_number_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(your_last_per_commitment_secret_arg, 32)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(my_current_per_commitment_point_arg, 33)), next_funding_txid_arg.ptr); + public static ChannelReestablish of(org.ldk.structs.ChannelId channel_id_arg, long next_local_commitment_number_arg, long next_remote_commitment_number_arg, byte[] your_last_per_commitment_secret_arg, byte[] my_current_per_commitment_point_arg, org.ldk.structs.Option_ThirtyTwoBytesZ next_funding_txid_arg) { + long ret = bindings.ChannelReestablish_new(channel_id_arg.ptr, next_local_commitment_number_arg, next_remote_commitment_number_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(your_last_per_commitment_secret_arg, 32)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(my_current_per_commitment_point_arg, 33)), next_funding_txid_arg.ptr); GC.KeepAlive(channel_id_arg); GC.KeepAlive(next_local_commitment_number_arg); GC.KeepAlive(next_remote_commitment_number_arg); @@ -151,6 +153,7 @@ public class ChannelReestablish : CommonBase { if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.ChannelReestablish ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelReestablish(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id_arg); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(next_funding_txid_arg); }; return ret_hu_conv; } @@ -191,7 +194,7 @@ public class ChannelReestablish : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.ChannelReestablish b) { - bool ret = bindings.ChannelReestablish_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.ChannelReestablish_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/ChannelSigner.cs b/c_sharp/src/org/ldk/structs/ChannelSigner.cs index 66e4cd68..1be5e84b 100644 --- a/c_sharp/src/org/ldk/structs/ChannelSigner.cs +++ b/c_sharp/src/org/ldk/structs/ChannelSigner.cs @@ -106,14 +106,14 @@ public class ChannelSigner : CommonBase { bindings.free_buffer(_outbound_htlc_preimages); Result_NoneNoneZ ret = arg.validate_holder_commitment(_holder_tx_hu_conv, _outbound_htlc_preimages_conv_8_arr); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long validate_counterparty_revocation(long _idx, long _secret) { byte[] _secret_conv = InternalUtils.decodeUint8Array(_secret); Result_NoneNoneZ ret = arg.validate_counterparty_revocation(_idx, _secret_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long channel_keys_id() { @@ -133,7 +133,7 @@ public class ChannelSigner : CommonBase { public static ChannelSigner new_impl(ChannelSignerInterface arg, ChannelPublicKeys pubkeys) { LDKChannelSignerHolder impl_holder = new LDKChannelSignerHolder(); LDKChannelSignerImpl impl = new LDKChannelSignerImpl(arg, impl_holder); - long[] ptr_idx = bindings.LDKChannelSigner_new(impl, pubkeys == null ? 0 : pubkeys.clone_ptr()); + long[] ptr_idx = bindings.LDKChannelSigner_new(impl, pubkeys.clone_ptr()); impl_holder.held = new ChannelSigner(null, ptr_idx[0]); impl_holder.held.instance_idx = ptr_idx[1]; @@ -190,7 +190,7 @@ public class ChannelSigner : CommonBase { * irrelevant or duplicate preimages. */ public Result_NoneNoneZ validate_holder_commitment(org.ldk.structs.HolderCommitmentTransaction holder_tx, byte[][] outbound_htlc_preimages) { - long ret = bindings.ChannelSigner_validate_holder_commitment(this.ptr, holder_tx == null ? 0 : holder_tx.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(outbound_htlc_preimages, outbound_htlc_preimages_conv_8 => InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(outbound_htlc_preimages_conv_8, 32))))); + long ret = bindings.ChannelSigner_validate_holder_commitment(this.ptr, holder_tx.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(outbound_htlc_preimages, outbound_htlc_preimages_conv_8 => InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(outbound_htlc_preimages_conv_8, 32))))); GC.KeepAlive(this); GC.KeepAlive(holder_tx); GC.KeepAlive(outbound_htlc_preimages); @@ -241,7 +241,7 @@ public class ChannelSigner : CommonBase { * channel_parameters.is_populated() MUST be true. */ public void provide_channel_parameters(org.ldk.structs.ChannelTransactionParameters channel_parameters) { - bindings.ChannelSigner_provide_channel_parameters(this.ptr, channel_parameters == null ? 0 : channel_parameters.ptr); + bindings.ChannelSigner_provide_channel_parameters(this.ptr, channel_parameters.ptr); GC.KeepAlive(this); GC.KeepAlive(channel_parameters); if (this != null) { this.ptrs_to.AddLast(channel_parameters); }; diff --git a/c_sharp/src/org/ldk/structs/ChannelTransactionParameters.cs b/c_sharp/src/org/ldk/structs/ChannelTransactionParameters.cs index 974dfe6b..a411cec1 100644 --- a/c_sharp/src/org/ldk/structs/ChannelTransactionParameters.cs +++ b/c_sharp/src/org/ldk/structs/ChannelTransactionParameters.cs @@ -35,7 +35,7 @@ public class ChannelTransactionParameters : CommonBase { * Holder public keys */ public void set_holder_pubkeys(org.ldk.structs.ChannelPublicKeys val) { - bindings.ChannelTransactionParameters_set_holder_pubkeys(this.ptr, val == null ? 0 : val.ptr); + bindings.ChannelTransactionParameters_set_holder_pubkeys(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -151,7 +151,7 @@ public class ChannelTransactionParameters : CommonBase { * wasn't serialized, it will default to static_remote_key at deserialization. */ public void set_channel_type_features(org.ldk.structs.ChannelTypeFeatures val) { - bindings.ChannelTransactionParameters_set_channel_type_features(this.ptr, val == null ? 0 : val.ptr); + bindings.ChannelTransactionParameters_set_channel_type_features(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -164,7 +164,7 @@ public class ChannelTransactionParameters : CommonBase { * Note that funding_outpoint_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ public static ChannelTransactionParameters of(org.ldk.structs.ChannelPublicKeys holder_pubkeys_arg, short holder_selected_contest_delay_arg, bool is_outbound_from_holder_arg, org.ldk.structs.CounterpartyChannelTransactionParameters counterparty_parameters_arg, org.ldk.structs.OutPoint funding_outpoint_arg, org.ldk.structs.ChannelTypeFeatures channel_type_features_arg) { - long ret = bindings.ChannelTransactionParameters_new(holder_pubkeys_arg == null ? 0 : holder_pubkeys_arg.ptr, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg == null ? 0 : counterparty_parameters_arg.ptr, funding_outpoint_arg == null ? 0 : funding_outpoint_arg.ptr, channel_type_features_arg == null ? 0 : channel_type_features_arg.ptr); + long ret = bindings.ChannelTransactionParameters_new(holder_pubkeys_arg.ptr, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg == null ? 0 : counterparty_parameters_arg.ptr, funding_outpoint_arg == null ? 0 : funding_outpoint_arg.ptr, channel_type_features_arg.ptr); GC.KeepAlive(holder_pubkeys_arg); GC.KeepAlive(holder_selected_contest_delay_arg); GC.KeepAlive(is_outbound_from_holder_arg); @@ -217,7 +217,7 @@ public class ChannelTransactionParameters : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.ChannelTransactionParameters b) { - bool ret = bindings.ChannelTransactionParameters_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.ChannelTransactionParameters_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/ChannelTypeFeatures.cs b/c_sharp/src/org/ldk/structs/ChannelTypeFeatures.cs index 4bd502d5..908c3f16 100644 --- a/c_sharp/src/org/ldk/structs/ChannelTypeFeatures.cs +++ b/c_sharp/src/org/ldk/structs/ChannelTypeFeatures.cs @@ -30,7 +30,7 @@ public class ChannelTypeFeatures : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.ChannelTypeFeatures b) { - bool ret = bindings.ChannelTypeFeatures_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.ChannelTypeFeatures_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; @@ -86,7 +86,7 @@ public class ChannelTypeFeatures : CommonBase { * Returns true if this `Features` object contains required features unknown by `other`. */ public bool requires_unknown_bits_from(org.ldk.structs.ChannelTypeFeatures other) { - bool ret = bindings.ChannelTypeFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr); + bool ret = bindings.ChannelTypeFeatures_requires_unknown_bits_from(this.ptr, other.ptr); GC.KeepAlive(this); GC.KeepAlive(other); if (this != null) { this.ptrs_to.AddLast(other); }; diff --git a/c_sharp/src/org/ldk/structs/ChannelUpdate.cs b/c_sharp/src/org/ldk/structs/ChannelUpdate.cs index 8d47ee1c..4a47de09 100644 --- a/c_sharp/src/org/ldk/structs/ChannelUpdate.cs +++ b/c_sharp/src/org/ldk/structs/ChannelUpdate.cs @@ -53,7 +53,7 @@ public class ChannelUpdate : CommonBase { * The actual channel update */ public void set_contents(org.ldk.structs.UnsignedChannelUpdate val) { - bindings.ChannelUpdate_set_contents(this.ptr, val == null ? 0 : val.ptr); + bindings.ChannelUpdate_set_contents(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -63,7 +63,7 @@ public class ChannelUpdate : CommonBase { * Constructs a new ChannelUpdate given each field */ public static ChannelUpdate of(byte[] signature_arg, org.ldk.structs.UnsignedChannelUpdate contents_arg) { - long ret = bindings.ChannelUpdate_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(signature_arg, 64)), contents_arg == null ? 0 : contents_arg.ptr); + long ret = bindings.ChannelUpdate_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(signature_arg, 64)), contents_arg.ptr); GC.KeepAlive(signature_arg); GC.KeepAlive(contents_arg); if (ret >= 0 && ret <= 4096) { return null; } @@ -109,7 +109,7 @@ public class ChannelUpdate : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.ChannelUpdate b) { - bool ret = bindings.ChannelUpdate_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.ChannelUpdate_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/ChannelUpdateInfo.cs b/c_sharp/src/org/ldk/structs/ChannelUpdateInfo.cs index 164682b0..604865b2 100644 --- a/c_sharp/src/org/ldk/structs/ChannelUpdateInfo.cs +++ b/c_sharp/src/org/ldk/structs/ChannelUpdateInfo.cs @@ -123,7 +123,7 @@ public class ChannelUpdateInfo : CommonBase { * Fees charged when the channel is used for routing */ public void set_fees(org.ldk.structs.RoutingFees val) { - bindings.ChannelUpdateInfo_set_fees(this.ptr, val == null ? 0 : val.ptr); + bindings.ChannelUpdateInfo_set_fees(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -167,7 +167,7 @@ public class ChannelUpdateInfo : CommonBase { * Note that last_update_message_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ public static ChannelUpdateInfo of(int last_update_arg, bool enabled_arg, short cltv_expiry_delta_arg, long htlc_minimum_msat_arg, long htlc_maximum_msat_arg, org.ldk.structs.RoutingFees fees_arg, org.ldk.structs.ChannelUpdate last_update_message_arg) { - long ret = bindings.ChannelUpdateInfo_new(last_update_arg, enabled_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg, fees_arg == null ? 0 : fees_arg.ptr, last_update_message_arg == null ? 0 : last_update_message_arg.ptr); + long ret = bindings.ChannelUpdateInfo_new(last_update_arg, enabled_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg, fees_arg.ptr, last_update_message_arg == null ? 0 : last_update_message_arg.ptr); GC.KeepAlive(last_update_arg); GC.KeepAlive(enabled_arg); GC.KeepAlive(cltv_expiry_delta_arg); @@ -207,7 +207,7 @@ public class ChannelUpdateInfo : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.ChannelUpdateInfo b) { - bool ret = bindings.ChannelUpdateInfo_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.ChannelUpdateInfo_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/ClaimedHTLC.cs b/c_sharp/src/org/ldk/structs/ClaimedHTLC.cs index 0b64dad1..890d3e47 100644 --- a/c_sharp/src/org/ldk/structs/ClaimedHTLC.cs +++ b/c_sharp/src/org/ldk/structs/ClaimedHTLC.cs @@ -18,21 +18,23 @@ public class ClaimedHTLC : CommonBase { /** * The `channel_id` of the channel over which the HTLC was received. */ - public byte[] get_channel_id() { + public ChannelId get_channel_id() { long ret = bindings.ClaimedHTLC_get_channel_id(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** * The `channel_id` of the channel over which the HTLC was received. */ - public void set_channel_id(byte[] val) { - bindings.ClaimedHTLC_set_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.ClaimedHTLC_set_channel_id(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** @@ -142,8 +144,8 @@ public class ClaimedHTLC : CommonBase { /** * Constructs a new ClaimedHTLC given each field */ - public static ClaimedHTLC of(byte[] channel_id_arg, org.ldk.util.UInt128 user_channel_id_arg, int cltv_expiry_arg, long value_msat_arg, long counterparty_skimmed_fee_msat_arg) { - long ret = bindings.ClaimedHTLC_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id_arg, 32)), InternalUtils.encodeUint8Array(user_channel_id_arg.getLEBytes()), cltv_expiry_arg, value_msat_arg, counterparty_skimmed_fee_msat_arg); + public static ClaimedHTLC of(org.ldk.structs.ChannelId channel_id_arg, org.ldk.util.UInt128 user_channel_id_arg, int cltv_expiry_arg, long value_msat_arg, long counterparty_skimmed_fee_msat_arg) { + long ret = bindings.ClaimedHTLC_new(channel_id_arg.ptr, InternalUtils.encodeUint8Array(user_channel_id_arg.getLEBytes()), cltv_expiry_arg, value_msat_arg, counterparty_skimmed_fee_msat_arg); GC.KeepAlive(channel_id_arg); GC.KeepAlive(user_channel_id_arg); GC.KeepAlive(cltv_expiry_arg); @@ -152,6 +154,7 @@ public class ClaimedHTLC : CommonBase { if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.ClaimedHTLC ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ClaimedHTLC(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id_arg); }; return ret_hu_conv; } @@ -179,7 +182,7 @@ public class ClaimedHTLC : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.ClaimedHTLC b) { - bool ret = bindings.ClaimedHTLC_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.ClaimedHTLC_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/ClosingSigned.cs b/c_sharp/src/org/ldk/structs/ClosingSigned.cs index 08f6cac9..9f47f3db 100644 --- a/c_sharp/src/org/ldk/structs/ClosingSigned.cs +++ b/c_sharp/src/org/ldk/structs/ClosingSigned.cs @@ -20,21 +20,23 @@ public class ClosingSigned : CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { + public ChannelId get_channel_id() { long ret = bindings.ClosingSigned_get_channel_id(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.ClosingSigned_set_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.ClosingSigned_set_channel_id(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** @@ -108,8 +110,8 @@ public class ClosingSigned : CommonBase { * * Note that fee_range_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public static ClosingSigned of(byte[] channel_id_arg, long fee_satoshis_arg, byte[] signature_arg, org.ldk.structs.ClosingSignedFeeRange fee_range_arg) { - long ret = bindings.ClosingSigned_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id_arg, 32)), fee_satoshis_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(signature_arg, 64)), fee_range_arg == null ? 0 : fee_range_arg.ptr); + public static ClosingSigned of(org.ldk.structs.ChannelId channel_id_arg, long fee_satoshis_arg, byte[] signature_arg, org.ldk.structs.ClosingSignedFeeRange fee_range_arg) { + long ret = bindings.ClosingSigned_new(channel_id_arg.ptr, fee_satoshis_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(signature_arg, 64)), fee_range_arg == null ? 0 : fee_range_arg.ptr); GC.KeepAlive(channel_id_arg); GC.KeepAlive(fee_satoshis_arg); GC.KeepAlive(signature_arg); @@ -117,6 +119,7 @@ public class ClosingSigned : CommonBase { if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.ClosingSigned ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ClosingSigned(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id_arg); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(fee_range_arg); }; return ret_hu_conv; } @@ -157,7 +160,7 @@ public class ClosingSigned : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.ClosingSigned b) { - bool ret = bindings.ClosingSigned_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.ClosingSigned_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/ClosingSignedFeeRange.cs b/c_sharp/src/org/ldk/structs/ClosingSignedFeeRange.cs index 72f5aee8..9d6098d9 100644 --- a/c_sharp/src/org/ldk/structs/ClosingSignedFeeRange.cs +++ b/c_sharp/src/org/ldk/structs/ClosingSignedFeeRange.cs @@ -107,7 +107,7 @@ public class ClosingSignedFeeRange : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.ClosingSignedFeeRange b) { - bool ret = bindings.ClosingSignedFeeRange_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.ClosingSignedFeeRange_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/ClosingTransaction.cs b/c_sharp/src/org/ldk/structs/ClosingTransaction.cs index c6f33357..c30ec343 100644 --- a/c_sharp/src/org/ldk/structs/ClosingTransaction.cs +++ b/c_sharp/src/org/ldk/structs/ClosingTransaction.cs @@ -55,7 +55,7 @@ public class ClosingTransaction : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.ClosingTransaction b) { - bool ret = bindings.ClosingTransaction_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.ClosingTransaction_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; @@ -70,7 +70,7 @@ public class ClosingTransaction : CommonBase { * Construct an object of the class */ public static ClosingTransaction of(long to_holder_value_sat, long to_counterparty_value_sat, byte[] to_holder_script, byte[] to_counterparty_script, org.ldk.structs.OutPoint funding_outpoint) { - long ret = bindings.ClosingTransaction_new(to_holder_value_sat, to_counterparty_value_sat, InternalUtils.encodeUint8Array(to_holder_script), InternalUtils.encodeUint8Array(to_counterparty_script), funding_outpoint == null ? 0 : funding_outpoint.ptr); + long ret = bindings.ClosingTransaction_new(to_holder_value_sat, to_counterparty_value_sat, InternalUtils.encodeUint8Array(to_holder_script), InternalUtils.encodeUint8Array(to_counterparty_script), funding_outpoint.ptr); GC.KeepAlive(to_holder_value_sat); GC.KeepAlive(to_counterparty_value_sat); GC.KeepAlive(to_holder_script); @@ -109,7 +109,7 @@ public class ClosingTransaction : CommonBase { * or using the built transaction. */ public Result_TrustedClosingTransactionNoneZ verify(org.ldk.structs.OutPoint funding_outpoint) { - long ret = bindings.ClosingTransaction_verify(this.ptr, funding_outpoint == null ? 0 : funding_outpoint.ptr); + long ret = bindings.ClosingTransaction_verify(this.ptr, funding_outpoint.ptr); GC.KeepAlive(this); GC.KeepAlive(funding_outpoint); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/c_sharp/src/org/ldk/structs/ClosureReason.cs b/c_sharp/src/org/ldk/structs/ClosureReason.cs index 87a3088f..6bf19ab1 100644 --- a/c_sharp/src/org/ldk/structs/ClosureReason.cs +++ b/c_sharp/src/org/ldk/structs/ClosureReason.cs @@ -19,14 +19,17 @@ public class ClosureReason : CommonBase { switch (raw_ty) { case 0: return new ClosureReason_CounterpartyForceClosed(ptr); case 1: return new ClosureReason_HolderForceClosed(ptr); - case 2: return new ClosureReason_CooperativeClosure(ptr); - case 3: return new ClosureReason_CommitmentTxConfirmed(ptr); - case 4: return new ClosureReason_FundingTimedOut(ptr); - case 5: return new ClosureReason_ProcessingError(ptr); - case 6: return new ClosureReason_DisconnectedPeer(ptr); - case 7: return new ClosureReason_OutdatedChannelManager(ptr); - case 8: return new ClosureReason_CounterpartyCoopClosedUnfundedChannel(ptr); - case 9: return new ClosureReason_FundingBatchClosure(ptr); + case 2: return new ClosureReason_LegacyCooperativeClosure(ptr); + case 3: return new ClosureReason_CounterpartyInitiatedCooperativeClosure(ptr); + case 4: return new ClosureReason_LocallyInitiatedCooperativeClosure(ptr); + case 5: return new ClosureReason_CommitmentTxConfirmed(ptr); + case 6: return new ClosureReason_FundingTimedOut(ptr); + case 7: return new ClosureReason_ProcessingError(ptr); + case 8: return new ClosureReason_DisconnectedPeer(ptr); + case 9: return new ClosureReason_OutdatedChannelManager(ptr); + case 10: return new ClosureReason_CounterpartyCoopClosedUnfundedChannel(ptr); + case 11: return new ClosureReason_FundingBatchClosure(ptr); + case 12: return new ClosureReason_HTLCsTimedOut(ptr); default: throw new ArgumentException("Impossible enum variant"); } @@ -56,9 +59,19 @@ public class ClosureReason : CommonBase { internal ClosureReason_HolderForceClosed(long ptr) : base(null, ptr) { } } - /** A ClosureReason of type CooperativeClosure */ - public class ClosureReason_CooperativeClosure : ClosureReason { - internal ClosureReason_CooperativeClosure(long ptr) : base(null, ptr) { + /** A ClosureReason of type LegacyCooperativeClosure */ + public class ClosureReason_LegacyCooperativeClosure : ClosureReason { + internal ClosureReason_LegacyCooperativeClosure(long ptr) : base(null, ptr) { + } + } + /** A ClosureReason of type CounterpartyInitiatedCooperativeClosure */ + public class ClosureReason_CounterpartyInitiatedCooperativeClosure : ClosureReason { + internal ClosureReason_CounterpartyInitiatedCooperativeClosure(long ptr) : base(null, ptr) { + } + } + /** A ClosureReason of type LocallyInitiatedCooperativeClosure */ + public class ClosureReason_LocallyInitiatedCooperativeClosure : ClosureReason { + internal ClosureReason_LocallyInitiatedCooperativeClosure(long ptr) : base(null, ptr) { } } /** A ClosureReason of type CommitmentTxConfirmed */ @@ -103,6 +116,11 @@ public class ClosureReason : CommonBase { internal ClosureReason_FundingBatchClosure(long ptr) : base(null, ptr) { } } + /** A ClosureReason of type HTLCsTimedOut */ + public class ClosureReason_HTLCsTimedOut : ClosureReason { + internal ClosureReason_HTLCsTimedOut(long ptr) : base(null, ptr) { + } + } internal long clone_ptr() { long ret = bindings.ClosureReason_clone_ptr(this.ptr); GC.KeepAlive(this); @@ -125,7 +143,7 @@ public class ClosureReason : CommonBase { * Utility method to constructs a new CounterpartyForceClosed-variant ClosureReason */ public static ClosureReason counterparty_force_closed(org.ldk.structs.UntrustedString peer_msg) { - long ret = bindings.ClosureReason_counterparty_force_closed(peer_msg == null ? 0 : peer_msg.ptr); + long ret = bindings.ClosureReason_counterparty_force_closed(peer_msg.ptr); GC.KeepAlive(peer_msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.ClosureReason ret_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(ret); @@ -146,10 +164,32 @@ public class ClosureReason : CommonBase { } /** - * Utility method to constructs a new CooperativeClosure-variant ClosureReason + * Utility method to constructs a new LegacyCooperativeClosure-variant ClosureReason + */ + public static ClosureReason legacy_cooperative_closure() { + long ret = bindings.ClosureReason_legacy_cooperative_closure(); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ClosureReason ret_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new CounterpartyInitiatedCooperativeClosure-variant ClosureReason + */ + public static ClosureReason counterparty_initiated_cooperative_closure() { + long ret = bindings.ClosureReason_counterparty_initiated_cooperative_closure(); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ClosureReason ret_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new LocallyInitiatedCooperativeClosure-variant ClosureReason */ - public static ClosureReason cooperative_closure() { - long ret = bindings.ClosureReason_cooperative_closure(); + public static ClosureReason locally_initiated_cooperative_closure() { + long ret = bindings.ClosureReason_locally_initiated_cooperative_closure(); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.ClosureReason ret_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; @@ -234,12 +274,23 @@ public class ClosureReason : CommonBase { return ret_hu_conv; } + /** + * Utility method to constructs a new HTLCsTimedOut-variant ClosureReason + */ + public static ClosureReason htlcs_timed_out() { + long ret = bindings.ClosureReason_htlcs_timed_out(); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ClosureReason ret_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + /** * Checks if two ClosureReasons contain equal inner contents. * This ignores pointers and is_owned flags and looks at the values in fields. */ public bool eq(org.ldk.structs.ClosureReason b) { - bool ret = bindings.ClosureReason_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.ClosureReason_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); return ret; diff --git a/c_sharp/src/org/ldk/structs/CoinSelection.cs b/c_sharp/src/org/ldk/structs/CoinSelection.cs index 2db0813c..d136e2e6 100644 --- a/c_sharp/src/org/ldk/structs/CoinSelection.cs +++ b/c_sharp/src/org/ldk/structs/CoinSelection.cs @@ -41,7 +41,7 @@ public class CoinSelection : CommonBase { * requiring additional fees. */ public void set_confirmed_utxos(Utxo[] val) { - bindings.CoinSelection_set_confirmed_utxos(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(val, val_conv_6 => val_conv_6 == null ? 0 : val_conv_6.ptr))); + bindings.CoinSelection_set_confirmed_utxos(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(val, val_conv_6 => val_conv_6.ptr))); GC.KeepAlive(this); GC.KeepAlive(val); foreach (Utxo val_conv_6 in val) { if (this != null) { this.ptrs_to.AddLast(val_conv_6); }; }; @@ -79,7 +79,7 @@ public class CoinSelection : CommonBase { * Constructs a new CoinSelection given each field */ public static CoinSelection of(Utxo[] confirmed_utxos_arg, org.ldk.structs.Option_TxOutZ change_output_arg) { - long ret = bindings.CoinSelection_new(InternalUtils.encodeUint64Array(InternalUtils.mapArray(confirmed_utxos_arg, confirmed_utxos_arg_conv_6 => confirmed_utxos_arg_conv_6 == null ? 0 : confirmed_utxos_arg_conv_6.ptr)), change_output_arg.ptr); + long ret = bindings.CoinSelection_new(InternalUtils.encodeUint64Array(InternalUtils.mapArray(confirmed_utxos_arg, confirmed_utxos_arg_conv_6 => confirmed_utxos_arg_conv_6.ptr)), change_output_arg.ptr); GC.KeepAlive(confirmed_utxos_arg); GC.KeepAlive(change_output_arg); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/c_sharp/src/org/ldk/structs/CoinSelectionSource.cs b/c_sharp/src/org/ldk/structs/CoinSelectionSource.cs index 0e7a74b0..4ac1715b 100644 --- a/c_sharp/src/org/ldk/structs/CoinSelectionSource.cs +++ b/c_sharp/src/org/ldk/structs/CoinSelectionSource.cs @@ -88,14 +88,14 @@ public class CoinSelectionSource : CommonBase { bindings.free_buffer(_must_pay_to); Result_CoinSelectionNoneZ ret = arg.select_confirmed_utxos(_claim_id_conv, _must_spend_conv_7_arr, _must_pay_to_conv_7_arr, _target_feerate_sat_per_1000_weight); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long sign_psbt(long _psbt) { byte[] _psbt_conv = InternalUtils.decodeUint8Array(_psbt); Result_TransactionNoneZ ret = arg.sign_psbt(_psbt_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } } @@ -141,7 +141,7 @@ public class CoinSelectionSource : CommonBase { * set of other claims being double spent to a minimum. */ public Result_CoinSelectionNoneZ select_confirmed_utxos(byte[] claim_id, Input[] must_spend, TxOut[] must_pay_to, int target_feerate_sat_per_1000_weight) { - long ret = bindings.CoinSelectionSource_select_confirmed_utxos(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(claim_id, 32)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(must_spend, must_spend_conv_7 => must_spend_conv_7 == null ? 0 : must_spend_conv_7.ptr)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(must_pay_to, must_pay_to_conv_7 => must_pay_to_conv_7.ptr)), target_feerate_sat_per_1000_weight); + long ret = bindings.CoinSelectionSource_select_confirmed_utxos(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(claim_id, 32)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(must_spend, must_spend_conv_7 => must_spend_conv_7.ptr)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(must_pay_to, must_pay_to_conv_7 => must_pay_to_conv_7.ptr)), target_feerate_sat_per_1000_weight); GC.KeepAlive(this); GC.KeepAlive(claim_id); GC.KeepAlive(must_spend); diff --git a/c_sharp/src/org/ldk/structs/CommitmentSigned.cs b/c_sharp/src/org/ldk/structs/CommitmentSigned.cs index 6b21710a..34124aad 100644 --- a/c_sharp/src/org/ldk/structs/CommitmentSigned.cs +++ b/c_sharp/src/org/ldk/structs/CommitmentSigned.cs @@ -20,21 +20,23 @@ public class CommitmentSigned : CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { + public ChannelId get_channel_id() { long ret = bindings.CommitmentSigned_get_channel_id(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.CommitmentSigned_set_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.CommitmentSigned_set_channel_id(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** @@ -89,14 +91,15 @@ public class CommitmentSigned : CommonBase { /** * Constructs a new CommitmentSigned given each field */ - public static CommitmentSigned of(byte[] channel_id_arg, byte[] signature_arg, byte[][] htlc_signatures_arg) { - long ret = bindings.CommitmentSigned_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id_arg, 32)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(signature_arg, 64)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(htlc_signatures_arg, htlc_signatures_arg_conv_8 => InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(htlc_signatures_arg_conv_8, 64))))); + public static CommitmentSigned of(org.ldk.structs.ChannelId channel_id_arg, byte[] signature_arg, byte[][] htlc_signatures_arg) { + long ret = bindings.CommitmentSigned_new(channel_id_arg.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(signature_arg, 64)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(htlc_signatures_arg, htlc_signatures_arg_conv_8 => InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(htlc_signatures_arg_conv_8, 64))))); GC.KeepAlive(channel_id_arg); GC.KeepAlive(signature_arg); GC.KeepAlive(htlc_signatures_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.CommitmentSigned ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommitmentSigned(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id_arg); }; return ret_hu_conv; } @@ -136,7 +139,7 @@ public class CommitmentSigned : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.CommitmentSigned b) { - bool ret = bindings.CommitmentSigned_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.CommitmentSigned_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/CommitmentTransaction.cs b/c_sharp/src/org/ldk/structs/CommitmentTransaction.cs index b3bcf613..c9f71e22 100644 --- a/c_sharp/src/org/ldk/structs/CommitmentTransaction.cs +++ b/c_sharp/src/org/ldk/structs/CommitmentTransaction.cs @@ -133,7 +133,7 @@ public class CommitmentTransaction : CommonBase { * or using the built transaction. */ public Result_TrustedCommitmentTransactionNoneZ verify(org.ldk.structs.DirectedChannelTransactionParameters channel_parameters, org.ldk.structs.ChannelPublicKeys broadcaster_keys, org.ldk.structs.ChannelPublicKeys countersignatory_keys) { - long ret = bindings.CommitmentTransaction_verify(this.ptr, channel_parameters == null ? 0 : channel_parameters.ptr, broadcaster_keys == null ? 0 : broadcaster_keys.ptr, countersignatory_keys == null ? 0 : countersignatory_keys.ptr); + long ret = bindings.CommitmentTransaction_verify(this.ptr, channel_parameters.ptr, broadcaster_keys.ptr, countersignatory_keys.ptr); GC.KeepAlive(this); GC.KeepAlive(channel_parameters); GC.KeepAlive(broadcaster_keys); diff --git a/c_sharp/src/org/ldk/structs/CommitmentUpdate.cs b/c_sharp/src/org/ldk/structs/CommitmentUpdate.cs index d14ed22a..4eed1ff6 100644 --- a/c_sharp/src/org/ldk/structs/CommitmentUpdate.cs +++ b/c_sharp/src/org/ldk/structs/CommitmentUpdate.cs @@ -39,7 +39,7 @@ public class CommitmentUpdate : CommonBase { * `update_add_htlc` messages which should be sent */ public void set_update_add_htlcs(UpdateAddHTLC[] val) { - bindings.CommitmentUpdate_set_update_add_htlcs(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(val, val_conv_15 => val_conv_15 == null ? 0 : val_conv_15.ptr))); + bindings.CommitmentUpdate_set_update_add_htlcs(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(val, val_conv_15 => val_conv_15.ptr))); GC.KeepAlive(this); GC.KeepAlive(val); foreach (UpdateAddHTLC val_conv_15 in val) { if (this != null) { this.ptrs_to.AddLast(val_conv_15); }; }; @@ -68,7 +68,7 @@ public class CommitmentUpdate : CommonBase { * `update_fulfill_htlc` messages which should be sent */ public void set_update_fulfill_htlcs(UpdateFulfillHTLC[] val) { - bindings.CommitmentUpdate_set_update_fulfill_htlcs(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(val, val_conv_19 => val_conv_19 == null ? 0 : val_conv_19.ptr))); + bindings.CommitmentUpdate_set_update_fulfill_htlcs(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(val, val_conv_19 => val_conv_19.ptr))); GC.KeepAlive(this); GC.KeepAlive(val); foreach (UpdateFulfillHTLC val_conv_19 in val) { if (this != null) { this.ptrs_to.AddLast(val_conv_19); }; }; @@ -97,7 +97,7 @@ public class CommitmentUpdate : CommonBase { * `update_fail_htlc` messages which should be sent */ public void set_update_fail_htlcs(UpdateFailHTLC[] val) { - bindings.CommitmentUpdate_set_update_fail_htlcs(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(val, val_conv_16 => val_conv_16 == null ? 0 : val_conv_16.ptr))); + bindings.CommitmentUpdate_set_update_fail_htlcs(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(val, val_conv_16 => val_conv_16.ptr))); GC.KeepAlive(this); GC.KeepAlive(val); foreach (UpdateFailHTLC val_conv_16 in val) { if (this != null) { this.ptrs_to.AddLast(val_conv_16); }; }; @@ -126,7 +126,7 @@ public class CommitmentUpdate : CommonBase { * `update_fail_malformed_htlc` messages which should be sent */ public void set_update_fail_malformed_htlcs(UpdateFailMalformedHTLC[] val) { - bindings.CommitmentUpdate_set_update_fail_malformed_htlcs(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(val, val_conv_25 => val_conv_25 == null ? 0 : val_conv_25.ptr))); + bindings.CommitmentUpdate_set_update_fail_malformed_htlcs(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(val, val_conv_25 => val_conv_25.ptr))); GC.KeepAlive(this); GC.KeepAlive(val); foreach (UpdateFailMalformedHTLC val_conv_25 in val) { if (this != null) { this.ptrs_to.AddLast(val_conv_25); }; }; @@ -174,7 +174,7 @@ public class CommitmentUpdate : CommonBase { * A `commitment_signed` message which should be sent */ public void set_commitment_signed(org.ldk.structs.CommitmentSigned val) { - bindings.CommitmentUpdate_set_commitment_signed(this.ptr, val == null ? 0 : val.ptr); + bindings.CommitmentUpdate_set_commitment_signed(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -186,7 +186,7 @@ public class CommitmentUpdate : CommonBase { * Note that update_fee_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ public static CommitmentUpdate of(UpdateAddHTLC[] update_add_htlcs_arg, UpdateFulfillHTLC[] update_fulfill_htlcs_arg, UpdateFailHTLC[] update_fail_htlcs_arg, UpdateFailMalformedHTLC[] update_fail_malformed_htlcs_arg, org.ldk.structs.UpdateFee update_fee_arg, org.ldk.structs.CommitmentSigned commitment_signed_arg) { - long ret = bindings.CommitmentUpdate_new(InternalUtils.encodeUint64Array(InternalUtils.mapArray(update_add_htlcs_arg, update_add_htlcs_arg_conv_15 => update_add_htlcs_arg_conv_15 == null ? 0 : update_add_htlcs_arg_conv_15.ptr)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(update_fulfill_htlcs_arg, update_fulfill_htlcs_arg_conv_19 => update_fulfill_htlcs_arg_conv_19 == null ? 0 : update_fulfill_htlcs_arg_conv_19.ptr)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(update_fail_htlcs_arg, update_fail_htlcs_arg_conv_16 => update_fail_htlcs_arg_conv_16 == null ? 0 : update_fail_htlcs_arg_conv_16.ptr)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(update_fail_malformed_htlcs_arg, update_fail_malformed_htlcs_arg_conv_25 => update_fail_malformed_htlcs_arg_conv_25 == null ? 0 : update_fail_malformed_htlcs_arg_conv_25.ptr)), update_fee_arg == null ? 0 : update_fee_arg.ptr, commitment_signed_arg == null ? 0 : commitment_signed_arg.ptr); + long ret = bindings.CommitmentUpdate_new(InternalUtils.encodeUint64Array(InternalUtils.mapArray(update_add_htlcs_arg, update_add_htlcs_arg_conv_15 => update_add_htlcs_arg_conv_15.ptr)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(update_fulfill_htlcs_arg, update_fulfill_htlcs_arg_conv_19 => update_fulfill_htlcs_arg_conv_19.ptr)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(update_fail_htlcs_arg, update_fail_htlcs_arg_conv_16 => update_fail_htlcs_arg_conv_16.ptr)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(update_fail_malformed_htlcs_arg, update_fail_malformed_htlcs_arg_conv_25 => update_fail_malformed_htlcs_arg_conv_25.ptr)), update_fee_arg == null ? 0 : update_fee_arg.ptr, commitment_signed_arg.ptr); GC.KeepAlive(update_add_htlcs_arg); GC.KeepAlive(update_fulfill_htlcs_arg); GC.KeepAlive(update_fail_htlcs_arg); @@ -241,7 +241,7 @@ public class CommitmentUpdate : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.CommitmentUpdate b) { - bool ret = bindings.CommitmentUpdate_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.CommitmentUpdate_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/CommonAcceptChannelFields.cs b/c_sharp/src/org/ldk/structs/CommonAcceptChannelFields.cs new file mode 100644 index 00000000..5c0a34d9 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/CommonAcceptChannelFields.cs @@ -0,0 +1,415 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + + +/** + * Contains fields that are both common to [`accept_channel`] and `accept_channel2` messages. + * + * [`accept_channel`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-accept_channel-message + */ +public class CommonAcceptChannelFields : CommonBase { + internal CommonAcceptChannelFields(object _dummy, long ptr) : base(ptr) { } + ~CommonAcceptChannelFields() { + if (ptr != 0) { bindings.CommonAcceptChannelFields_free(ptr); } + } + + /** + * The same `temporary_channel_id` received from the initiator's `open_channel2` or `open_channel` message. + */ + public ChannelId get_temporary_channel_id() { + long ret = bindings.CommonAcceptChannelFields_get_temporary_channel_id(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * The same `temporary_channel_id` received from the initiator's `open_channel2` or `open_channel` message. + */ + public void set_temporary_channel_id(org.ldk.structs.ChannelId val) { + bindings.CommonAcceptChannelFields_set_temporary_channel_id(this.ptr, val.ptr); + GC.KeepAlive(this); + GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; + } + + /** + * The threshold below which outputs on transactions broadcast by the channel acceptor will be + * omitted + */ + public long get_dust_limit_satoshis() { + long ret = bindings.CommonAcceptChannelFields_get_dust_limit_satoshis(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * The threshold below which outputs on transactions broadcast by the channel acceptor will be + * omitted + */ + public void set_dust_limit_satoshis(long val) { + bindings.CommonAcceptChannelFields_set_dust_limit_satoshis(this.ptr, val); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * The maximum inbound HTLC value in flight towards sender, in milli-satoshi + */ + public long get_max_htlc_value_in_flight_msat() { + long ret = bindings.CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * The maximum inbound HTLC value in flight towards sender, in milli-satoshi + */ + public void set_max_htlc_value_in_flight_msat(long val) { + bindings.CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat(this.ptr, val); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * The minimum HTLC size incoming to channel acceptor, in milli-satoshi + */ + public long get_htlc_minimum_msat() { + long ret = bindings.CommonAcceptChannelFields_get_htlc_minimum_msat(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * The minimum HTLC size incoming to channel acceptor, in milli-satoshi + */ + public void set_htlc_minimum_msat(long val) { + bindings.CommonAcceptChannelFields_set_htlc_minimum_msat(this.ptr, val); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * Minimum depth of the funding transaction before the channel is considered open + */ + public int get_minimum_depth() { + int ret = bindings.CommonAcceptChannelFields_get_minimum_depth(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Minimum depth of the funding transaction before the channel is considered open + */ + public void set_minimum_depth(int val) { + bindings.CommonAcceptChannelFields_set_minimum_depth(this.ptr, val); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * The number of blocks which the counterparty will have to wait to claim on-chain funds if they + * broadcast a commitment transaction + */ + public short get_to_self_delay() { + short ret = bindings.CommonAcceptChannelFields_get_to_self_delay(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * The number of blocks which the counterparty will have to wait to claim on-chain funds if they + * broadcast a commitment transaction + */ + public void set_to_self_delay(short val) { + bindings.CommonAcceptChannelFields_set_to_self_delay(this.ptr, val); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * The maximum number of inbound HTLCs towards channel acceptor + */ + public short get_max_accepted_htlcs() { + short ret = bindings.CommonAcceptChannelFields_get_max_accepted_htlcs(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * The maximum number of inbound HTLCs towards channel acceptor + */ + public void set_max_accepted_htlcs(short val) { + bindings.CommonAcceptChannelFields_set_max_accepted_htlcs(this.ptr, val); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * The channel acceptor's key controlling the funding transaction + */ + public byte[] get_funding_pubkey() { + long ret = bindings.CommonAcceptChannelFields_get_funding_pubkey(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + + /** + * The channel acceptor's key controlling the funding transaction + */ + public void set_funding_pubkey(byte[] val) { + bindings.CommonAcceptChannelFields_set_funding_pubkey(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * Used to derive a revocation key for transactions broadcast by counterparty + */ + public byte[] get_revocation_basepoint() { + long ret = bindings.CommonAcceptChannelFields_get_revocation_basepoint(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Used to derive a revocation key for transactions broadcast by counterparty + */ + public void set_revocation_basepoint(byte[] val) { + bindings.CommonAcceptChannelFields_set_revocation_basepoint(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * A payment key to channel acceptor for transactions broadcast by counterparty + */ + public byte[] get_payment_basepoint() { + long ret = bindings.CommonAcceptChannelFields_get_payment_basepoint(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + + /** + * A payment key to channel acceptor for transactions broadcast by counterparty + */ + public void set_payment_basepoint(byte[] val) { + bindings.CommonAcceptChannelFields_set_payment_basepoint(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * Used to derive a payment key to channel acceptor for transactions broadcast by channel + * acceptor + */ + public byte[] get_delayed_payment_basepoint() { + long ret = bindings.CommonAcceptChannelFields_get_delayed_payment_basepoint(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Used to derive a payment key to channel acceptor for transactions broadcast by channel + * acceptor + */ + public void set_delayed_payment_basepoint(byte[] val) { + bindings.CommonAcceptChannelFields_set_delayed_payment_basepoint(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * Used to derive an HTLC payment key to channel acceptor for transactions broadcast by counterparty + */ + public byte[] get_htlc_basepoint() { + long ret = bindings.CommonAcceptChannelFields_get_htlc_basepoint(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Used to derive an HTLC payment key to channel acceptor for transactions broadcast by counterparty + */ + public void set_htlc_basepoint(byte[] val) { + bindings.CommonAcceptChannelFields_set_htlc_basepoint(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * The first to-be-broadcast-by-channel-acceptor transaction's per commitment point + */ + public byte[] get_first_per_commitment_point() { + long ret = bindings.CommonAcceptChannelFields_get_first_per_commitment_point(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + + /** + * The first to-be-broadcast-by-channel-acceptor transaction's per commitment point + */ + public void set_first_per_commitment_point(byte[] val) { + bindings.CommonAcceptChannelFields_set_first_per_commitment_point(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * Optionally, a request to pre-set the to-channel-acceptor output's scriptPubkey for when we + * collaboratively close + */ + public Option_CVec_u8ZZ get_shutdown_scriptpubkey() { + long ret = bindings.CommonAcceptChannelFields_get_shutdown_scriptpubkey(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_CVec_u8ZZ ret_hu_conv = org.ldk.structs.Option_CVec_u8ZZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Optionally, a request to pre-set the to-channel-acceptor output's scriptPubkey for when we + * collaboratively close + */ + public void set_shutdown_scriptpubkey(org.ldk.structs.Option_CVec_u8ZZ val) { + bindings.CommonAcceptChannelFields_set_shutdown_scriptpubkey(this.ptr, val.ptr); + GC.KeepAlive(this); + GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; + } + + /** + * The channel type that this channel will represent. If none is set, we derive the channel + * type from the intersection of our feature bits with our counterparty's feature bits from + * the Init message. + * + * This is required to match the equivalent field in [`OpenChannel`] or [`OpenChannelV2`]'s + * [`CommonOpenChannelFields::channel_type`]. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public ChannelTypeFeatures get_channel_type() { + long ret = bindings.CommonAcceptChannelFields_get_channel_type(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelTypeFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelTypeFeatures(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * The channel type that this channel will represent. If none is set, we derive the channel + * type from the intersection of our feature bits with our counterparty's feature bits from + * the Init message. + * + * This is required to match the equivalent field in [`OpenChannel`] or [`OpenChannelV2`]'s + * [`CommonOpenChannelFields::channel_type`]. + * + * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public void set_channel_type(org.ldk.structs.ChannelTypeFeatures val) { + bindings.CommonAcceptChannelFields_set_channel_type(this.ptr, val == null ? 0 : val.ptr); + GC.KeepAlive(this); + GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; + } + + /** + * Constructs a new CommonAcceptChannelFields given each field + * + * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public static CommonAcceptChannelFields of(org.ldk.structs.ChannelId temporary_channel_id_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long htlc_minimum_msat_arg, int minimum_depth_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_basepoint_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, org.ldk.structs.Option_CVec_u8ZZ shutdown_scriptpubkey_arg, org.ldk.structs.ChannelTypeFeatures channel_type_arg) { + long ret = bindings.CommonAcceptChannelFields_new(temporary_channel_id_arg.ptr, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(funding_pubkey_arg, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(revocation_basepoint_arg, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_basepoint_arg, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(delayed_payment_basepoint_arg, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(htlc_basepoint_arg, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(first_per_commitment_point_arg, 33)), shutdown_scriptpubkey_arg.ptr, channel_type_arg == null ? 0 : channel_type_arg.ptr); + GC.KeepAlive(temporary_channel_id_arg); + GC.KeepAlive(dust_limit_satoshis_arg); + GC.KeepAlive(max_htlc_value_in_flight_msat_arg); + GC.KeepAlive(htlc_minimum_msat_arg); + GC.KeepAlive(minimum_depth_arg); + GC.KeepAlive(to_self_delay_arg); + GC.KeepAlive(max_accepted_htlcs_arg); + GC.KeepAlive(funding_pubkey_arg); + GC.KeepAlive(revocation_basepoint_arg); + GC.KeepAlive(payment_basepoint_arg); + GC.KeepAlive(delayed_payment_basepoint_arg); + GC.KeepAlive(htlc_basepoint_arg); + GC.KeepAlive(first_per_commitment_point_arg); + GC.KeepAlive(shutdown_scriptpubkey_arg); + GC.KeepAlive(channel_type_arg); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.CommonAcceptChannelFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommonAcceptChannelFields(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(temporary_channel_id_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(shutdown_scriptpubkey_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_type_arg); }; + return ret_hu_conv; + } + + internal long clone_ptr() { + long ret = bindings.CommonAcceptChannelFields_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a copy of the CommonAcceptChannelFields + */ + public CommonAcceptChannelFields clone() { + long ret = bindings.CommonAcceptChannelFields_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.CommonAcceptChannelFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommonAcceptChannelFields(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Generates a non-cryptographic 64-bit hash of the CommonAcceptChannelFields. + */ + public long hash() { + long ret = bindings.CommonAcceptChannelFields_hash(this.ptr); + GC.KeepAlive(this); + return ret; + } + + public override int GetHashCode() { + return (int)this.hash(); + } + /** + * Checks if two CommonAcceptChannelFieldss contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ + public bool eq(org.ldk.structs.CommonAcceptChannelFields b) { + bool ret = bindings.CommonAcceptChannelFields_eq(this.ptr, b.ptr); + GC.KeepAlive(this); + GC.KeepAlive(b); + if (this != null) { this.ptrs_to.AddLast(b); }; + return ret; + } + + public override bool Equals(object o) { + if (!(o is CommonAcceptChannelFields)) return false; + return this.eq((CommonAcceptChannelFields)o); + } +} +} } } diff --git a/c_sharp/src/org/ldk/structs/CommonOpenChannelFields.cs b/c_sharp/src/org/ldk/structs/CommonOpenChannelFields.cs new file mode 100644 index 00000000..11626a7d --- /dev/null +++ b/c_sharp/src/org/ldk/structs/CommonOpenChannelFields.cs @@ -0,0 +1,478 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + + +/** + * Contains fields that are both common to [`open_channel`] and `open_channel2` messages. + * + * [`open_channel`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-open_channel-message + */ +public class CommonOpenChannelFields : CommonBase { + internal CommonOpenChannelFields(object _dummy, long ptr) : base(ptr) { } + ~CommonOpenChannelFields() { + if (ptr != 0) { bindings.CommonOpenChannelFields_free(ptr); } + } + + /** + * The genesis hash of the blockchain where the channel is to be opened + */ + public byte[] get_chain_hash() { + long ret = bindings.CommonOpenChannelFields_get_chain_hash(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + + /** + * The genesis hash of the blockchain where the channel is to be opened + */ + public void set_chain_hash(byte[] val) { + bindings.CommonOpenChannelFields_set_chain_hash(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * A temporary channel ID + * For V2 channels: derived using a zeroed out value for the channel acceptor's revocation basepoint + * For V1 channels: a temporary channel ID, until the funding outpoint is announced + */ + public ChannelId get_temporary_channel_id() { + long ret = bindings.CommonOpenChannelFields_get_temporary_channel_id(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * A temporary channel ID + * For V2 channels: derived using a zeroed out value for the channel acceptor's revocation basepoint + * For V1 channels: a temporary channel ID, until the funding outpoint is announced + */ + public void set_temporary_channel_id(org.ldk.structs.ChannelId val) { + bindings.CommonOpenChannelFields_set_temporary_channel_id(this.ptr, val.ptr); + GC.KeepAlive(this); + GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; + } + + /** + * For V1 channels: The channel value + * For V2 channels: Part of the channel value contributed by the channel initiator + */ + public long get_funding_satoshis() { + long ret = bindings.CommonOpenChannelFields_get_funding_satoshis(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * For V1 channels: The channel value + * For V2 channels: Part of the channel value contributed by the channel initiator + */ + public void set_funding_satoshis(long val) { + bindings.CommonOpenChannelFields_set_funding_satoshis(this.ptr, val); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * The threshold below which outputs on transactions broadcast by the channel initiator will be + * omitted + */ + public long get_dust_limit_satoshis() { + long ret = bindings.CommonOpenChannelFields_get_dust_limit_satoshis(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * The threshold below which outputs on transactions broadcast by the channel initiator will be + * omitted + */ + public void set_dust_limit_satoshis(long val) { + bindings.CommonOpenChannelFields_set_dust_limit_satoshis(this.ptr, val); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * The maximum inbound HTLC value in flight towards channel initiator, in milli-satoshi + */ + public long get_max_htlc_value_in_flight_msat() { + long ret = bindings.CommonOpenChannelFields_get_max_htlc_value_in_flight_msat(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * The maximum inbound HTLC value in flight towards channel initiator, in milli-satoshi + */ + public void set_max_htlc_value_in_flight_msat(long val) { + bindings.CommonOpenChannelFields_set_max_htlc_value_in_flight_msat(this.ptr, val); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * The minimum HTLC size incoming to channel initiator, in milli-satoshi + */ + public long get_htlc_minimum_msat() { + long ret = bindings.CommonOpenChannelFields_get_htlc_minimum_msat(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * The minimum HTLC size incoming to channel initiator, in milli-satoshi + */ + public void set_htlc_minimum_msat(long val) { + bindings.CommonOpenChannelFields_set_htlc_minimum_msat(this.ptr, val); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * The feerate for the commitment transaction set by the channel initiator until updated by + * [`UpdateFee`] + */ + public int get_commitment_feerate_sat_per_1000_weight() { + int ret = bindings.CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * The feerate for the commitment transaction set by the channel initiator until updated by + * [`UpdateFee`] + */ + public void set_commitment_feerate_sat_per_1000_weight(int val) { + bindings.CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight(this.ptr, val); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * The number of blocks which the counterparty will have to wait to claim on-chain funds if they + * broadcast a commitment transaction + */ + public short get_to_self_delay() { + short ret = bindings.CommonOpenChannelFields_get_to_self_delay(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * The number of blocks which the counterparty will have to wait to claim on-chain funds if they + * broadcast a commitment transaction + */ + public void set_to_self_delay(short val) { + bindings.CommonOpenChannelFields_set_to_self_delay(this.ptr, val); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * The maximum number of inbound HTLCs towards channel initiator + */ + public short get_max_accepted_htlcs() { + short ret = bindings.CommonOpenChannelFields_get_max_accepted_htlcs(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * The maximum number of inbound HTLCs towards channel initiator + */ + public void set_max_accepted_htlcs(short val) { + bindings.CommonOpenChannelFields_set_max_accepted_htlcs(this.ptr, val); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * The channel initiator's key controlling the funding transaction + */ + public byte[] get_funding_pubkey() { + long ret = bindings.CommonOpenChannelFields_get_funding_pubkey(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + + /** + * The channel initiator's key controlling the funding transaction + */ + public void set_funding_pubkey(byte[] val) { + bindings.CommonOpenChannelFields_set_funding_pubkey(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * Used to derive a revocation key for transactions broadcast by counterparty + */ + public byte[] get_revocation_basepoint() { + long ret = bindings.CommonOpenChannelFields_get_revocation_basepoint(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Used to derive a revocation key for transactions broadcast by counterparty + */ + public void set_revocation_basepoint(byte[] val) { + bindings.CommonOpenChannelFields_set_revocation_basepoint(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * A payment key to channel initiator for transactions broadcast by counterparty + */ + public byte[] get_payment_basepoint() { + long ret = bindings.CommonOpenChannelFields_get_payment_basepoint(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + + /** + * A payment key to channel initiator for transactions broadcast by counterparty + */ + public void set_payment_basepoint(byte[] val) { + bindings.CommonOpenChannelFields_set_payment_basepoint(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * Used to derive a payment key to channel initiator for transactions broadcast by channel + * initiator + */ + public byte[] get_delayed_payment_basepoint() { + long ret = bindings.CommonOpenChannelFields_get_delayed_payment_basepoint(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Used to derive a payment key to channel initiator for transactions broadcast by channel + * initiator + */ + public void set_delayed_payment_basepoint(byte[] val) { + bindings.CommonOpenChannelFields_set_delayed_payment_basepoint(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * Used to derive an HTLC payment key to channel initiator + */ + public byte[] get_htlc_basepoint() { + long ret = bindings.CommonOpenChannelFields_get_htlc_basepoint(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Used to derive an HTLC payment key to channel initiator + */ + public void set_htlc_basepoint(byte[] val) { + bindings.CommonOpenChannelFields_set_htlc_basepoint(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * The first to-be-broadcast-by-channel-initiator transaction's per commitment point + */ + public byte[] get_first_per_commitment_point() { + long ret = bindings.CommonOpenChannelFields_get_first_per_commitment_point(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + + /** + * The first to-be-broadcast-by-channel-initiator transaction's per commitment point + */ + public void set_first_per_commitment_point(byte[] val) { + bindings.CommonOpenChannelFields_set_first_per_commitment_point(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * The channel flags to be used + */ + public byte get_channel_flags() { + byte ret = bindings.CommonOpenChannelFields_get_channel_flags(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * The channel flags to be used + */ + public void set_channel_flags(byte val) { + bindings.CommonOpenChannelFields_set_channel_flags(this.ptr, val); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * Optionally, a request to pre-set the to-channel-initiator output's scriptPubkey for when we + * collaboratively close + */ + public Option_CVec_u8ZZ get_shutdown_scriptpubkey() { + long ret = bindings.CommonOpenChannelFields_get_shutdown_scriptpubkey(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_CVec_u8ZZ ret_hu_conv = org.ldk.structs.Option_CVec_u8ZZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Optionally, a request to pre-set the to-channel-initiator output's scriptPubkey for when we + * collaboratively close + */ + public void set_shutdown_scriptpubkey(org.ldk.structs.Option_CVec_u8ZZ val) { + bindings.CommonOpenChannelFields_set_shutdown_scriptpubkey(this.ptr, val.ptr); + GC.KeepAlive(this); + GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; + } + + /** + * The channel type that this channel will represent + * + * If this is `None`, we derive the channel type from the intersection of our + * feature bits with our counterparty's feature bits from the [`Init`] message. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public ChannelTypeFeatures get_channel_type() { + long ret = bindings.CommonOpenChannelFields_get_channel_type(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelTypeFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelTypeFeatures(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * The channel type that this channel will represent + * + * If this is `None`, we derive the channel type from the intersection of our + * feature bits with our counterparty's feature bits from the [`Init`] message. + * + * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public void set_channel_type(org.ldk.structs.ChannelTypeFeatures val) { + bindings.CommonOpenChannelFields_set_channel_type(this.ptr, val == null ? 0 : val.ptr); + GC.KeepAlive(this); + GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; + } + + /** + * Constructs a new CommonOpenChannelFields given each field + * + * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public static CommonOpenChannelFields of(byte[] chain_hash_arg, org.ldk.structs.ChannelId temporary_channel_id_arg, long funding_satoshis_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long htlc_minimum_msat_arg, int commitment_feerate_sat_per_1000_weight_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_basepoint_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, byte channel_flags_arg, org.ldk.structs.Option_CVec_u8ZZ shutdown_scriptpubkey_arg, org.ldk.structs.ChannelTypeFeatures channel_type_arg) { + long ret = bindings.CommonOpenChannelFields_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(chain_hash_arg, 32)), temporary_channel_id_arg.ptr, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, commitment_feerate_sat_per_1000_weight_arg, to_self_delay_arg, max_accepted_htlcs_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(funding_pubkey_arg, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(revocation_basepoint_arg, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_basepoint_arg, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(delayed_payment_basepoint_arg, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(htlc_basepoint_arg, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(first_per_commitment_point_arg, 33)), channel_flags_arg, shutdown_scriptpubkey_arg.ptr, channel_type_arg == null ? 0 : channel_type_arg.ptr); + GC.KeepAlive(chain_hash_arg); + GC.KeepAlive(temporary_channel_id_arg); + GC.KeepAlive(funding_satoshis_arg); + GC.KeepAlive(dust_limit_satoshis_arg); + GC.KeepAlive(max_htlc_value_in_flight_msat_arg); + GC.KeepAlive(htlc_minimum_msat_arg); + GC.KeepAlive(commitment_feerate_sat_per_1000_weight_arg); + GC.KeepAlive(to_self_delay_arg); + GC.KeepAlive(max_accepted_htlcs_arg); + GC.KeepAlive(funding_pubkey_arg); + GC.KeepAlive(revocation_basepoint_arg); + GC.KeepAlive(payment_basepoint_arg); + GC.KeepAlive(delayed_payment_basepoint_arg); + GC.KeepAlive(htlc_basepoint_arg); + GC.KeepAlive(first_per_commitment_point_arg); + GC.KeepAlive(channel_flags_arg); + GC.KeepAlive(shutdown_scriptpubkey_arg); + GC.KeepAlive(channel_type_arg); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.CommonOpenChannelFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommonOpenChannelFields(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(temporary_channel_id_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(shutdown_scriptpubkey_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_type_arg); }; + return ret_hu_conv; + } + + internal long clone_ptr() { + long ret = bindings.CommonOpenChannelFields_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a copy of the CommonOpenChannelFields + */ + public CommonOpenChannelFields clone() { + long ret = bindings.CommonOpenChannelFields_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.CommonOpenChannelFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommonOpenChannelFields(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Generates a non-cryptographic 64-bit hash of the CommonOpenChannelFields. + */ + public long hash() { + long ret = bindings.CommonOpenChannelFields_hash(this.ptr); + GC.KeepAlive(this); + return ret; + } + + public override int GetHashCode() { + return (int)this.hash(); + } + /** + * Checks if two CommonOpenChannelFieldss contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ + public bool eq(org.ldk.structs.CommonOpenChannelFields b) { + bool ret = bindings.CommonOpenChannelFields_eq(this.ptr, b.ptr); + GC.KeepAlive(this); + GC.KeepAlive(b); + if (this != null) { this.ptrs_to.AddLast(b); }; + return ret; + } + + public override bool Equals(object o) { + if (!(o is CommonOpenChannelFields)) return false; + return this.eq((CommonOpenChannelFields)o); + } +} +} } } diff --git a/c_sharp/src/org/ldk/structs/Confirm.cs b/c_sharp/src/org/ldk/structs/Confirm.cs index 5d36fda7..a561d3ce 100644 --- a/c_sharp/src/org/ldk/structs/Confirm.cs +++ b/c_sharp/src/org/ldk/structs/Confirm.cs @@ -146,7 +146,7 @@ public class Confirm : CommonBase { public long get_relevant_txids() { ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ[] ret = arg.get_relevant_txids(); GC.KeepAlive(arg); - long result = InternalUtils.encodeUint64Array(InternalUtils.mapArray(ret, ret_conv_54 => ret_conv_54 == null ? 0 : ret_conv_54.clone_ptr())); + long result = InternalUtils.encodeUint64Array(InternalUtils.mapArray(ret, ret_conv_54 => ret_conv_54.clone_ptr())); return result; } } @@ -179,7 +179,7 @@ public class Confirm : CommonBase { * [`best_block_updated`]: Self::best_block_updated */ public void transactions_confirmed(byte[] header, TwoTuple_usizeTransactionZ[] txdata, int height) { - bindings.Confirm_transactions_confirmed(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(header, 80)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(txdata, txdata_conv_28 => txdata_conv_28 != null ? txdata_conv_28.ptr : 0)), height); + bindings.Confirm_transactions_confirmed(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(header, 80)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(txdata, txdata_conv_28 => txdata_conv_28.ptr)), height); GC.KeepAlive(this); GC.KeepAlive(header); GC.KeepAlive(txdata); diff --git a/c_sharp/src/org/ldk/structs/CounterpartyChannelTransactionParameters.cs b/c_sharp/src/org/ldk/structs/CounterpartyChannelTransactionParameters.cs index 85da52f9..bd949cce 100644 --- a/c_sharp/src/org/ldk/structs/CounterpartyChannelTransactionParameters.cs +++ b/c_sharp/src/org/ldk/structs/CounterpartyChannelTransactionParameters.cs @@ -31,7 +31,7 @@ public class CounterpartyChannelTransactionParameters : CommonBase { * Counter-party public keys */ public void set_pubkeys(org.ldk.structs.ChannelPublicKeys val) { - bindings.CounterpartyChannelTransactionParameters_set_pubkeys(this.ptr, val == null ? 0 : val.ptr); + bindings.CounterpartyChannelTransactionParameters_set_pubkeys(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -59,7 +59,7 @@ public class CounterpartyChannelTransactionParameters : CommonBase { * Constructs a new CounterpartyChannelTransactionParameters given each field */ public static CounterpartyChannelTransactionParameters of(org.ldk.structs.ChannelPublicKeys pubkeys_arg, short selected_contest_delay_arg) { - long ret = bindings.CounterpartyChannelTransactionParameters_new(pubkeys_arg == null ? 0 : pubkeys_arg.ptr, selected_contest_delay_arg); + long ret = bindings.CounterpartyChannelTransactionParameters_new(pubkeys_arg.ptr, selected_contest_delay_arg); GC.KeepAlive(pubkeys_arg); GC.KeepAlive(selected_contest_delay_arg); if (ret >= 0 && ret <= 4096) { return null; } @@ -105,7 +105,7 @@ public class CounterpartyChannelTransactionParameters : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.CounterpartyChannelTransactionParameters b) { - bool ret = bindings.CounterpartyChannelTransactionParameters_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.CounterpartyChannelTransactionParameters_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/CustomMessageHandler.cs b/c_sharp/src/org/ldk/structs/CustomMessageHandler.cs index fdec99ad..9184b690 100644 --- a/c_sharp/src/org/ldk/structs/CustomMessageHandler.cs +++ b/c_sharp/src/org/ldk/structs/CustomMessageHandler.cs @@ -66,26 +66,26 @@ public class CustomMessageHandler : CommonBase { byte[] _sender_node_id_conv = InternalUtils.decodeUint8Array(_sender_node_id); Result_NoneLightningErrorZ ret = arg.handle_custom_message(ret_hu_conv, _sender_node_id_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long get_and_clear_pending_msg() { TwoTuple_PublicKeyTypeZ[] ret = arg.get_and_clear_pending_msg(); GC.KeepAlive(arg); - long result = InternalUtils.encodeUint64Array(InternalUtils.mapArray(ret, ret_conv_25 => ret_conv_25 == null ? 0 : ret_conv_25.clone_ptr())); + long result = InternalUtils.encodeUint64Array(InternalUtils.mapArray(ret, ret_conv_25 => ret_conv_25.clone_ptr())); return result; } public long provided_node_features() { NodeFeatures ret = arg.provided_node_features(); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long provided_init_features(long _their_node_id) { byte[] _their_node_id_conv = InternalUtils.decodeUint8Array(_their_node_id); InitFeatures ret = arg.provided_init_features(_their_node_id_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } } diff --git a/c_sharp/src/org/ldk/structs/CustomMessageReader.cs b/c_sharp/src/org/ldk/structs/CustomMessageReader.cs index fad16dbe..466cd36f 100644 --- a/c_sharp/src/org/ldk/structs/CustomMessageReader.cs +++ b/c_sharp/src/org/ldk/structs/CustomMessageReader.cs @@ -40,7 +40,7 @@ public class CustomMessageReader : CommonBase { byte[] _buffer_conv = InternalUtils.decodeUint8Array(_buffer); Result_COption_TypeZDecodeErrorZ ret = arg.read(_message_type, _buffer_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } } diff --git a/c_sharp/src/org/ldk/structs/CustomOnionMessageHandler.cs b/c_sharp/src/org/ldk/structs/CustomOnionMessageHandler.cs index 0a254aa3..95565d2b 100644 --- a/c_sharp/src/org/ldk/structs/CustomOnionMessageHandler.cs +++ b/c_sharp/src/org/ldk/structs/CustomOnionMessageHandler.cs @@ -58,7 +58,7 @@ public class CustomOnionMessageHandler : CommonBase { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; Option_OnionMessageContentsZ ret = arg.handle_custom_message(ret_hu_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); if (impl_holder.held != null) { impl_holder.held.ptrs_to.AddLast(ret); }; return result; } @@ -66,13 +66,13 @@ public class CustomOnionMessageHandler : CommonBase { byte[] _buffer_conv = InternalUtils.decodeUint8Array(_buffer); Result_COption_OnionMessageContentsZDecodeErrorZ ret = arg.read_custom_message(_message_type, _buffer_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long release_pending_custom_messages() { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ[] ret = arg.release_pending_custom_messages(); GC.KeepAlive(arg); - long result = InternalUtils.encodeUint64Array(InternalUtils.mapArray(ret, ret_conv_56 => ret_conv_56 == null ? 0 : ret_conv_56.clone_ptr())); + long result = InternalUtils.encodeUint64Array(InternalUtils.mapArray(ret, ret_conv_56 => ret_conv_56.clone_ptr())); return result; } } diff --git a/c_sharp/src/org/ldk/structs/DecodeError.cs b/c_sharp/src/org/ldk/structs/DecodeError.cs index e1033e6a..574b6b7f 100644 --- a/c_sharp/src/org/ldk/structs/DecodeError.cs +++ b/c_sharp/src/org/ldk/structs/DecodeError.cs @@ -24,6 +24,7 @@ public class DecodeError : CommonBase { case 4: return new DecodeError_BadLengthDescriptor(ptr); case 5: return new DecodeError_Io(ptr); case 6: return new DecodeError_UnsupportedCompression(ptr); + case 7: return new DecodeError_DangerousValue(ptr); default: throw new ArgumentException("Impossible enum variant"); } @@ -66,6 +67,11 @@ public class DecodeError : CommonBase { internal DecodeError_UnsupportedCompression(long ptr) : base(null, ptr) { } } + /** A DecodeError of type DangerousValue */ + public class DecodeError_DangerousValue : DecodeError { + internal DecodeError_DangerousValue(long ptr) : base(null, ptr) { + } + } internal long clone_ptr() { long ret = bindings.DecodeError_clone_ptr(this.ptr); GC.KeepAlive(this); @@ -162,6 +168,17 @@ public class DecodeError : CommonBase { return ret_hu_conv; } + /** + * Utility method to constructs a new DangerousValue-variant DecodeError + */ + public static DecodeError dangerous_value() { + long ret = bindings.DecodeError_dangerous_value(); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.DecodeError ret_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + /** * Generates a non-cryptographic 64-bit hash of the DecodeError. */ @@ -179,7 +196,7 @@ public class DecodeError : CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public bool eq(org.ldk.structs.DecodeError b) { - bool ret = bindings.DecodeError_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.DecodeError_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); return ret; diff --git a/c_sharp/src/org/ldk/structs/DefaultMessageRouter.cs b/c_sharp/src/org/ldk/structs/DefaultMessageRouter.cs index 6d03f2c9..170bdb2e 100644 --- a/c_sharp/src/org/ldk/structs/DefaultMessageRouter.cs +++ b/c_sharp/src/org/ldk/structs/DefaultMessageRouter.cs @@ -19,7 +19,7 @@ public class DefaultMessageRouter : CommonBase { * Creates a [`DefaultMessageRouter`] using the given [`NetworkGraph`]. */ public static DefaultMessageRouter of(org.ldk.structs.NetworkGraph network_graph, org.ldk.structs.EntropySource entropy_source) { - long ret = bindings.DefaultMessageRouter_new(network_graph == null ? 0 : network_graph.ptr, entropy_source.ptr); + long ret = bindings.DefaultMessageRouter_new(network_graph.ptr, entropy_source.ptr); GC.KeepAlive(network_graph); GC.KeepAlive(entropy_source); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/c_sharp/src/org/ldk/structs/DefaultRouter.cs b/c_sharp/src/org/ldk/structs/DefaultRouter.cs index a3f9e556..8d721253 100644 --- a/c_sharp/src/org/ldk/structs/DefaultRouter.cs +++ b/c_sharp/src/org/ldk/structs/DefaultRouter.cs @@ -19,7 +19,7 @@ public class DefaultRouter : CommonBase { * Creates a new router. */ public static DefaultRouter of(org.ldk.structs.NetworkGraph network_graph, org.ldk.structs.Logger logger, org.ldk.structs.EntropySource entropy_source, org.ldk.structs.LockableScore scorer, org.ldk.structs.ProbabilisticScoringFeeParameters score_params) { - long ret = bindings.DefaultRouter_new(network_graph == null ? 0 : network_graph.ptr, logger.ptr, entropy_source.ptr, scorer.ptr, score_params == null ? 0 : score_params.ptr); + long ret = bindings.DefaultRouter_new(network_graph.ptr, logger.ptr, entropy_source.ptr, scorer.ptr, score_params.ptr); GC.KeepAlive(network_graph); GC.KeepAlive(logger); GC.KeepAlive(entropy_source); diff --git a/c_sharp/src/org/ldk/structs/DelayedPaymentBasepoint.cs b/c_sharp/src/org/ldk/structs/DelayedPaymentBasepoint.cs index 20166c7a..fdb11606 100644 --- a/c_sharp/src/org/ldk/structs/DelayedPaymentBasepoint.cs +++ b/c_sharp/src/org/ldk/structs/DelayedPaymentBasepoint.cs @@ -51,7 +51,7 @@ public class DelayedPaymentBasepoint : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.DelayedPaymentBasepoint b) { - bool ret = bindings.DelayedPaymentBasepoint_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.DelayedPaymentBasepoint_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; @@ -103,6 +103,18 @@ public class DelayedPaymentBasepoint : CommonBase { return ret_conv; } + /** + * Derives the \"tweak\" used in calculate [`DelayedPaymentKey::from_basepoint`].\n\n[`DelayedPaymentKey::from_basepoint`] calculates a private key as:\n`privkey = basepoint_secret + SHA256(per_commitment_point || basepoint)`\n\nThis calculates the hash part in the tweak derivation process, which is used to\nensure that each key is unique and cannot be guessed by an external party. + */ + public byte[] derive_add_tweak(byte[] per_commitment_point) { + long ret = bindings.DelayedPaymentBasepoint_derive_add_tweak(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(per_commitment_point, 33))); + GC.KeepAlive(this); + GC.KeepAlive(per_commitment_point); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + /** * Serialize the DelayedPaymentBasepoint object into a byte array which can be read by DelayedPaymentBasepoint_read */ diff --git a/c_sharp/src/org/ldk/structs/DelayedPaymentKey.cs b/c_sharp/src/org/ldk/structs/DelayedPaymentKey.cs index 03408940..35cf8924 100644 --- a/c_sharp/src/org/ldk/structs/DelayedPaymentKey.cs +++ b/c_sharp/src/org/ldk/structs/DelayedPaymentKey.cs @@ -55,7 +55,7 @@ public class DelayedPaymentKey : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.DelayedPaymentKey b) { - bool ret = bindings.DelayedPaymentKey_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.DelayedPaymentKey_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; @@ -88,7 +88,7 @@ public class DelayedPaymentKey : CommonBase { * Derive a public delayedpubkey using one node\'s `per_commitment_point` and its countersignatory\'s `basepoint` */ public static DelayedPaymentKey from_basepoint(org.ldk.structs.DelayedPaymentBasepoint countersignatory_basepoint, byte[] per_commitment_point) { - long ret = bindings.DelayedPaymentKey_from_basepoint(countersignatory_basepoint == null ? 0 : countersignatory_basepoint.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(per_commitment_point, 33))); + long ret = bindings.DelayedPaymentKey_from_basepoint(countersignatory_basepoint.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(per_commitment_point, 33))); GC.KeepAlive(countersignatory_basepoint); GC.KeepAlive(per_commitment_point); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/c_sharp/src/org/ldk/structs/DelayedPaymentOutputDescriptor.cs b/c_sharp/src/org/ldk/structs/DelayedPaymentOutputDescriptor.cs index b5536ec4..3dd136d3 100644 --- a/c_sharp/src/org/ldk/structs/DelayedPaymentOutputDescriptor.cs +++ b/c_sharp/src/org/ldk/structs/DelayedPaymentOutputDescriptor.cs @@ -33,7 +33,7 @@ public class DelayedPaymentOutputDescriptor : CommonBase { * The outpoint which is spendable. */ public void set_outpoint(org.ldk.structs.OutPoint val) { - bindings.DelayedPaymentOutputDescriptor_set_outpoint(this.ptr, val == null ? 0 : val.ptr); + bindings.DelayedPaymentOutputDescriptor_set_outpoint(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -117,7 +117,7 @@ public class DelayedPaymentOutputDescriptor : CommonBase { * derive the witnessScript for this output. */ public void set_revocation_pubkey(org.ldk.structs.RevocationKey val) { - bindings.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this.ptr, val == null ? 0 : val.ptr); + bindings.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -163,11 +163,45 @@ public class DelayedPaymentOutputDescriptor : CommonBase { GC.KeepAlive(val); } + /** + * The channel public keys and other parameters needed to generate a spending transaction or + * to provide to a re-derived signer through [`ChannelSigner::provide_channel_parameters`]. + * + * Added as optional, but always `Some` if the descriptor was produced in v0.0.123 or later. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public ChannelTransactionParameters get_channel_transaction_parameters() { + long ret = bindings.DelayedPaymentOutputDescriptor_get_channel_transaction_parameters(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelTransactionParameters ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelTransactionParameters(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * The channel public keys and other parameters needed to generate a spending transaction or + * to provide to a re-derived signer through [`ChannelSigner::provide_channel_parameters`]. + * + * Added as optional, but always `Some` if the descriptor was produced in v0.0.123 or later. + * + * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public void set_channel_transaction_parameters(org.ldk.structs.ChannelTransactionParameters val) { + bindings.DelayedPaymentOutputDescriptor_set_channel_transaction_parameters(this.ptr, val == null ? 0 : val.ptr); + GC.KeepAlive(this); + GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; + } + /** * Constructs a new DelayedPaymentOutputDescriptor given each field + * + * Note that channel_transaction_parameters_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public static DelayedPaymentOutputDescriptor of(org.ldk.structs.OutPoint outpoint_arg, byte[] per_commitment_point_arg, short to_self_delay_arg, org.ldk.structs.TxOut output_arg, org.ldk.structs.RevocationKey revocation_pubkey_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg) { - long ret = bindings.DelayedPaymentOutputDescriptor_new(outpoint_arg == null ? 0 : outpoint_arg.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(per_commitment_point_arg, 33)), to_self_delay_arg, output_arg.ptr, revocation_pubkey_arg == null ? 0 : revocation_pubkey_arg.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_keys_id_arg, 32)), channel_value_satoshis_arg); + public static DelayedPaymentOutputDescriptor of(org.ldk.structs.OutPoint outpoint_arg, byte[] per_commitment_point_arg, short to_self_delay_arg, org.ldk.structs.TxOut output_arg, org.ldk.structs.RevocationKey revocation_pubkey_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg, org.ldk.structs.ChannelTransactionParameters channel_transaction_parameters_arg) { + long ret = bindings.DelayedPaymentOutputDescriptor_new(outpoint_arg.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(per_commitment_point_arg, 33)), to_self_delay_arg, output_arg.ptr, revocation_pubkey_arg.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_keys_id_arg, 32)), channel_value_satoshis_arg, channel_transaction_parameters_arg == null ? 0 : channel_transaction_parameters_arg.ptr); GC.KeepAlive(outpoint_arg); GC.KeepAlive(per_commitment_point_arg); GC.KeepAlive(to_self_delay_arg); @@ -175,11 +209,13 @@ public class DelayedPaymentOutputDescriptor : CommonBase { GC.KeepAlive(revocation_pubkey_arg); GC.KeepAlive(channel_keys_id_arg); GC.KeepAlive(channel_value_satoshis_arg); + GC.KeepAlive(channel_transaction_parameters_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.DelayedPaymentOutputDescriptor ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.DelayedPaymentOutputDescriptor(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(outpoint_arg); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(revocation_pubkey_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_transaction_parameters_arg); }; return ret_hu_conv; } @@ -219,7 +255,7 @@ public class DelayedPaymentOutputDescriptor : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.DelayedPaymentOutputDescriptor b) { - bool ret = bindings.DelayedPaymentOutputDescriptor_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.DelayedPaymentOutputDescriptor_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/Description.cs b/c_sharp/src/org/ldk/structs/Description.cs index 83657827..271abfc3 100644 --- a/c_sharp/src/org/ldk/structs/Description.cs +++ b/c_sharp/src/org/ldk/structs/Description.cs @@ -54,7 +54,7 @@ public class Description : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.Description b) { - bool ret = bindings.Description_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.Description_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/Destination.cs b/c_sharp/src/org/ldk/structs/Destination.cs index 3d009773..74cf38c8 100644 --- a/c_sharp/src/org/ldk/structs/Destination.cs +++ b/c_sharp/src/org/ldk/structs/Destination.cs @@ -77,7 +77,7 @@ public class Destination : CommonBase { * Utility method to constructs a new BlindedPath-variant Destination */ public static Destination blinded_path(org.ldk.structs.BlindedPath a) { - long ret = bindings.Destination_blinded_path(a == null ? 0 : a.ptr); + long ret = bindings.Destination_blinded_path(a.ptr); GC.KeepAlive(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Destination ret_hu_conv = org.ldk.structs.Destination.constr_from_ptr(ret); @@ -86,5 +86,44 @@ public class Destination : CommonBase { return ret_hu_conv; } + /** + * Generates a non-cryptographic 64-bit hash of the Destination. + */ + public long hash() { + long ret = bindings.Destination_hash(this.ptr); + GC.KeepAlive(this); + return ret; + } + + public override int GetHashCode() { + return (int)this.hash(); + } + /** + * Checks if two Destinations contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + */ + public bool eq(org.ldk.structs.Destination b) { + bool ret = bindings.Destination_eq(this.ptr, b.ptr); + GC.KeepAlive(this); + GC.KeepAlive(b); + return ret; + } + + public override bool Equals(object o) { + if (!(o is Destination)) return false; + return this.eq((Destination)o); + } + /** + * Attempts to resolve the [`IntroductionNode::DirectedShortChannelId`] of a + * [`Destination::BlindedPath`] to a [`IntroductionNode::NodeId`], if applicable, using the + * provided [`ReadOnlyNetworkGraph`]. + */ + public void resolve(org.ldk.structs.ReadOnlyNetworkGraph network_graph) { + bindings.Destination_resolve(this.ptr, network_graph.ptr); + GC.KeepAlive(this); + GC.KeepAlive(network_graph); + if (this != null) { this.ptrs_to.AddLast(network_graph); }; + } + } } } } diff --git a/c_sharp/src/org/ldk/structs/DirectedChannelInfo.cs b/c_sharp/src/org/ldk/structs/DirectedChannelInfo.cs index fea5e7fb..07be5945 100644 --- a/c_sharp/src/org/ldk/structs/DirectedChannelInfo.cs +++ b/c_sharp/src/org/ldk/structs/DirectedChannelInfo.cs @@ -62,5 +62,33 @@ public class DirectedChannelInfo : CommonBase { return ret_hu_conv; } + /** + * Returns the `node_id` of the source hop. + * + * Refers to the `node_id` forwarding the payment to the next hop. + */ + public NodeId source() { + long ret = bindings.DirectedChannelInfo_source(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.NodeId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.NodeId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Returns the `node_id` of the target hop. + * + * Refers to the `node_id` receiving the payment from the previous hop. + */ + public NodeId target() { + long ret = bindings.DirectedChannelInfo_target(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.NodeId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.NodeId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + } } } } diff --git a/c_sharp/src/org/ldk/structs/EcdsaChannelSigner.cs b/c_sharp/src/org/ldk/structs/EcdsaChannelSigner.cs index c831afa8..92f2a1ed 100644 --- a/c_sharp/src/org/ldk/structs/EcdsaChannelSigner.cs +++ b/c_sharp/src/org/ldk/structs/EcdsaChannelSigner.cs @@ -35,6 +35,13 @@ public interface EcdsaChannelSignerInterface { * This may be called multiple times for the same transaction. * * An external signer implementation should check that the commitment has not been revoked. + * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ Result_ECDSASignatureNoneZ sign_holder_commitment(HolderCommitmentTransaction commitment_tx); /**Create a signature for the given input in a transaction spending an HTLC transaction output @@ -51,6 +58,13 @@ public interface EcdsaChannelSignerInterface { * revoked the state which they eventually broadcast. It's not a _holder_ secret key and does * not allow the spending of any funds by itself (you need our holder `revocation_secret` to do * so). + * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ Result_ECDSASignatureNoneZ sign_justice_revoked_output(byte[] justice_tx, long input, long amount, byte[] per_commitment_key); /**Create a signature for the given input in a transaction spending a commitment transaction @@ -71,6 +85,13 @@ public interface EcdsaChannelSignerInterface { * * `htlc` holds HTLC elements (hash, timelock), thus changing the format of the witness script * (which is committed to in the BIP 143 signatures). + * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ Result_ECDSASignatureNoneZ sign_justice_revoked_htlc(byte[] justice_tx, long input, long amount, byte[] per_commitment_key, HTLCOutputInCommitment htlc); /**Computes the signature for a commitment transaction's HTLC output used as an input within @@ -81,8 +102,14 @@ public interface EcdsaChannelSignerInterface { * [`ChannelMonitor`] [replica](https://github.com/lightningdevkit/rust-lightning/blob/main/GLOSSARY.md#monitor-replicas) * broadcasts it before receiving the update for the latest commitment transaction. * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * * [`EcdsaSighashType::All`]: bitcoin::sighash::EcdsaSighashType::All * [`ChannelMonitor`]: crate::chain::channelmonitor::ChannelMonitor + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ Result_ECDSASignatureNoneZ sign_holder_htlc_transaction(byte[] htlc_tx, long input, HTLCDescriptor htlc_descriptor); /**Create a signature for a claiming transaction for a HTLC output on a counterparty's commitment @@ -102,6 +129,13 @@ public interface EcdsaChannelSignerInterface { * detected onchain. It has been generated by our counterparty and is used to derive * channel state keys, which are then included in the witness script and committed to in the * BIP 143 signature. + * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ Result_ECDSASignatureNoneZ sign_counterparty_htlc_transaction(byte[] htlc_tx, long input, long amount, byte[] per_commitment_point, HTLCOutputInCommitment htlc); /**Create a signature for a (proposed) closing transaction. @@ -112,6 +146,13 @@ public interface EcdsaChannelSignerInterface { Result_ECDSASignatureNoneZ sign_closing_transaction(ClosingTransaction closing_tx); /**Computes the signature for a commitment transaction's anchor output used as an * input within `anchor_tx`, which spends the commitment transaction, at index `input`. + * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ Result_ECDSASignatureNoneZ sign_holder_anchor_input(byte[] anchor_tx, long input); /**Signs a channel announcement message with our funding key proving it comes from one of the @@ -172,14 +213,14 @@ public class EcdsaChannelSigner : CommonBase { bindings.free_buffer(_outbound_htlc_preimages); Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ ret = arg.sign_counterparty_commitment(_commitment_tx_hu_conv, _inbound_htlc_preimages_conv_8_arr, _outbound_htlc_preimages_conv_8_arr); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long sign_holder_commitment(long _commitment_tx) { org.ldk.structs.HolderCommitmentTransaction _commitment_tx_hu_conv = null; if (_commitment_tx < 0 || _commitment_tx > 4096) { _commitment_tx_hu_conv = new org.ldk.structs.HolderCommitmentTransaction(null, _commitment_tx); } Result_ECDSASignatureNoneZ ret = arg.sign_holder_commitment(_commitment_tx_hu_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long sign_justice_revoked_output(long _justice_tx, long _input, long _amount, long _per_commitment_key) { @@ -187,7 +228,7 @@ public class EcdsaChannelSigner : CommonBase { byte[] _per_commitment_key_conv = InternalUtils.decodeUint8Array(_per_commitment_key); Result_ECDSASignatureNoneZ ret = arg.sign_justice_revoked_output(_justice_tx_conv, _input, _amount, _per_commitment_key_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long sign_justice_revoked_htlc(long _justice_tx, long _input, long _amount, long _per_commitment_key, long _htlc) { @@ -196,7 +237,7 @@ public class EcdsaChannelSigner : CommonBase { org.ldk.structs.HTLCOutputInCommitment _htlc_hu_conv = null; if (_htlc < 0 || _htlc > 4096) { _htlc_hu_conv = new org.ldk.structs.HTLCOutputInCommitment(null, _htlc); } Result_ECDSASignatureNoneZ ret = arg.sign_justice_revoked_htlc(_justice_tx_conv, _input, _amount, _per_commitment_key_conv, _htlc_hu_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long sign_holder_htlc_transaction(long _htlc_tx, long _input, long _htlc_descriptor) { @@ -204,7 +245,7 @@ public class EcdsaChannelSigner : CommonBase { org.ldk.structs.HTLCDescriptor _htlc_descriptor_hu_conv = null; if (_htlc_descriptor < 0 || _htlc_descriptor > 4096) { _htlc_descriptor_hu_conv = new org.ldk.structs.HTLCDescriptor(null, _htlc_descriptor); } Result_ECDSASignatureNoneZ ret = arg.sign_holder_htlc_transaction(_htlc_tx_conv, _input, _htlc_descriptor_hu_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long sign_counterparty_htlc_transaction(long _htlc_tx, long _input, long _amount, long _per_commitment_point, long _htlc) { @@ -213,28 +254,28 @@ public class EcdsaChannelSigner : CommonBase { org.ldk.structs.HTLCOutputInCommitment _htlc_hu_conv = null; if (_htlc < 0 || _htlc > 4096) { _htlc_hu_conv = new org.ldk.structs.HTLCOutputInCommitment(null, _htlc); } Result_ECDSASignatureNoneZ ret = arg.sign_counterparty_htlc_transaction(_htlc_tx_conv, _input, _amount, _per_commitment_point_conv, _htlc_hu_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long sign_closing_transaction(long _closing_tx) { org.ldk.structs.ClosingTransaction _closing_tx_hu_conv = null; if (_closing_tx < 0 || _closing_tx > 4096) { _closing_tx_hu_conv = new org.ldk.structs.ClosingTransaction(null, _closing_tx); } Result_ECDSASignatureNoneZ ret = arg.sign_closing_transaction(_closing_tx_hu_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long sign_holder_anchor_input(long _anchor_tx, long _input) { byte[] _anchor_tx_conv = InternalUtils.decodeUint8Array(_anchor_tx); Result_ECDSASignatureNoneZ ret = arg.sign_holder_anchor_input(_anchor_tx_conv, _input); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long sign_channel_announcement_with_funding_key(long _msg) { org.ldk.structs.UnsignedChannelAnnouncement _msg_hu_conv = null; if (_msg < 0 || _msg > 4096) { _msg_hu_conv = new org.ldk.structs.UnsignedChannelAnnouncement(null, _msg); } Result_ECDSASignatureNoneZ ret = arg.sign_channel_announcement_with_funding_key(_msg_hu_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } } @@ -244,7 +285,7 @@ public class EcdsaChannelSigner : CommonBase { LDKEcdsaChannelSignerHolder impl_holder = new LDKEcdsaChannelSignerHolder(); LDKEcdsaChannelSignerImpl impl = new LDKEcdsaChannelSignerImpl(arg, impl_holder); ChannelSigner channelSigner = ChannelSigner.new_impl(channelSigner_impl, pubkeys); - long[] ptr_idx = bindings.LDKEcdsaChannelSigner_new(impl, channelSigner.instance_idx, pubkeys == null ? 0 : pubkeys.clone_ptr()); + long[] ptr_idx = bindings.LDKEcdsaChannelSigner_new(impl, channelSigner.instance_idx, pubkeys.clone_ptr()); impl_holder.held = new EcdsaChannelSigner(null, ptr_idx[0]); impl_holder.held.instance_idx = ptr_idx[1]; @@ -270,7 +311,7 @@ public class EcdsaChannelSigner : CommonBase { * irrelevant or duplicate preimages. */ public Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ sign_counterparty_commitment(org.ldk.structs.CommitmentTransaction commitment_tx, byte[][] inbound_htlc_preimages, byte[][] outbound_htlc_preimages) { - long ret = bindings.EcdsaChannelSigner_sign_counterparty_commitment(this.ptr, commitment_tx == null ? 0 : commitment_tx.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(inbound_htlc_preimages, inbound_htlc_preimages_conv_8 => InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(inbound_htlc_preimages_conv_8, 32)))), InternalUtils.encodeUint64Array(InternalUtils.mapArray(outbound_htlc_preimages, outbound_htlc_preimages_conv_8 => InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(outbound_htlc_preimages_conv_8, 32))))); + long ret = bindings.EcdsaChannelSigner_sign_counterparty_commitment(this.ptr, commitment_tx.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(inbound_htlc_preimages, inbound_htlc_preimages_conv_8 => InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(inbound_htlc_preimages_conv_8, 32)))), InternalUtils.encodeUint64Array(InternalUtils.mapArray(outbound_htlc_preimages, outbound_htlc_preimages_conv_8 => InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(outbound_htlc_preimages_conv_8, 32))))); GC.KeepAlive(this); GC.KeepAlive(commitment_tx); GC.KeepAlive(inbound_htlc_preimages); @@ -291,9 +332,16 @@ public class EcdsaChannelSigner : CommonBase { * This may be called multiple times for the same transaction. * * An external signer implementation should check that the commitment has not been revoked. + * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ public Result_ECDSASignatureNoneZ sign_holder_commitment(org.ldk.structs.HolderCommitmentTransaction commitment_tx) { - long ret = bindings.EcdsaChannelSigner_sign_holder_commitment(this.ptr, commitment_tx == null ? 0 : commitment_tx.ptr); + long ret = bindings.EcdsaChannelSigner_sign_holder_commitment(this.ptr, commitment_tx.ptr); GC.KeepAlive(this); GC.KeepAlive(commitment_tx); if (ret >= 0 && ret <= 4096) { return null; } @@ -317,6 +365,13 @@ public class EcdsaChannelSigner : CommonBase { * revoked the state which they eventually broadcast. It's not a _holder_ secret key and does * not allow the spending of any funds by itself (you need our holder `revocation_secret` to do * so). + * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ public Result_ECDSASignatureNoneZ sign_justice_revoked_output(byte[] justice_tx, long input, long amount, byte[] per_commitment_key) { long ret = bindings.EcdsaChannelSigner_sign_justice_revoked_output(this.ptr, InternalUtils.encodeUint8Array(justice_tx), input, amount, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(per_commitment_key, 32))); @@ -349,9 +404,16 @@ public class EcdsaChannelSigner : CommonBase { * * `htlc` holds HTLC elements (hash, timelock), thus changing the format of the witness script * (which is committed to in the BIP 143 signatures). + * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ public Result_ECDSASignatureNoneZ sign_justice_revoked_htlc(byte[] justice_tx, long input, long amount, byte[] per_commitment_key, org.ldk.structs.HTLCOutputInCommitment htlc) { - long ret = bindings.EcdsaChannelSigner_sign_justice_revoked_htlc(this.ptr, InternalUtils.encodeUint8Array(justice_tx), input, amount, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(per_commitment_key, 32)), htlc == null ? 0 : htlc.ptr); + long ret = bindings.EcdsaChannelSigner_sign_justice_revoked_htlc(this.ptr, InternalUtils.encodeUint8Array(justice_tx), input, amount, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(per_commitment_key, 32)), htlc.ptr); GC.KeepAlive(this); GC.KeepAlive(justice_tx); GC.KeepAlive(input); @@ -373,11 +435,17 @@ public class EcdsaChannelSigner : CommonBase { * [`ChannelMonitor`] [replica](https://github.com/lightningdevkit/rust-lightning/blob/main/GLOSSARY.md#monitor-replicas) * broadcasts it before receiving the update for the latest commitment transaction. * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * * [`EcdsaSighashType::All`]: bitcoin::sighash::EcdsaSighashType::All * [`ChannelMonitor`]: crate::chain::channelmonitor::ChannelMonitor + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ public Result_ECDSASignatureNoneZ sign_holder_htlc_transaction(byte[] htlc_tx, long input, org.ldk.structs.HTLCDescriptor htlc_descriptor) { - long ret = bindings.EcdsaChannelSigner_sign_holder_htlc_transaction(this.ptr, InternalUtils.encodeUint8Array(htlc_tx), input, htlc_descriptor == null ? 0 : htlc_descriptor.ptr); + long ret = bindings.EcdsaChannelSigner_sign_holder_htlc_transaction(this.ptr, InternalUtils.encodeUint8Array(htlc_tx), input, htlc_descriptor.ptr); GC.KeepAlive(this); GC.KeepAlive(htlc_tx); GC.KeepAlive(input); @@ -406,9 +474,16 @@ public class EcdsaChannelSigner : CommonBase { * detected onchain. It has been generated by our counterparty and is used to derive * channel state keys, which are then included in the witness script and committed to in the * BIP 143 signature. + * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ public Result_ECDSASignatureNoneZ sign_counterparty_htlc_transaction(byte[] htlc_tx, long input, long amount, byte[] per_commitment_point, org.ldk.structs.HTLCOutputInCommitment htlc) { - long ret = bindings.EcdsaChannelSigner_sign_counterparty_htlc_transaction(this.ptr, InternalUtils.encodeUint8Array(htlc_tx), input, amount, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(per_commitment_point, 33)), htlc == null ? 0 : htlc.ptr); + long ret = bindings.EcdsaChannelSigner_sign_counterparty_htlc_transaction(this.ptr, InternalUtils.encodeUint8Array(htlc_tx), input, amount, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(per_commitment_point, 33)), htlc.ptr); GC.KeepAlive(this); GC.KeepAlive(htlc_tx); GC.KeepAlive(input); @@ -428,7 +503,7 @@ public class EcdsaChannelSigner : CommonBase { * chosen to forgo their output as dust. */ public Result_ECDSASignatureNoneZ sign_closing_transaction(org.ldk.structs.ClosingTransaction closing_tx) { - long ret = bindings.EcdsaChannelSigner_sign_closing_transaction(this.ptr, closing_tx == null ? 0 : closing_tx.ptr); + long ret = bindings.EcdsaChannelSigner_sign_closing_transaction(this.ptr, closing_tx.ptr); GC.KeepAlive(this); GC.KeepAlive(closing_tx); if (ret >= 0 && ret <= 4096) { return null; } @@ -440,6 +515,13 @@ public class EcdsaChannelSigner : CommonBase { /** * Computes the signature for a commitment transaction's anchor output used as an * input within `anchor_tx`, which spends the commitment transaction, at index `input`. + * + * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid + * signature and should be retried later. Once the signer is ready to provide a signature after + * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its + * monitor. + * + * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked */ public Result_ECDSASignatureNoneZ sign_holder_anchor_input(byte[] anchor_tx, long input) { long ret = bindings.EcdsaChannelSigner_sign_holder_anchor_input(this.ptr, InternalUtils.encodeUint8Array(anchor_tx), input); @@ -465,7 +547,7 @@ public class EcdsaChannelSigner : CommonBase { * [`NodeSigner::sign_gossip_message`]: crate::sign::NodeSigner::sign_gossip_message */ public Result_ECDSASignatureNoneZ sign_channel_announcement_with_funding_key(org.ldk.structs.UnsignedChannelAnnouncement msg) { - long ret = bindings.EcdsaChannelSigner_sign_channel_announcement_with_funding_key(this.ptr, msg == null ? 0 : msg.ptr); + long ret = bindings.EcdsaChannelSigner_sign_channel_announcement_with_funding_key(this.ptr, msg.ptr); GC.KeepAlive(this); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/c_sharp/src/org/ldk/structs/EmptyNodeIdLookUp.cs b/c_sharp/src/org/ldk/structs/EmptyNodeIdLookUp.cs new file mode 100644 index 00000000..3dfe3b68 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/EmptyNodeIdLookUp.cs @@ -0,0 +1,43 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + + +/** + * A [`NodeIdLookUp`] that always returns `None`. + */ +public class EmptyNodeIdLookUp : CommonBase { + internal EmptyNodeIdLookUp(object _dummy, long ptr) : base(ptr) { } + ~EmptyNodeIdLookUp() { + if (ptr != 0) { bindings.EmptyNodeIdLookUp_free(ptr); } + } + + /** + * Constructs a new EmptyNodeIdLookUp given each field + */ + public static EmptyNodeIdLookUp of() { + long ret = bindings.EmptyNodeIdLookUp_new(); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.EmptyNodeIdLookUp ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.EmptyNodeIdLookUp(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Constructs a new NodeIdLookUp which calls the relevant methods on this_arg. + * This copies the `inner` pointer in this_arg and thus the returned NodeIdLookUp must be freed before this_arg is + */ + public NodeIdLookUp as_NodeIdLookUp() { + long ret = bindings.EmptyNodeIdLookUp_as_NodeIdLookUp(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + NodeIdLookUp ret_hu_conv = new NodeIdLookUp(null, ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/ErrorAction.cs b/c_sharp/src/org/ldk/structs/ErrorAction.cs index 9e0fc990..c137b857 100644 --- a/c_sharp/src/org/ldk/structs/ErrorAction.cs +++ b/c_sharp/src/org/ldk/structs/ErrorAction.cs @@ -129,7 +129,7 @@ public class ErrorAction : CommonBase { * Utility method to constructs a new DisconnectPeer-variant ErrorAction */ public static ErrorAction disconnect_peer(org.ldk.structs.ErrorMessage msg) { - long ret = bindings.ErrorAction_disconnect_peer(msg == null ? 0 : msg.ptr); + long ret = bindings.ErrorAction_disconnect_peer(msg.ptr); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.ErrorAction ret_hu_conv = org.ldk.structs.ErrorAction.constr_from_ptr(ret); @@ -142,7 +142,7 @@ public class ErrorAction : CommonBase { * Utility method to constructs a new DisconnectPeerWithWarning-variant ErrorAction */ public static ErrorAction disconnect_peer_with_warning(org.ldk.structs.WarningMessage msg) { - long ret = bindings.ErrorAction_disconnect_peer_with_warning(msg == null ? 0 : msg.ptr); + long ret = bindings.ErrorAction_disconnect_peer_with_warning(msg.ptr); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.ErrorAction ret_hu_conv = org.ldk.structs.ErrorAction.constr_from_ptr(ret); @@ -189,7 +189,7 @@ public class ErrorAction : CommonBase { * Utility method to constructs a new SendErrorMessage-variant ErrorAction */ public static ErrorAction send_error_message(org.ldk.structs.ErrorMessage msg) { - long ret = bindings.ErrorAction_send_error_message(msg == null ? 0 : msg.ptr); + long ret = bindings.ErrorAction_send_error_message(msg.ptr); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.ErrorAction ret_hu_conv = org.ldk.structs.ErrorAction.constr_from_ptr(ret); @@ -202,7 +202,7 @@ public class ErrorAction : CommonBase { * Utility method to constructs a new SendWarningMessage-variant ErrorAction */ public static ErrorAction send_warning_message(org.ldk.structs.WarningMessage msg, Level log_level) { - long ret = bindings.ErrorAction_send_warning_message(msg == null ? 0 : msg.ptr, log_level); + long ret = bindings.ErrorAction_send_warning_message(msg.ptr, log_level); GC.KeepAlive(msg); GC.KeepAlive(log_level); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/c_sharp/src/org/ldk/structs/ErrorMessage.cs b/c_sharp/src/org/ldk/structs/ErrorMessage.cs index fe33ec19..c2f4971f 100644 --- a/c_sharp/src/org/ldk/structs/ErrorMessage.cs +++ b/c_sharp/src/org/ldk/structs/ErrorMessage.cs @@ -23,12 +23,13 @@ public class ErrorMessage : CommonBase { * All-0s indicates a general error unrelated to a specific channel, after which all channels * with the sending peer should be closed. */ - public byte[] get_channel_id() { + public ChannelId get_channel_id() { long ret = bindings.ErrorMessage_get_channel_id(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** @@ -37,10 +38,11 @@ public class ErrorMessage : CommonBase { * All-0s indicates a general error unrelated to a specific channel, after which all channels * with the sending peer should be closed. */ - public void set_channel_id(byte[] val) { - bindings.ErrorMessage_set_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.ErrorMessage_set_channel_id(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** @@ -74,13 +76,14 @@ public class ErrorMessage : CommonBase { /** * Constructs a new ErrorMessage given each field */ - public static ErrorMessage of(byte[] channel_id_arg, string data_arg) { - long ret = bindings.ErrorMessage_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id_arg, 32)), InternalUtils.encodeString(data_arg)); + public static ErrorMessage of(org.ldk.structs.ChannelId channel_id_arg, string data_arg) { + long ret = bindings.ErrorMessage_new(channel_id_arg.ptr, InternalUtils.encodeString(data_arg)); GC.KeepAlive(channel_id_arg); GC.KeepAlive(data_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.ErrorMessage ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ErrorMessage(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id_arg); }; return ret_hu_conv; } @@ -120,7 +123,7 @@ public class ErrorMessage : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.ErrorMessage b) { - bool ret = bindings.ErrorMessage_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.ErrorMessage_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/Event.cs b/c_sharp/src/org/ldk/structs/Event.cs index ccc37c52..342adec3 100644 --- a/c_sharp/src/org/ldk/structs/Event.cs +++ b/c_sharp/src/org/ldk/structs/Event.cs @@ -56,7 +56,7 @@ public class Event : CommonBase { * * [`ChannelManager::funding_transaction_generated`]: crate::ln::channelmanager::ChannelManager::funding_transaction_generated */ - public byte[] temporary_channel_id; + public ChannelId temporary_channel_id; /** * The counterparty's node_id, which you'll need to pass back into * [`ChannelManager::funding_transaction_generated`]. @@ -86,8 +86,9 @@ public class Event : CommonBase { public UInt128 user_channel_id; internal Event_FundingGenerationReady(long ptr) : base(null, ptr) { long temporary_channel_id = bindings.LDKEvent_FundingGenerationReady_get_temporary_channel_id(ptr); - byte[] temporary_channel_id_conv = InternalUtils.decodeUint8Array(temporary_channel_id); - this.temporary_channel_id = temporary_channel_id_conv; + org.ldk.structs.ChannelId temporary_channel_id_hu_conv = null; if (temporary_channel_id < 0 || temporary_channel_id > 4096) { temporary_channel_id_hu_conv = new org.ldk.structs.ChannelId(null, temporary_channel_id); } + if (temporary_channel_id_hu_conv != null) { temporary_channel_id_hu_conv.ptrs_to.AddLast(this); }; + this.temporary_channel_id = temporary_channel_id_hu_conv; long counterparty_node_id = bindings.LDKEvent_FundingGenerationReady_get_counterparty_node_id(ptr); byte[] counterparty_node_id_conv = InternalUtils.decodeUint8Array(counterparty_node_id); this.counterparty_node_id = counterparty_node_id_conv; @@ -157,8 +158,10 @@ public class Event : CommonBase { public PaymentPurpose purpose; /** * The `channel_id` indicating over which channel we received the payment. + * + * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public Option_ThirtyTwoBytesZ via_channel_id; + public ChannelId via_channel_id; /** * The `user_channel_id` indicating over which channel we received the payment. */ @@ -191,7 +194,7 @@ public class Event : CommonBase { if (purpose_hu_conv != null) { purpose_hu_conv.ptrs_to.AddLast(this); }; this.purpose = purpose_hu_conv; long via_channel_id = bindings.LDKEvent_PaymentClaimable_get_via_channel_id(ptr); - org.ldk.structs.Option_ThirtyTwoBytesZ via_channel_id_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(via_channel_id); + org.ldk.structs.ChannelId via_channel_id_hu_conv = null; if (via_channel_id < 0 || via_channel_id > 4096) { via_channel_id_hu_conv = new org.ldk.structs.ChannelId(null, via_channel_id); } if (via_channel_id_hu_conv != null) { via_channel_id_hu_conv.ptrs_to.AddLast(this); }; this.via_channel_id = via_channel_id_hu_conv; long via_user_channel_id = bindings.LDKEvent_PaymentClaimable_get_via_user_channel_id(ptr); @@ -635,8 +638,10 @@ public class Event : CommonBase { * The `channel_id` indicating which channel the spendable outputs belong to. * * This will always be `Some` for events generated by LDK versions 0.0.117 and above. + * + * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public Option_ThirtyTwoBytesZ channel_id; + public ChannelId channel_id; internal Event_SpendableOutputs(long ptr) : base(null, ptr) { long outputs = bindings.LDKEvent_SpendableOutputs_get_outputs(ptr); int outputs_conv_27_len = InternalUtils.getArrayLength(outputs); @@ -650,7 +655,7 @@ public class Event : CommonBase { bindings.free_buffer(outputs); this.outputs = outputs_conv_27_arr; long channel_id = bindings.LDKEvent_SpendableOutputs_get_channel_id(ptr); - org.ldk.structs.Option_ThirtyTwoBytesZ channel_id_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(channel_id); + org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); } if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.AddLast(this); }; this.channel_id = channel_id_hu_conv; } @@ -658,17 +663,37 @@ public class Event : CommonBase { /** A Event of type PaymentForwarded */ public class Event_PaymentForwarded : Event { /** - * The incoming channel between the previous node and us. This is only `None` for events - * generated or serialized by versions prior to 0.0.107. + * The channel id of the incoming channel between the previous node and us. + * + * This is only `None` for events generated or serialized by versions prior to 0.0.107. + * + * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public ChannelId prev_channel_id; + /** + * The channel id of the outgoing channel between the next node and us. + * + * This is only `None` for events generated or serialized by versions prior to 0.0.107. + * + * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public ChannelId next_channel_id; + /** + * The `user_channel_id` of the incoming channel between the previous node and us. + * + * This is only `None` for events generated or serialized by versions prior to 0.0.122. */ - public Option_ThirtyTwoBytesZ prev_channel_id; + public Option_U128Z prev_user_channel_id; /** - * The outgoing channel between the next node and us. This is only `None` for events - * generated or serialized by versions prior to 0.0.107. + * The `user_channel_id` of the outgoing channel between the next node and us. + * + * This will be `None` if the payment was settled via an on-chain transaction. See the + * caveat described for the `total_fee_earned_msat` field. Moreover it will be `None` for + * events generated or serialized by versions prior to 0.0.122. */ - public Option_ThirtyTwoBytesZ next_channel_id; + public Option_U128Z next_user_channel_id; /** - * The fee, in milli-satoshis, which was earned as a result of the payment. + * The total fee, in milli-satoshis, which was earned as a result of the payment. * * Note that if we force-closed the channel over which we forwarded an HTLC while the HTLC * was pending, the amount the next hop claimed will have been rounded down to the nearest @@ -679,10 +704,26 @@ public class Event : CommonBase { * If the channel which sent us the payment has been force-closed, we will claim the funds * via an on-chain transaction. In that case we do not yet know the on-chain transaction * fees which we will spend and will instead set this to `None`. It is possible duplicate - * `PaymentForwarded` events are generated for the same payment iff `fee_earned_msat` is + * `PaymentForwarded` events are generated for the same payment iff `total_fee_earned_msat` is * `None`. */ - public Option_u64Z fee_earned_msat; + public Option_u64Z total_fee_earned_msat; + /** + * The share of the total fee, in milli-satoshis, which was withheld in addition to the + * forwarding fee. + * + * This will only be `Some` if we forwarded an intercepted HTLC with less than the + * expected amount. This means our counterparty accepted to receive less than the invoice + * amount, e.g., by claiming the payment featuring a corresponding + * [`PaymentClaimable::counterparty_skimmed_fee_msat`]. + * + * Will also always be `None` for events serialized with LDK prior to version 0.0.122. + * + * The caveat described above the `total_fee_earned_msat` field applies here as well. + * + * [`PaymentClaimable::counterparty_skimmed_fee_msat`]: Self::PaymentClaimable::counterparty_skimmed_fee_msat + */ + public Option_u64Z skimmed_fee_msat; /** * If this is `true`, the forwarded HTLC was claimed by our counterparty via an on-chain * transaction. @@ -691,22 +732,34 @@ public class Event : CommonBase { /** * The final amount forwarded, in milli-satoshis, after the fee is deducted. * - * The caveat described above the `fee_earned_msat` field applies here as well. + * The caveat described above the `total_fee_earned_msat` field applies here as well. */ public Option_u64Z outbound_amount_forwarded_msat; internal Event_PaymentForwarded(long ptr) : base(null, ptr) { long prev_channel_id = bindings.LDKEvent_PaymentForwarded_get_prev_channel_id(ptr); - org.ldk.structs.Option_ThirtyTwoBytesZ prev_channel_id_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(prev_channel_id); + org.ldk.structs.ChannelId prev_channel_id_hu_conv = null; if (prev_channel_id < 0 || prev_channel_id > 4096) { prev_channel_id_hu_conv = new org.ldk.structs.ChannelId(null, prev_channel_id); } if (prev_channel_id_hu_conv != null) { prev_channel_id_hu_conv.ptrs_to.AddLast(this); }; this.prev_channel_id = prev_channel_id_hu_conv; long next_channel_id = bindings.LDKEvent_PaymentForwarded_get_next_channel_id(ptr); - org.ldk.structs.Option_ThirtyTwoBytesZ next_channel_id_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(next_channel_id); + org.ldk.structs.ChannelId next_channel_id_hu_conv = null; if (next_channel_id < 0 || next_channel_id > 4096) { next_channel_id_hu_conv = new org.ldk.structs.ChannelId(null, next_channel_id); } if (next_channel_id_hu_conv != null) { next_channel_id_hu_conv.ptrs_to.AddLast(this); }; this.next_channel_id = next_channel_id_hu_conv; - long fee_earned_msat = bindings.LDKEvent_PaymentForwarded_get_fee_earned_msat(ptr); - org.ldk.structs.Option_u64Z fee_earned_msat_hu_conv = org.ldk.structs.Option_u64Z.constr_from_ptr(fee_earned_msat); - if (fee_earned_msat_hu_conv != null) { fee_earned_msat_hu_conv.ptrs_to.AddLast(this); }; - this.fee_earned_msat = fee_earned_msat_hu_conv; + long prev_user_channel_id = bindings.LDKEvent_PaymentForwarded_get_prev_user_channel_id(ptr); + org.ldk.structs.Option_U128Z prev_user_channel_id_hu_conv = org.ldk.structs.Option_U128Z.constr_from_ptr(prev_user_channel_id); + if (prev_user_channel_id_hu_conv != null) { prev_user_channel_id_hu_conv.ptrs_to.AddLast(this); }; + this.prev_user_channel_id = prev_user_channel_id_hu_conv; + long next_user_channel_id = bindings.LDKEvent_PaymentForwarded_get_next_user_channel_id(ptr); + org.ldk.structs.Option_U128Z next_user_channel_id_hu_conv = org.ldk.structs.Option_U128Z.constr_from_ptr(next_user_channel_id); + if (next_user_channel_id_hu_conv != null) { next_user_channel_id_hu_conv.ptrs_to.AddLast(this); }; + this.next_user_channel_id = next_user_channel_id_hu_conv; + long total_fee_earned_msat = bindings.LDKEvent_PaymentForwarded_get_total_fee_earned_msat(ptr); + org.ldk.structs.Option_u64Z total_fee_earned_msat_hu_conv = org.ldk.structs.Option_u64Z.constr_from_ptr(total_fee_earned_msat); + if (total_fee_earned_msat_hu_conv != null) { total_fee_earned_msat_hu_conv.ptrs_to.AddLast(this); }; + this.total_fee_earned_msat = total_fee_earned_msat_hu_conv; + long skimmed_fee_msat = bindings.LDKEvent_PaymentForwarded_get_skimmed_fee_msat(ptr); + org.ldk.structs.Option_u64Z skimmed_fee_msat_hu_conv = org.ldk.structs.Option_u64Z.constr_from_ptr(skimmed_fee_msat); + if (skimmed_fee_msat_hu_conv != null) { skimmed_fee_msat_hu_conv.ptrs_to.AddLast(this); }; + this.skimmed_fee_msat = skimmed_fee_msat_hu_conv; this.claim_from_onchain_tx = bindings.LDKEvent_PaymentForwarded_get_claim_from_onchain_tx(ptr); long outbound_amount_forwarded_msat = bindings.LDKEvent_PaymentForwarded_get_outbound_amount_forwarded_msat(ptr); org.ldk.structs.Option_u64Z outbound_amount_forwarded_msat_hu_conv = org.ldk.structs.Option_u64Z.constr_from_ptr(outbound_amount_forwarded_msat); @@ -719,7 +772,7 @@ public class Event : CommonBase { /** * The `channel_id` of the channel that is pending confirmation. */ - public byte[] channel_id; + public ChannelId channel_id; /** * The `user_channel_id` value passed in to [`ChannelManager::create_channel`] for outbound * channels, or to [`ChannelManager::accept_inbound_channel`] for inbound channels if @@ -735,8 +788,10 @@ public class Event : CommonBase { * The `temporary_channel_id` this channel used to be known by during channel establishment. * * Will be `None` for channels created prior to LDK version 0.0.115. + * + * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public Option_ThirtyTwoBytesZ former_temporary_channel_id; + public ChannelId former_temporary_channel_id; /** * The `node_id` of the channel counterparty. */ @@ -745,15 +800,24 @@ public class Event : CommonBase { * The outpoint of the channel's funding transaction. */ public OutPoint funding_txo; + /** + * The features that this channel will operate with. + * + * Will be `None` for channels created prior to LDK version 0.0.122. + * + * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public ChannelTypeFeatures channel_type; internal Event_ChannelPending(long ptr) : base(null, ptr) { long channel_id = bindings.LDKEvent_ChannelPending_get_channel_id(ptr); - byte[] channel_id_conv = InternalUtils.decodeUint8Array(channel_id); - this.channel_id = channel_id_conv; + org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); } + if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.AddLast(this); }; + this.channel_id = channel_id_hu_conv; long user_channel_id = bindings.LDKEvent_ChannelPending_get_user_channel_id(ptr); org.ldk.util.UInt128 user_channel_id_conv = new org.ldk.util.UInt128(user_channel_id); this.user_channel_id = user_channel_id_conv; long former_temporary_channel_id = bindings.LDKEvent_ChannelPending_get_former_temporary_channel_id(ptr); - org.ldk.structs.Option_ThirtyTwoBytesZ former_temporary_channel_id_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(former_temporary_channel_id); + org.ldk.structs.ChannelId former_temporary_channel_id_hu_conv = null; if (former_temporary_channel_id < 0 || former_temporary_channel_id > 4096) { former_temporary_channel_id_hu_conv = new org.ldk.structs.ChannelId(null, former_temporary_channel_id); } if (former_temporary_channel_id_hu_conv != null) { former_temporary_channel_id_hu_conv.ptrs_to.AddLast(this); }; this.former_temporary_channel_id = former_temporary_channel_id_hu_conv; long counterparty_node_id = bindings.LDKEvent_ChannelPending_get_counterparty_node_id(ptr); @@ -763,6 +827,10 @@ public class Event : CommonBase { org.ldk.structs.OutPoint funding_txo_hu_conv = null; if (funding_txo < 0 || funding_txo > 4096) { funding_txo_hu_conv = new org.ldk.structs.OutPoint(null, funding_txo); } if (funding_txo_hu_conv != null) { funding_txo_hu_conv.ptrs_to.AddLast(this); }; this.funding_txo = funding_txo_hu_conv; + long channel_type = bindings.LDKEvent_ChannelPending_get_channel_type(ptr); + org.ldk.structs.ChannelTypeFeatures channel_type_hu_conv = null; if (channel_type < 0 || channel_type > 4096) { channel_type_hu_conv = new org.ldk.structs.ChannelTypeFeatures(null, channel_type); } + if (channel_type_hu_conv != null) { channel_type_hu_conv.ptrs_to.AddLast(this); }; + this.channel_type = channel_type_hu_conv; } } /** A Event of type ChannelReady */ @@ -770,7 +838,7 @@ public class Event : CommonBase { /** * The `channel_id` of the channel that is ready. */ - public byte[] channel_id; + public ChannelId channel_id; /** * The `user_channel_id` value passed in to [`ChannelManager::create_channel`] for outbound * channels, or to [`ChannelManager::accept_inbound_channel`] for inbound channels if @@ -792,8 +860,9 @@ public class Event : CommonBase { public ChannelTypeFeatures channel_type; internal Event_ChannelReady(long ptr) : base(null, ptr) { long channel_id = bindings.LDKEvent_ChannelReady_get_channel_id(ptr); - byte[] channel_id_conv = InternalUtils.decodeUint8Array(channel_id); - this.channel_id = channel_id_conv; + org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); } + if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.AddLast(this); }; + this.channel_id = channel_id_hu_conv; long user_channel_id = bindings.LDKEvent_ChannelReady_get_user_channel_id(ptr); org.ldk.util.UInt128 user_channel_id_conv = new org.ldk.util.UInt128(user_channel_id); this.user_channel_id = user_channel_id_conv; @@ -812,7 +881,7 @@ public class Event : CommonBase { * The `channel_id` of the channel which has been closed. Note that on-chain transactions * resolving the channel are likely still awaiting confirmation. */ - public byte[] channel_id; + public ChannelId channel_id; /** * The `user_channel_id` value passed in to [`ChannelManager::create_channel`] for outbound * channels, or to [`ChannelManager::accept_inbound_channel`] for inbound channels if @@ -854,8 +923,9 @@ public class Event : CommonBase { public OutPoint channel_funding_txo; internal Event_ChannelClosed(long ptr) : base(null, ptr) { long channel_id = bindings.LDKEvent_ChannelClosed_get_channel_id(ptr); - byte[] channel_id_conv = InternalUtils.decodeUint8Array(channel_id); - this.channel_id = channel_id_conv; + org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); } + if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.AddLast(this); }; + this.channel_id = channel_id_hu_conv; long user_channel_id = bindings.LDKEvent_ChannelClosed_get_user_channel_id(ptr); org.ldk.util.UInt128 user_channel_id_conv = new org.ldk.util.UInt128(user_channel_id); this.user_channel_id = user_channel_id_conv; @@ -881,15 +951,16 @@ public class Event : CommonBase { /** * The channel_id of the channel which has been closed. */ - public byte[] channel_id; + public ChannelId channel_id; /** * The full transaction received from the user */ public byte[] transaction; internal Event_DiscardFunding(long ptr) : base(null, ptr) { long channel_id = bindings.LDKEvent_DiscardFunding_get_channel_id(ptr); - byte[] channel_id_conv = InternalUtils.decodeUint8Array(channel_id); - this.channel_id = channel_id_conv; + org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); } + if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.AddLast(this); }; + this.channel_id = channel_id_hu_conv; long transaction = bindings.LDKEvent_DiscardFunding_get_transaction(ptr); byte[] transaction_conv = InternalUtils.decodeUint8Array(transaction); this.transaction = transaction_conv; @@ -907,7 +978,7 @@ public class Event : CommonBase { * [`ChannelManager::accept_inbound_channel`]: crate::ln::channelmanager::ChannelManager::accept_inbound_channel * [`ChannelManager::force_close_without_broadcasting_txn`]: crate::ln::channelmanager::ChannelManager::force_close_without_broadcasting_txn */ - public byte[] temporary_channel_id; + public ChannelId temporary_channel_id; /** * The node_id of the counterparty requesting to open the channel. * @@ -948,8 +1019,9 @@ public class Event : CommonBase { public ChannelTypeFeatures channel_type; internal Event_OpenChannelRequest(long ptr) : base(null, ptr) { long temporary_channel_id = bindings.LDKEvent_OpenChannelRequest_get_temporary_channel_id(ptr); - byte[] temporary_channel_id_conv = InternalUtils.decodeUint8Array(temporary_channel_id); - this.temporary_channel_id = temporary_channel_id_conv; + org.ldk.structs.ChannelId temporary_channel_id_hu_conv = null; if (temporary_channel_id < 0 || temporary_channel_id > 4096) { temporary_channel_id_hu_conv = new org.ldk.structs.ChannelId(null, temporary_channel_id); } + if (temporary_channel_id_hu_conv != null) { temporary_channel_id_hu_conv.ptrs_to.AddLast(this); }; + this.temporary_channel_id = temporary_channel_id_hu_conv; long counterparty_node_id = bindings.LDKEvent_OpenChannelRequest_get_counterparty_node_id(ptr); byte[] counterparty_node_id_conv = InternalUtils.decodeUint8Array(counterparty_node_id); this.counterparty_node_id = counterparty_node_id_conv; @@ -966,15 +1038,16 @@ public class Event : CommonBase { /** * The channel over which the HTLC was received. */ - public byte[] prev_channel_id; + public ChannelId prev_channel_id; /** * Destination of the HTLC that failed to be processed. */ public HTLCDestination failed_next_destination; internal Event_HTLCHandlingFailed(long ptr) : base(null, ptr) { long prev_channel_id = bindings.LDKEvent_HTLCHandlingFailed_get_prev_channel_id(ptr); - byte[] prev_channel_id_conv = InternalUtils.decodeUint8Array(prev_channel_id); - this.prev_channel_id = prev_channel_id_conv; + org.ldk.structs.ChannelId prev_channel_id_hu_conv = null; if (prev_channel_id < 0 || prev_channel_id > 4096) { prev_channel_id_hu_conv = new org.ldk.structs.ChannelId(null, prev_channel_id); } + if (prev_channel_id_hu_conv != null) { prev_channel_id_hu_conv.ptrs_to.AddLast(this); }; + this.prev_channel_id = prev_channel_id_hu_conv; long failed_next_destination = bindings.LDKEvent_HTLCHandlingFailed_get_failed_next_destination(ptr); org.ldk.structs.HTLCDestination failed_next_destination_hu_conv = org.ldk.structs.HTLCDestination.constr_from_ptr(failed_next_destination); if (failed_next_destination_hu_conv != null) { failed_next_destination_hu_conv.ptrs_to.AddLast(this); }; @@ -1012,8 +1085,8 @@ public class Event : CommonBase { /** * Utility method to constructs a new FundingGenerationReady-variant Event */ - public static Event funding_generation_ready(byte[] temporary_channel_id, byte[] counterparty_node_id, long channel_value_satoshis, byte[] output_script, org.ldk.util.UInt128 user_channel_id) { - long ret = bindings.Event_funding_generation_ready(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(temporary_channel_id, 32)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_node_id, 33)), channel_value_satoshis, InternalUtils.encodeUint8Array(output_script), InternalUtils.encodeUint8Array(user_channel_id.getLEBytes())); + public static Event funding_generation_ready(org.ldk.structs.ChannelId temporary_channel_id, byte[] counterparty_node_id, long channel_value_satoshis, byte[] output_script, org.ldk.util.UInt128 user_channel_id) { + long ret = bindings.Event_funding_generation_ready(temporary_channel_id.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_node_id, 33)), channel_value_satoshis, InternalUtils.encodeUint8Array(output_script), InternalUtils.encodeUint8Array(user_channel_id.getLEBytes())); GC.KeepAlive(temporary_channel_id); GC.KeepAlive(counterparty_node_id); GC.KeepAlive(channel_value_satoshis); @@ -1022,14 +1095,15 @@ public class Event : CommonBase { if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Event ret_hu_conv = org.ldk.structs.Event.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(temporary_channel_id); }; return ret_hu_conv; } /** * Utility method to constructs a new PaymentClaimable-variant Event */ - public static Event payment_claimable(byte[] receiver_node_id, byte[] payment_hash, org.ldk.structs.RecipientOnionFields onion_fields, long amount_msat, long counterparty_skimmed_fee_msat, org.ldk.structs.PaymentPurpose purpose, org.ldk.structs.Option_ThirtyTwoBytesZ via_channel_id, org.ldk.structs.Option_U128Z via_user_channel_id, org.ldk.structs.Option_u32Z claim_deadline) { - long ret = bindings.Event_payment_claimable(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(receiver_node_id, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_hash, 32)), onion_fields == null ? 0 : onion_fields.ptr, amount_msat, counterparty_skimmed_fee_msat, purpose.ptr, via_channel_id.ptr, via_user_channel_id.ptr, claim_deadline.ptr); + public static Event payment_claimable(byte[] receiver_node_id, byte[] payment_hash, org.ldk.structs.RecipientOnionFields onion_fields, long amount_msat, long counterparty_skimmed_fee_msat, org.ldk.structs.PaymentPurpose purpose, org.ldk.structs.ChannelId via_channel_id, org.ldk.structs.Option_U128Z via_user_channel_id, org.ldk.structs.Option_u32Z claim_deadline) { + long ret = bindings.Event_payment_claimable(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(receiver_node_id, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_hash, 32)), onion_fields.ptr, amount_msat, counterparty_skimmed_fee_msat, purpose.ptr, via_channel_id.ptr, via_user_channel_id.ptr, claim_deadline.ptr); GC.KeepAlive(receiver_node_id); GC.KeepAlive(payment_hash); GC.KeepAlive(onion_fields); @@ -1054,7 +1128,7 @@ public class Event : CommonBase { * Utility method to constructs a new PaymentClaimed-variant Event */ public static Event payment_claimed(byte[] receiver_node_id, byte[] payment_hash, long amount_msat, org.ldk.structs.PaymentPurpose purpose, ClaimedHTLC[] htlcs, org.ldk.structs.Option_u64Z sender_intended_total_msat) { - long ret = bindings.Event_payment_claimed(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(receiver_node_id, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_hash, 32)), amount_msat, purpose.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(htlcs, htlcs_conv_13 => htlcs_conv_13 == null ? 0 : htlcs_conv_13.ptr)), sender_intended_total_msat.ptr); + long ret = bindings.Event_payment_claimed(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(receiver_node_id, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_hash, 32)), amount_msat, purpose.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(htlcs, htlcs_conv_13 => htlcs_conv_13.ptr)), sender_intended_total_msat.ptr); GC.KeepAlive(receiver_node_id); GC.KeepAlive(payment_hash); GC.KeepAlive(amount_msat); @@ -1132,7 +1206,7 @@ public class Event : CommonBase { * Utility method to constructs a new PaymentPathSuccessful-variant Event */ public static Event payment_path_successful(byte[] payment_id, org.ldk.structs.Option_ThirtyTwoBytesZ payment_hash, org.ldk.structs.Path path) { - long ret = bindings.Event_payment_path_successful(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32)), payment_hash.ptr, path == null ? 0 : path.ptr); + long ret = bindings.Event_payment_path_successful(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32)), payment_hash.ptr, path.ptr); GC.KeepAlive(payment_id); GC.KeepAlive(payment_hash); GC.KeepAlive(path); @@ -1148,7 +1222,7 @@ public class Event : CommonBase { * Utility method to constructs a new PaymentPathFailed-variant Event */ public static Event payment_path_failed(org.ldk.structs.Option_ThirtyTwoBytesZ payment_id, byte[] payment_hash, bool payment_failed_permanently, org.ldk.structs.PathFailure failure, org.ldk.structs.Path path, org.ldk.structs.Option_u64Z short_channel_id) { - long ret = bindings.Event_payment_path_failed(payment_id.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_hash, 32)), payment_failed_permanently, failure.ptr, path == null ? 0 : path.ptr, short_channel_id.ptr); + long ret = bindings.Event_payment_path_failed(payment_id.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_hash, 32)), payment_failed_permanently, failure.ptr, path.ptr, short_channel_id.ptr); GC.KeepAlive(payment_id); GC.KeepAlive(payment_hash); GC.KeepAlive(payment_failed_permanently); @@ -1169,7 +1243,7 @@ public class Event : CommonBase { * Utility method to constructs a new ProbeSuccessful-variant Event */ public static Event probe_successful(byte[] payment_id, byte[] payment_hash, org.ldk.structs.Path path) { - long ret = bindings.Event_probe_successful(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_hash, 32)), path == null ? 0 : path.ptr); + long ret = bindings.Event_probe_successful(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_hash, 32)), path.ptr); GC.KeepAlive(payment_id); GC.KeepAlive(payment_hash); GC.KeepAlive(path); @@ -1184,7 +1258,7 @@ public class Event : CommonBase { * Utility method to constructs a new ProbeFailed-variant Event */ public static Event probe_failed(byte[] payment_id, byte[] payment_hash, org.ldk.structs.Path path, org.ldk.structs.Option_u64Z short_channel_id) { - long ret = bindings.Event_probe_failed(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_hash, 32)), path == null ? 0 : path.ptr, short_channel_id.ptr); + long ret = bindings.Event_probe_failed(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_hash, 32)), path.ptr, short_channel_id.ptr); GC.KeepAlive(payment_id); GC.KeepAlive(payment_hash); GC.KeepAlive(path); @@ -1228,7 +1302,7 @@ public class Event : CommonBase { /** * Utility method to constructs a new SpendableOutputs-variant Event */ - public static Event spendable_outputs(SpendableOutputDescriptor[] outputs, org.ldk.structs.Option_ThirtyTwoBytesZ channel_id) { + public static Event spendable_outputs(SpendableOutputDescriptor[] outputs, org.ldk.structs.ChannelId channel_id) { long ret = bindings.Event_spendable_outputs(InternalUtils.encodeUint64Array(InternalUtils.mapArray(outputs, outputs_conv_27 => outputs_conv_27.ptr)), channel_id.ptr); GC.KeepAlive(outputs); GC.KeepAlive(channel_id); @@ -1243,11 +1317,14 @@ public class Event : CommonBase { /** * Utility method to constructs a new PaymentForwarded-variant Event */ - public static Event payment_forwarded(org.ldk.structs.Option_ThirtyTwoBytesZ prev_channel_id, org.ldk.structs.Option_ThirtyTwoBytesZ next_channel_id, org.ldk.structs.Option_u64Z fee_earned_msat, bool claim_from_onchain_tx, org.ldk.structs.Option_u64Z outbound_amount_forwarded_msat) { - long ret = bindings.Event_payment_forwarded(prev_channel_id.ptr, next_channel_id.ptr, fee_earned_msat.ptr, claim_from_onchain_tx, outbound_amount_forwarded_msat.ptr); + public static Event payment_forwarded(org.ldk.structs.ChannelId prev_channel_id, org.ldk.structs.ChannelId next_channel_id, org.ldk.structs.Option_U128Z prev_user_channel_id, org.ldk.structs.Option_U128Z next_user_channel_id, org.ldk.structs.Option_u64Z total_fee_earned_msat, org.ldk.structs.Option_u64Z skimmed_fee_msat, bool claim_from_onchain_tx, org.ldk.structs.Option_u64Z outbound_amount_forwarded_msat) { + long ret = bindings.Event_payment_forwarded(prev_channel_id.ptr, next_channel_id.ptr, prev_user_channel_id.ptr, next_user_channel_id.ptr, total_fee_earned_msat.ptr, skimmed_fee_msat.ptr, claim_from_onchain_tx, outbound_amount_forwarded_msat.ptr); GC.KeepAlive(prev_channel_id); GC.KeepAlive(next_channel_id); - GC.KeepAlive(fee_earned_msat); + GC.KeepAlive(prev_user_channel_id); + GC.KeepAlive(next_user_channel_id); + GC.KeepAlive(total_fee_earned_msat); + GC.KeepAlive(skimmed_fee_msat); GC.KeepAlive(claim_from_onchain_tx); GC.KeepAlive(outbound_amount_forwarded_msat); if (ret >= 0 && ret <= 4096) { return null; } @@ -1255,7 +1332,10 @@ public class Event : CommonBase { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(prev_channel_id); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(next_channel_id); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(fee_earned_msat); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(prev_user_channel_id); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(next_user_channel_id); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(total_fee_earned_msat); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(skimmed_fee_msat); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(outbound_amount_forwarded_msat); }; return ret_hu_conv; } @@ -1263,26 +1343,29 @@ public class Event : CommonBase { /** * Utility method to constructs a new ChannelPending-variant Event */ - public static Event channel_pending(byte[] channel_id, org.ldk.util.UInt128 user_channel_id, org.ldk.structs.Option_ThirtyTwoBytesZ former_temporary_channel_id, byte[] counterparty_node_id, org.ldk.structs.OutPoint funding_txo) { - long ret = bindings.Event_channel_pending(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id, 32)), InternalUtils.encodeUint8Array(user_channel_id.getLEBytes()), former_temporary_channel_id.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_node_id, 33)), funding_txo == null ? 0 : funding_txo.ptr); + public static Event channel_pending(org.ldk.structs.ChannelId channel_id, org.ldk.util.UInt128 user_channel_id, org.ldk.structs.ChannelId former_temporary_channel_id, byte[] counterparty_node_id, org.ldk.structs.OutPoint funding_txo, org.ldk.structs.ChannelTypeFeatures channel_type) { + long ret = bindings.Event_channel_pending(channel_id.ptr, InternalUtils.encodeUint8Array(user_channel_id.getLEBytes()), former_temporary_channel_id.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_node_id, 33)), funding_txo.ptr, channel_type.ptr); GC.KeepAlive(channel_id); GC.KeepAlive(user_channel_id); GC.KeepAlive(former_temporary_channel_id); GC.KeepAlive(counterparty_node_id); GC.KeepAlive(funding_txo); + GC.KeepAlive(channel_type); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Event ret_hu_conv = org.ldk.structs.Event.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(former_temporary_channel_id); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(funding_txo); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_type); }; return ret_hu_conv; } /** * Utility method to constructs a new ChannelReady-variant Event */ - public static Event channel_ready(byte[] channel_id, org.ldk.util.UInt128 user_channel_id, byte[] counterparty_node_id, org.ldk.structs.ChannelTypeFeatures channel_type) { - long ret = bindings.Event_channel_ready(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id, 32)), InternalUtils.encodeUint8Array(user_channel_id.getLEBytes()), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_node_id, 33)), channel_type == null ? 0 : channel_type.ptr); + public static Event channel_ready(org.ldk.structs.ChannelId channel_id, org.ldk.util.UInt128 user_channel_id, byte[] counterparty_node_id, org.ldk.structs.ChannelTypeFeatures channel_type) { + long ret = bindings.Event_channel_ready(channel_id.ptr, InternalUtils.encodeUint8Array(user_channel_id.getLEBytes()), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_node_id, 33)), channel_type.ptr); GC.KeepAlive(channel_id); GC.KeepAlive(user_channel_id); GC.KeepAlive(counterparty_node_id); @@ -1290,6 +1373,7 @@ public class Event : CommonBase { if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Event ret_hu_conv = org.ldk.structs.Event.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_type); }; return ret_hu_conv; } @@ -1297,8 +1381,8 @@ public class Event : CommonBase { /** * Utility method to constructs a new ChannelClosed-variant Event */ - public static Event channel_closed(byte[] channel_id, org.ldk.util.UInt128 user_channel_id, org.ldk.structs.ClosureReason reason, byte[] counterparty_node_id, org.ldk.structs.Option_u64Z channel_capacity_sats, org.ldk.structs.OutPoint channel_funding_txo) { - long ret = bindings.Event_channel_closed(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id, 32)), InternalUtils.encodeUint8Array(user_channel_id.getLEBytes()), reason.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_node_id, 33)), channel_capacity_sats.ptr, channel_funding_txo == null ? 0 : channel_funding_txo.ptr); + public static Event channel_closed(org.ldk.structs.ChannelId channel_id, org.ldk.util.UInt128 user_channel_id, org.ldk.structs.ClosureReason reason, byte[] counterparty_node_id, org.ldk.structs.Option_u64Z channel_capacity_sats, org.ldk.structs.OutPoint channel_funding_txo) { + long ret = bindings.Event_channel_closed(channel_id.ptr, InternalUtils.encodeUint8Array(user_channel_id.getLEBytes()), reason.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_node_id, 33)), channel_capacity_sats.ptr, channel_funding_txo.ptr); GC.KeepAlive(channel_id); GC.KeepAlive(user_channel_id); GC.KeepAlive(reason); @@ -1308,6 +1392,7 @@ public class Event : CommonBase { if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Event ret_hu_conv = org.ldk.structs.Event.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(reason); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_capacity_sats); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_funding_txo); }; @@ -1317,21 +1402,22 @@ public class Event : CommonBase { /** * Utility method to constructs a new DiscardFunding-variant Event */ - public static Event discard_funding(byte[] channel_id, byte[] transaction) { - long ret = bindings.Event_discard_funding(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id, 32)), InternalUtils.encodeUint8Array(transaction)); + public static Event discard_funding(org.ldk.structs.ChannelId channel_id, byte[] transaction) { + long ret = bindings.Event_discard_funding(channel_id.ptr, InternalUtils.encodeUint8Array(transaction)); GC.KeepAlive(channel_id); GC.KeepAlive(transaction); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Event ret_hu_conv = org.ldk.structs.Event.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id); }; return ret_hu_conv; } /** * Utility method to constructs a new OpenChannelRequest-variant Event */ - public static Event open_channel_request(byte[] temporary_channel_id, byte[] counterparty_node_id, long funding_satoshis, long push_msat, org.ldk.structs.ChannelTypeFeatures channel_type) { - long ret = bindings.Event_open_channel_request(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(temporary_channel_id, 32)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_node_id, 33)), funding_satoshis, push_msat, channel_type == null ? 0 : channel_type.ptr); + public static Event open_channel_request(org.ldk.structs.ChannelId temporary_channel_id, byte[] counterparty_node_id, long funding_satoshis, long push_msat, org.ldk.structs.ChannelTypeFeatures channel_type) { + long ret = bindings.Event_open_channel_request(temporary_channel_id.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_node_id, 33)), funding_satoshis, push_msat, channel_type.ptr); GC.KeepAlive(temporary_channel_id); GC.KeepAlive(counterparty_node_id); GC.KeepAlive(funding_satoshis); @@ -1340,6 +1426,7 @@ public class Event : CommonBase { if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Event ret_hu_conv = org.ldk.structs.Event.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(temporary_channel_id); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_type); }; return ret_hu_conv; } @@ -1347,13 +1434,14 @@ public class Event : CommonBase { /** * Utility method to constructs a new HTLCHandlingFailed-variant Event */ - public static Event htlchandling_failed(byte[] prev_channel_id, org.ldk.structs.HTLCDestination failed_next_destination) { - long ret = bindings.Event_htlchandling_failed(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(prev_channel_id, 32)), failed_next_destination.ptr); + public static Event htlchandling_failed(org.ldk.structs.ChannelId prev_channel_id, org.ldk.structs.HTLCDestination failed_next_destination) { + long ret = bindings.Event_htlchandling_failed(prev_channel_id.ptr, failed_next_destination.ptr); GC.KeepAlive(prev_channel_id); GC.KeepAlive(failed_next_destination); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Event ret_hu_conv = org.ldk.structs.Event.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(prev_channel_id); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(failed_next_destination); }; return ret_hu_conv; } @@ -1376,7 +1464,7 @@ public class Event : CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public bool eq(org.ldk.structs.Event b) { - bool ret = bindings.Event_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.Event_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); return ret; diff --git a/c_sharp/src/org/ldk/structs/ExpiryTime.cs b/c_sharp/src/org/ldk/structs/ExpiryTime.cs index 66aaf8dc..bd8be08e 100644 --- a/c_sharp/src/org/ldk/structs/ExpiryTime.cs +++ b/c_sharp/src/org/ldk/structs/ExpiryTime.cs @@ -52,7 +52,7 @@ public class ExpiryTime : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.ExpiryTime b) { - bool ret = bindings.ExpiryTime_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.ExpiryTime_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/Fallback.cs b/c_sharp/src/org/ldk/structs/Fallback.cs index 0fc469f3..371af63e 100644 --- a/c_sharp/src/org/ldk/structs/Fallback.cs +++ b/c_sharp/src/org/ldk/structs/Fallback.cs @@ -128,7 +128,7 @@ public class Fallback : CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public bool eq(org.ldk.structs.Fallback b) { - bool ret = bindings.Fallback_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.Fallback_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); return ret; diff --git a/c_sharp/src/org/ldk/structs/FeeEstimator.cs b/c_sharp/src/org/ldk/structs/FeeEstimator.cs index 964cf002..e2d73ccc 100644 --- a/c_sharp/src/org/ldk/structs/FeeEstimator.cs +++ b/c_sharp/src/org/ldk/structs/FeeEstimator.cs @@ -33,6 +33,10 @@ public interface FeeEstimatorInterface { * * Note that all of the functions implemented here *must* be reentrant-safe (obviously - they're * called from inside the library in response to chain events, P2P events, or timer events). + * + * LDK may generate a substantial number of fee-estimation calls in some cases. You should + * pre-calculate and cache the fee estimate results to ensure you don't substantially slow HTLC + * handling. */ public class FeeEstimator : CommonBase { internal bindings.LDKFeeEstimator bindings_instance; diff --git a/c_sharp/src/org/ldk/structs/Filter.cs b/c_sharp/src/org/ldk/structs/Filter.cs index 32fb570e..f27d0a52 100644 --- a/c_sharp/src/org/ldk/structs/Filter.cs +++ b/c_sharp/src/org/ldk/structs/Filter.cs @@ -106,7 +106,7 @@ public class Filter : CommonBase { * registered mid-processing. */ public void register_output(org.ldk.structs.WatchedOutput output) { - bindings.Filter_register_output(this.ptr, output == null ? 0 : output.ptr); + bindings.Filter_register_output(this.ptr, output.ptr); GC.KeepAlive(this); GC.KeepAlive(output); if (this != null) { this.ptrs_to.AddLast(output); }; diff --git a/c_sharp/src/org/ldk/structs/ForwardNode.cs b/c_sharp/src/org/ldk/structs/ForwardNode.cs index 6860009e..82c4edb2 100644 --- a/c_sharp/src/org/ldk/structs/ForwardNode.cs +++ b/c_sharp/src/org/ldk/structs/ForwardNode.cs @@ -33,7 +33,7 @@ public class ForwardNode : CommonBase { * used for [`BlindedPayInfo`] construction. */ public void set_tlvs(org.ldk.structs.ForwardTlvs val) { - bindings.ForwardNode_set_tlvs(this.ptr, val == null ? 0 : val.ptr); + bindings.ForwardNode_set_tlvs(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -81,7 +81,7 @@ public class ForwardNode : CommonBase { * Constructs a new ForwardNode given each field */ public static ForwardNode of(org.ldk.structs.ForwardTlvs tlvs_arg, byte[] node_id_arg, long htlc_maximum_msat_arg) { - long ret = bindings.ForwardNode_new(tlvs_arg == null ? 0 : tlvs_arg.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id_arg, 33)), htlc_maximum_msat_arg); + long ret = bindings.ForwardNode_new(tlvs_arg.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id_arg, 33)), htlc_maximum_msat_arg); GC.KeepAlive(tlvs_arg); GC.KeepAlive(node_id_arg); GC.KeepAlive(htlc_maximum_msat_arg); diff --git a/c_sharp/src/org/ldk/structs/ForwardTlvs.cs b/c_sharp/src/org/ldk/structs/ForwardTlvs.cs index fb662994..d703878b 100644 --- a/c_sharp/src/org/ldk/structs/ForwardTlvs.cs +++ b/c_sharp/src/org/ldk/structs/ForwardTlvs.cs @@ -49,7 +49,7 @@ public class ForwardTlvs : CommonBase { * Payment parameters for relaying over [`Self::short_channel_id`]. */ public void set_payment_relay(org.ldk.structs.PaymentRelay val) { - bindings.ForwardTlvs_set_payment_relay(this.ptr, val == null ? 0 : val.ptr); + bindings.ForwardTlvs_set_payment_relay(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -71,7 +71,7 @@ public class ForwardTlvs : CommonBase { * Payment constraints for relaying over [`Self::short_channel_id`]. */ public void set_payment_constraints(org.ldk.structs.PaymentConstraints val) { - bindings.ForwardTlvs_set_payment_constraints(this.ptr, val == null ? 0 : val.ptr); + bindings.ForwardTlvs_set_payment_constraints(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -99,7 +99,7 @@ public class ForwardTlvs : CommonBase { * [`BlindedHop::encrypted_payload`]: crate::blinded_path::BlindedHop::encrypted_payload */ public void set_features(org.ldk.structs.BlindedHopFeatures val) { - bindings.ForwardTlvs_set_features(this.ptr, val == null ? 0 : val.ptr); + bindings.ForwardTlvs_set_features(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -109,7 +109,7 @@ public class ForwardTlvs : CommonBase { * Constructs a new ForwardTlvs given each field */ public static ForwardTlvs of(long short_channel_id_arg, org.ldk.structs.PaymentRelay payment_relay_arg, org.ldk.structs.PaymentConstraints payment_constraints_arg, org.ldk.structs.BlindedHopFeatures features_arg) { - long ret = bindings.ForwardTlvs_new(short_channel_id_arg, payment_relay_arg == null ? 0 : payment_relay_arg.ptr, payment_constraints_arg == null ? 0 : payment_constraints_arg.ptr, features_arg == null ? 0 : features_arg.ptr); + long ret = bindings.ForwardTlvs_new(short_channel_id_arg, payment_relay_arg.ptr, payment_constraints_arg.ptr, features_arg.ptr); GC.KeepAlive(short_channel_id_arg); GC.KeepAlive(payment_relay_arg); GC.KeepAlive(payment_constraints_arg); diff --git a/c_sharp/src/org/ldk/structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.cs b/c_sharp/src/org/ldk/structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.cs new file mode 100644 index 00000000..daeb4f10 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.cs @@ -0,0 +1,110 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + + +/** + * A Tuple + */ +public class FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ : CommonBase { + internal FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ(object _dummy, long ptr) : base(ptr) { } + ~FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ() { + if (ptr != 0) { bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free(ptr); } + } + + /** + * + */ + public OutPoint get_a() { + long ret = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OutPoint ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OutPoint(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * + */ + public ChannelId get_b() { + long ret = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * + */ + public MonitorEvent[] get_c() { + long ret = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + int ret_conv_14_len = InternalUtils.getArrayLength(ret); + MonitorEvent[] ret_conv_14_arr = new MonitorEvent[ret_conv_14_len]; + for (int o = 0; o < ret_conv_14_len; o++) { + long ret_conv_14 = InternalUtils.getU64ArrayElem(ret, o); + org.ldk.structs.MonitorEvent ret_conv_14_hu_conv = org.ldk.structs.MonitorEvent.constr_from_ptr(ret_conv_14); + if (ret_conv_14_hu_conv != null) { ret_conv_14_hu_conv.ptrs_to.AddLast(this); }; + ret_conv_14_arr[o] = ret_conv_14_hu_conv; + } + bindings.free_buffer(ret); + return ret_conv_14_arr; + } + + /** + * + */ + public byte[] get_d() { + long ret = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + + internal long clone_ptr() { + long ret = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a new tuple which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ clone() { + long ret = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ ret_hu_conv = new FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ(null, ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Creates a new C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ from the contained elements. + */ + public static FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ of(org.ldk.structs.OutPoint a, org.ldk.structs.ChannelId b, MonitorEvent[] c, byte[] d) { + long ret = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new(a.ptr, b.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(c, c_conv_14 => c_conv_14.ptr)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(d, 33))); + GC.KeepAlive(a); + GC.KeepAlive(b); + GC.KeepAlive(c); + GC.KeepAlive(d); + if (ret >= 0 && ret <= 4096) { return null; } + FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ ret_hu_conv = new FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ(null, ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(a); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b); }; + foreach (MonitorEvent c_conv_14 in c) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(c_conv_14); }; }; + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/FundingCreated.cs b/c_sharp/src/org/ldk/structs/FundingCreated.cs index 55436ec1..0e15eaf8 100644 --- a/c_sharp/src/org/ldk/structs/FundingCreated.cs +++ b/c_sharp/src/org/ldk/structs/FundingCreated.cs @@ -22,21 +22,23 @@ public class FundingCreated : CommonBase { /** * A temporary channel ID, until the funding is established */ - public byte[] get_temporary_channel_id() { + public ChannelId get_temporary_channel_id() { long ret = bindings.FundingCreated_get_temporary_channel_id(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** * A temporary channel ID, until the funding is established */ - public void set_temporary_channel_id(byte[] val) { - bindings.FundingCreated_set_temporary_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + public void set_temporary_channel_id(org.ldk.structs.ChannelId val) { + bindings.FundingCreated_set_temporary_channel_id(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** @@ -100,8 +102,8 @@ public class FundingCreated : CommonBase { /** * Constructs a new FundingCreated given each field */ - public static FundingCreated of(byte[] temporary_channel_id_arg, byte[] funding_txid_arg, short funding_output_index_arg, byte[] signature_arg) { - long ret = bindings.FundingCreated_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(temporary_channel_id_arg, 32)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(funding_txid_arg, 32)), funding_output_index_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(signature_arg, 64))); + public static FundingCreated of(org.ldk.structs.ChannelId temporary_channel_id_arg, byte[] funding_txid_arg, short funding_output_index_arg, byte[] signature_arg) { + long ret = bindings.FundingCreated_new(temporary_channel_id_arg.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(funding_txid_arg, 32)), funding_output_index_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(signature_arg, 64))); GC.KeepAlive(temporary_channel_id_arg); GC.KeepAlive(funding_txid_arg); GC.KeepAlive(funding_output_index_arg); @@ -109,6 +111,7 @@ public class FundingCreated : CommonBase { if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.FundingCreated ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.FundingCreated(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(temporary_channel_id_arg); }; return ret_hu_conv; } @@ -148,7 +151,7 @@ public class FundingCreated : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.FundingCreated b) { - bool ret = bindings.FundingCreated_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.FundingCreated_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/FundingSigned.cs b/c_sharp/src/org/ldk/structs/FundingSigned.cs index 9056396a..8ca3f344 100644 --- a/c_sharp/src/org/ldk/structs/FundingSigned.cs +++ b/c_sharp/src/org/ldk/structs/FundingSigned.cs @@ -22,21 +22,23 @@ public class FundingSigned : CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { + public ChannelId get_channel_id() { long ret = bindings.FundingSigned_get_channel_id(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.FundingSigned_set_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.FundingSigned_set_channel_id(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** @@ -62,13 +64,14 @@ public class FundingSigned : CommonBase { /** * Constructs a new FundingSigned given each field */ - public static FundingSigned of(byte[] channel_id_arg, byte[] signature_arg) { - long ret = bindings.FundingSigned_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id_arg, 32)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(signature_arg, 64))); + public static FundingSigned of(org.ldk.structs.ChannelId channel_id_arg, byte[] signature_arg) { + long ret = bindings.FundingSigned_new(channel_id_arg.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(signature_arg, 64))); GC.KeepAlive(channel_id_arg); GC.KeepAlive(signature_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.FundingSigned ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.FundingSigned(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id_arg); }; return ret_hu_conv; } @@ -108,7 +111,7 @@ public class FundingSigned : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.FundingSigned b) { - bool ret = bindings.FundingSigned_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.FundingSigned_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/Future.cs b/c_sharp/src/org/ldk/structs/Future.cs index b48dbf6f..2a858199 100644 --- a/c_sharp/src/org/ldk/structs/Future.cs +++ b/c_sharp/src/org/ldk/structs/Future.cs @@ -8,8 +8,6 @@ namespace org { namespace ldk { namespace structs { /** * A simple future which can complete once, and calls some callback(s) when it does so. - * - * Clones can be made and all futures cloned from the same source will complete at the same time. */ public class Future : CommonBase { internal Future(object _dummy, long ptr) : base(ptr) { } @@ -17,24 +15,6 @@ public class Future : CommonBase { if (ptr != 0) { bindings.Future_free(ptr); } } - internal long clone_ptr() { - long ret = bindings.Future_clone_ptr(this.ptr); - GC.KeepAlive(this); - return ret; - } - - /** - * Creates a copy of the Future - */ - public Future clone() { - long ret = bindings.Future_clone(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Future ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Future(null, ret); } - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; - return ret_hu_conv; - } - /** * Registers a callback to be called upon completion of this future. If the future has already * completed, the callback will be called immediately. @@ -52,7 +32,6 @@ public class Future : CommonBase { public void wait() { bindings.Future_wait(this.ptr); GC.KeepAlive(this); - if (this != null) { this.ptrs_to.AddLast(this); }; } /** @@ -64,7 +43,6 @@ public class Future : CommonBase { bool ret = bindings.Future_wait_timeout(this.ptr, max_wait); GC.KeepAlive(this); GC.KeepAlive(max_wait); - if (this != null) { this.ptrs_to.AddLast(this); }; return ret; } diff --git a/c_sharp/src/org/ldk/structs/GossipSync.cs b/c_sharp/src/org/ldk/structs/GossipSync.cs index 65d547d8..c26c54f9 100644 --- a/c_sharp/src/org/ldk/structs/GossipSync.cs +++ b/c_sharp/src/org/ldk/structs/GossipSync.cs @@ -54,7 +54,7 @@ public class GossipSync : CommonBase { * Utility method to constructs a new P2P-variant GossipSync */ public static GossipSync p2_p(org.ldk.structs.P2PGossipSync a) { - long ret = bindings.GossipSync_p2_p(a == null ? 0 : a.ptr); + long ret = bindings.GossipSync_p2_p(a.ptr); GC.KeepAlive(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.GossipSync ret_hu_conv = org.ldk.structs.GossipSync.constr_from_ptr(ret); @@ -67,7 +67,7 @@ public class GossipSync : CommonBase { * Utility method to constructs a new Rapid-variant GossipSync */ public static GossipSync rapid(org.ldk.structs.RapidGossipSync a) { - long ret = bindings.GossipSync_rapid(a == null ? 0 : a.ptr); + long ret = bindings.GossipSync_rapid(a.ptr); GC.KeepAlive(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.GossipSync ret_hu_conv = org.ldk.structs.GossipSync.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/GossipTimestampFilter.cs b/c_sharp/src/org/ldk/structs/GossipTimestampFilter.cs index 8eac4266..5c512cd3 100644 --- a/c_sharp/src/org/ldk/structs/GossipTimestampFilter.cs +++ b/c_sharp/src/org/ldk/structs/GossipTimestampFilter.cs @@ -125,7 +125,7 @@ public class GossipTimestampFilter : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.GossipTimestampFilter b) { - bool ret = bindings.GossipTimestampFilter_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.GossipTimestampFilter_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/GraphSyncError.cs b/c_sharp/src/org/ldk/structs/GraphSyncError.cs index 1078fe24..2aadea96 100644 --- a/c_sharp/src/org/ldk/structs/GraphSyncError.cs +++ b/c_sharp/src/org/ldk/structs/GraphSyncError.cs @@ -79,7 +79,7 @@ public class GraphSyncError : CommonBase { * Utility method to constructs a new LightningError-variant GraphSyncError */ public static GraphSyncError lightning_error(org.ldk.structs.LightningError a) { - long ret = bindings.GraphSyncError_lightning_error(a == null ? 0 : a.ptr); + long ret = bindings.GraphSyncError_lightning_error(a.ptr); GC.KeepAlive(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.GraphSyncError ret_hu_conv = org.ldk.structs.GraphSyncError.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/HTLCDescriptor.cs b/c_sharp/src/org/ldk/structs/HTLCDescriptor.cs index 9abae7ca..0197978e 100644 --- a/c_sharp/src/org/ldk/structs/HTLCDescriptor.cs +++ b/c_sharp/src/org/ldk/structs/HTLCDescriptor.cs @@ -31,12 +31,32 @@ public class HTLCDescriptor : CommonBase { * The parameters required to derive the signer for the HTLC input. */ public void set_channel_derivation_parameters(org.ldk.structs.ChannelDerivationParameters val) { - bindings.HTLCDescriptor_set_channel_derivation_parameters(this.ptr, val == null ? 0 : val.ptr); + bindings.HTLCDescriptor_set_channel_derivation_parameters(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; } + /** + * The txid of the commitment transaction in which the HTLC output lives. + */ + public byte[] get_commitment_txid() { + long ret = bindings.HTLCDescriptor_get_commitment_txid(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + + /** + * The txid of the commitment transaction in which the HTLC output lives. + */ + public void set_commitment_txid(byte[] val) { + bindings.HTLCDescriptor_set_commitment_txid(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + /** * The number of the commitment transaction in which the HTLC output lives. */ @@ -121,7 +141,7 @@ public class HTLCDescriptor : CommonBase { * The details of the HTLC as it appears in the commitment transaction. */ public void set_htlc(org.ldk.structs.HTLCOutputInCommitment val) { - bindings.HTLCDescriptor_set_htlc(this.ptr, val == null ? 0 : val.ptr); + bindings.HTLCDescriptor_set_htlc(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -171,6 +191,28 @@ public class HTLCDescriptor : CommonBase { GC.KeepAlive(val); } + /** + * Constructs a new HTLCDescriptor given each field + */ + public static HTLCDescriptor of(org.ldk.structs.ChannelDerivationParameters channel_derivation_parameters_arg, byte[] commitment_txid_arg, long per_commitment_number_arg, byte[] per_commitment_point_arg, int feerate_per_kw_arg, org.ldk.structs.HTLCOutputInCommitment htlc_arg, org.ldk.structs.Option_ThirtyTwoBytesZ preimage_arg, byte[] counterparty_sig_arg) { + long ret = bindings.HTLCDescriptor_new(channel_derivation_parameters_arg.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(commitment_txid_arg, 32)), per_commitment_number_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(per_commitment_point_arg, 33)), feerate_per_kw_arg, htlc_arg.ptr, preimage_arg.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_sig_arg, 64))); + GC.KeepAlive(channel_derivation_parameters_arg); + GC.KeepAlive(commitment_txid_arg); + GC.KeepAlive(per_commitment_number_arg); + GC.KeepAlive(per_commitment_point_arg); + GC.KeepAlive(feerate_per_kw_arg); + GC.KeepAlive(htlc_arg); + GC.KeepAlive(preimage_arg); + GC.KeepAlive(counterparty_sig_arg); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.HTLCDescriptor ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.HTLCDescriptor(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_derivation_parameters_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(htlc_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(preimage_arg); }; + return ret_hu_conv; + } + internal long clone_ptr() { long ret = bindings.HTLCDescriptor_clone_ptr(this.ptr); GC.KeepAlive(this); @@ -195,7 +237,7 @@ public class HTLCDescriptor : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.HTLCDescriptor b) { - bool ret = bindings.HTLCDescriptor_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.HTLCDescriptor_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/HTLCDestination.cs b/c_sharp/src/org/ldk/structs/HTLCDestination.cs index c8ebe79d..256ad5c3 100644 --- a/c_sharp/src/org/ldk/structs/HTLCDestination.cs +++ b/c_sharp/src/org/ldk/structs/HTLCDestination.cs @@ -20,7 +20,8 @@ public class HTLCDestination : CommonBase { case 0: return new HTLCDestination_NextHopChannel(ptr); case 1: return new HTLCDestination_UnknownNextHop(ptr); case 2: return new HTLCDestination_InvalidForward(ptr); - case 3: return new HTLCDestination_FailedPayment(ptr); + case 3: return new HTLCDestination_InvalidOnion(ptr); + case 4: return new HTLCDestination_FailedPayment(ptr); default: throw new ArgumentException("Impossible enum variant"); } @@ -39,14 +40,15 @@ public class HTLCDestination : CommonBase { /** * The outgoing `channel_id` between us and the next node. */ - public byte[] channel_id; + public ChannelId channel_id; internal HTLCDestination_NextHopChannel(long ptr) : base(null, ptr) { long node_id = bindings.LDKHTLCDestination_NextHopChannel_get_node_id(ptr); byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); this.node_id = node_id_conv; long channel_id = bindings.LDKHTLCDestination_NextHopChannel_get_channel_id(ptr); - byte[] channel_id_conv = InternalUtils.decodeUint8Array(channel_id); - this.channel_id = channel_id_conv; + org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); } + if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.AddLast(this); }; + this.channel_id = channel_id_hu_conv; } } /** A HTLCDestination of type UnknownNextHop */ @@ -69,6 +71,11 @@ public class HTLCDestination : CommonBase { this.requested_forward_scid = bindings.LDKHTLCDestination_InvalidForward_get_requested_forward_scid(ptr); } } + /** A HTLCDestination of type InvalidOnion */ + public class HTLCDestination_InvalidOnion : HTLCDestination { + internal HTLCDestination_InvalidOnion(long ptr) : base(null, ptr) { + } + } /** A HTLCDestination of type FailedPayment */ public class HTLCDestination_FailedPayment : HTLCDestination { /** @@ -102,13 +109,14 @@ public class HTLCDestination : CommonBase { /** * Utility method to constructs a new NextHopChannel-variant HTLCDestination */ - public static HTLCDestination next_hop_channel(byte[] node_id, byte[] channel_id) { - long ret = bindings.HTLCDestination_next_hop_channel(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id, 32))); + public static HTLCDestination next_hop_channel(byte[] node_id, org.ldk.structs.ChannelId channel_id) { + long ret = bindings.HTLCDestination_next_hop_channel(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), channel_id.ptr); GC.KeepAlive(node_id); GC.KeepAlive(channel_id); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.HTLCDestination ret_hu_conv = org.ldk.structs.HTLCDestination.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id); }; return ret_hu_conv; } @@ -136,6 +144,17 @@ public class HTLCDestination : CommonBase { return ret_hu_conv; } + /** + * Utility method to constructs a new InvalidOnion-variant HTLCDestination + */ + public static HTLCDestination invalid_onion() { + long ret = bindings.HTLCDestination_invalid_onion(); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.HTLCDestination ret_hu_conv = org.ldk.structs.HTLCDestination.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + /** * Utility method to constructs a new FailedPayment-variant HTLCDestination */ @@ -153,7 +172,7 @@ public class HTLCDestination : CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public bool eq(org.ldk.structs.HTLCDestination b) { - bool ret = bindings.HTLCDestination_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.HTLCDestination_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); return ret; diff --git a/c_sharp/src/org/ldk/structs/HTLCOutputInCommitment.cs b/c_sharp/src/org/ldk/structs/HTLCOutputInCommitment.cs index 4e64beee..e2866c4e 100644 --- a/c_sharp/src/org/ldk/structs/HTLCOutputInCommitment.cs +++ b/c_sharp/src/org/ldk/structs/HTLCOutputInCommitment.cs @@ -164,7 +164,7 @@ public class HTLCOutputInCommitment : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.HTLCOutputInCommitment b) { - bool ret = bindings.HTLCOutputInCommitment_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.HTLCOutputInCommitment_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/HTLCUpdate.cs b/c_sharp/src/org/ldk/structs/HTLCUpdate.cs index 74bb98ce..eaea62bf 100644 --- a/c_sharp/src/org/ldk/structs/HTLCUpdate.cs +++ b/c_sharp/src/org/ldk/structs/HTLCUpdate.cs @@ -41,7 +41,7 @@ public class HTLCUpdate : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.HTLCUpdate b) { - bool ret = bindings.HTLCUpdate_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.HTLCUpdate_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/HolderCommitmentTransaction.cs b/c_sharp/src/org/ldk/structs/HolderCommitmentTransaction.cs index c8da499c..d7fdec8f 100644 --- a/c_sharp/src/org/ldk/structs/HolderCommitmentTransaction.cs +++ b/c_sharp/src/org/ldk/structs/HolderCommitmentTransaction.cs @@ -111,7 +111,7 @@ public class HolderCommitmentTransaction : CommonBase { * The funding keys are used to figure out which signature should go first when building the transaction for broadcast. */ public static HolderCommitmentTransaction of(org.ldk.structs.CommitmentTransaction commitment_tx, byte[] counterparty_sig, byte[][] counterparty_htlc_sigs, byte[] holder_funding_key, byte[] counterparty_funding_key) { - long ret = bindings.HolderCommitmentTransaction_new(commitment_tx == null ? 0 : commitment_tx.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_sig, 64)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(counterparty_htlc_sigs, counterparty_htlc_sigs_conv_8 => InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_htlc_sigs_conv_8, 64)))), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(holder_funding_key, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_funding_key, 33))); + long ret = bindings.HolderCommitmentTransaction_new(commitment_tx.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_sig, 64)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(counterparty_htlc_sigs, counterparty_htlc_sigs_conv_8 => InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_htlc_sigs_conv_8, 64)))), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(holder_funding_key, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_funding_key, 33))); GC.KeepAlive(commitment_tx); GC.KeepAlive(counterparty_sig); GC.KeepAlive(counterparty_htlc_sigs); diff --git a/c_sharp/src/org/ldk/structs/Hostname.cs b/c_sharp/src/org/ldk/structs/Hostname.cs index 0d5840ed..b5f0ec54 100644 --- a/c_sharp/src/org/ldk/structs/Hostname.cs +++ b/c_sharp/src/org/ldk/structs/Hostname.cs @@ -57,7 +57,7 @@ public class Hostname : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.Hostname b) { - bool ret = bindings.Hostname_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.Hostname_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/HtlcBasepoint.cs b/c_sharp/src/org/ldk/structs/HtlcBasepoint.cs index 5738f99a..67690bf6 100644 --- a/c_sharp/src/org/ldk/structs/HtlcBasepoint.cs +++ b/c_sharp/src/org/ldk/structs/HtlcBasepoint.cs @@ -51,7 +51,7 @@ public class HtlcBasepoint : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.HtlcBasepoint b) { - bool ret = bindings.HtlcBasepoint_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.HtlcBasepoint_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; @@ -103,6 +103,18 @@ public class HtlcBasepoint : CommonBase { return ret_conv; } + /** + * Derives the \"tweak\" used in calculate [`HtlcKey::from_basepoint`].\n\n[`HtlcKey::from_basepoint`] calculates a private key as:\n`privkey = basepoint_secret + SHA256(per_commitment_point || basepoint)`\n\nThis calculates the hash part in the tweak derivation process, which is used to\nensure that each key is unique and cannot be guessed by an external party. + */ + public byte[] derive_add_tweak(byte[] per_commitment_point) { + long ret = bindings.HtlcBasepoint_derive_add_tweak(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(per_commitment_point, 33))); + GC.KeepAlive(this); + GC.KeepAlive(per_commitment_point); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + /** * Serialize the HtlcBasepoint object into a byte array which can be read by HtlcBasepoint_read */ diff --git a/c_sharp/src/org/ldk/structs/HtlcKey.cs b/c_sharp/src/org/ldk/structs/HtlcKey.cs index c91c83a8..5e1d4545 100644 --- a/c_sharp/src/org/ldk/structs/HtlcKey.cs +++ b/c_sharp/src/org/ldk/structs/HtlcKey.cs @@ -55,7 +55,7 @@ public class HtlcKey : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.HtlcKey b) { - bool ret = bindings.HtlcKey_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.HtlcKey_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; @@ -88,7 +88,7 @@ public class HtlcKey : CommonBase { * Derive a public htlcpubkey using one node\'s `per_commitment_point` and its countersignatory\'s `basepoint` */ public static HtlcKey from_basepoint(org.ldk.structs.HtlcBasepoint countersignatory_basepoint, byte[] per_commitment_point) { - long ret = bindings.HtlcKey_from_basepoint(countersignatory_basepoint == null ? 0 : countersignatory_basepoint.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(per_commitment_point, 33))); + long ret = bindings.HtlcKey_from_basepoint(countersignatory_basepoint.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(per_commitment_point, 33))); GC.KeepAlive(countersignatory_basepoint); GC.KeepAlive(per_commitment_point); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/c_sharp/src/org/ldk/structs/InFlightHtlcs.cs b/c_sharp/src/org/ldk/structs/InFlightHtlcs.cs index 6a805b28..ec17174e 100644 --- a/c_sharp/src/org/ldk/structs/InFlightHtlcs.cs +++ b/c_sharp/src/org/ldk/structs/InFlightHtlcs.cs @@ -49,7 +49,7 @@ public class InFlightHtlcs : CommonBase { * Takes in a path with payer's node id and adds the path's details to `InFlightHtlcs`. */ public void process_path(org.ldk.structs.Path path, byte[] payer_node_id) { - bindings.InFlightHtlcs_process_path(this.ptr, path == null ? 0 : path.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payer_node_id, 33))); + bindings.InFlightHtlcs_process_path(this.ptr, path.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payer_node_id, 33))); GC.KeepAlive(this); GC.KeepAlive(path); GC.KeepAlive(payer_node_id); @@ -61,7 +61,7 @@ public class InFlightHtlcs : CommonBase { * id. */ public void add_inflight_htlc(org.ldk.structs.NodeId source, org.ldk.structs.NodeId target, long channel_scid, long used_msat) { - bindings.InFlightHtlcs_add_inflight_htlc(this.ptr, source == null ? 0 : source.ptr, target == null ? 0 : target.ptr, channel_scid, used_msat); + bindings.InFlightHtlcs_add_inflight_htlc(this.ptr, source.ptr, target.ptr, channel_scid, used_msat); GC.KeepAlive(this); GC.KeepAlive(source); GC.KeepAlive(target); @@ -76,7 +76,7 @@ public class InFlightHtlcs : CommonBase { * id. */ public Option_u64Z used_liquidity_msat(org.ldk.structs.NodeId source, org.ldk.structs.NodeId target, long channel_scid) { - long ret = bindings.InFlightHtlcs_used_liquidity_msat(this.ptr, source == null ? 0 : source.ptr, target == null ? 0 : target.ptr, channel_scid); + long ret = bindings.InFlightHtlcs_used_liquidity_msat(this.ptr, source.ptr, target.ptr, channel_scid); GC.KeepAlive(this); GC.KeepAlive(source); GC.KeepAlive(target); diff --git a/c_sharp/src/org/ldk/structs/InMemorySigner.cs b/c_sharp/src/org/ldk/structs/InMemorySigner.cs index caa0905e..c6fdea4a 100644 --- a/c_sharp/src/org/ldk/structs/InMemorySigner.cs +++ b/c_sharp/src/org/ldk/structs/InMemorySigner.cs @@ -308,7 +308,7 @@ public class InMemorySigner : CommonBase { * [`descriptor.outpoint`]: StaticPaymentOutputDescriptor::outpoint */ public Result_WitnessNoneZ sign_counterparty_payment_input(byte[] spend_tx, long input_idx, org.ldk.structs.StaticPaymentOutputDescriptor descriptor) { - long ret = bindings.InMemorySigner_sign_counterparty_payment_input(this.ptr, InternalUtils.encodeUint8Array(spend_tx), input_idx, descriptor == null ? 0 : descriptor.ptr); + long ret = bindings.InMemorySigner_sign_counterparty_payment_input(this.ptr, InternalUtils.encodeUint8Array(spend_tx), input_idx, descriptor.ptr); GC.KeepAlive(this); GC.KeepAlive(spend_tx); GC.KeepAlive(input_idx); @@ -332,7 +332,7 @@ public class InMemorySigner : CommonBase { * [`descriptor.to_self_delay`]: DelayedPaymentOutputDescriptor::to_self_delay */ public Result_WitnessNoneZ sign_dynamic_p2wsh_input(byte[] spend_tx, long input_idx, org.ldk.structs.DelayedPaymentOutputDescriptor descriptor) { - long ret = bindings.InMemorySigner_sign_dynamic_p2wsh_input(this.ptr, InternalUtils.encodeUint8Array(spend_tx), input_idx, descriptor == null ? 0 : descriptor.ptr); + long ret = bindings.InMemorySigner_sign_dynamic_p2wsh_input(this.ptr, InternalUtils.encodeUint8Array(spend_tx), input_idx, descriptor.ptr); GC.KeepAlive(this); GC.KeepAlive(spend_tx); GC.KeepAlive(input_idx); diff --git a/c_sharp/src/org/ldk/structs/InboundHTLCErr.cs b/c_sharp/src/org/ldk/structs/InboundHTLCErr.cs index ccca20d2..985eaf35 100644 --- a/c_sharp/src/org/ldk/structs/InboundHTLCErr.cs +++ b/c_sharp/src/org/ldk/structs/InboundHTLCErr.cs @@ -89,5 +89,52 @@ public class InboundHTLCErr : CommonBase { return ret_hu_conv; } + internal long clone_ptr() { + long ret = bindings.InboundHTLCErr_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a copy of the InboundHTLCErr + */ + public InboundHTLCErr clone() { + long ret = bindings.InboundHTLCErr_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.InboundHTLCErr ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InboundHTLCErr(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Generates a non-cryptographic 64-bit hash of the InboundHTLCErr. + */ + public long hash() { + long ret = bindings.InboundHTLCErr_hash(this.ptr); + GC.KeepAlive(this); + return ret; + } + + public override int GetHashCode() { + return (int)this.hash(); + } + /** + * Checks if two InboundHTLCErrs contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ + public bool eq(org.ldk.structs.InboundHTLCErr b) { + bool ret = bindings.InboundHTLCErr_eq(this.ptr, b.ptr); + GC.KeepAlive(this); + GC.KeepAlive(b); + if (this != null) { this.ptrs_to.AddLast(b); }; + return ret; + } + + public override bool Equals(object o) { + if (!(o is InboundHTLCErr)) return false; + return this.eq((InboundHTLCErr)o); + } } } } } diff --git a/c_sharp/src/org/ldk/structs/Init.cs b/c_sharp/src/org/ldk/structs/Init.cs index bc5f9ca6..d65f1b0e 100644 --- a/c_sharp/src/org/ldk/structs/Init.cs +++ b/c_sharp/src/org/ldk/structs/Init.cs @@ -33,7 +33,7 @@ public class Init : CommonBase { * The relevant features which the sender supports. */ public void set_features(org.ldk.structs.InitFeatures val) { - bindings.Init_set_features(this.ptr, val == null ? 0 : val.ptr); + bindings.Init_set_features(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -103,7 +103,7 @@ public class Init : CommonBase { * Constructs a new Init given each field */ public static Init of(org.ldk.structs.InitFeatures features_arg, org.ldk.structs.Option_CVec_ThirtyTwoBytesZZ networks_arg, org.ldk.structs.Option_SocketAddressZ remote_network_address_arg) { - long ret = bindings.Init_new(features_arg == null ? 0 : features_arg.ptr, networks_arg.ptr, remote_network_address_arg.ptr); + long ret = bindings.Init_new(features_arg.ptr, networks_arg.ptr, remote_network_address_arg.ptr); GC.KeepAlive(features_arg); GC.KeepAlive(networks_arg); GC.KeepAlive(remote_network_address_arg); @@ -152,7 +152,7 @@ public class Init : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.Init b) { - bool ret = bindings.Init_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.Init_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/InitFeatures.cs b/c_sharp/src/org/ldk/structs/InitFeatures.cs index 4f1551e3..2b5d514c 100644 --- a/c_sharp/src/org/ldk/structs/InitFeatures.cs +++ b/c_sharp/src/org/ldk/structs/InitFeatures.cs @@ -21,7 +21,7 @@ public class InitFeatures : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.InitFeatures b) { - bool ret = bindings.InitFeatures_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.InitFeatures_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; @@ -77,7 +77,7 @@ public class InitFeatures : CommonBase { * Returns true if this `Features` object contains required features unknown by `other`. */ public bool requires_unknown_bits_from(org.ldk.structs.InitFeatures other) { - bool ret = bindings.InitFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr); + bool ret = bindings.InitFeatures_requires_unknown_bits_from(this.ptr, other.ptr); GC.KeepAlive(this); GC.KeepAlive(other); if (this != null) { this.ptrs_to.AddLast(other); }; @@ -791,5 +791,39 @@ public class InitFeatures : CommonBase { return ret; } + /** + * Set this feature as optional. + */ + public void set_trampoline_routing_optional() { + bindings.InitFeatures_set_trampoline_routing_optional(this.ptr); + GC.KeepAlive(this); + } + + /** + * Set this feature as required. + */ + public void set_trampoline_routing_required() { + bindings.InitFeatures_set_trampoline_routing_required(this.ptr); + GC.KeepAlive(this); + } + + /** + * Checks if this feature is supported. + */ + public bool supports_trampoline_routing() { + bool ret = bindings.InitFeatures_supports_trampoline_routing(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Checks if this feature is required. + */ + public bool requires_trampoline_routing() { + bool ret = bindings.InitFeatures_requires_trampoline_routing(this.ptr); + GC.KeepAlive(this); + return ret; + } + } } } } diff --git a/c_sharp/src/org/ldk/structs/Input.cs b/c_sharp/src/org/ldk/structs/Input.cs index b5d1084a..f3436002 100644 --- a/c_sharp/src/org/ldk/structs/Input.cs +++ b/c_sharp/src/org/ldk/structs/Input.cs @@ -33,7 +33,7 @@ public class Input : CommonBase { * The unique identifier of the input. */ public void set_outpoint(org.ldk.structs.OutPoint val) { - bindings.Input_set_outpoint(this.ptr, val == null ? 0 : val.ptr); + bindings.Input_set_outpoint(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -85,7 +85,7 @@ public class Input : CommonBase { * Constructs a new Input given each field */ public static Input of(org.ldk.structs.OutPoint outpoint_arg, org.ldk.structs.TxOut previous_utxo_arg, long satisfaction_weight_arg) { - long ret = bindings.Input_new(outpoint_arg == null ? 0 : outpoint_arg.ptr, previous_utxo_arg.ptr, satisfaction_weight_arg); + long ret = bindings.Input_new(outpoint_arg.ptr, previous_utxo_arg.ptr, satisfaction_weight_arg); GC.KeepAlive(outpoint_arg); GC.KeepAlive(previous_utxo_arg); GC.KeepAlive(satisfaction_weight_arg); @@ -132,7 +132,7 @@ public class Input : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.Input b) { - bool ret = bindings.Input_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.Input_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/IntroductionNode.cs b/c_sharp/src/org/ldk/structs/IntroductionNode.cs new file mode 100644 index 00000000..7e1dee9d --- /dev/null +++ b/c_sharp/src/org/ldk/structs/IntroductionNode.cs @@ -0,0 +1,116 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +/** + * The unblinded node in a [`BlindedPath`]. + */ +public class IntroductionNode : CommonBase { + protected IntroductionNode(object _dummy, long ptr) : base(ptr) { } + ~IntroductionNode() { + if (ptr != 0) { bindings.IntroductionNode_free(ptr); } + } + + internal static IntroductionNode constr_from_ptr(long ptr) { + long raw_ty = bindings.LDKIntroductionNode_ty_from_ptr(ptr); + switch (raw_ty) { + case 0: return new IntroductionNode_NodeId(ptr); + case 1: return new IntroductionNode_DirectedShortChannelId(ptr); + default: + throw new ArgumentException("Impossible enum variant"); + } + } + + /** A IntroductionNode of type NodeId */ + public class IntroductionNode_NodeId : IntroductionNode { + public byte[] node_id; + internal IntroductionNode_NodeId(long ptr) : base(null, ptr) { + long node_id = bindings.LDKIntroductionNode_NodeId_get_node_id(ptr); + byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); + this.node_id = node_id_conv; + } + } + /** A IntroductionNode of type DirectedShortChannelId */ + public class IntroductionNode_DirectedShortChannelId : IntroductionNode { + public Direction _0; + public long _1; + internal IntroductionNode_DirectedShortChannelId(long ptr) : base(null, ptr) { + this._0 = bindings.LDKIntroductionNode_DirectedShortChannelId_get__0(ptr); + this._1 = bindings.LDKIntroductionNode_DirectedShortChannelId_get__1(ptr); + } + } + internal long clone_ptr() { + long ret = bindings.IntroductionNode_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a copy of the IntroductionNode + */ + public IntroductionNode clone() { + long ret = bindings.IntroductionNode_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.IntroductionNode ret_hu_conv = org.ldk.structs.IntroductionNode.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new NodeId-variant IntroductionNode + */ + public static IntroductionNode node_id(byte[] a) { + long ret = bindings.IntroductionNode_node_id(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(a, 33))); + GC.KeepAlive(a); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.IntroductionNode ret_hu_conv = org.ldk.structs.IntroductionNode.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new DirectedShortChannelId-variant IntroductionNode + */ + public static IntroductionNode directed_short_channel_id(Direction a, long b) { + long ret = bindings.IntroductionNode_directed_short_channel_id(a, b); + GC.KeepAlive(a); + GC.KeepAlive(b); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.IntroductionNode ret_hu_conv = org.ldk.structs.IntroductionNode.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Generates a non-cryptographic 64-bit hash of the IntroductionNode. + */ + public long hash() { + long ret = bindings.IntroductionNode_hash(this.ptr); + GC.KeepAlive(this); + return ret; + } + + public override int GetHashCode() { + return (int)this.hash(); + } + /** + * Checks if two IntroductionNodes contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + */ + public bool eq(org.ldk.structs.IntroductionNode b) { + bool ret = bindings.IntroductionNode_eq(this.ptr, b.ptr); + GC.KeepAlive(this); + GC.KeepAlive(b); + return ret; + } + + public override bool Equals(object o) { + if (!(o is IntroductionNode)) return false; + return this.eq((IntroductionNode)o); + } +} +} } } diff --git a/c_sharp/src/org/ldk/structs/InvoiceError.cs b/c_sharp/src/org/ldk/structs/InvoiceError.cs index d797add8..a251e7a7 100644 --- a/c_sharp/src/org/ldk/structs/InvoiceError.cs +++ b/c_sharp/src/org/ldk/structs/InvoiceError.cs @@ -66,7 +66,7 @@ public class InvoiceError : CommonBase { * An explanation of the error. */ public void set_message(org.ldk.structs.UntrustedString val) { - bindings.InvoiceError_set_message(this.ptr, val == null ? 0 : val.ptr); + bindings.InvoiceError_set_message(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -78,7 +78,7 @@ public class InvoiceError : CommonBase { * Note that erroneous_field_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ public static InvoiceError of(org.ldk.structs.ErroneousField erroneous_field_arg, org.ldk.structs.UntrustedString message_arg) { - long ret = bindings.InvoiceError_new(erroneous_field_arg == null ? 0 : erroneous_field_arg.ptr, message_arg == null ? 0 : message_arg.ptr); + long ret = bindings.InvoiceError_new(erroneous_field_arg == null ? 0 : erroneous_field_arg.ptr, message_arg.ptr); GC.KeepAlive(erroneous_field_arg); GC.KeepAlive(message_arg); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/c_sharp/src/org/ldk/structs/InvoiceRequest.cs b/c_sharp/src/org/ldk/structs/InvoiceRequest.cs index edbbb5a6..f84df903 100644 --- a/c_sharp/src/org/ldk/structs/InvoiceRequest.cs +++ b/c_sharp/src/org/ldk/structs/InvoiceRequest.cs @@ -74,14 +74,12 @@ public class InvoiceRequest : CommonBase { /** * The minimum amount required for a successful payment of a single item. - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public Amount amount() { + public Option_AmountZ amount() { long ret = bindings.InvoiceRequest_amount(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Amount ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Amount(null, ret); } + org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; return ret_hu_conv; } @@ -89,6 +87,8 @@ public class InvoiceRequest : CommonBase { /** * A complete description of the purpose of the payment. Intended to be displayed to the user * but with the caveat that it has not been verified in any way. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ public PrintableString description() { long ret = bindings.InvoiceRequest_description(this.ptr); @@ -167,13 +167,15 @@ public class InvoiceRequest : CommonBase { long ret = bindings.InvoiceRequest_supported_quantity(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Quantity ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Quantity(null, ret); } + org.ldk.structs.Quantity ret_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; return ret_hu_conv; } /** * The public key used by the recipient to sign invoices. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ public byte[] signing_pubkey() { long ret = bindings.InvoiceRequest_signing_pubkey(this.ptr); @@ -274,16 +276,58 @@ public class InvoiceRequest : CommonBase { } /** - * Signature of the invoice request using [`payer_id`]. + * Creates an [`InvoiceBuilder`] for the request with the given required fields and using the + * [`Duration`] since [`std::time::SystemTime::UNIX_EPOCH`] as the creation time. * - * [`payer_id`]: Self::payer_id + * See [`InvoiceRequest::respond_with_no_std`] for further details where the aforementioned + * creation time is used for the `created_at` parameter. + * + * [`Duration`]: core::time::Duration */ - public byte[] signature() { - long ret = bindings.InvoiceRequest_signature(this.ptr); + public Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ respond_with(TwoTuple_BlindedPayInfoBlindedPathZ[] payment_paths, byte[] payment_hash) { + long ret = bindings.InvoiceRequest_respond_with(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(payment_paths, payment_paths_conv_37 => payment_paths_conv_37.ptr)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_hash, 32))); GC.KeepAlive(this); + GC.KeepAlive(payment_paths); + GC.KeepAlive(payment_hash); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Creates an [`InvoiceBuilder`] for the request with the given required fields. + * + * Unless [`InvoiceBuilder::relative_expiry`] is set, the invoice will expire two hours after + * `created_at`, which is used to set [`Bolt12Invoice::created_at`]. Useful for `no-std` builds + * where [`std::time::SystemTime`] is not available. + * + * The caller is expected to remember the preimage of `payment_hash` in order to claim a payment + * for the invoice. + * + * The `payment_paths` parameter is useful for maintaining the payment recipient's privacy. It + * must contain one or more elements ordered from most-preferred to least-preferred, if there's + * a preference. Note, however, that any privacy is lost if a public node id was used for + * [`Offer::signing_pubkey`]. + * + * Errors if the request contains unknown required features. + * + * # Note + * + * If the originating [`Offer`] was created using [`OfferBuilder::deriving_signing_pubkey`], + * then use [`InvoiceRequest::verify`] and [`VerifiedInvoiceRequest`] methods instead. + * + * [`Bolt12Invoice::created_at`]: crate::offers::invoice::Bolt12Invoice::created_at + * [`OfferBuilder::deriving_signing_pubkey`]: crate::offers::offer::OfferBuilder::deriving_signing_pubkey + */ + public Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ respond_with_no_std(TwoTuple_BlindedPayInfoBlindedPathZ[] payment_paths, byte[] payment_hash, long created_at) { + long ret = bindings.InvoiceRequest_respond_with_no_std(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(payment_paths, payment_paths_conv_37 => payment_paths_conv_37.ptr)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_hash, 32)), created_at); + GC.KeepAlive(this); + GC.KeepAlive(payment_paths); + GC.KeepAlive(payment_hash); + GC.KeepAlive(created_at); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; } /** @@ -294,7 +338,7 @@ public class InvoiceRequest : CommonBase { * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice */ public Result_VerifiedInvoiceRequestNoneZ verify(org.ldk.structs.ExpandedKey key) { - long ret = bindings.InvoiceRequest_verify(this.ptr, key == null ? 0 : key.ptr); + long ret = bindings.InvoiceRequest_verify(this.ptr, key.ptr); GC.KeepAlive(this); GC.KeepAlive(key); if (ret >= 0 && ret <= 4096) { return null; } @@ -304,6 +348,19 @@ public class InvoiceRequest : CommonBase { return ret_hu_conv; } + /** + * Signature of the invoice request using [`payer_id`]. + * + * [`payer_id`]: Self::payer_id + */ + public byte[] signature() { + long ret = bindings.InvoiceRequest_signature(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + /** * Serialize the InvoiceRequest object into a byte array which can be read by InvoiceRequest_read */ diff --git a/c_sharp/src/org/ldk/structs/InvoiceRequestFeatures.cs b/c_sharp/src/org/ldk/structs/InvoiceRequestFeatures.cs index f3d15d0d..6a80ee02 100644 --- a/c_sharp/src/org/ldk/structs/InvoiceRequestFeatures.cs +++ b/c_sharp/src/org/ldk/structs/InvoiceRequestFeatures.cs @@ -21,7 +21,7 @@ public class InvoiceRequestFeatures : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.InvoiceRequestFeatures b) { - bool ret = bindings.InvoiceRequestFeatures_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.InvoiceRequestFeatures_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; @@ -77,7 +77,7 @@ public class InvoiceRequestFeatures : CommonBase { * Returns true if this `Features` object contains required features unknown by `other`. */ public bool requires_unknown_bits_from(org.ldk.structs.InvoiceRequestFeatures other) { - bool ret = bindings.InvoiceRequestFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr); + bool ret = bindings.InvoiceRequestFeatures_requires_unknown_bits_from(this.ptr, other.ptr); GC.KeepAlive(this); GC.KeepAlive(other); if (this != null) { this.ptrs_to.AddLast(other); }; diff --git a/c_sharp/src/org/ldk/structs/InvoiceRequestFields.cs b/c_sharp/src/org/ldk/structs/InvoiceRequestFields.cs new file mode 100644 index 00000000..15f21c11 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/InvoiceRequestFields.cs @@ -0,0 +1,166 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + + +/** + * Fields sent in an [`InvoiceRequest`] message to include in [`PaymentContext::Bolt12Offer`]. + * + * [`PaymentContext::Bolt12Offer`]: crate::blinded_path::payment::PaymentContext::Bolt12Offer + */ +public class InvoiceRequestFields : CommonBase { + internal InvoiceRequestFields(object _dummy, long ptr) : base(ptr) { } + ~InvoiceRequestFields() { + if (ptr != 0) { bindings.InvoiceRequestFields_free(ptr); } + } + + /** + * A possibly transient pubkey used to sign the invoice request. + */ + public byte[] get_payer_id() { + long ret = bindings.InvoiceRequestFields_get_payer_id(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + + /** + * A possibly transient pubkey used to sign the invoice request. + */ + public void set_payer_id(byte[] val) { + bindings.InvoiceRequestFields_set_payer_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * The quantity of the offer's item conforming to [`Offer::is_valid_quantity`]. + */ + public Option_u64Z get_quantity() { + long ret = bindings.InvoiceRequestFields_get_quantity(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_u64Z ret_hu_conv = org.ldk.structs.Option_u64Z.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * The quantity of the offer's item conforming to [`Offer::is_valid_quantity`]. + */ + public void set_quantity(org.ldk.structs.Option_u64Z val) { + bindings.InvoiceRequestFields_set_quantity(this.ptr, val.ptr); + GC.KeepAlive(this); + GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; + } + + /** + * A payer-provided note which will be seen by the recipient and reflected back in the invoice + * response. Truncated to [`PAYER_NOTE_LIMIT`] characters. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public UntrustedString get_payer_note_truncated() { + long ret = bindings.InvoiceRequestFields_get_payer_note_truncated(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.UntrustedString ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UntrustedString(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * A payer-provided note which will be seen by the recipient and reflected back in the invoice + * response. Truncated to [`PAYER_NOTE_LIMIT`] characters. + * + * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public void set_payer_note_truncated(org.ldk.structs.UntrustedString val) { + bindings.InvoiceRequestFields_set_payer_note_truncated(this.ptr, val == null ? 0 : val.ptr); + GC.KeepAlive(this); + GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; + } + + /** + * Constructs a new InvoiceRequestFields given each field + * + * Note that payer_note_truncated_arg (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public static InvoiceRequestFields of(byte[] payer_id_arg, org.ldk.structs.Option_u64Z quantity_arg, org.ldk.structs.UntrustedString payer_note_truncated_arg) { + long ret = bindings.InvoiceRequestFields_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payer_id_arg, 33)), quantity_arg.ptr, payer_note_truncated_arg == null ? 0 : payer_note_truncated_arg.ptr); + GC.KeepAlive(payer_id_arg); + GC.KeepAlive(quantity_arg); + GC.KeepAlive(payer_note_truncated_arg); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.InvoiceRequestFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InvoiceRequestFields(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(quantity_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(payer_note_truncated_arg); }; + return ret_hu_conv; + } + + internal long clone_ptr() { + long ret = bindings.InvoiceRequestFields_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a copy of the InvoiceRequestFields + */ + public InvoiceRequestFields clone() { + long ret = bindings.InvoiceRequestFields_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.InvoiceRequestFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InvoiceRequestFields(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Checks if two InvoiceRequestFieldss contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ + public bool eq(org.ldk.structs.InvoiceRequestFields b) { + bool ret = bindings.InvoiceRequestFields_eq(this.ptr, b.ptr); + GC.KeepAlive(this); + GC.KeepAlive(b); + if (this != null) { this.ptrs_to.AddLast(b); }; + return ret; + } + + public override bool Equals(object o) { + if (!(o is InvoiceRequestFields)) return false; + return this.eq((InvoiceRequestFields)o); + } + /** + * Serialize the InvoiceRequestFields object into a byte array which can be read by InvoiceRequestFields_read + */ + public byte[] write() { + long ret = bindings.InvoiceRequestFields_write(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Read a InvoiceRequestFields from a byte array, created by InvoiceRequestFields_write + */ + public static Result_InvoiceRequestFieldsDecodeErrorZ read(byte[] ser) { + long ret = bindings.InvoiceRequestFields_read(InternalUtils.encodeUint8Array(ser)); + GC.KeepAlive(ser); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceRequestFieldsDecodeErrorZ ret_hu_conv = Result_InvoiceRequestFieldsDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/InvoiceRequestWithDerivedPayerIdBuilder.cs b/c_sharp/src/org/ldk/structs/InvoiceRequestWithDerivedPayerIdBuilder.cs new file mode 100644 index 00000000..d23373a5 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/InvoiceRequestWithDerivedPayerIdBuilder.cs @@ -0,0 +1,138 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + + +/** + * Builds an [`InvoiceRequest`] from an [`Offer`] for the \"offer to be paid\" flow. + * + * See [module-level documentation] for usage. + * + * [module-level documentation]: self + */ +public class InvoiceRequestWithDerivedPayerIdBuilder : CommonBase { + internal InvoiceRequestWithDerivedPayerIdBuilder(object _dummy, long ptr) : base(ptr) { } + ~InvoiceRequestWithDerivedPayerIdBuilder() { + if (ptr != 0) { bindings.InvoiceRequestWithDerivedPayerIdBuilder_free(ptr); } + } + + /** + * Builds a signed [`InvoiceRequest`] after checking for valid semantics. + */ + public Result_InvoiceRequestBolt12SemanticErrorZ build_and_sign() { + long ret = bindings.InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceRequestBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.AddLast(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + return ret_hu_conv; + } + + /** + * Sets the [`InvoiceRequest::chain`] of the given [`Network`] for paying an invoice. If not + * called, [`Network::Bitcoin`] is assumed. Errors if the chain for `network` is not supported + * by the offer. + * + * Successive calls to this method will override the previous setting. + */ + public Result_NoneBolt12SemanticErrorZ chain(Network network) { + long ret = bindings.InvoiceRequestWithDerivedPayerIdBuilder_chain(this.ptr, network); + GC.KeepAlive(this); + GC.KeepAlive(network); + if (ret >= 0 && ret <= 4096) { return null; } + Result_NoneBolt12SemanticErrorZ ret_hu_conv = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.AddLast(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + return ret_hu_conv; + } + + /** + * Sets the [`InvoiceRequest::amount_msats`] for paying an invoice. Errors if `amount_msats` is + * not at least the expected invoice amount (i.e., [`Offer::amount`] times [`quantity`]). + * + * Successive calls to this method will override the previous setting. + * + * [`quantity`]: Self::quantity + */ + public Result_NoneBolt12SemanticErrorZ amount_msats(long amount_msats) { + long ret = bindings.InvoiceRequestWithDerivedPayerIdBuilder_amount_msats(this.ptr, amount_msats); + GC.KeepAlive(this); + GC.KeepAlive(amount_msats); + if (ret >= 0 && ret <= 4096) { return null; } + Result_NoneBolt12SemanticErrorZ ret_hu_conv = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.AddLast(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + return ret_hu_conv; + } + + /** + * Sets [`InvoiceRequest::quantity`] of items. If not set, `1` is assumed. Errors if `quantity` + * does not conform to [`Offer::is_valid_quantity`]. + * + * Successive calls to this method will override the previous setting. + */ + public Result_NoneBolt12SemanticErrorZ quantity(long quantity) { + long ret = bindings.InvoiceRequestWithDerivedPayerIdBuilder_quantity(this.ptr, quantity); + GC.KeepAlive(this); + GC.KeepAlive(quantity); + if (ret >= 0 && ret <= 4096) { return null; } + Result_NoneBolt12SemanticErrorZ ret_hu_conv = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.AddLast(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + return ret_hu_conv; + } + + /** + * Sets the [`InvoiceRequest::payer_note`]. + * + * Successive calls to this method will override the previous setting. + */ + public void payer_note(string payer_note) { + bindings.InvoiceRequestWithDerivedPayerIdBuilder_payer_note(this.ptr, InternalUtils.encodeString(payer_note)); + GC.KeepAlive(this); + GC.KeepAlive(payer_note); + if (this != null) { this.ptrs_to.AddLast(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/InvoiceRequestWithExplicitPayerIdBuilder.cs b/c_sharp/src/org/ldk/structs/InvoiceRequestWithExplicitPayerIdBuilder.cs new file mode 100644 index 00000000..6900c12c --- /dev/null +++ b/c_sharp/src/org/ldk/structs/InvoiceRequestWithExplicitPayerIdBuilder.cs @@ -0,0 +1,139 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + + +/** + * Builds an [`InvoiceRequest`] from an [`Offer`] for the \"offer to be paid\" flow. + * + * See [module-level documentation] for usage. + * + * [module-level documentation]: self + */ +public class InvoiceRequestWithExplicitPayerIdBuilder : CommonBase { + internal InvoiceRequestWithExplicitPayerIdBuilder(object _dummy, long ptr) : base(ptr) { } + ~InvoiceRequestWithExplicitPayerIdBuilder() { + if (ptr != 0) { bindings.InvoiceRequestWithExplicitPayerIdBuilder_free(ptr); } + } + + /** + * Builds an unsigned [`InvoiceRequest`] after checking for valid semantics. It can be signed + * by [`UnsignedInvoiceRequest::sign`]. + */ + public Result_UnsignedInvoiceRequestBolt12SemanticErrorZ build() { + long ret = bindings.InvoiceRequestWithExplicitPayerIdBuilder_build(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_UnsignedInvoiceRequestBolt12SemanticErrorZ ret_hu_conv = Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.AddLast(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + return ret_hu_conv; + } + + /** + * Sets the [`InvoiceRequest::chain`] of the given [`Network`] for paying an invoice. If not + * called, [`Network::Bitcoin`] is assumed. Errors if the chain for `network` is not supported + * by the offer. + * + * Successive calls to this method will override the previous setting. + */ + public Result_NoneBolt12SemanticErrorZ chain(Network network) { + long ret = bindings.InvoiceRequestWithExplicitPayerIdBuilder_chain(this.ptr, network); + GC.KeepAlive(this); + GC.KeepAlive(network); + if (ret >= 0 && ret <= 4096) { return null; } + Result_NoneBolt12SemanticErrorZ ret_hu_conv = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.AddLast(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + return ret_hu_conv; + } + + /** + * Sets the [`InvoiceRequest::amount_msats`] for paying an invoice. Errors if `amount_msats` is + * not at least the expected invoice amount (i.e., [`Offer::amount`] times [`quantity`]). + * + * Successive calls to this method will override the previous setting. + * + * [`quantity`]: Self::quantity + */ + public Result_NoneBolt12SemanticErrorZ amount_msats(long amount_msats) { + long ret = bindings.InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(this.ptr, amount_msats); + GC.KeepAlive(this); + GC.KeepAlive(amount_msats); + if (ret >= 0 && ret <= 4096) { return null; } + Result_NoneBolt12SemanticErrorZ ret_hu_conv = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.AddLast(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + return ret_hu_conv; + } + + /** + * Sets [`InvoiceRequest::quantity`] of items. If not set, `1` is assumed. Errors if `quantity` + * does not conform to [`Offer::is_valid_quantity`]. + * + * Successive calls to this method will override the previous setting. + */ + public Result_NoneBolt12SemanticErrorZ quantity(long quantity) { + long ret = bindings.InvoiceRequestWithExplicitPayerIdBuilder_quantity(this.ptr, quantity); + GC.KeepAlive(this); + GC.KeepAlive(quantity); + if (ret >= 0 && ret <= 4096) { return null; } + Result_NoneBolt12SemanticErrorZ ret_hu_conv = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.AddLast(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + return ret_hu_conv; + } + + /** + * Sets the [`InvoiceRequest::payer_note`]. + * + * Successive calls to this method will override the previous setting. + */ + public void payer_note(string payer_note) { + bindings.InvoiceRequestWithExplicitPayerIdBuilder_payer_note(this.ptr, InternalUtils.encodeString(payer_note)); + GC.KeepAlive(this); + GC.KeepAlive(payer_note); + if (this != null) { this.ptrs_to.AddLast(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/InvoiceWithDerivedSigningPubkeyBuilder.cs b/c_sharp/src/org/ldk/structs/InvoiceWithDerivedSigningPubkeyBuilder.cs new file mode 100644 index 00000000..a5c5da4c --- /dev/null +++ b/c_sharp/src/org/ldk/structs/InvoiceWithDerivedSigningPubkeyBuilder.cs @@ -0,0 +1,150 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + + +/** + * Builds a [`Bolt12Invoice`] from either: + * - an [`InvoiceRequest`] for the \"offer to be paid\" flow or + * - a [`Refund`] for the \"offer for money\" flow. + * + * See [module-level documentation] for usage. + * + * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest + * [`Refund`]: crate::offers::refund::Refund + * [module-level documentation]: self + */ +public class InvoiceWithDerivedSigningPubkeyBuilder : CommonBase { + internal InvoiceWithDerivedSigningPubkeyBuilder(object _dummy, long ptr) : base(ptr) { } + ~InvoiceWithDerivedSigningPubkeyBuilder() { + if (ptr != 0) { bindings.InvoiceWithDerivedSigningPubkeyBuilder_free(ptr); } + } + + /** + * Builds a signed [`Bolt12Invoice`] after checking for valid semantics. + */ + public Result_Bolt12InvoiceBolt12SemanticErrorZ build_and_sign() { + long ret = bindings.InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_Bolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_Bolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.AddLast(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + return ret_hu_conv; + } + + /** + * Sets the [`Bolt12Invoice::relative_expiry`] as seconds since [`Bolt12Invoice::created_at`]. + * Any expiry that has already passed is valid and can be checked for using + * [`Bolt12Invoice::is_expired`]. + * + * Successive calls to this method will override the previous setting. + */ + public void relative_expiry(int relative_expiry_secs) { + bindings.InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry(this.ptr, relative_expiry_secs); + GC.KeepAlive(this); + GC.KeepAlive(relative_expiry_secs); + if (this != null) { this.ptrs_to.AddLast(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + } + + /** + * Adds a P2WSH address to [`Bolt12Invoice::fallbacks`]. + * + * Successive calls to this method will add another address. Caller is responsible for not + * adding duplicate addresses and only calling if capable of receiving to P2WSH addresses. + */ + public void fallback_v0_p2wsh(byte[] script_hash) { + bindings.InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(script_hash, 32))); + GC.KeepAlive(this); + GC.KeepAlive(script_hash); + if (this != null) { this.ptrs_to.AddLast(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + } + + /** + * Adds a P2WPKH address to [`Bolt12Invoice::fallbacks`]. + * + * Successive calls to this method will add another address. Caller is responsible for not + * adding duplicate addresses and only calling if capable of receiving to P2WPKH addresses. + */ + public void fallback_v0_p2wpkh(byte[] pubkey_hash) { + bindings.InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(pubkey_hash, 20))); + GC.KeepAlive(this); + GC.KeepAlive(pubkey_hash); + if (this != null) { this.ptrs_to.AddLast(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + } + + /** + * Adds a P2TR address to [`Bolt12Invoice::fallbacks`]. + * + * Successive calls to this method will add another address. Caller is responsible for not + * adding duplicate addresses and only calling if capable of receiving to P2TR addresses. + */ + public void fallback_v1_p2tr_tweaked(byte[] utput_key) { + bindings.InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(utput_key, 32))); + GC.KeepAlive(this); + GC.KeepAlive(utput_key); + if (this != null) { this.ptrs_to.AddLast(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + } + + /** + * Sets [`Bolt12Invoice::invoice_features`] to indicate MPP may be used. Otherwise, MPP is + * disallowed. + */ + public void allow_mpp() { + bindings.InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp(this.ptr); + GC.KeepAlive(this); + if (this != null) { this.ptrs_to.AddLast(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/InvoiceWithExplicitSigningPubkeyBuilder.cs b/c_sharp/src/org/ldk/structs/InvoiceWithExplicitSigningPubkeyBuilder.cs new file mode 100644 index 00000000..6bfb8c74 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/InvoiceWithExplicitSigningPubkeyBuilder.cs @@ -0,0 +1,151 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + + +/** + * Builds a [`Bolt12Invoice`] from either: + * - an [`InvoiceRequest`] for the \"offer to be paid\" flow or + * - a [`Refund`] for the \"offer for money\" flow. + * + * See [module-level documentation] for usage. + * + * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest + * [`Refund`]: crate::offers::refund::Refund + * [module-level documentation]: self + */ +public class InvoiceWithExplicitSigningPubkeyBuilder : CommonBase { + internal InvoiceWithExplicitSigningPubkeyBuilder(object _dummy, long ptr) : base(ptr) { } + ~InvoiceWithExplicitSigningPubkeyBuilder() { + if (ptr != 0) { bindings.InvoiceWithExplicitSigningPubkeyBuilder_free(ptr); } + } + + /** + * Builds an unsigned [`Bolt12Invoice`] after checking for valid semantics. It can be signed by + * [`UnsignedBolt12Invoice::sign`]. + */ + public Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ build() { + long ret = bindings.InvoiceWithExplicitSigningPubkeyBuilder_build(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.AddLast(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + return ret_hu_conv; + } + + /** + * Sets the [`Bolt12Invoice::relative_expiry`] as seconds since [`Bolt12Invoice::created_at`]. + * Any expiry that has already passed is valid and can be checked for using + * [`Bolt12Invoice::is_expired`]. + * + * Successive calls to this method will override the previous setting. + */ + public void relative_expiry(int relative_expiry_secs) { + bindings.InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry(this.ptr, relative_expiry_secs); + GC.KeepAlive(this); + GC.KeepAlive(relative_expiry_secs); + if (this != null) { this.ptrs_to.AddLast(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + } + + /** + * Adds a P2WSH address to [`Bolt12Invoice::fallbacks`]. + * + * Successive calls to this method will add another address. Caller is responsible for not + * adding duplicate addresses and only calling if capable of receiving to P2WSH addresses. + */ + public void fallback_v0_p2wsh(byte[] script_hash) { + bindings.InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(script_hash, 32))); + GC.KeepAlive(this); + GC.KeepAlive(script_hash); + if (this != null) { this.ptrs_to.AddLast(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + } + + /** + * Adds a P2WPKH address to [`Bolt12Invoice::fallbacks`]. + * + * Successive calls to this method will add another address. Caller is responsible for not + * adding duplicate addresses and only calling if capable of receiving to P2WPKH addresses. + */ + public void fallback_v0_p2wpkh(byte[] pubkey_hash) { + bindings.InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(pubkey_hash, 20))); + GC.KeepAlive(this); + GC.KeepAlive(pubkey_hash); + if (this != null) { this.ptrs_to.AddLast(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + } + + /** + * Adds a P2TR address to [`Bolt12Invoice::fallbacks`]. + * + * Successive calls to this method will add another address. Caller is responsible for not + * adding duplicate addresses and only calling if capable of receiving to P2TR addresses. + */ + public void fallback_v1_p2tr_tweaked(byte[] utput_key) { + bindings.InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(utput_key, 32))); + GC.KeepAlive(this); + GC.KeepAlive(utput_key); + if (this != null) { this.ptrs_to.AddLast(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + } + + /** + * Sets [`Bolt12Invoice::invoice_features`] to indicate MPP may be used. Otherwise, MPP is + * disallowed. + */ + public void allow_mpp() { + bindings.InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp(this.ptr); + GC.KeepAlive(this); + if (this != null) { this.ptrs_to.AddLast(this); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid this being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after this call, this is reset to null and is now a dummy object. + this.ptr = 0;; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/KVStore.cs b/c_sharp/src/org/ldk/structs/KVStore.cs index 8e33e985..16adaebd 100644 --- a/c_sharp/src/org/ldk/structs/KVStore.cs +++ b/c_sharp/src/org/ldk/structs/KVStore.cs @@ -94,7 +94,7 @@ public class KVStore : CommonBase { string _key_conv = InternalUtils.decodeString(_key); Result_CVec_u8ZIOErrorZ ret = arg.read(_primary_namespace_conv, _secondary_namespace_conv, _key_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long write(long _primary_namespace, long _secondary_namespace, long _key, long _buf) { @@ -104,7 +104,7 @@ public class KVStore : CommonBase { byte[] _buf_conv = InternalUtils.decodeUint8Array(_buf); Result_NoneIOErrorZ ret = arg.write(_primary_namespace_conv, _secondary_namespace_conv, _key_conv, _buf_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long remove(long _primary_namespace, long _secondary_namespace, long _key, bool _lazy) { @@ -113,7 +113,7 @@ public class KVStore : CommonBase { string _key_conv = InternalUtils.decodeString(_key); Result_NoneIOErrorZ ret = arg.remove(_primary_namespace_conv, _secondary_namespace_conv, _key_conv, _lazy); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long list(long _primary_namespace, long _secondary_namespace) { @@ -121,7 +121,7 @@ public class KVStore : CommonBase { string _secondary_namespace_conv = InternalUtils.decodeString(_secondary_namespace); Result_CVec_StrZIOErrorZ ret = arg.list(_primary_namespace_conv, _secondary_namespace_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } } diff --git a/c_sharp/src/org/ldk/structs/KeysManager.cs b/c_sharp/src/org/ldk/structs/KeysManager.cs index 1b780285..333c1de4 100644 --- a/c_sharp/src/org/ldk/structs/KeysManager.cs +++ b/c_sharp/src/org/ldk/structs/KeysManager.cs @@ -103,40 +103,6 @@ public class KeysManager : CommonBase { return ret_hu_conv; } - /** - * Creates a [`Transaction`] which spends the given descriptors to the given outputs, plus an - * output to the given change destination (if sufficient change value remains). The - * transaction will have a feerate, at least, of the given value. - * - * The `locktime` argument is used to set the transaction's locktime. If `None`, the - * transaction will have a locktime of 0. It it recommended to set this to the current block - * height to avoid fee sniping, unless you have some specific reason to use a different - * locktime. - * - * Returns `Err(())` if the output value is greater than the input value minus required fee, - * if a descriptor was duplicated, or if an output descriptor `script_pubkey` - * does not match the one we can spend. - * - * We do not enforce that outputs meet the dust limit or that any output scripts are standard. - * - * May panic if the [`SpendableOutputDescriptor`]s were not generated by channels which used - * this [`KeysManager`] or one of the [`InMemorySigner`] created by this [`KeysManager`]. - */ - public Result_TransactionNoneZ spend_spendable_outputs(SpendableOutputDescriptor[] descriptors, TxOut[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, org.ldk.structs.Option_u32Z locktime) { - long ret = bindings.KeysManager_spend_spendable_outputs(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(descriptors, descriptors_conv_27 => descriptors_conv_27.ptr)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(outputs, outputs_conv_7 => outputs_conv_7.ptr)), InternalUtils.encodeUint8Array(change_destination_script), feerate_sat_per_1000_weight, locktime.ptr); - GC.KeepAlive(this); - GC.KeepAlive(descriptors); - GC.KeepAlive(outputs); - GC.KeepAlive(change_destination_script); - GC.KeepAlive(feerate_sat_per_1000_weight); - GC.KeepAlive(locktime); - if (ret >= 0 && ret <= 4096) { return null; } - Result_TransactionNoneZ ret_hu_conv = Result_TransactionNoneZ.constr_from_ptr(ret); - foreach (SpendableOutputDescriptor descriptors_conv_27 in descriptors) { if (this != null) { this.ptrs_to.AddLast(descriptors_conv_27); }; }; - if (this != null) { this.ptrs_to.AddLast(locktime); }; - return ret_hu_conv; - } - /** * Constructs a new EntropySource which calls the relevant methods on this_arg. * This copies the `inner` pointer in this_arg and thus the returned EntropySource must be freed before this_arg is @@ -163,6 +129,19 @@ public class KeysManager : CommonBase { return ret_hu_conv; } + /** + * Constructs a new OutputSpender which calls the relevant methods on this_arg. + * This copies the `inner` pointer in this_arg and thus the returned OutputSpender must be freed before this_arg is + */ + public OutputSpender as_OutputSpender() { + long ret = bindings.KeysManager_as_OutputSpender(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + OutputSpender ret_hu_conv = new OutputSpender(null, ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + /** * Constructs a new SignerProvider which calls the relevant methods on this_arg. * This copies the `inner` pointer in this_arg and thus the returned SignerProvider must be freed before this_arg is diff --git a/c_sharp/src/org/ldk/structs/Listen.cs b/c_sharp/src/org/ldk/structs/Listen.cs index fa31f714..21dd7b2f 100644 --- a/c_sharp/src/org/ldk/structs/Listen.cs +++ b/c_sharp/src/org/ldk/structs/Listen.cs @@ -92,7 +92,7 @@ public class Listen : CommonBase { * possibly filtered. */ public void filtered_block_connected(byte[] header, TwoTuple_usizeTransactionZ[] txdata, int height) { - bindings.Listen_filtered_block_connected(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(header, 80)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(txdata, txdata_conv_28 => txdata_conv_28 != null ? txdata_conv_28.ptr : 0)), height); + bindings.Listen_filtered_block_connected(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(header, 80)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(txdata, txdata_conv_28 => txdata_conv_28.ptr)), height); GC.KeepAlive(this); GC.KeepAlive(header); GC.KeepAlive(txdata); diff --git a/c_sharp/src/org/ldk/structs/MaxDustHTLCExposure.cs b/c_sharp/src/org/ldk/structs/MaxDustHTLCExposure.cs index 3cc67b31..8e0c88b8 100644 --- a/c_sharp/src/org/ldk/structs/MaxDustHTLCExposure.cs +++ b/c_sharp/src/org/ldk/structs/MaxDustHTLCExposure.cs @@ -6,7 +6,7 @@ using System; namespace org { namespace ldk { namespace structs { /** - * Options for how to set the max dust HTLC exposure allowed on a channel. See + * Options for how to set the max dust exposure allowed on a channel. See * [`ChannelConfig::max_dust_htlc_exposure`] for details. */ public class MaxDustHTLCExposure : CommonBase { @@ -86,7 +86,7 @@ public class MaxDustHTLCExposure : CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public bool eq(org.ldk.structs.MaxDustHTLCExposure b) { - bool ret = bindings.MaxDustHTLCExposure_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.MaxDustHTLCExposure_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); return ret; diff --git a/c_sharp/src/org/ldk/structs/MessageRouter.cs b/c_sharp/src/org/ldk/structs/MessageRouter.cs index 12f593e1..28b3b20b 100644 --- a/c_sharp/src/org/ldk/structs/MessageRouter.cs +++ b/c_sharp/src/org/ldk/structs/MessageRouter.cs @@ -50,7 +50,7 @@ public class MessageRouter : CommonBase { if (_destination_hu_conv != null) { _destination_hu_conv.ptrs_to.AddLast(this); }; Result_OnionMessagePathNoneZ ret = arg.find_path(_sender_conv, _peers_conv_8_arr, _destination_hu_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long create_blinded_paths(long _recipient, long _peers) { @@ -65,7 +65,7 @@ public class MessageRouter : CommonBase { bindings.free_buffer(_peers); Result_CVec_BlindedPathZNoneZ ret = arg.create_blinded_paths(_recipient_conv, _peers_conv_8_arr); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } } diff --git a/c_sharp/src/org/ldk/structs/MessageSendEvent.cs b/c_sharp/src/org/ldk/structs/MessageSendEvent.cs index fb60dee8..66b8c585 100644 --- a/c_sharp/src/org/ldk/structs/MessageSendEvent.cs +++ b/c_sharp/src/org/ldk/structs/MessageSendEvent.cs @@ -799,7 +799,7 @@ public class MessageSendEvent : CommonBase { * Utility method to constructs a new SendAcceptChannel-variant MessageSendEvent */ public static MessageSendEvent send_accept_channel(byte[] node_id, org.ldk.structs.AcceptChannel msg) { - long ret = bindings.MessageSendEvent_send_accept_channel(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_accept_channel(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -813,7 +813,7 @@ public class MessageSendEvent : CommonBase { * Utility method to constructs a new SendAcceptChannelV2-variant MessageSendEvent */ public static MessageSendEvent send_accept_channel_v2(byte[] node_id, org.ldk.structs.AcceptChannelV2 msg) { - long ret = bindings.MessageSendEvent_send_accept_channel_v2(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_accept_channel_v2(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -827,7 +827,7 @@ public class MessageSendEvent : CommonBase { * Utility method to constructs a new SendOpenChannel-variant MessageSendEvent */ public static MessageSendEvent send_open_channel(byte[] node_id, org.ldk.structs.OpenChannel msg) { - long ret = bindings.MessageSendEvent_send_open_channel(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_open_channel(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -841,7 +841,7 @@ public class MessageSendEvent : CommonBase { * Utility method to constructs a new SendOpenChannelV2-variant MessageSendEvent */ public static MessageSendEvent send_open_channel_v2(byte[] node_id, org.ldk.structs.OpenChannelV2 msg) { - long ret = bindings.MessageSendEvent_send_open_channel_v2(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_open_channel_v2(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -855,7 +855,7 @@ public class MessageSendEvent : CommonBase { * Utility method to constructs a new SendFundingCreated-variant MessageSendEvent */ public static MessageSendEvent send_funding_created(byte[] node_id, org.ldk.structs.FundingCreated msg) { - long ret = bindings.MessageSendEvent_send_funding_created(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_funding_created(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -869,7 +869,7 @@ public class MessageSendEvent : CommonBase { * Utility method to constructs a new SendFundingSigned-variant MessageSendEvent */ public static MessageSendEvent send_funding_signed(byte[] node_id, org.ldk.structs.FundingSigned msg) { - long ret = bindings.MessageSendEvent_send_funding_signed(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_funding_signed(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -883,7 +883,7 @@ public class MessageSendEvent : CommonBase { * Utility method to constructs a new SendStfu-variant MessageSendEvent */ public static MessageSendEvent send_stfu(byte[] node_id, org.ldk.structs.Stfu msg) { - long ret = bindings.MessageSendEvent_send_stfu(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_stfu(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -897,7 +897,7 @@ public class MessageSendEvent : CommonBase { * Utility method to constructs a new SendSplice-variant MessageSendEvent */ public static MessageSendEvent send_splice(byte[] node_id, org.ldk.structs.Splice msg) { - long ret = bindings.MessageSendEvent_send_splice(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_splice(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -911,7 +911,7 @@ public class MessageSendEvent : CommonBase { * Utility method to constructs a new SendSpliceAck-variant MessageSendEvent */ public static MessageSendEvent send_splice_ack(byte[] node_id, org.ldk.structs.SpliceAck msg) { - long ret = bindings.MessageSendEvent_send_splice_ack(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_splice_ack(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -925,7 +925,7 @@ public class MessageSendEvent : CommonBase { * Utility method to constructs a new SendSpliceLocked-variant MessageSendEvent */ public static MessageSendEvent send_splice_locked(byte[] node_id, org.ldk.structs.SpliceLocked msg) { - long ret = bindings.MessageSendEvent_send_splice_locked(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_splice_locked(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -939,7 +939,7 @@ public class MessageSendEvent : CommonBase { * Utility method to constructs a new SendTxAddInput-variant MessageSendEvent */ public static MessageSendEvent send_tx_add_input(byte[] node_id, org.ldk.structs.TxAddInput msg) { - long ret = bindings.MessageSendEvent_send_tx_add_input(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_tx_add_input(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -953,7 +953,7 @@ public class MessageSendEvent : CommonBase { * Utility method to constructs a new SendTxAddOutput-variant MessageSendEvent */ public static MessageSendEvent send_tx_add_output(byte[] node_id, org.ldk.structs.TxAddOutput msg) { - long ret = bindings.MessageSendEvent_send_tx_add_output(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_tx_add_output(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -967,7 +967,7 @@ public class MessageSendEvent : CommonBase { * Utility method to constructs a new SendTxRemoveInput-variant MessageSendEvent */ public static MessageSendEvent send_tx_remove_input(byte[] node_id, org.ldk.structs.TxRemoveInput msg) { - long ret = bindings.MessageSendEvent_send_tx_remove_input(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_tx_remove_input(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -981,7 +981,7 @@ public class MessageSendEvent : CommonBase { * Utility method to constructs a new SendTxRemoveOutput-variant MessageSendEvent */ public static MessageSendEvent send_tx_remove_output(byte[] node_id, org.ldk.structs.TxRemoveOutput msg) { - long ret = bindings.MessageSendEvent_send_tx_remove_output(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_tx_remove_output(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -995,7 +995,7 @@ public class MessageSendEvent : CommonBase { * Utility method to constructs a new SendTxComplete-variant MessageSendEvent */ public static MessageSendEvent send_tx_complete(byte[] node_id, org.ldk.structs.TxComplete msg) { - long ret = bindings.MessageSendEvent_send_tx_complete(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_tx_complete(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1009,7 +1009,7 @@ public class MessageSendEvent : CommonBase { * Utility method to constructs a new SendTxSignatures-variant MessageSendEvent */ public static MessageSendEvent send_tx_signatures(byte[] node_id, org.ldk.structs.TxSignatures msg) { - long ret = bindings.MessageSendEvent_send_tx_signatures(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_tx_signatures(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1023,7 +1023,7 @@ public class MessageSendEvent : CommonBase { * Utility method to constructs a new SendTxInitRbf-variant MessageSendEvent */ public static MessageSendEvent send_tx_init_rbf(byte[] node_id, org.ldk.structs.TxInitRbf msg) { - long ret = bindings.MessageSendEvent_send_tx_init_rbf(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_tx_init_rbf(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1037,7 +1037,7 @@ public class MessageSendEvent : CommonBase { * Utility method to constructs a new SendTxAckRbf-variant MessageSendEvent */ public static MessageSendEvent send_tx_ack_rbf(byte[] node_id, org.ldk.structs.TxAckRbf msg) { - long ret = bindings.MessageSendEvent_send_tx_ack_rbf(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_tx_ack_rbf(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1051,7 +1051,7 @@ public class MessageSendEvent : CommonBase { * Utility method to constructs a new SendTxAbort-variant MessageSendEvent */ public static MessageSendEvent send_tx_abort(byte[] node_id, org.ldk.structs.TxAbort msg) { - long ret = bindings.MessageSendEvent_send_tx_abort(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_tx_abort(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1065,7 +1065,7 @@ public class MessageSendEvent : CommonBase { * Utility method to constructs a new SendChannelReady-variant MessageSendEvent */ public static MessageSendEvent send_channel_ready(byte[] node_id, org.ldk.structs.ChannelReady msg) { - long ret = bindings.MessageSendEvent_send_channel_ready(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_channel_ready(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1079,7 +1079,7 @@ public class MessageSendEvent : CommonBase { * Utility method to constructs a new SendAnnouncementSignatures-variant MessageSendEvent */ public static MessageSendEvent send_announcement_signatures(byte[] node_id, org.ldk.structs.AnnouncementSignatures msg) { - long ret = bindings.MessageSendEvent_send_announcement_signatures(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_announcement_signatures(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1093,7 +1093,7 @@ public class MessageSendEvent : CommonBase { * Utility method to constructs a new UpdateHTLCs-variant MessageSendEvent */ public static MessageSendEvent update_htlcs(byte[] node_id, org.ldk.structs.CommitmentUpdate updates) { - long ret = bindings.MessageSendEvent_update_htlcs(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), updates == null ? 0 : updates.ptr); + long ret = bindings.MessageSendEvent_update_htlcs(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), updates.ptr); GC.KeepAlive(node_id); GC.KeepAlive(updates); if (ret >= 0 && ret <= 4096) { return null; } @@ -1107,7 +1107,7 @@ public class MessageSendEvent : CommonBase { * Utility method to constructs a new SendRevokeAndACK-variant MessageSendEvent */ public static MessageSendEvent send_revoke_and_ack(byte[] node_id, org.ldk.structs.RevokeAndACK msg) { - long ret = bindings.MessageSendEvent_send_revoke_and_ack(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_revoke_and_ack(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1121,7 +1121,7 @@ public class MessageSendEvent : CommonBase { * Utility method to constructs a new SendClosingSigned-variant MessageSendEvent */ public static MessageSendEvent send_closing_signed(byte[] node_id, org.ldk.structs.ClosingSigned msg) { - long ret = bindings.MessageSendEvent_send_closing_signed(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_closing_signed(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1135,7 +1135,7 @@ public class MessageSendEvent : CommonBase { * Utility method to constructs a new SendShutdown-variant MessageSendEvent */ public static MessageSendEvent send_shutdown(byte[] node_id, org.ldk.structs.Shutdown msg) { - long ret = bindings.MessageSendEvent_send_shutdown(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_shutdown(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1149,7 +1149,7 @@ public class MessageSendEvent : CommonBase { * Utility method to constructs a new SendChannelReestablish-variant MessageSendEvent */ public static MessageSendEvent send_channel_reestablish(byte[] node_id, org.ldk.structs.ChannelReestablish msg) { - long ret = bindings.MessageSendEvent_send_channel_reestablish(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_channel_reestablish(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1163,7 +1163,7 @@ public class MessageSendEvent : CommonBase { * Utility method to constructs a new SendChannelAnnouncement-variant MessageSendEvent */ public static MessageSendEvent send_channel_announcement(byte[] node_id, org.ldk.structs.ChannelAnnouncement msg, org.ldk.structs.ChannelUpdate update_msg) { - long ret = bindings.MessageSendEvent_send_channel_announcement(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr, update_msg == null ? 0 : update_msg.ptr); + long ret = bindings.MessageSendEvent_send_channel_announcement(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr, update_msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); GC.KeepAlive(update_msg); @@ -1179,7 +1179,7 @@ public class MessageSendEvent : CommonBase { * Utility method to constructs a new BroadcastChannelAnnouncement-variant MessageSendEvent */ public static MessageSendEvent broadcast_channel_announcement(org.ldk.structs.ChannelAnnouncement msg, org.ldk.structs.ChannelUpdate update_msg) { - long ret = bindings.MessageSendEvent_broadcast_channel_announcement(msg == null ? 0 : msg.ptr, update_msg == null ? 0 : update_msg.ptr); + long ret = bindings.MessageSendEvent_broadcast_channel_announcement(msg.ptr, update_msg.ptr); GC.KeepAlive(msg); GC.KeepAlive(update_msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1194,7 +1194,7 @@ public class MessageSendEvent : CommonBase { * Utility method to constructs a new BroadcastChannelUpdate-variant MessageSendEvent */ public static MessageSendEvent broadcast_channel_update(org.ldk.structs.ChannelUpdate msg) { - long ret = bindings.MessageSendEvent_broadcast_channel_update(msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_broadcast_channel_update(msg.ptr); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); @@ -1207,7 +1207,7 @@ public class MessageSendEvent : CommonBase { * Utility method to constructs a new BroadcastNodeAnnouncement-variant MessageSendEvent */ public static MessageSendEvent broadcast_node_announcement(org.ldk.structs.NodeAnnouncement msg) { - long ret = bindings.MessageSendEvent_broadcast_node_announcement(msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_broadcast_node_announcement(msg.ptr); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); @@ -1220,7 +1220,7 @@ public class MessageSendEvent : CommonBase { * Utility method to constructs a new SendChannelUpdate-variant MessageSendEvent */ public static MessageSendEvent send_channel_update(byte[] node_id, org.ldk.structs.ChannelUpdate msg) { - long ret = bindings.MessageSendEvent_send_channel_update(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_channel_update(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1248,7 +1248,7 @@ public class MessageSendEvent : CommonBase { * Utility method to constructs a new SendChannelRangeQuery-variant MessageSendEvent */ public static MessageSendEvent send_channel_range_query(byte[] node_id, org.ldk.structs.QueryChannelRange msg) { - long ret = bindings.MessageSendEvent_send_channel_range_query(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_channel_range_query(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1262,7 +1262,7 @@ public class MessageSendEvent : CommonBase { * Utility method to constructs a new SendShortIdsQuery-variant MessageSendEvent */ public static MessageSendEvent send_short_ids_query(byte[] node_id, org.ldk.structs.QueryShortChannelIds msg) { - long ret = bindings.MessageSendEvent_send_short_ids_query(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_short_ids_query(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1276,7 +1276,7 @@ public class MessageSendEvent : CommonBase { * Utility method to constructs a new SendReplyChannelRange-variant MessageSendEvent */ public static MessageSendEvent send_reply_channel_range(byte[] node_id, org.ldk.structs.ReplyChannelRange msg) { - long ret = bindings.MessageSendEvent_send_reply_channel_range(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_reply_channel_range(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -1290,7 +1290,7 @@ public class MessageSendEvent : CommonBase { * Utility method to constructs a new SendGossipTimestampFilter-variant MessageSendEvent */ public static MessageSendEvent send_gossip_timestamp_filter(byte[] node_id, org.ldk.structs.GossipTimestampFilter msg) { - long ret = bindings.MessageSendEvent_send_gossip_timestamp_filter(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); + long ret = bindings.MessageSendEvent_send_gossip_timestamp_filter(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/c_sharp/src/org/ldk/structs/MessageSendEventsProvider.cs b/c_sharp/src/org/ldk/structs/MessageSendEventsProvider.cs index 815a5409..5bb12c5b 100644 --- a/c_sharp/src/org/ldk/structs/MessageSendEventsProvider.cs +++ b/c_sharp/src/org/ldk/structs/MessageSendEventsProvider.cs @@ -36,7 +36,7 @@ public class MessageSendEventsProvider : CommonBase { public long get_and_clear_pending_msg_events() { MessageSendEvent[] ret = arg.get_and_clear_pending_msg_events(); GC.KeepAlive(arg); - long result = InternalUtils.encodeUint64Array(InternalUtils.mapArray(ret, ret_conv_18 => ret_conv_18 == null ? 0 : ret_conv_18.clone_ptr())); + long result = InternalUtils.encodeUint64Array(InternalUtils.mapArray(ret, ret_conv_18 => ret_conv_18.clone_ptr())); foreach (MessageSendEvent ret_conv_18 in ret) { if (impl_holder.held != null) { impl_holder.held.ptrs_to.AddLast(ret_conv_18); }; }; return result; } diff --git a/c_sharp/src/org/ldk/structs/MinFinalCltvExpiryDelta.cs b/c_sharp/src/org/ldk/structs/MinFinalCltvExpiryDelta.cs index e407faf8..3c7de38a 100644 --- a/c_sharp/src/org/ldk/structs/MinFinalCltvExpiryDelta.cs +++ b/c_sharp/src/org/ldk/structs/MinFinalCltvExpiryDelta.cs @@ -75,7 +75,7 @@ public class MinFinalCltvExpiryDelta : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.MinFinalCltvExpiryDelta b) { - bool ret = bindings.MinFinalCltvExpiryDelta_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.MinFinalCltvExpiryDelta_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/MonitorEvent.cs b/c_sharp/src/org/ldk/structs/MonitorEvent.cs index d569d222..dc163a41 100644 --- a/c_sharp/src/org/ldk/structs/MonitorEvent.cs +++ b/c_sharp/src/org/ldk/structs/MonitorEvent.cs @@ -18,8 +18,9 @@ public class MonitorEvent : CommonBase { long raw_ty = bindings.LDKMonitorEvent_ty_from_ptr(ptr); switch (raw_ty) { case 0: return new MonitorEvent_HTLCEvent(ptr); - case 1: return new MonitorEvent_HolderForceClosed(ptr); - case 2: return new MonitorEvent_Completed(ptr); + case 1: return new MonitorEvent_HolderForceClosedWithInfo(ptr); + case 2: return new MonitorEvent_HolderForceClosed(ptr); + case 3: return new MonitorEvent_Completed(ptr); default: throw new ArgumentException("Impossible enum variant"); } @@ -35,6 +36,35 @@ public class MonitorEvent : CommonBase { this.htlc_event = htlc_event_hu_conv; } } + /** A MonitorEvent of type HolderForceClosedWithInfo */ + public class MonitorEvent_HolderForceClosedWithInfo : MonitorEvent { + /** + * The reason the channel was closed. + */ + public ClosureReason reason; + /** + * The funding outpoint of the channel. + */ + public OutPoint outpoint; + /** + * The channel ID of the channel. + */ + public ChannelId channel_id; + internal MonitorEvent_HolderForceClosedWithInfo(long ptr) : base(null, ptr) { + long reason = bindings.LDKMonitorEvent_HolderForceClosedWithInfo_get_reason(ptr); + org.ldk.structs.ClosureReason reason_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(reason); + if (reason_hu_conv != null) { reason_hu_conv.ptrs_to.AddLast(this); }; + this.reason = reason_hu_conv; + long outpoint = bindings.LDKMonitorEvent_HolderForceClosedWithInfo_get_outpoint(ptr); + org.ldk.structs.OutPoint outpoint_hu_conv = null; if (outpoint < 0 || outpoint > 4096) { outpoint_hu_conv = new org.ldk.structs.OutPoint(null, outpoint); } + if (outpoint_hu_conv != null) { outpoint_hu_conv.ptrs_to.AddLast(this); }; + this.outpoint = outpoint_hu_conv; + long channel_id = bindings.LDKMonitorEvent_HolderForceClosedWithInfo_get_channel_id(ptr); + org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); } + if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.AddLast(this); }; + this.channel_id = channel_id_hu_conv; + } + } /** A MonitorEvent of type HolderForceClosed */ public class MonitorEvent_HolderForceClosed : MonitorEvent { public OutPoint holder_force_closed; @@ -51,6 +81,10 @@ public class MonitorEvent : CommonBase { * The funding outpoint of the [`ChannelMonitor`] that was updated */ public OutPoint funding_txo; + /** + * The channel ID of the channel associated with the [`ChannelMonitor`] + */ + public ChannelId channel_id; /** * The Update ID from [`ChannelMonitorUpdate::update_id`] which was applied or * [`ChannelMonitor::get_latest_update_id`]. @@ -64,6 +98,10 @@ public class MonitorEvent : CommonBase { org.ldk.structs.OutPoint funding_txo_hu_conv = null; if (funding_txo < 0 || funding_txo > 4096) { funding_txo_hu_conv = new org.ldk.structs.OutPoint(null, funding_txo); } if (funding_txo_hu_conv != null) { funding_txo_hu_conv.ptrs_to.AddLast(this); }; this.funding_txo = funding_txo_hu_conv; + long channel_id = bindings.LDKMonitorEvent_Completed_get_channel_id(ptr); + org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); } + if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.AddLast(this); }; + this.channel_id = channel_id_hu_conv; this.monitor_update_id = bindings.LDKMonitorEvent_Completed_get_monitor_update_id(ptr); } } @@ -89,7 +127,7 @@ public class MonitorEvent : CommonBase { * Utility method to constructs a new HTLCEvent-variant MonitorEvent */ public static MonitorEvent htlcevent(org.ldk.structs.HTLCUpdate a) { - long ret = bindings.MonitorEvent_htlcevent(a == null ? 0 : a.ptr); + long ret = bindings.MonitorEvent_htlcevent(a.ptr); GC.KeepAlive(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MonitorEvent ret_hu_conv = org.ldk.structs.MonitorEvent.constr_from_ptr(ret); @@ -98,11 +136,28 @@ public class MonitorEvent : CommonBase { return ret_hu_conv; } + /** + * Utility method to constructs a new HolderForceClosedWithInfo-variant MonitorEvent + */ + public static MonitorEvent holder_force_closed_with_info(org.ldk.structs.ClosureReason reason, org.ldk.structs.OutPoint outpoint, org.ldk.structs.ChannelId channel_id) { + long ret = bindings.MonitorEvent_holder_force_closed_with_info(reason.ptr, outpoint.ptr, channel_id.ptr); + GC.KeepAlive(reason); + GC.KeepAlive(outpoint); + GC.KeepAlive(channel_id); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.MonitorEvent ret_hu_conv = org.ldk.structs.MonitorEvent.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(reason); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(outpoint); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id); }; + return ret_hu_conv; + } + /** * Utility method to constructs a new HolderForceClosed-variant MonitorEvent */ public static MonitorEvent holder_force_closed(org.ldk.structs.OutPoint a) { - long ret = bindings.MonitorEvent_holder_force_closed(a == null ? 0 : a.ptr); + long ret = bindings.MonitorEvent_holder_force_closed(a.ptr); GC.KeepAlive(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MonitorEvent ret_hu_conv = org.ldk.structs.MonitorEvent.constr_from_ptr(ret); @@ -114,14 +169,16 @@ public class MonitorEvent : CommonBase { /** * Utility method to constructs a new Completed-variant MonitorEvent */ - public static MonitorEvent completed(org.ldk.structs.OutPoint funding_txo, long monitor_update_id) { - long ret = bindings.MonitorEvent_completed(funding_txo == null ? 0 : funding_txo.ptr, monitor_update_id); + public static MonitorEvent completed(org.ldk.structs.OutPoint funding_txo, org.ldk.structs.ChannelId channel_id, long monitor_update_id) { + long ret = bindings.MonitorEvent_completed(funding_txo.ptr, channel_id.ptr, monitor_update_id); GC.KeepAlive(funding_txo); + GC.KeepAlive(channel_id); GC.KeepAlive(monitor_update_id); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MonitorEvent ret_hu_conv = org.ldk.structs.MonitorEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(funding_txo); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id); }; return ret_hu_conv; } @@ -130,7 +187,7 @@ public class MonitorEvent : CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public bool eq(org.ldk.structs.MonitorEvent b) { - bool ret = bindings.MonitorEvent_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.MonitorEvent_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); return ret; diff --git a/c_sharp/src/org/ldk/structs/MonitorUpdateId.cs b/c_sharp/src/org/ldk/structs/MonitorUpdateId.cs index 95245380..ec125837 100644 --- a/c_sharp/src/org/ldk/structs/MonitorUpdateId.cs +++ b/c_sharp/src/org/ldk/structs/MonitorUpdateId.cs @@ -51,7 +51,7 @@ public class MonitorUpdateId : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.MonitorUpdateId b) { - bool ret = bindings.MonitorUpdateId_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.MonitorUpdateId_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/NetworkGraph.cs b/c_sharp/src/org/ldk/structs/NetworkGraph.cs index d5d098ac..34fcb9e4 100644 --- a/c_sharp/src/org/ldk/structs/NetworkGraph.cs +++ b/c_sharp/src/org/ldk/structs/NetworkGraph.cs @@ -23,7 +23,7 @@ public class NetworkGraph : CommonBase { * [`Event`]: crate::events::Event */ public void handle_network_update(org.ldk.structs.NetworkUpdate network_update) { - bindings.NetworkGraph_handle_network_update(this.ptr, network_update == null ? 0 : network_update.ptr); + bindings.NetworkGraph_handle_network_update(this.ptr, network_update.ptr); GC.KeepAlive(this); GC.KeepAlive(network_update); } @@ -121,7 +121,7 @@ public class NetworkGraph : CommonBase { * routing messages from a source using a protocol other than the lightning P2P protocol. */ public Result_NoneLightningErrorZ update_node_from_announcement(org.ldk.structs.NodeAnnouncement msg) { - long ret = bindings.NetworkGraph_update_node_from_announcement(this.ptr, msg == null ? 0 : msg.ptr); + long ret = bindings.NetworkGraph_update_node_from_announcement(this.ptr, msg.ptr); GC.KeepAlive(this); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -137,7 +137,7 @@ public class NetworkGraph : CommonBase { * peers. */ public Result_NoneLightningErrorZ update_node_from_unsigned_announcement(org.ldk.structs.UnsignedNodeAnnouncement msg) { - long ret = bindings.NetworkGraph_update_node_from_unsigned_announcement(this.ptr, msg == null ? 0 : msg.ptr); + long ret = bindings.NetworkGraph_update_node_from_unsigned_announcement(this.ptr, msg.ptr); GC.KeepAlive(this); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -157,7 +157,7 @@ public class NetworkGraph : CommonBase { * the corresponding UTXO exists on chain and is correctly-formatted. */ public Result_NoneLightningErrorZ update_channel_from_announcement(org.ldk.structs.ChannelAnnouncement msg, org.ldk.structs.Option_UtxoLookupZ utxo_lookup) { - long ret = bindings.NetworkGraph_update_channel_from_announcement(this.ptr, msg == null ? 0 : msg.ptr, utxo_lookup.ptr); + long ret = bindings.NetworkGraph_update_channel_from_announcement(this.ptr, msg.ptr, utxo_lookup.ptr); GC.KeepAlive(this); GC.KeepAlive(msg); GC.KeepAlive(utxo_lookup); @@ -178,7 +178,7 @@ public class NetworkGraph : CommonBase { * This will skip verification of if the channel is actually on-chain. */ public Result_NoneLightningErrorZ update_channel_from_announcement_no_lookup(org.ldk.structs.ChannelAnnouncement msg) { - long ret = bindings.NetworkGraph_update_channel_from_announcement_no_lookup(this.ptr, msg == null ? 0 : msg.ptr); + long ret = bindings.NetworkGraph_update_channel_from_announcement_no_lookup(this.ptr, msg.ptr); GC.KeepAlive(this); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -196,7 +196,7 @@ public class NetworkGraph : CommonBase { * the corresponding UTXO exists on chain and is correctly-formatted. */ public Result_NoneLightningErrorZ update_channel_from_unsigned_announcement(org.ldk.structs.UnsignedChannelAnnouncement msg, org.ldk.structs.Option_UtxoLookupZ utxo_lookup) { - long ret = bindings.NetworkGraph_update_channel_from_unsigned_announcement(this.ptr, msg == null ? 0 : msg.ptr, utxo_lookup.ptr); + long ret = bindings.NetworkGraph_update_channel_from_unsigned_announcement(this.ptr, msg.ptr, utxo_lookup.ptr); GC.KeepAlive(this); GC.KeepAlive(msg); GC.KeepAlive(utxo_lookup); @@ -216,7 +216,7 @@ public class NetworkGraph : CommonBase { * All other parameters as used in [`msgs::UnsignedChannelAnnouncement`] fields. */ public Result_NoneLightningErrorZ add_channel_from_partial_announcement(long short_channel_id, long timestamp, org.ldk.structs.ChannelFeatures features, byte[] node_id_1, byte[] node_id_2) { - long ret = bindings.NetworkGraph_add_channel_from_partial_announcement(this.ptr, short_channel_id, timestamp, features == null ? 0 : features.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id_1, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id_2, 33))); + long ret = bindings.NetworkGraph_add_channel_from_partial_announcement(this.ptr, short_channel_id, timestamp, features.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id_1, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id_2, 33))); GC.KeepAlive(this); GC.KeepAlive(short_channel_id); GC.KeepAlive(timestamp); @@ -306,7 +306,7 @@ public class NetworkGraph : CommonBase { * materially in the future will be rejected. */ public Result_NoneLightningErrorZ update_channel(org.ldk.structs.ChannelUpdate msg) { - long ret = bindings.NetworkGraph_update_channel(this.ptr, msg == null ? 0 : msg.ptr); + long ret = bindings.NetworkGraph_update_channel(this.ptr, msg.ptr); GC.KeepAlive(this); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -324,7 +324,7 @@ public class NetworkGraph : CommonBase { * materially in the future will be rejected. */ public Result_NoneLightningErrorZ update_channel_unsigned(org.ldk.structs.UnsignedChannelUpdate msg) { - long ret = bindings.NetworkGraph_update_channel_unsigned(this.ptr, msg == null ? 0 : msg.ptr); + long ret = bindings.NetworkGraph_update_channel_unsigned(this.ptr, msg.ptr); GC.KeepAlive(this); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -342,7 +342,7 @@ public class NetworkGraph : CommonBase { * materially in the future will be rejected. */ public Result_NoneLightningErrorZ verify_channel_update(org.ldk.structs.ChannelUpdate msg) { - long ret = bindings.NetworkGraph_verify_channel_update(this.ptr, msg == null ? 0 : msg.ptr); + long ret = bindings.NetworkGraph_verify_channel_update(this.ptr, msg.ptr); GC.KeepAlive(this); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/c_sharp/src/org/ldk/structs/NetworkUpdate.cs b/c_sharp/src/org/ldk/structs/NetworkUpdate.cs index 44ba3641..8642d16a 100644 --- a/c_sharp/src/org/ldk/structs/NetworkUpdate.cs +++ b/c_sharp/src/org/ldk/structs/NetworkUpdate.cs @@ -97,7 +97,7 @@ public class NetworkUpdate : CommonBase { * Utility method to constructs a new ChannelUpdateMessage-variant NetworkUpdate */ public static NetworkUpdate channel_update_message(org.ldk.structs.ChannelUpdate msg) { - long ret = bindings.NetworkUpdate_channel_update_message(msg == null ? 0 : msg.ptr); + long ret = bindings.NetworkUpdate_channel_update_message(msg.ptr); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.NetworkUpdate ret_hu_conv = org.ldk.structs.NetworkUpdate.constr_from_ptr(ret); @@ -137,7 +137,7 @@ public class NetworkUpdate : CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public bool eq(org.ldk.structs.NetworkUpdate b) { - bool ret = bindings.NetworkUpdate_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.NetworkUpdate_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); return ret; diff --git a/c_sharp/src/org/ldk/structs/NextMessageHop.cs b/c_sharp/src/org/ldk/structs/NextMessageHop.cs new file mode 100644 index 00000000..70935c3c --- /dev/null +++ b/c_sharp/src/org/ldk/structs/NextMessageHop.cs @@ -0,0 +1,115 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +/** + * The next hop to forward an onion message along its path. + * + * Note that payment blinded paths always specify their next hop using an explicit node id. + */ +public class NextMessageHop : CommonBase { + protected NextMessageHop(object _dummy, long ptr) : base(ptr) { } + ~NextMessageHop() { + if (ptr != 0) { bindings.NextMessageHop_free(ptr); } + } + + internal static NextMessageHop constr_from_ptr(long ptr) { + long raw_ty = bindings.LDKNextMessageHop_ty_from_ptr(ptr); + switch (raw_ty) { + case 0: return new NextMessageHop_NodeId(ptr); + case 1: return new NextMessageHop_ShortChannelId(ptr); + default: + throw new ArgumentException("Impossible enum variant"); + } + } + + /** A NextMessageHop of type NodeId */ + public class NextMessageHop_NodeId : NextMessageHop { + public byte[] node_id; + internal NextMessageHop_NodeId(long ptr) : base(null, ptr) { + long node_id = bindings.LDKNextMessageHop_NodeId_get_node_id(ptr); + byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); + this.node_id = node_id_conv; + } + } + /** A NextMessageHop of type ShortChannelId */ + public class NextMessageHop_ShortChannelId : NextMessageHop { + public long short_channel_id; + internal NextMessageHop_ShortChannelId(long ptr) : base(null, ptr) { + this.short_channel_id = bindings.LDKNextMessageHop_ShortChannelId_get_short_channel_id(ptr); + } + } + internal long clone_ptr() { + long ret = bindings.NextMessageHop_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a copy of the NextMessageHop + */ + public NextMessageHop clone() { + long ret = bindings.NextMessageHop_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.NextMessageHop ret_hu_conv = org.ldk.structs.NextMessageHop.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new NodeId-variant NextMessageHop + */ + public static NextMessageHop node_id(byte[] a) { + long ret = bindings.NextMessageHop_node_id(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(a, 33))); + GC.KeepAlive(a); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.NextMessageHop ret_hu_conv = org.ldk.structs.NextMessageHop.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new ShortChannelId-variant NextMessageHop + */ + public static NextMessageHop short_channel_id(long a) { + long ret = bindings.NextMessageHop_short_channel_id(a); + GC.KeepAlive(a); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.NextMessageHop ret_hu_conv = org.ldk.structs.NextMessageHop.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Generates a non-cryptographic 64-bit hash of the NextMessageHop. + */ + public long hash() { + long ret = bindings.NextMessageHop_hash(this.ptr); + GC.KeepAlive(this); + return ret; + } + + public override int GetHashCode() { + return (int)this.hash(); + } + /** + * Checks if two NextMessageHops contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + */ + public bool eq(org.ldk.structs.NextMessageHop b) { + bool ret = bindings.NextMessageHop_eq(this.ptr, b.ptr); + GC.KeepAlive(this); + GC.KeepAlive(b); + return ret; + } + + public override bool Equals(object o) { + if (!(o is NextMessageHop)) return false; + return this.eq((NextMessageHop)o); + } +} +} } } diff --git a/c_sharp/src/org/ldk/structs/NodeAlias.cs b/c_sharp/src/org/ldk/structs/NodeAlias.cs index 8121cf14..8eaed432 100644 --- a/c_sharp/src/org/ldk/structs/NodeAlias.cs +++ b/c_sharp/src/org/ldk/structs/NodeAlias.cs @@ -80,7 +80,7 @@ public class NodeAlias : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.NodeAlias b) { - bool ret = bindings.NodeAlias_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.NodeAlias_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/NodeAnnouncement.cs b/c_sharp/src/org/ldk/structs/NodeAnnouncement.cs index ae331955..26d28c70 100644 --- a/c_sharp/src/org/ldk/structs/NodeAnnouncement.cs +++ b/c_sharp/src/org/ldk/structs/NodeAnnouncement.cs @@ -53,7 +53,7 @@ public class NodeAnnouncement : CommonBase { * The actual content of the announcement */ public void set_contents(org.ldk.structs.UnsignedNodeAnnouncement val) { - bindings.NodeAnnouncement_set_contents(this.ptr, val == null ? 0 : val.ptr); + bindings.NodeAnnouncement_set_contents(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -63,7 +63,7 @@ public class NodeAnnouncement : CommonBase { * Constructs a new NodeAnnouncement given each field */ public static NodeAnnouncement of(byte[] signature_arg, org.ldk.structs.UnsignedNodeAnnouncement contents_arg) { - long ret = bindings.NodeAnnouncement_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(signature_arg, 64)), contents_arg == null ? 0 : contents_arg.ptr); + long ret = bindings.NodeAnnouncement_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(signature_arg, 64)), contents_arg.ptr); GC.KeepAlive(signature_arg); GC.KeepAlive(contents_arg); if (ret >= 0 && ret <= 4096) { return null; } @@ -109,7 +109,7 @@ public class NodeAnnouncement : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.NodeAnnouncement b) { - bool ret = bindings.NodeAnnouncement_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.NodeAnnouncement_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/NodeAnnouncementInfo.cs b/c_sharp/src/org/ldk/structs/NodeAnnouncementInfo.cs index e1a6e022..b44a9b98 100644 --- a/c_sharp/src/org/ldk/structs/NodeAnnouncementInfo.cs +++ b/c_sharp/src/org/ldk/structs/NodeAnnouncementInfo.cs @@ -31,7 +31,7 @@ public class NodeAnnouncementInfo : CommonBase { * Protocol features the node announced support for */ public void set_features(org.ldk.structs.NodeFeatures val) { - bindings.NodeAnnouncementInfo_set_features(this.ptr, val == null ? 0 : val.ptr); + bindings.NodeAnnouncementInfo_set_features(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -97,7 +97,7 @@ public class NodeAnnouncementInfo : CommonBase { * should not be exposed to the user. */ public void set_alias(org.ldk.structs.NodeAlias val) { - bindings.NodeAnnouncementInfo_set_alias(this.ptr, val == null ? 0 : val.ptr); + bindings.NodeAnnouncementInfo_set_alias(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -141,7 +141,7 @@ public class NodeAnnouncementInfo : CommonBase { * Note that announcement_message_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ public static NodeAnnouncementInfo of(org.ldk.structs.NodeFeatures features_arg, int last_update_arg, byte[] rgb_arg, org.ldk.structs.NodeAlias alias_arg, org.ldk.structs.NodeAnnouncement announcement_message_arg) { - long ret = bindings.NodeAnnouncementInfo_new(features_arg == null ? 0 : features_arg.ptr, last_update_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(rgb_arg, 3)), alias_arg == null ? 0 : alias_arg.ptr, announcement_message_arg == null ? 0 : announcement_message_arg.ptr); + long ret = bindings.NodeAnnouncementInfo_new(features_arg.ptr, last_update_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(rgb_arg, 3)), alias_arg.ptr, announcement_message_arg == null ? 0 : announcement_message_arg.ptr); GC.KeepAlive(features_arg); GC.KeepAlive(last_update_arg); GC.KeepAlive(rgb_arg); @@ -180,7 +180,7 @@ public class NodeAnnouncementInfo : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.NodeAnnouncementInfo b) { - bool ret = bindings.NodeAnnouncementInfo_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.NodeAnnouncementInfo_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/NodeFeatures.cs b/c_sharp/src/org/ldk/structs/NodeFeatures.cs index 32eaf48f..38871aba 100644 --- a/c_sharp/src/org/ldk/structs/NodeFeatures.cs +++ b/c_sharp/src/org/ldk/structs/NodeFeatures.cs @@ -21,7 +21,7 @@ public class NodeFeatures : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.NodeFeatures b) { - bool ret = bindings.NodeFeatures_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.NodeFeatures_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; @@ -77,7 +77,7 @@ public class NodeFeatures : CommonBase { * Returns true if this `Features` object contains required features unknown by `other`. */ public bool requires_unknown_bits_from(org.ldk.structs.NodeFeatures other) { - bool ret = bindings.NodeFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr); + bool ret = bindings.NodeFeatures_requires_unknown_bits_from(this.ptr, other.ptr); GC.KeepAlive(this); GC.KeepAlive(other); if (this != null) { this.ptrs_to.AddLast(other); }; @@ -800,5 +800,39 @@ public class NodeFeatures : CommonBase { return ret; } + /** + * Set this feature as optional. + */ + public void set_trampoline_routing_optional() { + bindings.NodeFeatures_set_trampoline_routing_optional(this.ptr); + GC.KeepAlive(this); + } + + /** + * Set this feature as required. + */ + public void set_trampoline_routing_required() { + bindings.NodeFeatures_set_trampoline_routing_required(this.ptr); + GC.KeepAlive(this); + } + + /** + * Checks if this feature is supported. + */ + public bool supports_trampoline_routing() { + bool ret = bindings.NodeFeatures_supports_trampoline_routing(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Checks if this feature is required. + */ + public bool requires_trampoline_routing() { + bool ret = bindings.NodeFeatures_requires_trampoline_routing(this.ptr); + GC.KeepAlive(this); + return ret; + } + } } } } diff --git a/c_sharp/src/org/ldk/structs/NodeId.cs b/c_sharp/src/org/ldk/structs/NodeId.cs index b5b0522c..c994ad56 100644 --- a/c_sharp/src/org/ldk/structs/NodeId.cs +++ b/c_sharp/src/org/ldk/structs/NodeId.cs @@ -45,6 +45,17 @@ public class NodeId : CommonBase { return ret_hu_conv; } + /** + * Create a new NodeId from a slice of bytes + */ + public static Result_NodeIdDecodeErrorZ from_slice(byte[] bytes) { + long ret = bindings.NodeId_from_slice(InternalUtils.encodeUint8Array(bytes)); + GC.KeepAlive(bytes); + if (ret >= 0 && ret <= 4096) { return null; } + Result_NodeIdDecodeErrorZ ret_hu_conv = Result_NodeIdDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + /** * Get the public key slice from this NodeId */ diff --git a/c_sharp/src/org/ldk/structs/NodeIdLookUp.cs b/c_sharp/src/org/ldk/structs/NodeIdLookUp.cs new file mode 100644 index 00000000..42250287 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/NodeIdLookUp.cs @@ -0,0 +1,85 @@ + +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + + + +/** An implementation of NodeIdLookUp */ +public interface NodeIdLookUpInterface { + /**Returns the node id of the forwarding node's channel counterparty with `short_channel_id`. + * + * Here, the forwarding node is referring to the node of the [`OnionMessenger`] parameterized + * by the [`NodeIdLookUp`] and the counterparty to one of that node's peers. + * + * [`OnionMessenger`]: crate::onion_message::messenger::OnionMessenger + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + byte[] next_node_id(long short_channel_id); +} + +/** + * An interface for looking up the node id of a channel counterparty for the purpose of forwarding + * an [`OnionMessage`]. + * + * [`OnionMessage`]: crate::ln::msgs::OnionMessage + */ +public class NodeIdLookUp : CommonBase { + internal bindings.LDKNodeIdLookUp bindings_instance; + internal long instance_idx; + + internal NodeIdLookUp(object _dummy, long ptr) : base(ptr) { bindings_instance = null; } + ~NodeIdLookUp() { + if (ptr != 0) { bindings.NodeIdLookUp_free(ptr); } + } + + private class LDKNodeIdLookUpHolder { internal NodeIdLookUp held; } + private class LDKNodeIdLookUpImpl : bindings.LDKNodeIdLookUp { + internal LDKNodeIdLookUpImpl(NodeIdLookUpInterface arg, LDKNodeIdLookUpHolder impl_holder) { this.arg = arg; this.impl_holder = impl_holder; } + private NodeIdLookUpInterface arg; + private LDKNodeIdLookUpHolder impl_holder; + public long next_node_id(long _short_channel_id) { + byte[] ret = arg.next_node_id(_short_channel_id); + GC.KeepAlive(arg); + long result = InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(ret, 33)); + return result; + } + } + + /** Creates a new instance of NodeIdLookUp from a given implementation */ + public static NodeIdLookUp new_impl(NodeIdLookUpInterface arg) { + LDKNodeIdLookUpHolder impl_holder = new LDKNodeIdLookUpHolder(); + LDKNodeIdLookUpImpl impl = new LDKNodeIdLookUpImpl(arg, impl_holder); + long[] ptr_idx = bindings.LDKNodeIdLookUp_new(impl); + + impl_holder.held = new NodeIdLookUp(null, ptr_idx[0]); + impl_holder.held.instance_idx = ptr_idx[1]; + impl_holder.held.bindings_instance = impl; + return impl_holder.held; + } + + /** + * Returns the node id of the forwarding node's channel counterparty with `short_channel_id`. + * + * Here, the forwarding node is referring to the node of the [`OnionMessenger`] parameterized + * by the [`NodeIdLookUp`] and the counterparty to one of that node's peers. + * + * [`OnionMessenger`]: crate::onion_message::messenger::OnionMessenger + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public byte[] next_node_id(long short_channel_id) { + long ret = bindings.NodeIdLookUp_next_node_id(this.ptr, short_channel_id); + GC.KeepAlive(this); + GC.KeepAlive(short_channel_id); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/NodeInfo.cs b/c_sharp/src/org/ldk/structs/NodeInfo.cs index 78bb6190..2f1c0a22 100644 --- a/c_sharp/src/org/ldk/structs/NodeInfo.cs +++ b/c_sharp/src/org/ldk/structs/NodeInfo.cs @@ -107,7 +107,7 @@ public class NodeInfo : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.NodeInfo b) { - bool ret = bindings.NodeInfo_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.NodeInfo_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; @@ -118,6 +118,15 @@ public class NodeInfo : CommonBase { if (!(o is NodeInfo)) return false; return this.eq((NodeInfo)o); } + /** + * Returns whether the node has only announced Tor addresses. + */ + public bool is_tor_only() { + bool ret = bindings.NodeInfo_is_tor_only(this.ptr); + GC.KeepAlive(this); + return ret; + } + /** * Serialize the NodeInfo object into a byte array which can be read by NodeInfo_read */ diff --git a/c_sharp/src/org/ldk/structs/NodeSigner.cs b/c_sharp/src/org/ldk/structs/NodeSigner.cs index 033f93ac..f5f001b9 100644 --- a/c_sharp/src/org/ldk/structs/NodeSigner.cs +++ b/c_sharp/src/org/ldk/structs/NodeSigner.cs @@ -114,7 +114,7 @@ public class NodeSigner : CommonBase { public long get_node_id(Recipient _recipient) { Result_PublicKeyNoneZ ret = arg.get_node_id(_recipient); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long ecdh(Recipient _recipient, long _other_key, long _tweak) { @@ -123,7 +123,7 @@ public class NodeSigner : CommonBase { if (_tweak_hu_conv != null) { _tweak_hu_conv.ptrs_to.AddLast(this); }; Result_ThirtyTwoBytesNoneZ ret = arg.ecdh(_recipient, _other_key_conv, _tweak_hu_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long sign_invoice(long _hrp_bytes, long _invoice_data, Recipient _recipient) { @@ -138,21 +138,21 @@ public class NodeSigner : CommonBase { bindings.free_buffer(_invoice_data); Result_RecoverableSignatureNoneZ ret = arg.sign_invoice(_hrp_bytes_conv, _invoice_data_conv_7_arr, _recipient); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long sign_bolt12_invoice_request(long _invoice_request) { org.ldk.structs.UnsignedInvoiceRequest _invoice_request_hu_conv = null; if (_invoice_request < 0 || _invoice_request > 4096) { _invoice_request_hu_conv = new org.ldk.structs.UnsignedInvoiceRequest(null, _invoice_request); } Result_SchnorrSignatureNoneZ ret = arg.sign_bolt12_invoice_request(_invoice_request_hu_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long sign_bolt12_invoice(long _invoice) { org.ldk.structs.UnsignedBolt12Invoice _invoice_hu_conv = null; if (_invoice < 0 || _invoice > 4096) { _invoice_hu_conv = new org.ldk.structs.UnsignedBolt12Invoice(null, _invoice); } Result_SchnorrSignatureNoneZ ret = arg.sign_bolt12_invoice(_invoice_hu_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long sign_gossip_message(long _msg) { @@ -160,7 +160,7 @@ public class NodeSigner : CommonBase { if (_msg_hu_conv != null) { _msg_hu_conv.ptrs_to.AddLast(this); }; Result_ECDSASignatureNoneZ ret = arg.sign_gossip_message(_msg_hu_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } } @@ -273,7 +273,7 @@ public class NodeSigner : CommonBase { * [`TaggedHash`]: crate::offers::merkle::TaggedHash */ public Result_SchnorrSignatureNoneZ sign_bolt12_invoice_request(org.ldk.structs.UnsignedInvoiceRequest invoice_request) { - long ret = bindings.NodeSigner_sign_bolt12_invoice_request(this.ptr, invoice_request == null ? 0 : invoice_request.ptr); + long ret = bindings.NodeSigner_sign_bolt12_invoice_request(this.ptr, invoice_request.ptr); GC.KeepAlive(this); GC.KeepAlive(invoice_request); if (ret >= 0 && ret <= 4096) { return null; } @@ -296,7 +296,7 @@ public class NodeSigner : CommonBase { * [`TaggedHash`]: crate::offers::merkle::TaggedHash */ public Result_SchnorrSignatureNoneZ sign_bolt12_invoice(org.ldk.structs.UnsignedBolt12Invoice invoice) { - long ret = bindings.NodeSigner_sign_bolt12_invoice(this.ptr, invoice == null ? 0 : invoice.ptr); + long ret = bindings.NodeSigner_sign_bolt12_invoice(this.ptr, invoice.ptr); GC.KeepAlive(this); GC.KeepAlive(invoice); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/c_sharp/src/org/ldk/structs/Offer.cs b/c_sharp/src/org/ldk/structs/Offer.cs index 8ff67b8a..61159556 100644 --- a/c_sharp/src/org/ldk/structs/Offer.cs +++ b/c_sharp/src/org/ldk/structs/Offer.cs @@ -80,14 +80,12 @@ public class Offer : CommonBase { /** * The minimum amount required for a successful payment of a single item. - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public Amount amount() { + public Option_AmountZ amount() { long ret = bindings.Offer_amount(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Amount ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Amount(null, ret); } + org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; return ret_hu_conv; } @@ -95,6 +93,8 @@ public class Offer : CommonBase { /** * A complete description of the purpose of the payment. Intended to be displayed to the user * but with the caveat that it has not been verified in any way. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ public PrintableString description() { long ret = bindings.Offer_description(this.ptr); @@ -173,13 +173,15 @@ public class Offer : CommonBase { long ret = bindings.Offer_supported_quantity(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Quantity ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Quantity(null, ret); } + org.ldk.structs.Quantity ret_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; return ret_hu_conv; } /** * The public key used by the recipient to sign invoices. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ public byte[] signing_pubkey() { long ret = bindings.Offer_signing_pubkey(this.ptr); @@ -189,6 +191,18 @@ public class Offer : CommonBase { return ret_conv; } + /** + * Returns the id of the offer. + */ + public OfferId id() { + long ret = bindings.Offer_id(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OfferId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + /** * Returns whether the given chain is supported by the offer. */ @@ -239,6 +253,95 @@ public class Offer : CommonBase { return ret; } + /** + * Similar to [`Offer::request_invoice`] except it: + * - derives the [`InvoiceRequest::payer_id`] such that a different key can be used for each + * request, + * - sets [`InvoiceRequest::payer_metadata`] when [`InvoiceRequestBuilder::build`] is called + * such that it can be used by [`Bolt12Invoice::verify`] to determine if the invoice was + * requested using a base [`ExpandedKey`] from which the payer id was derived, and + * - includes the [`PaymentId`] encrypted in [`InvoiceRequest::payer_metadata`] so that it can + * be used when sending the payment for the requested invoice. + * + * Useful to protect the sender's privacy. + * + * [`InvoiceRequest::payer_id`]: crate::offers::invoice_request::InvoiceRequest::payer_id + * [`InvoiceRequest::payer_metadata`]: crate::offers::invoice_request::InvoiceRequest::payer_metadata + * [`Bolt12Invoice::verify`]: crate::offers::invoice::Bolt12Invoice::verify + * [`ExpandedKey`]: crate::ln::inbound_payment::ExpandedKey + */ + public Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ request_invoice_deriving_payer_id(org.ldk.structs.ExpandedKey expanded_key, org.ldk.structs.EntropySource entropy_source, byte[] payment_id) { + long ret = bindings.Offer_request_invoice_deriving_payer_id(this.ptr, expanded_key.ptr, entropy_source.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32))); + GC.KeepAlive(this); + GC.KeepAlive(expanded_key); + GC.KeepAlive(entropy_source); + GC.KeepAlive(payment_id); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.AddLast(expanded_key); }; + if (this != null) { this.ptrs_to.AddLast(entropy_source); }; + return ret_hu_conv; + } + + /** + * Similar to [`Offer::request_invoice_deriving_payer_id`] except uses `payer_id` for the + * [`InvoiceRequest::payer_id`] instead of deriving a different key for each request. + * + * Useful for recurring payments using the same `payer_id` with different invoices. + * + * [`InvoiceRequest::payer_id`]: crate::offers::invoice_request::InvoiceRequest::payer_id + */ + public Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ request_invoice_deriving_metadata(byte[] payer_id, org.ldk.structs.ExpandedKey expanded_key, org.ldk.structs.EntropySource entropy_source, byte[] payment_id) { + long ret = bindings.Offer_request_invoice_deriving_metadata(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payer_id, 33)), expanded_key.ptr, entropy_source.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32))); + GC.KeepAlive(this); + GC.KeepAlive(payer_id); + GC.KeepAlive(expanded_key); + GC.KeepAlive(entropy_source); + GC.KeepAlive(payment_id); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.AddLast(expanded_key); }; + if (this != null) { this.ptrs_to.AddLast(entropy_source); }; + return ret_hu_conv; + } + + /** + * Creates an [`InvoiceRequestBuilder`] for the offer with the given `metadata` and `payer_id`, + * which will be reflected in the `Bolt12Invoice` response. + * + * The `metadata` is useful for including information about the derivation of `payer_id` such + * that invoice response handling can be stateless. Also serves as payer-provided entropy while + * hashing in the signature calculation. + * + * This should not leak any information such as by using a simple BIP-32 derivation path. + * Otherwise, payments may be correlated. + * + * Errors if the offer contains unknown required features. + * + * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest + */ + public Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ request_invoice(byte[] metadata, byte[] payer_id) { + long ret = bindings.Offer_request_invoice(this.ptr, InternalUtils.encodeUint8Array(metadata), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payer_id, 33))); + GC.KeepAlive(this); + GC.KeepAlive(metadata); + GC.KeepAlive(payer_id); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Generates a non-cryptographic 64-bit hash of the Offer. + */ + public long hash() { + long ret = bindings.Offer_hash(this.ptr); + GC.KeepAlive(this); + return ret; + } + + public override int GetHashCode() { + return (int)this.hash(); + } /** * Serialize the Offer object into a byte array which can be read by Offer_read */ diff --git a/c_sharp/src/org/ldk/structs/OfferFeatures.cs b/c_sharp/src/org/ldk/structs/OfferFeatures.cs index 8e6af54b..d72a7ad0 100644 --- a/c_sharp/src/org/ldk/structs/OfferFeatures.cs +++ b/c_sharp/src/org/ldk/structs/OfferFeatures.cs @@ -21,7 +21,7 @@ public class OfferFeatures : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.OfferFeatures b) { - bool ret = bindings.OfferFeatures_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.OfferFeatures_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; @@ -77,7 +77,7 @@ public class OfferFeatures : CommonBase { * Returns true if this `Features` object contains required features unknown by `other`. */ public bool requires_unknown_bits_from(org.ldk.structs.OfferFeatures other) { - bool ret = bindings.OfferFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr); + bool ret = bindings.OfferFeatures_requires_unknown_bits_from(this.ptr, other.ptr); GC.KeepAlive(this); GC.KeepAlive(other); if (this != null) { this.ptrs_to.AddLast(other); }; diff --git a/c_sharp/src/org/ldk/structs/OfferId.cs b/c_sharp/src/org/ldk/structs/OfferId.cs new file mode 100644 index 00000000..215e9b54 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/OfferId.cs @@ -0,0 +1,102 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + + +/** + * An identifier for an [`Offer`] built using [`DerivedMetadata`]. + */ +public class OfferId : CommonBase { + internal OfferId(object _dummy, long ptr) : base(ptr) { } + ~OfferId() { + if (ptr != 0) { bindings.OfferId_free(ptr); } + } + + public byte[] get_a() { + long ret = bindings.OfferId_get_a(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + + public void set_a(byte[] val) { + bindings.OfferId_set_a(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * Constructs a new OfferId given each field + */ + public static OfferId of(byte[] a_arg) { + long ret = bindings.OfferId_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(a_arg, 32))); + GC.KeepAlive(a_arg); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OfferId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + + internal long clone_ptr() { + long ret = bindings.OfferId_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a copy of the OfferId + */ + public OfferId clone() { + long ret = bindings.OfferId_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OfferId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Checks if two OfferIds contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ + public bool eq(org.ldk.structs.OfferId b) { + bool ret = bindings.OfferId_eq(this.ptr, b.ptr); + GC.KeepAlive(this); + GC.KeepAlive(b); + if (this != null) { this.ptrs_to.AddLast(b); }; + return ret; + } + + public override bool Equals(object o) { + if (!(o is OfferId)) return false; + return this.eq((OfferId)o); + } + /** + * Serialize the OfferId object into a byte array which can be read by OfferId_read + */ + public byte[] write() { + long ret = bindings.OfferId_write(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Read a OfferId from a byte array, created by OfferId_write + */ + public static Result_OfferIdDecodeErrorZ read(byte[] ser) { + long ret = bindings.OfferId_read(InternalUtils.encodeUint8Array(ser)); + GC.KeepAlive(ser); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OfferIdDecodeErrorZ ret_hu_conv = Result_OfferIdDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/OfferWithDerivedMetadataBuilder.cs b/c_sharp/src/org/ldk/structs/OfferWithDerivedMetadataBuilder.cs new file mode 100644 index 00000000..ae8349ab --- /dev/null +++ b/c_sharp/src/org/ldk/structs/OfferWithDerivedMetadataBuilder.cs @@ -0,0 +1,172 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + + +/** + * Builds an [`Offer`] for the \"offer to be paid\" flow. + * + * See [module-level documentation] for usage. + * + * [module-level documentation]: self + */ +public class OfferWithDerivedMetadataBuilder : CommonBase { + internal OfferWithDerivedMetadataBuilder(object _dummy, long ptr) : base(ptr) { } + ~OfferWithDerivedMetadataBuilder() { + if (ptr != 0) { bindings.OfferWithDerivedMetadataBuilder_free(ptr); } + } + + internal long clone_ptr() { + long ret = bindings.OfferWithDerivedMetadataBuilder_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a copy of the OfferWithDerivedMetadataBuilder + */ + public OfferWithDerivedMetadataBuilder clone() { + long ret = bindings.OfferWithDerivedMetadataBuilder_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OfferWithDerivedMetadataBuilder ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferWithDerivedMetadataBuilder(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Similar to [`OfferBuilder::new`] except, if [`OfferBuilder::path`] is called, the signing + * pubkey is derived from the given [`ExpandedKey`] and [`EntropySource`]. This provides + * recipient privacy by using a different signing pubkey for each offer. Otherwise, the + * provided `node_id` is used for the signing pubkey. + * + * Also, sets the metadata when [`OfferBuilder::build`] is called such that it can be used by + * [`InvoiceRequest::verify`] to determine if the request was produced for the offer given an + * [`ExpandedKey`]. + * + * [`InvoiceRequest::verify`]: crate::offers::invoice_request::InvoiceRequest::verify + * [`ExpandedKey`]: crate::ln::inbound_payment::ExpandedKey + */ + public static OfferWithDerivedMetadataBuilder deriving_signing_pubkey(byte[] node_id, org.ldk.structs.ExpandedKey expanded_key, org.ldk.structs.EntropySource entropy_source) { + long ret = bindings.OfferWithDerivedMetadataBuilder_deriving_signing_pubkey(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), expanded_key.ptr, entropy_source.ptr); + GC.KeepAlive(node_id); + GC.KeepAlive(expanded_key); + GC.KeepAlive(entropy_source); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OfferWithDerivedMetadataBuilder ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferWithDerivedMetadataBuilder(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(expanded_key); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(entropy_source); }; + return ret_hu_conv; + } + + /** + * Adds the chain hash of the given [`Network`] to [`Offer::chains`]. If not called, + * the chain hash of [`Network::Bitcoin`] is assumed to be the only one supported. + * + * See [`Offer::chains`] on how this relates to the payment currency. + * + * Successive calls to this method will add another chain hash. + */ + public void chain(Network network) { + bindings.OfferWithDerivedMetadataBuilder_chain(this.ptr, network); + GC.KeepAlive(this); + GC.KeepAlive(network); + if (this != null) { this.ptrs_to.AddLast(this); }; + } + + /** + * Sets the [`Offer::amount`] as an [`Amount::Bitcoin`]. + * + * Successive calls to this method will override the previous setting. + */ + public void amount_msats(long amount_msats) { + bindings.OfferWithDerivedMetadataBuilder_amount_msats(this.ptr, amount_msats); + GC.KeepAlive(this); + GC.KeepAlive(amount_msats); + if (this != null) { this.ptrs_to.AddLast(this); }; + } + + /** + * Sets the [`Offer::absolute_expiry`] as seconds since the Unix epoch. Any expiry that has + * already passed is valid and can be checked for using [`Offer::is_expired`]. + * + * Successive calls to this method will override the previous setting. + */ + public void absolute_expiry(long absolute_expiry) { + bindings.OfferWithDerivedMetadataBuilder_absolute_expiry(this.ptr, absolute_expiry); + GC.KeepAlive(this); + GC.KeepAlive(absolute_expiry); + if (this != null) { this.ptrs_to.AddLast(this); }; + } + + /** + * Sets the [`Offer::description`]. + * + * Successive calls to this method will override the previous setting. + */ + public void description(string description) { + bindings.OfferWithDerivedMetadataBuilder_description(this.ptr, InternalUtils.encodeString(description)); + GC.KeepAlive(this); + GC.KeepAlive(description); + if (this != null) { this.ptrs_to.AddLast(this); }; + } + + /** + * Sets the [`Offer::issuer`]. + * + * Successive calls to this method will override the previous setting. + */ + public void issuer(string issuer) { + bindings.OfferWithDerivedMetadataBuilder_issuer(this.ptr, InternalUtils.encodeString(issuer)); + GC.KeepAlive(this); + GC.KeepAlive(issuer); + if (this != null) { this.ptrs_to.AddLast(this); }; + } + + /** + * Adds a blinded path to [`Offer::paths`]. Must include at least one path if only connected by + * private channels or if [`Offer::signing_pubkey`] is not a public node id. + * + * Successive calls to this method will add another blinded path. Caller is responsible for not + * adding duplicate paths. + */ + public void path(org.ldk.structs.BlindedPath path) { + bindings.OfferWithDerivedMetadataBuilder_path(this.ptr, path.ptr); + GC.KeepAlive(this); + GC.KeepAlive(path); + if (this != null) { this.ptrs_to.AddLast(path); }; + if (this != null) { this.ptrs_to.AddLast(this); }; + } + + /** + * Sets the quantity of items for [`Offer::supported_quantity`]. If not called, defaults to + * [`Quantity::One`]. + * + * Successive calls to this method will override the previous setting. + */ + public void supported_quantity(org.ldk.structs.Quantity quantity) { + bindings.OfferWithDerivedMetadataBuilder_supported_quantity(this.ptr, quantity.ptr); + GC.KeepAlive(this); + GC.KeepAlive(quantity); + if (this != null) { this.ptrs_to.AddLast(quantity); }; + if (this != null) { this.ptrs_to.AddLast(this); }; + } + + /** + * Builds an [`Offer`] from the builder's settings. + */ + public Result_OfferBolt12SemanticErrorZ build() { + long ret = bindings.OfferWithDerivedMetadataBuilder_build(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OfferBolt12SemanticErrorZ ret_hu_conv = Result_OfferBolt12SemanticErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/OfferWithExplicitMetadataBuilder.cs b/c_sharp/src/org/ldk/structs/OfferWithExplicitMetadataBuilder.cs new file mode 100644 index 00000000..23dfa87d --- /dev/null +++ b/c_sharp/src/org/ldk/structs/OfferWithExplicitMetadataBuilder.cs @@ -0,0 +1,184 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + + +/** + * Builds an [`Offer`] for the \"offer to be paid\" flow. + * + * See [module-level documentation] for usage. + * + * [module-level documentation]: self + */ +public class OfferWithExplicitMetadataBuilder : CommonBase { + internal OfferWithExplicitMetadataBuilder(object _dummy, long ptr) : base(ptr) { } + ~OfferWithExplicitMetadataBuilder() { + if (ptr != 0) { bindings.OfferWithExplicitMetadataBuilder_free(ptr); } + } + + internal long clone_ptr() { + long ret = bindings.OfferWithExplicitMetadataBuilder_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a copy of the OfferWithExplicitMetadataBuilder + */ + public OfferWithExplicitMetadataBuilder clone() { + long ret = bindings.OfferWithExplicitMetadataBuilder_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OfferWithExplicitMetadataBuilder ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferWithExplicitMetadataBuilder(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Creates a new builder for an offer using the [`Offer::signing_pubkey`] for signing invoices. + * The associated secret key must be remembered while the offer is valid. + * + * Use a different pubkey per offer to avoid correlating offers. + * + * # Note + * + * If constructing an [`Offer`] for use with a [`ChannelManager`], use + * [`ChannelManager::create_offer_builder`] instead of [`OfferBuilder::new`]. + * + * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager + * [`ChannelManager::create_offer_builder`]: crate::ln::channelmanager::ChannelManager::create_offer_builder + */ + public static OfferWithExplicitMetadataBuilder of(byte[] signing_pubkey) { + long ret = bindings.OfferWithExplicitMetadataBuilder_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(signing_pubkey, 33))); + GC.KeepAlive(signing_pubkey); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OfferWithExplicitMetadataBuilder ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferWithExplicitMetadataBuilder(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Sets the [`Offer::metadata`] to the given bytes. + * + * Successive calls to this method will override the previous setting. + */ + public Result_NoneBolt12SemanticErrorZ metadata(byte[] metadata) { + long ret = bindings.OfferWithExplicitMetadataBuilder_metadata(this.ptr, InternalUtils.encodeUint8Array(metadata)); + GC.KeepAlive(this); + GC.KeepAlive(metadata); + if (ret >= 0 && ret <= 4096) { return null; } + Result_NoneBolt12SemanticErrorZ ret_hu_conv = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Adds the chain hash of the given [`Network`] to [`Offer::chains`]. If not called, + * the chain hash of [`Network::Bitcoin`] is assumed to be the only one supported. + * + * See [`Offer::chains`] on how this relates to the payment currency. + * + * Successive calls to this method will add another chain hash. + */ + public void chain(Network network) { + bindings.OfferWithExplicitMetadataBuilder_chain(this.ptr, network); + GC.KeepAlive(this); + GC.KeepAlive(network); + if (this != null) { this.ptrs_to.AddLast(this); }; + } + + /** + * Sets the [`Offer::amount`] as an [`Amount::Bitcoin`]. + * + * Successive calls to this method will override the previous setting. + */ + public void amount_msats(long amount_msats) { + bindings.OfferWithExplicitMetadataBuilder_amount_msats(this.ptr, amount_msats); + GC.KeepAlive(this); + GC.KeepAlive(amount_msats); + if (this != null) { this.ptrs_to.AddLast(this); }; + } + + /** + * Sets the [`Offer::absolute_expiry`] as seconds since the Unix epoch. Any expiry that has + * already passed is valid and can be checked for using [`Offer::is_expired`]. + * + * Successive calls to this method will override the previous setting. + */ + public void absolute_expiry(long absolute_expiry) { + bindings.OfferWithExplicitMetadataBuilder_absolute_expiry(this.ptr, absolute_expiry); + GC.KeepAlive(this); + GC.KeepAlive(absolute_expiry); + if (this != null) { this.ptrs_to.AddLast(this); }; + } + + /** + * Sets the [`Offer::description`]. + * + * Successive calls to this method will override the previous setting. + */ + public void description(string description) { + bindings.OfferWithExplicitMetadataBuilder_description(this.ptr, InternalUtils.encodeString(description)); + GC.KeepAlive(this); + GC.KeepAlive(description); + if (this != null) { this.ptrs_to.AddLast(this); }; + } + + /** + * Sets the [`Offer::issuer`]. + * + * Successive calls to this method will override the previous setting. + */ + public void issuer(string issuer) { + bindings.OfferWithExplicitMetadataBuilder_issuer(this.ptr, InternalUtils.encodeString(issuer)); + GC.KeepAlive(this); + GC.KeepAlive(issuer); + if (this != null) { this.ptrs_to.AddLast(this); }; + } + + /** + * Adds a blinded path to [`Offer::paths`]. Must include at least one path if only connected by + * private channels or if [`Offer::signing_pubkey`] is not a public node id. + * + * Successive calls to this method will add another blinded path. Caller is responsible for not + * adding duplicate paths. + */ + public void path(org.ldk.structs.BlindedPath path) { + bindings.OfferWithExplicitMetadataBuilder_path(this.ptr, path.ptr); + GC.KeepAlive(this); + GC.KeepAlive(path); + if (this != null) { this.ptrs_to.AddLast(path); }; + if (this != null) { this.ptrs_to.AddLast(this); }; + } + + /** + * Sets the quantity of items for [`Offer::supported_quantity`]. If not called, defaults to + * [`Quantity::One`]. + * + * Successive calls to this method will override the previous setting. + */ + public void supported_quantity(org.ldk.structs.Quantity quantity) { + bindings.OfferWithExplicitMetadataBuilder_supported_quantity(this.ptr, quantity.ptr); + GC.KeepAlive(this); + GC.KeepAlive(quantity); + if (this != null) { this.ptrs_to.AddLast(quantity); }; + if (this != null) { this.ptrs_to.AddLast(this); }; + } + + /** + * Builds an [`Offer`] from the builder's settings. + */ + public Result_OfferBolt12SemanticErrorZ build() { + long ret = bindings.OfferWithExplicitMetadataBuilder_build(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OfferBolt12SemanticErrorZ ret_hu_conv = Result_OfferBolt12SemanticErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/OffersMessage.cs b/c_sharp/src/org/ldk/structs/OffersMessage.cs index 4f146f1e..f5e7b8b8 100644 --- a/c_sharp/src/org/ldk/structs/OffersMessage.cs +++ b/c_sharp/src/org/ldk/structs/OffersMessage.cs @@ -79,7 +79,7 @@ public class OffersMessage : CommonBase { * Utility method to constructs a new InvoiceRequest-variant OffersMessage */ public static OffersMessage invoice_request(org.ldk.structs.InvoiceRequest a) { - long ret = bindings.OffersMessage_invoice_request(a == null ? 0 : a.ptr); + long ret = bindings.OffersMessage_invoice_request(a.ptr); GC.KeepAlive(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.OffersMessage ret_hu_conv = org.ldk.structs.OffersMessage.constr_from_ptr(ret); @@ -92,7 +92,7 @@ public class OffersMessage : CommonBase { * Utility method to constructs a new Invoice-variant OffersMessage */ public static OffersMessage invoice(org.ldk.structs.Bolt12Invoice a) { - long ret = bindings.OffersMessage_invoice(a == null ? 0 : a.ptr); + long ret = bindings.OffersMessage_invoice(a.ptr); GC.KeepAlive(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.OffersMessage ret_hu_conv = org.ldk.structs.OffersMessage.constr_from_ptr(ret); @@ -105,7 +105,7 @@ public class OffersMessage : CommonBase { * Utility method to constructs a new InvoiceError-variant OffersMessage */ public static OffersMessage invoice_error(org.ldk.structs.InvoiceError a) { - long ret = bindings.OffersMessage_invoice_error(a == null ? 0 : a.ptr); + long ret = bindings.OffersMessage_invoice_error(a.ptr); GC.KeepAlive(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.OffersMessage ret_hu_conv = org.ldk.structs.OffersMessage.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/OffersMessageHandler.cs b/c_sharp/src/org/ldk/structs/OffersMessageHandler.cs index 09ccab93..3197fcc6 100644 --- a/c_sharp/src/org/ldk/structs/OffersMessageHandler.cs +++ b/c_sharp/src/org/ldk/structs/OffersMessageHandler.cs @@ -50,14 +50,14 @@ public class OffersMessageHandler : CommonBase { if (_message_hu_conv != null) { _message_hu_conv.ptrs_to.AddLast(this); }; Option_OffersMessageZ ret = arg.handle_message(_message_hu_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); if (impl_holder.held != null) { impl_holder.held.ptrs_to.AddLast(ret); }; return result; } public long release_pending_messages() { ThreeTuple_OffersMessageDestinationBlindedPathZ[] ret = arg.release_pending_messages(); GC.KeepAlive(arg); - long result = InternalUtils.encodeUint64Array(InternalUtils.mapArray(ret, ret_conv_49 => ret_conv_49 == null ? 0 : ret_conv_49.clone_ptr())); + long result = InternalUtils.encodeUint64Array(InternalUtils.mapArray(ret, ret_conv_49 => ret_conv_49.clone_ptr())); return result; } } diff --git a/c_sharp/src/org/ldk/structs/OnionMessage.cs b/c_sharp/src/org/ldk/structs/OnionMessage.cs index c7e1d4ab..5a809be7 100644 --- a/c_sharp/src/org/ldk/structs/OnionMessage.cs +++ b/c_sharp/src/org/ldk/structs/OnionMessage.cs @@ -51,7 +51,7 @@ public class OnionMessage : CommonBase { * The full onion packet including hop data, pubkey, and hmac */ public void set_onion_routing_packet(org.ldk.structs.Packet val) { - bindings.OnionMessage_set_onion_routing_packet(this.ptr, val == null ? 0 : val.ptr); + bindings.OnionMessage_set_onion_routing_packet(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -61,7 +61,7 @@ public class OnionMessage : CommonBase { * Constructs a new OnionMessage given each field */ public static OnionMessage of(byte[] blinding_point_arg, org.ldk.structs.Packet onion_routing_packet_arg) { - long ret = bindings.OnionMessage_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(blinding_point_arg, 33)), onion_routing_packet_arg == null ? 0 : onion_routing_packet_arg.ptr); + long ret = bindings.OnionMessage_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(blinding_point_arg, 33)), onion_routing_packet_arg.ptr); GC.KeepAlive(blinding_point_arg); GC.KeepAlive(onion_routing_packet_arg); if (ret >= 0 && ret <= 4096) { return null; } @@ -107,7 +107,7 @@ public class OnionMessage : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.OnionMessage b) { - bool ret = bindings.OnionMessage_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.OnionMessage_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/OnionMessageHandler.cs b/c_sharp/src/org/ldk/structs/OnionMessageHandler.cs index 30dccb5b..b75211ea 100644 --- a/c_sharp/src/org/ldk/structs/OnionMessageHandler.cs +++ b/c_sharp/src/org/ldk/structs/OnionMessageHandler.cs @@ -77,7 +77,7 @@ public class OnionMessageHandler : CommonBase { public long get_and_clear_connections_needed() { TwoTuple_PublicKeyCVec_SocketAddressZZ[] ret = arg.get_and_clear_connections_needed(); GC.KeepAlive(arg); - long result = InternalUtils.encodeUint64Array(InternalUtils.mapArray(ret, ret_conv_40 => ret_conv_40 == null ? 0 : ret_conv_40.clone_ptr())); + long result = InternalUtils.encodeUint64Array(InternalUtils.mapArray(ret, ret_conv_40 => ret_conv_40.clone_ptr())); return result; } public void handle_onion_message(long _peer_node_id, long _msg) { @@ -98,7 +98,7 @@ public class OnionMessageHandler : CommonBase { org.ldk.structs.Init _init_hu_conv = null; if (_init < 0 || _init > 4096) { _init_hu_conv = new org.ldk.structs.Init(null, _init); } Result_NoneNoneZ ret = arg.peer_connected(_their_node_id_conv, _init_hu_conv, _inbound); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public void peer_disconnected(long _their_node_id) { @@ -113,14 +113,14 @@ public class OnionMessageHandler : CommonBase { public long provided_node_features() { NodeFeatures ret = arg.provided_node_features(); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long provided_init_features(long _their_node_id) { byte[] _their_node_id_conv = InternalUtils.decodeUint8Array(_their_node_id); InitFeatures ret = arg.provided_init_features(_their_node_id_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } } @@ -166,7 +166,7 @@ public class OnionMessageHandler : CommonBase { * Handle an incoming `onion_message` message from the given peer. */ public void handle_onion_message(byte[] peer_node_id, org.ldk.structs.OnionMessage msg) { - bindings.OnionMessageHandler_handle_onion_message(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(peer_node_id, 33)), msg == null ? 0 : msg.ptr); + bindings.OnionMessageHandler_handle_onion_message(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(peer_node_id, 33)), msg.ptr); GC.KeepAlive(this); GC.KeepAlive(peer_node_id); GC.KeepAlive(msg); @@ -197,7 +197,7 @@ public class OnionMessageHandler : CommonBase { * message handlers may still wish to communicate with this peer. */ public Result_NoneNoneZ peer_connected(byte[] their_node_id, org.ldk.structs.Init init, bool inbound) { - long ret = bindings.OnionMessageHandler_peer_connected(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), init == null ? 0 : init.ptr, inbound); + long ret = bindings.OnionMessageHandler_peer_connected(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), init.ptr, inbound); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(init); diff --git a/c_sharp/src/org/ldk/structs/OnionMessagePath.cs b/c_sharp/src/org/ldk/structs/OnionMessagePath.cs index f7d573a4..8c825a43 100644 --- a/c_sharp/src/org/ldk/structs/OnionMessagePath.cs +++ b/c_sharp/src/org/ldk/structs/OnionMessagePath.cs @@ -132,6 +132,8 @@ public class OnionMessagePath : CommonBase { /** * Returns the first node in the path. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ public byte[] first_node() { long ret = bindings.OnionMessagePath_first_node(this.ptr); diff --git a/c_sharp/src/org/ldk/structs/OnionMessenger.cs b/c_sharp/src/org/ldk/structs/OnionMessenger.cs index 3bf8b6df..56e89563 100644 --- a/c_sharp/src/org/ldk/structs/OnionMessenger.cs +++ b/c_sharp/src/org/ldk/structs/OnionMessenger.cs @@ -30,7 +30,7 @@ namespace org { namespace ldk { namespace structs { * # use bitcoin::hashes::_export::_core::time::Duration; * # use bitcoin::hashes::hex::FromHex; * # use bitcoin::secp256k1::{PublicKey, Secp256k1, SecretKey, self}; - * # use lightning::blinded_path::BlindedPath; + * # use lightning::blinded_path::{BlindedPath, EmptyNodeIdLookUp}; * # use lightning::sign::{EntropySource, KeysManager}; * # use lightning::ln::peer_handler::IgnoringMessageHandler; * # use lightning::onion_message::messenger::{Destination, MessageRouter, OnionMessagePath, OnionMessenger}; @@ -71,14 +71,15 @@ namespace org { namespace ldk { namespace structs { * # let hop_node_id1 = PublicKey::from_secret_key(&secp_ctx, &node_secret); * # let (hop_node_id3, hop_node_id4) = (hop_node_id1, hop_node_id1); * # let destination_node_id = hop_node_id1; + * # let node_id_lookup = EmptyNodeIdLookUp {}; * # let message_router = Arc::new(FakeMessageRouter {}); * # let custom_message_handler = IgnoringMessageHandler {}; * # let offers_message_handler = IgnoringMessageHandler {}; * Create the onion messenger. This must use the same `keys_manager` as is passed to your * ChannelManager. * let onion_messenger = OnionMessenger::new( - * &keys_manager, &keys_manager, logger, message_router, &offers_message_handler, - * &custom_message_handler + * &keys_manager, &keys_manager, logger, &node_id_lookup, message_router, + * &offers_message_handler, &custom_message_handler * ); * * # #[derive(Debug, Clone)] @@ -126,11 +127,12 @@ public class OnionMessenger : CommonBase { * Constructs a new `OnionMessenger` to send, forward, and delegate received onion messages to * their respective handlers. */ - public static OnionMessenger of(org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.structs.MessageRouter message_router, org.ldk.structs.OffersMessageHandler offers_handler, org.ldk.structs.CustomOnionMessageHandler custom_handler) { - long ret = bindings.OnionMessenger_new(entropy_source.ptr, node_signer.ptr, logger.ptr, message_router.ptr, offers_handler.ptr, custom_handler.ptr); + public static OnionMessenger of(org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.structs.NodeIdLookUp node_id_lookup, org.ldk.structs.MessageRouter message_router, org.ldk.structs.OffersMessageHandler offers_handler, org.ldk.structs.CustomOnionMessageHandler custom_handler) { + long ret = bindings.OnionMessenger_new(entropy_source.ptr, node_signer.ptr, logger.ptr, node_id_lookup.ptr, message_router.ptr, offers_handler.ptr, custom_handler.ptr); GC.KeepAlive(entropy_source); GC.KeepAlive(node_signer); GC.KeepAlive(logger); + GC.KeepAlive(node_id_lookup); GC.KeepAlive(message_router); GC.KeepAlive(offers_handler); GC.KeepAlive(custom_handler); @@ -140,6 +142,7 @@ public class OnionMessenger : CommonBase { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(entropy_source); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(node_signer); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(logger); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(node_id_lookup); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(message_router); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(offers_handler); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(custom_handler); }; diff --git a/c_sharp/src/org/ldk/structs/OnionPacket.cs b/c_sharp/src/org/ldk/structs/OnionPacket.cs index 06585339..d459051b 100644 --- a/c_sharp/src/org/ldk/structs/OnionPacket.cs +++ b/c_sharp/src/org/ldk/structs/OnionPacket.cs @@ -58,7 +58,7 @@ public class OnionPacket : CommonBase { * like. */ public void set_public_key(org.ldk.structs.Result_PublicKeySecp256k1ErrorZ val) { - bindings.OnionPacket_set_public_key(this.ptr, val != null ? val.ptr : 0); + bindings.OnionPacket_set_public_key(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); } @@ -119,7 +119,7 @@ public class OnionPacket : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.OnionPacket b) { - bool ret = bindings.OnionPacket_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.OnionPacket_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/OpenChannel.cs b/c_sharp/src/org/ldk/structs/OpenChannel.cs index f46844fb..418bc33e 100644 --- a/c_sharp/src/org/ldk/structs/OpenChannel.cs +++ b/c_sharp/src/org/ldk/structs/OpenChannel.cs @@ -20,61 +20,25 @@ public class OpenChannel : CommonBase { } /** - * The genesis hash of the blockchain where the channel is to be opened + * Common fields of `open_channel(2)`-like messages */ - public byte[] get_chain_hash() { - long ret = bindings.OpenChannel_get_chain_hash(this.ptr); + public CommonOpenChannelFields get_common_fields() { + long ret = bindings.OpenChannel_get_common_fields(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; - } - - /** - * The genesis hash of the blockchain where the channel is to be opened - */ - public void set_chain_hash(byte[] val) { - bindings.OpenChannel_set_chain_hash(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * A temporary channel ID, until the funding outpoint is announced - */ - public byte[] get_temporary_channel_id() { - long ret = bindings.OpenChannel_get_temporary_channel_id(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; - } - - /** - * A temporary channel ID, until the funding outpoint is announced - */ - public void set_temporary_channel_id(byte[] val) { - bindings.OpenChannel_set_temporary_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * The channel value - */ - public long get_funding_satoshis() { - long ret = bindings.OpenChannel_get_funding_satoshis(this.ptr); - GC.KeepAlive(this); - return ret; + org.ldk.structs.CommonOpenChannelFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommonOpenChannelFields(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** - * The channel value + * Common fields of `open_channel(2)`-like messages */ - public void set_funding_satoshis(long val) { - bindings.OpenChannel_set_funding_satoshis(this.ptr, val); + public void set_common_fields(org.ldk.structs.CommonOpenChannelFields val) { + bindings.OpenChannel_set_common_fields(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** @@ -95,42 +59,6 @@ public class OpenChannel : CommonBase { GC.KeepAlive(val); } - /** - * The threshold below which outputs on transactions broadcast by sender will be omitted - */ - public long get_dust_limit_satoshis() { - long ret = bindings.OpenChannel_get_dust_limit_satoshis(this.ptr); - GC.KeepAlive(this); - return ret; - } - - /** - * The threshold below which outputs on transactions broadcast by sender will be omitted - */ - public void set_dust_limit_satoshis(long val) { - bindings.OpenChannel_set_dust_limit_satoshis(this.ptr, val); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * The maximum inbound HTLC value in flight towards sender, in milli-satoshi - */ - public long get_max_htlc_value_in_flight_msat() { - long ret = bindings.OpenChannel_get_max_htlc_value_in_flight_msat(this.ptr); - GC.KeepAlive(this); - return ret; - } - - /** - * The maximum inbound HTLC value in flight towards sender, in milli-satoshi - */ - public void set_max_htlc_value_in_flight_msat(long val) { - bindings.OpenChannel_set_max_htlc_value_in_flight_msat(this.ptr, val); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - /** * The minimum value unencumbered by HTLCs for the counterparty to keep in the channel */ @@ -149,306 +77,18 @@ public class OpenChannel : CommonBase { GC.KeepAlive(val); } - /** - * The minimum HTLC size incoming to sender, in milli-satoshi - */ - public long get_htlc_minimum_msat() { - long ret = bindings.OpenChannel_get_htlc_minimum_msat(this.ptr); - GC.KeepAlive(this); - return ret; - } - - /** - * The minimum HTLC size incoming to sender, in milli-satoshi - */ - public void set_htlc_minimum_msat(long val) { - bindings.OpenChannel_set_htlc_minimum_msat(this.ptr, val); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * The feerate per 1000-weight of sender generated transactions, until updated by - * [`UpdateFee`] - */ - public int get_feerate_per_kw() { - int ret = bindings.OpenChannel_get_feerate_per_kw(this.ptr); - GC.KeepAlive(this); - return ret; - } - - /** - * The feerate per 1000-weight of sender generated transactions, until updated by - * [`UpdateFee`] - */ - public void set_feerate_per_kw(int val) { - bindings.OpenChannel_set_feerate_per_kw(this.ptr, val); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * The number of blocks which the counterparty will have to wait to claim on-chain funds if - * they broadcast a commitment transaction - */ - public short get_to_self_delay() { - short ret = bindings.OpenChannel_get_to_self_delay(this.ptr); - GC.KeepAlive(this); - return ret; - } - - /** - * The number of blocks which the counterparty will have to wait to claim on-chain funds if - * they broadcast a commitment transaction - */ - public void set_to_self_delay(short val) { - bindings.OpenChannel_set_to_self_delay(this.ptr, val); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * The maximum number of inbound HTLCs towards sender - */ - public short get_max_accepted_htlcs() { - short ret = bindings.OpenChannel_get_max_accepted_htlcs(this.ptr); - GC.KeepAlive(this); - return ret; - } - - /** - * The maximum number of inbound HTLCs towards sender - */ - public void set_max_accepted_htlcs(short val) { - bindings.OpenChannel_set_max_accepted_htlcs(this.ptr, val); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * The sender's key controlling the funding transaction - */ - public byte[] get_funding_pubkey() { - long ret = bindings.OpenChannel_get_funding_pubkey(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; - } - - /** - * The sender's key controlling the funding transaction - */ - public void set_funding_pubkey(byte[] val) { - bindings.OpenChannel_set_funding_pubkey(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * Used to derive a revocation key for transactions broadcast by counterparty - */ - public byte[] get_revocation_basepoint() { - long ret = bindings.OpenChannel_get_revocation_basepoint(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; - } - - /** - * Used to derive a revocation key for transactions broadcast by counterparty - */ - public void set_revocation_basepoint(byte[] val) { - bindings.OpenChannel_set_revocation_basepoint(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * A payment key to sender for transactions broadcast by counterparty - */ - public byte[] get_payment_point() { - long ret = bindings.OpenChannel_get_payment_point(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; - } - - /** - * A payment key to sender for transactions broadcast by counterparty - */ - public void set_payment_point(byte[] val) { - bindings.OpenChannel_set_payment_point(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * Used to derive a payment key to sender for transactions broadcast by sender - */ - public byte[] get_delayed_payment_basepoint() { - long ret = bindings.OpenChannel_get_delayed_payment_basepoint(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; - } - - /** - * Used to derive a payment key to sender for transactions broadcast by sender - */ - public void set_delayed_payment_basepoint(byte[] val) { - bindings.OpenChannel_set_delayed_payment_basepoint(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * Used to derive an HTLC payment key to sender - */ - public byte[] get_htlc_basepoint() { - long ret = bindings.OpenChannel_get_htlc_basepoint(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; - } - - /** - * Used to derive an HTLC payment key to sender - */ - public void set_htlc_basepoint(byte[] val) { - bindings.OpenChannel_set_htlc_basepoint(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * The first to-be-broadcast-by-sender transaction's per commitment point - */ - public byte[] get_first_per_commitment_point() { - long ret = bindings.OpenChannel_get_first_per_commitment_point(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; - } - - /** - * The first to-be-broadcast-by-sender transaction's per commitment point - */ - public void set_first_per_commitment_point(byte[] val) { - bindings.OpenChannel_set_first_per_commitment_point(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * The channel flags to be used - */ - public byte get_channel_flags() { - byte ret = bindings.OpenChannel_get_channel_flags(this.ptr); - GC.KeepAlive(this); - return ret; - } - - /** - * The channel flags to be used - */ - public void set_channel_flags(byte val) { - bindings.OpenChannel_set_channel_flags(this.ptr, val); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * A request to pre-set the to-sender output's `scriptPubkey` for when we collaboratively close - */ - public Option_CVec_u8ZZ get_shutdown_scriptpubkey() { - long ret = bindings.OpenChannel_get_shutdown_scriptpubkey(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Option_CVec_u8ZZ ret_hu_conv = org.ldk.structs.Option_CVec_u8ZZ.constr_from_ptr(ret); - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; - return ret_hu_conv; - } - - /** - * A request to pre-set the to-sender output's `scriptPubkey` for when we collaboratively close - */ - public void set_shutdown_scriptpubkey(org.ldk.structs.Option_CVec_u8ZZ val) { - bindings.OpenChannel_set_shutdown_scriptpubkey(this.ptr, val.ptr); - GC.KeepAlive(this); - GC.KeepAlive(val); - if (this != null) { this.ptrs_to.AddLast(val); }; - } - - /** - * The channel type that this channel will represent - * - * If this is `None`, we derive the channel type from the intersection of our - * feature bits with our counterparty's feature bits from the [`Init`] message. - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None - */ - public ChannelTypeFeatures get_channel_type() { - long ret = bindings.OpenChannel_get_channel_type(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.ChannelTypeFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelTypeFeatures(null, ret); } - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; - return ret_hu_conv; - } - - /** - * The channel type that this channel will represent - * - * If this is `None`, we derive the channel type from the intersection of our - * feature bits with our counterparty's feature bits from the [`Init`] message. - * - * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None - */ - public void set_channel_type(org.ldk.structs.ChannelTypeFeatures val) { - bindings.OpenChannel_set_channel_type(this.ptr, val == null ? 0 : val.ptr); - GC.KeepAlive(this); - GC.KeepAlive(val); - if (this != null) { this.ptrs_to.AddLast(val); }; - } - /** * Constructs a new OpenChannel given each field - * - * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public static OpenChannel of(byte[] chain_hash_arg, byte[] temporary_channel_id_arg, long funding_satoshis_arg, long push_msat_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long channel_reserve_satoshis_arg, long htlc_minimum_msat_arg, int feerate_per_kw_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_point_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, byte channel_flags_arg, org.ldk.structs.Option_CVec_u8ZZ shutdown_scriptpubkey_arg, org.ldk.structs.ChannelTypeFeatures channel_type_arg) { - long ret = bindings.OpenChannel_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(chain_hash_arg, 32)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(temporary_channel_id_arg, 32)), funding_satoshis_arg, push_msat_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, feerate_per_kw_arg, to_self_delay_arg, max_accepted_htlcs_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(funding_pubkey_arg, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(revocation_basepoint_arg, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_point_arg, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(delayed_payment_basepoint_arg, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(htlc_basepoint_arg, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(first_per_commitment_point_arg, 33)), channel_flags_arg, shutdown_scriptpubkey_arg.ptr, channel_type_arg == null ? 0 : channel_type_arg.ptr); - GC.KeepAlive(chain_hash_arg); - GC.KeepAlive(temporary_channel_id_arg); - GC.KeepAlive(funding_satoshis_arg); + public static OpenChannel of(org.ldk.structs.CommonOpenChannelFields common_fields_arg, long push_msat_arg, long channel_reserve_satoshis_arg) { + long ret = bindings.OpenChannel_new(common_fields_arg.ptr, push_msat_arg, channel_reserve_satoshis_arg); + GC.KeepAlive(common_fields_arg); GC.KeepAlive(push_msat_arg); - GC.KeepAlive(dust_limit_satoshis_arg); - GC.KeepAlive(max_htlc_value_in_flight_msat_arg); GC.KeepAlive(channel_reserve_satoshis_arg); - GC.KeepAlive(htlc_minimum_msat_arg); - GC.KeepAlive(feerate_per_kw_arg); - GC.KeepAlive(to_self_delay_arg); - GC.KeepAlive(max_accepted_htlcs_arg); - GC.KeepAlive(funding_pubkey_arg); - GC.KeepAlive(revocation_basepoint_arg); - GC.KeepAlive(payment_point_arg); - GC.KeepAlive(delayed_payment_basepoint_arg); - GC.KeepAlive(htlc_basepoint_arg); - GC.KeepAlive(first_per_commitment_point_arg); - GC.KeepAlive(channel_flags_arg); - GC.KeepAlive(shutdown_scriptpubkey_arg); - GC.KeepAlive(channel_type_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.OpenChannel ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OpenChannel(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(shutdown_scriptpubkey_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_type_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(common_fields_arg); }; return ret_hu_conv; } @@ -488,7 +128,7 @@ public class OpenChannel : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.OpenChannel b) { - bool ret = bindings.OpenChannel_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.OpenChannel_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/OpenChannelV2.cs b/c_sharp/src/org/ldk/structs/OpenChannelV2.cs index ec182be2..73689945 100644 --- a/c_sharp/src/org/ldk/structs/OpenChannelV2.cs +++ b/c_sharp/src/org/ldk/structs/OpenChannelV2.cs @@ -18,43 +18,25 @@ public class OpenChannelV2 : CommonBase { } /** - * The genesis hash of the blockchain where the channel is to be opened + * Common fields of `open_channel(2)`-like messages */ - public byte[] get_chain_hash() { - long ret = bindings.OpenChannelV2_get_chain_hash(this.ptr); + public CommonOpenChannelFields get_common_fields() { + long ret = bindings.OpenChannelV2_get_common_fields(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; - } - - /** - * The genesis hash of the blockchain where the channel is to be opened - */ - public void set_chain_hash(byte[] val) { - bindings.OpenChannelV2_set_chain_hash(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * A temporary channel ID derived using a zeroed out value for the channel acceptor's revocation basepoint - */ - public byte[] get_temporary_channel_id() { - long ret = bindings.OpenChannelV2_get_temporary_channel_id(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + org.ldk.structs.CommonOpenChannelFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommonOpenChannelFields(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** - * A temporary channel ID derived using a zeroed out value for the channel acceptor's revocation basepoint + * Common fields of `open_channel(2)`-like messages */ - public void set_temporary_channel_id(byte[] val) { - bindings.OpenChannelV2_set_temporary_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + public void set_common_fields(org.ldk.structs.CommonOpenChannelFields val) { + bindings.OpenChannelV2_set_common_fields(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** @@ -75,136 +57,6 @@ public class OpenChannelV2 : CommonBase { GC.KeepAlive(val); } - /** - * The feerate for the commitment transaction set by the channel initiator - */ - public int get_commitment_feerate_sat_per_1000_weight() { - int ret = bindings.OpenChannelV2_get_commitment_feerate_sat_per_1000_weight(this.ptr); - GC.KeepAlive(this); - return ret; - } - - /** - * The feerate for the commitment transaction set by the channel initiator - */ - public void set_commitment_feerate_sat_per_1000_weight(int val) { - bindings.OpenChannelV2_set_commitment_feerate_sat_per_1000_weight(this.ptr, val); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * Part of the channel value contributed by the channel initiator - */ - public long get_funding_satoshis() { - long ret = bindings.OpenChannelV2_get_funding_satoshis(this.ptr); - GC.KeepAlive(this); - return ret; - } - - /** - * Part of the channel value contributed by the channel initiator - */ - public void set_funding_satoshis(long val) { - bindings.OpenChannelV2_set_funding_satoshis(this.ptr, val); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * The threshold below which outputs on transactions broadcast by the channel initiator will be - * omitted - */ - public long get_dust_limit_satoshis() { - long ret = bindings.OpenChannelV2_get_dust_limit_satoshis(this.ptr); - GC.KeepAlive(this); - return ret; - } - - /** - * The threshold below which outputs on transactions broadcast by the channel initiator will be - * omitted - */ - public void set_dust_limit_satoshis(long val) { - bindings.OpenChannelV2_set_dust_limit_satoshis(this.ptr, val); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * The maximum inbound HTLC value in flight towards channel initiator, in milli-satoshi - */ - public long get_max_htlc_value_in_flight_msat() { - long ret = bindings.OpenChannelV2_get_max_htlc_value_in_flight_msat(this.ptr); - GC.KeepAlive(this); - return ret; - } - - /** - * The maximum inbound HTLC value in flight towards channel initiator, in milli-satoshi - */ - public void set_max_htlc_value_in_flight_msat(long val) { - bindings.OpenChannelV2_set_max_htlc_value_in_flight_msat(this.ptr, val); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * The minimum HTLC size incoming to channel initiator, in milli-satoshi - */ - public long get_htlc_minimum_msat() { - long ret = bindings.OpenChannelV2_get_htlc_minimum_msat(this.ptr); - GC.KeepAlive(this); - return ret; - } - - /** - * The minimum HTLC size incoming to channel initiator, in milli-satoshi - */ - public void set_htlc_minimum_msat(long val) { - bindings.OpenChannelV2_set_htlc_minimum_msat(this.ptr, val); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * The number of blocks which the counterparty will have to wait to claim on-chain funds if they - * broadcast a commitment transaction - */ - public short get_to_self_delay() { - short ret = bindings.OpenChannelV2_get_to_self_delay(this.ptr); - GC.KeepAlive(this); - return ret; - } - - /** - * The number of blocks which the counterparty will have to wait to claim on-chain funds if they - * broadcast a commitment transaction - */ - public void set_to_self_delay(short val) { - bindings.OpenChannelV2_set_to_self_delay(this.ptr, val); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * The maximum number of inbound HTLCs towards channel initiator - */ - public short get_max_accepted_htlcs() { - short ret = bindings.OpenChannelV2_get_max_accepted_htlcs(this.ptr); - GC.KeepAlive(this); - return ret; - } - - /** - * The maximum number of inbound HTLCs towards channel initiator - */ - public void set_max_accepted_htlcs(short val) { - bindings.OpenChannelV2_set_max_accepted_htlcs(this.ptr, val); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - /** * The locktime for the funding transaction */ @@ -223,128 +75,6 @@ public class OpenChannelV2 : CommonBase { GC.KeepAlive(val); } - /** - * The channel initiator's key controlling the funding transaction - */ - public byte[] get_funding_pubkey() { - long ret = bindings.OpenChannelV2_get_funding_pubkey(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; - } - - /** - * The channel initiator's key controlling the funding transaction - */ - public void set_funding_pubkey(byte[] val) { - bindings.OpenChannelV2_set_funding_pubkey(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * Used to derive a revocation key for transactions broadcast by counterparty - */ - public byte[] get_revocation_basepoint() { - long ret = bindings.OpenChannelV2_get_revocation_basepoint(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; - } - - /** - * Used to derive a revocation key for transactions broadcast by counterparty - */ - public void set_revocation_basepoint(byte[] val) { - bindings.OpenChannelV2_set_revocation_basepoint(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * A payment key to channel initiator for transactions broadcast by counterparty - */ - public byte[] get_payment_basepoint() { - long ret = bindings.OpenChannelV2_get_payment_basepoint(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; - } - - /** - * A payment key to channel initiator for transactions broadcast by counterparty - */ - public void set_payment_basepoint(byte[] val) { - bindings.OpenChannelV2_set_payment_basepoint(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * Used to derive a payment key to channel initiator for transactions broadcast by channel - * initiator - */ - public byte[] get_delayed_payment_basepoint() { - long ret = bindings.OpenChannelV2_get_delayed_payment_basepoint(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; - } - - /** - * Used to derive a payment key to channel initiator for transactions broadcast by channel - * initiator - */ - public void set_delayed_payment_basepoint(byte[] val) { - bindings.OpenChannelV2_set_delayed_payment_basepoint(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * Used to derive an HTLC payment key to channel initiator - */ - public byte[] get_htlc_basepoint() { - long ret = bindings.OpenChannelV2_get_htlc_basepoint(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; - } - - /** - * Used to derive an HTLC payment key to channel initiator - */ - public void set_htlc_basepoint(byte[] val) { - bindings.OpenChannelV2_set_htlc_basepoint(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * The first to-be-broadcast-by-channel-initiator transaction's per commitment point - */ - public byte[] get_first_per_commitment_point() { - long ret = bindings.OpenChannelV2_get_first_per_commitment_point(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; - } - - /** - * The first to-be-broadcast-by-channel-initiator transaction's per commitment point - */ - public void set_first_per_commitment_point(byte[] val) { - bindings.OpenChannelV2_set_first_per_commitment_point(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - /** * The second to-be-broadcast-by-channel-initiator transaction's per commitment point */ @@ -365,78 +95,6 @@ public class OpenChannelV2 : CommonBase { GC.KeepAlive(val); } - /** - * Channel flags - */ - public byte get_channel_flags() { - byte ret = bindings.OpenChannelV2_get_channel_flags(this.ptr); - GC.KeepAlive(this); - return ret; - } - - /** - * Channel flags - */ - public void set_channel_flags(byte val) { - bindings.OpenChannelV2_set_channel_flags(this.ptr, val); - GC.KeepAlive(this); - GC.KeepAlive(val); - } - - /** - * Optionally, a request to pre-set the to-channel-initiator output's scriptPubkey for when we - * collaboratively close - */ - public Option_CVec_u8ZZ get_shutdown_scriptpubkey() { - long ret = bindings.OpenChannelV2_get_shutdown_scriptpubkey(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Option_CVec_u8ZZ ret_hu_conv = org.ldk.structs.Option_CVec_u8ZZ.constr_from_ptr(ret); - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; - return ret_hu_conv; - } - - /** - * Optionally, a request to pre-set the to-channel-initiator output's scriptPubkey for when we - * collaboratively close - */ - public void set_shutdown_scriptpubkey(org.ldk.structs.Option_CVec_u8ZZ val) { - bindings.OpenChannelV2_set_shutdown_scriptpubkey(this.ptr, val.ptr); - GC.KeepAlive(this); - GC.KeepAlive(val); - if (this != null) { this.ptrs_to.AddLast(val); }; - } - - /** - * The channel type that this channel will represent. If none is set, we derive the channel - * type from the intersection of our feature bits with our counterparty's feature bits from - * the Init message. - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None - */ - public ChannelTypeFeatures get_channel_type() { - long ret = bindings.OpenChannelV2_get_channel_type(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.ChannelTypeFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelTypeFeatures(null, ret); } - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; - return ret_hu_conv; - } - - /** - * The channel type that this channel will represent. If none is set, we derive the channel - * type from the intersection of our feature bits with our counterparty's feature bits from - * the Init message. - * - * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None - */ - public void set_channel_type(org.ldk.structs.ChannelTypeFeatures val) { - bindings.OpenChannelV2_set_channel_type(this.ptr, val == null ? 0 : val.ptr); - GC.KeepAlive(this); - GC.KeepAlive(val); - if (this != null) { this.ptrs_to.AddLast(val); }; - } - /** * Optionally, a requirement that only confirmed inputs can be added */ @@ -457,38 +115,18 @@ public class OpenChannelV2 : CommonBase { /** * Constructs a new OpenChannelV2 given each field - * - * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public static OpenChannelV2 of(byte[] chain_hash_arg, byte[] temporary_channel_id_arg, int funding_feerate_sat_per_1000_weight_arg, int commitment_feerate_sat_per_1000_weight_arg, long funding_satoshis_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long htlc_minimum_msat_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, int locktime_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_basepoint_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, byte[] second_per_commitment_point_arg, byte channel_flags_arg, org.ldk.structs.Option_CVec_u8ZZ shutdown_scriptpubkey_arg, org.ldk.structs.ChannelTypeFeatures channel_type_arg, COption_NoneZ require_confirmed_inputs_arg) { - long ret = bindings.OpenChannelV2_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(chain_hash_arg, 32)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(temporary_channel_id_arg, 32)), funding_feerate_sat_per_1000_weight_arg, commitment_feerate_sat_per_1000_weight_arg, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, to_self_delay_arg, max_accepted_htlcs_arg, locktime_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(funding_pubkey_arg, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(revocation_basepoint_arg, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_basepoint_arg, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(delayed_payment_basepoint_arg, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(htlc_basepoint_arg, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(first_per_commitment_point_arg, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(second_per_commitment_point_arg, 33)), channel_flags_arg, shutdown_scriptpubkey_arg.ptr, channel_type_arg == null ? 0 : channel_type_arg.ptr, require_confirmed_inputs_arg); - GC.KeepAlive(chain_hash_arg); - GC.KeepAlive(temporary_channel_id_arg); + public static OpenChannelV2 of(org.ldk.structs.CommonOpenChannelFields common_fields_arg, int funding_feerate_sat_per_1000_weight_arg, int locktime_arg, byte[] second_per_commitment_point_arg, COption_NoneZ require_confirmed_inputs_arg) { + long ret = bindings.OpenChannelV2_new(common_fields_arg.ptr, funding_feerate_sat_per_1000_weight_arg, locktime_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(second_per_commitment_point_arg, 33)), require_confirmed_inputs_arg); + GC.KeepAlive(common_fields_arg); GC.KeepAlive(funding_feerate_sat_per_1000_weight_arg); - GC.KeepAlive(commitment_feerate_sat_per_1000_weight_arg); - GC.KeepAlive(funding_satoshis_arg); - GC.KeepAlive(dust_limit_satoshis_arg); - GC.KeepAlive(max_htlc_value_in_flight_msat_arg); - GC.KeepAlive(htlc_minimum_msat_arg); - GC.KeepAlive(to_self_delay_arg); - GC.KeepAlive(max_accepted_htlcs_arg); GC.KeepAlive(locktime_arg); - GC.KeepAlive(funding_pubkey_arg); - GC.KeepAlive(revocation_basepoint_arg); - GC.KeepAlive(payment_basepoint_arg); - GC.KeepAlive(delayed_payment_basepoint_arg); - GC.KeepAlive(htlc_basepoint_arg); - GC.KeepAlive(first_per_commitment_point_arg); GC.KeepAlive(second_per_commitment_point_arg); - GC.KeepAlive(channel_flags_arg); - GC.KeepAlive(shutdown_scriptpubkey_arg); - GC.KeepAlive(channel_type_arg); GC.KeepAlive(require_confirmed_inputs_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.OpenChannelV2 ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OpenChannelV2(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(shutdown_scriptpubkey_arg); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_type_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(common_fields_arg); }; return ret_hu_conv; } @@ -528,7 +166,7 @@ public class OpenChannelV2 : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.OpenChannelV2 b) { - bool ret = bindings.OpenChannelV2_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.OpenChannelV2_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/Option_AmountZ.cs b/c_sharp/src/org/ldk/structs/Option_AmountZ.cs new file mode 100644 index 00000000..21bfe561 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/Option_AmountZ.cs @@ -0,0 +1,86 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +/** + * An enum which can either contain a crate::lightning::offers::offer::Amount or not + */ +public class Option_AmountZ : CommonBase { + protected Option_AmountZ(object _dummy, long ptr) : base(ptr) { } + ~Option_AmountZ() { + if (ptr != 0) { bindings.COption_AmountZ_free(ptr); } + } + + internal static Option_AmountZ constr_from_ptr(long ptr) { + long raw_ty = bindings.LDKCOption_AmountZ_ty_from_ptr(ptr); + switch (raw_ty) { + case 0: return new Option_AmountZ_Some(ptr); + case 1: return new Option_AmountZ_None(ptr); + default: + throw new ArgumentException("Impossible enum variant"); + } + } + + /** A Option_AmountZ of type Some */ + public class Option_AmountZ_Some : Option_AmountZ { + public Amount some; + internal Option_AmountZ_Some(long ptr) : base(null, ptr) { + long some = bindings.LDKCOption_AmountZ_Some_get_some(ptr); + org.ldk.structs.Amount some_hu_conv = org.ldk.structs.Amount.constr_from_ptr(some); + if (some_hu_conv != null) { some_hu_conv.ptrs_to.AddLast(this); }; + this.some = some_hu_conv; + } + } + /** A Option_AmountZ of type None */ + public class Option_AmountZ_None : Option_AmountZ { + internal Option_AmountZ_None(long ptr) : base(null, ptr) { + } + } + /** + * Constructs a new COption_AmountZ containing a crate::lightning::offers::offer::Amount + */ + public static Option_AmountZ some(org.ldk.structs.Amount o) { + long ret = bindings.COption_AmountZ_some(o.ptr); + GC.KeepAlive(o); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o); }; + return ret_hu_conv; + } + + /** + * Constructs a new COption_AmountZ containing nothing + */ + public static Option_AmountZ none() { + long ret = bindings.COption_AmountZ_none(); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + + internal long clone_ptr() { + long ret = bindings.COption_AmountZ_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a new COption_AmountZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Option_AmountZ clone() { + long ret = bindings.COption_AmountZ_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/Option_BigEndianScalarZ.cs b/c_sharp/src/org/ldk/structs/Option_BigEndianScalarZ.cs index 1cc7869d..9d271a97 100644 --- a/c_sharp/src/org/ldk/structs/Option_BigEndianScalarZ.cs +++ b/c_sharp/src/org/ldk/structs/Option_BigEndianScalarZ.cs @@ -41,13 +41,12 @@ public class Option_BigEndianScalarZ : CommonBase { /** * Constructs a new COption_BigEndianScalarZ containing a crate::c_types::BigEndianScalar */ - public static Option_BigEndianScalarZ some(byte[] o_big_endian_bytes) { - long ret = bindings.COption_BigEndianScalarZ_some(bindings.BigEndianScalar_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(o_big_endian_bytes, 32)))); - GC.KeepAlive(o_big_endian_bytes); + public static Option_BigEndianScalarZ some(org.ldk.structs.BigEndianScalar o) { + long ret = bindings.COption_BigEndianScalarZ_some(o.ptr); + GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Option_BigEndianScalarZ ret_hu_conv = org.ldk.structs.Option_BigEndianScalarZ.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; - ; return ret_hu_conv; } diff --git a/c_sharp/src/org/ldk/structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.cs b/c_sharp/src/org/ldk/structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.cs index d293a8e5..a85bb2fe 100644 --- a/c_sharp/src/org/ldk/structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.cs +++ b/c_sharp/src/org/ldk/structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.cs @@ -43,7 +43,7 @@ public class Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ : CommonBase { * Constructs a new COption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ containing a crate::c_types::derived::C2Tuple__u1632_u1632Z */ public static Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ some(org.ldk.structs.TwoTuple__u1632_u1632Z o) { - long ret = bindings.COption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ_some(o != null ? o.ptr : 0); + long ret = bindings.COption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ_some(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ ret_hu_conv = org.ldk.structs.Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Option_C2Tuple_u64u16ZZ.cs b/c_sharp/src/org/ldk/structs/Option_C2Tuple_u64u16ZZ.cs index fcd352bc..c2a18b3a 100644 --- a/c_sharp/src/org/ldk/structs/Option_C2Tuple_u64u16ZZ.cs +++ b/c_sharp/src/org/ldk/structs/Option_C2Tuple_u64u16ZZ.cs @@ -43,7 +43,7 @@ public class Option_C2Tuple_u64u16ZZ : CommonBase { * Constructs a new COption_C2Tuple_u64u16ZZ containing a crate::c_types::derived::C2Tuple_u64u16Z */ public static Option_C2Tuple_u64u16ZZ some(org.ldk.structs.TwoTuple_u64u16Z o) { - long ret = bindings.COption_C2Tuple_u64u16ZZ_some(o != null ? o.ptr : 0); + long ret = bindings.COption_C2Tuple_u64u16ZZ_some(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Option_C2Tuple_u64u16ZZ ret_hu_conv = org.ldk.structs.Option_C2Tuple_u64u16ZZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Option_C2Tuple_u64u64ZZ.cs b/c_sharp/src/org/ldk/structs/Option_C2Tuple_u64u64ZZ.cs index 26fda523..f8f8de52 100644 --- a/c_sharp/src/org/ldk/structs/Option_C2Tuple_u64u64ZZ.cs +++ b/c_sharp/src/org/ldk/structs/Option_C2Tuple_u64u64ZZ.cs @@ -43,7 +43,7 @@ public class Option_C2Tuple_u64u64ZZ : CommonBase { * Constructs a new COption_C2Tuple_u64u64ZZ containing a crate::c_types::derived::C2Tuple_u64u64Z */ public static Option_C2Tuple_u64u64ZZ some(org.ldk.structs.TwoTuple_u64u64Z o) { - long ret = bindings.COption_C2Tuple_u64u64ZZ_some(o != null ? o.ptr : 0); + long ret = bindings.COption_C2Tuple_u64u64ZZ_some(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Option_C2Tuple_u64u64ZZ ret_hu_conv = org.ldk.structs.Option_C2Tuple_u64u64ZZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.cs b/c_sharp/src/org/ldk/structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.cs index eb5a9177..a5ee84ff 100644 --- a/c_sharp/src/org/ldk/structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.cs +++ b/c_sharp/src/org/ldk/structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.cs @@ -43,7 +43,7 @@ public class Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ : Co * Constructs a new COption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ containing a crate::c_types::derived::C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ */ public static Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ some(org.ldk.structs.ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ o) { - long ret = bindings.COption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_some(o != null ? o.ptr : 0); + long ret = bindings.COption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_some(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret_hu_conv = org.ldk.structs.Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Option_ECDSASignatureZ.cs b/c_sharp/src/org/ldk/structs/Option_ECDSASignatureZ.cs new file mode 100644 index 00000000..5e00dfb8 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/Option_ECDSASignatureZ.cs @@ -0,0 +1,84 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +/** + * An enum which can either contain a crate::c_types::ECDSASignature or not + */ +public class Option_ECDSASignatureZ : CommonBase { + protected Option_ECDSASignatureZ(object _dummy, long ptr) : base(ptr) { } + ~Option_ECDSASignatureZ() { + if (ptr != 0) { bindings.COption_ECDSASignatureZ_free(ptr); } + } + + internal static Option_ECDSASignatureZ constr_from_ptr(long ptr) { + long raw_ty = bindings.LDKCOption_ECDSASignatureZ_ty_from_ptr(ptr); + switch (raw_ty) { + case 0: return new Option_ECDSASignatureZ_Some(ptr); + case 1: return new Option_ECDSASignatureZ_None(ptr); + default: + throw new ArgumentException("Impossible enum variant"); + } + } + + /** A Option_ECDSASignatureZ of type Some */ + public class Option_ECDSASignatureZ_Some : Option_ECDSASignatureZ { + public byte[] some; + internal Option_ECDSASignatureZ_Some(long ptr) : base(null, ptr) { + long some = bindings.LDKCOption_ECDSASignatureZ_Some_get_some(ptr); + byte[] some_conv = InternalUtils.decodeUint8Array(some); + this.some = some_conv; + } + } + /** A Option_ECDSASignatureZ of type None */ + public class Option_ECDSASignatureZ_None : Option_ECDSASignatureZ { + internal Option_ECDSASignatureZ_None(long ptr) : base(null, ptr) { + } + } + /** + * Constructs a new COption_ECDSASignatureZ containing a crate::c_types::ECDSASignature + */ + public static Option_ECDSASignatureZ some(byte[] o) { + long ret = bindings.COption_ECDSASignatureZ_some(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(o, 64))); + GC.KeepAlive(o); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_ECDSASignatureZ ret_hu_conv = org.ldk.structs.Option_ECDSASignatureZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Constructs a new COption_ECDSASignatureZ containing nothing + */ + public static Option_ECDSASignatureZ none() { + long ret = bindings.COption_ECDSASignatureZ_none(); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_ECDSASignatureZ ret_hu_conv = org.ldk.structs.Option_ECDSASignatureZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + + internal long clone_ptr() { + long ret = bindings.COption_ECDSASignatureZ_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a new COption_ECDSASignatureZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Option_ECDSASignatureZ clone() { + long ret = bindings.COption_ECDSASignatureZ_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_ECDSASignatureZ ret_hu_conv = org.ldk.structs.Option_ECDSASignatureZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/Option_PaymentContextZ.cs b/c_sharp/src/org/ldk/structs/Option_PaymentContextZ.cs new file mode 100644 index 00000000..115f523a --- /dev/null +++ b/c_sharp/src/org/ldk/structs/Option_PaymentContextZ.cs @@ -0,0 +1,86 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +/** + * An enum which can either contain a crate::lightning::blinded_path::payment::PaymentContext or not + */ +public class Option_PaymentContextZ : CommonBase { + protected Option_PaymentContextZ(object _dummy, long ptr) : base(ptr) { } + ~Option_PaymentContextZ() { + if (ptr != 0) { bindings.COption_PaymentContextZ_free(ptr); } + } + + internal static Option_PaymentContextZ constr_from_ptr(long ptr) { + long raw_ty = bindings.LDKCOption_PaymentContextZ_ty_from_ptr(ptr); + switch (raw_ty) { + case 0: return new Option_PaymentContextZ_Some(ptr); + case 1: return new Option_PaymentContextZ_None(ptr); + default: + throw new ArgumentException("Impossible enum variant"); + } + } + + /** A Option_PaymentContextZ of type Some */ + public class Option_PaymentContextZ_Some : Option_PaymentContextZ { + public PaymentContext some; + internal Option_PaymentContextZ_Some(long ptr) : base(null, ptr) { + long some = bindings.LDKCOption_PaymentContextZ_Some_get_some(ptr); + org.ldk.structs.PaymentContext some_hu_conv = org.ldk.structs.PaymentContext.constr_from_ptr(some); + if (some_hu_conv != null) { some_hu_conv.ptrs_to.AddLast(this); }; + this.some = some_hu_conv; + } + } + /** A Option_PaymentContextZ of type None */ + public class Option_PaymentContextZ_None : Option_PaymentContextZ { + internal Option_PaymentContextZ_None(long ptr) : base(null, ptr) { + } + } + /** + * Constructs a new COption_PaymentContextZ containing a crate::lightning::blinded_path::payment::PaymentContext + */ + public static Option_PaymentContextZ some(org.ldk.structs.PaymentContext o) { + long ret = bindings.COption_PaymentContextZ_some(o.ptr); + GC.KeepAlive(o); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_PaymentContextZ ret_hu_conv = org.ldk.structs.Option_PaymentContextZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o); }; + return ret_hu_conv; + } + + /** + * Constructs a new COption_PaymentContextZ containing nothing + */ + public static Option_PaymentContextZ none() { + long ret = bindings.COption_PaymentContextZ_none(); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_PaymentContextZ ret_hu_conv = org.ldk.structs.Option_PaymentContextZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + + internal long clone_ptr() { + long ret = bindings.COption_PaymentContextZ_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a new COption_PaymentContextZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Option_PaymentContextZ clone() { + long ret = bindings.COption_PaymentContextZ_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_PaymentContextZ ret_hu_conv = org.ldk.structs.Option_PaymentContextZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/Option_QuantityZ.cs b/c_sharp/src/org/ldk/structs/Option_QuantityZ.cs new file mode 100644 index 00000000..20188125 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/Option_QuantityZ.cs @@ -0,0 +1,86 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +/** + * An enum which can either contain a crate::lightning::offers::offer::Quantity or not + */ +public class Option_QuantityZ : CommonBase { + protected Option_QuantityZ(object _dummy, long ptr) : base(ptr) { } + ~Option_QuantityZ() { + if (ptr != 0) { bindings.COption_QuantityZ_free(ptr); } + } + + internal static Option_QuantityZ constr_from_ptr(long ptr) { + long raw_ty = bindings.LDKCOption_QuantityZ_ty_from_ptr(ptr); + switch (raw_ty) { + case 0: return new Option_QuantityZ_Some(ptr); + case 1: return new Option_QuantityZ_None(ptr); + default: + throw new ArgumentException("Impossible enum variant"); + } + } + + /** A Option_QuantityZ of type Some */ + public class Option_QuantityZ_Some : Option_QuantityZ { + public Quantity some; + internal Option_QuantityZ_Some(long ptr) : base(null, ptr) { + long some = bindings.LDKCOption_QuantityZ_Some_get_some(ptr); + org.ldk.structs.Quantity some_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(some); + if (some_hu_conv != null) { some_hu_conv.ptrs_to.AddLast(this); }; + this.some = some_hu_conv; + } + } + /** A Option_QuantityZ of type None */ + public class Option_QuantityZ_None : Option_QuantityZ { + internal Option_QuantityZ_None(long ptr) : base(null, ptr) { + } + } + /** + * Constructs a new COption_QuantityZ containing a crate::lightning::offers::offer::Quantity + */ + public static Option_QuantityZ some(org.ldk.structs.Quantity o) { + long ret = bindings.COption_QuantityZ_some(o.ptr); + GC.KeepAlive(o); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_QuantityZ ret_hu_conv = org.ldk.structs.Option_QuantityZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o); }; + return ret_hu_conv; + } + + /** + * Constructs a new COption_QuantityZ containing nothing + */ + public static Option_QuantityZ none() { + long ret = bindings.COption_QuantityZ_none(); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_QuantityZ ret_hu_conv = org.ldk.structs.Option_QuantityZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + + internal long clone_ptr() { + long ret = bindings.COption_QuantityZ_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a new COption_QuantityZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Option_QuantityZ clone() { + long ret = bindings.COption_QuantityZ_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_QuantityZ ret_hu_conv = org.ldk.structs.Option_QuantityZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/OutPoint.cs b/c_sharp/src/org/ldk/structs/OutPoint.cs index 2d01d0a2..69da1bb4 100644 --- a/c_sharp/src/org/ldk/structs/OutPoint.cs +++ b/c_sharp/src/org/ldk/structs/OutPoint.cs @@ -93,7 +93,7 @@ public class OutPoint : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.OutPoint b) { - bool ret = bindings.OutPoint_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.OutPoint_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; @@ -116,17 +116,6 @@ public class OutPoint : CommonBase { public override int GetHashCode() { return (int)this.hash(); } - /** - * Convert an `OutPoint` to a lightning channel id. - */ - public byte[] to_channel_id() { - long ret = bindings.OutPoint_to_channel_id(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; - } - /** * Serialize the OutPoint object into a byte array which can be read by OutPoint_read */ diff --git a/c_sharp/src/org/ldk/structs/OutputSpendStatus.cs b/c_sharp/src/org/ldk/structs/OutputSpendStatus.cs new file mode 100644 index 00000000..d07d1245 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/OutputSpendStatus.cs @@ -0,0 +1,200 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +/** + * The current status of the output spend. + */ +public class OutputSpendStatus : CommonBase { + protected OutputSpendStatus(object _dummy, long ptr) : base(ptr) { } + ~OutputSpendStatus() { + if (ptr != 0) { bindings.OutputSpendStatus_free(ptr); } + } + + internal static OutputSpendStatus constr_from_ptr(long ptr) { + long raw_ty = bindings.LDKOutputSpendStatus_ty_from_ptr(ptr); + switch (raw_ty) { + case 0: return new OutputSpendStatus_PendingInitialBroadcast(ptr); + case 1: return new OutputSpendStatus_PendingFirstConfirmation(ptr); + case 2: return new OutputSpendStatus_PendingThresholdConfirmations(ptr); + default: + throw new ArgumentException("Impossible enum variant"); + } + } + + /** A OutputSpendStatus of type PendingInitialBroadcast */ + public class OutputSpendStatus_PendingInitialBroadcast : OutputSpendStatus { + /** + * The height at which we will first generate and broadcast a spending transaction. + */ + public Option_u32Z delayed_until_height; + internal OutputSpendStatus_PendingInitialBroadcast(long ptr) : base(null, ptr) { + long delayed_until_height = bindings.LDKOutputSpendStatus_PendingInitialBroadcast_get_delayed_until_height(ptr); + org.ldk.structs.Option_u32Z delayed_until_height_hu_conv = org.ldk.structs.Option_u32Z.constr_from_ptr(delayed_until_height); + if (delayed_until_height_hu_conv != null) { delayed_until_height_hu_conv.ptrs_to.AddLast(this); }; + this.delayed_until_height = delayed_until_height_hu_conv; + } + } + /** A OutputSpendStatus of type PendingFirstConfirmation */ + public class OutputSpendStatus_PendingFirstConfirmation : OutputSpendStatus { + /** + * The hash of the chain tip when we first broadcast a transaction spending this output. + */ + public byte[] first_broadcast_hash; + /** + * The best height when we last broadcast a transaction spending this output. + */ + public int latest_broadcast_height; + /** + * The transaction spending this output we last broadcasted. + */ + public byte[] latest_spending_tx; + internal OutputSpendStatus_PendingFirstConfirmation(long ptr) : base(null, ptr) { + long first_broadcast_hash = bindings.LDKOutputSpendStatus_PendingFirstConfirmation_get_first_broadcast_hash(ptr); + byte[] first_broadcast_hash_conv = InternalUtils.decodeUint8Array(first_broadcast_hash); + this.first_broadcast_hash = first_broadcast_hash_conv; + this.latest_broadcast_height = bindings.LDKOutputSpendStatus_PendingFirstConfirmation_get_latest_broadcast_height(ptr); + long latest_spending_tx = bindings.LDKOutputSpendStatus_PendingFirstConfirmation_get_latest_spending_tx(ptr); + byte[] latest_spending_tx_conv = InternalUtils.decodeUint8Array(latest_spending_tx); + this.latest_spending_tx = latest_spending_tx_conv; + } + } + /** A OutputSpendStatus of type PendingThresholdConfirmations */ + public class OutputSpendStatus_PendingThresholdConfirmations : OutputSpendStatus { + /** + * The hash of the chain tip when we first broadcast a transaction spending this output. + */ + public byte[] first_broadcast_hash; + /** + * The best height when we last broadcast a transaction spending this output. + */ + public int latest_broadcast_height; + /** + * The transaction spending this output we saw confirmed on-chain. + */ + public byte[] latest_spending_tx; + /** + * The height at which the spending transaction was confirmed. + */ + public int confirmation_height; + /** + * The hash of the block in which the spending transaction was confirmed. + */ + public byte[] confirmation_hash; + internal OutputSpendStatus_PendingThresholdConfirmations(long ptr) : base(null, ptr) { + long first_broadcast_hash = bindings.LDKOutputSpendStatus_PendingThresholdConfirmations_get_first_broadcast_hash(ptr); + byte[] first_broadcast_hash_conv = InternalUtils.decodeUint8Array(first_broadcast_hash); + this.first_broadcast_hash = first_broadcast_hash_conv; + this.latest_broadcast_height = bindings.LDKOutputSpendStatus_PendingThresholdConfirmations_get_latest_broadcast_height(ptr); + long latest_spending_tx = bindings.LDKOutputSpendStatus_PendingThresholdConfirmations_get_latest_spending_tx(ptr); + byte[] latest_spending_tx_conv = InternalUtils.decodeUint8Array(latest_spending_tx); + this.latest_spending_tx = latest_spending_tx_conv; + this.confirmation_height = bindings.LDKOutputSpendStatus_PendingThresholdConfirmations_get_confirmation_height(ptr); + long confirmation_hash = bindings.LDKOutputSpendStatus_PendingThresholdConfirmations_get_confirmation_hash(ptr); + byte[] confirmation_hash_conv = InternalUtils.decodeUint8Array(confirmation_hash); + this.confirmation_hash = confirmation_hash_conv; + } + } + internal long clone_ptr() { + long ret = bindings.OutputSpendStatus_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a copy of the OutputSpendStatus + */ + public OutputSpendStatus clone() { + long ret = bindings.OutputSpendStatus_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OutputSpendStatus ret_hu_conv = org.ldk.structs.OutputSpendStatus.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new PendingInitialBroadcast-variant OutputSpendStatus + */ + public static OutputSpendStatus pending_initial_broadcast(org.ldk.structs.Option_u32Z delayed_until_height) { + long ret = bindings.OutputSpendStatus_pending_initial_broadcast(delayed_until_height.ptr); + GC.KeepAlive(delayed_until_height); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OutputSpendStatus ret_hu_conv = org.ldk.structs.OutputSpendStatus.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(delayed_until_height); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new PendingFirstConfirmation-variant OutputSpendStatus + */ + public static OutputSpendStatus pending_first_confirmation(byte[] first_broadcast_hash, int latest_broadcast_height, byte[] latest_spending_tx) { + long ret = bindings.OutputSpendStatus_pending_first_confirmation(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(first_broadcast_hash, 32)), latest_broadcast_height, InternalUtils.encodeUint8Array(latest_spending_tx)); + GC.KeepAlive(first_broadcast_hash); + GC.KeepAlive(latest_broadcast_height); + GC.KeepAlive(latest_spending_tx); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OutputSpendStatus ret_hu_conv = org.ldk.structs.OutputSpendStatus.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new PendingThresholdConfirmations-variant OutputSpendStatus + */ + public static OutputSpendStatus pending_threshold_confirmations(byte[] first_broadcast_hash, int latest_broadcast_height, byte[] latest_spending_tx, int confirmation_height, byte[] confirmation_hash) { + long ret = bindings.OutputSpendStatus_pending_threshold_confirmations(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(first_broadcast_hash, 32)), latest_broadcast_height, InternalUtils.encodeUint8Array(latest_spending_tx), confirmation_height, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(confirmation_hash, 32))); + GC.KeepAlive(first_broadcast_hash); + GC.KeepAlive(latest_broadcast_height); + GC.KeepAlive(latest_spending_tx); + GC.KeepAlive(confirmation_height); + GC.KeepAlive(confirmation_hash); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OutputSpendStatus ret_hu_conv = org.ldk.structs.OutputSpendStatus.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Checks if two OutputSpendStatuss contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + */ + public bool eq(org.ldk.structs.OutputSpendStatus b) { + bool ret = bindings.OutputSpendStatus_eq(this.ptr, b.ptr); + GC.KeepAlive(this); + GC.KeepAlive(b); + return ret; + } + + public override bool Equals(object o) { + if (!(o is OutputSpendStatus)) return false; + return this.eq((OutputSpendStatus)o); + } + /** + * Serialize the OutputSpendStatus object into a byte array which can be read by OutputSpendStatus_read + */ + public byte[] write() { + long ret = bindings.OutputSpendStatus_write(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Read a OutputSpendStatus from a byte array, created by OutputSpendStatus_write + */ + public static Result_OutputSpendStatusDecodeErrorZ read(byte[] ser) { + long ret = bindings.OutputSpendStatus_read(InternalUtils.encodeUint8Array(ser)); + GC.KeepAlive(ser); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OutputSpendStatusDecodeErrorZ ret_hu_conv = Result_OutputSpendStatusDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/OutputSpender.cs b/c_sharp/src/org/ldk/structs/OutputSpender.cs new file mode 100644 index 00000000..93283417 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/OutputSpender.cs @@ -0,0 +1,117 @@ + +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + + + +/** An implementation of OutputSpender */ +public interface OutputSpenderInterface { + /**Creates a [`Transaction`] which spends the given descriptors to the given outputs, plus an + * output to the given change destination (if sufficient change value remains). The + * transaction will have a feerate, at least, of the given value. + * + * The `locktime` argument is used to set the transaction's locktime. If `None`, the + * transaction will have a locktime of 0. It it recommended to set this to the current block + * height to avoid fee sniping, unless you have some specific reason to use a different + * locktime. + * + * Returns `Err(())` if the output value is greater than the input value minus required fee, + * if a descriptor was duplicated, or if an output descriptor `script_pubkey` + * does not match the one we can spend. + */ + Result_TransactionNoneZ spend_spendable_outputs(SpendableOutputDescriptor[] descriptors, TxOut[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, Option_u32Z locktime); +} + +/** + * A trait that describes a wallet capable of creating a spending [`Transaction`] from a set of + * [`SpendableOutputDescriptor`]s. + */ +public class OutputSpender : CommonBase { + internal bindings.LDKOutputSpender bindings_instance; + internal long instance_idx; + + internal OutputSpender(object _dummy, long ptr) : base(ptr) { bindings_instance = null; } + ~OutputSpender() { + if (ptr != 0) { bindings.OutputSpender_free(ptr); } + } + + private class LDKOutputSpenderHolder { internal OutputSpender held; } + private class LDKOutputSpenderImpl : bindings.LDKOutputSpender { + internal LDKOutputSpenderImpl(OutputSpenderInterface arg, LDKOutputSpenderHolder impl_holder) { this.arg = arg; this.impl_holder = impl_holder; } + private OutputSpenderInterface arg; + private LDKOutputSpenderHolder impl_holder; + public long spend_spendable_outputs(long _descriptors, long _outputs, long _change_destination_script, int _feerate_sat_per_1000_weight, long _locktime) { + int _descriptors_conv_27_len = InternalUtils.getArrayLength(_descriptors); + SpendableOutputDescriptor[] _descriptors_conv_27_arr = new SpendableOutputDescriptor[_descriptors_conv_27_len]; + for (int b = 0; b < _descriptors_conv_27_len; b++) { + long _descriptors_conv_27 = InternalUtils.getU64ArrayElem(_descriptors, b); + org.ldk.structs.SpendableOutputDescriptor _descriptors_conv_27_hu_conv = org.ldk.structs.SpendableOutputDescriptor.constr_from_ptr(_descriptors_conv_27); + if (_descriptors_conv_27_hu_conv != null) { _descriptors_conv_27_hu_conv.ptrs_to.AddLast(this); }; + _descriptors_conv_27_arr[b] = _descriptors_conv_27_hu_conv; + } + bindings.free_buffer(_descriptors); + int _outputs_conv_7_len = InternalUtils.getArrayLength(_outputs); + TxOut[] _outputs_conv_7_arr = new TxOut[_outputs_conv_7_len]; + for (int h = 0; h < _outputs_conv_7_len; h++) { + long _outputs_conv_7 = InternalUtils.getU64ArrayElem(_outputs, h); + TxOut _outputs_conv_7_conv = new TxOut(null, _outputs_conv_7); + _outputs_conv_7_arr[h] = _outputs_conv_7_conv; + } + bindings.free_buffer(_outputs); + byte[] _change_destination_script_conv = InternalUtils.decodeUint8Array(_change_destination_script); + org.ldk.structs.Option_u32Z _locktime_hu_conv = org.ldk.structs.Option_u32Z.constr_from_ptr(_locktime); + if (_locktime_hu_conv != null) { _locktime_hu_conv.ptrs_to.AddLast(this); }; + Result_TransactionNoneZ ret = arg.spend_spendable_outputs(_descriptors_conv_27_arr, _outputs_conv_7_arr, _change_destination_script_conv, _feerate_sat_per_1000_weight, _locktime_hu_conv); + GC.KeepAlive(arg); + long result = ret.clone_ptr(); + return result; + } + } + + /** Creates a new instance of OutputSpender from a given implementation */ + public static OutputSpender new_impl(OutputSpenderInterface arg) { + LDKOutputSpenderHolder impl_holder = new LDKOutputSpenderHolder(); + LDKOutputSpenderImpl impl = new LDKOutputSpenderImpl(arg, impl_holder); + long[] ptr_idx = bindings.LDKOutputSpender_new(impl); + + impl_holder.held = new OutputSpender(null, ptr_idx[0]); + impl_holder.held.instance_idx = ptr_idx[1]; + impl_holder.held.bindings_instance = impl; + return impl_holder.held; + } + + /** + * Creates a [`Transaction`] which spends the given descriptors to the given outputs, plus an + * output to the given change destination (if sufficient change value remains). The + * transaction will have a feerate, at least, of the given value. + * + * The `locktime` argument is used to set the transaction's locktime. If `None`, the + * transaction will have a locktime of 0. It it recommended to set this to the current block + * height to avoid fee sniping, unless you have some specific reason to use a different + * locktime. + * + * Returns `Err(())` if the output value is greater than the input value minus required fee, + * if a descriptor was duplicated, or if an output descriptor `script_pubkey` + * does not match the one we can spend. + */ + public Result_TransactionNoneZ spend_spendable_outputs(SpendableOutputDescriptor[] descriptors, TxOut[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, org.ldk.structs.Option_u32Z locktime) { + long ret = bindings.OutputSpender_spend_spendable_outputs(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(descriptors, descriptors_conv_27 => descriptors_conv_27.ptr)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(outputs, outputs_conv_7 => outputs_conv_7.ptr)), InternalUtils.encodeUint8Array(change_destination_script), feerate_sat_per_1000_weight, locktime.ptr); + GC.KeepAlive(this); + GC.KeepAlive(descriptors); + GC.KeepAlive(outputs); + GC.KeepAlive(change_destination_script); + GC.KeepAlive(feerate_sat_per_1000_weight); + GC.KeepAlive(locktime); + if (ret >= 0 && ret <= 4096) { return null; } + Result_TransactionNoneZ ret_hu_conv = Result_TransactionNoneZ.constr_from_ptr(ret); + foreach (SpendableOutputDescriptor descriptors_conv_27 in descriptors) { if (this != null) { this.ptrs_to.AddLast(descriptors_conv_27); }; }; + if (this != null) { this.ptrs_to.AddLast(locktime); }; + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/OutputSweeper.cs b/c_sharp/src/org/ldk/structs/OutputSweeper.cs new file mode 100644 index 00000000..1f2632e6 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/OutputSweeper.cs @@ -0,0 +1,179 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + + +/** + * A utility that keeps track of [`SpendableOutputDescriptor`]s, persists them in a given + * [`KVStore`] and regularly retries sweeping them based on a callback given to the constructor + * methods. + * + * Users should call [`Self::track_spendable_outputs`] for any [`SpendableOutputDescriptor`]s received via [`Event::SpendableOutputs`]. + * + * This needs to be notified of chain state changes either via its [`Listen`] or [`Confirm`] + * implementation and hence has to be connected with the utilized chain data sources. + * + * If chain data is provided via the [`Confirm`] interface or via filtered blocks, users are + * required to give their chain data sources (i.e., [`Filter`] implementation) to the respective + * constructor. + * + * [`Event::SpendableOutputs`]: crate::events::Event::SpendableOutputs + */ +public class OutputSweeper : CommonBase { + internal OutputSweeper(object _dummy, long ptr) : base(ptr) { } + ~OutputSweeper() { + if (ptr != 0) { bindings.OutputSweeper_free(ptr); } + } + + /** + * Constructs a new [`OutputSweeper`]. + * + * If chain data is provided via the [`Confirm`] interface or via filtered blocks, users also + * need to register their [`Filter`] implementation via the given `chain_data_source`. + */ + public static OutputSweeper of(org.ldk.structs.BestBlock best_block, org.ldk.structs.BroadcasterInterface broadcaster, org.ldk.structs.FeeEstimator fee_estimator, org.ldk.structs.Option_FilterZ chain_data_source, org.ldk.structs.OutputSpender output_spender, org.ldk.structs.ChangeDestinationSource change_destination_source, org.ldk.structs.KVStore kv_store, org.ldk.structs.Logger logger) { + long ret = bindings.OutputSweeper_new(best_block.ptr, broadcaster.ptr, fee_estimator.ptr, chain_data_source.ptr, output_spender.ptr, change_destination_source.ptr, kv_store.ptr, logger.ptr); + GC.KeepAlive(best_block); + GC.KeepAlive(broadcaster); + GC.KeepAlive(fee_estimator); + GC.KeepAlive(chain_data_source); + GC.KeepAlive(output_spender); + GC.KeepAlive(change_destination_source); + GC.KeepAlive(kv_store); + GC.KeepAlive(logger); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OutputSweeper ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OutputSweeper(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(best_block); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(broadcaster); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(fee_estimator); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(chain_data_source); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(output_spender); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(change_destination_source); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(kv_store); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(logger); }; + return ret_hu_conv; + } + + /** + * Tells the sweeper to track the given outputs descriptors. + * + * Usually, this should be called based on the values emitted by the + * [`Event::SpendableOutputs`]. + * + * The given `exclude_static_outputs` flag controls whether the sweeper will filter out + * [`SpendableOutputDescriptor::StaticOutput`]s, which may be handled directly by the on-chain + * wallet implementation. + * + * If `delay_until_height` is set, we will delay the spending until the respective block + * height is reached. This can be used to batch spends, e.g., to reduce on-chain fees. + * + * Returns `Err` on persistence failure, in which case the call may be safely retried. + * + * [`Event::SpendableOutputs`]: crate::events::Event::SpendableOutputs + * + * Note that channel_id (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public Result_NoneNoneZ track_spendable_outputs(SpendableOutputDescriptor[] output_descriptors, org.ldk.structs.ChannelId channel_id, bool exclude_static_outputs, org.ldk.structs.Option_u32Z delay_until_height) { + long ret = bindings.OutputSweeper_track_spendable_outputs(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(output_descriptors, output_descriptors_conv_27 => output_descriptors_conv_27.ptr)), channel_id == null ? 0 : channel_id.ptr, exclude_static_outputs, delay_until_height.ptr); + GC.KeepAlive(this); + GC.KeepAlive(output_descriptors); + GC.KeepAlive(channel_id); + GC.KeepAlive(exclude_static_outputs); + GC.KeepAlive(delay_until_height); + if (ret >= 0 && ret <= 4096) { return null; } + Result_NoneNoneZ ret_hu_conv = Result_NoneNoneZ.constr_from_ptr(ret); + foreach (SpendableOutputDescriptor output_descriptors_conv_27 in output_descriptors) { if (this != null) { this.ptrs_to.AddLast(output_descriptors_conv_27); }; }; + if (this != null) { this.ptrs_to.AddLast(channel_id); }; + if (this != null) { this.ptrs_to.AddLast(delay_until_height); }; + return ret_hu_conv; + } + + /** + * Returns a list of the currently tracked spendable outputs. + */ + public TrackedSpendableOutput[] tracked_spendable_outputs() { + long ret = bindings.OutputSweeper_tracked_spendable_outputs(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + int ret_conv_24_len = InternalUtils.getArrayLength(ret); + TrackedSpendableOutput[] ret_conv_24_arr = new TrackedSpendableOutput[ret_conv_24_len]; + for (int y = 0; y < ret_conv_24_len; y++) { + long ret_conv_24 = InternalUtils.getU64ArrayElem(ret, y); + org.ldk.structs.TrackedSpendableOutput ret_conv_24_hu_conv = null; if (ret_conv_24 < 0 || ret_conv_24 > 4096) { ret_conv_24_hu_conv = new org.ldk.structs.TrackedSpendableOutput(null, ret_conv_24); } + if (ret_conv_24_hu_conv != null) { ret_conv_24_hu_conv.ptrs_to.AddLast(this); }; + ret_conv_24_arr[y] = ret_conv_24_hu_conv; + } + bindings.free_buffer(ret); + return ret_conv_24_arr; + } + + /** + * Gets the latest best block which was connected either via the [`Listen`] or + * [`Confirm`] interfaces. + */ + public BestBlock current_best_block() { + long ret = bindings.OutputSweeper_current_best_block(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.BestBlock ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.BestBlock(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Constructs a new Listen which calls the relevant methods on this_arg. + * This copies the `inner` pointer in this_arg and thus the returned Listen must be freed before this_arg is + */ + public Listen as_Listen() { + long ret = bindings.OutputSweeper_as_Listen(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + Listen ret_hu_conv = new Listen(null, ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Constructs a new Confirm which calls the relevant methods on this_arg. + * This copies the `inner` pointer in this_arg and thus the returned Confirm must be freed before this_arg is + */ + public Confirm as_Confirm() { + long ret = bindings.OutputSweeper_as_Confirm(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + Confirm ret_hu_conv = new Confirm(null, ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Read a OutputSweeper from a byte array, created by OutputSweeper_write + */ + public static Result_OutputSweeperDecodeErrorZ read(byte[] ser, org.ldk.structs.BroadcasterInterface arg_a, org.ldk.structs.FeeEstimator arg_b, org.ldk.structs.Option_FilterZ arg_c, org.ldk.structs.OutputSpender arg_d, org.ldk.structs.ChangeDestinationSource arg_e, org.ldk.structs.KVStore arg_f, org.ldk.structs.Logger arg_g) { + long ret = bindings.OutputSweeper_read(InternalUtils.encodeUint8Array(ser), arg_a.ptr, arg_b.ptr, arg_c.ptr, arg_d.ptr, arg_e.ptr, arg_f.ptr, arg_g.ptr); + GC.KeepAlive(ser); + GC.KeepAlive(arg_a); + GC.KeepAlive(arg_b); + GC.KeepAlive(arg_c); + GC.KeepAlive(arg_d); + GC.KeepAlive(arg_e); + GC.KeepAlive(arg_f); + GC.KeepAlive(arg_g); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OutputSweeperDecodeErrorZ ret_hu_conv = Result_OutputSweeperDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(arg_a); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(arg_b); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(arg_c); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(arg_d); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(arg_e); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(arg_f); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(arg_g); }; + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/P2PGossipSync.cs b/c_sharp/src/org/ldk/structs/P2PGossipSync.cs index 8fc4eb5e..ab618295 100644 --- a/c_sharp/src/org/ldk/structs/P2PGossipSync.cs +++ b/c_sharp/src/org/ldk/structs/P2PGossipSync.cs @@ -26,7 +26,7 @@ public class P2PGossipSync : CommonBase { * correct, and the announcement is signed with channel owners' keys. */ public static P2PGossipSync of(org.ldk.structs.NetworkGraph network_graph, org.ldk.structs.Option_UtxoLookupZ utxo_lookup, org.ldk.structs.Logger logger) { - long ret = bindings.P2PGossipSync_new(network_graph == null ? 0 : network_graph.ptr, utxo_lookup.ptr, logger.ptr); + long ret = bindings.P2PGossipSync_new(network_graph.ptr, utxo_lookup.ptr, logger.ptr); GC.KeepAlive(network_graph); GC.KeepAlive(utxo_lookup); GC.KeepAlive(logger); diff --git a/c_sharp/src/org/ldk/structs/Packet.cs b/c_sharp/src/org/ldk/structs/Packet.cs index ca6ec26f..3a83c0e3 100644 --- a/c_sharp/src/org/ldk/structs/Packet.cs +++ b/c_sharp/src/org/ldk/structs/Packet.cs @@ -146,7 +146,7 @@ public class Packet : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.Packet b) { - bool ret = bindings.Packet_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.Packet_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/ParseOrSemanticError.cs b/c_sharp/src/org/ldk/structs/ParseOrSemanticError.cs index d1f27fd3..0eed4d37 100644 --- a/c_sharp/src/org/ldk/structs/ParseOrSemanticError.cs +++ b/c_sharp/src/org/ldk/structs/ParseOrSemanticError.cs @@ -91,7 +91,7 @@ public class ParseOrSemanticError : CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public bool eq(org.ldk.structs.ParseOrSemanticError b) { - bool ret = bindings.ParseOrSemanticError_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.ParseOrSemanticError_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); return ret; diff --git a/c_sharp/src/org/ldk/structs/Path.cs b/c_sharp/src/org/ldk/structs/Path.cs index 05eadf00..3022b37d 100644 --- a/c_sharp/src/org/ldk/structs/Path.cs +++ b/c_sharp/src/org/ldk/structs/Path.cs @@ -39,7 +39,7 @@ public class Path : CommonBase { * The list of unblinded hops in this [`Path`]. Must be at least length one. */ public void set_hops(RouteHop[] val) { - bindings.Path_set_hops(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(val, val_conv_10 => val_conv_10 == null ? 0 : val_conv_10.ptr))); + bindings.Path_set_hops(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(val, val_conv_10 => val_conv_10.ptr))); GC.KeepAlive(this); GC.KeepAlive(val); foreach (RouteHop val_conv_10 in val) { if (this != null) { this.ptrs_to.AddLast(val_conv_10); }; }; @@ -77,7 +77,7 @@ public class Path : CommonBase { * Note that blinded_tail_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ public static Path of(RouteHop[] hops_arg, org.ldk.structs.BlindedTail blinded_tail_arg) { - long ret = bindings.Path_new(InternalUtils.encodeUint64Array(InternalUtils.mapArray(hops_arg, hops_arg_conv_10 => hops_arg_conv_10 == null ? 0 : hops_arg_conv_10.ptr)), blinded_tail_arg == null ? 0 : blinded_tail_arg.ptr); + long ret = bindings.Path_new(InternalUtils.encodeUint64Array(InternalUtils.mapArray(hops_arg, hops_arg_conv_10 => hops_arg_conv_10.ptr)), blinded_tail_arg == null ? 0 : blinded_tail_arg.ptr); GC.KeepAlive(hops_arg); GC.KeepAlive(blinded_tail_arg); if (ret >= 0 && ret <= 4096) { return null; } @@ -124,7 +124,7 @@ public class Path : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.Path b) { - bool ret = bindings.Path_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.Path_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/PathFailure.cs b/c_sharp/src/org/ldk/structs/PathFailure.cs index 59891521..a3ca0ae6 100644 --- a/c_sharp/src/org/ldk/structs/PathFailure.cs +++ b/c_sharp/src/org/ldk/structs/PathFailure.cs @@ -107,7 +107,7 @@ public class PathFailure : CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public bool eq(org.ldk.structs.PathFailure b) { - bool ret = bindings.PathFailure_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.PathFailure_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); return ret; diff --git a/c_sharp/src/org/ldk/structs/Payee.cs b/c_sharp/src/org/ldk/structs/Payee.cs index 69b6a4a2..2d72ccb3 100644 --- a/c_sharp/src/org/ldk/structs/Payee.cs +++ b/c_sharp/src/org/ldk/structs/Payee.cs @@ -128,7 +128,7 @@ public class Payee : CommonBase { * Utility method to constructs a new Blinded-variant Payee */ public static Payee blinded(TwoTuple_BlindedPayInfoBlindedPathZ[] route_hints, org.ldk.structs.Bolt12InvoiceFeatures features) { - long ret = bindings.Payee_blinded(InternalUtils.encodeUint64Array(InternalUtils.mapArray(route_hints, route_hints_conv_37 => route_hints_conv_37 != null ? route_hints_conv_37.ptr : 0)), features == null ? 0 : features.ptr); + long ret = bindings.Payee_blinded(InternalUtils.encodeUint64Array(InternalUtils.mapArray(route_hints, route_hints_conv_37 => route_hints_conv_37.ptr)), features.ptr); GC.KeepAlive(route_hints); GC.KeepAlive(features); if (ret >= 0 && ret <= 4096) { return null; } @@ -142,7 +142,7 @@ public class Payee : CommonBase { * Utility method to constructs a new Clear-variant Payee */ public static Payee clear(byte[] node_id, RouteHint[] route_hints, org.ldk.structs.Bolt11InvoiceFeatures features, int final_cltv_expiry_delta) { - long ret = bindings.Payee_clear(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(route_hints, route_hints_conv_11 => route_hints_conv_11 == null ? 0 : route_hints_conv_11.ptr)), features == null ? 0 : features.ptr, final_cltv_expiry_delta); + long ret = bindings.Payee_clear(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(route_hints, route_hints_conv_11 => route_hints_conv_11.ptr)), features.ptr, final_cltv_expiry_delta); GC.KeepAlive(node_id); GC.KeepAlive(route_hints); GC.KeepAlive(features); @@ -172,7 +172,7 @@ public class Payee : CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public bool eq(org.ldk.structs.Payee b) { - bool ret = bindings.Payee_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.Payee_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); return ret; diff --git a/c_sharp/src/org/ldk/structs/PayeePubKey.cs b/c_sharp/src/org/ldk/structs/PayeePubKey.cs index 46a18c1e..a5025d32 100644 --- a/c_sharp/src/org/ldk/structs/PayeePubKey.cs +++ b/c_sharp/src/org/ldk/structs/PayeePubKey.cs @@ -77,7 +77,7 @@ public class PayeePubKey : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.PayeePubKey b) { - bool ret = bindings.PayeePubKey_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.PayeePubKey_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/PaymentContext.cs b/c_sharp/src/org/ldk/structs/PaymentContext.cs new file mode 100644 index 00000000..1512c1e4 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/PaymentContext.cs @@ -0,0 +1,157 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +/** + * The context of an inbound payment, which is included in a [`BlindedPath`] via [`ReceiveTlvs`] + * and surfaced in [`PaymentPurpose`]. + * + * [`BlindedPath`]: crate::blinded_path::BlindedPath + * [`PaymentPurpose`]: crate::events::PaymentPurpose + */ +public class PaymentContext : CommonBase { + protected PaymentContext(object _dummy, long ptr) : base(ptr) { } + ~PaymentContext() { + if (ptr != 0) { bindings.PaymentContext_free(ptr); } + } + + internal static PaymentContext constr_from_ptr(long ptr) { + long raw_ty = bindings.LDKPaymentContext_ty_from_ptr(ptr); + switch (raw_ty) { + case 0: return new PaymentContext_Unknown(ptr); + case 1: return new PaymentContext_Bolt12Offer(ptr); + case 2: return new PaymentContext_Bolt12Refund(ptr); + default: + throw new ArgumentException("Impossible enum variant"); + } + } + + /** A PaymentContext of type Unknown */ + public class PaymentContext_Unknown : PaymentContext { + public UnknownPaymentContext unknown; + internal PaymentContext_Unknown(long ptr) : base(null, ptr) { + long unknown = bindings.LDKPaymentContext_Unknown_get_unknown(ptr); + org.ldk.structs.UnknownPaymentContext unknown_hu_conv = null; if (unknown < 0 || unknown > 4096) { unknown_hu_conv = new org.ldk.structs.UnknownPaymentContext(null, unknown); } + if (unknown_hu_conv != null) { unknown_hu_conv.ptrs_to.AddLast(this); }; + this.unknown = unknown_hu_conv; + } + } + /** A PaymentContext of type Bolt12Offer */ + public class PaymentContext_Bolt12Offer : PaymentContext { + public Bolt12OfferContext bolt12_offer; + internal PaymentContext_Bolt12Offer(long ptr) : base(null, ptr) { + long bolt12_offer = bindings.LDKPaymentContext_Bolt12Offer_get_bolt12_offer(ptr); + org.ldk.structs.Bolt12OfferContext bolt12_offer_hu_conv = null; if (bolt12_offer < 0 || bolt12_offer > 4096) { bolt12_offer_hu_conv = new org.ldk.structs.Bolt12OfferContext(null, bolt12_offer); } + if (bolt12_offer_hu_conv != null) { bolt12_offer_hu_conv.ptrs_to.AddLast(this); }; + this.bolt12_offer = bolt12_offer_hu_conv; + } + } + /** A PaymentContext of type Bolt12Refund */ + public class PaymentContext_Bolt12Refund : PaymentContext { + public Bolt12RefundContext bolt12_refund; + internal PaymentContext_Bolt12Refund(long ptr) : base(null, ptr) { + long bolt12_refund = bindings.LDKPaymentContext_Bolt12Refund_get_bolt12_refund(ptr); + org.ldk.structs.Bolt12RefundContext bolt12_refund_hu_conv = null; if (bolt12_refund < 0 || bolt12_refund > 4096) { bolt12_refund_hu_conv = new org.ldk.structs.Bolt12RefundContext(null, bolt12_refund); } + if (bolt12_refund_hu_conv != null) { bolt12_refund_hu_conv.ptrs_to.AddLast(this); }; + this.bolt12_refund = bolt12_refund_hu_conv; + } + } + internal long clone_ptr() { + long ret = bindings.PaymentContext_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a copy of the PaymentContext + */ + public PaymentContext clone() { + long ret = bindings.PaymentContext_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.PaymentContext ret_hu_conv = org.ldk.structs.PaymentContext.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new Unknown-variant PaymentContext + */ + public static PaymentContext unknown(org.ldk.structs.UnknownPaymentContext a) { + long ret = bindings.PaymentContext_unknown(a.ptr); + GC.KeepAlive(a); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.PaymentContext ret_hu_conv = org.ldk.structs.PaymentContext.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(a); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new Bolt12Offer-variant PaymentContext + */ + public static PaymentContext bolt12_offer(org.ldk.structs.Bolt12OfferContext a) { + long ret = bindings.PaymentContext_bolt12_offer(a.ptr); + GC.KeepAlive(a); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.PaymentContext ret_hu_conv = org.ldk.structs.PaymentContext.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(a); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new Bolt12Refund-variant PaymentContext + */ + public static PaymentContext bolt12_refund(org.ldk.structs.Bolt12RefundContext a) { + long ret = bindings.PaymentContext_bolt12_refund(a.ptr); + GC.KeepAlive(a); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.PaymentContext ret_hu_conv = org.ldk.structs.PaymentContext.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(a); }; + return ret_hu_conv; + } + + /** + * Checks if two PaymentContexts contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + */ + public bool eq(org.ldk.structs.PaymentContext b) { + bool ret = bindings.PaymentContext_eq(this.ptr, b.ptr); + GC.KeepAlive(this); + GC.KeepAlive(b); + return ret; + } + + public override bool Equals(object o) { + if (!(o is PaymentContext)) return false; + return this.eq((PaymentContext)o); + } + /** + * Serialize the PaymentContext object into a byte array which can be read by PaymentContext_read + */ + public byte[] write() { + long ret = bindings.PaymentContext_write(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Read a PaymentContext from a byte array, created by PaymentContext_write + */ + public static Result_PaymentContextDecodeErrorZ read(byte[] ser) { + long ret = bindings.PaymentContext_read(InternalUtils.encodeUint8Array(ser)); + GC.KeepAlive(ser); + if (ret >= 0 && ret <= 4096) { return null; } + Result_PaymentContextDecodeErrorZ ret_hu_conv = Result_PaymentContextDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/PaymentParameters.cs b/c_sharp/src/org/ldk/structs/PaymentParameters.cs index 3f38ad62..8c7ffcfc 100644 --- a/c_sharp/src/org/ldk/structs/PaymentParameters.cs +++ b/c_sharp/src/org/ldk/structs/PaymentParameters.cs @@ -249,7 +249,7 @@ public class PaymentParameters : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.PaymentParameters b) { - bool ret = bindings.PaymentParameters_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.PaymentParameters_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; @@ -329,7 +329,7 @@ public class PaymentParameters : CommonBase { * [`PaymentParameters::expiry_time`]. */ public static PaymentParameters from_bolt12_invoice(org.ldk.structs.Bolt12Invoice invoice) { - long ret = bindings.PaymentParameters_from_bolt12_invoice(invoice == null ? 0 : invoice.ptr); + long ret = bindings.PaymentParameters_from_bolt12_invoice(invoice.ptr); GC.KeepAlive(invoice); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.PaymentParameters ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.PaymentParameters(null, ret); } @@ -342,7 +342,7 @@ public class PaymentParameters : CommonBase { * Creates parameters for paying to a blinded payee from the provided blinded route hints. */ public static PaymentParameters blinded(TwoTuple_BlindedPayInfoBlindedPathZ[] blinded_route_hints) { - long ret = bindings.PaymentParameters_blinded(InternalUtils.encodeUint64Array(InternalUtils.mapArray(blinded_route_hints, blinded_route_hints_conv_37 => blinded_route_hints_conv_37 != null ? blinded_route_hints_conv_37.ptr : 0))); + long ret = bindings.PaymentParameters_blinded(InternalUtils.encodeUint64Array(InternalUtils.mapArray(blinded_route_hints, blinded_route_hints_conv_37 => blinded_route_hints_conv_37.ptr))); GC.KeepAlive(blinded_route_hints); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.PaymentParameters ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.PaymentParameters(null, ret); } diff --git a/c_sharp/src/org/ldk/structs/PaymentPurpose.cs b/c_sharp/src/org/ldk/structs/PaymentPurpose.cs index 242ead86..5fc9c02c 100644 --- a/c_sharp/src/org/ldk/structs/PaymentPurpose.cs +++ b/c_sharp/src/org/ldk/structs/PaymentPurpose.cs @@ -18,19 +18,22 @@ public class PaymentPurpose : CommonBase { internal static PaymentPurpose constr_from_ptr(long ptr) { long raw_ty = bindings.LDKPaymentPurpose_ty_from_ptr(ptr); switch (raw_ty) { - case 0: return new PaymentPurpose_InvoicePayment(ptr); - case 1: return new PaymentPurpose_SpontaneousPayment(ptr); + case 0: return new PaymentPurpose_Bolt11InvoicePayment(ptr); + case 1: return new PaymentPurpose_Bolt12OfferPayment(ptr); + case 2: return new PaymentPurpose_Bolt12RefundPayment(ptr); + case 3: return new PaymentPurpose_SpontaneousPayment(ptr); default: throw new ArgumentException("Impossible enum variant"); } } - /** A PaymentPurpose of type InvoicePayment */ - public class PaymentPurpose_InvoicePayment : PaymentPurpose { + /** A PaymentPurpose of type Bolt11InvoicePayment */ + public class PaymentPurpose_Bolt11InvoicePayment : PaymentPurpose { /** * The preimage to the payment_hash, if the payment hash (and secret) were fetched via - * [`ChannelManager::create_inbound_payment`]. If provided, this can be handed directly to - * [`ChannelManager::claim_funds`]. + * [`ChannelManager::create_inbound_payment`]. When handling [`Event::PaymentClaimable`], + * this can be passed directly to [`ChannelManager::claim_funds`] to claim the payment. No + * action is needed when seen in [`Event::PaymentClaimed`]. * * [`ChannelManager::create_inbound_payment`]: crate::ln::channelmanager::ChannelManager::create_inbound_payment * [`ChannelManager::claim_funds`]: crate::ln::channelmanager::ChannelManager::claim_funds @@ -49,16 +52,92 @@ public class PaymentPurpose : CommonBase { * [`ChannelManager::create_inbound_payment_for_hash`]: crate::ln::channelmanager::ChannelManager::create_inbound_payment_for_hash */ public byte[] payment_secret; - internal PaymentPurpose_InvoicePayment(long ptr) : base(null, ptr) { - long payment_preimage = bindings.LDKPaymentPurpose_InvoicePayment_get_payment_preimage(ptr); + internal PaymentPurpose_Bolt11InvoicePayment(long ptr) : base(null, ptr) { + long payment_preimage = bindings.LDKPaymentPurpose_Bolt11InvoicePayment_get_payment_preimage(ptr); org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(payment_preimage); if (payment_preimage_hu_conv != null) { payment_preimage_hu_conv.ptrs_to.AddLast(this); }; this.payment_preimage = payment_preimage_hu_conv; - long payment_secret = bindings.LDKPaymentPurpose_InvoicePayment_get_payment_secret(ptr); + long payment_secret = bindings.LDKPaymentPurpose_Bolt11InvoicePayment_get_payment_secret(ptr); byte[] payment_secret_conv = InternalUtils.decodeUint8Array(payment_secret); this.payment_secret = payment_secret_conv; } } + /** A PaymentPurpose of type Bolt12OfferPayment */ + public class PaymentPurpose_Bolt12OfferPayment : PaymentPurpose { + /** + * The preimage to the payment hash. When handling [`Event::PaymentClaimable`], this can be + * passed directly to [`ChannelManager::claim_funds`], if provided. No action is needed + * when seen in [`Event::PaymentClaimed`]. + * + * [`ChannelManager::claim_funds`]: crate::ln::channelmanager::ChannelManager::claim_funds + */ + public Option_ThirtyTwoBytesZ payment_preimage; + /** + * The secret used to authenticate the sender to the recipient, preventing a number of + * de-anonymization attacks while routing a payment. + * + * See [`PaymentPurpose::Bolt11InvoicePayment::payment_secret`] for further details. + */ + public byte[] payment_secret; + /** + * The context of the payment such as information about the corresponding [`Offer`] and + * [`InvoiceRequest`]. + * + * [`Offer`]: crate::offers::offer::Offer + * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest + */ + public Bolt12OfferContext payment_context; + internal PaymentPurpose_Bolt12OfferPayment(long ptr) : base(null, ptr) { + long payment_preimage = bindings.LDKPaymentPurpose_Bolt12OfferPayment_get_payment_preimage(ptr); + org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(payment_preimage); + if (payment_preimage_hu_conv != null) { payment_preimage_hu_conv.ptrs_to.AddLast(this); }; + this.payment_preimage = payment_preimage_hu_conv; + long payment_secret = bindings.LDKPaymentPurpose_Bolt12OfferPayment_get_payment_secret(ptr); + byte[] payment_secret_conv = InternalUtils.decodeUint8Array(payment_secret); + this.payment_secret = payment_secret_conv; + long payment_context = bindings.LDKPaymentPurpose_Bolt12OfferPayment_get_payment_context(ptr); + org.ldk.structs.Bolt12OfferContext payment_context_hu_conv = null; if (payment_context < 0 || payment_context > 4096) { payment_context_hu_conv = new org.ldk.structs.Bolt12OfferContext(null, payment_context); } + if (payment_context_hu_conv != null) { payment_context_hu_conv.ptrs_to.AddLast(this); }; + this.payment_context = payment_context_hu_conv; + } + } + /** A PaymentPurpose of type Bolt12RefundPayment */ + public class PaymentPurpose_Bolt12RefundPayment : PaymentPurpose { + /** + * The preimage to the payment hash. When handling [`Event::PaymentClaimable`], this can be + * passed directly to [`ChannelManager::claim_funds`], if provided. No action is needed + * when seen in [`Event::PaymentClaimed`]. + * + * [`ChannelManager::claim_funds`]: crate::ln::channelmanager::ChannelManager::claim_funds + */ + public Option_ThirtyTwoBytesZ payment_preimage; + /** + * The secret used to authenticate the sender to the recipient, preventing a number of + * de-anonymization attacks while routing a payment. + * + * See [`PaymentPurpose::Bolt11InvoicePayment::payment_secret`] for further details. + */ + public byte[] payment_secret; + /** + * The context of the payment such as information about the corresponding [`Refund`]. + * + * [`Refund`]: crate::offers::refund::Refund + */ + public Bolt12RefundContext payment_context; + internal PaymentPurpose_Bolt12RefundPayment(long ptr) : base(null, ptr) { + long payment_preimage = bindings.LDKPaymentPurpose_Bolt12RefundPayment_get_payment_preimage(ptr); + org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(payment_preimage); + if (payment_preimage_hu_conv != null) { payment_preimage_hu_conv.ptrs_to.AddLast(this); }; + this.payment_preimage = payment_preimage_hu_conv; + long payment_secret = bindings.LDKPaymentPurpose_Bolt12RefundPayment_get_payment_secret(ptr); + byte[] payment_secret_conv = InternalUtils.decodeUint8Array(payment_secret); + this.payment_secret = payment_secret_conv; + long payment_context = bindings.LDKPaymentPurpose_Bolt12RefundPayment_get_payment_context(ptr); + org.ldk.structs.Bolt12RefundContext payment_context_hu_conv = null; if (payment_context < 0 || payment_context > 4096) { payment_context_hu_conv = new org.ldk.structs.Bolt12RefundContext(null, payment_context); } + if (payment_context_hu_conv != null) { payment_context_hu_conv.ptrs_to.AddLast(this); }; + this.payment_context = payment_context_hu_conv; + } + } /** A PaymentPurpose of type SpontaneousPayment */ public class PaymentPurpose_SpontaneousPayment : PaymentPurpose { public byte[] spontaneous_payment; @@ -87,16 +166,48 @@ public class PaymentPurpose : CommonBase { } /** - * Utility method to constructs a new InvoicePayment-variant PaymentPurpose + * Utility method to constructs a new Bolt11InvoicePayment-variant PaymentPurpose + */ + public static PaymentPurpose bolt11_invoice_payment(org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage, byte[] payment_secret) { + long ret = bindings.PaymentPurpose_bolt11_invoice_payment(payment_preimage.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_secret, 32))); + GC.KeepAlive(payment_preimage); + GC.KeepAlive(payment_secret); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.PaymentPurpose ret_hu_conv = org.ldk.structs.PaymentPurpose.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(payment_preimage); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new Bolt12OfferPayment-variant PaymentPurpose + */ + public static PaymentPurpose bolt12_offer_payment(org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage, byte[] payment_secret, org.ldk.structs.Bolt12OfferContext payment_context) { + long ret = bindings.PaymentPurpose_bolt12_offer_payment(payment_preimage.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_secret, 32)), payment_context.ptr); + GC.KeepAlive(payment_preimage); + GC.KeepAlive(payment_secret); + GC.KeepAlive(payment_context); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.PaymentPurpose ret_hu_conv = org.ldk.structs.PaymentPurpose.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(payment_preimage); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(payment_context); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new Bolt12RefundPayment-variant PaymentPurpose */ - public static PaymentPurpose invoice_payment(org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage, byte[] payment_secret) { - long ret = bindings.PaymentPurpose_invoice_payment(payment_preimage.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_secret, 32))); + public static PaymentPurpose bolt12_refund_payment(org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage, byte[] payment_secret, org.ldk.structs.Bolt12RefundContext payment_context) { + long ret = bindings.PaymentPurpose_bolt12_refund_payment(payment_preimage.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_secret, 32)), payment_context.ptr); GC.KeepAlive(payment_preimage); GC.KeepAlive(payment_secret); + GC.KeepAlive(payment_context); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.PaymentPurpose ret_hu_conv = org.ldk.structs.PaymentPurpose.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(payment_preimage); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(payment_context); }; return ret_hu_conv; } @@ -117,7 +228,7 @@ public class PaymentPurpose : CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public bool eq(org.ldk.structs.PaymentPurpose b) { - bool ret = bindings.PaymentPurpose_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.PaymentPurpose_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); return ret; diff --git a/c_sharp/src/org/ldk/structs/PaymentSendFailure.cs b/c_sharp/src/org/ldk/structs/PaymentSendFailure.cs index cb3c70dd..03e37fe0 100644 --- a/c_sharp/src/org/ldk/structs/PaymentSendFailure.cs +++ b/c_sharp/src/org/ldk/structs/PaymentSendFailure.cs @@ -151,7 +151,7 @@ public class PaymentSendFailure : CommonBase { * Utility method to constructs a new PathParameterError-variant PaymentSendFailure */ public static PaymentSendFailure path_parameter_error(Result_NoneAPIErrorZ[] a) { - long ret = bindings.PaymentSendFailure_path_parameter_error(InternalUtils.encodeUint64Array(InternalUtils.mapArray(a, a_conv_22 => a_conv_22 != null ? a_conv_22.ptr : 0))); + long ret = bindings.PaymentSendFailure_path_parameter_error(InternalUtils.encodeUint64Array(InternalUtils.mapArray(a, a_conv_22 => a_conv_22.ptr))); GC.KeepAlive(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.PaymentSendFailure ret_hu_conv = org.ldk.structs.PaymentSendFailure.constr_from_ptr(ret); @@ -187,7 +187,7 @@ public class PaymentSendFailure : CommonBase { * Utility method to constructs a new PartialFailure-variant PaymentSendFailure */ public static PaymentSendFailure partial_failure(Result_NoneAPIErrorZ[] results, org.ldk.structs.RouteParameters failed_paths_retry, byte[] payment_id) { - long ret = bindings.PaymentSendFailure_partial_failure(InternalUtils.encodeUint64Array(InternalUtils.mapArray(results, results_conv_22 => results_conv_22 != null ? results_conv_22.ptr : 0)), failed_paths_retry == null ? 0 : failed_paths_retry.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32))); + long ret = bindings.PaymentSendFailure_partial_failure(InternalUtils.encodeUint64Array(InternalUtils.mapArray(results, results_conv_22 => results_conv_22.ptr)), failed_paths_retry.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32))); GC.KeepAlive(results); GC.KeepAlive(failed_paths_retry); GC.KeepAlive(payment_id); @@ -203,7 +203,7 @@ public class PaymentSendFailure : CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public bool eq(org.ldk.structs.PaymentSendFailure b) { - bool ret = bindings.PaymentSendFailure_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.PaymentSendFailure_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); return ret; diff --git a/c_sharp/src/org/ldk/structs/PeeledOnion.cs b/c_sharp/src/org/ldk/structs/PeeledOnion.cs index e3840e4e..c7d741bd 100644 --- a/c_sharp/src/org/ldk/structs/PeeledOnion.cs +++ b/c_sharp/src/org/ldk/structs/PeeledOnion.cs @@ -27,12 +27,13 @@ public class PeeledOnion : CommonBase { /** A PeeledOnion of type Forward */ public class PeeledOnion_Forward : PeeledOnion { - public byte[] _0; + public NextMessageHop _0; public OnionMessage _1; internal PeeledOnion_Forward(long ptr) : base(null, ptr) { long _0 = bindings.LDKPeeledOnion_Forward_get__0(ptr); - byte[] _0_conv = InternalUtils.decodeUint8Array(_0); - this._0 = _0_conv; + org.ldk.structs.NextMessageHop _0_hu_conv = org.ldk.structs.NextMessageHop.constr_from_ptr(_0); + if (_0_hu_conv != null) { _0_hu_conv.ptrs_to.AddLast(this); }; + this._0 = _0_hu_conv; long _1 = bindings.LDKPeeledOnion_Forward_get__1(ptr); org.ldk.structs.OnionMessage _1_hu_conv = null; if (_1 < 0 || _1 > 4096) { _1_hu_conv = new org.ldk.structs.OnionMessage(null, _1); } if (_1_hu_conv != null) { _1_hu_conv.ptrs_to.AddLast(this); }; @@ -85,13 +86,14 @@ public class PeeledOnion : CommonBase { /** * Utility method to constructs a new Forward-variant PeeledOnion */ - public static PeeledOnion forward(byte[] a, org.ldk.structs.OnionMessage b) { - long ret = bindings.PeeledOnion_forward(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(a, 33)), b == null ? 0 : b.ptr); + public static PeeledOnion forward(org.ldk.structs.NextMessageHop a, org.ldk.structs.OnionMessage b) { + long ret = bindings.PeeledOnion_forward(a.ptr, b.ptr); GC.KeepAlive(a); GC.KeepAlive(b); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.PeeledOnion ret_hu_conv = org.ldk.structs.PeeledOnion.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(a); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b); }; return ret_hu_conv; } @@ -100,7 +102,7 @@ public class PeeledOnion : CommonBase { * Utility method to constructs a new Receive-variant PeeledOnion */ public static PeeledOnion receive(org.ldk.structs.ParsedOnionMessageContents a, byte[] b, org.ldk.structs.BlindedPath c) { - long ret = bindings.PeeledOnion_receive(a.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(b, 32)), c == null ? 0 : c.ptr); + long ret = bindings.PeeledOnion_receive(a.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(b, 32)), c.ptr); GC.KeepAlive(a); GC.KeepAlive(b); GC.KeepAlive(c); diff --git a/c_sharp/src/org/ldk/structs/PeerDetails.cs b/c_sharp/src/org/ldk/structs/PeerDetails.cs new file mode 100644 index 00000000..3b9c6ffa --- /dev/null +++ b/c_sharp/src/org/ldk/structs/PeerDetails.cs @@ -0,0 +1,136 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + + +/** + * Details of a connected peer as returned by [`PeerManager::list_peers`]. + */ +public class PeerDetails : CommonBase { + internal PeerDetails(object _dummy, long ptr) : base(ptr) { } + ~PeerDetails() { + if (ptr != 0) { bindings.PeerDetails_free(ptr); } + } + + /** + * The node id of the peer. + * + * For outbound connections, this [`PublicKey`] will be the same as the `their_node_id` parameter + * passed in to [`PeerManager::new_outbound_connection`]. + */ + public byte[] get_counterparty_node_id() { + long ret = bindings.PeerDetails_get_counterparty_node_id(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + + /** + * The node id of the peer. + * + * For outbound connections, this [`PublicKey`] will be the same as the `their_node_id` parameter + * passed in to [`PeerManager::new_outbound_connection`]. + */ + public void set_counterparty_node_id(byte[] val) { + bindings.PeerDetails_set_counterparty_node_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * The socket address the peer provided in the initial handshake. + * + * Will only be `Some` if an address had been previously provided to + * [`PeerManager::new_outbound_connection`] or [`PeerManager::new_inbound_connection`]. + * + * Returns a copy of the field. + */ + public Option_SocketAddressZ get_socket_address() { + long ret = bindings.PeerDetails_get_socket_address(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_SocketAddressZ ret_hu_conv = org.ldk.structs.Option_SocketAddressZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * The socket address the peer provided in the initial handshake. + * + * Will only be `Some` if an address had been previously provided to + * [`PeerManager::new_outbound_connection`] or [`PeerManager::new_inbound_connection`]. + */ + public void set_socket_address(org.ldk.structs.Option_SocketAddressZ val) { + bindings.PeerDetails_set_socket_address(this.ptr, val.ptr); + GC.KeepAlive(this); + GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; + } + + /** + * The features the peer provided in the initial handshake. + */ + public InitFeatures get_init_features() { + long ret = bindings.PeerDetails_get_init_features(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.InitFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InitFeatures(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * The features the peer provided in the initial handshake. + */ + public void set_init_features(org.ldk.structs.InitFeatures val) { + bindings.PeerDetails_set_init_features(this.ptr, val.ptr); + GC.KeepAlive(this); + GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; + } + + /** + * Indicates the direction of the peer connection. + * + * Will be `true` for inbound connections, and `false` for outbound connections. + */ + public bool get_is_inbound_connection() { + bool ret = bindings.PeerDetails_get_is_inbound_connection(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Indicates the direction of the peer connection. + * + * Will be `true` for inbound connections, and `false` for outbound connections. + */ + public void set_is_inbound_connection(bool val) { + bindings.PeerDetails_set_is_inbound_connection(this.ptr, val); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * Constructs a new PeerDetails given each field + */ + public static PeerDetails of(byte[] counterparty_node_id_arg, org.ldk.structs.Option_SocketAddressZ socket_address_arg, org.ldk.structs.InitFeatures init_features_arg, bool is_inbound_connection_arg) { + long ret = bindings.PeerDetails_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_node_id_arg, 33)), socket_address_arg.ptr, init_features_arg.ptr, is_inbound_connection_arg); + GC.KeepAlive(counterparty_node_id_arg); + GC.KeepAlive(socket_address_arg); + GC.KeepAlive(init_features_arg); + GC.KeepAlive(is_inbound_connection_arg); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.PeerDetails ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.PeerDetails(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(socket_address_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(init_features_arg); }; + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/PeerManager.cs b/c_sharp/src/org/ldk/structs/PeerManager.cs index 051f3bf2..c2e1eeb0 100644 --- a/c_sharp/src/org/ldk/structs/PeerManager.cs +++ b/c_sharp/src/org/ldk/structs/PeerManager.cs @@ -67,31 +67,40 @@ public class PeerManager : CommonBase { } /** - * Get a list of tuples mapping from node id to network addresses for peers which have - * completed the initial handshake. - * - * For outbound connections, the [`PublicKey`] will be the same as the `their_node_id` parameter - * passed in to [`Self::new_outbound_connection`], however entries will only appear once the initial - * handshake has completed and we are sure the remote peer has the private key for the given - * [`PublicKey`]. - * - * The returned `Option`s will only be `Some` if an address had been previously given via - * [`Self::new_outbound_connection`] or [`Self::new_inbound_connection`]. + * Returns a list of [`PeerDetails`] for connected peers that have completed the initial + * handshake. */ - public TwoTuple_PublicKeyCOption_SocketAddressZZ[] get_peer_node_ids() { - long ret = bindings.PeerManager_get_peer_node_ids(this.ptr); + public PeerDetails[] list_peers() { + long ret = bindings.PeerManager_list_peers(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - int ret_conv_43_len = InternalUtils.getArrayLength(ret); - TwoTuple_PublicKeyCOption_SocketAddressZZ[] ret_conv_43_arr = new TwoTuple_PublicKeyCOption_SocketAddressZZ[ret_conv_43_len]; - for (int r = 0; r < ret_conv_43_len; r++) { - long ret_conv_43 = InternalUtils.getU64ArrayElem(ret, r); - TwoTuple_PublicKeyCOption_SocketAddressZZ ret_conv_43_hu_conv = new TwoTuple_PublicKeyCOption_SocketAddressZZ(null, ret_conv_43); - if (ret_conv_43_hu_conv != null) { ret_conv_43_hu_conv.ptrs_to.AddLast(this); }; - ret_conv_43_arr[r] = ret_conv_43_hu_conv; + int ret_conv_13_len = InternalUtils.getArrayLength(ret); + PeerDetails[] ret_conv_13_arr = new PeerDetails[ret_conv_13_len]; + for (int n = 0; n < ret_conv_13_len; n++) { + long ret_conv_13 = InternalUtils.getU64ArrayElem(ret, n); + org.ldk.structs.PeerDetails ret_conv_13_hu_conv = null; if (ret_conv_13 < 0 || ret_conv_13 > 4096) { ret_conv_13_hu_conv = new org.ldk.structs.PeerDetails(null, ret_conv_13); } + if (ret_conv_13_hu_conv != null) { ret_conv_13_hu_conv.ptrs_to.AddLast(this); }; + ret_conv_13_arr[n] = ret_conv_13_hu_conv; } bindings.free_buffer(ret); - return ret_conv_43_arr; + return ret_conv_13_arr; + } + + /** + * Returns the [`PeerDetails`] of a connected peer that has completed the initial handshake. + * + * Will return `None` if the peer is unknown or it hasn't completed the initial handshake. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public PeerDetails peer_by_node_id(byte[] their_node_id) { + long ret = bindings.PeerManager_peer_by_node_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33))); + GC.KeepAlive(this); + GC.KeepAlive(their_node_id); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.PeerDetails ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.PeerDetails(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** diff --git a/c_sharp/src/org/ldk/structs/PendingHTLCRouting.cs b/c_sharp/src/org/ldk/structs/PendingHTLCRouting.cs index 3dbd49ed..b771b900 100644 --- a/c_sharp/src/org/ldk/structs/PendingHTLCRouting.cs +++ b/c_sharp/src/org/ldk/structs/PendingHTLCRouting.cs @@ -74,6 +74,13 @@ public class PendingHTLCRouting : CommonBase { * [`RecipientOnionFields::payment_metadata`]. */ public Option_CVec_u8ZZ payment_metadata; + /** + * The context of the payment included by the recipient in a blinded path, or `None` if a + * blinded path was not used. + * + * Used in part to determine the [`events::PaymentPurpose`]. + */ + public Option_PaymentContextZ payment_context; /** * CLTV expiry of the received HTLC. * @@ -109,6 +116,10 @@ public class PendingHTLCRouting : CommonBase { org.ldk.structs.Option_CVec_u8ZZ payment_metadata_hu_conv = org.ldk.structs.Option_CVec_u8ZZ.constr_from_ptr(payment_metadata); if (payment_metadata_hu_conv != null) { payment_metadata_hu_conv.ptrs_to.AddLast(this); }; this.payment_metadata = payment_metadata_hu_conv; + long payment_context = bindings.LDKPendingHTLCRouting_Receive_get_payment_context(ptr); + org.ldk.structs.Option_PaymentContextZ payment_context_hu_conv = org.ldk.structs.Option_PaymentContextZ.constr_from_ptr(payment_context); + if (payment_context_hu_conv != null) { payment_context_hu_conv.ptrs_to.AddLast(this); }; + this.payment_context = payment_context_hu_conv; this.incoming_cltv_expiry = bindings.LDKPendingHTLCRouting_Receive_get_incoming_cltv_expiry(ptr); long phantom_shared_secret = bindings.LDKPendingHTLCRouting_Receive_get_phantom_shared_secret(ptr); byte[] phantom_shared_secret_conv = InternalUtils.decodeUint8Array(phantom_shared_secret); @@ -164,6 +175,10 @@ public class PendingHTLCRouting : CommonBase { * [`RecipientOnionFields::custom_tlvs`]. */ public TwoTuple_u64CVec_u8ZZ[] custom_tlvs; + /** + * Set if this HTLC is the final hop in a multi-hop blinded path. + */ + public bool requires_blinded_error; internal PendingHTLCRouting_ReceiveKeysend(long ptr) : base(null, ptr) { long payment_data = bindings.LDKPendingHTLCRouting_ReceiveKeysend_get_payment_data(ptr); org.ldk.structs.FinalOnionHopData payment_data_hu_conv = null; if (payment_data < 0 || payment_data > 4096) { payment_data_hu_conv = new org.ldk.structs.FinalOnionHopData(null, payment_data); } @@ -188,6 +203,7 @@ public class PendingHTLCRouting : CommonBase { } bindings.free_buffer(custom_tlvs); this.custom_tlvs = custom_tlvs_conv_23_arr; + this.requires_blinded_error = bindings.LDKPendingHTLCRouting_ReceiveKeysend_get_requires_blinded_error(ptr); } } internal long clone_ptr() { @@ -212,7 +228,7 @@ public class PendingHTLCRouting : CommonBase { * Utility method to constructs a new Forward-variant PendingHTLCRouting */ public static PendingHTLCRouting forward(org.ldk.structs.OnionPacket onion_packet, long short_channel_id, org.ldk.structs.BlindedForward blinded) { - long ret = bindings.PendingHTLCRouting_forward(onion_packet == null ? 0 : onion_packet.ptr, short_channel_id, blinded == null ? 0 : blinded.ptr); + long ret = bindings.PendingHTLCRouting_forward(onion_packet.ptr, short_channel_id, blinded.ptr); GC.KeepAlive(onion_packet); GC.KeepAlive(short_channel_id); GC.KeepAlive(blinded); @@ -227,10 +243,11 @@ public class PendingHTLCRouting : CommonBase { /** * Utility method to constructs a new Receive-variant PendingHTLCRouting */ - public static PendingHTLCRouting receive(org.ldk.structs.FinalOnionHopData payment_data, org.ldk.structs.Option_CVec_u8ZZ payment_metadata, int incoming_cltv_expiry, byte[] phantom_shared_secret, TwoTuple_u64CVec_u8ZZ[] custom_tlvs, bool requires_blinded_error) { - long ret = bindings.PendingHTLCRouting_receive(payment_data == null ? 0 : payment_data.ptr, payment_metadata.ptr, incoming_cltv_expiry, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(phantom_shared_secret, 32)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(custom_tlvs, custom_tlvs_conv_23 => custom_tlvs_conv_23 != null ? custom_tlvs_conv_23.ptr : 0)), requires_blinded_error); + public static PendingHTLCRouting receive(org.ldk.structs.FinalOnionHopData payment_data, org.ldk.structs.Option_CVec_u8ZZ payment_metadata, org.ldk.structs.Option_PaymentContextZ payment_context, int incoming_cltv_expiry, byte[] phantom_shared_secret, TwoTuple_u64CVec_u8ZZ[] custom_tlvs, bool requires_blinded_error) { + long ret = bindings.PendingHTLCRouting_receive(payment_data.ptr, payment_metadata.ptr, payment_context.ptr, incoming_cltv_expiry, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(phantom_shared_secret, 32)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(custom_tlvs, custom_tlvs_conv_23 => custom_tlvs_conv_23.ptr)), requires_blinded_error); GC.KeepAlive(payment_data); GC.KeepAlive(payment_metadata); + GC.KeepAlive(payment_context); GC.KeepAlive(incoming_cltv_expiry); GC.KeepAlive(phantom_shared_secret); GC.KeepAlive(custom_tlvs); @@ -240,19 +257,21 @@ public class PendingHTLCRouting : CommonBase { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(payment_data); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(payment_metadata); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(payment_context); }; return ret_hu_conv; } /** * Utility method to constructs a new ReceiveKeysend-variant PendingHTLCRouting */ - public static PendingHTLCRouting receive_keysend(org.ldk.structs.FinalOnionHopData payment_data, byte[] payment_preimage, org.ldk.structs.Option_CVec_u8ZZ payment_metadata, int incoming_cltv_expiry, TwoTuple_u64CVec_u8ZZ[] custom_tlvs) { - long ret = bindings.PendingHTLCRouting_receive_keysend(payment_data == null ? 0 : payment_data.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_preimage, 32)), payment_metadata.ptr, incoming_cltv_expiry, InternalUtils.encodeUint64Array(InternalUtils.mapArray(custom_tlvs, custom_tlvs_conv_23 => custom_tlvs_conv_23 != null ? custom_tlvs_conv_23.ptr : 0))); + public static PendingHTLCRouting receive_keysend(org.ldk.structs.FinalOnionHopData payment_data, byte[] payment_preimage, org.ldk.structs.Option_CVec_u8ZZ payment_metadata, int incoming_cltv_expiry, TwoTuple_u64CVec_u8ZZ[] custom_tlvs, bool requires_blinded_error) { + long ret = bindings.PendingHTLCRouting_receive_keysend(payment_data.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_preimage, 32)), payment_metadata.ptr, incoming_cltv_expiry, InternalUtils.encodeUint64Array(InternalUtils.mapArray(custom_tlvs, custom_tlvs_conv_23 => custom_tlvs_conv_23.ptr)), requires_blinded_error); GC.KeepAlive(payment_data); GC.KeepAlive(payment_preimage); GC.KeepAlive(payment_metadata); GC.KeepAlive(incoming_cltv_expiry); GC.KeepAlive(custom_tlvs); + GC.KeepAlive(requires_blinded_error); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.PendingHTLCRouting ret_hu_conv = org.ldk.structs.PendingHTLCRouting.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; diff --git a/c_sharp/src/org/ldk/structs/Persist.cs b/c_sharp/src/org/ldk/structs/Persist.cs index 6cbed960..8ce9e19e 100644 --- a/c_sharp/src/org/ldk/structs/Persist.cs +++ b/c_sharp/src/org/ldk/structs/Persist.cs @@ -26,7 +26,7 @@ public interface PersistInterface { * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager * [`Writeable::write`]: crate::util::ser::Writeable::write */ - ChannelMonitorUpdateStatus persist_new_channel(OutPoint channel_id, ChannelMonitor data, MonitorUpdateId update_id); + ChannelMonitorUpdateStatus persist_new_channel(OutPoint channel_funding_outpoint, ChannelMonitor data, MonitorUpdateId update_id); /**Update one channel's data. The provided [`ChannelMonitor`] has already applied the given * update. * @@ -63,7 +63,13 @@ public interface PersistInterface { * * Note that update (or a relevant inner pointer) may be NULL or all-0s to represent None */ - ChannelMonitorUpdateStatus update_persisted_channel(OutPoint channel_id, ChannelMonitorUpdate update, ChannelMonitor data, MonitorUpdateId update_id); + ChannelMonitorUpdateStatus update_persisted_channel(OutPoint channel_funding_outpoint, ChannelMonitorUpdate update, ChannelMonitor data, MonitorUpdateId update_id); + /**Prevents the channel monitor from being loaded on startup. + * + * Archiving the data in a backup location (rather than deleting it fully) is useful for + * hedging against data loss in case of unexpected failure. + */ + void archive_persisted_channel(OutPoint channel_funding_outpoint); } /** @@ -137,28 +143,34 @@ public class Persist : CommonBase { internal LDKPersistImpl(PersistInterface arg, LDKPersistHolder impl_holder) { this.arg = arg; this.impl_holder = impl_holder; } private PersistInterface arg; private LDKPersistHolder impl_holder; - public ChannelMonitorUpdateStatus persist_new_channel(long _channel_id, long _data, long _update_id) { - org.ldk.structs.OutPoint _channel_id_hu_conv = null; if (_channel_id < 0 || _channel_id > 4096) { _channel_id_hu_conv = new org.ldk.structs.OutPoint(null, _channel_id); } - if (_channel_id_hu_conv != null) { _channel_id_hu_conv.ptrs_to.AddLast(this); }; + public ChannelMonitorUpdateStatus persist_new_channel(long _channel_funding_outpoint, long _data, long _update_id) { + org.ldk.structs.OutPoint _channel_funding_outpoint_hu_conv = null; if (_channel_funding_outpoint < 0 || _channel_funding_outpoint > 4096) { _channel_funding_outpoint_hu_conv = new org.ldk.structs.OutPoint(null, _channel_funding_outpoint); } + if (_channel_funding_outpoint_hu_conv != null) { _channel_funding_outpoint_hu_conv.ptrs_to.AddLast(this); }; org.ldk.structs.ChannelMonitor _data_hu_conv = null; if (_data < 0 || _data > 4096) { _data_hu_conv = new org.ldk.structs.ChannelMonitor(null, _data); } org.ldk.structs.MonitorUpdateId _update_id_hu_conv = null; if (_update_id < 0 || _update_id > 4096) { _update_id_hu_conv = new org.ldk.structs.MonitorUpdateId(null, _update_id); } if (_update_id_hu_conv != null) { _update_id_hu_conv.ptrs_to.AddLast(this); }; - ChannelMonitorUpdateStatus ret = arg.persist_new_channel(_channel_id_hu_conv, _data_hu_conv, _update_id_hu_conv); + ChannelMonitorUpdateStatus ret = arg.persist_new_channel(_channel_funding_outpoint_hu_conv, _data_hu_conv, _update_id_hu_conv); GC.KeepAlive(arg); return ret; } - public ChannelMonitorUpdateStatus update_persisted_channel(long _channel_id, long _update, long _data, long _update_id) { - org.ldk.structs.OutPoint _channel_id_hu_conv = null; if (_channel_id < 0 || _channel_id > 4096) { _channel_id_hu_conv = new org.ldk.structs.OutPoint(null, _channel_id); } - if (_channel_id_hu_conv != null) { _channel_id_hu_conv.ptrs_to.AddLast(this); }; + public ChannelMonitorUpdateStatus update_persisted_channel(long _channel_funding_outpoint, long _update, long _data, long _update_id) { + org.ldk.structs.OutPoint _channel_funding_outpoint_hu_conv = null; if (_channel_funding_outpoint < 0 || _channel_funding_outpoint > 4096) { _channel_funding_outpoint_hu_conv = new org.ldk.structs.OutPoint(null, _channel_funding_outpoint); } + if (_channel_funding_outpoint_hu_conv != null) { _channel_funding_outpoint_hu_conv.ptrs_to.AddLast(this); }; org.ldk.structs.ChannelMonitorUpdate _update_hu_conv = null; if (_update < 0 || _update > 4096) { _update_hu_conv = new org.ldk.structs.ChannelMonitorUpdate(null, _update); } if (_update_hu_conv != null) { _update_hu_conv.ptrs_to.AddLast(this); }; org.ldk.structs.ChannelMonitor _data_hu_conv = null; if (_data < 0 || _data > 4096) { _data_hu_conv = new org.ldk.structs.ChannelMonitor(null, _data); } org.ldk.structs.MonitorUpdateId _update_id_hu_conv = null; if (_update_id < 0 || _update_id > 4096) { _update_id_hu_conv = new org.ldk.structs.MonitorUpdateId(null, _update_id); } if (_update_id_hu_conv != null) { _update_id_hu_conv.ptrs_to.AddLast(this); }; - ChannelMonitorUpdateStatus ret = arg.update_persisted_channel(_channel_id_hu_conv, _update_hu_conv, _data_hu_conv, _update_id_hu_conv); + ChannelMonitorUpdateStatus ret = arg.update_persisted_channel(_channel_funding_outpoint_hu_conv, _update_hu_conv, _data_hu_conv, _update_id_hu_conv); GC.KeepAlive(arg); return ret; } + public void archive_persisted_channel(long _channel_funding_outpoint) { + org.ldk.structs.OutPoint _channel_funding_outpoint_hu_conv = null; if (_channel_funding_outpoint < 0 || _channel_funding_outpoint > 4096) { _channel_funding_outpoint_hu_conv = new org.ldk.structs.OutPoint(null, _channel_funding_outpoint); } + if (_channel_funding_outpoint_hu_conv != null) { _channel_funding_outpoint_hu_conv.ptrs_to.AddLast(this); }; + arg.archive_persisted_channel(_channel_funding_outpoint_hu_conv); + GC.KeepAlive(arg); + } } /** Creates a new instance of Persist from a given implementation */ @@ -190,13 +202,13 @@ public class Persist : CommonBase { * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager * [`Writeable::write`]: crate::util::ser::Writeable::write */ - public ChannelMonitorUpdateStatus persist_new_channel(org.ldk.structs.OutPoint channel_id, org.ldk.structs.ChannelMonitor data, org.ldk.structs.MonitorUpdateId update_id) { - ChannelMonitorUpdateStatus ret = bindings.Persist_persist_new_channel(this.ptr, channel_id == null ? 0 : channel_id.ptr, data == null ? 0 : data.ptr, update_id == null ? 0 : update_id.ptr); + public ChannelMonitorUpdateStatus persist_new_channel(org.ldk.structs.OutPoint channel_funding_outpoint, org.ldk.structs.ChannelMonitor data, org.ldk.structs.MonitorUpdateId update_id) { + ChannelMonitorUpdateStatus ret = bindings.Persist_persist_new_channel(this.ptr, channel_funding_outpoint.ptr, data.ptr, update_id.ptr); GC.KeepAlive(this); - GC.KeepAlive(channel_id); + GC.KeepAlive(channel_funding_outpoint); GC.KeepAlive(data); GC.KeepAlive(update_id); - if (this != null) { this.ptrs_to.AddLast(channel_id); }; + if (this != null) { this.ptrs_to.AddLast(channel_funding_outpoint); }; if (this != null) { this.ptrs_to.AddLast(data); }; if (this != null) { this.ptrs_to.AddLast(update_id); }; return ret; @@ -239,19 +251,32 @@ public class Persist : CommonBase { * * Note that update (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public ChannelMonitorUpdateStatus update_persisted_channel(org.ldk.structs.OutPoint channel_id, org.ldk.structs.ChannelMonitorUpdate update, org.ldk.structs.ChannelMonitor data, org.ldk.structs.MonitorUpdateId update_id) { - ChannelMonitorUpdateStatus ret = bindings.Persist_update_persisted_channel(this.ptr, channel_id == null ? 0 : channel_id.ptr, update == null ? 0 : update.ptr, data == null ? 0 : data.ptr, update_id == null ? 0 : update_id.ptr); + public ChannelMonitorUpdateStatus update_persisted_channel(org.ldk.structs.OutPoint channel_funding_outpoint, org.ldk.structs.ChannelMonitorUpdate update, org.ldk.structs.ChannelMonitor data, org.ldk.structs.MonitorUpdateId update_id) { + ChannelMonitorUpdateStatus ret = bindings.Persist_update_persisted_channel(this.ptr, channel_funding_outpoint.ptr, update == null ? 0 : update.ptr, data.ptr, update_id.ptr); GC.KeepAlive(this); - GC.KeepAlive(channel_id); + GC.KeepAlive(channel_funding_outpoint); GC.KeepAlive(update); GC.KeepAlive(data); GC.KeepAlive(update_id); - if (this != null) { this.ptrs_to.AddLast(channel_id); }; + if (this != null) { this.ptrs_to.AddLast(channel_funding_outpoint); }; if (this != null) { this.ptrs_to.AddLast(update); }; if (this != null) { this.ptrs_to.AddLast(data); }; if (this != null) { this.ptrs_to.AddLast(update_id); }; return ret; } + /** + * Prevents the channel monitor from being loaded on startup. + * + * Archiving the data in a backup location (rather than deleting it fully) is useful for + * hedging against data loss in case of unexpected failure. + */ + public void archive_persisted_channel(org.ldk.structs.OutPoint channel_funding_outpoint) { + bindings.Persist_archive_persisted_channel(this.ptr, channel_funding_outpoint.ptr); + GC.KeepAlive(this); + GC.KeepAlive(channel_funding_outpoint); + if (this != null) { this.ptrs_to.AddLast(channel_funding_outpoint); }; + } + } } } } diff --git a/c_sharp/src/org/ldk/structs/Persister.cs b/c_sharp/src/org/ldk/structs/Persister.cs index 6f707579..b28ea22b 100644 --- a/c_sharp/src/org/ldk/structs/Persister.cs +++ b/c_sharp/src/org/ldk/structs/Persister.cs @@ -11,6 +11,8 @@ namespace org { namespace ldk { namespace structs { /** An implementation of Persister */ public interface PersisterInterface { /**Persist the given ['ChannelManager'] to disk, returning an error if persistence failed. + * + * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager */ Result_NoneIOErrorZ persist_manager(ChannelManager channel_manager); /**Persist the given [`NetworkGraph`] to disk, returning an error if persistence failed. @@ -23,6 +25,8 @@ public interface PersisterInterface { /** * Trait that handles persisting a [`ChannelManager`], [`NetworkGraph`], and [`WriteableScore`] to disk. + * + * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager */ public class Persister : CommonBase { internal bindings.LDKPersister bindings_instance; @@ -42,14 +46,14 @@ public class Persister : CommonBase { org.ldk.structs.ChannelManager _channel_manager_hu_conv = null; if (_channel_manager < 0 || _channel_manager > 4096) { _channel_manager_hu_conv = new org.ldk.structs.ChannelManager(null, _channel_manager); } Result_NoneIOErrorZ ret = arg.persist_manager(_channel_manager_hu_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long persist_graph(long _network_graph) { org.ldk.structs.NetworkGraph _network_graph_hu_conv = null; if (_network_graph < 0 || _network_graph > 4096) { _network_graph_hu_conv = new org.ldk.structs.NetworkGraph(null, _network_graph); } Result_NoneIOErrorZ ret = arg.persist_graph(_network_graph_hu_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long persist_scorer(long _scorer) { @@ -57,7 +61,7 @@ public class Persister : CommonBase { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; Result_NoneIOErrorZ ret = arg.persist_scorer(ret_hu_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } } @@ -76,9 +80,11 @@ public class Persister : CommonBase { /** * Persist the given ['ChannelManager'] to disk, returning an error if persistence failed. + * + * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager */ public Result_NoneIOErrorZ persist_manager(org.ldk.structs.ChannelManager channel_manager) { - long ret = bindings.Persister_persist_manager(this.ptr, channel_manager == null ? 0 : channel_manager.ptr); + long ret = bindings.Persister_persist_manager(this.ptr, channel_manager.ptr); GC.KeepAlive(this); GC.KeepAlive(channel_manager); if (ret >= 0 && ret <= 4096) { return null; } @@ -91,7 +97,7 @@ public class Persister : CommonBase { * Persist the given [`NetworkGraph`] to disk, returning an error if persistence failed. */ public Result_NoneIOErrorZ persist_graph(org.ldk.structs.NetworkGraph network_graph) { - long ret = bindings.Persister_persist_graph(this.ptr, network_graph == null ? 0 : network_graph.ptr); + long ret = bindings.Persister_persist_graph(this.ptr, network_graph.ptr); GC.KeepAlive(this); GC.KeepAlive(network_graph); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/c_sharp/src/org/ldk/structs/PhantomKeysManager.cs b/c_sharp/src/org/ldk/structs/PhantomKeysManager.cs index 1453a891..b960f847 100644 --- a/c_sharp/src/org/ldk/structs/PhantomKeysManager.cs +++ b/c_sharp/src/org/ldk/structs/PhantomKeysManager.cs @@ -55,6 +55,19 @@ public class PhantomKeysManager : CommonBase { return ret_hu_conv; } + /** + * Constructs a new OutputSpender which calls the relevant methods on this_arg. + * This copies the `inner` pointer in this_arg and thus the returned OutputSpender must be freed before this_arg is + */ + public OutputSpender as_OutputSpender() { + long ret = bindings.PhantomKeysManager_as_OutputSpender(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + OutputSpender ret_hu_conv = new OutputSpender(null, ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + /** * Constructs a new SignerProvider which calls the relevant methods on this_arg. * This copies the `inner` pointer in this_arg and thus the returned SignerProvider must be freed before this_arg is @@ -93,24 +106,6 @@ public class PhantomKeysManager : CommonBase { return ret_hu_conv; } - /** - * See [`KeysManager::spend_spendable_outputs`] for documentation on this method. - */ - public Result_TransactionNoneZ spend_spendable_outputs(SpendableOutputDescriptor[] descriptors, TxOut[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, org.ldk.structs.Option_u32Z locktime) { - long ret = bindings.PhantomKeysManager_spend_spendable_outputs(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(descriptors, descriptors_conv_27 => descriptors_conv_27.ptr)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(outputs, outputs_conv_7 => outputs_conv_7.ptr)), InternalUtils.encodeUint8Array(change_destination_script), feerate_sat_per_1000_weight, locktime.ptr); - GC.KeepAlive(this); - GC.KeepAlive(descriptors); - GC.KeepAlive(outputs); - GC.KeepAlive(change_destination_script); - GC.KeepAlive(feerate_sat_per_1000_weight); - GC.KeepAlive(locktime); - if (ret >= 0 && ret <= 4096) { return null; } - Result_TransactionNoneZ ret_hu_conv = Result_TransactionNoneZ.constr_from_ptr(ret); - foreach (SpendableOutputDescriptor descriptors_conv_27 in descriptors) { if (this != null) { this.ptrs_to.AddLast(descriptors_conv_27); }; }; - if (this != null) { this.ptrs_to.AddLast(locktime); }; - return ret_hu_conv; - } - /** * See [`KeysManager::derive_channel_keys`] for documentation on this method. */ diff --git a/c_sharp/src/org/ldk/structs/PhantomRouteHints.cs b/c_sharp/src/org/ldk/structs/PhantomRouteHints.cs index e6587b8b..1ff36125 100644 --- a/c_sharp/src/org/ldk/structs/PhantomRouteHints.cs +++ b/c_sharp/src/org/ldk/structs/PhantomRouteHints.cs @@ -40,7 +40,7 @@ public class PhantomRouteHints : CommonBase { * The list of channels to be included in the invoice route hints. */ public void set_channels(ChannelDetails[] val) { - bindings.PhantomRouteHints_set_channels(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(val, val_conv_16 => val_conv_16 == null ? 0 : val_conv_16.ptr))); + bindings.PhantomRouteHints_set_channels(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(val, val_conv_16 => val_conv_16.ptr))); GC.KeepAlive(this); GC.KeepAlive(val); foreach (ChannelDetails val_conv_16 in val) { if (this != null) { this.ptrs_to.AddLast(val_conv_16); }; }; @@ -90,7 +90,7 @@ public class PhantomRouteHints : CommonBase { * Constructs a new PhantomRouteHints given each field */ public static PhantomRouteHints of(ChannelDetails[] channels_arg, long phantom_scid_arg, byte[] real_node_pubkey_arg) { - long ret = bindings.PhantomRouteHints_new(InternalUtils.encodeUint64Array(InternalUtils.mapArray(channels_arg, channels_arg_conv_16 => channels_arg_conv_16 == null ? 0 : channels_arg_conv_16.ptr)), phantom_scid_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(real_node_pubkey_arg, 33))); + long ret = bindings.PhantomRouteHints_new(InternalUtils.encodeUint64Array(InternalUtils.mapArray(channels_arg, channels_arg_conv_16 => channels_arg_conv_16.ptr)), phantom_scid_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(real_node_pubkey_arg, 33))); GC.KeepAlive(channels_arg); GC.KeepAlive(phantom_scid_arg); GC.KeepAlive(real_node_pubkey_arg); diff --git a/c_sharp/src/org/ldk/structs/Ping.cs b/c_sharp/src/org/ldk/structs/Ping.cs index cf5d834d..9888a26a 100644 --- a/c_sharp/src/org/ldk/structs/Ping.cs +++ b/c_sharp/src/org/ldk/structs/Ping.cs @@ -106,7 +106,7 @@ public class Ping : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.Ping b) { - bool ret = bindings.Ping_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.Ping_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/Pong.cs b/c_sharp/src/org/ldk/structs/Pong.cs index 7d31da14..46f56734 100644 --- a/c_sharp/src/org/ldk/structs/Pong.cs +++ b/c_sharp/src/org/ldk/structs/Pong.cs @@ -87,7 +87,7 @@ public class Pong : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.Pong b) { - bool ret = bindings.Pong_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.Pong_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/PositiveTimestamp.cs b/c_sharp/src/org/ldk/structs/PositiveTimestamp.cs index ad36693d..3da143ff 100644 --- a/c_sharp/src/org/ldk/structs/PositiveTimestamp.cs +++ b/c_sharp/src/org/ldk/structs/PositiveTimestamp.cs @@ -26,7 +26,7 @@ public class PositiveTimestamp : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.PositiveTimestamp b) { - bool ret = bindings.PositiveTimestamp_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.PositiveTimestamp_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/PrivateRoute.cs b/c_sharp/src/org/ldk/structs/PrivateRoute.cs index 96e69604..8c6f7f70 100644 --- a/c_sharp/src/org/ldk/structs/PrivateRoute.cs +++ b/c_sharp/src/org/ldk/structs/PrivateRoute.cs @@ -54,7 +54,7 @@ public class PrivateRoute : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.PrivateRoute b) { - bool ret = bindings.PrivateRoute_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.PrivateRoute_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; @@ -69,7 +69,7 @@ public class PrivateRoute : CommonBase { * Creates a new (partial) route from a list of hops */ public static Result_PrivateRouteCreationErrorZ of(org.ldk.structs.RouteHint hops) { - long ret = bindings.PrivateRoute_new(hops == null ? 0 : hops.ptr); + long ret = bindings.PrivateRoute_new(hops.ptr); GC.KeepAlive(hops); if (ret >= 0 && ret <= 4096) { return null; } Result_PrivateRouteCreationErrorZ ret_hu_conv = Result_PrivateRouteCreationErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/ProbabilisticScorer.cs b/c_sharp/src/org/ldk/structs/ProbabilisticScorer.cs index 333e3ab4..bffdc449 100644 --- a/c_sharp/src/org/ldk/structs/ProbabilisticScorer.cs +++ b/c_sharp/src/org/ldk/structs/ProbabilisticScorer.cs @@ -50,7 +50,7 @@ public class ProbabilisticScorer : CommonBase { * through a network graph. */ public static ProbabilisticScorer of(org.ldk.structs.ProbabilisticScoringDecayParameters decay_params, org.ldk.structs.NetworkGraph network_graph, org.ldk.structs.Logger logger) { - long ret = bindings.ProbabilisticScorer_new(decay_params == null ? 0 : decay_params.ptr, network_graph == null ? 0 : network_graph.ptr, logger.ptr); + long ret = bindings.ProbabilisticScorer_new(decay_params.ptr, network_graph.ptr, logger.ptr); GC.KeepAlive(decay_params); GC.KeepAlive(network_graph); GC.KeepAlive(logger); @@ -79,7 +79,7 @@ public class ProbabilisticScorer : CommonBase { * channel with `scid` towards the given `target` node. */ public Option_C2Tuple_u64u64ZZ estimated_channel_liquidity_range(long scid, org.ldk.structs.NodeId target) { - long ret = bindings.ProbabilisticScorer_estimated_channel_liquidity_range(this.ptr, scid, target == null ? 0 : target.ptr); + long ret = bindings.ProbabilisticScorer_estimated_channel_liquidity_range(this.ptr, scid, target.ptr); GC.KeepAlive(this); GC.KeepAlive(scid); GC.KeepAlive(target); @@ -119,7 +119,7 @@ public class ProbabilisticScorer : CommonBase { * the scoring model, see [`Self::historical_estimated_payment_success_probability`]. */ public Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ historical_estimated_channel_liquidity_probabilities(long scid, org.ldk.structs.NodeId target) { - long ret = bindings.ProbabilisticScorer_historical_estimated_channel_liquidity_probabilities(this.ptr, scid, target == null ? 0 : target.ptr); + long ret = bindings.ProbabilisticScorer_historical_estimated_channel_liquidity_probabilities(this.ptr, scid, target.ptr); GC.KeepAlive(this); GC.KeepAlive(scid); GC.KeepAlive(target); @@ -140,7 +140,7 @@ public class ProbabilisticScorer : CommonBase { * [`Self::estimated_channel_liquidity_range`]). */ public Option_f64Z historical_estimated_payment_success_probability(long scid, org.ldk.structs.NodeId target, long amount_msat, org.ldk.structs.ProbabilisticScoringFeeParameters _params) { - long ret = bindings.ProbabilisticScorer_historical_estimated_payment_success_probability(this.ptr, scid, target == null ? 0 : target.ptr, amount_msat, _params == null ? 0 : _params.ptr); + long ret = bindings.ProbabilisticScorer_historical_estimated_payment_success_probability(this.ptr, scid, target.ptr, amount_msat, _params.ptr); GC.KeepAlive(this); GC.KeepAlive(scid); GC.KeepAlive(target); @@ -208,7 +208,7 @@ public class ProbabilisticScorer : CommonBase { * Read a ProbabilisticScorer from a byte array, created by ProbabilisticScorer_write */ public static Result_ProbabilisticScorerDecodeErrorZ read(byte[] ser, org.ldk.structs.ProbabilisticScoringDecayParameters arg_a, org.ldk.structs.NetworkGraph arg_b, org.ldk.structs.Logger arg_c) { - long ret = bindings.ProbabilisticScorer_read(InternalUtils.encodeUint8Array(ser), arg_a == null ? 0 : arg_a.ptr, arg_b == null ? 0 : arg_b.ptr, arg_c.ptr); + long ret = bindings.ProbabilisticScorer_read(InternalUtils.encodeUint8Array(ser), arg_a.ptr, arg_b.ptr, arg_c.ptr); GC.KeepAlive(ser); GC.KeepAlive(arg_a); GC.KeepAlive(arg_b); diff --git a/c_sharp/src/org/ldk/structs/ProbabilisticScoringFeeParameters.cs b/c_sharp/src/org/ldk/structs/ProbabilisticScoringFeeParameters.cs index c901c71d..f22e31df 100644 --- a/c_sharp/src/org/ldk/structs/ProbabilisticScoringFeeParameters.cs +++ b/c_sharp/src/org/ldk/structs/ProbabilisticScoringFeeParameters.cs @@ -457,7 +457,7 @@ public class ProbabilisticScoringFeeParameters : CommonBase { * i.e it will be avoided during path finding. */ public void add_banned(org.ldk.structs.NodeId node_id) { - bindings.ProbabilisticScoringFeeParameters_add_banned(this.ptr, node_id == null ? 0 : node_id.ptr); + bindings.ProbabilisticScoringFeeParameters_add_banned(this.ptr, node_id.ptr); GC.KeepAlive(this); GC.KeepAlive(node_id); if (this != null) { this.ptrs_to.AddLast(node_id); }; @@ -468,7 +468,7 @@ public class ProbabilisticScoringFeeParameters : CommonBase { * they will be avoided during path finding. */ public void add_banned_from_list(NodeId[] node_ids) { - bindings.ProbabilisticScoringFeeParameters_add_banned_from_list(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(node_ids, node_ids_conv_8 => node_ids_conv_8 == null ? 0 : node_ids_conv_8.ptr))); + bindings.ProbabilisticScoringFeeParameters_add_banned_from_list(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(node_ids, node_ids_conv_8 => node_ids_conv_8.ptr))); GC.KeepAlive(this); GC.KeepAlive(node_ids); foreach (NodeId node_ids_conv_8 in node_ids) { if (this != null) { this.ptrs_to.AddLast(node_ids_conv_8); }; }; @@ -478,7 +478,7 @@ public class ProbabilisticScoringFeeParameters : CommonBase { * Removes the node with the given `node_id` from the list of nodes to avoid. */ public void remove_banned(org.ldk.structs.NodeId node_id) { - bindings.ProbabilisticScoringFeeParameters_remove_banned(this.ptr, node_id == null ? 0 : node_id.ptr); + bindings.ProbabilisticScoringFeeParameters_remove_banned(this.ptr, node_id.ptr); GC.KeepAlive(this); GC.KeepAlive(node_id); if (this != null) { this.ptrs_to.AddLast(node_id); }; @@ -488,7 +488,7 @@ public class ProbabilisticScoringFeeParameters : CommonBase { * Sets a manual penalty for the given node. */ public void set_manual_penalty(org.ldk.structs.NodeId node_id, long penalty) { - bindings.ProbabilisticScoringFeeParameters_set_manual_penalty(this.ptr, node_id == null ? 0 : node_id.ptr, penalty); + bindings.ProbabilisticScoringFeeParameters_set_manual_penalty(this.ptr, node_id.ptr, penalty); GC.KeepAlive(this); GC.KeepAlive(node_id); GC.KeepAlive(penalty); @@ -499,7 +499,7 @@ public class ProbabilisticScoringFeeParameters : CommonBase { * Removes the node with the given `node_id` from the list of manual penalties. */ public void remove_manual_penalty(org.ldk.structs.NodeId node_id) { - bindings.ProbabilisticScoringFeeParameters_remove_manual_penalty(this.ptr, node_id == null ? 0 : node_id.ptr); + bindings.ProbabilisticScoringFeeParameters_remove_manual_penalty(this.ptr, node_id.ptr); GC.KeepAlive(this); GC.KeepAlive(node_id); if (this != null) { this.ptrs_to.AddLast(node_id); }; diff --git a/c_sharp/src/org/ldk/structs/ProbeSendFailure.cs b/c_sharp/src/org/ldk/structs/ProbeSendFailure.cs index 34ec6c6a..fec1e3e7 100644 --- a/c_sharp/src/org/ldk/structs/ProbeSendFailure.cs +++ b/c_sharp/src/org/ldk/structs/ProbeSendFailure.cs @@ -89,7 +89,7 @@ public class ProbeSendFailure : CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public bool eq(org.ldk.structs.ProbeSendFailure b) { - bool ret = bindings.ProbeSendFailure_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.ProbeSendFailure_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); return ret; diff --git a/c_sharp/src/org/ldk/structs/Quantity.cs b/c_sharp/src/org/ldk/structs/Quantity.cs index 4cda4d9b..3ebea35c 100644 --- a/c_sharp/src/org/ldk/structs/Quantity.cs +++ b/c_sharp/src/org/ldk/structs/Quantity.cs @@ -5,16 +5,43 @@ using System; namespace org { namespace ldk { namespace structs { - /** * Quantity of items supported by an [`Offer`]. */ public class Quantity : CommonBase { - internal Quantity(object _dummy, long ptr) : base(ptr) { } + protected Quantity(object _dummy, long ptr) : base(ptr) { } ~Quantity() { if (ptr != 0) { bindings.Quantity_free(ptr); } } + internal static Quantity constr_from_ptr(long ptr) { + long raw_ty = bindings.LDKQuantity_ty_from_ptr(ptr); + switch (raw_ty) { + case 0: return new Quantity_Bounded(ptr); + case 1: return new Quantity_Unbounded(ptr); + case 2: return new Quantity_One(ptr); + default: + throw new ArgumentException("Impossible enum variant"); + } + } + + /** A Quantity of type Bounded */ + public class Quantity_Bounded : Quantity { + public long bounded; + internal Quantity_Bounded(long ptr) : base(null, ptr) { + this.bounded = bindings.LDKQuantity_Bounded_get_bounded(ptr); + } + } + /** A Quantity of type Unbounded */ + public class Quantity_Unbounded : Quantity { + internal Quantity_Unbounded(long ptr) : base(null, ptr) { + } + } + /** A Quantity of type One */ + public class Quantity_One : Quantity { + internal Quantity_One(long ptr) : base(null, ptr) { + } + } internal long clone_ptr() { long ret = bindings.Quantity_clone_ptr(this.ptr); GC.KeepAlive(this); @@ -28,10 +55,44 @@ public class Quantity : CommonBase { long ret = bindings.Quantity_clone(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Quantity ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Quantity(null, ret); } + org.ldk.structs.Quantity ret_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; return ret_hu_conv; } + /** + * Utility method to constructs a new Bounded-variant Quantity + */ + public static Quantity bounded(long a) { + long ret = bindings.Quantity_bounded(a); + GC.KeepAlive(a); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Quantity ret_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new Unbounded-variant Quantity + */ + public static Quantity unbounded() { + long ret = bindings.Quantity_unbounded(); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Quantity ret_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new One-variant Quantity + */ + public static Quantity one() { + long ret = bindings.Quantity_one(); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Quantity ret_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + } } } } diff --git a/c_sharp/src/org/ldk/structs/QueryChannelRange.cs b/c_sharp/src/org/ldk/structs/QueryChannelRange.cs index 869c1ac5..4b1f7f62 100644 --- a/c_sharp/src/org/ldk/structs/QueryChannelRange.cs +++ b/c_sharp/src/org/ldk/structs/QueryChannelRange.cs @@ -126,7 +126,7 @@ public class QueryChannelRange : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.QueryChannelRange b) { - bool ret = bindings.QueryChannelRange_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.QueryChannelRange_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/QueryShortChannelIds.cs b/c_sharp/src/org/ldk/structs/QueryShortChannelIds.cs index 318c3ac4..3158cea4 100644 --- a/c_sharp/src/org/ldk/structs/QueryShortChannelIds.cs +++ b/c_sharp/src/org/ldk/structs/QueryShortChannelIds.cs @@ -116,7 +116,7 @@ public class QueryShortChannelIds : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.QueryShortChannelIds b) { - bool ret = bindings.QueryShortChannelIds_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.QueryShortChannelIds_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/RandomBytes.cs b/c_sharp/src/org/ldk/structs/RandomBytes.cs new file mode 100644 index 00000000..dc32b621 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/RandomBytes.cs @@ -0,0 +1,44 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + + +/** + * An implementation of [`EntropySource`] using ChaCha20. + */ +public class RandomBytes : CommonBase { + internal RandomBytes(object _dummy, long ptr) : base(ptr) { } + ~RandomBytes() { + if (ptr != 0) { bindings.RandomBytes_free(ptr); } + } + + /** + * Creates a new instance using the given seed. + */ + public static RandomBytes of(byte[] seed) { + long ret = bindings.RandomBytes_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(seed, 32))); + GC.KeepAlive(seed); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.RandomBytes ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.RandomBytes(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Constructs a new EntropySource which calls the relevant methods on this_arg. + * This copies the `inner` pointer in this_arg and thus the returned EntropySource must be freed before this_arg is + */ + public EntropySource as_EntropySource() { + long ret = bindings.RandomBytes_as_EntropySource(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + EntropySource ret_hu_conv = new EntropySource(null, ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/RapidGossipSync.cs b/c_sharp/src/org/ldk/structs/RapidGossipSync.cs index 3937e289..02731cf2 100644 --- a/c_sharp/src/org/ldk/structs/RapidGossipSync.cs +++ b/c_sharp/src/org/ldk/structs/RapidGossipSync.cs @@ -23,7 +23,7 @@ public class RapidGossipSync : CommonBase { * Instantiate a new [`RapidGossipSync`] instance. */ public static RapidGossipSync of(org.ldk.structs.NetworkGraph network_graph, org.ldk.structs.Logger logger) { - long ret = bindings.RapidGossipSync_new(network_graph == null ? 0 : network_graph.ptr, logger.ptr); + long ret = bindings.RapidGossipSync_new(network_graph.ptr, logger.ptr); GC.KeepAlive(network_graph); GC.KeepAlive(logger); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/c_sharp/src/org/ldk/structs/RawBolt11Invoice.cs b/c_sharp/src/org/ldk/structs/RawBolt11Invoice.cs index 6eab6a88..8f3d8111 100644 --- a/c_sharp/src/org/ldk/structs/RawBolt11Invoice.cs +++ b/c_sharp/src/org/ldk/structs/RawBolt11Invoice.cs @@ -35,7 +35,7 @@ public class RawBolt11Invoice : CommonBase { * data part */ public void set_data(org.ldk.structs.RawDataPart val) { - bindings.RawBolt11Invoice_set_data(this.ptr, val == null ? 0 : val.ptr); + bindings.RawBolt11Invoice_set_data(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -47,7 +47,7 @@ public class RawBolt11Invoice : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.RawBolt11Invoice b) { - bool ret = bindings.RawBolt11Invoice_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.RawBolt11Invoice_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; @@ -217,6 +217,9 @@ public class RawBolt11Invoice : CommonBase { return ret_conv_14_arr; } + /** + * Returns `None` if no amount is set or on overflow. + */ public Option_u64Z amount_pico_btc() { long ret = bindings.RawBolt11Invoice_amount_pico_btc(this.ptr); GC.KeepAlive(this); diff --git a/c_sharp/src/org/ldk/structs/RawDataPart.cs b/c_sharp/src/org/ldk/structs/RawDataPart.cs index 681dde88..c63b214a 100644 --- a/c_sharp/src/org/ldk/structs/RawDataPart.cs +++ b/c_sharp/src/org/ldk/structs/RawDataPart.cs @@ -31,7 +31,7 @@ public class RawDataPart : CommonBase { * generation time of the invoice */ public void set_timestamp(org.ldk.structs.PositiveTimestamp val) { - bindings.RawDataPart_set_timestamp(this.ptr, val == null ? 0 : val.ptr); + bindings.RawDataPart_set_timestamp(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -43,7 +43,7 @@ public class RawDataPart : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.RawDataPart b) { - bool ret = bindings.RawDataPart_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.RawDataPart_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/ReadOnlyNetworkGraph.cs b/c_sharp/src/org/ldk/structs/ReadOnlyNetworkGraph.cs index 0434b890..1a0a1ebd 100644 --- a/c_sharp/src/org/ldk/structs/ReadOnlyNetworkGraph.cs +++ b/c_sharp/src/org/ldk/structs/ReadOnlyNetworkGraph.cs @@ -47,7 +47,7 @@ public class ReadOnlyNetworkGraph : CommonBase, IDisposable { * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ public NodeInfo node(org.ldk.structs.NodeId node_id) { - long ret = bindings.ReadOnlyNetworkGraph_node(this.ptr, node_id == null ? 0 : node_id.ptr); + long ret = bindings.ReadOnlyNetworkGraph_node(this.ptr, node_id.ptr); GC.KeepAlive(this); GC.KeepAlive(node_id); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/c_sharp/src/org/ldk/structs/ReceiveTlvs.cs b/c_sharp/src/org/ldk/structs/ReceiveTlvs.cs index 63b088ee..bccc65e3 100644 --- a/c_sharp/src/org/ldk/structs/ReceiveTlvs.cs +++ b/c_sharp/src/org/ldk/structs/ReceiveTlvs.cs @@ -52,7 +52,29 @@ public class ReceiveTlvs : CommonBase { * Constraints for the receiver of this payment. */ public void set_payment_constraints(org.ldk.structs.PaymentConstraints val) { - bindings.ReceiveTlvs_set_payment_constraints(this.ptr, val == null ? 0 : val.ptr); + bindings.ReceiveTlvs_set_payment_constraints(this.ptr, val.ptr); + GC.KeepAlive(this); + GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; + } + + /** + * Context for the receiver of this payment. + */ + public PaymentContext get_payment_context() { + long ret = bindings.ReceiveTlvs_get_payment_context(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.PaymentContext ret_hu_conv = org.ldk.structs.PaymentContext.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Context for the receiver of this payment. + */ + public void set_payment_context(org.ldk.structs.PaymentContext val) { + bindings.ReceiveTlvs_set_payment_context(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -61,14 +83,16 @@ public class ReceiveTlvs : CommonBase { /** * Constructs a new ReceiveTlvs given each field */ - public static ReceiveTlvs of(byte[] payment_secret_arg, org.ldk.structs.PaymentConstraints payment_constraints_arg) { - long ret = bindings.ReceiveTlvs_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_secret_arg, 32)), payment_constraints_arg == null ? 0 : payment_constraints_arg.ptr); + public static ReceiveTlvs of(byte[] payment_secret_arg, org.ldk.structs.PaymentConstraints payment_constraints_arg, org.ldk.structs.PaymentContext payment_context_arg) { + long ret = bindings.ReceiveTlvs_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_secret_arg, 32)), payment_constraints_arg.ptr, payment_context_arg.ptr); GC.KeepAlive(payment_secret_arg); GC.KeepAlive(payment_constraints_arg); + GC.KeepAlive(payment_context_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.ReceiveTlvs ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ReceiveTlvs(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(payment_constraints_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(payment_context_arg); }; return ret_hu_conv; } diff --git a/c_sharp/src/org/ldk/structs/RecipientOnionFields.cs b/c_sharp/src/org/ldk/structs/RecipientOnionFields.cs index 219c2911..cec4805f 100644 --- a/c_sharp/src/org/ldk/structs/RecipientOnionFields.cs +++ b/c_sharp/src/org/ldk/structs/RecipientOnionFields.cs @@ -130,7 +130,7 @@ public class RecipientOnionFields : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.RecipientOnionFields b) { - bool ret = bindings.RecipientOnionFields_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.RecipientOnionFields_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; @@ -207,7 +207,7 @@ public class RecipientOnionFields : CommonBase { * See [`Self::custom_tlvs`] for more info. */ public Result_RecipientOnionFieldsNoneZ with_custom_tlvs(TwoTuple_u64CVec_u8ZZ[] custom_tlvs) { - long ret = bindings.RecipientOnionFields_with_custom_tlvs(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(custom_tlvs, custom_tlvs_conv_23 => custom_tlvs_conv_23 != null ? custom_tlvs_conv_23.ptr : 0))); + long ret = bindings.RecipientOnionFields_with_custom_tlvs(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(custom_tlvs, custom_tlvs_conv_23 => custom_tlvs_conv_23.ptr))); GC.KeepAlive(this); GC.KeepAlive(custom_tlvs); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/c_sharp/src/org/ldk/structs/Record.cs b/c_sharp/src/org/ldk/structs/Record.cs index c1cff2fa..3720b7be 100644 --- a/c_sharp/src/org/ldk/structs/Record.cs +++ b/c_sharp/src/org/ldk/structs/Record.cs @@ -69,12 +69,14 @@ public class Record : CommonBase { /** * The channel id of the channel pertaining to the logged record. May be a temporary id before * the channel has been funded. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public Option_ThirtyTwoBytesZ get_channel_id() { + public ChannelId get_channel_id() { long ret = bindings.Record_get_channel_id(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Option_ThirtyTwoBytesZ ret_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(ret); + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; return ret_hu_conv; } @@ -82,9 +84,11 @@ public class Record : CommonBase { /** * The channel id of the channel pertaining to the logged record. May be a temporary id before * the channel has been funded. + * + * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public void set_channel_id(org.ldk.structs.Option_ThirtyTwoBytesZ val) { - bindings.Record_set_channel_id(this.ptr, val.ptr); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.Record_set_channel_id(this.ptr, val == null ? 0 : val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -172,9 +176,10 @@ public class Record : CommonBase { * Constructs a new Record given each field * * Note that peer_id_arg (or a relevant inner pointer) may be NULL or all-0s to represent None + * Note that channel_id_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public static Record of(Level level_arg, byte[] peer_id_arg, org.ldk.structs.Option_ThirtyTwoBytesZ channel_id_arg, string args_arg, string module_path_arg, string file_arg, int line_arg) { - long ret = bindings.Record_new(level_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(peer_id_arg, 33)), channel_id_arg.ptr, InternalUtils.encodeString(args_arg), InternalUtils.encodeString(module_path_arg), InternalUtils.encodeString(file_arg), line_arg); + public static Record of(Level level_arg, byte[] peer_id_arg, org.ldk.structs.ChannelId channel_id_arg, string args_arg, string module_path_arg, string file_arg, int line_arg) { + long ret = bindings.Record_new(level_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(peer_id_arg, 33)), channel_id_arg == null ? 0 : channel_id_arg.ptr, InternalUtils.encodeString(args_arg), InternalUtils.encodeString(module_path_arg), InternalUtils.encodeString(file_arg), line_arg); GC.KeepAlive(level_arg); GC.KeepAlive(peer_id_arg); GC.KeepAlive(channel_id_arg); diff --git a/c_sharp/src/org/ldk/structs/Refund.cs b/c_sharp/src/org/ldk/structs/Refund.cs index d83b0c34..218d31e5 100644 --- a/c_sharp/src/org/ldk/structs/Refund.cs +++ b/c_sharp/src/org/ldk/structs/Refund.cs @@ -209,6 +209,18 @@ public class Refund : CommonBase { return ret_hu_conv; } + /** + * Generates a non-cryptographic 64-bit hash of the Refund. + */ + public long hash() { + long ret = bindings.Refund_hash(this.ptr); + GC.KeepAlive(this); + return ret; + } + + public override int GetHashCode() { + return (int)this.hash(); + } /** * Serialize the Refund object into a byte array which can be read by Refund_read */ diff --git a/c_sharp/src/org/ldk/structs/RefundMaybeWithDerivedMetadataBuilder.cs b/c_sharp/src/org/ldk/structs/RefundMaybeWithDerivedMetadataBuilder.cs new file mode 100644 index 00000000..1aae4506 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/RefundMaybeWithDerivedMetadataBuilder.cs @@ -0,0 +1,202 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + + +/** + * Builds a [`Refund`] for the \"offer for money\" flow. + * + * See [module-level documentation] for usage. + * + * [module-level documentation]: self + */ +public class RefundMaybeWithDerivedMetadataBuilder : CommonBase { + internal RefundMaybeWithDerivedMetadataBuilder(object _dummy, long ptr) : base(ptr) { } + ~RefundMaybeWithDerivedMetadataBuilder() { + if (ptr != 0) { bindings.RefundMaybeWithDerivedMetadataBuilder_free(ptr); } + } + + internal long clone_ptr() { + long ret = bindings.RefundMaybeWithDerivedMetadataBuilder_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a copy of the RefundMaybeWithDerivedMetadataBuilder + */ + public RefundMaybeWithDerivedMetadataBuilder clone() { + long ret = bindings.RefundMaybeWithDerivedMetadataBuilder_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.RefundMaybeWithDerivedMetadataBuilder ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.RefundMaybeWithDerivedMetadataBuilder(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Creates a new builder for a refund using the [`Refund::payer_id`] for the public node id to + * send to if no [`Refund::paths`] are set. Otherwise, it may be a transient pubkey. + * + * Additionally, sets the required (empty) [`Refund::description`], [`Refund::payer_metadata`], + * and [`Refund::amount_msats`]. + * + * # Note + * + * If constructing a [`Refund`] for use with a [`ChannelManager`], use + * [`ChannelManager::create_refund_builder`] instead of [`RefundBuilder::new`]. + * + * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager + * [`ChannelManager::create_refund_builder`]: crate::ln::channelmanager::ChannelManager::create_refund_builder + */ + public static Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ of(byte[] metadata, byte[] payer_id, long amount_msats) { + long ret = bindings.RefundMaybeWithDerivedMetadataBuilder_new(InternalUtils.encodeUint8Array(metadata), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payer_id, 33)), amount_msats); + GC.KeepAlive(metadata); + GC.KeepAlive(payer_id); + GC.KeepAlive(amount_msats); + if (ret >= 0 && ret <= 4096) { return null; } + Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Similar to [`RefundBuilder::new`] except, if [`RefundBuilder::path`] is called, the payer id + * is derived from the given [`ExpandedKey`] and nonce. This provides sender privacy by using a + * different payer id for each refund, assuming a different nonce is used. Otherwise, the + * provided `node_id` is used for the payer id. + * + * Also, sets the metadata when [`RefundBuilder::build`] is called such that it can be used to + * verify that an [`InvoiceRequest`] was produced for the refund given an [`ExpandedKey`]. + * + * The `payment_id` is encrypted in the metadata and should be unique. This ensures that only + * one invoice will be paid for the refund and that payments can be uniquely identified. + * + * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest + * [`ExpandedKey`]: crate::ln::inbound_payment::ExpandedKey + */ + public static Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ deriving_payer_id(byte[] node_id, org.ldk.structs.ExpandedKey expanded_key, org.ldk.structs.EntropySource entropy_source, long amount_msats, byte[] payment_id) { + long ret = bindings.RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), expanded_key.ptr, entropy_source.ptr, amount_msats, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32))); + GC.KeepAlive(node_id); + GC.KeepAlive(expanded_key); + GC.KeepAlive(entropy_source); + GC.KeepAlive(amount_msats); + GC.KeepAlive(payment_id); + if (ret >= 0 && ret <= 4096) { return null; } + Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(expanded_key); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(entropy_source); }; + return ret_hu_conv; + } + + /** + * Sets the [`Refund::description`]. + * + * Successive calls to this method will override the previous setting. + */ + public void description(string description) { + bindings.RefundMaybeWithDerivedMetadataBuilder_description(this.ptr, InternalUtils.encodeString(description)); + GC.KeepAlive(this); + GC.KeepAlive(description); + if (this != null) { this.ptrs_to.AddLast(this); }; + } + + /** + * Sets the [`Refund::absolute_expiry`] as seconds since the Unix epoch. Any expiry that has + * already passed is valid and can be checked for using [`Refund::is_expired`]. + * + * Successive calls to this method will override the previous setting. + */ + public void absolute_expiry(long absolute_expiry) { + bindings.RefundMaybeWithDerivedMetadataBuilder_absolute_expiry(this.ptr, absolute_expiry); + GC.KeepAlive(this); + GC.KeepAlive(absolute_expiry); + if (this != null) { this.ptrs_to.AddLast(this); }; + } + + /** + * Sets the [`Refund::issuer`]. + * + * Successive calls to this method will override the previous setting. + */ + public void issuer(string issuer) { + bindings.RefundMaybeWithDerivedMetadataBuilder_issuer(this.ptr, InternalUtils.encodeString(issuer)); + GC.KeepAlive(this); + GC.KeepAlive(issuer); + if (this != null) { this.ptrs_to.AddLast(this); }; + } + + /** + * Adds a blinded path to [`Refund::paths`]. Must include at least one path if only connected + * by private channels or if [`Refund::payer_id`] is not a public node id. + * + * Successive calls to this method will add another blinded path. Caller is responsible for not + * adding duplicate paths. + */ + public void path(org.ldk.structs.BlindedPath path) { + bindings.RefundMaybeWithDerivedMetadataBuilder_path(this.ptr, path.ptr); + GC.KeepAlive(this); + GC.KeepAlive(path); + if (this != null) { this.ptrs_to.AddLast(path); }; + if (this != null) { this.ptrs_to.AddLast(this); }; + } + + /** + * Sets the [`Refund::chain`] of the given [`Network`] for paying an invoice. If not + * called, [`Network::Bitcoin`] is assumed. + * + * Successive calls to this method will override the previous setting. + */ + public void chain(Network network) { + bindings.RefundMaybeWithDerivedMetadataBuilder_chain(this.ptr, network); + GC.KeepAlive(this); + GC.KeepAlive(network); + if (this != null) { this.ptrs_to.AddLast(this); }; + } + + /** + * Sets [`Refund::quantity`] of items. This is purely for informational purposes. It is useful + * when the refund pertains to a [`Bolt12Invoice`] that paid for more than one item from an + * [`Offer`] as specified by [`InvoiceRequest::quantity`]. + * + * Successive calls to this method will override the previous setting. + * + * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice + * [`InvoiceRequest::quantity`]: crate::offers::invoice_request::InvoiceRequest::quantity + * [`Offer`]: crate::offers::offer::Offer + */ + public void quantity(long quantity) { + bindings.RefundMaybeWithDerivedMetadataBuilder_quantity(this.ptr, quantity); + GC.KeepAlive(this); + GC.KeepAlive(quantity); + if (this != null) { this.ptrs_to.AddLast(this); }; + } + + /** + * Sets the [`Refund::payer_note`]. + * + * Successive calls to this method will override the previous setting. + */ + public void payer_note(string payer_note) { + bindings.RefundMaybeWithDerivedMetadataBuilder_payer_note(this.ptr, InternalUtils.encodeString(payer_note)); + GC.KeepAlive(this); + GC.KeepAlive(payer_note); + if (this != null) { this.ptrs_to.AddLast(this); }; + } + + /** + * Builds a [`Refund`] after checking for valid semantics. + */ + public Result_RefundBolt12SemanticErrorZ build() { + long ret = bindings.RefundMaybeWithDerivedMetadataBuilder_build(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_RefundBolt12SemanticErrorZ ret_hu_conv = Result_RefundBolt12SemanticErrorZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/ReplyChannelRange.cs b/c_sharp/src/org/ldk/structs/ReplyChannelRange.cs index b1f8f09e..3dafe2ef 100644 --- a/c_sharp/src/org/ldk/structs/ReplyChannelRange.cs +++ b/c_sharp/src/org/ldk/structs/ReplyChannelRange.cs @@ -173,7 +173,7 @@ public class ReplyChannelRange : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.ReplyChannelRange b) { - bool ret = bindings.ReplyChannelRange_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.ReplyChannelRange_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/ReplyShortChannelIdsEnd.cs b/c_sharp/src/org/ldk/structs/ReplyShortChannelIdsEnd.cs index 88dd390b..d2759630 100644 --- a/c_sharp/src/org/ldk/structs/ReplyShortChannelIdsEnd.cs +++ b/c_sharp/src/org/ldk/structs/ReplyShortChannelIdsEnd.cs @@ -109,7 +109,7 @@ public class ReplyShortChannelIdsEnd : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.ReplyShortChannelIdsEnd b) { - bool ret = bindings.ReplyShortChannelIdsEnd_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.ReplyShortChannelIdsEnd_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/Result_AcceptChannelDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_AcceptChannelDecodeErrorZ.cs index bc5f7f1c..1009ab38 100644 --- a/c_sharp/src/org/ldk/structs/Result_AcceptChannelDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_AcceptChannelDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_AcceptChannelDecodeErrorZ : CommonBase { * Creates a new CResult_AcceptChannelDecodeErrorZ in the success state. */ public static Result_AcceptChannelDecodeErrorZ ok(org.ldk.structs.AcceptChannel o) { - long ret = bindings.CResult_AcceptChannelDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_AcceptChannelDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_AcceptChannelV2DecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_AcceptChannelV2DecodeErrorZ.cs index eed4788c..9adb37a2 100644 --- a/c_sharp/src/org/ldk/structs/Result_AcceptChannelV2DecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_AcceptChannelV2DecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_AcceptChannelV2DecodeErrorZ : CommonBase { * Creates a new CResult_AcceptChannelV2DecodeErrorZ in the success state. */ public static Result_AcceptChannelV2DecodeErrorZ ok(org.ldk.structs.AcceptChannelV2 o) { - long ret = bindings.CResult_AcceptChannelV2DecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_AcceptChannelV2DecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_AcceptChannelV2DecodeErrorZ ret_hu_conv = Result_AcceptChannelV2DecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_AnnouncementSignaturesDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_AnnouncementSignaturesDecodeErrorZ.cs index 0f4f932f..ff6be21d 100644 --- a/c_sharp/src/org/ldk/structs/Result_AnnouncementSignaturesDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_AnnouncementSignaturesDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_AnnouncementSignaturesDecodeErrorZ : CommonBase { * Creates a new CResult_AnnouncementSignaturesDecodeErrorZ in the success state. */ public static Result_AnnouncementSignaturesDecodeErrorZ ok(org.ldk.structs.AnnouncementSignatures o) { - long ret = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_AnnouncementSignaturesDecodeErrorZ ret_hu_conv = Result_AnnouncementSignaturesDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_BestBlockDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_BestBlockDecodeErrorZ.cs new file mode 100644 index 00000000..1a63cd01 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/Result_BestBlockDecodeErrorZ.cs @@ -0,0 +1,93 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +public class Result_BestBlockDecodeErrorZ : CommonBase { + Result_BestBlockDecodeErrorZ(object _dummy, long ptr) : base(ptr) { } + ~Result_BestBlockDecodeErrorZ() { + if (ptr != 0) { bindings.CResult_BestBlockDecodeErrorZ_free(ptr); } + } + + internal static Result_BestBlockDecodeErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_BestBlockDecodeErrorZ_is_ok(ptr)) { + return new Result_BestBlockDecodeErrorZ_OK(null, ptr); + } else { + return new Result_BestBlockDecodeErrorZ_Err(null, ptr); + } + } + public class Result_BestBlockDecodeErrorZ_OK : Result_BestBlockDecodeErrorZ { + public readonly BestBlock res; + internal Result_BestBlockDecodeErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) { + long res = bindings.CResult_BestBlockDecodeErrorZ_get_ok(ptr); + org.ldk.structs.BestBlock res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.BestBlock(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); }; + this.res = res_hu_conv; + } + } + + public class Result_BestBlockDecodeErrorZ_Err : Result_BestBlockDecodeErrorZ { + public readonly DecodeError err; + internal Result_BestBlockDecodeErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) { + long err = bindings.CResult_BestBlockDecodeErrorZ_get_err(ptr); + org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err); + if (err_hu_conv != null) { err_hu_conv.ptrs_to.AddLast(this); }; + this.err = err_hu_conv; + } + } + + /** + * Creates a new CResult_BestBlockDecodeErrorZ in the success state. + */ + public static Result_BestBlockDecodeErrorZ ok(org.ldk.structs.BestBlock o) { + long ret = bindings.CResult_BestBlockDecodeErrorZ_ok(o.ptr); + GC.KeepAlive(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_BestBlockDecodeErrorZ ret_hu_conv = Result_BestBlockDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_BestBlockDecodeErrorZ in the error state. + */ + public static Result_BestBlockDecodeErrorZ err(org.ldk.structs.DecodeError e) { + long ret = bindings.CResult_BestBlockDecodeErrorZ_err(e.ptr); + GC.KeepAlive(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_BestBlockDecodeErrorZ ret_hu_conv = Result_BestBlockDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(e); }; + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public bool is_ok() { + bool ret = bindings.CResult_BestBlockDecodeErrorZ_is_ok(this.ptr); + GC.KeepAlive(this); + return ret; + } + + internal long clone_ptr() { + long ret = bindings.CResult_BestBlockDecodeErrorZ_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a new CResult_BestBlockDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_BestBlockDecodeErrorZ clone() { + long ret = bindings.CResult_BestBlockDecodeErrorZ_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_BestBlockDecodeErrorZ ret_hu_conv = Result_BestBlockDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/Result_BigSizeDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_BigSizeDecodeErrorZ.cs index 1955fdae..3381ec30 100644 --- a/c_sharp/src/org/ldk/structs/Result_BigSizeDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_BigSizeDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_BigSizeDecodeErrorZ : CommonBase { * Creates a new CResult_BigSizeDecodeErrorZ in the success state. */ public static Result_BigSizeDecodeErrorZ ok(org.ldk.structs.BigSize o) { - long ret = bindings.CResult_BigSizeDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_BigSizeDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_BigSizeDecodeErrorZ ret_hu_conv = Result_BigSizeDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_BlindedForwardDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_BlindedForwardDecodeErrorZ.cs index b02ccefc..ea0e13bd 100644 --- a/c_sharp/src/org/ldk/structs/Result_BlindedForwardDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_BlindedForwardDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_BlindedForwardDecodeErrorZ : CommonBase { * Creates a new CResult_BlindedForwardDecodeErrorZ in the success state. */ public static Result_BlindedForwardDecodeErrorZ ok(org.ldk.structs.BlindedForward o) { - long ret = bindings.CResult_BlindedForwardDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_BlindedForwardDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_BlindedForwardDecodeErrorZ ret_hu_conv = Result_BlindedForwardDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_BlindedHopDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_BlindedHopDecodeErrorZ.cs index ca6011dc..6affe112 100644 --- a/c_sharp/src/org/ldk/structs/Result_BlindedHopDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_BlindedHopDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_BlindedHopDecodeErrorZ : CommonBase { * Creates a new CResult_BlindedHopDecodeErrorZ in the success state. */ public static Result_BlindedHopDecodeErrorZ ok(org.ldk.structs.BlindedHop o) { - long ret = bindings.CResult_BlindedHopDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_BlindedHopDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_BlindedHopDecodeErrorZ ret_hu_conv = Result_BlindedHopDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_BlindedHopFeaturesDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_BlindedHopFeaturesDecodeErrorZ.cs index e64b1bd8..8cc73f14 100644 --- a/c_sharp/src/org/ldk/structs/Result_BlindedHopFeaturesDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_BlindedHopFeaturesDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_BlindedHopFeaturesDecodeErrorZ : CommonBase { * Creates a new CResult_BlindedHopFeaturesDecodeErrorZ in the success state. */ public static Result_BlindedHopFeaturesDecodeErrorZ ok(org.ldk.structs.BlindedHopFeatures o) { - long ret = bindings.CResult_BlindedHopFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_BlindedHopFeaturesDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_BlindedHopFeaturesDecodeErrorZ ret_hu_conv = Result_BlindedHopFeaturesDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_BlindedPathDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_BlindedPathDecodeErrorZ.cs index 2c7e344d..7932b6b6 100644 --- a/c_sharp/src/org/ldk/structs/Result_BlindedPathDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_BlindedPathDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_BlindedPathDecodeErrorZ : CommonBase { * Creates a new CResult_BlindedPathDecodeErrorZ in the success state. */ public static Result_BlindedPathDecodeErrorZ ok(org.ldk.structs.BlindedPath o) { - long ret = bindings.CResult_BlindedPathDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_BlindedPathDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_BlindedPathDecodeErrorZ ret_hu_conv = Result_BlindedPathDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_BlindedPathNoneZ.cs b/c_sharp/src/org/ldk/structs/Result_BlindedPathNoneZ.cs index cee1a2cf..fdc90701 100644 --- a/c_sharp/src/org/ldk/structs/Result_BlindedPathNoneZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_BlindedPathNoneZ.cs @@ -37,7 +37,7 @@ public class Result_BlindedPathNoneZ : CommonBase { * Creates a new CResult_BlindedPathNoneZ in the success state. */ public static Result_BlindedPathNoneZ ok(org.ldk.structs.BlindedPath o) { - long ret = bindings.CResult_BlindedPathNoneZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_BlindedPathNoneZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_BlindedPathNoneZ ret_hu_conv = Result_BlindedPathNoneZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_BlindedPayInfoDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_BlindedPayInfoDecodeErrorZ.cs index c0f05658..6e4b58e3 100644 --- a/c_sharp/src/org/ldk/structs/Result_BlindedPayInfoDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_BlindedPayInfoDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_BlindedPayInfoDecodeErrorZ : CommonBase { * Creates a new CResult_BlindedPayInfoDecodeErrorZ in the success state. */ public static Result_BlindedPayInfoDecodeErrorZ ok(org.ldk.structs.BlindedPayInfo o) { - long ret = bindings.CResult_BlindedPayInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_BlindedPayInfoDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_BlindedPayInfoDecodeErrorZ ret_hu_conv = Result_BlindedPayInfoDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_BlindedTailDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_BlindedTailDecodeErrorZ.cs index 9fbe083c..0bfc6ebb 100644 --- a/c_sharp/src/org/ldk/structs/Result_BlindedTailDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_BlindedTailDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_BlindedTailDecodeErrorZ : CommonBase { * Creates a new CResult_BlindedTailDecodeErrorZ in the success state. */ public static Result_BlindedTailDecodeErrorZ ok(org.ldk.structs.BlindedTail o) { - long ret = bindings.CResult_BlindedTailDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_BlindedTailDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_BlindedTailDecodeErrorZ ret_hu_conv = Result_BlindedTailDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.cs index 8f5176ff..c2ce8a54 100644 --- a/c_sharp/src/org/ldk/structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.cs @@ -39,7 +39,7 @@ public class Result_Bolt11InvoiceBolt11SemanticErrorZ : CommonBase { * Creates a new CResult_Bolt11InvoiceBolt11SemanticErrorZ in the success state. */ public static Result_Bolt11InvoiceBolt11SemanticErrorZ ok(org.ldk.structs.Bolt11Invoice o) { - long ret = bindings.CResult_Bolt11InvoiceBolt11SemanticErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_Bolt11InvoiceBolt11SemanticErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_Bolt11InvoiceBolt11SemanticErrorZ ret_hu_conv = Result_Bolt11InvoiceBolt11SemanticErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.cs index 2a126e37..f7f65454 100644 --- a/c_sharp/src/org/ldk/structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_Bolt11InvoiceFeaturesDecodeErrorZ : CommonBase { * Creates a new CResult_Bolt11InvoiceFeaturesDecodeErrorZ in the success state. */ public static Result_Bolt11InvoiceFeaturesDecodeErrorZ ok(org.ldk.structs.Bolt11InvoiceFeatures o) { - long ret = bindings.CResult_Bolt11InvoiceFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_Bolt11InvoiceFeaturesDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_Bolt11InvoiceFeaturesDecodeErrorZ ret_hu_conv = Result_Bolt11InvoiceFeaturesDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.cs index b365f857..9e464393 100644 --- a/c_sharp/src/org/ldk/structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.cs @@ -42,7 +42,7 @@ public class Result_Bolt11InvoiceParseOrSemanticErrorZ : CommonBase { * Creates a new CResult_Bolt11InvoiceParseOrSemanticErrorZ in the success state. */ public static Result_Bolt11InvoiceParseOrSemanticErrorZ ok(org.ldk.structs.Bolt11Invoice o) { - long ret = bindings.CResult_Bolt11InvoiceParseOrSemanticErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_Bolt11InvoiceParseOrSemanticErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_Bolt11InvoiceParseOrSemanticErrorZ ret_hu_conv = Result_Bolt11InvoiceParseOrSemanticErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_Bolt11InvoiceSignOrCreationErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_Bolt11InvoiceSignOrCreationErrorZ.cs index 23615193..26d6a249 100644 --- a/c_sharp/src/org/ldk/structs/Result_Bolt11InvoiceSignOrCreationErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_Bolt11InvoiceSignOrCreationErrorZ.cs @@ -42,7 +42,7 @@ public class Result_Bolt11InvoiceSignOrCreationErrorZ : CommonBase { * Creates a new CResult_Bolt11InvoiceSignOrCreationErrorZ in the success state. */ public static Result_Bolt11InvoiceSignOrCreationErrorZ ok(org.ldk.structs.Bolt11Invoice o) { - long ret = bindings.CResult_Bolt11InvoiceSignOrCreationErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_Bolt11InvoiceSignOrCreationErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_Bolt11InvoiceSignOrCreationErrorZ ret_hu_conv = Result_Bolt11InvoiceSignOrCreationErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.cs new file mode 100644 index 00000000..7dfe984d --- /dev/null +++ b/c_sharp/src/org/ldk/structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.cs @@ -0,0 +1,89 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +public class Result_Bolt12InvoiceBolt12SemanticErrorZ : CommonBase { + Result_Bolt12InvoiceBolt12SemanticErrorZ(object _dummy, long ptr) : base(ptr) { } + ~Result_Bolt12InvoiceBolt12SemanticErrorZ() { + if (ptr != 0) { bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_free(ptr); } + } + + internal static Result_Bolt12InvoiceBolt12SemanticErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_Bolt12InvoiceBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_Bolt12InvoiceBolt12SemanticErrorZ_Err(null, ptr); + } + } + public class Result_Bolt12InvoiceBolt12SemanticErrorZ_OK : Result_Bolt12InvoiceBolt12SemanticErrorZ { + public readonly Bolt12Invoice res; + internal Result_Bolt12InvoiceBolt12SemanticErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) { + long res = bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(ptr); + org.ldk.structs.Bolt12Invoice res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.Bolt12Invoice(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); }; + this.res = res_hu_conv; + } + } + + public class Result_Bolt12InvoiceBolt12SemanticErrorZ_Err : Result_Bolt12InvoiceBolt12SemanticErrorZ { + public readonly Bolt12SemanticError err; + internal Result_Bolt12InvoiceBolt12SemanticErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) { + this.err = bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(ptr); + } + } + + /** + * Creates a new CResult_Bolt12InvoiceBolt12SemanticErrorZ in the success state. + */ + public static Result_Bolt12InvoiceBolt12SemanticErrorZ ok(org.ldk.structs.Bolt12Invoice o) { + long ret = bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok(o.ptr); + GC.KeepAlive(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_Bolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_Bolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_Bolt12InvoiceBolt12SemanticErrorZ in the error state. + */ + public static Result_Bolt12InvoiceBolt12SemanticErrorZ err(Bolt12SemanticError e) { + long ret = bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_err(e); + GC.KeepAlive(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_Bolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_Bolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public bool is_ok() { + bool ret = bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(this.ptr); + GC.KeepAlive(this); + return ret; + } + + internal long clone_ptr() { + long ret = bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a new CResult_Bolt12InvoiceBolt12SemanticErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_Bolt12InvoiceBolt12SemanticErrorZ clone() { + long ret = bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_Bolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_Bolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.cs index a0fdddd8..1501b052 100644 --- a/c_sharp/src/org/ldk/structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_Bolt12InvoiceFeaturesDecodeErrorZ : CommonBase { * Creates a new CResult_Bolt12InvoiceFeaturesDecodeErrorZ in the success state. */ public static Result_Bolt12InvoiceFeaturesDecodeErrorZ ok(org.ldk.structs.Bolt12InvoiceFeatures o) { - long ret = bindings.CResult_Bolt12InvoiceFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_Bolt12InvoiceFeaturesDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_Bolt12InvoiceFeaturesDecodeErrorZ ret_hu_conv = Result_Bolt12InvoiceFeaturesDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_Bolt12OfferContextDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_Bolt12OfferContextDecodeErrorZ.cs new file mode 100644 index 00000000..8d99376f --- /dev/null +++ b/c_sharp/src/org/ldk/structs/Result_Bolt12OfferContextDecodeErrorZ.cs @@ -0,0 +1,93 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +public class Result_Bolt12OfferContextDecodeErrorZ : CommonBase { + Result_Bolt12OfferContextDecodeErrorZ(object _dummy, long ptr) : base(ptr) { } + ~Result_Bolt12OfferContextDecodeErrorZ() { + if (ptr != 0) { bindings.CResult_Bolt12OfferContextDecodeErrorZ_free(ptr); } + } + + internal static Result_Bolt12OfferContextDecodeErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_Bolt12OfferContextDecodeErrorZ_is_ok(ptr)) { + return new Result_Bolt12OfferContextDecodeErrorZ_OK(null, ptr); + } else { + return new Result_Bolt12OfferContextDecodeErrorZ_Err(null, ptr); + } + } + public class Result_Bolt12OfferContextDecodeErrorZ_OK : Result_Bolt12OfferContextDecodeErrorZ { + public readonly Bolt12OfferContext res; + internal Result_Bolt12OfferContextDecodeErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) { + long res = bindings.CResult_Bolt12OfferContextDecodeErrorZ_get_ok(ptr); + org.ldk.structs.Bolt12OfferContext res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.Bolt12OfferContext(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); }; + this.res = res_hu_conv; + } + } + + public class Result_Bolt12OfferContextDecodeErrorZ_Err : Result_Bolt12OfferContextDecodeErrorZ { + public readonly DecodeError err; + internal Result_Bolt12OfferContextDecodeErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) { + long err = bindings.CResult_Bolt12OfferContextDecodeErrorZ_get_err(ptr); + org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err); + if (err_hu_conv != null) { err_hu_conv.ptrs_to.AddLast(this); }; + this.err = err_hu_conv; + } + } + + /** + * Creates a new CResult_Bolt12OfferContextDecodeErrorZ in the success state. + */ + public static Result_Bolt12OfferContextDecodeErrorZ ok(org.ldk.structs.Bolt12OfferContext o) { + long ret = bindings.CResult_Bolt12OfferContextDecodeErrorZ_ok(o.ptr); + GC.KeepAlive(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_Bolt12OfferContextDecodeErrorZ ret_hu_conv = Result_Bolt12OfferContextDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_Bolt12OfferContextDecodeErrorZ in the error state. + */ + public static Result_Bolt12OfferContextDecodeErrorZ err(org.ldk.structs.DecodeError e) { + long ret = bindings.CResult_Bolt12OfferContextDecodeErrorZ_err(e.ptr); + GC.KeepAlive(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_Bolt12OfferContextDecodeErrorZ ret_hu_conv = Result_Bolt12OfferContextDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(e); }; + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public bool is_ok() { + bool ret = bindings.CResult_Bolt12OfferContextDecodeErrorZ_is_ok(this.ptr); + GC.KeepAlive(this); + return ret; + } + + internal long clone_ptr() { + long ret = bindings.CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a new CResult_Bolt12OfferContextDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_Bolt12OfferContextDecodeErrorZ clone() { + long ret = bindings.CResult_Bolt12OfferContextDecodeErrorZ_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_Bolt12OfferContextDecodeErrorZ ret_hu_conv = Result_Bolt12OfferContextDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/Result_Bolt12RefundContextDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_Bolt12RefundContextDecodeErrorZ.cs new file mode 100644 index 00000000..dc91b8d3 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/Result_Bolt12RefundContextDecodeErrorZ.cs @@ -0,0 +1,93 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +public class Result_Bolt12RefundContextDecodeErrorZ : CommonBase { + Result_Bolt12RefundContextDecodeErrorZ(object _dummy, long ptr) : base(ptr) { } + ~Result_Bolt12RefundContextDecodeErrorZ() { + if (ptr != 0) { bindings.CResult_Bolt12RefundContextDecodeErrorZ_free(ptr); } + } + + internal static Result_Bolt12RefundContextDecodeErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_Bolt12RefundContextDecodeErrorZ_is_ok(ptr)) { + return new Result_Bolt12RefundContextDecodeErrorZ_OK(null, ptr); + } else { + return new Result_Bolt12RefundContextDecodeErrorZ_Err(null, ptr); + } + } + public class Result_Bolt12RefundContextDecodeErrorZ_OK : Result_Bolt12RefundContextDecodeErrorZ { + public readonly Bolt12RefundContext res; + internal Result_Bolt12RefundContextDecodeErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) { + long res = bindings.CResult_Bolt12RefundContextDecodeErrorZ_get_ok(ptr); + org.ldk.structs.Bolt12RefundContext res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.Bolt12RefundContext(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); }; + this.res = res_hu_conv; + } + } + + public class Result_Bolt12RefundContextDecodeErrorZ_Err : Result_Bolt12RefundContextDecodeErrorZ { + public readonly DecodeError err; + internal Result_Bolt12RefundContextDecodeErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) { + long err = bindings.CResult_Bolt12RefundContextDecodeErrorZ_get_err(ptr); + org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err); + if (err_hu_conv != null) { err_hu_conv.ptrs_to.AddLast(this); }; + this.err = err_hu_conv; + } + } + + /** + * Creates a new CResult_Bolt12RefundContextDecodeErrorZ in the success state. + */ + public static Result_Bolt12RefundContextDecodeErrorZ ok(org.ldk.structs.Bolt12RefundContext o) { + long ret = bindings.CResult_Bolt12RefundContextDecodeErrorZ_ok(o.ptr); + GC.KeepAlive(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_Bolt12RefundContextDecodeErrorZ ret_hu_conv = Result_Bolt12RefundContextDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_Bolt12RefundContextDecodeErrorZ in the error state. + */ + public static Result_Bolt12RefundContextDecodeErrorZ err(org.ldk.structs.DecodeError e) { + long ret = bindings.CResult_Bolt12RefundContextDecodeErrorZ_err(e.ptr); + GC.KeepAlive(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_Bolt12RefundContextDecodeErrorZ ret_hu_conv = Result_Bolt12RefundContextDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(e); }; + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public bool is_ok() { + bool ret = bindings.CResult_Bolt12RefundContextDecodeErrorZ_is_ok(this.ptr); + GC.KeepAlive(this); + return ret; + } + + internal long clone_ptr() { + long ret = bindings.CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a new CResult_Bolt12RefundContextDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_Bolt12RefundContextDecodeErrorZ clone() { + long ret = bindings.CResult_Bolt12RefundContextDecodeErrorZ_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_Bolt12RefundContextDecodeErrorZ ret_hu_conv = Result_Bolt12RefundContextDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/Result_BuiltCommitmentTransactionDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_BuiltCommitmentTransactionDecodeErrorZ.cs index e5682750..67ea9ab2 100644 --- a/c_sharp/src/org/ldk/structs/Result_BuiltCommitmentTransactionDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_BuiltCommitmentTransactionDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_BuiltCommitmentTransactionDecodeErrorZ : CommonBase { * Creates a new CResult_BuiltCommitmentTransactionDecodeErrorZ in the success state. */ public static Result_BuiltCommitmentTransactionDecodeErrorZ ok(org.ldk.structs.BuiltCommitmentTransaction o) { - long ret = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_BuiltCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_BuiltCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.cs new file mode 100644 index 00000000..23d3f310 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.cs @@ -0,0 +1,74 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +public class Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ : CommonBase { + Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ(object _dummy, long ptr) : base(ptr) { } + ~Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ() { + if (ptr != 0) { bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free(ptr); } + } + + internal static Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(ptr)) { + return new Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_OK(null, ptr); + } else { + return new Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_Err(null, ptr); + } + } + public class Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_OK : Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ { + public readonly TwoTuple_BestBlockOutputSweeperZ res; + internal Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) { + long res = bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(ptr); + TwoTuple_BestBlockOutputSweeperZ res_hu_conv = new TwoTuple_BestBlockOutputSweeperZ(null, res); + if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); }; + this.res = res_hu_conv; + } + } + + public class Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_Err : Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ { + public readonly DecodeError err; + internal Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) { + long err = bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(ptr); + org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err); + if (err_hu_conv != null) { err_hu_conv.ptrs_to.AddLast(this); }; + this.err = err_hu_conv; + } + } + + /** + * Creates a new CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ in the success state. + */ + public static Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ ok(org.ldk.structs.TwoTuple_BestBlockOutputSweeperZ o) { + long ret = bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok(o.ptr); + GC.KeepAlive(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Creates a new CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ in the error state. + */ + public static Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ err(org.ldk.structs.DecodeError e) { + long ret = bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err(e.ptr); + GC.KeepAlive(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(e); }; + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public bool is_ok() { + bool ret = bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(this.ptr); + GC.KeepAlive(this); + return ret; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.cs b/c_sharp/src/org/ldk/structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.cs index 05963425..35b8b5f1 100644 --- a/c_sharp/src/org/ldk/structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.cs @@ -37,7 +37,7 @@ public class Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ : CommonBase { * Creates a new CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ in the success state. */ public static Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ ok(org.ldk.structs.TwoTuple_BlindedPayInfoBlindedPathZ o) { - long ret = bindings.CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ_ok(o != null ? o.ptr : 0); + long ret = bindings.CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ ret_hu_conv = Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.cs b/c_sharp/src/org/ldk/structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.cs index 10f80183..7417b51a 100644 --- a/c_sharp/src/org/ldk/structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.cs @@ -37,7 +37,7 @@ public class Result_C2Tuple_CVec_u8Zu64ZNoneZ : CommonBase { * Creates a new CResult_C2Tuple_CVec_u8Zu64ZNoneZ in the success state. */ public static Result_C2Tuple_CVec_u8Zu64ZNoneZ ok(org.ldk.structs.TwoTuple_CVec_u8Zu64Z o) { - long ret = bindings.CResult_C2Tuple_CVec_u8Zu64ZNoneZ_ok(o != null ? o.ptr : 0); + long ret = bindings.CResult_C2Tuple_CVec_u8Zu64ZNoneZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_C2Tuple_CVec_u8Zu64ZNoneZ ret_hu_conv = Result_C2Tuple_CVec_u8Zu64ZNoneZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.cs b/c_sharp/src/org/ldk/structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.cs index 495b5fb6..752f800f 100644 --- a/c_sharp/src/org/ldk/structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.cs @@ -37,7 +37,7 @@ public class Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ : CommonBas * Creates a new CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ in the success state. */ public static Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ ok(org.ldk.structs.TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ o) { - long ret = bindings.CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_ok(o != null ? o.ptr : 0); + long ret = bindings.CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ ret_hu_conv = Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.cs index 02c6859d..627f6344 100644 --- a/c_sharp/src/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ : CommonBa * Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ in the success state. */ public static Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ ok(org.ldk.structs.TwoTuple_ThirtyTwoBytesChannelManagerZ o) { - long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_ok(o != null ? o.ptr : 0); + long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ ret_hu_conv = Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.cs index 618c7ebb..3582541d 100644 --- a/c_sharp/src/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ : CommonBa * Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ in the success state. */ public static Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ ok(org.ldk.structs.TwoTuple_ThirtyTwoBytesChannelMonitorZ o) { - long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_ok(o != null ? o.ptr : 0); + long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ ret_hu_conv = Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.cs index ebf7da47..06f5d009 100644 --- a/c_sharp/src/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.cs @@ -39,7 +39,7 @@ public class Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ : CommonBase { * Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ in the success state. */ public static Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ ok(org.ldk.structs.TwoTuple_ThirtyTwoBytesChannelMonitorZ o) { - long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_ok(o != null ? o.ptr : 0); + long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ ret_hu_conv = Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.cs b/c_sharp/src/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.cs index 4d16bf45..6a89035a 100644 --- a/c_sharp/src/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.cs @@ -37,7 +37,7 @@ public class Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ : CommonBase { * Creates a new CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ in the success state. */ public static Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ ok(org.ldk.structs.TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ o) { - long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok(o != null ? o.ptr : 0); + long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ ret_hu_conv = Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.cs b/c_sharp/src/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.cs index d929e30a..ce21d578 100644 --- a/c_sharp/src/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.cs @@ -42,7 +42,7 @@ public class Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ : C * Creates a new CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ in the success state. */ public static Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ ok(org.ldk.structs.TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ o) { - long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_ok(o != null ? o.ptr : 0); + long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ ret_hu_conv = Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.cs index 5cc240dc..b8ab9339 100644 --- a/c_sharp/src/org/ldk/structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.cs @@ -42,7 +42,7 @@ public class Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSe * Creates a new CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ in the success state. */ public static Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ ok(org.ldk.structs.ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ o) { - long ret = bindings.CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_ok(o != null ? o.ptr : 0); + long ret = bindings.CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ ret_hu_conv = Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.constr_from_ptr(ret); @@ -70,5 +70,23 @@ public class Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSe return ret; } + internal long clone_ptr() { + long ret = bindings.CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a new CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ clone() { + long ret = bindings.CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ ret_hu_conv = Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + } } } } diff --git a/c_sharp/src/org/ldk/structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.cs b/c_sharp/src/org/ldk/structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.cs index 9fdb1a2f..7be21311 100644 --- a/c_sharp/src/org/ldk/structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.cs @@ -37,7 +37,7 @@ public class Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNo * Creates a new CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ in the success state. */ public static Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ ok(org.ldk.structs.ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ o) { - long ret = bindings.CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok(o != null ? o.ptr : 0); + long ret = bindings.CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ ret_hu_conv = Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_CVec_BlindedPathZNoneZ.cs b/c_sharp/src/org/ldk/structs/Result_CVec_BlindedPathZNoneZ.cs index 9adab423..2e7e899e 100644 --- a/c_sharp/src/org/ldk/structs/Result_CVec_BlindedPathZNoneZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_CVec_BlindedPathZNoneZ.cs @@ -44,7 +44,7 @@ public class Result_CVec_BlindedPathZNoneZ : CommonBase { * Creates a new CResult_CVec_BlindedPathZNoneZ in the success state. */ public static Result_CVec_BlindedPathZNoneZ ok(BlindedPath[] o) { - long ret = bindings.CResult_CVec_BlindedPathZNoneZ_ok(InternalUtils.encodeUint64Array(InternalUtils.mapArray(o, o_conv_13 => o_conv_13 == null ? 0 : o_conv_13.ptr))); + long ret = bindings.CResult_CVec_BlindedPathZNoneZ_ok(InternalUtils.encodeUint64Array(InternalUtils.mapArray(o, o_conv_13 => o_conv_13.ptr))); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_CVec_BlindedPathZNoneZ ret_hu_conv = Result_CVec_BlindedPathZNoneZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.cs b/c_sharp/src/org/ldk/structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.cs index 9c4c16ef..cc8501a7 100644 --- a/c_sharp/src/org/ldk/structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.cs @@ -44,7 +44,7 @@ public class Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ : CommonBase { * Creates a new CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ in the success state. */ public static Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ ok(TwoTuple_BlindedPayInfoBlindedPathZ[] o) { - long ret = bindings.CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_ok(InternalUtils.encodeUint64Array(InternalUtils.mapArray(o, o_conv_37 => o_conv_37 != null ? o_conv_37.ptr : 0))); + long ret = bindings.CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_ok(InternalUtils.encodeUint64Array(InternalUtils.mapArray(o, o_conv_37 => o_conv_37.ptr))); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ ret_hu_conv = Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.cs index c7f7aa21..0c05204a 100644 --- a/c_sharp/src/org/ldk/structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.cs @@ -46,7 +46,7 @@ public class Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ : Common * Creates a new CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ in the success state. */ public static Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ ok(TwoTuple_ThirtyTwoBytesChannelMonitorZ[] o) { - long ret = bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_ok(InternalUtils.encodeUint64Array(InternalUtils.mapArray(o, o_conv_40 => o_conv_40 != null ? o_conv_40.ptr : 0))); + long ret = bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_ok(InternalUtils.encodeUint64Array(InternalUtils.mapArray(o, o_conv_40 => o_conv_40.ptr))); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ ret_hu_conv = Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.cs b/c_sharp/src/org/ldk/structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.cs index 666af7e8..27308203 100644 --- a/c_sharp/src/org/ldk/structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.cs @@ -49,7 +49,7 @@ public class Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ * Creates a new CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ in the success state. */ public static Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ ok(TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ[] o) { - long ret = bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_ok(InternalUtils.encodeUint64Array(InternalUtils.mapArray(o, o_conv_40 => o_conv_40 != null ? o_conv_40.ptr : 0))); + long ret = bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_ok(InternalUtils.encodeUint64Array(InternalUtils.mapArray(o, o_conv_40 => o_conv_40.ptr))); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ ret_hu_conv = Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_CVec_UtxoZNoneZ.cs b/c_sharp/src/org/ldk/structs/Result_CVec_UtxoZNoneZ.cs index 636895d8..c3d60e0a 100644 --- a/c_sharp/src/org/ldk/structs/Result_CVec_UtxoZNoneZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_CVec_UtxoZNoneZ.cs @@ -44,7 +44,7 @@ public class Result_CVec_UtxoZNoneZ : CommonBase { * Creates a new CResult_CVec_UtxoZNoneZ in the success state. */ public static Result_CVec_UtxoZNoneZ ok(Utxo[] o) { - long ret = bindings.CResult_CVec_UtxoZNoneZ_ok(InternalUtils.encodeUint64Array(InternalUtils.mapArray(o, o_conv_6 => o_conv_6 == null ? 0 : o_conv_6.ptr))); + long ret = bindings.CResult_CVec_UtxoZNoneZ_ok(InternalUtils.encodeUint64Array(InternalUtils.mapArray(o, o_conv_6 => o_conv_6.ptr))); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_CVec_UtxoZNoneZ ret_hu_conv = Result_CVec_UtxoZNoneZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_CVec_u8ZPeerHandleErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_CVec_u8ZPeerHandleErrorZ.cs index 26a9bc8f..c5b1cf3e 100644 --- a/c_sharp/src/org/ldk/structs/Result_CVec_u8ZPeerHandleErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_CVec_u8ZPeerHandleErrorZ.cs @@ -52,7 +52,7 @@ public class Result_CVec_u8ZPeerHandleErrorZ : CommonBase { * Creates a new CResult_CVec_u8ZPeerHandleErrorZ in the error state. */ public static Result_CVec_u8ZPeerHandleErrorZ err(org.ldk.structs.PeerHandleError e) { - long ret = bindings.CResult_CVec_u8ZPeerHandleErrorZ_err(e == null ? 0 : e.ptr); + long ret = bindings.CResult_CVec_u8ZPeerHandleErrorZ_err(e.ptr); GC.KeepAlive(e); if (ret >= 0 && ret <= 4096) { return null; } Result_CVec_u8ZPeerHandleErrorZ ret_hu_conv = Result_CVec_u8ZPeerHandleErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_ChannelAnnouncementDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_ChannelAnnouncementDecodeErrorZ.cs index 56a10918..f8f2007a 100644 --- a/c_sharp/src/org/ldk/structs/Result_ChannelAnnouncementDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_ChannelAnnouncementDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_ChannelAnnouncementDecodeErrorZ : CommonBase { * Creates a new CResult_ChannelAnnouncementDecodeErrorZ in the success state. */ public static Result_ChannelAnnouncementDecodeErrorZ ok(org.ldk.structs.ChannelAnnouncement o) { - long ret = bindings.CResult_ChannelAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ChannelAnnouncementDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_ChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_ChannelConfigDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_ChannelConfigDecodeErrorZ.cs index 7db5fcb0..146a8fa0 100644 --- a/c_sharp/src/org/ldk/structs/Result_ChannelConfigDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_ChannelConfigDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_ChannelConfigDecodeErrorZ : CommonBase { * Creates a new CResult_ChannelConfigDecodeErrorZ in the success state. */ public static Result_ChannelConfigDecodeErrorZ ok(org.ldk.structs.ChannelConfig o) { - long ret = bindings.CResult_ChannelConfigDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ChannelConfigDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ChannelConfigDecodeErrorZ ret_hu_conv = Result_ChannelConfigDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_ChannelCounterpartyDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_ChannelCounterpartyDecodeErrorZ.cs index c9ef9b72..7f0af086 100644 --- a/c_sharp/src/org/ldk/structs/Result_ChannelCounterpartyDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_ChannelCounterpartyDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_ChannelCounterpartyDecodeErrorZ : CommonBase { * Creates a new CResult_ChannelCounterpartyDecodeErrorZ in the success state. */ public static Result_ChannelCounterpartyDecodeErrorZ ok(org.ldk.structs.ChannelCounterparty o) { - long ret = bindings.CResult_ChannelCounterpartyDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ChannelCounterpartyDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ChannelCounterpartyDecodeErrorZ ret_hu_conv = Result_ChannelCounterpartyDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_ChannelDerivationParametersDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_ChannelDerivationParametersDecodeErrorZ.cs index 63e2dcda..58c0f193 100644 --- a/c_sharp/src/org/ldk/structs/Result_ChannelDerivationParametersDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_ChannelDerivationParametersDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_ChannelDerivationParametersDecodeErrorZ : CommonBase { * Creates a new CResult_ChannelDerivationParametersDecodeErrorZ in the success state. */ public static Result_ChannelDerivationParametersDecodeErrorZ ok(org.ldk.structs.ChannelDerivationParameters o) { - long ret = bindings.CResult_ChannelDerivationParametersDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ChannelDerivationParametersDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ChannelDerivationParametersDecodeErrorZ ret_hu_conv = Result_ChannelDerivationParametersDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_ChannelDetailsDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_ChannelDetailsDecodeErrorZ.cs index 0ef33832..715ed0c4 100644 --- a/c_sharp/src/org/ldk/structs/Result_ChannelDetailsDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_ChannelDetailsDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_ChannelDetailsDecodeErrorZ : CommonBase { * Creates a new CResult_ChannelDetailsDecodeErrorZ in the success state. */ public static Result_ChannelDetailsDecodeErrorZ ok(org.ldk.structs.ChannelDetails o) { - long ret = bindings.CResult_ChannelDetailsDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ChannelDetailsDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ChannelDetailsDecodeErrorZ ret_hu_conv = Result_ChannelDetailsDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_ChannelFeaturesDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_ChannelFeaturesDecodeErrorZ.cs index 38d56078..07b2d0d2 100644 --- a/c_sharp/src/org/ldk/structs/Result_ChannelFeaturesDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_ChannelFeaturesDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_ChannelFeaturesDecodeErrorZ : CommonBase { * Creates a new CResult_ChannelFeaturesDecodeErrorZ in the success state. */ public static Result_ChannelFeaturesDecodeErrorZ ok(org.ldk.structs.ChannelFeatures o) { - long ret = bindings.CResult_ChannelFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ChannelFeaturesDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ChannelFeaturesDecodeErrorZ ret_hu_conv = Result_ChannelFeaturesDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_ChannelIdAPIErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_ChannelIdAPIErrorZ.cs new file mode 100644 index 00000000..dc4db8de --- /dev/null +++ b/c_sharp/src/org/ldk/structs/Result_ChannelIdAPIErrorZ.cs @@ -0,0 +1,93 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +public class Result_ChannelIdAPIErrorZ : CommonBase { + Result_ChannelIdAPIErrorZ(object _dummy, long ptr) : base(ptr) { } + ~Result_ChannelIdAPIErrorZ() { + if (ptr != 0) { bindings.CResult_ChannelIdAPIErrorZ_free(ptr); } + } + + internal static Result_ChannelIdAPIErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_ChannelIdAPIErrorZ_is_ok(ptr)) { + return new Result_ChannelIdAPIErrorZ_OK(null, ptr); + } else { + return new Result_ChannelIdAPIErrorZ_Err(null, ptr); + } + } + public class Result_ChannelIdAPIErrorZ_OK : Result_ChannelIdAPIErrorZ { + public readonly ChannelId res; + internal Result_ChannelIdAPIErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) { + long res = bindings.CResult_ChannelIdAPIErrorZ_get_ok(ptr); + org.ldk.structs.ChannelId res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.ChannelId(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); }; + this.res = res_hu_conv; + } + } + + public class Result_ChannelIdAPIErrorZ_Err : Result_ChannelIdAPIErrorZ { + public readonly APIError err; + internal Result_ChannelIdAPIErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) { + long err = bindings.CResult_ChannelIdAPIErrorZ_get_err(ptr); + org.ldk.structs.APIError err_hu_conv = org.ldk.structs.APIError.constr_from_ptr(err); + if (err_hu_conv != null) { err_hu_conv.ptrs_to.AddLast(this); }; + this.err = err_hu_conv; + } + } + + /** + * Creates a new CResult_ChannelIdAPIErrorZ in the success state. + */ + public static Result_ChannelIdAPIErrorZ ok(org.ldk.structs.ChannelId o) { + long ret = bindings.CResult_ChannelIdAPIErrorZ_ok(o.ptr); + GC.KeepAlive(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_ChannelIdAPIErrorZ ret_hu_conv = Result_ChannelIdAPIErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_ChannelIdAPIErrorZ in the error state. + */ + public static Result_ChannelIdAPIErrorZ err(org.ldk.structs.APIError e) { + long ret = bindings.CResult_ChannelIdAPIErrorZ_err(e.ptr); + GC.KeepAlive(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_ChannelIdAPIErrorZ ret_hu_conv = Result_ChannelIdAPIErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(e); }; + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public bool is_ok() { + bool ret = bindings.CResult_ChannelIdAPIErrorZ_is_ok(this.ptr); + GC.KeepAlive(this); + return ret; + } + + internal long clone_ptr() { + long ret = bindings.CResult_ChannelIdAPIErrorZ_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a new CResult_ChannelIdAPIErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_ChannelIdAPIErrorZ clone() { + long ret = bindings.CResult_ChannelIdAPIErrorZ_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_ChannelIdAPIErrorZ ret_hu_conv = Result_ChannelIdAPIErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/Result_ChannelIdDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_ChannelIdDecodeErrorZ.cs new file mode 100644 index 00000000..4ec32de9 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/Result_ChannelIdDecodeErrorZ.cs @@ -0,0 +1,93 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +public class Result_ChannelIdDecodeErrorZ : CommonBase { + Result_ChannelIdDecodeErrorZ(object _dummy, long ptr) : base(ptr) { } + ~Result_ChannelIdDecodeErrorZ() { + if (ptr != 0) { bindings.CResult_ChannelIdDecodeErrorZ_free(ptr); } + } + + internal static Result_ChannelIdDecodeErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_ChannelIdDecodeErrorZ_is_ok(ptr)) { + return new Result_ChannelIdDecodeErrorZ_OK(null, ptr); + } else { + return new Result_ChannelIdDecodeErrorZ_Err(null, ptr); + } + } + public class Result_ChannelIdDecodeErrorZ_OK : Result_ChannelIdDecodeErrorZ { + public readonly ChannelId res; + internal Result_ChannelIdDecodeErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) { + long res = bindings.CResult_ChannelIdDecodeErrorZ_get_ok(ptr); + org.ldk.structs.ChannelId res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.ChannelId(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); }; + this.res = res_hu_conv; + } + } + + public class Result_ChannelIdDecodeErrorZ_Err : Result_ChannelIdDecodeErrorZ { + public readonly DecodeError err; + internal Result_ChannelIdDecodeErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) { + long err = bindings.CResult_ChannelIdDecodeErrorZ_get_err(ptr); + org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err); + if (err_hu_conv != null) { err_hu_conv.ptrs_to.AddLast(this); }; + this.err = err_hu_conv; + } + } + + /** + * Creates a new CResult_ChannelIdDecodeErrorZ in the success state. + */ + public static Result_ChannelIdDecodeErrorZ ok(org.ldk.structs.ChannelId o) { + long ret = bindings.CResult_ChannelIdDecodeErrorZ_ok(o.ptr); + GC.KeepAlive(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_ChannelIdDecodeErrorZ ret_hu_conv = Result_ChannelIdDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_ChannelIdDecodeErrorZ in the error state. + */ + public static Result_ChannelIdDecodeErrorZ err(org.ldk.structs.DecodeError e) { + long ret = bindings.CResult_ChannelIdDecodeErrorZ_err(e.ptr); + GC.KeepAlive(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_ChannelIdDecodeErrorZ ret_hu_conv = Result_ChannelIdDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(e); }; + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public bool is_ok() { + bool ret = bindings.CResult_ChannelIdDecodeErrorZ_is_ok(this.ptr); + GC.KeepAlive(this); + return ret; + } + + internal long clone_ptr() { + long ret = bindings.CResult_ChannelIdDecodeErrorZ_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a new CResult_ChannelIdDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_ChannelIdDecodeErrorZ clone() { + long ret = bindings.CResult_ChannelIdDecodeErrorZ_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_ChannelIdDecodeErrorZ ret_hu_conv = Result_ChannelIdDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/Result_ChannelInfoDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_ChannelInfoDecodeErrorZ.cs index ae5a6f5a..d25c231a 100644 --- a/c_sharp/src/org/ldk/structs/Result_ChannelInfoDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_ChannelInfoDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_ChannelInfoDecodeErrorZ : CommonBase { * Creates a new CResult_ChannelInfoDecodeErrorZ in the success state. */ public static Result_ChannelInfoDecodeErrorZ ok(org.ldk.structs.ChannelInfo o) { - long ret = bindings.CResult_ChannelInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ChannelInfoDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ChannelInfoDecodeErrorZ ret_hu_conv = Result_ChannelInfoDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_ChannelMonitorUpdateDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_ChannelMonitorUpdateDecodeErrorZ.cs index 5aa6567e..80316e3f 100644 --- a/c_sharp/src/org/ldk/structs/Result_ChannelMonitorUpdateDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_ChannelMonitorUpdateDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_ChannelMonitorUpdateDecodeErrorZ : CommonBase { * Creates a new CResult_ChannelMonitorUpdateDecodeErrorZ in the success state. */ public static Result_ChannelMonitorUpdateDecodeErrorZ ok(org.ldk.structs.ChannelMonitorUpdate o) { - long ret = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ChannelMonitorUpdateDecodeErrorZ ret_hu_conv = Result_ChannelMonitorUpdateDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_ChannelPublicKeysDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_ChannelPublicKeysDecodeErrorZ.cs index fca2aeaa..0208a7a8 100644 --- a/c_sharp/src/org/ldk/structs/Result_ChannelPublicKeysDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_ChannelPublicKeysDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_ChannelPublicKeysDecodeErrorZ : CommonBase { * Creates a new CResult_ChannelPublicKeysDecodeErrorZ in the success state. */ public static Result_ChannelPublicKeysDecodeErrorZ ok(org.ldk.structs.ChannelPublicKeys o) { - long ret = bindings.CResult_ChannelPublicKeysDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ChannelPublicKeysDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ChannelPublicKeysDecodeErrorZ ret_hu_conv = Result_ChannelPublicKeysDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_ChannelReadyDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_ChannelReadyDecodeErrorZ.cs index 7161b609..0bbd1bc9 100644 --- a/c_sharp/src/org/ldk/structs/Result_ChannelReadyDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_ChannelReadyDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_ChannelReadyDecodeErrorZ : CommonBase { * Creates a new CResult_ChannelReadyDecodeErrorZ in the success state. */ public static Result_ChannelReadyDecodeErrorZ ok(org.ldk.structs.ChannelReady o) { - long ret = bindings.CResult_ChannelReadyDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ChannelReadyDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ChannelReadyDecodeErrorZ ret_hu_conv = Result_ChannelReadyDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_ChannelReestablishDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_ChannelReestablishDecodeErrorZ.cs index 8483f19a..0632b14e 100644 --- a/c_sharp/src/org/ldk/structs/Result_ChannelReestablishDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_ChannelReestablishDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_ChannelReestablishDecodeErrorZ : CommonBase { * Creates a new CResult_ChannelReestablishDecodeErrorZ in the success state. */ public static Result_ChannelReestablishDecodeErrorZ ok(org.ldk.structs.ChannelReestablish o) { - long ret = bindings.CResult_ChannelReestablishDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ChannelReestablishDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ChannelReestablishDecodeErrorZ ret_hu_conv = Result_ChannelReestablishDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_ChannelTransactionParametersDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_ChannelTransactionParametersDecodeErrorZ.cs index 742f0805..d0d82ee8 100644 --- a/c_sharp/src/org/ldk/structs/Result_ChannelTransactionParametersDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_ChannelTransactionParametersDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_ChannelTransactionParametersDecodeErrorZ : CommonBase { * Creates a new CResult_ChannelTransactionParametersDecodeErrorZ in the success state. */ public static Result_ChannelTransactionParametersDecodeErrorZ ok(org.ldk.structs.ChannelTransactionParameters o) { - long ret = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_ChannelTypeFeaturesDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_ChannelTypeFeaturesDecodeErrorZ.cs index ee3b53fa..d68db307 100644 --- a/c_sharp/src/org/ldk/structs/Result_ChannelTypeFeaturesDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_ChannelTypeFeaturesDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_ChannelTypeFeaturesDecodeErrorZ : CommonBase { * Creates a new CResult_ChannelTypeFeaturesDecodeErrorZ in the success state. */ public static Result_ChannelTypeFeaturesDecodeErrorZ ok(org.ldk.structs.ChannelTypeFeatures o) { - long ret = bindings.CResult_ChannelTypeFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ChannelTypeFeaturesDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ChannelTypeFeaturesDecodeErrorZ ret_hu_conv = Result_ChannelTypeFeaturesDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_ChannelUpdateDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_ChannelUpdateDecodeErrorZ.cs index 61c6400c..906676d1 100644 --- a/c_sharp/src/org/ldk/structs/Result_ChannelUpdateDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_ChannelUpdateDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_ChannelUpdateDecodeErrorZ : CommonBase { * Creates a new CResult_ChannelUpdateDecodeErrorZ in the success state. */ public static Result_ChannelUpdateDecodeErrorZ ok(org.ldk.structs.ChannelUpdate o) { - long ret = bindings.CResult_ChannelUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ChannelUpdateDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ChannelUpdateDecodeErrorZ ret_hu_conv = Result_ChannelUpdateDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_ChannelUpdateInfoDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_ChannelUpdateInfoDecodeErrorZ.cs index e7af0a52..9407eb56 100644 --- a/c_sharp/src/org/ldk/structs/Result_ChannelUpdateInfoDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_ChannelUpdateInfoDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_ChannelUpdateInfoDecodeErrorZ : CommonBase { * Creates a new CResult_ChannelUpdateInfoDecodeErrorZ in the success state. */ public static Result_ChannelUpdateInfoDecodeErrorZ ok(org.ldk.structs.ChannelUpdateInfo o) { - long ret = bindings.CResult_ChannelUpdateInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ChannelUpdateInfoDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ChannelUpdateInfoDecodeErrorZ ret_hu_conv = Result_ChannelUpdateInfoDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_ClaimedHTLCDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_ClaimedHTLCDecodeErrorZ.cs index 4e3cf9af..79f8ff04 100644 --- a/c_sharp/src/org/ldk/structs/Result_ClaimedHTLCDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_ClaimedHTLCDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_ClaimedHTLCDecodeErrorZ : CommonBase { * Creates a new CResult_ClaimedHTLCDecodeErrorZ in the success state. */ public static Result_ClaimedHTLCDecodeErrorZ ok(org.ldk.structs.ClaimedHTLC o) { - long ret = bindings.CResult_ClaimedHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ClaimedHTLCDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ClaimedHTLCDecodeErrorZ ret_hu_conv = Result_ClaimedHTLCDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_ClosingSignedDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_ClosingSignedDecodeErrorZ.cs index 79c19a57..dc96f366 100644 --- a/c_sharp/src/org/ldk/structs/Result_ClosingSignedDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_ClosingSignedDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_ClosingSignedDecodeErrorZ : CommonBase { * Creates a new CResult_ClosingSignedDecodeErrorZ in the success state. */ public static Result_ClosingSignedDecodeErrorZ ok(org.ldk.structs.ClosingSigned o) { - long ret = bindings.CResult_ClosingSignedDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ClosingSignedDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ClosingSignedDecodeErrorZ ret_hu_conv = Result_ClosingSignedDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_ClosingSignedFeeRangeDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_ClosingSignedFeeRangeDecodeErrorZ.cs index 5c7d6b5f..fd43cd58 100644 --- a/c_sharp/src/org/ldk/structs/Result_ClosingSignedFeeRangeDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_ClosingSignedFeeRangeDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_ClosingSignedFeeRangeDecodeErrorZ : CommonBase { * Creates a new CResult_ClosingSignedFeeRangeDecodeErrorZ in the success state. */ public static Result_ClosingSignedFeeRangeDecodeErrorZ ok(org.ldk.structs.ClosingSignedFeeRange o) { - long ret = bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ClosingSignedFeeRangeDecodeErrorZ ret_hu_conv = Result_ClosingSignedFeeRangeDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_CoinSelectionNoneZ.cs b/c_sharp/src/org/ldk/structs/Result_CoinSelectionNoneZ.cs index 63b813a1..7564078b 100644 --- a/c_sharp/src/org/ldk/structs/Result_CoinSelectionNoneZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_CoinSelectionNoneZ.cs @@ -37,7 +37,7 @@ public class Result_CoinSelectionNoneZ : CommonBase { * Creates a new CResult_CoinSelectionNoneZ in the success state. */ public static Result_CoinSelectionNoneZ ok(org.ldk.structs.CoinSelection o) { - long ret = bindings.CResult_CoinSelectionNoneZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_CoinSelectionNoneZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_CoinSelectionNoneZ ret_hu_conv = Result_CoinSelectionNoneZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_CommitmentSignedDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_CommitmentSignedDecodeErrorZ.cs index 2f8920ae..e281fd18 100644 --- a/c_sharp/src/org/ldk/structs/Result_CommitmentSignedDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_CommitmentSignedDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_CommitmentSignedDecodeErrorZ : CommonBase { * Creates a new CResult_CommitmentSignedDecodeErrorZ in the success state. */ public static Result_CommitmentSignedDecodeErrorZ ok(org.ldk.structs.CommitmentSigned o) { - long ret = bindings.CResult_CommitmentSignedDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_CommitmentSignedDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_CommitmentSignedDecodeErrorZ ret_hu_conv = Result_CommitmentSignedDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_CommitmentTransactionDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_CommitmentTransactionDecodeErrorZ.cs index fa414c48..d3dae238 100644 --- a/c_sharp/src/org/ldk/structs/Result_CommitmentTransactionDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_CommitmentTransactionDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_CommitmentTransactionDecodeErrorZ : CommonBase { * Creates a new CResult_CommitmentTransactionDecodeErrorZ in the success state. */ public static Result_CommitmentTransactionDecodeErrorZ ok(org.ldk.structs.CommitmentTransaction o) { - long ret = bindings.CResult_CommitmentTransactionDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_CommitmentTransactionDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_CommitmentTransactionDecodeErrorZ ret_hu_conv = Result_CommitmentTransactionDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.cs index 9116a4d4..72f78bbe 100644 --- a/c_sharp/src/org/ldk/structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_CounterpartyChannelTransactionParametersDecodeErrorZ : Commo * Creates a new CResult_CounterpartyChannelTransactionParametersDecodeErrorZ in the success state. */ public static Result_CounterpartyChannelTransactionParametersDecodeErrorZ ok(org.ldk.structs.CounterpartyChannelTransactionParameters o) { - long ret = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_CounterpartyChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_CounterpartyChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.cs index 117c31ee..7b1edace 100644 --- a/c_sharp/src/org/ldk/structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_CounterpartyCommitmentSecretsDecodeErrorZ : CommonBase { * Creates a new CResult_CounterpartyCommitmentSecretsDecodeErrorZ in the success state. */ public static Result_CounterpartyCommitmentSecretsDecodeErrorZ ok(org.ldk.structs.CounterpartyCommitmentSecrets o) { - long ret = bindings.CResult_CounterpartyCommitmentSecretsDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_CounterpartyCommitmentSecretsDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_CounterpartyCommitmentSecretsDecodeErrorZ ret_hu_conv = Result_CounterpartyCommitmentSecretsDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_CounterpartyForwardingInfoDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_CounterpartyForwardingInfoDecodeErrorZ.cs index b3c3b723..a21839e7 100644 --- a/c_sharp/src/org/ldk/structs/Result_CounterpartyForwardingInfoDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_CounterpartyForwardingInfoDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_CounterpartyForwardingInfoDecodeErrorZ : CommonBase { * Creates a new CResult_CounterpartyForwardingInfoDecodeErrorZ in the success state. */ public static Result_CounterpartyForwardingInfoDecodeErrorZ ok(org.ldk.structs.CounterpartyForwardingInfo o) { - long ret = bindings.CResult_CounterpartyForwardingInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_CounterpartyForwardingInfoDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_CounterpartyForwardingInfoDecodeErrorZ ret_hu_conv = Result_CounterpartyForwardingInfoDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_DelayedPaymentBasepointDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_DelayedPaymentBasepointDecodeErrorZ.cs index 1ff0bea0..47049152 100644 --- a/c_sharp/src/org/ldk/structs/Result_DelayedPaymentBasepointDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_DelayedPaymentBasepointDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_DelayedPaymentBasepointDecodeErrorZ : CommonBase { * Creates a new CResult_DelayedPaymentBasepointDecodeErrorZ in the success state. */ public static Result_DelayedPaymentBasepointDecodeErrorZ ok(org.ldk.structs.DelayedPaymentBasepoint o) { - long ret = bindings.CResult_DelayedPaymentBasepointDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_DelayedPaymentBasepointDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_DelayedPaymentBasepointDecodeErrorZ ret_hu_conv = Result_DelayedPaymentBasepointDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_DelayedPaymentKeyDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_DelayedPaymentKeyDecodeErrorZ.cs index 4fbf372b..2e5355a7 100644 --- a/c_sharp/src/org/ldk/structs/Result_DelayedPaymentKeyDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_DelayedPaymentKeyDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_DelayedPaymentKeyDecodeErrorZ : CommonBase { * Creates a new CResult_DelayedPaymentKeyDecodeErrorZ in the success state. */ public static Result_DelayedPaymentKeyDecodeErrorZ ok(org.ldk.structs.DelayedPaymentKey o) { - long ret = bindings.CResult_DelayedPaymentKeyDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_DelayedPaymentKeyDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_DelayedPaymentKeyDecodeErrorZ ret_hu_conv = Result_DelayedPaymentKeyDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.cs index 005af440..36570ac4 100644 --- a/c_sharp/src/org/ldk/structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_DelayedPaymentOutputDescriptorDecodeErrorZ : CommonBase { * Creates a new CResult_DelayedPaymentOutputDescriptorDecodeErrorZ in the success state. */ public static Result_DelayedPaymentOutputDescriptorDecodeErrorZ ok(org.ldk.structs.DelayedPaymentOutputDescriptor o) { - long ret = bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_DelayedPaymentOutputDescriptorDecodeErrorZ ret_hu_conv = Result_DelayedPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_DescriptionCreationErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_DescriptionCreationErrorZ.cs index e3604b57..d3496ff8 100644 --- a/c_sharp/src/org/ldk/structs/Result_DescriptionCreationErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_DescriptionCreationErrorZ.cs @@ -39,7 +39,7 @@ public class Result_DescriptionCreationErrorZ : CommonBase { * Creates a new CResult_DescriptionCreationErrorZ in the success state. */ public static Result_DescriptionCreationErrorZ ok(org.ldk.structs.Description o) { - long ret = bindings.CResult_DescriptionCreationErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_DescriptionCreationErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_DescriptionCreationErrorZ ret_hu_conv = Result_DescriptionCreationErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_ErrorMessageDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_ErrorMessageDecodeErrorZ.cs index 51bbe928..aedf8291 100644 --- a/c_sharp/src/org/ldk/structs/Result_ErrorMessageDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_ErrorMessageDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_ErrorMessageDecodeErrorZ : CommonBase { * Creates a new CResult_ErrorMessageDecodeErrorZ in the success state. */ public static Result_ErrorMessageDecodeErrorZ ok(org.ldk.structs.ErrorMessage o) { - long ret = bindings.CResult_ErrorMessageDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ErrorMessageDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ErrorMessageDecodeErrorZ ret_hu_conv = Result_ErrorMessageDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_FinalOnionHopDataDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_FinalOnionHopDataDecodeErrorZ.cs index 1a89d679..8bce2530 100644 --- a/c_sharp/src/org/ldk/structs/Result_FinalOnionHopDataDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_FinalOnionHopDataDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_FinalOnionHopDataDecodeErrorZ : CommonBase { * Creates a new CResult_FinalOnionHopDataDecodeErrorZ in the success state. */ public static Result_FinalOnionHopDataDecodeErrorZ ok(org.ldk.structs.FinalOnionHopData o) { - long ret = bindings.CResult_FinalOnionHopDataDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_FinalOnionHopDataDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_FinalOnionHopDataDecodeErrorZ ret_hu_conv = Result_FinalOnionHopDataDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_FixedPenaltyScorerDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_FixedPenaltyScorerDecodeErrorZ.cs index 6cd6b40f..84c522a8 100644 --- a/c_sharp/src/org/ldk/structs/Result_FixedPenaltyScorerDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_FixedPenaltyScorerDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_FixedPenaltyScorerDecodeErrorZ : CommonBase { * Creates a new CResult_FixedPenaltyScorerDecodeErrorZ in the success state. */ public static Result_FixedPenaltyScorerDecodeErrorZ ok(org.ldk.structs.FixedPenaltyScorer o) { - long ret = bindings.CResult_FixedPenaltyScorerDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_FixedPenaltyScorerDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_FixedPenaltyScorerDecodeErrorZ ret_hu_conv = Result_FixedPenaltyScorerDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_FundingCreatedDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_FundingCreatedDecodeErrorZ.cs index 787006aa..20411eeb 100644 --- a/c_sharp/src/org/ldk/structs/Result_FundingCreatedDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_FundingCreatedDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_FundingCreatedDecodeErrorZ : CommonBase { * Creates a new CResult_FundingCreatedDecodeErrorZ in the success state. */ public static Result_FundingCreatedDecodeErrorZ ok(org.ldk.structs.FundingCreated o) { - long ret = bindings.CResult_FundingCreatedDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_FundingCreatedDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_FundingCreatedDecodeErrorZ ret_hu_conv = Result_FundingCreatedDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_FundingSignedDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_FundingSignedDecodeErrorZ.cs index 55ceac75..e32fac25 100644 --- a/c_sharp/src/org/ldk/structs/Result_FundingSignedDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_FundingSignedDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_FundingSignedDecodeErrorZ : CommonBase { * Creates a new CResult_FundingSignedDecodeErrorZ in the success state. */ public static Result_FundingSignedDecodeErrorZ ok(org.ldk.structs.FundingSigned o) { - long ret = bindings.CResult_FundingSignedDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_FundingSignedDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_FundingSignedDecodeErrorZ ret_hu_conv = Result_FundingSignedDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_GossipTimestampFilterDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_GossipTimestampFilterDecodeErrorZ.cs index 9682ff58..4a580887 100644 --- a/c_sharp/src/org/ldk/structs/Result_GossipTimestampFilterDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_GossipTimestampFilterDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_GossipTimestampFilterDecodeErrorZ : CommonBase { * Creates a new CResult_GossipTimestampFilterDecodeErrorZ in the success state. */ public static Result_GossipTimestampFilterDecodeErrorZ ok(org.ldk.structs.GossipTimestampFilter o) { - long ret = bindings.CResult_GossipTimestampFilterDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_GossipTimestampFilterDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_GossipTimestampFilterDecodeErrorZ ret_hu_conv = Result_GossipTimestampFilterDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_HTLCDescriptorDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_HTLCDescriptorDecodeErrorZ.cs index c946833d..34f1b855 100644 --- a/c_sharp/src/org/ldk/structs/Result_HTLCDescriptorDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_HTLCDescriptorDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_HTLCDescriptorDecodeErrorZ : CommonBase { * Creates a new CResult_HTLCDescriptorDecodeErrorZ in the success state. */ public static Result_HTLCDescriptorDecodeErrorZ ok(org.ldk.structs.HTLCDescriptor o) { - long ret = bindings.CResult_HTLCDescriptorDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_HTLCDescriptorDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_HTLCDescriptorDecodeErrorZ ret_hu_conv = Result_HTLCDescriptorDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_HTLCOutputInCommitmentDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_HTLCOutputInCommitmentDecodeErrorZ.cs index 369191e0..501a8fba 100644 --- a/c_sharp/src/org/ldk/structs/Result_HTLCOutputInCommitmentDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_HTLCOutputInCommitmentDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_HTLCOutputInCommitmentDecodeErrorZ : CommonBase { * Creates a new CResult_HTLCOutputInCommitmentDecodeErrorZ in the success state. */ public static Result_HTLCOutputInCommitmentDecodeErrorZ ok(org.ldk.structs.HTLCOutputInCommitment o) { - long ret = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_HTLCOutputInCommitmentDecodeErrorZ ret_hu_conv = Result_HTLCOutputInCommitmentDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_HTLCUpdateDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_HTLCUpdateDecodeErrorZ.cs index 94fac24e..3ef6aa6a 100644 --- a/c_sharp/src/org/ldk/structs/Result_HTLCUpdateDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_HTLCUpdateDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_HTLCUpdateDecodeErrorZ : CommonBase { * Creates a new CResult_HTLCUpdateDecodeErrorZ in the success state. */ public static Result_HTLCUpdateDecodeErrorZ ok(org.ldk.structs.HTLCUpdate o) { - long ret = bindings.CResult_HTLCUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_HTLCUpdateDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_HTLCUpdateDecodeErrorZ ret_hu_conv = Result_HTLCUpdateDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_HolderCommitmentTransactionDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_HolderCommitmentTransactionDecodeErrorZ.cs index 13cbf083..e37b5e44 100644 --- a/c_sharp/src/org/ldk/structs/Result_HolderCommitmentTransactionDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_HolderCommitmentTransactionDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_HolderCommitmentTransactionDecodeErrorZ : CommonBase { * Creates a new CResult_HolderCommitmentTransactionDecodeErrorZ in the success state. */ public static Result_HolderCommitmentTransactionDecodeErrorZ ok(org.ldk.structs.HolderCommitmentTransaction o) { - long ret = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_HolderCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_HolderCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_HostnameDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_HostnameDecodeErrorZ.cs index 2fd97360..c7e34cfc 100644 --- a/c_sharp/src/org/ldk/structs/Result_HostnameDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_HostnameDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_HostnameDecodeErrorZ : CommonBase { * Creates a new CResult_HostnameDecodeErrorZ in the success state. */ public static Result_HostnameDecodeErrorZ ok(org.ldk.structs.Hostname o) { - long ret = bindings.CResult_HostnameDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_HostnameDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_HostnameDecodeErrorZ ret_hu_conv = Result_HostnameDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_HtlcBasepointDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_HtlcBasepointDecodeErrorZ.cs index eb9a6fdd..7e4886d6 100644 --- a/c_sharp/src/org/ldk/structs/Result_HtlcBasepointDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_HtlcBasepointDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_HtlcBasepointDecodeErrorZ : CommonBase { * Creates a new CResult_HtlcBasepointDecodeErrorZ in the success state. */ public static Result_HtlcBasepointDecodeErrorZ ok(org.ldk.structs.HtlcBasepoint o) { - long ret = bindings.CResult_HtlcBasepointDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_HtlcBasepointDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_HtlcBasepointDecodeErrorZ ret_hu_conv = Result_HtlcBasepointDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_HtlcKeyDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_HtlcKeyDecodeErrorZ.cs index 6a44b286..7037bc7f 100644 --- a/c_sharp/src/org/ldk/structs/Result_HtlcKeyDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_HtlcKeyDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_HtlcKeyDecodeErrorZ : CommonBase { * Creates a new CResult_HtlcKeyDecodeErrorZ in the success state. */ public static Result_HtlcKeyDecodeErrorZ ok(org.ldk.structs.HtlcKey o) { - long ret = bindings.CResult_HtlcKeyDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_HtlcKeyDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_HtlcKeyDecodeErrorZ ret_hu_conv = Result_HtlcKeyDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_InFlightHtlcsDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_InFlightHtlcsDecodeErrorZ.cs index 76e0dc10..09681eab 100644 --- a/c_sharp/src/org/ldk/structs/Result_InFlightHtlcsDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_InFlightHtlcsDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_InFlightHtlcsDecodeErrorZ : CommonBase { * Creates a new CResult_InFlightHtlcsDecodeErrorZ in the success state. */ public static Result_InFlightHtlcsDecodeErrorZ ok(org.ldk.structs.InFlightHtlcs o) { - long ret = bindings.CResult_InFlightHtlcsDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_InFlightHtlcsDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_InFlightHtlcsDecodeErrorZ ret_hu_conv = Result_InFlightHtlcsDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_InMemorySignerDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_InMemorySignerDecodeErrorZ.cs index ce2ae5f0..0fdca818 100644 --- a/c_sharp/src/org/ldk/structs/Result_InMemorySignerDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_InMemorySignerDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_InMemorySignerDecodeErrorZ : CommonBase { * Creates a new CResult_InMemorySignerDecodeErrorZ in the success state. */ public static Result_InMemorySignerDecodeErrorZ ok(org.ldk.structs.InMemorySigner o) { - long ret = bindings.CResult_InMemorySignerDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_InMemorySignerDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_InMemorySignerDecodeErrorZ ret_hu_conv = Result_InMemorySignerDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_InitDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_InitDecodeErrorZ.cs index d35f26d2..f0e3abc5 100644 --- a/c_sharp/src/org/ldk/structs/Result_InitDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_InitDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_InitDecodeErrorZ : CommonBase { * Creates a new CResult_InitDecodeErrorZ in the success state. */ public static Result_InitDecodeErrorZ ok(org.ldk.structs.Init o) { - long ret = bindings.CResult_InitDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_InitDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_InitDecodeErrorZ ret_hu_conv = Result_InitDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_InitFeaturesDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_InitFeaturesDecodeErrorZ.cs index ae3e3eeb..18bd0b75 100644 --- a/c_sharp/src/org/ldk/structs/Result_InitFeaturesDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_InitFeaturesDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_InitFeaturesDecodeErrorZ : CommonBase { * Creates a new CResult_InitFeaturesDecodeErrorZ in the success state. */ public static Result_InitFeaturesDecodeErrorZ ok(org.ldk.structs.InitFeatures o) { - long ret = bindings.CResult_InitFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_InitFeaturesDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_InitFeaturesDecodeErrorZ ret_hu_conv = Result_InitFeaturesDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_InvoiceErrorDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_InvoiceErrorDecodeErrorZ.cs index 8b967f0e..96667d99 100644 --- a/c_sharp/src/org/ldk/structs/Result_InvoiceErrorDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_InvoiceErrorDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_InvoiceErrorDecodeErrorZ : CommonBase { * Creates a new CResult_InvoiceErrorDecodeErrorZ in the success state. */ public static Result_InvoiceErrorDecodeErrorZ ok(org.ldk.structs.InvoiceError o) { - long ret = bindings.CResult_InvoiceErrorDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_InvoiceErrorDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_InvoiceErrorDecodeErrorZ ret_hu_conv = Result_InvoiceErrorDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_InvoiceRequestBolt12SemanticErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_InvoiceRequestBolt12SemanticErrorZ.cs new file mode 100644 index 00000000..f24d56d7 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/Result_InvoiceRequestBolt12SemanticErrorZ.cs @@ -0,0 +1,89 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +public class Result_InvoiceRequestBolt12SemanticErrorZ : CommonBase { + Result_InvoiceRequestBolt12SemanticErrorZ(object _dummy, long ptr) : base(ptr) { } + ~Result_InvoiceRequestBolt12SemanticErrorZ() { + if (ptr != 0) { bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_free(ptr); } + } + + internal static Result_InvoiceRequestBolt12SemanticErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_InvoiceRequestBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_InvoiceRequestBolt12SemanticErrorZ_Err(null, ptr); + } + } + public class Result_InvoiceRequestBolt12SemanticErrorZ_OK : Result_InvoiceRequestBolt12SemanticErrorZ { + public readonly InvoiceRequest res; + internal Result_InvoiceRequestBolt12SemanticErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) { + long res = bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(ptr); + org.ldk.structs.InvoiceRequest res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.InvoiceRequest(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); }; + this.res = res_hu_conv; + } + } + + public class Result_InvoiceRequestBolt12SemanticErrorZ_Err : Result_InvoiceRequestBolt12SemanticErrorZ { + public readonly Bolt12SemanticError err; + internal Result_InvoiceRequestBolt12SemanticErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) { + this.err = bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(ptr); + } + } + + /** + * Creates a new CResult_InvoiceRequestBolt12SemanticErrorZ in the success state. + */ + public static Result_InvoiceRequestBolt12SemanticErrorZ ok(org.ldk.structs.InvoiceRequest o) { + long ret = bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_ok(o.ptr); + GC.KeepAlive(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceRequestBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_InvoiceRequestBolt12SemanticErrorZ in the error state. + */ + public static Result_InvoiceRequestBolt12SemanticErrorZ err(Bolt12SemanticError e) { + long ret = bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_err(e); + GC.KeepAlive(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceRequestBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public bool is_ok() { + bool ret = bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(this.ptr); + GC.KeepAlive(this); + return ret; + } + + internal long clone_ptr() { + long ret = bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a new CResult_InvoiceRequestBolt12SemanticErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_InvoiceRequestBolt12SemanticErrorZ clone() { + long ret = bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceRequestBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/Result_InvoiceRequestFieldsDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_InvoiceRequestFieldsDecodeErrorZ.cs new file mode 100644 index 00000000..cf99b087 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/Result_InvoiceRequestFieldsDecodeErrorZ.cs @@ -0,0 +1,93 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +public class Result_InvoiceRequestFieldsDecodeErrorZ : CommonBase { + Result_InvoiceRequestFieldsDecodeErrorZ(object _dummy, long ptr) : base(ptr) { } + ~Result_InvoiceRequestFieldsDecodeErrorZ() { + if (ptr != 0) { bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_free(ptr); } + } + + internal static Result_InvoiceRequestFieldsDecodeErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(ptr)) { + return new Result_InvoiceRequestFieldsDecodeErrorZ_OK(null, ptr); + } else { + return new Result_InvoiceRequestFieldsDecodeErrorZ_Err(null, ptr); + } + } + public class Result_InvoiceRequestFieldsDecodeErrorZ_OK : Result_InvoiceRequestFieldsDecodeErrorZ { + public readonly InvoiceRequestFields res; + internal Result_InvoiceRequestFieldsDecodeErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) { + long res = bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(ptr); + org.ldk.structs.InvoiceRequestFields res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.InvoiceRequestFields(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); }; + this.res = res_hu_conv; + } + } + + public class Result_InvoiceRequestFieldsDecodeErrorZ_Err : Result_InvoiceRequestFieldsDecodeErrorZ { + public readonly DecodeError err; + internal Result_InvoiceRequestFieldsDecodeErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) { + long err = bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(ptr); + org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err); + if (err_hu_conv != null) { err_hu_conv.ptrs_to.AddLast(this); }; + this.err = err_hu_conv; + } + } + + /** + * Creates a new CResult_InvoiceRequestFieldsDecodeErrorZ in the success state. + */ + public static Result_InvoiceRequestFieldsDecodeErrorZ ok(org.ldk.structs.InvoiceRequestFields o) { + long ret = bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_ok(o.ptr); + GC.KeepAlive(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceRequestFieldsDecodeErrorZ ret_hu_conv = Result_InvoiceRequestFieldsDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_InvoiceRequestFieldsDecodeErrorZ in the error state. + */ + public static Result_InvoiceRequestFieldsDecodeErrorZ err(org.ldk.structs.DecodeError e) { + long ret = bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_err(e.ptr); + GC.KeepAlive(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceRequestFieldsDecodeErrorZ ret_hu_conv = Result_InvoiceRequestFieldsDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(e); }; + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public bool is_ok() { + bool ret = bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(this.ptr); + GC.KeepAlive(this); + return ret; + } + + internal long clone_ptr() { + long ret = bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a new CResult_InvoiceRequestFieldsDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_InvoiceRequestFieldsDecodeErrorZ clone() { + long ret = bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceRequestFieldsDecodeErrorZ ret_hu_conv = Result_InvoiceRequestFieldsDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.cs new file mode 100644 index 00000000..e121eef5 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.cs @@ -0,0 +1,79 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +public class Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ : CommonBase { + Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ(object _dummy, long ptr) : base(ptr) { } + ~Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ() { + if (ptr != 0) { bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(ptr); } + } + + internal static Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_Err(null, ptr); + } + } + public class Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_OK : Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ { + public readonly InvoiceRequestWithDerivedPayerIdBuilder res; + internal Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) { + long res = bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(ptr); + org.ldk.structs.InvoiceRequestWithDerivedPayerIdBuilder res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.InvoiceRequestWithDerivedPayerIdBuilder(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); }; + this.res = res_hu_conv; + } + } + + public class Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_Err : Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ { + public readonly Bolt12SemanticError err; + internal Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) { + this.err = bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(ptr); + } + } + + /** + * Creates a new CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ in the success state. + */ + public static Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ ok(org.ldk.structs.InvoiceRequestWithDerivedPayerIdBuilder o) { + long ret = bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(o.ptr); + GC.KeepAlive(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid ret_hu_conv being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after ret_hu_conv call, o is reset to null and is now a dummy object. + o.ptr = 0;; + return ret_hu_conv; + } + + /** + * Creates a new CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ in the error state. + */ + public static Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ err(Bolt12SemanticError e) { + long ret = bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(e); + GC.KeepAlive(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public bool is_ok() { + bool ret = bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(this.ptr); + GC.KeepAlive(this); + return ret; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.cs new file mode 100644 index 00000000..92cccd1e --- /dev/null +++ b/c_sharp/src/org/ldk/structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.cs @@ -0,0 +1,79 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +public class Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ : CommonBase { + Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ(object _dummy, long ptr) : base(ptr) { } + ~Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ() { + if (ptr != 0) { bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(ptr); } + } + + internal static Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_Err(null, ptr); + } + } + public class Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_OK : Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ { + public readonly InvoiceRequestWithExplicitPayerIdBuilder res; + internal Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) { + long res = bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(ptr); + org.ldk.structs.InvoiceRequestWithExplicitPayerIdBuilder res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.InvoiceRequestWithExplicitPayerIdBuilder(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); }; + this.res = res_hu_conv; + } + } + + public class Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_Err : Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ { + public readonly Bolt12SemanticError err; + internal Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) { + this.err = bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(ptr); + } + } + + /** + * Creates a new CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ in the success state. + */ + public static Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ ok(org.ldk.structs.InvoiceRequestWithExplicitPayerIdBuilder o) { + long ret = bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok(o.ptr); + GC.KeepAlive(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid ret_hu_conv being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after ret_hu_conv call, o is reset to null and is now a dummy object. + o.ptr = 0;; + return ret_hu_conv; + } + + /** + * Creates a new CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ in the error state. + */ + public static Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ err(Bolt12SemanticError e) { + long ret = bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(e); + GC.KeepAlive(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public bool is_ok() { + bool ret = bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(this.ptr); + GC.KeepAlive(this); + return ret; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.cs new file mode 100644 index 00000000..e3adfbb7 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.cs @@ -0,0 +1,79 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +public class Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ : CommonBase { + Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ(object _dummy, long ptr) : base(ptr) { } + ~Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ() { + if (ptr != 0) { bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(ptr); } + } + + internal static Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_Err(null, ptr); + } + } + public class Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_OK : Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ { + public readonly InvoiceWithDerivedSigningPubkeyBuilder res; + internal Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) { + long res = bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(ptr); + org.ldk.structs.InvoiceWithDerivedSigningPubkeyBuilder res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.InvoiceWithDerivedSigningPubkeyBuilder(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); }; + this.res = res_hu_conv; + } + } + + public class Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_Err : Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ { + public readonly Bolt12SemanticError err; + internal Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) { + this.err = bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(ptr); + } + } + + /** + * Creates a new CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ in the success state. + */ + public static Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ ok(org.ldk.structs.InvoiceWithDerivedSigningPubkeyBuilder o) { + long ret = bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o.ptr); + GC.KeepAlive(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid ret_hu_conv being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after ret_hu_conv call, o is reset to null and is now a dummy object. + o.ptr = 0;; + return ret_hu_conv; + } + + /** + * Creates a new CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ in the error state. + */ + public static Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ err(Bolt12SemanticError e) { + long ret = bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err(e); + GC.KeepAlive(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public bool is_ok() { + bool ret = bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(this.ptr); + GC.KeepAlive(this); + return ret; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.cs new file mode 100644 index 00000000..74488f5b --- /dev/null +++ b/c_sharp/src/org/ldk/structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.cs @@ -0,0 +1,79 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +public class Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ : CommonBase { + Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ(object _dummy, long ptr) : base(ptr) { } + ~Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ() { + if (ptr != 0) { bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free(ptr); } + } + + internal static Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_Err(null, ptr); + } + } + public class Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_OK : Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ { + public readonly InvoiceWithExplicitSigningPubkeyBuilder res; + internal Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) { + long res = bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(ptr); + org.ldk.structs.InvoiceWithExplicitSigningPubkeyBuilder res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.InvoiceWithExplicitSigningPubkeyBuilder(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); }; + this.res = res_hu_conv; + } + } + + public class Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_Err : Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ { + public readonly Bolt12SemanticError err; + internal Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) { + this.err = bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(ptr); + } + } + + /** + * Creates a new CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ in the success state. + */ + public static Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ ok(org.ldk.structs.InvoiceWithExplicitSigningPubkeyBuilder o) { + long ret = bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o.ptr); + GC.KeepAlive(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid ret_hu_conv being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after ret_hu_conv call, o is reset to null and is now a dummy object. + o.ptr = 0;; + return ret_hu_conv; + } + + /** + * Creates a new CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ in the error state. + */ + public static Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ err(Bolt12SemanticError e) { + long ret = bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err(e); + GC.KeepAlive(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public bool is_ok() { + bool ret = bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(this.ptr); + GC.KeepAlive(this); + return ret; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/Result_LockedChannelMonitorNoneZ.cs b/c_sharp/src/org/ldk/structs/Result_LockedChannelMonitorNoneZ.cs index 915c346c..d892faad 100644 --- a/c_sharp/src/org/ldk/structs/Result_LockedChannelMonitorNoneZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_LockedChannelMonitorNoneZ.cs @@ -37,7 +37,7 @@ public class Result_LockedChannelMonitorNoneZ : CommonBase { * Creates a new CResult_LockedChannelMonitorNoneZ in the success state. */ public static Result_LockedChannelMonitorNoneZ ok(org.ldk.structs.LockedChannelMonitor o) { - long ret = bindings.CResult_LockedChannelMonitorNoneZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_LockedChannelMonitorNoneZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_LockedChannelMonitorNoneZ ret_hu_conv = Result_LockedChannelMonitorNoneZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_NodeAliasDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_NodeAliasDecodeErrorZ.cs index 93edb417..c6358766 100644 --- a/c_sharp/src/org/ldk/structs/Result_NodeAliasDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_NodeAliasDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_NodeAliasDecodeErrorZ : CommonBase { * Creates a new CResult_NodeAliasDecodeErrorZ in the success state. */ public static Result_NodeAliasDecodeErrorZ ok(org.ldk.structs.NodeAlias o) { - long ret = bindings.CResult_NodeAliasDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_NodeAliasDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_NodeAliasDecodeErrorZ ret_hu_conv = Result_NodeAliasDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_NodeAnnouncementDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_NodeAnnouncementDecodeErrorZ.cs index 665e8e36..c17dff49 100644 --- a/c_sharp/src/org/ldk/structs/Result_NodeAnnouncementDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_NodeAnnouncementDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_NodeAnnouncementDecodeErrorZ : CommonBase { * Creates a new CResult_NodeAnnouncementDecodeErrorZ in the success state. */ public static Result_NodeAnnouncementDecodeErrorZ ok(org.ldk.structs.NodeAnnouncement o) { - long ret = bindings.CResult_NodeAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_NodeAnnouncementDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_NodeAnnouncementDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_NodeAnnouncementInfoDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_NodeAnnouncementInfoDecodeErrorZ.cs index cb2c2245..d9214823 100644 --- a/c_sharp/src/org/ldk/structs/Result_NodeAnnouncementInfoDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_NodeAnnouncementInfoDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_NodeAnnouncementInfoDecodeErrorZ : CommonBase { * Creates a new CResult_NodeAnnouncementInfoDecodeErrorZ in the success state. */ public static Result_NodeAnnouncementInfoDecodeErrorZ ok(org.ldk.structs.NodeAnnouncementInfo o) { - long ret = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_NodeAnnouncementInfoDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementInfoDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_NodeFeaturesDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_NodeFeaturesDecodeErrorZ.cs index 8d756c32..f7eba84f 100644 --- a/c_sharp/src/org/ldk/structs/Result_NodeFeaturesDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_NodeFeaturesDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_NodeFeaturesDecodeErrorZ : CommonBase { * Creates a new CResult_NodeFeaturesDecodeErrorZ in the success state. */ public static Result_NodeFeaturesDecodeErrorZ ok(org.ldk.structs.NodeFeatures o) { - long ret = bindings.CResult_NodeFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_NodeFeaturesDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_NodeFeaturesDecodeErrorZ ret_hu_conv = Result_NodeFeaturesDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_NodeIdDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_NodeIdDecodeErrorZ.cs index e4a5a918..0d1f6e9c 100644 --- a/c_sharp/src/org/ldk/structs/Result_NodeIdDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_NodeIdDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_NodeIdDecodeErrorZ : CommonBase { * Creates a new CResult_NodeIdDecodeErrorZ in the success state. */ public static Result_NodeIdDecodeErrorZ ok(org.ldk.structs.NodeId o) { - long ret = bindings.CResult_NodeIdDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_NodeIdDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_NodeIdDecodeErrorZ ret_hu_conv = Result_NodeIdDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_NodeInfoDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_NodeInfoDecodeErrorZ.cs index 61cfdcc3..7474a7da 100644 --- a/c_sharp/src/org/ldk/structs/Result_NodeInfoDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_NodeInfoDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_NodeInfoDecodeErrorZ : CommonBase { * Creates a new CResult_NodeInfoDecodeErrorZ in the success state. */ public static Result_NodeInfoDecodeErrorZ ok(org.ldk.structs.NodeInfo o) { - long ret = bindings.CResult_NodeInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_NodeInfoDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_NodeInfoDecodeErrorZ ret_hu_conv = Result_NodeInfoDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_NoneLightningErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_NoneLightningErrorZ.cs index 68b47434..a69057fb 100644 --- a/c_sharp/src/org/ldk/structs/Result_NoneLightningErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_NoneLightningErrorZ.cs @@ -47,7 +47,7 @@ public class Result_NoneLightningErrorZ : CommonBase { * Creates a new CResult_NoneLightningErrorZ in the error state. */ public static Result_NoneLightningErrorZ err(org.ldk.structs.LightningError e) { - long ret = bindings.CResult_NoneLightningErrorZ_err(e == null ? 0 : e.ptr); + long ret = bindings.CResult_NoneLightningErrorZ_err(e.ptr); GC.KeepAlive(e); if (ret >= 0 && ret <= 4096) { return null; } Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_NonePeerHandleErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_NonePeerHandleErrorZ.cs index c1efa8e8..41960438 100644 --- a/c_sharp/src/org/ldk/structs/Result_NonePeerHandleErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_NonePeerHandleErrorZ.cs @@ -47,7 +47,7 @@ public class Result_NonePeerHandleErrorZ : CommonBase { * Creates a new CResult_NonePeerHandleErrorZ in the error state. */ public static Result_NonePeerHandleErrorZ err(org.ldk.structs.PeerHandleError e) { - long ret = bindings.CResult_NonePeerHandleErrorZ_err(e == null ? 0 : e.ptr); + long ret = bindings.CResult_NonePeerHandleErrorZ_err(e.ptr); GC.KeepAlive(e); if (ret >= 0 && ret <= 4096) { return null; } Result_NonePeerHandleErrorZ ret_hu_conv = Result_NonePeerHandleErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_OfferBolt12ParseErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_OfferBolt12ParseErrorZ.cs index 778fb0c2..9a90137a 100644 --- a/c_sharp/src/org/ldk/structs/Result_OfferBolt12ParseErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_OfferBolt12ParseErrorZ.cs @@ -42,7 +42,7 @@ public class Result_OfferBolt12ParseErrorZ : CommonBase { * Creates a new CResult_OfferBolt12ParseErrorZ in the success state. */ public static Result_OfferBolt12ParseErrorZ ok(org.ldk.structs.Offer o) { - long ret = bindings.CResult_OfferBolt12ParseErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_OfferBolt12ParseErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_OfferBolt12ParseErrorZ ret_hu_conv = Result_OfferBolt12ParseErrorZ.constr_from_ptr(ret); @@ -54,7 +54,7 @@ public class Result_OfferBolt12ParseErrorZ : CommonBase { * Creates a new CResult_OfferBolt12ParseErrorZ in the error state. */ public static Result_OfferBolt12ParseErrorZ err(org.ldk.structs.Bolt12ParseError e) { - long ret = bindings.CResult_OfferBolt12ParseErrorZ_err(e == null ? 0 : e.ptr); + long ret = bindings.CResult_OfferBolt12ParseErrorZ_err(e.ptr); GC.KeepAlive(e); if (ret >= 0 && ret <= 4096) { return null; } Result_OfferBolt12ParseErrorZ ret_hu_conv = Result_OfferBolt12ParseErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_OfferBolt12SemanticErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_OfferBolt12SemanticErrorZ.cs new file mode 100644 index 00000000..a0cd0655 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/Result_OfferBolt12SemanticErrorZ.cs @@ -0,0 +1,89 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +public class Result_OfferBolt12SemanticErrorZ : CommonBase { + Result_OfferBolt12SemanticErrorZ(object _dummy, long ptr) : base(ptr) { } + ~Result_OfferBolt12SemanticErrorZ() { + if (ptr != 0) { bindings.CResult_OfferBolt12SemanticErrorZ_free(ptr); } + } + + internal static Result_OfferBolt12SemanticErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_OfferBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_OfferBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_OfferBolt12SemanticErrorZ_Err(null, ptr); + } + } + public class Result_OfferBolt12SemanticErrorZ_OK : Result_OfferBolt12SemanticErrorZ { + public readonly Offer res; + internal Result_OfferBolt12SemanticErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) { + long res = bindings.CResult_OfferBolt12SemanticErrorZ_get_ok(ptr); + org.ldk.structs.Offer res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.Offer(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); }; + this.res = res_hu_conv; + } + } + + public class Result_OfferBolt12SemanticErrorZ_Err : Result_OfferBolt12SemanticErrorZ { + public readonly Bolt12SemanticError err; + internal Result_OfferBolt12SemanticErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) { + this.err = bindings.CResult_OfferBolt12SemanticErrorZ_get_err(ptr); + } + } + + /** + * Creates a new CResult_OfferBolt12SemanticErrorZ in the success state. + */ + public static Result_OfferBolt12SemanticErrorZ ok(org.ldk.structs.Offer o) { + long ret = bindings.CResult_OfferBolt12SemanticErrorZ_ok(o.ptr); + GC.KeepAlive(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OfferBolt12SemanticErrorZ ret_hu_conv = Result_OfferBolt12SemanticErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_OfferBolt12SemanticErrorZ in the error state. + */ + public static Result_OfferBolt12SemanticErrorZ err(Bolt12SemanticError e) { + long ret = bindings.CResult_OfferBolt12SemanticErrorZ_err(e); + GC.KeepAlive(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OfferBolt12SemanticErrorZ ret_hu_conv = Result_OfferBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public bool is_ok() { + bool ret = bindings.CResult_OfferBolt12SemanticErrorZ_is_ok(this.ptr); + GC.KeepAlive(this); + return ret; + } + + internal long clone_ptr() { + long ret = bindings.CResult_OfferBolt12SemanticErrorZ_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a new CResult_OfferBolt12SemanticErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_OfferBolt12SemanticErrorZ clone() { + long ret = bindings.CResult_OfferBolt12SemanticErrorZ_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OfferBolt12SemanticErrorZ ret_hu_conv = Result_OfferBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/Result_OfferIdDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_OfferIdDecodeErrorZ.cs new file mode 100644 index 00000000..75dccc42 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/Result_OfferIdDecodeErrorZ.cs @@ -0,0 +1,93 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +public class Result_OfferIdDecodeErrorZ : CommonBase { + Result_OfferIdDecodeErrorZ(object _dummy, long ptr) : base(ptr) { } + ~Result_OfferIdDecodeErrorZ() { + if (ptr != 0) { bindings.CResult_OfferIdDecodeErrorZ_free(ptr); } + } + + internal static Result_OfferIdDecodeErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_OfferIdDecodeErrorZ_is_ok(ptr)) { + return new Result_OfferIdDecodeErrorZ_OK(null, ptr); + } else { + return new Result_OfferIdDecodeErrorZ_Err(null, ptr); + } + } + public class Result_OfferIdDecodeErrorZ_OK : Result_OfferIdDecodeErrorZ { + public readonly OfferId res; + internal Result_OfferIdDecodeErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) { + long res = bindings.CResult_OfferIdDecodeErrorZ_get_ok(ptr); + org.ldk.structs.OfferId res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.OfferId(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); }; + this.res = res_hu_conv; + } + } + + public class Result_OfferIdDecodeErrorZ_Err : Result_OfferIdDecodeErrorZ { + public readonly DecodeError err; + internal Result_OfferIdDecodeErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) { + long err = bindings.CResult_OfferIdDecodeErrorZ_get_err(ptr); + org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err); + if (err_hu_conv != null) { err_hu_conv.ptrs_to.AddLast(this); }; + this.err = err_hu_conv; + } + } + + /** + * Creates a new CResult_OfferIdDecodeErrorZ in the success state. + */ + public static Result_OfferIdDecodeErrorZ ok(org.ldk.structs.OfferId o) { + long ret = bindings.CResult_OfferIdDecodeErrorZ_ok(o.ptr); + GC.KeepAlive(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OfferIdDecodeErrorZ ret_hu_conv = Result_OfferIdDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_OfferIdDecodeErrorZ in the error state. + */ + public static Result_OfferIdDecodeErrorZ err(org.ldk.structs.DecodeError e) { + long ret = bindings.CResult_OfferIdDecodeErrorZ_err(e.ptr); + GC.KeepAlive(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OfferIdDecodeErrorZ ret_hu_conv = Result_OfferIdDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(e); }; + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public bool is_ok() { + bool ret = bindings.CResult_OfferIdDecodeErrorZ_is_ok(this.ptr); + GC.KeepAlive(this); + return ret; + } + + internal long clone_ptr() { + long ret = bindings.CResult_OfferIdDecodeErrorZ_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a new CResult_OfferIdDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_OfferIdDecodeErrorZ clone() { + long ret = bindings.CResult_OfferIdDecodeErrorZ_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OfferIdDecodeErrorZ ret_hu_conv = Result_OfferIdDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.cs new file mode 100644 index 00000000..a653b236 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.cs @@ -0,0 +1,89 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +public class Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ : CommonBase { + Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ(object _dummy, long ptr) : base(ptr) { } + ~Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ() { + if (ptr != 0) { bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(ptr); } + } + + internal static Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_Err(null, ptr); + } + } + public class Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_OK : Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ { + public readonly OfferWithDerivedMetadataBuilder res; + internal Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) { + long res = bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(ptr); + org.ldk.structs.OfferWithDerivedMetadataBuilder res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.OfferWithDerivedMetadataBuilder(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); }; + this.res = res_hu_conv; + } + } + + public class Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_Err : Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ { + public readonly Bolt12SemanticError err; + internal Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) { + this.err = bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(ptr); + } + } + + /** + * Creates a new CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ in the success state. + */ + public static Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ ok(org.ldk.structs.OfferWithDerivedMetadataBuilder o) { + long ret = bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(o.ptr); + GC.KeepAlive(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ in the error state. + */ + public static Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ err(Bolt12SemanticError e) { + long ret = bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(e); + GC.KeepAlive(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public bool is_ok() { + bool ret = bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(this.ptr); + GC.KeepAlive(this); + return ret; + } + + internal long clone_ptr() { + long ret = bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a new CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ clone() { + long ret = bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/Result_OnionMessageDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_OnionMessageDecodeErrorZ.cs index 8dfa807c..680124ef 100644 --- a/c_sharp/src/org/ldk/structs/Result_OnionMessageDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_OnionMessageDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_OnionMessageDecodeErrorZ : CommonBase { * Creates a new CResult_OnionMessageDecodeErrorZ in the success state. */ public static Result_OnionMessageDecodeErrorZ ok(org.ldk.structs.OnionMessage o) { - long ret = bindings.CResult_OnionMessageDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_OnionMessageDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_OnionMessageDecodeErrorZ ret_hu_conv = Result_OnionMessageDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_OnionMessagePathNoneZ.cs b/c_sharp/src/org/ldk/structs/Result_OnionMessagePathNoneZ.cs index c435f160..7ed0a895 100644 --- a/c_sharp/src/org/ldk/structs/Result_OnionMessagePathNoneZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_OnionMessagePathNoneZ.cs @@ -37,7 +37,7 @@ public class Result_OnionMessagePathNoneZ : CommonBase { * Creates a new CResult_OnionMessagePathNoneZ in the success state. */ public static Result_OnionMessagePathNoneZ ok(org.ldk.structs.OnionMessagePath o) { - long ret = bindings.CResult_OnionMessagePathNoneZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_OnionMessagePathNoneZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_OnionMessagePathNoneZ ret_hu_conv = Result_OnionMessagePathNoneZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_OnionPacketDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_OnionPacketDecodeErrorZ.cs index d699ca0a..99f3eaed 100644 --- a/c_sharp/src/org/ldk/structs/Result_OnionPacketDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_OnionPacketDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_OnionPacketDecodeErrorZ : CommonBase { * Creates a new CResult_OnionPacketDecodeErrorZ in the success state. */ public static Result_OnionPacketDecodeErrorZ ok(org.ldk.structs.OnionPacket o) { - long ret = bindings.CResult_OnionPacketDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_OnionPacketDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_OnionPacketDecodeErrorZ ret_hu_conv = Result_OnionPacketDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_OpenChannelDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_OpenChannelDecodeErrorZ.cs index 955e37b6..a3b6e9c0 100644 --- a/c_sharp/src/org/ldk/structs/Result_OpenChannelDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_OpenChannelDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_OpenChannelDecodeErrorZ : CommonBase { * Creates a new CResult_OpenChannelDecodeErrorZ in the success state. */ public static Result_OpenChannelDecodeErrorZ ok(org.ldk.structs.OpenChannel o) { - long ret = bindings.CResult_OpenChannelDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_OpenChannelDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_OpenChannelDecodeErrorZ ret_hu_conv = Result_OpenChannelDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_OpenChannelV2DecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_OpenChannelV2DecodeErrorZ.cs index 10d7b4dc..f6814da3 100644 --- a/c_sharp/src/org/ldk/structs/Result_OpenChannelV2DecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_OpenChannelV2DecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_OpenChannelV2DecodeErrorZ : CommonBase { * Creates a new CResult_OpenChannelV2DecodeErrorZ in the success state. */ public static Result_OpenChannelV2DecodeErrorZ ok(org.ldk.structs.OpenChannelV2 o) { - long ret = bindings.CResult_OpenChannelV2DecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_OpenChannelV2DecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_OpenChannelV2DecodeErrorZ ret_hu_conv = Result_OpenChannelV2DecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_OutPointDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_OutPointDecodeErrorZ.cs index dac99c18..ae29f7e0 100644 --- a/c_sharp/src/org/ldk/structs/Result_OutPointDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_OutPointDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_OutPointDecodeErrorZ : CommonBase { * Creates a new CResult_OutPointDecodeErrorZ in the success state. */ public static Result_OutPointDecodeErrorZ ok(org.ldk.structs.OutPoint o) { - long ret = bindings.CResult_OutPointDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_OutPointDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_OutPointDecodeErrorZ ret_hu_conv = Result_OutPointDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_OutputSpendStatusDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_OutputSpendStatusDecodeErrorZ.cs new file mode 100644 index 00000000..ca8bcb05 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/Result_OutputSpendStatusDecodeErrorZ.cs @@ -0,0 +1,93 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +public class Result_OutputSpendStatusDecodeErrorZ : CommonBase { + Result_OutputSpendStatusDecodeErrorZ(object _dummy, long ptr) : base(ptr) { } + ~Result_OutputSpendStatusDecodeErrorZ() { + if (ptr != 0) { bindings.CResult_OutputSpendStatusDecodeErrorZ_free(ptr); } + } + + internal static Result_OutputSpendStatusDecodeErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_OutputSpendStatusDecodeErrorZ_is_ok(ptr)) { + return new Result_OutputSpendStatusDecodeErrorZ_OK(null, ptr); + } else { + return new Result_OutputSpendStatusDecodeErrorZ_Err(null, ptr); + } + } + public class Result_OutputSpendStatusDecodeErrorZ_OK : Result_OutputSpendStatusDecodeErrorZ { + public readonly OutputSpendStatus res; + internal Result_OutputSpendStatusDecodeErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) { + long res = bindings.CResult_OutputSpendStatusDecodeErrorZ_get_ok(ptr); + org.ldk.structs.OutputSpendStatus res_hu_conv = org.ldk.structs.OutputSpendStatus.constr_from_ptr(res); + if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); }; + this.res = res_hu_conv; + } + } + + public class Result_OutputSpendStatusDecodeErrorZ_Err : Result_OutputSpendStatusDecodeErrorZ { + public readonly DecodeError err; + internal Result_OutputSpendStatusDecodeErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) { + long err = bindings.CResult_OutputSpendStatusDecodeErrorZ_get_err(ptr); + org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err); + if (err_hu_conv != null) { err_hu_conv.ptrs_to.AddLast(this); }; + this.err = err_hu_conv; + } + } + + /** + * Creates a new CResult_OutputSpendStatusDecodeErrorZ in the success state. + */ + public static Result_OutputSpendStatusDecodeErrorZ ok(org.ldk.structs.OutputSpendStatus o) { + long ret = bindings.CResult_OutputSpendStatusDecodeErrorZ_ok(o.ptr); + GC.KeepAlive(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OutputSpendStatusDecodeErrorZ ret_hu_conv = Result_OutputSpendStatusDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_OutputSpendStatusDecodeErrorZ in the error state. + */ + public static Result_OutputSpendStatusDecodeErrorZ err(org.ldk.structs.DecodeError e) { + long ret = bindings.CResult_OutputSpendStatusDecodeErrorZ_err(e.ptr); + GC.KeepAlive(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OutputSpendStatusDecodeErrorZ ret_hu_conv = Result_OutputSpendStatusDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(e); }; + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public bool is_ok() { + bool ret = bindings.CResult_OutputSpendStatusDecodeErrorZ_is_ok(this.ptr); + GC.KeepAlive(this); + return ret; + } + + internal long clone_ptr() { + long ret = bindings.CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a new CResult_OutputSpendStatusDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_OutputSpendStatusDecodeErrorZ clone() { + long ret = bindings.CResult_OutputSpendStatusDecodeErrorZ_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OutputSpendStatusDecodeErrorZ ret_hu_conv = Result_OutputSpendStatusDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/Result_OutputSweeperDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_OutputSweeperDecodeErrorZ.cs new file mode 100644 index 00000000..bc1dcc90 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/Result_OutputSweeperDecodeErrorZ.cs @@ -0,0 +1,89 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +public class Result_OutputSweeperDecodeErrorZ : CommonBase { + Result_OutputSweeperDecodeErrorZ(object _dummy, long ptr) : base(ptr) { } + ~Result_OutputSweeperDecodeErrorZ() { + if (ptr != 0) { bindings.CResult_OutputSweeperDecodeErrorZ_free(ptr); } + } + + internal static Result_OutputSweeperDecodeErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_OutputSweeperDecodeErrorZ_is_ok(ptr)) { + return new Result_OutputSweeperDecodeErrorZ_OK(null, ptr); + } else { + return new Result_OutputSweeperDecodeErrorZ_Err(null, ptr); + } + } + public class Result_OutputSweeperDecodeErrorZ_OK : Result_OutputSweeperDecodeErrorZ { + public readonly OutputSweeper res; + internal Result_OutputSweeperDecodeErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) { + long res = bindings.CResult_OutputSweeperDecodeErrorZ_get_ok(ptr); + org.ldk.structs.OutputSweeper res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.OutputSweeper(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); }; + this.res = res_hu_conv; + } + } + + public class Result_OutputSweeperDecodeErrorZ_Err : Result_OutputSweeperDecodeErrorZ { + public readonly DecodeError err; + internal Result_OutputSweeperDecodeErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) { + long err = bindings.CResult_OutputSweeperDecodeErrorZ_get_err(ptr); + org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err); + if (err_hu_conv != null) { err_hu_conv.ptrs_to.AddLast(this); }; + this.err = err_hu_conv; + } + } + + /** + * Creates a new CResult_OutputSweeperDecodeErrorZ in the success state. + */ + public static Result_OutputSweeperDecodeErrorZ ok(BestBlock o_best_block, BroadcasterInterface o_broadcaster, FeeEstimator o_fee_estimator, Option_FilterZ o_chain_data_source, OutputSpender o_output_spender, ChangeDestinationSource o_change_destination_source, KVStore o_kv_store, Logger o_logger) { + long ret = bindings.CResult_OutputSweeperDecodeErrorZ_ok(bindings.OutputSweeper_new(o_best_block.ptr, o_broadcaster.ptr, o_fee_estimator.ptr, o_chain_data_source.ptr, o_output_spender.ptr, o_change_destination_source.ptr, o_kv_store.ptr, o_logger.ptr)); + GC.KeepAlive(o_best_block); + GC.KeepAlive(o_broadcaster); + GC.KeepAlive(o_fee_estimator); + GC.KeepAlive(o_chain_data_source); + GC.KeepAlive(o_output_spender); + GC.KeepAlive(o_change_destination_source); + GC.KeepAlive(o_kv_store); + GC.KeepAlive(o_logger); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OutputSweeperDecodeErrorZ ret_hu_conv = Result_OutputSweeperDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o_best_block); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o_broadcaster); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o_fee_estimator); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o_chain_data_source); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o_output_spender); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o_change_destination_source); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o_kv_store); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o_logger); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_OutputSweeperDecodeErrorZ in the error state. + */ + public static Result_OutputSweeperDecodeErrorZ err(org.ldk.structs.DecodeError e) { + long ret = bindings.CResult_OutputSweeperDecodeErrorZ_err(e.ptr); + GC.KeepAlive(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_OutputSweeperDecodeErrorZ ret_hu_conv = Result_OutputSweeperDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(e); }; + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public bool is_ok() { + bool ret = bindings.CResult_OutputSweeperDecodeErrorZ_is_ok(this.ptr); + GC.KeepAlive(this); + return ret; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/Result_PayeePubKeySecp256k1ErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_PayeePubKeySecp256k1ErrorZ.cs index e56a62c5..6cdfdd88 100644 --- a/c_sharp/src/org/ldk/structs/Result_PayeePubKeySecp256k1ErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_PayeePubKeySecp256k1ErrorZ.cs @@ -39,7 +39,7 @@ public class Result_PayeePubKeySecp256k1ErrorZ : CommonBase { * Creates a new CResult_PayeePubKeySecp256k1ErrorZ in the success state. */ public static Result_PayeePubKeySecp256k1ErrorZ ok(org.ldk.structs.PayeePubKey o) { - long ret = bindings.CResult_PayeePubKeySecp256k1ErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_PayeePubKeySecp256k1ErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_PayeePubKeySecp256k1ErrorZ ret_hu_conv = Result_PayeePubKeySecp256k1ErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_PaymentConstraintsDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_PaymentConstraintsDecodeErrorZ.cs index fc1beb51..2b95c9c5 100644 --- a/c_sharp/src/org/ldk/structs/Result_PaymentConstraintsDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_PaymentConstraintsDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_PaymentConstraintsDecodeErrorZ : CommonBase { * Creates a new CResult_PaymentConstraintsDecodeErrorZ in the success state. */ public static Result_PaymentConstraintsDecodeErrorZ ok(org.ldk.structs.PaymentConstraints o) { - long ret = bindings.CResult_PaymentConstraintsDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_PaymentConstraintsDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_PaymentConstraintsDecodeErrorZ ret_hu_conv = Result_PaymentConstraintsDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_PaymentContextDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_PaymentContextDecodeErrorZ.cs new file mode 100644 index 00000000..6742f4a3 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/Result_PaymentContextDecodeErrorZ.cs @@ -0,0 +1,93 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +public class Result_PaymentContextDecodeErrorZ : CommonBase { + Result_PaymentContextDecodeErrorZ(object _dummy, long ptr) : base(ptr) { } + ~Result_PaymentContextDecodeErrorZ() { + if (ptr != 0) { bindings.CResult_PaymentContextDecodeErrorZ_free(ptr); } + } + + internal static Result_PaymentContextDecodeErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_PaymentContextDecodeErrorZ_is_ok(ptr)) { + return new Result_PaymentContextDecodeErrorZ_OK(null, ptr); + } else { + return new Result_PaymentContextDecodeErrorZ_Err(null, ptr); + } + } + public class Result_PaymentContextDecodeErrorZ_OK : Result_PaymentContextDecodeErrorZ { + public readonly PaymentContext res; + internal Result_PaymentContextDecodeErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) { + long res = bindings.CResult_PaymentContextDecodeErrorZ_get_ok(ptr); + org.ldk.structs.PaymentContext res_hu_conv = org.ldk.structs.PaymentContext.constr_from_ptr(res); + if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); }; + this.res = res_hu_conv; + } + } + + public class Result_PaymentContextDecodeErrorZ_Err : Result_PaymentContextDecodeErrorZ { + public readonly DecodeError err; + internal Result_PaymentContextDecodeErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) { + long err = bindings.CResult_PaymentContextDecodeErrorZ_get_err(ptr); + org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err); + if (err_hu_conv != null) { err_hu_conv.ptrs_to.AddLast(this); }; + this.err = err_hu_conv; + } + } + + /** + * Creates a new CResult_PaymentContextDecodeErrorZ in the success state. + */ + public static Result_PaymentContextDecodeErrorZ ok(org.ldk.structs.PaymentContext o) { + long ret = bindings.CResult_PaymentContextDecodeErrorZ_ok(o.ptr); + GC.KeepAlive(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_PaymentContextDecodeErrorZ ret_hu_conv = Result_PaymentContextDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_PaymentContextDecodeErrorZ in the error state. + */ + public static Result_PaymentContextDecodeErrorZ err(org.ldk.structs.DecodeError e) { + long ret = bindings.CResult_PaymentContextDecodeErrorZ_err(e.ptr); + GC.KeepAlive(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_PaymentContextDecodeErrorZ ret_hu_conv = Result_PaymentContextDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(e); }; + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public bool is_ok() { + bool ret = bindings.CResult_PaymentContextDecodeErrorZ_is_ok(this.ptr); + GC.KeepAlive(this); + return ret; + } + + internal long clone_ptr() { + long ret = bindings.CResult_PaymentContextDecodeErrorZ_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a new CResult_PaymentContextDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_PaymentContextDecodeErrorZ clone() { + long ret = bindings.CResult_PaymentContextDecodeErrorZ_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_PaymentContextDecodeErrorZ ret_hu_conv = Result_PaymentContextDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/Result_PaymentParametersDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_PaymentParametersDecodeErrorZ.cs index 4d9eb90c..1464897d 100644 --- a/c_sharp/src/org/ldk/structs/Result_PaymentParametersDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_PaymentParametersDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_PaymentParametersDecodeErrorZ : CommonBase { * Creates a new CResult_PaymentParametersDecodeErrorZ in the success state. */ public static Result_PaymentParametersDecodeErrorZ ok(org.ldk.structs.PaymentParameters o) { - long ret = bindings.CResult_PaymentParametersDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_PaymentParametersDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_PaymentParametersDecodeErrorZ ret_hu_conv = Result_PaymentParametersDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_PaymentRelayDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_PaymentRelayDecodeErrorZ.cs index fbc7f872..01e945f8 100644 --- a/c_sharp/src/org/ldk/structs/Result_PaymentRelayDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_PaymentRelayDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_PaymentRelayDecodeErrorZ : CommonBase { * Creates a new CResult_PaymentRelayDecodeErrorZ in the success state. */ public static Result_PaymentRelayDecodeErrorZ ok(org.ldk.structs.PaymentRelay o) { - long ret = bindings.CResult_PaymentRelayDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_PaymentRelayDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_PaymentRelayDecodeErrorZ ret_hu_conv = Result_PaymentRelayDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_PeeledOnionNoneZ.cs b/c_sharp/src/org/ldk/structs/Result_PeeledOnionNoneZ.cs index 176dd41e..04742b4d 100644 --- a/c_sharp/src/org/ldk/structs/Result_PeeledOnionNoneZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_PeeledOnionNoneZ.cs @@ -64,5 +64,23 @@ public class Result_PeeledOnionNoneZ : CommonBase { return ret; } + internal long clone_ptr() { + long ret = bindings.CResult_PeeledOnionNoneZ_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a new CResult_PeeledOnionNoneZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_PeeledOnionNoneZ clone() { + long ret = bindings.CResult_PeeledOnionNoneZ_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_PeeledOnionNoneZ ret_hu_conv = Result_PeeledOnionNoneZ.constr_from_ptr(ret); + return ret_hu_conv; + } + } } } } diff --git a/c_sharp/src/org/ldk/structs/Result_PendingHTLCInfoDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_PendingHTLCInfoDecodeErrorZ.cs index 4601eb89..64592855 100644 --- a/c_sharp/src/org/ldk/structs/Result_PendingHTLCInfoDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_PendingHTLCInfoDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_PendingHTLCInfoDecodeErrorZ : CommonBase { * Creates a new CResult_PendingHTLCInfoDecodeErrorZ in the success state. */ public static Result_PendingHTLCInfoDecodeErrorZ ok(org.ldk.structs.PendingHTLCInfo o) { - long ret = bindings.CResult_PendingHTLCInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_PendingHTLCInfoDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_PendingHTLCInfoDecodeErrorZ ret_hu_conv = Result_PendingHTLCInfoDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_PendingHTLCInfoInboundHTLCErrZ.cs b/c_sharp/src/org/ldk/structs/Result_PendingHTLCInfoInboundHTLCErrZ.cs index 5b179ad2..aaf1b9b9 100644 --- a/c_sharp/src/org/ldk/structs/Result_PendingHTLCInfoInboundHTLCErrZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_PendingHTLCInfoInboundHTLCErrZ.cs @@ -42,7 +42,7 @@ public class Result_PendingHTLCInfoInboundHTLCErrZ : CommonBase { * Creates a new CResult_PendingHTLCInfoInboundHTLCErrZ in the success state. */ public static Result_PendingHTLCInfoInboundHTLCErrZ ok(org.ldk.structs.PendingHTLCInfo o) { - long ret = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_PendingHTLCInfoInboundHTLCErrZ ret_hu_conv = Result_PendingHTLCInfoInboundHTLCErrZ.constr_from_ptr(ret); @@ -53,15 +53,12 @@ public class Result_PendingHTLCInfoInboundHTLCErrZ : CommonBase { /** * Creates a new CResult_PendingHTLCInfoInboundHTLCErrZ in the error state. */ - public static Result_PendingHTLCInfoInboundHTLCErrZ err(short e_err_code_arg, byte[] e_err_data_arg, string e_msg_arg) { - long ret = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_err(bindings.InboundHTLCErr_new(e_err_code_arg, InternalUtils.encodeUint8Array(e_err_data_arg), InternalUtils.encodeString(e_msg_arg))); - GC.KeepAlive(e_err_code_arg); - GC.KeepAlive(e_err_data_arg); - GC.KeepAlive(e_msg_arg); + public static Result_PendingHTLCInfoInboundHTLCErrZ err(org.ldk.structs.InboundHTLCErr e) { + long ret = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_err(e.ptr); + GC.KeepAlive(e); if (ret >= 0 && ret <= 4096) { return null; } Result_PendingHTLCInfoInboundHTLCErrZ ret_hu_conv = Result_PendingHTLCInfoInboundHTLCErrZ.constr_from_ptr(ret); - ; - ; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(e); }; return ret_hu_conv; } @@ -74,5 +71,23 @@ public class Result_PendingHTLCInfoInboundHTLCErrZ : CommonBase { return ret; } + internal long clone_ptr() { + long ret = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a new CResult_PendingHTLCInfoInboundHTLCErrZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_PendingHTLCInfoInboundHTLCErrZ clone() { + long ret = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_PendingHTLCInfoInboundHTLCErrZ ret_hu_conv = Result_PendingHTLCInfoInboundHTLCErrZ.constr_from_ptr(ret); + return ret_hu_conv; + } + } } } } diff --git a/c_sharp/src/org/ldk/structs/Result_PhantomRouteHintsDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_PhantomRouteHintsDecodeErrorZ.cs index 3999a2ca..6878b86f 100644 --- a/c_sharp/src/org/ldk/structs/Result_PhantomRouteHintsDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_PhantomRouteHintsDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_PhantomRouteHintsDecodeErrorZ : CommonBase { * Creates a new CResult_PhantomRouteHintsDecodeErrorZ in the success state. */ public static Result_PhantomRouteHintsDecodeErrorZ ok(org.ldk.structs.PhantomRouteHints o) { - long ret = bindings.CResult_PhantomRouteHintsDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_PhantomRouteHintsDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_PhantomRouteHintsDecodeErrorZ ret_hu_conv = Result_PhantomRouteHintsDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_PingDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_PingDecodeErrorZ.cs index 5fb56b9d..e0e355b3 100644 --- a/c_sharp/src/org/ldk/structs/Result_PingDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_PingDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_PingDecodeErrorZ : CommonBase { * Creates a new CResult_PingDecodeErrorZ in the success state. */ public static Result_PingDecodeErrorZ ok(org.ldk.structs.Ping o) { - long ret = bindings.CResult_PingDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_PingDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_PingDecodeErrorZ ret_hu_conv = Result_PingDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_PongDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_PongDecodeErrorZ.cs index 0775c310..1211fe68 100644 --- a/c_sharp/src/org/ldk/structs/Result_PongDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_PongDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_PongDecodeErrorZ : CommonBase { * Creates a new CResult_PongDecodeErrorZ in the success state. */ public static Result_PongDecodeErrorZ ok(org.ldk.structs.Pong o) { - long ret = bindings.CResult_PongDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_PongDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_PongDecodeErrorZ ret_hu_conv = Result_PongDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_PositiveTimestampCreationErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_PositiveTimestampCreationErrorZ.cs index 7093924b..cf59f087 100644 --- a/c_sharp/src/org/ldk/structs/Result_PositiveTimestampCreationErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_PositiveTimestampCreationErrorZ.cs @@ -39,7 +39,7 @@ public class Result_PositiveTimestampCreationErrorZ : CommonBase { * Creates a new CResult_PositiveTimestampCreationErrorZ in the success state. */ public static Result_PositiveTimestampCreationErrorZ ok(org.ldk.structs.PositiveTimestamp o) { - long ret = bindings.CResult_PositiveTimestampCreationErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_PositiveTimestampCreationErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_PositiveTimestampCreationErrorZ ret_hu_conv = Result_PositiveTimestampCreationErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_PrivateRouteCreationErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_PrivateRouteCreationErrorZ.cs index 929e63a7..ba1b46a1 100644 --- a/c_sharp/src/org/ldk/structs/Result_PrivateRouteCreationErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_PrivateRouteCreationErrorZ.cs @@ -39,7 +39,7 @@ public class Result_PrivateRouteCreationErrorZ : CommonBase { * Creates a new CResult_PrivateRouteCreationErrorZ in the success state. */ public static Result_PrivateRouteCreationErrorZ ok(org.ldk.structs.PrivateRoute o) { - long ret = bindings.CResult_PrivateRouteCreationErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_PrivateRouteCreationErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_PrivateRouteCreationErrorZ ret_hu_conv = Result_PrivateRouteCreationErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_ProbabilisticScorerDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_ProbabilisticScorerDecodeErrorZ.cs index 2bed5dd2..f887d547 100644 --- a/c_sharp/src/org/ldk/structs/Result_ProbabilisticScorerDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_ProbabilisticScorerDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_ProbabilisticScorerDecodeErrorZ : CommonBase { * Creates a new CResult_ProbabilisticScorerDecodeErrorZ in the success state. */ public static Result_ProbabilisticScorerDecodeErrorZ ok(ProbabilisticScoringDecayParameters o_decay_params, NetworkGraph o_network_graph, Logger o_logger) { - long ret = bindings.CResult_ProbabilisticScorerDecodeErrorZ_ok(bindings.ProbabilisticScorer_new(o_decay_params == null ? 0 : o_decay_params.ptr, o_network_graph == null ? 0 : o_network_graph.ptr, o_logger.ptr)); + long ret = bindings.CResult_ProbabilisticScorerDecodeErrorZ_ok(bindings.ProbabilisticScorer_new(o_decay_params.ptr, o_network_graph.ptr, o_logger.ptr)); GC.KeepAlive(o_decay_params); GC.KeepAlive(o_network_graph); GC.KeepAlive(o_logger); diff --git a/c_sharp/src/org/ldk/structs/Result_QueryChannelRangeDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_QueryChannelRangeDecodeErrorZ.cs index e1186107..15726858 100644 --- a/c_sharp/src/org/ldk/structs/Result_QueryChannelRangeDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_QueryChannelRangeDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_QueryChannelRangeDecodeErrorZ : CommonBase { * Creates a new CResult_QueryChannelRangeDecodeErrorZ in the success state. */ public static Result_QueryChannelRangeDecodeErrorZ ok(org.ldk.structs.QueryChannelRange o) { - long ret = bindings.CResult_QueryChannelRangeDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_QueryChannelRangeDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_QueryChannelRangeDecodeErrorZ ret_hu_conv = Result_QueryChannelRangeDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_QueryShortChannelIdsDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_QueryShortChannelIdsDecodeErrorZ.cs index 2f300397..d6979806 100644 --- a/c_sharp/src/org/ldk/structs/Result_QueryShortChannelIdsDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_QueryShortChannelIdsDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_QueryShortChannelIdsDecodeErrorZ : CommonBase { * Creates a new CResult_QueryShortChannelIdsDecodeErrorZ in the success state. */ public static Result_QueryShortChannelIdsDecodeErrorZ ok(org.ldk.structs.QueryShortChannelIds o) { - long ret = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_QueryShortChannelIdsDecodeErrorZ ret_hu_conv = Result_QueryShortChannelIdsDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_RecipientOnionFieldsDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_RecipientOnionFieldsDecodeErrorZ.cs index fdc4db80..a29aed19 100644 --- a/c_sharp/src/org/ldk/structs/Result_RecipientOnionFieldsDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_RecipientOnionFieldsDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_RecipientOnionFieldsDecodeErrorZ : CommonBase { * Creates a new CResult_RecipientOnionFieldsDecodeErrorZ in the success state. */ public static Result_RecipientOnionFieldsDecodeErrorZ ok(org.ldk.structs.RecipientOnionFields o) { - long ret = bindings.CResult_RecipientOnionFieldsDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_RecipientOnionFieldsDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_RecipientOnionFieldsDecodeErrorZ ret_hu_conv = Result_RecipientOnionFieldsDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_RecipientOnionFieldsNoneZ.cs b/c_sharp/src/org/ldk/structs/Result_RecipientOnionFieldsNoneZ.cs index 3dfe1b76..87b0d9e2 100644 --- a/c_sharp/src/org/ldk/structs/Result_RecipientOnionFieldsNoneZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_RecipientOnionFieldsNoneZ.cs @@ -37,7 +37,7 @@ public class Result_RecipientOnionFieldsNoneZ : CommonBase { * Creates a new CResult_RecipientOnionFieldsNoneZ in the success state. */ public static Result_RecipientOnionFieldsNoneZ ok(org.ldk.structs.RecipientOnionFields o) { - long ret = bindings.CResult_RecipientOnionFieldsNoneZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_RecipientOnionFieldsNoneZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_RecipientOnionFieldsNoneZ ret_hu_conv = Result_RecipientOnionFieldsNoneZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_RefundBolt12ParseErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_RefundBolt12ParseErrorZ.cs index 56760a92..320ee92a 100644 --- a/c_sharp/src/org/ldk/structs/Result_RefundBolt12ParseErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_RefundBolt12ParseErrorZ.cs @@ -42,7 +42,7 @@ public class Result_RefundBolt12ParseErrorZ : CommonBase { * Creates a new CResult_RefundBolt12ParseErrorZ in the success state. */ public static Result_RefundBolt12ParseErrorZ ok(org.ldk.structs.Refund o) { - long ret = bindings.CResult_RefundBolt12ParseErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_RefundBolt12ParseErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_RefundBolt12ParseErrorZ ret_hu_conv = Result_RefundBolt12ParseErrorZ.constr_from_ptr(ret); @@ -54,7 +54,7 @@ public class Result_RefundBolt12ParseErrorZ : CommonBase { * Creates a new CResult_RefundBolt12ParseErrorZ in the error state. */ public static Result_RefundBolt12ParseErrorZ err(org.ldk.structs.Bolt12ParseError e) { - long ret = bindings.CResult_RefundBolt12ParseErrorZ_err(e == null ? 0 : e.ptr); + long ret = bindings.CResult_RefundBolt12ParseErrorZ_err(e.ptr); GC.KeepAlive(e); if (ret >= 0 && ret <= 4096) { return null; } Result_RefundBolt12ParseErrorZ ret_hu_conv = Result_RefundBolt12ParseErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_RefundBolt12SemanticErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_RefundBolt12SemanticErrorZ.cs new file mode 100644 index 00000000..d926ad2d --- /dev/null +++ b/c_sharp/src/org/ldk/structs/Result_RefundBolt12SemanticErrorZ.cs @@ -0,0 +1,89 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +public class Result_RefundBolt12SemanticErrorZ : CommonBase { + Result_RefundBolt12SemanticErrorZ(object _dummy, long ptr) : base(ptr) { } + ~Result_RefundBolt12SemanticErrorZ() { + if (ptr != 0) { bindings.CResult_RefundBolt12SemanticErrorZ_free(ptr); } + } + + internal static Result_RefundBolt12SemanticErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_RefundBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_RefundBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_RefundBolt12SemanticErrorZ_Err(null, ptr); + } + } + public class Result_RefundBolt12SemanticErrorZ_OK : Result_RefundBolt12SemanticErrorZ { + public readonly Refund res; + internal Result_RefundBolt12SemanticErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) { + long res = bindings.CResult_RefundBolt12SemanticErrorZ_get_ok(ptr); + org.ldk.structs.Refund res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.Refund(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); }; + this.res = res_hu_conv; + } + } + + public class Result_RefundBolt12SemanticErrorZ_Err : Result_RefundBolt12SemanticErrorZ { + public readonly Bolt12SemanticError err; + internal Result_RefundBolt12SemanticErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) { + this.err = bindings.CResult_RefundBolt12SemanticErrorZ_get_err(ptr); + } + } + + /** + * Creates a new CResult_RefundBolt12SemanticErrorZ in the success state. + */ + public static Result_RefundBolt12SemanticErrorZ ok(org.ldk.structs.Refund o) { + long ret = bindings.CResult_RefundBolt12SemanticErrorZ_ok(o.ptr); + GC.KeepAlive(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_RefundBolt12SemanticErrorZ ret_hu_conv = Result_RefundBolt12SemanticErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_RefundBolt12SemanticErrorZ in the error state. + */ + public static Result_RefundBolt12SemanticErrorZ err(Bolt12SemanticError e) { + long ret = bindings.CResult_RefundBolt12SemanticErrorZ_err(e); + GC.KeepAlive(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_RefundBolt12SemanticErrorZ ret_hu_conv = Result_RefundBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public bool is_ok() { + bool ret = bindings.CResult_RefundBolt12SemanticErrorZ_is_ok(this.ptr); + GC.KeepAlive(this); + return ret; + } + + internal long clone_ptr() { + long ret = bindings.CResult_RefundBolt12SemanticErrorZ_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a new CResult_RefundBolt12SemanticErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_RefundBolt12SemanticErrorZ clone() { + long ret = bindings.CResult_RefundBolt12SemanticErrorZ_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_RefundBolt12SemanticErrorZ ret_hu_conv = Result_RefundBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.cs new file mode 100644 index 00000000..820bf5bf --- /dev/null +++ b/c_sharp/src/org/ldk/structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.cs @@ -0,0 +1,89 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +public class Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ : CommonBase { + Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ(object _dummy, long ptr) : base(ptr) { } + ~Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ() { + if (ptr != 0) { bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(ptr); } + } + + internal static Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_Err(null, ptr); + } + } + public class Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_OK : Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ { + public readonly RefundMaybeWithDerivedMetadataBuilder res; + internal Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) { + long res = bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(ptr); + org.ldk.structs.RefundMaybeWithDerivedMetadataBuilder res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.RefundMaybeWithDerivedMetadataBuilder(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); }; + this.res = res_hu_conv; + } + } + + public class Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_Err : Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ { + public readonly Bolt12SemanticError err; + internal Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) { + this.err = bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(ptr); + } + } + + /** + * Creates a new CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ in the success state. + */ + public static Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ ok(org.ldk.structs.RefundMaybeWithDerivedMetadataBuilder o) { + long ret = bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(o.ptr); + GC.KeepAlive(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ in the error state. + */ + public static Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ err(Bolt12SemanticError e) { + long ret = bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(e); + GC.KeepAlive(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public bool is_ok() { + bool ret = bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(this.ptr); + GC.KeepAlive(this); + return ret; + } + + internal long clone_ptr() { + long ret = bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a new CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ clone() { + long ret = bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/Result_ReplyChannelRangeDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_ReplyChannelRangeDecodeErrorZ.cs index d2bd98a7..513b5e4e 100644 --- a/c_sharp/src/org/ldk/structs/Result_ReplyChannelRangeDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_ReplyChannelRangeDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_ReplyChannelRangeDecodeErrorZ : CommonBase { * Creates a new CResult_ReplyChannelRangeDecodeErrorZ in the success state. */ public static Result_ReplyChannelRangeDecodeErrorZ ok(org.ldk.structs.ReplyChannelRange o) { - long ret = bindings.CResult_ReplyChannelRangeDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ReplyChannelRangeDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ReplyChannelRangeDecodeErrorZ ret_hu_conv = Result_ReplyChannelRangeDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.cs index 57cb7f02..59802c4c 100644 --- a/c_sharp/src/org/ldk/structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_ReplyShortChannelIdsEndDecodeErrorZ : CommonBase { * Creates a new CResult_ReplyShortChannelIdsEndDecodeErrorZ in the success state. */ public static Result_ReplyShortChannelIdsEndDecodeErrorZ ok(org.ldk.structs.ReplyShortChannelIdsEnd o) { - long ret = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ReplyShortChannelIdsEndDecodeErrorZ ret_hu_conv = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_RevocationBasepointDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_RevocationBasepointDecodeErrorZ.cs index 700113a7..ec111f90 100644 --- a/c_sharp/src/org/ldk/structs/Result_RevocationBasepointDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_RevocationBasepointDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_RevocationBasepointDecodeErrorZ : CommonBase { * Creates a new CResult_RevocationBasepointDecodeErrorZ in the success state. */ public static Result_RevocationBasepointDecodeErrorZ ok(org.ldk.structs.RevocationBasepoint o) { - long ret = bindings.CResult_RevocationBasepointDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_RevocationBasepointDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_RevocationBasepointDecodeErrorZ ret_hu_conv = Result_RevocationBasepointDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_RevocationKeyDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_RevocationKeyDecodeErrorZ.cs index 8278d2f0..8b672e6a 100644 --- a/c_sharp/src/org/ldk/structs/Result_RevocationKeyDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_RevocationKeyDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_RevocationKeyDecodeErrorZ : CommonBase { * Creates a new CResult_RevocationKeyDecodeErrorZ in the success state. */ public static Result_RevocationKeyDecodeErrorZ ok(org.ldk.structs.RevocationKey o) { - long ret = bindings.CResult_RevocationKeyDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_RevocationKeyDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_RevocationKeyDecodeErrorZ ret_hu_conv = Result_RevocationKeyDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_RevokeAndACKDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_RevokeAndACKDecodeErrorZ.cs index aa178bde..9fb090dd 100644 --- a/c_sharp/src/org/ldk/structs/Result_RevokeAndACKDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_RevokeAndACKDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_RevokeAndACKDecodeErrorZ : CommonBase { * Creates a new CResult_RevokeAndACKDecodeErrorZ in the success state. */ public static Result_RevokeAndACKDecodeErrorZ ok(org.ldk.structs.RevokeAndACK o) { - long ret = bindings.CResult_RevokeAndACKDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_RevokeAndACKDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_RevokeAndACKDecodeErrorZ ret_hu_conv = Result_RevokeAndACKDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_RouteDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_RouteDecodeErrorZ.cs index 9a406663..548a404c 100644 --- a/c_sharp/src/org/ldk/structs/Result_RouteDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_RouteDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_RouteDecodeErrorZ : CommonBase { * Creates a new CResult_RouteDecodeErrorZ in the success state. */ public static Result_RouteDecodeErrorZ ok(org.ldk.structs.Route o) { - long ret = bindings.CResult_RouteDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_RouteDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_RouteDecodeErrorZ ret_hu_conv = Result_RouteDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_RouteHintDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_RouteHintDecodeErrorZ.cs index 068fc557..aa7ab448 100644 --- a/c_sharp/src/org/ldk/structs/Result_RouteHintDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_RouteHintDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_RouteHintDecodeErrorZ : CommonBase { * Creates a new CResult_RouteHintDecodeErrorZ in the success state. */ public static Result_RouteHintDecodeErrorZ ok(org.ldk.structs.RouteHint o) { - long ret = bindings.CResult_RouteHintDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_RouteHintDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_RouteHintDecodeErrorZ ret_hu_conv = Result_RouteHintDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_RouteHintHopDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_RouteHintHopDecodeErrorZ.cs index 99be1f7a..1dfe84a7 100644 --- a/c_sharp/src/org/ldk/structs/Result_RouteHintHopDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_RouteHintHopDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_RouteHintHopDecodeErrorZ : CommonBase { * Creates a new CResult_RouteHintHopDecodeErrorZ in the success state. */ public static Result_RouteHintHopDecodeErrorZ ok(org.ldk.structs.RouteHintHop o) { - long ret = bindings.CResult_RouteHintHopDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_RouteHintHopDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_RouteHintHopDecodeErrorZ ret_hu_conv = Result_RouteHintHopDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_RouteHopDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_RouteHopDecodeErrorZ.cs index caee5cf4..5dc79887 100644 --- a/c_sharp/src/org/ldk/structs/Result_RouteHopDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_RouteHopDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_RouteHopDecodeErrorZ : CommonBase { * Creates a new CResult_RouteHopDecodeErrorZ in the success state. */ public static Result_RouteHopDecodeErrorZ ok(org.ldk.structs.RouteHop o) { - long ret = bindings.CResult_RouteHopDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_RouteHopDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_RouteHopDecodeErrorZ ret_hu_conv = Result_RouteHopDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_RouteLightningErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_RouteLightningErrorZ.cs index e3dc6d27..52d35517 100644 --- a/c_sharp/src/org/ldk/structs/Result_RouteLightningErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_RouteLightningErrorZ.cs @@ -42,7 +42,7 @@ public class Result_RouteLightningErrorZ : CommonBase { * Creates a new CResult_RouteLightningErrorZ in the success state. */ public static Result_RouteLightningErrorZ ok(org.ldk.structs.Route o) { - long ret = bindings.CResult_RouteLightningErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_RouteLightningErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_RouteLightningErrorZ ret_hu_conv = Result_RouteLightningErrorZ.constr_from_ptr(ret); @@ -54,7 +54,7 @@ public class Result_RouteLightningErrorZ : CommonBase { * Creates a new CResult_RouteLightningErrorZ in the error state. */ public static Result_RouteLightningErrorZ err(org.ldk.structs.LightningError e) { - long ret = bindings.CResult_RouteLightningErrorZ_err(e == null ? 0 : e.ptr); + long ret = bindings.CResult_RouteLightningErrorZ_err(e.ptr); GC.KeepAlive(e); if (ret >= 0 && ret <= 4096) { return null; } Result_RouteLightningErrorZ ret_hu_conv = Result_RouteLightningErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_RouteParametersDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_RouteParametersDecodeErrorZ.cs index c7fe06d0..77380130 100644 --- a/c_sharp/src/org/ldk/structs/Result_RouteParametersDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_RouteParametersDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_RouteParametersDecodeErrorZ : CommonBase { * Creates a new CResult_RouteParametersDecodeErrorZ in the success state. */ public static Result_RouteParametersDecodeErrorZ ok(org.ldk.structs.RouteParameters o) { - long ret = bindings.CResult_RouteParametersDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_RouteParametersDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_RouteParametersDecodeErrorZ ret_hu_conv = Result_RouteParametersDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_RoutingFeesDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_RoutingFeesDecodeErrorZ.cs index 4009919a..21d1577a 100644 --- a/c_sharp/src/org/ldk/structs/Result_RoutingFeesDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_RoutingFeesDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_RoutingFeesDecodeErrorZ : CommonBase { * Creates a new CResult_RoutingFeesDecodeErrorZ in the success state. */ public static Result_RoutingFeesDecodeErrorZ ok(org.ldk.structs.RoutingFees o) { - long ret = bindings.CResult_RoutingFeesDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_RoutingFeesDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_RoutingFeesDecodeErrorZ ret_hu_conv = Result_RoutingFeesDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_SendSuccessSendErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_SendSuccessSendErrorZ.cs index c608d13e..b23c46ac 100644 --- a/c_sharp/src/org/ldk/structs/Result_SendSuccessSendErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_SendSuccessSendErrorZ.cs @@ -71,5 +71,23 @@ public class Result_SendSuccessSendErrorZ : CommonBase { return ret; } + internal long clone_ptr() { + long ret = bindings.CResult_SendSuccessSendErrorZ_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a new CResult_SendSuccessSendErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_SendSuccessSendErrorZ clone() { + long ret = bindings.CResult_SendSuccessSendErrorZ_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_SendSuccessSendErrorZ ret_hu_conv = Result_SendSuccessSendErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + } } } } diff --git a/c_sharp/src/org/ldk/structs/Result_ShutdownDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_ShutdownDecodeErrorZ.cs index 6624e31f..c7112702 100644 --- a/c_sharp/src/org/ldk/structs/Result_ShutdownDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_ShutdownDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_ShutdownDecodeErrorZ : CommonBase { * Creates a new CResult_ShutdownDecodeErrorZ in the success state. */ public static Result_ShutdownDecodeErrorZ ok(org.ldk.structs.Shutdown o) { - long ret = bindings.CResult_ShutdownDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ShutdownDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ShutdownDecodeErrorZ ret_hu_conv = Result_ShutdownDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_ShutdownScriptDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_ShutdownScriptDecodeErrorZ.cs index 27612b9a..d1791c16 100644 --- a/c_sharp/src/org/ldk/structs/Result_ShutdownScriptDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_ShutdownScriptDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_ShutdownScriptDecodeErrorZ : CommonBase { * Creates a new CResult_ShutdownScriptDecodeErrorZ in the success state. */ public static Result_ShutdownScriptDecodeErrorZ ok(org.ldk.structs.ShutdownScript o) { - long ret = bindings.CResult_ShutdownScriptDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ShutdownScriptDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ShutdownScriptDecodeErrorZ ret_hu_conv = Result_ShutdownScriptDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_ShutdownScriptInvalidShutdownScriptZ.cs b/c_sharp/src/org/ldk/structs/Result_ShutdownScriptInvalidShutdownScriptZ.cs index 4cffd040..c6c8cdb9 100644 --- a/c_sharp/src/org/ldk/structs/Result_ShutdownScriptInvalidShutdownScriptZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_ShutdownScriptInvalidShutdownScriptZ.cs @@ -42,7 +42,7 @@ public class Result_ShutdownScriptInvalidShutdownScriptZ : CommonBase { * Creates a new CResult_ShutdownScriptInvalidShutdownScriptZ in the success state. */ public static Result_ShutdownScriptInvalidShutdownScriptZ ok(org.ldk.structs.ShutdownScript o) { - long ret = bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ShutdownScriptInvalidShutdownScriptZ ret_hu_conv = Result_ShutdownScriptInvalidShutdownScriptZ.constr_from_ptr(ret); @@ -54,7 +54,7 @@ public class Result_ShutdownScriptInvalidShutdownScriptZ : CommonBase { * Creates a new CResult_ShutdownScriptInvalidShutdownScriptZ in the error state. */ public static Result_ShutdownScriptInvalidShutdownScriptZ err(org.ldk.structs.InvalidShutdownScript e) { - long ret = bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_err(e == null ? 0 : e.ptr); + long ret = bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_err(e.ptr); GC.KeepAlive(e); if (ret >= 0 && ret <= 4096) { return null; } Result_ShutdownScriptInvalidShutdownScriptZ ret_hu_conv = Result_ShutdownScriptInvalidShutdownScriptZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_ShutdownScriptNoneZ.cs b/c_sharp/src/org/ldk/structs/Result_ShutdownScriptNoneZ.cs index e65cec4d..13e659f0 100644 --- a/c_sharp/src/org/ldk/structs/Result_ShutdownScriptNoneZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_ShutdownScriptNoneZ.cs @@ -37,7 +37,7 @@ public class Result_ShutdownScriptNoneZ : CommonBase { * Creates a new CResult_ShutdownScriptNoneZ in the success state. */ public static Result_ShutdownScriptNoneZ ok(org.ldk.structs.ShutdownScript o) { - long ret = bindings.CResult_ShutdownScriptNoneZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_ShutdownScriptNoneZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ShutdownScriptNoneZ ret_hu_conv = Result_ShutdownScriptNoneZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.cs index 4a811333..5377866e 100644 --- a/c_sharp/src/org/ldk/structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.cs @@ -42,7 +42,7 @@ public class Result_SignedRawBolt11InvoiceBolt11ParseErrorZ : CommonBase { * Creates a new CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ in the success state. */ public static Result_SignedRawBolt11InvoiceBolt11ParseErrorZ ok(org.ldk.structs.SignedRawBolt11Invoice o) { - long ret = bindings.CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_SignedRawBolt11InvoiceBolt11ParseErrorZ ret_hu_conv = Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_SpliceAckDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_SpliceAckDecodeErrorZ.cs index 2034f6b8..e3da67c7 100644 --- a/c_sharp/src/org/ldk/structs/Result_SpliceAckDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_SpliceAckDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_SpliceAckDecodeErrorZ : CommonBase { * Creates a new CResult_SpliceAckDecodeErrorZ in the success state. */ public static Result_SpliceAckDecodeErrorZ ok(org.ldk.structs.SpliceAck o) { - long ret = bindings.CResult_SpliceAckDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_SpliceAckDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_SpliceAckDecodeErrorZ ret_hu_conv = Result_SpliceAckDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_SpliceDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_SpliceDecodeErrorZ.cs index 8d9f07b9..c7f5c790 100644 --- a/c_sharp/src/org/ldk/structs/Result_SpliceDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_SpliceDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_SpliceDecodeErrorZ : CommonBase { * Creates a new CResult_SpliceDecodeErrorZ in the success state. */ public static Result_SpliceDecodeErrorZ ok(org.ldk.structs.Splice o) { - long ret = bindings.CResult_SpliceDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_SpliceDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_SpliceDecodeErrorZ ret_hu_conv = Result_SpliceDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_SpliceLockedDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_SpliceLockedDecodeErrorZ.cs index e8aafaaf..0aa08456 100644 --- a/c_sharp/src/org/ldk/structs/Result_SpliceLockedDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_SpliceLockedDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_SpliceLockedDecodeErrorZ : CommonBase { * Creates a new CResult_SpliceLockedDecodeErrorZ in the success state. */ public static Result_SpliceLockedDecodeErrorZ ok(org.ldk.structs.SpliceLocked o) { - long ret = bindings.CResult_SpliceLockedDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_SpliceLockedDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_SpliceLockedDecodeErrorZ ret_hu_conv = Result_SpliceLockedDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.cs index 571cb1c0..dd98f277 100644 --- a/c_sharp/src/org/ldk/structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_StaticPaymentOutputDescriptorDecodeErrorZ : CommonBase { * Creates a new CResult_StaticPaymentOutputDescriptorDecodeErrorZ in the success state. */ public static Result_StaticPaymentOutputDescriptorDecodeErrorZ ok(org.ldk.structs.StaticPaymentOutputDescriptor o) { - long ret = bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_StaticPaymentOutputDescriptorDecodeErrorZ ret_hu_conv = Result_StaticPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_StfuDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_StfuDecodeErrorZ.cs index 4168537a..be1dd770 100644 --- a/c_sharp/src/org/ldk/structs/Result_StfuDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_StfuDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_StfuDecodeErrorZ : CommonBase { * Creates a new CResult_StfuDecodeErrorZ in the success state. */ public static Result_StfuDecodeErrorZ ok(org.ldk.structs.Stfu o) { - long ret = bindings.CResult_StfuDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_StfuDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_StfuDecodeErrorZ ret_hu_conv = Result_StfuDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_TrackedSpendableOutputDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_TrackedSpendableOutputDecodeErrorZ.cs new file mode 100644 index 00000000..3afd7ee1 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/Result_TrackedSpendableOutputDecodeErrorZ.cs @@ -0,0 +1,93 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +public class Result_TrackedSpendableOutputDecodeErrorZ : CommonBase { + Result_TrackedSpendableOutputDecodeErrorZ(object _dummy, long ptr) : base(ptr) { } + ~Result_TrackedSpendableOutputDecodeErrorZ() { + if (ptr != 0) { bindings.CResult_TrackedSpendableOutputDecodeErrorZ_free(ptr); } + } + + internal static Result_TrackedSpendableOutputDecodeErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(ptr)) { + return new Result_TrackedSpendableOutputDecodeErrorZ_OK(null, ptr); + } else { + return new Result_TrackedSpendableOutputDecodeErrorZ_Err(null, ptr); + } + } + public class Result_TrackedSpendableOutputDecodeErrorZ_OK : Result_TrackedSpendableOutputDecodeErrorZ { + public readonly TrackedSpendableOutput res; + internal Result_TrackedSpendableOutputDecodeErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) { + long res = bindings.CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(ptr); + org.ldk.structs.TrackedSpendableOutput res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.TrackedSpendableOutput(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); }; + this.res = res_hu_conv; + } + } + + public class Result_TrackedSpendableOutputDecodeErrorZ_Err : Result_TrackedSpendableOutputDecodeErrorZ { + public readonly DecodeError err; + internal Result_TrackedSpendableOutputDecodeErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) { + long err = bindings.CResult_TrackedSpendableOutputDecodeErrorZ_get_err(ptr); + org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err); + if (err_hu_conv != null) { err_hu_conv.ptrs_to.AddLast(this); }; + this.err = err_hu_conv; + } + } + + /** + * Creates a new CResult_TrackedSpendableOutputDecodeErrorZ in the success state. + */ + public static Result_TrackedSpendableOutputDecodeErrorZ ok(org.ldk.structs.TrackedSpendableOutput o) { + long ret = bindings.CResult_TrackedSpendableOutputDecodeErrorZ_ok(o.ptr); + GC.KeepAlive(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_TrackedSpendableOutputDecodeErrorZ ret_hu_conv = Result_TrackedSpendableOutputDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_TrackedSpendableOutputDecodeErrorZ in the error state. + */ + public static Result_TrackedSpendableOutputDecodeErrorZ err(org.ldk.structs.DecodeError e) { + long ret = bindings.CResult_TrackedSpendableOutputDecodeErrorZ_err(e.ptr); + GC.KeepAlive(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_TrackedSpendableOutputDecodeErrorZ ret_hu_conv = Result_TrackedSpendableOutputDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(e); }; + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public bool is_ok() { + bool ret = bindings.CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(this.ptr); + GC.KeepAlive(this); + return ret; + } + + internal long clone_ptr() { + long ret = bindings.CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a new CResult_TrackedSpendableOutputDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_TrackedSpendableOutputDecodeErrorZ clone() { + long ret = bindings.CResult_TrackedSpendableOutputDecodeErrorZ_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_TrackedSpendableOutputDecodeErrorZ ret_hu_conv = Result_TrackedSpendableOutputDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/Result_TransactionU16LenLimitedDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_TransactionU16LenLimitedDecodeErrorZ.cs index 56e43b62..7508f500 100644 --- a/c_sharp/src/org/ldk/structs/Result_TransactionU16LenLimitedDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_TransactionU16LenLimitedDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_TransactionU16LenLimitedDecodeErrorZ : CommonBase { * Creates a new CResult_TransactionU16LenLimitedDecodeErrorZ in the success state. */ public static Result_TransactionU16LenLimitedDecodeErrorZ ok(org.ldk.structs.TransactionU16LenLimited o) { - long ret = bindings.CResult_TransactionU16LenLimitedDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_TransactionU16LenLimitedDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_TransactionU16LenLimitedDecodeErrorZ ret_hu_conv = Result_TransactionU16LenLimitedDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_TransactionU16LenLimitedNoneZ.cs b/c_sharp/src/org/ldk/structs/Result_TransactionU16LenLimitedNoneZ.cs index 543245c1..5b5442ec 100644 --- a/c_sharp/src/org/ldk/structs/Result_TransactionU16LenLimitedNoneZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_TransactionU16LenLimitedNoneZ.cs @@ -37,7 +37,7 @@ public class Result_TransactionU16LenLimitedNoneZ : CommonBase { * Creates a new CResult_TransactionU16LenLimitedNoneZ in the success state. */ public static Result_TransactionU16LenLimitedNoneZ ok(org.ldk.structs.TransactionU16LenLimited o) { - long ret = bindings.CResult_TransactionU16LenLimitedNoneZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_TransactionU16LenLimitedNoneZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_TransactionU16LenLimitedNoneZ ret_hu_conv = Result_TransactionU16LenLimitedNoneZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_TrustedClosingTransactionNoneZ.cs b/c_sharp/src/org/ldk/structs/Result_TrustedClosingTransactionNoneZ.cs index 3906f2f9..34c3a76a 100644 --- a/c_sharp/src/org/ldk/structs/Result_TrustedClosingTransactionNoneZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_TrustedClosingTransactionNoneZ.cs @@ -37,7 +37,7 @@ public class Result_TrustedClosingTransactionNoneZ : CommonBase { * Creates a new CResult_TrustedClosingTransactionNoneZ in the success state. */ public static Result_TrustedClosingTransactionNoneZ ok(org.ldk.structs.TrustedClosingTransaction o) { - long ret = bindings.CResult_TrustedClosingTransactionNoneZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_TrustedClosingTransactionNoneZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_TrustedClosingTransactionNoneZ ret_hu_conv = Result_TrustedClosingTransactionNoneZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_TrustedCommitmentTransactionNoneZ.cs b/c_sharp/src/org/ldk/structs/Result_TrustedCommitmentTransactionNoneZ.cs index 7a8dca9f..b87c33ea 100644 --- a/c_sharp/src/org/ldk/structs/Result_TrustedCommitmentTransactionNoneZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_TrustedCommitmentTransactionNoneZ.cs @@ -37,7 +37,7 @@ public class Result_TrustedCommitmentTransactionNoneZ : CommonBase { * Creates a new CResult_TrustedCommitmentTransactionNoneZ in the success state. */ public static Result_TrustedCommitmentTransactionNoneZ ok(org.ldk.structs.TrustedCommitmentTransaction o) { - long ret = bindings.CResult_TrustedCommitmentTransactionNoneZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_TrustedCommitmentTransactionNoneZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_TrustedCommitmentTransactionNoneZ ret_hu_conv = Result_TrustedCommitmentTransactionNoneZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_TxAbortDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_TxAbortDecodeErrorZ.cs index ce64c3a6..2c25b573 100644 --- a/c_sharp/src/org/ldk/structs/Result_TxAbortDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_TxAbortDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_TxAbortDecodeErrorZ : CommonBase { * Creates a new CResult_TxAbortDecodeErrorZ in the success state. */ public static Result_TxAbortDecodeErrorZ ok(org.ldk.structs.TxAbort o) { - long ret = bindings.CResult_TxAbortDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_TxAbortDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_TxAbortDecodeErrorZ ret_hu_conv = Result_TxAbortDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_TxAckRbfDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_TxAckRbfDecodeErrorZ.cs index e7bfd344..19ff18c3 100644 --- a/c_sharp/src/org/ldk/structs/Result_TxAckRbfDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_TxAckRbfDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_TxAckRbfDecodeErrorZ : CommonBase { * Creates a new CResult_TxAckRbfDecodeErrorZ in the success state. */ public static Result_TxAckRbfDecodeErrorZ ok(org.ldk.structs.TxAckRbf o) { - long ret = bindings.CResult_TxAckRbfDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_TxAckRbfDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_TxAckRbfDecodeErrorZ ret_hu_conv = Result_TxAckRbfDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_TxAddInputDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_TxAddInputDecodeErrorZ.cs index 12b30f31..ad5ead8f 100644 --- a/c_sharp/src/org/ldk/structs/Result_TxAddInputDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_TxAddInputDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_TxAddInputDecodeErrorZ : CommonBase { * Creates a new CResult_TxAddInputDecodeErrorZ in the success state. */ public static Result_TxAddInputDecodeErrorZ ok(org.ldk.structs.TxAddInput o) { - long ret = bindings.CResult_TxAddInputDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_TxAddInputDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_TxAddInputDecodeErrorZ ret_hu_conv = Result_TxAddInputDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_TxAddOutputDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_TxAddOutputDecodeErrorZ.cs index 90cbe9dc..0d2d4143 100644 --- a/c_sharp/src/org/ldk/structs/Result_TxAddOutputDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_TxAddOutputDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_TxAddOutputDecodeErrorZ : CommonBase { * Creates a new CResult_TxAddOutputDecodeErrorZ in the success state. */ public static Result_TxAddOutputDecodeErrorZ ok(org.ldk.structs.TxAddOutput o) { - long ret = bindings.CResult_TxAddOutputDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_TxAddOutputDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_TxAddOutputDecodeErrorZ ret_hu_conv = Result_TxAddOutputDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_TxCompleteDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_TxCompleteDecodeErrorZ.cs index 1ed6321d..9d2e5d6d 100644 --- a/c_sharp/src/org/ldk/structs/Result_TxCompleteDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_TxCompleteDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_TxCompleteDecodeErrorZ : CommonBase { * Creates a new CResult_TxCompleteDecodeErrorZ in the success state. */ public static Result_TxCompleteDecodeErrorZ ok(org.ldk.structs.TxComplete o) { - long ret = bindings.CResult_TxCompleteDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_TxCompleteDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_TxCompleteDecodeErrorZ ret_hu_conv = Result_TxCompleteDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_TxCreationKeysDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_TxCreationKeysDecodeErrorZ.cs index 5d7a8153..66017604 100644 --- a/c_sharp/src/org/ldk/structs/Result_TxCreationKeysDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_TxCreationKeysDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_TxCreationKeysDecodeErrorZ : CommonBase { * Creates a new CResult_TxCreationKeysDecodeErrorZ in the success state. */ public static Result_TxCreationKeysDecodeErrorZ ok(org.ldk.structs.TxCreationKeys o) { - long ret = bindings.CResult_TxCreationKeysDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_TxCreationKeysDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_TxCreationKeysDecodeErrorZ ret_hu_conv = Result_TxCreationKeysDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_TxInitRbfDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_TxInitRbfDecodeErrorZ.cs index 53010fd2..33e38697 100644 --- a/c_sharp/src/org/ldk/structs/Result_TxInitRbfDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_TxInitRbfDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_TxInitRbfDecodeErrorZ : CommonBase { * Creates a new CResult_TxInitRbfDecodeErrorZ in the success state. */ public static Result_TxInitRbfDecodeErrorZ ok(org.ldk.structs.TxInitRbf o) { - long ret = bindings.CResult_TxInitRbfDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_TxInitRbfDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_TxInitRbfDecodeErrorZ ret_hu_conv = Result_TxInitRbfDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_TxRemoveInputDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_TxRemoveInputDecodeErrorZ.cs index fd0c4630..3d0b4ee8 100644 --- a/c_sharp/src/org/ldk/structs/Result_TxRemoveInputDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_TxRemoveInputDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_TxRemoveInputDecodeErrorZ : CommonBase { * Creates a new CResult_TxRemoveInputDecodeErrorZ in the success state. */ public static Result_TxRemoveInputDecodeErrorZ ok(org.ldk.structs.TxRemoveInput o) { - long ret = bindings.CResult_TxRemoveInputDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_TxRemoveInputDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_TxRemoveInputDecodeErrorZ ret_hu_conv = Result_TxRemoveInputDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_TxRemoveOutputDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_TxRemoveOutputDecodeErrorZ.cs index 62dcffe7..f005783e 100644 --- a/c_sharp/src/org/ldk/structs/Result_TxRemoveOutputDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_TxRemoveOutputDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_TxRemoveOutputDecodeErrorZ : CommonBase { * Creates a new CResult_TxRemoveOutputDecodeErrorZ in the success state. */ public static Result_TxRemoveOutputDecodeErrorZ ok(org.ldk.structs.TxRemoveOutput o) { - long ret = bindings.CResult_TxRemoveOutputDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_TxRemoveOutputDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_TxRemoveOutputDecodeErrorZ ret_hu_conv = Result_TxRemoveOutputDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_TxSignaturesDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_TxSignaturesDecodeErrorZ.cs index 6f1ae9ee..db18f188 100644 --- a/c_sharp/src/org/ldk/structs/Result_TxSignaturesDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_TxSignaturesDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_TxSignaturesDecodeErrorZ : CommonBase { * Creates a new CResult_TxSignaturesDecodeErrorZ in the success state. */ public static Result_TxSignaturesDecodeErrorZ ok(org.ldk.structs.TxSignatures o) { - long ret = bindings.CResult_TxSignaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_TxSignaturesDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_TxSignaturesDecodeErrorZ ret_hu_conv = Result_TxSignaturesDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_UnknownPaymentContextDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_UnknownPaymentContextDecodeErrorZ.cs new file mode 100644 index 00000000..805857dd --- /dev/null +++ b/c_sharp/src/org/ldk/structs/Result_UnknownPaymentContextDecodeErrorZ.cs @@ -0,0 +1,93 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +public class Result_UnknownPaymentContextDecodeErrorZ : CommonBase { + Result_UnknownPaymentContextDecodeErrorZ(object _dummy, long ptr) : base(ptr) { } + ~Result_UnknownPaymentContextDecodeErrorZ() { + if (ptr != 0) { bindings.CResult_UnknownPaymentContextDecodeErrorZ_free(ptr); } + } + + internal static Result_UnknownPaymentContextDecodeErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_UnknownPaymentContextDecodeErrorZ_is_ok(ptr)) { + return new Result_UnknownPaymentContextDecodeErrorZ_OK(null, ptr); + } else { + return new Result_UnknownPaymentContextDecodeErrorZ_Err(null, ptr); + } + } + public class Result_UnknownPaymentContextDecodeErrorZ_OK : Result_UnknownPaymentContextDecodeErrorZ { + public readonly UnknownPaymentContext res; + internal Result_UnknownPaymentContextDecodeErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) { + long res = bindings.CResult_UnknownPaymentContextDecodeErrorZ_get_ok(ptr); + org.ldk.structs.UnknownPaymentContext res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.UnknownPaymentContext(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); }; + this.res = res_hu_conv; + } + } + + public class Result_UnknownPaymentContextDecodeErrorZ_Err : Result_UnknownPaymentContextDecodeErrorZ { + public readonly DecodeError err; + internal Result_UnknownPaymentContextDecodeErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) { + long err = bindings.CResult_UnknownPaymentContextDecodeErrorZ_get_err(ptr); + org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err); + if (err_hu_conv != null) { err_hu_conv.ptrs_to.AddLast(this); }; + this.err = err_hu_conv; + } + } + + /** + * Creates a new CResult_UnknownPaymentContextDecodeErrorZ in the success state. + */ + public static Result_UnknownPaymentContextDecodeErrorZ ok(org.ldk.structs.UnknownPaymentContext o) { + long ret = bindings.CResult_UnknownPaymentContextDecodeErrorZ_ok(o.ptr); + GC.KeepAlive(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_UnknownPaymentContextDecodeErrorZ ret_hu_conv = Result_UnknownPaymentContextDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_UnknownPaymentContextDecodeErrorZ in the error state. + */ + public static Result_UnknownPaymentContextDecodeErrorZ err(org.ldk.structs.DecodeError e) { + long ret = bindings.CResult_UnknownPaymentContextDecodeErrorZ_err(e.ptr); + GC.KeepAlive(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_UnknownPaymentContextDecodeErrorZ ret_hu_conv = Result_UnknownPaymentContextDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(e); }; + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public bool is_ok() { + bool ret = bindings.CResult_UnknownPaymentContextDecodeErrorZ_is_ok(this.ptr); + GC.KeepAlive(this); + return ret; + } + + internal long clone_ptr() { + long ret = bindings.CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a new CResult_UnknownPaymentContextDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_UnknownPaymentContextDecodeErrorZ clone() { + long ret = bindings.CResult_UnknownPaymentContextDecodeErrorZ_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_UnknownPaymentContextDecodeErrorZ ret_hu_conv = Result_UnknownPaymentContextDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.cs new file mode 100644 index 00000000..a51ee9eb --- /dev/null +++ b/c_sharp/src/org/ldk/structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.cs @@ -0,0 +1,89 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +public class Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ : CommonBase { + Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ(object _dummy, long ptr) : base(ptr) { } + ~Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ() { + if (ptr != 0) { bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free(ptr); } + } + + internal static Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ_Err(null, ptr); + } + } + public class Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ_OK : Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ { + public readonly UnsignedBolt12Invoice res; + internal Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) { + long res = bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(ptr); + org.ldk.structs.UnsignedBolt12Invoice res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.UnsignedBolt12Invoice(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); }; + this.res = res_hu_conv; + } + } + + public class Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ_Err : Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ { + public readonly Bolt12SemanticError err; + internal Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) { + this.err = bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(ptr); + } + } + + /** + * Creates a new CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ in the success state. + */ + public static Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ ok(org.ldk.structs.UnsignedBolt12Invoice o) { + long ret = bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok(o.ptr); + GC.KeepAlive(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ in the error state. + */ + public static Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ err(Bolt12SemanticError e) { + long ret = bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err(e); + GC.KeepAlive(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public bool is_ok() { + bool ret = bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(this.ptr); + GC.KeepAlive(this); + return ret; + } + + internal long clone_ptr() { + long ret = bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a new CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ clone() { + long ret = bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.cs index 56833d2e..8ee0b210 100644 --- a/c_sharp/src/org/ldk/structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_UnsignedChannelAnnouncementDecodeErrorZ : CommonBase { * Creates a new CResult_UnsignedChannelAnnouncementDecodeErrorZ in the success state. */ public static Result_UnsignedChannelAnnouncementDecodeErrorZ ok(org.ldk.structs.UnsignedChannelAnnouncement o) { - long ret = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_UnsignedChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_UnsignedChannelUpdateDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_UnsignedChannelUpdateDecodeErrorZ.cs index 664ec9e0..048c120d 100644 --- a/c_sharp/src/org/ldk/structs/Result_UnsignedChannelUpdateDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_UnsignedChannelUpdateDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_UnsignedChannelUpdateDecodeErrorZ : CommonBase { * Creates a new CResult_UnsignedChannelUpdateDecodeErrorZ in the success state. */ public static Result_UnsignedChannelUpdateDecodeErrorZ ok(org.ldk.structs.UnsignedChannelUpdate o) { - long ret = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_UnsignedChannelUpdateDecodeErrorZ ret_hu_conv = Result_UnsignedChannelUpdateDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.cs new file mode 100644 index 00000000..7a19769d --- /dev/null +++ b/c_sharp/src/org/ldk/structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.cs @@ -0,0 +1,89 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +public class Result_UnsignedInvoiceRequestBolt12SemanticErrorZ : CommonBase { + Result_UnsignedInvoiceRequestBolt12SemanticErrorZ(object _dummy, long ptr) : base(ptr) { } + ~Result_UnsignedInvoiceRequestBolt12SemanticErrorZ() { + if (ptr != 0) { bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(ptr); } + } + + internal static Result_UnsignedInvoiceRequestBolt12SemanticErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(ptr)) { + return new Result_UnsignedInvoiceRequestBolt12SemanticErrorZ_OK(null, ptr); + } else { + return new Result_UnsignedInvoiceRequestBolt12SemanticErrorZ_Err(null, ptr); + } + } + public class Result_UnsignedInvoiceRequestBolt12SemanticErrorZ_OK : Result_UnsignedInvoiceRequestBolt12SemanticErrorZ { + public readonly UnsignedInvoiceRequest res; + internal Result_UnsignedInvoiceRequestBolt12SemanticErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) { + long res = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(ptr); + org.ldk.structs.UnsignedInvoiceRequest res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.UnsignedInvoiceRequest(null, res); } + if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); }; + this.res = res_hu_conv; + } + } + + public class Result_UnsignedInvoiceRequestBolt12SemanticErrorZ_Err : Result_UnsignedInvoiceRequestBolt12SemanticErrorZ { + public readonly Bolt12SemanticError err; + internal Result_UnsignedInvoiceRequestBolt12SemanticErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) { + this.err = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(ptr); + } + } + + /** + * Creates a new CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ in the success state. + */ + public static Result_UnsignedInvoiceRequestBolt12SemanticErrorZ ok(org.ldk.structs.UnsignedInvoiceRequest o) { + long ret = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(o.ptr); + GC.KeepAlive(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_UnsignedInvoiceRequestBolt12SemanticErrorZ ret_hu_conv = Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o); }; + return ret_hu_conv; + } + + /** + * Creates a new CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ in the error state. + */ + public static Result_UnsignedInvoiceRequestBolt12SemanticErrorZ err(Bolt12SemanticError e) { + long ret = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(e); + GC.KeepAlive(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_UnsignedInvoiceRequestBolt12SemanticErrorZ ret_hu_conv = Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public bool is_ok() { + bool ret = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(this.ptr); + GC.KeepAlive(this); + return ret; + } + + internal long clone_ptr() { + long ret = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a new CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_UnsignedInvoiceRequestBolt12SemanticErrorZ clone() { + long ret = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_UnsignedInvoiceRequestBolt12SemanticErrorZ ret_hu_conv = Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.cs index 608b212d..a1aa0e53 100644 --- a/c_sharp/src/org/ldk/structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_UnsignedNodeAnnouncementDecodeErrorZ : CommonBase { * Creates a new CResult_UnsignedNodeAnnouncementDecodeErrorZ in the success state. */ public static Result_UnsignedNodeAnnouncementDecodeErrorZ ok(org.ldk.structs.UnsignedNodeAnnouncement o) { - long ret = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_UnsignedNodeAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedNodeAnnouncementDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_UntrustedStringDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_UntrustedStringDecodeErrorZ.cs index e3f2c190..5efe4543 100644 --- a/c_sharp/src/org/ldk/structs/Result_UntrustedStringDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_UntrustedStringDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_UntrustedStringDecodeErrorZ : CommonBase { * Creates a new CResult_UntrustedStringDecodeErrorZ in the success state. */ public static Result_UntrustedStringDecodeErrorZ ok(org.ldk.structs.UntrustedString o) { - long ret = bindings.CResult_UntrustedStringDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_UntrustedStringDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_UntrustedStringDecodeErrorZ ret_hu_conv = Result_UntrustedStringDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_UpdateAddHTLCDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_UpdateAddHTLCDecodeErrorZ.cs index 1dbd98fa..c1dbef0f 100644 --- a/c_sharp/src/org/ldk/structs/Result_UpdateAddHTLCDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_UpdateAddHTLCDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_UpdateAddHTLCDecodeErrorZ : CommonBase { * Creates a new CResult_UpdateAddHTLCDecodeErrorZ in the success state. */ public static Result_UpdateAddHTLCDecodeErrorZ ok(org.ldk.structs.UpdateAddHTLC o) { - long ret = bindings.CResult_UpdateAddHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_UpdateAddHTLCDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_UpdateAddHTLCDecodeErrorZ ret_hu_conv = Result_UpdateAddHTLCDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_UpdateFailHTLCDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_UpdateFailHTLCDecodeErrorZ.cs index 0aaa9791..ec4bd624 100644 --- a/c_sharp/src/org/ldk/structs/Result_UpdateFailHTLCDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_UpdateFailHTLCDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_UpdateFailHTLCDecodeErrorZ : CommonBase { * Creates a new CResult_UpdateFailHTLCDecodeErrorZ in the success state. */ public static Result_UpdateFailHTLCDecodeErrorZ ok(org.ldk.structs.UpdateFailHTLC o) { - long ret = bindings.CResult_UpdateFailHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_UpdateFailHTLCDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_UpdateFailHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailHTLCDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.cs index e9453266..4bc43bb3 100644 --- a/c_sharp/src/org/ldk/structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_UpdateFailMalformedHTLCDecodeErrorZ : CommonBase { * Creates a new CResult_UpdateFailMalformedHTLCDecodeErrorZ in the success state. */ public static Result_UpdateFailMalformedHTLCDecodeErrorZ ok(org.ldk.structs.UpdateFailMalformedHTLC o) { - long ret = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_UpdateFailMalformedHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailMalformedHTLCDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_UpdateFeeDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_UpdateFeeDecodeErrorZ.cs index b7931952..5345c4d8 100644 --- a/c_sharp/src/org/ldk/structs/Result_UpdateFeeDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_UpdateFeeDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_UpdateFeeDecodeErrorZ : CommonBase { * Creates a new CResult_UpdateFeeDecodeErrorZ in the success state. */ public static Result_UpdateFeeDecodeErrorZ ok(org.ldk.structs.UpdateFee o) { - long ret = bindings.CResult_UpdateFeeDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_UpdateFeeDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_UpdateFeeDecodeErrorZ ret_hu_conv = Result_UpdateFeeDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_UpdateFulfillHTLCDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_UpdateFulfillHTLCDecodeErrorZ.cs index d299d061..52c70d5e 100644 --- a/c_sharp/src/org/ldk/structs/Result_UpdateFulfillHTLCDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_UpdateFulfillHTLCDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_UpdateFulfillHTLCDecodeErrorZ : CommonBase { * Creates a new CResult_UpdateFulfillHTLCDecodeErrorZ in the success state. */ public static Result_UpdateFulfillHTLCDecodeErrorZ ok(org.ldk.structs.UpdateFulfillHTLC o) { - long ret = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_UpdateFulfillHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFulfillHTLCDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_VerifiedInvoiceRequestNoneZ.cs b/c_sharp/src/org/ldk/structs/Result_VerifiedInvoiceRequestNoneZ.cs index b108f124..5604a78c 100644 --- a/c_sharp/src/org/ldk/structs/Result_VerifiedInvoiceRequestNoneZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_VerifiedInvoiceRequestNoneZ.cs @@ -37,7 +37,7 @@ public class Result_VerifiedInvoiceRequestNoneZ : CommonBase { * Creates a new CResult_VerifiedInvoiceRequestNoneZ in the success state. */ public static Result_VerifiedInvoiceRequestNoneZ ok(org.ldk.structs.VerifiedInvoiceRequest o) { - long ret = bindings.CResult_VerifiedInvoiceRequestNoneZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_VerifiedInvoiceRequestNoneZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_VerifiedInvoiceRequestNoneZ ret_hu_conv = Result_VerifiedInvoiceRequestNoneZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_WarningMessageDecodeErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_WarningMessageDecodeErrorZ.cs index 3d6e34bd..30e4e181 100644 --- a/c_sharp/src/org/ldk/structs/Result_WarningMessageDecodeErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_WarningMessageDecodeErrorZ.cs @@ -42,7 +42,7 @@ public class Result_WarningMessageDecodeErrorZ : CommonBase { * Creates a new CResult_WarningMessageDecodeErrorZ in the success state. */ public static Result_WarningMessageDecodeErrorZ ok(org.ldk.structs.WarningMessage o) { - long ret = bindings.CResult_WarningMessageDecodeErrorZ_ok(o == null ? 0 : o.ptr); + long ret = bindings.CResult_WarningMessageDecodeErrorZ_ok(o.ptr); GC.KeepAlive(o); if (ret >= 0 && ret <= 4096) { return null; } Result_WarningMessageDecodeErrorZ ret_hu_conv = Result_WarningMessageDecodeErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_boolLightningErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_boolLightningErrorZ.cs index ef9c4245..8ecbc7f8 100644 --- a/c_sharp/src/org/ldk/structs/Result_boolLightningErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_boolLightningErrorZ.cs @@ -50,7 +50,7 @@ public class Result_boolLightningErrorZ : CommonBase { * Creates a new CResult_boolLightningErrorZ in the error state. */ public static Result_boolLightningErrorZ err(org.ldk.structs.LightningError e) { - long ret = bindings.CResult_boolLightningErrorZ_err(e == null ? 0 : e.ptr); + long ret = bindings.CResult_boolLightningErrorZ_err(e.ptr); GC.KeepAlive(e); if (ret >= 0 && ret <= 4096) { return null; } Result_boolLightningErrorZ ret_hu_conv = Result_boolLightningErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_boolPeerHandleErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_boolPeerHandleErrorZ.cs index 3af6cb1d..951b16fd 100644 --- a/c_sharp/src/org/ldk/structs/Result_boolPeerHandleErrorZ.cs +++ b/c_sharp/src/org/ldk/structs/Result_boolPeerHandleErrorZ.cs @@ -50,7 +50,7 @@ public class Result_boolPeerHandleErrorZ : CommonBase { * Creates a new CResult_boolPeerHandleErrorZ in the error state. */ public static Result_boolPeerHandleErrorZ err(org.ldk.structs.PeerHandleError e) { - long ret = bindings.CResult_boolPeerHandleErrorZ_err(e == null ? 0 : e.ptr); + long ret = bindings.CResult_boolPeerHandleErrorZ_err(e.ptr); GC.KeepAlive(e); if (ret >= 0 && ret <= 4096) { return null; } Result_boolPeerHandleErrorZ ret_hu_conv = Result_boolPeerHandleErrorZ.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/Result_u64ShortChannelIdErrorZ.cs b/c_sharp/src/org/ldk/structs/Result_u64ShortChannelIdErrorZ.cs new file mode 100644 index 00000000..d818dc63 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/Result_u64ShortChannelIdErrorZ.cs @@ -0,0 +1,67 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +public class Result_u64ShortChannelIdErrorZ : CommonBase { + Result_u64ShortChannelIdErrorZ(object _dummy, long ptr) : base(ptr) { } + ~Result_u64ShortChannelIdErrorZ() { + if (ptr != 0) { bindings.CResult_u64ShortChannelIdErrorZ_free(ptr); } + } + + internal static Result_u64ShortChannelIdErrorZ constr_from_ptr(long ptr) { + if (bindings.CResult_u64ShortChannelIdErrorZ_is_ok(ptr)) { + return new Result_u64ShortChannelIdErrorZ_OK(null, ptr); + } else { + return new Result_u64ShortChannelIdErrorZ_Err(null, ptr); + } + } + public class Result_u64ShortChannelIdErrorZ_OK : Result_u64ShortChannelIdErrorZ { + public readonly long res; + internal Result_u64ShortChannelIdErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) { + this.res = bindings.CResult_u64ShortChannelIdErrorZ_get_ok(ptr); + } + } + + public class Result_u64ShortChannelIdErrorZ_Err : Result_u64ShortChannelIdErrorZ { + public readonly ShortChannelIdError err; + internal Result_u64ShortChannelIdErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) { + this.err = bindings.CResult_u64ShortChannelIdErrorZ_get_err(ptr); + } + } + + /** + * Creates a new CResult_u64ShortChannelIdErrorZ in the success state. + */ + public static Result_u64ShortChannelIdErrorZ ok(long o) { + long ret = bindings.CResult_u64ShortChannelIdErrorZ_ok(o); + GC.KeepAlive(o); + if (ret >= 0 && ret <= 4096) { return null; } + Result_u64ShortChannelIdErrorZ ret_hu_conv = Result_u64ShortChannelIdErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Creates a new CResult_u64ShortChannelIdErrorZ in the error state. + */ + public static Result_u64ShortChannelIdErrorZ err(ShortChannelIdError e) { + long ret = bindings.CResult_u64ShortChannelIdErrorZ_err(e); + GC.KeepAlive(e); + if (ret >= 0 && ret <= 4096) { return null; } + Result_u64ShortChannelIdErrorZ ret_hu_conv = Result_u64ShortChannelIdErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Checks if the given object is currently in the success state + */ + public bool is_ok() { + bool ret = bindings.CResult_u64ShortChannelIdErrorZ_is_ok(this.ptr); + GC.KeepAlive(this); + return ret; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/Retry.cs b/c_sharp/src/org/ldk/structs/Retry.cs index 9051ae53..b4745c37 100644 --- a/c_sharp/src/org/ldk/structs/Retry.cs +++ b/c_sharp/src/org/ldk/structs/Retry.cs @@ -85,7 +85,7 @@ public class Retry : CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public bool eq(org.ldk.structs.Retry b) { - bool ret = bindings.Retry_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.Retry_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); return ret; diff --git a/c_sharp/src/org/ldk/structs/RevocationBasepoint.cs b/c_sharp/src/org/ldk/structs/RevocationBasepoint.cs index d2254409..3df76105 100644 --- a/c_sharp/src/org/ldk/structs/RevocationBasepoint.cs +++ b/c_sharp/src/org/ldk/structs/RevocationBasepoint.cs @@ -48,7 +48,7 @@ public class RevocationBasepoint : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.RevocationBasepoint b) { - bool ret = bindings.RevocationBasepoint_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.RevocationBasepoint_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/RevocationKey.cs b/c_sharp/src/org/ldk/structs/RevocationKey.cs index 9fe538dc..f57166a7 100644 --- a/c_sharp/src/org/ldk/structs/RevocationKey.cs +++ b/c_sharp/src/org/ldk/structs/RevocationKey.cs @@ -54,7 +54,7 @@ public class RevocationKey : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.RevocationKey b) { - bool ret = bindings.RevocationKey_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.RevocationKey_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; @@ -107,7 +107,7 @@ public class RevocationKey : CommonBase { * [`chan_utils::derive_private_revocation_key`]: crate::ln::chan_utils::derive_private_revocation_key */ public static RevocationKey from_basepoint(org.ldk.structs.RevocationBasepoint countersignatory_basepoint, byte[] per_commitment_point) { - long ret = bindings.RevocationKey_from_basepoint(countersignatory_basepoint == null ? 0 : countersignatory_basepoint.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(per_commitment_point, 33))); + long ret = bindings.RevocationKey_from_basepoint(countersignatory_basepoint.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(per_commitment_point, 33))); GC.KeepAlive(countersignatory_basepoint); GC.KeepAlive(per_commitment_point); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/c_sharp/src/org/ldk/structs/RevokeAndACK.cs b/c_sharp/src/org/ldk/structs/RevokeAndACK.cs index aa973810..e4ea40c7 100644 --- a/c_sharp/src/org/ldk/structs/RevokeAndACK.cs +++ b/c_sharp/src/org/ldk/structs/RevokeAndACK.cs @@ -20,21 +20,23 @@ public class RevokeAndACK : CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { + public ChannelId get_channel_id() { long ret = bindings.RevokeAndACK_get_channel_id(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.RevokeAndACK_set_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.RevokeAndACK_set_channel_id(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** @@ -80,14 +82,15 @@ public class RevokeAndACK : CommonBase { /** * Constructs a new RevokeAndACK given each field */ - public static RevokeAndACK of(byte[] channel_id_arg, byte[] per_commitment_secret_arg, byte[] next_per_commitment_point_arg) { - long ret = bindings.RevokeAndACK_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id_arg, 32)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(per_commitment_secret_arg, 32)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(next_per_commitment_point_arg, 33))); + public static RevokeAndACK of(org.ldk.structs.ChannelId channel_id_arg, byte[] per_commitment_secret_arg, byte[] next_per_commitment_point_arg) { + long ret = bindings.RevokeAndACK_new(channel_id_arg.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(per_commitment_secret_arg, 32)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(next_per_commitment_point_arg, 33))); GC.KeepAlive(channel_id_arg); GC.KeepAlive(per_commitment_secret_arg); GC.KeepAlive(next_per_commitment_point_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.RevokeAndACK ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.RevokeAndACK(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id_arg); }; return ret_hu_conv; } @@ -127,7 +130,7 @@ public class RevokeAndACK : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.RevokeAndACK b) { - bool ret = bindings.RevokeAndACK_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.RevokeAndACK_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/Route.cs b/c_sharp/src/org/ldk/structs/Route.cs index 666b6dfb..4e28b913 100644 --- a/c_sharp/src/org/ldk/structs/Route.cs +++ b/c_sharp/src/org/ldk/structs/Route.cs @@ -43,7 +43,7 @@ public class Route : CommonBase { * the same. */ public void set_paths(Path[] val) { - bindings.Route_set_paths(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(val, val_conv_6 => val_conv_6 == null ? 0 : val_conv_6.ptr))); + bindings.Route_set_paths(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(val, val_conv_6 => val_conv_6.ptr))); GC.KeepAlive(this); GC.KeepAlive(val); foreach (Path val_conv_6 in val) { if (this != null) { this.ptrs_to.AddLast(val_conv_6); }; }; @@ -89,7 +89,7 @@ public class Route : CommonBase { * Note that route_params_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ public static Route of(Path[] paths_arg, org.ldk.structs.RouteParameters route_params_arg) { - long ret = bindings.Route_new(InternalUtils.encodeUint64Array(InternalUtils.mapArray(paths_arg, paths_arg_conv_6 => paths_arg_conv_6 == null ? 0 : paths_arg_conv_6.ptr)), route_params_arg == null ? 0 : route_params_arg.ptr); + long ret = bindings.Route_new(InternalUtils.encodeUint64Array(InternalUtils.mapArray(paths_arg, paths_arg_conv_6 => paths_arg_conv_6.ptr)), route_params_arg == null ? 0 : route_params_arg.ptr); GC.KeepAlive(paths_arg); GC.KeepAlive(route_params_arg); if (ret >= 0 && ret <= 4096) { return null; } @@ -136,7 +136,7 @@ public class Route : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.Route b) { - bool ret = bindings.Route_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.Route_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/RouteHint.cs b/c_sharp/src/org/ldk/structs/RouteHint.cs index d98719d9..04597b7d 100644 --- a/c_sharp/src/org/ldk/structs/RouteHint.cs +++ b/c_sharp/src/org/ldk/structs/RouteHint.cs @@ -32,7 +32,7 @@ public class RouteHint : CommonBase { } public void set_a(RouteHintHop[] val) { - bindings.RouteHint_set_a(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(val, val_conv_14 => val_conv_14 == null ? 0 : val_conv_14.ptr))); + bindings.RouteHint_set_a(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(val, val_conv_14 => val_conv_14.ptr))); GC.KeepAlive(this); GC.KeepAlive(val); foreach (RouteHintHop val_conv_14 in val) { if (this != null) { this.ptrs_to.AddLast(val_conv_14); }; }; @@ -42,7 +42,7 @@ public class RouteHint : CommonBase { * Constructs a new RouteHint given each field */ public static RouteHint of(RouteHintHop[] a_arg) { - long ret = bindings.RouteHint_new(InternalUtils.encodeUint64Array(InternalUtils.mapArray(a_arg, a_arg_conv_14 => a_arg_conv_14 == null ? 0 : a_arg_conv_14.ptr))); + long ret = bindings.RouteHint_new(InternalUtils.encodeUint64Array(InternalUtils.mapArray(a_arg, a_arg_conv_14 => a_arg_conv_14.ptr))); GC.KeepAlive(a_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.RouteHint ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.RouteHint(null, ret); } @@ -87,7 +87,7 @@ public class RouteHint : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.RouteHint b) { - bool ret = bindings.RouteHint_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.RouteHint_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/RouteHintHop.cs b/c_sharp/src/org/ldk/structs/RouteHintHop.cs index 74f637fa..54d00a4c 100644 --- a/c_sharp/src/org/ldk/structs/RouteHintHop.cs +++ b/c_sharp/src/org/ldk/structs/RouteHintHop.cs @@ -73,7 +73,7 @@ public class RouteHintHop : CommonBase { * The fees which must be paid to use this channel */ public void set_fees(org.ldk.structs.RoutingFees val) { - bindings.RouteHintHop_set_fees(this.ptr, val == null ? 0 : val.ptr); + bindings.RouteHintHop_set_fees(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -145,7 +145,7 @@ public class RouteHintHop : CommonBase { * Constructs a new RouteHintHop given each field */ public static RouteHintHop of(byte[] src_node_id_arg, long short_channel_id_arg, org.ldk.structs.RoutingFees fees_arg, short cltv_expiry_delta_arg, org.ldk.structs.Option_u64Z htlc_minimum_msat_arg, org.ldk.structs.Option_u64Z htlc_maximum_msat_arg) { - long ret = bindings.RouteHintHop_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(src_node_id_arg, 33)), short_channel_id_arg, fees_arg == null ? 0 : fees_arg.ptr, cltv_expiry_delta_arg, htlc_minimum_msat_arg.ptr, htlc_maximum_msat_arg.ptr); + long ret = bindings.RouteHintHop_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(src_node_id_arg, 33)), short_channel_id_arg, fees_arg.ptr, cltv_expiry_delta_arg, htlc_minimum_msat_arg.ptr, htlc_maximum_msat_arg.ptr); GC.KeepAlive(src_node_id_arg); GC.KeepAlive(short_channel_id_arg); GC.KeepAlive(fees_arg); @@ -197,7 +197,7 @@ public class RouteHintHop : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.RouteHintHop b) { - bool ret = bindings.RouteHintHop_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.RouteHintHop_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/RouteHop.cs b/c_sharp/src/org/ldk/structs/RouteHop.cs index b15e8d41..e26de5bb 100644 --- a/c_sharp/src/org/ldk/structs/RouteHop.cs +++ b/c_sharp/src/org/ldk/structs/RouteHop.cs @@ -54,7 +54,7 @@ public class RouteHop : CommonBase { * amended to match the features present in the invoice this node generated. */ public void set_node_features(org.ldk.structs.NodeFeatures val) { - bindings.RouteHop_set_node_features(this.ptr, val == null ? 0 : val.ptr); + bindings.RouteHop_set_node_features(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -96,7 +96,7 @@ public class RouteHop : CommonBase { * to reach this node. */ public void set_channel_features(org.ldk.structs.ChannelFeatures val) { - bindings.RouteHop_set_channel_features(this.ptr, val == null ? 0 : val.ptr); + bindings.RouteHop_set_channel_features(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -194,7 +194,7 @@ public class RouteHop : CommonBase { * Constructs a new RouteHop given each field */ public static RouteHop of(byte[] pubkey_arg, org.ldk.structs.NodeFeatures node_features_arg, long short_channel_id_arg, org.ldk.structs.ChannelFeatures channel_features_arg, long fee_msat_arg, int cltv_expiry_delta_arg, bool maybe_announced_channel_arg) { - long ret = bindings.RouteHop_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(pubkey_arg, 33)), node_features_arg == null ? 0 : node_features_arg.ptr, short_channel_id_arg, channel_features_arg == null ? 0 : channel_features_arg.ptr, fee_msat_arg, cltv_expiry_delta_arg, maybe_announced_channel_arg); + long ret = bindings.RouteHop_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(pubkey_arg, 33)), node_features_arg.ptr, short_channel_id_arg, channel_features_arg.ptr, fee_msat_arg, cltv_expiry_delta_arg, maybe_announced_channel_arg); GC.KeepAlive(pubkey_arg); GC.KeepAlive(node_features_arg); GC.KeepAlive(short_channel_id_arg); @@ -246,7 +246,7 @@ public class RouteHop : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.RouteHop b) { - bool ret = bindings.RouteHop_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.RouteHop_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/RouteParameters.cs b/c_sharp/src/org/ldk/structs/RouteParameters.cs index de9e018a..48fb9758 100644 --- a/c_sharp/src/org/ldk/structs/RouteParameters.cs +++ b/c_sharp/src/org/ldk/structs/RouteParameters.cs @@ -33,7 +33,7 @@ public class RouteParameters : CommonBase { * The parameters of the failed payment path. */ public void set_payment_params(org.ldk.structs.PaymentParameters val) { - bindings.RouteParameters_set_payment_params(this.ptr, val == null ? 0 : val.ptr); + bindings.RouteParameters_set_payment_params(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -93,7 +93,7 @@ public class RouteParameters : CommonBase { * Constructs a new RouteParameters given each field */ public static RouteParameters of(org.ldk.structs.PaymentParameters payment_params_arg, long final_value_msat_arg, org.ldk.structs.Option_u64Z max_total_routing_fee_msat_arg) { - long ret = bindings.RouteParameters_new(payment_params_arg == null ? 0 : payment_params_arg.ptr, final_value_msat_arg, max_total_routing_fee_msat_arg.ptr); + long ret = bindings.RouteParameters_new(payment_params_arg.ptr, final_value_msat_arg, max_total_routing_fee_msat_arg.ptr); GC.KeepAlive(payment_params_arg); GC.KeepAlive(final_value_msat_arg); GC.KeepAlive(max_total_routing_fee_msat_arg); @@ -141,7 +141,7 @@ public class RouteParameters : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.RouteParameters b) { - bool ret = bindings.RouteParameters_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.RouteParameters_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; @@ -158,7 +158,7 @@ public class RouteParameters : CommonBase { * [`Self::max_total_routing_fee_msat`] defaults to 1% of the payment amount + 50 sats */ public static RouteParameters from_payment_params_and_value(org.ldk.structs.PaymentParameters payment_params, long final_value_msat) { - long ret = bindings.RouteParameters_from_payment_params_and_value(payment_params == null ? 0 : payment_params.ptr, final_value_msat); + long ret = bindings.RouteParameters_from_payment_params_and_value(payment_params.ptr, final_value_msat); GC.KeepAlive(payment_params); GC.KeepAlive(final_value_msat); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/c_sharp/src/org/ldk/structs/Router.cs b/c_sharp/src/org/ldk/structs/Router.cs index 4bce4122..bff09f0f 100644 --- a/c_sharp/src/org/ldk/structs/Router.cs +++ b/c_sharp/src/org/ldk/structs/Router.cs @@ -71,7 +71,7 @@ public class Router : CommonBase { if (_inflight_htlcs_hu_conv != null) { _inflight_htlcs_hu_conv.ptrs_to.AddLast(this); }; Result_RouteLightningErrorZ ret = arg.find_route(_payer_conv, _route_params_hu_conv, _first_hops_conv_16_arr, _inflight_htlcs_hu_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long find_route_with_id(long _payer, long _route_params, long _first_hops, long _inflight_htlcs, long __payment_hash, long __payment_id) { @@ -94,7 +94,7 @@ public class Router : CommonBase { byte[] __payment_id_conv = InternalUtils.decodeUint8Array(__payment_id); Result_RouteLightningErrorZ ret = arg.find_route_with_id(_payer_conv, _route_params_hu_conv, _first_hops_conv_16_arr, _inflight_htlcs_hu_conv, __payment_hash_conv, __payment_id_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long create_blinded_payment_paths(long _recipient, long _first_hops, long _tlvs, long _amount_msats) { @@ -112,7 +112,7 @@ public class Router : CommonBase { if (_tlvs_hu_conv != null) { _tlvs_hu_conv.ptrs_to.AddLast(this); }; Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ ret = arg.create_blinded_payment_paths(_recipient_conv, _first_hops_conv_16_arr, _tlvs_hu_conv, _amount_msats); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } } @@ -140,7 +140,7 @@ public class Router : CommonBase { * Note that first_hops (or a relevant inner pointer) may be NULL or all-0s to represent None */ public Result_RouteLightningErrorZ find_route(byte[] payer, org.ldk.structs.RouteParameters route_params, ChannelDetails[] first_hops, org.ldk.structs.InFlightHtlcs inflight_htlcs) { - long ret = bindings.Router_find_route(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payer, 33)), route_params == null ? 0 : route_params.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(first_hops, first_hops_conv_16 => first_hops_conv_16 == null ? 0 : first_hops_conv_16.ptr)), inflight_htlcs == null ? 0 : inflight_htlcs.ptr); + long ret = bindings.Router_find_route(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payer, 33)), route_params.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(first_hops, first_hops_conv_16 => first_hops_conv_16.ptr)), inflight_htlcs.ptr); GC.KeepAlive(this); GC.KeepAlive(payer); GC.KeepAlive(route_params); @@ -166,7 +166,7 @@ public class Router : CommonBase { * Note that first_hops (or a relevant inner pointer) may be NULL or all-0s to represent None */ public Result_RouteLightningErrorZ find_route_with_id(byte[] payer, org.ldk.structs.RouteParameters route_params, ChannelDetails[] first_hops, org.ldk.structs.InFlightHtlcs inflight_htlcs, byte[] _payment_hash, byte[] _payment_id) { - long ret = bindings.Router_find_route_with_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payer, 33)), route_params == null ? 0 : route_params.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(first_hops, first_hops_conv_16 => first_hops_conv_16 == null ? 0 : first_hops_conv_16.ptr)), inflight_htlcs == null ? 0 : inflight_htlcs.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(_payment_hash, 32)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(_payment_id, 32))); + long ret = bindings.Router_find_route_with_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payer, 33)), route_params.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(first_hops, first_hops_conv_16 => first_hops_conv_16.ptr)), inflight_htlcs.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(_payment_hash, 32)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(_payment_id, 32))); GC.KeepAlive(this); GC.KeepAlive(payer); GC.KeepAlive(route_params); @@ -188,7 +188,7 @@ public class Router : CommonBase { * given in `tlvs`. */ public Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ create_blinded_payment_paths(byte[] recipient, ChannelDetails[] first_hops, org.ldk.structs.ReceiveTlvs tlvs, long amount_msats) { - long ret = bindings.Router_create_blinded_payment_paths(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(recipient, 33)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(first_hops, first_hops_conv_16 => first_hops_conv_16 == null ? 0 : first_hops_conv_16.ptr)), tlvs == null ? 0 : tlvs.ptr, amount_msats); + long ret = bindings.Router_create_blinded_payment_paths(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(recipient, 33)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(first_hops, first_hops_conv_16 => first_hops_conv_16.ptr)), tlvs.ptr, amount_msats); GC.KeepAlive(this); GC.KeepAlive(recipient); GC.KeepAlive(first_hops); diff --git a/c_sharp/src/org/ldk/structs/RoutingFees.cs b/c_sharp/src/org/ldk/structs/RoutingFees.cs index d296f285..5cf7bbc2 100644 --- a/c_sharp/src/org/ldk/structs/RoutingFees.cs +++ b/c_sharp/src/org/ldk/structs/RoutingFees.cs @@ -72,7 +72,7 @@ public class RoutingFees : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.RoutingFees b) { - bool ret = bindings.RoutingFees_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.RoutingFees_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/RoutingMessageHandler.cs b/c_sharp/src/org/ldk/structs/RoutingMessageHandler.cs index 278d0881..5b645f23 100644 --- a/c_sharp/src/org/ldk/structs/RoutingMessageHandler.cs +++ b/c_sharp/src/org/ldk/structs/RoutingMessageHandler.cs @@ -111,27 +111,27 @@ public class RoutingMessageHandler : CommonBase { org.ldk.structs.NodeAnnouncement _msg_hu_conv = null; if (_msg < 0 || _msg > 4096) { _msg_hu_conv = new org.ldk.structs.NodeAnnouncement(null, _msg); } Result_boolLightningErrorZ ret = arg.handle_node_announcement(_msg_hu_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long handle_channel_announcement(long _msg) { org.ldk.structs.ChannelAnnouncement _msg_hu_conv = null; if (_msg < 0 || _msg > 4096) { _msg_hu_conv = new org.ldk.structs.ChannelAnnouncement(null, _msg); } Result_boolLightningErrorZ ret = arg.handle_channel_announcement(_msg_hu_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long handle_channel_update(long _msg) { org.ldk.structs.ChannelUpdate _msg_hu_conv = null; if (_msg < 0 || _msg > 4096) { _msg_hu_conv = new org.ldk.structs.ChannelUpdate(null, _msg); } Result_boolLightningErrorZ ret = arg.handle_channel_update(_msg_hu_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long get_next_channel_announcement(long _starting_point) { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret = arg.get_next_channel_announcement(_starting_point); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); if (impl_holder.held != null) { impl_holder.held.ptrs_to.AddLast(ret); }; return result; } @@ -148,7 +148,7 @@ public class RoutingMessageHandler : CommonBase { org.ldk.structs.Init _init_hu_conv = null; if (_init < 0 || _init > 4096) { _init_hu_conv = new org.ldk.structs.Init(null, _init); } Result_NoneNoneZ ret = arg.peer_connected(_their_node_id_conv, _init_hu_conv, _inbound); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long handle_reply_channel_range(long _their_node_id, long _msg) { @@ -157,7 +157,7 @@ public class RoutingMessageHandler : CommonBase { if (_msg_hu_conv != null) { _msg_hu_conv.ptrs_to.AddLast(this); }; Result_NoneLightningErrorZ ret = arg.handle_reply_channel_range(_their_node_id_conv, _msg_hu_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long handle_reply_short_channel_ids_end(long _their_node_id, long _msg) { @@ -166,7 +166,7 @@ public class RoutingMessageHandler : CommonBase { if (_msg_hu_conv != null) { _msg_hu_conv.ptrs_to.AddLast(this); }; Result_NoneLightningErrorZ ret = arg.handle_reply_short_channel_ids_end(_their_node_id_conv, _msg_hu_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long handle_query_channel_range(long _their_node_id, long _msg) { @@ -175,7 +175,7 @@ public class RoutingMessageHandler : CommonBase { if (_msg_hu_conv != null) { _msg_hu_conv.ptrs_to.AddLast(this); }; Result_NoneLightningErrorZ ret = arg.handle_query_channel_range(_their_node_id_conv, _msg_hu_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long handle_query_short_channel_ids(long _their_node_id, long _msg) { @@ -184,7 +184,7 @@ public class RoutingMessageHandler : CommonBase { if (_msg_hu_conv != null) { _msg_hu_conv.ptrs_to.AddLast(this); }; Result_NoneLightningErrorZ ret = arg.handle_query_short_channel_ids(_their_node_id_conv, _msg_hu_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public bool processing_queue_high() { @@ -195,14 +195,14 @@ public class RoutingMessageHandler : CommonBase { public long provided_node_features() { NodeFeatures ret = arg.provided_node_features(); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long provided_init_features(long _their_node_id) { byte[] _their_node_id_conv = InternalUtils.decodeUint8Array(_their_node_id); InitFeatures ret = arg.provided_init_features(_their_node_id_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } } @@ -226,7 +226,7 @@ public class RoutingMessageHandler : CommonBase { * `false` or returning an `Err` otherwise. */ public Result_boolLightningErrorZ handle_node_announcement(org.ldk.structs.NodeAnnouncement msg) { - long ret = bindings.RoutingMessageHandler_handle_node_announcement(this.ptr, msg == null ? 0 : msg.ptr); + long ret = bindings.RoutingMessageHandler_handle_node_announcement(this.ptr, msg.ptr); GC.KeepAlive(this); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -240,7 +240,7 @@ public class RoutingMessageHandler : CommonBase { * or returning an `Err` otherwise. */ public Result_boolLightningErrorZ handle_channel_announcement(org.ldk.structs.ChannelAnnouncement msg) { - long ret = bindings.RoutingMessageHandler_handle_channel_announcement(this.ptr, msg == null ? 0 : msg.ptr); + long ret = bindings.RoutingMessageHandler_handle_channel_announcement(this.ptr, msg.ptr); GC.KeepAlive(this); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -254,7 +254,7 @@ public class RoutingMessageHandler : CommonBase { * `false` or returning an `Err` otherwise. */ public Result_boolLightningErrorZ handle_channel_update(org.ldk.structs.ChannelUpdate msg) { - long ret = bindings.RoutingMessageHandler_handle_channel_update(this.ptr, msg == null ? 0 : msg.ptr); + long ret = bindings.RoutingMessageHandler_handle_channel_update(this.ptr, msg.ptr); GC.KeepAlive(this); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } @@ -308,7 +308,7 @@ public class RoutingMessageHandler : CommonBase { * message handlers may still wish to communicate with this peer. */ public Result_NoneNoneZ peer_connected(byte[] their_node_id, org.ldk.structs.Init init, bool inbound) { - long ret = bindings.RoutingMessageHandler_peer_connected(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), init == null ? 0 : init.ptr, inbound); + long ret = bindings.RoutingMessageHandler_peer_connected(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), init.ptr, inbound); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(init); @@ -325,7 +325,7 @@ public class RoutingMessageHandler : CommonBase { * replies to a single query. */ public Result_NoneLightningErrorZ handle_reply_channel_range(byte[] their_node_id, org.ldk.structs.ReplyChannelRange msg) { - long ret = bindings.RoutingMessageHandler_handle_reply_channel_range(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); + long ret = bindings.RoutingMessageHandler_handle_reply_channel_range(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(msg); @@ -342,7 +342,7 @@ public class RoutingMessageHandler : CommonBase { * gossip messages. */ public Result_NoneLightningErrorZ handle_reply_short_channel_ids_end(byte[] their_node_id, org.ldk.structs.ReplyShortChannelIdsEnd msg) { - long ret = bindings.RoutingMessageHandler_handle_reply_short_channel_ids_end(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); + long ret = bindings.RoutingMessageHandler_handle_reply_short_channel_ids_end(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(msg); @@ -357,7 +357,7 @@ public class RoutingMessageHandler : CommonBase { * for the requested range of blocks. */ public Result_NoneLightningErrorZ handle_query_channel_range(byte[] their_node_id, org.ldk.structs.QueryChannelRange msg) { - long ret = bindings.RoutingMessageHandler_handle_query_channel_range(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); + long ret = bindings.RoutingMessageHandler_handle_query_channel_range(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(msg); @@ -372,7 +372,7 @@ public class RoutingMessageHandler : CommonBase { * list of `short_channel_id`s. */ public Result_NoneLightningErrorZ handle_query_short_channel_ids(byte[] their_node_id, org.ldk.structs.QueryShortChannelIds msg) { - long ret = bindings.RoutingMessageHandler_handle_query_short_channel_ids(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg == null ? 0 : msg.ptr); + long ret = bindings.RoutingMessageHandler_handle_query_short_channel_ids(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr); GC.KeepAlive(this); GC.KeepAlive(their_node_id); GC.KeepAlive(msg); diff --git a/c_sharp/src/org/ldk/structs/ScoreLookUp.cs b/c_sharp/src/org/ldk/structs/ScoreLookUp.cs index aefbc190..7406d650 100644 --- a/c_sharp/src/org/ldk/structs/ScoreLookUp.cs +++ b/c_sharp/src/org/ldk/structs/ScoreLookUp.cs @@ -77,7 +77,7 @@ public class ScoreLookUp : CommonBase { * Thus, implementations should be overflow-safe. */ public long channel_penalty_msat(org.ldk.structs.CandidateRouteHop candidate, org.ldk.structs.ChannelUsage usage, org.ldk.structs.ProbabilisticScoringFeeParameters score_params) { - long ret = bindings.ScoreLookUp_channel_penalty_msat(this.ptr, candidate == null ? 0 : candidate.ptr, usage == null ? 0 : usage.ptr, score_params == null ? 0 : score_params.ptr); + long ret = bindings.ScoreLookUp_channel_penalty_msat(this.ptr, candidate.ptr, usage.ptr, score_params.ptr); GC.KeepAlive(this); GC.KeepAlive(candidate); GC.KeepAlive(usage); diff --git a/c_sharp/src/org/ldk/structs/ScoreUpdate.cs b/c_sharp/src/org/ldk/structs/ScoreUpdate.cs index 5785e40d..85e59ecb 100644 --- a/c_sharp/src/org/ldk/structs/ScoreUpdate.cs +++ b/c_sharp/src/org/ldk/structs/ScoreUpdate.cs @@ -89,7 +89,7 @@ public class ScoreUpdate : CommonBase { * Handles updating channel penalties after failing to route through a channel. */ public void payment_path_failed(org.ldk.structs.Path path, long short_channel_id, long duration_since_epoch) { - bindings.ScoreUpdate_payment_path_failed(this.ptr, path == null ? 0 : path.ptr, short_channel_id, duration_since_epoch); + bindings.ScoreUpdate_payment_path_failed(this.ptr, path.ptr, short_channel_id, duration_since_epoch); GC.KeepAlive(this); GC.KeepAlive(path); GC.KeepAlive(short_channel_id); @@ -101,7 +101,7 @@ public class ScoreUpdate : CommonBase { * Handles updating channel penalties after successfully routing along a path. */ public void payment_path_successful(org.ldk.structs.Path path, long duration_since_epoch) { - bindings.ScoreUpdate_payment_path_successful(this.ptr, path == null ? 0 : path.ptr, duration_since_epoch); + bindings.ScoreUpdate_payment_path_successful(this.ptr, path.ptr, duration_since_epoch); GC.KeepAlive(this); GC.KeepAlive(path); GC.KeepAlive(duration_since_epoch); @@ -112,7 +112,7 @@ public class ScoreUpdate : CommonBase { * Handles updating channel penalties after a probe over the given path failed. */ public void probe_failed(org.ldk.structs.Path path, long short_channel_id, long duration_since_epoch) { - bindings.ScoreUpdate_probe_failed(this.ptr, path == null ? 0 : path.ptr, short_channel_id, duration_since_epoch); + bindings.ScoreUpdate_probe_failed(this.ptr, path.ptr, short_channel_id, duration_since_epoch); GC.KeepAlive(this); GC.KeepAlive(path); GC.KeepAlive(short_channel_id); @@ -124,7 +124,7 @@ public class ScoreUpdate : CommonBase { * Handles updating channel penalties after a probe over the given path succeeded. */ public void probe_successful(org.ldk.structs.Path path, long duration_since_epoch) { - bindings.ScoreUpdate_probe_successful(this.ptr, path == null ? 0 : path.ptr, duration_since_epoch); + bindings.ScoreUpdate_probe_successful(this.ptr, path.ptr, duration_since_epoch); GC.KeepAlive(this); GC.KeepAlive(path); GC.KeepAlive(duration_since_epoch); diff --git a/c_sharp/src/org/ldk/structs/ScorerAccountingForInFlightHtlcs.cs b/c_sharp/src/org/ldk/structs/ScorerAccountingForInFlightHtlcs.cs index add28b36..423181e5 100644 --- a/c_sharp/src/org/ldk/structs/ScorerAccountingForInFlightHtlcs.cs +++ b/c_sharp/src/org/ldk/structs/ScorerAccountingForInFlightHtlcs.cs @@ -24,7 +24,7 @@ public class ScorerAccountingForInFlightHtlcs : CommonBase { * Initialize a new `ScorerAccountingForInFlightHtlcs`. */ public static ScorerAccountingForInFlightHtlcs of(org.ldk.structs.ScoreLookUp scorer, org.ldk.structs.InFlightHtlcs inflight_htlcs) { - long ret = bindings.ScorerAccountingForInFlightHtlcs_new(scorer.ptr, inflight_htlcs == null ? 0 : inflight_htlcs.ptr); + long ret = bindings.ScorerAccountingForInFlightHtlcs_new(scorer.ptr, inflight_htlcs.ptr); GC.KeepAlive(scorer); GC.KeepAlive(inflight_htlcs); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/c_sharp/src/org/ldk/structs/SendError.cs b/c_sharp/src/org/ldk/structs/SendError.cs index c20659b3..dc9cad1b 100644 --- a/c_sharp/src/org/ldk/structs/SendError.cs +++ b/c_sharp/src/org/ldk/structs/SendError.cs @@ -27,7 +27,8 @@ public class SendError : CommonBase { case 5: return new SendError_InvalidMessage(ptr); case 6: return new SendError_BufferFull(ptr); case 7: return new SendError_GetNodeIdFailed(ptr); - case 8: return new SendError_BlindedPathAdvanceFailed(ptr); + case 8: return new SendError_UnresolvedIntroductionNode(ptr); + case 9: return new SendError_BlindedPathAdvanceFailed(ptr); default: throw new ArgumentException("Impossible enum variant"); } @@ -79,6 +80,11 @@ public class SendError : CommonBase { internal SendError_GetNodeIdFailed(long ptr) : base(null, ptr) { } } + /** A SendError of type UnresolvedIntroductionNode */ + public class SendError_UnresolvedIntroductionNode : SendError { + internal SendError_UnresolvedIntroductionNode(long ptr) : base(null, ptr) { + } + } /** A SendError of type BlindedPathAdvanceFailed */ public class SendError_BlindedPathAdvanceFailed : SendError { internal SendError_BlindedPathAdvanceFailed(long ptr) : base(null, ptr) { @@ -192,6 +198,17 @@ public class SendError : CommonBase { return ret_hu_conv; } + /** + * Utility method to constructs a new UnresolvedIntroductionNode-variant SendError + */ + public static SendError unresolved_introduction_node() { + long ret = bindings.SendError_unresolved_introduction_node(); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.SendError ret_hu_conv = org.ldk.structs.SendError.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + /** * Utility method to constructs a new BlindedPathAdvanceFailed-variant SendError */ @@ -203,12 +220,24 @@ public class SendError : CommonBase { return ret_hu_conv; } + /** + * Generates a non-cryptographic 64-bit hash of the SendError. + */ + public long hash() { + long ret = bindings.SendError_hash(this.ptr); + GC.KeepAlive(this); + return ret; + } + + public override int GetHashCode() { + return (int)this.hash(); + } /** * Checks if two SendErrors contain equal inner contents. * This ignores pointers and is_owned flags and looks at the values in fields. */ public bool eq(org.ldk.structs.SendError b) { - bool ret = bindings.SendError_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.SendError_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); return ret; diff --git a/c_sharp/src/org/ldk/structs/SendSuccess.cs b/c_sharp/src/org/ldk/structs/SendSuccess.cs index 4ddb4c96..b7e4ee9d 100644 --- a/c_sharp/src/org/ldk/structs/SendSuccess.cs +++ b/c_sharp/src/org/ldk/structs/SendSuccess.cs @@ -81,12 +81,24 @@ public class SendSuccess : CommonBase { return ret_hu_conv; } + /** + * Generates a non-cryptographic 64-bit hash of the SendSuccess. + */ + public long hash() { + long ret = bindings.SendSuccess_hash(this.ptr); + GC.KeepAlive(this); + return ret; + } + + public override int GetHashCode() { + return (int)this.hash(); + } /** * Checks if two SendSuccesss contain equal inner contents. * This ignores pointers and is_owned flags and looks at the values in fields. */ public bool eq(org.ldk.structs.SendSuccess b) { - bool ret = bindings.SendSuccess_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.SendSuccess_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); return ret; diff --git a/c_sharp/src/org/ldk/structs/Sha256.cs b/c_sharp/src/org/ldk/structs/Sha256.cs index 48cbe06e..6c8a415b 100644 --- a/c_sharp/src/org/ldk/structs/Sha256.cs +++ b/c_sharp/src/org/ldk/structs/Sha256.cs @@ -51,7 +51,7 @@ public class Sha256 : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.Sha256 b) { - bool ret = bindings.Sha256_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.Sha256_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/Shutdown.cs b/c_sharp/src/org/ldk/structs/Shutdown.cs index 142d8fdf..f9c46f70 100644 --- a/c_sharp/src/org/ldk/structs/Shutdown.cs +++ b/c_sharp/src/org/ldk/structs/Shutdown.cs @@ -20,21 +20,23 @@ public class Shutdown : CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { + public ChannelId get_channel_id() { long ret = bindings.Shutdown_get_channel_id(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.Shutdown_set_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.Shutdown_set_channel_id(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** @@ -64,13 +66,14 @@ public class Shutdown : CommonBase { /** * Constructs a new Shutdown given each field */ - public static Shutdown of(byte[] channel_id_arg, byte[] scriptpubkey_arg) { - long ret = bindings.Shutdown_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id_arg, 32)), InternalUtils.encodeUint8Array(scriptpubkey_arg)); + public static Shutdown of(org.ldk.structs.ChannelId channel_id_arg, byte[] scriptpubkey_arg) { + long ret = bindings.Shutdown_new(channel_id_arg.ptr, InternalUtils.encodeUint8Array(scriptpubkey_arg)); GC.KeepAlive(channel_id_arg); GC.KeepAlive(scriptpubkey_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Shutdown ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Shutdown(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id_arg); }; return ret_hu_conv; } @@ -110,7 +113,7 @@ public class Shutdown : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.Shutdown b) { - bool ret = bindings.Shutdown_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.Shutdown_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/ShutdownScript.cs b/c_sharp/src/org/ldk/structs/ShutdownScript.cs index cb9709f2..485cb08b 100644 --- a/c_sharp/src/org/ldk/structs/ShutdownScript.cs +++ b/c_sharp/src/org/ldk/structs/ShutdownScript.cs @@ -41,7 +41,7 @@ public class ShutdownScript : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.ShutdownScript b) { - bool ret = bindings.ShutdownScript_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.ShutdownScript_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; @@ -147,7 +147,7 @@ public class ShutdownScript : CommonBase { * Specifically, checks for compliance with feature `option_shutdown_anysegwit`. */ public bool is_compatible(org.ldk.structs.InitFeatures features) { - bool ret = bindings.ShutdownScript_is_compatible(this.ptr, features == null ? 0 : features.ptr); + bool ret = bindings.ShutdownScript_is_compatible(this.ptr, features.ptr); GC.KeepAlive(this); GC.KeepAlive(features); if (this != null) { this.ptrs_to.AddLast(features); }; diff --git a/c_sharp/src/org/ldk/structs/SignBolt12InvoiceFn.cs b/c_sharp/src/org/ldk/structs/SignBolt12InvoiceFn.cs new file mode 100644 index 00000000..de4f1f4f --- /dev/null +++ b/c_sharp/src/org/ldk/structs/SignBolt12InvoiceFn.cs @@ -0,0 +1,70 @@ + +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + + + +/** An implementation of SignBolt12InvoiceFn */ +public interface SignBolt12InvoiceFnInterface { + /**Signs a [`TaggedHash`] computed over the merkle root of `message`'s TLV stream. + */ + Result_SchnorrSignatureNoneZ sign_invoice(UnsignedBolt12Invoice message); +} + +/** + * A function for signing an [`UnsignedBolt12Invoice`]. + */ +public class SignBolt12InvoiceFn : CommonBase { + internal bindings.LDKSignBolt12InvoiceFn bindings_instance; + internal long instance_idx; + + internal SignBolt12InvoiceFn(object _dummy, long ptr) : base(ptr) { bindings_instance = null; } + ~SignBolt12InvoiceFn() { + if (ptr != 0) { bindings.SignBolt12InvoiceFn_free(ptr); } + } + + private class LDKSignBolt12InvoiceFnHolder { internal SignBolt12InvoiceFn held; } + private class LDKSignBolt12InvoiceFnImpl : bindings.LDKSignBolt12InvoiceFn { + internal LDKSignBolt12InvoiceFnImpl(SignBolt12InvoiceFnInterface arg, LDKSignBolt12InvoiceFnHolder impl_holder) { this.arg = arg; this.impl_holder = impl_holder; } + private SignBolt12InvoiceFnInterface arg; + private LDKSignBolt12InvoiceFnHolder impl_holder; + public long sign_invoice(long _message) { + org.ldk.structs.UnsignedBolt12Invoice _message_hu_conv = null; if (_message < 0 || _message > 4096) { _message_hu_conv = new org.ldk.structs.UnsignedBolt12Invoice(null, _message); } + Result_SchnorrSignatureNoneZ ret = arg.sign_invoice(_message_hu_conv); + GC.KeepAlive(arg); + long result = ret.clone_ptr(); + return result; + } + } + + /** Creates a new instance of SignBolt12InvoiceFn from a given implementation */ + public static SignBolt12InvoiceFn new_impl(SignBolt12InvoiceFnInterface arg) { + LDKSignBolt12InvoiceFnHolder impl_holder = new LDKSignBolt12InvoiceFnHolder(); + LDKSignBolt12InvoiceFnImpl impl = new LDKSignBolt12InvoiceFnImpl(arg, impl_holder); + long[] ptr_idx = bindings.LDKSignBolt12InvoiceFn_new(impl); + + impl_holder.held = new SignBolt12InvoiceFn(null, ptr_idx[0]); + impl_holder.held.instance_idx = ptr_idx[1]; + impl_holder.held.bindings_instance = impl; + return impl_holder.held; + } + + /** + * Signs a [`TaggedHash`] computed over the merkle root of `message`'s TLV stream. + */ + public Result_SchnorrSignatureNoneZ sign_invoice(org.ldk.structs.UnsignedBolt12Invoice message) { + long ret = bindings.SignBolt12InvoiceFn_sign_invoice(this.ptr, message.ptr); + GC.KeepAlive(this); + GC.KeepAlive(message); + if (ret >= 0 && ret <= 4096) { return null; } + Result_SchnorrSignatureNoneZ ret_hu_conv = Result_SchnorrSignatureNoneZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.AddLast(message); }; + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/SignError.cs b/c_sharp/src/org/ldk/structs/SignError.cs new file mode 100644 index 00000000..53eec263 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/SignError.cs @@ -0,0 +1,81 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +/** + * Error when signing messages. + */ +public class SignError : CommonBase { + protected SignError(object _dummy, long ptr) : base(ptr) { } + ~SignError() { + if (ptr != 0) { bindings.SignError_free(ptr); } + } + + internal static SignError constr_from_ptr(long ptr) { + long raw_ty = bindings.LDKSignError_ty_from_ptr(ptr); + switch (raw_ty) { + case 0: return new SignError_Signing(ptr); + case 1: return new SignError_Verification(ptr); + default: + throw new ArgumentException("Impossible enum variant"); + } + } + + /** A SignError of type Signing */ + public class SignError_Signing : SignError { + internal SignError_Signing(long ptr) : base(null, ptr) { + } + } + /** A SignError of type Verification */ + public class SignError_Verification : SignError { + public Secp256k1Error verification; + internal SignError_Verification(long ptr) : base(null, ptr) { + this.verification = bindings.LDKSignError_Verification_get_verification(ptr); + } + } + internal long clone_ptr() { + long ret = bindings.SignError_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a copy of the SignError + */ + public SignError clone() { + long ret = bindings.SignError_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.SignError ret_hu_conv = org.ldk.structs.SignError.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new Signing-variant SignError + */ + public static SignError signing() { + long ret = bindings.SignError_signing(); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.SignError ret_hu_conv = org.ldk.structs.SignError.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new Verification-variant SignError + */ + public static SignError verification(Secp256k1Error a) { + long ret = bindings.SignError_verification(a); + GC.KeepAlive(a); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.SignError ret_hu_conv = org.ldk.structs.SignError.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/SignInvoiceRequestFn.cs b/c_sharp/src/org/ldk/structs/SignInvoiceRequestFn.cs new file mode 100644 index 00000000..712c5f08 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/SignInvoiceRequestFn.cs @@ -0,0 +1,70 @@ + +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + + + +/** An implementation of SignInvoiceRequestFn */ +public interface SignInvoiceRequestFnInterface { + /**Signs a [`TaggedHash`] computed over the merkle root of `message`'s TLV stream. + */ + Result_SchnorrSignatureNoneZ sign_invoice_request(UnsignedInvoiceRequest message); +} + +/** + * A function for signing an [`UnsignedInvoiceRequest`]. + */ +public class SignInvoiceRequestFn : CommonBase { + internal bindings.LDKSignInvoiceRequestFn bindings_instance; + internal long instance_idx; + + internal SignInvoiceRequestFn(object _dummy, long ptr) : base(ptr) { bindings_instance = null; } + ~SignInvoiceRequestFn() { + if (ptr != 0) { bindings.SignInvoiceRequestFn_free(ptr); } + } + + private class LDKSignInvoiceRequestFnHolder { internal SignInvoiceRequestFn held; } + private class LDKSignInvoiceRequestFnImpl : bindings.LDKSignInvoiceRequestFn { + internal LDKSignInvoiceRequestFnImpl(SignInvoiceRequestFnInterface arg, LDKSignInvoiceRequestFnHolder impl_holder) { this.arg = arg; this.impl_holder = impl_holder; } + private SignInvoiceRequestFnInterface arg; + private LDKSignInvoiceRequestFnHolder impl_holder; + public long sign_invoice_request(long _message) { + org.ldk.structs.UnsignedInvoiceRequest _message_hu_conv = null; if (_message < 0 || _message > 4096) { _message_hu_conv = new org.ldk.structs.UnsignedInvoiceRequest(null, _message); } + Result_SchnorrSignatureNoneZ ret = arg.sign_invoice_request(_message_hu_conv); + GC.KeepAlive(arg); + long result = ret.clone_ptr(); + return result; + } + } + + /** Creates a new instance of SignInvoiceRequestFn from a given implementation */ + public static SignInvoiceRequestFn new_impl(SignInvoiceRequestFnInterface arg) { + LDKSignInvoiceRequestFnHolder impl_holder = new LDKSignInvoiceRequestFnHolder(); + LDKSignInvoiceRequestFnImpl impl = new LDKSignInvoiceRequestFnImpl(arg, impl_holder); + long[] ptr_idx = bindings.LDKSignInvoiceRequestFn_new(impl); + + impl_holder.held = new SignInvoiceRequestFn(null, ptr_idx[0]); + impl_holder.held.instance_idx = ptr_idx[1]; + impl_holder.held.bindings_instance = impl; + return impl_holder.held; + } + + /** + * Signs a [`TaggedHash`] computed over the merkle root of `message`'s TLV stream. + */ + public Result_SchnorrSignatureNoneZ sign_invoice_request(org.ldk.structs.UnsignedInvoiceRequest message) { + long ret = bindings.SignInvoiceRequestFn_sign_invoice_request(this.ptr, message.ptr); + GC.KeepAlive(this); + GC.KeepAlive(message); + if (ret >= 0 && ret <= 4096) { return null; } + Result_SchnorrSignatureNoneZ ret_hu_conv = Result_SchnorrSignatureNoneZ.constr_from_ptr(ret); + if (this != null) { this.ptrs_to.AddLast(message); }; + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/SignOrCreationError.cs b/c_sharp/src/org/ldk/structs/SignOrCreationError.cs index f030d2dd..84f64733 100644 --- a/c_sharp/src/org/ldk/structs/SignOrCreationError.cs +++ b/c_sharp/src/org/ldk/structs/SignOrCreationError.cs @@ -83,7 +83,7 @@ public class SignOrCreationError : CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public bool eq(org.ldk.structs.SignOrCreationError b) { - bool ret = bindings.SignOrCreationError_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.SignOrCreationError_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); return ret; diff --git a/c_sharp/src/org/ldk/structs/SignedRawBolt11Invoice.cs b/c_sharp/src/org/ldk/structs/SignedRawBolt11Invoice.cs index ad14e6b2..d0811627 100644 --- a/c_sharp/src/org/ldk/structs/SignedRawBolt11Invoice.cs +++ b/c_sharp/src/org/ldk/structs/SignedRawBolt11Invoice.cs @@ -25,7 +25,7 @@ public class SignedRawBolt11Invoice : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.SignedRawBolt11Invoice b) { - bool ret = bindings.SignedRawBolt11Invoice_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.SignedRawBolt11Invoice_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/SignerProvider.cs b/c_sharp/src/org/ldk/structs/SignerProvider.cs index 440e60ac..053f60cd 100644 --- a/c_sharp/src/org/ldk/structs/SignerProvider.cs +++ b/c_sharp/src/org/ldk/structs/SignerProvider.cs @@ -98,20 +98,20 @@ public class SignerProvider : CommonBase { byte[] _reader_conv = InternalUtils.decodeUint8Array(_reader); Result_WriteableEcdsaChannelSignerDecodeErrorZ ret = arg.read_chan_signer(_reader_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long get_destination_script(long _channel_keys_id) { byte[] _channel_keys_id_conv = InternalUtils.decodeUint8Array(_channel_keys_id); Result_CVec_u8ZNoneZ ret = arg.get_destination_script(_channel_keys_id_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long get_shutdown_scriptpubkey() { Result_ShutdownScriptNoneZ ret = arg.get_shutdown_scriptpubkey(); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } } diff --git a/c_sharp/src/org/ldk/structs/Sleeper.cs b/c_sharp/src/org/ldk/structs/Sleeper.cs index ae04a4b0..d086beb1 100644 --- a/c_sharp/src/org/ldk/structs/Sleeper.cs +++ b/c_sharp/src/org/ldk/structs/Sleeper.cs @@ -20,7 +20,7 @@ public class Sleeper : CommonBase { * Constructs a new sleeper from one future, allowing blocking on it. */ public static Sleeper from_single_future(org.ldk.structs.Future future) { - long ret = bindings.Sleeper_from_single_future(future == null ? 0 : future.ptr); + long ret = bindings.Sleeper_from_single_future(future.ptr); GC.KeepAlive(future); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Sleeper ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Sleeper(null, ret); } @@ -33,7 +33,7 @@ public class Sleeper : CommonBase { * Constructs a new sleeper from two futures, allowing blocking on both at once. */ public static Sleeper from_two_futures(org.ldk.structs.Future fut_a, org.ldk.structs.Future fut_b) { - long ret = bindings.Sleeper_from_two_futures(fut_a == null ? 0 : fut_a.ptr, fut_b == null ? 0 : fut_b.ptr); + long ret = bindings.Sleeper_from_two_futures(fut_a.ptr, fut_b.ptr); GC.KeepAlive(fut_a); GC.KeepAlive(fut_b); if (ret >= 0 && ret <= 4096) { return null; } @@ -48,12 +48,20 @@ public class Sleeper : CommonBase { * Constructs a new sleeper on many futures, allowing blocking on all at once. */ public static Sleeper of(Future[] futures) { - long ret = bindings.Sleeper_new(InternalUtils.encodeUint64Array(InternalUtils.mapArray(futures, futures_conv_8 => futures_conv_8 == null ? 0 : futures_conv_8.ptr))); + long ret = bindings.Sleeper_new(InternalUtils.encodeUint64Array(InternalUtils.mapArray(futures, futures_conv_8 => futures_conv_8.ptr))); GC.KeepAlive(futures); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Sleeper ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Sleeper(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; - foreach (Future futures_conv_8 in futures) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(futures_conv_8); }; }; + foreach (Future futures_conv_8 in futures) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(futures_conv_8); }; + // Due to rust's strict-ownership memory model, in some cases we need to "move" + // an object to pass exclusive ownership to the function being called. + // In most cases, we avoid ret_hu_conv being visible in GC'd languages by cloning the object + // at the FFI layer, creating a new object which Rust can claim ownership of + // However, in some cases (eg here), there is no way to clone an object, and thus + // we actually have to pass full ownership to Rust. + // Thus, after ret_hu_conv call, futures_conv_8 is reset to null and is now a dummy object. + futures_conv_8.ptr = 0;; }; return ret_hu_conv; } diff --git a/c_sharp/src/org/ldk/structs/SocketAddress.cs b/c_sharp/src/org/ldk/structs/SocketAddress.cs index 096f79f6..88754d7d 100644 --- a/c_sharp/src/org/ldk/structs/SocketAddress.cs +++ b/c_sharp/src/org/ldk/structs/SocketAddress.cs @@ -190,7 +190,7 @@ public class SocketAddress : CommonBase { * Utility method to constructs a new Hostname-variant SocketAddress */ public static SocketAddress hostname(org.ldk.structs.Hostname hostname, short port) { - long ret = bindings.SocketAddress_hostname(hostname == null ? 0 : hostname.ptr, port); + long ret = bindings.SocketAddress_hostname(hostname.ptr, port); GC.KeepAlive(hostname); GC.KeepAlive(port); if (ret >= 0 && ret <= 4096) { return null; } @@ -217,7 +217,7 @@ public class SocketAddress : CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public bool eq(org.ldk.structs.SocketAddress b) { - bool ret = bindings.SocketAddress_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.SocketAddress_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); return ret; diff --git a/c_sharp/src/org/ldk/structs/SpendableOutputDescriptor.cs b/c_sharp/src/org/ldk/structs/SpendableOutputDescriptor.cs index b6ffa08e..b5c67001 100644 --- a/c_sharp/src/org/ldk/structs/SpendableOutputDescriptor.cs +++ b/c_sharp/src/org/ldk/structs/SpendableOutputDescriptor.cs @@ -111,7 +111,7 @@ public class SpendableOutputDescriptor : CommonBase { * Utility method to constructs a new StaticOutput-variant SpendableOutputDescriptor */ public static SpendableOutputDescriptor static_output(org.ldk.structs.OutPoint outpoint, org.ldk.structs.TxOut output, byte[] channel_keys_id) { - long ret = bindings.SpendableOutputDescriptor_static_output(outpoint == null ? 0 : outpoint.ptr, output.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_keys_id, 32))); + long ret = bindings.SpendableOutputDescriptor_static_output(outpoint.ptr, output.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_keys_id, 32))); GC.KeepAlive(outpoint); GC.KeepAlive(output); GC.KeepAlive(channel_keys_id); @@ -126,7 +126,7 @@ public class SpendableOutputDescriptor : CommonBase { * Utility method to constructs a new DelayedPaymentOutput-variant SpendableOutputDescriptor */ public static SpendableOutputDescriptor delayed_payment_output(org.ldk.structs.DelayedPaymentOutputDescriptor a) { - long ret = bindings.SpendableOutputDescriptor_delayed_payment_output(a == null ? 0 : a.ptr); + long ret = bindings.SpendableOutputDescriptor_delayed_payment_output(a.ptr); GC.KeepAlive(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.SpendableOutputDescriptor ret_hu_conv = org.ldk.structs.SpendableOutputDescriptor.constr_from_ptr(ret); @@ -139,7 +139,7 @@ public class SpendableOutputDescriptor : CommonBase { * Utility method to constructs a new StaticPaymentOutput-variant SpendableOutputDescriptor */ public static SpendableOutputDescriptor static_payment_output(org.ldk.structs.StaticPaymentOutputDescriptor a) { - long ret = bindings.SpendableOutputDescriptor_static_payment_output(a == null ? 0 : a.ptr); + long ret = bindings.SpendableOutputDescriptor_static_payment_output(a.ptr); GC.KeepAlive(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.SpendableOutputDescriptor ret_hu_conv = org.ldk.structs.SpendableOutputDescriptor.constr_from_ptr(ret); @@ -165,7 +165,7 @@ public class SpendableOutputDescriptor : CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public bool eq(org.ldk.structs.SpendableOutputDescriptor b) { - bool ret = bindings.SpendableOutputDescriptor_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.SpendableOutputDescriptor_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); return ret; diff --git a/c_sharp/src/org/ldk/structs/SpendingDelay.cs b/c_sharp/src/org/ldk/structs/SpendingDelay.cs new file mode 100644 index 00000000..fe3c1054 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/SpendingDelay.cs @@ -0,0 +1,91 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + +/** + * A `enum` signalling to the [`OutputSweeper`] that it should delay spending an output until a + * future block height is reached. + */ +public class SpendingDelay : CommonBase { + protected SpendingDelay(object _dummy, long ptr) : base(ptr) { } + ~SpendingDelay() { + if (ptr != 0) { bindings.SpendingDelay_free(ptr); } + } + + internal static SpendingDelay constr_from_ptr(long ptr) { + long raw_ty = bindings.LDKSpendingDelay_ty_from_ptr(ptr); + switch (raw_ty) { + case 0: return new SpendingDelay_Relative(ptr); + case 1: return new SpendingDelay_Absolute(ptr); + default: + throw new ArgumentException("Impossible enum variant"); + } + } + + /** A SpendingDelay of type Relative */ + public class SpendingDelay_Relative : SpendingDelay { + /** + * The number of blocks until we'll generate and broadcast the spending transaction. + */ + public int num_blocks; + internal SpendingDelay_Relative(long ptr) : base(null, ptr) { + this.num_blocks = bindings.LDKSpendingDelay_Relative_get_num_blocks(ptr); + } + } + /** A SpendingDelay of type Absolute */ + public class SpendingDelay_Absolute : SpendingDelay { + /** + * The height at which we'll generate and broadcast the spending transaction. + */ + public int height; + internal SpendingDelay_Absolute(long ptr) : base(null, ptr) { + this.height = bindings.LDKSpendingDelay_Absolute_get_height(ptr); + } + } + internal long clone_ptr() { + long ret = bindings.SpendingDelay_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a copy of the SpendingDelay + */ + public SpendingDelay clone() { + long ret = bindings.SpendingDelay_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.SpendingDelay ret_hu_conv = org.ldk.structs.SpendingDelay.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new Relative-variant SpendingDelay + */ + public static SpendingDelay relative(int num_blocks) { + long ret = bindings.SpendingDelay_relative(num_blocks); + GC.KeepAlive(num_blocks); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.SpendingDelay ret_hu_conv = org.ldk.structs.SpendingDelay.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new Absolute-variant SpendingDelay + */ + public static SpendingDelay absolute(int height) { + long ret = bindings.SpendingDelay_absolute(height); + GC.KeepAlive(height); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.SpendingDelay ret_hu_conv = org.ldk.structs.SpendingDelay.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/Splice.cs b/c_sharp/src/org/ldk/structs/Splice.cs index b5912ea9..3cc1c468 100644 --- a/c_sharp/src/org/ldk/structs/Splice.cs +++ b/c_sharp/src/org/ldk/structs/Splice.cs @@ -18,21 +18,23 @@ public class Splice : CommonBase { /** * The channel ID where splicing is intended */ - public byte[] get_channel_id() { + public ChannelId get_channel_id() { long ret = bindings.Splice_get_channel_id(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** * The channel ID where splicing is intended */ - public void set_channel_id(byte[] val) { - bindings.Splice_set_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.Splice_set_channel_id(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** @@ -134,8 +136,8 @@ public class Splice : CommonBase { /** * Constructs a new Splice given each field */ - public static Splice of(byte[] channel_id_arg, byte[] chain_hash_arg, long relative_satoshis_arg, int funding_feerate_perkw_arg, int locktime_arg, byte[] funding_pubkey_arg) { - long ret = bindings.Splice_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id_arg, 32)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(chain_hash_arg, 32)), relative_satoshis_arg, funding_feerate_perkw_arg, locktime_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(funding_pubkey_arg, 33))); + public static Splice of(org.ldk.structs.ChannelId channel_id_arg, byte[] chain_hash_arg, long relative_satoshis_arg, int funding_feerate_perkw_arg, int locktime_arg, byte[] funding_pubkey_arg) { + long ret = bindings.Splice_new(channel_id_arg.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(chain_hash_arg, 32)), relative_satoshis_arg, funding_feerate_perkw_arg, locktime_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(funding_pubkey_arg, 33))); GC.KeepAlive(channel_id_arg); GC.KeepAlive(chain_hash_arg); GC.KeepAlive(relative_satoshis_arg); @@ -145,6 +147,7 @@ public class Splice : CommonBase { if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Splice ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Splice(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id_arg); }; return ret_hu_conv; } @@ -172,7 +175,7 @@ public class Splice : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.Splice b) { - bool ret = bindings.Splice_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.Splice_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/SpliceAck.cs b/c_sharp/src/org/ldk/structs/SpliceAck.cs index cfd8f5ab..9c557d26 100644 --- a/c_sharp/src/org/ldk/structs/SpliceAck.cs +++ b/c_sharp/src/org/ldk/structs/SpliceAck.cs @@ -18,21 +18,23 @@ public class SpliceAck : CommonBase { /** * The channel ID where splicing is intended */ - public byte[] get_channel_id() { + public ChannelId get_channel_id() { long ret = bindings.SpliceAck_get_channel_id(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** * The channel ID where splicing is intended */ - public void set_channel_id(byte[] val) { - bindings.SpliceAck_set_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.SpliceAck_set_channel_id(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** @@ -98,8 +100,8 @@ public class SpliceAck : CommonBase { /** * Constructs a new SpliceAck given each field */ - public static SpliceAck of(byte[] channel_id_arg, byte[] chain_hash_arg, long relative_satoshis_arg, byte[] funding_pubkey_arg) { - long ret = bindings.SpliceAck_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id_arg, 32)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(chain_hash_arg, 32)), relative_satoshis_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(funding_pubkey_arg, 33))); + public static SpliceAck of(org.ldk.structs.ChannelId channel_id_arg, byte[] chain_hash_arg, long relative_satoshis_arg, byte[] funding_pubkey_arg) { + long ret = bindings.SpliceAck_new(channel_id_arg.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(chain_hash_arg, 32)), relative_satoshis_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(funding_pubkey_arg, 33))); GC.KeepAlive(channel_id_arg); GC.KeepAlive(chain_hash_arg); GC.KeepAlive(relative_satoshis_arg); @@ -107,6 +109,7 @@ public class SpliceAck : CommonBase { if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.SpliceAck ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.SpliceAck(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id_arg); }; return ret_hu_conv; } @@ -134,7 +137,7 @@ public class SpliceAck : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.SpliceAck b) { - bool ret = bindings.SpliceAck_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.SpliceAck_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/SpliceLocked.cs b/c_sharp/src/org/ldk/structs/SpliceLocked.cs index 17bbcd12..ac5d31fb 100644 --- a/c_sharp/src/org/ldk/structs/SpliceLocked.cs +++ b/c_sharp/src/org/ldk/structs/SpliceLocked.cs @@ -18,32 +18,35 @@ public class SpliceLocked : CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { + public ChannelId get_channel_id() { long ret = bindings.SpliceLocked_get_channel_id(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.SpliceLocked_set_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.SpliceLocked_set_channel_id(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** * Constructs a new SpliceLocked given each field */ - public static SpliceLocked of(byte[] channel_id_arg) { - long ret = bindings.SpliceLocked_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id_arg, 32))); + public static SpliceLocked of(org.ldk.structs.ChannelId channel_id_arg) { + long ret = bindings.SpliceLocked_new(channel_id_arg.ptr); GC.KeepAlive(channel_id_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.SpliceLocked ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.SpliceLocked(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id_arg); }; return ret_hu_conv; } @@ -71,7 +74,7 @@ public class SpliceLocked : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.SpliceLocked b) { - bool ret = bindings.SpliceLocked_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.SpliceLocked_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/StaticPaymentOutputDescriptor.cs b/c_sharp/src/org/ldk/structs/StaticPaymentOutputDescriptor.cs index e1bf7359..31145844 100644 --- a/c_sharp/src/org/ldk/structs/StaticPaymentOutputDescriptor.cs +++ b/c_sharp/src/org/ldk/structs/StaticPaymentOutputDescriptor.cs @@ -33,7 +33,7 @@ public class StaticPaymentOutputDescriptor : CommonBase { * The outpoint which is spendable. */ public void set_outpoint(org.ldk.structs.OutPoint val) { - bindings.StaticPaymentOutputDescriptor_set_outpoint(this.ptr, val == null ? 0 : val.ptr); + bindings.StaticPaymentOutputDescriptor_set_outpoint(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -137,7 +137,7 @@ public class StaticPaymentOutputDescriptor : CommonBase { * Note that channel_transaction_parameters_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ public static StaticPaymentOutputDescriptor of(org.ldk.structs.OutPoint outpoint_arg, org.ldk.structs.TxOut output_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg, org.ldk.structs.ChannelTransactionParameters channel_transaction_parameters_arg) { - long ret = bindings.StaticPaymentOutputDescriptor_new(outpoint_arg == null ? 0 : outpoint_arg.ptr, output_arg.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_keys_id_arg, 32)), channel_value_satoshis_arg, channel_transaction_parameters_arg == null ? 0 : channel_transaction_parameters_arg.ptr); + long ret = bindings.StaticPaymentOutputDescriptor_new(outpoint_arg.ptr, output_arg.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_keys_id_arg, 32)), channel_value_satoshis_arg, channel_transaction_parameters_arg == null ? 0 : channel_transaction_parameters_arg.ptr); GC.KeepAlive(outpoint_arg); GC.KeepAlive(output_arg); GC.KeepAlive(channel_keys_id_arg); @@ -187,7 +187,7 @@ public class StaticPaymentOutputDescriptor : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.StaticPaymentOutputDescriptor b) { - bool ret = bindings.StaticPaymentOutputDescriptor_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.StaticPaymentOutputDescriptor_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/Stfu.cs b/c_sharp/src/org/ldk/structs/Stfu.cs index f3746870..5b7cd65e 100644 --- a/c_sharp/src/org/ldk/structs/Stfu.cs +++ b/c_sharp/src/org/ldk/structs/Stfu.cs @@ -18,21 +18,23 @@ public class Stfu : CommonBase { /** * The channel ID where quiescence is intended */ - public byte[] get_channel_id() { + public ChannelId get_channel_id() { long ret = bindings.Stfu_get_channel_id(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** * The channel ID where quiescence is intended */ - public void set_channel_id(byte[] val) { - bindings.Stfu_set_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.Stfu_set_channel_id(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** @@ -56,13 +58,14 @@ public class Stfu : CommonBase { /** * Constructs a new Stfu given each field */ - public static Stfu of(byte[] channel_id_arg, byte initiator_arg) { - long ret = bindings.Stfu_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id_arg, 32)), initiator_arg); + public static Stfu of(org.ldk.structs.ChannelId channel_id_arg, byte initiator_arg) { + long ret = bindings.Stfu_new(channel_id_arg.ptr, initiator_arg); GC.KeepAlive(channel_id_arg); GC.KeepAlive(initiator_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.Stfu ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Stfu(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id_arg); }; return ret_hu_conv; } @@ -90,7 +93,7 @@ public class Stfu : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.Stfu b) { - bool ret = bindings.Stfu_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.Stfu_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.cs b/c_sharp/src/org/ldk/structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.cs index c7be6380..d0524d17 100644 --- a/c_sharp/src/org/ldk/structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.cs +++ b/c_sharp/src/org/ldk/structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.cs @@ -74,7 +74,7 @@ public class ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ : CommonB * Creates a new C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ from the contained elements. */ public static ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ of(org.ldk.structs.ChannelAnnouncement a, org.ldk.structs.ChannelUpdate b, org.ldk.structs.ChannelUpdate c) { - long ret = bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a == null ? 0 : a.ptr, b == null ? 0 : b.ptr, c == null ? 0 : c.ptr); + long ret = bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a.ptr, b.ptr, c.ptr); GC.KeepAlive(a); GC.KeepAlive(b); GC.KeepAlive(c); diff --git a/c_sharp/src/org/ldk/structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.cs b/c_sharp/src/org/ldk/structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.cs index 8882a93f..b17f5a7c 100644 --- a/c_sharp/src/org/ldk/structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.cs +++ b/c_sharp/src/org/ldk/structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.cs @@ -74,7 +74,7 @@ public class ThreeTuple_OffersMessageDestinationBlindedPathZ : CommonBase { * Creates a new C3Tuple_OffersMessageDestinationBlindedPathZ from the contained elements. */ public static ThreeTuple_OffersMessageDestinationBlindedPathZ of(org.ldk.structs.OffersMessage a, org.ldk.structs.Destination b, org.ldk.structs.BlindedPath c) { - long ret = bindings.C3Tuple_OffersMessageDestinationBlindedPathZ_new(a.ptr, b.ptr, c == null ? 0 : c.ptr); + long ret = bindings.C3Tuple_OffersMessageDestinationBlindedPathZ_new(a.ptr, b.ptr, c.ptr); GC.KeepAlive(a); GC.KeepAlive(b); GC.KeepAlive(c); diff --git a/c_sharp/src/org/ldk/structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.cs b/c_sharp/src/org/ldk/structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.cs index 5365c866..d9fc379e 100644 --- a/c_sharp/src/org/ldk/structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.cs +++ b/c_sharp/src/org/ldk/structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.cs @@ -74,7 +74,7 @@ public class ThreeTuple_OnionMessageContentsDestinationBlindedPathZ : CommonBase * Creates a new C3Tuple_OnionMessageContentsDestinationBlindedPathZ from the contained elements. */ public static ThreeTuple_OnionMessageContentsDestinationBlindedPathZ of(org.ldk.structs.OnionMessageContents a, org.ldk.structs.Destination b, org.ldk.structs.BlindedPath c) { - long ret = bindings.C3Tuple_OnionMessageContentsDestinationBlindedPathZ_new(a.ptr, b.ptr, c == null ? 0 : c.ptr); + long ret = bindings.C3Tuple_OnionMessageContentsDestinationBlindedPathZ_new(a.ptr, b.ptr, c.ptr); GC.KeepAlive(a); GC.KeepAlive(b); GC.KeepAlive(c); diff --git a/c_sharp/src/org/ldk/structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.cs b/c_sharp/src/org/ldk/structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.cs deleted file mode 100644 index c747b159..00000000 --- a/c_sharp/src/org/ldk/structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.cs +++ /dev/null @@ -1,96 +0,0 @@ -using org.ldk.impl; -using org.ldk.enums; -using org.ldk.util; -using System; - -namespace org { namespace ldk { namespace structs { - - -/** - * A Tuple - */ -public class ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ : CommonBase { - internal ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ(object _dummy, long ptr) : base(ptr) { } - ~ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ() { - if (ptr != 0) { bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(ptr); } - } - - /** - * - */ - public OutPoint get_a() { - long ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.OutPoint ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OutPoint(null, ret); } - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; - return ret_hu_conv; - } - - /** - * - */ - public MonitorEvent[] get_b() { - long ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - int ret_conv_14_len = InternalUtils.getArrayLength(ret); - MonitorEvent[] ret_conv_14_arr = new MonitorEvent[ret_conv_14_len]; - for (int o = 0; o < ret_conv_14_len; o++) { - long ret_conv_14 = InternalUtils.getU64ArrayElem(ret, o); - org.ldk.structs.MonitorEvent ret_conv_14_hu_conv = org.ldk.structs.MonitorEvent.constr_from_ptr(ret_conv_14); - if (ret_conv_14_hu_conv != null) { ret_conv_14_hu_conv.ptrs_to.AddLast(this); }; - ret_conv_14_arr[o] = ret_conv_14_hu_conv; - } - bindings.free_buffer(ret); - return ret_conv_14_arr; - } - - /** - * - */ - public byte[] get_c() { - long ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; - } - - internal long clone_ptr() { - long ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(this.ptr); - GC.KeepAlive(this); - return ret; - } - - /** - * Creates a new tuple which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. - */ - public ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ clone() { - long ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ ret_hu_conv = new ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ(null, ret); - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; - return ret_hu_conv; - } - - /** - * Creates a new C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ from the contained elements. - */ - public static ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ of(org.ldk.structs.OutPoint a, MonitorEvent[] b, byte[] c) { - long ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(a == null ? 0 : a.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(b, b_conv_14 => b_conv_14.ptr)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(c, 33))); - GC.KeepAlive(a); - GC.KeepAlive(b); - GC.KeepAlive(c); - if (ret >= 0 && ret <= 4096) { return null; } - ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ ret_hu_conv = new ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ(null, ret); - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(a); }; - foreach (MonitorEvent b_conv_14 in b) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_conv_14); }; }; - return ret_hu_conv; - } - -} -} } } diff --git a/c_sharp/src/org/ldk/structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.cs b/c_sharp/src/org/ldk/structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.cs index 9b770b00..bc304560 100644 --- a/c_sharp/src/org/ldk/structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.cs +++ b/c_sharp/src/org/ldk/structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.cs @@ -73,7 +73,7 @@ public class ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ : Com * Creates a new C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ from the contained elements. */ public static ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ of(byte[] a, org.ldk.structs.OnionMessage b, org.ldk.structs.Option_CVec_SocketAddressZZ c) { - long ret = bindings.C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(a, 33)), b == null ? 0 : b.ptr, c.ptr); + long ret = bindings.C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(a, 33)), b.ptr, c.ptr); GC.KeepAlive(a); GC.KeepAlive(b); GC.KeepAlive(c); diff --git a/c_sharp/src/org/ldk/structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.cs b/c_sharp/src/org/ldk/structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.cs index d0569209..cfc2eab8 100644 --- a/c_sharp/src/org/ldk/structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.cs +++ b/c_sharp/src/org/ldk/structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.cs @@ -73,7 +73,7 @@ public class ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ : CommonBas * Creates a new C3Tuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ from the contained elements. */ public static ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ of(org.ldk.structs.RawBolt11Invoice a, byte[] b, org.ldk.structs.Bolt11InvoiceSignature c) { - long ret = bindings.C3Tuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ_new(a == null ? 0 : a.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(b, 32)), c == null ? 0 : c.ptr); + long ret = bindings.C3Tuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ_new(a.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(b, 32)), c.ptr); GC.KeepAlive(a); GC.KeepAlive(b); GC.KeepAlive(c); diff --git a/c_sharp/src/org/ldk/structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.cs b/c_sharp/src/org/ldk/structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.cs index 7ca3d489..ea5e4a99 100644 --- a/c_sharp/src/org/ldk/structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.cs +++ b/c_sharp/src/org/ldk/structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.cs @@ -73,7 +73,7 @@ public class ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ : Com * Creates a new C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ from the contained elements. */ public static ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ of(byte[] a, org.ldk.structs.RecipientOnionFields b, org.ldk.structs.RouteParameters c) { - long ret = bindings.C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(a, 32)), b == null ? 0 : b.ptr, c == null ? 0 : c.ptr); + long ret = bindings.C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(a, 32)), b.ptr, c.ptr); GC.KeepAlive(a); GC.KeepAlive(b); GC.KeepAlive(c); diff --git a/c_sharp/src/org/ldk/structs/TrackedSpendableOutput.cs b/c_sharp/src/org/ldk/structs/TrackedSpendableOutput.cs new file mode 100644 index 00000000..0ad49eec --- /dev/null +++ b/c_sharp/src/org/ldk/structs/TrackedSpendableOutput.cs @@ -0,0 +1,179 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + + +/** + * The state of a spendable output currently tracked by an [`OutputSweeper`]. + */ +public class TrackedSpendableOutput : CommonBase { + internal TrackedSpendableOutput(object _dummy, long ptr) : base(ptr) { } + ~TrackedSpendableOutput() { + if (ptr != 0) { bindings.TrackedSpendableOutput_free(ptr); } + } + + /** + * The tracked output descriptor. + */ + public SpendableOutputDescriptor get_descriptor() { + long ret = bindings.TrackedSpendableOutput_get_descriptor(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.SpendableOutputDescriptor ret_hu_conv = org.ldk.structs.SpendableOutputDescriptor.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * The tracked output descriptor. + */ + public void set_descriptor(org.ldk.structs.SpendableOutputDescriptor val) { + bindings.TrackedSpendableOutput_set_descriptor(this.ptr, val.ptr); + GC.KeepAlive(this); + GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; + } + + /** + * The channel this output belongs to. + * + * Will be `None` if no `channel_id` was given to [`OutputSweeper::track_spendable_outputs`] + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public ChannelId get_channel_id() { + long ret = bindings.TrackedSpendableOutput_get_channel_id(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * The channel this output belongs to. + * + * Will be `None` if no `channel_id` was given to [`OutputSweeper::track_spendable_outputs`] + * + * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.TrackedSpendableOutput_set_channel_id(this.ptr, val == null ? 0 : val.ptr); + GC.KeepAlive(this); + GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; + } + + /** + * The current status of the output spend. + */ + public OutputSpendStatus get_status() { + long ret = bindings.TrackedSpendableOutput_get_status(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OutputSpendStatus ret_hu_conv = org.ldk.structs.OutputSpendStatus.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * The current status of the output spend. + */ + public void set_status(org.ldk.structs.OutputSpendStatus val) { + bindings.TrackedSpendableOutput_set_status(this.ptr, val.ptr); + GC.KeepAlive(this); + GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; + } + + /** + * Constructs a new TrackedSpendableOutput given each field + * + * Note that channel_id_arg (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public static TrackedSpendableOutput of(org.ldk.structs.SpendableOutputDescriptor descriptor_arg, org.ldk.structs.ChannelId channel_id_arg, org.ldk.structs.OutputSpendStatus status_arg) { + long ret = bindings.TrackedSpendableOutput_new(descriptor_arg.ptr, channel_id_arg == null ? 0 : channel_id_arg.ptr, status_arg.ptr); + GC.KeepAlive(descriptor_arg); + GC.KeepAlive(channel_id_arg); + GC.KeepAlive(status_arg); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.TrackedSpendableOutput ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TrackedSpendableOutput(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(descriptor_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(status_arg); }; + return ret_hu_conv; + } + + internal long clone_ptr() { + long ret = bindings.TrackedSpendableOutput_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a copy of the TrackedSpendableOutput + */ + public TrackedSpendableOutput clone() { + long ret = bindings.TrackedSpendableOutput_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.TrackedSpendableOutput ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TrackedSpendableOutput(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Checks if two TrackedSpendableOutputs contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ + public bool eq(org.ldk.structs.TrackedSpendableOutput b) { + bool ret = bindings.TrackedSpendableOutput_eq(this.ptr, b.ptr); + GC.KeepAlive(this); + GC.KeepAlive(b); + if (this != null) { this.ptrs_to.AddLast(b); }; + return ret; + } + + public override bool Equals(object o) { + if (!(o is TrackedSpendableOutput)) return false; + return this.eq((TrackedSpendableOutput)o); + } + /** + * Returns whether the output is spent in the given transaction. + */ + public bool is_spent_in(byte[] tx) { + bool ret = bindings.TrackedSpendableOutput_is_spent_in(this.ptr, InternalUtils.encodeUint8Array(tx)); + GC.KeepAlive(this); + GC.KeepAlive(tx); + return ret; + } + + /** + * Serialize the TrackedSpendableOutput object into a byte array which can be read by TrackedSpendableOutput_read + */ + public byte[] write() { + long ret = bindings.TrackedSpendableOutput_write(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Read a TrackedSpendableOutput from a byte array, created by TrackedSpendableOutput_write + */ + public static Result_TrackedSpendableOutputDecodeErrorZ read(byte[] ser) { + long ret = bindings.TrackedSpendableOutput_read(InternalUtils.encodeUint8Array(ser)); + GC.KeepAlive(ser); + if (ret >= 0 && ret <= 4096) { return null; } + Result_TrackedSpendableOutputDecodeErrorZ ret_hu_conv = Result_TrackedSpendableOutputDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/TrampolineOnionPacket.cs b/c_sharp/src/org/ldk/structs/TrampolineOnionPacket.cs new file mode 100644 index 00000000..c4e05753 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/TrampolineOnionPacket.cs @@ -0,0 +1,172 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + + +/** + * BOLT 4 onion packet including hop data for the next peer. + */ +public class TrampolineOnionPacket : CommonBase { + internal TrampolineOnionPacket(object _dummy, long ptr) : base(ptr) { } + ~TrampolineOnionPacket() { + if (ptr != 0) { bindings.TrampolineOnionPacket_free(ptr); } + } + + /** + * Bolt 04 version number + */ + public byte get_version() { + byte ret = bindings.TrampolineOnionPacket_get_version(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Bolt 04 version number + */ + public void set_version(byte val) { + bindings.TrampolineOnionPacket_set_version(this.ptr, val); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * A random sepc256k1 point, used to build the ECDH shared secret to decrypt hop_data + */ + public byte[] get_public_key() { + long ret = bindings.TrampolineOnionPacket_get_public_key(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + + /** + * A random sepc256k1 point, used to build the ECDH shared secret to decrypt hop_data + */ + public void set_public_key(byte[] val) { + bindings.TrampolineOnionPacket_set_public_key(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * Encrypted payload for the next hop + * + * Returns a copy of the field. + */ + public byte[] get_hop_data() { + long ret = bindings.TrampolineOnionPacket_get_hop_data(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Encrypted payload for the next hop + */ + public void set_hop_data(byte[] val) { + bindings.TrampolineOnionPacket_set_hop_data(this.ptr, InternalUtils.encodeUint8Array(val)); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * HMAC to verify the integrity of hop_data + */ + public byte[] get_hmac() { + long ret = bindings.TrampolineOnionPacket_get_hmac(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + + /** + * HMAC to verify the integrity of hop_data + */ + public void set_hmac(byte[] val) { + bindings.TrampolineOnionPacket_set_hmac(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * Constructs a new TrampolineOnionPacket given each field + */ + public static TrampolineOnionPacket of(byte version_arg, byte[] public_key_arg, byte[] hop_data_arg, byte[] hmac_arg) { + long ret = bindings.TrampolineOnionPacket_new(version_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(public_key_arg, 33)), InternalUtils.encodeUint8Array(hop_data_arg), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(hmac_arg, 32))); + GC.KeepAlive(version_arg); + GC.KeepAlive(public_key_arg); + GC.KeepAlive(hop_data_arg); + GC.KeepAlive(hmac_arg); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.TrampolineOnionPacket ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TrampolineOnionPacket(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + + internal long clone_ptr() { + long ret = bindings.TrampolineOnionPacket_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a copy of the TrampolineOnionPacket + */ + public TrampolineOnionPacket clone() { + long ret = bindings.TrampolineOnionPacket_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.TrampolineOnionPacket ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TrampolineOnionPacket(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Generates a non-cryptographic 64-bit hash of the TrampolineOnionPacket. + */ + public long hash() { + long ret = bindings.TrampolineOnionPacket_hash(this.ptr); + GC.KeepAlive(this); + return ret; + } + + public override int GetHashCode() { + return (int)this.hash(); + } + /** + * Checks if two TrampolineOnionPackets contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ + public bool eq(org.ldk.structs.TrampolineOnionPacket b) { + bool ret = bindings.TrampolineOnionPacket_eq(this.ptr, b.ptr); + GC.KeepAlive(this); + GC.KeepAlive(b); + if (this != null) { this.ptrs_to.AddLast(b); }; + return ret; + } + + public override bool Equals(object o) { + if (!(o is TrampolineOnionPacket)) return false; + return this.eq((TrampolineOnionPacket)o); + } + /** + * Serialize the TrampolineOnionPacket object into a byte array which can be read by TrampolineOnionPacket_read + */ + public byte[] write() { + long ret = bindings.TrampolineOnionPacket_write(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/TransactionU16LenLimited.cs b/c_sharp/src/org/ldk/structs/TransactionU16LenLimited.cs index bf3c9ecc..9e0974ca 100644 --- a/c_sharp/src/org/ldk/structs/TransactionU16LenLimited.cs +++ b/c_sharp/src/org/ldk/structs/TransactionU16LenLimited.cs @@ -54,7 +54,7 @@ public class TransactionU16LenLimited : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.TransactionU16LenLimited b) { - bool ret = bindings.TransactionU16LenLimited_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.TransactionU16LenLimited_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; @@ -89,6 +89,17 @@ public class TransactionU16LenLimited : CommonBase { return ret_conv; } + /** + * Returns a reference to the contained `Transaction` + */ + public byte[] as_transaction() { + long ret = bindings.TransactionU16LenLimited_as_transaction(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + /** * Serialize the TransactionU16LenLimited object into a byte array which can be read by TransactionU16LenLimited_read */ diff --git a/c_sharp/src/org/ldk/structs/TrustedCommitmentTransaction.cs b/c_sharp/src/org/ldk/structs/TrustedCommitmentTransaction.cs index 0f81c2fe..49e8f999 100644 --- a/c_sharp/src/org/ldk/structs/TrustedCommitmentTransaction.cs +++ b/c_sharp/src/org/ldk/structs/TrustedCommitmentTransaction.cs @@ -76,7 +76,7 @@ public class TrustedCommitmentTransaction : CommonBase { * This function is only valid in the holder commitment context, it always uses EcdsaSighashType::All. */ public Result_CVec_ECDSASignatureZNoneZ get_htlc_sigs(byte[] htlc_base_key, org.ldk.structs.DirectedChannelTransactionParameters channel_parameters, org.ldk.structs.EntropySource entropy_source) { - long ret = bindings.TrustedCommitmentTransaction_get_htlc_sigs(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(htlc_base_key, 32)), channel_parameters == null ? 0 : channel_parameters.ptr, entropy_source.ptr); + long ret = bindings.TrustedCommitmentTransaction_get_htlc_sigs(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(htlc_base_key, 32)), channel_parameters.ptr, entropy_source.ptr); GC.KeepAlive(this); GC.KeepAlive(htlc_base_key); GC.KeepAlive(channel_parameters); diff --git a/c_sharp/src/org/ldk/structs/TwoTuple_BestBlockOutputSweeperZ.cs b/c_sharp/src/org/ldk/structs/TwoTuple_BestBlockOutputSweeperZ.cs new file mode 100644 index 00000000..4ddd8b99 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/TwoTuple_BestBlockOutputSweeperZ.cs @@ -0,0 +1,72 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + + +/** + * A Tuple + */ +public class TwoTuple_BestBlockOutputSweeperZ : CommonBase { + internal TwoTuple_BestBlockOutputSweeperZ(object _dummy, long ptr) : base(ptr) { } + ~TwoTuple_BestBlockOutputSweeperZ() { + if (ptr != 0) { bindings.C2Tuple_BestBlockOutputSweeperZ_free(ptr); } + } + + /** + * + */ + public BestBlock get_a() { + long ret = bindings.C2Tuple_BestBlockOutputSweeperZ_get_a(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.BestBlock ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.BestBlock(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * + */ + public OutputSweeper get_b() { + long ret = bindings.C2Tuple_BestBlockOutputSweeperZ_get_b(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OutputSweeper ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OutputSweeper(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Creates a new C2Tuple_BestBlockOutputSweeperZ from the contained elements. + */ + public static TwoTuple_BestBlockOutputSweeperZ of(org.ldk.structs.BestBlock a, BestBlock b_best_block, BroadcasterInterface b_broadcaster, FeeEstimator b_fee_estimator, Option_FilterZ b_chain_data_source, OutputSpender b_output_spender, ChangeDestinationSource b_change_destination_source, KVStore b_kv_store, Logger b_logger) { + long ret = bindings.C2Tuple_BestBlockOutputSweeperZ_new(a.ptr, bindings.OutputSweeper_new(b_best_block.ptr, b_broadcaster.ptr, b_fee_estimator.ptr, b_chain_data_source.ptr, b_output_spender.ptr, b_change_destination_source.ptr, b_kv_store.ptr, b_logger.ptr)); + GC.KeepAlive(a); + GC.KeepAlive(b_best_block); + GC.KeepAlive(b_broadcaster); + GC.KeepAlive(b_fee_estimator); + GC.KeepAlive(b_chain_data_source); + GC.KeepAlive(b_output_spender); + GC.KeepAlive(b_change_destination_source); + GC.KeepAlive(b_kv_store); + GC.KeepAlive(b_logger); + if (ret >= 0 && ret <= 4096) { return null; } + TwoTuple_BestBlockOutputSweeperZ ret_hu_conv = new TwoTuple_BestBlockOutputSweeperZ(null, ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(a); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_best_block); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_broadcaster); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_fee_estimator); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_chain_data_source); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_output_spender); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_change_destination_source); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_kv_store); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_logger); }; + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/TwoTuple_BlindedPayInfoBlindedPathZ.cs b/c_sharp/src/org/ldk/structs/TwoTuple_BlindedPayInfoBlindedPathZ.cs index 45bce528..a6a31bcc 100644 --- a/c_sharp/src/org/ldk/structs/TwoTuple_BlindedPayInfoBlindedPathZ.cs +++ b/c_sharp/src/org/ldk/structs/TwoTuple_BlindedPayInfoBlindedPathZ.cs @@ -62,7 +62,7 @@ public class TwoTuple_BlindedPayInfoBlindedPathZ : CommonBase { * Creates a new C2Tuple_BlindedPayInfoBlindedPathZ from the contained elements. */ public static TwoTuple_BlindedPayInfoBlindedPathZ of(org.ldk.structs.BlindedPayInfo a, org.ldk.structs.BlindedPath b) { - long ret = bindings.C2Tuple_BlindedPayInfoBlindedPathZ_new(a == null ? 0 : a.ptr, b == null ? 0 : b.ptr); + long ret = bindings.C2Tuple_BlindedPayInfoBlindedPathZ_new(a.ptr, b.ptr); GC.KeepAlive(a); GC.KeepAlive(b); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/c_sharp/src/org/ldk/structs/TwoTuple_ChannelIdPublicKeyZ.cs b/c_sharp/src/org/ldk/structs/TwoTuple_ChannelIdPublicKeyZ.cs new file mode 100644 index 00000000..8bccf7a6 --- /dev/null +++ b/c_sharp/src/org/ldk/structs/TwoTuple_ChannelIdPublicKeyZ.cs @@ -0,0 +1,75 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + + +/** + * A Tuple + */ +public class TwoTuple_ChannelIdPublicKeyZ : CommonBase { + internal TwoTuple_ChannelIdPublicKeyZ(object _dummy, long ptr) : base(ptr) { } + ~TwoTuple_ChannelIdPublicKeyZ() { + if (ptr != 0) { bindings.C2Tuple_ChannelIdPublicKeyZ_free(ptr); } + } + + /** + * + */ + public ChannelId get_a() { + long ret = bindings.C2Tuple_ChannelIdPublicKeyZ_get_a(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * + */ + public byte[] get_b() { + long ret = bindings.C2Tuple_ChannelIdPublicKeyZ_get_b(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + + internal long clone_ptr() { + long ret = bindings.C2Tuple_ChannelIdPublicKeyZ_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a new tuple which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public TwoTuple_ChannelIdPublicKeyZ clone() { + long ret = bindings.C2Tuple_ChannelIdPublicKeyZ_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + TwoTuple_ChannelIdPublicKeyZ ret_hu_conv = new TwoTuple_ChannelIdPublicKeyZ(null, ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Creates a new C2Tuple_ChannelIdPublicKeyZ from the contained elements. + */ + public static TwoTuple_ChannelIdPublicKeyZ of(org.ldk.structs.ChannelId a, byte[] b) { + long ret = bindings.C2Tuple_ChannelIdPublicKeyZ_new(a.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(b, 33))); + GC.KeepAlive(a); + GC.KeepAlive(b); + if (ret >= 0 && ret <= 4096) { return null; } + TwoTuple_ChannelIdPublicKeyZ ret_hu_conv = new TwoTuple_ChannelIdPublicKeyZ(null, ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(a); }; + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.cs b/c_sharp/src/org/ldk/structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.cs index 55915cda..6d6594f2 100644 --- a/c_sharp/src/org/ldk/structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.cs +++ b/c_sharp/src/org/ldk/structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.cs @@ -69,7 +69,7 @@ public class TwoTuple_OutPointCVec_MonitorUpdateIdZZ : CommonBase { * Creates a new C2Tuple_OutPointCVec_MonitorUpdateIdZZ from the contained elements. */ public static TwoTuple_OutPointCVec_MonitorUpdateIdZZ of(org.ldk.structs.OutPoint a, MonitorUpdateId[] b) { - long ret = bindings.C2Tuple_OutPointCVec_MonitorUpdateIdZZ_new(a == null ? 0 : a.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(b, b_conv_17 => b_conv_17 == null ? 0 : b_conv_17.ptr))); + long ret = bindings.C2Tuple_OutPointCVec_MonitorUpdateIdZZ_new(a.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(b, b_conv_17 => b_conv_17.ptr))); GC.KeepAlive(a); GC.KeepAlive(b); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/c_sharp/src/org/ldk/structs/TwoTuple_OutPointCVec_u8ZZ.cs b/c_sharp/src/org/ldk/structs/TwoTuple_OutPointCVec_u8ZZ.cs index 38f599a0..4a9d7c14 100644 --- a/c_sharp/src/org/ldk/structs/TwoTuple_OutPointCVec_u8ZZ.cs +++ b/c_sharp/src/org/ldk/structs/TwoTuple_OutPointCVec_u8ZZ.cs @@ -61,7 +61,7 @@ public class TwoTuple_OutPointCVec_u8ZZ : CommonBase { * Creates a new C2Tuple_OutPointCVec_u8ZZ from the contained elements. */ public static TwoTuple_OutPointCVec_u8ZZ of(org.ldk.structs.OutPoint a, byte[] b) { - long ret = bindings.C2Tuple_OutPointCVec_u8ZZ_new(a == null ? 0 : a.ptr, InternalUtils.encodeUint8Array(b)); + long ret = bindings.C2Tuple_OutPointCVec_u8ZZ_new(a.ptr, InternalUtils.encodeUint8Array(b)); GC.KeepAlive(a); GC.KeepAlive(b); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/c_sharp/src/org/ldk/structs/TwoTuple_OutPointChannelIdZ.cs b/c_sharp/src/org/ldk/structs/TwoTuple_OutPointChannelIdZ.cs new file mode 100644 index 00000000..a13da11c --- /dev/null +++ b/c_sharp/src/org/ldk/structs/TwoTuple_OutPointChannelIdZ.cs @@ -0,0 +1,77 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + + +/** + * A Tuple + */ +public class TwoTuple_OutPointChannelIdZ : CommonBase { + internal TwoTuple_OutPointChannelIdZ(object _dummy, long ptr) : base(ptr) { } + ~TwoTuple_OutPointChannelIdZ() { + if (ptr != 0) { bindings.C2Tuple_OutPointChannelIdZ_free(ptr); } + } + + /** + * + */ + public OutPoint get_a() { + long ret = bindings.C2Tuple_OutPointChannelIdZ_get_a(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OutPoint ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OutPoint(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * + */ + public ChannelId get_b() { + long ret = bindings.C2Tuple_OutPointChannelIdZ_get_b(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + internal long clone_ptr() { + long ret = bindings.C2Tuple_OutPointChannelIdZ_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a new tuple which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public TwoTuple_OutPointChannelIdZ clone() { + long ret = bindings.C2Tuple_OutPointChannelIdZ_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + TwoTuple_OutPointChannelIdZ ret_hu_conv = new TwoTuple_OutPointChannelIdZ(null, ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Creates a new C2Tuple_OutPointChannelIdZ from the contained elements. + */ + public static TwoTuple_OutPointChannelIdZ of(org.ldk.structs.OutPoint a, org.ldk.structs.ChannelId b) { + long ret = bindings.C2Tuple_OutPointChannelIdZ_new(a.ptr, b.ptr); + GC.KeepAlive(a); + GC.KeepAlive(b); + if (ret >= 0 && ret <= 4096) { return null; } + TwoTuple_OutPointChannelIdZ ret_hu_conv = new TwoTuple_OutPointChannelIdZ(null, ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(a); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b); }; + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.cs b/c_sharp/src/org/ldk/structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.cs deleted file mode 100644 index 213544aa..00000000 --- a/c_sharp/src/org/ldk/structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.cs +++ /dev/null @@ -1,75 +0,0 @@ -using org.ldk.impl; -using org.ldk.enums; -using org.ldk.util; -using System; - -namespace org { namespace ldk { namespace structs { - - -/** - * A Tuple - */ -public class TwoTuple_PublicKeyCOption_SocketAddressZZ : CommonBase { - internal TwoTuple_PublicKeyCOption_SocketAddressZZ(object _dummy, long ptr) : base(ptr) { } - ~TwoTuple_PublicKeyCOption_SocketAddressZZ() { - if (ptr != 0) { bindings.C2Tuple_PublicKeyCOption_SocketAddressZZ_free(ptr); } - } - - /** - * - */ - public byte[] get_a() { - long ret = bindings.C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; - } - - /** - * - */ - public Option_SocketAddressZ get_b() { - long ret = bindings.C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Option_SocketAddressZ ret_hu_conv = org.ldk.structs.Option_SocketAddressZ.constr_from_ptr(ret); - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; - return ret_hu_conv; - } - - internal long clone_ptr() { - long ret = bindings.C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(this.ptr); - GC.KeepAlive(this); - return ret; - } - - /** - * Creates a new tuple which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. - */ - public TwoTuple_PublicKeyCOption_SocketAddressZZ clone() { - long ret = bindings.C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - TwoTuple_PublicKeyCOption_SocketAddressZZ ret_hu_conv = new TwoTuple_PublicKeyCOption_SocketAddressZZ(null, ret); - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; - return ret_hu_conv; - } - - /** - * Creates a new C2Tuple_PublicKeyCOption_SocketAddressZZ from the contained elements. - */ - public static TwoTuple_PublicKeyCOption_SocketAddressZZ of(byte[] a, org.ldk.structs.Option_SocketAddressZ b) { - long ret = bindings.C2Tuple_PublicKeyCOption_SocketAddressZZ_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(a, 33)), b.ptr); - GC.KeepAlive(a); - GC.KeepAlive(b); - if (ret >= 0 && ret <= 4096) { return null; } - TwoTuple_PublicKeyCOption_SocketAddressZZ ret_hu_conv = new TwoTuple_PublicKeyCOption_SocketAddressZZ(null, ret); - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b); }; - return ret_hu_conv; - } - -} -} } } diff --git a/c_sharp/src/org/ldk/structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.cs b/c_sharp/src/org/ldk/structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.cs index 7eddc362..8f5cb8fe 100644 --- a/c_sharp/src/org/ldk/structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.cs +++ b/c_sharp/src/org/ldk/structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.cs @@ -68,7 +68,7 @@ public class TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ : CommonBase { * Creates a new C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ from the contained elements. */ public static TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ of(byte[] a, TwoTuple_u32CVec_u8ZZ[] b) { - long ret = bindings.C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(a, 32)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(b, b_conv_23 => b_conv_23 != null ? b_conv_23.ptr : 0))); + long ret = bindings.C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(a, 32)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(b, b_conv_23 => b_conv_23.ptr))); GC.KeepAlive(a); GC.KeepAlive(b); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/c_sharp/src/org/ldk/structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.cs b/c_sharp/src/org/ldk/structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.cs index 60bdb6bc..0955df5a 100644 --- a/c_sharp/src/org/ldk/structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.cs +++ b/c_sharp/src/org/ldk/structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.cs @@ -68,7 +68,7 @@ public class TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ : CommonBase { * Creates a new C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ from the contained elements. */ public static TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ of(byte[] a, TwoTuple_u32TxOutZ[] b) { - long ret = bindings.C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(a, 32)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(b, b_conv_20 => b_conv_20 != null ? b_conv_20.ptr : 0))); + long ret = bindings.C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(a, 32)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(b, b_conv_20 => b_conv_20.ptr))); GC.KeepAlive(a); GC.KeepAlive(b); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/c_sharp/src/org/ldk/structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.cs b/c_sharp/src/org/ldk/structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.cs index 9a04bb1c..9429f8ae 100644 --- a/c_sharp/src/org/ldk/structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.cs +++ b/c_sharp/src/org/ldk/structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.cs @@ -42,7 +42,7 @@ public class TwoTuple_ThirtyTwoBytesChannelManagerZ : CommonBase { * Creates a new C2Tuple_ThirtyTwoBytesChannelManagerZ from the contained elements. */ public static TwoTuple_ThirtyTwoBytesChannelManagerZ of(byte[] a, FeeEstimator b_fee_est, Watch b_chain_monitor, BroadcasterInterface b_tx_broadcaster, Router b_router, Logger b_logger, EntropySource b_entropy_source, NodeSigner b_node_signer, SignerProvider b_signer_provider, UserConfig b_config, ChainParameters b_params, int b_current_timestamp) { - long ret = bindings.C2Tuple_ThirtyTwoBytesChannelManagerZ_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(a, 32)), bindings.ChannelManager_new(b_fee_est.ptr, b_chain_monitor.ptr, b_tx_broadcaster.ptr, b_router.ptr, b_logger.ptr, b_entropy_source.ptr, b_node_signer.ptr, b_signer_provider.ptr, b_config == null ? 0 : b_config.ptr, b_params == null ? 0 : b_params.ptr, b_current_timestamp)); + long ret = bindings.C2Tuple_ThirtyTwoBytesChannelManagerZ_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(a, 32)), bindings.ChannelManager_new(b_fee_est.ptr, b_chain_monitor.ptr, b_tx_broadcaster.ptr, b_router.ptr, b_logger.ptr, b_entropy_source.ptr, b_node_signer.ptr, b_signer_provider.ptr, b_config.ptr, b_params.ptr, b_current_timestamp)); GC.KeepAlive(a); GC.KeepAlive(b_fee_est); GC.KeepAlive(b_chain_monitor); diff --git a/c_sharp/src/org/ldk/structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.cs b/c_sharp/src/org/ldk/structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.cs index 822a90b9..33876e00 100644 --- a/c_sharp/src/org/ldk/structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.cs +++ b/c_sharp/src/org/ldk/structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.cs @@ -61,7 +61,7 @@ public class TwoTuple_ThirtyTwoBytesChannelMonitorZ : CommonBase { * Creates a new C2Tuple_ThirtyTwoBytesChannelMonitorZ from the contained elements. */ public static TwoTuple_ThirtyTwoBytesChannelMonitorZ of(byte[] a, org.ldk.structs.ChannelMonitor b) { - long ret = bindings.C2Tuple_ThirtyTwoBytesChannelMonitorZ_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(a, 32)), b == null ? 0 : b.ptr); + long ret = bindings.C2Tuple_ThirtyTwoBytesChannelMonitorZ_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(a, 32)), b.ptr); GC.KeepAlive(a); GC.KeepAlive(b); if (ret >= 0 && ret <= 4096) { return null; } diff --git a/c_sharp/src/org/ldk/structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.cs b/c_sharp/src/org/ldk/structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.cs deleted file mode 100644 index b7874e4a..00000000 --- a/c_sharp/src/org/ldk/structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.cs +++ /dev/null @@ -1,73 +0,0 @@ -using org.ldk.impl; -using org.ldk.enums; -using org.ldk.util; -using System; - -namespace org { namespace ldk { namespace structs { - - -/** - * A Tuple - */ -public class TwoTuple_ThirtyTwoBytesPublicKeyZ : CommonBase { - internal TwoTuple_ThirtyTwoBytesPublicKeyZ(object _dummy, long ptr) : base(ptr) { } - ~TwoTuple_ThirtyTwoBytesPublicKeyZ() { - if (ptr != 0) { bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_free(ptr); } - } - - /** - * - */ - public byte[] get_a() { - long ret = bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; - } - - /** - * - */ - public byte[] get_b() { - long ret = bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; - } - - internal long clone_ptr() { - long ret = bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(this.ptr); - GC.KeepAlive(this); - return ret; - } - - /** - * Creates a new tuple which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. - */ - public TwoTuple_ThirtyTwoBytesPublicKeyZ clone() { - long ret = bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(this.ptr); - GC.KeepAlive(this); - if (ret >= 0 && ret <= 4096) { return null; } - TwoTuple_ThirtyTwoBytesPublicKeyZ ret_hu_conv = new TwoTuple_ThirtyTwoBytesPublicKeyZ(null, ret); - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; - return ret_hu_conv; - } - - /** - * Creates a new C2Tuple_ThirtyTwoBytesPublicKeyZ from the contained elements. - */ - public static TwoTuple_ThirtyTwoBytesPublicKeyZ of(byte[] a, byte[] b) { - long ret = bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(a, 32)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(b, 33))); - GC.KeepAlive(a); - GC.KeepAlive(b); - if (ret >= 0 && ret <= 4096) { return null; } - TwoTuple_ThirtyTwoBytesPublicKeyZ ret_hu_conv = new TwoTuple_ThirtyTwoBytesPublicKeyZ(null, ret); - if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; - return ret_hu_conv; - } - -} -} } } diff --git a/c_sharp/src/org/ldk/structs/TxAbort.cs b/c_sharp/src/org/ldk/structs/TxAbort.cs index 47f24a72..d40f628e 100644 --- a/c_sharp/src/org/ldk/structs/TxAbort.cs +++ b/c_sharp/src/org/ldk/structs/TxAbort.cs @@ -18,21 +18,23 @@ public class TxAbort : CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { + public ChannelId get_channel_id() { long ret = bindings.TxAbort_get_channel_id(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.TxAbort_set_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.TxAbort_set_channel_id(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** @@ -60,13 +62,14 @@ public class TxAbort : CommonBase { /** * Constructs a new TxAbort given each field */ - public static TxAbort of(byte[] channel_id_arg, byte[] data_arg) { - long ret = bindings.TxAbort_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id_arg, 32)), InternalUtils.encodeUint8Array(data_arg)); + public static TxAbort of(org.ldk.structs.ChannelId channel_id_arg, byte[] data_arg) { + long ret = bindings.TxAbort_new(channel_id_arg.ptr, InternalUtils.encodeUint8Array(data_arg)); GC.KeepAlive(channel_id_arg); GC.KeepAlive(data_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.TxAbort ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxAbort(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id_arg); }; return ret_hu_conv; } @@ -106,7 +109,7 @@ public class TxAbort : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.TxAbort b) { - bool ret = bindings.TxAbort_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.TxAbort_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/TxAckRbf.cs b/c_sharp/src/org/ldk/structs/TxAckRbf.cs index 43dec5a5..52362a53 100644 --- a/c_sharp/src/org/ldk/structs/TxAckRbf.cs +++ b/c_sharp/src/org/ldk/structs/TxAckRbf.cs @@ -19,21 +19,23 @@ public class TxAckRbf : CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { + public ChannelId get_channel_id() { long ret = bindings.TxAckRbf_get_channel_id(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.TxAckRbf_set_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.TxAckRbf_set_channel_id(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** @@ -63,13 +65,14 @@ public class TxAckRbf : CommonBase { /** * Constructs a new TxAckRbf given each field */ - public static TxAckRbf of(byte[] channel_id_arg, org.ldk.structs.Option_i64Z funding_output_contribution_arg) { - long ret = bindings.TxAckRbf_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id_arg, 32)), funding_output_contribution_arg.ptr); + public static TxAckRbf of(org.ldk.structs.ChannelId channel_id_arg, org.ldk.structs.Option_i64Z funding_output_contribution_arg) { + long ret = bindings.TxAckRbf_new(channel_id_arg.ptr, funding_output_contribution_arg.ptr); GC.KeepAlive(channel_id_arg); GC.KeepAlive(funding_output_contribution_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.TxAckRbf ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxAckRbf(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id_arg); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(funding_output_contribution_arg); }; return ret_hu_conv; } @@ -110,7 +113,7 @@ public class TxAckRbf : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.TxAckRbf b) { - bool ret = bindings.TxAckRbf_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.TxAckRbf_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/TxAddInput.cs b/c_sharp/src/org/ldk/structs/TxAddInput.cs index 338a04a7..2893c182 100644 --- a/c_sharp/src/org/ldk/structs/TxAddInput.cs +++ b/c_sharp/src/org/ldk/structs/TxAddInput.cs @@ -18,21 +18,23 @@ public class TxAddInput : CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { + public ChannelId get_channel_id() { long ret = bindings.TxAddInput_get_channel_id(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.TxAddInput_set_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.TxAddInput_set_channel_id(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** @@ -73,7 +75,7 @@ public class TxAddInput : CommonBase { * malleable. */ public void set_prevtx(org.ldk.structs.TransactionU16LenLimited val) { - bindings.TxAddInput_set_prevtx(this.ptr, val == null ? 0 : val.ptr); + bindings.TxAddInput_set_prevtx(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -118,8 +120,8 @@ public class TxAddInput : CommonBase { /** * Constructs a new TxAddInput given each field */ - public static TxAddInput of(byte[] channel_id_arg, long serial_id_arg, org.ldk.structs.TransactionU16LenLimited prevtx_arg, int prevtx_out_arg, int sequence_arg) { - long ret = bindings.TxAddInput_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id_arg, 32)), serial_id_arg, prevtx_arg == null ? 0 : prevtx_arg.ptr, prevtx_out_arg, sequence_arg); + public static TxAddInput of(org.ldk.structs.ChannelId channel_id_arg, long serial_id_arg, org.ldk.structs.TransactionU16LenLimited prevtx_arg, int prevtx_out_arg, int sequence_arg) { + long ret = bindings.TxAddInput_new(channel_id_arg.ptr, serial_id_arg, prevtx_arg.ptr, prevtx_out_arg, sequence_arg); GC.KeepAlive(channel_id_arg); GC.KeepAlive(serial_id_arg); GC.KeepAlive(prevtx_arg); @@ -128,6 +130,7 @@ public class TxAddInput : CommonBase { if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.TxAddInput ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxAddInput(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id_arg); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(prevtx_arg); }; return ret_hu_conv; } @@ -168,7 +171,7 @@ public class TxAddInput : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.TxAddInput b) { - bool ret = bindings.TxAddInput_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.TxAddInput_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/TxAddOutput.cs b/c_sharp/src/org/ldk/structs/TxAddOutput.cs index 01d0d947..1b1fffe2 100644 --- a/c_sharp/src/org/ldk/structs/TxAddOutput.cs +++ b/c_sharp/src/org/ldk/structs/TxAddOutput.cs @@ -18,21 +18,23 @@ public class TxAddOutput : CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { + public ChannelId get_channel_id() { long ret = bindings.TxAddOutput_get_channel_id(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.TxAddOutput_set_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.TxAddOutput_set_channel_id(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** @@ -96,8 +98,8 @@ public class TxAddOutput : CommonBase { /** * Constructs a new TxAddOutput given each field */ - public static TxAddOutput of(byte[] channel_id_arg, long serial_id_arg, long sats_arg, byte[] script_arg) { - long ret = bindings.TxAddOutput_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id_arg, 32)), serial_id_arg, sats_arg, InternalUtils.encodeUint8Array(script_arg)); + public static TxAddOutput of(org.ldk.structs.ChannelId channel_id_arg, long serial_id_arg, long sats_arg, byte[] script_arg) { + long ret = bindings.TxAddOutput_new(channel_id_arg.ptr, serial_id_arg, sats_arg, InternalUtils.encodeUint8Array(script_arg)); GC.KeepAlive(channel_id_arg); GC.KeepAlive(serial_id_arg); GC.KeepAlive(sats_arg); @@ -105,6 +107,7 @@ public class TxAddOutput : CommonBase { if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.TxAddOutput ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxAddOutput(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id_arg); }; return ret_hu_conv; } @@ -144,7 +147,7 @@ public class TxAddOutput : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.TxAddOutput b) { - bool ret = bindings.TxAddOutput_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.TxAddOutput_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/TxComplete.cs b/c_sharp/src/org/ldk/structs/TxComplete.cs index 783ef555..906528fa 100644 --- a/c_sharp/src/org/ldk/structs/TxComplete.cs +++ b/c_sharp/src/org/ldk/structs/TxComplete.cs @@ -19,32 +19,35 @@ public class TxComplete : CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { + public ChannelId get_channel_id() { long ret = bindings.TxComplete_get_channel_id(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.TxComplete_set_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.TxComplete_set_channel_id(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** * Constructs a new TxComplete given each field */ - public static TxComplete of(byte[] channel_id_arg) { - long ret = bindings.TxComplete_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id_arg, 32))); + public static TxComplete of(org.ldk.structs.ChannelId channel_id_arg) { + long ret = bindings.TxComplete_new(channel_id_arg.ptr); GC.KeepAlive(channel_id_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.TxComplete ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxComplete(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id_arg); }; return ret_hu_conv; } @@ -84,7 +87,7 @@ public class TxComplete : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.TxComplete b) { - bool ret = bindings.TxComplete_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.TxComplete_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/TxCreationKeys.cs b/c_sharp/src/org/ldk/structs/TxCreationKeys.cs index 58b6f6ab..4be4a177 100644 --- a/c_sharp/src/org/ldk/structs/TxCreationKeys.cs +++ b/c_sharp/src/org/ldk/structs/TxCreationKeys.cs @@ -65,7 +65,7 @@ public class TxCreationKeys : CommonBase { * an old state. */ public void set_revocation_key(org.ldk.structs.RevocationKey val) { - bindings.TxCreationKeys_set_revocation_key(this.ptr, val == null ? 0 : val.ptr); + bindings.TxCreationKeys_set_revocation_key(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -87,7 +87,7 @@ public class TxCreationKeys : CommonBase { * Broadcaster's HTLC Key */ public void set_broadcaster_htlc_key(org.ldk.structs.HtlcKey val) { - bindings.TxCreationKeys_set_broadcaster_htlc_key(this.ptr, val == null ? 0 : val.ptr); + bindings.TxCreationKeys_set_broadcaster_htlc_key(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -109,7 +109,7 @@ public class TxCreationKeys : CommonBase { * Countersignatory's HTLC Key */ public void set_countersignatory_htlc_key(org.ldk.structs.HtlcKey val) { - bindings.TxCreationKeys_set_countersignatory_htlc_key(this.ptr, val == null ? 0 : val.ptr); + bindings.TxCreationKeys_set_countersignatory_htlc_key(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -131,7 +131,7 @@ public class TxCreationKeys : CommonBase { * Broadcaster's Payment Key (which isn't allowed to be spent from for some delay) */ public void set_broadcaster_delayed_payment_key(org.ldk.structs.DelayedPaymentKey val) { - bindings.TxCreationKeys_set_broadcaster_delayed_payment_key(this.ptr, val == null ? 0 : val.ptr); + bindings.TxCreationKeys_set_broadcaster_delayed_payment_key(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -141,7 +141,7 @@ public class TxCreationKeys : CommonBase { * Constructs a new TxCreationKeys given each field */ public static TxCreationKeys of(byte[] per_commitment_point_arg, org.ldk.structs.RevocationKey revocation_key_arg, org.ldk.structs.HtlcKey broadcaster_htlc_key_arg, org.ldk.structs.HtlcKey countersignatory_htlc_key_arg, org.ldk.structs.DelayedPaymentKey broadcaster_delayed_payment_key_arg) { - long ret = bindings.TxCreationKeys_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(per_commitment_point_arg, 33)), revocation_key_arg == null ? 0 : revocation_key_arg.ptr, broadcaster_htlc_key_arg == null ? 0 : broadcaster_htlc_key_arg.ptr, countersignatory_htlc_key_arg == null ? 0 : countersignatory_htlc_key_arg.ptr, broadcaster_delayed_payment_key_arg == null ? 0 : broadcaster_delayed_payment_key_arg.ptr); + long ret = bindings.TxCreationKeys_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(per_commitment_point_arg, 33)), revocation_key_arg.ptr, broadcaster_htlc_key_arg.ptr, countersignatory_htlc_key_arg.ptr, broadcaster_delayed_payment_key_arg.ptr); GC.KeepAlive(per_commitment_point_arg); GC.KeepAlive(revocation_key_arg); GC.KeepAlive(broadcaster_htlc_key_arg); @@ -163,7 +163,7 @@ public class TxCreationKeys : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.TxCreationKeys b) { - bool ret = bindings.TxCreationKeys_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.TxCreationKeys_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; @@ -219,7 +219,7 @@ public class TxCreationKeys : CommonBase { * Key set is asymmetric and can't be used as part of counter-signatory set of transactions. */ public static TxCreationKeys derive_new(byte[] per_commitment_point, org.ldk.structs.DelayedPaymentBasepoint broadcaster_delayed_payment_base, org.ldk.structs.HtlcBasepoint broadcaster_htlc_base, org.ldk.structs.RevocationBasepoint countersignatory_revocation_base, org.ldk.structs.HtlcBasepoint countersignatory_htlc_base) { - long ret = bindings.TxCreationKeys_derive_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(per_commitment_point, 33)), broadcaster_delayed_payment_base == null ? 0 : broadcaster_delayed_payment_base.ptr, broadcaster_htlc_base == null ? 0 : broadcaster_htlc_base.ptr, countersignatory_revocation_base == null ? 0 : countersignatory_revocation_base.ptr, countersignatory_htlc_base == null ? 0 : countersignatory_htlc_base.ptr); + long ret = bindings.TxCreationKeys_derive_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(per_commitment_point, 33)), broadcaster_delayed_payment_base.ptr, broadcaster_htlc_base.ptr, countersignatory_revocation_base.ptr, countersignatory_htlc_base.ptr); GC.KeepAlive(per_commitment_point); GC.KeepAlive(broadcaster_delayed_payment_base); GC.KeepAlive(broadcaster_htlc_base); @@ -240,7 +240,7 @@ public class TxCreationKeys : CommonBase { * Key set is asymmetric and can't be used as part of counter-signatory set of transactions. */ public static TxCreationKeys from_channel_static_keys(byte[] per_commitment_point, org.ldk.structs.ChannelPublicKeys broadcaster_keys, org.ldk.structs.ChannelPublicKeys countersignatory_keys) { - long ret = bindings.TxCreationKeys_from_channel_static_keys(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(per_commitment_point, 33)), broadcaster_keys == null ? 0 : broadcaster_keys.ptr, countersignatory_keys == null ? 0 : countersignatory_keys.ptr); + long ret = bindings.TxCreationKeys_from_channel_static_keys(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(per_commitment_point, 33)), broadcaster_keys.ptr, countersignatory_keys.ptr); GC.KeepAlive(per_commitment_point); GC.KeepAlive(broadcaster_keys); GC.KeepAlive(countersignatory_keys); diff --git a/c_sharp/src/org/ldk/structs/TxInitRbf.cs b/c_sharp/src/org/ldk/structs/TxInitRbf.cs index 7e930f3e..f071512f 100644 --- a/c_sharp/src/org/ldk/structs/TxInitRbf.cs +++ b/c_sharp/src/org/ldk/structs/TxInitRbf.cs @@ -19,21 +19,23 @@ public class TxInitRbf : CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { + public ChannelId get_channel_id() { long ret = bindings.TxInitRbf_get_channel_id(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.TxInitRbf_set_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.TxInitRbf_set_channel_id(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** @@ -99,8 +101,8 @@ public class TxInitRbf : CommonBase { /** * Constructs a new TxInitRbf given each field */ - public static TxInitRbf of(byte[] channel_id_arg, int locktime_arg, int feerate_sat_per_1000_weight_arg, org.ldk.structs.Option_i64Z funding_output_contribution_arg) { - long ret = bindings.TxInitRbf_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id_arg, 32)), locktime_arg, feerate_sat_per_1000_weight_arg, funding_output_contribution_arg.ptr); + public static TxInitRbf of(org.ldk.structs.ChannelId channel_id_arg, int locktime_arg, int feerate_sat_per_1000_weight_arg, org.ldk.structs.Option_i64Z funding_output_contribution_arg) { + long ret = bindings.TxInitRbf_new(channel_id_arg.ptr, locktime_arg, feerate_sat_per_1000_weight_arg, funding_output_contribution_arg.ptr); GC.KeepAlive(channel_id_arg); GC.KeepAlive(locktime_arg); GC.KeepAlive(feerate_sat_per_1000_weight_arg); @@ -108,6 +110,7 @@ public class TxInitRbf : CommonBase { if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.TxInitRbf ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxInitRbf(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id_arg); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(funding_output_contribution_arg); }; return ret_hu_conv; } @@ -148,7 +151,7 @@ public class TxInitRbf : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.TxInitRbf b) { - bool ret = bindings.TxInitRbf_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.TxInitRbf_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/TxRemoveInput.cs b/c_sharp/src/org/ldk/structs/TxRemoveInput.cs index 18d4b550..3a83aa73 100644 --- a/c_sharp/src/org/ldk/structs/TxRemoveInput.cs +++ b/c_sharp/src/org/ldk/structs/TxRemoveInput.cs @@ -18,21 +18,23 @@ public class TxRemoveInput : CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { + public ChannelId get_channel_id() { long ret = bindings.TxRemoveInput_get_channel_id(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.TxRemoveInput_set_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.TxRemoveInput_set_channel_id(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** @@ -56,13 +58,14 @@ public class TxRemoveInput : CommonBase { /** * Constructs a new TxRemoveInput given each field */ - public static TxRemoveInput of(byte[] channel_id_arg, long serial_id_arg) { - long ret = bindings.TxRemoveInput_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id_arg, 32)), serial_id_arg); + public static TxRemoveInput of(org.ldk.structs.ChannelId channel_id_arg, long serial_id_arg) { + long ret = bindings.TxRemoveInput_new(channel_id_arg.ptr, serial_id_arg); GC.KeepAlive(channel_id_arg); GC.KeepAlive(serial_id_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.TxRemoveInput ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxRemoveInput(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id_arg); }; return ret_hu_conv; } @@ -102,7 +105,7 @@ public class TxRemoveInput : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.TxRemoveInput b) { - bool ret = bindings.TxRemoveInput_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.TxRemoveInput_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/TxRemoveOutput.cs b/c_sharp/src/org/ldk/structs/TxRemoveOutput.cs index b5d15bf6..3779df9a 100644 --- a/c_sharp/src/org/ldk/structs/TxRemoveOutput.cs +++ b/c_sharp/src/org/ldk/structs/TxRemoveOutput.cs @@ -18,21 +18,23 @@ public class TxRemoveOutput : CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { + public ChannelId get_channel_id() { long ret = bindings.TxRemoveOutput_get_channel_id(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.TxRemoveOutput_set_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.TxRemoveOutput_set_channel_id(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** @@ -56,13 +58,14 @@ public class TxRemoveOutput : CommonBase { /** * Constructs a new TxRemoveOutput given each field */ - public static TxRemoveOutput of(byte[] channel_id_arg, long serial_id_arg) { - long ret = bindings.TxRemoveOutput_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id_arg, 32)), serial_id_arg); + public static TxRemoveOutput of(org.ldk.structs.ChannelId channel_id_arg, long serial_id_arg) { + long ret = bindings.TxRemoveOutput_new(channel_id_arg.ptr, serial_id_arg); GC.KeepAlive(channel_id_arg); GC.KeepAlive(serial_id_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.TxRemoveOutput ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxRemoveOutput(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id_arg); }; return ret_hu_conv; } @@ -102,7 +105,7 @@ public class TxRemoveOutput : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.TxRemoveOutput b) { - bool ret = bindings.TxRemoveOutput_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.TxRemoveOutput_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/TxSignatures.cs b/c_sharp/src/org/ldk/structs/TxSignatures.cs index 43a52410..6de18a09 100644 --- a/c_sharp/src/org/ldk/structs/TxSignatures.cs +++ b/c_sharp/src/org/ldk/structs/TxSignatures.cs @@ -19,21 +19,23 @@ public class TxSignatures : CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { + public ChannelId get_channel_id() { long ret = bindings.TxSignatures_get_channel_id(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.TxSignatures_set_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.TxSignatures_set_channel_id(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** @@ -85,17 +87,42 @@ public class TxSignatures : CommonBase { GC.KeepAlive(val); } + /** + * Optional signature for the shared input -- the previous funding outpoint -- signed by both peers + */ + public Option_ECDSASignatureZ get_funding_outpoint_sig() { + long ret = bindings.TxSignatures_get_funding_outpoint_sig(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_ECDSASignatureZ ret_hu_conv = org.ldk.structs.Option_ECDSASignatureZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Optional signature for the shared input -- the previous funding outpoint -- signed by both peers + */ + public void set_funding_outpoint_sig(org.ldk.structs.Option_ECDSASignatureZ val) { + bindings.TxSignatures_set_funding_outpoint_sig(this.ptr, val.ptr); + GC.KeepAlive(this); + GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; + } + /** * Constructs a new TxSignatures given each field */ - public static TxSignatures of(byte[] channel_id_arg, byte[] tx_hash_arg, byte[][] witnesses_arg) { - long ret = bindings.TxSignatures_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id_arg, 32)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(tx_hash_arg, 32)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(witnesses_arg, witnesses_arg_conv_8 => InternalUtils.encodeUint8Array(witnesses_arg_conv_8)))); + public static TxSignatures of(org.ldk.structs.ChannelId channel_id_arg, byte[] tx_hash_arg, byte[][] witnesses_arg, org.ldk.structs.Option_ECDSASignatureZ funding_outpoint_sig_arg) { + long ret = bindings.TxSignatures_new(channel_id_arg.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(tx_hash_arg, 32)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(witnesses_arg, witnesses_arg_conv_8 => InternalUtils.encodeUint8Array(witnesses_arg_conv_8))), funding_outpoint_sig_arg.ptr); GC.KeepAlive(channel_id_arg); GC.KeepAlive(tx_hash_arg); GC.KeepAlive(witnesses_arg); + GC.KeepAlive(funding_outpoint_sig_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.TxSignatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxSignatures(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(funding_outpoint_sig_arg); }; return ret_hu_conv; } @@ -135,7 +162,7 @@ public class TxSignatures : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.TxSignatures b) { - bool ret = bindings.TxSignatures_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.TxSignatures_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/UnknownPaymentContext.cs b/c_sharp/src/org/ldk/structs/UnknownPaymentContext.cs new file mode 100644 index 00000000..34ee30fc --- /dev/null +++ b/c_sharp/src/org/ldk/structs/UnknownPaymentContext.cs @@ -0,0 +1,76 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + + +/** + * An unknown payment context. + */ +public class UnknownPaymentContext : CommonBase { + internal UnknownPaymentContext(object _dummy, long ptr) : base(ptr) { } + ~UnknownPaymentContext() { + if (ptr != 0) { bindings.UnknownPaymentContext_free(ptr); } + } + + internal long clone_ptr() { + long ret = bindings.UnknownPaymentContext_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a copy of the UnknownPaymentContext + */ + public UnknownPaymentContext clone() { + long ret = bindings.UnknownPaymentContext_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.UnknownPaymentContext ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UnknownPaymentContext(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Checks if two UnknownPaymentContexts contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ + public bool eq(org.ldk.structs.UnknownPaymentContext b) { + bool ret = bindings.UnknownPaymentContext_eq(this.ptr, b.ptr); + GC.KeepAlive(this); + GC.KeepAlive(b); + if (this != null) { this.ptrs_to.AddLast(b); }; + return ret; + } + + public override bool Equals(object o) { + if (!(o is UnknownPaymentContext)) return false; + return this.eq((UnknownPaymentContext)o); + } + /** + * Serialize the UnknownPaymentContext object into a byte array which can be read by UnknownPaymentContext_read + */ + public byte[] write() { + long ret = bindings.UnknownPaymentContext_write(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Read a UnknownPaymentContext from a byte array, created by UnknownPaymentContext_write + */ + public static Result_UnknownPaymentContextDecodeErrorZ read(byte[] ser) { + long ret = bindings.UnknownPaymentContext_read(InternalUtils.encodeUint8Array(ser)); + GC.KeepAlive(ser); + if (ret >= 0 && ret <= 4096) { return null; } + Result_UnknownPaymentContextDecodeErrorZ ret_hu_conv = Result_UnknownPaymentContextDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +} +} } } diff --git a/c_sharp/src/org/ldk/structs/UnsignedBolt12Invoice.cs b/c_sharp/src/org/ldk/structs/UnsignedBolt12Invoice.cs index 7e653a62..0b81898f 100644 --- a/c_sharp/src/org/ldk/structs/UnsignedBolt12Invoice.cs +++ b/c_sharp/src/org/ldk/structs/UnsignedBolt12Invoice.cs @@ -20,6 +20,24 @@ public class UnsignedBolt12Invoice : CommonBase { if (ptr != 0) { bindings.UnsignedBolt12Invoice_free(ptr); } } + internal long clone_ptr() { + long ret = bindings.UnsignedBolt12Invoice_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a copy of the UnsignedBolt12Invoice + */ + public UnsignedBolt12Invoice clone() { + long ret = bindings.UnsignedBolt12Invoice_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.UnsignedBolt12Invoice ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UnsignedBolt12Invoice(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + /** * Returns the [`TaggedHash`] of the invoice to sign. */ @@ -91,14 +109,12 @@ public class UnsignedBolt12Invoice : CommonBase { * * [`Offer`]: crate::offers::offer::Offer * [`Offer::amount`]: crate::offers::offer::Offer::amount - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public Amount amount() { + public Option_AmountZ amount() { long ret = bindings.UnsignedBolt12Invoice_amount(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Amount ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Amount(null, ret); } + org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; return ret_hu_conv; } @@ -129,6 +145,8 @@ public class UnsignedBolt12Invoice : CommonBase { * From [`Offer::description`] or [`Refund::description`]. * * [`Offer::description`]: crate::offers::offer::Offer::description + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ public PrintableString description() { long ret = bindings.UnsignedBolt12Invoice_description(this.ptr); @@ -203,14 +221,12 @@ public class UnsignedBolt12Invoice : CommonBase { * [`Refund`]. * * [`Offer::supported_quantity`]: crate::offers::offer::Offer::supported_quantity - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public Quantity supported_quantity() { + public Option_QuantityZ supported_quantity() { long ret = bindings.UnsignedBolt12Invoice_supported_quantity(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Quantity ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Quantity(null, ret); } + org.ldk.structs.Option_QuantityZ ret_hu_conv = org.ldk.structs.Option_QuantityZ.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; return ret_hu_conv; } diff --git a/c_sharp/src/org/ldk/structs/UnsignedChannelAnnouncement.cs b/c_sharp/src/org/ldk/structs/UnsignedChannelAnnouncement.cs index 98303e3b..d1d55119 100644 --- a/c_sharp/src/org/ldk/structs/UnsignedChannelAnnouncement.cs +++ b/c_sharp/src/org/ldk/structs/UnsignedChannelAnnouncement.cs @@ -33,7 +33,7 @@ public class UnsignedChannelAnnouncement : CommonBase { * The advertised channel features */ public void set_features(org.ldk.structs.ChannelFeatures val) { - bindings.UnsignedChannelAnnouncement_set_features(this.ptr, val == null ? 0 : val.ptr); + bindings.UnsignedChannelAnnouncement_set_features(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -93,7 +93,7 @@ public class UnsignedChannelAnnouncement : CommonBase { * One of the two `node_id`s which are endpoints of this channel */ public void set_node_id_1(org.ldk.structs.NodeId val) { - bindings.UnsignedChannelAnnouncement_set_node_id_1(this.ptr, val == null ? 0 : val.ptr); + bindings.UnsignedChannelAnnouncement_set_node_id_1(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -115,7 +115,7 @@ public class UnsignedChannelAnnouncement : CommonBase { * The other of the two `node_id`s which are endpoints of this channel */ public void set_node_id_2(org.ldk.structs.NodeId val) { - bindings.UnsignedChannelAnnouncement_set_node_id_2(this.ptr, val == null ? 0 : val.ptr); + bindings.UnsignedChannelAnnouncement_set_node_id_2(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -137,7 +137,7 @@ public class UnsignedChannelAnnouncement : CommonBase { * The funding key for the first node */ public void set_bitcoin_key_1(org.ldk.structs.NodeId val) { - bindings.UnsignedChannelAnnouncement_set_bitcoin_key_1(this.ptr, val == null ? 0 : val.ptr); + bindings.UnsignedChannelAnnouncement_set_bitcoin_key_1(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -159,7 +159,7 @@ public class UnsignedChannelAnnouncement : CommonBase { * The funding key for the second node */ public void set_bitcoin_key_2(org.ldk.structs.NodeId val) { - bindings.UnsignedChannelAnnouncement_set_bitcoin_key_2(this.ptr, val == null ? 0 : val.ptr); + bindings.UnsignedChannelAnnouncement_set_bitcoin_key_2(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -197,7 +197,7 @@ public class UnsignedChannelAnnouncement : CommonBase { * Constructs a new UnsignedChannelAnnouncement given each field */ public static UnsignedChannelAnnouncement of(org.ldk.structs.ChannelFeatures features_arg, byte[] chain_hash_arg, long short_channel_id_arg, org.ldk.structs.NodeId node_id_1_arg, org.ldk.structs.NodeId node_id_2_arg, org.ldk.structs.NodeId bitcoin_key_1_arg, org.ldk.structs.NodeId bitcoin_key_2_arg, byte[] excess_data_arg) { - long ret = bindings.UnsignedChannelAnnouncement_new(features_arg == null ? 0 : features_arg.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(chain_hash_arg, 32)), short_channel_id_arg, node_id_1_arg == null ? 0 : node_id_1_arg.ptr, node_id_2_arg == null ? 0 : node_id_2_arg.ptr, bitcoin_key_1_arg == null ? 0 : bitcoin_key_1_arg.ptr, bitcoin_key_2_arg == null ? 0 : bitcoin_key_2_arg.ptr, InternalUtils.encodeUint8Array(excess_data_arg)); + long ret = bindings.UnsignedChannelAnnouncement_new(features_arg.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(chain_hash_arg, 32)), short_channel_id_arg, node_id_1_arg.ptr, node_id_2_arg.ptr, bitcoin_key_1_arg.ptr, bitcoin_key_2_arg.ptr, InternalUtils.encodeUint8Array(excess_data_arg)); GC.KeepAlive(features_arg); GC.KeepAlive(chain_hash_arg); GC.KeepAlive(short_channel_id_arg); @@ -253,7 +253,7 @@ public class UnsignedChannelAnnouncement : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.UnsignedChannelAnnouncement b) { - bool ret = bindings.UnsignedChannelAnnouncement_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.UnsignedChannelAnnouncement_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/UnsignedChannelUpdate.cs b/c_sharp/src/org/ldk/structs/UnsignedChannelUpdate.cs index 48dd7bd2..5601f3c9 100644 --- a/c_sharp/src/org/ldk/structs/UnsignedChannelUpdate.cs +++ b/c_sharp/src/org/ldk/structs/UnsignedChannelUpdate.cs @@ -284,7 +284,7 @@ public class UnsignedChannelUpdate : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.UnsignedChannelUpdate b) { - bool ret = bindings.UnsignedChannelUpdate_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.UnsignedChannelUpdate_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/UnsignedGossipMessage.cs b/c_sharp/src/org/ldk/structs/UnsignedGossipMessage.cs index ff59a12d..fee4ac0f 100644 --- a/c_sharp/src/org/ldk/structs/UnsignedGossipMessage.cs +++ b/c_sharp/src/org/ldk/structs/UnsignedGossipMessage.cs @@ -77,7 +77,7 @@ public class UnsignedGossipMessage : CommonBase { * Utility method to constructs a new ChannelAnnouncement-variant UnsignedGossipMessage */ public static UnsignedGossipMessage channel_announcement(org.ldk.structs.UnsignedChannelAnnouncement a) { - long ret = bindings.UnsignedGossipMessage_channel_announcement(a == null ? 0 : a.ptr); + long ret = bindings.UnsignedGossipMessage_channel_announcement(a.ptr); GC.KeepAlive(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.UnsignedGossipMessage ret_hu_conv = org.ldk.structs.UnsignedGossipMessage.constr_from_ptr(ret); @@ -90,7 +90,7 @@ public class UnsignedGossipMessage : CommonBase { * Utility method to constructs a new ChannelUpdate-variant UnsignedGossipMessage */ public static UnsignedGossipMessage channel_update(org.ldk.structs.UnsignedChannelUpdate a) { - long ret = bindings.UnsignedGossipMessage_channel_update(a == null ? 0 : a.ptr); + long ret = bindings.UnsignedGossipMessage_channel_update(a.ptr); GC.KeepAlive(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.UnsignedGossipMessage ret_hu_conv = org.ldk.structs.UnsignedGossipMessage.constr_from_ptr(ret); @@ -103,7 +103,7 @@ public class UnsignedGossipMessage : CommonBase { * Utility method to constructs a new NodeAnnouncement-variant UnsignedGossipMessage */ public static UnsignedGossipMessage node_announcement(org.ldk.structs.UnsignedNodeAnnouncement a) { - long ret = bindings.UnsignedGossipMessage_node_announcement(a == null ? 0 : a.ptr); + long ret = bindings.UnsignedGossipMessage_node_announcement(a.ptr); GC.KeepAlive(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.UnsignedGossipMessage ret_hu_conv = org.ldk.structs.UnsignedGossipMessage.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/UnsignedInvoiceRequest.cs b/c_sharp/src/org/ldk/structs/UnsignedInvoiceRequest.cs index 1c33d54d..8a3dd22a 100644 --- a/c_sharp/src/org/ldk/structs/UnsignedInvoiceRequest.cs +++ b/c_sharp/src/org/ldk/structs/UnsignedInvoiceRequest.cs @@ -20,6 +20,24 @@ public class UnsignedInvoiceRequest : CommonBase { if (ptr != 0) { bindings.UnsignedInvoiceRequest_free(ptr); } } + internal long clone_ptr() { + long ret = bindings.UnsignedInvoiceRequest_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a copy of the UnsignedInvoiceRequest + */ + public UnsignedInvoiceRequest clone() { + long ret = bindings.UnsignedInvoiceRequest_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.UnsignedInvoiceRequest ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UnsignedInvoiceRequest(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + /** * Returns the [`TaggedHash`] of the invoice to sign. */ @@ -67,14 +85,12 @@ public class UnsignedInvoiceRequest : CommonBase { /** * The minimum amount required for a successful payment of a single item. - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public Amount amount() { + public Option_AmountZ amount() { long ret = bindings.UnsignedInvoiceRequest_amount(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Amount ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Amount(null, ret); } + org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; return ret_hu_conv; } @@ -82,6 +98,8 @@ public class UnsignedInvoiceRequest : CommonBase { /** * A complete description of the purpose of the payment. Intended to be displayed to the user * but with the caveat that it has not been verified in any way. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ public PrintableString description() { long ret = bindings.UnsignedInvoiceRequest_description(this.ptr); @@ -160,13 +178,15 @@ public class UnsignedInvoiceRequest : CommonBase { long ret = bindings.UnsignedInvoiceRequest_supported_quantity(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Quantity ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Quantity(null, ret); } + org.ldk.structs.Quantity ret_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; return ret_hu_conv; } /** * The public key used by the recipient to sign invoices. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ public byte[] signing_pubkey() { long ret = bindings.UnsignedInvoiceRequest_signing_pubkey(this.ptr); diff --git a/c_sharp/src/org/ldk/structs/UnsignedNodeAnnouncement.cs b/c_sharp/src/org/ldk/structs/UnsignedNodeAnnouncement.cs index c2ed14b3..402811f5 100644 --- a/c_sharp/src/org/ldk/structs/UnsignedNodeAnnouncement.cs +++ b/c_sharp/src/org/ldk/structs/UnsignedNodeAnnouncement.cs @@ -33,7 +33,7 @@ public class UnsignedNodeAnnouncement : CommonBase { * The advertised features */ public void set_features(org.ldk.structs.NodeFeatures val) { - bindings.UnsignedNodeAnnouncement_set_features(this.ptr, val == null ? 0 : val.ptr); + bindings.UnsignedNodeAnnouncement_set_features(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -75,7 +75,7 @@ public class UnsignedNodeAnnouncement : CommonBase { * to this node). */ public void set_node_id(org.ldk.structs.NodeId val) { - bindings.UnsignedNodeAnnouncement_set_node_id(this.ptr, val == null ? 0 : val.ptr); + bindings.UnsignedNodeAnnouncement_set_node_id(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -121,7 +121,7 @@ public class UnsignedNodeAnnouncement : CommonBase { * This should be sanitized before use. There is no guarantee of uniqueness. */ public void set_alias(org.ldk.structs.NodeAlias val) { - bindings.UnsignedNodeAnnouncement_set_alias(this.ptr, val == null ? 0 : val.ptr); + bindings.UnsignedNodeAnnouncement_set_alias(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -158,6 +158,85 @@ public class UnsignedNodeAnnouncement : CommonBase { foreach (SocketAddress val_conv_15 in val) { if (this != null) { this.ptrs_to.AddLast(val_conv_15); }; }; } + /** + * Excess address data which was signed as a part of the message which we do not (yet) understand how + * to decode. + * + * This is stored to ensure forward-compatibility as new address types are added to the lightning gossip protocol. + * + * Returns a copy of the field. + */ + public byte[] get_excess_address_data() { + long ret = bindings.UnsignedNodeAnnouncement_get_excess_address_data(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Excess address data which was signed as a part of the message which we do not (yet) understand how + * to decode. + * + * This is stored to ensure forward-compatibility as new address types are added to the lightning gossip protocol. + */ + public void set_excess_address_data(byte[] val) { + bindings.UnsignedNodeAnnouncement_set_excess_address_data(this.ptr, InternalUtils.encodeUint8Array(val)); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * Excess data which was signed as a part of the message which we do not (yet) understand how + * to decode. + * + * This is stored to ensure forward-compatibility as new fields are added to the lightning gossip protocol. + * + * Returns a copy of the field. + */ + public byte[] get_excess_data() { + long ret = bindings.UnsignedNodeAnnouncement_get_excess_data(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + + /** + * Excess data which was signed as a part of the message which we do not (yet) understand how + * to decode. + * + * This is stored to ensure forward-compatibility as new fields are added to the lightning gossip protocol. + */ + public void set_excess_data(byte[] val) { + bindings.UnsignedNodeAnnouncement_set_excess_data(this.ptr, InternalUtils.encodeUint8Array(val)); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + + /** + * Constructs a new UnsignedNodeAnnouncement given each field + */ + public static UnsignedNodeAnnouncement of(org.ldk.structs.NodeFeatures features_arg, int timestamp_arg, org.ldk.structs.NodeId node_id_arg, byte[] rgb_arg, org.ldk.structs.NodeAlias alias_arg, SocketAddress[] addresses_arg, byte[] excess_address_data_arg, byte[] excess_data_arg) { + long ret = bindings.UnsignedNodeAnnouncement_new(features_arg.ptr, timestamp_arg, node_id_arg.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(rgb_arg, 3)), alias_arg.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(addresses_arg, addresses_arg_conv_15 => addresses_arg_conv_15.ptr)), InternalUtils.encodeUint8Array(excess_address_data_arg), InternalUtils.encodeUint8Array(excess_data_arg)); + GC.KeepAlive(features_arg); + GC.KeepAlive(timestamp_arg); + GC.KeepAlive(node_id_arg); + GC.KeepAlive(rgb_arg); + GC.KeepAlive(alias_arg); + GC.KeepAlive(addresses_arg); + GC.KeepAlive(excess_address_data_arg); + GC.KeepAlive(excess_data_arg); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.UnsignedNodeAnnouncement ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UnsignedNodeAnnouncement(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(features_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(node_id_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(alias_arg); }; + foreach (SocketAddress addresses_arg_conv_15 in addresses_arg) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(addresses_arg_conv_15); }; }; + return ret_hu_conv; + } + internal long clone_ptr() { long ret = bindings.UnsignedNodeAnnouncement_clone_ptr(this.ptr); GC.KeepAlive(this); @@ -194,7 +273,7 @@ public class UnsignedNodeAnnouncement : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.UnsignedNodeAnnouncement b) { - bool ret = bindings.UnsignedNodeAnnouncement_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.UnsignedNodeAnnouncement_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/UntrustedString.cs b/c_sharp/src/org/ldk/structs/UntrustedString.cs index e2d65378..5625f1d9 100644 --- a/c_sharp/src/org/ldk/structs/UntrustedString.cs +++ b/c_sharp/src/org/ldk/structs/UntrustedString.cs @@ -65,7 +65,7 @@ public class UntrustedString : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.UntrustedString b) { - bool ret = bindings.UntrustedString_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.UntrustedString_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/UpdateAddHTLC.cs b/c_sharp/src/org/ldk/structs/UpdateAddHTLC.cs index 343346eb..52acd06f 100644 --- a/c_sharp/src/org/ldk/structs/UpdateAddHTLC.cs +++ b/c_sharp/src/org/ldk/structs/UpdateAddHTLC.cs @@ -20,21 +20,23 @@ public class UpdateAddHTLC : CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { + public ChannelId get_channel_id() { long ret = bindings.UpdateAddHTLC_get_channel_id(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.UpdateAddHTLC_set_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.UpdateAddHTLC_set_channel_id(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** @@ -155,7 +157,7 @@ public class UpdateAddHTLC : CommonBase { * The onion routing packet with encrypted data for the next hop. */ public void set_onion_routing_packet(org.ldk.structs.OnionPacket val) { - bindings.UpdateAddHTLC_set_onion_routing_packet(this.ptr, val == null ? 0 : val.ptr); + bindings.UpdateAddHTLC_set_onion_routing_packet(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -192,8 +194,8 @@ public class UpdateAddHTLC : CommonBase { * * Note that blinding_point_arg (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public static UpdateAddHTLC of(byte[] channel_id_arg, long htlc_id_arg, long amount_msat_arg, byte[] payment_hash_arg, int cltv_expiry_arg, org.ldk.structs.Option_u64Z skimmed_fee_msat_arg, org.ldk.structs.OnionPacket onion_routing_packet_arg, byte[] blinding_point_arg) { - long ret = bindings.UpdateAddHTLC_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id_arg, 32)), htlc_id_arg, amount_msat_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_hash_arg, 32)), cltv_expiry_arg, skimmed_fee_msat_arg.ptr, onion_routing_packet_arg == null ? 0 : onion_routing_packet_arg.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(blinding_point_arg, 33))); + public static UpdateAddHTLC of(org.ldk.structs.ChannelId channel_id_arg, long htlc_id_arg, long amount_msat_arg, byte[] payment_hash_arg, int cltv_expiry_arg, org.ldk.structs.Option_u64Z skimmed_fee_msat_arg, org.ldk.structs.OnionPacket onion_routing_packet_arg, byte[] blinding_point_arg) { + long ret = bindings.UpdateAddHTLC_new(channel_id_arg.ptr, htlc_id_arg, amount_msat_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_hash_arg, 32)), cltv_expiry_arg, skimmed_fee_msat_arg.ptr, onion_routing_packet_arg.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(blinding_point_arg, 33))); GC.KeepAlive(channel_id_arg); GC.KeepAlive(htlc_id_arg); GC.KeepAlive(amount_msat_arg); @@ -205,6 +207,7 @@ public class UpdateAddHTLC : CommonBase { if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.UpdateAddHTLC ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UpdateAddHTLC(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id_arg); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(skimmed_fee_msat_arg); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(onion_routing_packet_arg); }; return ret_hu_conv; @@ -246,7 +249,7 @@ public class UpdateAddHTLC : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.UpdateAddHTLC b) { - bool ret = bindings.UpdateAddHTLC_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.UpdateAddHTLC_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/UpdateFailHTLC.cs b/c_sharp/src/org/ldk/structs/UpdateFailHTLC.cs index e4ba1496..767f3390 100644 --- a/c_sharp/src/org/ldk/structs/UpdateFailHTLC.cs +++ b/c_sharp/src/org/ldk/structs/UpdateFailHTLC.cs @@ -20,21 +20,23 @@ public class UpdateFailHTLC : CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { + public ChannelId get_channel_id() { long ret = bindings.UpdateFailHTLC_get_channel_id(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.UpdateFailHTLC_set_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.UpdateFailHTLC_set_channel_id(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** @@ -91,7 +93,7 @@ public class UpdateFailHTLC : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.UpdateFailHTLC b) { - bool ret = bindings.UpdateFailHTLC_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.UpdateFailHTLC_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/UpdateFailMalformedHTLC.cs b/c_sharp/src/org/ldk/structs/UpdateFailMalformedHTLC.cs index 8d26d464..67f93a4c 100644 --- a/c_sharp/src/org/ldk/structs/UpdateFailMalformedHTLC.cs +++ b/c_sharp/src/org/ldk/structs/UpdateFailMalformedHTLC.cs @@ -20,21 +20,23 @@ public class UpdateFailMalformedHTLC : CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { + public ChannelId get_channel_id() { long ret = bindings.UpdateFailMalformedHTLC_get_channel_id(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.UpdateFailMalformedHTLC_set_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.UpdateFailMalformedHTLC_set_channel_id(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** @@ -109,7 +111,7 @@ public class UpdateFailMalformedHTLC : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.UpdateFailMalformedHTLC b) { - bool ret = bindings.UpdateFailMalformedHTLC_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.UpdateFailMalformedHTLC_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/UpdateFee.cs b/c_sharp/src/org/ldk/structs/UpdateFee.cs index 90b0817a..1d752e1f 100644 --- a/c_sharp/src/org/ldk/structs/UpdateFee.cs +++ b/c_sharp/src/org/ldk/structs/UpdateFee.cs @@ -20,21 +20,23 @@ public class UpdateFee : CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { + public ChannelId get_channel_id() { long ret = bindings.UpdateFee_get_channel_id(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.UpdateFee_set_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.UpdateFee_set_channel_id(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** @@ -58,13 +60,14 @@ public class UpdateFee : CommonBase { /** * Constructs a new UpdateFee given each field */ - public static UpdateFee of(byte[] channel_id_arg, int feerate_per_kw_arg) { - long ret = bindings.UpdateFee_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id_arg, 32)), feerate_per_kw_arg); + public static UpdateFee of(org.ldk.structs.ChannelId channel_id_arg, int feerate_per_kw_arg) { + long ret = bindings.UpdateFee_new(channel_id_arg.ptr, feerate_per_kw_arg); GC.KeepAlive(channel_id_arg); GC.KeepAlive(feerate_per_kw_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.UpdateFee ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UpdateFee(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id_arg); }; return ret_hu_conv; } @@ -104,7 +107,7 @@ public class UpdateFee : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.UpdateFee b) { - bool ret = bindings.UpdateFee_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.UpdateFee_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/UpdateFulfillHTLC.cs b/c_sharp/src/org/ldk/structs/UpdateFulfillHTLC.cs index d7c10a6b..9ca1f566 100644 --- a/c_sharp/src/org/ldk/structs/UpdateFulfillHTLC.cs +++ b/c_sharp/src/org/ldk/structs/UpdateFulfillHTLC.cs @@ -20,21 +20,23 @@ public class UpdateFulfillHTLC : CommonBase { /** * The channel ID */ - public byte[] get_channel_id() { + public ChannelId get_channel_id() { long ret = bindings.UpdateFulfillHTLC_get_channel_id(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** * The channel ID */ - public void set_channel_id(byte[] val) { - bindings.UpdateFulfillHTLC_set_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.UpdateFulfillHTLC_set_channel_id(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** @@ -78,14 +80,15 @@ public class UpdateFulfillHTLC : CommonBase { /** * Constructs a new UpdateFulfillHTLC given each field */ - public static UpdateFulfillHTLC of(byte[] channel_id_arg, long htlc_id_arg, byte[] payment_preimage_arg) { - long ret = bindings.UpdateFulfillHTLC_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id_arg, 32)), htlc_id_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_preimage_arg, 32))); + public static UpdateFulfillHTLC of(org.ldk.structs.ChannelId channel_id_arg, long htlc_id_arg, byte[] payment_preimage_arg) { + long ret = bindings.UpdateFulfillHTLC_new(channel_id_arg.ptr, htlc_id_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_preimage_arg, 32))); GC.KeepAlive(channel_id_arg); GC.KeepAlive(htlc_id_arg); GC.KeepAlive(payment_preimage_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.UpdateFulfillHTLC ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UpdateFulfillHTLC(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id_arg); }; return ret_hu_conv; } @@ -125,7 +128,7 @@ public class UpdateFulfillHTLC : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.UpdateFulfillHTLC b) { - bool ret = bindings.UpdateFulfillHTLC_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.UpdateFulfillHTLC_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/UserConfig.cs b/c_sharp/src/org/ldk/structs/UserConfig.cs index 345d5d35..b64a22e4 100644 --- a/c_sharp/src/org/ldk/structs/UserConfig.cs +++ b/c_sharp/src/org/ldk/structs/UserConfig.cs @@ -34,7 +34,7 @@ public class UserConfig : CommonBase { * Channel handshake config that we propose to our counterparty. */ public void set_channel_handshake_config(org.ldk.structs.ChannelHandshakeConfig val) { - bindings.UserConfig_set_channel_handshake_config(this.ptr, val == null ? 0 : val.ptr); + bindings.UserConfig_set_channel_handshake_config(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -56,7 +56,7 @@ public class UserConfig : CommonBase { * Limits applied to our counterparty's proposed channel handshake config settings. */ public void set_channel_handshake_limits(org.ldk.structs.ChannelHandshakeLimits val) { - bindings.UserConfig_set_channel_handshake_limits(this.ptr, val == null ? 0 : val.ptr); + bindings.UserConfig_set_channel_handshake_limits(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -78,7 +78,7 @@ public class UserConfig : CommonBase { * Channel config which affects behavior during channel lifetime. */ public void set_channel_config(org.ldk.structs.ChannelConfig val) { - bindings.UserConfig_set_channel_config(this.ptr, val == null ? 0 : val.ptr); + bindings.UserConfig_set_channel_config(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -270,7 +270,7 @@ public class UserConfig : CommonBase { * Constructs a new UserConfig given each field */ public static UserConfig of(org.ldk.structs.ChannelHandshakeConfig channel_handshake_config_arg, org.ldk.structs.ChannelHandshakeLimits channel_handshake_limits_arg, org.ldk.structs.ChannelConfig channel_config_arg, bool accept_forwards_to_priv_channels_arg, bool accept_inbound_channels_arg, bool manually_accept_inbound_channels_arg, bool accept_intercept_htlcs_arg, bool accept_mpp_keysend_arg) { - long ret = bindings.UserConfig_new(channel_handshake_config_arg == null ? 0 : channel_handshake_config_arg.ptr, channel_handshake_limits_arg == null ? 0 : channel_handshake_limits_arg.ptr, channel_config_arg == null ? 0 : channel_config_arg.ptr, accept_forwards_to_priv_channels_arg, accept_inbound_channels_arg, manually_accept_inbound_channels_arg, accept_intercept_htlcs_arg, accept_mpp_keysend_arg); + long ret = bindings.UserConfig_new(channel_handshake_config_arg.ptr, channel_handshake_limits_arg.ptr, channel_config_arg.ptr, accept_forwards_to_priv_channels_arg, accept_inbound_channels_arg, manually_accept_inbound_channels_arg, accept_intercept_htlcs_arg, accept_mpp_keysend_arg); GC.KeepAlive(channel_handshake_config_arg); GC.KeepAlive(channel_handshake_limits_arg); GC.KeepAlive(channel_config_arg); diff --git a/c_sharp/src/org/ldk/structs/UtilMethods.cs b/c_sharp/src/org/ldk/structs/UtilMethods.cs index 0ef6dd44..cd6af6e2 100644 --- a/c_sharp/src/org/ldk/structs/UtilMethods.cs +++ b/c_sharp/src/org/ldk/structs/UtilMethods.cs @@ -121,6 +121,72 @@ public class UtilMethods { return ret_hu_conv; } + /** + * Extracts the block height (most significant 3-bytes) from the `short_channel_id` + */ + public static int block_from_scid(long short_channel_id) { + int ret = bindings.block_from_scid(short_channel_id); + GC.KeepAlive(short_channel_id); + return ret; + } + + /** + * Extracts the tx index (bytes [2..4]) from the `short_channel_id` + */ + public static int tx_index_from_scid(long short_channel_id) { + int ret = bindings.tx_index_from_scid(short_channel_id); + GC.KeepAlive(short_channel_id); + return ret; + } + + /** + * Extracts the vout (bytes [0..2]) from the `short_channel_id` + */ + public static short vout_from_scid(long short_channel_id) { + short ret = bindings.vout_from_scid(short_channel_id); + GC.KeepAlive(short_channel_id); + return ret; + } + + /** + * Constructs a `short_channel_id` using the components pieces. Results in an error + * if the block height, tx index, or vout index overflow the maximum sizes. + */ + public static Result_u64ShortChannelIdErrorZ scid_from_parts(long block, long tx_index, long vout_index) { + long ret = bindings.scid_from_parts(block, tx_index, vout_index); + GC.KeepAlive(block); + GC.KeepAlive(tx_index); + GC.KeepAlive(vout_index); + if (ret >= 0 && ret <= 4096) { return null; } + Result_u64ShortChannelIdErrorZ ret_hu_conv = Result_u64ShortChannelIdErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Read a C2Tuple_BestBlockOutputSweeperZ from a byte array, created by C2Tuple_BestBlockOutputSweeperZ_write + */ + public static Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ C2Tuple_BestBlockOutputSweeperZ_read(byte[] ser, org.ldk.structs.BroadcasterInterface arg_a, org.ldk.structs.FeeEstimator arg_b, org.ldk.structs.Option_FilterZ arg_c, org.ldk.structs.OutputSpender arg_d, org.ldk.structs.ChangeDestinationSource arg_e, org.ldk.structs.KVStore arg_f, org.ldk.structs.Logger arg_g) { + long ret = bindings.C2Tuple_BestBlockOutputSweeperZ_read(InternalUtils.encodeUint8Array(ser), arg_a.ptr, arg_b.ptr, arg_c.ptr, arg_d.ptr, arg_e.ptr, arg_f.ptr, arg_g.ptr); + GC.KeepAlive(ser); + GC.KeepAlive(arg_a); + GC.KeepAlive(arg_b); + GC.KeepAlive(arg_c); + GC.KeepAlive(arg_d); + GC.KeepAlive(arg_e); + GC.KeepAlive(arg_f); + GC.KeepAlive(arg_g); + if (ret >= 0 && ret <= 4096) { return null; } + Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(arg_a); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(arg_b); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(arg_c); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(arg_d); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(arg_e); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(arg_f); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(arg_g); }; + return ret_hu_conv; + } + /** * Read a MonitorEvent from a byte array, created by MonitorEvent_write */ @@ -159,7 +225,7 @@ public class UtilMethods { * [`Event::PaymentClaimable`]: crate::events::Event::PaymentClaimable */ public static Result_PendingHTLCInfoInboundHTLCErrZ peel_payment_onion(org.ldk.structs.UpdateAddHTLC msg, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, int cur_height, bool accept_mpp_keysend, bool allow_skimmed_fees) { - long ret = bindings.peel_payment_onion(msg == null ? 0 : msg.ptr, node_signer.ptr, logger.ptr, cur_height, accept_mpp_keysend, allow_skimmed_fees); + long ret = bindings.peel_payment_onion(msg.ptr, node_signer.ptr, logger.ptr, cur_height, accept_mpp_keysend, allow_skimmed_fees); GC.KeepAlive(msg); GC.KeepAlive(node_signer); GC.KeepAlive(logger); @@ -179,7 +245,7 @@ public class UtilMethods { * [`ChannelManager`]. */ public static InitFeatures provided_init_features(org.ldk.structs.UserConfig config) { - long ret = bindings.provided_init_features(config == null ? 0 : config.ptr); + long ret = bindings.provided_init_features(config.ptr); GC.KeepAlive(config); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.InitFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InitFeatures(null, ret); } @@ -192,7 +258,7 @@ public class UtilMethods { * Read a C2Tuple_ThirtyTwoBytesChannelManagerZ from a byte array, created by C2Tuple_ThirtyTwoBytesChannelManagerZ_write */ public static Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ C2Tuple_ThirtyTwoBytesChannelManagerZ_read(byte[] ser, EntropySource arg_entropy_source, NodeSigner arg_node_signer, SignerProvider arg_signer_provider, FeeEstimator arg_fee_estimator, Watch arg_chain_monitor, BroadcasterInterface arg_tx_broadcaster, Router arg_router, Logger arg_logger, UserConfig arg_default_config, ChannelMonitor[] arg_channel_monitors) { - long ret = bindings.C2Tuple_ThirtyTwoBytesChannelManagerZ_read(InternalUtils.encodeUint8Array(ser), bindings.ChannelManagerReadArgs_new(arg_entropy_source.ptr, arg_node_signer.ptr, arg_signer_provider.ptr, arg_fee_estimator.ptr, arg_chain_monitor.ptr, arg_tx_broadcaster.ptr, arg_router.ptr, arg_logger.ptr, arg_default_config == null ? 0 : arg_default_config.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(arg_channel_monitors, arg_channel_monitors_conv_16 => arg_channel_monitors_conv_16 == null ? 0 : arg_channel_monitors_conv_16.ptr)))); + long ret = bindings.C2Tuple_ThirtyTwoBytesChannelManagerZ_read(InternalUtils.encodeUint8Array(ser), bindings.ChannelManagerReadArgs_new(arg_entropy_source.ptr, arg_node_signer.ptr, arg_signer_provider.ptr, arg_fee_estimator.ptr, arg_chain_monitor.ptr, arg_tx_broadcaster.ptr, arg_router.ptr, arg_logger.ptr, arg_default_config.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(arg_channel_monitors, arg_channel_monitors_conv_16 => arg_channel_monitors_conv_16.ptr)))); GC.KeepAlive(ser); GC.KeepAlive(arg_entropy_source); GC.KeepAlive(arg_node_signer); @@ -219,6 +285,20 @@ public class UtilMethods { return ret_hu_conv; } + /** + * Adds a tweak to a public key to derive a new public key. + * + * May panic if `tweak` is not the output of a SHA-256 hash. + */ + public static byte[] add_public_key_tweak(byte[] base_point, byte[] tweak) { + long ret = bindings.add_public_key_tweak(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(base_point, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(tweak, 32))); + GC.KeepAlive(base_point); + GC.KeepAlive(tweak); + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; + } + /** * Equivalent to [`crate::ln::channelmanager::ChannelManager::create_inbound_payment`], but no * `ChannelManager` is required. Useful for generating invoices for [phantom node payments] without @@ -237,7 +317,7 @@ public class UtilMethods { * [`NodeSigner::get_inbound_payment_key_material`]: crate::sign::NodeSigner::get_inbound_payment_key_material */ public static Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ create(org.ldk.structs.ExpandedKey keys, org.ldk.structs.Option_u64Z min_value_msat, int invoice_expiry_delta_secs, org.ldk.structs.EntropySource entropy_source, long current_time, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) { - long ret = bindings.create(keys == null ? 0 : keys.ptr, min_value_msat.ptr, invoice_expiry_delta_secs, entropy_source.ptr, current_time, min_final_cltv_expiry_delta.ptr); + long ret = bindings.create(keys.ptr, min_value_msat.ptr, invoice_expiry_delta_secs, entropy_source.ptr, current_time, min_final_cltv_expiry_delta.ptr); GC.KeepAlive(keys); GC.KeepAlive(min_value_msat); GC.KeepAlive(invoice_expiry_delta_secs); @@ -266,7 +346,7 @@ public class UtilMethods { * [phantom node payments]: crate::sign::PhantomKeysManager */ public static Result_ThirtyTwoBytesNoneZ create_from_hash(org.ldk.structs.ExpandedKey keys, org.ldk.structs.Option_u64Z min_value_msat, byte[] payment_hash, int invoice_expiry_delta_secs, long current_time, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) { - long ret = bindings.create_from_hash(keys == null ? 0 : keys.ptr, min_value_msat.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_hash, 32)), invoice_expiry_delta_secs, current_time, min_final_cltv_expiry_delta.ptr); + long ret = bindings.create_from_hash(keys.ptr, min_value_msat.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_hash, 32)), invoice_expiry_delta_secs, current_time, min_final_cltv_expiry_delta.ptr); GC.KeepAlive(keys); GC.KeepAlive(min_value_msat); GC.KeepAlive(payment_hash); @@ -299,7 +379,7 @@ public class UtilMethods { * Gets the weight for an HTLC-Success transaction. */ public static long htlc_success_tx_weight(org.ldk.structs.ChannelTypeFeatures channel_type_features) { - long ret = bindings.htlc_success_tx_weight(channel_type_features == null ? 0 : channel_type_features.ptr); + long ret = bindings.htlc_success_tx_weight(channel_type_features.ptr); GC.KeepAlive(channel_type_features); return ret; } @@ -308,7 +388,7 @@ public class UtilMethods { * Gets the weight for an HTLC-Timeout transaction. */ public static long htlc_timeout_tx_weight(org.ldk.structs.ChannelTypeFeatures channel_type_features) { - long ret = bindings.htlc_timeout_tx_weight(channel_type_features == null ? 0 : channel_type_features.ptr); + long ret = bindings.htlc_timeout_tx_weight(channel_type_features.ptr); GC.KeepAlive(channel_type_features); return ret; } @@ -341,7 +421,7 @@ public class UtilMethods { * Build a closing transaction */ public static byte[] build_closing_transaction(long to_holder_value_sat, long to_counterparty_value_sat, byte[] to_holder_script, byte[] to_counterparty_script, org.ldk.structs.OutPoint funding_outpoint) { - long ret = bindings.build_closing_transaction(to_holder_value_sat, to_counterparty_value_sat, InternalUtils.encodeUint8Array(to_holder_script), InternalUtils.encodeUint8Array(to_counterparty_script), funding_outpoint == null ? 0 : funding_outpoint.ptr); + long ret = bindings.build_closing_transaction(to_holder_value_sat, to_counterparty_value_sat, InternalUtils.encodeUint8Array(to_holder_script), InternalUtils.encodeUint8Array(to_counterparty_script), funding_outpoint.ptr); GC.KeepAlive(to_holder_value_sat); GC.KeepAlive(to_counterparty_value_sat); GC.KeepAlive(to_holder_script); @@ -388,7 +468,7 @@ public class UtilMethods { * Encumbering a `to_holder` output on a commitment transaction or 2nd-stage HTLC transactions. */ public static byte[] get_revokeable_redeemscript(org.ldk.structs.RevocationKey revocation_key, short contest_delay, org.ldk.structs.DelayedPaymentKey broadcaster_delayed_payment_key) { - long ret = bindings.get_revokeable_redeemscript(revocation_key == null ? 0 : revocation_key.ptr, contest_delay, broadcaster_delayed_payment_key == null ? 0 : broadcaster_delayed_payment_key.ptr); + long ret = bindings.get_revokeable_redeemscript(revocation_key.ptr, contest_delay, broadcaster_delayed_payment_key.ptr); GC.KeepAlive(revocation_key); GC.KeepAlive(contest_delay); GC.KeepAlive(broadcaster_delayed_payment_key); @@ -402,7 +482,7 @@ public class UtilMethods { * the channel type. */ public static byte[] get_counterparty_payment_script(org.ldk.structs.ChannelTypeFeatures channel_type_features, byte[] payment_key) { - long ret = bindings.get_counterparty_payment_script(channel_type_features == null ? 0 : channel_type_features.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_key, 33))); + long ret = bindings.get_counterparty_payment_script(channel_type_features.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_key, 33))); GC.KeepAlive(channel_type_features); GC.KeepAlive(payment_key); if (ret >= 0 && ret <= 4096) { return null; } @@ -415,7 +495,7 @@ public class UtilMethods { * does not need to have its previous_output_index filled. */ public static byte[] get_htlc_redeemscript(org.ldk.structs.HTLCOutputInCommitment htlc, org.ldk.structs.ChannelTypeFeatures channel_type_features, org.ldk.structs.TxCreationKeys keys) { - long ret = bindings.get_htlc_redeemscript(htlc == null ? 0 : htlc.ptr, channel_type_features == null ? 0 : channel_type_features.ptr, keys == null ? 0 : keys.ptr); + long ret = bindings.get_htlc_redeemscript(htlc.ptr, channel_type_features.ptr, keys.ptr); GC.KeepAlive(htlc); GC.KeepAlive(channel_type_features); GC.KeepAlive(keys); @@ -447,7 +527,7 @@ public class UtilMethods { * commitment transaction). */ public static byte[] build_htlc_transaction(byte[] commitment_txid, int feerate_per_kw, short contest_delay, org.ldk.structs.HTLCOutputInCommitment htlc, org.ldk.structs.ChannelTypeFeatures channel_type_features, org.ldk.structs.DelayedPaymentKey broadcaster_delayed_payment_key, org.ldk.structs.RevocationKey revocation_key) { - long ret = bindings.build_htlc_transaction(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(commitment_txid, 32)), feerate_per_kw, contest_delay, htlc == null ? 0 : htlc.ptr, channel_type_features == null ? 0 : channel_type_features.ptr, broadcaster_delayed_payment_key == null ? 0 : broadcaster_delayed_payment_key.ptr, revocation_key == null ? 0 : revocation_key.ptr); + long ret = bindings.build_htlc_transaction(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(commitment_txid, 32)), feerate_per_kw, contest_delay, htlc.ptr, channel_type_features.ptr, broadcaster_delayed_payment_key.ptr, revocation_key.ptr); GC.KeepAlive(commitment_txid); GC.KeepAlive(feerate_per_kw); GC.KeepAlive(contest_delay); @@ -464,7 +544,7 @@ public class UtilMethods { * Returns the witness required to satisfy and spend a HTLC input. */ public static byte[] build_htlc_input_witness(byte[] local_sig, byte[] remote_sig, org.ldk.structs.Option_ThirtyTwoBytesZ preimage, byte[] redeem_script, org.ldk.structs.ChannelTypeFeatures channel_type_features) { - long ret = bindings.build_htlc_input_witness(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(local_sig, 64)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(remote_sig, 64)), preimage.ptr, InternalUtils.encodeUint8Array(redeem_script), channel_type_features == null ? 0 : channel_type_features.ptr); + long ret = bindings.build_htlc_input_witness(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(local_sig, 64)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(remote_sig, 64)), preimage.ptr, InternalUtils.encodeUint8Array(redeem_script), channel_type_features.ptr); GC.KeepAlive(local_sig); GC.KeepAlive(remote_sig); GC.KeepAlive(preimage); @@ -547,7 +627,7 @@ public class UtilMethods { * Returns an error if it is invalid. */ public static Result_NoneLightningErrorZ verify_node_announcement(org.ldk.structs.NodeAnnouncement msg) { - long ret = bindings.verify_node_announcement(msg == null ? 0 : msg.ptr); + long ret = bindings.verify_node_announcement(msg.ptr); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret); @@ -561,7 +641,7 @@ public class UtilMethods { * Returns an error if one of the signatures is invalid. */ public static Result_NoneLightningErrorZ verify_channel_announcement(org.ldk.structs.ChannelAnnouncement msg) { - long ret = bindings.verify_channel_announcement(msg == null ? 0 : msg.ptr); + long ret = bindings.verify_channel_announcement(msg.ptr); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret); @@ -599,7 +679,7 @@ public class UtilMethods { * Note that first_hops (or a relevant inner pointer) may be NULL or all-0s to represent None */ public static Result_RouteLightningErrorZ find_route(byte[] our_node_pubkey, org.ldk.structs.RouteParameters route_params, org.ldk.structs.NetworkGraph network_graph, ChannelDetails[] first_hops, org.ldk.structs.Logger logger, org.ldk.structs.ScoreLookUp scorer, org.ldk.structs.ProbabilisticScoringFeeParameters score_params, byte[] random_seed_bytes) { - long ret = bindings.find_route(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(our_node_pubkey, 33)), route_params == null ? 0 : route_params.ptr, network_graph == null ? 0 : network_graph.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(first_hops, first_hops_conv_16 => first_hops_conv_16 == null ? 0 : first_hops_conv_16.ptr)), logger.ptr, scorer.ptr, score_params == null ? 0 : score_params.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(random_seed_bytes, 32))); + long ret = bindings.find_route(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(our_node_pubkey, 33)), route_params.ptr, network_graph.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(first_hops, first_hops_conv_16 => first_hops_conv_16.ptr)), logger.ptr, scorer.ptr, score_params.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(random_seed_bytes, 32))); GC.KeepAlive(our_node_pubkey); GC.KeepAlive(route_params); GC.KeepAlive(network_graph); @@ -626,7 +706,7 @@ public class UtilMethods { * Re-uses logic from `find_route`, so the restrictions described there also apply here. */ public static Result_RouteLightningErrorZ build_route_from_hops(byte[] our_node_pubkey, byte[][] hops, org.ldk.structs.RouteParameters route_params, org.ldk.structs.NetworkGraph network_graph, org.ldk.structs.Logger logger, byte[] random_seed_bytes) { - long ret = bindings.build_route_from_hops(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(our_node_pubkey, 33)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(hops, hops_conv_8 => InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(hops_conv_8, 33)))), route_params == null ? 0 : route_params.ptr, network_graph == null ? 0 : network_graph.ptr, logger.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(random_seed_bytes, 32))); + long ret = bindings.build_route_from_hops(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(our_node_pubkey, 33)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(hops, hops_conv_8 => InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(hops_conv_8, 33)))), route_params.ptr, network_graph.ptr, logger.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(random_seed_bytes, 32))); GC.KeepAlive(our_node_pubkey); GC.KeepAlive(hops); GC.KeepAlive(route_params); @@ -673,19 +753,57 @@ public class UtilMethods { return ret_hu_conv; } + /** + * Creates an [`OnionMessage`] with the given `contents` for sending to the destination of + * `path`, first calling [`Destination::resolve`] on `path.destination` with the given + * [`ReadOnlyNetworkGraph`]. + * + * Returns the node id of the peer to send the message to, the message itself, and any addresses + * needed to connect to the first node. + * + * Note that reply_path (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + public static Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ create_onion_message_resolving_destination(org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.NodeIdLookUp node_id_lookup, org.ldk.structs.ReadOnlyNetworkGraph network_graph, org.ldk.structs.OnionMessagePath path, org.ldk.structs.OnionMessageContents contents, org.ldk.structs.BlindedPath reply_path) { + long ret = bindings.create_onion_message_resolving_destination(entropy_source.ptr, node_signer.ptr, node_id_lookup.ptr, network_graph.ptr, path.ptr, contents.ptr, reply_path == null ? 0 : reply_path.ptr); + GC.KeepAlive(entropy_source); + GC.KeepAlive(node_signer); + GC.KeepAlive(node_id_lookup); + GC.KeepAlive(network_graph); + GC.KeepAlive(path); + GC.KeepAlive(contents); + GC.KeepAlive(reply_path); + if (ret >= 0 && ret <= 4096) { return null; } + Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ ret_hu_conv = Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(entropy_source); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(node_signer); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(node_id_lookup); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(network_graph); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(path); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(contents); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(reply_path); }; + return ret_hu_conv; + } + /** * Creates an [`OnionMessage`] with the given `contents` for sending to the destination of * `path`. * * Returns the node id of the peer to send the message to, the message itself, and any addresses - * need to connect to the first node. + * needed to connect to the first node. + * + * Returns [`SendError::UnresolvedIntroductionNode`] if: + * - `destination` contains a blinded path with an [`IntroductionNode::DirectedShortChannelId`], + * - unless it can be resolved by [`NodeIdLookUp::next_node_id`]. + * Use [`create_onion_message_resolving_destination`] instead to resolve the introduction node + * first with a [`ReadOnlyNetworkGraph`]. * * Note that reply_path (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public static Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ create_onion_message(org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.OnionMessagePath path, org.ldk.structs.OnionMessageContents contents, org.ldk.structs.BlindedPath reply_path) { - long ret = bindings.create_onion_message(entropy_source.ptr, node_signer.ptr, path == null ? 0 : path.ptr, contents.ptr, reply_path == null ? 0 : reply_path.ptr); + public static Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ create_onion_message(org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.NodeIdLookUp node_id_lookup, org.ldk.structs.OnionMessagePath path, org.ldk.structs.OnionMessageContents contents, org.ldk.structs.BlindedPath reply_path) { + long ret = bindings.create_onion_message(entropy_source.ptr, node_signer.ptr, node_id_lookup.ptr, path.ptr, contents.ptr, reply_path == null ? 0 : reply_path.ptr); GC.KeepAlive(entropy_source); GC.KeepAlive(node_signer); + GC.KeepAlive(node_id_lookup); GC.KeepAlive(path); GC.KeepAlive(contents); GC.KeepAlive(reply_path); @@ -693,6 +811,7 @@ public class UtilMethods { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ ret_hu_conv = Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(entropy_source); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(node_signer); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(node_id_lookup); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(path); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(contents); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(reply_path); }; @@ -706,7 +825,7 @@ public class UtilMethods { * receiver. */ public static Result_PeeledOnionNoneZ peel_onion_message(org.ldk.structs.OnionMessage msg, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.structs.CustomOnionMessageHandler custom_handler) { - long ret = bindings.peel_onion_message(msg == null ? 0 : msg.ptr, node_signer.ptr, logger.ptr, custom_handler.ptr); + long ret = bindings.peel_onion_message(msg.ptr, node_signer.ptr, logger.ptr, custom_handler.ptr); GC.KeepAlive(msg); GC.KeepAlive(node_signer); GC.KeepAlive(logger); @@ -732,10 +851,11 @@ public class UtilMethods { /** * Create a one-hop blinded path for a payment. */ - public static Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_one_hop_for_payment(byte[] payee_node_id, org.ldk.structs.ReceiveTlvs payee_tlvs, org.ldk.structs.EntropySource entropy_source) { - long ret = bindings.BlindedPath_one_hop_for_payment(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payee_node_id, 33)), payee_tlvs == null ? 0 : payee_tlvs.ptr, entropy_source.ptr); + public static Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_one_hop_for_payment(byte[] payee_node_id, org.ldk.structs.ReceiveTlvs payee_tlvs, short min_final_cltv_expiry_delta, org.ldk.structs.EntropySource entropy_source) { + long ret = bindings.BlindedPath_one_hop_for_payment(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payee_node_id, 33)), payee_tlvs.ptr, min_final_cltv_expiry_delta, entropy_source.ptr); GC.KeepAlive(payee_node_id); GC.KeepAlive(payee_tlvs); + GC.KeepAlive(min_final_cltv_expiry_delta); GC.KeepAlive(entropy_source); if (ret >= 0 && ret <= 4096) { return null; } Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ ret_hu_conv = Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.constr_from_ptr(ret); @@ -754,12 +874,13 @@ public class UtilMethods { * * [`ForwardTlvs`]: crate::blinded_path::payment::ForwardTlvs */ - public static Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_new_for_payment(ForwardNode[] intermediate_nodes, byte[] payee_node_id, org.ldk.structs.ReceiveTlvs payee_tlvs, long htlc_maximum_msat, org.ldk.structs.EntropySource entropy_source) { - long ret = bindings.BlindedPath_new_for_payment(InternalUtils.encodeUint64Array(InternalUtils.mapArray(intermediate_nodes, intermediate_nodes_conv_13 => intermediate_nodes_conv_13 == null ? 0 : intermediate_nodes_conv_13.ptr)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payee_node_id, 33)), payee_tlvs == null ? 0 : payee_tlvs.ptr, htlc_maximum_msat, entropy_source.ptr); + public static Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_new_for_payment(ForwardNode[] intermediate_nodes, byte[] payee_node_id, org.ldk.structs.ReceiveTlvs payee_tlvs, long htlc_maximum_msat, short min_final_cltv_expiry_delta, org.ldk.structs.EntropySource entropy_source) { + long ret = bindings.BlindedPath_new_for_payment(InternalUtils.encodeUint64Array(InternalUtils.mapArray(intermediate_nodes, intermediate_nodes_conv_13 => intermediate_nodes_conv_13.ptr)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payee_node_id, 33)), payee_tlvs.ptr, htlc_maximum_msat, min_final_cltv_expiry_delta, entropy_source.ptr); GC.KeepAlive(intermediate_nodes); GC.KeepAlive(payee_node_id); GC.KeepAlive(payee_tlvs); GC.KeepAlive(htlc_maximum_msat); + GC.KeepAlive(min_final_cltv_expiry_delta); GC.KeepAlive(entropy_source); if (ret >= 0 && ret <= 4096) { return null; } Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ ret_hu_conv = Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.constr_from_ptr(ret); @@ -828,7 +949,7 @@ public class UtilMethods { * [`ChannelManager::send_preflight_probes`]: lightning::ln::channelmanager::ChannelManager::send_preflight_probes */ public static Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ payment_parameters_from_zero_amount_invoice(org.ldk.structs.Bolt11Invoice invoice, long amount_msat) { - long ret = bindings.payment_parameters_from_zero_amount_invoice(invoice == null ? 0 : invoice.ptr, amount_msat); + long ret = bindings.payment_parameters_from_zero_amount_invoice(invoice.ptr, amount_msat); GC.KeepAlive(invoice); GC.KeepAlive(amount_msat); if (ret >= 0 && ret <= 4096) { return null; } @@ -851,7 +972,7 @@ public class UtilMethods { * [`ChannelManager::send_preflight_probes`]: lightning::ln::channelmanager::ChannelManager::send_preflight_probes */ public static Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ payment_parameters_from_invoice(org.ldk.structs.Bolt11Invoice invoice) { - long ret = bindings.payment_parameters_from_invoice(invoice == null ? 0 : invoice.ptr); + long ret = bindings.payment_parameters_from_invoice(invoice.ptr); GC.KeepAlive(invoice); if (ret >= 0 && ret <= 4096) { return null; } Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ ret_hu_conv = Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.constr_from_ptr(ret); @@ -902,7 +1023,7 @@ public class UtilMethods { * available and the current time is supplied by the caller. */ public static Result_Bolt11InvoiceSignOrCreationErrorZ create_phantom_invoice(org.ldk.structs.Option_u64Z amt_msat, org.ldk.structs.Option_ThirtyTwoBytesZ payment_hash, string description, int invoice_expiry_delta_secs, PhantomRouteHints[] phantom_route_hints, org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, Currency network, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta, long duration_since_epoch) { - long ret = bindings.create_phantom_invoice(amt_msat.ptr, payment_hash.ptr, InternalUtils.encodeString(description), invoice_expiry_delta_secs, InternalUtils.encodeUint64Array(InternalUtils.mapArray(phantom_route_hints, phantom_route_hints_conv_19 => phantom_route_hints_conv_19 == null ? 0 : phantom_route_hints_conv_19.ptr)), entropy_source.ptr, node_signer.ptr, logger.ptr, network, min_final_cltv_expiry_delta.ptr, duration_since_epoch); + long ret = bindings.create_phantom_invoice(amt_msat.ptr, payment_hash.ptr, InternalUtils.encodeString(description), invoice_expiry_delta_secs, InternalUtils.encodeUint64Array(InternalUtils.mapArray(phantom_route_hints, phantom_route_hints_conv_19 => phantom_route_hints_conv_19.ptr)), entropy_source.ptr, node_signer.ptr, logger.ptr, network, min_final_cltv_expiry_delta.ptr, duration_since_epoch); GC.KeepAlive(amt_msat); GC.KeepAlive(payment_hash); GC.KeepAlive(description); @@ -967,7 +1088,7 @@ public class UtilMethods { * available and the current time is supplied by the caller. */ public static Result_Bolt11InvoiceSignOrCreationErrorZ create_phantom_invoice_with_description_hash(org.ldk.structs.Option_u64Z amt_msat, org.ldk.structs.Option_ThirtyTwoBytesZ payment_hash, int invoice_expiry_delta_secs, org.ldk.structs.Sha256 description_hash, PhantomRouteHints[] phantom_route_hints, org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, Currency network, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta, long duration_since_epoch) { - long ret = bindings.create_phantom_invoice_with_description_hash(amt_msat.ptr, payment_hash.ptr, invoice_expiry_delta_secs, description_hash == null ? 0 : description_hash.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(phantom_route_hints, phantom_route_hints_conv_19 => phantom_route_hints_conv_19 == null ? 0 : phantom_route_hints_conv_19.ptr)), entropy_source.ptr, node_signer.ptr, logger.ptr, network, min_final_cltv_expiry_delta.ptr, duration_since_epoch); + long ret = bindings.create_phantom_invoice_with_description_hash(amt_msat.ptr, payment_hash.ptr, invoice_expiry_delta_secs, description_hash.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(phantom_route_hints, phantom_route_hints_conv_19 => phantom_route_hints_conv_19.ptr)), entropy_source.ptr, node_signer.ptr, logger.ptr, network, min_final_cltv_expiry_delta.ptr, duration_since_epoch); GC.KeepAlive(amt_msat); GC.KeepAlive(payment_hash); GC.KeepAlive(invoice_expiry_delta_secs); @@ -1010,7 +1131,7 @@ public class UtilMethods { * [`MIN_FINAL_CLTV_EXPIRY_DETLA`]: lightning::ln::channelmanager::MIN_FINAL_CLTV_EXPIRY_DELTA */ public static Result_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager(org.ldk.structs.ChannelManager channelmanager, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, Currency network, org.ldk.structs.Option_u64Z amt_msat, string description, int invoice_expiry_delta_secs, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) { - long ret = bindings.create_invoice_from_channelmanager(channelmanager == null ? 0 : channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, InternalUtils.encodeString(description), invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr); + long ret = bindings.create_invoice_from_channelmanager(channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, InternalUtils.encodeString(description), invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr); GC.KeepAlive(channelmanager); GC.KeepAlive(node_signer); GC.KeepAlive(logger); @@ -1048,7 +1169,7 @@ public class UtilMethods { * [`MIN_FINAL_CLTV_EXPIRY_DETLA`]: lightning::ln::channelmanager::MIN_FINAL_CLTV_EXPIRY_DELTA */ public static Result_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_with_description_hash(org.ldk.structs.ChannelManager channelmanager, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, Currency network, org.ldk.structs.Option_u64Z amt_msat, org.ldk.structs.Sha256 description_hash, int invoice_expiry_delta_secs, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) { - long ret = bindings.create_invoice_from_channelmanager_with_description_hash(channelmanager == null ? 0 : channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description_hash == null ? 0 : description_hash.ptr, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr); + long ret = bindings.create_invoice_from_channelmanager_with_description_hash(channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description_hash.ptr, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr); GC.KeepAlive(channelmanager); GC.KeepAlive(node_signer); GC.KeepAlive(logger); @@ -1074,7 +1195,7 @@ public class UtilMethods { * available and the current time is supplied by the caller. */ public static Result_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(org.ldk.structs.ChannelManager channelmanager, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, Currency network, org.ldk.structs.Option_u64Z amt_msat, org.ldk.structs.Sha256 description_hash, long duration_since_epoch, int invoice_expiry_delta_secs, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) { - long ret = bindings.create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(channelmanager == null ? 0 : channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description_hash == null ? 0 : description_hash.ptr, duration_since_epoch, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr); + long ret = bindings.create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description_hash.ptr, duration_since_epoch, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr); GC.KeepAlive(channelmanager); GC.KeepAlive(node_signer); GC.KeepAlive(logger); @@ -1101,7 +1222,7 @@ public class UtilMethods { * available and the current time is supplied by the caller. */ public static Result_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_and_duration_since_epoch(org.ldk.structs.ChannelManager channelmanager, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, Currency network, org.ldk.structs.Option_u64Z amt_msat, string description, long duration_since_epoch, int invoice_expiry_delta_secs, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) { - long ret = bindings.create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager == null ? 0 : channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, InternalUtils.encodeString(description), duration_since_epoch, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr); + long ret = bindings.create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, InternalUtils.encodeString(description), duration_since_epoch, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr); GC.KeepAlive(channelmanager); GC.KeepAlive(node_signer); GC.KeepAlive(logger); @@ -1128,7 +1249,7 @@ public class UtilMethods { * the payment hash is also involved outside the scope of lightning. */ public static Result_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_and_duration_since_epoch_with_payment_hash(org.ldk.structs.ChannelManager channelmanager, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, Currency network, org.ldk.structs.Option_u64Z amt_msat, string description, long duration_since_epoch, int invoice_expiry_delta_secs, byte[] payment_hash, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) { - long ret = bindings.create_invoice_from_channelmanager_and_duration_since_epoch_with_payment_hash(channelmanager == null ? 0 : channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, InternalUtils.encodeString(description), duration_since_epoch, invoice_expiry_delta_secs, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_hash, 32)), min_final_cltv_expiry_delta.ptr); + long ret = bindings.create_invoice_from_channelmanager_and_duration_since_epoch_with_payment_hash(channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, InternalUtils.encodeString(description), duration_since_epoch, invoice_expiry_delta_secs, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_hash, 32)), min_final_cltv_expiry_delta.ptr); GC.KeepAlive(channelmanager); GC.KeepAlive(node_signer); GC.KeepAlive(logger); diff --git a/c_sharp/src/org/ldk/structs/Utxo.cs b/c_sharp/src/org/ldk/structs/Utxo.cs index 8c885663..9749cfa6 100644 --- a/c_sharp/src/org/ldk/structs/Utxo.cs +++ b/c_sharp/src/org/ldk/structs/Utxo.cs @@ -32,7 +32,7 @@ public class Utxo : CommonBase { * The unique identifier of the output. */ public void set_outpoint(org.ldk.structs.OutPoint val) { - bindings.Utxo_set_outpoint(this.ptr, val == null ? 0 : val.ptr); + bindings.Utxo_set_outpoint(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -84,7 +84,7 @@ public class Utxo : CommonBase { * Constructs a new Utxo given each field */ public static Utxo of(org.ldk.structs.OutPoint outpoint_arg, org.ldk.structs.TxOut output_arg, long satisfaction_weight_arg) { - long ret = bindings.Utxo_new(outpoint_arg == null ? 0 : outpoint_arg.ptr, output_arg.ptr, satisfaction_weight_arg); + long ret = bindings.Utxo_new(outpoint_arg.ptr, output_arg.ptr, satisfaction_weight_arg); GC.KeepAlive(outpoint_arg); GC.KeepAlive(output_arg); GC.KeepAlive(satisfaction_weight_arg); @@ -131,7 +131,7 @@ public class Utxo : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.Utxo b) { - bool ret = bindings.Utxo_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.Utxo_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; @@ -146,7 +146,7 @@ public class Utxo : CommonBase { * Returns a `Utxo` with the `satisfaction_weight` estimate for a legacy P2PKH output. */ public static Utxo new_p2pkh(org.ldk.structs.OutPoint outpoint, long value, byte[] pubkey_hash) { - long ret = bindings.Utxo_new_p2pkh(outpoint == null ? 0 : outpoint.ptr, value, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(pubkey_hash, 20))); + long ret = bindings.Utxo_new_p2pkh(outpoint.ptr, value, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(pubkey_hash, 20))); GC.KeepAlive(outpoint); GC.KeepAlive(value); GC.KeepAlive(pubkey_hash); diff --git a/c_sharp/src/org/ldk/structs/UtxoFuture.cs b/c_sharp/src/org/ldk/structs/UtxoFuture.cs index bf797e5d..45097791 100644 --- a/c_sharp/src/org/ldk/structs/UtxoFuture.cs +++ b/c_sharp/src/org/ldk/structs/UtxoFuture.cs @@ -60,7 +60,7 @@ public class UtxoFuture : CommonBase { * [`PeerManager::process_events`]: crate::ln::peer_handler::PeerManager::process_events */ public void resolve_without_forwarding(org.ldk.structs.NetworkGraph graph, org.ldk.structs.Result_TxOutUtxoLookupErrorZ result) { - bindings.UtxoFuture_resolve_without_forwarding(this.ptr, graph == null ? 0 : graph.ptr, result != null ? result.ptr : 0); + bindings.UtxoFuture_resolve_without_forwarding(this.ptr, graph.ptr, result.ptr); GC.KeepAlive(this); GC.KeepAlive(graph); GC.KeepAlive(result); @@ -81,7 +81,7 @@ public class UtxoFuture : CommonBase { * [`PeerManager::process_events`]: crate::ln::peer_handler::PeerManager::process_events */ public void resolve(org.ldk.structs.NetworkGraph graph, org.ldk.structs.P2PGossipSync gossip, org.ldk.structs.Result_TxOutUtxoLookupErrorZ result) { - bindings.UtxoFuture_resolve(this.ptr, graph == null ? 0 : graph.ptr, gossip == null ? 0 : gossip.ptr, result != null ? result.ptr : 0); + bindings.UtxoFuture_resolve(this.ptr, graph.ptr, gossip.ptr, result.ptr); GC.KeepAlive(this); GC.KeepAlive(graph); GC.KeepAlive(gossip); diff --git a/c_sharp/src/org/ldk/structs/UtxoLookup.cs b/c_sharp/src/org/ldk/structs/UtxoLookup.cs index baa1ac39..bd6705ae 100644 --- a/c_sharp/src/org/ldk/structs/UtxoLookup.cs +++ b/c_sharp/src/org/ldk/structs/UtxoLookup.cs @@ -40,7 +40,7 @@ public class UtxoLookup : CommonBase { byte[] _chain_hash_conv = InternalUtils.decodeUint8Array(_chain_hash); UtxoResult ret = arg.get_utxo(_chain_hash_conv, _short_channel_id); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); if (impl_holder.held != null) { impl_holder.held.ptrs_to.AddLast(ret); }; return result; } diff --git a/c_sharp/src/org/ldk/structs/UtxoResult.cs b/c_sharp/src/org/ldk/structs/UtxoResult.cs index 18c93278..8dbbc699 100644 --- a/c_sharp/src/org/ldk/structs/UtxoResult.cs +++ b/c_sharp/src/org/ldk/structs/UtxoResult.cs @@ -67,7 +67,7 @@ public class UtxoResult : CommonBase { * Utility method to constructs a new Sync-variant UtxoResult */ public static UtxoResult sync(org.ldk.structs.Result_TxOutUtxoLookupErrorZ a) { - long ret = bindings.UtxoResult_sync(a != null ? a.ptr : 0); + long ret = bindings.UtxoResult_sync(a.ptr); GC.KeepAlive(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.UtxoResult ret_hu_conv = org.ldk.structs.UtxoResult.constr_from_ptr(ret); @@ -79,7 +79,7 @@ public class UtxoResult : CommonBase { * Utility method to constructs a new Async-variant UtxoResult */ public static UtxoResult async(org.ldk.structs.UtxoFuture a) { - long ret = bindings.UtxoResult_async(a == null ? 0 : a.ptr); + long ret = bindings.UtxoResult_async(a.ptr); GC.KeepAlive(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.UtxoResult ret_hu_conv = org.ldk.structs.UtxoResult.constr_from_ptr(ret); diff --git a/c_sharp/src/org/ldk/structs/VerifiedInvoiceRequest.cs b/c_sharp/src/org/ldk/structs/VerifiedInvoiceRequest.cs index 42692317..b3bff35f 100644 --- a/c_sharp/src/org/ldk/structs/VerifiedInvoiceRequest.cs +++ b/c_sharp/src/org/ldk/structs/VerifiedInvoiceRequest.cs @@ -16,6 +16,28 @@ public class VerifiedInvoiceRequest : CommonBase { if (ptr != 0) { bindings.VerifiedInvoiceRequest_free(ptr); } } + /** + * The identifier of the [`Offer`] for which the [`InvoiceRequest`] was made. + */ + public OfferId get_offer_id() { + long ret = bindings.VerifiedInvoiceRequest_get_offer_id(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OfferId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * The identifier of the [`Offer`] for which the [`InvoiceRequest`] was made. + */ + public void set_offer_id(org.ldk.structs.OfferId val) { + bindings.VerifiedInvoiceRequest_set_offer_id(this.ptr, val.ptr); + GC.KeepAlive(this); + GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; + } + /** * Keys used for signing a [`Bolt12Invoice`] if they can be derived. * @@ -105,14 +127,12 @@ public class VerifiedInvoiceRequest : CommonBase { /** * The minimum amount required for a successful payment of a single item. - * - * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public Amount amount() { + public Option_AmountZ amount() { long ret = bindings.VerifiedInvoiceRequest_amount(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Amount ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Amount(null, ret); } + org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; return ret_hu_conv; } @@ -120,6 +140,8 @@ public class VerifiedInvoiceRequest : CommonBase { /** * A complete description of the purpose of the payment. Intended to be displayed to the user * but with the caveat that it has not been verified in any way. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ public PrintableString description() { long ret = bindings.VerifiedInvoiceRequest_description(this.ptr); @@ -198,13 +220,15 @@ public class VerifiedInvoiceRequest : CommonBase { long ret = bindings.VerifiedInvoiceRequest_supported_quantity(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - org.ldk.structs.Quantity ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Quantity(null, ret); } + org.ldk.structs.Quantity ret_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; return ret_hu_conv; } /** * The public key used by the recipient to sign invoices. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ public byte[] signing_pubkey() { long ret = bindings.VerifiedInvoiceRequest_signing_pubkey(this.ptr); @@ -304,5 +328,99 @@ public class VerifiedInvoiceRequest : CommonBase { return ret_hu_conv; } + /** + * Creates an [`InvoiceBuilder`] for the request with the given required fields and using the + * [`Duration`] since [`std::time::SystemTime::UNIX_EPOCH`] as the creation time. + * + * See [`InvoiceRequest::respond_with_no_std`] for further details where the aforementioned + * creation time is used for the `created_at` parameter. + * + * [`Duration`]: core::time::Duration + */ + public Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ respond_with(TwoTuple_BlindedPayInfoBlindedPathZ[] payment_paths, byte[] payment_hash) { + long ret = bindings.VerifiedInvoiceRequest_respond_with(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(payment_paths, payment_paths_conv_37 => payment_paths_conv_37.ptr)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_hash, 32))); + GC.KeepAlive(this); + GC.KeepAlive(payment_paths); + GC.KeepAlive(payment_hash); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Creates an [`InvoiceBuilder`] for the request with the given required fields. + * + * Unless [`InvoiceBuilder::relative_expiry`] is set, the invoice will expire two hours after + * `created_at`, which is used to set [`Bolt12Invoice::created_at`]. Useful for `no-std` builds + * where [`std::time::SystemTime`] is not available. + * + * The caller is expected to remember the preimage of `payment_hash` in order to claim a payment + * for the invoice. + * + * The `payment_paths` parameter is useful for maintaining the payment recipient's privacy. It + * must contain one or more elements ordered from most-preferred to least-preferred, if there's + * a preference. Note, however, that any privacy is lost if a public node id was used for + * [`Offer::signing_pubkey`]. + * + * Errors if the request contains unknown required features. + * + * # Note + * + * If the originating [`Offer`] was created using [`OfferBuilder::deriving_signing_pubkey`], + * then use [`InvoiceRequest::verify`] and [`VerifiedInvoiceRequest`] methods instead. + * + * [`Bolt12Invoice::created_at`]: crate::offers::invoice::Bolt12Invoice::created_at + * [`OfferBuilder::deriving_signing_pubkey`]: crate::offers::offer::OfferBuilder::deriving_signing_pubkey + */ + public Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ respond_with_no_std(TwoTuple_BlindedPayInfoBlindedPathZ[] payment_paths, byte[] payment_hash, long created_at) { + long ret = bindings.VerifiedInvoiceRequest_respond_with_no_std(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(payment_paths, payment_paths_conv_37 => payment_paths_conv_37.ptr)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_hash, 32)), created_at); + GC.KeepAlive(this); + GC.KeepAlive(payment_paths); + GC.KeepAlive(payment_hash); + GC.KeepAlive(created_at); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Creates an [`InvoiceBuilder`] for the request using the given required fields and that uses + * derived signing keys from the originating [`Offer`] to sign the [`Bolt12Invoice`]. Must use + * the same [`ExpandedKey`] as the one used to create the offer. + * + * See [`InvoiceRequest::respond_with`] for further details. + * + * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice + */ + public Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ respond_using_derived_keys(TwoTuple_BlindedPayInfoBlindedPathZ[] payment_paths, byte[] payment_hash) { + long ret = bindings.VerifiedInvoiceRequest_respond_using_derived_keys(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(payment_paths, payment_paths_conv_37 => payment_paths_conv_37.ptr)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_hash, 32))); + GC.KeepAlive(this); + GC.KeepAlive(payment_paths); + GC.KeepAlive(payment_hash); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + /** + * Creates an [`InvoiceBuilder`] for the request using the given required fields and that uses + * derived signing keys from the originating [`Offer`] to sign the [`Bolt12Invoice`]. Must use + * the same [`ExpandedKey`] as the one used to create the offer. + * + * See [`InvoiceRequest::respond_with_no_std`] for further details. + * + * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice + */ + public Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ respond_using_derived_keys_no_std(TwoTuple_BlindedPayInfoBlindedPathZ[] payment_paths, byte[] payment_hash, long created_at) { + long ret = bindings.VerifiedInvoiceRequest_respond_using_derived_keys_no_std(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(payment_paths, payment_paths_conv_37 => payment_paths_conv_37.ptr)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_hash, 32)), created_at); + GC.KeepAlive(this); + GC.KeepAlive(payment_paths); + GC.KeepAlive(payment_hash); + GC.KeepAlive(created_at); + if (ret >= 0 && ret <= 4096) { return null; } + Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + } } } } diff --git a/c_sharp/src/org/ldk/structs/WalletSource.cs b/c_sharp/src/org/ldk/structs/WalletSource.cs index b8900e77..1c0d68b8 100644 --- a/c_sharp/src/org/ldk/structs/WalletSource.cs +++ b/c_sharp/src/org/ldk/structs/WalletSource.cs @@ -48,20 +48,20 @@ public class WalletSource : CommonBase { public long list_confirmed_utxos() { Result_CVec_UtxoZNoneZ ret = arg.list_confirmed_utxos(); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long get_change_script() { Result_CVec_u8ZNoneZ ret = arg.get_change_script(); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public long sign_psbt(long _psbt) { byte[] _psbt_conv = InternalUtils.decodeUint8Array(_psbt); Result_TransactionNoneZ ret = arg.sign_psbt(_psbt_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } } diff --git a/c_sharp/src/org/ldk/structs/WarningMessage.cs b/c_sharp/src/org/ldk/structs/WarningMessage.cs index 95407570..37699b4d 100644 --- a/c_sharp/src/org/ldk/structs/WarningMessage.cs +++ b/c_sharp/src/org/ldk/structs/WarningMessage.cs @@ -22,12 +22,13 @@ public class WarningMessage : CommonBase { * * All-0s indicates a warning unrelated to a specific channel. */ - public byte[] get_channel_id() { + public ChannelId get_channel_id() { long ret = bindings.WarningMessage_get_channel_id(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** @@ -35,10 +36,11 @@ public class WarningMessage : CommonBase { * * All-0s indicates a warning unrelated to a specific channel. */ - public void set_channel_id(byte[] val) { - bindings.WarningMessage_set_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); + public void set_channel_id(org.ldk.structs.ChannelId val) { + bindings.WarningMessage_set_channel_id(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** @@ -72,13 +74,14 @@ public class WarningMessage : CommonBase { /** * Constructs a new WarningMessage given each field */ - public static WarningMessage of(byte[] channel_id_arg, string data_arg) { - long ret = bindings.WarningMessage_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id_arg, 32)), InternalUtils.encodeString(data_arg)); + public static WarningMessage of(org.ldk.structs.ChannelId channel_id_arg, string data_arg) { + long ret = bindings.WarningMessage_new(channel_id_arg.ptr, InternalUtils.encodeString(data_arg)); GC.KeepAlive(channel_id_arg); GC.KeepAlive(data_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.WarningMessage ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.WarningMessage(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id_arg); }; return ret_hu_conv; } @@ -118,7 +121,7 @@ public class WarningMessage : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.WarningMessage b) { - bool ret = bindings.WarningMessage_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.WarningMessage_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/Watch.cs b/c_sharp/src/org/ldk/structs/Watch.cs index 95bf7129..cc60fa6f 100644 --- a/c_sharp/src/org/ldk/structs/Watch.cs +++ b/c_sharp/src/org/ldk/structs/Watch.cs @@ -54,7 +54,7 @@ public interface WatchInterface { * For details on asynchronous [`ChannelMonitor`] updating and returning * [`MonitorEvent::Completed`] here, see [`ChannelMonitorUpdateStatus::InProgress`]. */ - ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[] release_pending_monitor_events(); + FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ[] release_pending_monitor_events(); } /** @@ -90,7 +90,7 @@ public class Watch : CommonBase { if (_monitor_hu_conv != null) { _monitor_hu_conv.ptrs_to.AddLast(this); }; Result_ChannelMonitorUpdateStatusNoneZ ret = arg.watch_channel(_funding_txo_hu_conv, _monitor_hu_conv); GC.KeepAlive(arg); - long result = ret == null ? 0 : ret.clone_ptr(); + long result = ret.clone_ptr(); return result; } public ChannelMonitorUpdateStatus update_channel(long _funding_txo, long _update) { @@ -102,9 +102,9 @@ public class Watch : CommonBase { return ret; } public long release_pending_monitor_events() { - ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[] ret = arg.release_pending_monitor_events(); + FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ[] ret = arg.release_pending_monitor_events(); GC.KeepAlive(arg); - long result = InternalUtils.encodeUint64Array(InternalUtils.mapArray(ret, ret_conv_49 => ret_conv_49 == null ? 0 : ret_conv_49.clone_ptr())); + long result = InternalUtils.encodeUint64Array(InternalUtils.mapArray(ret, ret_conv_57 => ret_conv_57.clone_ptr())); return result; } } @@ -139,7 +139,7 @@ public class Watch : CommonBase { * [`block_disconnected`]: channelmonitor::ChannelMonitor::block_disconnected */ public Result_ChannelMonitorUpdateStatusNoneZ watch_channel(org.ldk.structs.OutPoint funding_txo, org.ldk.structs.ChannelMonitor monitor) { - long ret = bindings.Watch_watch_channel(this.ptr, funding_txo == null ? 0 : funding_txo.ptr, monitor == null ? 0 : monitor.ptr); + long ret = bindings.Watch_watch_channel(this.ptr, funding_txo.ptr, monitor.ptr); GC.KeepAlive(this); GC.KeepAlive(funding_txo); GC.KeepAlive(monitor); @@ -168,7 +168,7 @@ public class Watch : CommonBase { * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager */ public ChannelMonitorUpdateStatus update_channel(org.ldk.structs.OutPoint funding_txo, org.ldk.structs.ChannelMonitorUpdate update) { - ChannelMonitorUpdateStatus ret = bindings.Watch_update_channel(this.ptr, funding_txo == null ? 0 : funding_txo.ptr, update == null ? 0 : update.ptr); + ChannelMonitorUpdateStatus ret = bindings.Watch_update_channel(this.ptr, funding_txo.ptr, update.ptr); GC.KeepAlive(this); GC.KeepAlive(funding_txo); GC.KeepAlive(update); @@ -188,20 +188,20 @@ public class Watch : CommonBase { * For details on asynchronous [`ChannelMonitor`] updating and returning * [`MonitorEvent::Completed`] here, see [`ChannelMonitorUpdateStatus::InProgress`]. */ - public ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[] release_pending_monitor_events() { + public FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ[] release_pending_monitor_events() { long ret = bindings.Watch_release_pending_monitor_events(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - int ret_conv_49_len = InternalUtils.getArrayLength(ret); - ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[] ret_conv_49_arr = new ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[ret_conv_49_len]; - for (int x = 0; x < ret_conv_49_len; x++) { - long ret_conv_49 = InternalUtils.getU64ArrayElem(ret, x); - ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ ret_conv_49_hu_conv = new ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ(null, ret_conv_49); - if (ret_conv_49_hu_conv != null) { ret_conv_49_hu_conv.ptrs_to.AddLast(this); }; - ret_conv_49_arr[x] = ret_conv_49_hu_conv; + int ret_conv_57_len = InternalUtils.getArrayLength(ret); + FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ[] ret_conv_57_arr = new FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ[ret_conv_57_len]; + for (int f = 0; f < ret_conv_57_len; f++) { + long ret_conv_57 = InternalUtils.getU64ArrayElem(ret, f); + FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ ret_conv_57_hu_conv = new FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ(null, ret_conv_57); + if (ret_conv_57_hu_conv != null) { ret_conv_57_hu_conv.ptrs_to.AddLast(this); }; + ret_conv_57_arr[f] = ret_conv_57_hu_conv; } bindings.free_buffer(ret); - return ret_conv_49_arr; + return ret_conv_57_arr; } } diff --git a/c_sharp/src/org/ldk/structs/WatchedOutput.cs b/c_sharp/src/org/ldk/structs/WatchedOutput.cs index 01192182..70f17e08 100644 --- a/c_sharp/src/org/ldk/structs/WatchedOutput.cs +++ b/c_sharp/src/org/ldk/structs/WatchedOutput.cs @@ -63,7 +63,7 @@ public class WatchedOutput : CommonBase { * Outpoint identifying the transaction output. */ public void set_outpoint(org.ldk.structs.OutPoint val) { - bindings.WatchedOutput_set_outpoint(this.ptr, val == null ? 0 : val.ptr); + bindings.WatchedOutput_set_outpoint(this.ptr, val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); if (this != null) { this.ptrs_to.AddLast(val); }; @@ -93,7 +93,7 @@ public class WatchedOutput : CommonBase { * Constructs a new WatchedOutput given each field */ public static WatchedOutput of(org.ldk.structs.Option_ThirtyTwoBytesZ block_hash_arg, org.ldk.structs.OutPoint outpoint_arg, byte[] script_pubkey_arg) { - long ret = bindings.WatchedOutput_new(block_hash_arg.ptr, outpoint_arg == null ? 0 : outpoint_arg.ptr, InternalUtils.encodeUint8Array(script_pubkey_arg)); + long ret = bindings.WatchedOutput_new(block_hash_arg.ptr, outpoint_arg.ptr, InternalUtils.encodeUint8Array(script_pubkey_arg)); GC.KeepAlive(block_hash_arg); GC.KeepAlive(outpoint_arg); GC.KeepAlive(script_pubkey_arg); @@ -129,7 +129,7 @@ public class WatchedOutput : CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public bool eq(org.ldk.structs.WatchedOutput b) { - bool ret = bindings.WatchedOutput_eq(this.ptr, b == null ? 0 : b.ptr); + bool ret = bindings.WatchedOutput_eq(this.ptr, b.ptr); GC.KeepAlive(this); GC.KeepAlive(b); if (this != null) { this.ptrs_to.AddLast(b); }; diff --git a/c_sharp/src/org/ldk/structs/WriteableEcdsaChannelSigner.cs b/c_sharp/src/org/ldk/structs/WriteableEcdsaChannelSigner.cs index d7b0988e..045861df 100644 --- a/c_sharp/src/org/ldk/structs/WriteableEcdsaChannelSigner.cs +++ b/c_sharp/src/org/ldk/structs/WriteableEcdsaChannelSigner.cs @@ -52,7 +52,7 @@ public class WriteableEcdsaChannelSigner : CommonBase { LDKWriteableEcdsaChannelSignerImpl impl = new LDKWriteableEcdsaChannelSignerImpl(arg, impl_holder); EcdsaChannelSigner ecdsaChannelSigner = EcdsaChannelSigner.new_impl(ecdsaChannelSigner_impl, channelSigner_impl, pubkeys); ChannelSigner channelSigner = ChannelSigner.new_impl(channelSigner_impl, pubkeys); - long[] ptr_idx = bindings.LDKWriteableEcdsaChannelSigner_new(impl, ecdsaChannelSigner.instance_idx, channelSigner.instance_idx, pubkeys == null ? 0 : pubkeys.clone_ptr()); + long[] ptr_idx = bindings.LDKWriteableEcdsaChannelSigner_new(impl, ecdsaChannelSigner.instance_idx, channelSigner.instance_idx, pubkeys.clone_ptr()); impl_holder.held = new WriteableEcdsaChannelSigner(null, ptr_idx[0]); impl_holder.held.instance_idx = ptr_idx[1]; -- 2.30.2 From 4707fb6f5371f08a61a6d5721edee3782554c91d Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 13 May 2024 18:21:45 +0000 Subject: [PATCH 13/16] [C#] Update test to LDK 0.0.123 and pay a BOLT12 offer --- c_sharp/test/src/tests.cs | 153 +++++++++++++++++++++++++++++++++----- 1 file changed, 134 insertions(+), 19 deletions(-) diff --git a/c_sharp/test/src/tests.cs b/c_sharp/test/src/tests.cs index 2e3d0d48..c095be59 100644 --- a/c_sharp/test/src/tests.cs +++ b/c_sharp/test/src/tests.cs @@ -21,11 +21,10 @@ namespace tests { } class TestBroadcaster : BroadcasterInterfaceInterface { - public bool broadcasted = false; + public int broadcasted_len = 0; public void broadcast_transactions(byte[][] txn) { Assert(txn.Length == 1, 1); - Assert(txn[0].Length == 42, 2); - broadcasted = true; + broadcasted_len = txn[0].Length; } } @@ -35,7 +34,7 @@ namespace tests { byte[][] txn = new byte[1][]; txn[0] = new byte[42]; broadcaster.broadcast_transactions(txn); - Assert(impl.broadcasted == true, 3); + Assert(impl.broadcasted_len == 42, 3); } class TestEstimator : FeeEstimatorInterface { @@ -61,6 +60,7 @@ namespace tests { public ChannelMonitorUpdateStatus update_persisted_channel(OutPoint channel_id, ChannelMonitorUpdate update, ChannelMonitor data, MonitorUpdateId update_id) { return ChannelMonitorUpdateStatus.LDKChannelMonitorUpdateStatus_Completed; } + public void archive_persisted_channel(OutPoint channel_id) { } } class TestEventHandler : EventHandlerInterface { @@ -77,31 +77,75 @@ namespace tests { return impl.events[0]; } + class TestRouter : RouterInterface, MessageRouterInterface { + DefaultRouter inner; + EntropySource entropy; + public TestRouter(DefaultRouter inner, EntropySource entropy) { + this.inner = inner; + this.entropy = entropy; + } + public Result_RouteLightningErrorZ find_route(byte[] payer, RouteParameters param, ChannelDetails[] chans, InFlightHtlcs htlcs) { + return inner.as_Router().find_route(payer, param, chans, htlcs); + } + public Result_RouteLightningErrorZ find_route_with_id(byte[] payer, RouteParameters param, ChannelDetails[] chans, InFlightHtlcs htlcs, byte[] payment_hash, byte[] payment_id) { + return inner.as_Router().find_route_with_id(payer, param, chans, htlcs, payment_hash, payment_id); + } + public Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ create_blinded_payment_paths(byte[] recipient, ChannelDetails[] first_hops, ReceiveTlvs tlvs, long amount_msats) { + Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ info_path = UtilMethods.BlindedPath_one_hop_for_payment(recipient, tlvs, 40, entropy); + TwoTuple_BlindedPayInfoBlindedPathZ hop = ((Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ_OK)info_path).res; + TwoTuple_BlindedPayInfoBlindedPathZ[] hops = new TwoTuple_BlindedPayInfoBlindedPathZ[1]; + hops[0] = hop; + return Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.ok(hops); + } + + public Result_OnionMessagePathNoneZ find_path(byte[] sender, byte[][] peers, Destination dest) { + return inner.as_MessageRouter().find_path(sender, peers, dest); + } + public Result_CVec_BlindedPathZNoneZ create_blinded_paths(byte[] recipient, byte[][] peers) { + Result_BlindedPathNoneZ path = BlindedPath.one_hop_for_message(recipient, entropy); + Assert(path.is_ok(), 2); + BlindedPath[] paths = new BlindedPath[1]; + paths[0] = ((Result_BlindedPathNoneZ.Result_BlindedPathNoneZ_OK)path).res; + return Result_CVec_BlindedPathZNoneZ.ok(paths); + } + } + class Node { - public BroadcasterInterface broadcaster = BroadcasterInterface.new_impl(new TestBroadcaster()); + public TestBroadcaster broadcaster = new TestBroadcaster(); public FeeEstimator estimator = FeeEstimator.new_impl(new TestEstimator()); public Logger logger = Logger.new_impl(new TestLogger()); public Persist persister = Persist.new_impl(new TestPersister()); public ChainParameters chain_params = ChainParameters.of(Network.LDKNetwork_Bitcoin, BestBlock.from_network(Network.LDKNetwork_Bitcoin)); + public BroadcasterInterface ldk_broadcaster; public ChainMonitor chain_monitor; public NetworkGraph graph; public MultiThreadedLockableScore scorer; - public DefaultRouter router; + public Router router; public KeysManager keys; public ChannelManager manager; + public OnionMessenger messenger; public Node(byte seed) { byte[] seed_bytes = new byte[32]; for (int i = 0; i < 32; i++) seed_bytes[i] = seed; keys = KeysManager.of(seed_bytes, 42, 43); - chain_monitor = ChainMonitor.of(Option_FilterZ.none(), broadcaster, logger, estimator, persister); + ldk_broadcaster = BroadcasterInterface.new_impl(broadcaster); + chain_monitor = ChainMonitor.of(Option_FilterZ.none(), ldk_broadcaster, logger, estimator, persister); graph = NetworkGraph.of(Network.LDKNetwork_Bitcoin, logger); scorer = MultiThreadedLockableScore.of(ProbabilisticScorer.of(ProbabilisticScoringDecayParameters.with_default(), graph, logger).as_Score()); - router = DefaultRouter.of(graph, logger, keys.as_EntropySource(), scorer.as_LockableScore(), ProbabilisticScoringFeeParameters.with_default()); - manager = ChannelManager.of(estimator, chain_monitor.as_Watch(), broadcaster, router.as_Router(), logger, keys.as_EntropySource(), keys.as_NodeSigner(), keys.as_SignerProvider(), UserConfig.with_default(), chain_params, 42); + DefaultRouter router_impl = DefaultRouter.of(graph, logger, keys.as_EntropySource(), scorer.as_LockableScore(), ProbabilisticScoringFeeParameters.with_default()); + TestRouter router_wrapper = new TestRouter(router_impl, keys.as_EntropySource()); + router = Router.new_impl(router_wrapper, router_wrapper); + + UserConfig config = UserConfig.with_default(); + config.set_manually_accept_inbound_channels(true); + + manager = ChannelManager.of(estimator, chain_monitor.as_Watch(), ldk_broadcaster, router, logger, keys.as_EntropySource(), keys.as_NodeSigner(), keys.as_SignerProvider(), config, chain_params, 42); + + messenger = OnionMessenger.of(keys.as_EntropySource(), keys.as_NodeSigner(), logger, manager.as_NodeIdLookUp(), MessageRouter.new_impl(router_wrapper), manager.as_OffersMessageHandler(), IgnoringMessageHandler.of().as_CustomOnionMessageHandler()); } } @@ -110,11 +154,14 @@ namespace tests { Node node_b = new Node(2); InitFeatures init_features = node_a.manager.as_ChannelMessageHandler().provided_init_features(node_b.manager.get_our_node_id()); + init_features.set_onion_messages_optional(); Init init_msg = Init.of(init_features, Option_CVec_ThirtyTwoBytesZZ.none(), Option_SocketAddressZ.none()); node_a.manager.as_ChannelMessageHandler().peer_connected(node_b.manager.get_our_node_id(), init_msg, false); node_b.manager.as_ChannelMessageHandler().peer_connected(node_a.manager.get_our_node_id(), init_msg, false); + node_a.messenger.as_OnionMessageHandler().peer_connected(node_b.manager.get_our_node_id(), init_msg, false); + node_b.messenger.as_OnionMessageHandler().peer_connected(node_a.manager.get_our_node_id(), init_msg, false); - Result_ThirtyTwoBytesAPIErrorZ res = node_a.manager.create_channel(node_b.manager.get_our_node_id(), 100000, 42, new UInt128(43), Option_ThirtyTwoBytesZ.none(), null); + Result_ChannelIdAPIErrorZ res = node_a.manager.create_channel(node_b.manager.get_our_node_id(), 100000, 42, new UInt128(43), null, null); Assert(res.is_ok(), 4); MessageSendEvent[] msgs = node_a.manager.as_MessageSendEventsProvider().get_and_clear_pending_msg_events(); @@ -122,17 +169,23 @@ namespace tests { Assert(msgs[0] is MessageSendEvent.MessageSendEvent_SendOpenChannel, 6); node_b.manager.as_ChannelMessageHandler().handle_open_channel(node_a.manager.get_our_node_id(), ((MessageSendEvent.MessageSendEvent_SendOpenChannel) msgs[0]).msg); + Event inbound_chan = get_event(node_b.manager); + Assert(inbound_chan is Event.Event_OpenChannelRequest, 7); + Event.Event_OpenChannelRequest chan_request = (Event.Event_OpenChannelRequest)inbound_chan; + Result_NoneAPIErrorZ accept_res = node_b.manager.accept_inbound_channel_from_trusted_peer_0conf(chan_request.temporary_channel_id, chan_request.counterparty_node_id, new UInt128(42)); + Assert(accept_res.is_ok(), 8); + MessageSendEvent[] response_msgs = node_b.manager.as_MessageSendEventsProvider().get_and_clear_pending_msg_events(); - Assert(response_msgs.Length == 1, 7); - Assert(response_msgs[0] is MessageSendEvent.MessageSendEvent_SendAcceptChannel, 8); + Assert(response_msgs.Length == 1, 9); + Assert(response_msgs[0] is MessageSendEvent.MessageSendEvent_SendAcceptChannel, 10); node_a.manager.as_ChannelMessageHandler().handle_accept_channel(node_b.manager.get_our_node_id(), ((MessageSendEvent.MessageSendEvent_SendAcceptChannel) response_msgs[0]).msg); Event funding_ready = get_event(node_a.manager); - Assert(funding_ready is Event.Event_FundingGenerationReady, 9); + Assert(funding_ready is Event.Event_FundingGenerationReady, 11); // We could use funding_transaction_generated here, but test batching - TwoTuple_ThirtyTwoBytesPublicKeyZ[] channel = new TwoTuple_ThirtyTwoBytesPublicKeyZ[1]; - channel[0] = TwoTuple_ThirtyTwoBytesPublicKeyZ.of(((Event.Event_FundingGenerationReady) funding_ready).temporary_channel_id, ((Event.Event_FundingGenerationReady) funding_ready).counterparty_node_id); + TwoTuple_ChannelIdPublicKeyZ[] channel = new TwoTuple_ChannelIdPublicKeyZ[1]; + channel[0] = TwoTuple_ChannelIdPublicKeyZ.of(((Event.Event_FundingGenerationReady) funding_ready).temporary_channel_id, ((Event.Event_FundingGenerationReady) funding_ready).counterparty_node_id); // Hand-crafted transaction which has a dummy witness and can pay to our script byte[] transaction = new byte[99]; @@ -185,9 +238,9 @@ namespace tests { transaction[46] = 255; transaction[47] = 255; transaction[48] = 1; - transaction[49] = 34; - transaction[50] = 2; - transaction[51] = 0; + transaction[49] = 160; + transaction[50] = 134; + transaction[51] = 1; transaction[52] = 0; transaction[53] = 0; transaction[54] = 0; @@ -195,7 +248,7 @@ namespace tests { transaction[56] = 0; transaction[57] = 34; - Assert(((Event.Event_FundingGenerationReady) funding_ready).output_script.Length == 34, 10); + Assert(((Event.Event_FundingGenerationReady) funding_ready).output_script.Length == 34, 12); for (int i = 0; i < 34; i++) { transaction[58 + i] = ((Event.Event_FundingGenerationReady) funding_ready).output_script[i]; } @@ -209,6 +262,68 @@ namespace tests { transaction[98] = 0; node_a.manager.batch_funding_transaction_generated(channel, transaction); + + MessageSendEvent[] funding_msg = node_a.manager.as_MessageSendEventsProvider().get_and_clear_pending_msg_events(); + Assert(funding_msg.Length == 1, 13); + Assert(funding_msg[0] is MessageSendEvent.MessageSendEvent_SendFundingCreated, 14); + node_b.manager.as_ChannelMessageHandler().handle_funding_created(node_a.manager.get_our_node_id(), ((MessageSendEvent.MessageSendEvent_SendFundingCreated) funding_msg[0]).msg); + + Event bs_chan_pending = get_event(node_b.manager); + Assert(bs_chan_pending is Event.Event_ChannelPending, 15); + + MessageSendEvent[] signed_ready_msgs = node_b.manager.as_MessageSendEventsProvider().get_and_clear_pending_msg_events(); + Assert(signed_ready_msgs.Length == 2, 16); + Assert(signed_ready_msgs[0] is MessageSendEvent.MessageSendEvent_SendFundingSigned, 17); + node_a.manager.as_ChannelMessageHandler().handle_funding_signed(node_b.manager.get_our_node_id(), ((MessageSendEvent.MessageSendEvent_SendFundingSigned) signed_ready_msgs[0]).msg); + Assert(node_a.broadcaster.broadcasted_len == 99, 18); + + Event as_chan_pending = get_event(node_a.manager); + Assert(as_chan_pending is Event.Event_ChannelPending, 19); + + MessageSendEvent[] as_ready = node_a.manager.as_MessageSendEventsProvider().get_and_clear_pending_msg_events(); + Assert(as_ready.Length == 1, 20); + Assert(as_ready[0] is MessageSendEvent.MessageSendEvent_SendChannelReady, 21); + + Assert(signed_ready_msgs[1] is MessageSendEvent.MessageSendEvent_SendChannelReady, 22); + node_a.manager.as_ChannelMessageHandler().handle_channel_ready(node_b.manager.get_our_node_id(), ((MessageSendEvent.MessageSendEvent_SendChannelReady) signed_ready_msgs[1]).msg); + + MessageSendEvent[] as_chan_update = node_a.manager.as_MessageSendEventsProvider().get_and_clear_pending_msg_events(); + Assert(as_chan_update.Length == 1, 23); + Assert(as_chan_update[0] is MessageSendEvent.MessageSendEvent_SendChannelUpdate, 24); + + node_b.manager.as_ChannelMessageHandler().handle_channel_ready(node_a.manager.get_our_node_id(), ((MessageSendEvent.MessageSendEvent_SendChannelReady) as_ready[0]).msg); + + Event as_chan_ready = get_event(node_a.manager); + Assert(as_chan_ready is Event.Event_ChannelReady, 25); + + Event bs_chan_ready = get_event(node_b.manager); + Assert(bs_chan_ready is Event.Event_ChannelReady, 26); + + MessageSendEvent[] bs_chan_update = node_b.manager.as_MessageSendEventsProvider().get_and_clear_pending_msg_events(); + Assert(bs_chan_update.Length == 1, 27); + Assert(bs_chan_update[0] is MessageSendEvent.MessageSendEvent_SendChannelUpdate, 28); + + // Now that we have a channel, pay using a BOLT12 offer! + + Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ builder_res = node_b.manager.create_offer_builder(); + Assert(builder_res.is_ok(), 29); + Result_OfferBolt12SemanticErrorZ offer_res = ((Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_OK)builder_res).res.build(); + Assert(offer_res.is_ok(), 30); + Offer offer = ((Result_OfferBolt12SemanticErrorZ.Result_OfferBolt12SemanticErrorZ_OK)offer_res).res; + + Result_NoneBolt12SemanticErrorZ pay_res = node_a.manager.pay_for_offer(offer, Option_u64Z.none(), Option_u64Z.some(42000), Option_StrZ.none(), new byte[32], Retry.attempts(0), Option_u64Z.none()); + Assert(pay_res.is_ok(), 31); + + OnionMessage as_invreq = node_a.messenger.as_OnionMessageHandler().next_onion_message_for_peer(node_b.manager.get_our_node_id()); + node_b.messenger.as_OnionMessageHandler().handle_onion_message(node_a.manager.get_our_node_id(), as_invreq); + + OnionMessage bs_inv = node_b.messenger.as_OnionMessageHandler().next_onion_message_for_peer(node_a.manager.get_our_node_id()); + node_a.messenger.as_OnionMessageHandler().handle_onion_message(node_b.manager.get_our_node_id(), bs_inv); + + // At this point node_a will generate a commitment update for node_b, which we check exists but don't bother to handle: + MessageSendEvent[] as_commit = node_a.manager.as_MessageSendEventsProvider().get_and_clear_pending_msg_events(); + Assert(as_commit.Length == 1, 32); + Assert(as_commit[0] is MessageSendEvent.MessageSendEvent_UpdateHTLCs, 33); } static void Main(string[] args) { -- 2.30.2 From 29a2ba768cb365caf26ab2f29be687c3ee184a93 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Wed, 15 May 2024 20:07:57 +0000 Subject: [PATCH 14/16] Update branch references to 0.0.123 in CI --- .github/workflows/build.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4dea1a49..e29d7696 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,11 +40,11 @@ jobs: # Note this is a different endpoint, as we need one non-upstream commit! git clone https://github.com/lightningdevkit/rust-lightning cd rust-lightning - git checkout origin/0.0.122-bindings + git checkout origin/0.0.123-bindings cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings - git checkout 0.0.122 + git checkout 0.0.123 cd lightning-c-bindings cargo update -p memchr --precise "2.5.0" --verbose - name: Rebuild C bindings without STD @@ -138,11 +138,11 @@ jobs: # Note this is a different endpoint, as we need one non-upstream commit! git clone https://github.com/lightningdevkit/rust-lightning cd rust-lightning - git checkout origin/0.0.122-bindings + git checkout origin/0.0.123-bindings cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings - git checkout 0.0.122 + git checkout 0.0.123 cd lightning-c-bindings cargo update -p memchr --precise "2.5.0" --verbose - name: Rebuild C bindings with STD @@ -185,11 +185,11 @@ jobs: # Note this is a different endpoint, as we need one non-upstream commit! git clone https://github.com/lightningdevkit/rust-lightning cd rust-lightning - git checkout origin/0.0.122-bindings + git checkout origin/0.0.123-bindings cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings - git checkout 0.0.122 + git checkout 0.0.123 - name: Fetch MacOS SDK run: | curl -o Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz https://bitcoincore.org/depends-sources/sdks/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz @@ -291,11 +291,11 @@ jobs: # Note this is a different endpoint, as we need one non-upstream commit! git clone https://github.com/lightningdevkit/rust-lightning cd rust-lightning - git checkout origin/0.0.122-bindings + git checkout origin/0.0.123-bindings cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings - git checkout 0.0.122 + git checkout 0.0.123 cd lightning-c-bindings cargo update -p memchr --precise "2.5.0" --verbose - name: Pin proc-macro and quote to meet MSRV @@ -354,11 +354,11 @@ jobs: # Note this is a different endpoint, as we need one non-upstream commit! git clone https://github.com/lightningdevkit/rust-lightning cd rust-lightning - git checkout origin/0.0.122-bindings + git checkout origin/0.0.123-bindings cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings - git checkout 0.0.122 + git checkout 0.0.123 cd lightning-c-bindings cargo update -p memchr --precise "2.5.0" --verbose - name: Pin proc-macro and quote to meet MSRV @@ -483,11 +483,11 @@ jobs: # Note this is a different endpoint, as we need one non-upstream commit! git clone https://github.com/lightningdevkit/rust-lightning cd rust-lightning - git checkout origin/0.0.122-bindings + git checkout origin/0.0.123-bindings cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings - git checkout 0.0.122 + git checkout 0.0.123 - name: Fetch MacOS SDK run: | curl -o Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz https://bitcoincore.org/depends-sources/sdks/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz @@ -620,11 +620,11 @@ jobs: # Note this is a different endpoint, as we need one non-upstream commit! git clone https://github.com/lightningdevkit/rust-lightning cd rust-lightning - git checkout origin/0.0.122-bindings + git checkout origin/0.0.123-bindings cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings - git checkout 0.0.122 + git checkout 0.0.123 cd lightning-c-bindings . $HOME/.cargo/env cargo update -p memchr --precise "2.5.0" --verbose @@ -700,11 +700,11 @@ jobs: # Note this is a different endpoint, as we need one non-upstream commit! git clone https://github.com/lightningdevkit/rust-lightning cd rust-lightning - git checkout origin/0.0.122-bindings + git checkout origin/0.0.123-bindings cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings - git checkout 0.0.122 + git checkout 0.0.123 cd lightning-c-bindings cargo update -p memchr --precise "2.5.0" --verbose - name: Rebuild C bindings and check the sample app builds + links -- 2.30.2 From 5ede4970b43f01dd8317d805601b762a45aa510d Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Thu, 16 May 2024 01:20:09 +0000 Subject: [PATCH 15/16] [C#] Install mono-devel in determinism check to get semantic diff --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e29d7696..b5bfa8a7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -254,7 +254,7 @@ jobs: run: | export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)" if ! diff ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"org.ldk.nupkg c_sharp/org.ldk.nupkg; then - dnf -y install diffoscope + dnf -y install diffoscope mono-devel diffoscope ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"org.ldk.nupkg c_sharp/org.ldk.nupkg || echo exit 1 fi -- 2.30.2 From 0be0cd9b4fc1f0294ee219e8511304283b1c90bf Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Thu, 16 May 2024 01:20:26 +0000 Subject: [PATCH 16/16] [Java] Print error stack trace when tests fail --- src/test/java/org/ldk/HumanObjectPeerTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/test/java/org/ldk/HumanObjectPeerTest.java b/src/test/java/org/ldk/HumanObjectPeerTest.java index f61864cc..7a30f10a 100644 --- a/src/test/java/org/ldk/HumanObjectPeerTest.java +++ b/src/test/java/org/ldk/HumanObjectPeerTest.java @@ -1389,6 +1389,7 @@ public class HumanObjectPeerTest { } catch (Exception e) { System.err.println("Caught exception:"); System.err.println(e); + e.printStackTrace(); System.exit(1); } } -- 2.30.2